devfab 2.1.0 → 2.2.0

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/README.md CHANGED
@@ -113,7 +113,6 @@ devfab/
113
113
  │ └── FileRequire/ # 运行时模块加载器(二开核心)
114
114
  │ ├── file.js # FileRequire 类:provide / provideScript / inject / injectScript / loadModules
115
115
  │ ├── policy.js # 加载策略:清单登记、域名白名单、版本锁、sha256 校验
116
- │ ├── guard.js # 全局污染检测:加载前后 diff window
117
116
  │ ├── requirejs.js # 内嵌 RequireJS 2.3.2 + 本地 domain 适配层
118
117
  │ └── index.js # 导出并挂载 window.__devfab.FileRequire
119
118
  ├── example/
@@ -210,7 +209,7 @@ sequenceDiagram
210
209
 
211
210
  ### 核心 API
212
211
 
213
- **加载器是单例,没有 `create()`。** 原因很实际:清单、白名单、版本锁、污染观测都是
212
+ **加载器是单例,没有 `create()`。** 原因很实际:清单、白名单、版本锁都是
214
213
  **部署级**约定,一个页面只应有一套。以前每次 `create()` 都派生一份全新的 policy,
215
214
  宿主在实例 A 上配的清单,扩展脚本主链路(`_extend.js`)用的实例 B 完全不知道 —— 配了等于没配。
216
215
 
@@ -226,13 +225,12 @@ fileRequire.configure({
226
225
  })
227
226
  ```
228
227
 
229
- `configure(options)` 接受四类字段:
228
+ `configure(options)` 接受三类字段:
230
229
 
231
230
  | 分区 | 字段 | 说明 |
232
231
  | --- | --- | --- |
233
- | 加载策略 | `version` / `timeout` / `retry` / `strict` / `baseUrl` | 见下方「加载策略与合规」 |
232
+ | 加载策略 | `version` / `timeout` / `retry` / `baseUrl` | 见下方「加载策略与合规」 |
234
233
  | 合规 | `manifest` / `origins` / `lockVersion` / `verifyHash` / `fetch` | 见下方「加载策略与合规」 |
235
- | 污染检测 | `pollution` / `watch` / `maxPollution` / `target` | `pollution: false` 可关闭 |
236
234
  | 调试 | `debug` | 等价于 `window.__devfab.debug = true` |
237
235
 
238
236
  > **加载器不可替换。** AMD 通道固定走内嵌的 RequireJS 2.3.2,构造函数不再接受
@@ -252,6 +250,16 @@ fileRequire.configure({
252
250
  | `setVersion` | `setVersion(version)` | 设置二开包版本,写进 RequireJS 的 `urlArgs` |
253
251
  | `describe` | `describe()` | 输出当前策略摘要,宿主启动时打一行日志 |
254
252
 
253
+ > **实例状态只有 `__data` 一个属性**。加载器句柄、时钟、`options` / `policy`
254
+ > 全部归纳在 `FileRequire.__data` 下,`FileRequire.options` / `.policy` 这些直接挂在实例上的
255
+ > 字段已经没有了。业务代码**不要读写 `__data`**,它是内部结构、随时可能调整;要看配置就 `describe()`,
256
+ > 要改配置就 `configure(options)`。
257
+ >
258
+ > ```js
259
+ > console.log(window.__devfab.FileRequire) // → { __data: {...} },展开才看到内部
260
+ > console.log(window.__devfab.FileRequire.describe()) // → 干净的策略摘要
261
+ > ```
262
+
255
263
  ### 加载结果契约
256
264
 
257
265
  `inject` / `load` / `injectScript` / `loadModules` 的回调拿到统一结构:
@@ -262,7 +270,7 @@ fileRequire.configure({
262
270
  message: '', // 失败原因
263
271
  data: [], // 加载到的模块内容数组
264
272
  error: null, // 失败时的原始错误对象
265
- warnings: [], // 全局污染告警(见下)
273
+ warnings: [], // 保留位,本轮起不再有任何来源写入(见下)
266
274
  }
267
275
  ```
268
276
 
