@next-bricks/visual-builder 1.35.0 → 1.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +14 -16
- package/dist/chunks/5656.4a08dca6.js +3 -0
- package/dist/chunks/5656.4a08dca6.js.map +1 -0
- package/dist/chunks/{5814.7b571c77.js → 5814.71e5fb63.js} +3 -3
- package/dist/chunks/5814.71e5fb63.js.map +1 -0
- package/dist/chunks/718.ce596d7d.js +3 -0
- package/dist/chunks/718.ce596d7d.js.map +1 -0
- package/dist/chunks/7507.c0a5c220.js +2 -0
- package/dist/chunks/7507.c0a5c220.js.map +1 -0
- package/dist/chunks/{9080.fe043f12.js → 9080.b97eaf67.js} +2 -2
- package/dist/chunks/{9080.fe043f12.js.map → 9080.b97eaf67.js.map} +1 -1
- package/dist/chunks/inject-chat-preview-agent.a410cac2.js +2 -0
- package/dist/chunks/inject-chat-preview-agent.a410cac2.js.map +1 -0
- package/dist/chunks/main.816fb03a.js +2 -0
- package/dist/chunks/main.816fb03a.js.map +1 -0
- package/dist/chunks/property-editor.f89cf2fe.js +2 -0
- package/dist/chunks/property-editor.f89cf2fe.js.map +1 -0
- package/dist/chunks/workbench-history-action.ef06b6ef.js +3 -0
- package/dist/chunks/{workbench-history-action.976d14c0.js.map → workbench-history-action.ef06b6ef.js.map} +1 -1
- package/dist/index.340f9461.js +2 -0
- package/dist/index.340f9461.js.map +1 -0
- package/dist/manifest.json +54 -60
- package/dist/types.json +338 -608
- package/dist-types/bootstrap.d.ts +0 -1
- package/package.json +2 -2
- package/dist/chunks/2252.fdcd5468.js +0 -3
- package/dist/chunks/2252.fdcd5468.js.LICENSE.txt +0 -11
- package/dist/chunks/2252.fdcd5468.js.map +0 -1
- package/dist/chunks/548.5dce9a79.js +0 -3
- package/dist/chunks/548.5dce9a79.js.LICENSE.txt +0 -20
- package/dist/chunks/548.5dce9a79.js.map +0 -1
- package/dist/chunks/5814.7b571c77.js.map +0 -1
- package/dist/chunks/6862.cb8418c5.js +0 -2
- package/dist/chunks/6862.cb8418c5.js.map +0 -1
- package/dist/chunks/718.4da7e7c3.js +0 -3
- package/dist/chunks/718.4da7e7c3.js.map +0 -1
- package/dist/chunks/8144.c19b5f90.js +0 -3
- package/dist/chunks/8144.c19b5f90.js.map +0 -1
- package/dist/chunks/9027.ae3dd6a1.js +0 -2
- package/dist/chunks/9027.ae3dd6a1.js.map +0 -1
- package/dist/chunks/9740.3d0c9ba9.js +0 -2
- package/dist/chunks/9740.3d0c9ba9.js.map +0 -1
- package/dist/chunks/inject-chat-preview-agent.73e5e6da.js +0 -2
- package/dist/chunks/inject-chat-preview-agent.73e5e6da.js.map +0 -1
- package/dist/chunks/inject-preview-agent.b12c08c4.js +0 -2
- package/dist/chunks/inject-preview-agent.b12c08c4.js.map +0 -1
- package/dist/chunks/main.8bd04251.js +0 -2
- package/dist/chunks/main.8bd04251.js.map +0 -1
- package/dist/chunks/property-editor.079839d6.js +0 -2
- package/dist/chunks/property-editor.079839d6.js.map +0 -1
- package/dist/chunks/workbench-history-action.976d14c0.js +0 -3
- package/dist/index.cabccf48.js +0 -2
- package/dist/index.cabccf48.js.map +0 -1
- package/dist-types/data-providers/collect-used-contracts.d.ts +0 -2
- package/dist-types/data-providers/collect-used-contracts.spec.d.ts +0 -1
- package/dist-types/data-providers/inject-preview-agent.d.ts +0 -3
- package/dist-types/data-providers/preview/capture.d.ts +0 -1
- package/dist-types/data-providers/preview/connect.d.ts +0 -3
- package/dist-types/data-providers/preview/connect.spec.d.ts +0 -1
- package/dist-types/data-providers/preview/inspector.d.ts +0 -6
- package/dist-types/data-providers/preview/interfaces.d.ts +0 -486
- package/dist-types/data-providers/preview/realTimeDataInspect.d.ts +0 -13
- package/dist-types/data-providers/preview/realTimeDataInspect.spec.d.ts +0 -1
- package/dist-types/data-providers/preview/resizeScreenshot.d.ts +0 -1
- package/dist-types/data-providers/preview/resizeScreenshot.spec.d.ts +0 -1
- /package/dist/chunks/{8144.c19b5f90.js.LICENSE.txt → 5656.4a08dca6.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{5814.7b571c77.js.LICENSE.txt → 5814.71e5fb63.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{718.4da7e7c3.js.LICENSE.txt → 718.ce596d7d.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{workbench-history-action.976d14c0.js.LICENSE.txt → workbench-history-action.ef06b6ef.js.LICENSE.txt} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 8144.c19b5f90.js.LICENSE.txt */
|
|
2
|
-
"use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[8144],{8144:(e,t,n)=>{n.r(t);var a,i=n(4635),r=n(918),o=n(6902),s=n(5536),l=n(6121),c=n(829),d=n(2740),h=n(8769),p=n.n(h),u=n(4782),m=n(1389),g=n(7180),v=n(9765),b=n(3373),f=n.n(b);let A,y,E,k,w,x,N,L,C,M,T,O,R,I,S;const _=(0,m.wrapBrick)("eo-icon"),{defineElement:D,property:P,event:W}=(0,u.createDecorators)();let $;var B=new WeakMap,F=new WeakMap,U=new WeakMap,z=new WeakMap,V=new WeakSet,K=new WeakMap,j=new WeakMap,H=new WeakMap;class X extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,V),(0,r.A)(this,B,y(this)),(0,r.A)(this,F,(E(this),k(this))),(0,r.A)(this,U,(w(this),x(this))),(0,r.A)(this,z,(N(this),L(this))),(0,r.A)(this,K,(T(this),e=>{e!==this.active&&(this.active=e,(0,s.A)(V,this,C).emit(e))})),(0,r.A)(this,j,O(this)),(0,r.A)(this,H,(S(this),()=>{(0,s.A)(V,this,R).emit()}))}get titleLabel(){return(0,c.A)(B,this)}set titleLabel(e){(0,l.A)(B,this,e)}get active(){return(0,c.A)(F,this)}set active(e){(0,l.A)(F,this,e)}get badge(){return(0,c.A)(U,this)}set badge(e){(0,l.A)(U,this,e)}render(){return p().createElement(Y,{titleLabel:this.titleLabel,active:this.active,badge:this.badge,onActiveChange:(0,c.A)(K,this),onFirstActivated:(0,c.A)(H,this)})}}function Y(e){let{titleLabel:t,active:n,badge:a,onActiveChange:i,onFirstActivated:r}=e;const[o,s]=(0,h.useState)(n),[l,c]=(0,h.useState)(!1);(0,h.useEffect)((()=>{s(n)}),[n]),(0,h.useEffect)((()=>{null==i||i(o)}),[o,i]);const d=(0,h.useCallback)((()=>{s((e=>!e)),l||o||(c(!0),null==r||r())}),[l,o,r]),u=(0,h.useRef)(),[m,g]=(0,h.useState)(!1),v=(0,h.useMemo)((()=>function(e){let t;const n=()=>cancelAnimationFrame(t),a=function(){for(var e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];t&&n(),t=requestAnimationFrame((()=>{(()=>{g(u.current.scrollTop>0)})(...a)}))};return a.cancel=n,a}()),[]);return p().createElement("div",{className:f()("pane",{scrolled:m})},p().createElement("div",{className:"pane-header",tabIndex:0,onClick:d},p().createElement("div",{className:"pane-title"},p().createElement("span",{className:"title-icon"},o?p().createElement(_,{lib:"antd",theme:"outlined",icon:"down"}):p().createElement(_,{lib:"antd",theme:"outlined",icon:"right"})),p().createElement("div",{className:"title-label"},t),p().createElement("slot",{name:"title"})),p().createElement("slot",{name:"actions"}),a&&p().createElement("div",{className:"badge"},a),p().createElement("div",{className:"pane-scroll-shadow"})),p().createElement("div",{className:"pane-body custom-scrollbar-container",onScroll:v,ref:u},p().createElement("slot",null,p().createElement("div",{style:{padding:"10px 20px",color:"var(--text-color-secondary)"}},"No content"))))}a=X,({e:[y,E,k,w,x,N,L,C,M,T,O,R,I,S],c:[$,A]}=(0,d.A)(a,[D("visual-builder.workbench-pane",{styleTexts:[g.A,v.A]})],[[P(),1,"titleLabel"],[P({type:Boolean}),1,"active"],[P({type:Number}),1,"badge"],[W({type:"active.change"}),1,"activeChangeEvent",e=>(0,c.A)(z,e),(e,t)=>(0,l.A)(z,e,t)],[W({type:"active.firstActivated"}),1,"activeFirstActivatedEvent",e=>(0,c.A)(j,e),(e,t)=>(0,l.A)(j,e,t)]],0,(e=>H.has((0,o.A)(e))),m.ReactNextElement)),A();var q,G=n(4586),J=n(2150);let Z,Q,ee;const{defineElement:te,property:ne}=(0,u.createDecorators)();let ae;var ie=new WeakMap,re=new WeakMap,oe=new WeakMap,se=new WeakMap;class le extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ie,Q(this)),(0,r.A)(this,re,(ee(this),()=>{var e;return null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot:not([name])")})),(0,r.A)(this,oe,(()=>{const e=(0,c.A)(re,this).call(this).assignedNodes();for(const t of e)t.active?t.style.flex=String(t.activeFlex??"1"):t.style.flex="initial"})),(0,r.A)(this,se,(e=>{const t=e.target.assignedNodes();for(const e of t)e.addEventListener("active.change",(0,c.A)(oe,this))})),(0,G.A)(this,"refCallback",(()=>{(0,c.A)(oe,this).call(this);const e=(0,c.A)(re,this).call(this);null==e||e.addEventListener("slotchange",(e=>{(0,c.A)(se,this).call(this,e)}))}))}get titleLabel(){return(0,c.A)(ie,this)}set titleLabel(e){(0,l.A)(ie,this,e)}render(){return p().createElement(ce,{titleLabel:this.titleLabel,refCallback:this.refCallback})}}function ce(e){let{titleLabel:t,refCallback:n}=e;return p().createElement("div",{className:"sidebar",ref:n},p().createElement("div",{className:"title-container"},p().createElement("div",{className:"title-label"},t),p().createElement("slot",{name:"titleToolbar"})),p().createElement("div",{className:"pane-container"},p().createElement("slot",null)))}q=le,({e:[Q,ee],c:[ae,Z]}=(0,d.A)(q,[te("visual-builder.workbench-sidebar",{styleTexts:[J.A]})],[[ne(),1,"titleLabel"]],0,void 0,m.ReactNextElement)),Z();var de,he=n(5292);let pe,ue,me,ge,ve,be,fe,Ae,ye,Ee,ke;const{defineElement:we,property:xe}=(0,u.createDecorators)(),Ne=(0,m.wrapBrick)("eo-link"),Le=(0,m.wrapBrick)("eo-icon");let Ce;var Me=new WeakMap,Te=new WeakMap,Oe=new WeakMap,Re=new WeakMap,Ie=new WeakMap;class Se extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Me,ue(this)),(0,r.A)(this,Te,(me(this),ge(this))),(0,r.A)(this,Oe,(ve(this),be(this))),(0,r.A)(this,Re,(fe(this),Ae(this))),(0,r.A)(this,Ie,(ye(this),Ee(this))),ke(this)}get icon(){return(0,c.A)(Me,this)}set icon(e){(0,l.A)(Me,this,e)}get to(){return(0,c.A)(Te,this)}set to(e){(0,l.A)(Te,this,e)}get active(){return(0,c.A)(Oe,this)}set active(e){(0,l.A)(Oe,this,e)}get href(){return(0,c.A)(Re,this)}set href(e){(0,l.A)(Re,this,e)}get target(){return(0,c.A)(Ie,this)}set target(e){(0,l.A)(Ie,this,e)}render(){return p().createElement(_e,{to:this.to,icon:this.icon,active:this.active,href:this.href,target:this.target})}}function _e(e){let{icon:t,to:n,active:a,href:i,target:r}=e;return p().createElement(Ne,{className:f()("action",{active:a}),url:n,href:i,target:r},p().createElement(Le,t))}de=Se,({e:[ue,me,ge,ve,be,fe,Ae,ye,Ee,ke],c:[Ce,pe]}=(0,d.A)(de,[we("visual-builder.workbench-action",{styleTexts:[he.A]})],[[xe({attribute:!1}),1,"icon"],[xe(),1,"to"],[xe({type:Boolean}),1,"active"],[xe(),1,"href"],[xe(),1,"target"]],0,void 0,m.ReactNextElement)),pe();var De=n(8581),Pe=n(1201),We=n(1030);function $e(e,t,n,a){const i=[],r=[],o=[];let s=0;return e&&e.forEach((e=>{if(e.key=""===a?`${s}`:`${a}.${s}`,function(e){return"group"===e.type}(e)||function(e,t){return Boolean("subMenu"===e.type||void 0)}(e)){const a=$e(e.items,t,n,e.key);i.push(...a.selectedKeys),(a.selectedKeys.length||e.defaultExpanded)&&r.push(e.key),r.push(...a.openedKeys),o.push(...a.matchedKeys)}else if(function(e,t,n){if(!e.to)return!1;const a="object"==typeof e.to?e.to:(0,Pe.parsePath)(e.to),i=a.pathname.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");let r=!!(0,De.matchPath)(t,{path:i,exact:e.exact});if(r&&e.activeMatchSearch&&(r=Be(n,a.search)),!r&&Array.isArray(e.activeIncludes))for(const a of e.activeIncludes){let e,i=!0;(0,We.isObject)(a)?(e=Array.isArray(a.path)?a.path:[a.path],i=a.exact):e=[a];for(const a of e){var o;let e;const s=a.includes("?");if(s&&(e=(0,Pe.parsePath)(a)),r=!!(0,De.matchPath)(t,{path:s?e.pathname:a,exact:i}),r&&null!==(o=e)&&void 0!==o&&o.search&&(r=Be(n,e.search)),r)break}if(r)break}if(r&&Array.isArray(e.activeExcludes))for(const n of e.activeExcludes){let e,a=!0;(0,We.isObject)(n)?(e=Array.isArray(n.path)?n.path:[n.path],a=n.exact):e=[n];for(const n of e)if(r=!(0,De.matchPath)(t,{path:n,exact:a}),!r)break;if(!r)break}return r}(e,t,n)){i.push(String(e.key));const t=e.key.split(".");for(let e=0;e<t.length;e++)o.push(t.slice(0,e+1).join("."))}s+=1})),i.length&&""!==a&&r.push(a),{selectedKeys:i,openedKeys:r,matchedKeys:o}}function Be(e,t){const n=new URLSearchParams(e),a=new URLSearchParams(t);for(const[e,t]of a.entries())if((n.get(e)??"")!==t)return!1;return!0}var Fe,Ue=n(3430);let ze,Ve,Ke,je,He;const Xe=(0,m.wrapBrick)("visual-builder.workbench-action"),{defineElement:Ye,property:qe}=(0,u.createDecorators)();let Ge;var Je=new WeakMap,Ze=new WeakMap;class Qe extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Je,Ve(this)),(0,r.A)(this,Ze,(Ke(this),je(this))),He(this)}get appId(){return(0,c.A)(Je,this)}set appId(e){(0,l.A)(Je,this,e)}get menu(){return(0,c.A)(Ze,this)}set menu(e){(0,l.A)(Ze,this,e)}render(){return p().createElement(nt,{appId:this.appId,menu:this.menu})}}let et;Fe=Qe,({e:[Ve,Ke,je,He],c:[Ge,ze]}=(0,d.A)(Fe,[Ye("visual-builder.workbench-action-list",{styleTexts:[Ue.A]})],[[qe(),1,"appId"],[qe({attribute:!1}),1,"menu"]],0,void 0,m.ReactNextElement)),ze();const tt=new Map;function nt(e){var t;let{appId:n,menu:a}=e;const i=(0,De.getHistory)(),[r,o]=(0,h.useState)(),[s,l]=(0,h.useState)(i.location);return(0,h.useEffect)((()=>{const e=i.listen((e=>{l(e)}));return e}),[i]),(0,h.useEffect)((()=>{et||(et=n),et!==n&&(tt.clear(),et=n)}),[n]),(0,h.useEffect)((()=>{const{pathname:e,search:t}=s,{selectedKeys:n}=$e((null==a?void 0:a.menuItems)??[],e,t,"");o(Number(n[0]))}),[a,s]),p().createElement("div",{className:"workBenchActionList"},null==a||null===(t=a.menuItems)||void 0===t?void 0:t.map(((e,t)=>{if((e=>"default"===e.type||!e.type)(e)){let n=e.to;return r!==t&&tt.has(t)&&(n=tt.get(t)),p().createElement(Xe,{key:t,icon:e.icon,to:n,href:e.href,target:e.target,active:r===t,onClick:()=>(e=>{e.href||tt.set(r,`${s.pathname}${s.search}`)})(e)})}})).filter(Boolean))}var at,it=n(4940),rt=n(7758),ot=n(9406),st=n(675),lt=n(7995),ct=n(6275);let dt,ht,pt,ut,mt,gt,vt,bt,ft,At,yt,Et,kt,wt,xt,Nt,Lt,Ct,Mt,Tt,Ot,Rt,It,St,_t,Dt,Pt,Wt,$t,Bt,Ft,Ut,zt,Vt,Kt,jt,Ht,Xt,Yt,qt,Gt,Jt,Zt,Qt,en,tn,nn,an,rn,on,sn,ln,cn,dn,hn,pn,un;function mn(e){return e.key}n(6477);const{defineElement:gn,property:vn,event:bn}=(0,u.createDecorators)();let fn;var An=new WeakMap,yn=new WeakMap,En=new WeakMap,kn=new WeakMap,wn=new WeakMap,xn=new WeakMap,Nn=new WeakMap,Ln=new WeakMap,Cn=new WeakMap,Mn=new WeakMap,Tn=new WeakMap,On=new WeakMap,Rn=new WeakMap,In=new WeakMap,Sn=new WeakMap,_n=new WeakMap,Dn=new WeakMap,Pn=new WeakMap,Wn=new WeakMap,$n=new WeakSet,Bn=new WeakMap,Fn=new WeakMap,Un=new WeakMap,zn=new WeakMap,Vn=new WeakMap,Kn=new WeakMap,jn=new WeakMap,Hn=new WeakMap,Xn=new WeakMap;class Yn extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,$n),(0,r.A)(this,An,ht(this)),(0,r.A)(this,yn,(pt(this),ut(this))),(0,r.A)(this,En,(mt(this),gt(this))),(0,r.A)(this,kn,(vt(this),bt(this))),(0,r.A)(this,wn,(ft(this),At(this))),(0,r.A)(this,xn,(yt(this),Et(this))),(0,r.A)(this,Nn,(kt(this),wt(this))),(0,r.A)(this,Ln,(xt(this),Nt(this))),(0,r.A)(this,Cn,(Lt(this),Ct(this))),(0,r.A)(this,Mn,(Mt(this),Tt(this))),(0,r.A)(this,Tn,(Ot(this),Rt(this))),(0,r.A)(this,On,(It(this),St(this))),(0,r.A)(this,Rn,(_t(this),Dt(this))),(0,r.A)(this,In,(Pt(this),Wt(this))),(0,r.A)(this,Sn,($t(this),Bt(this))),(0,r.A)(this,_n,(Ft(this),Ut(this))),(0,r.A)(this,Dn,(zt(this),Vt(this))),(0,r.A)(this,Pn,(Kt(this),jt(this))),(0,r.A)(this,Wn,(Ht(this),Xt(this))),(0,r.A)(this,Bn,(Gt(this),e=>{(0,s.A)($n,this,Yt).emit(e)})),(0,r.A)(this,Fn,Jt(this)),(0,r.A)(this,Un,(en(this),e=>()=>{(0,s.A)($n,this,Zt).emit(e.data)})),(0,r.A)(this,zn,tn(this)),(0,r.A)(this,Vn,(rn(this),e=>{(0,s.A)($n,this,nn).emit(e)})),(0,r.A)(this,Kn,on(this)),(0,r.A)(this,jn,(cn(this),e=>t=>{t.preventDefault(),(0,s.A)($n,this,sn).emit({active:!0,node:null==e?void 0:e.data,x:t.clientX,y:t.clientY})})),(0,r.A)(this,Hn,dn(this)),(0,r.A)(this,Xn,(un(this),(e,t)=>{(0,s.A)($n,this,hn).emit({nodeId:e,collapsed:t})}))}get nodes(){return(0,c.A)(An,this)}set nodes(e){(0,l.A)(An,this,e)}get actions(){return(0,c.A)(yn,this)}set actions(e){(0,l.A)(yn,this,e)}get actionsHidden(){return(0,c.A)(En,this)}set actionsHidden(e){(0,l.A)(En,this,e)}get placeholder(){return(0,c.A)(kn,this)}set placeholder(e){(0,l.A)(kn,this,e)}get isTransformName(){return(0,c.A)(wn,this)}set isTransformName(e){(0,l.A)(wn,this,e)}get searchPlaceholder(){return(0,c.A)(xn,this)}set searchPlaceholder(e){(0,l.A)(xn,this,e)}get noSearch(){return(0,c.A)(Nn,this)}set noSearch(e){(0,l.A)(Nn,this,e)}get activeKey(){return(0,c.A)(Ln,this)}set activeKey(e){(0,l.A)(Ln,this,e)}get showMatchedNodeOnly(){return(0,c.A)(Cn,this)}set showMatchedNodeOnly(e){(0,l.A)(Cn,this,e)}get matchNodeDataFields(){return(0,c.A)(Mn,this)}set matchNodeDataFields(e){(0,l.A)(Mn,this,e)}get fixedActionsFor(){return(0,c.A)(Tn,this)}set fixedActionsFor(e){(0,l.A)(Tn,this,e)}get collapsible(){return(0,c.A)(On,this)}set collapsible(e){(0,l.A)(On,this,e)}get collapsedNodes(){return(0,c.A)(Rn,this)}set collapsedNodes(e){(0,l.A)(Rn,this,e)}get allowDrag(){return(0,c.A)(In,this)}set allowDrag(e){(0,l.A)(In,this,e)}get allowDragToRoot(){return(0,c.A)(Sn,this)}set allowDragToRoot(e){(0,l.A)(Sn,this,e)}get allowDragToInside(){return(0,c.A)(_n,this)}set allowDragToInside(e){(0,l.A)(_n,this,e)}get nodeKey(){return(0,c.A)(Dn,this)}set nodeKey(e){(0,l.A)(Dn,this,e)}get skipNotify(){return(0,c.A)(Pn,this)}set skipNotify(e){(0,l.A)(Pn,this,e)}render(){return p().createElement(it.e.Provider,{value:{actions:this.actions,actionsHidden:this.actionsHidden,onActionClick:(0,c.A)(Bn,this)}},p().createElement(ot.N.Provider,{value:{activeKey:this.activeKey,basePaddingLeft:5,showMatchedNodeOnly:this.showMatchedNodeOnly,isTransformName:this.isTransformName,fixedActionsFor:this.fixedActionsFor,nodeKey:this.nodeKey,collapsible:this.collapsible,collapsedNodes:this.collapsedNodes,getCollapsedId:mn,onNodeToggle:(0,c.A)(Xn,this),skipNotify:this.skipNotify,clickFactory:(0,c.A)(Un,this),contextMenuFactory:(0,c.A)(jn,this),matchNode:(e,t)=>{var n;return(0,st.U)(e.name,t)||!(null===(n=this.matchNodeDataFields)||void 0===n||!n.length)&&(0,st.U)("*"===this.matchNodeDataFields?e.data:(0,We.pick)(e.data,this.matchNodeDataFields),t)}}},p().createElement(rt.cU,{nodes:this.nodes,placeholder:this.placeholder,searchPlaceholder:this.searchPlaceholder,noSearch:this.noSearch,dropEmit:(0,c.A)(Vn,this),allowDrag:this.allowDrag,allowDragToInside:this.allowDragToInside,allowDragToRoot:this.allowDragToRoot})))}}at=Yn,({e:[ht,pt,ut,mt,gt,vt,bt,ft,At,yt,Et,kt,wt,xt,Nt,Lt,Ct,Mt,Tt,Ot,Rt,It,St,_t,Dt,Pt,Wt,$t,Bt,Ft,Ut,zt,Vt,Kt,jt,Ht,Xt,Yt,qt,Gt,Jt,Zt,Qt,en,tn,nn,an,rn,on,sn,ln,cn,dn,hn,pn,un],c:[fn,dt]}=(0,d.A)(at,[gn("visual-builder.workbench-tree",{styleTexts:[lt.A,ct.A]})],[[vn({attribute:!1}),1,"nodes"],[vn({attribute:!1}),1,"actions"],[vn({type:Boolean}),1,"actionsHidden"],[vn(),1,"placeholder"],[vn({type:Boolean}),1,"isTransformName"],[vn(),1,"searchPlaceholder"],[vn({type:Boolean}),1,"noSearch"],[vn({attribute:!1}),1,"activeKey"],[vn({type:Boolean}),1,"showMatchedNodeOnly"],[vn({attribute:!1}),1,"matchNodeDataFields"],[vn({attribute:!1}),1,"fixedActionsFor"],[vn({type:Boolean}),1,"collapsible"],[vn({attribute:!1}),1,"collapsedNodes"],[vn({type:Boolean}),1,"allowDrag"],[vn({type:Boolean}),1,"allowDragToRoot"],[vn({type:Boolean}),1,"allowDragToInside"],[vn({type:String}),1,"nodeKey"],[vn({type:Boolean}),1,"skipNotify"],[bn({type:"action.click"}),1,"actionClickEvent",e=>(0,c.A)(Wn,e),(e,t)=>(0,l.A)(Wn,e,t)],[bn({type:"node.click"}),1,"nodeClickEvent",e=>(0,c.A)(Fn,e),(e,t)=>(0,l.A)(Fn,e,t)],[bn({type:"node.drop"}),1,"nodeDropEvent",e=>(0,c.A)(zn,e),(e,t)=>(0,l.A)(zn,e,t)],[bn({type:"context.menu"}),1,"nodeContextMenuEvent",e=>(0,c.A)(Kn,e),(e,t)=>(0,l.A)(Kn,e,t)],[bn({type:"node.toggle"}),1,"nodeToggleEvent",e=>(0,c.A)(Hn,e),(e,t)=>(0,l.A)(Hn,e,t)]],0,(e=>Xn.has((0,o.A)(e))),m.ReactNextElement)),dt();var qn=n(279),Gn=n(9027);n(6788),customElements.define("visual-builder.inject-preview-agent",(0,qn.createProviderClass)((function(e,t){return(0,Gn.A)(e,t)})));var Jn=n(155),Zn=n.n(Jn),Qn=n(1361),ea=n(5502);let ta=function(e){return e.LOAD_MORE="LOAD_MORE",e.LOADING="LOADING",e.NO_DATA="NO_DATA",e.NODE="NODE",e.ADD="ADD",e.EDIT="EDIT",e.DELETE="DELETE",e.IMPORT="IMPORT",e.CLONE="CLONE",e.APPEND_RELATION="APPEND_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REMOVE_RELATION="REMOVE_RELATION",e.ROLLBACK="ROLLBACK",e.ROLLBACK_ALL="ROLLBACK_ALL",e.ADD_FULL="ADD_FULL",e.EDIT_FULL="EDIT_FULL",e.DELETE_FULL="DELETE_FULL",e.IMPORT_FULL="IMPORT_FULL",e.CLONE_FULL="CLONE_FULL",e.APPEND_RELATION_FULL="APPEND_RELATION_FULL",e.UPDATE_RELATION_FULL="UPDATE_RELATION_FULL",e.REMOVE_RELATION_FULL="REMOVE_RELATION_FULL",e.ROLLBACK_FULL="ROLLBACK_FULL",e.ROLLBACK_ALL_FULL="ROLLBACK_ALL_FULL",e.PROJECT="PROJECT",e.USER="USER",e.PERMISSION="PERMISSION",e.BRICK="BRICK",e.ROUTE="ROUTE",e.TEMPLATE="TEMPLATE",e.SNIPPET="SNIPPET",e.I18N="I18N",e.IMAGE="IMAGE",e.FUNCTION="FUNCTION",e.MENU="MENU",e.MENU_ITEM="MENU_ITEM",e.WORKFLOW="WORKFLOW",e}({});const na="bricks/visual-builder/workbench-history-action";var aa=n(9740),ia=n(6330),ra=n(9422),oa=function(){var e=(0,ia.A)((function*(e,t,n){return(yield ra.http.get("api/gateway/next_builder.workspace.GetChangeHistory/api/v1/next-builder/workspace/".concat(e,"/changes"),(0,aa.A)((0,aa.A)({},n),{},{params:t}))).data}));return function(t,n,a){return e.apply(this,arguments)}}(),sa=n(8799);const la={add:`${na}:${ta.ADD}`,edit:`${na}:${ta.EDIT}`,delete:`${na}:${ta.DELETE}`,batch_delete:`${na}:${ta.DELETE}`,import:`${na}:${ta.IMPORT}`,clone:`${na}:${ta.CLONE}`,append_relation:`${na}:${ta.APPEND_RELATION}`,update_relation:`${na}:${ta.UPDATE_RELATION}`,remove_relation:`${na}:${ta.REMOVE_RELATION}`,rollback:`${na}:${ta.ROLLBACK}`,rollback_all:`${na}:${ta.ROLLBACK_ALL}`},ca={add:`${na}:${ta.ADD_FULL}`,edit:`${na}:${ta.EDIT_FULL}`,delete:`${na}:${ta.DELETE_FULL}`,batch_delete:`${na}:${ta.DELETE_FULL}`,import:`${na}:${ta.IMPORT_FULL}`,clone:`${na}:${ta.CLONE_FULL}`,append_relation:`${na}:${ta.APPEND_RELATION_FULL}`,update_relation:`${na}:${ta.UPDATE_RELATION_FULL}`,remove_relation:`${na}:${ta.REMOVE_RELATION_FULL}`,rollback:`${na}:${ta.ROLLBACK_FULL}`,rollback_all:`${na}:${ta.ROLLBACK_ALL_FULL}`},da={project:`${na}:${ta.PROJECT}`,userGroup:`${na}:${ta.USER}`,permission:`${na}:${ta.PERMISSION}`,brick:`${na}:${ta.BRICK}`,route:`${na}:${ta.ROUTE}`,template:`${na}:${ta.TEMPLATE}`,snippet:`${na}:${ta.SNIPPET}`,i18n:`${na}:${ta.I18N}`,image:`${na}:${ta.IMAGE}`,function:`${na}:${ta.FUNCTION}`,menu:`${na}:${ta.MENU}`,menuItem:`${na}:${ta.MENU_ITEM}`,workflow:`${na}:${ta.WORKFLOW}`},ha={PROJECT_MICRO_APP:`${na}:${ta.PROJECT}`,"MICRO_APP_USER_GROUP@EASYOPS":`${na}:${ta.USER}`,MICRO_APP_RESOURCE_PERMISSION:`${na}:${ta.PERMISSION}`,STORYBOARD_BRICK:`${na}:${ta.BRICK}`,STORYBOARD_ROUTE:`${na}:${ta.ROUTE}`,STORYBOARD_TEMPLATE:`${na}:${ta.TEMPLATE}`,STORYBOARD_SNIPPET:`${na}:${ta.SNIPPET}`,STORYBOARD_I18N:`${na}:${ta.I18N}`,MICRO_APP_RESOURCE_IMAGE:`${na}:${ta.IMAGE}`,STORYBOARD_FUNCTION:`${na}:${ta.FUNCTION}`,MICRO_APP_RESOURCE_MENU:`${na}:${ta.MENU}`,MICRO_APP_RESOURCE_MENU_ITEM:`${na}:${ta.MENU_ITEM}`,"WORKFLOW_DEF@EASYOPS":`${na}:${ta.WORKFLOW}`};function pa(e){var t,n,a,i,r,o,s,l,c,d,h,p;const u="rollback"!==e.action||e.rollBackIdInfo?e.action:"rollback_all",m=sa.i18n.t(da[e.category]??e.category),g=sa.i18n.t(la[u]??u),v=sa.i18n.t(ha[null===(t=e.abstract)||void 0===t?void 0:t.leftObjectId]??(null===(n=e.abstract)||void 0===n?void 0:n.leftObjectId)),b=sa.i18n.t(ha[null===(a=e.abstract)||void 0===a?void 0:a.rightObjectId]??(null===(i=e.abstract)||void 0===i?void 0:i.rightObjectId)),f=ua(null===(r=e.abstract)||void 0===r?void 0:r.nodes,null===(o=e.abstract)||void 0===o?void 0:o.nodesCount),A=ua(null===(s=e.abstract)||void 0===s?void 0:s.leftNodes,null===(l=e.abstract)||void 0===l?void 0:l.leftNodesCount),y=ua(null===(c=e.abstract)||void 0===c?void 0:c.rightNodes,null===(d=e.abstract)||void 0===d?void 0:d.rightNodesCount),E="rollback"===u?pa(e.rollBackIdInfo).abstract:null;return{category:m,action:g,leftObjectId:v,rightObjectId:b,nodes:f,leftNodes:A,rightNodes:y,abstract:sa.i18n.t(ca[u]??u,{category:m,nodes:f,leftNodes:A,rightNodes:y,nodeChanges:null===(h=e.abstract)||void 0===h||null===(h=h.nodeChanges)||void 0===h?void 0:h.join(", "),relationChanges:null===(p=e.abstract)||void 0===p||null===(p=p.relationChanges)||void 0===p?void 0:p.join(", "),leftObjectId:v,rightObjectId:b,rollbackAbstract:E}),rollbackAbstract:E}}function ua(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:", ";return sa.i18n.t(`${na}:${ta.NODE}`,{nodes:e.join(n),context:t>e.length?"ellipsis":void 0,count:t})}var ma;let ga,va,ba,fa,Aa,ya,Ea,ka,wa,xa,Na,La,Ca,Ma,Ta,Oa,Ra;(0,ea.initializeReactI18n)(na,{en:{LOAD_MORE:"Load more",LOADING:"Loading",NO_DATA:"No data",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }} etc., a total of {{ count }} items",ADD:"Add node",EDIT:"Edit node",DELETE:"Delete node",IMPORT:"Batch import node",CLONE:"Clone node",APPEND_RELATION:"Append Relation",UPDATE_RELATION:"Update Relation",REMOVE_RELATION:"Remove Relation",ROLLBACK:"Rollback",ROLLBACK_ALL:"Rollback all operations",ADD_FULL:"Add {{ category }} ({{ nodes }})",EDIT_FULL:"Edit {{ nodeChanges }} of {{ category }} ({{ nodes }})",DELETE_FULL:"Delete {{ category }} ({{ nodes }})",IMPORT_FULL:"Batch Import {{ category }} ({{ nodes }})",CLONE_FULL:"Clone {{ category }} ({{ nodes }})",APPEND_RELATION_FULL:"Append the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",UPDATE_RELATION_FULL:"Update the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",REMOVE_RELATION_FULL:"Remove the relation between {{ leftObjectId }} ({{ leftNodes }}) and {{ rightObjectId }} ({{ rightNodes }})",ROLLBACK_FULL:"Rollback to [{{ rollbackAbstract }}]",ROLLBACK_ALL_FULL:"Rollback all operations",PROJECT:"Project",USER:"User Group",PERMISSION:"Permission",BRICK:"Brick",ROUTE:"Route",TEMPLATE:"Template",SNIPPET:"Snippet",I18N:"I18N",IMAGE:"Image",FUNCTION:"Function",MENU:"Menu",MENU_ITEM:"Menu item",WORKFLOW:"Workflow"},zh:{LOAD_MORE:"加载更多",LOADING:"加载中",NO_DATA:"没有数据",NODE:"{{ nodes }}",NODE_ellipsis:"{{ nodes }}等共{{ count }}项",ADD:"新增节点",EDIT:"编辑节点",DELETE:"删除节点",IMPORT:"批量导入节点",CLONE:"克隆节点",APPEND_RELATION:"添加关系",UPDATE_RELATION:"更新关系",REMOVE_RELATION:"移除关系",ROLLBACK:"回滚",ROLLBACK_ALL:"回滚全部操作",ADD_FULL:"新增{{ category }}({{ nodes }})",EDIT_FULL:"编辑{{ category }}({{ nodes }})的 {{ nodeChanges }}",DELETE_FULL:"删除{{ category }}({{ nodes }})",IMPORT_FULL:"批量导入{{ category }}({{ nodes }})",CLONE_FULL:"克隆{{ category }}({{ nodes }})",APPEND_RELATION_FULL:"添加{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",UPDATE_RELATION_FULL:"更新{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",REMOVE_RELATION_FULL:"移除{{ leftObjectId }}({{ leftNodes }})和{{ rightObjectId }}({{ rightNodes }})的关系",ROLLBACK_FULL:"回滚到【{{ rollbackAbstract }}】",ROLLBACK_ALL_FULL:"回滚全部操作",PROJECT:"项目",USER:"用户组",PERMISSION:"权限点",BRICK:"构件",ROUTE:"路由",TEMPLATE:"模版",SNIPPET:"片段",I18N:"国际化",IMAGE:"图片",FUNCTION:"函数",MENU:"菜单",MENU_ITEM:"菜单项",WORKFLOW:"工作流"}});const{defineElement:Ia,property:Sa,event:_a}=(0,u.createDecorators)(),Da=(0,m.wrapBrick)("eo-button"),Pa=(0,m.wrapBrick)("eo-link"),Wa=(0,m.wrapBrick)("eo-icon"),$a=(0,m.wrapBrick)("eo-easyops-avatar"),Ba=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",beforeVisibleChange:"before.visible.change"});let Fa;var Ua=new WeakMap,za=new WeakMap,Va=new WeakMap,Ka=new WeakSet,ja=new WeakMap,Ha=new WeakMap,Xa=new WeakMap,Ya=new WeakMap,qa=new WeakMap;class Ga extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Ka),(0,r.A)(this,Ua,va(this)),(0,r.A)(this,za,(ba(this),fa(this))),(0,r.A)(this,Va,(Aa(this),ya(this))),(0,r.A)(this,ja,(wa(this),e=>{(0,s.A)(Ka,this,Ea).emit(e)})),(0,r.A)(this,Ha,xa(this)),(0,r.A)(this,Xa,(Ca(this),e=>{(0,s.A)(Ka,this,Na).emit(e)})),(0,r.A)(this,Ya,Ma(this)),(0,r.A)(this,qa,(Ra(this),()=>{(0,s.A)(Ka,this,Ta).emit()}))}get appId(){return(0,c.A)(Ua,this)}set appId(e){(0,l.A)(Ua,this,e)}get projectId(){return(0,c.A)(za,this)}set projectId(e){(0,l.A)(za,this,e)}render(){return p().createElement(Ja,{appId:this.appId,projectId:this.projectId,onHistoryItemClick:(0,c.A)(ja,this),onRollback:(0,c.A)(Xa,this),onRollbackAll:(0,c.A)(qa,this)})}}function Ja(e){const{appId:t,onHistoryItemClick:n,onRollback:a,onRollbackAll:i}=e,{t:r}=(0,ea.useTranslation)(na),[o,s]=(0,h.useState)(!1),[l,c]=(0,h.useState)(!0),[d,u]=(0,h.useState)(!1),[m,g]=(0,h.useState)([]),v=(0,h.useRef)(""),b=e=>{s(!0),oa(t,{ts:v.current,limit:20}).then((t=>{g((n=>{const a=t.list.map((e=>({...e,translation:pa(e)})));return e?a:n.concat(a)})),v.current=t.ts,u(t.list.length<20),c(t.list.length<20)})).catch((e=>{(0,De.handleHttpError)(e)})).finally((()=>{s(!1)}))};return p().createElement(Ba,{placement:"bottom",trigger:"click",arrow:!0,arrowColor:"var(--color-fill-bg-container-4)",beforeVisibleChange:e=>{e.detail&&(c(!0),u(!1),g([]),v.current="",b(!0))}},p().createElement(Da,{slot:"anchor",shape:"circle",className:"history-action",icon:{lib:"antd",icon:"history",theme:"outlined"}}),p().createElement("div",null,p().createElement("div",{className:"history-title"},"History"),p().createElement("div",{className:"history-list"},m.length?p().createElement(p().Fragment,null,m.map(((e,t)=>p().createElement(Za,{key:`${e.uniqueKey}-${e.ts}`,data:e,enableRollback:0!==t&&"rollback"!==e.action,current:0===t,onHistoryItemClick:n,onRollback:a}))),!l&&p().createElement("span",{className:"load-more-container"},p().createElement(Pa,{className:"load-more",disabled:o,onClick:()=>b()},r(ta.LOAD_MORE))),d&&p().createElement("span",{className:"end-container"},"The End",p().createElement(Wa,{className:"rollback-all",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>i()}))):p().createElement("div",{className:"empty"},r(o?ta.LOADING:ta.NO_DATA))),p().createElement("slot",null)))}function Za(e){const{data:t,enableRollback:n,current:a,onHistoryItemClick:i,onRollback:r}=e,o=Zn()(Number(t.ts)/1e6),s=Zn().duration(o.diff(Zn()())),l=s.days()<=-1?o.format("YYYY-MM-DD HH:mm:ss"):s.humanize(!0,{ss:0,s:60,m:60,h:24});return p().createElement("div",{className:"item-container"},p().createElement("div",{className:"item-title"},p().createElement("div",{className:"title-left",onClick:()=>i({...t,enableRollback:n})},p().createElement("div",{className:"topic",title:t.translation.abstract},t.translation.abstract),a&&p().createElement("div",{className:"branch"},"(current)")),p().createElement("div",{className:"title-right"},n&&p().createElement(Wa,{className:"rollback",lib:"antd",icon:"rollback",theme:"outlined",onClick:()=>r(t)}))),p().createElement("div",{className:"item-info"},p().createElement($a,{className:"avatar",nameOrInstanceId:t.user,size:"xs"}),p().createElement("div",{className:"time"},l),p().createElement("div",{className:"operator"},t.user)))}ma=Ga,({e:[va,ba,fa,Aa,ya,Ea,ka,wa,xa,Na,La,Ca,Ma,Ta,Oa,Ra],c:[Fa,ga]}=(0,d.A)(ma,[Ia("visual-builder.workbench-history-action",{styleTexts:[Qn.A]})],[[Sa(),1,"appId"],[Sa(),1,"projectId"],[_a({type:"history.item.click"}),1,"historyItemClickEvent",e=>(0,c.A)(Va,e),(e,t)=>(0,l.A)(Va,e,t)],[_a({type:"rollback"}),1,"rollbackEvent",e=>(0,c.A)(Ha,e),(e,t)=>(0,l.A)(Ha,e,t)],[_a({type:"rollback.all"}),1,"rollbackAllEvent",e=>(0,c.A)(Ya,e),(e,t)=>(0,l.A)(Ya,e,t)]],0,(e=>qa.has((0,o.A)(e))),m.ReactNextElement)),ga();var Qa,ei=n(2381);let ti,ni,ai,ii,ri,oi,si,li,ci,di,hi,pi,ui,mi,gi,vi,bi,fi,Ai,yi,Ei,ki,wi,xi,Ni,Li,Ci,Mi,Ti,Oi,Ri,Ii,Si,_i,Di,Pi,Wi,$i,Bi,Fi,Ui,zi,Vi,Ki,ji,Hi,Xi,Yi,qi,Gi,Ji,Zi,Qi;const{defineElement:er,property:tr,event:nr}=(0,u.createDecorators)(),ar=(0,m.wrapBrick)("eo-icon"),ir=(0,m.wrapBrick)("eo-tooltip"),rr=new Set;let or;var sr=new WeakMap,lr=new WeakMap,cr=new WeakMap,dr=new WeakMap,hr=new WeakMap,pr=new WeakMap,ur=new WeakMap,mr=new WeakMap,gr=new WeakMap,vr=new WeakSet,br=new WeakMap,fr=new WeakMap,Ar=new WeakMap,yr=new WeakMap,Er=new WeakMap,kr=new WeakMap,wr=new WeakMap,xr=new WeakMap,Nr=new WeakMap,Lr=new WeakMap,Cr=new WeakMap,Mr=new WeakMap,Tr=new WeakMap,Or=new WeakMap,Rr=new WeakMap,Ir=new WeakMap,Sr=new WeakMap;class _r extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,vr),(0,r.A)(this,sr,ni(this)),(0,r.A)(this,lr,(ai(this),ii(this))),(0,r.A)(this,cr,(ri(this),oi(this))),(0,r.A)(this,dr,(si(this),li(this))),(0,r.A)(this,hr,(ci(this),di(this))),(0,r.A)(this,pr,(hi(this),pi(this))),(0,r.A)(this,ur,(ui(this),mi(this))),(0,r.A)(this,mr,(gi(this),vi(this))),(0,r.A)(this,gr,(bi(this),fi(this))),(0,r.A)(this,br,(Ei(this),e=>{(0,s.A)(vr,this,Ai).emit(e)})),(0,r.A)(this,fr,ki(this)),(0,r.A)(this,Ar,(Ni(this),e=>{(0,s.A)(vr,this,wi).emit(e)})),(0,r.A)(this,yr,Li(this)),(0,r.A)(this,Er,(Ti(this),()=>{(0,s.A)(vr,this,Ci).emit()})),(0,r.A)(this,kr,Oi(this)),(0,r.A)(this,wr,(Si(this),()=>{(0,s.A)(vr,this,Ri).emit()})),(0,r.A)(this,xr,_i(this)),(0,r.A)(this,Nr,(Wi(this),e=>{(0,s.A)(vr,this,Di).emit(e)})),(0,r.A)(this,Lr,$i(this)),(0,r.A)(this,Cr,(Ui(this),()=>{(0,s.A)(vr,this,Bi).emit()})),(0,r.A)(this,Mr,zi(this)),(0,r.A)(this,Tr,(ji(this),e=>{(0,s.A)(vr,this,Vi).emit(e)})),(0,r.A)(this,Or,Hi(this)),(0,r.A)(this,Rr,(qi(this),e=>{(0,s.A)(vr,this,Xi).emit(e)})),(0,r.A)(this,Ir,Gi(this)),(0,r.A)(this,Sr,(Qi(this),e=>{(0,s.A)(vr,this,Ji).emit(e)}))}get label(){return(0,c.A)(sr,this)}set label(e){(0,l.A)(sr,this,e)}get type(){return(0,c.A)(lr,this)}set type(e){(0,l.A)(lr,this,e)}get external(){return(0,c.A)(cr,this)}set external(e){(0,l.A)(cr,this,e)}get subNodes(){return(0,c.A)(dr,this)}set subNodes(e){(0,l.A)(dr,this,e)}get active(){return(0,c.A)(hr,this)}set active(e){(0,l.A)(hr,this,e)}get notSynced(){return(0,c.A)(pr,this)}set notSynced(e){(0,l.A)(pr,this,e)}get disableChildAppend(){return(0,c.A)(ur,this)}set disableChildAppend(e){(0,l.A)(ur,this,e)}get autoFocusOnce(){return(0,c.A)(mr,this)}set autoFocusOnce(e){(0,l.A)(mr,this,e)}render(){return p().createElement(Dr,{label:this.label,type:this.type,external:this.external,subNodes:this.subNodes,autoFocusOnce:this.autoFocusOnce,onLabelEditingChange:(0,c.A)(br,this),onLabelChange:(0,c.A)(Ar,this),onNodeClick:(0,c.A)(Er,this),onNodeDoubleClick:(0,c.A)(wr,this),onNodeContextMenu:(0,c.A)(Nr,this),onChildAppend:(0,c.A)(Cr,this),onExternalClick:(0,c.A)(Tr,this),onSubNodeDoubleClick:(0,c.A)(Rr,this),onSubNodeContextMenu:(0,c.A)(Sr,this)})}}function Dr(e){let{label:t,type:n,external:a,subNodes:i,autoFocusOnce:r,onLabelEditingChange:o,onLabelChange:s,onNodeClick:l,onNodeDoubleClick:c,onNodeContextMenu:d,onChildAppend:u,onExternalClick:m,onSubNodeDoubleClick:g,onSubNodeContextMenu:v}=e;const b="board"===n?"board":"page",[A,y]=(0,h.useState)(t),[E,k]=(0,h.useState)(!1),w=(0,h.useRef)(!1),[x,N]=(0,h.useState)(!1),L=(0,h.useRef)(null);(0,h.useEffect)((()=>{y(t)}),[t]);const C=(0,h.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),k(!0)}),[]);(0,h.useEffect)((()=>{r&&!rr.has(r)&&(rr.add(r),setTimeout((()=>{k(!0)}),1))}),[r]),(0,h.useEffect)((()=>{var e,t;E&&(null===(e=L.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=L.current)||void 0===t||t.select())}),[E]),(0,h.useEffect)((()=>{w.current?null==o||o(E):w.current=!0}),[E,o]);const M=(0,h.useCallback)((e=>{y(e.target.value)}),[]),T=(0,h.useCallback)((e=>{const t=e.key||e.keyCode||e.which;var n;"Enter"!==t&&13!==t||null===(n=L.current)||void 0===n||n.blur()}),[]),O=(0,h.useCallback)((()=>{k(!1),N(!0)}),[]);(0,h.useEffect)((()=>{x&&(null==s||s(A),N(!1))}),[A,s,x]);const R=(0,h.useCallback)((e=>{e.stopPropagation(),null==u||u()}),[u]),I=(0,h.useCallback)((e=>{e.stopPropagation(),null==m||m(a)}),[a,m]),S=(0,h.useCallback)((e=>{e.stopPropagation()}),[]),_=38*Math.max(0,Math.floor(((null==i?void 0:i.length)??0)-3));return p().createElement(p().Fragment,null,p().createElement("div",{className:f()("node",b,{"editing-label":E}),style:{height:"board"===b?70:130+_},onClick:l,onDoubleClick:c,onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==d||d({clientX:e.clientX,clientY:e.clientY})}},p().createElement("input",{className:"label-input",value:A,ref:L,onChange:M,onKeyDown:T,onBlur:O,onDoubleClick:S,onContextMenu:S,onMouseDown:S}),p().createElement("div",{className:"label",onDoubleClick:C,onMouseDown:S},A),"board"===b?p().createElement("div",{className:"icon-container"},p().createElement(ar,{lib:"antd",icon:"unordered-list"})):p().createElement("div",{className:"thumbnail-container",style:{height:98+_}},p().createElement("div",{className:"thumbnail-placeholder"},p().createElement(ar,{lib:"antd",icon:"ellipsis"})),a&&p().createElement("div",{className:"external",onClick:I,onDoubleClick:S,onMouseDown:S},p().createElement(ar,{lib:"antd",icon:"desktop"}),p().createElement("span",{className:"external-label"},a.label)),null!=i&&i.length?p().createElement("div",{className:"sub-nodes"},i.map((e=>p().createElement(Pr,{key:e.id,subNode:e,onSubNodeDoubleClick:g,onSubNodeContextMenu:v})))):null)),p().createElement("div",{className:"add-button",role:"button",onClick:R,onMouseDown:S},p().createElement(ar,{lib:"fa",icon:"plus"})))}function Pr(e){let{subNode:t,onSubNodeDoubleClick:n,onSubNodeContextMenu:a}=e;return p().createElement(ir,{key:t.id,content:t.label},p().createElement("div",{className:"sub-node",onDoubleClick:e=>{e.stopPropagation(),null==n||n(t)},onContextMenu:e=>{e.stopPropagation(),e.preventDefault(),null==a||a({node:t,clientX:e.clientX,clientY:e.clientY})}},p().createElement("div",{className:"sub-node-skeleton-title"}),p().createElement("div",{className:"sub-node-skeleton-content"}),p().createElement("div",{className:"sub-node-skeleton-button"})))}Qa=_r,({e:[ni,ai,ii,ri,oi,si,li,ci,di,hi,pi,ui,mi,gi,vi,bi,fi,Ai,yi,Ei,ki,wi,xi,Ni,Li,Ci,Mi,Ti,Oi,Ri,Ii,Si,_i,Di,Pi,Wi,$i,Bi,Fi,Ui,zi,Vi,Ki,ji,Hi,Xi,Yi,qi,Gi,Ji,Zi,Qi],c:[or,ti]}=(0,d.A)(Qa,[er("visual-builder.page-arch-node",{styleTexts:[ei.A]})],[[tr(),1,"label"],[tr(),1,"type"],[tr({attribute:!1}),1,"external"],[tr({attribute:!1}),1,"subNodes"],[tr({type:Boolean,render:!1}),1,"active"],[tr({type:Boolean,render:!1}),1,"notSynced"],[tr({type:Boolean,render:!1}),1,"disableChildAppend"],[tr(),1,"autoFocusOnce"],[nr({type:"label.editing.change"}),1,"labelEditingChange",e=>(0,c.A)(gr,e),(e,t)=>(0,l.A)(gr,e,t)],[nr({type:"label.change"}),1,"labelChange",e=>(0,c.A)(fr,e),(e,t)=>(0,l.A)(fr,e,t)],[nr({type:"node.click"}),1,"nodeClick",e=>(0,c.A)(yr,e),(e,t)=>(0,l.A)(yr,e,t)],[nr({type:"node.dblclick"}),1,"nodeDoubleClick",e=>(0,c.A)(kr,e),(e,t)=>(0,l.A)(kr,e,t)],[nr({type:"node.contextmenu"}),1,"nodeContextMenu",e=>(0,c.A)(xr,e),(e,t)=>(0,l.A)(xr,e,t)],[nr({type:"child.append"}),1,"childAppend",e=>(0,c.A)(Lr,e),(e,t)=>(0,l.A)(Lr,e,t)],[nr({type:"external.click"}),1,"externalClick",e=>(0,c.A)(Mr,e),(e,t)=>(0,l.A)(Mr,e,t)],[nr({type:"subNode.dblclick"}),1,"subNodeDoubleClick",e=>(0,c.A)(Or,e),(e,t)=>(0,l.A)(Or,e,t)],[nr({type:"subNode.contextmenu"}),1,"subNodeContextMenu",e=>(0,c.A)(Ir,e),(e,t)=>(0,l.A)(Ir,e,t)]],0,(e=>Sr.has((0,o.A)(e))),m.ReactNextElement)),ti();var Wr,$r=n(4047),Br=n(6213),Fr=n(2559);function Ur(e,t,n,a){return t((0,Fr.A)(e,n),a),a}let zr,Vr,Kr,jr,Hr,Xr,Yr,qr,Gr;const{method:Jr,property:Zr}=(0,u.createDecorators)();var Qr=new WeakMap,eo=new WeakSet,to=new WeakMap,no=new WeakMap,ao=new WeakMap,io=new WeakMap,ro=new WeakMap,oo=new WeakMap;class so extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,eo),(0,r.A)(this,Qr,(zr(this),!1)),(0,r.A)(this,to,"normal"),(0,r.A)(this,no,!1),(0,r.A)(this,ao,Vr(this)),(0,r.A)(this,io,(Kr(this),jr(this))),(0,r.A)(this,ro,(Hr(this),Xr(this))),(0,r.A)(this,oo,(Yr(this),qr(this))),Gr(this)}get isFormItemElement(){return!0}set validateState(e){Ur(eo,po,this,e),this._render()}get validateState(){return(0,s.A)(eo,this,ho)}set notRender(e){this.hidden=e,Ur(eo,co,this,e),this._render()}get notRender(){return(0,s.A)(eo,this,lo)}get $bindFormItem(){return(0,s.A)(eo,this,uo)}set $bindFormItem(e){Ur(eo,mo,this,e),this._render()}get helpBrick(){return(0,c.A)(ao,this)}set helpBrick(e){(0,l.A)(ao,this,e)}get labelBrick(){return(0,c.A)(io,this)}set labelBrick(e){(0,l.A)(io,this,e)}get labelCol(){return(0,c.A)(ro,this)}set labelCol(e){(0,l.A)(ro,this,e)}get wrapperCol(){return(0,c.A)(oo,this)}set wrapperCol(e){(0,l.A)(oo,this,e)}setNotRender(e){this.notRender=e}getFormElement(){let e=this;for(;(e=e.parentNode)&&e&&!e.isFormElement;);return e}}function lo(e){return(0,c.A)(Qr,e)}function co(e,t){(0,l.A)(Qr,e,t)}function ho(e){return(0,c.A)(to,e)}function po(e,t){(0,l.A)(to,e,t)}function uo(e){return(0,c.A)(no,e)}function mo(e,t){(0,l.A)(no,e,t)}Wr=so,[Vr,Kr,jr,Hr,Xr,Yr,qr,Gr,zr]=(0,d.A)(Wr,[],[[Zr({attribute:!1}),1,"helpBrick"],[Zr({attribute:!1}),1,"labelBrick"],[Zr({attribute:!1}),1,"labelCol"],[Zr({attribute:!1}),1,"wrapperCol"],[Jr(),2,"setNotRender"],[Jr(),2,"getFormElement"]],0,void 0,m.ReactNextElement).e;var go=function(){var e=(0,ia.A)((function*(e,t){return(yield ra.http.post("api/gateway/next_builder.contract_center.SearchContract/api/v1/contract/search",e,t)).data}));return function(t,n){return e.apply(this,arguments)}}();let vo=function(e){return e.CONTRACT_OPTIONS_TIPS_PREFIX="CONTRACT_OPTIONS_TIPS_PREFIX",e.CONTRACT_OPTIONS_TIPS_SUFFIX="CONTRACT_OPTIONS_TIPS_SUFFIX",e.CONTRACT_VALIDATE_MESSAGE="CONTRACT_VALIDATE_MESSAGE",e}({});const bo="bricks/visual-builder/contract-select",fo={en:{CONTRACT_OPTIONS_TIPS_PREFIX:"Only the first",CONTRACT_OPTIONS_TIPS_SUFFIX:"items are displayed, please search for more results",CONTRACT_VALIDATE_MESSAGE:"Please fill in the correct contract name "},zh:{CONTRACT_OPTIONS_TIPS_PREFIX:"仅展示前",CONTRACT_OPTIONS_TIPS_SUFFIX:"项,更多结果请搜索",CONTRACT_VALIDATE_MESSAGE:"请填写正确的契约名称"}};(0,ea.initializeReactI18n)(bo,fo);const Ao=(0,m.wrapBrick)("eo-icon"),yo=(0,m.wrapBrick)("eo-input",{onChange:"change"});function Eo(e){const{itemsCount:t=20,onBlur:n}=e,[a,i]=(0,h.useState)(t),{t:r}=(0,ea.useTranslation)(bo),[o,s]=(0,h.useState)(!1);return p().createElement("div",{className:"options-tips",slot:e.slot},r(vo.CONTRACT_OPTIONS_TIPS_PREFIX)," ",o?p().createElement(yo,{autoFocus:!0,inputStyle:{width:65},value:String(a),onBlur:()=>{s(!1),null==n||n(a)},onChange:e=>{i(Number(e.detail))}}):p().createElement("span",null,a," ",p().createElement(Ao,{icon:"edit",lib:"antd",onClick:()=>{s(!0)}}))," ",r(vo.CONTRACT_OPTIONS_TIPS_SUFFIX))}var ko;let wo,xo,No,Lo,Co,Mo,To,Oo,Ro,Io,So,_o,Do,Po,Wo;(0,ea.initializeReactI18n)(bo,fo);const{defineElement:$o,property:Bo,event:Fo}=(0,u.createDecorators)(),Uo=(0,m.wrapBrick)("eo-form-item"),zo=(0,m.wrapBrick)("eo-auto-complete",{onChange:"change"});let Vo;var Ko=new WeakMap,jo=new WeakMap,Ho=new WeakMap,Xo=new WeakMap,Yo=new WeakMap,qo=new WeakMap,Go=new WeakSet;function Jo(e){if("string"!=typeof e)return{name:"",version:""};const[t,n]=e.split(":");return{name:t,version:n}}function Zo(e){return/.*@.*:\d+\.\d+\.\d+/.test(e)}function Qo(e){return(0,We.isNil)(e)||Zo(e)?"":sa.i18n.t(`${bo}:${vo.CONTRACT_VALIDATE_MESSAGE}`)}function es(e){let{value:t,inputStyle:n,validateState:a,suffix:i,onChange:r}=e;const[o,s]=(0,h.useState)(),[l,c]=(0,h.useState)(20),d=function(e){let{pageSize:t=20,q:n=""}=e;const[a,i]=(0,h.useState)([]),[r,o]=(0,h.useState)(n),[s,l]=(0,h.useState)(t);return(0,h.useEffect)((()=>{o(n)}),[n]),(0,h.useEffect)((()=>{l(t)}),[t]),(0,h.useEffect)((()=>{(async()=>{try{const{list:e}=await go({page:1,pageSize:s,fullContractName:r},{interceptorParams:{ignoreLoadingBar:!0}});i(e)}catch(e){console.error(e),i([])}})()}),[r,s]),a}({q:o,pageSize:l}),[u,m]=(0,h.useState)(Jo(t)),[g,v]=(0,h.useState)([]);(0,h.useEffect)((()=>{m(Jo(t))}),[t]);const b=(0,h.useMemo)((()=>(0,We.debounce)((e=>{s(e)}),200)),[]);return p().createElement("div",{className:"contract-wrapper"},p().createElement(zo,{className:"contract-selector",options:null==d?void 0:d.map((e=>({value:e.fullContractName,label:e.fullContractName}))),value:u.name,inputStyle:n,validateState:a,onChange:e=>{const t=e.detail;if(Zo(t))m(Jo(t)),null==r||r(t);else{var n;const e=null===(n=d.find((e=>e.fullContractName===t)))||void 0===n?void 0:n.version,a=(null==e?void 0:e[0])??"";v(e),m({name:t,version:a}),null==r||r(`${t}:${a}`)}b(t)}},p().createElement(Eo,{onBlur:e=>c(e),slot:"options-toolbar"})),p().createElement(zo,{className:"version-selector",value:u.version,validateState:a,options:null==g?void 0:g.map((e=>({value:e,label:e}))),onChange:e=>{const t=e.detail;m({name:u.name,version:t}),null==r||r(`${u.name}:${t}`)}}),null!=i&&i.useBrick?p().createElement($r.ReactUseMultipleBricks,i):null)}ko=class extends so{constructor(){super(...arguments),(0,i.A)(this,Go),(0,r.A)(this,Ko,xo(this)),(0,r.A)(this,jo,(No(this),Lo(this))),(0,r.A)(this,Ho,(Co(this),Mo(this))),(0,r.A)(this,Xo,(To(this),Oo(this))),(0,r.A)(this,Yo,(Ro(this),Io(this))),(0,r.A)(this,qo,(So(this),_o(this))),(0,G.A)(this,"handleChange",(Wo(this),e=>{(0,s.A)(Go,this,Do).emit(e)}))}get name(){return(0,c.A)(Ko,this)}set name(e){(0,l.A)(Ko,this,e)}get required(){return(0,c.A)(jo,this)}set required(e){(0,l.A)(jo,this,e)}get label(){return(0,c.A)(Ho,this)}set label(e){(0,l.A)(Ho,this,e)}get value(){return(0,c.A)(Xo,this)}set value(e){(0,l.A)(Xo,this,e)}get suffix(){return(0,c.A)(Yo,this)}set suffix(e){(0,l.A)(Yo,this,e)}render(){return p().createElement(Uo,{exportparts:"message",curElement:this,formElement:this.getFormElement(),name:this.name,label:this.label,required:this.required,labelBrick:this.labelBrick,helpBrick:this.helpBrick,notRender:this.notRender,trigger:"handleChange",validator:Qo},p().createElement(es,{value:this.value,suffix:this.suffix,validateState:this.validateState,onChange:this.handleChange}))}},({e:[xo,No,Lo,Co,Mo,To,Oo,Ro,Io,So,_o,Do,Po,Wo],c:[Vo,wo]}=(0,d.A)(ko,[$o("visual-builder.contract-select",{styleTexts:[Br.A]})],[[Bo(),1,"name"],[Bo({type:Boolean}),1,"required"],[Bo(),1,"label"],[Bo({attribute:!1}),1,"value"],[Bo({attribute:!1}),1,"suffix"],[Fo({type:"change"}),1,"changeEvent",e=>(0,c.A)(qo,e),(e,t)=>(0,l.A)(qo,e,t)]],0,(e=>Go.has((0,o.A)(e))),so)),wo();var ts,ns=n(7540);let as,is,rs,os,ss,ls,cs,ds,hs,ps,us,ms,gs,vs,bs,fs;const As=(0,m.wrapBrick)("eo-menu"),ys=(0,m.wrapBrick)("eo-menu-item"),Es=(0,m.wrapBrick)("eo-tooltip"),ks=(0,qn.unwrapProvider)("basic.lock-body-scroll");(0,ea.initializeReactI18n)("bricks/visual-builder/generate-snippets-context-menu",{en:{},zh:{}});const{defineElement:ws,property:xs,event:Ns,method:Ls}=(0,u.createDecorators)();let Cs;var Ms=new WeakMap,Ts=new WeakMap,Os=new WeakMap,Rs=new WeakMap,Is=new WeakSet,Ss=new WeakMap,_s=new WeakMap,Ds=new WeakMap;class Ps extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Is),(0,r.A)(this,Ms,(as(this),rs(this))),(0,r.A)(this,Ts,(os(this),ss(this))),(0,r.A)(this,Os,(ls(this),cs(this))),(0,r.A)(this,Rs,(ds(this),hs(this))),(0,r.A)(this,Ss,(ms(this),gs(this))),(0,r.A)(this,_s,(fs(this),e=>{(0,s.A)(Is,this,ps).emit(e)})),(0,r.A)(this,Ds,(e=>{(0,s.A)(Is,this,vs).emit(e)}))}get options(){return(0,c.A)(Ms,this)}set options(e){(0,l.A)(Ms,this,e)}get active(){return(0,c.A)(Ts,this)}set active(e){(0,l.A)(Ts,this,e)}get position(){return(0,c.A)(Os,this)}set position(e){(0,l.A)(Os,this,e)}open(e){let{position:t}=e;this.active=!0,this.position=t}close(){this.active=!1,this.position=void 0}disconnectedCallback(){super.disconnectedCallback(),ks(this,!1)}render(){return p().createElement(Ws,{active:this.active,element:this,position:this.position,onItemDragStart:(0,c.A)(_s,this),onItemDragEnd:(0,c.A)(Ds,this),options:this.options})}}function Ws(e){var t,n;let{element:a,active:i,onItemDragEnd:r,onItemDragStart:o,options:s,position:l}=e;const[c,d]=(0,h.useState)(!1),u=(0,h.useRef)(null),[m,g]=(0,h.useState)(null),v=(0,h.useCallback)((e=>{e.preventDefault(),null==a||a.close()}),[a]),b=(0,h.useCallback)(((e,t)=>{var n;d(!0),t.dragConf&&(null===(n=e.dataTransfer)||void 0===n||n.setData(t.dragConf.format,JSON.stringify(t.dragConf.data))),e.target.classList.add("dragging"),null==o||o(t)}),[o]),f=(0,h.useCallback)(((e,t)=>{d(!1),e.target.classList.remove("dragging"),null==a||a.close(),null==r||r(t)}),[a,r]);return(0,h.useEffect)((()=>{ks(a,i)}),[i,a]),(0,h.useEffect)((()=>{if(i&&u.current&&l){const e=u.current.getBoundingClientRect(),t=e.width+8,n=e.height+8,{clientWidth:a,clientHeight:i}=document.documentElement,r=[...l];a>t&&l[0]+t>a&&(r[0]=l[0]-t),i>n&&l[1]+n>i&&(r[1]=i-n),g(r)}else g(null)}),[i,l]),p().createElement(p().Fragment,null,!c&&p().createElement("div",{className:"mask",onClick:v,onContextMenu:v}),p().createElement("div",{className:"container",ref:u,style:{left:null===(t=m??l)||void 0===t?void 0:t[0],top:null===(n=m??l)||void 0===n?void 0:n[1],visibility:m?"visible":"hidden"}},null==s?void 0:s.map(((e,t)=>{var n,a;return p().createElement("div",{key:t},p().createElement("div",{className:"title"},e.title),(null===(n=e.children)||void 0===n?void 0:n.length)&&p().createElement(As,null,null===(a=e.children)||void 0===a?void 0:a.map(((e,t)=>p().createElement(Es,{content:e.tooltip,hoist:!0,placement:"left",key:t},p().createElement(ys,{disabled:e.disabled,icon:e.icon,draggable:!e.disabled,onDragStart:t=>b(t,e),onDragEnd:t=>f(t,e)},e.text))))))}))))}ts=Ps,({e:[rs,os,ss,ls,cs,ds,hs,ps,us,ms,gs,vs,bs,fs,as],c:[Cs,is]}=(0,d.A)(ts,[ws("visual-builder.generate-snippets-context-menu",{styleTexts:[ns.A]})],[[xs({attribute:!1}),1,"options"],[xs({type:Boolean}),1,"active"],[xs({attribute:!1}),1,"position"],[Ns({type:"item.drag.start"}),1,"itemDragStartEvent",e=>(0,c.A)(Rs,e),(e,t)=>(0,l.A)(Rs,e,t)],[Ns({type:"item.drag.end"}),1,"itemDragEndEvent",e=>(0,c.A)(Ss,e),(e,t)=>(0,l.A)(Ss,e,t)],[Ls(),2,"open"],[Ls(),2,"close"]],0,(e=>Ds.has((0,o.A)(e))),m.ReactNextElement)),is();var $s=n(1085),Bs=n(3091),Fs=n(7447),Us=n(3640),zs=n(4360),Vs=n(3544),Ks=n(4650),js=n(9830);function Hs(){function e(e,t,n){if(!n||"pre"!==n.tagName||"code"!==e.tagName)return;const a=function(e){const t=e.properties.className||[];for(const e of t)if("language-"===e.slice(0,9))return e.slice(9).toLowerCase();return null}(e);if(null===a)return;let i;try{n.properties.className=(n.properties.className||[]).concat("language-"+a),i=js.L.highlight((0,Ks.d)(e),a)}catch{return}e.children=i.children}return t=>{(0,Vs.YR)(t,"element",e)}}const Xs={Fragment:$s.Fragment,jsx:$s.jsx,jsxs:$s.jsxs};function Ys(e){let{content:t}=e;const[n,a]=(0,h.useState)(null);return(0,h.useEffect)((()=>{let e=!1;return(0,Bs.l)().use(Fs.A).use(Us.A).use([Hs]).use(zs.A,Xs).process(t).then((t=>{e||a(t.result)})).catch((t=>{e||(console.error("Convert markdown failed:",t),a(null))})),()=>{e=!0}}),[t]),n}const qs=(0,m.wrapBrick)("eo-avatar");function Gs(e){let{message:t}=e;const n=(0,h.useMemo)((()=>{const e=[];if("assistant"===t.role){const n=/(?:^|\n)```(easy_cmd_\S+)\n([\s\S]*?)\n```(?:$|\n)/gm;let a,i=0;for(;a=n.exec(t.content);){const[r,o,s]=a,l=a.index,c=t.content.slice(i,l).trim();c.length>0&&e.push({type:"markdown",content:c}),e.push({type:"command",command:o,content:s.trim(),raw:r}),i=n.lastIndex}const r=t.content.slice(i).trim();r.length>0&&e.push({type:"markdown",content:r})}else e.push({type:"plain",content:t.content});return e}),[t.content,t.role]),a=(0,h.useRef)(null);return(0,h.useEffect)((()=>{const e=a.current;e&&setTimeout((()=>{const n=e.parentElement.querySelectorAll(".texting");for(const e of n)e.classList.remove("texting");if(!t.partial)return;let a=e;for(;a;){const e=a.lastChild;if((null==e?void 0:e.nodeType)!==Node.ELEMENT_NODE||"DETAILS"===(null==e?void 0:e.tagName)&&!e.open){var i;if((null==e?void 0:e.nodeType)!==Node.TEXT_NODE||0!==e.textContent.trim().length||(null===(i=e.previousSibling)||void 0===i?void 0:i.nodeType)!==Node.ELEMENT_NODE)break;a=e.previousSibling}else a=e}a.classList.add("texting")}),1)}),[t.partial,t.content]),p().createElement("div",{className:f()("message",{failed:t.failed})},p().createElement("div",{className:"avatar"},p().createElement(qs,{icon:{lib:"easyops",icon:"assistant"===t.role?"robot":"account"},size:"small",className:`role-${t.role}`})),p().createElement("div",{className:"main"},p().createElement("div",{className:"label"},"assistant"===t.role?"Assistant":"You"),p().createElement("div",{className:"content",ref:a},n.map(((e,t)=>p().createElement(Js,{key:t,chunk:e}))))))}function Js(e){let{chunk:t}=e;return p().createElement(p().Fragment,null,"markdown"===t.type?p().createElement("div",{className:"markdown"},p().createElement(Ys,{content:t.content})):"command"===t.type?p().createElement(p().Fragment,null,p().createElement("details",{className:"command"},p().createElement("summary",null,"```",t.command),p().createElement("pre",null,p().createElement("code",null,t.content)))):p().createElement("div",{className:"plain"},t.content))}var Zs,Qs=n(7236);let el,tl,nl,al,il,rl,ol,sl,ll;const{defineElement:cl,property:dl,event:hl}=(0,u.createDecorators)();let pl;var ul=new WeakMap,ml=new WeakMap,gl=new WeakMap,vl=new WeakSet,bl=new WeakMap;class fl extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,vl),(0,r.A)(this,ul,tl(this)),(0,r.A)(this,ml,(nl(this),al(this))),(0,r.A)(this,gl,(il(this),rl(this))),(0,r.A)(this,bl,(ll(this),e=>{(0,s.A)(vl,this,ol).emit(e)}))}get messages(){return(0,c.A)(ul,this)}set messages(e){(0,l.A)(ul,this,e)}get errorBoundary(){return(0,c.A)(ml,this)}set errorBoundary(e){(0,l.A)(ml,this,e)}render(){return p().createElement(Al,{host:this,messages:this.messages,errorBoundary:this.errorBoundary,onStoryboardUpdate:(0,c.A)(bl,this)})}}function Al(e){let{messages:t,host:n,errorBoundary:a,onStoryboardUpdate:i}=e;const r=(0,h.useMemo)((()=>/(?:^|\n)```easy_cmd_vb_block_(page|storyboard)\n([\s\S]*?)\n```(?:$|\n)/gm),[]),o=(0,h.useRef)(new Map),[s,l]=(0,h.useState)([]),c=(0,h.useRef)(!1);(0,h.useEffect)((()=>{for(const e of t??[]){if("assistant"!==e.role)continue;let t;r.lastIndex=o.current.get(e.key)??0;const n=[];let a=!1;for(;t=r.exec(e.content);){o.current.set(e.key,r.lastIndex);const[,i,s]=t;try{const e=JSON.parse(s);"page"===i?(a=!0,n.push(...e)):n.push({...e,type:"item"})}catch(e){console.error("parse storyboard failed:",e)}}a?l(n):n.length>0&&l((e=>[...e,...n]))}}),[r,t]);const[d,u]=(0,h.useState)([]);(0,h.useEffect)((()=>{const e=[],t=new Map;for(const n of s)"block"===n.type?e.push(n):n.storyboard&&t.set(n.uuid,n.storyboard);e.sort(((e,t)=>e.seq-t.seq));const n={brick:"eo-content-layout",children:[]},i={brick:"eo-main-view",children:[{brick:"eo-page-title",slot:"pageTitle",properties:{pageTitle:"测试页面"}}]};let r=!1;for(const o of e)if("全局操作区"===o.name)for(const e of o.children){const n=t.get(e);n&&(i.children.push({...n,properties:{...n.properties,slot:void 0},errorBoundary:a,slot:"toolbar",iid:`item:${e}`,meta:{type:"item",uuid:e,block:{uuid:o.uuid,name:o.name}}}),r=!0)}else{const e=t.get(o.uuid);if(e){const i={...e,children:[],errorBoundary:a,iid:`block:${o.uuid}`,meta:{type:"block",uuid:o.uuid,name:o.name}};r=!0,n.children.push(i);for(const e of o.children){const n=t.get(e);n&&i.children.push({...n,errorBoundary:a,iid:`item:${e}`,meta:{type:"item",uuid:e}})}}else if(!o.hasContainer)for(const e of o.children){const i=t.get(e);i&&(n.children.push({...i,errorBoundary:a,iid:`item:${e}`,meta:{type:"item",uuid:e}}),r=!0)}}i.children.push(n),u((e=>r?[i]:0===e.length?e:[]))}),[s,a]),(0,h.useEffect)((()=>{null==i||i(d)}),[i,d]);const m=(0,h.useMemo)((()=>{let e=n;for(;e;){const t=getComputedStyle(e,null).getPropertyValue("overflow-y");if("auto"===t||"scroll"===t)return e;if(e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else{if(!(e.parentNode instanceof Element))break;e=e.parentNode}}return document.scrollingElement||document.documentElement}),[n]);return(0,h.useEffect)((()=>{c.current||setTimeout((()=>{m.scrollTo(0,m.scrollHeight)}),1)}),[t,m]),(0,h.useEffect)((()=>{const e=()=>{c.current=m.scrollTop+m.clientHeight+6<m.scrollHeight};return m.addEventListener("scroll",e),()=>{m.removeEventListener("scroll",e)}}),[m]),p().createElement(p().Fragment,null,null==t?void 0:t.map(((e,t)=>p().createElement(Gs,{key:e.key??`index-${t}`,message:e}))))}Zs=fl,({e:[tl,nl,al,il,rl,ol,sl,ll],c:[pl,el]}=(0,d.A)(Zs,[cl("visual-builder.chat-conversation",{styleTexts:[Qs.A]})],[[dl({attribute:!1}),1,"messages"],[dl({type:Boolean}),1,"errorBoundary"],[hl({type:"storyboard.update"}),1,"storyboardUpdate",e=>(0,c.A)(gl,e),(e,t)=>(0,l.A)(gl,e,t)]],0,(e=>bl.has((0,o.A)(e))),m.ReactNextElement)),el();var yl=n(9575),El=n(1732);function kl(e){let{variant:t,width:n,height:a,left:i,top:r,label:o}=e;return p().createElement("div",{className:"outline "+t,style:{width:n+8,height:a+8,left:i-4,top:r-4}},p().createElement("div",{className:"label"},o))}var wl,xl=n(1563);let Nl,Ll,Cl,Ml,Tl,Ol,Rl,Il,Sl,_l,Dl,Pl,Wl,$l,Bl,Fl;const{defineElement:Ul,property:zl,event:Vl,method:Kl}=(0,u.createDecorators)();let jl;var Hl=new WeakMap,Xl=new WeakMap,Yl=new WeakMap,ql=new WeakMap,Gl=new WeakMap,Jl=new WeakMap,Zl=new WeakSet,Ql=new WeakMap;class ec extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Zl),(0,r.A)(this,Hl,(Nl(this),Cl(this))),(0,r.A)(this,Xl,(Ml(this),Tl(this))),(0,r.A)(this,Yl,(Ol(this),Rl(this))),(0,r.A)(this,ql,(Il(this),Sl(this))),(0,r.A)(this,Gl,(_l(this),Dl(this))),(0,r.A)(this,Jl,(Pl(this),Wl(this))),(0,r.A)(this,Ql,(Fl(this),e=>{(0,s.A)(Zl,this,$l).emit(e)}))}get storyboard(){return(0,c.A)(Hl,this)}set storyboard(e){(0,l.A)(Hl,this,e)}get theme(){return(0,c.A)(Xl,this)}set theme(e){(0,l.A)(Xl,this,e)}get uiVersion(){return(0,c.A)(Yl,this)}set uiVersion(e){(0,l.A)(Yl,this,e)}get app(){return(0,c.A)(ql,this)}set app(e){(0,l.A)(ql,this,e)}get inspecting(){return(0,c.A)(Gl,this)}set inspecting(e){(0,l.A)(Gl,this,e)}select(e){var t;const n=null===(t=this.shadowRoot)||void 0===t||null===(t=t.querySelector("iframe"))||void 0===t?void 0:t.contentWindow;null==n||n.postMessage({channel:"chat-preview",type:"select",payload:e},location.origin)}render(){return p().createElement(tc,{storyboard:this.storyboard,theme:this.theme,uiVersion:this.uiVersion,app:this.app,inspecting:this.inspecting,onActiveTargetChange:(0,c.A)(Ql,this)})}}function tc(e){let{storyboard:t,theme:n,uiVersion:a,app:i,inspecting:r,onActiveTargetChange:o}=e;const s=(0,h.useRef)(),[l,c]=(0,h.useState)(!1),[d,u]=(0,h.useState)(!1),[m,g]=(0,h.useState)({x:0,y:0}),[v,b]=(0,h.useState)([]),[A,y]=(0,h.useState)([]),[E,k]=(0,h.useState)([]),[w,x]=(0,h.useState)([]),N=(0,h.useCallback)((()=>{const e=()=>{var t;const n=null===(t=s.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?c(!0):setTimeout(e,100)};e()}),[]);(0,h.useEffect)((()=>{var e;if(!l)return;const t=De.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!t)throw new Error("Cannot find preview agent package: bricks/visual-builder");(null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_inject)("visual-builder.inject-chat-preview-agent",{...t,filePath:`${location.origin}${(0,De.getBasePath)()}${window.PUBLIC_ROOT??""}${t.filePath}`})}),[l]),(0,h.useEffect)((()=>{var e;if(!l)return;const r=null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;r&&r("yaml",{yaml:(0,El.safeDump)(t,{schema:El.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:i,theme:n,uiVersion:a})}),[i,l,t,n,a]);const L=(0,h.useMemo)((()=>{if(d)return()=>{setTimeout((()=>{window.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:[]}})}),100)}}),[d]);(0,h.useEffect)((()=>{const e=e=>{var t;if("chat-preview"===(null===(t=e.data)||void 0===t?void 0:t.channel))switch(e.data.type){case"initialized":u(!0);break;case"inspect-hover":b(e.data.payload.outlines);break;case"scroll":g(e.data.payload);break;case"inspect-active":y(e.data.payload.outlines)}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[]),(0,h.useEffect)((()=>{var e;d&&(null===(e=s.current)||void 0===e||null===(e=e.contentWindow)||void 0===e||e.postMessage({channel:"chat-preview",type:"toggle-inspecting",payload:{inspecting:r}},location.origin))}),[d,r]);const C=(0,h.useCallback)((e=>e.map((e=>{var t,n;const a=(null==s||null===(t=s.current)||void 0===t?void 0:t.offsetLeft)??0,i=(null==s||null===(n=s.current)||void 0===n?void 0:n.offsetTop)??0,{width:r,height:o,left:l,top:c,...d}=e;return{width:1*r,height:1*o,left:1*(l-m.x)+a,top:1*(c-m.y)+i,...d}}))),[m.x,m.y]);return(0,h.useEffect)((()=>{o(A[0])}),[A,o]),(0,h.useEffect)((()=>{x(C(A))}),[A,C]),(0,h.useEffect)((()=>{k(C(v))}),[v,C]),p().createElement("div",{className:f()("container",{inspecting:r})},p().createElement("iframe",{ref:s,src:`${(0,De.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:N,onMouseOut:L}),E.map(((e,t)=>p().createElement(kl,(0,yl.A)({key:t,variant:"hover"},e)))),w.map(((e,t)=>p().createElement(kl,(0,yl.A)({key:t,variant:"active"},e)))))}wl=ec,({e:[Cl,Ml,Tl,Ol,Rl,Il,Sl,_l,Dl,Pl,Wl,$l,Bl,Fl,Nl],c:[jl,Ll]}=(0,d.A)(wl,[Ul("visual-builder.chat-preview",{styleTexts:[xl.A]})],[[zl({attribute:!1}),1,"storyboard"],[zl(),1,"theme"],[zl(),1,"uiVersion"],[zl(),1,"app"],[zl({type:Boolean}),1,"inspecting"],[Vl({type:"activeTarget.change"}),1,"activeTargetChangeEvent",e=>(0,c.A)(Jl,e),(e,t)=>(0,l.A)(Jl,e,t)],[Kl(),2,"select"]],0,(e=>Ql.has((0,o.A)(e))),m.ReactNextElement)),Ll();let nc=!1;const ac="item:";let ic=null;function rc(e){e.preventDefault(),e.stopPropagation(),function(e){const t=dc(e.composedPath());window.parent.postMessage({channel:"chat-preview",type:"inspect-active",payload:{outlines:t.map(hc)}},location.origin)}(e)}function oc(e){e.preventDefault(),e.stopPropagation()}const sc=(0,We.debounce)(((e,t,n)=>{let a=dc(e);if(0===a.length)for(const i of e)if(i instanceof HTMLElement&&i.shadowRoot){a=dc(i.shadowRoot.elementsFromPoint(t,n));break}const i=a.length>0?a[0].element:null;i!==ic&&(ic=i,window.parent.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:a.map(hc)}},location.origin))}),20,{leading:!0});function lc(e){sc(e.composedPath(),e.clientX,e.clientY)}function cc(e){e.preventDefault(),e.stopPropagation(),ic=null,window.parent.postMessage({channel:"chat-preview",type:"inspect-hover",payload:{outlines:[]}},location.origin)}function dc(e){const t=[];return e.forEach((e=>{let n;if(e.nodeType===Node.ELEMENT_NODE&&e instanceof HTMLElement&&(n=e.dataset.iid)&&n.startsWith(ac)){const a=n.substring(ac.length);t.push({type:"item",uuid:a,label:pc(e),element:e})}})),t}function hc(e){const{element:t,type:n,uuid:a,label:i}=e,{width:r,height:o,left:s,top:l}=t.getBoundingClientRect();return{width:r,height:o,left:s+window.scrollX,top:l+window.scrollY,type:n,uuid:a,label:i}}function pc(e){return e.tagName.toLowerCase().split(".").pop()}let uc=!1;function mc(e){window.parent.postMessage({channel:"chat-preview",...e},location.origin)}customElements.define("visual-builder.inject-chat-preview-agent",(0,qn.createProviderClass)((async function(){uc||(uc=!0,n.e(2201).then(n.bind(n,2201)),mc({type:"initialized"}),window.addEventListener("message",(e=>{var t;if("chat-preview"===(null===(t=e.data)||void 0===t?void 0:t.channel))switch(e.data.type){case"toggle-inspecting":!function(e){if(nc===e)return;nc=e;const t=e?"addEventListener":"removeEventListener";window[t]("click",rc,!0),window[t]("mousedown",oc,!0),window[t]("mouseover",oc,!0),window[t]("mouseup",oc,!0),window[t]("pointerdown",oc,!0),window[t]("pointerover",oc,!0),window[t]("pointerup",oc,!0),window[t]("pointerleave",cc,!0),window[t]("pointermove",lc,!0)}(e.data.payload.inspecting);break;case"select":!function(e){const t=`${e.type}:${e.uuid}`,n=(0,Gn.w)(t);window.parent.postMessage({channel:"chat-preview",type:"inspect-active",payload:{outlines:n.map((t=>hc({...e,element:t,label:pc(t)})))}},location.origin)}(e.data.payload)}})),window.addEventListener("scroll",(()=>{mc({type:"scroll",payload:{x:window.scrollX,y:window.scrollY}})})))})));var gc,vc=n(4014),bc=n(8918);let fc,Ac,yc,Ec,kc,wc,xc,Nc,Lc,Cc,Mc;const{defineElement:Tc,property:Oc}=(0,u.createDecorators)();let Rc;var Ic=new WeakMap,Sc=new WeakMap,_c=new WeakMap,Dc=new WeakMap,Pc=new WeakMap;class Wc extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Ic,Ac(this)),(0,r.A)(this,Sc,(yc(this),Ec(this))),(0,r.A)(this,_c,(kc(this),wc(this))),(0,r.A)(this,Dc,(xc(this),Nc(this))),(0,r.A)(this,Pc,(Lc(this),Cc(this))),Mc(this)}get generations(){return(0,c.A)(Ic,this)}set generations(e){(0,l.A)(Ic,this,e)}get category(){return(0,c.A)(Sc,this)}set category(e){(0,l.A)(Sc,this,e)}get theme(){return(0,c.A)(_c,this)}set theme(e){(0,l.A)(_c,this,e)}get uiVersion(){return(0,c.A)(Dc,this)}set uiVersion(e){(0,l.A)(Dc,this,e)}get app(){return(0,c.A)(Pc,this)}set app(e){(0,l.A)(Pc,this,e)}render(){return p().createElement($c,{generations:this.generations,category:this.category,theme:this.theme,uiVersion:this.uiVersion,app:this.app})}}function $c(e){let{generations:t,category:n,theme:a,uiVersion:i,app:r}=e;const o=(0,h.useRef)(),[s,l]=(0,h.useState)(!1),[c,d]=(0,h.useState)(!1),u=(0,h.useCallback)((()=>{const e=()=>{var t;const n=null===(t=o.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?l(!0):setTimeout(e,100)};e()}),[]);return(0,h.useEffect)((()=>{if(!s)return;const e=De.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!e)throw new Error("Cannot find preview agent package: bricks/visual-builder");const t=o.current.contentWindow._preview_only_inject,n={...e,filePath:`${location.origin}${(0,De.getBasePath)()}${window.PUBLIC_ROOT??""}${e.filePath}`};Promise.allSettled(["visual-builder.pre-generated-table-view","visual-builder.pre-generated-container"].map((e=>t(e,n,void 0,!0)))).then((()=>{d(!0)}))}),[s]),(0,h.useEffect)((()=>{var e;if(!c)return;const s=null===(e=o.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;if(!s)return;const l=new Map,d=new Map;for(const e of t){let t=l.get(e.propertyId);t||l.set(e.propertyId,t=new Map);let n=t.get(e.rwType);n||t.set(e.rwType,n=new Map),n.set(e.displayLevel??0,e),d.set(e.propertyId,e.mockData)}const h=[{brick:"div",properties:{textContent:"属性",className:"head-cell"}},{brick:"div",properties:{textContent:"类别",className:"head-cell"}},{brick:"div",properties:{textContent:"展示等级",className:"head-cell last-col-cell",style:{gridColumn:"span 5",textAlign:"center"}}}],p={brick:"visual-builder.pre-generated-table-view",properties:{style:{gridTemplateColumns:"120px 80px repeat(5, 1fr)"}},children:h};let u=0;for(const[e,t]of l){let a=0;const i=u===l.size-1;for(const[r,o]of t){if(0===a){let n;for(const t of o.values()){n=t.propertyName??e;break}h.push({brick:"div",properties:{textContent:n,className:f()("body-cell",{"last-row-cell":i}),style:{gridRow:`span ${t.size}`}}})}const s=i&&a===t.size-1;h.push({brick:"div",properties:{textContent:r,className:f()("body-cell",{"last-row-cell":s})}});for(let t=-2;t<3;t++){var m;const a=o.get(t),i=(null==a?void 0:a.category)??n;let r;if(null!=a&&null!==(m=a.mockData)&&void 0!==m&&m.length){const t=a.mockData[Math.floor(Math.random()*a.mockData.length)];switch(i){case"detail-item":case"form-item":case"card-item":r={[e]:t};break;case"table-column":r={cellData:t}}}const l=[].concat((null==a?void 0:a.storyboard)??[]).filter((e=>!!(0,qn.isObject)(e)||(console.error("Unexpected type of storyboard:",typeof e),!1)));let c;switch(l.forEach(Bc),i){case"form-item":c={brick:"eo-form",properties:{layout:"inline",values:r,className:"form-container"},children:l.map((e=>({...e,errorBoundary:!0})))};break;case"card-item":c={brick:":forEach",dataSource:[r],children:l.map((e=>({...e,errorBoundary:!0})))};break;default:c={brick:"visual-builder.pre-generated-container",properties:{useBrick:l,dataSource:r},errorBoundary:!0}}h.push({brick:"div",properties:{className:f()("body-cell",{"last-col-cell":2===t,"last-row-cell":s})},children:[{...c,errorBoundary:!0}]})}a++}u++}s("yaml",{yaml:(0,El.safeDump)(p,{schema:El.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:r,theme:a,uiVersion:i,styleText:bc.A})}),[r,c,t,a,i,n]),p().createElement("div",{className:f()("container")},p().createElement("iframe",{ref:o,src:`${(0,De.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:u}))}function Bc(e){var t;null!==(t=e.properties)&&void 0!==t&&t.prefix&&(console.error("Unexpected readonly property of 'prefix' in:",e),delete e.properties.prefix)}gc=Wc,({e:[Ac,yc,Ec,kc,wc,xc,Nc,Lc,Cc,Mc],c:[Rc,fc]}=(0,d.A)(gc,[Tc("visual-builder.pre-generated-preview",{styleTexts:[vc.A]})],[[Oc({attribute:!1}),1,"generations"],[Oc(),1,"category"],[Oc(),1,"theme"],[Oc(),1,"uiVersion"],[Oc(),1,"app"]],0,void 0,m.ReactNextElement)),fc();var Fc,Uc=n(9216);let zc;const{defineElement:Vc}=(0,u.createDecorators)();let Kc;class jc extends m.ReactNextElement{render(){return p().createElement(Hc,null)}}function Hc(){return p().createElement("slot",null)}Fc=jc,[Kc,zc]=(0,d.A)(Fc,[Vc("visual-builder.pre-generated-table-view",{styleTexts:[Uc.A]})],[],0,void 0,m.ReactNextElement).c,zc();var Xc,Yc=n(4967);let qc,Gc,Jc,Zc,Qc;const{defineElement:ed,property:td}=(0,u.createDecorators)();let nd;var ad=new WeakMap,id=new WeakMap;class rd extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ad,Gc(this)),(0,r.A)(this,id,(Jc(this),Zc(this))),Qc(this)}get useBrick(){return(0,c.A)(ad,this)}set useBrick(e){(0,l.A)(ad,this,e)}get dataSource(){return(0,c.A)(id,this)}set dataSource(e){(0,l.A)(id,this,e)}render(){return p().createElement(od,{useBrick:this.useBrick,dataSource:this.dataSource})}}function od(e){let{useBrick:t,dataSource:n}=e;return p().createElement($r.ReactUseMultipleBricks,{useBrick:t,data:n,errorBoundary:!0})}Xc=rd,({e:[Gc,Jc,Zc,Qc],c:[nd,qc]}=(0,d.A)(Xc,[ed("visual-builder.pre-generated-container",{styleTexts:[Yc.A]})],[[td({attribute:!1}),1,"useBrick"],[td({attribute:!1}),1,"dataSource"]],0,void 0,m.ReactNextElement)),qc(),n(2080),customElements.define("visual-builder.check-editor-by-name",(0,qn.createProviderClass)((async function(e){try{await De.__secret_internals.loadEditors([e])}catch{return!1}return!!De.customEditors.get(e)})));var sd=n(877);function ld(e,t){const n=new Map;for(const a of e){const e=(0,sd.collectMemberUsage)([a.if,a.value,a.resolve],t);n.set(a,e)}return n}function cd(e,t){e.forEach((n=>{!function(e,t){var n;const{dependencyList:a,nodeList:i,parents:r,result:o}=t,s=(0,We.cloneDeep)(e);o.push(s);const l=a.find((e=>e.node.key===s.key));if(null!==(n=l.deps)&&void 0!==n&&n.length&&!r.some((e=>e.key===s.key))){const e=s.children=[];!function(e,t){const n=[];e.deps.forEach((e=>{const a=t.nodeList.filter((t=>t.name===e));n.push(...a)})),cd(n,t)}(l,{dependencyList:a,nodeList:i,parents:[...r,s],result:e})}}(n,{...t,nodeList:e})}))}function dd(e,t){const n=`[${JSON.stringify(t)}]`;let a;switch(e.display){case"link":case"text":a=function(e,t){var n;if("struct-list"===e.type&&e.countOnly)return{brick:"span",properties:{textContent:`<% \`\${DATA${t}.length}\` %>`}};const a=`<% ${hd(e,t)} %>`;switch(null===(n=e.formatter)||void 0===n?void 0:n.type){case"number":return{brick:"eo-formatter-number",errorBoundary:!0,properties:{value:a,type:e.formatter.format,...(0,We.pick)(e.formatter,["currency","originalUnit","decimals","thousandsSeparator"])}};case"date-time":return{brick:"eo-humanize-time",errorBoundary:!0,properties:{value:a,type:"date"===e.type?"date":void 0,formatter:e.formatter.format}};case"cost-time":return{brick:"eo-humanize-time",errorBoundary:!0,properties:{value:a,isCostTime:!0}};default:return{brick:"span",errorBoundary:!0,properties:{textContent:a,style:ud(e.style)}}}}(e,n),"struct-list"!==e.type||e.countOnly?"link"===e.display&&(a={brick:"eo-link",errorBoundary:!0,children:[a]}):a={brick:"eo-tag",errorBoundary:!0,children:[a]};break;case"tag":{var i,r,o,s,l;const t="background"===(null===(i=e.style)||void 0===i?void 0:i.variant)?"-inverse":"",c=hd(e,n);a={brick:"eo-tag",errorBoundary:!0,properties:{textContent:`<% ${c} %>`,size:pd(null===(r=e.style)||void 0===r?void 0:r.size),color:null!==(o=e.style)&&void 0!==o&&o.background?`${e.style.background}${t}`:null!==(s=e.style)&&void 0!==s&&s.palette?`<% \`\${(${JSON.stringify(e.style.palette)})[${c}] ?? "gray"}${t}\` %>`:`gray${t}`,outline:"outline"===(null===(l=e.style)||void 0===l?void 0:l.variant)}};break}default:return null}if("struct-list"!==e.type||e.countOnly)return a;const c=Number(e.maxItems)||3;return{brick:"span",errorBoundary:!0,properties:{style:{display:"inline-flex",gap:"0.5em"}},children:[{brick:":forEach",dataSource:`<% DATA${n}.slice(0, ${c}) %>`,children:[a]},{brick:"eo-link",if:`<% DATA${n}.length > ${c} %>`,properties:{textContent:`<% \`+ \${DATA${n}.length - ${c}} 项\` %>`}}]}}function hd(e,t){return"struct"!==e.type&&"struct-list"!==e.type||!e.field?`DATA${t}`:`${"struct"===e.type?`DATA${t}`:"ITEM"}[${JSON.stringify(e.field)}]`}function pd(e){switch(e){case"large":case"medium":case"small":return e;case"x-large":return"large"}}function ud(e){if(!e)return;const t={};switch(e.size){case"small":t.fontSize="var(--sub-title-font-size-small)";break;case"medium":t.fontSize="var(--normal-font-size)";break;case"large":t.fontSize="var(--card-title-font-size)";break;case"x-large":t.fontSize="var(--title-font-size-larger)"}switch(e.fontWeight){case"bold":case"normal":t.fontWeight=e.fontWeight}return e.color&&(t.color=e.color),t}customElements.define("visual-builder.get-data-deps",(0,qn.createProviderClass)(ld)),customElements.define("visual-builder.get-dependency-tree",(0,qn.createProviderClass)((function(e,t){const n=e,a=ld(n.map((e=>e.data)),t.dataType),i=[];for(const[e,t]of a)i.push({deps:Array.from(t.usedProperties),node:n.find((t=>t.data===e))});const r=[];return cd(n,{result:r,dependencyList:i,parents:[]}),r})));var md,gd=n(9034),vd=n(4162);let bd,fd,Ad,yd,Ed,kd,wd,xd,Nd,Ld,Cd,Md,Td,Od,Rd,Id,Sd,_d,Dd;const{defineElement:Pd,property:Wd,event:$d}=(0,u.createDecorators)();let Bd;var Fd=new WeakMap,Ud=new WeakMap,zd=new WeakMap,Vd=new WeakMap,Kd=new WeakMap,jd=new WeakMap,Hd=new WeakMap,Xd=new WeakMap,Yd=new WeakSet,qd=new WeakMap;class Gd extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,Yd),(0,r.A)(this,Fd,fd(this)),(0,r.A)(this,Ud,(Ad(this),yd(this))),(0,r.A)(this,zd,(Ed(this),kd(this))),(0,r.A)(this,Vd,(wd(this),xd(this))),(0,r.A)(this,Kd,(Nd(this),Ld(this))),(0,r.A)(this,jd,(Cd(this),Md(this))),(0,r.A)(this,Hd,(Td(this),Od(this))),(0,r.A)(this,Xd,(Rd(this),Id(this))),(0,r.A)(this,qd,(Dd(this),e=>{(0,s.A)(Yd,this,Sd).emit(e)}))}get previewUrl(){return(0,c.A)(Fd,this)}set previewUrl(e){(0,l.A)(Fd,this,e)}get generations(){return(0,c.A)(Ud,this)}set generations(e){(0,l.A)(Ud,this,e)}get busy(){return(0,c.A)(zd,this)}set busy(e){(0,l.A)(zd,this,e)}get category(){return(0,c.A)(Vd,this)}set category(e){(0,l.A)(Vd,this,e)}get theme(){return(0,c.A)(Kd,this)}set theme(e){(0,l.A)(Kd,this,e)}get uiVersion(){return(0,c.A)(jd,this)}set uiVersion(e){(0,l.A)(jd,this,e)}get app(){return(0,c.A)(Hd,this)}set app(e){(0,l.A)(Hd,this,e)}render(){return p().createElement(Jd,{previewUrl:this.previewUrl,generations:this.generations,busy:this.busy,category:this.category,theme:this.theme,uiVersion:this.uiVersion,app:this.app,onComment:(0,c.A)(qd,this)})}}function Jd(e){let{previewUrl:t,generations:n,busy:a,category:i,theme:r,uiVersion:o,app:s,onComment:l}=e;const c=(0,h.useRef)(),[d,u]=(0,h.useState)(!1),[m,g]=(0,h.useState)(!1),v=(0,h.useRef)([]),b=(0,h.useCallback)((()=>{const e=()=>{var t;const n=null===(t=c.current)||void 0===t?void 0:t.contentWindow;null!=n&&n._preview_only_render?u(!0):setTimeout(e,100)};e()}),[]);return(0,h.useEffect)((()=>{d&&c.current.contentWindow.postMessage({channel:"raw-data-preview",type:"busy",payload:a},location.origin)}),[a,d]),(0,h.useEffect)((()=>{if(d){const e=c.current.contentWindow,t=e=>{let{data:t}=e;if("raw-data-preview"===(null==t?void 0:t.channel))switch(t.type){case"comment":l(t.payload);break;case"updatePropertyToggleState":v.current=t.payload}};return e.addEventListener("message",t),()=>{e.removeEventListener("message",t)}}}),[l,d]),(0,h.useEffect)((()=>{if(!d)return;const e=De.__secret_internals.getBrickPackagesById("bricks/visual-builder");if(!e)throw new Error("Cannot find preview agent package: bricks/visual-builder");const n=c.current.contentWindow._preview_only_inject,a={...e,filePath:t?new URL(e.filePath,new URL(t,location.origin)).toString():`${location.origin}${(0,De.getBasePath)()}${window.PUBLIC_ROOT??""}${e.filePath}`};Promise.allSettled(["visual-builder.pre-generated-table-view","visual-builder.pre-generated-container"].map((e=>n(e,a,void 0,!0)))).then((()=>{g(!0)}))}),[t,d]),(0,h.useEffect)((()=>{var e;if(!m)return;const t=null===(e=c.current)||void 0===e||null===(e=e.contentWindow)||void 0===e?void 0:e._preview_only_render;if(!t)return;const a=[{brick:"div",properties:{textContent:"属性",className:"head-cell"}},{brick:"div",properties:{textContent:"",className:"head-cell"}},{brick:"div",properties:{textContent:"视觉重量 (由低至高)",className:"head-cell last-col-cell",style:{gridColumn:"span 4",textAlign:"center"}}},{brick:"div",properties:{textContent:"批注",className:"head-cell"}}],i={brick:"visual-builder.pre-generated-table-view",context:[{name:"propertyToggleState",value:v.current,onChange:{action:"window.postMessage",args:[{channel:"raw-data-preview",type:"updatePropertyToggleState",payload:"<% CTX.propertyToggleState %>"}]}},{name:"busy"}],properties:{style:{gridTemplateColumns:"auto 32px repeat(5, 1fr)"}},children:a};for(let e=0,t=n.length;e<t;e++){var l;const i=n[e],r=e===t-1,o=new Map;for(const e of i.candidates??[])o.set(e.visualWeight??0,e);a.push({brick:"div",properties:{className:f()("body-cell",{"last-row-cell":r}),style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},children:[{brick:"span",properties:{textContent:`${i.propertyName??i.propertyId}`}},{brick:"eo-button",properties:{type:"text",icon:`<%=\n {\n lib: "fa",\n prefix: "fas",\n icon: CTX.propertyToggleState.includes(${JSON.stringify(i.propertyId)}) ? "chevron-up" : "chevron-down",\n }\n %>`},events:{click:{action:"context.replace",args:["propertyToggleState",`<%\n CTX.propertyToggleState.includes(${JSON.stringify(i.propertyId)})\n ? CTX.propertyToggleState.filter((id) => id !== ${JSON.stringify(i.propertyId)})\n : CTX.propertyToggleState.concat(${JSON.stringify(i.propertyId)})\n %>`]}}}]},{brick:"div",properties:{className:f()("body-cell",{"last-row-cell":r})},children:null!==(l=i.candidates)&&void 0!==l&&l.length?[{brick:"eo-icon",properties:{lib:"fa",...i.generationId?{prefix:"far",icon:"circle-check",style:{color:"var(--palette-green-6)"}}:{prefix:"fas",icon:"circle",style:{color:"var(--palette-gray-6)",transformOrigin:"center center",transform:"scale(0.5)"}}}}]:void 0});const s=(i.mockData??[]).slice();s.sort(((e,t)=>{const n=null==e?void 0:e[i.propertyId],a=null==t?void 0:t[i.propertyId],r=Array.isArray(n),o=Array.isArray(a);if(r||o)return(o?a.length:-1)-(r?n.length:-1);const s=null==n,l=null==a;if(s||l)return(l?0:1)-(s?0:1);const c="string"==typeof n&&0===n.length,d="string"==typeof a&&0===a.length;return c||d?(d?0:1)-(c?0:1):0}));for(let e=-1;e<3;e++){const t=o.get(e);let n;t&&(n=dd(t,i.propertyId)),a.push({brick:"div",properties:{className:f()("body-cell",{"last-row-cell":r})},children:[{brick:"div",properties:{style:{display:"flex",flexDirection:"column",gap:"8px"}},children:n?s.map(((e,t)=>({brick:"visual-builder.pre-generated-container",if:0===t||`<%= CTX.propertyToggleState.includes(${JSON.stringify(i.propertyId)}) %>`,properties:{useBrick:[n],dataSource:e},errorBoundary:!0}))):void 0}]})}a.push({brick:"div",properties:{className:f()("body-cell",{"last-col-cell":!0,"last-row-cell":r})},children:i.candidates?[{brick:"eo-textarea",properties:{value:i.comment?`<% ${JSON.stringify(i.comment)} %>`:void 0,placeholder:"不合预期?请补充说明 (按住 ⌘ 或 ctrl 并回车提交)",autoSize:!0,style:{width:"100%"},disabled:"<%= CTX.busy %>"},events:{keydown:{if:"<% EVENT.code === 'Enter' && (EVENT.metaKey || EVENT.ctrlKey) %>",action:"window.postMessage",args:[{channel:"raw-data-preview",type:"comment",payload:{comment:"<% EVENT.target.value %>",propertyInstanceId:i.propertyInstanceId}}]}}}]:void 0})}t("yaml",{yaml:(0,El.safeDump)([i,{brick:"eo-message-listener",properties:{sameOrigin:!0},events:{message:{if:"<% EVENT.detail.data?.channel === 'raw-data-preview' && EVENT.detail.data.type === 'busy' %>",action:"context.replace",args:["busy","<% EVENT.detail.data.payload %>"]}},portal:!0,errorBoundary:!0}],{schema:El.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0})},{app:s,theme:r,uiVersion:o,styleText:vd.A})}),[s,m,n,r,o,i]),p().createElement("div",{className:f()("container")},p().createElement("iframe",{ref:c,src:t??`${(0,De.getBasePath)()}_brick-preview-v3_/preview/`,loading:"lazy",onLoad:b}))}md=Gd,({e:[fd,Ad,yd,Ed,kd,wd,xd,Nd,Ld,Cd,Md,Td,Od,Rd,Id,Sd,_d,Dd],c:[Bd,bd]}=(0,d.A)(md,[Pd("visual-builder.raw-data-preview",{styleTexts:[gd.A]})],[[Wd(),1,"previewUrl"],[Wd({attribute:!1}),1,"generations"],[Wd({type:Boolean}),1,"busy"],[Wd(),1,"category"],[Wd(),1,"theme"],[Wd(),1,"uiVersion"],[Wd(),1,"app"],[$d({type:"comment"}),1,"commentEvent",e=>(0,c.A)(Xd,e),(e,t)=>(0,l.A)(Xd,e,t)]],0,(e=>qd.has((0,o.A)(e))),m.ReactNextElement)),bd();var Zd=n(264);customElements.define("visual-builder.parse-path",(0,qn.createProviderClass)((async function(e,t){const n=[];return{regexp:(0,Zd.MM)(e,n,(0,We.defaults)(t,{end:!1,strict:!1,sensitive:!0})),keys:n}})));var Qd=function(){var e=(0,ia.A)((function*(e,t,n){return(yield ra.http.post("api/gateway/cmdb.instance.CreateInstance/v2/object/".concat(e,"/instance"),t,n)).data}));return function(t,n,a){return e.apply(this,arguments)}}();customElements.define("visual-builder.batch-update-raw-data-generated-view",(0,qn.createProviderClass)((async function(e){return Promise.allSettled(e.map((e=>{let{attrInstanceId:t,...n}=e;return Qd("RAW_DATA_GENERATED_VIEW@EASYOPS",{...n,attr:[t]})})))})))},2080:(e,t,n)=>{n.d(t,{ADVANCED_CHANGE_KEY:()=>Me,SchemaField:()=>Te});var a,i=n(4635),r=n(918),o=n(6902),s=n(5536),l=n(6121),c=n(829),d=n(2740),h=n(8769),p=n.n(h),u=n(4782),m=n(1389),g=(n(6477),n(5908)),v=n(7091),b=n(8788),f=n(6768),A=n(6257),y=n(9708),E=n(4047),k=n(3768),w=n(2803),x=n(3824),N=n(2513),L=n(5067),C=n(1477),M=n(4287),T=n(966),O=n(5768),R=n(6110),I=n(5944),S=n(8409),_=n(8581),D=n(3995),P=(n(74),n(1030)),W=n.n(P);let $,B,F,U,z,V,K,j,H,X,Y,q,G,J,Z,Q,ee,te,ne,ae,ie,re,oe,se,le,ce,de,he,pe,ue,me,ge,ve,be,fe,Ae,ye,Ee;const{defineElement:ke,property:we,method:xe,event:Ne}=(0,u.createDecorators)(),Le=p().forwardRef(et),Ce="before_submit",Me="on_advanced_change",Te=(0,v.Uy)({components:{FormLayout:y.Hb,Input:y.pd,FormItem:w.M,FormItemWithoutAdvanced:y.eI,FormCollapse:y.w9,NumberPicker:y.Y_,Radio:y.sx,Select:y.l6,Switch:y.dO,CategoryTitle:k.H,CodeEditor:x.S,IconSelect:N.r,ColorPicker:L.h,UseChildrenSelect:O._,InputWithUrl:C.r,InputWithUnit:T.U,TextAlignRadio:M.p,CustomOptions:I.F,BoxSize:R.i,CustomTab:S.v}});let Oe,Re;var Ie=new WeakMap,Se=new WeakMap,_e=new WeakMap,De=new WeakMap,Pe=new WeakMap,We=new WeakMap,$e=new WeakMap,Be=new WeakMap,Fe=new WeakMap,Ue=new WeakMap,ze=new WeakSet,Ve=new WeakMap,Ke=new WeakMap,je=new WeakMap,He=new WeakMap,Xe=new WeakMap,Ye=new WeakMap,qe=new WeakMap,Ge=new WeakMap,Je=new WeakMap,Ze=new WeakMap;class Qe extends m.ReactNextElement{constructor(){super(...arguments),(0,i.A)(this,ze),(0,r.A)(this,Ie,($(this),(0,h.createRef)())),(0,r.A)(this,Se,F(this)),(0,r.A)(this,_e,(U(this),z(this))),(0,r.A)(this,De,(V(this),K(this))),(0,r.A)(this,Pe,(j(this),H(this))),(0,r.A)(this,We,(X(this),Y(this))),(0,r.A)(this,$e,(q(this),G(this))),(0,r.A)(this,Be,(J(this),Z(this))),(0,r.A)(this,Fe,(Q(this),ee(this))),(0,r.A)(this,Ue,(te(this),ne(this))),(0,r.A)(this,Ve,(re(this),oe(this))),(0,r.A)(this,Ke,(ce(this),de(this))),(0,r.A)(this,je,(ue(this),e=>{(0,s.A)(ze,this,he).emit(e)})),(0,r.A)(this,He,me(this)),(0,r.A)(this,Xe,(be(this),e=>{(0,s.A)(ze,this,ge).emit(e)})),(0,r.A)(this,Ye,void 0),(0,r.A)(this,qe,(0,g.fA)(Ce,((e,t)=>n=>{(0,l.A)(Ye,this,n(e,t))}))),(0,r.A)(this,Ge,fe(this)),(0,r.A)(this,Je,(Ee(this),e=>{(0,s.A)(ze,this,Ae).emit(e)})),(0,r.A)(this,Ze,(e=>{const t="string"==typeof e&&"undefined"===e?void 0:(0,P.omit)(e,["dataset.testid"]),n=[];(0,P.isEmpty)(null==t?void 0:t.dataset)&&n.push("dataset"),(0,P.isEmpty)(null==t?void 0:t.style)&&n.push("style");const a=(0,P.omit)(t,n);if(!(0,P.isEmpty)(a))return a}))}get editorName(){return(0,c.A)(Se,this)}set editorName(e){(0,l.A)(Se,this,e)}get values(){return(0,c.A)(_e,this)}set values(e){(0,l.A)(_e,this,e)}get advancedMode(){return(0,c.A)(De,this)}set advancedMode(e){(0,l.A)(De,this,e)}get dataList(){return(0,c.A)(Pe,this)}set dataList(e){(0,l.A)(Pe,this,e)}get editorPackages(){return(0,c.A)(We,this)}set editorPackages(e){(0,l.A)(We,this,e)}get links(){return(0,c.A)($e,this)}set links(e){(0,l.A)($e,this,e)}get extraLibs(){return(0,c.A)(Be,this)}set extraLibs(e){(0,l.A)(Be,this,e)}get childSlots(){return(0,c.A)(Fe,this)}set childSlots(e){(0,l.A)(Fe,this,e)}validate(){var e;const t=null===(e=(0,c.A)(Ie,this).current)||void 0===e?void 0:e.getFormInstance();(0,l.A)(Ye,this,null);const n=()=>this.advancedMode?t.values[D.qZ]:W().omit(t.values,[D.qZ]);t.validate().then((()=>{t.notify(Ce,n()),(0,s.A)(ze,this,ae).emit((0,c.A)(Ye,this)??n())})).catch((e=>{(0,s.A)(ze,this,se).emit(e)}))}render(){return p().createElement(Le,{ref:(0,c.A)(Ie,this),editorName:this.editorName,values:(0,c.A)(Ze,this).call(this,this.values),advancedMode:this.advancedMode,dataList:this.dataList,extraLibs:this.extraLibs,links:this.links,childSlots:this.childSlots,editorPackages:this.editorPackages,handleValuesChange:(0,c.A)(je,this),handleTokenClick:(0,c.A)(Xe,this),handleTriggerAction:(0,c.A)(Je,this),onSubmitEffect:(0,c.A)(qe,this)})}}function et(e,t){let{advancedMode:n,values:a,editorName:i,dataList:r,editorPackages:o,extraLibs:s,childSlots:l,links:c,handleValuesChange:d,handleTokenClick:u,handleTriggerAction:m,onSubmitEffect:y}=e;const[k,w]=(0,h.useState)(Oe),x=(0,E.useCurrentTheme)(),N=(0,h.useMemo)((()=>(0,A.VC)()),[]),L=(0,h.useMemo)((()=>(0,g.DG)()),[k]),C=(0,h.useRef)(null),M=(0,h.useRef)(!1),T=(0,h.useMemo)((()=>(0,g.fA)(Me,((e,t)=>n=>{const a=!e&&t.values[D.qZ]?t.values[D.qZ]:t.values;C.current=n(e,t,a)}))),[]);(0,h.useImperativeHandle)(t,(()=>({getFormInstance:()=>L})));const O=(0,h.useCallback)((async()=>{_.customEditors.get(i)?w((()=>{var e;return null===(e=_.customEditors.get(i))||void 0===e?void 0:e(p())})):(await _.__secret_internals.loadEditors([i],o),Oe=()=>{var e;return null===(e=_.customEditors.get(i))||void 0===e?void 0:e(p())},w(Oe))}),[i,o]),R=(0,h.useCallback)(((e,t)=>{if(t){const t=W().omit(e,[D.qZ]);return{[D.qZ]:W().isEmpty(t)?"":t}}return e[D.qZ]??e}),[]);return(0,h.useEffect)((()=>{O()}),[O]),(0,h.useEffect)((()=>{k&&L.setInitialValues(a,"overwrite")}),[k,L]),(0,h.useEffect)((()=>{M.current=!0,C.current=null,L.notify(Me,n),L.query(D.N4).take((e=>{e.display=n?"hidden":"visible"})),L.query(D.qZ).take((e=>{e.display=n?"visible":"hidden"}));const e=L.getState().values,t=R(C.current??e,n);L.setValues(t,"overwrite"),M.current=!1}),[n,L,R,k]),(0,h.useEffect)((()=>{L.addEffects("onValueChange",(()=>{(0,g.A$)((e=>{M.current||d(e.values)}))}))}),[L,d]),k?p().createElement("div",{className:"property-form-wrapper"},p().createElement(b.Ay,{prefixCls:"antdV5",theme:{algorithm:"dark-v2"===x?f.A.darkAlgorithm:f.A.defaultAlgorithm,components:{InputNumber:{handleVisible:!0}}},getPopupContainer:e=>e},p().createElement(A.N7,{cache:N},p().createElement(v.Op,{form:L},p().createElement(k,{advancedMode:n,SchemaFieldComponent:Te,form:L,scope:{dataList:r,advancedMode:n,childSlots:l,extraLibs:s,links:c,tokenClick:e=>u(e.detail),triggerAction:m},effects:{onFieldInit:g.yd,onFieldValueChange:g.$l,onFieldInitialValueChange:g.J4,onFormInitialValuesChange:g.oJ,onFormValidateSuccess:g.zu,onFormValuesChange:g.A$,onSubmit:y,onAdvancedChange:T},formilySchemaFormatter:D.cV}))))):null}a=Qe,({e:[F,U,z,V,K,j,H,X,Y,q,G,J,Z,Q,ee,te,ne,ae,ie,re,oe,se,le,ce,de,he,pe,ue,me,ge,ve,be,fe,Ae,ye,Ee,$],c:[Re,B]}=(0,d.A)(a,[ke("visual-builder.property-editor",{shadowOptions:!1,dependencies:["eo-icon-select","vs.code-editor","eo-tooltip"]})],[[we(),1,"editorName"],[we({attribute:!1}),1,"values"],[we({type:Boolean}),1,"advancedMode"],[we({attribute:!1}),1,"dataList"],[we({attribute:!1}),1,"editorPackages"],[we({attribute:!1}),1,"links"],[we({attribute:!1}),1,"extraLibs"],[we({attribute:!1}),1,"childSlots"],[Ne({type:"validate.success"}),1,"successEvent",e=>(0,c.A)(Ue,e),(e,t)=>(0,l.A)(Ue,e,t)],[Ne({type:"validate.error"}),1,"errorEvent",e=>(0,c.A)(Ve,e),(e,t)=>(0,l.A)(Ve,e,t)],[xe(),2,"validate"],[Ne({type:"values.change"}),1,"valuesChangeEvent",e=>(0,c.A)(Ke,e),(e,t)=>(0,l.A)(Ke,e,t)],[Ne({type:"token.click"}),1,"tokenClick",e=>(0,c.A)(He,e),(e,t)=>(0,l.A)(He,e,t)],[Ne({type:"trigger.action"}),1,"triggerActionEvent",e=>(0,c.A)(Ge,e),(e,t)=>(0,l.A)(Ge,e,t)]],0,(e=>Ze.has((0,o.A)(e))),m.ReactNextElement)),B()},7236:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r),s=n(6131),l=o()(i());l.i(s.A),l.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.message{display:flex;gap:8px}.main{flex:1;min-width:0}.label{font-weight:bold;line-height:28px}.message:not(:last-child){margin-bottom:2em}.invisible-dots{opacity:0}.failed .content{color:var(--color-error)}.command:not(:first-child){margin-top:1em}.command:not(:last-child){margin-bottom:1em}pre{white-space:pre-wrap;background-color:var(--palette-gray-3);border-radius:6px;padding:1em}.markdown > :first-child{margin-top:0}.markdown > :last-child{margin-bottom:0}.avatar{align-self:flex-start;display:flex;align-items:center;justify-content:center}.texting::after{content:" ";animation:texting 2s infinite;white-space:pre}@keyframes texting{0%{content:" "}25%{content:". "}50%{content:".. "}75%{content:"..."}100%{content:" "}}pre[class*="language-"]{overflow:visible}pre[class*="language-"],\ncode[class*="language-"]{white-space:pre-wrap}eo-avatar.role-assistant::part(avatar-icon){background-color:var(--palette-blue-5)}.content{word-wrap:break-word}.plain{white-space:pre-wrap}',""]);const c=l.toString()},1563:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%;border-radius:4px}.container{position:relative;box-shadow:rgba(204,204,204,0.2) 0px 0px 0px 1px}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}.outline{position:absolute;border-style:solid;border-width:2px;border-radius:0 4px 4px;pointer-events:none}.label{position:absolute;left:-2px;top:-20px;height:18px;line-height:16px;padding:2px 5px 0;font-size:12px;border-radius:4px 4px 0 0;white-space:nowrap}.outline.hover{border-color:rgba(var(--palette-blue-6-channel),0.3)}.outline.hover .label{background:rgba(var(--palette-blue-6-channel),0.3)}.outline.active{border-color:var(--palette-blue-6)}.outline.active .label{background:var(--palette-blue-6)}.container:not(.inspecting) .outline{display:none}",""]);const s=o.toString()},6213:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.contract-wrapper{display:flex;gap:4px}.contract-selector{flex:1}.version-selector{width:100px}.options-tips{padding:0px 10px;font-weight:400;color:#999;white-space:nowrap;font-style:italic}",""]);const s=o.toString()},7540:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.mask,\n.container{display:none;position:fixed;z-index:1}.mask{top:0;bottom:0;left:0;right:0;z-index:1}:host([active]) .mask,\n:host([active]) .container{display:block}.container{background:var(--antd-dropdown-menu-bg);border-radius:var(--medius-border-radius);padding:5px}.container .title{padding:5px 12px;cursor:default;color:var(--color-secondary-text);border-bottom:1px solid var(--color-text-divider-line)}.container eo-menu{border:none;padding:5px 0}.container eo-menu eo-menu-item:not([disabled]):hover::part(menu-item){background-color:var(--left-sidebar-item-hover-bg)}.container eo-menu eo-menu-item[disabled]::part(menu-item){cursor:not-allowed}.container eo-menu eo-menu-item::part(menu-item){cursor:grab;padding:5px 12px;border-radius:var(--medius-border-radius);min-width:max-content}.container eo-menu eo-menu-item.dragging{opacity:0.5}.container eo-menu eo-tooltip{display:block}",""]);const s=o.toString()},2381:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,":host{--local-node-outline-style:solid;display:block}:host([hidden]){display:none}:host([not-synced]){--local-node-outline-style:dashed}*{box-sizing:border-box}.node{width:168px;max-width:none;height:130px;position:relative;display:flex;flex-direction:column;justify-content:space-between;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}.node.board{height:70px;max-width:168px;width:-moz-fit-content;width:fit-content;padding-bottom:4px}.label,\n.label-input{width:100%;height:24px;padding:3px;border:none;line-height:18px;font-size:var(--sub-title-font-size-small);color:var(--color-header-text);font-weight:var(--font-weight-500);text-align:center;font-family:inherit;cursor:text;-webkit-user-select:text;user-select:text}.label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.node.editing-label .label{height:0}.node:not(.editing-label) .label-input{display:none}.add-button,\n.icon-container,\n.thumbnail-container,\n.thumbnail-placeholder{display:flex;align-items:center;justify-content:center}.thumbnail-container{height:98px;outline:1px var(--local-node-outline-style) var(--palette-gray-4);opacity:1;border:4px solid transparent;border-radius:4px;width:100%;position:relative;flex-direction:column}.thumbnail-placeholder{color:var(--palette-gray-5);font-size:36px;flex:1}.icon-container{font-size:20px;background-color:var(--palette-teal-6);color:var(--palette-gray-4);width:36px;height:36px;border-radius:50%;outline-offset:4px}:host([active]) .thumbnail-container,\n:host([active]) .icon-container{outline:2px var(--local-node-outline-style) var(--palette-blue-3)}:host(:not([active])) .node:hover .thumbnail-container,\n:host(:not([active])) .node:hover .icon-container{outline:1px var(--local-node-outline-style) var(--palette-blue-3)}.add-button{position:absolute;bottom:-26px;left:calc(50% - 12px);width:24px;height:24px;background:var(--palette-gray-3);color:var(--palette-gray-6);border-radius:50%;cursor:pointer}:host([not-synced]) .add-button,\n:host([disable-child-append]) .add-button,\n:host(:not([active])) .add-button{display:none}.add-button:hover{background:var(--palette-blue-5);color:var(--palette-gray-2)}.external{position:absolute;top:4px;left:4px;padding:0 10px;display:flex;align-items:center;gap:6px;background:var(--palette-purple-4);font-size:12px;line-height:20px;height:22px;cursor:pointer;color:var(--palette-gray-1);border-radius:9999px;right:4px;max-width:-moz-fit-content;max-width:fit-content}.external-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.external:hover{background:var(--palette-purple-5)}.sub-nodes{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;width:100%}.sub-node{background-color:var(--palette-gray-2);border-radius:4px;padding:6px;display:flex;flex-direction:column;justify-content:space-between;height:32px}.sub-node-skeleton-title{width:18px;height:4px;border-radius:2px;align-self:flex-start;background-color:var(--palette-gray-4)}.sub-node-skeleton-content{width:100%;height:4px;border-radius:2px;background-color:var(--palette-gray-4)}.sub-node-skeleton-button{width:18px;height:4px;border-radius:2px;align-self:flex-end;background-color:var(--palette-blue-3)}.sub-node:hover{background-color:var(--palette-gray-3)}.sub-node:hover .sub-node-skeleton-title,\n.sub-node:hover .sub-node-skeleton-content{background-color:var(--palette-gray-5)}.sub-node:hover .sub-node-skeleton-button{background-color:var(--palette-blue-4)}",""]);const s=o.toString()},4967:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}",""]);const s=o.toString()},8918:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,"body{background-color:transparent}#preview-root{padding:0;height:auto;max-height:100vh;overflow-y:auto;border:1px solid var(--theme-gray-border-color);border-radius:4px;background:var(--body-background)}.head-cell{position:sticky;top:0;z-index:1;font-weight:bold}.head-cell,\n.body-cell{background:var(--body-background)}.last-col-cell{border-right-color:transparent}.last-row-cell{border-bottom-color:transparent}.form-container > ::part(message){display:none}",""]);const s=o.toString()},4014:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%;border-radius:4px}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}",""]);const s=o.toString()},9216:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,":host{display:grid;width:100%}:host([hidden]){display:none}::slotted(*){padding:4px 8px;border:1px solid var(--theme-gray-border-color);border-left-color:transparent;border-top-color:transparent;min-width:0;word-break:break-word}",""]);const s=o.toString()},4162:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,"body{background-color:transparent}#preview-root{padding:0;height:auto;max-height:100vh;overflow-y:auto;border:1px solid var(--theme-gray-border-color);border-radius:4px;background:var(--body-background)}.head-cell{position:sticky;top:0;z-index:1;font-weight:bold}.head-cell,\n.body-cell{background:var(--body-background)}.body-cell{display:flex;align-items:center}.last-col-cell{border-right-color:transparent}.last-row-cell{border-bottom-color:transparent}.form-container > ::part(message){display:none}",""]);const s=o.toString()},9034:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container,\niframe{width:100%;height:100%;border-radius:4px}.container{position:relative}iframe{display:block;border:none;margin:0;padding:0;transform-origin:0% 0%;-webkit-user-select:none;user-select:none}",""]);const s=o.toString()},9765:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,".custom-scrollbar-container{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.15) rgba(255,255,255,0.03)}.custom-scrollbar-container::-webkit-scrollbar{width:8px;height:8px;background-color:transparent;position:absolute}.custom-scrollbar-container::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0);border-radius:4px}.custom-scrollbar-container:hover::-webkit-scrollbar-track{background-color:rgba(255,255,255,0.03)}.custom-scrollbar-container:hover::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.15)}",""]);const s=o.toString()},3430:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,'.workBenchActionList{display:flex;flex-direction:column;width:min-content;height:100%;background-color:#4297ff}:host-context(html[data-theme="dark-v2"]) .workBenchActionList,\n:host-context([data-override-theme="dark-v2"]) .workBenchActionList{background-color:#323237}',""]);const s=o.toString()},5292:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,'.action::part(link){display:flex;justify-content:center;align-items:center;width:48px;height:48px;font-size:24px;color:rgba(255,255,255,0.4);position:relative;transition:none}.action.active::part(link)::before{content:"";position:absolute;top:0;bottom:0;left:0;width:2px;background-color:white}.action.active::part(link),\n.action::part(link):hover{color:white}',""]);const s=o.toString()},1361:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,":host{display:inline-block}:host([hidden]){display:none}eo-popover::part(popup){width:800px;max-width:60vw;padding:10px;background:var(--color-fill-bg-container-4);border-radius:var(--medius-border-radius);box-shadow:var(--feedback-container-shadow);z-index:1000}.history-title{font-size:var(--title-font-size);font-weight:var(--font-weight-500);color:var(--color-strong-text);margin-bottom:5px}.history-list{max-height:500px;overflow-y:auto}.item-container{padding:10px 0;display:flex;flex-direction:column;gap:5px}.empty{padding:5px 0 10px 0;font-size:14px;color:var(--text-color-secondary);text-align:center}.item-container:not(:last-of-type){border-bottom:1px solid var(--color-border-divider-line)}.item-title{display:flex;align-items:center;justify-content:space-between;gap:5px}.title-left,\n.title-right{display:flex;align-items:center}.title-left{cursor:pointer;overflow:hidden;gap:5px}.topic{font-size:14px;color:var(--text-color-title);font-weight:var(--font-weight-500);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.branch{font-size:14px;color:var(--text-color-secondary)}.rollback{margin-right:5px;font-size:14px;color:var(--text-color-secondary);cursor:pointer}.rollback:hover{color:var(--color-brand)}.item-info{display:flex;align-items:center;gap:5px}.time,\n.operator{font-size:14px;color:var(--text-color-secondary)}.load-more-container{display:block;text-align:center}.end-container{display:flex;align-items:center;justify-content:center;gap:10px;font-size:16px;color:var(--color-brand)}.rollback-all{cursor:pointer}",""]);const s=o.toString()},7180:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,':host{display:block;--pane-color:#595959}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--pane-color:#ccc}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.pane{display:flex;flex-direction:column;color:var(--pane-color);height:100%}.pane-header{display:flex;align-items:center;cursor:pointer;border-top:1px solid transparent;position:relative}.pane-header:focus{outline-width:1px;outline-style:solid;outline-offset:-1px;outline-color:#007fd4}:host(:not(:first-child)) .pane-header{border-top-color:rgba(204,204,204,0.2)}.pane-scroll-shadow{display:none;position:absolute;bottom:-3px;left:0;right:0;height:3px;box-shadow:#000000 0 6px 6px -6px inset;z-index:1}.scrolled .pane-scroll-shadow{display:block}.pane-title{display:flex;align-items:center;font-size:13px;line-height:24px;height:25px;min-width:0;flex:1}.title-icon{display:flex;justify-content:center;align-items:center;width:24px;padding-right:2px;line-height:1;flex-shrink:0}.title-label{text-transform:uppercase;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-body{flex-grow:1;min-height:0;display:none;overflow:hidden;overflow-y:auto;overflow-y:overlay}:host([active]) .pane-body{display:initial}:host(:not(:hover)) ::slotted([slot="actions"]){display:none}.badge{background-color:rgb(77,77,77);color:rgb(255,255,255);border-radius:11px;height:18px;padding:3px 6px;line-height:13px;margin:0 3px;font-size:12px}',""]);const s=o.toString()},2150:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r)()(i());o.push([e.id,':host{--sidebar-background:#fff;--title-container-background:#fff;--title-container-color:#595959;display:block;outline-color:rgba(83,89,93,0.5);background-color:var(--sidebar-background);height:100%}:host-context(html[data-theme="dark-v2"]),\n:host-context([data-override-theme="dark-v2"]){--sidebar-background:#181818;--title-container-background:#181818;--title-container-color:rgb(187,187,187);background-color:var(--sidebar-background)}:host([hidden]){display:none}*,\n*::before,\n*::after{box-sizing:border-box}.sidebar{display:flex;flex-direction:column;height:100%}.title-container{display:flex;padding:0 8px 8px 8px;color:var(--title-container-color);background:var(--title-container-background)}.title-label{font-weight:300;line-height:44px;padding-left:12px;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pane-container{flex-grow:1;min-height:0;display:flex;flex-direction:column}::slotted([slot="panes"]){transition:flex 0.2s;min-height:25px}',""]);const s=o.toString()},6131:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(6758),i=n.n(a),r=n(935),o=n.n(r),s=n(7745),l=o()(i());l.i(s.A),l.push([e.id,"",""]);const c=l.toString()},264:(e,t,n)=>{function a(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function i(e){return e&&e.sensitive?"":"i"}function r(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,o=void 0!==r&&r,s=n.start,l=void 0===s||s,c=n.end,d=void 0===c||c,h=n.encode,p=void 0===h?function(e){return e}:h,u=n.delimiter,m=void 0===u?"/#?":u,g=n.endsWith,v="[".concat(a(void 0===g?"":g),"]|$"),b="[".concat(a(m),"]"),f=l?"^":"",A=0,y=e;A<y.length;A++){var E=y[A];if("string"==typeof E)f+=a(p(E));else{var k=a(p(E.prefix)),w=a(p(E.suffix));if(E.pattern)if(t&&t.push(E),k||w)if("+"===E.modifier||"*"===E.modifier){var x="*"===E.modifier?"?":"";f+="(?:".concat(k,"((?:").concat(E.pattern,")(?:").concat(w).concat(k,"(?:").concat(E.pattern,"))*)").concat(w,")").concat(x)}else f+="(?:".concat(k,"(").concat(E.pattern,")").concat(w,")").concat(E.modifier);else"+"===E.modifier||"*"===E.modifier?f+="((?:".concat(E.pattern,")").concat(E.modifier,")"):f+="(".concat(E.pattern,")").concat(E.modifier);else f+="(?:".concat(k).concat(w,")").concat(E.modifier)}}if(d)o||(f+="".concat(b,"?")),f+=n.endsWith?"(?=".concat(v,")"):"$";else{var N=e[e.length-1],L="string"==typeof N?b.indexOf(N[N.length-1])>-1:void 0===N;o||(f+="(?:".concat(b,"(?=").concat(v,"))?")),L||(f+="(?=".concat(b,"|").concat(v,")"))}return new RegExp(f,i(n))}(function(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var a=e[n];if("*"!==a&&"+"!==a&&"?"!==a)if("\\"!==a)if("{"!==a)if("}"!==a)if(":"!==a)if("("!==a)t.push({type:"CHAR",index:n,value:e[n++]});else{var i=1,r="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--i){s++;break}}else if("("===e[s]&&(i++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));r+=e[s++]}else r+=e[s++]+e[s++];if(i)throw new TypeError("Unbalanced pattern at ".concat(n));if(!r)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:r}),n=s}else{for(var o="",s=n+1;s<e.length;){var l=e.charCodeAt(s);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;o+=e[s++]}if(!o)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:o}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),i=t.prefixes,r=void 0===i?"./":i,o="[^".concat(a(t.delimiter||"/#?"),"]+?"),s=[],l=0,c=0,d="",h=function(e){if(c<n.length&&n[c].type===e)return n[c++].value},p=function(e){var t=h(e);if(void 0!==t)return t;var a=n[c],i=a.type,r=a.index;throw new TypeError("Unexpected ".concat(i," at ").concat(r,", expected ").concat(e))},u=function(){for(var e,t="";e=h("CHAR")||h("ESCAPED_CHAR");)t+=e;return t};c<n.length;){var m=h("CHAR"),g=h("NAME"),v=h("PATTERN");if(g||v){var b=m||"";-1===r.indexOf(b)&&(d+=b,b=""),d&&(s.push(d),d=""),s.push({name:g||l++,prefix:b,suffix:"",pattern:v||o,modifier:h("MODIFIER")||""})}else{var f=m||h("ESCAPED_CHAR");if(f)d+=f;else if(d&&(s.push(d),d=""),h("OPEN")){b=u();var A=h("NAME")||"",y=h("PATTERN")||"",E=u();p("CLOSE"),s.push({name:A||(y?l++:""),pattern:A&&!y?o:y,prefix:b,suffix:E,modifier:h("MODIFIER")||""})}else p("END")}}return s}(e,n),t,n)}function o(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,a=0,i=n.exec(e.source);i;)t.push({name:i[1]||a++,prefix:"",suffix:"",modifier:"",pattern:""}),i=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var a=e.map((function(e){return o(e,t,n).source}));return new RegExp("(?:".concat(a.join("|"),")"),i(n))}(e,t,n):r(e,t,n)}n.d(t,{MM:()=>o})}}]);
|
|
3
|
-
//# sourceMappingURL=8144.c19b5f90.js.map
|