@nocobase/app 1.6.27 → 1.6.29
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.
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
width: 100%;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
`])),T.paddingXXS,T.marginXXS,T.paddingSM,T.padding,T.padding,T.marginXXS,T.padding,T.margin),items:W},f))})},g=function(D){var E,u=D.children,d=D.items,c=D.title,f=D.name,z=D.onOpenChange,T=D.icon,W=C()(D,V),t=(0,n.eJW)(),I=(0,b.UR)(),H=(0,M.useMemo)(function(){return f||(I==null?void 0:I.name)||(0,v.uid)()},[f,I]),K=(E=d||u)===null||E===void 0?void 0:E.filter(function(te){return te.useVisible?te.useVisible():!0}),U=(0,N.hL)(K,f),F=(0,M.useMemo)(function(){return[i()(i()({},W),{},{key:H,label:t(c),icon:typeof T=="string"?(0,a.jsx)(o.Z,{type:T}):T,children:U})]},[U,t,T,H,W,c]);return(0,a.jsx)(B,{onOpenChange:z,items:F})},S=function(){var D=(0,b.UR)();return(0,a.jsx)(g,i()({},D))}},1329:function(Ne,ae,e){"use strict";e.r(ae),e.d(ae,{SchemaInitializerActionModal:function(){return T.H},SchemaInitializerActionModalInternal:function(){return T.I},SchemaInitializerChild:function(){return a.y},SchemaInitializerChildren:function(){return a.E},SchemaInitializerDivider:function(){return y},SchemaInitializerItem:function(){return l.l},SchemaInitializerItemGroup:function(){return c},SchemaInitializerItemGroupInternal:function(){return f},SchemaInitializerItemInternal:function(){return l.V},SchemaInitializerItems:function(){return z},SchemaInitializerMenu:function(){return w.tu},SchemaInitializerMenuProvider:function(){return w.kw},SchemaInitializerSelect:function(){return I},SchemaInitializerSelectInternal:function(){return H},SchemaInitializerSubMenu:function(){return w.eU},SchemaInitializerSubMenuInternal:function(){return w.xv},SchemaInitializerSwitch:function(){return b},SchemaInitializerSwitchInternal:function(){return N},useSchemaInitializerStyles:function(){return V._},useSchemaInitializerSubMenuContext:function(){return w.vH}});var w=e(70345),l=e(7849),G=e(97857),i=e.n(G),x=e(13769),C=e.n(x),O=e(59637),o=e(67294),k=e(62954),v=e(24019),j=e(85893),p=["title","checked"],M={marginLeft:20},n={display:"flex",alignItems:"center",justifyContent:"space-between"},b=function(U){var F=U.title,te=U.checked,q=C()(U,p),J=(0,k.eJW)();return(0,j.jsx)(l.l,i()(i()({},q),{},{closeInitializerMenuWhenClick:!1,children:(0,j.jsxs)("div",{style:n,children:[J(F),(0,j.jsx)(O.Z,{disabled:U.disabled,style:M,size:"small",checked:te})]})}))},N=function(){var U=(0,v.UR)();return(0,j.jsx)(b,i()({},U))},r=e(9361),a=e(45705),A=e(96074),y=function(){var U=r.Z.useToken(),F=U.token;return(0,j.jsx)(A.Z,{style:{marginTop:F.marginXXS,marginBottom:F.marginXXS}})},V=e(69960),Y=e(5574),L=e.n(Y),h=e(84327),B=e(69677),g=e(32983),S=e(26793),m=e(21143);function D(K,U){var F=K.replace(/-displayCollectionFields$/,""),te=U.replace(/-displayCollectionFields$/,"");return!F.includes(te)}var E=function(U){var F=U.value,te=U.onChange,q=U.name,J=(0,S.$)(),Z=J.t,P=(0,o.useState)(F),X=L()(P,2),le=X[0],Q=X[1],oe=(0,o.useRef)(""),Ce=(0,o.useRef)("".concat(q||Math.random().toString(10).substr(2,9)));(0,o.useEffect)(function(){Q(F)},[F]),(0,o.useEffect)(function(){var ye,ve=function(){var re,de;oe.current&&((re=document.activeElement)===null||re===void 0?void 0:re.id)!==oe.current.input.id&&D((de=document.activeElement)===null||de===void 0?void 0:de.id,oe.current.input.id)&&oe.current.focus()},xe=new IntersectionObserver(function(he){he.some(function(re){return re.isIntersecting})&&ve()});return(ye=oe.current)!==null&&ye!==void 0&&ye.input&&(oe.current.input.id=Ce.current,xe.observe(oe.current.input)),function(){xe.disconnect()}},[]);var se=(0,o.useRef)(!1),De=function(ve){se.current||(te(ve.target.value),Q(ve.target.value))},We=function(ve){ve.type==="compositionend"?(se.current=!1,De(ve)):se.current=!0};return(0,j.jsxs)("div",{onClick:function(ve){return ve.stopPropagation()},children:[(0,j.jsx)(B.Z,{ref:oe,allowClear:!0,style:{padding:"0 4px 6px 16px",boxShadow:"none"},bordered:!1,placeholder:Z("Search"),defaultValue:le,onClick:function(ve){ve.stopPropagation()},onChange:De,onCompositionStart:We,onCompositionEnd:We,onCompositionUpdate:We}),(0,j.jsx)(A.Z,{style:{margin:0}})]})},u=null,d=function(U){var F=U.children,te=U.showType,q=U.hideSearch,J=U.name,Z=(0,m.useCompile)(),P=(0,o.useState)(null),X=L()(P,2),le=X[0],Q=X[1],oe=function(We,ye){if(!le||le===""||u&&u!==ye)return We;var ve=le.toLocaleLowerCase();return We.filter(function(xe){return(xe.title||xe.label)&&String(Z(xe.title||xe.label)).toLocaleLowerCase().includes(ve)})},Ce=function De(We,ye){var ve,xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set,he=[];return!q&&(We.length>10||le)&&!["subMenu","itemGroup"].includes((ve=We[0])===null||ve===void 0?void 0:ve.type)&&he.push(i()({key:"search-".concat((0,h.uid)()),Component:function(){return(0,j.jsx)(E,{name:ye,value:!u||u===ye?le:"",onChange:function(_e){u=ye,Q(_e)}})},onClick:function(de){var _e=de.domEvent;_e.stopPropagation()}},te?{isMenuType:!0}:{})),We.forEach(function(re){if(!xe.has(re))if(xe.add(re),["subMenu","itemGroup"].includes(re.type)){var de=!u||u===re.name?oe(re.children.concat(),re.name):re.children,_e=De(de,re.name,xe);he.push(i()(i()({},re),{},{children:_e}))}else he.push(re)}),We.length===0&&he.push(i()({key:"empty",style:{height:150},Component:function(){return(0,j.jsx)("div",{onClick:function(_e){return _e.stopPropagation()},children:(0,j.jsx)(g.Z,{image:g.Z.PRESENTED_IMAGE_SIMPLE})})}},te?{isMenuType:!0}:{})),he},se=Ce(oe((F==null?void 0:F.concat())||[],J),J);return F?se:void 0},c=function(U){var F=U.children,te=U.items,q=U.title,J=U.divider,Z=(0,k.eJW)(),P=(0,V._)(),X=P.componentCls,le=r.Z.useToken(),Q=le.token;return(0,j.jsxs)("div",{style:{marginInline:Q.marginXXS},children:[J&&(0,j.jsx)(y,{}),(0,j.jsx)("div",{className:"".concat(X,"-group-title"),children:Z(q)}),(0,j.jsx)(a.E,{children:te||F})]})},f=function(){var U=(0,v.UR)(),F=d(U);return U.name&&U.name!=="displayFields"?(0,j.jsx)(c,i()({},U)):(0,j.jsx)(c,i()(i()({},U),{},{children:F}))},z=function(U){var F=U.items;return F.length===0?null:(0,j.jsx)(a.E,{children:F})},T=e(916),W=e(34041),t=["title","options","value","onChange","openOnHover","onClick"],I=function(U){var F=U.title,te=U.options,q=U.value,J=U.onChange,Z=U.openOnHover,P=U.onClick,X=C()(U,t),le=(0,o.useState)(!1),Q=L()(le,2),oe=Q[0],Ce=Q[1],se=(0,o.useCallback)(function(){Ce(!1);for(var ye=arguments.length,ve=new Array(ye),xe=0;xe<ye;xe++)ve[xe]=arguments[xe];P==null||P.apply(void 0,ve)},[Ce,P]),De=(0,o.useCallback)(function(){return Ce(!0)},[]),We=(0,o.useMemo)(function(){return Z?{onMouseEnter:De,open:oe}:{}},[De,oe,Z]);return(0,j.jsx)(l.l,i()(i()({closeInitializerMenuWhenClick:!1},X),{},{children:(0,j.jsxs)("div",{style:{alignItems:"center",display:"flex",justifyContent:"space-between"},children:[F,(0,j.jsx)(W.default,i()({"data-testid":"antd-select",popupMatchSelectWidth:!1,bordered:!1,defaultValue:q,onChange:function(){return Ce(!1),J.apply(void 0,arguments)},options:te,style:{textAlign:"right",minWidth:100},onClick:se},We))]})}))},H=function(){var U=(0,v.UR)();return(0,j.jsx)(I,i()({},U))}},69960:function(Ne,ae,e){"use strict";e.d(ae,{_:function(){return i}});var w=e(9783),l=e.n(w),G=e(46917),i=(0,G.l6)("nb-schema-initializer",function(x){var C,O,o,k=x.componentCls;return o={},l()(o,k,{".ant-menu":{background:"transparent",borderInlineEnd:"none !important"},":not(.ant-menu)":(O={},l()(O,"".concat(k,"-group-title"),{color:x.colorTextDescription,lineHeight:"".concat(x.controlHeight,"px"),paddingLeft:x.padding,paddingRight:x.paddingSM}),l()(O,"".concat(k,"-menu-item"),(C={marginInline:x.marginXXS,paddingLeft:x.padding,paddingRight:x.paddingSM,lineHeight:"".concat(x.controlHeight,"px"),color:x.colorText},l()(C,"&:not(".concat(k,"-menu-item-disabled)"),l()({cursor:"pointer"},"&:hover",{borderRadius:x.borderRadiusSM,backgroundColor:x.colorBgTextHover})),l()(C,"&".concat(k,"-menu-item-disabled"),{cursor:"not-allowed",color:x.colorTextDisabled}),C)),O)}),l()(o,"".concat(k,"-item-content"),{marginLeft:x.controlHeightSM-x.fontSize}),o})},24019:function(Ne,ae,e){"use strict";e.d(ae,{Mm:function(){return i},UR:function(){return x},V4:function(){return l},q_:function(){return G}});var w=e(67294),l=(0,w.createContext)({});l.displayName="SchemaInitializerContext";var G=function(){return w.useContext(l)},i=(0,w.createContext)({});i.displayName="SchemaInitializerItemContext";var x=function(){return w.useContext(i)}},79143:function(Ne,ae,e){"use strict";e.d(ae,{ne:function(){return G},bw:function(){return B},hL:function(){return h},IU:function(){return Y}});var w=e(67294),l=e(70345),G=function(){var S=(0,l.vH)(),m=S.isInMenu,D=(0,w.useMemo)(function(){return m?{}:{role:"menuitem"}},[m]);return{attribute:D}},i=e(52677),x=e.n(i),C=e(97857),O=e.n(C),o=e(39270),k=e(43173),v=e(1329),j=e(13769),p=e.n(j),M=e(15867),n=e(82369),b=e(62954),N=e(96256),r=e(85893),a=["style","options"],A=w.memo(function(g){var S=g.style,m=g.options,D=p()(g,a),E=(0,b.eJW)(),u=(0,N.d)(),d=u.getAriaLabel;return(0,r.jsx)(M.ZP,O()(O()({"data-testid":m["data-testid"],"aria-label":d(),"aria-disabled":"false",type:"dashed",style:O()({borderColor:"var(--colorSettings)",color:"var(--colorSettings)",flex:"none"},S),icon:typeof m.icon=="string"?(0,r.jsx)(n.JO,{type:m.icon}):m.icon},D),{},{children:m.title&&(0,r.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",width:m.icon?"calc(100% - 14px)":"100%",verticalAlign:"bottom"},children:E(m.title)})}))});A.displayName="SchemaInitializerButton(memo)";var y=e(61024),V=function(S){var m=S.Component||A,D=S.ItemsComponent||v.SchemaInitializerItems,E=O()(O()({},S.itemsComponentProps),{},{options:S,items:S.items,style:S.itemsComponentStyle}),u=(0,w.useMemo)(function(){return(0,y.W)(m)},[m]);return w.createElement(u,S,w.createElement(D,E))};V.displayName="InitializerComponent";function Y(g,S){var m=(0,k.qD)(),D=(0,o.B)()||{},E=D.isMobile;g==="popup:common:addBlock"&&m.schemaInitializerManager.has("mobile:popup:common:addBlock")&&E&&(g="mobile:popup:common:addBlock");var u=(0,w.useMemo)(function(){return x()(g)==="object"?g:m.schemaInitializerManager.get(g)},[m.schemaInitializerManager,g]),d=(0,w.useMemo)(function(){return g?u?{exists:!0,render:function(f){return w.createElement(V,O()(O()(O()({},u.options),S),f))}}:(console.error('[nocobase]: SchemaInitializer "'.concat(g,'" not found')),{exists:!1,render:function(){return null}}):{exists:!1,render:function(){return null}}},[u,g,S]);return d}var L=["isMenuType"];function h(g,S,m){var D=B(m);return(0,w.useMemo)(function(){return D(g,S)},[D,g,S])}function B(g){var S=(0,b.eJW)(),m=(0,w.useCallback)(function(D,E){return D!=null&&D.length?D.map(function(u,d){var c=u.component||u.Component,f,z=u.title||u.label?S(u.title||u.label):void 0;if(c&&(f=w.createElement(v.SchemaInitializerChild,O()(O()({},u),{},{title:z}))),u.type==="divider")return{type:"divider",key:u.key||"divider-".concat(d)};if(u.type==="item"&&c)return u.key||(u.key="".concat(z,"-").concat(d)),u.associationField?{key:u.key,label:f,associationField:u.associationField}:{key:u.key,label:f};if(u.type==="itemGroup"){var T,W=typeof z=="string"?z:u.title,t=u.key||"".concat(E,"-item-group-").concat(d);return{type:"group",key:t,label:W,children:u!=null&&(T=u.children)!==null&&T!==void 0&&T.length?m(u.children,t):[]}}if(u.type==="subMenu"){var I,H=z,K=u.key||u.name||"".concat(E,"-sub-menu-").concat(d);return{key:K,label:H,children:u!=null&&(I=u.children)!==null&&I!==void 0&&I.length?m(u.children,K):[]}}if(u.isMenuType){var U=u.isMenuType,F=p()(u,L);return F}var te=f||z,q=u.key||"".concat(E,"-").concat(z,"-").concat(d),J=function(P){P.domEvent.stopPropagation(),P.key===q&&(u.onClick?u.onClick(O()(O()({},P),{},{item:u})):g==null||g(O()(O()({},P),{},{item:u})))};return u.associationField?{key:q,label:te,associationField:u.associationField,onClick:J}:{style:u.style,key:q,label:te,onClick:J}}):[]},[S,g]);return m}},59582:function(Ne,ae,e){"use strict";e.d(ae,{nl:function(){return C.n},Ms:function(){return x.e},HS:function(){return i.SchemaInitializerActionModal},IQ:function(){return i.SchemaInitializerActionModalInternal},yH:function(){return i.SchemaInitializerChild},E0:function(){return i.SchemaInitializerChildren},V4:function(){return G.V4},qU:function(){return i.SchemaInitializerDivider},lV:function(){return i.SchemaInitializerItem},Mm:function(){return G.Mm},iP:function(){return i.SchemaInitializerItemGroup},IY:function(){return i.SchemaInitializerItemGroupInternal},VG:function(){return i.SchemaInitializerItemInternal},LU:function(){return i.SchemaInitializerItems},eN:function(){return b},tu:function(){return i.SchemaInitializerMenu},kw:function(){return i.SchemaInitializerMenuProvider},iW:function(){return i.SchemaInitializerSelect},ud:function(){return i.SchemaInitializerSelectInternal},eU:function(){return i.SchemaInitializerSubMenu},xv:function(){return i.SchemaInitializerSubMenuInternal},_n:function(){return i.SchemaInitializerSwitch},wH:function(){return i.SchemaInitializerSwitchInternal},h6:function(){return C.h},ne:function(){return l.ne},bw:function(){return l.bw},q_:function(){return G.q_},UR:function(){return G.UR},hL:function(){return l.hL},IU:function(){return l.IU},_$:function(){return i.useSchemaInitializerStyles},vH:function(){return i.useSchemaInitializerSubMenuContext},W_:function(){return w.W}});var w=e(61024),l=e(79143),G=e(24019),i=e(1329),x=e(43868),C=e(3806),O=e(19632),o=e.n(O),k=e(12444),v=e.n(k),j=e(72004),p=e.n(j),M=e(9783),n=e.n(M),b=function(){function N(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=arguments.length>1?arguments[1]:void 0;v()(this,N),n()(this,"schemaInitializers",{}),n()(this,"actionList",{}),this._schemaInitializers=r,this.app=a,this.app=a,this.add.apply(this,o()(r))}return p()(N,[{key:"add",value:function(){for(var a=this,A=arguments.length,y=new Array(A),V=0;V<A;V++)y[V]=arguments[V];y.forEach(function(Y){a.schemaInitializers[Y.name]=Y,Array.isArray(a.actionList[Y.name])&&(a.actionList[Y.name].forEach(function(L){Y[L.type](L.itemName,L.data)}),a.actionList[Y.name]=void 0)})}},{key:"addItem",value:function(a,A,y){var V=this.get(a);V?V.add(A,y):(this.actionList[a]||(this.actionList[a]=[]),this.actionList[a].push({type:"add",itemName:A,data:y}))}},{key:"get",value:function(a){return this.schemaInitializers[a]}},{key:"getAll",value:function(){return this.schemaInitializers}},{key:"has",value:function(a){return!!this.get(a)}},{key:"remove",value:function(a){delete this.schemaInitializers[a]}},{key:"removeItem",value:function(a,A){var y=this.get(a);y?y.remove(A):(this.actionList[a]||(this.actionList[a]=[]),this.actionList[a].push({type:"remove",itemName:A}))}}]),N}()},61024:function(Ne,ae,e){"use strict";e.d(ae,{W:function(){return L}});var w=e(68400),l=e.n(w),G=e(97857),i=e.n(G),x=e(5574),C=e.n(x),O=e(80844),o=e(9361),k=e(55241),v=e(28459),j=e(67294),p=e(97133),M=e(4511),n=e(52967),b=e(53285),N=e(62954),r=e(69960),a=e(24019),A=e(85893),y,V=function(B){return B},Y=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:V;return B};function L(h){var B=(0,O.observer)(function(g){var S=(0,N.ngQ)(),m=S.designable,D=S.insertAdjacent,E=(0,b.P5)()||{},u=E.isInSubTable,d=g.insert,c=g.useInsert,f=g.useWrap,z=f===void 0?Y:f,T=g.wrap,W=T===void 0?V:T,t=g.insertPosition,I=t===void 0?"beforeEnd":t,H=g.onSuccess,K=g.designable,U=g.popoverProps,F=g.children,te=g.popover,q=te===void 0?!0:te,J=g.style,Z=g.componentProps,P=c?c():d,X=z(W),le=(0,j.useCallback)(function(Fe){P?P(X(Fe,{isInSubTable:u})):D(I,X(Fe,{isInSubTable:u}),{onSuccess:H})},[P,X,u,D,I,H]),Q=(0,r._)(),oe=Q.wrapSSR,Ce=Q.hashId,se=Q.componentCls,De=(0,j.useState)(!1),We=C()(De,2),ye=We[0],ve=We[1],xe=o.Z.useToken(),he=xe.token,re=(0,n.e)([ye]),de=(0,j.useMemo)(function(){return i()({options:g,style:J},Z)},[Z,g,J]),_e=(0,j.useMemo)(function(){return(0,p.css)(y||(y=l()([`
|
|
42
|
+
`])),T.paddingXXS,T.marginXXS,T.paddingSM,T.padding,T.padding,T.marginXXS,T.padding,T.margin),items:W},f))})},g=function(D){var E,u=D.children,d=D.items,c=D.title,f=D.name,z=D.onOpenChange,T=D.icon,W=C()(D,V),t=(0,n.eJW)(),I=(0,b.UR)(),H=(0,M.useMemo)(function(){return f||(I==null?void 0:I.name)||(0,v.uid)()},[f,I]),K=(E=d||u)===null||E===void 0?void 0:E.filter(function(te){return te.useVisible?te.useVisible():!0}),U=(0,N.hL)(K,f),F=(0,M.useMemo)(function(){return[i()(i()({},W),{},{key:H,label:t(c),icon:typeof T=="string"?(0,a.jsx)(o.Z,{type:T}):T,children:U})]},[U,t,T,H,W,c]);return(0,a.jsx)(B,{onOpenChange:z,items:F})},S=function(){var D=(0,b.UR)();return(0,a.jsx)(g,i()({},D))}},1329:function(Ne,ae,e){"use strict";e.r(ae),e.d(ae,{SchemaInitializerActionModal:function(){return T.H},SchemaInitializerActionModalInternal:function(){return T.I},SchemaInitializerChild:function(){return a.y},SchemaInitializerChildren:function(){return a.E},SchemaInitializerDivider:function(){return y},SchemaInitializerItem:function(){return l.l},SchemaInitializerItemGroup:function(){return c},SchemaInitializerItemGroupInternal:function(){return f},SchemaInitializerItemInternal:function(){return l.V},SchemaInitializerItems:function(){return z},SchemaInitializerMenu:function(){return w.tu},SchemaInitializerMenuProvider:function(){return w.kw},SchemaInitializerSelect:function(){return I},SchemaInitializerSelectInternal:function(){return H},SchemaInitializerSubMenu:function(){return w.eU},SchemaInitializerSubMenuInternal:function(){return w.xv},SchemaInitializerSwitch:function(){return b},SchemaInitializerSwitchInternal:function(){return N},useSchemaInitializerStyles:function(){return V._},useSchemaInitializerSubMenuContext:function(){return w.vH}});var w=e(70345),l=e(7849),G=e(97857),i=e.n(G),x=e(13769),C=e.n(x),O=e(59637),o=e(67294),k=e(62954),v=e(24019),j=e(85893),p=["title","checked"],M={marginLeft:20},n={display:"flex",alignItems:"center",justifyContent:"space-between"},b=function(U){var F=U.title,te=U.checked,q=C()(U,p),J=(0,k.eJW)();return(0,j.jsx)(l.l,i()(i()({},q),{},{closeInitializerMenuWhenClick:!1,children:(0,j.jsxs)("div",{style:n,children:[J(F),(0,j.jsx)(O.Z,{disabled:U.disabled,style:M,size:"small",checked:te})]})}))},N=function(){var U=(0,v.UR)();return(0,j.jsx)(b,i()({},U))},r=e(9361),a=e(45705),A=e(96074),y=function(){var U=r.Z.useToken(),F=U.token;return(0,j.jsx)(A.Z,{style:{marginTop:F.marginXXS,marginBottom:F.marginXXS}})},V=e(69960),Y=e(5574),L=e.n(Y),h=e(84327),B=e(69677),g=e(32983),S=e(26793),m=e(21143);function D(K,U){var F=K.replace(/-displayCollectionFields$/,""),te=U.replace(/-displayCollectionFields$/,"");return!F.includes(te)}var E=function(U){var F=U.value,te=U.onChange,q=U.name,J=(0,S.$)(),Z=J.t,P=(0,o.useState)(F),X=L()(P,2),le=X[0],Q=X[1],oe=(0,o.useRef)(""),Ce=(0,o.useRef)("".concat(q||Math.random().toString(10).substr(2,9)));(0,o.useEffect)(function(){Q(F)},[F]),(0,o.useEffect)(function(){var ye,ve=function(){var re,de;oe.current&&((re=document.activeElement)===null||re===void 0?void 0:re.id)!==oe.current.input.id&&D((de=document.activeElement)===null||de===void 0?void 0:de.id,oe.current.input.id)&&oe.current.focus()},xe=new IntersectionObserver(function(he){he.some(function(re){return re.isIntersecting})&&ve()});return(ye=oe.current)!==null&&ye!==void 0&&ye.input&&(oe.current.input.id=Ce.current,xe.observe(oe.current.input)),function(){xe.disconnect()}},[]);var se=(0,o.useRef)(!1),De=function(ve){se.current||(te(ve.target.value),Q(ve.target.value))},We=function(ve){ve.type==="compositionend"?(se.current=!1,De(ve)):se.current=!0};return(0,j.jsxs)("div",{onClick:function(ve){return ve.stopPropagation()},children:[(0,j.jsx)(B.Z,{ref:oe,allowClear:!0,style:{padding:"0 4px 6px 16px",boxShadow:"none"},bordered:!1,placeholder:Z("Search"),defaultValue:le,onClick:function(ve){ve.stopPropagation()},onChange:De,onCompositionStart:We,onCompositionEnd:We,onCompositionUpdate:We}),(0,j.jsx)(A.Z,{style:{margin:0}})]})},u=null,d=function(U){var F=U.children,te=U.showType,q=U.hideSearch,J=U.name,Z=(0,m.useCompile)(),P=(0,o.useState)(null),X=L()(P,2),le=X[0],Q=X[1],oe=function(We,ye){if(!le||le===""||u&&u!==ye)return We;var ve=le.toLocaleLowerCase();return We.filter(function(xe){return(xe.title||xe.label)&&String(Z(xe.title||xe.label)).toLocaleLowerCase().includes(ve)})},Ce=function De(We,ye){var ve,xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set,he=[];return!q&&(We.length>10||le)&&!["subMenu","itemGroup"].includes((ve=We[0])===null||ve===void 0?void 0:ve.type)&&he.push(i()({key:"search-".concat((0,h.uid)()),Component:function(){return(0,j.jsx)(E,{name:ye,value:!u||u===ye?le:"",onChange:function(_e){u=ye,Q(_e)}})},onClick:function(de){var _e=de.domEvent;_e.stopPropagation()}},te?{isMenuType:!0}:{})),We.forEach(function(re){if(!xe.has(re))if(xe.add(re),["subMenu","itemGroup"].includes(re.type)){var de=!u||u===re.name?oe(re.children.concat(),re.name):re.children,_e=De(de,re.name,xe);he.push(i()(i()({},re),{},{children:_e}))}else he.push(re)}),We.length===0&&he.push(i()({key:"empty",style:{height:150},Component:function(){return(0,j.jsx)("div",{onClick:function(_e){return _e.stopPropagation()},children:(0,j.jsx)(g.Z,{image:g.Z.PRESENTED_IMAGE_SIMPLE})})}},te?{isMenuType:!0}:{})),he},se=Ce(oe((F==null?void 0:F.concat())||[],J),J);return F?se:void 0},c=function(U){var F=U.children,te=U.items,q=U.title,J=U.divider,Z=(0,k.eJW)(),P=(0,V._)(),X=P.componentCls,le=r.Z.useToken(),Q=le.token;return(0,j.jsxs)("div",{style:{marginInline:Q.marginXXS},children:[J&&(0,j.jsx)(y,{}),(0,j.jsx)("div",{className:"".concat(X,"-group-title"),children:Z(q)}),(0,j.jsx)(a.E,{children:te||F})]})},f=function(){var U=(0,v.UR)(),F=d(U);return U.name&&U.name!=="displayFields"?(0,j.jsx)(c,i()({},U)):(0,j.jsx)(c,i()(i()({},U),{},{children:F}))},z=function(U){var F=U.items;return F.length===0?null:(0,j.jsx)(a.E,{children:F})},T=e(916),W=e(34041),t=["title","options","value","onChange","openOnHover","onClick"],I=function(U){var F=U.title,te=U.options,q=U.value,J=U.onChange,Z=U.openOnHover,P=U.onClick,X=C()(U,t),le=(0,o.useState)(!1),Q=L()(le,2),oe=Q[0],Ce=Q[1],se=(0,o.useCallback)(function(){Ce(!1);for(var ye=arguments.length,ve=new Array(ye),xe=0;xe<ye;xe++)ve[xe]=arguments[xe];P==null||P.apply(void 0,ve)},[Ce,P]),De=(0,o.useCallback)(function(){return Ce(!0)},[]),We=(0,o.useMemo)(function(){return Z?{onMouseEnter:De,open:oe}:{}},[De,oe,Z]);return(0,j.jsx)(l.l,i()(i()({closeInitializerMenuWhenClick:!1},X),{},{children:(0,j.jsxs)("div",{style:{alignItems:"center",display:"flex",justifyContent:"space-between"},children:[F,(0,j.jsx)(W.default,i()({"data-testid":"antd-select",popupMatchSelectWidth:!1,bordered:!1,defaultValue:q,onChange:function(){return Ce(!1),J.apply(void 0,arguments)},options:te,style:{textAlign:"right",minWidth:100},onClick:se},We))]})}))},H=function(){var U=(0,v.UR)();return(0,j.jsx)(I,i()({},U))}},69960:function(Ne,ae,e){"use strict";e.d(ae,{_:function(){return i}});var w=e(9783),l=e.n(w),G=e(46917),i=(0,G.l6)("nb-schema-initializer",function(x){var C,O,o,k=x.componentCls;return o={},l()(o,k,{".ant-menu":{background:"transparent",borderInlineEnd:"none !important"},":not(.ant-menu)":(O={},l()(O,"".concat(k,"-group-title"),{color:x.colorTextDescription,lineHeight:"".concat(x.controlHeight,"px"),paddingLeft:x.padding,paddingRight:x.paddingSM}),l()(O,"".concat(k,"-menu-item"),(C={marginInline:x.marginXXS,paddingLeft:x.padding,paddingRight:x.paddingSM,lineHeight:"".concat(x.controlHeight,"px"),color:x.colorText},l()(C,"&:not(".concat(k,"-menu-item-disabled)"),l()({cursor:"pointer"},"&:hover",{borderRadius:x.borderRadiusSM,backgroundColor:x.colorBgTextHover})),l()(C,"&".concat(k,"-menu-item-disabled"),{cursor:"not-allowed",color:x.colorTextDisabled}),C)),O)}),l()(o,"".concat(k,"-item-content"),{marginLeft:x.controlHeightSM-x.fontSize}),o})},24019:function(Ne,ae,e){"use strict";e.d(ae,{Mm:function(){return i},UR:function(){return x},V4:function(){return l},q_:function(){return G}});var w=e(67294),l=(0,w.createContext)({});l.displayName="SchemaInitializerContext";var G=function(){return w.useContext(l)},i=(0,w.createContext)({});i.displayName="SchemaInitializerItemContext";var x=function(){return w.useContext(i)}},79143:function(Ne,ae,e){"use strict";e.d(ae,{ne:function(){return G},bw:function(){return B},hL:function(){return h},IU:function(){return Y}});var w=e(67294),l=e(70345),G=function(){var S=(0,l.vH)(),m=S.isInMenu,D=(0,w.useMemo)(function(){return m?{}:{role:"menuitem"}},[m]);return{attribute:D}},i=e(52677),x=e.n(i),C=e(97857),O=e.n(C),o=e(39270),k=e(43173),v=e(1329),j=e(13769),p=e.n(j),M=e(15867),n=e(82369),b=e(62954),N=e(96256),r=e(85893),a=["style","options"],A=w.memo(function(g){var S=g.style,m=g.options,D=p()(g,a),E=(0,b.eJW)(),u=(0,N.d)(),d=u.getAriaLabel;return(0,r.jsx)(M.ZP,O()(O()({"data-testid":m["data-testid"],"aria-label":d(),"aria-disabled":"false",type:"dashed",style:O()({borderColor:"var(--colorSettings)",color:"var(--colorSettings)",flex:"none"},S),icon:typeof m.icon=="string"?(0,r.jsx)(n.JO,{type:m.icon}):m.icon},D),{},{children:m.title&&(0,r.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",width:m.icon?"calc(100% - 14px)":"100%",verticalAlign:"bottom"},children:E(m.title)})}))});A.displayName="SchemaInitializerButton(memo)";var y=e(61024),V=function(S){var m=S.Component||A,D=S.ItemsComponent||v.SchemaInitializerItems,E=O()(O()({},S.itemsComponentProps),{},{options:S,items:S.items,style:S.itemsComponentStyle}),u=(0,w.useMemo)(function(){return(0,y.W)(m)},[m]);return w.createElement(u,S,w.createElement(D,E))};V.displayName="InitializerComponent";function Y(g,S){var m=(0,k.qD)(),D=(0,o.B)()||{},E=D.isMobile;g==="popup:common:addBlock"&&m.schemaInitializerManager.has("mobile:popup:common:addBlock")&&E&&(g="mobile:popup:common:addBlock");var u=(0,w.useMemo)(function(){return x()(g)==="object"?g:m.schemaInitializerManager.get(g)},[m.schemaInitializerManager,g]),d=(0,w.useMemo)(function(){return g?u?{exists:!0,render:function(f){return w.createElement(V,O()(O()(O()({},u.options),S),f))}}:(console.error('[nocobase]: SchemaInitializer "'.concat(g,'" not found')),{exists:!1,render:function(){return null}}):{exists:!1,render:function(){return null}}},[u,g,S]);return d}var L=["isMenuType"];function h(g,S,m){var D=B(m);return(0,w.useMemo)(function(){return D(g,S)},[D,g,S])}function B(g){var S=(0,b.eJW)(),m=(0,w.useCallback)(function(D,E){return D!=null&&D.length?D.map(function(u,d){var c=u.component||u.Component,f,z=u.title||u.label?S(u.title||u.label):void 0;if(c&&(f=w.createElement(v.SchemaInitializerChild,O()(O()({},u),{},{title:z}))),u.type==="divider")return{type:"divider",key:u.key||"divider-".concat(d)};if(u.type==="item"&&c)return u.key||(u.key="".concat(z,"-").concat(d)),u.associationField?{key:u.key,label:f,associationField:u.associationField}:{key:u.key,label:f};if(u.type==="itemGroup"){var T,W=typeof z=="string"?z:u.title,t=u.key||"".concat(E,"-item-group-").concat(d);return{type:"group",key:t,label:W,children:u!=null&&(T=u.children)!==null&&T!==void 0&&T.length?m(u.children,t):[]}}if(u.type==="subMenu"){var I,H=z,K=u.key||u.name||"".concat(E,"-sub-menu-").concat(d);return{key:K,label:H,children:u!=null&&(I=u.children)!==null&&I!==void 0&&I.length?m(u.children,K):[]}}if(u.isMenuType){var U=u.isMenuType,F=p()(u,L);return F}var te=f||z,q=u.key||"".concat(E,"-").concat(z,"-").concat(d),J=function(P){P.domEvent.stopPropagation(),P.key===q&&(u.onClick?u.onClick(O()(O()({},P),{},{item:u})):g==null||g(O()(O()({},P),{},{item:u})))};return u.associationField?{key:q,label:te,associationField:u.associationField,onClick:J}:{style:u.style,key:q,label:te,onClick:J}}):[]},[S,g]);return m}},59582:function(Ne,ae,e){"use strict";e.d(ae,{nl:function(){return C.n},Ms:function(){return x.e},HS:function(){return i.SchemaInitializerActionModal},IQ:function(){return i.SchemaInitializerActionModalInternal},yH:function(){return i.SchemaInitializerChild},E0:function(){return i.SchemaInitializerChildren},V4:function(){return G.V4},qU:function(){return i.SchemaInitializerDivider},lV:function(){return i.SchemaInitializerItem},Mm:function(){return G.Mm},iP:function(){return i.SchemaInitializerItemGroup},IY:function(){return i.SchemaInitializerItemGroupInternal},VG:function(){return i.SchemaInitializerItemInternal},LU:function(){return i.SchemaInitializerItems},eN:function(){return b},tu:function(){return i.SchemaInitializerMenu},kw:function(){return i.SchemaInitializerMenuProvider},iW:function(){return i.SchemaInitializerSelect},ud:function(){return i.SchemaInitializerSelectInternal},eU:function(){return i.SchemaInitializerSubMenu},xv:function(){return i.SchemaInitializerSubMenuInternal},_n:function(){return i.SchemaInitializerSwitch},wH:function(){return i.SchemaInitializerSwitchInternal},h6:function(){return C.h},ne:function(){return l.ne},bw:function(){return l.bw},q_:function(){return G.q_},UR:function(){return G.UR},hL:function(){return l.hL},IU:function(){return l.IU},_$:function(){return i.useSchemaInitializerStyles},vH:function(){return i.useSchemaInitializerSubMenuContext},W_:function(){return w.W}});var w=e(61024),l=e(79143),G=e(24019),i=e(1329),x=e(43868),C=e(3806),O=e(19632),o=e.n(O),k=e(12444),v=e.n(k),j=e(72004),p=e.n(j),M=e(9783),n=e.n(M),b=function(){function N(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=arguments.length>1?arguments[1]:void 0;v()(this,N),n()(this,"schemaInitializers",{}),n()(this,"actionList",{}),this._schemaInitializers=r,this.app=a,this.app=a,this.add.apply(this,o()(r))}return p()(N,[{key:"add",value:function(){for(var a=this,A=arguments.length,y=new Array(A),V=0;V<A;V++)y[V]=arguments[V];y.forEach(function(Y){a.schemaInitializers[Y.name]=Y,Array.isArray(a.actionList[Y.name])&&(a.actionList[Y.name].forEach(function(L){Y[L.type](L.itemName,L.data)}),a.actionList[Y.name]=void 0)})}},{key:"addItem",value:function(a,A,y){var V=this.get(a);V?V.add(A,y):(this.actionList[a]||(this.actionList[a]=[]),this.actionList[a].push({type:"add",itemName:A,data:y}))}},{key:"get",value:function(a){return this.schemaInitializers[a]}},{key:"getAll",value:function(){return this.schemaInitializers}},{key:"has",value:function(a){return!!this.get(a)}},{key:"remove",value:function(a){delete this.schemaInitializers[a]}},{key:"removeItem",value:function(a,A){var y=this.get(a);y?y.remove(A):(this.actionList[a]||(this.actionList[a]=[]),this.actionList[a].push({type:"remove",itemName:A}))}}]),N}()},61024:function(Ne,ae,e){"use strict";e.d(ae,{W:function(){return L}});var w=e(68400),l=e.n(w),G=e(97857),i=e.n(G),x=e(5574),C=e.n(x),O=e(80844),o=e(9361),k=e(28459),v=e(55241),j=e(67294),p=e(97133),M=e(4511),n=e(52967),b=e(53285),N=e(62954),r=e(69960),a=e(24019),A=e(85893),y,V=function(B){return B},Y=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:V;return B};function L(h){var B=(0,O.observer)(function(g){var S=(0,N.ngQ)(),m=S.designable,D=S.insertAdjacent,E=(0,b.P5)()||{},u=E.isInSubTable,d=g.insert,c=g.useInsert,f=g.useWrap,z=f===void 0?Y:f,T=g.wrap,W=T===void 0?V:T,t=g.insertPosition,I=t===void 0?"beforeEnd":t,H=g.onSuccess,K=g.designable,U=g.popoverProps,F=g.children,te=g.popover,q=te===void 0?!0:te,J=g.style,Z=g.componentProps,P=c?c():d,X=z(W),le=(0,j.useCallback)(function(Fe){P?P(X(Fe,{isInSubTable:u})):D(I,X(Fe,{isInSubTable:u}),{onSuccess:H})},[P,X,u,D,I,H]),Q=(0,r._)(),oe=Q.wrapSSR,Ce=Q.hashId,se=Q.componentCls,De=(0,j.useState)(!1),We=C()(De,2),ye=We[0],ve=We[1],xe=o.Z.useToken(),he=xe.token,re=(0,n.e)([ye]),de=(0,j.useMemo)(function(){return i()({options:g,style:J},Z)},[Z,g,J]),_e=(0,j.useMemo)(function(){return(0,p.css)(y||(y=l()([`
|
|
43
43
|
.ant-popover-inner {
|
|
44
44
|
padding: `,`;
|
|
45
45
|
.ant-menu-submenu-title {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
padding: 0;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
`])),"".concat(he.paddingXXS,"px 0"))},[he.paddingXXS]),Ae=(0,j.useMemo)(function(){return{maxHeight:re,overflowY:"auto"}},[re]);return!m&&K!==!0?null:(0,A.jsx)(M.SV,{FallbackComponent:N.Hj5.Modal,onError:console.error,children:(0,A.jsx)(a.V4.Provider,{value:{visible:ye,setVisible:ve,insert:le,options:g},children:q===!1?j.createElement(h,de):(0,A.jsx)(k.Z,i()(i()({zIndex:9999,placement:"bottomLeft"},U),{},{arrow:!1,overlayClassName:_e,open:ye,onOpenChange:ve,content:oe((0,A.jsx)("div",{className:"".concat(se," ").concat(Ce),style:Ae,children:(0,A.jsx)(v.ZP,{theme:{components:{Menu:{itemHeight:he.marginXL,borderRadius:he.borderRadiusSM,itemBorderRadius:he.borderRadiusSM,subMenuItemBorderRadius:he.borderRadiusSM}}},children:F})})),children:j.createElement(h,de)}))})})},{displayName:"WithInitializer(".concat(h.displayName||h.name,")")});return B}},91410:function(Ne,ae,e){"use strict";e.d(ae,{F:function(){return k}});var w=e(97857),l=e.n(w),G=e(12444),i=e.n(G),x=e(72004),C=e.n(x),O=e(9783),o=e.n(O),k=function(){function v(j){i()(this,v),o()(this,"options",void 0),o()(this,"name",void 0),this.options=Object.assign({items:[]},j),this.name=j.name}return C()(v,[{key:"items",get:function(){return this.options.items}},{key:"add",value:function(p,M){var n=p.split("."),b=l()(l()({},M),{},{name:n[n.length-1]});if(n.length===1){var N=this.items.findIndex(function(V){return V.name===p});N===-1?this.items.push(b):this.items[N]=b;return}var r=n.slice(0,-1).join("."),a=this.get(r);if(a){a.children||(a.children=[]);var A=p.replace("".concat(a.name,"."),""),y=a.children.findIndex(function(V){return V.name===A});y===-1?a.children.push(b):a.children[y]=b}}},{key:"get",value:function(p){if(p){for(var M=p.split("."),n=this.items,b=function(){var A=M[r];if(n=n.find(function(y){return y.name===A}),!n||r===M.length-1)return{v:n};if(n.children)n=n.children;else return{v:void 0}},N,r=0;r<M.length;r++)if(N=b(),N)return N.v}}},{key:"remove",value:function(p){var M=p.split(".");if(M.length===1){var n=this.items.findIndex(function(a){return a.name===M[0]});n!==-1&&this.items.splice(n,1);return}var b=this.get(M.slice(0,-1).join("."));if(b&&b.children){var N=M[M.length-1],r=b.children.findIndex(function(a){return a.name===N});r!==-1&&b.children.splice(r,1)}}}]),v}()},78807:function(Ne,ae,e){"use strict";e.d(ae,{kY:function(){return g},dk:function(){return Y},GC:function(){return u}});var w=e(97857),l=e.n(w),G=e(13769),i=e.n(G),x=e(80844),C=e(67294),O=e(62954),o=e(90297),k=e(19632),v=e.n(k),j=e(96486),p=e.n(j),M=e(4511),n=e(56318),b=e(62662),N=e(78722),r=e(85893),a=["title"],A={item:b.r2,itemGroup:b.bw,subMenu:b.m$,divider:b.Z5,remove:b.qx,select:b.Qf,cascader:b.ns,switch:b.hj,popup:b.D3,actionModal:b.Qh,modal:b.j0},y=function(c){var f=c.title,z=i()(c,a);return(0,r.jsx)(b.r2,{title:f,children:(0,r.jsx)(O.Hj5.Modal,l()({},z))})},V=p().memoize(function(d){return function(c){return(0,r.jsx)(y,l()(l()({},c),{},{title:d}))}}),Y=function(c){var f=c.children,z=(0,b.DD)(),T=z.visible,W=(0,C.useRef)(!1),t=(0,n.W)();return(0,C.useEffect)(function(){T&&(W.current=!0)},[T]),!T&&!W.current||!f||f.length===0?null:(0,r.jsx)(r.Fragment,{children:f.sort(function(I,H){return(I.sort||0)-(H.sort||0)}).map(function(I){var H="".concat(t?t+"-":"").concat(I==null?void 0:I.name);return(0,r.jsx)(M.SV,{FallbackComponent:V(H),onError:console.log,children:(0,r.jsx)(g,l()({},I))},H)})})},L=function(){},h=function(){},B=function(){return!0},g=function(c){var f=c,z=f.useVisible,T=z===void 0?B:z,W=f.useChildren,t=W===void 0?L:W,I=f.useComponentProps,H=I===void 0?h:I,K=f.type,U=f.Component,F=f.children,te=f.hideIfNoChildren,q=f.componentProps,J=t(),Z=H(),P=(0,O.sRe)(),X=(0,C.useMemo)(function(){var Ce=[].concat(v()(J||[]),v()(F||[]));return Ce.length===0?void 0:Ce},[J,F]),le=T(),Q=(0,C.useMemo)(function(){return!U&&K&&A[K]?A[K]:U},[K,U]);if(!le||!K&&!U)return null;var oe=P(Q);return!oe||te&&!X?null:(0,r.jsx)(N.A.Provider,{value:c,children:(0,r.jsx)(oe,l()(l()(l()({},q),Z),{},{children:Array.isArray(X)&&X.length>0&&(0,r.jsx)(Y,{children:X})}))})},S=e(58521),m=e(69054),D=C.memo(function(d){var c=d.name,f=(0,m.z)(),z=f.getAriaLabel,T=(0,C.useMemo)(function(){return{cursor:"pointer",fontSize:12}},[]);return(0,r.jsx)(S.Z,{role:"button",style:T,"aria-label":z("schema-settings",c)})});D.displayName="SchemaSettingsIcon";var E=["items","Component","name","componentProps","style"],u=C.memo(function(d){var c=d.items,f=d.Component,z=f===void 0?D:f,T=d.name,W=d.componentProps,t=d.style,I=i()(d,E),H=(0,O.ngQ)(),K=H.dn,U=(0,x.useField)(),F=(0,x.useFieldSchema)(),te=(0,C.useMemo)(function(){return l()({options:d,style:t},W)},[W,d,t]);return(0,r.jsx)(o.cM,l()(l()({title:C.createElement(z,te),dn:K,field:U,fieldSchema:F},I),{},{children:(0,r.jsx)(Y,{children:c})}))});u.displayName="SchemaSettingsWrapper"},78722:function(Ne,ae,e){"use strict";e.d(ae,{A:function(){return l},J:function(){return G}});var w=e(67294),l=(0,w.createContext)({});l.displayName="SchemaSettingItemContext";function G(){return(0,w.useContext)(l)}},49966:function(Ne,ae,e){"use strict";e.d(ae,{m:function(){return o}});var w=e(97857),l=e.n(w),G=e(52677),i=e.n(G),x=e(67294),C=e(43173),O=e(78807);function o(k,v){var j=(0,C.qD)(),p=(0,x.useMemo)(function(){return i()(k)==="object"?k:j.schemaSettingsManager.get(k)},[j.schemaSettingsManager,k]);return k?p?{exists:!0,render:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return x.createElement(O.GC,l()(l()(l()({},p.options),v),n))}}:(console.error('[nocobase]: SchemaSettings "'.concat(k,'" not found')),{exists:!1,render:function(){return null}}):{exists:!1,render:function(){return null}}}},5537:function(Ne,ae,e){"use strict";e.d(ae,{A4:function(){return p.A},F5:function(){return w.F},kY:function(){return j.kY},dk:function(){return j.dk},XD:function(){return v},GC:function(){return j.GC},J$:function(){return p.J}});var w=e(91410),l=e(19632),G=e.n(l),i=e(12444),x=e.n(i),C=e(72004),O=e.n(C),o=e(9783),k=e.n(o),v=function(){function M(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],b=arguments.length>1?arguments[1]:void 0;x()(this,M),k()(this,"schemaSettings",{}),k()(this,"actionList",{}),this._schemaSettings=n,this.app=b,this.app=b,this.add.apply(this,G()(n))}return O()(M,[{key:"add",value:function(){for(var b=this,N=arguments.length,r=new Array(N),a=0;a<N;a++)r[a]=arguments[a];r.forEach(function(A){b.schemaSettings[A.name]=A,Array.isArray(b.actionList[A.name])&&(b.actionList[A.name].forEach(function(y){A[y.type](y.itemName,y.data)}),b.actionList[A.name]=void 0)})}},{key:"addItem",value:function(b,N,r){var a=this.get(b);a?a.add(N,r):(this.actionList[b]||(this.actionList[b]=[]),this.actionList[b].push({type:"add",itemName:N,data:r}))}},{key:"get",value:function(b){return this.schemaSettings[b]}},{key:"getAll",value:function(){return this.schemaSettings}},{key:"has",value:function(b){return!!this.get(b)}},{key:"remove",value:function(b){delete this.schemaSettings[b]}},{key:"removeItem",value:function(b,N){var r=this.get(b);r?r.remove(N):(this.actionList[b]||(this.actionList[b]=[]),this.actionList[b].push({type:"remove",itemName:N}))}}]),M}(),j=e(78807),p=e(78722)},93167:function(Ne,ae,e){"use strict";e.d(ae,{H:function(){return o}});var w=e(96486),l=e.n(w),G=e(26793),i=e(62954),x=e(96365),C=e(94516),O=e(4685);function o(k){var v=k.name,j=k.useVisible,p=k.schemaKey,M=k.title,n=k.type,b=n===void 0?"common":n,N=k.defaultValue,r=k.useDefaultValue,a=r===void 0?O.U2:r,A=k.useComponentProps;return{name:v,useVisible:j,type:"switch",useComponentProps:function(){var V=(0,O.h0)(b),Y=(0,C.ng)(),L=Y.dn,h=a(N),B=(0,x.e)(),g=(0,G.$)(),S=g.t,m=(0,i.z9d)()||{},D=m.fieldSchema,E=A==null?void 0:A();return{title:typeof M=="function"?M(S):B(M),checked:(E==null?void 0:E.checked)===void 0?!!l().get(V,p,h):E==null?void 0:E.checked,onChange:function(d){var c;E==null||(c=E.onChange)===null||c===void 0||c.call(E,d);var f=(0,O.pg)({fieldSchema:V,schemaKey:p,value:d});D?(L.emit("patch",{schema:f}),L.refresh()):L.deepMerge(f)}}}}}},4685:function(Ne,ae,e){"use strict";e.d(ae,{U2:function(){return o},h0:function(){return k},pg:function(){return O}});var w=e(52677),l=e.n(w),G=e(80844),i=e(96486),x=e.n(i),C=e(62954);function O(v){var j=v,p=j.fieldSchema,M=j.schemaKey,n=j.parentSchemaKey,b=j.value,N=j.valueKeys;if(M)x().set(p,M,b);else if(n){if(b==null)return p;l()(b)==="object"?Object.keys(b).forEach(function(r){N&&!N.includes(r)||x().set(p,"".concat(n,".").concat(r),b[r])}):console.error("value must be object")}return p}var o=function(j){return j},k=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"common",p=(0,G.useFieldSchema)(),M=(0,C.z9d)()||{},n=M.fieldSchema;return j==="field"&&n||p}},1992:function(Ne,ae,e){"use strict";e.d(ae,{J1:function(){return C},Po:function(){return o},V$:function(){return O}});var w=e(13769),l=e.n(w),G=e(67294),i=e(85893),x=["children"],C=(0,G.createContext)({});C.displayName="SchemaToolbarContext";var O=function(v){var j=v.children,p=l()(v,x);return(0,i.jsx)(C.Provider,{value:p,children:j})};function o(){return(0,G.useContext)(C)}},78542:function(Ne,ae,e){"use strict";e.d(ae,{J1:function(){return w.J1},V$:function(){return w.V$},Po:function(){return w.Po},du:function(){return v}});var w=e(1992),l=e(97857),G=e.n(l),i=e(67294),x=e(4511),C=e(62954),O=e(50679),o=e(85893),k=function(p){var M=(0,C.ngQ)(),n=M.designable;return n?(0,o.jsx)(C.Hj5.Modal,G()(G()({},p),{},{children:(0,o.jsx)(O.Mf,{title:"render toolbar error: ".concat(p.error.message)})})):null},v=function(p){var M=(0,C.ngQ)(),n=M.designable,b=(0,i.useMemo)(function(){if(p["x-designer"]||p["x-toolbar"])return p["x-designer"]||p["x-toolbar"];if(p["x-settings"])return O.Mf},[p]),N=(0,C.Cor)(b);return{render:function(a){return!n||!N?null:(0,o.jsx)(x.SV,{FallbackComponent:k,onError:console.error,children:(0,o.jsx)(N,G()(G()({},p["x-toolbar-props"]),a))})},exists:!!N}}},57780:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{_:function(){return getRequireJs}});var _home_runner_work_nocobase_nocobase_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(52677),_home_runner_work_nocobase_nocobase_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_home_runner_work_nocobase_nocobase_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0__);function getRequireJs(){var requirejs,require,define,req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.6",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!!(typeof window<"u"&&typeof navigator<"u"&&window.document),isWebWorker=!isBrowser&&typeof importScripts<"u",readyRegExp=isBrowser&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera<"u"&&opera.toString()==="[object Opera]",contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(Ne,ae){return ae||""}function isFunction(Ne){return ostring.call(Ne)==="[object Function]"}function isArray(Ne){return ostring.call(Ne)==="[object Array]"}function each(Ne,ae){if(Ne){var e;for(e=0;e<Ne.length&&!(Ne[e]&&ae(Ne[e],e,Ne));e+=1);}}function eachReverse(Ne,ae){if(Ne){var e;for(e=Ne.length-1;e>-1&&!(Ne[e]&&ae(Ne[e],e,Ne));e-=1);}}function hasProp(Ne,ae){return hasOwn.call(Ne,ae)}function getOwn(Ne,ae){return hasProp(Ne,ae)&&Ne[ae]}function eachProp(Ne,ae){var e;for(e in Ne)if(hasProp(Ne,e)&&ae(Ne[e],e))break}function mixin(Ne,ae,e,w){return ae&&eachProp(ae,function(l,G){(e||!hasProp(Ne,G))&&(w&&_home_runner_work_nocobase_nocobase_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0___default()(l)==="object"&&l&&!isArray(l)&&!isFunction(l)&&!(l instanceof RegExp)?(Ne[G]||(Ne[G]={}),mixin(Ne[G],l,e,w)):Ne[G]=l)}),Ne}function bind(Ne,ae){return function(){return ae.apply(Ne,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(Ne){throw Ne}function getGlobal(Ne){if(!Ne)return Ne;var ae=__webpack_require__.g;return each(Ne.split("."),function(e){ae=ae[e]}),ae}function makeError(Ne,ae,e,w){var l=new Error(ae+`
|
|
52
|
+
`])),"".concat(he.paddingXXS,"px 0"))},[he.paddingXXS]),Ae=(0,j.useMemo)(function(){return{maxHeight:re,overflowY:"auto"}},[re]);return!m&&K!==!0?null:(0,A.jsx)(M.SV,{FallbackComponent:N.Hj5.Modal,onError:console.error,children:(0,A.jsx)(k.ZP,{theme:{token:{zIndexPopupBase:9999}},children:(0,A.jsx)(a.V4.Provider,{value:{visible:ye,setVisible:ve,options:g,insert:le},children:q===!1?j.createElement(h,de):(0,A.jsx)(v.Z,i()(i()({zIndex:9999,placement:"bottomLeft"},U),{},{arrow:!1,overlayClassName:_e,open:ye,onOpenChange:ve,content:oe((0,A.jsx)("div",{className:"".concat(se," ").concat(Ce),style:Ae,children:(0,A.jsx)(k.ZP,{theme:{components:{Menu:{itemHeight:he.marginXL,borderRadius:he.borderRadiusSM,itemBorderRadius:he.borderRadiusSM,subMenuItemBorderRadius:he.borderRadiusSM}}},children:F})})),children:j.createElement(h,de)}))})})})},{displayName:"WithInitializer(".concat(h.displayName||h.name,")")});return B}},91410:function(Ne,ae,e){"use strict";e.d(ae,{F:function(){return k}});var w=e(97857),l=e.n(w),G=e(12444),i=e.n(G),x=e(72004),C=e.n(x),O=e(9783),o=e.n(O),k=function(){function v(j){i()(this,v),o()(this,"options",void 0),o()(this,"name",void 0),this.options=Object.assign({items:[]},j),this.name=j.name}return C()(v,[{key:"items",get:function(){return this.options.items}},{key:"add",value:function(p,M){var n=p.split("."),b=l()(l()({},M),{},{name:n[n.length-1]});if(n.length===1){var N=this.items.findIndex(function(V){return V.name===p});N===-1?this.items.push(b):this.items[N]=b;return}var r=n.slice(0,-1).join("."),a=this.get(r);if(a){a.children||(a.children=[]);var A=p.replace("".concat(a.name,"."),""),y=a.children.findIndex(function(V){return V.name===A});y===-1?a.children.push(b):a.children[y]=b}}},{key:"get",value:function(p){if(p){for(var M=p.split("."),n=this.items,b=function(){var A=M[r];if(n=n.find(function(y){return y.name===A}),!n||r===M.length-1)return{v:n};if(n.children)n=n.children;else return{v:void 0}},N,r=0;r<M.length;r++)if(N=b(),N)return N.v}}},{key:"remove",value:function(p){var M=p.split(".");if(M.length===1){var n=this.items.findIndex(function(a){return a.name===M[0]});n!==-1&&this.items.splice(n,1);return}var b=this.get(M.slice(0,-1).join("."));if(b&&b.children){var N=M[M.length-1],r=b.children.findIndex(function(a){return a.name===N});r!==-1&&b.children.splice(r,1)}}}]),v}()},78807:function(Ne,ae,e){"use strict";e.d(ae,{kY:function(){return g},dk:function(){return Y},GC:function(){return u}});var w=e(97857),l=e.n(w),G=e(13769),i=e.n(G),x=e(80844),C=e(67294),O=e(62954),o=e(90297),k=e(19632),v=e.n(k),j=e(96486),p=e.n(j),M=e(4511),n=e(56318),b=e(62662),N=e(78722),r=e(85893),a=["title"],A={item:b.r2,itemGroup:b.bw,subMenu:b.m$,divider:b.Z5,remove:b.qx,select:b.Qf,cascader:b.ns,switch:b.hj,popup:b.D3,actionModal:b.Qh,modal:b.j0},y=function(c){var f=c.title,z=i()(c,a);return(0,r.jsx)(b.r2,{title:f,children:(0,r.jsx)(O.Hj5.Modal,l()({},z))})},V=p().memoize(function(d){return function(c){return(0,r.jsx)(y,l()(l()({},c),{},{title:d}))}}),Y=function(c){var f=c.children,z=(0,b.DD)(),T=z.visible,W=(0,C.useRef)(!1),t=(0,n.W)();return(0,C.useEffect)(function(){T&&(W.current=!0)},[T]),!T&&!W.current||!f||f.length===0?null:(0,r.jsx)(r.Fragment,{children:f.sort(function(I,H){return(I.sort||0)-(H.sort||0)}).map(function(I){var H="".concat(t?t+"-":"").concat(I==null?void 0:I.name);return(0,r.jsx)(M.SV,{FallbackComponent:V(H),onError:console.log,children:(0,r.jsx)(g,l()({},I))},H)})})},L=function(){},h=function(){},B=function(){return!0},g=function(c){var f=c,z=f.useVisible,T=z===void 0?B:z,W=f.useChildren,t=W===void 0?L:W,I=f.useComponentProps,H=I===void 0?h:I,K=f.type,U=f.Component,F=f.children,te=f.hideIfNoChildren,q=f.componentProps,J=t(),Z=H(),P=(0,O.sRe)(),X=(0,C.useMemo)(function(){var Ce=[].concat(v()(J||[]),v()(F||[]));return Ce.length===0?void 0:Ce},[J,F]),le=T(),Q=(0,C.useMemo)(function(){return!U&&K&&A[K]?A[K]:U},[K,U]);if(!le||!K&&!U)return null;var oe=P(Q);return!oe||te&&!X?null:(0,r.jsx)(N.A.Provider,{value:c,children:(0,r.jsx)(oe,l()(l()(l()({},q),Z),{},{children:Array.isArray(X)&&X.length>0&&(0,r.jsx)(Y,{children:X})}))})},S=e(58521),m=e(69054),D=C.memo(function(d){var c=d.name,f=(0,m.z)(),z=f.getAriaLabel,T=(0,C.useMemo)(function(){return{cursor:"pointer",fontSize:12}},[]);return(0,r.jsx)(S.Z,{role:"button",style:T,"aria-label":z("schema-settings",c)})});D.displayName="SchemaSettingsIcon";var E=["items","Component","name","componentProps","style"],u=C.memo(function(d){var c=d.items,f=d.Component,z=f===void 0?D:f,T=d.name,W=d.componentProps,t=d.style,I=i()(d,E),H=(0,O.ngQ)(),K=H.dn,U=(0,x.useField)(),F=(0,x.useFieldSchema)(),te=(0,C.useMemo)(function(){return l()({options:d,style:t},W)},[W,d,t]);return(0,r.jsx)(o.cM,l()(l()({title:C.createElement(z,te),dn:K,field:U,fieldSchema:F},I),{},{children:(0,r.jsx)(Y,{children:c})}))});u.displayName="SchemaSettingsWrapper"},78722:function(Ne,ae,e){"use strict";e.d(ae,{A:function(){return l},J:function(){return G}});var w=e(67294),l=(0,w.createContext)({});l.displayName="SchemaSettingItemContext";function G(){return(0,w.useContext)(l)}},49966:function(Ne,ae,e){"use strict";e.d(ae,{m:function(){return o}});var w=e(97857),l=e.n(w),G=e(52677),i=e.n(G),x=e(67294),C=e(43173),O=e(78807);function o(k,v){var j=(0,C.qD)(),p=(0,x.useMemo)(function(){return i()(k)==="object"?k:j.schemaSettingsManager.get(k)},[j.schemaSettingsManager,k]);return k?p?{exists:!0,render:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return x.createElement(O.GC,l()(l()(l()({},p.options),v),n))}}:(console.error('[nocobase]: SchemaSettings "'.concat(k,'" not found')),{exists:!1,render:function(){return null}}):{exists:!1,render:function(){return null}}}},5537:function(Ne,ae,e){"use strict";e.d(ae,{A4:function(){return p.A},F5:function(){return w.F},kY:function(){return j.kY},dk:function(){return j.dk},XD:function(){return v},GC:function(){return j.GC},J$:function(){return p.J}});var w=e(91410),l=e(19632),G=e.n(l),i=e(12444),x=e.n(i),C=e(72004),O=e.n(C),o=e(9783),k=e.n(o),v=function(){function M(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],b=arguments.length>1?arguments[1]:void 0;x()(this,M),k()(this,"schemaSettings",{}),k()(this,"actionList",{}),this._schemaSettings=n,this.app=b,this.app=b,this.add.apply(this,G()(n))}return O()(M,[{key:"add",value:function(){for(var b=this,N=arguments.length,r=new Array(N),a=0;a<N;a++)r[a]=arguments[a];r.forEach(function(A){b.schemaSettings[A.name]=A,Array.isArray(b.actionList[A.name])&&(b.actionList[A.name].forEach(function(y){A[y.type](y.itemName,y.data)}),b.actionList[A.name]=void 0)})}},{key:"addItem",value:function(b,N,r){var a=this.get(b);a?a.add(N,r):(this.actionList[b]||(this.actionList[b]=[]),this.actionList[b].push({type:"add",itemName:N,data:r}))}},{key:"get",value:function(b){return this.schemaSettings[b]}},{key:"getAll",value:function(){return this.schemaSettings}},{key:"has",value:function(b){return!!this.get(b)}},{key:"remove",value:function(b){delete this.schemaSettings[b]}},{key:"removeItem",value:function(b,N){var r=this.get(b);r?r.remove(N):(this.actionList[b]||(this.actionList[b]=[]),this.actionList[b].push({type:"remove",itemName:N}))}}]),M}(),j=e(78807),p=e(78722)},93167:function(Ne,ae,e){"use strict";e.d(ae,{H:function(){return o}});var w=e(96486),l=e.n(w),G=e(26793),i=e(62954),x=e(96365),C=e(94516),O=e(4685);function o(k){var v=k.name,j=k.useVisible,p=k.schemaKey,M=k.title,n=k.type,b=n===void 0?"common":n,N=k.defaultValue,r=k.useDefaultValue,a=r===void 0?O.U2:r,A=k.useComponentProps;return{name:v,useVisible:j,type:"switch",useComponentProps:function(){var V=(0,O.h0)(b),Y=(0,C.ng)(),L=Y.dn,h=a(N),B=(0,x.e)(),g=(0,G.$)(),S=g.t,m=(0,i.z9d)()||{},D=m.fieldSchema,E=A==null?void 0:A();return{title:typeof M=="function"?M(S):B(M),checked:(E==null?void 0:E.checked)===void 0?!!l().get(V,p,h):E==null?void 0:E.checked,onChange:function(d){var c;E==null||(c=E.onChange)===null||c===void 0||c.call(E,d);var f=(0,O.pg)({fieldSchema:V,schemaKey:p,value:d});D?(L.emit("patch",{schema:f}),L.refresh()):L.deepMerge(f)}}}}}},4685:function(Ne,ae,e){"use strict";e.d(ae,{U2:function(){return o},h0:function(){return k},pg:function(){return O}});var w=e(52677),l=e.n(w),G=e(80844),i=e(96486),x=e.n(i),C=e(62954);function O(v){var j=v,p=j.fieldSchema,M=j.schemaKey,n=j.parentSchemaKey,b=j.value,N=j.valueKeys;if(M)x().set(p,M,b);else if(n){if(b==null)return p;l()(b)==="object"?Object.keys(b).forEach(function(r){N&&!N.includes(r)||x().set(p,"".concat(n,".").concat(r),b[r])}):console.error("value must be object")}return p}var o=function(j){return j},k=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"common",p=(0,G.useFieldSchema)(),M=(0,C.z9d)()||{},n=M.fieldSchema;return j==="field"&&n||p}},1992:function(Ne,ae,e){"use strict";e.d(ae,{J1:function(){return C},Po:function(){return o},V$:function(){return O}});var w=e(13769),l=e.n(w),G=e(67294),i=e(85893),x=["children"],C=(0,G.createContext)({});C.displayName="SchemaToolbarContext";var O=function(v){var j=v.children,p=l()(v,x);return(0,i.jsx)(C.Provider,{value:p,children:j})};function o(){return(0,G.useContext)(C)}},78542:function(Ne,ae,e){"use strict";e.d(ae,{J1:function(){return w.J1},V$:function(){return w.V$},Po:function(){return w.Po},du:function(){return v}});var w=e(1992),l=e(97857),G=e.n(l),i=e(67294),x=e(4511),C=e(62954),O=e(50679),o=e(85893),k=function(p){var M=(0,C.ngQ)(),n=M.designable;return n?(0,o.jsx)(C.Hj5.Modal,G()(G()({},p),{},{children:(0,o.jsx)(O.Mf,{title:"render toolbar error: ".concat(p.error.message)})})):null},v=function(p){var M=(0,C.ngQ)(),n=M.designable,b=(0,i.useMemo)(function(){if(p["x-designer"]||p["x-toolbar"])return p["x-designer"]||p["x-toolbar"];if(p["x-settings"])return O.Mf},[p]),N=(0,C.Cor)(b);return{render:function(a){return!n||!N?null:(0,o.jsx)(x.SV,{FallbackComponent:k,onError:console.error,children:(0,o.jsx)(N,G()(G()({},p["x-toolbar-props"]),a))})},exists:!!N}}},57780:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{_:function(){return getRequireJs}});var _home_runner_work_nocobase_nocobase_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(52677),_home_runner_work_nocobase_nocobase_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_home_runner_work_nocobase_nocobase_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0__);function getRequireJs(){var requirejs,require,define,req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.6",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!!(typeof window<"u"&&typeof navigator<"u"&&window.document),isWebWorker=!isBrowser&&typeof importScripts<"u",readyRegExp=isBrowser&&navigator.platform==="PLAYSTATION 3"?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera=typeof opera<"u"&&opera.toString()==="[object Opera]",contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(Ne,ae){return ae||""}function isFunction(Ne){return ostring.call(Ne)==="[object Function]"}function isArray(Ne){return ostring.call(Ne)==="[object Array]"}function each(Ne,ae){if(Ne){var e;for(e=0;e<Ne.length&&!(Ne[e]&&ae(Ne[e],e,Ne));e+=1);}}function eachReverse(Ne,ae){if(Ne){var e;for(e=Ne.length-1;e>-1&&!(Ne[e]&&ae(Ne[e],e,Ne));e-=1);}}function hasProp(Ne,ae){return hasOwn.call(Ne,ae)}function getOwn(Ne,ae){return hasProp(Ne,ae)&&Ne[ae]}function eachProp(Ne,ae){var e;for(e in Ne)if(hasProp(Ne,e)&&ae(Ne[e],e))break}function mixin(Ne,ae,e,w){return ae&&eachProp(ae,function(l,G){(e||!hasProp(Ne,G))&&(w&&_home_runner_work_nocobase_nocobase_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_typeof_js__WEBPACK_IMPORTED_MODULE_0___default()(l)==="object"&&l&&!isArray(l)&&!isFunction(l)&&!(l instanceof RegExp)?(Ne[G]||(Ne[G]={}),mixin(Ne[G],l,e,w)):Ne[G]=l)}),Ne}function bind(Ne,ae){return function(){return ae.apply(Ne,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(Ne){throw Ne}function getGlobal(Ne){if(!Ne)return Ne;var ae=__webpack_require__.g;return each(Ne.split("."),function(e){ae=ae[e]}),ae}function makeError(Ne,ae,e,w){var l=new Error(ae+`
|
|
53
53
|
https://requirejs.org/docs/errors.html#`+Ne);return l.requireType=Ne,l.requireModules=w,e&&(l.originalError=e),l}if(typeof define<"u")return;if(typeof requirejs<"u"){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}typeof require<"u"&&!isFunction(require)&&(cfg=require,require=void 0);function newContext(Ne){var ae,e,w,l,G,i={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},x={},C={},O={},o=[],k={},v={},j={},p=1,M=1;function n(u){var d,c;for(d=0;d<u.length;d++)if(c=u[d],c===".")u.splice(d,1),d-=1;else if(c===".."){if(d===0||d===1&&u[2]===".."||u[d-1]==="..")continue;d>0&&(u.splice(d-1,2),d-=2)}}function b(u,d,c){var f,z,T,W,t,I,H,K,U,F,te,q,J=d&&d.split("/"),Z=i.map,P=Z&&Z["*"];if(u&&(u=u.split("/"),H=u.length-1,i.nodeIdCompat&&jsSuffixRegExp.test(u[H])&&(u[H]=u[H].replace(jsSuffixRegExp,"")),u[0].charAt(0)==="."&&J&&(q=J.slice(0,J.length-1),u=q.concat(u)),n(u),u=u.join("/")),c&&Z&&(J||P)){T=u.split("/");e:for(W=T.length;W>0;W-=1){if(I=T.slice(0,W).join("/"),J){for(t=J.length;t>0;t-=1)if(z=getOwn(Z,J.slice(0,t).join("/")),z&&(z=getOwn(z,I),z)){K=z,U=W;break e}}!F&&P&&getOwn(P,I)&&(F=getOwn(P,I),te=W)}!K&&F&&(K=F,U=te),K&&(T.splice(0,U,K),u=T.join("/"))}return f=getOwn(i.pkgs,u),f||u}function N(u){isBrowser&&each(scripts(),function(d){if(d.getAttribute("data-requiremodule")===u&&d.getAttribute("data-requirecontext")===w.contextName)return d.parentNode.removeChild(d),!0})}function r(u){var d=getOwn(i.paths,u);if(d&&isArray(d)&&d.length>1)return d.shift(),w.require.undef(u),w.makeRequire(null,{skipMap:!0})([u]),!0}function a(u){var d,c=u?u.indexOf("!"):-1;return c>-1&&(d=u.substring(0,c),u=u.substring(c+1,u.length)),[d,u]}function A(u,d,c,f){var z,T,W,t,I=null,H=d?d.name:null,K=u,U=!0,F="";return u||(U=!1,u="_@r"+(p+=1)),t=a(u),I=t[0],u=t[1],I&&(I=b(I,H,f),T=getOwn(k,I)),u&&(I?c?F=u:T&&T.normalize?F=T.normalize(u,function(te){return b(te,H,f)}):F=u.indexOf("!")===-1?b(u,H,f):u:(F=b(u,H,f),t=a(F),I=t[0],F=t[1],c=!0,z=w.nameToUrl(F))),W=I&&!T&&!c?"_unnormalized"+(M+=1):"",{prefix:I,name:F,parentMap:d,unnormalized:!!W,url:z,originalName:K,isDefine:U,id:(I?I+"!"+F:F)+W}}function y(u){var d=u.id,c=getOwn(x,d);return c||(c=x[d]=new w.Module(u)),c}function V(u,d,c){var f=u.id,z=getOwn(x,f);hasProp(k,f)&&(!z||z.defineEmitComplete)?d==="defined"&&c(k[f]):(z=y(u),z.error&&d==="error"?c(z.error):z.on(d,c))}function Y(u,d){var c=u.requireModules,f=!1;d?d(u):(each(c,function(z){var T=getOwn(x,z);T&&(T.error=u,T.events.error&&(f=!0,T.emit("error",u)))}),f||req.onError(u))}function L(){globalDefQueue.length&&(each(globalDefQueue,function(u){var d=u[0];typeof d=="string"&&(w.defQueueMap[d]=!0),o.push(u)}),globalDefQueue=[])}l={require:function(d){return d.require?d.require:d.require=w.makeRequire(d.map)},exports:function(d){if(d.usingExports=!0,d.map.isDefine)return d.exports?k[d.map.id]=d.exports:d.exports=k[d.map.id]={}},module:function(d){return d.module?d.module:d.module={id:d.map.id,uri:d.map.url,config:function(){return getOwn(i.config,d.map.id)||{}},exports:d.exports||(d.exports={})}}};function h(u){delete x[u],delete C[u]}function B(u,d,c){var f=u.map.id;u.error?u.emit("error",u.error):(d[f]=!0,each(u.depMaps,function(z,T){var W=z.id,t=getOwn(x,W);t&&!u.depMatched[T]&&!c[W]&&(getOwn(d,W)?(u.defineDep(T,k[W]),u.check()):B(t,d,c))}),c[f]=!0)}function g(){var u,d,c=i.waitSeconds*1e3,f=c&&w.startTime+c<new Date().getTime(),z=[],T=[],W=!1,t=!0;if(!ae){if(ae=!0,eachProp(C,function(I){var H=I.map,K=H.id;if(I.enabled&&(H.isDefine||T.push(I),!I.error)){if(!I.inited&&f)r(K)?(d=!0,W=!0):(z.push(K),N(K));else if(!I.inited&&I.fetched&&H.isDefine&&(W=!0,!H.prefix))return t=!1}}),f&&z.length)return u=makeError("timeout","Load timeout for modules: "+z,null,z),u.contextName=w.contextName,Y(u);t&&each(T,function(I){B(I,{},{})}),(!f||d)&&W&&(isBrowser||isWebWorker)&&!G&&(G=setTimeout(function(){G=0,g()},50)),ae=!1}}e=function(d){this.events=getOwn(O,d.id)||{},this.map=d,this.shim=getOwn(i.shim,d.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},e.prototype={init:function(d,c,f,z){z=z||{},!this.inited&&(this.factory=c,f?this.on("error",f):this.events.error&&(f=bind(this,function(T){this.emit("error",T)})),this.depMaps=d&&d.slice(0),this.errback=f,this.inited=!0,this.ignore=z.ignore,z.enabled||this.enabled?this.enable():this.check())},defineDep:function(d,c){this.depMatched[d]||(this.depMatched[d]=!0,this.depCount-=1,this.depExports[d]=c)},fetch:function(){if(!this.fetched){this.fetched=!0,w.startTime=new Date().getTime();var d=this.map;if(this.shim)w.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return d.prefix?this.callPlugin():this.load()}));else return d.prefix?this.callPlugin():this.load()}},load:function(){var d=this.map.url;v[d]||(v[d]=!0,w.load(this.map.id,d))},check:function(){if(!(!this.enabled||this.enabling)){var d,c,f=this.map.id,z=this.depExports,T=this.exports,W=this.factory;if(!this.inited)hasProp(w.defQueueMap,f)||this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(W)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{T=w.execCb(f,W,z,T)}catch(I){d=I}else T=w.execCb(f,W,z,T);if(this.map.isDefine&&T===void 0&&(c=this.module,c?T=c.exports:this.usingExports&&(T=this.exports)),d)return d.requireMap=this.map,d.requireModules=this.map.isDefine?[this.map.id]:null,d.requireType=this.map.isDefine?"define":"require",Y(this.error=d)}else T=W;if(this.exports=T,this.map.isDefine&&!this.ignore&&(k[f]=T,req.onResourceLoad)){var t=[];each(this.depMaps,function(I){t.push(I.normalizedMap||I)}),req.onResourceLoad(w,this.map,t)}h(f),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}},callPlugin:function(){var d=this.map,c=d.id,f=A(d.prefix);this.depMaps.push(f),V(f,"defined",bind(this,function(z){var T,W,t,I=getOwn(j,this.map.id),H=this.map.name,K=this.map.parentMap?this.map.parentMap.name:null,U=w.makeRequire(d.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){z.normalize&&(H=z.normalize(H,function(F){return b(F,K,!0)})||""),W=A(d.prefix+"!"+H,this.map.parentMap,!0),V(W,"defined",bind(this,function(F){this.map.normalizedMap=W,this.init([],function(){return F},null,{enabled:!0,ignore:!0})})),t=getOwn(x,W.id),t&&(this.depMaps.push(W),this.events.error&&t.on("error",bind(this,function(F){this.emit("error",F)})),t.enable());return}if(I){this.map.url=w.nameToUrl(I),this.load();return}T=bind(this,function(F){this.init([],function(){return F},null,{enabled:!0})}),T.error=bind(this,function(F){this.inited=!0,this.error=F,F.requireModules=[c],eachProp(x,function(te){te.map.id.indexOf(c+"_unnormalized")===0&&h(te.map.id)}),Y(F)}),T.fromText=bind(this,function(F,te){var q=d.name,J=A(q),Z=useInteractive;te&&(F=te),Z&&(useInteractive=!1),y(J),hasProp(i.config,c)&&(i.config[q]=i.config[c]);try{req.exec(F)}catch(P){return Y(makeError("fromtexteval","fromText eval for "+c+" failed: "+P,P,[c]))}Z&&(useInteractive=!0),this.depMaps.push(J),w.completeLoad(q),U([q],T)}),z.load(d.name,U,T,i)})),w.enable(f,this),this.pluginMaps[f.id]=f},enable:function(){C[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(d,c){var f,z,T;if(typeof d=="string"){if(d=A(d,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[c]=d,T=getOwn(l,d.id),T){this.depExports[c]=T(this);return}this.depCount+=1,V(d,"defined",bind(this,function(W){this.undefed||(this.defineDep(c,W),this.check())})),this.errback?V(d,"error",bind(this,this.errback)):this.events.error&&V(d,"error",bind(this,function(W){this.emit("error",W)}))}f=d.id,z=x[f],!hasProp(l,f)&&z&&!z.enabled&&w.enable(d,this)})),eachProp(this.pluginMaps,bind(this,function(d){var c=getOwn(x,d.id);c&&!c.enabled&&w.enable(d,this)})),this.enabling=!1,this.check()},on:function(d,c){var f=this.events[d];f||(f=this.events[d]=[]),f.push(c)},emit:function(d,c){each(this.events[d],function(f){f(c)}),d==="error"&&delete this.events[d]}};function S(u){hasProp(k,u[0])||y(A(u[0],null,!0)).init(u[1],u[2])}function m(u,d,c,f){u.detachEvent&&!isOpera?f&&u.detachEvent(f,d):u.removeEventListener(c,d,!1)}function D(u){var d=u.currentTarget||u.srcElement;return m(d,w.onScriptLoad,"load","onreadystatechange"),m(d,w.onScriptError,"error"),{node:d,id:d&&d.getAttribute("data-requiremodule")}}function E(){var u;for(L();o.length;){if(u=o.shift(),u[0]===null)return Y(makeError("mismatch","Mismatched anonymous define() module: "+u[u.length-1]));S(u)}w.defQueueMap={}}return w={config:i,contextName:Ne,registry:x,defined:k,urlFetched:v,defQueue:o,defQueueMap:{},Module:e,makeModuleMap:A,nextTick:req.nextTick,onError:Y,configure:function(d){if(d.baseUrl&&d.baseUrl.charAt(d.baseUrl.length-1)!=="/"&&(d.baseUrl+="/"),typeof d.urlArgs=="string"){var c=d.urlArgs;d.urlArgs=function(T,W){return(W.indexOf("?")===-1?"?":"&")+c}}var f=i.shim,z={paths:!0,bundles:!0,config:!0,map:!0};eachProp(d,function(T,W){z[W]?(i[W]||(i[W]={}),mixin(i[W],T,!0,!0)):i[W]=T}),d.bundles&&eachProp(d.bundles,function(T,W){each(T,function(t){t!==W&&(j[t]=W)})}),d.shim&&(eachProp(d.shim,function(T,W){isArray(T)&&(T={deps:T}),(T.exports||T.init)&&!T.exportsFn&&(T.exportsFn=w.makeShimExports(T)),f[W]=T}),i.shim=f),d.packages&&each(d.packages,function(T){var W,t;T=typeof T=="string"?{name:T}:T,t=T.name,W=T.location,W&&(i.paths[t]=T.location),i.pkgs[t]=T.name+"/"+(T.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(x,function(T,W){!T.inited&&!T.map.unnormalized&&(T.map=A(W,null,!0))}),(d.deps||d.callback)&&w.require(d.deps||[],d.callback)},makeShimExports:function(d){function c(){var f;return d.init&&(f=d.init.apply(__webpack_require__.g,arguments)),f||d.exports&&getGlobal(d.exports)}return c},makeRequire:function(d,c){c=c||{};function f(z,T,W){var t,I,H;return c.enableBuildCallback&&T&&isFunction(T)&&(T.__requireJsBuild=!0),typeof z=="string"?isFunction(T)?Y(makeError("requireargs","Invalid require call"),W):d&&hasProp(l,z)?l[z](x[d.id]):req.get?req.get(w,z,d,f):(I=A(z,d,!1,!0),t=I.id,hasProp(k,t)?k[t]:Y(makeError("notloaded",'Module name "'+t+'" has not been loaded yet for context: '+Ne+(d?"":". Use require([])")))):(E(),w.nextTick(function(){E(),H=y(A(null,d)),H.skipMap=c.skipMap,H.init(z,T,W,{enabled:!0}),g()}),f)}return mixin(f,{isBrowser,toUrl:function(T){var W,t=T.lastIndexOf("."),I=T.split("/")[0],H=I==="."||I==="..";return t!==-1&&(!H||t>1)&&(W=T.substring(t,T.length),T=T.substring(0,t)),w.nameToUrl(b(T,d&&d.id,!0),W,!0)},defined:function(T){return hasProp(k,A(T,d,!1,!0).id)},specified:function(T){return T=A(T,d,!1,!0).id,hasProp(k,T)||hasProp(x,T)}}),d||(f.undef=function(z){L();var T=A(z,d,!0),W=getOwn(x,z);W.undefed=!0,N(z),delete k[z],delete v[T.url],delete O[z],eachReverse(o,function(t,I){t[0]===z&&o.splice(I,1)}),delete w.defQueueMap[z],W&&(W.events.defined&&(O[z]=W.events),h(z))}),f},enable:function(d){var c=getOwn(x,d.id);c&&y(d).enable()},completeLoad:function(d){var c,f,z,T=getOwn(i.shim,d)||{},W=T.exports;for(L();o.length;){if(f=o.shift(),f[0]===null){if(f[0]=d,c)break;c=!0}else f[0]===d&&(c=!0);S(f)}if(w.defQueueMap={},z=getOwn(x,d),!c&&!hasProp(k,d)&&z&&!z.inited){if(i.enforceDefine&&(!W||!getGlobal(W)))return r(d)?void 0:Y(makeError("nodefine","No define call for "+d,null,[d]));S([d,T.deps||[],T.exportsFn])}g()},nameToUrl:function(d,c,f){var z,T,W,t,I,H,K,U=getOwn(i.pkgs,d);if(U&&(d=U),K=getOwn(j,d),K)return w.nameToUrl(K,c,f);if(req.jsExtRegExp.test(d))I=d+(c||"");else{for(z=i.paths,T=d.split("/"),W=T.length;W>0;W-=1)if(t=T.slice(0,W).join("/"),H=getOwn(z,t),H){isArray(H)&&(H=H[0]),T.splice(0,W,H);break}I=T.join("/"),I+=c||(/^data\:|^blob\:|\?/.test(I)||f?"":".js"),I=(I.charAt(0)==="/"||I.match(/^[\w\+\.\-]+:/)?"":i.baseUrl)+I}return i.urlArgs&&!/^blob\:/.test(I)?I+i.urlArgs(d,I):I},load:function(d,c){req.load(w,d,c)},execCb:function(d,c,f,z){return c.apply(z,f)},onScriptLoad:function(d){if(d.type==="load"||readyRegExp.test((d.currentTarget||d.srcElement).readyState)){interactiveScript=null;var c=D(d);w.completeLoad(c.id)}},onScriptError:function(d){var c=D(d);if(!r(c.id)){var f=[];return eachProp(x,function(z,T){T.indexOf("_@r")!==0&&each(z.depMaps,function(W){if(W.id===c.id)return f.push(T),!0})}),Y(makeError("scripterror",'Script error for "'+c.id+(f.length?'", needed by: '+f.join(", "):'"'),d,[c.id]))}}},w.require=w.makeRequire(),w}req=requirejs=function(ae,e,w,l){var G,i,x=defContextName;return!isArray(ae)&&typeof ae!="string"&&(i=ae,isArray(e)?(ae=e,e=w,w=l):ae=[]),i&&i.context&&(x=i.context),G=getOwn(contexts,x),G||(G=contexts[x]=req.s.newContext(x)),i&&G.configure(i),G.require(ae,e,w)},req.config=function(Ne){return req(Ne)},req.nextTick=typeof setTimeout<"u"?function(Ne){setTimeout(Ne,4)}:function(Ne){Ne()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts,newContext},req({}),each(["toUrl","undef","defined","specified"],function(Ne){req[Ne]=function(){var ae=contexts[defContextName];return ae.require[Ne].apply(ae,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(Ne,ae,e){var w=Ne.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return w.type=Ne.scriptType||"text/javascript",w.charset="utf-8",w.async=!0,w},req.load=function(Ne,ae,e){var w=Ne&&Ne.config||{},l;if(isBrowser)return l=req.createNode(w,ae,e),l.setAttribute("data-requirecontext",Ne.contextName),l.setAttribute("data-requiremodule",ae),l.attachEvent&&!(l.attachEvent.toString&&l.attachEvent.toString().indexOf("[native code")<0)&&!isOpera?(useInteractive=!0,l.attachEvent("onreadystatechange",Ne.onScriptLoad)):(l.addEventListener("load",Ne.onScriptLoad,!1),l.addEventListener("error",Ne.onScriptError,!1)),l.src=e,w.onNodeCreated&&w.onNodeCreated(l,w,ae,e),currentlyAddingScript=l,baseElement?head.insertBefore(l,baseElement):head.appendChild(l),currentlyAddingScript=null,l;if(isWebWorker)try{setTimeout(function(){},0),importScripts(e),Ne.completeLoad(ae)}catch(G){Ne.onError(makeError("importscripts","importScripts failed for "+ae+" at "+e,G,[ae]))}};function getInteractiveScript(){return interactiveScript&&interactiveScript.readyState==="interactive"||eachReverse(scripts(),function(Ne){if(Ne.readyState==="interactive")return interactiveScript=Ne}),interactiveScript}return isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(Ne){if(head||(head=Ne.parentNode),dataMain=Ne.getAttribute("data-main"),dataMain)return mainScript=dataMain,!cfg.baseUrl&&mainScript.indexOf("!")===-1&&(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(ae,e,w){var l,G;typeof ae!="string"&&(w=e,e=ae,ae=null),isArray(e)||(w=e,e=null),!e&&isFunction(w)&&(e=[],w.length&&(w.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(i,x){e.push(x)}),e=(w.length===1?["require"]:["require","exports","module"]).concat(e))),useInteractive&&(l=currentlyAddingScript||getInteractiveScript(),l&&(ae||(ae=l.getAttribute("data-requiremodule")),G=contexts[l.getAttribute("data-requirecontext")])),G?(G.defQueue.push([ae,e,w]),G.defQueueMap[ae]=!0):globalDefQueue.push([ae,e,w])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg),{requirejs,require,define}}},26124:function(Ne,ae,e){"use strict";e.d(ae,{pW:function(){return v},tO:function(){return k},w3:function(){return j}});var w=e(97857),l=e.n(w),G=e(13769),i=e.n(G),x=e(67294),C=e(12174),O=e(85893),o=["value","request","children"],k=(0,x.createContext)(null);k.displayName="AsyncDataContext";var v=function(M){var n=M.value,b=M.request,N=M.children,r=i()(M,o),a=(0,C.QT)(b,l()({},r));return n?(0,O.jsx)(k.Provider,{value:n,children:N}):(0,O.jsx)(k.Provider,{value:a,children:N})},j=function(){return(0,x.useContext)(k)}},75148:function(Ne,ae,e){"use strict";e.d(ae,{BU:function(){return c},C:function(){return H},DD:function(){return I},M0:function(){return d},MM:function(){return F},Qj:function(){return z},VG:function(){return T},WJ:function(){return m},ZJ:function(){return t},bH:function(){return u},br:function(){return D},e0:function(){return K},gY:function(){return f},hD:function(){return te},lT:function(){return E},m:function(){return U},wH:function(){return S}});var w=e(13769),l=e.n(w),G=e(96695),i=e.n(G),x=e(97857),C=e.n(x),O=e(80844),o=e(90105),k=e(71230),v=e(15746),j=e(96486),p=e.n(j),M=e(41106),n=e.n(M),b=e(67294),N=e(79655),r=e(21143),a=e(75667),A=e(6145),y=e(57105),V=e(97703),Y=e(36586),L=e(10097),h=e(94658),B=e(85893),g=["title","to"],S=(0,b.createContext)(null);S.displayName="BlockResourceContext";var m=(0,b.createContext)(null);m.displayName="BlockAssociationContext";var D=(0,b.createContext)({});D.displayName="BlockRequestContext_deprecated";var E=function(){var J=(0,r.useDataBlockResource)();return(0,b.useContext)(S)||J},u=function(J){var Z=J.collection;return Z?(0,B.jsx)(A.CollectionProvider_deprecated,{collection:Z,children:(0,B.jsx)(a.Hh,{children:J.children})}):J.children},d=function(J){var Z=(0,O.useField)(),P=(0,r.useDataBlockResource)(),X=(0,r.useDataBlockRequest)(),le=(0,r.useCollectionRecord)(),Q=(0,r.useCollectionParentRecord)(),oe=c(),Ce=(0,b.useMemo)(function(){return{block:J.block,props:J,field:Z,service:X,resource:P,__parent:oe,updateAssociationValues:(J==null?void 0:J.updateAssociationValues)||[]}},[oe,Z,J,P,X]);return(0,B.jsx)(D.Provider,{value:Ce,children:(0,B.jsx)(Y.HV,{isNew:le==null?void 0:le.isNew,record:le==null?void 0:le.data,parent:Q==null?void 0:Q.data,children:J.children})})},c=function(){return(0,b.useContext)(D)},f=function(J){var Z,P=(0,O.useFieldSchema)(),X=(0,r.useDesignable)(),le=X.findComponent,Q=(0,O.useField)(),oe=le((Z=Q.component)===null||Z===void 0?void 0:Z[0])||b.Fragment,Ce=P.reduceProperties(function(se,De){return De["x-component"]==="AssociationFilter"?De:se},null);return Ce?(0,B.jsx)(oe,C()(C()({},Q.componentProps),{},{children:(0,B.jsxs)(k.Z,{style:{height:"100%"},gutter:16,wrap:!1,children:[(0,B.jsx)(v.Z,{style:C()({width:200,flex:"0 0 auto"},J.associationFilterStyle||{}),children:(0,B.jsx)(O.RecursionField,{schema:P,onlyRenderProperties:!0,filterProperties:function(De){return De["x-component"]==="AssociationFilter"}})}),(0,B.jsx)(v.Z,{style:{flex:"1 1 auto",minWidth:0},children:(0,B.jsx)("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:(0,B.jsx)(O.RecursionField,{schema:P,onlyRenderProperties:!0,filterProperties:function(De){return De["x-component"]!=="AssociationFilter"}})})})]})})):J.children},z=(0,b.createContext)(null);z.displayName="BlockContext";var T=function(){return(0,b.useContext)(z)},W=function(J){var Z=(0,O.useFieldSchema)();return Z["x-use-decorator-props"]?J.parentRecord:(0,h.M)(J)},t=function(J){var Z=J.name,P=J.dataSource,X=J.useParams,le=J.parentRecord,Q=W(J),oe=(0,y.QJ)(),Ce=(0,o.Z)(),se=(0,b.useCallback)(function(){Ce(),oe==null||oe()},[Ce,oe]),De=X==null?void 0:X(),We=(0,L.useAssociationNames)(P),ye=We.getAssociationAppends,ve=ye(),xe=ve.appends,he=ve.updateAssociationValues,re=(0,b.useMemo)(function(){var _e;return(_e=J.params)!==null&&_e!==void 0&&_e.appends?C()(C()({},J.params),De):C()(C()({},J.params),{},{appends:xe},De)},[xe,De,J.params]),de=(0,b.useMemo)(function(){return{name:Z}},[Z]);return(0,B.jsx)(z.Provider,{value:de,children:(0,B.jsx)(r.DataBlockProvider,C()(C()({},J),{},{params:re,parentRecord:le||Q,children:(0,B.jsx)(d,C()(C()({},J),{},{updateAssociationValues:he,params:re,children:(0,B.jsx)(y.ri,{refresh:se,children:J.children})}))}))})},I=function(){var J=(0,r.useDataBlockProps)(),Z=J.association;return(0,b.useContext)(m)||Z},H=function(J){var Z=c(),P=Z.resource,X=Z.__parent,le=(0,Y.pW)(),Q=(0,r.useCollectionRecordData)(),oe=(0,A.useCollection_deprecated)(),Ce=I(),se=(J==null?void 0:J.association)||Ce,De=(0,b.useContext)(r.WithoutTableFieldResource),We=(0,r.useCollectionManager)();if(!De&&(P instanceof r.TableFieldResource||(X==null?void 0:X.block)==="TableField"))return le;if(se){var ye=We.getCollectionField(se);return Q==null?void 0:Q[ye.targetKey||ye.sourceKey||"id"]}if((0,j.isArray)(oe.filterTargetKey)){var ve={},xe=i()(oe.filterTargetKey),he;try{for(xe.s();!(he=xe.n()).done;){var re=he.value;ve[re]=Q==null?void 0:Q[re]}}catch(de){xe.e(de)}finally{xe.f()}return ve}else return Q==null?void 0:Q[oe.filterTargetKey||"id"]},K=function(){var J=(0,r.useRecord)(),Z=(0,A.useCollectionManager_deprecated)(),P=Z.getCollectionField,X=I();if(X){var le=P(X);return J==null?void 0:J[le.sourceKey||"id"]}},U=function(){return(0,V.G)()},F=function(J){var Z,P,X=H(J),le=(0,r.useRecord)(),Q=(0,A.useCollection_deprecated)(),oe=Q.fields,Ce=(0,O.useFieldSchema)(),se=(0,A.useCollectionManager_deprecated)(),De=se.getCollectionJoinField,We=De((Ce==null||(Z=Ce["x-decorator-props"])===null||Z===void 0?void 0:Z.resource)||(Ce==null||(P=Ce["x-decorator-props"])===null||P===void 0?void 0:P.association)),ye=oe.filter(function(he){return["boolean","date","integer","radio","sort","string","time","uid","uuid"].includes(he.type)}).map(function(he){return he.name}),ve=Object.keys(le).filter(function(he){return ye.includes(he)}).reduce(function(he,re){return he[re]=le[re],he},{}),xe={filterByTk:X};return le.__collection&&We&&!["oho","m2o","obo"].includes(We.interface)&&(xe.targetCollection=le.__collection),!X&&Object.keys(ve).length>0&&(xe.filter=ve),xe},te=function(J){var Z=(0,O.useField)(),P=(0,r.useRecord)(),X=J.title,le=J.to,Q=l()(J,g),oe=n()(le||"");return(0,B.jsx)(N.Link,C()(C()({},Q),{},{to:oe({record:P||{}}),children:Z.title}))}},29250:function(Ne,ae,e){"use strict";e.d(ae,{H:function(){return O},Q:function(){return o}});var w=e(97857),l=e.n(w),G=e(67294),i=e(85893),x=function(){},C=(0,G.createContext)(null),O=function(v){var j=(0,G.useRef)(v.defaultOperators||{}),p=(0,G.useCallback)(function(N,r){j.current[N]=r},[]),M=(0,G.useCallback)(function(){return l()({},j.current)},[]),n=(0,G.useCallback)(function(N){return j.current[N]},[]),b=(0,G.useCallback)(function(N){delete j.current[N]},[]);return(0,i.jsx)(C.Provider,{value:{collectOperator:p,getOperators:M,getOperator:n,removeOperator:b},children:v.children})},o=function(){var v=G.useContext(C)||{},j=v.getOperator,p=j===void 0?x:j,M=v.getOperators,n=M===void 0?x:M,b=v.collectOperator,N=b===void 0?x:b,r=v.removeOperator,a=r===void 0?x:r;return{getOperator:p,getOperators:n,collectOperator:N,removeOperator:a}}},35964:function(Ne,ae,e){"use strict";e.d(ae,{BX:function(){return h},LR:function(){return A},nT:function(){return L},nw:function(){return Y}});var w=e(97857),l=e.n(w),G=e(86201),i=e(80844),x=e(90105),C=e(57953),O=e(67294),o=e(6145),k=e(94804),v=e(49834),j=e(15503),p=e(86693),M=e(36586),n=e(62954),b=e(96808),N=e(75148),r=e(31019),a=e(85893),A=(0,O.createContext)({});A.displayName="DetailsBlockContext";var y=function(g){var S,m,D=g.action,E=g.readPretty,u=(0,i.useField)(),d=(0,O.useMemo)(function(){return(0,G.createForm)({readPretty:E})},[E]),c=(0,k.Kx)(),f=(0,N.BU)(),z=f.resource,T=f.service,W=(0,v.RA)(),t=(D==="list"?T==null||(S=T.data)===null||S===void 0||(S=S.data)===null||S===void 0?void 0:S[0]:T==null||(m=T.data)===null||m===void 0?void 0:m.data)||{},I=(0,O.useRef)(),H=(0,O.useMemo)(function(){return{action:D,form:d,field:u,service:T,resource:z,formBlockRef:I}},[D,u,d,z,T]);return T.loading&&!u.loaded?(0,a.jsx)(C.Z,{}):(u.loaded=!0,(0,a.jsx)(b.ov,{recordData:t,collectionName:c==null?void 0:c.name,children:(0,a.jsx)(A.Provider,{value:H,children:(0,a.jsx)("div",{ref:I,children:(0,a.jsx)(M.HV,{isNew:!1,record:t,parent:W==null?void 0:W.data,children:g.children})})})}))},V=function(g){var S=(0,i.useFieldSchema)(),m,D=!1;if(S["x-use-decorator-props"])m=g==null?void 0:g.params,D=g==null?void 0:g.parseVariableLoading;else{var E=(0,p.l)(g);m=E.params,D=E.parseVariableLoading}return{params:m,parseVariableLoading:D}},Y=(0,j.t)(function(B){var g=V(B),S=g.params,m=g.parseVariableLoading,D=(0,k.nE)(),E=B.association,u=B.dataSource,d=B.action,c=(0,o.useCollectionManager_deprecated)(u),f=c.getCollection,z=D||{},T=z.__collection,W=(0,n.ngQ)(),t=W.designable,I=B.collection,H=!0;!t&&T&&d==="get"&&!E&&(H=T===I);var K=(0,x.Z)();return!H||m?null:(0,a.jsx)(r.T,{onTemplateLoaded:K,children:(0,a.jsx)(N.ZJ,l()(l()({name:"details"},B),{},{params:S,children:(0,a.jsx)(y,l()({},B))}))})}),L=function(){return(0,O.useContext)(A)},h=function(){var g,S=L();return(0,O.useEffect)(function(){if(!S.service.loading){var m,D,E=S.action==="list"?(m=S.service)===null||m===void 0||(m=m.data)===null||m===void 0||(m=m.data)===null||m===void 0?void 0:m[0]:(D=S.service)===null||D===void 0||(D=D.data)===null||D===void 0?void 0:D.data;S.form.reset().then(function(){S.form.setInitialValues(E||{}),S.form.setValues(E||{})}).catch(console.error)}},[S.action,S.form,(g=S.service)===null||g===void 0||(g=g.data)===null||g===void 0?void 0:g.data,S.service.loading]),{form:S.form}}},7340:function(Ne,ae,e){"use strict";e.d(ae,{$R:function(){return y},Fi:function(){return L},TC:function(){return N},WG:function(){return A},_$:function(){return Y},bz:function(){return V},th:function(){return a}});var w=e(97857),l=e.n(w),G=e(86201),i=e(80844),x=e(90105),C=e(67294),O=e(94804),o=e(15503),k=e(67354),v=e(36586),j=e(62954),p=e(75148),M=e(31019),n=e(44899),b=e(85893),N=(0,C.createContext)({});N.displayName="FormBlockContext";var r=function(B){var g,S=(0,O.d9)(),m=V(),D=B.action,E=B.readPretty,u=B.params,d=B.collection,c=B.association,f=(0,i.useField)(),z=(0,C.useMemo)(function(){return(0,G.createForm)({validateFirst:!0,readPretty:E})},[E]),T=(0,p.BU)(),W=T.resource,t=T.service,I=T.updateAssociationValues,H=(0,C.useRef)(),K=(0,O.oV)(),U=(0,C.useMemo)(function(){var F;return l()(l()({},m),{},{params:u,action:D,form:z,type:D==="get"?"update":"create",field:f,service:t,resource:W,updateAssociationValues:I,formBlockRef:H,collectionName:d||((F=S.getCollectionField(c))===null||F===void 0?void 0:F.target),formRecord:K})},[D,c,S,d,m,f,z,u,K,W,t,I]);return(0,b.jsx)(N.Provider,{value:U,children:(0,b.jsx)(v.HV,{isNew:K==null?void 0:K.isNew,parent:K==null||(g=K.parentRecord)===null||g===void 0?void 0:g.data,record:K==null?void 0:K.data,children:(0,b.jsx)("div",{ref:H,children:B.children})})})},a=function(){var B=V()||{},g=(0,C.useMemo)(function(){return{type:B.type}},[B.type]);return g},A=function(){var B=V(),g=(0,j.XCj)(),S=g.fieldSchema;return B.type!=="create"&&(S==null?void 0:S["x-acl-action"])!=="create"&&(S==null?void 0:S["x-action"])!=="create"},y=(0,o.t)(function(h){var B=(0,O.Kv)(),g=h.parentRecord,S=h.action,m=(0,O.nE)(),D=h.association,E=(0,O.d9)(),u=m||{},d=u.__collection,c=(0,j.ngQ)(),f=c.designable,z=h.collection||E.getCollection(D).name,T=(0,x.Z)();return!f&&d&&S&&d!==z?null:(0,b.jsx)(M.T,{onTemplateLoaded:T,children:(0,b.jsx)(p.ZJ,l()(l()({name:h.name||"form"},h),{},{block:"form",parentRecord:g||B,children:(0,b.jsx)(n.T,{name:"form",children:(0,b.jsx)(r,l()({},h))})}))})}),V=function(){return(0,C.useContext)(N)},Y=function(){var B,g,S=V(),m=(0,k.t)();return(0,C.useEffect)(function(){if(m){var D;(D=S.form)===null||D===void 0||D.query("parent").take(function(E){E.disabled=!0,E.value=m})}}),(0,C.useEffect)(function(){var D,E,u=S.form;!u||(D=S.service)!==null&&D!==void 0&&D.loading||u.setInitialValues((E=S.service)===null||E===void 0||(E=E.data)===null||E===void 0?void 0:E.data)},[S.form,(B=S.service)===null||B===void 0||(B=B.data)===null||B===void 0?void 0:B.data,(g=S.service)===null||g===void 0?void 0:g.loading]),{form:S.form}},L=function(B){for(;B;){if(B["x-decorator"]==="FormBlockProvider")return B;if(B["x-component"]==="AssociationField.Selector")return null;B=B.parent}return null}},71176:function(Ne,ae,e){"use strict";e.d(ae,{$1:function(){return r},$Y:function(){return N},GK:function(){return A},e$:function(){return a},uW:function(){return n}});var w=e(97857),l=e.n(w),G=e(86201),i=e(80844),x=e(85667),C=e(84157),O=e(57953),o=e(67294),k=e(49834),v=e(36586),j=e(75148),p=e(7340),M=e(85893),n=(0,o.createContext)({});n.displayName="FormFieldContext";var b=function(V){var Y,L,h=V.action,B=V.readPretty,g=V.fieldName,S=(0,p.bz)(),m=(0,k.Kv)();if(!(S!=null&&(Y=S.updateAssociationValues)!==null&&Y!==void 0&&Y.includes(g))){var D;S==null||(D=S.updateAssociationValues)===null||D===void 0||D.push(g)}var E=(0,i.useField)(),u=(0,o.useMemo)(function(){return(0,G.createForm)({effects:function(){(0,G.onFormValuesChange)(function(T){var W;S==null||(W=S.form)===null||W===void 0||W.setValuesIn(g,T.values)})},readPretty:B})},[]);(0,o.useEffect)(function(){var z=(0,x.autorun)(function(){var T,W=(S==null||(T=S.form)===null||T===void 0?void 0:T.values[g])||{};u.reset(),(0,C.forEach)(W,function(t,I){t&&(u.values[I]=t)})});return z},[]);var d=(0,j.BU)(),c=d.resource,f=d.service;return f.loading?(0,M.jsx)(O.Z,{}):(0,M.jsx)(v.HV,{record:f==null||(L=f.data)===null||L===void 0?void 0:L.data,parent:m,children:(0,M.jsx)(n.Provider,{value:{action:h,form:u,field:E,service:f,resource:c,fieldName:g},children:V.children})})},N=(0,o.createContext)(null);N.displayName="WithoutFormFieldResource";var r=function(V){return(0,M.jsx)(N.Provider,{value:!1,children:(0,M.jsx)(j.ZJ,l()(l()({name:"form-field",block:"FormField"},V),{},{children:(0,M.jsx)(b,l()({},V))}))})},a=function(){return(0,o.useContext)(n)},A=function(){var V=a();return(0,o.useEffect)(function(){var Y,L;V==null||(Y=V.form)===null||Y===void 0||Y.setInitialValues((L=V.service)===null||L===void 0||(L=L.data)===null||L===void 0?void 0:L.data)},[]),{form:V.form}}},1892:function(Ne,ae,e){"use strict";e.d(ae,{Hz:function(){return y},Ns:function(){return Y},Si:function(){return g},_0:function(){return B},bE:function(){return S}});var w=e(97857),l=e.n(w),G=e(5574),i=e.n(G),x=e(19632),C=e.n(x),O=e(96695),o=e.n(O),k=e(86201),v=e(80844),j=e(67294),p=e(6145),M=e(15503),n=e(23639),b=e(62954),N=e(72160),r=e(75148),a=e(10097),A=e(85893),y=(0,j.createContext)({});y.displayName="TableBlockContext";var V=(0,j.createContext)(null);V.displayName="TableBlockContextBasicValue";function Y(m){var D=[];if(m){var E=o()(m),u;try{for(E.s();!(u=E.n()).done;){var d=u.value;d!=null&&d.children&&d.children.length>0&&(D.push(d.id),D.push.apply(D,C()(Y(d==null?void 0:d.children))))}}catch(c){E.e(c)}finally{E.f()}}return D}var L=function(D){var E=D.params,u=D.showIndex,d=D.dragSort,c=D.rowKey,f=D.childrenColumnName,z=D.expandFlag,T=z===void 0?!1:z,W=D.fieldNames,t=D.collection,I=(0,v.useField)(),H=(0,r.BU)(),K=H.resource,U=H.service,F=(0,v.useFieldSchema)(),te=(0,j.useState)(!!(W||T)),q=i()(te,2),J=q[0],Z=q[1],P=(0,a.useBlockHeightProps)(),X=P.heightProps,le=(0,j.useRef)(null);(0,j.useEffect)(function(){Z(W||T)},[W||T]);var Q=(0,j.useMemo)(function(){var De,We=(F==null?void 0:F["x-decorator-props"])||{},ye=We.treeTable,ve=U==null||(De=U.data)===null||De===void 0?void 0:De.data;if(ye){var xe=Y(ve);return xe}},[U==null?void 0:U.loading,F]),oe=(0,j.useCallback)(function(De){Z(De||!J)},[J]),Ce=(0,j.useMemo)(function(){return{field:I,rowKey:c,childrenColumnName:f,showIndex:u,dragSort:d,dragSortBy:D.dragSortBy}},[I,c,f,u,d,D.dragSortBy]),se=(0,j.useMemo)(function(){return{collection:t,field:I,service:U,resource:K,params:E,showIndex:u,dragSort:d,rowKey:c,expandFlag:J,childrenColumnName:f,allIncludesChildren:Q,setExpandFlag:oe,heightProps:X}},[Q,f,t,d,J,I,X,E,K,c,U,oe,u]);return(0,A.jsx)(N.nO.Provider,{value:le,children:(0,A.jsx)(y.Provider,{value:se,children:(0,A.jsx)(V.Provider,{value:Ce,children:D.children})})})},h=function(D){var E=(0,v.useFieldSchema)(),u,d=!1;if(E["x-use-decorator-props"])u=D.params,d=D.parseVariableLoading;else{var c=(0,n.l)(D);u=c.params,d=c.parseVariableLoading}return{params:u,parseVariableLoading:d}},B=(0,M.t)(function(m){var D=m.resource||m.association,E=(0,v.useFieldSchema)(),u=(0,p.useCollectionManager_deprecated)(m.dataSource),d=u.getCollection,c=u.getCollectionField,f=d(m.collection,m.dataSource),z=(E==null?void 0:E["x-decorator-props"])||{},T=z.treeTable,W=h(m),t=W.params,I=W.parseVariableLoading,H="__nochildren__";if(T)if(H="children",D!=null&&D.includes(".")){var K=c(D);K!=null&&K.treeChildren&&(H=K.name),t.tree=!0}else{var U=f==null?void 0:f.fields.find(function(te){return te.treeChildren});U&&(H=U.name),t.tree=!0}else H="__nochildren__";var F=(0,j.useMemo)(function(){return(0,k.createForm)()},[T]);return I?null:(0,A.jsx)(b.G0E,{scope:{treeTable:T},children:(0,A.jsx)(v.FormContext.Provider,{value:F,children:(0,A.jsx)(r.ZJ,l()(l()({name:m.name||"table"},m),{},{params:t,runWhenParamsChanged:!0,children:(0,A.jsx)(L,l()(l()({},m),{},{childrenColumnName:H,params:t}))}))})})}),g=function(){return(0,j.useContext)(y)},S=function(){return(0,j.useContext)(V)}},23523:function(Ne,ae,e){"use strict";e.d(ae,{CB:function(){return L},Q6:function(){return A},Qy:function(){return V},Wx:function(){return h},oA:function(){return B},s:function(){return Y}});var w=e(97857),l=e.n(w),G=e(15009),i=e.n(G),x=e(99289),C=e.n(x),O=e(12444),o=e.n(O),k=e(72004),v=e.n(k),j=e(9783),p=e.n(j),M=e(80844),n=e(67294),b=e(75148),N=e(7340),r=e(71176),a=e(85893),A=(0,n.createContext)({});A.displayName="TableFieldContext";var y=function(S){var m,D=S.params,E=D===void 0?{}:D,u=S.showIndex,d=S.dragSort,c=S.fieldName,f=(0,M.useField)(),z=(0,M.useFieldSchema)(),T=(0,b.BU)(),W=T.resource,t=T.service,I=(0,N.bz)(),H=(0,r.e$)(),K=H&&H.fieldName?"".concat(H.fieldName,".").concat(c):c;if(!(I!=null&&(m=I.updateAssociationValues)!==null&&m!==void 0&&m.includes(K))){var U;I==null||(U=I.updateAssociationValues)===null||U===void 0||U.push(K)}return(0,a.jsx)(A.Provider,{value:{field:f,fieldSchema:z,service:t,resource:W,params:E,showIndex:u,dragSort:d},children:S.children})},V=function(){function g(S){o()(this,g),p()(this,"field",void 0),p()(this,"api",void 0),p()(this,"sourceId",void 0),p()(this,"resource",void 0),this.field=S.field,this.api=S.api,this.sourceId=S.sourceId,this.resource=this.api.resource(S.resource,this.sourceId)}return v()(g,[{key:"list",value:function(){var S=C()(i()().mark(function D(E){var u;return i()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this.field.data=this.field.data||{},!this.field.data.changed){c.next=4;break}return console.log("list.dataSource",this.field.data.dataSource),c.abrupt("return",{data:{data:this.field.data.dataSource}});case 4:if(this.sourceId){c.next=8;break}return console.log("list.sourceId",this.field.data.dataSource),this.field.data.dataSource=[],c.abrupt("return",{data:{data:[]}});case 8:return c.next=10,this.resource.list(E);case 10:return u=c.sent,console.log("list",u),this.field.data.dataSource=u.data.data,c.abrupt("return",{data:{data:u.data.data}});case 14:case"end":return c.stop()}},D,this)}));function m(D){return S.apply(this,arguments)}return m}()},{key:"get",value:function(){var S=C()(i()().mark(function D(E){var u;return i()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return console.log("get",E),u=E.filterByTk,c.abrupt("return",{data:{data:this.field.data.dataSource[u]}});case 3:case"end":return c.stop()}},D,this)}));function m(D){return S.apply(this,arguments)}return m}()},{key:"create",value:function(){var S=C()(i()().mark(function D(E){var u;return i()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:console.log("create",E),u=E.values,this.field.data.dataSource.push(u),this.field.data.changed=!0;case 4:case"end":return c.stop()}},D,this)}));function m(D){return S.apply(this,arguments)}return m}()},{key:"update",value:function(){var S=C()(i()().mark(function D(E){var u,d;return i()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:console.log("update",E),u=E.filterByTk,d=E.values,this.field.data.dataSource[u]=d,this.field.data.changed=!0;case 4:case"end":return f.stop()}},D,this)}));function m(D){return S.apply(this,arguments)}return m}()},{key:"destroy",value:function(){var S=C()(i()().mark(function D(E){var u;return i()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:console.log("destroy",E),u=E.filterByTk,Array.isArray(u)||(u=[u]),this.field.data.dataSource=this.field.data.dataSource.filter(function(f,z){return!u.includes(z)}),this.field.data.changed=!0;case 5:case"end":return c.stop()}},D,this)}));function m(D){return S.apply(this,arguments)}return m}()}]),g}(),Y=(0,n.createContext)(null);Y.displayName="WithoutTableFieldResource";var L=function(S){return(0,a.jsx)(Y.Provider,{value:!1,children:(0,a.jsx)(b.ZJ,l()(l()({name:"table-field",block:"TableField"},S),{},{children:(0,a.jsx)(y,l()({},S))}))})},h=function(){return(0,n.useContext)(A)},B=function(){var S,m,D,E,u,d=(0,M.useField)(),c=h();return(0,n.useEffect)(function(){var f;if(!(c!=null&&(f=c.service)!==null&&f!==void 0&&f.loading)){var z,T;d.value=c==null||(z=c.service)===null||z===void 0||(z=z.data)===null||z===void 0?void 0:z.data,d.data=d.data||{},d.data.selectedRowKeys=c==null||(T=c.field)===null||T===void 0||(T=T.data)===null||T===void 0?void 0:T.selectedRowKeys}},[c==null||(S=c.field)===null||S===void 0||(S=S.data)===null||S===void 0?void 0:S.selectedRowKeys,c==null||(m=c.service)===null||m===void 0||(m=m.data)===null||m===void 0?void 0:m.data,c==null||(D=c.service)===null||D===void 0?void 0:D.loading,d]),{size:"middle",loading:c==null||(E=c.service)===null||E===void 0?void 0:E.loading,showIndex:c.showIndex,dragSort:c.dragSort,pagination:!1,required:c==null||(u=c.fieldSchema)===null||u===void 0||(u=u.parent)===null||u===void 0?void 0:u.required,rowKey:function(z){var T,W;return(T=d.value)===null||T===void 0||(W=T.indexOf)===null||W===void 0?void 0:W.call(T,z)},onRowSelectionChange:function(z,T){var W;c.field.data=(c==null||(W=c.field)===null||W===void 0?void 0:W.data)||{},c.field.data.selectedRowKeys=z,c.field.data.selectedRowData=T},onChange:function(z){var T=z.current,W=z.pageSize;c.service.run({page:T,pageSize:W})}}}},78899:function(Ne,ae,e){"use strict";e.d(ae,{CL:function(){return t},RP:function(){return I},Vs:function(){return d},Yu:function(){return D},br:function(){return z},rL:function(){return W}});var w=e(15009),l=e.n(w),G=e(99289),i=e.n(G),x=e(9783),C=e.n(x),O=e(96695),o=e.n(O),k=e(5574),v=e.n(k),j=e(97857),p=e.n(j),M=e(80844),n=e(96486),b=e.n(n),N=e(44908),r=e.n(N),a=e(67294),A=e(6145),y=e(49834),V=e(18386),Y=e(87714),L=e(15503),h=e(36586),B=e(62954),g=e(75148),S=e(10097),m=e(85893),D=(0,a.createContext)({});D.displayName="TableSelectorContext";var E=(0,a.createContext)({});E.displayName="TableSelectorParamsContext";var u=function(){return(0,a.useContext)(E)},d=function(K){var U=K.params,F=K.children,te=u();try{U.filter=(0,Y.EO)([te.filter,U.filter]),U=p()(p()({},te),U)}catch(q){console.error(q)}return(0,m.jsx)(E.Provider,{value:U,children:F})},c=function(K){var U=K.params,F=K.rowKey,te=K.extraFilter,q=K.expandFlag,J=q===void 0?!1:q,Z=(0,M.useField)(),P=(0,g.BU)(),X=P.resource,le=P.service,Q=(0,a.useState)(J),oe=v()(Q,2),Ce=oe[0],se=oe[1],De=(0,y.Kv)();return(0,m.jsx)(h.HV,{record:{},parent:De,children:(0,m.jsx)(D.Provider,{value:{field:Z,service:le,resource:X,params:U,extraFilter:te,rowKey:F,expandFlag:Ce,setExpandFlag:function(){se(!Ce)}},children:K.children})})},f=function(K){var U,F=useCollectionManager_deprecated(),te=F.getCollectionFields,q=(U=te(K))===null||U===void 0?void 0:U.filter(function(J){return J.target}).map(function(J){return J.name});return q},z=function H(K,U){return K["x-component"]===U?K:K.parent&&(K==null?void 0:K["x-component"])!=="AssociationField.Viewer"?H(K.parent,U):null},T=function(K){var U=(0,A.useCollectionManager_deprecated)(),F=U.getCollectionFields,te=F(K),q=new Set,J=o()(te),Z;try{for(J.s();!(Z=J.n()).done;){var P=Z.value;if(P.target){q.add(P.name);var X=F(P.target),le=o()(X),Q;try{for(le.s();!(Q=le.n()).done;){var oe=Q.value;oe.target&&q.add("".concat(P.name,".").concat(oe.name))}}catch(De){le.e(De)}finally{le.f()}}}}catch(De){J.e(De)}finally{J.f()}var Ce=(0,M.useFieldSchema)(),se=Ce.reduceProperties(function(De,We){return We["x-component"]==="TableV2.Selector"?We:De},new M.Schema({}));return r()(se.reduceProperties(function(De,We){if(We["x-component"]==="TableV2.Column"){var ye=We.reduceProperties(function(re,de){var _e=de.name.split("."),Ae=v()(_e,1),Fe=Ae[0];return de["x-collection-field"]&&q.has(Fe)?de:re},null);if(ye){var ve=ye.name.split("."),xe=v()(ve,1),he=xe[0];q.has(ye.name)?De.push(ye.name):q.has(he)&&De.push(he)}}return De},[]))},W=(0,L.t)(function(H){var K,U,F,te=u(),q=(0,M.useFieldSchema)(),J=(0,A.useCollectionManager_deprecated)(),Z=J.getCollectionJoinField,P=J.getCollectionFields,X=(0,h.a)(),le=(0,A.useCollectionManager_deprecated)(),Q=le.getCollection,oe=(q==null?void 0:q["x-decorator-props"])||{},Ce=oe.treeTable,se=z(q,"CollectionField"),De=Z(se==null?void 0:se["x-collection-field"]),We=Q(De==null?void 0:De.collectionName),ye=We==null?void 0:We.getPrimaryKey(),ve=T(H.collection),xe=p()({},H.params);if(H.dragSort&&(xe.sort=["sort"]),(De==null?void 0:De.target)===(De==null?void 0:De.collectionName)&&We!==null&&We!==void 0&&We.tree&&Ce&&(xe.tree=!0,se.name==="parent")){var he;xe.filter=p()(p()({},(he=xe.filter)!==null&&he!==void 0?he:{}),{},{id:X[ye]&&{$ne:X[ye]}})}Object.keys(xe).includes("appends")||(xe.appends=ve);var re;if(De&&(["oho","o2m"].includes(De.interface)&&!(0,V.Op)(q)&&(X!=null&&X[De.sourceKey]?re={$or:[C()({},De.foreignKey,{$is:null}),C()({},De.foreignKey,{$eq:X==null?void 0:X[De.sourceKey]})]}:re=C()({},De.foreignKey,{$is:null})),["obo"].includes(De.interface)&&!(0,V.Op)(q))){var de=P(De.target),_e=de.find(function(Te){return Te.foreignKey&&Te.foreignKey===De.foreignKey});_e&&(X!=null&&X[De.foreignKey]?re={$or:[C()({},"".concat(_e.name,".").concat(_e.foreignKey),{$is:null}),C()({},"".concat(_e.name,".").concat(_e.foreignKey),{$eq:X==null?void 0:X[De.foreignKey]})]}:re=C()({},"".concat(_e.name,".").concat(_e.foreignKey),{$is:null}))}if(re){var Ae;(Ae=xe)!==null&&Ae!==void 0&&Ae.filter?xe.filter={$and:[re,xe.filter]}:xe.filter=re}try{xe.filter=(0,Y.EO)([te.filter,xe.filter]),xe=p()(p()({},te),xe)}catch(Te){console.error(Te)}var Fe=(0,S.useParsedFilter)({filterOption:(K=xe)===null||K===void 0?void 0:K.filter}),Oe=Fe.filter,Me=Fe.parseVariableLoading;return!b().isEmpty((U=xe)===null||U===void 0?void 0:U.filter)&&b().isEmpty(Oe)||Me?null:((F=xe)!==null&&F!==void 0&&F.filter&&(xe.filter=Oe),(0,m.jsx)(B.G0E,{scope:{treeTable:Ce},children:(0,m.jsx)(g.ZJ,p()(p()({name:"table-selector"},H),{},{params:xe,children:(0,m.jsx)(c,p()(p()({},H),{},{params:xe,extraFilter:re}))}))}))}),t=function(){return(0,a.useContext)(D)},I=function(){var K,U,F,te,q,J,Z,P,X=(0,M.useField)(),le=t(),Q=(0,M.useFieldSchema)(),oe=(0,A.useCollectionManager_deprecated)(),Ce=oe.getCollectionJoinField,se=z(Q,"CollectionField"),De=Ce(se==null?void 0:se["x-collection-field"]);return(0,a.useEffect)(function(){var We;if(!(le!=null&&(We=le.service)!==null&&We!==void 0&&We.loading)){var ye,ve,xe,he,re,de=le==null||(ye=le.service)===null||ye===void 0||(ye=ye.data)===null||ye===void 0?void 0:ye.data.map(function(_e){return _e});X.value=de,X==null||(ve=X.setInitialValue)===null||ve===void 0||ve.call(X,de),X.data=X.data||{},X.data.selectedRowKeys=[],X.componentProps.pagination=X.componentProps.pagination||{},X.componentProps.pagination.pageSize=le==null||(xe=le.service)===null||xe===void 0||(xe=xe.data)===null||xe===void 0||(xe=xe.meta)===null||xe===void 0?void 0:xe.pageSize,X.componentProps.pagination.total=le==null||(he=le.service)===null||he===void 0||(he=he.data)===null||he===void 0||(he=he.meta)===null||he===void 0?void 0:he.count,X.componentProps.pagination.current=le==null||(re=le.service)===null||re===void 0||(re=re.data)===null||re===void 0||(re=re.meta)===null||re===void 0?void 0:re.page}},[De==null?void 0:De.foreignKey,le==null||(K=le.field)===null||K===void 0||(K=K.data)===null||K===void 0?void 0:K.selectedRowKeys,le==null||(U=le.service)===null||U===void 0||(U=U.data)===null||U===void 0?void 0:U.data,le==null||(F=le.service)===null||F===void 0||(F=F.data)===null||F===void 0||(F=F.meta)===null||F===void 0?void 0:F.count,le==null||(te=le.service)===null||te===void 0||(te=te.data)===null||te===void 0||(te=te.meta)===null||te===void 0?void 0:te.page,le==null||(q=le.service)===null||q===void 0||(q=q.data)===null||q===void 0||(q=q.meta)===null||q===void 0?void 0:q.pageSize,le==null||(J=le.service)===null||J===void 0?void 0:J.loading,X]),{loading:le==null||(Z=le.service)===null||Z===void 0?void 0:Z.loading,showIndex:!1,dragSort:!1,rowKey:le.rowKey||"id",pagination:(Q==null||(P=Q["x-component-props"])===null||P===void 0?void 0:P.pagination)===!1?!1:X.componentProps.pagination,onRowSelectionChange:function(ye,ve){var xe;le.field.data=(le==null||(xe=le.field)===null||xe===void 0?void 0:xe.data)||{},le.field.data.selectedRowKeys=ye,le.field.data.selectedRowData=ve},onRowDragEnd:function(ye){return i()(l()().mark(function ve(){var xe,he;return l()().wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return xe=ye.from,he=ye.to,de.next=3,le.resource.move({sourceId:xe[le.rowKey||"id"],targetId:he[le.rowKey||"id"]});case 3:le.service.refresh();case 4:case"end":return de.stop()}},ve)}))()},onChange:function(ye){var ve,xe=ye.current,he=ye.pageSize;le.service.run(p()(p()({},(ve=le.service.params)===null||ve===void 0?void 0:ve[0]),{},{page:xe,pageSize:he}))}}}},31019:function(Ne,ae,e){"use strict";e.d(ae,{T:function(){return O},u:function(){return C}});var w=e(5574),l=e.n(w),G=e(67294),i=e(85893),x=(0,G.createContext)({});x.displayName="TemplateBlockContext";var C=function(){return(0,G.useContext)(x)},O=function(k){var v=k.onTemplateLoaded,j=k.children,p=(0,G.useState)(!1),M=l()(p,2),n=M[0],b=M[1],N=(0,G.useCallback)(function(){b(!0),setTimeout(function(){v==null||v()})},[v]),r=(0,G.useMemo)(function(){return{templateFinished:n,onTemplateSuccess:N}},[N,n]);return(0,i.jsx)(x.Provider,{value:r,children:j})}},10097:function(Ne,ae,e){"use strict";e.r(ae),e.d(ae,{FormActiveFieldsProvider:function(){return We.T},appendQueryStringToUrl:function(){return _n},completeURL:function(){return dr},fillParentFields:function(){return Ln},findFilterTargets:function(){return Me},getAppends:function(){return Jt},getAssociationPath:function(){return In},getCardItemSchema:function(){return se.Gn},getFormValues:function(){return _e},getPageSchema:function(){return se.tj},navigateWithinSelf:function(){return yr},parseVariablesAndChangeParamsToQueryString:function(){return $n},reduceValueSize:function(){return lr},replaceVariableValue:function(){return fn},updateFilterTargets:function(){return Te},useAssociationCreateActionProps:function(){return Oe},useAssociationFilterBlockProps:function(){return ct},useAssociationFilterProps:function(){return st},useAssociationNames:function(){return Rn},useBlockHeightProps:function(){return se.gp},useBulkDestroyActionProps:function(){return Et},useCollectValuesToSubmit:function(){return Ae},useCreateActionProps:function(){return Fe},useCustomizeBulkUpdateActionProps:function(){return Pe},useCustomizeRequestActionProps:function(){return ce},useCustomizeUpdateActionProps:function(){return ue},useDataBlockParentRecord:function(){return De.M},useDestroyActionProps:function(){return Ke},useDetailsPaginationProps:function(){return rt},useDisassociateActionProps:function(){return Ye},useFilterBlockActionProps:function(){return ie},useFormActiveFields:function(){return We.z},useLinkActionProps:function(){return pt},useOptionalFieldList:function(){return at},useParseURLAndParams:function(){return Gt},useParsedFilter:function(){return ye.v},usePickActionProps:function(){return xe},useRefreshActionProps:function(){return Lt},useRemoveActionProps:function(){return Ue},useResetBlockActionProps:function(){return R},useUpdateActionProps:function(){return je}});var w=e(96695),l=e.n(w),G=e(68400),i=e.n(G),x=e(9783),C=e.n(x),O=e(19632),o=e.n(O),k=e(15009),v=e.n(k),j=e(99289),p=e.n(j),M=e(97857),n=e.n(M),b=e(52677),N=e.n(b),r=e(97133),a=e(80844),A=e(85667),y=e(27655),V=e(84157),Y=e(3321),L=e(45360),h=e(96486),B=e.n(h),g=e(27361),S=e.n(g),m=e(57557),D=e.n(m),E=e(80129),u=e.n(E),d=e(67294),c=e(26793),f=e(21143),z=e(12174),T=e(85782),W=e(7340),t=e(6145),I=e(67205),H=e(87714),K=e(67354),U=e(36586),F=e(62954),te=e(37696),q=e(22229),J=e(6438),Z=e(64910),P=e(76690),X=e(65565),le=e(75148),Q=e(29250),oe=e(35964),Ce=e(23523),se=e(3192),De=e(94658),We=e(44899),ye=e(12929),ve,xe=function(){var gt=(0,a.useForm)();return{onClick:function(){console.log("usePickActionProps",gt.values)}}};function he(Ut,gt){var Kt=/\{\{\s*((\w+\.?)+)\s*\}\}/g;return Ut.replace(Kt,function(zt,It){return S()(gt,It)||""})}var re=function Ut(gt){if(_typeof(gt)!=="object"||!gt)return gt;if(Array.isArray(gt))return gt.map(function(yt){return Ut(yt)});var Kt={};for(var zt in gt)if(Object.prototype.hasOwnProperty.call(gt,zt)){var It=gt[zt];if(Array.isArray(It)||It&&_typeof(It)==="object")continue;Kt[zt]=It}return Kt};function de(Ut){var gt=B().cloneDeep(Ut.values),Kt=[];Ut.query("*").forEach(function(It){It&&Kt.push(It)});var zt=B().uniq(Kt.filter(function(It){var yt;return It==null||(yt=It.componentProps)===null||yt===void 0?void 0:yt.readOnlySubmit}).map(function(It){var yt,Nt=((yt=It.path)===null||yt===void 0?void 0:yt.segments)||[];return Nt.length<=1?Nt.join("."):Nt.slice(0,-1).join(".")}));return zt.forEach(function(It,yt){(yt!==0||It.includes("."))&&!gt[It]&&B().unset(gt,It)}),gt}function _e(Ut){var gt=Ut.filterByTk,Kt=Ut.field,zt=Ut.form,It=Ut.fieldNames,yt=Ut.getField,Nt=Ut.resource,wt=Ut.actionFields;if(gt&&wt){var kt=Object.keys(zt.values).filter(function(qt){var Qt=yt(qt);return!wt.includes(qt)&&["hasOne","hasMany","belongsTo","belongsToMany"].includes(Qt==null?void 0:Qt.type)});return D()(n()({},zt.values),kt)}return de(zt)}function Ae(){var Ut=(0,a.useForm)(),gt=(0,le.C)(),Kt=(0,le.BU)(),zt=Kt.field,It=Kt.resource,yt=(0,t.useCollection_deprecated)(),Nt=yt.fields,wt=yt.getField,kt=yt.getTreeParentField,qt=yt.name,Qt=Nt.map(function(Wt){return Wt.name}),ln=(0,F.XCj)(),mn=ln.fieldSchema,un=(0,f.useFormActiveFields)()||{},dn=un.getActiveFieldsName,On=(0,Z.OQ)(),Yt=(0,Z.Kp)({currentForm:Ut}),on=(0,a.useFieldSchema)(),xn=(0,K.t)();return(0,d.useCallback)(p()(v()().mark(function Wt(){var et,Ft,Mt,xt,mt,At,we,Ie,Ee,Be,ze,tt,ot;return v()().wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return Mt=(et=on==null?void 0:on["x-action-settings"])!==null&&et!==void 0?et:{},xt=Mt.assignedValues,mt=xt===void 0?{}:xt,At=Mt.overwriteValues,we=_e({filterByTk:gt,field:zt,form:Ut,fieldNames:Qt,getField:wt,resource:It,actionFields:(dn==null?void 0:dn("form"))||[]}),Ie={},Ee=Object.keys(mt).map(function(){var St=p()(v()().mark(function jt(tn){var Zt,Xt,ut,Qe;return v()().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:Zt=mt[tn],Xt=wt(tn),lt.next=5;break;case 5:if(!(0,P.cG)(Zt)){lt.next=16;break}return lt.next=8,On==null?void 0:On.parseVariable(Zt,Yt);case 8:if(lt.t0=lt.sent,lt.t0){lt.next=11;break}lt.t0={};case 11:ut=lt.t0,Qe=ut.value,Qe!=null&&(Ie[tn]=(0,X.J)(Qe,{targetCollectionField:Xt})),lt.next=17;break;case 16:Zt!==""&&(Ie[tn]=Zt);case 17:case"end":return lt.stop()}},jt)}));return function(jt){return St.apply(this,arguments)}}()),$t.next=6,Promise.all(Ee);case 6:return Be=mn==null||(Ft=mn["x-component-props"])===null||Ft===void 0?void 0:Ft.addChild,Be&&(ot=kt(),we[(ze=ot==null?void 0:ot.name)!==null&&ze!==void 0?ze:"parent"]=xn,we[(tt=ot==null?void 0:ot.foreignKey)!==null&&tt!==void 0?tt:"parentId"]=xn==null?void 0:xn.id),$t.abrupt("return",n()(n()(n()({},we),At),Ie));case 9:case"end":return $t.stop()}},Wt)})),[on,zt,Qt,mn,gt,Ut,dn,wt,kt,Yt,qt,It,xn,On])}var Fe=function(){var gt,Kt=(0,le.C)(),zt=(0,f.useCollectionRecord)(),It=(0,a.useForm)(),yt=(0,le.BU)(),Nt=yt.field,wt=yt.resource,kt=(0,F.XCj)(),qt=kt.setVisible,Qt=kt.setSubmitted,ln=kt.setFormValueChanged,mn=(0,T.WO)(),un=(0,a.useFieldSchema)(),dn=(0,a.useField)(),On=(0,F.eJW)(),Yt=Y.Z.useApp(),on=Yt.modal,xn=(0,c.$)(),Wt=xn.t,et=(0,W.bz)(),Ft=et.updateAssociationValues,Mt=Ae(),xt=zt.isNew?dn.componentProps.saveMode||"create":"update",mt=((gt=dn.componentProps.filterKeys)===null||gt===void 0?void 0:gt.checked)||[];return{onClick:function(){return p()(v()().mark(function we(){var Ie,Ee,Be,ze,tt,ot,it,$t,St,jt,tn,Zt,Xt;return v()().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:if(Ee=(Ie=un==null?void 0:un["x-action-settings"])!==null&&Ie!==void 0?Ie:{},Be=Ee.onSuccess,ze=Ee.skipValidator,tt=Ee.triggerWorkflows,ot=Be||{},it=ot.manualClose,$t=ot.redirecting,St=ot.redirectTo,jt=ot.successMessage,tn=ot.actionAfterSuccess,ze){Qe.next=5;break}return Qe.next=5,It.submit();case 5:return Qe.next=7,Mt();case 7:return Zt=Qe.sent,dn.data=Nt.data||{},dn.data.loading=!0,Qe.prev=10,Qe.next=13,wt[xt]({values:Zt,filterKeys:mt,filterByTk:Kt,triggerWorkflows:tt!=null&&tt.length?tt.map(function(Re){return[Re.workflowKey,Re.context].filter(Boolean).join("!")}).join(","):void 0,updateAssociationValues:Ft});case 13:if(Xt=Qe.sent,(tn==="previous"||!tn&&$t!==!0)&&(qt==null||qt(!1)),Qt==null||Qt(!0),ln==null||ln(!1),dn.data.loading=!1,dn.data.data=Xt,jt){Qe.next=25;break}return L.ZP.success(Wt("Saved successfully")),Qe.next=23,Ht(It);case 23:return($t&&!tn||tn==="redirect")&&St&&((0,V.isURL)(St)?window.location.href=St:mn(St)),Qe.abrupt("return");case 25:if(!it){Qe.next=29;break}on.success({title:On(jt),onOk:function(){var Re=p()(v()().mark(function ke(){return v()().wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.next=2,Ht(It);case 2:($t&&!tn||tn==="redirect")&&St&&((0,V.isURL)(St)?window.location.href=St:mn(St));case 3:case"end":return qe.stop()}},ke)}));function lt(){return Re.apply(this,arguments)}return lt}()}),Qe.next=33;break;case 29:return L.ZP.success(On(jt)),Qe.next=32,Ht(It);case 32:($t&&!tn||tn==="redirect")&&St&&((0,V.isURL)(St)?window.location.href=St:mn(St));case 33:Qe.next=38;break;case 35:Qe.prev=35,Qe.t0=Qe.catch(10),dn.data.loading=!1;case 38:case"end":return Qe.stop()}},we,null,[[10,35]])}))()}}},Oe=function(){var gt,Kt=(0,a.useForm)(),zt=(0,le.BU)(),It=zt.field,yt=zt.resource,Nt=zt.__parent,wt=(0,F.XCj)(),kt=wt.setVisible,qt=wt.fieldSchema,Qt=wt.setSubmitted,ln=(0,a.useFieldSchema)(),mn=(0,a.useField)(),un=(0,t.useCollection_deprecated)(),dn=un.fields,On=un.getField,Yt=un.getTreeParentField,on=un.name,xn=(0,F.eJW)(),Wt=(0,le.C)(),et=(0,U.a)(),Ft=(0,Z.OQ)(),Mt=(0,Z.Kp)({currentForm:Kt}),xt=(0,f.useFormActiveFields)()||{},mt=xt.getActiveFieldsName,At=mn.componentProps.saveMode||"create",we=((gt=mn.componentProps.filterKeys)===null||gt===void 0?void 0:gt.checked)||[];return{onClick:function(){return p()(v()().mark(function Ee(){var Be,ze,tt,ot,it,$t,St,jt,tn,Zt,Xt,ut,Qe,Re,lt,ke,Ze,qe,ht,Tt,cn,vn;return v()().wrap(function(Wn){for(;;)switch(Wn.prev=Wn.next){case 0:return tt=dn.map(function(Hn){return Hn.name}),ot=(Be=ln==null?void 0:ln["x-action-settings"])!==null&&Be!==void 0?Be:{},it=ot.assignedValues,$t=it===void 0?{}:it,St=ot.onSuccess,jt=ot.overwriteValues,tn=ot.skipValidator,Zt=ot.triggerWorkflows,Xt=qt==null||(ze=qt["x-component-props"])===null||ze===void 0?void 0:ze.addChild,ut=St||{},Qe=ut.successMessage,Re={},lt=Object.keys($t).map(function(){var Hn=p()(v()().mark(function cr(Kn){var _r,sr,gr,Ar;return v()().wrap(function(kr){for(;;)switch(kr.prev=kr.next){case 0:_r=$t[Kn],sr=On(Kn),kr.next=5;break;case 5:if(!(0,P.cG)(_r)){kr.next=16;break}return kr.next=8,Ft==null?void 0:Ft.parseVariable(_r,Mt);case 8:if(kr.t0=kr.sent,kr.t0){kr.next=11;break}kr.t0={};case 11:gr=kr.t0,Ar=gr.value,Ar&&(Re[Kn]=(0,X.J)(Ar,{targetCollectionField:sr})),kr.next=17;break;case 16:_r!==""&&(Re[Kn]=_r);case 17:case"end":return kr.stop()}},cr)}));return function(cr){return Hn.apply(this,arguments)}}()),Wn.next=8,Promise.all(lt);case 8:if(tn){Wn.next=11;break}return Wn.next=11,Kt.submit();case 11:return ke=_e({filterByTk:Wt,field:It,form:Kt,fieldNames:tt,getField:On,resource:yt,actionFields:(mt==null?void 0:mt("form"))||[]}),Xt&&(ht=Yt(),ke[(Ze=ht==null?void 0:ht.name)!==null&&Ze!==void 0?Ze:"parent"]=et,ke[(qe=ht==null?void 0:ht.foreignKey)!==null&&qe!==void 0?qe:"parentId"]=et.id),mn.data=It.data||{},mn.data.loading=!0,Wn.prev=15,Wn.next=18,yt[At]({values:n()(n()(n()({},ke),jt),Re),filterKeys:we,triggerWorkflows:Zt!=null&&Zt.length?Zt.map(function(Hn){return[Hn.workflowKey,Hn.context].filter(Boolean).join("!")}).join(","):void 0});case 18:if(vn=Wn.sent,mn.data.loading=!1,mn.data.data=vn,Nt==null||(Tt=Nt.service)===null||Tt===void 0||(cn=Tt.refresh)===null||cn===void 0||cn.call(Tt),kt==null||kt(!1),Qt==null||Qt(!0),Qe){Wn.next=26;break}return Wn.abrupt("return");case 26:L.ZP.success(xn(Qe)),Wn.next=33;break;case 29:Wn.prev=29,Wn.t0=Wn.catch(15),mn.data.data=null,mn.data.loading=!1;case 33:case"end":return Wn.stop()}},Ee,null,[[15,29]])}))()}}},Me=function(gt){for(;gt;){if(gt["x-filter-targets"])return{targets:gt["x-filter-targets"],uid:gt["x-uid"]};gt=gt.parent}return{}},Te=function(gt,Kt){for(;gt;){if(gt["x-filter-targets"]){gt["x-filter-targets"]=Kt;return}gt=gt.parent}},ge=function(){var gt=(0,a.useForm)(),Kt=(0,I.kO)(),zt=Kt.getDataBlocks,It=(0,f.useCollectionManager)(),yt=(0,Q.Q)(),Nt=yt.getOperators,wt=(0,a.useFieldSchema)(),kt=(0,f.useCollection)(),qt=kt.name,Qt=(0,d.useMemo)(function(){return Me(wt)},[wt]),ln=Qt.targets,mn=ln===void 0?[]:ln,un=Qt.uid,dn=(0,d.useCallback)(function(){return(0,F.WmO)((0,H.jE)(gt.values,Nt(),It.getCollectionField.bind(It),qt))},[gt.values,It,Nt,qt]),On=(0,d.useCallback)(p()(v()().mark(function Yt(){var on,xn,Wt,et=arguments;return v()().wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return on=et.length>0&&et[0]!==void 0?et[0]:{},xn=on.doNothingWhenFilterIsEmpty,Wt=xn===void 0?!1:xn,Mt.prev=1,Mt.next=4,Promise.all(zt().map(function(){var xt=p()(v()().mark(function mt(At){var we,Ie,Ee,Be,ze,tt,ot;return v()().wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:if(Ee=mn.find(function(St){return St.uid===At.uid}),Ee){$t.next=3;break}return $t.abrupt("return");case 3:if(Be=((we=At.service.params)===null||we===void 0?void 0:we[0])||{},ze=((Ie=At.service.params)===null||Ie===void 0||(Ie=Ie[1])===null||Ie===void 0?void 0:Ie.filters)||{},ze[un]=dn(),tt=(0,H.EO)([].concat(o()(Object.values(ze).map(function(St){return(0,F.WmO)(St)})),[At.defaultFilter])),B().isEmpty(ze[un])&&((ot=At.clearSelection)===null||ot===void 0||ot.call(At)),!(Wt&&B().isEmpty(ze[un]))){$t.next=10;break}return $t.abrupt("return");case 10:if(!(At.dataLoadingMode==="manual"&&B().isEmpty(ze[un]))){$t.next=12;break}return $t.abrupt("return",At.clearData());case 12:return $t.abrupt("return",At.doFilter(n()(n()({},Be),{},{page:1,filter:tt}),{filters:ze}));case 13:case"end":return $t.stop()}},mt)}));return function(mt){return xt.apply(this,arguments)}}()));case 4:Mt.next=9;break;case 6:Mt.prev=6,Mt.t0=Mt.catch(1),console.error(Mt.t0);case 9:case"end":return Mt.stop()}},Yt,null,[[1,6]])})),[zt,dn,mn,un]);return(0,d.useEffect)(function(){setTimeout(function(){On({doNothingWhenFilterIsEmpty:!0})},100)},[zt().length]),{doFilter:On,getFilterFromCurrentForm:dn}},ie=function(){var gt=ge(),Kt=gt.doFilter,zt=(0,a.useField)();zt.data=zt.data||{};var It=(0,a.useForm)();return{onClick:function(){return p()(v()().mark(function Nt(){return v()().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,It.submit();case 2:return zt.data.loading=!0,kt.next=5,Kt();case 5:zt.data.loading=!1;case 6:case"end":return kt.stop()}},Nt)}))()}}},ne=function(){var gt=(0,a.useForm)(),Kt=(0,a.useFieldSchema)(),zt=(0,I.kO)(),It=zt.getDataBlocks,yt=Me(Kt),Nt=yt.targets,wt=yt.uid,kt=ge(),qt=kt.doFilter,Qt=kt.getFilterFromCurrentForm;return{doReset:function(){var ln=p()(v()().mark(function un(){var dn;return v()().wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,gt.reset(void 0,{forceClear:!!(Kt!=null&&(dn=Kt["x-component-props"])!==null&&dn!==void 0&&dn.clearDefaultValue)});case 2:if(!B().isEmpty(Qt())){Yt.next=4;break}return Yt.abrupt("return",hn({getDataBlocks:It,targets:Nt,uid:wt}));case 4:return Yt.next=6,qt();case 6:case"end":return Yt.stop()}},un)}));function mn(){return ln.apply(this,arguments)}return mn}()}},R=function(){var gt=(0,a.useField)(),Kt=ne(),zt=Kt.doReset;return gt.data=gt.data||{},{onClick:function(){return p()(v()().mark(function yt(){return v()().wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return gt.data.loading=!0,wt.next=3,zt();case 3:gt.data.loading=!1;case 4:case"end":return wt.stop()}},yt)}))()}}},ue=function(){var gt=(0,le.BU)(),Kt=gt.resource,zt=gt.__parent,It=gt.service,yt=(0,le.C)(),Nt=(0,a.useFieldSchema)(),wt=(0,T.WO)(),kt=(0,F.eJW)(),qt=(0,a.useForm)(),Qt=Y.Z.useApp(),ln=Qt.modal,mn=(0,Z.OQ)(),un=(0,Z.Kp)({currentForm:qt}),dn=(0,t.useCollection_deprecated)(),On=dn.name,Yt=dn.getField,on=(0,F.XCj)(),xn=on.setVisible;return{onClick:function(et,Ft){return p()(v()().mark(function Mt(){var xt,mt,At,we,Ie,Ee,Be,ze,tt,ot,it,$t,St,jt,tn,Zt,Xt;return v()().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return mt=(xt=Nt==null?void 0:Nt["x-action-settings"])!==null&&xt!==void 0?xt:{},At=mt.assignedValues,we=At===void 0?{}:At,Ie=mt.onSuccess,Ee=mt.skipValidator,Be=mt.triggerWorkflows,ze=Ie||{},tt=ze.manualClose,ot=ze.redirecting,it=ze.redirectTo,$t=ze.successMessage,St=ze.actionAfterSuccess,jt={},tn=Object.keys(we).map(function(){var Re=p()(v()().mark(function lt(ke){var Ze,qe,ht,Tt;return v()().wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:Ze=we[ke],qe=Yt(ke),vn.next=5;break;case 5:if(!(0,P.cG)(Ze)){vn.next=16;break}return vn.next=8,mn==null?void 0:mn.parseVariable(Ze,un);case 8:if(vn.t0=vn.sent,vn.t0){vn.next=11;break}vn.t0={};case 11:ht=vn.t0,Tt=ht.value,Tt&&(jt[ke]=(0,X.J)(Tt,{targetCollectionField:qe})),vn.next=17;break;case 16:Ze!==""&&(jt[ke]=Ze);case 17:case"end":return vn.stop()}},lt)}));return function(lt){return Re.apply(this,arguments)}}()),Qe.next=6,Promise.all(tn);case 6:if(Ee!==!1){Qe.next=9;break}return Qe.next=9,qt.submit();case 9:return Qe.next=11,Kt.update({filterByTk:yt,values:n()({},jt),triggerWorkflows:Be!=null&&Be.length?Be.map(function(Re){return[Re.workflowKey,Re.context].filter(Boolean).join("!")}).join(","):void 0});case 11:if((St==="previous"||!St&&ot!==!0)&&(xn==null||xn(!1)),Ft&&(Ft==null||Ft()),Kt instanceof Ce.Qy||zt==null||(Zt=zt.service)===null||Zt===void 0||(Xt=Zt.refresh)===null||Xt===void 0||Xt.call(Zt),$t){Qe.next=16;break}return Qe.abrupt("return");case 16:tt?ln.success({title:kt($t),onOk:function(){var Re=p()(v()().mark(function ke(){return v()().wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:(ot&&!St||St==="redirect")&&it&&((0,V.isURL)(it)?window.location.href=it:wt(it));case 1:case"end":return qe.stop()}},ke)}));function lt(){return Re.apply(this,arguments)}return lt}()}):(L.ZP.success(kt($t)),(ot&&!St||St==="redirect")&&it&&((0,V.isURL)(it)?window.location.href=it:wt(it)));case 17:case"end":return Qe.stop()}},Mt)}))()}}},Pe=function(){var gt,Kt,zt,It=(0,le.BU)(),yt=It.field,Nt=It.resource,wt=It.__parent,kt=It.service,qt=(0,d.useContext)(a.SchemaExpressionScopeContext),Qt=(0,a.useFieldSchema)(),ln=(0,f.useTableBlockContext)(),mn=ln.rowKey,un=(gt=(Kt=(zt=ln.field)===null||zt===void 0||(zt=zt.data)===null||zt===void 0?void 0:zt.selectedRowKeys)!==null&&Kt!==void 0?Kt:qt==null?void 0:qt.selectedRecordKeys)!==null&>!==void 0?gt:{},dn=(0,T.WO)(),On=(0,F.eJW)(),Yt=(0,c.$)(),on=Yt.t,xn=(0,a.useField)(),Wt=Y.Z.useApp(),et=Wt.modal,Ft=(0,Z.OQ)(),Mt=(0,U.a)(),xt=(0,t.useCollection_deprecated)(),mt=xt.name,At=xt.getField,we=(0,Z.Kp)(),Ie=(0,F.XCj)(),Ee=Ie.setVisible;return{onClick:function(){return p()(v()().mark(function ze(){var tt,ot,it,$t,St,jt,tn,Zt,Xt,ut,Qe,Re,lt,ke;return v()().wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return ot=(tt=Qt==null?void 0:Qt["x-action-settings"])!==null&&tt!==void 0?tt:{},it=ot.assignedValues,$t=it===void 0?{}:it,St=ot.onSuccess,jt=ot.updateMode,tn=St||{},Zt=tn.manualClose,Xt=tn.redirecting,ut=tn.redirectTo,Qe=tn.successMessage,Re=tn.actionAfterSuccess,xn.data=yt.data||{},xn.data.loading=!0,lt={},ke=Object.keys($t).map(function(){var ht=p()(v()().mark(function Tt(cn){var vn,jn,Wn,Hn;return v()().wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:vn=$t[cn],jn=At(cn),Kn.next=5;break;case 5:if(!(0,P.cG)(vn)){Kn.next=16;break}return Kn.next=8,Ft==null?void 0:Ft.parseVariable(vn,we);case 8:if(Kn.t0=Kn.sent,Kn.t0){Kn.next=11;break}Kn.t0={};case 11:Wn=Kn.t0,Hn=Wn.value,Hn&&(lt[cn]=(0,X.J)(Hn,{targetCollectionField:jn})),Kn.next=17;break;case 16:vn!==""&&(lt[cn]=vn);case 17:case"end":return Kn.stop()}},Tt)}));return function(Tt){return ht.apply(this,arguments)}}()),qe.next=8,Promise.all(ke);case 8:(Re==="previous"||!Re&&Xt!==!0)&&(Ee==null||Ee(!1)),et.confirm({title:on("Bulk update"),content:on(jt==="selected"?"Update selected data?":"Update all data?"),onOk:function(){return p()(v()().mark(function Tt(){var cn,vn,jn,Wn,Hn,cr,Kn;return v()().wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:if(jn=(cn=(vn=kt.params)===null||vn===void 0?void 0:vn[0])!==null&&cn!==void 0?cn:{},Wn=jn.filter,Hn={values:n()({},lt),filter:Wn,forceUpdate:!1},jt!=="selected"){sr.next=8;break}if(un!=null&&un.length){sr.next=7;break}return L.ZP.error(on("Please select the records to be updated")),xn.data.loading=!1,sr.abrupt("return");case 7:Hn.filter={$and:[C()({},mn||"id",{$in:un})]};case 8:return Hn.filter||(Hn.forceUpdate=!0),sr.prev=9,sr.next=12,Nt.update(Hn);case 12:sr.next=16;break;case 14:sr.prev=14,sr.t0=sr.catch(9);case 16:return sr.prev=16,xn.data.loading=!1,sr.finish(16);case 19:if(Nt instanceof Ce.Qy||wt==null||(cr=wt.service)===null||cr===void 0||(Kn=cr.refresh)===null||Kn===void 0||Kn.call(cr),Qe){sr.next=22;break}return sr.abrupt("return");case 22:Zt?et.success({title:On(Qe),onOk:function(){var gr=p()(v()().mark(function Kr(){return v()().wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:(Xt&&!Re||Re==="redirect")&&ut&&((0,V.isURL)(ut)?window.location.href=ut:dn(ut));case 1:case"end":return Hr.stop()}},Kr)}));function Ar(){return gr.apply(this,arguments)}return Ar}()}):(L.ZP.success(On(Qe)),(Xt&&!Re||Re==="redirect")&&ut&&((0,V.isURL)(ut)?window.location.href=ut:dn(ut)));case 23:case"end":return sr.stop()}},Tt,null,[[9,14,16,19]])}))()},onCancel:function(){return p()(v()().mark(function Tt(){return v()().wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:xn.data.loading=!1;case 1:case"end":return vn.stop()}},Tt)}))()}});case 10:case"end":return qe.stop()}},ze)}))()}}},ce=function(){var gt,Kt=(0,z.LY)(),zt=(0,T.WO)(),It=(0,le.C)(),yt=(0,a.useFieldSchema)(),Nt=(0,F.eJW)(),wt=(0,a.useForm)(),kt=(0,t.useCollection_deprecated)(),qt=kt.fields,Qt=kt.getField,ln=(0,le.BU)(),mn=ln.field,un=ln.resource,dn=ln.__parent,On=ln.service,Yt=(0,U.a)(),on=(0,J.OP)(),xn=on==null||(gt=on.data)===null||gt===void 0?void 0:gt.data,Wt=(0,a.useField)(),et=(0,c.$)(),Ft=et.t,Mt=(0,F.XCj)(),xt=Mt.setVisible,mt=Y.Z.useApp(),At=mt.modal,we=(0,f.useFormActiveFields)()||{},Ie=we.getActiveFieldsName;return{onClick:function(){return p()(v()().mark(function Be(){var ze,tt,ot,it,$t,St,jt,tn,Zt,Xt,ut,Qe,Re,lt,ke,Ze,qe,ht,Tt,cn,vn,jn;return v()().wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:if(tt=(ze=yt==null?void 0:yt["x-action-settings"])!==null&&ze!==void 0?ze:{},ot=tt.skipValidator,it=tt.onSuccess,$t=tt.requestSettings,St=it||{},jt=St.manualClose,tn=St.redirecting,Zt=St.redirectTo,Xt=St.successMessage,ut=St.actionAfterSuccess,Qe=yt==null?void 0:yt["x-action"],$t.url){Hn.next=5;break}return Hn.abrupt("return");case 5:if(!(ot!==!0&&Qe==="customize:form:request")){Hn.next=8;break}return Hn.next=8,wt.submit();case 8:return Re=$t.headers?JSON.parse($t.headers):{},lt=$t.params?JSON.parse($t.params):{},ke=$t.data?JSON.parse($t.data):{},Ze=["POST","PUT","PATCH"],Qe==="customize:form:request"&&Ze.includes($t.method)&&(qe=qt.map(function(cr){return cr.name}),ht=_e({filterByTk:It,field:mn,form:wt,fieldNames:qe,getField:Qt,resource:un,actionFields:(Ie==null?void 0:Ie("form"))||[]}),Object.assign(ke,ht)),Tt={url:he($t.url,{currentRecord:Yt,currentUser:xn}),method:$t.method,headers:(0,V.parse)(Re)({currentRecord:Yt,currentUser:xn}),params:(0,V.parse)(lt)({currentRecord:Yt,currentUser:xn}),data:(0,V.parse)(ke)({currentRecord:Yt,currentUser:xn})},Wt.data=mn.data||{},Wt.data.loading=!0,Hn.prev=16,Hn.next=19,Kt.request(n()({},Tt));case 19:if(Wt.data.loading=!1,un instanceof Ce.Qy||dn==null||(vn=dn.service)===null||vn===void 0||(jn=vn.refresh)===null||jn===void 0||jn.call(vn),On==null||(cn=On.refresh)===null||cn===void 0||cn.call(On),Qe==="customize:form:request"&&(ut==="previous"||!ut&&tn!==!0)&&(xt==null||xt(!1)),Xt){Hn.next=28;break}return L.ZP.success(Ft("Saved successfully")),Hn.next=27,Ht(wt);case 27:(tn&&!ut||ut==="redirect")&&Zt&&((0,V.isURL)(Zt)?window.location.href=Zt:zt(Zt));case 28:jt?At.success({title:Nt(Xt),onOk:function(){var cr=p()(v()().mark(function _r(){return v()().wrap(function(gr){for(;;)switch(gr.prev=gr.next){case 0:(tn&&!ut||ut==="redirect")&&Zt&&((0,V.isURL)(Zt)?window.location.href=Zt:zt(Zt));case 1:case"end":return gr.stop()}},_r)}));function Kn(){return cr.apply(this,arguments)}return Kn}()}):L.ZP.success(Nt(Xt));case 29:return Hn.prev=29,Wt.data.loading=!1,Hn.finish(29);case 32:case"end":return Hn.stop()}},Be,null,[[16,,29,32]])}))()}}},je=function(){var gt=(0,a.useForm)(),Kt=(0,le.C)(),zt=(0,le.BU)(),It=zt.field,yt=zt.resource,Nt=zt.__parent,wt=(0,F.XCj)(),kt=wt.setVisible,qt=wt.setFormValueChanged,Qt=(0,a.useFieldSchema)(),ln=(0,T.WO)(),mn=(0,t.useCollection_deprecated)(),un=mn.fields,dn=mn.getField,On=mn.name,Yt=(0,F.eJW)(),on=(0,a.useField)(),xn=(0,W.bz)(),Wt=xn.updateAssociationValues,et=Y.Z.useApp(),Ft=et.modal,Mt=(0,le.MM)(),xt=(0,Z.OQ)(),mt=(0,Z.Kp)({currentForm:gt}),At=(0,f.useFormActiveFields)()||{},we=At.getActiveFieldsName;return{onClick:function(Ee,Be){return p()(v()().mark(function ze(){var tt,ot,it,$t,St,jt,tn,Zt,Xt,ut,Qe,Re,lt,ke,Ze,qe,ht,Tt;return v()().wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return ot=(tt=Qt==null?void 0:Qt["x-action-settings"])!==null&&tt!==void 0?tt:{},it=ot.assignedValues,$t=it===void 0?{}:it,St=ot.onSuccess,jt=ot.overwriteValues,tn=ot.skipValidator,Zt=ot.triggerWorkflows,Xt=St||{},ut=Xt.manualClose,Qe=Xt.redirecting,Re=Xt.redirectTo,lt=Xt.successMessage,ke=Xt.actionAfterSuccess,Ze={},qe=Object.keys($t).map(function(){var jn=p()(v()().mark(function Wn(Hn){var cr,Kn,_r,sr;return v()().wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:cr=$t[Hn],Kn=dn(Hn),Ar.next=5;break;case 5:if(!(0,P.cG)(cr)){Ar.next=16;break}return Ar.next=8,xt==null?void 0:xt.parseVariable(cr,mt);case 8:if(Ar.t0=Ar.sent,Ar.t0){Ar.next=11;break}Ar.t0={};case 11:_r=Ar.t0,sr=_r.value,sr&&(Ze[Hn]=(0,X.J)(sr,{targetCollectionField:Kn})),Ar.next=17;break;case 16:cr!==""&&(Ze[Hn]=cr);case 17:case"end":return Ar.stop()}},Wn)}));return function(Wn){return jn.apply(this,arguments)}}()),vn.next=6,Promise.all(qe);case 6:if(tn){vn.next=9;break}return vn.next=9,gt.submit();case 9:return ht=un.map(function(jn){return jn.name}),Tt=_e({filterByTk:Kt,field:It,form:gt,fieldNames:ht,getField:dn,resource:yt,actionFields:(we==null?void 0:we("form"))||[]}),on.data=It.data||{},on.data.loading=!0,vn.prev=13,vn.next=16,yt.update(n()(n()({filterByTk:Kt,values:n()(n()(n()({},Tt),jt),Ze)},Mt),{},{updateAssociationValues:Wt,triggerWorkflows:Zt!=null&&Zt.length?Zt.map(function(jn){return[jn.workflowKey,jn.context].filter(Boolean).join("!")}).join(","):void 0}));case 16:if(on.data.loading=!1,Be&&(Be==null||Be()),(ke==="previous"||!ke&&Qe!==!0)&&(kt==null||kt(!1)),qt==null||qt(!1),lt){vn.next=22;break}return vn.abrupt("return");case 22:ut?Ft.success({title:Yt(lt),onOk:function(){var jn=p()(v()().mark(function Hn(){return v()().wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:return Kn.next=2,gt.reset();case 2:(Qe&&!ke||ke==="redirect")&&Re&&((0,V.isURL)(Re)?window.location.href=Re:ln(Re));case 3:case"end":return Kn.stop()}},Hn)}));function Wn(){return jn.apply(this,arguments)}return Wn}()}):(L.ZP.success(Yt(lt)),(Qe&&!ke||ke==="redirect"||ke==="redirect")&&Re&&((0,V.isURL)(Re)?window.location.href=Re:ln(Re))),vn.next=28;break;case 25:vn.prev=25,vn.t0=vn.catch(13),on.data.loading=!1;case 28:case"end":return vn.stop()}},ze,null,[[13,25]])}))()}}},Ke=function(){var gt=(0,le.C)(),Kt=(0,le.BU)(),zt=Kt.resource,It=Kt.service,yt=Kt.block,Nt=Kt.__parent,wt=(0,F.XCj)(),kt=wt.setVisible,qt=wt.setSubmitted,Qt=(0,le.MM)(),ln=(0,a.useFieldSchema)();return{onClick:function(un,dn){return p()(v()().mark(function On(){var Yt,on,xn,Wt,et,Ft,Mt,xt,mt,At,we,Ie,Ee,Be;return v()().wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return xn=(Yt=ln==null?void 0:ln["x-action-settings"])!==null&&Yt!==void 0?Yt:{},Wt=xn.triggerWorkflows,tt.next=3,zt.destroy(n()({filterByTk:gt,triggerWorkflows:Wt!=null&&Wt.length?Wt.map(function(ot){return[ot.workflowKey,ot.context].filter(Boolean).join("!")}).join(","):void 0},Qt));case 3:et=(It==null||(on=It.data)===null||on===void 0?void 0:on.meta)||{},Ft=et.count,Mt=Ft===void 0?0:Ft,xt=et.page,mt=xt===void 0?0:xt,At=et.pageSize,we=At===void 0?0:At,Mt%we===1&&mt!==1&&It.run(n()(n()({},It==null||(Ie=It.params)===null||Ie===void 0?void 0:Ie[0]),{},{page:mt-1})),dn&&(dn==null||dn()),qt==null||qt(!0),yt&&yt!=="TableField"&&(Nt==null||(Ee=Nt.service)===null||Ee===void 0||(Be=Ee.refresh)===null||Be===void 0||Be.call(Ee),kt==null||kt(!1),qt==null||qt(!0));case 8:case"end":return tt.stop()}},On)}))()}}},Ue=function(gt){var Kt=(0,le.C)(),zt=(0,z.LY)(),It=zt.resource(gt,Kt);return{onClick:function(Nt){return p()(v()().mark(function wt(){return v()().wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,It.remove({values:[Nt.id]});case 2:case"end":return qt.stop()}},wt)}))()}}},Ye=function(){var gt=(0,le.C)(),Kt=(0,le.BU)(),zt=Kt.resource,It=Kt.service,yt=Kt.block,Nt=Kt.__parent,wt=(0,F.XCj)(),kt=wt.setVisible,qt=wt.setSubmitted,Qt=wt.setFormValueChanged;return{onClick:function(mn,un){return p()(v()().mark(function dn(){var On,Yt,on,xn,Wt,et,Ft,Mt,xt,mt,At;return v()().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return Ie.next=2,zt.remove({values:[gt]});case 2:Yt=(It==null||(On=It.data)===null||On===void 0?void 0:On.meta)||{},on=Yt.count,xn=on===void 0?0:on,Wt=Yt.page,et=Wt===void 0?0:Wt,Ft=Yt.pageSize,Mt=Ft===void 0?0:Ft,xn%Mt===1&&et!==1?It.run(n()(n()({},It==null||(xt=It.params)===null||xt===void 0?void 0:xt[0]),{},{page:et-1})):un&&(un==null||un()),qt==null||qt(!0),yt&&yt!=="TableField"&&(Nt==null||(mt=Nt.service)===null||mt===void 0||(At=mt.refresh)===null||At===void 0||At.call(mt),kt==null||kt(!1),Qt==null||Qt(!1));case 6:case"end":return Ie.stop()}},dn)}))()}}},Et=function(){var gt=(0,le.BU)(),Kt=gt.field,zt=(0,le.BU)(),It=zt.resource,yt=zt.service,Nt=(0,F.XCj)(),wt=Nt.setSubmitted,kt=(0,t.useCollection_deprecated)(),qt=kt.filterTargetKey;return{onClick:function(ln,mn){return p()(v()().mark(function un(){var dn,On,Yt,on,xn,Wt,et,Ft;return v()().wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:if(Wt=(dn=Kt.data)===null||dn===void 0?void 0:dn.selectedRowKeys,Array.isArray(qt)&&(Wt=Kt.data.selectedRowData.map(function(mt){var At={};return qt.map(function(we){At[we]=mt[we]}),At})),Kt!=null&&(On=Kt.data)!==null&&On!==void 0&&(On=On.selectedRowKeys)!==null&&On!==void 0&&On.length){xt.next=4;break}return xt.abrupt("return");case 4:return xt.next=6,It.destroy({filterByTk:Wt});case 6:Kt.data.selectedRowKeys=[],et=(Yt=yt.params[0])===null||Yt===void 0?void 0:Yt.page,Ft=(on=yt.data)===null||on===void 0||(on=on.meta)===null||on===void 0?void 0:on.totalPage,et===Ft&&yt.params[0]&&et!==1&&(yt.params[0].page=et-1),mn&&(mn==null||mn()),wt==null||wt(!0),yt==null||(xn=yt.refresh)===null||xn===void 0||xn.call(yt);case 13:case"end":return xt.stop()}},un)}))()}}},Lt=function(){var gt=(0,le.BU)(),Kt=gt.service;return{onClick:function(){return p()(v()().mark(function It(){var yt;return v()().wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:Kt==null||(yt=Kt.refresh)===null||yt===void 0||yt.call(Kt);case 1:case"end":return wt.stop()}},It)}))()}}},rt=function(){var gt,Kt,zt,It=(0,oe.nT)(),yt=((gt=It.service)===null||gt===void 0||(gt=gt.data)===null||gt===void 0||(gt=gt.meta)===null||gt===void 0?void 0:gt.count)||0,Nt=(Kt=It.service)===null||Kt===void 0||(Kt=Kt.data)===null||Kt===void 0||(Kt=Kt.meta)===null||Kt===void 0?void 0:Kt.page;if(!yt&&Nt){var wt,kt;return{simple:!0,current:((wt=It.service)===null||wt===void 0||(wt=wt.data)===null||wt===void 0||(wt=wt.meta)===null||wt===void 0?void 0:wt.page)||1,pageSize:1,showSizeChanger:!1,onChange:function(Qt){return p()(v()().mark(function ln(){var mn,un;return v()().wrap(function(On){for(;;)switch(On.prev=On.next){case 0:un=(mn=It.service)===null||mn===void 0||(mn=mn.params)===null||mn===void 0?void 0:mn[0],It.service.run(n()(n()({},un),{},{page:Qt}));case 2:case"end":return On.stop()}},ln)}))()},style:{marginTop:24,textAlign:"center"},showTotal:!1,showTitle:!1,total:(kt=It.service)!==null&&kt!==void 0&&(kt=kt.data)!==null&&kt!==void 0&&(kt=kt.data)!==null&&kt!==void 0&&kt.length?1*Nt+1:1*Nt,className:(0,r.css)(ve||(ve=i()([`
|
|
54
54
|
.ant-pagination-simple-pager {
|
|
55
55
|
display: none !important;
|
|
@@ -789,7 +789,7 @@ https://requirejs.org/docs/errors.html#`+Ne);return l.requireType=Ne,l.requireMo
|
|
|
789
789
|
border-top-color: transparent;
|
|
790
790
|
}
|
|
791
791
|
background-color: transparent;
|
|
792
|
-
`])))},Oe),{},{component:F.II.JSON}))}var he=e(57340),re=(0,l.createContext)([]);re.displayName="VariableScopeContext";function de(Oe){var Me=Oe.scope,Te=Me===void 0?[]:Me,ge=Oe.children;return(0,te.jsx)(re.Provider,{value:Te,children:ge})}function _e(){return(0,l.useContext)(re)}function Ae(){return null}Ae.Input=(0,w.connect)(We),Ae.TextArea=(0,G.t)((0,w.connect)(he.K,(0,w.mapReadPretty)(he.K.ReadPretty))),Ae.RawTextArea=(0,w.connect)(ye.f),Ae.JSON=(0,w.connect)(xe);var Fe=null},88969:function(Ne,ae,e){"use strict";e.d(ae,{m:function(){return y}});var w=e(15009),l=e.n(w),G=e(19632),i=e.n(G),x=e(99289),C=e.n(x),O=e(5574),o=e.n(O),k=e(97133),v=e(38089),j=e(67294),p=e(26793),M=e(46917),n=e(9783),b=e.n(n),N=(0,M.l6)("nb-variable-select",function(V){var Y=V.componentCls;return b()({},Y,{position:"relative",".ant-select.ant-cascader":{position:"absolute",top:"-1px",right:"-1px",minWidth:"auto",width:"calc(100% + 2px)",height:"calc(100% + 2px)",overflow:"hidden",opacity:0},".variable-btn":{fontStyle:"italic",fontFamily:"'New York', 'Times New Roman', Times, serif"},".Cascader-popupClassName":{".ant-cascader-menu":{marginBottom:0}}})}),r=N,a=e(2876),A=e(85893);function y(V){var Y=V.options,L=V.setOptions,h=V.onInsert,B=V.changeOnSelect,g=B===void 0?!1:B,S=V.fieldNames,m=S===void 0?{}:S,D=V.className,E=V.disabled,u=(0,p.$)(),d=u.t,c=(0,j.useState)([]),f=o()(c,2),z=f[0],T=f[1],W=r(),t=W.wrapSSR,I=W.componentCls,H=W.hashId,K=(0,M.dQ)(),U=K.token;function F(q){return te.apply(this,arguments)}function te(){return te=C()(l()().mark(function q(J){var Z,P;return l()().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(P=J[J.length-1],!(!((Z=P.children)!==null&&Z!==void 0&&Z.length)&&!P.isLeaf&&P.loadChildren)){le.next=5;break}return le.next=4,P.loadChildren(P);case 4:L(function(Q){return i()(Q)});case 5:case"end":return le.stop()}},q)})),te.apply(this,arguments)}return t((0,A.jsx)(a.R,{disabled:E,className:(0,k.cx)("x-button",I,H,D),children:(0,A.jsx)(v.Z,{disabled:E,placeholder:d("Select a variable"),value:[],options:Y,fieldNames:m,loadData:F,onChange:function(){var J,Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(T(Z),!!Z.length){var X=P[P.length-1];(!(X!=null&&(J=X.children)!==null&&J!==void 0&&J.length)&&!(X!=null&&X.loadChildren)||X!=null&&X.isLeaf)&&h(Z)}},changeOnSelect:g,onClick:function(J){if(!(J.detail!==2||!g))for(var Z=J.target;Z&&Z!==J.currentTarget;Z=Z.parentNode){var P;Array.from((P=Z.classList)!==null&&P!==void 0?P:[]).includes("ant-cascader-menu-item")&&h(z)}},popupClassName:"Cascader-popupClassName",dropdownRender:g?function(q){return(0,A.jsxs)(A.Fragment,{children:[q,(0,A.jsx)("div",{style:{padding:"0.5em",borderTop:"1px solid ".concat(U.colorBorder),color:U.colorTextDescription},children:d("Double click to choose entire object")})]})}:null})}))}},2876:function(Ne,ae,e){"use strict";e.d(ae,{R:function(){return C}});var w=e(97857),l=e.n(w),G=e(15867),i=e(67294),x=e(85893),C=(0,i.forwardRef)(function(O,o){var k=(0,i.useMemo)(function(){return{fontStyle:"italic",fontFamily:"New York, Times New Roman, Times, serif"}},[]);return(0,x.jsxs)(G.ZP,l()(l()({"aria-label":"variable-button",ref:o,style:k},O),{},{children:["x",O.children]}))});C.displayName="XButton"},74866:function(Ne,ae,e){"use strict";e.d(ae,{y:function(){return i}});var w=e(9783),l=e.n(w),G=e(46917),i=(0,G.l6)("nb-variable",function(x,C){var O=x.componentCls,o=x.lineWidth,k=x.colorFillQuaternary,v=x.paddingSM-1,j=8,p=j-o,M=x.fontSizeSM,n="".concat(x.lineHeightSM*M,"px"),b=k;return l()({},O,{width:"auto",display:"flex","&.ant-input-group-compact":{display:"flex"},".ant-input-disabled":{".ant-tag":{color:"#bfbfbf",borderColor:"#d9d9d9"}},".ant-input.null-value":{width:"4em",minWidth:"4em"},".ant-formily-item .ant-formily-item-control .ant-formily-item-control-content .ant-formily-item-control-content-component":{lineHeight:"normal"},".ant-formily-item":{marginBottom:0},".ant-input":C!=null&&C.hideVariableButton?{}:{borderTopRightRadius:0,borderBottomRightRadius:0},".ant-tag":{display:"inline-block",height:"auto",marginInlineEnd:x.marginXS,paddingInline:p,fontSize:M,lineHeight:n,whiteSpace:"nowrap",background:b,border:"".concat(x.lineWidth,"px ").concat(x.lineType," ").concat(x.colorBorder),borderRadius:x.borderRadiusSM,opacity:1,transition:"all ".concat(x.motionDurationMid),textAlign:"start"},".ant-tag-blue":{color:x.colorPrimaryText,background:x.colorPrimaryBg,borderColor:x.colorPrimaryBorder},".clear-button":{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:v,zIndex:1,display:"none",width:x.fontSizeIcon,height:x.fontSizeIcon,marginTop:-x.fontSizeIcon/2,color:x.colorTextQuaternary,fontSize:x.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:x.colorBgContainer,cursor:"pointer",opacity:.8,transition:"color ".concat(x.motionDurationMid," ease, opacity ").concat(x.motionDurationSlow," ease"),textRendering:"auto",userSelect:"none","&:before":{display:"block"},"&:hover":{color:x.colorTextTertiary}},".ant-btn":{height:"auto"},".variable":{flex:1}})})},72724:function(Ne,ae,e){"use strict";e.d(ae,{L:function(){return M}});var w=e(97857),l=e.n(w),G=e(5574),i=e.n(G),x=e(23861),C=e(67294),O=e(26793),o=e(21143),k=e(84577),v=e(85893),j=function(b){var N=(0,k.ng)(),r=N.refresh,a=(0,o.useAPIClient)(),A=(0,O.$)(),y=A.t;return(0,C.useCallback)(function(V){var Y,L,h,B,g,S,m,D,E=V.active,u=V.over,d=E==null||(Y=E.data)===null||Y===void 0||(Y=Y.current)===null||Y===void 0?void 0:Y.schema,c=u==null||(L=u.data)===null||L===void 0||(L=L.current)===null||L===void 0?void 0:L.schema,f=u==null||(h=u.data)===null||h===void 0||(h=h.current)===null||h===void 0?void 0:h.insertAdjacent,z=u==null||(B=u.data)===null||B===void 0||(B=B.current)===null||B===void 0?void 0:B.breakRemoveOn,T=u==null||(g=u.data)===null||g===void 0||(g=g.current)===null||g===void 0?void 0:g.wrapSchema,W=u==null||(S=u.data)===null||S===void 0||(S=S.current)===null||S===void 0?void 0:S.onSuccess,t=(m=u==null||(D=u.data)===null||D===void 0||(D=D.current)===null||D===void 0?void 0:D.removeParentsIfNoChildren)!==null&&m!==void 0?m:!0;if(!d||!c){b==null||b(V);return}if(d===c){b==null||b(V);return}if(d.parent===c&&f==="beforeEnd"){b==null||b(V);return}var I=(0,k.Pl)({t:y,api:a,refresh:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=K.refreshParentSchema,F=U===void 0?!0:U;return r({refreshParentSchema:F})},current:c});if(I.loadAPIClientEvents(),d.parent===c.parent){I.insertBeforeBeginOrAfterEnd(d),b==null||b(V);return}if(f){I.insertAdjacent(f,d,{wrap:T,breakRemoveOn:z,removeParentsIfNoChildren:t,onSuccess:W}),b==null||b(V);return}},[a,b,r,y])},p=C.memo(function(n){var b=(0,O.$)(),N=b.t,r=(0,C.useState)(!0),a=i()(r,2),A=a[0],y=a[1],V=(0,C.useCallback)(function(L){var h,B=L.active,g=B==null||(h=B.data)===null||h===void 0||(h=h.current)===null||h===void 0?void 0:h.schema;if(y(!!g),n!=null&&n.onDragStart){var S;n==null||(S=n.onDragStart)===null||S===void 0||S.call(n,L)}},[n==null?void 0:n.onDragStart]),Y=j(n==null?void 0:n.onDragEnd);return(0,v.jsxs)(x.DndContext,l()(l()({collisionDetection:x.rectIntersection},n),{},{onDragStart:V,onDragEnd:Y,children:[(0,v.jsx)(x.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:A&&(0,v.jsx)("span",{style:{whiteSpace:"nowrap"},children:N("Dragging")})}),n.children]}))});p.displayName="InternalDndContext";var M=function(b){return(0,v.jsx)(p,l()({},b))}},14896:function(Ne,ae,e){"use strict";e.r(ae),e.d(ae,{DndContext:function(){return w.L},DragHandler:function(){return l.IW},DraggableContext:function(){return l.LC},ShowFormData:function(){return C},Sortable:function(){return l.bt},SortableContext:function(){return l.Fo},SortableItem:function(){return l.TR},SortableProvider:function(){return l.OR},getRenderContent:function(){return O.I9}});var w=e(72724),l=e(20493),G=e(67294),i=e(80844),x=e(85893),C=(0,i.observer)(function(o){var k=o.children,v=(0,i.useForm)();return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("pre",{style:{marginBottom:20},"data-testid":"form-data",children:JSON.stringify(v.values,null,2)}),k]})}),O=e(7840)},20493:function(Ne,ae,e){"use strict";e.d(ae,{IW:function(){return S},LC:function(){return a},bt:function(){return Y},Fo:function(){return A},TR:function(){return g},OR:function(){return y}});var w=e(97857),l=e.n(w),G=e(13769),i=e.n(G),x=e(10274),C=e(23861),O=e(97133),o=e(80844),k=e(96486),v=e.n(k),j=e(67294),p=e(46917),M=e(84577),n=e(85893),b=["component","overStyle","style","children","openMode"],N=["schema","id","eid","removeParentsIfNoChildren"],r=["component"],a=(0,j.createContext)(null);a.displayName="DraggableContext";var A=(0,j.createContext)(null);A.displayName="SortableContext";var y=function(D){var E=D.id,u=D.data,d=D.children,c=(0,C.useDraggable)({id:E,data:u}),f=(0,C.useDroppable)({id:E,data:u}),z=(0,j.useMemo)(function(){return{draggable:c,droppable:f}},[c,f]);return(0,n.jsx)(A.Provider,{value:z,children:d})},V=function(D){return new x.C(D).setAlpha(.15).toHex8String()},Y=function(D){var E,u,d=D.component,c=D.overStyle,f=D.style,z=D.children,T=D.openMode,W=i()(D,b),t=(0,p.dQ)(),I=t.token,H=(0,j.useContext)(A),K=H.draggable,U=H.droppable,F=U.isOver,te=U.setNodeRef,q=l()({},f),J=(0,o.useFieldSchema)(),Z=(J==null?void 0:J["x-component"])==="Action.Link"||d==="a";return F&&(K==null||(E=K.active)===null||E===void 0?void 0:E.id)!==(U==null||(u=U.over)===null||u===void 0?void 0:u.id)&&(q[Z?"color":"background"]=V(I.colorSettings),Object.assign(q,c)),j.createElement(d||"div",l()(l()({role:"none"},W),{},{className:(0,O.cx)("nb-sortable-designer",D.className),ref:te,style:q,setNodeRef:te}),z)},L=function(D){var E=h(D),u=(0,o.useFieldSchema)();return D.schema?l()(l()({},D),{},{id:E}):l()(l()({},D),{},{id:E,schema:u})},h=function(D){var E,u=(0,o.useField)();return D.id?D.id:(E=u.address)===null||E===void 0?void 0:E.toString()},B=(0,o.observer)(function(m){var D=L(m),E=D.schema,u=D.id,d=D.eid,c=D.removeParentsIfNoChildren,f=i()(D,N),z=(0,j.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:E,removeParentsIfNoChildren:c??!0}},[E,c]);return(0,n.jsx)(y,{id:u,data:z,children:(0,n.jsx)(Y,l()(l()({id:d},f),{},{children:m.children}))})},{displayName:"InternalSortableItem"}),g=j.memo(function(m){var D=m.component,E=i()(m,r),u=(0,M.ng)(),d=u.designable;return d?(0,n.jsx)(B,l()({},m)):j.createElement(D||"div",v().omit(E,["children","schema","overStyle","openMode","id","eid","removeParentsIfNoChildren"]),m.children)});g.displayName="SortableItem";var S=function(D){var E=(0,j.useContext)(A)||{},u=E.draggable;if(!u)return null;var d=u.attributes,c=u.listeners,f=u.setNodeRef;return(0,n.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,n.jsx)("div",l()(l()(l()({ref:f,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},c),d),{},{role:"none",children:(0,n.jsx)("span",{style:{cursor:"move",fontSize:14},children:D.children})}))})}},7840:function(Ne,ae,e){"use strict";e.d(ae,{I9:function(){return S},Rq:function(){return Y},e7:function(){return y},jC:function(){return h},od:function(){return V}});var w=e(97857),l=e.n(w),G=e(15009),i=e.n(G),x=e(9783),C=e.n(x),O=e(5574),o=e.n(O),k=e(99289),v=e.n(k),j=e(52677),p=e.n(j),M=e(84157),n=e(96486),b=e.n(n),N=e(10097),r=e(76690),a=e(65565),A=e(61341),y=function(E,u){var d,c=/{{(.*?)}}/,f=E==null||(d=E.match)===null||d===void 0?void 0:d.call(E,c);if(f){var z=b().get(u,f[1]);return b().isFunction(z)?z():z}else return E};function V(D){if(p()(D)!=="object"||D===null)return null;for(var E in D)if(Object.prototype.hasOwnProperty.call(D,E))return Object.prototype.toString.call(D[E])==="[object Object]"&&D[E]!==null?V(D[E]):{key:E,value:D[E]};return null}var Y=function(E){var u=L(E),d=(0,n.findIndex)(u,function(f,z,T){if(f.includes("$")&&z>0)return!0}),c=u.slice(0,d);return c};function L(D){var E=[];function u(d){Object.keys(d).sort().forEach(function(c){E.push(c),d[c]&&p()(d[c])==="object"&&u(d[c])})}return u(D),E}var h=function(){var D=v()(i()().mark(function E(u,d){var c,f,z,T,W,t,I;return i()().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return c=u.ruleGroup,f=u.variables,z=u.localVariables,T=u.variableNameOfLeftCondition,W=Object.keys(c)[0]||"$and",t=c[W],I=t.map(function(){var U=v()(i()().mark(function F(te){var q,J,Z,P,X,le,Q,oe,Ce,se,De,We,ye,ve;return i()().wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(!("$and"in te||"$or"in te)){he.next=4;break}return he.next=3,h({ruleGroup:te,variables:f,localVariables:z},d);case 3:return he.abrupt("return",he.sent);case 4:if(q=V(te),J=q==null?void 0:q.key,J){he.next=8;break}return he.abrupt("return",!0);case 8:return Z=B(Y(te),T),P=f.parseVariable(Z,z,{doNotRequest:!0}).then(function(re){var de=re.value;return de}),X=(0,r.cG)(q==null?void 0:q.value)?[f.parseVariable(q==null?void 0:q.value,z).then(function(re){var de=re.value;return de}),P]:[q==null?void 0:q.value,P],he.prev=11,he.next=14,Promise.all(X);case 14:return le=he.sent,Q=o()(le,2),oe=Q[0],Ce=Q[1],he.next=20,f.getCollectionField(Z,z);case 20:return se=he.sent,De=(0,a.J)(Ce,{targetCollectionField:se}),We=(0,a.J)(oe,{targetCollectionField:se}),se!=null&&se.type&&["datetime","date","datetimeNoTz","dateOnly","unixTimestamp"].includes(se.type)&&De&&(ye=(0,A.CE)(We),ve=(0,M.getPickerFormat)(ye),De=(0,M.dayjs)(De).format(ve)),he.abrupt("return",d.apply(C()({},J,[De,We])));case 27:throw he.prev=27,he.t0=he.catch(11),he.t0;case 30:case"end":return he.stop()}},F,null,[[11,27]])}));return function(F){return U.apply(this,arguments)}}()),K.next=6,Promise.all(I);case 6:if(I=K.sent,W!=="$and"){K.next=11;break}return K.abrupt("return",(0,n.every)(I,function(U){return U}));case 11:if(!I.length){K.next=13;break}return K.abrupt("return",(0,n.some)(I,function(U){return U}));case 13:return K.abrupt("return",!0);case 14:case"end":return K.stop()}},E)}));return function(u,d){return D.apply(this,arguments)}}();function B(D){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(E,".").concat(D.join(".")," }}")}var g=function(E){var u={};return E.map(function(d){u[d.name]=d.ctx}),u};function S(D,E,u,d,c){return m.apply(this,arguments)}function m(){return m=v()(i()().mark(function D(E,u,d,c,f){var z,T,W,t,I,H,K,U,F;return i()().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(!(u&&E==="handlebars")){q.next=19;break}return q.prev=1,W=M.Handlebars.compile(u),t=g(c),I=(d==null||(z=d.ctxRef)===null||z===void 0?void 0:z.current)||{},H=I.$nDate,K={},Object.keys(H||{}).map(function(J){K[J]=H[J]()}),U=W(l()(l()(l()({},d==null||(T=d.ctxRef)===null||T===void 0?void 0:T.current),t),{},{$nDate:K})),q.next=10,f(U);case 10:return q.abrupt("return",q.sent);case 13:return q.prev=13,q.t0=q.catch(1),console.log(q.t0),q.abrupt("return",u);case 17:q.next=32;break;case 19:return q.prev=19,q.next=22,(0,N.replaceVariableValue)(u,d,c);case 22:return F=q.sent,q.next=25,f(F);case 25:return q.abrupt("return",q.sent);case 28:return q.prev=28,q.t1=q.catch(19),console.log(q.t1),q.abrupt("return",u);case 32:case"end":return q.stop()}},D,null,[[1,13],[19,28]])})),m.apply(this,arguments)}},25145:function(Ne,ae,e){"use strict";e.d(ae,{u:function(){return Y}});var w=e(5574),l=e.n(w),G=e(97857),i=e.n(G),x=e(13769),C=e.n(x),O=e(80844),o=e(96486),k=e(67294),v=e(62954),j=e(75585),p=e(22891),M={type:"void","x-component":"Action.Container","x-action":"view",title:'{{ t("View record") }}',"x-component-props":{className:"nb-action-popup"},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab",properties:{tab1:{type:"void",title:'{{t("Details")}}',"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"popup:common:addBlock",properties:{}}}}}}}},n=e(94804),b=e(57105),N=e(73691),r=e(85893),a=["WrappedComponent"],A=function(){var h=(0,O.useFieldSchema)(),B=(0,v.ngQ)(),g=B.insertAfterBegin,S=(0,k.useCallback)(function(m){var D=h.reduceProperties(function(E,u){return u["x-component"]==="Action.Container"?u:E},null);D||g((0,o.cloneDeep)(m))},[h,g]);return S},y=function(h){return h["x-component"]==="Action.Container"},V=function(h){var B=h.WrappedComponent,g=C()(h,a),S=(0,O.useFieldSchema)(),m=(0,p.ES)(),D=m.openPopup,E=(0,k.useRef)(!1),u=A(),d=(0,k.useRef)(S);d.current=S;var c=(0,k.useCallback)(function(){return d.current},[]),f=(0,k.useCallback)(function(){S.properties||(u(M),E.current=!0),E.current?(setTimeout(function(){D({customActionSchema:c()})}),E.current=!1):S.properties&&D()},[S,u,D,c]);return(0,r.jsx)("a",{onClick:f,children:(0,r.jsx)(B,i()({},g))})};function Y(L){return function(h){var B=(0,k.useState)(!1),g=l()(B,2),S=g[0],m=g[1],D=(0,k.useState)(!1),E=l()(D,2),u=E[0],d=E[1],c=(0,n.Kx)(),f=(0,v.XCj)(),z=(0,O.useField)(),T=(0,O.useFieldSchema)(),W=(T==null?void 0:T["x-component-props"])||{},t=W.enableLink,I=W.openMode,H=W.openSize,K=(0,p.ES)(),U=K.visibleWithURL,F=K.setVisibleWithURL,te=(0,k.useCallback)(function(Z){m==null||m(Z),F==null||F(Z)},[F]),q=(0,k.useRef)(T);q.current=T;var J=f.setSubmitted;return t?(0,r.jsx)(j.OA,{visible:!1,children:(0,r.jsxs)(v.EIK,{button:(0,r.jsx)(L,i()({},h)),visible:S||U,setVisible:te,formValueChanged:u,setFormValueChanged:d,openMode:I,openSize:H,containerRefKey:"field-popup",fieldSchema:T,setSubmitted:J,children:[(0,r.jsx)(n.YQ,{name:c.name,children:(0,r.jsx)(v.G0E,{children:(0,r.jsx)(N.Rm,{children:(0,r.jsx)(b.sq,{onlyRenderProperties:!0,basePath:z==null?void 0:z.address,schema:T,filterProperties:y})})})}),(0,r.jsx)(V,i()(i()({},h),{},{WrappedComponent:L}))]})}):(0,r.jsx)(L,i()({},h))}}},61736:function(Ne,ae,e){"use strict";e.d(ae,{D:function(){return l}});var w=e(67294),l=(0,w.createContext)({});l.displayName="SchemaComponentContext.Provider"},44245:function(Ne,ae,e){"use strict";e.d(ae,{R:function(){return n}});var w=e(97857),l=e.n(w),G=e(13769),i=e.n(G),x=e(86201),C=e(80844),O=e(67294),o=e(47844),k=e(85893),v=["children","form"],j=["children"],p=function(N){var r=N.children,a=N.form,A=i()(N,v),y=(0,O.useContext)(C.SchemaOptionsContext),V=(0,O.useContext)(C.SchemaExpressionScopeContext),Y=l()(l()({},y==null?void 0:y.scope),V),L=l()({},y==null?void 0:y.components);return(0,k.jsx)(C.FormProvider,l()(l()({},A),{},{form:a,children:(0,k.jsx)(o.G,{components:L,scope:Y,children:r})}))},M=function(N){var r=N.children,a=i()(N,j),A=(0,O.useContext)(C.SchemaOptionsContext),y=(0,O.useContext)(C.SchemaExpressionScopeContext),V=l()(l()({},A==null?void 0:A.scope),y),Y=l()({},A==null?void 0:A.components),L=(0,O.useMemo)(function(){return(0,x.createForm)()},[]);return(0,k.jsx)(C.FormProvider,l()(l()({},a),{},{form:L,children:(0,k.jsx)(o.G,{components:Y,scope:V,children:r})}))},n=function(N){return N.form?(0,k.jsx)(p,l()({},N)):(0,k.jsx)(M,l()({},N))}},93587:function(Ne,ae,e){"use strict";e.d(ae,{m:function(){return r}});var w=e(97857),l=e.n(w),G=e(86201),i=e(80844),x=e(57953),C=e(67294),O=e(54195),o=e(21044),k=e(84577),v=e(44245),j=e(93323),p=e(12174),M=function(A){var y=A.uid,V=A.type,Y=V===void 0?"getJsonSchema":V,L=A.onSuccess,h={url:"/uiSchemas:".concat(Y,"/").concat(y)},B=(0,p.QT)(h,{refreshDeps:[y],onSuccess:function(D){L&&L(D)}}),g=B.data,S=B.loading;return{schema:g==null?void 0:g.data,loading:S}},n=e(85893),b=function(A){return A},N=function(A){var y=A.noForm,V=A.onlyRenderProperties,Y=A.hidden,L=A.scope,h=A.uid,B=A.components,g=A.onSuccess,S=A.NotFoundPage,m=A.schemaTransform,D=m===void 0?b:m,E=A.onPageNotFind,u=V?"getProperties":"getJsonSchema",d=(0,C.useMemo)(function(){return(0,G.createForm)()},[h]),c=M({uid:h,type:u,onSuccess:function(H){g&&g(H)}}),f=c.schema,z=c.loading,T=(0,k.Co)(S),W=(0,O.Kk)(),t=(0,i.useFieldSchema)();return W||z||Y?(0,n.jsx)(x.Z,{style:{width:"100%",marginTop:20},delay:o.fw}):!f||Object.keys(f).length===0?(E&&E(),T?(0,n.jsx)(T,{}):null):y?(0,n.jsx)(j.n,{components:B,scope:L,schema:D(f||{}),parentSchema:t}):(0,n.jsx)(v.R,{form:d,children:(0,n.jsx)(j.n,{components:B,scope:L,schema:D(f||{}),parentSchema:t})})},r=(0,C.memo)(function(a){return a.uid?(0,n.jsx)(N,l()({},a)):null});r.displayName="RemoteSchemaComponent"},93323:function(Ne,ae,e){"use strict";e.d(ae,{A:function(){return y},n:function(){return L}});var w=e(97857),l=e.n(w),G=e(13769),i=e.n(G),x=e(9783),C=e.n(x),O=e(80844),o=e(96486),k=e.n(o),v=e(67294),j=e(57105),p=e(61736),M=e(47844),n=e(85893),b=["components","scope","schema","distributed","onChange","parentSchema"],N=["schema","parentSchema"],r=["memoized"];function a(h){return O.Schema.isSchemaInstance(h)?h:h!=null&&h.name?new O.Schema({type:"object",properties:C()({},h.name,h),name:"p_".concat(h.name)}):new O.Schema(h)}var A=function(B){return(0,v.useMemo)(function(){return a(B)},[])},y=(0,v.createContext)({onChange:k().noop}),V=(0,v.memo)(function(h){var B=h.components,g=h.scope,S=h.schema,m=h.distributed,D=h.onChange,E=h.parentSchema,u=i()(h,b),d=(0,v.useContext)(p.D),c=(0,v.useMemo)(function(){return a(S)},[S]),f=(0,v.useMemo)(function(){return l()(l()({},d),{},{distributed:d.distributed==!1?!1:m,refresh:d.refresh||k().noop})},[d,m]),z=(0,v.useContext)(y),T=z.onChange,W=(0,v.useMemo)(function(){return{onChange:function(){D==null||D(c),T==null||T()}}},[D,T,c]);return(0,n.jsx)(y.Provider,{value:W,children:(0,n.jsx)(p.D.Provider,{value:f,children:(0,n.jsx)(M.G,{inherit:!0,components:B,scope:g,children:(0,n.jsx)(j.sq,l()(l()({},u),{},{schema:c,isUseFormilyField:!0,parentSchema:E}))})})})});V.displayName="RecursionSchemaComponent";var Y=(0,v.memo)(function(h){var B=h.schema,g=h.parentSchema,S=i()(h,N),m=A(B);return(0,n.jsx)(V,l()(l()({},S),{},{schema:m,parentSchema:g}))});Y.displayName="MemoizedSchemaComponent";var L=(0,v.memo)(function(h){var B=h.memoized,g=i()(h,r);return B?(0,n.jsx)(Y,l()({},g)):(0,n.jsx)(V,l()({},g))});L.displayName="SchemaComponent"},47844:function(Ne,ae,e){"use strict";e.d(ae,{B:function(){return C},G:function(){return O}});var w=e(97857),l=e.n(w),G=e(80844),i=e(67294),x=e(85893),C=function(){var k=(0,i.useContext)(G.SchemaOptionsContext);return k||{}},O=(0,i.memo)(function(o){var k=o.children,v=C(),j=(0,i.useMemo)(function(){return l()(l()({},v.components),o.components)},[v.components,o.components]),p=(0,i.useMemo)(function(){return l()(l()({},v.scope),o.scope)},[v.scope,o.scope]),M=(0,i.useMemo)(function(){return{scope:p,components:j}},[p,j]);return(0,x.jsx)(G.SchemaOptionsContext.Provider,{value:M,children:(0,x.jsx)(G.SchemaComponentsContext.Provider,{value:j,children:(0,x.jsx)(G.ExpressionScope,{value:p,children:k})})})});O.displayName="SchemaComponentOptions"},70993:function(Ne,ae,e){"use strict";e.d(ae,{_b:function(){return h},RV:function(){return B.R},m1:function(){return g.m},n6:function(){return S.n},AT:function(){return S.A},G0:function(){return m.G},a$:function(){return te},Tz:function(){return U},Bs:function(){return m.B}});var w=e(15009),l=e.n(w),G=e(99289),i=e.n(G),x=e(12444),C=e.n(x),O=e(72004),o=e.n(O),k=e(31996),v=e.n(k),j=e(26037),p=e.n(j),M=e(18205),n=e(83062),b=e(15867),N=e(67294),r=e(49218),a=e(26793),A=e(62954),y=e(68230),V=e(85893),Y={backgroundColor:"var(--colorSettings) !important"},L={backgroundColor:"transparent"},h=function(){var Z=(0,A.ngQ)(),P=Z.designable,X=Z.setDesignable,le=(0,a.$)(),Q=le.t,oe=(0,y.d)(),Ce=oe.token,se=P?Y:L;return(0,r.y1)("Ctrl+Shift+U",function(){return X(!P)},[P]),(0,V.jsx)(n.Z,{title:Q("UI Editor"),children:(0,V.jsx)(b.ZP,{"data-testid":"ui-editor-button",icon:(0,V.jsx)(M.Z,{style:{color:Ce.colorTextHeaderMenu}}),title:Q("UI Editor"),style:se,onClick:function(){X(!P)}})})},B=e(44245),g=e(93587),S=e(93323),m=e(47844),D=e(97857),E=e.n(D),u=e(5574),d=e.n(u),c=e(86201),f=e(80844),z=e(84327),T=e(96486),W=e.n(T),t=e(61736),I=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(Z).concat((0,z.uid)())};f.Schema.silent(!0);var H={},K={silent:!0,compile:function(Z){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=function(){if(K.silent)try{return new Function("$root","with($root) { return (".concat(Z,"); }"))(P)}catch{return"{{".concat(Z,"}}")}else return new Function("$root","with($root) { return (".concat(Z,"); }"))(P)};return H[Z]?H[Z]:Z.trim().startsWith("t(")?(H[Z]=X(),H[Z]):X()}};f.Schema.registerCompiler(K.compile);var U=function(Z){var P=Z.designable,X=Z.onDesignableChange,le=Z.components,Q=Z.children,oe=(0,N.useContext)(t.D),Ce=(0,m.B)(),se=(0,N.useState)(function(){return(0,z.uid)()}),De=d()(se,2),We=De[0],ye=De[1],ve=(0,N.useMemo)(function(){return Z.form||(0,c.createForm)()},[We]),xe=(0,a.$)(),he=xe.t,re=(0,N.useMemo)(function(){return E()(E()({},Z.scope),{},{t:he,randomString:I})},[Z.scope,he,Ce==null?void 0:Ce.scope]),de=(0,N.useState)(P),_e=d()(de,2),Ae=_e[0],Fe=_e[1],Oe=(0,N.useMemo)(function(){return typeof P=="boolean"?P:Ae},[P,Ae,oe.designable]),Me=(0,N.useMemo)(function(){return function(ie){typeof Oe!="boolean"&&Fe(ie),X==null||X(ie)}},[Oe,X]),Te=(0,N.useCallback)(function(){ye((0,z.uid)())},[]),ge=(0,N.useMemo)(function(){return{scope:re,components:le,reset:Te,refresh:W().noop,designable:Oe,setDesignable:Me}},[le,Oe,Te,re,Me]);return(0,V.jsx)(t.D.Provider,{value:ge,children:(0,V.jsx)(f.FormProvider,{form:ve,children:(0,V.jsx)(m.G,{inherit:!0,scope:re,components:le,children:Q})})})};U.displayName="SchemaComponentProvider";var F=e(31601),te=function(J){v()(P,J);var Z=p()(P);function P(){return C()(this,P),Z.apply(this,arguments)}return o()(P,[{key:"load",value:function(){var X=i()(l()().mark(function Q(){return l()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:this.addComponents();case 1:case"end":return Ce.stop()}},Q,this)}));function le(){return X.apply(this,arguments)}return le}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:h})}}]),P}(F.S),q=null},84577:function(Ne,ae,e){"use strict";e.d(ae,{zz:function(){return O.zz},Pl:function(){return O.Pl},oB:function(){return O.oB},lI:function(){return l},hi:function(){return V.hi},eJ:function(){return G.e},Co:function(){return C},aZ:function(){return V.aZ},ng:function(){return O.ng},et:function(){return o.e},cL:function(){return N},fd:function(){return Y},Cl:function(){return j},vH:function(){return A},sR:function(){return O.sR},wN:function(){return y.w},Dm:function(){return M},fM:function(){return V.fM}});var w=e(67294),l=function(h){var B=(0,w.useRef)(null);return(0,w.useEffect)(function(){return B.current&&h!==B.current&&B.current.onUnmount(),B.current=h,h.onMount(),function(){h.onUnmount()}},[h]),h},G=e(96365),i=e(80844),x=e(96486),C=function(h,B){var g=(0,w.useContext)(i.SchemaOptionsContext),S=g.components;return h?typeof h!="string"?h:(0,x.get)(S,h)||B:B},O=e(94516),o=e(98146),k=e(97857),v=e.n(k),j=function(h){var B=(0,w.useContext)(i.SchemaOptionsContext),g=(0,w.useContext)(i.SchemaExpressionScopeContext),S=(0,w.useRef)();return S.current=g,h.toFieldProps(v()(v()({},B),{},{get scope(){return v()(v()({},B.scope),S.current)}}))},p=e(61736);function M(){return(0,w.useContext)(p.D)}var n=e(26793),b=e(6145),N=function(){var h,B=(0,b.useCollectionManager_deprecated)(),g=B.getCollectionJoinField,S=B.getCollection,m=(0,i.useFieldSchema)(),D=(0,b.useCollection_deprecated)(),E=D.getField,u=E(m.name)||g(m["x-collection-field"]),d=(0,n.$)(),c=d.t,f=((h=m["x-component-props"])===null||h===void 0?void 0:h.fieldNames)||{},z=f.label,T=(0,w.useMemo)(function(){if(!(!u||!(u!=null&&u.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(u.interface)){var W=S(u.target);if((W==null?void 0:W.template)==="file")return[{label:c("Record picker"),value:"CollectionField"},{label:c("Select"),value:"AssociationSelect"}];switch(u.interface){case"o2m":return[{label:c("Record picker"),value:"CollectionField"},{label:c("Subtable"),value:"TableField"},{label:c("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:c("Record picker"),value:"CollectionField"},{label:c("Select"),value:"AssociationSelect"}];default:return[{label:c("Record picker"),value:"CollectionField"},{label:c("Subform"),value:"FormField"},{label:c("Select"),value:"AssociationSelect"}]}}},[c,u==null?void 0:u.interface,z]);return T},r=e(35746),a=e(58837),A=function(){var h,B=(0,i.useField)(),g=(0,i.useFieldSchema)(),S=(0,a.Kx)(),m=(0,r.d9)(),D=(S==null?void 0:S.getField(g.name))||(m==null?void 0:m.getCollectionField(g["x-collection-field"])),E=(0,G.e)();(0,w.useEffect)(function(){if(!(B!=null&&B.title)){var u;B.title=E(D==null||(u=D.uiSchema)===null||u===void 0?void 0:u.title)}},[D==null||(h=D.uiSchema)===null||h===void 0?void 0:h.title])},y=e(9780),V=e(18686),Y=function(h){var B,g=(0,n.$)(),S=g.t,m=(0,b.useCollectionManager_deprecated)(),D=m.getCollectionJoinField,E=m.getCollection,u=(0,i.useFieldSchema)(),d=(h==null?void 0:h.fieldSchema)||u,c=(0,i.useField)(),f=(0,i.useForm)(),z=(d==null?void 0:d["x-read-pretty"])||c.readPretty||f.readPretty,T=h==null?void 0:h.fieldSchema,W=(0,b.useCollection_deprecated)(),t=W.getField,I=(h==null?void 0:h.collectionField)||t(d.name)||D(d["x-collection-field"]),H=((B=d["x-component-props"])===null||B===void 0?void 0:B.fieldNames)||{},K=H.label,U=(0,w.useMemo)(function(){if(!(!I||!(I!=null&&I.interface))&&["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(I.type)){var F=E(I.target);if((F==null?void 0:F.template)==="file")return z?[{label:S("Title"),value:"Select"},{label:S("File manager"),value:"FileManager"},{label:S("Tag"),value:"Tag"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},{label:S("File manager"),value:"FileManager"}];if((F==null?void 0:F.template)==="tree"&&["m2m","o2m","m2o"].includes(I.interface))return z?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!T&&{label:S("Sub-details"),value:"Nester"},!T&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!T&&["m2m","o2m"].includes(I.interface)&&{label:S("Sub-table"),value:"SubTable"},!T&&{label:S("Cascade Select"),value:"CascadeSelect"},!T&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];switch(I.interface){case"o2m":return z?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!T&&{label:S("Sub-table"),value:"SubTable"},!T&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!T&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"},!T&&{label:S("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return z?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!T&&{label:S("Sub-details"),value:"Nester"},!T&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!T&&{label:S("Sub-table"),value:"SubTable"},!T&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return z?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!T&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!T&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];default:return z?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!T&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!T&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}]}}},[S,I==null?void 0:I.interface,K]);return(U||[]).filter(Boolean)}},18686:function(Ne,ae,e){"use strict";e.d(ae,{aZ:function(){return L},fM:function(){return B},hi:function(){return h}});var w=e(5574),l=e.n(w),G=e(97857),i=e.n(G),x=e(80844),C=e(83204),O=e(9361),o=e(96486),k=e.n(o),v=e(67294),j=e(89250),p=e(62954),M=e(21143),n=e(10097),b=e(1892),N=e(28561),r=function(m,D,E,u,d){return d.includes("/popups/")?2*u.paddingContentVertical+22+u.paddingPageVertical:m?u.paddingContentHorizontalLG:E?D?u.controlPaddingHorizontal+3*u.controlPaddingHorizontalSM+22+u.paddingContentHorizontalLG:u.paddingContentHorizontalLG+12:D?u.paddingSM+u.controlHeight+u.marginXS+2*u.controlPaddingHorizontalSM+22+u.paddingContentHorizontalLG:u.controlHeight+u.marginXS+(u.paddingContentVertical+2)*2+u.paddingContentHorizontalLG},a=function(m){var D=O.Z.useToken(),E=D.token,u=(0,p.ngQ)(),d=u.designable,c=(0,n.useBlockHeightProps)(),f=c.heightProps,z=(0,j.useLocation)(),T=m||f||{},W=T.disablePageHeader,t=T.enablePageTabs,I=T.hidePageTitle,H=E.sizeXXL-2,K=d?E.controlHeight+2*E.paddingContentHorizontalLG:1*E.paddingContentHorizontalLG,U=r(W,t,I,E,z.pathname);return H+U+K},A=function(){var m=O.Z.useToken(),D=m.token,E=(0,p.ngQ)(),u=E.designable,d=D.paddingContentVerticalLG+D.margin+2*D.paddingContentVertical+24,c=u?D.controlHeight+2*D.paddingContentHorizontalLG:1*D.paddingContentHorizontalLG;return d+c},y=function(m){var D=(0,x.useFieldSchema)(),E=g(D),u=a(m),d=A();return E?d:u},V=["workflowManualTasks","approvals","approvalRecords"],Y=function(){var m,D=O.Z.useToken(),E=D.token,u=(0,n.useBlockHeightProps)(),d=u.heightProps,c=(0,b.Si)(),f=c.heightProps,z=(0,p.ngQ)(),T=z.designable,W=(0,x.useFieldSchema)(),t=f||d,I=d.titleHeight,H=y(t),K=(0,M.useCollection)(),U=K.name,F=t.heightMode,te=t.height,q=t.title;if(!(!(t!=null&&t.heightMode)||F===N.j.DEFAULT)){var J=Object.keys(((m=W.parent.properties.actions)===null||m===void 0?void 0:m.properties)||{}).length>0,Z=E.controlHeight+E.padding+E.marginLG,P=J||T?E.controlHeight+2*E.marginLG:E.marginLG,X=(T&&!V.includes(U)?E.controlHeight:22)+2*E.padding+1,le=q?I:0;return F===N.j.FULL_HEIGHT?window.innerHeight-H-le-X-P-Z:te-le-P-X-Z}},L=function(m){var D=(0,n.useBlockHeightProps)(),E=D.heightProps,u=y(),d=E||{},c=d.heightMode,f=d.height,z=d.title,T=d.titleHeight,W=z?T:0;if(!(!(E!=null&&E.heightMode)||c===N.j.DEFAULT)){if(c===N.j.FULL_HEIGHT){var t=window.innerHeight-u;return m!=null&&m.removeBlockHeaderHeight&&(t=t-W),m!=null&&m.innerExtraHeight&&(t=t-m.innerExtraHeight),t}return f}},h=function(){var m=(0,x.useFieldSchema)(),D=(0,v.useMemo)(function(){return(0,n.getPageSchema)(m)},[]),E=(D==null?void 0:D["x-component-props"])||{},u=E.disablePageHeader,d=E.enablePageTabs,c=E.hidePageTitle,f=i()(i()({},m==null?void 0:m["x-component-props"]),{},{disablePageHeader:u,enablePageTabs:d,hidePageTitle:c}),z=y(f),T=f||{},W=T.heightMode,t=T.height;if(!(!(f!=null&&f.heightMode)||W===N.j.DEFAULT))return W===N.j.FULL_HEIGHT?window.innerHeight-z:t},B=function(){var m=(0,v.useState)(),D=l()(m,2),E=D[0],u=D[1],d=(0,v.useRef)(null),c=Y(),f=(0,v.useCallback)((0,o.debounce)(function(){var T;if(d.current){var W=d.current.getBoundingClientRect(),t=(T=d.current.querySelector(".ant-table"))===null||T===void 0?void 0:T.getBoundingClientRect();t&&u(W.width)}},100),[c]),z=(0,v.useCallback)(function(T){d.current=T&&T.children?T.children[0]:null,f()},[f]);return(0,C.Z)("resize",f),{height:c,width:E,tableSizeRefCallback:z}},g=function S(m){if(!m)return null;if(m["x-component"]==="Action.Container"){var D;return(m==null||(D=m.parent["x-component-props"])===null||D===void 0?void 0:D.openMode)!=="page"}return S(m.parent)}},96365:function(Ne,ae,e){"use strict";e.d(ae,{e:function(){return k}});var w=e(97857),l=e.n(w),G=e(52677),i=e.n(G),x=e(80844),C=e(67294),O={},o=function(j){var p=/{{.*?}}/g;return p.test(j)},k=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},p=j.noCache,M=(0,C.useContext)(x.SchemaOptionsContext),n=(0,C.useContext)(x.SchemaExpressionScopeContext);return function(b,N){var r=!1,a;if(typeof b=="string"&&b.startsWith("{{")&&(r=!0,a=b),b&&i()(b)==="object"&&!(0,C.isValidElement)(b)){try{a=JSON.stringify(b)}catch(y){return console.warn("Failed to stringify:",y),b}if(O[a])return O[a];r=o(a)}if(Array.isArray(b)){try{a=JSON.stringify(b)}catch(y){return console.warn("Failed to stringify:",y),b}if(O[a])return O[a];r=o(a)}if(r){var A=l()(l()(l()({},M.scope),n),N);if(!a)return x.Schema.compile(b,A);try{return p?x.Schema.compile(b,A):(O[a]=O[a]||x.Schema.compile(b,A),O[a])}catch(y){return console.log("useCompile error",b,y),x.Schema.compile(b,A)}}return b}}},94516:function(Ne,ae,e){"use strict";e.d(ae,{zz:function(){return U},Pl:function(){return T},oB:function(){return H},ng:function(){return te},sR:function(){return F}});var w=e(5574),l=e.n(w),G=e(19632),i=e.n(G),x=e(15009),C=e.n(x),O=e(99289),o=e.n(O),k=e(12444),v=e.n(k),j=e(72004),p=e.n(j),M=e(9783),n=e.n(M),b=e(97857),N=e.n(b),r=e(80844),a=e(84327),A=e(90105),y=e(45360),V=e(50361),Y=e.n(V),L=e(27361),h=e.n(L),B=e(36968),g=e.n(B),S=e(67294),m=e(26793),D=e(12174),E=e(57105),u=e(98902),d=e(61736);function c(q,J){if(q)return q["x-app-version"]||(q["x-app-version"]=J),Object.keys(q.properties||{}).forEach(function(Z){var P;c((P=q.properties)===null||P===void 0?void 0:P[Z],J)}),q}var f={i8:"1.6.27"},z=e(85893);function T(q){return new U(q)}var W=function q(J){J&&(J["x-uid"]||(J["x-uid"]=(0,a.uid)()),Object.keys(J.properties||{}).forEach(function(Z){q(J.properties[Z])}))},t=function(J){return J},I=function(J,Z){if(!(!J||!Z)){for(var P in Z)if(Object.prototype.hasOwnProperty.call(Z,P)){var X=Z[P];if(X!==(J==null?void 0:J[P]))return!1}return!0}},H=function(J,Z){if(J["x-uid"]&&J["x-uid"]===Z["x-uid"])return[null,J.toJSON()];var P=J.toJSON(),X=N()(N()({},P),{},{properties:{}}),le=null,Q=function oe(Ce,se){Object.keys(Ce||{}).forEach(function(De){var We=Ce[De];if(We["x-uid"]===Z["x-uid"]){le=Ce[De];return}else se.properties[De]=N()(N()({},We),{},{properties:{}}),oe(We==null?void 0:We.properties,se.properties[De])})};return Q(P.properties,X),[X,le]},K=function(J){return J},U=function(){function q(J){v()(this,q),n()(this,"current",void 0),n()(this,"options",void 0),n()(this,"appVersion",void 0),n()(this,"events",{}),this.options=J,this.current=J.current,this.appVersion=J.appVersion}return p()(q,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var Z=this,P=this.options,X=P.api,le=P.t,Q=le===void 0?K:le;if(X){var oe=function(se){if(!se)return[];var De=Object.values(se.properties).length,We=[];return se.mapProperties(function(ye){ye["x-component-props"]=ye["x-component-props"]||{},ye["x-component-props"].width=100/De,ye["x-uid"]&&We.push({"x-uid":ye["x-uid"],"x-component-props":ye["x-component-props"]})}),se["x-uid"]&&We.length?We:[]};this.on("insertAdjacent",function(){var Ce=o()(C()().mark(function se(De){var We,ye,ve,xe,he,re,de,_e,Ae,Fe;return C()().wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(ye=De.onSuccess,ve=De.current,xe=De.position,he=De.schema,re=De.wrap,de=De.wrapped,_e=De.removed,Ae=[],(de==null?void 0:de["x-component"])==="Grid.Col"&&(Ae=Ae.concat(oe(de.parent))),(_e==null?void 0:_e["x-component"])==="Grid.Col"&&(Ae=Ae.concat(oe(_e.parent))),Z.refresh(),ve["x-uid"]){Me.next=7;break}return Me.abrupt("return");case 7:return Me.next=9,X.request({url:"/uiSchemas:insertAdjacent/".concat(ve["x-uid"],"?position=").concat(xe),method:"post",data:{schema:c(he,Z.appVersion),wrap:re}});case 9:if(Fe=Me.sent,!Ae.length){Me.next=13;break}return Me.next=13,X.request({url:"/uiSchemas:batchPatch",method:"post",data:Ae});case 13:if(!(_e!=null&&_e["x-uid"])){Me.next=16;break}return Me.next=16,X.request({url:"/uiSchemas:remove/".concat(_e["x-uid"]),method:"post"});case 16:ye==null||ye(Fe==null||(We=Fe.data)===null||We===void 0?void 0:We.data),y.ZP.success(Q("Saved successfully"),.2);case 18:case"end":return Me.stop()}},se)}));return function(se){return Ce.apply(this,arguments)}}()),this.on("patch",function(){var Ce=o()(C()().mark(function se(De){var We;return C()().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(We=De.schema,Z.refresh(),We!=null&&We["x-uid"]){ve.next=4;break}return ve.abrupt("return");case 4:return ve.next=6,X.request({url:"/uiSchemas:patch",method:"post",data:N()({},We)});case 6:y.ZP.success(Q("Saved successfully"),.2);case 7:case"end":return ve.stop()}},se)}));return function(se){return Ce.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var Ce=o()(C()().mark(function se(De){var We;return C()().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(We=De.schema,We!=null&&We["x-uid"]){ve.next=3;break}return ve.abrupt("return");case 3:return ve.next=5,X.request({url:"/uiSchemas:initializeActionContext",method:"post",data:N()({},We)});case 5:case"end":return ve.stop()}},se)}));return function(se){return Ce.apply(this,arguments)}}()),this.on("batchPatch",function(){var Ce=o()(C()().mark(function se(De){var We;return C()().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return We=De.schemas,Z.refresh(),ve.next=4,X.request({url:"/uiSchemas:batchPatch",method:"post",data:We});case 4:y.ZP.success(Q("Saved successfully"),.2);case 5:case"end":return ve.stop()}},se)}));return function(se){return Ce.apply(this,arguments)}}()),this.on("remove",function(){var Ce=o()(C()().mark(function se(De){var We,ye;return C()().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(We=De.removed,ye=[],(We==null?void 0:We["x-component"])==="Grid.Col"&&(ye=oe(We.parent)),Z.refresh(),We!=null&&We["x-uid"]){xe.next=6;break}return xe.abrupt("return");case 6:return xe.next=8,X.request({url:"/uiSchemas:remove/".concat(We["x-uid"]),method:"post"});case 8:if(!ye.length){xe.next=11;break}return xe.next=11,X.request({url:"/uiSchemas:batchPatch",method:"post",data:ye});case 11:y.ZP.success(Q("Saved successfully"),.2);case 12:case"end":return xe.stop()}},se)}));return function(se){return Ce.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(Z){Z.type||(Z.type="void"),Z.name||(Z.name=(0,a.uid)()),this.current["x-uid"]&&W(Z)}},{key:"on",value:function(Z,P){this.events[Z]||(this.events[Z]=[]),this.events[Z].push(P)}},{key:"emit",value:function(){var J=o()(C()().mark(function P(X){var le=this,Q,oe,Ce,se,De,We=arguments;return C()().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(this.events[X]){ve.next=2;break}return ve.abrupt("return");case 2:for(Q=We.length,oe=new Array(Q>1?Q-1:0),Ce=1;Ce<Q;Ce++)oe[Ce-1]=We[Ce];return se=oe[0],De=oe.slice(1),ve.abrupt("return",Promise.all(this.events[X].map(function(xe){return xe.bind(le).apply(void 0,[N()({current:le.current},se)].concat(i()(De)))})));case 5:case"end":return ve.stop()}},P,this)}));function Z(P){return J.apply(this,arguments)}return Z}()},{key:"parentsIn",value:function(Z){if(!Z||!r.Schema.isSchemaInstance(Z))return!1;for(var P=this.current;(X=P)!==null&&X!==void 0&&X.parent;){var X;if(P.parent===Z)return!0;P=P.parent}return!1}},{key:"refresh",value:function(Z){var P=this.options.refresh;return P==null?void 0:P(Z)}},{key:"deepMerge",value:function(Z){var P=this,X={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly"},le={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(Q){X[Q]?(P.current[Q]=Z[Q],P.updateModel(X[Q],Z[Q])):le[Q]?Object.keys(Z[Q]).forEach(function(oe){g()(P.current,[Q,oe],Z[Q][oe]),P.updateModel([le[Q],oe],Z[Q][oe])}):P.current[Q]=Z[Q]}),this.emit("patch",{schema:Z})}},{key:"getSchemaAttribute",value:function(Z,P){return h()(this.current,Z,P)}},{key:"shallowMerge",value:function(Z){var P=this,X={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly","x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(le){P.current[le]=Z[le],X[le]&&P.updateModel(X[le],Z[le])}),this.emit("patch",{schema:Z})}},{key:"updateModel",value:function(Z,P){var X=function(Q){g()(Q,Z,P)};this.model&&X(this.model),this.query&&this.query.take(X)}},{key:"insertAdjacent",value:function(Z,P){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(Z){case"beforeBegin":return this.insertBeforeBegin(P,X);case"afterBegin":return this.insertAfterBegin(P,X);case"beforeEnd":return this.insertBeforeEnd(P,X);case"afterEnd":return this.insertAfterEnd(P,X)}}},{key:"recursiveRemoveIfNoChildren",value:function(Z,P){if(Z){for(var X=Z,le,Q=P==null?void 0:P.breakRemoveOn;X;){if(typeof Q=="function"){if(Q(X))break}else if(I(X,Q))break;var oe=Object.keys(X.properties||{}).length;if(oe>0)break;X.parent&&(le=X.parent.removeProperty(X.name)),X=X.parent}return le}}},{key:"remove",value:function(Z){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=P.breakRemoveOn,le=P.removeParentsIfNoChildren,Q=Z||this.current,oe=Q.parent.removeProperty(Q.name);if(le){var Ce=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:X});Ce&&(oe=Ce)}return this.emit("remove",{removed:oe})}},{key:"removeWithoutEmit",value:function(Z){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=P.breakRemoveOn,le=P.removeParentsIfNoChildren,Q=Z||this.current,oe=Q.parent.removeProperty(Q.name);if(le){var Ce=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:X});Ce&&(oe=Ce)}return oe}},{key:"insertBeforeBeginOrAfterEnd",value:function(Z){var P=this,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r.Schema.isSchemaInstance(this.current)&&r.Schema.isSchemaInstance(Z)&&this.current.parent===Z.parent){var le=0,Q=0;return this.current.parent.mapProperties(function(oe,Ce,se){P.current.name===Ce&&(Q=se),Z.name===Ce&&(le=se)}),le>Q?this.insertBeforeBegin(Z,X):this.insertAfterEnd(Z,X)}}},{key:"insertBeforeBegin",value:function(Z){var P=this,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r.Schema.isSchemaInstance(this.current)){var le={onSuccess:X.onSuccess},Q=X.wrap,oe=Q===void 0?t:Q,Ce=X.breakRemoveOn,se=X.removeParentsIfNoChildren;if(r.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),se&&(le.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Ce}))}else Z&&(Z=Y()(Z));var De={},We=!1,ye=0,ve=0;this.current.parent.mapProperties(function(Fe,Oe){Oe===P.current.name&&(ve=ye,We=!0,++ye),Fe["x-index"]=ye,++ye,We&&(De[Oe]=Fe,P.current.parent.removeProperty(Oe))}),this.prepareProperty(Z);var xe=oe(Z),he=this.current.parent.addProperty(xe.name||(0,a.uid)(),xe);he["x-index"]=ve,he.parent=this.current.parent,this.current.parent.setProperties(De);var re=H(he,Z),de=l()(re,2),_e=de[0],Ae=de[1];this.emit("insertAdjacent",N()({position:"beforeBegin",schema:Ae,wrapped:xe,wrap:_e},le))}}},{key:"insertAfterBegin",value:function(Z){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r.Schema.isSchemaInstance(this.current)){var X={onSuccess:P.onSuccess},le=P.wrap,Q=le===void 0?t:le,oe=P.breakRemoveOn,Ce=P.removeParentsIfNoChildren;if(r.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Ce&&(X.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:oe}))}else Z&&(Z=Y()(Z));var se={},De=1;this.current.mapProperties(function(de,_e){de["x-index"]=De,++De,se[_e]=de}),this.current.properties={},this.prepareProperty(Z);var We=Q(Z),ye=this.current.addProperty(We.name||(0,a.uid)(),We);ye["x-index"]=0,ye.parent=this.current,this.current.setProperties(se);var ve=H(ye,Z),xe=l()(ve,2),he=xe[0],re=xe[1];this.emit("insertAdjacent",N()({position:"afterBegin",schema:re,wrap:he,wrapped:We},X))}}},{key:"insertBeforeEnd",value:function(Z){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r.Schema.isSchemaInstance(this.current)){delete Z["x-index"];var X={onSuccess:P.onSuccess},le=P.wrap,Q=le===void 0?t:le,oe=P.breakRemoveOn,Ce=P.removeParentsIfNoChildren;if(r.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Ce&&(X.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:oe}))}else Z&&(Z=Y()(Z));this.prepareProperty(Z);var se=Q(Z),De=this.current.addProperty(se.name||(0,a.uid)(),se);De.parent=this.current;var We=H(De,Z),ye=l()(We,2),ve=ye[0],xe=ye[1];return this.emit("insertAdjacent",N()({position:"beforeEnd",schema:xe,wrap:ve,wrapped:se},X))}}},{key:"insertAfterEnd",value:function(Z){var P=this,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r.Schema.isSchemaInstance(this.current)){var le={onSuccess:X==null?void 0:X.onSuccess},Q=X.wrap,oe=Q===void 0?t:Q,Ce=X.breakRemoveOn,se=X.removeParentsIfNoChildren,De=0,We=0,ye=!1,ve={};if(this.current.parent.mapProperties(function(Fe,Oe){Fe["x-index"]=De,Oe===P.current.name&&(++De,We=De,ye=!0),++De,ye&&Oe!==P.current.name&&(ve[Oe]=Fe,P.current.parent.removeProperty(Oe))}),r.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),se&&(le.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Ce})),Z.parent=null}else Z&&(Z=Y()(Z));this.prepareProperty(Z);var xe=oe(Z),he=this.current.parent.addProperty(xe.name||(0,a.uid)(),xe);he.parent=this.current.parent,he["x-index"]=We,this.current.parent.setProperties(ve);var re=H(he,Z),de=l()(re,2),_e=de[0],Ae=de[1];this.emit("insertAdjacent",N()({position:"afterEnd",schema:Ae,wrap:_e,wrapped:xe},le))}}}]),q}();function F(){var q=(0,S.useContext)(r.SchemaOptionsContext),J=(0,S.useMemo)(function(){return(q==null?void 0:q.components)||{}},[q]),Z=function(X){if(!X)return null;if(typeof X!="string")return X;var le=h()(J,X);return le||console.error('[nocobase]: Component "'.concat(X,'" not found')),le};return Z}function te(){var q=(0,S.useContext)(d.D),J=q.designable,Z=q.setDesignable,P=q.refresh,X=q.reset,le=(0,S.useContext)(r.SchemaOptionsContext),Q=(0,S.useMemo)(function(){return(le==null?void 0:le.components)||{}},[le]),oe=(0,S.useMemo)(function(){return function(){return(0,z.jsx)(z.Fragment,{})}},[]),Ce=(0,A.Z)(),se=(0,E.gR)(),De=(0,E.QJ)(),We=(0,S.useCallback)(function(_e){P==null||P(),Ce(),se==null||se(_e),De==null||De()},[P,Ce,se,De]),ye=(0,r.useField)(),ve=(0,r.useFieldSchema)(),xe=(0,D.LY)(),he=(0,m.$)(),re=he.t,de=(0,S.useMemo)(function(){return T({t:re,api:xe,refresh:We,current:ve,model:ye,appVersion:f.i8})},[re,xe,We,ve,ye]);return(0,S.useEffect)(function(){de.loadAPIClientEvents()},[de]),{dn:de,designable:J,reset:X,refresh:We,setDesignable:Z,DesignableBar:oe,findComponent:(0,S.useCallback)(function(_e){var Ae;if(!_e)return null;if(typeof _e!="string")return _e;var Fe=h()(Q,_e);return(Ae=Fe==null?void 0:Fe[u.XI])!==null&&Ae!==void 0?Ae:Fe},[h()]),on:de.on.bind(de),patch:(0,S.useCallback)(function(_e,Ae){var Fe=function(Te){Object.keys(Te).forEach(function(ge){var ie=Te[ge];ge==="title"&&(ye.title=ie,ve.title=ie),ge==="x-decorator-props"&&(ye.decoratorProps||(ye.decoratorProps={}),ve["x-decorator-props"]||(ve["x-decorator-props"]={}),Object.keys(ie).forEach(function(ne){ye.decoratorProps[ne]=ie[ne],ve["x-decorator-props"][ne]=ie[ne]})),ge==="x-component-props"&&(ye.componentProps||(ye.componentProps={}),ve["x-component-props"]||(ve["x-component-props"]={}),Object.keys(ie).forEach(function(ne){ye.componentProps[ne]=ie[ne],ve["x-component-props"][ne]=ie[ne]}))})};if(typeof _e=="string"){var Oe={};return g()(Oe,_e,Ae),Fe(Oe)}Fe(_e),We()},[de]),shallowMerge:(0,S.useCallback)(function(_e){de.shallowMerge(_e)},[de]),deepMerge:(0,S.useCallback)(function(_e){de.deepMerge(_e)},[de]),remove:(0,S.useCallback)(function(_e,Ae){de.remove(_e,Ae)},[de]),insertAdjacent:(0,S.useCallback)(function(_e,Ae,Fe){de.insertAdjacent(_e,Ae,Fe)},[de]),insertBeforeBegin:(0,S.useCallback)(function(_e){de.insertBeforeBegin(_e)},[de]),insertAfterBegin:(0,S.useCallback)(function(_e){de.insertAfterBegin(_e)},[de]),insertBeforeEnd:(0,S.useCallback)(function(_e){de.insertBeforeEnd(_e)},[de]),insertAfterEnd:(0,S.useCallback)(function(_e){de.insertAfterEnd(_e)},[de])}}},98146:function(Ne,ae,e){"use strict";e.d(ae,{e:function(){return C}});var w=e(80844),l=e(84577),G=e(67294),i=e(90297),x=function(){return null};x.isNullComponent=!0;var C=function(){var o=(0,l.ng)(),k=o.designable,v=(0,w.useFieldSchema)(),j=(0,G.useMemo)(function(){return v["x-designer"]||v["x-toolbar"]?v["x-designer"]||v["x-toolbar"]:v["x-settings"]?i.Mf:x},[v]),p=(0,l.Co)(j);return k&&p||x}},9780:function(Ne,ae,e){"use strict";e.d(ae,{w:function(){return O}});var w=e(97857),l=e.n(w),G=e(13769),i=e.n(G),x=["useProps"],C=function(){return{}},O=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=k.useProps,j=v===void 0?C:v,p=i()(k,x),M=j;typeof j!="function"&&(M=C);var n=M();return l()(l()({},p),n)}},62954:function(Ne,ae,e){"use strict";e.d(ae,{aUM:function(){return G.aU},olz:function(){return G.ol},N0i:function(){return G.N0},fWn:function(){return G.fW},mlL:function(){return G.ml},EIK:function(){return G.EI},$Lt:function(){return G.$L},$b8:function(){return G.$b},HTy:function(){return rn},lkv:function(){return vt},rDu:function(){return mr},eYL:function(){return G.eY},Rat:function(){return ua},oAt:function(){return Kl},E7E:function(){return Nl},$SD:function(){return Ri},fUi:function(){return Lo.fU},QcG:function(){return Ps},MLy:function(){return sr.M},gOu:function(){return Js},jYG:function(){return va.jY},PuU:function(){return va.Pu},smG:function(){return va.sm},C1I:function(){return G.C1},Ssf:function(){return ys},vTp:function(){return Ms},XZJ:function(){return Ea},Tt2:function(){return Fs},zH8:function(){return Ls},Q5L:function(){return Ws},Pok:function(){return ji},Vm0:function(){return Vs},xI_:function(){return Rs},Lip:function(){return Ts},WN4:function(){return Li.W},Mtg:function(){return Da.Mt},iNu:function(){return Da.iN},zzt:function(){return pt.zz},_bl:function(){return V._b},POi:function(){return zs},AOY:function(){return se},izJ:function(){return Gs},LBT:function(){return y.DndContext},IWB:function(){return y.DragHandler},LCt:function(){return y.DraggableContext},FyH:function(){return Q.Fy},Nir:function(){return Q.Ni},q8U:function(){return Q.q8},HGA:function(){return Q.HG},QTe:function(){return Q.QT},JEX:function(){return Q.JE},fAH:function(){return El},$w$:function(){return Q.$w},nBj:function(){return Q.nB},Oct:function(){return Q.Oc},zdw:function(){return Q.zd},CXR:function(){return Sl},BQs:function(){return Do.BQ},Hj5:function(){return Ao.H},M0b:function(){return Bi},Dnz:function(){return Li.D},wn$:function(){return Wn.wn},GzZ:function(){return Wn.Gz},tJZ:function(){return Wn.tJ},fox:function(){return Wn.fo},VTd:function(){return Wn.VT},XsZ:function(){return Wn.Xs},l09:function(){return P},D_t:function(){return pl.D},_80:function(){return xi},WiK:function(){return _r},xJW:function(){return Q.xJ},RVL:function(){return V.RV},Bc8:function(){return lt},hG9:function(){return Ki},DCh:function(){return Ui},rjZ:function(){return Ma.rj},Cqo:function(){return gi},jg7:function(){return Ma.jg},gsn:function(){return Do.gs},$18:function(){return au},IIB:function(){return Do.II},RnZ:function(){return gl},mX2:function(){return Do.mX},zDC:function(){return fo.zD},Phs:function(){return Do.Ph},aVo:function(){return Ci},UGj:function(){return $i.U},yq5:function(){return $i.y},v2r:function(){return Yo},HIW:function(){return fu},T3C:function(){return Ga},d97:function(){return ba.d9},hGv:function(){return ni},tlE:function(){return hu},irr:function(){return Uo},rop:function(){return bl},gGi:function(){return gu},DBW:function(){return pn.D},MBS:function(){return Cu.M},pGO:function(){return bu},Y8K:function(){return zi},iVT:function(){return Do.iV},ODP:function(){return fo.OD},lbb:function(){return fo.lb},b7w:function(){return fo.b7},sUk:function(){return fo.sU},x1j:function(){return G.x1},m1v:function(){return V.m1},glM:function(){return Mt},xZD:function(){return G.xZ},IuH:function(){return Wn.Iu},MkN:function(){return G.Mk},Hof:function(){return Pu},n6:function(){return V.n6},DDd:function(){return Hu.D},ATq:function(){return V.AT},G0E:function(){return V.G0},a$w:function(){return V.a$},TzZ:function(){return V.Tz},y00:function(){return G.y0},PhF:function(){return dn},Cqv:function(){return y.ShowFormData},cof:function(){return G.co},bts:function(){return y.Sortable},Fop:function(){return y.SortableContext},TRI:function(){return y.SortableItem},ORg:function(){return y.SortableProvider},TaI:function(){return Su},qHe:function(){return vi.q},iA_:function(){return Xo},gvM:function(){return Bu},SnY:function(){return Dl},ASv:function(){return Uu},bwk:function(){return pa},mQc:function(){return ei},c__:function(){return Xa.c},QZ3:function(){return At},L39:function(){return va.L3},feF:function(){return Gu},jII:function(){return Hi},mPs:function(){return Vu},tgM:function(){return zu},gqx:function(){return Lo.gq},Qm7:function(){return Lo.Qm},_wD:function(){return ca._w},rjl:function(){return ca.rj},SLL:function(){return G.SL},sBv:function(){return G.sB},iTm:function(){return Q.iT},BDK:function(){return Lo.BD},Pls:function(){return pt.Pl},Oxq:function(){return gt},WLi:function(){return Ie},$9M:function(){return Q.$9},nCn:function(){return ia},iNG:function(){return oa},tD8:function(){return da},pg9:function(){return Kn},Ofb:function(){return Q.Of},ibf:function(){return Hn},WyG:function(){return le},l6$:function(){return l.l6},WGR:function(){return It},C$H:function(){return fo.C$},SET:function(){return Qo.SE},cNQ:function(){return fo.cN},NCb:function(){return ko.NC},I9l:function(){return y.getRenderContent},XQ2:function(){return ko.XQ},Fxc:function(){return Ua},KKi:function(){return G.KK},MDU:function(){return Qo.MD},CEH:function(){return Qo.CE},vUN:function(){return G.vU},ZZb:function(){return Q.ZZ},tqC:function(){return Qo.tq},elO:function(){return fo.el},CfU:function(){return ai},LPx:function(){return Qo.LP},fY6:function(){return Qo.fY},Vm:function(){return Gi},w_o:function(){return Qo.w_},SJF:function(){return wa},_Ko:function(){return Ya},Mev:function(){return ii},i2K:function(){return cr},WmO:function(){return Wn.Wm},oBi:function(){return pt.oB},hKP:function(){return ko.hK},DU1:function(){return G.DU},XCj:function(){return G.XC},KyD:function(){return Dr.Ky},Vpg:function(){return Ti},lIL:function(){return pt.lI},KxP:function(){return sr.K},hi9:function(){return pt.hi},p27:function(){return G.p2},z9d:function(){return yl.z9},eJW:function(){return pt.eJ},Cor:function(){return pt.Co},Zmk:function(){return ba.Zm},aZq:function(){return pt.aZ},P1D:function(){return Da.P1},ngQ:function(){return pt.ng},ett:function(){return pt.et},ySm:function(){return Ao.y},Zd$:function(){return Q.Zd},cLh:function(){return pt.cL},baz:function(){return Q.b},fde:function(){return pt.fd},Xdt:function(){return fo.Xd},Cld:function(){return pt.Cl},vH8:function(){return pt.vH},PLH:function(){return Wn.PL},V8t:function(){return Wn.V8},tMk:function(){return Wn.tM},xQm:function(){return Wn.xQ},sRe:function(){return pt.sR},U1u:function(){return mt},HS$:function(){return G.HS},vBu:function(){return G.vB},QYZ:function(){return G.QY},t9d:function(){return G.t9},Kgy:function(){return Wn.Kg},aJ2:function(){return Wn.aJ},n14:function(){return Ma.n1},DiB:function(){return Ma.Di},l1O:function(){return Q.l1},w5o:function(){return Q.w5},p3Q:function(){return Q.p3},G5e:function(){return Q.G5},xj2:function(){return Q.xj},rxY:function(){return Q.rx},Ils:function(){return fo.Il},zCB:function(){return G.zC},CMh:function(){return la},v$P:function(){return ra.v},FMn:function(){return ao},T0O:function(){return No},a4r:function(){return pn.a},wNf:function(){return pt.wN},Dmu:function(){return pt.Dm},Bsl:function(){return V.Bs},yKv:function(){return Oa.y},fMB:function(){return pt.fM},gCg:function(){return Xa.g},eT6:function(){return Q.eT},$SN:function(){return Lo.$S},q4O:function(){return Q.q4},ymE:function(){return ca.ym},uqQ:function(){return G.uq},Q3P:function(){return ko.Q3},K5K:function(){return G.K5}});var w={};e.r(w),e.d(w,{Action:function(){return G.aU},ActionBar:function(){return G.ol},ActionBarProvider:function(){return G.N0},ActionContext:function(){return G.fW},ActionContextNoRerender:function(){return G.ml},ActionContextProvider:function(){return G.EI},ActionDesigner:function(){return G.$L},AfterSuccess:function(){return G.$b},AntdSchemaComponentPlugin:function(){return rn},AntdSchemaComponentProvider:function(){return vt},AppendsTreeSelect:function(){return mr},AssignedFieldValues:function(){return G.eY},AssociationField:function(){return ua},AssociationFieldMode:function(){return Kl},AssociationFieldModeProvider:function(){return Nl},AssociationSelect:function(){return Ri},AttachmentList:function(){return Lo.fU},AutoComplete:function(){return Ps},BackButtonUsedInSubPage:function(){return sr.M},Block:function(){return Js},BlockItem:function(){return va.jY},BlockItemCard:function(){return va.Pu},BlockItemCardContext:function(){return va.sm},ButtonEditor:function(){return G.C1},CardItem:function(){return ys},Cascader:function(){return Ms},Checkbox:function(){return Ea},CollectionSelect:function(){return Fs},ColorPicker:function(){return Ls},ColorSelect:function(){return Ws},Cron:function(){return ji},CronSet:function(){return Vs},DataSourceCollectionCascader:function(){return Rs},DataSourceSelect:function(){return Ts},DateFormatCom:function(){return Li.W},DatePicker:function(){return Da.Mt},DatePickerProvider:function(){return Da.iN},Details:function(){return zs},DetailsDesigner:function(){return se},Divider:function(){return Gs},EditComponent:function(){return Q.Fy},EditDefaultValue:function(){return Q.Ni},EditDescription:function(){return Q.q8},EditOperator:function(){return Q.HG},EditPattern:function(){return Q.QT},EditRequired:function(){return Q.JE},EditSortField:function(){return El},EditTitle:function(){return Q.$w},EditTitleField:function(){return Q.nB},EditTooltip:function(){return Q.Oc},EditValidationRules:function(){return Q.zd},Editable:function(){return Sl},EllipsisWithTooltip:function(){return Do.BQ},ErrorFallback:function(){return Ao.H},Expand:function(){return Bi},ExpiresRadio:function(){return Li.D},Filter:function(){return Wn.wn},FilterAction:function(){return Wn.Gz},FilterActionContext:function(){return Wn.tJ},FilterContext:function(){return Wn.fo},FilterDynamicComponent:function(){return Wn.VT},FilterLogicContext:function(){return Wn.Xs},Form:function(){return P},FormDialog:function(){return pl.D},FormDrawer:function(){return xi},FormField:function(){return _r},FormItem:function(){return Q.xJ},FormV2:function(){return lt},G2Plot:function(){return Ki},G2PlotRenderer:function(){return Ui},Grid:function(){return Ma.rj},GridCard:function(){return gi},GridRowContext:function(){return Ma.jg},HTMLEncode:function(){return Do.gs},IconPicker:function(){return au},Input:function(){return Do.II},InputNumber:function(){return gl},InputReadPretty:function(){return Do.mX},InputRecordPicker:function(){return fo.zD},Json:function(){return Do.Ph},List:function(){return Ci},Markdown:function(){return $i.U},MarkdownReadPretty:function(){return $i.y},Menu:function(){return Yo},NanoIDInput:function(){return fu},Page:function(){return Ga},PagePopups:function(){return ba.d9},PageTabs:function(){return ni},Pagination:function(){return hu},ParentRouteContext:function(){return Uo},Password:function(){return bl},Percent:function(){return gu},PopupSettingsProvider:function(){return pn.D},Preview:function(){return Cu.M},QuickEdit:function(){return bu},Radio:function(){return zi},ReadPretty:function(){return Do.iV},ReadPrettyRecordPicker:function(){return fo.OD},RecordPicker:function(){return fo.lb},RecordPickerContext:function(){return fo.b7},RecordPickerProvider:function(){return fo.sU},RefreshDataBlockRequest:function(){return G.x1},RemoteSelect:function(){return Mt},RemoveButton:function(){return G.xZ},RemoveConditionContext:function(){return Wn.Iu},RequestSettings:function(){return G.Mk},RichText:function(){return Pu},SecondConFirm:function(){return G.y0},Select:function(){return dn},SkipValidation:function(){return G.co},Space:function(){return Su},StablePopover:function(){return vi.q},Table:function(){return Xo},TableBlockDesigner:function(){return Bu},TableField:function(){return Dl},TableSelectorDesigner:function(){return Uu},TableV2:function(){return pa},Tabs:function(){return ei},TabsContextProvider:function(){return Xa.c},Templates:function(){return At},TestDesigner:function(){return va.L3},TextAreaWithGlobalScope:function(){return Gu},TimePicker:function(){return Hi},TreeSelect:function(){return Vu},UnixTimestamp:function(){return zu},Upload:function(){return Lo.gq},Uploader:function(){return Lo.Qm},Variable:function(){return ca._w},VariableScopeProvider:function(){return ca.rj},actionSettings:function(){return G.SL},actionSettingsItems:function(){return G.sB},allowAddNew:function(){return Q.iT},attachmentFileTypes:function(){return Lo.BD},defaultFieldNames:function(){return gt},fetchTemplateData:function(){return Ie},filterFormItemSettings:function(){return Q.$9},findByUid:function(){return ia},findKeysByUid:function(){return oa},findMenuItem:function(){return da},formDetailsSettings:function(){return Kn},formItemSettings:function(){return Q.Of},formSettings:function(){return Hn},formV1Settings:function(){return le},genStyleHook:function(){return l.l6},getCurrentOptions:function(){return It},getDatePickerLabels:function(){return fo.C$},getDateRanges:function(){return Qo.SE},getLabelFormatValue:function(){return fo.cN},getPopupPathFromParams:function(){return ko.NC},getStoredPopupContext:function(){return ko.XQ},getTabSchema:function(){return Ua},getZIndex:function(){return G.KK},handleDateChangeOnForm:function(){return Qo.MD},inferPickerType:function(){return Qo.CE},isBulkEditAction:function(){return G.vU},isFileCollection:function(){return Q.ZZ},isMobile:function(){return Qo.tq},isShowFilePicker:function(){return fo.el},isTabPage:function(){return ai},mapDatePicker:function(){return Qo.LP},mapRangePicker:function(){return Qo.fY},mapTimeFormat:function(){return Gi},moment2str:function(){return Qo.w_},navigateToTab:function(){return wa},pageSettings:function(){return Ya},pageTabSettings:function(){return ii},readPrettyFormSettings:function(){return cr},removeNullCondition:function(){return Wn.Wm},storePopupContext:function(){return ko.hK},useActionBarContext:function(){return G.DU},useActionContext:function(){return G.XC},useAssociationFieldContext:function(){return Dr.Ky},useAssociationFieldModeContext:function(){return Ti},useBackButton:function(){return sr.K},useCloseAction:function(){return G.p2},useColumnSchema:function(){return yl.z9},useCurrentPopupContext:function(){return ba.Zm},useDatePickerContext:function(){return Da.P1},useDownloadLogs:function(){return Ao.y},useEnsureOperatorsValid:function(){return Q.Zd},useFieldMode:function(){return Q.b},useFieldNames:function(){return fo.Xd},useFilterActionProps:function(){return Wn.PL},useFilterFieldOptions:function(){return Wn.V8},useFilterFieldProps:function(){return Wn.tM},useFilterOptions:function(){return Wn.xQ},useFormDataTemplates:function(){return mt},useGetAriaLabelOfAction:function(){return G.HS},useGetAriaLabelOfDrawer:function(){return G.vB},useGetAriaLabelOfModal:function(){return G.QY},useGetAriaLabelOfPopover:function(){return G.t9},useGetFilterFieldOptions:function(){return Wn.Kg},useGetFilterOptions:function(){return Wn.aJ},useGridContext:function(){return Ma.n1},useGridRowContext:function(){return Ma.Di},useIsAddNewForm:function(){return Q.l1},useIsAssociationField:function(){return Q.w5},useIsFieldReadPretty:function(){return Q.p3},useIsFileField:function(){return Q.G5},useIsFormReadPretty:function(){return Q.xj},useIsSelectFieldMode:function(){return Q.rx},useLabelUiSchema:function(){return fo.Il},useLinkageAction:function(){return G.zC},useMenuDragEnd:function(){return la},useMenuTranslation:function(){return ra.v},useNocoBaseRoutes:function(){return ao},useParentRoute:function(){return No},usePopupSettings:function(){return pn.a},useStyles:function(){return Oa.y},useTabsContext:function(){return Xa.g},useTitleFieldOptions:function(){return Q.eT},useUploadStyles:function(){return Lo.$S},useValidateSchema:function(){return Q.q4},useVariableScope:function(){return ca.ym},useZIndexContext:function(){return G.uq},withSearchParams:function(){return ko.Q3},zIndexContext:function(){return G.K5}});var l=e(46917),G=e(76157),i=e(15009),x=e.n(i),C=e(99289),O=e.n(C),o=e(12444),k=e.n(o),v=e(72004),j=e.n(v),p=e(31996),M=e.n(p),n=e(26037),b=e.n(n),N=e(97857),r=e.n(N),a=e(67294),A=e(31601),y=e(14896),V=e(70993),Y=e(89127),L=function($){return O()(x()().mark(function me(){var pe,fe;return x()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return Se.prev=0,Se.next=3,this.api.request($);case 3:return fe=Se.sent,Se.abrupt("return",fe==null||(pe=fe.data)===null||pe===void 0?void 0:pe.data);case 7:return Se.prev=7,Se.t0=Se.catch(0),Se.abrupt("return",[]);case 10:case"end":return Se.stop()}},me,this,[[0,7]])}))},h=e(13769),B=e.n(h),g=e(5552),S=e(86201),m=e(80844),D=e(28459),E=e(57953),u=e(12174),d=e(6145),c=e(57105),f=e(90297),z=e(64016),T=e(15195),W=e(23461),t=e(85893),I=["form","children"],H=["form","children","disabled"],K=["request","effects","initialValue","useValues"],U=function($){var me=$.form,pe=$.children,fe=B()($,I),be=(0,m.useField)(),Se=(0,m.useFieldSchema)(),Le=(0,pt.lI)(me.createVoidField(r()(r()({},be.props),{},{basePath:""})));return(0,t.jsx)(m.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(m.FormContext.Provider,{value:me,children:(0,t.jsx)(g.FormLayout,r()(r()({layout:"vertical"},fe),{},{children:(0,t.jsx)(c.sq,{basePath:Le.address,schema:Se,onlyRenderProperties:!0})}))})})},F=function($){return $.children},te=function($){var me=$.form,pe=$.children,fe=$.disabled,be=B()($,H),Se=(0,m.useField)(),Le=(0,m.useFieldSchema)(),$e=(0,pt.lI)(me.createVoidField(r()(r()({},Se.props),{},{basePath:""}))),He=(0,pt.Co)(Le["x-component"],F);return(0,a.useEffect)(function(){me.disabled=fe||Se.disabled},[fe,Se.disabled]),(0,t.jsx)(D.ZP,{componentDisabled:fe,children:(0,t.jsx)(m.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(m.FormContext.Provider,{value:me,children:(0,t.jsx)(g.FormLayout,r()(r()({layout:"vertical"},be),{},{children:(0,t.jsx)(m.FieldContext.Provider,{value:$e,children:(0,t.jsx)(He,r()(r()({},Se.componentProps),{},{children:(0,t.jsx)(c.sq,{basePath:$e.address,schema:Le,onlyRenderProperties:!0})}))})}))})})})},q=function($){var me=$.request,pe=$.initialValue;return me||function(){return Promise.resolve({data:pe})}},J=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,u.QT)(q(me),$)},Z=(0,a.createContext)(null);Z.displayName="FormBlockContext";var P=(0,m.observer)(function(ee){var $=ee.request,me=ee.effects,pe=ee.initialValue,fe=ee.useValues,be=fe===void 0?J:fe,Se=B()(ee,K),Le=(0,m.useFieldSchema)(),$e=(0,m.useField)(),He=(0,a.useMemo)(function(){return(0,S.createForm)({effects:me})},[]),Ge=be({uid:Le["x-uid"],onSuccess:function(Je){return O()(x()().mark(function ft(){return x()().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,He.reset();case 2:He.setValues(Je==null?void 0:Je.data),He.setInitialValues(Je==null?void 0:Je.data);case 4:case"end":return _t.stop()}},ft)}))()}},ee),Xe=(0,a.useContext)(Z);return(0,t.jsx)(Z.Provider,{value:{parent:Xe,form:He,result:Ge,field:$e,fieldSchema:Le},children:(0,t.jsx)(E.Z,{spinning:(Ge==null?void 0:Ge.loading)||!1,children:Le["x-decorator"]==="Form"?(0,t.jsx)(te,r()({form:He},Se)):(0,t.jsx)(U,r()({form:He},Se))})})},{displayName:"Form"});P.Designer=function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=$.title,fe=(0,T.zy)(),be=(0,W.rE)(),Se=be.componentNamePrefix;return(0,t.jsxs)(f.aN,{template:fe,title:pe||me,children:[(0,t.jsx)(z.G,{componentName:"".concat(Se,"Form"),collectionName:me}),(0,t.jsx)(f.Z5,{}),(0,t.jsx)(f.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var X=e(5537),le=new X.F5({name:"FormV1Settings",items:[{name:"template",Component:z.G,useComponentProps:function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=(0,W.rE)(),fe=pe.componentNamePrefix;return{componentName:"".concat(fe,"Form"),collectionName:me}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),Q=e(54801),oe=function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=$.title,fe=(0,T.zy)();return(0,t.jsx)(f.aN,{schemaSettings:"FormSettings",template:fe,title:pe||me})},Ce=function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=$.title,fe=(0,T.zy)();return(0,t.jsx)(f.aN,{schemaSettings:"ReadPrettyFormSettings",template:fe,title:pe||me})},se=function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=$.title,fe=(0,T.zy)();return(0,t.jsx)(f.aN,{schemaSettings:"FormDetailsSettings",template:fe,title:pe||me})},De=function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=$.title,fe=(0,T.zy)();return(0,t.jsx)(f.aN,{schemaSettings:"blockSettings:filterForm",template:fe,title:pe||me})},We=e(7340),ye=e(15503),ve=e(83335),xe=e(68230),he=e(68400),re=e.n(he),de=e(97133),_e=e(84327),Ae=e(9361),Fe=e(68091),Oe=e(67174),Me=e(31019),Te=e(94804),ge=e(39742),ie=e(22229),ne=e(43321),R=e(64910),ue=e(9780),Pe=e(3192),ce=e(18686),je=e(5574),Ke=e.n(je),Ue=e(84157),Ye=e(42075),Et=e(34041),Lt=e(96486),rt=e.n(Lt),st=e(26793),at=e(32268),dt=e(9783),ct=e.n(dt),hn=e(52677),an=e.n(hn),In=e(3407),Jt=e(66309),Rn=e(96074),En=e(27484),Ht=e.n(En),Un=e(44990),_n=e(8341),Gt=e(87714),pt=e(84577),fn=e(16646),Dn=e(73475),$n=e(32983),rr=e(67668),lr=e(58812),dr=e(96695),yr=e.n(dr),Ln=e(19632),Ut=e.n(Ln),gt={label:"label",value:"value",color:"color",options:"children"};function Kt(ee,$){var me=[];if(!Array.isArray(ee))return me;for(var pe=0;pe<ee.length;pe++){var fe=ee[pe][$.options];Array.isArray(fe)&&me.push.apply(me,Ut()(Kt(fe,$))),me.push(r()({},ee[pe]))}return me}function zt(ee,$,me){if(!ee)return[];var pe=[],fe=yr()(me),be;try{var Se=function(){var $e=be.value,He=ee.find(function(Ge){return Ge[$.value]==$e})||{value:$e,label:$e&&$e.toString()};pe.push(He)};for(fe.s();!(be=fe.n()).done;)Se()}catch(Le){fe.e(Le)}finally{fe.f()}return pe}function It(ee,$,me){var pe=Kt($,me),fe=(0,Lt.castArray)(ee).map(function(be){return(0,Ue.isPlainObject)(be)?be[me.value]:be});return zt(pe,me,fe)}var yt=e(25145),Nt=(0,m.observer)(function(ee){var $=(0,a.useState)(!0),me=Ke()($,2),pe=me[0],fe=me[1],be=(0,a.useState)([]),Se=Ke()(be,2),Le=Se[0],$e=Se[1],He=(0,m.useField)(),Ge=(0,rr.Hy)();return(0,a.useEffect)(function(){var Xe,Pt=r()(r()({},gt),ee.fieldNames),Je=He.dataSource||ee.options||(Ge==null?void 0:Ge.uiSchema.enum)||[],ft=It(He.value,Je,Pt);if(!(!(0,_e.isValid)(ee.value)&&!ft.length)&&!((0,S.isArrayField)(He)&&(He==null||(Xe=He.value)===null||Xe===void 0?void 0:Xe.length)===0)){var Ct=He.value!==null&&ft.map(function(_t,Rt){return(0,t.jsx)(Jt.Z,{color:_t[Pt.color],icon:_t.icon,children:_t[Pt.label]},Rt)});$e(Ct),fe(!1)}},[Ge==null?void 0:Ge.uiSchema.enum,He,He.dataSource,He.value,ee.fieldNames,ee.options,ee.value]),pe?null:(0,t.jsx)(lr.B,{ellipsis:ee.ellipsis,children:Le})},{displayName:"SelectReadPretty"}),wt=(0,yt.u)(Nt),kt=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],qt=["objectValue","loading","value","rawOptions","defaultValue"],Qt=function($){return!(0,_e.isValid)($)||an()($)==="object"&&Object.keys($).length===0},ln=function($){var me=$.value,pe=$.options,fe=$.onChange,be=$.fieldNames,Se=$.mode,Le=$.loading,$e=$.rawOptions,He=$.defaultValue,Ge=B()($,kt),Xe=function(Je){var ft;if(!Qt(Je)){var Ct=(0,_e.toArr)(Je).filter(function(Rt){return Rt}).map(function(Rt){return(0,Ue.isPlainObject)(Rt)?Rt[be.value]:Rt}),_t=(ft=It(Ct,pe,be))===null||ft===void 0?void 0:ft.map(function(Rt){return{label:Rt[be.label],value:Rt[be.value]}});return["tags","multiple"].includes(Se)||$.multiple?_t:_t.shift()}};return(0,t.jsx)(Et.default,r()({role:"button","data-testid":"select-object-".concat(Se||"single"),value:Xe(me),defaultValue:Xe(He),allowClear:{clearIcon:(0,t.jsx)(fn.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Le?(0,t.jsx)(E.Z,{}):(0,t.jsx)($n.Z,{image:$n.Z.PRESENTED_IMAGE_SIMPLE}),options:pe,fieldNames:be,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(Je,ft){var Ct;return((Ct=ft==null?void 0:ft[be.label||"label"])!==null&&Ct!==void 0?Ct:"").includes(Je)},filterSort:function(Je,ft){var Ct,_t;return((Ct=Je==null?void 0:Je[be.label||"label"])!==null&&Ct!==void 0?Ct:"").toLowerCase().localeCompare(((_t=ft==null?void 0:ft[be.label||"label"])!==null&&_t!==void 0?_t:"").toLowerCase())},onChange:function(Je){var ft=It((0,_e.toArr)(Je).map(function(Ct){return Ct.value}),$e||pe,be);["tags","multiple"].includes(Se)||$.multiple?fe==null||fe(ft):fe==null||fe(ft.shift()||null)},mode:Se,tagRender:function(Je){return(0,t.jsx)(Jt.Z,r()(r()({role:"button","aria-label":Je.label,closeIcon:(0,t.jsx)(Dn.Z,{role:"button","aria-label":"icon-close-tag"})},Je),{},{children:Je.label}))},maxTagCount:"responsive"},Ge))},mn=function($,me){var pe;return((pe=me==null?void 0:me.label)!==null&&pe!==void 0?pe:"").toLowerCase().includes(($||"").toLowerCase())},un=(0,m.connect)(function(ee){var $=ee.objectValue,me=ee.loading,pe=ee.value,fe=ee.rawOptions,be=ee.defaultValue,Se=B()(ee,qt),Le=(0,pt.eJ)(),$e=ee.multiple?"multiple":ee.mode;if($e&&!["multiple","tags"].includes($e)&&($e=void 0),$)return(0,t.jsx)(ln,r()(r()({rawOptions:fe},Se),{},{defaultValue:be,value:pe,mode:$e,loading:me}));var He=function(Xe){return["tags","multiple"].includes(ee.mode)||ee.multiple?Xe?(0,_e.toArr)(Xe):void 0:Xe};return(0,t.jsx)(Et.default,r()(r()({role:"button","data-testid":"select-".concat($e||"single"),showSearch:!0,filterOption:mn,allowClear:{clearIcon:(0,t.jsx)(fn.Z,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:me?(0,t.jsx)(E.Z,{}):(0,t.jsx)($n.Z,{image:$n.Z.PRESENTED_IMAGE_SIMPLE}),value:He(pe),defaultValue:He(be),tagRender:function(Xe){return(0,t.jsx)(Jt.Z,r()(r()({role:"button","aria-label":Xe.label,closeIcon:(0,t.jsx)(Dn.Z,{role:"button","aria-label":"icon-close-tag"})},Xe),{},{children:Xe.label}))}},Le(Se)),{},{onChange:function(Xe){var Pt;(Pt=ee.onChange)===null||Pt===void 0||Pt.call(ee,Xe===void 0?null:Xe)},mode:$e,maxTagCount:"responsive"}))},(0,m.mapProps)({dataSource:"options"},function(ee,$){return r()(r()({},ee),{},{fieldNames:r()(r()({},gt),ee.fieldNames),suffixIcon:$!=null&&$.loading||$!=null&&$.validating?(0,t.jsx)(In.Z,{}):ee.suffixIcon})}),(0,m.mapReadPretty)(wt)),dn=un;dn.ReadPretty=wt;var On=dn,Yt=e(36586),on=function($,me){return(0,Lt.castArray)($).filter(function(pe){return pe!=null}).map(function(pe){return an()(pe)==="object"?pe[me.value]:pe})},xn=(0,m.observer)(function(ee){var $=r()(r()({},gt),ee.fieldNames),me=(0,m.useField)(),pe=(0,m.useFieldSchema)(),fe=(0,Yt.a)(),be=(0,G.XC)(),Se=be.snapshot,Le=(0,u.QT)(Se?O()(x()().mark(function He(){return x()().wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Xe.abrupt("return",{data:fe[pe.name]});case 1:case"end":return Xe.stop()}},He)})):r()(r()({action:"list"},ee.service),{},{params:{paginate:!1,filter:ct()({},$.value,{$in:on(me.value,$)})}}),{refreshDeps:[ee.service,me.value]}),$e=Le.data;return(0,t.jsx)(dn.ReadPretty,r()(r()({},ee),{},{options:$e==null?void 0:$e.data}))},{displayName:"ReadPretty"}),Wt=["fieldNames","service","wait","value","defaultValue","objectValue","manual","mapOptions","targetField","CustomDropdownRender","optionFilter","dataSource","toOptionsItem","popupMatchSelectWidth"],et="N/A",Ft=(0,ye.t)((0,m.connect)(function(ee){var $,me,pe=ee.fieldNames,fe=pe===void 0?{}:pe,be=ee.service,Se=be===void 0?{}:be,Le=ee.wait,$e=Le===void 0?300:Le,He=ee.value,Ge=ee.defaultValue,Xe=ee.objectValue,Pt=ee.manual,Je=Pt===void 0?!0:Pt,ft=ee.mapOptions,Ct=ee.targetField,_t=ee.CustomDropdownRender,Rt=ee.optionFilter,Dt=ee.dataSource,en=ee.toOptionsItem,Mn=en===void 0?function(co){return co}:en,An=ee.popupMatchSelectWidth,Cn=An===void 0?!1:An,Vt=B()(ee,Wt),sn=(0,Un.FC)(),Zn=(0,_n.FE)(Dt||sn),ur=(0,a.useRef)(!1),nr=(0,m.useFieldSchema)(),wn=(($=nr["x-component-props"])===null||$===void 0?void 0:$.addMode)==="quickAdd",tr=(0,d.useCollection_deprecated)(),Nn=tr.getField,or=(0,a.useRef)(null),pr=(0,d.useCollectionManager_deprecated)(),Qn=pr.getCollectionJoinField,Fn=pr.getInterface,er=nr["x-collection-field"]||nr.name,yn=Nn(er)||Qn(er),nn=Ct||(yn==null?void 0:yn.target)&&(fe==null?void 0:fe.label)&&Qn("".concat(yn.target,".").concat(fe.label)),Yn=(0,a.useMemo)(function(){if(nn!=null&&nn.interface){var co,ro=Fn(nn.interface),Po=(ro==null||(co=ro.filterable)===null||co===void 0?void 0:co.operators[0].value)||"$includes";return nn.type==="string"?"$includes":Po}return"$includes"},[nn]),ar=(0,pt.eJ)(),qn=(0,a.useCallback)(function(co){try{return co.filter(function(ro){return["number","string"].includes(an()(ro[fe.value]))||!ro[fe.value]}).map(function(ro){var Po,Fo,To=ar(ro[fe.label]);if(nn!=null&&(Po=nn.uiSchema)!==null&&Po!==void 0&&Po.enum)if(Array.isArray(To))To=To.map(function(Ho,aa){var fa=nn.uiSchema.enum.find(function(bi){return bi.value===Ho});return fa?(0,t.jsx)(Jt.Z,{role:"button",color:fa.color,style:{marginRight:3},children:(fa==null?void 0:fa.label)||Ho},aa):(0,t.jsx)(Jt.Z,{role:"button",children:Ho},Ho)}).reverse();else{var zo=nn.uiSchema.enum.find(function(Ho){return Ho.value===To});zo&&(To=(0,t.jsx)(Jt.Z,{role:"button",color:zo.color,children:zo.label}))}if((nn==null?void 0:nn.type)==="date"&&(To=Ht()(To).format("YYYY-MM-DD")),ft){var Aa;return ft((Aa={},ct()(Aa,fe.label,To||et),ct()(Aa,fe.value,ro[fe.value]),Aa))}return r()(r()({},ro),{},(Fo={},ct()(Fo,fe.label,To||et),ct()(Fo,fe.value,ro[fe.value]),Fo))}).filter(Boolean)}catch(ro){return console.error(ro),co}},[nn==null?void 0:nn.uiSchema,fe]),fr=(0,u.QT)(r()(r()({action:"list"},Se),{},{headers:Zn,params:r()(r()({pageSize:200},Se==null?void 0:Se.params),{},{filter:Se==null||(me=Se.params)===null||me===void 0?void 0:me.filter})}),r()({manual:Je,debounceWait:$e},Se.defaultParams?{defaultParams:[Se.defaultParams]}:{})),vr=fr.data,Pr=fr.run,Sr=fr.loading,Tr=(0,a.useMemo)(function(){return JSON.stringify({service:Se,fieldNames:fe})},[Se,fe]),br=(0,a.useCallback)(function(){return or.current&&_t?(0,t.jsx)(_t,{search:or.current,callBack:function(){or.current=null}}):null},[or.current]);(0,a.useEffect)(function(){ur.current&&Pr()},[Tr]);var Lr=function(){var co=O()(x()().mark(function ro(Po){var Fo;return x()().wrap(function(zo){for(;;)switch(zo.prev=zo.next){case 0:Pr({filter:(0,Gt.EO)([Po?ct()({},fe.label,ct()({},Yn,Po)):{},Se==null||(Fo=Se.params)===null||Fo===void 0?void 0:Fo.filter])}),or.current=Po;case 2:case"end":return zo.stop()}},ro)}));return function(Po){return co.apply(this,arguments)}}(),Xr=(0,a.useMemo)(function(){var co,ro=He||Ge;if(!(vr!=null&&(co=vr.data)!==null&&co!==void 0&&co.length))return ro!=null?Array.isArray(ro)?ro:[ro]:[];var Po=ro!=null&&(Array.isArray(ro)?ro.map(function(To){return r()(r()({},To),{},ct()({},fe.value,To[fe.value]||To))}):[r()(r()({},ro),{},ct()({},fe.value,ro[fe.value]||ro))])||[],Fo=typeof Rt=="function"?vr.data.filter(Rt):vr.data;return(0,Lt.uniqBy)(Fo.concat(Po??[]),fe.value)},[He,Ge,vr==null?void 0:vr.data,fe.value,Rt]),no=function(ro){or.current=null,ro&&Pr(),ur.current=!0};return(0,t.jsx)(dn,r()(r()({popupMatchSelectWidth:Cn,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:fe,onSearch:Lr,onDropdownVisibleChange:no,objectValue:Xe,value:He,defaultValue:Ge},Vt),{},{loading:vr?Sr:!0,options:Mn(qn(Xr)),rawOptions:Xr,dropdownRender:function(ro){var Po=Xr.some(function(Fo){return Fo[fe.label]===or.current});return(0,t.jsx)(t.Fragment,{children:wn?(0,t.jsxs)(t.Fragment,{children:[!((vr==null?void 0:vr.data.length)===0&&or!==null&&or!==void 0&&or.current)&&ro,(vr==null?void 0:vr.data.length)>0&&(or==null?void 0:or.current)&&!Po&&(0,t.jsx)(Rn.Z,{style:{margin:0}}),!Po&&(0,t.jsx)(br,{})]}):ro})}}))},(0,m.mapProps)({dataSource:"options"},function(ee,$){var me,pe=(0,m.useFieldSchema)();return r()(r()({},ee),{},{fieldNames:r()(r()(r()(r()({},gt),ee.fieldNames),$.componentProps.fieldNames),(me=pe["x-component-props"])===null||me===void 0?void 0:me.fieldNames),suffixIcon:$!=null&&$.loading||$!=null&&$.validating?(0,t.jsx)(In.Z,{}):ee.suffixIcon})}),(0,m.mapReadPretty)(xn))),Mt=Ft;Mt.ReadPretty=xn;var xt=null,mt=function(){var $=(0,m.useFieldSchema)(),me=(0,st.$)(),pe=me.t,fe=(0,We.bz)(),be=fe.duplicateData,Se=(0,d.useCollectionManager_deprecated)(),Le=Se.getCollectionJoinField;if(be)return be;var $e=we($),He=$e.items,Ge=He===void 0?[]:He,Xe=$e.display,Pt=Xe===void 0?!0:Xe;Ge.forEach(function(Ct){try{var _t;Ct.fields=(_t=Ct.fields)===null||_t===void 0?void 0:_t.map(function(Rt){var Dt=Le("".concat(Ct.collection,".").concat(Rt));return Dt?Rt:""}).filter(Boolean)}catch(Rt){(0,Ue.error)(Rt),Ct.fields=[]}});var Je=[{key:"none",title:pe("None")}].concat(Ge.map(function(Ct,_t){return r()(r()({key:_t},Ct),{},{isLeaf:Ct.dataId!==null&&Ct.dataId!==void 0,titleCollectionField:(Ct==null?void 0:Ct.titleField)&&Le("".concat(Ct.collection,".").concat(Ct.titleField))})})),ft=Ge.find(function(Ct){return Ct.default});return{templates:Je,display:Pt,defaultTemplate:ft,enabled:Ge.length>0&&Ge.every(function(Ct){return Ct.dataId||Ct.dataScope})}},At=a.memo(function(ee){var $=ee.style,me=$===void 0?{}:$,pe=ee.form,fe=(0,l.dQ)(),be=fe.token,Se=mt(),Le=Se.templates,$e=Se.display,He=Se.enabled,Ge=Se.defaultTemplate,Xe=(0,d.useCollectionManager_deprecated)(),Pt=Xe.getCollectionJoinField,Je=(0,at.ss)(Le),ft=(0,a.useState)((Ge==null?void 0:Ge.key)||"none"),Ct=Ke()(ft,2),_t=Ct[0],Rt=Ct[1],Dt=(0,a.useState)(null),en=Ke()(Dt,2),Mn=en[0],An=en[1],Cn=(0,u.LY)(),Vt=(0,st.$)(),sn=Vt.t,Zn=(0,Te.FC)(),ur=(0,Te.on)(Zn);(0,a.useEffect)(function(){He&&Ge&&pe&&(pe.__template=!0,Ge.key==="duplicate"&&Nn(Ge.dataId,Ge,ur))},[]),(0,a.useEffect)(function(){Je!=null&&Je.some(function(pr){return pr.key===_t})||tr("none")},[Je]);var nr=(0,a.useMemo)(function(){return r()({display:"flex",alignItems:"center",backgroundColor:be.colorFillAlter,padding:be.padding},me)},[me,be.colorFillAlter]),wn=(0,a.useMemo)(function(){return{fontSize:be.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:be.marginXS}},[be.fontSize,be.marginXS]),tr=(0,a.useCallback)(function(){var pr=O()(x()().mark(function Qn(Fn){return x()().wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:Rt(Fn),An(null),pe==null||pe.reset();case 3:case"end":return yn.stop()}},Qn)}));return function(Qn){return pr.apply(this,arguments)}}(),[]),Nn=(0,a.useCallback)(function(){var pr=O()(x()().mark(function Qn(Fn,er,yn){var nn;return x()().wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:nn=r()(r()({},er),{},{dataId:Fn}),An(er),Ie(Cn,nn,yn).then(function(qn){return pe&&qn&&(pe.reset(),pe.__template=!0,(0,Ue.forEach)(qn,function(fr,vr){if(fr){var Pr;pe.values[vr]=fr,pe==null||(Pr=pe.setInitialValuesIn)===null||Pr===void 0||Pr.call(pe,vr,fr)}})),qn}).catch(function(qn){console.error(qn)});case 3:case"end":return ar.stop()}},Qn)}));return function(Qn,Fn,er){return pr.apply(this,arguments)}}(),[]);if(!He||!$e)return null;var or=Je==null?void 0:Je.find(function(pr){return pr.key===_t});return(0,t.jsx)("div",{style:nr,children:(0,t.jsxs)(Ye.Z,{wrap:!0,children:[(0,t.jsxs)("label",{style:wn,children:[sn("Data template"),": "]}),(0,t.jsx)(Et.default,{role:"button","data-testid":"select-form-data-template",popupMatchSelectWidth:!1,options:Je,fieldNames:{label:"title",value:"key"},value:_t,onChange:tr}),_t!=="none"&&or&&(0,t.jsx)(Mt,{style:{width:220},fieldNames:{label:or==null?void 0:or.titleField,value:"id"},target:or==null?void 0:or.collection,value:Mn,objectValue:!0,service:{resource:or==null?void 0:or.collection,params:{filter:or==null?void 0:or.dataScope}},onChange:function(Qn){return Nn(Qn==null?void 0:Qn.id,r()(r()({},Qn),or),ur)},targetField:Pt("".concat(or==null?void 0:or.collection,".").concat(or.titleField))})]})})});At.displayName="NocoBaseFormDataTemplates";function we(ee){var $=(0,We.Fi)(ee);return $?rt().cloneDeep($["x-data-templates"])||{}:{}}function Ie(ee,$,me){return Ee.apply(this,arguments)}function Ee(){return Ee=O()(x()().mark(function ee($,me,pe){return x()().wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(!(me.fields.length===0||!me.dataId)){be.next=2;break}return be.abrupt("return");case 2:return be.abrupt("return",$.resource(me.collection,void 0,pe).get({filterByTk:me.dataId,fields:me.fields,isTemplate:!0}).then(function(Se){var Le;return(Le=Se.data)===null||Le===void 0?void 0:Le.data}));case 3:case"end":return be.stop()}},ee)})),Ee.apply(this,arguments)}var Be=function(){var $,me,pe=(0,ce.aZ)(),fe=(0,m.useFieldSchema)(),be=Ae.Z.useToken(),Se=be.token,Le=(0,pt.ng)(),$e=Le.designable,He=(0,Pe.gp)()||{},Ge=He.heightProps,Xe=Ge||{},Pt=Xe.title,Je=Xe.titleHeight,ft=mt(),Ct=ft.display,_t=ft.enabled,Rt=fe.reduceProperties(function(tr,Nn){return Nn["x-component"]==="ActionBar"?Nn:tr}),Dt=Object.keys((Rt==null?void 0:Rt.properties)||{}).length>0,en=fe==null||($=fe.parent)===null||$===void 0||($=$["x-decorator"])===null||$===void 0||(me=$.includes)===null||me===void 0?void 0:me.call($,"FormBlockProvider"),Mn=Dt||$e?Se.controlHeight+(en?1*Se.marginLG:24+Se.paddingLG):Se.marginLG,An=Pt?Je:0,Cn=(0,Te.xQ)(),Vt=(Cn==null?void 0:Cn.meta)||{},sn=Vt.count,Zn=Vt.pageSize,ur=sn>Zn,nr=ur?Se.controlHeightSM+24:0,wn=Ct&&_t?Se.controlHeight+2*Se.padding+Se.margin:0;return pe-Mn-Se.paddingLG-An-nr-wn},ze,tt,ot=["form","children"],it=["form","children","disabled"],$t=["form","disabled"],St=function($){var me=$.form,pe=$.children,fe=B()($,ot),be=(0,m.useField)(),Se=(0,m.useFieldSchema)(),Le=Oe.Gn===null||Oe.Gn===void 0?void 0:(0,Oe.Gn)(Se),$e=(0,pt.lI)(me.createVoidField(r()(r()({},be.props),{},{basePath:""}))),He=Be(),Ge=Ae.Z.useToken(),Xe=Ge.token,Pt=(Le==null?void 0:Le["x-component-props"])||{},Je=Pt.layout,ft=Je===void 0?"vertical":Je,Ct=Pt.labelAlign,_t=Ct===void 0?"left":Ct,Rt=Pt.labelWidth,Dt=Rt===void 0?120:Rt,en=Pt.labelWrap,Mn=en===void 0?!0:en;return(0,t.jsx)(m.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(m.FormContext.Provider,{value:me,children:(0,t.jsx)(g.FormLayout,r()(r()({layout:ft},fe),{},{labelAlign:_t,labelWidth:ft==="horizontal"?Dt:null,labelWrap:Mn,children:(0,t.jsx)("div",{className:(0,de.css)(ze||(ze=re()([`
|
|
792
|
+
`])))},Oe),{},{component:F.II.JSON}))}var he=e(57340),re=(0,l.createContext)([]);re.displayName="VariableScopeContext";function de(Oe){var Me=Oe.scope,Te=Me===void 0?[]:Me,ge=Oe.children;return(0,te.jsx)(re.Provider,{value:Te,children:ge})}function _e(){return(0,l.useContext)(re)}function Ae(){return null}Ae.Input=(0,w.connect)(We),Ae.TextArea=(0,G.t)((0,w.connect)(he.K,(0,w.mapReadPretty)(he.K.ReadPretty))),Ae.RawTextArea=(0,w.connect)(ye.f),Ae.JSON=(0,w.connect)(xe);var Fe=null},88969:function(Ne,ae,e){"use strict";e.d(ae,{m:function(){return y}});var w=e(15009),l=e.n(w),G=e(19632),i=e.n(G),x=e(99289),C=e.n(x),O=e(5574),o=e.n(O),k=e(97133),v=e(38089),j=e(67294),p=e(26793),M=e(46917),n=e(9783),b=e.n(n),N=(0,M.l6)("nb-variable-select",function(V){var Y=V.componentCls;return b()({},Y,{position:"relative",".ant-select.ant-cascader":{position:"absolute",top:"-1px",right:"-1px",minWidth:"auto",width:"calc(100% + 2px)",height:"calc(100% + 2px)",overflow:"hidden",opacity:0},".variable-btn":{fontStyle:"italic",fontFamily:"'New York', 'Times New Roman', Times, serif"},".Cascader-popupClassName":{".ant-cascader-menu":{marginBottom:0}}})}),r=N,a=e(2876),A=e(85893);function y(V){var Y=V.options,L=V.setOptions,h=V.onInsert,B=V.changeOnSelect,g=B===void 0?!1:B,S=V.fieldNames,m=S===void 0?{}:S,D=V.className,E=V.disabled,u=(0,p.$)(),d=u.t,c=(0,j.useState)([]),f=o()(c,2),z=f[0],T=f[1],W=r(),t=W.wrapSSR,I=W.componentCls,H=W.hashId,K=(0,M.dQ)(),U=K.token;function F(q){return te.apply(this,arguments)}function te(){return te=C()(l()().mark(function q(J){var Z,P;return l()().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(P=J[J.length-1],!(!((Z=P.children)!==null&&Z!==void 0&&Z.length)&&!P.isLeaf&&P.loadChildren)){le.next=5;break}return le.next=4,P.loadChildren(P);case 4:L(function(Q){return i()(Q)});case 5:case"end":return le.stop()}},q)})),te.apply(this,arguments)}return t((0,A.jsx)(a.R,{disabled:E,className:(0,k.cx)("x-button",I,H,D),children:(0,A.jsx)(v.Z,{disabled:E,placeholder:d("Select a variable"),value:[],options:Y,fieldNames:m,loadData:F,onChange:function(){var J,Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(T(Z),!!Z.length){var X=P[P.length-1];(!(X!=null&&(J=X.children)!==null&&J!==void 0&&J.length)&&!(X!=null&&X.loadChildren)||X!=null&&X.isLeaf)&&h(Z)}},changeOnSelect:g,onClick:function(J){if(!(J.detail!==2||!g))for(var Z=J.target;Z&&Z!==J.currentTarget;Z=Z.parentNode){var P;Array.from((P=Z.classList)!==null&&P!==void 0?P:[]).includes("ant-cascader-menu-item")&&h(z)}},popupClassName:"Cascader-popupClassName",dropdownRender:g?function(q){return(0,A.jsxs)(A.Fragment,{children:[q,(0,A.jsx)("div",{style:{padding:"0.5em",borderTop:"1px solid ".concat(U.colorBorder),color:U.colorTextDescription},children:d("Double click to choose entire object")})]})}:null})}))}},2876:function(Ne,ae,e){"use strict";e.d(ae,{R:function(){return C}});var w=e(97857),l=e.n(w),G=e(15867),i=e(67294),x=e(85893),C=(0,i.forwardRef)(function(O,o){var k=(0,i.useMemo)(function(){return{fontStyle:"italic",fontFamily:"New York, Times New Roman, Times, serif"}},[]);return(0,x.jsxs)(G.ZP,l()(l()({"aria-label":"variable-button",ref:o,style:k},O),{},{children:["x",O.children]}))});C.displayName="XButton"},74866:function(Ne,ae,e){"use strict";e.d(ae,{y:function(){return i}});var w=e(9783),l=e.n(w),G=e(46917),i=(0,G.l6)("nb-variable",function(x,C){var O=x.componentCls,o=x.lineWidth,k=x.colorFillQuaternary,v=x.paddingSM-1,j=8,p=j-o,M=x.fontSizeSM,n="".concat(x.lineHeightSM*M,"px"),b=k;return l()({},O,{width:"auto",display:"flex","&.ant-input-group-compact":{display:"flex"},".ant-input-disabled":{".ant-tag":{color:"#bfbfbf",borderColor:"#d9d9d9"}},".ant-input.null-value":{width:"4em",minWidth:"4em"},".ant-formily-item .ant-formily-item-control .ant-formily-item-control-content .ant-formily-item-control-content-component":{lineHeight:"normal"},".ant-formily-item":{marginBottom:0},".ant-input":C!=null&&C.hideVariableButton?{}:{borderTopRightRadius:0,borderBottomRightRadius:0},".ant-tag":{display:"inline-block",height:"auto",marginInlineEnd:x.marginXS,paddingInline:p,fontSize:M,lineHeight:n,whiteSpace:"nowrap",background:b,border:"".concat(x.lineWidth,"px ").concat(x.lineType," ").concat(x.colorBorder),borderRadius:x.borderRadiusSM,opacity:1,transition:"all ".concat(x.motionDurationMid),textAlign:"start"},".ant-tag-blue":{color:x.colorPrimaryText,background:x.colorPrimaryBg,borderColor:x.colorPrimaryBorder},".clear-button":{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:v,zIndex:1,display:"none",width:x.fontSizeIcon,height:x.fontSizeIcon,marginTop:-x.fontSizeIcon/2,color:x.colorTextQuaternary,fontSize:x.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:x.colorBgContainer,cursor:"pointer",opacity:.8,transition:"color ".concat(x.motionDurationMid," ease, opacity ").concat(x.motionDurationSlow," ease"),textRendering:"auto",userSelect:"none","&:before":{display:"block"},"&:hover":{color:x.colorTextTertiary}},".ant-btn":{height:"auto"},".variable":{flex:1}})})},72724:function(Ne,ae,e){"use strict";e.d(ae,{L:function(){return M}});var w=e(97857),l=e.n(w),G=e(5574),i=e.n(G),x=e(23861),C=e(67294),O=e(26793),o=e(21143),k=e(84577),v=e(85893),j=function(b){var N=(0,k.ng)(),r=N.refresh,a=(0,o.useAPIClient)(),A=(0,O.$)(),y=A.t;return(0,C.useCallback)(function(V){var Y,L,h,B,g,S,m,D,E=V.active,u=V.over,d=E==null||(Y=E.data)===null||Y===void 0||(Y=Y.current)===null||Y===void 0?void 0:Y.schema,c=u==null||(L=u.data)===null||L===void 0||(L=L.current)===null||L===void 0?void 0:L.schema,f=u==null||(h=u.data)===null||h===void 0||(h=h.current)===null||h===void 0?void 0:h.insertAdjacent,z=u==null||(B=u.data)===null||B===void 0||(B=B.current)===null||B===void 0?void 0:B.breakRemoveOn,T=u==null||(g=u.data)===null||g===void 0||(g=g.current)===null||g===void 0?void 0:g.wrapSchema,W=u==null||(S=u.data)===null||S===void 0||(S=S.current)===null||S===void 0?void 0:S.onSuccess,t=(m=u==null||(D=u.data)===null||D===void 0||(D=D.current)===null||D===void 0?void 0:D.removeParentsIfNoChildren)!==null&&m!==void 0?m:!0;if(!d||!c){b==null||b(V);return}if(d===c){b==null||b(V);return}if(d.parent===c&&f==="beforeEnd"){b==null||b(V);return}var I=(0,k.Pl)({t:y,api:a,refresh:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=K.refreshParentSchema,F=U===void 0?!0:U;return r({refreshParentSchema:F})},current:c});if(I.loadAPIClientEvents(),d.parent===c.parent){I.insertBeforeBeginOrAfterEnd(d),b==null||b(V);return}if(f){I.insertAdjacent(f,d,{wrap:T,breakRemoveOn:z,removeParentsIfNoChildren:t,onSuccess:W}),b==null||b(V);return}},[a,b,r,y])},p=C.memo(function(n){var b=(0,O.$)(),N=b.t,r=(0,C.useState)(!0),a=i()(r,2),A=a[0],y=a[1],V=(0,C.useCallback)(function(L){var h,B=L.active,g=B==null||(h=B.data)===null||h===void 0||(h=h.current)===null||h===void 0?void 0:h.schema;if(y(!!g),n!=null&&n.onDragStart){var S;n==null||(S=n.onDragStart)===null||S===void 0||S.call(n,L)}},[n==null?void 0:n.onDragStart]),Y=j(n==null?void 0:n.onDragEnd);return(0,v.jsxs)(x.DndContext,l()(l()({collisionDetection:x.rectIntersection},n),{},{onDragStart:V,onDragEnd:Y,children:[(0,v.jsx)(x.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:A&&(0,v.jsx)("span",{style:{whiteSpace:"nowrap"},children:N("Dragging")})}),n.children]}))});p.displayName="InternalDndContext";var M=function(b){return(0,v.jsx)(p,l()({},b))}},14896:function(Ne,ae,e){"use strict";e.r(ae),e.d(ae,{DndContext:function(){return w.L},DragHandler:function(){return l.IW},DraggableContext:function(){return l.LC},ShowFormData:function(){return C},Sortable:function(){return l.bt},SortableContext:function(){return l.Fo},SortableItem:function(){return l.TR},SortableProvider:function(){return l.OR},getRenderContent:function(){return O.I9}});var w=e(72724),l=e(20493),G=e(67294),i=e(80844),x=e(85893),C=(0,i.observer)(function(o){var k=o.children,v=(0,i.useForm)();return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("pre",{style:{marginBottom:20},"data-testid":"form-data",children:JSON.stringify(v.values,null,2)}),k]})}),O=e(7840)},20493:function(Ne,ae,e){"use strict";e.d(ae,{IW:function(){return S},LC:function(){return a},bt:function(){return Y},Fo:function(){return A},TR:function(){return g},OR:function(){return y}});var w=e(97857),l=e.n(w),G=e(13769),i=e.n(G),x=e(10274),C=e(23861),O=e(97133),o=e(80844),k=e(96486),v=e.n(k),j=e(67294),p=e(46917),M=e(84577),n=e(85893),b=["component","overStyle","style","children","openMode"],N=["schema","id","eid","removeParentsIfNoChildren"],r=["component"],a=(0,j.createContext)(null);a.displayName="DraggableContext";var A=(0,j.createContext)(null);A.displayName="SortableContext";var y=function(D){var E=D.id,u=D.data,d=D.children,c=(0,C.useDraggable)({id:E,data:u}),f=(0,C.useDroppable)({id:E,data:u}),z=(0,j.useMemo)(function(){return{draggable:c,droppable:f}},[c,f]);return(0,n.jsx)(A.Provider,{value:z,children:d})},V=function(D){return new x.C(D).setAlpha(.15).toHex8String()},Y=function(D){var E,u,d=D.component,c=D.overStyle,f=D.style,z=D.children,T=D.openMode,W=i()(D,b),t=(0,p.dQ)(),I=t.token,H=(0,j.useContext)(A),K=H.draggable,U=H.droppable,F=U.isOver,te=U.setNodeRef,q=l()({},f),J=(0,o.useFieldSchema)(),Z=(J==null?void 0:J["x-component"])==="Action.Link"||d==="a";return F&&(K==null||(E=K.active)===null||E===void 0?void 0:E.id)!==(U==null||(u=U.over)===null||u===void 0?void 0:u.id)&&(q[Z?"color":"background"]=V(I.colorSettings),Object.assign(q,c)),j.createElement(d||"div",l()(l()({role:"none"},W),{},{className:(0,O.cx)("nb-sortable-designer",D.className),ref:te,style:q,setNodeRef:te}),z)},L=function(D){var E=h(D),u=(0,o.useFieldSchema)();return D.schema?l()(l()({},D),{},{id:E}):l()(l()({},D),{},{id:E,schema:u})},h=function(D){var E,u=(0,o.useField)();return D.id?D.id:(E=u.address)===null||E===void 0?void 0:E.toString()},B=(0,o.observer)(function(m){var D=L(m),E=D.schema,u=D.id,d=D.eid,c=D.removeParentsIfNoChildren,f=i()(D,N),z=(0,j.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:E,removeParentsIfNoChildren:c??!0}},[E,c]);return(0,n.jsx)(y,{id:u,data:z,children:(0,n.jsx)(Y,l()(l()({id:d},f),{},{children:m.children}))})},{displayName:"InternalSortableItem"}),g=j.memo(function(m){var D=m.component,E=i()(m,r),u=(0,M.ng)(),d=u.designable;return d?(0,n.jsx)(B,l()({},m)):j.createElement(D||"div",v().omit(E,["children","schema","overStyle","openMode","id","eid","removeParentsIfNoChildren"]),m.children)});g.displayName="SortableItem";var S=function(D){var E=(0,j.useContext)(A)||{},u=E.draggable;if(!u)return null;var d=u.attributes,c=u.listeners,f=u.setNodeRef;return(0,n.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,n.jsx)("div",l()(l()(l()({ref:f,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},c),d),{},{role:"none",children:(0,n.jsx)("span",{style:{cursor:"move",fontSize:14},children:D.children})}))})}},7840:function(Ne,ae,e){"use strict";e.d(ae,{I9:function(){return S},Rq:function(){return Y},e7:function(){return y},jC:function(){return h},od:function(){return V}});var w=e(97857),l=e.n(w),G=e(15009),i=e.n(G),x=e(9783),C=e.n(x),O=e(5574),o=e.n(O),k=e(99289),v=e.n(k),j=e(52677),p=e.n(j),M=e(84157),n=e(96486),b=e.n(n),N=e(10097),r=e(76690),a=e(65565),A=e(61341),y=function(E,u){var d,c=/{{(.*?)}}/,f=E==null||(d=E.match)===null||d===void 0?void 0:d.call(E,c);if(f){var z=b().get(u,f[1]);return b().isFunction(z)?z():z}else return E};function V(D){if(p()(D)!=="object"||D===null)return null;for(var E in D)if(Object.prototype.hasOwnProperty.call(D,E))return Object.prototype.toString.call(D[E])==="[object Object]"&&D[E]!==null?V(D[E]):{key:E,value:D[E]};return null}var Y=function(E){var u=L(E),d=(0,n.findIndex)(u,function(f,z,T){if(f.includes("$")&&z>0)return!0}),c=u.slice(0,d);return c};function L(D){var E=[];function u(d){Object.keys(d).sort().forEach(function(c){E.push(c),d[c]&&p()(d[c])==="object"&&u(d[c])})}return u(D),E}var h=function(){var D=v()(i()().mark(function E(u,d){var c,f,z,T,W,t,I;return i()().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return c=u.ruleGroup,f=u.variables,z=u.localVariables,T=u.variableNameOfLeftCondition,W=Object.keys(c)[0]||"$and",t=c[W],I=t.map(function(){var U=v()(i()().mark(function F(te){var q,J,Z,P,X,le,Q,oe,Ce,se,De,We,ye,ve;return i()().wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(!("$and"in te||"$or"in te)){he.next=4;break}return he.next=3,h({ruleGroup:te,variables:f,localVariables:z},d);case 3:return he.abrupt("return",he.sent);case 4:if(q=V(te),J=q==null?void 0:q.key,J){he.next=8;break}return he.abrupt("return",!0);case 8:return Z=B(Y(te),T),P=f.parseVariable(Z,z,{doNotRequest:!0}).then(function(re){var de=re.value;return de}),X=(0,r.cG)(q==null?void 0:q.value)?[f.parseVariable(q==null?void 0:q.value,z).then(function(re){var de=re.value;return de}),P]:[q==null?void 0:q.value,P],he.prev=11,he.next=14,Promise.all(X);case 14:return le=he.sent,Q=o()(le,2),oe=Q[0],Ce=Q[1],he.next=20,f.getCollectionField(Z,z);case 20:return se=he.sent,De=(0,a.J)(Ce,{targetCollectionField:se}),We=(0,a.J)(oe,{targetCollectionField:se}),se!=null&&se.type&&["datetime","date","datetimeNoTz","dateOnly","unixTimestamp"].includes(se.type)&&De&&(ye=(0,A.CE)(We),ve=(0,M.getPickerFormat)(ye),De=(0,M.dayjs)(De).format(ve)),he.abrupt("return",d.apply(C()({},J,[De,We])));case 27:throw he.prev=27,he.t0=he.catch(11),he.t0;case 30:case"end":return he.stop()}},F,null,[[11,27]])}));return function(F){return U.apply(this,arguments)}}()),K.next=6,Promise.all(I);case 6:if(I=K.sent,W!=="$and"){K.next=11;break}return K.abrupt("return",(0,n.every)(I,function(U){return U}));case 11:if(!I.length){K.next=13;break}return K.abrupt("return",(0,n.some)(I,function(U){return U}));case 13:return K.abrupt("return",!0);case 14:case"end":return K.stop()}},E)}));return function(u,d){return D.apply(this,arguments)}}();function B(D){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(E,".").concat(D.join(".")," }}")}var g=function(E){var u={};return E.map(function(d){u[d.name]=d.ctx}),u};function S(D,E,u,d,c){return m.apply(this,arguments)}function m(){return m=v()(i()().mark(function D(E,u,d,c,f){var z,T,W,t,I,H,K,U,F;return i()().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(!(u&&E==="handlebars")){q.next=19;break}return q.prev=1,W=M.Handlebars.compile(u),t=g(c),I=(d==null||(z=d.ctxRef)===null||z===void 0?void 0:z.current)||{},H=I.$nDate,K={},Object.keys(H||{}).map(function(J){K[J]=H[J]()}),U=W(l()(l()(l()({},d==null||(T=d.ctxRef)===null||T===void 0?void 0:T.current),t),{},{$nDate:K})),q.next=10,f(U);case 10:return q.abrupt("return",q.sent);case 13:return q.prev=13,q.t0=q.catch(1),console.log(q.t0),q.abrupt("return",u);case 17:q.next=32;break;case 19:return q.prev=19,q.next=22,(0,N.replaceVariableValue)(u,d,c);case 22:return F=q.sent,q.next=25,f(F);case 25:return q.abrupt("return",q.sent);case 28:return q.prev=28,q.t1=q.catch(19),console.log(q.t1),q.abrupt("return",u);case 32:case"end":return q.stop()}},D,null,[[1,13],[19,28]])})),m.apply(this,arguments)}},25145:function(Ne,ae,e){"use strict";e.d(ae,{u:function(){return Y}});var w=e(5574),l=e.n(w),G=e(97857),i=e.n(G),x=e(13769),C=e.n(x),O=e(80844),o=e(96486),k=e(67294),v=e(62954),j=e(75585),p=e(22891),M={type:"void","x-component":"Action.Container","x-action":"view",title:'{{ t("View record") }}',"x-component-props":{className:"nb-action-popup"},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab",properties:{tab1:{type:"void",title:'{{t("Details")}}',"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"popup:common:addBlock",properties:{}}}}}}}},n=e(94804),b=e(57105),N=e(73691),r=e(85893),a=["WrappedComponent"],A=function(){var h=(0,O.useFieldSchema)(),B=(0,v.ngQ)(),g=B.insertAfterBegin,S=(0,k.useCallback)(function(m){var D=h.reduceProperties(function(E,u){return u["x-component"]==="Action.Container"?u:E},null);D||g((0,o.cloneDeep)(m))},[h,g]);return S},y=function(h){return h["x-component"]==="Action.Container"},V=function(h){var B=h.WrappedComponent,g=C()(h,a),S=(0,O.useFieldSchema)(),m=(0,p.ES)(),D=m.openPopup,E=(0,k.useRef)(!1),u=A(),d=(0,k.useRef)(S);d.current=S;var c=(0,k.useCallback)(function(){return d.current},[]),f=(0,k.useCallback)(function(){S.properties||(u(M),E.current=!0),E.current?(setTimeout(function(){D({customActionSchema:c()})}),E.current=!1):S.properties&&D()},[S,u,D,c]);return(0,r.jsx)("a",{onClick:f,children:(0,r.jsx)(B,i()({},g))})};function Y(L){return function(h){var B=(0,k.useState)(!1),g=l()(B,2),S=g[0],m=g[1],D=(0,k.useState)(!1),E=l()(D,2),u=E[0],d=E[1],c=(0,n.Kx)(),f=(0,v.XCj)(),z=(0,O.useField)(),T=(0,O.useFieldSchema)(),W=(T==null?void 0:T["x-component-props"])||{},t=W.enableLink,I=W.openMode,H=W.openSize,K=(0,p.ES)(),U=K.visibleWithURL,F=K.setVisibleWithURL,te=(0,k.useCallback)(function(Z){m==null||m(Z),F==null||F(Z)},[F]),q=(0,k.useRef)(T);q.current=T;var J=f.setSubmitted;return t?(0,r.jsx)(j.OA,{visible:!1,children:(0,r.jsxs)(v.EIK,{button:(0,r.jsx)(L,i()({},h)),visible:S||U,setVisible:te,formValueChanged:u,setFormValueChanged:d,openMode:I,openSize:H,containerRefKey:"field-popup",fieldSchema:T,setSubmitted:J,children:[(0,r.jsx)(n.YQ,{name:c.name,children:(0,r.jsx)(v.G0E,{children:(0,r.jsx)(N.Rm,{children:(0,r.jsx)(b.sq,{onlyRenderProperties:!0,basePath:z==null?void 0:z.address,schema:T,filterProperties:y})})})}),(0,r.jsx)(V,i()(i()({},h),{},{WrappedComponent:L}))]})}):(0,r.jsx)(L,i()({},h))}}},61736:function(Ne,ae,e){"use strict";e.d(ae,{D:function(){return l}});var w=e(67294),l=(0,w.createContext)({});l.displayName="SchemaComponentContext.Provider"},44245:function(Ne,ae,e){"use strict";e.d(ae,{R:function(){return n}});var w=e(97857),l=e.n(w),G=e(13769),i=e.n(G),x=e(86201),C=e(80844),O=e(67294),o=e(47844),k=e(85893),v=["children","form"],j=["children"],p=function(N){var r=N.children,a=N.form,A=i()(N,v),y=(0,O.useContext)(C.SchemaOptionsContext),V=(0,O.useContext)(C.SchemaExpressionScopeContext),Y=l()(l()({},y==null?void 0:y.scope),V),L=l()({},y==null?void 0:y.components);return(0,k.jsx)(C.FormProvider,l()(l()({},A),{},{form:a,children:(0,k.jsx)(o.G,{components:L,scope:Y,children:r})}))},M=function(N){var r=N.children,a=i()(N,j),A=(0,O.useContext)(C.SchemaOptionsContext),y=(0,O.useContext)(C.SchemaExpressionScopeContext),V=l()(l()({},A==null?void 0:A.scope),y),Y=l()({},A==null?void 0:A.components),L=(0,O.useMemo)(function(){return(0,x.createForm)()},[]);return(0,k.jsx)(C.FormProvider,l()(l()({},a),{},{form:L,children:(0,k.jsx)(o.G,{components:Y,scope:V,children:r})}))},n=function(N){return N.form?(0,k.jsx)(p,l()({},N)):(0,k.jsx)(M,l()({},N))}},93587:function(Ne,ae,e){"use strict";e.d(ae,{m:function(){return r}});var w=e(97857),l=e.n(w),G=e(86201),i=e(80844),x=e(57953),C=e(67294),O=e(54195),o=e(21044),k=e(84577),v=e(44245),j=e(93323),p=e(12174),M=function(A){var y=A.uid,V=A.type,Y=V===void 0?"getJsonSchema":V,L=A.onSuccess,h={url:"/uiSchemas:".concat(Y,"/").concat(y)},B=(0,p.QT)(h,{refreshDeps:[y],onSuccess:function(D){L&&L(D)}}),g=B.data,S=B.loading;return{schema:g==null?void 0:g.data,loading:S}},n=e(85893),b=function(A){return A},N=function(A){var y=A.noForm,V=A.onlyRenderProperties,Y=A.hidden,L=A.scope,h=A.uid,B=A.components,g=A.onSuccess,S=A.NotFoundPage,m=A.schemaTransform,D=m===void 0?b:m,E=A.onPageNotFind,u=V?"getProperties":"getJsonSchema",d=(0,C.useMemo)(function(){return(0,G.createForm)()},[h]),c=M({uid:h,type:u,onSuccess:function(H){g&&g(H)}}),f=c.schema,z=c.loading,T=(0,k.Co)(S),W=(0,O.Kk)(),t=(0,i.useFieldSchema)();return W||z||Y?(0,n.jsx)(x.Z,{style:{width:"100%",marginTop:20},delay:o.fw}):!f||Object.keys(f).length===0?(E&&E(),T?(0,n.jsx)(T,{}):null):y?(0,n.jsx)(j.n,{components:B,scope:L,schema:D(f||{}),parentSchema:t}):(0,n.jsx)(v.R,{form:d,children:(0,n.jsx)(j.n,{components:B,scope:L,schema:D(f||{}),parentSchema:t})})},r=(0,C.memo)(function(a){return a.uid?(0,n.jsx)(N,l()({},a)):null});r.displayName="RemoteSchemaComponent"},93323:function(Ne,ae,e){"use strict";e.d(ae,{A:function(){return y},n:function(){return L}});var w=e(97857),l=e.n(w),G=e(13769),i=e.n(G),x=e(9783),C=e.n(x),O=e(80844),o=e(96486),k=e.n(o),v=e(67294),j=e(57105),p=e(61736),M=e(47844),n=e(85893),b=["components","scope","schema","distributed","onChange","parentSchema"],N=["schema","parentSchema"],r=["memoized"];function a(h){return O.Schema.isSchemaInstance(h)?h:h!=null&&h.name?new O.Schema({type:"object",properties:C()({},h.name,h),name:"p_".concat(h.name)}):new O.Schema(h)}var A=function(B){return(0,v.useMemo)(function(){return a(B)},[])},y=(0,v.createContext)({onChange:k().noop}),V=(0,v.memo)(function(h){var B=h.components,g=h.scope,S=h.schema,m=h.distributed,D=h.onChange,E=h.parentSchema,u=i()(h,b),d=(0,v.useContext)(p.D),c=(0,v.useMemo)(function(){return a(S)},[S]),f=(0,v.useMemo)(function(){return l()(l()({},d),{},{distributed:d.distributed==!1?!1:m,refresh:d.refresh||k().noop})},[d,m]),z=(0,v.useContext)(y),T=z.onChange,W=(0,v.useMemo)(function(){return{onChange:function(){D==null||D(c),T==null||T()}}},[D,T,c]);return(0,n.jsx)(y.Provider,{value:W,children:(0,n.jsx)(p.D.Provider,{value:f,children:(0,n.jsx)(M.G,{inherit:!0,components:B,scope:g,children:(0,n.jsx)(j.sq,l()(l()({},u),{},{schema:c,isUseFormilyField:!0,parentSchema:E}))})})})});V.displayName="RecursionSchemaComponent";var Y=(0,v.memo)(function(h){var B=h.schema,g=h.parentSchema,S=i()(h,N),m=A(B);return(0,n.jsx)(V,l()(l()({},S),{},{schema:m,parentSchema:g}))});Y.displayName="MemoizedSchemaComponent";var L=(0,v.memo)(function(h){var B=h.memoized,g=i()(h,r);return B?(0,n.jsx)(Y,l()({},g)):(0,n.jsx)(V,l()({},g))});L.displayName="SchemaComponent"},47844:function(Ne,ae,e){"use strict";e.d(ae,{B:function(){return C},G:function(){return O}});var w=e(97857),l=e.n(w),G=e(80844),i=e(67294),x=e(85893),C=function(){var k=(0,i.useContext)(G.SchemaOptionsContext);return k||{}},O=(0,i.memo)(function(o){var k=o.children,v=C(),j=(0,i.useMemo)(function(){return l()(l()({},v.components),o.components)},[v.components,o.components]),p=(0,i.useMemo)(function(){return l()(l()({},v.scope),o.scope)},[v.scope,o.scope]),M=(0,i.useMemo)(function(){return{scope:p,components:j}},[p,j]);return(0,x.jsx)(G.SchemaOptionsContext.Provider,{value:M,children:(0,x.jsx)(G.SchemaComponentsContext.Provider,{value:j,children:(0,x.jsx)(G.ExpressionScope,{value:p,children:k})})})});O.displayName="SchemaComponentOptions"},70993:function(Ne,ae,e){"use strict";e.d(ae,{_b:function(){return h},RV:function(){return B.R},m1:function(){return g.m},n6:function(){return S.n},AT:function(){return S.A},G0:function(){return m.G},a$:function(){return te},Tz:function(){return U},Bs:function(){return m.B}});var w=e(15009),l=e.n(w),G=e(99289),i=e.n(G),x=e(12444),C=e.n(x),O=e(72004),o=e.n(O),k=e(31996),v=e.n(k),j=e(26037),p=e.n(j),M=e(18205),n=e(83062),b=e(15867),N=e(67294),r=e(49218),a=e(26793),A=e(62954),y=e(68230),V=e(85893),Y={backgroundColor:"var(--colorSettings) !important"},L={backgroundColor:"transparent"},h=function(){var Z=(0,A.ngQ)(),P=Z.designable,X=Z.setDesignable,le=(0,a.$)(),Q=le.t,oe=(0,y.d)(),Ce=oe.token,se=P?Y:L;return(0,r.y1)("Ctrl+Shift+U",function(){return X(!P)},[P]),(0,V.jsx)(n.Z,{title:Q("UI Editor"),children:(0,V.jsx)(b.ZP,{"data-testid":"ui-editor-button",icon:(0,V.jsx)(M.Z,{style:{color:Ce.colorTextHeaderMenu}}),title:Q("UI Editor"),style:se,onClick:function(){X(!P)}})})},B=e(44245),g=e(93587),S=e(93323),m=e(47844),D=e(97857),E=e.n(D),u=e(5574),d=e.n(u),c=e(86201),f=e(80844),z=e(84327),T=e(96486),W=e.n(T),t=e(61736),I=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(Z).concat((0,z.uid)())};f.Schema.silent(!0);var H={},K={silent:!0,compile:function(Z){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=function(){if(K.silent)try{return new Function("$root","with($root) { return (".concat(Z,"); }"))(P)}catch{return"{{".concat(Z,"}}")}else return new Function("$root","with($root) { return (".concat(Z,"); }"))(P)};return H[Z]?H[Z]:Z.trim().startsWith("t(")?(H[Z]=X(),H[Z]):X()}};f.Schema.registerCompiler(K.compile);var U=function(Z){var P=Z.designable,X=Z.onDesignableChange,le=Z.components,Q=Z.children,oe=(0,N.useContext)(t.D),Ce=(0,m.B)(),se=(0,N.useState)(function(){return(0,z.uid)()}),De=d()(se,2),We=De[0],ye=De[1],ve=(0,N.useMemo)(function(){return Z.form||(0,c.createForm)()},[We]),xe=(0,a.$)(),he=xe.t,re=(0,N.useMemo)(function(){return E()(E()({},Z.scope),{},{t:he,randomString:I})},[Z.scope,he,Ce==null?void 0:Ce.scope]),de=(0,N.useState)(P),_e=d()(de,2),Ae=_e[0],Fe=_e[1],Oe=(0,N.useMemo)(function(){return typeof P=="boolean"?P:Ae},[P,Ae,oe.designable]),Me=(0,N.useMemo)(function(){return function(ie){typeof Oe!="boolean"&&Fe(ie),X==null||X(ie)}},[Oe,X]),Te=(0,N.useCallback)(function(){ye((0,z.uid)())},[]),ge=(0,N.useMemo)(function(){return{scope:re,components:le,reset:Te,refresh:W().noop,designable:Oe,setDesignable:Me}},[le,Oe,Te,re,Me]);return(0,V.jsx)(t.D.Provider,{value:ge,children:(0,V.jsx)(f.FormProvider,{form:ve,children:(0,V.jsx)(m.G,{inherit:!0,scope:re,components:le,children:Q})})})};U.displayName="SchemaComponentProvider";var F=e(31601),te=function(J){v()(P,J);var Z=p()(P);function P(){return C()(this,P),Z.apply(this,arguments)}return o()(P,[{key:"load",value:function(){var X=i()(l()().mark(function Q(){return l()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:this.addComponents();case 1:case"end":return Ce.stop()}},Q,this)}));function le(){return X.apply(this,arguments)}return le}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:h})}}]),P}(F.S),q=null},84577:function(Ne,ae,e){"use strict";e.d(ae,{zz:function(){return O.zz},Pl:function(){return O.Pl},oB:function(){return O.oB},lI:function(){return l},hi:function(){return V.hi},eJ:function(){return G.e},Co:function(){return C},aZ:function(){return V.aZ},ng:function(){return O.ng},et:function(){return o.e},cL:function(){return N},fd:function(){return Y},Cl:function(){return j},vH:function(){return A},sR:function(){return O.sR},wN:function(){return y.w},Dm:function(){return M},fM:function(){return V.fM}});var w=e(67294),l=function(h){var B=(0,w.useRef)(null);return(0,w.useEffect)(function(){return B.current&&h!==B.current&&B.current.onUnmount(),B.current=h,h.onMount(),function(){h.onUnmount()}},[h]),h},G=e(96365),i=e(80844),x=e(96486),C=function(h,B){var g=(0,w.useContext)(i.SchemaOptionsContext),S=g.components;return h?typeof h!="string"?h:(0,x.get)(S,h)||B:B},O=e(94516),o=e(98146),k=e(97857),v=e.n(k),j=function(h){var B=(0,w.useContext)(i.SchemaOptionsContext),g=(0,w.useContext)(i.SchemaExpressionScopeContext),S=(0,w.useRef)();return S.current=g,h.toFieldProps(v()(v()({},B),{},{get scope(){return v()(v()({},B.scope),S.current)}}))},p=e(61736);function M(){return(0,w.useContext)(p.D)}var n=e(26793),b=e(6145),N=function(){var h,B=(0,b.useCollectionManager_deprecated)(),g=B.getCollectionJoinField,S=B.getCollection,m=(0,i.useFieldSchema)(),D=(0,b.useCollection_deprecated)(),E=D.getField,u=E(m.name)||g(m["x-collection-field"]),d=(0,n.$)(),c=d.t,f=((h=m["x-component-props"])===null||h===void 0?void 0:h.fieldNames)||{},z=f.label,T=(0,w.useMemo)(function(){if(!(!u||!(u!=null&&u.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(u.interface)){var W=S(u.target);if((W==null?void 0:W.template)==="file")return[{label:c("Record picker"),value:"CollectionField"},{label:c("Select"),value:"AssociationSelect"}];switch(u.interface){case"o2m":return[{label:c("Record picker"),value:"CollectionField"},{label:c("Subtable"),value:"TableField"},{label:c("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:c("Record picker"),value:"CollectionField"},{label:c("Select"),value:"AssociationSelect"}];default:return[{label:c("Record picker"),value:"CollectionField"},{label:c("Subform"),value:"FormField"},{label:c("Select"),value:"AssociationSelect"}]}}},[c,u==null?void 0:u.interface,z]);return T},r=e(35746),a=e(58837),A=function(){var h,B=(0,i.useField)(),g=(0,i.useFieldSchema)(),S=(0,a.Kx)(),m=(0,r.d9)(),D=(S==null?void 0:S.getField(g.name))||(m==null?void 0:m.getCollectionField(g["x-collection-field"])),E=(0,G.e)();(0,w.useEffect)(function(){if(!(B!=null&&B.title)){var u;B.title=E(D==null||(u=D.uiSchema)===null||u===void 0?void 0:u.title)}},[D==null||(h=D.uiSchema)===null||h===void 0?void 0:h.title])},y=e(9780),V=e(18686),Y=function(h){var B,g=(0,n.$)(),S=g.t,m=(0,b.useCollectionManager_deprecated)(),D=m.getCollectionJoinField,E=m.getCollection,u=(0,i.useFieldSchema)(),d=(h==null?void 0:h.fieldSchema)||u,c=(0,i.useField)(),f=(0,i.useForm)(),z=(d==null?void 0:d["x-read-pretty"])||c.readPretty||f.readPretty,T=h==null?void 0:h.fieldSchema,W=(0,b.useCollection_deprecated)(),t=W.getField,I=(h==null?void 0:h.collectionField)||t(d.name)||D(d["x-collection-field"]),H=((B=d["x-component-props"])===null||B===void 0?void 0:B.fieldNames)||{},K=H.label,U=(0,w.useMemo)(function(){if(!(!I||!(I!=null&&I.interface))&&["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(I.type)){var F=E(I.target);if((F==null?void 0:F.template)==="file")return z?[{label:S("Title"),value:"Select"},{label:S("File manager"),value:"FileManager"},{label:S("Tag"),value:"Tag"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},{label:S("File manager"),value:"FileManager"}];if((F==null?void 0:F.template)==="tree"&&["m2m","o2m","m2o"].includes(I.interface))return z?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!T&&{label:S("Sub-details"),value:"Nester"},!T&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!T&&["m2m","o2m"].includes(I.interface)&&{label:S("Sub-table"),value:"SubTable"},!T&&{label:S("Cascade Select"),value:"CascadeSelect"},!T&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];switch(I.interface){case"o2m":return z?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!T&&{label:S("Sub-table"),value:"SubTable"},!T&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!T&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"},!T&&{label:S("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return z?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!T&&{label:S("Sub-details"),value:"Nester"},!T&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!T&&{label:S("Sub-table"),value:"SubTable"},!T&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return z?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!T&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!T&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];default:return z?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!T&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!T&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}]}}},[S,I==null?void 0:I.interface,K]);return(U||[]).filter(Boolean)}},18686:function(Ne,ae,e){"use strict";e.d(ae,{aZ:function(){return L},fM:function(){return B},hi:function(){return h}});var w=e(5574),l=e.n(w),G=e(97857),i=e.n(G),x=e(80844),C=e(83204),O=e(9361),o=e(96486),k=e.n(o),v=e(67294),j=e(89250),p=e(62954),M=e(21143),n=e(10097),b=e(1892),N=e(28561),r=function(m,D,E,u,d){return d.includes("/popups/")?2*u.paddingContentVertical+22+u.paddingPageVertical:m?u.paddingContentHorizontalLG:E?D?u.controlPaddingHorizontal+3*u.controlPaddingHorizontalSM+22+u.paddingContentHorizontalLG:u.paddingContentHorizontalLG+12:D?u.paddingSM+u.controlHeight+u.marginXS+2*u.controlPaddingHorizontalSM+22+u.paddingContentHorizontalLG:u.controlHeight+u.marginXS+(u.paddingContentVertical+2)*2+u.paddingContentHorizontalLG},a=function(m){var D=O.Z.useToken(),E=D.token,u=(0,p.ngQ)(),d=u.designable,c=(0,n.useBlockHeightProps)(),f=c.heightProps,z=(0,j.useLocation)(),T=m||f||{},W=T.disablePageHeader,t=T.enablePageTabs,I=T.hidePageTitle,H=E.sizeXXL-2,K=d?E.controlHeight+2*E.paddingContentHorizontalLG:1*E.paddingContentHorizontalLG,U=r(W,t,I,E,z.pathname);return H+U+K},A=function(){var m=O.Z.useToken(),D=m.token,E=(0,p.ngQ)(),u=E.designable,d=D.paddingContentVerticalLG+D.margin+2*D.paddingContentVertical+24,c=u?D.controlHeight+2*D.paddingContentHorizontalLG:1*D.paddingContentHorizontalLG;return d+c},y=function(m){var D=(0,x.useFieldSchema)(),E=g(D),u=a(m),d=A();return E?d:u},V=["workflowManualTasks","approvals","approvalRecords"],Y=function(){var m,D=O.Z.useToken(),E=D.token,u=(0,n.useBlockHeightProps)(),d=u.heightProps,c=(0,b.Si)(),f=c.heightProps,z=(0,p.ngQ)(),T=z.designable,W=(0,x.useFieldSchema)(),t=f||d,I=d.titleHeight,H=y(t),K=(0,M.useCollection)(),U=K.name,F=t.heightMode,te=t.height,q=t.title;if(!(!(t!=null&&t.heightMode)||F===N.j.DEFAULT)){var J=Object.keys(((m=W.parent.properties.actions)===null||m===void 0?void 0:m.properties)||{}).length>0,Z=E.controlHeight+E.padding+E.marginLG,P=J||T?E.controlHeight+2*E.marginLG:E.marginLG,X=(T&&!V.includes(U)?E.controlHeight:22)+2*E.padding+1,le=q?I:0;return F===N.j.FULL_HEIGHT?window.innerHeight-H-le-X-P-Z:te-le-P-X-Z}},L=function(m){var D=(0,n.useBlockHeightProps)(),E=D.heightProps,u=y(),d=E||{},c=d.heightMode,f=d.height,z=d.title,T=d.titleHeight,W=z?T:0;if(!(!(E!=null&&E.heightMode)||c===N.j.DEFAULT)){if(c===N.j.FULL_HEIGHT){var t=window.innerHeight-u;return m!=null&&m.removeBlockHeaderHeight&&(t=t-W),m!=null&&m.innerExtraHeight&&(t=t-m.innerExtraHeight),t}return f}},h=function(){var m=(0,x.useFieldSchema)(),D=(0,v.useMemo)(function(){return(0,n.getPageSchema)(m)},[]),E=(D==null?void 0:D["x-component-props"])||{},u=E.disablePageHeader,d=E.enablePageTabs,c=E.hidePageTitle,f=i()(i()({},m==null?void 0:m["x-component-props"]),{},{disablePageHeader:u,enablePageTabs:d,hidePageTitle:c}),z=y(f),T=f||{},W=T.heightMode,t=T.height;if(!(!(f!=null&&f.heightMode)||W===N.j.DEFAULT))return W===N.j.FULL_HEIGHT?window.innerHeight-z:t},B=function(){var m=(0,v.useState)(),D=l()(m,2),E=D[0],u=D[1],d=(0,v.useRef)(null),c=Y(),f=(0,v.useCallback)((0,o.debounce)(function(){var T;if(d.current){var W=d.current.getBoundingClientRect(),t=(T=d.current.querySelector(".ant-table"))===null||T===void 0?void 0:T.getBoundingClientRect();t&&u(W.width)}},100),[c]),z=(0,v.useCallback)(function(T){d.current=T&&T.children?T.children[0]:null,f()},[f]);return(0,C.Z)("resize",f),{height:c,width:E,tableSizeRefCallback:z}},g=function S(m){if(!m)return null;if(m["x-component"]==="Action.Container"){var D;return(m==null||(D=m.parent["x-component-props"])===null||D===void 0?void 0:D.openMode)!=="page"}return S(m.parent)}},96365:function(Ne,ae,e){"use strict";e.d(ae,{e:function(){return k}});var w=e(97857),l=e.n(w),G=e(52677),i=e.n(G),x=e(80844),C=e(67294),O={},o=function(j){var p=/{{.*?}}/g;return p.test(j)},k=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},p=j.noCache,M=(0,C.useContext)(x.SchemaOptionsContext),n=(0,C.useContext)(x.SchemaExpressionScopeContext);return function(b,N){var r=!1,a;if(typeof b=="string"&&b.startsWith("{{")&&(r=!0,a=b),b&&i()(b)==="object"&&!(0,C.isValidElement)(b)){try{a=JSON.stringify(b)}catch(y){return console.warn("Failed to stringify:",y),b}if(O[a])return O[a];r=o(a)}if(Array.isArray(b)){try{a=JSON.stringify(b)}catch(y){return console.warn("Failed to stringify:",y),b}if(O[a])return O[a];r=o(a)}if(r){var A=l()(l()(l()({},M.scope),n),N);if(!a)return x.Schema.compile(b,A);try{return p?x.Schema.compile(b,A):(O[a]=O[a]||x.Schema.compile(b,A),O[a])}catch(y){return console.log("useCompile error",b,y),x.Schema.compile(b,A)}}return b}}},94516:function(Ne,ae,e){"use strict";e.d(ae,{zz:function(){return U},Pl:function(){return T},oB:function(){return H},ng:function(){return te},sR:function(){return F}});var w=e(5574),l=e.n(w),G=e(19632),i=e.n(G),x=e(15009),C=e.n(x),O=e(99289),o=e.n(O),k=e(12444),v=e.n(k),j=e(72004),p=e.n(j),M=e(9783),n=e.n(M),b=e(97857),N=e.n(b),r=e(80844),a=e(84327),A=e(90105),y=e(45360),V=e(50361),Y=e.n(V),L=e(27361),h=e.n(L),B=e(36968),g=e.n(B),S=e(67294),m=e(26793),D=e(12174),E=e(57105),u=e(98902),d=e(61736);function c(q,J){if(q)return q["x-app-version"]||(q["x-app-version"]=J),Object.keys(q.properties||{}).forEach(function(Z){var P;c((P=q.properties)===null||P===void 0?void 0:P[Z],J)}),q}var f={i8:"1.6.29"},z=e(85893);function T(q){return new U(q)}var W=function q(J){J&&(J["x-uid"]||(J["x-uid"]=(0,a.uid)()),Object.keys(J.properties||{}).forEach(function(Z){q(J.properties[Z])}))},t=function(J){return J},I=function(J,Z){if(!(!J||!Z)){for(var P in Z)if(Object.prototype.hasOwnProperty.call(Z,P)){var X=Z[P];if(X!==(J==null?void 0:J[P]))return!1}return!0}},H=function(J,Z){if(J["x-uid"]&&J["x-uid"]===Z["x-uid"])return[null,J.toJSON()];var P=J.toJSON(),X=N()(N()({},P),{},{properties:{}}),le=null,Q=function oe(Ce,se){Object.keys(Ce||{}).forEach(function(De){var We=Ce[De];if(We["x-uid"]===Z["x-uid"]){le=Ce[De];return}else se.properties[De]=N()(N()({},We),{},{properties:{}}),oe(We==null?void 0:We.properties,se.properties[De])})};return Q(P.properties,X),[X,le]},K=function(J){return J},U=function(){function q(J){v()(this,q),n()(this,"current",void 0),n()(this,"options",void 0),n()(this,"appVersion",void 0),n()(this,"events",{}),this.options=J,this.current=J.current,this.appVersion=J.appVersion}return p()(q,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var Z=this,P=this.options,X=P.api,le=P.t,Q=le===void 0?K:le;if(X){var oe=function(se){if(!se)return[];var De=Object.values(se.properties).length,We=[];return se.mapProperties(function(ye){ye["x-component-props"]=ye["x-component-props"]||{},ye["x-component-props"].width=100/De,ye["x-uid"]&&We.push({"x-uid":ye["x-uid"],"x-component-props":ye["x-component-props"]})}),se["x-uid"]&&We.length?We:[]};this.on("insertAdjacent",function(){var Ce=o()(C()().mark(function se(De){var We,ye,ve,xe,he,re,de,_e,Ae,Fe;return C()().wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:if(ye=De.onSuccess,ve=De.current,xe=De.position,he=De.schema,re=De.wrap,de=De.wrapped,_e=De.removed,Ae=[],(de==null?void 0:de["x-component"])==="Grid.Col"&&(Ae=Ae.concat(oe(de.parent))),(_e==null?void 0:_e["x-component"])==="Grid.Col"&&(Ae=Ae.concat(oe(_e.parent))),Z.refresh(),ve["x-uid"]){Me.next=7;break}return Me.abrupt("return");case 7:return Me.next=9,X.request({url:"/uiSchemas:insertAdjacent/".concat(ve["x-uid"],"?position=").concat(xe),method:"post",data:{schema:c(he,Z.appVersion),wrap:re}});case 9:if(Fe=Me.sent,!Ae.length){Me.next=13;break}return Me.next=13,X.request({url:"/uiSchemas:batchPatch",method:"post",data:Ae});case 13:if(!(_e!=null&&_e["x-uid"])){Me.next=16;break}return Me.next=16,X.request({url:"/uiSchemas:remove/".concat(_e["x-uid"]),method:"post"});case 16:ye==null||ye(Fe==null||(We=Fe.data)===null||We===void 0?void 0:We.data),y.ZP.success(Q("Saved successfully"),.2);case 18:case"end":return Me.stop()}},se)}));return function(se){return Ce.apply(this,arguments)}}()),this.on("patch",function(){var Ce=o()(C()().mark(function se(De){var We;return C()().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(We=De.schema,Z.refresh(),We!=null&&We["x-uid"]){ve.next=4;break}return ve.abrupt("return");case 4:return ve.next=6,X.request({url:"/uiSchemas:patch",method:"post",data:N()({},We)});case 6:y.ZP.success(Q("Saved successfully"),.2);case 7:case"end":return ve.stop()}},se)}));return function(se){return Ce.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var Ce=o()(C()().mark(function se(De){var We;return C()().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(We=De.schema,We!=null&&We["x-uid"]){ve.next=3;break}return ve.abrupt("return");case 3:return ve.next=5,X.request({url:"/uiSchemas:initializeActionContext",method:"post",data:N()({},We)});case 5:case"end":return ve.stop()}},se)}));return function(se){return Ce.apply(this,arguments)}}()),this.on("batchPatch",function(){var Ce=o()(C()().mark(function se(De){var We;return C()().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return We=De.schemas,Z.refresh(),ve.next=4,X.request({url:"/uiSchemas:batchPatch",method:"post",data:We});case 4:y.ZP.success(Q("Saved successfully"),.2);case 5:case"end":return ve.stop()}},se)}));return function(se){return Ce.apply(this,arguments)}}()),this.on("remove",function(){var Ce=o()(C()().mark(function se(De){var We,ye;return C()().wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:if(We=De.removed,ye=[],(We==null?void 0:We["x-component"])==="Grid.Col"&&(ye=oe(We.parent)),Z.refresh(),We!=null&&We["x-uid"]){xe.next=6;break}return xe.abrupt("return");case 6:return xe.next=8,X.request({url:"/uiSchemas:remove/".concat(We["x-uid"]),method:"post"});case 8:if(!ye.length){xe.next=11;break}return xe.next=11,X.request({url:"/uiSchemas:batchPatch",method:"post",data:ye});case 11:y.ZP.success(Q("Saved successfully"),.2);case 12:case"end":return xe.stop()}},se)}));return function(se){return Ce.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(Z){Z.type||(Z.type="void"),Z.name||(Z.name=(0,a.uid)()),this.current["x-uid"]&&W(Z)}},{key:"on",value:function(Z,P){this.events[Z]||(this.events[Z]=[]),this.events[Z].push(P)}},{key:"emit",value:function(){var J=o()(C()().mark(function P(X){var le=this,Q,oe,Ce,se,De,We=arguments;return C()().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(this.events[X]){ve.next=2;break}return ve.abrupt("return");case 2:for(Q=We.length,oe=new Array(Q>1?Q-1:0),Ce=1;Ce<Q;Ce++)oe[Ce-1]=We[Ce];return se=oe[0],De=oe.slice(1),ve.abrupt("return",Promise.all(this.events[X].map(function(xe){return xe.bind(le).apply(void 0,[N()({current:le.current},se)].concat(i()(De)))})));case 5:case"end":return ve.stop()}},P,this)}));function Z(P){return J.apply(this,arguments)}return Z}()},{key:"parentsIn",value:function(Z){if(!Z||!r.Schema.isSchemaInstance(Z))return!1;for(var P=this.current;(X=P)!==null&&X!==void 0&&X.parent;){var X;if(P.parent===Z)return!0;P=P.parent}return!1}},{key:"refresh",value:function(Z){var P=this.options.refresh;return P==null?void 0:P(Z)}},{key:"deepMerge",value:function(Z){var P=this,X={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly"},le={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(Q){X[Q]?(P.current[Q]=Z[Q],P.updateModel(X[Q],Z[Q])):le[Q]?Object.keys(Z[Q]).forEach(function(oe){g()(P.current,[Q,oe],Z[Q][oe]),P.updateModel([le[Q],oe],Z[Q][oe])}):P.current[Q]=Z[Q]}),this.emit("patch",{schema:Z})}},{key:"getSchemaAttribute",value:function(Z,P){return h()(this.current,Z,P)}},{key:"shallowMerge",value:function(Z){var P=this,X={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly","x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(le){P.current[le]=Z[le],X[le]&&P.updateModel(X[le],Z[le])}),this.emit("patch",{schema:Z})}},{key:"updateModel",value:function(Z,P){var X=function(Q){g()(Q,Z,P)};this.model&&X(this.model),this.query&&this.query.take(X)}},{key:"insertAdjacent",value:function(Z,P){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(Z){case"beforeBegin":return this.insertBeforeBegin(P,X);case"afterBegin":return this.insertAfterBegin(P,X);case"beforeEnd":return this.insertBeforeEnd(P,X);case"afterEnd":return this.insertAfterEnd(P,X)}}},{key:"recursiveRemoveIfNoChildren",value:function(Z,P){if(Z){for(var X=Z,le,Q=P==null?void 0:P.breakRemoveOn;X;){if(typeof Q=="function"){if(Q(X))break}else if(I(X,Q))break;var oe=Object.keys(X.properties||{}).length;if(oe>0)break;X.parent&&(le=X.parent.removeProperty(X.name)),X=X.parent}return le}}},{key:"remove",value:function(Z){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=P.breakRemoveOn,le=P.removeParentsIfNoChildren,Q=Z||this.current,oe=Q.parent.removeProperty(Q.name);if(le){var Ce=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:X});Ce&&(oe=Ce)}return this.emit("remove",{removed:oe})}},{key:"removeWithoutEmit",value:function(Z){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=P.breakRemoveOn,le=P.removeParentsIfNoChildren,Q=Z||this.current,oe=Q.parent.removeProperty(Q.name);if(le){var Ce=this.recursiveRemoveIfNoChildren(Q.parent,{breakRemoveOn:X});Ce&&(oe=Ce)}return oe}},{key:"insertBeforeBeginOrAfterEnd",value:function(Z){var P=this,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r.Schema.isSchemaInstance(this.current)&&r.Schema.isSchemaInstance(Z)&&this.current.parent===Z.parent){var le=0,Q=0;return this.current.parent.mapProperties(function(oe,Ce,se){P.current.name===Ce&&(Q=se),Z.name===Ce&&(le=se)}),le>Q?this.insertBeforeBegin(Z,X):this.insertAfterEnd(Z,X)}}},{key:"insertBeforeBegin",value:function(Z){var P=this,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r.Schema.isSchemaInstance(this.current)){var le={onSuccess:X.onSuccess},Q=X.wrap,oe=Q===void 0?t:Q,Ce=X.breakRemoveOn,se=X.removeParentsIfNoChildren;if(r.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),se&&(le.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Ce}))}else Z&&(Z=Y()(Z));var De={},We=!1,ye=0,ve=0;this.current.parent.mapProperties(function(Fe,Oe){Oe===P.current.name&&(ve=ye,We=!0,++ye),Fe["x-index"]=ye,++ye,We&&(De[Oe]=Fe,P.current.parent.removeProperty(Oe))}),this.prepareProperty(Z);var xe=oe(Z),he=this.current.parent.addProperty(xe.name||(0,a.uid)(),xe);he["x-index"]=ve,he.parent=this.current.parent,this.current.parent.setProperties(De);var re=H(he,Z),de=l()(re,2),_e=de[0],Ae=de[1];this.emit("insertAdjacent",N()({position:"beforeBegin",schema:Ae,wrapped:xe,wrap:_e},le))}}},{key:"insertAfterBegin",value:function(Z){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r.Schema.isSchemaInstance(this.current)){var X={onSuccess:P.onSuccess},le=P.wrap,Q=le===void 0?t:le,oe=P.breakRemoveOn,Ce=P.removeParentsIfNoChildren;if(r.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Ce&&(X.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:oe}))}else Z&&(Z=Y()(Z));var se={},De=1;this.current.mapProperties(function(de,_e){de["x-index"]=De,++De,se[_e]=de}),this.current.properties={},this.prepareProperty(Z);var We=Q(Z),ye=this.current.addProperty(We.name||(0,a.uid)(),We);ye["x-index"]=0,ye.parent=this.current,this.current.setProperties(se);var ve=H(ye,Z),xe=l()(ve,2),he=xe[0],re=xe[1];this.emit("insertAdjacent",N()({position:"afterBegin",schema:re,wrap:he,wrapped:We},X))}}},{key:"insertBeforeEnd",value:function(Z){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r.Schema.isSchemaInstance(this.current)){delete Z["x-index"];var X={onSuccess:P.onSuccess},le=P.wrap,Q=le===void 0?t:le,oe=P.breakRemoveOn,Ce=P.removeParentsIfNoChildren;if(r.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Ce&&(X.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:oe}))}else Z&&(Z=Y()(Z));this.prepareProperty(Z);var se=Q(Z),De=this.current.addProperty(se.name||(0,a.uid)(),se);De.parent=this.current;var We=H(De,Z),ye=l()(We,2),ve=ye[0],xe=ye[1];return this.emit("insertAdjacent",N()({position:"beforeEnd",schema:xe,wrap:ve,wrapped:se},X))}}},{key:"insertAfterEnd",value:function(Z){var P=this,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r.Schema.isSchemaInstance(this.current)){var le={onSuccess:X==null?void 0:X.onSuccess},Q=X.wrap,oe=Q===void 0?t:Q,Ce=X.breakRemoveOn,se=X.removeParentsIfNoChildren,De=0,We=0,ye=!1,ve={};if(this.current.parent.mapProperties(function(Fe,Oe){Fe["x-index"]=De,Oe===P.current.name&&(++De,We=De,ye=!0),++De,ye&&Oe!==P.current.name&&(ve[Oe]=Fe,P.current.parent.removeProperty(Oe))}),r.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),se&&(le.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Ce})),Z.parent=null}else Z&&(Z=Y()(Z));this.prepareProperty(Z);var xe=oe(Z),he=this.current.parent.addProperty(xe.name||(0,a.uid)(),xe);he.parent=this.current.parent,he["x-index"]=We,this.current.parent.setProperties(ve);var re=H(he,Z),de=l()(re,2),_e=de[0],Ae=de[1];this.emit("insertAdjacent",N()({position:"afterEnd",schema:Ae,wrap:_e,wrapped:xe},le))}}}]),q}();function F(){var q=(0,S.useContext)(r.SchemaOptionsContext),J=(0,S.useMemo)(function(){return(q==null?void 0:q.components)||{}},[q]),Z=function(X){if(!X)return null;if(typeof X!="string")return X;var le=h()(J,X);return le||console.error('[nocobase]: Component "'.concat(X,'" not found')),le};return Z}function te(){var q=(0,S.useContext)(d.D),J=q.designable,Z=q.setDesignable,P=q.refresh,X=q.reset,le=(0,S.useContext)(r.SchemaOptionsContext),Q=(0,S.useMemo)(function(){return(le==null?void 0:le.components)||{}},[le]),oe=(0,S.useMemo)(function(){return function(){return(0,z.jsx)(z.Fragment,{})}},[]),Ce=(0,A.Z)(),se=(0,E.gR)(),De=(0,E.QJ)(),We=(0,S.useCallback)(function(_e){P==null||P(),Ce(),se==null||se(_e),De==null||De()},[P,Ce,se,De]),ye=(0,r.useField)(),ve=(0,r.useFieldSchema)(),xe=(0,D.LY)(),he=(0,m.$)(),re=he.t,de=(0,S.useMemo)(function(){return T({t:re,api:xe,refresh:We,current:ve,model:ye,appVersion:f.i8})},[re,xe,We,ve,ye]);return(0,S.useEffect)(function(){de.loadAPIClientEvents()},[de]),{dn:de,designable:J,reset:X,refresh:We,setDesignable:Z,DesignableBar:oe,findComponent:(0,S.useCallback)(function(_e){var Ae;if(!_e)return null;if(typeof _e!="string")return _e;var Fe=h()(Q,_e);return(Ae=Fe==null?void 0:Fe[u.XI])!==null&&Ae!==void 0?Ae:Fe},[h()]),on:de.on.bind(de),patch:(0,S.useCallback)(function(_e,Ae){var Fe=function(Te){Object.keys(Te).forEach(function(ge){var ie=Te[ge];ge==="title"&&(ye.title=ie,ve.title=ie),ge==="x-decorator-props"&&(ye.decoratorProps||(ye.decoratorProps={}),ve["x-decorator-props"]||(ve["x-decorator-props"]={}),Object.keys(ie).forEach(function(ne){ye.decoratorProps[ne]=ie[ne],ve["x-decorator-props"][ne]=ie[ne]})),ge==="x-component-props"&&(ye.componentProps||(ye.componentProps={}),ve["x-component-props"]||(ve["x-component-props"]={}),Object.keys(ie).forEach(function(ne){ye.componentProps[ne]=ie[ne],ve["x-component-props"][ne]=ie[ne]}))})};if(typeof _e=="string"){var Oe={};return g()(Oe,_e,Ae),Fe(Oe)}Fe(_e),We()},[de]),shallowMerge:(0,S.useCallback)(function(_e){de.shallowMerge(_e)},[de]),deepMerge:(0,S.useCallback)(function(_e){de.deepMerge(_e)},[de]),remove:(0,S.useCallback)(function(_e,Ae){de.remove(_e,Ae)},[de]),insertAdjacent:(0,S.useCallback)(function(_e,Ae,Fe){de.insertAdjacent(_e,Ae,Fe)},[de]),insertBeforeBegin:(0,S.useCallback)(function(_e){de.insertBeforeBegin(_e)},[de]),insertAfterBegin:(0,S.useCallback)(function(_e){de.insertAfterBegin(_e)},[de]),insertBeforeEnd:(0,S.useCallback)(function(_e){de.insertBeforeEnd(_e)},[de]),insertAfterEnd:(0,S.useCallback)(function(_e){de.insertAfterEnd(_e)},[de])}}},98146:function(Ne,ae,e){"use strict";e.d(ae,{e:function(){return C}});var w=e(80844),l=e(84577),G=e(67294),i=e(90297),x=function(){return null};x.isNullComponent=!0;var C=function(){var o=(0,l.ng)(),k=o.designable,v=(0,w.useFieldSchema)(),j=(0,G.useMemo)(function(){return v["x-designer"]||v["x-toolbar"]?v["x-designer"]||v["x-toolbar"]:v["x-settings"]?i.Mf:x},[v]),p=(0,l.Co)(j);return k&&p||x}},9780:function(Ne,ae,e){"use strict";e.d(ae,{w:function(){return O}});var w=e(97857),l=e.n(w),G=e(13769),i=e.n(G),x=["useProps"],C=function(){return{}},O=function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=k.useProps,j=v===void 0?C:v,p=i()(k,x),M=j;typeof j!="function"&&(M=C);var n=M();return l()(l()({},p),n)}},62954:function(Ne,ae,e){"use strict";e.d(ae,{aUM:function(){return G.aU},olz:function(){return G.ol},N0i:function(){return G.N0},fWn:function(){return G.fW},mlL:function(){return G.ml},EIK:function(){return G.EI},$Lt:function(){return G.$L},$b8:function(){return G.$b},HTy:function(){return rn},lkv:function(){return vt},rDu:function(){return mr},eYL:function(){return G.eY},Rat:function(){return ua},oAt:function(){return Kl},E7E:function(){return Nl},$SD:function(){return Ri},fUi:function(){return Lo.fU},QcG:function(){return Ps},MLy:function(){return sr.M},gOu:function(){return Js},jYG:function(){return va.jY},PuU:function(){return va.Pu},smG:function(){return va.sm},C1I:function(){return G.C1},Ssf:function(){return ys},vTp:function(){return Ms},XZJ:function(){return Ea},Tt2:function(){return Fs},zH8:function(){return Ls},Q5L:function(){return Ws},Pok:function(){return ji},Vm0:function(){return Vs},xI_:function(){return Rs},Lip:function(){return Ts},WN4:function(){return Li.W},Mtg:function(){return Da.Mt},iNu:function(){return Da.iN},zzt:function(){return pt.zz},_bl:function(){return V._b},POi:function(){return zs},AOY:function(){return se},izJ:function(){return Gs},LBT:function(){return y.DndContext},IWB:function(){return y.DragHandler},LCt:function(){return y.DraggableContext},FyH:function(){return Q.Fy},Nir:function(){return Q.Ni},q8U:function(){return Q.q8},HGA:function(){return Q.HG},QTe:function(){return Q.QT},JEX:function(){return Q.JE},fAH:function(){return El},$w$:function(){return Q.$w},nBj:function(){return Q.nB},Oct:function(){return Q.Oc},zdw:function(){return Q.zd},CXR:function(){return Sl},BQs:function(){return Do.BQ},Hj5:function(){return Ao.H},M0b:function(){return Bi},Dnz:function(){return Li.D},wn$:function(){return Wn.wn},GzZ:function(){return Wn.Gz},tJZ:function(){return Wn.tJ},fox:function(){return Wn.fo},VTd:function(){return Wn.VT},XsZ:function(){return Wn.Xs},l09:function(){return P},D_t:function(){return pl.D},_80:function(){return xi},WiK:function(){return _r},xJW:function(){return Q.xJ},RVL:function(){return V.RV},Bc8:function(){return lt},hG9:function(){return Ki},DCh:function(){return Ui},rjZ:function(){return Ma.rj},Cqo:function(){return gi},jg7:function(){return Ma.jg},gsn:function(){return Do.gs},$18:function(){return au},IIB:function(){return Do.II},RnZ:function(){return gl},mX2:function(){return Do.mX},zDC:function(){return fo.zD},Phs:function(){return Do.Ph},aVo:function(){return Ci},UGj:function(){return $i.U},yq5:function(){return $i.y},v2r:function(){return Yo},HIW:function(){return fu},T3C:function(){return Ga},d97:function(){return ba.d9},hGv:function(){return ni},tlE:function(){return hu},irr:function(){return Uo},rop:function(){return bl},gGi:function(){return gu},DBW:function(){return pn.D},MBS:function(){return Cu.M},pGO:function(){return bu},Y8K:function(){return zi},iVT:function(){return Do.iV},ODP:function(){return fo.OD},lbb:function(){return fo.lb},b7w:function(){return fo.b7},sUk:function(){return fo.sU},x1j:function(){return G.x1},m1v:function(){return V.m1},glM:function(){return Mt},xZD:function(){return G.xZ},IuH:function(){return Wn.Iu},MkN:function(){return G.Mk},Hof:function(){return Pu},n6:function(){return V.n6},DDd:function(){return Hu.D},ATq:function(){return V.AT},G0E:function(){return V.G0},a$w:function(){return V.a$},TzZ:function(){return V.Tz},y00:function(){return G.y0},PhF:function(){return dn},Cqv:function(){return y.ShowFormData},cof:function(){return G.co},bts:function(){return y.Sortable},Fop:function(){return y.SortableContext},TRI:function(){return y.SortableItem},ORg:function(){return y.SortableProvider},TaI:function(){return Su},qHe:function(){return vi.q},iA_:function(){return Xo},gvM:function(){return Bu},SnY:function(){return Dl},ASv:function(){return Uu},bwk:function(){return pa},mQc:function(){return ei},c__:function(){return Xa.c},QZ3:function(){return At},L39:function(){return va.L3},feF:function(){return Gu},jII:function(){return Hi},mPs:function(){return Vu},tgM:function(){return zu},gqx:function(){return Lo.gq},Qm7:function(){return Lo.Qm},_wD:function(){return ca._w},rjl:function(){return ca.rj},SLL:function(){return G.SL},sBv:function(){return G.sB},iTm:function(){return Q.iT},BDK:function(){return Lo.BD},Pls:function(){return pt.Pl},Oxq:function(){return gt},WLi:function(){return Ie},$9M:function(){return Q.$9},nCn:function(){return ia},iNG:function(){return oa},tD8:function(){return da},pg9:function(){return Kn},Ofb:function(){return Q.Of},ibf:function(){return Hn},WyG:function(){return le},l6$:function(){return l.l6},WGR:function(){return It},C$H:function(){return fo.C$},SET:function(){return Qo.SE},cNQ:function(){return fo.cN},NCb:function(){return ko.NC},I9l:function(){return y.getRenderContent},XQ2:function(){return ko.XQ},Fxc:function(){return Ua},KKi:function(){return G.KK},MDU:function(){return Qo.MD},CEH:function(){return Qo.CE},vUN:function(){return G.vU},ZZb:function(){return Q.ZZ},tqC:function(){return Qo.tq},elO:function(){return fo.el},CfU:function(){return ai},LPx:function(){return Qo.LP},fY6:function(){return Qo.fY},Vm:function(){return Gi},w_o:function(){return Qo.w_},SJF:function(){return wa},_Ko:function(){return Ya},Mev:function(){return ii},i2K:function(){return cr},WmO:function(){return Wn.Wm},oBi:function(){return pt.oB},hKP:function(){return ko.hK},DU1:function(){return G.DU},XCj:function(){return G.XC},KyD:function(){return Dr.Ky},Vpg:function(){return Ti},lIL:function(){return pt.lI},KxP:function(){return sr.K},hi9:function(){return pt.hi},p27:function(){return G.p2},z9d:function(){return yl.z9},eJW:function(){return pt.eJ},Cor:function(){return pt.Co},Zmk:function(){return ba.Zm},aZq:function(){return pt.aZ},P1D:function(){return Da.P1},ngQ:function(){return pt.ng},ett:function(){return pt.et},ySm:function(){return Ao.y},Zd$:function(){return Q.Zd},cLh:function(){return pt.cL},baz:function(){return Q.b},fde:function(){return pt.fd},Xdt:function(){return fo.Xd},Cld:function(){return pt.Cl},vH8:function(){return pt.vH},PLH:function(){return Wn.PL},V8t:function(){return Wn.V8},tMk:function(){return Wn.tM},xQm:function(){return Wn.xQ},sRe:function(){return pt.sR},U1u:function(){return mt},HS$:function(){return G.HS},vBu:function(){return G.vB},QYZ:function(){return G.QY},t9d:function(){return G.t9},Kgy:function(){return Wn.Kg},aJ2:function(){return Wn.aJ},n14:function(){return Ma.n1},DiB:function(){return Ma.Di},l1O:function(){return Q.l1},w5o:function(){return Q.w5},p3Q:function(){return Q.p3},G5e:function(){return Q.G5},xj2:function(){return Q.xj},rxY:function(){return Q.rx},Ils:function(){return fo.Il},zCB:function(){return G.zC},CMh:function(){return la},v$P:function(){return ra.v},FMn:function(){return ao},T0O:function(){return No},a4r:function(){return pn.a},wNf:function(){return pt.wN},Dmu:function(){return pt.Dm},Bsl:function(){return V.Bs},yKv:function(){return Oa.y},fMB:function(){return pt.fM},gCg:function(){return Xa.g},eT6:function(){return Q.eT},$SN:function(){return Lo.$S},q4O:function(){return Q.q4},ymE:function(){return ca.ym},uqQ:function(){return G.uq},Q3P:function(){return ko.Q3},K5K:function(){return G.K5}});var w={};e.r(w),e.d(w,{Action:function(){return G.aU},ActionBar:function(){return G.ol},ActionBarProvider:function(){return G.N0},ActionContext:function(){return G.fW},ActionContextNoRerender:function(){return G.ml},ActionContextProvider:function(){return G.EI},ActionDesigner:function(){return G.$L},AfterSuccess:function(){return G.$b},AntdSchemaComponentPlugin:function(){return rn},AntdSchemaComponentProvider:function(){return vt},AppendsTreeSelect:function(){return mr},AssignedFieldValues:function(){return G.eY},AssociationField:function(){return ua},AssociationFieldMode:function(){return Kl},AssociationFieldModeProvider:function(){return Nl},AssociationSelect:function(){return Ri},AttachmentList:function(){return Lo.fU},AutoComplete:function(){return Ps},BackButtonUsedInSubPage:function(){return sr.M},Block:function(){return Js},BlockItem:function(){return va.jY},BlockItemCard:function(){return va.Pu},BlockItemCardContext:function(){return va.sm},ButtonEditor:function(){return G.C1},CardItem:function(){return ys},Cascader:function(){return Ms},Checkbox:function(){return Ea},CollectionSelect:function(){return Fs},ColorPicker:function(){return Ls},ColorSelect:function(){return Ws},Cron:function(){return ji},CronSet:function(){return Vs},DataSourceCollectionCascader:function(){return Rs},DataSourceSelect:function(){return Ts},DateFormatCom:function(){return Li.W},DatePicker:function(){return Da.Mt},DatePickerProvider:function(){return Da.iN},Details:function(){return zs},DetailsDesigner:function(){return se},Divider:function(){return Gs},EditComponent:function(){return Q.Fy},EditDefaultValue:function(){return Q.Ni},EditDescription:function(){return Q.q8},EditOperator:function(){return Q.HG},EditPattern:function(){return Q.QT},EditRequired:function(){return Q.JE},EditSortField:function(){return El},EditTitle:function(){return Q.$w},EditTitleField:function(){return Q.nB},EditTooltip:function(){return Q.Oc},EditValidationRules:function(){return Q.zd},Editable:function(){return Sl},EllipsisWithTooltip:function(){return Do.BQ},ErrorFallback:function(){return Ao.H},Expand:function(){return Bi},ExpiresRadio:function(){return Li.D},Filter:function(){return Wn.wn},FilterAction:function(){return Wn.Gz},FilterActionContext:function(){return Wn.tJ},FilterContext:function(){return Wn.fo},FilterDynamicComponent:function(){return Wn.VT},FilterLogicContext:function(){return Wn.Xs},Form:function(){return P},FormDialog:function(){return pl.D},FormDrawer:function(){return xi},FormField:function(){return _r},FormItem:function(){return Q.xJ},FormV2:function(){return lt},G2Plot:function(){return Ki},G2PlotRenderer:function(){return Ui},Grid:function(){return Ma.rj},GridCard:function(){return gi},GridRowContext:function(){return Ma.jg},HTMLEncode:function(){return Do.gs},IconPicker:function(){return au},Input:function(){return Do.II},InputNumber:function(){return gl},InputReadPretty:function(){return Do.mX},InputRecordPicker:function(){return fo.zD},Json:function(){return Do.Ph},List:function(){return Ci},Markdown:function(){return $i.U},MarkdownReadPretty:function(){return $i.y},Menu:function(){return Yo},NanoIDInput:function(){return fu},Page:function(){return Ga},PagePopups:function(){return ba.d9},PageTabs:function(){return ni},Pagination:function(){return hu},ParentRouteContext:function(){return Uo},Password:function(){return bl},Percent:function(){return gu},PopupSettingsProvider:function(){return pn.D},Preview:function(){return Cu.M},QuickEdit:function(){return bu},Radio:function(){return zi},ReadPretty:function(){return Do.iV},ReadPrettyRecordPicker:function(){return fo.OD},RecordPicker:function(){return fo.lb},RecordPickerContext:function(){return fo.b7},RecordPickerProvider:function(){return fo.sU},RefreshDataBlockRequest:function(){return G.x1},RemoteSelect:function(){return Mt},RemoveButton:function(){return G.xZ},RemoveConditionContext:function(){return Wn.Iu},RequestSettings:function(){return G.Mk},RichText:function(){return Pu},SecondConFirm:function(){return G.y0},Select:function(){return dn},SkipValidation:function(){return G.co},Space:function(){return Su},StablePopover:function(){return vi.q},Table:function(){return Xo},TableBlockDesigner:function(){return Bu},TableField:function(){return Dl},TableSelectorDesigner:function(){return Uu},TableV2:function(){return pa},Tabs:function(){return ei},TabsContextProvider:function(){return Xa.c},Templates:function(){return At},TestDesigner:function(){return va.L3},TextAreaWithGlobalScope:function(){return Gu},TimePicker:function(){return Hi},TreeSelect:function(){return Vu},UnixTimestamp:function(){return zu},Upload:function(){return Lo.gq},Uploader:function(){return Lo.Qm},Variable:function(){return ca._w},VariableScopeProvider:function(){return ca.rj},actionSettings:function(){return G.SL},actionSettingsItems:function(){return G.sB},allowAddNew:function(){return Q.iT},attachmentFileTypes:function(){return Lo.BD},defaultFieldNames:function(){return gt},fetchTemplateData:function(){return Ie},filterFormItemSettings:function(){return Q.$9},findByUid:function(){return ia},findKeysByUid:function(){return oa},findMenuItem:function(){return da},formDetailsSettings:function(){return Kn},formItemSettings:function(){return Q.Of},formSettings:function(){return Hn},formV1Settings:function(){return le},genStyleHook:function(){return l.l6},getCurrentOptions:function(){return It},getDatePickerLabels:function(){return fo.C$},getDateRanges:function(){return Qo.SE},getLabelFormatValue:function(){return fo.cN},getPopupPathFromParams:function(){return ko.NC},getStoredPopupContext:function(){return ko.XQ},getTabSchema:function(){return Ua},getZIndex:function(){return G.KK},handleDateChangeOnForm:function(){return Qo.MD},inferPickerType:function(){return Qo.CE},isBulkEditAction:function(){return G.vU},isFileCollection:function(){return Q.ZZ},isMobile:function(){return Qo.tq},isShowFilePicker:function(){return fo.el},isTabPage:function(){return ai},mapDatePicker:function(){return Qo.LP},mapRangePicker:function(){return Qo.fY},mapTimeFormat:function(){return Gi},moment2str:function(){return Qo.w_},navigateToTab:function(){return wa},pageSettings:function(){return Ya},pageTabSettings:function(){return ii},readPrettyFormSettings:function(){return cr},removeNullCondition:function(){return Wn.Wm},storePopupContext:function(){return ko.hK},useActionBarContext:function(){return G.DU},useActionContext:function(){return G.XC},useAssociationFieldContext:function(){return Dr.Ky},useAssociationFieldModeContext:function(){return Ti},useBackButton:function(){return sr.K},useCloseAction:function(){return G.p2},useColumnSchema:function(){return yl.z9},useCurrentPopupContext:function(){return ba.Zm},useDatePickerContext:function(){return Da.P1},useDownloadLogs:function(){return Ao.y},useEnsureOperatorsValid:function(){return Q.Zd},useFieldMode:function(){return Q.b},useFieldNames:function(){return fo.Xd},useFilterActionProps:function(){return Wn.PL},useFilterFieldOptions:function(){return Wn.V8},useFilterFieldProps:function(){return Wn.tM},useFilterOptions:function(){return Wn.xQ},useFormDataTemplates:function(){return mt},useGetAriaLabelOfAction:function(){return G.HS},useGetAriaLabelOfDrawer:function(){return G.vB},useGetAriaLabelOfModal:function(){return G.QY},useGetAriaLabelOfPopover:function(){return G.t9},useGetFilterFieldOptions:function(){return Wn.Kg},useGetFilterOptions:function(){return Wn.aJ},useGridContext:function(){return Ma.n1},useGridRowContext:function(){return Ma.Di},useIsAddNewForm:function(){return Q.l1},useIsAssociationField:function(){return Q.w5},useIsFieldReadPretty:function(){return Q.p3},useIsFileField:function(){return Q.G5},useIsFormReadPretty:function(){return Q.xj},useIsSelectFieldMode:function(){return Q.rx},useLabelUiSchema:function(){return fo.Il},useLinkageAction:function(){return G.zC},useMenuDragEnd:function(){return la},useMenuTranslation:function(){return ra.v},useNocoBaseRoutes:function(){return ao},useParentRoute:function(){return No},usePopupSettings:function(){return pn.a},useStyles:function(){return Oa.y},useTabsContext:function(){return Xa.g},useTitleFieldOptions:function(){return Q.eT},useUploadStyles:function(){return Lo.$S},useValidateSchema:function(){return Q.q4},useVariableScope:function(){return ca.ym},useZIndexContext:function(){return G.uq},withSearchParams:function(){return ko.Q3},zIndexContext:function(){return G.K5}});var l=e(46917),G=e(76157),i=e(15009),x=e.n(i),C=e(99289),O=e.n(C),o=e(12444),k=e.n(o),v=e(72004),j=e.n(v),p=e(31996),M=e.n(p),n=e(26037),b=e.n(n),N=e(97857),r=e.n(N),a=e(67294),A=e(31601),y=e(14896),V=e(70993),Y=e(89127),L=function($){return O()(x()().mark(function me(){var pe,fe;return x()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return Se.prev=0,Se.next=3,this.api.request($);case 3:return fe=Se.sent,Se.abrupt("return",fe==null||(pe=fe.data)===null||pe===void 0?void 0:pe.data);case 7:return Se.prev=7,Se.t0=Se.catch(0),Se.abrupt("return",[]);case 10:case"end":return Se.stop()}},me,this,[[0,7]])}))},h=e(13769),B=e.n(h),g=e(5552),S=e(86201),m=e(80844),D=e(28459),E=e(57953),u=e(12174),d=e(6145),c=e(57105),f=e(90297),z=e(64016),T=e(15195),W=e(23461),t=e(85893),I=["form","children"],H=["form","children","disabled"],K=["request","effects","initialValue","useValues"],U=function($){var me=$.form,pe=$.children,fe=B()($,I),be=(0,m.useField)(),Se=(0,m.useFieldSchema)(),Le=(0,pt.lI)(me.createVoidField(r()(r()({},be.props),{},{basePath:""})));return(0,t.jsx)(m.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(m.FormContext.Provider,{value:me,children:(0,t.jsx)(g.FormLayout,r()(r()({layout:"vertical"},fe),{},{children:(0,t.jsx)(c.sq,{basePath:Le.address,schema:Se,onlyRenderProperties:!0})}))})})},F=function($){return $.children},te=function($){var me=$.form,pe=$.children,fe=$.disabled,be=B()($,H),Se=(0,m.useField)(),Le=(0,m.useFieldSchema)(),$e=(0,pt.lI)(me.createVoidField(r()(r()({},Se.props),{},{basePath:""}))),He=(0,pt.Co)(Le["x-component"],F);return(0,a.useEffect)(function(){me.disabled=fe||Se.disabled},[fe,Se.disabled]),(0,t.jsx)(D.ZP,{componentDisabled:fe,children:(0,t.jsx)(m.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(m.FormContext.Provider,{value:me,children:(0,t.jsx)(g.FormLayout,r()(r()({layout:"vertical"},be),{},{children:(0,t.jsx)(m.FieldContext.Provider,{value:$e,children:(0,t.jsx)(He,r()(r()({},Se.componentProps),{},{children:(0,t.jsx)(c.sq,{basePath:$e.address,schema:Le,onlyRenderProperties:!0})}))})}))})})})},q=function($){var me=$.request,pe=$.initialValue;return me||function(){return Promise.resolve({data:pe})}},J=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,u.QT)(q(me),$)},Z=(0,a.createContext)(null);Z.displayName="FormBlockContext";var P=(0,m.observer)(function(ee){var $=ee.request,me=ee.effects,pe=ee.initialValue,fe=ee.useValues,be=fe===void 0?J:fe,Se=B()(ee,K),Le=(0,m.useFieldSchema)(),$e=(0,m.useField)(),He=(0,a.useMemo)(function(){return(0,S.createForm)({effects:me})},[]),Ge=be({uid:Le["x-uid"],onSuccess:function(Je){return O()(x()().mark(function ft(){return x()().wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,He.reset();case 2:He.setValues(Je==null?void 0:Je.data),He.setInitialValues(Je==null?void 0:Je.data);case 4:case"end":return _t.stop()}},ft)}))()}},ee),Xe=(0,a.useContext)(Z);return(0,t.jsx)(Z.Provider,{value:{parent:Xe,form:He,result:Ge,field:$e,fieldSchema:Le},children:(0,t.jsx)(E.Z,{spinning:(Ge==null?void 0:Ge.loading)||!1,children:Le["x-decorator"]==="Form"?(0,t.jsx)(te,r()({form:He},Se)):(0,t.jsx)(U,r()({form:He},Se))})})},{displayName:"Form"});P.Designer=function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=$.title,fe=(0,T.zy)(),be=(0,W.rE)(),Se=be.componentNamePrefix;return(0,t.jsxs)(f.aN,{template:fe,title:pe||me,children:[(0,t.jsx)(z.G,{componentName:"".concat(Se,"Form"),collectionName:me}),(0,t.jsx)(f.Z5,{}),(0,t.jsx)(f.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var X=e(5537),le=new X.F5({name:"FormV1Settings",items:[{name:"template",Component:z.G,useComponentProps:function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=(0,W.rE)(),fe=pe.componentNamePrefix;return{componentName:"".concat(fe,"Form"),collectionName:me}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),Q=e(54801),oe=function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=$.title,fe=(0,T.zy)();return(0,t.jsx)(f.aN,{schemaSettings:"FormSettings",template:fe,title:pe||me})},Ce=function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=$.title,fe=(0,T.zy)();return(0,t.jsx)(f.aN,{schemaSettings:"ReadPrettyFormSettings",template:fe,title:pe||me})},se=function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=$.title,fe=(0,T.zy)();return(0,t.jsx)(f.aN,{schemaSettings:"FormDetailsSettings",template:fe,title:pe||me})},De=function(){var $=(0,d.useCollection_deprecated)(),me=$.name,pe=$.title,fe=(0,T.zy)();return(0,t.jsx)(f.aN,{schemaSettings:"blockSettings:filterForm",template:fe,title:pe||me})},We=e(7340),ye=e(15503),ve=e(83335),xe=e(68230),he=e(68400),re=e.n(he),de=e(97133),_e=e(84327),Ae=e(9361),Fe=e(68091),Oe=e(67174),Me=e(31019),Te=e(94804),ge=e(39742),ie=e(22229),ne=e(43321),R=e(64910),ue=e(9780),Pe=e(3192),ce=e(18686),je=e(5574),Ke=e.n(je),Ue=e(84157),Ye=e(42075),Et=e(34041),Lt=e(96486),rt=e.n(Lt),st=e(26793),at=e(32268),dt=e(9783),ct=e.n(dt),hn=e(52677),an=e.n(hn),In=e(3407),Jt=e(66309),Rn=e(96074),En=e(27484),Ht=e.n(En),Un=e(44990),_n=e(8341),Gt=e(87714),pt=e(84577),fn=e(16646),Dn=e(73475),$n=e(32983),rr=e(67668),lr=e(58812),dr=e(96695),yr=e.n(dr),Ln=e(19632),Ut=e.n(Ln),gt={label:"label",value:"value",color:"color",options:"children"};function Kt(ee,$){var me=[];if(!Array.isArray(ee))return me;for(var pe=0;pe<ee.length;pe++){var fe=ee[pe][$.options];Array.isArray(fe)&&me.push.apply(me,Ut()(Kt(fe,$))),me.push(r()({},ee[pe]))}return me}function zt(ee,$,me){if(!ee)return[];var pe=[],fe=yr()(me),be;try{var Se=function(){var $e=be.value,He=ee.find(function(Ge){return Ge[$.value]==$e})||{value:$e,label:$e&&$e.toString()};pe.push(He)};for(fe.s();!(be=fe.n()).done;)Se()}catch(Le){fe.e(Le)}finally{fe.f()}return pe}function It(ee,$,me){var pe=Kt($,me),fe=(0,Lt.castArray)(ee).map(function(be){return(0,Ue.isPlainObject)(be)?be[me.value]:be});return zt(pe,me,fe)}var yt=e(25145),Nt=(0,m.observer)(function(ee){var $=(0,a.useState)(!0),me=Ke()($,2),pe=me[0],fe=me[1],be=(0,a.useState)([]),Se=Ke()(be,2),Le=Se[0],$e=Se[1],He=(0,m.useField)(),Ge=(0,rr.Hy)();return(0,a.useEffect)(function(){var Xe,Pt=r()(r()({},gt),ee.fieldNames),Je=He.dataSource||ee.options||(Ge==null?void 0:Ge.uiSchema.enum)||[],ft=It(He.value,Je,Pt);if(!(!(0,_e.isValid)(ee.value)&&!ft.length)&&!((0,S.isArrayField)(He)&&(He==null||(Xe=He.value)===null||Xe===void 0?void 0:Xe.length)===0)){var Ct=He.value!==null&&ft.map(function(_t,Rt){return(0,t.jsx)(Jt.Z,{color:_t[Pt.color],icon:_t.icon,children:_t[Pt.label]},Rt)});$e(Ct),fe(!1)}},[Ge==null?void 0:Ge.uiSchema.enum,He,He.dataSource,He.value,ee.fieldNames,ee.options,ee.value]),pe?null:(0,t.jsx)(lr.B,{ellipsis:ee.ellipsis,children:Le})},{displayName:"SelectReadPretty"}),wt=(0,yt.u)(Nt),kt=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],qt=["objectValue","loading","value","rawOptions","defaultValue"],Qt=function($){return!(0,_e.isValid)($)||an()($)==="object"&&Object.keys($).length===0},ln=function($){var me=$.value,pe=$.options,fe=$.onChange,be=$.fieldNames,Se=$.mode,Le=$.loading,$e=$.rawOptions,He=$.defaultValue,Ge=B()($,kt),Xe=function(Je){var ft;if(!Qt(Je)){var Ct=(0,_e.toArr)(Je).filter(function(Rt){return Rt}).map(function(Rt){return(0,Ue.isPlainObject)(Rt)?Rt[be.value]:Rt}),_t=(ft=It(Ct,pe,be))===null||ft===void 0?void 0:ft.map(function(Rt){return{label:Rt[be.label],value:Rt[be.value]}});return["tags","multiple"].includes(Se)||$.multiple?_t:_t.shift()}};return(0,t.jsx)(Et.default,r()({role:"button","data-testid":"select-object-".concat(Se||"single"),value:Xe(me),defaultValue:Xe(He),allowClear:{clearIcon:(0,t.jsx)(fn.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Le?(0,t.jsx)(E.Z,{}):(0,t.jsx)($n.Z,{image:$n.Z.PRESENTED_IMAGE_SIMPLE}),options:pe,fieldNames:be,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(Je,ft){var Ct;return((Ct=ft==null?void 0:ft[be.label||"label"])!==null&&Ct!==void 0?Ct:"").includes(Je)},filterSort:function(Je,ft){var Ct,_t;return((Ct=Je==null?void 0:Je[be.label||"label"])!==null&&Ct!==void 0?Ct:"").toLowerCase().localeCompare(((_t=ft==null?void 0:ft[be.label||"label"])!==null&&_t!==void 0?_t:"").toLowerCase())},onChange:function(Je){var ft=It((0,_e.toArr)(Je).map(function(Ct){return Ct.value}),$e||pe,be);["tags","multiple"].includes(Se)||$.multiple?fe==null||fe(ft):fe==null||fe(ft.shift()||null)},mode:Se,tagRender:function(Je){return(0,t.jsx)(Jt.Z,r()(r()({role:"button","aria-label":Je.label,closeIcon:(0,t.jsx)(Dn.Z,{role:"button","aria-label":"icon-close-tag"})},Je),{},{children:Je.label}))},maxTagCount:"responsive"},Ge))},mn=function($,me){var pe;return((pe=me==null?void 0:me.label)!==null&&pe!==void 0?pe:"").toLowerCase().includes(($||"").toLowerCase())},un=(0,m.connect)(function(ee){var $=ee.objectValue,me=ee.loading,pe=ee.value,fe=ee.rawOptions,be=ee.defaultValue,Se=B()(ee,qt),Le=(0,pt.eJ)(),$e=ee.multiple?"multiple":ee.mode;if($e&&!["multiple","tags"].includes($e)&&($e=void 0),$)return(0,t.jsx)(ln,r()(r()({rawOptions:fe},Se),{},{defaultValue:be,value:pe,mode:$e,loading:me}));var He=function(Xe){return["tags","multiple"].includes(ee.mode)||ee.multiple?Xe?(0,_e.toArr)(Xe):void 0:Xe};return(0,t.jsx)(Et.default,r()(r()({role:"button","data-testid":"select-".concat($e||"single"),showSearch:!0,filterOption:mn,allowClear:{clearIcon:(0,t.jsx)(fn.Z,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:me?(0,t.jsx)(E.Z,{}):(0,t.jsx)($n.Z,{image:$n.Z.PRESENTED_IMAGE_SIMPLE}),value:He(pe),defaultValue:He(be),tagRender:function(Xe){return(0,t.jsx)(Jt.Z,r()(r()({role:"button","aria-label":Xe.label,closeIcon:(0,t.jsx)(Dn.Z,{role:"button","aria-label":"icon-close-tag"})},Xe),{},{children:Xe.label}))}},Le(Se)),{},{onChange:function(Xe){var Pt;(Pt=ee.onChange)===null||Pt===void 0||Pt.call(ee,Xe===void 0?null:Xe)},mode:$e,maxTagCount:"responsive"}))},(0,m.mapProps)({dataSource:"options"},function(ee,$){return r()(r()({},ee),{},{fieldNames:r()(r()({},gt),ee.fieldNames),suffixIcon:$!=null&&$.loading||$!=null&&$.validating?(0,t.jsx)(In.Z,{}):ee.suffixIcon})}),(0,m.mapReadPretty)(wt)),dn=un;dn.ReadPretty=wt;var On=dn,Yt=e(36586),on=function($,me){return(0,Lt.castArray)($).filter(function(pe){return pe!=null}).map(function(pe){return an()(pe)==="object"?pe[me.value]:pe})},xn=(0,m.observer)(function(ee){var $=r()(r()({},gt),ee.fieldNames),me=(0,m.useField)(),pe=(0,m.useFieldSchema)(),fe=(0,Yt.a)(),be=(0,G.XC)(),Se=be.snapshot,Le=(0,u.QT)(Se?O()(x()().mark(function He(){return x()().wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Xe.abrupt("return",{data:fe[pe.name]});case 1:case"end":return Xe.stop()}},He)})):r()(r()({action:"list"},ee.service),{},{params:{paginate:!1,filter:ct()({},$.value,{$in:on(me.value,$)})}}),{refreshDeps:[ee.service,me.value]}),$e=Le.data;return(0,t.jsx)(dn.ReadPretty,r()(r()({},ee),{},{options:$e==null?void 0:$e.data}))},{displayName:"ReadPretty"}),Wt=["fieldNames","service","wait","value","defaultValue","objectValue","manual","mapOptions","targetField","CustomDropdownRender","optionFilter","dataSource","toOptionsItem","popupMatchSelectWidth"],et="N/A",Ft=(0,ye.t)((0,m.connect)(function(ee){var $,me,pe=ee.fieldNames,fe=pe===void 0?{}:pe,be=ee.service,Se=be===void 0?{}:be,Le=ee.wait,$e=Le===void 0?300:Le,He=ee.value,Ge=ee.defaultValue,Xe=ee.objectValue,Pt=ee.manual,Je=Pt===void 0?!0:Pt,ft=ee.mapOptions,Ct=ee.targetField,_t=ee.CustomDropdownRender,Rt=ee.optionFilter,Dt=ee.dataSource,en=ee.toOptionsItem,Mn=en===void 0?function(co){return co}:en,An=ee.popupMatchSelectWidth,Cn=An===void 0?!1:An,Vt=B()(ee,Wt),sn=(0,Un.FC)(),Zn=(0,_n.FE)(Dt||sn),ur=(0,a.useRef)(!1),nr=(0,m.useFieldSchema)(),wn=(($=nr["x-component-props"])===null||$===void 0?void 0:$.addMode)==="quickAdd",tr=(0,d.useCollection_deprecated)(),Nn=tr.getField,or=(0,a.useRef)(null),pr=(0,d.useCollectionManager_deprecated)(),Qn=pr.getCollectionJoinField,Fn=pr.getInterface,er=nr["x-collection-field"]||nr.name,yn=Nn(er)||Qn(er),nn=Ct||(yn==null?void 0:yn.target)&&(fe==null?void 0:fe.label)&&Qn("".concat(yn.target,".").concat(fe.label)),Yn=(0,a.useMemo)(function(){if(nn!=null&&nn.interface){var co,ro=Fn(nn.interface),Po=(ro==null||(co=ro.filterable)===null||co===void 0?void 0:co.operators[0].value)||"$includes";return nn.type==="string"?"$includes":Po}return"$includes"},[nn]),ar=(0,pt.eJ)(),qn=(0,a.useCallback)(function(co){try{return co.filter(function(ro){return["number","string"].includes(an()(ro[fe.value]))||!ro[fe.value]}).map(function(ro){var Po,Fo,To=ar(ro[fe.label]);if(nn!=null&&(Po=nn.uiSchema)!==null&&Po!==void 0&&Po.enum)if(Array.isArray(To))To=To.map(function(Ho,aa){var fa=nn.uiSchema.enum.find(function(bi){return bi.value===Ho});return fa?(0,t.jsx)(Jt.Z,{role:"button",color:fa.color,style:{marginRight:3},children:(fa==null?void 0:fa.label)||Ho},aa):(0,t.jsx)(Jt.Z,{role:"button",children:Ho},Ho)}).reverse();else{var zo=nn.uiSchema.enum.find(function(Ho){return Ho.value===To});zo&&(To=(0,t.jsx)(Jt.Z,{role:"button",color:zo.color,children:zo.label}))}if((nn==null?void 0:nn.type)==="date"&&(To=Ht()(To).format("YYYY-MM-DD")),ft){var Aa;return ft((Aa={},ct()(Aa,fe.label,To||et),ct()(Aa,fe.value,ro[fe.value]),Aa))}return r()(r()({},ro),{},(Fo={},ct()(Fo,fe.label,To||et),ct()(Fo,fe.value,ro[fe.value]),Fo))}).filter(Boolean)}catch(ro){return console.error(ro),co}},[nn==null?void 0:nn.uiSchema,fe]),fr=(0,u.QT)(r()(r()({action:"list"},Se),{},{headers:Zn,params:r()(r()({pageSize:200},Se==null?void 0:Se.params),{},{filter:Se==null||(me=Se.params)===null||me===void 0?void 0:me.filter})}),r()({manual:Je,debounceWait:$e},Se.defaultParams?{defaultParams:[Se.defaultParams]}:{})),vr=fr.data,Pr=fr.run,Sr=fr.loading,Tr=(0,a.useMemo)(function(){return JSON.stringify({service:Se,fieldNames:fe})},[Se,fe]),br=(0,a.useCallback)(function(){return or.current&&_t?(0,t.jsx)(_t,{search:or.current,callBack:function(){or.current=null}}):null},[or.current]);(0,a.useEffect)(function(){ur.current&&Pr()},[Tr]);var Lr=function(){var co=O()(x()().mark(function ro(Po){var Fo;return x()().wrap(function(zo){for(;;)switch(zo.prev=zo.next){case 0:Pr({filter:(0,Gt.EO)([Po?ct()({},fe.label,ct()({},Yn,Po)):{},Se==null||(Fo=Se.params)===null||Fo===void 0?void 0:Fo.filter])}),or.current=Po;case 2:case"end":return zo.stop()}},ro)}));return function(Po){return co.apply(this,arguments)}}(),Xr=(0,a.useMemo)(function(){var co,ro=He||Ge;if(!(vr!=null&&(co=vr.data)!==null&&co!==void 0&&co.length))return ro!=null?Array.isArray(ro)?ro:[ro]:[];var Po=ro!=null&&(Array.isArray(ro)?ro.map(function(To){return r()(r()({},To),{},ct()({},fe.value,To[fe.value]||To))}):[r()(r()({},ro),{},ct()({},fe.value,ro[fe.value]||ro))])||[],Fo=typeof Rt=="function"?vr.data.filter(Rt):vr.data;return(0,Lt.uniqBy)(Fo.concat(Po??[]),fe.value)},[He,Ge,vr==null?void 0:vr.data,fe.value,Rt]),no=function(ro){or.current=null,ro&&Pr(),ur.current=!0};return(0,t.jsx)(dn,r()(r()({popupMatchSelectWidth:Cn,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:fe,onSearch:Lr,onDropdownVisibleChange:no,objectValue:Xe,value:He,defaultValue:Ge},Vt),{},{loading:vr?Sr:!0,options:Mn(qn(Xr)),rawOptions:Xr,dropdownRender:function(ro){var Po=Xr.some(function(Fo){return Fo[fe.label]===or.current});return(0,t.jsx)(t.Fragment,{children:wn?(0,t.jsxs)(t.Fragment,{children:[!((vr==null?void 0:vr.data.length)===0&&or!==null&&or!==void 0&&or.current)&&ro,(vr==null?void 0:vr.data.length)>0&&(or==null?void 0:or.current)&&!Po&&(0,t.jsx)(Rn.Z,{style:{margin:0}}),!Po&&(0,t.jsx)(br,{})]}):ro})}}))},(0,m.mapProps)({dataSource:"options"},function(ee,$){var me,pe=(0,m.useFieldSchema)();return r()(r()({},ee),{},{fieldNames:r()(r()(r()(r()({},gt),ee.fieldNames),$.componentProps.fieldNames),(me=pe["x-component-props"])===null||me===void 0?void 0:me.fieldNames),suffixIcon:$!=null&&$.loading||$!=null&&$.validating?(0,t.jsx)(In.Z,{}):ee.suffixIcon})}),(0,m.mapReadPretty)(xn))),Mt=Ft;Mt.ReadPretty=xn;var xt=null,mt=function(){var $=(0,m.useFieldSchema)(),me=(0,st.$)(),pe=me.t,fe=(0,We.bz)(),be=fe.duplicateData,Se=(0,d.useCollectionManager_deprecated)(),Le=Se.getCollectionJoinField;if(be)return be;var $e=we($),He=$e.items,Ge=He===void 0?[]:He,Xe=$e.display,Pt=Xe===void 0?!0:Xe;Ge.forEach(function(Ct){try{var _t;Ct.fields=(_t=Ct.fields)===null||_t===void 0?void 0:_t.map(function(Rt){var Dt=Le("".concat(Ct.collection,".").concat(Rt));return Dt?Rt:""}).filter(Boolean)}catch(Rt){(0,Ue.error)(Rt),Ct.fields=[]}});var Je=[{key:"none",title:pe("None")}].concat(Ge.map(function(Ct,_t){return r()(r()({key:_t},Ct),{},{isLeaf:Ct.dataId!==null&&Ct.dataId!==void 0,titleCollectionField:(Ct==null?void 0:Ct.titleField)&&Le("".concat(Ct.collection,".").concat(Ct.titleField))})})),ft=Ge.find(function(Ct){return Ct.default});return{templates:Je,display:Pt,defaultTemplate:ft,enabled:Ge.length>0&&Ge.every(function(Ct){return Ct.dataId||Ct.dataScope})}},At=a.memo(function(ee){var $=ee.style,me=$===void 0?{}:$,pe=ee.form,fe=(0,l.dQ)(),be=fe.token,Se=mt(),Le=Se.templates,$e=Se.display,He=Se.enabled,Ge=Se.defaultTemplate,Xe=(0,d.useCollectionManager_deprecated)(),Pt=Xe.getCollectionJoinField,Je=(0,at.ss)(Le),ft=(0,a.useState)((Ge==null?void 0:Ge.key)||"none"),Ct=Ke()(ft,2),_t=Ct[0],Rt=Ct[1],Dt=(0,a.useState)(null),en=Ke()(Dt,2),Mn=en[0],An=en[1],Cn=(0,u.LY)(),Vt=(0,st.$)(),sn=Vt.t,Zn=(0,Te.FC)(),ur=(0,Te.on)(Zn);(0,a.useEffect)(function(){He&&Ge&&pe&&(pe.__template=!0,Ge.key==="duplicate"&&Nn(Ge.dataId,Ge,ur))},[]),(0,a.useEffect)(function(){Je!=null&&Je.some(function(pr){return pr.key===_t})||tr("none")},[Je]);var nr=(0,a.useMemo)(function(){return r()({display:"flex",alignItems:"center",backgroundColor:be.colorFillAlter,padding:be.padding},me)},[me,be.colorFillAlter]),wn=(0,a.useMemo)(function(){return{fontSize:be.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:be.marginXS}},[be.fontSize,be.marginXS]),tr=(0,a.useCallback)(function(){var pr=O()(x()().mark(function Qn(Fn){return x()().wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:Rt(Fn),An(null),pe==null||pe.reset();case 3:case"end":return yn.stop()}},Qn)}));return function(Qn){return pr.apply(this,arguments)}}(),[]),Nn=(0,a.useCallback)(function(){var pr=O()(x()().mark(function Qn(Fn,er,yn){var nn;return x()().wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:nn=r()(r()({},er),{},{dataId:Fn}),An(er),Ie(Cn,nn,yn).then(function(qn){return pe&&qn&&(pe.reset(),pe.__template=!0,(0,Ue.forEach)(qn,function(fr,vr){if(fr){var Pr;pe.values[vr]=fr,pe==null||(Pr=pe.setInitialValuesIn)===null||Pr===void 0||Pr.call(pe,vr,fr)}})),qn}).catch(function(qn){console.error(qn)});case 3:case"end":return ar.stop()}},Qn)}));return function(Qn,Fn,er){return pr.apply(this,arguments)}}(),[]);if(!He||!$e)return null;var or=Je==null?void 0:Je.find(function(pr){return pr.key===_t});return(0,t.jsx)("div",{style:nr,children:(0,t.jsxs)(Ye.Z,{wrap:!0,children:[(0,t.jsxs)("label",{style:wn,children:[sn("Data template"),": "]}),(0,t.jsx)(Et.default,{role:"button","data-testid":"select-form-data-template",popupMatchSelectWidth:!1,options:Je,fieldNames:{label:"title",value:"key"},value:_t,onChange:tr}),_t!=="none"&&or&&(0,t.jsx)(Mt,{style:{width:220},fieldNames:{label:or==null?void 0:or.titleField,value:"id"},target:or==null?void 0:or.collection,value:Mn,objectValue:!0,service:{resource:or==null?void 0:or.collection,params:{filter:or==null?void 0:or.dataScope}},onChange:function(Qn){return Nn(Qn==null?void 0:Qn.id,r()(r()({},Qn),or),ur)},targetField:Pt("".concat(or==null?void 0:or.collection,".").concat(or.titleField))})]})})});At.displayName="NocoBaseFormDataTemplates";function we(ee){var $=(0,We.Fi)(ee);return $?rt().cloneDeep($["x-data-templates"])||{}:{}}function Ie(ee,$,me){return Ee.apply(this,arguments)}function Ee(){return Ee=O()(x()().mark(function ee($,me,pe){return x()().wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(!(me.fields.length===0||!me.dataId)){be.next=2;break}return be.abrupt("return");case 2:return be.abrupt("return",$.resource(me.collection,void 0,pe).get({filterByTk:me.dataId,fields:me.fields,isTemplate:!0}).then(function(Se){var Le;return(Le=Se.data)===null||Le===void 0?void 0:Le.data}));case 3:case"end":return be.stop()}},ee)})),Ee.apply(this,arguments)}var Be=function(){var $,me,pe=(0,ce.aZ)(),fe=(0,m.useFieldSchema)(),be=Ae.Z.useToken(),Se=be.token,Le=(0,pt.ng)(),$e=Le.designable,He=(0,Pe.gp)()||{},Ge=He.heightProps,Xe=Ge||{},Pt=Xe.title,Je=Xe.titleHeight,ft=mt(),Ct=ft.display,_t=ft.enabled,Rt=fe.reduceProperties(function(tr,Nn){return Nn["x-component"]==="ActionBar"?Nn:tr}),Dt=Object.keys((Rt==null?void 0:Rt.properties)||{}).length>0,en=fe==null||($=fe.parent)===null||$===void 0||($=$["x-decorator"])===null||$===void 0||(me=$.includes)===null||me===void 0?void 0:me.call($,"FormBlockProvider"),Mn=Dt||$e?Se.controlHeight+(en?1*Se.marginLG:24+Se.paddingLG):Se.marginLG,An=Pt?Je:0,Cn=(0,Te.xQ)(),Vt=(Cn==null?void 0:Cn.meta)||{},sn=Vt.count,Zn=Vt.pageSize,ur=sn>Zn,nr=ur?Se.controlHeightSM+24:0,wn=Ct&&_t?Se.controlHeight+2*Se.padding+Se.margin:0;return pe-Mn-Se.paddingLG-An-nr-wn},ze,tt,ot=["form","children"],it=["form","children","disabled"],$t=["form","disabled"],St=function($){var me=$.form,pe=$.children,fe=B()($,ot),be=(0,m.useField)(),Se=(0,m.useFieldSchema)(),Le=Oe.Gn===null||Oe.Gn===void 0?void 0:(0,Oe.Gn)(Se),$e=(0,pt.lI)(me.createVoidField(r()(r()({},be.props),{},{basePath:""}))),He=Be(),Ge=Ae.Z.useToken(),Xe=Ge.token,Pt=(Le==null?void 0:Le["x-component-props"])||{},Je=Pt.layout,ft=Je===void 0?"vertical":Je,Ct=Pt.labelAlign,_t=Ct===void 0?"left":Ct,Rt=Pt.labelWidth,Dt=Rt===void 0?120:Rt,en=Pt.labelWrap,Mn=en===void 0?!0:en;return(0,t.jsx)(m.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(m.FormContext.Provider,{value:me,children:(0,t.jsx)(g.FormLayout,r()(r()({layout:ft},fe),{},{labelAlign:_t,labelWidth:ft==="horizontal"?Dt:null,labelWrap:Mn,children:(0,t.jsx)("div",{className:(0,de.css)(ze||(ze=re()([`
|
|
793
793
|
.nb-grid-container {
|
|
794
794
|
height: `,`;
|
|
795
795
|
overflow-y: auto;
|
|
@@ -1547,7 +1547,7 @@ https://requirejs.org/docs/errors.html#`+Ne);return l.requireType=Ne,l.requireMo
|
|
|
1547
1547
|
&:hover {
|
|
1548
1548
|
display: block !important;
|
|
1549
1549
|
}
|
|
1550
|
-
`]))),T=function(K){var U,F,te=(0,j.useFieldSchema)(),q=i()(i()({},K),te["x-toolbar-props"]||{}),J=q.disableInitializer,Z=q.title,P=q.template,X=q.schemaSettings,le=q.contextValue,Q=q.draggable,oe=Q===void 0?!0:Q,Ce=q.showDataSource,se=Ce===void 0?!0:Ce,De=(0,L.ngQ)(),We=De.dn,ye=De.designable,ve=(0,j.useField)(),xe=(0,N.$)(),he=xe.t,re=(0,L.eJW)(),de=(0,g.z)(),_e=de.getAriaLabel,Ae={dn:We,field:ve,fieldSchema:te},Fe=(0,A.m)(te["x-settings"]||X,te["x-settings-props"]),Oe=Fe.render,Me=Fe.exists,Te=(0,L.DiB)(),ge=(0,L.n14)(),ie=(0,y.fp)(),ne=ie==null?void 0:ie.getDataSources(),R=(0,V.wl)(),ue=(ne==null?void 0:ne.length)>1&&R,Pe=["FormItem","ReadPrettyFormItem"].includes(P==null?void 0:P.componentName)?"".concat(P==null?void 0:P.name," ").concat(he("(Fields only)")):P==null?void 0:P.name,ce=(0,b.useMemo)(function(){var je;return{insertPosition:"afterEnd",wrap:(Te==null||(je=Te.cols)===null||je===void 0?void 0:je.length)>1?void 0:h.BM,Component:function(Ue){return(0,u.jsx)(O.Z,i()(i()({},Ue),{},{role:"button","aria-label":_e("schema-initializer"),style:{cursor:"pointer",fontSize:14}}))}}},[_e,Te==null||(U=Te.cols)===null||U===void 0?void 0:U.length]);return ye?(0,u.jsx)(a.V$,i()(i()({},le),{},{children:(0,u.jsxs)("div",{className:n()("general-schema-designer",z),children:[Z&&(0,u.jsx)("div",{className:n()("general-schema-designer-title",f),children:(0,u.jsxs)(p.Z,{size:2,children:[(0,u.jsx)("span",{className:"title-tag",children:se&&ue?"".concat(re(ue==null?void 0:ue.displayName)," > ").concat(re(Z)):re(Z)}),P&&(0,u.jsxs)("span",{className:"title-tag",children:[he("Reference template"),": ",Pe||he("Untitled")]})]})}),(0,u.jsx)("div",{className:"general-schema-designer-icons",children:(0,u.jsxs)(p.Z,{size:3,align:"center",children:[oe&&(0,u.jsx)(L.IWB,{children:(0,u.jsx)(o.Z,{role:"button","aria-label":_e("drag-handler")})}),!J&&(ge!=null&&ge.InitializerComponent?(0,u.jsx)(ge.InitializerComponent,i()({},ce)):ge==null||(F=ge.renderSchemaInitializer)===null||F===void 0?void 0:F.call(ge,ce)),Me?Oe(le):(0,u.jsx)(B.cM,i()(i()({title:(0,u.jsx)(k.Z,{role:"button","aria-label":_e("schema-settings"),style:{cursor:"pointer",fontSize:12}})},Ae),{},{children:K.children}))]})})]})})):null},W=b.memo(function(H){var K,U=(0,j.useFieldSchema)(),F=i()(i()({},H),(U==null?void 0:U["x-toolbar-props"])||{}),te=F.title,q=F.initializer,J=F.settings,Z=F.showBackground,P=F.spaceWrapperClassName,X=F.spaceWrapperStyle,le=F.showBorder,Q=le===void 0?!0:le,oe=F.draggable,Ce=oe===void 0?!0:oe,se=F.spaceClassName,De=F.spaceStyle,We=F.toolbarClassName,ye=F.toolbarStyle,ve=ye===void 0?{}:ye,xe=F.container,he=(0,L.eJW)(),re=(0,b.useContext)(r.SchemaComponentContext),de=re.draggable,_e=E(),Ae=_e.componentCls,Fe=_e.hashId,Oe=(0,N.$)(),Me=Oe.t,Te=(0,g.z)(),ge=Te.getAriaLabel,ie=(0,y.fp)(),ne=ie==null?void 0:ie.getDataSources(),R=(0,V.wl)(),ue=(ne==null?void 0:ne.length)>1&&R,Pe=(0,Y.gR)(),ce=(0,b.useCallback)(function(){Pe({refreshParentSchema:!0})},[Pe]),je=(0,b.useMemo)(function(){if(te){if(typeof te=="string")return[he(te)];if(Array.isArray(te))return he(te)}},[te]),Ke=(0,A.m)(J||(U==null?void 0:U["x-settings"]),U==null?void 0:U["x-settings-props"]),Ue=Ke.render,Ye=Ke.exists,Et=(0,a.IU)(q||(U==null?void 0:U["x-initializer"]),U==null?void 0:U["x-initializer-props"]),Lt=Et.render,rt=Et.exists,st=(0,L.DiB)(),at=(0,L.n14)(),dt=(0,b.useMemo)(function(){var En;return{insertPosition:"afterEnd",wrap:(st==null||(En=st.cols)===null||En===void 0?void 0:En.length)===1?h.BM:void 0,Component:function(Un){return(0,u.jsx)(O.Z,i()(i()({},Un),{},{role:"button","aria-label":ge("schema-initializer"),style:{cursor:"pointer",fontSize:14}}))}}},[ge,st==null||(K=st.cols)===null||K===void 0?void 0:K.length]),ct=(0,b.useMemo)(function(){return Ce===!1||de===!1?null:(0,u.jsx)(L.IWB,{children:(0,u.jsx)(o.Z,{role:"button","aria-label":ge("drag-handler")})})},[Ce,ge,de]),hn=(0,b.useMemo)(function(){if(q===!1)return null;if(rt)return Lt(dt);if(at!=null&&at.InitializerComponent||at!=null&&at.renderSchemaInitializer){var En;return at!=null&&at.InitializerComponent?(0,u.jsx)(at.InitializerComponent,i()({},dt)):(En=at.renderSchemaInitializer)===null||En===void 0?void 0:En.call(at,dt)}},[at,q,dt,rt,Lt]),an=(0,b.useMemo)(function(){return J!==!1&&Ye?Ue():null},[Ye,Ue,J]),In=(0,b.useRef)(null),Jt="hidden";(0,b.useEffect)(function(){for(var En=In.current,Ht=En==null?void 0:En.parentElement;Ht&&Ht.clientHeight===0;)Ht=Ht.parentElement;var Un=xe||Ht;if(!Un)return;function _n(){if(En){var pt;En.classList.remove(Jt),(pt=H.onVisibleChange)===null||pt===void 0||pt.call(H,!0)}}function Gt(){if(En){var pt;En.classList.add(Jt),(pt=H.onVisibleChange)===null||pt===void 0||pt.call(H,!1)}}return Un.addEventListener("mouseenter",_n),Un.addEventListener("mouseleave",Gt),function(){Un.removeEventListener("mouseenter",_n),Un.removeEventListener("mouseleave",Gt)}},[H.onVisibleChange,xe]);var Rn=(0,b.useMemo)(function(){return i()({border:Q?"auto":0,background:Z?"auto":0},ve)},[Z,Q,ve]);return(0,u.jsxs)("div",{ref:In,className:n()(Ae,Fe,We,"schema-toolbar",Jt),style:Rn,children:[je&&(0,u.jsx)("div",{className:"toolbar-title",children:(0,u.jsxs)(p.Z,{size:2,children:[(0,u.jsx)("span",{className:"toolbar-title-tag",children:ue?"".concat(he(ue==null?void 0:ue.displayName)," > ").concat(je[0]):je[0]},je[0]),je[1]&&(0,u.jsx)("span",{className:"toolbar-title-tag",children:"".concat(Me("Reference template"),": ").concat("".concat(je[1])||Me("Untitled"))})]})}),(0,u.jsx)("div",{className:n()("toolbar-icons",P),style:X,children:(0,u.jsxs)(p.Z,{size:3,align:"center",className:se,style:De,children:[ct,(0,u.jsx)(Y.ri,{refresh:ce,children:hn}),an]})})]})});W.displayName="InternalSchemaToolbar";var t=(0,b.createContext)(!1),I=b.memo(function(H){var K=(0,L.ngQ)(),U=K.designable,F=(0,b.useState)(!1),te=l()(F,2),q=te[0],J=te[1],Z=(0,b.useCallback)(function(P){(0,b.startTransition)(function(){J(P)})},[]);return U?(0,u.jsx)(t.Provider,{value:q,children:(0,u.jsx)(W,i()(i()({},H),{},{onVisibleChange:Z}))}):null});I.displayName="SchemaToolbar"},22229:function(Ne,ae,e){"use strict";e.d(ae,{TF:function(){return D},bU:function(){return d},jd:function(){return V}});var w=e(5574),l=e.n(w),G=e(97857),i=e.n(G),x=e(15009),C=e.n(x),O=e(99289),o=e.n(O),k=e(9783),v=e.n(k),j=e(85667),p=e(27655),M=e(84157),n=e(96486),b=e.n(n),N=e(7840),r=e(90615),a=e(44256),A=e(76690),y=e(4595);function V(f,z){var T,W,t,I,H=f.field,K=f.linkageRules,U=f.formValues,F=f.localVariables,te=f.action,q=f.rule,J=f.variables,Z=f.variableNameOfLeftCondition;return H.initStateOfLinkageRules={display:((T=H.initStateOfLinkageRules)===null||T===void 0?void 0:T.display)||D(!0,H.display),required:((W=H.initStateOfLinkageRules)===null||W===void 0?void 0:W.required)||D(!0,H.required||!1),pattern:((t=H.initStateOfLinkageRules)===null||t===void 0?void 0:t.pattern)||D(!0,H.pattern),value:((I=H.initStateOfLinkageRules)===null||I===void 0?void 0:I.value)||D(!0,H.value||H.initialValue)},(0,j.reaction)(function(){var P=Y({linkageRules:K,formValues:U}),X=L({linkageRules:K,localVariables:F}),le=h({action:te,localVariables:F}),Q=[P,X,le].map(function(oe){return JSON.stringify(oe)}).join(",");return Q},g({action:te,field:H,rule:q,variables:J,localVariables:F,variableNameOfLeftCondition:Z},z),{fireImmediately:!0,equals:b().isEqual})}function Y(f){var z=f.linkageRules,T=f.formValues;return z.map(function(W){var t=function I(H){var K=Object.keys(H)[0]||"$and",U=H[K];return U.map(function(F){if("$and"in F||"$or"in F)return I(F);var te=(0,N.Rq)(F).join(".");return(0,M.getValuesByPath)(T,te)}).filter(Boolean)};return t(W.condition)})}function L(f){var z=f.linkageRules,T=f.localVariables;return z.map(function(W){var t=Object.keys(W.condition)[0]||"$and",I=W.condition[t];return I.map(function(H){var K=(0,N.od)(H);return K?(0,A.cG)(K.value)?B(K.value,T):K.value:null}).filter(Boolean)})}function h(f){var z,T=f.action,W=f.localVariables,t=T.value,I=t==null?void 0:t.mode,H=(t==null?void 0:t.value)||(t==null?void 0:t.result);if(I==="express"&&H!=null)return(z=(0,A.fN)(H))===null||z===void 0?void 0:z.map(function(K){return B(K,W)}).filter(Boolean)}function B(f,z){var T;if((0,A.cG)(f)){var W=(0,a.H)(f),t=v()({},W,(T=z.find(function(I){return I.name===W}))===null||T===void 0?void 0:T.ctx);return(0,M.getValuesByPath)(t,(0,r.D)(f))}}function g(f,z){var T=f.action,W=f.field,t=f.rule,I=f.variables,H=f.localVariables,K=f.variableNameOfLeftCondition;return function(){m({operator:T.operator,value:T.value,field:W,condition:t.condition,variables:I,localVariables:H,variableNameOfLeftCondition:K},z),setTimeout(o()(C()().mark(function U(){var F,te,q,J;return C()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(te=S(T.operator),(F=W.stateOfLinkageRules)!==null&&F!==void 0&&F[te]){P.next=3;break}return P.abrupt("return");case 3:return q=W.stateOfLinkageRules[te],P.next=6,Promise.all(q);case 6:q=P.sent,q=q.filter(function(X){return X.condition}),J=q[q.length-1],te==="value"?q.length>1&&(W.value=J.value):(te==="display"&&(J==null?void 0:J.value)==="hidden"?(W.display="visible",W.data=W.data||{},W.data.hidden=!0,W.required&&(W.required=!1,W.data.prevRequired=!0),requestAnimationFrame(function(){W.setState(function(X){X.display="visible"})})):(W[te]=J==null?void 0:J.value,W.data=W.data||{},W.data.hidden=!1,te==="display"&&(J==null?void 0:J.value)==="visible"&&W.data.prevRequired&&(delete W.data.prevRequired,W.required=!0),requestAnimationFrame(function(){W.setState(function(X){X[te]=J==null?void 0:J.value})})),te==="display"&&(J==null?void 0:J.value)==="none"&&(W.value=null)),W.stateOfLinkageRules[te]=null;case 11:case"end":return P.stop()}},U)})))}}function S(f){switch(f){case y.Us.Required:case y.Us.InRequired:return"required";case y.Us.Visible:case y.Us.None:case y.Us.Hidden:return"display";case y.Us.Editable:case y.Us.ReadOnly:case y.Us.ReadPretty:return"pattern";case y.Us.Value:return"value";default:return null}}var m=function(z,T){var W,t,I,H,K,U,F,te,q=z.operator,J=z.value,Z=z.field,P=z.condition,X=z.variables,le=z.localVariables,Q=z.variableNameOfLeftCondition,oe=(Z==null||(W=Z.stateOfLinkageRules)===null||W===void 0?void 0:W.required)||[Z==null||(t=Z.initStateOfLinkageRules)===null||t===void 0?void 0:t.required],Ce=(Z==null||(I=Z.stateOfLinkageRules)===null||I===void 0?void 0:I.display)||[Z==null||(H=Z.initStateOfLinkageRules)===null||H===void 0?void 0:H.display],se=(Z==null||(K=Z.stateOfLinkageRules)===null||K===void 0?void 0:K.pattern)||[Z==null||(U=Z.initStateOfLinkageRules)===null||U===void 0?void 0:U.pattern],De=(Z==null||(F=Z.stateOfLinkageRules)===null||F===void 0?void 0:F.value)||[Z==null||(te=Z.initStateOfLinkageRules)===null||te===void 0?void 0:te.value],We=p.evaluators.get("formula.js"),ye=We.evaluate,ve={ruleGroup:P,variables:X,localVariables:le,variableNameOfLeftCondition:Q};switch(q){case y.Us.Required:oe.push(D((0,N.jC)(ve,T),!0)),Z.stateOfLinkageRules=i()(i()({},Z.stateOfLinkageRules),{},{required:oe});break;case y.Us.InRequired:oe.push(D((0,N.jC)(ve,T),!1)),Z.stateOfLinkageRules=i()(i()({},Z.stateOfLinkageRules),{},{required:oe});break;case y.Us.Visible:case y.Us.None:case y.Us.Hidden:Ce.push(D((0,N.jC)(ve,T),q)),Z.stateOfLinkageRules=i()(i()({},Z.stateOfLinkageRules),{},{display:Ce});break;case y.Us.Editable:case y.Us.ReadOnly:case y.Us.ReadPretty:se.push(D((0,N.jC)(ve,T),q)),Z.stateOfLinkageRules=i()(i()({},Z.stateOfLinkageRules),{},{pattern:se});break;case y.Us.Value:{var xe=function(){var he=o()(C()().mark(function re(){var de,_e,Ae,Fe,Oe;return C()().wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if((J==null?void 0:J.mode)!=="express"){Te.next=18;break}if((J.value||J.result)!=null){Te.next=3;break}return Te.abrupt("return");case 3:return Te.next=5,d(J.value||J.result,{variables:X,localVariables:le});case 5:return de=Te.sent,_e=de.exp,Ae=de.scope,Te.prev=8,Fe=ye(_e,i()({now:function(){return new Date().toString()}},Ae)),Te.abrupt("return",Fe);case 13:Te.prev=13,Te.t0=Te.catch(8),console.error(Te.t0);case 16:Te.next=23;break;case 18:if((J==null?void 0:J.mode)!=="constant"){Te.next=22;break}return Te.abrupt("return",(Oe=J==null?void 0:J.value)!==null&&Oe!==void 0?Oe:J);case 22:return Te.abrupt("return",null);case 23:case"end":return Te.stop()}},re,null,[[8,13]])}));return function(){return he.apply(this,arguments)}}();u(P)?De.push(D(!0,xe())):De.push(D((0,N.jC)(ve,T),xe())),Z.stateOfLinkageRules=i()(i()({},Z.stateOfLinkageRules),{},{value:De})}break;default:return null}};function D(f,z){return E.apply(this,arguments)}function E(){return E=o()(C()().mark(function f(z,T){var W,t;return C()().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.next=2,Promise.all([z,T]);case 2:return W=H.sent,t=l()(W,2),z=t[0],T=t[1],H.abrupt("return",{condition:z,value:T});case 7:case"end":return H.stop()}},f)})),E.apply(this,arguments)}function u(f){var z=Object.keys(f)[0]||"$and",T=f[z];return b().isEmpty(T)}function d(f,z){return c.apply(this,arguments)}function c(){return c=o()(C()().mark(function f(z,T){var W,t,I,H,K,U;return C()().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(t=T.variables,I=T.localVariables,H={},K={},z!=null){te.next=5;break}return te.abrupt("return");case 5:if(U=(W=z.match(A.Bj))===null||W===void 0?void 0:W.map(function(){var q=o()(C()().mark(function J(Z){var P,X,le;return C()().wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,t.parseVariable(Z,I,{doNotRequest:Z.includes("$nForm")});case 2:return P=oe.sent,X=P.value,le="_".concat((0,M.uid)()),K[le]=X,H[Z]=le,oe.abrupt("return",X);case 8:case"end":return oe.stop()}},J)}));return function(J){return q.apply(this,arguments)}}()),!U){te.next=9;break}return te.next=9,Promise.all(U);case 9:return te.abrupt("return",{exp:z.replace(A.Bj,function(q){return"{{".concat(H[q]||q,"}}")}),scope:K});case 10:case"end":return te.stop()}},f)})),c.apply(this,arguments)}},43321:function(Ne,ae,e){"use strict";e.d(ae,{A:function(){return w}});function w(l,G){l.forEach(function(i){var x;(x=i.actions)===null||x===void 0||x.forEach(function(C){G(C,i)})})}},64279:function(Ne,ae,e){"use strict";e.d(ae,{U:function(){return Lt}});var w=e(97857),l=e.n(w),G=e(68400),i=e.n(G),x=e(97133),C=e(80844),O=e(67294),o=e(6145),k=e(49834),v=e(58837),j=e(15503),p=e(36586),M=e(62954),n=e(29132),b=e(13794),N=e(22691),r=e(42075),a=e(26793),A=e(9780),y=e(5574),V=e.n(y),Y=e(97309),L=e(5552),h=e(84327),B=e(34041),g=e(21143),S=e(86201),m=e(70993),D=e(84577),E=(0,O.createContext)(null);E.displayName="RemoveActionContext";var u=(0,O.createContext)(null);u.displayName="FilterContext";var d=(0,O.createContext)(null);d.displayName="LinkageLogicContext";var c=e(85893),f=function(st){var at=(0,O.useContext)(u)||{},dt=at.dynamicComponent,ct=at.disabled,hn=(0,D.Co)(dt),an=(0,O.useMemo)(function(){return(0,S.createForm)({values:{value:st.value},disabled:ct,effects:function(){(0,S.onFieldValueChange)("value",function(Rn){var En;st==null||(En=st.onChange)===null||En===void 0||En.call(st,Rn.value)})}})},[JSON.stringify(st.schema),JSON.stringify(st.value)]),In=function(){var Rn;return(0,c.jsx)(C.FieldContext.Provider,{value:null,children:(0,c.jsx)(m.n6,{schema:l()(l()({"x-component":"Input"},st.schema),{},{"x-component-props":(0,h.merge)((st==null||(Rn=st.schema)===null||Rn===void 0?void 0:Rn["x-component-props"])||{},{style:{minWidth:150,width:"100%"}}),name:"value","x-read-pretty":!1,"x-validator":void 0,"x-decorator":void 0})})})};return(0,c.jsx)(C.FormContext.Provider,{value:an,children:hn?O.createElement(hn,{value:st.value,onChange:st==null?void 0:st.onChange,renderSchemaComponent:In}):In()})},z=e(69677),T=e(7340),W=e(54885),t,I=B.default.Option,H=function(st){var at=st.fieldValue,dt=st.schema,ct=st.setValue,hn=st.collectionName,an=st.inputModes,In=(0,O.useState)((at==null?void 0:at.mode)||"constant"),Jt=V()(In,2),Rn=Jt[0],En=Jt[1],Ht=(0,a.$)(),Un=Ht.t,_n=(0,T.bz)(),Gt=_n.form,pt=(0,p.a)(),fn=(0,W.Y)({collectionField:{uiSchema:dt},form:Gt,record:pt,uiSchema:dt,noDisabled:!0}),Dn=(0,N.b1)({collectionField:{uiSchema:dt,collectionName:hn},uiSchema:dt,blockCollectionName:hn}),$n=Dn.compatOldVariables,rr=(0,O.useMemo)(function(){return{minWidth:150,maxWidth:430}},[]);(0,O.useEffect)(function(){En((at==null?void 0:at.mode)||"constant")},[at==null?void 0:at.mode]);var lr=(0,O.useCallback)(function(It){ct({mode:Rn,value:It})},[Rn,ct]),dr=(0,O.useMemo)(function(){return{minWidth:150,maxWidth:430,fontSize:13}},[]),yr=(0,O.useCallback)(function(It){var yt=It.replaceAll("".concat(hn,"."),"").replaceAll("$system.","").trim();ct({mode:Rn,value:It,result:yt})},[hn,Rn,ct]),Ln=(0,O.useMemo)(function(){return{minWidth:460,borderRadius:0}},[]),Ut=(0,O.useMemo)(function(){return $n(fn,{value:at==null?void 0:at.value})},[$n,at==null?void 0:at.value,fn]),gt={constant:(0,c.jsx)("div",{role:"button","aria-label":"dynamic-component-linkage-rules",style:rr,className:(0,x.css)(t||(t=i()([`
|
|
1550
|
+
`]))),T=function(K){var U,F,te=(0,j.useFieldSchema)(),q=i()(i()({},K),te["x-toolbar-props"]||{}),J=q.disableInitializer,Z=q.title,P=q.template,X=q.schemaSettings,le=q.contextValue,Q=q.draggable,oe=Q===void 0?!0:Q,Ce=q.showDataSource,se=Ce===void 0?!0:Ce,De=(0,L.ngQ)(),We=De.dn,ye=De.designable,ve=(0,j.useField)(),xe=(0,N.$)(),he=xe.t,re=(0,L.eJW)(),de=(0,g.z)(),_e=de.getAriaLabel,Ae={dn:We,field:ve,fieldSchema:te},Fe=(0,A.m)(te["x-settings"]||X,te["x-settings-props"]),Oe=Fe.render,Me=Fe.exists,Te=(0,L.DiB)(),ge=(0,L.n14)(),ie=(0,y.fp)(),ne=ie==null?void 0:ie.getDataSources(),R=(0,V.wl)(),ue=(ne==null?void 0:ne.length)>1&&R,Pe=["FormItem","ReadPrettyFormItem"].includes(P==null?void 0:P.componentName)?"".concat(P==null?void 0:P.name," ").concat(he("(Fields only)")):P==null?void 0:P.name,ce=(0,b.useMemo)(function(){var je;return{insertPosition:"afterEnd",wrap:(Te==null||(je=Te.cols)===null||je===void 0?void 0:je.length)>1?void 0:h.BM,Component:function(Ue){return(0,u.jsx)(O.Z,i()(i()({},Ue),{},{role:"button","aria-label":_e("schema-initializer"),style:{cursor:"pointer",fontSize:14}}))}}},[_e,Te==null||(U=Te.cols)===null||U===void 0?void 0:U.length]);return ye?(0,u.jsx)(a.V$,i()(i()({},le),{},{children:(0,u.jsxs)("div",{className:n()("general-schema-designer",z),children:[Z&&(0,u.jsx)("div",{className:n()("general-schema-designer-title",f),children:(0,u.jsxs)(p.Z,{size:2,children:[(0,u.jsx)("span",{className:"title-tag",children:se&&ue?"".concat(re(ue==null?void 0:ue.displayName)," > ").concat(re(Z)):re(Z)}),P&&(0,u.jsxs)("span",{className:"title-tag",children:[he("Reference template"),": ",Pe||he("Untitled")]})]})}),(0,u.jsx)("div",{className:"general-schema-designer-icons",children:(0,u.jsxs)(p.Z,{size:3,align:"center",children:[oe&&(0,u.jsx)(L.IWB,{children:(0,u.jsx)(o.Z,{role:"button","aria-label":_e("drag-handler")})}),!J&&(ge!=null&&ge.InitializerComponent?(0,u.jsx)(ge.InitializerComponent,i()({},ce)):ge==null||(F=ge.renderSchemaInitializer)===null||F===void 0?void 0:F.call(ge,ce)),Me?Oe(le):(0,u.jsx)(B.cM,i()(i()({title:(0,u.jsx)(k.Z,{role:"button","aria-label":_e("schema-settings"),style:{cursor:"pointer",fontSize:12}})},Ae),{},{children:K.children}))]})})]})})):null},W=b.memo(function(H){var K,U=(0,j.useFieldSchema)(),F=i()(i()({},H),(U==null?void 0:U["x-toolbar-props"])||{}),te=F.title,q=F.initializer,J=F.settings,Z=F.showBackground,P=F.spaceWrapperClassName,X=F.spaceWrapperStyle,le=F.showBorder,Q=le===void 0?!0:le,oe=F.draggable,Ce=oe===void 0?!0:oe,se=F.spaceClassName,De=F.spaceStyle,We=F.toolbarClassName,ye=F.toolbarStyle,ve=ye===void 0?{}:ye,xe=F.container,he=(0,L.eJW)(),re=(0,b.useContext)(r.SchemaComponentContext),de=re.draggable,_e=E(),Ae=_e.componentCls,Fe=_e.hashId,Oe=(0,N.$)(),Me=Oe.t,Te=(0,g.z)(),ge=Te.getAriaLabel,ie=(0,y.fp)(),ne=ie==null?void 0:ie.getDataSources(),R=(0,V.wl)(),ue=(ne==null?void 0:ne.length)>1&&R,Pe=(0,Y.gR)(),ce=(0,b.useCallback)(function(){Pe({refreshParentSchema:!0})},[Pe]),je=(0,b.useMemo)(function(){if(te){if(typeof te=="string")return[he(te)];if(Array.isArray(te))return he(te)}},[te]),Ke=(0,A.m)(J||(U==null?void 0:U["x-settings"]),U==null?void 0:U["x-settings-props"]),Ue=Ke.render,Ye=Ke.exists,Et=(0,a.IU)(q||(U==null?void 0:U["x-initializer"]),U==null?void 0:U["x-initializer-props"]),Lt=Et.render,rt=Et.exists,st=(0,L.DiB)(),at=(0,L.n14)(),dt=(0,b.useMemo)(function(){var En;return{insertPosition:"afterEnd",wrap:(st==null||(En=st.cols)===null||En===void 0?void 0:En.length)===1?h.BM:void 0,Component:function(Un){return(0,u.jsx)(O.Z,i()(i()({},Un),{},{role:"button","aria-label":ge("schema-initializer"),style:{cursor:"pointer",fontSize:14}}))}}},[ge,st==null||(K=st.cols)===null||K===void 0?void 0:K.length]),ct=(0,b.useMemo)(function(){return Ce===!1||de===!1?null:(0,u.jsx)(L.IWB,{children:(0,u.jsx)(o.Z,{role:"button","aria-label":ge("drag-handler")})})},[Ce,ge,de]),hn=(0,b.useMemo)(function(){if(q===!1)return null;if(rt)return Lt(dt);if(at!=null&&at.InitializerComponent||at!=null&&at.renderSchemaInitializer){var En;return at!=null&&at.InitializerComponent?(0,u.jsx)(at.InitializerComponent,i()({},dt)):(En=at.renderSchemaInitializer)===null||En===void 0?void 0:En.call(at,dt)}},[at,q,dt,rt,Lt]),an=(0,b.useMemo)(function(){return J!==!1&&Ye?Ue():null},[Ye,Ue,J]),In=(0,b.useRef)(null),Jt="hidden";(0,b.useEffect)(function(){for(var En=In.current,Ht=En==null?void 0:En.parentElement;Ht&&Ht.clientHeight===0;)Ht=Ht.parentElement;var Un=xe||Ht;if(!Un)return;function _n(){if(En){var pt;En.classList.remove(Jt),(pt=H.onVisibleChange)===null||pt===void 0||pt.call(H,!0)}}function Gt(){if(En){var pt;En.classList.add(Jt),(pt=H.onVisibleChange)===null||pt===void 0||pt.call(H,!1)}}return Un.addEventListener("mouseenter",_n),Un.addEventListener("mouseleave",Gt),function(){Un.removeEventListener("mouseenter",_n),Un.removeEventListener("mouseleave",Gt)}},[H.onVisibleChange,xe]);var Rn=(0,b.useMemo)(function(){return i()({border:Q?"auto":0,background:Z?"auto":0},ve)},[Z,Q,ve]);return(0,u.jsxs)("div",{ref:In,className:n()(Ae,Fe,We,"schema-toolbar",Jt),style:Rn,children:[je&&(0,u.jsx)("div",{className:"toolbar-title",children:(0,u.jsxs)(p.Z,{size:2,children:[(0,u.jsx)("span",{className:"toolbar-title-tag",children:ue?"".concat(he(ue==null?void 0:ue.displayName)," > ").concat(je[0]):je[0]},je[0]),je[1]&&(0,u.jsx)("span",{className:"toolbar-title-tag",children:"".concat(Me("Reference template"),": ").concat("".concat(je[1])||Me("Untitled"))})]})}),(0,u.jsx)("div",{className:n()("toolbar-icons",P),style:X,children:(0,u.jsxs)(p.Z,{size:3,align:"center",className:se,style:De,children:[ct,(0,u.jsx)(Y.ri,{refresh:ce,children:hn}),an]})})]})});W.displayName="InternalSchemaToolbar";var t=(0,b.createContext)(!1),I=b.memo(function(H){var K=(0,L.ngQ)(),U=K.designable,F=(0,b.useState)(!1),te=l()(F,2),q=te[0],J=te[1],Z=(0,b.useCallback)(function(P){(0,b.startTransition)(function(){J(P)})},[]);return U?(0,u.jsx)(t.Provider,{value:q,children:(0,u.jsx)(W,i()(i()({},H),{},{onVisibleChange:Z}))}):null});I.displayName="SchemaToolbar"},22229:function(Ne,ae,e){"use strict";e.d(ae,{TF:function(){return D},bU:function(){return d},jd:function(){return V}});var w=e(5574),l=e.n(w),G=e(97857),i=e.n(G),x=e(15009),C=e.n(x),O=e(99289),o=e.n(O),k=e(9783),v=e.n(k),j=e(85667),p=e(27655),M=e(84157),n=e(96486),b=e.n(n),N=e(7840),r=e(90615),a=e(44256),A=e(76690),y=e(4595);function V(f,z){var T,W,t,I,H=f.field,K=f.linkageRules,U=f.formValues,F=f.localVariables,te=f.action,q=f.rule,J=f.variables,Z=f.variableNameOfLeftCondition;return H.initStateOfLinkageRules={display:((T=H.initStateOfLinkageRules)===null||T===void 0?void 0:T.display)||D(!0,H.display),required:((W=H.initStateOfLinkageRules)===null||W===void 0?void 0:W.required)||D(!0,H.required||!1),pattern:((t=H.initStateOfLinkageRules)===null||t===void 0?void 0:t.pattern)||D(!0,H.pattern),value:((I=H.initStateOfLinkageRules)===null||I===void 0?void 0:I.value)||D(!0,H.value||H.initialValue)},(0,j.reaction)(function(){var P=Y({linkageRules:K,formValues:U}),X=L({linkageRules:K,localVariables:F}),le=h({action:te,localVariables:F}),Q=[P,X,le].map(function(oe){return JSON.stringify(oe)}).join(",");return Q},g({action:te,field:H,rule:q,variables:J,localVariables:F,variableNameOfLeftCondition:Z},z),{fireImmediately:!0,equals:b().isEqual})}function Y(f){var z=f.linkageRules,T=f.formValues;return z.map(function(W){var t=function I(H){var K=Object.keys(H)[0]||"$and",U=H[K];return U.map(function(F){if("$and"in F||"$or"in F)return I(F);var te=(0,N.Rq)(F).join(".");return(0,M.getValuesByPath)(T,te)}).filter(Boolean)};return t(W.condition)})}function L(f){var z=f.linkageRules,T=f.localVariables;return z.map(function(W){var t=Object.keys(W.condition)[0]||"$and",I=W.condition[t];return I.map(function(H){var K=(0,N.od)(H);return K?(0,A.cG)(K.value)?B(K.value,T):K.value:null}).filter(Boolean)})}function h(f){var z,T=f.action,W=f.localVariables,t=T.value,I=t==null?void 0:t.mode,H=(t==null?void 0:t.value)||(t==null?void 0:t.result);if(I==="express"&&H!=null)return(z=(0,A.fN)(H))===null||z===void 0?void 0:z.map(function(K){return B(K,W)}).filter(Boolean)}function B(f,z){var T;if((0,A.cG)(f)){var W=(0,a.H)(f),t=v()({},W,(T=z.find(function(I){return I.name===W}))===null||T===void 0?void 0:T.ctx);return(0,M.getValuesByPath)(t,(0,r.D)(f))}}function g(f,z){var T=f.action,W=f.field,t=f.rule,I=f.variables,H=f.localVariables,K=f.variableNameOfLeftCondition;return function(){m({operator:T.operator,value:T.value,field:W,condition:t.condition,variables:I,localVariables:H,variableNameOfLeftCondition:K},z),setTimeout(o()(C()().mark(function U(){var F,te,q,J;return C()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(te=S(T.operator),(F=W.stateOfLinkageRules)!==null&&F!==void 0&&F[te]){P.next=3;break}return P.abrupt("return");case 3:return q=W.stateOfLinkageRules[te],P.next=6,Promise.all(q);case 6:q=P.sent,q=q.filter(function(X){return X.condition}),J=q[q.length-1],te==="value"?q.length>1&&(W.value=J.value):(te==="display"&&(J==null?void 0:J.value)==="hidden"?(W.display="visible",W.data=W.data||{},W.data.hidden=!0,W.required&&(W.required=!1,W.data.prevRequired=!0),requestAnimationFrame(function(){W.setState(function(X){X.display="visible"})})):(W[te]=J==null?void 0:J.value,te==="display"&&(J==null?void 0:J.value)==="visible"&&(W.data=W.data||{},W.data.hidden=!1,W.data.prevRequired&&(delete W.data.prevRequired,W.required=!0)),requestAnimationFrame(function(){W.setState(function(X){X[te]=J==null?void 0:J.value})})),te==="display"&&(J==null?void 0:J.value)==="none"&&(W.value=null)),W.stateOfLinkageRules[te]=null;case 11:case"end":return P.stop()}},U)})))}}function S(f){switch(f){case y.Us.Required:case y.Us.InRequired:return"required";case y.Us.Visible:case y.Us.None:case y.Us.Hidden:return"display";case y.Us.Editable:case y.Us.ReadOnly:case y.Us.ReadPretty:return"pattern";case y.Us.Value:return"value";default:return null}}var m=function(z,T){var W,t,I,H,K,U,F,te,q=z.operator,J=z.value,Z=z.field,P=z.condition,X=z.variables,le=z.localVariables,Q=z.variableNameOfLeftCondition,oe=(Z==null||(W=Z.stateOfLinkageRules)===null||W===void 0?void 0:W.required)||[Z==null||(t=Z.initStateOfLinkageRules)===null||t===void 0?void 0:t.required],Ce=(Z==null||(I=Z.stateOfLinkageRules)===null||I===void 0?void 0:I.display)||[Z==null||(H=Z.initStateOfLinkageRules)===null||H===void 0?void 0:H.display],se=(Z==null||(K=Z.stateOfLinkageRules)===null||K===void 0?void 0:K.pattern)||[Z==null||(U=Z.initStateOfLinkageRules)===null||U===void 0?void 0:U.pattern],De=(Z==null||(F=Z.stateOfLinkageRules)===null||F===void 0?void 0:F.value)||[Z==null||(te=Z.initStateOfLinkageRules)===null||te===void 0?void 0:te.value],We=p.evaluators.get("formula.js"),ye=We.evaluate,ve={ruleGroup:P,variables:X,localVariables:le,variableNameOfLeftCondition:Q};switch(q){case y.Us.Required:oe.push(D((0,N.jC)(ve,T),!0)),Z.stateOfLinkageRules=i()(i()({},Z.stateOfLinkageRules),{},{required:oe});break;case y.Us.InRequired:oe.push(D((0,N.jC)(ve,T),!1)),Z.stateOfLinkageRules=i()(i()({},Z.stateOfLinkageRules),{},{required:oe});break;case y.Us.Visible:case y.Us.None:case y.Us.Hidden:Ce.push(D((0,N.jC)(ve,T),q)),Z.stateOfLinkageRules=i()(i()({},Z.stateOfLinkageRules),{},{display:Ce});break;case y.Us.Editable:case y.Us.ReadOnly:case y.Us.ReadPretty:se.push(D((0,N.jC)(ve,T),q)),Z.stateOfLinkageRules=i()(i()({},Z.stateOfLinkageRules),{},{pattern:se});break;case y.Us.Value:{var xe=function(){var he=o()(C()().mark(function re(){var de,_e,Ae,Fe,Oe;return C()().wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if((J==null?void 0:J.mode)!=="express"){Te.next=18;break}if((J.value||J.result)!=null){Te.next=3;break}return Te.abrupt("return");case 3:return Te.next=5,d(J.value||J.result,{variables:X,localVariables:le});case 5:return de=Te.sent,_e=de.exp,Ae=de.scope,Te.prev=8,Fe=ye(_e,i()({now:function(){return new Date().toString()}},Ae)),Te.abrupt("return",Fe);case 13:Te.prev=13,Te.t0=Te.catch(8),console.error(Te.t0);case 16:Te.next=23;break;case 18:if((J==null?void 0:J.mode)!=="constant"){Te.next=22;break}return Te.abrupt("return",(Oe=J==null?void 0:J.value)!==null&&Oe!==void 0?Oe:J);case 22:return Te.abrupt("return",null);case 23:case"end":return Te.stop()}},re,null,[[8,13]])}));return function(){return he.apply(this,arguments)}}();u(P)?De.push(D(!0,xe())):De.push(D((0,N.jC)(ve,T),xe())),Z.stateOfLinkageRules=i()(i()({},Z.stateOfLinkageRules),{},{value:De})}break;default:return null}};function D(f,z){return E.apply(this,arguments)}function E(){return E=o()(C()().mark(function f(z,T){var W,t;return C()().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.next=2,Promise.all([z,T]);case 2:return W=H.sent,t=l()(W,2),z=t[0],T=t[1],H.abrupt("return",{condition:z,value:T});case 7:case"end":return H.stop()}},f)})),E.apply(this,arguments)}function u(f){var z=Object.keys(f)[0]||"$and",T=f[z];return b().isEmpty(T)}function d(f,z){return c.apply(this,arguments)}function c(){return c=o()(C()().mark(function f(z,T){var W,t,I,H,K,U;return C()().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(t=T.variables,I=T.localVariables,H={},K={},z!=null){te.next=5;break}return te.abrupt("return");case 5:if(U=(W=z.match(A.Bj))===null||W===void 0?void 0:W.map(function(){var q=o()(C()().mark(function J(Z){var P,X,le;return C()().wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,t.parseVariable(Z,I,{doNotRequest:Z.includes("$nForm")});case 2:return P=oe.sent,X=P.value,le="_".concat((0,M.uid)()),K[le]=X,H[Z]=le,oe.abrupt("return",X);case 8:case"end":return oe.stop()}},J)}));return function(J){return q.apply(this,arguments)}}()),!U){te.next=9;break}return te.next=9,Promise.all(U);case 9:return te.abrupt("return",{exp:z.replace(A.Bj,function(q){return"{{".concat(H[q]||q,"}}")}),scope:K});case 10:case"end":return te.stop()}},f)})),c.apply(this,arguments)}},43321:function(Ne,ae,e){"use strict";e.d(ae,{A:function(){return w}});function w(l,G){l.forEach(function(i){var x;(x=i.actions)===null||x===void 0||x.forEach(function(C){G(C,i)})})}},64279:function(Ne,ae,e){"use strict";e.d(ae,{U:function(){return Lt}});var w=e(97857),l=e.n(w),G=e(68400),i=e.n(G),x=e(97133),C=e(80844),O=e(67294),o=e(6145),k=e(49834),v=e(58837),j=e(15503),p=e(36586),M=e(62954),n=e(29132),b=e(13794),N=e(22691),r=e(42075),a=e(26793),A=e(9780),y=e(5574),V=e.n(y),Y=e(97309),L=e(5552),h=e(84327),B=e(34041),g=e(21143),S=e(86201),m=e(70993),D=e(84577),E=(0,O.createContext)(null);E.displayName="RemoveActionContext";var u=(0,O.createContext)(null);u.displayName="FilterContext";var d=(0,O.createContext)(null);d.displayName="LinkageLogicContext";var c=e(85893),f=function(st){var at=(0,O.useContext)(u)||{},dt=at.dynamicComponent,ct=at.disabled,hn=(0,D.Co)(dt),an=(0,O.useMemo)(function(){return(0,S.createForm)({values:{value:st.value},disabled:ct,effects:function(){(0,S.onFieldValueChange)("value",function(Rn){var En;st==null||(En=st.onChange)===null||En===void 0||En.call(st,Rn.value)})}})},[JSON.stringify(st.schema),JSON.stringify(st.value)]),In=function(){var Rn;return(0,c.jsx)(C.FieldContext.Provider,{value:null,children:(0,c.jsx)(m.n6,{schema:l()(l()({"x-component":"Input"},st.schema),{},{"x-component-props":(0,h.merge)((st==null||(Rn=st.schema)===null||Rn===void 0?void 0:Rn["x-component-props"])||{},{style:{minWidth:150,width:"100%"}}),name:"value","x-read-pretty":!1,"x-validator":void 0,"x-decorator":void 0})})})};return(0,c.jsx)(C.FormContext.Provider,{value:an,children:hn?O.createElement(hn,{value:st.value,onChange:st==null?void 0:st.onChange,renderSchemaComponent:In}):In()})},z=e(69677),T=e(7340),W=e(54885),t,I=B.default.Option,H=function(st){var at=st.fieldValue,dt=st.schema,ct=st.setValue,hn=st.collectionName,an=st.inputModes,In=(0,O.useState)((at==null?void 0:at.mode)||"constant"),Jt=V()(In,2),Rn=Jt[0],En=Jt[1],Ht=(0,a.$)(),Un=Ht.t,_n=(0,T.bz)(),Gt=_n.form,pt=(0,p.a)(),fn=(0,W.Y)({collectionField:{uiSchema:dt},form:Gt,record:pt,uiSchema:dt,noDisabled:!0}),Dn=(0,N.b1)({collectionField:{uiSchema:dt,collectionName:hn},uiSchema:dt,blockCollectionName:hn}),$n=Dn.compatOldVariables,rr=(0,O.useMemo)(function(){return{minWidth:150,maxWidth:430}},[]);(0,O.useEffect)(function(){En((at==null?void 0:at.mode)||"constant")},[at==null?void 0:at.mode]);var lr=(0,O.useCallback)(function(It){ct({mode:Rn,value:It})},[Rn,ct]),dr=(0,O.useMemo)(function(){return{minWidth:150,maxWidth:430,fontSize:13}},[]),yr=(0,O.useCallback)(function(It){var yt=It.replaceAll("".concat(hn,"."),"").replaceAll("$system.","").trim();ct({mode:Rn,value:It,result:yt})},[hn,Rn,ct]),Ln=(0,O.useMemo)(function(){return{minWidth:460,borderRadius:0}},[]),Ut=(0,O.useMemo)(function(){return $n(fn,{value:at==null?void 0:at.value})},[$n,at==null?void 0:at.value,fn]),gt={constant:(0,c.jsx)("div",{role:"button","aria-label":"dynamic-component-linkage-rules",style:rr,className:(0,x.css)(t||(t=i()([`
|
|
1551
1551
|
.ant-input-affix-wrapper {
|
|
1552
1552
|
border-radius: 0px;
|
|
1553
1553
|
}
|