@@ -335,25 +343,18 @@ window.__devfab.FileRequire.configure({
335
343
  > `crypto.subtle` 只在安全上下文(https / localhost)可用,不可用时会跳过并在结果里标注,
336
344
  > 不会静默通过。
337
345
 
338
- ### 全局污染检测
346
+ ### 关于全局污染检测(已移除)
339
347
 
340
- 二开脚本直接跑在宿主 `window` 上,A 客户的脚本改了一个全局变量,B 客户就跟着崩,
341
- 而且现场无法归因。加载器会在加载前后 diff `window` 的 key 集合:
348
+ 2.1.0 及之前的版本会在每次加载前后 diff `window` 的 key 集合,把二开脚本新增 / 覆盖的全局
349
+ 放进 `result.warnings`,`strict: true` 时还能升级成 `code: 500`。**已整体移除**,原因:
342
350
 
343
- ```js
344
- fileRequire.inject(['extendjs', 'frontend'], ['xxx.js'], (result) => {
345
- if (result.warnings.length) {
346
- console.warn('[devfab] 二开脚本动了这些全局:', result.warnings)
347
- // [{ type: 'added', key: '__someSdk', watched: false }, ...]
348
- }
349
- })
350
- ```
351
+ - 它是**默认开启**的,而这一层的规矩是「不配置不生效」——它是唯一破例的模块;
352
+ - 每次加载要全量 `Object.keys(window)` 拍两次快照(实测空页面 237 个 key、其中 187 个是访问器,
353
+ 单次约 2.6ms),换来的 `warnings` 默认没人消费(`strict` 默认 `false`);
354
+ - 只比一层引用:`window.foo.bar = 1` 和 `delete window.foo` 都检测不到,并发加载归因也不准。
351
355
 
352
- - 命中盯防名单(`$` / `jQuery` / `define` / `window.__devfab` 等)立即告警;
353
- - 新增全局超过 `maxPollution`(默认 3)告警;
354
- - `strict: true` 时把告警升级为 `code: 500`(**开发期用**:脚本已经执行过了,
355
- 这是事后报错,不是拦截);
356
- - 这是**观测**不是隔离,并发加载时归因可能不准。
356
+ `result.warnings` 字段保留为空数组(契约形状不变),但**不再有任何来源写入**。
357
+ 需要「这脚本到底动了什么全局」时,正确做法是在接入期手工比对,或直接上 iframe 隔离。
357
358
 
358
359
  ### ESM 通道:给 RequireJS 的技术债留一条退路
359
360
 
@@ -2,4 +2,4 @@ function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this
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 g(e,t,r){var i,n,o,s,u,c,l,f,d,p,h=t&&t.split("/"),m=a.map,g=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||g)){for(o=(n=e.split("/")).length;o>0;o-=1){if(u=n.slice(0,o).join("/"),h){var v=!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,v=!0;break}if(v)break}!d&&g&&getOwn(g,u)&&(d=getOwn(g,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 v(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,v="";return e||(p=!1,e="_@r"+(h+=1)),c=(u=b(e))[0],e=u[1],c&&(c=g(c,l,n),a=getOwn(f,c)),e&&(c?v=a&&a.normalize?a.normalize(e,function(e){return g(e,l,n)}):-1===e.indexOf("!")?g(e,l,n):e:(c=(u=b(v=g(e,l,n)))[0],v=u[1],r=!0,o=i.nameToUrl(v))),{prefix:c,name:v,parentMap:t,unnormalized:!!(s=!c||a||r?"":"_unnormalized"+(m+=1)),url:o,originalName:d,isDefine:p,id:(c?c+"!"+v:v)+s}}function k(e){var t=e.id,r=getOwn(s,t);return r||(r=s[t]=new i.Module(e)),r}function x(e,t,r){var i=e.id,n=getOwn(s,i);!hasProp(f,i)||n&&!n.defineEmitComplete?(n=k(e)).error&&"error"===t?r(n.error):n.on(t,r):"defined"===t&&r(f[i])}function w(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 q(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(i.defQueueMap[t]=!0),l.push(e)}),globalDefQueue=[])}function O(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),v(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,w(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])||k(_(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(q();l.length;){if(null===(e=l.shift())[0])return w(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",w(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)}O(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),x(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 g(e,f,!0)})||""),x(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")&&O(e.map.id)}),w(e)}),n.fromText=bind(this,function(r,o){var s=e.name,u=_(s),c=useInteractive;o&&(r=o),c&&(useInteractive=!1),k(u),hasProp(a.config,t)&&(a.config[s]=a.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),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,x(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?x(e,"error",bind(this,this.errback)):this.events.error&&x(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: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=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)?w(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]:w(makeError("notloaded",'Module name "'+l+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(T(),i.nextTick(function(){T(),(d=k(_(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(g(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){q();var r=_(e,t,!0),n=getOwn(s,e);n.undefed=!0,v(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),O(e))}),o},enable:function(e){getOwn(s,e.id)&&k(e).enable()},completeLoad:function(e){var t,r,n,o=getOwn(a.shim,e)||{},u=o.exports;for(q();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:w(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})}),w(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}}}])}(),DEFAULT_WATCH=["$","jQuery","define","require","requirejs","devfab","__devfab"],GlobalGuard=function(){return _createClass(function e(t){_classCallCheck(this,e);var r=t||{};this.maxPollution=void 0===r.maxPollution?3:Number(r.maxPollution),this.watch=[].concat(r.watch||DEFAULT_WATCH),this.target=r.target||("undefined"!=typeof window?window:null),this.enabled=void 0===r.enabled||!!r.enabled,this._pending=0,this._before=null,this.lastWarnings=[]},[{key:"_snapshot",value:function(){var e=new Map,t=this.target;return t?(Object.keys(t).forEach(function(r){e.set(r,t[r])}),e):e}},{key:"_diff",value:function(){var e=this,t=this._before,r=this._snapshot(),i=[];if(!t)return i;r.forEach(function(r,n){var o=-1!==e.watch.indexOf(n);t.has(n)?t.get(n)!==r&&i.push({type:"overwritten",key:n,watched:o}):i.push({type:"added",key:n,watched:o})});var n=i.filter(function(e){return e.watched}).length,o=i.filter(function(e){return"added"===e.type}).length;return!n&&o<=this.maxPollution?[]:i}},{key:"begin",value:function(){var e=this;if(!this.enabled||!this.target)return{end:function(){return[]}};this._pending++,1===this._pending&&(this._before=this._snapshot());var t=!1;return{end:function(){if(t)return[];if(t=!0,e._pending--,e._pending>0)return[];var r=e._diff();return e._before=null,e.lastWarnings=r,r}}}},{key:"configure",value:function(e){var t=e||{};return void 0!==t.enabled&&(this.enabled=!!t.enabled),void 0!==t.maxPollution&&(this.maxPollution=Number(t.maxPollution)),void 0!==t.watch&&(this.watch=[].concat(t.watch||[])),void 0!==t.target&&(this.target=t.target||null),this}}])}(),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=null==i?void 0:i.path,o=e,a="function"==typeof t?t:r);var s=(o=Array.isArray(o)?o:[]).join(","),u={code:0,message:"",data:[],warnings:[]};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,strict:!1,baseUrl:""},BaseFileRequire=function(){return _createClass(function e(t){var r;_classCallCheck(this,e);var i=t||{};void 0!==i.debug&&(this.debug=!!i.debug),this.__rootPath=void 0,this.__define=__requirejs.define,this.__require=__requirejs.require,this.__undef="function"==typeof(null===(r=this.__require)||void 0===r?void 0:r.undef)?this.__require.undef:null,this.__requireConfig=this._pickRequireConfig(this.__require),this.__import=i.importer||null,this._setTimer=i.setTimeout||function(e,t){return setTimeout(e,t)},this._clearTimer=i.clearTimeout||function(e){return clearTimeout(e)},this.options={version:i.version?String(i.version):DEFAULT_OPTIONS.version,timeout:void 0===i.timeout?DEFAULT_OPTIONS.timeout:Math.max(0,toNumber(i.timeout,0)),retry:void 0===i.retry?DEFAULT_OPTIONS.retry:Math.max(0,toNumber(i.retry,0)),strict:!!i.strict,baseUrl:i.baseUrl||DEFAULT_OPTIONS.baseUrl},this.policy=new LoadPolicy(i),this.guard=new GlobalGuard(this._guardOptions(i)),this.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:"_guardOptions",value:function(e){return!1===e.pollution?{enabled:!1,target:e.target}:e.pollution&&"object"===_typeof(e.pollution)?Object.assign({target:e.target},e.pollution):{target:e.target,watch:e.watch,maxPollution:e.maxPollution,enabled:void 0===e.pollution||!!e.pollution}}},{key:"configure",value:function(e){var t=e||{};return void 0!==t.debug&&(this.debug=!!t.debug),void 0!==t.version&&this.setVersion(t.version),void 0!==t.timeout&&(this.options.timeout=Math.max(0,toNumber(t.timeout,this.options.timeout))),void 0!==t.retry&&(this.options.retry=Math.max(0,toNumber(t.retry,this.options.retry))),void 0!==t.strict&&(this.options.strict=!!t.strict),void 0!==t.baseUrl&&(this.options.baseUrl=t.baseUrl||""),void 0===t.manifest&&void 0===t.origins&&void 0===t.lockVersion&&void 0===t.verifyHash&&void 0===t.fetch||this.policy.configure(t),void 0!==t.pollution?this.guard.configure(this._guardOptions(t)):void 0===t.watch&&void 0===t.maxPollution&&void 0===t.target||this.guard.configure(t),this}},{key:"setVersion",value:function(e){return this.options.version=e?String(e):"",this._applyUrlArgs(),this}},{key:"_applyUrlArgs",value:function(){if("function"!=typeof this.__requireConfig)return!1;try{return this.__requireConfig({urlArgs:this.options.version?"v=".concat(encodeURIComponent(this.options.version)):""}),!0}catch(e){return!1}}},{key:"getVersion",value:function(){return this.options.version}},{key:"describe",value:function(){return Object.assign({},this.options,{debug:this.debug,policy:this.policy.describe(),pollutionGuard:this.guard.enabled,canUndef:"function"==typeof this.__undef,canNativeImport:"function"==typeof(this.__import||nativeImport)})}},{key:"_define",value:function(e,t,r){var i=parseArgs(e,t,r,{path:this.__rootPath,define:this.__define,type:"define"}),n=i.path,o=i.files,a=i.callback,s=i.result;404!==s.code?this.__define(n,o,a):null==a||a(s)}},{key:"_mergeWarnings",value:function(e,t){var r=(e||[]).slice();return(t||[]).forEach(function(e){r.some(function(t){return t.type===e.type&&t.key===e.key})||r.push(e)}),r}},{key:"_undefModules",value:function(e){var t=this;"function"==typeof this.__undef&&e.forEach(function(e){try{t.__undef(e)}catch(e){}})}},{key:"_load",value:function(e,t,r){var i=this,n=this.options,o=parseArgs(e,t,r,{path:this.__rootPath,require:this.__require,type:"require"}),a=o.path,s=o.files,u=o.callback,c=o.result,l=o.filesStr;if(404!==c.code){var f=toModuleIds(a,s),d=this.policy.checkModules(f);if(d)return c.code=d.code,c.message=d.message,void(null==u||u(c));var p=!1,h=0,m=null,g=null,v=function(){g&&(c.warnings=i._mergeWarnings(c.warnings,g.end()),g=null)},y=function(){p||(p=!0,null!==m&&(i._clearTimer(m),m=null),v(),n.strict&&c.warnings.length&&(c.code=500,c.message="Global pollution detection failed:".concat(c.warnings.map(function(e){return"".concat(e.type,":").concat(e.key)}).join(", "))),null==u||u(c))},b=function(){h++,g=i.guard.begin(),n.timeout>0&&(m=i._setTimer(function(){if(!p){var e=new Error("load timeout after ".concat(n.timeout,"ms: ").concat(l));e.__devfabTimeout=!0,_(e,"files load timeout after ".concat(n.timeout,"ms, the files: ").concat(l))}},n.timeout)),i.__require(a,s,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];c.data=t,y()},function(e){_(e)})},_=function(e,t){if(!p){if(null!==m&&(i._clearTimer(m),m=null),h<=n.retry)return v(),i._undefModules(f),void b();c.code=e&&e.__devfabTimeout?CODE_TIMEOUT:500,c.message=t||"files load error, the files: ".concat(l),c.error=e,y()}};b()}else null==u||u(c)}},{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.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,r=this.resolveUrl(e),i=this.policy.checkOrigin(r);if(i)return Promise.resolve({ok:!1,code:i.code,message:i.message});var n=this.policy.entryOf(e),o=n&&n.sha256,a=function(){var e=t.__import||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(r)}).then(function(e){return{ok:!0,module:e}},function(e){return{ok:!1,code:500,message:"module load error: ".concat(r),error:e}})};return o?this.policy.verify(r,o).then(function(e){return e.ok?a():{ok:!1,code:CODE_POLICY,message:"".concat(e.message,"(").concat(r,")")}}):a()}},{key:"loadModules",value:function(e,t,r){var i=this,n=parseArgs(e,t,r,{path:this.__rootPath,type:"module"}),o=n.path,a=n.files,s=n.callback,u=n.result,c=n.filesStr,l=toModuleIds(o,a),f=function(e){return null==s||s(e),e},d=this.policy.checkModules(l);if(d)return u.code=d.code,u.message=d.message,Promise.resolve(f(u));if(!a.length)return Promise.resolve(f(u));var p=this.guard.begin();return Promise.all(l.map(function(e){return i._importOne(e)})).then(function(e){u.warnings=p.end();var t=e.filter(function(e){return!e.ok});return t.length?(u.code=t[0].code||500,u.message="".concat(t.map(function(e){return e.message}).join("; "),"(the files: ").concat(c,")"),u.error=t[0].error):u.data=e.map(function(e){return e.module}),f(u)})}},{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,BaseFileRequire),_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)})}}])}(),FileRequire=new FileRequireClass;window.__devfab=Object.assign({},window.__devfab),window.__devfab.FileRequire=FileRequire;export{CODE_POLICY,CODE_TIMEOUT,DEFAULT_WATCH,FileRequire,GlobalGuard,LoadPolicy,FileRequire as default};
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 k(e){var t=e.id,r=getOwn(s,t);return r||(r=s[t]=new i.Module(e)),r}function x(e,t,r){var i=e.id,n=getOwn(s,i);!hasProp(f,i)||n&&!n.defineEmitComplete?(n=k(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 w(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(i.defQueueMap[t]=!0),l.push(e)}),globalDefQueue=[])}function O(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])||k(_(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(w();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)}O(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),x(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)})||""),x(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")&&O(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),k(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,x(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?x(e,"error",bind(this,this.errback)):this.events.error&&x(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=k(_(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){w();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),O(e))}),o},enable:function(e){getOwn(s,e.id)&&k(e).enable()},completeLoad:function(e){var t,r,n,o=getOwn(a.shim,e)||{},u=o.exports;for(w();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,k=function(){y||(y=!0,null!==_&&(c(_),_=null),null==p||p(h))},x=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,k()},function(e){q(e)})},q=function(e,t){if(!y){if(null!==_&&(c(_),_=null),b<=o.retry)return i._undefModules(v),void x();h.code=e&&e.__devfabTimeout?CODE_TIMEOUT:500,h.message=t||"files load error, the files: ".concat(m),h.error=e,k()}};x()}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,BaseFileRequire),_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)})}}])}(),FileRequire=new FileRequireClass;window.__devfab=Object.assign({},window.__devfab),window.__devfab.FileRequire=FileRequire;export{CODE_POLICY,CODE_TIMEOUT,FileRequire,LoadPolicy,FileRequire as default};
@@ -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
- */Object.defineProperty(exports,"__esModule",{value:!0});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,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=r,r=i):e=[]),o&&o.context&&(a=o.context),s.name&&(a=s.name),(n=getOwn(contexts,a))||(n=contexts[a]=req.s.newContext(a,s)),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,s={waitSeconds:(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).waitSeconds||30,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},a={},u={},c={},l=[],f={},d={},p={},h=1,m=1;function g(e,t,r){var i,n,o,a,u,c,l,f,d,p,h=t&&t.split("/"),m=s.map,g=m&&m["*"];if(e&&(c=(e=e.split("/")).length-1,s.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||g)){for(o=(n=e.split("/")).length;o>0;o-=1){if(u=n.slice(0,o).join("/"),h){var v=!1;for(a=h.length;a>0;a-=1)if((i=getOwn(m,h.slice(0,a).join("/")))&&(i=getOwn(i,u))){l=i,f=o,v=!0;break}if(v)break}!d&&g&&getOwn(g,u)&&(d=getOwn(g,u),p=o)}!l&&d&&(l=d,f=p),l&&(n.splice(0,f,l),e=n.join("/"))}return getOwn(s.pkgs,e)||e}function v(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(s.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,s,a,u,c=null,l=t?t.name:null,d=e,p=!0,v="";return e||(p=!1,e="_@r"+(h+=1)),c=(u=b(e))[0],e=u[1],c&&(c=g(c,l,n),s=getOwn(f,c)),e&&(c?v=s&&s.normalize?s.normalize(e,function(e){return g(e,l,n)}):-1===e.indexOf("!")?g(e,l,n):e:(c=(u=b(v=g(e,l,n)))[0],v=u[1],r=!0,o=i.nameToUrl(v))),{prefix:c,name:v,parentMap:t,unnormalized:!!(a=!c||s||r?"":"_unnormalized"+(m+=1)),url:o,originalName:d,isDefine:p,id:(c?c+"!"+v:v)+a}}function x(e){var t=e.id,r=getOwn(a,t);return r||(r=a[t]=new i.Module(e)),r}function k(e,t,r){var i=e.id,n=getOwn(a,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 w(e,t){var r=e.requireModules,i=!1;t?t(e):(each(r,function(t){var r=getOwn(a,t);r&&(r.error=e,r.events.error&&(i=!0,r.emit("error",e)))}),i||req.onError(e))}function q(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(i.defQueueMap[t]=!0),l.push(e)}),globalDefQueue=[])}function O(e){delete a[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,s=getOwn(a,o);!s||e.depMatched[n]||r[o]||(getOwn(t,o)?(e.defineDep(n,f[o]),e.check()):E(s,t,r))}),r[i]=!0)}function P(){var e,r,n=1e3*s.waitSeconds,a=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&&a)y(i)?(r=!0,f=!0):(c.push(i),v(i));else if(!e.inited&&e.fetched&&t.isDefine&&(f=!0,!t.prefix))return d=!1}),a&&c.length)return(e=makeError("timeout","Load timeout for modules: "+c,null,c)).contextName=i.contextName,w(e);d&&each(l,function(e){E(e,{},{})}),a&&!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(q();l.length;){if(null===(e=l.shift())[0])return w(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(s.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(r=function(e){this.events=getOwn(c,e.id)||{},this.map=e,this.shim=getOwn(s.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,s=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(s)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=i.execCb(r,s,n,o)}catch(t){e=t}else o=i.execCb(r,s,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",w(this.error=e)}else o=s;if(this.exports=o,this.map.isDefine&&!this.ignore&&(f[r]=o,req.onResourceLoad)){var a=[];each(this.depMaps,function(e){a.push(e.normalizedMap||e)}),req.onResourceLoad(i,this.map,a)}O(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 g(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(a,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(a,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&O(e.map.id)}),w(e)}),n.fromText=bind(this,function(r,o){var a=e.name,u=_(a),c=useInteractive;o&&(r=o),c&&(useInteractive=!1),x(u),hasProp(s.config,t)&&(s.config[a]=s.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),i.completeLoad(a),d([a],n)}),void r.load(e.name,d,n,s))})),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,s;if("string"==typeof e){if(e=_(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,s=getOwn(n,e.id))return void(this.depExports[t]=s(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=a[r],hasProp(n,r)||!o||o.enabled||i.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(a,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:s,contextName:e,registry:a,defined:f,urlFetched:d,defQueue:l,defQueueMap:{},Module:r,makeModuleMap:_,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=s.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(s[t]||(s[t]={}),mixin(s[t],e,!0,!0)):s[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}),s.shim=r),e.packages&&each(e.packages,function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(s.paths[t]=e.location),s.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(a,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(s,u,c){var l,d;return r.enableBuildCallback&&u&&isFunction(u)&&(u.__requireJsBuild=!0),"string"==typeof s?isFunction(u)?w(makeError("requireargs","Invalid require call"),c):t&&hasProp(n,s)?n[s](a[t.id]):req.get?req.get(i,s,t,o):(l=_(s,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([])")))):(T(),i.nextTick(function(){T(),(d=x(_(null,t))).skipMap=r.skipMap,d.init(s,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(g(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(a,e)}}),t||(o.undef=function(e){q();var r=_(e,t,!0),n=getOwn(a,e);n.undefed=!0,v(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),O(e))}),o},enable:function(e){getOwn(a,e.id)&&x(e).enable()},completeLoad:function(e){var t,r,n,o=getOwn(s.shim,e)||{},u=o.exports;for(q();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(a,e),!t&&!hasProp(f,e)&&n&&!n.inited){if(!(!s.enforceDefine||u&&getGlobal(u)))return y(e)?void 0:w(makeError("nodefine","No define call for "+e,null,[e]));A([e,o.deps||[],o.exportsFn])}P()},nameToUrl:function(e,t,r){var n,o,a,u,c,l,f=getOwn(s.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=s.paths,a=(o=e.split("/")).length;a>0;a-=1)if(c=getOwn(n,o.slice(0,a).join("/"))){isArray(c)&&(c=c[0]),o.splice(0,a,c);break}u=o.join("/"),u=("/"===(u+=t||(/^data:|^blob:|\?/.test(u)||r?"":".js")).charAt(0)||u.match(/^[\w+.-]+:/)?"":s.baseUrl)+u}return s.urlArgs&&!/^blob:/.test(u)?u+s.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(a,function(e,i){0!==i.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return r.push(i),!0})}),w(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,s=r,a=i,u=n;if(Array.isArray(e)&&"function"==typeof r)t(s=e,a=r,u=i);else{!e&&Array.isArray(s)&&(o=[]),Array.isArray(o)&&Array.isArray(s)&&(o=o.join("/"));var c=o?[]:s;"string"==typeof o&&o&&Array.isArray(s)&&s.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,a,u)}},n=function(e,t,i){var n=e,o=t,s=i;if(Array.isArray(e)&&"function"==typeof t)r(o=e,s=t);else{!e&&Array.isArray(o)&&(n=[]),Array.isArray(n)&&Array.isArray(o)&&(n=n.join("/"));var a=n?[]:o;"string"==typeof n&&n&&Array.isArray(o)&&o.forEach(function(e){a.push("".concat(n).concat("/"===e.substr(0,1)?"":"/").concat(e))}),r(a,s)}};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}}}])}(),DEFAULT_WATCH=["$","jQuery","define","require","requirejs","devfab","__devfab"],GlobalGuard=function(){return _createClass(function e(t){_classCallCheck(this,e);var r=t||{};this.maxPollution=void 0===r.maxPollution?3:Number(r.maxPollution),this.watch=[].concat(r.watch||DEFAULT_WATCH),this.target=r.target||("undefined"!=typeof window?window:null),this.enabled=void 0===r.enabled||!!r.enabled,this._pending=0,this._before=null,this.lastWarnings=[]},[{key:"_snapshot",value:function(){var e=new Map,t=this.target;return t?(Object.keys(t).forEach(function(r){e.set(r,t[r])}),e):e}},{key:"_diff",value:function(){var e=this,t=this._before,r=this._snapshot(),i=[];if(!t)return i;r.forEach(function(r,n){var o=-1!==e.watch.indexOf(n);t.has(n)?t.get(n)!==r&&i.push({type:"overwritten",key:n,watched:o}):i.push({type:"added",key:n,watched:o})});var n=i.filter(function(e){return e.watched}).length,o=i.filter(function(e){return"added"===e.type}).length;return!n&&o<=this.maxPollution?[]:i}},{key:"begin",value:function(){var e=this;if(!this.enabled||!this.target)return{end:function(){return[]}};this._pending++,1===this._pending&&(this._before=this._snapshot());var t=!1;return{end:function(){if(t)return[];if(t=!0,e._pending--,e._pending>0)return[];var r=e._diff();return e._before=null,e.lastWarnings=r,r}}}},{key:"configure",value:function(e){var t=e||{};return void 0!==t.enabled&&(this.enabled=!!t.enabled),void 0!==t.maxPollution&&(this.maxPollution=Number(t.maxPollution)),void 0!==t.watch&&(this.watch=[].concat(t.watch||[])),void 0!==t.target&&(this.target=t.target||null),this}}])}(),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,s=r;Array.isArray(e)&&!Array.isArray(t)&&(n=null==i?void 0:i.path,o=e,s="function"==typeof t?t:r);var a=(o=Array.isArray(o)?o:[]).join(","),u={code:0,message:"",data:[],warnings:[]};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(a)),{path:n,files:o,callback:s,filesStr:a,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,strict:!1,baseUrl:""},BaseFileRequire=function(){return _createClass(function e(t){var r;_classCallCheck(this,e);var i=t||{};void 0!==i.debug&&(this.debug=!!i.debug),this.__rootPath=void 0,this.__define=__requirejs.define,this.__require=__requirejs.require,this.__undef="function"==typeof(null===(r=this.__require)||void 0===r?void 0:r.undef)?this.__require.undef:null,this.__requireConfig=this._pickRequireConfig(this.__require),this.__import=i.importer||null,this._setTimer=i.setTimeout||function(e,t){return setTimeout(e,t)},this._clearTimer=i.clearTimeout||function(e){return clearTimeout(e)},this.options={version:i.version?String(i.version):DEFAULT_OPTIONS.version,timeout:void 0===i.timeout?DEFAULT_OPTIONS.timeout:Math.max(0,toNumber(i.timeout,0)),retry:void 0===i.retry?DEFAULT_OPTIONS.retry:Math.max(0,toNumber(i.retry,0)),strict:!!i.strict,baseUrl:i.baseUrl||DEFAULT_OPTIONS.baseUrl},this.policy=new LoadPolicy(i),this.guard=new GlobalGuard(this._guardOptions(i)),this.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:"_guardOptions",value:function(e){return!1===e.pollution?{enabled:!1,target:e.target}:e.pollution&&"object"===_typeof(e.pollution)?Object.assign({target:e.target},e.pollution):{target:e.target,watch:e.watch,maxPollution:e.maxPollution,enabled:void 0===e.pollution||!!e.pollution}}},{key:"configure",value:function(e){var t=e||{};return void 0!==t.debug&&(this.debug=!!t.debug),void 0!==t.version&&this.setVersion(t.version),void 0!==t.timeout&&(this.options.timeout=Math.max(0,toNumber(t.timeout,this.options.timeout))),void 0!==t.retry&&(this.options.retry=Math.max(0,toNumber(t.retry,this.options.retry))),void 0!==t.strict&&(this.options.strict=!!t.strict),void 0!==t.baseUrl&&(this.options.baseUrl=t.baseUrl||""),void 0===t.manifest&&void 0===t.origins&&void 0===t.lockVersion&&void 0===t.verifyHash&&void 0===t.fetch||this.policy.configure(t),void 0!==t.pollution?this.guard.configure(this._guardOptions(t)):void 0===t.watch&&void 0===t.maxPollution&&void 0===t.target||this.guard.configure(t),this}},{key:"setVersion",value:function(e){return this.options.version=e?String(e):"",this._applyUrlArgs(),this}},{key:"_applyUrlArgs",value:function(){if("function"!=typeof this.__requireConfig)return!1;try{return this.__requireConfig({urlArgs:this.options.version?"v=".concat(encodeURIComponent(this.options.version)):""}),!0}catch(e){return!1}}},{key:"getVersion",value:function(){return this.options.version}},{key:"describe",value:function(){return Object.assign({},this.options,{debug:this.debug,policy:this.policy.describe(),pollutionGuard:this.guard.enabled,canUndef:"function"==typeof this.__undef,canNativeImport:"function"==typeof(this.__import||nativeImport)})}},{key:"_define",value:function(e,t,r){var i=parseArgs(e,t,r,{path:this.__rootPath,define:this.__define,type:"define"}),n=i.path,o=i.files,s=i.callback,a=i.result;404!==a.code?this.__define(n,o,s):null==s||s(a)}},{key:"_mergeWarnings",value:function(e,t){var r=(e||[]).slice();return(t||[]).forEach(function(e){r.some(function(t){return t.type===e.type&&t.key===e.key})||r.push(e)}),r}},{key:"_undefModules",value:function(e){var t=this;"function"==typeof this.__undef&&e.forEach(function(e){try{t.__undef(e)}catch(e){}})}},{key:"_load",value:function(e,t,r){var i=this,n=this.options,o=parseArgs(e,t,r,{path:this.__rootPath,require:this.__require,type:"require"}),s=o.path,a=o.files,u=o.callback,c=o.result,l=o.filesStr;if(404!==c.code){var f=toModuleIds(s,a),d=this.policy.checkModules(f);if(d)return c.code=d.code,c.message=d.message,void(null==u||u(c));var p=!1,h=0,m=null,g=null,v=function(){g&&(c.warnings=i._mergeWarnings(c.warnings,g.end()),g=null)},y=function(){p||(p=!0,null!==m&&(i._clearTimer(m),m=null),v(),n.strict&&c.warnings.length&&(c.code=500,c.message="Global pollution detection failed:".concat(c.warnings.map(function(e){return"".concat(e.type,":").concat(e.key)}).join(", "))),null==u||u(c))},b=function(){h++,g=i.guard.begin(),n.timeout>0&&(m=i._setTimer(function(){if(!p){var e=new Error("load timeout after ".concat(n.timeout,"ms: ").concat(l));e.__devfabTimeout=!0,_(e,"files load timeout after ".concat(n.timeout,"ms, the files: ").concat(l))}},n.timeout)),i.__require(s,a,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];c.data=t,y()},function(e){_(e)})},_=function(e,t){if(!p){if(null!==m&&(i._clearTimer(m),m=null),h<=n.retry)return v(),i._undefModules(f),void b();c.code=e&&e.__devfabTimeout?CODE_TIMEOUT:500,c.message=t||"files load error, the files: ".concat(l),c.error=e,y()}};b()}else null==u||u(c)}},{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.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,r=this.resolveUrl(e),i=this.policy.checkOrigin(r);if(i)return Promise.resolve({ok:!1,code:i.code,message:i.message});var n=this.policy.entryOf(e),o=n&&n.sha256,s=function(){var e=t.__import||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(r)}).then(function(e){return{ok:!0,module:e}},function(e){return{ok:!1,code:500,message:"module load error: ".concat(r),error:e}})};return o?this.policy.verify(r,o).then(function(e){return e.ok?s():{ok:!1,code:CODE_POLICY,message:"".concat(e.message,"(").concat(r,")")}}):s()}},{key:"loadModules",value:function(e,t,r){var i=this,n=parseArgs(e,t,r,{path:this.__rootPath,type:"module"}),o=n.path,s=n.files,a=n.callback,u=n.result,c=n.filesStr,l=toModuleIds(o,s),f=function(e){return null==a||a(e),e},d=this.policy.checkModules(l);if(d)return u.code=d.code,u.message=d.message,Promise.resolve(f(u));if(!s.length)return Promise.resolve(f(u));var p=this.guard.begin();return Promise.all(l.map(function(e){return i._importOne(e)})).then(function(e){u.warnings=p.end();var t=e.filter(function(e){return!e.ok});return t.length?(u.code=t[0].code||500,u.message="".concat(t.map(function(e){return e.message}).join("; "),"(the files: ").concat(c,")"),u.error=t[0].error):u.data=e.map(function(e){return e.module}),f(u)})}},{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,BaseFileRequire),_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,s=t,a=r,u=i;Array.isArray(e)&&"function"==typeof t&&(o=void 0,s=e,a=t,u=r),this.inject(o,s,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=a)||void 0===i||i(o,t)}else"function"==typeof u?u(e):n.debug&&console.error("[devfab][FileRequire][injectScript] error: ",e)})}}])}(),FileRequire=new FileRequireClass;window.__devfab=Object.assign({},window.__devfab),window.__devfab.FileRequire=FileRequire,exports.CODE_POLICY=CODE_POLICY,exports.CODE_TIMEOUT=CODE_TIMEOUT,exports.DEFAULT_WATCH=DEFAULT_WATCH,exports.FileRequire=FileRequire,exports.GlobalGuard=GlobalGuard,exports.LoadPolicy=LoadPolicy,exports.default=FileRequire;
5
+ */Object.defineProperty(exports,"__esModule",{value:!0});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,BaseFileRequire),_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)})}}])}(),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;