@next-core/preview 0.6.1 → 0.6.2
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/dist/core.bc2eb6d4.js +2 -0
- package/dist/core.bc2eb6d4.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/main.6b5ff564.js +2 -0
- package/dist/{main.ff7dc6a4.js.map → main.6b5ff564.js.map} +1 -1
- package/package.json +4 -4
- package/dist/core.5ecf565a.js +0 -2
- package/dist/core.5ecf565a.js.map +0 -1
- package/dist/main.ff7dc6a4.js +0 -2
package/dist/core.5ecf565a.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_core_preview=self.webpackChunk_next_core_preview||[]).push([[114],{2779:(e,t,r)=>{r.r(t);var n=r(9740),a=r(6330),o=r(3100),i=r(4366),s=r(8467),l=r(8679),c=(r(3889),r(2445)),u=r(825),d=/^\[\w+\]$/;function p(e){for(var t of e)f(t)}function f(e){var t=e.slots,r=new Map;if(Array.isArray(e.children)&&!t){var n=[];for(var a of e.children){var o,i=null!==(o=a.slot)&&void 0!==o?o:"";if(d.test(i)){delete a.slot;var s=r.get(i);s?s.push(a):r.set(i,[a]),n.push(a)}f(a)}(0,c.pull)(e.children,...n)}else{var l;for(var[u,h]of(null!==(l=t)&&void 0!==l||(t={}),Object.entries(t))){if(d.test(u)){var{bricks:m}=h;Array.isArray(m)&&m.length>0&&(r.set(u,m),p(m)),delete t[u]}Array.isArray(h.bricks)&&p(h.bricks)}}r.size>0&&v(e.properties,r)}function v(e,t){if(Array.isArray(e))for(var r of e)v(r,t);else if((0,u.isObject)(e))for(var[n,a]of Object.entries(e))if("useChildren"===n){var o=t.get(a);o&&(delete e[n],e.useBrick=1===o.length?o[0]:o)}else v(a,t)}function h(e,t){var r;null!==(r=t.options)&&void 0!==r&&null!==(r=r.interceptorParams)&&void 0!==r&&r.ignoreLoadingBar||window.dispatchEvent(new Event(e))}i.http.interceptors.request.use((e=>(h("request.start",e),e))),i.http.interceptors.response.use((function(e,t){return h("request.end",t),e}),(function(e,t){return h("request.end",t),Promise.reject(e)}));var m=document.querySelector("#global-loading-bar");m.classList.add("rendered");var g=!1,y=0;function A(){var e=y>0;e!==g&&(g=e,m.classList[e?"add":"remove"]("loading"))}window.addEventListener("request.start",(()=>{y++,A()})),window.addEventListener("request.end",(()=>{y>0&&(y--,A())}));var b,E=(0,o.createRuntime)(),w=document.querySelector("#preview-root"),S=document.querySelector("#portal-mount-point"),k=(0,o.unstable_createRoot)(w,{portal:S,scope:"page",unknownBricks:"silent"}),I=i.http.get(window.BOOTSTRAP_FILE,{responseType:"json"}).then((e=>{E.initialize(window.BOOTSTRAP_FILE_FIELD?(0,c.get)(e,window.BOOTSTRAP_FILE_FIELD):e)})),P=!1;function x(e){return C.apply(this,arguments)}function C(){return C=(0,a.A)((function*(e){P=!0;try{var{type:t,sources:r,options:n}=e;yield function(e,t){return R.apply(this,arguments)}(t,r,n)}finally{if(P=!1,b){var a=b;b=void 0,x(a)}}})),C.apply(this,arguments)}window._preview_only_render=(e,t,r)=>{P?b={type:e,sources:t,options:r}:x({type:e,sources:t,options:r})},window._preview_only_inject=function(){var e=(0,a.A)((function*(e,t,r,n){if(yield(0,s.loadBricksImperatively)([e],[].concat(t)),!n){var a=document.createElement(e);yield a.resolve(r)}}));return function(t,r,n,a){return e.apply(this,arguments)}}();var O=!1;function R(){return R=(0,a.A)((function*(e,t){var{yaml:r,html:n}=t,{theme:a,uiVersion:i,context:s,functions:c,templates:u,i18n:d,url:f,app:v,styleText:h,templatesAreArrayOfYaml:m}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(O||(O=!0,document.body.classList.add("bootstrap-ready"),(0,o.applyTheme)("light"===a?a:"dark-v2")),document.body.classList.remove("bootstrap-error"),"html"===e){(0,o.applyTheme)("light"===a?a:"dark-v2"),(0,o.setUIVersion)(i);var g=(new DOMParser).parseFromString(n,"text/html"),y=new Set;for(var A of g.body.querySelectorAll("*"))if(A.tagName.includes("-")){var b=A.tagName.toLowerCase();y.add(b)}else if("SCRIPT"===A.tagName){var P=A.text.matchAll(/\bdocument\.createElement\(\s*"([a-zA-Z0-9.]+-[-a-zA-Z0-9.]+)"\s*\)/g);for(var x of P)y.add(x[1])}yield I,yield E.loadBricks(y),w.replaceChildren(),S.replaceChildren();var C=[],R=g.querySelectorAll("script");for(var B of R){var L=document.createElement("script");L.text=B.text,L.type="module",C.push(L),B.remove()}w.append(...g.head.querySelectorAll("style"),...g.body.childNodes,...C)}else{var _=r?(0,l.safeLoad)(r,{schema:l.JSON_SCHEMA,json:!0}):null,M=[].concat(null!=_?_:[]);p(M),h&&M.push({brick:"style",portal:!0,properties:{textContent:h}});var F=T(s),N=T(c),U=T(u,m),j=T(d);if(Array.isArray(U))for(var V of U)Array.isArray(V.bricks)&&p(V.bricks);yield I,yield k.render(M,{theme:"light"===a?a:"dark-v2",uiVersion:i,context:F,functions:N,templates:U,i18n:j,url:f,app:v})}}catch(e){console.error("Render failed:",e),document.body.classList.add("bootstrap-error"),S.textContent="",w.textContent="Render failed: ".concat(String(e))}})),R.apply(this,arguments)}function T(e,t){return"string"==typeof e?(0,l.safeLoad)(e,{schema:l.JSON_SCHEMA,json:!0}):t?e.map((e=>"string"==typeof e.yaml?(0,n.A)((0,n.A)({},(0,l.safeLoad)(e.yaml,{schema:l.JSON_SCHEMA,json:!0})),{},{name:e.name}):e)):e}},4712:(e,t,r)=>{r.r(t),r.d(t,{cook:()=>N,isEvaluable:()=>z,isTrackAll:()=>J,precook:()=>D,precookFunction:()=>W,preevaluate:()=>K,shouldAllowRecursiveEvaluations:()=>G});var n=r(4586);class a{constructor(){(0,n.A)(this,"VariableEnvironment",void 0),(0,n.A)(this,"LexicalEnvironment",void 0),(0,n.A)(this,"Function",void 0)}}class o{constructor(e){(0,n.A)(this,"OuterEnv",void 0),(0,n.A)(this,"bindingMap",new Map),this.OuterEnv=e}HasBinding(e){return this.bindingMap.has(e)}CreateMutableBinding(e,t){return this.bindingMap.set(e,{mutable:!0,deletable:t}),h(void 0)}CreateImmutableBinding(e,t){return this.bindingMap.set(e,{strict:t}),h(void 0)}InitializeBinding(e,t){var r=this.bindingMap.get(e);return Object.assign(r,{initialized:!0,value:t}),h(void 0)}SetMutableBinding(e,t,r){var n=this.bindingMap.get(e);if(!n.initialized)throw new ReferenceError("".concat(e," is not initialized"));if(!n.mutable)throw new TypeError("Assignment to constant variable");return n.value=t,h(void 0)}GetBindingValue(e,t){var r=this.bindingMap.get(e);if(!r.initialized)throw new ReferenceError("".concat(e," is not initialized"));return r.value}}class i extends o{}class s extends o{}var l=Symbol.for("SourceNode"),c=Symbol.for("FormalParameters"),u=Symbol.for("ECMAScriptCode"),d=Symbol.for("Environment"),p=Symbol.for("IsConstructor");class f{constructor(e,t,r){(0,n.A)(this,"Base",void 0),(0,n.A)(this,"ReferenceName",void 0),(0,n.A)(this,"Strict",void 0),this.Base=e,this.ReferenceName=t,this.Strict=r}}class v{constructor(e,t){(0,n.A)(this,"Type",void 0),(0,n.A)(this,"Value",void 0),this.Type=e,this.Value=t}}function h(e){return new v("normal",e)}var m=Symbol("empty completion");function g(e){var t=new Set,r=e=>{if(Array.isArray(e))for(var n of e)r(n);else if(e)switch(e.type){case"Identifier":return void t.add(e.name);case"VariableDeclaration":return r(e.declarations);case"VariableDeclarator":case"FunctionDeclaration":return r(e.id);case"ArrayPattern":return r(e.elements);case"AssignmentPattern":return r(e.left);case"ObjectPattern":return r(e.properties);case"Property":return r(e.value);case"RestElement":return r(e.argument)}};return r(e),Array.from(t)}function y(e){var t=e=>{if(Array.isArray(e))return e.some(t);if(e)switch(e.type){case"ArrayPattern":return t(e.elements);case"AssignmentPattern":return!0;case"ObjectPattern":return t(e.properties);case"Property":return e.computed||t(e.value);case"RestElement":return t(e.argument)}};return t(e)}function A(e,t){var r=[],n={var:t.var},a=(e,t)=>{if(Array.isArray(e))for(var o of e)a(o,t);else if(e){switch(e.type){case"FunctionDeclaration":return void(Number(!t.var)^Number(t.topLevel)&&r.push(e));case"VariableDeclaration":return void(Number(!t.var)^Number("var"===e.kind)&&r.push(e));case"SwitchCase":return void a(e.consequent,n);case"CatchClause":return void a(e.body,n)}if(t.var)switch(e.type){case"BlockStatement":case"DoWhileStatement":case"WhileStatement":return void a(e.body,n);case"IfStatement":return a(e.consequent,n),void a(e.alternate,n);case"ForStatement":return a(e.init,n),void a(e.body,n);case"ForInStatement":case"ForOfStatement":return a(e.left,n),void a(e.body,n);case"SwitchStatement":return void a(e.cases,n);case"TryStatement":return a(e.block,n),a(e.handler,n),void a(e.finalizer,n)}}};return a(e,t),r}function b(e){return"unresolvable"!==e.Base&&!(e.Base instanceof o)}function E(e,t){return e.Base.InitializeBinding(e.ReferenceName,t)}function w(e,t,r){if(null==t)return e;var n=Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));for(var a of n)if(!r.has(a)){var o=Object.getOwnPropertyDescriptor(t,a);null!=o&&o.enumerable&&(e[a]=t[a])}return e}function S(e,t){var r="const"===e.kind;for(var n of g(e))r?t.CreateImmutableBinding(n,!0):t.CreateMutableBinding(n,!1)}function k(e){return"normal"===e.Type||"continue"==e.Type}function I(e,t){return e.Value!==m?e:new v(e.Type,t)}function P(e){if(e instanceof v&&(e=e.Value),!(e instanceof f))return e;if("unresolvable"===e.Base)throw new ReferenceError("".concat(e.ReferenceName," is not defined"));return e.Base instanceof o?e.Base.GetBindingValue(e.ReferenceName,e.Strict):e.Base[e.ReferenceName]}function x(e){return"symbol"==typeof e?e:String(e)}function C(e,t){return e[t]}function O(e,t){if("unresolvable"===e.Base)throw new ReferenceError("".concat(e.ReferenceName," is not defined"));return e.Base instanceof o?e.Base.SetMutableBinding(e.ReferenceName,t,e.Strict):(e.Base[e.ReferenceName]=t,h(void 0))}function R(e){if(t=e,!(Array.isArray(t)||null!=t&&"function"==typeof t[Symbol.iterator]))throw new TypeError("".concat(typeof e," is not iterable"));var t;return e[Symbol.iterator]()}function T(e){if(null==e)throw new TypeError("Cannot destructure properties of undefined or null")}function B(e,t,r){return e?e.HasBinding(t)?new f(e,t,r):B(e.OuterEnv,t,r):new f("unresolvable",t,r)}function L(e,t,r){switch(t){case"+":return e+r;case"-":return e-r;case"/":return e/r;case"%":return e%r;case"*":return e*r;case"**":return e**r;case"==":return e==r;case"===":return e===r;case"!=":return e!=r;case"!==":return e!==r;case">":return e>r;case"<":return e<r;case">=":return e>=r;case"<=":return e<=r}throw new SyntaxError("Unsupported binary operator `".concat(t,"`"))}var _=new WeakSet([Function,Object,Function.prototype,Object.prototype,function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}()]);function M(e){if(_.has(e))throw new TypeError("Cannot access reserved objects such as `Function`.")}var F=new WeakSet([Array,Map,Set,URLSearchParams,WeakMap,WeakSet,RegExp]);function N(e,t){var r,{rules:n,globalVariables:o={},hooks:_={}}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},N="FunctionDeclaration"!==e.type,U=new i(null),j=new a;j.VariableEnvironment=U,j.LexicalEnvironment=U;var V=[j];for(var[D,$]of Object.entries(o))U.CreateImmutableBinding(D,!0),U.InitializeBinding(D,$);var H=new WeakMap;function q(e,r){var n,a,o;switch(null===(n=_.beforeEvaluate)||void 0===n||n.call(_,e),e.type){case"ArrayExpression":var s=[];for(var l of e.elements)if(l)if("SpreadElement"===l.type){var c=P(q(l.argument));s.push(...c)}else s.push(P(q(l)));else s.length+=1;return h(s);case"ArrowFunctionExpression":return de(e),h(oe(e,W().LexicalEnvironment,!1));case"BinaryExpression":var u=P(q(e.left)),d=q(e.right).Value,y=P(d);if(N&&"|>"===e.operator){if("function"!=typeof y){var A=t.substring(e.right.start,e.right.end);throw new TypeError("".concat(A," is not a function"))}var C;return d instanceof f&&b(d)&&(C=d.Base),h(y.call(C,u))}return h(L(u,e.operator,y));case"CallExpression":var T=q(e.callee,r).Value,B=P(T);return null==B&&(e.optional||null!=r&&r.skipped)?(r.skipped=!0,h(void 0)):(M(B),te(B,T,e.arguments,e.callee));case"ChainExpression":return q(e.expression,{});case"ConditionalExpression":return h(P(q(P(q(e.test))?e.consequent:e.alternate)));case"Identifier":return h(K(e.name));case"Literal":if(e.regex){if(null===e.value)throw new SyntaxError("Invalid regular expression: ".concat(e.raw));if(e.regex.flags.includes("u"))throw new SyntaxError("Unsupported unicode flag in regular expression: ".concat(e.raw))}return h(e.value);case"LogicalExpression":var U=P(q(e.left));switch(e.operator){case"&&":return h(U&&P(q(e.right)));case"||":return h(U||P(q(e.right)));case"??":return h(null!=U?U:P(q(e.right)));default:throw new SyntaxError("Unsupported logical operator '".concat(e.operator,"'"))}case"MemberExpression":var j=P(q(e.object,r).Value);if(null==j&&(e.optional||null!=r&&r.skipped))return r.skipped=!0,h(void 0);M(j);var V=e.computed?function(e,t,r){var n=x(P(q(t)));return new f(e,n,!0)}(j,e.property):function(e,t,r){var n=t.name;return new f(e,n,!0)}(j,e.property);return M(V),h(V);case"NewExpression":return function(e,r){var n=P(q(e)),a=re(r);if("function"!=typeof n||!1===n[p]){var o=t.substring(e.start,e.end);throw new TypeError("".concat(o," is not a constructor"))}if(!function(e){return F.has(e)||e===Date}(n)){var i=t.substring(e.start,e.end);throw new TypeError("".concat(i," is not an allowed constructor"))}return h(new n(...a))}(e.callee,e.arguments);case"ObjectExpression":var D={};for(var $ of e.properties)if("SpreadElement"===$.type)w(D,P(q($.argument)),new Set);else{if("init"!==$.kind)throw new SyntaxError("Unsupported object getter/setter");var H=$.computed||"Identifier"!==$.key.type?se($.key):$.key.name;if("__proto__"===H)throw new TypeError("Setting '__proto__' property is not allowed");D[H]=P(q($.value))}return h(D);case"SequenceExpression":var Y;for(var X of e.expressions)Y=h(P(q(X)));return Y;case"TemplateLiteral":var Z=[e.quasis[0].value.cooked],ae=0;for(var le of e.expressions){var ce=P(q(le));Z.push(String(ce)),Z.push(e.quasis[ae+=1].value.cooked)}return h(Z.join(""));case"TaggedTemplateExpression":var ue=q(e.tag).Value,pe=P(ue);return M(pe),te(pe,ue,e.quasi,e.tag);case"UnaryExpression":var fe=q(e.argument).Value;if(!N&&"delete"===e.operator){if(!(fe instanceof f))return h(!0);if(b(fe))return h(delete fe.Base[fe.ReferenceName])}return"typeof"===e.operator?fe instanceof f&&"unresolvable"===fe.Base?h("undefined"):h(typeof P(fe)):h(function(e,t){switch(t){case"!":return!e;case"+":return+e;case"-":return-e;case"void":return}throw new SyntaxError("Unsupported unary operator `".concat(t,"`"))}(P(fe),e.operator))}if(!N)switch(e.type){case"AssignmentExpression":if("="===e.operator){if("ArrayPattern"!==e.left.type&&"ObjectPattern"!==e.left.type){var ve=q(e.left).Value,he=P(q(e.right));return O(ve,he),h(he)}var me=P(q(e.right));return Q(e.left,me),h(me)}var ge=q(e.left).Value,ye=P(ge),Ae=P(q(e.right)),be=function(e,t,r){switch(t){case"+=":case"-=":case"*=":case"/=":case"%=":case"**=":return L(e,t.substr(0,t.length-1),r)}throw new SyntaxError("Unsupported assignment operator `".concat(t,"`"))}(ye,e.operator,Ae);return O(ge,be),h(be);case"BlockStatement":if(!e.body.length)return h(m);var Ee=W().LexicalEnvironment,we=new i(Ee);ee(e.body,we),W().LexicalEnvironment=we;var Se=ne(e.body);return W().LexicalEnvironment=Ee,Se;case"BreakStatement":return new v("break",m);case"ContinueStatement":return new v("continue",m);case"EmptyStatement":case"FunctionDeclaration":return h(m);case"DoWhileStatement":return z(function(e){for(var t;;){var r=q(e.body);if(!k(r))return I(r,t);if(r.Value!==m&&(t=r.Value),!P(q(e.test)))return h(t)}}(e));case"ExpressionStatement":case"TSAsExpression":return q(e.expression);case"ForInStatement":case"ForOfStatement":return z(function(e){var t=e.left,r="VariableDeclaration"===t.type?"var"===t.kind?"varBinding":"lexicalBinding":"assignment",n="lexicalBinding"===r?g(t):[],a="ForInStatement"===e.type?"enumerate":"iterate",o=function(e,t,r){var n=W(),a=n.LexicalEnvironment;if(e.length>0){var o=new i(a);for(var s of e)o.CreateMutableBinding(s,!1);n.LexicalEnvironment=o}var l=q(t);n.LexicalEnvironment=a;var c=P(l);if("enumerate"===r){if(null==c)return new v("break",m);var u=function*(e){for(var t in e)yield t}(c);return h(u)}return h(R(c))}(n,e.right,a);return"normal"!==o.Type?o:function(e,t,r,n,a){for(var o,s="assignment"===a?e:e.declarations[0].id,l=W().LexicalEnvironment,c="ObjectPattern"===s.type||"ArrayPattern"===s.type;;){var{done:u,value:d}=r.next();if(u)return h(o);var p=void 0,f=void 0;if("lexicalBinding"===a){if(S(e,f=new i(l)),W().LexicalEnvironment=f,!c){var[v]=g(s);p=K(v)}}else c||(p=q(s).Value);c?"assignment"===a?Q(s,d):ie(s,d,"varBinding"===a?void 0:f):"lexicalBinding"===a?E(p,d):O(p,d);var y=q(t);if(W().LexicalEnvironment=l,!k(y)){var A=I(y,o);if("enumerate"!==n&&void 0!==r.return){var b=r.return();if(!b||!["object","function"].includes(typeof b))throw new TypeError("Iterator result is not an object")}return A}y.Value!==m&&(o=y.Value)}}(t,e.body,o.Value,a,r)}(e));case"ForStatement":return z(function(e){var t;if("VariableDeclaration"===(null===(t=e.init)||void 0===t?void 0:t.type)){if("var"===e.init.kind)return q(e.init),J(e.test,e.update,e.body,[]);var r=W().LexicalEnvironment,n=new i(r),a="const"===e.init.kind,o=g(e.init);for(var s of o)a?n.CreateImmutableBinding(s,!0):n.CreateMutableBinding(s,!1);W().LexicalEnvironment=n,q(e.init);var l=a?[]:Array.from(o),c=J(e.test,e.update,e.body,l);return W().LexicalEnvironment=r,c}return e.init&&P(q(e.init)),J(e.test,e.update,e.body,[])}(e));case"FunctionExpression":return de(e),h(function(e){var t=W().LexicalEnvironment;if(e.id){var r=e.id.name,n=new i(t);n.CreateImmutableBinding(r,!1);var a=oe(e,n,!0);return n.InitializeBinding(r,a),a}return oe(e,t,!0)}(e));case"IfStatement":return P(q(e.test))?(null!==(a=_.beforeBranch)&&void 0!==a&&a.call(_,e,"if"),I(q(e.consequent),void 0)):(null!==(o=_.beforeBranch)&&void 0!==o&&o.call(_,e,"else"),e.alternate?I(q(e.alternate),void 0):h(void 0));case"ReturnStatement":var ke;return e.argument&&(ke=P(q(e.argument))),new v("return",ke);case"ThrowStatement":throw P(q(e.argument));case"UpdateExpression":var Ie=q(e.argument).Value,Pe=Number(P(Ie)),xe="++"===e.operator?Pe+1:Pe-1;return O(Ie,xe),h(e.prefix?xe:Pe);case"SwitchCase":return ne(e.consequent);case"SwitchStatement":var Ce=P(q(e.discriminant)),Oe=W().LexicalEnvironment,Re=new i(Oe);ee(e.cases,Re),W().LexicalEnvironment=Re;var Te=function(e,t){var r,n=e.findIndex((e=>!e.test)),a=n>=0,o=a?e.slice(0,n):e,i=!1;for(var s of o)if(i||(i=G(s,t)),i){var l=q(s);if(l.Value!==m&&(r=l.Value),"normal"!==l.Type)return I(l,r)}if(!a)return h(r);var c=!1,u=e.slice(n+1);if(!i)for(var d of u)if(c||(c=G(d,t)),c){var p=q(d);if(p.Value!==m&&(r=p.Value),"normal"!==p.Type)return I(p,r)}if(c)return h(r);var f=q(e[n]);if(f.Value!==m&&(r=f.Value),"normal"!==f.Type)return I(f,r);for(var v of u){var g=q(v);if(g.Value!==m&&(r=g.Value),"normal"!==g.Type)return I(g,r)}return h(r)}(e.cases,Ce);return W().LexicalEnvironment=Oe,z(Te);case"TryStatement":var Be;try{Be=q(e.block)}catch(t){if(!e.handler)throw t;var Le;null===(Le=_.beforeEvaluate)||void 0===Le||Le.call(_,e.handler),Be=function(e,t){if(!e.param)return q(e.body);var r=W().LexicalEnvironment,n=new i(r);for(var a of g(e.param))n.CreateMutableBinding(a,!1);W().LexicalEnvironment=n,ie(e.param,t,n);var o=q(e.body);return W().LexicalEnvironment=r,o}(e.handler,t)}finally{if(e.finalizer){var _e=q(e.finalizer);"normal"!==_e.Type&&(Be=_e)}}return Be;case"VariableDeclaration":var Me;for(var Fe of e.declarations)if(Fe.init)if("Identifier"===Fe.id.type){var Ne=K(Fe.id.name),Ue=P(q(Fe.init));Me="var"===e.kind?O(Ne,Ue):E(Ne,Ue)}else{var je=P(q(Fe.init));Me=ie(Fe.id,je,"var"===e.kind?void 0:W().LexicalEnvironment)}else Me="var"===e.kind?h(m):E(K(Fe.id.name),void 0);return Me;case"WhileStatement":return z(function(e){for(var t;;){if(!P(q(e.test)))return h(t);var r=q(e.body);if(!k(r))return I(r,t);r.Value!==m&&(t=r.Value)}}(e))}throw new SyntaxError("Unsupported node type `".concat(e.type,"`"))}function W(){return V[V.length-1]}function K(e,t){return t||(t=W().LexicalEnvironment),B(t,e,!0)}function z(e){return"break"===e.Type?e.Value===m?h(void 0):h(e.Value):e}function G(e,t){return t===P(q(e.test))}function J(e,t,r,n){var a;for(Y(n);;){if(e&&!P(q(e)))return h(a);var o=q(r);if(!k(o))return I(o,a);o.Value&&(a=o.Value),Y(n),t&&P(q(t))}}function Y(e){if(0!==e.length){var t=W().LexicalEnvironment,r=t.OuterEnv,n=new i(r);for(var a of e){n.CreateMutableBinding(a,!1);var o=t.GetBindingValue(a,!1);n.InitializeBinding(a,o)}W().LexicalEnvironment=n}}function Q(e,t){if("ObjectPattern"===e.type)return T(t),e.properties.length>0&&function(e,t){var r=new Set;for(var n of e)if("Property"===n.type){var a=n.computed||"Identifier"!==n.key.type?se(n.key):n.key.name,o="AssignmentPattern"===n.value.type?n.value.left:n.value;if("Identifier"===o.type){var i=K(o.name),s=C(t,a);"AssignmentPattern"===n.value.type&&void 0===s&&(s=P(q(n.value.right))),O(i,s),r.add(a)}else X(n.value,t,a),r.add(a)}else Z(n,t,r)}(e.properties,t),h(m);var r=R(t);return function(e,t){var r=h(m);for(var n of e)if(n){var a="RestElement"===n.type?n.argument:"AssignmentPattern"===n.type?n.left:n,o="ArrayPattern"===a.type||"ObjectPattern"===a.type,i=void 0;o||(i=q(a).Value);var s=void 0;if("RestElement"!==n.type){var{done:l,value:c}=t.next(),u=l?void 0:c;s="AssignmentPattern"===n.type&&void 0===u?P(q(n.right)):u}else{s=[];for(var d=0;;){var{done:p,value:f}=t.next();if(p)break;s[d]=f,d++}}r=o?Q(a,s):O(i,s)}else t.next(),r=h(m);return r}(e.elements,r)}function X(e,t,r){var n,a="AssignmentPattern"===e.type?e.left:e,o="ArrayPattern"===a.type||"ObjectPattern"===a.type;o||(n=q(a).Value);var i,s=C(t,r);return i="AssignmentPattern"===e.type&&void 0===s?P(q(e.right)):s,o?Q(a,i):O(n,i)}function Z(e,t,r){return O(q(e.argument).Value,w({},t,r))}function ee(e,t){var r=A(e,{var:!1,topLevel:!1});for(var n of r){var a="VariableDeclaration"===n.type&&"const"===n.kind;for(var o of g(n))a?t.CreateImmutableBinding(o,!0):t.CreateMutableBinding(o,!1);if("FunctionDeclaration"===n.type){var[i]=g(n),s=ae(n,t);t.InitializeBinding(i,s)}}}function te(e,r,n,a){var o;r instanceof f&&b(r)&&(o=r.Base);var i=re(n);if("function"!=typeof e){var s=t.substring(a.start,a.end);throw new TypeError("".concat(s," is not a function"))}var l=e.apply(o,i);return M(l),h(l)}function re(e){var t=[];if(Array.isArray(e))for(var r of e)if("SpreadElement"===r.type){var n=P(q(r.argument));t.push(...n)}else t.push(P(q(r)));else for(var a of(t.push(function(e){var t=H.get(e);if(t)return t;var r=e.quasis.map((e=>e.value.raw)),n=e.quasis.map((e=>e.value.cooked));return Object.freeze(r),Object.defineProperty(n,"raw",{value:r,writable:!1,enumerable:!1,configurable:!1}),Object.freeze(n),H.set(e,n),n}(e)),e.expressions))t.push(P(q(a)));return t}function ne(e){var t=h(m);for(var r of e){var n=q(r);if("normal"!==n.Type)return n;t=I(t,n.Value)}return t}function ae(e,t){return oe(e,t,!0)}function oe(e,t,r){var o=function(){return function(e,t){var r;null===(r=_.beforeCall)||void 0===r||r.call(_,e[l]),function(e){var t=new a;t.Function=e;var r=new s(e[d]);t.VariableEnvironment=r,t.LexicalEnvironment=r,V.push(t)}(e);var o=function(e,t){return function(e,t,r){return function(e,t){for(var r=W(),a=e[u],o=e[c],s=g(o),l=y(o),d=A(a,{var:!0,topLevel:!0}),p=g(d),f=[],v=[],h=d.length-1;h>=0;h--){var m=d[h];if("FunctionDeclaration"===m.type){de(m);var[b]=g(m);f.includes(b)||(f.unshift(b),v.unshift(m))}else if(null!=n&&n.noVar)throw new SyntaxError("Var declaration is not recommended, use `let` or `const` instead")}var E,w=r.LexicalEnvironment;for(var S of s)w.CreateMutableBinding(S,!1);if(ce(o,R(t),w),l)for(var k of(E=new i(w),r.VariableEnvironment=E,p)){E.CreateMutableBinding(k,!1);var I=void 0;s.includes(k)&&!f.includes(k)&&(I=w.GetBindingValue(k,!1)),E.InitializeBinding(k,I)}else{for(var P of p)s.includes(P)||(w.CreateMutableBinding(P,!1),w.InitializeBinding(P,void 0));E=w}var x=E;r.LexicalEnvironment=x;var C=A(a,{var:!1,topLevel:!0});for(var O of C)for(var T of g(O))"const"===O.kind?x.CreateImmutableBinding(T,!0):x.CreateMutableBinding(T,!1);for(var B of v){var[L]=g(B),_=ae(B,x);E.SetMutableBinding(L,_,!1)}}(t,r),Array.isArray(e)?ne(e):new v("return",P(q(e)))}(e[u],e,t)}(e,t);if(V.pop(),"return"===o.Type)return o.Value}(o,arguments)};return Object.defineProperties(o,{[l]:{value:e},[c]:{value:e.params},[u]:{value:"BlockStatement"===e.body.type?e.body.body:e.body},[d]:{value:t},[p]:{value:r}}),o}function ie(e,t,r){switch(e.type){case"Identifier":return function(e,t,r){return r.InitializeBinding(e,t),h(m)}(e.name,t,r);case"ObjectPattern":return T(t),function(e,t,r){var n=new Set;for(var a of e){if("RestElement"===a.type)return le(a,t,r,n);if(a.computed||"Identifier"!==a.key.type){var o=se(a.key);ue(a.value,t,r,o),n.add(o)}else ue(a.value,t,r,a.key.name),n.add(a.key.name)}return h(m)}(e.properties,t,r);case"ArrayPattern":var n=R(t);return ce(e.elements,n,r)}}function se(e){return x(P(q(e)))}function le(e,t,r,n){var a=K(e.argument.name,r),o=w({},t,n);return r?E(a,o):O(a,o)}function ce(e,t,r){if(0===e.length)return h(m);var n;for(var a of e)if(a)if("RestElement"===a.type)if("Identifier"===a.argument.type)for(var o=K(a.argument.name,r),i=[],s=0;;){var{done:l,value:c}=t.next();if(l){n=r?E(o,i):O(o,i);break}i[s]=c,s++}else for(var u=[],d=0;;){var{done:p,value:f}=t.next();if(p){n=ie(a.argument,u,r);break}u[d]=f,d++}else{var v="AssignmentPattern"===a.type?a.left:a;switch(v.type){case"ObjectPattern":case"ArrayPattern":var g=void 0,{done:y,value:A}=t.next();y||(g=A),"AssignmentPattern"===a.type&&void 0===g&&(g=P(q(a.right))),n=ie(v,g,r);break;case"Identifier":var b=K(v.name,r),w=void 0,{done:S,value:k}=t.next();S||(w=k),"AssignmentPattern"===a.type&&void 0===w&&(w=P(q(a.right))),n=r?E(b,w):O(b,w)}}else t.next(),n=h(m);return n}function ue(e,t,r,n){if("Identifier"===e.type||"AssignmentPattern"===e.type&&"Identifier"===e.left.type){var a=K("Identifier"===e.type?e.name:e.left.name,r),o=C(t,n);return"AssignmentPattern"===e.type&&void 0===o&&(o=P(q(e.right))),r?E(a,o):O(a,o)}var i=C(t,n);return"AssignmentPattern"===e.type&&void 0===i&&(i=P(q(e.right))),ie("AssignmentPattern"===e.type?e.left:e,i,r)}function de(e){if(e.async||e.generator)throw new SyntaxError("".concat(e.async?"Async":"Generator"," function is not allowed"));if(N&&!e.expression)throw new SyntaxError("Only an `Expression` is allowed in `ArrowFunctionExpression`'s body")}if(N)return P(q(e));null===(r=_.beforeEvaluate)||void 0===r||r.call(_,e),de(e);var[pe]=g(e);U.CreateImmutableBinding(pe,!0);var fe=ae(e,U);return U.InitializeBinding(pe,fe),fe}var U=r(9740);class j{constructor(){(0,n.A)(this,"VariableEnvironment",void 0),(0,n.A)(this,"LexicalEnvironment",void 0)}}class V{constructor(e){(0,n.A)(this,"OuterEnv",void 0),(0,n.A)(this,"bindingSet",new Set),this.OuterEnv=e}HasBinding(e){return this.bindingSet.has(e)}CreateBinding(e){this.bindingSet.add(e)}}function D(e){var{expressionOnly:t,visitors:r,withParent:n,hooks:a={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=new Set,i=[],s=new V(null),l=new j;function c(){return i[i.length-1]}function u(e,t,r){for(var n of t)d(e[n],null==r?void 0:r.concat({node:e,key:n}))}function d(e,n){if(Array.isArray(e))e.forEach(((e,t)=>{d(e,n?n.slice(0,-1).concat((0,U.A)((0,U.A)({},n[n.length-1]),{},{index:t})):n)}));else if(e){var i,s;switch(null===(i=a.beforeVisit)||void 0===i||i.call(a,e,n),function(e){var t,n;r&&(t=r,n=e.type,Object.prototype.hasOwnProperty.call(t,n))&&r[e.type](e)}(e),e.type){case"Identifier":var l;return $=e.name,void(f(c().LexicalEnvironment,$)||(null===(l=a.beforeVisitGlobal)||void 0===l||l.call(a,e,n),o.add(e.name)));case"ArrayExpression":case"ArrayPattern":return void u(e,["elements"],n);case"ArrowFunctionExpression":return void h(m(e,c().LexicalEnvironment),n);case"AssignmentPattern":case"BinaryExpression":case"LogicalExpression":return void u(e,["left","right"],n);case"CallExpression":case"NewExpression":return void u(e,["callee","arguments"],n);case"ChainExpression":return void u(e,["expression"],n);case"ConditionalExpression":return void u(e,["test","consequent","alternate"],n);case"MemberExpression":return u(e,["object"],n),void(e.computed&&u(e,["property"],n));case"ObjectExpression":case"ObjectPattern":return void u(e,["properties"],n);case"Property":return e.computed&&u(e,["key"],n),void u(e,["value"],n);case"RestElement":case"SpreadElement":case"UnaryExpression":return void u(e,["argument"],n);case"SequenceExpression":case"TemplateLiteral":return void u(e,["expressions"],n);case"TaggedTemplateExpression":return void u(e,["tag","quasi"],n);case"Literal":return}if(!t)switch(e.type){case"AssignmentExpression":return void u(e,["right","left"],n);case"BlockStatement":if(!e.body.length)return;var y=c(),A=y.LexicalEnvironment,b=new V(A);return v(e.body,b),y.LexicalEnvironment=b,u(e,["body"],n),void(y.LexicalEnvironment=A);case"BreakStatement":case"ContinueStatement":case"EmptyStatement":return;case"CatchClause":var E=c(),w=E.LexicalEnvironment,S=new V(w);return p(e.param,S),E.LexicalEnvironment=S,u(e,["param","body"],n),void(E.LexicalEnvironment=w);case"DoWhileStatement":return void u(e,["body","test"],n);case"ExpressionStatement":case"TSAsExpression":return void u(e,["expression"],n);case"ForInStatement":case"ForOfStatement":var k="VariableDeclaration"===e.left.type&&"var"!==e.left.kind,I=c(),P=I.LexicalEnvironment;if(k){var x=new V(P);p(e.left,x),I.LexicalEnvironment=x}if(u(e,["right"],n),I.LexicalEnvironment=P,k){var C=new V(P);p(e.left,C),I.LexicalEnvironment=C}return u(e,["left","body"],n),void(I.LexicalEnvironment=P);case"ForStatement":var O,R="VariableDeclaration"===(null===(O=e.init)||void 0===O?void 0:O.type)&&"var"!==e.init.kind,T=c(),B=T.LexicalEnvironment;if(R){var L=new V(B);p(e.init,L),T.LexicalEnvironment=L}return u(e,["init","test","body","update"],n),void(T.LexicalEnvironment=B);case"FunctionDeclaration":var[_]=g(e),M=c().LexicalEnvironment,F=m(e,M);return M.CreateBinding(_),void h(F,n);case"FunctionExpression":return void h(function(e){var t=c().LexicalEnvironment;if(!e.id)return m(e,t);var r=e.id.name,n=new V(t);return n.CreateBinding(r),m(e,n)}(e),n);case"IfStatement":return void u(e,["test","consequent","alternate"],n);case"ReturnStatement":case"ThrowStatement":case"UpdateExpression":return void u(e,["argument"],n);case"SwitchCase":return void u(e,["test","consequent"],n);case"SwitchStatement":u(e,["discriminant"],n);var N=c(),j=N.LexicalEnvironment,D=new V(j);return v(e.cases,D),N.LexicalEnvironment=D,u(e,["cases"],n),void(N.LexicalEnvironment=j);case"TryStatement":return void u(e,["block","handler","finalizer"],n);case"VariableDeclaration":return void u(e,["declarations"],n);case"VariableDeclarator":return void u(e,["id","init"],n);case"WhileStatement":return void u(e,["test","body"],n)}(null===(s=a.beforeVisitUnknown)||void 0===s?void 0:s.call(a,e,n))||console.warn("Unsupported node type `".concat(e.type,"`"))}var $}function p(e,t){for(var r of g(e))t.CreateBinding(r)}function f(e,t){return!!e&&(e.HasBinding(t)||f(e.OuterEnv,t))}function v(e,t){p(A(e,{var:!1,topLevel:!1}),t)}function h(e,t){var r,n,a;r=e,n=new j,a=new V(r.Environment),n.VariableEnvironment=a,n.LexicalEnvironment=a,i.push(n),function(e,t){var r,n=c(),a=e.ECMAScriptCode,o=e.FormalParameters,i=y(o),s=g(A(a,{var:!0,topLevel:!0})),l=n.LexicalEnvironment;if(p(o,l),d(o,null==t?void 0:t.concat({node:e.Function,key:"params"})),i)for(var u of(r=new V(l),n.VariableEnvironment=r,s))r.CreateBinding(u);else{for(var f of s)l.CreateBinding(f);r=l}var v=r;n.LexicalEnvironment=v,p(A(a,{var:!1,topLevel:!0}),v)}(e,t),d(e.ECMAScriptCode,null==t?void 0:t.concat({node:e.Function,key:"body"}).concat("BlockStatement"===e.Function.body.type?{node:e.Function.body,key:"body"}:[])),i.pop()}function m(e,t){return{Function:e,FormalParameters:e.params,ECMAScriptCode:"BlockStatement"===e.body.type?e.body.body:e.body,Environment:t}}return l.VariableEnvironment=s,l.LexicalEnvironment=s,i.push(l),d(e,n?[]:void 0),o}var $=r(4223),H=r(2570),q=["typescript"];function W(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{typescript:r}=t,n=(0,$.A)(t,q),a=function(e){var{typescript:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,H.parse)(e,{plugins:["estree",t&&"typescript"].filter(Boolean),strictMode:!0,attachComment:!1}).program.body,n=t?[]:r;if(t)for(var a of r)if(a.type.startsWith("TS")){if(/Enum|Import|Export/.test(a.type))throw new SyntaxError("Unsupported TypeScript syntax: ".concat(a.type))}else n.push(a);if(0===n.length)throw new SyntaxError("Function declaration not found");if(n.length>1||"FunctionDeclaration"!==n[0].type)throw new SyntaxError("Expect a single function declaration at top level, but received: ".concat(n.map((e=>'"'.concat(e.type,'"'))).join(", ")));return n[0]}(e,{typescript:r});return{function:a,attemptToVisitGlobals:D(a,n)}}function K(e,t){var r=[],n=e.replace(/^\s*<%[~=]?\s|\s%>\s*$/g,(e=>(r.push(e),""))),a=function(e){return(0,H.parseExpression)(e,{plugins:["estree",["pipelineOperator",{proposal:"minimal"}]],attachComment:!1})}(n);return{expression:a,attemptToVisitGlobals:D(a,(0,U.A)((0,U.A)({},t),{},{expressionOnly:!0})),source:n,prefix:r[0],suffix:r[1]}}function z(e){return/^\s*<%[~=]?\s/.test(e)&&/\s%>\s*$/.test(e)}function G(e){return/^\s*<%~\s/.test(e)}function J(e){return/^\s*<%=\s/.test(e)&&/\s%>\s*$/.test(e)}},2308:(e,t,r)=>{r.r(t),r.d(t,{HttpAbortError:()=>q,HttpFetchError:()=>D,HttpParseError:()=>H,HttpResponseError:()=>$,createHttpInstance:()=>z,defaultAdapter:()=>G,fetch:()=>V,http:()=>W,isHttpAbortError:()=>K});var n={};r.r(n),r.d(n,{HttpAbortError:()=>g,HttpFetchError:()=>v,HttpParseError:()=>m,HttpResponseError:()=>h,createHttpInstance:()=>U,defaultAdapter:()=>O,fetch:()=>a,getUrlWithParams:()=>x,http:()=>N,isHttpAbortError:()=>I});var a=(e,t)=>{var r=new Request(e,Object.assign({credentials:"same-origin"},t));return self.fetch(r)},o=r(4635),i=r(918),s=r(4586),l=r(829),c=r(2559),u=r(6121),d=r(9740),p=r(4223),f=r(6330);class v extends Error{constructor(e){super(e),this.name="HttpFetchError",Error.captureStackTrace&&Error.captureStackTrace(this,v)}}class h extends Error{constructor(e,t){super(e.statusText),(0,s.A)(this,"response",void 0),(0,s.A)(this,"responseJson",void 0),this.name="HttpResponseError",Error.captureStackTrace&&Error.captureStackTrace(this,h),this.response=e,this.responseJson=t}}class m extends Error{constructor(e){super(e.statusText),(0,s.A)(this,"response",void 0),this.name="HttpParseError",Error.captureStackTrace&&Error.captureStackTrace(this,m),this.response=e}}class g extends Error{constructor(e){super(e),this.name="HttpAbortError"}}class y{constructor(){(0,s.A)(this,"handlers",[])}use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}forEach(e){this.handlers.forEach((t=>{null!==t&&e(t)}))}}var A=["params","responseType","interceptorParams","observe","noAbortOnRouteChange","useCache"],b=["params","headers","responseType","interceptorParams","observe","noAbortOnRouteChange","useCache"],E=["body","method"];function w(e){return null==e}var S=document.querySelector("base"),k=S?S.href:location.origin+"/",I=e=>e instanceof DOMException&&20===e.code,P=function(){var e=(0,f.A)((function*(e,t,r){return new Promise(function(){var n=(0,f.A)((function*(n,o){var i;r.url=e;var{responseType:s}=r.options||{};s||(s="json");try{i=yield a(e,t)}catch(e){return void o(I(e)?new g(e.toString()):new v(e.toString()))}if(i.ok){var l;try{l=yield i[s]()}catch(e){return void o(I(e)?new g(e.toString()):new m(i))}n({status:i.status,statusText:i.statusText,headers:i.headers,data:l})}else{var c;try{c=yield i.json()}catch(e){}o(new h(i,c))}}));return function(e,t){return n.apply(this,arguments)}}())}));return function(t,r,n){return e.apply(this,arguments)}}(),x=(e,t)=>{if(t){var r=new URL(e,k);t instanceof URLSearchParams?t.forEach((function(e,t){r.searchParams.append(t,e)})):Object.entries(t).forEach((e=>{var[t,n]=e;Array.isArray(n)?n.forEach((e=>{r.searchParams.append(t,w(e)?"":e)})):r.searchParams.append(t,w(n)?"":n)}));var{href:n}=r;return n.startsWith(k)?n.substr(k.length):n}return e},C=(e,t)=>{if(void 0!==e){var r=new Headers(t||{}),n="Content-Type",a=e;return r.has(n)||("string"==typeof e?r.set(n,"application/x-www-form-urlencoded"):e instanceof FormData||(r.set(n,"application/json"),a=JSON.stringify(e))),{body:a,headers:r}}return{headers:t}},O=e=>{var{url:t,method:r,data:n}=e;return["DELETE","GET","HEAD"].includes(e.method)?((e,t,r)=>{var n=r.options||{},{params:a,responseType:o,interceptorParams:i,observe:s,noAbortOnRouteChange:l,useCache:c}=n,u=(0,p.A)(n,A);return P(x(t,a),(0,d.A)((0,d.A)({},u),{},{method:e}),r)})(r,t,e):((e,t,r,n)=>{var a=n.options||{},{params:o,headers:i,responseType:s,interceptorParams:l,observe:c,noAbortOnRouteChange:u,useCache:f}=a,v=(0,p.A)(a,b);return P(x(t,o),(0,d.A)((0,d.A)({},v),{},{method:e},C(r,i)),n)})(r,t,n,e)},R=new WeakMap,T=new WeakSet;class B{constructor(e){var t=this;(0,o.A)(this,T),(0,s.A)(this,"interceptors",void 0),(0,i.A)(this,R,O),(0,s.A)(this,"request",function(){var e=(0,f.A)((function*(e,r,n){var a=r||{},{body:o,method:i}=a,s=(0,p.A)(a,E);return(0,c.A)(T,t,L).call(t,{url:e,data:o,method:i||"GET",options:(0,d.A)((0,d.A)({},n||{}),s)})}));return function(t,r,n){return e.apply(this,arguments)}}()),(0,s.A)(this,"simpleRequest",(function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,c.A)(T,t,L).call(t,{url:r,method:e,options:n})})),(0,s.A)(this,"requestWithBody",(function(e,r,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,c.A)(T,t,L).call(t,{url:r,method:e,data:n,options:a})})),this.interceptors={request:new y,response:new y},null!=e&&e.adapter&&(0,u.A)(R,this,e.adapter)}getUrlWithParams(e,t){return x(e,t)}getBodyAndHeaders(e,t){return C(e,t)}get(e,t){return(0,c.A)(T,this,L).call(this,{url:e,method:"GET",options:t})}delete(e,t){return(0,c.A)(T,this,L).call(this,{url:e,method:"DELETE",options:t})}head(e,t){return(0,c.A)(T,this,L).call(this,{url:e,method:"HEAD",options:t})}post(e,t,r){return(0,c.A)(T,this,L).call(this,{url:e,method:"POST",data:t,options:r})}put(e,t,r){return(0,c.A)(T,this,L).call(this,{url:e,method:"PUT",data:t,options:r})}patch(e,t,r){return(0,c.A)(T,this,L).call(this,{url:e,method:"PATCH",data:t,options:r})}}function L(e){var t=[],r=Promise.resolve(e);for(this.interceptors.request.forEach((e=>{t.push(e.fulfilled,e.rejected)})),t.push((e=>(0,l.A)(R,this).call(this,e)),void 0),this.interceptors.response.forEach((r=>{t.push((t=>{var n;return null===(n=r.fulfilled)||void 0===n?void 0:n.call(r,t,e)}),(t=>{var n;return null===(n=r.rejected)||void 0===n?void 0:n.call(r,t,e)}))})),t.push((t=>{var r;return"response"===(null===(r=e.options)||void 0===r?void 0:r.observe)?t:t.data}),void 0);t.length;)r=r.then(t.shift(),t.shift());return r}var _,M,F,N=new B;function U(e){N=new B(e)}var{dll:j}=window;M=j&&null!==(_=window.BRICK_NEXT_VERSIONS)&&void 0!==_&&null!==(_=_["brick-container"])&&void 0!==_&&_.startsWith("2.")&&(F=j("JxWY"))?F:n;var{fetch:V,HttpFetchError:D,HttpResponseError:$,HttpParseError:H,HttpAbortError:q,http:W,isHttpAbortError:K,createHttpInstance:z,defaultAdapter:G}=M},7472:(e,t,r)=>{r.r(t),r.d(t,{i18n:()=>d,i18nText:()=>u,initializeI18n:()=>l});var n=r(2350),a=r(5253),o=r(7072),i=!1,s=new Set;function l(e,t){if(i||(i=!0,a.i18n.use(o.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&t&&!s.has(e))for(var[r,n]of(s.add(e),Object.entries(t)))a.i18n.addResourceBundle(r,e,n)}var c=r(825);function u(e){var t;if(e){var r=null!==(t=a.i18n.language)&&void 0!==t?t:"zh-CN";if((0,c.hasOwnProperty)(e,r))return e[r];var n=r.split("-")[0];if(n!==r)return(0,c.hasOwnProperty)(e,n)?e[n]:void 0;var o="".concat(n,"-");for(var i of Object.keys(e))if(i.startsWith(o))return e[i]}}var d=n.default},5774:(e,t,r)=>{r.r(t),r.d(t,{inject:()=>S,transform:()=>w,transformAndInject:()=>k});var n=r(1030),a=r(6049),o=function(e){return e[e.Initial=0]="Initial",e[e.ExpectField=1]="ExpectField",e[e.ExpectOptionalBeginDefault=2]="ExpectOptionalBeginDefault",e[e.ExpectDefaultValue=3]="ExpectDefaultValue",e[e.ExpectOptionalBeginPipe=4]="ExpectOptionalBeginPipe",e[e.ExpectPipeIdentifier=5]="ExpectPipeIdentifier",e[e.ExpectOptionalBeginPipeParameter=6]="ExpectOptionalBeginPipeParameter",e[e.ExpectPipeParameter=7]="ExpectPipeParameter",e[e.ExpectPlaceholderEnd=8]="ExpectPlaceholderEnd",e}({}),i=function(e){return e.Raw="Raw",e.BeginPlaceHolder="BeginPlaceHolder",e.Field="Field",e.BeginDefault="BeginDefault",e.LiteralString="LiteralString",e.BeginPipe="BeginPipe",e.PipeIdentifier="PipeIdentifier",e.BeginPipeParameter="BeginPipeParameter",e.EndPlaceHolder="EndPlaceHolder",e.JsonValue="JsonValue",e}({}),s=function(e){return e[e.Array=0]="Array",e[e.Object=1]="Object",e[e.String=2]="String",e[e.Others=3]="Others",e}({});function l(e){return new RegExp("(".concat([].concat(e).map((e=>(0,n.escapeRegExp)(e))).join("|"),")\\{"))}function c(e){var t,r=E(e),n=null===(t=r.match(e.beginPlaceholder))||void 0===t?void 0:t[0],a=n?r.indexOf(n):-1;if(a>=0&&n&&"{"!==r.charAt(a+n.length)){var s=e.cursor+a;a>0&&e.tokens.push({type:i.Raw,value:r.substring(0,a)}),e.tokens.push({type:i.BeginPlaceHolder,loc:{start:s,end:s+n.length},value:n.substring(0,n.length-1)}),e.cursor+=a+n.length,e.status=o.ExpectField}else e.tokens.push({type:i.Raw,value:r}),e.cursor=e.raw.length}function u(e){e.cursor+=E(e).match(/^[ \r\n\t]*/)[0].length}function d(e){var[t]=E(e).match(/^(?:[\*\x2D\.0-9A-\[\]_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*/);e.tokens.push({type:i.Field,value:t}),e.cursor+=t.length,e.status=o.ExpectOptionalBeginDefault}function p(e){"="===E(e).charAt(0)?(e.tokens.push({type:i.BeginDefault}),e.cursor+=1,e.status=o.ExpectDefaultValue):e.status=o.ExpectOptionalBeginPipe}function f(e){b(e,o.ExpectOptionalBeginPipe)}function v(e){"|"===E(e).charAt(0)?(e.tokens.push({type:i.BeginPipe}),e.cursor+=1,e.status=o.ExpectPipeIdentifier):e.status=o.ExpectPlaceholderEnd}function h(e){var t=E(e).match(/^[a-zA-Z]\w*/);if(!t)throw new Error("Expected a pipe identifier at index ".concat(e.cursor," near: ").concat(JSON.stringify(e.raw.substring(e.cursor))));var r=t[0];e.tokens.push({type:i.PipeIdentifier,value:r}),e.cursor+=r.length,e.status=o.ExpectOptionalBeginPipeParameter}function m(e){":"===E(e).charAt(0)?(e.tokens.push({type:i.BeginPipeParameter}),e.cursor+=1,e.status=o.ExpectPipeParameter):e.status=o.ExpectOptionalBeginPipe}function g(e){b(e,o.ExpectOptionalBeginPipeParameter)}function y(e){if("}"!==E(e).charAt(0))throw new Error("Expected a placeholder end '}' at index ".concat(e.cursor," near: ").concat(JSON.stringify(e.raw.substring(e.cursor))));e.tokens.push({type:i.EndPlaceHolder,loc:{start:e.cursor,end:e.cursor+1}}),e.cursor+=1,e.status=o.Initial}var A=new Map([["false",!1],["null",null],["true",!0]]);function b(e,t){var r=E(e);if(/[0-9[{"]/.test(r.charAt(0))||/-[0-9]/.test(r.substring(0,2)))!function(e,t){for(var r=E(e),n=r.charAt(0),a="["===n?s.Array:"{"===n?s.Object:'"'===n?s.String:s.Others,o=0,l=0,c=0,u=!1,d=!1,p=!1;o<r.length;){var f=r.charAt(o);if(d)d=!1;else if(u)'"'===f?u=!1:"\\"===f&&(d=!0);else switch(f){case"[":c+=1;break;case"{":l+=1;break;case"]":c-=1;break;case"}":l-=1;break;case'"':u=!0}switch(o+=1,a){case s.Array:p=!c;break;case s.Object:p=!l;break;case s.String:p=!u;break;default:p=o<r.length&&/[^a-z0-9E.+-]/.test(r.charAt(o))}if(p)break}if(!p)throw new Error("Failed to match a JSON value at index ".concat(e.cursor," near: ").concat(JSON.stringify(e.raw.substring(e.cursor))));e.tokens.push({type:i.JsonValue,value:JSON.parse(r.substring(0,o))}),e.cursor+=o,e.status=t}(e,t);else{var[n]=E(e).match(/^(?:[\x2D0-9A-Z_a-z\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*/);A.has(n)?e.tokens.push({type:i.JsonValue,value:A.get(n)}):e.tokens.push({type:i.LiteralString,value:n}),e.cursor+=n.length,e.status=t}}function E(e){return e.raw.substring(e.cursor)}function w(e,t){return I(e,"@",t)}function S(e,t){return I(e,"$",t)}function k(e,t){return I(e,["@","$"],t)}function I(e,t,r){if(!function(e,t){return l(t).test(e)}(e,t))return e;var s,A,b=(s=r.data,function(e){var t=e.field?(0,n.get)(s,e.field):s;return void 0===t&&(t=e.defaultValue),(0,a.processPipes)(t,e.pipes)}),E=function(e,t){return function(r){var o,i,s=r.field.match(/^(?:(QUERY(?:_ARRAY)?|EVENT|query|event|APP|HASH|ANCHOR|SYS|FLAGS|CTX)\.)?(.+)$/);if(!s)return t.substring(r.loc.start,r.loc.end);var l,[,c,u]=s;!c&&/^[A-Z_]+$/.test(u)&&(c=u,u="*");var d={SYS:"sys",FLAGS:"flags"};switch(c){case"QUERY":case"query":l="*"===u?e.query:e.query.has(u)?e.query.get(u):void 0;break;case"QUERY_ARRAY":l=e.query.has(u)?e.query.getAll(u):void 0;break;case"EVENT":case"event":if(void 0===e.event)return t.substring(r.loc.start,r.loc.end);l="*"===u?e.event:(0,n.get)(e.event,u);break;case"APP":l="*"===u?null!==(o=e.overrideApp)&&void 0!==o?o:e.app:(0,n.get)(null!==(i=e.overrideApp)&&void 0!==i?i:e.app,u);break;case"HASH":l=e.location.hash;break;case"SYS":case"FLAGS":l="*"===u?e[d[c]]:(0,n.get)(e[d[c]],u);break;case"ANCHOR":var p=e.location.hash?e.location.hash.substr(1):null;l="*"===u?p:(0,n.get)(p,u);break;case"CTX":var f=t.substring(r.loc.start,r.loc.end);return console.error('CTX is not supported in placeholder any more: "'.concat(f,'"')),f;default:if(!e.match)return t.substring(r.loc.start,r.loc.end);l=e.match.params[u]}return void 0===l&&(l=r.defaultValue),(0,a.processPipes)(l,r.pipes)}}(r,e);return A=function(e,t){return function(e){var t,r={type:"InjectableString",elements:[]};function n(r){return r===e[0].type&&(t=e.shift(),!0)}function a(r){if(t=e.shift(),Array.isArray(r)?!r.includes(t.type):r!==t.type)throw new Error("Expected token: ".concat(r,", received token: ").concat(t.type))}for(;e.length>0;)if(n(i.Raw))r.elements.push({type:"RawString",value:t.value});else{a(i.BeginPlaceHolder);var o=t.loc.start,s=t.value;a(i.Field);var l={type:"Placeholder",symbol:s,field:t.value,defaultValue:void 0,pipes:[],loc:{start:o,end:o}};for(r.elements.push(l),n(i.BeginDefault)&&(a([i.JsonValue,i.LiteralString]),l.defaultValue=t.value);n(i.BeginPipe);){a(i.PipeIdentifier);var c={type:"PipeCall",identifier:t.value,parameters:[]};for(l.pipes.push(c);n(i.BeginPipeParameter);)a([i.JsonValue,i.LiteralString]),c.parameters.push(t.value)}a(i.EndPlaceHolder),l.loc.end=t.loc.end}return r}(function(e,t){for(var r={beginPlaceholder:l(t),raw:e,cursor:0,status:o.Initial,tokens:[]};r.cursor<e.length;)switch(r.status){case o.Initial:c(r);break;case o.ExpectField:u(r),d(r);break;case o.ExpectOptionalBeginDefault:u(r),p(r);break;case o.ExpectDefaultValue:u(r),f(r);break;case o.ExpectOptionalBeginPipe:u(r),v(r);break;case o.ExpectPipeIdentifier:u(r),h(r);break;case o.ExpectOptionalBeginPipeParameter:u(r),m(r);break;case o.ExpectPipeParameter:u(r),g(r);break;case o.ExpectPlaceholderEnd:u(r),y(r)}if(r.status!==o.Initial)throw new Error("Expected a placeholder end '}' at the end");return r.tokens}(e,t))}(e,t).elements.map((e=>"RawString"===e.type?e.value:"$"===e.symbol?E(e):b(e))),1===A.length?A[0]:A.join("")}},7457:(e,t,r)=>{r.r(t),r.d(t,{enqueueStableLoadBricks:()=>m,enqueueStableLoadProcessors:()=>g,flushStableLoadBricks:()=>h,loadBricksImperatively:()=>y,loadProcessorsImperatively:()=>b,loadScript:()=>i,loadSharedModule:()=>u,loadStyle:()=>s});var n=r(9740),a=new Map;function o(e,t,r,i){if(Array.isArray(t))return Promise.all(t.map((t=>o(e,t,r))));var s=r&&!/^https?:/.test(t)?"".concat(r).concat(t):t,l=a.get(s);if(l)return l;var c=new Promise(((t,r)=>{var a=()=>{window.dispatchEvent(new Event("request.end"))},o=document.createElement("style"===e?"link":"script");"script"===e?Object.assign(o,(0,n.A)((0,n.A)({type:"text/javascript",async:!0},i),{},{src:s})):Object.assign(o,(0,n.A)((0,n.A)({rel:"stylesheet"},i),{},{href:s})),o.onload=()=>{t(s),a()},o.onerror=e=>{r(e),a()};var l=document.currentScript||document.getElementsByTagName("script")[0];l.parentNode.insertBefore(o,l),window.dispatchEvent(new Event("request.start"))}));return a.set(s,c),c}function i(e,t,r){return o("script",e,t,r)}function s(e,t,r){return o("style",e,t,r)}var l,c=r(6330);function u(e,t){return d.apply(this,arguments)}function d(){return(d=(0,c.A)((function*(e,t){yield r.I("default");var n=window[e];return yield n.init(r.S.default),(yield n.get(t))()}))).apply(this,arguments)}var p,f=!1,v=new Promise((e=>{l=e}));function h(){f||l()}function m(e,t){return C(P("bricks",e,t))}function g(e,t){return C(P("processors",e,t))}function y(e,t){return A.apply(this,arguments)}function A(){return(A=(0,c.A)((function*(e,t){var r=P("bricks",e,t);return h(),C(r)}))).apply(this,arguments)}function b(e,t){var r=P("processors",e,t);return h(),C(r)}var E="v2-adapter.load-bricks";function w(e,t,r){var n=new Map,a=new Set,o=t=>{var i;if(!a.has(t)){var s,l,c;if(a.add(t),"processors"===e||t.includes(".")){[l,c]=t.split(".");var u="bricks/".concat("processors"===e?l.replace(/[A-Z]/g,(e=>"-".concat(e[0].toLocaleLowerCase()))).replace(/_[0-9]/g,(e=>"-".concat(e[1]))):l);s=r.get(u)}else{var d;for(var p of(c=t,r.values())){var f;if(null!==(f=p.elements)&&void 0!==f&&f.some((e=>e===c))){var v;if(null===(v=p.deprecatedElements)||void 0===v||!v.includes(t)){s=p;break}d=p}}!s&&d&&(s=d)}if(s){var h=n.get(s);h||(h=[],n.set(s,h)),h.push({fullName:t,lastName:c});var m=null===(i=s.dependencies)||void 0===i?void 0:i[t];if(m)for(var g of m)o(g)}else console.error("Package for ".concat(t," not found."))}};for(var i of t)o(i);return n}function S(e,t,r){return k.apply(this,arguments)}function k(){return(k=(0,c.A)((function*(e,t,r){var n="".concat("processors"===e?"./processors/":"./").concat(r.lastName);try{yield u(t,n)}catch(t){throw console.error(t),new Error("Load ".concat(e,' of "').concat(r.fullName,'" failed'))}}))).apply(this,arguments)}function I(e,t,r){return t.map(function(){var t=(0,c.A)((function*(t){var n;return yield i(t.filePath,null!==(n=window.PUBLIC_ROOT)&&void 0!==n?n:""),yield v,Promise.all(r.get(t).map((r=>S(e,t.id,r))))}));return function(e){return t.apply(this,arguments)}}())}function P(e,t,r){return x.apply(this,arguments)}function x(){return x=(0,c.A)((function*(e,t,r){var n=new Map;for(var a of r){var o,s=null!==(o=a.id)&&void 0!==o?o:R(a.filePath);n.set(s,a)}var u,d,v=w(e,t,n),h=[],m=[];for(var g of v.keys())if(g.id)"bricks/basic"===g.id?u=g:m.push(g);else if(h.push(g),!(d=n.get("bricks/v2-adapter")))throw new Error("Using v2 bricks, but v2-adapter not found");var y,A=d,b=u;if(b){var k,P=i(b.filePath,null!==(k=window.PUBLIC_ROOT)&&void 0!==k?k:"");f||(f=!0,P.then((()=>Promise.resolve())).then(l)),y=P.then((()=>Promise.all(v.get(b).map((t=>S(e,b.id,t))))))}var x=[y].concat(I(e,m,v));if(A&&h.length>0){if(!p){var C=w("bricks",[E],n),O=[...C.keys()],T=function(){var e=(0,c.A)((function*(){return yield Promise.all(I("bricks",O,C)),document.createElement(E)}));return function(){return e.apply(this,arguments)}}();p=T()}x.push(p.then((t=>Promise.all(h.map((n=>{var a=R(n.filePath).split("/")[1];return t.resolve(A.filePath,n.filePath,"bricks"===e?v.get(n).map((e=>"".concat(a,".").concat(e.lastName))):[],n.dll,r)}))))))}yield Promise.all(x)})),x.apply(this,arguments)}function C(e){return O.apply(this,arguments)}function O(){return(O=(0,c.A)((function*(e){window.dispatchEvent(new Event("request.start"));try{yield e}finally{window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function R(e){return e.split("/").slice(0,2).join("/")}},6605:(e,t,r)=>{r.r(t),r.d(t,{pipes:()=>n.pipes,processPipes:()=>o,utils:()=>n.utils});var n=r(161),a=new Map(Array.from(Object.entries(n.pipes)));function o(e,t){if(0===t.length)return e;var r=e;for(var n of t){var o=a.get(n.identifier);if(!o)return void console.warn("Unknown pipe: ".concat(n.identifier));r=o(r,...n.parameters)}return r}},9231:(e,t,r)=>{r.r(t),r.d(t,{Dialog:()=>Jt,Notification:()=>nr,StoryboardFunctionRegistryFactory:()=>me,__secret_internals:()=>n,__test_only:()=>{},applyTheme:()=>ae,authenticate:()=>po,batchSetAppsLocalTheme:()=>oe,checkIfByTransform:()=>wt,checkIfOfComputed:()=>bt,createHistory:()=>C,createRuntime:()=>Za,customProcessors:()=>F,customTemplates:()=>Le,fetchByProvider:()=>mo,getAuth:()=>fo,getBasePath:()=>g,getCssPropertyValue:()=>de,getCurrentMode:()=>ce,getCurrentTheme:()=>ne,getHistory:()=>O,getPageInfo:()=>ba,getRealValue:()=>Ao,getRuntime:()=>eo,getV2RuntimeFromDll:()=>x,handleHttpError:()=>rr,httpErrorToString:()=>Qt,isLoggedIn:()=>ho,isUnauthenticatedError:()=>Xt,logout:()=>vo,matchPath:()=>_t,registerWidgetFunctions:()=>Ue,registerWidgetI18n:()=>D,setUIVersion:()=>ka,unstable_createRoot:()=>yo});var n={};r.r(n),r.d(n,{addRealTimeDataInspectHook:()=>Bn,debugDataValue:()=>Cn,getAddedContracts:()=>Pn,getAllContextValues:()=>wn,getBrickPackagesById:()=>Sn,getContextValue:()=>En,getRenderId:()=>In,legacyDoTransform:()=>dn,loadBricks:()=>kn,mountUseBrick:()=>cn,renderUseBrick:()=>sn,setRealTimeDataInspectRoot:()=>Tn,symbolForRootRuntimeContext:()=>on,unmountUseBrick:()=>un,updateSnippetPreviewSettings:()=>An,updateStoryboard:()=>pn,updateStoryboardByRoute:()=>fn,updateStoryboardBySnippet:()=>gn,updateStoryboardByTemplate:()=>vn,updateTemplatePreviewSettings:()=>hn});var a=r(9740),o=r(6330),i=r(4635),s=r(4586),l=r(918),c=r(2559),u=r(6121),d=r(829),p=r(8012),f=r(8467),v=r(825),h=r(1302),m=(r(6036),r(2890));function g(){var e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var y=r(4223),A=r(1030);function b(e,t){var r=(0,A.orderBy)(e,(e=>{var t,r;return null!==(t=null===(r=e.app.homepage)||void 0===r?void 0:r.length)&&void 0!==t?t:0}),"desc");for(var n of r){var a=n.app.homepage;if("string"==typeof a&&"/"===a[0]&&E(a,t))return n}}function E(e,t){return"/"===e?t===e:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(e.replace(/\/+$/,""),"/"))}function w(e){var t;return!e||(null===(t=eo().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var S,k=["extraQuery","clear","keepHash"],I=!1;function P(e,t){t(!(I=!confirm(e)))}function x(){var e,{dll:t}=window;if(t&&null!==(e=window.BRICK_NEXT_VERSIONS)&&void 0!==e&&null!==(e=e["brick-container"])&&void 0!==e&&e.startsWith("2."))return t("tYg3")}function C(){if(!S){var e=(0,m.createBrowserHistory)({basename:g().replace(/\/$/,""),getUserConfirmation:P});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function o(e,t,n){I=!1,r(e,t),null==n||n(I)}function i(e,t,r){I=!1,n(e,t),null==r||r(I)}function s(t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,{extraQuery:s,clear:l,keepHash:c}=n,u=(0,y.A)(n,k),d=new URLSearchParams(l?"":e.location.search),p={};for(var[f,v]of(Object.assign(p,r,s),Object.entries(p)))if(Array.isArray(v))for(var h of(d.delete(f),v))d.append(f,h);else null==v||""===v?d.delete(f):d.set(f,v);("push"===t?o:i)("?".concat(d.toString()).concat(c?e.location.hash:""),u,a)}}return(0,a.A)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){o((0,a.A)((0,a.A)({},e.location),{},{key:void 0,hash:t,state:(0,a.A)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,a.A)((0,a.A)({},e.location),{},{state:(0,a.A)((0,a.A)({},e.location.state),{},{notify:!0,noIncremental:!0})}),void 0,t)},setBlockMessage:function(e){t=e},getBlockMessage:function(){return t},unblock:function(){t=void 0}},function(e){var{push:t,replace:r}=e;function n(n){return function(a,o,i){var s,l="string"==typeof a;return"string"==typeof(s=l?(0,m.parsePath)(a).pathname:a.pathname)&&s.startsWith("/")&&w(function(e){var t,r;return b(null!==(t=null===(r=za)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](l?g()+a.substring(1):e.createHref(a)):("push"===n?t:r)(a,o,i)}}return{push:n("push"),replace:n("replace")}}((0,a.A)((0,a.A)({},e),{},{push:o,replace:i})))}(e)),S=e}return S}var O=function(){var e=x();if(e)return e.getHistory}()||function(){return S},R=r(4366),T=r(9884),B=r(9567),L=r(3238),_=r(7614),M=new WeakMap,F=function(){var e=x();if(e)return Object.freeze({define:(t,r)=>e.getRuntime().registerCustomProcessor(t,r)})}()||new class{constructor(){(0,l.A)(this,M,new Map)}define(e,t){var[r,n]=e.split("."),a=(0,d.A)(M,this).get(r);if(a||(a=new Map,(0,d.A)(M,this).set(r,a)),a.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));a.set(n,t)}get(e){return(0,d.A)(M,this).get(e)}};function N(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=U("app",t.id),a=[];return Object.entries(r.i18n).forEach((e=>{var[t,r]=e;p.i18n.addResourceBundle(t,n,r),a.push(t)})),()=>{for(var e of a)p.i18n.removeResourceBundle(e,n)}}}function U(e,t){return"".concat(e,"/").concat(t)}function j(e){return p.i18n.getFixedT(null,U("widget",e))}var V,D=function(){var e=x();if(e)return function(t,r){return e.getRuntime().registerWidgetI18n(t,r)}}()||function(e,t){var r=U("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;p.i18n.addResourceBundle(t,r,n)}))},$="brick-next-devtools-panel",H="devtools-frame-active-change",q="devtools-panel-change",W=!0;function K(e,t){var r=z();if(r&&("evaluation"!==e||W&&(!V||"Evaluations"===V))){var n=()=>{var n;null===(n=r.emit)||void 0===n||n.call(r,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(n):setTimeout(n,0)}}function z(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var G=()=>{throw new Error("Can't modify read-only proxy object")},J={set:G,defineProperty:G,deleteProperty:G,setPrototypeOf:G};function Y(e){return new Proxy(e,J)}function Q(e){var{get:t,ownKeys:r}=e;return z()?Y(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var X="light",Z=new v.JsonStorage(localStorage),ee="apps-theme";function te(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));X=e}function re(){return X}function ne(){return document.documentElement.dataset.theme}function ae(e){e?te(e):e=re(),e!==ne()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function oe(e){Z.setItem(ee,(0,a.A)((0,a.A)({},ie()),e))}function ie(){var e,t;try{t=Z.getItem(ee)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var se="default";function le(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));se=e}function ce(){return document.documentElement.dataset.mode}function ue(e){e?le(e):e=se,e!==ce()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function de(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return r&&(null===(t=window.getComputedStyle(r))||void 0===t?void 0:t.getPropertyValue(e))||""}function pe(e,t){var r={};for(var n of e){var a=fe(n,t);void 0!==a&&(r[n]=a)}return r}function fe(e,t){var r,n,a,{collectCoverage:o,widgetId:i,widgetVersion:s,app:l,appendI18nNamespace:c,storyboardFunctions:u,isStoryboardFunction:d}=t;switch(e){case"BASE_URL":return o?"/next":g().replace(/\/$/,"");case"FN":return u;case"IMG":return o?{get:e=>"mock/images/".concat(e)}:i?null==Ja||null===(r=Ja.images)||void 0===r?void 0:r.widgetImagesFactory(i,s):null==Ja||null===(n=Ja.images)||void 0===n?void 0:n.imagesFactory(l.id,l.isBuildPush,l.currentVersion);case"I18N":return o?A.identity:i?j(i):p.i18n.getFixedT(null,[c,U("app",l.id)].filter(Boolean));case"I18N_TEXT":return o?ve:p.i18nText;case"PERMISSIONS":return Y({check:o?he:null==Ja||null===(a=Ja.checkPermissions)||void 0===a?void 0:a.checkPermissions});case"THEME":return Y({getTheme:o?()=>"light":re});case"console":return d?Y(console):void 0;case"location":return o?{href:"http://localhost:3000/functions/test",origin:"http://localhost:3000",host:"localhost:3000",hostname:"localhost"}:{href:location.href,origin:location.origin,host:location.host,hostname:location.hostname}}}function ve(e){return null==e?void 0:e.en}function he(){return!0}function me(){var e,{widgetId:t,widgetVersion:r,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new Map,i=new Proxy(Object.freeze({}),{get:(a,s)=>function(a){var s,l=o.get(a);if(l){if(l.processed)return l.cooked;n&&(s=n.createCollector(a));var c=(0,T.precookFunction)(l.source,{typescript:l.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return l.cooked=(0,T.cook)(c.function,l.source,{rules:{noVar:!0},globalVariables:(0,_.supply)(c.attemptToVisitGlobals,pe(c.attemptToVisitGlobals,{collectCoverage:n,widgetId:t,widgetVersion:r,app:e,storyboardFunctions:i,isStoryboardFunction:!0}),!!n),hooks:s&&{beforeEvaluate:s.beforeEvaluate,beforeCall:s.beforeCall,beforeBranch:s.beforeBranch}}),l.processed=!0,l.cooked}}(s)});return{storyboardFunctions:i,registerStoryboardFunctions:function(t,r){if(r&&(e=r),o.clear(),Array.isArray(t))for(var a of t){var i=(0,B.collectMemberUsageInFunction)(a,"FN",!!n),s=(0,B.collectMemberUsageInFunction)(a,"PERMISSIONS",!!n).has("check");o.set(a.name,{source:a.source,typescript:a.typescript,deps:i,hasPermissionsCheck:s})}},updateStoryboardFunction(e,t){var r=(0,a.A)((0,a.A)({},t),{},{name:e}),n=(0,B.collectMemberUsageInFunction)(r,"FN",!0),i=(0,B.collectMemberUsageInFunction)(r,"PERMISSIONS",!0).has("check");o.set(e,{source:t.source,typescript:t.typescript,deps:n,hasPermissionsCheck:i})},checkPermissionsUsage(e){var t=new Set,r=e=>{if(!t.has(e)){t.add(e);var n=o.get(e);return!!n&&(n.hasPermissionsCheck||[...n.deps].some(r))}return!1};return e.some(r)}}}var{storyboardFunctions:ge,registerStoryboardFunctions:ye,checkPermissionsUsage:Ae}=me(),be=r(3601),Ee=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({}),we=new Map([[Ee.xLarge,"1920px"],[Ee.large,"1600px"],[Ee.medium,"1280px"],[Ee.small,"1024px"],[Ee.xSmall,0]]),Se=new be.A,ke={},Ie={};function Pe(e,t){var r=!1;for(var[n]of(ke[t]=e.matches,we))if(ke[n]&&Ie.breakpoint!==n){Ie.breakpoint=n,r=!0;break}r&&Se.dispatchEvent(new CustomEvent("change",{detail:Ie}))}we.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));Pe(r,t),r.addEventListener?r.addEventListener("change",(e=>{Pe(e,t)})):r.addListener((e=>{Pe(e,t)}))}));var xe=()=>Ie;function Ce(e){return function(t){var r,n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}function Oe(e){var t,r;return!(null===(t=e?e.flags:null===(r=eo())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function Re(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];var o=0===n.length?"":",";e?console.error("".concat(t," is dropped in v3 strict mode").concat(o),...n):console.warn("".concat(t," is deprecated in v3 and will be dropped in strict mode").concat(o),...n)}var Te=new Set(["prefix"]),Be=new WeakMap,Le=function(){var e=x();if(e)return Object.freeze({define:(t,r)=>e.getRuntime().registerCustomTemplate(t,r)})}()||new class{constructor(){(0,l.A)(this,Be,new Map)}define(e,t){var r,n,o,i,s=(0,d.A)(Be,this).has(e);s?console.warn('Custom template of "'.concat(e,'" already registered.')):(s=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var l=Oe(),c=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},u=[],p=[];for(var[f,v]of Object.entries(c))v.asVariable?(Re(l,"Template `asVariable`",e,f),l||p.push(f)):v.mergeProperty||v.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,f):v.ref&&u.push([f,v]);var h=(0,a.A)((0,a.A)({},t),{},{proxy:(0,a.A)((0,a.A)({},t.proxy),{},{properties:Object.fromEntries(u)}),state:(t.state?l?t.state:t.state.map((e=>(0,a.A)({expose:!0},e))):[]).concat(p.map((e=>({name:e,expose:!0}))))});(0,d.A)(Be,this).set(e,(0,a.A)((0,a.A)({},h),{},{name:e}));var m,g,y=(m=h.state,(0,A.uniq)(null!==(g=null==m?void 0:m.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==g?g:[])),b=Object.entries(null!==(o=null===(i=h.proxy)||void 0===i?void 0:i.methods)&&void 0!==o?o:{}),E=y.concat(u.map((e=>e[0]))),w=b.map((e=>e[0])),S=E.concat(w).filter((e=>e in HTMLElement.prototype&&!Te.has(e)));if(S.length>0&&(Re(l,"Using native HTMLElement properties as template properties or methods",e,...S),l))throw new Error('In custom template "'.concat(e,'", ').concat(S.map((e=>'"'.concat(e,'"'))).join(", ")," are native HTMLElement properties, and should be avoid to be used as brick properties or methods."));if(!s){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return E}static get _dev_only_definedMethods(){return w}$$getElementByRef(e){var t;return null===(t=this.$$tplStateStore)||void 0===t||null===(t=t.hostBrick)||void 0===t||null===(t=t.tplHostMetadata)||void 0===t||null===(t=t.internalBricksByRef.get(e))||void 0===t?void 0:t.element}connectedCallback(){var e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));var t=document.createDocumentFragment(),r=document.createElement("style");r.textContent=":host{display:block}:host([hidden]){display:none}";var n=document.createElement("slot");t.appendChild(r),t.appendChild(n),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}var k=function(r){if(u.some((e=>e[0]===r)))return console.error('Cannot define an exposed state that is also a proxy property: "'.concat(r,'" in ').concat(e)),1;Object.defineProperty(t.prototype,r,{get(){return this.$$tplStateStore.getValue(r)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(r,e,"replace")},enumerable:!0})};for(var I of y)k(I);var P=function(e,r){Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(r.ref)[null!==(t=r.refProperty)&&void 0!==t?t:e]},set(t){var n,a,o=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);o&&(o[null!==(a=r.refProperty)&&void 0!==a?a:e]=t)},enumerable:!0})};for(var[x,C]of u)P(x,C);var O=function(e,r){Object.defineProperty(t.prototype,e,{value(){var t;this.$$getElementByRef(r.ref)[null!==(t=r.refMethod)&&void 0!==t?t:e](...arguments)},enumerable:!0})};for(var[R,T]of b)O(R,T);customElements.define(e,t)}}get(e){return(0,d.A)(Be,this).get(e)}};function _e(e,t,r){var{tplStateStoreId:n,tplStateStoreMap:a}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of a custom template').concat(null!=r?r:""));var o=a.get(n);if(!o)throw new Error('Template state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return o}function Me(e,t,r){var n=_e(e,t,r).hostBrick.element;if(!n)throw new Error('Template host element is gone when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return n}var Fe=new Map,Ne=new Proxy(Object.freeze({}),{get:(e,t)=>Fe.get(t)}),Ue=function(){var e=x();if(e)return function(t,r,n){return e.getRuntime().registerWidgetFunctions(t,r,n)}}()||function(e,t,r){if(Fe.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:a}=me({widgetId:e,widgetVersion:r});Fe.set(e,n),a(t)},je=r(5462);function Ve(e,t){var r=uo(e);if(!r&&null!=Ja&&Ja.checkInstalledApps&&(r=Ja.checkInstalledApps.getCheckedApp(e)),!r||"running"===r.installStatus)return!1;if(!t||!r.currentVersion)return!0;var n=t.match(/^([><]=?|=)(.*)$/);try{if(!n)throw new TypeError("Invalid match version: ".concat(t));return(0,je.U)(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}function De(e,t,r){var{formStateStoreId:n,formStateStoreMap:a}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of form renderer').concat(null!=r?r:""));var o=a.get(n);if(!o)throw new Error('Form state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return o}var $e=new Map;function He(e){return qe.apply(this,arguments)}function qe(){return qe=(0,o.A)((function*(e){var t,r=null==Ja||null===(t=Ja.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);r&&(e=Ja.flowApi.FLOW_API_PROVIDER);var n=$e.get(e);if(n)return n;if(e.includes("-")&&!customElements.get(e))if(r)Ja.flowApi.registerFlowApiProvider();else if(yield(0,f.loadBricksImperatively)([e],io()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'));return n=document.createElement(e),$e.set(e,n),n})),qe.apply(this,arguments)}var We=new WeakSet;function Ke(e){if((0,v.isObject)(e)&&!ze(e))if(We.add(e),Array.isArray(e))e.forEach(Ke);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(Ke)}}function ze(e){return We.has(e)}var Ge=new Map;function Je(e,t,r){return Ye.apply(this,arguments)}function Ye(){return(Ye=(0,o.A)((function*(e,t,r){var{useProvider:n,method:o="resolve",args:i=[],onReject:s}=e,{provider:l,field:c}=e;if(l&&!n)throw new Error("You're using \"provider: ".concat(l,'" which is dropped in v3, please use "useProvider" instead'));var u=null!=c;if(u){var d=Oe();if(Re(d,"`resolve.field`"),d)throw new Error("Using deprecated `resolve.field`")}var p,[f,v]=yield Promise.all([He(n),pt(i,t)]),h=null==r?void 0:r.renderId,m=Qe(f,n,o,v,r,i,!!h&&h!==so()),{transform:g}=e;try{var y=yield m;Ke(p=u?(0,A.get)(y,c):y)}catch(e){if(!function(e){return!(null==e||!e.transform)}(s))throw e;g=s.transform,p=e}return g?"string"==typeof g?{[g]:p}:pt(g,(0,a.A)((0,a.A)({},t),{},{data:p})):p}))).apply(this,arguments)}function Qe(e,t,r,n,a,o,i){return Xe.apply(this,arguments)}function Xe(){return Xe=(0,o.A)((function*(e,t,r,n,a,i,s){var l,c;try{l=JSON.stringify({useProvider:t,method:r,args:n})}catch(e){if(!i)throw e;l=JSON.stringify({useProvider:t,method:r,originalArgs:i})}return"reload"!==(null==a?void 0:a.cache)&&(c=Ge.get(l)),c||(c=(0,o.A)((function*(){var a,o=null!=Ja&&null!==(a=Ja.flowApi)&&void 0!==a&&a.isFlowApiProvider(t)?yield Ja.flowApi.getArgsOfFlowApi(t,n,r):n;return e[r](...o)}))(),s||Ge.set(l,c)),c})),Xe.apply(this,arguments)}var Ze=Symbol.for("pre.evaluated.raw"),et=Symbol.for("pre.evaluated.context");function tt(e){return!(null==e||!e[Ze])}function rt(e){return e[Ze]}function nt(e){return"string"==typeof e?(0,T.shouldAllowRecursiveEvaluations)(e):(0,T.shouldAllowRecursiveEvaluations)(e[Ze])}var at=new WeakSet([SyntaxError,TypeError,ReferenceError]);function ot(e){return at.has(e.constructor)?e.constructor:TypeError}function it(){return(it=(0,o.A)((function*(e,t,r){var{blockingList:n,run:a}=lt(e,t,r,!0);return yield Promise.all(n),a()}))).apply(this,arguments)}function st(e,t,r){var{run:n}=lt(e,t,r,!1);return n()}function lt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o=[];if("string"!=typeof e){var i=(0,A.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t=(0,a.A)((0,a.A)({},e[et]),i),e=e[Ze]}var s,l={usedArgs:new Set},c={usedArgs:new Set};try{s=(0,T.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,B.collectAppGetMenuUsage)(l,e,t),(0,B.collectInstalledAppsHasUsage)(c,e,t)}}})}catch(t){var u="".concat(t.message,', in "').concat(e,'"');throw new(ot(t))(u)}if(l.hasNonStaticUsage)throw new Error('Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "'.concat(e,'"'));if(c.hasNonStaticUsage)throw new Error('Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "'.concat(e,'"'));var d,p,h,m,g={},{attemptToVisitGlobals:y}=s;if(r.lazy||y.has("EVENT")&&!(0,v.hasOwnProperty)(t,"event")||y.has("DATA")&&!(0,v.hasOwnProperty)(t,"data"))return{blockingList:o,run:()=>Object.keys(t).length>0?{[Ze]:e,[et]:t}:e};var b,E,w=Oe(t);(y.has("STATE")||!w&&y.has("TPL"))&&(m=_e(t,"STATE",': "'.concat(e,'"'))),y.has("FORM_STATE")&&(E=De(t,"FORM_STATE",': "'.concat(e,'"')));var S=z();if(n||S){if(y.has("CTX")&&(d=(0,B.strictCollectMemberUsage)(e,"CTX"),n&&o.push(t.ctxStore.waitFor(d))),m){if(h=(0,B.strictCollectMemberUsage)(e,"STATE"),!w){var k=(0,B.strictCollectMemberUsage)(e,"TPL");for(var I of k)h.add(I)}n&&o.push(m.waitFor(h))}E&&(b=(0,B.strictCollectMemberUsage)(e,"FORM_STATE"),n&&o.push(E.waitFor(b))),y.has("PROCESSORS")&&(p=(0,B.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&o.push((0,f.loadProcessorsImperatively)(p,io())))}if(n){var P,x=y.has("PERMISSIONS");if(!x&&y.has("FN")){var C=[...(0,B.strictCollectMemberUsage)(e,"FN")];x=Ae(C)}if(x&&o.push(...t.pendingPermissionsPreCheck),l.usedArgs.size>0&&null!=Ja&&Ja.menu){var O=[...l.usedArgs];o.push(Promise.all(O.map((e=>Ja.menu.fetchMenuById(e,t,{getStoryboardByAppId:co,resolveData:Je,asyncComputeRealValue:pt})))))}c.usedArgs.size>0&&o.push(null==Ja||null===(P=Ja.checkInstalledApps)||void 0===P?void 0:P.waitForCheckingApps([...c.usedArgs]))}return{blockingList:o,run(){var r,n,o,i,{app:l,location:c,query:u,match:f,flags:S,sys:k,ctxStore:I,data:P,event:x}=t,C=null!==(r=t.overrideApp)&&void 0!==r?r:l;for(var O of y)switch(O){case"ANCHOR":g[O]=c.hash?c.hash.substring(1):null;break;case"APP":if(null==C)throw new ReferenceError('APP is not defined, in "'.concat(e,'"'));g[O]=(0,a.A)((0,a.A)({},(0,A.cloneDeep)(C)),{},{getMenu:null==Ja||null===(n=Ja.menu)||void 0===n?void 0:n.getMenuById});break;case"CTX":g[O]=Q({get:(e,t)=>I.getValue(t),ownKeys:()=>Array.from(d)});break;case"DATA":g[O]=P;break;case"EVENT":g[O]=x;break;case"FLAGS":g[O]=Y(S);break;case"FORM_STATE":g[O]=Q({get:(e,t)=>E.getValue(t),ownKeys:()=>Array.from(b)});break;case"HASH":g[O]=c.hash;break;case"INSTALLED_APPS":g[O]=Y({has:Ve});break;case"ITEM":case"INDEX":var R="ITEM"===O?"forEachItem":"forEachIndex";(0,v.hasOwnProperty)(t,R)?g[O]=t[R]:console.error("Using `".concat(O,'` but no `:forEach` is found, check your expression: "').concat(e,'"'));break;case"LOCAL_STORAGE":g[O]=Y({getItem:Ce("local")});break;case"MEDIA":g[O]=Y(xe());break;case"MISC":g[O]=eo().getMiscSettings();break;case"PARAMS":if(null==u)throw new ReferenceError('PARAMS is not defined, in "'.concat(e,'"'));g[O]=new URLSearchParams(u);break;case"PATH":g[O]=Y(null!==(o=null==f?void 0:f.params)&&void 0!==o?o:{});break;case"PATH_NAME":g[O]=c.pathname;break;case"PROCESSORS":g[O]=Q({get(e,t){var r=F.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return Q({get:(e,t)=>r.get(t),ownKeys:()=>Array.from(r.keys())})},ownKeys(){var e=new Set;for(var t of p){var r=t.split(".")[0];e.add(r)}return Array.from(e)}});break;case"QUERY":if(null==u)throw new ReferenceError('QUERY is not defined, in "'.concat(e,'"'));g[O]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.get(e)])));break;case"QUERY_ARRAY":if(null==u)throw new ReferenceError('QUERY_ARRAY is not defined, in "'.concat(e,'"'));g[O]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.getAll(e)])));break;case"SESSION_STORAGE":g[O]=Y({getItem:Ce("session")});break;case"TPL":if(Re(w,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),w)break;case"STATE":g[O]=Q({get:(e,t)=>m.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":g[O]=Y(null!=k?k:{});break;case"__WIDGET_FN__":g[O]=Ne;break;case"__WIDGET_IMG__":g[O]=null==Ja||null===(i=Ja.images)||void 0===i?void 0:i.widgetImagesFactory;break;case"__WIDGET_I18N__":g[O]=j}Object.assign(g,pe(s.attemptToVisitGlobals,{storyboardFunctions:ge,app:C,appendI18nNamespace:t.appendI18nNamespace}));try{var B=(0,T.cook)(s.expression,s.source,{globalVariables:(0,_.supply)(s.attemptToVisitGlobals,g)});return K("evaluation",{raw:e,context:g,result:B}),B}catch(t){var L="".concat(t.message,', in "').concat(e,'"');throw new(ot(t))(L)}}}}var ct=function(e){return e[e.INITIAL=0]="INITIAL",e[e.USE_BRICK=1]="USE_BRICK",e[e.USE_BRICK_ITEM=2]="USE_BRICK_ITEM",e[e.USE_BRICK_PROPERTIES=3]="USE_BRICK_PROPERTIES",e[e.USE_BRICK_TRANSFORM=4]="USE_BRICK_TRANSFORM",e[e.USE_BRICK_EVENTS=5]="USE_BRICK_EVENTS",e[e.USE_BRICK_IF=6]="USE_BRICK_IF",e[e.USE_BRICK_SLOTS=7]="USE_BRICK_SLOTS",e[e.USE_BRICK_SLOTS_ITEM=8]="USE_BRICK_SLOTS_ITEM",e[e.USE_BRICK_SLOTS_ITEM_BRICKS=9]="USE_BRICK_SLOTS_ITEM_BRICKS",e[e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM=10]="USE_BRICK_SLOTS_ITEM_BRICKS_ITEM",e[e.USE_BRICK_LIFECYCLE=11]="USE_BRICK_LIFECYCLE",e[e.USE_BRICK_DATA_SOURCE=12]="USE_BRICK_DATA_SOURCE",e}({});function ut(e){switch(e){case ct.USE_BRICK_PROPERTIES:case ct.USE_BRICK_TRANSFORM:case ct.USE_BRICK_EVENTS:case ct.USE_BRICK_IF:case ct.USE_BRICK_LIFECYCLE:case ct.USE_BRICK_DATA_SOURCE:return!0}return!1}function dt(e,t,r){if(ut(e))return e;if(t)switch(e){case ct.USE_BRICK:return ct.USE_BRICK_ITEM;case ct.USE_BRICK_SLOTS_ITEM_BRICKS:return ct.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case ct.INITIAL:if("useBrick"===r)return ct.USE_BRICK;break;case ct.USE_BRICK:case ct.USE_BRICK_ITEM:case ct.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return ct.USE_BRICK_PROPERTIES;case"transform":return ct.USE_BRICK_TRANSFORM;case"dataSource":return ct.USE_BRICK_DATA_SOURCE;case"events":return ct.USE_BRICK_EVENTS;case"slots":return ct.USE_BRICK_SLOTS;case"children":return ct.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return ct.USE_BRICK_IF;case"lifeCycle":return ct.USE_BRICK_LIFECYCLE}break;case ct.USE_BRICK_SLOTS:return ct.USE_BRICK_SLOTS_ITEM;case ct.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return ct.USE_BRICK_SLOTS_ITEM_BRICKS}return ct.INITIAL}function pt(e,t){return ft.apply(this,arguments)}function ft(){return ft=(0,o.A)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=tt(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&ut(r.$$stateOfUseBrick),i=o;return n||(0,T.isEvaluable)(e)?(a=yield function(e,t,r){return it.apply(this,arguments)}(e,t,{lazy:o}),i=nt(e)):a=o?e:((0,v.hasOwnProperty)(t,"data")?r.noInject?L.transform:L.transformAndInject:r.noInject?mt:L.inject)(e,t),i||Ke(a),a}if(!(0,v.isObject)(e)||ze(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=ht(r,!0);return Promise.all(e.map((e=>pt(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,a]=e;return Promise.all([pt(n,t),pt(a,t,ht(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),ft.apply(this,arguments)}function vt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=tt(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&ut(r.$$stateOfUseBrick),i=o;return n||(0,T.isEvaluable)(e)?(a=st(e,t),i=nt(e)):a=o?e:((0,v.hasOwnProperty)(t,"data")?r.noInject?L.transform:L.transformAndInject:r.noInject?mt:L.inject)(e,t),i||Ke(a),a}if(!(0,v.isObject)(e)||ze(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=ht(r,!0);return e.map((e=>vt(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,a]=e;return[vt(n,t),vt(a,t,ht(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function ht(e,t,r){return e.$$lazyForUseBrick?(0,a.A)((0,a.A)({},e),{},{$$stateOfUseBrick:dt(e.$$stateOfUseBrick,t,r)}):e}function mt(e){return e}function gt(e,t){return yt.apply(this,arguments)}function yt(){return(yt=(0,o.A)((function*(e,t){return!(0,v.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||tt(e.if)?yield pt(e.if,t):e.if)}))).apply(this,arguments)}function At(e,t){return!(0,v.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||tt(e.if)?vt(e.if,t):e.if)}function bt(e){return!(0,v.hasOwnProperty)(e,"if")||!!e.if}function Et(){return(Et=(0,o.A)((function*(e,t){return(0,v.isObject)(e.if)&&!tt(e.if)?bt(yield Je(e.if,t)):gt(e,t)}))).apply(this,arguments)}var wt=function(){var e=x();if(e)return e.looseCheckIfByTransform}()||function(e,t){return At(e,{data:t})};function St(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,T.isEvaluable)(e):tt(e)){var a="string"==typeof e?e:rt(e);if((0,T.isTrackAll)(a)){var o=(0,B.trackAll)(a);o&&(t=o.context,r=o.state,n=o.formState)}else t=(0,B.track)(a,"track context","CTX"),r=(0,B.track)(a,"track state","STATE"),n=(0,B.track)(a,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function kt(e,t){return It.apply(this,arguments)}function It(){return(It=(0,o.A)((function*(e,t){for(var[r,n,a]of e)if(r===t){var o=yield n;if(void 0!==o||!a)return o}}))).apply(this,arguments)}function Pt(e){return xt.apply(this,arguments)}function xt(){return(xt=(0,o.A)((function*(e){var t={};for(var[r,n,a]of e){var o=yield n;void 0===o&&a||!("style"!==r&&"dataset"!==r||(0,v.isObject)(o))||(t[r]=o)}return t}))).apply(this,arguments)}function Ct(e,t){if(t)for(var[r,n]of Object.entries(t))switch(r){case"style":case"dataset":for(var[a,o]of Object.entries(n))e[r][a]=o;break;case"constructor":case"__proto__":case"innerHTML":throw new Error("set `".concat(r,"` is prohibited"));default:e[r]=n}}function Ot(e,t,r){var n=function(e,t){return(0,v.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[r,n]=e,a=vt(n,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?ct.USE_BRICK:ct.INITIAL});if("style"!==r&&"dataset"!==r||(0,v.isObject)(a))return[r,a]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{Ct(e,n)}))}var Rt=r(264),Tt=new Map,Bt=1e4,Lt=0;function _t(e,t){var{path:r,exact:n=!1,strict:a=!1,sensitive:o=!0}=t;return(Array.isArray(r)?r:[r]).reduce(((t,r)=>{if(t)return t;var{regexp:i,keys:s}=function(e,t){var r="".concat(t.end).concat(t.strict).concat(t.sensitive),n=Tt.get(r);n||Tt.set(r,n=new Map);var a=n.get(e);if(a)return a;var o=[],i={regexp:(0,Rt.MM)(e,o,t),keys:o};return Lt<Bt&&(n.set(e,i),Lt++),i}(r,{end:n,strict:a,sensitive:o}),l=i.exec(e);if(!l)return null;var[c,...u]=l,d=e===c;return n&&!d?null:{path:r,url:"/"===r&&""===c?"/":c,isExact:d,params:s.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function Mt(){return(Mt=(0,o.A)((function*(e,t){for(var r of e){if("string"!=typeof r.path)throw console.error("Invalid route with invalid path:",r),new Error("Invalid route with invalid type of path: ".concat(typeof r.path));var n=Ft(r,t.app.homepage,t.location.pathname);if(n&&(yield gt(r,t)))return t.app.noAuthGuard||r.public||null==Ja||!Ja.auth||Ja.auth.isLoggedIn()?{match:n,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}function Ft(e,t,r){return _t(r,{path:e.path.replace(/^\$\{APP.homepage\}/,t),exact:e.exact})}var Nt,Ut=Symbol.for("tpl.asyncComputedPropsFromHost"),jt=Symbol.for("tpl.stateStoreId"),Vt=Symbol.for("tpl.externalForEachItem"),Dt=Symbol.for("tpl.externalForEachIndex"),$t=Symbol.for("tpl.externalNoForEach"),Ht=new Set,qt=function(e){return e.REQUEST_FAILED="REQUEST_FAILED",e.SOMETHING_WENT_WRONG="SOMETHING_WENT_WRONG",e.LOGIN_TIMEOUT_MESSAGE="LOGIN_TIMEOUT_MESSAGE",e.NETWORK_ERROR="NETWORK_ERROR",e}({}),Wt={[qt.REQUEST_FAILED]:"Request Failed",[qt.SOMETHING_WENT_WRONG]:"Something went wrong!",[qt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[qt.NETWORK_ERROR]:"Network error, please check your network."},Kt={[qt.REQUEST_FAILED]:"请求失败",[qt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[qt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[qt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},zt="core/runtime",Gt={en:Wt,zh:Kt},Jt=Object.freeze({show:function(e){if(Nt)return Nt.resolve(e);if("confirm"===e.type){var t=confirm(e.content);return new Promise(((e,r)=>setTimeout((()=>{(t?e:r)()}),1)))}return alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1)))}});function Yt(e){var{search:t,pathname:r}=e,n=r?window.btoa(encodeURIComponent(r)):"",a=t?window.btoa(encodeURIComponent(t)):"";document.cookie="SALOGINPATH=".concat(n,"; path=/"),document.cookie="SALOGINQUERY=".concat(a,"; path=/")}function Qt(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof R.HttpFetchError)return p.i18n.t("".concat(zt,":").concat(qt.NETWORK_ERROR));if(e instanceof R.HttpResponseError&&e.responseJson){if("string"==typeof e.responseJson.error)return e.responseJson.error;if("string"==typeof e.responseJson.msg)return e.responseJson.msg}return null==e?"Unknown error":e.toString()}function Xt(e){return e instanceof R.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var Zt,er,tr=!1;function rr(e){if(!(e instanceof R.HttpAbortError)){if(Xt(e)&&!window.NO_AUTH_GUARD){if(tr)return;return tr=!0,void Jt.show({type:"confirm",content:p.i18n.t("".concat(zt,":").concat(qt.LOGIN_TIMEOUT_MESSAGE))}).then((()=>{var e,t;e=eo().getFeatureFlags()["sso-enabled"],Yt((t=O()).location),t.push(e?"/sso-auth/login":"/auth/login",{from:(0,a.A)((0,a.A)({},t.location),{},{state:void 0})}),tr=!1}),(()=>{tr=!1}))}console.error(e);var t=Qt(e);t!==Zt&&(Zt=t,Jt.show({type:"error",title:p.i18n.t("".concat(zt,":").concat(qt.REQUEST_FAILED)),content:t,contentStyle:{whiteSpace:"pre-wrap",wordBreak:"break-word"}}).then((()=>{Zt=void 0})))}}var nr=Object.freeze({show:function(e){er?er.resolve(e):alert(e.message)}}),ar=r(1148);function or(){return(or=(0,o.A)((function*(e,t){var{progress:r,success:n,error:a,finally:o}=t,i=so();try{var s,l=yield e(),c=!1,u=!1;try{for(var d,p=(0,ar.A)(l);c=!(d=yield p.next()).done;c=!1){var f=d.value;if(i!==so())return;null==r||r(f)}}catch(e){u=!0,s=e}finally{try{c&&null!=p.return&&(yield p.return())}finally{if(u)throw s}}if(i!==so())return;null==n||n()}catch(e){if(i!==so())return;null==a||a(e)}finally{null==o||o()}}))).apply(this,arguments)}function ir(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,a]=t,o=dr(a,r,{element:e});for(var i of(e.addEventListener(n,o),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,o]),e.$$eventListeners||(e.$$eventListeners=[]),[].concat(a)))e.$$eventListeners.push([n,null,i])}))}function sr(e){return"string"==typeof e.action}function lr(e){return"string"==typeof e.useProvider}function cr(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function ur(e){return!!e.then}function dr(e,t,r){return function(n){var o,i;for(var s of[].concat(e))if(At(s,(0,a.A)((0,a.A)({},t),{},{event:n})))if(ur(s))dr(s.then,t,r)(n);else if(sr(s)){var[l,c]=s.action.split(".");switch(s.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":gr(n,c,s.args,s.callback,t);break;case"window.open":yr(n,s.args,t);break;case"location.reload":case"location.assign":Sr(n,c,s.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":kr(n,l,c,s.args,t);break;case"event.preventDefault":n.preventDefault();break;case"event.stopPropagation":n.stopPropagation();break;case"console.log":case"console.error":case"console.warn":case"console.info":Ir(n,c,s.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":Pr(n,c,s.args,t);break;case"handleHttpError":rr(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":br(n,c,s.args,null===(o=s.batch)||void 0===o||o,s.callback,t);break;case"state.update":case"state.refresh":case"state.load":Er(n,c,s.args,null===(i=s.batch)||void 0===i||i,s.callback,t);break;case"tpl.dispatchEvent":var[u,d]=Rr(s.args,t,n);Me(t,s.action,": ".concat(u)).dispatchEvent(new CustomEvent(u,d));break;case"formstate.update":wr(n,s.args,s.callback,t);break;case"message.subscribe":case"message.unsubscribe":xr(n,c,s.args,t,r,s.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":ae("theme.setDarkTheme"===s.action?"dark":"light");break;case"theme.setTheme":var[p]=Rr(s.args,t,n);ae(p);break;case"mode.setDashboardMode":case"mode.setDefaultMode":ue("mode.setDashboardMode"===s.action?"dashboard":"default");break;default:console.error("unknown event listener action:",s.action)}}else lr(s)?pr(n,s,t,r):cr(s)?vr(n,s,t,r):console.error("unknown event handler:",s);else s.else&&dr(s.else,t,r)(n)}}function pr(e,t,r,n){return fr.apply(this,arguments)}function fr(){return(fr=(0,o.A)((function*(e,t,r,n){try{hr(e,yield He(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error(Qt(e))}}))).apply(this,arguments)}function vr(e,t,r,n){var o=[],i=t.target,s=t.targetRef,l=i;if(("string"==typeof i?(0,T.isEvaluable)(i):tt(i))&&(l=vt(i,(0,a.A)((0,a.A)({},r),{},{event:e}))),"string"==typeof l)if("_self"===l)o.push(n.element);else if(t.multiple)o=Array.from(document.querySelectorAll(l));else{var c=document.querySelector(l);null!==c&&o.push(c)}else if(l)l instanceof HTMLElement?o.push(l):console.error("unexpected target:",l);else if(s){var u=s;("string"==typeof s?(0,T.isEvaluable)(s):tt(s))&&(u=vt(s,(0,a.A)((0,a.A)({},r),{},{event:e})));var d=[].concat(u),p=Me(r,"targetRef",": ".concat(d.join(", ")));o.push(...d.map((e=>{var t;return null===(t=p.$$getElementByRef)||void 0===t?void 0:t.call(p,e)})).filter(Boolean))}0!==o.length?function(e){return!!e.method}(t)?o.forEach((a=>{hr(e,a,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Ot(o,t.properties,(0,a.A)((0,a.A)({},r),{},{event:e})):console.error("target not found:",i||s)}function hr(e,t,r,n,a,o,i){return mr.apply(this,arguments)}function mr(){return mr=(0,o.A)((function*(e,t,r,n,i,s,l){if("function"==typeof t[n]){var c=function(){var a=(0,o.A)((function*(){var a,o,s=Rr(r.args,i,e,l);return lr(r)&&null!=Ja&&null!==(a=Ja.flowApi)&&void 0!==a&&a.isFlowApiProvider(r.useProvider)&&(s=yield Ja.flowApi.getArgsOfFlowApi(r.useProvider,s,n,null===(o=r.sse)||void 0===o?void 0:o.stream)),t[n](...s)}));return function(){return a.apply(this,arguments)}}();if(r.callback){var u=Or(r.callback,i,s),d={progress:u("progress"),success:u("success"),error:u("error"),finally:u("finally")};if(lr(r)){var p,f,v=(0,a.A)((0,a.A)({},i),{},{event:e});if(vt(null===(p=r.sse)||void 0===p?void 0:p.stream,v))return void function(e,t){or.apply(this,arguments)}(c,d);if(vt(null===(f=r.poll)||void 0===f?void 0:f.enabled,v))return void function(e,t,r,n){var a,{progress:i,success:s,error:l,finally:c}=t,{expectPollStopImmediately:u,expectPollEnd:d}=r,{interval:p,leadingRequestDelay:f,continueOnError:v,delegateLoadingBar:h}=vt((0,A.pick)(r,["interval","leadingRequestDelay","continueOnError","delegateLoadingBar"]),n),m=so();function g(){return y.apply(this,arguments)}function y(){return(y=(0,o.A)((function*(){var t;Ht.delete(a);try{var r;if(t=null===(r=vt(u,n))||void 0===r?void 0:r())null==c||c();else{var o,f,g=yield e(),y=null===(o=vt(u,n))||void 0===o?void 0:o();(t=y||m!==so())?y&&(null==c||c()):(null==i||i(g),null!==(f=vt(d,n))&&void 0!==f&&f(g)?(h&&window.dispatchEvent(new Event("request.end")),null==s||s(g),null==c||c()):b(null!=p?p:3e3))}}catch(e){var A,E=null===(A=vt(u,n))||void 0===A?void 0:A();(t=E||m!==so())?E&&(null==c||c()):(null==l||l(e),v?b(null!=p?p:3e3):null==c||c())}finally{h&&t&&window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function b(e){a=setTimeout(g,e),Ht.add(a)}b(null!=f?f:0),h&&window.dispatchEvent(new Event("request.start"))}(c,d,r.poll,v)}try{var h=yield c();d.success(h)}catch(e){d.error(e)}finally{d.finally()}}else c()}else console.error("target has no method:",{target:t,method:n})})),mr.apply(this,arguments)}function gr(e,t,r,n,a){var o=0,i=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":o=2,i=!0;break;case"reload":i=!0;break;case"block":o=1,s="setBlockMessage"}var l=[];if(o>0&&((l=Rr(r,a,e,{useEventDetailAsDefault:!0})).length=o),i&&n){var c=Or(n,a,void 0);l.push((e=>{c(e?"error":"success")({blocked:e}),c("finally")({blocked:e})}))}O()[s](...l)}function yr(e,t,r){var[n,a,o]=Rr(t,r,e);window.open(n,a||"_self",o)}function Ar(e,t,r,n,a,o){t?n.updateValues(e,r,(e=>Rr(e,a,o)[0])):e.forEach((e=>{var{name:t,value:i}=Rr([e],a,o)[0];n.updateValue(t,i,r)}))}function br(e,t,r,n,a,o){if(!Array.isArray(r)||!r.every(v.isObject)||"assign"!==t&&"replace"!==t){var[i,s]=Rr(r,o,e);o.ctxStore.updateValue(i,s,t,a,o)}else Ar(r,n,t,o.ctxStore,o,e)}function Er(e,t,r,n,a,o){if(Array.isArray(r)&&r.every(v.isObject)&&"update"===t)Ar(r,n,"replace",_e(o,"state.".concat(t),": ".concat(JSON.stringify(r))),o,e);else{var[i,s]=Rr(r,o,e);_e(o,"state.".concat(t),": ".concat(i)).updateValue(i,s,"update"===t?"replace":t,a,o)}}function wr(e,t,r,n){var[a,o]=Rr(t,n,e);De(n,"formstate.update",": ".concat(a)).updateValue(a,o,"replace",r,n)}function Sr(e,t,r,n){if("assign"===t){var[a]=Rr(r,n,e);location.assign(a)}else location[t]()}function kr(e,t,r,n,a){var o="localStorage"===t?localStorage:sessionStorage,[i,s]=Rr(n,a,e);"setItem"===r?void 0!==s&&o.setItem(i,JSON.stringify(s)):o.removeItem(i)}function Ir(e,t,r,n){console[t](...Rr(r,n,e,{useEventAsDefault:!0}))}function Pr(e,t,r,n){var a=Rr(r,n,e,{useEventAsDefault:!0});nr.show({type:t,message:a[0]})}function xr(e,t,r,n,a,o){return Cr.apply(this,arguments)}function Cr(){return(Cr=(0,o.A)((function*(e,t,r,n,a,o){var i=()=>{var a,o=Rr(r,n,e);return null==Ja||null===(a=Ja.messageDispatcher)||void 0===a?void 0:a[t](...o)};if(o){var s=Or(o,n,a);try{var l=yield i();s("success")(l)}catch(e){s("error")(e)}finally{s("finally")()}}else i()}))).apply(this,arguments)}function Or(e,t,r){return function(n){return function(a){var o=null==e?void 0:e[n];if(o)try{var i=new CustomEvent("callback.".concat(n),{detail:a});dr(o,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",a)}}}function Rr(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?vt(e,(0,a.A)((0,a.A)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}function Tr(e){var t,{ref:r,runtimeContext:n,element:a}=e;if(r&&n.tplStateStoreId){var{hostBrick:o}=_e(n,"bindTemplateProxy"),i=o.tplHostMetadata;i.internalBricksByRef.set(r,e);var s=null===(t=i.proxy)||void 0===t?void 0:t.events;if(s){var l=function(e){if(u.ref===r){var t,n,i,s=t=>{t.bubbles&&t.stopPropagation(),o.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},l=null!==(t=u.refEvent)&&void 0!==t?t:e;a.addEventListener(l,s),null!==(i=(n=a).$$proxyListeners)&&void 0!==i||(n.$$proxyListeners=[]),a.$$proxyListeners.push([l,s])}};for(var[c,u]of Object.entries(s))l(c)}}}function Br(e){var{ref:t,runtimeContext:r,element:n}=e;if(null!=r&&r.tplStateStoreId&&t){var{hostBrick:a}=_e(r,"unbindTemplateProxy"),o=a.tplHostMetadata;for(var[i,s]of(o.internalBricksByRef.delete(t),null!==(l=n.$$proxyListeners)&&void 0!==l?l:[])){var l;n.removeEventListener(i,s)}delete n.$$proxyListeners}}var Lr=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e[e.PLACEHOLDER=3]="PLACEHOLDER",e}({});function _r(e){e.replaceChildren()}function Mr(e,t){window.DISABLE_REACT_FLUSH_SYNC=!1;for(var r=e.child,n=[];r;){if(r.tag===Lr.BRICK){var a,o=r.type;o.includes("-")&&!customElements.get(o)&&console.error("Undefined custom element: ".concat(o)),"basic-bricks.script-brick"===o&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");var i=t&&r===e.child?t:document.createElement(o);r.element=i,r.slotId&&i.setAttribute("slot",r.slotId),r.iid&&(i.dataset.iid=r.iid),null!==(a=r.tplHostMetadata)&&void 0!==a&&a.tplStateStoreId&&(i.dataset.tplStateStoreId=r.tplHostMetadata.tplStateStoreId),Ct(i,r.properties),ir(i,r.events,r.runtimeContext),r.tplHostMetadata&&(i.$$tplStateStore=_e({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),Tr(r),r.portal?n.push(i):r.return&&(r.return.childElements||(r.return.childElements=[]),r.return.childElements.push(i))}if(r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var s,l=r.return;l;){var c;if(l.childElements)l.tag===Lr.ROOT?null===(c=l.container)||void 0===c||c.append(...l.childElements):l.element.append(...l.childElements),l.childElements=void 0;if(l.tag===Lr.ROOT&&n.length>0&&("function"==typeof l.createPortal?l.createPortal():l.createPortal).append(...n),l.sibling)break;l=l.return}r=null===(s=l)||void 0===s?void 0:s.sibling}}setTimeout((()=>{window.DISABLE_REACT_FLUSH_SYNC=!0}))}var Fr=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],Nr=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],Ur=new WeakMap,jr=new WeakMap,Vr=new WeakMap,Dr=new WeakMap,$r=new WeakMap,Hr=new WeakMap,qr=new WeakMap,Wr=new WeakMap,Kr=new WeakMap,zr=new WeakSet;class Gr{constructor(e,t){var r;(0,i.A)(this,zr),(0,s.A)(this,"scope",void 0),(0,s.A)(this,"unknownBricks",void 0),(0,s.A)(this,"renderId",void 0),(0,l.A)(this,Ur,void 0),(0,l.A)(this,jr,{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}),(0,l.A)(this,Vr,new Map),(0,l.A)(this,Dr,void 0),(0,l.A)(this,$r,new Map),(0,l.A)(this,Hr,void 0),(0,l.A)(this,qr,void 0),(0,l.A)(this,Wr,new WeakMap),(0,l.A)(this,Kr,new Map),this.scope=e,this.unknownBricks=null!==(r=null==t?void 0:t.unknownBricks)&&void 0!==r?r:"throw",(0,u.A)(Ur,this,null==t?void 0:t.routeHelper),this.renderId=null==t?void 0:t.renderId}setInitialMenuRequestNode(e){(0,u.A)(qr,this,e)}memoizeMenuRequestNode(e,t){(0,d.A)(Wr,this).set(e,t)}getMenuRequests(){for(var e=[],t=(0,d.A)(qr,this);t;)if(t.request&&e.push(t.request),t.child)t=t.child;else{for(var r;t&&!t.sibling;)t=t.return;t=null===(r=t)||void 0===r?void 0:r.sibling}return e}reMergeMenuRequestNodes(e,t){var r=arguments,n=this;return(0,o.A)((function*(){var a=r.length>2&&void 0!==r[2]?r[2]:{},o=(0,d.A)(Wr,n).get(t);(0,d.A)(Wr,n).set(t,a);for(var i,s=e.child;s&&s!==o;)i=s,s=s.sibling;i?(i.sibling=a,a.sibling=null==o?void 0:o.sibling):e.child=a,yield(0,d.A)(Ur,n).mergeMenus(n.getMenuRequests())}))()}reBailout(e){return(0,d.A)(Ur,this).bailout(e)}reCatch(e,t){return(0,d.A)(Ur,this).catch(e,t)}didPerformIncrementalRender(e,t){var r=this;return(0,o.A)((function*(){var n=!1,a=[];for(var{parentRoutes:o,callback:i}of[...(0,d.A)(Kr,r).values()].reverse()){var s=o[o.length-1];if(!a.includes(s)){var l=yield i(e,t);l&&a.push(...o.slice(0,-1)),!1!==l&&(n=!0)}}return n}))()}performIncrementalRender(e,t,r){(0,d.A)(Kr,this).set(e,{parentRoutes:t,callback:r})}registerBrickLifeCycle(e,t){if(t){var r=[...Fr,..."page"===this.scope?Nr:[]];for(var n of r){var a=t[n];a&&(0,d.A)(jr,this)[n].push({brick:e,handlers:a})}(0,A.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}}registerArbitraryLifeCycle(e,t){var r=(0,d.A)($r,this).get(e);r?r.add(t):(0,d.A)($r,this).set(e,new Set([t]))}memoize(e,t,r,n){(0,d.A)(Hr,this)||(0,u.A)(Hr,this,new WeakMap);var a=[null!=e?e:"",...t].join("."),o=(0,d.A)(Hr,this).get(n);o||(o=new Map,(0,d.A)(Hr,this).set(n,o)),o.set(a,{node:r,last:Zr(r),lastNormal:en(r),lastPortal:rn(r)})}reRender(e,t,r,n){var a,o=[null!=e?e:"",...t].join("."),i=(0,d.A)(Hr,this).get(n).get(o),{node:s,last:l,lastNormal:u,lastPortal:p}=i,f=[];if((null==s?void 0:s.tag)===Lr.PLACEHOLDER){var v,h,m;a=null!==(v=null===(h=function(e){return tn(e,!0)}(s))||void 0===h?void 0:h.element)&&void 0!==v?v:null;var g=null===(m=function(e){return nn(e,!0)}(s))||void 0===m?void 0:m.element;g&&f.push(g)}else{var y,A,b;a=null!==(y=null==u||null===(A=u.element)||void 0===A?void 0:A.nextSibling)&&void 0!==y?y:null;for(var E=null==p||null===(b=p.element)||void 0===b?void 0:b.nextSibling;E&&(f.push(E),E instanceof HTMLElement&&"DIV"===E.tagName);)E=E.nextSibling}var w,S=Zr(r);i.node=r,i.last=S,i.lastNormal=en(r),i.lastPortal=rn(r);for(var k=n.child;k&&k!==l;){if(k.sibling===s){w=k;break}k=k.sibling}var I=document.createDocumentFragment(),P=document.createDocumentFragment(),x={tag:Lr.ROOT,container:I,createPortal:P,child:r};for(k=r;k;)k.return=x,k=k.sibling;var C,O,R=an(s,l);for((0,c.A)(zr,this,Jr).call(this,R),Mr(x),w?w.sibling=r:n.child=r,S&&(S.sibling=null==l?void 0:l.sibling),k=r;k;)k.return=n,k=k.sibling;if(n.tag===Lr.ROOT?null===(C=n.container)||void 0===C||C.insertBefore(I,a):null===(O=n.element)||void 0===O||O.insertBefore(I,a),P.childNodes.length>0){for(var T,B=r;B&&B.return;)B=B.return;if((null===(T=B)||void 0===T?void 0:T.tag)!==Lr.ROOT)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");var L="function"==typeof B.createPortal?B.createPortal():B.createPortal,_=null;for(var M of f)if(L.contains(M)){_=M;break}L.insertBefore(P,_)}var F=an(r,S);(0,c.A)(zr,this,Yr).call(this,F)}dispose(){for(var e of Object.values((0,d.A)(jr,this)))e.length=0;for(var t of(0,d.A)(Vr,this).values()){for(var r of t)r.disconnect();t.length=0}(0,d.A)(Vr,this).clear(),(0,d.A)(Dr,this)&&(Se.removeEventListener("change",(0,d.A)(Dr,this)),(0,u.A)(Dr,this,void 0)),(0,u.A)(Hr,this,void 0),(0,d.A)($r,this).clear(),(0,d.A)(Kr,this).clear(),(0,u.A)(Wr,this,void 0)}dispatchBeforePageLoad(){(0,c.A)(zr,this,Qr).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,c.A)(zr,this,Qr).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,c.A)(zr,this,Qr).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,c.A)(zr,this,Qr).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=O().location;e&&"#"!==e?(0,c.A)(zr,this,Qr).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,c.A)(zr,this,Qr).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,d.A)(jr,this).onScrollIntoView)(0,c.A)(zr,this,Xr).call(this,e,t)}initializeMediaChange(){(0,u.A)(Dr,this,(e=>{(0,c.A)(zr,this,Qr).call(this,"onMediaChange",new CustomEvent("media.change",{detail:Y(e.detail)}))})),Se.addEventListener("change",(0,d.A)(Dr,this))}initializeMessageDispatcher(){var e,t=function(e){var t=function(t){var r;null==Ja||null===(r=Ja.messageDispatcher)||void 0===r||r.onMessage(t.channel,(r=>{dr(t.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:r}))}))};for(var r of[].concat(n))t(r)};for(var{brick:r,handlers:n}of(0,d.A)(jr,this).onMessage)t(r);null==Ja||null===(e=Ja.messageDispatcher)||void 0===e||e.onClose((()=>{(0,c.A)(zr,this,Qr).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,c.A)(zr,this,Qr).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,c.A)(zr,this,Qr).call(this,"onUnmount",new CustomEvent("unmount"))}}function Jr(e){var t=[...Fr,..."page"===this.scope?Nr:[]],r=[];for(var n of t){var a=(0,A.remove)((0,d.A)(jr,this)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...a)}for(var o of e){var i,s,l=(0,d.A)(Vr,this).get(o);if(null!=l&&l.length){for(var c of l)c.disconnect();l.length=0,(0,d.A)(Vr,this).delete(o)}Br(o),null===(i=o.element)||void 0===i||delete i.$$tplStateStore,null===(s=o.element)||void 0===s||s.remove()}var u=new CustomEvent("unmount");for(var{brick:p,handlers:f}of r)dr(f,p.runtimeContext,p)(u)}function Yr(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,d.A)(jr,this).onMount)e.has(r)&&dr(n,r.runtimeContext,r)(t);for(var{brick:a,handlers:o}of(0,d.A)(jr,this).onScrollIntoView)e.has(a)&&(0,c.A)(zr,this,Xr).call(this,a,o)}function Qr(e,t){for(var{brick:r,handlers:n}of(0,d.A)(jr,this)[e])dr(n,r.runtimeContext,r)(t);var a=(0,d.A)($r,this).get(e);if(a)for(var o of a)o()}function Xr(e,t){var r,n=null!==(r=t.threshold)&&void 0!==r?r:.1,a=new IntersectionObserver(((r,a)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(dr(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),a.disconnect())}))}),{threshold:n});a.observe(e.element);var o=(0,d.A)(Vr,this).get(e);o||(o=[],(0,d.A)(Vr,this).set(e,o)),o.push(a)}function Zr(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function en(e){return tn(e,!1)}function tn(e,t){for(var r,n=e;n;){if(n.tag===Lr.BRICK&&!n.portal){if(t)return n;r=n}n=n.sibling}return r}function rn(e){return nn(e,!1)}function nn(e,t){for(var r,n=e;n;){if(n.tag===Lr.BRICK&&n.portal){if(t)return n;r=n}if(n.child)n=n.child;else if(n.sibling)n=n.sibling;else{for(var a,o=n.return;o&&!o.sibling;)o=o.return;n=null===(a=o)||void 0===a?void 0:a.sibling}}return r}function an(e,t){for(var r=new Set,n=e;n;)if(n.tag===Lr.BRICK&&r.add(n),n.child)n=n.child;else{if(n===t)break;if(n.sibling)n=n.sibling;else{for(var a,o=n.return;o&&o!==t&&!o.sibling;)o=o.return;if(o===t)break;n=null===(a=o)||void 0===a?void 0:a.sibling}}return r}var on=Symbol.for("root.runtimeContext");function sn(e,t,r){return ln.apply(this,arguments)}function ln(){return(ln=(0,o.A)((function*(e,t,r){var n,o,i,s,l,[c,u,d]=ha((0,a.A)((0,a.A)({},null!==(n=e[on])&&void 0!==n?n:lo()),{},{data:t,pendingPermissionsPreCheck:[]}));null!==(o=c.tplStateStoreMap)&&void 0!==o||(c.tplStateStoreMap=new Map),null!==(i=c.formStateStoreMap)&&void 0!==i||(c.formStateStoreMap=new Map);var p=new Gr("fragment"),f={tag:Lr.ROOT,createPortal:null},v=e.transform,h=Oe();v&&Re(h,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var m=yield ca(f,h&&!r?e:(0,a.A)((0,a.A)({errorBoundary:r},e),{},{properties:(0,a.A)((0,a.A)({},e.properties),v)}),c,p,[],{}),g=[...u,...d];if(yield va(m,c,g),(null===(s=m.node)||void 0===s?void 0:s.tag)===Lr.PLACEHOLDER)throw new Error("The root brick of useBrick cannot be an ignored control node");if(null!==(l=m.node)&&void 0!==l&&l.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return f.child=m.node,{tagName:m.node?m.node.type:null,renderRoot:f,rendererContext:p,scopedStores:g}}))).apply(this,arguments)}function cn(e,t){var r,{renderRoot:n,rendererContext:a,scopedStores:o}=e;for(var i of(n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},Mr(n,t),a.dispatchOnMount(),a.initializeScrollIntoView(),a.initializeMediaChange(),a.initializeMessageDispatcher(),o))i.mountAsyncData();return{portal:r}}function un(e,t){var{rendererContext:r}=e;t.portal&&(_r(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function dn(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return vt(t,(0,a.A)((0,a.A)({},lo()),{},{data:e}),{noInject:!0})}function pn(e,t){var r=co(e);Object.assign(r,(0,a.A)((0,a.A)({},t),{},{meta:(0,a.A)((0,a.A)({},r.meta),t.meta),$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),N(r)}function fn(e,t){var r=co(e),n=!1,a=e=>"".concat(e.path,".").concat(e.exact),o=(e,r)=>e.map((e=>{var i=a(e);return"routes"===e.type?(e.routes=o(e.routes,r),e):i===r?(n=!0,t):e}));r.routes=o(r.routes,a(t)),n||r.routes.unshift(t)}function vn(e,t,r){var n="".concat(e,".").concat(t.name);Le.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),hn(e,t.name,r)}function hn(e,t,r){bn(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,a.A)({brick:t},(0,A.pick)(r,"properties","events","lifeCycle","context","slots","children"))])}function mn(e){return"${APP.homepage}/_dev_only_/snippet-preview/".concat(e)}function gn(e,t){var r;bn(e,mn(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}],t.context)}var yn,An=gn;function bn(e,t,r,n){var{routes:a}=co(e),o=a.findIndex((e=>e.path===t)),i={path:t,bricks:r,context:n,menu:!1,exact:!0};-1===o?a.unshift(i):a.splice(o,1,i)}function En(e,t){var{tplStateStoreId:r}=t,n=lo();return r?_e((0,a.A)((0,a.A)({},n),{},{tplStateStoreId:r}),"STATE").getValue(e):n.ctxStore.getValue(e)}function wn(e){var{tplStateStoreId:t}=e,r=lo();return t?_e((0,a.A)((0,a.A)({},r),{},{tplStateStoreId:t}),"STATE").getAllValues():r.ctxStore.getAllValues()}function Sn(e){return io().find((t=>t.id?t.id===e:t.filePath.startsWith(e)))}function kn(e){return(0,f.loadBricksImperatively)(e,io())}function In(){return so()}function Pn(e,t){return xn.apply(this,arguments)}function xn(){return(xn=(0,o.A)((function*(e,t){var r,{appId:n,updateStoryboardType:a,collectUsedContracts:o}=t,i=co(n);if("route"===a)r={routes:[e]};else if("template"===a)r={meta:{customTemplates:[e]}};else if("snippet"===a){var s,l=mn(e.snippetId);r={routes:[null==i||null===(s=i.routes)||void 0===s?void 0:s.find((e=>e.path===l))]}}var c=[];return r&&o&&(yield o(r)).forEach((e=>{var t,[r,n,a]=e.match(/(.*)@(.*):\d\.\d\.\d/);null!=i&&null!==(t=i.meta)&&void 0!==t&&null!==(t=t.contracts)&&void 0!==t&&t.some((e=>e.namespaceId===n&&e.name===a))||c.push(e)})),c}))).apply(this,arguments)}function Cn(e,t){return On.apply(this,arguments)}function On(){return(On=(0,o.A)((function*(e,t){var{tplStateStoreId:r}=t,n=(0,a.A)((0,a.A)({},lo()),{},{tplStateStoreId:r});return e.resolve?Je(e.resolve,n,{cache:"reload"}):pt(e.value,n)}))).apply(this,arguments)}var Rn=[];function Tn(e){yn=e;var t=wn({tplStateStoreId:e.tplStateStoreId});Ln({changeType:"initialize",tplStateStoreId:e.tplStateStoreId,detail:{data:t}})}function Bn(e){Rn.push(e)}function Ln(e){setTimeout((()=>{for(var t of Rn)try{t(e)}catch(t){console.error("RealTimeDataInspectHook failed (".concat(e.changeType,"):"),t)}}))}var _n=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class Mn{constructor(e,t,r,n){(0,s.A)(this,"type",void 0),(0,s.A)(this,"data",new Map),(0,s.A)(this,"changeEventType",void 0),(0,s.A)(this,"pendingStack",[]),(0,s.A)(this,"hostBrick",void 0),(0,s.A)(this,"stateStoreId",void 0),(0,s.A)(this,"batchUpdate",!1),(0,s.A)(this,"batchUpdateContextsNames",[]),(0,s.A)(this,"rendererContext",void 0),(0,s.A)(this,"routeMap",new WeakMap),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=r,this.stateStoreId=n}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{var[t,{value:r}]=e;return[t,r]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}notifyRealTimeDataChange(e,t){if(yn){var{tplStateStoreId:r}=yn;(r?"STATE"===this.type&&this.stateStoreId===r:"CTX"===this.type)&&Ln({changeType:"update",tplStateStoreId:r,detail:{name:e,value:t}})}}getAffectListByContext(e){var t=[e];return this.data.forEach(((e,r)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(r)&&t.push(...this.getAffectListByContext(r))})),t.shift(),[...new Set(t)]}updateValues(e,t,r){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");var n={},a={},o=[];e.forEach((e=>{var{name:a,value:i}=r([e]),s=this.data.get(a);o.push(...this.getAffectListByContext(a)),s&&(n[a]=s),this.updateValue(a,i,t)})),o.filter((e=>!n[e])).forEach((e=>{var t=this.data.get(e);t&&(a[e]=t)}));var i=e=>{for(var t in e){var r,n=e[t];null===(r=n.eventTarget)||void 0===r||r.dispatchEvent(new CustomEvent(this.changeEventType,{detail:n.value}))}};i(n),i(a),this.batchUpdate=!1}updateValue(e,t,r,n,o){var i=this.data.get(e);if(!i)throw new Error("".concat(this.type," '").concat(e,"' is not defined"));if("refresh"!==r&&"load"!==r)"replace"===r?i.value=t:(0,v.isObject)(i.value)?Object.assign(i.value,t):(console.warn('Non-object current value of "'.concat(this.type,".").concat(e,'" for "context.assign", try "context.replace" instead.')),i.value=t),this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.useResolve)throw new Error("You can not ".concat(r,' "').concat(this.type,".").concat(e,'" which is not using resolve'));var s;"load"===r&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading));var l=e=>{var t,r;return"FlowApiNotFoundError"===(null==e?void 0:e.name)&&!!(r=null===(t=this.rendererContext)||void 0===t?void 0:t.renderId)&&r!==so()};if(s||(s=i.loading=i.load((0,a.A)({cache:"load"===r?"default":"reload"},t))).then((e=>{this.finishLoad(i,e)}),(e=>{!i.useResolve||l(e)||null!=n&&n.error||rr(e)})),n){var c=Or(n,o);s.then((e=>{c("success")({value:e}),c("finally")()}),(e=>{!l(e)&&n.error&&c("error")(e),c("finally")()}))}}}finishLoad(e,t){e.useResolve&&(e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t})))}define(e,t,r,n){if(Array.isArray(e)&&e.length>0){var a=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX",n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",r=arguments.length>2?arguments[2]:void 0,n=new Map;for(var a of e){var o=[a.if,a.value,a.resolve],i=(0,B.collectMemberUsage)(o,t);if(!r&&"STATE"===t){var s=(0,B.collectMemberUsage)(o,"TPL");for(var l of s.usedProperties)i.usedProperties.add(l);s.hasNonStaticUsage&&(i.hasNonStaticUsage=!0)}n.set(a,i)}return n}(e,r,arguments.length>3?arguments[3]:void 0),a=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var s;a.set(i,(null!==(s=a.get(i))&&void 0!==s?s:0)+1)}var l=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),c=new WeakSet,u=new Map,d=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,r)=>{u.set(e,{resolve:t,reject:r})}))]))),p=function(){var e=(0,o.A)((function*(e){var r;c.add(e);var o=yield t(e);n.delete(e);var i=null!==(r=a.get(e.name))&&void 0!==r?r:0;if(o){if(u.get(e.name).resolve(),a.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(u.get(e.name).resolve(),a.delete(e.name)):a.set(e.name,i-1);yield v()}));return function(t){return e.apply(this,arguments)}}(),f=l;function v(){return h.apply(this,arguments)}function h(){return h=(0,o.A)((function*(){var e=Array.from(n.entries()).filter(function(e,t){return(r,n)=>t?0===n:![...r[1].usedProperties].some((t=>e.has(t)))}(a,f)).map((e=>e[0])).filter((e=>!c.has(e)));yield Promise.all(e.map(p))})),h.apply(this,arguments)}return{pendingResult:v().then((0,o.A)((function*(){for(var e of(n.size>0&&(function(e,t){var r=new Map(e),n=new Set(Array.from(r.keys()).map((e=>e.name))),a=()=>{var e=!1;for(var[t,o]of r.entries())[...o.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&a()};if(a(),r.size>0)throw new ReferenceError("Circular ".concat(t," detected: ").concat(Array.from(r.keys()).map((e=>e.name)).join(", ")))}(n,r),f=!0,yield v()),u.values()))e.resolve()}))).catch((e=>{for(var t of u.values())t.reject(e);throw e})),pendingContexts:d}}(e,(e=>this.resolve(e,t,r,n)),this.type,Oe(t));this.pendingStack.push(a)}}onChange(e,t){var r;null===(r=this.data.get(e))||void 0===r||r.eventTarget.addEventListener(this.changeEventType,t)}waitFor(e){var t=this;return(0,o.A)((function*(){var r=function*(t){yield Promise.all([...e].map((e=>t.get(e))))};for(var{pendingContexts:n}of t.pendingStack)yield*r(n)}))()}waitForAll(){var e=this;return(0,o.A)((function*(){for(var{pendingContexts:t}of e.pendingStack)for(var r of t.values())r.catch((()=>{}));for(var{pendingResult:n}of e.pendingStack)yield n}))()}mountAsyncData(e){this.data.forEach((t=>{var r;if(t.async&&(!e||null!==(r=this.routeMap.get(e))&&void 0!==r&&r.has(t.name))){if(t.asyncMounted)return void console.error('Async data "'.concat(t.name,'" already mounted. This is a bug of Brick Next, please report it.'));t.asyncMounted=!0,t.loading.then((e=>{this.finishLoad(t,e)}))}}))}resolve(e,t,r,n){var i=this;return(0,o.A)((function*(){if(!(yield gt(e,t)))return!1;var s,l,c,u,d,p;if(r&&("STATE"===i.type?e.expose:"FORM_STATE"===i.type)&&(s=yield kt(r,e.name)),void 0===s){if(e.resolve){var f=(0,v.hasOwnProperty)(e,"value");d=e.track&&f&&(0,v.hasOwnProperty)(e.resolve,"if")&&(0,B.strictCollectMemberUsage)(e.resolve.if,i.type).size>0;var h=(0,a.A)({transform:"value"},e.resolve);if(((u=yield gt(e.resolve,t))||d)&&(l=function(){var e=(0,o.A)((function*(e){var r;return(yield Je(h,t,(0,a.A)((0,a.A)({},e),{},{renderId:null===(r=i.rendererContext)||void 0===r?void 0:r.renderId}))).value}));return function(t){return e.apply(this,arguments)}}()),u)"eager"==(p=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager")?s=yield l():"async"===p&&(c=l());else if(!f)return!1}u&&"eager"===p||void 0===e.value||(s=yield pt(e.value,t))}if(i.data.has(e.name))throw new Error("".concat(i.type," '").concat(e.name,"' has already been declared"));var m={name:e.name,value:s,eventTarget:new be.A,useResolve:u,load:l,loaded:"eager"===p,loading:c,async:"async"===p,deps:[]};if("lazy"===p){var g,{trigger:y}=e.resolve;y&&_n.includes(y)&&(null===(g=i.rendererContext)||void 0===g||g.registerArbitraryLifeCycle(y,(()=>{i.updateValue(e.name,void 0,"load")})))}if(e.onChange&&m.eventTarget.addEventListener(i.changeEventType,dr(e.onChange,t)),e.track){var A=(0,B.strictCollectMemberUsage)(d?[e.resolve,e.value]:l?e.resolve:e.value,i.type);for(var b of(!l&&(m.deps=[...A]),A))i.onChange(b,i.batchAddListener((()=>{m.useResolve=d?At(e.resolve,t):!!l,m.useResolve?i.updateValue(e.name,{cache:"default"},"refresh"):i.updateValue(e.name,vt(e.value,t),"replace")}),e))}if(m.eventTarget.addEventListener(i.changeEventType,(t=>{i.notifyRealTimeDataChange(e.name,t.detail)})),i.data.set(e.name,m),Array.isArray(n))for(var E of n){var w=i.routeMap.get(E);w?w.add(e.name):i.routeMap.set(E,new Set([e.name]))}return!0}))()}disposeDataInRoutes(e){for(var t of e){var r=this.routeMap.get(t);if(void 0!==r)for(var n of r)this.data.delete(n)}}batchAddListener(e,t){return r=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(r)}}}var Fn=r(1369);function Nn(e,t,r){var n,a,{reversedProxies:o,asyncHostPropertyEntries:i,externalSlots:s,tplStateStoreId:l,hostBrick:c}=e;if(t&&o){var u=o.properties.get(t);u&&(a=i,n=u.map((e=>{var{from:t,to:r}=e,n=a.filter((e=>e[0]===t));if(n.length>0&&r.refProperty)return[r.refProperty,kt(n,t),!0]})).filter(Boolean));var d=o.slots.get(t);if(d&&s){var p=new Map;for(var{from:f,to:h}of d){var m,g,y,b,E=null!==(m=null===(g=s[f])||void 0===g?void 0:g.bricks)&&void 0!==m?m:[];if(E.length){var w=null!==(y=h.refSlot)&&void 0!==y?y:f,S=p.get(w);if(!S){S=[];for(var k=(0,v.hasOwnProperty)(r,w)?r[w].bricks.length+1:1,I=0;I<k;I+=1)S.push([]);p.set(w,S)}var P=null!==(b=h.refPosition)&&void 0!==b?b:-1,x=(0,v.hasOwnProperty)(c.runtimeContext,"forEachItem");S[(0,A.clamp)(P<0?S.length+P:P,0,S.length-1)].push(..."base-layout-v3.tpl-scroll-load-list"!==e.__temporary_tpl_tag_name&&"shrcb-homepage.tpl-custom-scroll-load-list"!==e.__temporary_tpl_tag_name||x?Un(E,x,c.runtimeContext.forEachItem,c.runtimeContext.forEachIndex):E)}}var C=function(){(0,v.hasOwnProperty)(r,O)||(r[O]={type:"bricks",bricks:[]});var e=r[O];e.bricks=R.flatMap(((t,r)=>r<e.bricks.length?t.concat(e.bricks[r]):t)),0===e.bricks.length&&delete r[O]};for(var[O,R]of p.entries())C()}}return{[Ut]:n,[jt]:l}}function Un(e,t,r,n){return e.map((e=>{var o,{children:i,slots:s,[Vt]:l,[Dt]:c,[$t]:u}=e,d=(0,y.A)(e,["children","slots",Vt,Dt,$t].map(Fn.A));return(0,a.A)((0,a.A)((0,a.A)({},d),t?{[Vt]:r,[Dt]:n}:{[$t]:!0}),{},{slots:":forEach"===d.brick?ya(i,s):Object.fromEntries(Object.entries(null!==(o=ya(i,s))&&void 0!==o?o:{}).map((e=>{var[a,o]=e;return[a,"routes"===o.type?{type:"routes",routes:jn(o.routes,t,r,n)}:{type:"bricks",bricks:Un(o.bricks,t,r,n)}]})))})}))}function jn(e,t,r,n){return e.map((e=>"routes"===e.type?(0,a.A)((0,a.A)({},e),{},{routes:jn(e.routes,t,r,n)}):"redirect"===e.type?e:(0,a.A)((0,a.A)({},e),{},{bricks:Un(e.bricks,t,r,n)})))}var Vn=["properties","slots","children"];function Dn(e,t){function r(e){return(0,v.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{var[t,a]=e;return(0,v.isObject)(a)&&"useBrick"===t?Array.isArray(a)?[t,a.map(n)]:[t,n(a)]:[t,r(a)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e){var{properties:o,slots:i,children:s}=e,l=(0,y.A)(e,Vn),c=ya(s,i),u=Object.fromEntries(Object.entries(null!=c?c:{}).map((e=>{var t,[r,a]=e;return[r,{type:"bricks",bricks:(null!==(t=a.bricks)&&void 0!==t?t:[]).map(n)}]})));return(0,a.A)((0,a.A)({},l),{},{properties:r(o),slots:u},Nn(t,l.ref,u))}return r(e)}var $n=["slots","children"],Hn=["properties","slots","children"];function qn(e,t,r,n,o){var i,s=(0,A.uniqueId)("tpl-state-"),l=(0,a.A)((0,a.A)({},r.runtimeContext),{},{tplStateStoreId:s});delete l.forEachItem,delete l.forEachIndex,delete l.formStateStoreId;var c=new Mn("STATE",r,o,s);l.tplStateStoreMap.set(s,c),l.tplStateStoreScope&&l.tplStateStoreScope.push(c);var{bricks:u,proxy:d,state:p,contracts:f}=Le.get(e);null==Ja||null===(i=Ja.flowApi)||void 0===i||i.collectWidgetContract(f),c.define(p,l,n);var{slots:v,children:h}=t,m=(0,y.A)(t,$n),g=(0,a.A)((0,a.A)({},m),{},{brick:e});r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:s,proxy:d};var b={properties:new Map,slots:new Map};if(null!=d&&d.properties)for(var[E,w]of Object.entries(d.properties)){var S=b.properties.get(w.ref);S||(S=[],b.properties.set(w.ref,S)),S.push({from:E,to:w})}if(null!=d&&d.slots)for(var[k,I]of Object.entries(d.slots)){var P=b.slots.get(I.ref);P||(P=[],b.slots.set(I.ref,P)),P.push({from:k,to:I})}var x={reversedProxies:b,asyncHostPropertyEntries:n,externalSlots:ya(h,v),tplStateStoreId:s,hostBrick:r,__temporary_tpl_tag_name:e};return g.slots={"":{type:"bricks",bricks:u.map((e=>Wn(e,x)))}},g}function Wn(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:o}=e,i=(0,y.A)(e,Hn),s=ya(o,n),l=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var r,[n,a]=e;return[n,{type:"bricks",bricks:(null!==(r=a.bricks)&&void 0!==r?r:[]).map((e=>Wn(e,t)))}]})));return(0,a.A)((0,a.A)({},i),{},{properties:Dn(r,t),slots:l},Nn(t,i.ref,l))}var Kn="form-renderer.form-renderer",zn=Symbol.for("form.stateStoreId"),Gn=["forms.general-form","form.general-form","eo-form"];function Jn(e,t,r){var{id:n,bricks:o,events:i,context:s,mountPoint:l,instanceId:c}=e,{brick:u,properties:d}=e,p=t.find((e=>e.fieldId===n));if(p){var f=function(e){var t,r={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},n=()=>{var t,r;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(r=e.limit)||void 0===r?void 0:r.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:(0,a.A)((0,a.A)((0,a.A)({},r),n()),{},{placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}})};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:(0,a.A)((0,a.A)({},r),n())};break;case"FLOAT":t={brick:"forms.general-input-number",properties:(0,a.A)((0,a.A)((0,a.A)({},r),n()),{},{placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUM":t={brick:"forms.general-select",properties:(0,a.A)((0,a.A)((0,a.A)({},r),n()),{},{options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUMS":t={brick:"forms.general-select",properties:(0,a.A)((0,a.A)((0,a.A)({},r),n()),{},{mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:(0,a.A)((0,a.A)((0,a.A)({},r),n()),{},{placeholder:e.description})};break;case"IP":t={brick:"forms.general-input",properties:(0,a.A)((0,a.A)((0,a.A)({},r),n()),{},{placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}})};break;case"JSON":t={brick:"forms.general-textarea",properties:(0,a.A)({},r)};break;case"ARRAY":t={brick:"forms.general-select",properties:(0,a.A)({},r)};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:(0,a.A)((0,a.A)({},r),n())};break;default:t={brick:"forms.general-input",properties:(0,a.A)((0,a.A)((0,a.A)({},r),n()),{},{placeholder:e.description})}}return t}(p);u||(u=f.brick),d=(0,a.A)((0,a.A)({},f.properties),d)}var h={brick:u,properties:d,iid:c,slot:l,events:i,context:s,children:Yn(o,t,r),[zn]:r};return(0,v.hasOwnProperty)(e,"if")&&(h.if=e.if),h}function Yn(e,t,r){if(Array.isArray(e))return e.map((e=>Jn(e,t,r)))}var Qn,Xn,Zn,ea=["blockingList","node","menuRequestNode","hasTrackingControls"],ta=["if","permissionsPreCheck"],ra=["formData"],na=["src"],aa=["href"];function oa(e,t,r,n,a,o,i,s){return ia.apply(this,arguments)}function ia(){return ia=(0,o.A)((function*(e,t,r,n,o,i,s,l){var c=yield function(e,t){return Mt.apply(this,arguments)}(t,r),u={blockingList:[]},d=u.menuRequestNode={return:i};switch(c){case"missed":break;case"unauthenticated":u.unauthenticated=!0;break;default:var p,v=u.route=c.route;u.path=c.match.path;var h=(0,a.A)((0,a.A)({},r),{},{match:c.match});l&&h.ctxStore.disposeDataInRoutes(t);var m=o.concat(v);h.ctxStore.define(v.context,h,void 0,m),h.pendingPermissionsPreCheck.push(null==Ja||null===(p=Ja.checkPermissions)||void 0===p?void 0:p.preCheckPermissionsForBrickOrRoute(v,(e=>pt(e,h))));var{preLoadBricks:g}=v;if(Array.isArray(g)&&u.blockingList.push((0,f.loadBricksImperatively)(g,io())),"redirect"===v.type){var y;if("string"!=typeof(y="string"==typeof v.redirect?yield pt(v.redirect,h):(yield Je((0,a.A)({transform:"redirect"},v.redirect),h)).redirect))throw console.error("Unexpected redirect result:",y),new Error("Unexpected type of redirect result: ".concat(typeof y));u.redirect={path:y}}else{var A,b=function(e,t){if(e){if("brick"===e.type)throw console.error("Set menu with brick is dropped in v3:",e),new Error("Set menu with brick is dropped in v3");if("resolve"!==e.type)return pt(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}(v.menu,h);b&&(d.request=b),l||n.memoizeMenuRequestNode(t,d),ma(u,A="routes"===v.type?yield oa(e,v.routes,h,n,m,d,s):yield sa(e,v.bricks,h,n,m,d,s)),ga(d,A.menuRequestNode)}}return u})),ia.apply(this,arguments)}function sa(e,t,r,n,a,o,i,s,l){return la.apply(this,arguments)}function la(){return la=(0,o.A)((function*(e,t,r,n,a,o,i,s,l){!function(e,t,r){function n(e){if((0,v.isObject)(e)&&"function"!=typeof e)if(Array.isArray(e))e.map(n);else for(var[t,r]of Object.entries(e))(0,v.isObject)(r)&&"useBrick"===t?Array.isArray(r)?r.forEach((e=>a(e,!0))):a(r,!0,!0):n(r)}function a(e,o,i){if(o&&(e[on]=t),n(e.properties),!r||i){var s=ya(e.children,e.slots);for(var l of Object.values(null!=s?s:{}))for(var c of null!==(u=l.bricks)&&void 0!==u?u:[]){var u;a(c,o)}}}for(var o of e)a(o)}(t,r,!0);var c={blockingList:[]},u=null!=l?l:[];return(yield Promise.all(t.map(((t,l)=>ca(e,t,r,n,a,o,i,u.concat(l),s&&new Map(s)))))).forEach(((t,r)=>{t.hasTrackingControls&&n.memoize(i,u.concat(r),t.node,e),ma(c,t)})),c})),la.apply(this,arguments)}function ca(e,t,r,n,a,o,i){return ua.apply(this,arguments)}function ua(){return ua=(0,o.A)((function*(e,t,r,n,a,o,i){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:new Map;try{return yield function(e,t,r,n,a,o,i,s,l){return da.apply(this,arguments)}(e,t,r,n,a,o,i,s,l)}catch(r){if(t.errorBoundary)return console.error("Error caught by error boundary:",r),{node:{tag:Lr.BRICK,type:"div",properties:{textContent:Qt(r),style:{color:"var(--color-error)"}},runtimeContext:null,return:e},blockingList:[]};throw r}})),ua.apply(this,arguments)}function da(){return da=(0,o.A)((function*(e,t,r,n,i,s,l,c,u){var d,p,h={blockingList:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),h;var{if:m,permissionsPreCheck:g}=t,b=(0,y.A)(t,ta);if(function(e){return"string"==typeof e?(0,T.isTrackAll)(e):tt(e)&&(0,T.isTrackAll)(rt(e))}(m))return ca(e,(0,a.A)({brick:":if",dataSource:m,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[b]}}},Object.getOwnPropertySymbols(t).reduce(((e,r)=>(0,a.A)((0,a.A)({},e),{},{[r]:t[r]})),{})),r,n,i,s,l,c,u);var w=t[jt],S=t[zn],k=(0,a.A)((0,a.A)({},r),{},{tplStateStoreId:w,formStateStoreId:S});(0,v.hasOwnProperty)(t,Vt)?(k.forEachItem=t[Vt],k.forEachIndex=t[Dt]):t[$t]&&(delete k.forEachItem,delete k.forEachIndex);var{context:I}=t;if(Array.isArray(I)&&I.length>0){var P=Oe(k);Re(P,"Defining context on bricks","check your brick:",t),P||k.ctxStore.define(I,k)}if(k.pendingPermissionsPreCheck.push(null==Ja||null===(d=Ja.checkPermissions)||void 0===d?void 0:d.preCheckPermissionsForBrickOrRoute(t,(e=>pt(e,k)))),!(yield function(e,t){return Et.apply(this,arguments)}(t,k)))return h;var x=t.brick;if(x.startsWith(":")){var C;!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(x);var{dataSource:O}=t,R=function(){var r=(0,o.A)((function*(r){var a,o=yield pt(O,r),d=":forEach"===x?"":":switch"===x?String(o):o?"":"else",p=ya(t.children,t.slots),f=p&&(0,v.hasOwnProperty)(p,d)&&(null===(a=p[d])||void 0===a?void 0:a.bricks);if(!Array.isArray(f))return{blockingList:[]};switch(x){case":forEach":return Array.isArray(o)?function(e,t,r,n,a,o,i,s,l,c){return pa.apply(this,arguments)}(e,o,f,r,n,i,s,l,u,c):{blockingList:[]};case":if":case":switch":return sa(e,f,r,n,i,s,l,u,c)}}));return function(e){return r.apply(this,arguments)}}(),L=function(){var t=(0,o.A)((function*(t){var r,n=yield R(t);return null!==(r=n.node)&&void 0!==r||(n.node={tag:Lr.PLACEHOLDER,return:e}),n}));return function(e){return t.apply(this,arguments)}}(),_=yield L(k),{onMount:M,onUnmount:F}=null!==(C=t.lifeCycle)&&void 0!==C?C:{},{contextNames:N,stateNames:U}=St(O);if(N||U){_.hasTrackingControls=!0;var j=0,V=function(){var t=(0,o.A)((function*(){var t=++j,[r,a,o]=ha(k),i=yield L(r),s=[...a,...o];if(yield va(i,r,s),j===t)for(var u of(F&&dr(F,k)(new CustomEvent("unmount",{detail:{rerender:!0}})),n.reRender(l,c,i.node,e),M&&dr(M,r)(new CustomEvent("mount",{detail:{rerender:!0}})),s))u.mountAsyncData()}));return function(){return t.apply(this,arguments)}}(),D=(0,A.debounce)(V);if(N)for(var $ of N)k.ctxStore.onChange($,D);if(U)for(var H of U)_e(k,"STATE",': "'.concat(O,'"')).onChange(H,D)}return M&&n.registerArbitraryLifeCycle("onMount",(()=>{dr(M,k)(new CustomEvent("mount",{detail:{rerender:!1}}))})),F&&n.registerArbitraryLifeCycle("onUnmount",(()=>{dr(F,k)(new CustomEvent("unmount",{detail:{rerender:!1}}))})),_}/\.tpl-/.test(x)&&!Le.get(x)&&(yield Aa((0,f.loadBricksImperatively)([x],io()),"brick",x,n.unknownBricks));var q,W,K=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){var r="".concat(t,".").concat(e);if(Le.get(r))return r}return!!Le.get(e)&&e}(x,null===(p=k.app)||void 0===p?void 0:p.id);if(K){var z,G=null!==(z=u.get(K))&&void 0!==z?z:0;if(G>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(K,'"'));u.set(K,G+1)}else x.includes("-")&&!customElements.get(x)&&(x===Kn?customElements.define(Kn,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):h.blockingList.push(Aa((0,f.enqueueStableLoadBricks)([x],io()),"brick",x,n.unknownBricks)));if(x===Kn){var J,Y=null!==(J=t.properties)&&void 0!==J?J:{};({formData:q}=Y),W=(0,y.A)(Y,ra)}else W=t.properties;var Q=[],X=function(e,t,r){return(0,v.isObject)(e)?Object.entries(e).map((e=>{var[n,a]=e,{contextNames:o,stateNames:i,formStateNames:s}=St(a);return(o||i||s)&&r.push({contextNames:o,stateNames:i,formStateNames:s,propName:n,propValue:a}),[n,pt(a,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?ct.USE_BRICK:ct.INITIAL})]})):[]}(W,k,Q),Z=t[Ut];Z&&X.push(...Z);var ee="script"===x;if(ee||"link"===x){var te=yield Pt(X);if(ee?te.src:"stylesheet"===te.rel&&te.href){var re,ne=null!==(re=window.PUBLIC_ROOT)&&void 0!==re?re:"";if(ee){var{src:ae}=te,oe=(0,y.A)(te,na);yield Aa((0,f.loadScript)(ae,ne,oe),"script",ae,"silent")}else{var{href:ie}=te;oe=(0,y.A)(te,aa),yield Aa((0,f.loadStyle)(ie,ne,oe),"stylesheet",ie,"silent")}return h}}var se={tag:Lr.BRICK,type:K||x,return:e,slotId:l,events:t.events,runtimeContext:k,portal:t.portal,iid:t.iid,ref:t.ref};h.node=se;var le=(0,B.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);le.size>0&&h.blockingList.push(Aa((0,f.loadProcessorsImperatively)(le,io()),"processors",[...le].join(", "),n.unknownBricks));var ce=[],ue=function(){var e=(0,o.A)((function*(){se.properties=yield Pt(X),function(e,t){var r=function(t){var r=()=>{e.element&&Ot(e.element,{[t.propName]:t.propValue},e.runtimeContext)};if(t.contextNames)for(var n of t.contextNames)e.runtimeContext.ctxStore.onChange(n,r);if(t.stateNames){var a=_e(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var o of t.stateNames)a.onChange(o,r)}if(t.formStateNames){var i=De(e.runtimeContext,"FORM_STATE",': "'.concat(t.propValue,'"'));for(var s of t.formStateNames)i.onChange(s,r)}};for(var n of t)r(n)}(se,Q)}));return function(){return e.apply(this,arguments)}}();ce.push(ue()),n.registerBrickLifeCycle(se,t.lifeCycle);var de,pe=t;K?pe=qn(K,t,se,X,n):x===Kn&&(pe=function(e,t,r,n,o){var i,s,l="string"==typeof e?JSON.parse(e):e,c=(0,A.uniqueId)("form-state-"),u=(0,a.A)((0,a.A)({},r.runtimeContext),{},{formStateStoreId:c});delete u.forEachItem,delete u.forEachIndex,delete u.tplStateStoreId;var d=new Mn("FORM_STATE",void 0,o,c);u.formStateStoreMap.set(c,d),u.formStateStoreScope&&u.formStateStoreScope.push(d);var p=null!==(i=l.context)&&void 0!==i?i:[];p.some((e=>"params"===e.name))||p.push({name:"params"}),d.define(p,u,n);var f=Jn(l.formSchema,l.fields,c);return Gn.includes(f.brick)&&t.events&&(f.events=function(e,t){var r=null!=e?e:{};for(var[n,a]of Object.entries(t))r[n]=(0,v.hasOwnProperty)(r,n)?[r[n],a].flat():a;return r}(f.events,t.events)),"boolean"!=typeof(null===(s=t.properties)||void 0===s?void 0:s.renderRoot)||t.properties.renderRoot?(0,a.A)((0,a.A)({},t),{},{slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[f]}]}):(0,a.A)((0,a.A)({},t),{},{slots:void 0,children:[f]})}(q,t,se,X,n)),pe.portal&&(se.slotId=void 0),K?(delete(de=(0,a.A)({},k)).forEachItem,delete de.forEachIndex):de=k;var fe=function(){var e=(0,o.A)((function*(){var e=ya(pe.children,pe.slots);if(e){var t=new Map,r=yield Promise.all(Object.entries(e).map(((e,r)=>{var[l,c]=e;if("routes"!==c.type)return sa(se,c.bricks,de,n,i,s,l,u);var d=i[i.length-1];return null!=d&&d.incrementalSubRoutes&&(t.set(r,l),n.performIncrementalRender(c,i,function(){var e=(0,o.A)((function*(e,t){var{homepage:r}=de.app,{pathname:o}=e;if(!E(r,o)||!i.every((e=>{var n,a;return(n=Ft(e,r,t.pathname))&&(a=Ft(e,r,o))&&(e!==d||(0,A.isEqual)(n.params,a.params))})))return!1;var u,[p,f,v]=ha((0,a.A)((0,a.A)({},de),{},{location:e,query:new URLSearchParams(e.search)})),h=!1,m=[];try{if((u=yield oa(se,c.routes,p,n,i,s,l,!0)).route){if(n.reBailout(u))return!0;m=[...f,...v],yield va(u,p,[p.ctxStore,...m])}yield n.reMergeMenuRequestNodes(s,c.routes,u.menuRequestNode)}catch(e){console.error("Incremental sub-router failed:",e);var g=n.reCatch(e,se);if(!g)return!0;({failed:h,output:u}=g),yield n.reMergeMenuRequestNodes(s,c.routes,u.menuRequestNode)}if(n.reRender(l,[],u.node,se),!h)for(var y of(p.ctxStore.mountAsyncData(u.route),m))y.mountAsyncData();return!!u.route||null}));return function(t,r){return e.apply(this,arguments)}}())),oa(se,c.routes,de,n,i,s,l)}))),l=(0,a.A)((0,a.A)({},h),{},{node:void 0,blockingList:[],menuRequestNode:void 0});r.forEach(((e,r)=>{t.has(r)&&n.memoize(t.get(r),[],e.node,se),ma(l,e),function(e,t){var r=t.menuRequestNode;if(r)if(e.menuRequestNode){for(var n=e.menuRequestNode;n.sibling;)n=n.sibling;n.sibling=r}else e.menuRequestNode=r}(l,e)})),l.node&&(se.child=l.node),ma(h,(0,a.A)((0,a.A)({},l),{},{node:void 0})),ga(s,h.menuRequestNode=l.menuRequestNode)}}));return function(){return e.apply(this,arguments)}}();return ce.push(fe()),yield Promise.all(ce),h})),da.apply(this,arguments)}function pa(){return(pa=(0,o.A)((function*(e,t,r,n,o,i,s,l,c,u){var d={blockingList:[]},p=t.length;return(yield Promise.all(t.map(((t,d)=>Promise.all(r.map(((r,f)=>ca(e,r,(0,a.A)((0,a.A)({},n),{},{forEachItem:t,forEachIndex:d}),o,i,s,l,u.concat(d*p+f),c&&new Map(c))))))))).flat().forEach(((t,r)=>{t.hasTrackingControls&&o.memoize(l,u.concat(r),t.node,e),ma(d,t)})),d}))).apply(this,arguments)}function fa(e){return[e.ctxStore,...e.tplStateStoreMap.values(),...e.formStateStoreMap.values()]}function va(e,t,r){return(0,f.flushStableLoadBricks)(),Promise.all([...e.blockingList,...r.map((e=>e.waitForAll())),...t.pendingPermissionsPreCheck])}function ha(e){var t=[],r=[];return[(0,a.A)((0,a.A)({},e),{},{tplStateStoreScope:t,formStateStoreScope:r}),t,r]}function ma(e,t){var{blockingList:r,node:n,menuRequestNode:a,hasTrackingControls:o}=t,i=(0,y.A)(t,ea);if(e.blockingList.push(...r),n)if(e.node){for(var s=e.node;s.sibling;)s=s.sibling;s.sibling=n}else e.node=n;Object.assign(e,i)}function ga(e,t){if(t)if(e.child){for(var r=e.child;r.sibling;)r=r.sibling;r.sibling=t}else e.child=t}function ya(e,t){var r=t;if(Array.isArray(e)&&!r)for(var n of(r={},e)){var a,o=null!==(a=n.slot)&&void 0!==a?a:"";(0,v.hasOwnProperty)(r,o)||(r[o]={type:"bricks",bricks:[]}),r[o].bricks.push(n)}return r}function Aa(e,t,r,n){return"silent"===n?e.catch((e=>{console.error('Load %s "%s" failed:',t,r,e)})):e}function ba(){if(!Qn){if(Qn={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){Qn.isInIframe=!0;try{if(window.origin===window.parent.origin){Qn.isInIframeOfSameSite=!0;var e="/next/"===g(),t=window.parent.location.pathname,r=t.startsWith("/next/");Qn.isInIframeOfNext=0==(Number(e)^Number(r)),Qn.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),Qn.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(Qn)}return Qn}function Ea(e){var t;if(!e.$$registerCustomTemplateProcessed){e.$$registerCustomTemplateProcessed=!0;var r=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(r))for(var n of r){var a=n.name.includes(".")?n.name:"".concat(e.app.id,".").concat(n.name);Le.define(a,n)}}}function wa(){return wa=(0,o.A)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return Sa.apply(this,arguments)}(e)),e.$$fulfilling})),wa.apply(this,arguments)}function Sa(){return(Sa=(0,o.A)((function*(e){var t;yield null==Ja||null===(t=Ja.fulfilStoryboard)||void 0===t?void 0:t.call(Ja,e),N(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}))).apply(this,arguments)}function ka(e){var t;t="8.2"===e?"v8-2":"v8",document.documentElement.dataset.ui=t}var Ia="basic.show-watermark",Pa=new WeakMap,xa=new WeakMap,Ca=new WeakMap,Oa=new WeakMap,Ra=new WeakMap,Ta=new WeakMap,Ba=new WeakMap,La=new WeakMap,_a=new WeakMap,Ma=new WeakMap,Fa=new WeakMap,Na=new WeakMap,Ua=new WeakSet;class ja{constructor(e){(0,i.A)(this,Ua),(0,l.A)(this,Pa,void 0),(0,l.A)(this,xa,!1),(0,l.A)(this,Ca,void 0),(0,l.A)(this,Oa,void 0),(0,l.A)(this,Ra,void 0),(0,l.A)(this,Ta,void 0),(0,l.A)(this,Ba,new Set),(0,l.A)(this,La,0),(0,l.A)(this,_a,void 0),(0,l.A)(this,Ma,void 0),(0,l.A)(this,Fa,void 0),(0,l.A)(this,Na,void 0),(0,u.A)(Pa,this,e);var t=O();window.addEventListener("beforeunload",(e=>{(0,c.A)(Ua,this,Va).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,c.A)(Ua,this,Va).call(this,{location:e,action:t})))}getRenderId(){return(0,d.A)(_a,this)}getRuntimeContext(){return(0,d.A)(Ra,this)}getRecentApps(){return{currentApp:(0,d.A)(Ma,this),previousApp:(0,d.A)(Fa,this)}}getNavConfig(){return(0,d.A)(Na,this)}bootstrap(){var e=this;window.AbortController&&(Xn=new AbortController,R.http.interceptors.request.use((e=>{var t;return(0,a.A)((0,a.A)({},e),{},{options:(0,a.A)((0,a.A)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:Xn.signal})})})));var t=O();(0,u.A)(Ca,this,t.location);var r=0;return t.listen(function(){var t=(0,o.A)((function*(t,n){var o,i,s,l,p,f,v=++r,h={hash:void 0,state:void 0};if(void 0!==t.key&&("POP"!==n||void 0!==(0,d.A)(Ca,e).key&&!1!==(null===(o=(0,d.A)(Ca,e).state)||void 0===o?void 0:o.notify))||(h.key=void 0),((0,m.locationsAreEqual)((0,a.A)((0,a.A)({},(0,d.A)(Ca,e)),h),(0,a.A)((0,a.A)({},t),h))||"POP"!==n&&!1===(null===(i=t.state)||void 0===i?void 0:i.notify))&&(p=!0),p||null!==(s=t.state)&&void 0!==s&&s.noIncremental||(p=yield null===(f=(0,d.A)(Ta,e))||void 0===f?void 0:f.didPerformIncrementalRender(t,(0,d.A)(Ca,e))),r===v)if(p)(0,u.A)(Ca,e,t);else{if(Xn&&(Xn.abort(),Xn=new AbortController),(0,u.A)(Ca,e,t),null===(l=(0,d.A)(Ta,e))||void 0===l||l.dispatchPageLeave(),"POP"===n&&w(b((0,d.A)(Pa,e),t.pathname)))return void window.location.reload();(0,d.A)(xa,e)?(0,u.A)(Oa,e,t):(K("locationChange"),(0,c.A)(Ua,e,$a).call(e,t).catch(rr))}}));return function(e,r){return t.apply(this,arguments)}}()),(0,c.A)(Ua,this,$a).call(this,t.location)}}function Va(e){var t,r=O(),n=r.getBlockMessage();null===(t=(0,d.A)(Ta,this))||void 0===t||t.dispatchBeforePageLeave(e);var a=r.getBlockMessage();return!n&&a&&r.unblock(),a}function Da(e,t,r){var n,a;if((0,u.A)(La,this,(n=(0,d.A)(La,this),a=n++,n)),a>10){var o='Infinite redirect detected: from "'.concat(r.pathname).concat(r.search).concat(r.hash,'" to "').concat(e,'"');throw new Error(o)}O().replace(e,t)}function $a(e){return Ha.apply(this,arguments)}function Ha(){return(Ha=(0,o.A)((function*(e){(0,u.A)(xa,this,!0);try{yield(0,c.A)(Ua,this,qa).call(this,e)}finally{if((0,u.A)(xa,this,!1),(0,d.A)(Oa,this)){var t=(0,d.A)(Oa,this);(0,u.A)(Oa,this,void 0),yield(0,c.A)(Ua,this,$a).call(this,t)}}}))).apply(this,arguments)}function qa(e){return Wa.apply(this,arguments)}function Wa(){return Wa=(0,o.A)((function*(e){var t,r,n,i,s=this,l=(0,u.A)(_a,this,(0,A.uniqueId)("render-id-"));We=new WeakSet,Ge.clear(),null==Ja||null===(t=Ja.flowApi)||void 0===t||t.clearCollectWidgetContract(),O().unblock();var p=null==Ja||null===(r=Ja.pageView)||void 0===r?void 0:r.create(),v=b((0,d.A)(Pa,this),e.pathname),h=null===(n=(0,d.A)(Ra,this))||void 0===n?void 0:n.app,m=null==v||null===(i=v.app)||void 0===i?void 0:i.id;window.BOOTSTRAP_UNION_FILE&&m&&m!==(null==h?void 0:h.id)&&function(e){var{appId:t,version:r}=e;window.APP_ROOT_TPL&&(window.APP_ID=t,window.APP_ROOT=window.APP_ROOT_TPL.replace("{id}",t).replace("{version}",r))}({appId:m,version:v.app.currentVersion}),null!=v&&v.app&&(yield function(e){return wa.apply(this,arguments)}(v));var g=(0,u.A)(Ma,this,null==v?void 0:v.app);!function(){var e,t,r,n,o,i,s,l,c=eo().getFeatureFlags(),u=eo().getMiscSettings();if(c["show-watermark"]){var d="0.0.0"===(null===(e=window.APP_ROOT)||void 0===e||null===(e=e.match(/versions\/([^/]+)\//))||void 0===e?void 0:e[1])||"0.0.0"===(null===(t=window.APP_ROOT)||void 0===t||null===(t=t.match(/micro-apps\/(?:v2|v3)\/[^/]+\/([^/]+)/))||void 0===t?void 0:t[1]),p=null!==(r=null==Ja||null===(n=Ja.auth)||void 0===n||null===(n=n.getAuth())||void 0===n?void 0:n.username)&&void 0!==r?r:"",v=null!==(o=u.watermarkConfig)&&void 0!==o?o:{flags:{}},h=(0,a.A)({content:[..."string"==typeof v.content?[v.content]:null!==(i=v.content)&&void 0!==i?i:[],null!==(s=v.flags)&&void 0!==s&&s["show-development"]&&d?"Development":"",null!==(l=v.flags)&&void 0!==l&&l["show-user"]?p:""].filter(Boolean),zIndex:1001,width:200,font:{fontSize:28},gap:[190,190]},(0,A.omit)(v,["content","flags"]));Zn?Zn.resolve(h):(0,f.loadBricksImperatively)([Ia],io()).then((()=>{(Zn=document.createElement(Ia)).resolve(h)}),(e=>{console.error("Load watermark service failed:",e)}))}}();var y,E=h&&g?h.id!==g.id:h!==g,w=eo().getFeatureFlags(),S=(0,d.A)(Ta,this),k=(t,r)=>{null==p||p({status:"redirected"}),(0,d.A)(Ba,this).add(S),(0,c.A)(Ua,this,Da).call(this,t,r,e)},I=()=>{var t=w["sso-enabled"]?"/sso-auth/login":"/auth/login";Yt(e),k(t,{from:e})},P=document.querySelector("#main-mount-point"),x=document.querySelector("#portal-mount-point"),C={tag:Lr.ROOT,container:P,createPortal:x},T=()=>{var e;for(var t of(_r(P),_r(x),(0,d.A)(Ba,this).add(S),(0,d.A)(Ba,this)))t&&(t.dispatchOnUnmount(),t.dispose());(0,d.A)(Ba,this).clear(),null==Ja||null===(e=Ja.messageDispatcher)||void 0===e||e.reset(),E&&((0,u.A)(Fa,this,h),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:h,currentApp:g}})))};if(te(g&&(ie()[g.id]||g.theme)||"light"),le("default"),g){var B,L,_,M,F,N;null==Ja||null===(B=Ja.checkInstalledApps)||void 0===B||B.preCheckInstalledApps(v,(e=>!!uo(e)));var U={bailout:e=>e.unauthenticated?(I(),!0):e.redirect?(k(e.redirect.path,e.redirect.state),!0):void(0,u.A)(La,this,0),mergeMenus:(y=(0,o.A)((function*(e){var t=yield Promise.all(e);(0,u.A)(Na,s,function(e){var t={breadcrumb:[]};for(var r of e){var{breadcrumb:n}=r;n&&(n.overwrite?t.breadcrumb=n.items:t.breadcrumb.push(...n.items))}return t}(t)),window.dispatchEvent(new CustomEvent("navConfig.change",{detail:(0,d.A)(Na,s)}))})),function(e){return y.apply(this,arguments)}),catch:(t,r)=>{if(!Xt(t)||window.NO_AUTH_GUARD){if(!(t instanceof R.HttpAbortError)){var n=eo().getMiscSettings().noAuthGuardLoginPath;return Xt(t)&&n?void k(n,{from:e}):{failed:!0,output:{node:{tag:Lr.BRICK,type:"div",properties:{textContent:Qt(t),style:{color:"var(--color-error)"}},runtimeContext:null,return:r},blockingList:[]}}}(0,d.A)(Ba,this).add(S)}else I()}},j=(0,u.A)(Ta,this,new Gr("page",{routeHelper:U,renderId:l})),V=(0,u.A)(Ra,this,{app:g,location:e,query:new URLSearchParams(e.search),flags:w,sys:(0,a.A)((0,a.A)((0,a.A)({},null==Ja||null===(L=Ja.auth)||void 0===L?void 0:L.getAuth()),ba()),{},{settings:{brand:eo().getBrandSettings()}}),ctxStore:new Mn("CTX",void 0,j),pendingPermissionsPreCheck:[null==Ja||null===(_=Ja.checkPermissions)||void 0===_?void 0:_.preCheckPermissions(v)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,u.A)(Na,this,void 0),Ea(v),ye(null===(M=v.meta)||void 0===M?void 0:M.functions,g),null==Ja||null===(F=Ja.flowApi)||void 0===F||F.collectContract(null===(N=v.meta)||void 0===N?void 0:N.contracts);var D,$=!1,H=[];try{var q={};if(D=yield oa(C,function(e){if(window.parent===window)return e;var t=e,r=(0,A.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)];var n=(0,A.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)]}(v.routes),V,j,[],q),U.bailout(D))return;H=fa(V),yield va(D,V,H),q.child=D.menuRequestNode,j.setInitialMenuRequestNode(q),yield U.mergeMenus(j.getMenuRequests())}catch(e){console.error("Router failed:",e);var W=U.catch(e,C);if(!W)return;({failed:$,output:D}=W)}if(C.child=D.node,T(),D.route&&"routes"!==D.route.type||$){if($||j.dispatchBeforePageLoad(),ae(),ue(),ka(null==g?void 0:g.uiVersion),Mr(C),window.scrollTo(0,0),$)null==p||p({status:"failed"});else{for(var z of(j.dispatchPageLoad(),j.dispatchAnchorLoad(),j.dispatchOnMount(),j.initializeScrollIntoView(),j.initializeMediaChange(),j.initializeMessageDispatcher(),H))z.mountAsyncData();null==p||p({status:"ok",path:D.path,pageTitle:document.title})}return void K("rendered")}}else{if(!window.NO_AUTH_GUARD&&null!=Ja&&Ja.auth&&!Ja.auth.isLoggedIn())return void I();T()}ae(),ue();var G={tag:Lr.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:C};C.child=G,Mr(C),window.scrollTo(0,0),null==p||p({status:"not-found"}),K("rendered")})),Wa.apply(this,arguments)}var Ka,za,Ga,Ja,Ya="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null,Qa=r(3999);function Xa(e){var t=[];if(["light","dark"].forEach((r=>{if(e[r])switch(e.type){case"brandColor":t.push((0,Qa.LP)(r,e[r]));break;case"baseColors":t.push((0,Qa.eC)(r,e[r],e.backgroundColor));break;case"variables":t.push((0,Qa.Gb)(r,e[r]))}})),t.length>0){var r=document.createElement("style");return r.textContent=t.join("\n\n"),document.head.appendChild(r),()=>{r.remove()}}}function Za(e){if(Ka)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{var{data:t}=e;if((null==t?void 0:t.source)===$){var r=t.payload;switch(null==r?void 0:r.type){case H:W=r.active;break;case q:V=r.panel}}})),Ja=null==e?void 0:e.hooks,(0,p.initializeI18n)(zt,Gt),h.locale(p.i18n.language),p.i18n.on("languageChanged",(()=>{h.locale(p.i18n.language)})),C(),Ka=new ao}var eo=function(){var e=x();if(e)return function(){return new Proxy(e.getRuntime(),{get(){switch(arguments.length<=1?void 0:arguments[1]){case"getCurrentApp":case"getRecentApps":case"hasInstalledApp":case"getDesktops":case"getLaunchpadSettings":case"getLaunchpadSiteMap":case"toggleLaunchpadEffect":case"applyPageTitle":case"getNavConfig":case"getFeatureFlags":case"getMiscSettings":case"getBrandSettings":return Reflect.get(...arguments)}}})}}()||function(){return Ka},to=new WeakMap,ro=new WeakMap,no=new WeakSet;class ao{constructor(){(0,i.A)(this,no),(0,l.A)(this,to,!1),(0,l.A)(this,ro,!1),(0,s.A)(this,"version",3)}initialize(e){var t;if((0,d.A)(to,this))throw new Error("The runtime cannot be initialized more than once");(0,u.A)(to,this,!0),function(e){(0,v.isObject)(e.settings)&&(0,v.deepFreeze)(e.settings),e.brickPackages&&(0,v.deepFreeze)(e.brickPackages)}(e),za=e;var r,{notification:n,dialog:o}=(0,c.A)(no,this,oo).call(this);!1!==n&&(r=null!=n?n:"basic.show-notification",(0,this.loadBricks)([r]).then((()=>{er=document.createElement(r)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==o&&function(e,t){t([e]).then((()=>{Nt=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=o?o:"basic.show-dialog",this.loadBricks),function(e){e&&(e.brandColor?Xa((0,a.A)({type:"brandColor"},e.brandColor)):e.baseColors?Xa((0,a.A)({type:"baseColors"},e.baseColors)):e.variables&&Xa((0,a.A)({type:"variables"},e.variables)))}(null===(t=e.settings)||void 0===t||null===(t=t.misc)||void 0===t?void 0:t.theme)}bootstrap(e){var t=this;return(0,o.A)((function*(){if(e&&t.initialize(e),(0,d.A)(ro,t))throw new Error("The runtime cannot be bootstrapped more than once");(0,u.A)(ro,t,!0),Ga=new ja(za.storyboards),yield Ga.bootstrap()}))()}getRecentApps(){var e,t;return null!==(e=null===(t=Ga)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=Ga)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return Ve(e,t)}getFeatureFlags(){var e,t;return(0,a.A)((0,a.A)((0,a.A)({},null===(e=za)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags),null===(t=Ga)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.featureFlags),{},{"migrate-to-brick-next-v3":!0})}getMiscSettings(){var e,t;return(0,a.A)((0,a.A)({},null===(e=za)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc),null===(t=Ga)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.misc)}getBrandSettings(){var e;return(0,a.A)({base_title:"DevOps 管理专家"},null===(e=za)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand)}getLaunchpadSettings(){var e;return(0,a.A)({columns:7,rows:4},null===(e=za)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=za)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=za)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t=this.getBrandSettings().base_title;document.title=e?"".concat(e," - ").concat(t):t}getNavConfig(){var e;return null===(e=Ga)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,f.loadBricksImperatively)(e,io())}}function oo(){var e,t;return null!==(e=null===(t=za)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.presetBricks)&&void 0!==e?e:{}}function io(){var e,t,r,n;return null!==(e=null!==(t=null!==(r=function(e,t){if(null==t||!t.length)return e;var r=new Map;return[...e,...t].forEach((e=>{var t=e.filePath.split("/")[1];r.set(t,e)})),Array.from(r.values())}(null===(n=za)||void 0===n?void 0:n.brickPackages,window.PUBLIC_DEPS))&&void 0!==r?r:Ya)&&void 0!==t?t:window.STANDALONE_BRICK_PACKAGES)&&void 0!==e?e:[]}function so(){var e;return null===(e=Ga)||void 0===e?void 0:e.getRenderId()}function lo(){var e;return null===(e=Ga)||void 0===e?void 0:e.getRuntimeContext()}function co(e){var t;return null===(t=za)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function uo(e){var t;return null===(t=co(e))||void 0===t?void 0:t.app}function po(){for(var e,t,r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];null==Ja||null===(e=Ja.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...n)}function fo(){var e;return null==Ja||null===(e=Ja.auth)||void 0===e?void 0:e.getAuth()}function vo(){var e,t;return null==Ja||null===(e=Ja.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function ho(){var e;return null==Ja||null===(e=Ja.auth)||void 0===e?void 0:e.isLoggedIn()}function mo(e,t,r){return go.apply(this,arguments)}function go(){return(go=(0,o.A)((function*(e,t,r){return Qe(yield He(e),e,"resolve",t,r)}))).apply(this,arguments)}function yo(e){var t,{portal:r,scope:n="fragment",unknownBricks:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r;t=r||(()=>((i=document.createElement("div")).style.position="absolute",i.style.width=i.style.height="0",document.body.append(i),i));var s,l,c=!1;return{render(r){var u=arguments;return(0,o.A)((function*(){var{theme:o,uiVersion:d,context:p,functions:f,templates:v,i18n:h,url:m,app:g}=u.length>1&&void 0!==u[1]?u[1]:{};if(c)throw new Error("The root is unmounted and cannot be rendered any more");var y=[].concat(r),b=s,E=(0,A.uniqueId)("render-id-");s=new Gr(n,{unknownBricks:a,renderId:E});var w={ctxStore:new Mn("CTX",void 0,s),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map};if(m){var S=new URL(m);w.query=S.searchParams,w.location={pathname:S.pathname,search:S.search,hash:S.hash,state:void 0}}var k={tag:Lr.ROOT,container:e,createPortal:t};if("page"===n){var I,P;te(null!=o?o:"light"),le("default"),ka(d),null!==(I=g)&&void 0!==I||(g={id:"demo",homepage:"/demo"}),w.app=g;var x={app:g,meta:{i18n:h,customTemplates:v}};null===(P=l)||void 0===P||P(),l=N(x),Ea(x),ye(f,g)}w.ctxStore.define(p,w);var C,O=!1,R=[];try{C=yield sa(k,y,w,s,[],{}),R=fa(w),yield va(C,w,R)}catch(e){O=!0,C={node:{tag:Lr.BRICK,type:"div",properties:{textContent:Qt(e)},return:k,runtimeContext:null},blockingList:[]}}if(k.child=C.node,null==b||b.dispatchOnUnmount(),null==b||b.dispose(),_r(e),i&&_r(i),"page"===n&&(O||s.dispatchBeforePageLoad(),ae(),ue()),Mr(k),"page"===n&&window.scrollTo(0,0),!O){for(var T of R)T.mountAsyncData();"page"===n&&s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange(),s.initializeMessageDispatcher()}}))()},unmount(){c||(c=!0,_r(e),i&&(_r(i),r||i.remove()))}}}function Ao(e){var{useRealTimeQuery:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,a.A)({},lo());t&&(r.query=new URLSearchParams(O().location.search));var n=t=>{if("string"==typeof t){if((0,T.isEvaluable)(t)){var a=st(t,r);return Ke(a),a}return(0,L.inject)(t,r)}return!(0,v.isObject)(t)||ze(e)?t:Array.isArray(t)?t.map((e=>n(e))):Object.fromEntries(Object.entries(t).map((e=>{var[t,r]=e;return[n(t),n(r)]})))};return n(e)}},2561:(e,t,r)=>{r.r(t),r.d(t,{supply:()=>s});var n=r(9740),a=r(1030),o=r(1302),i=r(6049);function s(e,t,r){var a=(0,n.A)({},t);for(var o of(a[void 0]=void 0,e))if(!Object.prototype.hasOwnProperty.call(a,o)){var i=d(o,r);void 0!==i&&(a[o]=i)}return a}var l=new Set(["fill","pull","pullAll","pullAllBy","pullAllWith","pullAt","remove","reverse","assign","assignIn","assignInWith","assignWith","defaults","defaultsDeep","merge","mergeWith","set","setWith","unset","update","updateWith","after","ary","before","bind","bindKey","curry","curryRight","debounce","defer","delay","flip","memoize","negate","once","overArgs","partial","partialRight","rearg","rest","spread","throttle","unary","wrap"]),c=new Set(["lang","langData","locale","localeData","defineLocale","updateLocale","updateOffset"]),u=new Set(["Array","Boolean","Date","Infinity","JSON","Math","NaN","Number","String","RegExp","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","isFinite","isNaN","parseFloat","parseInt","Map","Set","URLSearchParams","WeakMap","WeakSet","atob","btoa"]);function d(e,t){switch(e){case"Object":return r=Object,n=["entries","fromEntries","keys","values"],Object.fromEntries(n.map((e=>[e,function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return r[e].apply(r,n)}])));case"_":return Object.fromEntries(Object.entries(a).filter((e=>!l.has(e[0]))).concat(t?[["uniqueId",e=>"".concat(null!=e?e:"","42")]]:[]));case"moment":return Object.assign((function(){return o(...arguments)}),Object.fromEntries(Object.entries(o).filter((e=>!c.has(e[0])))));case"PIPES":return i.pipes;case"TAG_URL":return p(!0);case"SAFE_TAG_URL":return p();default:if(u.has(e))return window[e]}var r,n}function p(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];var o=[];return t.forEach(((t,r)=>{o.push(t),r<n.length&&o.push(e?String(n[r]).replace(/[^/]+/g,(e=>encodeURIComponent(e))):encodeURIComponent(String(n[r])))})),o.join("")}}},916:(e,t,r)=>{r.r(t),r.d(t,{JsonStorage:()=>m,createProviderClass:()=>o,createSSEStream:()=>u,deepFreeze:()=>f,hasOwnProperty:()=>v,isObject:()=>h,unwrapProvider:()=>y});var n=r(6330),a=r(5060);function o(e){return class extends HTMLElement{get $$typeof(){return"provider"}resolve(){return e(...arguments)}saveAs(t){var r=arguments;return(0,n.A)((function*(){for(var n=r.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=r[i];var s=yield e(...o);(0,a.saveAs)(s,t)}))()}}}var i=r(9740),s=r(4223),l=r(2110),c=["converter"];function u(e,t){return d.apply(this,arguments)}function d(){return(d=(0,n.A)((function*(e,t){var r=[],a=[],o=!1,u=!1,d=null!=t?t:{},{converter:f}=d,v=(0,s.A)(d,c);function h(){a.forEach((e=>{var[t]=e;return t({value:void 0,done:!0})}))}function m(){o=!0,a.length=0,r.length=0}return yield new Promise(((t,o)=>{(0,l.y)(e,(0,i.A)((0,i.A)({},v),{},{openWhenHidden:!0,onopen:e=>(0,n.A)((function*(){if(!e.ok)throw console.error("open error",e.statusText),new Error(e.statusText);t(null)}))(),onmessage(e){var t,n,o=!0;try{t=(null!=f?f:p)(e.data)}catch(e){o=!1,n=e}if(a.length>0){var[i,s]=a.shift();o?i(t):s(n)}else r.push(o?{ok:!0,data:t}:{ok:!1,reason:n})},onclose(){u=!0,h()},onerror(e){throw e}})).catch((e=>{o(e),function(e){a.forEach((t=>{var[r,n]=t;return n(e)})),m()}(e)}))})),{next(){return o?this.return():new Promise(((e,t)=>{if(r.length>0){var n=r.shift();n.ok?e(n.data):t(n.reason)}else u?(m(),e({value:void 0,done:!0})):a.push([e,t])}))},return:()=>(h(),m(),Promise.resolve({value:void 0,done:!0})),throw:e=>(h(),m(),Promise.reject(e)),[Symbol.asyncIterator](){return this}}}))).apply(this,arguments)}function p(e){if("[DONE]"===e)return{value:void 0,done:!0};if(e.startsWith("[ERROR]"))throw console.error("Received error message:",e),new Error(e);try{return{value:JSON.parse(e),done:!1}}catch(t){throw console.error("Failed to parse message:",e),t}}function f(e){var t=Object.getOwnPropertyNames(e);for(var r of t){var n=e[r];n&&"object"==typeof n&&f(n)}return Object.freeze(e)}function v(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}class m{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"brick-next-";this.storage=e,this.prefix=t}setItem(e,t){this.storage.setItem(this.prefix+e,JSON.stringify(t))}getItem(e){var t;return JSON.parse(null!==(t=this.storage.getItem(this.prefix+e))&&void 0!==t?t:"null")}removeItem(e){return this.storage.removeItem(this.prefix+e)}clear(){return this.storage.clear()}}var g=new Map;function y(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=function(e){var t=g.get(e);return t||(t=document.createElement(e),g.set(e,t),t)}(e);return a.resolve(...r)}}},5177:(e,t,r)=>{function n(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(a,o){if("string"==typeof t?a.name===t:t.includes(a.name)){for(var i=[],s=1;s<=r;s++){var l=o[o.length-s];if("MemberExpression"===(null==l?void 0:l.node.type)&&"object"===l.key){var c=l.node;c.computed||"Identifier"!==c.property.type?c.computed&&"Literal"===c.property.type&&"string"==typeof c.property.value?i.push(n?"".concat(a.name,".").concat(c.property.value):c.property.value):e.hasNonStaticUsage=!0:i.push(n?"".concat(a.name,".").concat(c.property.name):c.property.name)}else e.hasNonStaticUsage=!0}i.length===r&&e.usedProperties.add(i.join("."))}}}function a(e,t){return function(r,n,a){if(n.name===e){var o=a[a.length-1],i=a[a.length-2];if("CallExpression"===(null==i?void 0:i.node.type)&&"callee"===(null==i?void 0:i.key)&&"MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key&&(o.node.computed?"Literal"===o.node.property.type&&o.node.property.value===t:"Identifier"===o.node.property.type&&o.node.property.name===t)){var s=i.node.arguments;if(s.length>0){var l=s[0];"Literal"===l.type&&"string"==typeof l.value?r.usedArgs.add(l.value):r.hasNonStaticUsage=!0}}}}}r.r(t),r.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>o,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>d,collectMemberUsageInFunction:()=>m,createProviderClass:()=>l.createProviderClass,scanPermissionActionsInAny:()=>b,scanPermissionActionsInStoryboard:()=>A,strictCollectMemberUsage:()=>u,track:()=>p,trackAll:()=>f,traverseStoryboardExpressions:()=>c,traverseStoryboardFunction:()=>h,traverseStoryboardFunctions:()=>v,unwrapProvider:()=>l.unwrapProvider});var o=a("APP","getMenu"),i=a("INSTALLED_APPS","has"),s=r(9884),l=r(825);function c(e,t,r){var n=new WeakSet,{matchExpressionString:a,visitNotMatchedExpressionString:o,visitNonExpressionString:i,visitObject:c}="string"==typeof r?{matchExpressionString:e=>e.includes(r)}:r;!function e(r){if("string"==typeof r)if((0,s.isEvaluable)(r))if(a(r))try{(0,s.preevaluate)(r,{withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,r)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==o||o(r);else null==i||i(r);else if((0,l.isObject)(r)){if(n.has(r))return;for(var u of(n.add(r),null==c||c(r),Array.isArray(r)?r:Object.values(r)))e(u)}}(e)}function u(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{hasNonStaticUsage:n,nonStaticUsage:a,usedProperties:o}=d(e,t,r);if(n)throw new Error("Non-static usage of ".concat(t,' is prohibited, check your expression: "').concat(a,'"'));return o}function d(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a={usedProperties:new Set,hasNonStaticUsage:!1},o=n(a,t,r);return c(e,((e,t,r)=>{o(e,t),a.hasNonStaticUsage&&(a.nonStaticUsage=r)}),t),a}function p(e,t,r){if(e.includes(t)){var a,o={usedProperties:new Set,hasNonStaticUsage:!1},{expression:i}=(0,s.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal:n(o,r)}});if("SequenceExpression"===i.type&&(a=i.expressions[0])&&"Literal"===a.type&&a.value===t){if(o.usedProperties.size>0)return o.usedProperties;console.warn('You are using "'.concat(t,'" but no `').concat(r,"` usage found in your expression: ").concat(JSON.stringify(e)))}}return!1}function f(e){if(e){var t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,s.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal:n(t,["CTX","STATE","FORM_STATE"],1,!0)}}),t.usedProperties.size>0){var r=[...t.usedProperties],a={context:!1,state:!1,formState:!1},o={CTX:"context",STATE:"state",FORM_STATE:"formState"};return r.forEach((e=>{var[t,r]=e.split(".");a[o[t]]||(a[o[t]]=[]),a[o[t]].push(r)})),a}console.warn('You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: '.concat(JSON.stringify(e)))}return!1}function v(e,t){if(Array.isArray(e))for(var r of e)h(r,t)}function h(e,t,r){try{(0,s.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t}})}catch(t){r||console.error('Parse storyboard function "'.concat(e.name,'" failed:'),t)}}function m(e,t,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o={usedProperties:new Set,hasNonStaticUsage:!1};if(h(e,n(o,t,a),r),o.hasNonStaticUsage&&!r)throw new Error("Non-static usage of ".concat(t,' is prohibited, check your function: "').concat(e.name,'"'));return o.usedProperties.delete(e.name),o.usedProperties}var g="PERMISSIONS",y="check";function A(e){var t,r=new Set,n=E(r),{customTemplates:a,functions:o}=null!==(t=e.meta)&&void 0!==t?t:{};return c([e.routes,a],n,g),v(o,n),Array.from(r)}function b(e){var t=new Set;return c(e,E(t),g),Array.from(t)}function E(e){return function(t,r){if(t.name===g){var n=r[r.length-1],a=r[r.length-2];if("CallExpression"===(null==a?void 0:a.node.type)&&"callee"===(null==a?void 0:a.key)&&"MemberExpression"===(null==n?void 0:n.node.type)&&"object"===n.key&&(n.node.computed?"Literal"===n.node.property.type&&n.node.property.value===y:"Identifier"===n.node.property.type&&n.node.property.name===y))for(var o of a.node.arguments)"Literal"===o.type&&"string"==typeof o.value&&e.add(o.value)}}}}}]);
|
|
2
|
-
//# sourceMappingURL=core.5ecf565a.js.map
|