devfab 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/devfab.min.js CHANGED
@@ -1,7 +1,7 @@
1
1
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).devfab={})}(this,function(exports){"use strict";function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){asyncGeneratorStep(a,n,i,o,s,"next",e)}function s(e){asyncGeneratorStep(a,n,i,o,s,"throw",e)}o(void 0)})}}function _callSuper(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){_defineProperty(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}function _possibleConstructorReturn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _regenerator(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
3
- var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(r,n,i,a){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return _regeneratorDefine(c,"_invoke",function(r,n,i){var a,s,u,c=0,l=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return a=t,s=0,u=e,f.n=r,o}};function p(r,n){for(s=r,u=n,t=0;!d&&c&&!i&&t<l.length;t++){var i,a=l[t],p=f.p,h=a[2];r>3?(i=h===n)&&(u=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=p&&((i=r<2&&p<a[1])?(s=0,f.v=n,f.n=a[1]):p<h&&(i=r<3||a[0]>n||n>h)&&(a[4]=r,a[5]=n,f.n=h,s=0))}if(i||r>1)return o;throw d=!0,n}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(t=s<2?e:u)||!d;){a||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(d=f.n<0)?u:r.call(n,f))!==o)break}catch(t){a=e,s=1,u=t}finally{c=1}}return{value:t,done:d}}}(r,i,a),!0),c}var o={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(_regeneratorDefine(t={},n,function(){return this}),t),d=c.prototype=s.prototype=Object.create(l);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_regeneratorDefine(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=c,_regeneratorDefine(d,"constructor",c),_regeneratorDefine(c,"constructor",u),u.displayName="GeneratorFunction",_regeneratorDefine(c,i,"GeneratorFunction"),_regeneratorDefine(d),_regeneratorDefine(d,i,"Generator"),_regeneratorDefine(d,n,function(){return this}),_regeneratorDefine(d,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:a,m:f}})()}function _regeneratorDefine(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine=function(e,t,r,n){function a(t,r){_regeneratorDefine(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},_regeneratorDefine(e,t,r,n)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:t+""}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}
3
+ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(r,n,i,a){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return _regeneratorDefine(c,"_invoke",function(r,n,i){var a,s,u,c=0,l=i||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return a=t,s=0,u=e,d.n=r,o}};function p(r,n){for(s=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,a=l[t],p=d.p,h=a[2];r>3?(i=h===n)&&(u=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=p&&((i=r<2&&p<a[1])?(s=0,d.v=n,d.n=a[1]):p<h&&(i=r<3||a[0]>n||n>h)&&(a[4]=r,a[5]=n,d.n=h,s=0))}if(i||r>1)return o;throw f=!0,n}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,h),s=l,u=h;(t=s<2?e:u)||!f;){a||(s?s<3?(s>1&&(d.n=-1),p(s,u)):d.n=u:d.v=u);try{if(c=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(f=d.n<0)?u:r.call(n,d))!==o)break}catch(t){a=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(r,i,a),!0),c}var o={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(_regeneratorDefine(t={},n,function(){return this}),t),f=c.prototype=s.prototype=Object.create(l);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_regeneratorDefine(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=c,_regeneratorDefine(f,"constructor",c),_regeneratorDefine(c,"constructor",u),u.displayName="GeneratorFunction",_regeneratorDefine(c,i,"GeneratorFunction"),_regeneratorDefine(f),_regeneratorDefine(f,i,"Generator"),_regeneratorDefine(f,n,function(){return this}),_regeneratorDefine(f,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:a,m:d}})()}function _regeneratorDefine(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine=function(e,t,r,n){function a(t,r){_regeneratorDefine(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))},_regeneratorDefine(e,t,r,n)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:t+""}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}
4
4
  /** vim: et:ts=4:sw=4:sts=4
5
5
  * @license RequireJS 2.3.2 Copyright jQuery Foundation and other contributors.
6
6
  * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
7
- */var __requirejs={};(function(global,setTimeout){var requirejs,require,define,req,s,head,baseElement,dataMain,src,body,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.2",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var r;if(e)for(r=0;r<e.length&&(!e[r]||!t(e[r],r,e));r+=1);}function eachReverse(e,t){var r;if(e)for(r=e.length-1;r>-1&&(!e[r]||!t(e[r],r,e));r-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var r;for(r in e)if(hasProp(e,r)&&t(e[r],r))break}function mixin(e,t,r,n){return t&&eachProp(t,function(t,i){!r&&hasProp(e,i)||(!n||"object"!==_typeof(t)||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[i]=t:(e[i]||(e[i]={}),mixin(e[i],t,r,n)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,r,n){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return i.requireType=e,i.requireModules=n,r&&(i.originalError=r),i}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,r,n){var i,a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=defContextName;return isArray(e)||"string"==typeof e||(a=e,isArray(t)?(e=t,t=r,r=n):e=[]),a&&a.context&&(s=a.context),o.name&&(s=o.name),(i=getOwn(contexts,s))||(i=contexts[s]=req.s.newContext(s,o)),a&&i.configure(a),i.require(e,t,r)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$|\.css$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],body=s.body=document.getElementsByTagName("body")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,r){var n,i="";try{r.split("?")[0].endsWith(".css")&&(i="css")}catch(e){}return"css"===i?((n=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:link"):document.createElement("link")).href=r,n.rel="stylesheet",n.type=e.linkType||"text/css",n):((n=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script")).type=e.scriptType||"text/javascript",n.charset="utf-8",n.async=!1,n)},req.load=function(e,t,r){var n,i=e&&e.config||{};if(isBrowser)return(n=req.createNode(i,t,r)).setAttribute("data-requirecontext",e.contextName),n.setAttribute("data-requiremodule",t),!n.attachEvent||n.attachEvent.toString&&n.attachEvent.toString().indexOf("[native code")<0||isOpera?(n.addEventListener("load",e.onScriptLoad,!1),n.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,n.attachEvent("onreadystatechange",e.onScriptLoad)),n.src=r,i.onNodeCreated&&i.onNodeCreated(n,i,t,r),currentlyAddingScript=n,baseElement?head.insertBefore(n,baseElement):body?body.appendChild(n):head.appendChild(n),currentlyAddingScript=null,n;if(isWebWorker)try{setTimeout(function(){},0),importScripts(r),e.completeLoad(t)}catch(n){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+r,n,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,r){var n,i;"string"!=typeof e&&(r=t,t=e,e=null),isArray(t)||(r=t,t=null),!t&&isFunction(r)&&(t=[],r.length&&(r.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,r){t.push(r)}),t=(1===r.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(n=currentlyAddingScript||getInteractiveScript())&&(e||(e=n.getAttribute("data-requiremodule")),i=contexts[n.getAttribute("data-requirecontext")]),i?(i.defQueue.push([e,t,r]),i.defQueueMap[e]=!0):globalDefQueue.push([e,t,r])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},__requirejs.require=require,__requirejs.define=define,req(cfg)}function newContext(e){var t,r,n,i,a,o={waitSeconds:(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).waitSeconds||30,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},s={},u={},c={},l=[],d={},f={},p={},h=1,v=1;function y(e,t,r){var n,i,a,s,u,c,l,d,f,p,h=t&&t.split("/"),v=o.map,y=v&&v["*"];if(e&&(c=(e=e.split("/")).length-1,o.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),function(e){var t,r;for(t=0;t<e.length;t++)if("."===(r=e[t]))e.splice(t,1),t-=1;else if(".."===r){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),r&&v&&(h||y)){for(a=(i=e.split("/")).length;a>0;a-=1){if(u=i.slice(0,a).join("/"),h){var g=!1;for(s=h.length;s>0;s-=1)if((n=getOwn(v,h.slice(0,s).join("/")))&&(n=getOwn(n,u))){l=n,d=a,g=!0;break}if(g)break}!f&&y&&getOwn(y,u)&&(f=getOwn(y,u),p=a)}!l&&f&&(l=f,d=p),l&&(i.splice(0,d,l),e=i.join("/"))}return getOwn(o.pkgs,e)||e}function g(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===n.contextName)return t.parentNode.removeChild(t),!0})}function _(e){var t=getOwn(o.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),n.require.undef(e),n.makeRequire(null,{skipMap:!0})([e]),!0}function m(e){var t,r=e?e.indexOf("!"):-1;return r>-1&&(t=e.substring(0,r),e=e.substring(r+1,e.length)),[t,e]}function b(e,t,r,i){var a,o,s,u,c=null,l=t?t.name:null,f=e,p=!0,g="";return e||(p=!1,e="_@r"+(h+=1)),c=(u=m(e))[0],e=u[1],c&&(c=y(c,l,i),o=getOwn(d,c)),e&&(c?g=o&&o.normalize?o.normalize(e,function(e){return y(e,l,i)}):-1===e.indexOf("!")?y(e,l,i):e:(c=(u=m(g=y(e,l,i)))[0],g=u[1],r=!0,a=n.nameToUrl(g))),{prefix:c,name:g,parentMap:t,unnormalized:!!(s=!c||o||r?"":"_unnormalized"+(v+=1)),url:a,originalName:f,isDefine:p,id:(c?c+"!"+g:g)+s}}function x(e){var t=e.id,r=getOwn(s,t);return r||(r=s[t]=new n.Module(e)),r}function k(e,t,r){var n=e.id,i=getOwn(s,n);!hasProp(d,n)||i&&!i.defineEmitComplete?(i=x(e)).error&&"error"===t?r(i.error):i.on(t,r):"defined"===t&&r(d[n])}function w(e,t){var r=e.requireModules,n=!1;t?t(e):(each(r,function(t){var r=getOwn(s,t);r&&(r.error=e,r.events.error&&(n=!0,r.emit("error",e)))}),n||req.onError(e))}function S(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(n.defQueueMap[t]=!0),l.push(e)}),globalDefQueue=[])}function P(e){delete s[e],delete u[e]}function A(e,t,r){var n=e.map.id;e.error?e.emit("error",e.error):(t[n]=!0,each(e.depMaps,function(n,i){var a=n.id,o=getOwn(s,a);!o||e.depMatched[i]||r[a]||(getOwn(t,a)?(e.defineDep(i,d[a]),e.check()):A(o,t,r))}),r[n]=!0)}function C(){var e,r,i=1e3*o.waitSeconds,s=i&&n.startTime+i<(new Date).getTime(),c=[],l=[],d=!1,f=!0;if(!t){if(t=!0,eachProp(u,function(e){var t=e.map,n=t.id;if(e.enabled&&(t.isDefine||l.push(e),!e.error))if(!e.inited&&s)_(n)?(r=!0,d=!0):(c.push(n),g(n));else if(!e.inited&&e.fetched&&t.isDefine&&(d=!0,!t.prefix))return f=!1}),s&&c.length)return(e=makeError("timeout","Load timeout for modules: "+c,null,c)).contextName=n.contextName,w(e);f&&each(l,function(e){A(e,{},{})}),s&&!r||!d||!isBrowser&&!isWebWorker||a||(a=setTimeout(function(){a=0,C()},50)),t=!1}}function j(e){hasProp(d,e[0])||x(b(e[0],null,!0)).init(e[1],e[2])}function q(e,t,r,n){e.detachEvent&&!isOpera?n&&e.detachEvent(n,t):e.removeEventListener(r,t,!1)}function E(e){var t=e.currentTarget||e.srcElement;return q(t,n.onScriptLoad,"load","onreadystatechange"),q(t,n.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function O(){var e;for(S();l.length;){if(null===(e=l.shift())[0])return w(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));j(e)}n.defQueueMap={}}return i={require:function(e){return e.require?e.require:e.require=n.makeRequire(e.map)},exports:function(e){e.usingExports=!0,e.map.isDefine&&(e.exports?d[e.map.id]=e.exports:e.exports=d[e.map.id]={})},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(o.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(r=function(e){this.events=getOwn(c,e.id)||{},this.map=e,this.shim=getOwn(o.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,r,n){n=n||{},this.inited||(this.factory=t,r?this.on("error",r):this.events.error&&(r=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=r,this.inited=!0,this.ignore=n.ignore,n.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,n.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();n.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;f[e]||(f[e]=!0,n.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,r=this.map.id,i=this.depExports,a=this.exports,o=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{a=n.execCb(r,o,i,a)}catch(t){e=t}else a=n.execCb(r,o,i,a);if(this.map.isDefine&&void 0===a&&((t=this.module)?a=t.exports:this.usingExports&&(a=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",w(this.error=e)}else a=o;if(this.exports=a,this.map.isDefine&&!this.ignore&&(d[r]=a,req.onResourceLoad)){var s=[];each(this.depMaps,function(e){s.push(e.normalizedMap||e)}),req.onResourceLoad(n,this.map,s)}P(r),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(n.defQueueMap,r)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,r=b(e.prefix);this.depMaps.push(r),k(r,"defined",bind(this,function(r){var i,a,u,c=getOwn(p,this.map.id),l=this.map.name,d=this.map.parentMap?this.map.parentMap.name:null,f=n.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(r.normalize&&(l=r.normalize(l,function(e){return y(e,d,!0)})||""),k(a=b(e.prefix+"!"+l,this.map.parentMap),"defined",bind(this,function(e){this.map.normalizedMap=a,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((u=getOwn(s,a.id))&&(this.depMaps.push(a),this.events.error&&u.on("error",bind(this,function(e){this.emit("error",e)})),u.enable()))):c?(this.map.url=n.nameToUrl(c),void this.load()):((i=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})})).error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(s,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&P(e.map.id)}),w(e)}),i.fromText=bind(this,function(r,a){var s=e.name,u=b(s),c=useInteractive;a&&(r=a),c&&(useInteractive=!1),x(u),hasProp(o.config,t)&&(o.config[s]=o.config[t]);try{req.exec(r)}catch(e){return w(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0),this.depMaps.push(u),n.completeLoad(s),f([s],i)}),void r.load(e.name,f,i,o))})),n.enable(r,this),this.pluginMaps[r.id]=r},enable:function(){u[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var r,a,o;if("string"==typeof e){if(e=b(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,o=getOwn(i,e.id))return void(this.depExports[t]=o(this));this.depCount+=1,k(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?k(e,"error",bind(this,this.errback)):this.events.error&&k(e,"error",bind(this,function(e){this.emit("error",e)}))}r=e.id,a=s[r],hasProp(i,r)||!a||a.enabled||n.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(s,e.id);t&&!t.enabled&&n.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var r=this.events[e];r||(r=this.events[e]=[]),r.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},n={config:o,contextName:e,registry:s,defined:d,urlFetched:f,defQueue:l,defQueueMap:{},Module:r,makeModuleMap:b,nextTick:req.nextTick,onError:w,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,r){return(-1===r.indexOf("?")?"?":"&")+t}}var r=o.shim,i={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){i[t]?(o[t]||(o[t]={}),mixin(o[t],e,!0,!0)):o[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(p[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=n.makeShimExports(e)),r[t]=e}),o.shim=r),e.packages&&each(e.packages,function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(o.paths[t]=e.location),o.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(s,function(e,t){e.inited||e.map.unnormalized||(e.map=b(t,null,!0))}),(e.deps||e.callback)&&n.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}},makeRequire:function(t,r){function a(o,u,c){var l,f;return r.enableBuildCallback&&u&&isFunction(u)&&(u.__requireJsBuild=!0),"string"==typeof o?isFunction(u)?w(makeError("requireargs","Invalid require call"),c):t&&hasProp(i,o)?i[o](s[t.id]):req.get?req.get(n,o,t,a):(l=b(o,t,!1,!0).id,hasProp(d,l)?d[l]:w(makeError("notloaded",'Module name "'+l+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(O(),n.nextTick(function(){O(),(f=x(b(null,t))).skipMap=r.skipMap,f.init(o,u,c,{enabled:!0}),C()}),a)}return r=r||{},mixin(a,{isBrowser:isBrowser,toUrl:function(e){var r,i=e.lastIndexOf("."),a=e.split("/")[0];return-1!==i&&(!("."===a||".."===a)||i>1)&&(r=e.substring(i,e.length),e=e.substring(0,i)),n.nameToUrl(y(e,t&&t.id,!0),r,!0)},defined:function(e){return hasProp(d,b(e,t,!1,!0).id)},specified:function(e){return e=b(e,t,!1,!0).id,hasProp(d,e)||hasProp(s,e)}}),t||(a.undef=function(e){S();var r=b(e,t,!0),i=getOwn(s,e);i.undefed=!0,g(e),delete d[e],delete f[r.url],delete c[e],eachReverse(l,function(t,r){t[0]===e&&l.splice(r,1)}),delete n.defQueueMap[e],i&&(i.events.defined&&(c[e]=i.events),P(e))}),a},enable:function(e){getOwn(s,e.id)&&x(e).enable()},completeLoad:function(e){var t,r,i,a=getOwn(o.shim,e)||{},u=a.exports;for(S();l.length;){if(null===(r=l.shift())[0]){if(r[0]=e,t)break;t=!0}else r[0]===e&&(t=!0);j(r)}if(n.defQueueMap={},i=getOwn(s,e),!t&&!hasProp(d,e)&&i&&!i.inited){if(!(!o.enforceDefine||u&&getGlobal(u)))return _(e)?void 0:w(makeError("nodefine","No define call for "+e,null,[e]));j([e,a.deps||[],a.exportsFn])}C()},nameToUrl:function(e,t,r){var i,a,s,u,c,l,d=getOwn(o.pkgs,e);if(d&&(e=d),l=getOwn(p,e))return n.nameToUrl(l,t,r);if(req.jsExtRegExp.test(e))u=e+(t||"");else{for(i=o.paths,s=(a=e.split("/")).length;s>0;s-=1)if(c=getOwn(i,a.slice(0,s).join("/"))){isArray(c)&&(c=c[0]),a.splice(0,s,c);break}u=a.join("/"),u=("/"===(u+=t||(/^data:|^blob:|\?/.test(u)||r?"":".js")).charAt(0)||u.match(/^[\w+.-]+:/)?"":o.baseUrl)+u}return o.urlArgs&&!/^blob:/.test(u)?u+o.urlArgs(e,u):u},load:function(e,t){req.load(n,e,t)},execCb:function(e,t,r,n){return t.apply(n,r)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=E(e);n.completeLoad(t.id)}},onScriptError:function(e){var t=E(e);if(!_(t.id)){var r=[];return eachProp(s,function(e,n){0!==n.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return r.push(n),!0})}),w(makeError("scripterror",'Script error for "'+t.id+(r.length?'", needed by: '+r.join(", "):'"'),e,[t.id]))}}},n.require=n.makeRequire(),n}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript}})("undefined"!=typeof window?window:globalThis,"undefined"==typeof setTimeout?void 0:setTimeout),function(e){if(!__requirejs.__requirejsAdapterApplied){__requirejs.__requirejsAdapterApplied=!0;var t=__requirejs.require,r=__requirejs.define,n=function(e,r,n,i){var a=e,o=r,s=n,u=i;if(Array.isArray(e)&&"function"==typeof r)t(o=e,s=r,u=n);else{!e&&Array.isArray(o)&&(a=[]),Array.isArray(a)&&Array.isArray(o)&&(a=a.join("/"));var c=a?[]:o;"string"==typeof a&&a&&Array.isArray(o)&&o.forEach(function(e){c.push("".concat(a).concat("/"===e.substr(0,1)?"":"/").concat(e))}),console.debug("[devfab][requirejs]: %c requireInner, Parameter[newdeps] is %o","color:fuchsia",c),t(c,s,u)}},i=function(e,t,n){var i=e,a=t,o=n;if(Array.isArray(e)&&"function"==typeof t)r(a=e,o=t);else{!e&&Array.isArray(a)&&(i=[]),Array.isArray(i)&&Array.isArray(a)&&(i=i.join("/"));var s=i?[]:a;"string"==typeof i&&i&&Array.isArray(a)&&a.forEach(function(e){s.push("".concat(i).concat("/"===e.substr(0,1)?"":"/").concat(e))}),r(s,o)}};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&void 0===n[a]&&(n[a]=t[a]);n.__devfabAdapterApplied=!0,i.__devfabAdapterApplied=!0,__requirejs._require=t,__requirejs._define=r,__requirejs.require=n,__requirejs.define=i}}();var CODE_POLICY=403;function normalizePath(e){return String(null==e?"":e).replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"")}function isAbsoluteUrl(e){return/^(?:[a-z][a-z0-9+.-]*:)?\/\//i.test(e)||/^(?:blob|data):/i.test(e)}function toHex(e){for(var t=new Uint8Array(e),r="",n=0;n<t.length;n++)r+=t[n].toString(16).padStart(2,"0");return r}var LoadPolicy=function(){return _createClass(function e(t){_classCallCheck(this,e),this.manifest=null,this.origins=null,this.lockVersion=null,this.verifyHash=!0,this.fetch=null,this._index=null,this.configure(t)},[{key:"configure",value:function(e){var t=e||{};return void 0!==t.manifest&&(this.manifest=t.manifest||null),void 0!==t.origins&&(this.origins=t.origins?[].concat(t.origins).map(function(e){return String(e).trim().replace(/\/+$/,"")}):null),void 0!==t.lockVersion&&(this.lockVersion=t.lockVersion||null),void 0!==t.verifyHash&&(this.verifyHash=!!t.verifyHash),void 0!==t.fetch?this.fetch=t.fetch||null:this.fetch||"function"!=typeof fetch||(this.fetch=function(){return fetch.apply(void 0,arguments)}),this._index=null,this}},{key:"enabled",get:function(){return!!this.manifest}},{key:"_moduleIndex",value:function(){if(this._index)return this._index;var e={},t=this.manifest&&this.manifest.modules;return Array.isArray(t)?t.forEach(function(t){t&&t.path&&(e[normalizePath(t.path)]=t)}):t&&"object"===_typeof(t)&&Object.keys(t).forEach(function(r){e[normalizePath(r)]=t[r]||{}}),this._index=e,e}},{key:"entryOf",value:function(e){return this.manifest&&this._moduleIndex()[normalizePath(e)]||null}},{key:"checkVersion",value:function(){if(!this.lockVersion||!this.manifest)return null;var e=String(this.manifest.version||"");return e===String(this.lockVersion)?null:{code:CODE_POLICY,message:"清单版本 ".concat(e||"(未声明)"," 与锁定版本 ").concat(this.lockVersion," 不一致,拒绝加载")}}},{key:"checkModules",value:function(e){var t=this.checkVersion();if(t)return t;if(!this.manifest)return null;for(var r=0;r<e.length;r++){var n=normalizePath(e[r]);if(!this._moduleIndex()[n])return{code:CODE_POLICY,message:"Module ".concat(n," not registered in the list, loading denied.")}}return null}},{key:"checkOrigin",value:function(e){if(!this.origins)return null;if(!isAbsoluteUrl(e))return null;var t;try{t=new URL(e).origin}catch(t){return{code:CODE_POLICY,message:"无法解析的地址:".concat(e)}}return-1===this.origins.indexOf(t)?{code:CODE_POLICY,message:"来源 ".concat(t," 不在白名单内(允许:").concat(this.origins.join(", "),")")}:null}},{key:"verify",value:function(e,t){var r=this;if(!this.verifyHash)return Promise.resolve({ok:!0,skipped:"disabled"});if(!t)return Promise.resolve({ok:!0});var n="undefined"!=typeof globalThis&&globalThis.crypto&&globalThis.crypto.subtle;return n?this.fetch?Promise.resolve().then(function(){return r.fetch(e)}).then(function(e){return e&&e.ok?e.arrayBuffer().then(function(e){return n.digest("SHA-256",e)}):{ok:!1,message:"完整性预检请求失败:HTTP ".concat(e&&e.status||"unknown")}}).then(function(e){if(!e||!1===e.ok)return e;var r=toHex(e),n=String(t).toLowerCase();return r!==n?{ok:!1,message:"sha256 不匹配:期望 ".concat(n,",实际 ").concat(r)}:{ok:!0}}).catch(function(e){return{ok:!1,message:"完整性预检异常:".concat(e&&e.message||e),error:e}}):Promise.resolve({ok:!0,skipped:"fetch unavailable"}):Promise.resolve({ok:!0,skipped:"crypto.subtle unavailable(需要 https / localhost)"})}},{key:"describe",value:function(){return{manifest:this.enabled?this.manifest.name||"(unnamed)":null,version:this.manifest&&this.manifest.version||null,lockVersion:this.lockVersion,modules:this.enabled?Object.keys(this._moduleIndex()).length:0,origins:this.origins?this.origins.slice():null,verifyHash:this.verifyHash}}}])}(),CODE_TIMEOUT=504,nativeImport=null;try{nativeImport=new Function("s","return import(s)")}catch(e){nativeImport=null}function parseArgs(e,t,r,n){var i=e,a=t,o=r;Array.isArray(e)&&!Array.isArray(t)&&(i=void 0,a=e,o="function"==typeof t?t:r);var s=(a=Array.isArray(a)?a:[]).join(","),u={code:0,message:"",data:[]};return("require"===n.type&&"function"!=typeof n.require||"define"===n.type&&"function"!=typeof n.define)&&(u.code=404,u.message="requirejs is undefined, the fiels: ".concat(s)),{path:i,files:a,callback:o,filesStr:s,result:u}}function toModuleIds(e,t){var r="";return Array.isArray(e)?r=e.filter(Boolean).join("/"):"string"==typeof e&&(r=e.replace(/\/+$/,"")),t.map(function(e){var t=String(e).replace(/^\/+/,"");return r?"".concat(r,"/").concat(t):t})}function toNumber(e,t){var r=Number(e);return Number.isFinite(r)?r:t}var DEFAULT_OPTIONS={version:"",timeout:15e3,retry:0,baseUrl:""},BaseFileRequire=function(){return _createClass(function e(t){_classCallCheck(this,e),this.__init(t)},[{key:"__init",value:function(e){var t=e||{};void 0!==t.debug&&(this.debug=!!t.debug);var r=__requirejs.require;this.__data={define:__requirejs.define,require:r,undef:"function"==typeof(null==r?void 0:r.undef)?r.undef:null,requireConfig:this._pickRequireConfig(r),importImpl:t.importer||null,setTimer:t.setTimeout||function(e,t){return setTimeout(e,t)},clearTimer:t.clearTimeout||function(e){return clearTimeout(e)},options:{version:t.version?String(t.version):DEFAULT_OPTIONS.version,timeout:void 0===t.timeout?DEFAULT_OPTIONS.timeout:Math.max(0,toNumber(t.timeout,0)),retry:void 0===t.retry?DEFAULT_OPTIONS.retry:Math.max(0,toNumber(t.retry,0)),baseUrl:t.baseUrl||DEFAULT_OPTIONS.baseUrl},policy:new LoadPolicy(t)},this.__data.options.version&&this._applyUrlArgs()}},{key:"debug",get:function(){var e="undefined"!=typeof window?window.__devfab:null;return!(!e||!e.debug)},set:function(e){"undefined"!=typeof window&&(window.__devfab=window.__devfab||{},window.__devfab.debug=!!e)}},{key:"_pickRequireConfig",value:function(e){return e&&"function"==typeof e.config?e.config.bind(e):null}},{key:"configure",value:function(e){var t=e||{},r=this.__data,n=r.options,i=r.policy;return void 0!==t.debug&&(this.debug=!!t.debug),void 0!==t.version&&this.setVersion(t.version),void 0!==t.timeout&&(n.timeout=Math.max(0,toNumber(t.timeout,n.timeout))),void 0!==t.retry&&(n.retry=Math.max(0,toNumber(t.retry,n.retry))),void 0!==t.baseUrl&&(n.baseUrl=t.baseUrl||""),void 0===t.manifest&&void 0===t.origins&&void 0===t.lockVersion&&void 0===t.verifyHash&&void 0===t.fetch||i.configure(t),this}},{key:"setVersion",value:function(e){return this.__data.options.version=e?String(e):"",this._applyUrlArgs(),this}},{key:"_applyUrlArgs",value:function(){var e=this.__data,t=e.requireConfig,r=e.options;if("function"!=typeof t)return!1;try{return t({urlArgs:r.version?"v=".concat(encodeURIComponent(r.version)):""}),!0}catch(e){return!1}}},{key:"getVersion",value:function(){return this.__data.options.version}},{key:"describe",value:function(){var e=this.__data,t=e.options,r=e.policy,n=e.undef,i=e.importImpl;return Object.assign({},t,{debug:this.debug,policy:r.describe(),canUndef:"function"==typeof n,canNativeImport:"function"==typeof(i||nativeImport)})}},{key:"_define",value:function(e,t,r){var n=parseArgs(e,t,r,{define:this.__data.define,type:"define"}),i=n.path,a=n.files,o=n.callback,s=n.result;404!==s.code?this.__data.define(i,a,o):null==o||o(s)}},{key:"_undefModules",value:function(e){var t=this.__data.undef;"function"==typeof t&&e.forEach(function(e){try{t(e)}catch(e){}})}},{key:"_load",value:function(e,t,r){var n=this,i=this.__data,a=i.options,o=i.policy,s=i.require,u=i.setTimer,c=i.clearTimer,l=parseArgs(e,t,r,{require:s,type:"require"}),d=l.path,f=l.files,p=l.callback,h=l.result,v=l.filesStr;if(404!==h.code){var y=toModuleIds(d,f),g=o.checkModules(y);if(g)return h.code=g.code,h.message=g.message,void(null==p||p(h));var _=!1,m=0,b=null,x=function(){_||(_=!0,null!==b&&(c(b),b=null),null==p||p(h))},k=function(){m++,a.timeout>0&&(b=u(function(){if(!_){var e=new Error("load timeout after ".concat(a.timeout,"ms: ").concat(v));e.__devfabTimeout=!0,w(e,"files load timeout after ".concat(a.timeout,"ms, the files: ").concat(v))}},a.timeout)),s(d,f,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];h.data=t,x()},function(e){w(e)})},w=function(e,t){if(!_){if(null!==b&&(c(b),b=null),m<=a.retry)return n._undefModules(y),void k();h.code=e&&e.__devfabTimeout?CODE_TIMEOUT:500,h.message=t||"files load error, the files: ".concat(v),h.error=e,x()}};k()}else null==p||p(h)}},{key:"load",value:function(e,t,r){this._load(e,t,r)}},{key:"resolveUrl",value:function(e){var t=String(null==e?"":e);if(/^[a-z][a-z0-9+.-]*:/i.test(t)||/^\/\//.test(t))return t;var r=this.__data.options.baseUrl||("undefined"!=typeof document&&document.baseURI?document.baseURI:"");if(!r)return t;try{return new URL(t,r).href}catch(e){return t}}},{key:"_importOne",value:function(e){var t=this.__data,r=t.policy,n=t.importImpl,i=this.resolveUrl(e),a=r.checkOrigin(i);if(a)return Promise.resolve({ok:!1,code:a.code,message:a.message});var o=r.entryOf(e),s=o&&o.sha256,u=function(){var e=n||nativeImport;return"function"!=typeof e?Promise.resolve({ok:!1,code:500,message:"native import() is unavailable(CSP 是否禁用了 unsafe-eval?)"}):Promise.resolve().then(function(){return e(i)}).then(function(e){return{ok:!0,module:e}},function(e){return{ok:!1,code:500,message:"module load error: ".concat(i),error:e}})};return s?r.verify(i,s).then(function(e){return e.ok?u():{ok:!1,code:CODE_POLICY,message:"".concat(e.message,"(").concat(i,")")}}):u()}},{key:"loadModules",value:function(e,t,r){var n=this,i=this.__data.policy,a=parseArgs(e,t,r,{type:"module"}),o=a.path,s=a.files,u=a.callback,c=a.result,l=a.filesStr,d=toModuleIds(o,s),f=function(e){return null==u||u(e),e},p=i.checkModules(d);return p?(c.code=p.code,c.message=p.message,Promise.resolve(f(c))):s.length?Promise.all(d.map(function(e){return n._importOne(e)})).then(function(e){var t=e.filter(function(e){return!e.ok});return t.length?(c.code=t[0].code||500,c.message="".concat(t.map(function(e){return e.message}).join("; "),"(the files: ").concat(l,")"),c.error=t[0].error):c.data=e.map(function(e){return e.module}),f(c)}):Promise.resolve(f(c))}},{key:"loadModule",value:function(e,t){return this.loadModules([e],t)}}])}(),FileRequireClass=function(e){function t(){return _classCallCheck(this,t),_callSuper(this,t,arguments)}return _inherits(t,e),_createClass(t,[{key:"provide",value:function(e,t,r){this._define(e,t,r)}},{key:"provideScript",value:function(e){var t=e;"function"!=typeof e&&(t=function(){return e}),this.provide([],t)}},{key:"inject",value:function(e,t,r){this._load(e,t,r)}},{key:"injectScript",value:function(e,t,r,n){var i=this,a=e,o=t,s=r,u=n;Array.isArray(e)&&"function"==typeof t&&(a=void 0,o=e,s=t,u=r),this.inject(a,o,function(e){if(0==e.code&&Array.isArray(e.data))for(var t=0,r=e.data.length;t<r;t++){var n,a=e.data[t];null===(n=s)||void 0===n||n(a,t)}else"function"==typeof u?u(e):i.debug&&console.error("[devfab][FileRequire][injectScript] error: ",e)})}}])}(BaseFileRequire),FileRequire=new FileRequireClass;function isDebug(e){return e||!("undefined"==typeof window||!window.__devfab||!window.__devfab.debug)}function QueryString(e){this.pathname="",this.query={};var t=e;this.init=function(){t||(t=location.search);var e=t.indexOf("?"),r=t.indexOf("#");if(e>=0){if(this.pathname=t.substr(0,e),(t=r<0?t.substr(e+1):t.substring(e+1,r)).length>0)for(var n=(t=t.replace(/\+/g," ")).split("&"),i=0,a=n.length;i<a;i++){var o=n[i]||"";if(o){var s=o.indexOf("="),u="",c="";s<0?c=u=window.decode(o):(u=window.decode(o.substr(0,s)),c=window.decode(o.substr(s+1))),this.query[u]=c}}}else this.pathname=t},this.set=function(e,t){this.query[e]=t},this.get=function(e){return this.query[e]},this.del=function(e){delete this.query[e]},this.has=function(e){return null!=this.query[e]},this.toStr=function(){var e=["?"];for(var t in this.query)e.push(encodeURIComponent(t)),e.push("="),e.push(encodeURIComponent(this.query[t])),e.push("&");return 1===e.length?"":(e.splice(e.length-1,1),e.join(""))},this.init()}function equalsIgnoreCase(e,t){return!(!e||!t)&&e.toLowerCase()===t.toLowerCase()}function _appendUrl(e,t){if(!t)return e;var r=[],n=new QueryString(e);for(var i in t)n.get(i)||r.push("".concat(i,"=").concat(t[i]));if(!r.length)return e;var a=r.join("&");return e.indexOf("?")>=0?"".concat(e,"&").concat(a):"".concat(e,"?").concat(a)}var hasValue=function(e){return null!=e&&""!==e};function pick(e,t,r){if(e){var n=r;"string"==typeof t&&Array.isArray(n)&&(n=_defineProperty({},t,r));var i=n&&n[t];if(!i)return hasValue(e[t])?e[t]:void 0;for(var a=0;a<i.length;a++){var o=e[i[a]];if(hasValue(o))return o}}}var _excluded=["children","render"],BaseBuilder=function(){return _createClass(function e(){_classCallCheck(this,e),_defineProperty(this,"_config",{componentField:["component"]}),_defineProperty(this,"_components",{}),_defineProperty(this,"_renderFactory",null)},[{key:"init",value:function(e,t,r){this._initConfig(e),this._initComponent(t),this._initRenderFactory(r)}},{key:"_initConfig",value:function(e){this._config=Object.assign(this._config,e)}},{key:"_initComponent",value:function(e,t){if(e)if("string"==typeof e){if(this._components[e])return void console.log("[warning] Component ".concat(e," is exist!"));this._components[e]=t}else"function"==typeof e?Object.assign(this._components,null==e?void 0:e()):"object"===_typeof(e)&&Object.assign(this._components,e)}},{key:"_getComponent",value:function(e){return this._components[e]}},{key:"_clearComponents",value:function(){this._components={}}},{key:"_initRenderFactory",value:function(e){this._renderFactory=e}},{key:"_renderComponent",value:function(e,t){var r=this;if(Array.isArray(e)){var n=[];return e.forEach(function(e,i){var a=_objectSpread2({},e),o=pick(a,"component",r._config.componentField),s=a.children,u=a.render,c=_objectWithoutProperties(a,_excluded),l=r._getComponent(o);l||"function"==typeof u||console.log("[warning] Component ".concat(o," is not registered!"));var d={component:l,children:r._renderComponent(s,t)};c.index=i;var f=Object.assign({},null==t?void 0:t.props,{meta:c});"function"==typeof u?n.push(u({node:d,props:f})):"function"==typeof r._renderFactory?n.push(r._renderFactory({node:d,props:f})):(Object.assign(d,f),n.push(d))}),n}}},{key:"clear",value:function(){this._clearComponents(),this._renderFactory=null}}])}(),Builder=function(e){function t(){return _classCallCheck(this,t),_callSuper(this,t,arguments)}return _inherits(t,e),_createClass(t,[{key:"initComponent",value:function(e,t){this._initComponent(e,t)}},{key:"getComponents",value:function(){return _objectSpread2({},this._components)}},{key:"getComponent",value:function(e){return this._getComponent(e)}},{key:"hasComponent",value:function(e){return!!this._getComponent(e)}},{key:"initRenderFactory",value:function(e){this._initRenderFactory(e)}},{key:"render",value:function(e,t){return this._renderComponent(e,t)}}])}(BaseBuilder);function _getUrl(e,t){return e}function getAllResponseHeaders(e){var t=e.xhr.getAllResponseHeaders(),r={};return t.split("\r\n").map(function(e){var t=_slicedToArray(e.split(": "),2),n=t[0],i=t[1];r[n]=i}),r}Builder.create=function(e){return new Builder(e)};var AjaxUtil={_xhrs:[],_jsonps:{index:0},doRequest:function(e){var t,r=e.method||"GET",n=_getUrl(e.url);try{null!=e&&e.requestHeaders&&(t=e.requestHeaders,e.requestHeaders=void 0,delete e.requestHeaders)}catch(e){isDebug()&&console.log('[devfab][ajax]: [doRequest]: options["requestHeaders"] ERR : ',e)}try{e.params&&e.params.requestHeaders&&(t=e.params.requestHeaders,e.params.requestHeaders=void 0,delete e.params.requestHeaders)}catch(e){isDebug()&&console.log('[devfab][ajax]: [doRequest]: options.params["requestHeaders"] ERR : ',e)}var i=null;if(equalsIgnoreCase(r,"get")||equalsIgnoreCase(r,"delete")?n=_appendUrl(n,e.params):(equalsIgnoreCase(r,"post")||equalsIgnoreCase(r,"put"))&&(i=JSON.stringify(e.params)),e.jsonp)return this.getJsonp(n,e.callback);var a=this.getXMLHttpRequest();if(a){var o;if(a.open(r,n,!1!==e.async),e.timeout&&(a.timeout=e.timeout,a.setRequestHeader("timeout",e.timeout),a.ontimeout=function(){AjaxUtil.onerror(this,e,"timeout")}),e.contentType){if(a.setRequestHeader("Content-Type",e.contentType),e.contentType.indexOf("x-www-form-urlencoded")>=0)i=null===(o=new URLSearchParams(e.params))||void 0===o?void 0:o.toString()}else e.dateType?i=e.params:a.setRequestHeader("Content-Type","application/json;charset=utf-8");try{if(t&&"[object Object]"===Object.prototype.toString.call(t))for(var s in t)a.setRequestHeader(s,t[s])}catch(e){isDebug()&&console.log('[devfab][ajax]: [doRequest]: options.params["requestHeaders"] ERR : ',e)}a.withCredentials=null==e||!e.hasOwnProperty("withCredentials")||e.withCredentials,e.onBeforeRequest&&e.onBeforeRequest(a,i);try{a.send(i)}catch(t){return{error:"NetWorkError",options:e}}if(!1===e.async)return this.onreadystatechange(a,e);a.onreadystatechange=function(){AjaxUtil.onreadystatechange(this,e)}}},onreadystatechange:function(e,t){if(4===e.readyState){if(200===e.status){var r;try{if("blob"===t.responseType){var n=getAllResponseHeaders({xhr:e});r={code:e.status,data:{data:e.response,headers:n}}}else r=JSON.parse(e.responseText)}catch(r){AjaxUtil.onerror(e,t,e.responseText)}if(!1===t.async)return e.isBusy=!1,t.onAfterRequest&&t.onAfterRequest(r),AjaxUtil.parseAjaxResult(r,!1,null,null,t,e);AjaxUtil.parseAjaxResult(r,t.async,t.callback,t.context,t,e),t.onAfterRequest&&t.onAfterRequest(r)}else if(0===e.status)AjaxUtil.onerror(e,t,"The network connection has been disconnected. Please check the network status of the device and try.");else if(502===e.status||504===e.status)AjaxUtil.onerror(e,t,"An error has occurred with the service. Please try again later.");else{if(401!==e.status){var i={};try{i=JSON.parse(e.responseText)}catch(t){i={code:e.status,message:e.responseText}}return AjaxUtil.onerror(e,t,i)}AjaxUtil.onerror(e,t,"Login information has expired. Please log in again or contact technical staff.")}e.isBusy=!1}},onerror:function(e,t,r){var n="[devfab][ajax]: [onerror]: api error \n [code]: ".concat(e.status," \n [error]: ").concat(("object"===_typeof(r)?JSON.stringify(r):r)||"空"," \n [url]: ").concat(t.url," \n [token]: ").concat(document.cookie);isDebug()&&console.log(n);var i="object"===_typeof(r)?r:{code:500,message:r};t.onAfterRequest&&t.onAfterRequest(i)},getXMLHttpRequest:function(){return this.createXMLHttpRequest()},createXMLHttpRequest:function(){return window.XMLHttpRequest?new XMLHttpRequest:window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):null},getJsonp:function(e,t){var r=e,n="callback"+this._jsonps.index++,i=document.createElement("script");this._jsonps[n]=function(e){try{t(e)}finally{document.body.removeChild(i)}},r+=-1===r.indexOf("?")?"?":"&callback=cb.rest.AjaxUtil._jsonps."+n,i.src=r,document.body.appendChild(i)},parseAjaxResult:function(e,t,r,n,i,a){if(e){if(!e.code)return!1===t?e:void(r&&r.call(n,null,e));if(200==e.code){if(!1===t)return{result:e.data};r&&r.call(n,null,e.data,e.message,e.errorDetail,e.code,e.displayCode&&e)}else{if(!1===t)return{error:e};r&&r.call(n,e)}}}};function ajax(e,t){return t.url=e,AjaxUtil.doRequest(t)}function DynamicProxy(e,t){this.init&&this.init(e),this.queryParams=t}DynamicProxy.create=function(e,t){return new DynamicProxy(e,t)},DynamicProxy.prototype.init=function(e){if(e)for(var t in this.config=e,this.config)this[t]=function(e){return function(t,r,n){return this.Do(e,t,r,null,n)}}(t),this["".concat(t,"Sync")]=function(e){return function(t){return this.Do(e,t,null,!1)}}(t)},DynamicProxy.prototype.Do=function(e,t,r,n,i){var a,o,s;if(this.config&&this.config[e]&&this.config[e].url){var u=this.config[e],c=u.url;this.queryParams||(this.queryParams={}),null!==(a=u.options)&&void 0!==a&&a.proxyServiceCode&&(this.queryParams.serviceCode=u.options.proxyServiceCode),null!==(o=u.options)&&void 0!==o&&o.billnum&&(this.queryParams.billnum=u.options.billnum),null!==(s=this.queryParams)&&void 0!==s&&s.serviceCode&&(c=_appendUrl(c,this.queryParams));var l=c,d=Object.assign({},u.options);return d.method=u.method||"GET","function"==typeof t?(d.callback=t,d.context=i||d.context||this):d.params=t,r&&(d.callback=r,d.context=i||d.context||this),!1===n&&(d.async=!1),this.ajax(l,d)}},DynamicProxy.prototype.ajax=function(e,t){return ajax(e,t)};var Event=function(){return _createClass(function e(t){_classCallCheck(this,e),this._init(t)},[{key:"_init",value:function(e){var t;this.__ASYNC_EXECUTE__=null===(t=null==e?void 0:e.__ASYNC_EXECUTE__)||void 0===t||t,this._events=new Map,this._firstevents=new Map}},{key:"on",value:function(e,t,r){var n=this._events.get(e);Array.isArray(n)||(n=[]),n.push({callback:t,context:r}),this._events.set(e,n)}},{key:"onFirst",value:function(e,t,r){var n=this._firstevents.get(e);Array.isArray(n)||(n=[]),n.splice(0,0,{callback:t,context:r}),this._firstevents.set(e,n)}},{key:"execute",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=this._events.get(e),a=this._firstevents.get(e);if(!i&&!a)return!0;var o=!0;return[].concat(_toConsumableArray(a||[]),_toConsumableArray(i||[])).forEach(function(e){if(!1!==o){var t=e.callback.apply(e.context||void 0,r);o=!1!==t&&o}}),o}},{key:"un",value:function(e,t){this._unEvents(e,t,this._events),this._unEvents(e,t,this._firstevents)}},{key:"_unEvents",value:function(e,t,r){if(e&&r.has(e))if(t){var n=r.get(e),i=null==n?void 0:n.findIndex(function(e){return e.callback===t});-1!==i&&(null==n||n.splice(i,1))}else r.delete(e)}},{key:"hasEvent",value:function(e){var t,r;return e?((null===(t=this._events.get(e))||void 0===t?void 0:t.length)||0)+((null===(r=this._firstevents.get(e))||void 0===r?void 0:r.length)||0):0}},{key:"fireEvent",value:function(e,t){this.execute("before".concat(e),t)&&(this.execute(e,t),this.execute("after".concat(e),t))}},{key:"_asyncExecute",value:function(e,t,r){for(var n,i=this,a=r.resolve,o=r.reject,s=r.args,u=!0,c=t||[],l=!1,d=function(t){var r,n=c[t];if(!1===u)return 0;if(l)return{v:void 0};if("development"===process.env.nodeEnv)r=n.callback.apply(n.context||i,s);else try{r=n.callback.apply(n.context||i,s)}catch(e){throw e.isAddedMsg||(e.message="(领域扩展事件执行失败,请打开控制台查看详细错误信息并修复):".concat(e.message)),e.isAddedMsg=!0,e}r instanceof Promise?(l=!0,(u=r).callbacks&&u.callbacks.push({reject:function(){u.reject(),t===c.length-1&&(null==o||o())},resolve:function(r){t===c.length-1?(s.length>1&&(s[0]=r),null==a||a(s)):i._asyncExecute(e,c.slice(t+1),{resolve:a,reject:o,args:s})}})):(u=!1!==r&&u,t===c.length-1&&(u?null==a||a(s):null==o||o()))},f=0;f<c.length&&0!==(n=d(f));f++)if(n)return n.v;return u}},{key:"_asyncPromiseExecute",value:function(e,t,r,n){var i=this._events.get(e),a=this._firstevents.get(e);if(!((Array.isArray(i)?i.length:i)||(Array.isArray(a)?a.length:a)))return null==t?void 0:t();var o=[].concat(_toConsumableArray(a||[]),_toConsumableArray(i||[]));return this._asyncExecute(e,o,{resolve:t,reject:r,args:n})}},{key:"promiseExecute",value:function(e,t){var r=this,n=e,i=1;if("boolean"==typeof e&&(n=t,i=2),n){for(var a=arguments.length,o=new Array(a>2?a-2:0),s=2;s<a;s++)o[s-2]=arguments[s];var u=2===i?o:[t].concat(o);if(u.length){var c,l=u.length-1,d=u[l];if("function"!=typeof d){if("object"!==_typeof(d)||!d[0]||"function"!=typeof d[0]||!d[1]||"function"!=typeof d[1])return;c=d[1],d=d[0]}if(this.__ASYNC_EXECUTE__)return this._asyncPromiseExecute(n,function(e){d.apply(r,e)},function(){c&&"function"==typeof c&&c()},u);u.splice(l,1),u.unshift(n);var f=this.execute.apply(this,u);if(f instanceof Promise){var p=this;f.then(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];d.apply(p,t)},function(){c&&"function"==typeof c&&c()})}else if(!f)return void(c&&"function"==typeof c&&c())}}}},{key:"clear",value:function(){this._events.clear(),this._firstevents.clear()}}])}();Event.create=function(e){return new Event(e)};var Cache=function(){return _createClass(function e(t){_classCallCheck(this,e),this._init(t)},[{key:"_init",value:function(e){this._data=Object.assign({},e)}},{key:"set",value:function(e,t){this._data[e]=t}},{key:"get",value:function(e){var t;return null===(t=this._data)||void 0===t?void 0:t[e]}},{key:"delete",value:function(e){delete this._data[e]}},{key:"clear",value:function(){this._data={}}}])}();Cache.create=function(e){return new Cache};var BaseModel$1=function(){return _createClass(function e(t){_classCallCheck(this,e),this._init(t)},[{key:"_init",value:function(e){this._data={};var t=[];if(e)for(var r in e)t.push(r);Object.assign(this._data,{components:[],propertyNames:t},e),this._data.cache=new Cache,this._data.events=new Event}},{key:"_del_data",value:function(e){e&&delete this._data[e]}},{key:"_cls_data",value:function(){this._data.cache.clear(),this._data.events.clear(),this._data={components:[],propertyNames:[],cache:new Cache,events:new Event}}},{key:"_set_data",value:function(e,t,r){if(e){if(r){var n=this._data.propertyNames||[];n.indexOf(e)<0&&n.push(e)}this._data[e]=t}}},{key:"_get_data",value:function(e){if(e)return this._data[e]}},{key:"getData",value:function(){return this._get_data("value")}},{key:"getState",value:function(e,t){var r;if(!t)return this._get_data(e);var n=(this._get_data("components")||[]).find(function(e){return e.ctrlName===t});return n?null===(r=n.getState)||void 0===r?void 0:r.call(n,e):this._get_data(e)}},{key:"setState",value:function(e,t,r){r||this._set_data(e,t,!0);var n={};n[e]=t,this.doPropertyChange("setState",n,r)}},{key:"doPropertyChange",value:function(e,t,r){var n=this,i=this._get_data("components")||[];if(!i.length)return i;var a=[];if(r){var o=i.find(function(e){return e.ctrlName===r});o&&!this.notifyComponent(o,e,t)&&a.push(o)}else i.forEach(function(r){n.notifyComponent(r,e,t)||a.push(r)});return a.length?a:void 0}},{key:"notifyComponent",value:function(e,t,r){return"function"==typeof e[t]&&(this.viewUpdater(e,t,r),!0)}},{key:"viewUpdater",value:function(e,t,r){if("setState"===t)e[t](r);else{var n=this.getCache("name");e[t](r,n)}}},{key:"get",value:function(e){return this._get_data(e)}},{key:"addComponent",value:function(e,t){if(e){t&&!e.ctrlName&&(e.ctrlName=t);var r=this._get_data("components")||[];r.indexOf(e)>=0||r.push(e)}}},{key:"removeComponent",value:function(e){var t=this._get_data("components")||[],r=t.indexOf(e);r<0||t.splice(r,1)}},{key:"_applyState",value:function(e,t,r){var n=this;r||this._set_data(e,t,!0);var i="set".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),a=this.doPropertyChange(i,t,r);if(a){var o={};o[e]=t,a.forEach(function(e){n.notifyComponent(e,"setState",o)})}}},{key:"getVisible",value:function(e){return this.getState("visible",e)}},{key:"setVisible",value:function(e,t){this._applyState("visible",e,t)}},{key:"getValue",value:function(){return this.getData()}},{key:"setValue",value:function(e,t,r){var n=this,i=this.getValue();if(e!==i){var a={value:e,oldValue:i},o=this._get_data("forceFireEvent");t||o?this.promiseExecute("beforeValueChange",a,[function(){n._set_data("value",e,!0),n._applyState("value",e,r),n.execute("afterValueChange",a)},function(){n._set_data("value",i,!0),n._applyState("value",i,r)}]):(this._set_data("value",e,!0),this._applyState("value",e,r))}}},{key:"getDisabled",value:function(e){return this.getState("disabled",e)}},{key:"setDisabled",value:function(e,t){this._applyState("disabled",e,t)}},{key:"setParent",value:function(e){this.setCache("parent",e)}},{key:"getParent",value:function(){return this.getCache("parent")}},{key:"getRootParent",value:function(){for(var e=this.getParent();null!==(t=e)&&void 0!==t&&t.getParent();){var t;e=e.getParent()}return e}},{key:"setName",value:function(e){this.setCache("name",e)}},{key:"getName",value:function(){return this.getCache("name")}},{key:"setDirty",value:function(e){e?this._set_data("isDirty",!0):(this._del_data("isDirty"),this._set_data("originalData",this.getData()))}},{key:"getDirtyData",value:function(e){var t=this.getData();return!1!==e&&this._get_data("isDirty")||t!==this._get_data("originalData")?t:void 0}},{key:"clear",value:function(e){void 0===e?this._set_data("value",this._get_data("cDefaultValue")):e||this._set_data("value",void 0),this._del_data("isDirty"),this._del_data("checking"),this._del_data("checkMsg")}},{key:"on",value:function(e,t,r){this._get_data("events").on(e,t,r)}},{key:"onFirst",value:function(e,t,r){this._get_data("events").onFirst(e,t,r)}},{key:"execute",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return(t=this._get_data("events")).execute.apply(t,[e].concat(n))}},{key:"un",value:function(e,t){this._get_data("events").un(e,t)}},{key:"hasEvent",value:function(e){return this._get_data("events").hasEvent(e)}},{key:"fireEvent",value:function(e,t){this._get_data("events").fireEvent(e,t)}},{key:"promiseExecute",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];(r=this._get_data("events")).promiseExecute.apply(r,[e,t].concat(i))}},{key:"setCache",value:function(e,t){this._get_data("cache").set(e,t)}},{key:"getCache",value:function(e){return this._get_data("cache").get(e)}},{key:"clearCache",value:function(e){this._get_data("cache").delete(e)}},{key:"setProxy",value:function(e){if(!(e instanceof DynamicProxy)){var t,r=this._get_data("__requestHeaders__");for(var n in e){var i,a,o;if(r&&(null===(i=e[n])||void 0===i||null===(i=i.options)||void 0===i||!i.requestHeaders))null!==(o=e[n])&&void 0!==o&&o.options||(e[n].options={}),e[n].options.requestHeaders=r;null!==(a=this.getProxy())&&void 0!==a&&a[n]&&isDebug()&&console.warn("[devfab][baseModel.prototype.setProxy]: Proxy ".concat(n," already exists on the model. Please change the name of ").concat(n," and try again"))}return this._set_data("proxy",DynamicProxy.create(_objectSpread2(_objectSpread2({},(null===(t=this.getProxy())||void 0===t?void 0:t.config)||{}),e))),this.getProxy()}this._set_data("proxy",e)}},{key:"getProxy",value:function(){return this._get_data("proxy")}}])}(),SimpleModel$1=function(e){function t(){var e;_classCallCheck(this,t);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _defineProperty(e=_callSuper(this,t,[].concat(n)),"modelType","SimpleModel"),e}return _inherits(t,e),_createClass(t,[{key:"getDisabled",value:function(){return this.getState("disabled")}},{key:"setDisabled",value:function(e,t){this._applyState("disabled",e,t)}},{key:"getReadonly",value:function(){return this.getState("readonly")}},{key:"setReadonly",value:function(e,t){this._applyState("readonly",e,t)}}])}(BaseModel$1),DEFAULT_PAGE_SIZE=20,isArray=Array.isArray;function cloneDeep(e){if(isArray(e))return e.map(cloneDeep);if(e instanceof Date)return new Date(e.getTime());if(e&&"object"===_typeof(e)){var t={};for(var r in e)t[r]=cloneDeep(e[r]);return t}return e}function normalizeColumns(e){var t={};return(isArray(e)?e:Object.keys(e||{}).map(function(t){var r;return _objectSpread2(_objectSpread2({},e[t]||{}),{},{field:(null===(r=e[t])||void 0===r?void 0:r.field)||t})})).forEach(function(e,r){if(e){var n=e.field||e.cFieldName||e.cName||"col_".concat(r);t[n]=_objectSpread2(_objectSpread2({},e),{},{field:n,label:e.label||e.title||e.cCaption||n,index:void 0===e.index?r:e.index})}}),t}function resolveRowsData(e){if(!e)return[];if(isArray(e))return e;if(isArray(e.data))return e.data;if(isArray(e.records))return e.records;if(isArray(e.list))return e.list;if(isArray(e.rows))return e.rows;var t=e.data&&"object"===_typeof(e.data)?e.data:e.result;return isArray(t)?t:t&&"object"===_typeof(t)&&(t.records||t.list||t.rows||t.data)||[]}function createDefaultProps(){var e={id:"_id",selected:"_selected",status:"_status",pageIndex:"pageNo",pageSize:"pageSize",pageCount:"total"};return{columns:{},dataSource:[],rows:[],readOnly:!0,dataSourceMode:"local",columnMode:"local",editMode:"cell",rowKeyField:"id",cellState:{},rowState:{},showCheckBox:!1,multiple:!0,showRowNo:!0,pagination:!0,pageInfo:_defineProperty(_defineProperty(_defineProperty({},e.pageIndex,1),e.pageSize,DEFAULT_PAGE_SIZE),e.pageCount,0),innerUsedAttrs:e,multiRowModel:!1,editRowModels:{},loading:!1,params:{},originalKeyMap:{},defaultRowDatas:new Map}}function resolveProxyConfig(){return _objectSpread2({},(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).proxyConfig||{})}function _getData(e,t,r){var n=this;this.promiseExecute("beforeQuery",{proxyConfig:e,queryParams:t},function(){var i=n,a=n.setProxy({queryData:e}),o=n._get_data("innerUsedAttrs").pageIndex,s={page:_defineProperty(_defineProperty({},n._get_data("innerUsedAttrs").pageSize,n.getPageSize()),o,n.getPageIndex())},u=Object.assign(t,s);n.setCache("proxyCache",{proxyConfig:e,params:u,callback:r});if(!1!==n.execute("beforeQueryData",u)){var c=cloneDeep(u);a.queryData(c,function(e,t,n,i){if(!e){var a=t;this._set_data("dataSourceMode","remote");var o=resolveRowsData(a=Object.assign({},a));this.execute("afterQueryData",a),null==r||r.call(this,o)}},i)}})}function _setData(e){if(this.execute("beforeSetDataSource",e)){var t=this.getRowKeyField(),r={};e.forEach(function(e){r[e[t]]=e}),this._set_data("keyMap",r),this._set_data("dataSource",e,!0),this.doPropertyChange("setDataSource"),this.execute("afterSetDataSource",e)}}var GridModel$1=function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,t);var n=_objectSpread2(_objectSpread2({},createDefaultProps()),r);isArray(n.dataSource)||(n.dataSource=[]),isArray(n.rows)||(n.rows=[]);var i=resolveProxyConfig(r);return n.proxyConfig=i,n.dataSourceMode=r.dataSourceMode||n.dataSourceMode,_defineProperty(e=_callSuper(this,t,[n]),"modelType","GridModel"),e.initColumns(n.columns),e.initPageInfo(r.cPage||r.page),e.afterInit(),e}return _inherits(t,e),_createClass(t,[{key:"afterInit",value:function(){this.execute("afterInit")}},{key:"initColumns",value:function(e){var t=normalizeColumns(e);return this._set_data("columns",t,!0),t}},{key:"initPageInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=_objectSpread2({},this.getPageInfo()),r=this._get_data("innerUsedAttrs").pageIndex,n=this._get_data("innerUsedAttrs").pageSize;t[r]=e.pageNo||e.pageIndex||t.pageIndex||1,t[n]=e.pageSize||t.pageSize||DEFAULT_PAGE_SIZE,!1===this.get("pagination")&&(t[r]=-1),this._set_data("pageInfo",t)}},{key:"getRowKeyField",value:function(){return this._get_data("rowKeyField")}},{key:"isRemote",value:function(){return"remote"===this._get_data("dataSourceMode")}},{key:"getReadOnly",value:function(){return!!this._get_data("readOnly")}},{key:"setReadOnly",value:function(e){this._applyState("readOnly",!!e)}},{key:"setShowCheckbox",value:function(e){this._applyState("showCheckBox",!!e)}},{key:"setShowRowNo",value:function(e){this._applyState("showRowNo",!!e)}},{key:"getParams",value:function(){return _objectSpread2(_objectSpread2({},this.get("cParams")||{}),this._get_data("params")||{})}},{key:"setParams",value:function(e){this._set_data("params",e||{})}},{key:"getInnerUsedAttrs",value:function(e){var t=this._get_data("innerUsedAttrs");return e?t[e]:t}},{key:"getId",value:function(){return this.getInnerUsedAttrs("id")}},{key:"setDataSource",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("local"===this._get_data("dataSourceMode")){_setData(isArray(e)?e:[])}else{if(!this.execute("beforeProxyLoad",r))return;this.setPageIndex(1),_getData.call(this,e,r,function(e){_setData.call(t,e),null==n||n.call(t)})}}},{key:"reloadData",value:function(){var e=this,t=this.getCache("proxyCache");if(t){var r=t.proxyConfig,n=t.params,i=t.callback;_getData.call(this,r,n,function(t){null==i||i.call(e,t)})}else isDebug()&&console.log("[devfab][GridModel] proxyConfig is null")}},{key:"getDataSource",value:function(){return this._get_data("dataSource")||[]}},{key:"getData",value:function(e){return e?this._get_data("rows"):this._get_data("dataSource")}},{key:"getAllData",value:function(){return this.getData(!0)}},{key:"clear",value:function(){this._set_data("dataSource",[],!0),this._set_data("rows",[],!0)}},{key:"getPageInfo",value:function(){return this._get_data("pageInfo")}},{key:"getPageIndex",value:function(){var e=this._get_data("innerUsedAttrs").pageIndex;return this.getPageInfo()[e]}},{key:"getPageSize",value:function(){var e=this._get_data("innerUsedAttrs").pageSize;return this.getPageInfo()[e]}},{key:"getTotalCount",value:function(){var e=this._get_data("innerUsedAttrs").pageCount;return this.getPageInfo()[e]}},{key:"setPageInfo",value:function(e){var t=this.getPageInfo();this._set_data("pageInfo",_objectSpread2(_objectSpread2({},t),e)),this.reloadData()}},{key:"setPageIndex",value:function(e){if("number"==typeof e){var t=this._get_data("innerUsedAttrs").pageIndex;this._set_data("pageInfo",_objectSpread2(_objectSpread2({},this.getPageInfo()),{},_defineProperty({},t,Math.max(1,e))))}}},{key:"setPageSize",value:function(e){if("number"==typeof e){var t=this._get_data("innerUsedAttrs").pageIndex,r=this._get_data("innerUsedAttrs").pageSize;this._set_data("pageInfo",_objectSpread2(_objectSpread2({},this.getPageInfo()),{},_defineProperty(_defineProperty({},r,Math.max(-1,e)),t,1)))}}},{key:"setTotalCount",value:function(e){var t=this._get_data("innerUsedAttrs").pageCount;this.getPageInfo()[t]=e}}])}(BaseModel$1),ViewModel$1=function(e){function t(){var e;_classCallCheck(this,t);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _defineProperty(e=_callSuper(this,t,[].concat(n)),"modelType","ViewModel"),e}return _inherits(t,e),_createClass(t,[{key:"getParams",value:function(){return this._get_data("params")}},{key:"setParams",value:function(e){this._set_data("params",e,!0)}},{key:"set",value:function(e,t){t instanceof BaseModel$1&&(t.setParent(this),t.setName(e)),this._set_data(e,t,!0)}},{key:"setData",value:function(e){for(var t in e)this.addProperty(t,e[t])}},{key:"addProperty",value:function(e,t){var r=this.get(e);null!=r&&r.setData?r.setData(t):this.set(e,t)}},{key:"getData",value:function(){var e=this,t=this._get_data("propertyNames")||[],r={};return t.forEach(function(t){var n,i=e.get(t);i instanceof BaseModel$1&&!1!==i._get_data("needCollect")&&(r[t]=null===(n=i.getData)||void 0===n?void 0:n.call(i))}),r}},{key:"getAllData",value:function(e){var t=this,r=this._get_data("propertyNames")||[],n={};return r.forEach(function(r){var i,a=t.get(r);if(a instanceof BaseModel$1&&!1!==a._get_data("needCollect")&&(!e||!a._get_data("isGrid"))){var o=null===(i=a.getData)||void 0===i?void 0:i.call(a);void 0!==o&&(n[r]=o)}}),n}},{key:"removeProperty",value:function(e){var t=this._get_data("propertyNames")||[],r=t.indexOf(e);-1!==r&&t.splice(r,1),this._del_data(e)}},{key:"loadData",value:function(e){this.setCache("isLoadData",!0),this.clear(),this.setData(e),this.setDirty(!1),this.setCache("isLoadData",!1)}},{key:"clear",value:function(e){var t=this;(this._get_data("propertyNames")||[]).forEach(function(r){var n,i=t.get(r);i instanceof BaseModel$1&&!1!==i._get_data("needClear")&&(null===(n=i.clear)||void 0===n||n.call(i,e))})}},{key:"setDirty",value:function(e){e?this._set_data("isDirty",!0):(this._del_data("isDirty"),this._set_data("originalData",this.getData()))}},{key:"getGridModel",value:function(e){var t;if(e)return this.get(e);var r=this._get_data("gridModel");if(r)return r;var n=null===(t=this.getParams())||void 0===t?void 0:t.masterGridModelName;if(n)return this.get(n);for(var i=this._get_data("propertyNames"),a=0,o=i.length;a<o;a++){if((r=this.get(i[a]))instanceof GridModel$1||"GridModel"==r.modelType)return this._set_data("gridModel",r),r}}},{key:"getGridModels",value:function(){for(var e=this._get_data("propertyNames"),t=[],r=0,n=e.length;r<n;r++){var i=this.get(e[r]);(i instanceof GridModel$1||"GridModel"==i.modelType)&&t.push(i)}return t}},{key:"getGridFilterModel",value:function(e){return this.getGridModel(e).getCache("FilterViewModel")}}])}(BaseModel$1);function missingLoaderResult(e){return{code:404,message:"params.fileRequire is required, the files: ".concat(e),data:[],warnings:[]}}function loadScripts(e,t,r,n,i){var a,o=t,s=r,u=n,c=i;Array.isArray(t)&&"function"==typeof r&&(o=void 0,s=t,u=r,c=n);var l=(null===(a=c)||void 0===a?void 0:a.viewModel)||this,d=(s=Array.isArray(s)?s:[]).join(",");if(!e||"function"!=typeof e.inject){var f,p=missingLoaderResult(d);return isDebug()&&console.error("[devfab][models][extend][loadScripts] ".concat(p.message)),null===(f=u)||void 0===f||f(p),p}return e.inject(o,s,function(e){var t;if(0==e.code&&Array.isArray(e.data))for(var r=0,n=e.data.length;r<n;r++){var i=e.data[r];if(i&&i.doAction)try{i.doAction("init",l)}catch(t){e.code=500,e.message="".concat(d," script execute error"),e.error=t;break}else try{var a;"function"==typeof(null===(a=c)||void 0===a?void 0:a.onFileBack)&&c.onFileBack(i,r)}catch(t){e.code=500,e.message="".concat(d," script customize execute error");break}}0!=e.code&&isDebug()&&console.info("[devfab][models][extend][loadScripts] ".concat(d," \n [message]: ").concat(e.message," \n").concat(e.error?" \n [error]: ":""),e.error),null===(t=u)||void 0===t||t(e)})}function initExtendScripts(e){var t=this;window.__devfab&&window.__devfab.__debugger_initExtendJs;var r=e.fileRequire,n=e.extendScriptParams,i=e.readyEventName,a=void 0===i?"extendReady":i,o=n||{},s=o.enableJs,u=void 0!==s&&s,c=o.filepath,l=o.scriptUrl;if(!u)return isDebug()&&console.info("[devfab][extend][js] not enable extend script"),void t.execute(a,t);if(!l)return isDebug()&&console.info("[devfab][extend][js] extend script is not defined"),void t.execute(a,t);var d=c,f=[l];t.getEnv&&t.getEnv("everyCommonExtend")&&f.push(t.getEnv("everyCommonExtend")),loadScripts.call(t,r,d,f,function(e){t.execute(a,t,e)})}var initExtScripts=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,r,n){var i,a,o,s,u,c,l,d,f,p,h;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(window.__devfab&&window.__devfab.__debugger_initExtJs,o=n.fileRequire,s=n.extendScriptParams,c=(u=s||{}).enableExtJs,l=void 0!==c&&c,d=u.exturlsField,f=void 0===d?"extscripturls":d,l){e.n=1;break}return isDebug()&&console.info("[devfab][extend][exturls] ext script is not enable"),e.a(2,Promise.resolve(!0));case 1:if(t){e.n=2;break}return isDebug()&&console.info("[devfab][extend][exturls] script data is null"),e.a(2,Promise.resolve(!0));case 2:if(p=null==t?void 0:t[f],h=Array.isArray(p)?p:[],h=(h=(r.getCache("localScripts")||[]).concat(h)).concat(window.__devfab__GLOBAL_EXT_SCRIPTS__||[]),null!==(i=r.getParams())&&void 0!==i&&i.selfExtUrls&&(h=h.concat([r.getParams().selfExtUrls])),null===(a=h)||void 0===a||!a.length){e.n=4;break}return h=_toConsumableArray(new Set(h)),e.n=3,Promise.all(h.map(function(){var e=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,t)},e)}));return function(t){return e.apply(this,arguments)}}()));case 3:h=e.v;case 4:return t[f]=h,e.a(2,new Promise(function(e,t){loadScripts.call(r,o,h,function(t){e(t)})}))}},e)}));return function(t,r,n){return e.apply(this,arguments)}}(),BaseModel=BaseModel$1,SimpleModel=SimpleModel$1,ViewModel=ViewModel$1,GridModel=GridModel$1;function createModelFactory(e,t){var r=(null==t?void 0:t.SimpleModel)||SimpleModel$1,n=e.cControlType||e.component||e.controlType||e.ctrlType;return n=n.toLowerCase(),new r(e)}function _createViewModel(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.modelNameField,i=void 0===n?"cName":n,a=function(e){function t(){return _classCallCheck(this,t),_callSuper(this,t,arguments)}return _inherits(t,e),_createClass(t,[{key:"init",value:function(e,t){var r=this.createModels(e,t);this.setData(r),this.setDirty(!1)}},{key:"createModels",value:function(e,t){var n={};return(Array.isArray(e)?e:[]).forEach(function(e){var t,a,o={model:createModelFactory(e,r),meta:e,childModel:!0,modelName:e[i]};null==r||null===(t=r.onBeforeInitModel)||void 0===t||t.call(r,o),n[o.modelName]=o.model,null==r||null===(a=r.onAfterInitModel)||void 0===a||a.call(r,o)}),n}},{key:"initData",value:function(){initExtendScripts.call(this,r)}}])}((null==r||null===(t=r.models)||void 0===t?void 0:t.ViewModel)||ViewModel$1);return a.prototype.modelType="ViewModel",a}function _initViewModel(e,t){var r,n,i,a=new(_createViewModel(e,t)),o={model:a,meta:e};return null==t||null===(r=t.onBeforeInitModel)||void 0===r||r.call(t,o),o.model=a,null==a||null===(n=a.init)||void 0===n||n.call(a,e.models,e),null==t||null===(i=t.onAfterInitModel)||void 0===i||i.call(t,o),a}function initViewModel(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=_initViewModel(e,t);return n.on("destroyVM",function(){var e,t;null===(e=n)||void 0===e||null===(t=e.destroyVM)||void 0===t||t.call(e),n=null,isDebug()&&console.info("[devfab][models][initVM]: destory vm ".concat((new Date).toString()))}),n.on("extendReady",_asyncToGenerator(_regenerator().m(function i(){var a;return _regenerator().w(function(i){for(;;)switch(i.n){case 0:return(a=[]).push(initExtScripts(e,n,t)),i.n=1,Promise.all(a);case 1:isDebug()&&console.info("[devfab][models][initVM]: after vm init ".concat((new Date).toString())),null==r||r(n,e);case 2:return i.a(2)}},i)}))),n.initData(),n}var models=Object.freeze({__proto__:null,BaseModel:BaseModel,SimpleModel:SimpleModel,GridModel:GridModel,ViewModel:ViewModel,initViewModel:initViewModel,loadScripts:loadScripts}),utils={models:models,Builder:Builder,Cache:Cache,Event:Event,Ajax:DynamicProxy},devfab={get debug(){return!(!window.__devfab||!window.__devfab.debug)},set debug(e){window.__devfab=window.__devfab||{},window.__devfab.debug=!!e},define:function(){FileRequire.provide.apply(FileRequire,arguments)},require:function(){FileRequire.inject.apply(FileRequire,arguments)},provide:function(){FileRequire.provide.apply(FileRequire,arguments)},inject:function(){FileRequire.inject.apply(FileRequire,arguments)},provideScript:function(){FileRequire.provideScript.apply(FileRequire,arguments)},injectScript:function(){FileRequire.injectScript.apply(FileRequire,arguments)},FileRequire:FileRequire,utils:_objectSpread2(_objectSpread2({},utils),{},{builder:utils.Builder.create(),cache:utils.Cache.create(),event:utils.Event.create()})};window.__devfab=Object.assign({},window.__devfab,devfab),exports.default=devfab,Object.defineProperty(exports,"__esModule",{value:!0})});
7
+ */var __requirejs={};(function(global,setTimeout){var requirejs,require,define,req,s,head,baseElement,dataMain,src,body,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.2",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var r;if(e)for(r=0;r<e.length&&(!e[r]||!t(e[r],r,e));r+=1);}function eachReverse(e,t){var r;if(e)for(r=e.length-1;r>-1&&(!e[r]||!t(e[r],r,e));r-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var r;for(r in e)if(hasProp(e,r)&&t(e[r],r))break}function mixin(e,t,r,n){return t&&eachProp(t,function(t,i){!r&&hasProp(e,i)||(!n||"object"!==_typeof(t)||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[i]=t:(e[i]||(e[i]={}),mixin(e[i],t,r,n)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,r,n){var i=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return i.requireType=e,i.requireModules=n,r&&(i.originalError=r),i}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,r,n){var i,a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=defContextName;return isArray(e)||"string"==typeof e||(a=e,isArray(t)?(e=t,t=r,r=n):e=[]),a&&a.context&&(s=a.context),o.name&&(s=o.name),(i=getOwn(contexts,s))||(i=contexts[s]=req.s.newContext(s,o)),a&&i.configure(a),i.require(e,t,r)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$|\.css$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],body=s.body=document.getElementsByTagName("body")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,r){var n,i="";try{r.split("?")[0].endsWith(".css")&&(i="css")}catch(e){}return"css"===i?((n=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:link"):document.createElement("link")).href=r,n.rel="stylesheet",n.type=e.linkType||"text/css",n):((n=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script")).type=e.scriptType||"text/javascript",n.charset="utf-8",n.async=!1,n)},req.load=function(e,t,r){var n,i=e&&e.config||{};if(isBrowser)return(n=req.createNode(i,t,r)).setAttribute("data-requirecontext",e.contextName),n.setAttribute("data-requiremodule",t),!n.attachEvent||n.attachEvent.toString&&n.attachEvent.toString().indexOf("[native code")<0||isOpera?(n.addEventListener("load",e.onScriptLoad,!1),n.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,n.attachEvent("onreadystatechange",e.onScriptLoad)),n.src=r,i.onNodeCreated&&i.onNodeCreated(n,i,t,r),currentlyAddingScript=n,baseElement?head.insertBefore(n,baseElement):body?body.appendChild(n):head.appendChild(n),currentlyAddingScript=null,n;if(isWebWorker)try{setTimeout(function(){},0),importScripts(r),e.completeLoad(t)}catch(n){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+r,n,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,r){var n,i;"string"!=typeof e&&(r=t,t=e,e=null),isArray(t)||(r=t,t=null),!t&&isFunction(r)&&(t=[],r.length&&(r.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,r){t.push(r)}),t=(1===r.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(n=currentlyAddingScript||getInteractiveScript())&&(e||(e=n.getAttribute("data-requiremodule")),i=contexts[n.getAttribute("data-requirecontext")]),i?(i.defQueue.push([e,t,r]),i.defQueueMap[e]=!0):globalDefQueue.push([e,t,r])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},__requirejs.require=require,__requirejs.define=define,req(cfg)}function newContext(e){var t,r,n,i,a,o={waitSeconds:(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).waitSeconds||30,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},s={},u={},c={},l=[],f={},d={},p={},h=1,v=1;function y(e,t,r){var n,i,a,s,u,c,l,f,d,p,h=t&&t.split("/"),v=o.map,y=v&&v["*"];if(e&&(c=(e=e.split("/")).length-1,o.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),function(e){var t,r;for(t=0;t<e.length;t++)if("."===(r=e[t]))e.splice(t,1),t-=1;else if(".."===r){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),r&&v&&(h||y)){for(a=(i=e.split("/")).length;a>0;a-=1){if(u=i.slice(0,a).join("/"),h){var g=!1;for(s=h.length;s>0;s-=1)if((n=getOwn(v,h.slice(0,s).join("/")))&&(n=getOwn(n,u))){l=n,f=a,g=!0;break}if(g)break}!d&&y&&getOwn(y,u)&&(d=getOwn(y,u),p=a)}!l&&d&&(l=d,f=p),l&&(i.splice(0,f,l),e=i.join("/"))}return getOwn(o.pkgs,e)||e}function g(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===n.contextName)return t.parentNode.removeChild(t),!0})}function _(e){var t=getOwn(o.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),n.require.undef(e),n.makeRequire(null,{skipMap:!0})([e]),!0}function m(e){var t,r=e?e.indexOf("!"):-1;return r>-1&&(t=e.substring(0,r),e=e.substring(r+1,e.length)),[t,e]}function b(e,t,r,i){var a,o,s,u,c=null,l=t?t.name:null,d=e,p=!0,g="";return e||(p=!1,e="_@r"+(h+=1)),c=(u=m(e))[0],e=u[1],c&&(c=y(c,l,i),o=getOwn(f,c)),e&&(c?g=o&&o.normalize?o.normalize(e,function(e){return y(e,l,i)}):-1===e.indexOf("!")?y(e,l,i):e:(c=(u=m(g=y(e,l,i)))[0],g=u[1],r=!0,a=n.nameToUrl(g))),{prefix:c,name:g,parentMap:t,unnormalized:!!(s=!c||o||r?"":"_unnormalized"+(v+=1)),url:a,originalName:d,isDefine:p,id:(c?c+"!"+g:g)+s}}function x(e){var t=e.id,r=getOwn(s,t);return r||(r=s[t]=new n.Module(e)),r}function k(e,t,r){var n=e.id,i=getOwn(s,n);!hasProp(f,n)||i&&!i.defineEmitComplete?(i=x(e)).error&&"error"===t?r(i.error):i.on(t,r):"defined"===t&&r(f[n])}function w(e,t){var r=e.requireModules,n=!1;t?t(e):(each(r,function(t){var r=getOwn(s,t);r&&(r.error=e,r.events.error&&(n=!0,r.emit("error",e)))}),n||req.onError(e))}function S(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(n.defQueueMap[t]=!0),l.push(e)}),globalDefQueue=[])}function P(e){delete s[e],delete u[e]}function A(e,t,r){var n=e.map.id;e.error?e.emit("error",e.error):(t[n]=!0,each(e.depMaps,function(n,i){var a=n.id,o=getOwn(s,a);!o||e.depMatched[i]||r[a]||(getOwn(t,a)?(e.defineDep(i,f[a]),e.check()):A(o,t,r))}),r[n]=!0)}function C(){var e,r,i=1e3*o.waitSeconds,s=i&&n.startTime+i<(new Date).getTime(),c=[],l=[],f=!1,d=!0;if(!t){if(t=!0,eachProp(u,function(e){var t=e.map,n=t.id;if(e.enabled&&(t.isDefine||l.push(e),!e.error))if(!e.inited&&s)_(n)?(r=!0,f=!0):(c.push(n),g(n));else if(!e.inited&&e.fetched&&t.isDefine&&(f=!0,!t.prefix))return d=!1}),s&&c.length)return(e=makeError("timeout","Load timeout for modules: "+c,null,c)).contextName=n.contextName,w(e);d&&each(l,function(e){A(e,{},{})}),s&&!r||!f||!isBrowser&&!isWebWorker||a||(a=setTimeout(function(){a=0,C()},50)),t=!1}}function j(e){hasProp(f,e[0])||x(b(e[0],null,!0)).init(e[1],e[2])}function q(e,t,r,n){e.detachEvent&&!isOpera?n&&e.detachEvent(n,t):e.removeEventListener(r,t,!1)}function E(e){var t=e.currentTarget||e.srcElement;return q(t,n.onScriptLoad,"load","onreadystatechange"),q(t,n.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function O(){var e;for(S();l.length;){if(null===(e=l.shift())[0])return w(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));j(e)}n.defQueueMap={}}return i={require:function(e){return e.require?e.require:e.require=n.makeRequire(e.map)},exports:function(e){e.usingExports=!0,e.map.isDefine&&(e.exports?f[e.map.id]=e.exports:e.exports=f[e.map.id]={})},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(o.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(r=function(e){this.events=getOwn(c,e.id)||{},this.map=e,this.shim=getOwn(o.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,r,n){n=n||{},this.inited||(this.factory=t,r?this.on("error",r):this.events.error&&(r=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=r,this.inited=!0,this.ignore=n.ignore,n.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,n.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();n.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;d[e]||(d[e]=!0,n.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,r=this.map.id,i=this.depExports,a=this.exports,o=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{a=n.execCb(r,o,i,a)}catch(t){e=t}else a=n.execCb(r,o,i,a);if(this.map.isDefine&&void 0===a&&((t=this.module)?a=t.exports:this.usingExports&&(a=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",w(this.error=e)}else a=o;if(this.exports=a,this.map.isDefine&&!this.ignore&&(f[r]=a,req.onResourceLoad)){var s=[];each(this.depMaps,function(e){s.push(e.normalizedMap||e)}),req.onResourceLoad(n,this.map,s)}P(r),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(n.defQueueMap,r)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,r=b(e.prefix);this.depMaps.push(r),k(r,"defined",bind(this,function(r){var i,a,u,c=getOwn(p,this.map.id),l=this.map.name,f=this.map.parentMap?this.map.parentMap.name:null,d=n.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(r.normalize&&(l=r.normalize(l,function(e){return y(e,f,!0)})||""),k(a=b(e.prefix+"!"+l,this.map.parentMap),"defined",bind(this,function(e){this.map.normalizedMap=a,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((u=getOwn(s,a.id))&&(this.depMaps.push(a),this.events.error&&u.on("error",bind(this,function(e){this.emit("error",e)})),u.enable()))):c?(this.map.url=n.nameToUrl(c),void this.load()):((i=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})})).error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(s,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&P(e.map.id)}),w(e)}),i.fromText=bind(this,function(r,a){var s=e.name,u=b(s),c=useInteractive;a&&(r=a),c&&(useInteractive=!1),x(u),hasProp(o.config,t)&&(o.config[s]=o.config[t]);try{req.exec(r)}catch(e){return w(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0),this.depMaps.push(u),n.completeLoad(s),d([s],i)}),void r.load(e.name,d,i,o))})),n.enable(r,this),this.pluginMaps[r.id]=r},enable:function(){u[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var r,a,o;if("string"==typeof e){if(e=b(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,o=getOwn(i,e.id))return void(this.depExports[t]=o(this));this.depCount+=1,k(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?k(e,"error",bind(this,this.errback)):this.events.error&&k(e,"error",bind(this,function(e){this.emit("error",e)}))}r=e.id,a=s[r],hasProp(i,r)||!a||a.enabled||n.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(s,e.id);t&&!t.enabled&&n.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var r=this.events[e];r||(r=this.events[e]=[]),r.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},n={config:o,contextName:e,registry:s,defined:f,urlFetched:d,defQueue:l,defQueueMap:{},Module:r,makeModuleMap:b,nextTick:req.nextTick,onError:w,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,r){return(-1===r.indexOf("?")?"?":"&")+t}}var r=o.shim,i={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){i[t]?(o[t]||(o[t]={}),mixin(o[t],e,!0,!0)):o[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(p[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=n.makeShimExports(e)),r[t]=e}),o.shim=r),e.packages&&each(e.packages,function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(o.paths[t]=e.location),o.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(s,function(e,t){e.inited||e.map.unnormalized||(e.map=b(t,null,!0))}),(e.deps||e.callback)&&n.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}},makeRequire:function(t,r){function a(o,u,c){var l,d;return r.enableBuildCallback&&u&&isFunction(u)&&(u.__requireJsBuild=!0),"string"==typeof o?isFunction(u)?w(makeError("requireargs","Invalid require call"),c):t&&hasProp(i,o)?i[o](s[t.id]):req.get?req.get(n,o,t,a):(l=b(o,t,!1,!0).id,hasProp(f,l)?f[l]:w(makeError("notloaded",'Module name "'+l+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(O(),n.nextTick(function(){O(),(d=x(b(null,t))).skipMap=r.skipMap,d.init(o,u,c,{enabled:!0}),C()}),a)}return r=r||{},mixin(a,{isBrowser:isBrowser,toUrl:function(e){var r,i=e.lastIndexOf("."),a=e.split("/")[0];return-1!==i&&(!("."===a||".."===a)||i>1)&&(r=e.substring(i,e.length),e=e.substring(0,i)),n.nameToUrl(y(e,t&&t.id,!0),r,!0)},defined:function(e){return hasProp(f,b(e,t,!1,!0).id)},specified:function(e){return e=b(e,t,!1,!0).id,hasProp(f,e)||hasProp(s,e)}}),t||(a.undef=function(e){S();var r=b(e,t,!0),i=getOwn(s,e);i.undefed=!0,g(e),delete f[e],delete d[r.url],delete c[e],eachReverse(l,function(t,r){t[0]===e&&l.splice(r,1)}),delete n.defQueueMap[e],i&&(i.events.defined&&(c[e]=i.events),P(e))}),a},enable:function(e){getOwn(s,e.id)&&x(e).enable()},completeLoad:function(e){var t,r,i,a=getOwn(o.shim,e)||{},u=a.exports;for(S();l.length;){if(null===(r=l.shift())[0]){if(r[0]=e,t)break;t=!0}else r[0]===e&&(t=!0);j(r)}if(n.defQueueMap={},i=getOwn(s,e),!t&&!hasProp(f,e)&&i&&!i.inited){if(!(!o.enforceDefine||u&&getGlobal(u)))return _(e)?void 0:w(makeError("nodefine","No define call for "+e,null,[e]));j([e,a.deps||[],a.exportsFn])}C()},nameToUrl:function(e,t,r){var i,a,s,u,c,l,f=getOwn(o.pkgs,e);if(f&&(e=f),l=getOwn(p,e))return n.nameToUrl(l,t,r);if(req.jsExtRegExp.test(e))u=e+(t||"");else{for(i=o.paths,s=(a=e.split("/")).length;s>0;s-=1)if(c=getOwn(i,a.slice(0,s).join("/"))){isArray(c)&&(c=c[0]),a.splice(0,s,c);break}u=a.join("/"),u=("/"===(u+=t||(/^data:|^blob:|\?/.test(u)||r?"":".js")).charAt(0)||u.match(/^[\w+.-]+:/)?"":o.baseUrl)+u}return o.urlArgs&&!/^blob:/.test(u)?u+o.urlArgs(e,u):u},load:function(e,t){req.load(n,e,t)},execCb:function(e,t,r,n){return t.apply(n,r)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=E(e);n.completeLoad(t.id)}},onScriptError:function(e){var t=E(e);if(!_(t.id)){var r=[];return eachProp(s,function(e,n){0!==n.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return r.push(n),!0})}),w(makeError("scripterror",'Script error for "'+t.id+(r.length?'", needed by: '+r.join(", "):'"'),e,[t.id]))}}},n.require=n.makeRequire(),n}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript}})("undefined"!=typeof window?window:globalThis,"undefined"==typeof setTimeout?void 0:setTimeout),function(e){if(!__requirejs.__requirejsAdapterApplied){__requirejs.__requirejsAdapterApplied=!0;var t=__requirejs.require,r=__requirejs.define,n=function(e,r,n,i){var a=e,o=r,s=n,u=i;if(Array.isArray(e)&&"function"==typeof r)t(o=e,s=r,u=n);else{if(!e&&Array.isArray(o)&&(a=[]),Array.isArray(a)&&Array.isArray(o)){var c=a;a="",c.forEach(function(e){a+="".concat("/"===e.substr(0,1)?"":"/").concat(e)})}var l=a?[]:o;"string"==typeof a&&a&&Array.isArray(o)&&o.forEach(function(e){l.push("".concat(a).concat("/"===e.substr(0,1)?"":"/").concat(e))}),console.debug("[devfab][requirejs]: %c requireInner, Parameter[newdeps] is %o","color:fuchsia",l),t(l,s,u)}},i=function(e,t,n){var i=e,a=t,o=n;if(Array.isArray(e)&&"function"==typeof t)r(a=e,o=t);else{if(!e&&Array.isArray(a)&&(i=[]),Array.isArray(i)&&Array.isArray(a)){var s=i;i="",s.forEach(function(e){i+="".concat("/"===e.substr(0,1)?"":"/").concat(e)})}var u=i?[]:a;"string"==typeof i&&i&&Array.isArray(a)&&a.forEach(function(e){u.push("".concat(i).concat("/"===e.substr(0,1)?"":"/").concat(e))}),r(u,o)}};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&void 0===n[a]&&(n[a]=t[a]);n.__devfabAdapterApplied=!0,i.__devfabAdapterApplied=!0,__requirejs._require=t,__requirejs._define=r,__requirejs.require=n,__requirejs.define=i}}();var CODE_POLICY=403;function normalizePath(e){return String(null==e?"":e).replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"")}function isAbsoluteUrl(e){return/^(?:[a-z][a-z0-9+.-]*:)?\/\//i.test(e)||/^(?:blob|data):/i.test(e)}function toHex(e){for(var t=new Uint8Array(e),r="",n=0;n<t.length;n++)r+=t[n].toString(16).padStart(2,"0");return r}var LoadPolicy=function(){return _createClass(function e(t){_classCallCheck(this,e),this.manifest=null,this.origins=null,this.lockVersion=null,this.verifyHash=!0,this.fetch=null,this._index=null,this.configure(t)},[{key:"configure",value:function(e){var t=e||{};return void 0!==t.manifest&&(this.manifest=t.manifest||null),void 0!==t.origins&&(this.origins=t.origins?[].concat(t.origins).map(function(e){return String(e).trim().replace(/\/+$/,"")}):null),void 0!==t.lockVersion&&(this.lockVersion=t.lockVersion||null),void 0!==t.verifyHash&&(this.verifyHash=!!t.verifyHash),void 0!==t.fetch?this.fetch=t.fetch||null:this.fetch||"function"!=typeof fetch||(this.fetch=function(){return fetch.apply(void 0,arguments)}),this._index=null,this}},{key:"enabled",get:function(){return!!this.manifest}},{key:"_moduleIndex",value:function(){if(this._index)return this._index;var e={},t=this.manifest&&this.manifest.modules;return Array.isArray(t)?t.forEach(function(t){t&&t.path&&(e[normalizePath(t.path)]=t)}):t&&"object"===_typeof(t)&&Object.keys(t).forEach(function(r){e[normalizePath(r)]=t[r]||{}}),this._index=e,e}},{key:"entryOf",value:function(e){return this.manifest&&this._moduleIndex()[normalizePath(e)]||null}},{key:"checkVersion",value:function(){if(!this.lockVersion||!this.manifest)return null;var e=String(this.manifest.version||"");return e===String(this.lockVersion)?null:{code:CODE_POLICY,message:"清单版本 ".concat(e||"(未声明)"," 与锁定版本 ").concat(this.lockVersion," 不一致,拒绝加载")}}},{key:"checkModules",value:function(e){var t=this.checkVersion();if(t)return t;if(!this.manifest)return null;for(var r=0;r<e.length;r++){var n=normalizePath(e[r]);if(!this._moduleIndex()[n])return{code:CODE_POLICY,message:"Module ".concat(n," not registered in the list, loading denied.")}}return null}},{key:"checkOrigin",value:function(e){if(!this.origins)return null;if(!isAbsoluteUrl(e))return null;var t;try{t=new URL(e).origin}catch(t){return{code:CODE_POLICY,message:"无法解析的地址:".concat(e)}}return-1===this.origins.indexOf(t)?{code:CODE_POLICY,message:"来源 ".concat(t," 不在白名单内(允许:").concat(this.origins.join(", "),")")}:null}},{key:"verify",value:function(e,t){var r=this;if(!this.verifyHash)return Promise.resolve({ok:!0,skipped:"disabled"});if(!t)return Promise.resolve({ok:!0});var n="undefined"!=typeof globalThis&&globalThis.crypto&&globalThis.crypto.subtle;return n?this.fetch?Promise.resolve().then(function(){return r.fetch(e)}).then(function(e){return e&&e.ok?e.arrayBuffer().then(function(e){return n.digest("SHA-256",e)}):{ok:!1,message:"完整性预检请求失败:HTTP ".concat(e&&e.status||"unknown")}}).then(function(e){if(!e||!1===e.ok)return e;var r=toHex(e),n=String(t).toLowerCase();return r!==n?{ok:!1,message:"sha256 不匹配:期望 ".concat(n,",实际 ").concat(r)}:{ok:!0}}).catch(function(e){return{ok:!1,message:"完整性预检异常:".concat(e&&e.message||e),error:e}}):Promise.resolve({ok:!0,skipped:"fetch unavailable"}):Promise.resolve({ok:!0,skipped:"crypto.subtle unavailable(需要 https / localhost)"})}},{key:"describe",value:function(){return{manifest:this.enabled?this.manifest.name||"(unnamed)":null,version:this.manifest&&this.manifest.version||null,lockVersion:this.lockVersion,modules:this.enabled?Object.keys(this._moduleIndex()).length:0,origins:this.origins?this.origins.slice():null,verifyHash:this.verifyHash}}}])}(),CODE_TIMEOUT=504,nativeImport=null;try{nativeImport=new Function("s","return import(s)")}catch(e){nativeImport=null}function parseArgs(e,t,r,n){var i=e,a=t,o=r;Array.isArray(e)&&!Array.isArray(t)&&(i=void 0,a=e,o="function"==typeof t?t:r);var s=(a=Array.isArray(a)?a:[]).join(","),u={code:0,message:"",data:[]};return("require"===n.type&&"function"!=typeof n.require||"define"===n.type&&"function"!=typeof n.define)&&(u.code=404,u.message="requirejs is undefined, the fiels: ".concat(s)),{path:i,files:a,callback:o,filesStr:s,result:u}}function toModuleIds(e,t){var r="";return Array.isArray(e)?r=e.filter(Boolean).join("/"):"string"==typeof e&&(r=e.replace(/\/+$/,"")),t.map(function(e){var t=String(e).replace(/^\/+/,"");return r?"".concat(r,"/").concat(t):t})}function toNumber(e,t){var r=Number(e);return Number.isFinite(r)?r:t}var DEFAULT_OPTIONS={version:"",timeout:15e3,retry:0,baseUrl:""},BaseFileRequire=function(){return _createClass(function e(t){_classCallCheck(this,e),this.__init(t)},[{key:"__init",value:function(e){var t=e||{};void 0!==t.debug&&(this.debug=!!t.debug);var r=__requirejs.require;this.__data={define:__requirejs.define,require:r,undef:"function"==typeof(null==r?void 0:r.undef)?r.undef:null,requireConfig:this._pickRequireConfig(r),importImpl:t.importer||null,setTimer:t.setTimeout||function(e,t){return setTimeout(e,t)},clearTimer:t.clearTimeout||function(e){return clearTimeout(e)},options:{version:t.version?String(t.version):DEFAULT_OPTIONS.version,timeout:void 0===t.timeout?DEFAULT_OPTIONS.timeout:Math.max(0,toNumber(t.timeout,0)),retry:void 0===t.retry?DEFAULT_OPTIONS.retry:Math.max(0,toNumber(t.retry,0)),baseUrl:t.baseUrl||DEFAULT_OPTIONS.baseUrl},policy:new LoadPolicy(t)},this.__data.options.version&&this._applyUrlArgs()}},{key:"debug",get:function(){var e="undefined"!=typeof window?window.__devfab:null;return!(!e||!e.debug)},set:function(e){"undefined"!=typeof window&&(window.__devfab=window.__devfab||{},window.__devfab.debug=!!e)}},{key:"_pickRequireConfig",value:function(e){return e&&"function"==typeof e.config?e.config.bind(e):null}},{key:"configure",value:function(e){var t=e||{},r=this.__data,n=r.options,i=r.policy;return void 0!==t.debug&&(this.debug=!!t.debug),void 0!==t.version&&this.setVersion(t.version),void 0!==t.timeout&&(n.timeout=Math.max(0,toNumber(t.timeout,n.timeout))),void 0!==t.retry&&(n.retry=Math.max(0,toNumber(t.retry,n.retry))),void 0!==t.baseUrl&&(n.baseUrl=t.baseUrl||""),void 0===t.manifest&&void 0===t.origins&&void 0===t.lockVersion&&void 0===t.verifyHash&&void 0===t.fetch||i.configure(t),this}},{key:"setVersion",value:function(e){return this.__data.options.version=e?String(e):"",this._applyUrlArgs(),this}},{key:"_applyUrlArgs",value:function(){var e=this.__data,t=e.requireConfig,r=e.options;if("function"!=typeof t)return!1;try{return t({urlArgs:r.version?"v=".concat(encodeURIComponent(r.version)):""}),!0}catch(e){return!1}}},{key:"getVersion",value:function(){return this.__data.options.version}},{key:"describe",value:function(){var e=this.__data,t=e.options,r=e.policy,n=e.undef,i=e.importImpl;return Object.assign({},t,{debug:this.debug,policy:r.describe(),canUndef:"function"==typeof n,canNativeImport:"function"==typeof(i||nativeImport)})}},{key:"_define",value:function(e,t,r){var n=parseArgs(e,t,r,{define:this.__data.define,type:"define"}),i=n.path,a=n.files,o=n.callback,s=n.result;404!==s.code?this.__data.define(i,a,o):null==o||o(s)}},{key:"_undefModules",value:function(e){var t=this.__data.undef;"function"==typeof t&&e.forEach(function(e){try{t(e)}catch(e){}})}},{key:"_load",value:function(e,t,r){var n=this,i=this.__data,a=i.options,o=i.policy,s=i.require,u=i.setTimer,c=i.clearTimer,l=parseArgs(e,t,r,{require:s,type:"require"}),f=l.path,d=l.files,p=l.callback,h=l.result,v=l.filesStr;if(404!==h.code){var y=toModuleIds(f,d),g=o.checkModules(y);if(g)return h.code=g.code,h.message=g.message,void(null==p||p(h));var _=!1,m=0,b=null,x=function(){_||(_=!0,null!==b&&(c(b),b=null),null==p||p(h))},k=function(){m++,a.timeout>0&&(b=u(function(){if(!_){var e=new Error("load timeout after ".concat(a.timeout,"ms: ").concat(v));e.__devfabTimeout=!0,w(e,"files load timeout after ".concat(a.timeout,"ms, the files: ").concat(v))}},a.timeout)),s(f,d,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];h.data=t,x()},function(e){w(e)})},w=function(e,t){if(!_){if(null!==b&&(c(b),b=null),m<=a.retry)return n._undefModules(y),void k();h.code=e&&e.__devfabTimeout?CODE_TIMEOUT:500,h.message=t||"files load error, the files: ".concat(v),h.error=e,x()}};k()}else null==p||p(h)}},{key:"load",value:function(e,t,r){this._load(e,t,r)}},{key:"resolveUrl",value:function(e){var t=String(null==e?"":e);if(/^[a-z][a-z0-9+.-]*:/i.test(t)||/^\/\//.test(t))return t;var r=this.__data.options.baseUrl||("undefined"!=typeof document&&document.baseURI?document.baseURI:"");if(!r)return t;try{return new URL(t,r).href}catch(e){return t}}},{key:"_importOne",value:function(e){var t=this.__data,r=t.policy,n=t.importImpl,i=this.resolveUrl(e),a=r.checkOrigin(i);if(a)return Promise.resolve({ok:!1,code:a.code,message:a.message});var o=r.entryOf(e),s=o&&o.sha256,u=function(){var e=n||nativeImport;return"function"!=typeof e?Promise.resolve({ok:!1,code:500,message:"native import() is unavailable(CSP 是否禁用了 unsafe-eval?)"}):Promise.resolve().then(function(){return e(i)}).then(function(e){return{ok:!0,module:e}},function(e){return{ok:!1,code:500,message:"module load error: ".concat(i),error:e}})};return s?r.verify(i,s).then(function(e){return e.ok?u():{ok:!1,code:CODE_POLICY,message:"".concat(e.message,"(").concat(i,")")}}):u()}},{key:"loadModules",value:function(e,t,r){var n=this,i=this.__data.policy,a=parseArgs(e,t,r,{type:"module"}),o=a.path,s=a.files,u=a.callback,c=a.result,l=a.filesStr,f=toModuleIds(o,s),d=function(e){return null==u||u(e),e},p=i.checkModules(f);return p?(c.code=p.code,c.message=p.message,Promise.resolve(d(c))):s.length?Promise.all(f.map(function(e){return n._importOne(e)})).then(function(e){var t=e.filter(function(e){return!e.ok});return t.length?(c.code=t[0].code||500,c.message="".concat(t.map(function(e){return e.message}).join("; "),"(the files: ").concat(l,")"),c.error=t[0].error):c.data=e.map(function(e){return e.module}),d(c)}):Promise.resolve(d(c))}},{key:"loadModule",value:function(e,t){return this.loadModules([e],t)}}])}(),FileRequireClass=function(e){function t(){return _classCallCheck(this,t),_callSuper(this,t,arguments)}return _inherits(t,e),_createClass(t,[{key:"provide",value:function(e,t,r){this._define(e,t,r)}},{key:"provideScript",value:function(e){var t=e;"function"!=typeof e&&(t=function(){return e}),this.provide([],t)}},{key:"inject",value:function(e,t,r){this._load(e,t,r)}},{key:"injectScript",value:function(e,t,r,n){var i=this,a=e,o=t,s=r,u=n;Array.isArray(e)&&"function"==typeof t&&(a=void 0,o=e,s=t,u=r),this.inject(a,o,function(e){if(0==e.code&&Array.isArray(e.data))for(var t=0,r=e.data.length;t<r;t++){var n,a=e.data[t];null===(n=s)||void 0===n||n(a,t)}else"function"==typeof u?u(e):i.debug&&console.error("[devfab][FileRequire][injectScript] error: ",e)})}}])}(BaseFileRequire),FileRequire=new FileRequireClass;function isDebug(e){return e||!("undefined"==typeof window||!window.__devfab||!window.__devfab.debug)}function QueryString(e){this.pathname="",this.query={};var t=e;this.init=function(){t||(t=location.search);var e=t.indexOf("?"),r=t.indexOf("#");if(e>=0){if(this.pathname=t.substr(0,e),(t=r<0?t.substr(e+1):t.substring(e+1,r)).length>0)for(var n=(t=t.replace(/\+/g," ")).split("&"),i=0,a=n.length;i<a;i++){var o=n[i]||"";if(o){var s=o.indexOf("="),u="",c="";s<0?c=u=window.decode(o):(u=window.decode(o.substr(0,s)),c=window.decode(o.substr(s+1))),this.query[u]=c}}}else this.pathname=t},this.set=function(e,t){this.query[e]=t},this.get=function(e){return this.query[e]},this.del=function(e){delete this.query[e]},this.has=function(e){return null!=this.query[e]},this.toStr=function(){var e=["?"];for(var t in this.query)e.push(encodeURIComponent(t)),e.push("="),e.push(encodeURIComponent(this.query[t])),e.push("&");return 1===e.length?"":(e.splice(e.length-1,1),e.join(""))},this.init()}function equalsIgnoreCase(e,t){return!(!e||!t)&&e.toLowerCase()===t.toLowerCase()}function _appendUrl(e,t){if(!t)return e;var r=[],n=new QueryString(e);for(var i in t)n.get(i)||r.push("".concat(i,"=").concat(t[i]));if(!r.length)return e;var a=r.join("&");return e.indexOf("?")>=0?"".concat(e,"&").concat(a):"".concat(e,"?").concat(a)}var hasValue=function(e){return null!=e&&""!==e};function pick(e,t,r){if(e){var n=r;"string"==typeof t&&Array.isArray(n)&&(n=_defineProperty({},t,r));var i=n&&n[t];if(!i)return hasValue(e[t])?e[t]:void 0;for(var a=0;a<i.length;a++){var o=e[i[a]];if(hasValue(o))return o}}}var _excluded=["children","render"],BaseBuilder=function(){return _createClass(function e(){_classCallCheck(this,e),_defineProperty(this,"_config",{componentField:["component"]}),_defineProperty(this,"_components",{}),_defineProperty(this,"_renderFactory",null)},[{key:"init",value:function(e,t,r){this._initConfig(e),this._initComponent(t),this._initRenderFactory(r)}},{key:"_initConfig",value:function(e){this._config=Object.assign(this._config,e)}},{key:"_initComponent",value:function(e,t){if(e)if("string"==typeof e){if(this._components[e])return void console.log("[warning] Component ".concat(e," is exist!"));this._components[e]=t}else"function"==typeof e?Object.assign(this._components,null==e?void 0:e()):"object"===_typeof(e)&&Object.assign(this._components,e)}},{key:"_getComponent",value:function(e){return this._components[e]}},{key:"_clearComponents",value:function(){this._components={}}},{key:"_initRenderFactory",value:function(e){this._renderFactory=e}},{key:"_renderComponent",value:function(e,t){var r=this;if(Array.isArray(e)){var n=[];return e.forEach(function(e,i){var a=_objectSpread2({},e),o=pick(a,"component",r._config.componentField),s=a.children,u=a.render,c=_objectWithoutProperties(a,_excluded),l=r._getComponent(o);l||"function"==typeof u||console.log("[warning] Component ".concat(o," is not registered!"));var f={component:l,children:r._renderComponent(s,t)};c.index=i;var d=Object.assign({},null==t?void 0:t.props,{meta:c});"function"==typeof u?n.push(u({node:f,props:d})):"function"==typeof r._renderFactory?n.push(r._renderFactory({node:f,props:d})):(Object.assign(f,d),n.push(f))}),n}}},{key:"clear",value:function(){this._clearComponents(),this._renderFactory=null}}])}(),Builder=function(e){function t(){return _classCallCheck(this,t),_callSuper(this,t,arguments)}return _inherits(t,e),_createClass(t,[{key:"initComponent",value:function(e,t){this._initComponent(e,t)}},{key:"getComponents",value:function(){return _objectSpread2({},this._components)}},{key:"getComponent",value:function(e){return this._getComponent(e)}},{key:"hasComponent",value:function(e){return!!this._getComponent(e)}},{key:"initRenderFactory",value:function(e){this._initRenderFactory(e)}},{key:"render",value:function(e,t){return this._renderComponent(e,t)}}])}(BaseBuilder);function _getUrl(e,t){return e}function getAllResponseHeaders(e){var t=e.xhr.getAllResponseHeaders(),r={};return t.split("\r\n").map(function(e){var t=_slicedToArray(e.split(": "),2),n=t[0],i=t[1];r[n]=i}),r}Builder.create=function(e){return new Builder(e)};var AjaxUtil={_xhrs:[],_jsonps:{index:0},doRequest:function(e){var t,r=e.method||"GET",n=_getUrl(e.url);try{null!=e&&e.requestHeaders&&(t=e.requestHeaders,e.requestHeaders=void 0,delete e.requestHeaders)}catch(e){isDebug()&&console.log('[devfab][ajax]: [doRequest]: options["requestHeaders"] ERR : ',e)}try{e.params&&e.params.requestHeaders&&(t=e.params.requestHeaders,e.params.requestHeaders=void 0,delete e.params.requestHeaders)}catch(e){isDebug()&&console.log('[devfab][ajax]: [doRequest]: options.params["requestHeaders"] ERR : ',e)}var i=null;if(equalsIgnoreCase(r,"get")||equalsIgnoreCase(r,"delete")?n=_appendUrl(n,e.params):(equalsIgnoreCase(r,"post")||equalsIgnoreCase(r,"put"))&&(i=JSON.stringify(e.params)),e.jsonp)return this.getJsonp(n,e.callback);var a=this.getXMLHttpRequest();if(a){var o;if(a.open(r,n,!1!==e.async),e.timeout&&(a.timeout=e.timeout,a.setRequestHeader("timeout",e.timeout),a.ontimeout=function(){AjaxUtil.onerror(this,e,"timeout")}),e.contentType){if(a.setRequestHeader("Content-Type",e.contentType),e.contentType.indexOf("x-www-form-urlencoded")>=0)i=null===(o=new URLSearchParams(e.params))||void 0===o?void 0:o.toString()}else e.dateType?i=e.params:a.setRequestHeader("Content-Type","application/json;charset=utf-8");try{if(t&&"[object Object]"===Object.prototype.toString.call(t))for(var s in t)a.setRequestHeader(s,t[s])}catch(e){isDebug()&&console.log('[devfab][ajax]: [doRequest]: options.params["requestHeaders"] ERR : ',e)}a.withCredentials=null==e||!e.hasOwnProperty("withCredentials")||e.withCredentials,e.onBeforeRequest&&e.onBeforeRequest(a,i);try{a.send(i)}catch(t){return{error:"NetWorkError",options:e}}if(!1===e.async)return this.onreadystatechange(a,e);a.onreadystatechange=function(){AjaxUtil.onreadystatechange(this,e)}}},onreadystatechange:function(e,t){if(4===e.readyState){if(200===e.status){var r;try{if("blob"===t.responseType){var n=getAllResponseHeaders({xhr:e});r={code:e.status,data:{data:e.response,headers:n}}}else r=JSON.parse(e.responseText)}catch(r){AjaxUtil.onerror(e,t,e.responseText)}if(!1===t.async)return e.isBusy=!1,t.onAfterRequest&&t.onAfterRequest(r),AjaxUtil.parseAjaxResult(r,!1,null,null,t,e);AjaxUtil.parseAjaxResult(r,t.async,t.callback,t.context,t,e),t.onAfterRequest&&t.onAfterRequest(r)}else if(0===e.status)AjaxUtil.onerror(e,t,"The network connection has been disconnected. Please check the network status of the device and try.");else if(502===e.status||504===e.status)AjaxUtil.onerror(e,t,"An error has occurred with the service. Please try again later.");else{if(401!==e.status){var i={};try{i=JSON.parse(e.responseText)}catch(t){i={code:e.status,message:e.responseText}}return AjaxUtil.onerror(e,t,i)}AjaxUtil.onerror(e,t,"Login information has expired. Please log in again or contact technical staff.")}e.isBusy=!1}},onerror:function(e,t,r){var n="[devfab][ajax]: [onerror]: api error \n [code]: ".concat(e.status," \n [error]: ").concat(("object"===_typeof(r)?JSON.stringify(r):r)||"空"," \n [url]: ").concat(t.url," \n [token]: ").concat(document.cookie);isDebug()&&console.log(n);var i="object"===_typeof(r)?r:{code:500,message:r};t.onAfterRequest&&t.onAfterRequest(i)},getXMLHttpRequest:function(){return this.createXMLHttpRequest()},createXMLHttpRequest:function(){return window.XMLHttpRequest?new XMLHttpRequest:window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):null},getJsonp:function(e,t){var r=e,n="callback"+this._jsonps.index++,i=document.createElement("script");this._jsonps[n]=function(e){try{t(e)}finally{document.body.removeChild(i)}},r+=-1===r.indexOf("?")?"?":"&callback=cb.rest.AjaxUtil._jsonps."+n,i.src=r,document.body.appendChild(i)},parseAjaxResult:function(e,t,r,n,i,a){if(e){if(!e.code)return!1===t?e:void(r&&r.call(n,null,e));if(200==e.code){if(!1===t)return{result:e.data};r&&r.call(n,null,e.data,e.message,e.errorDetail,e.code,e.displayCode&&e)}else{if(!1===t)return{error:e};r&&r.call(n,e)}}}};function ajax(e,t){return t.url=e,AjaxUtil.doRequest(t)}function DynamicProxy(e,t){this.init&&this.init(e),this.queryParams=t}DynamicProxy.create=function(e,t){return new DynamicProxy(e,t)},DynamicProxy.prototype.init=function(e){if(e)for(var t in this.config=e,this.config)this[t]=function(e){return function(t,r,n){return this.Do(e,t,r,null,n)}}(t),this["".concat(t,"Sync")]=function(e){return function(t){return this.Do(e,t,null,!1)}}(t)},DynamicProxy.prototype.Do=function(e,t,r,n,i){var a,o,s;if(this.config&&this.config[e]&&this.config[e].url){var u=this.config[e],c=u.url;this.queryParams||(this.queryParams={}),null!==(a=u.options)&&void 0!==a&&a.proxyServiceCode&&(this.queryParams.serviceCode=u.options.proxyServiceCode),null!==(o=u.options)&&void 0!==o&&o.billnum&&(this.queryParams.billnum=u.options.billnum),null!==(s=this.queryParams)&&void 0!==s&&s.serviceCode&&(c=_appendUrl(c,this.queryParams));var l=c,f=Object.assign({},u.options);return f.method=u.method||"GET","function"==typeof t?(f.callback=t,f.context=i||f.context||this):f.params=t,r&&(f.callback=r,f.context=i||f.context||this),!1===n&&(f.async=!1),this.ajax(l,f)}},DynamicProxy.prototype.ajax=function(e,t){return ajax(e,t)};var Event=function(){return _createClass(function e(t){_classCallCheck(this,e),this._init(t)},[{key:"_init",value:function(e){var t;this.__ASYNC_EXECUTE__=null===(t=null==e?void 0:e.__ASYNC_EXECUTE__)||void 0===t||t,this._events=new Map,this._firstevents=new Map}},{key:"on",value:function(e,t,r){var n=this._events.get(e);Array.isArray(n)||(n=[]),n.push({callback:t,context:r}),this._events.set(e,n)}},{key:"onFirst",value:function(e,t,r){var n=this._firstevents.get(e);Array.isArray(n)||(n=[]),n.splice(0,0,{callback:t,context:r}),this._firstevents.set(e,n)}},{key:"execute",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=this._events.get(e),a=this._firstevents.get(e);if(!i&&!a)return!0;var o=!0;return[].concat(_toConsumableArray(a||[]),_toConsumableArray(i||[])).forEach(function(e){if(!1!==o){var t=e.callback.apply(e.context||void 0,r);o=!1!==t&&o}}),o}},{key:"un",value:function(e,t){this._unEvents(e,t,this._events),this._unEvents(e,t,this._firstevents)}},{key:"_unEvents",value:function(e,t,r){if(e&&r.has(e))if(t){var n=r.get(e),i=null==n?void 0:n.findIndex(function(e){return e.callback===t});-1!==i&&(null==n||n.splice(i,1))}else r.delete(e)}},{key:"hasEvent",value:function(e){var t,r;return e?((null===(t=this._events.get(e))||void 0===t?void 0:t.length)||0)+((null===(r=this._firstevents.get(e))||void 0===r?void 0:r.length)||0):0}},{key:"fireEvent",value:function(e,t){this.execute("before".concat(e),t)&&(this.execute(e,t),this.execute("after".concat(e),t))}},{key:"_asyncExecute",value:function(e,t,r){for(var n,i=this,a=r.resolve,o=r.reject,s=r.args,u=!0,c=t||[],l=!1,f=function(t){var r,n=c[t];if(!1===u)return 0;if(l)return{v:void 0};if("development"===process.env.nodeEnv)r=n.callback.apply(n.context||i,s);else try{r=n.callback.apply(n.context||i,s)}catch(e){throw e.isAddedMsg||(e.message="(领域扩展事件执行失败,请打开控制台查看详细错误信息并修复):".concat(e.message)),e.isAddedMsg=!0,e}r instanceof Promise?(l=!0,(u=r).callbacks&&u.callbacks.push({reject:function(){u.reject(),t===c.length-1&&(null==o||o())},resolve:function(r){t===c.length-1?(s.length>1&&(s[0]=r),null==a||a(s)):i._asyncExecute(e,c.slice(t+1),{resolve:a,reject:o,args:s})}})):(u=!1!==r&&u,t===c.length-1&&(u?null==a||a(s):null==o||o()))},d=0;d<c.length&&0!==(n=f(d));d++)if(n)return n.v;return u}},{key:"_asyncPromiseExecute",value:function(e,t,r,n){var i=this._events.get(e),a=this._firstevents.get(e);if(!((Array.isArray(i)?i.length:i)||(Array.isArray(a)?a.length:a)))return null==t?void 0:t();var o=[].concat(_toConsumableArray(a||[]),_toConsumableArray(i||[]));return this._asyncExecute(e,o,{resolve:t,reject:r,args:n})}},{key:"promiseExecute",value:function(e,t){var r=this,n=e,i=1;if("boolean"==typeof e&&(n=t,i=2),n){for(var a=arguments.length,o=new Array(a>2?a-2:0),s=2;s<a;s++)o[s-2]=arguments[s];var u=2===i?o:[t].concat(o);if(u.length){var c,l=u.length-1,f=u[l];if("function"!=typeof f){if("object"!==_typeof(f)||!f[0]||"function"!=typeof f[0]||!f[1]||"function"!=typeof f[1])return;c=f[1],f=f[0]}if(this.__ASYNC_EXECUTE__)return this._asyncPromiseExecute(n,function(e){f.apply(r,e)},function(){c&&"function"==typeof c&&c()},u);u.splice(l,1),u.unshift(n);var d=this.execute.apply(this,u);if(d instanceof Promise){var p=this;d.then(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];f.apply(p,t)},function(){c&&"function"==typeof c&&c()})}else if(!d)return void(c&&"function"==typeof c&&c())}}}},{key:"clear",value:function(){this._events.clear(),this._firstevents.clear()}}])}();Event.create=function(e){return new Event(e)};var Cache=function(){return _createClass(function e(t){_classCallCheck(this,e),this._init(t)},[{key:"_init",value:function(e){this._data=Object.assign({},e)}},{key:"set",value:function(e,t){this._data[e]=t}},{key:"get",value:function(e){var t;return null===(t=this._data)||void 0===t?void 0:t[e]}},{key:"delete",value:function(e){delete this._data[e]}},{key:"clear",value:function(){this._data={}}}])}();Cache.create=function(e){return new Cache};var BaseModel$1=function(){return _createClass(function e(t){_classCallCheck(this,e),this._init(t)},[{key:"_init",value:function(e){this._data={};var t=[];if(e)for(var r in e)t.push(r);Object.assign(this._data,{components:[],propertyNames:t},e),this._data.cache=new Cache,this._data.events=new Event}},{key:"_del_data",value:function(e){e&&delete this._data[e]}},{key:"_cls_data",value:function(){this._data.cache.clear(),this._data.events.clear(),this._data={components:[],propertyNames:[],cache:new Cache,events:new Event}}},{key:"_set_data",value:function(e,t,r){if(e){if(r){var n=this._data.propertyNames||[];n.indexOf(e)<0&&n.push(e)}this._data[e]=t}}},{key:"_get_data",value:function(e){if(e)return this._data[e]}},{key:"getData",value:function(){return this._get_data("value")}},{key:"getState",value:function(e,t){var r;if(!t)return this._get_data(e);var n=(this._get_data("components")||[]).find(function(e){return e.ctrlName===t});return n?null===(r=n.getState)||void 0===r?void 0:r.call(n,e):this._get_data(e)}},{key:"setState",value:function(e,t,r){r||this._set_data(e,t,!0);var n={};n[e]=t,this.doPropertyChange("setState",n,r)}},{key:"doPropertyChange",value:function(e,t,r){var n=this,i=this._get_data("components")||[];if(!i.length)return i;var a=[];if(r){var o=i.find(function(e){return e.ctrlName===r});o&&!this.notifyComponent(o,e,t)&&a.push(o)}else i.forEach(function(r){n.notifyComponent(r,e,t)||a.push(r)});return a.length?a:void 0}},{key:"notifyComponent",value:function(e,t,r){return"function"==typeof e[t]&&(this.viewUpdater(e,t,r),!0)}},{key:"viewUpdater",value:function(e,t,r){if("setState"===t)e[t](r);else{var n=this.getCache("name");e[t](r,n)}}},{key:"get",value:function(e){return this._get_data(e)}},{key:"addComponent",value:function(e,t){if(e){t&&!e.ctrlName&&(e.ctrlName=t);var r=this._get_data("components")||[];r.indexOf(e)>=0||r.push(e)}}},{key:"removeComponent",value:function(e){var t=this._get_data("components")||[],r=t.indexOf(e);r<0||t.splice(r,1)}},{key:"_applyState",value:function(e,t,r){var n=this;r||this._set_data(e,t,!0);var i="set".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),a=this.doPropertyChange(i,t,r);if(a){var o={};o[e]=t,a.forEach(function(e){n.notifyComponent(e,"setState",o)})}}},{key:"getVisible",value:function(e){return this.getState("visible",e)}},{key:"setVisible",value:function(e,t){this._applyState("visible",e,t)}},{key:"getValue",value:function(){return this.getData()}},{key:"setValue",value:function(e,t,r){var n=this,i=this.getValue();if(e!==i){var a={value:e,oldValue:i},o=this._get_data("forceFireEvent");t||o?this.promiseExecute("beforeValueChange",a,[function(){n._set_data("value",e,!0),n._applyState("value",e,r),n.execute("afterValueChange",a)},function(){n._set_data("value",i,!0),n._applyState("value",i,r)}]):(this._set_data("value",e,!0),this._applyState("value",e,r))}}},{key:"getDisabled",value:function(e){return this.getState("disabled",e)}},{key:"setDisabled",value:function(e,t){this._applyState("disabled",e,t)}},{key:"setParent",value:function(e){this.setCache("parent",e)}},{key:"getParent",value:function(){return this.getCache("parent")}},{key:"getRootParent",value:function(){for(var e=this.getParent();null!==(t=e)&&void 0!==t&&t.getParent();){var t;e=e.getParent()}return e}},{key:"setName",value:function(e){this.setCache("name",e)}},{key:"getName",value:function(){return this.getCache("name")}},{key:"setDirty",value:function(e){e?this._set_data("isDirty",!0):(this._del_data("isDirty"),this._set_data("originalData",this.getData()))}},{key:"getDirtyData",value:function(e){var t=this.getData();return!1!==e&&this._get_data("isDirty")||t!==this._get_data("originalData")?t:void 0}},{key:"clear",value:function(e){void 0===e?this._set_data("value",this._get_data("cDefaultValue")):e||this._set_data("value",void 0),this._del_data("isDirty"),this._del_data("checking"),this._del_data("checkMsg")}},{key:"on",value:function(e,t,r){this._get_data("events").on(e,t,r)}},{key:"onFirst",value:function(e,t,r){this._get_data("events").onFirst(e,t,r)}},{key:"execute",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return(t=this._get_data("events")).execute.apply(t,[e].concat(n))}},{key:"un",value:function(e,t){this._get_data("events").un(e,t)}},{key:"hasEvent",value:function(e){return this._get_data("events").hasEvent(e)}},{key:"fireEvent",value:function(e,t){this._get_data("events").fireEvent(e,t)}},{key:"promiseExecute",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];(r=this._get_data("events")).promiseExecute.apply(r,[e,t].concat(i))}},{key:"setCache",value:function(e,t){this._get_data("cache").set(e,t)}},{key:"getCache",value:function(e){return this._get_data("cache").get(e)}},{key:"clearCache",value:function(e){this._get_data("cache").delete(e)}},{key:"setProxy",value:function(e){if(!(e instanceof DynamicProxy)){var t,r=this._get_data("__requestHeaders__");for(var n in e){var i,a,o;if(r&&(null===(i=e[n])||void 0===i||null===(i=i.options)||void 0===i||!i.requestHeaders))null!==(o=e[n])&&void 0!==o&&o.options||(e[n].options={}),e[n].options.requestHeaders=r;null!==(a=this.getProxy())&&void 0!==a&&a[n]&&isDebug()&&console.warn("[devfab][baseModel.prototype.setProxy]: Proxy ".concat(n," already exists on the model. Please change the name of ").concat(n," and try again"))}return this._set_data("proxy",DynamicProxy.create(_objectSpread2(_objectSpread2({},(null===(t=this.getProxy())||void 0===t?void 0:t.config)||{}),e))),this.getProxy()}this._set_data("proxy",e)}},{key:"getProxy",value:function(){return this._get_data("proxy")}}])}(),SimpleModel$1=function(e){function t(){var e;_classCallCheck(this,t);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _defineProperty(e=_callSuper(this,t,[].concat(n)),"modelType","SimpleModel"),e}return _inherits(t,e),_createClass(t,[{key:"getDisabled",value:function(){return this.getState("disabled")}},{key:"setDisabled",value:function(e,t){this._applyState("disabled",e,t)}},{key:"getReadonly",value:function(){return this.getState("readonly")}},{key:"setReadonly",value:function(e,t){this._applyState("readonly",e,t)}}])}(BaseModel$1),DEFAULT_PAGE_SIZE=20,isArray=Array.isArray;function cloneDeep(e){if(isArray(e))return e.map(cloneDeep);if(e instanceof Date)return new Date(e.getTime());if(e&&"object"===_typeof(e)){var t={};for(var r in e)t[r]=cloneDeep(e[r]);return t}return e}function normalizeColumns(e){var t={};return(isArray(e)?e:Object.keys(e||{}).map(function(t){var r;return _objectSpread2(_objectSpread2({},e[t]||{}),{},{field:(null===(r=e[t])||void 0===r?void 0:r.field)||t})})).forEach(function(e,r){if(e){var n=e.field||e.cFieldName||e.cName||"col_".concat(r);t[n]=_objectSpread2(_objectSpread2({},e),{},{field:n,label:e.label||e.title||e.cCaption||n,index:void 0===e.index?r:e.index})}}),t}function resolveRowsData(e){if(!e)return[];if(isArray(e))return e;if(isArray(e.data))return e.data;if(isArray(e.records))return e.records;if(isArray(e.list))return e.list;if(isArray(e.rows))return e.rows;var t=e.data&&"object"===_typeof(e.data)?e.data:e.result;return isArray(t)?t:t&&"object"===_typeof(t)&&(t.records||t.list||t.rows||t.data)||[]}function createDefaultProps(){var e={id:"_id",selected:"_selected",status:"_status",pageIndex:"pageNo",pageSize:"pageSize",pageCount:"total"};return{columns:{},dataSource:[],rows:[],readOnly:!0,dataSourceMode:"local",columnMode:"local",editMode:"cell",rowKeyField:"id",cellState:{},rowState:{},showCheckBox:!1,multiple:!0,showRowNo:!0,pagination:!0,pageInfo:_defineProperty(_defineProperty(_defineProperty({},e.pageIndex,1),e.pageSize,DEFAULT_PAGE_SIZE),e.pageCount,0),innerUsedAttrs:e,multiRowModel:!1,editRowModels:{},loading:!1,params:{},originalKeyMap:{},defaultRowDatas:new Map}}function resolveProxyConfig(){return _objectSpread2({},(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).proxyConfig||{})}function _getData(e,t,r){var n=this;this.promiseExecute("beforeQuery",{proxyConfig:e,queryParams:t},function(){var i=n,a=n.setProxy({queryData:e}),o=n._get_data("innerUsedAttrs").pageIndex,s={page:_defineProperty(_defineProperty({},n._get_data("innerUsedAttrs").pageSize,n.getPageSize()),o,n.getPageIndex())},u=Object.assign(t,s);n.setCache("proxyCache",{proxyConfig:e,params:u,callback:r});if(!1!==n.execute("beforeQueryData",u)){var c=cloneDeep(u);a.queryData(c,function(e,t,n,i){if(!e){var a=t;this._set_data("dataSourceMode","remote");var o=resolveRowsData(a=Object.assign({},a));this.execute("afterQueryData",a),null==r||r.call(this,o)}},i)}})}function _setData(e){if(this.execute("beforeSetDataSource",e)){var t=this.getRowKeyField(),r={};e.forEach(function(e){r[e[t]]=e}),this._set_data("keyMap",r),this._set_data("dataSource",e,!0),this.doPropertyChange("setDataSource"),this.execute("afterSetDataSource",e)}}var GridModel$1=function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,t);var n=_objectSpread2(_objectSpread2({},createDefaultProps()),r);isArray(n.dataSource)||(n.dataSource=[]),isArray(n.rows)||(n.rows=[]);var i=resolveProxyConfig(r);return n.proxyConfig=i,n.dataSourceMode=r.dataSourceMode||n.dataSourceMode,_defineProperty(e=_callSuper(this,t,[n]),"modelType","GridModel"),e.initColumns(n.columns),e.initPageInfo(r.cPage||r.page),e.afterInit(),e}return _inherits(t,e),_createClass(t,[{key:"afterInit",value:function(){this.execute("afterInit")}},{key:"initColumns",value:function(e){var t=normalizeColumns(e);return this._set_data("columns",t,!0),t}},{key:"initPageInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=_objectSpread2({},this.getPageInfo()),r=this._get_data("innerUsedAttrs").pageIndex,n=this._get_data("innerUsedAttrs").pageSize;t[r]=e.pageNo||e.pageIndex||t.pageIndex||1,t[n]=e.pageSize||t.pageSize||DEFAULT_PAGE_SIZE,!1===this.get("pagination")&&(t[r]=-1),this._set_data("pageInfo",t)}},{key:"getRowKeyField",value:function(){return this._get_data("rowKeyField")}},{key:"isRemote",value:function(){return"remote"===this._get_data("dataSourceMode")}},{key:"getReadOnly",value:function(){return!!this._get_data("readOnly")}},{key:"setReadOnly",value:function(e){this._applyState("readOnly",!!e)}},{key:"setShowCheckbox",value:function(e){this._applyState("showCheckBox",!!e)}},{key:"setShowRowNo",value:function(e){this._applyState("showRowNo",!!e)}},{key:"getParams",value:function(){return _objectSpread2(_objectSpread2({},this.get("cParams")||{}),this._get_data("params")||{})}},{key:"setParams",value:function(e){this._set_data("params",e||{})}},{key:"getInnerUsedAttrs",value:function(e){var t=this._get_data("innerUsedAttrs");return e?t[e]:t}},{key:"getId",value:function(){return this.getInnerUsedAttrs("id")}},{key:"setDataSource",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("local"===this._get_data("dataSourceMode")){_setData(isArray(e)?e:[])}else{if(!this.execute("beforeProxyLoad",r))return;this.setPageIndex(1),_getData.call(this,e,r,function(e){_setData.call(t,e),null==n||n.call(t)})}}},{key:"reloadData",value:function(){var e=this,t=this.getCache("proxyCache");if(t){var r=t.proxyConfig,n=t.params,i=t.callback;_getData.call(this,r,n,function(t){null==i||i.call(e,t)})}else isDebug()&&console.log("[devfab][GridModel] proxyConfig is null")}},{key:"getDataSource",value:function(){return this._get_data("dataSource")||[]}},{key:"getData",value:function(e){return e?this._get_data("rows"):this._get_data("dataSource")}},{key:"getAllData",value:function(){return this.getData(!0)}},{key:"clear",value:function(){this._set_data("dataSource",[],!0),this._set_data("rows",[],!0)}},{key:"getPageInfo",value:function(){return this._get_data("pageInfo")}},{key:"getPageIndex",value:function(){var e=this._get_data("innerUsedAttrs").pageIndex;return this.getPageInfo()[e]}},{key:"getPageSize",value:function(){var e=this._get_data("innerUsedAttrs").pageSize;return this.getPageInfo()[e]}},{key:"getTotalCount",value:function(){var e=this._get_data("innerUsedAttrs").pageCount;return this.getPageInfo()[e]}},{key:"setPageInfo",value:function(e){var t=this.getPageInfo();this._set_data("pageInfo",_objectSpread2(_objectSpread2({},t),e)),this.reloadData()}},{key:"setPageIndex",value:function(e){if("number"==typeof e){var t=this._get_data("innerUsedAttrs").pageIndex;this._set_data("pageInfo",_objectSpread2(_objectSpread2({},this.getPageInfo()),{},_defineProperty({},t,Math.max(1,e))))}}},{key:"setPageSize",value:function(e){if("number"==typeof e){var t=this._get_data("innerUsedAttrs").pageIndex,r=this._get_data("innerUsedAttrs").pageSize;this._set_data("pageInfo",_objectSpread2(_objectSpread2({},this.getPageInfo()),{},_defineProperty(_defineProperty({},r,Math.max(-1,e)),t,1)))}}},{key:"setTotalCount",value:function(e){var t=this._get_data("innerUsedAttrs").pageCount;this.getPageInfo()[t]=e}}])}(BaseModel$1),ViewModel$1=function(e){function t(){var e;_classCallCheck(this,t);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return _defineProperty(e=_callSuper(this,t,[].concat(n)),"modelType","ViewModel"),e}return _inherits(t,e),_createClass(t,[{key:"getParams",value:function(){return this._get_data("params")}},{key:"setParams",value:function(e){this._set_data("params",e,!0)}},{key:"set",value:function(e,t){t instanceof BaseModel$1&&(t.setParent(this),t.setName(e)),this._set_data(e,t,!0)}},{key:"setData",value:function(e){for(var t in e)this.addProperty(t,e[t])}},{key:"addProperty",value:function(e,t){var r=this.get(e);null!=r&&r.setData?r.setData(t):this.set(e,t)}},{key:"getData",value:function(){var e=this,t=this._get_data("propertyNames")||[],r={};return t.forEach(function(t){var n,i=e.get(t);i instanceof BaseModel$1&&!1!==i._get_data("needCollect")&&(r[t]=null===(n=i.getData)||void 0===n?void 0:n.call(i))}),r}},{key:"getAllData",value:function(e){var t=this,r=this._get_data("propertyNames")||[],n={};return r.forEach(function(r){var i,a=t.get(r);if(a instanceof BaseModel$1&&!1!==a._get_data("needCollect")&&(!e||!a._get_data("isGrid"))){var o=null===(i=a.getData)||void 0===i?void 0:i.call(a);void 0!==o&&(n[r]=o)}}),n}},{key:"removeProperty",value:function(e){var t=this._get_data("propertyNames")||[],r=t.indexOf(e);-1!==r&&t.splice(r,1),this._del_data(e)}},{key:"loadData",value:function(e){this.setCache("isLoadData",!0),this.clear(),this.setData(e),this.setDirty(!1),this.setCache("isLoadData",!1)}},{key:"clear",value:function(e){var t=this;(this._get_data("propertyNames")||[]).forEach(function(r){var n,i=t.get(r);i instanceof BaseModel$1&&!1!==i._get_data("needClear")&&(null===(n=i.clear)||void 0===n||n.call(i,e))})}},{key:"setDirty",value:function(e){e?this._set_data("isDirty",!0):(this._del_data("isDirty"),this._set_data("originalData",this.getData()))}},{key:"getGridModel",value:function(e){var t;if(e)return this.get(e);var r=this._get_data("gridModel");if(r)return r;var n=null===(t=this.getParams())||void 0===t?void 0:t.masterGridModelName;if(n)return this.get(n);for(var i=this._get_data("propertyNames"),a=0,o=i.length;a<o;a++){if((r=this.get(i[a]))instanceof GridModel$1||"GridModel"==r.modelType)return this._set_data("gridModel",r),r}}},{key:"getGridModels",value:function(){for(var e=this._get_data("propertyNames"),t=[],r=0,n=e.length;r<n;r++){var i=this.get(e[r]);(i instanceof GridModel$1||"GridModel"==i.modelType)&&t.push(i)}return t}},{key:"getGridFilterModel",value:function(e){return this.getGridModel(e).getCache("FilterViewModel")}}])}(BaseModel$1);function missingLoaderResult(e){return{code:404,message:"params.fileRequire is required, the files: ".concat(e),data:[],warnings:[]}}function loadScripts(e,t,r,n,i){var a,o=t,s=r,u=n,c=i;Array.isArray(t)&&"function"==typeof r&&(o=void 0,s=t,u=r,c=n);var l=(null===(a=c)||void 0===a?void 0:a.viewModel)||this,f=(s=Array.isArray(s)?s:[]).join(",");if(!e||"function"!=typeof e.inject){var d,p=missingLoaderResult(f);return isDebug()&&console.error("[devfab][models][extend][loadScripts] ".concat(p.message)),null===(d=u)||void 0===d||d(p),p}return e.inject(o,s,function(e){var t;if(0==e.code&&Array.isArray(e.data))for(var r=0,n=e.data.length;r<n;r++){var i=e.data[r];if(i&&i.doAction)try{i.doAction("init",l)}catch(t){e.code=500,e.message="".concat(f," script execute error"),e.error=t;break}else try{var a;"function"==typeof(null===(a=c)||void 0===a?void 0:a.onFileBack)&&c.onFileBack(i,r)}catch(t){e.code=500,e.message="".concat(f," script customize execute error");break}}0!=e.code&&isDebug()&&console.info("[devfab][models][extend][loadScripts] ".concat(f," \n [message]: ").concat(e.message," \n").concat(e.error?" \n [error]: ":""),e.error),null===(t=u)||void 0===t||t(e)})}function initExtendScripts(e){var t=this;window.__devfab&&window.__devfab.__debugger_initExtendJs;var r=e.fileRequire,n=e.extendScriptParams,i=e.readyEventName,a=void 0===i?"extendReady":i,o=n||{},s=o.enableJs,u=void 0!==s&&s,c=o.filepath,l=o.scriptUrl;if(!u)return isDebug()&&console.info("[devfab][extend][js] not enable extend script"),void t.execute(a,t);if(!l)return isDebug()&&console.info("[devfab][extend][js] extend script is not defined"),void t.execute(a,t);var f=c,d=[l];t.getEnv&&t.getEnv("everyCommonExtend")&&d.push(t.getEnv("everyCommonExtend")),loadScripts.call(t,r,f,d,function(e){t.execute(a,t,e)})}var initExtScripts=function(){var e=_asyncToGenerator(_regenerator().m(function e(t,r,n){var i,a,o,s,u,c,l,f,d,p,h;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(window.__devfab&&window.__devfab.__debugger_initExtJs,o=n.fileRequire,s=n.extendScriptParams,c=(u=s||{}).enableExtJs,l=void 0!==c&&c,f=u.exturlsField,d=void 0===f?"extscripturls":f,l){e.n=1;break}return isDebug()&&console.info("[devfab][extend][exturls] ext script is not enable"),e.a(2,Promise.resolve(!0));case 1:if(t){e.n=2;break}return isDebug()&&console.info("[devfab][extend][exturls] script data is null"),e.a(2,Promise.resolve(!0));case 2:if(p=null==t?void 0:t[d],h=Array.isArray(p)?p:[],h=(h=(r.getCache("localScripts")||[]).concat(h)).concat(window.__devfab__GLOBAL_EXT_SCRIPTS__||[]),null!==(i=r.getParams())&&void 0!==i&&i.selfExtUrls&&(h=h.concat([r.getParams().selfExtUrls])),null===(a=h)||void 0===a||!a.length){e.n=4;break}return h=_toConsumableArray(new Set(h)),e.n=3,Promise.all(h.map(function(){var e=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,t)},e)}));return function(t){return e.apply(this,arguments)}}()));case 3:h=e.v;case 4:return t[d]=h,e.a(2,new Promise(function(e,t){loadScripts.call(r,o,h,function(t){e(t)})}))}},e)}));return function(t,r,n){return e.apply(this,arguments)}}(),BaseModel=BaseModel$1,SimpleModel=SimpleModel$1,ViewModel=ViewModel$1,GridModel=GridModel$1;function createModelFactory(e,t){var r=(null==t?void 0:t.SimpleModel)||SimpleModel$1,n=e.cControlType||e.component||e.controlType||e.ctrlType;return n=n.toLowerCase(),new r(e)}function _createViewModel(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.modelNameField,i=void 0===n?"cName":n,a=function(e){function t(){return _classCallCheck(this,t),_callSuper(this,t,arguments)}return _inherits(t,e),_createClass(t,[{key:"init",value:function(e,t){var r=this.createModels(e,t);this.setData(r),this.setDirty(!1)}},{key:"createModels",value:function(e,t){var n={};return(Array.isArray(e)?e:[]).forEach(function(e){var t,a,o={model:createModelFactory(e,r),meta:e,childModel:!0,modelName:e[i]};null==r||null===(t=r.onBeforeInitModel)||void 0===t||t.call(r,o),n[o.modelName]=o.model,null==r||null===(a=r.onAfterInitModel)||void 0===a||a.call(r,o)}),n}},{key:"initData",value:function(){initExtendScripts.call(this,r)}}])}((null==r||null===(t=r.models)||void 0===t?void 0:t.ViewModel)||ViewModel$1);return a.prototype.modelType="ViewModel",a}function _initViewModel(e,t){var r,n,i,a=new(_createViewModel(e,t)),o={model:a,meta:e};return null==t||null===(r=t.onBeforeInitModel)||void 0===r||r.call(t,o),o.model=a,null==a||null===(n=a.init)||void 0===n||n.call(a,e.models,e),null==t||null===(i=t.onAfterInitModel)||void 0===i||i.call(t,o),a}function initViewModel(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=_initViewModel(e,t);return n.on("destroyVM",function(){var e,t;null===(e=n)||void 0===e||null===(t=e.destroyVM)||void 0===t||t.call(e),n=null,isDebug()&&console.info("[devfab][models][initVM]: destory vm ".concat((new Date).toString()))}),n.on("extendReady",_asyncToGenerator(_regenerator().m(function i(){var a;return _regenerator().w(function(i){for(;;)switch(i.n){case 0:return(a=[]).push(initExtScripts(e,n,t)),i.n=1,Promise.all(a);case 1:isDebug()&&console.info("[devfab][models][initVM]: after vm init ".concat((new Date).toString())),null==r||r(n,e);case 2:return i.a(2)}},i)}))),n.initData(),n}var models=Object.freeze({__proto__:null,BaseModel:BaseModel,SimpleModel:SimpleModel,GridModel:GridModel,ViewModel:ViewModel,initViewModel:initViewModel,loadScripts:loadScripts}),utils={models:models,Builder:Builder,Cache:Cache,Event:Event,Ajax:DynamicProxy},devfab={get debug(){return!(!window.__devfab||!window.__devfab.debug)},set debug(e){window.__devfab=window.__devfab||{},window.__devfab.debug=!!e},define:function(){FileRequire.provide.apply(FileRequire,arguments)},require:function(){FileRequire.inject.apply(FileRequire,arguments)},provide:function(){FileRequire.provide.apply(FileRequire,arguments)},inject:function(){FileRequire.inject.apply(FileRequire,arguments)},provideScript:function(){FileRequire.provideScript.apply(FileRequire,arguments)},injectScript:function(){FileRequire.injectScript.apply(FileRequire,arguments)},FileRequire:FileRequire,utils:_objectSpread2(_objectSpread2({},utils),{},{builder:utils.Builder.create(),cache:utils.Cache.create(),event:utils.Event.create()})};window.__devfab=Object.assign({},window.__devfab,devfab),exports.default=devfab,Object.defineProperty(exports,"__esModule",{value:!0})});
@@ -2130,7 +2130,12 @@
2130
2130
  domain = [];
2131
2131
  }
