@next-bricks/ai-portal 0.46.2 → 0.46.3

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/bricks.json CHANGED
@@ -2,20 +2,20 @@
2
2
  "id": "bricks/ai-portal",
3
3
  "bricks": [
4
4
  "ai-portal.chat-box",
5
- "ai-portal.elevo-sidebar",
5
+ "ai-portal.stat-with-mini-chart",
6
6
  "ai-portal.home-container",
7
+ "ai-portal.cruise-canvas",
8
+ "ai-portal.elevo-sidebar",
7
9
  "ai-portal.icon-button",
8
10
  "ai-portal.show-cases",
9
11
  "ai-portal.mcp-tools",
10
- "ai-portal.chat-stream",
11
- "ai-portal.cruise-canvas",
12
12
  "ai-portal.ai-employees",
13
- "ai-portal.call-tool",
14
13
  "ai-portal.ai-agents",
14
+ "ai-portal.chat-stream",
15
+ "ai-portal.call-tool",
15
16
  "ai-portal.save-request-store",
16
17
  "ai-portal.load-request-store",
17
18
  "ai-portal.clear-request-store",
18
- "ai-portal.stat-with-mini-chart",
19
19
  "ai-portal.page-container",
20
20
  "ai-portal.tab-list",
21
21
  "ai-portal.dropdown-select",
@@ -25,8 +25,8 @@
25
25
  "ai-portal.project-conversations",
26
26
  "ai-portal.project-knowledges",
27
27
  "ai-portal.activity-timeline",
28
- "ai-portal.chat-input",
29
28
  "ai-portal.elevo-logo",
29
+ "ai-portal.chat-input",
30
30
  "ai-portal.show-case"
31
31
  ],
32
32
  "elements": [],
@@ -37,6 +37,24 @@
37
37
  "eo-icon",
38
38
  "eo-actions"
39
39
  ],
40
+ "ai-portal.stat-with-mini-chart": [
41
+ "eo-mini-line-chart"
42
+ ],
43
+ "ai-portal.cruise-canvas": [
44
+ "eo-icon",
45
+ "eo-button",
46
+ "eo-link",
47
+ "eo-tooltip",
48
+ "eo-popover",
49
+ "eo-drawer",
50
+ "ai-portal.icon-button",
51
+ "ai-portal.chat-input",
52
+ "ai-portal.show-case",
53
+ "basic.show-dialog",
54
+ "basic.copy-to-clipboard",
55
+ "eo-easyops-avatar",
56
+ "eo-avatar"
57
+ ],
40
58
  "ai-portal.elevo-sidebar": [
41
59
  "ai-portal.elevo-logo",
42
60
  "eo-icon",
@@ -58,20 +76,16 @@
58
76
  "eo-icon",
59
77
  "ai-portal.tab-list"
60
78
  ],
