RPGs3_card_insanity/dist/plate.min.js

3 lines
66 KiB
JavaScript
Raw Normal View History

2019-09-09 20:18:24 +02:00
(function(e){if("function"==typeof bootstrap)bootstrap("plate",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makePlate=e}else"undefined"!=typeof window?window.plate=e():global.plate=e()})(function(){var define,ses,bootstrap,module,exports;return function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i}({1:[function(require,module,exports){require("dst");var plate=require("./lib/index");if(typeof define!=="undefined"&&define.amd){define("plate",[],function(){return plate})}else{window.plate=plate}plate.debug=require("./lib/debug");plate.utils=plate.date=require("./lib/date");plate.utils.Promise=require("./lib/promise");plate.utils.SafeString=function(str){str=new String(str);str.safe=true;return str};plate.libraries=require("./lib/libraries");module.exports=plate},{"./lib/date":5,"./lib/debug":6,"./lib/index":65,"./lib/libraries":66,"./lib/promise":71,dst:92}],2:[function(require,module,exports){module.exports=BlockContext;function BlockContext(){this.blocks={}}var cons=BlockContext,proto=cons.prototype;cons.KEY="__BLOCK_CONTEXT__";cons.from=function(context){return context[this.KEY]};cons.into=function(context){return context[this.KEY]=new this};proto.add=function(blocks){for(var name in blocks){(this.blocks[name]=this.blocks[name]||[]).unshift(blocks[name])}};proto.get=function(name){var list=this.blocks[name]||[];return list[list.length-1]};proto.push=function(name,block){(this.blocks[name]=this.blocks[name]||[]).push(block)};proto.pop=function(name){return(this.blocks[name]=this.blocks[name]||[]).pop()}},{}],3:[function(require,module,exports){module.exports=CommentToken;var Token=require("./token");function CommentToken(content,line){Token.call(this,content,line)}var cons=CommentToken,proto=cons.prototype=new Token;proto.constructor=cons;proto.node=function(parser){return null}},{"./token":90}],4:[function(require,module,exports){module.exports=Context;function Context(from){if(from&&from.constructor===Context){return from}from=from||{};for(var key in from)if(from.hasOwnProperty(key)){this[key]=from[key]}}var cons=Context,proto=cons.prototype;proto.copy=function(){var F=Function();F.name=cons.name;F.prototype=this;return new F}},{}],5:[function(require,module,exports){module.exports={time:time_format,date:format,DateFormat:DateFormat};try{require("tz")}catch(e){}function capfirst(str){return str.replace(/^(.{1})/,function(a,m){return m.toUpperCase()})}function map(arr,iter){var out=[];for(var i=0,len=arr.length;i<len;++i)out.push(iter(arr[i],i,arr));return out}function reduce(arr,iter,start){arr=arr.slice();if(start!==undefined)arr.unshift(start);if(arr.length===0)throw new Error("reduce of empty array");if(arr.length===1)return arr[0];var out=arr.slice(),item=arr.shift();do{item=iter(item,arr.shift())}while(arr.length);return item}function strtoarray(str){var arr=[];for(var i=0,len=str.length;i<len;++i)arr.push(str.charAt(i));return arr}var WEEKDAYS=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],WEEKDAYS_ABBR=map(WEEKDAYS,function(x){return strtoarray(x).slice(0,3).join("")}),WEEKDAYS_REV=reduce(map(WEEKDAYS,function(x,i){return[x,i]}),function(lhs,rhs){lhs[rhs[0]]=rhs[1];return lhs},{}),MONTHS=["january","february","march","april","may","june","july","august","september","october","november","december"],MONTHS_3=map(MONTHS,function(x){return strtoarray(x).slice(0,3).join("")}),MONTHS_3_REV=reduce(map(MONTHS_3,function(x,i){return[x,i]}),function(lhs,rhs){lhs[rhs[0]]=rhs[1];return lhs},{}),MONTHS_AP=["Jan.","Feb.","March","April","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."];var MONTHS_ALT={1:"January",2:"February",3:"March",4
if(result===null)throw new Error(msg.replace(/\{(\d+?)\}/g,function(a,m){return args[+m]}));return result}}},{"./promise":71}],68:[function(require,module,exports){var libraries=require("./libraries");module.exports=Meta;function Meta(){this._autoregister={plugin:{},tag:{},filter:{}};this._cache={};this._classes={filter:libraries.DefaultFilterLibrary,plugin:libraries.DefaultPluginLibrary,tag:libraries.DefaultTagLibrary}}var cons=Meta,proto=cons.prototype;proto.createPluginLibrary=createLibrary("plugin");proto.createFilterLibrary=createLibrary("filter");proto.createTagLibrary=createLibrary("tag");proto.registerPlugin=createAutoregister("plugin");proto.registerFilter=createAutoregister("filter");proto.registerTag=createAutoregister("tag");function createAutoregister(name){return function(key,item){if(this._cache[name])this._cache[name].register(key,item);else this._autoregister[name][key]=item}}function createLibrary(name){return function(){if(this._cache[name])return this._cache[name];var lib=new this._classes[name];for(var key in this._autoregister[name]){lib.register(key,this._autoregister[name][key])}this._cache[name]=lib;return lib}}},{"./libraries":66}],69:[function(require,module,exports){module.exports=NodeList;var Promise=require("./promise");function NodeList(nodes){this.nodes=nodes}var cons=NodeList,proto=cons.prototype;proto.render=function(context){var promises=[],results=[],nodes=this.nodes,result;for(var i=0,len=nodes.length;i<len;++i){results[i]=result=nodes[i].render(context);if(result.constructor===Promise){promises.push(result)}}if(promises.length){return this.resolvePromises(results,promises)}return results.join("")};proto.resolvePromises=function(results,promises){var self=this,promise=new Promise,total=promises.length;for(var i=0,p=0,len=results.length;i<len;++i){if(results[i].constructor!==Promise)continue;promises[p++].once("done",bind(i,function(idx,result){results[idx]=result;if(!--total)promise.resolve(results.join(""))}))}return promise};function bind(num,fn){return function(result){return fn(num,result)}}},{"./promise":71}],70:[function(require,module,exports){module.exports=Parser;var NodeList=require("./node_list");var FilterApplication=require("./filter_application"),FilterLookup=require("./filter_lookup"),FilterChain=require("./filter_chain"),TagToken=require("./tag_token");function Parser(tokens,tags,filters,plugins){this.tokens=tokens;this.tags=tags;this.filters=filters;this.plugins=plugins;this.loadedBlocks=[]}var cons=Parser,proto=cons.prototype;proto.cache={};proto.parse=function(until){var okay=!until,token=null,output=[],node;while(this.tokens.length>0){token=this.tokens.shift();if(until&&token.is(until)&&token.constructor===TagToken){this.tokens.unshift(token);okay=true;break}if(node=token.node(this)){output.push(node)}}if(!okay){throw new Error("expected one of "+until)}return new NodeList(output)};proto.compileNumber=function(content,idx,output){var decimal=content.charAt(idx)===".",bits=decimal?["0."]:[],parse,c;do{c=content.charAt(idx);if(c==="."){if(decimal){break}decimal=true;bits.push(".")}else if(/\d/.test(c)){bits.push(c)}}while(++idx<content.length);parse=decimal?parseFloat:parseInt;output.push(parse(bits.join(""),10));return idx};proto.compileString=function(content,idx,output){var type=content.charAt(idx),escaped=false,bits=[],c;++idx;do{c=content.charAt(idx);if(!escaped){if(c==="\\"){escaped=true;continue}if(c===type){break}bits.push(c)}else{if(!/['"\\]/.test(c)){bits.push("\\")}bits.push(c);escaped=false}}while(++idx<content.length);output.push(bits.join(""));return idx};proto.compileName=function(content,idx,output){var out=[],c;do{c=content.charAt(idx);if(/[^\w\d\_]/.test(c)){break}out.push(c)}while(++idx<content.length);output.push(out.join(""));return idx};proto.compileFilter=function(content,idx,output){var filterName,oldLen,bits;++idx;idx=this.compileName(content,idx,output);filterName=output.pop();if(content.charAt(idx)!==":"){output.push(new FilterApplication(filterName,[]));return idx-1}++idx;oldLen=output.length;idx=this.compileFull(content,idx,output,true);
},{}]},{},[1])(1)});