UNPKG

iweb-tool

Version:
2 lines 171 kB
function implement(e){var t,n;for(t in e)n=e[t],Class.Mutators.hasOwnProperty(t)?Class.Mutators[t].call(this,n):this.prototype[t]=n}function classify(e){return e.extend=Class.extend,e.implement=implement,e}function Ctor(){}function mix(e,t,n){for(var i in t)if(t.hasOwnProperty(i)){if(n&&-1===indexOf(n,i))continue;"prototype"!==i&&(e[i]=t[i])}}function _findRegisteredClass(e,t){for(var n=0;n<CompMgr.registeredControls.length;n++)if(CompMgr.registeredControls[n].className===e)return"undefined"!=typeof t&&(CompMgr.registeredControls[n]=t),CompMgr.registeredControls[n];return!1}function _getUpgradedListOfElement(e){var t=e.getAttribute("data-upgraded");return null===t?[""]:t.split(",")}function _isElementUpgraded(e,t){var n=_getUpgradedListOfElement(e);return-1!=n.indexOf(t)}function _upgradeElement(e,t){if(!("object"==typeof e&&e instanceof Element))throw new Error("Invalid argument provided to upgrade MDL element.");var n=_getUpgradedListOfElement(e),i=[];if(t)_isElementUpgraded(e,t)||i.push(_findRegisteredClass(t));else for(var r=e.className,a=0;a<CompMgr.registeredControls.length;a++){var s=CompMgr.registeredControls[a];r.indexOf(s.cssClass)>-1&&-1===i.indexOf(s)&&!_isElementUpgraded(e,s.className)&&i.push(s)}for(var o,a=0,u=i.length;u>a;a++){if(o=i[a],!o)throw new Error("Unable to find a registered component for the given class.");if(!e[o.className]){n.push(o.className),e.setAttribute("data-upgraded",n.join(","));var l=new o.classConstructor(e);CompMgr.createdControls.push(l);for(var d=0,c=o.callbacks.length;c>d;d++)o.callbacks[d](e);e[o.className]=l}}}function _upgradeDomInternal(e,t,n){if("undefined"==typeof e&&"undefined"==typeof t)for(var i=0;i<CompMgr.registeredControls.length;i++)_upgradeDomInternal(CompMgr.registeredControls[i].className,registeredControls[i].cssClass,n);else{var r=e;if(!t){var a=_findRegisteredClass(r);a&&(t=a.cssClass)}for(var s=n?n:document,o=s.querySelectorAll("."+t),u=0;u<o.length;u++)_upgradeElement(o[u],r)}}function BarrettMu_modulo(e){var t=RSAUtils,n=t.biDivideByRadixPower(e,this.k-1),i=t.biMultiply(n,this.mu),r=t.biDivideByRadixPower(i,this.k+1),a=t.biModuloByRadixPower(e,this.k+1),s=t.biMultiply(r,this.modulus),o=t.biModuloByRadixPower(s,this.k+1),u=t.biSubtract(a,o);u.isNeg&&(u=t.biAdd(u,this.bkplus1));for(var l=t.biCompare(u,this.modulus)>=0;l;)u=t.biSubtract(u,this.modulus),l=t.biCompare(u,this.modulus)>=0;return u}function BarrettMu_multiplyMod(e,t){var n=RSAUtils.biMultiply(e,t);return this.modulo(n)}function BarrettMu_powMod(e,t){var n=new BigInt;n.digits[0]=1;for(var i=e,r=t;;){if(0!=(1&r.digits[0])&&(n=this.multiplyMod(n,i)),r=RSAUtils.biShiftRight(r,1),0==r.digits[0]&&0==RSAUtils.biHighIndex(r))break;i=this.multiplyMod(i,i)}return n}function AbstractMasker(){}function AbstractSplitMasker(){}function AddressMasker(e){this.update(e)}function NumberMasker(e){this.update(e)}function CurrencyMasker(e){this.update(e)}function DateTimeMasker(e){this.update(e)}function DateMasker(e){this.update(e)}function TimeMasker(e){this.update(e)}function PercentMasker(){}function toColorfulString(e){var t;return e?null==e.color?e.value:(t=e.color,'<font color="'+t+'">'+e.value+"</font>"):""}function StringElement(e){this.value=e}function FormatResult(e,t){this.value=e,this.color=t}function NumberFormater(e){this.precision=e}function DateFormater(e){this.pattern=e}function _updateDom(e,t){for(var n in t){var i=t[n];for(var e in i){var r=i[e];if("trigger"==e)u.trigger(e,r[0]);else if(u.isArray(r))u.each(r,function(t,n){e[t](n)});else try{e[n](i)}catch(a){e[n](i[n])}}}}var U_LANGUAGES="i_languages",U_THEME="u_theme",U_LOCALE="u_locale",U_USERCODE="u_usercode",enumerables=!0,enumerablesTest={toString:1},toString=Object.prototype.toString;for(var i in enumerablesTest)enumerables=null;enumerables&&(enumerables=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]),window.u=window.u||{};var u=window.u;if(u.enumerables=enumerables,u.extend=function(e,t){var n,i=arguments;if(i.length>1)for(var r=1;r<i.length;r++)if(n=i[r],e&&n&&"object"==typeof n){var a,s,o;for(a in n)e[a]=n[a];if(enumerables)for(s=enumerables.length;s--;)o=enumerables[s],n.hasOwnProperty(o)&&(e[o]=n[o])}return e},u.extend(u,{setCookie:function(e,t,n,i,r,a){var s=e+"="+encodeURIComponent(t);n&&(s+="; expires="+n.toGMTString()),i&&(s+="; path="+i),r&&(s+="; domain="+r),a&&(s+="; secure="+a),document.cookie=s},getCookie:function(e){var t="(?:; )?"+e+"=([^;]*);?",n=new RegExp(t);return n.test(document.cookie)?decodeURIComponent(RegExp.$1):null},createShellObject:function(e){var t=function(){};return t.prototype=e,new t},execIgnoreError:function(e,t,n){try{e.call(t,n)}catch(i){}},on:function(e,t,n,i){if(arguments.length<4)i=n,n=void 0;else var r=function(t){if(t){var r=e.querySelectorAll(n);r.forEach(function(e){e==t.target&&i.call(t.target,t)})}};e.uEvent||(e.uEvent={}),e.uEvent[t]?e.uEvent[t].push(n?r:i):(e.uEvent[t]=[n?r:i],e.uEvent[t+"fn"]=function(){var n=event?event:window.event;e.uEvent[t].forEach(function(t){t.call(e,n)})},e.addEventListener?e.addEventListener(t,e.uEvent[t+"fn"]):e.attachEvent?e.attachEvent("on"+t,e.uEvent[t+"fn"]):e["on"+t]=e.uEvent[t+"fn"])},off:function(e,t,n){var i=e.uEvent[t+"fn"];e.removeEventListener?e.removeEventListener(t,i):e.removeEvent?e.removeEvent("on"+t,i):delete e["on"+t],e.uEvent[t]=void 0,e.uEvent[t+"fn"]=void 0},trigger:function(e,t){e.uEvent&&e.uEvent[t]&&e.uEvent[t+"fn"]()},addClass:function(e,t){return"undefined"==typeof e.classList?u._addClass(e,t):e.classList.add(t),u},removeClass:function(e,t){return"undefined"==typeof e.classList?u._removeClass(e,t):e.classList.remove(t),u},hasClass:function(e,t){return"#text"===e.nodeName?!1:"undefined"==typeof e.classList?u._hasClass(e,t):e.classList.contains(t)},toggleClass:function(e,t){return"undefined"==typeof e.classList?u._toggleClass(e,t):e.classList.toggle(t)},css:function(e,t,n){if(t instanceof Object)for(var i in t){var r=t[i];["width","height","top","bottom","left","right"].indexOf(i)>-1&&u.isNumber(r)&&(r+="px"),e.style[i]=r}else arguments.length>2?e.style[t]=n:u.getStyle(e,t)},wrap:function(e,t){var n=u.makeDOM(t);e.parentNode.insertBefore(n,e),n.appendChild(e)},getStyle:function(e,t){var n;return n=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,void 0!==n[t]?n[t]:""},getZIndex:function(){return u.globalZIndex||(u.globalZIndex=1e3),u.globalZIndex++},makeDOM:function(e){var t=document.createElement("div");t.innerHTML=e;var n=t.children[0];return n},stopEvent:function(e){"undefined"!=typeof e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},getFunction:function(e,t){if(!t||"function"==typeof t)return t;if("function"==typeof e[t])return e[t];if("function"==typeof window[t])return window[t];if(-1!=t.indexOf(".")){var n=u.getJSObject(e,t);if("function"==typeof n)return n;if(n=u.getJSObject(window,t),"function"==typeof n)return n}return t},getJSObject:function(e,t){if(t){if("object"==typeof t)return t;for(var n=t.split("."),i=e,r=0;r<n.length;r++)if(i=i[n[r]],!i)return null;return i}},isDate:function(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date},isNumber:function(e){return e===+e},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},inArray:function(e,t){if(!t instanceof Array)throw"arguments is not Array";for(var n=0,i=t.length;i>n;n++)if(e==t[n])return!0;return!1},each:function(e,t){if(e.forEach)e.forEach(function(e,n){t(n,e)});else{if(!(e instanceof Object))return;for(var n in e)t(n,e[n])}}}),function(){var e={},t={},n={},i={},r={"float":{precision:2},datetime:{format:"YYYY-MM-DD hh:mm:ss",metaType:"DateTimeFormatMeta",speratorSymbol:"-"},time:{format:"hh:mm:ss"},date:{format:"YYYY-MM-DD"},currency:{precision:2,curSymbol:"¥"},percent:{}};i.getEnvironment=function(){return u.createShellObject(e)},i.getClientAttributes=function(){return u.createShellObject(t)},i.setContextPath=function(t){return e[IWEB_CONTEXT_PATH]=t},i.getContextPath=function(t){return e[IWEB_CONTEXT_PATH]},i.setClientAttribute=function(e,n){t[e]=n},i.getSessionAttributes=function(){return u.createShellObject(n)},i.setSessionAttribute=function(e,t){n[e]=t,setCookie("ISES_"+e,t)},i.removeClientAttribute=function(e){t[e]=null,execIgnoreError(function(){delete t[e]})},i.getLanguages=function(){return this.getEnvironment().languages},i.collectEnvironment=function(){var e=this.getEnvironment(),n=this.getSessionAttributes();for(var i in t)n[i]=t[i];return e.clientAttributes=n,e},i.setMaskerMeta=function(e,t){if("function"==typeof e)getMetaFunc=e;else if(r[e])if("object"!=typeof t)r[e]=t;else for(var n in t)r[e][n]=t[n];else r[e]=t},i.getMaskerMeta=function(e){if("function"==typeof getMetaFunc){var t=getMetaFunc.call(this);return t[e]}return u.extend({},r[e])},e.languages=u.getCookie(U_LANGUAGES)?u.getCookie(U_LANGUAGES).split(","):navigator.language,e.theme=u.getCookie(U_THEME),e.locale=u.getCookie(U_LOCALE),e.usercode=u.getCookie(U_USERCODE),document.cookie.replace(/ISES_(\w*)=([^;]*);?/gi,function(e,t,i){n[t]=i});var a=function(){};a.prototype=i,u.core=new a}(),u.extend(u,{isIE:!1,isFF:!1,isOpera:!1,isChrome:!1,isSafari:!1,isWebkit:!1,isIE8_BEFORE:!1,isIE8:!1,isIE8_CORE:!1,isIE9:!1,isIE9_CORE:!1,isIE10:!1,isIE10_ABOVE:!1,isIE11:!1,isIOS:!1,isIphone:!1,isIPAD:!1,isStandard:!1,version:0}),function(){var e,t,n=navigator.userAgent,i=/(msie\s|trident.*rv:)([\w.]+)/,r=/(firefox)\/([\w.]+)/,a=/(opera).+version\/([\w.]+)/,s=/(chrome)\/([\w.]+)/,o=/version\/([\w.]+).*(safari)/,l=n.toLowerCase(),d=null,c=i.exec(l);if(null!=c&&(d={browser:"IE",version:c[2]||"0"}),c=r.exec(l),null!=c&&(d={browser:c[1]||"",version:c[2]||"0"}),c=a.exec(l),null!=c&&(d={browser:c[1]||"",version:c[2]||"0"}),c=s.exec(l),null!=c&&(d={browser:c[1]||"",version:c[2]||"0"}),c=o.exec(l),null!=c&&(d={browser:c[2]||"",version:c[1]||"0"}),null!=c&&(d={browser:"",version:"0"}),(t=l.match(/opera.([\d.]+)/))?u.isOpera=!0:"IE"==d.browser&&11==d.version?(u.isIE11=!0,u.isIE=!0):(t=l.match(/chrome\/([\d.]+)/))?(u.isChrome=!0,u.isStandard=!0):(t=l.match(/version\/([\d.]+).*safari/))?(u.isSafari=!0,u.isStandard=!0):(t=l.match(/gecko/))?(u.isFF=!0,u.isStandard=!0):(t=l.match(/msie ([\d.]+)/))?u.isIE=!0:(t=l.match(/firefox\/([\d.]+)/))&&(u.isFF=!0,u.isStandard=!0),l.match(/webkit\/([\d.]+)/)&&(u.isWebkit=!0),l.match(/ipad/i)&&(u.isIOS=!0,u.isIPAD=!0,u.isStandard=!0),l.match(/iphone/i)&&(u.isIOS=!0,u.isIphone=!0),u.version=e&&d.version?d.version:0,u.isIE){var f=parseInt(u.version),p=document.documentMode;null==p?(6==f||7==f)&&(u.isIE8_BEFORE=!0):(7==p?u.isIE8_BEFORE=!0:8==p?u.isIE8=!0:9==p?(u.isIE9=!0,u.isSTANDARD=!0):10==p?(u.isIE10=!0,u.isSTANDARD=!0,u.isIE10_ABOVE=!0):u.isSTANDARD=!0,8==f?u.isIE8_CORE=!0:9==f?u.isIE9_CORE=!0:11==d.version&&(u.isIE11=!0))}}(),u.isIE8_BEFORE)throw alert("uui 不支持IE8以前的浏览器版本,请更新IE浏览器或使用其它浏览器!"),new Error("uui 不支持IE8以前的浏览器版本,请更新IE浏览器或使用其它浏览器!");if(u.isIE8&&u.polyfill!==!0)throw alert("IE8浏览器中使用uui 必须在u.js之前引入u-polyfill.js!"),new Error("IE8浏览器中使用uui 必须在uui之前引入u-polyfill.js!");window.iweb={},window.iweb.Core=u.core,window.iweb.browser={isIE:u.isIE,isFF:u.isFF,isOpera:u.isOpera,isChrome:u.isChrome,isSafari:u.isSafari,isWebkit:u.isWebkit,isIE8_BEFORE:u.isIE8_BEFORE,isIE8:u.isIE8,isIE8_CORE:u.isIE8_CORE,isIE9:u.isIE9,isIE9_CORE:u.isIE9_CORE,isIE10:u.isIE10,isIE10_ABOVE:u.isIE10_ABOVE,isIE11:u.isIE11,isIOS:u.isIOS,isIphone:u.isIphone,isIPAD:u.isIPAD,isStandard:u.isStandard,version:0},NodeList.prototype.forEach=Array.prototype.forEach,String.prototype.lengthb=function(){var e=this.replace(/[^\x00-\xff]/g,"**");return e.length},String.prototype.replaceAll=function(e,t){var n=new RegExp(e,"g");return this.replace(n,t)};var XmlHttp={get:"get",post:"post",reqCount:4,createXhr:function(){var e=null;return e=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},ajax:function(e){var t=e.url,n=e.success,i=void 0==e.async?!0:e.async,r=e.error,a=e.data,s=(void 0==e.type?XmlHttp.post:e.type).toLowerCase();t=XmlHttp.serializeUrl(t),a=XmlHttp.serializeParams(a),s==XmlHttp.get&&null!=a&&(t+="&"+a,a=null);var o=XmlHttp.createXhr();o.open(s,t,i),s==XmlHttp.post&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8");var u=0;i?(o.onreadystatechange=function(){u++,u==XmlHttp.reqCount&&XmlHttp.execBack(o,n,r)},o.send(a)):(o.send(a),XmlHttp.execBack(o,n,r))},execBack:function(e,t,n){if(4!=e.readyState||200!=e.status&&304!=e.status)if(n)n(e.responseText,e.status,e);else{var i="no error callback function!";e.responseText&&(i=e.responseText),alert(i)}else t(e.responseText,e.status,e)},serializeUrl:function(e){var t="cache="+Math.random();return e+=e.indexOf("?")>0?"&"+t:"?"+t},serializeParams:function(e){var t=void 0;if(t==e||null==e||""==e)return null;if(e.constructor==Object){var n="";for(var i in e)n+=i+"="+e[i]+"&";return n.substring(0,n.length-1)}return e}};u.ajax=XmlHttp.ajax;var Class=function(e){return this instanceof Class||!isFunction(e)?void 0:classify(e)};Class.create=function(e,t){function n(){e.apply(this,arguments),this.constructor===n&&this.initialize&&this.initialize.apply(this,arguments)}return isFunction(e)||(t=e,e=null),t||(t={}),e||(e=t.Extends||Class),t.Extends=e,e!==Class&&mix(n,e,e.StaticsWhiteList),implement.call(n,t),classify(n)},Class.extend=function(e){return e||(e={}),e.Extends=this,Class.create(e)},Class.Mutators={Extends:function(e){var t=this.prototype,n=createProto(e.prototype);mix(n,t),n.constructor=this,this.prototype=n,this.superclass=e.prototype},Implements:function(e){isArray(e)||(e=[e]);for(var t,n=this.prototype;t=e.shift();)mix(n,t.prototype||t)},Statics:function(e){mix(this,e)}};var createProto=Object.__proto__?function(e){return{__proto__:e}}:function(e){return Ctor.prototype=e,new Ctor},toString=Object.prototype.toString,isArray=Array.isArray||function(e){return"[object Array]"===toString.call(e)},isFunction=function(e){return"[object Function]"===toString.call(e)},indexOf=Array.prototype.indexOf?function(e,t){return e.indexOf(t)}:function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1};u.Class=Class;var CompMgr={plugs:{},dataAdapters:{},registeredControls:[],createdControls:[],apply:function(e){if(e)var t=e.el||document.body,n=e.model;"string"==typeof t&&(t=document.body.querySelector(t)),(null==t||"object"!=typeof t)&&(t=document.body);var i=t.querySelectorAll("[u-meta]");i.forEach(function(e){if(!e.comp){var t=JSON.parse(e.getAttribute("u-meta"));if(t&&t.type){var i=CompMgr.createDataAdapter({el:e,options:t,model:n});i&&(e.adpt=i)}}})},addPlug:function(e){var t=e.plug,n=e.name;if(this.plugs||(this.plugs={}),this.plugs[n])throw new Error("plug has exist:"+n);t.compType=n,this.plugs[n]=t},addDataAdapter:function(e){var t=e.adapter,n=e.name;if(this.dataAdapters||(dataAdapters={}),this.dataAdapters[n])throw new Error("dataAdapter has exist:"+n);this.dataAdapters[n]=t},getDataAdapter:function(e){return e?(this.dataAdapters||(dataAdapters={}),this.dataAdapters[e]):void 0},createDataAdapter:function(e){var t=e.options,n=t.type,i=this.dataAdapters[n];if(!i)return null;var r=new i(e);return r.type=n,r},_createComp:function(e){var t=e.options,n=t.type,i=this.plugs[n];if(!i)return null;var r=new i(e);return r.type=n,r},regComp:function(e){for(var t={classConstructor:e.comp,className:e.compAsString||e.compAsString,cssClass:e.css||e.css,callbacks:[]},n=0;n<this.registeredControls.length;n++){var i=this.registeredControls[n];if(i.cssClass===t.cssClass)throw new Error("The provided cssClass has already been registered: "+i.cssClass);if(i.className===t.className)throw new Error("The provided className has already been registered")}this.registeredControls.push(t)},updateComp:function(e){for(var t=0;t<this.registeredControls.length;t++)_upgradeDomInternal(this.registeredControls[t].className,null,e)}};if(u.compMgr=CompMgr,u.on(window,"load",function(){"use strict";u.compMgr.updateComp()}),window.i18n){var scriptPath=getCurrentJsPath(),_temp=scriptPath.substr(0,scriptPath.lastIndexOf("/")),__FOLDER__=_temp.substr(0,_temp.lastIndexOf("/"));u.uuii18n=u.extend({},window.i18n),u.uuii18n.init({postAsync:!1,getAsync:!1,fallbackLng:!1,ns:{namespaces:["uui-trans"]},resGetPath:__FOLDER__+"/locales/__lng__/__ns__.json"})}window.trans=u.trans=function(e,t){return u.uuii18n?u.uuii18n.t("uui-trans:"+e):t},"undefined"==typeof u.RSAUtils&&(u.RSAUtils={});var RSAUtils=u.RSAUtils,biRadixBase=2,biRadixBits=16,bitsPerDigit=biRadixBits,biRadix=65536,biHalfRadix=biRadix>>>1,biRadixSquared=biRadix*biRadix,maxDigitVal=biRadix-1,maxInteger=9999999999999998,maxDigits,ZERO_ARRAY,bigZero,bigOne,BigInt=u.BigInt=function(e){"boolean"==typeof e&&1==e?this.digits=null:this.digits=ZERO_ARRAY.slice(0),this.isNeg=!1};RSAUtils.setMaxDigits=function(e){maxDigits=e,ZERO_ARRAY=new Array(maxDigits);for(var t=0;t<ZERO_ARRAY.length;t++)ZERO_ARRAY[t]=0;bigZero=new BigInt,bigOne=new BigInt,bigOne.digits[0]=1},RSAUtils.setMaxDigits(20);var dpl10=15;RSAUtils.biFromNumber=function(e){var t=new BigInt;t.isNeg=0>e,e=Math.abs(e);for(var n=0;e>0;)t.digits[n++]=e&maxDigitVal,e=Math.floor(e/biRadix);return t};var lr10=RSAUtils.biFromNumber(1e15);RSAUtils.biFromDecimal=function(e){for(var t,n="-"==e.charAt(0),i=n?1:0;i<e.length&&"0"==e.charAt(i);)++i;if(i==e.length)t=new BigInt;else{var r=e.length-i,a=r%dpl10;for(0==a&&(a=dpl10),t=RSAUtils.biFromNumber(Number(e.substr(i,a))),i+=a;i<e.length;)t=RSAUtils.biAdd(RSAUtils.biMultiply(t,lr10),RSAUtils.biFromNumber(Number(e.substr(i,dpl10)))),i+=dpl10;t.isNeg=n}return t},RSAUtils.biCopy=function(e){var t=new BigInt(!0);return t.digits=e.digits.slice(0),t.isNeg=e.isNeg,t},RSAUtils.reverseStr=function(e){for(var t="",n=e.length-1;n>-1;--n)t+=e.charAt(n);return t};var hexatrigesimalToChar=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];RSAUtils.biToString=function(e,t){var n=new BigInt;n.digits[0]=t;for(var i=RSAUtils.biDivideModulo(e,n),r=hexatrigesimalToChar[i[1].digits[0]];1==RSAUtils.biCompare(i[0],bigZero);)i=RSAUtils.biDivideModulo(i[0],n),digit=i[1].digits[0],r+=hexatrigesimalToChar[i[1].digits[0]];return(e.isNeg?"-":"")+RSAUtils.reverseStr(r)},RSAUtils.biToDecimal=function(e){var t=new BigInt;t.digits[0]=10;for(var n=RSAUtils.biDivideModulo(e,t),i=String(n[1].digits[0]);1==RSAUtils.biCompare(n[0],bigZero);)n=RSAUtils.biDivideModulo(n[0],t),i+=String(n[1].digits[0]);return(e.isNeg?"-":"")+RSAUtils.reverseStr(i)};var hexToChar=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];RSAUtils.digitToHex=function(e){for(var t=15,n="",i=0;4>i;++i)n+=hexToChar[e&t],e>>>=4;return RSAUtils.reverseStr(n)},RSAUtils.biToHex=function(e){for(var t="",n=(RSAUtils.biHighIndex(e),RSAUtils.biHighIndex(e));n>-1;--n)t+=RSAUtils.digitToHex(e.digits[n]);return t},RSAUtils.charToHex=function(e){var t,n=48,i=n+9,r=97,a=r+25,s=65,o=90;return t=e>=n&&i>=e?e-n:e>=s&&o>=e?10+e-s:e>=r&&a>=e?10+e-r:0},RSAUtils.hexToDigit=function(e){for(var t=0,n=Math.min(e.length,4),i=0;n>i;++i)t<<=4,t|=RSAUtils.charToHex(e.charCodeAt(i));return t},RSAUtils.biFromHex=function(e){for(var t=new BigInt,n=e.length,i=n,r=0;i>0;i-=4,++r)t.digits[r]=RSAUtils.hexToDigit(e.substr(Math.max(i-4,0),Math.min(i,4)));return t},RSAUtils.biFromString=function(e,t){var n="-"==e.charAt(0),i=n?1:0,r=new BigInt,a=new BigInt;a.digits[0]=1;for(var s=e.length-1;s>=i;s--){var o=e.charCodeAt(s),u=RSAUtils.charToHex(o),l=RSAUtils.biMultiplyDigit(a,u);r=RSAUtils.biAdd(r,l),a=RSAUtils.biMultiplyDigit(a,t)}return r.isNeg=n,r},RSAUtils.biDump=function(e){return(e.isNeg?"-":"")+e.digits.join(" ")},RSAUtils.biAdd=function(e,t){var n;if(e.isNeg!=t.isNeg)t.isNeg=!t.isNeg,n=RSAUtils.biSubtract(e,t),t.isNeg=!t.isNeg;else{n=new BigInt;for(var i,r=0,a=0;a<e.digits.length;++a)i=e.digits[a]+t.digits[a]+r,n.digits[a]=i%biRadix,r=Number(i>=biRadix);n.isNeg=e.isNeg}return n},RSAUtils.biSubtract=function(e,t){var n;if(e.isNeg!=t.isNeg)t.isNeg=!t.isNeg,n=RSAUtils.biAdd(e,t),t.isNeg=!t.isNeg;else{n=new BigInt;var i,r;r=0;for(var a=0;a<e.digits.length;++a)i=e.digits[a]-t.digits[a]+r,n.digits[a]=i%biRadix,n.digits[a]<0&&(n.digits[a]+=biRadix),r=0-Number(0>i);if(-1==r){r=0;for(var a=0;a<e.digits.length;++a)i=0-n.digits[a]+r,n.digits[a]=i%biRadix,n.digits[a]<0&&(n.digits[a]+=biRadix),r=0-Number(0>i);n.isNeg=!e.isNeg}else n.isNeg=e.isNeg}return n},RSAUtils.biHighIndex=function(e){for(var t=e.digits.length-1;t>0&&0==e.digits[t];)--t;return t},RSAUtils.biNumBits=function(e){var t,n=RSAUtils.biHighIndex(e),i=e.digits[n],r=(n+1)*bitsPerDigit;for(t=r;t>r-bitsPerDigit&&0==(32768&i);--t)i<<=1;return t},RSAUtils.biMultiply=function(e,t){for(var n,i,r,a=new BigInt,s=RSAUtils.biHighIndex(e),o=RSAUtils.biHighIndex(t),u=0;o>=u;++u){n=0,r=u;for(var l=0;s>=l;++l,++r)i=a.digits[r]+e.digits[l]*t.digits[u]+n,a.digits[r]=i&maxDigitVal,n=i>>>biRadixBits;a.digits[u+s+1]=n}return a.isNeg=e.isNeg!=t.isNeg,a},RSAUtils.biMultiplyDigit=function(e,t){var n,i,r,a=new BigInt;n=RSAUtils.biHighIndex(e),i=0;for(var s=0;n>=s;++s)r=a.digits[s]+e.digits[s]*t+i,a.digits[s]=r&maxDigitVal,i=r>>>biRadixBits;return a.digits[1+n]=i,a},RSAUtils.arrayCopy=function(e,t,n,i,r){for(var a=Math.min(t+r,e.length),s=t,o=i;a>s;++s,++o)n[o]=e[s]};var highBitMasks=[0,32768,49152,57344,61440,63488,64512,65024,65280,65408,65472,65504,65520,65528,65532,65534,65535];RSAUtils.biShiftLeft=function(e,t){var n=Math.floor(t/bitsPerDigit),i=new BigInt;RSAUtils.arrayCopy(e.digits,0,i.digits,n,i.digits.length-n);for(var r=t%bitsPerDigit,a=bitsPerDigit-r,s=i.digits.length-1,o=s-1;s>0;--s,--o)i.digits[s]=i.digits[s]<<r&maxDigitVal|(i.digits[o]&highBitMasks[r])>>>a;return i.digits[0]=i.digits[s]<<r&maxDigitVal,i.isNeg=e.isNeg,i};var lowBitMasks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];RSAUtils.biShiftRight=function(e,t){var n=Math.floor(t/bitsPerDigit),i=new BigInt;RSAUtils.arrayCopy(e.digits,n,i.digits,0,e.digits.length-n);for(var r=t%bitsPerDigit,a=bitsPerDigit-r,s=0,o=s+1;s<i.digits.length-1;++s,++o)i.digits[s]=i.digits[s]>>>r|(i.digits[o]&lowBitMasks[r])<<a;return i.digits[i.digits.length-1]>>>=r,i.isNeg=e.isNeg,i},RSAUtils.biMultiplyByRadixPower=function(e,t){var n=new BigInt;return RSAUtils.arrayCopy(e.digits,0,n.digits,t,n.digits.length-t),n},RSAUtils.biDivideByRadixPower=function(e,t){var n=new BigInt;return RSAUtils.arrayCopy(e.digits,t,n.digits,0,n.digits.length-t),n},RSAUtils.biModuloByRadixPower=function(e,t){var n=new BigInt;return RSAUtils.arrayCopy(e.digits,0,n.digits,0,t),n},RSAUtils.biCompare=function(e,t){if(e.isNeg!=t.isNeg)return 1-2*Number(e.isNeg);for(var n=e.digits.length-1;n>=0;--n)if(e.digits[n]!=t.digits[n])return e.isNeg?1-2*Number(e.digits[n]>t.digits[n]):1-2*Number(e.digits[n]<t.digits[n]);return 0},RSAUtils.biDivideModulo=function(e,t){var n,i,r=RSAUtils.biNumBits(e),a=RSAUtils.biNumBits(t),s=t.isNeg;if(a>r)return e.isNeg?(n=RSAUtils.biCopy(bigOne),n.isNeg=!t.isNeg,e.isNeg=!1,t.isNeg=!1,i=biSubtract(t,e),e.isNeg=!0,t.isNeg=s):(n=new BigInt,i=RSAUtils.biCopy(e)),[n,i];n=new BigInt,i=e;for(var o=Math.ceil(a/bitsPerDigit)-1,u=0;t.digits[o]<biHalfRadix;)t=RSAUtils.biShiftLeft(t,1),++u,++a,o=Math.ceil(a/bitsPerDigit)-1;i=RSAUtils.biShiftLeft(i,u),r+=u;for(var l=Math.ceil(r/bitsPerDigit)-1,d=RSAUtils.biMultiplyByRadixPower(t,l-o);-1!=RSAUtils.biCompare(i,d);)++n.digits[l-o],i=RSAUtils.biSubtract(i,d);for(var c=l;c>o;--c){var f=c>=i.digits.length?0:i.digits[c],p=c-1>=i.digits.length?0:i.digits[c-1],h=c-2>=i.digits.length?0:i.digits[c-2],m=o>=t.digits.length?0:t.digits[o],g=o-1>=t.digits.length?0:t.digits[o-1];f==m?n.digits[c-o-1]=maxDigitVal:n.digits[c-o-1]=Math.floor((f*biRadix+p)/m);for(var v=n.digits[c-o-1]*(m*biRadix+g),b=f*biRadixSquared+(p*biRadix+h);v>b;)--n.digits[c-o-1],v=n.digits[c-o-1]*(m*biRadix|g),b=f*biRadix*biRadix+(p*biRadix+h);d=RSAUtils.biMultiplyByRadixPower(t,c-o-1),i=RSAUtils.biSubtract(i,RSAUtils.biMultiplyDigit(d,n.digits[c-o-1])),i.isNeg&&(i=RSAUtils.biAdd(i,d),--n.digits[c-o-1])}return i=RSAUtils.biShiftRight(i,u),n.isNeg=e.isNeg!=s,e.isNeg&&(n=s?RSAUtils.biAdd(n,bigOne):RSAUtils.biSubtract(n,bigOne),t=RSAUtils.biShiftRight(t,u),i=RSAUtils.biSubtract(t,i)),0==i.digits[0]&&0==RSAUtils.biHighIndex(i)&&(i.isNeg=!1),[n,i]},RSAUtils.biDivide=function(e,t){return RSAUtils.biDivideModulo(e,t)[0]},RSAUtils.biModulo=function(e,t){return RSAUtils.biDivideModulo(e,t)[1]},RSAUtils.biMultiplyMod=function(e,t,n){return RSAUtils.biModulo(RSAUtils.biMultiply(e,t),n)},RSAUtils.biPow=function(e,t){for(var n=bigOne,i=e;;){if(0!=(1&t)&&(n=RSAUtils.biMultiply(n,i)),t>>=1,0==t)break;i=RSAUtils.biMultiply(i,i)}return n},RSAUtils.biPowMod=function(e,t,n){for(var i=bigOne,r=e,a=t;;){if(0!=(1&a.digits[0])&&(i=RSAUtils.biMultiplyMod(i,r,n)),a=RSAUtils.biShiftRight(a,1),0==a.digits[0]&&0==RSAUtils.biHighIndex(a))break;r=RSAUtils.biMultiplyMod(r,r,n)}return i},u.BarrettMu=function(e){this.modulus=RSAUtils.biCopy(e),this.k=RSAUtils.biHighIndex(this.modulus)+1;var t=new BigInt;t.digits[2*this.k]=1,this.mu=RSAUtils.biDivide(t,this.modulus),this.bkplus1=new BigInt,this.bkplus1.digits[this.k+1]=1,this.modulo=BarrettMu_modulo,this.multiplyMod=BarrettMu_multiplyMod,this.powMod=BarrettMu_powMod};var RSAKeyPair=function(e,t,n){var i=RSAUtils;this.e=i.biFromHex(e),this.d=i.biFromHex(t),this.m=i.biFromHex(n),this.chunkSize=2*i.biHighIndex(this.m),this.radix=16,this.barrett=new u.BarrettMu(this.m)};RSAUtils.getKeyPair=function(e,t,n){return new RSAKeyPair(e,t,n)},"undefined"==typeof u.twoDigit&&(u.twoDigit=function(e){return(10>e?"0":"")+String(e)}),RSAUtils._encryptedString=function(e,t){for(var n=[],i=t.length,r=0;i>r;)n[r]=t.charCodeAt(r),r++;for(;n.length%e.chunkSize!=0;)n[r++]=0;var a,s,o,u=n.length,l="";for(r=0;u>r;r+=e.chunkSize){for(o=new BigInt,a=0,s=r;s<r+e.chunkSize;++a,s++)o.digits[a]=n[s],o.digits[a]+=n[s]<<8;var d=e.barrett.powMod(o,e.e),c=16==e.radix?RSAUtils.biToHex(d):RSAUtils.biToString(d,e.radix);l+=c+" "}return l.substring(0,l.length-1)},RSAUtils._decryptedString=function(e,t){var n,i,r,a=t.split(" "),s="";for(n=0;n<a.length;++n){var o;for(o=16==e.radix?RSAUtils.biFromHex(a[n]):RSAUtils.biFromString(a[n],e.radix),r=e.barrett.powMod(o,e.d),i=0;i<=RSAUtils.biHighIndex(r);++i)s+=String.fromCharCode(255&r.digits[i],r.digits[i]>>8)}return 0==s.charCodeAt(s.length-1)&&(s=s.substring(0,s.length-1)),s},RSAUtils.setMaxDigits(130),RSAUtils.encryptedString=function(e){var t=e.text;if(e.exponent&&e.modulus){var n=RSAUtils.getKeyPair(e.exponent,"",e.modulus);t=RSAUtils._encryptedString(n,e.text)}return t},RSAUtils.decryptedString=function(e){var t=e.text;if(e.exponent&&e.modulus){var n=RSAUtils.getKeyPair("",e.exponent,e.modulus);t=RSAUtils._decryptedString(n,e.text)}return t},AbstractMasker.prototype.format=function(e){if(null==e)return null;var t=this.formatArgument(e);return this.innerFormat(t)},AbstractMasker.prototype.formatArgument=function(e){},AbstractMasker.prototype.innerFormat=function(e){},AbstractSplitMasker.prototype=new AbstractMasker,AbstractSplitMasker.prototype.elements=new Array,AbstractSplitMasker.prototype.format=function(e){if(null==e)return null;var t=this.formatArgument(e);return this.innerFormat(t)},AbstractSplitMasker.prototype.formatArgument=function(e){return e},AbstractSplitMasker.prototype.innerFormat=function(e){if(null==e||""==e)return new FormatResult(e);this.doSplit();var t="";return t=this.getElementsValue(this.elements,e),new FormatResult(t)},AbstractSplitMasker.prototype.getElementsValue=function(e,t){var n="";if(e instanceof Array)for(var i=0;i<e.length;i++)n+=this.getElementsValue(e[i],t);else e.getValue&&(n=e.getValue(t));return n},AbstractSplitMasker.prototype.getExpress=function(){},AbstractSplitMasker.prototype.doSplit=function(){var e=this.getExpress();(null==this.elements||0==this.elements.length)&&(this.elements=this.doQuotation(e,this.getSeperators(),this.getReplaceds(),0))},AbstractSplitMasker.prototype.doQuotation=function(e,t,n,i){if(0==e.length)return null;var r,a=new Array,s=new RegExp('".*?"',"g"),o=0;do if(r=s.exec(e),null!=r){var u=r.index,l=s.lastIndex;if(u!=l&&u>o){var d=this.doSeperator(e.substring(o,u),t,n,i);null!=d&&d.length>0&&a.push(d)}a.push(new StringElement(e.substring(u+1,l-1))),o=l}while(null!=r);if(o<e.length){var d=this.doSeperator(e.substring(o,e.length),t,n,i);null!=d&&d.length>0&&a.push(d)}return a},AbstractSplitMasker.prototype.doSeperator=function(e,t,n,i){if(i>=t.length){var r=new Array;return r.push(this.getVarElement(e)),r}if(0==e.length)return null;var a,s=0,r=new Array,o=new RegExp(t[i],"g");do if(a=o.exec(e),null!=a){var u=a.index,l=o.lastIndex;if(u!=l){if(u>s){var d=this.doSeperator(e.substring(s,u),t,n,i+1);null!=d&&d.length>0&&r.push(d)}null!=n[i]?r.push(new StringElement(n[i])):r.push(new StringElement(e.substring(u,l))),s=l}}while(null!=a);if(s<e.length){var d=this.doSeperator(e.substring(s,e.length),t,n,i+1);null!=d&&d.length>0&&r.push(d)}return r},AddressMasker.prototype=new AbstractSplitMasker,AddressMasker.prototype.update=function(e){this.formatMeta=u.extend({},AddressMasker.DefaultFormatMeta,e)},AddressMasker.prototype.getExpress=function(){return this.formatMeta.express},AddressMasker.prototype.getReplaceds=function(){return[this.formatMeta.separator]},AddressMasker.prototype.getSeperators=function(){return["(\\s)+?"]},AddressMasker.prototype.getVarElement=function(e){var t={};return"C"==e&&(t.getValue=function(e){return e.country}),"S"==e&&(t.getValue=function(e){return e.state}),"T"==e&&(t.getValue=function(e){return e.city}),"D"==e&&(t.getValue=function(e){return e.section}),"R"==e&&(t.getValue=function(e){return e.road}),"P"==e&&(t.getValue=function(e){return e.postcode}),void 0==typeof t.getValue?new StringElement(e):t},AddressMasker.prototype.formatArgument=function(e){return e},NumberMasker.prototype=new AbstractMasker,NumberMasker.prototype.formatMeta=null,NumberMasker.prototype.update=function(e){this.formatMeta=u.extend({},NumberMasker.DefaultFormatMeta,e)},NumberMasker.prototype.innerFormat=function(e){var t,n,i,r;t=e.value,t>0?(n=this.formatMeta.positiveFormat,r=t+""):0>t?(n=this.formatMeta.negativeFormat,r=(t+"").substr(1,(t+"").length-1)):(n=this.formatMeta.positiveFormat,r=t+""),i=r.indexOf("."),r=this.setTheSeperator(r,i),r=this.setTheMark(r,i);var a=null;return 0>t&&this.formatMeta.isNegRed&&(a="FF0000"),new FormatResult(n.replaceAll("n",r),a)},NumberMasker.prototype.setTheMark=function(e,t){var n,i,r;if(!this.formatMeta.isMarkEnable)return e;for(0>=t&&(t=e.length),i=e.charCodeAt(0),n=0,45==i&&(n=1),r=t-3;r>n;)e=e.substr(0,r-0)+this.formatMeta.markSymbol+e.substr(r,e.length-r),r-=3;return e},NumberMasker.prototype.setTheSeperator=function(e,t){var n;return t>0&&(n=NumberMasker.toCharArray(e),n[t]=this.formatMeta.pointSymbol,e=n.join("")),e},NumberMasker.toCharArray=function(e){for(var e=e.split(""),t=new Array,n=0;n<e.length;n++)t.push(e[n]);return t},NumberMasker.prototype.formatArgument=function(e){var t={};return t.value=e,t},CurrencyMasker.prototype=new NumberMasker,CurrencyMasker.prototype.formatMeta=null,CurrencyMasker.prototype.update=function(e){this.formatMeta=u.extend({},CurrencyMasker.DefaultFormatMeta,e)},CurrencyMasker.prototype.innerFormat=function(e){if(!e.value)return{value:""};var t=new NumberMasker(this.formatMeta).innerFormat(e);return t.value=this.formatMeta.curSymbol+t.value,t},DateTimeMasker.prototype=new AbstractSplitMasker,DateTimeMasker.prototype.formatMeta=null,DateTimeMasker.prototype.update=function(e){this.formatMeta=u.extend({},DateTimeMasker.DefaultFormatMeta,e)},DateTimeMasker.enShortMonth=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],DateTimeMasker.enLongMonth=["January","February","March","April","May","June","July","August","September","October","November","December"],DateTimeMasker.prototype.doOne=function(e){if(0==e.length)return"";var t=new Object;return"yyyy"==e.toLowerCase()&&(t.getValue=function(e){return DateTimeMasker.getyyyy(e); }),"yy"==e.toLowerCase()&&(t.getValue=function(e){return DateTimeMasker.getyy(e)}),"MMMM"==e&&(t.getValue=function(e){return DateTimeMasker.getMMMM(e)}),"MMM"==e&&(t.getValue=function(e){return DateTimeMasker.getMMM(e)}),"MM"==e&&(t.getValue=function(e){return DateTimeMasker.getMM(e)}),"M"==e&&(t.getValue=function(e){return DateTimeMasker.getM(e)}),"dd"==e.toLowerCase()&&(t.getValue=function(e){return DateTimeMasker.getdd(e)}),"d"==e.toLowerCase()&&(t.getValue=function(e){return DateTimeMasker.getd(e)}),"hh"==e&&(t.getValue=function(e){return DateTimeMasker.gethh(e)}),"h"==e&&(t.getValue=function(e){return DateTimeMasker.geth(e)}),"mm"==e&&(t.getValue=function(e){return DateTimeMasker.getmm(e)}),"m"==e&&(t.getValue=function(e){return DateTimeMasker.getm(e)}),"ss"==e&&(t.getValue=function(e){return DateTimeMasker.getss(e)}),"s"==e&&(t.getValue=function(e){return DateTimeMasker.gets(e)}),"HH"==e&&(t.getValue=function(e){return DateTimeMasker.getHH(e)}),"H"==e&&(t.getValue=function(e){return DateTimeMasker.getH(e)}),"t"==e&&(t.getValue=function(e){return DateTimeMasker.gett(e)}),"st"==e&&(t.getValue=function(e){return DateTimeMasker.gets(e)+DateTimeMasker.gett(e)}),"mt"==e&&(t.getValue=function(e){return DateTimeMasker.getm(e)+DateTimeMasker.gett(e)}),"yyyyMMdd"==e&&(t.getValue=function(e){return DateTimeMasker.getyyyy(e)+DateTimeMasker.getMM(e)+DateTimeMasker.getdd(e)}),"undefined"==typeof t.getValue&&(t.getValue=function(e){return DateTimeMasker.getyyyy(e)+"-"+DateTimeMasker.getMM(e)+"-"+DateTimeMasker.getdd(e)}),t},DateTimeMasker.getyyyy=function(e){return e.getFullYear()},DateTimeMasker.getyy=function(e){return(""+e.getFullYear()).substring(2)},DateTimeMasker.getM=function(e){return""+(e.getMonth()+1)},DateTimeMasker.getMM=function(e){var t=e.getMonth()+1;return 10>t?"0"+t:t},DateTimeMasker.getMMM=function(e){return this.enShortMonth[e.getMonth()]},DateTimeMasker.getMMMM=function(e){return this.enLongMonth[e.getMonth()]},DateTimeMasker.getdd=function(e){var t=e.getDate();return 10>t?"0"+t:e.getDate()+""},DateTimeMasker.getd=function(e){return e.getDate()+""},DateTimeMasker.gethh=function(e){var t=e.getHours();return 10>t?"0"+t:e.getHours()+""},DateTimeMasker.geth=function(e){return e.getHours()+""},DateTimeMasker.getHH=function(e){var t=e.getHours();return t>=12&&(t-=12),10>t?"0"+t:t+""},DateTimeMasker.getH=function(e){var t=e.getHours();return t>=12&&(t-=12),t+""},DateTimeMasker.getmm=function(e){var t=e.getMinutes();return 10>t?"0"+t:e.getMinutes()+""},DateTimeMasker.getm=function(e){return""+e.getMinutes()},DateTimeMasker.getss=function(e){var t=e.getSeconds();return 10>t?"0"+t:t+""},DateTimeMasker.gets=function(e){return e.getSeconds()+""},DateTimeMasker.gett=function(e){var t=e.getHours();return 12>=t?"AM":"PM"},DateTimeMasker.prototype.getExpress=function(){return this.formatMeta.format},DateTimeMasker.prototype.getReplaceds=function(){return[" ",this.formatMeta.speratorSymbol,":"]},DateTimeMasker.prototype.getSeperators=function(){return["(\\s)+?","-",":"]},DateTimeMasker.prototype.getVarElement=function(e){return this.doOne(e)},DateTimeMasker.prototype.formatArgument=function(e){if(0==e)return"";if(null==e||""==e)return e;if("string"==typeof e){var t=e.split(" "),n=new Date;if(t.length>0)if(t[0].indexOf("-")>0){var i=t[0].split("-");if(n.setDate(1),n.setFullYear(parseInt(i[0],10)),n.setMonth(parseInt(i[1],10)-1),n.setDate(parseInt(i[2],10)),2==t.length&&void 0!=t[1]){var r=t[1].split(":");n.setHours(parseInt(r[0],10)),n.setMinutes(parseInt(r[1],10)),n.setSeconds(parseInt(r[2],10)),r.length>3&&n.setMilliseconds(parseInt(r[3],10))}}else{var r=t[0].split(":");n.setHours(parseInt(r[0],10)),n.setMinutes(parseInt(r[1],10)),n.setSeconds(parseInt(r[2],10)),r.length>3&&n.setMilliseconds(parseInt(r[3],10))}return n}return e},DateMasker.prototype=new DateTimeMasker,DateMasker.DefaultFormatMeta=u.extend({},DateTimeMasker.DefaultFormatMeta,{format:"yyyy-MM-dd"}),DateMasker.prototype.update=function(e){this.formatMeta=u.extend({},DateMasker.DefaultFormatMeta,e)},TimeMasker.prototype=new DateTimeMasker,TimeMasker.DefaultFormatMeta=u.extend({},DateTimeMasker.DefaultFormatMeta,{format:"hh:mm:ss"}),TimeMasker.prototype.update=function(e){this.formatMeta=u.extend({},TimeMasker.DefaultFormatMeta,e)},PercentMasker.prototype=new AbstractMasker,PercentMasker.prototype.formatArgument=function(e){return e},PercentMasker.prototype.innerFormat=function(e){var t="";if(""!=e){var n=String(e),i=n.length-n.indexOf(".")-1,r=i-2;0>r&&(r=0),t=100*parseFloat(e),t=(t*Math.pow(10,r)/Math.pow(10,r)).toFixed(r),t+="%"}return{value:t}},StringElement.prototype=new Object,StringElement.prototype.value="",StringElement.prototype.getValue=function(e){return this.value},FormatResult.prototype=new Object,NumberMasker.DefaultFormatMeta={isNegRed:!0,isMarkEnable:!0,markSymbol:",",pointSymbol:".",positiveFormat:"n",negativeFormat:"-n"},CurrencyMasker.DefaultFormatMeta=u.extend({},NumberMasker.DefaultFormatMeta,{positiveFormat:"n",negativeFormat:"-n"}),AddressMasker.defaultFormatMeta={express:"C S T R P",separator:" "},DateTimeMasker.DefaultFormatMeta={format:"yyyy-MM-dd hh:mm:ss",speratorSymbol:"-"},u.AddressMasker=AddressMasker,u.NumberMasker=NumberMasker,u.CurrencyMasker=CurrencyMasker,u.DateTimeMasker=DateTimeMasker,u.DateMasker=DateMasker,u.TimeMasker=TimeMasker,u.PercentMasker=PercentMasker,NumberFormater.prototype.update=function(e){this.precision=e},NumberFormater.prototype.format=function(e){if(!u.isNumber(e))return"";for(;"0"==(e+"").charAt(0)&&e.length>1;)e=e.substring(1);var t=e;if(u.isNumber(this.precision)){if(window.BigNumber)t=new BigNumber(e).toFixed(this.precision);else{var n=parseFloat(e);t=(Math.round(n*Math.pow(10,this.precision))/Math.pow(10,this.precision)).toFixed(this.precision)}if("NaN"==t)return""}return t},DateFormater.prototype.update=function(e){this.pattern=e},DateFormater.prototype.format=function(e){return moment(e).format(this.pattern)},u.NumberFormater=NumberFormater,u.DateFormater=DateFormater,u.date={_dateLocale:{"zh-CN":{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_")},"en-US":{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thurday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"S_M_T_W_T_F_S".split("_")}},_formattingTokens:/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYY|YY|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,leftZeroFill:function(e,t,n){for(var i=""+Math.abs(e),r=e>=0;i.length<t;)i="0"+i;return(r?n?"+":"":"-")+i},_formats:{YY:function(e){return u.date.leftZeroFill(e.getFullYear()%100,2)},YYYY:function(e){return e.getFullYear()},M:function(e){return e.getMonth()+1},MM:function(e){var t=u.date._formats.M(e);return u.date.leftZeroFill(t,2)},MMM:function(e,t){var n=e.getMonth();return u.date._dateLocale[t].monthsShort[n]},MMMM:function(e,t){var n=e.getMonth();return u.date._dateLocale[t].months[n]},D:function(e){return e.getDate()},DD:function(e){var t=u.date._formats.D(e);return u.date.leftZeroFill(t,2)},d:function(e){return e.getDay()},dd:function(e,t){var n=u.date._formats.d(e);return u.date._dateLocale[t].weekdaysMin[n]},ddd:function(e,t){var n=u.date._formats.d(e);return u.date._dateLocale[t].weekdaysShort[n]},dddd:function(e,t){var n=u.date._formats.d(e);return u.date._dateLocale[t].weekdays[n]},a:function(e){return e.getHours()>12?"pm":"am"},h:function(e){var t=e.getHours();return t=t>12?t-12:t},hh:function(e){var t=u.date._formats.h(e);return u.date.leftZeroFill(t,2)},H:function(e){return e.getHours()},HH:function(e){return u.date.leftZeroFill(e.getHours(),2)},m:function(e){return e.getMinutes()},mm:function(e){return u.date.leftZeroFill(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return u.date.leftZeroFill(e.getSeconds(),2)}},format:function(e,t,n){var i,r,a=t.match(u.date._formattingTokens),s="";for(n=n||u.core.getLanguages(),i=0,r=a.length;r>i;i++)s+=u.date._formats[a[i]]?u.date._formats[a[i]](e,n):a[i];return s},_addOrSubtract:function(e,t,n,i){var r=e.getTime(),a=e.getDate(),s=e.getMonth(),o=new Date(e);return"ms"===t?(r+=n*i,o.setTime(r)):"s"==t?(r+=1e3*n*i,o.setTime(r)):"m"==t?(r+=6e4*n*i,o.setTime(r)):"h"==t?(r+=36e5*n*i,o.setTime(r)):"d"==t?(a+=n*i,o.setDate(a)):"w"==t?(a+=7*n*i,o.setDate(a)):"M"==t?(s+=n*i,o.setMonth(a)):"y"==t&&(s+=12*n*i,o.setMonth(a)),o},add:function(e,t,n){return u.date._addOrSubtract(e,t,n,1)},sub:function(e,t,n){return u.date._addOrSubtract(e,t,n,-1)}},u.floatRender=function(e,t){var n=e;if("undefined"==typeof e||null===e)return e;"function"==typeof e&&(n=e());var i=u.Core.getMaskerMeta("float")||{};"number"==typeof t&&(i.precision=t);var r=new $.NumberFormater(i.precision),a=new NumberMasker(i);return a.format(r.format(n)).value},u.integerRender=function(e){var t=e;return"undefined"==typeof e||null===e?e:("function"==typeof e&&(t=e()),t)},u.dateRender=function(e,t){var n=e;if("undefined"==typeof e||null===e)return e;"function"==typeof e&&(n=e());var i=u.Core.getMaskerMeta("date")||{};"undefined"!=typeof t&&(i.format=t);var r=new DateMasker(i);return r.format(n).value},u.dateTimeRender=function(e,t){var n=e;if("undefined"==typeof e||null===e)return e;"function"==typeof e&&(n=e());var i=u.Core.getMaskerMeta("datetime")||{};"undefined"!=typeof t&&(i.format=t);var r=new DateTimeMasker(i);return r.format(n).value},u.timeRender=function(e,t){var n=e;if("undefined"==typeof e||null===e)return e;"function"==typeof e&&(n=e());var i=u.Core.getMaskerMeta("time")||{};"undefined"!=typeof t&&(i.format=t);var r=new TimeMasker(i);return r.format(n).value},u.percentRender=function(e){var t=e;if("undefined"==typeof e||null===e)return e;"function"==typeof e&&(t=e());var n=u.Core.getMaskerMeta("percent")||{},i=new PercentMasker(n);return i.format(t).value},u.dateToUTCString=function(e){if(!e)return"";e.indexOf("-")>-1&&(e=e.replace(/\-/g,"/"));var t=Date.parse(e);return isNaN(t)?"":t};var _hotkeys={};_hotkeys.special_keys={27:"esc",9:"tab",32:"space",13:"enter",8:"backspace",145:"scroll",20:"capslock",144:"numlock",19:"pause",45:"insert",36:"home",46:"del",35:"end",33:"pageup",34:"pagedown",37:"left",38:"up",39:"right",40:"down",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},_hotkeys.shift_nums={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},_hotkeys.add=function(e,t,n){u.isFunction(t)&&(n=t,t={});var i={},r={type:"keydown",propagate:!1,disableInInput:!1,target:document.body,checkParent:!0},a=this;i=u.extend(i,r,t||{}),e=e.toLowerCase();var s=function(e){var t=this;if(t=3==t.nodeType?t.parentNode:t,i.disableInInput){var n=t;if("INPUT"==n.tagName||"TEXTAREA"==n.tagName)return}var r=e.which,s=e.type,o=String.fromCharCode(r).toLowerCase(),u=a.special_keys[r],l=e.shiftKey,d=e.ctrlKey,c=e.altKey,f=null;if(i.checkParent)for(;!t["u.hotkeys"]&&t.parentNode;)t=t.parentNode;var p=t["u.hotkeys"].events[s].callbackMap;if(l||d||c){var h="";c&&(h+="alt+"),d&&(h+="ctrl+"),l&&(h+="shift+"),f=p[h+u]||p[h+o]||p[h+a.shift_nums[o]]}else f=p[u]||p[o];return f&&(f.cb(e),!f.propagate)?(e.stopPropagation(),e.preventDefault(),!1):void 0},o=i.target["u.hotkeys"];return o||(i.target["u.hotkeys"]=o={events:{}}),o.events[i.type]||(o.events[i.type]={callbackMap:{}},u.on(i.target,i.type,s)),o.events[i.type].callbackMap[e]={cb:n,propagate:i.propagate},u.hotkeys},_hotkeys.remove=function(e,t){t=t||{},target=t.target||document.body,type=t.type||"keydown",e=e.toLowerCase(),delete target["u.hotkeys"].events[type].callbackMap[e]},_hotkeys.scan=function(e,t){e=e||document.body,e.querySelectorAll("[u-enter]").forEach(function(n){var i=n.getAttribute("u-enter");if(i)if("#"==i.substring(0,1))u.hotkeys.add("enter",{target:this},function(){var t=e.querySelector(i);t&&t.focus()});else{t=t||window;var r=u.getFunction(t,i);u.hotkeys.add("enter",{target:this},function(){r.call(this)})}}),e.querySelectorAll("[u-hotkey]").forEach(function(e){var t=e.getAttribute("u-hotkey");t&&u.hotkeys.add(t,function(){e.click()})})},u.hotkeys=_hotkeys,+function(){var e=!0;!function(t){var n=this||(0,eval)("this"),i=n.document,r=n.navigator,a=n.jQuery,s=n.JSON;!function(e){if("function"==typeof require&&"object"==typeof exports&&"object"==typeof module){var t=module.exports||exports;e(t,require)}else"function"==typeof define&&define.amd?define(["exports","require"],e):e(n.ko={})}(function(o,u){function l(e,t){var n=null===e||typeof e in g;return n?e===t:!1}function d(e,n){var i;return function(){i||(i=setTimeout(function(){i=t,e()},n))}}function c(e,t){var n;return function(){clearTimeout(n),n=setTimeout(e,t)}}function f(e){var t=this;return e&&m.utils.objectForEach(e,function(e,n){var i=m.extenders[e];"function"==typeof i&&(t=i(t,n)||t)}),t}function p(e){m.bindingHandlers[e]={init:function(t,n,i,r,a){var s=function(){var t={};return t[e]=n(),t};return m.bindingHandlers.event.init.call(this,t,s,i,r,a)}}}function h(e,t,n,i){m.bindingHandlers[e]={init:function(e,r,a,s,o){var u,l;return m.computed(function(){var a=m.utils.unwrapObservable(r()),s=!n!=!a,d=!l,c=d||t||s!==u;c&&(d&&m.computedContext.getDependenciesCount()&&(l=m.utils.cloneNodes(m.virtualElements.childNodes(e),!0)),s?(d||m.virtualElements.setDomNodeChildren(e,m.utils.cloneNodes(l)),m.applyBindingsToDescendants(i?i(o,a):o,e)):m.virtualElements.emptyNode(e),u=s)},null,{disposeWhenNodeIsRemoved:e}),{controlsDescendantBindings:!0}}},m.expressionRewriting.bindingRewriteValidators[e]=!1,m.virtualElements.allowedBindings[e]=!0}var m="undefined"!=typeof o?o:{};n.ko=m,m.exportSymbol=function(e,t){for(var n=e.split("."),i=m,r=0;r<n.length-1;r++)i=i[n[r]];i[n[n.length-1]]=t},m.exportProperty=function(e,t,n){e[t]=n},m.version="3.2.0",m.exportSymbol("version",m.version),m.utils=function(){function e(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])}function o(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function u(e,t){return e.__proto__=t,e}function l(e,t){if("input"!==m.utils.tagNameLower(e)||!e.type)return!1;if("click"!=t.toLowerCase())return!1;var n=e.type;return"checkbox"==n||"radio"==n}var d={__proto__:[]}instanceof Array,c={},f={},p=r&&/Firefox\/2/i.test(r.userAgent)?"KeyboardEvent":"UIEvents";c[p]=["keyup","keydown","keypress"],c.MouseEvents=["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave"],e(c,function(e,t){if(t.length)for(var n=0,i=t.length;i>n;n++)f[t[n]]=e});var h={propertychange:!0},g=i&&function(){for(var e=3,n=i.createElement("div"),r=n.getElementsByTagName("i");n.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->",r[0];);return e>4?e:t}(),v=6===g,b=7===g;return{fieldsIncludedWithJsonPost:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],arrayForEach:function(e,t){for(var n=0,i=e.length;i>n;n++)t(e[n],n)},arrayIndexOf:function(e,t){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(e,t);for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1},arrayFirst:function(e,t,n){for(var i=0,r=e.length;r>i;i++)if(t.call(n,e[i],i))return e[i];return null},arrayRemoveItem:function(e,t){var n=m.utils.arrayIndexOf(e,t);n>0?e.splice(n,1):0===n&&e.shift()},arrayGetDistinctValues:function(e){e=e||[];for(var t=[],n=0,i=e.length;i>n;n++)m.utils.arrayIndexOf(t,e[n])<0&&t.push(e[n]);return t},arrayMap:function(e,t){e=e||[];for(var n=[],i=0,r=e.length;r>i;i++)n.push(t(e[i],i));return n},arrayFilter:function(e,t){e=e||[];for(var n=[],i=0,r=e.length;r>i;i++)t(e[i],i)&&n.push(e[i]);return n},arrayPushAll:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var n=0,i=t.length;i>n;n++)e.push(t[n]);return e},addOrRemoveItem:function(e,t,n){var i=m.utils.arrayIndexOf(m.utils.peekObservable(e),t);0>i?n&&e.push(t):n||e.splice(i,1)},canSetPrototype:d,extend:o,setPrototypeOf:u,setPrototypeOfOrExtend:d?u:o,objectForEach:e,objectMap:function(e,t){if(!e)return e;var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=t(e[i],i,e));return n},emptyDomNode:function(e){for(;e.firstChild;)m.removeNode(e.firstChild)},moveCleanedNodesToContainerElement:function(e){for(var t=m.utils.makeArray(e),n=i.createElement("div"),r=0,a=t.length;a>r;r++)n.appendChild(m.cleanNode(t[r]));return n},cloneNodes:function(e,t){for(var n=0,i=e.length,r=[];i>n;n++){var a=e[n].cloneNode(!0);r.push(t?m.cleanNode(a):a)}return r},setDomNodeChildren:function(e,t){if(m.utils.emptyDomNode(e),t)for(var n=0,i=t.length;i>n;n++)e.appendChild(t[n])},replaceDomNodes:function(e,t){var n=e.nodeType?[e]:e;if(n.length>0){for(var i=n[0],r=i.parentNode,a=0,s=t.length;s>a;a++)r.insertBefore(t[a],i);for(var a=0,s=n.length;s>a;a++)m.removeNode(n[a])}},fixUpContinuousNodeArray:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.shift();if(e.length>1){var n=e[0],i=e[e.length-1];for(e.length=0;n!==i;)if(e.push(n),n=n.nextSibling,!n)return;e.push(i)}}return e},setOptionNodeSelectionState:function(e,t){7>g?e.setAttribute("selected",t):e.selected=t},stringTrim:function(e){return null===e||e===t?"":e.trim?e.trim():e.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},stringStartsWith:function(e,t){return e=e||"",t.length>e.length?!1:e.substring(0,t.length)===t},domNodeIsContainedBy:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(3===e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},domNodeIsAttachedToDocument:function(e){return m.utils.domNodeIsContainedBy(e,e.ownerDo