From 2c8a665a7404834d7d93a1f497dc297020335363 Mon Sep 17 00:00:00 2001 From: Fabian Vogelsteller Date: Wed, 12 Jul 2017 19:51:31 +0200 Subject: [PATCH] Fixes ENS account display (#412) * added @frozeman's fix (#328) * added @frozeman's fix (#328) (#329) * updates for gh-pages (#331) * updates for gh-pages (#332) * added @frozeman's fix (#328) * updates for gh-pages (#331) * Update README (#335) Changes wall to wallet * Set placeholder contract's pragma version using Mist-API (#337) * Set placeholder contract's pragma version using Mist-API * add comment * improvements * add further conditions * added missing 0x * build * Merge Develop (#338) * added @frozeman's fix (#328) * updates for gh-pages (#331) * Update README (#335) Changes wall to wallet * Set placeholder contract's pragma version using Mist-API (#337) * Set placeholder contract's pragma version using Mist-API * add comment * improvements * add further conditions * added missing 0x * build * reverted network id storage on accounts package * re-build * Error handling for previous versions of Mist (#342) * Error handling for previous versions of Mist * Better checking of Mist object * rebuild * remove amount param from coinbase widget (#347) * sticky bar is failing to stick. terrible sticky bar, fake sticky (#348) * Warning when trying to transfer a token to an empty recipient (#346) * authorize accounts callback fix * Add caret operator to contract example (#345) * Addresses need quotes (#351) I'm inferring from https://github.com/ethereum/meteor-dapp-wallet/issues/118 that address parameters need quotes. * [i18n] add missing meteor package; improve error message (#357) * fix russian translation (#356) * fix renaming bug (#358) * update token contract link (#360) * minor typo and other text corrections (#359) * fixes token selection when sending via the zebra-token-list (#361) * fix * update deployContract * fix (#362) * initialize send view correctly when switching from deploy view (#363) * update TX link: testnet.etherscan.io -> ropsten.etherscan.io (#364) * numeral.js: console.warn instead of console.error (#366) * Add ES6 support; correction to fr translation (#365) * make correction to fr translation * meteor: add ES6 support * update i18n string 'accountNote' (#372) * remove whitespaces from address on token.add() (#370) * fix packages (#369) * Adding out of sync warning (#374) * Adding out of sync warning to EN and PT * Adding etherscan button on sidebar * Translations * added german * Changed http:// to https:// on one link (#384) Changed http:// to https:// on one link in README.md * update 'allow-deny' package to avert download timeout (#383) * build wallet * Darken network info font (#388) * Quick wallet fixes (#389) * fix contract ordering * check if function payable * remove console log * some typo fixes; adjust some of the supporting text (#385) * Adding two more currencies to price ticker (#387) * Adding two more currencies to price ticker * updating ethereum:tools package to 0.7.0 * Update coinbase success message (#390) * Updating coinbase success message Signed-off-by: Everton Fraga * Updating coinbase success message * Removed disabled wallets (#393) * remove disabled wallets * removed disabled wallets * Temporarily removing ES6 support: fixing indexeddb driver bug (#395) * Including file to prevent 404 error (#394) * add reactive (#396) * add ens support to input fields (#398) * add ens support * make regex case insensitive * Creating travis file (#402) * Creating travis file * renaming travis file * Specifying node version * Debug 1 * Adding sudo: meteor installation * Updating ethereum-elements; building for production (#405) * Adding travis badge * reverse ENS lookup (#403) * add ens support * make regex case insensitive * fix dbissue * update files * do not pull etherscan or show currencies if on testnet * fix block watch * parenthesis * remove amount param from coinbase widget (#347) * sticky bar is failing to stick. terrible sticky bar, fake sticky (#348) * Warning when trying to transfer a token to an empty recipient (#346) * authorize accounts callback fix * Addresses need quotes (#351) I'm inferring from https://github.com/ethereum/meteor-dapp-wallet/issues/118 that address parameters need quotes. * Add caret operator to contract example (#345) * [i18n] add missing meteor package; improve error message (#357) * fix russian translation (#356) * minor typo and other text corrections (#359) * fix renaming bug (#358) * update token contract link (#360) * fixes token selection when sending via the zebra-token-list (#361) * fix * update deployContract * fix (#362) * initialize send view correctly when switching from deploy view (#363) * update TX link: testnet.etherscan.io -> ropsten.etherscan.io (#364) * numeral.js: console.warn instead of console.error (#366) * Add ES6 support; correction to fr translation (#365) * make correction to fr translation * meteor: add ES6 support * update i18n string 'accountNote' (#372) * remove whitespaces from address on token.add() (#370) * fix packages (#369) * Adding out of sync warning (#374) * Adding out of sync warning to EN and PT * Adding etherscan button on sidebar * Translations * added german * update 'allow-deny' package to avert download timeout (#383) * build wallet * Changed http:// to https:// on one link (#384) Changed http:// to https:// on one link in README.md * Darken network info font (#388) * Quick wallet fixes (#389) * fix contract ordering * check if function payable * remove console log * some typo fixes; adjust some of the supporting text (#385) * Adding two more currencies to price ticker (#387) * Adding two more currencies to price ticker * updating ethereum:tools package to 0.7.0 * Update coinbase success message (#390) * Updating coinbase success message Signed-off-by: Everton Fraga * Updating coinbase success message * Removed disabled wallets (#393) * remove disabled wallets * removed disabled wallets * Temporarily removing ES6 support: fixing indexeddb driver bug (#395) * Including file to prevent 404 error (#394) * add reactive (#396) * add ens support to input fields (#398) * add ens support * make regex case insensitive * Creating travis file (#402) * Creating travis file * renaming travis file * Specifying node version * Debug 1 * Adding sudo: meteor installation * Updating ethereum-elements; building for production (#405) * Adding travis badge * reverse ENS lookup (#403) * add ens support * make regex case insensitive * fix dbissue * update files * do not pull etherscan or show currencies if on testnet * fix block watch * parenthesis * Release fixes (#408) * fixes from the PR407 review * makes header work in mist properly * makes wallet header work in mist properly, only is small now in the wallet #2 * remove not existing reactiveData template helper * Editor formatting * Fixing token selection bug * fixes token switching * Release fixes (#409) * fixes from the PR407 review * makes header work in mist properly * makes wallet header work in mist properly, only is small now in the wallet #2 * remove not existing reactiveData template helper * Editor formatting * Fixing token selection bug * fixes token switching * build files * Release fixes (#411) * fixes from the PR407 review * makes header work in mist properly * makes wallet header work in mist properly, only is small now in the wallet #2 * remove not existing reactiveData template helper * Editor formatting * Fixing token selection bug * fixes token switching * build files * fixed ENS --- app/client/lib/ethereum/observeBlocks.js | 6 +- ...b6a88501779bf9280244f0c67f8a8576b03dd58.js | 485 ++++++++++++++++++ build/index.html | 2 +- 3 files changed, 491 insertions(+), 2 deletions(-) create mode 100644 build/8b6a88501779bf9280244f0c67f8a8576b03dd58.js diff --git a/app/client/lib/ethereum/observeBlocks.js b/app/client/lib/ethereum/observeBlocks.js index cf2135516..eb20ff031 100644 --- a/app/client/lib/ethereum/observeBlocks.js +++ b/app/client/lib/ethereum/observeBlocks.js @@ -48,8 +48,13 @@ updateBalances = function() { }, 1000); } } + }); + // UPDATE ENS + var allAccounts = EthAccounts.find().fetch().concat(walletsAndContracts); + _.each(allAccounts, function(account){ + // Only check ENS names every N minutes var now = Date.now(); if (!account.ensCheck || (account.ensCheck && now - account.ensCheck > 10*60*1000)) { @@ -67,7 +72,6 @@ updateBalances = function() { } }); } - }); diff --git a/build/8b6a88501779bf9280244f0c67f8a8576b03dd58.js b/build/8b6a88501779bf9280244f0c67f8a8576b03dd58.js new file mode 100644 index 000000000..385742eed --- /dev/null +++ b/build/8b6a88501779bf9280244f0c67f8a8576b03dd58.js @@ -0,0 +1,485 @@ +!function(){var n,t;(function(){n={}}).call(this),function(){(function(){var t=this,r=t._,e={},u=Array.prototype,i=Object.prototype,a=Function.prototype,o=u.push,c=u.slice,l=u.concat,f=i.toString,s=i.hasOwnProperty,p=u.forEach,v=u.map,h=u.reduce,d=u.reduceRight,g=u.filter,m=u.every,y=u.some,b=u.indexOf,_=u.lastIndexOf,w=Array.isArray,x=Object.keys,j=a.bind,A=function(n){return n instanceof A?n:this instanceof A?void(this._wrapped=n):new A(n)};"undefined"!=typeof n?("undefined"!=typeof module&&module.exports&&(n=module.exports=A),n._=A):t._=A,A.VERSION="1.5.2";var k=function(n){return"[object Arguments]"===f.call(n)};k(arguments)||(k=function(n){return!(!n||!s.call(n,"callee")||"function"!=typeof n.callee)});var O=function(n){return n.length===+n.length&&(k(n)||n.constructor!==Object)},E=A.each=A.forEach=function(n,t,r){if(null!=n)if(p&&n.forEach===p)n.forEach(t,r);else if(O(n)){for(var u=0,i=n.length;i>u;u++)if(t.call(r,n[u],u,n)===e)return}else for(var a=A.keys(n),u=0,i=a.length;i>u;u++)if(t.call(r,n[a[u]],a[u],n)===e)return};A.map=A.collect=function(n,t,r){var e=[];return null==n?e:v&&n.map===v?n.map(t,r):(E(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var F="Reduce of empty array with no initial value";A.reduce=A.foldl=A.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=A.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(E(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(F);return r},A.reduceRight=A.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),d&&n.reduceRight===d)return e&&(t=A.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(!O(n)){var a=A.keys(n);i=a.length}if(E(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(F);return r},A.find=A.detect=function(n,t,r){var e;return M(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},A.filter=A.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(E(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},A.reject=function(n,t,r){return A.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},A.every=A.all=function(n,t,r){t||(t=A.identity);var u=!0;return null==n?u:m&&n.every===m?n.every(t,r):(E(n,function(n,i,a){return(u=u&&t.call(r,n,i,a))?void 0:e}),!!u)};var M=A.some=A.any=function(n,t,r){t||(t=A.identity);var u=!1;return null==n?u:y&&n.some===y?n.some(t,r):(E(n,function(n,i,a){return u||(u=t.call(r,n,i,a))?e:void 0}),!!u)};A.contains=A.include=function(n,t){return null==n?!1:b&&n.indexOf===b?-1!=n.indexOf(t):M(n,function(n){return n===t})},A.invoke=function(n,t){var r=c.call(arguments,2),e=A.isFunction(t);return A.map(n,function(n){return(e?t:n[t]).apply(n,r)})},A.pluck=function(n,t){return A.map(n,function(n){return n[t]})},A.where=function(n,t,r){return A.isEmpty(t)?r?void 0:[]:A[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},A.findWhere=function(n,t){return A.where(n,t,!0)},A.max=function(n,t,r){if(!t&&A.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);if(!t&&A.isEmpty(n))return-(1/0);var e={computed:-(1/0),value:-(1/0)};return E(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>e.computed&&(e={value:n,computed:a})}),e.value},A.min=function(n,t,r){if(!t&&A.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);if(!t&&A.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return E(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;ae||void 0===r)return 1;if(e>r||void 0===e)return-1}return n.index-t.index}),"value")};var S=function(n){return function(t,r,e){var u={},i=null==r?A.identity:R(r);return E(t,function(r,a){var o=i.call(e,r,a,t);n(u,o,r)}),u}};A.groupBy=S(function(n,t,r){(A.has(n,t)?n[t]:n[t]=[]).push(r)}),A.indexBy=S(function(n,t,r){n[t]=r}),A.countBy=S(function(n,t){A.has(n,t)?n[t]++:n[t]=1}),A.sortedIndex=function(n,t,r,e){r=null==r?A.identity:R(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])=0})})},A.difference=function(n){var t=l.apply(u,c.call(arguments,1));return A.filter(n,function(n){return!A.contains(t,n)})},A.zip=function(){for(var n=A.max(A.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=A.pluck(arguments,""+r);return t},A.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},A.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=A.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(b&&n.indexOf===b)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},A.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(_&&n.lastIndexOf===_)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},A.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var T=function(){};A.bind=function(n,t){var r,e;if(j&&n.bind===j)return j.apply(n,c.call(arguments,1));if(!A.isFunction(n))throw new TypeError;return r=c.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(c.call(arguments)));T.prototype=n.prototype;var u=new T;T.prototype=null;var i=n.apply(u,r.concat(c.call(arguments)));return Object(i)===i?i:u}},A.partial=function(n){var t=c.call(arguments,1);return function(){return n.apply(this,t.concat(c.call(arguments)))}},A.bindAll=function(n){var t=c.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return E(t,function(t){n[t]=A.bind(n[t],n)}),n},A.memoize=function(n,t){var r={};return t||(t=A.identity),function(){var e=t.apply(this,arguments);return A.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},A.delay=function(n,t){var r=c.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},A.defer=function(n){return A.delay.apply(A,[n,1].concat(c.call(arguments,1)))},A.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var c=function(){o=r.leading===!1?0:new Date,a=null,i=n.apply(e,u)};return function(){var l=new Date;o||r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u)):a||r.trailing===!1||(a=setTimeout(c,f)),i}},A.debounce=function(n,t,r){var e,u,i,a,o;return function(){i=this,u=arguments,a=new Date;var c=function(){var l=new Date-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u)))},l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u)),o}},A.once=function(n){var t=!1,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},A.wrap=function(n,t){return function(){var r=[n];return o.apply(r,arguments),t.apply(this,r)}},A.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},A.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},A.keys=x||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)A.has(n,r)&&t.push(r);return t},A.values=function(n){for(var t=A.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},A.pairs=function(n){for(var t=A.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},A.invert=function(n){for(var t={},r=A.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},A.functions=A.methods=function(n){var t=[];for(var r in n)A.isFunction(n[r])&&t.push(r);return t.sort()},A.extend=function(n){return E(c.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},A.pick=function(n){var t={},r=l.apply(u,c.call(arguments,1));return E(r,function(r){r in n&&(t[r]=n[r])}),t},A.omit=function(n){var t={},r=l.apply(u,c.call(arguments,1));for(var e in n)A.contains(r,e)||(t[e]=n[e]);return t},A.defaults=function(n){return E(c.call(arguments,1),function(t){if(t)for(var r in t)void 0===n[r]&&(n[r]=t[r])}),n},A.clone=function(n){return A.isObject(n)?A.isArray(n)?n.slice():A.extend({},n):n},A.tap=function(n,t){return t(n),n};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof A&&(n=n._wrapped),t instanceof A&&(t=t._wrapped);var u=f.call(n);if(u!=f.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(A.isFunction(a)&&a instanceof a&&A.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c=0,l=!0;if("[object Array]"==u){if(c=n.length,l=c==t.length)for(;c--&&(l=N(n[c],t[c],r,e)););}else{for(var s in n)if(A.has(n,s)&&(c++,!(l=A.has(t,s)&&N(n[s],t[s],r,e))))break;if(l){for(s in t)if(A.has(t,s)&&!c--)break;l=!c}}return r.pop(),e.pop(),l};A.isEqual=function(n,t){return N(n,t,[],[])},A.isEmpty=function(n){if(null==n)return!0;if(A.isArray(n)||A.isString(n))return 0===n.length;for(var t in n)if(A.has(n,t))return!1;return!0},A.isElement=function(n){return!(!n||1!==n.nodeType)},A.isArray=w||function(n){return"[object Array]"==f.call(n)},A.isObject=function(n){return n===Object(n)},E(["Arguments","Function","String","Number","Date","RegExp"],function(n){A["is"+n]=function(t){return f.call(t)=="[object "+n+"]"}}),A.isArguments(arguments)||(A.isArguments=function(n){return!(!n||!A.has(n,"callee"))}),"function"!=typeof/./&&(A.isFunction=function(n){return"function"==typeof n}),A.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},A.isNaN=function(n){return A.isNumber(n)&&n!=+n},A.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==f.call(n)},A.isNull=function(n){return null===n},A.isUndefined=function(n){return void 0===n},A.has=function(n,t){return s.call(n,t)},A.noConflict=function(){return t._=r,this},A.identity=function(n){return n},A.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},A.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var q={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};q.unescape=A.invert(q.escape);var B={escape:new RegExp("["+A.keys(q.escape).join("")+"]","g"),unescape:new RegExp("("+A.keys(q.unescape).join("|")+")","g")};A.each(["escape","unescape"],function(n){A[n]=function(t){return null==t?"":(""+t).replace(B[n],function(t){return q[n][t]})}}),A.result=function(n,t){if(null==n)return void 0;var r=n[t];return A.isFunction(r)?r.call(n):r},A.mixin=function(n){E(A.functions(n),function(t){var r=A[t]=n[t];A.prototype[t]=function(){var n=[this._wrapped];return o.apply(n,arguments),U.call(this,r.apply(A,n))}})};var D=0;A.uniqueId=function(n){var t=++D+"";return n?n+t:t},A.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var P=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},C=/\\|'|\r|\n|\t|\u2028|\u2029/g;A.template=function(n,t,r){var e;r=A.defaults({},r,A.templateSettings);var u=new RegExp([(r.escape||P).source,(r.interpolate||P).source,(r.evaluate||P).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(C,function(n){return"\\"+z[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,A);var c=function(n){return e.call(this,n,A)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},A.chain=function(n){return A(n).chain()};var U=function(n){return this._chain?A(n).chain():n};A.mixin(A),E(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=u[n];A.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],U.call(this,r)}}),E(["concat","join","slice"],function(n){var t=u[n];A.prototype[n]=function(){return U.call(this,t.apply(this._wrapped,arguments))}}),A.extend(A.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this)}.call(this),function(){t=n._}.call(this),"undefined"==typeof Package&&(Package={}),function(n,t){for(var r in t)r in n||(n[r]=t[r])}(Package.underscore={},{_:t})}(); + +!function(){var t=Package.underscore._,e,n,r;(function(){e=this}).call(this),function(){n=__meteor_runtime_config__.meteorEnv,r={isProduction:"production"===n.NODE_ENV,isDevelopment:"production"!==n.NODE_ENV,isClient:!0,isServer:!1,isCordova:!1},"object"==typeof __meteor_runtime_config__&&__meteor_runtime_config__.PUBLIC_SETTINGS&&(r.settings={"public":__meteor_runtime_config__.PUBLIC_SETTINGS})}.call(this),function(){function e(t){return t?r._debug("Exception in callback of async function",t.stack?t.stack:t):void 0}if(r.isServer)var n=Npm.require("fibers/future");"object"==typeof __meteor_runtime_config__&&__meteor_runtime_config__.meteorRelease&&(r.release=__meteor_runtime_config__.meteorRelease),t.extend(r,{_get:function(t){for(var e=1;e=0;r--){var o=arguments[r+1];if(n)n=!1;else for(var i in e[r][o])return;delete e[r][o]}},wrapAsync:function(o,i){return function(){for(var a=i||this,s=t.toArray(arguments),u,c=s.length-1;c>=0;--c){var l=s[c],f=typeof l;if("undefined"!==f){"function"===f&&(u=l);break}}if(!u){if(r.isClient)u=e;else{var p=new n;u=p.resolver()}++c}s[c]=r.bindEnvironment(u);var _=o.apply(a,s);return p?p.wait():_}},_inherits:function(e,n){for(var r in n)t.has(n,r)&&(e[r]=n[r]);var o=function(){this.constructor=e};return o.prototype=n.prototype,e.prototype=new o,e.__super__=n.prototype,e}});var o=!1;r._wrapAsync=function(t,e){return o||(r._debug("Meteor._wrapAsync has been renamed to Meteor.wrapAsync"),o=!0),r.wrapAsync.apply(r,arguments)}}.call(this),function(){"use strict";function t(){if(o.setImmediate){var t=function(t){o.setImmediate(t)};return t.implementation="setImmediate",t}return null}function e(){function t(t,e){return"string"==typeof t&&t.substring(0,e.length)===e}function e(e){if(e.source===o&&t(e.data,s)){var n=e.data.substring(s.length);try{a[n]&&a[n]()}finally{delete a[n]}}}if(!o.postMessage||o.importScripts)return null;var n=!0,r=o.onmessage;if(o.onmessage=function(){n=!1},o.postMessage("","*"),o.onmessage=r,!n)return null;var i=0,a={},s="Meteor._setImmediate."+Math.random()+".";o.addEventListener?o.addEventListener("message",e,!1):o.attachEvent("onmessage",e);var u=function(t){++i,a[i]=t,o.postMessage(s+i,"*")};return u.implementation="postMessage",u}function n(){var t=function(t){o.setTimeout(t,0)};return t.implementation="setTimeout",t}var o=this;r._setImmediate=t()||e()||n()}.call(this),function(){var e=function(t){if(Package.ddp){var e=Package.ddp.DDP._CurrentInvocation;if(e.get()&&e.get().isSimulation)throw new Error("Can't set timers inside simulations");return function(){e.withValue(null,t)}}return t},n=function(t,n){return r.bindEnvironment(e(n),t)};t.extend(r,{setTimeout:function(t,e){return setTimeout(n("setTimeout callback",t),e)},setInterval:function(t,e){return setInterval(n("setInterval callback",t),e)},clearInterval:function(t){return clearInterval(t)},clearTimeout:function(t){return clearTimeout(t)},defer:function(t){r._setImmediate(n("defer callback",t))}})}.call(this),function(){r.makeErrorType=function(t,e){var n=function(){Error.captureStackTrace?Error.captureStackTrace(this,n):this.stack=(new Error).stack,e.apply(this,arguments),this.errorType=t};return r._inherits(n,Error),n},r.Error=r.makeErrorType("Meteor.Error",function(t,e,n){var r=this;r.error=t,r.reason=e,r.details=n,r.reason?r.message=r.reason+" ["+r.error+"]":r.message="["+r.error+"]"}),r.Error.prototype.clone=function(){var t=this;return new r.Error(t.error,t.reason,t.details)}}.call(this),function(){r._noYieldsAllowed=function(t){return t()},r._SynchronousQueue=function(){var t=this;t._tasks=[],t._running=!1,t._runTimeout=null},t.extend(r._SynchronousQueue.prototype,{runTask:function(e){var n=this;if(!n.safeToRunTask())throw new Error("Could not synchronously run a task from a running task");n._tasks.push(e);var o=n._tasks;n._tasks=[],n._running=!0,n._runTimeout&&(clearTimeout(n._runTimeout),n._runTimeout=null);try{for(;!t.isEmpty(o);){var i=o.shift();try{i()}catch(a){if(t.isEmpty(o))throw a;r._debug("Exception in queued task: "+(a.stack||a))}}}finally{n._running=!1}},queueTask:function(e){var n=this;n._tasks.push(e),n._runTimeout||(n._runTimeout=setTimeout(t.bind(n.flush,n),0))},flush:function(){var t=this;t.runTask(function(){})},drain:function(){var e=this;if(e.safeToRunTask())for(;!t.isEmpty(e._tasks);)e.flush()},safeToRunTask:function(){var t=this;return!t._running}})}.call(this),function(){var t=[],e=!1,n=!1,o=0,i=function(){o++},a=function(){o--,s()},s=function(){if(!(n||!e||o>0)){for(n=!0;t.length;)t.shift()();r.isCordova&&WebAppLocalServer.startupDidComplete()}},u=function(){e||(e=!0,s())};r.isCordova&&(i(),document.addEventListener("deviceready",a,!1)),"complete"===document.readyState||"loaded"===document.readyState?window.setTimeout(u):document.addEventListener?(document.addEventListener("DOMContentLoaded",u,!1),window.addEventListener("load",u,!1)):(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&u()}),window.attachEvent("load",u)),r.startup=function(e){var o=!document.addEventListener&&document.documentElement.doScroll;if(o&&window===top){try{o("left")}catch(i){return void setTimeout(function(){r.startup(e)},50)}e()}else n?e():t.push(e)}}.call(this),function(){var t=0;r._debug=function(){if(t)return void t--;if("undefined"!=typeof console&&"undefined"!=typeof console.log)if(0==arguments.length)console.log("");else if("function"==typeof console.log.apply){for(var e=!0,n=0;n255)throw new Error("Not ascii. Base64.encode can only take ascii strings.");n[e]=l}}for(var u=[],i=null,o=null,c=null,f=null,e=0;e>2&63,o=(3&n[e])<<4;break;case 1:o|=n[e]>>4&15,c=(15&n[e])<<2;break;case 2:c|=n[e]>>6&3,f=63&n[e],u.push(t(i)),u.push(t(o)),u.push(t(c)),u.push(t(f)),i=null,o=null,c=null,f=null}return null!=i&&(u.push(t(i)),u.push(t(o)),u.push(null==c?"=":t(c)),null==f&&u.push("=")),u.join("")};var t=function(r){return n.charAt(r)},l=function(n){return"="===n?-1:r[n]};a.newBinary=function(n){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer){for(var r=[],e=0;n>e;e++)r.push(0);return r.$Uint8ArrayPolyfill=!0,r}return new Uint8Array(new ArrayBuffer(n))},a.decode=function(n){var r=Math.floor(3*n.length/4);"="==n.charAt(n.length-1)&&(r--,"="==n.charAt(n.length-2)&&r--);for(var e=a.newBinary(r),t=null,u=null,i=null,o=0,c=0;cs)throw new Error("invalid base64 string");t=s<<2;break;case 1:if(0>s)throw new Error("invalid base64 string");t|=s>>4,e[o++]=t,u=(15&s)<<4;break;case 2:s>=0&&(u|=s>>2,e[o++]=u,i=(3&s)<<6);break;case 3:s>=0&&(e[o++]=i|s)}}return e}}).call(this),"undefined"==typeof Package&&(Package={}),function(n,r){for(var e in r)e in n||(n[e]=r[e])}(Package.base64={},{Base64:a})}(); + +!function(){var n=Package.meteor.Meteor,e=Package.meteor.global,t=Package.meteor.meteorEnv,r=Package.underscore._,u=Package.base64.Base64,a,i;(function(){a={},i={};var e={};a.addType=function(n,t){if(r.has(e,n))throw new Error("Type "+n+" already present");e[n]=t};var t=function(n){return r.isNaN(n)||n===1/0||n===-(1/0)},o=[{matchJSONValue:function(n){return r.has(n,"$date")&&1===r.size(n)},matchObject:function(n){return n instanceof Date},toJSONValue:function(n){return{$date:n.getTime()}},fromJSONValue:function(n){return new Date(n.$date)}},{matchJSONValue:function(n){return r.has(n,"$InfNaN")&&1===r.size(n)},matchObject:t,toJSONValue:function(n){var e;return e=r.isNaN(n)?0:n===1/0?1:-1,{$InfNaN:e}},fromJSONValue:function(n){return n.$InfNaN/0}},{matchJSONValue:function(n){return r.has(n,"$binary")&&1===r.size(n)},matchObject:function(n){return"undefined"!=typeof Uint8Array&&n instanceof Uint8Array||n&&r.has(n,"$Uint8ArrayPolyfill")},toJSONValue:function(n){return{$binary:u.encode(n)}},fromJSONValue:function(n){return u.decode(n.$binary)}},{matchJSONValue:function(n){return r.has(n,"$escape")&&1===r.size(n)},matchObject:function(n){return r.isEmpty(n)||r.size(n)>2?!1:r.any(o,function(e){return e.matchJSONValue(n)})},toJSONValue:function(n){var e={};return r.each(n,function(n,t){e[t]=a.toJSONValue(n)}),{$escape:e}},fromJSONValue:function(n){var e={};return r.each(n.$escape,function(n,t){e[t]=a.fromJSONValue(n)}),e}},{matchJSONValue:function(n){return r.has(n,"$type")&&r.has(n,"$value")&&2===r.size(n)},matchObject:function(n){return a._isCustomType(n)},toJSONValue:function(e){var t=n._noYieldsAllowed(function(){return e.toJSONValue()});return{$type:e.typeName(),$value:t}},fromJSONValue:function(t){var u=t.$type;if(!r.has(e,u))throw new Error("Custom EJSON type "+u+" is not defined");var a=e[u];return n._noYieldsAllowed(function(){return a(t.$value)})}}];a._isCustomType=function(n){return n&&"function"==typeof n.toJSONValue&&"function"==typeof n.typeName&&r.has(e,n.typeName())},a._getTypes=function(){return e},a._getConverters=function(){return o};var f=a._adjustTypesToJSONValue=function(n){if(null===n)return null;var e=c(n);return void 0!==e?e:"object"!=typeof n?n:(r.each(n,function(e,r){if("object"==typeof e||void 0===e||t(e)){var u=c(e);return u?void(n[r]=u):void f(e)}}),n)},c=function(n){for(var e=0;e=f.length?!1:r!==f[u]?!1:a.equals(n,e[f[u]],t)?(u++,!0):!1}),o&&u===f.length}return u=0,o=r.all(n,function(n,i){return r.has(e,i)&&a.equals(n,e[i],t)?(u++,!0):!1}),o&&r.size(e)===u},a.clone=function(n){var e;if("object"!=typeof n)return n;if(null===n)return null;if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp)return n;if(a.isBinary(n)){e=a.newBinary(n.length);for(var t=0;tf;f+=1)h[f]=e(f,N,a,y,o)||"null";return l=0===h.length?"[]":y?"[\n"+y+h.join(",\n"+y)+"\n"+i+"]":"["+h.join(",")+"]"}var p=r.keys(N);return o&&(p=p.sort()),r.each(p,function(t){l=e(t,N,a,y,o),l&&h.push(n(t)+(y?": ":":")+l)}),l=0===h.length?"{}":y?"{\n"+y+h.join(",\n"+y)+"\n"+i+"}":"{"+h.join(",")+"}"}};a._canonicalStringify=function(n,t){if(t=r.extend({indent:"",canonical:!1},t),t.indent===!0)t.indent=" ";else if("number"==typeof t.indent){for(var u="",a=0;ai||i>t.name.length+2){var a=t.name+": "+t.message;o.push(a)}}o.push(t.stack),r(o.length);for(var u=0;u1e3)return void(e=!0)}if(d.length){var a=d.shift();try{a()}catch(u){i("afterFlush",u)}}}e=!0}finally{if(e||(p=!1,o._runFlush({finishSynchronously:n.finishSynchronously,throwFirstError:!1})),s=!1,p=!1,c.length||d.length){if(n.finishSynchronously)throw new Error("still have more to do?");setTimeout(h,10)}}},o.autorun=function(n,t){if("function"!=typeof n)throw new Error("Tracker.autorun requires a function argument");t=t||{},v=!0;var e=new o.Computation(n,o.currentComputation,t.onError);return o.active&&o.onInvalidate(function(){e.stop()}),e},o.nonreactive=function(n){var e=o.currentComputation;t(null);try{return n()}finally{t(e)}},o.onInvalidate=function(n){if(!o.active)throw new Error("Tracker.onInvalidate requires a currentComputation");o.currentComputation.onInvalidate(n)},o.afterFlush=function(n){d.push(n),h()}}).call(this),function(){n.flush=o.flush,n.autorun=o.autorun,n.autosubscribe=o.autorun,o.depend=function(n){return n.depend()},r=o}.call(this),"undefined"==typeof Package&&(Package={}),function(n,t){for(var e in t)e in n||(n[e]=t[e])}(Package.tracker={},{Tracker:o,Deps:r})}(); + +!function(){var r=Package.meteor.Meteor,n=Package.meteor.global,e=Package.meteor.meteorEnv,t,o;t=function(r){function n(r,n){return t(r)&&(s(j,r,n),o(g)&&g(P)),P}function e(r,n){return x.call(r,n)&&r[n]}function t(r){return r&&"object"==typeof r}function o(r){return"function"==typeof r}function i(r){return"string"==typeof r}function u(r){function n(n){var e=m(r,n);if(e)return c(e,r.m);var t=new Error("Cannot find module '"+n+"'");if(o(w))return w(n,r.m.id,t);throw t}return n.resolve=function(n){var e=m(r,n);if(e)return e.m.id;throw new Error("Cannot find module '"+n+"'")},n}function f(r,n){var e=this;e.p=n=n||null,e.m=new y(r)}function c(r,n){var e=r&&r.c,t=r.m;if(!x.call(t,"exports")){if(n){t.parent=n;var i=n.children;Array.isArray(i)&&i.push(t)}o(t.useNode)&&t.useNode()||e(r.r=r.r||u(r),t.exports={},t,r.m.id,r.p.m.id)}return t.exports}function a(r){return r&&t(r.c)}function s(r,n,u){if(Array.isArray(n)){var c=[];n.forEach(function(r){i(r)?c.push(r):o(r)&&(n=r)}),o(n)?n.d=c:n=null}else o(n)?n.d=n.d||[]:i(n)||t(n)||(n=null);n&&(r.c=r.c||(t(n)?{}:n),t(n)&&a(r)&&Object.keys(n).forEach(function(t){if(".."===t)o=r.p;else{var o=e(r.c,t);o||(o=r.c[t]=new f(r.m.id.replace(/\/*$/,"/")+t,r),o.o=u)}s(o,n[t],u)}))}function l(r){return r.o&&r.o.extensions||v}function d(r,n,t){for(;r&&!a(r);)r=r.p;if(!r||!n||"."===n)return r;if(".."===n)return r.p;var o=e(r.c,n);if(t&&(!o||a(o)))for(var i=0;io;o++)e.push("a"+o);var r=["return function ("+e.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(e).concat([u]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],r)(i,n)}function r(n){for(var t=Math.max(n.length-1,3),e=[],o=0;t>o;o++)e.push("a"+o);var r=["return function ("+e.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+t+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+u+";","var res;","switch (argLength) {",e.concat(["extra"]).map(function(n,t){return"case "+t+":res = fn.call("+["self"].concat(e.slice(0,t)).concat("cb").join(",")+");break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],r)(i,n)}var i=n("./core.js"),s=n("asap");e.exports=i,i.denodeify=function(n,t){return"number"==typeof t&&t!==1/0?o(n,t):r(n)};var u="function (err, res) {if (err) { rj(err); } else { rs(res); }}";i.nodeify=function(n){return function(){var t=Array.prototype.slice.call(arguments),e="function"==typeof t[t.length-1]?t.pop():null,o=this;try{return n.apply(this,arguments).nodeify(e,o)}catch(r){if(null===e||"undefined"==typeof e)return new i(function(n,t){t(r)});s(function(){e.call(o,r)})}}},i.prototype.nodeify=function(n,t){return"function"!=typeof n?this:void this.then(function(e){s(function(){n.call(t,null,e)})},function(e){s(function(){n.call(t,e)})})}}],"synchronous.js":["./core.js",function(n,t,e){"use strict";var o=n("./core.js");e.exports=o,o.enableSynchronous=function(){o.prototype.isPending=function(){return 0==this.getState()},o.prototype.isFulfilled=function(){return 1==this.getState()},o.prototype.isRejected=function(){return 2==this.getState()},o.prototype.getValue=function(){if(3===this._81)return this._65.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._65},o.prototype.getReason=function(){if(3===this._81)return this._65.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._65},o.prototype.getState=function(){return 3===this._81?this._65.getState():-1===this._81||-2===this._81?0:this._81}},o.disableSynchronous=function(){o.prototype.isPending=void 0,o.prototype.isFulfilled=void 0,o.prototype.isRejected=void 0,o.prototype.getValue=void 0,o.prototype.getReason=void 0,o.prototype.getState=void 0}}]},node_modules:{asap:{"raw.js":["domain",function(n,t,e){"use strict";function o(n){f.length||(s(),a=!0),f[f.length]=n}function r(){for(;lp){for(var t=0,e=f.length-l;e>t;t++)f[t]=f[t+l];f.length-=l,l=0}}f.length=0,l=0,a=!1}function s(){var t=i.domain;t&&(u||(u=n("domain")),u.active=i.domain=null),a&&c?setImmediate(r):i.nextTick(r),t&&(u.active=i.domain=t)}var u,c="function"==typeof setImmediate;e.exports=o;var f=[],a=!1,l=0,p=1024;o.requestFlush=s}],"package.json":function(n,t){t.name="asap",t.version="2.0.3",t.main="./asap.js"},"asap.js":["./raw",function(n,t,e){"use strict";function o(n){var t;t=u.length?u.pop():new r,t.task=n,t.domain=i.domain,s(t)}function r(){this.task=null,this.domain=null}var s=n("./raw"),u=[];e.exports=o,r.prototype.call=function(){this.domain&&this.domain.enter();var n=!0;try{this.task.call(),n=!1,this.domain&&this.domain.exit()}finally{n&&s.requestFlush(),this.task=null,this.domain=null,u.push(this)}}}]}}}}}}}}}},{extensions:[".js",".json"]}),s=c("./node_modules/meteor/promise/client.js");"undefined"==typeof Package&&(Package={}),function(n,t){for(var e in t)e in n||(n[e]=t[e])}(Package.promise=s,{Promise:u})}(); + +!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,r=Package.meteor.meteorEnv,n=Package.modules.meteorInstall,o=Package.modules.Buffer,s=Package.modules.process,i=Package.promise.Promise,c,u,a,f,$,l=n({node_modules:{meteor:{"ecmascript-runtime":{"runtime.js":["meteor-ecmascript-runtime",function(e,t,r){r.exports=e("meteor-ecmascript-runtime")}],node_modules:{"meteor-ecmascript-runtime":{"package.json":function(e,t){t.name="meteor-ecmascript-runtime",t.version="0.2.6",t.main="server.js"},"server.js":["core-js/es6/object","core-js/es6/array","core-js/es6/string","core-js/es6/function","core-js/es6/symbol","core-js/es6/map","core-js/es6/set",function(e,t){e("core-js/es6/object"),e("core-js/es6/array"),e("core-js/es6/string"),e("core-js/es6/function"),c=t.Symbol=e("core-js/es6/symbol"),u=t.Map=e("core-js/es6/map"),a=t.Set=e("core-js/es6/set")}],node_modules:{"core-js":{es6:{"object.js":["../modules/es6.symbol","../modules/es6.object.assign","../modules/es6.object.is","../modules/es6.object.set-prototype-of","../modules/es6.object.to-string","../modules/es6.object.freeze","../modules/es6.object.seal","../modules/es6.object.prevent-extensions","../modules/es6.object.is-frozen","../modules/es6.object.is-sealed","../modules/es6.object.is-extensible","../modules/es6.object.get-own-property-descriptor","../modules/es6.object.get-prototype-of","../modules/es6.object.keys","../modules/es6.object.get-own-property-names","../modules/$.core",function(e,t,r){e("../modules/es6.symbol"),e("../modules/es6.object.assign"),e("../modules/es6.object.is"),e("../modules/es6.object.set-prototype-of"),e("../modules/es6.object.to-string"),e("../modules/es6.object.freeze"),e("../modules/es6.object.seal"),e("../modules/es6.object.prevent-extensions"),e("../modules/es6.object.is-frozen"),e("../modules/es6.object.is-sealed"),e("../modules/es6.object.is-extensible"),e("../modules/es6.object.get-own-property-descriptor"),e("../modules/es6.object.get-prototype-of"),e("../modules/es6.object.keys"),e("../modules/es6.object.get-own-property-names"),r.exports=e("../modules/$.core").Object}],"array.js":["../modules/es6.string.iterator","../modules/es6.array.from","../modules/es6.array.of","../modules/es6.array.species","../modules/es6.array.iterator","../modules/es6.array.copy-within","../modules/es6.array.fill","../modules/es6.array.find","../modules/es6.array.find-index","../modules/$.core",function(e,t,r){e("../modules/es6.string.iterator"),e("../modules/es6.array.from"),e("../modules/es6.array.of"),e("../modules/es6.array.species"),e("../modules/es6.array.iterator"),e("../modules/es6.array.copy-within"),e("../modules/es6.array.fill"),e("../modules/es6.array.find"),e("../modules/es6.array.find-index"),r.exports=e("../modules/$.core").Array}],"string.js":["../modules/es6.string.from-code-point","../modules/es6.string.raw","../modules/es6.string.trim","../modules/es6.string.iterator","../modules/es6.string.code-point-at","../modules/es6.string.ends-with","../modules/es6.string.includes","../modules/es6.string.repeat","../modules/es6.string.starts-with","../modules/es6.regexp.match","../modules/es6.regexp.replace","../modules/es6.regexp.search","../modules/es6.regexp.split","../modules/$.core",function(e,t,r){e("../modules/es6.string.from-code-point"),e("../modules/es6.string.raw"),e("../modules/es6.string.trim"),e("../modules/es6.string.iterator"),e("../modules/es6.string.code-point-at"),e("../modules/es6.string.ends-with"),e("../modules/es6.string.includes"),e("../modules/es6.string.repeat"),e("../modules/es6.string.starts-with"),e("../modules/es6.regexp.match"),e("../modules/es6.regexp.replace"),e("../modules/es6.regexp.search"),e("../modules/es6.regexp.split"),r.exports=e("../modules/$.core").String}],"function.js":["../modules/es6.function.name","../modules/es6.function.has-instance","../modules/$.core",function(e,t,r){e("../modules/es6.function.name"),e("../modules/es6.function.has-instance"),r.exports=e("../modules/$.core").Function}],"symbol.js":["../modules/es6.symbol","../modules/$.core",function(e,t,r){e("../modules/es6.symbol"),r.exports=e("../modules/$.core").Symbol}],"map.js":["../modules/es6.object.to-string","../modules/es6.string.iterator","../modules/web.dom.iterable","../modules/es6.map","../modules/$.core",function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.map"),r.exports=e("../modules/$.core").Map}],"set.js":["../modules/es6.object.to-string","../modules/es6.string.iterator","../modules/web.dom.iterable","../modules/es6.set","../modules/$.core",function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.set"),r.exports=e("../modules/$.core").Set}]},modules:{"es6.symbol.js":["./$","./$.global","./$.has","./$.support-desc","./$.def","./$.redef","./$.fails","./$.shared","./$.tag","./$.uid","./$.wks","./$.keyof","./$.get-names","./$.enum-keys","./$.is-array","./$.is-object","./$.an-object","./$.to-iobject","./$.property-desc","./$.library",function(e){"use strict";var t=e("./$"),r=e("./$.global"),n=e("./$.has"),o=e("./$.support-desc"),s=e("./$.def"),i=e("./$.redef"),c=e("./$.fails"),u=e("./$.shared"),a=e("./$.tag"),f=e("./$.uid"),$=e("./$.wks"),l=e("./$.keyof"),d=e("./$.get-names"),p=e("./$.enum-keys"),g=e("./$.is-array"),m=e("./$.is-object"),j=e("./$.an-object"),h=e("./$.to-iobject"),y=e("./$.property-desc"),b=t.getDesc,v=t.setDesc,x=t.create,w=d.get,k=r.Symbol,S=r.JSON,_=S&&S.stringify,P=!1,O=$("_hidden"),A=t.isEnum,E=u("symbol-registry"),F=u("symbols"),M="function"==typeof k,D=Object.prototype,N=o&&c(function(){return 7!=x(v({},"a",{get:function(){return v(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=b(D,t);n&&delete D[t],v(e,t,r),n&&e!==D&&v(D,t,n)}:v,T=function(e){var t=F[e]=x(k.prototype);return t._k=e,o&&P&&N(D,e,{configurable:!0,set:function(t){n(this,O)&&n(this[O],e)&&(this[O][e]=!1),N(this,e,y(1,t))}}),t},z=function(e){return"symbol"==typeof e},C=function q(e,t,r){return r&&n(F,t)?(r.enumerable?(n(e,O)&&e[O][t]&&(e[O][t]=!1),r=x(r,{enumerable:y(0,!1)})):(n(e,O)||v(e,O,y(1,{})),e[O][t]=!0),N(e,t,r)):v(e,t,r)},W=function U(e,t){j(e);for(var r=p(t=h(t)),n=0,o=r.length,s;o>n;)C(e,s=r[n++],t[s]);return e},I=function Q(e,t){return void 0===t?x(e):W(x(e),t)},R=function V(e){var t=A.call(this,e);return t||!n(this,e)||!n(F,e)||n(this,O)&&this[O][e]?t:!0},G=function X(e,t){var r=b(e=h(e),t);return!r||!n(F,t)||n(e,O)&&e[O][t]||(r.enumerable=!0),r},J=function Y(e){for(var t=w(h(e)),r=[],o=0,s;t.length>o;)n(F,s=t[o++])||s==O||r.push(s);return r},L=function Z(e){for(var t=w(h(e)),r=[],o=0,s;t.length>o;)n(F,s=t[o++])&&r.push(F[s]);return r},B=function ee(e){for(var t=[e],r=1,n,o;arguments.length>r;)t.push(arguments[r++]);return n=t[1],"function"==typeof n&&(o=n),(o||!g(n))&&(n=function(e,t){return o&&(t=o.call(this,e,t)),z(t)?void 0:t}),t[1]=n,_.apply(S,t)},K=c(function(){var e=k();return"[null]"!=_([e])||"{}"!=_({a:e})||"{}"!=_(Object(e))});M||(k=function te(){if(z(this))throw TypeError("Symbol is not a constructor");return T(f(arguments[0]))},i(k.prototype,"toString",function re(){return this._k}),z=function(e){return e instanceof k},t.create=I,t.isEnum=R,t.getDesc=G,t.setDesc=C,t.setDescs=W,t.getNames=d.get=J,t.getSymbols=L,o&&!e("./$.library")&&i(D,"propertyIsEnumerable",R,!0));var H={"for":function(e){return n(E,e+="")?E[e]:E[e]=k(e)},keyFor:function ne(e){return l(E,e)},useSetter:function(){P=!0},useSimple:function(){P=!1}};t.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(e){var t=$(e);H[e]=M?t:T(t)}),P=!0,s(s.G+s.W,{Symbol:k}),s(s.S,"Symbol",H),s(s.S+s.F*!M,"Object",{create:I,defineProperty:C,defineProperties:W,getOwnPropertyDescriptor:G,getOwnPropertyNames:J,getOwnPropertySymbols:L}),S&&s(s.S+s.F*(!M||K),"JSON",{stringify:B}),a(k,"Symbol"),a(Math,"Math",!0),a(r.JSON,"JSON",!0)}],"$.js":function(e,t,r){var n=Object;r.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols,each:[].forEach}},"$.global.js":function(e,t,r){var n="undefined",o=r.exports=typeof window!=n&&window.Math==Math?window:typeof self!=n&&self.Math==Math?self:Function("return this")();"number"==typeof f&&(f=o)},"$.has.js":function(e,t,r){var n={}.hasOwnProperty;r.exports=function(e,t){return n.call(e,t)}},"$.support-desc.js":["./$.fails",function(e,t,r){r.exports=!e("./$.fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})}],"$.fails.js":function(e,t,r){r.exports=function(e){try{return!!e()}catch(t){return!0}}},"$.def.js":["./$.global","./$.core","./$.hide","./$.redef",function(e,t,r){var n=e("./$.global"),o=e("./$.core"),s=e("./$.hide"),i=e("./$.redef"),c="prototype",u=function(e,t){return function(){return e.apply(t,arguments)}},a=function(e,t,r){var f,$,l,d,p=e&a.G,g=e&a.P,m=p?n:e&a.S?n[t]||(n[t]={}):(n[t]||{})[c],j=p?o:o[t]||(o[t]={});p&&(r=t);for(f in r)$=!(e&a.F)&&m&&f in m,l=($?m:r)[f],d=e&a.B&&$?u(l,n):g&&"function"==typeof l?u(Function.call,l):l,m&&!$&&i(m,f,l),j[f]!=l&&s(j,f,d),g&&((j[c]||(j[c]={}))[f]=l)};n.core=o,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,r.exports=a}],"$.core.js":function(e,t,r){var n=r.exports={version:"1.2.1"};"number"==typeof $&&($=n)},"$.hide.js":["./$","./$.property-desc","./$.support-desc",function(e,t,r){var n=e("./$"),o=e("./$.property-desc");r.exports=e("./$.support-desc")?function(e,t,r){return n.setDesc(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}}],"$.property-desc.js":function(e,t,r){r.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"$.redef.js":["./$.global","./$.hide","./$.uid","./$.core",function(e,t,r){var n=e("./$.global"),o=e("./$.hide"),s=e("./$.uid")("src"),i="toString",c=Function[i],u=(""+c).split(i);e("./$.core").inspectSource=function(e){return c.call(e)},(r.exports=function(e,t,r,i){"function"==typeof r&&(o(r,s,e[t]?""+e[t]:u.join(String(t))),"name"in r||(r.name=t)),e===n?e[t]=r:(i||delete e[t],o(e,t,r))})(Function.prototype,i,function a(){return"function"==typeof this&&this[s]||c.call(this)})}],"$.uid.js":function(e,t,r){var n=0,o=Math.random();r.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},"$.shared.js":["./$.global",function(e,t,r){var n=e("./$.global"),o="__core-js_shared__",s=n[o]||(n[o]={});r.exports=function(e){return s[e]||(s[e]={})}}],"$.tag.js":["./$.has","./$.hide","./$.wks",function(e,t,r){var n=e("./$.has"),o=e("./$.hide"),s=e("./$.wks")("toStringTag");r.exports=function(e,t,r){e&&!n(e=r?e:e.prototype,s)&&o(e,s,t)}}],"$.wks.js":["./$.shared","./$.global","./$.uid",function(e,t,r){var n=e("./$.shared")("wks"),o=e("./$.global").Symbol;r.exports=function(t){return n[t]||(n[t]=o&&o[t]||(o||e("./$.uid"))("Symbol."+t))}}],"$.keyof.js":["./$","./$.to-iobject",function(e,t,r){var n=e("./$"),o=e("./$.to-iobject");r.exports=function(e,t){for(var r=o(e),s=n.getKeys(r),i=s.length,c=0,u;i>c;)if(r[u=s[c++]]===t)return u}}],"$.to-iobject.js":["./$.iobject","./$.defined",function(e,t,r){var n=e("./$.iobject"),o=e("./$.defined");r.exports=function(e){return n(o(e))}}],"$.iobject.js":["./$.cof",function(e,t,r){var n=e("./$.cof");r.exports=0 in Object("z")?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}}],"$.cof.js":function(e,t,r){var n={}.toString;r.exports=function(e){return n.call(e).slice(8,-1)}},"$.defined.js":function(e,t,r){r.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},"$.get-names.js":["./$.to-iobject","./$",function(e,t,r){var n={}.toString,o=e("./$.to-iobject"),s=e("./$").getNames,i="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(e){try{return s(e)}catch(t){return i.slice()}};r.exports.get=function u(e){return i&&"[object Window]"==n.call(e)?c(e):s(o(e))}}],"$.enum-keys.js":["./$",function(e,t,r){var n=e("./$");r.exports=function(e){var t=n.getKeys(e),r=n.getSymbols;if(r)for(var o=r(e),s=n.isEnum,i=0,c;o.length>i;)s.call(e,c=o[i++])&&t.push(c);return t}}],"$.is-array.js":["./$.cof",function(e,t,r){var n=e("./$.cof");r.exports=Array.isArray||function(e){return"Array"==n(e)}}],"$.is-object.js":function(e,t,r){r.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"$.an-object.js":["./$.is-object",function(e,t,r){var n=e("./$.is-object");r.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}}],"$.library.js":function(e,t,r){r.exports=!1},"es6.object.assign.js":["./$.def","./$.assign",function(e){var t=e("./$.def");t(t.S+t.F,"Object",{assign:e("./$.assign")})}],"$.assign.js":["./$.to-object","./$.iobject","./$.enum-keys","./$.has","./$.fails",function(e,t,r){var n=e("./$.to-object"),o=e("./$.iobject"),s=e("./$.enum-keys"),i=e("./$.has");r.exports=e("./$.fails")(function(){var e=Object.assign,t={},r={},n=c(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach(function(e){r[e]=e}),7!=e({},t)[n]||Object.keys(e({},r)).join("")!=o})?function u(e,t){for(var r=n(e),c=arguments.length,u=1;c>u;)for(var a=o(arguments[u++]),f=s(a),$=f.length,l=0,d;$>l;)i(a,d=f[l++])&&(r[d]=a[d]);return r}:Object.assign}],"$.to-object.js":["./$.defined",function(e,t,r){var n=e("./$.defined");r.exports=function(e){return Object(n(e))}}],"es6.object.is.js":["./$.def","./$.same",function(e){var t=e("./$.def");t(t.S,"Object",{is:e("./$.same")})}],"$.same.js":function(e,t,r){r.exports=Object.is||function n(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},"es6.object.set-prototype-of.js":["./$.def","./$.set-proto",function(e){var t=e("./$.def");t(t.S,"Object",{setPrototypeOf:e("./$.set-proto").set})}],"$.set-proto.js":["./$","./$.is-object","./$.an-object","./$.ctx",function(e,t,r){var n=e("./$").getDesc,o=e("./$.is-object"),s=e("./$.an-object"),i=function(e,t){if(s(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};r.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,o){try{o=e("./$.ctx")(Function.call,n(Object.prototype,"__proto__").set,2),o(t,[]),r=!(t instanceof Array)}catch(s){r=!0}return function c(e,t){return i(e,t),r?e.__proto__=t:o(e,t),e}}({},!1):void 0),check:i}}],"$.ctx.js":["./$.a-function",function(e,t,r){var n=e("./$.a-function");r.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}}],"$.a-function.js":function(e,t,r){r.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"es6.object.to-string.js":["./$.classof","./$.wks","./$.redef",function(e){"use strict";var t=e("./$.classof"),r={};r[e("./$.wks")("toStringTag")]="z",r+""!="[object z]"&&e("./$.redef")(Object.prototype,"toString",function n(){return"[object "+t(this)+"]"},!0)}],"$.classof.js":["./$.cof","./$.wks",function(e,t,r){var n=e("./$.cof"),o=e("./$.wks")("toStringTag"),s="Arguments"==n(function(){return arguments}());r.exports=function(e){var t,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=(t=Object(e))[o])?r:s?n(t):"Object"==(i=n(t))&&"function"==typeof t.callee?"Arguments":i}}],"es6.object.freeze.js":["./$.is-object","./$.object-sap",function(e){var t=e("./$.is-object");e("./$.object-sap")("freeze",function(e){return function r(n){return e&&t(n)?e(n):n}})}],"$.object-sap.js":["./$.def","./$.core","./$.fails",function(e,t,r){r.exports=function(t,r){var n=e("./$.def"),o=(e("./$.core").Object||{})[t]||Object[t],s={};s[t]=r(o),n(n.S+n.F*e("./$.fails")(function(){o(1)}),"Object",s)}}],"es6.object.seal.js":["./$.is-object","./$.object-sap",function(e){var t=e("./$.is-object");e("./$.object-sap")("seal",function(e){return function r(n){return e&&t(n)?e(n):n}})}],"es6.object.prevent-extensions.js":["./$.is-object","./$.object-sap",function(e){var t=e("./$.is-object");e("./$.object-sap")("preventExtensions",function(e){return function r(n){return e&&t(n)?e(n):n}})}],"es6.object.is-frozen.js":["./$.is-object","./$.object-sap",function(e){var t=e("./$.is-object");e("./$.object-sap")("isFrozen",function(e){return function r(n){return t(n)?e?e(n):!1:!0}})}],"es6.object.is-sealed.js":["./$.is-object","./$.object-sap",function(e){var t=e("./$.is-object");e("./$.object-sap")("isSealed",function(e){return function r(n){return t(n)?e?e(n):!1:!0}})}],"es6.object.is-extensible.js":["./$.is-object","./$.object-sap",function(e){var t=e("./$.is-object");e("./$.object-sap")("isExtensible",function(e){return function r(n){return t(n)?e?e(n):!0:!1}})}],"es6.object.get-own-property-descriptor.js":["./$.to-iobject","./$.object-sap",function(e){var t=e("./$.to-iobject");e("./$.object-sap")("getOwnPropertyDescriptor",function(e){return function r(n,o){return e(t(n),o)}})}],"es6.object.get-prototype-of.js":["./$.to-object","./$.object-sap",function(e){var t=e("./$.to-object");e("./$.object-sap")("getPrototypeOf",function(e){return function r(n){return e(t(n))}})}],"es6.object.keys.js":["./$.to-object","./$.object-sap",function(e){var t=e("./$.to-object");e("./$.object-sap")("keys",function(e){return function r(n){return e(t(n))}})}],"es6.object.get-own-property-names.js":["./$.object-sap","./$.get-names",function(e){e("./$.object-sap")("getOwnPropertyNames",function(){return e("./$.get-names").get})}],"es6.string.iterator.js":["./$.string-at","./$.iter-define",function(e){"use strict";var t=e("./$.string-at")(!0);e("./$.iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e=this._t,r=this._i,n;return r>=e.length?{value:void 0,done:!0}:(n=t(e,r),this._i+=n.length,{value:n,done:!1})})}],"$.string-at.js":["./$.to-integer","./$.defined",function(e,t,r){var n=e("./$.to-integer"),o=e("./$.defined");r.exports=function(e){return function(t,r){var s=String(o(t)),i=n(r),c=s.length,u,a;return 0>i||i>=c?e?"":void 0:(u=s.charCodeAt(i),55296>u||u>56319||i+1===c||(a=s.charCodeAt(i+1))<56320||a>57343?e?s.charAt(i):u:e?s.slice(i,i+2):(u-55296<<10)+(a-56320)+65536)}}}],"$.to-integer.js":function(e,t,r){var n=Math.ceil,o=Math.floor;r.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},"$.iter-define.js":["./$.library","./$.def","./$.redef","./$.hide","./$.has","./$.wks","./$.iterators","./$.iter-create","./$","./$.tag",function(e,t,r){"use strict";var n=e("./$.library"),o=e("./$.def"),s=e("./$.redef"),i=e("./$.hide"),c=e("./$.has"),u=e("./$.wks")("iterator"),a=e("./$.iterators"),f=!([].keys&&"next"in[].keys()),$="@@iterator",l="keys",d="values",p=function(){return this};r.exports=function(t,r,g,m,j,h,y){e("./$.iter-create")(g,r,m);var b=function(e){switch(e){case l:return function t(){return new g(this,e)};case d:return function r(){return new g(this,e)}}return function n(){return new g(this,e)}},v=r+" Iterator",x=t.prototype,w=x[u]||x[$]||j&&x[j],k=w||b(j),S,_;if(w){var P=e("./$").getProto(k.call(new t));e("./$.tag")(P,v,!0),!n&&c(x,$)&&i(P,u,p)}if((!n||y)&&i(x,u,k),a[r]=k,a[v]=p,j)if(S={keys:h?k:b(l),values:j==d?k:b(d),entries:j!=d?k:b("entries")},y)for(_ in S)_ in x||s(x,_,S[_]);else o(o.P+o.F*f,r,S)}}],"$.iterators.js":function(e,t,r){r.exports={}},"$.iter-create.js":["./$","./$.hide","./$.wks","./$.property-desc","./$.tag",function(e,t,r){"use strict";var n=e("./$"),o={};e("./$.hide")(o,e("./$.wks")("iterator"),function(){return this}),r.exports=function(t,r,s){t.prototype=n.create(o,{next:e("./$.property-desc")(1,s)}),e("./$.tag")(t,r+" Iterator")}}],"es6.array.from.js":["./$.ctx","./$.def","./$.to-object","./$.iter-call","./$.is-array-iter","./$.to-length","./core.get-iterator-method","./$.iter-detect",function(e){"use strict";var t=e("./$.ctx"),r=e("./$.def"),n=e("./$.to-object"),o=e("./$.iter-call"),s=e("./$.is-array-iter"),i=e("./$.to-length"),c=e("./core.get-iterator-method");r(r.S+r.F*!e("./$.iter-detect")(function(e){Array.from(e)}),"Array",{from:function u(e){var r=n(e),u="function"==typeof this?this:Array,a=arguments[1],f=void 0!==a,$=0,l=c(r),d,p,g,m;if(f&&(a=t(a,arguments[2],2)),void 0==l||u==Array&&s(l))for(d=i(r.length),p=new u(d);d>$;$++)p[$]=f?a(r[$],$):r[$];else for(m=l.call(r),p=new u;!(g=m.next()).done;$++)p[$]=f?o(m,a,[g.value,$],!0):g.value;return p.length=$,p}})}],"$.iter-call.js":["./$.an-object",function(e,t,r){var n=e("./$.an-object");r.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(s){var i=e["return"];throw void 0!==i&&n(i.call(e)),s}}}],"$.is-array-iter.js":["./$.iterators","./$.wks",function(e,t,r){var n=e("./$.iterators"),o=e("./$.wks")("iterator");r.exports=function(e){return(n.Array||Array.prototype[o])===e}}],"$.to-length.js":["./$.to-integer",function(e,t,r){var n=e("./$.to-integer"),o=Math.min;r.exports=function(e){return e>0?o(n(e),9007199254740991):0}}],"core.get-iterator-method.js":["./$.classof","./$.wks","./$.iterators","./$.core",function(e,t,r){var n=e("./$.classof"),o=e("./$.wks")("iterator"),s=e("./$.iterators");r.exports=e("./$.core").getIteratorMethod=function(e){return void 0!=e?e[o]||e["@@iterator"]||s[n(e)]:void 0}}],"$.iter-detect.js":["./$.wks",function(e,t,r){var n=e("./$.wks")("iterator"),o=!1;try{var s=[7][n]();s["return"]=function(){o=!0},Array.from(s,function(){throw 2})}catch(i){}r.exports=function(e){if(!o)return!1;var t=!1;try{var r=[7],s=r[n]();s.next=function(){t=!0},r[n]=function(){return s},e(r)}catch(i){}return t}}],"es6.array.of.js":["./$.def","./$.fails",function(e){"use strict";var t=e("./$.def");t(t.S+t.F*e("./$.fails")(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function r(){for(var e=0,t=arguments.length,r=new("function"==typeof this?this:Array)(t);t>e;)r[e]=arguments[e++];return r.length=t,r}})}],"es6.array.species.js":["./$.species",function(e){e("./$.species")(Array)}],"$.species.js":["./$","./$.wks","./$.support-desc",function(e,t,r){"use strict";var n=e("./$"),o=e("./$.wks")("species");r.exports=function(t){!e("./$.support-desc")||o in t||n.setDesc(t,o,{configurable:!0,get:function(){return this}})}}],"es6.array.iterator.js":["./$.unscope","./$.iter-step","./$.iterators","./$.to-iobject","./$.iter-define",function(e){"use strict";var t=e("./$.unscope"),r=e("./$.iter-step"),n=e("./$.iterators"),o=e("./$.to-iobject");e("./$.iter-define")(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):"keys"==t?r(0,n):"values"==t?r(0,e[n]):r(0,[n,e[n]])},"values"),n.Arguments=n.Array,t("keys"),t("values"),t("entries")}],"$.unscope.js":["./$.wks","./$.hide",function(e,t,r){var n=e("./$.wks")("unscopables");void 0==[][n]&&e("./$.hide")(Array.prototype,n,{}),r.exports=function(e){[][n][e]=!0}}],"$.iter-step.js":function(e,t,r){r.exports=function(e,t){return{value:t,done:!!e}}},"es6.array.copy-within.js":["./$.def","./$.array-copy-within","./$.unscope",function(e){"use strict";var t=e("./$.def");t(t.P,"Array",{copyWithin:e("./$.array-copy-within")}),e("./$.unscope")("copyWithin")}],"$.array-copy-within.js":["./$.to-object","./$.to-index","./$.to-length",function(e,t,r){"use strict";var n=e("./$.to-object"),o=e("./$.to-index"),s=e("./$.to-length");r.exports=[].copyWithin||function i(e,t){var r=n(this),i=s(r.length),c=o(e,i),u=o(t,i),a=arguments[2],f=Math.min((void 0===a?i:o(a,i))-u,i-c),$=1;for(c>u&&u+f>c&&($=-1,u+=f-1,c+=f-1);f-->0;)u in r?r[c]=r[u]:delete r[c],c+=$,u+=$;return r}}],"$.to-index.js":["./$.to-integer",function(e,t,r){var n=e("./$.to-integer"),o=Math.max,s=Math.min;r.exports=function(e,t){return e=n(e),0>e?o(e+t,0):s(e,t)}}],"es6.array.fill.js":["./$.def","./$.array-fill","./$.unscope",function(e){var t=e("./$.def");t(t.P,"Array",{fill:e("./$.array-fill")}),e("./$.unscope")("fill")}],"$.array-fill.js":["./$.to-object","./$.to-index","./$.to-length",function(e,t,r){"use strict";var n=e("./$.to-object"),o=e("./$.to-index"),s=e("./$.to-length");r.exports=[].fill||function i(e){for(var t=n(this,!0),r=s(t.length),i=o(arguments[1],r),c=arguments[2],u=void 0===c?r:o(c,r);u>i;)t[i++]=e;return t}}],"es6.array.find.js":["./$.def","./$.array-methods","./$.unscope",function(e){"use strict";var t="find",r=e("./$.def"),n=!0,o=e("./$.array-methods")(5);t in[]&&Array(1)[t](function(){n=!1}),r(r.P+r.F*n,"Array",{find:function s(e){return o(this,e,arguments[1])}}),e("./$.unscope")(t)}],"$.array-methods.js":["./$.ctx","./$.is-object","./$.iobject","./$.to-object","./$.to-length","./$.is-array","./$.wks",function(e,t,r){var n=e("./$.ctx"),o=e("./$.is-object"),s=e("./$.iobject"),i=e("./$.to-object"),c=e("./$.to-length"),u=e("./$.is-array"),a=e("./$.wks")("species"),f=function(e,t){var r;return u(e)&&o(r=e.constructor)&&(r=r[a],null===r&&(r=void 0)),new(void 0===r?Array:r)(t)};r.exports=function(e){var t=1==e,r=2==e,o=3==e,u=4==e,a=6==e,$=5==e||a;return function(l,d,p){for(var g=i(l),m=s(g),j=n(d,p,3),h=c(m.length),y=0,b=t?f(l,h):r?f(l,0):void 0,v,x;h>y;y++)if(($||y in m)&&(v=m[y],x=j(v,y,g),e))if(t)b[y]=x;else if(x)switch(e){case 3:return!0;case 5:return v;case 6:return y;case 2:b.push(v)}else if(u)return!1;return a?-1:o||u?u:b}}}],"es6.array.find-index.js":["./$.def","./$.array-methods","./$.unscope",function(e){"use strict";var t="findIndex",r=e("./$.def"),n=!0,o=e("./$.array-methods")(6);t in[]&&Array(1)[t](function(){n=!1}),r(r.P+r.F*n,"Array",{findIndex:function s(e){return o(this,e,arguments[1])}}),e("./$.unscope")(t)}],"es6.string.from-code-point.js":["./$.def","./$.to-index",function(e){var t=e("./$.def"),r=e("./$.to-index"),n=String.fromCharCode,o=String.fromCodePoint;t(t.S+t.F*(!!o&&1!=o.length),"String",{fromCodePoint:function s(e){for(var t=[],o=arguments.length,s=0,i;o>s;){if(i=+arguments[s++],r(i,1114111)!==i)throw RangeError(i+" is not a valid code point");t.push(65536>i?n(i):n(((i-=65536)>>10)+55296,i%1024+56320))}return t.join("")}})}],"es6.string.raw.js":["./$.def","./$.to-iobject","./$.to-length",function(e){var t=e("./$.def"),r=e("./$.to-iobject"),n=e("./$.to-length");t(t.S,"String",{raw:function o(e){for(var t=r(e.raw),o=n(t.length),s=arguments.length,i=[],c=0;o>c;)i.push(String(t[c++])),s>c&&i.push(String(arguments[c]));return i.join("")}})}],"es6.string.trim.js":["./$.string-trim",function(e){"use strict";e("./$.string-trim")("trim",function(e){return function t(){return e(this,3)}})}],"$.string-trim.js":["./$.def","./$.defined","./$.fails",function(e,t,r){var n=function(e,t){return e=String(s(e)),1&t&&(e=e.replace(a,"")),2&t&&(e=e.replace(f,"")),e},o=e("./$.def"),s=e("./$.defined"),i=" \n \f\r   ᠎              \u2028\u2029\ufeff",c="["+i+"]",u="​…",a=RegExp("^"+c+c+"*"),f=RegExp(c+c+"*$");r.exports=function(t,r){var s={};s[t]=r(n),o(o.P+o.F*e("./$.fails")(function(){return!!i[t]()||u[t]()!=u}),"String",s)}}],"es6.string.code-point-at.js":["./$.def","./$.string-at",function(e){"use strict";var t=e("./$.def"),r=e("./$.string-at")(!1);t(t.P,"String",{codePointAt:function n(e){return r(this,e)}})}],"es6.string.ends-with.js":["./$.def","./$.to-length","./$.string-context","./$.fails-is-regexp",function(e){"use strict";var t=e("./$.def"),r=e("./$.to-length"),n=e("./$.string-context"),o="endsWith",s=""[o];t(t.P+t.F*e("./$.fails-is-regexp")(o),"String",{endsWith:function i(e){var t=n(this,e,o),i=arguments[1],c=r(t.length),u=void 0===i?c:Math.min(r(i),c),a=String(e);return s?s.call(t,a,u):t.slice(u-a.length,u)===a}})}],"$.string-context.js":["./$.is-regexp","./$.defined",function(e,t,r){var n=e("./$.is-regexp"),o=e("./$.defined");r.exports=function(e,t,r){if(n(t))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(e))}}],"$.is-regexp.js":["./$.is-object","./$.cof","./$.wks",function(e,t,r){var n=e("./$.is-object"),o=e("./$.cof"),s=e("./$.wks")("match");r.exports=function(e){var t;return n(e)&&(void 0!==(t=e[s])?!!t:"RegExp"==o(e))}}],"$.fails-is-regexp.js":["./$.wks",function(e,t,r){r.exports=function(t){var r=/./;try{"/./"[t](r)}catch(n){try{return r[e("./$.wks")("match")]=!1,!"/./"[t](r)}catch(n){}}return!0}}],"es6.string.includes.js":["./$.def","./$.string-context","./$.fails-is-regexp",function(e){"use strict";var t=e("./$.def"),r=e("./$.string-context"),n="includes";t(t.P+t.F*e("./$.fails-is-regexp")(n),"String",{includes:function o(e){return!!~r(this,e,n).indexOf(e,arguments[1])}})}],"es6.string.repeat.js":["./$.def","./$.string-repeat",function(e){var t=e("./$.def");t(t.P,"String",{repeat:e("./$.string-repeat")})}],"$.string-repeat.js":["./$.to-integer","./$.defined",function(e,t,r){"use strict";var n=e("./$.to-integer"),o=e("./$.defined");r.exports=function s(e){var t=String(o(this)),r="",s=n(e);if(0>s||s==1/0)throw RangeError("Count can't be negative");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(r+=t);return r}}],"es6.string.starts-with.js":["./$.def","./$.to-length","./$.string-context","./$.fails-is-regexp",function(e){"use strict";var t=e("./$.def"),r=e("./$.to-length"),n=e("./$.string-context"),o="startsWith",s=""[o];t(t.P+t.F*e("./$.fails-is-regexp")(o),"String",{startsWith:function i(e){var t=n(this,e,o),i=r(Math.min(arguments[1],t.length)),c=String(e);return s?s.call(t,c,i):t.slice(i,i+c.length)===c}})}],"es6.regexp.match.js":["./$.fix-re-wks",function(e){e("./$.fix-re-wks")("match",1,function(e,t){return function r(n){"use strict";var o=e(this),s=void 0==n?void 0:n[t];return void 0!==s?s.call(n,o):new RegExp(n)[t](String(o))}})}],"$.fix-re-wks.js":["./$.defined","./$.wks","./$.fails","./$.redef","./$.hide",function(e,t,r){"use strict";r.exports=function(t,r,n){var o=e("./$.defined"),s=e("./$.wks")(t),i=""[t];e("./$.fails")(function(){var e={};return e[s]=function(){return 7},7!=""[t](e)})&&(e("./$.redef")(String.prototype,t,n(o,s,i)),e("./$.hide")(RegExp.prototype,s,2==r?function(e,t){return i.call(e,this,t)}:function(e){return i.call(e,this)}))}}],"es6.regexp.replace.js":["./$.fix-re-wks",function(e){e("./$.fix-re-wks")("replace",2,function(e,t,r){return function n(o,s){"use strict";var i=e(this),c=void 0==o?void 0:o[t];return void 0!==c?c.call(o,i,s):r.call(String(i),o,s)}})}],"es6.regexp.search.js":["./$.fix-re-wks",function(e){e("./$.fix-re-wks")("search",1,function(e,t){return function r(n){"use strict";var o=e(this),s=void 0==n?void 0:n[t];return void 0!==s?s.call(n,o):new RegExp(n)[t](String(o))}})}],"es6.regexp.split.js":["./$.fix-re-wks",function(e){e("./$.fix-re-wks")("split",2,function(e,t,r){return function n(o,s){"use strict";var i=e(this),c=void 0==o?void 0:o[t];return void 0!==c?c.call(o,i,s):r.call(String(i),o,s)}})}],"es6.function.name.js":["./$","./$.property-desc","./$.has","./$.support-desc",function(e){var t=e("./$").setDesc,r=e("./$.property-desc"),n=e("./$.has"),o=Function.prototype,s=/^\s*function ([^ (]*)/,i="name";i in o||e("./$.support-desc")&&t(o,i,{configurable:!0,get:function(){var e=(""+this).match(s),o=e?e[1]:"";return n(this,i)||t(this,i,r(5,o)),o}})}],"es6.function.has-instance.js":["./$","./$.is-object","./$.wks",function(e){"use strict";var t=e("./$"),r=e("./$.is-object"),n=e("./$.wks")("hasInstance"),o=Function.prototype;n in o||t.setDesc(o,n,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=t.getProto(e);)if(this.prototype===e)return!0;return!1}})}],"web.dom.iterable.js":["./es6.array.iterator","./$.global","./$.hide","./$.iterators","./$.wks",function(e){e("./es6.array.iterator");var t=e("./$.global"),r=e("./$.hide"),n=e("./$.iterators"),o=e("./$.wks")("iterator"),s=t.NodeList,i=t.HTMLCollection,c=s&&s.prototype,u=i&&i.prototype,a=n.NodeList=n.HTMLCollection=n.Array;!s||o in c||r(c,o,a),!i||o in u||r(u,o,a)}],"es6.map.js":["./$.collection-strong","./$.collection",function(e){"use strict";var t=e("./$.collection-strong");e("./$.collection")("Map",function(e){return function t(){return e(this,arguments[0])}},{get:function r(e){var r=t.getEntry(this,e); +return r&&r.v},set:function n(e,r){return t.def(this,0===e?0:e,r)}},t,!0)}],"$.collection-strong.js":["./$","./$.hide","./$.ctx","./$.species","./$.strict-new","./$.defined","./$.for-of","./$.iter-step","./$.uid","./$.has","./$.is-object","./$.support-desc","./$.mix","./$.iter-define","./$.core",function(e,t,r){"use strict";var n=e("./$"),o=e("./$.hide"),s=e("./$.ctx"),i=e("./$.species"),c=e("./$.strict-new"),u=e("./$.defined"),a=e("./$.for-of"),f=e("./$.iter-step"),$=e("./$.uid")("id"),l=e("./$.has"),d=e("./$.is-object"),p=Object.isExtensible||d,g=e("./$.support-desc"),m=g?"_s":"size",j=0,h=function(e,t){if(!d(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!l(e,$)){if(!p(e))return"F";if(!t)return"E";o(e,$,++j)}return"O"+e[$]},y=function(e,t){var r=h(t),n;if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};r.exports={getConstructor:function(t,r,o,i){var f=t(function(e,t){c(e,f,r),e._i=n.create(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=t&&a(t,o,e[i],e)});return e("./$.mix")(f.prototype,{clear:function $(){for(var e=this,t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[m]=0},"delete":function(e){var t=this,r=y(t,e);if(r){var n=r.n,o=r.p;delete t._i[r.i],r.r=!0,o&&(o.n=n),n&&(n.p=o),t._f==r&&(t._f=n),t._l==r&&(t._l=o),t[m]--}return!!r},forEach:function l(e){for(var t=s(e,arguments[1],3),r;r=r?r.n:this._f;)for(t(r.v,r.k,this);r&&r.r;)r=r.p},has:function d(e){return!!y(this,e)}}),g&&n.setDesc(f.prototype,"size",{get:function(){return u(this[m])}}),f},def:function(e,t,r){var n=y(e,t),o,s;return n?n.v=r:(e._l=n={i:s=h(t,!0),k:t,v:r,p:o=e._l,n:void 0,r:!1},e._f||(e._f=n),o&&(o.n=n),e[m]++,"F"!==s&&(e._i[s]=n)),e},getEntry:y,setStrong:function(t,r,n){e("./$.iter-define")(t,r,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==t?f(0,r.k):"values"==t?f(0,r.v):f(0,[r.k,r.v]):(e._t=void 0,f(1))},n?"entries":"values",!n,!0),i(t),i(e("./$.core")[r])}}}],"$.strict-new.js":function(e,t,r){r.exports=function(e,t,r){if(!(e instanceof t))throw TypeError(r+": use the 'new' operator!");return e}},"$.for-of.js":["./$.ctx","./$.iter-call","./$.is-array-iter","./$.an-object","./$.to-length","./core.get-iterator-method",function(e,t,r){var n=e("./$.ctx"),o=e("./$.iter-call"),s=e("./$.is-array-iter"),i=e("./$.an-object"),c=e("./$.to-length"),u=e("./core.get-iterator-method");r.exports=function(e,t,r,a){var f=u(e),$=n(r,a,t?2:1),l=0,d,p,g;if("function"!=typeof f)throw TypeError(e+" is not iterable!");if(s(f))for(d=c(e.length);d>l;l++)t?$(i(p=e[l])[0],p[1]):$(e[l]);else for(g=f.call(e);!(p=g.next()).done;)o(g,$,p.value,t)}}],"$.mix.js":["./$.redef",function(e,t,r){var n=e("./$.redef");r.exports=function(e,t){for(var r in t)n(e,r,t[r]);return e}}],"$.collection.js":["./$.global","./$.def","./$.for-of","./$.strict-new","./$.redef","./$.fails","./$.mix","./$.iter-detect","./$.tag",function(e,t,r){"use strict";var n=e("./$.global"),o=e("./$.def"),s=e("./$.for-of"),i=e("./$.strict-new");r.exports=function(t,r,c,u,a,f){var $=n[t],l=$,d=a?"set":"add",p=l&&l.prototype,g={},m=function(t){var r=p[t];e("./$.redef")(p,t,"delete"==t?function(e){return r.call(this,0===e?0:e)}:"has"==t?function n(e){return r.call(this,0===e?0:e)}:"get"==t?function o(e){return r.call(this,0===e?0:e)}:"add"==t?function s(e){return r.call(this,0===e?0:e),this}:function i(e,t){return r.call(this,0===e?0:e,t),this})};if("function"==typeof l&&(f||p.forEach&&!e("./$.fails")(function(){(new l).entries().next()}))){var j=new l,h=j[d](f?{}:-0,1),y;e("./$.iter-detect")(function(e){new l(e)})||(l=r(function(e,r){i(e,l,t);var n=new $;return void 0!=r&&s(r,a,n[d],n),n}),l.prototype=p,p.constructor=l),f||j.forEach(function(e,t){y=1/t===-(1/0)}),y&&(m("delete"),m("has"),a&&m("get")),(y||h!==j)&&m(d),f&&p.clear&&delete p.clear}else l=u.getConstructor(r,t,a,d),e("./$.mix")(l.prototype,c);return e("./$.tag")(l,t),g[t]=l,o(o.G+o.W+o.F*(l!=$),g),f||u.setStrong(l,t,a),l}}],"es6.set.js":["./$.collection-strong","./$.collection",function(e){"use strict";var t=e("./$.collection-strong");e("./$.collection")("Set",function(e){return function t(){return e(this,arguments[0])}},{add:function r(e){return t.def(this,e=0===e?0:e,e)}},t)}]}}}}}}}}},{extensions:[".js",".json"]}),d=l("./node_modules/meteor/ecmascript-runtime/runtime.js");"undefined"==typeof Package&&(Package={}),function(e,t){for(var r in t)r in e||(e[r]=t[r])}(Package["ecmascript-runtime"]=d,{Symbol:c,Map:u,Set:a})}(); + +!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,r=Package.meteor.meteorEnv,n=Package.modules.meteorInstall,o=Package.modules.Buffer,i=Package.modules.process,a=Package.promise.Promise,c,u=n({node_modules:{meteor:{"babel-runtime":{"babel-runtime.js":["meteor-babel-helpers","regenerator/runtime-module",function(t,e,r){var o=Object.prototype.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator";c=t("meteor-babel-helpers");var f={taggedTemplateLiteralLoose:function(t,e){return t.raw=e,t},classCallCheck:function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},inherits:function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);if(e){if(Object.create)t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});else{var r=function(){this.constructor=t};r.prototype=e.prototype,t.prototype=new r}Object.getOwnPropertyNames(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);if(n&&"object"==typeof n){if(Object.getOwnPropertyDescriptor(t,r))return;Object.defineProperty(t,r,n)}})}},createClass:function(){function t(t,e){for(var r=0;rh;h++)i.call(y,"$"+h);return l=Function("binder","return function ("+y.join(",")+"){ return binder.apply(this, arguments); }")(s),u.prototype&&(c.prototype=u.prototype,l.prototype=new c,c.prototype=null),l}}(),toConsumableArray:function(t){if(Array.isArray(t)){for(var e=t.length-1,r=Array(e+1);e>=0;--e)r[e]=t[e];return r}return Array.from(t)},toArray:function(t){return Array.isArray(t)?t:Array.from(t)},slicedToArray:function(t,e){if(Array.isArray(t))return t;if(t){var r=t[u](),n=[],o;for("number"!=typeof e&&(e=1/0);n.lengtho;++o){var i=r[o];e[i]=t[i]}return e}return t}c=r.exports={sanitizeForInObject:n()?o:i,_sanitizeForInObjectHard:i}}},regenerator:{"runtime-module.js":["./runtime",function(t,r,n){var o="object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this,i=o.regeneratorRuntime&&Object.getOwnPropertyNames(o).indexOf("regeneratorRuntime")>=0,a=i&&o.regeneratorRuntime;if(o.regeneratorRuntime=void 0,n.exports=t("./runtime"),i)o.regeneratorRuntime=a;else try{delete o.regeneratorRuntime}catch(c){o.regeneratorRuntime=void 0}}],"runtime.js":function(t,r,n){!function(t){"use strict";function e(t,e,r,n){var i=Object.create((e||o).prototype),a=new v(n||[]);return i._invoke=p(t,r,a),i}function r(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}function o(){}function c(){}function u(){}function f(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function l(t){this.arg=t}function s(t){function e(n,o,i,c){var u=r(t[n],t,o);if("throw"!==u.type){var f=u.arg,s=f.value;return s instanceof l?a.resolve(s.arg).then(function(t){e("next",t,i,c)},function(t){e("throw",t,i,c)}):a.resolve(s).then(function(t){f.value=t,i(f)},c)}c(u.arg)}function n(t,r){function n(){return new a(function(n,o){e(t,r,n,o)})}return o=o?o.then(n,n):n()}"object"==typeof i&&i.domain&&(e=i.domain.bind(e));var o;this._invoke=n}function p(t,e,n){var o=L;return function i(a,c){if(o===k)throw new Error("Generator is already running");if(o===A){if("throw"===a)throw c;return m()}for(;;){var u=n.delegate;if(u){if("return"===a||"throw"===a&&u.iterator[a]===g){n.delegate=null;var f=u.iterator["return"];if(f){var l=r(f,u.iterator,c);if("throw"===l.type){a="throw",c=l.arg;continue}}if("return"===a)continue}var l=r(u.iterator[a],u.iterator,c);if("throw"===l.type){n.delegate=null,a="throw",c=l.arg;continue}a="next",c=g;var s=l.arg;if(!s.done)return o=P,s;n[u.resultName]=s.value,n.next=u.nextLoc,n.delegate=null}if("next"===a)o===P?n.sent=c:n.sent=g;else if("throw"===a){if(o===L)throw o=A,c;n.dispatchException(c)&&(a="next",c=g)}else"return"===a&&n.abrupt("return",c);o=k;var l=r(t,e,n);if("normal"===l.type){o=n.done?A:P;var s={value:l.arg,done:n.done};if(l.arg!==_)return s;n.delegate&&"next"===a&&(c=g)}else"throw"===l.type&&(o=A,a="throw",c=l.arg)}}}function y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function h(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function v(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(y,this),this.reset(!0)}function d(t){if(t){var e=t[j];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function o(){for(;++r=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=b.call(o,"catchLoc"),c=b.call(o,"finallyLoc");if(a&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&b.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),h(r),_}},"catch":function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;h(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:d(t),resultName:e,nextLoc:r},_}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}}}}}}},{extensions:[".js",".json"]});u("./node_modules/meteor/babel-runtime/babel-runtime.js"),"undefined"==typeof Package&&(Package={}),function(t,e){for(var r in e)r in t||(t[r]=e[r])}(Package["babel-runtime"]={},{meteorBabelHelpers:c})}(); + +!function(){var e=Package.meteor.Meteor,n=Package.meteor.global,r=Package.meteor.meteorEnv,t=Package.underscore._,o=Package.modules.meteorInstall,a=Package.modules.Buffer,i=Package.modules.process,d=Package["ecmascript-runtime"].Symbol,u=Package["ecmascript-runtime"].Map,c=Package["ecmascript-runtime"].Set,s=Package["babel-runtime"].meteorBabelHelpers,m=Package.promise.Promise,f,p=o({node_modules:{meteor:{random:{"random.js":function(n){function r(){return new d(d.Type.ALEA,{seeds:[new Date,u,c,s,Math.random()]})}if(e.isServer)var t=Npm.require("crypto");var o=function m(){function e(){var e=4022871197,n=function r(n){n=n.toString();for(var r=0;r>>0,t-=e,t*=e,e=t>>>0,t-=e,e+=4294967296*t}return 2.3283064365386963e-10*(e>>>0)};return n.version="Mash 0.9",n}return function(n){var r=0,t=0,o=0,a=1;0==n.length&&(n=[+new Date]);var i=e();r=i(" "),t=i(" "),o=i(" ");for(var d=0;dr&&(r+=1),t-=i(n[d]),0>t&&(t+=1),o-=i(n[d]),0>o&&(o+=1);i=null;var u=function c(){var e=2091639*r+2.3283064365386963e-10*a;return r=t,t=o,o=e-(a=0|e)};return u.uint32=function(){return 4294967296*u()},u.fract53=function(){return u()+1.1102230246251565e-16*(2097152*u()|0)},u.version="Alea 0.9",u.args=n,u}(Array.prototype.slice.call(arguments))},a="23456789ABCDEFGHJKLMNPQRSTWXYZabcdefghijkmnopqrstuvwxyz",i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_",d=function p(e,n){var r=this;if(r.type=e,!p.Type[e])throw new Error("Unknown random generator type: "+e);if(e===p.Type.ALEA){if(!n.seeds)throw new Error("No seeds were provided for Alea PRNG");r.alea=o.apply(null,n.seeds)}};d.Type={NODE_CRYPTO:"NODE_CRYPTO",BROWSER_CRYPTO:"BROWSER_CRYPTO",ALEA:"ALEA"},d.prototype.fraction=function(){var e=this;if(e.type===d.Type.ALEA)return e.alea();if(e.type===d.Type.NODE_CRYPTO){var n=parseInt(e.hexString(8),16);return 2.3283064365386963e-10*n}if(e.type===d.Type.BROWSER_CRYPTO){var r=new Uint32Array(1);return window.crypto.getRandomValues(r),2.3283064365386963e-10*r[0]}throw new Error("Unknown random generator type: "+e.type)},d.prototype.hexString=function(e){var n=this;if(n.type===d.Type.NODE_CRYPTO){var r=Math.ceil(e/2),o;try{o=t.randomBytes(r)}catch(a){o=t.pseudoRandomBytes(r)}var i=o.toString("hex");return i.substring(0,e)}return this._randomString(e,"0123456789abcdef")},d.prototype._randomString=function(e,n){for(var r=this,t=[],o=0;e>o;o++)t[o]=r.choice(n);return t.join("")},d.prototype.id=function(e){var n=this;return void 0===e&&(e=17),n._randomString(e,a)},d.prototype.secret=function(e){var n=this;return void 0===e&&(e=43),n._randomString(e,i)},d.prototype.choice=function(e){var n=Math.floor(this.fraction()*e.length);return"string"==typeof e?e.substr(n,1):e[n]};var u="undefined"!=typeof window&&window.innerHeight||"undefined"!=typeof document&&document.documentElement&&document.documentElement.clientHeight||"undefined"!=typeof document&&document.body&&document.body.clientHeight||1,c="undefined"!=typeof window&&window.innerWidth||"undefined"!=typeof document&&document.documentElement&&document.documentElement.clientWidth||"undefined"!=typeof document&&document.body&&document.body.clientWidth||1,s="undefined"!=typeof navigator&&navigator.userAgent||"";f=e.isServer?new d(d.Type.NODE_CRYPTO):"undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues?new d(d.Type.BROWSER_CRYPTO):r(),f.createWithSeeds=function(){for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];if(0===n.length)throw new Error("No seeds were provided");return new d(d.Type.ALEA,{seeds:n})},f.insecure=r()},"deprecated.js":function(){e.uuid=function(){for(var e="0123456789abcdef",n=[],r=0;36>r;r++)n[r]=f.choice(e);n[14]="4",n[19]=e.substr(3&parseInt(n[19],16)|8,1),n[8]=n[13]=n[18]=n[23]="-";var t=n.join("");return t}}}}}},{extensions:[".js",".json"]});p("./node_modules/meteor/random/random.js"),p("./node_modules/meteor/random/deprecated.js"),"undefined"==typeof Package&&(Package={}),function(e,n){for(var r in n)r in e||(e[r]=n[r])}(Package.random={},{Random:f})}(); + +!function(){var t=Package.meteor.Meteor,e=Package.meteor.global,r=Package.meteor.meteorEnv,o=Package.ejson.EJSON,n=Package["id-map"].IdMap,i=Package.random.Random,a;(function(){a={},a._looksLikeObjectID=function(t){return 24===t.length&&t.match(/^[0-9a-f]*$/)},a.ObjectID=function(t){var e=this;if(t){if(t=t.toLowerCase(),!a._looksLikeObjectID(t))throw new Error("Invalid hexadecimal string for creating an ObjectID");e._str=t}else e._str=i.hexString(24)},a.ObjectID.prototype.toString=function(){var t=this;return'ObjectID("'+t._str+'")'},a.ObjectID.prototype.equals=function(t){var e=this;return t instanceof a.ObjectID&&e.valueOf()===t.valueOf()},a.ObjectID.prototype.clone=function(){var t=this;return new a.ObjectID(t._str)},a.ObjectID.prototype.typeName=function(){return"oid"},a.ObjectID.prototype.getTimestamp=function(){var t=this;return parseInt(t._str.substr(0,8),16)},a.ObjectID.prototype.valueOf=a.ObjectID.prototype.toJSONValue=a.ObjectID.prototype.toHexString=function(){return this._str},o.addType("oid",function(t){return new a.ObjectID(t)}),a.idStringify=function(t){if(t instanceof a.ObjectID)return t.valueOf();if("string"==typeof t)return""===t?t:"-"===t.substr(0,1)||"~"===t.substr(0,1)||a._looksLikeObjectID(t)||"{"===t.substr(0,1)?"-"+t:t;if(void 0===t)return"-";if("object"==typeof t&&null!==t)throw new Error("Meteor does not currently support objects other than ObjectID as ids");return"~"+JSON.stringify(t)},a.idParse=function(t){return""===t?t:"-"===t?void 0:"-"===t.substr(0,1)?t.substr(1):"~"===t.substr(0,1)?JSON.parse(t.substr(1)):a._looksLikeObjectID(t)?new a.ObjectID(t):t}}).call(this),"undefined"==typeof Package&&(Package={}),function(t,e){for(var r in e)r in t||(t[r]=e[r])}(Package["mongo-id"]={},{MongoID:a})}(); + +!function(){var e=Package.meteor.Meteor,n=Package.meteor.global,d=Package.meteor.meteorEnv,i=Package.underscore._,a=Package.ejson.EJSON,r;(function(){r={},r.diffQueryChanges=function(e,n,d,i,a){e?r.diffQueryOrderedChanges(n,d,i,a):r.diffQueryUnorderedChanges(n,d,i,a)},r.diffQueryUnorderedChanges=function(e,n,d,o){o=o||{};var f=o.projectionFn||a.clone;if(d.movedBefore)throw new Error("_diffQueryUnordered called with a movedBefore observer!");n.forEach(function(n,o){var t=e.get(o);if(t){if(d.changed&&!a.equals(t,n)){var c=f(n),u=f(t),h=r.makeChangedFields(c,u);i.isEmpty(h)||d.changed(o,h)}}else if(d.added){var l=f(n);delete l._id,d.added(n._id,l)}}),d.removed&&e.forEach(function(e,i){n.has(i)||d.removed(i)})},r.diffQueryOrderedChanges=function(n,d,o,f){f=f||{};var t=f.projectionFn||a.clone,c={};i.each(d,function(n){c[n._id]&&e._debug("Duplicate _id in new_results"),c[n._id]=!0});var u={};i.each(n,function(n,d){n._id in u&&e._debug("Duplicate _id in old_results"),u[n._id]=d});for(var h=[],l=0,s=d.length,g=new Array(s),v=new Array(s),_=function(e){return u[d[e]._id]},m=0;s>m;m++)if(void 0!==u[d[m]._id]){for(var y=l;y>0&&!(_(g[y-1])<_(m));)y--;v[m]=0===y?-1:g[y-1],g[y]=m,y+1>l&&(l=y+1)}for(var k=0===l?-1:g[l-1];k>=0;)h.push(k),k=v[k];h.reverse(),h.push(d.length),i.each(n,function(e){c[e._id]||o.removed&&o.removed(e._id)});var p=0;i.each(h,function(e){for(var a=d[e]?d[e]._id:null,f,c,h,l,s,g=p;e>g;g++)c=d[g],i.has(u,c._id)?(f=n[u[c._id]],l=t(c),s=t(f),h=r.makeChangedFields(l,s),i.isEmpty(h)||o.changed&&o.changed(c._id,h),o.movedBefore&&o.movedBefore(c._id,a)):(h=t(c),delete h._id,o.addedBefore&&o.addedBefore(c._id,h,a),o.added&&o.added(c._id,h));a&&(c=d[e],f=n[u[c._id]],l=t(c),s=t(f),h=r.makeChangedFields(l,s),i.isEmpty(h)||o.changed&&o.changed(c._id,h)),p=e+1})},r.diffObjects=function(e,n,d){i.each(e,function(e,a){i.has(n,a)?d.both&&d.both(a,e,n[a]):d.leftOnly&&d.leftOnly(a,e)}),d.rightOnly&&i.each(n,function(n,a){i.has(e,a)||d.rightOnly(a,n)})},r.makeChangedFields=function(e,n){var d={};return r.diffObjects(n,e,{leftOnly:function(e,n){d[e]=void 0},rightOnly:function(e,n){d[e]=n},both:function(e,n,i){a.equals(n,i)||(d[e]=i)}}),d},r.applyChanges=function(e,n){i.each(n,function(n,d){void 0===n?delete e[d]:e[d]=n})}}).call(this),"undefined"==typeof Package&&(Package={}),function(e,n){for(var d in n)d in e||(e[d]=n[d])}(Package["diff-sequence"]={},{DiffSequence:r})}(); + +!function(){var n=Package.meteor.Meteor,t=Package.meteor.global,o=Package.meteor.meteorEnv,e=Package.modules.meteorInstall,a=Package.modules.Buffer,r=Package.modules.process,i,s=e({node_modules:{meteor:{"geojson-utils":{"main.js":["./geojson-utils.js",function(n,t){t.GeoJSON=n("./geojson-utils.js")}],"geojson-utils.js":function(n,t,o){!function(){function n(n){for(var t=[],o=[],e=0;et!=e[r][0]>t&&n<(e[r][1]-e[a][1])*(t-e[a][0])/(e[r][0]-e[a][0])+e[a][1]&&(i=!i);return i}var e={};"undefined"!=typeof o&&o.exports&&(o.exports=e),e.lineStringsIntersect=function(n,t){for(var o=[],e=0;e<=n.coordinates.length-2;++e)for(var a=0;a<=t.coordinates.length-2;++a){var r={x:n.coordinates[e][1],y:n.coordinates[e][0]},i={x:n.coordinates[e+1][1],y:n.coordinates[e+1][0]},s={x:t.coordinates[a][1],y:t.coordinates[a][0]},c={x:t.coordinates[a+1][1],y:t.coordinates[a+1][0]},u=(c.x-s.x)*(r.y-s.y)-(c.y-s.y)*(r.x-s.x),h=(i.x-r.x)*(r.y-s.y)-(i.y-r.y)*(r.x-s.x),d=(c.y-s.y)*(i.x-r.x)-(c.x-s.x)*(i.y-r.y);if(0!=d){var l=u/d,g=h/d;l>=0&&1>=l&&g>=0&&1>=g&&o.push({type:"Point",coordinates:[r.x+l*(i.x-r.x),r.y+l*(i.y-r.y)]})}}return 0==o.length&&(o=!1),o},e.pointInBoundingBox=function(n,t){return!(n.coordinates[1]t[1][0]||n.coordinates[0]t[1][1])},e.pointInPolygon=function(o,a){for(var r="Polygon"==a.type?[a.coordinates]:a.coordinates,i=!1,s=0;sc;c++){var u=2*Math.PI*c/o,h=Math.asin(Math.sin(i[0])*Math.cos(r)+Math.cos(i[0])*Math.sin(r)*Math.cos(u)),d=i[1]+Math.atan2(Math.sin(u)*Math.sin(r)*Math.cos(i[0]),Math.cos(r)-Math.sin(i[0])*Math.sin(h));s[c]=[],s[c][1]=e.numberToDegree(h),s[c][0]=e.numberToDegree(d)}return{type:"Polygon",coordinates:[s]}},e.rectangleCentroid=function(n){var t=n.coordinates[0],o=t[0][0],e=t[0][1],a=t[2][0],r=t[2][1],i=a-o,s=r-e;return{type:"Point",coordinates:[o+i/2,e+s/2]}},e.pointDistance=function(n,t){var o=n.coordinates[0],a=n.coordinates[1],r=t.coordinates[0],i=t.coordinates[1],s=e.numberToRadius(i-a),c=e.numberToRadius(r-o),u=Math.pow(Math.sin(s/2),2)+Math.cos(e.numberToRadius(a))*Math.cos(e.numberToRadius(i))*Math.pow(Math.sin(c/2),2),h=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u));return 6371*h*1e3},e.geometryWithinRadius=function(n,t,o){if("Point"==n.type)return e.pointDistance(n,t)<=o;if("LineString"==n.type||"Polygon"==n.type){var a={},r;r="Polygon"==n.type?n.coordinates[0]:n.coordinates;for(var i in r)if(a.coordinates=r[i],e.pointDistance(a,t)>o)return!1}return!0},e.area=function(n){for(var t=0,o=n.coordinates[0],e=o.length-1,a,r,i=0;i0;)if(r=T[e-1],i=j[e-1],e--,i-r>1){for(l=n[i].lng()-n[r].lng(),g=n[i].lat()-n[r].lat(),Math.abs(l)>180&&(l=360-Math.abs(l)),l*=Math.cos(v*(n[i].lat()+n[r].lat())),f=l*l+g*g,s=r+1,c=r,h=-1;i>s;s++)y=n[s].lng()-n[r].lng(),M=n[s].lat()-n[r].lat(),Math.abs(y)>180&&(y=360-Math.abs(y)),y*=Math.cos(v*(n[s].lat()+n[r].lat())),x=y*y+M*M,m=n[s].lng()-n[i].lng(),p=n[s].lat()-n[i].lat(),Math.abs(m)>180&&(m=360-Math.abs(m)),m*=Math.cos(v*(n[s].lat()+n[i].lat())),P=m*m+p*p,u=x>=f+P?P:P>=f+x?x:(y*g-M*l)*(y*g-M*l)/f,u>h&&(c=s,h=u);d>h?(b[a]=r,a++):(e++,T[e-1]=c,j[e-1]=i,e++,T[e-1]=r,j[e-1]=c)}else b[a]=r,a++;b[a]=o-1,a++;for(var I=new Array,s=0;a>s;s++)I.push(n[b[s]]);return I.map(function(n){return{type:"Point",coordinates:[n.lng,n.lat]}})},e.destinationPoint=function(n,t,o){o/=6371,t=e.numberToRadius(t);var a=e.numberToRadius(n.coordinates[0]),r=e.numberToRadius(n.coordinates[1]),i=Math.asin(Math.sin(a)*Math.cos(o)+Math.cos(a)*Math.sin(o)*Math.cos(t)),s=r+Math.atan2(Math.sin(t)*Math.sin(o)*Math.cos(a),Math.cos(o)-Math.sin(a)*Math.sin(i));return s=(s+3*Math.PI)%(2*Math.PI)-Math.PI,{type:"Point",coordinates:[e.numberToDegree(i),e.numberToDegree(s)]}}}()}}}}},{extensions:[".js",".json"]}),c=s("./node_modules/meteor/geojson-utils/main.js");"undefined"==typeof Package&&(Package={}),function(n,t){for(var o in t)o in n||(n[o]=t[o])}(Package["geojson-utils"]=c,{GeoJSON:i})}(); + +!function(){var e=Package.meteor.Meteor,r=Package.meteor.global,t=Package.meteor.meteorEnv,n=Package.underscore._,o=Package.ejson.EJSON,i=Package["id-map"].IdMap,a=Package["ordered-dict"].OrderedDict,s=Package.tracker.Tracker,c=Package.tracker.Deps,u=Package["mongo-id"].MongoID,d=Package.random.Random,f=Package["diff-sequence"].DiffSequence,l=Package["geojson-utils"].GeoJSON,h,p,v,_,m,y,g,w,b,$,E,I,C,k,O,S;(function(){h=function(r){var t=this;t.name=r,t._docs=new h._IdMap,t._observeQueue=new e._SynchronousQueue,t.next_qid=1,t.queries={},t._savedOriginals=null,t.paused=!1},p={},v={},_=function(e){var r=new Error(e);return r.name="MinimongoError",r},h.prototype.find=function(e,r){return 0===arguments.length&&(e={}),new h.Cursor(this,e,r)},h.Cursor=function(e,r,t){var n=this;t||(t={}),n.collection=e,n.sorter=null,n.matcher=new p.Matcher(r),h._selectorIsId(r)?n._selectorId=r:h._selectorIsIdPerhapsAsObject(r)?n._selectorId=r._id:(n._selectorId=void 0,(n.matcher.hasGeoQuery()||t.sort)&&(n.sorter=new p.Sorter(t.sort||[],{matcher:n.matcher}))),n.skip=t.skip,n.limit=t.limit,n.fields=t.fields,n._projectionFn=h._compileProjection(n.fields||{}),n._transform=h.wrapTransform(t.transform),"undefined"!=typeof s&&(n.reactive=void 0===t.reactive?!0:t.reactive)},h.Cursor.prototype.rewind=function(){},h.prototype.findOne=function(e,r){return 0===arguments.length&&(e={}),r=r||{},r.limit=1,this.find(e,r).fetch()[0]},h.Cursor.prototype.forEach=function(e,r){var t=this,o=t._getRawObjects({ordered:!0});t.reactive&&t._depend({addedBefore:!0,removed:!0,changed:!0,movedBefore:!0}),n.each(o,function(n,o){n=t._projectionFn(n),t._transform&&(n=t._transform(n)),e.call(r,n,o,t)})},h.Cursor.prototype.getTransform=function(){return this._transform},h.Cursor.prototype.map=function(e,r){var t=this,n=[];return t.forEach(function(o,i){n.push(e.call(r,o,i,t))}),n},h.Cursor.prototype.fetch=function(){var e=this,r=[];return e.forEach(function(e){r.push(e)}),r},h.Cursor.prototype.count=function(){var e=this;return e.reactive&&e._depend({added:!0,removed:!0},!0),e._getRawObjects({ordered:!0}).length},h.Cursor.prototype._publishCursor=function(e){var r=this;if(!r.collection.name)throw new Error("Can't publish a cursor from a collection without a name.");var t=r.collection.name;if(!Package.mongo)throw new Error("Can't publish from Minimongo without the `mongo` package.");return Package.mongo.Mongo.Collection._publishCursor(r,e,t)},h.Cursor.prototype._getCollectionName=function(){var e=this;return e.collection.name},h._observeChangesCallbacksAreOrdered=function(e){if(e.added&&e.addedBefore)throw new Error("Please specify only one of added() and addedBefore()");return!(!e.addedBefore&&!e.movedBefore)},h._observeCallbacksAreOrdered=function(e){if(e.addedAt&&e.added)throw new Error("Please specify only one of added() and addedAt()");if(e.changedAt&&e.changed)throw new Error("Please specify only one of changed() and changedAt()");if(e.removed&&e.removedAt)throw new Error("Please specify only one of removed() and removedAt()");return!!(e.addedAt||e.movedTo||e.changedAt||e.removedAt)},h.ObserveHandle=function(){},n.extend(h.Cursor.prototype,{observe:function(e){var r=this;return h._observeFromObserveChanges(r,e)},observeChanges:function(e){var r=this,t=h._observeChangesCallbacksAreOrdered(e);if(!e._allow_unordered&&!t&&(r.skip||r.limit))throw new Error("must use ordered observe (ie, 'addedBefore' instead of 'added') with skip or limit");if(r.fields&&(0===r.fields._id||r.fields._id===!1))throw Error("You may not observe a cursor with {fields: {_id: 0}}");var i={matcher:r.matcher,sorter:t&&r.sorter,distances:r.matcher.hasGeoQuery()&&t&&new h._IdMap,resultsSnapshot:null,ordered:t,cursor:r,projectionFn:r._projectionFn},a;r.reactive&&(a=r.collection.next_qid++,r.collection.queries[a]=i),i.results=r._getRawObjects({ordered:t,distances:i.distances}),r.collection.paused&&(i.resultsSnapshot=t?[]:new h._IdMap);var c=function(e){return e?function(){var t=this,n=arguments;r.collection.paused||r.collection._observeQueue.queueTask(function(){e.apply(t,n)})}:function(){}};if(i.added=c(e.added),i.changed=c(e.changed),i.removed=c(e.removed),t&&(i.addedBefore=c(e.addedBefore),i.movedBefore=c(e.movedBefore)),!e._suppress_initial&&!r.collection.paused){var u=t?n.bind(n.each,null,i.results):n.bind(i.results.forEach,i.results);u(function(e){var n=o.clone(e);delete n._id,t&&i.addedBefore(e._id,r._projectionFn(n),null),i.added(e._id,r._projectionFn(n))})}var d=new h.ObserveHandle;return n.extend(d,{collection:r.collection,stop:function(){r.reactive&&delete r.collection.queries[a]}}),r.reactive&&s.active&&s.onInvalidate(function(){d.stop()}),r.collection._observeQueue.drain(),d}}),h.Cursor.prototype._getRawObjects=function(e){var r=this;e=e||{};var t=e.ordered?[]:new h._IdMap;if(void 0!==r._selectorId){if(r.skip)return t;var n=r.collection._docs.get(r._selectorId);return n&&(e.ordered?t.push(n):t.set(r._selectorId,n)),t}var o;if(r.matcher.hasGeoQuery()&&e.ordered&&(e.distances?(o=e.distances,o.clear()):o=new h._IdMap),r.collection._docs.forEach(function(n,i){var a=r.matcher.documentMatches(n);return a.result&&(e.ordered?(t.push(n),o&&void 0!==a.distance&&o.set(i,a.distance)):t.set(i,n)),!r.limit||r.skip||r.sorter||t.length!==r.limit?!0:!1}),!e.ordered)return t;if(r.sorter){var i=r.sorter.getComparator({distances:o});t.sort(i)}var a=r.skip||0,s=r.limit?r.limit+a:t.length;return t.slice(a,s)},h.Cursor.prototype._depend=function(e,r){var t=this;if(s.active){var o=new s.Dependency;o.depend();var i=n.bind(o.changed,o),a={_suppress_initial:!0,_allow_unordered:r};n.each(["added","changed","removed","addedBefore","movedBefore"],function(r){e[r]&&(a[r]=i)}),t.observeChanges(a)}},h.prototype.insert=function(r,t){var i=this;r=o.clone(r),n.has(r,"_id")||(r._id=h._useOID?new u.ObjectID:d.id());var a=r._id;if(i._docs.has(a))throw _("Duplicate _id '"+a+"'");i._saveOriginal(a,void 0),i._docs.set(a,r);var s=[];for(var c in i.queries){var f=i.queries[c],l=f.matcher.documentMatches(r);l.result&&(f.distances&&void 0!==l.distance&&f.distances.set(a,l.distance),f.cursor.skip||f.cursor.limit?s.push(c):h._insertInResults(f,r))}return n.each(s,function(e){i.queries[e]&&i._recomputeResults(i.queries[e])}),i._observeQueue.drain(),t&&e.defer(function(){t(null,a)}),a},h.prototype._eachPossiblyMatchingDoc=function(e,r){var t=this,n=h._idsMatchedBySelector(e);if(n)for(var o=0;o0;){var i=Math.floor(o/2);e(t,r[n+i])>=0?(n+=i+1,o-=i+1):o=i}return n},h._insertInSortedList=function(e,r,t){if(0===r.length)return r.push(t),0;var n=h._binarySearch(e,r,t);return r.splice(n,0,t),n},h.prototype.saveOriginals=function(){var e=this;if(e._savedOriginals)throw new Error("Called saveOriginals twice without retrieveOriginals");e._savedOriginals=new h._IdMap},h.prototype.retrieveOriginals=function(){var e=this;if(!e._savedOriginals)throw new Error("Called retrieveOriginals without saveOriginals");var r=e._savedOriginals;return e._savedOriginals=null,r},h.prototype._saveOriginal=function(e,r){var t=this;t._savedOriginals&&(t._savedOriginals.has(e)||t._savedOriginals.set(e,o.clone(r)))},h.prototype.pauseObservers=function(){if(!this.paused){this.paused=!0;for(var e in this.queries){var r=this.queries[e];r.resultsSnapshot=o.clone(r.results)}}},h.prototype.resumeObservers=function(){var e=this;if(this.paused){this.paused=!1;for(var r in this.queries){var t=e.queries[r];h._diffQueryChanges(t.ordered,t.resultsSnapshot,t.results,t,{projectionFn:t.projectionFn}),t.resultsSnapshot=null}e._observeQueue.drain()}}}).call(this),function(){h.wrapTransform=function(e){if(!e)return null;if(e.__wrappedTransform__)return e;var r=function(r){if(!n.has(r,"_id"))throw new Error("can only transform documents with _id");var t=r._id,i=s.nonreactive(function(){return e(r)});if(!y(i))throw new Error("transform must return object");if(n.has(i,"_id")){if(!o.equals(i._id,t))throw new Error("transformed document can't have different _id")}else i._id=t;return i};return r.__wrappedTransform__=!0,r}}.call(this),function(){m=function(e){return n.isArray(e)&&!o.isBinary(e)},y=h._isPlainObject=function(e){return e&&3===h._f._type(e)},g=function(e){return m(e)||y(e)},w=function(e,r){if(!y(e))return!1;var t=void 0;return n.each(e,function(n,o){var i="$"===o.substr(0,1);if(void 0===t)t=i;else if(t!==i){if(!r)throw new Error("Inconsistent operator: "+JSON.stringify(e));t=!1}}),!!t},b=function(e){return/^[0-9]+$/.test(e)}}.call(this),function(){p.Matcher=function(e){var r=this;r._paths={},r._hasGeoQuery=!1,r._hasWhere=!1,r._isSimple=!0,r._matchingDocument=void 0,r._selector=null,r._docMatcher=r._compileSelector(e)},n.extend(p.Matcher.prototype,{documentMatches:function(e){if(!e||"object"!=typeof e)throw Error("documentMatches needs a document");return this._docMatcher(e)},hasGeoQuery:function(){return this._hasGeoQuery},hasWhere:function(){return this._hasWhere},isSimple:function(){return this._isSimple},_compileSelector:function(r){var t=this;if(r instanceof Function)return t._isSimple=!1,t._selector=r,t._recordPathUsed(""),function(e){return{result:!!r.call(e)}};if(h._selectorIsId(r))return t._selector={_id:r},t._recordPathUsed("_id"),function(e){return{result:o.equals(e._id,r)}};if(!r||"_id"in r&&!r._id)return t._isSimple=!1,S;if("boolean"==typeof r||m(r)||o.isBinary(r))throw new Error("Invalid selector: "+r);return t._selector=o.clone(r),e(r,t,{isRoot:!0})},_recordPathUsed:function(e){this._paths[e]=!0},_getPaths:function(){return n.keys(this._paths)}});var e=function(e,t,o){o=o||{};var i=[];return n.each(e,function(e,a){if("$"===a.substr(0,1)){if(!n.has(s,a))throw new Error("Unrecognized logical operator: "+a);t._isSimple=!1,i.push(s[a](e,t,o.inElemMatch))}else{o.inElemMatch||t._recordPathUsed(a);var c=C(a),u=r(e,t,o.isRoot);i.push(function(e){var r=c(e);return u(r)})}}),j(i)},r=function(e,r,n){return e instanceof RegExp?(r._isSimple=!1,t($(e))):w(e)?i(e,r,n):t(E(e))},t=function(e,r){return r=r||{},function(t){var o=t;r.dontExpandLeafArrays||(o=k(t,r.dontIncludeLeafArrays));var i={};return i.result=n.any(o,function(r){var t=e(r.value);return"number"==typeof t&&(r.arrayIndices||(r.arrayIndices=[t]),t=!0),t&&r.arrayIndices&&(i.arrayIndices=r.arrayIndices),t}),i}};$=function(e){return function(r){return r instanceof RegExp?n.isEqual(r,e):"string"!=typeof r?!1:(e.lastIndex=0,e.test(r))}},E=function(e){if(w(e))throw Error("Can't create equalityValueSelector for operator object");return null==e?function(e){return null==e}:function(r){return h._f._equal(e,r)}};var i=function(e,r,o){var i=[];return n.each(e,function(a,s){var c=n.contains(["$lt","$lte","$gt","$gte"],s)&&n.isNumber(a),u="$ne"===s&&!n.isObject(a),f=n.contains(["$in","$nin"],s)&&n.isArray(a)&&!n.any(a,n.isObject);if("$eq"===s||c||f||u||(r._isSimple=!1),n.has(d,s))i.push(d[s](a,e,r,o));else{if(!n.has(I,s))throw new Error("Unrecognized operator: "+s);var l=I[s];i.push(t(l.compileElementSelector(a,e,r),l))}}),P(i)},a=function(r,t,o){if(!m(r)||n.isEmpty(r))throw Error("$and/$or/$nor must be nonempty array");return n.map(r,function(r){if(!y(r))throw Error("$or/$and/$nor entries need to be full objects");return e(r,t,{inElemMatch:o})})},s={$and:function(e,r,t){var n=a(e,r,t);return j(n)},$or:function(e,r,t){var o=a(e,r,t);return 1===o.length?o[0]:function(e){var r=n.any(o,function(r){return r(e).result});return{result:r}}},$nor:function(e,r,t){var o=a(e,r,t);return function(e){var r=n.all(o,function(r){return!r(e).result});return{result:r}}},$where:function(e,r){return r._recordPathUsed(""),r._hasWhere=!0,e instanceof Function||(e=Function("obj","return "+e)),function(r){return{result:e.call(r,r)}}},$comment:function(){return function(){return{result:!0}}}},c=function(e){return function(r){var t=e(r);return{result:!t.result}}},d={$not:function(e,t,n){return c(r(e,n))},$ne:function(e){return c(t(E(e)))},$nin:function(e){return c(t(I.$in.compileElementSelector(e)))},$exists:function(e){var r=t(function(e){return void 0!==e});return e?r:c(r)},$options:function(e,r){if(!n.has(r,"$regex"))throw Error("$options needs a $regex");return A},$maxDistance:function(e,r){if(!r.$near)throw Error("$maxDistance needs a $near");return A},$all:function(e,t,o){if(!m(e))throw Error("$all requires array");if(n.isEmpty(e))return S;var i=[];return n.each(e,function(e){if(w(e))throw Error("no $ expressions in $all");i.push(r(e,o))}),P(i)},$near:function(e,r,t,o){if(!o)throw Error("$near can't be inside another $ operator");t._hasGeoQuery=!0;var i,a,s;if(y(e)&&n.has(e,"$geometry"))i=e.$maxDistance,a=e.$geometry,s=function(e){return e&&e.type?"Point"===e.type?l.pointDistance(a,e):l.geometryWithinRadius(e,a,i)?0:i+1:null};else{if(i=r.$maxDistance,!m(e)&&!y(e))throw Error("$near argument must be coordinate pair or GeoJSON");a=_(e),s=function(e){return m(e)||y(e)?f(a,e):null}}return function(e){e=k(e);var r={result:!1};return n.each(e,function(e){var t=s(e.value);null===t||t>i||void 0!==r.distance&&r.distance<=t||(r.result=!0,r.distance=t,e.arrayIndices?r.arrayIndices=e.arrayIndices:delete r.arrayIndices)}),r}}},f=function(e,r){e=_(e),r=_(r);var t=e[0]-r[0],o=e[1]-r[1];return n.isNaN(t)||n.isNaN(o)?null:Math.sqrt(t*t+o*o)},_=function(e){return n.map(e,n.identity)},O=function(e){return{compileElementSelector:function(r){if(m(r))return function(){return!1};void 0===r&&(r=null);var t=h._f._type(r);return function(n){return void 0===n&&(n=null),h._f._type(n)!==t?!1:e(h._f._cmp(n,r))}}}};I={$lt:O(function(e){return 0>e}),$gt:O(function(e){return e>0}),$lte:O(function(e){return 0>=e}),$gte:O(function(e){return e>=0}),$mod:{compileElementSelector:function(e){if(!m(e)||2!==e.length||"number"!=typeof e[0]||"number"!=typeof e[1])throw Error("argument to $mod must be an array of two numbers");var r=e[0],t=e[1];return function(e){return"number"==typeof e&&e%r===t}}},$in:{compileElementSelector:function(e){if(!m(e))throw Error("$in needs an array");var r=[];return n.each(e,function(e){if(e instanceof RegExp)r.push($(e));else{if(w(e))throw Error("cannot nest $ under $in");r.push(E(e))}}),function(e){return void 0===e&&(e=null),n.any(r,function(r){return r(e)})}}},$size:{dontExpandLeafArrays:!0,compileElementSelector:function(e){if("string"==typeof e)e=0;else if("number"!=typeof e)throw Error("$size needs a number");return function(r){return m(r)&&r.length===e}}},$type:{dontIncludeLeafArrays:!0,compileElementSelector:function(e){if("number"!=typeof e)throw Error("$type needs a number");return function(r){return void 0!==r&&h._f._type(r)===e}}},$regex:{compileElementSelector:function(e,r){if(!("string"==typeof e||e instanceof RegExp))throw Error("$regex has to be a string or RegExp");var t;if(void 0!==r.$options){if(/[^gim]/.test(r.$options))throw new Error("Only the i, m, and g regexp options are supported");var n=e instanceof RegExp?e.source:e;t=new RegExp(n,r.$options)}else t=e instanceof RegExp?e:new RegExp(e);return $(t)}},$elemMatch:{dontExpandLeafArrays:!0,compileElementSelector:function(t,o,i){if(!y(t))throw Error("$elemMatch need an object");var a,c;return w(n.omit(t,n.keys(s)),!0)?(a=r(t,i),c=!1):(a=e(t,i,{inElemMatch:!0}),c=!0),function(e){if(!m(e))return!1;for(var r=0;r=2&&b(t[1]),s;t.length>1&&(s=C(t.slice(1).join(".")));var c=function(e){return e.dontIterate||delete e.dontIterate,e.arrayIndices&&!e.arrayIndices.length&&delete e.arrayIndices,e};return function(e,t){if(t||(t=[]),m(e)){if(!(i&&oo?-1:1;if(t!==n)throw Error("Missing type coercion logic in _cmp");if(7===t&&(t=n=2,e=e.toHexString(),r=r.toHexString()),9===t&&(t=n=1,e=e.getTime(),r=r.getTime()),1===t)return e-r;if(2===n)return r>e?-1:e===r?0:1;if(3===t){var a=function(e){var r=[];for(var t in e)r.push(t),r.push(e[t]);return r};return h._f._cmp(a(e),a(r))}if(4===t)for(var s=0;;s++){if(s===e.length)return s===r.length?0:-1;if(s===r.length)return 1;var c=h._f._cmp(e[s],r[s]);if(0!==c)return c}if(5===t){if(e.length!==r.length)return e.length-r.length;for(s=0;sr[s])return 1}return 0}if(8===t)return e?r?0:1:r?-1:0;if(10===t)return 0;if(11===t)throw Error("Sorting not supported on regular expression");if(13===t)throw Error("Sorting not supported on Javascript code");throw Error("Unknown type to sort")}},h._removeDollarOperators=function(e){var r={};for(var t in e)"$"!==t.substr(0,1)&&(r[t]=e[t]);return r}}.call(this),function(){p.Sorter=function(r,t){var o=this;t=t||{},o._sortSpecParts=[],o._sortFunction=null;var i=function(e,r){if(!e)throw Error("sort keys must be non-empty");if("$"===e.charAt(0))throw Error("unsupported sort key: "+e);o._sortSpecParts.push({path:e,lookup:C(e,{forSort:!0}),ascending:r})};if(r instanceof Array)for(var a=0;a=0)});else{if("function"!=typeof r)throw Error("Bad sort specification: "+JSON.stringify(r));o._sortFunction=r}if(!o._sortFunction){if(o.affectedByModifier){var s={};n.each(o._sortSpecParts,function(e){s[e.path]=1}),o._selectorForAffectedByModifier=new p.Matcher(s)}o._keyComparator=e(n.map(o._sortSpecParts,function(e,r){return o._keyFieldComparator(r)})),o._keyFilter=null,t.matcher&&o._useWithMatcher(t.matcher)}},n.extend(p.Sorter.prototype,{getComparator:function(r){var t=this;if(!r||!r.distances)return t._getBaseComparator();var n=r.distances;return e([t._getBaseComparator(),function(e,r){if(!n.has(e._id))throw Error("Missing distance for "+e._id);if(!n.has(r._id))throw Error("Missing distance for "+r._id);return n.get(e._id)-n.get(r._id)}])},_getPaths:function(){var e=this;return n.pluck(e._sortSpecParts,"path")},_getMinKeyFromDoc:function(e){var r=this,t=null;if(r._generateKeysFromDoc(e,function(e){return r._keyCompatibleWithSelector(e)?null===t?void(t=e):void(r._compareKeys(e,t)<0&&(t=e)):void 0}),null===t)throw Error("sort selector found no keys in doc?");return t},_keyCompatibleWithSelector:function(e){var r=this;return!r._keyFilter||r._keyFilter(e)},_generateKeysFromDoc:function(e,r){var t=this;if(0===t._sortSpecParts.length)throw new Error("can't generate keys without a spec");var o=[],i=function(e){return e.join(",")+","},a=null;if(n.each(t._sortSpecParts,function(r,t){var s=k(r.lookup(e),!0);s.length||(s=[{value:null}]);var c=!1;if(o[t]={},n.each(s,function(e){if(!e.arrayIndices){if(s.length>1)throw Error("multiple branches but no array used?");return void(o[t][""]=e.value)}c=!0;var r=i(e.arrayIndices);if(n.has(o[t],r))throw Error("duplicate path: "+r);if(o[t][r]=e.value,a&&!n.has(a,r))throw Error("cannot index parallel arrays")}),a){if(!n.has(o[t],"")&&n.size(a)!==n.size(o[t]))throw Error("cannot index parallel arrays!")}else c&&(a={},n.each(o[t],function(e,r){a[r]=!0}))}),!a){var s=n.map(o,function(e){if(!n.has(e,""))throw Error("no value in sole key case?");return e[""]});return void r(s)}n.each(a,function(e,t){var i=n.map(o,function(e){if(n.has(e,""))return e[""];if(!n.has(e,t))throw Error("missing path?");return e[t]});r(i)})},_compareKeys:function(e,r){var t=this;if(e.length!==t._sortSpecParts.length||r.length!==t._sortSpecParts.length)throw Error("Key has wrong length");return t._keyComparator(e,r)},_keyFieldComparator:function(e){var r=this,t=!r._sortSpecParts[e].ascending;return function(r,n){var o=h._f._cmp(r[e],n[e]);return t&&(o=-o),o}},_getBaseComparator:function(){var e=this;return e._sortFunction?e._sortFunction:e._sortSpecParts.length?function(r,t){var n=e._getMinKeyFromDoc(r),o=e._getMinKeyFromDoc(t);return e._compareKeys(n,o)}:function(e,r){return 0}},_useWithMatcher:function(e){var r=this;if(r._keyFilter)throw Error("called _useWithMatcher twice?");if(!n.isEmpty(r._sortSpecParts)){var t=e._selector;if(!(t instanceof Function)){var o={};n.each(r._sortSpecParts,function(e,r){o[e.path]=[]}),n.each(t,function(e,r){var t=o[r];if(t){if(e instanceof RegExp){if(e.ignoreCase||e.multiline)return;return void t.push($(e))}return w(e)?void n.each(e,function(r,o){n.contains(["$lt","$lte","$gt","$gte"],o)&&t.push(I[o].compileElementSelector(r)),"$regex"!==o||e.$options||t.push(I.$regex.compileElementSelector(r,e))}):void t.push(E(e))}}),n.isEmpty(o[r._sortSpecParts[0].path])||(r._keyFilter=function(e){return n.all(r._sortSpecParts,function(r,t){return n.all(o[r.path],function(r){return r(e[t])})})})}}}});var e=function(e){return function(r,t){for(var n=0;n0)||1===r.length&&"_id"===r[0]||n.contains(r,"_id")&&e._id||(r=n.reject(r,function(e){return"_id"===e}));var t=null;n.each(r,function(r){var n=!!e[r];if(null===t&&(t=n),t!==n)throw _("You cannot currently mix including and excluding fields.")});var o=S(r,function(e){return t},function(e,r,t){var n=t,o=r;throw _("both "+n+" and "+o+" found in fields option, using both of them may trigger unexpected behavior. Did you mean to use only one of them?")});return{tree:o,including:t}},S=function(e,r,t,o){return o=o||{},n.each(e,function(e){var i=o,a=e.split("."),s=n.all(a.slice(0,-1),function(r,o){if(n.has(i,r)){if(!n.isObject(i[r])&&(i[r]=t(i[r],a.slice(0,o+1).join("."),e),!n.isObject(i[r])))return!1}else i[r]={};return i=i[r],!0});if(s){var c=n.last(a);n.has(i,c)?i[c]=t(i[c],e,e):i[c]=r(e)}}),o},h._checkSupportedProjection=function(e){if(!n.isObject(e)||n.isArray(e))throw _("fields option must be an object");n.each(e,function(e,r){if(n.contains(r.split("."),"$"))throw _("Minimongo doesn't support $ operator in projections yet.");if("object"==typeof e&&n.intersection(["$elemMatch","$meta","$slice"],n.keys(e)).length>0)throw _("Minimongo doesn't support operators in projections yet.");if(-1===n.indexOf([1,0,!0,!1],e))throw _("Projection values should be one of 1, 0, true, or false")})}}.call(this),function(){h._modify=function(i,a,s){if(s=s||{},!y(a))throw _("Modifier must be an object");a=o.clone(a);var c=w(a),u;if(c)u=o.clone(i),n.each(a,function(o,i){var a=t[i];if(s.isInsert&&"$setOnInsert"===i&&(a=t.$set),!a)throw _("Invalid modifier specified "+i);n.each(o,function(t,o){if(""===o)throw _("An empty update path is not valid.");if("_id"===o)throw _("Mod on _id not allowed");var c=o.split(".");if(!n.all(c,n.identity))throw _("The update path '"+o+"' contains an empty field name, which is not allowed.");var d=n.has(r,i),f="$rename"===i,l=e(u,c,{noCreate:r[i],forbidArray:"$rename"===i,arrayIndices:s.arrayIndices}),h=c.pop();a(l,h,t,o,u)})});else{if(a._id&&!o.equals(i._id,a._id))throw _("Cannot change the _id of a document");for(var d in a)if(/\./.test(d))throw _("When replacing document, field name may not contain '.'");u=a}n.each(n.keys(i),function(e){"_id"!==e&&delete i[e]}),n.each(u,function(e,r){i[r]=e})};var e=function(e,r,t){t=t||{};for(var n=!1,o=0;o=e.length)return void 0;for(;e.length0)throw _("$slice in $push must be zero or negative");i=t.$slice}var a=void 0;if(t.$sort){if(void 0===i)throw _("$sort requires $slice to be present");a=new p.Sorter(t.$sort).getComparator();for(var s=0;st?n.splice(0,1):n.pop()}}},$pull:function(e,r,t){if(void 0!==e){var n=e[r];if(void 0!==n){if(!(n instanceof Array))throw _("Cannot apply $pull/pullAll modifier to non-array");var o=[];if(null==t||"object"!=typeof t||t instanceof Array)for(var i=0;ia&&--c,r.movedTo(t(o.clone(i.docs.get(e))),a,c,n||null)}},removed:function(e){var n=this;if(r.removedAt||r.removed){var o=t(n.docs.get(e));if(r.removedAt){var i=s?n.docs.indexOf(e):-1;r.removedAt(o,i)}else r.removed(o)}}}}else a={added:function(e,o){if(!i&&r.added){var a=n.extend(o,{_id:e});r.added(t(a))}},changed:function(e,n){var i=this;if(r.changed){var a=i.docs.get(e),s=o.clone(a);f.applyChanges(s,n),r.changed(t(s),t(o.clone(a)))}},removed:function(e){var n=this;r.removed&&r.removed(t(n.docs.get(e)))}};var c=new h._CachingChangeObserver({callbacks:a}),u=e.observeChanges(c.applyChange);return i=!1,u}}.call(this),function(){h._selectorIsId=function(e){return"string"==typeof e||"number"==typeof e||e instanceof u.ObjectID},h._selectorIsIdPerhapsAsObject=function(e){return h._selectorIsId(e)||e&&"object"==typeof e&&e._id&&h._selectorIsId(e._id)&&1===n.size(e)},h._idsMatchedBySelector=function(e){if(h._selectorIsId(e))return[e];if(!e)return null;if(n.has(e,"_id"))return h._selectorIsId(e._id)?[e._id]:e._id&&e._id.$in&&n.isArray(e._id.$in)&&!n.isEmpty(e._id.$in)&&n.all(e._id.$in,h._selectorIsId)?e._id.$in:null;if(e.$and&&n.isArray(e.$and))for(var r=0;rn;n++){var i=m(e[n],t[0]);if(i)return i.path=b(n,i.path),i}return!1}if(t instanceof h){var i;try{i=t.condition(e)}catch(y){if(!(y instanceof s.Error))throw y;return{message:y.message,path:y.path}}return i?!1:{message:"Failed Match.Where validation",path:""}}if(t instanceof f?t=s.OneOf(void 0,null,t.pattern):t instanceof u&&(t=s.OneOf(void 0,t.pattern)),t instanceof l){for(var n=0;nn;n++){var P=E[n],_=e[P];if(o.has(O,P)){var i=m(_,O[P]);if(i)return i.path=b(P,i.path),i;delete O[P]}else if(o.has(w,P)){var i=m(_,w[P]);if(i)return i.path=b(P,i.path),i}else{if(!v)return{message:"Unknown key",path:P};if(k){var i=m(_,k[0]);if(i)return i.path=b(P,i.path),i}}}var E=o.keys(O);return E.length?{message:"Missing key '"+E[0]+"'",path:""}:void 0},y=function(e,t){var n=this;n.args=o.clone(e),n.args.reverse(),n.description=t};o.extend(y.prototype,{checking:function(e){var t=this;t._checkingOneValue(e)||(o.isArray(e)||o.isArguments(e))&&o.each(e,o.bind(t._checkingOneValue,t))},_checkingOneValue:function(e){for(var t=this,n=0;n1&&i.name&&(t[i.name]=l[1])}return r||e.immediateMigration?t:null};n._migrate=function(t,o){var n=u(t,o);if(null===n)return!1;try{var r=JSON.stringify({data:n,reload:!0})}catch(l){throw a._debug("Couldn't serialize data for migration",n),l}if(i)try{i.setItem(e,r)}catch(l){a._debug("Couldn't save data for migration to sessionStorage",l)}else a._debug("Browser does not support sessionStorage. Not saving migration state.");return!0},n._withFreshProvidersForTest=function(a){var e=o.clone(g);g=[];try{a()}finally{g=e}};var f=!1;n._reload=function(a){if(a=a||{},!f){f=!0;var e=function(){o.defer(function(){n._migrate(e,a)&&(window.location.hash?window.location.reload():window.location.replace(window.location.href))})};e()}}}).call(this),function(){a._reload={onMigrate:n._onMigrate,migrationData:n._migrationData,reload:n._reload}}.call(this),"undefined"==typeof Package&&(Package={}),function(a,e){for(var t in e)t in a||(a[t]=e[t])}(Package.reload={},{Reload:n})}(); + +!function(){var e=Package.meteor.Meteor,t=Package.meteor.global,n=Package.meteor.meteorEnv,o=Package.check.check,r=Package.check.Match,i=Package.random.Random,s=Package.ejson.EJSON,a=Package.underscore._,u=Package.tracker.Tracker,c=Package.tracker.Deps,d=Package.retry.Retry,l=Package["id-map"].IdMap,f=Package["ddp-common"].DDPCommon,p=Package["diff-sequence"].DiffSequence,_=Package["mongo-id"].MongoID,h,v,m,g,b,y,w;(function(){h={},v={}}).call(this),function(){m=function(){var e=this;l.call(e,_.idStringify,_.idParse)},e._inherits(m,l)}.call(this),function(){g=function(){var e=document,t=window,n={},o=function(){};o.prototype.addEventListener=function(e,t){this._listeners||(this._listeners={}),e in this._listeners||(this._listeners[e]=[]);var o=this._listeners[e];-1===n.arrIndexOf(o,t)&&o.push(t)},o.prototype.removeEventListener=function(e,t){if(this._listeners&&e in this._listeners){var o=this._listeners[e],r=n.arrIndexOf(o,t);return-1!==r?void(o.length>1?this._listeners[e]=o.slice(0,r).concat(o.slice(r+1)):delete this._listeners[e]):void 0}},o.prototype.dispatchEvent=function(e){var t=e.type,n=Array.prototype.slice.call(arguments,0);if(this["on"+t]&&this["on"+t].apply(this,n),this._listeners&&t in this._listeners)for(var o=0;on;n++)o.push(s.substr(Math.floor(Math.random()*t),1));return o.join("")},n.random_number=function(e){return Math.floor(Math.random()*e)},n.random_number_string=function(e){var t=(""+(e-1)).length,o=Array(t+1).join("0");return(o+n.random_number(e)).slice(-t)},n.getOrigin=function(e){e+="/";var t=e.split("/").slice(0,3);return t.join("/")},n.isSameOriginUrl=function(e,n){return n||(n=t.location.href),e.split("/").slice(0,3).join("/")===n.split("/").slice(0,3).join("/")},n.isSameOriginScheme=function(e,n){return n||(n=t.location.href),e.split(":")[0]===n.split(":")[0]},n.getParentDomain=function(e){if(/^[0-9.]*$/.test(e))return e;if(/^\[/.test(e))return e;if(!/[.]/.test(e))return e;var t=e.split(".").slice(1);return t.join(".")},n.objectExtend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e};var a="_jp";n.polluteGlobalNamespace=function(){a in t||(t[a]={})},n.closeFrame=function(e,t){return"c"+JSON.stringify([e,t])},n.userSetCode=function(e){return 1e3===e||e>=3e3&&4999>=e},n.countRTO=function(e){var t;return t=e>100?3*e:e+200},n.log=function(){t.console&&console.log&&console.log.apply&&console.log.apply(console,arguments)},n.bind=function(e,t){return e.bind?e.bind(t):function(){return e.apply(t,arguments)}},n.flatUrl=function(e){return-1===e.indexOf("?")&&-1===e.indexOf("#")},n.amendUrl=function(t,o){var r;if(void 0===o)r=e.location;else{var i=/^([a-z0-9.+-]+:)/i.exec(o);if(i){var s=i[0].toLowerCase(),a=o.substring(s.length),u=/[a-z0-9\.-]+(:[0-9]+)?/.exec(a);if(u)var c=u[0]}if(!s||!c)throw new Error("relativeTo must be an absolute url");r={protocol:s,host:c}}if(!t)throw new Error("Wrong url for SockJS");if(!n.flatUrl(t))throw new Error("Only basic urls are supported in SockJS");0===t.indexOf("//")&&(t=r.protocol+t),0===t.indexOf("/")&&(t=r.protocol+"//"+r.host+t),t=t.replace(/[/]+$/,"");var d=t.split("/");return("http:"===d[0]&&/:80$/.test(d[2])||"https:"===d[0]&&/:443$/.test(d[2]))&&(d[2]=d[2].replace(/:(80|443)$/,"")),t=d.join("/")},n.arrIndexOf=function(e,t){for(var n=0;n=0},n.delay=function(e,t){return"function"==typeof e&&(t=e,e=0),setTimeout(t,e)};var u=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c={"\x00":"\\u0000","":"\\u0001","":"\\u0002","":"\\u0003","":"\\u0004","":"\\u0005","":"\\u0006","":"\\u0007","\b":"\\b"," ":"\\t","\n":"\\n"," ":"\\u000b","\f":"\\f","\r":"\\r","":"\\u000e","":"\\u000f","":"\\u0010","":"\\u0011","":"\\u0012","":"\\u0013","":"\\u0014","":"\\u0015","":"\\u0016","":"\\u0017","":"\\u0018","":"\\u0019","":"\\u001a","":"\\u001b","":"\\u001c","":"\\u001d","":"\\u001e","":"\\u001f",'"':'\\"',"\\":"\\\\","":"\\u007f","€":"\\u0080","":"\\u0081","‚":"\\u0082","ƒ":"\\u0083","„":"\\u0084","…":"\\u0085","†":"\\u0086","‡":"\\u0087","ˆ":"\\u0088","‰":"\\u0089","Š":"\\u008a","‹":"\\u008b","Œ":"\\u008c","":"\\u008d","Ž":"\\u008e","":"\\u008f","":"\\u0090","‘":"\\u0091","’":"\\u0092","“":"\\u0093","”":"\\u0094","•":"\\u0095","–":"\\u0096","—":"\\u0097","˜":"\\u0098","™":"\\u0099","š":"\\u009a","›":"\\u009b","œ":"\\u009c","":"\\u009d","ž":"\\u009e","Ÿ":"\\u009f","­":"\\u00ad","؀":"\\u0600","؁":"\\u0601","؂":"\\u0602","؃":"\\u0603","؄":"\\u0604","܏":"\\u070f","឴":"\\u17b4","឵":"\\u17b5","‌":"\\u200c","‍":"\\u200d","‎":"\\u200e","‏":"\\u200f","\u2028":"\\u2028","\u2029":"\\u2029","‪":"\\u202a","‫":"\\u202b","‬":"\\u202c","‭":"\\u202d","‮":"\\u202e"," ":"\\u202f","⁠":"\\u2060","⁡":"\\u2061","⁢":"\\u2062","⁣":"\\u2063","⁤":"\\u2064","⁥":"\\u2065","⁦":"\\u2066","⁧":"\\u2067","⁨":"\\u2068","⁩":"\\u2069","":"\\u206a","":"\\u206b","":"\\u206c","":"\\u206d","":"\\u206e","":"\\u206f","\ufeff":"\\ufeff","￰":"\\ufff0","￱":"\\ufff1","￲":"\\ufff2","￳":"\\ufff3","￴":"\\ufff4","￵":"\\ufff5","￶":"\\ufff6","￷":"\\ufff7","￸":"\\ufff8","":"\\ufff9","":"\\ufffa","":"\\ufffb","":"\\ufffc","�":"\\ufffd","￾":"\\ufffe","￿":"\\uffff"},d=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,l,f=JSON&&JSON.stringify||function(e){return u.lastIndex=0,u.test(e)&&(e=e.replace(u,function(e){return c[e]})),'"'+e+'"'},p=function(e){var t,n={},o=[];for(t=0;65536>t;t++)o.push(String.fromCharCode(t));return e.lastIndex=0,o.join("").replace(e,function(e){return n[e]="\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4),""}),e.lastIndex=0,n};n.quote=function(e){var t=f(e);return d.lastIndex=0,d.test(t)?(l||(l=p(d)),t.replace(d,function(e){return l[e]})):t};var _=["websocket","xdr-streaming","xhr-streaming","iframe-eventsource","iframe-htmlfile","xdr-polling","xhr-polling","iframe-xhr-polling","jsonp-polling"];n.probeProtocols=function(){for(var e={},t=0;t<_.length;t++){var n=_[t];e[n]=C[n]&&C[n].enabled()}return e},n.detectProtocols=function(e,t,n){var o={},r=[];t||(t=_);for(var i=0;i0&&a(e)};return n.websocket!==!1&&a(["websocket"]),o["xhr-streaming"]&&!n.null_origin?r.push("xhr-streaming"):!o["xdr-streaming"]||n.cookie_needed||n.null_origin?a(["iframe-eventsource","iframe-htmlfile"]):r.push("xdr-streaming"),o["xhr-polling"]&&!n.null_origin?r.push("xhr-polling"):!o["xdr-polling"]||n.cookie_needed||n.null_origin?a(["iframe-xhr-polling","jsonp-polling"]):r.push("xdr-polling"),r};var h="_sockjs_global";n.createHook=function(){var e="a"+n.random_string(8);if(!(h in t)){var o={};t[h]=function(e){return e in o||(o[e]={id:e,del:function(){delete o[e]}}),o[e]}}return t[h](e)},n.attachMessage=function(e){n.attachEvent("message",e)},n.attachEvent=function(n,o){"undefined"!=typeof t.addEventListener?t.addEventListener(n,o,!1):(e.attachEvent("on"+n,o),t.attachEvent("on"+n,o))},n.detachMessage=function(e){n.detachEvent("message",e)},n.detachEvent=function(n,o){"undefined"!=typeof t.addEventListener?t.removeEventListener(n,o,!1):(e.detachEvent("on"+n,o),t.detachEvent("on"+n,o))};var v={},m=!1,g=function(){for(var e in v)v[e](),delete v[e]},b=function(){m||(m=!0,g())};n.attachEvent("unload",b),n.unload_add=function(e){var t=n.random_string(8);return v[t]=e,m&&n.delay(g),t},n.unload_del=function(e){e in v&&delete v[e]},n.createIframe=function(t,o){var r=e.createElement("iframe"),i,s,a=function(){clearTimeout(i);try{r.onload=null}catch(e){}r.onerror=null},u=function(){r&&(a(),setTimeout(function(){r&&r.parentNode.removeChild(r),r=null},0),n.unload_del(s))},c=function(e){r&&(u(),o(e))},d=function(e,t){try{r&&r.contentWindow&&r.contentWindow.postMessage(e,t)}catch(n){}};return r.src=t,r.style.display="none",r.style.position="absolute",r.onerror=function(){c("onerror")},r.onload=function(){clearTimeout(i),i=setTimeout(function(){c("onload timeout")},2e3)},e.body.appendChild(r),i=setTimeout(function(){c("timeout")},15e3),s=n.unload_add(u),{post:d,cleanup:u,loaded:a}},n.createHtmlfile=function(e,o){var r=new ActiveXObject("htmlfile"),i,s,u,c=function(){clearTimeout(i)},d=function(){r&&(c(),n.unload_del(s),u.parentNode.removeChild(u),u=r=null,CollectGarbage())},l=function(e){r&&(d(),o(e))},f=function(e,t){try{u&&u.contentWindow&&u.contentWindow.postMessage(e,t)}catch(n){}};r.open(),r.write(''),r.close(),r.parentWindow[a]=t[a];var p=r.createElement("div");return r.body.appendChild(p),u=r.createElement("iframe"),p.appendChild(u),u.src=e,i=setTimeout(function(){l("timeout")},15e3),s=n.unload_add(d),{post:f,cleanup:d,loaded:c}};var y=function(){};y.prototype=new i(["chunk","finish"]),y.prototype._start=function(e,o,r,i){var s=this;try{s.xhr=new XMLHttpRequest}catch(a){}if(!s.xhr)try{s.xhr=new t.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}(t.ActiveXObject||t.XDomainRequest)&&(o+=(-1===o.indexOf("?")?"?":"&")+"t="+ +new Date),s.unload_ref=n.unload_add(function(){s._cleanup(!0)});try{s.xhr.open(e,o,!0)}catch(u){return s.emit("finish",0,""),void s._cleanup()}if(i&&i.no_credentials||(s.xhr.withCredentials="true"),i&&i.headers)for(var c in i.headers)s.xhr.setRequestHeader(c,i.headers[c]);s.xhr.onreadystatechange=function(){if(s.xhr){var e=s.xhr;switch(e.readyState){case 3:try{var t=e.status,n=e.responseText}catch(e){}1223===t&&(t=204),n&&n.length>0&&s.emit("chunk",t,n);break;case 4:var t=e.status;1223===t&&(t=204),s.emit("finish",t,e.responseText),s._cleanup(!1)}}},s.xhr.send(r)},y.prototype._cleanup=function(e){var t=this;if(t.xhr){if(n.unload_del(t.unload_ref),t.xhr.onreadystatechange=function(){},e)try{t.xhr.abort()}catch(o){}t.unload_ref=t.xhr=null}},y.prototype.close=function(){var e=this;e.nuke(),e._cleanup(!0)};var w=n.XHRCorsObject=function(){var e=this,t=arguments;n.delay(function(){e._start.apply(e,t)})};w.prototype=new y;var S=n.XHRLocalObject=function(e,t,o){var r=this;n.delay(function(){r._start(e,t,o,{no_credentials:!0})})};S.prototype=new y;var k=n.XDRObject=function(e,t,o){var r=this;n.delay(function(){r._start(e,t,o)})};k.prototype=new i(["chunk","finish"]),k.prototype._start=function(e,t,o){var r=this,i=new XDomainRequest;t+=(-1===t.indexOf("?")?"?":"&")+"t="+ +new Date;var s=i.ontimeout=i.onerror=function(){r.emit("finish",0,""),r._cleanup(!1)};i.onprogress=function(){r.emit("chunk",200,i.responseText)},i.onload=function(){r.emit("finish",200,i.responseText),r._cleanup(!1)},r.xdr=i,r.unload_ref=n.unload_add(function(){r._cleanup(!0)});try{r.xdr.open(e,t),r.xdr.send(o)}catch(a){s()}},k.prototype._cleanup=function(e){var t=this;if(t.xdr){if(n.unload_del(t.unload_ref),t.xdr.ontimeout=t.xdr.onerror=t.xdr.onprogress=t.xdr.onload=null,e)try{t.xdr.abort()}catch(o){}t.unload_ref=t.xdr=null}},k.prototype.close=function(){var e=this;e.nuke(),e._cleanup(!0)},n.isXHRCorsCapable=function(){return t.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?1:t.XDomainRequest&&e.domain?2:B.enabled()?3:4};var C=function(e,t,o){if(!(this instanceof C))return new C(e,t,o);var r=this,i;r._options={devel:!1,debug:!1,protocols_whitelist:[],info:void 0,rtt:void 0},o&&n.objectExtend(r._options,o),r._base_url=n.amendUrl(e),r._server=r._options.server||n.random_number_string(1e3),r._options.protocols_whitelist&&r._options.protocols_whitelist.length?i=r._options.protocols_whitelist:(i="string"==typeof t&&t.length>0?[t]:n.isArray(t)?t:null,i&&r._debug('Deprecated API: Use "protocols_whitelist" option instead of supplying protocol list as a second parameter to SockJS constructor.')),r._protocols=[],r.protocol=null,r.readyState=C.CONNECTING,r._ir=V(r._base_url),r._ir.onfinish=function(e,t){r._ir=null,e?(r._options.info&&(e=n.objectExtend(e,r._options.info)),r._options.rtt&&(t=r._options.rtt),r._applyInfo(e,t,i),r._didClose()):r._didClose(1002,"Can't connect to server",!0)}};C.prototype=new o,C.version="0.3.4",C.CONNECTING=0,C.OPEN=1,C.CLOSING=2,C.CLOSED=3,C.prototype._debug=function(){this._options.debug&&n.log.apply(n,arguments)},C.prototype._dispatchOpen=function(){var e=this;e.readyState===C.CONNECTING?(e._transport_tref&&(clearTimeout(e._transport_tref),e._transport_tref=null),e.readyState=C.OPEN,e.dispatchEvent(new r("open"))):e._didClose(1006,"Server lost session")},C.prototype._dispatchMessage=function(e){var t=this;t.readyState===C.OPEN&&t.dispatchEvent(new r("message",{data:e}))},C.prototype._dispatchHeartbeat=function(e){var t=this;t.readyState===C.OPEN&&t.dispatchEvent(new r("heartbeat",{}))},C.prototype._didClose=function(e,t,o){var i=this;if(i.readyState!==C.CONNECTING&&i.readyState!==C.OPEN&&i.readyState!==C.CLOSING)throw new Error("INVALID_STATE_ERR");i._ir&&(i._ir.nuke(),i._ir=null),i._transport&&(i._transport.doCleanup(),i._transport=null);var s=new r("close",{code:e,reason:t,wasClean:n.userSetCode(e)});if(!n.userSetCode(e)&&i.readyState===C.CONNECTING&&!o){if(i._try_next_protocol(s))return;s=new r("close",{code:2e3,reason:"All transports failed",wasClean:!1,last_event:s})}i.readyState=C.CLOSED,n.delay(function(){i.dispatchEvent(s)})},C.prototype._didMessage=function(e){var t=this,n=e.slice(0,1);switch(n){case"o":t._dispatchOpen();break;case"a":for(var o=JSON.parse(e.slice(1)||"[]"),r=0;r0){var t="["+e.send_buffer.join(",")+"]";e.send_stop=e.sender(e.trans_url,t,function(t,n){e.send_stop=null,t===!1?e.ri._didClose(1006,"Sending error "+n):e.send_schedule_wait()}),e.send_buffer=[]}},O.prototype.send_destructor=function(){var e=this;e._send_stop&&e._send_stop(),e._send_stop=null};var T=function(t,o,r){var i=this;if(!("_send_form"in i)){var s=i._send_form=e.createElement("form"),a=i._send_area=e.createElement("textarea");a.name="d",s.style.display="none",s.style.position="absolute",s.method="POST",s.enctype="application/x-www-form-urlencoded",s.acceptCharset="UTF-8",s.appendChild(a),e.body.appendChild(s)}var s=i._send_form,a=i._send_area,u="a"+n.random_string(8);s.target=u,s.action=t+"/jsonp_send?i="+u;var c;try{c=e.createElement('')}),Meteor.startup(Template.body.renderToDocument)}).call(this); + +(function(){Template.__checkName("layout_main"),Template.layout_main=new Template("Template.layout_main",function(){var a=this;return[HTML.Raw('\n\n '),HTML.HEADER({"class":function(){return["dapp-header ",Blaze.If(function(){return Spacebars.call(a.lookup("isMist"))},function(){return Blaze.Unless(function(){return Spacebars.call(a.lookup("isWalletMode"))},function(){return" dapp-full-header "})})]}},"\n ",Blaze._TemplateWith(function(){return{template:Spacebars.call(a.lookup("header"))}},function(){return Spacebars.include(function(){return Spacebars.call(Template.__dynamic)})}),"\n "),"\n\n ",HTML.DIV({"class":"dapp-flex-content"},"\n\n ",HTML.Raw(""),"\n ",HTML.MAIN({"class":"dapp-content"},"\n ",Blaze._TemplateWith(function(){return{template:Spacebars.call(a.lookup("main")),data:Spacebars.call(a.lookup("data"))}},function(){return Spacebars.include(function(){return Spacebars.call(Template.__dynamic)})}),"\n "),"\n\n "),"\n\n ",Spacebars.include(a.lookupTemplate("dapp_modalPlaceholder")),"\n\n ",Spacebars.include(a.lookupTemplate("GlobalNotifications"))]})}).call(this); + +(function(){"undefined"!=typeof web3?web3=new Web3(web3.currentProvider):web3=new Web3(new Web3.providers.HttpProvider("http://localhost:8545"))}).call(this); + +(function(){var e=null,t=function(){web3.net.getPeerCount(function(e,t){e||Session.set("peerCount",t)})};updateBalances=function(){var e=Wallets.find().fetch().concat(CustomContracts.find().fetch());_.each(e,function(e){e.address&&(web3.eth.getBalance(e.address,function(t,s){t||(e.creationBlock?Wallets.update(e._id,{$set:{balance:s.toString(10)}}):CustomContracts.update(e._id,{$set:{balance:s.toString(10)}}))}),e.creationBlock&&Meteor.setTimeout(function(){updateContractData(e)},1e3))});var t=EthAccounts.find().fetch().concat(e);_.each(t,function(e){var t=Date.now();(!e.ensCheck||e.ensCheck&&t-e.ensCheck>6e5)&&Helpers.getENSName(e.address,function(s,a,n){s||e.address.toLowerCase()!=n?(EthAccounts.update({address:e.address},{$set:{ens:!1,ensCheck:t}}),CustomContracts.update({address:e.address},{$set:{ens:!1,ensCheck:t}}),Wallets.update({address:e.address},{$set:{ens:!1,ensCheck:t}})):(EthAccounts.update({address:e.address},{$set:{name:a,ens:!0,ensCheck:t}}),CustomContracts.update({address:e.address},{$set:{name:a,ens:!0,ensCheck:t}}),Wallets.update({address:e.address},{$set:{name:a,ens:!0,ensCheck:t}}))})});var s=EthAccounts.find().fetch().concat(Wallets.find().fetch());_.each(Tokens.find().fetch(),function(e){if(e.address){var t=TokenContract.at(e.address);_.each(s,function(s){t.balanceOf(s.address,function(t,a){var n=e&&e.balances?e.balances[s._id]:0;if(!t&&a.toString(10)!==n){var c={};a>0?(c["balances."+s._id]=a.toString(10),Tokens.update(e._id,{$set:c})):n&&(c["balances."+s._id]="",Tokens.update(e._id,{$unset:c}))}})})}})},observeLatestBlocks=function(){updateBalances(),web3.eth.filter("latest").watch(function(e,t){e||updateBalances()}),Session.setDefault("peerCount",0),t(),clearInterval(e),e=setInterval(function(){t()},1e3)}}).call(this); + +(function(){observeCustomContracts=function(){collectionObservers[collectionObservers.length]=CustomContracts.find({}).observe({added:function(t){web3.eth.getCode(t.address,function(e,s){!e&&s&&s.length>2?CustomContracts.update(t._id,{$unset:{disabled:!1}}):e||web3.eth.getBalance(t.address,function(e,s){!e&&s.gt(0)?CustomContracts.update(t._id,{$unset:{disabled:!1}}):e||CustomContracts.update(t._id,{$set:{disabled:!0}})})})}})}}).call(this); + +(function(){var e={};observeEvents=function(){collectionObservers[collectionObservers.length]=Events.find({}).observe({added:function(e){CustomContracts.update({address:e.address.toLowerCase()},{$addToSet:{contractEvents:e._id}})},removed:function(e){CustomContracts.update({address:e.address.toLowerCase()},{$pull:{contractEvents:e._id}})}})}}).call(this); + +(function(){checkConfirmation=function(n){var e=PendingConfirmations.findOne(n);if(e){var i=Helpers.getAccountByAddress(e.from);if(e.operation&&i&&i.requiredSignatures>e.confirmedOwners.length){var o=!1,t=contracts["ct_"+i._id];setTimeout(function(){_.each(i.owners,function(r){t.hasConfirmed(e.operation,r,function(e,t){if(!o&&!e){t?PendingConfirmations.update(n,{$addToSet:{confirmedOwners:r}}):PendingConfirmations.update(n,{$pull:{confirmedOwners:r}});var d=PendingConfirmations.findOne(n);!d||d.confirmedOwners.length&&Number(i.requiredSignatures)!==d.confirmedOwners.length||(PendingConfirmations.remove(n),o=!0)}})})},1e3)}}},observePendingConfirmations=function(){collectionObservers[collectionObservers.length]=PendingConfirmations.find({}).observe({added:function(n){checkConfirmation(n._id),"undefined"!=typeof mist&&n.confirmedOwners&&n.confirmedOwners.length&&mist.menu.setBadge(TAPi18n.__("wallet.app.texts.pendingConfirmationsBadge"))},removed:function(n){updateMistBadge()},changed:function(n,e){"undefined"!=typeof mist&&document.confirmedOwners&&document.confirmedOwners.length&&mist.menu.setBadge(TAPi18n.__("wallet.app.texts.pendingConfirmationsBadge"))}})}}).call(this); + +(function(){var e={},t=function(t){var o=e["ct_"+t._id]=TokenContract.at(t.address);if(o){var n=(t.checkpointBlock||0)-ethereumConfig.rollBackBy;4e5>n&&(n=4e5),o.tokenEvents||(o.tokenEvents=[]);var s=o.tokenEvents;_.each(Transactions.find({tokenId:t._id,blockNumber:{$exists:!0,$gt:n}}).fetch(),function(e){e&&Transactions.remove({_id:e._id})});var a=o.allEvents({fromBlock:n,toBlock:"latest"});s.push(a);var r=EthBlocks.latest.number;a.get(function(e,o){e||Tokens.update({_id:t._id},{$set:{checkpointBlock:(r||EthBlocks.latest.number)-ethereumConfig.rollBackBy}})}),a.watch(function(e,o){if(e)console.error("Logs of Token "+t.name+" couldn't be received",e);else if(EthBlocks.latest.number&&o.blockNumber>EthBlocks.latest.number&&Tokens.update({_id:t._id},{$set:{checkpointBlock:o.blockNumber}}),"Transfer"===o.event&&(Helpers.getAccountByAddress(o.args.from)||Helpers.getAccountByAddress(o.args.to))){Helpers.eventLogs("Transfer for "+t.address+" arrived in block: #"+o.blockNumber,o.args.value.toNumber()),o.tokenId=t._id;var n=addTransaction(o,o.args.from,o.args.to,o.args.value.toString(10));if(!n||!n.blockNumber){var s=Helpers.makeId("tx",o.transactionHash);Helpers.showNotification("wallet.transactions.notifications.tokenTransfer",{token:t.name,to:Helpers.getAccountNameByAddress(o.args.to),from:Helpers.getAccountNameByAddress(o.args.from),amount:Helpers.formatNumberByDecimals(o.args.value,t.decimals)},function(){EthElements.Modal.show({template:"views_modals_transactionInfo",data:{_id:s}},{"class":"transaction-info"})})}}})}};observeTokens=function(){collectionObservers[collectionObservers.length]=Tokens.find({}).observe({added:function(e){web3.eth.getCode(e.address,function(o,n){o?console.log("Couldn't check Token code of ",e,o):n&&n.length>2?(Tokens.update(e._id,{$unset:{disabled:""}}),t(e)):Tokens.update(e._id,{$set:{disabled:!0}})})},removed:function(t){var o=e["ct_"+t._id];o&&_.each(o.tokenEvents,function(e){e.stopWatching(),o.tokenEvents.shift()})}})}}).call(this); + +(function(){addTransactionAfterSend=function(t,e,a,n,s,o,r,c){var i=void 0,d=void 0,u=Helpers.makeId("tx",t);_.isObject(r)&&(d=r.contract.name.replace(/([A-Z])/g," $1"),i=r.contract.jsonInterface,r=r.data),Transactions.upsert(u,{$set:{tokenId:c,value:e,from:a,to:n,timestamp:moment().unix(),transactionHash:t,gasPrice:s,gasUsed:o,fee:String(s*o),data:r,jsonInterface:i,contractName:d}}),EthAccounts.update({address:a},{$addToSet:{transactions:u}}),EthAccounts.update({address:n},{$addToSet:{transactions:u}})},addTransaction=function(e,a,n,s){var o=Helpers.makeId("tx",e.transactionHash);Transactions.upsert(o,{to:n,from:a,value:s});var r=web3.eth.getBlock(e.blockNumber,!1,function(a,n){a||web3.eth.getTransaction(e.transactionHash,function(a,s){!a&&s&&web3.eth.getTransactionReceipt(e.transactionHash,function(a,r){delete s.hash,s.transactionHash=e.transactionHash;var c={_id:o,timestamp:n.timestamp};e.tokenId&&(c.tokenId=e.tokenId),e.args.operation&&(c.operation=e.args.operation),a||t(c,s,r)})})});return Transactions.findOne(o)};var t=function(t,e,a){var n=t._id||Helpers.makeId("tx",e.transactionHash||t.transactionHash);if(n){var s=Transactions.findOne({_id:n});if(s&&(t._id=n,e&&(t.blockNumber=e.blockNumber,t.blockHash=e.blockHash,t.transactionIndex=e.transactionIndex,e.transactionHash&&(t.transactionHash=e.transactionHash),t.data=e.input||e.data||null,_.isString(t.data)&&"0x"===t.data&&(t.data=null),t.gasPrice=e.gasPrice.toString(10)),a&&e&&(!t.contractAddress&&a.contractAddress&&web3.eth.getCode(a.contractAddress,function(t,e){if(!t&&e.length>2&&(Transactions.update({_id:n},{$set:{deployedData:e}}),s&&s.jsonInterface)){CustomContracts.upsert({address:a.contractAddress},{$set:{address:a.contractAddress,name:(s.contractName||"New Contract")+" "+a.contractAddress.substr(2,4),jsonInterface:s.jsonInterface}});var o=_.pluck(s.jsonInterface,"name"),r=_.contains(o,"transfer")&&_.contains(o,"Transfer")&&_.contains(o,"balanceOf");if(console.log("isToken: ",r),r){tokenId=Helpers.makeId("token",a.contractAddress),Tokens.upsert(tokenId,{$set:{address:a.contractAddress,name:s.name+" "+a.contractAddress.substr(2,4),symbol:s.name+a.contractAddress.substr(2,4),balances:{},decimals:0}});var c=TokenContract.at(a.contractAddress);c.name(function(t,e){Tokens.upsert(tokenId,{$set:{name:e}}),CustomContracts.upsert({address:a.contractAddress},{$set:{name:TAPi18n.__("wallet.tokens.admin",{name:e})}})}),c.decimals(function(t,e){Tokens.upsert(tokenId,{$set:{decimals:Number(e)}})}),c.symbol(function(t,e){Tokens.upsert(tokenId,{$set:{symbol:e}})})}}}),t.contractAddress=a.contractAddress,t.gasUsed=a.gasUsed,t.gasLimit=e.gas,t.outOfGas=a.gasUsed===e.gas,t.fee=e.gasPrice.times(new BigNumber(a.gasUsed)).toString(10)),s&&(s.tokenId&&!t.tokenId&&(t.tokenId=s.tokenId,t.from=s.from,t.to=s.to,t.value=s.value),delete t._id,Transactions.update({_id:n},{$set:t})),t.outOfGas)){var o=TAPi18n.__("wallet.transactions.error.outOfGas",{from:Helpers.getAccountNameByAddress(t.from),to:Helpers.getAccountNameByAddress(t.to)});EthAccounts.findOne({address:t.from})?web3.eth.getBalance(t.from,t.blockNumber,function(e,a){e||web3.eth.getBalance(t.from,t.blockNumber-1,function(e,s){e||a.toString(10)===s.toString(10)?GlobalNotification.warning({content:o,duration:10}):(console.log(t.transactionHash,"Removed out of gas, as balance changed"),Transactions.update({_id:n},{$set:{outOfGas:!1}}))})}):GlobalNotification.warning({content:o,duration:10})}}};observeTransactions=function(){var e=function(e){var a=0;if(!e.confirmed&&e.transactionHash)var n=function(n,o){if(console.log("updateTransactions",n,o),!n){var r=e.blockNumber&&EthBlocks.latest.number?EthBlocks.latest.number+1-e.blockNumber:0;if(a++,e=Transactions.findOne(e._id),!e)return void s.stopWatching();r=0&&(Helpers.eventLogs("Checking transaction "+e.transactionHash+". Current confirmations: "+r),web3.eth.getTransaction(e.transactionHash,function(a,n){web3.eth.getTransactionReceipt(e.transactionHash,function(a,s){!a&&s&&n&&(n.blockNumber!==e.blockNumber?t(e,n,s):n.blockNumber&&e.disabled?Transactions.update(e._id,{$unset:{disabled:""}}):n.blockNumber||Transactions.update(e._id,{$set:{disabled:!0}}))})})),(r>ethereumConfig.requiredConfirmations||a>2*ethereumConfig.requiredConfirmations)&&web3.eth.getTransaction(e.transactionHash,function(a,n){web3.eth.getTransactionReceipt(e.transactionHash,function(a,o){if(!a)if(n&&n.blockNumber)n.blockNumber&&web3.eth.getBlock(n.blockNumber,function(a,r){a||(r.hash===n.blockHash?(e.confirmed=!0,t(e,n,o),e.disabled&&Transactions.update(e._id,{$unset:{disabled:""}})):Transactions.remove(e._id),s.stopWatching())});else{var r=TAPi18n.__("wallet.transactions.error.outOfGas",{from:Helpers.getAccountNameByAddress(e.from),to:Helpers.getAccountNameByAddress(e.to)});Helpers.eventLogs(r),GlobalNotification.warning({content:r,duration:10}),Transactions.remove(e._id),s.stopWatching()}})})}},s=web3.eth.filter("latest").watch(function(t,e){n(t,e)})};collectionObservers[collectionObservers.length]=Transactions.find({}).observe({added:function(t){var a=EthBlocks.latest.number-t.blockNumber;if(Wallets.update({address:t.from},{$addToSet:{transactions:t._id}}),Wallets.update({address:t.to},{$addToSet:{transactions:t._id}}),t.operation&&checkConfirmation(Helpers.makeId("pc",t.operation)),t.confirmed||e(t),!("main"!=Session.get("network")||!t.timestamp||t.exchangeRates&&t.exchangeRates.btc&&t.exchangeRates.usd&&t.exchangeRates.eur&&t.exchangeRates.gbp&&t.exchangeRates.brl)){var n="https://min-api.cryptocompare.com/data/pricehistorical?fsym=ETH&tsyms=BTC,USD,EUR,GBP,BRL&ts="+t.timestamp;"undefined"!=typeof mist&&(n+="&extraParams=Mist-"+mist.version),HTTP.get(n,function(e,a){if(!e&&a&&200===a.statusCode){var n=JSON.parse(a.content);n&&"Error"!==n.Response&&_.each(n,function(e,a){if(e&&_.isFinite(e)){var n=a.toLowerCase(),s={};s["exchangeRates."+n]={price:String(e),timestamp:null},Transactions.update(t._id,{$set:s})}})}else console.warn("Can not connect to https://min-api.cryptocompare.com/ to get price ticker data, please check your internet connection.")})}},changed:function(t){Wallets.update({address:t.from},{$addToSet:{transactions:t._id}}),Wallets.update({address:t.to},{$addToSet:{transactions:t._id}}),t.operation&&checkConfirmation(Helpers.makeId("pc",t.operation))},removed:function(t){Wallets.update({address:t.from},{$pull:{transactions:t._id}}),Wallets.update({address:t.to},{$pull:{transactions:t._id}}),EthAccounts.update({address:t.from},{$pull:{transactions:t._id}}),EthAccounts.update({address:t.to},{$pull:{transactions:t._id}})}})}}).call(this); + +(function(){var f={full:["0x6000357c010000000000000000000000000000000000000000000000000000000090048063173825d9146100f75780632f54bf6e146101085780635c52c2f51461011d5780637065cb481461012b578063797af6271461013c578063b20d30a914610151578063b61d27f614610162578063ba51a6df1461017f578063cbf0b0c014610190578063f00d4b5d146101a1576100f15b600034116100a1576100ee565b7fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c60403373ffffffffffffffffffffffffffffffffffffffff168152602001348152602001604090036040a15b5b565b60006000f35b61010260043561049f565b60006000f35b610113600435610636565b8060005260206000f35b6101256106b0565b60006000f35b61013660043561034e565b60006000f35b610147600435610a19565b8060005260206000f35b61015c600435610678565b60006000f35b610175600435602435606460443561072d565b8060005260206000f35b61018a6004356105cf565b60006000f35b61019b6004356106e8565b60006000f35b6101af6004356024356101b5565b60006000f35b60006040600036808284378201915050604090036040206101d581610d2a565b6101de57610347565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505491506000821461021e57610224565b50610349565b61022d83610636565b6102365761023c565b50610349565b82600260005083610100811061024e57005b90900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60408573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b505050565b60406000368082843782019150506040900360402061036c81610d2a565b6103755761049a565b61037e82610636565b6103875761038d565b5061049c565b60fa60016000505410156103a0576103aa565b6103a8610ec4565b505b60fa60016000505410156103bd576103c3565b5061049c565b600160008181505480929190600101919050555081600260005060016000505461010081106103ee57005b90900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c360408373ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b50565b60006040600036808284378201915050604090036040206104bf81610d2a565b6104c8576105c9565b61010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549150600082146105085761050e565b506105cb565b6000600260005083610100811061052157005b90900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da60408473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b5050565b6040600036808284378201915050604090036040206105ed81610d2a565b6105f657610631565b816000600050819055507facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da6040838152602001604090036040a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054119050610673565b919050565b60406000368082843782019150506040900360402061069681610d2a565b61069f576106ab565b81610105600050819055505b505b50565b6040600036808284378201915050604090036040206106ce81610d2a565b6106d7576106e4565b6000610104600050819055505b505b565b60406000368082843782019150506040900360402061070681610d2a565b61070f57610728565b8173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b60006107388461117d565b61074157610808565b7f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00460403373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a18473ffffffffffffffffffffffffffffffffffffffff16846000600060008787808284378201915050600084866185025a03f16107fa57005b505060006001029050610a11565b6040600036808284378201915050604090036040209050805061082a81610a19565b15801561088a57506000610107600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61089357610a10565b84610107600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010760005060008381526020019081526020016000206000506001016000508190555082826101076000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f01602090048101928215610965579182015b82811115610964578235826000505591602001919060010190610946565b5b5090505b808211156109835760008181506000905550600101610969565b5050600050507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf3260408281526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a15b5b949350505050565b600081610a2581610d2a565b610a2e57610d23565b6000610107600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a8f57610d22565b610107600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610107600050600085815260200190815260200160002060005060010160005054600060006000610107600050600089815260200190815260200160002060005060020160005080548015610b5457820191906000526020600020905b815481529060010190602001808311610b40575b5050600084866185025a03f1610b6657005b50507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a60403373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020016101076000506000868152602001908152602001600020600050600101600050548152602001610107600050600086815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016101076000506000868152602001908152602001600020600050600201600090918254815260200182825080548015610c8157820191906000526020600020905b815481529060010190602001808311610c6d575b5050915050604090036040a1610107600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f0160209004906000526020600020908101905b80821115610d145760008181506000905550600101610cfa565b505050506001915050610d25565b5b505b919050565b6000600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054935060008414610d7457610d79565b610ebb565b610103600050600087815260200190815260200160002060009250925060008383506000016000505414610dac57610dcf565b600060005054838350600001600050819055506000838350600101600050819055505b8360020a9050600081848450600101600050541614610ded57610eba565b7fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda60403373ffffffffffffffffffffffffffffffffffffffff168152602001878152602001604090036040a16001838350600001600050541115610e7f578282506000016000818150548092919060019003919050555080838350600101600082828250541792505081905550610eb9565b6101036000506000878152602001908152602001600020600060008201600050600090556001820160005060009055505060019450610ebb565b5b5b50505050919050565b60006000600190505b600160005054811015611178575b60016000505481108015610f3a575060006002600050826101008110610efd57005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15610f4c578080600101915050610edb565b5b6001600160005054118015610fb15750600060026000506001600050546101008110610f7557005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610fd057600160008181505480929190600190039190505550610f4d565b600160005054811080156110345750600060026000506001600050546101008110610ff757005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b801561108a57506000600260005082610100811061104e57005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61109357611173565b600260005060016000505461010081106110a957005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660026000508261010081106110de57005b90900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550806101026000506000600260005084610100811061112357005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055505b610ecd565b5b5090565b60006101066000505461118e611216565b11611198576111b7565b6000610104600050819055506111ac611216565b610106600050819055505b61010460005054826101046000505401101580156111e357506101056000505482610104600050540111155b6111ec57611208565b8161010460008282825054019250508190555060019050611211565b60009050611211565b919050565b60006201518042049050611225565b9056","0x60003560e060020a90048063173825d9146100cb5780632f54bf6e146100dc5780635c52c2f5146100f15780637065cb48146100ff5780637fe6589114610110578063b20d30a914610125578063b61d27f614610136578063ba51a6df14610153578063cbf0b0c014610164578063f00d4b5d14610175576100c560003411610087576100c3565b7fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c600033600160a060020a031681526020013481526020016000a15b565b60006000f35b6100d6600435610277565b60006000f35b6100e76004356106a2565b8060005260206000f35b6100f9610248565b60006000f35b61010a600435610189565b60006000f35b61011b6004356104b6565b8060005260206000f35b61013060043561092e565b60006000f35b61014960243560443560646004356106cb565b8060005260206000f35b61015e60043561045b565b60006000f35b61016f60043561066f565b60006000f35b610183600435602435610345565b60006000f35b60006000368082843782019150506000206101a38161095d565b6101ac57610243565b6101b5826106a2565b6101be576101c4565b50610245565b60018054908160010190555081600260006001548152602001908152602001600020819055506001546003600084600160a060020a03168152602001908152602001600020819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3600083600160a060020a031681526020016000a15b505b50565b60006000368082843782019150506000206102628161095d565b61026b57610274565b60006005819055505b50565b600060006000368082843782019150506000206102938161095d565b61029c5761033f565b6003600084600160a060020a03168152602001908152602001600020549150816000146102c8576102ce565b50610341565b6000600260008481526020019081526020016000208190555060006003600085600160a060020a03168152602001908152602001600020819055507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da600084600160a060020a031681526020016000a15b505b5050565b600060006000368082843782019150506000206103618161095d565b61036a57610454565b6003600085600160a060020a03168152602001908152602001600020549150816000146103965761039c565b50610456565b6103a5836106a2565b6103ae576103b4565b50610456565b82600260008481526020019081526020016000208190555060006003600086600160a060020a0316815260200190815260200160002081905550816003600085600160a060020a03168152602001908152602001600020819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c600085600160a060020a0316815260200184600160a060020a031681526020016000a15b505b505050565b60006000368082843782019150506000206104758161095d565b61047e576104b2565b816000819055507facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da60008381526020016000a15b5050565b6000816104c28161095d565b6104cb57610668565b6008600084815260200190815260200160002054600160a060020a0316600014156104f557610667565b6008600084815260200190815260200160002054600160a060020a03166008600085815260200190815260200160002060010154600060006000600860008981526020019081526020016000206002018054801561056f57820191906000526020600020905b81548152906001019060200180831161055b575b50506000848660155a03f15050507f9429218cfc8c83da55f9eaf3044e7b5103fc2bb9a01bf70078cf2496c40c4ebf600033600160a060020a03168152602001848152602001600860008681526020019081526020016000206001015481526020016008600086815260200190815260200160002054600160a060020a03168152602001600860008681526020019081526020016000206002018054801561063357820191906000526020600020905b81548152906001019060200180831161061f575b50506000a160086000848152602001908152602001600020600081556001016000815560010160009055600191505061066a565b5b505b919050565b60006000368082843782019150506000206106898161095d565b6106925761069e565b81600160a060020a0316ff5b5050565b600060006003600084600160a060020a0316815260200190815260200160002054119050919050565b60006106d683610a79565b6106df576107a9565b7f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd004600033600160a060020a0316815260200184815260200185600160a060020a03168152602001838054801561075157820191906000526020600020905b81548152906001019060200180831161073d575b50506000a183600160a060020a031683600060006000868054801561079257820191906000526020600020905b81548152906001019060200180831161077e575b50506000848660155a03f150505060009050610927565b600060003680828437820191505060002090506107c5816104b6565b1580156107ee57506008600082815260200190815260200160002054600160a060020a03166000145b6107f757610926565b836008600083815260200190815260200160002081905550826008600083815260200190815260200160002060010181905550816008600083815260200190815260200160002060020190818054918054808355916000526020600020906000526020600020601f602080828701049185010460005b8082111561088557838101548582015560010161086d565b84019450508201935050505b808211156108a55760008155600101610891565b5050507fa2e1b6b12a6df8430c7c33911158a9e7087012ca1031dd9fa69d7a4bc449569f600082815260200133600160a060020a0316815260200184815260200185600160a060020a03168152602001838054801561092057820191906000526020600020905b81548152906001019060200180831161090c575b50506000a15b5b9392505050565b60006000368082843782019150506000206109488161095d565b61095157610959565b816006819055505b5050565b60006000600060006003600033600160a060020a031681526020019081526020016000205492508260001461099157610996565b610a71565b60046000868152602001908152602001600020915081546000146109b9576109cc565b6000548281905550600082600101819055505b8260020a9050808260010154166000146109e557610a70565b7f261c71777cbfc40a4342386d9dfc020c8b168f13b3d6f834b789f6f3083439e3600033600160a060020a031681526020018681526020016000a18154600114610a48578180549081600190039055508082600101908154179081905550610a6f565b60046000868152602001908152602001600020600081556001016000905560019350610a71565b5b5b505050919050565b6000610a84336106a2565b610a8d57610afc565b600754610a98610b02565b11610aa257610ab9565b6000600581905550610ab2610b02565b6007819055505b600554826005540110158015610ad55750600654826005540111155b610ade57610af3565b81600590815401908190555060019050610afd565b60009050610afd565b5b919050565b600062015180420490509056","0x60e060020a600035048063173825d9146100ca5780632f54bf6e146100db5780635c52c2f5146100f05780637065cb48146100fe5780637fe658911461010f578063b20d30a914610124578063b61d27f614610135578063ba51a6df1461014f578063cbf0b0c014610160578063f00d4b5d14610171576100c460003411610086576100c2565b7fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c600033600160a060020a031681526020013481526020016000a15b565b60006000f35b6100d56004356103a4565b60006000f35b6100e66004356104c3565b8060005260206000f35b6100f86101af565b60006000f35b6101096004356102ea565b60006000f35b61011a600435610778565b8060005260206000f35b61012f600435610185565b60006000f35b610145600435602435600061051a565b8060005260206000f35b61015a60043561046d565b60006000f35b61016b6004356104ec565b60006000f35b61017f6004356024356101d9565b60006000f35b60003660008237360160002061019a81610931565b6101a3576101ab565b816006819055505b5050565b6000366000823736016000206101c481610931565b6101cd576101d6565b60006005819055505b50565b60006000366000823736016000206101f081610931565b6101f9576102e3565b6003600085600160a060020a03168152602001908152602001600020549150816000146102255761022b565b506102e5565b610234836104c3565b61023d57610243565b506102e5565b82600260008481526020019081526020016000208190555060006003600086600160a060020a0316815260200190815260200160002081905550816003600085600160a060020a03168152602001908152602001600020819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c600085600160a060020a0316815260200184600160a060020a031681526020016000a15b505b505050565b6000366000823736016000206102ff81610931565b6103085761039f565b610311826104c3565b61031a57610320565b506103a1565b60018054908160010190555081600260006001548152602001908152602001600020819055506001546003600084600160a060020a03168152602001908152602001600020819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3600083600160a060020a031681526020016000a15b505b50565b60006000366000823736016000206103bb81610931565b6103c457610467565b6003600084600160a060020a03168152602001908152602001600020549150816000146103f0576103f6565b50610469565b6000600260008481526020019081526020016000208190555060006003600085600160a060020a03168152602001908152602001600020819055507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da600084600160a060020a031681526020016000a15b505b5050565b60003660008237360160002061048281610931565b61048b576104bf565b816000819055507facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da60008381526020016000a15b5050565b600060006003600084600160a060020a0316815260200190815260200160002054119050919050565b60003660008237360160002061050181610931565b61050a57610516565b81600160a060020a0316ff5b5050565b600061052583610a4d565b61052e576105f8565b7f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd004600033600160a060020a0316815260200184815260200185600160a060020a0316815260200183805480156105a057820191906000526020600020905b81548152906001019060200180831161058c575b50506000a183600160a060020a03168360006000600086805480156105e157820191906000526020600020905b8154815290600101906020018083116105cd575b50506000848660155a03f150505060009050610771565b600036600082373601600020905061060f81610778565b15801561063857506008600082815260200190815260200160002054600160a060020a03166000145b61064157610770565b836008600083815260200190815260200160002081905550826008600083815260200190815260200160002060010181905550816008600083815260200190815260200160002060020190818054918054808355916000526020600020906000526020600020601f602080828701049185010460005b808211156106cf5783810154858201556001016106b7565b84019450508201935050505b808211156106ef57600081556001016106db565b5050507fa2e1b6b12a6df8430c7c33911158a9e7087012ca1031dd9fa69d7a4bc449569f600082815260200133600160a060020a0316815260200184815260200185600160a060020a03168152602001838054801561076a57820191906000526020600020905b815481529060010190602001808311610756575b50506000a15b5b9392505050565b60008161078481610931565b61078d5761092a565b6008600084815260200190815260200160002054600160a060020a0316600014156107b757610929565b6008600084815260200190815260200160002054600160a060020a03166008600085815260200190815260200160002060010154600060006000600860008981526020019081526020016000206002018054801561083157820191906000526020600020905b81548152906001019060200180831161081d575b50506000848660155a03f15050507f9429218cfc8c83da55f9eaf3044e7b5103fc2bb9a01bf70078cf2496c40c4ebf600033600160a060020a03168152602001848152602001600860008681526020019081526020016000206001015481526020016008600086815260200190815260200160002054600160a060020a0316815260200160086000868152602001908152602001600020600201805480156108f557820191906000526020600020905b8154815290600101906020018083116108e1575b50506000a160086000848152602001908152602001600020600081556001016000815560010160009055600191505061092c565b5b505b919050565b60006000600060006003600033600160a060020a03168152602001908152602001600020549250826000146109655761096a565b610a45565b600460008681526020019081526020016000209150815460001461098d576109a0565b6000548281905550600082600101819055505b8260020a9050808260010154166000146109b957610a44565b7f261c71777cbfc40a4342386d9dfc020c8b168f13b3d6f834b789f6f3083439e3600033600160a060020a031681526020018681526020016000a18154600114610a1c578180549081600190039055508082600101908154179081905550610a43565b60046000868152602001908152602001600020600081556001016000905560019350610a45565b5b5b505050919050565b6000610a58336104c3565b610a6157610ad0565b600754610a6c610ad6565b11610a7657610a8d565b6000600581905550610a86610ad6565b6007819055505b600554826005540110158015610aa95750600654826005540111155b610ab257610ac7565b81600590815401908190555060019050610ad1565b60009050610ad1565b5b919050565b600062015180420490509056","0x6000357c010000000000000000000000000000000000000000000000000000000090048063173825d9146100fe5780632f54bf6e146101155780635c52c2f5146101305780637065cb4814610141578063797af62714610158578063b20d30a914610173578063b61d27f61461018a578063b75c7dc6146101bc578063ba51a6df146101d3578063cbf0b0c0146101ea578063f00d4b5d14610201576100f85b60003411156100f5577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c60403373ffffffffffffffffffffffffffffffffffffffff168152602001348152602001604090036040a15b5b565b60006000f35b61010f6004803590602001506105e9565b60006000f35b61012660048035906020015061079a565b8060005260206000f35b61013b600450610810565b60006000f35b6101526004803590602001506104ab565b60006000f35b610169600480359060200150610b6f565b8060005260206000f35b6101846004803590602001506107dc565b60006000f35b6101b26004803590602001803590602001803590602001906004018035906020019150610885565b8060005260206000f35b6101cd60048035906020015061021e565b60006000f35b6101e460048035906020015061071c565b60006000f35b6101fb600480359060200150610844565b60006000f35b610218600480359060200180359060200150610321565b60006000f35b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054935060008414156102675761031a565b8360020a925061010360005060008681526020019081526020016000206000915091506000838383506001016000505416111561031957818150600001600081815054809291906001019190505550828282506001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b60403373ffffffffffffffffffffffffffffffffffffffff168152602001868152602001604090036040a15b5b5050505050565b600060406000368082843782019150506040900360402061034181610e78565b156104a45761034f8361079a565b1561035a57506104a6565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549150600082141561039c57506104a6565b6103a4611315565b8273ffffffffffffffffffffffffffffffffffffffff1660026000508361010081106103cc57005b90900160005081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60408573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b505050565b6040600036808284378201915050604090036040206104c981610e78565b156105e4576104d78261079a565b156104e257506105e6565b6104ea611315565b60fa600160005054101515610503576105016110db565b505b60fa60016000505410151561051857506105e6565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff166002600050600160005054610100811061055957005b9090016000508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c360408373ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b50565b600060406000368082843782019150506040900360402061060981610e78565b156107165761010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156106505750610718565b600160016000505403600060005054111561066b5750610718565b6000600260005083610100811061067e57005b90900160005081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055506106c6611315565b6106ce6110db565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da60408473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b5050565b60406000368082843782019150506040900360402061073a81610e78565b15610795576001600050548211156107525750610797565b81600060005081905550610764611315565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da6040838152602001604090036040a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050541190506107d7565b919050565b6040600036808284378201915050604090036040206107fa81610e78565b1561080b5781610106600050819055505b505b50565b60406000368082843782019150506040900360402061082e81610e78565b15610840576000610105600050819055505b505b565b60406000368082843782019150506040900360402061086281610e78565b15610880578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b600061089084611275565b1561095c577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00460403373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a18473ffffffffffffffffffffffffffffffffffffffff16846000600060008787808284378201915050600084866185025a03f161094e57005b505060006001029050610b67565b6040600036808284378201915050438152602001604090036040209050805061098481610b6f565b1580156109e457506000610108600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610b665784610108600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010860005060008381526020019081526020016000206000506001016000508190555082826101086000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f01602090048101928215610abb579182015b82811115610aba578235826000505591602001919060010190610a9c565b5b5090505b80821115610ad95760008181506000905550600101610abf565b5050600050507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf3260408281526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a15b5b949350505050565b600081610b7b81610e78565b15610e71576000610108600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610e7057610108600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610108600050600085815260200190815260200160002060005060010160005054600060006000610108600050600089815260200190815260200160002060005060020160005080548015610ca257820191906000526020600020905b815481529060010190602001808311610c8e575b5050600084866185025a03f1610cb457005b50507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a60403373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020016101086000506000868152602001908152602001600020600050600101600050548152602001610108600050600086815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016101086000506000868152602001908152602001600020600050600201600090918254815260200182825080548015610dcf57820191906000526020600020905b815481529060010190602001808311610dbb575b5050915050604090036040a1610108600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f0160209004906000526020600020908101905b80821115610e625760008181506000905550600101610e48565b505050506001915050610e73565b5b505b919050565b6000600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505493506000841415610ec3576110d2565b61010360005060008781526020019081526020016000206000925092506000838350600001600050541415610f9b576000600050548383506000016000508190555060008383506001016000508190555061010460005080548091906001019090815481835581811511610f5d578183600052602060002091820191015b80821115610f5b5760008181506000905550600101610f41565b505b50505083835060020160005081905550856101046000508484506002016000505481548110610f8857005b9060005260206000209001600050819055505b8360020a9050600081848450600101600050541614156110d1577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda60403373ffffffffffffffffffffffffffffffffffffffff168152602001878152602001604090036040a16001838350600001600050541115156110a0576101046000506101036000506000888152602001908152602001600020600050600201600050548154811061104557005b906000526020600020900160005060009055610103600050600087815260200190815260200160002060006000820160005060009055600182016000506000905560028201600050600090555050600194506110d2566110d0565b82825060000160008181505480929190600190039190505550808383506001016000828282505417925050819055505b5b5b50505050919050565b60006000600190505b600160005054811015611270575b6001600050548110801561111e57506000600260005082610100811061111457005b9090016000505414155b156111305780806001019150506110f2565b5b6001600160005054118015611162575060006002600050600160005054610100811061115957005b90900160005054145b1561118157600160008181505480929190600190039190505550611131565b600160005054811080156111b257506000600260005060016000505461010081106111a857005b9090016000505414155b80156111d55750600060026000508261010081106111cc57005b90900160005054145b1561126b57600260005060016000505461010081106111f057005b90900160005054600260005082610100811061120857005b90900160005081905550806101026000506000600260005084610100811061122c57005b9090016000505481526020019081526020016000206000508190555060006002600050600160005054610100811061126057005b909001600050819055505b6110e4565b5b5090565b60006112803361079a565b1561130f57610107600050546112946114df565b11156112b9576000610105600050819055506112ae6114df565b610107600050819055505b61010560005054826101056000505401101580156112e557506101066000505482610105600050540111155b15611306578161010560008282825054019250508190555060019050611310565b60009050611310565b5b919050565b60006000610104600050549150600090505b818110156113e7576101086000506000610104600050838154811061134857005b906000526020600020900160005054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f0160209004906000526020600020908101905b808211156113d557600081815060009055506001016113bb565b505050505b8060010190508050611327565b6113ef6113f4565b5b5050565b60006000610104600050549150600090505b818110156114a4576000600102610104600050828154811061142457005b906000526020600020900160005054141515611496576101036000506000610104600050838154811061145357005b9060005260206000209001600050548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b8060010190508050611406565b610104600050805460008255906000526020600020908101905b808211156114d857600081815060009055506001016114be565b50505b5050565b600062015180420490506114ee565b9056","0x6000357c010000000000000000000000000000000000000000000000000000000090048063173825d91461011f5780632f54bf6e146101365780634123cb6b146101515780635c52c2f5146101665780637065cb4814610177578063746c91711461018e578063797af627146101a3578063b20d30a9146101be578063b61d27f6146101d5578063b75c7dc614610207578063ba51a6df1461021e578063cbf0b0c014610235578063f00d4b5d1461024c578063f1736d8614610269576101195b6000341115610116577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c60403373ffffffffffffffffffffffffffffffffffffffff168152602001348152602001604090036040a15b5b565b60006000f35b610130600480359060200150610cb5565b60006000f35b610147600480359060200150610e71565b8060005260206000f35b61015c600450610287565b8060005260206000f35b610171600450610ef7565b60006000f35b610188600480359060200150610b72565b60006000f35b61019960045061027e565b8060005260206000f35b6101b46004803590602001506105cc565b8060005260206000f35b6101cf600480359060200150610ebd565b60006000f35b6101fd60048035906020018035906020018035906020019060040180359060200191506102d7565b8060005260206000f35b6102186004803590602001506108e0565b60006000f35b61022f600480359060200150610ded565b60006000f35b610246600480359060200150610290565b60006000f35b6102636004803590602001803590602001506109e3565b60006000f35b610274600450610eb3565b8060005260206000f35b60006000505481565b60016000505481565b6040600036808284378201915050438152602001604090036040206102b4816110bb565b156102d2578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b60006102e284610f31565b156103ad577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00460403373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a18473ffffffffffffffffffffffffffffffffffffffff16846000600060008787808284378201915050600084866185025a03f115610002575050600060010290506105c4565b604060003680828437820191505043815260200160409003604020905080506103d5816105cc565b15801561043557506000610108600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156105c35784610108600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010860005060008381526020019081526020016000206000506001016000508190555082826101086000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f0160209004810192821561050c579182015b8281111561050b5782358260005055916020019190600101906104ed565b5b5090506105379190610519565b808211156105335760008181506000905550600101610519565b5090565b50600050507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf3260408281526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a15b5b949350505050565b6000816105d8816110bb565b156108d9576000610108600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156108d857610108600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166101086000506000858152602001908152602001600020600050600101600050546000600060006101086000506000898152602001908152602001600020600050600201600050805480156106ff57820191906000526020600020905b8154815290600101906020018083116106eb575b5050600084866185025a03f1156100025750507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a60403373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020016101086000506000868152602001908152602001600020600050600101600050548152602001610108600050600086815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001610108600050600086815260200190815260200160002060005060020160009091825481526020018282508054801561082b57820191906000526020600020905b815481529060010190602001808311610817575b5050915050604090036040a1610108600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f0160209004906000526020600020908101906108cb91906108ad565b808211156108c757600081815060009055506001016108ad565b5090565b50505060019150506108db565b5b505b919050565b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505493506000841415610929576109dc565b8360020a92506101036000506000868152602001908152602001600020600091509150600083838350600101600050541611156109db57818150600001600081815054809291906001019190505550828282506001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b60403373ffffffffffffffffffffffffffffffffffffffff168152602001868152602001604090036040a15b5b5050505050565b6000604060003680828437820191505043815260200160409003604020610a09816110bb565b15610b6b57610a1783610e71565b15610a225750610b6d565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505491506000821415610a645750610b6d565b610a6c610fd1565b8273ffffffffffffffffffffffffffffffffffffffff166002600050836101008110156100025790900160005081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60408573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b505050565b604060003680828437820191505043815260200160409003604020610b96816110bb565b15610cb057610ba482610e71565b15610baf5750610cb2565b610bb7610fd1565b60fa600160005054101515610bd057610bce611328565b505b60fa600160005054101515610be55750610cb2565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff166002600050600160005054610100811015610002579090016000508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c360408373ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b50565b6000604060003680828437820191505043815260200160409003604020610cdb816110bb565b15610de75761010260005060008473ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505491506000821415610d225750610de9565b6001600160005054036000600050541115610d3d5750610de9565b60006002600050836101008110156100025790900160005081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550610d97610fd1565b610d9f611328565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da60408473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b5050565b604060003680828437820191505043815260200160409003604020610e11816110bb565b15610e6c57600160005054821115610e295750610e6e565b81600060005081905550610e3b610fd1565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da6040838152602001604090036040a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054119050610eae565b919050565b6101066000505481565b604060003680828437820191505043815260200160409003604020610ee1816110bb565b15610ef25781610106600050819055505b505b50565b604060003680828437820191505043815260200160409003604020610f1b816110bb565b15610f2d576000610105600050819055505b505b565b6000610f3c33610e71565b15610fcb5761010760005054610f506114ba565b1115610f7557600061010560005081905550610f6a6114ba565b610107600050819055505b6101056000505482610105600050540110158015610fa157506101066000505482610105600050540111155b15610fc2578161010560008282825054019250508190555060019050610fcc565b60009050610fcc565b5b919050565b60006000610104600050549150600090505b818110156110ae57610108600050600061010460005083815481101561000257906000526020600020900160005054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f01602090049060005260206000209081019061109d919061107f565b80821115611099576000818150600090555060010161107f565b5090565b5050505b8060010190508050610fe3565b6110b66114cc565b5b5050565b6000600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054935060008414156111065761131f565b610103600050600087815260200190815260200160002060009250925060008383506000016000505414156111e95760006000505483835060000160005081905550600083835060010160005081905550610104600050805480919060010190908154818355818115116111ac578183600052602060002091820191016111ab919061118d565b808211156111a7576000818150600090555060010161118d565b5090565b5b5050508383506002016000508190555085610104600050848450600201600050548154811015610002579060005260206000209001600050819055505b8360020a90506000818484506001016000505416141561131e577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda60403373ffffffffffffffffffffffffffffffffffffffff168152602001878152602001604090036040a16001838350600001600050541115156112ed576101046000506101036000506000888152602001908152602001600020600050600201600050548154811015610002579060005260206000209001600050600090556101036000506000878152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550506001945061131f5661131d565b82825060000160008181505480929190600190039190505550808383506001016000828282505417925050819055505b5b5b50505050919050565b60006000600190505b6001600050548110156114b5575b6001600050548110801561136a57506000600260005082610100811015610002579090016000505414155b1561137c57808060010191505061133f565b5b60016001600050541180156113ad5750600060026000506001600050546101008110156100025790900160005054145b156113cc5760016000818150548092919060019003919050555061137d565b600160005054811080156113fc575060006002600050600160005054610100811015610002579090016000505414155b801561141e575060006002600050826101008110156100025790900160005054145b156114b05760026000506001600050546101008110156100025790900160005054600260005082610100811015610002579090016000508190555080610102600050600060026000508461010081101561000257909001600050548152602001908152602001600020600050819055506000600260005060016000505461010081101561000257909001600050819055505b611331565b5b5090565b600062015180420490506114c9565b90565b60006000610104600050549150600090505b8181101561157a5760006001026101046000508281548110156100025790600052602060002090016000505414151561156c576101036000506000610104600050838154811015610002579060005260206000209001600050548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b80600101905080506114de565b610104600050805460008255906000526020600020908101906115bb919061159d565b808211156115b7576000818150600090555060010161159d565b5090565b505b505056","0x6000357c010000000000000000000000000000000000000000000000000000000090048063173825d91461011f5780632f54bf6e146101365780634123cb6b146101515780635c52c2f5146101665780637065cb4814610177578063746c91711461018e578063797af627146101a3578063b20d30a9146101be578063b61d27f6146101d5578063b75c7dc614610207578063ba51a6df1461021e578063cbf0b0c014610235578063f00d4b5d1461024c578063f1736d8614610269576101195b6000341115610116577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c60403373ffffffffffffffffffffffffffffffffffffffff168152602001348152602001604090036040a15b5b565b60006000f35b610130600480359060200150610665565b60006000f35b610147600480359060200150610821565b8060005260206000f35b61015c600450610287565b8060005260206000f35b6101716004506108a7565b60006000f35b610188600480359060200150610522565b60006000f35b61019960045061027e565b8060005260206000f35b6101b4600480359060200150610c1d565b8060005260206000f35b6101cf60048035906020015061086d565b60006000f35b6101fd6004803590602001803590602001803590602001906004018035906020019150610928565b8060005260206000f35b610218600480359060200150610290565b60006000f35b61022f60048035906020015061079d565b60006000f35b6102466004803590602001506108e1565b60006000f35b610263600480359060200180359060200150610393565b60006000f35b610274600450610863565b8060005260206000f35b60006000505481565b60016000505481565b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054935060008414156102d95761038c565b8360020a925061010360005060008681526020019081526020016000206000915091506000838383506001016000505416111561038b57818150600001600081815054809291906001019190505550828282506001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b60403373ffffffffffffffffffffffffffffffffffffffff168152602001868152602001604090036040a15b5b5050505050565b60006040600036808284378201915050438152602001604090036040206103b981610f31565b1561051b576103c783610821565b156103d2575061051d565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505491506000821415610414575061051d565b61041c6113d0565b8273ffffffffffffffffffffffffffffffffffffffff166002600050836101008110156100025790900160005081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60408573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b505050565b60406000368082843782019150504381526020016040900360402061054681610f31565b156106605761055482610821565b1561055f5750610662565b6105676113d0565b60fa6001600050541015156105805761057e61119e565b505b60fa6001600050541015156105955750610662565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff166002600050600160005054610100811015610002579090016000508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c360408373ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b50565b600060406000368082843782019150504381526020016040900360402061068b81610f31565b156107975761010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156106d25750610799565b60016001600050540360006000505411156106ed5750610799565b60006002600050836101008110156100025790900160005081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055506107476113d0565b61074f61119e565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da60408473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b5050565b6040600036808284378201915050438152602001604090036040206107c181610f31565b1561081c576001600050548211156107d9575061081e565b816000600050819055506107eb6113d0565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da6040838152602001604090036040a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505411905061085e565b919050565b6101066000505481565b60406000368082843782019150504381526020016040900360402061089181610f31565b156108a25781610106600050819055505b505b50565b6040600036808284378201915050438152602001604090036040206108cb81610f31565b156108dd576000610105600050819055505b505b565b60406000368082843782019150504381526020016040900360402061090581610f31565b15610923578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b600061093384611330565b156109fe577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00460403373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a18473ffffffffffffffffffffffffffffffffffffffff16846000600060008787808284378201915050600084866185025a03f11561000257505060006001029050610c15565b60406000368082843782019150504381526020016040900360402090508050610a2681610c1d565b158015610a8657506000610108600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610c145784610108600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010860005060008381526020019081526020016000206000506001016000508190555082826101086000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f01602090048101928215610b5d579182015b82811115610b5c578235826000505591602001919060010190610b3e565b5b509050610b889190610b6a565b80821115610b845760008181506000905550600101610b6a565b5090565b50600050507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf3260408281526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a15b5b949350505050565b600081610c2981610f31565b15610f2a576000610108600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610f2957610108600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610108600050600085815260200190815260200160002060005060010160005054600060006000610108600050600089815260200190815260200160002060005060020160005080548015610d5057820191906000526020600020905b815481529060010190602001808311610d3c575b5050600084866185025a03f1156100025750507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a60403373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020016101086000506000868152602001908152602001600020600050600101600050548152602001610108600050600086815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016101086000506000868152602001908152602001600020600050600201600090918254815260200182825080548015610e7c57820191906000526020600020905b815481529060010190602001808311610e68575b5050915050604090036040a1610108600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f016020900490600052602060002090810190610f1c9190610efe565b80821115610f185760008181506000905550600101610efe565b5090565b5050506001915050610f2c565b5b505b919050565b6000600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505493506000841415610f7c57611195565b6101036000506000878152602001908152602001600020600092509250600083835060000160005054141561105f576000600050548383506000016000508190555060008383506001016000508190555061010460005080548091906001019090815481835581811511611022578183600052602060002091820191016110219190611003565b8082111561101d5760008181506000905550600101611003565b5090565b5b5050508383506002016000508190555085610104600050848450600201600050548154811015610002579060005260206000209001600050819055505b8360020a905060008184845060010160005054161415611194577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda60403373ffffffffffffffffffffffffffffffffffffffff168152602001878152602001604090036040a1600183835060000160005054111515611163576101046000506101036000506000888152602001908152602001600020600050600201600050548154811015610002579060005260206000209001600050600090556101036000506000878152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550506001945061119556611193565b82825060000160008181505480929190600190039190505550808383506001016000828282505417925050819055505b5b5b50505050919050565b60006000600190505b60016000505481101561132b575b600160005054811080156111e057506000600260005082610100811015610002579090016000505414155b156111f25780806001019150506111b5565b5b60016001600050541180156112235750600060026000506001600050546101008110156100025790900160005054145b15611242576001600081815054809291906001900391905055506111f3565b60016000505481108015611272575060006002600050600160005054610100811015610002579090016000505414155b8015611294575060006002600050826101008110156100025790900160005054145b156113265760026000506001600050546101008110156100025790900160005054600260005082610100811015610002579090016000508190555080610102600050600060026000508461010081101561000257909001600050548152602001908152602001600020600050819055506000600260005060016000505461010081101561000257909001600050819055505b6111a7565b5b5090565b600061133b33610821565b156113ca576101076000505461134f6115af565b1115611374576000610105600050819055506113696115af565b610107600050819055505b61010560005054826101056000505401101580156113a057506101066000505482610105600050540111155b156113c15781610105600082828250540192505081905550600190506113cb565b600090506113cb565b5b919050565b60006000610104600050549150600090505b818110156114ad57610108600050600061010460005083815481101561000257906000526020600020900160005054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f01602090049060005260206000209081019061149c919061147e565b80821115611498576000818150600090555060010161147e565b5090565b5050505b80600101905080506113e2565b6114b56114ba565b5b5050565b60006000610104600050549150600090505b818110156115685760006001026101046000508281548110156100025790600052602060002090016000505414151561155a576101036000506000610104600050838154811015610002579060005260206000209001600050548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b80600101905080506114cc565b610104600050805460008255906000526020600020908101906115a9919061158b565b808211156115a5576000818150600090555060010161158b565b5090565b505b5050565b600062015180420490506115be565b9056","0x6000357c010000000000000000000000000000000000000000000000000000000090048063173825d91461012a5780632f54bf6e146101415780634123cb6b1461015c5780635c52c2f5146101715780637065cb4814610182578063746c917114610199578063797af627146101ae578063b20d30a9146101c9578063b61d27f6146101e0578063b75c7dc614610212578063ba51a6df14610229578063c2cf732614610240578063cbf0b0c014610261578063f00d4b5d14610278578063f1736d8614610295576101245b6000341115610121577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c60403373ffffffffffffffffffffffffffffffffffffffff168152602001348152602001604090036040a15b5b565b60006000f35b61013b60048035906020015061058e565b60006000f35b61015260048035906020015061074a565b8060005260206000f35b6101676004506102b3565b8060005260206000f35b61017c600450610877565b60006000f35b61019360048035906020015061044b565b60006000f35b6101a46004506102aa565b8060005260206000f35b6101bf600480359060200150610bed565b8060005260206000f35b6101da60048035906020015061083d565b60006000f35b61020860048035906020018035906020018035906020019060040180359060200191506108f8565b8060005260206000f35b610223600480359060200150610f01565b60006000f35b61023a6004803590602001506106c6565b60006000f35b61025760048035906020018035906020015061078c565b8060005260206000f35b6102726004803590602001506108b1565b60006000f35b61028f6004803590602001803590602001506102bc565b60006000f35b6102a0600450610833565b8060005260206000f35b60006000505481565b60016000505481565b60006040600036808284378201915050438152602001604090036040206102e281611320565b15610444576102f08361074a565b156102fb5750610446565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549150600082141561033d5750610446565b610345611236565b8273ffffffffffffffffffffffffffffffffffffffff166002600050836101008110156100025790900160005081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60408573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b505050565b60406000368082843782019150504381526020016040900360402061046f81611320565b156105895761047d8261074a565b15610488575061058b565b610490611236565b60fa6001600050541015156104a9576104a7611004565b505b60fa6001600050541015156104be575061058b565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff166002600050600160005054610100811015610002579090016000508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c360408373ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b50565b60006040600036808284378201915050438152602001604090036040206105b481611320565b156106c05761010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156105fb57506106c2565b600160016000505403600060005054111561061657506106c2565b60006002600050836101008110156100025790900160005081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550610670611236565b610678611004565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da60408473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b5050565b6040600036808284378201915050438152602001604090036040206106ea81611320565b15610745576001600050548211156107025750610747565b81600060005081905550610714611236565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da6040838152602001604090036040a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054119050610787565b919050565b60006000600060006000610103600050600088815260200190815260200160002060009350935061010260005060008773ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156107f85760009450610829565b8160020a90506000818585506001016000505416141561081f576000945061082956610828565b60019450610829565b5b5050505092915050565b6101066000505481565b60406000368082843782019150504381526020016040900360402061086181611320565b156108725781610106600050819055505b505b50565b60406000368082843782019150504381526020016040900360402061089b81611320565b156108ad576000610105600050819055505b505b565b6040600036808284378201915050438152602001604090036040206108d581611320565b156108f3578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b600061090384611196565b156109ce577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00460403373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a18473ffffffffffffffffffffffffffffffffffffffff16846000600060008787808284378201915050600084866185025a03f11561000257505060006001029050610be5565b604060003680828437820191505043815260200160409003604020905080506109f681610bed565b158015610a5657506000610108600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610be45784610108600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010860005060008381526020019081526020016000206000506001016000508190555082826101086000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f01602090048101928215610b2d579182015b82811115610b2c578235826000505591602001919060010190610b0e565b5b509050610b589190610b3a565b80821115610b545760008181506000905550600101610b3a565b5090565b50600050507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf3260408281526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a15b5b949350505050565b600081610bf981611320565b15610efa576000610108600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610ef957610108600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610108600050600085815260200190815260200160002060005060010160005054600060006000610108600050600089815260200190815260200160002060005060020160005080548015610d2057820191906000526020600020905b815481529060010190602001808311610d0c575b5050600084866185025a03f1156100025750507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a60403373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020016101086000506000868152602001908152602001600020600050600101600050548152602001610108600050600086815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016101086000506000868152602001908152602001600020600050600201600090918254815260200182825080548015610e4c57820191906000526020600020905b815481529060010190602001808311610e38575b5050915050604090036040a1610108600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f016020900490600052602060002090810190610eec9190610ece565b80821115610ee85760008181506000905550600101610ece565b5090565b5050506001915050610efc565b5b505b919050565b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505493506000841415610f4a57610ffd565b8360020a9250610103600050600086815260200190815260200160002060009150915060008383835060010160005054161115610ffc57818150600001600081815054809291906001019190505550828282506001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b60403373ffffffffffffffffffffffffffffffffffffffff168152602001868152602001604090036040a15b5b5050505050565b60006000600190505b600160005054811015611191575b6001600050548110801561104657506000600260005082610100811015610002579090016000505414155b1561105857808060010191505061101b565b5b60016001600050541180156110895750600060026000506001600050546101008110156100025790900160005054145b156110a857600160008181505480929190600190039190505550611059565b600160005054811080156110d8575060006002600050600160005054610100811015610002579090016000505414155b80156110fa575060006002600050826101008110156100025790900160005054145b1561118c5760026000506001600050546101008110156100025790900160005054600260005082610100811015610002579090016000508190555080610102600050600060026000508461010081101561000257909001600050548152602001908152602001600020600050819055506000600260005060016000505461010081101561000257909001600050819055505b61100d565b5b5090565b60006111a13361074a565b1561123057610107600050546111b5611682565b11156111da576000610105600050819055506111cf611682565b610107600050819055505b610105600050548261010560005054011015801561120657506101066000505482610105600050540111155b15611227578161010560008282825054019250508190555060019050611231565b60009050611231565b5b919050565b60006000610104600050549150600090505b8181101561131357610108600050600061010460005083815481101561000257906000526020600020900160005054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f01602090049060005260206000209081019061130291906112e4565b808211156112fe57600081815060009055506001016112e4565b5090565b5050505b8060010190508050611248565b61131b61158d565b5b5050565b6000600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549350600084141561136b57611584565b6101036000506000878152602001908152602001600020600092509250600083835060000160005054141561144e5760006000505483835060000160005081905550600083835060010160005081905550610104600050805480919060010190908154818355818115116114115781836000526020600020918201910161141091906113f2565b8082111561140c57600081815060009055506001016113f2565b5090565b5b5050508383506002016000508190555085610104600050848450600201600050548154811015610002579060005260206000209001600050819055505b8360020a905060008184845060010160005054161415611583577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda60403373ffffffffffffffffffffffffffffffffffffffff168152602001878152602001604090036040a1600183835060000160005054111515611552576101046000506101036000506000888152602001908152602001600020600050600201600050548154811015610002579060005260206000209001600050600090556101036000506000878152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550506001945061158456611582565b82825060000160008181505480929190600190039190505550808383506001016000828282505417925050819055505b5b5b50505050919050565b60006000610104600050549150600090505b8181101561163b5760006001026101046000508281548110156100025790600052602060002090016000505414151561162d576101036000506000610104600050838154811015610002579060005260206000209001600050548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b806001019050805061159f565b6101046000508054600082559060005260206000209081019061167c919061165e565b80821115611678576000818150600090555060010161165e565b5090565b505b5050565b60006201518042049050611691565b9056","0x606060405236156100d7576000357c010000000000000000000000000000000000000000000000000000000090048063173825d91461013f5780632f54bf6e146101525780634123cb6b146101795780635c52c2f51461019a5780637065cb48146101a7578063746c9171146101ba578063797af627146101db578063b20d30a914610202578063b61d27f614610215578063b75c7dc614610253578063ba51a6df14610266578063c2cf732614610279578063cbf0b0c0146102a6578063f00d4b5d146102b9578063f1736d86146102d2576100d7565b61013d5b600034111561013a577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3334604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b565b005b6101506004803590602001506106ed565b005b6101636004803590602001506108cd565b6040518082815260200191505060405180910390f35b6101846004506109b9565b6040518082815260200191505060405180910390f35b6101a5600450610a07565b005b6101b8600480359060200150610598565b005b6101c56004506109b0565b6040518082815260200191505060405180910390f35b6101ec600480359060200150610de9565b6040518082815260200191505060405180910390f35b6102136004803590602001506109c2565b005b61023d6004803590602001803590602001803590602001906004018035906020019150610aa8565b6040518082815260200191505060405180910390f35b6102646004803590602001506102f3565b005b610277600480359060200150610837565b005b61029060048035906020018035906020015061090f565b6040518082815260200191505060405180910390f35b6102b7600480359060200150610a56565b005b6102d06004803590602001803590602001506103f5565b005b6102dd600450610a4c565b6040518082815260200191505060405180910390f35b60006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549250600083141561033a576103ef565b8260020a91506101036000506000858152602001908152602001600020600050905060008282600101600050541611156103ee578060000160008181505480929190600101919050555081816001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b3385604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b50505050565b600060003643604051808484808284378201915050828152602001935050505060405180910390206104268161112b565b1561059157610434836108cd565b1561043f5750610593565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156104815750610593565b6104896115bd565b8273ffffffffffffffffffffffffffffffffffffffff166002600050836101008110156100025790900160005081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c8484604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b505b505050565b60003643604051808484808284378201915050828152602001935050505060405180910390206105c78161112b565b156106e8576105d5826108cd565b156105e057506106ea565b6105e86115bd565b60fa600160005054101515610601576105ff61138b565b505b60fa60016000505410151561061657506106ea565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff166002600050600160005054610100811015610002579090016000508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c382604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b505b50565b6000600036436040518084848082843782019150508281526020019350505050604051809103902061071e8161112b565b156108315761010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156107655750610833565b60016001600050540360006000505411156107805750610833565b60006002600050836101008110156100025790900160005081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055506107da6115bd565b6107e261138b565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da83604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b505b5050565b60003643604051808484808284378201915050828152602001935050505060405180910390206108668161112b565b156108c85760016000505482111561087e57506108ca565b816000600050819055506108906115bd565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da826040518082815260200191505060405180910390a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505411905061090a565b919050565b60006000600060006101036000506000878152602001908152602001600020600050925061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549150600082141561097857600093506109a7565b8160020a9050600081846001016000505416141561099d57600093506109a7566109a6565b600193506109a7565b5b50505092915050565b60006000505481565b60016000505481565b60003643604051808484808284378201915050828152602001935050505060405180910390206109f18161112b565b15610a025781610105600050819055505b505b50565b6000364360405180848480828437820191505082815260200193505050506040518091039020610a368161112b565b15610a48576000610106600050819055505b505b565b6101056000505481565b6000364360405180848480828437820191505082815260200193505050506040518091039020610a858161112b565b15610aa3578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b6000610ab3336108cd565b15610de057610ac18461151d565b15610baa577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd0043385878686604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a18473ffffffffffffffffffffffffffffffffffffffff168484846040518083838082843782019150509250505060006040518083038185876185025a03f1925050505060006001029050610de1565b600036436040518084848082843782019150508281526020019350505050604051809103902090508050610bdd81610de9565b158015610c3d57506000610108600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610ddf5784610108600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010860005060008381526020019081526020016000206000506001016000508190555082826101086000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f01602090048101928215610d14579182015b82811115610d13578235826000505591602001919060010190610cf5565b5b509050610d3f9190610d21565b80821115610d3b5760008181506000905550600101610d21565b5090565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf32813386888787604051808781526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b5b5b949350505050565b600081610df58161112b565b15611124576000610108600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561112357610108600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166101086000506000858152602001908152602001600020600050600101600050546101086000506000868152602001908152602001600020600050600201600050604051808280548015610f2457820191906000526020600020905b815481529060010190602001808311610f0757829003601f168201915b505091505060006040518083038185876185025a03f192505050507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a3384610108600050600087815260200190815260200160002060005060010160005054610108600050600088815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166101086000506000898152602001908152602001600020600050600201600050604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818154815260200191508054801561107057820191906000526020600020905b81548152906001019060200180831161105357829003601f168201915b5050965050505050505060405180910390a1610108600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f01602090049060005260206000209081019061111691906110f8565b8082111561111257600081815060009055506001016110f8565b5090565b5050506001915050611126565b5b505b919050565b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549250600083141561117457611383565b6101036000506000868152602001908152602001600020600050915060008260000160005054141561124c57600060005054826000016000508190555060008260010160005081905550610104600050805480919060010190908154818355818115116112135781836000526020600020918201910161121291906111f4565b8082111561120e57600081815060009055506001016111f4565b5090565b5b50505082600201600050819055508461010460005083600201600050548154811015610002579060005260206000209001600050819055505b8260020a90506000818360010160005054161415611382577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda3386604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a160018260000160005054111515611355576101046000506101036000506000878152602001908152602001600020600050600201600050548154811015610002579060005260206000209001600050600090556101036000506000868152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550506001935061138356611381565b816000016000818150548092919060019003919050555080826001016000828282505417925050819055505b5b5b505050919050565b60006000600190505b600160005054811015611518575b600160005054811080156113cd57506000600260005082610100811015610002579090016000505414155b156113df5780806001019150506113a2565b5b60016001600050541180156114105750600060026000506001600050546101008110156100025790900160005054145b1561142f576001600081815054809291906001900391905055506113e0565b6001600050548110801561145f575060006002600050600160005054610100811015610002579090016000505414155b8015611481575060006002600050826101008110156100025790900160005054145b156115135760026000506001600050546101008110156100025790900160005054600260005082610100811015610002579090016000508190555080610102600050600060026000508461010081101561000257909001600050548152602001908152602001600020600050819055506000600260005060016000505461010081101561000257909001600050819055505b611394565b5b5090565b6000611528336108cd565b156115b7576101076000505461153c61179c565b11156115615760006101066000508190555061155661179c565b610107600050819055505b610106600050548261010660005054011015801561158d57506101056000505482610106600050540111155b156115ae5781610106600082828250540192505081905550600190506115b8565b600090506115b8565b5b919050565b60006000610104600050549150600090505b8181101561169a57610108600050600061010460005083815481101561000257906000526020600020900160005054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f016020900490600052602060002090810190611689919061166b565b80821115611685576000818150600090555060010161166b565b5090565b5050505b80600101905080506115cf565b6116a26116a7565b5b5050565b60006000610104600050549150600090505b8181101561175557600060010261010460005082815481101561000257906000526020600020900160005054141515611747576101036000506000610104600050838154811015610002579060005260206000209001600050548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b80600101905080506116b9565b610104600050805460008255906000526020600020908101906117969190611778565b808211156117925760008181506000905550600101611778565b5090565b505b5050565b600062015180420490506117ab565b9056","0x606060405236156100b95760e060020a6000350463173825d9811461010b5780632f54bf6e146101665780634123cb6b1461018e5780635c52c2f5146101975780637065cb48146101c8578063746c9171146101fc578063797af62714610205578063b20d30a914610218578063b61d27f61461024c578063b75c7dc61461026d578063ba51a6df1461029c578063c2cf7326146102d0578063cbf0b0c01461030e578063f00d4b5d14610342578063f1736d861461037b575b61038560003411156101095760408051600160a060020a033216815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b565b6103856004356000600036436040518084848082843750505090910190815260405190819003602001902090506105e9815b600160a060020a03321660009081526101026020526040812054818082811415610c0357610d5b565b6103876004355b600160a060020a03811660009081526101026020526040812054115b919050565b61038760015481565b610385600036436040518084848082843750505090910190815260405190819003602001902090506103aa8161013d565b610385600435600036436040518084848082843750505090910190815260405190819003602001902090506103c98161013d565b61038760005481565b6103876004355b6000816109738161013d565b610385600435600036436040518084848082843750505090910190815260405190819003602001902090506103998161013d565b61038760048035906024803591604435918201910135600061072f3261016d565b610385600435600160a060020a03321660009081526101026020526040812054908082811415610564576105e3565b610385600435600036436040518084848082843750505090910190815260405190819003602001902090506106a98161013d565b610387600435602435600082815261010360209081526040808320600160a060020a0385168452610102909252822054828181141561070257610726565b610385600435600036436040518084848082843750505090910190815260405190819003602001902090506103b88161013d565b610385600435602435600060003643604051808484808284375050509091019081526040519081900360200190209050610b358161013d565b6103876101055481565b005b60408051918252519081900360200190f35b156103a5576101058290555b505b50565b156103a75760006101065550565b156103a55781600160a060020a0316ff5b156103a5576103d78261016d565b156103e257506103a7565b6104605b6101045460005b81811015610ea857610104805461010891600091849081101561000257600080516020610f6383398151915201548252506020918252604081208054600160a060020a0319168155600181018290556002810180548382559083528383209193610f2d92601f929092010481019061095b565b60015460fa90106104755761047361048a565b505b60015460fa90106104c757506103a7565b6106175b600060015b60015481101561096f575b600154811080156104ba5750600281610100811015610002570154600014155b15610d635760010161049a565b60018054810190819055600160a060020a038316906002906101008110156100025790900160005081905550600160005054610102600050600084600160a060020a03168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3826040518082600160a060020a0316815260200191505060405180910390a15050565b50506000828152610103602052604081206001810154600284900a9290831611156105e35780546001828101805492909101835590839003905560408051600160a060020a03321681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b50505050565b1561065557600160a060020a03831660009081526101026020526040812054925082141561065a57506103a5565b5060408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a15b505050565b600160016000505403600060005054111561067557506103a5565b600060028361010081101561000257508301819055600160a060020a038416815261010260205260408120556104866103e6565b156103a5576001548211156106be57506103a7565b60008290556106cb6103e6565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15050565b506001820154600282900a908116600014156107215760009350610726565b600193505b50505092915050565b1561094b57610743846000610e3d3261016d565b156107ff577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00432858786866040518086600160a060020a0316815260200185815260200184600160a060020a031681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a184600160a060020a03168484846040518083838082843750505090810191506000908083038185876185025a03f1506000935061094b92505050565b6000364360405180848480828437505050909101908152604051908190036020019020915061082f90508161020c565b158015610852575060008181526101086020526040812054600160a060020a0316145b1561094b5760008181526101086020908152604082208054600160a060020a03191688178155600181018790556002018054858255818452928290209092601f01919091048101908490868215610953579182015b828111156109535782358260005055916020019190600101906108a7565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328132868887876040518087815260200186600160a060020a0316815260200185815260200184600160a060020a03168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b949350505050565b506108c59291505b8082111561096f576000815560010161095b565b5090565b15610b225760008381526101086020526040812054600160a060020a031614610b225760408051600091909120805460018201546002929092018054600160a060020a03929092169390918190839080156109f357820191906000526020600020905b8154815290600101906020018083116109d657829003601f168201915b505091505060006040518083038185876185025a03f150505060008481526101086020908152604080519281902080546001820154600160a060020a033281811688529587018b905293860181905292166060850181905260a06080860181815260029390930180549187018290527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a959293909160c083019084908015610ac557820191906000526020600020905b815481529060010190602001808311610aa857829003601f168201915b5050965050505050505060405180910390a160008381526101086020908152604082208054600160a060020a031916815560018101839055600281018054848255908452828420919392610b2892601f929092010481019061095b565b50919050565b5050506001915050610189565b156105e357610b438361016d565b15610b4e5750610655565b600160a060020a038416600090815261010260205260408120549250821415610b775750610655565b610b7f6103e6565b600160a060020a03831660028361010081101561000257508301819055600160a060020a03851660008181526101026020908152604080832083905584835291829020869055815192835282019290925281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a150505050565b60008581526101036020526040812080549093501415610c8b576000805483556001838101919091556101048054918201808255828015829011610c5a57818360005260206000209182019101610c5a919061095b565b50505060028301819055610104805487929081101561000257600091909152600080516020610f6383398151915201555b506001810154600283900a90811660001415610d5b5760408051600160a060020a03321681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a1815460019011610d48576000858152610103602052604090206002015461010480549091908110156100025760406000908120600080516020610f638339815191529290920181905580825560018083018290556002909201559450610d5b9050565b8154600019018255600182018054821790555b505050919050565b5b60018054118015610d8657506001546002906101008110156100025701546000145b15610d9a5760018054600019019055610d64565b60015481108015610dbd5750600154600290610100811015610002570154600014155b8015610dd757506002816101008110156100025701546000145b15610e3857600154600290610100811015610002578101549082610100811015610002578101919091558190610102906000908361010081101561000257810154825260209290925260408120929092556001546101008110156100025701555b61048f565b156101895761010754610e535b62015180420490565b1115610e6c57600061010655610e67610e4a565b610107555b6101065480830110801590610e8a5750610106546101055490830111155b15610ea057506101068054820190556001610189565b506000610189565b6103a56101045460005b81811015610f385761010480548290811015610002576000918252600080516020610f63833981519152015414610f2557610104805461010391600091849081101561000257600080516020610f6383398151915201548252506020919091526040812081815560018101829055600201555b600101610eb2565b5050506001016103ed565b610104805460008083559190915261065590600080516020610f638339815191529081019061095b56004c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe","0x606060405236156100c45760e060020a6000350463173825d981146101165780632f54bf6e146101715780634123cb6b1461019957806354fd4d50146101a25780635c52c2f5146101af5780637065cb48146101e0578063746c917114610214578063797af6271461021d578063b20d30a914610230578063b61d27f614610264578063b75c7dc614610285578063ba51a6df146102b4578063c2cf7326146102e8578063cbf0b0c014610326578063f00d4b5d1461035a578063f1736d8614610393575b61039d60003411156101145760408051600160a060020a033216815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b565b61039d6004356000600036436040518084848082843750505090910190815260405190819003602001902090506106b8815b600160a060020a03321660009081526101026020526040812054818082811415610c2e57610d86565b61039f6004355b600160a060020a03811660009081526101026020526040812054115b919050565b61039f60015481565b6103b16101085460ff1681565b61039d6000364360405180848480828437505050909101908152604051908190036020019020905061080981610148565b61039d6004356000364360405180848480828437505050909101908152604051908190036020019020905061063081610148565b61039f60005481565b61039f6004355b600081610a6c81610148565b61039d600435600036436040518084848082843750505090910190815260405190819003602001902090506107fd81610148565b61039f60048035906024803591604435918201910135600061082832610178565b61039d600435600160a060020a033216600090815261010260205260408120549080828114156103c757610446565b61039d6004356000364360405180848480828437505050909101908152604051908190036020019020905061077781610148565b61039f600435602435600082815261010360209081526040808320600160a060020a038516845261010290925282205482818114156107d0576107f4565b61039d6004356000364360405180848480828437505050909101908152604051908190036020019020905061081781610148565b61039d6004356024356000600036436040518084848082843750505090910190815260405190819003602001902090506104d181610148565b61039f6101055481565b005b60408051918252519081900360200190f35b6040805160ff9092168252519081900360200190f35b50506000828152610103602052604081206001810154600284900a9290831611156104465780546001828101805492909101835590839003905560408051600160a060020a03321681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b50505050565b600160a060020a03831660028361010081101561000257508301819055600160a060020a03851660008181526101026020908152604080832083905584835291829020869055815192835282019290925281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a1505b505050565b15610446576104df83610178565b156104ea57506104cc565b600160a060020a03841660009081526101026020526040812054925082141561051357506104cc565b61044c5b6101045460005b81811015610ed357610104805461010991600091849081101561000257600080516020610f8e83398151915201548252506020918252604081208054600160a060020a0319168155600181018290556002810180548382559083528383209193610f5892601f9290920104810190610a54565b60018054810190819055600160a060020a038316906002906101008110156100025790900160005081905550600160005054610102600050600084600160a060020a03168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3826040518082600160a060020a0316815260200191505060405180910390a15b505b50565b1561062b5761063e82610178565b15610649575061062d565b610651610517565b60015460fa90106106665761066461067b565b505b60015460fa9010610591575061062d565b6107355b600060015b600154811015610a68575b600154811080156106ab5750600281610100811015610002570154600014155b15610d8e5760010161068b565b156104cc57600160a060020a0383166000908152610102602052604081205492508214156106e6575061062b565b6001600160005054036000600050541115610701575061062b565b600060028361010081101561000257508301819055600160a060020a03841681526101026020526040812055610677610517565b5060408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a1505050565b1561062b5760015482111561078c575061062d565b6000829055610799610517565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15050565b506001820154600282900a908116600014156107ef57600093506107f4565b600193505b50505092915050565b1561062b575061010555565b1561062d5760006101065550565b1561062b5781600160a060020a0316ff5b15610a445761083c846000610e6832610178565b156108f8577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00432858786866040518086600160a060020a0316815260200185815260200184600160a060020a031681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a184600160a060020a03168484846040518083838082843750505090810191506000908083038185876185025a03f15060009350610a4492505050565b60003643604051808484808284375050509091019081526040519081900360200190209150610928905081610224565b15801561094b575060008181526101096020526040812054600160a060020a0316145b15610a445760008181526101096020908152604082208054600160a060020a03191688178155600181018790556002018054858255818452928290209092601f01919091048101908490868215610a4c579182015b82811115610a4c5782358260005055916020019190600101906109a0565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328132868887876040518087815260200186600160a060020a0316815260200185815260200184600160a060020a03168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b949350505050565b506109be9291505b80821115610a685760008155600101610a54565b5090565b15610c1b5760008381526101096020526040812054600160a060020a031614610c1b5760408051600091909120805460018201546002929092018054600160a060020a0392909216939091819083908015610aec57820191906000526020600020905b815481529060010190602001808311610acf57829003601f168201915b505091505060006040518083038185876185025a03f150505060008481526101096020908152604080519281902080546001820154600160a060020a033281811688529587018b905293860181905292166060850181905260a06080860181815260029390930180549187018290527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a959293909160c083019084908015610bbe57820191906000526020600020905b815481529060010190602001808311610ba157829003601f168201915b5050965050505050505060405180910390a160008381526101096020908152604082208054600160a060020a031916815560018101839055600281018054848255908452828420919392610c2192601f9290920104810190610a54565b50919050565b5050506001915050610194565b60008581526101036020526040812080549093501415610cb6576000805483556001838101919091556101048054918201808255828015829011610c8557818360005260206000209182019101610c859190610a54565b50505060028301819055610104805487929081101561000257600091909152600080516020610f8e83398151915201555b506001810154600283900a90811660001415610d865760408051600160a060020a03321681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a1815460019011610d73576000858152610103602052604090206002015461010480549091908110156100025760406000908120600080516020610f8e8339815191529290920181905580825560018083018290556002909201559450610d869050565b8154600019018255600182018054821790555b505050919050565b5b60018054118015610db157506001546002906101008110156100025701546000145b15610dc55760018054600019019055610d8f565b60015481108015610de85750600154600290610100811015610002570154600014155b8015610e0257506002816101008110156100025701546000145b15610e6357600154600290610100811015610002578101549082610100811015610002578101919091558190610102906000908361010081101561000257810154825260209290925260408120929092556001546101008110156100025701555b610680565b156101945761010754610e7e5b62015180420490565b1115610e9757600061010655610e92610e75565b610107555b6101065480830110801590610eb55750610106546101055490830111155b15610ecb57506101068054820190556001610194565b506000610194565b61062b6101045460005b81811015610f635761010480548290811015610002576000918252600080516020610f8e833981519152015414610f5057610104805461010391600091849081101561000257600080516020610f8e83398151915201548252506020919091526040812081815560018101829055600201555b600101610edd565b50505060010161051e565b61010480546000808355919091526104cc90600080516020610f8e83398151915290810190610a5456004c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe","0x606060405236156100da5760e060020a6000350463173825d9811461012c5780632f54bf6e146101875780634123cb6b146101af57806352375093146101b857806354fd4d50146101c25780635c52c2f5146101cc578063659010e7146101fd5780637065cb4814610207578063746c91711461023b578063797af62714610244578063b20d30a914610257578063b61d27f61461028b578063b75c7dc6146102ac578063ba51a6df146102db578063c2cf73261461030f578063cbf0b0c01461034d578063f00d4b5d14610381578063f1736d86146103ba575b6103c4600034111561012a5760408051600160a060020a033216815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b565b6103c46004356000600036436040518084848082843750505090910190815260405190819003602001902090506106c9815b600160a060020a03321660009081526101026020526040812054818082811415610c3f57610d97565b6103c66004355b600160a060020a03811660009081526101026020526040812054115b919050565b6103c660015481565b6103c66101075481565b6103c66101085481565b6103c46000364360405180848480828437505050909101908152604051908190036020019020905061081a8161015e565b6103c66101065481565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506106418161015e565b6103c660005481565b6103c66004355b600081610a7d8161015e565b6103c46004356000364360405180848480828437505050909101908152604051908190036020019020905061080e8161015e565b6103c66004803590602480359160443591820191013560006108393261018e565b6103c4600435600160a060020a033216600090815261010260205260408120549080828114156103d857610457565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506107888161015e565b6103c6600435602435600082815261010360209081526040808320600160a060020a038516845261010290925282205482818114156107e157610805565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506108288161015e565b6103c46004356024356000600036436040518084848082843750505090910190815260405190819003602001902090506104e28161015e565b6103c66101055481565b005b60408051918252519081900360200190f35b50506000828152610103602052604081206001810154600284900a9290831611156104575780546001828101805492909101835590839003905560408051600160a060020a03321681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b50505050565b600160a060020a03831660028361010081101561000257508301819055600160a060020a03851660008181526101026020908152604080832083905584835291829020869055815192835282019290925281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a1505b505050565b15610457576104f08361018e565b156104fb57506104dd565b600160a060020a03841660009081526101026020526040812054925082141561052457506104dd565b61045d5b6101045460005b81811015610ee457610104805461010991600091849081101561000257600080516020610f9f83398151915201548252506020918252604081208054600160a060020a0319168155600181018290556002810180548382559083528383209193610f6992601f9290920104810190610a65565b60018054810190819055600160a060020a038316906002906101008110156100025790900160005081905550600160005054610102600050600084600160a060020a03168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3826040518082600160a060020a0316815260200191505060405180910390a15b505b50565b1561063c5761064f8261018e565b1561065a575061063e565b610662610528565b60015460fa90106106775761067561068c565b505b60015460fa90106105a2575061063e565b6107465b600060015b600154811015610a79575b600154811080156106bc5750600281610100811015610002570154600014155b15610d9f5760010161069c565b156104dd57600160a060020a0383166000908152610102602052604081205492508214156106f7575061063c565b6001600160005054036000600050541115610712575061063c565b600060028361010081101561000257508301819055600160a060020a03841681526101026020526040812055610688610528565b5060408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a1505050565b1561063c5760015482111561079d575061063e565b60008290556107aa610528565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15050565b506001820154600282900a908116600014156108005760009350610805565b600193505b50505092915050565b1561063c575061010555565b1561063e5760006101065550565b1561063c5781600160a060020a0316ff5b15610a555761084d846000610e793261018e565b15610909577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00432858786866040518086600160a060020a0316815260200185815260200184600160a060020a031681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a184600160a060020a03168484846040518083838082843750505090810191506000908083038185876185025a03f15060009350610a5592505050565b6000364360405180848480828437505050909101908152604051908190036020019020915061093990508161024b565b15801561095c575060008181526101096020526040812054600160a060020a0316145b15610a555760008181526101096020908152604082208054600160a060020a03191688178155600181018790556002018054858255818452928290209092601f01919091048101908490868215610a5d579182015b82811115610a5d5782358260005055916020019190600101906109b1565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328132868887876040518087815260200186600160a060020a0316815260200185815260200184600160a060020a03168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b949350505050565b506109cf9291505b80821115610a795760008155600101610a65565b5090565b15610c2c5760008381526101096020526040812054600160a060020a031614610c2c5760408051600091909120805460018201546002929092018054600160a060020a0392909216939091819083908015610afd57820191906000526020600020905b815481529060010190602001808311610ae057829003601f168201915b505091505060006040518083038185876185025a03f150505060008481526101096020908152604080519281902080546001820154600160a060020a033281811688529587018b905293860181905292166060850181905260a06080860181815260029390930180549187018290527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a959293909160c083019084908015610bcf57820191906000526020600020905b815481529060010190602001808311610bb257829003601f168201915b5050965050505050505060405180910390a160008381526101096020908152604082208054600160a060020a031916815560018101839055600281018054848255908452828420919392610c3292601f9290920104810190610a65565b50919050565b50505060019150506101aa565b60008581526101036020526040812080549093501415610cc7576000805483556001838101919091556101048054918201808255828015829011610c9657818360005260206000209182019101610c969190610a65565b50505060028301819055610104805487929081101561000257600091909152600080516020610f9f83398151915201555b506001810154600283900a90811660001415610d975760408051600160a060020a03321681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a1815460019011610d84576000858152610103602052604090206002015461010480549091908110156100025760406000908120600080516020610f9f8339815191529290920181905580825560018083018290556002909201559450610d979050565b8154600019018255600182018054821790555b505050919050565b5b60018054118015610dc257506001546002906101008110156100025701546000145b15610dd65760018054600019019055610da0565b60015481108015610df95750600154600290610100811015610002570154600014155b8015610e1357506002816101008110156100025701546000145b15610e7457600154600290610100811015610002578101549082610100811015610002578101919091558190610102906000908361010081101561000257810154825260209290925260408120929092556001546101008110156100025701555b610691565b156101aa5761010754610e8f5b62015180420490565b1115610ea857600061010655610ea3610e86565b610107555b6101065480830110801590610ec65750610106546101055490830111155b15610edc575061010680548201905560016101aa565b5060006101aa565b61063c6101045460005b81811015610f745761010480548290811015610002576000918252600080516020610f9f833981519152015414610f6157610104805461010391600091849081101561000257600080516020610f9f83398151915201548252506020919091526040812081815560018101829055600201555b600101610eee565b50505060010161052f565b61010480546000808355919091526104dd90600080516020610f9f83398151915290810190610a6556004c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe"], +stub:["0x60606040523615600d57600d565b606a5b7328aa4f0b12d6b0601e45836a14caa9ab1ad28b8173ffffffffffffffffffffffffffffffffffffffff16600036604051808383808284378201915050925050506000604051808303816000866161da5a03f2915050505b565b00","0x3660008037602060003660008073bfa69ba91385206bfdd2d8b9c1a5d6c10097a85b60325a03f260206000f3","0x3660008037602060003660003473d658a4b8247c14868f3c512fa5cbb6e458e4a98961235a5a03f260206000f3","0x3660008037602060003660003473a8b566789c430c906d0eb6b2916e550a9c493d8a61235a5a03f260206000f3"],stubDynamic:["0x3660008037602060003660003473cafecafecafecafecafecafecafecafecafecafe61235a5a03f260206000f3","0x3660008037602060003660003473cafecafecafecafecafecafecafecafecafecafe61235a5a03f21560015760206000f3"]},b=function(b){!b.address||b.vulnerabilities&&"undefined"!=typeof b.vulnerabilities.txorigin||web3.eth.getCode(b.address,function(a,e){if(!a&&e.length>2){var c=!1,d=!!_.find(f.full,function(f){return e===f}),t=!!_.find(f.stub,function(f){return e===f}),n=!!_.find(f.stubDynamic,function(f){var b=new RegExp(f.replace("cafecafecafecafecafecafecafecafecafecafe","[a-z0-9]{40}"),"i");return b.test(e)});(d||t||n)&&(c=!0,EthElements.Modal.question({text:TAPi18n.__("wallet.app.warnings.txOriginVulnerabilityPopup"),ok:function(){FlowRouter.go("/account/"+b.address)},cancel:!0,modalQuestionOkButtonText:TAPi18n.__("wallet.app.warnings.checkThisNow"),modalQuestionCancelButtonText:TAPi18n.__("wallet.app.warnings.checkThisLater")},{closeable:!1})),Wallets.update(b._id,{$set:{vulnerabilities:{txorigin:c}}})}})},a=function(){function f(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()};updateContractData=function(f){var b=contracts["ct_"+f._id];b&&(b.m_dailyLimit(function(b,a){b||Wallets.update(f._id,{$set:{dailyLimit:a.toString(10)}})}),b.m_required(function(b,a){b||Wallets.update(f._id,{$set:{requiredSignatures:a.toString(10)}})}),f.version>=1&&b.m_spentToday(function(a,e){b.m_lastDay(function(b,a){if(!b&&e&&_.isFinite(e.toString(10))){var c=new Date,d=Math.floor(c/864e5);Wallets.update(f._id,{$set:{dailyLimitSpent:d===a.toNumber()?e.toString(10):"0"}})}})}),checkOwner(f),_.isUndefined(f.version)&&f.address&&b.version(function(b,a){!b&&a.toString(10)&&(Wallets.update(f._id,{$set:{version:a.toNumber()}}),f.version=a.toNumber())}))},checkOwner=function(f){web3.isAddress(f.address)&&checkWalletOwners(f.address).then(function(b){Wallets.update(f._id,{$set:{owners:b.owners}})},function(){})},confirmOrRevoke=function(f,b){var a=Helpers.makeId("pc",b.args.operation);a&&f.hasConfirmed(b.args.operation,b.args.owner,function(f,e){var c=PendingConfirmations.findOne(a),d={$set:{from:b.address}};c&&c.sending===b.args.owner&&(d.$unset={sending:""}),Helpers.eventLogs("CHECK OPERATION: "+b.args.operation+" owner: "+b.args.owner,e),e?c?d.$addToSet={confirmedOwners:b.args.owner}:d.$set.confirmedOwners=[b.args.owner]:c?d.$pull={confirmedOwners:b.args.owner}:d.$set.confirmedOwners=[],PendingConfirmations.upsert(a,d)})};var e=function(f,a){var c=(f.checkpointBlock||0)-ethereumConfig.rollBackBy;(a||0>c)&&(c=f.creationBlock);var d=contracts["ct_"+f._id];if(d){d.walletEvents||(d.walletEvents=[]);var t=d.walletEvents;if(_.each(d.walletEvents,function(f){f.stopWatching(),d.walletEvents.shift()}),f.imported)Helpers.eventLogs("Imported wallet: "+f.address+" checking for any log from block #"+f.creationBlock),web3.eth.filter({address:f.address,fromBlock:f.creationBlock,toBlock:"latest"}).get(function(b,a){if(!b){var c=EthBlocks.latest.number;0!==a.length&&a.forEach(function(f){f.blockNumberEthBlocks.latest.number&&Wallets.update({_id:f._id},{$set:{checkpointBlock:a.blockNumber}}),"Deposit"===a.event){if(a.removed)return void Transactions.remove({_id:Helpers.makeId("tx",a.transactionHash)});Helpers.eventLogs("Deposit for "+f.address+" arrived in block: #"+a.blockNumber,a.args.value.toNumber());var e=addTransaction(a,a.args.from,f.address,a.args.value.toString(10));if(!e||!e.tokenId){var c=Helpers.makeId("tx",a.transactionHash);Helpers.showNotification("wallet.transactions.notifications.incomingTransaction",{to:Helpers.getAccountNameByAddress(f.address),from:Helpers.getAccountNameByAddress(a.args.from),amount:EthTools.formatBalance(a.args.value,"0,0.00[000000] unit","ether")},function(){EthElements.Modal.show({template:"views_modals_transactionInfo",data:{_id:c}},{"class":"transaction-info"})})}}if("SingleTransact"===a.event||"MultiTransact"===a.event){if(a.removed)return void Transactions.remove({_id:Helpers.makeId("tx",a.transactionHash)});Helpers.eventLogs(a.event+" for "+f.address+" arrived in block: #"+a.blockNumber,a.args.value.toNumber());var e=addTransaction(a,f.address,a.args.to,a.args.value.toString(10));if(!e||!e.tokenId){var c=Helpers.makeId("tx",a.transactionHash);Helpers.showNotification("wallet.transactions.notifications.outgoingTransaction",{to:Helpers.getAccountNameByAddress(a.args.to),from:Helpers.getAccountNameByAddress(f.address),amount:EthTools.formatBalance(a.args.value,"0,0.00[000000] unit","ether")},function(){EthElements.Modal.show({template:"views_modals_transactionInfo",data:{_id:c}},{"class":"transaction-info"})})}}"ConfirmationNeeded"===a.event&&(Helpers.eventLogs("ConfirmationNeeded for "+f.address+" arrived in block: #"+a.blockNumber,a.args.value.toNumber()+", Operation "+a.args.operation),web3.eth.getBlock(a.blockNumber,!0,function(b,e){if(!b&&e){var c=Helpers.makeId("pc",a.args.operation),d=Wallets.find({$or:[{address:a.address},{address:a.args.to}]}).fetch(),t=PendingConfirmations.findOne(c);if(!(from=Wallets.findOne({address:a.address}))||!EthAccounts.findOne({address:{$in:from.owners}}))return;PendingConfirmations.upsert(c,{$set:{confirmedOwners:t?t.confirmedOwners:[],initiator:a.args.initiator,operation:a.args.operation,value:a.args.value.toString(10),to:a.args.to,from:f.address,timestamp:e.timestamp,blockNumber:a.blockNumber,blockHash:a.blockHash,transactionHash:a.transactionHash,transactionIndex:a.transactionIndex}}),t&&!t.operation&&Helpers.showNotification("wallet.transactions.notifications.pendingConfirmation",{initiator:Helpers.getAccountNameByAddress(a.args.initiator),to:Helpers.getAccountNameByAddress(a.args.to),from:Helpers.getAccountNameByAddress(f.address),amount:EthTools.formatBalance(a.args.value,"0,0.00[000000] unit","ether")},function(){FlowRouter.go("/account/"+f.address)});var n=Helpers.makeId("tx",a.transactionHash);Meteor.setTimeout(function(){Transactions.remove(n)},500)}})),"OwnerAdded"===a.event&&(Helpers.eventLogs("OwnerAdded for "+f.address+" arrived in block: #"+a.blockNumber,a.args),checkOwner(f)),"OwnerRemoved"===a.event&&(Helpers.eventLogs("OwnerRemoved for "+f.address+" arrived in block: #"+a.blockNumber,a.args),checkOwner(f)),"RequirementChanged"===a.event&&Helpers.eventLogs("RequirementChanged for "+f.address+" arrived in block: #"+a.blockNumber,a.args),"Confirmation"===a.event&&(Helpers.eventLogs("Operation confirmation for "+f.address+" arrived in block: #"+a.blockNumber,a.args),confirmOrRevoke(d,a)),"Revoke"===a.event&&(Helpers.eventLogs("Operation revokation for "+f.address+" arrived in block: #"+a.blockNumber,a.args),confirmOrRevoke(d,a))}})}else Helpers.eventLogs("Contract address not set, checking for contract receipt"),web3.eth.getTransactionReceipt(f.transactionHash,function(a,c){!a&&c&&web3.eth.getCode(c.contractAddress,function(a,d){Helpers.eventLogs("Contract created on "+c.contractAddress),!a&&d.length>2?(Wallets.update(f._id,{$set:{creationBlock:c.blockNumber,address:c.contractAddress}}),f=Wallets.findOne(f._id),contracts["ct_"+f._id]=WalletContract.at(c.contractAddress),e(f),b(f)):(Helpers.eventLogs("Contract created on "+c.contractAddress+", but didn't stored the code!"),Wallets.remove(f._id))})})}};observeWallets=function(){var f=function(f,b){var a=EthBlocks.latest.number-f.creationBlock;if(f.address&&(!b||b&&!b.address)&&a0?(Helpers.eventLogs("Checking wallet address "+f.address+" for code. Current confirmations: "+c),web3.eth.getCode(f.address,function(b,a){b||(a.length>2?updateContractData(f):(Wallets.remove(f._id),e.stopWatching()))})):c>ethereumConfig.requiredConfirmations&&e.stopWatching()}})}};collectionObservers[collectionObservers.length]=Wallets.find({}).observe({added:function(a){if(a.address)contracts["ct_"+a._id]=WalletContract.at(a.address),web3.eth.getBalance(a.address,function(f,b){f||Wallets.update(a._id,{$set:{balance:b.toString(10)}})}),web3.eth.getCode(a.address,function(b,c){b?console.log("Couldn't check Wallet code of ",a,b):c&&c.length>2?(Wallets.update(a._id,{$unset:{disabled:""}}),updateContractData(a),e(a),f(a,{})):Wallets.update(a._id,{$set:{disabled:!0}})}),b(a);else{if(a.transactionHash)return contracts["ct_"+a._id]=WalletContract.at(),void(a.creationBlock+50<=EthBlocks.latest.number?Wallets.remove(a._id):e(a));if(_.isEmpty(a.owners))return;if(-1!==a.code.indexOf("cafecafecafecafecafecafecafecafecafecafe"))return GlobalNotification.error({content:TAPi18n.__("wallet.newWallet.error.stubHasNoOrigWalletAddress"),closeable:!1}),void Wallets.remove(a._id);Helpers.checkChain(function(f){f?(Wallets.remove(a._id),GlobalNotification.error({content:TAPi18n.__("wallet.app.error.wrongChain"),closeable:!1})):(console.log("Deploying Wallet with following options",a),WalletContract["new"](a.owners,a.requiredSignatures,a.dailyLimit||ethereumConfig.dailyLimitDefault,{from:a.deployFrom,data:a.code,gas:3e6},function(f,b){f?(console.log("Error while deploying wallet",f),GlobalNotification.error({content:f.message,duration:8}),Wallets.remove(a._id)):b.address?(console.log("Contract Address: ",b.address),contracts["ct_"+a._id]=b,Wallets.update(a._id,{$set:{creationBlock:EthBlocks.latest.number-1,checkpointBlock:EthBlocks.latest.number-1,address:b.address},$unset:{code:""}}),a.address=b.address,delete a.code,updateContractData(a),e(a),EthElements.Modal.question({template:"views_modals_backupContractAddress",data:{address:b.address},ok:!0},{closeable:!1})):(a.transactionHash=b.transactionHash,console.log("Contract transaction hash: ",b.transactionHash),Wallets.update(a._id,{$set:{transactionHash:b.transactionHash}}))}))})}},changed:function(f,b){f.transactions!=b.transactions&&updateContractData(f)},removed:function(f){var b=contracts["ct_"+f._id];b&&(b.walletEvents||(b.walletEvents=[]),_.each(b.walletEvents,function(f){f.stopWatching(),b.walletEvents.shift()}),delete contracts["ct_"+f._id],_.each(Transactions.find({from:f.address}).fetch(),function(f){Wallets.findOne({transactions:f._id})||EthAccounts.findOne({transactions:f._id})||Transactions.remove(f._id)}),_.each(PendingConfirmations.find({from:f.address}).fetch(),function(f){PendingConfirmations.remove(f._id)}))}})}}).call(this); + +(function(){var t=[{type:"function",name:"name",constant:!0,inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"decimals",constant:!0,inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"balanceOf",constant:!0,inputs:[{name:"",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"symbol",constant:!0,inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"transfer",constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[]},{type:"constructor",inputs:[{name:"_supply",type:"uint256"},{name:"_name",type:"string"},{name:"_decimals",type:"uint8"},{name:"_symbol",type:"string"}]},{name:"Transfer",type:"event",anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"success",type:"bool"}],type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],type:"function"}];TokenContract=web3.eth.contract(t)}).call(this); + +(function(){contracts={},collectionObservers=[],ethereumConfig={rollBackBy:0,requiredConfirmations:12,dailyLimitDefault:"100000000000000000000000000"},connectToNode=function(){console.time("startNode"),console.log("Connect to node..."),EthAccounts.init(),EthBlocks.init(),EthTools.ticker.start({extraParams:"undefined"!=typeof mist?"Mist-"+mist.version:"",currencies:["BTC","USD","EUR","BRL","GBP"]}),EthAccounts.find().count()>0&&checkForOriginalWallet(),observeLatestBlocks(),observeWallets(),observeTransactions(),observeEvents(),observeTokens(),observePendingConfirmations(),observeCustomContracts(),console.timeEnd("startNode")},resetWallet=function e(o){_.each(Transactions.find().fetch(),function(e){console.log(e._id);try{Transactions.remove(e._id)}catch(o){console.error(o)}}),_.each(PendingConfirmations.find().fetch(),function(e){try{PendingConfirmations.remove(e._id)}catch(o){console.error(o)}}),_.each(Wallets.find().fetch(),function(e){Wallets.update(e._id,{$set:{checkpointBlock:e.creationBlock,transactions:[]}})}),web3.reset(),console.log("The wallet will re-fetch log information in 6 seconds..."),setTimeout(function(){console.log("Fetching logs..."),connectToNode()},6e3)}}).call(this); + +(function(){Session.setDefault("network",!1);var f="0x273930d21e01ee25e4c219b63259d214872220a2",e="0x1d649ca03d1bcd84877482c1dd8d3f9a7398728f";walletInterface=[{constant:!1,inputs:[{name:"_owner",type:"address"}],name:"removeOwner",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_addr",type:"address"}],name:"isOwner",outputs:[{name:"",type:"bool"}],type:"function"},{constant:!0,inputs:[],name:"m_numOwners",outputs:[{name:"",type:"uint256"}],type:"function"},{constant:!0,inputs:[],name:"m_lastDay",outputs:[{name:"",type:"uint256"}],type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"uint256"}],type:"function"},{constant:!1,inputs:[],name:"resetSpentToday",outputs:[],type:"function"},{constant:!0,inputs:[],name:"m_spentToday",outputs:[{name:"",type:"uint256"}],type:"function"},{constant:!1,inputs:[{name:"_owner",type:"address"}],name:"addOwner",outputs:[],type:"function"},{constant:!0,inputs:[],name:"m_required",outputs:[{name:"",type:"uint256"}],type:"function"},{constant:!1,inputs:[{name:"_h",type:"bytes32"}],name:"confirm",outputs:[{name:"",type:"bool"}],type:"function"},{constant:!1,inputs:[{name:"_newLimit",type:"uint256"}],name:"setDailyLimit",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"},{name:"_data",type:"bytes"}],name:"execute",outputs:[{name:"_r",type:"bytes32"}],type:"function"},{constant:!1,inputs:[{name:"_operation",type:"bytes32"}],name:"revoke",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_newRequired",type:"uint256"}],name:"changeRequirement",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_operation",type:"bytes32"},{name:"_owner",type:"address"}],name:"hasConfirmed",outputs:[{name:"",type:"bool"}],type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"}],name:"kill",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"}],name:"changeOwner",outputs:[],type:"function"},{constant:!0,inputs:[],name:"m_dailyLimit",outputs:[{name:"",type:"uint256"}],type:"function"},{inputs:[{name:"_owners",type:"address[]"},{name:"_required",type:"uint256"},{name:"_daylimit",type:"uint256"}],type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,name:"owner",type:"address"},{indexed:!1,name:"operation",type:"bytes32"}],name:"Confirmation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"owner",type:"address"},{indexed:!1,name:"operation",type:"bytes32"}],name:"Revoke",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"oldOwner",type:"address"},{indexed:!1,name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"newOwner",type:"address"}],name:"OwnerAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"oldOwner",type:"address"}],name:"OwnerRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"newRequirement",type:"uint256"}],name:"RequirementChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"from",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"owner",type:"address"},{indexed:!1,name:"value",type:"uint256"},{indexed:!1,name:"to",type:"address"},{indexed:!1,name:"data",type:"bytes"}],name:"SingleTransact",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"owner",type:"address"},{indexed:!1,name:"operation",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"},{indexed:!1,name:"to",type:"address"},{indexed:!1,name:"data",type:"bytes"}],name:"MultiTransact",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"operation",type:"bytes32"},{indexed:!1,name:"initiator",type:"address"},{indexed:!1,name:"value",type:"uint256"},{indexed:!1,name:"to",type:"address"},{indexed:!1,name:"data",type:"bytes"}],name:"ConfirmationNeeded",type:"event"}],WalletContract=web3.eth.contract(walletInterface),walletABI="0x60606040526002610108600050556040516110e53803806110e583398101604052805160805160a051919092019190808383815160019081018155600090600160a060020a0332169060029060038390559183525061010260205260408220555b82518110156100eb57828181518110156100025790602001906020020151600160a060020a03166002600050826002016101008110156100025790900160005081905550806002016101026000506000858481518110156100025790602001906020020151600160a060020a0316815260200190815260200160002060005081905550600101610060565b81600060005081905550505050806101056000508190555061010f62015180420490565b6101075550505050610fbf806101266000396000f300606060405236156100da5760e060020a6000350463173825d9811461012c5780632f54bf6e146101875780634123cb6b146101af57806352375093146101b857806354fd4d50146101c25780635c52c2f5146101cc578063659010e7146101fd5780637065cb4814610207578063746c91711461023b578063797af62714610244578063b20d30a914610257578063b61d27f61461028b578063b75c7dc6146102ac578063ba51a6df146102db578063c2cf73261461030f578063cbf0b0c01461034d578063f00d4b5d14610381578063f1736d86146103ba575b6103c4600034111561012a5760408051600160a060020a033216815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b565b6103c46004356000600036436040518084848082843750505090910190815260405190819003602001902090506106c9815b600160a060020a03321660009081526101026020526040812054818082811415610c3f57610d97565b6103c66004355b600160a060020a03811660009081526101026020526040812054115b919050565b6103c660015481565b6103c66101075481565b6103c66101085481565b6103c46000364360405180848480828437505050909101908152604051908190036020019020905061081a8161015e565b6103c66101065481565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506106418161015e565b6103c660005481565b6103c66004355b600081610a7d8161015e565b6103c46004356000364360405180848480828437505050909101908152604051908190036020019020905061080e8161015e565b6103c66004803590602480359160443591820191013560006108393261018e565b6103c4600435600160a060020a033216600090815261010260205260408120549080828114156103d857610457565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506107888161015e565b6103c6600435602435600082815261010360209081526040808320600160a060020a038516845261010290925282205482818114156107e157610805565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506108288161015e565b6103c46004356024356000600036436040518084848082843750505090910190815260405190819003602001902090506104e28161015e565b6103c66101055481565b005b60408051918252519081900360200190f35b50506000828152610103602052604081206001810154600284900a9290831611156104575780546001828101805492909101835590839003905560408051600160a060020a03321681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b50505050565b600160a060020a03831660028361010081101561000257508301819055600160a060020a03851660008181526101026020908152604080832083905584835291829020869055815192835282019290925281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a1505b505050565b15610457576104f08361018e565b156104fb57506104dd565b600160a060020a03841660009081526101026020526040812054925082141561052457506104dd565b61045d5b6101045460005b81811015610ee457610104805461010991600091849081101561000257600080516020610f9f83398151915201548252506020918252604081208054600160a060020a0319168155600181018290556002810180548382559083528383209193610f6992601f9290920104810190610a65565b60018054810190819055600160a060020a038316906002906101008110156100025790900160005081905550600160005054610102600050600084600160a060020a03168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3826040518082600160a060020a0316815260200191505060405180910390a15b505b50565b1561063c5761064f8261018e565b1561065a575061063e565b610662610528565b60015460fa90106106775761067561068c565b505b60015460fa90106105a2575061063e565b6107465b600060015b600154811015610a79575b600154811080156106bc5750600281610100811015610002570154600014155b15610d9f5760010161069c565b156104dd57600160a060020a0383166000908152610102602052604081205492508214156106f7575061063c565b6001600160005054036000600050541115610712575061063c565b600060028361010081101561000257508301819055600160a060020a03841681526101026020526040812055610688610528565b5060408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a1505050565b1561063c5760015482111561079d575061063e565b60008290556107aa610528565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15050565b506001820154600282900a908116600014156108005760009350610805565b600193505b50505092915050565b1561063c575061010555565b1561063e5760006101065550565b1561063c5781600160a060020a0316ff5b15610a555761084d846000610e793261018e565b15610909577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00432858786866040518086600160a060020a0316815260200185815260200184600160a060020a031681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a184600160a060020a03168484846040518083838082843750505090810191506000908083038185876185025a03f15060009350610a5592505050565b6000364360405180848480828437505050909101908152604051908190036020019020915061093990508161024b565b15801561095c575060008181526101096020526040812054600160a060020a0316145b15610a555760008181526101096020908152604082208054600160a060020a03191688178155600181018790556002018054858255818452928290209092601f01919091048101908490868215610a5d579182015b82811115610a5d5782358260005055916020019190600101906109b1565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328132868887876040518087815260200186600160a060020a0316815260200185815260200184600160a060020a03168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b949350505050565b506109cf9291505b80821115610a795760008155600101610a65565b5090565b15610c2c5760008381526101096020526040812054600160a060020a031614610c2c5760408051600091909120805460018201546002929092018054600160a060020a0392909216939091819083908015610afd57820191906000526020600020905b815481529060010190602001808311610ae057829003601f168201915b505091505060006040518083038185876185025a03f150505060008481526101096020908152604080519281902080546001820154600160a060020a033281811688529587018b905293860181905292166060850181905260a06080860181815260029390930180549187018290527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a959293909160c083019084908015610bcf57820191906000526020600020905b815481529060010190602001808311610bb257829003601f168201915b5050965050505050505060405180910390a160008381526101096020908152604082208054600160a060020a031916815560018101839055600281018054848255908452828420919392610c3292601f9290920104810190610a65565b50919050565b50505060019150506101aa565b60008581526101036020526040812080549093501415610cc7576000805483556001838101919091556101048054918201808255828015829011610c9657818360005260206000209182019101610c969190610a65565b50505060028301819055610104805487929081101561000257600091909152600080516020610f9f83398151915201555b506001810154600283900a90811660001415610d975760408051600160a060020a03321681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a1815460019011610d84576000858152610103602052604090206002015461010480549091908110156100025760406000908120600080516020610f9f8339815191529290920181905580825560018083018290556002909201559450610d979050565b8154600019018255600182018054821790555b505050919050565b5b60018054118015610dc257506001546002906101008110156100025701546000145b15610dd65760018054600019019055610da0565b60015481108015610df95750600154600290610100811015610002570154600014155b8015610e1357506002816101008110156100025701546000145b15610e7457600154600290610100811015610002578101549082610100811015610002578101919091558190610102906000908361010081101561000257810154825260209290925260408120929092556001546101008110156100025701555b610691565b156101aa5761010754610e8f5b62015180420490565b1115610ea857600061010655610ea3610e86565b610107555b6101065480830110801590610ec65750610106546101055490830111155b15610edc575061010680548201905560016101aa565b5060006101aa565b61063c6101045460005b81811015610f745761010480548290811015610002576000918252600080516020610f9f833981519152015414610f6157610104805461010391600091849081101561000257600080516020610f9f83398151915201548252506020919091526040812081815560018101829055600201555b600101610eee565b50505060010161052f565b61010480546000808355919091526104dd90600080516020610f9f83398151915290810190610a6556004c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe",walletStubABI="0x6060604052600261010860005055604051611b51380380611b51833981016040528080518201919060200180519060200190919080519060200190919050505b805b83835b600060018351016001600050819055503373ffffffffffffffffffffffffffffffffffffffff16600260005060016101008110156100025790900160005b5081905550600161010260005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550600090505b825181101561016e5782818151811015610002579060200190602002015173ffffffffffffffffffffffffffffffffffffffff166002600050826002016101008110156100025790900160005b508190555080600201610102600050600085848151811015610002579060200190602002015173ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055505b80600101905080506100c2565b816000600050819055505b505050806101056000508190555061018f6101ad565b610107600050819055505b505b505050611992806101bf6000396000f35b600062015180420490506101bc565b9056606060405236156100f8576000357c010000000000000000000000000000000000000000000000000000000090048063173825d9146101605780632f54bf6e146101785780634123cb6b146101a457806352375093146101c757806354fd4d50146101ea5780635c52c2f51461020d578063659010e71461021c5780637065cb481461023f578063746c917114610257578063797af6271461027a578063b20d30a9146102a6578063b61d27f6146102be578063b75c7dc614610307578063ba51a6df1461031f578063c2cf732614610337578063cbf0b0c01461036c578063f00d4b5d14610384578063f1736d86146103a5576100f8565b61015e5b600034111561015b577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3334604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b565b005b61017660048080359060200190919050506107c4565b005b61018e60048080359060200190919050506109a5565b6040518082815260200191505060405180910390f35b6101b16004805050610a91565b6040518082815260200191505060405180910390f35b6101d46004805050610b38565b6040518082815260200191505060405180910390f35b6101f76004805050610b42565b6040518082815260200191505060405180910390f35b61021a6004805050610adf565b005b6102296004805050610b2e565b6040518082815260200191505060405180910390f35b610255600480803590602001909190505061066e565b005b6102646004805050610a88565b6040518082815260200191505060405180910390f35b6102906004808035906020019091905050610f0e565b6040518082815260200191505060405180910390f35b6102bc6004808035906020019091905050610a9a565b005b6102f160048080359060200190919080359060200190919080359060200190820180359060200191909192905050610b9e565b6040518082815260200191505060405180910390f35b61031d60048080359060200190919050506103c8565b005b610335600480803590602001909190505061090f565b005b61035660048080359060200190919080359060200190919050506109e7565b6040518082815260200191505060405180910390f35b6103826004808035906020019091905050610b4c565b005b6103a360048080359060200190919080359060200190919050506104ca565b005b6103b26004805050610b24565b6040518082815260200191505060405180910390f35b60006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549250600083141561040f576104c4565b8260020a91506101036000506000858152602001908152602001600020600050905060008282600101600050541611156104c3578060000160008181505480929190600101919050555081816001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b3385604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b50505050565b600060003643604051808484808284378201915050828152602001935050505060405180910390206104fb816112db565b1561066757610509836109a5565b156105145750610669565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156105565750610669565b61055e611777565b8273ffffffffffffffffffffffffffffffffffffffff166002600050836101008110156100025790900160005b5081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c8484604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b505b505050565b600036436040518084848082843782019150508281526020019350505050604051809103902061069d816112db565b156107bf576106ab826109a5565b156106b657506107c1565b6106be611777565b60fa6001600050541015156106d7576106d561153d565b505b60fa6001600050541015156106ec57506107c1565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff1660026000506001600050546101008110156100025790900160005b508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c382604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b505b50565b600060003643604051808484808284378201915050828152602001935050505060405180910390206107f5816112db565b156109095761010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549150600082141561083c575061090b565b6001600160005054036000600050541115610857575061090b565b60006002600050836101008110156100025790900160005b5081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055506108b2611777565b6108ba61153d565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da83604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b505b5050565b600036436040518084848082843782019150508281526020019350505050604051809103902061093e816112db565b156109a05760016000505482111561095657506109a2565b81600060005081905550610968611777565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da826040518082815260200191505060405180910390a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050541190506109e2565b919050565b60006000600060006101036000506000878152602001908152602001600020600050925061010260005060008673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505491506000821415610a505760009350610a7f565b8160020a90506000818460010160005054161415610a755760009350610a7f56610a7e565b60019350610a7f565b5b50505092915050565b60006000505481565b60016000505481565b6000364360405180848480828437820191505082815260200193505050506040518091039020610ac9816112db565b15610ada5781610105600050819055505b505b50565b6000364360405180848480828437820191505082815260200193505050506040518091039020610b0e816112db565b15610b20576000610106600050819055505b505b565b6101056000505481565b6101066000505481565b6101076000505481565b6101086000505481565b6000364360405180848480828437820191505082815260200193505050506040518091039020610b7b816112db565b15610b99578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b6000610ba9336109a5565b15610f0557610bb7846116d7565b15610ca0577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd0043385878686604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a18473ffffffffffffffffffffffffffffffffffffffff168484846040518083838082843782019150509250505060006040518083038185876185025a03f1925050505060006001029050610f06565b600036436040518084848082843782019150508281526020019350505050604051809103902090508050610cd381610f0e565b158015610d3357506000610109600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610f045784610109600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555083610109600050600083815260200190815260200160002060005060010160005081905550828261010960005060008481526020019081526020016000206000506002016000509190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610e0857803560ff1916838001178555610e39565b82800160010185558215610e39579182015b82811115610e38578235826000505591602001919060010190610e1a565b5b509050610e649190610e46565b80821115610e605760008181506000905550600101610e46565b5090565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf32813386888787604051808781526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b5b5b949350505050565b600081610f1a816112db565b156112d4576000610109600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156112d357610109600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610109600050600085815260200190815260200160002060005060010160005054610109600050600086815260200190815260200160002060005060020160005060405180828054600181600116156101000203166002900480156110765780601f1061104b57610100808354040283529160200191611076565b820191906000526020600020905b81548152906001019060200180831161105957829003601f168201915b505091505060006040518083038185876185025a03f192505050507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a3384610109600050600087815260200190815260200160002060005060010160005054610109600050600088815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166101096000506000898152602001908152602001600020600050600201600050604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252838181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156112005780601f106111d557610100808354040283529160200191611200565b820191906000526020600020905b8154815290600101906020018083116111e357829003601f168201915b5050965050505050505060405180910390a1610109600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460018160011615610100020316600290046000825580601f1061128957506112c6565b601f0160209004906000526020600020908101906112c591906112a7565b808211156112c157600081815060009055506001016112a7565b5090565b5b50505060019150506112d6565b5b505b919050565b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549250600083141561132457611535565b610103600050600086815260200190815260200160002060005091506000826000016000505414156113fd57600060005054826000016000508190555060008260010160005081905550610104600050805480919060010190908154818355818115116113c3578183600052602060002091820191016113c291906113a4565b808211156113be57600081815060009055506001016113a4565b5090565b5b5050508260020160005081905550846101046000508360020160005054815481101561000257906000526020600020900160005b50819055505b8260020a90506000818360010160005054161415611534577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda3386604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a16001826000016000505411151561150757610104600050610103600050600087815260200190815260200160002060005060020160005054815481101561000257906000526020600020900160005b50600090556101036000506000868152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550506001935061153556611533565b816000016000818150548092919060019003919050555080826001016000828282505417925050819055505b5b5b505050919050565b60006000600190505b6001600050548110156116d2575b60016000505481108015611580575060006002600050826101008110156100025790900160005b505414155b15611592578080600101915050611554565b5b60016001600050541180156115c45750600060026000506001600050546101008110156100025790900160005b5054145b156115e357600160008181505480929190600190039190505550611593565b600160005054811080156116145750600060026000506001600050546101008110156100025790900160005b505414155b8015611637575060006002600050826101008110156100025790900160005b5054145b156116cd5760026000506001600050546101008110156100025790900160005b50546002600050826101008110156100025790900160005b50819055508061010260005060006002600050846101008110156100025790900160005b5054815260200190815260200160002060005081905550600060026000506001600050546101008110156100025790900160005b50819055505b611546565b5b5090565b60006116e2336109a5565b1561177157610107600050546116f6611980565b111561171b57600061010660005081905550611710611980565b610107600050819055505b610106600050548261010660005054011015801561174757506101056000505482610106600050540111155b15611768578161010660008282825054019250508190555060019050611772565b60009050611772565b5b919050565b60006000610104600050805490509150600090505b8181101561187857610109600050600061010460005083815481101561000257906000526020600020900160005b5054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460018160011615610100020316600290046000825580601f1061182a5750611867565b601f0160209004906000526020600020908101906118669190611848565b808211156118625760008181506000905550600101611848565b5090565b5b5050505b806001019050805061178c565b611880611885565b5b5050565b60006000610104600050805490509150600090505b8181101561193857600060010261010460005082815481101561000257906000526020600020900160005b505414151561192a57610103600050600061010460005083815481101561000257906000526020600020900160005b50548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b806001019050805061189a565b61010460005080546000825590600052602060002090810190611979919061195b565b80821115611975576000818150600090555060010161195b565b5090565b5b505b5050565b6000620151804204905061198f565b9056",originalContractAddress=f,contractVersions=[{original:"971ac1efe62de02ab7497cf2cad2b93ce990a8d11c3a544943baf807e42eab7d",stub:!1,address:"0x4efc6389b88569a375668b7b3bd4a9b6c8f4a942"},{original:"8207780d6fb31803373aff97360562231187ebb0da6b4678eeb68ceb16897509",stub:"",address:"0x273930d21e01ee25e4c219b63259d214872220a2"}],web3.eth.getBlock(0,function(f,e){if(!f)switch(e.hash){case"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3":Session.set("network","main");break;case"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177":Session.set("network","rinkeby");break;case"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d":Session.set("network","ropsten");break;default:Session.set("network","private")}});var a=function(f){return walletStubABI=walletStubABI.replace("cafecafecafecafecafecafecafecafecafecafe",f.replace("0x","")),originalContractAddress=f,walletStubABI},b=function(){var f=web3.eth.accounts[0];EthElements.Modal.question({text:new Spacebars.SafeString(TAPi18n.__("wallet.modals.testnetWallet.walletNeedsDeployment",{account:f})),cancel:!0,ok:function(){EthElements.Modal.show("views_modals_loading",{closeable:!1}),WalletContract["new"]([],"","",{from:f,data:walletABI,gas:2e6},function(f,e){f?(GlobalNotification.error({content:f.message,duration:8}),EthElements.Modal.hide()):e.address?(console.log("Contract created at: ",e.address),LocalStore.set("ethereum_testnetWalletContractAddress",e.address),a(e.address),EthElements.Modal.question({text:new Spacebars.SafeString(TAPi18n.__("wallet.modals.testnetWallet.testnetWalletDeployed",{address:web3.toChecksumAddress(e.address)})),ok:!0})):console.log("Contract creation transaction hash: ",e.transactionHash)})}},{closeable:!1})},t=function(b,t){web3.eth.getCode(b,function(n,c){n?GlobalNotification.error({content:n.message,duration:8}):c.length>2?(a(b),b===f&&console.log("Use Main-net wallet as code base for stubs on address: ",b),b===e&&console.log("Use Test-net wallet as code base for stubs on address: ",b)):t()})};checkForOriginalWallet=function(){return;var n=!1;_.each(_.pluck(EthAccounts.find({}).fetch(),"balance"),function(f){new BigNumber(f,"10").gt(1e18)&&(n=!0)}),n&&t(f,function(){t(e,function(){var f=LocalStore.get("ethereum_testnetWalletContractAddress");f?web3.eth.getCode(f,function(e,t){e?GlobalNotification.error({content:e.message,duration:8}):t.length>2?(a(f),console.log("Use private-net wallet as code base for stubs on address: ",f)):b()}):b()})})},checkWalletOwners=function(f){return new P(function(e,a){var b={owners:!1,info:""};if(web3.isAddress(f)){f=f.toLowerCase();var t=WalletContract.at(f);t.m_numOwners(function(n,c){if(n)a(n);else if(c=c.toNumber(),c>0){var d=[];P.all(_.map(_.range(100),function(e){return new P(function(a,b){web3.eth.getStorageAt(f,2+e,function(f,e){if(!f){if(e=e.replace("0x000000000000000000000000","0x"),d.length>c)return a();web3.isAddress(e)&&"0x0000000000000000000000000000000000000000"!==e?t.isOwner.call(e,{from:e},function(f,b){!f&&b&&(d.push(e),d=_.uniq(d),d.sort()),a()}):a()}})})})).then(function(){b.owners=d,(account=Helpers.getAccountByAddress({$in:d}))?b.info=TAPi18n.__("wallet.newWallet.accountType.import.youreOwner",{account:account.name}):b.info=TAPi18n.__("wallet.newWallet.accountType.import.watchOnly"),e(b)},function(){a()})}else b.info=TAPi18n.__("wallet.newWallet.accountType.import.notWallet"),e(b)})}})}}).call(this); + +(function(){function e(e){var t="0x0000000000000000000000000000000000000000000000000000000000000000";if(""!=e)for(var a=e.split("."),s=a.length-1;s>=0;s--)t=n(t+n(a[s]).slice(2),{encoding:"hex"});return t.toString()}Helpers={},Helpers.getDefaultContractExample=function(e){var n="contract MyContract {\n /* Constructor */\n function MyContract() {\n\n }\n}";if(e)return n;var t;return t="undefined"!=typeof mist&&mist.solidity&&mist.solidity.version?mist.solidity.version:"0.4.6","pragma solidity ^"+t+";\n\n"+n},Helpers.rerun={"10s":new ReactiveTimer(10),"1s":new ReactiveTimer(1)},Helpers.sortByBalance=function(e,n){return!n.disabled&&new BigNumber(n.balance,10).gt(new BigNumber(e.balance,10))?1:-1},Helpers.getOwnedAccountFrom=function(e){var n=EthAccounts.find({},{sort:{balance:1}}).fetch();n.sort(Helpers.sortByBalance);var t=_.find(n,function(n){return e.indexOf(n.address)>=0});return t?t.address:""},Helpers.getLocalStorageSize=function(){var e=0;return localStorage&&_.each(Object.keys(localStorage),function(n){e+=2*localStorage[n].length/1024/1024}),e},Helpers.makeId=function(e,n){return _.isString(n)?e+"_"+n.replace("0x","").substr(0,10):null},Helpers.formatNumberByDecimals=function(e,n){var t="0,0.";for(i=0;i$1 '),-1!==e.type.indexOf("[")||"string"!==e.typeShort&&"uint"!==e.typeShort&&"int"!=e.typeShort&&"address"!=e.typeShort&&"bool"!=e.typeShort&&"bytes"!=e.typeShort?e.template="elements_input_json":e.template="elements_input_"+e.typeShort,e},Helpers.addInputValue=function(e,n,t){return _.map(e,function(e){var a=_.isUndefined(e.value)?"":e.value;if(n.name===e.name&&n.type===e.type&&n.index===e.index){if(-1!==e.type.indexOf("["))try{a=JSON.parse(t.value)}catch(s){a=[]}else a=_.isEmpty(t.value)||"bytes"!==e.typeShort&&"address"!==e.typeShort?"bool"===e.typeShort?!!t.checked:t.value||"":/^[0-9a-f]+$/i.test(t.value.replace("0x",""))?"0x"+t.value.replace("0x",""):null;e.value=a}return a})||[]},Helpers.toSentence=function(e,n){return"undefined"==typeof e?!1:(e=e.replace(/[^a-z0-9_]/gi,""),n===!0?e.replace(/([A-Z]+|[0-9]+)/g," $1").trim():e.replace(/([A-Z]+|[0-9]+)/g," $1").trim().replace(/([\_])/g,'$1'))},Helpers.isOnMainNetwork=function(){return"main"==Session.get("network")};var n=function(e,n){return"0x"+web3.sha3(e,n).replace("0x","")},t=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"}],a=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"}],s="0x314159265dd8dbb310642f98f50c066173c1259b";Helpers.getENSName=function(n,o){if("main"!==Session.get("network"))return void o("Cannot retrieve ENS addresses unless fully synced on main chain",null,null);var r=e(n.toLowerCase().replace("0x","")+".addr.reverse"),i=web3.eth.contract(t),p=web3.eth.contract(a);i.at(s,function(n,t){t.resolver(r,function(n,a){n?o(n,null,null):0==a?o("no resolver address",null,null):p.at(a).name(r,function(a,s){if(n)o(n,null,null);else if(0==s)o("Found resolver but no name",null,null);else{var r=e(s);t.resolver(r,function(e,n){e?o(e,null,null):0==n?o("Name has no resolver",null,null):p.at(n).addr(r,function(n,t){e?o(e,null,null):0==t?o("No address returned",null,null):o(n,s,t)})})}})})})}}).call(this); + +(function(){Template.registerHelper("debug",function(e){console.log(e)}),Template.registerHelper("isMist",function(){return"undefined"!=typeof mist}),Template.registerHelper("isWalletMode",function(){return"wallet"===window.mistMode||"undefined"==typeof mist}),Template.registerHelper("isEtherUnit",function(){var e=EthTools.getUnit();return!("usd"===e||"eur"===e||"btc"===e)}),Template.registerHelper("isVulnerable",function(e){var t=_.isString(e)?Helpers.getAccountByAddress(e):this;if(t){if(_.find(t.vulnerabilities||[],function(e){return e}))return t;var r=_.map(Wallets.find({vulnerabilities:{$exists:!0}}).fetch(),function(e){return _.find(e.vulnerabilities||[],function(e){return e})?e:!1}),n=_.find(r,function(e){return _.contains(e.owners,t.address)});return n?(t.vulnerabilities=n.vulnerabilities,t):!1}}),Template.registerHelper("unit",function(){return EthTools.getUnit()}),Template.registerHelper("latestBlock",function(){return EthBlocks.latest}),Template.registerHelper("selectAccounts",function(e){var t=EthAccounts.find({balance:{$ne:"0"}},{sort:{balance:1}}).fetch();return e!==!0&&(t=_.union(Wallets.find({owners:{$in:_.pluck(EthAccounts.find().fetch(),"address")},address:{$exists:!0}},{sort:{name:1}}).fetch(),t)),t}),Template.registerHelper("isWatchOnly",Helpers.isWatchOnly),Template.registerHelper("walletIcon",function(){var e="";return e=_.isUndefined(this.owners)?'':Helpers.isWatchOnly(this._id)?'':'',new Spacebars.SafeString(e)}),Template.registerHelper("accountNameOrAddress",function(e){return(account=Helpers.getAccountByAddress(e))?account.name:e}),Template.registerHelper("formatNumberByDecimals",Helpers.formatNumberByDecimals),Template.registerHelper("formatTime",Helpers.formatTime),Template.registerHelper("formatTransactionBalance",Helpers.formatTransactionBalance),Template.registerHelper("toChecksumAddress",function(e){return _.isString(e)?web3.toChecksumAddress(e):""}),Template.registerHelper("toSentence",Helpers.toSentence)}).call(this); + +(function(){!function(){function e(e){var t=function(e,t){return s("",e,t)},o=i;e&&(i[e]||(i[e]={}),o=i[e]),o.define&&o.define.packaged||(n.original=o.define,o.define=n,o.define.packaged=!0),o.require&&o.require.packaged||(s.original=o.require,o.require=t,o.require.packaged=!0)}var t="ace",i=function(){return this}();if(t||"undefined"==typeof requirejs){var n=function(e,t,i){return"string"!=typeof e?void(n.original?n.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(i=t),n.modules||(n.modules={},n.payloads={}),n.payloads[e]=i,n.modules[e]=null,void 0)},s=function(e,t,i){if("[object Array]"===Object.prototype.toString.call(t)){for(var n=[],o=0,a=t.length;a>o;++o){var l=r(e,t[o]);if(!l&&s.original)return s.original.apply(window,arguments);n.push(l)}i&&i.apply(null,n)}else{if("string"==typeof t){var h=r(e,t);return!h&&s.original?s.original.apply(window,arguments):(i&&i(),h)}if(s.original)return s.original.apply(window,arguments)}},o=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return o(e,i[0])+"!"+o(e,i[1])}if("."==t.charAt(0)){var n=e.split("/").slice(0,-1).join("/");for(t=n+"/"+t;-1!==t.indexOf(".")&&s!=t;){var s=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},r=function(e,t){t=o(e,t);var i=n.modules[t];if(!i){if(i=n.payloads[t],"function"==typeof i){var r={},a={id:t,uri:"",exports:r,packaged:!0},l=function(e,i){return s(t,e,i)},h=i(l,r,a);r=h||a.exports,n.modules[t]=r,delete n.payloads[t]}i=n.modules[t]=r||i}return i};e(t)}}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,i){"use strict";function n(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function s(e,t,i){if(Array.prototype.indexOf)return e.indexOf(t,i);for(var n=i||0;n1&&s(t,"")>-1&&(l=RegExp(this.source,o.replace.call(n(this),"g","")),o.replace.call(e.slice(t.index),l,function(){for(var e=1;et.index&&this.lastIndex--}return t},a||(RegExp.prototype.test=function(e){var t=o.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,i){function n(){}function s(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function o(e){return e=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function r(e){var t=typeof e;return null===e||"undefined"===t||"boolean"===t||"number"===t||"string"===t}function a(e){var t,i,n;if(r(e))return e;if(i=e.valueOf,"function"==typeof i&&(t=i.call(e),r(t)))return t;if(n=e.toString,"function"==typeof n&&(t=n.call(e),r(t)))return t;throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=u.call(arguments,1),s=function(){if(this instanceof s){var n=t.apply(this,i.concat(u.call(arguments)));return Object(n)===n?n:this}return t.apply(e,i.concat(u.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,s.prototype=new n,n.prototype=null),s});var l=Function.prototype.call,h=Array.prototype,c=Object.prototype,u=h.slice,d=l.bind(c.toString),g=l.bind(c.hasOwnProperty),f,m,p,A,C;if((C=g(c,"__defineGetter__"))&&(f=l.bind(c.__defineGetter__),m=l.bind(c.__defineSetter__),p=l.bind(c.__lookupGetter__),A=l.bind(c.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],i;return t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),i=t.length,t.splice(5,0,"XXX"),i+1==t.length,i+1==t.length?!0:void 0}()){var F=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?F.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(u.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):void 0==e?e=0:0>e&&(e=Math.max(i+e,0)),i>e+t||(t=i-e);var n=this.slice(e,e+t),s=u.call(arguments,2),o=s.length;if(e===i)o&&this.push.apply(this,s);else{var r=Math.min(t,i-e),a=e+r,l=a+o-r,h=i-a,c=i-r;if(a>l)for(var d=0;h>d;++d)this[l+d]=this[a+d];else if(l>a)for(d=h;d--;)this[l+d]=this[a+d];if(o&&e===c)this.length=c,this.push.apply(this,s);else for(this.length=c+o,d=0;o>d;++d)this[e+d]=s[d]}return n};Array.isArray||(Array.isArray=function(e){return"[object Array]"==d(e)});var v=Object("a"),w="a"!=v[0]||!(0 in v);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=I(this),i=w&&"[object String]"==d(this)?this.split(""):t,n=arguments[1],s=-1,o=i.length>>>0;if("[object Function]"!=d(e))throw new TypeError;for(;++s>>0,s=Array(n),o=arguments[1];if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");for(var r=0;n>r;r++)r in i&&(s[r]=e.call(o,i[r],r,t));return s}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=I(this),i=w&&"[object String]"==d(this)?this.split(""):t,n=i.length>>>0,s=[],o,r=arguments[1];if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");for(var a=0;n>a;a++)a in i&&(o=i[a],e.call(r,o,a,t)&&s.push(o));return s}),Array.prototype.every||(Array.prototype.every=function(e){var t=I(this),i=w&&"[object String]"==d(this)?this.split(""):t,n=i.length>>>0,s=arguments[1];if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");for(var o=0;n>o;o++)if(o in i&&!e.call(s,i[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=I(this),i=w&&"[object String]"==d(this)?this.split(""):t,n=i.length>>>0,s=arguments[1];if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");for(var o=0;n>o;o++)if(o in i&&e.call(s,i[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=I(this),i=w&&"[object String]"==d(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var s=0,o;if(arguments.length>=2)o=arguments[1];else for(;;){if(s in i){o=i[s++];break}if(++s>=n)throw new TypeError("reduce of empty array with no initial value")}for(;n>s;s++)s in i&&(o=e.call(void 0,o,i[s],s,t));return o}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=I(this),i=w&&"[object String]"==d(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,o=n-1;if(arguments.length>=2)s=arguments[1];else for(;;){if(o in i){s=i[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do o in this&&(s=e.call(void 0,s,i[o],o,t));while(o--);return s}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=w&&"[object String]"==d(this)?this.split(""):I(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=o(arguments[1])),n=n>=0?n:Math.max(0,i+n);i>n;n++)if(n in t&&t[n]===e)return n;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=w&&"[object String]"==d(this)?this.split(""):I(this),i=t.length>>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,o(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:c)}),!Object.getOwnPropertyDescriptor){var E="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(E+e);if(g(e,t)){var i,n,s;if(i={enumerable:!0,configurable:!0},C){var o=e.__proto__;e.__proto__=c;var n=p(e,t),s=A(e,t);if(e.__proto__=o,n||s)return n&&(i.get=n),s&&(i.set=s),i}return i.value=e[t],i}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var $;$=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var i;if(null===e)i=$();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,i=new n,i.__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i}}if(Object.defineProperty){var b=s({}),y="undefined"==typeof document||s(document.createElement("div"));if(!b||!y)var B=Object.defineProperty}if(!Object.defineProperty||B){var D="Property description must be an object: ",S="Object.defineProperty called on non-object: ",k="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(S+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError(D+i);if(B)try{return B.call(Object,e,t,i)}catch(n){}if(g(i,"value"))if(C&&(p(e,t)||A(e,t))){var s=e.__proto__;e.__proto__=c,delete e[t],e[t]=i.value,e.__proto__=s}else e[t]=i.value;else{if(!C)throw new TypeError(k);g(i,"get")&&f(e,t,i.get),g(i,"set")&&m(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)g(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(x){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";g(e,t);)t+="?";e[t]=!0;var i=g(e,t);return delete e[t],i}),!Object.keys){var L=!0,R=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],M=R.length;for(var T in{toString:null})L=!1;Object.keys=function P(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var P=[];for(var t in e)g(e,t)&&P.push(t);if(L)for(var i=0,n=M;n>i;i++){var s=R[i];g(e,s)&&P.push(s)}return P}}Date.now||(Date.now=function(){return(new Date).getTime()});var _=" \n \f\r   ᠎              \u2028\u2029\ufeff";if(!String.prototype.trim||_.trim()){_="["+_+"]";var O=new RegExp("^"+_+_+"*"),W=new RegExp(_+_+"*$");String.prototype.trim=function(){return String(this).replace(O,"").replace(W,"")}}var I=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,i){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,i){"use strict";var n="http://www.w3.org/1999/xhtml";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||n,e):document.createElement(e)},t.hasCssClass=function(e,t){var i=(e.className||"").split(/\s+/g);return-1!==i.indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var s=i.indexOf(t);if(-1==s)break;n=!1,i.splice(s,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i=0,n;if(t=t||document,t.createStyleSheet&&(n=t.styleSheets)){for(;i=0?(s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]:(s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((s.match(/rv\:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isIPad=s.indexOf("iPad")>=0,t.isTouchPad=s.indexOf("TouchPad")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";function n(e,t,i){var n=r(t);if(!o.isMac&&a){if((a[91]||a[92])&&(n|=8),a.altGr){if(3==(3&n))return;a.altGr=0}if(18===i||17===i){var h="location"in t?t.location:t.keyLocation;if(17===i&&1===h)l=t.timeStamp;else if(18===i&&3===n&&2===h){var c=-l;l=t.timeStamp,c+=l,3>c&&(a.altGr=!0)}}}if(i in s.MODIFIER_KEYS){switch(s.MODIFIER_KEYS[i]){case"Alt":n=2;break;case"Shift":n=4;break;case"Ctrl":n=1;break;default:n=8}i=-1}if(8&n&&(91===i||93===i)&&(i=-1),!n&&13===i){var h="location"in t?t.location:t.keyLocation;if(3===h&&(e(t,n,-i),t.defaultPrevented))return}if(o.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return n||i in s.FUNCTION_KEYS||i in s.PRINTABLE_KEYS?e(t,n,i):!1}var s=e("./keys"),o=e("./useragent");t.addListener=function(e,t,i){if(e.addEventListener)return e.addEventListener(t,i,!1);if(e.attachEvent){var n=function(){i.call(e,window.event)};i._wrapper=n,e.attachEvent("on"+t,n)}},t.removeListener=function(e,t,i){return e.removeEventListener?e.removeEventListener(t,i,!1):void(e.detachEvent&&e.detachEvent("on"+t,i._wrapper||i))},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||o.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,i,n){function s(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",s,!0),t.removeListener(document,"dragstart",s,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",s,!0),t.addListener(document,"dragstart",s,!0),s},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){var t=8;void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),i(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0,e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}i(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),i(e)})},t.addMultiMouseDownListener=function(e,i,n,s){var r=0,a,l,h,c={2:"dblclick",3:"tripleclick",4:"quadclick"};t.addListener(e,"mousedown",function(e){if(0!==t.getButton(e)?r=0:e.detail>1?(r++,r>4&&(r=1)):r=1,o.isIE){var u=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;(!h||u)&&(r=1),h&&clearTimeout(h),h=setTimeout(function(){h=null},i[r-1]||600),1==r&&(a=e.clientX,l=e.clientY)}if(e._clicks=r,n[s]("mousedown",e),r>4)r=0;else if(r>1)return n[s](c[r],e)}),o.isOldIE&&t.addListener(e,"dblclick",function(e){r=2,h&&clearTimeout(h),h=setTimeout(function(){h=null},i[r-1]||600),n[s]("mousedown",e),n[s](c[r],e)})};var r=!o.isMac||!o.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};t.getModifierString=function(e){return s.KEY_MODS[r(e)]};var a=null,l=0;if(t.addCommandKeyListener=function(e,i){var s=t.addListener;if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var r=null;s(e,"keydown",function(e){r=e.keyCode}),s(e,"keypress",function(e){return n(i,e,r)})}else{var l=null;s(e,"keydown",function(e){a[e.keyCode]=!0;var t=n(i,e,e.keyCode);return l=e.defaultPrevented,t}),s(e,"keypress",function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)}),s(e,"keyup",function(e){a[e.keyCode]=null}),a||(a=Object.create(null),s(window,"focus",function(e){a=Object.create(null)}))}},window.postMessage&&!o.isOldIE){var h=1;t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-"+h;t.addListener(i,"message",function s(o){o.data==n&&(t.stopPropagation(o),t.removeListener(i,"message",s),e())}),i.postMessage(n,"*")}}t.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;n>i;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=function(e){if("object"!=typeof e||!e)return e;var i=e.constructor;if(i===RegExp)return e;var n=i();for(var s in e)"object"==typeof e[s]?n[s]=t.deepCopy(e[s]):n[s]=e[s];return n},t.arrayToMap=function(e){for(var t={},i=0;ii?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/dom"),a=e("../lib/event"),l=e("../lib/useragent"),h=0;(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var n=this.editor,s=e.getButton();if(0!==s){var o=n.getSelectionRange(),r=o.isEmpty();return n.$blockScrolling++,r&&n.selection.moveToPosition(i),n.$blockScrolling--,n.textInput.onContextMenu(e.domEvent),void 0}return this.mousedownEvent.time=Date.now(),!t||n.isFocused()||(n.focus(),!this.$focusTimout||this.$clickSelection||n.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;i.$blockScrolling++,this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"),i.$blockScrolling--},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var s=o(this.$clickSelection,i);i=s.cursor,e=s.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),s=i.selection[e](n.row,n.column);if(i.$blockScrolling++,this.$clickSelection){var r=this.$clickSelection.comparePoint(s.start),a=this.$clickSelection.comparePoint(s.end);if(-1==r&&0>=a)t=this.$clickSelection.end,(s.end.row!=n.row||s.end.column!=n.column)&&(n=s.start);else if(1==a&&r>=0)t=this.$clickSelection.start,(s.start.row!=n.row||s.start.column!=n.column)&&(n=s.end);else if(-1==r&&1==a)n=s.end,t=s.start;else{var l=o(this.$clickSelection,n);n=l.cursor,t=l.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.$blockScrolling--,i.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>h||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session,s=n.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,i=t-(this.$lastScrollTime||0),n=this.editor,s=n.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);return s||200>i?(this.$lastScrollTime=t,n.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(n.prototype),t.DefaultHandlers=n}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var s=e("./lib/oop"),o=e("./lib/dom");(function(){this.$init=function(){return this.$element=o.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){o.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){o.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(n.prototype),t.Tooltip=n}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,i){"use strict";function n(e){function t(){var t=u.getDocumentPosition().row,s=l.$annotations[t];if(!s)return i();var o=r.session.getLength();if(t==o){var a=r.renderer.pixelToScreenCoordinates(0,u.y).row,c=u.$pos;if(a>r.session.documentToScreenRow(c.row,c.column))return i()}if(d!=s)if(d=s.text.join("
"),h.setHtml(d),h.show(),r.on("mousewheel",i),e.$tooltipFollowsMouse)n(u);else{var g=l.$cells[r.session.documentToScreenRow(t,0)].element,f=g.getBoundingClientRect(),m=h.getElement().style;m.left=f.right+"px",m.top=f.bottom+"px"}}function i(){c&&(c=clearTimeout(c)),d&&(h.hide(),d=null,r.removeEventListener("mousewheel",i))}function n(e){h.setPosition(e.x,e.y)}var r=e.editor,l=r.renderer.$gutterLayer,h=new s(r.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(r.isFocused()&&0==t.getButton()){var i=l.getRegion(t);if("foldWidgets"!=i){var n=t.getDocumentPosition().row,s=r.session.selection;if(t.getShiftKey())s.selectTo(n,0);else{if(2==t.domEvent.detail)return r.selectAll(),t.preventDefault();e.$clickSelection=r.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}});var c,u,d;e.editor.setDefaultHandler("guttermousemove",function(s){var r=s.domEvent.target||s.domEvent.srcElement;return o.hasCssClass(r,"ace_fold-widget")?i():(d&&e.$tooltipFollowsMouse&&n(s),u=s,void(c||(c=setTimeout(function(){c=null,u&&!e.isMousePressed?t():i()},50))))}),a.addListener(r.renderer.$gutter,"mouseout",function(e){u=null,d&&!c&&(c=setTimeout(function(){c=null,i()},50))}),r.on("changeSession",i)}function s(e){l.call(this,e)}var o=e("../lib/dom"),r=e("../lib/oop"),a=e("../lib/event"),l=e("../tooltip").Tooltip;r.inherits(s,l),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,s=this.getWidth(),o=this.getHeight();e+=15,t+=15,e+s>i&&(e-=e+s-i),t+o>n&&(t-=20+o),l.prototype.setPosition.call(this,e,t)}}.call(s.prototype),t.GutterHandler=n}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=t.contains(i.row,i.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=s.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";function n(e){function t(e,t){var i=Date.now(),n=!t||e.row!=t.row,o=!t||e.column!=t.column;if(!x||n||o)p.$blockScrolling+=1,p.moveCursorToPosition(e),p.$blockScrolling-=1,x=i,L={x:w,y:E};else{var r=s(L.x,L.y,w,E);r>c?x=null:i-x>=h&&(p.renderer.scrollCursorIntoView(),x=null)}}function i(e,t){var i=Date.now(),n=p.renderer.layerConfig.lineHeight,s=p.renderer.layerConfig.characterWidth,o=p.renderer.scroller.getBoundingClientRect(),r={x:{left:w-o.left,right:o.right-w},y:{top:E-o.top,bottom:o.bottom-E}},a=Math.min(r.x.left,r.x.right),h=Math.min(r.y.top,r.y.bottom),c={row:e.row,column:e.column};2>=a/s&&(c.column+=r.x.left=h/n&&(c.row+=r.y.top=l&&p.renderer.scrollCursorIntoView(c):k=i:k=null}function n(){var e=y;y=p.renderer.screenToTextCoordinates(w,E),t(y,e),i(y,e)}function u(){b=p.selection.toOrientedRange(),v=p.session.addMarker(b,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval($),n(),$=setInterval(n,20),B=0,r.addListener(document,"mousemove",g)}function d(){clearInterval($),p.session.removeMarker(v),v=null,p.$blockScrolling+=1,p.selection.fromOrientedRange(b),p.$blockScrolling-=1,p.isFocused()&&!S&&p.renderer.$cursorLayer.setBlinking(!p.getReadOnly()),b=null,y=null,B=0,k=null,x=null,r.removeListener(document,"mousemove",g)}function g(){null==R&&(R=setTimeout(function(){null!=R&&v&&d()},20))}function f(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function m(e){var t=["copy","copymove","all","uninitialized"],i=["move","copymove","linkmove","all","uninitialized"],n=a.isMac?e.altKey:e.ctrlKey,s="uninitialized";try{s=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&t.indexOf(s)>=0?o="copy":i.indexOf(s)>=0?o="move":t.indexOf(s)>=0&&(o="copy"),o}var p=e.editor,A=o.createElement("img");A.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",a.isOpera&&(A.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var C=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];C.forEach(function(t){e[t]=this[t]},this),p.addEventListener("mousedown",this.onMouseDown.bind(e));var F=p.container,v,w,E,$,b,y,B=0,D,S,k,x,L;this.onDragStart=function(e){if(this.cancelDrag||!F.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}b=p.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=p.getReadOnly()?"copy":"copyMove",a.isOpera&&(p.container.appendChild(A),A.scrollTop=0),i.setDragImage&&i.setDragImage(A,0,0),a.isOpera&&p.container.removeChild(A),i.clearData(),i.setData("Text",p.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(e){if(F.draggable=!1,S=!1,this.setState(null),!p.getReadOnly()){var t=e.dataTransfer.dropEffect;!D&&"move"==t&&p.session.remove(p.getSelectionRange()),p.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){return!p.getReadOnly()&&f(e.dataTransfer)?(w=e.clientX,E=e.clientY,v||u(),B++,e.dataTransfer.dropEffect=D=m(e),r.preventDefault(e)):void 0},this.onDragOver=function(e){return!p.getReadOnly()&&f(e.dataTransfer)?(w=e.clientX,E=e.clientY,v||(u(),B++),null!==R&&(R=null),e.dataTransfer.dropEffect=D=m(e),r.preventDefault(e)):void 0},this.onDragLeave=function(e){return B--,0>=B&&v?(d(),D=null,r.preventDefault(e)):void 0},this.onDrop=function(e){if(y){var t=e.dataTransfer;if(S)switch(D){case"move":b=b.contains(y.row,y.column)?{start:y,end:y}:p.moveText(b,y);break;case"copy":b=p.moveText(b,y,!0)}else{var i=t.getData("Text");b={start:y,end:p.session.insert(y,i)},p.focus(),D=null}return d(),r.preventDefault(e)}},r.addListener(F,"dragstart",this.onDragStart.bind(e)),r.addListener(F,"dragend",this.onDragEnd.bind(e)),r.addListener(F,"dragenter",this.onDragEnter.bind(e)),r.addListener(F,"dragover",this.onDragOver.bind(e)),r.addListener(F,"dragleave",this.onDragLeave.bind(e)),r.addListener(F,"drop",this.onDrop.bind(e));var R=null}function s(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}var o=e("../lib/dom"),r=e("../lib/event"),a=e("../lib/useragent"),l=200,h=200,c=5;(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var i=a.isWin?"default":"move";e.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(a.isIE&&"dragReady"==this.state){var i=s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&t.dragDrop()}if("dragWait"===this.state){var i=s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,i=e.inSelection(),n=e.getButton(),s=e.domEvent.detail||1;if(1===s&&0===n&&i){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(a.isWebKit){this.cancelDrag=!0;var r=t.container;r.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(n.prototype),t.DragdropHandler=n}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){var i=n.getDocumentHead(),s=document.createElement("script");s.src=e,i.appendChild(s),s.onload=s.onreadystatechange=function(e,i){(i||!s.readyState||"loaded"==s.readyState||"complete"==s.readyState)&&(s=s.onload=s.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,i){"use strict";var n={},s=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=s),t.preventDefault||(t.preventDefault=o),i=i.slice();for(var r=0;rp;p++){var C=m[p];0===C.name.indexOf("data-ace-")&&(o[s(C.name.replace(/^data-ace-/,""))]=C.value)}var F=f.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);F&&(r=F[1])}}r&&(o.base=o.base||r,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base;for(var v in o)"undefined"!=typeof o[v]&&t.set(v,o[v])}function s(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var o=e("./lib/lang"),r=e("./lib/oop"),a=e("./lib/net"),l=e("./lib/app_config").AppConfig;i.exports=t=new l;var h=function(){return this}(),c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return c[e]},t.set=function(e,t){if(!c.hasOwnProperty(e))throw new Error("Unknown config key: "+e);c[e]=t},t.all=function(){return o.copyObject(c)},t.moduleUrl=function(e,t){if(c.$moduleUrls[e])return c.$moduleUrls[e];var i=e.split("/");t=t||i[i.length-2]||"";var n="snippets"==t?"/":"-",s=i[i.length-1];if("worker"==t&&"-"==n){var o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");s=s.replace(o,"")}(!s||s==t)&&i.length>1&&(s=i[i.length-2]);var r=c[t+"Path"];return null==r?r=c.basePath:"/"==n&&(t=n=""),r&&"/"!=r.slice(-1)&&(r+="/"),r+t+n+s+this.get("suffix")},t.setModuleUrl=function(e,t){return c.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(i,n){var s,o;Array.isArray(i)&&(o=i[0],i=i[1]);try{s=e(i)}catch(r){}if(s&&!t.$loading[i])return n&&n(s);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var l=function(){e([i],function(e){t._emit("load.module",{name:i,module:e});var n=t.$loading[i];t.$loading[i]=null,n.forEach(function(t){t&&t(e)})})};return t.get("packaged")?void a.loadScript(t.moduleUrl(i,o),l):l()}},t.init=n}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,r=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,h=e("../config"),c=function(e){var t=this;this.editor=e,new o(this),new r(this),new l(this);var i=function(t){(!document.hasFocus||!document.hasFocus())&&window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();n.addListener(a,"click",this.onMouseEvent.bind(this,"click")),n.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener(a,[400,300,250],this,"onMouseEvent"),e.renderer.scrollBarV&&(n.addMultiMouseDownListener(e.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),n.addMultiMouseDownListener(e.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),s.isIE&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",i),n.addListener(e.renderer.scrollBarH.element,"mousedown",i))),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"));var h=e.renderer.$gutter;n.addListener(h,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(h,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(h,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(h,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(a,"mousedown",i),n.addListener(h,"mousedown",function(t){return e.focus(),n.preventDefault(t)}),e.on("mousemove",function(i){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var n=e.renderer.screenToTextCoordinates(i.x,i.y),s=e.session.selection.getRange(),o=e.renderer;o.setCursorStyle(!s.isEmpty()&&s.insideStart(n.row,n.column)?"default":"")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var i=new a(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var i=this.editor.renderer;i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=null);var o=this,r=function(e){return e?s.isWebKit&&!e.which&&o.releaseMouse?o.releaseMouse():(o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new a(e,o.editor),o.$mouseMoved=!0,void 0):void 0},l=function(e){clearInterval(c),h(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=!0,i.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},h=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(s.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});o.$onCaptureMouseMove=r,o.releaseMouse=n.capture(this.editor.container,r,l);var c=setInterval(h,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(c.prototype),h.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:s.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=c}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,i){"use strict";function n(e){e.on("click",function(t){var i=t.getDocumentPosition(),n=e.session,s=n.getFoldAt(i.row,i.column,1);s&&(t.getAccelKey()?n.removeFold(s):n.expandFold(s),t.stop())}),e.on("gutterclick",function(t){var i=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==i){var n=t.getDocumentPosition().row,s=e.session;s.foldWidgets&&s.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){var i=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==i){var n=t.getDocumentPosition().row,s=e.session,o=s.getParentFoldRangeData(n,!0),r=o.range||o.firstRange;if(r){n=r.start.row;var a=s.getFoldAt(n,s.getLine(n).length,1);a?s.removeFold(a):(s.addFold("...",r),e.renderer.scrollCursorIntoView({row:r.start.row,column:0}))}t.stop()}})}t.FoldHandler=n}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,i){"use strict";var n=e("../lib/keys"),s=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"==typeof e&&!e.handleKeyboard&&(e.handleKeyboard=e);var i=this.$handlers.indexOf(e);-1!=i&&this.$handlers.splice(i,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==i&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1==t?!1:(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,n){for(var o,r=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&(o=this.$handlers[l].handleKeyboard(this.$data,e,t,i,n),!(o&&o.command&&(r="null"==o.command?!0:a.exec(o.command,this.$editor,o.args,n),r&&n&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&s.stopEvent(n),r))););return r},this.onCommandKey=function(e,t,i){var s=n.keyCodeToString(i);this.$callKeyboardHandlers(t,s,i,e)},this.onTextInput=function(e){var t=this.$callKeyboardHandlers(-1,e);t||this.$editor.commands.exec("insertstring",this.$editor,e)}}).call(o.prototype),t.KeyBinding=o}),ace.define("ace/range",["require","exports","module"],function(e,t,i){"use strict";var n=function(e,t){return e.row-t.row||e.column-t.column},s=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return t=this.compare(i.row,i.column),1==t?(t=this.compare(n.row,n.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(n.row,n.column),-1==t?-1:1==t?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return 0==this.compare(e,t)?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return 0==this.compare(e,t)?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else if(this.end.rowt)var n={row:t+1,column:0};else if(this.start.rowt.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?r.fromPoints(t,t):this.isBackwards()?r.fromPoints(t,e):r.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var i=e||this.lead;e=i.row,t=i.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var i="number"==typeof e?e:this.lead.row,n,s=this.session.getFoldLine(i);return s?(i=s.start.row,n=s.end.row):n=i,t===!0?new r(i,0,n,this.session.getLine(n).length):new r(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(0===e.column)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var i=this.session.getTabSize();this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column-i,e.column).split(" ").length-1==i?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=n)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),s;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);return o?void this.moveCursorTo(o.end.row,o.end.column):((s=this.session.nonTokenRe.exec(n))&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(t)),t>=i.length?(this.moveCursorTo(e,i.length),this.moveCursorRight(),e=t?(this.moveCursorTo(e,0),this.moveCursorLeft(),e>0&&this.moveCursorWordLeft(),void 0):((r=this.session.tokenRe.exec(o))&&(t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(e,t))},this.$shortWordEndIndex=function(e){var t,i=0,n,s=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,t=this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{for(;(n=e[i])&&s.test(n);)i++;if(1>i)for(o.lastIndex=0;(n=e[i])&&!o.test(n);)if(o.lastIndex=0,i++,s.test(n)){if(i>2){i--;break}for(;(n=e[i])&&s.test(n);)i++;if(i>2)break}}return o.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),s=this.session.getFoldAt(e,t,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(t==i.length){var o=this.doc.getLength();do e++,n=this.doc.getLine(e);while(o>e&&/^\s*$/.test(n));/^\s+/.test(n)||(n=""),t=0}var r=this.$shortWordEndIndex(n);this.moveCursorTo(e,t+r)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column,i;if(i=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(i.start.row,i.start.column);var n=this.session.getLine(e).substring(0,t);if(0===t){do e--,n=this.doc.getLine(e);while(e>0&&/^\s*$/.test(n));t=n.length,/\s+$/.test(n)||(n="")}var o=s.stringReverse(n),r=this.$shortWordEndIndex(o);return this.moveCursorTo(e,t-r)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column);var n=this.session.screenToDocumentPosition(i.row+e,i.column);0!==e&&0===t&&n.row===this.lead.row&&n.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[n.row]&&n.row++,this.moveCursorTo(n.row,n.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e.call(null,this);var i=this.getCursor();return r.fromPoints(t,i)}catch(n){return r.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=r.fromPoints(e[t].start,e[t].end);e.isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,i){"use strict";var n=e("./config"),s=2e3,o=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){for(var i=this.states[t],n=[],s=0,o=this.matchMappings[t]={defaultToken:"text"},r="g",a=[],l=0;l1?h.onMatch=this.$applyToken:h.onMatch=h.token),u>1&&(/\\\d/.test(h.regex)?c=h.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+s+1)}):(u=1,c=this.removeCapturingGroups(h.regex)),!h.splitRegex&&"string"!=typeof h.token&&a.push(h)),o[s]=l,s+=u,n.push(c),h.onMatch||(h.onMatch=null)}}n.length||(o[0]=0,n.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,r)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",r)}};(function(){this.$setMaxTokenCount=function(e){s=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"==typeof i)return[{type:i,value:e}];for(var n=[],s=0,o=i.length;o>s;s++)t[s]&&(n[n.length]={type:i[s],value:t[s]});return n},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var i=[],n=this.tokenArray,s=0,o=n.length;o>s;s++)t[s+1]&&(i[i.length]={type:n[s],value:t[s+1]});return i},this.removeCapturingGroups=function(e){var t=e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e});return t},this.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var i=0,n=!1,s={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,o,r,a,l){return n?n="]"!=a:a?n=!0:r?(i==s.stack&&(s.end=l+1,s.stack=-1),i--):o&&(i++,1!=o.length&&(s.stack=i,s.start=l)),e}),null!=s.end&&/^\)*$/.test(e.substr(s.end))&&(e=e.substring(0,s.start)+e.substr(s.end))}return new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var i=t.slice(0);t=i[0],"#tmp"===t&&(i.shift(),t=i.shift())}else var i=[];var n=t||"start",o=this.states[n];o||(n="start",o=this.states[n]);var r=this.matchMappings[n],a=this.regExps[n];a.lastIndex=0;for(var l,h=[],c=0,u=0,d={type:null,value:""};l=a.exec(e);){var g=r.defaultToken,f=null,m=l[0],p=a.lastIndex;if(p-m.length>c){var A=e.substring(c,p-m.length);d.type==g?d.value+=A:(d.type&&h.push(d),d={type:g,value:A})}for(var C=0;Cs){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:h,state:i.length?i:n}},this.reportError=n.reportError}).call(o.prototype),t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,i){"use strict";var n=e("../lib/lang"),s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],s=0;s=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0!==i)return i;for(i=0;t>0;)t-=1,i+=e[t].value.length;return i}}).call(n.prototype),t.TokenIterator=n}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var n=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,r=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,h=e("../range").Range,c=function(){this.HighlightRules=s,this.$behaviour=new o};(function(){this.tokenRe=new RegExp("^["+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,i,n){function s(e){for(var t=i;n>=t;t++)e(o.getLine(t),t)}var o=t.doc,r=!0,l=!0,h=1/0,c=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var d=this.lineCommentStart.map(a.escapeRegExp).join("|"),g=this.lineCommentStart[0];else var d=a.escapeRegExp(this.lineCommentStart),g=this.lineCommentStart;d=new RegExp("^(\\s*)(?:"+d+") ?"),u=t.getUseSoftTabs();var f=function(e,t){var i=e.match(d);if(i){var n=i[1].length,s=i[0].length;!C(e,n,s)&&" "==i[0][s-1]&&s--,o.removeInLine(t,n,s)}},m=g+" ",p=function(e,t){(!r||/\S/.test(e))&&(C(e,h,h)?o.insertInLine({row:t,column:h},m):o.insertInLine({row:t,column:h},g))},A=function(e,t){return d.test(e)},C=function(e,t,i){for(var n=0;t--&&" "==e.charAt(t);)n++;if(n%c!=0)return!1;for(var n=0;" "==e.charAt(i++);)n++;return c>2?n%c!=c-1:n%c==0}}else{if(!this.blockComment)return!1;var g=this.blockComment.start,F=this.blockComment.end,d=new RegExp("^(\\s*)(?:"+a.escapeRegExp(g)+")"),v=new RegExp("(?:"+a.escapeRegExp(F)+")\\s*$"),p=function(e,t){A(e,t)||(!r||/\S/.test(e))&&(o.insertInLine({row:t,column:e.length},F),o.insertInLine({row:t,column:h},g))},f=function(e,t){var i;(i=e.match(v))&&o.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(d))&&o.removeInLine(t,i[1].length,i[0].length)},A=function(e,i){if(d.test(e))return!0;for(var n=t.getTokens(i),s=0;si&&(h=i),l&&!A(e,t)&&(l=!1)):w>e.length&&(w=e.length)}),h==1/0&&(h=w,r=!1,l=!1),u&&h%c!=0&&(h=Math.floor(h/c)*c),s(l?f:p)},this.toggleBlockComment=function(e,t,i,n){var s=this.blockComment;if(s){!s.start&&s[0]&&(s=s[0]);var o=new l(t,n.row,n.column),r=o.getCurrentToken(),a=t.selection,c=t.selection.toOrientedRange(),u,d;if(r&&/comment/.test(r.type)){for(var g,f;r&&/comment/.test(r.type);){var m=r.value.indexOf(s.start);if(-1!=m){var p=o.getCurrentTokenRow(),A=o.getCurrentTokenColumn()+m;g=new h(p,A,p,A+s.start.length);break}r=o.stepBackward()}for(var o=new l(t,n.row,n.column),r=o.getCurrentToken();r&&/comment/.test(r.type);){var m=r.value.indexOf(s.end);if(-1!=m){var p=o.getCurrentTokenRow(),A=o.getCurrentTokenColumn()+m;f=new h(p,A,p,A+s.end.length);break}r=o.stepForward()}f&&t.remove(f),g&&(t.remove(g),u=g.start.row,d=-s.start.length)}else d=s.start.length,u=i.start.row,t.insert(i.end,s.end),t.insert(i.start,s.start);c.start.row==u&&(c.start.column+=d),c.end.row==u&&(c.end.column+=d),t.selection.fromOrientedRange(c)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);for(var i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;to;o++)if("string"==typeof s[o].token)/keyword|support|storage/.test(s[o].token)&&i.push(s[o].regex);else if("object"==typeof s[o].token)for(var a=0,l=s[o].token.length;l>a;a++)if(/keyword|support|storage/.test(s[o].token[a])){var n=s[o].regex.match(/\(.+?\)/g)[a];i.push(n.substr(1,n.length-2))}this.completionKeywords=i}return e?i.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,i,n){var s=this.$keywordList||this.$createKeywordList();return s.map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),t.Mode=c}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=t.Anchor=function(e,t,i){this.$onChange=this.onChange.bind(this),this.attach(e),"undefined"==typeof i?this.setPosition(t.row,t.column):this.setPosition(t,i)};(function(){n.implement(this,s),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,i=t.range;if((i.start.row!=i.end.row||i.start.row==this.row)&&!(i.start.row>this.row||i.start.row==this.row&&i.start.column>this.column)){var n=this.row,s=this.column,o=i.start,r=i.end;"insertText"===t.action?o.row===n&&o.column<=s?o.column===s&&this.$insertRight||(o.row===r.row?s+=r.column-o.column:(s-=o.column,n+=r.row-o.row)):o.row!==r.row&&o.row=s?o.column:Math.max(0,s-(r.column-o.column)):o.row!==r.row&&o.row=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):0>e?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),0>t&&(i.column=0),i}}).call(o.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,r=e("./anchor").Anchor,a=function(e){this.$lines=[],0===e.length?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){n.implement(this,s),this.setValue=function(e){var t=this.getLength();this.remove(new o(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new r(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;return e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||0===t.length)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var i=this.$split(t),n=i.splice(0,1)[0],s=0==i.length?null:i.splice(i.length-1,1)[0];return e=this.insertInLine(e,n),null!==s&&(e=this.insertNewLine(e),e=this._insertLines(e.row,i),e=this.insertInLine(e,s||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(0==t.length)return{row:e,column:0};for(;t.length>61440;){var i=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=i.row}var n=[e,0];n.push.apply(n,t),this.$lines.splice.apply(this.$lines,n);var s=new o(e,0,e+t.length,0),r={action:"insertLines",range:s,lines:t};return this._signal("change",{data:r}),s.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var i={row:e.row+1,column:0},n={action:"insertText",range:o.fromPoints(e,i),text:this.getNewLineCharacter()};return this._signal("change",{data:n}),i},this.insertInLine=function(e,t){if(0==t.length)return e;var i=this.$lines[e.row]||"";this.$lines[e.row]=i.substring(0,e.column)+t+i.substring(e.column);var n={row:e.row,column:e.column+t.length},s={action:"insertText",range:o.fromPoints(e,n),text:t};return this._signal("change",{data:s}),n},this.remove=function(e){if(e instanceof o||(e=o.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end),e.isEmpty())return e.start;var t=e.start.row,i=e.end.row;if(e.isMultiLine()){var n=0==e.start.column?t:t+1,s=i-1;e.end.column>0&&this.removeInLine(i,0,e.end.column),s>=n&&this._removeLines(n,s),n!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,i){if(t!=i){var n=new o(e,t,e,i),s=this.getLine(e),r=s.substring(t,i),a=s.substring(0,t)+s.substring(i,s.length);this.$lines.splice(e,1,a);var l={action:"removeText",range:n,text:r};return this._signal("change",{data:l}),n.start}},this.removeLines=function(e,t){return 0>e||t>=this.getLength()?this.remove(new o(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var i=new o(e,0,t+1,0),n=this.$lines.splice(e,t-e+1),s={action:"removeLines",range:i,nl:this.getNewLineCharacter(),lines:n};return this._signal("change",{data:s}),n},this.removeNewLine=function(e){var t=this.getLine(e),i=this.getLine(e+1),n=new o(e,t.length,e+1,0),s=t+i;this.$lines.splice(e,2,s);var r={action:"removeText",range:n,text:this.getNewLineCharacter()};this._signal("change",{data:r})},this.replace=function(e,t){if(e instanceof o||(e=o.fromPoints(e.start,e.end)),0==t.length&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;if(this.remove(e),t)var i=this.insert(e.start,t);else i=e.start;return i},this.applyDeltas=function(e){for(var t=0;t=0;t--){var i=e[t],n=o.fromPoints(i.range.start,i.range.end);"insertLines"==i.action?this._removeLines(n.start.row,n.end.row-1):"insertText"==i.action?this.remove(n):"removeLines"==i.action?this._insertLines(n.start.row,i.lines):"removeText"==i.action&&this.insert(n.start,i.text)}},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,s=t||0,o=i.length;o>s;s++)if(e-=i[s].length+n,0>e)return{row:s,column:e+i[s].length+n};return{row:o-1,column:i[o-1].length}},this.positionToIndex=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,s=0,o=Math.min(e.row,i.length),r=t||0;o>r;++r)s+=i[r].length+n;return s+e.column}}).call(a.prototype),t.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var i=this;this.$worker=function(){if(i.running){for(var e=new Date,t=i.currentLine,n=-1,s=i.doc;i.lines[t];)t++;var o=t,r=s.getLength(),a=0;for(i.running=!1;r>t;){i.$tokenizeRow(t),n=t;do t++;while(i.lines[t]);if(a++,a%5===0&&new Date-e>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,n>=o&&i.fireUpdateEvent(o,n)}}};(function(){n.implement(this,s),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var i={first:e,last:t};this._signal("update",{data:i})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.range,i=t.start.row,n=t.end.row-i;if(0===n)this.lines[i]=null;else if("removeText"==e.action||"removeLines"==e.action)this.lines.splice(i,n+1,null),this.states.splice(i,n+1,null);else{var s=Array(n+1);s.unshift(i,1),this.lines.splice.apply(this.lines,s),this.states.splice.apply(this.states,s)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),i=this.states[e-1],n=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!=n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";var n=e("./lib/lang"),s=e("./lib/oop"),o=e("./range").Range,r=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,s){if(this.regExp)for(var r=s.firstRow,a=s.lastRow,l=r;a>=l;l++){var h=this.cache[l];null==h&&(h=n.getMatchOffsets(i.getLine(l),this.regExp),h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map(function(e){return new o(l,e.offset,l,e.offset+e.length)}),this.cache[l]=h.length?h:"");for(var c=h.length;c--;)t.drawSingleLineMarker(e,h[c].toScreenRange(i),this.clazz,s)}}}).call(r.prototype),t.SearchHighlight=r}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,i){"use strict";function n(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new s(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var s=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n=0,s=this.folds,o,r,a,l=!0;null==t&&(t=this.end.row,i=this.end.column);for(var h=0;he)return{row:n.start.row,column:n.start.column+e};if(e-=n.placeholder.length,0>e)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(n.prototype),t.FoldLine=n}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("./range").Range,s=n.comparePoints,o=function(){this.ranges=[]};(function(){this.comparePoints=s,this.pointIndex=function(e,t,i){for(var n=this.ranges,o=i||0;o0)){var l=s(e,r.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t);0>i&&(i=-i-1);var n=this.pointIndex(e.end,t,i);return 0>n?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.call(t,this.add(e[i]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);return t>=0?this.ranges.splice(t,1):void 0},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return s(e.start,t.start)});for(var i=t[0],n,o=1;or||(0!=r||n.isEmpty()||i.isEmpty())&&(s(n.end,i.end)<0&&(n.end.row=i.end.row,n.end.column=i.end.column),t.splice(o,1),e.push(i),i=n,o--)}return this.ranges=t,e},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);return t>=0?this.ranges[t]:void 0},this.clipRows=function(e,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.rown&&(n=-n-1);var s=this.pointIndex({row:t,column:0},n);0>s&&(s=-s-1);for(var o=[],r=n;s>r;r++)o.push(i[r]);return o},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){var t=e.data.range;if("i"==e.data.action[0])var i=t.start,n=t.end;else var n=t.start,i=t.end;for(var s=i.row,o=n.row,r=o-s,a=-i.column+n.column,l=this.ranges,h=0,c=l.length;c>h;h++){var u=l[h];if(!(u.end.rows)break;if(u.start.row==s&&u.start.column>=i.column&&(u.start.column!=i.column||!this.$insertRight)&&(u.start.column+=a,u.start.row+=r),u.end.row==s&&u.end.column>=i.column){if(u.end.column==i.column&&this.$insertRight)continue;u.end.column==i.column&&a>0&&c-1>h&&u.end.column>u.start.column&&u.end.column==l[h+1].start.column&&(u.end.column-=a),u.end.column+=a,u.end.row+=r}}}if(0!=r&&c>h)for(;c>h;h++){var u=l[h];u.start.row+=r,u.end.row+=r}}}).call(o.prototype),t.RangeList=o}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,i){"use strict";function n(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function s(e,t){n(e.start,t),n(e.end,t)}function o(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}function r(e,t){o(e.start,t),o(e.end,t)}var a=e("../range").Range,l=e("../range_list").RangeList,h=e("../lib/oop"),c=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};h.inherits(c,l),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new c(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);s(e,this.start);for(var t=e.start.row,i=e.start.column,n=0,o=-1;n=e)return s;if(s.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0),n;n=e)return s}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,s=0;s=t){t>a&&(a>=e?n-=t-a:n=0);break}r>=e&&(n-=a>=e?r-a:r-e+1)}return n},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var i=this.$foldData,n=!1,s;e instanceof r?s=e:(s=new r(t,e),s.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(s.range);var a=s.start.row,l=s.start.column,h=s.end.row,c=s.end.column;if(h>a||a==h&&c-2>=l){var u=this.getFoldAt(a,l,1),d=this.getFoldAt(h,c,-1);if(u&&d==u)return u.addSubFold(s);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(h,c)&&this.removeFold(d);var g=this.getFoldsInRange(s.range);g.length>0&&(this.removeFolds(g),g.forEach(function(e){s.addSubFold(e)}));for(var f=0;f0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var i,n;if(null==e?(i=new s(0,0,this.getLength(),0),t=!0):i="number"==typeof e?new s(e,0,e,this.getLine(e).length):"row"in e?s.fromPoints(e,e):e,n=this.getFoldsInRangeList(i),t)this.removeFolds(n);else for(var o=n;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(i);return n.length?n:void 0},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var i=this.getFoldLine(e,t);return i?i.end.row:e},this.getRowFoldStart=function(e,t){var i=this.getFoldLine(e,t);return i?i.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,s){null==n&&(n=e.start.row),null==s&&(s=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var o=this.doc,r="";return e.walk(function(e,t,i,a){if(!(n>t)){if(t==n){if(s>i)return;a=Math.max(s,a)}r+=null!=e?e:o.getLine(t).substring(a,i)}},t,i),r},this.getDisplayLine=function(e,t,i,n){var s=this.getFoldLine(e);if(!s){var o;return o=this.doc.getLine(e),o.substring(n||0,t||o.length)}return this.getFoldDisplayLine(s,e,t,i,n)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var i=t.folds.map(function(e){return e.clone()});return new o(e,i)})},this.toggleFold=function(e){var t=this.selection,i=t.getRange(),n,s;if(i.isEmpty()){var o=i.start;if(n=this.getFoldAt(o.row,o.column))return void this.expandFold(n);(s=this.findMatchingBracket(o))?1==i.comparePoint(s)?i.end=s:(i.start=s,i.start.column++,i.end.column--):(s=this.findMatchingBracket({row:o.row,column:o.column+1}))?(1==i.comparePoint(s)?i.end=s:i.start=s,i.start.column++):i=this.getCommentFoldRange(o.row,o.column)||i}else{var r=this.getFoldsInRange(i);if(e&&r.length)return void this.expandFolds(r);1==r.length&&(n=r[0])}if(n||(n=this.getFoldAt(i.start.row,i.start.column)),n&&n.range.toString()==i.toString())return void this.expandFold(n);var a="...";if(!i.isMultiLine()){if(a=this.getTextRange(i),a.length<4)return;a=a.trim().substring(0,2)+".."}this.addFold(a,i)},this.getCommentFoldRange=function(e,t,i){var n=new a(this,e,t),o=n.getCurrentToken();if(o&&/^comment|string/.test(o.type)){var r=new s,l=new RegExp(o.type.replace(/\..*/,"\\."));if(1!=i){do o=n.stepBackward();while(o&&l.test(o.type));n.stepForward()}if(r.start.row=n.getCurrentTokenRow(),r.start.column=n.getCurrentTokenColumn()+2,n=new a(this,e,t),-1!=i){do o=n.stepForward();while(o&&l.test(o.type));o=n.stepBackward()}else o=n.getCurrentToken();return r.end.row=n.getCurrentTokenRow(),r.end.column=n.getCurrentTokenColumn()+o.value.length-2,r}},this.foldAll=function(e,t,i){void 0==i&&(i=1e5);var n=this.foldWidgets;if(n){t=t||this.getLength(),e=e||0;for(var s=e;t>s;s++)if(null==n[s]&&(n[s]=this.getFoldWidget(s)),"start"==n[s]){var o=this.getFoldWidgetRange(s);if(o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e){s=o.end.row;try{var r=this.addFold("...",o);r&&(r.collapseChildren=i)}catch(a){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){return this.$foldMode!=e?(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._emit("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),void 0):void(this.foldWidgets=null)):void 0},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n=e-1,s;n>=0;){var o=i[n];if(null==o&&(o=i[n]=this.getFoldWidget(n)),"start"==o){var r=this.getFoldWidgetRange(n);if(s||(s=r),r&&r.end.row>=e)break}n--}return{range:-1!==n&&r,firstRange:s}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var i={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},n=this.$toggleFoldWidget(e,i);if(!n){var s=t.target||t.srcElement;s&&/ace_fold-widget/.test(s.className)&&(s.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),s="end"===i?-1:1,o=this.getFoldAt(e,-1===s?0:n.length,s);if(o)return void(t.children||t.all?this.removeFold(o):this.expandFold(o));var r=this.getFoldWidgetRange(e,!0);if(r&&!r.isMultiLine()&&(o=this.getFoldAt(r.start.row,r.start.column,1),o&&r.isEqual(o.range)))return void this.removeFold(o);if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,h=a.range.end.row;this.foldAll(l,h,t.all?1e4:0)}else t.children?(h=r?r.end.row:this.getLength(),this.foldAll(e+1,r.end.row,t.all?1e4:0)):r&&(t.all&&(r.collapseChildren=1e4),this.addFold("...",r));return r}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var i=this.$toggleFoldWidget(t,{});if(!i){var n=this.getParentFoldRangeData(t,!0);if(i=n.range||n.firstRange){t=i.start.row;var s=this.getFoldAt(t,this.getLine(t).length,1);s?this.removeFold(s):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var t=e.data,i=t.range,n=i.start.row,s=i.end.row-n;if(0===s)this.foldWidgets[n]=null;else if("removeText"==t.action||"removeLines"==t.action)this.foldWidgets.splice(n,s+1,null);else{var o=Array(s+1);o.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var s=e("../range").Range,o=e("./fold_line").FoldLine,r=e("./fold").Fold,a=e("../token_iterator").TokenIterator;t.Folding=n}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,i){"use strict";function n(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),i=!0,n,s=t.charAt(e.column-1),r=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(r||(s=t.charAt(e.column),e={row:e.row,column:e.column+1},r=s&&s.match(/([\(\[\{])|([\)\]\}])/),i=!1),!r)return null;if(r[1]){var a=this.$findClosingBracket(r[1],e);if(!a)return null;n=o.fromPoints(e,a),i||(n.end.column++,n.start.column--),n.cursor=n.end}else{var a=this.$findOpeningBracket(r[2],e);if(!a)return null;n=o.fromPoints(a,e),i||(n.start.column++,n.end.column--),n.cursor=n.start}return n},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,i){var n=this.$brackets[e],o=1,r=new s(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));for(var l=t.column-r.getCurrentTokenColumn()-2,h=a.value;;){for(;l>=0;){var c=h.charAt(l);if(c==n){if(o-=1,0==o)return{row:r.getCurrentTokenRow(),column:l+r.getCurrentTokenColumn()}}else c==e&&(o+=1);l-=1}do a=r.stepBackward();while(a&&!i.test(a.type));if(null==a)break;h=a.value,l=h.length-1}return null}},this.$findClosingBracket=function(e,t,i){var n=this.$brackets[e],o=1,r=new s(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));for(var l=t.column-r.getCurrentTokenColumn();;){for(var h=a.value,c=h.length;c>l;){var u=h.charAt(l);if(u==n){if(o-=1,0==o)return{row:r.getCurrentTokenRow(),column:l+r.getCurrentTokenColumn()}}else u==e&&(o+=1);l+=1}do a=r.stepForward();while(a&&!i.test(a.type));if(null==a)break;l=0}return null}}}var s=e("../token_iterator").TokenIterator,o=e("../range").Range;t.BracketMatch=n}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/lang"),o=e("./config"),r=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,l=e("./mode/text").Mode,h=e("./range").Range,c=e("./document").Document,u=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,g=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new c(e)),this.setDocument(e),this.selection=new a(this),o.resetOptions(this),this.setMode(t),o._signal("session",this)};(function(){function e(e){return 4352>e?!1:e>=4352&&4447>=e||e>=4515&&4519>=e||e>=4602&&4607>=e||e>=9001&&9002>=e||e>=11904&&11929>=e||e>=11931&&12019>=e||e>=12032&&12245>=e||e>=12272&&12283>=e||e>=12288&&12350>=e||e>=12353&&12438>=e||e>=12441&&12543>=e||e>=12549&&12589>=e||e>=12593&&12686>=e||e>=12688&&12730>=e||e>=12736&&12771>=e||e>=12784&&12830>=e||e>=12832&&12871>=e||e>=12880&&13054>=e||e>=13056&&19903>=e||e>=19968&&42124>=e||e>=42128&&42182>=e||e>=43360&&43388>=e||e>=44032&&55203>=e||e>=55216&&55238>=e||e>=55243&&55291>=e||e>=63744&&64255>=e||e>=65040&&65049>=e||e>=65072&&65106>=e||e>=65108&&65126>=e||e>=65128&&65131>=e||e>=65281&&65376>=e||e>=65504&&65510>=e}n.implement(this,r),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,i=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>i&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))},this.$getRowCacheIndex=function(e,t){for(var i=0,n=e.length-1;n>=i;){var s=i+n>>1,o=e[s];if(t>o)i=s+1;else{if(!(o>t))return s;n=s-1}}return i-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){var t=e.data;this.$modified=!0,this.$resetRowCache(t.range.start.row);var i=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&!t.ignore&&(this.$deltasDoc.push(t),i&&0!=i.length&&this.$deltasFold.push({action:"removeFolds",folds:i}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(t),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var i=this.bgTokenizer.getTokens(e),n,s=0;if(null==t)o=i.length-1,s=this.getLine(e).length;else for(var o=0;o=t));o++);return n=i[o],n?(n.index=o,n.start=s-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(n=!!i.charAt(t-1).match(this.tokenRe)),n||(n=!!i.charAt(t).match(this.tokenRe)),n)var s=this.tokenRe;else if(/^\s+$/.test(i.slice(t-1,t+1)))var s=/\s/;else var s=this.nonTokenRe;var o=t;if(o>0){do o--;while(o>=0&&i.charAt(o).match(s));o++}for(var r=t;re&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,s=0,o=this.$foldData[s],r=o?o.start.row:1/0,a=t.length,l=0;a>l;l++){if(l>r){if(l=o.end.row+1,l>=a)break;o=this.$foldData[s++],r=o?o.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;-1!=n;n--){var s=e[n];"doc"==s.group?(this.doc.revertDeltas(s.deltas),i=this.$getUndoSelection(s.deltas,!0,i)):s.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;ne.end.column&&(o.start.column+=a),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=a)),r&&o.start.row>=e.end.row&&(o.start.row+=r,o.end.row+=r)}if(o.end=this.insert(o.start,n), +s.length){var l=e.start,c=o.start,r=c.row-l.row,a=c.column-l.column;this.addFolds(s.map(function(e){return e=e.clone(),e.start.row==l.row&&(e.start.column+=a),e.end.row==l.row&&(e.end.column+=a),e.start.row+=r,e.end.row+=r,e}))}return o},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;t>=n;n++)this.insert({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new h(0,0,0,0),n=this.getTabSize(),s=t.start.row;s<=t.end.row;++s){var o=this.getLine(s);i.start.row=s,i.end.row=s;for(var r=0;n>r&&" "==o.charAt(r);++r);n>r&&" "==o.charAt(r)?(i.start.column=r,i.end.column=r+1):(i.start.column=0,i.end.column=r),this.remove(i)}},this.$moveLines=function(e,t,i){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),0>i){var n=this.getRowFoldStart(e+i);if(0>n)return 0;var s=n-e}else if(i>0){var n=this.getRowFoldEnd(t+i);if(n>this.doc.getLength()-1)return 0;var s=n-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var s=t-e+1}var o=new h(e,0,t,Number.MAX_VALUE),r=this.getFoldsInRange(o).map(function(e){return e=e.clone(),e.start.row+=s,e.end.row+=s,e}),a=0==i?this.doc.getLines(e,t):this.doc.removeLines(e,t);return this.doc.insertLines(e+s,a),r.length&&this.addFolds(r),s},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return 0>t?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),0>e)e=0,t=0;else{var i=this.doc.getLength();e>=i?(e=i-1,t=this.doc.getLine(i-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)&&(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&n>1?(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),i&&(e=Math.min(i,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,i,n=e.data.action,s=e.data.range.start.row,o=e.data.range.end.row,r=e.data.range.start,a=e.data.range.end,l=null;if(-1!=n.indexOf("Lines")?(o="insertLines"==n?s+e.data.lines.length:s,i=e.data.lines?e.data.lines.length:o-s):i=o-s,this.$updating=!0,0!=i)if(-1!=n.indexOf("remove")){this[t?"$wrapData":"$rowLengthCache"].splice(s,i);var h=this.$foldData;l=this.getFoldsInRange(e.data.range),this.removeFolds(l);var c=this.getFoldLine(a.row),u=0;if(c){c.addRemoveChars(a.row,a.column,r.column-a.column),c.shiftRow(-i);var d=this.getFoldLine(s);d&&d!==c&&(d.merge(c),c=d),u=h.indexOf(c)+1}for(u;u=a.row&&c.shiftRow(-i)}o=s}else{var g=Array(i);g.unshift(s,0);var f=t?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,g);var h=this.$foldData,c=this.getFoldLine(s),u=0;if(c){var m=c.range.compareInside(r.row,r.column);0==m?(c=c.split(r.row,r.column),c&&(c.shiftRow(i),c.addRemoveChars(o,0,a.column-r.column))):-1==m&&(c.addRemoveChars(s,0,a.column-r.column),c.shiftRow(i)),u=h.indexOf(c)+1}for(u;u=s&&c.shiftRow(i)}}else{i=Math.abs(e.data.range.start.column-e.data.range.end.column),-1!=n.indexOf("remove")&&(l=this.getFoldsInRange(e.data.range),this.removeFolds(l),i=-i);var c=this.getFoldLine(s);c&&c.addRemoveChars(s,r.column,i)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var i=this.doc.getAllLines(),n=this.getTabSize(),s=this.$wrapData,o=this.$wrapLimit,r,l,h=e;for(t=Math.min(t,i.length-1);t>=h;)l=this.getFoldLine(h,l),l?(r=[],l.walk(function(e,t,n,s){var o;if(null!=e){o=this.$getDisplayTokens(e,r.length),o[0]=a;for(var l=1;lt;){var u=r+t;if(e[u-1]>=f&&e[u]>=f)n(u);else if(e[u]!=a&&e[u]!=c){for(var d=Math.max(u-(h?10:t-(t>>2)),r-1);u>d&&e[u]d&&e[u]d&&e[u]==g;)u--}else for(;u>d&&e[u]d?n(++u):(u=r+t,e[u]==i&&u--,n(u))}else{for(u;u!=r-1&&e[u]!=a;u--);if(u>r){n(u);continue}for(u=r+t;uh;h++)o.push(p)}else 32==l?o.push(f):l>39&&48>l||l>57&&64>l?o.push(g):l>=4352&&e(l)?o.push(t,i):o.push(t)}return o},this.$getStringScreenWidth=function(t,i,n){if(0==i)return[0,0];null==i&&(i=1/0),n=n||0;var s,o;for(o=0;o=4352&&e(s)?2:1,!(n>i));o++);return[n,o]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var i=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(i)},this.getDocumentLastRowColumnPosition=function(e,t){var i=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(i,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(0>e)return{row:0,column:0};var i,n=0,s=0,o,r=0,a=0,l=this.$screenRowCache,h=this.$getRowCacheIndex(l,e),c=l.length;if(c&&h>=0)var r=l[h],n=this.$docRowCache[h],u=e>l[c-1];else var u=!c;for(var d=this.getLength()-1,g=this.getNextFoldLine(n),f=g?g.start.row:1/0;e>=r&&(a=this.getRowLength(n),!(r+a>e||n>=d));)r+=a,n++,n>f&&(n=g.end.row+1,g=this.getNextFoldLine(n,g),f=g?g.start.row:1/0),u&&(this.$docRowCache.push(n),this.$screenRowCache.push(r));if(g&&g.start.row<=n)i=this.getFoldDisplayLine(g),n=g.start.row;else{if(e>=r+a||n>d)return{row:d,column:this.getLine(d).length};i=this.getLine(n),g=null}if(this.$useWrapMode){var m=this.$wrapData[n];if(m){var p=Math.floor(e-r);o=m[p],p>0&&m.length&&(s=m[p-1]||m[m.length-1],i=i.substring(s))}}return s+=this.$getStringScreenWidth(i,t)[1],this.$useWrapMode&&s>=o&&(s=o-1),g?g.idxToPosition(s):{row:n,column:s}},this.documentToScreenPosition=function(e,t){if("undefined"==typeof t)var i=this.$clipPositionToDocument(e.row,e.column);else i=this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n=0,s=null,o=null;o=this.getFoldAt(e,t,1),o&&(e=o.start.row,t=o.start.column);var r,a=0,l=this.$docRowCache,h=this.$getRowCacheIndex(l,e),c=l.length;if(c&&h>=0)var a=l[h],n=this.$screenRowCache[h],u=e>l[c-1];else var u=!c;for(var d=this.getNextFoldLine(a),g=d?d.start.row:1/0;e>a;){if(a>=g){if(r=d.end.row+1,r>e)break;d=this.getNextFoldLine(r,d),g=d?d.start.row:1/0}else r=a+1;n+=this.getRowLength(a),a=r,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(n))}var f="";if(d&&a>=g?(f=this.getFoldDisplayLine(d,e,t),s=d.start.row):(f=this.getLine(e).substring(0,t),s=e),this.$useWrapMode){var m=this.$wrapData[s];if(m){for(var p=0;f.length>=m[p];)n++,p++;f=f.substring(m[p-1]||0,f.length)}}return{row:n,column:this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var i=this.$wrapData.length,n=0,s=0,t=this.$foldData[s++],o=t?t.start.row:1/0;i>n;){var r=this.$wrapData[n];e+=r?r.length+1:1,n++,n>o&&(n=t.end.row+1,t=this.$foldData[s++],o=t?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;s=u;u++){for(var d=0;l>d;d++)if(-1==s[u+d].search(a[d]))continue e;var g=s[u],f=s[u+l-1],m=g.length-g.match(a[0])[0].length,p=f.match(a[l-1])[0].length;c&&c.end.row===u&&c.end.column>m||(r.push(c=new o(u,m,u+l-1,p)),l>2&&(u=u+l-2))}}else for(var A=0;AA&&r[A].start.columnA&&r[d].end.column>w&&r[d].end.row==i.end.row;)d--;for(r=r.slice(A,d+1),A=0,d=r.length;d>A;A++)r[A].start.row+=i.start.row,r[A].end.row+=i.start.row}return r},this.replace=function(e,t){var i=this.$options,n=this.$assembleRegExp(i);if(i.$isMultiLine)return t;if(n){var s=n.exec(e);if(!s||s[0].length!=e.length)return null;if(t=e.replace(n,t),i.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var r=e[o];r&&r.toLowerCase()!=r?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},this.$matchIterator=function(e,t){var i=this.$assembleRegExp(t);if(!i)return!1;var s;if(t.$isMultiLine)var r=i.length,a=function(t,n,a){var l=t.search(i[0]);if(-1!=l){for(var h=1;r>h;h++)if(t=e.getLine(n+h),-1==t.search(i[h]))return;var c=t.match(i[r-1])[0].length,u=new o(n,l,n+r-1,c);return 1==i.offset?(u.start.row--,u.start.column=Number.MAX_VALUE):a&&(u.start.column+=a),s(u)?!0:void 0}};else if(t.backwards)var a=function(e,t,o){for(var r=n.getMatchOffsets(e,i),a=r.length-1;a>=0;a--)if(s(r[a],t,o))return!0};else var a=function(e,t,o){for(var r=n.getMatchOffsets(e,i),a=0;a=r;n--)if(i(e.getLine(n),n))return;if(0!=t.wrap)for(n=a,r=o.row;n>=r;n--)if(i(e.getLine(n),n))return}}:function(i){var n=o.row,s=e.getLine(n).substr(o.column);if(!i(s,n,o.column)){for(n+=1;a>=n;n++)if(i(e.getLine(n),n))return;if(0!=t.wrap)for(n=r,a=o.row;a>=n;n++)if(i(e.getLine(n),n))return}};return{forEach:l}}}).call(r.prototype),t.Search=r}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";function n(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function s(e,t){n.call(this,e,t),this.$singleCommand=!1}var o=e("../lib/keys"),r=e("../lib/useragent"),a=o.KEY_MODS;s.prototype=n.prototype,function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i=e&&("string"==typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n=this.commandKeyBinding;for(var s in n){var o=n[s];if(o==e)delete n[s];else if(Array.isArray(o)){var r=o.indexOf(e);-1!=r&&(o.splice(r,1),1==o.length&&(n[s]=o[0]))}}},this.bindKey=function(e,t,i){return"object"==typeof e&&(e=e[this.platform]),e?"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var n="";if(-1!=e.indexOf(" ")){var s=e.split(/\s+/);e=s.pop(),s.forEach(function(e){var t=this.parseKeys(e),i=a[t.hashId]+t.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")},this),n+=" "}var o=this.parseKeys(e),r=a[o.hashId]+o.key;this._addCommandToBinding(n+r,t,i)},this):void 0},this._addCommandToBinding=function(e,t,i){var n=this.commandKeyBinding,s;t?!n[e]||this.$singleCommand?n[e]=t:(Array.isArray(n[e])?-1!=(s=n[e].indexOf(t))&&n[e].splice(s,1):n[e]=[n[e]],i||t.isDefault?n[e].unshift(t):n[e].push(t)):delete n[e]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var i=e[t];if(i){if("string"==typeof i)return this.bindKey(i,t);"function"==typeof i&&(i={exec:i}),"object"==typeof i&&(i.name||(i.name=t),this.addCommand(i))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),i=t.pop(),n=o[i];if(o.FUNCTION_KEYS[n])i=o.FUNCTION_KEYS[n].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var s=0,r=t.length;r--;){var a=o.KEY_MODS[t[r]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[r]+" in "+e),!1;s|=a}return{key:i,hashId:s}},this.findKeyCommand=function(e,t){var i=a[e]+t;return this.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){var s=a[t]+i,o=this.commandKeyBinding[s];return e.$keyChain&&(e.$keyChain+=" "+s,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&n>0&&(e.$keyChain=""),{command:o}):(e.$keyChain=e.$keyChain||s,{command:"null"})}}.call(n.prototype),t.HashHandler=n,t.MultiHashHandler=s}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,r=function(e,t){s.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};n.inherits(r,s),function(){n.implement(this,o),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var s={editor:t,command:e,args:i};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue===!1?!1:!0},this.toggleRecording=function(e){return this.$inReplay?void 0:(e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0))},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(r.prototype),t.CommandManager=r}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,i){"use strict";function n(e,t){return{win:e,mac:t}}var s=e("../lib/lang"),o=e("../config"),r=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:n("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:n("Alt-E","Ctrl-E"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:n("Alt-Shift-E","Ctrl-Shift-E"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:n("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:n(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:n("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:n("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:n("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:n("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:n("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:n("Ctrl-Alt-0","Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:n("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:n("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:n("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:n("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:n("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:n("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:n("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:n("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:n("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:n("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:n("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:n("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:n("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:n("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:n("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:n("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:n("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:n("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:n("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:n("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:n("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:n("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:n("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:n("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:n("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:n("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:n("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:n(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:n("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:n(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:n("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:n("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:n("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:n("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:n("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:n("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:n("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:n("null","null"),exec:function(){},passEvent:!0,readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"removeline",bindKey:n("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:n("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:n("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:n("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:n("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:n("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:n("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:n("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:n("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:n("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:n("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:n("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:n("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:n("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:n("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:n("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:n("Shift-Delete",null),exec:function(e){return e.selection.isEmpty()?void e.remove("left"):!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:n("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:n("Alt-Delete","Ctrl-K"),exec:function(e){ +e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:n("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:n("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:n("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:n("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:n("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:n("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(s.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:n(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:n("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:n("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:n("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:n("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:n(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),n=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(i.row).length,a=e.session.doc.getTextRange(e.selection.getRange()),l=a.replace(/\n\s*/," ").length,h=e.session.doc.getLine(i.row),c=i.row+1;c<=n.row+1;c++){var u=s.stringTrimLeft(s.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),h+=u}n.row+10?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+l)):(o=e.session.doc.getLine(i.row).length>o?o+1:o,e.selection.moveCursorTo(i.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,s=[];n.length<1&&(n=[e.selection.getRange()]);for(var o=0;o=n.lastRow||i.end.row<=n.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t.scrollIntoView&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var s=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(s)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var i=this;A.loadModule(["keybinding",e],function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){var t=this.session;if(t){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var i=this.session.getSelection();i.removeEventListener("changeCursor",this.$onCursorChange),i.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||s.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=t.findMatchingBracket(e.getCursorPosition());if(i)var n=new g(i.row,i.column,i.row,i.column+1);else if(t.$mode.getMatching)var n=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=e.getCursorPosition(),n=new C(e.session,i.row,i.column),s=n.getCurrentToken();if(!s||!/\b(?:tag-open|tag-name)/.test(s.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);-1!=s.type.indexOf("tag-open")&&(s=n.stepForward());var o=s.value,r=0,a=n.stepBackward();if("<"==a.value){do a=s,s=n.stepForward(),s&&s.value===o&&-1!==s.type.indexOf("tag-name")&&("<"===a.value?r++:"=0)}else{do s=a,a=n.stepBackward(),s&&s.value===o&&-1!==s.type.indexOf("tag-name")&&("<"===a.value?r++:"=r);n.stepForward()}if(!s)return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);var l=n.getCurrentTokenRow(),h=n.getCurrentTokenColumn(),c=new g(l,h,l,h+s.value.length);t.$tagHighlight&&0!==c.compareRange(t.$backMarkers[t.$tagHighlight].range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),c&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(c,"ace_bracket","text"))}},50)}},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=e.data,i=t.range,n;n=i.start.row==i.end.row&&"insertLines"!=t.action&&"removeLines"!=t.action?i.end.row:1/0,this.renderer.updateLines(i.start.row,n,this.session.$useWrapMode),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(A.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e=this.getSession(),t;if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(t=this.getCursorPosition()),this.renderer.$maxLines&&1===this.session.getLength()&&!(this.renderer.$minLines>1)&&(t=!1)),e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var i=new g(t.row,t.column,t.row,1/0);i.id=e.addMarker(i,"ace_active-line","screenLine"),e.$highlightLineMarker=i}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var i=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(i,"ace_selection",n)}var s=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(s),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column-1,n=t.end.column+1,s=e.getLine(t.start.row),o=s.length,r=s.substring(Math.max(i,0),Math.min(n,o));if(!(i>=0&&/^[\w\d]/.test(r)||o>=n&&/[\w\d]$/.test(r))&&(r=s.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(r))){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:r});return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e){if(!this.$readOnly){var t={text:e};if(this._signal("paste",t),e=t.text,!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(e);else{var i=e.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(i.length>n.length||i.length<2||!i[1])return this.commands.exec("insertstring",this,e);for(var s=n.length;s--;){var o=n[s];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,i[s])}}this.renderer.scrollCursorIntoView()}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),s=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=n.transformAction(i.getState(s.row),"insertion",this,i,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if(" "==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var r=new g.fromPoints(s,s);r.end.column+=e.length,this.session.remove(r)}}else{var r=this.getSelectionRange();s=this.session.remove(r),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=i.getLine(s.row);if(s.column>a.search(/\S|$/)){var l=a.substr(s.column).search(/\S|$/);i.doc.removeInLine(s.row,s.column,s.column+l)}}this.clearSelection();var h=s.column,c=i.getState(s.row),a=i.getLine(s.row),u=n.checkOutdent(c,a,e),d=i.insert(s,e);if(o&&o.selection&&this.selection.setSelectionRange(2==o.selection.length?new g(s.row,h+o.selection[0],s.row,h+o.selection[1]):new g(s.row+o.selection[0],o.selection[1],s.row+o.selection[2],o.selection[3])),i.getDocument().isNewLine(e)){var f=n.getNextLineIndent(c,a.slice(0,s.column),i.getTabString());i.insert({row:s.row+1,column:0},f)}u&&n.autoOutdent(c,i,s.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var i=this.session,n=i.getState(t.start.row),s=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var o=i.getTextRange(t);if("\n"==o[o.length-1]){var r=i.getLine(t.end.row);/^\s+$/.test(r)&&(t.end.column=r.length)}}s&&(t=s)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var i=this.session.getLine(e.row),n,s;tt.toLowerCase()?1:0});for(var n=new g(0,0,0,0),s=e.first;s<=e.last;s++){var o=t.getLine(s);n.start.row=s,n.end.row=s,n.end.column=o.length,t.replace(n,i[s-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(e);i.lastIndex=t){var o={value:s[0],start:s.index,end:s.index+s[0].length};return o}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new g(t,i-1,t,i),s=this.session.getTextRange(n);if(!isNaN(parseFloat(s))&&isFinite(s)){var o=this.getNumberAt(t,i);if(o){var r=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-r,l=parseFloat(o.value);l*=Math.pow(10,a),e*=r!==o.end&&r>i?Math.pow(10,o.end-i-1):Math.pow(10,o.end-i),l+=e,l/=Math.pow(10,a);var h=l.toFixed(a),c=new g(t,o.start,t,o.end);this.session.replace(c,h),this.moveCursorTo(t,Math.max(o.start+1,i+h.length-o.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows(),t;t=0===e.first||e.last+1c;c++){var u=c;r[c].moveBy(a,0),i=this.$getSelectedRows(r[c]);for(var d=i.first,g=i.last;++cg+1)break;g=f.last}for(c--,a=this.session.$moveLines(d,g,t?0:e),t&&-1==e&&(u=c+1);c>=u;)r[u].moveBy(a,0),u++;t||(a=0),l+=a}s.fromOrientedRange(s.ranges[0]),s.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,s=e*Math.floor(n.height/n.lineHeight);this.$blockScrolling++,t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(s,0)}):t===!1&&(this.selection.moveCursorBy(s,0),this.selection.clearSelection()),this.$blockScrolling--;var o=i.scrollTop;i.scrollBy(0,s*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new C(this.session,i.row,i.column),s=n.getCurrentToken(),o=s||n.stepForward();if(o){var r,a=!1,l={},h=i.column-o.start,c,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;h=0;--o)this.$tryReplace(i[o],e)&&n++;return this.selection.setSelectionRange(s),this.$blockScrolling-=1,n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return t=this.$search.replace(i,t),null!==t?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var s=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(s)||this.$search.$options.needle,e||(s=this.session.getWordRange(s.start.row,s.start.column),e=this.session.getTextRange(s)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:s});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,i),o):(t.backwards?s.start=s.end:s.end=s.start,void this.selection.setRange(s))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(i)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,i=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var s=this.$scrollAnchor;s.style.cssText="position:absolute",this.container.insertBefore(s,this.container.firstChild);var o=this.on("changeSelection",function(){n=!0}),r=this.renderer.on("beforeRender",function(){n&&(t=i.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(n&&t&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())){var e=i.renderer,o=e.$cursorLayer.$pixelPos,r=e.layerConfig,a=o.top-r.offset;n=o.top>=0&&a+t.top<0?!0:o.topwindow.innerHeight?!1:null,null!=n&&(s.style.top=a+"px",s.style.left=o.left+"px",s.style.height=r.lineHeight+"px",s.scrollIntoView(n)),n=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",o),this.renderer.removeEventListener("afterRender",a),this.renderer.removeEventListener("beforeRender",r))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,s.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}).call(F.prototype),A.defineOptions(F.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session",mode:"session"}),t.Editor=F}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,i){"use strict";var n=function(){this.reset()};(function(){this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=0/0),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),i=null;return t&&(i=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),i},this.redo=function(e){var t=this.$redoStack.pop(),i=null;return t&&(i=this.$doc.redoChanges(t,e),this.$undoStack.push(t),this.dirtyCounter++),i},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter}}).call(n.prototype),t.UndoManager=n}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/dom"),s=e("../lib/oop"),o=e("../lib/lang"),r=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){s.implement(this,r),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;tr&&(m=o.end.row+1,o=t.getNextFoldLine(m,o),r=o?o.start.row:1/0),m>s){for(;this.$cells.length>f+1;)g=this.$cells.pop(),this.element.removeChild(g.element);break}g=this.$cells[++f],g||(g={element:null,textNode:null,foldWidget:null},g.element=n.createElement("div"),g.textNode=document.createTextNode(""),g.element.appendChild(g.textNode),this.element.appendChild(g.element),this.$cells[f]=g);var p="ace_gutter-cell ";l[m]&&(p+=l[m]),h[m]&&(p+=h[m]),this.$annotations[m]&&(p+=this.$annotations[m].className),g.element.className!=p&&(g.element.className=p);var A=t.getRowLength(m)*e.lineHeight+"px";if(A!=g.element.style.height&&(g.element.style.height=A),a){var C=a[m];null==C&&(C=a[m]=t.getFoldWidget(m))}if(C){g.foldWidget||(g.foldWidget=n.createElement("span"),g.element.appendChild(g.foldWidget));var p="ace_fold-widget ace_"+C;p+="start"==C&&m==r&&mi.right-t.right?"foldWidgets":void 0}}).call(a.prototype),t.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../range").Range,s=e("../lib/dom"),o=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(e){this.config=e;var t=[];for(var i in this.markers){var n=this.markers[i];if(n.range){var s=n.range.clipRows(e.firstRow,e.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),n.renderer){var o=this.$getTop(s.start.row,e),r=this.$padding+s.start.column*e.characterWidth;n.renderer(t,s,r,o,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,s,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,s,n.clazz,e):s.isMultiLine()?"text"==n.type?this.drawTextMarker(t,s,n.clazz,e):this.drawMultiLineMarker(t,s,n.clazz,e):this.drawSingleLineMarker(t,s,n.clazz+" ace_start",e)}else n.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,i,s,o){var r=t.start.row,a=new n(r,t.start.column,r,this.session.getScreenLastRowColumn(r));for(this.drawSingleLineMarker(e,a,i+" ace_start",s,1,o),r=t.end.row,a=new n(r,0,r,t.end.column),this.drawSingleLineMarker(e,a,i,s,0,o),r=t.start.row+1;r"),a=this.$getTop(t.end.row,n);var h=t.end.column*n.characterWidth;e.push("
"),r=(t.end.row-t.start.row-1)*n.lineHeight,0>r||(a=this.$getTop(t.start.row+1,n),e.push("
"))},this.drawSingleLineMarker=function(e,t,i,n,s,o){var r=n.lineHeight,a=(t.end.column+(s||0)-t.start.column)*n.characterWidth,l=this.$getTop(t.start.row,n),h=this.$padding+t.start.column*n.characterWidth;e.push("
")},this.drawFullLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;t.start.row!=t.end.row&&(r+=this.$getTop(t.end.row,n)-o),e.push("
")},this.drawScreenLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;e.push("
")}}).call(o.prototype),t.Marker=o}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){n.implement(this,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;return this.EOL_CHAR!=e?(this.EOL_CHAR=e,!0):void 0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],i=1;e+1>i;i++)t.push(this.showInvisibles?""+this.TAB_CHAR+o.stringRepeat(" ",i-1)+"":o.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide",s="",r="";if(this.showInvisibles){n+=" ace_invisible",s=" ace_invisible_space",r=" ace_invisible_tab";var a=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=this.TAB_CHAR+o.stringRepeat(" ",this.tabSize-1)}else var a=o.stringRepeat(" ",this.tabSize),l=a;this.$tabStrings[" "]=""+a+"",this.$tabStrings[" "]=""+l+""}},this.updateLines=function(e,t,i){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;for(var n=Math.max(t,e.firstRow),s=Math.min(i,e.lastRow),o=this.element.childNodes,r=0,a=e.firstRow;n>a;a++){var l=this.session.getFoldLine(a);if(l){if(l.containsRow(n)){n=l.start.row;break}a=l.end.row}r++}for(var a=n,l=this.session.getNextFoldLine(a),h=l?l.start.row:1/0;a>h&&(a=l.end.row+1,l=this.session.getNextFoldLine(a,l),h=l?l.start.row:1/0),!(a>s);){var c=o[r++];if(c){var u=[];this.$renderLine(u,a,!this.$useLineGroups(),a==h?l:!1),c.style.height=e.lineHeight*this.session.getRowLength(a)+"px",c.innerHTML=u.join("")}a++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow0;n--)i.removeChild(i.firstChild);if(t.lastRow>e.lastRow)for(var n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);n>0;n--)i.removeChild(i.lastChild);if(e.firstRowt.lastRow){var s=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);i.appendChild(s)}},this.$renderLinesFragment=function(e,t,i){for(var n=this.element.ownerDocument.createDocumentFragment(),o=t,r=this.session.getNextFoldLine(o),a=r?r.start.row:1/0;o>a&&(o=r.end.row+1,r=this.session.getNextFoldLine(o,r),a=r?r.start.row:1/0),!(o>i);){var l=s.createElement("div"),h=[];if(this.$renderLine(h,o,!1,o==a?r:!1),l.innerHTML=h.join(""),this.$useLineGroups())l.className="ace_line_group",n.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)n.appendChild(l.firstChild);o++}return n},this.update=function(e){this.config=e;for(var t=[],i=e.firstRow,n=e.lastRow,s=i,o=this.session.getNextFoldLine(s),r=o?o.start.row:1/0;s>r&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),r=o?o.start.row:1/0),!(s>n);)this.$useLineGroups()&&t.push("
"),this.$renderLine(t,s,!1,s==r?o:!1),this.$useLineGroups()&&t.push("
"),s++;this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){var s=this,r=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,a=function(e,i,n,r,a){if(i)return s.showInvisibles?""+o.stringRepeat(s.SPACE_CHAR,e.length)+"":o.stringRepeat(" ",e.length);if("&"==e)return"&";if("<"==e)return"<";if(" "==e){var l=s.session.getScreenTabSize(t+r);return t+=l-1,s.$tabStrings[l]}if(" "==e){var h=s.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",c=s.showInvisibles?s.SPACE_CHAR:"";return t+=1,""+c+""}return n?""+s.SPACE_CHAR+"":(t+=1,""+e+"")},l=n.replace(r,a);if(this.$textToken[i.type])e.push(l);else{var h="ace_"+i.type.replace(/\./g," ace_"),c="";"fold"==i.type&&(c=" style='width:"+i.value.length*this.config.characterWidth+"px;' "),e.push("",l,"")}return t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);return 0>=n||n>=i?t:" "==t[0]?(n-=n%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],n/this.tabSize)),t.substr(n)):" "==t[0]?(e.push(o.stringRepeat(this.$tabStrings[" "],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,i,n){for(var s=0,o=0,r=i[0],a=0,l=0;l=r;)a=this.$renderToken(e,a,h,c.substring(0,r-s)),c=c.substring(r-s),s=r,n||e.push("","
"),o++,a=0,r=i[o]||Number.MAX_VALUE;0!=c.length&&(s+=c.length,a=this.$renderToken(e,a,h,c))}}},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],s=n.value;this.displayIndentGuides&&(s=this.renderIndentGuide(e,s)),s&&(i=this.$renderToken(e,i,n,s));for(var o=1;o"),s.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,s,o,i):this.$renderSimpleLine(e,s)}this.showInvisibles&&(n&&(t=n.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),i||e.push("
")},this.$getFoldLineTokens=function(e,t){function i(e,t,i){for(var n=0,o=0;o+e[n].value.lengthi-t&&(r=r.substring(0,i-t)),s.push({type:e[n].type,value:r}),o=t+r.length,n+=1}for(;i>o&&ni?{type:e[n].type,value:r.substring(0,i-o)}:e[n]),o+=r.length,n+=1}}var n=this.session,s=[],o=n.getTokens(e);return t.walk(function(e,t,r,a,l){null!=e?s.push({type:"fold",value:e}):(l&&(o=n.getTokens(t)),o.length&&i(o,a,r))},t.end.row,this.session.getLine(t.end.row).length),s},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(l.prototype),t.Text=l}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../lib/dom"),s,o=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===s&&(s="opacity"in this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),n.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateVisibility.bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&!s&&(this.smoothBlinking=e,n.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=(e?this.$updateOpacity:this.$updateVisibility).bind(this),this.restartTimer())},this.addCursor=function(){var e=n.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,n.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,n.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&n.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){n.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(e),n=this.$padding+i.column*this.config.characterWidth,s=(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:n,top:s}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,i=0,n=0;(void 0===t||0===t.length)&&(t=[{cursor:null}]);for(var i=0,s=t.length;s>i;i++){var o=this.getPixelPosition(t[i].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&i>1)){var r=(this.cursors[n++]||this.addCursor()).style;this.drawCursor?this.drawCursor(r,o,e,t[i],this.session):(r.left=o.left+"px",r.top=o.top+"px",r.width=e.characterWidth+"px",r.height=e.lineHeight+"px")}}for(;this.cursors.length>n;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?n.addCssClass(this.element,"ace_overwrite-cursors"):n.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){n.implement(this,r),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=s.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};n.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(l.prototype);var h=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(h,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(h.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=h,t.VScrollBar=l,t.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,i){"use strict";var n=e("./lib/event"),s=function(e,t){this.onRender=e, +this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;n.nextFrame(function(){t.pending=!1;for(var e;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(s.prototype),t.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=0,h=t.FontMetrics=function(e,t){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){n.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=s.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&1>t?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",r.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&this.$pollSizeChangesTimer},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var i={height:e.height,width:e.width/l}}else var i={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===i.width||0===i.height?null:i},this.$measureCharWidth=function(e){this.$main.innerHTML=o.stringRepeat(e,l);var t=this.$main.getBoundingClientRect();return t.width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(h.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./config"),r=e("./lib/useragent"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,h=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,g=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,m=e("./lib/event_emitter").EventEmitter,p='.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}';s.importCssString(p,"ace_editor");var A=function(e,t){var i=this;this.container=e||s.createElement("div"),this.$keepTextAreaAtCursor=!r.isOldIE,s.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var n=this.$textLayer=new h(this.content);this.canvas=n.element,this.$markerFront=new l(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,i){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var s=this.container;n||(n=s.clientHeight||s.scrollHeight),i||(i=s.clientWidth||s.scrollWidth);var o=this.$updateCachedSize(e,t,i,n);return this.$size.scrollerHeight&&(i||n)?(e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null,void 0):this.resizing=0}},this.$updateCachedSize=function(e,t,i,n){n-=this.$extraHeight||0;var s=0,o=this.$size,r={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return n&&(e||o.height!=n)&&(o.height=n,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL),i&&(e||o.width!=i)&&(s|=this.CHANGE_SIZE,o.width=i,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,i-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(s|=this.CHANGE_FULL)),o.$dirty=!i||!n,s&&this._signal("resize",r),s},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var i=this.session.selection.getCursor();i.column=0,e=this.$cursorLayer.getPixelPosition(i,!0),t*=this.session.getRowLength(i.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=s.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,i=this.$cursorLayer.$pixelPos.left;t-=e.offset;var n=this.textarea.style,s=this.lineHeight;if(0>t||t>e.height-s)return void(n.top=n.left="0");var o=this.characterWidth;if(this.$composition){var r=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(r)[0]+2,s+=2}i-=this.scrollLeft,i>this.$size.scrollerWidth-o&&(i=this.$size.scrollerWidth-o),i+=this.gutterWidth,n.height=s+"px",n.width=o+"px",n.left=Math.min(i,this.$size.scrollerWidth-o)+"px",n.top=Math.min(t,this.$size.height-s)+"px"}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,i,n){var s=this.scrollMargin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|i,s.v=s.top+s.bottom,s.h=s.left+s.right,s.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-s.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t)return void(this.$changes|=e);if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var i=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}i=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-i.offset+"px",this.content.style.marginTop=-i.offset+"px",this.content.style.width=i.width+2*this.$padding+"px",this.content.style.height=i.minHeight+"px"}return e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal("afterRender"),void 0):e&this.CHANGE_SCROLL?(e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this._signal("afterRender"),void 0):(e&this.CHANGE_TEXT?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(i),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i),this._signal("afterRender"),void 0)},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0),n=e>t;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var s=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,i),this.desiredHeight=i,this._signal("autosize")}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength(),s=n*this.lineHeight,o=this.scrollTop%this.lineHeight,r=t.scrollerHeight+this.lineHeight,a=this.$getLongestLine(),l=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-a-2*this.$padding<0),h=this.$horizScroll!==l;h&&(this.$horizScroll=l,this.scrollBarH.setVisible(l));var c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;s+=c,this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,s-t.scrollerHeight+this.scrollMargin.bottom))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,a+2*this.$padding-t.scrollerWidth+this.scrollMargin.right)));var u=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-s+c<0||this.scrollTop),d=this.$vScroll!==u;d&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var g=Math.ceil(r/this.lineHeight)-1,f=Math.max(0,Math.round((this.scrollTop-o)/this.lineHeight)),m=f+g,p,A,C=this.lineHeight;f=e.screenToDocumentRow(f,0);var F=e.getFoldLine(f);F&&(f=F.start.row),p=e.documentToScreenRow(f,0),A=e.getRowLength(f)*C,m=Math.min(e.screenToDocumentRow(m,0),e.getLength()-1),r=t.scrollerHeight+e.getRowLength(m)*C+A,o=this.scrollTop-p*C;var v=0;return this.layerConfig.width!=a&&(v=this.CHANGE_H_SCROLL),(h||d)&&(v=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(a=this.$getLongestLine())),this.layerConfig={width:a,padding:this.$padding,firstRow:f,firstRowScreen:p,lastRow:m,lineHeight:C,characterWidth:this.characterWidth,minHeight:r,maxHeight:s,offset:o,gutterOffset:Math.max(0,Math.ceil((o+t.height-t.scrollerHeight)/C)),height:this.$size.scrollerHeight},v},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.lastRow+1||to?(t&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-as?(si;++i)s.push(o(i/this.STEPS,e,t-e));return s},this.scrollToLine=function(e,t,i,n){var s=this.$cursorLayer.getPixelPosition({row:e,column:0}),o=s.top;t&&(o-=this.$size.scrollerHeight/2);var r=this.scrollTop;this.session.setScrollTop(o),i!==!1&&this.animateScrolling(r,n)},this.animateScrolling=function(e,t){var i=this.scrollTop;if(this.$animatedScroll){var n=this;if(e!=i){if(this.$scrollAnimation){var s=this.$scrollAnimation.steps;if(s.length&&(e=s[0],e==i))return}var o=n.$calcSteps(e,i);this.$scrollAnimation={from:e,to:i,steps:o},clearInterval(this.$timer),n.session.setScrollTop(o.shift()),n.session.$scrollTop=i,this.$timer=setInterval(function(){o.length?(n.session.setScrollTop(o.shift()),n.session.$scrollTop=i):null!=i?(n.session.$scrollTop=-1,n.session.setScrollTop(i),i=null):(n.$timer=clearInterval(n.$timer),n.$scrollAnimation=null,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return 0>t&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom?!0:0>e&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0},this.pixelToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=(e+this.scrollLeft-i.left-this.$padding)/this.characterWidth,s=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),o=Math.round(n);return{row:s,column:o,side:n-o>0?1:-1}},this.screenToTextCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=Math.round((e+this.scrollLeft-i.left-this.$padding)/this.characterWidth),s=(t+this.scrollTop-i.top)/this.lineHeight;return this.session.screenToDocumentPosition(s,Math.max(n,0))},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),s=this.$padding+Math.round(n.column*this.characterWidth),o=n.row*this.lineHeight;return{pageX:i.left+s-this.scrollLeft,pageY:i.top+o-this.scrollTop}},this.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(s.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){function i(i){if(n.$themeId!=e)return t&&t();if(i.cssClass){s.importCssString(i.cssText,i.cssClass,n.container.ownerDocument),n.theme&&s.removeCssClass(n.container,n.theme.cssClass);var o="padding"in i?i.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=i.cssClass,n.theme=i,s.addCssClass(n.container,i.cssClass),s.setCssClass(n.container,"ace_dark",i.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:i}),t&&t()}}var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)i(e);else{var r=e||this.$options.theme.initialValue;o.loadModule(["theme",r],i)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){s.setCssClass(this.container,e,t!==!1)},this.unsetStyle=function(e){s.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(A.prototype),o.defineOptions(A.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=e?"":"none",void(this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight())):(this.$gutterLineHighlight=s.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight),void 0)},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=A}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,r=e("../config"),a=function(t,i,n,s){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),r.get("packaged")||!e.toUrl)s=s||r.moduleUrl(i,"worker");else{var o=this.$normalizePath;s=s||o(e.toUrl("ace/worker/worker.js",null,"_"));var a={};t.forEach(function(t){a[t]=o(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{this.$worker=new Worker(s)}catch(l){if(!(l instanceof window.DOMException))throw l;var h=this.$workerBlob(s),c=window.URL||window.webkitURL,u=c.createObjectURL(h);this.$worker=new Worker(u),c.revokeObjectURL(u)}this.$worker.postMessage({init:!0,tlns:a,module:i,classname:n}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){n.implement(this,o),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var i=this.callbacks[t.id];i&&(i(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return s.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,i){if(i){var n=this.callbackId++;this.callbacks[n]=i,t.push(n)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(i){console.error(i.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue?this.deltaQueue.push(e.data):(this.deltaQueue=[e.data],setTimeout(this.$sendDeltaQueue,0))},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>20&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))},this.$workerBlob=function(e){var t="importScripts('"+s.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(i){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,o=new n;return o.append(t),o.getBlob("application/javascript")}}}).call(a.prototype);var l=function(e,t,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var n=null,s=!1,a=Object.create(o),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),n&&(s?setTimeout(h):h())},this.setEmitSync=function(e){s=e};var h=function(){var e=l.messageBuffer.shift();e.command?n[e.command].apply(n,e.args):e.event&&a._signal(e.event,e.data)};a.postMessage=function(e){l.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},r.loadModule(["worker",t],function(e){for(n=new e[i](a);l.messageBuffer.length;)h()})};l.prototype=a.prototype,t.UIWorkerClient=l,t.WorkerClient=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,i){"use strict";var n=e("./range").Range,s=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),r=function(e,t,i,n,s,o){var r=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=s,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){r.onCursorChange()})},this.$pos=i;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,s),this.setup=function(){var e=this,t=this.doc,i=this.session,s=this.$pos;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=t.createAnchor(s.row,s.column),this.markerId=i.addMarker(new n(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(t){i.removeMarker(e.markerId),e.markerId=i.addMarker(new n(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(i){var n=t.createAnchor(i.row,i.column);e.others.push(n)}),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1),i.on("change",function(s){e.removeMarker(i.markerId),i.markerId=e.addMarker(new n(s.value.row,s.value.column,s.value.row,s.value.column+t.length),t.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&i.start.column<=this.pos.column+this.length+1){var o=i.start.column-this.pos.column;if(this.length+=s,!this.session.$fromUndo){if("insertText"===t.action)for(var r=this.others.length-1;r>=0;r--){var a=this.others[r],l={row:a.row,column:a.column+o};a.row===i.start.row&&i.start.column=0;r--){var a=this.others[r],l={row:a.row,column:a.column+o};a.row===i.start.row&&i.start.column=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;ei;i++)e.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}).call(r.prototype),t.PlaceHolder=r}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){function n(e,t){return e.row==t.row&&e.column==t.column}function s(e){var t=e.domEvent,i=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),h=e.getButton();if(a&&r.isMac&&(h=t.button),e.editor.inMultiSelectMode&&2==h)return void e.editor.textInput.onContextMenu(e.domEvent);if(!a&&!i&&!l)return void(0===h&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode());if(0===h){var c=e.editor,u=c.selection,d=c.inMultiSelectMode,g=e.getDocumentPosition(),f=u.getCursor(),m=e.inSelection()||u.isEmpty()&&n(g,f),p=e.x,A=e.y,C=function(e){p=e.clientX,A=e.clientY},F=c.session,v=c.renderer.pixelToScreenCoordinates(p,A),w=v,E;if(c.$mouseHandler.$enableJumpToDef)a&&i||l&&i?E="add":i&&(E="block");else if(l&&!i){if(E="add",!d&&s)return}else i&&(E="block");if(E&&r.isMac&&t.ctrlKey&&c.$mouseHandler.cancelContextMenu(),"add"==E){if(!d&&m)return;if(!d){var $=u.toOrientedRange();c.addSelectionMarker($)}var b=u.rangeList.rangeAtPoint(g);c.$blockScrolling++,c.inVirtualSelectionMode=!0,s&&(b=null,$=u.ranges[0],c.removeSelectionMarker($)),c.once("mouseup",function(){var e=u.toOrientedRange();b&&e.isEmpty()&&n(b.cursor,e.cursor)?u.substractPoint(e.cursor):(s?u.substractPoint($.cursor):$&&(c.removeSelectionMarker($),u.addRange($)),u.addRange(e)),c.$blockScrolling--,c.inVirtualSelectionMode=!1})}else if("block"==E){e.stop(),c.inVirtualSelectionMode=!0;var y,B=[],D=function(){var e=c.renderer.pixelToScreenCoordinates(p,A),t=F.screenToDocumentPosition(e.row,e.column);n(w,e)&&n(t,u.lead)||(w=e,c.$blockScrolling++,c.selection.moveToPosition(t),c.renderer.scrollCursorIntoView(),c.removeSelectionMarkers(B),B=u.rectangularRangeBlock(w,v),c.$mouseHandler.$clickSelection&&1==B.length&&B[0].isEmpty()&&(B[0]=c.$mouseHandler.$clickSelection.clone()),B.forEach(c.addSelectionMarker,c),c.updateSelectionMarkers(),c.$blockScrolling--)};c.$blockScrolling++,d&&!l?u.toSingleRange():!d&&l&&(y=u.toOrientedRange(),c.addSelectionMarker(y)),s?v=F.documentToScreenPosition(u.lead):u.moveToPosition(g),c.$blockScrolling--,w={row:-1,column:-1};var S=function(e){clearInterval(x),c.removeSelectionMarkers(B),B.length||(B=[u.toOrientedRange()]),c.$blockScrolling++,y&&(c.removeSelectionMarker(y),u.toSingleRange(y));for(var t=0;t1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);return t?(this.$onRemoveRange(t),t[0]):void 0},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new a,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var i=this.getRange(),n=this.isBackwards(),s=i.start.row,o=i.end.row;if(s==o){if(n)var r=i.end,a=i.start;else var r=i.start,a=i.end;return this.addRange(l.fromPoints(a,a)),void this.addRange(l.fromPoints(r,r))}var h=[],c=this.getLineRange(s,!0);c.start.column=i.start.column,h.push(c);for(var u=s+1;o>u;u++)h.push(this.getLineRange(u,!0));c=this.getLineRange(o,!0),c.end.column=i.end.column,h.push(c),h.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.selectionLead),s=this.session.documentToScreenPosition(this.selectionAnchor),o=this.rectangularRangeBlock(n,s);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,i){var n=[],o=e.columnr&&(r=0),0>c&&(c=0),c==u&&(i=!0);for(var d=c;u>=d;d++){var g=l.fromPoints(this.session.screenToDocumentPosition(d,r),this.session.screenToDocumentPosition(d,a));if(g.isEmpty()){if(f&&s(g.end,f))break;var f=g.end}g.cursor=o?g.start:g.end,n.push(g)}if(h&&n.reverse(),!i){for(var m=n.length-1;n[m].isEmpty()&&m>0;)m--;if(m>0)for(var p=0;n[p].isEmpty();)p++;for(var A=m;A>=p;A--)n[A].isEmpty()&&n.splice(A,1)}return n}}.call(h.prototype);var A=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,i=e.length;i--;){var n=e[i];if(n.marker){this.session.removeMarker(n.marker);var s=t.indexOf(n);-1!=s&&t.splice(s,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(g.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(g.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,i=e.editor;if(i.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=i.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=i.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(i.exitMultiSelectMode(),n=t.exec(i,e.args||{})):n=t.multiSelectAction(i,e.args||{});else{var n=t.exec(i,e.args||{});i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n=i&&i.keepOrder,s=1==i||i&&i.$byLines,o=this.session,r=this.selection,a=r.rangeList,l=(n?r:a).ranges,c;if(!l.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=r._eventRegistry;r._eventRegistry={};var d=new h(o);this.inVirtualSelectionMode=!0;for(var g=l.length;g--;){if(s)for(;g>0&&l[g].start.row==l[g-1].end.row;)g--;d.fromOrientedRange(l[g]),d.index=g,this.selection=o.selection=d;var f=e.exec?e.exec(this,t||{}):e(this,t||{});!c&&void 0!==f&&(c=f),d.toOrientedRange(l[g])}d.detach(),this.selection=o.selection=r,this.inVirtualSelectionMode=!1,r._eventRegistry=u,r.mergeOverlappingRanges();var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),c}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,i=[],n=0;ne?a.unshift(a.pop()):a.push(a.shift());for(var s=n.length;s--;){var o=n[s],r=o.clone();t.replace(o,a[s]),o.start.row=r.start.row,o.start.column=r.start.column}},this.selectMore=function(e,t,i){var s=this.session,o=s.multiSelect,r=o.toOrientedRange();if(!r.isEmpty()||(r=s.getWordRange(r.start.row,r.start.column),r.cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),!i)){var a=s.getTextRange(r),l=n(s,a,e);l&&(l.cursor=-1==e?l.start:l.end,this.$blockScrolling+=1,this.session.unfold(l),this.multiSelect.addRange(l),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,i=t.ranges,n=-1,s=i.filter(function(e){return e.cursor.row==n?!0:void(n=e.cursor.row)});if(i.length&&s.length!=i.length-1){s.forEach(function(e){t.substractPoint(e.cursor)});var o=0,r=1/0,a=i.map(function(t){var i=t.cursor,n=e.getLine(i.row),s=n.substr(i.column).search(/\S/g);return-1==s&&(s=0),i.column>o&&(o=i.column),r>s&&(r=s),s});i.forEach(function(t,i){var n=t.cursor,s=o-n.column,h=a[i]-r;s>h?e.insert(n,d.stringRepeat(" ",s-h)):e.remove(new l(n.row,n.column,n.row,n.column-s+h)),t.start.column=t.end.column=o,t.start.row=t.end.row=n.row,t.cursor=t.end}),t.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var h=this.selection.getRange(),c=h.start.row,u=h.end.row,g=c==u;if(g){var f=this.session.getLength(),m;do m=this.session.getLine(u);while(/[=:]/.test(m)&&++u0);0>c&&(c=0),u>=f&&(u=f-1)}var p=this.session.doc.removeLines(c,u);p=this.$reAlignText(p,g),this.session.doc.insert({row:c,column:0},p.join("\n")+"\n"),g||(h.start.column=0,h.end.column=p[p.length-1].length),this.selection.setRange(h)}},this.$reAlignText=function(e,t){function i(e){return d.stringRepeat(" ",e)}function n(e){return e[2]?i(l)+e[2]+i(h-e[2].length+c)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function s(e){return e[2]?i(l+h-e[2].length)+e[2]+i(c," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?i(l)+e[2]+i(c)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var r=!0,a=!0,l,h,c;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==l?(l=t[1].length,h=t[2].length,c=t[3].length,t):(l+h+c!=t[1].length+t[2].length+t[3].length&&(a=!1),l!=t[1].length&&(r=!1),l>t[1].length&&(l=t[1].length),ht[3].length&&(c=t[3].length),t):[e]}).map(t?n:r?a?s:n:o)}}).call(A.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var i=e.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=o,e("./config").defineOptions(A.prototype,"editor",{enableMultiselect:{set:function(e){o(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",c)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",c))},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("../../range").Range,s=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var s=/\S/,o=e.getLine(t),r=o.search(s);if(-1!=r){for(var a=i||o.length,l=e.getLength(),h=t,c=t;++t=u)break;c=t}}if(c>h){var d=e.getLine(c).length;return new n(h,a,c,d)}}},this.openingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s+1},a=e.$findClosingBracket(t,r,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>r.row&&(a.row--,a.column=e.getLine(a.row).length),n.fromPoints(r,a)}},this.closingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s},a=e.$findOpeningBracket(t,r);if(a)return a.column++,r.column--,n.fromPoints(a,r)}}).call(s.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,i){"use strict";function n(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeEditor",this.$onChangeEditor)}var s=e("./lib/oop"),o=e("./lib/dom"),r=e("./range").Range;(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets?this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var i=e.data,n=i.range,s=n.start.row,o=n.end.row-s;if(0!==o)if("removeText"==i.action||"removeLines"==i.action){var r=t.splice(s+1,o);r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var a=new Array(o);a.unshift(s,0),t.splice.apply(t,a),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,i){e&&(t=!1,e.row=i)}),t&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength())),this.session.lineWidgets[e.row]=e;var t=this.editor.renderer;return e.html&&!e.el&&(e.el=o.createElement("div"),e.el.innerHTML=e.html),e.el&&(o.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight||(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(t){}this.session.lineWidgets&&(this.session.lineWidgets[e.row]=void 0),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var s=1/0,o=0;oa&&(a=0)),r.rowCount!=a&&(r.rowCount=a,r.row0&&!n[s];)s--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var r=s;o>=r;r++){var a=n[r];if(a&&a.el){a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:r,column:0},!0).top;a.coverLine||(l+=i.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-i.offset+"px";var h=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(h-=t.scrollLeft),a.el.style.left=h+"px",a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(n.prototype),t.LineWidgets=n}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,i){"use strict";function n(e,t,i){for(var n=0,s=e.length-1;s>=n;){var o=n+s>>1,r=i(t,e[o]);if(r>0)n=o+1;else{if(!(0>r))return o;s=o-1}}return-(n+1)}function s(e,t,i){var s=e.getAnnotations().sort(a.comparePoints);if(s.length){var o=n(s,{row:t,column:-1},a.comparePoints);0>o&&(o=-o-1),o>=s.length-1?o=i>0?0:s.length-1:0===o&&0>i&&(o=s.length-1);var r=s[o];if(r&&i){if(r.row===t){do r=s[o+=i];while(r&&r.row===t);if(!r)return s.slice()}var l=[];t=r.row;do l[0>i?"unshift":"push"](r),r=s[o+=i];while(r&&r.row==t);return l.length&&l}}}var o=e("../line_widgets").LineWidgets,r=e("../lib/dom"),a=e("../range").Range;t.showErrorMarker=function(e,t){var i=e.session;i.widgetManager||(i.widgetManager=new o(i),i.widgetManager.attach(e));var n=e.getCursorPosition(),a=n.row,l=i.lineWidgets&&i.lineWidgets[a];l?l.destroy():a-=t;var h=s(i,a,t),c;if(h){var u=h[0];n.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,n.row=u.row,c=e.renderer.$gutterLayer.$annotations[n.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(n.row),e.selection.moveToPosition(n);var d={row:n.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div")},g=d.el.appendChild(r.createElement("div")),f=d.el.appendChild(r.createElement("div"));f.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(n).left;f.style.left=m+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",g.className="error_widget "+c.className,g.innerHTML=c.text.join("
"),g.appendChild(r.createElement("div"));var p=function(e,t,i){return 0!==t||"esc"!==i&&"return"!==i?void 0:(d.destroy(),{command:"null"})};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(p),i.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(p),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var n=e("./lib/dom"),s=e("./lib/event"),o=e("./editor").Editor,r=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.edit=function(e){if("string"==typeof e){var i=e;if(e=document.getElementById(i),!e)throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof o)return e.env.editor;var r="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;r=a.value,e=n.createElement("pre"),a.parentNode.replaceChild(e,a)}else r=n.getInnerText(e),e.innerHTML="";var h=t.createEditSession(r),c=new o(new l(e));c.setSession(h);var u={document:h,editor:c,onResize:c.resize.bind(c,null)};return a&&(u.textarea=a),s.addListener(window,"resize",u.onResize),c.on("destroy",function(){s.removeListener(window,"resize",u.onResize),u.editor.container.env=null}),c.container.env=c.env=u,c},t.createEditSession=function(e,t){var i=new r(e,t);return i.setUndoManager(new a),i},t.EditSession=r,t.UndoManager=a}),function(){ace.require(["ace/ace"],function(e){e&&e.config.init(!0),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})}()}).call(this); + +(function(){!function(){function a(e){if(!(this instanceof a))return new a(e);if("function"==typeof e)return this.random=e,this;var n;arguments.length&&(this.seed=0);for(var i=0;ii;i++)key=n[i],e[key]=a[key]||e[key]}function r(a,e){for(var n=0,i=a.length;i>n;n++)e[n]=a[n]}function o(a,e){var n=Array.isArray(a),i=e||(n?new Array(a.length):{});return n?r(a,i):t(a,i),i}var s=9007199254740992,m=-s,l="0123456789",b="abcdefghijklmnopqrstuvwxyz",h=b.toUpperCase(),c=l+"abcdef",u=Array.prototype.slice;a.prototype.VERSION="0.7.1";var d=function(){throw new Error("No Base64 encoder available.")};!function(){"function"==typeof btoa?d=btoa:"function"==typeof Buffer&&(d=function(a){return new Buffer(a).toString("base64")})}(),a.prototype.bool=function(a){return a=e(a,{likelihood:50}),n(a.likelihood<0||a.likelihood>100,"Chance: Likelihood accepts values from 0 to 100."),100*this.random()r,"Chance: Max specified is out of range with fixed. Max should be, at most, "+r),a=e(a,{min:o,max:r}),i=this.integer({min:a.min*t,max:a.max*t});var m=(i/t).toFixed(a.fixed);return parseFloat(m)},a.prototype.integer=function(a){return a=e(a,{min:m,max:s}),n(a.min>a.max,"Chance: Min cannot be greater than Max."),Math.floor(this.random()*(a.max-a.min+1)+a.min)},a.prototype.natural=function(a){return a=e(a,{min:0,max:s}),this.integer(a)},a.prototype.string=function(a){a=e(a);var n=a.length||this.natural({min:5,max:20}),i=a.pool,t=this.n(this.character,n,{pool:i});return t.join("")},a.prototype.capitalize=function(a){return a.charAt(0).toUpperCase()+a.substr(1)},a.prototype.mixin=function(e){for(var n in e)a.prototype[n]=e[n];return this},a.prototype.unique=function(a,n,i){i=e(i,{comparator:function(a,e){return-1!==a.indexOf(e)}});for(var t,r=[],o=0,s=50*n,m=u.call(arguments,2);r.lengths)throw new RangeError("Chance: num is likely too large for sample set");return r},a.prototype.n=function(a,e){var n=e||1,i=[],t=u.call(arguments,2);for(n=Math.max(0,n),null;n--;null)i.push(a.apply(this,t));return i},a.prototype.pad=function(a,e,n){return n=n||"0",a+="",a.length>=e?a:new Array(e-a.length+1).join(n)+a},a.prototype.pick=function(a,e){if(0===a.length)throw new RangeError("Chance: Cannot pick() from an empty array");return e&&1!==e?this.shuffle(a).slice(0,e):a[this.natural({max:a.length-1})]},a.prototype.shuffle=function(a){for(var e=a.slice(0),n=[],i=0,t=Number(e.length),r=0;t>r;r++)i=this.natural({max:e.length-1}),n[r]=e[i],e.splice(i,1);return n},a.prototype.weighted=function(a,e){if(a.length!==e.length)throw new RangeError("Chance: length of array and weights must match");if(e.some(function(a){return 1>a})){var n=e.reduce(function(a,e){return a>e?e:a},e[0]),i=1/n;e=e.map(function(a){return a*i})}var t,r=e.reduce(function(a,e){return a+e},0),o=this.natural({min:1,max:r}),s=0;return e.some(function(e,n){return s+e>=o?(t=a[n],!0):(s+=e,!1)}),t},a.prototype.paragraph=function(a){a=e(a);var n=a.sentences||this.natural({min:3,max:7}),i=this.n(this.sentence,n);return i.join(" ")},a.prototype.sentence=function(a){a=e(a);var n,i=a.words||this.natural({min:12,max:18}),t=this.n(this.word,i);return n=t.join(" "),n=this.capitalize(n)+"."},a.prototype.syllable=function(a){a=e(a);for(var n,i=a.length||this.natural({min:2,max:3}),t="bcdfghjklmnprstvwz",r="aeiou",o=t+r,s="",m=0;i>m;m++)n=this.character(0===m?{pool:o}:-1===t.indexOf(n)?{pool:t}:{pool:r}),s+=n;return s},a.prototype.word=function(a){a=e(a),n(a.syllables&&a.length,"Chance: Cannot specify both syllables AND length.");var i=a.syllables||this.natural({min:1,max:3}),t="";if(a.length){do t+=this.syllable();while(t.lengthr;r++)t+=this.syllable();return t},a.prototype.age=function(a){a=e(a);var n;switch(a.type){case"child":n={min:1,max:12};break;case"teen":n={min:13,max:19};break;case"adult":n={min:18,max:65};break;case"senior":n={min:65,max:100};break;case"all":n={min:1,max:100};break;default:n={min:18,max:65}}return this.natural(n)},a.prototype.birthday=function(a){return a=e(a,{year:(new Date).getFullYear()-this.age(a)}),this.date(a)},a.prototype.cpf=function(){var a=this.n(this.natural,9,{max:9}),e=2*a[8]+3*a[7]+4*a[6]+5*a[5]+6*a[4]+7*a[3]+8*a[2]+9*a[1]+10*a[0];e=11-e%11,e>=10&&(e=0);var n=2*e+3*a[8]+4*a[7]+5*a[6]+6*a[5]+7*a[4]+8*a[3]+9*a[2]+10*a[1]+11*a[0];return n=11-n%11,n>=10&&(n=0),""+a[0]+a[1]+a[2]+"."+a[3]+a[4]+a[5]+"."+a[6]+a[7]+a[8]+"-"+e+n},a.prototype.first=function(a){return a=e(a,{gender:this.gender()}),this.pick(this.get("firstNames")[a.gender.toLowerCase()])},a.prototype.gender=function(){return this.pick(["Male","Female"])},a.prototype.last=function(){return this.pick(this.get("lastNames"))},a.prototype.name=function(a){a=e(a);var n,i=this.first(a),t=this.last();return n=a.middle?i+" "+this.first(a)+" "+t:a.middle_initial?i+" "+this.character({alpha:!0,casing:"upper"})+". "+t:i+" "+t,a.prefix&&(n=this.prefix(a)+" "+n),a.suffix&&(n=n+" "+this.suffix(a)),n},a.prototype.name_prefixes=function(a){a=a||"all",a=a.toLowerCase();var e=[{name:"Doctor",abbreviation:"Dr."}];return("male"===a||"all"===a)&&e.push({name:"Mister",abbreviation:"Mr."}),("female"===a||"all"===a)&&(e.push({name:"Miss",abbreviation:"Miss"}),e.push({name:"Misses",abbreviation:"Mrs."})),e},a.prototype.prefix=function(a){return this.name_prefix(a)},a.prototype.name_prefix=function(a){return a=e(a,{gender:"all"}),a.full?this.pick(this.name_prefixes(a.gender)).name:this.pick(this.name_prefixes(a.gender)).abbreviation},a.prototype.ssn=function(a){a=e(a,{ssnFour:!1,dashes:!0});var n,i="1234567890",t=a.dashes?"-":"";return n=a.ssnFour?this.string({pool:i,length:4}):this.string({pool:i,length:3})+t+this.string({pool:i,length:2})+t+this.string({pool:i,length:4})},a.prototype.name_suffixes=function(){var a=[{name:"Doctor of Osteopathic Medicine",abbreviation:"D.O."},{name:"Doctor of Philosophy",abbreviation:"Ph.D."},{name:"Esquire",abbreviation:"Esq."},{name:"Junior",abbreviation:"Jr."},{name:"Juris Doctor",abbreviation:"J.D."},{name:"Master of Arts",abbreviation:"M.A."},{name:"Master of Business Administration",abbreviation:"M.B.A."},{name:"Master of Science",abbreviation:"M.S."},{name:"Medical Doctor",abbreviation:"M.D."},{name:"Senior",abbreviation:"Sr."},{name:"The Third",abbreviation:"III"},{name:"The Fourth",abbreviation:"IV"}];return a},a.prototype.suffix=function(a){return this.name_suffix(a)},a.prototype.name_suffix=function(a){return a=e(a),a.full?this.pick(this.name_suffixes()).name:this.pick(this.name_suffixes()).abbreviation},a.prototype.android_id=function(){return"APA91"+this.string({pool:"0123456789abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_",length:178})},a.prototype.apple_token=function(){return this.string({pool:"abcdef1234567890",length:64})},a.prototype.wp8_anid2=function(){return d(this.hash({length:32}))},a.prototype.wp7_anid=function(){return"A="+this.guid().replace(/-/g,"").toUpperCase()+"&E="+this.hash({length:3})+"&W="+this.integer({min:0,max:9})},a.prototype.bb_pin=function(){return this.hash({length:8})},a.prototype.color=function(a){function n(a,e){return[a,a,a].join(e||"")}a=e(a,{format:this.pick(["hex","shorthex","rgb","0x"]),grayscale:!1,casing:"lower"});var i,t=a.grayscale;if("hex"===a.format)i="#"+(t?n(this.hash({length:2})):this.hash({length:6}));else if("shorthex"===a.format)i="#"+(t?n(this.hash({length:1})):this.hash({length:3}));else if("rgb"===a.format)i=t?"rgb("+n(this.natural({max:255}),",")+")":"rgb("+this.natural({max:255})+","+this.natural({max:255})+","+this.natural({max:255})+")";else{if("0x"!==a.format)throw new Error('Invalid format provided. Please provide one of "hex", "shorthex", "rgb" or "0x".');i="0x"+(t?n(this.hash({length:2})):this.hash({length:6}))}return"upper"===a.casing&&(i=i.toUpperCase()),i},a.prototype.domain=function(a){return a=e(a),this.word()+"."+(a.tld||this.tld())},a.prototype.email=function(a){return a=e(a),this.word({length:a.length})+"@"+(a.domain||this.domain())},a.prototype.fbid=function(){return parseInt("10000"+this.natural({max:1e11}),10)},a.prototype.google_analytics=function(){var a=this.pad(this.natural({max:999999}),6),e=this.pad(this.natural({max:99}),2);return"UA-"+a+"-"+e},a.prototype.hashtag=function(){return"#"+this.word()},a.prototype.ip=function(){return this.natural({max:255})+"."+this.natural({max:255})+"."+this.natural({max:255})+"."+this.natural({max:255})},a.prototype.ipv6=function(){var a=this.n(this.hash,8,{length:4});return a.join(":")},a.prototype.klout=function(){return this.natural({min:1,max:99})},a.prototype.tlds=function(){return["com","org","edu","gov","co.uk","net","io"]},a.prototype.tld=function(){return this.pick(this.tlds())},a.prototype.twitter=function(){return"@"+this.word()},a.prototype.url=function(a){a=e(a,{protocol:"http",domain:this.domain(a),domain_prefix:"",path:this.word(),extensions:[]});var n=a.extensions.length>0?"."+this.pick(a.extensions):"",i=a.domain_prefix?a.domain_prefix+"."+a.domain:a.domain;return a.protocol+"://"+i+"/"+a.path+n},a.prototype.address=function(a){return a=e(a),this.natural({min:5,max:2e3})+" "+this.street(a)},a.prototype.altitude=function(a){return a=e(a,{fixed:5,max:8848}),this.floating({min:0,max:a.max,fixed:a.fixed})},a.prototype.areacode=function(a){a=e(a,{parens:!0});var n=this.natural({min:2,max:9}).toString()+this.natural({min:0,max:8}).toString()+this.natural({min:0,max:9}).toString();return a.parens?"("+n+")":n},a.prototype.city=function(){return this.capitalize(this.word({syllables:3}))},a.prototype.coordinates=function(a){return a=e(a),this.latitude(a)+", "+this.longitude(a)},a.prototype.countries=function(){return this.get("countries")},a.prototype.country=function(a){a=e(a);var n=this.pick(this.countries());return a.full?n.name:n.abbreviation},a.prototype.depth=function(a){return a=e(a,{fixed:5,min:-2550}),this.floating({min:a.min,max:0,fixed:a.fixed})},a.prototype.geohash=function(a){return a=e(a,{length:7}),this.string({length:a.length,pool:"0123456789bcdefghjkmnpqrstuvwxyz"})},a.prototype.geojson=function(a){return a=e(a),this.latitude(a)+", "+this.longitude(a)+", "+this.altitude(a)},a.prototype.latitude=function(a){return a=e(a,{fixed:5,min:-90,max:90}),this.floating({min:a.min,max:a.max,fixed:a.fixed})},a.prototype.longitude=function(a){return a=e(a,{fixed:5,min:-180,max:180}),this.floating({min:a.min,max:a.max,fixed:a.fixed})},a.prototype.phone=function(a){var n,i=this,t=function(a){var e=[];return a.sections.forEach(function(a){e.push(i.string({pool:"0123456789",length:a}))}),a.area+e.join(" ")};a=e(a,{formatted:!0,country:"us",mobile:!1}),a.formatted||(a.parens=!1);var r;switch(a.country){case"fr":a.mobile?(n=this.pick(["06","07"])+i.string({pool:"0123456789",length:8}),r=a.formatted?n.match(/../g).join(" "):n):(n=this.pick(["01"+this.pick(["30","34","39","40","41","42","43","44","45","46","47","48","49","53","55","56","58","60","64","69","70","72","73","74","75","76","77","78","79","80","81","82","83"])+i.string({pool:"0123456789",length:6}),"02"+this.pick(["14","18","22","23","28","29","30","31","32","33","34","35","36","37","38","40","41","43","44","45","46","47","48","49","50","51","52","53","54","56","57","61","62","69","72","76","77","78","85","90","96","97","98","99"])+i.string({pool:"0123456789",length:6}),"03"+this.pick(["10","20","21","22","23","24","25","26","27","28","29","39","44","45","51","52","54","55","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","80","81","82","83","84","85","86","87","88","89","90"])+i.string({pool:"0123456789",length:6}),"04"+this.pick(["11","13","15","20","22","26","27","30","32","34","37","42","43","44","50","56","57","63","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","88","89","90","91","92","93","94","95","97","98"])+i.string({pool:"0123456789",length:6}),"05"+this.pick(["08","16","17","19","24","31","32","33","34","35","40","45","46","47","49","53","55","56","57","58","59","61","62","63","64","65","67","79","81","82","86","87","90","94"])+i.string({pool:"0123456789",length:6}),"09"+i.string({pool:"0123456789",length:8})]),r=a.formatted?n.match(/../g).join(" "):n);break;case"uk":a.mobile?(n=this.pick([{area:"07"+this.pick(["4","5","7","8","9"]),sections:[2,6]},{area:"07624 ",sections:[6]}]),r=a.formatted?t(n):t(n).replace(" ","")):(n=this.pick([{area:"01"+this.character({pool:"234569"})+"1 ",sections:[3,4]},{area:"020 "+this.character({pool:"378"}),sections:[3,4]},{area:"023 "+this.character({pool:"89"}),sections:[3,4]},{area:"024 7",sections:[3,4]},{area:"028 "+this.pick(["25","28","37","71","82","90","92","95"]),sections:[2,4]},{area:"012"+this.pick(["04","08","54","76","97","98"])+" ",sections:[5]},{area:"013"+this.pick(["63","64","84","86"])+" ",sections:[5]},{area:"014"+this.pick(["04","20","60","61","80","88"])+" ",sections:[5]},{area:"015"+this.pick(["24","27","62","66"])+" ",sections:[5]},{area:"016"+this.pick(["06","29","35","47","59","95"])+" ",sections:[5]},{area:"017"+this.pick(["26","44","50","68"])+" ",sections:[5]},{area:"018"+this.pick(["27","37","84","97"])+" ",sections:[5]},{area:"019"+this.pick(["00","05","35","46","49","63","95"])+" ",sections:[5]}]),r=a.formatted?t(n):t(n).replace(" ","","g"));break;case"us":var o=this.areacode(a).toString(),s=this.natural({min:2,max:9}).toString()+this.natural({min:0,max:9}).toString()+this.natural({min:0,max:9}).toString(),m=this.natural({min:1e3,max:9999}).toString();r=a.formatted?o+" "+s+"-"+m:o+s+m}return r},a.prototype.postal=function(){var a=this.character({pool:"XVTSRPNKLMHJGECBA"}),e=a+this.natural({max:9})+this.character({alpha:!0,casing:"upper"}),n=this.natural({max:9})+this.character({alpha:!0,casing:"upper"})+this.natural({max:9});return e+" "+n},a.prototype.provinces=function(){return this.get("provinces")},a.prototype.province=function(a){return a&&a.full?this.pick(this.provinces()).name:this.pick(this.provinces()).abbreviation},a.prototype.state=function(a){return a&&a.full?this.pick(this.states(a)).name:this.pick(this.states(a)).abbreviation},a.prototype.states=function(a){a=e(a);var n,i=this.get("us_states_and_dc"),t=this.get("territories"),r=this.get("armed_forces");return n=i,a.territories&&(n=n.concat(t)),a.armed_forces&&(n=n.concat(r)),n},a.prototype.street=function(a){a=e(a);var n=this.word({syllables:2});return n=this.capitalize(n),n+=" ",n+=a.short_suffix?this.street_suffix().abbreviation:this.street_suffix().name},a.prototype.street_suffix=function(){return this.pick(this.street_suffixes())},a.prototype.street_suffixes=function(){return this.get("street_suffixes")},a.prototype.zip=function(a){var e=this.n(this.natural,5,{max:9});return a&&a.plusfour===!0&&(e.push("-"),e=e.concat(this.n(this.natural,4,{max:9}))),e.join("")},a.prototype.ampm=function(){return this.bool()?"am":"pm"},a.prototype.date=function(a){var n,i;if(a&&(a.min||a.max)){a=e(a,{american:!0,string:!1});var t="undefined"!=typeof a.min?a.min.getTime():1,r="undefined"!=typeof a.max?a.max.getTime():864e13;i=new Date(this.natural({min:t,max:r}))}else{var o=this.month({raw:!0});a=e(a,{year:parseInt(this.year(),10),month:o.numeric-1,day:this.natural({min:1,max:o.days}),hour:this.hour(),minute:this.minute(),second:this.second(),millisecond:this.millisecond(),american:!0,string:!1}),i=new Date(a.year,a.month,a.day,a.hour,a.minute,a.second,a.millisecond)}return n=a.american?i.getMonth()+1+"/"+i.getDate()+"/"+i.getFullYear():i.getDate()+"/"+(i.getMonth()+1)+"/"+i.getFullYear(),a.string?n:i},a.prototype.hammertime=function(a){return this.date(a).getTime()},a.prototype.hour=function(a){return a=e(a,{min:1,max:a&&a.twentyfour?24:12}),n(a.min<1,"Chance: Min cannot be less than 1."),n(a.twentyfour&&a.max>24,"Chance: Max cannot be greater than 24 for twentyfour option."),n(!a.twentyfour&&a.max>12,"Chance: Max cannot be greater than 12."),n(a.min>a.max,"Chance: Min cannot be greater than Max."),this.natural({min:a.min,max:a.max})},a.prototype.millisecond=function(){return this.natural({max:999})},a.prototype.minute=a.prototype.second=function(a){return a=e(a,{min:0,max:59}),n(a.min<0,"Chance: Min cannot be less than 0."),n(a.max>59,"Chance: Max cannot be greater than 59."),n(a.min>a.max,"Chance: Min cannot be greater than Max."),this.natural({min:a.min,max:a.max})},a.prototype.month=function(a){a=e(a,{min:1,max:12}),n(a.min<1,"Chance: Min cannot be less than 1."),n(a.max>12,"Chance: Max cannot be greater than 12."),n(a.min>a.max,"Chance: Min cannot be greater than Max.");var i=this.pick(this.months().slice(a.min-1,a.max));return a.raw?i:i.name},a.prototype.months=function(){return this.get("months")},a.prototype.second=function(){return this.natural({max:59})},a.prototype.timestamp=function(){return this.natural({min:1,max:parseInt((new Date).getTime()/1e3,10)})},a.prototype.year=function(a){return a=e(a,{min:(new Date).getFullYear()}),a.max="undefined"!=typeof a.max?a.max:a.min+100,this.natural(a).toString()},a.prototype.cc=function(a){a=e(a);var n,i,t;return n=this.cc_type(a.type?{name:a.type,raw:!0}:{raw:!0}),i=n.prefix.split(""),t=n.length-n.prefix.length-1,i=i.concat(this.n(this.integer,t,{min:0,max:9})),i.push(this.luhn_calculate(i.join(""))),i.join("")},a.prototype.cc_types=function(){return this.get("cc_types")},a.prototype.cc_type=function(a){a=e(a);var n=this.cc_types(),i=null;if(a.name){for(var t=0;tn?"-$"+n.replace("-",""):"$"+n},a.prototype.exp=function(a){a=e(a);var n={};return n.year=this.exp_year(),n.month=n.year===(new Date).getFullYear()?this.exp_month({future:!0}):this.exp_month(),a.raw?n:n.month+"/"+n.year},a.prototype.exp_month=function(a){a=e(a);var n,i,t=(new Date).getMonth();if(a.future){do n=this.month({raw:!0}).numeric,i=parseInt(n,10);while(t>i)}else n=this.month({raw:!0}).numeric;return n},a.prototype.exp_year=function(){return this.year({max:(new Date).getFullYear()+10})},a.prototype.d4=i({min:1,max:4}),a.prototype.d6=i({min:1,max:6}),a.prototype.d8=i({min:1,max:8}),a.prototype.d10=i({min:1,max:10}),a.prototype.d12=i({min:1,max:12}),a.prototype.d20=i({min:1,max:20}),a.prototype.d30=i({min:1,max:30}),a.prototype.d100=i({min:1,max:100}),a.prototype.rpg=function(a,n){if(n=e(n),null===a)throw new Error("A type of die roll must be included");var i=a.toLowerCase().split("d"),t=[];if(2!==i.length||!parseInt(i[0],10)||!parseInt(i[1],10))throw new Error("Invalid format provided. Please provide #d# where the first # is the number of dice to roll, the second # is the max of each die");for(var r=i[0];r>0;r--)t[r-1]=this.natural({min:1,max:i[1]});return"undefined"!=typeof n.sum&&n.sum?t.reduce(function(a,e){return a+e}):t},a.prototype.guid=function(a){a=e(a,{version:5});var n="abcdef1234567890",i="ab89",t=this.string({pool:n,length:8})+"-"+this.string({pool:n,length:4})+"-"+a.version+this.string({pool:n,length:3})+"-"+this.string({pool:i,length:1})+this.string({pool:n,length:3})+"-"+this.string({pool:n,length:12});return t},a.prototype.hash=function(a){a=e(a,{length:40,casing:"lower"});var n="upper"===a.casing?c.toUpperCase():c;return this.string({pool:n,length:a.length})},a.prototype.luhn_check=function(a){var e=a.toString(),n=+e.substring(e.length-1);return n===this.luhn_calculate(+e.substring(0,e.length-1))},a.prototype.luhn_calculate=function(a){for(var e,n=a.toString().split("").reverse(),i=0,t=0,r=n.length;r>t;++t)e=+n[t],t%2===0&&(e*=2,e>9&&(e-=9)),i+=e;return 9*i%10};var p={firstNames:{male:["James","John","Robert","Michael","William","David","Richard","Joseph","Charles","Thomas","Christopher","Daniel","Matthew","George","Donald","Anthony","Paul","Mark","Edward","Steven","Kenneth","Andrew","Brian","Joshua","Kevin","Ronald","Timothy","Jason","Jeffrey","Frank","Gary","Ryan","Nicholas","Eric","Stephen","Jacob","Larry","Jonathan","Scott","Raymond","Justin","Brandon","Gregory","Samuel","Benjamin","Patrick","Jack","Henry","Walter","Dennis","Jerry","Alexander","Peter","Tyler","Douglas","Harold","Aaron","Jose","Adam","Arthur","Zachary","Carl","Nathan","Albert","Kyle","Lawrence","Joe","Willie","Gerald","Roger","Keith","Jeremy","Terry","Harry","Ralph","Sean","Jesse","Roy","Louis","Billy","Austin","Bruce","Eugene","Christian","Bryan","Wayne","Russell","Howard","Fred","Ethan","Jordan","Philip","Alan","Juan","Randy","Vincent","Bobby","Dylan","Johnny","Phillip","Victor","Clarence","Ernest","Martin","Craig","Stanley","Shawn","Travis","Bradley","Leonard","Earl","Gabriel","Jimmy","Francis","Todd","Noah","Danny","Dale","Cody","Carlos","Allen","Frederick","Logan","Curtis","Alex","Joel","Luis","Norman","Marvin","Glenn","Tony","Nathaniel","Rodney","Melvin","Alfred","Steve","Cameron","Chad","Edwin","Caleb","Evan","Antonio","Lee","Herbert","Jeffery","Isaac","Derek","Ricky","Marcus","Theodore","Elijah","Luke","Jesus","Eddie","Troy","Mike","Dustin","Ray","Adrian","Bernard","Leroy","Angel","Randall","Wesley","Ian","Jared","Mason","Hunter","Calvin","Oscar","Clifford","Jay","Shane","Ronnie","Barry","Lucas","Corey","Manuel","Leo","Tommy","Warren","Jackson","Isaiah","Connor","Don","Dean","Jon","Julian","Miguel","Bill","Lloyd","Charlie","Mitchell","Leon","Jerome","Darrell","Jeremiah","Alvin","Brett","Seth","Floyd","Jim","Blake","Micheal","Gordon","Trevor","Lewis","Erik","Edgar","Vernon","Devin","Gavin","Jayden","Chris","Clyde","Tom","Derrick","Mario","Brent","Marc","Herman","Chase","Dominic","Ricardo","Franklin","Maurice","Max","Aiden","Owen","Lester","Gilbert","Elmer","Gene","Francisco","Glen","Cory","Garrett","Clayton","Sam","Jorge","Chester","Alejandro","Jeff","Harvey","Milton","Cole","Ivan","Andre","Duane","Landon"],female:["Mary","Emma","Elizabeth","Minnie","Margaret","Ida","Alice","Bertha","Sarah","Annie","Clara","Ella","Florence","Cora","Martha","Laura","Nellie","Grace","Carrie","Maude","Mabel","Bessie","Jennie","Gertrude","Julia","Hattie","Edith","Mattie","Rose","Catherine","Lillian","Ada","Lillie","Helen","Jessie","Louise","Ethel","Lula","Myrtle","Eva","Frances","Lena","Lucy","Edna","Maggie","Pearl","Daisy","Fannie","Josephine","Dora","Rosa","Katherine","Agnes","Marie","Nora","May","Mamie","Blanche","Stella","Ellen","Nancy","Effie","Sallie","Nettie","Della","Lizzie","Flora","Susie","Maud","Mae","Etta","Harriet","Sadie","Caroline","Katie","Lydia","Elsie","Kate","Susan","Mollie","Alma","Addie","Georgia","Eliza","Lulu","Nannie","Lottie","Amanda","Belle","Charlotte","Rebecca","Ruth","Viola","Olive","Amelia","Hannah","Jane","Virginia","Emily","Matilda","Irene","Kathryn","Esther","Willie","Henrietta","Ollie","Amy","Rachel","Sara","Estella","Theresa","Augusta","Ora","Pauline","Josie","Lola","Sophia","Leona","Anne","Mildred","Ann","Beulah","Callie","Lou","Delia","Eleanor","Barbara","Iva","Louisa","Maria","Mayme","Evelyn","Estelle","Nina","Betty","Marion","Bettie","Dorothy","Luella","Inez","Lela","Rosie","Allie","Millie","Janie","Cornelia","Victoria","Ruby","Winifred","Alta","Celia","Christine","Beatrice","Birdie","Harriett","Mable","Myra","Sophie","Tillie","Isabel","Sylvia","Carolyn","Isabelle","Leila","Sally","Ina","Essie","Bertie","Nell","Alberta","Katharine","Lora","Rena","Mina","Rhoda","Mathilda","Abbie","Eula","Dollie","Hettie","Eunice","Fanny","Ola","Lenora","Adelaide","Christina","Lelia","Nelle","Sue","Johanna","Lilly","Lucinda","Minerva","Lettie","Roxie","Cynthia","Helena","Hilda","Hulda","Bernice","Genevieve","Jean","Cordelia","Marian","Francis","Jeanette","Adeline","Gussie","Leah","Lois","Lura","Mittie","Hallie","Isabella","Olga","Phoebe","Teresa","Hester","Lida","Lina","Winnie","Claudia","Marguerite","Vera","Cecelia","Bess","Emilie","John","Rosetta","Verna","Myrtie","Cecilia","Elva","Olivia","Ophelia","Georgie","Elnora","Violet","Adele","Lily","Linnie","Loretta","Madge","Polly","Virgie","Eugenia","Lucile","Lucille","Mabelle","Rosalie"]},lastNames:["Smith","Johnson","Williams","Jones","Brown","Davis","Miller","Wilson","Moore","Taylor","Anderson","Thomas","Jackson","White","Harris","Martin","Thompson","Garcia","Martinez","Robinson","Clark","Rodriguez","Lewis","Lee","Walker","Hall","Allen","Young","Hernandez","King","Wright","Lopez","Hill","Scott","Green","Adams","Baker","Gonzalez","Nelson","Carter","Mitchell","Perez","Roberts","Turner","Phillips","Campbell","Parker","Evans","Edwards","Collins","Stewart","Sanchez","Morris","Rogers","Reed","Cook","Morgan","Bell","Murphy","Bailey","Rivera","Cooper","Richardson","Cox","Howard","Ward","Torres","Peterson","Gray","Ramirez","James","Watson","Brooks","Kelly","Sanders","Price","Bennett","Wood","Barnes","Ross","Henderson","Coleman","Jenkins","Perry","Powell","Long","Patterson","Hughes","Flores","Washington","Butler","Simmons","Foster","Gonzales","Bryant","Alexander","Russell","Griffin","Diaz","Hayes","Myers","Ford","Hamilton","Graham","Sullivan","Wallace","Woods","Cole","West","Jordan","Owens","Reynolds","Fisher","Ellis","Harrison","Gibson","McDonald","Cruz","Marshall","Ortiz","Gomez","Murray","Freeman","Wells","Webb","Simpson","Stevens","Tucker","Porter","Hunter","Hicks","Crawford","Henry","Boyd","Mason","Morales","Kennedy","Warren","Dixon","Ramos","Reyes","Burns","Gordon","Shaw","Holmes","Rice","Robertson","Hunt","Black","Daniels","Palmer","Mills","Nichols","Grant","Knight","Ferguson","Rose","Stone","Hawkins","Dunn","Perkins","Hudson","Spencer","Gardner","Stephens","Payne","Pierce","Berry","Matthews","Arnold","Wagner","Willis","Ray","Watkins","Olson","Carroll","Duncan","Snyder","Hart","Cunningham","Bradley","Lane","Andrews","Ruiz","Harper","Fox","Riley","Armstrong","Carpenter","Weaver","Greene","Lawrence","Elliott","Chavez","Sims","Austin","Peters","Kelley","Franklin","Lawson","Fields","Gutierrez","Ryan","Schmidt","Carr","Vasquez","Castillo","Wheeler","Chapman","Oliver","Montgomery","Richards","Williamson","Johnston","Banks","Meyer","Bishop","McCoy","Howell","Alvarez","Morrison","Hansen","Fernandez","Garza","Harvey","Little","Burton","Stanley","Nguyen","George","Jacobs","Reid","Kim","Fuller","Lynch","Dean","Gilbert","Garrett","Romero","Welch","Larson","Frazier","Burke","Hanson","Day","Mendoza","Moreno","Bowman","Medina","Fowler","Brewer","Hoffman","Carlson","Silva","Pearson","Holland","Douglas","Fleming","Jensen","Vargas","Byrd","Davidson","Hopkins","May","Terry","Herrera","Wade","Soto","Walters","Curtis","Neal","Caldwell","Lowe","Jennings","Barnett","Graves","Jimenez","Horton","Shelton","Barrett","Obrien","Castro","Sutton","Gregory","McKinney","Lucas","Miles","Craig","Rodriquez","Chambers","Holt","Lambert","Fletcher","Watts","Bates","Hale","Rhodes","Pena","Beck","Newman","Haynes","McDaniel","Mendez","Bush","Vaughn","Parks","Dawson","Santiago","Norris","Hardy","Love","Steele","Curry","Powers","Schultz","Barker","Guzman","Page","Munoz","Ball","Keller","Chandler","Weber","Leonard","Walsh","Lyons","Ramsey","Wolfe","Schneider","Mullins","Benson","Sharp","Bowen","Daniel","Barber","Cummings","Hines","Baldwin","Griffith","Valdez","Hubbard","Salazar","Reeves","Warner","Stevenson","Burgess","Santos","Tate","Cross","Garner","Mann","Mack","Moss","Thornton","Dennis","McGee","Farmer","Delgado","Aguilar","Vega","Glover","Manning","Cohen","Harmon","Rodgers","Robbins","Newton","Todd","Blair","Higgins","Ingram","Reese","Cannon","Strickland","Townsend","Potter","Goodwin","Walton","Rowe","Hampton","Ortega","Patton","Swanson","Joseph","Francis","Goodman","Maldonado","Yates","Becker","Erickson","Hodges","Rios","Conner","Adkins","Webster","Norman","Malone","Hammond","Flowers","Cobb","Moody","Quinn","Blake","Maxwell","Pope","Floyd","Osborne","Paul","McCarthy","Guerrero","Lindsey","Estrada","Sandoval","Gibbs","Tyler","Gross","Fitzgerald","Stokes","Doyle","Sherman","Saunders","Wise","Colon","Gill","Alvarado","Greer","Padilla","Simon","Waters","Nunez","Ballard","Schwartz","McBride","Houston","Christensen","Klein","Pratt","Briggs","Parsons","McLaughlin","Zimmerman","French","Buchanan","Moran","Copeland","Roy","Pittman","Brady","McCormick","Holloway","Brock","Poole","Frank","Logan","Owen","Bass","Marsh","Drake","Wong","Jefferson","Park","Morton","Abbott","Sparks","Patrick","Norton","Huff","Clayton","Massey","Lloyd","Figueroa","Carson","Bowers","Roberson","Barton","Tran","Lamb","Harrington","Casey","Boone","Cortez","Clarke","Mathis","Singleton","Wilkins","Cain","Bryan","Underwood","Hogan","McKenzie","Collier","Luna","Phelps","McGuire","Allison","Bridges","Wilkerson","Nash","Summers","Atkins"],countries:[{name:"Afghanistan",abbreviation:"AF"},{name:"Albania",abbreviation:"AL"},{name:"Algeria",abbreviation:"DZ"},{name:"American Samoa",abbreviation:"AS"},{name:"Andorra",abbreviation:"AD"},{name:"Angola",abbreviation:"AO"},{name:"Anguilla",abbreviation:"AI"},{name:"Antarctica",abbreviation:"AQ"},{name:"Antigua and Barbuda",abbreviation:"AG"},{name:"Argentina",abbreviation:"AR"},{name:"Armenia",abbreviation:"AM"},{name:"Aruba",abbreviation:"AW"},{name:"Australia",abbreviation:"AU"},{name:"Austria",abbreviation:"AT"},{name:"Azerbaijan",abbreviation:"AZ"},{name:"Bahamas",abbreviation:"BS"},{name:"Bahrain",abbreviation:"BH"},{name:"Bangladesh",abbreviation:"BD"},{name:"Barbados",abbreviation:"BB"},{name:"Belarus",abbreviation:"BY"},{name:"Belgium",abbreviation:"BE"},{name:"Belize",abbreviation:"BZ"},{name:"Benin",abbreviation:"BJ"},{name:"Bermuda",abbreviation:"BM"},{name:"Bhutan",abbreviation:"BT"},{name:"Bolivia",abbreviation:"BO"},{name:"Bosnia and Herzegovina",abbreviation:"BA"},{name:"Botswana",abbreviation:"BW"},{name:"Bouvet Island",abbreviation:"BV"},{name:"Brazil",abbreviation:"BR"},{name:"British Antarctic Territory",abbreviation:"BQ"},{name:"British Indian Ocean Territory",abbreviation:"IO"},{name:"British Virgin Islands",abbreviation:"VG"},{name:"Brunei",abbreviation:"BN"},{name:"Bulgaria",abbreviation:"BG"},{name:"Burkina Faso",abbreviation:"BF"},{name:"Burundi",abbreviation:"BI"},{name:"Cambodia",abbreviation:"KH"},{name:"Cameroon",abbreviation:"CM"},{name:"Canada",abbreviation:"CA"},{name:"Canton and Enderbury Islands",abbreviation:"CT"},{name:"Cape Verde",abbreviation:"CV"},{name:"Cayman Islands",abbreviation:"KY"},{name:"Central African Republic",abbreviation:"CF"},{name:"Chad",abbreviation:"TD"},{name:"Chile",abbreviation:"CL"},{name:"China",abbreviation:"CN"},{name:"Christmas Island",abbreviation:"CX" +},{name:"Cocos [Keeling] Islands",abbreviation:"CC"},{name:"Colombia",abbreviation:"CO"},{name:"Comoros",abbreviation:"KM"},{name:"Congo - Brazzaville",abbreviation:"CG"},{name:"Congo - Kinshasa",abbreviation:"CD"},{name:"Cook Islands",abbreviation:"CK"},{name:"Costa Rica",abbreviation:"CR"},{name:"Croatia",abbreviation:"HR"},{name:"Cuba",abbreviation:"CU"},{name:"Cyprus",abbreviation:"CY"},{name:"Czech Republic",abbreviation:"CZ"},{name:"Côte d’Ivoire",abbreviation:"CI"},{name:"Denmark",abbreviation:"DK"},{name:"Djibouti",abbreviation:"DJ"},{name:"Dominica",abbreviation:"DM"},{name:"Dominican Republic",abbreviation:"DO"},{name:"Dronning Maud Land",abbreviation:"NQ"},{name:"East Germany",abbreviation:"DD"},{name:"Ecuador",abbreviation:"EC"},{name:"Egypt",abbreviation:"EG"},{name:"El Salvador",abbreviation:"SV"},{name:"Equatorial Guinea",abbreviation:"GQ"},{name:"Eritrea",abbreviation:"ER"},{name:"Estonia",abbreviation:"EE"},{name:"Ethiopia",abbreviation:"ET"},{name:"Falkland Islands",abbreviation:"FK"},{name:"Faroe Islands",abbreviation:"FO"},{name:"Fiji",abbreviation:"FJ"},{name:"Finland",abbreviation:"FI"},{name:"France",abbreviation:"FR"},{name:"French Guiana",abbreviation:"GF"},{name:"French Polynesia",abbreviation:"PF"},{name:"French Southern Territories",abbreviation:"TF"},{name:"French Southern and Antarctic Territories",abbreviation:"FQ"},{name:"Gabon",abbreviation:"GA"},{name:"Gambia",abbreviation:"GM"},{name:"Georgia",abbreviation:"GE"},{name:"Germany",abbreviation:"DE"},{name:"Ghana",abbreviation:"GH"},{name:"Gibraltar",abbreviation:"GI"},{name:"Greece",abbreviation:"GR"},{name:"Greenland",abbreviation:"GL"},{name:"Grenada",abbreviation:"GD"},{name:"Guadeloupe",abbreviation:"GP"},{name:"Guam",abbreviation:"GU"},{name:"Guatemala",abbreviation:"GT"},{name:"Guernsey",abbreviation:"GG"},{name:"Guinea",abbreviation:"GN"},{name:"Guinea-Bissau",abbreviation:"GW"},{name:"Guyana",abbreviation:"GY"},{name:"Haiti",abbreviation:"HT"},{name:"Heard Island and McDonald Islands",abbreviation:"HM"},{name:"Honduras",abbreviation:"HN"},{name:"Hong Kong SAR China",abbreviation:"HK"},{name:"Hungary",abbreviation:"HU"},{name:"Iceland",abbreviation:"IS"},{name:"India",abbreviation:"IN"},{name:"Indonesia",abbreviation:"ID"},{name:"Iran",abbreviation:"IR"},{name:"Iraq",abbreviation:"IQ"},{name:"Ireland",abbreviation:"IE"},{name:"Isle of Man",abbreviation:"IM"},{name:"Israel",abbreviation:"IL"},{name:"Italy",abbreviation:"IT"},{name:"Jamaica",abbreviation:"JM"},{name:"Japan",abbreviation:"JP"},{name:"Jersey",abbreviation:"JE"},{name:"Johnston Island",abbreviation:"JT"},{name:"Jordan",abbreviation:"JO"},{name:"Kazakhstan",abbreviation:"KZ"},{name:"Kenya",abbreviation:"KE"},{name:"Kiribati",abbreviation:"KI"},{name:"Kuwait",abbreviation:"KW"},{name:"Kyrgyzstan",abbreviation:"KG"},{name:"Laos",abbreviation:"LA"},{name:"Latvia",abbreviation:"LV"},{name:"Lebanon",abbreviation:"LB"},{name:"Lesotho",abbreviation:"LS"},{name:"Liberia",abbreviation:"LR"},{name:"Libya",abbreviation:"LY"},{name:"Liechtenstein",abbreviation:"LI"},{name:"Lithuania",abbreviation:"LT"},{name:"Luxembourg",abbreviation:"LU"},{name:"Macau SAR China",abbreviation:"MO"},{name:"Macedonia",abbreviation:"MK"},{name:"Madagascar",abbreviation:"MG"},{name:"Malawi",abbreviation:"MW"},{name:"Malaysia",abbreviation:"MY"},{name:"Maldives",abbreviation:"MV"},{name:"Mali",abbreviation:"ML"},{name:"Malta",abbreviation:"MT"},{name:"Marshall Islands",abbreviation:"MH"},{name:"Martinique",abbreviation:"MQ"},{name:"Mauritania",abbreviation:"MR"},{name:"Mauritius",abbreviation:"MU"},{name:"Mayotte",abbreviation:"YT"},{name:"Metropolitan France",abbreviation:"FX"},{name:"Mexico",abbreviation:"MX"},{name:"Micronesia",abbreviation:"FM"},{name:"Midway Islands",abbreviation:"MI"},{name:"Moldova",abbreviation:"MD"},{name:"Monaco",abbreviation:"MC"},{name:"Mongolia",abbreviation:"MN"},{name:"Montenegro",abbreviation:"ME"},{name:"Montserrat",abbreviation:"MS"},{name:"Morocco",abbreviation:"MA"},{name:"Mozambique",abbreviation:"MZ"},{name:"Myanmar [Burma]",abbreviation:"MM"},{name:"Namibia",abbreviation:"NA"},{name:"Nauru",abbreviation:"NR"},{name:"Nepal",abbreviation:"NP"},{name:"Netherlands",abbreviation:"NL"},{name:"Netherlands Antilles",abbreviation:"AN"},{name:"Neutral Zone",abbreviation:"NT"},{name:"New Caledonia",abbreviation:"NC"},{name:"New Zealand",abbreviation:"NZ"},{name:"Nicaragua",abbreviation:"NI"},{name:"Niger",abbreviation:"NE"},{name:"Nigeria",abbreviation:"NG"},{name:"Niue",abbreviation:"NU"},{name:"Norfolk Island",abbreviation:"NF"},{name:"North Korea",abbreviation:"KP"},{name:"North Vietnam",abbreviation:"VD"},{name:"Northern Mariana Islands",abbreviation:"MP"},{name:"Norway",abbreviation:"NO"},{name:"Oman",abbreviation:"OM"},{name:"Pacific Islands Trust Territory",abbreviation:"PC"},{name:"Pakistan",abbreviation:"PK"},{name:"Palau",abbreviation:"PW"},{name:"Palestinian Territories",abbreviation:"PS"},{name:"Panama",abbreviation:"PA"},{name:"Panama Canal Zone",abbreviation:"PZ"},{name:"Papua New Guinea",abbreviation:"PG"},{name:"Paraguay",abbreviation:"PY"},{name:"People's Democratic Republic of Yemen",abbreviation:"YD"},{name:"Peru",abbreviation:"PE"},{name:"Philippines",abbreviation:"PH"},{name:"Pitcairn Islands",abbreviation:"PN"},{name:"Poland",abbreviation:"PL"},{name:"Portugal",abbreviation:"PT"},{name:"Puerto Rico",abbreviation:"PR"},{name:"Qatar",abbreviation:"QA"},{name:"Romania",abbreviation:"RO"},{name:"Russia",abbreviation:"RU"},{name:"Rwanda",abbreviation:"RW"},{name:"Réunion",abbreviation:"RE"},{name:"Saint Barthélemy",abbreviation:"BL"},{name:"Saint Helena",abbreviation:"SH"},{name:"Saint Kitts and Nevis",abbreviation:"KN"},{name:"Saint Lucia",abbreviation:"LC"},{name:"Saint Martin",abbreviation:"MF"},{name:"Saint Pierre and Miquelon",abbreviation:"PM"},{name:"Saint Vincent and the Grenadines",abbreviation:"VC"},{name:"Samoa",abbreviation:"WS"},{name:"San Marino",abbreviation:"SM"},{name:"Saudi Arabia",abbreviation:"SA"},{name:"Senegal",abbreviation:"SN"},{name:"Serbia",abbreviation:"RS"},{name:"Serbia and Montenegro",abbreviation:"CS"},{name:"Seychelles",abbreviation:"SC"},{name:"Sierra Leone",abbreviation:"SL"},{name:"Singapore",abbreviation:"SG"},{name:"Slovakia",abbreviation:"SK"},{name:"Slovenia",abbreviation:"SI"},{name:"Solomon Islands",abbreviation:"SB"},{name:"Somalia",abbreviation:"SO"},{name:"South Africa",abbreviation:"ZA"},{name:"South Georgia and the South Sandwich Islands",abbreviation:"GS"},{name:"South Korea",abbreviation:"KR"},{name:"Spain",abbreviation:"ES"},{name:"Sri Lanka",abbreviation:"LK"},{name:"Sudan",abbreviation:"SD"},{name:"Suriname",abbreviation:"SR"},{name:"Svalbard and Jan Mayen",abbreviation:"SJ"},{name:"Swaziland",abbreviation:"SZ"},{name:"Sweden",abbreviation:"SE"},{name:"Switzerland",abbreviation:"CH"},{name:"Syria",abbreviation:"SY"},{name:"São Tomé and Príncipe",abbreviation:"ST"},{name:"Taiwan",abbreviation:"TW"},{name:"Tajikistan",abbreviation:"TJ"},{name:"Tanzania",abbreviation:"TZ"},{name:"Thailand",abbreviation:"TH"},{name:"Timor-Leste",abbreviation:"TL"},{name:"Togo",abbreviation:"TG"},{name:"Tokelau",abbreviation:"TK"},{name:"Tonga",abbreviation:"TO"},{name:"Trinidad and Tobago",abbreviation:"TT"},{name:"Tunisia",abbreviation:"TN"},{name:"Turkey",abbreviation:"TR"},{name:"Turkmenistan",abbreviation:"TM"},{name:"Turks and Caicos Islands",abbreviation:"TC"},{name:"Tuvalu",abbreviation:"TV"},{name:"U.S. Minor Outlying Islands",abbreviation:"UM"},{name:"U.S. Miscellaneous Pacific Islands",abbreviation:"PU"},{name:"U.S. Virgin Islands",abbreviation:"VI"},{name:"Uganda",abbreviation:"UG"},{name:"Ukraine",abbreviation:"UA"},{name:"Union of Soviet Socialist Republics",abbreviation:"SU"},{name:"United Arab Emirates",abbreviation:"AE"},{name:"United Kingdom",abbreviation:"GB"},{name:"United States",abbreviation:"US"},{name:"Unknown or Invalid Region",abbreviation:"ZZ"},{name:"Uruguay",abbreviation:"UY"},{name:"Uzbekistan",abbreviation:"UZ"},{name:"Vanuatu",abbreviation:"VU"},{name:"Vatican City",abbreviation:"VA"},{name:"Venezuela",abbreviation:"VE"},{name:"Vietnam",abbreviation:"VN"},{name:"Wake Island",abbreviation:"WK"},{name:"Wallis and Futuna",abbreviation:"WF"},{name:"Western Sahara",abbreviation:"EH"},{name:"Yemen",abbreviation:"YE"},{name:"Zambia",abbreviation:"ZM"},{name:"Zimbabwe",abbreviation:"ZW"},{name:"Åland Islands",abbreviation:"AX"}],provinces:[{name:"Alberta",abbreviation:"AB"},{name:"British Columbia",abbreviation:"BC"},{name:"Manitoba",abbreviation:"MB"},{name:"New Brunswick",abbreviation:"NB"},{name:"Newfoundland and Labrador",abbreviation:"NL"},{name:"Nova Scotia",abbreviation:"NS"},{name:"Ontario",abbreviation:"ON"},{name:"Prince Edward Island",abbreviation:"PE"},{name:"Quebec",abbreviation:"QC"},{name:"Saskatchewan",abbreviation:"SK"},{name:"Northwest Territories",abbreviation:"NT"},{name:"Nunavut",abbreviation:"NU"},{name:"Yukon",abbreviation:"YT"}],us_states_and_dc:[{name:"Alabama",abbreviation:"AL"},{name:"Alaska",abbreviation:"AK"},{name:"Arizona",abbreviation:"AZ"},{name:"Arkansas",abbreviation:"AR"},{name:"California",abbreviation:"CA"},{name:"Colorado",abbreviation:"CO"},{name:"Connecticut",abbreviation:"CT"},{name:"Delaware",abbreviation:"DE"},{name:"District of Columbia",abbreviation:"DC"},{name:"Florida",abbreviation:"FL"},{name:"Georgia",abbreviation:"GA"},{name:"Hawaii",abbreviation:"HI"},{name:"Idaho",abbreviation:"ID"},{name:"Illinois",abbreviation:"IL"},{name:"Indiana",abbreviation:"IN"},{name:"Iowa",abbreviation:"IA"},{name:"Kansas",abbreviation:"KS"},{name:"Kentucky",abbreviation:"KY"},{name:"Louisiana",abbreviation:"LA"},{name:"Maine",abbreviation:"ME"},{name:"Maryland",abbreviation:"MD"},{name:"Massachusetts",abbreviation:"MA"},{name:"Michigan",abbreviation:"MI"},{name:"Minnesota",abbreviation:"MN"},{name:"Mississippi",abbreviation:"MS"},{name:"Missouri",abbreviation:"MO"},{name:"Montana",abbreviation:"MT"},{name:"Nebraska",abbreviation:"NE"},{name:"Nevada",abbreviation:"NV"},{name:"New Hampshire",abbreviation:"NH"},{name:"New Jersey",abbreviation:"NJ"},{name:"New Mexico",abbreviation:"NM"},{name:"New York",abbreviation:"NY"},{name:"North Carolina",abbreviation:"NC"},{name:"North Dakota",abbreviation:"ND"},{name:"Ohio",abbreviation:"OH"},{name:"Oklahoma",abbreviation:"OK"},{name:"Oregon",abbreviation:"OR"},{name:"Pennsylvania",abbreviation:"PA"},{name:"Rhode Island",abbreviation:"RI"},{name:"South Carolina",abbreviation:"SC"},{name:"South Dakota",abbreviation:"SD"},{name:"Tennessee",abbreviation:"TN"},{name:"Texas",abbreviation:"TX"},{name:"Utah",abbreviation:"UT"},{name:"Vermont",abbreviation:"VT"},{name:"Virginia",abbreviation:"VA"},{name:"Washington",abbreviation:"WA"},{name:"West Virginia",abbreviation:"WV"},{name:"Wisconsin",abbreviation:"WI"},{name:"Wyoming",abbreviation:"WY"}],territories:[{name:"American Samoa",abbreviation:"AS"},{name:"Federated States of Micronesia",abbreviation:"FM"},{name:"Guam",abbreviation:"GU"},{name:"Marshall Islands",abbreviation:"MH"},{name:"Northern Mariana Islands",abbreviation:"MP"},{name:"Puerto Rico",abbreviation:"PR"},{name:"Virgin Islands, U.S.",abbreviation:"VI"}],armed_forces:[{name:"Armed Forces Europe",abbreviation:"AE"},{name:"Armed Forces Pacific",abbreviation:"AP"},{name:"Armed Forces the Americas",abbreviation:"AA"}],street_suffixes:[{name:"Avenue",abbreviation:"Ave"},{name:"Boulevard",abbreviation:"Blvd"},{name:"Center",abbreviation:"Ctr"},{name:"Circle",abbreviation:"Cir"},{name:"Court",abbreviation:"Ct"},{name:"Drive",abbreviation:"Dr"},{name:"Extension",abbreviation:"Ext"},{name:"Glen",abbreviation:"Gln"},{name:"Grove",abbreviation:"Grv"},{name:"Heights",abbreviation:"Hts"},{name:"Highway",abbreviation:"Hwy"},{name:"Junction",abbreviation:"Jct"},{name:"Key",abbreviation:"Key"},{name:"Lane",abbreviation:"Ln"},{name:"Loop",abbreviation:"Loop"},{name:"Manor",abbreviation:"Mnr"},{name:"Mill",abbreviation:"Mill"},{name:"Park",abbreviation:"Park"},{name:"Parkway",abbreviation:"Pkwy"},{name:"Pass",abbreviation:"Pass"},{name:"Path",abbreviation:"Path"},{name:"Pike",abbreviation:"Pike"},{name:"Place",abbreviation:"Pl"},{name:"Plaza",abbreviation:"Plz"},{name:"Point",abbreviation:"Pt"},{name:"Ridge",abbreviation:"Rdg"},{name:"River",abbreviation:"Riv"},{name:"Road",abbreviation:"Rd"},{name:"Square",abbreviation:"Sq"},{name:"Street",abbreviation:"St"},{name:"Terrace",abbreviation:"Ter"},{name:"Trail",abbreviation:"Trl"},{name:"Turnpike",abbreviation:"Tpke"},{name:"View",abbreviation:"Vw"},{name:"Way",abbreviation:"Way"}],months:[{name:"January",short_name:"Jan",numeric:"01",days:31},{name:"February",short_name:"Feb",numeric:"02",days:28},{name:"March",short_name:"Mar",numeric:"03",days:31},{name:"April",short_name:"Apr",numeric:"04",days:30},{name:"May",short_name:"May",numeric:"05",days:31},{name:"June",short_name:"Jun",numeric:"06",days:30},{name:"July",short_name:"Jul",numeric:"07",days:31},{name:"August",short_name:"Aug",numeric:"08",days:31},{name:"September",short_name:"Sep",numeric:"09",days:30},{name:"October",short_name:"Oct",numeric:"10",days:31},{name:"November",short_name:"Nov",numeric:"11",days:30},{name:"December",short_name:"Dec",numeric:"12",days:31}],cc_types:[{name:"American Express",short_name:"amex",prefix:"34",length:15},{name:"Bankcard",short_name:"bankcard",prefix:"5610",length:16},{name:"China UnionPay",short_name:"chinaunion",prefix:"62",length:16},{name:"Diners Club Carte Blanche",short_name:"dccarte",prefix:"300",length:14},{name:"Diners Club enRoute",short_name:"dcenroute",prefix:"2014",length:15},{name:"Diners Club International",short_name:"dcintl",prefix:"36",length:14},{name:"Diners Club United States & Canada",short_name:"dcusc",prefix:"54",length:16},{name:"Discover Card",short_name:"discover",prefix:"6011",length:16},{name:"InstaPayment",short_name:"instapay",prefix:"637",length:16},{name:"JCB",short_name:"jcb",prefix:"3528",length:16},{name:"Laser",short_name:"laser",prefix:"6304",length:16},{name:"Maestro",short_name:"maestro",prefix:"5018",length:16},{name:"Mastercard",short_name:"mc",prefix:"51",length:16},{name:"Solo",short_name:"solo",prefix:"6334",length:16},{name:"Switch",short_name:"switch",prefix:"4903",length:16},{name:"Visa",short_name:"visa",prefix:"4",length:16},{name:"Visa Electron",short_name:"electron",prefix:"4026",length:16}],currency_types:[{code:"AED",name:"United Arab Emirates Dirham"},{code:"AFN",name:"Afghanistan Afghani"},{code:"ALL",name:"Albania Lek"},{code:"AMD",name:"Armenia Dram"},{code:"ANG",name:"Netherlands Antilles Guilder"},{code:"AOA",name:"Angola Kwanza"},{code:"ARS",name:"Argentina Peso"},{code:"AUD",name:"Australia Dollar"},{code:"AWG",name:"Aruba Guilder"},{code:"AZN",name:"Azerbaijan New Manat"},{code:"BAM",name:"Bosnia and Herzegovina Convertible Marka"},{code:"BBD",name:"Barbados Dollar"},{code:"BDT",name:"Bangladesh Taka"},{code:"BGN",name:"Bulgaria Lev"},{code:"BHD",name:"Bahrain Dinar"},{code:"BIF",name:"Burundi Franc"},{code:"BMD",name:"Bermuda Dollar"},{code:"BND",name:"Brunei Darussalam Dollar"},{code:"BOB",name:"Bolivia Boliviano"},{code:"BRL",name:"Brazil Real"},{code:"BSD",name:"Bahamas Dollar"},{code:"BTN",name:"Bhutan Ngultrum"},{code:"BWP",name:"Botswana Pula"},{code:"BYR",name:"Belarus Ruble"},{code:"BZD",name:"Belize Dollar"},{code:"CAD",name:"Canada Dollar"},{code:"CDF",name:"Congo/Kinshasa Franc"},{code:"CHF",name:"Switzerland Franc"},{code:"CLP",name:"Chile Peso"},{code:"CNY",name:"China Yuan Renminbi"},{code:"COP",name:"Colombia Peso"},{code:"CRC",name:"Costa Rica Colon"},{code:"CUC",name:"Cuba Convertible Peso"},{code:"CUP",name:"Cuba Peso"},{code:"CVE",name:"Cape Verde Escudo"},{code:"CZK",name:"Czech Republic Koruna"},{code:"DJF",name:"Djibouti Franc"},{code:"DKK",name:"Denmark Krone"},{code:"DOP",name:"Dominican Republic Peso"},{code:"DZD",name:"Algeria Dinar"},{code:"EGP",name:"Egypt Pound"},{code:"ERN",name:"Eritrea Nakfa"},{code:"ETB",name:"Ethiopia Birr"},{code:"EUR",name:"Euro Member Countries"},{code:"FJD",name:"Fiji Dollar"},{code:"FKP",name:"Falkland Islands (Malvinas) Pound"},{code:"GBP",name:"United Kingdom Pound"},{code:"GEL",name:"Georgia Lari"},{code:"GGP",name:"Guernsey Pound"},{code:"GHS",name:"Ghana Cedi"},{code:"GIP",name:"Gibraltar Pound"},{code:"GMD",name:"Gambia Dalasi"},{code:"GNF",name:"Guinea Franc"},{code:"GTQ",name:"Guatemala Quetzal"},{code:"GYD",name:"Guyana Dollar"},{code:"HKD",name:"Hong Kong Dollar"},{code:"HNL",name:"Honduras Lempira"},{code:"HRK",name:"Croatia Kuna"},{code:"HTG",name:"Haiti Gourde"},{code:"HUF",name:"Hungary Forint"},{code:"IDR",name:"Indonesia Rupiah"},{code:"ILS",name:"Israel Shekel"},{code:"IMP",name:"Isle of Man Pound"},{code:"INR",name:"India Rupee"},{code:"IQD",name:"Iraq Dinar"},{code:"IRR",name:"Iran Rial"},{code:"ISK",name:"Iceland Krona"},{code:"JEP",name:"Jersey Pound"},{code:"JMD",name:"Jamaica Dollar"},{code:"JOD",name:"Jordan Dinar"},{code:"JPY",name:"Japan Yen"},{code:"KES",name:"Kenya Shilling"},{code:"KGS",name:"Kyrgyzstan Som"},{code:"KHR",name:"Cambodia Riel"},{code:"KMF",name:"Comoros Franc"},{code:"KPW",name:"Korea (North) Won"},{code:"KRW",name:"Korea (South) Won"},{code:"KWD",name:"Kuwait Dinar"},{code:"KYD",name:"Cayman Islands Dollar"},{code:"KZT",name:"Kazakhstan Tenge"},{code:"LAK",name:"Laos Kip"},{code:"LBP",name:"Lebanon Pound"},{code:"LKR",name:"Sri Lanka Rupee"},{code:"LRD",name:"Liberia Dollar"},{code:"LSL",name:"Lesotho Loti"},{code:"LTL",name:"Lithuania Litas"},{code:"LYD",name:"Libya Dinar"},{code:"MAD",name:"Morocco Dirham"},{code:"MDL",name:"Moldova Leu"},{code:"MGA",name:"Madagascar Ariary"},{code:"MKD",name:"Macedonia Denar"},{code:"MMK",name:"Myanmar (Burma) Kyat"},{code:"MNT",name:"Mongolia Tughrik"},{code:"MOP",name:"Macau Pataca"},{code:"MRO",name:"Mauritania Ouguiya"},{code:"MUR",name:"Mauritius Rupee"},{code:"MVR",name:"Maldives (Maldive Islands) Rufiyaa"},{code:"MWK",name:"Malawi Kwacha"},{code:"MXN",name:"Mexico Peso"},{code:"MYR",name:"Malaysia Ringgit"},{code:"MZN",name:"Mozambique Metical"},{code:"NAD",name:"Namibia Dollar"},{code:"NGN",name:"Nigeria Naira"},{code:"NIO",name:"Nicaragua Cordoba"},{code:"NOK",name:"Norway Krone"},{code:"NPR",name:"Nepal Rupee"},{code:"NZD",name:"New Zealand Dollar"},{code:"OMR",name:"Oman Rial"},{code:"PAB",name:"Panama Balboa"},{code:"PEN",name:"Peru Nuevo Sol"},{code:"PGK",name:"Papua New Guinea Kina"},{code:"PHP",name:"Philippines Peso"},{code:"PKR",name:"Pakistan Rupee"},{code:"PLN",name:"Poland Zloty"},{code:"PYG",name:"Paraguay Guarani"},{code:"QAR",name:"Qatar Riyal"},{code:"RON",name:"Romania New Leu"},{code:"RSD",name:"Serbia Dinar"},{code:"RUB",name:"Russia Ruble"},{code:"RWF",name:"Rwanda Franc"},{code:"SAR",name:"Saudi Arabia Riyal"},{code:"SBD",name:"Solomon Islands Dollar"},{code:"SCR",name:"Seychelles Rupee"},{code:"SDG",name:"Sudan Pound"},{code:"SEK",name:"Sweden Krona"},{code:"SGD",name:"Singapore Dollar"},{code:"SHP",name:"Saint Helena Pound"},{code:"SLL",name:"Sierra Leone Leone"},{code:"SOS",name:"Somalia Shilling"},{code:"SPL",name:"Seborga Luigino"},{code:"SRD",name:"Suriname Dollar"},{code:"STD",name:"São Tomé and Príncipe Dobra"},{code:"SVC",name:"El Salvador Colon"},{code:"SYP",name:"Syria Pound"},{code:"SZL",name:"Swaziland Lilangeni"},{code:"THB",name:"Thailand Baht"},{code:"TJS",name:"Tajikistan Somoni"},{code:"TMT",name:"Turkmenistan Manat"},{code:"TND",name:"Tunisia Dinar"},{code:"TOP",name:"Tonga Pa'anga"},{code:"TRY",name:"Turkey Lira"},{code:"TTD",name:"Trinidad and Tobago Dollar"},{code:"TVD",name:"Tuvalu Dollar"},{code:"TWD",name:"Taiwan New Dollar"},{code:"TZS",name:"Tanzania Shilling"},{code:"UAH",name:"Ukraine Hryvnia"},{code:"UGX",name:"Uganda Shilling"},{code:"USD",name:"United States Dollar"},{code:"UYU",name:"Uruguay Peso"},{code:"UZS",name:"Uzbekistan Som"},{code:"VEF",name:"Venezuela Bolivar"},{code:"VND",name:"Viet Nam Dong"},{code:"VUV",name:"Vanuatu Vatu"},{code:"WST",name:"Samoa Tala"},{code:"XAF",name:"Communauté Financière Africaine (BEAC) CFA Franc BEAC"},{code:"XCD",name:"East Caribbean Dollar"},{code:"XDR",name:"International Monetary Fund (IMF) Special Drawing Rights"},{code:"XOF",name:"Communauté Financière Africaine (BCEAO) Franc"},{code:"XPF",name:"Comptoirs Français du Pacifique (CFP) Franc"},{code:"YER",name:"Yemen Rial"},{code:"ZAR",name:"South Africa Rand"},{code:"ZMW",name:"Zambia Kwacha"},{code:"ZWD",name:"Zimbabwe Dollar"}]},v=Object.prototype.hasOwnProperty,y=Object.keys||function(a){var e=[];for(var n in a)v.call(a,n)&&e.push(n);return e};a.prototype.get=function(a){return o(p[a])},a.prototype.mac_address=function(a){a=e(a),a.separator||(a.separator=a.networkVersion?".":":");var n="ABCDEF1234567890",i="";return i=a.networkVersion?this.n(this.string,3,{pool:n,length:4}).join(a.separator):this.n(this.string,6,{pool:n,length:2}).join(a.separator)},a.prototype.normal=function(a){a=e(a,{mean:0,dev:1});var n,i,t,r,o=a.mean,s=a.dev;do i=2*this.random()-1,t=2*this.random()-1,n=i*i+t*t;while(n>=1);return r=i*Math.sqrt(-2*Math.log(n)/n),s*r+o},a.prototype.radio=function(a){a=e(a,{side:"?"});var n="";switch(a.side.toLowerCase()){case"east":case"e":n="W";break;case"west":case"w":n="K";break;default:n=this.character({pool:"KW"})}return n+this.character({alpha:!0,casing:"upper"})+this.character({alpha:!0,casing:"upper"})+this.character({alpha:!0,casing:"upper"})},a.prototype.set=function(a,e){"string"==typeof a?p[a]=e:p=o(a,p)},a.prototype.tv=function(a){return this.radio(a)},a.prototype.cnpj=function(){var a=this.n(this.natural,8,{max:9}),e=2+6*a[7]+7*a[6]+8*a[5]+9*a[4]+2*a[3]+3*a[2]+4*a[1]+5*a[0];e=11-e%11,e>=10&&(e=0);var n=2*e+3+7*a[7]+8*a[6]+9*a[5]+2*a[4]+3*a[3]+4*a[2]+5*a[1]+6*a[0];return n=11-n%11,n>=10&&(n=0),""+a[0]+a[1]+"."+a[2]+a[3]+a[4]+"."+a[5]+a[6]+a[7]+"/0001-"+e+n},a.prototype.mersenne_twister=function(a){return new g(a)};var g=function(a){void 0===a&&(a=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(a)};g.prototype.init_genrand=function(a){for(this.mt[0]=a>>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&a)>>>16)<<16)+1812433253*(65535&a)+this.mti,this.mt[this.mti]>>>=0},g.prototype.init_by_array=function(a,e){var n,i,t=1,r=0;for(this.init_genrand(19650218),n=this.N>e?this.N:e;n;n--)i=this.mt[t-1]^this.mt[t-1]>>>30,this.mt[t]=(this.mt[t]^(1664525*((4294901760&i)>>>16)<<16)+1664525*(65535&i))+a[r]+r,this.mt[t]>>>=0,t++,r++,t>=this.N&&(this.mt[0]=this.mt[this.N-1],t=1),r>=e&&(r=0);for(n=this.N-1;n;n--)i=this.mt[t-1]^this.mt[t-1]>>>30,this.mt[t]=(this.mt[t]^(1566083941*((4294901760&i)>>>16)<<16)+1566083941*(65535&i))-t,this.mt[t]>>>=0,t++,t>=this.N&&(this.mt[0]=this.mt[this.N-1],t=1);this.mt[0]=2147483648},g.prototype.genrand_int32=function(){var a,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti===this.N+1&&this.init_genrand(5489),n=0;n>>1^e[1&a];for(;n>>1^e[1&a];a=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^a>>>1^e[1&a],this.mti=0}return a=this.mt[this.mti++],a^=a>>>11,a^=a<<7&2636928640,a^=a<<15&4022730752,a^=a>>>18,a>>>0},g.prototype.genrand_int31=function(){return this.genrand_int32()>>>1},g.prototype.genrand_real1=function(){return this.genrand_int32()*(1/4294967295)},g.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},g.prototype.genrand_real3=function(){return(this.genrand_int32()+.5)*(1/4294967296)},g.prototype.genrand_res53=function(){var a=this.genrand_int32()>>>5,e=this.genrand_int32()>>>6;return(67108864*a+e)*(1/9007199254740992)},"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(exports=module.exports=a),exports.Chance=a),"function"==typeof define&&define.amd&&define([],function(){return a}),"undefined"!=typeof importScripts&&(chance=new a),"object"==typeof window&&"object"==typeof window.document&&(window.Chance=a,window.chance=new a)}()}).call(this); + +(function(){CoinBaseWidget=function(e,n){var a=this;a.domain="https://buy.coinbase.com",a.show=function(){a.modal.style.display="block"},a.generateIframe=function(e){var n=document.createElement("div");return n.innerHTML=e,n.firstChild},a.generateParams=function(){return"?address="+encodeURIComponent(n.address)+("&code="+encodeURIComponent(n.code))+("¤cy="+encodeURIComponent(n.currency))+("&crypto_currency="+encodeURIComponent(n.crypto_currency))+("&state="+encodeURIComponent(n.state))},a.modalIframeStyle=function(){return"\n transition: all 0.3s ease-out;\n background-color: transparent;\n border: 0px none transparent;\n display: none;\n position: fixed;\n visibility: visible;\n margin: 0px;\n padding: 0px;\n left: 0px;\n top: 0px;\n width: 100%;\n height: 100%;\n z-index: 9999;\n "},a.modalIframe=function(){var e=a.generateParams();return""},a.handleMessage=function(e){if(e.origin===a.domain)switch(console.debug(e.data),e.data.event){case"modal_closed":a.modal.style.display="none";break;case"buy_completed":a.modal.style.display="none",window.alert("Your purchased Ether will be added to your account ("+e.data.address+"). Make sure you wallet is in sync with ethereum network.")}},a.modal=a.generateIframe(a.modalIframe()),document.body.appendChild(a.modal),window.addEventListener("message",a.handleMessage,!1)}}).call(this); + +(function(){!function(t){if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else{var r;"undefined"!=typeof window?r=window:"undefined"!=typeof global?r=global:"undefined"!=typeof self&&(r=self),r.GeoPattern=t()}}(function(){return function t(r,s,e){function i(o,a){if(!s[o]){if(!r[o]){var h="function"==typeof require&&require;if(!a&&h)return h(o,!0);if(n)return n(o,!0);throw new Error("Cannot find module '"+o+"'")}var l=s[o]={exports:{}};r[o][0].call(l.exports,function(t){var s=r[o][1][t];return i(s?s:t)},l,l.exports,t,r,s,e)}return s[o].exports}for(var n="function"==typeof require&&require,o=0;o.5?l/(2-o-a):l/(o+a),o){case r:i=(s-e)/l+(e>s?6:0);break;case s:i=(e-r)/l+2;break;case e:i=(r-s)/l+4}i/=6}return{h:i,s:n,l:h}}function n(t){function r(t,r,s){return 0>s&&(s+=1),s>1&&(s-=1),1/6>s?t+6*(r-t)*s:.5>s?r:2/3>s?t+(r-t)*(2/3-s)*6:t}var s,e,i,n=t.h,o=t.s,a=t.l;if(0===o)s=e=i=a;else{var h=.5>a?a*(1+o):a+o-a*o,l=2*a-h;s=r(l,h,n+1/3),e=r(l,h,n),i=r(l,h,n-1/3)}return{r:Math.round(255*s),g:Math.round(255*e),b:Math.round(255*i)}}r.exports={hex2rgb:s,rgb2hex:e,rgb2hsl:i,hsl2rgb:n,rgb2rgbString:function(t){return"rgb("+[t.r,t.g,t.b].join(",")+")"}}},{}],3:[function(t,r){!function(s){"use strict";function e(t){return function(r,s){return"object"==typeof r&&(s=r,r=null),(null===r||void 0===r)&&(r=(new Date).toString()),s||(s={}),t.call(this,r,s)}}var i=t("./pattern"),n=r.exports={generate:e(function(t,r){return new i(t,r)})};s&&(s.fn.geopattern=e(function(t,r){return this.each(function(){var e=s(this).attr("data-title-sha");e&&(r=s.extend({hash:e},r));var i=n.generate(t,r);s(this).css("background-image",i.toDataUrl())})}))}("undefined"!=typeof jQuery?jQuery:null)},{"./pattern":4}],4:[function(t,r){(function(s){"use strict";function e(t,r,s){return parseInt(t.substr(r,s||1),16)}function i(t,r,s,e,i){var n=parseFloat(t),o=s-r,a=i-e;return(n-r)*a/o+e}function n(t){return t%2===0?C:j}function o(t){return i(t,0,15,M,W)}function a(t){var r=t,s=r/2,e=Math.sin(60*Math.PI/180)*r;return[0,e,s,0,s+r,0,2*r,e,s+r,2*e,s,2*e,0,e].join(",")}function h(t,r){var s=.66*r;return[[0,0,t/2,r-s,t/2,r,0,s,0,0],[t/2,r-s,t,0,t,s,t/2,r,t/2,r-s]].map(function(t){return t.join(",")})}function l(t){return[[t,0,t,3*t],[0,t,3*t,t]]}function c(t){var r=t,s=.33*r;return[s,0,r-s,0,r,s,r,r-s,r-s,r,s,r,0,r-s,0,s,s,0].join(",")}function f(t,r){var s=t/2;return[s,0,t,r,0,r,s,0].join(",")}function u(t,r){return[t/2,0,t,r/2,t/2,r,0,r/2].join(",")}function p(t){return[0,0,t,t,0,t,0,0].join(",")}function g(t,r,s,e,i){var a=p(e),h=o(i[0]),l=n(i[0]),c={stroke:S,"stroke-opacity":A,"fill-opacity":h,fill:l};t.polyline(a,c).transform({translate:[r+e,s],scale:[-1,1]}),t.polyline(a,c).transform({translate:[r+e,s+2*e],scale:[1,-1]}),h=o(i[1]),l=n(i[1]),c={stroke:S,"stroke-opacity":A,"fill-opacity":h,fill:l},t.polyline(a,c).transform({translate:[r+e,s+2*e],scale:[-1,-1]}),t.polyline(a,c).transform({translate:[r+e,s],scale:[1,1]})}function v(t,r,s,e,i){var a=o(i),h=n(i),l=p(e),c={stroke:S,"stroke-opacity":A,"fill-opacity":a,fill:h};t.polyline(l,c).transform({translate:[r,s+e],scale:[1,-1]}),t.polyline(l,c).transform({translate:[r+2*e,s+e],scale:[-1,-1]}),t.polyline(l,c).transform({translate:[r,s+e],scale:[1,1]}),t.polyline(l,c).transform({translate:[r+2*e,s+e],scale:[-1,1]})}function y(t,r){var s=t/2;return[0,0,r,s,0,t,0,0].join(",")}var d=t("extend"),b=t("./color"),m=t("./sha1"),k=t("./svg"),x={baseColor:"#933c3c"},w=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],j="#222",C="#ddd",S="#000",A=.02,M=.02,W=.15,H=r.exports=function(t,r){return this.opts=d({},x,r),this.hash=r.hash||m(t),this.svg=new k,this.generateBackground(),this.generatePattern(),this};H.prototype.toSvg=function(){return this.svg.toString()},H.prototype.toString=function(){return this.toSvg()},H.prototype.toBase64=function(){var t,r=this.toSvg();return t="undefined"!=typeof window&&"function"==typeof window.btoa?window.btoa(r):new s(r).toString("base64")},H.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},H.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},H.prototype.generateBackground=function(){var t,r,s,n;this.opts.color?s=b.hex2rgb(this.opts.color):(r=i(e(this.hash,14,3),0,4095,0,359),n=e(this.hash,17),t=b.rgb2hsl(b.hex2rgb(this.opts.baseColor)),t.h=(360*t.h-r+360)%360/360,t.s=n%2===0?Math.min(1,(100*t.s+n)/100):Math.max(0,(100*t.s-n)/100),s=b.hsl2rgb(t)),this.color=b.rgb2hex(s),this.svg.rect(0,0,"100%","100%",{fill:b.rgb2rgbString(s)})},H.prototype.generatePattern=function(){var t=this.opts.generator;if(t){if(w.indexOf(t)<0)throw new Error("The generator "+t+" does not exist.")}else t=w[e(this.hash,20)];return this["geo"+t.slice(0,1).toUpperCase()+t.slice(1)]()},H.prototype.geoHexagons=function(){var t,r,s,h,l,c,f,u,p=e(this.hash,0),g=i(p,0,15,8,60),v=g*Math.sqrt(3),y=2*g,d=a(g);for(this.svg.setWidth(3*y+3*g),this.svg.setHeight(6*v),s=0,u=0;6>u;u++)for(f=0;6>f;f++)c=e(this.hash,s),t=f%2===0?u*v:u*v+v/2,h=o(c),r=n(c),l={fill:r,"fill-opacity":h,stroke:S,"stroke-opacity":A},this.svg.polyline(d,l).transform({translate:[f*g*1.5-y/2,t-v/2]}),0===f&&this.svg.polyline(d,l).transform({translate:[6*g*1.5-y/2,t-v/2]}),0===u&&(t=f%2===0?6*v:6*v+v/2,this.svg.polyline(d,l).transform({translate:[f*g*1.5-y/2,t-v/2]})),0===f&&0===u&&this.svg.polyline(d,l).transform({translate:[6*g*1.5-y/2,5*v+v/2]}),s++},H.prototype.geoSineWaves=function(){var t,r,s,a,h,l,c,f=Math.floor(i(e(this.hash,0),0,15,100,400)),u=Math.floor(i(e(this.hash,1),0,15,30,100)),p=Math.floor(i(e(this.hash,2),0,15,3,30));for(this.svg.setWidth(f),this.svg.setHeight(36*p),r=0;36>r;r++)l=e(this.hash,r),s=o(l),t=n(l),c=f/4*.7,h={fill:"none",stroke:t,opacity:s,"stroke-width":""+p+"px"},a="M0 "+u+" C "+c+" 0, "+(f/2-c)+" 0, "+f/2+" "+u+" S "+(f-c)+" "+2*u+", "+f+" "+u+" S "+(1.5*f-c)+" 0, "+1.5*f+", "+u,this.svg.path(a,h).transform({translate:[-f/4,p*r-1.5*u]}),this.svg.path(a,h).transform({translate:[-f/4,p*r-1.5*u+36*p]})},H.prototype.geoChevrons=function(){var t,r,s,a,l,c,f,u=i(e(this.hash,0),0,15,30,80),p=i(e(this.hash,0),0,15,30,80),g=h(u,p);for(this.svg.setWidth(6*u),this.svg.setHeight(6*p*.66),r=0,f=0;6>f;f++)for(c=0;6>c;c++)l=e(this.hash,r),s=o(l),t=n(l),a={stroke:S,"stroke-opacity":A,fill:t,"fill-opacity":s,"stroke-width":1},this.svg.group(a).transform({translate:[c*u,f*p*.66-p/2]}).polyline(g).end(),0===f&&this.svg.group(a).transform({translate:[c*u,6*p*.66-p/2]}).polyline(g).end(),r+=1},H.prototype.geoPlusSigns=function(){var t,r,s,a,h,c,f,u,p=i(e(this.hash,0),0,15,10,25),g=3*p,v=l(p);for(this.svg.setWidth(12*p),this.svg.setHeight(12*p),s=0,u=0;6>u;u++)for(f=0;6>f;f++)c=e(this.hash,s),a=o(c),r=n(c),t=u%2===0?0:1,h={fill:r,stroke:S,"stroke-opacity":A,"fill-opacity":a},this.svg.group(h).transform({translate:[f*g-f*p+t*p-p,u*g-u*p-g/2]}).rect(v).end(),0===f&&this.svg.group(h).transform({translate:[4*g-f*p+t*p-p,u*g-u*p-g/2]}).rect(v).end(),0===u&&this.svg.group(h).transform({translate:[f*g-f*p+t*p-p,4*g-u*p-g/2]}).rect(v).end(),0===f&&0===u&&this.svg.group(h).transform({translate:[4*g-f*p+t*p-p,4*g-u*p-g/2]}).rect(v).end(),s++},H.prototype.geoXes=function(){var t,r,s,a,h,c,f,u,p=i(e(this.hash,0),0,15,10,25),g=l(p),v=3*p*.943;for(this.svg.setWidth(3*v),this.svg.setHeight(3*v),s=0,u=0;6>u;u++)for(f=0;6>f;f++)c=e(this.hash,s),a=o(c),t=f%2===0?u*v-.5*v:u*v-.5*v+v/4,r=n(c),h={fill:r,opacity:a},this.svg.group(h).transform({translate:[f*v/2-v/2,t-u*v/2],rotate:[45,v/2,v/2]}).rect(g).end(),0===f&&this.svg.group(h).transform({translate:[6*v/2-v/2,t-u*v/2],rotate:[45,v/2,v/2]}).rect(g).end(),0===u&&(t=f%2===0?6*v-v/2:6*v-v/2+v/4,this.svg.group(h).transform({translate:[f*v/2-v/2,t-6*v/2],rotate:[45,v/2,v/2]}).rect(g).end()),5===u&&this.svg.group(h).transform({translate:[f*v/2-v/2,t-11*v/2],rotate:[45,v/2,v/2]}).rect(g).end(),0===f&&0===u&&this.svg.group(h).transform({translate:[6*v/2-v/2,t-6*v/2],rotate:[45,v/2,v/2]}).rect(g).end(),s++},H.prototype.geoOverlappingCircles=function(){var t,r,s,a,h,l,c,f=e(this.hash,0),u=i(f,0,15,25,200),p=u/2;for(this.svg.setWidth(6*p),this.svg.setHeight(6*p),r=0,c=0;6>c;c++)for(l=0;6>l;l++)h=e(this.hash,r),s=o(h),t=n(h),a={fill:t,opacity:s},this.svg.circle(l*p,c*p,p,a),0===l&&this.svg.circle(6*p,c*p,p,a),0===c&&this.svg.circle(l*p,6*p,p,a),0===l&&0===c&&this.svg.circle(6*p,6*p,p,a),r++},H.prototype.geoOctogons=function(){var t,r,s,a,h,l,f=i(e(this.hash,0),0,15,10,60),u=c(f);for(this.svg.setWidth(6*f),this.svg.setHeight(6*f),r=0,l=0;6>l;l++)for(h=0;6>h;h++)a=e(this.hash,r),s=o(a),t=n(a),this.svg.polyline(u,{fill:t,"fill-opacity":s,stroke:S,"stroke-opacity":A}).transform({translate:[h*f,l*f]}),r+=1},H.prototype.geoSquares=function(){var t,r,s,a,h,l,c=i(e(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*c),this.svg.setHeight(6*c),r=0,l=0;6>l;l++)for(h=0;6>h;h++)a=e(this.hash,r),s=o(a),t=n(a),this.svg.rect(h*c,l*c,c,c,{fill:t,"fill-opacity":s,stroke:S,"stroke-opacity":A}),r+=1},H.prototype.geoConcentricCircles=function(){var t,r,s,a,h,l,c=e(this.hash,0),f=i(c,0,15,10,60),u=f/5;for(this.svg.setWidth(6*(f+u)),this.svg.setHeight(6*(f+u)),r=0,l=0;6>l;l++)for(h=0;6>h;h++)a=e(this.hash,r),s=o(a),t=n(a),this.svg.circle(h*f+h*u+(f+u)/2,l*f+l*u+(f+u)/2,f/2,{fill:"none",stroke:t,opacity:s,"stroke-width":u+"px"}),a=e(this.hash,39-r),s=o(a),t=n(a),this.svg.circle(h*f+h*u+(f+u)/2,l*f+l*u+(f+u)/2,f/4,{fill:t,"fill-opacity":s}),r+=1},H.prototype.geoOverlappingRings=function(){var t,r,s,a,h,l,c,f=e(this.hash,0),u=i(f,0,15,10,60),p=u/4;for(this.svg.setWidth(6*u),this.svg.setHeight(6*u),r=0,c=0;6>c;c++)for(l=0;6>l;l++)h=e(this.hash,r),s=o(h),t=n(h),a={fill:"none",stroke:t,opacity:s,"stroke-width":p+"px"},this.svg.circle(l*u,c*u,u-p/2,a),0===l&&this.svg.circle(6*u,c*u,u-p/2,a),0===c&&this.svg.circle(l*u,6*u,u-p/2,a),0===l&&0===c&&this.svg.circle(6*u,6*u,u-p/2,a),r+=1},H.prototype.geoTriangles=function(){var t,r,s,a,h,l,c,u,p=e(this.hash,0),g=i(p,0,15,15,80),v=g/2*Math.sqrt(3),y=f(g,v);for(this.svg.setWidth(3*g),this.svg.setHeight(6*v),r=0,u=0;6>u;u++)for(c=0;6>c;c++)l=e(this.hash,r),s=o(l),t=n(l),h={fill:t,"fill-opacity":s,stroke:S,"stroke-opacity":A},a=u%2===0?c%2===0?180:0:c%2!==0?180:0,this.svg.polyline(y,h).transform({translate:[c*g*.5-g/2,v*u],rotate:[a,g/2,v/2]}),0===c&&this.svg.polyline(y,h).transform({translate:[6*g*.5-g/2,v*u],rotate:[a,g/2,v/2]}),r+=1},H.prototype.geoDiamonds=function(){var t,r,s,a,h,l,c,f,p=i(e(this.hash,0),0,15,10,50),g=i(e(this.hash,1),0,15,10,50),v=u(p,g);for(this.svg.setWidth(6*p),this.svg.setHeight(3*g),s=0,f=0;6>f;f++)for(c=0;6>c;c++)l=e(this.hash,s),a=o(l),r=n(l),h={fill:r,"fill-opacity":a,stroke:S,"stroke-opacity":A},t=f%2===0?0:p/2,this.svg.polyline(v,h).transform({translate:[c*p-p/2+t,g/2*f-g/2]}),0===c&&this.svg.polyline(v,h).transform({translate:[6*p-p/2+t,g/2*f-g/2]}),0===f&&this.svg.polyline(v,h).transform({translate:[c*p-p/2+t,g/2*6-g/2]}),0===c&&0===f&&this.svg.polyline(v,h).transform({translate:[6*p-p/2+t,g/2*6-g/2]}),s+=1},H.prototype.geoNestedSquares=function(){var t,r,s,a,h,l,c,f=i(e(this.hash,0),0,15,4,12),u=7*f;for(this.svg.setWidth(6*(u+f)+6*f),this.svg.setHeight(6*(u+f)+6*f),r=0,c=0;6>c;c++)for(l=0;6>l;l++)h=e(this.hash,r),s=o(h),t=n(h),a={fill:"none",stroke:t,opacity:s,"stroke-width":f+"px"},this.svg.rect(l*u+l*f*2+f/2,c*u+c*f*2+f/2,u,u,a),h=e(this.hash,39-r),s=o(h),t=n(h),a={fill:"none",stroke:t,opacity:s,"stroke-width":f+"px"},this.svg.rect(l*u+l*f*2+f/2+2*f,c*u+c*f*2+f/2+2*f,3*f,3*f,a),r+=1},H.prototype.geoMosaicSquares=function(){var t,r,s,n=i(e(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*n),this.svg.setHeight(8*n),t=0,s=0;4>s;s++)for(r=0;4>r;r++)r%2===0?s%2===0?v(this.svg,r*n*2,s*n*2,n,e(this.hash,t)):g(this.svg,r*n*2,s*n*2,n,[e(this.hash,t),e(this.hash,t+1)]):s%2===0?g(this.svg,r*n*2,s*n*2,n,[e(this.hash,t),e(this.hash,t+1)]):v(this.svg,r*n*2,s*n*2,n,e(this.hash,t)),t+=1},H.prototype.geoPlaid=function(){var t,r,s,i,a,h,l,c=0,f=0;for(r=0;36>r;)i=e(this.hash,r),c+=i+5,l=e(this.hash,r+1),s=o(l),t=n(l),a=l+5,this.svg.rect(0,c,"100%",a,{opacity:s,fill:t}),c+=a,r+=2;for(r=0;36>r;)i=e(this.hash,r),f+=i+5,l=e(this.hash,r+1),s=o(l),t=n(l),h=l+5,this.svg.rect(f,0,h,"100%",{opacity:s,fill:t}),f+=h,r+=2;this.svg.setWidth(f),this.svg.setHeight(c)},H.prototype.geoTessellation=function(){var t,r,s,a,h,l=i(e(this.hash,0),0,15,5,40),c=l*Math.sqrt(3),f=2*l,u=l/2*Math.sqrt(3),p=y(l,u),g=3*l+2*u,v=2*c+2*l;for(this.svg.setWidth(g),this.svg.setHeight(v),r=0;20>r;r++)switch(h=e(this.hash,r),s=o(h),t=n(h),a={stroke:S,"stroke-opacity":A,fill:t,"fill-opacity":s,"stroke-width":1},r){case 0:this.svg.rect(-l/2,-l/2,l,l,a),this.svg.rect(g-l/2,-l/2,l,l,a),this.svg.rect(-l/2,v-l/2,l,l,a),this.svg.rect(g-l/2,v-l/2,l,l,a);break;case 1:this.svg.rect(f/2+u,c/2,l,l,a);break;case 2:this.svg.rect(-l/2,v/2-l/2,l,l,a),this.svg.rect(g-l/2,v/2-l/2,l,l,a);break;case 3:this.svg.rect(f/2+u,1.5*c+l,l,l,a);break;case 4:this.svg.polyline(p,a).transform({translate:[l/2,-l/2],rotate:[0,l/2,u/2]}),this.svg.polyline(p,a).transform({translate:[l/2,v- -l/2],rotate:[0,l/2,u/2],scale:[1,-1]});break;case 5:this.svg.polyline(p,a).transform({translate:[g-l/2,-l/2],rotate:[0,l/2,u/2],scale:[-1,1]}),this.svg.polyline(p,a).transform({translate:[g-l/2,v+l/2],rotate:[0,l/2,u/2],scale:[-1,-1]});break;case 6:this.svg.polyline(p,a).transform({translate:[g/2+l/2,c/2]});break;case 7:this.svg.polyline(p,a).transform({translate:[g-g/2-l/2,c/2],scale:[-1,1]});break;case 8:this.svg.polyline(p,a).transform({translate:[g/2+l/2,v-c/2],scale:[1,-1]});break;case 9:this.svg.polyline(p,a).transform({translate:[g-g/2-l/2,v-c/2],scale:[-1,-1]});break;case 10:this.svg.polyline(p,a).transform({translate:[l/2,v/2-l/2]});break;case 11:this.svg.polyline(p,a).transform({translate:[g-l/2,v/2-l/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,l,l,a).transform({translate:[l/2,l/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,l,l,a).transform({scale:[-1,1],translate:[-g+l/2,l/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,l,l,a).transform({translate:[l/2,v/2-l/2-l],rotate:[30,0,l]});break;case 15:this.svg.rect(0,0,l,l,a).transform({scale:[-1,1],translate:[-g+l/2,v/2-l/2-l],rotate:[30,0,l]});break;case 16:this.svg.rect(0,0,l,l,a).transform({scale:[1,-1],translate:[l/2,-v+v/2-l/2-l],rotate:[30,0,l]});break;case 17:this.svg.rect(0,0,l,l,a).transform({scale:[-1,-1],translate:[-g+l/2,-v+v/2-l/2-l],rotate:[30,0,l]});break;case 18:this.svg.rect(0,0,l,l,a).transform({scale:[1,-1],translate:[l/2,-v+l/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,l,l,a).transform({scale:[-1,-1],translate:[-g+l/2,-v+l/2],rotate:[-30,0,0]})}}}).call(this,t("buffer").Buffer)},{"./color":2,"./sha1":5,"./svg":6,buffer:8,extend:9}],5:[function(t,r){"use strict";function s(){function t(){for(var t=16;80>t;t++){var r=f[t-3]^f[t-8]^f[t-14]^f[t-16];f[t]=r<<1|r>>>31}var s,e,i=o,n=a,p=h,g=l,v=c;for(t=0;80>t;t++){20>t?(s=g^n&(p^g),e=1518500249):40>t?(s=n^p^g,e=1859775393):60>t?(s=n&p|g&(n|p),e=2400959708):(s=n^p^g,e=3395469782);var y=(i<<5|i>>>27)+s+v+e+(0|f[t]);v=g,g=p,p=n<<30|n>>>2,n=i,i=y}for(o=o+i|0,a=a+n|0,h=h+p|0,l=l+g|0,c=c+v|0,u=0,t=0;16>t;t++)f[t]=0}function r(r){f[u]|=(255&r)<e;e++)r(t.charCodeAt(e))}function e(t){if("string"==typeof t)return s(t);var e=t.length;g+=8*e;for(var i=0;e>i;i++)r(t[i])}function i(t){for(var r="",s=28;s>=0;s-=4)r+=(t>>s&15).toString(16);return r}function n(){r(128),(u>14||14===u&&24>p)&&t(),u=14,p=24,r(0),r(0),r(g>0xffffffffff?g/1099511627776:0),r(g>4294967295?g/4294967296:0);for(var s=24;s>=0;s-=8)r(g>>s);return i(o)+i(a)+i(h)+i(l)+i(c)}var o=1732584193,a=4023233417,h=2562383102,l=271733878,c=3285377520,f=new Uint32Array(80),u=0,p=24,g=0;return{update:e,digest:n}}r.exports=function(t){if(void 0===t)return s();var r=s();return r.update(t),r.digest()}},{}],6:[function(t,r){"use strict";function s(){return this.width=100,this.height=100,this.svg=new i("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}var e=t("extend"),i=t("./xml");r.exports=s,s.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},s.prototype.end=function(){return this.context.pop(),this},s.prototype.currentNode=function(){var t=this.currentContext();return t.lastChild||t},s.prototype.transform=function(t){return this.currentNode().setAttribute("transform",Object.keys(t).map(function(r){return r+"("+t[r].join(",")+")"}).join(" ")),this},s.prototype.setAttributes=function(t,r){Object.keys(r).forEach(function(s){t.setAttribute(s,r[s])})},s.prototype.setWidth=function(t){this.svg.setAttribute("width",Math.floor(t))},s.prototype.setHeight=function(t){this.svg.setAttribute("height",Math.floor(t))},s.prototype.toString=function(){return this.svg.toString()},s.prototype.rect=function(t,r,s,n,o){var a=this;if(Array.isArray(t))return t.forEach(function(t){a.rect.apply(a,t.concat(o))}),this;var h=new i("rect");return this.currentContext().appendChild(h),this.setAttributes(h,e({x:t,y:r,width:s,height:n},o)),this},s.prototype.circle=function(t,r,s,n){var o=new i("circle");return this.currentContext().appendChild(o),this.setAttributes(o,e({cx:t,cy:r,r:s},n)),this},s.prototype.path=function(t,r){var s=new i("path");return this.currentContext().appendChild(s),this.setAttributes(s,e({d:t},r)),this},s.prototype.polyline=function(t,r){var s=this;if(Array.isArray(t))return t.forEach(function(t){s.polyline(t,r)}),this;var n=new i("polyline");return this.currentContext().appendChild(n),this.setAttributes(n,e({points:t},r)),this},s.prototype.group=function(t){var r=new i("g");return this.currentContext().appendChild(r),this.context.push(r),this.setAttributes(r,e({},t)),this}},{"./xml":7,extend:9}],7:[function(t,r){"use strict";var s=r.exports=function(t){return this instanceof s?(this.tagName=t,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new s(t)};s.prototype.appendChild=function(t){return this.children.push(t),this.lastChild=t,this},s.prototype.setAttribute=function(t,r){return this.attributes[t]=r,this},s.prototype.toString=function(){var t=this;return["<",t.tagName,Object.keys(t.attributes).map(function(r){return[" ",r,'="',t.attributes[r],'"'].join("")}).join(""),">",t.children.map(function(t){return t.toString()}).join(""),""].join("")}},{}],8:[function(){},{}],9:[function(t,r){function s(t){if(!t||"[object Object]"!==i.call(t)||t.nodeType||t.setInterval)return!1;var r=e.call(t,"constructor"),s=e.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!s)return!1;var n;for(n in t);return void 0===n||e.call(t,n)}var e=Object.prototype.hasOwnProperty,i=Object.prototype.toString;r.exports=function n(){var t,r,e,i,o,a,h=arguments[0]||{},l=1,c=arguments.length,f=!1;for("boolean"==typeof h&&(f=h,h=arguments[1]||{},l=2),"object"!=typeof h&&"function"!=typeof h&&(h={});c>l;l++)if(null!=(t=arguments[l]))for(r in t)e=h[r],i=t[r],h!==i&&(f&&i&&(s(i)||(o=Array.isArray(i)))?(o?(o=!1,a=e&&Array.isArray(e)?e:[]):a=e&&s(e)?e:{},h[r]=n(f,a,i)):void 0!==i&&(h[r]=i));return h}},{}]},{},[1])(1)})}).call(this); + +(function(){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(a,o),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!e||!e.noES6)&&this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string"))?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(i,a),t.JavaScriptHighlightRules=i}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,i=e("../../lib/lang"),s=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],l,u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?l=u[t]:void(l=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,o){var a=n.getCursorPosition(),s=r.doc.getLine(a.row);if("{"==o){g(n);var c=n.getSelectionRange(),u=r.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(s[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==o){g(n);var m=s.substring(a.column,a.column+1);if("}"==m){var p=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,s,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==o||"\r\n"==o){g(n);var h="";d.isMaybeInsertedClosing(a,s)&&(h=i.stringRepeat("}",l.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=s.substring(a.column,a.column+1);if("}"===m){var x=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!x)return null;var f=this.$getIndent(r.getLine(x.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var f=this.$getIndent(s)}var k=f+r.getTabString();return{text:"\n"+k+"\n"+f+h,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.end.column,o.end.column+1);if("}"==s)return o.end.column++,o;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),l=c.substring(s.column,s.column+1);if(")"==l){var u=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),l=c.substring(s.column,s.column+1);if("]"==l){var u=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var a=o,i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var c=n.getCursorPosition(),l=r.doc.getLine(c.row),u=l.substring(c.column-1,c.column),d=l.substring(c.column,c.column+1),m=r.getTokenAt(c.row,c.column),p=r.getTokenAt(c.row,c.column+1);if("\\"==u&&m&&/escape/.test(m.type))return null;var h=m&&/string/.test(m.type),x=!p||/string/.test(p.type),f;if(d==a)f=h!==x;else{if(h&&!x)return null;if(h&&x)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var b=k.test(u);k.lastIndex=0;var y=k.test(u);if(b||y)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;f=!0}return{text:f?a+a:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==a||"'"==a)){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(s==a)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",s)){var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",s))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=r.row,l.autoInsertedLineEnd=n+o.substr(r.column),l.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=r.row,l.maybeInsertedLineStart=o.substr(0,r.column)+n,l.maybeInsertedLineEnd=o.substr(r.column),l.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return l.autoInsertedBrackets>0&&e.row===l.autoInsertedRow&&n===l.autoInsertedLineEnd[0]&&t.substr(e.column)===l.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return l.maybeInsertedBrackets>0&&e.row===l.maybeInsertedRow&&t.substr(e.column)===l.maybeInsertedLineEnd&&t.substr(0,e.column)==l.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},r.inherits(d,o),t.CstyleBehaviour=d}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var a=o.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=o.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,c=e.getLength();++tl)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new o(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,c=1;++ni?new o(i,r,u,t.length):void 0}}.call(i.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../range").Range,c=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new u};r.inherits(g,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),a=o.tokens,i=o.state;if(a.length&&"comment"==a[a.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(g.prototype),t.Mode=g}),ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while",t="null|Infinity|NaN|undefined",n="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(i,a),t.JavaHighlightRules=i}),ace.define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./javascript").Mode,a=e("./java_highlight_rules").JavaHighlightRules,i=function(){o.call(this),this.HighlightRules=a};r.inherits(i,o),function(){this.createWorker=function(e){return null},this.$id="ace/mode/java"}.call(i.prototype),t.Mode=i})}).call(this); + +(function(){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(a,o),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!e||!e.noES6)&&this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string"))?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(i,a),t.JavaScriptHighlightRules=i}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,i=e("../../lib/lang"),s=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],l,u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?l=u[t]:void(l=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,o){var a=n.getCursorPosition(),s=r.doc.getLine(a.row);if("{"==o){g(n);var c=n.getSelectionRange(),u=r.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(s[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==o){g(n);var p=s.substring(a.column,a.column+1);if("}"==p){var m=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==m&&d.isAutoInsertedClosing(a,s,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==o||"\r\n"==o){g(n);var h="";d.isMaybeInsertedClosing(a,s)&&(h=i.stringRepeat("}",l.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var p=s.substring(a.column,a.column+1);if("}"===p){var f=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(s)}var k=x+r.getTabString();return{text:"\n"+k+"\n"+x+h,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.end.column,o.end.column+1);if("}"==s)return o.end.column++,o;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),l=c.substring(s.column,s.column+1);if(")"==l){var u=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),l=c.substring(s.column,s.column+1);if("]"==l){var u=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var a=o,i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var c=n.getCursorPosition(),l=r.doc.getLine(c.row),u=l.substring(c.column-1,c.column),d=l.substring(c.column,c.column+1),p=r.getTokenAt(c.row,c.column),m=r.getTokenAt(c.row,c.column+1);if("\\"==u&&p&&/escape/.test(p.type))return null;var h=p&&/string/.test(p.type),f=!m||/string/.test(m.type),x;if(d==a)x=h!==f;else{if(h&&!f)return null;if(h&&f)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var b=k.test(u);k.lastIndex=0;var y=k.test(u);if(b||y)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;x=!0}return{text:x?a+a:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==a||"'"==a)){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(s==a)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",s)){var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",s))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=r.row,l.autoInsertedLineEnd=n+o.substr(r.column),l.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=r.row,l.maybeInsertedLineStart=o.substr(0,r.column)+n,l.maybeInsertedLineEnd=o.substr(r.column),l.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return l.autoInsertedBrackets>0&&e.row===l.autoInsertedRow&&n===l.autoInsertedLineEnd[0]&&t.substr(e.column)===l.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return l.maybeInsertedBrackets>0&&e.row===l.maybeInsertedRow&&t.substr(e.column)===l.maybeInsertedLineEnd&&t.substr(0,e.column)==l.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},r.inherits(d,o),t.CstyleBehaviour=d}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var a=o.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=o.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,c=e.getLength();++tl)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new o(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,c=1;++ni?new o(i,r,u,t.length):void 0}}.call(i.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../range").Range,c=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new u};r.inherits(g,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),a=o.tokens,i=o.state;if(a.length&&"comment"==a[a.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(g.prototype),t.Mode=g}),ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=function(){var e=[{token:["keyword.operator.ts","text","variable.parameter.function.ts","text"],regex:"\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*\\{)"},{token:["storage.type.variable.ts","text","keyword.other.ts","text"],regex:"(super)(\\s*\\()([a-zA-Z0-9,_?.$\\s]+\\s*)(\\))"},{token:["entity.name.function.ts","paren.lparen","paren.rparen"],regex:"([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))"},{token:["variable.parameter.function.ts","text","variable.parameter.function.ts"],regex:"([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*:\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)"},{token:["keyword.operator.ts"],regex:"(?:\\b(constructor|declare|interface|as|AS|public|private|class|extends|export|super)\\b)"},{token:["storage.type.variable.ts"],regex:"(?:\\b(this\\.|string\\b|bool\\b|number)\\b)"},{token:["keyword.operator.ts","storage.type.variable.ts","keyword.operator.ts","storage.type.variable.ts"],regex:"(class)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)(extends)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)?"},{token:"keyword",regex:"(?:super|export|class|extends|import)\\b"}],t=(new o).getRules();t.start=e.concat(t.start),this.$rules=t};r.inherits(a,o),t.TypeScriptHighlightRules=a}),ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./javascript").Mode,a=e("./typescript_highlight_rules").TypeScriptHighlightRules,i=e("./behaviour/cstyle").CstyleBehaviour,s=e("./folding/cstyle").FoldMode,c=e("./matching_brace_outdent").MatchingBraceOutdent,l=function(){this.HighlightRules=a,this.$outdent=new c,this.$behaviour=new i,this.foldingRules=new s};r.inherits(l,o),function(){this.createWorker=function(e){return null},this.$id="ace/mode/typescript"}.call(l.prototype),t.Mode=l})}).call(this); + +(function(){ace.define("ace/theme/solarized_dark",["require","exports","module","ace/lib/dom"],function(a,e,r){e.isDark=!0,e.cssClass="ace-solarized-dark",e.cssText=".ace-solarized-dark .ace_gutter {background: #01313f;color: #d0edf7}.ace-solarized-dark .ace_print-margin {width: 1px;background: #33555E}.ace-solarized-dark {background-color: #002B36;color: #93A1A1}.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,.ace-solarized-dark .ace_storage {color: #93A1A1}.ace-solarized-dark .ace_cursor,.ace-solarized-dark .ace_string.ace_regexp {color: #D30102}.ace-solarized-dark .ace_marker-layer .ace_active-line,.ace-solarized-dark .ace_marker-layer .ace_selection {background: rgba(255, 255, 255, 0.1)}.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002B36;border-radius: 2px}.ace-solarized-dark .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-solarized-dark .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_gutter-active-line {background-color: #0d3440}.ace-solarized-dark .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-dark .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_keyword,.ace-solarized-dark .ace_meta,.ace-solarized-dark .ace_support.ace_class,.ace-solarized-dark .ace_support.ace_type {color: #859900}.ace-solarized-dark .ace_constant.ace_character,.ace-solarized-dark .ace_constant.ace_other {color: #CB4B16}.ace-solarized-dark .ace_constant.ace_language {color: #B58900}.ace-solarized-dark .ace_constant.ace_numeric {color: #D33682}.ace-solarized-dark .ace_fold {background-color: #268BD2;border-color: #93A1A1}.ace-solarized-dark .ace_entity.ace_name.ace_function,.ace-solarized-dark .ace_entity.ace_name.ace_tag,.ace-solarized-dark .ace_support.ace_function,.ace-solarized-dark .ace_variable,.ace-solarized-dark .ace_variable.ace_language {color: #268BD2}.ace-solarized-dark .ace_string {color: #2AA198}.ace-solarized-dark .ace_comment {font-style: italic;color: #657B83}.ace-solarized-dark .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y}";var c=a("../lib/dom");c.importCssString(e.cssText,e.cssClass)})}).call(this); + +(function(){ace.define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"],function(e,a,c){a.isDark=!1,a.cssClass="ace-solarized-light",a.cssText=".ace-solarized-light .ace_gutter {background: #fbf1d3;color: #333}.ace-solarized-light .ace_print-margin {width: 1px;background: #e8e8e8}.ace-solarized-light {background-color: #FDF6E3;color: #586E75}.ace-solarized-light .ace_cursor {color: #000000}.ace-solarized-light .ace_marker-layer .ace_selection {background: rgba(7, 54, 67, 0.09)}.ace-solarized-light.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FDF6E3;border-radius: 2px}.ace-solarized-light .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-solarized-light .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_marker-layer .ace_active-line {background: #EEE8D5}.ace-solarized-light .ace_gutter-active-line {background-color : #EDE5C1}.ace-solarized-light .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-light .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_keyword,.ace-solarized-light .ace_meta,.ace-solarized-light .ace_support.ace_class,.ace-solarized-light .ace_support.ace_type {color: #859900}.ace-solarized-light .ace_constant.ace_character,.ace-solarized-light .ace_constant.ace_other {color: #CB4B16}.ace-solarized-light .ace_constant.ace_language {color: #B58900}.ace-solarized-light .ace_constant.ace_numeric {color: #D33682}.ace-solarized-light .ace_fold {background-color: #268BD2;border-color: #586E75}.ace-solarized-light .ace_entity.ace_name.ace_function,.ace-solarized-light .ace_entity.ace_name.ace_tag,.ace-solarized-light .ace_support.ace_function,.ace-solarized-light .ace_variable,.ace-solarized-light .ace_variable.ace_language {color: #268BD2}.ace-solarized-light .ace_storage {color: #073642}.ace-solarized-light .ace_string {color: #2AA198}.ace-solarized-light .ace_string.ace_regexp {color: #D30102}.ace-solarized-light .ace_comment,.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {color: #93A1A1}.ace-solarized-light .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(a.cssText,a.cssClass)})}).call(this); + +(function(){ace.define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"],function(o,e,r){e.isDark=!1,e.cssClass="ace-tomorrow",e.cssText=".ace-tomorrow .ace_gutter {background: #f6f6f6;color: #4D4D4C}.ace-tomorrow .ace_print-margin {width: 1px;background: #f6f6f6}.ace-tomorrow {background-color: #FFFFFF;color: #4D4D4C}.ace-tomorrow .ace_cursor {color: #AEAFAD}.ace-tomorrow .ace_marker-layer .ace_selection {background: #D6D6D6}.ace-tomorrow.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;border-radius: 2px}.ace-tomorrow .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-tomorrow .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #D1D1D1}.ace-tomorrow .ace_marker-layer .ace_active-line {background: #EFEFEF}.ace-tomorrow .ace_gutter-active-line {background-color : #dcdcdc}.ace-tomorrow .ace_marker-layer .ace_selected-word {border: 1px solid #D6D6D6}.ace-tomorrow .ace_invisible {color: #D1D1D1}.ace-tomorrow .ace_keyword,.ace-tomorrow .ace_meta,.ace-tomorrow .ace_storage,.ace-tomorrow .ace_storage.ace_type,.ace-tomorrow .ace_support.ace_type {color: #8959A8}.ace-tomorrow .ace_keyword.ace_operator {color: #3E999F}.ace-tomorrow .ace_constant.ace_character,.ace-tomorrow .ace_constant.ace_language,.ace-tomorrow .ace_constant.ace_numeric,.ace-tomorrow .ace_keyword.ace_other.ace_unit,.ace-tomorrow .ace_support.ace_constant,.ace-tomorrow .ace_variable.ace_parameter {color: #F5871F}.ace-tomorrow .ace_constant.ace_other {color: #666969}.ace-tomorrow .ace_invalid {color: #FFFFFF;background-color: #C82829}.ace-tomorrow .ace_invalid.ace_deprecated {color: #FFFFFF;background-color: #8959A8}.ace-tomorrow .ace_fold {background-color: #4271AE;border-color: #4D4D4C}.ace-tomorrow .ace_entity.ace_name.ace_function,.ace-tomorrow .ace_support.ace_function,.ace-tomorrow .ace_variable {color: #4271AE}.ace-tomorrow .ace_support.ace_class,.ace-tomorrow .ace_support.ace_type {color: #C99E00}.ace-tomorrow .ace_heading,.ace-tomorrow .ace_markup.ace_heading,.ace-tomorrow .ace_string {color: #718C00}.ace-tomorrow .ace_entity.ace_name.ace_tag,.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow .ace_meta.ace_tag,.ace-tomorrow .ace_string.ace_regexp,.ace-tomorrow .ace_variable {color: #C82829}.ace-tomorrow .ace_comment {color: #8E908C}.ace-tomorrow .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y}";var a=o("../lib/dom");a.importCssString(e.cssText,e.cssClass)})}).call(this); + +(function(){ace.define("ace/theme/tomorrow_night",["require","exports","module","ace/lib/dom"],function(o,e,r){e.isDark=!0,e.cssClass="ace-tomorrow-night",e.cssText=".ace-tomorrow-night .ace_gutter {background: #25282c;color: #C5C8C6}.ace-tomorrow-night .ace_print-margin {width: 1px;background: #25282c}.ace-tomorrow-night {background-color: #1D1F21;color: #C5C8C6}.ace-tomorrow-night .ace_cursor {color: #AEAFAD}.ace-tomorrow-night .ace_marker-layer .ace_selection {background: #373B41}.ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #1D1F21;border-radius: 2px}.ace-tomorrow-night .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-tomorrow-night .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #4B4E55}.ace-tomorrow-night .ace_marker-layer .ace_active-line {background: #282A2E}.ace-tomorrow-night .ace_gutter-active-line {background-color: #282A2E}.ace-tomorrow-night .ace_marker-layer .ace_selected-word {border: 1px solid #373B41}.ace-tomorrow-night .ace_invisible {color: #4B4E55}.ace-tomorrow-night .ace_keyword,.ace-tomorrow-night .ace_meta,.ace-tomorrow-night .ace_storage,.ace-tomorrow-night .ace_storage.ace_type,.ace-tomorrow-night .ace_support.ace_type {color: #B294BB}.ace-tomorrow-night .ace_keyword.ace_operator {color: #8ABEB7}.ace-tomorrow-night .ace_constant.ace_character,.ace-tomorrow-night .ace_constant.ace_language,.ace-tomorrow-night .ace_constant.ace_numeric,.ace-tomorrow-night .ace_keyword.ace_other.ace_unit,.ace-tomorrow-night .ace_support.ace_constant,.ace-tomorrow-night .ace_variable.ace_parameter {color: #DE935F}.ace-tomorrow-night .ace_constant.ace_other {color: #CED1CF}.ace-tomorrow-night .ace_invalid {color: #CED2CF;background-color: #DF5F5F}.ace-tomorrow-night .ace_invalid.ace_deprecated {color: #CED2CF;background-color: #B798BF}.ace-tomorrow-night .ace_fold {background-color: #81A2BE;border-color: #C5C8C6}.ace-tomorrow-night .ace_entity.ace_name.ace_function,.ace-tomorrow-night .ace_support.ace_function,.ace-tomorrow-night .ace_variable {color: #81A2BE}.ace-tomorrow-night .ace_support.ace_class,.ace-tomorrow-night .ace_support.ace_type {color: #F0C674}.ace-tomorrow-night .ace_heading,.ace-tomorrow-night .ace_markup.ace_heading,.ace-tomorrow-night .ace_string {color: #B5BD68}.ace-tomorrow-night .ace_entity.ace_name.ace_tag,.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow-night .ace_meta.ace_tag,.ace-tomorrow-night .ace_string.ace_regexp,.ace-tomorrow-night .ace_variable {color: #CC6666}.ace-tomorrow-night .ace_comment {color: #969896}.ace-tomorrow-night .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y}";var a=o("../lib/dom");a.importCssString(e.cssText,e.cssClass)})}).call(this); + +(function(){"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&Meteor.disconnect();var e=localStorage.getItem("contractSource");e&&(""===e||-1!==e.indexOf(Helpers.getDefaultContractExample(!0))&&e.split("contract ").length-1===1)&&localStorage.setItem("contractSource",Helpers.getDefaultContractExample()),Meteor.Spinner.options={lines:17,length:0,width:4,radius:16,corners:1,rotate:0,direction:1,color:"#000",speed:1.7,trail:49,shadow:!1,hwaccel:!1,className:"spinner",zIndex:10,top:"50%",left:"50%"},web3.eth.isSyncing(function(e,t){e||(t===!0?(console.time("nodeRestarted"),console.log("Node started syncing, stopping app operation"),web3.reset(!0),_.each(collectionObservers,function(e){e&&e.stop()}),collectionObservers=[]):_.isObject(t)?(t.progress=Math.floor((t.currentBlock-t.startingBlock)/(t.highestBlock-t.startingBlock)*100),t.blockDiff=numeral(t.highestBlock-t.currentBlock).format("0,0"),TemplateVar.setTo("header nav","syncing",t)):(console.timeEnd("nodeRestarted"),console.log("Restart app operation again"),TemplateVar.setTo("header nav","syncing",!1),connectToNode()))});var t=function(){web3.isConnected()?web3.eth.getSyncing(function(e,t){e||!t?connectToNode():EthAccounts.init()}):Meteor.setTimeout(function(){var e=web3.admin?"geth":'geth --rpc --rpccorsdomain "'+window.location.protocol+"//"+window.location.host+'"';EthElements.Modal.question({text:new Spacebars.SafeString(TAPi18n.__("wallet.app.texts.connectionError"+(web3.admin?"Mist":"Browser"),{node:e})),ok:function(){Tracker.afterFlush(function(){t()})}},{closeable:!1})},600)};Meteor.startup(function(){Meteor.setTimeout(function(){t()},3e3)})}).call(this); + +(function(){Wallets=new Mongo.Collection("wallets",{connection:null}),new PersistentMinimongo2(Wallets,"ethereum_wallet"),CustomContracts=new Mongo.Collection("custom-contracts",{connection:null}),new PersistentMinimongo2(CustomContracts,"ethereum_wallet"),Transactions=new Mongo.Collection("transactions",{connection:null}),new PersistentMinimongo2(Transactions,"ethereum_wallet"),PendingConfirmations=new Mongo.Collection("pending-confirmations",{connection:null}),new PersistentMinimongo2(PendingConfirmations,"ethereum_wallet"),Events=new Mongo.Collection("events",{connection:null}),new PersistentMinimongo2(Events,"ethereum_wallet"),Tokens=new Mongo.Collection("tokens",{connection:null}),new PersistentMinimongo2(Tokens,"ethereum_wallet")}).call(this); + +(function(){Template.elements_input_address.helpers({attributes:function(){var e=_.clone(this);return e["class"]=this["class"]?this["class"]+" abi-input":"abi-input",e.placeholder=this.placeholder||"0x123456...",e.value=this.value,e}})}).call(this); + +(function(){Template.views_modals_addCustomContract.onRendered(function(){this.$('input[name="address"]').focus()}),Template.views_modals_addCustomContract.events({'blur input[name="address"]':function(e,t){var a=e.currentTarget.value;Helpers.getENSName(a,function(e,n,s){a.toLowerCase()==s&&t.$("input.name").attr("disabled","true").val(n).change()})}})}).call(this); + +(function(){Template.views_modals_addToken.onRendered(function(){this.data&&this.data.address||this.$('input[name="address"]').focus()}),Template.views_modals_addToken.helpers({previewToken:function(){var e=_.clone(this||{});return TemplateVar.get("address")&&(e.address=TemplateVar.get("address")),TemplateVar.get("decimals")&&(e.decimals=TemplateVar.get("decimals")),TemplateVar.get("symbol")&&(e.symbol=TemplateVar.get("symbol")),TemplateVar.get("name")&&(e.name=TemplateVar.get("name")),e}}),Template.views_modals_addToken.events({"change .decimals, input .decimals":function(e,a){TemplateVar.set("decimals",e.target.value)},"change input.symbol, input input.symbol":function(e,a){TemplateVar.set("symbol",e.target.value)},"change input.name, input input.name":function(e,a){TemplateVar.set("name",e.target.value)},'change input[name="address"], input input[name="address"], blur input[name="address"]':function(e,a){var t=TemplateVar.getFrom(".token-address","value"),n=e.currentTarget.value.length;if(!t&&n>2&&6>n&&(e.currentTarget.value+=".thetoken.eth",e.currentTarget.setSelectionRange(n,n+13)),!(!t||a.data&&a.data.address&&a.data.address==t)){TemplateVar.set("address",t);var s=GeoPattern.generate(t,{color:"#CCC6C6"});$(".example.wallet-box.tokens").css("background-image",s.toDataUrl());var l=TokenContract.at(t);l.symbol(function(e,t){a.$("input.symbol").val(t).change()}),l.name(function(e,t){a.$("input.name").val(t).change()}),l.decimals(function(e,t){a.$("input.decimals").val(t).change()})}},"click .example.wallet-box.tokens":function(e){e.preventDefault()}})}).call(this); + +(function(){Template.views_modals_eventInfo.helpers({event:function(){return Events.findOne(this._id)},confirmations:function(){return EthBlocks.latest&&this.blockNumber?EthBlocks.latest.number+1-this.blockNumber:0},returnValues:function(){if(this.args){var t=[];return _.each(this.args,function(e,n){(_.isObject(e)||e instanceof BigNumber)&&e.toFormat&&(e=e.toFormat(0)),t.push({name:n,value:e})}),t}return[]}})}).call(this); + +(function(){Template.views_modals_interface.helpers({jsonInterface:function(){return JSON.stringify(this.jsonInterface,null,2).replace(/\s+/g," ")}}),Template.views_modals_interface.events({"focus textarea":function(e,t){Tracker.afterFlush(function(){t.$("textarea").select()})}})}).call(this); + +(function(){Template.views_modals_qrCode.onRendered(function(){if(this.data&&this.data.address){var e=new Qrcodesvg(this.data.address,"qrcode",150,{ecclevel:1});e.draw({method:"classic","fill-colors":["#555","#555","#666"]},{"stroke-width":1})}})}).call(this); + +(function(){Template.views_modals_selectAccount.helpers({accounts:function(){return _.isString(this.accounts[0])?Helpers.getAccounts({address:{$in:this.accounts}}):this.accounts}}),Template.views_modals_selectAccount.events({"click .dapp-account-list button":function(t,c){c.data.callback(this.address),EthElements.Modal.hide()}})}).call(this); + +(function(){Template.views_modals_sendTransactionInfo.helpers({estimatedFee:function(){return this.estimatedGas&&this.gasPrice?EthTools.formatBalance(new BigNumber(this.estimatedGas,10).times(new BigNumber(this.gasPrice,10)),"0,0.0[0000000] unit","ether"):void 0}})}).call(this); + +(function(){Template.views_modals_transactionInfo.helpers({transaction:function(){return Transactions.findOne(this._id)},confirmations:function(){return EthBlocks.latest&&this.blockNumber?EthBlocks.latest.number+1-this.blockNumber:0},tokenValue:function(){var t=Tokens.findOne(this.tokenId);return t?Helpers.formatNumberByDecimals(this.value,t.decimals)+" "+t.symbol:this.value},gasPricePerMillion:function(){return 1e6*this.gasPrice}})}).call(this); + +(function(){var t=12;Template.elements_account.rendered=function(){var t=GeoPattern.generate(this.data.address);this.$(".account-pattern").css("background-image",t.toDataUrl())},Template.elements_account.helpers({account:function(){return EthAccounts.findOne(this.account)||Wallets.findOne(this.account)||CustomContracts.findOne(this.account)},tokens:function(){var t={};return t["balances."+this._id]={$exists:!0},Tokens.find(t,{limit:5,sort:{name:1}})},formattedTokenBalance:function(t){var e=Template.parentData(2);return this.balances&&Number(this.balances[e._id])>0?Helpers.formatNumberByDecimals(this.balances[e._id],this.decimals)+" "+this.symbol:!1},name:function(){return this.name||TAPi18n.__("wallet.accounts.defaultName")},"new":function(){if(this["new"]){var t=this._id;return Meteor.setTimeout(function(){EthAccounts.update(t,{$unset:{"new":""}}),Wallets.update(t,{$unset:{"new":""}}),CustomContracts.update(t,{$unset:{"new":""}})},1e3),!0}},creating:function(){return!this.address||this.imported||t>=EthBlocks.latest.number-(this.creationBlock-1)&&EthBlocks.latest.number-(this.creationBlock-1)>=0},totalConfirmations:t,unConfirmed:function(){if(!this.address||!this.creationBlock||this.createdIdentifier)return!1;var e=EthBlocks.latest.number,n=e-(this.creationBlock-1);return t>=n&&n>=0?{confirmations:n,percent:n/t*100}:!1},displayName:function(){return this.ens?this.name.split(".").slice(0,-1).reverse().join(" ▸ "):this.name},ensClass:function(){return this.ens?"ens-name":"not-ens-name"}}),Template.elements_account.events({"click .wallet-box":function(t){console.time("renderAccountPage")}})}).call(this); + +(function(){Template.elements_account_link.helpers({getAccount:function(){return Helpers.getAccountByAddress(this.address)||{address:web3.toChecksumAddress(this.address)}},ensClass:function(){return this.ens?"ens-name":"not-ens-name"},displayName:function(){return this.ens?this.name.split(".").slice(0,-1).reverse().join(" ▸ "):this.name},tryENS:function(){var e=Template,s=this;Helpers.getENSName(this.address,function(n,t,i){n?console.log(n):this.address.toLowerCase()==i&&console.log("ens",t,s,e)})}})}).call(this); + +(function(){Template.elements_balance.onCreated(function(){this._intervalId=null}),Template.elements_balance.helpers({convertedBalance:function(){var e=TemplateVar.get("balance");return"noether"===EthTools.getUnit()?"infinite":e?"usd"===EthTools.getUnit()||"eur"===EthTools.getUnit()||"gbp"===EthTools.getUnit()||"brl"===EthTools.getUnit()?EthTools.formatBalance(TemplateVar.get("balance"),"0,0.00"):"ether"===EthTools.getUnit()?EthTools.formatBalance(TemplateVar.get("balance"),this.showAllDecimals?"0,0.00[0000000000000000]":"0,0.00"):"finney"===EthTools.getUnit()?EthTools.formatBalance(TemplateVar.get("balance"),this.showAllDecimals?"0,0.00[00000000000000]":"0,0.00"):EthTools.formatBalance(TemplateVar.get("balance"),"0,0.00[000000]"):void 0},getBalance:function(){var e=this,t=Template.instance(),a=_.isFinite(this.balance)?this.balance:"0";a=new BigNumber(a,10),Meteor.clearInterval(t._intervalId),t._intervalId=Meteor.setInterval(function(){var e=TemplateVar.get(t,"balance")||0,l=a.minus(e).dividedBy(10).floor();e&&!e.equals(a)&&(l.greaterThan(1e10)||l.lessThan(0)&&l.lessThan(-1e10))?TemplateVar.set(t,"balance",e.plus(l)):(TemplateVar.set(t,"balance",a),Meteor.clearInterval(t._intervalId))},1)}})}).call(this); + +(function(){Template.elements_compileContract.onCreated(function(){var e=this;TemplateVar.set("txData",""),TemplateVar.set("constructorInputs",[]),TemplateVar.set("selectedType",this.data.onlyByteCode?"byte-code":"source-code"),TemplateVar.set("compiledContracts",JSON.parse(localStorage.compiledContracts||null)),TemplateVar.set("selectedContract",JSON.parse(localStorage.selectedContract||null)),this.autorun(function(t){var a=TemplateVar.get("selectedType");t.firstRun||Tracker.afterFlush(function(){"byte-code"===a?e.$(".dapp-data-textarea").focus():e.aceEditor.focus()})});var t=new Tracker.Dependency;setTimeout(function(){t.changed(),t=null},1e3),this.autorun(function(){t&&t.depend();var e=TemplateVar.get("selectedContract"),a=_.clone(TemplateVar.get("constructorInputs")),r=TemplateVar.getFrom(".select-token","selectedToken"),c=TemplateVar.get("selectedType"),o=TemplateVar.getFrom(".dapp-data-textarea","value"),n="";c&&"source-code"===c&&e?(a.push({data:e.bytecode}),n=web3.eth.contract(e.jsonInterface)["new"].getData.apply(null,a),TemplateVar.set("contract",e),localStorage.setItem("selectedContract",JSON.stringify(e))):r&&"ether"!==r||(n=TemplateVar.get("show")?o:""),TemplateVar.set("txData",n)})}),editor={},Template.elements_compileContract.onRendered(function(){var e=this;this.aceEditor=ace.edit("contract-source-editor"),this.aceEditor.setOptions({useWorker:!1,minLines:10,maxLines:30,highlightActiveLine:!1}),this.aceEditor.setTheme("ace/theme/tomorrow"),this.aceEditor.getSession().setMode("ace/mode/typescript"),this.aceEditor.$blockScrolling=1/0,this.aceEditor.focus();var t=localStorage.contractSource||Helpers.getDefaultContractExample();this.aceEditor.setValue(t),this.aceEditor.selection.selectTo(0),editor=this.aceEditor,this.aceEditor.getSession().on("change",_.debounce(function(t){var a=e.aceEditor.getValue();localStorage.setItem("contractSource",a),TemplateVar.set(e,"compiling",!0),TemplateVar.set(e,"compileError",!1),Meteor.setTimeout(function(t){web3.eth.compile.solidity(a,function(t,a){if(Tracker.afterFlush(function(){TemplateVar.set(e,"compiling",!1),e.$(".abi-input").trigger("input")}),_.each(editor.session.$backMarkers,function(e){editor.session.removeMarker(e.id)}),t){var r=t.toString().split(":");if(r.length<4)TemplateVar.set(e,"compileError",t);else{var c=r[5].match(/(\^-*\^)/g),o=c?c[0].length:0,n=ace.require("ace/range").Range;editor.session.addMarker(new n(r[2]-1,0,r[2]-1,200),"errorMarker"),editor.session.addMarker(new n(r[2]-1,r[3]-1,r[2]-1,Number(r[3])+o),"errorMarker"),TemplateVar.set(e,"compileError",r[5])}TemplateVar.set(e,"compiledContracts",!1),TemplateVar.set(e,"selectedContract",!1)}else a=_.map(a,function(e,t){var a=JSON.parse(e["interface"]),r=_.find(a,function(e){return"constructor"==e.type});return r?r.inputs=_.map(r.inputs,Helpers.createTemplateDataFromInput):r={inputs:[]},{name:t,bytecode:"0x"+e.bytecode.replace(/^0x/,""),jsonInterface:a,constructorInputs:r.inputs}}),TemplateVar.set(e,"selectedContract",null),TemplateVar.set(e,"compiledContracts",a),localStorage.setItem("compiledContracts",JSON.stringify(a))})},100)},600))}),Template.elements_compileContract.onDestroyed(function(){this.aceEditor&&this.aceEditor.destroy()}),Template.elements_compileContract.helpers({reactiveContext:function(){this.onlyByteCode?(TemplateVar.set("selectedType","byte-code"),Tracker.nonreactive(function(){_.isEmpty(TemplateVar.getFrom(".dapp-data-textarea","value"))&&TemplateVar.set("show",!1)})):TemplateVar.set("show",!0)},selectedContractInputs:function(){return selectedContract=TemplateVar.get("selectedContract"),selectedContract?selectedContract.constructorInputs:[]}}),Template.elements_compileContract.events({"click button.show-data":function(e){e.preventDefault(),TemplateVar.set("show",!0)},"click button.hide-data":function(e,t){e.preventDefault(),TemplateVar.setTo(".dapp-data-textarea","value",""),Tracker.afterFlush(function(){TemplateVar.set(t,"show",!1)})},"click .dapp-segmented-control input":function(e,t){TemplateVar.set("selectedType",e.currentTarget.value)},"change .compiled-contracts":function(e,t){var a=TemplateVar.get("compiledContracts");_.each(a,function(t){t.selected=t.name==e.currentTarget.value});var r=_.find(a,function(e){return e.selected});TemplateVar.set("selectedContract",r),TemplateVar.set("compiledContracts",a),localStorage.setItem("compiledContracts",JSON.stringify(a)),Tracker.afterFlush(function(){t.$(".abi-input").trigger("change")})},"change .abi-input, input .abi-input":function(e,t){var a=TemplateVar.get("selectedContract"),r=Helpers.addInputValue(a.constructorInputs,this,e.currentTarget);TemplateVar.set("constructorInputs",r)},"change textarea.dapp-data-textarea":function(e){var t=e.currentTarget.value;TemplateVar.set("txData",t)}})}).call(this); + +(function(){var e=ethereumConfig.requiredConfirmations,t=10;Template.elements_event_table.onCreated(function(){this._properties={cursor:{}},TemplateVar.set("limit",this.data.limit||t)}),Template.elements_event_table.helpers({items:function(){var e=Template.instance(),r=[],n=this.ids||[],i=TemplateVar.get("search"),s=TemplateVar.get("limit"),a=Events,o={_id:{$in:n.slice(Number(-1*(s+50)))}};if(i){var m=new RegExp("^.*"+i.replace(/ +/g,".*")+".*$","i");return e._properties.cursor=a.find(o,{sort:{timestamp:-1,blockNumber:-1}}),r=e._properties.cursor.fetch(),r=_.filter(r,function(e){return m.test(e.event)?e:m.test(e.address)?e:_.find(e.args,function(e,t){return m.test(e)||m.test(t)})?e:!1}),r=r.slice(0,4*t)}return e._properties.cursor=a.find(o,{sort:{timestamp:-1,blockNumber:-1},limit:s}),e._properties.cursor.fetch()},hasMore:function(){var e=Template.instance();return e._properties.cursor.limit=null,!TemplateVar.get("search")&&e._properties.cursor.count()>=TemplateVar.get("limit")}}),Template.elements_event_table.events({"click button.show-more":function(e,r){var n=TemplateVar.get("limit");TemplateVar.set("limit",n+(r.data.limit||t))},"keyup input.filter-transactions":_.debounce(function(e,t){27===e.keyCode&&(e.currentTarget.value=""),TemplateVar.set(t,"search",e.currentTarget.value)},200)}),Template.elements_events_row.helpers({fromNowTime:function(){Helpers.rerun["10s"].tick();var e=moment().diff(moment.unix(this.timestamp),"hours");return 23>e?" "+moment.unix(this.timestamp).fromNow():""},totalConfirmations:e,unConfirmed:function(){if(!this.blockNumber||!EthBlocks.latest.number)return{confirmations:0,percent:0};var t=EthBlocks.latest.number+1,r=t-this.blockNumber;return e>=r&&r>=0?{confirmations:r,percent:r/e*100}:!1},returnValues:function(){if(this.args){var e=[];return _.each(this.args,function(t,r){(_.isObject(t)||t instanceof BigNumber)&&t.toFormat&&(t=t.toFormat(0)),e.push({name:r,value:t})}),e}return[]}}),Template.elements_events_row.events({"click tr:not(.pending)":function(e){var t=$(e.target);t.is("button")||t.is("a")||EthElements.Modal.show({template:"views_modals_eventInfo",data:{_id:this._id}},{"class":"transaction-info"})}})}).call(this); + +(function(){Template.elements_executeContract.onCreated(function(){var t=this;TemplateVar.set("sending",!1),CustomContracts.findOne({address:t.data.address})&&TemplateVar.set("executionVisible",!0),web3.eth.getCode(t.data.address,function(e,a){!e&&a.length>2&&TemplateVar.set(t,"hasCode",!0)})}),Template.elements_executeContract.helpers({reactiveContext:function(){var t=web3.eth.contract(this.jsonInterface).at(this.address),e=[],a=[];_.each(this.jsonInterface,function(n,s){n=_.clone(n),"function"==n.type&&(n.contractInstance=t,n.inputs=_.map(n.inputs,Helpers.createTemplateDataFromInput),n.constant?a.push(n):e.push(n))}),TemplateVar.set("contractConstants",a),TemplateVar.set("contractFunctions",e)}}),Template.elements_executeContract.events({"change .select-contract-function":function(t,e){TemplateVar.set("executeData",null),TemplateVar.set("selectedFunction",_.find(TemplateVar.get("contractFunctions"),function(e){return e.name===t.currentTarget.value})),Tracker.afterFlush(function(){$(".abi-input").trigger("change")})},"click .toggle-visibility":function(){TemplateVar.set("executionVisible",!TemplateVar.get("executionVisible"))}});var t=function(e){return _.isArray(e)?_.map(e,t):(_.isBoolean(e)&&(e=e?"YES":"NO"),e=_.isObject(e)&&e.toString?e.toString(10):e)};Template.elements_executeContract_constant.onCreated(function(){var t=this;TemplateVar.set("inputs",_.map(t.data.inputs,function(t){return Helpers.addInputValue([t],t,{})[0]})),this.autorun(function(){EthBlocks.latest;var e=TemplateVar.get("inputs").concat(function(e,a){if(!e){var n=[];1===t.data.outputs.length?(t.data.outputs[0].value=a,n.push(t.data.outputs[0])):n=_.map(t.data.outputs,function(t,e){return t.value=a[e],t}),TemplateVar.set(t,"outputs",n)}});t.data.contractInstance[t.data.name].apply(null,e)})}),Template.elements_executeContract_constant.helpers({value:function(){return _.isArray(this.value)?t(this.value):[t(this.value)]},extra:function(){var e=t(this);return e>14e8&&18e8>e&&Math.floor(e/1e3)!=e/1e3?"("+moment(1e3*e).fromNow()+")":"YES"==e?'':"NO"==e?'':void 0}}),Template.elements_executeContract_constant.events({"change .abi-input, input .abi-input, blur .abi-input":function(t,e){var a=Helpers.addInputValue(e.data.inputs,this,t.currentTarget);TemplateVar.set("inputs",a)}}),Template.elements_executeContract_function.onCreated(function(){var t=this;t.autorun(function(e){var a=EthTools.getUnit();e.firstRun||TemplateVar.set("amount",EthTools.toWei(t.find('input[name="amount"]').value.replace(",","."),a))})}),Template.elements_executeContract_function.onRendered(function(){this.$(".abi-input").trigger("change")}),Template.elements_executeContract_function.helpers({reactiveDataContext:function(){0===this.inputs.length&&TemplateVar.set("executeData",this.contractInstance[this.name].getData())},payable:function(){return this&&this.payable}}),Template.elements_executeContract_function.events({'keyup input[name="amount"], change input[name="amount"], input input[name="amount"]':function(t,e){var a=EthTools.toWei(t.currentTarget.value.replace(",","."));TemplateVar.set("amount",a||"0")},"change .abi-input, input .abi-input, blur .abi-input":function(t,e){var a=Helpers.addInputValue(e.data.inputs,this,t.currentTarget);TemplateVar.set("executeData",e.data.contractInstance[e.data.name].getData.apply(null,a))},"click .execute":function(t,e){var a=e.data.contractInstance.address,n=5e10,s=void 0,o=TemplateVar.get("amount")||0,r=Helpers.getAccountByAddress(TemplateVar.getFrom('.execute-contract select[name="dapp-select-account"]',"value")),c=TemplateVar.get("executeData"),i=Transactions.findOne({},{sort:{timestamp:-1}});if(i&&i.gasPrice&&(n=i.gasPrice),r){if(console.log("Providing gas: ",s," + 100000"),"0"===r.balance)return GlobalNotification.warning({content:"i18n:wallet.send.error.emptyWallet",duration:2});var u=function(t){if(TemplateVar.set("sending",!0),contracts["ct_"+r._id]){var s=EthAccounts.find({name:{$exists:!0}},{sort:{name:1}}).fetch();s.sort(Helpers.sortByBalance);var i=_.find(s,function(t){return r.owners.indexOf(t.address)>=0});contracts["ct_"+r._id].execute.sendTransaction(a||"",o||"",c||"",{from:i.address,gasPrice:n,gas:t},function(s,i){TemplateVar.set(e,"sending",!1),console.log(s,i),s?GlobalNotification.error({content:s.message,duration:8}):(console.log("SEND from contract",o),addTransactionAfterSend(i,o,r.address,a,n,t,c),FlowRouter.go("dashboard"))})}else web3.eth.sendTransaction({from:r.address,to:a,data:c,value:o,gasPrice:n,gas:t},function(s,i){TemplateVar.set(e,"sending",!1),console.log(s,i),s?GlobalNotification.error({content:s.message,duration:8}):(console.log("SEND simple"),addTransactionAfterSend(i,o,r.address,a,n,t,c),GlobalNotification.success({content:"i18n:wallet.send.transactionSent",duration:2}))})};u(s)}}})}).call(this); + +(function(){selectableUnits=[{text:"ETHER",value:"ether"},{text:"FINNEY",value:"finney"},{text:"BTC",value:"btc"},{text:"USD",value:"usd"},{text:"EUR",value:"eur"},{text:"GBP",value:"gbp"},{text:"BRL",value:"brl"}],"04-01"==moment().format("MM-DD")?selectableUnits.push({text:"SZABO",value:"szabo"},{text:"SHANNON",value:"shannon"},{text:"LOVELACE",value:"lovelace"},{text:"BABBAGE",value:"babbage"},{text:"WEI",value:"wei"},{text:"NOETHER",value:"noether"}):"04-30"==moment().format("MM-DD")?selectableUnits.push({text:"SHANNON",value:"shannon"}):"12-10"==moment().format("MM-DD")?selectableUnits.push({text:"LOVELACE",value:"lovelace"}):"12-26"==moment().format("MM-DD")&&selectableUnits.push({text:"BABBAGE",value:"babbage"}),Template.elements_selectableUnit.helpers({selectedUnit:function(){var e=_.find(selectableUnits,function(e){return e.value===EthTools.getUnit()});return e?e.value:void 0},units:function(){return selectableUnits},selectable:function(){return"main"==Session.get("network")}}),Template.elements_selectableUnit.events({"change .inline-form":function(e,t,l){EthTools.setUnit(l)}})}).call(this); + +(function(){Template.elements_tokenBox.helpers({formattedTotalBalance:function(e){var t=_.map(Wallets.find().fetch().concat(EthAccounts.find().fetch()),function(e){return e.disabled?void 0:e._id}),n=new BigNumber(0);return _.each(this.balances,function(e,a){t.indexOf(a)>=0&&(n=n.plus(new BigNumber(e,10)))}),Helpers.formatNumberByDecimals(n,this.decimals)},geoPattern:function(){var e=GeoPattern.generate(this.address,{color:"#CCC6C6"});return e.toDataUrl()}}),Template.elements_tokenBox.events({"click .delete-token":function(e){var t=this;e.preventDefault(),e.stopImmediatePropagation(),EthElements.Modal.question({text:new Spacebars.SafeString(TAPi18n.__("wallet.tokens.deleteToken",{token:t.name})),ok:function(){Tokens.remove(t._id)},cancel:!0})}})}).call(this); + +(function(){var e=ethereumConfig.requiredConfirmations,t=10;Template.elements_transactions_table.onCreated(function(){this._properties={cursor:{}},TemplateVar.set("limit",this.data.limit||t)}),Template.elements_transactions_table.helpers({items:function(){var e=Template.instance(),n=[],r=TemplateVar.get("search"),s=TemplateVar.get("limit"),i=window[this.collection]||Transactions,o=this.ids?{_id:{$in:this.ids}}:{};if(r){var a=new RegExp("^.*"+r.replace(/ +/g,".*")+".*$","i");return e._properties.cursor=i.find(o,{sort:{timestamp:-1,blockNumber:-1}}),n=e._properties.cursor.fetch(),n=_.filter(n,function(e){return a.test(e.from)?e:a.test(e.to)?e:a.test(EthTools.formatBalance(e.value,"0,0.00[000000] unit"))?e:a.test(moment.unix(e.timestamp).format("LLLL"))?e:!1}),n=n.slice(0,4*t)}return e._properties.cursor=i.find(o,{sort:{timestamp:-1,blockNumber:-1},limit:s}),e._properties.cursor.fetch()},hasMore:function(){var e=Template.instance();return e._properties.cursor.limit=null,!TemplateVar.get("search")&&e._properties.cursor.count()>TemplateVar.get("limit")}}),Template.elements_transactions_table.events({"click button.show-more":function(e,n){var r=TemplateVar.get("limit");TemplateVar.set("limit",r+(n.data.limit||t))},"keyup input.filter-transactions":_.debounce(function(e,t){27===e.keyCode&&(e.currentTarget.value=""),TemplateVar.set(t,"search",e.currentTarget.value)},200)}),Template.elements_transactions_row.helpers({incomingTx:function(e){var e=EthAccounts.findOne({_id:e})||Wallets.findOne({_id:e});return!!(e&&this.from!==e.address||!e&&(EthAccounts.findOne({address:this.to})||Wallets.findOne({address:this.to})))},transactionType:function(){var e=Helpers.getAccountByAddress(this.to),t=Helpers.getAccountByAddress(this.from),n=Helpers.getAccountByAddress(this.initiator),r=this.data;return t&&(t=''+t.name+""),n=n?''+n.name+"":this.initiator,"pendingConfirmation"===this.type?new Spacebars.SafeString(TAPi18n.__("wallet.transactions.types.pendingConfirmations",{initiator:n,from:t})):this.outOfGas?TAPi18n.__("wallet.transactions.types.outOfGas"):this.tokenId&&Tokens.findOne(this.tokenId)?TAPi18n.__("wallet.transactions.types.tokenTransfer",{token:Tokens.findOne(this.tokenId).name}):TAPi18n.__(r&&e?"wallet.transactions.types.executeContract":e&&t?"wallet.transactions.types.betweenWallets":e&&!t?"wallet.transactions.types.received":this.to?"wallet.transactions.types.sent":"wallet.transactions.types.createdContract.title")},fromNowTime:function(){Helpers.rerun["10s"].tick();var e=moment().diff(moment.unix(this.timestamp),"hours");return 23>e?" "+moment.unix(this.timestamp).fromNow():""},totalConfirmations:e,unConfirmed:function(){if(!this.blockNumber||!EthBlocks.latest.number)return{confirmations:0,percent:0};var t=EthBlocks.latest.number+1,n=t-this.blockNumber;return e>=n&&n>=0?{confirmations:n,percent:n/e*100}:!1},ownerConfirmationCount:function(){var e=Helpers.getAccountByAddress(this.from);return e&&this.confirmedOwners?this.confirmedOwners.length+"/"+e.requiredSignatures:void 0},owners:function(){var e=Helpers.getAccountByAddress(this.from);return e?e.owners:[]},ownerIsConfirmed:function(){var e=String(this);return _.contains(Template.parentData(1).confirmedOwners,e)},approved:function(){return this.confirmedOwners?Helpers.getAccountByAddress({$in:this.confirmedOwners}):void 0},notApproved:function(){return!Helpers.getAccountByAddress({$in:this.confirmedOwners||[]})},multipleOwnersApproved:function(e){var t=Helpers.getAccountByAddress(this.from);return Helpers.getAccounts({address:{$in:_.difference(t.owners,this.confirmedOwners)}})},tokenValue:function(){var e=Tokens.findOne(this.tokenId);return e?Helpers.formatNumberByDecimals(this.value,e.decimals)+" "+e.symbol:this.value}}),Template.elements_transactions_row.events({"click tr:not(.pending)":function(e){var t=$(e.target);t.is("button")||t.is("a")||EthElements.Modal.show({template:"views_modals_transactionInfo",data:{_id:this._id}},{"class":"transaction-info"})},"click button.approve, click button.revoke":function(e){var t=this,n=Helpers.getAccountByAddress(t.from),r=_.pluck(Helpers.getAccounts({address:{$in:n.owners}}),"address");if(n){var s=$(e.currentTarget).hasClass("approve")?"confirm":"revoke",i=function(e){var r=contracts["ct_"+n._id][s],i=function(n,r){n?GlobalNotification.error({content:n.message,duration:8}):(console.log(s+" confirmation tx hash: "+r),PendingConfirmations.update(t._id,{$set:{sending:e}}))};if(wallet=Wallets.findOne({address:e})){var o=r.getData(t.operation);contracts["ct_"+wallet._id].execute(n.address,0,o,{from:wallet.owners[0],gas:2e5},i)}else r.sendTransaction(t.operation,{from:e,gas:2e5},i)};1===r.length?i(r[0]):r.length>1&&EthElements.Modal.question({template:"views_modals_selectAccount",data:{accounts:"confirm"===s?_.difference(r,this.confirmedOwners):this.confirmedOwners,callback:i},cancel:!0})}}})}).call(this); + +(function(){Template.elements_vulnerabilities_txorigin.helpers({upgradeParams:function(){var i="walletId="+this._id+"&name="+this.name;return this.dailyLimit&&(i+="&dailyLimit="+this.dailyLimit),this.requiredSignatures&&(i+="&requiredSignatures="+this.requiredSignatures),this.owners&&(i+="&ownersNum="+this.owners.length,i+="&owners="+this.owners.join(",")),i},walletAddress:function(){var i=this,e=_.map(Wallets.find({vulnerabilities:{$exists:!0}}).fetch(),function(i){return _.find(i.vulnerabilities||[],function(i){return i})?i:!1}),t=_.find(e,function(e){return _.contains(e.owners,i.address)});return t?t.address:""}})}).call(this); + +(function(){Template.layout_header.onCreated(function(){var e=this}),Template.layout_header.helpers({goToSend:function(){FlowRouter.watchPathChange();var e=web3.toChecksumAddress(FlowRouter.getParam("address")),t=EthAccounts.find({}).fetch();return e?FlowRouter.path("sendFrom",{from:e}):FlowRouter.path("sendFrom",{from:t[0]?t[0].address:null})},totalBalance:function(){var e=EthAccounts.find({}).fetch(),t=Wallets.find({owners:{$in:_.pluck(e,"address")}}).fetch(),n=_.reduce(_.pluck(_.union(e,t),"balance"),function(e,t){return e+Number(t)},0);return updateMistBadge(),n},formattedBlockNumber:function(){return numeral(EthBlocks.latest.number).format("0,0")},timeSinceBlock:function(){if(0==EthBlocks.latest.timestamp||"undefined"==typeof EthBlocks.latest.timestamp)return!1;var e=moment(EthBlocks.latest.timestamp,"X"),t=moment(),n=t.diff(e,"seconds");return n>300?(Helpers.rerun["10s"].tick(),''+e.fromNow(!0)+""):n>60?(Helpers.rerun["10s"].tick(),e.fromNow(!0)):2>n?(Helpers.rerun["1s"].tick(),""):(Helpers.rerun["1s"].tick(),n+"s ")},timeSinceBlockText:function(){if(0==EthBlocks.latest.timestamp||"undefined"==typeof EthBlocks.latest.timestamp)return TAPi18n.__("wallet.app.texts.waitingForBlocks");var e=moment(EthBlocks.latest.timestamp,"X"),t=moment(),n=t.diff(e,"seconds");return n>300?(Helpers.rerun["10s"].tick(),''+TAPi18n.__("wallet.app.texts.timeSinceBlock")+""):n>60?(Helpers.rerun["10s"].tick(),TAPi18n.__("wallet.app.texts.timeSinceBlock")):2>n?(Helpers.rerun["1s"].tick(),''+TAPi18n.__("wallet.app.texts.blockReceived")+""):(Helpers.rerun["1s"].tick(),TAPi18n.__("wallet.app.texts.timeSinceBlock"))}})}).call(this); + +(function(){var e=function(e){var t=web3.eth.contract(e.jsonInterface).at(e.address),n=(e.checkpointBlock||0)-ethereumConfig.rollBackBy;0>n&&(n=0),console.log("EVENT LOG: Checking Custom Contract Events for "+e.address+" (_id: "+e._id+") from block # "+n),_.each(Events.find({_id:{$in:e.contractEvents||[]},blockNumber:{$exists:!0,$gt:n}}).fetch(),function(e){e&&Events.remove({_id:e._id})});var o=t.allEvents({fromBlock:n,toBlock:"latest"}),a=EthBlocks.latest.number;return o.get(function(t,n){t||CustomContracts.update({_id:e._id},{$set:{checkpointBlock:(a||EthBlocks.latest.number)-ethereumConfig.rollBackBy}})}),o.watch(function(e,t){if(!e){var n=Helpers.makeId("log",web3.sha3(t.logIndex+"x"+t.transactionHash+"x"+t.blockHash));t.removed?Events.remove(n):(_.each(t.args,function(e,n){(_.isObject(e)||e instanceof BigNumber)&&e.toFormat&&(e=e.toString(10),t.args[n]=e)}),Events.upsert(n,t),web3.eth.getBlock(t.blockHash,function(e,t){e||Events.update(n,{$set:{timestamp:t.timestamp}})}))}}),o};Template.views_account.onRendered(function(){console.timeEnd("renderAccountPage")}),Template.views_account.onDestroyed(function(){this.customEventFilter&&(this.customEventFilter.stopWatching(),this.customEventFilter=null,TemplateVar.set("watchEvents",!1))}),Template.views_account.helpers({account:function(){return Helpers.getAccountByAddress(FlowRouter.getParam("address"))},jsonInterface:function(){return _.clone(this.owners?walletInterface:this.jsonInterface)},pendingConfirmations:function(){return _.pluck(PendingConfirmations.find({operation:{$exists:!0},confirmedOwners:{$ne:[]},from:this.address}).fetch(),"_id")},availableToday:function(){return new BigNumber(this.dailyLimit||"0",10).minus(new BigNumber(this.dailyLimitSpent||"0","10")).toString(10)},showDailyLimit:function(){return this.dailyLimit&&this.dailyLimit!==ethereumConfig.dailyLimitDefault},showRequiredSignatures:function(){return this.requiredSignatures&&this.requiredSignatures>1},ownerLink:function(){var e=String(this);return Helpers.getAccountByAddress(e)?FlowRouter.path("account",{address:e}):FlowRouter.path("sendTo",{address:e})},tokens:function(){var e={};return e["balances."+this._id]={$exists:!0},Tokens.find(e,{sort:{name:1}})},formattedTokenBalance:function(e){var t=Template.parentData(2);return this.balances&&Number(this.balances[t._id])>0?Helpers.formatNumberByDecimals(this.balances[t._id],this.decimals)+" "+this.symbol:!1},customContract:function(){return CustomContracts.findOne({address:this.address.toLowerCase()})},displayName:function(){return this.ens?this.name.split(".").slice(0,-1).reverse().join(" ▸ "):this.name}});var t=function(e){function t(){var e=document.querySelector(".copyable-address span"),t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n);try{document.execCommand("copy"),GlobalNotification.info({content:"i18n:wallet.accounts.addressCopiedToClipboard",duration:3})}catch(o){GlobalNotification.error({content:"i18n:wallet.accounts.addressNotCopiedToClipboard",closeable:!1,duration:3})}t.removeAllRanges()}return Session.get("tmpAllowCopy")===!0?(Session.set("tmpAllowCopy",!1),!0):(e.preventDefault(),void(Helpers.isOnMainNetwork()?(Session.set("tmpAllowCopy",!0),t()):EthElements.Modal.question({text:new Spacebars.SafeString(TAPi18n.__("wallet.accounts.modal.copyAddressWarning")),ok:function(){Session.set("tmpAllowCopy",!0),t()},cancel:!0,modalQuestionOkButtonText:TAPi18n.__("wallet.accounts.modal.buttonOk"),modalQuestionCancelButtonText:TAPi18n.__("wallet.accounts.modal.buttonCancel")})))};Template.views_account.events({"click button.delete":function(e,t){var n=this;EthElements.Modal.question({text:new Spacebars.SafeString(TAPi18n.__("wallet.accounts.modal.deleteText")+'
'),ok:function(){return"delete"===$("input.deletionConfirmation").val()?(Wallets.remove(n._id),CustomContracts.remove(n._id),FlowRouter.go("dashboard"),!0):void 0},cancel:!0})},"click .edit-name":function(e){$(e.currentTarget).attr("contenteditable","true")},"keypress .edit-name":function(e){13===e.keyCode&&e.preventDefault()},"blur .edit-name, keyup .edit-name":function(e){if(!e.keyCode||13===e.keyCode){var t=$(e.currentTarget),n=t.text();_.isEmpty(n)&&(n=TAPi18n.__("wallet.accounts.defaultName")),Wallets.update(this._id,{$set:{name:n}}),EthAccounts.update(this._id,{$set:{name:n}}),CustomContracts.update(this._id,{$set:{name:n}}),t.attr("contenteditable",null)}},"click .copy-to-clipboard-button":t,"copy .copyable-address":t,"click .deposit-using-coinbase":function(e){e.preventDefault(),new CoinBaseWidget(e.currentTarget,{address:this.address,code:"eb44c52c-9c3f-5fb6-8b11-fc3ec3022519",currency:"USD",crypto_currency:"ETH"}).show()},"click .qrcode-button":function(e){e.preventDefault(),EthElements.Modal.show({template:"views_modals_qrCode",data:{address:this.address}})},"click .interface-button":function(e){e.preventDefault();var t=_.clone(this.owners?walletInterface:this.jsonInterface),n=_.map(t,function(e,t){return _.omit(e,"contractInstance")});EthElements.Modal.show({template:"views_modals_interface",data:{jsonInterface:n}})},"change .toggle-watch-events":function(t,n){t.preventDefault(),n.customEventFilter?(n.customEventFilter.stopWatching(),n.customEventFilter=null,TemplateVar.set("watchEvents",!1)):(n.customEventFilter=e(this),TemplateVar.set("watchEvents",!0))}})}).call(this); + +(function(){Template.views_account_create.onCreated(function(){TemplateVar.set("selectedSection",Number(FlowRouter.getQueryParam("ownersNum"))>0?"multisig":"simple");var e=FlowRouter.getQueryParam("walletId"),t=FlowRouter.getQueryParam("ownersNum");t&&Helpers.isWatchOnly(e)&&t++,TemplateVar.set("multisigSignees",t||3),TemplateVar.set("multisigSignatures",Number(FlowRouter.getQueryParam("requiredSignatures"))||2),Helpers.checkChain(function(e){e&&EthAccounts.find().count()>0&&checkForOriginalWallet()})}),Template.views_account_create.onRendered(function(){this.$('input[name="accountName"]').focus()}),Template.views_account_create.helpers({ownerAccounts:function(){var e=EthAccounts.find({},{sort:{balance:-1}}).fetch();return e.sort(Helpers.sortByBalance),e},selectedOwner:function(){return TemplateVar.getFrom(".dapp-select-account","value")},showSection:function(e){return TemplateVar.set("importWalletOwners",!1),TemplateVar.set("importWalletInfo",""),TemplateVar.get("selectedSection")===e},defaultOwner:function(){var e=EthAccounts.find({},{sort:{balance:-1}}).fetch();if(e.sort(Helpers.sortByBalance),FlowRouter.getQueryParam("owners")){var t=FlowRouter.getQueryParam("owners").split(","),a=_.find(e,function(e){return t.indexOf(e.address)>=0});return a?a.address:null}return e[0].address},signees:function(){var e=[];return FlowRouter.getQueryParam("owners")&&(e=FlowRouter.getQueryParam("owners").split(",").slice(0,TemplateVar.get("multisigSignees")),e=_.without(e,TemplateVar.getFrom(".dapp-select-account","value"))),e=e.concat(_.range(TemplateVar.get("multisigSignees")-1-e.length)),TemplateVar.get("multisigSignatures")>TemplateVar.get("multisigSignees")&&TemplateVar.set("multisigSignatures",TemplateVar.get("multisigSignees")),e},i18nOwnerAddress:function(){return TAPi18n.__("wallet.newWallet.accountType.multisig.ownerAddress")},i18nWalletAddress:function(){return TAPi18n.__("wallet.newWallet.accountType.import.walletAddress")},importInfo:function(){var e=TemplateVar.get("importWalletInfo"),t=TemplateVar.get("importWalletOwners");return e?t?' '+e:' '+e:""},importValidClass:function(){return TemplateVar.get("importWalletOwners")?"valid":"invalid"},multisigSignees:function(){var e=FlowRouter.getQueryParam("walletId"),t=FlowRouter.getQueryParam("ownersNum");t&&Helpers.isWatchOnly(e)&&t++,t=Math.max(t||7,7);var a=[];for(i=2;i<=t;i++)a.push({value:i,text:i});return a},multisigSignatures:function(){var e=TemplateVar.get("multisigSignees"),t=[];for(i=2;i<=e;i++)t.push({value:i,text:i});return t},simpleCheck:function(){return"simple"===TemplateVar.get("selectedSection")?"checked":""},multisigCheck:function(){return"multisig"===TemplateVar.get("selectedSection")?"checked":""},defaultDailyLimit:function(){var e=FlowRouter.getQueryParam("dailyLimit");return"undefined"!=typeof e?web3.fromWei(e,"ether"):10},name:function(){return FlowRouter.getQueryParam("name")}}),Template.views_account_create.events({"change input.import, input input.import":function(e,t){checkWalletOwners(e.currentTarget.value).then(function(e){TemplateVar.set(t,"importWalletOwners",e.owners),TemplateVar.set(t,"importWalletInfo",e.info)},function(){})},"change input.owners, input input.owners":function(e,t){var a=TemplateVar.getFrom(e.currentTarget,"value")},'change input[type="radio"]':function(e){TemplateVar.set("selectedSection",e.currentTarget.value)},'click span[name="multisigSignatures"] .simple-modal button':function(e){TemplateVar.set("multisigSignatures",$(e.currentTarget).data("value"))},'click span[name="multisigSignees"] .simple-modal button':function(e){TemplateVar.set("multisigSignees",$(e.currentTarget).data("value"))},submit:function(e,t){var a=walletStubABI,n=TemplateVar.get("selectedSection"),r=t.find('select[name="dapp-select-account"]').value.toLowerCase();if("simple"===n&&(Wallets.insert({deployFrom:r,owners:[r],name:t.find('input[name="accountName"]').value||TAPi18n.__("wallet.accounts.defaultName"),balance:"0",creationBlock:EthBlocks.latest.number,code:a}),FlowRouter.go("dashboard")),"multisig"===n){var i=InlineForm(".inline-form"),l=_.uniq(_.compact(_.map(t.findAll("input.owners"),function(e){return web3.isAddress(e.value)?"0x"+e.value.replace("0x","").toLowerCase():void 0})));if(l.length!=i.multisigSignees)return GlobalNotification.warning({content:"i18n:wallet.newWallet.error.emptySignees",duration:2});Wallets.insert({deployFrom:r,owners:l,name:t.find('input[name="accountName"]').value||TAPi18n.__("wallet.accounts.defaultName"),balance:"0",dailyLimit:web3.toWei(i.dailyLimitAmount,"ether"),requiredSignatures:i.multisigSignatures,creationBlock:EthBlocks.latest.number,code:a}),FlowRouter.go("dashboard")}if("import"===n){var l=_.uniq(_.compact(_.map(TemplateVar.get("importWalletOwners"),function(e){return web3.isAddress(e)?e.toLowerCase():void 0})));if(0===l.length)return;var o=t.find("input.import").value;if(o="0x"+o.replace("0x","").toLowerCase(),Wallets.findOne({address:o}))return GlobalNotification.warning({content:"i18n:wallet.newWallet.error.alreadyExists",duration:2});var u=Helpers.getAccountByAddress({$in:l||[]});u&&(l=_.without(l,u.address),l.unshift(u.address)),Wallets.insert({owners:l,name:t.find('input[name="accountName"]').value||TAPi18n.__("wallet.accounts.defaultName"),address:o,balance:"0",creationBlock:3e5,imported:!0}),FlowRouter.go("dashboard")}}})}).call(this); + +(function(){var t=function(t){var a=$('.modals-add-custom-contract input[name="address"]').hasClass("dapp-error")?"":$('.modals-add-custom-contract input[name="address"]').val(),e=$(".modals-add-custom-contract input.name").val()||TAPi18n.__("wallet.accounts.defaultName");a=a.toLowerCase();try{jsonInterface=JSON.parse($(".modals-add-custom-contract textarea.jsonInterface").val())}catch(t){return GlobalNotification.warning({content:TAPi18n.__("wallet.contracts.error.jsonInterfaceParseError"),duration:2}),!1}if(web3.isAddress(a)){if(Wallets.findOne({address:a}))return GlobalNotification.warning({content:TAPi18n.__("wallet.newWallet.error.alreadyExists"),duration:2}),!1;CustomContracts.upsert({address:a},{$set:{address:a,name:e,jsonInterface:jsonInterface}}),updateBalances(),GlobalNotification.success({content:TAPi18n.__("wallet.contracts.addedContract"),duration:2})}else GlobalNotification.warning({content:TAPi18n.__("wallet.contracts.error.invalidAddress"),duration:2})},a=function(t){var a=$('.modals-add-token input[name="address"]').hasClass("dapp-error")?"":$('.modals-add-token input[name="address"]').val(),e=$(".modals-add-token input.name").val(),n=$(".modals-add-token input.symbol").val(),o=$(".modals-add-token input.decimals").val();a=a.toLowerCase().trim(),tokenId=Helpers.makeId("token",a);var s=void 0!=Tokens.findOne(tokenId)?TAPi18n.__("wallet.tokens.editedToken",{token:e}):TAPi18n.__("wallet.tokens.addedToken",{token:e});web3.isAddress(a)?(Tokens.upsert(tokenId,{$set:{address:a,name:e,symbol:n,balances:{},decimals:Number(o||0)}}),updateBalances(),GlobalNotification.success({content:s,duration:2})):GlobalNotification.warning({content:TAPi18n.__("wallet.tokens.error.invalidAddress"),duration:2})};Template.views_contracts.helpers({customContracts:function(){return CustomContracts.find({},{sort:{name:1}})},tokens:function(){return Tokens.find({},{sort:{name:1}})}}),Template.views_contracts.events({"click .add-contract":function(){EthElements.Modal.question({template:"views_modals_addCustomContract",ok:t,cancel:!0},{"class":"modals-add-custom-contract"})},"click .add-token":function(t){t.preventDefault(),EthElements.Modal.question({template:"views_modals_addToken",ok:a,cancel:!0},{"class":"modals-add-token"})},"click .wallet-box.tokens":function(t){t.preventDefault(),EthElements.Modal.question({template:"views_modals_addToken",data:this,ok:a.bind(this),cancel:!0},{"class":"modals-add-token"})}})}).call(this); + +(function(){Template.views_dashboard.helpers({wallets:function(){var n=Wallets.find({$or:[{disabled:{$exists:!1}},{disabled:!1}]},{sort:{creationBlock:1}}).fetch();return n.sort(Helpers.sortByBalance),n},accounts:function(){var n=EthAccounts.find({name:{$exists:!0}},{sort:{name:1}}).fetch();return n.sort(Helpers.sortByBalance),n},hasAccounts:function(){return EthAccounts.find().count()>0},hasMinimumBalance:function(){var n=!1;return _.each(_.pluck(EthAccounts.find({}).fetch(),"balance"),function(t){new BigNumber(t,"10").gt(1e16)&&(n=!0)}),n},allTransactions:function(){return Transactions.find({},{sort:{timestamp:-1}}).count()},pendingConfirmations:function(){return _.pluck(PendingConfirmations.find({operation:{$exists:!0},confirmedOwners:{$ne:[]}}).fetch(),"_id")}}),Template.views_dashboard.events({"click .create.account":function(n){n.preventDefault(),mist.requestAccount(function(n,t){n||(_.isArray(t)||(t=[t]),t.forEach(function(n){n=n.toLowerCase(),EthAccounts.upsert({address:n},{$set:{address:n,"new":!0}})}))})}})}).call(this); + +(function(){var e=5e7,t=function(e,t,a){if(account=Helpers.getAccountByAddress(e),account&&account.requiredSignatures>1&&!_.isUndefined(account.dailyLimit)&&account.dailyLimit!==ethereumConfig.dailyLimitDefault&&0!==Number(t)){var n=new BigNumber(account.dailyLimit||"0",10).minus(new BigNumber(account.dailyLimitSpent||"0",10));n.lt(new BigNumber(t,10))?TemplateVar.set("dailyLimitText",new Spacebars.SafeString(TAPi18n.__("wallet.send.texts.overDailyLimit",{limit:EthTools.formatBalance(n.toString(10)),total:EthTools.formatBalance(account.dailyLimit),count:account.requiredSignatures-1}))):TemplateVar.set("dailyLimitText",new Spacebars.SafeString(TAPi18n.__("wallet.send.texts.underDailyLimit",{limit:EthTools.formatBalance(n.toString(10)),total:EthTools.formatBalance(account.dailyLimit)})))}else TemplateVar.set("dailyLimitText",!1)},a=function(){TemplateVar.getFrom(".compile-contract","byteTextareaShown");var e=TemplateVar.get("selectedToken");if(e&&"ether"!==e){var t=TemplateVar.getFrom("div.dapp-address-input input.to","value"),a=TemplateVar.get("amount")||"0",n=Tokens.findOne({address:e}),r=TokenContract.at(e),o=r.transfer.getData(t,a,{});return o}return TemplateVar.getFrom(".compile-contract","txData")},n=function(t,a){var n=this;console.log("Estimated gas: ",a,t),!t&&a&&(TemplateVar.set(n,"estimatedGas",a),a===e?TemplateVar.set(n,"codeNotExecutable",!0):TemplateVar.set(n,"codeNotExecutable",!1))};Template.views_send.onCreated(function(){var e=this;TemplateVar.set("amount","0"),TemplateVar.set("estimatedGas",3e5),TemplateVar.set("sendAll",!1),"deployContract"===FlowRouter.getRouteName()?(TemplateVar.set("selectedAction","deploy-contract"),TemplateVar.set("selectedToken","ether")):(TemplateVar.set("selectedAction","send-funds"),TemplateVar.set("selectedToken",FlowRouter.getParam("token")||"ether")),Helpers.checkChain(function(e){e&&EthAccounts.find().count()>0&&checkForOriginalWallet()}),e.autorun(function(a){var n=TemplateVar.getFrom(".dapp-select-account.send-from","value"),r=TemplateVar.get("amount")||"0";a.firstRun||t(n,r,e)}),e.autorun(function(t){var a=EthTools.getUnit();t.firstRun||"ether"!==TemplateVar.get("selectedToken")||TemplateVar.set("amount",EthTools.toWei(e.find('input[name="amount"]').value.replace(",","."),a))})}),Template.views_send.onRendered(function(){var t=this;FlowRouter.getParam("address")?(this.find('input[name="to"]').value=FlowRouter.getParam("address"),this.$('input[name="to"]').trigger("input")):this.data||this.$('input[name="to"]').focus();var r=FlowRouter.getParam("from");r&&TemplateVar.setTo('select[name="dapp-select-account"].send-from',"value",FlowRouter.getParam("from").toLowerCase()),t.autorun(function(e){"send"===FlowRouter.getRouteName()&&(TemplateVar.set("selectedAction","send"),TemplateVar.setTo(".dapp-data-textarea","value",""))});var o;t.autorun(function(e){return address=TemplateVar.getFrom(".dapp-select-account.send-from","value"),e.firstRun?void(o=address):(o!==address&&TemplateVar.set("selectedToken","ether"),void(o=address))}),t.autorun(function(r){var o=TemplateVar.getFrom(".dapp-select-account.send-from","value"),s=TemplateVar.getFrom(".dapp-address-input .to","value"),l=TemplateVar.get("amount")||"0",i=a(),c=TemplateVar.get("selectedToken");_.isString(o)&&(o=o.toLowerCase()),"ether"===c?EthAccounts.findOne({address:o},{reactive:!1})?web3.eth.estimateGas({from:o,to:s,value:l,data:i,gas:e},n.bind(t)):(wallet=Wallets.findOne({address:o},{reactive:!1}))&&contracts["ct_"+wallet._id]&&contracts["ct_"+wallet._id].execute.estimateGas(s||"",l||"",i||"",{from:wallet.owners[0],gas:e},n.bind(t)):TokenContract.at(c).transfer.estimateGas(s,l,{from:o,gas:e},n.bind(t))})}),Template.views_send.helpers({selectedAccount:function(){return Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value"))},selectedToken:function(){return Tokens.findOne({address:TemplateVar.get("selectedToken")})},tokenSelectedAttr:function(e){return TemplateVar.get("selectedToken")===e?{checked:!0}:{}},tokens:function(){return"send-funds"===TemplateVar.get("selectedAction")?Tokens.find({},{sort:{name:1}}):void 0},hasTokens:function(){var e=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),t={};if(e)return t["balances."+e._id]={$exists:!0,$ne:"0"},"send-funds"===TemplateVar.get("selectedAction")&&!!Tokens.findOne(t,{field:{_id:1}})},showOnlyByteTextarea:function(){return"deploy-contract"!==TemplateVar.get("selectedAction")},total:function(e){var t=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),a=TemplateVar.get("amount");if(!_.isFinite(a))return"0";var n=TemplateVar.getFrom(".dapp-select-gas-price","gasInWei")||"0";return a="ether"===TemplateVar.get("selectedToken")?t&&t.owners?a:new BigNumber(a,10).plus(new BigNumber(n,10)):new BigNumber(n,10)},tokenTotal:function(){var e=TemplateVar.get("amount"),t=Tokens.findOne({address:TemplateVar.get("selectedToken")});return _.isFinite(e)&&t?Helpers.formatNumberByDecimals(e,t.decimals):"0"},sendAllAmount:function(){var e=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),t=0;if("ether"===TemplateVar.get("selectedToken")){var a=TemplateVar.getFrom(".dapp-select-gas-price","gasInWei")||"0";t=e.owners?e.balance:BigNumber.max(0,new BigNumber(e.balance,10).minus(new BigNumber(a,10))).toString(10)}else{var n=Tokens.findOne({address:TemplateVar.get("selectedToken")});t=n&&n.balances&&n.balances[e._id]?n.balances[e._id]:"0"}return TemplateVar.set("amount",t),t},tokenDecimals:function(){var e=Tokens.findOne({address:TemplateVar.get("selectedToken")});return e?e.decimals:0},timeText:function(){return TAPi18n.__("wallet.send.texts.timeTexts."+((Number(TemplateVar.getFrom(".dapp-select-gas-price","feeMultiplicator"))+5)/2).toFixed(0))},sendExplanation:function(){var e=TemplateVar.get("amount")||"0",t=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),a=Tokens.findOne({address:TemplateVar.get("selectedToken")});if(a&&t)return Spacebars.SafeString(TAPi18n.__("wallet.send.texts.sendToken",{amount:Helpers.formatNumberByDecimals(e,a.decimals),name:a.name,symbol:a.symbol}))},formattedCoinBalance:function(e){var t=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value"));return this.balances&&Number(this.balances[t._id])>0?Helpers.formatNumberByDecimals(this.balances[t._id],this.decimals)+" "+this.symbol:!1},selectedAccountIsWalletContract:function(){var e=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value"));return e?!!e.owners:!1},clearAmountFromChars:function(e){return e=~e.indexOf(".")?e.replace(/\,/g,""):e,e.replace(/ /g,"")}}),Template.views_send.events({"change input.send-all":function(e){TemplateVar.set("sendAll",$(e.currentTarget)[0].checked),TemplateVar.set("amount",0)},"click .token-ether":function(e,t){TemplateVar.set("selectedToken","ether"),t.$('input[name="amount"]').trigger("change")},"click .select-token input":function(e,t){var a=e.currentTarget.value;TemplateVar.set("selectedToken",a),"ether"===a&&TemplateVar.setTo(".dapp-data-textarea","value",""),t.$('input[name="amount"]').trigger("change")},'keyup input[name="amount"], change input[name="amount"], input input[name="amount"]':function(e,a){if("ether"===TemplateVar.get("selectedToken")){var n=EthTools.toWei(e.currentTarget.value.replace(",","."));TemplateVar.set("amount",n||"0"),t(a.find('select[name="dapp-select-account"].send-from').value,n,a)}else{var r=Tokens.findOne({address:TemplateVar.get("selectedToken")}),o=e.currentTarget.value||"0";o=new BigNumber(o,10).times(Math.pow(10,r.decimals||0)).floor().toString(10),TemplateVar.set("amount",o)}},"submit form":function(t,n){var r=TemplateVar.get("amount")||"0",o=TemplateVar.get("selectedToken"),s=TemplateVar.getFrom(".dapp-address-input .to","value"),l=TemplateVar.getFrom(".dapp-select-gas-price","gasPrice"),i=TemplateVar.get("estimatedGas"),c=Helpers.getAccountByAddress(n.find('select[name="dapp-select-account"].send-from').value),d=TemplateVar.get("selectedAction"),m=a(),u=TemplateVar.getFrom(".compile-contract","contract"),p=TemplateVar.get("sendAll");if(c&&!TemplateVar.get("sending")){if((i===e||0===i)&&(i=22e3),p&&(c.owners||"ether"!==o)&&(p=!1),console.log("Providing gas: ",i,p?"":" + 100000"),"deploy-contract"===TemplateVar.get("selectedAction")&&!m)return GlobalNotification.warning({content:"i18n:wallet.contracts.error.noDataProvided",duration:2});if("0"===c.balance&&(!c.owners||"ether"===o))return GlobalNotification.warning({content:"i18n:wallet.send.error.emptyWallet",duration:2});if(!web3.isAddress(s)&&!m)return GlobalNotification.warning({content:"i18n:wallet.send.error.noReceiver",duration:2});if("ether"===o){if((_.isEmpty(r)||"0"===r||!_.isFinite(r))&&!m)return GlobalNotification.warning({content:"i18n:wallet.send.error.noAmount",duration:2});if(new BigNumber(r,10).gt(new BigNumber(c.balance,10)))return GlobalNotification.warning({content:"i18n:wallet.send.error.notEnoughFunds",duration:2})}else{if(!s)return GlobalNotification.warning({content:"i18n:wallet.send.error.noReceiver",duration:2});s=o,r=0;var g=Tokens.findOne({address:o}),T=g.balances[c._id]||"0";if(new BigNumber(r,10).gt(new BigNumber(T,10)))return GlobalNotification.warning({content:"i18n:wallet.send.error.notEnoughFunds",duration:2})}var f=function(e){TemplateVar.set(n,"sending",!0),e=e||Number($(".send-transaction-info input.gas").val()),console.log("Finally choosen gas",e),contracts["ct_"+c._id]?contracts["ct_"+c._id].execute.sendTransaction(s||"",r||"",m||"",{from:Helpers.getOwnedAccountFrom(c.owners),gasPrice:l,gas:e},function(t,a){TemplateVar.set(n,"sending",!1),console.log(t,a),t?GlobalNotification.error({content:t.message,duration:8}):(console.log("SEND from contract",r),m=!s&&u?{contract:u,data:m}:m,addTransactionAfterSend(a,r,c.address,s,l,e,m),localStorage.setItem("contractSource",Helpers.getDefaultContractExample()),localStorage.setItem("compiledContracts",null),localStorage.setItem("selectedContract",null),FlowRouter.go("dashboard"))}):(console.log("Gas Price: "+l),console.log("Amount:",r),web3.eth.sendTransaction({from:c.address,to:s,data:m,value:r,gasPrice:l,gas:e},function(t,a){TemplateVar.set(n,"sending",!1),console.log(t,a),t?GlobalNotification.error({content:t.message,duration:8}):(console.log("SEND simple"),m=!s&&u?{contract:u,data:m}:m,addTransactionAfterSend(a,r,c.address,s,l,e,m),localStorage.setItem("contractSource",Helpers.getDefaultContractExample()),localStorage.setItem("compiledContracts",null),localStorage.setItem("selectedContract",null),FlowRouter.go("dashboard"))}))};"undefined"==typeof mist?(console.log("estimatedGas: "+i),EthElements.Modal.question({template:"views_modals_sendTransactionInfo",data:{from:c.address,to:s,amount:r,gasPrice:l,estimatedGas:i,estimatedGasPlusAddition:p?i:i+1e5,data:m},ok:f,cancel:!0},{"class":"send-transaction-info"})):f(p?i:i+1e5)}}})}).call(this); + +(function(){Meteor.startup(function(){if(Cookie.get("TAPi18next"))TAPi18n.setLanguage(Cookie.get("TAPi18next"));else{var e=navigator.language||navigator.userLanguage,a=TAPi18n.getLanguages();TAPi18n.setLanguage(_.isObject(a)&&a[e]?e:_.isObject(a)&&a[e.substr(0,2)]?e.substr(0,2):"en")}Tracker.autorun(function(){if(_.isString(TAPi18n.getLanguage())){var e=TAPi18n.getLanguage().substr(0,2);moment.locale(e);try{numeral.language(e)}catch(a){console.warn("numeral.js couldn't set number formating: ",a.message)}EthTools.setLocale(e)}localStorage.dapp_hasUnicornToken||"main"!==Session.get("network")||(localStorage.setItem("dapp_hasUnicornToken",!0),Meteor.setTimeout(function(){var e="0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7";tokenId=Helpers.makeId("token",e),Tokens.upsert(tokenId,{$set:{address:e,name:"Unicorns",symbol:"🦄",balances:{},decimals:0}})},5e3))})})}).call(this); + +(function(){updateMistBadge=function(){var e=PendingConfirmations.findOne({operation:{$exists:!0}});if(!("undefined"==typeof mist||e&&e.confirmedOwners.length)){var n=EthAccounts.find({}).fetch(),t=Wallets.find({owners:{$in:_.pluck(n,"address")}}).fetch(),o=_.reduce(_.pluck(_.union(n,t),"balance"),function(e,n){return e+Number(n)},0);mist.menu.setBadge(EthTools.formatBalance(o,"0.0 a","ether")+" ETH")}},updateMistMenu=function(){if("undefined"!=typeof mist){var e=_.union(Wallets.find({},{sort:{name:1}}).fetch(),EthAccounts.find({},{sort:{name:1}}).fetch());e.sort(Helpers.sortByBalance),Meteor.setTimeout(function(){var n=FlowRouter.current().route.name;mist.menu.clear(),mist.menu.add("wallets",{position:1,name:TAPi18n.__("wallet.app.buttons.wallet"),selected:"dashboard"===n},function(){FlowRouter.go("/")}),mist.menu.add("send",{position:2,name:TAPi18n.__("wallet.app.buttons.send"),selected:"send"===n||"sendTo"===n},function(){FlowRouter.go("/send")}),_.each(e,function(e,n){mist.menu.add(e._id,{position:3+n,name:e.name,badge:EthTools.formatBalance(e.balance,"0 a","ether")+" ETH",selected:location.pathname==="/account/"+e.address},function(){FlowRouter.go("/account/"+e.address)})})},10)}},Meteor.startup(function(){Tracker.autorun(updateMistMenu)})}).call(this); + +(function(){BlazeLayout.setRoot("body"),FlowRouter.notFound={action:function(){BlazeLayout.render("layout_main",{header:"layout_header",main:"layout_notFound"})}},"file://"===location.origin&&(FlowRouter.wait(),FlowRouter.initialize({hashbang:!0}),Meteor.startup(function(){FlowRouter.go("dashboard")})),FlowRouter.triggers.enter([function(){EthElements.Modal.hide(),$(window).scrollTop(0)},updateMistMenu]),FlowRouter.route("/",{name:"dashboard",action:function(e,o){BlazeLayout.render("layout_main",{header:"layout_header",main:"views_dashboard"})}}),FlowRouter.route("/send",{name:"send",action:function(e,o){BlazeLayout.render("layout_main",{header:"layout_header",main:"views_send"})}}),FlowRouter.route("/tokens",{name:"tokens",action:function(e,o){BlazeLayout.render("layout_main",{header:"layout_header",main:"views_tokens"})}}),FlowRouter.route("/contracts",{name:"contracts",action:function(e,o){BlazeLayout.render("layout_main",{header:"layout_header",main:"views_contracts"})}}),FlowRouter.route("/send/:address",{name:"sendTo",action:function(e,o){BlazeLayout.render("layout_main",{header:"layout_header",main:"views_send"})}}),FlowRouter.route("/send-from/:from",{name:"sendFrom",action:function(e,o){BlazeLayout.render("layout_main",{header:"layout_header",main:"views_send"})}}),FlowRouter.route("/send-token/:from/:token",{name:"sendToken",action:function(e,o){BlazeLayout.render("layout_main",{header:"layout_header",main:"views_send"})}}),FlowRouter.route("/deploy-contract",{name:"deployContract",action:function(e,o){BlazeLayout.render("layout_main",{header:"layout_header",main:"views_send",data:{deployContract:!0}})}}),FlowRouter.route("/account/new",{name:"createAccount",action:function(e,o){BlazeLayout.render("layout_main",{header:"layout_header",main:"views_account_create"})}}),FlowRouter.route("/account/:address",{name:"account",action:function(e,o){BlazeLayout.render("layout_main",{header:"layout_header",main:"views_account"})}})}).call(this); + +(function(){$(window).on("blur",function(a){$("body").addClass("app-blur")}),$(window).on("focus",function(a){$("body").removeClass("app-blur")}),$(window).on("scroll",function(){var a=$(window).scrollTop();a>150?($(".dapp-sticky-bar").addClass("sticky"),$(".dapp-header").addClass("dapp-small")):a>48?($(".dapp-header").addClass("dapp-small"),$(".dapp-sticky-bar").removeClass("sticky")):($(".dapp-header").removeClass("dapp-small"),$(".dapp-sticky-bar").removeClass("sticky"))})}).call(this); + +(function(){var e=Package.underscore._,n="project",a="project";"project"!=n&&(a=TAPi18n.packages[n].namespace),TAPi18n.languages_names.de=["German","Deutsch"],TAPi18n._enable({helper_name:"_",supported_languages:null,i18n_files_route:"/tap-i18n",preloaded_langs:[],cdn_path:null}),TAPi18n.languages_names.en=["English","English"]}).call(this); + +(function(){var n=Package.underscore._,e="project",o="project";"project"!=e&&(o=TAPi18n.packages[e].namespace),translations={},translations[o]={app:{loading:"Loading...",offline:"Can't connect. Are you offline?",logginIn:"Logging in..."},error:{insufficientRights:"You don't have enough rights for this action."},buttons:{ok:"OK",cancel:"Cancel",save:"Save",edit:"edit",send:"Send",sending:"Sending...",create:"Create",select:"Select",tryToReconnect:"Try to reconnect"},commonWords:{you:"You",send:"Send",or:"or",of:"of","with":"with",and:"and",on:"on",per:"per",total:"total",at:"at"}},TAPi18n._loadLangFileObject("en",translations)}).call(this); + +(function(){var a=Package.underscore._,e="project",n="project";"project"!=e&&(n=TAPi18n.packages[e].namespace),TAPi18n.languages_names.es=["Spanish (Spain)","Español"]}).call(this); + +(function(){var a=Package.underscore._,e="project",c="project";"project"!=e&&(c=TAPi18n.packages[e].namespace),TAPi18n.languages_names.fa=["Persian","فارسی"]}).call(this); + +(function(){var a=Package.underscore._,e="project",c="project";"project"!=e&&(c=TAPi18n.packages[e].namespace),TAPi18n.languages_names.fr=["French (France)","Français"]}).call(this); + +(function(){var a=Package.underscore._,e="project",c="project";"project"!=e&&(c=TAPi18n.packages[e].namespace),TAPi18n.languages_names.ja=["Japanese","日本語"]}).call(this); + +(function(){var a=Package.underscore._,e="project",c="project";"project"!=e&&(c=TAPi18n.packages[e].namespace),TAPi18n.languages_names.ko=["Korean","한국어"]}).call(this); + +(function(){var e=Package.underscore._,a="project",c="project";"project"!=a&&(c=TAPi18n.packages[a].namespace),TAPi18n.languages_names.pt=["Portuguese (Portugal)","Português"]}).call(this); + +(function(){var a=Package.underscore._,e="project",n="project";"project"!=e&&(n=TAPi18n.packages[e].namespace),TAPi18n.languages_names.ro=["Romanian","Română"]}).call(this); + +(function(){var a=Package.underscore._,e="project",c="project";"project"!=e&&(c=TAPi18n.packages[e].namespace),TAPi18n.languages_names.ru=["Russian","Русский"]}).call(this); + +(function(){var a=Package.underscore._,e="project",n="project";"project"!=e&&(n=TAPi18n.packages[e].namespace),TAPi18n.languages_names.ua=["Ukrainian","Українська"]}).call(this); + +(function(){var a=Package.underscore._,e="project",n="project";"project"!=e&&(n=TAPi18n.packages[e].namespace),TAPi18n.languages_names["zh-TW"]=["Chinese (Taiwan)","繁体中文(台湾)"]}).call(this); + +(function(){var e=Package.underscore._,a="project",c="project";"project"!=a&&(c=TAPi18n.packages[a].namespace),TAPi18n.languages_names.zh=["Chinese","中文"]}).call(this); + +(function(){var e=Package.underscore._,a="project",c="project";"project"!=a&&(c=TAPi18n.packages[a].namespace),TAPi18n.languages_names.de=["German","Deutsch"]}).call(this); + +(function(){var t=Package.underscore._,e="project",o="project";"project"!=e&&(o=TAPi18n.packages[e].namespace),translations={},translations[o]={elements:{selectGasPrice:{high:"Faster",low:"Cheaper"},checksumAlert:"This address looks valid, but doesn't have security features that protect against typos. Please double check you have the right one. If provided, check if the security icon matches.",identiconHelper:"This is a security icon. If there were any change to the address, the resulting icon would be a completely different one"},wallet:{app:{buttons:{wallet:"Wallets",send:"Send",contracts:"Contracts",deploy:"Deploy",tokens:"Tokens",receive:"Receive",addWallet:"Add wallet contract",addAccount:"Add account",addToken:"Watch token"},texts:{note:"Note",balance:"Balance",connectionErrorMist:"Unable to connect. Please start geth using:

__node__

Make sure you set your IPC path to the default one, when using a different datadir, e.g.
geth --datadir ... --ipcpath /Users/<yourUser>/Library/Ethereum/geth.ipc
or
geth --datadir ... --ipcpath /Users/<yourUser>/.ethereum/geth.ipc.

Optional add: --unlock <yourAccount>.
",connectionErrorBrowser:"Unable to connect. Please start geth with the following options:

__node__

Optional add: --unlock <yourAccount>.
",pendingConfirmationsBadge:"Pending Confirmation!",nodeSyncing:"__blockDiff__ blocks left",blockReceived:"New block received",timeSinceBlock:"since last block",peers:"peers",waitingForBlocks:"Waiting for blocks..",testnetExplain:"You are on a testnet, DO NOT SEND any real Ether to these addresses",noAccounts:{title:"You have no accounts yet",text:"You need to create at least one account with a strong password."}},error:{wrongChain:"You seem to be on a different chain. Please restart the Ethereum Wallet App!"},warnings:{txOriginVulnerabilityWallet:"This smart contract wallet has outdated code and is subject to phishing attacks. ",txOriginVulnerabilityCallToAction:"Upgrade your contract now and transfer your funds to the upgraded version.",txOriginVulnerabilityAccount:"This account is an owner of a vulnerable wallet contract. Using this account on malicious contracts can endanger your wallets funds. Upgrade your wallet before doing any transactions with this account.",txOriginVulnerabilityPopup:"We found vulnerable wallets! Make sure to deploy new wallets and move the funds!",checkThisNow:"Show vulnerable wallet",checkThisLater:"Later",learnMore:"Learn more about this vulnerability"}},modals:{selectAccount:{title:"Select an account"},testnetWallet:{walletNeedsDeployment:"You seem to be on a testnet.

There is no original wallet contract code found. We need to deploy one, which can be used by the wallet contract stub contracts, from your address:

__account__

Please make sure this address has at least 1 Ether!",testnetWalletDeployed:"Original wallet contract deployed!
An original wallet contract was deployed on the address:

__address__."},addToken:{title:"Add token",titleEdit:"Edit token",contractAddress:"Token contract address",tokenName:"Token name",tokenSymbol:"Token symbol",decimalPlaces:"Decimals places of smallest unit",preview:"Preview"},"interface":{title:"Contract JSON Interface",description:"If you want to have someone else execute this contract, send this information along with the contract's address."}},accounts:{title:"Accounts Overview",walletsTitle:"Wallet contracts",accountsTitle:"Accounts",defaultName:"Unnamed",creating:"Creating",importing:"Importing",accountNote:'Accounts can\'t display incoming transactions, but can receive, hold and send Ether. To see incoming transactions create a wallet contract to store ether.',outOfSyncNote:"If your balance doesn't seem updated, make sure that you are in sync with the network.",walletNote:"Most exchanges don't support receiving ether from a contract wallet yet. Be sure to move your balance to an account address first!",addressCopiedToClipboard:"Copied to clipboard",addressNotCopiedToClipboard:"Error copying address to clipboard. Please try again.",qrCodeLabel:"Point a compatible mobile app to this code",dailyLimit:"Daily limit",dailyLimitRemaining:"remaining today",requiredSignatures:"Required signatures",owners:"Owners",walletsDescription:"These contracts are stored on the blockchain and can hold and secure Ether. They can have multiple accounts as owners and keep a full log of all transactions.",walletsDescriptionNotEnoughFunds:"Once you have more than 1 Ether you can create more sophisticated contracts. Wallets are smart contracts that allow your funds to be controlled by multiple accounts. They can have an optional daily limit on withdrawals to increase security. Create your own custom contracts on the Contracts tab.",accountsDescription:"Accounts are password protected keys that can hold Ether and Ethereum-based tokens. They can control contracts, but can't display incoming transactions.",buttons:{deposit:"Transfer Ether & Tokens",depositBitcoin:"Fund with Bitcoin",depositUsingCreditCard:"Fund with a Credit Card (U.S. only)",viewOnExplorer:"View on Etherscan",copyAddress:"Copy address",scanQRCode:"Show QR-Code",showInterface:"Show Interface"},modal:{deleteText:'Do you really want to delete this wallet contract? If you don\'t separately track it and its private key, you may not be able to find it on the blockchain and will lose access to any funds deposited

Type "delete" confirm the deletion.',backupWallet:{title:"Backup your wallet contract address!",description:"Make sure to write down the wallet contract address:"},copyAddressWarning:"Warning: you are on the Test Network. Be careful not to transfer real funds to this account.",buttonOk:"Copy anyway",buttonCancel:"Nevermind.."}},events:{eventInfoTitle:"Event",latest:"Latest events",filter:"Filter events",transactionHash:"Transaction hash",block:"Block",originContract:"Origin contract",logIndex:"Log index",transactionIndex:"Transaction index",returnValues:"Return values",eventName:"Event name"},transactions:{transactionInfoTitle:"Transaction",latest:"Latest transactions",block:"Block",pendingConfirmations:"Confirmation needed",none:"No transactions yet",time:"Time",from:"From",to:"To",amount:"Amount",gasPrice:"Gas price",perMillionGas:" PER MILLION GAS",gasUsed:"Gas used",feePaid:"Fee paid",data:"Send data",deployedData:"Deployed data",confirmations:"Confirmations",unconfirmed:"Unconfirmed",showMore:"Show More",filter:"Filter transactions",noneFound:"No matching transaction found.",noOwnerAccount:"Watch only confirmation",outOfGasDesc:"The transaction didn't seem to have enough gas to execute.",buttons:{approve:"Approve",approved:"Approved",revoke:"Revoke",revoked:"Revoked"},error:{noDataDeployed:"No data is deployed on the contract address!",outOfGas:"The transaction from __from__ to __to__ couldn't be successfully executed."},types:{executeContract:"Contract execution",betweenWallets:"Transfer between accounts",sent:"Sent",received:"Received",outOfGas:"Transaction not executed",createdContract:{title:"Created contract",at:"Created contract at"},creatingContract:"Creating contract",tokenTransfer:"__token__ - Token transfer",pendingConfirmations:"__initiator__ wants to send from __from__"},notifications:{incomingTransaction:{title:"Payment received",text:"You received __amount__ on __to__ from __from__."},outgoingTransaction:{title:"Payment sent",text:"You sent __amount__ from __from__ to __to__."},pendingConfirmation:{title:"Confirmation needed",text:"__initiator__ wants to send __amount__ from __from__ to __to__"},tokenTransfer:{title:"__token__ - Token transfer",text:"__amount__ __token__ were send from __from__ to __to__."}}},newWallet:{title:"New wallet contract",accountName:"Wallet contract name",selectOwner:"Select owner",accountType:{title:"Wallet contract type",simple:{title:"Single owner account",description:"A simple contract without additional security measures.",warning:"Note: If your owner account is compromised, your wallet has no protection."},multisig:{title:"Multisignature wallet contract",description:"A contract controlled by multiple accounts",text1:"This is a joint account controlled by",text2:"owners. You can send up to",text3:"Ether per day.",text4:"Any transaction over that daily limit requires the confirmation of",text5:"owners.",accountOwnersTitle:"Account owners",ownerAddress:"Owner address"},"import":{title:"Import wallet",description:"Import an existing (multisignature) wallet.",walletAddress:"Wallet address",youreOwner:'Your "__account__" account is an owner of this wallet contract.',watchOnly:'You don\'t own the account, but you can add it as a "WATCH ONLY" account.',notWallet:"This address has no wallet contract."}},error:{emptySignees:"You didn't provided all owners.",alreadyExists:"Wallet contract already exists.",stubHasNoOrigWalletAddress:"Your stub contract has no original account address set. Please restart your App!",contractsCantBeOwners:"Contracts can't be owners.",checkOwnerAddress:"Please change the contract address __address__ to an account."}},send:{title:"Send funds",sendInfoTitle:"Send",pickAddress:"Pick an address",to:"To",from:"From",amount:"Amount",tokenAmount:"Token amount",sendFunds:"Send funds",deployContract:"Deploy contract",data:"Data",moreOptions:"More options",showMoreOptions:"Show more options",showLessOptions:"Show fewer options",fee:"Select Fee",feeLow:"Cheaper",feeHigh:"Faster",addData:"Add data",sendAll:"Send everything",removeData:"Remove data",estimatedFee:"Estimated fee",createContract:"Create contract",provideGas:"Provide gas",transactionSent:"Transaction sent",error:{emptyWallet:"The account you want to send from is empty.",notEnoughFunds:"You don't have enough funds in the account.",noReceiver:"You didn't specify a receiver.",noAmount:"You didn't specify an amount to send."},texts:{ownerPaysGas:"Gas is paid by the owner of the wallet contract",sendAmount:"You want to send __amount__.",sendAmountEquivalent:'You want to send __amount__ in Ether, using exchange rates from cryptocompare.com.
Which is currently an equivalent of __etherAmount__.',sendToken:"You want to send __amount__ __symbol__ of __name__.",overDailyLimit:'

This amount is over the remaining daily limit of __limit__ (of __total__ per day), so you need __count__ other account to confirm.

',overDailyLimit_plural:'

This amount is over the remaining daily limit of __limit__ (of __total__ per day), so you need __count__ other accounts to confirm.

',underDailyLimit:'

This amount is under the remaining daily limit of __limit__ (of __total__ per day), means it will send immediately.

',sendFee:"This is the most amount of money that might be used to process this transaction. Your transaction will be mined __timetext__.",noCodeInRecipient:"The recipient account is not a contract, so you can't execute anything. Put a contract address on the 'TO' field. ",addData:"You can add extra data to send along with your transaction. If you don't know what this is then don't touch it or bad things may happen.",dataNotExecutable:"The data seems not to be executabe, that means this transaction will use all the gas you provide.",cantEstimateGas:"We can't estimate your gas usage properly, as you need at least 1 Ether in your account.",estimatedGas:"Estimated required gas",timeTexts:{0:"in a few minutes or more",1:"likely within a few minutes",2:"usually within a minute",3:"probably within 30 seconds",4:"probably within a few seconds",5:"probably within a few seconds"}}},tokens:{title:"Custom Tokens",subTitle:"Added tokens",admin:"__name__ (admin page)",description:'Tokens are currencies and other fungibles built on the Ethereum platform. In order for accounts to watch for tokens and send them, you have to add their address to this list. You can create your own token by simply modifying this example of a custom token contract or learning more about Ethereum Tokens.',deleteToken:"Do you want to remove the token __token__ from your list?",addedToken:"Added __token__ to your watch list",editedToken:"Edited token __token__",error:{invalidAddress:"Token not added. Invalid address."}},contracts:{contractTitle:"Contracts",deployNewContract:"Deploy new contract",addCustomContract:"Watch contract",customContracts:"Custom contracts",description:"To watch and interact with a contract already deployed on the blockchain, you need to know its address and the description of its interface in JSON format.",deployContract:"Deploy contract",contractSourceCode:"Solidity contract source code",contractByteCode:"Contract byte code",selectContract:"Select contract to deploy",constructorParameters:"Constructor parameters",name:"Contract name",address:"Contract address",jsonInterface:"JSON Interface",contractInformation:"Contract information",addedContract:"Added custom contract",readFromContract:"Read from contract",writeToContract:"Write to contract",pickContract:"Pick a contract",pickFunction:"Pick a function",noContract:'

Put the source of the contract you want here. You can find many examples of contracts at the ethereum.org:

',buttons:{showContractInfo:"Show contract info",hideContractInfo:"Hide contract info",watchContractEvents:"Watch contract events",execute:"Execute",yes:"Yes"},error:{compile:"Could not compile source code.",noDataProvided:"No data found: select a contract from the 'select contract' menu",invalidAddress:"This is not a valid address.",jsonInterfaceParseError:"Couldn't parse the JSON Interface."}}}},TAPi18n._loadLangFileObject("en",translations)}).call(this); + +(function(){var a=Package.underscore._,e="project",n="project";"project"!=e&&(n=TAPi18n.packages[e].namespace),TAPi18n.languages_names.es=["Spanish (Spain)","Español"]}).call(this); + +(function(){var a=Package.underscore._,e="project",c="project";"project"!=e&&(c=TAPi18n.packages[e].namespace),TAPi18n.languages_names.fr=["French (France)","Français"]}).call(this); + +(function(){var a=Package.underscore._,e="project",c="project";"project"!=e&&(c=TAPi18n.packages[e].namespace),TAPi18n.languages_names.ja=["Japanese","日本語"]}).call(this); + +(function(){var a=Package.underscore._,e="project",c="project";"project"!=e&&(c=TAPi18n.packages[e].namespace),TAPi18n.languages_names.ko=["Korean","한국어"]}).call(this); + +(function(){var e=Package.underscore._,a="project",c="project";"project"!=a&&(c=TAPi18n.packages[a].namespace),TAPi18n.languages_names.pt=["Portuguese (Portugal)","Português"]}).call(this); + +(function(){var a=Package.underscore._,e="project",n="project";"project"!=e&&(n=TAPi18n.packages[e].namespace),TAPi18n.languages_names.ro=["Romanian","Română"]}).call(this); + +(function(){var a=Package.underscore._,e="project",c="project";"project"!=e&&(c=TAPi18n.packages[e].namespace),TAPi18n.languages_names.ru=["Russian","Русский"]}).call(this); + +(function(){var a=Package.underscore._,e="project",n="project";"project"!=e&&(n=TAPi18n.packages[e].namespace),TAPi18n.languages_names.ua=["Ukrainian","Українська"]}).call(this); + +(function(){var a=Package.underscore._,e="project",n="project";"project"!=e&&(n=TAPi18n.packages[e].namespace),TAPi18n.languages_names["zh-TW"]=["Chinese (Taiwan)","繁体中文(台湾)"]}).call(this); + +(function(){var e=Package.underscore._,a="project",c="project";"project"!=a&&(c=TAPi18n.packages[a].namespace),TAPi18n.languages_names.zh=["Chinese","中文"]}).call(this); + +(function(){TAPi18n._enable({helper_name:"i18n",supported_languages:["de","en","es","fa","fr","ja","ko","pt","ro","ru","ua","zh","zh-TW"],cdn_path:"i18n",i18n_files_route:"/tap-i18n",preloaded_langs:[]}),TAPi18n.languages_names.en=["English","English"],TAPi18n.languages_names.de=["German","Deutsch"],TAPi18n.languages_names.en=["English","English"],TAPi18n.languages_names.es=["Spanish (Spain)","Español"],TAPi18n.languages_names.fa=["Persian","فارسی"],TAPi18n.languages_names.fr=["French (France)","Français"],TAPi18n.languages_names.ja=["Japanese","日本語"],TAPi18n.languages_names.ko=["Korean","한국어"],TAPi18n.languages_names.pt=["Portuguese (Portugal)","Português"],TAPi18n.languages_names.ro=["Romanian","Română"],TAPi18n.languages_names.ru=["Russian","Русский"],TAPi18n.languages_names.ua=["Ukrainian","Українська"],TAPi18n.languages_names.zh=["Chinese","中文"],TAPi18n.languages_names["zh-TW"]=["Chinese (Taiwan)","繁体中文(台湾)"]}).call(this); + diff --git a/build/index.html b/build/index.html index 48c412c01..32a4b87a3 100644 --- a/build/index.html +++ b/build/index.html @@ -3,7 +3,7 @@ - + Ethereum Wallet