61
- "ai-portal.chat-stream": [
62
- "eo-icon",
63
- "eo-button",
79
+ "ai-portal.ai-employees": [
64
80
  "eo-link",
65
- "eo-tooltip",
66
- "eo-popover",
67
- "eo-drawer",
68
- "ai-portal.icon-button",
69
- "ai-portal.chat-input",
70
- "ai-portal.show-case",
71
- "basic.show-dialog",
72
- "basic.copy-to-clipboard"
81
+ "eo-icon",
82
+ "ai-portal.tab-list"
73
83
  ],
74
- "ai-portal.cruise-canvas": [
84
+ "ai-portal.ai-agents": [
85
+ "eo-icon",
86
+ "eo-link"
87
+ ],
88
+ "ai-portal.chat-stream": [
75
89
  "eo-icon",
76
90
  "eo-button",
77
91
  "eo-link",
@@ -82,21 +96,7 @@
82
96
  "ai-portal.chat-input",
83
97
  "ai-portal.show-case",
84
98
  "basic.show-dialog",
85
- "basic.copy-to-clipboard",
86
- "eo-easyops-avatar",
87
- "eo-avatar"
88
- ],
89
- "ai-portal.ai-employees": [
90
- "eo-link",
91
- "eo-icon",
92
- "ai-portal.tab-list"
93
- ],
94
- "ai-portal.ai-agents": [
95
- "eo-icon",
96
- "eo-link"
97
- ],
98
- "ai-portal.stat-with-mini-chart": [
99
- "eo-mini-line-chart"
99
+ "basic.copy-to-clipboard"
100
100
  ],
101
101
  "ai-portal.page-container": [
102
102
  "eo-link"
@@ -150,5 +150,5 @@
150
150
  "eo-link"
151
151
  ]
152
152
  },
153
- "filePath": "bricks/ai-portal/dist/index.0ebd0c2a.js"
153
+ "filePath": "bricks/ai-portal/dist/index.56b83bc9.js"
154
154
  }
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var e,r,t,n,s,o,i,a,p,l,u,c,d,m,f,y,g,h,v,x={9474:(e,r,t)=>{var n=t(40580),s=t(58135);const o=/^<%=?\s/,i=/\s%>$/;function a(e){let r=null;return s.traverse(e,{enter(e,t){var n;!r&&(s.isFunctionExpression(e)||s.isStatement(e)||s.isJSX(e)||s.isArrowFunctionExpression(e)&&(s.isBlockStatement(e.body)||s.isObjectProperty(null===(n=t[t.length-1])||void 0===n?void 0:n.node)))&&(r=e)}}),r}function p(e){return s.isNullLiteral(e)||s.isIdentifier(e)&&"undefined"===e.name}function l(e){let r=!1;return s.traverse(e,{enter(e){r||!s.isJSXElement(e)&&!s.isJSXFragment(e)||(r=!0)}}),r}function u(e){return e.slice(2).replace(/([a-z])([A-Z])/g,"$1.$2").toLowerCase()}var c=t(71321);function d(e,r){return f(e,new Map([...r.templateCollection?r.templateCollection.identifiers.map((e=>[e,`STATE.${e}`])):r.contexts.map((e=>[e,`CTX.${e}`])),...r.functionNames.map((e=>[e,`FN.${e}`]))]))}function m(e,r,t){return function(e,r){if(null==r||!r.size)return e;if([...r.keys()].some((r=>e.includes(r)))){const t=[];let n;try{n=(0,c.precookFunction)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,n){if(r.has(e.name)){var s;const r=null===(s=n[n.length-1])||void 0===s?void 0:s.node;let o;r&&"Property"===r.type&&!r.computed&&r.shorthand&&(o=!0),t.push({id:e,shorthand:o})}}}})}catch(e){console.error("Parse function failed:",e)}if(t.length>0&&n){const n=[];let s=0;for(let o=0;o<t.length;o++){const{id:i,shorthand:a}=t[o],{name:p,start:l,end:u}=i;n.push(e.substring(s,l),`${a?`${p}: `:""}${r.get(p)}`),s=u}return n.push(e.substring(s)),n.join("")}}return e}(e,new Map(r.functionNames.filter((e=>e!==t)).map((e=>[e,`FN.${e}`]))))}function f(e,r){if(null==r||!r.size)return e;if([...r.keys()].some((r=>e.includes(r)))){const t=[];let n;try{n=(0,c.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,n){if(r.has(e.name)){var s;const r=null===(s=n[n.length-1])||void 0===s?void 0:s.node;let o;r&&"Property"===r.type&&!r.computed&&r.shorthand&&(o=!0),t.push({id:e,shorthand:o})}}}})}catch(e){console.error("Parse expression failed:",e)}if(t.length>0&&n){const{prefix:e,source:s,suffix:o}=n,i=[];let a=0;for(let e=0;e<t.length;e++){const{id:n,shorthand:o}=t[e],{name:p,start:l,end:u}=n;i.push(s.substring(a,l),`${o?`${p}: `:""}${r.get(p)}`),a=u}return i.push(s.substring(a)),`${e}${i.join("")}${o}`}}return e}const y={callApi:[2,3],callHttp:[1,2],callTool:[2,3]};function g(e,r,t,n){if(!s.isCallExpression(e)&&!s.isOptionalCallExpression(e))return r.errors.push({message:`Await expression must be a call expression, received ${e.type}`,node:e,severity:"error"}),null;const{callee:a}=e;let l;if(!s.isIdentifier(a))return r.errors.push({message:`Await expression must call an identifier, received ${a.type}`,node:a,severity:"error"}),null;if(l=a.name,"callApi"!==l&&"callHttp"!==l&&"callTool"!==l)return r.errors.push({message:`Await expression must call "callApi", "callHttp" or "callTool", received "${l}"`,node:a,severity:"error"}),null;const u=y[l],c=e.arguments.length<u[0];if((c||!u.includes(e.arguments.length))&&(r.errors.push({message:`"${l}()" expects ${u.join(" or ")} arguments, but got ${e.arguments.length}`,node:e,severity:c?"error":"warning"}),c))return null;let d;const m=e.arguments[0];if("callHttp"===l){const e=S(m,r,{...n,allowExpression:!0});if("string"!=typeof e)return r.errors.push({message:`"${l}()" expects a string value as the first argument, but got ${typeof e}`,node:m,severity:"error"}),null;d={api:e,http:!0}}else if("callApi"===l){if(!s.isStringLiteral(m))return r.errors.push({message:`"${l}()" expects a string literal as the first argument, but got ${m.type}`,node:m,severity:"error"}),null;d={api:m.value}}else{const t=S(m,r,{...n,allowExpression:!0});if("string"!=typeof t)return r.errors.push({message:`"${l}()" expects a string value as the first argument, but got ${typeof t}`,node:m,severity:"error"}),null;const s=e.arguments[1],o=S(s,r,{...n,allowExpression:!0});if("string"!=typeof o)return r.errors.push({message:`"${l}()" expects a string value as the second argument, but got ${typeof o}`,node:s,severity:"error"}),null;const i=e.arguments[2];let a;i&&(a=S(i,r,{...n,allowExpression:!0})),d={api:l,tool:{conversationId:t,stepId:o},params:a}}if("callApi"===l||"callHttp"===l){const a=e.arguments[1];if(a&&!p(a)){s.isObjectExpression(a)||r.errors.push({message:`Data source "params" prefers an object literal, but got ${a.type}`,node:a,severity:"notice"});const e=S(a,r,{...n,allowExpression:!0});(function(e){if("string"!=typeof e)return!1;const r=e.trim();return o.test(r)&&i.test(r)})(e)||"object"==typeof e&&null!==e?d.params=e:r.errors.push({message:"API params expects an object or expression, but got "+typeof e,node:a,severity:"error"}),null!=t&&t.reward&&(d.ambiguousParams=S(a,{...r,errors:[]},{allowExpression:!0,ambiguous:!0}))}}if("callApi"===l){const t=e.arguments[2];if(t&&!p(t))if(s.isObjectExpression(t))for(const e of t.properties){if(!s.isObjectProperty(e)){r.errors.push({message:`"callApi()" third param "meta" expects object properties, but got ${e.type}`,node:e,severity:"error"});continue}const t=e.key;if(!s.isIdentifier(t)){r.errors.push({message:`"callApi()" third param "meta" property key must be an identifier, but got ${t.type}`,node:t,severity:"error"});continue}if("objectId"!==t.name){r.errors.push({message:`"callApi()" third param "meta" property key must be "objectId", but got "${t.name}"`,node:t,severity:"error"});continue}const n=e.value;if(!p(n)){if(!s.isStringLiteral(n)){r.errors.push({message:`"callApi()" third param "meta" property "${t.name}" expects a string literal, but got ${n.type}`,node:n,severity:"error"});continue}d.objectId=n.value}}else r.errors.push({message:`"callApi()" third param "meta" expects an object literal, but got ${t.type}`,node:t,severity:"error"})}return d}function h(e,r,t,n,o){var i;if(!s.isArrowFunctionExpression(e))return r.errors.push({message:`Expected arrow function expression as event handler, but got ${e.type}`,node:e,severity:"error"}),null;if(e.params.length>1)return r.errors.push({message:`Event handler expects 0 or 1 parameter, but got ${e.params.length}`,node:e,severity:"error"}),null;const a=new Map(null!==(i=null==n?void 0:n.replacePatterns)&&void 0!==i?i:[]),p=e.params[0];if(p){if(!s.isIdentifier(p))return r.errors.push({message:`Event handler parameter expects an identifier, but got ${p.type}`,node:p,severity:"error"}),null;const e=p.name;a.set(e,o?"EVENT.detail":"EVENT"),r.contexts.includes(e)&&r.errors.push({message:`Event handler parameter "${e}" conflicts with existing global variables`,node:p,severity:"error"})}if(!s.isBlockStatement(e.body))return r.errors.push({message:`Event handler body expects a block statement, but got ${e.body.type}`,node:e.body,severity:"error"}),null;const l=[];for(const o of e.body.body)if(s.isExpressionStatement(o))if(s.isAssignmentExpression(o.expression)){const{left:e,right:t}=o.expression;if(!s.isIdentifier(e)){r.errors.push({message:`Assignment in event handler expects an identifier on the left side, but got ${e.type}`,node:e,severity:"error"});continue}const i=S(t,r,{...n,allowExpression:!0,replacePatterns:a});l.push({action:"update_variable",payload:{name:e.name,value:i}})}else if(s.isCallExpression(o.expression)||s.isOptionalCallExpression(o.expression)){const{callee:e,arguments:i}=o.expression;if(s.isMemberExpression(e)||s.isOptionalMemberExpression(e)){if(!s.isCallExpression(e.object)){r.errors.push({message:`Member expression in event handler expects a call expression as object, but got ${e.object.type}`,node:e.object,severity:"error"});continue}if(!s.isIdentifier(e.object.callee)){r.errors.push({message:`Member expression in event handler expects an identifier as callee, but got ${e.object.callee.type}`,node:e.object.callee,severity:"error"});continue}if(!s.isIdentifier(e.property)){r.errors.push({message:`Member expression in event handler expects an identifier as property, but got ${e.property.type}`,node:e.property,severity:"error"});continue}const p=e.object.callee.name,u=e.object.arguments;if("getComponent"===p){if(2!==u.length){r.errors.push({message:`"getComponent()" expects 2 arguments, but got ${u.length}`,node:o.expression,severity:"error"});continue}const t=u[0];if(!s.isStringLiteral(t)){r.errors.push({message:`"getComponent()" expects a string literal as its first argument, but got ${t.type}`,node:t,severity:"error"});continue}const n=u[1];if(!s.isStringLiteral(n)){r.errors.push({message:`"getComponent()" expects a string literal as its second argument, but got ${n.type}`,node:n,severity:"error"});continue}l.push({action:"call_component",payload:{componentId:n.value,method:e.property.name,args:i.map((e=>S(e,r,{allowExpression:!0,replacePatterns:a})))}})}else if("callApi"===p||"callHttp"===p){if("then"!==e.property.name){r.errors.push({message:`"${p}()" expects "then" as its method, but got ${e.property.name}`,node:e.property,severity:"error"});continue}if(1!==i.length){r.errors.push({message:`"${p}().then()" expects exactly 1 argument, but got ${i.length}`,node:o.expression,severity:"error"});continue}const s=g(e.object,r,t,{replacePatterns:a});if(!s)continue;r.contracts.add(s.api);const u=h(i[0],r,t,n,!0);l.push({action:"call_api",payload:s,callback:u?{success:u}:void 0})}else r.errors.push({message:`Unsupported action in event handler: ${p}`,node:e.object.callee,severity:"error"});continue}if(!s.isIdentifier(e)){r.errors.push({message:`Call expression in event handler expects an identifier as callee, but got ${e.type}`,node:e,severity:"error"});continue}if(r.templateCollection){if(r.templateCollection.setters.has(e.name)){const t=i[0];l.push({action:"update_variable",payload:{scope:"template",name:r.templateCollection.setters.get(e.name),value:void 0===t?void 0:S(t,r,{allowExpression:!0,replacePatterns:a})}}),1!==i.length&&r.errors.push({message:`State setter expects exactly 1 argument, but got ${i.length}`,node:i[1],severity:"error"});continue}}else if(r.contextSetters.has(e.name)){const t=i[0];l.push({action:"update_variable",payload:{name:r.contextSetters.get(e.name),value:void 0===t?void 0:S(t,r,{allowExpression:!0,replacePatterns:a})}}),1!==i.length&&r.errors.push({message:`State setter expects exactly 1 argument, but got ${i.length}`,node:i[1],severity:"error"});continue}if("showMessage"===e.name){if(1!==i.length){r.errors.push({message:`"showMessage()" expects 1 argument, but got ${i.length}`,node:o.expression,severity:"error"});continue}const e=S(i[0],r,{allowExpression:!0,replacePatterns:a});l.push({action:"show_message",payload:e})}else if("refresh"===e.name){if(1!==i.length){r.errors.push({message:`"refresh()" expects 1 argument, but got ${i.length}`,node:o.expression,severity:"error"});continue}if(!s.isIdentifier(i[0])){r.errors.push({message:`"refresh()" expects an identifier as its argument, but got ${i[0].type}`,node:i[0],severity:"error"});continue}l.push({action:"refresh_data_source",payload:{name:i[0].name}})}else if("callApi"===e.name||"callHttp"===e.name){const e=g(o.expression,r,t,{replacePatterns:a});if(!e)continue;r.contracts.add(e.api),l.push({action:"call_api",payload:e})}else r.errors.push({message:`Unsupported action in event handler: ${e.name}`,node:e,severity:"error"})}else r.errors.push({message:`Unsupported event handler expression: ${o.expression.type}`,node:o.expression,severity:"error"});else r.errors.push({message:`Unsupported event handler statement: ${o.type}`,node:o,severity:"error"});return l}function v(e,r,t,n){if(s.isJSXElement(e)){if(!s.isJSXIdentifier(e.openingElement.name))return r.errors.push({message:`Expected JSXIdentifier, but got ${e.openingElement.name.type}`,node:e.openingElement.name,severity:"error"}),null;const a=e.openingElement.name.name;if("Fragment"===a){for(const t of e.openingElement.attributes)s.isJSXAttribute(t)&&s.isJSXIdentifier(t.name)&&"key"===t.name.name||r.errors.push({message:"Invalid attribute for Fragment",node:t,severity:"error"});return e.children.flatMap((e=>v(e,r,t,n)))}const l={},m={};let f,y;for(const a of e.openingElement.attributes){if(s.isJSXSpreadAttribute(a)){r.errors.push({message:"Spread attributes are not supported in component",node:a,severity:"error"});continue}if(!s.isJSXIdentifier(a.name)){r.errors.push({message:`Expected JSXIdentifier, but got ${a.name.type}`,node:a.name,severity:"error"});continue}const e=a.name.name;if(/^on[A-Z]/.test(e)){var o;if(!s.isJSXExpressionContainer(a.value)){var i,p;r.errors.push({message:`Event handler "${e}" expects a JSXExpressionContainer, but got ${null===(i=a.value)||void 0===i?void 0:i.type}`,node:null!==(p=a.value)&&void 0!==p?p:a,severity:"error"});continue}if(s.isJSXEmptyExpression(a.value.expression)){r.errors.push({message:"Empty expression in events is not allowed",node:a.value,severity:"warning"});continue}const n=a.value.expression;let l=null;l=s.isIdentifier(n)&&null!==(o=r.templateCollection)&&void 0!==o&&o.events.includes(n.name)?[{action:"dispatch_event",payload:{type:u(n.name),detail:"<% EVENT.detail %>"}}]:h(n,r,t),l&&(null!=f||(f={}),f[u(e)]=l)}else if("componentId"===e){if(!s.isStringLiteral(a.value)){var c,d;r.errors.push({message:`"componentId" attribute in component expects a string literal, but got ${null===(c=a.value)||void 0===c?void 0:c.type}`,node:null!==(d=a.value)&&void 0!==d?d:a,severity:"error"});continue}y=a.value.value}else if(null==a.value)l[e]=!0;else if(s.isStringLiteral(a.value))l[e]=a.value.value,m[e]=a.value.value;else if(s.isJSXExpressionContainer(a.value)){if(s.isJSXEmptyExpression(a.value.expression)){r.errors.push({message:`Empty expression in JSX attribute "${e}" is not allowed`,node:a.value,severity:"warning"});continue}l[e]=w(a.value.expression,r,{...n,allowExpression:!0,allowUseBrick:!0,modifier:"="}),null!=t&&t.reward&&(m[e]=S(a.value.expression,{...r,errors:[]},{allowExpression:!0,ambiguous:!0}))}else r.errors.push({message:`Unsupported attribute value type in component: ${a.value.type}`,node:a.value,severity:"error"})}const{textContent:g,children:b}=x(e.children,r,t,n);g&&(l.textContent=g);const $={name:a,componentId:y,properties:l,events:f,children:b};return null!=t&&t.reward&&($.ambiguousProps=m),y&&(r.componentsMap.has(y)?r.errors.push({message:`Duplicated componentId "${y}" found`,node:e,severity:"error"}):r.componentsMap.set(y,$)),{type:"component",component:$}}if(s.isJSXFragment(e))return e.children.flatMap((e=>v(e,r,t,n)));if(s.isJSXText(e))return e.value.trim()?{type:"text",text:e.value}:null;if(s.isJSXExpressionContainer(e))return v(e.expression,r,t,n);if(s.isJSXEmptyExpression(e))return null;if(s.isCallExpression(e)){const o=e.callee;if(s.isMemberExpression(o)&&s.isIdentifier(o.property)&&!o.computed&&"map"===o.property.name){const i=e.arguments;if(i.length>0){i.length>1&&r.errors.push({message:"Only one argument is allowed for map function",node:i[1],severity:"error"});const[e]=i;if(s.isArrowFunctionExpression(e)){if(s.isBlockStatement(e.body))return r.errors.push({message:"Block statement is not allowed in map function",node:e.body,severity:"error"}),null;if(l(e.body)){var m;const i=a(o.object);if(i)return r.errors.push({message:`Unsupported node type as the object of a map function with JSX element: ${i.type}`,node:i,severity:"error"}),null;if(e.params.length>2)return r.errors.push({message:"Only up to 2 parameters are allowed in map function with JSX element",node:e,severity:"error"}),null;const p=e.params.find((e=>!s.isIdentifier(e)));if(p)return r.errors.push({message:"Only identifier parameters are allowed in map function with JSX element",node:p,severity:"error"}),null;const l=new Map(null!==(m=null==n?void 0:n.replacePatterns)&&void 0!==m?m:[]);if(e.params.length>0){const[r,t]=e.params;l.set(r.name,"ITEM"),t&&l.set(t.name,"INDEX")}return{type:"component",component:{name:"ForEach",properties:{dataSource:w(o.object,r,{...n,modifier:"=",allowExpression:!0})},children:$([e.body],r,t,{...n,replacePatterns:l})}}}}}}}else if(s.isConditionalExpression(e)){const{test:s,consequent:o,alternate:i}=e;if(l(o)||l(i)){const e=a(s);return e?(r.errors.push({message:`Unsupported node type in conditional expression test: ${e.type}`,node:e,severity:"error"}),null):{type:"component",component:{name:"If",properties:{dataSource:w(s,r,{...n,modifier:"=",allowExpression:!0})},children:[...$([o],r,t,n),...$([i],r,t,n).map((e=>({...e,slot:"else"})))]}}}}else if(s.isLogicalExpression(e)){const{left:s,right:o,operator:i}=e;if(("&&"===i||"||"===i)&&l(o)){const i=a(s);if(i)return r.errors.push({message:`Unsupported node type in logical expression left: ${i.type}`,node:i,severity:"error"}),null;const p=$([o],r,t,n);return{type:"component",component:{name:"If",properties:{dataSource:w(s,r,{...n,modifier:"=",allowExpression:!0})},children:"&&"===e.operator?p:p.map((e=>({...e,slot:"else"})))}}}}if(s.isExpression(e)){const t=a(e);return t?(r.errors.push({message:`Unsupported node type in expression: ${t.type}`,node:t,severity:"error"}),null):{type:"expression",expression:e}}return r.errors.push({message:`Unsupported node type in component: ${e.type}`,node:e,severity:"error"}),null}function x(e,r,t,n){let s=e.flatMap((e=>v(e,r,t,n))),o=s.every((e=>"text"===(null==e?void 0:e.type)));if(!o){let e=null;const r=[];for(const t of s){if(null===t);else if("text"===t.type||"expression"===t.type){var i,a,p;if("text"===(null===(i=e)||void 0===i?void 0:i.type)||"expression"===(null===(a=e)||void 0===a?void 0:a.type)){e={type:"merged",children:[e,t]},r.splice(r.length-1,1,e);continue}if("merged"===(null===(p=e)||void 0===p?void 0:p.type)){e.children.push(t);continue}}e=t,r.push(t)}s=r,o=s.every((e=>"text"===(null==e?void 0:e.type)||"merged"===(null==e?void 0:e.type)&&e.children.every((e=>"text"===e.type))))}return o?{textContent:s.flatMap((e=>"text"===e.type?e.text:e.children.map((e=>e.text)))).join("").trim()}:s.every((e=>!!e&&"component"!==e.type))?{textContent:f(d(b(s.flatMap((e=>"merged"===e.type?e.children:e)),r.source),r),null==n?void 0:n.replacePatterns)}:{children:s.filter((e=>!!e)).map((e=>"component"===e.type?e.component:{name:"Plaintext",properties:{textContent:"text"===e.type?e.text:f(d("expression"===e.type?`<%= ${k(r.source,e.expression)} %>`:b(e.children,r.source),r),null==n?void 0:n.replacePatterns)}}))}}function b(e,r){return`<%= CTX.__builtin_fn_mergeTexts(${e.map((e=>"text"===e.type?JSON.stringify(e):`{type:"expression",value:(${k(r,e.expression)})}`)).join(", ")}) %>`}function $(e,r,t,n){const{textContent:s,children:o}=x(e,r,t,n);return null!=o?o:[{name:"Plaintext",properties:{textContent:s}}]}const E=Symbol("ambiguous");function S(e,r,t){if(s.isObjectExpression(e))return function(e,r,t){if(e.properties.some((e=>s.isSpreadElement(e)))&&t.allowExpression){const s=a(e);if(!s){var n;if(t.ambiguous)return E;const s=k(r.source,e);return f(d(`<%${null!==(n=t.modifier)&&void 0!==n?n:""} ${s} %>`,r),null==t?void 0:t.replacePatterns)}r.errors.push({message:`Unsupported node type: ${s.type}`,node:s,severity:"error"})}const o={};for(const n of e.properties)if(s.isObjectProperty(n)){if(n.computed||n.shorthand){r.errors.push({message:"Computed properties and shorthand properties are not supported",node:n.key,severity:"error"});continue}let e;if(s.isIdentifier(n.key))e=n.key.name;else{if(!s.isStringLiteral(n.key)){r.errors.push({message:`Unsupported object key type: ${n.key.type}`,node:n.key,severity:"error"});continue}e=n.key.value}o[e]=S(n.value,r,t)}else r.errors.push({message:`Unsupported property type: ${n.type}`,node:n,severity:"error"});return o}(e,r,t);if(s.isArrayExpression(e))return function(e,r,t){if(e.elements.some((e=>s.isSpreadElement(e)))&&t.allowExpression){const s=a(e);if(!s){var n;if(t.ambiguous)return E;const s=k(r.source,e);return f(d(`<%${null!==(n=t.modifier)&&void 0!==n?n:""} ${s} %>`,r),null==t?void 0:t.replacePatterns)}r.errors.push({message:`Unsupported node type: ${s.type}`,node:s,severity:"error"})}const o=[];for(const n of e.elements)null!==n?s.isSpreadElement(n)?r.errors.push({message:"Spread elements are not supported in arrays",node:n,severity:"error"}):o.push(S(n,r,t)):r.errors.push({message:"Array elements cannot be empty",node:e,severity:"error"});return o}(e,r,t);if(s.isStringLiteral(e)||s.isNumericLiteral(e)||s.isBooleanLiteral(e))return e.value;if(s.isNullLiteral(e))return null;if(!s.isIdentifier(e)||"undefined"!==e.name){if(t.allowUseBrick&&s.isArrowFunctionExpression(e)){const n=e.body;if(s.isBlockStatement(n))return r.errors.push({message:"Block statements are not supported in render callback",node:n,severity:"error"}),null;const o=[];for(const t of e.params){if(!s.isIdentifier(t))return r.errors.push({message:`Unsupported parameter type: ${t.type}`,node:t,severity:"error"}),null;o.push(t.name)}return{params:o,children:$([n],r,void 0,t)}}if(s.isExpression(e)&&t.allowExpression){const s=a(e);if(s)return r.errors.push({message:`Unsupported node type: ${s.type}`,node:s,severity:"error"}),null;{var n;if(t.ambiguous)return E;const s=k(r.source,e);return f(d(`<%${null!==(n=t.modifier)&&void 0!==n?n:""} ${s} %>`,r),null==t?void 0:t.replacePatterns)}}return r.errors.push({message:`Unsupported node type: ${e.type}`,node:e,severity:"error"}),null}}function w(e,r,t){let n=!1;if(s.traverse(e,{enter(e,r){var t;let o;n||s.isStringLiteral(e)||s.isNumericLiteral(e)||s.isBooleanLiteral(e)||s.isNullLiteral(e)||s.isObjectExpression(e)||s.isArrayExpression(e)||s.isObjectProperty(e)||s.isIdentifier(e)&&(o=null===(t=r[r.length-1])||void 0===t?void 0:t.node,1)&&(o&&s.isObjectProperty(o)?!o.computed&&!o.shorthand:"undefined"===e.name)||(n=!0)}}),n&&!a(e)){var o;const n=k(r.source,e);return f(d(`<%${null!==(o=t.modifier)&&void 0!==o?o:""} ${n} %>`,r),null==t?void 0:t.replacePatterns)}return S(e,r,t)}function k(e,r){const t=[];s.traverse(r,{enter(e){(s.isTSTypeAnnotation(e)||s.isTSTypeParameterInstantiation(e))&&t.push([e.start,e.end])}});let n="",o=r.start;for(const[r,s]of t)r>o&&(n+=e.substring(o,r),o=s);return n+=e.substring(o,r.end),n}function I(e,r){e.async||e.generator?r.errors.push({message:"Function declaration cannot be async or generator",node:e,severity:"error"}):e.id?r.functions.push({name:e.id.name,source:m(r.source.slice(e.start,e.end),r,e.id.name),typescript:!0}):r.errors.push({message:"Function declaration must have a name",node:e,severity:"error"})}function j(e,r,t,n,s,o,i){var a;const p=g(e,r,t);if(!p)return null;r.contracts.add(p.api);const l={name:n,scope:r.templateCollection?"template":"view",config:i,...p};if(s){if(s.length>("catch"===o?1:2))return r.errors.push({message:`".${o}()" expects no more than 2 arguments, but got ${s.length}`,node:s[1],severity:"error"}),!1;if(s.length>0){const e=A(s[0],r);e&&(l["catch"===o?"rejectTransform":"transform"]=e)}if("catch"!==o&&s.length>1){const e=A(s[1],r);e&&(l.rejectTransform=e)}}(null!==(a=r.templateCollection)&&void 0!==a?a:r).dataSources.push(l)}function A(e,r){if(!s.isArrowFunctionExpression(e))return r.errors.push({message:`".then()" callback expects an arrow function, but got ${e.type}`,node:e,severity:"error"}),null;if(!s.isExpression(e.body))return r.errors.push({message:`".then()" callback function body expects an expression, but got ${e.body.type}`,node:e.body,severity:"error"}),null;var t;if(e.params.length>1)return r.errors.push({message:`".then()" callback function expects exactly 0 or 1 parameter, but got ${e.params.length}`,node:null!==(t=e.params[1])&&void 0!==t?t:e,severity:"error"}),null;const n=`<% ${k(r.source,e.body)} %>`;if(0===e.params.length)return n;const o=e.params[0];return s.isIdentifier(o)?f(n,new Map([[o.name,"DATA"]])):(r.errors.push({message:`".then()" callback function parameter expects an identifier, but got ${o.type}`,node:o,severity:"error"}),null)}function C(e,r,t,n){if(e.async||e.generator)return void r.errors.push({message:"Function declaration cannot be async or generator",node:e,severity:"error"});if("template"===t){if(e.params.length>1)return void r.errors.push({message:`Component function expects at most 1 parameter, but got ${e.params.length}`,node:e.params[1],severity:"error"})}else if(e.params.length>0)return void r.errors.push({message:`View function expects no parameter, but got ${e.params.length}`,node:e.params[0],severity:"error"});let o,i,a,p;if("template"===t){o=[],i=new Map,a=[],p=[];const t=[];r.templateCollection={identifiers:o,setters:i,dataSources:p,events:t};const n=e.params[0];if(n){if(!s.isObjectPattern(n))return r.errors.push({message:`Component function parameter expects an object pattern, but got ${n.type}`,node:n,severity:"error"}),void delete r.templateCollection;for(const e of n.properties){if(s.isRestElement(e)){r.errors.push({message:"Component function parameter does not support rest element",node:e,severity:"error"});continue}if(e.computed||!e.shorthand){r.errors.push({message:"Unexpected computed or non-shorthand property in component function parameter",node:e,severity:"error"});continue}if(!s.isIdentifier(e.key)){r.errors.push({message:`Component function parameter property expects an identifier as key, but got ${e.key.type}`,node:e.key,severity:"error"});continue}const n=e.key.name;if(/^on[A-Z]/.test(n))s.isIdentifier(e.value)||r.errors.push({message:`Event handler property "${n}" expects an identifier as value, but got ${e.value.type}`,node:e.value,severity:"error"}),t.push(n);else if(o.push(n),s.isAssignmentPattern(e.value)){const t=S(e.value.right,r,{allowExpression:!0});a.push({name:n,expose:!0,value:t})}else a.push({name:n,expose:!0})}}}else o=r.contexts,i=r.contextSetters,a=r.variables,p=r.dataSources;for(const r of e.body.body)if(s.isVariableDeclaration(r))for(const e of r.declarations)if(s.isCallExpression(e.init)&&s.isIdentifier(e.init.callee))switch(e.init.callee.name){case"useState":if(s.isArrayPattern(e.id)){const[r,t]=e.id.elements;if(s.isIdentifier(r)){const e=r.name;o.push(e),s.isIdentifier(t)&&i.set(t.name,e)}}break;case"useResource":if(s.isArrayPattern(e.id)){const[r]=e.id.elements;if(s.isIdentifier(r)){const e=r.name;o.push(e)}}}else s.isIdentifier(e.id)&&o.push(e.id.name);for(const o of e.body.body)if(s.isVariableDeclaration(o)){if("const"!==o.kind){r.errors.push({message:`Unsupported variable declaration kind: ${o.kind}`,node:o,severity:"error"});continue}for(const e of o.declarations){if(e.init&&s.isCallExpression(e.init)&&s.isIdentifier(e.init.callee))switch(e.init.callee.name){case"useState":{if(!s.isArrayPattern(e.id)){r.errors.push({message:`"useState()" return value must be destructured into an array pattern, received ${e.id.type}`,node:e.id,severity:"error"});continue}const[t,n]=e.id.elements;if(!s.isIdentifier(t)){r.errors.push({message:`"useState()" expects an identifier as the variable name, received ${null==t?void 0:t.type}`,node:t,severity:"error"});continue}if(n&&!s.isIdentifier(n)){r.errors.push({message:`"useState()" expects an identifier as the setter name, received ${n.type}`,node:n,severity:"error"});continue}const o=t.name,i=e.init.arguments;if(0===i.length)a.push({name:o,expose:!1});else{i.length>1&&r.errors.push({message:`"useState()" expects at most 1 argument, but got ${i.length}`,node:e.init,severity:"error"});const t=S(i[0],r,{allowExpression:!0});a.push({name:o,expose:!1,value:t})}continue}case"useResource":{if(!s.isArrayPattern(e.id)){r.errors.push({message:`"useResource()" return value must be destructured into an array pattern, received ${e.id.type}`,node:e.id,severity:"error"});continue}const[t]=e.id.elements;if(!s.isIdentifier(t)){r.errors.push({message:`"useResource()" expects an identifier as the variable name, received ${null==t?void 0:t.type}`,node:t,severity:"error"});continue}const o=t.name,i=e.init.arguments;(0===i.length||i.length>2)&&r.errors.push({message:`"useResource()" expects 1 or 2 arguments, but got ${i.length}`,node:e.init,severity:"error"});const a=i[0];if(!s.isArrowFunctionExpression(a)){r.errors.push({message:`"useResource()" expects an arrow function as the argument, but got ${a.type}`,node:a,severity:"error"});continue}if(a.async||a.generator){r.errors.push({message:'"useResource()" argument function cannot be async or generator',node:a,severity:"error"});continue}const p=a.body;if(s.isBlockStatement(p)){r.errors.push({message:'Block statement is not supported in "useResource()" argument function',node:p,severity:"error"});continue}if(!s.isCallExpression(p)){r.errors.push({message:`"useResource()" argument function must return a call expression, but got ${p.type}`,node:p,severity:"error"});continue}const{callee:l}=p;if(!s.isIdentifier(l)&&!s.isMemberExpression(l)){r.errors.push({message:`"useResource()" argument function must return a call to an identifier or member expression, but got ${l.type}`,node:l,severity:"error"});continue}const u=i[1];let c;if(u){if(!s.isObjectExpression(u)){r.errors.push({message:`"useResource()" second argument must be an object expression, but got ${u.type}`,node:u,severity:"error"});continue}for(const e of u.properties){if(!s.isObjectProperty(e)){r.errors.push({message:`Unsupported property type in "useResource()" second argument: ${e.type}`,node:e,severity:"error"});continue}const t=e.key;s.isIdentifier(t)?e.computed?r.errors.push({message:'"useResource()" second argument property key cannot be computed',node:t,severity:"error"}):"enabled"===t.name||"fallback"===t.name?(null!=c||(c={}),c[t.name]=S(e.value,r,{allowExpression:!0})):r.errors.push({message:`"useResource()" second argument property key must be "enabled" or "fallback", but got "${t.name}"`,node:t,severity:"error"}):r.errors.push({message:`"useResource()" second argument property key must be an identifier, but got ${t.type}`,node:t,severity:"error"})}}if(s.isMemberExpression(l)){if(!s.isIdentifier(l.property)||l.computed||"then"!==l.property.name&&"catch"!==l.property.name){r.errors.push({message:"Unexpected awaited expression",node:l.property,severity:"error"});continue}j(l.object,r,n,o,p.arguments,l.property.name,c)}else j(p,r,n,o,void 0,void 0,c);continue}}if(!s.isIdentifier(e.id)){r.errors.push({message:`Expect an identifier as the variable name, received ${e.id.type}`,node:e.id,severity:"error"});continue}const t=e.id.name;if(null==e.init)e.id.typeAnnotation||r.errors.push({message:`Variable "${t}" with no initial value must have a type annotation`,node:e.id,severity:"error"}),a.push({name:t});else{const n=S(e.init,r,{allowExpression:!0});a.push({name:t,value:n})}}}else{if(s.isReturnStatement(o)){var l;if(!s.isJSXElement(o.argument))return void r.errors.push({message:`Exported default declaration must be a JSX element, but got ${null===(l=o.argument)||void 0===l?void 0:l.type}`,node:o.argument,severity:"error"});const i=$([o.argument],r,n);return void("template"===t?(r.templates.push({name:e.id.name,variables:a,dataSources:p,components:i}),delete r.templateCollection):r.components.push(...i))}s.isTSInterfaceDeclaration(o)||s.isTSTypeAliasDeclaration(o)||r.errors.push({message:`Unsupported top level statement type: ${o.type}`,node:o,severity:"error"})}r.errors.push({message:"Component function declaration must have a return statement returning a JSX element",node:e,severity:"error"})}function P(e,r,t){for(const t of e.program.body)s.isFunctionDeclaration(t)&&t.id&&!T(t.id)&&r.functionNames.push(t.id.name);for(const n of e.program.body)if(s.isFunctionDeclaration(n)){if(!n.id){r.errors.push({message:"Function declaration must have a name",node:n,severity:"error"});continue}T(n.id)?C(n,r,"template",t):I(n,r)}else if(s.isExportDefaultDeclaration(n)){if(!s.isFunctionDeclaration(n.declaration)){r.errors.push({message:`Expected function declaration as default export, but got ${n.declaration.type}`,node:n.declaration,severity:"error"});continue}C(n.declaration,r,"view",t)}else s.isTSInterfaceDeclaration(n)||s.isTSTypeAliasDeclaration(n)||r.errors.push({message:`Unsupported top level statement type: ${n.type}`,node:n,severity:"error"})}function T(e){return e.name[0]>="A"&&e.name[0]<="Z"}(0,t(47695).p)(class{parse(e,r){return function(e,r){var t,o;const i=[],a={source:e,dataSources:[],variables:[],components:[],componentsMap:new Map,errors:i,contexts:null!==(t=null==r?void 0:r.withContexts)&&void 0!==t?t:[],contextSetters:new Map,functionNames:[],functions:[],contracts:new Set,templates:[]};let p;try{p=(0,n.parse)(e,{plugins:["jsx","typescript"],sourceType:"module",errorRecovery:!0})}catch(e){return i.push({message:`Failed to parse TSX: ${e}`,node:null,severity:"fatal"}),a}if(null!==(o=p.errors)&&void 0!==o&&o.length)for(const e of p.errors)i.push({message:`${e.code}: ${e.reasonCode}`,node:null,severity:"error"});for(const e of p.program.body)if(s.isExportDefaultDeclaration(e)){if(s.isFunctionDeclaration(e.declaration))return P(p,a,r),a;break}return function(e,r,t){const{errors:n,contexts:o,functionNames:i,variables:a}=r;s.traverse(e.program,{enter(e){s.isTSAnyKeyword(e)?n.push({message:"Unexpected 'any' type",node:e,severity:"warning"}):s.isTSAsExpression(e)&&n.push({message:"Unexpected 'as' usage",node:e,severity:"warning"})}});for(const r of e.program.body)if(s.isVariableDeclaration(r))for(const e of r.declarations)s.isIdentifier(e.id)&&o.push(e.id.name);else s.isFunctionDeclaration(r)&&r.id&&i.push(r.id.name);let p=!1;for(const o of e.program.body)if(s.isVariableDeclaration(o)){if(p&&n.push({message:"Unexpected variable declaration after export",node:o,severity:"error"}),"let"!==o.kind&&"const"!==o.kind){n.push({message:`Unsupported variable declaration kind: ${o.kind}`,node:o,severity:"error"});continue}for(const e of o.declarations){if(!s.isIdentifier(e.id)){n.push({message:`Expect an identifier as the variable name, received ${e.id.type}`,node:e.id,severity:"error"});continue}const o=e.id.name;if(null==e.init)e.id.typeAnnotation||n.push({message:`Variable "${o}" with no initial value must have a type annotation`,node:e.id,severity:"error"}),a.push({name:o});else if(s.isAwaitExpression(e.init)){const i=e.init.argument;if(!s.isCallExpression(i)){n.push({message:`Await expression must be a call expression, received ${i.type}`,node:i,severity:"error"});continue}const{callee:a}=i;if(!s.isIdentifier(a)&&!s.isMemberExpression(a)){n.push({message:`Await expression must call an identifier or member expression, received ${a.type}`,node:a,severity:"error"});continue}if(s.isMemberExpression(a)){if(!s.isIdentifier(a.property)||a.computed||"then"!==a.property.name&&"catch"!==a.property.name){n.push({message:"Unexpected awaited expression",node:a.property,severity:"error"});continue}j(a.object,r,t,o,i.arguments,a.property.name)}else j(i,r,t,o)}else{const t=S(e.init,r,{allowExpression:!0});a.push({name:o,value:t})}}}else if(s.isFunctionDeclaration(o))p&&n.push({message:"Unexpected function declaration after export",node:o,severity:"error"}),I(o,r);else if(s.isExportDefaultDeclaration(o)){p=!0;const e=o.declaration;if(!s.isJSXElement(e)){n.push({message:`Exported default declaration must be a JSX element, but got ${e.type}`,node:e,severity:"error"});continue}const i=$([e],r,t);r.components.push(...i)}else s.isTSInterfaceDeclaration(o)||s.isTSTypeAliasDeclaration(o)||n.push({message:`Unsupported top level statement type: ${o.type}`,node:o,severity:"error"})}(p,a,r),a}(e,r)}})}},b={};function $(e){var r=b[e];if(void 0!==r)return r.exports;var t=b[e]={exports:{}};return x[e](t,t.exports,$),t.exports}$.m=x,$.c=b,$.x=()=>{var e=$.O(void 0,[5521,4957,1321,580],(()=>$(9474)));return $.O(e)},e=[],$.O=(r,t,n,s)=>{if(!t){var o=1/0;for(l=0;l<e.length;l++){for(var[t,n,s]=e[l],i=!0,a=0;a<t.length;a++)(!1&s||o>=s)&&Object.keys($.O).every((e=>$.O[e](t[a])))?t.splice(a--,1):(i=!1,s<o&&(o=s));if(i){e.splice(l--,1);var p=n();void 0!==p&&(r=p)}}return r}s=s||0;for(var l=e.length;l>0&&e[l-1][2]>s;l--)e[l]=e[l-1];e[l]=[t,n,s]},$.d=(e,r)=>{for(var t in r)$.o(r,t)&&!$.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},$.f={},$.e=e=>Promise.all(Object.keys($.f).reduce(((r,t)=>($.f[t](e,r),r)),[])),$.u=e=>"chunks/"+e+"."+{1122:"95231c39",4957:"f878df32",5521:"ef48a4d3",6773:"afd27a30"}[e]+".js",$.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),$.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),$.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{$.S={};var e={},r={};$.I=(t,n)=>{n||(n=[]);var s=r[t];if(s||(s=r[t]={}),!(n.indexOf(s)>=0)){if(n.push(s),e[t])return e[t];$.o($.S,t)||($.S[t]={}),$.S[t];var o=[];return e[t]=o.length?Promise.all(o).then((()=>e[t]=1)):1}}})(),(()=>{var e;$.g.importScripts&&(e=$.g.location+"");var r=$.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),$.p=e+"../"})(),r=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},t=(e,t)=>{e=r(e),t=r(t);for(var n=0;;){if(n>=e.length)return n<t.length&&"u"!=(typeof t[n])[0];var s=e[n],o=(typeof s)[0];if(n>=t.length)return"u"==o;var i=t[n],a=(typeof i)[0];if(o!=a)return"o"==o&&"n"==a||"s"==a||"u"==o;if("o"!=o&&"u"!=o&&s!=i)return s<i;n++}},n=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var s=1,o=1;o<e.length;o++)s--,t+="u"==(typeof(a=e[o]))[0]?"-":(s>0?".":"")+(s=2,a);return t}var i=[];for(o=1;o<e.length;o++){var a=e[o];i.push(0===a?"not("+p()+")":1===a?"("+p()+" || "+p()+")":2===a?i.pop()+" "+i.pop():n(a))}return p();function p(){return i.pop().replace(/^\((.+)\)$/,"$1")}},s=(e,t)=>{if(0 in e){t=r(t);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,a=1,p=!0;;a++,i++){var l,u,c=a<e.length?(typeof e[a])[0]:"";if(i>=t.length||"o"==(u=(typeof(l=t[i]))[0]))return!p||("u"==c?a>n&&!o:""==c!=o);if("u"==u){if(!p||"u"!=c)return!1}else if(p)if(c==u)if(a<=n){if(l!=e[a])return!1}else{if(o?l>e[a]:l<e[a])return!1;l!=e[a]&&(p=!1)}else if("s"!=c&&"n"!=c){if(o||a<=n)return!1;p=!1,a--}else{if(a<=n||u<c!=o)return!1;p=!1}else"s"!=c&&"n"!=c&&(p=!1,a--)}}var d=[],m=d.pop.bind(d);for(i=1;i<e.length;i++){var f=e[i];d.push(1==f?m()|m():2==f?m()&m():f?s(f,t):!m())}return!!m()},o=(e,r)=>e&&$.o(e,r),i=e=>(e.loaded=1,e.get()),a=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),p=(e,r,n)=>{var s=n?a(e[r]):e[r];return Object.keys(s).reduce(((e,r)=>!e||!s[e].loaded&&t(e,r)?r:e),0)},l=(e,r,t,s)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+n(s)+")",u=e=>{throw new Error(e)},c=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},d=(e,r,t)=>t?t():((e,r)=>u("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),m=(e=>function(r,t,n,s,o){var i=$.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,$.S[r],t,!1,s,o)):e(r,$.S[r],t,n,s,o)})(((e,r,t,n,a,u)=>{if(!o(r,t))return d(e,t,u);var m=p(r,t,n);return s(a,m)||c(l(r,t,m,a)),i(r[t][m])})),f={},y={71321:()=>m("default","@next-core/cook",!1,[0],(()=>Promise.all([$.e(1122),$.e(580)]).then((()=>()=>$(61122))))),40580:()=>m("default","@babel/parser",!1,[0],(()=>$.e(6773).then((()=>()=>$(46773)))))},g={580:[40580],1321:[71321]},h={},$.f.consumes=(e,r)=>{$.o(g,e)&&g[e].forEach((e=>{if($.o(f,e))return r.push(f[e]);if(!h[e]){var t=r=>{f[e]=0,$.m[e]=t=>{delete $.c[e],t.exports=r()}};h[e]=!0;var n=r=>{delete f[e],$.m[e]=t=>{throw delete $.c[e],r}};try{var s=y[e]();s.then?r.push(f[e]=s.then(t).catch(n)):t(s)}catch(e){n(e)}}}))},(()=>{var e={9474:1};$.f.i=(r,t)=>{e[r]||/^(1321|580)$/.test(r)||importScripts($.p+$.u(r))};var r=globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[],t=r.push.bind(r);r.push=r=>{var[n,s,o]=r;for(var i in s)$.o(s,i)&&($.m[i]=s[i]);for(o&&o($);n.length;)e[n.pop()]=1;t(r)}})(),v=$.x,$.x=()=>Promise.all([5521,4957,1321,580].map($.e,$)).then(v),$.x()})();
2
- //# sourceMappingURL=9474.094511f1.js.map
1
+ (()=>{"use strict";var e,r,t,n,s,o,i,a,p,l,u,c,d,m,f,y,g,h,v,x={9474:(e,r,t)=>{var n=t(40580),s=t(58135);const o=/^<%=?\s/,i=/\s%>$/;function a(e){let r=null;return s.traverse(e,{enter(e,t){var n;!r&&(s.isFunctionExpression(e)||s.isStatement(e)||s.isJSX(e)||s.isArrowFunctionExpression(e)&&(s.isBlockStatement(e.body)||s.isObjectProperty(null===(n=t[t.length-1])||void 0===n?void 0:n.node)))&&(r=e)}}),r}function p(e){return s.isNullLiteral(e)||s.isIdentifier(e)&&"undefined"===e.name}function l(e){let r=!1;return s.traverse(e,{enter(e){r||!s.isJSXElement(e)&&!s.isJSXFragment(e)||(r=!0)}}),r}function u(e){return e.slice(2).replace(/([a-z])([A-Z])/g,"$1.$2").toLowerCase()}var c=t(71321);function d(e,r){return f(e,new Map([...r.templateCollection?r.templateCollection.identifiers.map((e=>[e,`STATE.${e}`])):r.contexts.map((e=>[e,`CTX.${e}`])),...r.functionNames.map((e=>[e,`FN.${e}`]))]))}function m(e,r,t){return function(e,r){if(null==r||!r.size)return e;if([...r.keys()].some((r=>e.includes(r)))){const t=[];let n;try{n=(0,c.precookFunction)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,n){if(r.has(e.name)){var s;const r=null===(s=n[n.length-1])||void 0===s?void 0:s.node;let o;r&&"Property"===r.type&&!r.computed&&r.shorthand&&(o=!0),t.push({id:e,shorthand:o})}}}})}catch(e){console.error("Parse function failed:",e)}if(t.length>0&&n){const n=[];let s=0;for(let o=0;o<t.length;o++){const{id:i,shorthand:a}=t[o],{name:p,start:l,end:u}=i;n.push(e.substring(s,l),`${a?`${p}: `:""}${r.get(p)}`),s=u}return n.push(e.substring(s)),n.join("")}}return e}(e,new Map(r.functionNames.filter((e=>e!==t)).map((e=>[e,`FN.${e}`]))))}function f(e,r){if(null==r||!r.size)return e;if([...r.keys()].some((r=>e.includes(r)))){const t=[];let n;try{n=(0,c.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,n){if(r.has(e.name)){var s;const r=null===(s=n[n.length-1])||void 0===s?void 0:s.node;let o;r&&"Property"===r.type&&!r.computed&&r.shorthand&&(o=!0),t.push({id:e,shorthand:o})}}}})}catch(e){console.error("Parse expression failed:",e)}if(t.length>0&&n){const{prefix:e,source:s,suffix:o}=n,i=[];let a=0;for(let e=0;e<t.length;e++){const{id:n,shorthand:o}=t[e],{name:p,start:l,end:u}=n;i.push(s.substring(a,l),`${o?`${p}: `:""}${r.get(p)}`),a=u}return i.push(s.substring(a)),`${e}${i.join("")}${o}`}}return e}const y={callApi:[2,3],callHttp:[1,2],callTool:[2,3]};function g(e,r,t,n){if(!s.isCallExpression(e)&&!s.isOptionalCallExpression(e))return r.errors.push({message:`Await expression must be a call expression, received ${e.type}`,node:e,severity:"error"}),null;const{callee:a}=e;let l;if(!s.isIdentifier(a))return r.errors.push({message:`Await expression must call an identifier, received ${a.type}`,node:a,severity:"error"}),null;if(l=a.name,"callApi"!==l&&"callHttp"!==l&&"callTool"!==l)return r.errors.push({message:`Await expression must call "callApi", "callHttp" or "callTool", received "${l}"`,node:a,severity:"error"}),null;const u=y[l],c=e.arguments.length<u[0];if((c||!u.includes(e.arguments.length))&&(r.errors.push({message:`"${l}()" expects ${u.join(" or ")} arguments, but got ${e.arguments.length}`,node:e,severity:c?"error":"warning"}),c))return null;let d;const m=e.arguments[0];if("callHttp"===l){const e=S(m,r,{...n,allowExpression:!0});if("string"!=typeof e)return r.errors.push({message:`"${l}()" expects a string value as the first argument, but got ${typeof e}`,node:m,severity:"error"}),null;d={api:e,http:!0}}else if("callApi"===l){if(!s.isStringLiteral(m))return r.errors.push({message:`"${l}()" expects a string literal as the first argument, but got ${m.type}`,node:m,severity:"error"}),null;d={api:m.value}}else{const t=S(m,r,{...n,allowExpression:!0});if("string"!=typeof t)return r.errors.push({message:`"${l}()" expects a string value as the first argument, but got ${typeof t}`,node:m,severity:"error"}),null;const s=e.arguments[1],o=S(s,r,{...n,allowExpression:!0});if("string"!=typeof o)return r.errors.push({message:`"${l}()" expects a string value as the second argument, but got ${typeof o}`,node:s,severity:"error"}),null;const i=e.arguments[2];let a;i&&(a=S(i,r,{...n,allowExpression:!0})),d={api:l,tool:{conversationId:t,stepId:o},params:a}}if("callApi"===l||"callHttp"===l){const a=e.arguments[1];if(a&&!p(a)){s.isObjectExpression(a)||r.errors.push({message:`Data source "params" prefers an object literal, but got ${a.type}`,node:a,severity:"notice"});const e=S(a,r,{...n,allowExpression:!0});(function(e){if("string"!=typeof e)return!1;const r=e.trim();return o.test(r)&&i.test(r)})(e)||"object"==typeof e&&null!==e?d.params=e:r.errors.push({message:"API params expects an object or expression, but got "+typeof e,node:a,severity:"error"}),null!=t&&t.reward&&(d.ambiguousParams=S(a,{...r,errors:[]},{allowExpression:!0,ambiguous:!0}))}}if("callApi"===l){const t=e.arguments[2];if(t&&!p(t))if(s.isObjectExpression(t))for(const e of t.properties){if(!s.isObjectProperty(e)){r.errors.push({message:`"callApi()" third param "meta" expects object properties, but got ${e.type}`,node:e,severity:"error"});continue}const t=e.key;if(!s.isIdentifier(t)){r.errors.push({message:`"callApi()" third param "meta" property key must be an identifier, but got ${t.type}`,node:t,severity:"error"});continue}if("objectId"!==t.name){r.errors.push({message:`"callApi()" third param "meta" property key must be "objectId", but got "${t.name}"`,node:t,severity:"error"});continue}const n=e.value;if(!p(n)){if(!s.isStringLiteral(n)){r.errors.push({message:`"callApi()" third param "meta" property "${t.name}" expects a string literal, but got ${n.type}`,node:n,severity:"error"});continue}d.objectId=n.value}}else r.errors.push({message:`"callApi()" third param "meta" expects an object literal, but got ${t.type}`,node:t,severity:"error"})}return d}function h(e,r,t,n,o){var i;if(!s.isArrowFunctionExpression(e))return r.errors.push({message:`Expected arrow function expression as event handler, but got ${e.type}`,node:e,severity:"error"}),null;if(e.params.length>1)return r.errors.push({message:`Event handler expects 0 or 1 parameter, but got ${e.params.length}`,node:e,severity:"error"}),null;const a=new Map(null!==(i=null==n?void 0:n.replacePatterns)&&void 0!==i?i:[]),p=e.params[0];if(p){if(!s.isIdentifier(p))return r.errors.push({message:`Event handler parameter expects an identifier, but got ${p.type}`,node:p,severity:"error"}),null;const e=p.name;a.set(e,o?"EVENT.detail":"EVENT"),r.contexts.includes(e)&&r.errors.push({message:`Event handler parameter "${e}" conflicts with existing global variables`,node:p,severity:"error"})}if(!s.isBlockStatement(e.body))return r.errors.push({message:`Event handler body expects a block statement, but got ${e.body.type}`,node:e.body,severity:"error"}),null;const l=[];for(const o of e.body.body)if(s.isExpressionStatement(o))if(s.isAssignmentExpression(o.expression)){const{left:e,right:t}=o.expression;if(!s.isIdentifier(e)){r.errors.push({message:`Assignment in event handler expects an identifier on the left side, but got ${e.type}`,node:e,severity:"error"});continue}const i=S(t,r,{...n,allowExpression:!0,replacePatterns:a});l.push({action:"update_variable",payload:{name:e.name,value:i}})}else if(s.isCallExpression(o.expression)||s.isOptionalCallExpression(o.expression)){const{callee:e,arguments:i}=o.expression;if(s.isMemberExpression(e)||s.isOptionalMemberExpression(e)){if(!s.isCallExpression(e.object)){r.errors.push({message:`Member expression in event handler expects a call expression as object, but got ${e.object.type}`,node:e.object,severity:"error"});continue}if(!s.isIdentifier(e.object.callee)){r.errors.push({message:`Member expression in event handler expects an identifier as callee, but got ${e.object.callee.type}`,node:e.object.callee,severity:"error"});continue}if(!s.isIdentifier(e.property)){r.errors.push({message:`Member expression in event handler expects an identifier as property, but got ${e.property.type}`,node:e.property,severity:"error"});continue}const p=e.object.callee.name,u=e.object.arguments;if("getComponent"===p){if(2!==u.length){r.errors.push({message:`"getComponent()" expects 2 arguments, but got ${u.length}`,node:o.expression,severity:"error"});continue}const t=u[0];if(!s.isStringLiteral(t)){r.errors.push({message:`"getComponent()" expects a string literal as its first argument, but got ${t.type}`,node:t,severity:"error"});continue}const n=u[1];if(!s.isStringLiteral(n)){r.errors.push({message:`"getComponent()" expects a string literal as its second argument, but got ${n.type}`,node:n,severity:"error"});continue}l.push({action:"call_component",payload:{componentId:n.value,method:e.property.name,args:i.map((e=>S(e,r,{allowExpression:!0,replacePatterns:a})))}})}else if("callApi"===p||"callHttp"===p){if("then"!==e.property.name){r.errors.push({message:`"${p}()" expects "then" as its method, but got ${e.property.name}`,node:e.property,severity:"error"});continue}if(1!==i.length){r.errors.push({message:`"${p}().then()" expects exactly 1 argument, but got ${i.length}`,node:o.expression,severity:"error"});continue}const s=g(e.object,r,t,{replacePatterns:a});if(!s)continue;r.contracts.add(s.api);const u=h(i[0],r,t,n,!0);l.push({action:"call_api",payload:s,callback:u?{success:u}:void 0})}else r.errors.push({message:`Unsupported action in event handler: ${p}`,node:e.object.callee,severity:"error"});continue}if(!s.isIdentifier(e)){r.errors.push({message:`Call expression in event handler expects an identifier as callee, but got ${e.type}`,node:e,severity:"error"});continue}if(r.templateCollection){if(r.templateCollection.setters.has(e.name)){const t=i[0];l.push({action:"update_variable",payload:{scope:"template",name:r.templateCollection.setters.get(e.name),value:void 0===t?void 0:S(t,r,{allowExpression:!0,replacePatterns:a})}}),1!==i.length&&r.errors.push({message:`State setter expects exactly 1 argument, but got ${i.length}`,node:i[1],severity:"error"});continue}}else if(r.contextSetters.has(e.name)){const t=i[0];l.push({action:"update_variable",payload:{name:r.contextSetters.get(e.name),value:void 0===t?void 0:S(t,r,{allowExpression:!0,replacePatterns:a})}}),1!==i.length&&r.errors.push({message:`State setter expects exactly 1 argument, but got ${i.length}`,node:i[1],severity:"error"});continue}if("showMessage"===e.name){if(1!==i.length){r.errors.push({message:`"showMessage()" expects 1 argument, but got ${i.length}`,node:o.expression,severity:"error"});continue}const e=S(i[0],r,{allowExpression:!0,replacePatterns:a});l.push({action:"show_message",payload:e})}else if("refresh"===e.name){if(1!==i.length){r.errors.push({message:`"refresh()" expects 1 argument, but got ${i.length}`,node:o.expression,severity:"error"});continue}if(!s.isIdentifier(i[0])){r.errors.push({message:`"refresh()" expects an identifier as its argument, but got ${i[0].type}`,node:i[0],severity:"error"});continue}l.push({action:"refresh_data_source",payload:{name:i[0].name}})}else if("callApi"===e.name||"callHttp"===e.name){const e=g(o.expression,r,t,{replacePatterns:a});if(!e)continue;r.contracts.add(e.api),l.push({action:"call_api",payload:e})}else r.errors.push({message:`Unsupported action in event handler: ${e.name}`,node:e,severity:"error"})}else r.errors.push({message:`Unsupported event handler expression: ${o.expression.type}`,node:o.expression,severity:"error"});else r.errors.push({message:`Unsupported event handler statement: ${o.type}`,node:o,severity:"error"});return l}function v(e,r,t,n){if(s.isJSXElement(e)){if(!s.isJSXIdentifier(e.openingElement.name))return r.errors.push({message:`Expected JSXIdentifier, but got ${e.openingElement.name.type}`,node:e.openingElement.name,severity:"error"}),null;const a=e.openingElement.name.name;if("Fragment"===a){for(const t of e.openingElement.attributes)s.isJSXAttribute(t)&&s.isJSXIdentifier(t.name)&&"key"===t.name.name||r.errors.push({message:"Invalid attribute for Fragment",node:t,severity:"error"});return e.children.flatMap((e=>v(e,r,t,n)))}const l={},m={};let f,y;for(const a of e.openingElement.attributes){if(s.isJSXSpreadAttribute(a)){r.errors.push({message:"Spread attributes are not supported in component",node:a,severity:"error"});continue}if(!s.isJSXIdentifier(a.name)){r.errors.push({message:`Expected JSXIdentifier, but got ${a.name.type}`,node:a.name,severity:"error"});continue}const e=a.name.name;if(/^on[A-Z]/.test(e)){var o;if(!s.isJSXExpressionContainer(a.value)){var i,p;r.errors.push({message:`Event handler "${e}" expects a JSXExpressionContainer, but got ${null===(i=a.value)||void 0===i?void 0:i.type}`,node:null!==(p=a.value)&&void 0!==p?p:a,severity:"error"});continue}if(s.isJSXEmptyExpression(a.value.expression)){r.errors.push({message:"Empty expression in events is not allowed",node:a.value,severity:"warning"});continue}const n=a.value.expression;let l=null;l=s.isIdentifier(n)&&null!==(o=r.templateCollection)&&void 0!==o&&o.events.includes(n.name)?[{action:"dispatch_event",payload:{type:u(n.name),detail:"<% EVENT.detail %>"}}]:h(n,r,t),l&&(null!=f||(f={}),f[u(e)]=l)}else if("componentId"===e){if(!s.isStringLiteral(a.value)){var c,d;r.errors.push({message:`"componentId" attribute in component expects a string literal, but got ${null===(c=a.value)||void 0===c?void 0:c.type}`,node:null!==(d=a.value)&&void 0!==d?d:a,severity:"error"});continue}y=a.value.value}else if(null==a.value)l[e]=!0;else if(s.isStringLiteral(a.value))l[e]=a.value.value,m[e]=a.value.value;else if(s.isJSXExpressionContainer(a.value)){if(s.isJSXEmptyExpression(a.value.expression)){r.errors.push({message:`Empty expression in JSX attribute "${e}" is not allowed`,node:a.value,severity:"warning"});continue}l[e]=w(a.value.expression,r,{...n,allowExpression:!0,allowUseBrick:!0,modifier:"="}),null!=t&&t.reward&&(m[e]=S(a.value.expression,{...r,errors:[]},{allowExpression:!0,ambiguous:!0}))}else r.errors.push({message:`Unsupported attribute value type in component: ${a.value.type}`,node:a.value,severity:"error"})}const{textContent:g,children:b}=x(e.children,r,t,n);g&&(l.textContent=g);const $={name:a,componentId:y,properties:l,events:f,children:b};return null!=t&&t.reward&&($.ambiguousProps=m),y&&(r.componentsMap.has(y)?r.errors.push({message:`Duplicated componentId "${y}" found`,node:e,severity:"error"}):r.componentsMap.set(y,$)),{type:"component",component:$}}if(s.isJSXFragment(e))return e.children.flatMap((e=>v(e,r,t,n)));if(s.isJSXText(e))return e.value.trim()?{type:"text",text:e.value}:null;if(s.isJSXExpressionContainer(e))return v(e.expression,r,t,n);if(s.isJSXEmptyExpression(e))return null;if(s.isCallExpression(e)){const o=e.callee;if(s.isMemberExpression(o)&&s.isIdentifier(o.property)&&!o.computed&&"map"===o.property.name){const i=e.arguments;if(i.length>0){i.length>1&&r.errors.push({message:"Only one argument is allowed for map function",node:i[1],severity:"error"});const[e]=i;if(s.isArrowFunctionExpression(e)){if(s.isBlockStatement(e.body))return r.errors.push({message:"Block statement is not allowed in map function",node:e.body,severity:"error"}),null;if(l(e.body)){var m;const i=a(o.object);if(i)return r.errors.push({message:`Unsupported node type as the object of a map function with JSX element: ${i.type}`,node:i,severity:"error"}),null;if(e.params.length>2)return r.errors.push({message:"Only up to 2 parameters are allowed in map function with JSX element",node:e,severity:"error"}),null;const p=e.params.find((e=>!s.isIdentifier(e)));if(p)return r.errors.push({message:"Only identifier parameters are allowed in map function with JSX element",node:p,severity:"error"}),null;const l=new Map(null!==(m=null==n?void 0:n.replacePatterns)&&void 0!==m?m:[]);if(e.params.length>0){const[r,t]=e.params;l.set(r.name,"ITEM"),t&&l.set(t.name,"INDEX")}return{type:"component",component:{name:"ForEach",properties:{dataSource:w(o.object,r,{...n,modifier:"=",allowExpression:!0})},children:$([e.body],r,t,{...n,replacePatterns:l})}}}}}}}else if(s.isConditionalExpression(e)){const{test:s,consequent:o,alternate:i}=e;if(l(o)||l(i)){const e=a(s);return e?(r.errors.push({message:`Unsupported node type in conditional expression test: ${e.type}`,node:e,severity:"error"}),null):{type:"component",component:{name:"If",properties:{dataSource:w(s,r,{...n,modifier:"=",allowExpression:!0})},children:[...$([o],r,t,n),...$([i],r,t,n).map((e=>({...e,slot:"else"})))]}}}}else if(s.isLogicalExpression(e)){const{left:s,right:o,operator:i}=e;if(("&&"===i||"||"===i)&&l(o)){const i=a(s);if(i)return r.errors.push({message:`Unsupported node type in logical expression left: ${i.type}`,node:i,severity:"error"}),null;const p=$([o],r,t,n);return{type:"component",component:{name:"If",properties:{dataSource:w(s,r,{...n,modifier:"=",allowExpression:!0})},children:"&&"===e.operator?p:p.map((e=>({...e,slot:"else"})))}}}}if(s.isExpression(e)){const t=a(e);return t?(r.errors.push({message:`Unsupported node type in expression: ${t.type}`,node:t,severity:"error"}),null):{type:"expression",expression:e}}return r.errors.push({message:`Unsupported node type in component: ${e.type}`,node:e,severity:"error"}),null}function x(e,r,t,n){let s=e.flatMap((e=>v(e,r,t,n))),o=s.every((e=>"text"===(null==e?void 0:e.type)));if(!o){let e=null;const r=[];for(const t of s){if(null===t);else if("text"===t.type||"expression"===t.type){var i,a,p;if("text"===(null===(i=e)||void 0===i?void 0:i.type)||"expression"===(null===(a=e)||void 0===a?void 0:a.type)){e={type:"merged",children:[e,t]},r.splice(r.length-1,1,e);continue}if("merged"===(null===(p=e)||void 0===p?void 0:p.type)){e.children.push(t);continue}}e=t,r.push(t)}s=r,o=s.every((e=>"text"===(null==e?void 0:e.type)||"merged"===(null==e?void 0:e.type)&&e.children.every((e=>"text"===e.type))))}return o?{textContent:s.flatMap((e=>"text"===e.type?e.text:e.children.map((e=>e.text)))).join("").trim()}:s.every((e=>!!e&&"component"!==e.type))?{textContent:f(d(b(s.flatMap((e=>"merged"===e.type?e.children:e)),r.source),r),null==n?void 0:n.replacePatterns)}:{children:s.filter((e=>!!e)).map((e=>"component"===e.type?e.component:{name:"Plaintext",properties:{textContent:"text"===e.type?e.text:f(d("expression"===e.type?`<%= ${k(r.source,e.expression)} %>`:b(e.children,r.source),r),null==n?void 0:n.replacePatterns)}}))}}function b(e,r){return`<%= CTX.__builtin_fn_mergeTexts(${e.map((e=>"text"===e.type?JSON.stringify(e):`{type:"expression",value:(${k(r,e.expression)})}`)).join(", ")}) %>`}function $(e,r,t,n){const{textContent:s,children:o}=x(e,r,t,n);return null!=o?o:[{name:"Plaintext",properties:{textContent:s}}]}const E=Symbol("ambiguous");function S(e,r,t){if(s.isObjectExpression(e))return function(e,r,t){if(e.properties.some((e=>s.isSpreadElement(e)))&&t.allowExpression){const s=a(e);if(!s){var n;if(t.ambiguous)return E;const s=k(r.source,e);return f(d(`<%${null!==(n=t.modifier)&&void 0!==n?n:""} ${s} %>`,r),null==t?void 0:t.replacePatterns)}r.errors.push({message:`Unsupported node type: ${s.type}`,node:s,severity:"error"})}const o={};for(const n of e.properties)if(s.isObjectProperty(n)){if(n.computed||n.shorthand){r.errors.push({message:"Computed properties and shorthand properties are not supported",node:n.key,severity:"error"});continue}let e;if(s.isIdentifier(n.key))e=n.key.name;else{if(!s.isStringLiteral(n.key)){r.errors.push({message:`Unsupported object key type: ${n.key.type}`,node:n.key,severity:"error"});continue}e=n.key.value}o[e]=S(n.value,r,t)}else r.errors.push({message:`Unsupported property type: ${n.type}`,node:n,severity:"error"});return o}(e,r,t);if(s.isArrayExpression(e))return function(e,r,t){if(e.elements.some((e=>s.isSpreadElement(e)))&&t.allowExpression){const s=a(e);if(!s){var n;if(t.ambiguous)return E;const s=k(r.source,e);return f(d(`<%${null!==(n=t.modifier)&&void 0!==n?n:""} ${s} %>`,r),null==t?void 0:t.replacePatterns)}r.errors.push({message:`Unsupported node type: ${s.type}`,node:s,severity:"error"})}const o=[];for(const n of e.elements)null!==n?s.isSpreadElement(n)?r.errors.push({message:"Spread elements are not supported in arrays",node:n,severity:"error"}):o.push(S(n,r,t)):r.errors.push({message:"Array elements cannot be empty",node:e,severity:"error"});return o}(e,r,t);if(s.isStringLiteral(e)||s.isNumericLiteral(e)||s.isBooleanLiteral(e))return e.value;if(s.isNullLiteral(e))return null;if(!s.isIdentifier(e)||"undefined"!==e.name){if(t.allowUseBrick&&s.isArrowFunctionExpression(e)){const n=e.body;if(s.isBlockStatement(n))return r.errors.push({message:"Block statements are not supported in render callback",node:n,severity:"error"}),null;const o=[];for(const t of e.params){if(!s.isIdentifier(t))return r.errors.push({message:`Unsupported parameter type: ${t.type}`,node:t,severity:"error"}),null;o.push(t.name)}return{params:o,children:$([n],r,void 0,t)}}if(s.isExpression(e)&&t.allowExpression){const s=a(e);if(s)return r.errors.push({message:`Unsupported node type: ${s.type}`,node:s,severity:"error"}),null;{var n;if(t.ambiguous)return E;const s=k(r.source,e);return f(d(`<%${null!==(n=t.modifier)&&void 0!==n?n:""} ${s} %>`,r),null==t?void 0:t.replacePatterns)}}return r.errors.push({message:`Unsupported node type: ${e.type}`,node:e,severity:"error"}),null}}function w(e,r,t){let n=!1;if(s.traverse(e,{enter(e,r){var t;let o;n||s.isStringLiteral(e)||s.isNumericLiteral(e)||s.isBooleanLiteral(e)||s.isNullLiteral(e)||s.isObjectExpression(e)||s.isArrayExpression(e)||s.isObjectProperty(e)||s.isIdentifier(e)&&(o=null===(t=r[r.length-1])||void 0===t?void 0:t.node,1)&&(o&&s.isObjectProperty(o)?!o.computed&&!o.shorthand:"undefined"===e.name)||(n=!0)}}),n&&!a(e)){var o;const n=k(r.source,e);return f(d(`<%${null!==(o=t.modifier)&&void 0!==o?o:""} ${n} %>`,r),null==t?void 0:t.replacePatterns)}return S(e,r,t)}function k(e,r){const t=[];s.traverse(r,{enter(e){s.isTSTypeAnnotation(e)||s.isTSTypeParameterInstantiation(e)?t.push([e.start,e.end]):s.isTSAsExpression(e)&&t.push([e.expression.end,e.end])}});let n="",o=r.start;for(const[r,s]of t)r>o&&(n+=e.substring(o,r),o=s);return n+=e.substring(o,r.end),n}function I(e,r){e.async||e.generator?r.errors.push({message:"Function declaration cannot be async or generator",node:e,severity:"error"}):e.id?r.functions.push({name:e.id.name,source:m(r.source.slice(e.start,e.end),r,e.id.name),typescript:!0}):r.errors.push({message:"Function declaration must have a name",node:e,severity:"error"})}function j(e,r,t,n,s,o,i){var a;const p=g(e,r,t);if(!p)return null;r.contracts.add(p.api);const l={name:n,scope:r.templateCollection?"template":"view",config:i,...p};if(s){if(s.length>("catch"===o?1:2))return r.errors.push({message:`".${o}()" expects no more than 2 arguments, but got ${s.length}`,node:s[1],severity:"error"}),!1;if(s.length>0){const e=A(s[0],r);e&&(l["catch"===o?"rejectTransform":"transform"]=e)}if("catch"!==o&&s.length>1){const e=A(s[1],r);e&&(l.rejectTransform=e)}}(null!==(a=r.templateCollection)&&void 0!==a?a:r).dataSources.push(l)}function A(e,r){if(!s.isArrowFunctionExpression(e))return r.errors.push({message:`".then()" callback expects an arrow function, but got ${e.type}`,node:e,severity:"error"}),null;if(!s.isExpression(e.body))return r.errors.push({message:`".then()" callback function body expects an expression, but got ${e.body.type}`,node:e.body,severity:"error"}),null;var t;if(e.params.length>1)return r.errors.push({message:`".then()" callback function expects exactly 0 or 1 parameter, but got ${e.params.length}`,node:null!==(t=e.params[1])&&void 0!==t?t:e,severity:"error"}),null;const n=`<% ${k(r.source,e.body)} %>`;if(0===e.params.length)return n;const o=e.params[0];return s.isIdentifier(o)?f(n,new Map([[o.name,"DATA"]])):(r.errors.push({message:`".then()" callback function parameter expects an identifier, but got ${o.type}`,node:o,severity:"error"}),null)}function C(e,r,t,n){if(e.async||e.generator)return void r.errors.push({message:"Function declaration cannot be async or generator",node:e,severity:"error"});if("template"===t){if(e.params.length>1)return void r.errors.push({message:`Component function expects at most 1 parameter, but got ${e.params.length}`,node:e.params[1],severity:"error"})}else if(e.params.length>0)return void r.errors.push({message:`View function expects no parameter, but got ${e.params.length}`,node:e.params[0],severity:"error"});let o,i,a,p;if("template"===t){o=[],i=new Map,a=[],p=[];const t=[];r.templateCollection={identifiers:o,setters:i,dataSources:p,events:t};const n=e.params[0];if(n){if(!s.isObjectPattern(n))return r.errors.push({message:`Component function parameter expects an object pattern, but got ${n.type}`,node:n,severity:"error"}),void delete r.templateCollection;for(const e of n.properties){if(s.isRestElement(e)){r.errors.push({message:"Component function parameter does not support rest element",node:e,severity:"error"});continue}if(e.computed||!e.shorthand){r.errors.push({message:"Unexpected computed or non-shorthand property in component function parameter",node:e,severity:"error"});continue}if(!s.isIdentifier(e.key)){r.errors.push({message:`Component function parameter property expects an identifier as key, but got ${e.key.type}`,node:e.key,severity:"error"});continue}const n=e.key.name;if(/^on[A-Z]/.test(n))s.isIdentifier(e.value)||r.errors.push({message:`Event handler property "${n}" expects an identifier as value, but got ${e.value.type}`,node:e.value,severity:"error"}),t.push(n);else if(o.push(n),s.isAssignmentPattern(e.value)){const t=S(e.value.right,r,{allowExpression:!0});a.push({name:n,expose:!0,value:t})}else a.push({name:n,expose:!0})}}}else o=r.contexts,i=r.contextSetters,a=r.variables,p=r.dataSources;for(const r of e.body.body)if(s.isVariableDeclaration(r))for(const e of r.declarations)if(s.isCallExpression(e.init)&&s.isIdentifier(e.init.callee))switch(e.init.callee.name){case"useState":if(s.isArrayPattern(e.id)){const[r,t]=e.id.elements;if(s.isIdentifier(r)){const e=r.name;o.push(e),s.isIdentifier(t)&&i.set(t.name,e)}}break;case"useResource":if(s.isArrayPattern(e.id)){const[r]=e.id.elements;if(s.isIdentifier(r)){const e=r.name;o.push(e)}}}else s.isIdentifier(e.id)&&o.push(e.id.name);for(const o of e.body.body)if(s.isVariableDeclaration(o)){if("const"!==o.kind){r.errors.push({message:`Unsupported variable declaration kind: ${o.kind}`,node:o,severity:"error"});continue}for(const e of o.declarations){if(e.init&&s.isCallExpression(e.init)&&s.isIdentifier(e.init.callee))switch(e.init.callee.name){case"useState":{if(!s.isArrayPattern(e.id)){r.errors.push({message:`"useState()" return value must be destructured into an array pattern, received ${e.id.type}`,node:e.id,severity:"error"});continue}const[t,n]=e.id.elements;if(!s.isIdentifier(t)){r.errors.push({message:`"useState()" expects an identifier as the variable name, received ${null==t?void 0:t.type}`,node:t,severity:"error"});continue}if(n&&!s.isIdentifier(n)){r.errors.push({message:`"useState()" expects an identifier as the setter name, received ${n.type}`,node:n,severity:"error"});continue}const o=t.name,i=e.init.arguments;if(0===i.length)a.push({name:o,expose:!1});else{i.length>1&&r.errors.push({message:`"useState()" expects at most 1 argument, but got ${i.length}`,node:e.init,severity:"error"});const t=S(i[0],r,{allowExpression:!0});a.push({name:o,expose:!1,value:t})}continue}case"useResource":{if(!s.isArrayPattern(e.id)){r.errors.push({message:`"useResource()" return value must be destructured into an array pattern, received ${e.id.type}`,node:e.id,severity:"error"});continue}const[t]=e.id.elements;if(!s.isIdentifier(t)){r.errors.push({message:`"useResource()" expects an identifier as the variable name, received ${null==t?void 0:t.type}`,node:t,severity:"error"});continue}const o=t.name,i=e.init.arguments;(0===i.length||i.length>2)&&r.errors.push({message:`"useResource()" expects 1 or 2 arguments, but got ${i.length}`,node:e.init,severity:"error"});const a=i[0];if(!s.isArrowFunctionExpression(a)){r.errors.push({message:`"useResource()" expects an arrow function as the argument, but got ${a.type}`,node:a,severity:"error"});continue}if(a.async||a.generator){r.errors.push({message:'"useResource()" argument function cannot be async or generator',node:a,severity:"error"});continue}const p=a.body;if(s.isBlockStatement(p)){r.errors.push({message:'Block statement is not supported in "useResource()" argument function',node:p,severity:"error"});continue}if(!s.isCallExpression(p)){r.errors.push({message:`"useResource()" argument function must return a call expression, but got ${p.type}`,node:p,severity:"error"});continue}const{callee:l}=p;if(!s.isIdentifier(l)&&!s.isMemberExpression(l)){r.errors.push({message:`"useResource()" argument function must return a call to an identifier or member expression, but got ${l.type}`,node:l,severity:"error"});continue}const u=i[1];let c;if(u){if(!s.isObjectExpression(u)){r.errors.push({message:`"useResource()" second argument must be an object expression, but got ${u.type}`,node:u,severity:"error"});continue}for(const e of u.properties){if(!s.isObjectProperty(e)){r.errors.push({message:`Unsupported property type in "useResource()" second argument: ${e.type}`,node:e,severity:"error"});continue}const t=e.key;s.isIdentifier(t)?e.computed?r.errors.push({message:'"useResource()" second argument property key cannot be computed',node:t,severity:"error"}):"enabled"===t.name||"fallback"===t.name?(null!=c||(c={}),c[t.name]=S(e.value,r,{allowExpression:!0})):r.errors.push({message:`"useResource()" second argument property key must be "enabled" or "fallback", but got "${t.name}"`,node:t,severity:"error"}):r.errors.push({message:`"useResource()" second argument property key must be an identifier, but got ${t.type}`,node:t,severity:"error"})}}if(s.isMemberExpression(l)){if(!s.isIdentifier(l.property)||l.computed||"then"!==l.property.name&&"catch"!==l.property.name){r.errors.push({message:"Unexpected awaited expression",node:l.property,severity:"error"});continue}j(l.object,r,n,o,p.arguments,l.property.name,c)}else j(p,r,n,o,void 0,void 0,c);continue}}if(!s.isIdentifier(e.id)){r.errors.push({message:`Expect an identifier as the variable name, received ${e.id.type}`,node:e.id,severity:"error"});continue}const t=e.id.name;if(null==e.init)e.id.typeAnnotation||r.errors.push({message:`Variable "${t}" with no initial value must have a type annotation`,node:e.id,severity:"error"}),a.push({name:t});else{const n=S(e.init,r,{allowExpression:!0});a.push({name:t,value:n})}}}else{if(s.isReturnStatement(o)){var l;if(!s.isJSXElement(o.argument))return void r.errors.push({message:`Exported default declaration must be a JSX element, but got ${null===(l=o.argument)||void 0===l?void 0:l.type}`,node:o.argument,severity:"error"});const i=$([o.argument],r,n);return void("template"===t?(r.templates.push({name:e.id.name,variables:a,dataSources:p,components:i}),delete r.templateCollection):r.components.push(...i))}s.isTSInterfaceDeclaration(o)||s.isTSTypeAliasDeclaration(o)||r.errors.push({message:`Unsupported top level statement type: ${o.type}`,node:o,severity:"error"})}r.errors.push({message:"Component function declaration must have a return statement returning a JSX element",node:e,severity:"error"})}function P(e,r,t){for(const t of e.program.body)s.isFunctionDeclaration(t)&&t.id&&!T(t.id)&&r.functionNames.push(t.id.name);for(const n of e.program.body)if(s.isFunctionDeclaration(n)){if(!n.id){r.errors.push({message:"Function declaration must have a name",node:n,severity:"error"});continue}T(n.id)?C(n,r,"template",t):I(n,r)}else if(s.isExportDefaultDeclaration(n)){if(!s.isFunctionDeclaration(n.declaration)){r.errors.push({message:`Expected function declaration as default export, but got ${n.declaration.type}`,node:n.declaration,severity:"error"});continue}C(n.declaration,r,"view",t)}else s.isTSInterfaceDeclaration(n)||s.isTSTypeAliasDeclaration(n)||r.errors.push({message:`Unsupported top level statement type: ${n.type}`,node:n,severity:"error"})}function T(e){return e.name[0]>="A"&&e.name[0]<="Z"}(0,t(47695).p)(class{parse(e,r){return function(e,r){var t,o;const i=[],a={source:e,dataSources:[],variables:[],components:[],componentsMap:new Map,errors:i,contexts:null!==(t=null==r?void 0:r.withContexts)&&void 0!==t?t:[],contextSetters:new Map,functionNames:[],functions:[],contracts:new Set,templates:[]};let p;try{p=(0,n.parse)(e,{plugins:["jsx","typescript"],sourceType:"module",errorRecovery:!0})}catch(e){return i.push({message:`Failed to parse TSX: ${e}`,node:null,severity:"fatal"}),a}if(null!==(o=p.errors)&&void 0!==o&&o.length)for(const e of p.errors)i.push({message:`${e.code}: ${e.reasonCode}`,node:null,severity:"error"});for(const e of p.program.body)if(s.isExportDefaultDeclaration(e)){if(s.isFunctionDeclaration(e.declaration))return P(p,a,r),a;break}return function(e,r,t){const{errors:n,contexts:o,functionNames:i,variables:a}=r;s.traverse(e.program,{enter(e){s.isTSAnyKeyword(e)?n.push({message:"Unexpected 'any' type",node:e,severity:"warning"}):s.isTSAsExpression(e)&&n.push({message:"Unexpected 'as' usage",node:e,severity:"warning"})}});for(const r of e.program.body)if(s.isVariableDeclaration(r))for(const e of r.declarations)s.isIdentifier(e.id)&&o.push(e.id.name);else s.isFunctionDeclaration(r)&&r.id&&i.push(r.id.name);let p=!1;for(const o of e.program.body)if(s.isVariableDeclaration(o)){if(p&&n.push({message:"Unexpected variable declaration after export",node:o,severity:"error"}),"let"!==o.kind&&"const"!==o.kind){n.push({message:`Unsupported variable declaration kind: ${o.kind}`,node:o,severity:"error"});continue}for(const e of o.declarations){if(!s.isIdentifier(e.id)){n.push({message:`Expect an identifier as the variable name, received ${e.id.type}`,node:e.id,severity:"error"});continue}const o=e.id.name;if(null==e.init)e.id.typeAnnotation||n.push({message:`Variable "${o}" with no initial value must have a type annotation`,node:e.id,severity:"error"}),a.push({name:o});else if(s.isAwaitExpression(e.init)){const i=e.init.argument;if(!s.isCallExpression(i)){n.push({message:`Await expression must be a call expression, received ${i.type}`,node:i,severity:"error"});continue}const{callee:a}=i;if(!s.isIdentifier(a)&&!s.isMemberExpression(a)){n.push({message:`Await expression must call an identifier or member expression, received ${a.type}`,node:a,severity:"error"});continue}if(s.isMemberExpression(a)){if(!s.isIdentifier(a.property)||a.computed||"then"!==a.property.name&&"catch"!==a.property.name){n.push({message:"Unexpected awaited expression",node:a.property,severity:"error"});continue}j(a.object,r,t,o,i.arguments,a.property.name)}else j(i,r,t,o)}else{const t=S(e.init,r,{allowExpression:!0});a.push({name:o,value:t})}}}else if(s.isFunctionDeclaration(o))p&&n.push({message:"Unexpected function declaration after export",node:o,severity:"error"}),I(o,r);else if(s.isExportDefaultDeclaration(o)){p=!0;const e=o.declaration;if(!s.isJSXElement(e)){n.push({message:`Exported default declaration must be a JSX element, but got ${e.type}`,node:e,severity:"error"});continue}const i=$([e],r,t);r.components.push(...i)}else s.isTSInterfaceDeclaration(o)||s.isTSTypeAliasDeclaration(o)||n.push({message:`Unsupported top level statement type: ${o.type}`,node:o,severity:"error"})}(p,a,r),a}(e,r)}})}},b={};function $(e){var r=b[e];if(void 0!==r)return r.exports;var t=b[e]={exports:{}};return x[e](t,t.exports,$),t.exports}$.m=x,$.c=b,$.x=()=>{var e=$.O(void 0,[5521,4957,1321,580],(()=>$(9474)));return $.O(e)},e=[],$.O=(r,t,n,s)=>{if(!t){var o=1/0;for(l=0;l<e.length;l++){for(var[t,n,s]=e[l],i=!0,a=0;a<t.length;a++)(!1&s||o>=s)&&Object.keys($.O).every((e=>$.O[e](t[a])))?t.splice(a--,1):(i=!1,s<o&&(o=s));if(i){e.splice(l--,1);var p=n();void 0!==p&&(r=p)}}return r}s=s||0;for(var l=e.length;l>0&&e[l-1][2]>s;l--)e[l]=e[l-1];e[l]=[t,n,s]},$.d=(e,r)=>{for(var t in r)$.o(r,t)&&!$.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},$.f={},$.e=e=>Promise.all(Object.keys($.f).reduce(((r,t)=>($.f[t](e,r),r)),[])),$.u=e=>"chunks/"+e+"."+{1122:"95231c39",4957:"f878df32",5521:"ef48a4d3",6773:"afd27a30"}[e]+".js",$.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),$.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),$.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{$.S={};var e={},r={};$.I=(t,n)=>{n||(n=[]);var s=r[t];if(s||(s=r[t]={}),!(n.indexOf(s)>=0)){if(n.push(s),e[t])return e[t];$.o($.S,t)||($.S[t]={}),$.S[t];var o=[];return e[t]=o.length?Promise.all(o).then((()=>e[t]=1)):1}}})(),(()=>{var e;$.g.importScripts&&(e=$.g.location+"");var r=$.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),$.p=e+"../"})(),r=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},t=(e,t)=>{e=r(e),t=r(t);for(var n=0;;){if(n>=e.length)return n<t.length&&"u"!=(typeof t[n])[0];var s=e[n],o=(typeof s)[0];if(n>=t.length)return"u"==o;var i=t[n],a=(typeof i)[0];if(o!=a)return"o"==o&&"n"==a||"s"==a||"u"==o;if("o"!=o&&"u"!=o&&s!=i)return s<i;n++}},n=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var s=1,o=1;o<e.length;o++)s--,t+="u"==(typeof(a=e[o]))[0]?"-":(s>0?".":"")+(s=2,a);return t}var i=[];for(o=1;o<e.length;o++){var a=e[o];i.push(0===a?"not("+p()+")":1===a?"("+p()+" || "+p()+")":2===a?i.pop()+" "+i.pop():n(a))}return p();function p(){return i.pop().replace(/^\((.+)\)$/,"$1")}},s=(e,t)=>{if(0 in e){t=r(t);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,a=1,p=!0;;a++,i++){var l,u,c=a<e.length?(typeof e[a])[0]:"";if(i>=t.length||"o"==(u=(typeof(l=t[i]))[0]))return!p||("u"==c?a>n&&!o:""==c!=o);if("u"==u){if(!p||"u"!=c)return!1}else if(p)if(c==u)if(a<=n){if(l!=e[a])return!1}else{if(o?l>e[a]:l<e[a])return!1;l!=e[a]&&(p=!1)}else if("s"!=c&&"n"!=c){if(o||a<=n)return!1;p=!1,a--}else{if(a<=n||u<c!=o)return!1;p=!1}else"s"!=c&&"n"!=c&&(p=!1,a--)}}var d=[],m=d.pop.bind(d);for(i=1;i<e.length;i++){var f=e[i];d.push(1==f?m()|m():2==f?m()&m():f?s(f,t):!m())}return!!m()},o=(e,r)=>e&&$.o(e,r),i=e=>(e.loaded=1,e.get()),a=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),p=(e,r,n)=>{var s=n?a(e[r]):e[r];return Object.keys(s).reduce(((e,r)=>!e||!s[e].loaded&&t(e,r)?r:e),0)},l=(e,r,t,s)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+n(s)+")",u=e=>{throw new Error(e)},c=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},d=(e,r,t)=>t?t():((e,r)=>u("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),m=(e=>function(r,t,n,s,o){var i=$.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,$.S[r],t,!1,s,o)):e(r,$.S[r],t,n,s,o)})(((e,r,t,n,a,u)=>{if(!o(r,t))return d(e,t,u);var m=p(r,t,n);return s(a,m)||c(l(r,t,m,a)),i(r[t][m])})),f={},y={71321:()=>m("default","@next-core/cook",!1,[0],(()=>Promise.all([$.e(1122),$.e(580)]).then((()=>()=>$(61122))))),40580:()=>m("default","@babel/parser",!1,[0],(()=>$.e(6773).then((()=>()=>$(46773)))))},g={580:[40580],1321:[71321]},h={},$.f.consumes=(e,r)=>{$.o(g,e)&&g[e].forEach((e=>{if($.o(f,e))return r.push(f[e]);if(!h[e]){var t=r=>{f[e]=0,$.m[e]=t=>{delete $.c[e],t.exports=r()}};h[e]=!0;var n=r=>{delete f[e],$.m[e]=t=>{throw delete $.c[e],r}};try{var s=y[e]();s.then?r.push(f[e]=s.then(t).catch(n)):t(s)}catch(e){n(e)}}}))},(()=>{var e={9474:1};$.f.i=(r,t)=>{e[r]||/^(1321|580)$/.test(r)||importScripts($.p+$.u(r))};var r=globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[],t=r.push.bind(r);r.push=r=>{var[n,s,o]=r;for(var i in s)$.o(s,i)&&($.m[i]=s[i]);for(o&&o($);n.length;)e[n.pop()]=1;t(r)}})(),v=$.x,$.x=()=>Promise.all([5521,4957,1321,580].map($.e,$)).then(v),$.x()})();
2
+ //# sourceMappingURL=9474.59a27cc1.js.map