2132
2132
  if (Array.isArray(domain) && Array.isArray(deps)) {
2133
- domain = domain.join('/');
2133
+ // domain = domain.join('/')
2134
+ var domainList = domain;
2135
+ domain = '';
2136
+ domainList.forEach(function (item) {
2137
+ domain += "".concat(item.substr(0, 1) === '/' ? '' : '/').concat(item);
2138
+ });
2134
2139
  }
2135
2140
  var newdeps = domain ? [] : deps;
2136
2141
  if (typeof domain === 'string' && domain && Array.isArray(deps)) {
@@ -2155,7 +2160,12 @@
2155
2160
  domain = [];
2156
2161
  }
2157
2162
  if (Array.isArray(domain) && Array.isArray(deps)) {
2158
- domain = domain.join('/');
2163
+ // domain = domain.join('/')
2164
+ var domainList = domain;
2165
+ domain = '';
2166
+ domainList.forEach(function (item) {
2167
+ domain += "".concat(item.substr(0, 1) === '/' ? '' : '/').concat(item);
2168
+ });
2159
2169
  }
2160
2170
  var newdeps = domain ? [] : deps;
2161
2171
  if (typeof domain === 'string' && domain && Array.isArray(deps)) {
@@ -2,4 +2,4 @@
2
2
  /** vim: et:ts=4:sw=4:sts=4
3
3
  * @license RequireJS 2.3.2 Copyright jQuery Foundation and other contributors.
4
4
  * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
5
- */var __requirejs={};(function(global,setTimeout){var requirejs,require,define,req,s,head,baseElement,dataMain,src,body,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.2",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var r;if(e)for(r=0;r<e.length&&(!e[r]||!t(e[r],r,e));r+=1);}function eachReverse(e,t){var r;if(e)for(r=e.length-1;r>-1&&(!e[r]||!t(e[r],r,e));r-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var r;for(r in e)if(hasProp(e,r)&&t(e[r],r))break}function mixin(e,t,r,i){return t&&eachProp(t,function(t,n){!r&&hasProp(e,n)||(!i||"object"!==_typeof(t)||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[n]=t:(e[n]||(e[n]={}),mixin(e[n],t,r,i)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,r,i){var n=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return n.requireType=e,n.requireModules=i,r&&(n.originalError=r),n}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,r,i){var n,o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=r,r=i):e=[]),o&&o.context&&(s=o.context),a.name&&(s=a.name),(n=getOwn(contexts,s))||(n=contexts[s]=req.s.newContext(s,a)),o&&n.configure(o),n.require(e,t,r)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$|\.css$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],body=s.body=document.getElementsByTagName("body")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,r){var i,n="";try{r.split("?")[0].endsWith(".css")&&(n="css")}catch(e){}return"css"===n?((i=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:link"):document.createElement("link")).href=r,i.rel="stylesheet",i.type=e.linkType||"text/css",i):((i=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script")).type=e.scriptType||"text/javascript",i.charset="utf-8",i.async=!1,i)},req.load=function(e,t,r){var i,n=e&&e.config||{};if(isBrowser)return(i=req.createNode(n,t,r)).setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),!i.attachEvent||i.attachEvent.toString&&i.attachEvent.toString().indexOf("[native code")<0||isOpera?(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)),i.src=r,n.onNodeCreated&&n.onNodeCreated(i,n,t,r),currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):body?body.appendChild(i):head.appendChild(i),currentlyAddingScript=null,i;if(isWebWorker)try{setTimeout(function(){},0),importScripts(r),e.completeLoad(t)}catch(i){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+r,i,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,r){var i,n;"string"!=typeof e&&(r=t,t=e,e=null),isArray(t)||(r=t,t=null),!t&&isFunction(r)&&(t=[],r.length&&(r.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,r){t.push(r)}),t=(1===r.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(i=currentlyAddingScript||getInteractiveScript())&&(e||(e=i.getAttribute("data-requiremodule")),n=contexts[i.getAttribute("data-requirecontext")]),n?(n.defQueue.push([e,t,r]),n.defQueueMap[e]=!0):globalDefQueue.push([e,t,r])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},__requirejs.require=require,__requirejs.define=define,req(cfg)}function newContext(e){var t,r,i,n,o,a={waitSeconds:(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).waitSeconds||30,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},s={},u={},c={},l=[],f={},d={},p={},h=1,m=1;function v(e,t,r){var i,n,o,s,u,c,l,f,d,p,h=t&&t.split("/"),m=a.map,v=m&&m["*"];if(e&&(c=(e=e.split("/")).length-1,a.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),function(e){var t,r;for(t=0;t<e.length;t++)if("."===(r=e[t]))e.splice(t,1),t-=1;else if(".."===r){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),r&&m&&(h||v)){for(o=(n=e.split("/")).length;o>0;o-=1){if(u=n.slice(0,o).join("/"),h){var g=!1;for(s=h.length;s>0;s-=1)if((i=getOwn(m,h.slice(0,s).join("/")))&&(i=getOwn(i,u))){l=i,f=o,g=!0;break}if(g)break}!d&&v&&getOwn(v,u)&&(d=getOwn(v,u),p=o)}!l&&d&&(l=d,f=p),l&&(n.splice(0,f,l),e=n.join("/"))}return getOwn(a.pkgs,e)||e}function g(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===i.contextName)return t.parentNode.removeChild(t),!0})}function y(e){var t=getOwn(a.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),i.require.undef(e),i.makeRequire(null,{skipMap:!0})([e]),!0}function b(e){var t,r=e?e.indexOf("!"):-1;return r>-1&&(t=e.substring(0,r),e=e.substring(r+1,e.length)),[t,e]}function _(e,t,r,n){var o,a,s,u,c=null,l=t?t.name:null,d=e,p=!0,g="";return e||(p=!1,e="_@r"+(h+=1)),c=(u=b(e))[0],e=u[1],c&&(c=v(c,l,n),a=getOwn(f,c)),e&&(c?g=a&&a.normalize?a.normalize(e,function(e){return v(e,l,n)}):-1===e.indexOf("!")?v(e,l,n):e:(c=(u=b(g=v(e,l,n)))[0],g=u[1],r=!0,o=i.nameToUrl(g))),{prefix:c,name:g,parentMap:t,unnormalized:!!(s=!c||a||r?"":"_unnormalized"+(m+=1)),url:o,originalName:d,isDefine:p,id:(c?c+"!"+g:g)+s}}function x(e){var t=e.id,r=getOwn(s,t);return r||(r=s[t]=new i.Module(e)),r}function k(e,t,r){var i=e.id,n=getOwn(s,i);!hasProp(f,i)||n&&!n.defineEmitComplete?(n=x(e)).error&&"error"===t?r(n.error):n.on(t,r):"defined"===t&&r(f[i])}function q(e,t){var r=e.requireModules,i=!1;t?t(e):(each(r,function(t){var r=getOwn(s,t);r&&(r.error=e,r.events.error&&(i=!0,r.emit("error",e)))}),i||req.onError(e))}function O(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(i.defQueueMap[t]=!0),l.push(e)}),globalDefQueue=[])}function w(e){delete s[e],delete u[e]}function E(e,t,r){var i=e.map.id;e.error?e.emit("error",e.error):(t[i]=!0,each(e.depMaps,function(i,n){var o=i.id,a=getOwn(s,o);!a||e.depMatched[n]||r[o]||(getOwn(t,o)?(e.defineDep(n,f[o]),e.check()):E(a,t,r))}),r[i]=!0)}function P(){var e,r,n=1e3*a.waitSeconds,s=n&&i.startTime+n<(new Date).getTime(),c=[],l=[],f=!1,d=!0;if(!t){if(t=!0,eachProp(u,function(e){var t=e.map,i=t.id;if(e.enabled&&(t.isDefine||l.push(e),!e.error))if(!e.inited&&s)y(i)?(r=!0,f=!0):(c.push(i),g(i));else if(!e.inited&&e.fetched&&t.isDefine&&(f=!0,!t.prefix))return d=!1}),s&&c.length)return(e=makeError("timeout","Load timeout for modules: "+c,null,c)).contextName=i.contextName,q(e);d&&each(l,function(e){E(e,{},{})}),s&&!r||!f||!isBrowser&&!isWebWorker||o||(o=setTimeout(function(){o=0,P()},50)),t=!1}}function A(e){hasProp(f,e[0])||x(_(e[0],null,!0)).init(e[1],e[2])}function S(e,t,r,i){e.detachEvent&&!isOpera?i&&e.detachEvent(i,t):e.removeEventListener(r,t,!1)}function j(e){var t=e.currentTarget||e.srcElement;return S(t,i.onScriptLoad,"load","onreadystatechange"),S(t,i.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function T(){var e;for(O();l.length;){if(null===(e=l.shift())[0])return q(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));A(e)}i.defQueueMap={}}return n={require:function(e){return e.require?e.require:e.require=i.makeRequire(e.map)},exports:function(e){e.usingExports=!0,e.map.isDefine&&(e.exports?f[e.map.id]=e.exports:e.exports=f[e.map.id]={})},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(a.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(r=function(e){this.events=getOwn(c,e.id)||{},this.map=e,this.shim=getOwn(a.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,r,i){i=i||{},this.inited||(this.factory=t,r?this.on("error",r):this.events.error&&(r=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=r,this.inited=!0,this.ignore=i.ignore,i.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,i.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;d[e]||(d[e]=!0,i.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,r=this.map.id,n=this.depExports,o=this.exports,a=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(a)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=i.execCb(r,a,n,o)}catch(t){e=t}else o=i.execCb(r,a,n,o);if(this.map.isDefine&&void 0===o&&((t=this.module)?o=t.exports:this.usingExports&&(o=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",q(this.error=e)}else o=a;if(this.exports=o,this.map.isDefine&&!this.ignore&&(f[r]=o,req.onResourceLoad)){var s=[];each(this.depMaps,function(e){s.push(e.normalizedMap||e)}),req.onResourceLoad(i,this.map,s)}w(r),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(i.defQueueMap,r)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,r=_(e.prefix);this.depMaps.push(r),k(r,"defined",bind(this,function(r){var n,o,u,c=getOwn(p,this.map.id),l=this.map.name,f=this.map.parentMap?this.map.parentMap.name:null,d=i.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(r.normalize&&(l=r.normalize(l,function(e){return v(e,f,!0)})||""),k(o=_(e.prefix+"!"+l,this.map.parentMap),"defined",bind(this,function(e){this.map.normalizedMap=o,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((u=getOwn(s,o.id))&&(this.depMaps.push(o),this.events.error&&u.on("error",bind(this,function(e){this.emit("error",e)})),u.enable()))):c?(this.map.url=i.nameToUrl(c),void this.load()):((n=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})})).error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(s,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&w(e.map.id)}),q(e)}),n.fromText=bind(this,function(r,o){var s=e.name,u=_(s),c=useInteractive;o&&(r=o),c&&(useInteractive=!1),x(u),hasProp(a.config,t)&&(a.config[s]=a.config[t]);try{req.exec(r)}catch(e){return q(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0),this.depMaps.push(u),i.completeLoad(s),d([s],n)}),void r.load(e.name,d,n,a))})),i.enable(r,this),this.pluginMaps[r.id]=r},enable:function(){u[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var r,o,a;if("string"==typeof e){if(e=_(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,a=getOwn(n,e.id))return void(this.depExports[t]=a(this));this.depCount+=1,k(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?k(e,"error",bind(this,this.errback)):this.events.error&&k(e,"error",bind(this,function(e){this.emit("error",e)}))}r=e.id,o=s[r],hasProp(n,r)||!o||o.enabled||i.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(s,e.id);t&&!t.enabled&&i.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var r=this.events[e];r||(r=this.events[e]=[]),r.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},i={config:a,contextName:e,registry:s,defined:f,urlFetched:d,defQueue:l,defQueueMap:{},Module:r,makeModuleMap:_,nextTick:req.nextTick,onError:q,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,r){return(-1===r.indexOf("?")?"?":"&")+t}}var r=a.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(a[t]||(a[t]={}),mixin(a[t],e,!0,!0)):a[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(p[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=i.makeShimExports(e)),r[t]=e}),a.shim=r),e.packages&&each(e.packages,function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(a.paths[t]=e.location),a.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(s,function(e,t){e.inited||e.map.unnormalized||(e.map=_(t,null,!0))}),(e.deps||e.callback)&&i.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}},makeRequire:function(t,r){function o(a,u,c){var l,d;return r.enableBuildCallback&&u&&isFunction(u)&&(u.__requireJsBuild=!0),"string"==typeof a?isFunction(u)?q(makeError("requireargs","Invalid require call"),c):t&&hasProp(n,a)?n[a](s[t.id]):req.get?req.get(i,a,t,o):(l=_(a,t,!1,!0).id,hasProp(f,l)?f[l]:q(makeError("notloaded",'Module name "'+l+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(T(),i.nextTick(function(){T(),(d=x(_(null,t))).skipMap=r.skipMap,d.init(a,u,c,{enabled:!0}),P()}),o)}return r=r||{},mixin(o,{isBrowser:isBrowser,toUrl:function(e){var r,n=e.lastIndexOf("."),o=e.split("/")[0];return-1!==n&&(!("."===o||".."===o)||n>1)&&(r=e.substring(n,e.length),e=e.substring(0,n)),i.nameToUrl(v(e,t&&t.id,!0),r,!0)},defined:function(e){return hasProp(f,_(e,t,!1,!0).id)},specified:function(e){return e=_(e,t,!1,!0).id,hasProp(f,e)||hasProp(s,e)}}),t||(o.undef=function(e){O();var r=_(e,t,!0),n=getOwn(s,e);n.undefed=!0,g(e),delete f[e],delete d[r.url],delete c[e],eachReverse(l,function(t,r){t[0]===e&&l.splice(r,1)}),delete i.defQueueMap[e],n&&(n.events.defined&&(c[e]=n.events),w(e))}),o},enable:function(e){getOwn(s,e.id)&&x(e).enable()},completeLoad:function(e){var t,r,n,o=getOwn(a.shim,e)||{},u=o.exports;for(O();l.length;){if(null===(r=l.shift())[0]){if(r[0]=e,t)break;t=!0}else r[0]===e&&(t=!0);A(r)}if(i.defQueueMap={},n=getOwn(s,e),!t&&!hasProp(f,e)&&n&&!n.inited){if(!(!a.enforceDefine||u&&getGlobal(u)))return y(e)?void 0:q(makeError("nodefine","No define call for "+e,null,[e]));A([e,o.deps||[],o.exportsFn])}P()},nameToUrl:function(e,t,r){var n,o,s,u,c,l,f=getOwn(a.pkgs,e);if(f&&(e=f),l=getOwn(p,e))return i.nameToUrl(l,t,r);if(req.jsExtRegExp.test(e))u=e+(t||"");else{for(n=a.paths,s=(o=e.split("/")).length;s>0;s-=1)if(c=getOwn(n,o.slice(0,s).join("/"))){isArray(c)&&(c=c[0]),o.splice(0,s,c);break}u=o.join("/"),u=("/"===(u+=t||(/^data:|^blob:|\?/.test(u)||r?"":".js")).charAt(0)||u.match(/^[\w+.-]+:/)?"":a.baseUrl)+u}return a.urlArgs&&!/^blob:/.test(u)?u+a.urlArgs(e,u):u},load:function(e,t){req.load(i,e,t)},execCb:function(e,t,r,i){return t.apply(i,r)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=j(e);i.completeLoad(t.id)}},onScriptError:function(e){var t=j(e);if(!y(t.id)){var r=[];return eachProp(s,function(e,i){0!==i.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return r.push(i),!0})}),q(makeError("scripterror",'Script error for "'+t.id+(r.length?'", needed by: '+r.join(", "):'"'),e,[t.id]))}}},i.require=i.makeRequire(),i}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript}})("undefined"!=typeof window?window:globalThis,"undefined"==typeof setTimeout?void 0:setTimeout),function(e){if(!__requirejs.__requirejsAdapterApplied){__requirejs.__requirejsAdapterApplied=!0;var t=__requirejs.require,r=__requirejs.define,i=function(e,r,i,n){var o=e,a=r,s=i,u=n;if(Array.isArray(e)&&"function"==typeof r)t(a=e,s=r,u=i);else{!e&&Array.isArray(a)&&(o=[]),Array.isArray(o)&&Array.isArray(a)&&(o=o.join("/"));var c=o?[]:a;"string"==typeof o&&o&&Array.isArray(a)&&a.forEach(function(e){c.push("".concat(o).concat("/"===e.substr(0,1)?"":"/").concat(e))}),console.debug("[devfab][requirejs]: %c requireInner, Parameter[newdeps] is %o","color:fuchsia",c),t(c,s,u)}},n=function(e,t,i){var n=e,o=t,a=i;if(Array.isArray(e)&&"function"==typeof t)r(o=e,a=t);else{!e&&Array.isArray(o)&&(n=[]),Array.isArray(n)&&Array.isArray(o)&&(n=n.join("/"));var s=n?[]:o;"string"==typeof n&&n&&Array.isArray(o)&&o.forEach(function(e){s.push("".concat(n).concat("/"===e.substr(0,1)?"":"/").concat(e))}),r(s,a)}};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&void 0===i[o]&&(i[o]=t[o]);i.__devfabAdapterApplied=!0,n.__devfabAdapterApplied=!0,__requirejs._require=t,__requirejs._define=r,__requirejs.require=i,__requirejs.define=n}}();var CODE_POLICY=403;function normalizePath(e){return String(null==e?"":e).replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"")}function isAbsoluteUrl(e){return/^(?:[a-z][a-z0-9+.-]*:)?\/\//i.test(e)||/^(?:blob|data):/i.test(e)}function toHex(e){for(var t=new Uint8Array(e),r="",i=0;i<t.length;i++)r+=t[i].toString(16).padStart(2,"0");return r}var LoadPolicy=function(){return _createClass(function e(t){_classCallCheck(this,e),this.manifest=null,this.origins=null,this.lockVersion=null,this.verifyHash=!0,this.fetch=null,this._index=null,this.configure(t)},[{key:"configure",value:function(e){var t=e||{};return void 0!==t.manifest&&(this.manifest=t.manifest||null),void 0!==t.origins&&(this.origins=t.origins?[].concat(t.origins).map(function(e){return String(e).trim().replace(/\/+$/,"")}):null),void 0!==t.lockVersion&&(this.lockVersion=t.lockVersion||null),void 0!==t.verifyHash&&(this.verifyHash=!!t.verifyHash),void 0!==t.fetch?this.fetch=t.fetch||null:this.fetch||"function"!=typeof fetch||(this.fetch=function(){return fetch.apply(void 0,arguments)}),this._index=null,this}},{key:"enabled",get:function(){return!!this.manifest}},{key:"_moduleIndex",value:function(){if(this._index)return this._index;var e={},t=this.manifest&&this.manifest.modules;return Array.isArray(t)?t.forEach(function(t){t&&t.path&&(e[normalizePath(t.path)]=t)}):t&&"object"===_typeof(t)&&Object.keys(t).forEach(function(r){e[normalizePath(r)]=t[r]||{}}),this._index=e,e}},{key:"entryOf",value:function(e){return this.manifest&&this._moduleIndex()[normalizePath(e)]||null}},{key:"checkVersion",value:function(){if(!this.lockVersion||!this.manifest)return null;var e=String(this.manifest.version||"");return e===String(this.lockVersion)?null:{code:CODE_POLICY,message:"清单版本 ".concat(e||"(未声明)"," 与锁定版本 ").concat(this.lockVersion," 不一致,拒绝加载")}}},{key:"checkModules",value:function(e){var t=this.checkVersion();if(t)return t;if(!this.manifest)return null;for(var r=0;r<e.length;r++){var i=normalizePath(e[r]);if(!this._moduleIndex()[i])return{code:CODE_POLICY,message:"Module ".concat(i," not registered in the list, loading denied.")}}return null}},{key:"checkOrigin",value:function(e){if(!this.origins)return null;if(!isAbsoluteUrl(e))return null;var t;try{t=new URL(e).origin}catch(t){return{code:CODE_POLICY,message:"无法解析的地址:".concat(e)}}return-1===this.origins.indexOf(t)?{code:CODE_POLICY,message:"来源 ".concat(t," 不在白名单内(允许:").concat(this.origins.join(", "),")")}:null}},{key:"verify",value:function(e,t){var r=this;if(!this.verifyHash)return Promise.resolve({ok:!0,skipped:"disabled"});if(!t)return Promise.resolve({ok:!0});var i="undefined"!=typeof globalThis&&globalThis.crypto&&globalThis.crypto.subtle;return i?this.fetch?Promise.resolve().then(function(){return r.fetch(e)}).then(function(e){return e&&e.ok?e.arrayBuffer().then(function(e){return i.digest("SHA-256",e)}):{ok:!1,message:"完整性预检请求失败:HTTP ".concat(e&&e.status||"unknown")}}).then(function(e){if(!e||!1===e.ok)return e;var r=toHex(e),i=String(t).toLowerCase();return r!==i?{ok:!1,message:"sha256 不匹配:期望 ".concat(i,",实际 ").concat(r)}:{ok:!0}}).catch(function(e){return{ok:!1,message:"完整性预检异常:".concat(e&&e.message||e),error:e}}):Promise.resolve({ok:!0,skipped:"fetch unavailable"}):Promise.resolve({ok:!0,skipped:"crypto.subtle unavailable(需要 https / localhost)"})}},{key:"describe",value:function(){return{manifest:this.enabled?this.manifest.name||"(unnamed)":null,version:this.manifest&&this.manifest.version||null,lockVersion:this.lockVersion,modules:this.enabled?Object.keys(this._moduleIndex()).length:0,origins:this.origins?this.origins.slice():null,verifyHash:this.verifyHash}}}])}(),CODE_TIMEOUT=504,nativeImport=null;try{nativeImport=new Function("s","return import(s)")}catch(e){nativeImport=null}function parseArgs(e,t,r,i){var n=e,o=t,a=r;Array.isArray(e)&&!Array.isArray(t)&&(n=void 0,o=e,a="function"==typeof t?t:r);var s=(o=Array.isArray(o)?o:[]).join(","),u={code:0,message:"",data:[]};return("require"===i.type&&"function"!=typeof i.require||"define"===i.type&&"function"!=typeof i.define)&&(u.code=404,u.message="requirejs is undefined, the fiels: ".concat(s)),{path:n,files:o,callback:a,filesStr:s,result:u}}function toModuleIds(e,t){var r="";return Array.isArray(e)?r=e.filter(Boolean).join("/"):"string"==typeof e&&(r=e.replace(/\/+$/,"")),t.map(function(e){var t=String(e).replace(/^\/+/,"");return r?"".concat(r,"/").concat(t):t})}function toNumber(e,t){var r=Number(e);return Number.isFinite(r)?r:t}var DEFAULT_OPTIONS={version:"",timeout:15e3,retry:0,baseUrl:""},BaseFileRequire=function(){return _createClass(function e(t){_classCallCheck(this,e),this.__init(t)},[{key:"__init",value:function(e){var t=e||{};void 0!==t.debug&&(this.debug=!!t.debug);var r=__requirejs.require;this.__data={define:__requirejs.define,require:r,undef:"function"==typeof(null==r?void 0:r.undef)?r.undef:null,requireConfig:this._pickRequireConfig(r),importImpl:t.importer||null,setTimer:t.setTimeout||function(e,t){return setTimeout(e,t)},clearTimer:t.clearTimeout||function(e){return clearTimeout(e)},options:{version:t.version?String(t.version):DEFAULT_OPTIONS.version,timeout:void 0===t.timeout?DEFAULT_OPTIONS.timeout:Math.max(0,toNumber(t.timeout,0)),retry:void 0===t.retry?DEFAULT_OPTIONS.retry:Math.max(0,toNumber(t.retry,0)),baseUrl:t.baseUrl||DEFAULT_OPTIONS.baseUrl},policy:new LoadPolicy(t)},this.__data.options.version&&this._applyUrlArgs()}},{key:"debug",get:function(){var e="undefined"!=typeof window?window.__devfab:null;return!(!e||!e.debug)},set:function(e){"undefined"!=typeof window&&(window.__devfab=window.__devfab||{},window.__devfab.debug=!!e)}},{key:"_pickRequireConfig",value:function(e){return e&&"function"==typeof e.config?e.config.bind(e):null}},{key:"configure",value:function(e){var t=e||{},r=this.__data,i=r.options,n=r.policy;return void 0!==t.debug&&(this.debug=!!t.debug),void 0!==t.version&&this.setVersion(t.version),void 0!==t.timeout&&(i.timeout=Math.max(0,toNumber(t.timeout,i.timeout))),void 0!==t.retry&&(i.retry=Math.max(0,toNumber(t.retry,i.retry))),void 0!==t.baseUrl&&(i.baseUrl=t.baseUrl||""),void 0===t.manifest&&void 0===t.origins&&void 0===t.lockVersion&&void 0===t.verifyHash&&void 0===t.fetch||n.configure(t),this}},{key:"setVersion",value:function(e){return this.__data.options.version=e?String(e):"",this._applyUrlArgs(),this}},{key:"_applyUrlArgs",value:function(){var e=this.__data,t=e.requireConfig,r=e.options;if("function"!=typeof t)return!1;try{return t({urlArgs:r.version?"v=".concat(encodeURIComponent(r.version)):""}),!0}catch(e){return!1}}},{key:"getVersion",value:function(){return this.__data.options.version}},{key:"describe",value:function(){var e=this.__data,t=e.options,r=e.policy,i=e.undef,n=e.importImpl;return Object.assign({},t,{debug:this.debug,policy:r.describe(),canUndef:"function"==typeof i,canNativeImport:"function"==typeof(n||nativeImport)})}},{key:"_define",value:function(e,t,r){var i=parseArgs(e,t,r,{define:this.__data.define,type:"define"}),n=i.path,o=i.files,a=i.callback,s=i.result;404!==s.code?this.__data.define(n,o,a):null==a||a(s)}},{key:"_undefModules",value:function(e){var t=this.__data.undef;"function"==typeof t&&e.forEach(function(e){try{t(e)}catch(e){}})}},{key:"_load",value:function(e,t,r){var i=this,n=this.__data,o=n.options,a=n.policy,s=n.require,u=n.setTimer,c=n.clearTimer,l=parseArgs(e,t,r,{require:s,type:"require"}),f=l.path,d=l.files,p=l.callback,h=l.result,m=l.filesStr;if(404!==h.code){var v=toModuleIds(f,d),g=a.checkModules(v);if(g)return h.code=g.code,h.message=g.message,void(null==p||p(h));var y=!1,b=0,_=null,x=function(){y||(y=!0,null!==_&&(c(_),_=null),null==p||p(h))},k=function(){b++,o.timeout>0&&(_=u(function(){if(!y){var e=new Error("load timeout after ".concat(o.timeout,"ms: ").concat(m));e.__devfabTimeout=!0,q(e,"files load timeout after ".concat(o.timeout,"ms, the files: ").concat(m))}},o.timeout)),s(f,d,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];h.data=t,x()},function(e){q(e)})},q=function(e,t){if(!y){if(null!==_&&(c(_),_=null),b<=o.retry)return i._undefModules(v),void k();h.code=e&&e.__devfabTimeout?CODE_TIMEOUT:500,h.message=t||"files load error, the files: ".concat(m),h.error=e,x()}};k()}else null==p||p(h)}},{key:"load",value:function(e,t,r){this._load(e,t,r)}},{key:"resolveUrl",value:function(e){var t=String(null==e?"":e);if(/^[a-z][a-z0-9+.-]*:/i.test(t)||/^\/\//.test(t))return t;var r=this.__data.options.baseUrl||("undefined"!=typeof document&&document.baseURI?document.baseURI:"");if(!r)return t;try{return new URL(t,r).href}catch(e){return t}}},{key:"_importOne",value:function(e){var t=this.__data,r=t.policy,i=t.importImpl,n=this.resolveUrl(e),o=r.checkOrigin(n);if(o)return Promise.resolve({ok:!1,code:o.code,message:o.message});var a=r.entryOf(e),s=a&&a.sha256,u=function(){var e=i||nativeImport;return"function"!=typeof e?Promise.resolve({ok:!1,code:500,message:"native import() is unavailable(CSP 是否禁用了 unsafe-eval?)"}):Promise.resolve().then(function(){return e(n)}).then(function(e){return{ok:!0,module:e}},function(e){return{ok:!1,code:500,message:"module load error: ".concat(n),error:e}})};return s?r.verify(n,s).then(function(e){return e.ok?u():{ok:!1,code:CODE_POLICY,message:"".concat(e.message,"(").concat(n,")")}}):u()}},{key:"loadModules",value:function(e,t,r){var i=this,n=this.__data.policy,o=parseArgs(e,t,r,{type:"module"}),a=o.path,s=o.files,u=o.callback,c=o.result,l=o.filesStr,f=toModuleIds(a,s),d=function(e){return null==u||u(e),e},p=n.checkModules(f);return p?(c.code=p.code,c.message=p.message,Promise.resolve(d(c))):s.length?Promise.all(f.map(function(e){return i._importOne(e)})).then(function(e){var t=e.filter(function(e){return!e.ok});return t.length?(c.code=t[0].code||500,c.message="".concat(t.map(function(e){return e.message}).join("; "),"(the files: ").concat(l,")"),c.error=t[0].error):c.data=e.map(function(e){return e.module}),d(c)}):Promise.resolve(d(c))}},{key:"loadModule",value:function(e,t){return this.loadModules([e],t)}}])}(),FileRequireClass=function(e){function t(){return _classCallCheck(this,t),_callSuper(this,t,arguments)}return _inherits(t,e),_createClass(t,[{key:"provide",value:function(e,t,r){this._define(e,t,r)}},{key:"provideScript",value:function(e){var t=e;"function"!=typeof e&&(t=function(){return e}),this.provide([],t)}},{key:"inject",value:function(e,t,r){this._load(e,t,r)}},{key:"injectScript",value:function(e,t,r,i){var n=this,o=e,a=t,s=r,u=i;Array.isArray(e)&&"function"==typeof t&&(o=void 0,a=e,s=t,u=r),this.inject(o,a,function(e){if(0==e.code&&Array.isArray(e.data))for(var t=0,r=e.data.length;t<r;t++){var i,o=e.data[t];null===(i=s)||void 0===i||i(o,t)}else"function"==typeof u?u(e):n.debug&&console.error("[devfab][FileRequire][injectScript] error: ",e)})}}])}(BaseFileRequire),FileRequire=new FileRequireClass;window.__devfab=Object.assign({},window.__devfab),window.__devfab.FileRequire=FileRequire,exports.CODE_POLICY=CODE_POLICY,exports.CODE_TIMEOUT=CODE_TIMEOUT,exports.FileRequire=FileRequire,exports.LoadPolicy=LoadPolicy,exports.default=FileRequire,Object.defineProperty(exports,"__esModule",{value:!0})});
5
+ */var __requirejs={};(function(global,setTimeout){var requirejs,require,define,req,s,head,baseElement,dataMain,src,body,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.2",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var r;if(e)for(r=0;r<e.length&&(!e[r]||!t(e[r],r,e));r+=1);}function eachReverse(e,t){var r;if(e)for(r=e.length-1;r>-1&&(!e[r]||!t(e[r],r,e));r-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var r;for(r in e)if(hasProp(e,r)&&t(e[r],r))break}function mixin(e,t,r,i){return t&&eachProp(t,function(t,n){!r&&hasProp(e,n)||(!i||"object"!==_typeof(t)||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[n]=t:(e[n]||(e[n]={}),mixin(e[n],t,r,i)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,r,i){var n=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return n.requireType=e,n.requireModules=i,r&&(n.originalError=r),n}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,r,i){var n,o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=r,r=i):e=[]),o&&o.context&&(s=o.context),a.name&&(s=a.name),(n=getOwn(contexts,s))||(n=contexts[s]=req.s.newContext(s,a)),o&&n.configure(o),n.require(e,t,r)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$|\.css$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],body=s.body=document.getElementsByTagName("body")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,r){var i,n="";try{r.split("?")[0].endsWith(".css")&&(n="css")}catch(e){}return"css"===n?((i=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:link"):document.createElement("link")).href=r,i.rel="stylesheet",i.type=e.linkType||"text/css",i):((i=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script")).type=e.scriptType||"text/javascript",i.charset="utf-8",i.async=!1,i)},req.load=function(e,t,r){var i,n=e&&e.config||{};if(isBrowser)return(i=req.createNode(n,t,r)).setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),!i.attachEvent||i.attachEvent.toString&&i.attachEvent.toString().indexOf("[native code")<0||isOpera?(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)),i.src=r,n.onNodeCreated&&n.onNodeCreated(i,n,t,r),currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):body?body.appendChild(i):head.appendChild(i),currentlyAddingScript=null,i;if(isWebWorker)try{setTimeout(function(){},0),importScripts(r),e.completeLoad(t)}catch(i){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+r,i,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,r){var i,n;"string"!=typeof e&&(r=t,t=e,e=null),isArray(t)||(r=t,t=null),!t&&isFunction(r)&&(t=[],r.length&&(r.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,r){t.push(r)}),t=(1===r.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(i=currentlyAddingScript||getInteractiveScript())&&(e||(e=i.getAttribute("data-requiremodule")),n=contexts[i.getAttribute("data-requirecontext")]),n?(n.defQueue.push([e,t,r]),n.defQueueMap[e]=!0):globalDefQueue.push([e,t,r])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},__requirejs.require=require,__requirejs.define=define,req(cfg)}function newContext(e){var t,r,i,n,o,a={waitSeconds:(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).waitSeconds||30,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},s={},u={},c={},f=[],l={},d={},p={},h=1,m=1;function v(e,t,r){var i,n,o,s,u,c,f,l,d,p,h=t&&t.split("/"),m=a.map,v=m&&m["*"];if(e&&(c=(e=e.split("/")).length-1,a.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),function(e){var t,r;for(t=0;t<e.length;t++)if("."===(r=e[t]))e.splice(t,1),t-=1;else if(".."===r){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),r&&m&&(h||v)){for(o=(n=e.split("/")).length;o>0;o-=1){if(u=n.slice(0,o).join("/"),h){var g=!1;for(s=h.length;s>0;s-=1)if((i=getOwn(m,h.slice(0,s).join("/")))&&(i=getOwn(i,u))){f=i,l=o,g=!0;break}if(g)break}!d&&v&&getOwn(v,u)&&(d=getOwn(v,u),p=o)}!f&&d&&(f=d,l=p),f&&(n.splice(0,l,f),e=n.join("/"))}return getOwn(a.pkgs,e)||e}function g(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===i.contextName)return t.parentNode.removeChild(t),!0})}function y(e){var t=getOwn(a.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),i.require.undef(e),i.makeRequire(null,{skipMap:!0})([e]),!0}function b(e){var t,r=e?e.indexOf("!"):-1;return r>-1&&(t=e.substring(0,r),e=e.substring(r+1,e.length)),[t,e]}function _(e,t,r,n){var o,a,s,u,c=null,f=t?t.name:null,d=e,p=!0,g="";return e||(p=!1,e="_@r"+(h+=1)),c=(u=b(e))[0],e=u[1],c&&(c=v(c,f,n),a=getOwn(l,c)),e&&(c?g=a&&a.normalize?a.normalize(e,function(e){return v(e,f,n)}):-1===e.indexOf("!")?v(e,f,n):e:(c=(u=b(g=v(e,f,n)))[0],g=u[1],r=!0,o=i.nameToUrl(g))),{prefix:c,name:g,parentMap:t,unnormalized:!!(s=!c||a||r?"":"_unnormalized"+(m+=1)),url:o,originalName:d,isDefine:p,id:(c?c+"!"+g:g)+s}}function x(e){var t=e.id,r=getOwn(s,t);return r||(r=s[t]=new i.Module(e)),r}function k(e,t,r){var i=e.id,n=getOwn(s,i);!hasProp(l,i)||n&&!n.defineEmitComplete?(n=x(e)).error&&"error"===t?r(n.error):n.on(t,r):"defined"===t&&r(l[i])}function q(e,t){var r=e.requireModules,i=!1;t?t(e):(each(r,function(t){var r=getOwn(s,t);r&&(r.error=e,r.events.error&&(i=!0,r.emit("error",e)))}),i||req.onError(e))}function O(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(i.defQueueMap[t]=!0),f.push(e)}),globalDefQueue=[])}function w(e){delete s[e],delete u[e]}function E(e,t,r){var i=e.map.id;e.error?e.emit("error",e.error):(t[i]=!0,each(e.depMaps,function(i,n){var o=i.id,a=getOwn(s,o);!a||e.depMatched[n]||r[o]||(getOwn(t,o)?(e.defineDep(n,l[o]),e.check()):E(a,t,r))}),r[i]=!0)}function P(){var e,r,n=1e3*a.waitSeconds,s=n&&i.startTime+n<(new Date).getTime(),c=[],f=[],l=!1,d=!0;if(!t){if(t=!0,eachProp(u,function(e){var t=e.map,i=t.id;if(e.enabled&&(t.isDefine||f.push(e),!e.error))if(!e.inited&&s)y(i)?(r=!0,l=!0):(c.push(i),g(i));else if(!e.inited&&e.fetched&&t.isDefine&&(l=!0,!t.prefix))return d=!1}),s&&c.length)return(e=makeError("timeout","Load timeout for modules: "+c,null,c)).contextName=i.contextName,q(e);d&&each(f,function(e){E(e,{},{})}),s&&!r||!l||!isBrowser&&!isWebWorker||o||(o=setTimeout(function(){o=0,P()},50)),t=!1}}function A(e){hasProp(l,e[0])||x(_(e[0],null,!0)).init(e[1],e[2])}function S(e,t,r,i){e.detachEvent&&!isOpera?i&&e.detachEvent(i,t):e.removeEventListener(r,t,!1)}function j(e){var t=e.currentTarget||e.srcElement;return S(t,i.onScriptLoad,"load","onreadystatechange"),S(t,i.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function T(){var e;for(O();f.length;){if(null===(e=f.shift())[0])return q(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));A(e)}i.defQueueMap={}}return n={require:function(e){return e.require?e.require:e.require=i.makeRequire(e.map)},exports:function(e){e.usingExports=!0,e.map.isDefine&&(e.exports?l[e.map.id]=e.exports:e.exports=l[e.map.id]={})},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(a.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(r=function(e){this.events=getOwn(c,e.id)||{},this.map=e,this.shim=getOwn(a.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,r,i){i=i||{},this.inited||(this.factory=t,r?this.on("error",r):this.events.error&&(r=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=r,this.inited=!0,this.ignore=i.ignore,i.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,i.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;d[e]||(d[e]=!0,i.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,r=this.map.id,n=this.depExports,o=this.exports,a=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(a)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=i.execCb(r,a,n,o)}catch(t){e=t}else o=i.execCb(r,a,n,o);if(this.map.isDefine&&void 0===o&&((t=this.module)?o=t.exports:this.usingExports&&(o=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",q(this.error=e)}else o=a;if(this.exports=o,this.map.isDefine&&!this.ignore&&(l[r]=o,req.onResourceLoad)){var s=[];each(this.depMaps,function(e){s.push(e.normalizedMap||e)}),req.onResourceLoad(i,this.map,s)}w(r),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(i.defQueueMap,r)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,r=_(e.prefix);this.depMaps.push(r),k(r,"defined",bind(this,function(r){var n,o,u,c=getOwn(p,this.map.id),f=this.map.name,l=this.map.parentMap?this.map.parentMap.name:null,d=i.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(r.normalize&&(f=r.normalize(f,function(e){return v(e,l,!0)})||""),k(o=_(e.prefix+"!"+f,this.map.parentMap),"defined",bind(this,function(e){this.map.normalizedMap=o,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((u=getOwn(s,o.id))&&(this.depMaps.push(o),this.events.error&&u.on("error",bind(this,function(e){this.emit("error",e)})),u.enable()))):c?(this.map.url=i.nameToUrl(c),void this.load()):((n=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})})).error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(s,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&w(e.map.id)}),q(e)}),n.fromText=bind(this,function(r,o){var s=e.name,u=_(s),c=useInteractive;o&&(r=o),c&&(useInteractive=!1),x(u),hasProp(a.config,t)&&(a.config[s]=a.config[t]);try{req.exec(r)}catch(e){return q(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0),this.depMaps.push(u),i.completeLoad(s),d([s],n)}),void r.load(e.name,d,n,a))})),i.enable(r,this),this.pluginMaps[r.id]=r},enable:function(){u[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var r,o,a;if("string"==typeof e){if(e=_(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,a=getOwn(n,e.id))return void(this.depExports[t]=a(this));this.depCount+=1,k(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?k(e,"error",bind(this,this.errback)):this.events.error&&k(e,"error",bind(this,function(e){this.emit("error",e)}))}r=e.id,o=s[r],hasProp(n,r)||!o||o.enabled||i.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(s,e.id);t&&!t.enabled&&i.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var r=this.events[e];r||(r=this.events[e]=[]),r.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},i={config:a,contextName:e,registry:s,defined:l,urlFetched:d,defQueue:f,defQueueMap:{},Module:r,makeModuleMap:_,nextTick:req.nextTick,onError:q,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,r){return(-1===r.indexOf("?")?"?":"&")+t}}var r=a.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(a[t]||(a[t]={}),mixin(a[t],e,!0,!0)):a[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(p[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=i.makeShimExports(e)),r[t]=e}),a.shim=r),e.packages&&each(e.packages,function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(a.paths[t]=e.location),a.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(s,function(e,t){e.inited||e.map.unnormalized||(e.map=_(t,null,!0))}),(e.deps||e.callback)&&i.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}},makeRequire:function(t,r){function o(a,u,c){var f,d;return r.enableBuildCallback&&u&&isFunction(u)&&(u.__requireJsBuild=!0),"string"==typeof a?isFunction(u)?q(makeError("requireargs","Invalid require call"),c):t&&hasProp(n,a)?n[a](s[t.id]):req.get?req.get(i,a,t,o):(f=_(a,t,!1,!0).id,hasProp(l,f)?l[f]:q(makeError("notloaded",'Module name "'+f+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(T(),i.nextTick(function(){T(),(d=x(_(null,t))).skipMap=r.skipMap,d.init(a,u,c,{enabled:!0}),P()}),o)}return r=r||{},mixin(o,{isBrowser:isBrowser,toUrl:function(e){var r,n=e.lastIndexOf("."),o=e.split("/")[0];return-1!==n&&(!("."===o||".."===o)||n>1)&&(r=e.substring(n,e.length),e=e.substring(0,n)),i.nameToUrl(v(e,t&&t.id,!0),r,!0)},defined:function(e){return hasProp(l,_(e,t,!1,!0).id)},specified:function(e){return e=_(e,t,!1,!0).id,hasProp(l,e)||hasProp(s,e)}}),t||(o.undef=function(e){O();var r=_(e,t,!0),n=getOwn(s,e);n.undefed=!0,g(e),delete l[e],delete d[r.url],delete c[e],eachReverse(f,function(t,r){t[0]===e&&f.splice(r,1)}),delete i.defQueueMap[e],n&&(n.events.defined&&(c[e]=n.events),w(e))}),o},enable:function(e){getOwn(s,e.id)&&x(e).enable()},completeLoad:function(e){var t,r,n,o=getOwn(a.shim,e)||{},u=o.exports;for(O();f.length;){if(null===(r=f.shift())[0]){if(r[0]=e,t)break;t=!0}else r[0]===e&&(t=!0);A(r)}if(i.defQueueMap={},n=getOwn(s,e),!t&&!hasProp(l,e)&&n&&!n.inited){if(!(!a.enforceDefine||u&&getGlobal(u)))return y(e)?void 0:q(makeError("nodefine","No define call for "+e,null,[e]));A([e,o.deps||[],o.exportsFn])}P()},nameToUrl:function(e,t,r){var n,o,s,u,c,f,l=getOwn(a.pkgs,e);if(l&&(e=l),f=getOwn(p,e))return i.nameToUrl(f,t,r);if(req.jsExtRegExp.test(e))u=e+(t||"");else{for(n=a.paths,s=(o=e.split("/")).length;s>0;s-=1)if(c=getOwn(n,o.slice(0,s).join("/"))){isArray(c)&&(c=c[0]),o.splice(0,s,c);break}u=o.join("/"),u=("/"===(u+=t||(/^data:|^blob:|\?/.test(u)||r?"":".js")).charAt(0)||u.match(/^[\w+.-]+:/)?"":a.baseUrl)+u}return a.urlArgs&&!/^blob:/.test(u)?u+a.urlArgs(e,u):u},load:function(e,t){req.load(i,e,t)},execCb:function(e,t,r,i){return t.apply(i,r)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=j(e);i.completeLoad(t.id)}},onScriptError:function(e){var t=j(e);if(!y(t.id)){var r=[];return eachProp(s,function(e,i){0!==i.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return r.push(i),!0})}),q(makeError("scripterror",'Script error for "'+t.id+(r.length?'", needed by: '+r.join(", "):'"'),e,[t.id]))}}},i.require=i.makeRequire(),i}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript}})("undefined"!=typeof window?window:globalThis,"undefined"==typeof setTimeout?void 0:setTimeout),function(e){if(!__requirejs.__requirejsAdapterApplied){__requirejs.__requirejsAdapterApplied=!0;var t=__requirejs.require,r=__requirejs.define,i=function(e,r,i,n){var o=e,a=r,s=i,u=n;if(Array.isArray(e)&&"function"==typeof r)t(a=e,s=r,u=i);else{if(!e&&Array.isArray(a)&&(o=[]),Array.isArray(o)&&Array.isArray(a)){var c=o;o="",c.forEach(function(e){o+="".concat("/"===e.substr(0,1)?"":"/").concat(e)})}var f=o?[]:a;"string"==typeof o&&o&&Array.isArray(a)&&a.forEach(function(e){f.push("".concat(o).concat("/"===e.substr(0,1)?"":"/").concat(e))}),console.debug("[devfab][requirejs]: %c requireInner, Parameter[newdeps] is %o","color:fuchsia",f),t(f,s,u)}},n=function(e,t,i){var n=e,o=t,a=i;if(Array.isArray(e)&&"function"==typeof t)r(o=e,a=t);else{if(!e&&Array.isArray(o)&&(n=[]),Array.isArray(n)&&Array.isArray(o)){var s=n;n="",s.forEach(function(e){n+="".concat("/"===e.substr(0,1)?"":"/").concat(e)})}var u=n?[]:o;"string"==typeof n&&n&&Array.isArray(o)&&o.forEach(function(e){u.push("".concat(n).concat("/"===e.substr(0,1)?"":"/").concat(e))}),r(u,a)}};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&void 0===i[o]&&(i[o]=t[o]);i.__devfabAdapterApplied=!0,n.__devfabAdapterApplied=!0,__requirejs._require=t,__requirejs._define=r,__requirejs.require=i,__requirejs.define=n}}();var CODE_POLICY=403;function normalizePath(e){return String(null==e?"":e).replace(/\\/g,"/").replace(/^\.\//,"").replace(/^\/+/,"")}function isAbsoluteUrl(e){return/^(?:[a-z][a-z0-9+.-]*:)?\/\//i.test(e)||/^(?:blob|data):/i.test(e)}function toHex(e){for(var t=new Uint8Array(e),r="",i=0;i<t.length;i++)r+=t[i].toString(16).padStart(2,"0");return r}var LoadPolicy=function(){return _createClass(function e(t){_classCallCheck(this,e),this.manifest=null,this.origins=null,this.lockVersion=null,this.verifyHash=!0,this.fetch=null,this._index=null,this.configure(t)},[{key:"configure",value:function(e){var t=e||{};return void 0!==t.manifest&&(this.manifest=t.manifest||null),void 0!==t.origins&&(this.origins=t.origins?[].concat(t.origins).map(function(e){return String(e).trim().replace(/\/+$/,"")}):null),void 0!==t.lockVersion&&(this.lockVersion=t.lockVersion||null),void 0!==t.verifyHash&&(this.verifyHash=!!t.verifyHash),void 0!==t.fetch?this.fetch=t.fetch||null:this.fetch||"function"!=typeof fetch||(this.fetch=function(){return fetch.apply(void 0,arguments)}),this._index=null,this}},{key:"enabled",get:function(){return!!this.manifest}},{key:"_moduleIndex",value:function(){if(this._index)return this._index;var e={},t=this.manifest&&this.manifest.modules;return Array.isArray(t)?t.forEach(function(t){t&&t.path&&(e[normalizePath(t.path)]=t)}):t&&"object"===_typeof(t)&&Object.keys(t).forEach(function(r){e[normalizePath(r)]=t[r]||{}}),this._index=e,e}},{key:"entryOf",value:function(e){return this.manifest&&this._moduleIndex()[normalizePath(e)]||null}},{key:"checkVersion",value:function(){if(!this.lockVersion||!this.manifest)return null;var e=String(this.manifest.version||"");return e===String(this.lockVersion)?null:{code:CODE_POLICY,message:"清单版本 ".concat(e||"(未声明)"," 与锁定版本 ").concat(this.lockVersion," 不一致,拒绝加载")}}},{key:"checkModules",value:function(e){var t=this.checkVersion();if(t)return t;if(!this.manifest)return null;for(var r=0;r<e.length;r++){var i=normalizePath(e[r]);if(!this._moduleIndex()[i])return{code:CODE_POLICY,message:"Module ".concat(i," not registered in the list, loading denied.")}}return null}},{key:"checkOrigin",value:function(e){if(!this.origins)return null;if(!isAbsoluteUrl(e))return null;var t;try{t=new URL(e).origin}catch(t){return{code:CODE_POLICY,message:"无法解析的地址:".concat(e)}}return-1===this.origins.indexOf(t)?{code:CODE_POLICY,message:"来源 ".concat(t," 不在白名单内(允许:").concat(this.origins.join(", "),")")}:null}},{key:"verify",value:function(e,t){var r=this;if(!this.verifyHash)return Promise.resolve({ok:!0,skipped:"disabled"});if(!t)return Promise.resolve({ok:!0});var i="undefined"!=typeof globalThis&&globalThis.crypto&&globalThis.crypto.subtle;return i?this.fetch?Promise.resolve().then(function(){return r.fetch(e)}).then(function(e){return e&&e.ok?e.arrayBuffer().then(function(e){return i.digest("SHA-256",e)}):{ok:!1,message:"完整性预检请求失败:HTTP ".concat(e&&e.status||"unknown")}}).then(function(e){if(!e||!1===e.ok)return e;var r=toHex(e),i=String(t).toLowerCase();return r!==i?{ok:!1,message:"sha256 不匹配:期望 ".concat(i,",实际 ").concat(r)}:{ok:!0}}).catch(function(e){return{ok:!1,message:"完整性预检异常:".concat(e&&e.message||e),error:e}}):Promise.resolve({ok:!0,skipped:"fetch unavailable"}):Promise.resolve({ok:!0,skipped:"crypto.subtle unavailable(需要 https / localhost)"})}},{key:"describe",value:function(){return{manifest:this.enabled?this.manifest.name||"(unnamed)":null,version:this.manifest&&this.manifest.version||null,lockVersion:this.lockVersion,modules:this.enabled?Object.keys(this._moduleIndex()).length:0,origins:this.origins?this.origins.slice():null,verifyHash:this.verifyHash}}}])}(),CODE_TIMEOUT=504,nativeImport=null;try{nativeImport=new Function("s","return import(s)")}catch(e){nativeImport=null}function parseArgs(e,t,r,i){var n=e,o=t,a=r;Array.isArray(e)&&!Array.isArray(t)&&(n=void 0,o=e,a="function"==typeof t?t:r);var s=(o=Array.isArray(o)?o:[]).join(","),u={code:0,message:"",data:[]};return("require"===i.type&&"function"!=typeof i.require||"define"===i.type&&"function"!=typeof i.define)&&(u.code=404,u.message="requirejs is undefined, the fiels: ".concat(s)),{path:n,files:o,callback:a,filesStr:s,result:u}}function toModuleIds(e,t){var r="";return Array.isArray(e)?r=e.filter(Boolean).join("/"):"string"==typeof e&&(r=e.replace(/\/+$/,"")),t.map(function(e){var t=String(e).replace(/^\/+/,"");return r?"".concat(r,"/").concat(t):t})}function toNumber(e,t){var r=Number(e);return Number.isFinite(r)?r:t}var DEFAULT_OPTIONS={version:"",timeout:15e3,retry:0,baseUrl:""},BaseFileRequire=function(){return _createClass(function e(t){_classCallCheck(this,e),this.__init(t)},[{key:"__init",value:function(e){var t=e||{};void 0!==t.debug&&(this.debug=!!t.debug);var r=__requirejs.require;this.__data={define:__requirejs.define,require:r,undef:"function"==typeof(null==r?void 0:r.undef)?r.undef:null,requireConfig:this._pickRequireConfig(r),importImpl:t.importer||null,setTimer:t.setTimeout||function(e,t){return setTimeout(e,t)},clearTimer:t.clearTimeout||function(e){return clearTimeout(e)},options:{version:t.version?String(t.version):DEFAULT_OPTIONS.version,timeout:void 0===t.timeout?DEFAULT_OPTIONS.timeout:Math.max(0,toNumber(t.timeout,0)),retry:void 0===t.retry?DEFAULT_OPTIONS.retry:Math.max(0,toNumber(t.retry,0)),baseUrl:t.baseUrl||DEFAULT_OPTIONS.baseUrl},policy:new LoadPolicy(t)},this.__data.options.version&&this._applyUrlArgs()}},{key:"debug",get:function(){var e="undefined"!=typeof window?window.__devfab:null;return!(!e||!e.debug)},set:function(e){"undefined"!=typeof window&&(window.__devfab=window.__devfab||{},window.__devfab.debug=!!e)}},{key:"_pickRequireConfig",value:function(e){return e&&"function"==typeof e.config?e.config.bind(e):null}},{key:"configure",value:function(e){var t=e||{},r=this.__data,i=r.options,n=r.policy;return void 0!==t.debug&&(this.debug=!!t.debug),void 0!==t.version&&this.setVersion(t.version),void 0!==t.timeout&&(i.timeout=Math.max(0,toNumber(t.timeout,i.timeout))),void 0!==t.retry&&(i.retry=Math.max(0,toNumber(t.retry,i.retry))),void 0!==t.baseUrl&&(i.baseUrl=t.baseUrl||""),void 0===t.manifest&&void 0===t.origins&&void 0===t.lockVersion&&void 0===t.verifyHash&&void 0===t.fetch||n.configure(t),this}},{key:"setVersion",value:function(e){return this.__data.options.version=e?String(e):"",this._applyUrlArgs(),this}},{key:"_applyUrlArgs",value:function(){var e=this.__data,t=e.requireConfig,r=e.options;if("function"!=typeof t)return!1;try{return t({urlArgs:r.version?"v=".concat(encodeURIComponent(r.version)):""}),!0}catch(e){return!1}}},{key:"getVersion",value:function(){return this.__data.options.version}},{key:"describe",value:function(){var e=this.__data,t=e.options,r=e.policy,i=e.undef,n=e.importImpl;return Object.assign({},t,{debug:this.debug,policy:r.describe(),canUndef:"function"==typeof i,canNativeImport:"function"==typeof(n||nativeImport)})}},{key:"_define",value:function(e,t,r){var i=parseArgs(e,t,r,{define:this.__data.define,type:"define"}),n=i.path,o=i.files,a=i.callback,s=i.result;404!==s.code?this.__data.define(n,o,a):null==a||a(s)}},{key:"_undefModules",value:function(e){var t=this.__data.undef;"function"==typeof t&&e.forEach(function(e){try{t(e)}catch(e){}})}},{key:"_load",value:function(e,t,r){var i=this,n=this.__data,o=n.options,a=n.policy,s=n.require,u=n.setTimer,c=n.clearTimer,f=parseArgs(e,t,r,{require:s,type:"require"}),l=f.path,d=f.files,p=f.callback,h=f.result,m=f.filesStr;if(404!==h.code){var v=toModuleIds(l,d),g=a.checkModules(v);if(g)return h.code=g.code,h.message=g.message,void(null==p||p(h));var y=!1,b=0,_=null,x=function(){y||(y=!0,null!==_&&(c(_),_=null),null==p||p(h))},k=function(){b++,o.timeout>0&&(_=u(function(){if(!y){var e=new Error("load timeout after ".concat(o.timeout,"ms: ").concat(m));e.__devfabTimeout=!0,q(e,"files load timeout after ".concat(o.timeout,"ms, the files: ").concat(m))}},o.timeout)),s(l,d,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];h.data=t,x()},function(e){q(e)})},q=function(e,t){if(!y){if(null!==_&&(c(_),_=null),b<=o.retry)return i._undefModules(v),void k();h.code=e&&e.__devfabTimeout?CODE_TIMEOUT:500,h.message=t||"files load error, the files: ".concat(m),h.error=e,x()}};k()}else null==p||p(h)}},{key:"load",value:function(e,t,r){this._load(e,t,r)}},{key:"resolveUrl",value:function(e){var t=String(null==e?"":e);if(/^[a-z][a-z0-9+.-]*:/i.test(t)||/^\/\//.test(t))return t;var r=this.__data.options.baseUrl||("undefined"!=typeof document&&document.baseURI?document.baseURI:"");if(!r)return t;try{return new URL(t,r).href}catch(e){return t}}},{key:"_importOne",value:function(e){var t=this.__data,r=t.policy,i=t.importImpl,n=this.resolveUrl(e),o=r.checkOrigin(n);if(o)return Promise.resolve({ok:!1,code:o.code,message:o.message});var a=r.entryOf(e),s=a&&a.sha256,u=function(){var e=i||nativeImport;return"function"!=typeof e?Promise.resolve({ok:!1,code:500,message:"native import() is unavailable(CSP 是否禁用了 unsafe-eval?)"}):Promise.resolve().then(function(){return e(n)}).then(function(e){return{ok:!0,module:e}},function(e){return{ok:!1,code:500,message:"module load error: ".concat(n),error:e}})};return s?r.verify(n,s).then(function(e){return e.ok?u():{ok:!1,code:CODE_POLICY,message:"".concat(e.message,"(").concat(n,")")}}):u()}},{key:"loadModules",value:function(e,t,r){var i=this,n=this.__data.policy,o=parseArgs(e,t,r,{type:"module"}),a=o.path,s=o.files,u=o.callback,c=o.result,f=o.filesStr,l=toModuleIds(a,s),d=function(e){return null==u||u(e),e},p=n.checkModules(l);return p?(c.code=p.code,c.message=p.message,Promise.resolve(d(c))):s.length?Promise.all(l.map(function(e){return i._importOne(e)})).then(function(e){var t=e.filter(function(e){return!e.ok});return t.length?(c.code=t[0].code||500,c.message="".concat(t.map(function(e){return e.message}).join("; "),"(the files: ").concat(f,")"),c.error=t[0].error):c.data=e.map(function(e){return e.module}),d(c)}):Promise.resolve(d(c))}},{key:"loadModule",value:function(e,t){return this.loadModules([e],t)}}])}(),FileRequireClass=function(e){function t(){return _classCallCheck(this,t),_callSuper(this,t,arguments)}return _inherits(t,e),_createClass(t,[{key:"provide",value:function(e,t,r){this._define(e,t,r)}},{key:"provideScript",value:function(e){var t=e;"function"!=typeof e&&(t=function(){return e}),this.provide([],t)}},{key:"inject",value:function(e,t,r){this._load(e,t,r)}},{key:"injectScript",value:function(e,t,r,i){var n=this,o=e,a=t,s=r,u=i;Array.isArray(e)&&"function"==typeof t&&(o=void 0,a=e,s=t,u=r),this.inject(o,a,function(e){if(0==e.code&&Array.isArray(e.data))for(var t=0,r=e.data.length;t<r;t++){var i,o=e.data[t];null===(i=s)||void 0===i||i(o,t)}else"function"==typeof u?u(e):n.debug&&console.error("[devfab][FileRequire][injectScript] error: ",e)})}}])}(BaseFileRequire),FileRequire=new FileRequireClass;window.__devfab=Object.assign({},window.__devfab),window.__devfab.FileRequire=FileRequire,exports.CODE_POLICY=CODE_POLICY,exports.CODE_TIMEOUT=CODE_TIMEOUT,exports.FileRequire=FileRequire,exports.LoadPolicy=LoadPolicy,exports.default=FileRequire,Object.defineProperty(exports,"__esModule",{value:!0})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devfab",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Devfab is a library for developer building low code factory",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",