@nocobase/app 1.3.45-beta → 1.3.46-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client/index.html
CHANGED
|
@@ -685,7 +685,7 @@ https://requirejs.org/docs/errors.html#`+ke);return l.requireType=ke,l.requireMo
|
|
|
685
685
|
padding: 2px 7px;
|
|
686
686
|
border-radius: 10px;
|
|
687
687
|
}
|
|
688
|
-
`]))))}));return(0,H.jsx)(X.BQs,{ellipsis:!0,popoverContent:$n,children:$n})};var Xt=(0,l.createContext)([]);Xt.displayName="VariableScopeContext";function hn(xt){var Kt=xt.scope,Lt=Kt===void 0?[]:Kt,qt=xt.children;return(0,H.jsx)(Xt.Provider,{value:Lt,children:qt})}function Zt(){return(0,l.useContext)(Xt)}function jt(){return null}jt.Input=(0,N.connect)(Ce),jt.TextArea=(0,N.connect)(st,(0,N.mapReadPretty)(st.ReadPretty)),jt.RawTextArea=(0,N.connect)(ye),jt.JSON=(0,N.connect)(Be);var ln=null},88969:function(ke,te,e){"use strict";e.d(te,{m:function(){return O}});var N=e(15009),l=e.n(N),$=e(19632),c=e.n($),A=e(99289),f=e.n(A),L=e(5574),o=e.n(L),W=e(97133),v=e(38089),D=e(67294),h=e(26793),I=e(60094),t=e(9783),r=e.n(t),u=(0,I.l6)("nb-variable-select",function(K){var P=K.componentCls;return r()({},P,{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}}})}),B=u,y=e(2876),C=e(85893);function O(K){var P=K.options,M=K.setOptions,p=K.onInsert,S=K.changeOnSelect,x=S===void 0?!1:S,i=K.fieldNames,w=i===void 0?{}:i,E=K.className,g=(0,h.$)(),m=g.t,a=(0,D.useState)([]),d=o()(a,2),F=d[0],R=d[1],n=B(),b=n.wrapSSR,z=n.componentCls,V=n.hashId,G=(0,I.dQ)(),Y=G.token;function U(Z){return H.apply(this,arguments)}function H(){return H=f()(l()().mark(function Z(re){var ne,J;return l()().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(J=re[re.length-1],!(!((ne=J.children)!==null&&ne!==void 0&&ne.length)&&!J.isLeaf&&J.loadChildren)){q.next=5;break}return q.next=4,J.loadChildren(J);case 4:M(function(Se){return c()(Se)});case 5:case"end":return q.stop()}},Z)})),H.apply(this,arguments)}return b((0,C.jsx)(y.R,{className:(0,W.cx)("x-button",z,V,E),children:(0,C.jsx)(v.Z,{placeholder:m("Select a variable"),value:[],options:P,fieldNames:w,loadData:U,onChange:function(){var re,ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(R(ne),!!ne.length){var k=J[J.length-1];(!(k!=null&&(re=k.children)!==null&&re!==void 0&&re.length)&&!(k!=null&&k.loadChildren)||k!=null&&k.isLeaf)&&p(ne)}},changeOnSelect:x,onClick:function(re){if(!(re.detail!==2||!x))for(var ne=re.target;ne&&ne!==re.currentTarget;ne=ne.parentNode){var J;Array.from((J=ne.classList)!==null&&J!==void 0?J:[]).includes("ant-cascader-menu-item")&&p(F)}},popupClassName:"Cascader-popupClassName",dropdownRender:x?function(Z){return(0,C.jsxs)(C.Fragment,{children:[Z,(0,C.jsx)("div",{style:{padding:"0.5em",borderTop:"1px solid ".concat(Y.colorBorder),color:Y.colorTextDescription},children:m("Double click to choose entire object")})]})}:null})}))}},2876:function(ke,te,e){"use strict";e.d(te,{R:function(){return f}});var N=e(97857),l=e.n(N),$=e(15867),c=e(67294),A=e(85893),f=(0,c.forwardRef)(function(L,o){var W=(0,c.useMemo)(function(){return{fontStyle:"italic",fontFamily:"New York, Times New Roman, Times, serif"}},[]);return(0,A.jsxs)($.ZP,l()(l()({"aria-label":"variable-button",ref:o,style:W},L),{},{children:["x",L.children]}))});f.displayName="XButton"},72724:function(ke,te,e){"use strict";e.d(te,{L:function(){return I}});var N=e(97857),l=e.n(N),$=e(5574),c=e.n($),A=e(94697),f=e(80844),L=e(67294),o=e(26793),W=e(21143),v=e(84577),D=e(85893),h=function(r){var u=(0,v.ng)(),B=u.refresh,y=(0,W.useAPIClient)(),C=(0,o.$)(),O=C.t;return(0,L.useCallback)(function(K){var P,M,p,S,x,i,w,E,g=K.active,m=K.over,a=g==null||(P=g.data)===null||P===void 0||(P=P.current)===null||P===void 0?void 0:P.schema,d=m==null||(M=m.data)===null||M===void 0||(M=M.current)===null||M===void 0?void 0:M.schema,F=m==null||(p=m.data)===null||p===void 0||(p=p.current)===null||p===void 0?void 0:p.insertAdjacent,R=m==null||(S=m.data)===null||S===void 0||(S=S.current)===null||S===void 0?void 0:S.breakRemoveOn,n=m==null||(x=m.data)===null||x===void 0||(x=x.current)===null||x===void 0?void 0:x.wrapSchema,b=m==null||(i=m.data)===null||i===void 0||(i=i.current)===null||i===void 0?void 0:i.onSuccess,z=(w=m==null||(E=m.data)===null||E===void 0||(E=E.current)===null||E===void 0?void 0:E.removeParentsIfNoChildren)!==null&&w!==void 0?w:!0;if(!a||!d){r==null||r(K);return}if(a===d){r==null||r(K);return}if(a.parent===d&&F==="beforeEnd"){r==null||r(K);return}var V=(0,v.Pl)({t:O,api:y,refresh:B,current:d});if(V.loadAPIClientEvents(),a.parent===d.parent){V.insertBeforeBeginOrAfterEnd(a),r==null||r(K);return}if(F){V.insertAdjacent(F,a,{wrap:n,breakRemoveOn:R,removeParentsIfNoChildren:z,onSuccess:b}),r==null||r(K);return}},[r])},I=(0,f.observer)(function(t){var r=(0,o.$)(),u=r.t,B=(0,L.useState)(!0),y=c()(B,2),C=y[0],O=y[1],K=(0,L.useCallback)(function(M){var p,S=M.active,x=S==null||(p=S.data)===null||p===void 0||(p=p.current)===null||p===void 0?void 0:p.schema;if(O(!!x),t!=null&&t.onDragStart){var i;t==null||(i=t.onDragStart)===null||i===void 0||i.call(t,M)}},[t==null?void 0:t.onDragStart]),P=h(t==null?void 0:t.onDragEnd);return(0,D.jsxs)(A.DndContext,l()(l()({collisionDetection:A.rectIntersection},t),{},{onDragStart:K,onDragEnd:P,children:[(0,D.jsx)(A.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:C&&(0,D.jsx)("span",{style:{whiteSpace:"nowrap"},children:u("Dragging")})}),t.children]}))},{displayName:"DndContext"})},14896:function(ke,te,e){"use strict";e.r(te),e.d(te,{DndContext:function(){return N.L},DragHandler:function(){return l.IW},DraggableContext:function(){return l.LC},ShowFormData:function(){return f},Sortable:function(){return l.bt},SortableContext:function(){return l.Fo},SortableItem:function(){return l.TR},SortableProvider:function(){return l.OR},getRenderContent:function(){return L.I9}});var N=e(72724),l=e(20493),$=e(67294),c=e(80844),A=e(85893),f=(0,c.observer)(function(o){var W=o.children,v=(0,c.useForm)();return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("pre",{style:{marginBottom:20},"data-testid":"form-data",children:JSON.stringify(v.values,null,2)}),W]})}),L=e(34588)},20493:function(ke,te,e){"use strict";e.d(te,{IW:function(){return K},LC:function(){return t},bt:function(){return B},Fo:function(){return r},TR:function(){return O},OR:function(){return u}});var N=e(97857),l=e.n(N),$=e(13769),c=e.n($),A=e(10274),f=e(94697),L=e(97133),o=e(80844),W=e(67294),v=e(60094),D=e(85893),h=["component","overStyle","style","children","openMode"],I=["schema","id","eid","removeParentsIfNoChildren"],t=(0,W.createContext)(null);t.displayName="DraggableContext";var r=(0,W.createContext)(null);r.displayName="SortableContext";var u=function(M){var p=M.id,S=M.data,x=M.children,i=(0,f.useDraggable)({id:p,data:S}),w=(0,f.useDroppable)({id:p,data:S});return(0,D.jsx)(r.Provider,{value:{draggable:i,droppable:w},children:x})},B=function(M){var p,S,x=M.component,i=M.overStyle,w=M.style,E=M.children,g=M.openMode,m=c()(M,h),a=(0,v.dQ)(),d=a.token,F=(0,W.useContext)(r),R=F.draggable,n=F.droppable,b=n.isOver,z=n.setNodeRef,V=l()({},w);return b&&(R==null||(p=R.active)===null||p===void 0?void 0:p.id)!==(n==null||(S=n.over)===null||S===void 0?void 0:S.id)&&(V[x==="a"?"color":"background"]=new A.C(d.colorSettings).setAlpha(.15).toHex8String(),Object.assign(V,i)),W.createElement(x||"div",l()(l()({role:"none"},m),{},{className:(0,L.cx)("nb-sortable-designer",M.className),ref:z,style:V}),E)},y=function(M){var p=C(M),S=(0,o.useFieldSchema)();return M.schema?l()(l()({},M),{},{id:p}):l()(l()({},M),{},{id:p,schema:S})},C=function(M){var p=(0,o.useField)();return M.id?M.id:p.address.toString()},O=(0,o.observer)(function(P){var M=y(P),p=M.schema,S=M.id,x=M.eid,i=M.removeParentsIfNoChildren,w=c()(M,I),E=(0,W.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:p,removeParentsIfNoChildren:i!=null?i:!0}},[p,i]);return(0,D.jsx)(u,{id:S,data:E,children:(0,D.jsx)(B,l()(l()({id:x},w),{},{children:P.children}))})},{displayName:"SortableItem"}),K=function(M){var p=(0,W.useContext)(r),S=p.draggable,x=S.attributes,i=S.listeners,w=S.setNodeRef;return(0,D.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,D.jsx)("div",l()(l()(l()({ref:w,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},i),x),{},{role:"none",children:(0,D.jsx)("span",{style:{cursor:"move",fontSize:14},children:M.children})}))})}},34588:function(ke,te,e){"use strict";e.d(te,{jC:function(){return i},od:function(){return p},I9:function(){return g},Rq:function(){return S},e7:function(){return M}});var N=e(97857),l=e.n(N),$=e(15009),c=e.n($),A=e(9783),f=e.n(A),L=e(5574),o=e.n(L),W=e(99289),v=e.n(W),D=e(52677),h=e.n(D),I=e(96750),t=e.n(I),r=e(96486),u=e.n(r),B=e(10097),y=e(76690),C=e(65565),O=e(27484),K=e.n(O);function P(){"use strict";Array.isArray||(Array.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"});function a(n){for(var b=[],z=0,V=n.length;z<V;z++)b.indexOf(n[z])===-1&&b.push(n[z]);return b}function d(n,b){return JSON.stringify(n)===JSON.stringify(b)}var F={},R={$is:function(b,z){return b===z},$match:function(b,z){return Array.isArray(b)&&Array.isArray(z)&&b.some(function(V){return Array.isArray(V)})?b.some(function(V){return(V==null?void 0:V.length)===z.length&&(V==null?void 0:V.every(function(G,Y){return G===z[Y]}))}):JSON.stringify(b)===JSON.stringify(z)},$eq:function(b,z){return Array.isArray(b)&&Array.isArray(z)?d(b,z):Array.isArray(b)?b.includes(z):b==z},$ne:function(b,z){return b!=z},"!==":function(b,z){return b!==z},$gt:function(b,z){return Array.isArray(b)?b.some(function(V){return V>z}):b>z},$gte:function(b,z){return b>=z},$lt:function(b,z,V){return Array.isArray(b)?b.some(function(G){return G<z}):V===void 0?b<z:b<z&&z<V},$lte:function(b,z,V){return V===void 0?b<=z:b<=z&&z<=V},$exists:function(b){return F.truthy(b)},$notEmpty:function(b){return F.truthy(b)},$empty:function(b){return Array.isArray(b)?b.some(function(z){return!F.truthy(z)}):!F.truthy(b)},$notExists:function(b){return!F.truthy(b)},"%":function(b,z){return b%z},log:function(b){return console.log(b),b},$in:function(b,z){return!z||typeof z.indexOf=="undefined"?!1:Array.isArray(b)&&Array.isArray(z)?z.some(function(V){return b.includes(V)}):z.indexOf(b)!==-1},$notIn:function(b,z){return!z||typeof z.indexOf=="undefined"?!1:z.indexOf(b)===-1},$includes:function(b,z){return!b||typeof b.indexOf=="undefined"?!1:Array.isArray(b)?b.some(function(V){return V==null?void 0:V.includes(z)}):b.indexOf(z)!==-1},$notIncludes:function(b,z){return Array.isArray(b)?!b.some(function(V){return(V||"").includes(z)}):(b=b||"",!b.includes(z))},$anyOf:function(b,z){return b.length===0?!1:Array.isArray(b)&&Array.isArray(z)&&b.some(function(V){return Array.isArray(V)})?b.some(function(V){return V.some(function(G){return z.includes(G)})}):b.some(function(V){return z.includes(V)})},$noneOf:function(b,z){return!b||(b==null?void 0:b.length)===0?!0:Array.isArray(b)&&Array.isArray(z)&&b.some(function(V){return Array.isArray(V)})?b.some(function(V){return V.every(function(G){return!z.some(function(Y){return G.includes(Y)})})}):z.some(function(V){return!b.includes(V)})},$notMatch:function(b,z){if(b.length!==z.length)return!0;for(var V=0;V<b.length;V++)if(b[V]!==z[V])return!0;return!1},$dateOn:function(b,z){return!b||!z?!1:(Array.isArray(b)||(b=[b,b]),Array.isArray(z)||(z=[z,z]),b=b.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),b[0].isBetween(z[0],z[1],null,"[]")&&b[1].isBetween(z[0],z[1],null,"[]"))},$dateBefore:function(b,z){return!b||!z?!1:(Array.isArray(b)||(b=[b,b]),Array.isArray(z)||(z=[z,z]),b=b.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),b[0].isBefore(z[0])&&b[1].isBefore(z[0]))},$dateNotBefore:function(b,z){return!R.$dateBefore(b,z)},$dateAfter:function(b,z){return!b||!z?!1:(Array.isArray(b)||(b=[b,b]),Array.isArray(z)||(z=[z,z]),b=b.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),b[0].isAfter(z[1])&&b[1].isAfter(z[1]))},$dateNotAfter:function(b,z){return!R.$dateAfter(b,z)},$dateBetween:function(b,z){return R.$dateOn(b,z)},$dateNotOn:function(b,z){return!R.$dateOn(b,z)},$isTruly:function(b){return Array.isArray(b)?b.some(function(z){return z===!0||z===1}):b===!0||b===1},$isFalsy:function(b){return Array.isArray(b)?b.some(function(z){return!F.truthy(z)}):!F.truthy(b)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(b,z,V){if(V<0){var G=String(b).substr(z);return G.substr(0,G.length+V)}return String(b).substr(z,V)},"+":function(){return Array.prototype.reduce.call(arguments,function(b,z){return parseFloat(b,10)+parseFloat(z,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(b,z){return parseFloat(b,10)*parseFloat(z,10)})},"-":function(b,z){return z===void 0?-b:b-z},"/":function(b,z){return b/z},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(b,z){return b.concat(z)},[])},var:function(b,z){var V=z===void 0?null:z,G=this;if(typeof b=="undefined"||b===""||b===null)return G;for(var Y=String(b).split("."),U=0;U<Y.length;U++)if(G==null||(G=G[Y[U]],G===void 0))return V;return G},missing:function(){for(var b=[],z=Array.isArray(arguments[0])?arguments[0]:arguments,V=0;V<z.length;V++){var G=z[V],Y=F.apply({var:G},this);(Y===null||Y==="")&&b.push(G)}return b},missing_some:function(b,z){var V=F.apply({missing:z},this);return z.length-V.length>=b?[]:V}};return F.is_logic=function(n){return h()(n)==="object"&&n!==null&&!Array.isArray(n)&&Object.keys(n).length===1},F.truthy=function(n){return Array.isArray(n)&&n.length===0?!1:!!n},F.get_operator=function(n){return Object.keys(n)[0]},F.get_values=function(n){return n[F.get_operator(n)]},F.apply=function(n,b){if(Array.isArray(n))return n.map(function(J){return F.apply(J,b)});if(!F.is_logic(n))return n;var z=F.get_operator(n),V=n[z],G,Y,U,H,Z;if(Array.isArray(V)||(V=[V]),z==="if"||z=="?:"){for(G=0;G<V.length-1;G+=2)if(F.truthy(F.apply(V[G],b)))return F.apply(V[G+1],b);return V.length===G+1?F.apply(V[G],b):null}else if(z==="$and"){for(G=0;G<V.length;G+=1)if(Y=F.apply(V[G],b),!F.truthy(Y))return Y;return Y}else if(z==="or"){for(G=0;G<V.length;G+=1)if(Y=F.apply(V[G],b),F.truthy(Y))return Y;return Y}else{if(z==="filter")return H=F.apply(V[0],b),U=V[1],Array.isArray(H)?H.filter(function(J){return F.truthy(F.apply(U,J))}):[];if(z==="map")return H=F.apply(V[0],b),U=V[1],Array.isArray(H)?H.map(function(J){return F.apply(U,J)}):[];if(z==="reduce")return H=F.apply(V[0],b),U=V[1],Z=typeof V[2]!="undefined"?V[2]:null,Array.isArray(H)?H.reduce(function(J,k){return F.apply(U,{current:k,accumulator:J})},Z):Z;if(z==="all"){if(H=F.apply(V[0],b),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(!F.truthy(F.apply(U,H[G])))return!1;return!0}else if(z==="none"){if(H=F.apply(V[0],b),U=V[1],!Array.isArray(H)||!H.length)return!0;for(G=0;G<H.length;G+=1)if(F.truthy(F.apply(U,H[G])))return!1;return!0}else if(z==="some"){if(H=F.apply(V[0],b),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(F.truthy(F.apply(U,H[G])))return!0;return!1}}if(V=V.map(function(J){return F.apply(J,b)}),R.hasOwnProperty(z)&&typeof R[z]=="function")return R[z].apply(b,V);if(z.indexOf(".")>0){var re=String(z).split("."),ne=R;for(G=0;G<re.length;G++){if(!ne.hasOwnProperty(re[G]))throw new Error("Unrecognized operation "+z+" (failed at "+re.slice(0,G+1).join(".")+")");ne=ne[re[G]]}return ne.apply(b,V)}throw new Error("Unrecognized operation "+z)},F.uses_data=function(n){var b=[];if(F.is_logic(n)){var z=F.get_operator(n),V=n[z];Array.isArray(V)||(V=[V]),z==="var"?b.push(V[0]):V.forEach(function(G){b.push.apply(b,F.uses_data(G))})}return a(b)},F.add_operation=function(n,b){R[n]=b},F.rm_operation=function(n){delete R[n]},F.rule_like=function(n,b){if(b===n||b==="@")return!0;if(b==="number")return typeof n=="number";if(b==="string")return typeof n=="string";if(b==="array")return Array.isArray(n)&&!F.is_logic(n);if(F.is_logic(b)){if(F.is_logic(n)){var z=F.get_operator(b),V=F.get_operator(n);if(z==="@"||z===V)return F.rule_like(F.get_values(n,!1),F.get_values(b,!1))}return!1}if(Array.isArray(b))if(Array.isArray(n)){if(b.length!==n.length)return!1;for(var G=0;G<b.length;G+=1)if(!F.rule_like(n[G],b[G]))return!1;return!0}else return!1;return!1},F}var M=function(d,F){var R,n=/{{(.*?)}}/,b=d==null||(R=d.match)===null||R===void 0?void 0:R.call(d,n);if(b){var z=u().get(F,b[1]);return u().isFunction(z)?z():z}else return d};function p(a){if(h()(a)!=="object"||a===null)return null;for(var d in a)if(Object.prototype.hasOwnProperty.call(a,d))return Object.prototype.toString.call(a[d])==="[object Object]"&&a[d]!==null?p(a[d]):{key:d,value:a[d]};return null}var S=function(d){var F=x(d),R=(0,r.findIndex)(F,function(b,z,V){if(b.includes("$")&&z>0)return!0}),n=F.slice(0,R);return n};function x(a){var d=[];function F(R){Object.keys(R).sort().forEach(function(n){d.push(n),R[n]&&h()(R[n])==="object"&&F(R[n])})}return F(a),d}var i=function(){var a=v()(c()().mark(function d(F){var R,n,b,z,V,G,Y;return c()().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return R=F.ruleGroup,n=F.variables,b=F.localVariables,z=F.variableNameOfLeftCondition,V=Object.keys(R)[0]||"$and",G=R[V],Y=G.map(function(){var Z=v()(c()().mark(function re(ne){var J,k,q,Se,ee,ve,be,Re,Ce,Oe,De;return c()().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(!("$and"in ne||"$or"in ne)){ie.next=4;break}return ie.next=3,i({ruleGroup:ne,variables:n,localVariables:b});case 3:return ie.abrupt("return",ie.sent);case 4:if(J=p(ne),k=J==null?void 0:J.key,k){ie.next=8;break}return ie.abrupt("return",!0);case 8:return q=w(S(ne),z),Se=n.parseVariable(q,b,{doNotRequest:!0}).then(function(ge){var se=ge.value;return se}),ee=(0,y.cG)(J==null?void 0:J.value)?[n.parseVariable(J==null?void 0:J.value,b).then(function(ge){var se=ge.value;return se}),Se]:[J==null?void 0:J.value,Se],ie.prev=11,ve=P(),ie.next=15,Promise.all(ee);case 15:return be=ie.sent,Re=o()(be,2),Ce=Re[0],Oe=Re[1],ie.next=21,n.getCollectionField(q,b);case 21:return De=ie.sent,ie.abrupt("return",ve.apply(f()({},k,[(0,C.J)(Oe,{targetCollectionField:De}),(0,C.J)(Ce,{targetCollectionField:De})])));case 25:throw ie.prev=25,ie.t0=ie.catch(11),ie.t0;case 28:case"end":return ie.stop()}},re,null,[[11,25]])}));return function(re){return Z.apply(this,arguments)}}()),H.next=6,Promise.all(Y);case 6:if(Y=H.sent,V!=="$and"){H.next=11;break}return H.abrupt("return",(0,r.every)(Y,function(Z){return Z}));case 11:return H.abrupt("return",(0,r.some)(Y,function(Z){return Z}));case 12:case"end":return H.stop()}},d)}));return function(F){return a.apply(this,arguments)}}();function w(a){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(d,".").concat(a.join(".")," }}")}var E=function(d){var F={};return d.map(function(R){F[R.name]=R.ctx}),F};function g(a,d,F,R,n){return m.apply(this,arguments)}function m(){return m=v()(c()().mark(function a(d,F,R,n,b){var z,V,G,Y,U,H;return c()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(!(F&&d==="handlebars")){re.next=19;break}return re.prev=1,z=t().compile(F),V=E(n),G=R.ctxRef.current.$nDate,Y={},Object.keys(G).map(function(ne){Y[ne]=G[ne]()}),U=z(l()(l()(l()({},R.ctxRef.current),V),{},{$nDate:Y})),re.next=10,b(U);case 10:return re.abrupt("return",re.sent);case 13:return re.prev=13,re.t0=re.catch(1),console.log(re.t0),re.abrupt("return",F);case 17:re.next=31;break;case 19:return re.prev=19,re.next=22,(0,B.replaceVariableValue)(F,R,n);case 22:return H=re.sent,re.next=25,b(H);case 25:return re.abrupt("return",re.sent);case 28:return re.prev=28,re.t1=re.catch(19),re.abrupt("return",F);case 31:case"end":return re.stop()}},a,null,[[1,13],[19,28]])})),m.apply(this,arguments)}},61736:function(ke,te,e){"use strict";e.d(te,{D:function(){return l}});var N=e(67294),l=(0,N.createContext)({});l.displayName="SchemaComponentContext.Provider"},44245:function(ke,te,e){"use strict";e.d(te,{R:function(){return t}});var N=e(97857),l=e.n(N),$=e(13769),c=e.n($),A=e(86201),f=e(80844),L=e(67294),o=e(47844),W=e(85893),v=["children","form"],D=["children"],h=function(u){var B=u.children,y=u.form,C=c()(u,v),O=(0,L.useContext)(f.SchemaOptionsContext),K=(0,L.useContext)(f.SchemaExpressionScopeContext),P=l()(l()({},O==null?void 0:O.scope),K),M=l()({},O==null?void 0:O.components);return(0,W.jsx)(f.FormProvider,l()(l()({},C),{},{form:y,children:(0,W.jsx)(o.G,{components:M,scope:P,children:B})}))},I=function(u){var B=u.children,y=c()(u,D),C=(0,L.useContext)(f.SchemaOptionsContext),O=(0,L.useContext)(f.SchemaExpressionScopeContext),K=l()(l()({},C==null?void 0:C.scope),O),P=l()({},C==null?void 0:C.components),M=(0,L.useMemo)(function(){return(0,A.createForm)()},[]);return(0,W.jsx)(f.FormProvider,l()(l()({},y),{},{form:M,children:(0,W.jsx)(o.G,{components:P,scope:K,children:B})}))},t=function(u){return u.form?(0,W.jsx)(h,l()({},u)):(0,W.jsx)(I,l()({},u))}},93587:function(ke,te,e){"use strict";e.d(te,{m:function(){return t}});var N=e(97857),l=e.n(N),$=e(86201),c=e(57953),A=e(67294),f=e(84577),L=e(44245),o=e(93323),W=e(12174),v=function(u){var B=u.uid,y=u.type,C=y===void 0?"getJsonSchema":y,O=u.onSuccess,K={url:"/uiSchemas:".concat(C,"/").concat(B)},P=(0,W.QT)(K,{refreshDeps:[B],onSuccess:function(x){O&&O(x)}}),M=P.data,p=P.loading;return{schema:M==null?void 0:M.data,loading:p}},D=e(85893),h=function(u){return u},I=function(u){var B=u.noForm,y=u.onlyRenderProperties,C=u.hidden,O=u.scope,K=u.uid,P=u.memoized,M=P===void 0?!0:P,p=u.components,S=u.onSuccess,x=u.NotFoundPage,i=u.schemaTransform,w=i===void 0?h:i,E=u.onPageNotFind,g=(0,f.Dm)(),m=g.reset,a=y?"getProperties":"getJsonSchema",d={url:"/uiSchemas:".concat(a,"/").concat(K)},F=(0,A.useMemo)(function(){return(0,$.createForm)()},[K]),R=v({uid:K,type:a,onSuccess:function(G){S&&S(G),m&&m()}}),n=R.schema,b=R.loading,z=(0,f.Co)(x);return b||C?(0,D.jsx)("div",{style:{textAlign:"center",marginTop:20},children:(0,D.jsx)(c.Z,{})}):!n||Object.keys(n).length===0?(E&&E(),z?(0,D.jsx)(z,{}):null):B?(0,D.jsx)(o.n,{components:p,scope:O,schema:w(n||{})}):(0,D.jsx)(L.R,{form:F,children:(0,D.jsx)(o.n,{components:p,scope:O,schema:w(n||{})})})},t=(0,A.memo)(function(r){return r.uid?(0,D.jsx)(I,l()({},r)):null});t.displayName="RemoteSchemaComponent"},93323:function(ke,te,e){"use strict";e.d(te,{n:function(){return O}});var N=e(97857),l=e.n(N),$=e(13769),c=e.n($),A=e(9783),f=e.n(A),L=e(80844),o=e(90105),W=e(67294),v=e(61736),D=e(47844),h=e(85893),I=["components","scope","schema","distributed"],t=["schema"],r=["memoized"];function u(K){return L.Schema.isSchemaInstance(K)?K:K!=null&&K.name?new L.Schema({type:"object",properties:f()({},K.name,K)}):new L.Schema(K)}var B=function(P){return(0,W.useMemo)(function(){return u(P)},[])},y=(0,W.memo)(function(K){var P=K.components,M=K.scope,p=K.schema,S=K.distributed,x=c()(K,I),i=(0,W.useContext)(v.D),w=(0,W.useMemo)(function(){return u(p)},[p]),E=(0,o.Z)();return(0,h.jsx)(v.D.Provider,{value:l()(l()({},i),{},{distributed:i.distributed==!1?!1:S,refresh:function(){var m;if(E(),i.distributed===!1||S===!1){var a;(a=i.refresh)===null||a===void 0||a.call(i)}(m=K.onChange)===null||m===void 0||m.call(K,w)}}),children:(0,h.jsx)(D.G,{inherit:!0,components:P,scope:M,children:(0,h.jsx)(L.RecursionField,l()(l()({},x),{},{schema:w}))})})}),C=(0,W.memo)(function(K){var P=K.schema,M=c()(K,t),p=B(P);return(0,h.jsx)(y,l()(l()({},M),{},{schema:p}))}),O=(0,W.memo)(function(K){var P=K.memoized,M=c()(K,r);return P?(0,h.jsx)(C,l()({},M)):(0,h.jsx)(y,l()({},M))})},47844:function(ke,te,e){"use strict";e.d(te,{B:function(){return f},G:function(){return L}});var N=e(97857),l=e.n(N),$=e(80844),c=e(67294),A=e(85893),f=function(){var W=(0,c.useContext)($.SchemaOptionsContext);return W||{}},L=(0,c.memo)(function(o){var W=o.children,v=f(),D=(0,c.useMemo)(function(){return l()(l()({},v.components),o.components)},[v.components,o.components]),h=(0,c.useMemo)(function(){return l()(l()({},v.scope),o.scope)},[v.scope,o.scope]),I=(0,c.useMemo)(function(){return{scope:h,components:D}},[h,D]);return(0,A.jsx)($.SchemaOptionsContext.Provider,{value:I,children:(0,A.jsx)($.SchemaComponentsContext.Provider,{value:D,children:(0,A.jsx)($.ExpressionScope,{value:h,children:W})})})});L.displayName="SchemaComponentOptions"},70993:function(ke,te,e){"use strict";e.d(te,{_b:function(){return P},RV:function(){return M.R},m1:function(){return p.m},n6:function(){return S.n},G0:function(){return x.G},a$:function(){return Y},Tz:function(){return V},Bs:function(){return x.B}});var N=e(15009),l=e.n(N),$=e(99289),c=e.n($),A=e(12444),f=e.n(A),L=e(72004),o=e.n(L),W=e(31996),v=e.n(W),D=e(26037),h=e.n(D),I=e(51947),t=e(83062),r=e(15867),u=e(67294),B=e(49218),y=e(26793),C=e(40868),O=e(68230),K=e(85893),P=function(){var Z=(0,C.ngQ)(),re=Z.designable,ne=Z.setDesignable,J=(0,y.$)(),k=J.t,q=(0,O.d)(),Se=q.token,ee={};return re?ee.backgroundColor="var(--colorSettings)":ee.backgroundColor="transparent",(0,B.y1)("Ctrl+Shift+U",function(){return ne(!re)},[re]),(0,K.jsx)(t.Z,{title:k("UI Editor"),children:(0,K.jsx)(r.ZP,{"data-testid":"ui-editor-button",icon:(0,K.jsx)(I.Z,{style:{color:Se.colorTextHeaderMenu}}),title:k("UI Editor"),style:ee,onClick:function(){ne(!re)}})})},M=e(44245),p=e(93587),S=e(93323),x=e(47844),i=e(97857),w=e.n(i),E=e(5574),g=e.n(E),m=e(86201),a=e(80844),d=e(84327),F=e(90105),R=e(61736),n=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(Z).concat((0,d.uid)())};a.Schema.silent(!0);var b={},z={silent:!0,compile:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=function(){if(z.silent)try{return new Function("$root","with($root) { return (".concat(Z,"); }"))(re)}catch(k){return"{{".concat(Z,"}}")}else return new Function("$root","with($root) { return (".concat(Z,"); }"))(re)};return b[Z]?b[Z]:Z.trim().startsWith("t(")?(b[Z]=ne(),b[Z]):ne()}};a.Schema.registerCompiler(z.compile);var V=function(Z){var re=Z.designable,ne=Z.onDesignableChange,J=Z.components,k=Z.children,q=(0,u.useContext)(R.D),Se=(0,x.B)(),ee=(0,F.Z)(),ve=(0,u.useState)((0,d.uid)()),be=g()(ve,2),Re=be[0],Ce=be[1],Oe=(0,u.useMemo)(function(){return Z.form||(0,m.createForm)()},[Re]),De=(0,y.$)(),ue=De.t,ie=(0,u.useMemo)(function(){return w()(w()({},Z.scope),{},{t:ue,randomString:n})},[Z.scope,ue,Se==null?void 0:Se.scope]),ge=(0,u.useState)(re),se=g()(ge,2),fe=se[0],xe=se[1],ye=(0,u.useMemo)(function(){return typeof re=="boolean"?re:fe},[re,fe,q.designable]),je=(0,u.useMemo)(function(){return function(Ie){typeof ye!="boolean"&&xe(Ie),ne==null||ne(Ie)}},[ye,ne]),Be=(0,u.useCallback)(function(){Ce((0,d.uid)())},[]);return(0,K.jsx)(R.D.Provider,{value:{scope:ie,components:J,reset:Be,refresh:ee,designable:ye,setDesignable:je},children:(0,K.jsx)(a.FormProvider,{form:Oe,children:(0,K.jsx)(x.G,{inherit:!0,scope:ie,components:J,children:k})})})};V.displayName="SchemaComponentProvider";var G=e(31601),Y=function(H){v()(re,H);var Z=h()(re);function re(){return f()(this,re),Z.apply(this,arguments)}return o()(re,[{key:"load",value:function(){var ne=c()(l()().mark(function k(){return l()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:this.addComponents();case 1:case"end":return Se.stop()}},k,this)}));function J(){return ne.apply(this,arguments)}return J}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:P})}}]),re}(G.S),U=null},84577:function(ke,te,e){"use strict";e.d(te,{zz:function(){return L.zz},Pl:function(){return L.Pl},oB:function(){return L.oB},lI:function(){return l},hi:function(){return C.hi},eJ:function(){return $.e},Co:function(){return f},aZ:function(){return C.aZ},ng:function(){return L.ng},et:function(){return o.e},cL:function(){return u},fd:function(){return O},Cl:function(){return D},vH:function(){return B},sR:function(){return L.sR},wN:function(){return y.w},Dm:function(){return I},fM:function(){return C.fM}});var N=e(67294),l=function(P){var M=(0,N.useRef)(null);return(0,N.useEffect)(function(){return M.current&&P!==M.current&&M.current.onUnmount(),M.current=P,P.onMount(),function(){P.onUnmount()}},[P]),P},$=e(96365),c=e(80844),A=e(96486),f=function(P,M){var p=(0,N.useContext)(c.SchemaOptionsContext),S=p.components;return P?typeof P!="string"?P:(0,A.get)(S,P)||M:M},L=e(94516),o=e(98146),W=e(97857),v=e.n(W),D=function(P){var M=(0,N.useContext)(c.SchemaOptionsContext),p=(0,N.useContext)(c.SchemaExpressionScopeContext),S=(0,N.useRef)();return S.current=p,P.toFieldProps(v()(v()({},M),{},{get scope(){return v()(v()({},M.scope),S.current)}}))},h=e(61736);function I(){return(0,N.useContext)(h.D)}var t=e(26793),r=e(6145),u=function(){var P,M=(0,r.useCollectionManager_deprecated)(),p=M.getCollectionJoinField,S=M.getCollection,x=(0,c.useFieldSchema)(),i=(0,r.useCollection_deprecated)(),w=i.getField,E=w(x.name)||p(x["x-collection-field"]),g=(0,t.$)(),m=g.t,a=((P=x["x-component-props"])===null||P===void 0?void 0:P.fieldNames)||{},d=a.label,F=(0,N.useMemo)(function(){if(!(!E||!(E!=null&&E.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(E.interface)){var R=S(E.target);if((R==null?void 0:R.template)==="file")return[{label:m("Record picker"),value:"CollectionField"},{label:m("Select"),value:"AssociationSelect"}];switch(E.interface){case"o2m":return[{label:m("Record picker"),value:"CollectionField"},{label:m("Subtable"),value:"TableField"},{label:m("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:m("Record picker"),value:"CollectionField"},{label:m("Select"),value:"AssociationSelect"}];default:return[{label:m("Record picker"),value:"CollectionField"},{label:m("Subform"),value:"FormField"},{label:m("Select"),value:"AssociationSelect"}]}}},[m,E==null?void 0:E.interface,d]);return F},B=function(){var P,M=(0,c.useField)(),p=(0,c.useFieldSchema)(),S=(0,r.useCollection_deprecated)(),x=S.getField,i=(0,r.useCollectionManager_deprecated)(),w=i.getCollectionJoinField,E=x(p.name)||w(p["x-collection-field"]),g=(0,$.e)();(0,N.useEffect)(function(){if(!(M!=null&&M.title)){var m;M.title=g(E==null||(m=E.uiSchema)===null||m===void 0?void 0:m.title)}},[E==null||(P=E.uiSchema)===null||P===void 0?void 0:P.title])},y=e(9780),C=e(18686),O=function(P){var M,p=(0,t.$)(),S=p.t,x=(0,r.useCollectionManager_deprecated)(),i=x.getCollectionJoinField,w=x.getCollection,E=(0,c.useFieldSchema)(),g=(P==null?void 0:P.fieldSchema)||E,m=(0,c.useField)(),a=(0,c.useForm)(),d=(g==null?void 0:g["x-read-pretty"])||m.readPretty||a.readPretty,F=P==null?void 0:P.fieldSchema,R=(0,r.useCollection_deprecated)(),n=R.getField,b=(P==null?void 0:P.collectionField)||n(g.name)||i(g["x-collection-field"]),z=((M=g["x-component-props"])===null||M===void 0?void 0:M.fieldNames)||{},V=z.label,G=(0,N.useMemo)(function(){if(!(!b||!(b!=null&&b.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m","updatedBy","createdBy","mbm"].includes(b.interface)){var Y=w(b.target);if((Y==null?void 0:Y.template)==="file")return d?[{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((Y==null?void 0:Y.template)==="tree"&&["m2m","o2m","m2o"].includes(b.interface))return d?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!F&&{label:S("Sub-details"),value:"Nester"},!F&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!F&&["m2m","o2m"].includes(b.interface)&&{label:S("Sub-table"),value:"SubTable"},!F&&{label:S("Cascade Select"),value:"CascadeSelect"},!F&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];switch(b.interface){case"o2m":return d?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!F&&{label:S("Sub-table"),value:"SubTable"},!F&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!F&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"},!F&&{label:S("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return d?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!F&&{label:S("Sub-details"),value:"Nester"},!F&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!F&&{label:S("Sub-table"),value:"SubTable"},!F&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return d?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!F&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!F&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];default:return d?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!F&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!F&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}]}}},[S,b==null?void 0:b.interface,V]);return(G||[]).filter(Boolean)}},18686:function(ke,te,e){"use strict";e.d(te,{aZ:function(){return P},fM:function(){return p},hi:function(){return M}});var N=e(5574),l=e.n(N),$=e(97857),c=e.n($),A=e(80844),f=e(83204),L=e(9361),o=e(96486),W=e.n(o),v=e(67294),D=e(40868),h=e(21143),I=e(10097),t=e(1892),r=e(28561),u=function(i,w,E,g){return i?g.paddingContentHorizontalLG:E?w?g.controlPaddingHorizontal+3*g.controlPaddingHorizontalSM+22+g.paddingContentHorizontalLG:g.paddingContentHorizontalLG+12:w?g.paddingSM+g.controlHeight+g.marginXS+2*g.controlPaddingHorizontalSM+22+g.paddingContentHorizontalLG:g.controlHeight+g.marginXS+(g.paddingXXS+2)*2+g.paddingContentHorizontalLG},B=function(i){var w=L.Z.useToken(),E=w.token,g=(0,D.ngQ)(),m=g.designable,a=(0,I.useBlockHeightProps)(),d=a.heightProps,F=i||d||{},R=F.disablePageHeader,n=F.enablePageTabs,b=F.hidePageTitle,z=E.sizeXXL-2,V=m?E.controlHeight+2*E.paddingContentHorizontalLG:1*E.paddingContentHorizontalLG,G=u(R,n,b,E);return z+G+V},y=function(){var i=L.Z.useToken(),w=i.token,E=(0,D.ngQ)(),g=E.designable,m=w.paddingContentVerticalLG+w.margin+2*w.paddingContentVertical+24,a=g?w.controlHeight+2*w.paddingContentHorizontalLG:1*w.paddingContentHorizontalLG;return m+a},C=function(i){var w=(0,A.useFieldSchema)(),E=S(w),g=B(i),m=y();return E?m:g},O=["users_jobs","approvals","approvalRecords"],K=function(){var i,w,E=L.Z.useToken(),g=E.token,m=(0,I.useBlockHeightProps)(),a=m.heightProps,d=(0,t.Si)(),F=d.heightProps,R=(0,D.ngQ)(),n=R.designable,b=(0,A.useFieldSchema)(),z=F||a,V=C(z),G=(i=(0,h.useDataBlockRequest)())!==null&&i!==void 0?i:{},Y=G.data,U=(0,h.useCollection)(),H=U.name,Z=(Y==null?void 0:Y.meta)||{},re=Z.count,ne=Z.pageSize,J=re>ne,k=z.heightMode,q=z.height,Se=z.title;if(!(!(z!=null&&z.heightMode)||k===r.j.DEFAULT)){var ee=Object.keys(((w=b.parent.properties.actions)===null||w===void 0?void 0:w.properties)||{}).length>0,ve=J?g.controlHeight+g.padding+g.marginLG:g.marginLG,be=ee||n?g.controlHeight+2*g.marginLG:g.marginLG,Re=(n&&!O.includes(H)?g.controlHeight:22)+2*g.padding+1,Ce=Se?g.fontSizeLG*g.lineHeightLG+g.padding*2-1:0;return k===r.j.FULL_HEIGHT?window.innerHeight-V-Ce-Re-be-ve:q-Ce-be-Re-ve}},P=function(i){var w=(0,I.useBlockHeightProps)(),E=w.heightProps,g=C(),m=L.Z.useToken(),a=m.token,d=E||{},F=d.heightMode,R=d.height,n=d.title,b=n?a.fontSizeLG*a.lineHeightLG+a.padding*2-1:0;if(!(!(E!=null&&E.heightMode)||F===r.j.DEFAULT)){if(F===r.j.FULL_HEIGHT){var z=window.innerHeight-g;return i!=null&&i.removeBlockHeaderHeight&&(z=z-b),i!=null&&i.innerExtraHeight&&(z=z-i.innerExtraHeight),z}return R}},M=function(){var i=(0,A.useFieldSchema)(),w=(0,v.useMemo)(function(){return(0,I.getPageSchema)(i)},[]),E=(w==null?void 0:w["x-component-props"])||{},g=E.disablePageHeader,m=E.enablePageTabs,a=E.hidePageTitle,d=c()(c()({},i==null?void 0:i["x-component-props"]),{},{disablePageHeader:g,enablePageTabs:m,hidePageTitle:a}),F=C(d),R=d||{},n=R.heightMode,b=R.height;if(!(!(d!=null&&d.heightMode)||n===r.j.DEFAULT))return n===r.j.FULL_HEIGHT?window.innerHeight-F:b},p=function(){var i=(0,v.useState)(),w=l()(i,2),E=w[0],g=w[1],m=(0,v.useRef)(null),a=K(),d=(0,v.useCallback)((0,o.debounce)(function(){var R;if(m.current){var n=m.current.getBoundingClientRect(),b=(R=m.current.querySelector(".ant-table"))===null||R===void 0?void 0:R.getBoundingClientRect();b&&g(n.width)}},100),[a]),F=(0,v.useCallback)(function(R){m.current=R&&R.children?R.children[0]:null,d()},[d]);return(0,f.Z)("resize",d),{height:a,width:E,tableSizeRefCallback:F}},S=function x(i){return i?i["x-component"]==="Action.Container"?!0:x(i.parent):null}},96365:function(ke,te,e){"use strict";e.d(te,{e:function(){return o}});var N=e(97857),l=e.n(N),$=e(52677),c=e.n($),A=e(80844),f=e(67294),L={},o=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},D=v.noCache,h=(0,f.useContext)(A.SchemaOptionsContext),I=(0,f.useContext)(A.SchemaExpressionScopeContext);return function(t,r){var u=!1,B;if(typeof t=="string"&&t.startsWith("{{")&&(u=!0,B=t),t&&c()(t)==="object"&&!(0,f.isValidElement)(t)&&(u=!0,B=JSON.stringify(t)),Array.isArray(t)&&(u=!0),u){var y=l()(l()(l()({},h.scope),I),r);if(!B)return A.Schema.compile(t,y);try{return D?A.Schema.compile(t,y):(L[B]=L[B]||A.Schema.compile(t,y),L[B])}catch(C){return console.log("useCompile error",t,C),A.Schema.compile(t,y)}}return t}}},94516:function(ke,te,e){"use strict";e.d(te,{zz:function(){return V},Pl:function(){return d},oB:function(){return b},ng:function(){return Y},sR:function(){return G}});var N=e(5574),l=e.n(N),$=e(19632),c=e.n($),A=e(15009),f=e.n(A),L=e(99289),o=e.n(L),W=e(12444),v=e.n(W),D=e(72004),h=e.n(D),I=e(9783),t=e.n(I),r=e(97857),u=e.n(r),B=e(80844),y=e(84327),C=e(45360),O=e(50361),K=e.n(O),P=e(27361),M=e.n(P),p=e(36968),S=e.n(p),x=e(67294),i=e(26793),w=e(12174),E=e(61736);function g(U,H){if(U)return U["x-app-version"]||(U["x-app-version"]=H),Object.keys(U.properties||{}).forEach(function(Z){var re;g((re=U.properties)===null||re===void 0?void 0:re[Z],H)}),U}var m={i8:"1.3.45-beta"},a=e(85893);function d(U){return new V(U)}var F=function U(H){H&&(H["x-uid"]||(H["x-uid"]=(0,y.uid)()),Object.keys(H.properties||{}).forEach(function(Z){U(H.properties[Z])}))},R=function(H){return H},n=function(H,Z){if(!(!H||!Z)){for(var re in Z)if(Object.prototype.hasOwnProperty.call(Z,re)){var ne=Z[re];if(ne!==(H==null?void 0:H[re]))return!1}return!0}},b=function(H,Z){if(H["x-uid"]&&H["x-uid"]===Z["x-uid"])return[null,H.toJSON()];var re=H.toJSON(),ne=u()(u()({},re),{},{properties:{}}),J=null,k=function q(Se,ee){Object.keys(Se||{}).forEach(function(ve){var be=Se[ve];if(be["x-uid"]===Z["x-uid"]){J=Se[ve];return}else ee.properties[ve]=u()(u()({},be),{},{properties:{}}),q(be==null?void 0:be.properties,ee.properties[ve])})};return k(re.properties,ne),[ne,J]},z=function(H){return H},V=function(){function U(H){v()(this,U),t()(this,"current",void 0),t()(this,"options",void 0),t()(this,"appVersion",void 0),t()(this,"events",{}),this.options=H,this.current=H.current,this.appVersion=H.appVersion}return h()(U,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var Z=this,re=this.options,ne=re.api,J=re.t,k=J===void 0?z:J;if(ne){var q=function(ee){if(!ee)return[];var ve=Object.values(ee.properties).length,be=[];return ee.mapProperties(function(Re){Re["x-component-props"]=Re["x-component-props"]||{},Re["x-component-props"].width=100/ve,Re["x-uid"]&&be.push({"x-uid":Re["x-uid"],"x-component-props":Re["x-component-props"]})}),ee["x-uid"]&&be.length?be:[]};this.on("insertAdjacent",function(){var Se=o()(f()().mark(function ee(ve){var be,Re,Ce,Oe,De,ue,ie,ge,se,fe;return f()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(Re=ve.onSuccess,Ce=ve.current,Oe=ve.position,De=ve.schema,ue=ve.wrap,ie=ve.wrapped,ge=ve.removed,se=[],(ie==null?void 0:ie["x-component"])==="Grid.Col"&&(se=se.concat(q(ie.parent))),(ge==null?void 0:ge["x-component"])==="Grid.Col"&&(se=se.concat(q(ge.parent))),Z.refresh(),Ce["x-uid"]){ye.next=7;break}return ye.abrupt("return");case 7:return ye.next=9,ne.request({url:"/uiSchemas:insertAdjacent/".concat(Ce["x-uid"],"?position=").concat(Oe),method:"post",data:{schema:g(De,Z.appVersion),wrap:ue}});case 9:if(fe=ye.sent,!se.length){ye.next=13;break}return ye.next=13,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:se});case 13:if(!(ge!=null&&ge["x-uid"])){ye.next=16;break}return ye.next=16,ne.request({url:"/uiSchemas:remove/".concat(ge["x-uid"]),method:"post"});case 16:Re==null||Re(fe==null||(be=fe.data)===null||be===void 0?void 0:be.data),C.ZP.success(k("Saved successfully"),.2);case 18:case"end":return ye.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("patch",function(){var Se=o()(f()().mark(function ee(ve){var be;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(be=ve.schema,Z.refresh(),be!=null&&be["x-uid"]){Ce.next=4;break}return Ce.abrupt("return");case 4:return Ce.next=6,ne.request({url:"/uiSchemas:patch",method:"post",data:u()({},be)});case 6:C.ZP.success(k("Saved successfully"),.2);case 7:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var Se=o()(f()().mark(function ee(ve){var be;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(be=ve.schema,Z.refresh(),be!=null&&be["x-uid"]){Ce.next=4;break}return Ce.abrupt("return");case 4:return Ce.next=6,ne.request({url:"/uiSchemas:initializeActionContext",method:"post",data:u()({},be)});case 6:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("batchPatch",function(){var Se=o()(f()().mark(function ee(ve){var be;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return be=ve.schemas,Z.refresh(),Ce.next=4,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:be});case 4:C.ZP.success(k("Saved successfully"),.2);case 5:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("remove",function(){var Se=o()(f()().mark(function ee(ve){var be,Re;return f()().wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(be=ve.removed,Re=[],(be==null?void 0:be["x-component"])==="Grid.Col"&&(Re=q(be.parent)),Z.refresh(),be!=null&&be["x-uid"]){Oe.next=6;break}return Oe.abrupt("return");case 6:return Oe.next=8,ne.request({url:"/uiSchemas:remove/".concat(be["x-uid"]),method:"post"});case 8:if(!Re.length){Oe.next=11;break}return Oe.next=11,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:Re});case 11:C.ZP.success(k("Saved successfully"),.2);case 12:case"end":return Oe.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(Z){Z.type||(Z.type="void"),Z.name||(Z.name=(0,y.uid)()),this.current["x-uid"]&&F(Z)}},{key:"on",value:function(Z,re){this.events[Z]||(this.events[Z]=[]),this.events[Z].push(re)}},{key:"emit",value:function(){var H=o()(f()().mark(function re(ne){var J=this,k,q,Se,ee,ve,be=arguments;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(this.events[ne]){Ce.next=2;break}return Ce.abrupt("return");case 2:for(k=be.length,q=new Array(k>1?k-1:0),Se=1;Se<k;Se++)q[Se-1]=be[Se];return ee=q[0],ve=q.slice(1),Ce.abrupt("return",Promise.all(this.events[ne].map(function(Oe){return Oe.bind(J).apply(void 0,[u()({current:J.current},ee)].concat(c()(ve)))})));case 5:case"end":return Ce.stop()}},re,this)}));function Z(re){return H.apply(this,arguments)}return Z}()},{key:"parentsIn",value:function(Z){if(!Z||!B.Schema.isSchemaInstance(Z))return!1;for(var re=this.current;(ne=re)!==null&&ne!==void 0&&ne.parent;){var ne;if(re.parent===Z)return!0;re=re.parent}return!1}},{key:"refresh",value:function(){var Z=this.options.refresh;return Z==null?void 0:Z()}},{key:"deepMerge",value:function(Z){var re=this,ne={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"},J={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(k){ne[k]?(re.current[k]=Z[k],re.updateModel(ne[k],Z[k])):J[k]?Object.keys(Z[k]).forEach(function(q){S()(re.current,[k,q],Z[k][q]),re.updateModel([J[k],q],Z[k][q])}):re.current[k]=Z[k]}),this.emit("patch",{schema:Z})}},{key:"getSchemaAttribute",value:function(Z,re){return M()(this.current,Z,re)}},{key:"shallowMerge",value:function(Z){var re=this,ne={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(J){re.current[J]=Z[J],ne[J]&&re.updateModel(ne[J],Z[J])}),this.emit("patch",{schema:Z})}},{key:"updateModel",value:function(Z,re){var ne=function(k){S()(k,Z,re)};this.model&&ne(this.model),this.query&&this.query.take(ne)}},{key:"insertAdjacent",value:function(Z,re){var ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(Z){case"beforeBegin":return this.insertBeforeBegin(re,ne);case"afterBegin":return this.insertAfterBegin(re,ne);case"beforeEnd":return this.insertBeforeEnd(re,ne);case"afterEnd":return this.insertAfterEnd(re,ne)}}},{key:"recursiveRemoveIfNoChildren",value:function(Z,re){if(Z){for(var ne=Z,J,k=re==null?void 0:re.breakRemoveOn;ne;){if(typeof k=="function"){if(k(ne))break}else if(n(ne,k))break;var q=Object.keys(ne.properties||{}).length;if(q>0)break;ne.parent&&(J=ne.parent.removeProperty(ne.name)),ne=ne.parent}return J}}},{key:"remove",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=re.breakRemoveOn,J=re.removeParentsIfNoChildren,k=Z||this.current,q=k.parent.removeProperty(k.name);if(J){var Se=this.recursiveRemoveIfNoChildren(k.parent,{breakRemoveOn:ne});Se&&(q=Se)}return this.emit("remove",{removed:q})}},{key:"removeWithoutEmit",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=re.breakRemoveOn,J=re.removeParentsIfNoChildren,k=Z||this.current,q=k.parent.removeProperty(k.name);if(J){var Se=this.recursiveRemoveIfNoChildren(k.parent,{breakRemoveOn:ne});Se&&(q=Se)}return q}},{key:"insertBeforeBeginOrAfterEnd",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)&&B.Schema.isSchemaInstance(Z)&&this.current.parent===Z.parent){var J=0,k=0;return this.current.parent.mapProperties(function(q,Se,ee){re.current.name===Se&&(k=ee),Z.name===Se&&(J=ee)}),J>k?this.insertBeforeBegin(Z,ne):this.insertAfterEnd(Z,ne)}}},{key:"insertBeforeBegin",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var J={onSuccess:ne.onSuccess},k=ne.wrap,q=k===void 0?R:k,Se=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),ee&&(J.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Se}))}else Z&&(Z=K()(Z));var ve={},be=!1,Re=0,Ce=0;this.current.parent.mapProperties(function(fe,xe){xe===re.current.name&&(Ce=Re,be=!0,++Re),fe["x-index"]=Re,++Re,be&&(ve[xe]=fe,re.current.parent.removeProperty(xe))}),this.prepareProperty(Z);var Oe=q(Z),De=this.current.parent.addProperty(Oe.name||(0,y.uid)(),Oe);De["x-index"]=Ce,De.parent=this.current.parent,this.current.parent.setProperties(ve);var ue=b(De,Z),ie=l()(ue,2),ge=ie[0],se=ie[1];this.emit("insertAdjacent",u()({position:"beforeBegin",schema:se,wrapped:Oe,wrap:ge},J))}}},{key:"insertAfterBegin",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var ne={onSuccess:re.onSuccess},J=re.wrap,k=J===void 0?R:J,q=re.breakRemoveOn,Se=re.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Se&&(ne.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:q}))}else Z&&(Z=K()(Z));var ee={},ve=1;this.current.mapProperties(function(ie,ge){ie["x-index"]=ve,++ve,ee[ge]=ie}),this.current.properties={},this.prepareProperty(Z);var be=k(Z),Re=this.current.addProperty(be.name||(0,y.uid)(),be);Re["x-index"]=0,Re.parent=this.current,this.current.setProperties(ee);var Ce=b(Re,Z),Oe=l()(Ce,2),De=Oe[0],ue=Oe[1];this.emit("insertAdjacent",u()({position:"afterBegin",schema:ue,wrap:De,wrapped:be},ne))}}},{key:"insertBeforeEnd",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){delete Z["x-index"];var ne={onSuccess:re.onSuccess},J=re.wrap,k=J===void 0?R:J,q=re.breakRemoveOn,Se=re.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Se&&(ne.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:q}))}else Z&&(Z=K()(Z));this.prepareProperty(Z);var ee=k(Z),ve=this.current.addProperty(ee.name||(0,y.uid)(),ee);ve.parent=this.current;var be=b(ve,Z),Re=l()(be,2),Ce=Re[0],Oe=Re[1];return this.emit("insertAdjacent",u()({position:"beforeEnd",schema:Oe,wrap:Ce,wrapped:ee},ne))}}},{key:"insertAfterEnd",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var J={onSuccess:ne==null?void 0:ne.onSuccess},k=ne.wrap,q=k===void 0?R:k,Se=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren,ve=0,be=0,Re=!1,Ce={};if(this.current.parent.mapProperties(function(fe,xe){fe["x-index"]=ve,xe===re.current.name&&(++ve,be=ve,Re=!0),++ve,Re&&xe!==re.current.name&&(Ce[xe]=fe,re.current.parent.removeProperty(xe))}),B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),ee&&(J.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Se})),Z.parent=null}else Z&&(Z=K()(Z));this.prepareProperty(Z);var Oe=q(Z),De=this.current.parent.addProperty(Oe.name||(0,y.uid)(),Oe);De.parent=this.current.parent,De["x-index"]=be,this.current.parent.setProperties(Ce);var ue=b(De,Z),ie=l()(ue,2),ge=ie[0],se=ie[1];this.emit("insertAdjacent",u()({position:"afterEnd",schema:se,wrap:ge,wrapped:Oe},J))}}}]),U}();function G(){var U=(0,x.useContext)(B.SchemaOptionsContext),H=(0,x.useMemo)(function(){return(U==null?void 0:U.components)||{}},[U]),Z=function(ne){if(!ne)return null;if(typeof ne!="string")return ne;var J=M()(H,ne);return J||console.error('[nocobase]: Component "'.concat(ne,'" not found')),J};return Z}function Y(){var U=(0,x.useContext)(E.D),H=U.designable,Z=U.setDesignable,re=U.refresh,ne=U.reset,J=(0,x.useContext)(B.SchemaOptionsContext),k=(0,x.useMemo)(function(){return(J==null?void 0:J.components)||{}},[J]),q=(0,x.useMemo)(function(){return function(){return(0,a.jsx)(a.Fragment,{})}},[]),Se=(0,B.useField)(),ee=(0,B.useFieldSchema)(),ve=(0,w.LY)(),be=(0,i.$)(),Re=be.t,Ce=(0,x.useMemo)(function(){return d({t:Re,api:ve,refresh:re,current:ee,model:Se,appVersion:m.i8})},[Re,ve,re,ee,Se]);return(0,x.useEffect)(function(){Ce.loadAPIClientEvents()},[Ce]),{dn:Ce,designable:H,reset:ne,refresh:re,setDesignable:Z,DesignableBar:q,findComponent:(0,x.useCallback)(function(Oe){return Oe?typeof Oe!="string"?Oe:M()(k,Oe):null},[M()]),on:Ce.on.bind(Ce),patch:(0,x.useCallback)(function(Oe,De){var ue=function(se){Object.keys(se).forEach(function(fe){var xe=se[fe];fe==="title"&&(Se.title=xe,ee.title=xe),fe==="x-decorator-props"&&(Se.decoratorProps||(Se.decoratorProps={}),ee["x-decorator-props"]||(ee["x-decorator-props"]={}),Object.keys(xe).forEach(function(ye){Se.decoratorProps[ye]=xe[ye],ee["x-decorator-props"][ye]=xe[ye]})),fe==="x-component-props"&&(Se.componentProps||(Se.componentProps={}),ee["x-component-props"]||(ee["x-component-props"]={}),Object.keys(xe).forEach(function(ye){Se.componentProps[ye]=xe[ye],ee["x-component-props"][ye]=xe[ye]}))})};if(typeof Oe=="string"){var ie={};return S()(ie,Oe,De),ue(ie)}ue(Oe),re()},[Ce]),shallowMerge:(0,x.useCallback)(function(Oe){Ce.shallowMerge(Oe)},[Ce]),deepMerge:(0,x.useCallback)(function(Oe){Ce.deepMerge(Oe)},[Ce]),remove:(0,x.useCallback)(function(Oe,De){Ce.remove(Oe,De)},[Ce]),insertAdjacent:(0,x.useCallback)(function(Oe,De,ue){Ce.insertAdjacent(Oe,De,ue)},[Ce]),insertBeforeBegin:(0,x.useCallback)(function(Oe){Ce.insertBeforeBegin(Oe)},[Ce]),insertAfterBegin:(0,x.useCallback)(function(Oe){Ce.insertAfterBegin(Oe)},[Ce]),insertBeforeEnd:(0,x.useCallback)(function(Oe){Ce.insertBeforeEnd(Oe)},[Ce]),insertAfterEnd:(0,x.useCallback)(function(Oe){Ce.insertAfterEnd(Oe)},[Ce])}}},98146:function(ke,te,e){"use strict";e.d(te,{e:function(){return f}});var N=e(80844),l=e(84577),$=e(67294),c=e(26386),A=function(){return null},f=function(){var o=(0,l.ng)(),W=o.designable,v=(0,N.useFieldSchema)(),D=(0,$.useMemo)(function(){return v["x-designer"]||v["x-toolbar"]?v["x-designer"]||v["x-toolbar"]:v["x-settings"]?c.Mf:A},[v]),h=(0,l.Co)(D);return W&&h||A}},9780:function(ke,te,e){"use strict";e.d(te,{w:function(){return L}});var N=e(97857),l=e.n(N),$=e(13769),c=e.n($),A=["useProps"],f=function(){return{}},L=function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=W.useProps,D=v===void 0?f:v,h=c()(W,A),I=D;typeof D!="function"&&(I=f);var t=I();return l()(l()({},h),t)}},40868:function(ke,te,e){"use strict";e.d(te,{aUM:function(){return P.aU},olz:function(){return P.ol},N0i:function(){return P.N0},fWn:function(){return P.fW},EIK:function(){return P.EI},$Lt:function(){return P.$L},$b8:function(){return P.$b},HTy:function(){return ya},lkv:function(){return wr},rDu:function(){return Ja},eYL:function(){return P.eY},Rat:function(){return Hr},oAt:function(){return Sr},E7E:function(){return br},$SD:function(){return mi},fUi:function(){return $r.fU},QcG:function(){return Hl},MLy:function(){return Co.M},gOu:function(){return _s},jYG:function(){return Na.j},C1I:function(){return P.C1},Ssf:function(){return Jl},vTp:function(){return Xl},XZJ:function(){return Yr},Tt2:function(){return ns},zH8:function(){return ls},Q5L:function(){return cs},Pok:function(){return vi},Vm0:function(){return ps},xI_:function(){return rs},Lip:function(){return os},Mtg:function(){return Xr.Mt},iNu:function(){return Xr.iN},zzt:function(){return jt.zz},_bl:function(){return C._b},POi:function(){return fs},AOY:function(){return ve},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 dl},$w$:function(){return q.$w},nBj:function(){return q.nB},Oct:function(){return q.Oc},zdw:function(){return q.zd},CXR:function(){return ul},BQs:function(){return yr.BQ},Hj5:function(){return Rn.H},M0b:function(){return pi},wn$:function(){return xn.wn},GzZ:function(){return xn.Gz},tJZ:function(){return xn.tJ},fox:function(){return xn.fo},VTd:function(){return xn.VT},XsZ:function(){return xn.Xs},AsW:function(){return Ho},cLM:function(){return Wo},m__:function(){return Oo},l09:function(){return ne},D_t:function(){return Qi.D},WiK:function(){return Vn},xJW:function(){return q.xJ},RVL:function(){return C.RV},Bc8:function(){return Et},hG9:function(){return hi},DCh:function(){return fi},rjZ:function(){return qr.rj},Cqo:function(){return $a},jg7:function(){return qr.jg},gsn:function(){return yr.gs},$18:function(){return Is},IIB:function(){return yr.II},RnZ:function(){return qi},mX2:function(){return yr.mX},zDC:function(){return cr.zD},Phs:function(){return yr.Ph},aVo:function(){return Va},UGj:function(){return nl},yq5:function(){return ol},v2r:function(){return sa},HIW:function(){return Du},T3C:function(){return or},d97:function(){return da.d9},hGv:function(){return mr},tlE:function(){return Qs},rop:function(){return Xs},gGi:function(){return qs},DBW:function(){return va.D},MBS:function(){return eu.M},pGO:function(){return nu},Y8K:function(){return Pi},iVT:function(){return yr.iV},ODP:function(){return cr.OD},lbb:function(){return cr.lb},b7w:function(){return cr.b7},sUk:function(){return cr.sU},x1j:function(){return P.x1},m1v:function(){return C.m1},glM:function(){return Vt},xZD:function(){return P.xZ},IuH:function(){return xn.Iu},MkN:function(){return P.Mk},Hof:function(){return ru},n6:function(){return C.n6},DDd:function(){return hv.D},G0E:function(){return C.G0},a$w:function(){return C.a$},TzZ:function(){return C.Tz},y00:function(){return P.y0},PhF:function(){return Ct},Cqv:function(){return y.ShowFormData},cof:function(){return P.co},bts:function(){return y.Sortable},Fop:function(){return y.SortableContext},TRI:function(){return y.SortableItem},ORg:function(){return y.SortableProvider},TaI:function(){return au},qHe:function(){return kn.q},iA_:function(){return Lr},gvM:function(){return fu},SnY:function(){return ml},ASv:function(){return gu},bwk:function(){return Zr},mQc:function(){return Si},c__:function(){return ka.c},QZ3:function(){return At},L39:function(){return Na.L},jII:function(){return vl},mPs:function(){return yu},tgM:function(){return Eu},gqx:function(){return $r.gq},Qm7:function(){return $r.Qm},_wD:function(){return Pa._w},rjl:function(){return Pa.rj},Fjw:function(){return P.Fj},SLL:function(){return P.SL},sBv:function(){return P.sB},iTm:function(){return q.iT},Pls:function(){return jt.Pl},Oxq:function(){return wt},WLi:function(){return Ge},$9M:function(){return q.$9},nCn:function(){return za},iNG:function(){return _a},tD8:function(){return Ci},pg9:function(){return Zn},Ofb:function(){return q.Of},ibf:function(){return Xn},WyG:function(){return k},l6$:function(){return Fe.l6},WGR:function(){return Dn},C$H:function(){return cr.C$},cNQ:function(){return cr.cN},I9l:function(){return y.getRenderContent},XQ2:function(){return zr.XQ},ZZb:function(){return q.ZZ},elO:function(){return cr.el},CfU:function(){return Tr},SJF:function(){return gr},_Ko:function(){return Nr},Mev:function(){return ma},i2K:function(){return qn},WmO:function(){return xn.Wm},oBi:function(){return jt.oB},hKP:function(){return zr.hK},DU1:function(){return P.DU},XCj:function(){return P.XC},Vpg:function(){return hr},lIL:function(){return jt.lI},KxP:function(){return Co.K},hi9:function(){return jt.hi},p27:function(){return P.p2},z9d:function(){return cl.z},eJW:function(){return jt.eJ},Cor:function(){return jt.Co},aZq:function(){return jt.aZ},P1D:function(){return Xr.P1},ngQ:function(){return jt.ng},ett:function(){return jt.et},ySm:function(){return Rn.y},Zd$:function(){return q.Zd},cLh:function(){return jt.cL},baz:function(){return q.b},fde:function(){return jt.fd},Xdt:function(){return cr.Xd},Cld:function(){return jt.Cl},vH8:function(){return jt.vH},PLH:function(){return xn.PL},V8t:function(){return xn.V8},tMk:function(){return xn.tM},xQm:function(){return xn.xQ},sRe:function(){return jt.sR},frb:function(){return Ro},$N2:function(){return Uo},U1u:function(){return qe},HS$:function(){return P.HS},vBu:function(){return P.vB},QYZ:function(){return P.QY},t9d:function(){return P.t9},Kgy:function(){return xn.Kg},aJ2:function(){return xn.aJ},n14:function(){return qr.n1},DiB:function(){return qr.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 cr.Il},zCB:function(){return P.zC},a4r:function(){return va.a},wNf:function(){return jt.wN},Dmu:function(){return jt.Dm},Bsl:function(){return C.Bs},yKv:function(){return Js.y},fMB:function(){return jt.fM},gCg:function(){return ka.g},eT6:function(){return q.eT},q4O:function(){return q.q4},ymE:function(){return Pa.ym},uqQ:function(){return P.uq},K5K:function(){return P.K5}});var N={};e.r(N),e.d(N,{Action:function(){return P.aU},ActionBar:function(){return P.ol},ActionBarProvider:function(){return P.N0},ActionContext:function(){return P.fW},ActionContextProvider:function(){return P.EI},ActionDesigner:function(){return P.$L},AfterSuccess:function(){return P.$b},AntdSchemaComponentPlugin:function(){return ya},AntdSchemaComponentProvider:function(){return wr},AppendsTreeSelect:function(){return Ja},AssignedFieldValues:function(){return P.eY},AssociationField:function(){return Hr},AssociationFieldMode:function(){return Sr},AssociationFieldModeProvider:function(){return br},AssociationSelect:function(){return mi},AttachmentList:function(){return $r.fU},AutoComplete:function(){return Hl},BackButtonUsedInSubPage:function(){return Co.M},Block:function(){return _s},BlockItem:function(){return Na.j},ButtonEditor:function(){return P.C1},CardItem:function(){return Jl},Cascader:function(){return Xl},Checkbox:function(){return Yr},CollectionSelect:function(){return ns},ColorPicker:function(){return ls},ColorSelect:function(){return cs},Cron:function(){return vi},CronSet:function(){return ps},DataSourceCollectionCascader:function(){return rs},DataSourceSelect:function(){return os},DatePicker:function(){return Xr.Mt},DatePickerProvider:function(){return Xr.iN},Details:function(){return fs},DetailsDesigner:function(){return ve},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 dl},EditTitle:function(){return q.$w},EditTitleField:function(){return q.nB},EditTooltip:function(){return q.Oc},EditValidationRules:function(){return q.zd},Editable:function(){return ul},EllipsisWithTooltip:function(){return yr.BQ},ErrorFallback:function(){return Rn.H},Expand:function(){return pi},Filter:function(){return xn.wn},FilterAction:function(){return xn.Gz},FilterActionContext:function(){return xn.tJ},FilterContext:function(){return xn.fo},FilterDynamicComponent:function(){return xn.VT},FilterLogicContext:function(){return xn.Xs},FixedBlock:function(){return Ho},FixedBlockDesignerItem:function(){return Wo},FixedBlockWrapper:function(){return Oo},Form:function(){return ne},FormDialog:function(){return Qi.D},FormField:function(){return Vn},FormItem:function(){return q.xJ},FormV2:function(){return Et},G2Plot:function(){return hi},G2PlotRenderer:function(){return fi},Grid:function(){return qr.rj},GridCard:function(){return $a},GridRowContext:function(){return qr.jg},HTMLEncode:function(){return yr.gs},IconPicker:function(){return Is},Input:function(){return yr.II},InputNumber:function(){return qi},InputReadPretty:function(){return yr.mX},InputRecordPicker:function(){return cr.zD},Json:function(){return yr.Ph},List:function(){return Va},Markdown:function(){return nl},MarkdownReadPretty:function(){return ol},Menu:function(){return sa},NanoIDInput:function(){return Du},Page:function(){return or},PagePopups:function(){return da.d9},PageTabs:function(){return mr},Pagination:function(){return Qs},Password:function(){return Xs},Percent:function(){return qs},PopupSettingsProvider:function(){return va.D},Preview:function(){return eu.M},QuickEdit:function(){return nu},Radio:function(){return Pi},ReadPretty:function(){return yr.iV},ReadPrettyRecordPicker:function(){return cr.OD},RecordPicker:function(){return cr.lb},RecordPickerContext:function(){return cr.b7},RecordPickerProvider:function(){return cr.sU},RefreshDataBlockRequest:function(){return P.x1},RemoteSelect:function(){return Vt},RemoveButton:function(){return P.xZ},RemoveConditionContext:function(){return xn.Iu},RequestSettings:function(){return P.Mk},RichText:function(){return ru},SecondConFirm:function(){return P.y0},Select:function(){return Ct},SkipValidation:function(){return P.co},Space:function(){return au},StablePopover:function(){return kn.q},Table:function(){return Lr},TableBlockDesigner:function(){return fu},TableField:function(){return ml},TableSelectorDesigner:function(){return gu},TableV2:function(){return Zr},Tabs:function(){return Si},TabsContextProvider:function(){return ka.c},Templates:function(){return At},TestDesigner:function(){return Na.L},TimePicker:function(){return vl},TreeSelect:function(){return yu},UnixTimestamp:function(){return Eu},Upload:function(){return $r.gq},Uploader:function(){return $r.Qm},Variable:function(){return Pa._w},VariableScopeProvider:function(){return Pa.rj},WorkflowConfig:function(){return P.Fj},actionSettings:function(){return P.SL},actionSettingsItems:function(){return P.sB},allowAddNew:function(){return q.iT},defaultFieldNames:function(){return wt},fetchTemplateData:function(){return Ge},filterFormItemSettings:function(){return q.$9},findByUid:function(){return za},findKeysByUid:function(){return _a},findMenuItem:function(){return Ci},formDetailsSettings:function(){return Zn},formItemSettings:function(){return q.Of},formSettings:function(){return Xn},formV1Settings:function(){return k},genStyleHook:function(){return Fe.l6},getCurrentOptions:function(){return Dn},getDatePickerLabels:function(){return cr.C$},getLabelFormatValue:function(){return cr.cN},getStoredPopupContext:function(){return zr.XQ},isFileCollection:function(){return q.ZZ},isShowFilePicker:function(){return cr.el},isTabPage:function(){return Tr},navigateToTab:function(){return gr},pageSettings:function(){return Nr},pageTabSettings:function(){return ma},readPrettyFormSettings:function(){return qn},removeNullCondition:function(){return xn.Wm},storePopupContext:function(){return zr.hK},useActionBarContext:function(){return P.DU},useActionContext:function(){return P.XC},useAssociationFieldModeContext:function(){return hr},useBackButton:function(){return Co.K},useCloseAction:function(){return P.p2},useColumnSchema:function(){return cl.z},useDatePickerContext:function(){return Xr.P1},useDownloadLogs:function(){return Rn.y},useEnsureOperatorsValid:function(){return q.Zd},useFieldMode:function(){return q.b},useFieldNames:function(){return cr.Xd},useFilterActionProps:function(){return xn.PL},useFilterFieldOptions:function(){return xn.V8},useFilterFieldProps:function(){return xn.tM},useFilterOptions:function(){return xn.xQ},useFixedBlock:function(){return Ro},useFixedSchema:function(){return Uo},useFormDataTemplates:function(){return qe},useGetAriaLabelOfAction:function(){return P.HS},useGetAriaLabelOfDrawer:function(){return P.vB},useGetAriaLabelOfModal:function(){return P.QY},useGetAriaLabelOfPopover:function(){return P.t9},useGetFilterFieldOptions:function(){return xn.Kg},useGetFilterOptions:function(){return xn.aJ},useGridContext:function(){return qr.n1},useGridRowContext:function(){return qr.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 cr.Il},useLinkageAction:function(){return P.zC},usePopupSettings:function(){return va.a},useStyles:function(){return Js.y},useTabsContext:function(){return ka.g},useTitleFieldOptions:function(){return q.eT},useValidateSchema:function(){return q.q4},useVariableScope:function(){return Pa.ym},useZIndexContext:function(){return P.uq},zIndexContext:function(){return P.K5}});var l=e(15009),$=e.n(l),c=e(99289),A=e.n(c),f=e(12444),L=e.n(f),o=e(72004),W=e.n(o),v=e(31996),D=e.n(v),h=e(26037),I=e.n(h),t=e(97857),r=e.n(t),u=e(67294),B=e(31601),y=e(14896),C=e(70993),O=e(89127),K=function(T){return A()($()().mark(function oe(){var le,me;return $()().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return Ae.prev=0,Ae.next=3,this.api.request(T);case 3:return me=Ae.sent,Ae.abrupt("return",me==null||(le=me.data)===null||le===void 0?void 0:le.data);case 7:return Ae.prev=7,Ae.t0=Ae.catch(0),Ae.abrupt("return",[]);case 10:case"end":return Ae.stop()}},oe,this,[[0,7]])}))},P=e(76157),M=e(13769),p=e.n(M),S=e(57134),x=e(86201),i=e(80844),w=e(28459),E=e(57953),g=e(12174),m=e(6145),a=e(26386),d=e(64016),F=e(15195),R=e(23461),n=e(85893),b=["form","children"],z=["form","children","disabled"],V=["request","effects","initialValue","useValues"],G=function(T){var oe=T.form,le=T.children,me=p()(T,b),Pe=(0,i.useField)(),Ae=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(oe.createVoidField(r()(r()({},Pe.props),{},{basePath:""})));return(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},me),{},{children:(0,n.jsx)(i.RecursionField,{basePath:Ve.address,schema:Ae,onlyRenderProperties:!0})}))})})},Y=function(T){return T.children},U=function(T){var oe=T.form,le=T.children,me=T.disabled,Pe=p()(T,z),Ae=(0,i.useField)(),Ve=(0,i.useFieldSchema)(),ze=(0,jt.lI)(oe.createVoidField(r()(r()({},Ae.props),{},{basePath:""}))),we=(0,jt.Co)(Ve["x-component"],Y);return(0,u.useEffect)(function(){oe.disabled=me||Ae.disabled},[me,Ae.disabled]),(0,n.jsx)(w.ZP,{componentDisabled:me,children:(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},Pe),{},{children:(0,n.jsx)(i.FieldContext.Provider,{value:ze,children:(0,n.jsx)(we,r()(r()({},Ae.componentProps),{},{children:(0,n.jsx)(i.RecursionField,{basePath:ze.address,schema:Ve,onlyRenderProperties:!0})}))})}))})})})},H=function(T){var oe=T.request,le=T.initialValue;return oe||function(){return Promise.resolve({data:le})}},Z=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,g.QT)(H(oe),T)},re=(0,u.createContext)(null);re.displayName="FormBlockContext";var ne=(0,i.observer)(function(Q){var T=Q.request,oe=Q.effects,le=Q.initialValue,me=Q.useValues,Pe=me===void 0?Z:me,Ae=p()(Q,V),Ve=(0,i.useFieldSchema)(),ze=(0,i.useField)(),we=(0,u.useMemo)(function(){return(0,x.createForm)({effects:oe})},[]),tt=Pe({uid:Ve["x-uid"],onSuccess:function(rt){return A()($()().mark(function ht(){return $()().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,we.reset();case 2:we.setValues(rt==null?void 0:rt.data),we.setInitialValues(rt==null?void 0:rt.data);case 4:case"end":return gt.stop()}},ht)}))()}},Q),et=(0,u.useContext)(re);return(0,n.jsx)(re.Provider,{value:{parent:et,form:we,result:tt,field:ze,fieldSchema:Ve},children:(0,n.jsx)(E.Z,{spinning:(tt==null?void 0:tt.loading)||!1,children:Ve["x-decorator"]==="Form"?(0,n.jsx)(U,r()({form:we},Ae)):(0,n.jsx)(G,r()({form:we},Ae))})})},{displayName:"Form"});ne.Designer=function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=T.title,me=(0,F.zy)(),Pe=(0,R.rE)(),Ae=Pe.componentNamePrefix;return(0,n.jsxs)(a.aN,{template:me,title:le||oe,children:[(0,n.jsx)(d.G,{componentName:"".concat(Ae,"Form"),collectionName:oe}),(0,n.jsx)(a.Z5,{}),(0,n.jsx)(a.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var J=e(5537),k=new J.F5({name:"FormV1Settings",items:[{name:"template",Component:d.G,useComponentProps:function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=(0,R.rE)(),me=le.componentNamePrefix;return{componentName:"".concat(me,"Form"),collectionName:oe}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),q=e(54801),Se=function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=T.title,me=(0,F.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"FormSettings",template:me,title:le||oe})},ee=function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=T.title,me=(0,F.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"ReadPrettyFormSettings",template:me,title:le||oe})},ve=function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=T.title,me=(0,F.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"FormDetailsSettings",template:me,title:le||oe})},be=function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=T.title,me=(0,F.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"blockSettings:filterForm",template:me,title:le||oe})},Re=e(7340),Ce=e(15503),Oe=e(68230),De=e(68400),ue=e.n(De),ie=e(97133),ge=e(84327),se=e(9361),fe=e(31019),xe=e(22229),ye=e(43321),je=e(8281),Be=e(9780),Ie=e(18686),pe=e(94804),he=e(5574),ce=e.n(he),X=e(68433),j=e(42075),de=e(34041),_e=e(96486),ae=e.n(_e),Ee=e(26793),Te=e(32268),Fe=e(60094),$e=e(9783),Ke=e.n($e),yt=e(52677),Je=e.n(yt),st=e(50888),Ue=e(66309),St=e(96074),Xt=e(27484),hn=e.n(Xt),Zt=e(87714),jt=e(84577),ln=e(4340),xt=e(97937),Kt=e(32983),Lt=e(58812),qt=e(96695),Rt=e.n(qt),$t=e(19632),Tt=e.n($t),wt={label:"label",value:"value",color:"color",options:"children"};function an(Q,T){var oe=[];if(!Array.isArray(Q))return oe;for(var le=0;le<Q.length;le++){var me=Q[le][T.options];Array.isArray(me)&&oe.push.apply(oe,Tt()(an(me,T))),oe.push(r()({},Q[le]))}return oe}function Dn(Q,T,oe){var le=an(T,oe),me=(0,_e.castArray)(Q).map(function(Ae){return(0,X.isPlainObject)(Ae)?Ae[oe.value]:Ae});function Pe(Ae){if(!Ae)return[];var Ve=[],ze=Rt()(me),we;try{var tt=function(){var bt=we.value,rt=Ae.find(function(ht){return ht[oe.value]==bt})||{value:bt,label:bt&&bt.toString()};Ve.push(rt)};for(ze.s();!(we=ze.n()).done;)tt()}catch(et){ze.e(et)}finally{ze.f()}return Ve}return Pe(le)}var Wn=e(67668),Nn=(0,i.observer)(function(Q){var T,oe=r()(r()({},wt),Q.fieldNames),le=(0,i.useField)(),me=(0,Wn.Hy)(),Pe=le.dataSource||Q.options||(me==null?void 0:me.uiSchema.enum)||[],Ae=Dn(le.value,Pe,oe);return!(0,ge.isValid)(Q.value)&&!Ae.length?(0,n.jsx)("div",{}):(0,x.isArrayField)(le)&&(le==null||(T=le.value)===null||T===void 0?void 0:T.length)===0?(0,n.jsx)("div",{}):(0,n.jsx)("div",{children:(0,n.jsx)(Lt.B,{ellipsis:Q.ellipsis,children:Ae.map(function(Ve,ze){return(0,n.jsx)(Ue.Z,{color:Ve[oe.color],icon:Ve.icon,children:Ve[oe.label]},ze)})})})},{displayName:"ReadPretty"}),oo=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],Yn=["objectValue","loading","value","rawOptions","defaultValue"],$n=function(T){return!(0,ge.isValid)(T)||Je()(T)==="object"&&Object.keys(T).length===0},Gn=function(T){var oe=T.value,le=T.options,me=T.onChange,Pe=T.fieldNames,Ae=T.mode,Ve=T.loading,ze=T.rawOptions,we=T.defaultValue,tt=p()(T,oo),et=function(rt){var ht;if(!$n(rt)){var ft=(0,ge.toArr)(rt).filter(function(Ft){return Ft}).map(function(Ft){return(0,X.isPlainObject)(Ft)?Ft[Pe.value]:Ft}),gt=(ht=Dn(ft,le,Pe))===null||ht===void 0?void 0:ht.map(function(Ft){return{label:Ft[Pe.label],value:Ft[Pe.value]}});return["tags","multiple"].includes(Ae)||T.multiple?gt:gt.shift()}};return(0,n.jsx)(de.default,r()({role:"button","data-testid":"select-object-".concat(Ae||"single"),value:et(oe),defaultValue:et(we),allowClear:{clearIcon:(0,n.jsx)(ln.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Ve?(0,n.jsx)(E.Z,{}):(0,n.jsx)(Kt.Z,{image:Kt.Z.PRESENTED_IMAGE_SIMPLE}),options:le,fieldNames:Pe,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(rt,ht){var ft;return((ft=ht==null?void 0:ht[Pe.label||"label"])!==null&&ft!==void 0?ft:"").includes(rt)},filterSort:function(rt,ht){var ft,gt;return((ft=rt==null?void 0:rt[Pe.label||"label"])!==null&&ft!==void 0?ft:"").toLowerCase().localeCompare(((gt=ht==null?void 0:ht[Pe.label||"label"])!==null&>!==void 0?gt:"").toLowerCase())},onChange:function(rt){var ht=Dn((0,ge.toArr)(rt).map(function(ft){return ft.value}),ze||le,Pe);["tags","multiple"].includes(Ae)||T.multiple?me==null||me(ht):me==null||me(ht.shift()||null)},mode:Ae,tagRender:function(rt){return(0,n.jsx)(Ue.Z,r()(r()({role:"button","aria-label":rt.label,closeIcon:(0,n.jsx)(xt.Z,{role:"button","aria-label":"icon-close-tag"})},rt),{},{children:rt.label}))}},tt))},fn=function(T,oe){var le;return((le=oe==null?void 0:oe.label)!==null&&le!==void 0?le:"").toLowerCase().includes((T||"").toLowerCase())},Ot=(0,i.connect)(function(Q){var T=Q.objectValue,oe=Q.loading,le=Q.value,me=Q.rawOptions,Pe=Q.defaultValue,Ae=p()(Q,Yn),Ve=Q.multiple?"multiple":Q.mode;if(Ve&&!["multiple","tags"].includes(Ve)&&(Ve=void 0),T)return(0,n.jsx)(Gn,r()(r()({rawOptions:me},Ae),{},{defaultValue:Pe,value:le,mode:Ve,loading:oe}));var ze=function(tt){return["tags","multiple"].includes(Q.mode)||Q.multiple?tt?(0,ge.toArr)(tt):void 0:tt};return(0,n.jsx)(de.default,r()(r()({role:"button","data-testid":"select-".concat(Ve||"single"),showSearch:!0,filterOption:fn,allowClear:{clearIcon:(0,n.jsx)(ln.Z,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:oe?(0,n.jsx)(E.Z,{}):(0,n.jsx)(Kt.Z,{image:Kt.Z.PRESENTED_IMAGE_SIMPLE}),value:ze(le),defaultValue:ze(Pe),tagRender:function(tt){return(0,n.jsx)(Ue.Z,r()(r()({role:"button","aria-label":tt.label,closeIcon:(0,n.jsx)(xt.Z,{role:"button","aria-label":"icon-close-tag"})},tt),{},{children:tt.label}))}},Ae),{},{onChange:function(tt){var et;(et=Q.onChange)===null||et===void 0||et.call(Q,tt===void 0?null:tt)},mode:Ve}))},(0,i.mapProps)({dataSource:"options"},function(Q,T){return r()(r()({},Q),{},{fieldNames:r()(r()({},wt),Q.fieldNames),suffixIcon:T!=null&&T.loading||T!=null&&T.validating?(0,n.jsx)(st.Z,{}):Q.suffixIcon})}),(0,i.mapReadPretty)(Nn)),Ct=Ot;Ct.ReadPretty=Nn;var Pt=Ct,Nt=e(36586),kt=function(T,oe){return(0,_e.castArray)(T).filter(function(le){return le!=null}).map(function(le){return Je()(le)==="object"?le[oe.value]:le})},Qt=(0,i.observer)(function(Q){var T=r()(r()({},wt),Q.fieldNames),oe=(0,i.useField)(),le=(0,i.useFieldSchema)(),me=(0,Nt.a)(),Pe=(0,P.XC)(),Ae=Pe.snapshot,Ve=(0,g.QT)(Ae?A()($()().mark(function we(){return $()().wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return et.abrupt("return",{data:me[le.name]});case 1:case"end":return et.stop()}},we)})):r()(r()({action:"list"},Q.service),{},{params:{paginate:!1,filter:Ke()({},T.value,{$in:kt(oe.value,T)})}}),{refreshDeps:[Q.service,oe.value]}),ze=Ve.data;return(0,n.jsx)(Ct.ReadPretty,r()(r()({},Q),{},{options:ze==null?void 0:ze.data}))},{displayName:"ReadPretty"}),zt=e(8341),yn=e(44990),mn=["fieldNames","service","wait","value","defaultValue","objectValue","manual","mapOptions","targetField","CustomDropdownRender","optionFilter","dataSource"],nn="N/A",bn=(0,i.connect)(function(Q){var T,oe,le=Q.fieldNames,me=le===void 0?{}:le,Pe=Q.service,Ae=Pe===void 0?{}:Pe,Ve=Q.wait,ze=Ve===void 0?300:Ve,we=Q.value,tt=Q.defaultValue,et=Q.objectValue,bt=Q.manual,rt=bt===void 0?!0:bt,ht=Q.mapOptions,ft=Q.targetField,gt=Q.CustomDropdownRender,Ft=Q.optionFilter,Wt=Q.dataSource,vn=p()(Q,mn),Yt=(0,yn.FC)(),zn=(0,zt.FE)(Wt||Yt),jn=(0,u.useState)(!1),en=ce()(jn,2),tn=en[0],Ln=en[1],In=(0,u.useRef)(!1),Tn=(0,i.useFieldSchema)(),Mn=((T=Tn["x-component-props"])===null||T===void 0?void 0:T.addMode)==="quickAdd",An=(0,m.useCollection_deprecated)(),En=An.getField,So=(0,u.useRef)(null),bo=(0,m.useCollectionManager_deprecated)(),Do=bo.getCollectionJoinField,ro=bo.getInterface,so=Tn["x-collection-field"]||Tn.name,Un=En(so)||Do(so),Bn=ft||(Un==null?void 0:Un.target)&&(me==null?void 0:me.label)&&Do("".concat(Un.target,".").concat(me.label)),Qn=(0,u.useMemo)(function(){if(Bn!=null&&Bn.interface){var er,Zo=((er=ro(Bn.interface))===null||er===void 0||(er=er.filterable)===null||er===void 0?void 0:er.operators[0].value)||"$includes";return Zo!=="$eq"?Zo:"$includes"}return"$includes"},[Bn]),vo=(0,jt.eJ)(),wn=(0,u.useCallback)(function(er){try{return er.filter(function(Zo){return["number","string"].includes(Je()(Zo[me.value]))}).map(function(Zo){var Cr,Pr,rr=vo(Zo[me.label]);if(Bn!=null&&(Cr=Bn.uiSchema)!==null&&Cr!==void 0&&Cr.enum)if(Array.isArray(rr))rr=rr.map(function(Dr,Jr){var Kr=Bn.uiSchema.enum.find(function(wa){return wa.value===Dr});return Kr?(0,n.jsx)(Ue.Z,{role:"button",color:Kr.color,style:{marginRight:3},children:(Kr==null?void 0:Kr.label)||Dr},Jr):(0,n.jsx)(Ue.Z,{role:"button",children:Dr},Dr)}).reverse();else{var vr=Bn.uiSchema.enum.find(function(Dr){return Dr.value===rr});vr&&(rr=(0,n.jsx)(Ue.Z,{role:"button",color:vr.color,children:vr.label}))}if((Bn==null?void 0:Bn.type)==="date"&&(rr=hn()(rr).format("YYYY-MM-DD")),ht){var Ur;return ht((Ur={},Ke()(Ur,me.label,rr||nn),Ke()(Ur,me.value,Zo[me.value]),Ur))}return r()(r()({},Zo),{},(Pr={},Ke()(Pr,me.label,rr||nn),Ke()(Pr,me.value,Zo[me.value]),Pr))}).filter(Boolean)}catch(Zo){return console.error(Zo),er}},[Bn==null?void 0:Bn.uiSchema,me]),no=(0,g.QT)(r()(r()({action:"list"},Ae),{},{headers:zn,params:r()(r()({pageSize:200},Ae==null?void 0:Ae.params),{},{filter:Ae==null||(oe=Ae.params)===null||oe===void 0?void 0:oe.filter})}),{manual:rt,debounceWait:ze}),co=no.data,po=no.run,Io=no.loading,No=(0,u.useMemo)(function(){return JSON.stringify({service:Ae,fieldNames:me})},[Ae,me]),Mo=(0,u.useCallback)(function(){return So.current&>?(0,n.jsx)(gt,{search:So.current,callBack:function(){So.current=null,Ln(!1)}}):null},[So.current]);(0,u.useEffect)(function(){In.current&&po()},[No]);var $o=function(){var er=A()($()().mark(function Zo(Cr){var Pr;return $()().wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:po({filter:(0,Zt.EO)([Cr?Ke()({},me.label,Ke()({},Qn,Cr)):{},Ae==null||(Pr=Ae.params)===null||Pr===void 0?void 0:Pr.filter])}),So.current=Cr;case 2:case"end":return vr.stop()}},Zo)}));return function(Cr){return er.apply(this,arguments)}}(),pr=(0,u.useMemo)(function(){var er,Zo=we||tt;if(!(co!=null&&(er=co.data)!==null&&er!==void 0&&er.length))return Zo!=null?Array.isArray(Zo)?Zo:[Zo]:[];var Cr=Zo!=null&&(Array.isArray(Zo)?Zo:[r()(r()({},Zo),{},Ke()({},me.value,Zo[me.value]||Zo))])||[],Pr=typeof Ft=="function"?co.data.filter(Ft):co.data;return(0,_e.uniqBy)(Pr.concat(Cr!=null?Cr:[]),me.value)},[we,tt,co==null?void 0:co.data,me.value,Ft]),sr=function(Zo){Ln(Zo),So.current=null,Zo&&po(),In.current=!0};return(0,n.jsx)(Ct,r()(r()({open:tn,popupMatchSelectWidth:!1,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:me,onSearch:$o,onDropdownVisibleChange:sr,objectValue:et,value:we,defaultValue:tt},vn),{},{loading:co?Io:!0,options:wn(pr),rawOptions:pr,dropdownRender:function(Zo){var Cr=pr.some(function(Pr){return Pr[me.label]===So.current});return(0,n.jsx)(n.Fragment,{children:Mn?(0,n.jsxs)(n.Fragment,{children:[!((co==null?void 0:co.data.length)===0&&So!==null&&So!==void 0&&So.current)&&Zo,(co==null?void 0:co.data.length)>0&&(So==null?void 0:So.current)&&!Cr&&(0,n.jsx)(St.Z,{style:{margin:0}}),!Cr&&(0,n.jsx)(Mo,{})]}):Zo})}}))},(0,i.mapProps)({dataSource:"options"},function(Q,T){var oe,le=(0,i.useFieldSchema)();return r()(r()({},Q),{},{fieldNames:r()(r()(r()(r()({},wt),Q.fieldNames),T.componentProps.fieldNames),(oe=le["x-component-props"])===null||oe===void 0?void 0:oe.fieldNames),suffixIcon:T!=null&&T.loading||T!=null&&T.validating?(0,n.jsx)(st.Z,{}):Q.suffixIcon})}),(0,i.mapReadPretty)(Qt)),Vt=bn;Vt.ReadPretty=Qt;var dt=null,qe=function(){var T=(0,i.useFieldSchema)(),oe=(0,Ee.$)(),le=oe.t,me=(0,Re.bz)(),Pe=me.duplicateData,Ae=(0,m.useCollectionManager_deprecated)(),Ve=Ae.getCollectionJoinField;if(Pe)return Pe;var ze=Bt(T),we=ze.items,tt=we===void 0?[]:we,et=ze.display,bt=et===void 0?!0:et;tt.forEach(function(ft){try{var gt;ft.fields=(gt=ft.fields)===null||gt===void 0?void 0:gt.map(function(Ft){var Wt=Ve("".concat(ft.collection,".").concat(Ft));return Wt?Ft:""}).filter(Boolean)}catch(Ft){(0,X.error)(Ft),ft.fields=[]}});var rt=[{key:"none",title:le("None")}].concat(tt.map(function(ft,gt){return r()(r()({key:gt},ft),{},{isLeaf:ft.dataId!==null&&ft.dataId!==void 0,titleCollectionField:(ft==null?void 0:ft.titleField)&&Ve("".concat(ft.collection,".").concat(ft.titleField))})})),ht=tt.find(function(ft){return ft.default});return{templates:rt,display:bt,defaultTemplate:ht,enabled:tt.length>0&&tt.every(function(ft){return ft.dataId||ft.dataScope})}},At=function(T){var oe=T.style,le=oe===void 0?{}:oe,me=T.form,Pe=(0,Fe.dQ)(),Ae=Pe.token,Ve=qe(),ze=Ve.templates,we=Ve.display,tt=Ve.enabled,et=Ve.defaultTemplate,bt=(0,m.useCollectionManager_deprecated)(),rt=bt.getCollectionJoinField,ht=(0,Te.ss)(ze),ft=(0,u.useState)((et==null?void 0:et.key)||"none"),gt=ce()(ft,2),Ft=gt[0],Wt=gt[1],vn=(0,u.useState)(null),Yt=ce()(vn,2),zn=Yt[0],jn=Yt[1],en=(0,g.LY)(),tn=(0,Ee.$)(),Ln=tn.t;(0,u.useEffect)(function(){tt&&et&&me&&(me.__template=!0,et.key==="duplicate"&&An(et.dataId,et))},[]),(0,u.useEffect)(function(){ht!=null&&ht.some(function(So){return So.key===Ft})||Mn("none")},[ht]);var In=(0,u.useMemo)(function(){return r()({display:"flex",alignItems:"center",backgroundColor:Ae.colorFillAlter,padding:Ae.padding},le)},[le,Ae.colorFillAlter]),Tn=(0,u.useMemo)(function(){return{fontSize:Ae.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:Ae.marginXS}},[Ae.fontSize,Ae.marginXS]),Mn=(0,u.useCallback)(function(){var So=A()($()().mark(function bo(Do){return $()().wrap(function(so){for(;;)switch(so.prev=so.next){case 0:Wt(Do),jn(null),me==null||me.reset();case 3:case"end":return so.stop()}},bo)}));return function(bo){return So.apply(this,arguments)}}(),[]),An=(0,u.useCallback)(function(){var So=A()($()().mark(function bo(Do,ro){var so;return $()().wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:so=r()(r()({},ro),{},{dataId:Do}),jn(ro),Ge(en,so,Ln).then(function(Qn){return me&&Qn&&(me.reset(),me.__template=!0,(0,X.forEach)(Qn,function(vo,wn){if(vo){var no;me.values[wn]=vo,me==null||(no=me.setInitialValuesIn)===null||no===void 0||no.call(me,wn,vo)}})),Qn}).catch(function(Qn){console.error(Qn)});case 3:case"end":return Bn.stop()}},bo)}));return function(bo,Do){return So.apply(this,arguments)}}(),[]);if(!tt||!we)return null;var En=ht==null?void 0:ht.find(function(So){return So.key===Ft});return(0,n.jsx)("div",{style:In,children:(0,n.jsxs)(j.Z,{wrap:!0,children:[(0,n.jsxs)("label",{style:Tn,children:[Ln("Data template"),": "]}),(0,n.jsx)(de.default,{role:"button","data-testid":"select-form-data-template",popupMatchSelectWidth:!1,options:ht,fieldNames:{label:"title",value:"key"},value:Ft,onChange:Mn}),Ft!=="none"&&En&&(0,n.jsx)(Vt,{style:{width:220},fieldNames:{label:En==null?void 0:En.titleField,value:"id"},target:En==null?void 0:En.collection,value:zn,objectValue:!0,service:{resource:En==null?void 0:En.collection,params:{filter:En==null?void 0:En.dataScope}},onChange:function(bo){return An(bo==null?void 0:bo.id,r()(r()({},bo),En))},targetField:rt("".concat(En==null?void 0:En.collection,".").concat(En.titleField))})]})})};function Bt(Q){var T=(0,Re.Fi)(Q);return T?ae().cloneDeep(T["x-data-templates"])||{}:{}}function Ge(Q,T,oe){return Me.apply(this,arguments)}function Me(){return Me=A()($()().mark(function Q(T,oe,le){return $()().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!(oe.fields.length===0||!oe.dataId)){Pe.next=2;break}return Pe.abrupt("return");case 2:return Pe.abrupt("return",T.resource(oe.collection).get({filterByTk:oe.dataId,fields:oe.fields,isTemplate:!0}).then(function(Ae){var Ve;return(Ve=Ae.data)===null||Ve===void 0?void 0:Ve.data}));case 3:case"end":return Pe.stop()}},Q)})),Me.apply(this,arguments)}var Le=e(3192),Ze=function(){var T,oe,le=(0,Ie.aZ)(),me=(0,i.useFieldSchema)(),Pe=se.Z.useToken(),Ae=Pe.token,Ve=(0,jt.ng)(),ze=Ve.designable,we=(0,Le.g)()||{},tt=we.heightProps,et=tt||{},bt=et.title,rt=qe(),ht=rt.display,ft=rt.enabled,gt=me.reduceProperties(function(An,En){return En["x-component"]==="ActionBar"?En:An}),Ft=Object.keys((gt==null?void 0:gt.properties)||{}).length>0,Wt=me==null||(T=me.parent)===null||T===void 0||(T=T["x-decorator"])===null||T===void 0||(oe=T.includes)===null||oe===void 0?void 0:oe.call(T,"FormBlockProvider"),vn=Ft||ze?Ae.controlHeight+(Wt?1:2)*Ae.marginLG:Ae.marginLG,Yt=bt?Ae.fontSizeLG*Ae.lineHeightLG+Ae.padding*2-1:0,zn=(0,pe.hS)()||{},jn=zn.data,en=(jn==null?void 0:jn.meta)||{},tn=en.count,Ln=en.pageSize,In=tn>Ln,Tn=In?Ae.controlHeightSM+1*Ae.paddingLG:0,Mn=ht&&ft?Ae.controlHeight+2*Ae.padding+Ae.margin:0;return le-vn-Ae.paddingLG-Yt-Tn-Mn},Xe,it,ut=["form","children"],_t=["form","children","disabled"],mt=["form","disabled"],ot=function(T){var oe=T.form,le=T.children,me=p()(T,ut),Pe=(0,i.useField)(),Ae=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(oe.createVoidField(r()(r()({},Pe.props),{},{basePath:""}))),ze=Ze(),we=se.Z.useToken(),tt=we.token,et=(0,jt.ng)(),bt=et.designable;return(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},me),{},{children:(0,n.jsx)("div",{className:(0,ie.css)(Xe||(Xe=ue()([`
|
|
688
|
+
`]))))}));return(0,H.jsx)(X.BQs,{ellipsis:!0,popoverContent:$n,children:$n})};var Xt=(0,l.createContext)([]);Xt.displayName="VariableScopeContext";function hn(xt){var Kt=xt.scope,Lt=Kt===void 0?[]:Kt,qt=xt.children;return(0,H.jsx)(Xt.Provider,{value:Lt,children:qt})}function Zt(){return(0,l.useContext)(Xt)}function jt(){return null}jt.Input=(0,N.connect)(Ce),jt.TextArea=(0,N.connect)(st,(0,N.mapReadPretty)(st.ReadPretty)),jt.RawTextArea=(0,N.connect)(ye),jt.JSON=(0,N.connect)(Be);var ln=null},88969:function(ke,te,e){"use strict";e.d(te,{m:function(){return O}});var N=e(15009),l=e.n(N),$=e(19632),c=e.n($),A=e(99289),f=e.n(A),L=e(5574),o=e.n(L),W=e(97133),v=e(38089),D=e(67294),h=e(26793),I=e(60094),t=e(9783),r=e.n(t),u=(0,I.l6)("nb-variable-select",function(K){var P=K.componentCls;return r()({},P,{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}}})}),B=u,y=e(2876),C=e(85893);function O(K){var P=K.options,M=K.setOptions,p=K.onInsert,S=K.changeOnSelect,x=S===void 0?!1:S,i=K.fieldNames,w=i===void 0?{}:i,E=K.className,g=(0,h.$)(),m=g.t,a=(0,D.useState)([]),d=o()(a,2),F=d[0],R=d[1],n=B(),b=n.wrapSSR,z=n.componentCls,V=n.hashId,G=(0,I.dQ)(),Y=G.token;function U(Z){return H.apply(this,arguments)}function H(){return H=f()(l()().mark(function Z(re){var ne,J;return l()().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(J=re[re.length-1],!(!((ne=J.children)!==null&&ne!==void 0&&ne.length)&&!J.isLeaf&&J.loadChildren)){q.next=5;break}return q.next=4,J.loadChildren(J);case 4:M(function(Se){return c()(Se)});case 5:case"end":return q.stop()}},Z)})),H.apply(this,arguments)}return b((0,C.jsx)(y.R,{className:(0,W.cx)("x-button",z,V,E),children:(0,C.jsx)(v.Z,{placeholder:m("Select a variable"),value:[],options:P,fieldNames:w,loadData:U,onChange:function(){var re,ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(R(ne),!!ne.length){var k=J[J.length-1];(!(k!=null&&(re=k.children)!==null&&re!==void 0&&re.length)&&!(k!=null&&k.loadChildren)||k!=null&&k.isLeaf)&&p(ne)}},changeOnSelect:x,onClick:function(re){if(!(re.detail!==2||!x))for(var ne=re.target;ne&&ne!==re.currentTarget;ne=ne.parentNode){var J;Array.from((J=ne.classList)!==null&&J!==void 0?J:[]).includes("ant-cascader-menu-item")&&p(F)}},popupClassName:"Cascader-popupClassName",dropdownRender:x?function(Z){return(0,C.jsxs)(C.Fragment,{children:[Z,(0,C.jsx)("div",{style:{padding:"0.5em",borderTop:"1px solid ".concat(Y.colorBorder),color:Y.colorTextDescription},children:m("Double click to choose entire object")})]})}:null})}))}},2876:function(ke,te,e){"use strict";e.d(te,{R:function(){return f}});var N=e(97857),l=e.n(N),$=e(15867),c=e(67294),A=e(85893),f=(0,c.forwardRef)(function(L,o){var W=(0,c.useMemo)(function(){return{fontStyle:"italic",fontFamily:"New York, Times New Roman, Times, serif"}},[]);return(0,A.jsxs)($.ZP,l()(l()({"aria-label":"variable-button",ref:o,style:W},L),{},{children:["x",L.children]}))});f.displayName="XButton"},72724:function(ke,te,e){"use strict";e.d(te,{L:function(){return I}});var N=e(97857),l=e.n(N),$=e(5574),c=e.n($),A=e(94697),f=e(80844),L=e(67294),o=e(26793),W=e(21143),v=e(84577),D=e(85893),h=function(r){var u=(0,v.ng)(),B=u.refresh,y=(0,W.useAPIClient)(),C=(0,o.$)(),O=C.t;return(0,L.useCallback)(function(K){var P,M,p,S,x,i,w,E,g=K.active,m=K.over,a=g==null||(P=g.data)===null||P===void 0||(P=P.current)===null||P===void 0?void 0:P.schema,d=m==null||(M=m.data)===null||M===void 0||(M=M.current)===null||M===void 0?void 0:M.schema,F=m==null||(p=m.data)===null||p===void 0||(p=p.current)===null||p===void 0?void 0:p.insertAdjacent,R=m==null||(S=m.data)===null||S===void 0||(S=S.current)===null||S===void 0?void 0:S.breakRemoveOn,n=m==null||(x=m.data)===null||x===void 0||(x=x.current)===null||x===void 0?void 0:x.wrapSchema,b=m==null||(i=m.data)===null||i===void 0||(i=i.current)===null||i===void 0?void 0:i.onSuccess,z=(w=m==null||(E=m.data)===null||E===void 0||(E=E.current)===null||E===void 0?void 0:E.removeParentsIfNoChildren)!==null&&w!==void 0?w:!0;if(!a||!d){r==null||r(K);return}if(a===d){r==null||r(K);return}if(a.parent===d&&F==="beforeEnd"){r==null||r(K);return}var V=(0,v.Pl)({t:O,api:y,refresh:B,current:d});if(V.loadAPIClientEvents(),a.parent===d.parent){V.insertBeforeBeginOrAfterEnd(a),r==null||r(K);return}if(F){V.insertAdjacent(F,a,{wrap:n,breakRemoveOn:R,removeParentsIfNoChildren:z,onSuccess:b}),r==null||r(K);return}},[r])},I=(0,f.observer)(function(t){var r=(0,o.$)(),u=r.t,B=(0,L.useState)(!0),y=c()(B,2),C=y[0],O=y[1],K=(0,L.useCallback)(function(M){var p,S=M.active,x=S==null||(p=S.data)===null||p===void 0||(p=p.current)===null||p===void 0?void 0:p.schema;if(O(!!x),t!=null&&t.onDragStart){var i;t==null||(i=t.onDragStart)===null||i===void 0||i.call(t,M)}},[t==null?void 0:t.onDragStart]),P=h(t==null?void 0:t.onDragEnd);return(0,D.jsxs)(A.DndContext,l()(l()({collisionDetection:A.rectIntersection},t),{},{onDragStart:K,onDragEnd:P,children:[(0,D.jsx)(A.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:C&&(0,D.jsx)("span",{style:{whiteSpace:"nowrap"},children:u("Dragging")})}),t.children]}))},{displayName:"DndContext"})},14896:function(ke,te,e){"use strict";e.r(te),e.d(te,{DndContext:function(){return N.L},DragHandler:function(){return l.IW},DraggableContext:function(){return l.LC},ShowFormData:function(){return f},Sortable:function(){return l.bt},SortableContext:function(){return l.Fo},SortableItem:function(){return l.TR},SortableProvider:function(){return l.OR},getRenderContent:function(){return L.I9}});var N=e(72724),l=e(20493),$=e(67294),c=e(80844),A=e(85893),f=(0,c.observer)(function(o){var W=o.children,v=(0,c.useForm)();return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("pre",{style:{marginBottom:20},"data-testid":"form-data",children:JSON.stringify(v.values,null,2)}),W]})}),L=e(34588)},20493:function(ke,te,e){"use strict";e.d(te,{IW:function(){return K},LC:function(){return t},bt:function(){return B},Fo:function(){return r},TR:function(){return O},OR:function(){return u}});var N=e(97857),l=e.n(N),$=e(13769),c=e.n($),A=e(10274),f=e(94697),L=e(97133),o=e(80844),W=e(67294),v=e(60094),D=e(85893),h=["component","overStyle","style","children","openMode"],I=["schema","id","eid","removeParentsIfNoChildren"],t=(0,W.createContext)(null);t.displayName="DraggableContext";var r=(0,W.createContext)(null);r.displayName="SortableContext";var u=function(M){var p=M.id,S=M.data,x=M.children,i=(0,f.useDraggable)({id:p,data:S}),w=(0,f.useDroppable)({id:p,data:S});return(0,D.jsx)(r.Provider,{value:{draggable:i,droppable:w},children:x})},B=function(M){var p,S,x=M.component,i=M.overStyle,w=M.style,E=M.children,g=M.openMode,m=c()(M,h),a=(0,v.dQ)(),d=a.token,F=(0,W.useContext)(r),R=F.draggable,n=F.droppable,b=n.isOver,z=n.setNodeRef,V=l()({},w);return b&&(R==null||(p=R.active)===null||p===void 0?void 0:p.id)!==(n==null||(S=n.over)===null||S===void 0?void 0:S.id)&&(V[x==="a"?"color":"background"]=new A.C(d.colorSettings).setAlpha(.15).toHex8String(),Object.assign(V,i)),W.createElement(x||"div",l()(l()({role:"none"},m),{},{className:(0,L.cx)("nb-sortable-designer",M.className),ref:z,style:V}),E)},y=function(M){var p=C(M),S=(0,o.useFieldSchema)();return M.schema?l()(l()({},M),{},{id:p}):l()(l()({},M),{},{id:p,schema:S})},C=function(M){var p=(0,o.useField)();return M.id?M.id:p.address.toString()},O=(0,o.observer)(function(P){var M=y(P),p=M.schema,S=M.id,x=M.eid,i=M.removeParentsIfNoChildren,w=c()(M,I),E=(0,W.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:p,removeParentsIfNoChildren:i!=null?i:!0}},[p,i]);return(0,D.jsx)(u,{id:S,data:E,children:(0,D.jsx)(B,l()(l()({id:x},w),{},{children:P.children}))})},{displayName:"SortableItem"}),K=function(M){var p=(0,W.useContext)(r),S=p.draggable,x=S.attributes,i=S.listeners,w=S.setNodeRef;return(0,D.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,D.jsx)("div",l()(l()(l()({ref:w,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},i),x),{},{role:"none",children:(0,D.jsx)("span",{style:{cursor:"move",fontSize:14},children:M.children})}))})}},34588:function(ke,te,e){"use strict";e.d(te,{jC:function(){return i},od:function(){return p},I9:function(){return g},Rq:function(){return S},e7:function(){return M}});var N=e(97857),l=e.n(N),$=e(15009),c=e.n($),A=e(9783),f=e.n(A),L=e(5574),o=e.n(L),W=e(99289),v=e.n(W),D=e(52677),h=e.n(D),I=e(96750),t=e.n(I),r=e(96486),u=e.n(r),B=e(10097),y=e(76690),C=e(65565),O=e(27484),K=e.n(O);function P(){"use strict";Array.isArray||(Array.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"});function a(n){for(var b=[],z=0,V=n.length;z<V;z++)b.indexOf(n[z])===-1&&b.push(n[z]);return b}function d(n,b){return JSON.stringify(n)===JSON.stringify(b)}var F={},R={$is:function(b,z){return b===z},$match:function(b,z){return Array.isArray(b)&&Array.isArray(z)&&b.some(function(V){return Array.isArray(V)})?b.some(function(V){return(V==null?void 0:V.length)===z.length&&(V==null?void 0:V.every(function(G,Y){return G===z[Y]}))}):JSON.stringify(b)===JSON.stringify(z)},$eq:function(b,z){return Array.isArray(b)&&Array.isArray(z)?d(b,z):Array.isArray(b)?b.includes(z):b==z},$ne:function(b,z){return b!=z},"!==":function(b,z){return b!==z},$gt:function(b,z){return Array.isArray(b)?b.some(function(V){return V>z}):b>z},$gte:function(b,z){return b>=z},$lt:function(b,z,V){return Array.isArray(b)?b.some(function(G){return G<z}):V===void 0?b<z:b<z&&z<V},$lte:function(b,z,V){return V===void 0?b<=z:b<=z&&z<=V},$exists:function(b){return F.truthy(b)},$notEmpty:function(b){return F.truthy(b)},$empty:function(b){return Array.isArray(b)?b.some(function(z){return!F.truthy(z)}):!F.truthy(b)},$notExists:function(b){return!F.truthy(b)},"%":function(b,z){return b%z},log:function(b){return console.log(b),b},$in:function(b,z){return!z||typeof z.indexOf=="undefined"?!1:Array.isArray(b)&&Array.isArray(z)?z.some(function(V){return b.includes(V)}):z.indexOf(b)!==-1},$notIn:function(b,z){return!z||typeof z.indexOf=="undefined"?!1:z.indexOf(b)===-1},$includes:function(b,z){return!b||typeof b.indexOf=="undefined"?!1:Array.isArray(b)?b.some(function(V){return V==null?void 0:V.includes(z)}):b.indexOf(z)!==-1},$notIncludes:function(b,z){return Array.isArray(b)?!b.some(function(V){return(V||"").includes(z)}):(b=b||"",!b.includes(z))},$anyOf:function(b,z){return b.length===0?!1:Array.isArray(b)&&Array.isArray(z)&&b.some(function(V){return Array.isArray(V)})?b.some(function(V){return V.some(function(G){return z.includes(G)})}):b.some(function(V){return z.includes(V)})},$noneOf:function(b,z){return!b||(b==null?void 0:b.length)===0?!0:Array.isArray(b)&&Array.isArray(z)&&b.some(function(V){return Array.isArray(V)})?b.some(function(V){return V.every(function(G){return!z.some(function(Y){return G.includes(Y)})})}):z.some(function(V){return!b.includes(V)})},$notMatch:function(b,z){if(b.length!==z.length)return!0;for(var V=0;V<b.length;V++)if(b[V]!==z[V])return!0;return!1},$dateOn:function(b,z){return!b||!z?!1:(Array.isArray(b)||(b=[b,b]),Array.isArray(z)||(z=[z,z]),b=b.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),b[0].isBetween(z[0],z[1],null,"[]")&&b[1].isBetween(z[0],z[1],null,"[]"))},$dateBefore:function(b,z){return!b||!z?!1:(Array.isArray(b)||(b=[b,b]),Array.isArray(z)||(z=[z,z]),b=b.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),b[0].isBefore(z[0])&&b[1].isBefore(z[0]))},$dateNotBefore:function(b,z){return!R.$dateBefore(b,z)},$dateAfter:function(b,z){return!b||!z?!1:(Array.isArray(b)||(b=[b,b]),Array.isArray(z)||(z=[z,z]),b=b.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),b[0].isAfter(z[1])&&b[1].isAfter(z[1]))},$dateNotAfter:function(b,z){return!R.$dateAfter(b,z)},$dateBetween:function(b,z){return R.$dateOn(b,z)},$dateNotOn:function(b,z){return!R.$dateOn(b,z)},$isTruly:function(b){return Array.isArray(b)?b.some(function(z){return z===!0||z===1}):b===!0||b===1},$isFalsy:function(b){return Array.isArray(b)?b.some(function(z){return!F.truthy(z)}):!F.truthy(b)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(b,z,V){if(V<0){var G=String(b).substr(z);return G.substr(0,G.length+V)}return String(b).substr(z,V)},"+":function(){return Array.prototype.reduce.call(arguments,function(b,z){return parseFloat(b,10)+parseFloat(z,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(b,z){return parseFloat(b,10)*parseFloat(z,10)})},"-":function(b,z){return z===void 0?-b:b-z},"/":function(b,z){return b/z},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(b,z){return b.concat(z)},[])},var:function(b,z){var V=z===void 0?null:z,G=this;if(typeof b=="undefined"||b===""||b===null)return G;for(var Y=String(b).split("."),U=0;U<Y.length;U++)if(G==null||(G=G[Y[U]],G===void 0))return V;return G},missing:function(){for(var b=[],z=Array.isArray(arguments[0])?arguments[0]:arguments,V=0;V<z.length;V++){var G=z[V],Y=F.apply({var:G},this);(Y===null||Y==="")&&b.push(G)}return b},missing_some:function(b,z){var V=F.apply({missing:z},this);return z.length-V.length>=b?[]:V}};return F.is_logic=function(n){return h()(n)==="object"&&n!==null&&!Array.isArray(n)&&Object.keys(n).length===1},F.truthy=function(n){return Array.isArray(n)&&n.length===0?!1:!!n},F.get_operator=function(n){return Object.keys(n)[0]},F.get_values=function(n){return n[F.get_operator(n)]},F.apply=function(n,b){if(Array.isArray(n))return n.map(function(J){return F.apply(J,b)});if(!F.is_logic(n))return n;var z=F.get_operator(n),V=n[z],G,Y,U,H,Z;if(Array.isArray(V)||(V=[V]),z==="if"||z=="?:"){for(G=0;G<V.length-1;G+=2)if(F.truthy(F.apply(V[G],b)))return F.apply(V[G+1],b);return V.length===G+1?F.apply(V[G],b):null}else if(z==="$and"){for(G=0;G<V.length;G+=1)if(Y=F.apply(V[G],b),!F.truthy(Y))return Y;return Y}else if(z==="or"){for(G=0;G<V.length;G+=1)if(Y=F.apply(V[G],b),F.truthy(Y))return Y;return Y}else{if(z==="filter")return H=F.apply(V[0],b),U=V[1],Array.isArray(H)?H.filter(function(J){return F.truthy(F.apply(U,J))}):[];if(z==="map")return H=F.apply(V[0],b),U=V[1],Array.isArray(H)?H.map(function(J){return F.apply(U,J)}):[];if(z==="reduce")return H=F.apply(V[0],b),U=V[1],Z=typeof V[2]!="undefined"?V[2]:null,Array.isArray(H)?H.reduce(function(J,k){return F.apply(U,{current:k,accumulator:J})},Z):Z;if(z==="all"){if(H=F.apply(V[0],b),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(!F.truthy(F.apply(U,H[G])))return!1;return!0}else if(z==="none"){if(H=F.apply(V[0],b),U=V[1],!Array.isArray(H)||!H.length)return!0;for(G=0;G<H.length;G+=1)if(F.truthy(F.apply(U,H[G])))return!1;return!0}else if(z==="some"){if(H=F.apply(V[0],b),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(F.truthy(F.apply(U,H[G])))return!0;return!1}}if(V=V.map(function(J){return F.apply(J,b)}),R.hasOwnProperty(z)&&typeof R[z]=="function")return R[z].apply(b,V);if(z.indexOf(".")>0){var re=String(z).split("."),ne=R;for(G=0;G<re.length;G++){if(!ne.hasOwnProperty(re[G]))throw new Error("Unrecognized operation "+z+" (failed at "+re.slice(0,G+1).join(".")+")");ne=ne[re[G]]}return ne.apply(b,V)}throw new Error("Unrecognized operation "+z)},F.uses_data=function(n){var b=[];if(F.is_logic(n)){var z=F.get_operator(n),V=n[z];Array.isArray(V)||(V=[V]),z==="var"?b.push(V[0]):V.forEach(function(G){b.push.apply(b,F.uses_data(G))})}return a(b)},F.add_operation=function(n,b){R[n]=b},F.rm_operation=function(n){delete R[n]},F.rule_like=function(n,b){if(b===n||b==="@")return!0;if(b==="number")return typeof n=="number";if(b==="string")return typeof n=="string";if(b==="array")return Array.isArray(n)&&!F.is_logic(n);if(F.is_logic(b)){if(F.is_logic(n)){var z=F.get_operator(b),V=F.get_operator(n);if(z==="@"||z===V)return F.rule_like(F.get_values(n,!1),F.get_values(b,!1))}return!1}if(Array.isArray(b))if(Array.isArray(n)){if(b.length!==n.length)return!1;for(var G=0;G<b.length;G+=1)if(!F.rule_like(n[G],b[G]))return!1;return!0}else return!1;return!1},F}var M=function(d,F){var R,n=/{{(.*?)}}/,b=d==null||(R=d.match)===null||R===void 0?void 0:R.call(d,n);if(b){var z=u().get(F,b[1]);return u().isFunction(z)?z():z}else return d};function p(a){if(h()(a)!=="object"||a===null)return null;for(var d in a)if(Object.prototype.hasOwnProperty.call(a,d))return Object.prototype.toString.call(a[d])==="[object Object]"&&a[d]!==null?p(a[d]):{key:d,value:a[d]};return null}var S=function(d){var F=x(d),R=(0,r.findIndex)(F,function(b,z,V){if(b.includes("$")&&z>0)return!0}),n=F.slice(0,R);return n};function x(a){var d=[];function F(R){Object.keys(R).sort().forEach(function(n){d.push(n),R[n]&&h()(R[n])==="object"&&F(R[n])})}return F(a),d}var i=function(){var a=v()(c()().mark(function d(F){var R,n,b,z,V,G,Y;return c()().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return R=F.ruleGroup,n=F.variables,b=F.localVariables,z=F.variableNameOfLeftCondition,V=Object.keys(R)[0]||"$and",G=R[V],Y=G.map(function(){var Z=v()(c()().mark(function re(ne){var J,k,q,Se,ee,ve,be,Re,Ce,Oe,De;return c()().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(!("$and"in ne||"$or"in ne)){ie.next=4;break}return ie.next=3,i({ruleGroup:ne,variables:n,localVariables:b});case 3:return ie.abrupt("return",ie.sent);case 4:if(J=p(ne),k=J==null?void 0:J.key,k){ie.next=8;break}return ie.abrupt("return",!0);case 8:return q=w(S(ne),z),Se=n.parseVariable(q,b,{doNotRequest:!0}).then(function(ge){var se=ge.value;return se}),ee=(0,y.cG)(J==null?void 0:J.value)?[n.parseVariable(J==null?void 0:J.value,b).then(function(ge){var se=ge.value;return se}),Se]:[J==null?void 0:J.value,Se],ie.prev=11,ve=P(),ie.next=15,Promise.all(ee);case 15:return be=ie.sent,Re=o()(be,2),Ce=Re[0],Oe=Re[1],ie.next=21,n.getCollectionField(q,b);case 21:return De=ie.sent,ie.abrupt("return",ve.apply(f()({},k,[(0,C.J)(Oe,{targetCollectionField:De}),(0,C.J)(Ce,{targetCollectionField:De})])));case 25:throw ie.prev=25,ie.t0=ie.catch(11),ie.t0;case 28:case"end":return ie.stop()}},re,null,[[11,25]])}));return function(re){return Z.apply(this,arguments)}}()),H.next=6,Promise.all(Y);case 6:if(Y=H.sent,V!=="$and"){H.next=11;break}return H.abrupt("return",(0,r.every)(Y,function(Z){return Z}));case 11:return H.abrupt("return",(0,r.some)(Y,function(Z){return Z}));case 12:case"end":return H.stop()}},d)}));return function(F){return a.apply(this,arguments)}}();function w(a){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(d,".").concat(a.join(".")," }}")}var E=function(d){var F={};return d.map(function(R){F[R.name]=R.ctx}),F};function g(a,d,F,R,n){return m.apply(this,arguments)}function m(){return m=v()(c()().mark(function a(d,F,R,n,b){var z,V,G,Y,U,H;return c()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(!(F&&d==="handlebars")){re.next=19;break}return re.prev=1,z=t().compile(F),V=E(n),G=R.ctxRef.current.$nDate,Y={},Object.keys(G).map(function(ne){Y[ne]=G[ne]()}),U=z(l()(l()(l()({},R.ctxRef.current),V),{},{$nDate:Y})),re.next=10,b(U);case 10:return re.abrupt("return",re.sent);case 13:return re.prev=13,re.t0=re.catch(1),console.log(re.t0),re.abrupt("return",F);case 17:re.next=31;break;case 19:return re.prev=19,re.next=22,(0,B.replaceVariableValue)(F,R,n);case 22:return H=re.sent,re.next=25,b(H);case 25:return re.abrupt("return",re.sent);case 28:return re.prev=28,re.t1=re.catch(19),re.abrupt("return",F);case 31:case"end":return re.stop()}},a,null,[[1,13],[19,28]])})),m.apply(this,arguments)}},61736:function(ke,te,e){"use strict";e.d(te,{D:function(){return l}});var N=e(67294),l=(0,N.createContext)({});l.displayName="SchemaComponentContext.Provider"},44245:function(ke,te,e){"use strict";e.d(te,{R:function(){return t}});var N=e(97857),l=e.n(N),$=e(13769),c=e.n($),A=e(86201),f=e(80844),L=e(67294),o=e(47844),W=e(85893),v=["children","form"],D=["children"],h=function(u){var B=u.children,y=u.form,C=c()(u,v),O=(0,L.useContext)(f.SchemaOptionsContext),K=(0,L.useContext)(f.SchemaExpressionScopeContext),P=l()(l()({},O==null?void 0:O.scope),K),M=l()({},O==null?void 0:O.components);return(0,W.jsx)(f.FormProvider,l()(l()({},C),{},{form:y,children:(0,W.jsx)(o.G,{components:M,scope:P,children:B})}))},I=function(u){var B=u.children,y=c()(u,D),C=(0,L.useContext)(f.SchemaOptionsContext),O=(0,L.useContext)(f.SchemaExpressionScopeContext),K=l()(l()({},C==null?void 0:C.scope),O),P=l()({},C==null?void 0:C.components),M=(0,L.useMemo)(function(){return(0,A.createForm)()},[]);return(0,W.jsx)(f.FormProvider,l()(l()({},y),{},{form:M,children:(0,W.jsx)(o.G,{components:P,scope:K,children:B})}))},t=function(u){return u.form?(0,W.jsx)(h,l()({},u)):(0,W.jsx)(I,l()({},u))}},93587:function(ke,te,e){"use strict";e.d(te,{m:function(){return t}});var N=e(97857),l=e.n(N),$=e(86201),c=e(57953),A=e(67294),f=e(84577),L=e(44245),o=e(93323),W=e(12174),v=function(u){var B=u.uid,y=u.type,C=y===void 0?"getJsonSchema":y,O=u.onSuccess,K={url:"/uiSchemas:".concat(C,"/").concat(B)},P=(0,W.QT)(K,{refreshDeps:[B],onSuccess:function(x){O&&O(x)}}),M=P.data,p=P.loading;return{schema:M==null?void 0:M.data,loading:p}},D=e(85893),h=function(u){return u},I=function(u){var B=u.noForm,y=u.onlyRenderProperties,C=u.hidden,O=u.scope,K=u.uid,P=u.memoized,M=P===void 0?!0:P,p=u.components,S=u.onSuccess,x=u.NotFoundPage,i=u.schemaTransform,w=i===void 0?h:i,E=u.onPageNotFind,g=(0,f.Dm)(),m=g.reset,a=y?"getProperties":"getJsonSchema",d={url:"/uiSchemas:".concat(a,"/").concat(K)},F=(0,A.useMemo)(function(){return(0,$.createForm)()},[K]),R=v({uid:K,type:a,onSuccess:function(G){S&&S(G),m&&m()}}),n=R.schema,b=R.loading,z=(0,f.Co)(x);return b||C?(0,D.jsx)("div",{style:{textAlign:"center",marginTop:20},children:(0,D.jsx)(c.Z,{})}):!n||Object.keys(n).length===0?(E&&E(),z?(0,D.jsx)(z,{}):null):B?(0,D.jsx)(o.n,{components:p,scope:O,schema:w(n||{})}):(0,D.jsx)(L.R,{form:F,children:(0,D.jsx)(o.n,{components:p,scope:O,schema:w(n||{})})})},t=(0,A.memo)(function(r){return r.uid?(0,D.jsx)(I,l()({},r)):null});t.displayName="RemoteSchemaComponent"},93323:function(ke,te,e){"use strict";e.d(te,{n:function(){return O}});var N=e(97857),l=e.n(N),$=e(13769),c=e.n($),A=e(9783),f=e.n(A),L=e(80844),o=e(90105),W=e(67294),v=e(61736),D=e(47844),h=e(85893),I=["components","scope","schema","distributed"],t=["schema"],r=["memoized"];function u(K){return L.Schema.isSchemaInstance(K)?K:K!=null&&K.name?new L.Schema({type:"object",properties:f()({},K.name,K)}):new L.Schema(K)}var B=function(P){return(0,W.useMemo)(function(){return u(P)},[])},y=(0,W.memo)(function(K){var P=K.components,M=K.scope,p=K.schema,S=K.distributed,x=c()(K,I),i=(0,W.useContext)(v.D),w=(0,W.useMemo)(function(){return u(p)},[p]),E=(0,o.Z)();return(0,h.jsx)(v.D.Provider,{value:l()(l()({},i),{},{distributed:i.distributed==!1?!1:S,refresh:function(){var m;if(E(),i.distributed===!1||S===!1){var a;(a=i.refresh)===null||a===void 0||a.call(i)}(m=K.onChange)===null||m===void 0||m.call(K,w)}}),children:(0,h.jsx)(D.G,{inherit:!0,components:P,scope:M,children:(0,h.jsx)(L.RecursionField,l()(l()({},x),{},{schema:w}))})})}),C=(0,W.memo)(function(K){var P=K.schema,M=c()(K,t),p=B(P);return(0,h.jsx)(y,l()(l()({},M),{},{schema:p}))}),O=(0,W.memo)(function(K){var P=K.memoized,M=c()(K,r);return P?(0,h.jsx)(C,l()({},M)):(0,h.jsx)(y,l()({},M))})},47844:function(ke,te,e){"use strict";e.d(te,{B:function(){return f},G:function(){return L}});var N=e(97857),l=e.n(N),$=e(80844),c=e(67294),A=e(85893),f=function(){var W=(0,c.useContext)($.SchemaOptionsContext);return W||{}},L=(0,c.memo)(function(o){var W=o.children,v=f(),D=(0,c.useMemo)(function(){return l()(l()({},v.components),o.components)},[v.components,o.components]),h=(0,c.useMemo)(function(){return l()(l()({},v.scope),o.scope)},[v.scope,o.scope]),I=(0,c.useMemo)(function(){return{scope:h,components:D}},[h,D]);return(0,A.jsx)($.SchemaOptionsContext.Provider,{value:I,children:(0,A.jsx)($.SchemaComponentsContext.Provider,{value:D,children:(0,A.jsx)($.ExpressionScope,{value:h,children:W})})})});L.displayName="SchemaComponentOptions"},70993:function(ke,te,e){"use strict";e.d(te,{_b:function(){return P},RV:function(){return M.R},m1:function(){return p.m},n6:function(){return S.n},G0:function(){return x.G},a$:function(){return Y},Tz:function(){return V},Bs:function(){return x.B}});var N=e(15009),l=e.n(N),$=e(99289),c=e.n($),A=e(12444),f=e.n(A),L=e(72004),o=e.n(L),W=e(31996),v=e.n(W),D=e(26037),h=e.n(D),I=e(51947),t=e(83062),r=e(15867),u=e(67294),B=e(49218),y=e(26793),C=e(40868),O=e(68230),K=e(85893),P=function(){var Z=(0,C.ngQ)(),re=Z.designable,ne=Z.setDesignable,J=(0,y.$)(),k=J.t,q=(0,O.d)(),Se=q.token,ee={};return re?ee.backgroundColor="var(--colorSettings)":ee.backgroundColor="transparent",(0,B.y1)("Ctrl+Shift+U",function(){return ne(!re)},[re]),(0,K.jsx)(t.Z,{title:k("UI Editor"),children:(0,K.jsx)(r.ZP,{"data-testid":"ui-editor-button",icon:(0,K.jsx)(I.Z,{style:{color:Se.colorTextHeaderMenu}}),title:k("UI Editor"),style:ee,onClick:function(){ne(!re)}})})},M=e(44245),p=e(93587),S=e(93323),x=e(47844),i=e(97857),w=e.n(i),E=e(5574),g=e.n(E),m=e(86201),a=e(80844),d=e(84327),F=e(90105),R=e(61736),n=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(Z).concat((0,d.uid)())};a.Schema.silent(!0);var b={},z={silent:!0,compile:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=function(){if(z.silent)try{return new Function("$root","with($root) { return (".concat(Z,"); }"))(re)}catch(k){return"{{".concat(Z,"}}")}else return new Function("$root","with($root) { return (".concat(Z,"); }"))(re)};return b[Z]?b[Z]:Z.trim().startsWith("t(")?(b[Z]=ne(),b[Z]):ne()}};a.Schema.registerCompiler(z.compile);var V=function(Z){var re=Z.designable,ne=Z.onDesignableChange,J=Z.components,k=Z.children,q=(0,u.useContext)(R.D),Se=(0,x.B)(),ee=(0,F.Z)(),ve=(0,u.useState)((0,d.uid)()),be=g()(ve,2),Re=be[0],Ce=be[1],Oe=(0,u.useMemo)(function(){return Z.form||(0,m.createForm)()},[Re]),De=(0,y.$)(),ue=De.t,ie=(0,u.useMemo)(function(){return w()(w()({},Z.scope),{},{t:ue,randomString:n})},[Z.scope,ue,Se==null?void 0:Se.scope]),ge=(0,u.useState)(re),se=g()(ge,2),fe=se[0],xe=se[1],ye=(0,u.useMemo)(function(){return typeof re=="boolean"?re:fe},[re,fe,q.designable]),je=(0,u.useMemo)(function(){return function(Ie){typeof ye!="boolean"&&xe(Ie),ne==null||ne(Ie)}},[ye,ne]),Be=(0,u.useCallback)(function(){Ce((0,d.uid)())},[]);return(0,K.jsx)(R.D.Provider,{value:{scope:ie,components:J,reset:Be,refresh:ee,designable:ye,setDesignable:je},children:(0,K.jsx)(a.FormProvider,{form:Oe,children:(0,K.jsx)(x.G,{inherit:!0,scope:ie,components:J,children:k})})})};V.displayName="SchemaComponentProvider";var G=e(31601),Y=function(H){v()(re,H);var Z=h()(re);function re(){return f()(this,re),Z.apply(this,arguments)}return o()(re,[{key:"load",value:function(){var ne=c()(l()().mark(function k(){return l()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:this.addComponents();case 1:case"end":return Se.stop()}},k,this)}));function J(){return ne.apply(this,arguments)}return J}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:P})}}]),re}(G.S),U=null},84577:function(ke,te,e){"use strict";e.d(te,{zz:function(){return L.zz},Pl:function(){return L.Pl},oB:function(){return L.oB},lI:function(){return l},hi:function(){return C.hi},eJ:function(){return $.e},Co:function(){return f},aZ:function(){return C.aZ},ng:function(){return L.ng},et:function(){return o.e},cL:function(){return u},fd:function(){return O},Cl:function(){return D},vH:function(){return B},sR:function(){return L.sR},wN:function(){return y.w},Dm:function(){return I},fM:function(){return C.fM}});var N=e(67294),l=function(P){var M=(0,N.useRef)(null);return(0,N.useEffect)(function(){return M.current&&P!==M.current&&M.current.onUnmount(),M.current=P,P.onMount(),function(){P.onUnmount()}},[P]),P},$=e(96365),c=e(80844),A=e(96486),f=function(P,M){var p=(0,N.useContext)(c.SchemaOptionsContext),S=p.components;return P?typeof P!="string"?P:(0,A.get)(S,P)||M:M},L=e(94516),o=e(98146),W=e(97857),v=e.n(W),D=function(P){var M=(0,N.useContext)(c.SchemaOptionsContext),p=(0,N.useContext)(c.SchemaExpressionScopeContext),S=(0,N.useRef)();return S.current=p,P.toFieldProps(v()(v()({},M),{},{get scope(){return v()(v()({},M.scope),S.current)}}))},h=e(61736);function I(){return(0,N.useContext)(h.D)}var t=e(26793),r=e(6145),u=function(){var P,M=(0,r.useCollectionManager_deprecated)(),p=M.getCollectionJoinField,S=M.getCollection,x=(0,c.useFieldSchema)(),i=(0,r.useCollection_deprecated)(),w=i.getField,E=w(x.name)||p(x["x-collection-field"]),g=(0,t.$)(),m=g.t,a=((P=x["x-component-props"])===null||P===void 0?void 0:P.fieldNames)||{},d=a.label,F=(0,N.useMemo)(function(){if(!(!E||!(E!=null&&E.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(E.interface)){var R=S(E.target);if((R==null?void 0:R.template)==="file")return[{label:m("Record picker"),value:"CollectionField"},{label:m("Select"),value:"AssociationSelect"}];switch(E.interface){case"o2m":return[{label:m("Record picker"),value:"CollectionField"},{label:m("Subtable"),value:"TableField"},{label:m("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:m("Record picker"),value:"CollectionField"},{label:m("Select"),value:"AssociationSelect"}];default:return[{label:m("Record picker"),value:"CollectionField"},{label:m("Subform"),value:"FormField"},{label:m("Select"),value:"AssociationSelect"}]}}},[m,E==null?void 0:E.interface,d]);return F},B=function(){var P,M=(0,c.useField)(),p=(0,c.useFieldSchema)(),S=(0,r.useCollection_deprecated)(),x=S.getField,i=(0,r.useCollectionManager_deprecated)(),w=i.getCollectionJoinField,E=x(p.name)||w(p["x-collection-field"]),g=(0,$.e)();(0,N.useEffect)(function(){if(!(M!=null&&M.title)){var m;M.title=g(E==null||(m=E.uiSchema)===null||m===void 0?void 0:m.title)}},[E==null||(P=E.uiSchema)===null||P===void 0?void 0:P.title])},y=e(9780),C=e(18686),O=function(P){var M,p=(0,t.$)(),S=p.t,x=(0,r.useCollectionManager_deprecated)(),i=x.getCollectionJoinField,w=x.getCollection,E=(0,c.useFieldSchema)(),g=(P==null?void 0:P.fieldSchema)||E,m=(0,c.useField)(),a=(0,c.useForm)(),d=(g==null?void 0:g["x-read-pretty"])||m.readPretty||a.readPretty,F=P==null?void 0:P.fieldSchema,R=(0,r.useCollection_deprecated)(),n=R.getField,b=(P==null?void 0:P.collectionField)||n(g.name)||i(g["x-collection-field"]),z=((M=g["x-component-props"])===null||M===void 0?void 0:M.fieldNames)||{},V=z.label,G=(0,N.useMemo)(function(){if(!(!b||!(b!=null&&b.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m","updatedBy","createdBy","mbm"].includes(b.interface)){var Y=w(b.target);if((Y==null?void 0:Y.template)==="file")return d?[{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((Y==null?void 0:Y.template)==="tree"&&["m2m","o2m","m2o"].includes(b.interface))return d?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!F&&{label:S("Sub-details"),value:"Nester"},!F&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!F&&["m2m","o2m"].includes(b.interface)&&{label:S("Sub-table"),value:"SubTable"},!F&&{label:S("Cascade Select"),value:"CascadeSelect"},!F&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];switch(b.interface){case"o2m":return d?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!F&&{label:S("Sub-table"),value:"SubTable"},!F&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!F&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"},!F&&{label:S("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return d?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!F&&{label:S("Sub-details"),value:"Nester"},!F&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!F&&{label:S("Sub-table"),value:"SubTable"},!F&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return d?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!F&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!F&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];default:return d?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!F&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!F&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}]}}},[S,b==null?void 0:b.interface,V]);return(G||[]).filter(Boolean)}},18686:function(ke,te,e){"use strict";e.d(te,{aZ:function(){return P},fM:function(){return p},hi:function(){return M}});var N=e(5574),l=e.n(N),$=e(97857),c=e.n($),A=e(80844),f=e(83204),L=e(9361),o=e(96486),W=e.n(o),v=e(67294),D=e(40868),h=e(21143),I=e(10097),t=e(1892),r=e(28561),u=function(i,w,E,g){return i?g.paddingContentHorizontalLG:E?w?g.controlPaddingHorizontal+3*g.controlPaddingHorizontalSM+22+g.paddingContentHorizontalLG:g.paddingContentHorizontalLG+12:w?g.paddingSM+g.controlHeight+g.marginXS+2*g.controlPaddingHorizontalSM+22+g.paddingContentHorizontalLG:g.controlHeight+g.marginXS+(g.paddingXXS+2)*2+g.paddingContentHorizontalLG},B=function(i){var w=L.Z.useToken(),E=w.token,g=(0,D.ngQ)(),m=g.designable,a=(0,I.useBlockHeightProps)(),d=a.heightProps,F=i||d||{},R=F.disablePageHeader,n=F.enablePageTabs,b=F.hidePageTitle,z=E.sizeXXL-2,V=m?E.controlHeight+2*E.paddingContentHorizontalLG:1*E.paddingContentHorizontalLG,G=u(R,n,b,E);return z+G+V},y=function(){var i=L.Z.useToken(),w=i.token,E=(0,D.ngQ)(),g=E.designable,m=w.paddingContentVerticalLG+w.margin+2*w.paddingContentVertical+24,a=g?w.controlHeight+2*w.paddingContentHorizontalLG:1*w.paddingContentHorizontalLG;return m+a},C=function(i){var w=(0,A.useFieldSchema)(),E=S(w),g=B(i),m=y();return E?m:g},O=["users_jobs","approvals","approvalRecords"],K=function(){var i,w,E=L.Z.useToken(),g=E.token,m=(0,I.useBlockHeightProps)(),a=m.heightProps,d=(0,t.Si)(),F=d.heightProps,R=(0,D.ngQ)(),n=R.designable,b=(0,A.useFieldSchema)(),z=F||a,V=C(z),G=(i=(0,h.useDataBlockRequest)())!==null&&i!==void 0?i:{},Y=G.data,U=(0,h.useCollection)(),H=U.name,Z=(Y==null?void 0:Y.meta)||{},re=Z.count,ne=Z.pageSize,J=re>ne,k=z.heightMode,q=z.height,Se=z.title;if(!(!(z!=null&&z.heightMode)||k===r.j.DEFAULT)){var ee=Object.keys(((w=b.parent.properties.actions)===null||w===void 0?void 0:w.properties)||{}).length>0,ve=J?g.controlHeight+g.padding+g.marginLG:g.marginLG,be=ee||n?g.controlHeight+2*g.marginLG:g.marginLG,Re=(n&&!O.includes(H)?g.controlHeight:22)+2*g.padding+1,Ce=Se?g.fontSizeLG*g.lineHeightLG+g.padding*2-1:0;return k===r.j.FULL_HEIGHT?window.innerHeight-V-Ce-Re-be-ve:q-Ce-be-Re-ve}},P=function(i){var w=(0,I.useBlockHeightProps)(),E=w.heightProps,g=C(),m=L.Z.useToken(),a=m.token,d=E||{},F=d.heightMode,R=d.height,n=d.title,b=n?a.fontSizeLG*a.lineHeightLG+a.padding*2-1:0;if(!(!(E!=null&&E.heightMode)||F===r.j.DEFAULT)){if(F===r.j.FULL_HEIGHT){var z=window.innerHeight-g;return i!=null&&i.removeBlockHeaderHeight&&(z=z-b),i!=null&&i.innerExtraHeight&&(z=z-i.innerExtraHeight),z}return R}},M=function(){var i=(0,A.useFieldSchema)(),w=(0,v.useMemo)(function(){return(0,I.getPageSchema)(i)},[]),E=(w==null?void 0:w["x-component-props"])||{},g=E.disablePageHeader,m=E.enablePageTabs,a=E.hidePageTitle,d=c()(c()({},i==null?void 0:i["x-component-props"]),{},{disablePageHeader:g,enablePageTabs:m,hidePageTitle:a}),F=C(d),R=d||{},n=R.heightMode,b=R.height;if(!(!(d!=null&&d.heightMode)||n===r.j.DEFAULT))return n===r.j.FULL_HEIGHT?window.innerHeight-F:b},p=function(){var i=(0,v.useState)(),w=l()(i,2),E=w[0],g=w[1],m=(0,v.useRef)(null),a=K(),d=(0,v.useCallback)((0,o.debounce)(function(){var R;if(m.current){var n=m.current.getBoundingClientRect(),b=(R=m.current.querySelector(".ant-table"))===null||R===void 0?void 0:R.getBoundingClientRect();b&&g(n.width)}},100),[a]),F=(0,v.useCallback)(function(R){m.current=R&&R.children?R.children[0]:null,d()},[d]);return(0,f.Z)("resize",d),{height:a,width:E,tableSizeRefCallback:F}},S=function x(i){return i?i["x-component"]==="Action.Container"?!0:x(i.parent):null}},96365:function(ke,te,e){"use strict";e.d(te,{e:function(){return o}});var N=e(97857),l=e.n(N),$=e(52677),c=e.n($),A=e(80844),f=e(67294),L={},o=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},D=v.noCache,h=(0,f.useContext)(A.SchemaOptionsContext),I=(0,f.useContext)(A.SchemaExpressionScopeContext);return function(t,r){var u=!1,B;if(typeof t=="string"&&t.startsWith("{{")&&(u=!0,B=t),t&&c()(t)==="object"&&!(0,f.isValidElement)(t)&&(u=!0,B=JSON.stringify(t)),Array.isArray(t)&&(u=!0),u){var y=l()(l()(l()({},h.scope),I),r);if(!B)return A.Schema.compile(t,y);try{return D?A.Schema.compile(t,y):(L[B]=L[B]||A.Schema.compile(t,y),L[B])}catch(C){return console.log("useCompile error",t,C),A.Schema.compile(t,y)}}return t}}},94516:function(ke,te,e){"use strict";e.d(te,{zz:function(){return V},Pl:function(){return d},oB:function(){return b},ng:function(){return Y},sR:function(){return G}});var N=e(5574),l=e.n(N),$=e(19632),c=e.n($),A=e(15009),f=e.n(A),L=e(99289),o=e.n(L),W=e(12444),v=e.n(W),D=e(72004),h=e.n(D),I=e(9783),t=e.n(I),r=e(97857),u=e.n(r),B=e(80844),y=e(84327),C=e(45360),O=e(50361),K=e.n(O),P=e(27361),M=e.n(P),p=e(36968),S=e.n(p),x=e(67294),i=e(26793),w=e(12174),E=e(61736);function g(U,H){if(U)return U["x-app-version"]||(U["x-app-version"]=H),Object.keys(U.properties||{}).forEach(function(Z){var re;g((re=U.properties)===null||re===void 0?void 0:re[Z],H)}),U}var m={i8:"1.3.46-beta"},a=e(85893);function d(U){return new V(U)}var F=function U(H){H&&(H["x-uid"]||(H["x-uid"]=(0,y.uid)()),Object.keys(H.properties||{}).forEach(function(Z){U(H.properties[Z])}))},R=function(H){return H},n=function(H,Z){if(!(!H||!Z)){for(var re in Z)if(Object.prototype.hasOwnProperty.call(Z,re)){var ne=Z[re];if(ne!==(H==null?void 0:H[re]))return!1}return!0}},b=function(H,Z){if(H["x-uid"]&&H["x-uid"]===Z["x-uid"])return[null,H.toJSON()];var re=H.toJSON(),ne=u()(u()({},re),{},{properties:{}}),J=null,k=function q(Se,ee){Object.keys(Se||{}).forEach(function(ve){var be=Se[ve];if(be["x-uid"]===Z["x-uid"]){J=Se[ve];return}else ee.properties[ve]=u()(u()({},be),{},{properties:{}}),q(be==null?void 0:be.properties,ee.properties[ve])})};return k(re.properties,ne),[ne,J]},z=function(H){return H},V=function(){function U(H){v()(this,U),t()(this,"current",void 0),t()(this,"options",void 0),t()(this,"appVersion",void 0),t()(this,"events",{}),this.options=H,this.current=H.current,this.appVersion=H.appVersion}return h()(U,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var Z=this,re=this.options,ne=re.api,J=re.t,k=J===void 0?z:J;if(ne){var q=function(ee){if(!ee)return[];var ve=Object.values(ee.properties).length,be=[];return ee.mapProperties(function(Re){Re["x-component-props"]=Re["x-component-props"]||{},Re["x-component-props"].width=100/ve,Re["x-uid"]&&be.push({"x-uid":Re["x-uid"],"x-component-props":Re["x-component-props"]})}),ee["x-uid"]&&be.length?be:[]};this.on("insertAdjacent",function(){var Se=o()(f()().mark(function ee(ve){var be,Re,Ce,Oe,De,ue,ie,ge,se,fe;return f()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(Re=ve.onSuccess,Ce=ve.current,Oe=ve.position,De=ve.schema,ue=ve.wrap,ie=ve.wrapped,ge=ve.removed,se=[],(ie==null?void 0:ie["x-component"])==="Grid.Col"&&(se=se.concat(q(ie.parent))),(ge==null?void 0:ge["x-component"])==="Grid.Col"&&(se=se.concat(q(ge.parent))),Z.refresh(),Ce["x-uid"]){ye.next=7;break}return ye.abrupt("return");case 7:return ye.next=9,ne.request({url:"/uiSchemas:insertAdjacent/".concat(Ce["x-uid"],"?position=").concat(Oe),method:"post",data:{schema:g(De,Z.appVersion),wrap:ue}});case 9:if(fe=ye.sent,!se.length){ye.next=13;break}return ye.next=13,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:se});case 13:if(!(ge!=null&&ge["x-uid"])){ye.next=16;break}return ye.next=16,ne.request({url:"/uiSchemas:remove/".concat(ge["x-uid"]),method:"post"});case 16:Re==null||Re(fe==null||(be=fe.data)===null||be===void 0?void 0:be.data),C.ZP.success(k("Saved successfully"),.2);case 18:case"end":return ye.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("patch",function(){var Se=o()(f()().mark(function ee(ve){var be;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(be=ve.schema,Z.refresh(),be!=null&&be["x-uid"]){Ce.next=4;break}return Ce.abrupt("return");case 4:return Ce.next=6,ne.request({url:"/uiSchemas:patch",method:"post",data:u()({},be)});case 6:C.ZP.success(k("Saved successfully"),.2);case 7:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var Se=o()(f()().mark(function ee(ve){var be;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(be=ve.schema,Z.refresh(),be!=null&&be["x-uid"]){Ce.next=4;break}return Ce.abrupt("return");case 4:return Ce.next=6,ne.request({url:"/uiSchemas:initializeActionContext",method:"post",data:u()({},be)});case 6:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("batchPatch",function(){var Se=o()(f()().mark(function ee(ve){var be;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return be=ve.schemas,Z.refresh(),Ce.next=4,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:be});case 4:C.ZP.success(k("Saved successfully"),.2);case 5:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("remove",function(){var Se=o()(f()().mark(function ee(ve){var be,Re;return f()().wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(be=ve.removed,Re=[],(be==null?void 0:be["x-component"])==="Grid.Col"&&(Re=q(be.parent)),Z.refresh(),be!=null&&be["x-uid"]){Oe.next=6;break}return Oe.abrupt("return");case 6:return Oe.next=8,ne.request({url:"/uiSchemas:remove/".concat(be["x-uid"]),method:"post"});case 8:if(!Re.length){Oe.next=11;break}return Oe.next=11,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:Re});case 11:C.ZP.success(k("Saved successfully"),.2);case 12:case"end":return Oe.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(Z){Z.type||(Z.type="void"),Z.name||(Z.name=(0,y.uid)()),this.current["x-uid"]&&F(Z)}},{key:"on",value:function(Z,re){this.events[Z]||(this.events[Z]=[]),this.events[Z].push(re)}},{key:"emit",value:function(){var H=o()(f()().mark(function re(ne){var J=this,k,q,Se,ee,ve,be=arguments;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(this.events[ne]){Ce.next=2;break}return Ce.abrupt("return");case 2:for(k=be.length,q=new Array(k>1?k-1:0),Se=1;Se<k;Se++)q[Se-1]=be[Se];return ee=q[0],ve=q.slice(1),Ce.abrupt("return",Promise.all(this.events[ne].map(function(Oe){return Oe.bind(J).apply(void 0,[u()({current:J.current},ee)].concat(c()(ve)))})));case 5:case"end":return Ce.stop()}},re,this)}));function Z(re){return H.apply(this,arguments)}return Z}()},{key:"parentsIn",value:function(Z){if(!Z||!B.Schema.isSchemaInstance(Z))return!1;for(var re=this.current;(ne=re)!==null&&ne!==void 0&&ne.parent;){var ne;if(re.parent===Z)return!0;re=re.parent}return!1}},{key:"refresh",value:function(){var Z=this.options.refresh;return Z==null?void 0:Z()}},{key:"deepMerge",value:function(Z){var re=this,ne={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"},J={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(k){ne[k]?(re.current[k]=Z[k],re.updateModel(ne[k],Z[k])):J[k]?Object.keys(Z[k]).forEach(function(q){S()(re.current,[k,q],Z[k][q]),re.updateModel([J[k],q],Z[k][q])}):re.current[k]=Z[k]}),this.emit("patch",{schema:Z})}},{key:"getSchemaAttribute",value:function(Z,re){return M()(this.current,Z,re)}},{key:"shallowMerge",value:function(Z){var re=this,ne={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(J){re.current[J]=Z[J],ne[J]&&re.updateModel(ne[J],Z[J])}),this.emit("patch",{schema:Z})}},{key:"updateModel",value:function(Z,re){var ne=function(k){S()(k,Z,re)};this.model&&ne(this.model),this.query&&this.query.take(ne)}},{key:"insertAdjacent",value:function(Z,re){var ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(Z){case"beforeBegin":return this.insertBeforeBegin(re,ne);case"afterBegin":return this.insertAfterBegin(re,ne);case"beforeEnd":return this.insertBeforeEnd(re,ne);case"afterEnd":return this.insertAfterEnd(re,ne)}}},{key:"recursiveRemoveIfNoChildren",value:function(Z,re){if(Z){for(var ne=Z,J,k=re==null?void 0:re.breakRemoveOn;ne;){if(typeof k=="function"){if(k(ne))break}else if(n(ne,k))break;var q=Object.keys(ne.properties||{}).length;if(q>0)break;ne.parent&&(J=ne.parent.removeProperty(ne.name)),ne=ne.parent}return J}}},{key:"remove",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=re.breakRemoveOn,J=re.removeParentsIfNoChildren,k=Z||this.current,q=k.parent.removeProperty(k.name);if(J){var Se=this.recursiveRemoveIfNoChildren(k.parent,{breakRemoveOn:ne});Se&&(q=Se)}return this.emit("remove",{removed:q})}},{key:"removeWithoutEmit",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=re.breakRemoveOn,J=re.removeParentsIfNoChildren,k=Z||this.current,q=k.parent.removeProperty(k.name);if(J){var Se=this.recursiveRemoveIfNoChildren(k.parent,{breakRemoveOn:ne});Se&&(q=Se)}return q}},{key:"insertBeforeBeginOrAfterEnd",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)&&B.Schema.isSchemaInstance(Z)&&this.current.parent===Z.parent){var J=0,k=0;return this.current.parent.mapProperties(function(q,Se,ee){re.current.name===Se&&(k=ee),Z.name===Se&&(J=ee)}),J>k?this.insertBeforeBegin(Z,ne):this.insertAfterEnd(Z,ne)}}},{key:"insertBeforeBegin",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var J={onSuccess:ne.onSuccess},k=ne.wrap,q=k===void 0?R:k,Se=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),ee&&(J.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Se}))}else Z&&(Z=K()(Z));var ve={},be=!1,Re=0,Ce=0;this.current.parent.mapProperties(function(fe,xe){xe===re.current.name&&(Ce=Re,be=!0,++Re),fe["x-index"]=Re,++Re,be&&(ve[xe]=fe,re.current.parent.removeProperty(xe))}),this.prepareProperty(Z);var Oe=q(Z),De=this.current.parent.addProperty(Oe.name||(0,y.uid)(),Oe);De["x-index"]=Ce,De.parent=this.current.parent,this.current.parent.setProperties(ve);var ue=b(De,Z),ie=l()(ue,2),ge=ie[0],se=ie[1];this.emit("insertAdjacent",u()({position:"beforeBegin",schema:se,wrapped:Oe,wrap:ge},J))}}},{key:"insertAfterBegin",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var ne={onSuccess:re.onSuccess},J=re.wrap,k=J===void 0?R:J,q=re.breakRemoveOn,Se=re.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Se&&(ne.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:q}))}else Z&&(Z=K()(Z));var ee={},ve=1;this.current.mapProperties(function(ie,ge){ie["x-index"]=ve,++ve,ee[ge]=ie}),this.current.properties={},this.prepareProperty(Z);var be=k(Z),Re=this.current.addProperty(be.name||(0,y.uid)(),be);Re["x-index"]=0,Re.parent=this.current,this.current.setProperties(ee);var Ce=b(Re,Z),Oe=l()(Ce,2),De=Oe[0],ue=Oe[1];this.emit("insertAdjacent",u()({position:"afterBegin",schema:ue,wrap:De,wrapped:be},ne))}}},{key:"insertBeforeEnd",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){delete Z["x-index"];var ne={onSuccess:re.onSuccess},J=re.wrap,k=J===void 0?R:J,q=re.breakRemoveOn,Se=re.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Se&&(ne.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:q}))}else Z&&(Z=K()(Z));this.prepareProperty(Z);var ee=k(Z),ve=this.current.addProperty(ee.name||(0,y.uid)(),ee);ve.parent=this.current;var be=b(ve,Z),Re=l()(be,2),Ce=Re[0],Oe=Re[1];return this.emit("insertAdjacent",u()({position:"beforeEnd",schema:Oe,wrap:Ce,wrapped:ee},ne))}}},{key:"insertAfterEnd",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var J={onSuccess:ne==null?void 0:ne.onSuccess},k=ne.wrap,q=k===void 0?R:k,Se=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren,ve=0,be=0,Re=!1,Ce={};if(this.current.parent.mapProperties(function(fe,xe){fe["x-index"]=ve,xe===re.current.name&&(++ve,be=ve,Re=!0),++ve,Re&&xe!==re.current.name&&(Ce[xe]=fe,re.current.parent.removeProperty(xe))}),B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),ee&&(J.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Se})),Z.parent=null}else Z&&(Z=K()(Z));this.prepareProperty(Z);var Oe=q(Z),De=this.current.parent.addProperty(Oe.name||(0,y.uid)(),Oe);De.parent=this.current.parent,De["x-index"]=be,this.current.parent.setProperties(Ce);var ue=b(De,Z),ie=l()(ue,2),ge=ie[0],se=ie[1];this.emit("insertAdjacent",u()({position:"afterEnd",schema:se,wrap:ge,wrapped:Oe},J))}}}]),U}();function G(){var U=(0,x.useContext)(B.SchemaOptionsContext),H=(0,x.useMemo)(function(){return(U==null?void 0:U.components)||{}},[U]),Z=function(ne){if(!ne)return null;if(typeof ne!="string")return ne;var J=M()(H,ne);return J||console.error('[nocobase]: Component "'.concat(ne,'" not found')),J};return Z}function Y(){var U=(0,x.useContext)(E.D),H=U.designable,Z=U.setDesignable,re=U.refresh,ne=U.reset,J=(0,x.useContext)(B.SchemaOptionsContext),k=(0,x.useMemo)(function(){return(J==null?void 0:J.components)||{}},[J]),q=(0,x.useMemo)(function(){return function(){return(0,a.jsx)(a.Fragment,{})}},[]),Se=(0,B.useField)(),ee=(0,B.useFieldSchema)(),ve=(0,w.LY)(),be=(0,i.$)(),Re=be.t,Ce=(0,x.useMemo)(function(){return d({t:Re,api:ve,refresh:re,current:ee,model:Se,appVersion:m.i8})},[Re,ve,re,ee,Se]);return(0,x.useEffect)(function(){Ce.loadAPIClientEvents()},[Ce]),{dn:Ce,designable:H,reset:ne,refresh:re,setDesignable:Z,DesignableBar:q,findComponent:(0,x.useCallback)(function(Oe){return Oe?typeof Oe!="string"?Oe:M()(k,Oe):null},[M()]),on:Ce.on.bind(Ce),patch:(0,x.useCallback)(function(Oe,De){var ue=function(se){Object.keys(se).forEach(function(fe){var xe=se[fe];fe==="title"&&(Se.title=xe,ee.title=xe),fe==="x-decorator-props"&&(Se.decoratorProps||(Se.decoratorProps={}),ee["x-decorator-props"]||(ee["x-decorator-props"]={}),Object.keys(xe).forEach(function(ye){Se.decoratorProps[ye]=xe[ye],ee["x-decorator-props"][ye]=xe[ye]})),fe==="x-component-props"&&(Se.componentProps||(Se.componentProps={}),ee["x-component-props"]||(ee["x-component-props"]={}),Object.keys(xe).forEach(function(ye){Se.componentProps[ye]=xe[ye],ee["x-component-props"][ye]=xe[ye]}))})};if(typeof Oe=="string"){var ie={};return S()(ie,Oe,De),ue(ie)}ue(Oe),re()},[Ce]),shallowMerge:(0,x.useCallback)(function(Oe){Ce.shallowMerge(Oe)},[Ce]),deepMerge:(0,x.useCallback)(function(Oe){Ce.deepMerge(Oe)},[Ce]),remove:(0,x.useCallback)(function(Oe,De){Ce.remove(Oe,De)},[Ce]),insertAdjacent:(0,x.useCallback)(function(Oe,De,ue){Ce.insertAdjacent(Oe,De,ue)},[Ce]),insertBeforeBegin:(0,x.useCallback)(function(Oe){Ce.insertBeforeBegin(Oe)},[Ce]),insertAfterBegin:(0,x.useCallback)(function(Oe){Ce.insertAfterBegin(Oe)},[Ce]),insertBeforeEnd:(0,x.useCallback)(function(Oe){Ce.insertBeforeEnd(Oe)},[Ce]),insertAfterEnd:(0,x.useCallback)(function(Oe){Ce.insertAfterEnd(Oe)},[Ce])}}},98146:function(ke,te,e){"use strict";e.d(te,{e:function(){return f}});var N=e(80844),l=e(84577),$=e(67294),c=e(26386),A=function(){return null},f=function(){var o=(0,l.ng)(),W=o.designable,v=(0,N.useFieldSchema)(),D=(0,$.useMemo)(function(){return v["x-designer"]||v["x-toolbar"]?v["x-designer"]||v["x-toolbar"]:v["x-settings"]?c.Mf:A},[v]),h=(0,l.Co)(D);return W&&h||A}},9780:function(ke,te,e){"use strict";e.d(te,{w:function(){return L}});var N=e(97857),l=e.n(N),$=e(13769),c=e.n($),A=["useProps"],f=function(){return{}},L=function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=W.useProps,D=v===void 0?f:v,h=c()(W,A),I=D;typeof D!="function"&&(I=f);var t=I();return l()(l()({},h),t)}},40868:function(ke,te,e){"use strict";e.d(te,{aUM:function(){return P.aU},olz:function(){return P.ol},N0i:function(){return P.N0},fWn:function(){return P.fW},EIK:function(){return P.EI},$Lt:function(){return P.$L},$b8:function(){return P.$b},HTy:function(){return ya},lkv:function(){return wr},rDu:function(){return Ja},eYL:function(){return P.eY},Rat:function(){return Hr},oAt:function(){return Sr},E7E:function(){return br},$SD:function(){return mi},fUi:function(){return $r.fU},QcG:function(){return Hl},MLy:function(){return Co.M},gOu:function(){return _s},jYG:function(){return Na.j},C1I:function(){return P.C1},Ssf:function(){return Jl},vTp:function(){return Xl},XZJ:function(){return Yr},Tt2:function(){return ns},zH8:function(){return ls},Q5L:function(){return cs},Pok:function(){return vi},Vm0:function(){return ps},xI_:function(){return rs},Lip:function(){return os},Mtg:function(){return Xr.Mt},iNu:function(){return Xr.iN},zzt:function(){return jt.zz},_bl:function(){return C._b},POi:function(){return fs},AOY:function(){return ve},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 dl},$w$:function(){return q.$w},nBj:function(){return q.nB},Oct:function(){return q.Oc},zdw:function(){return q.zd},CXR:function(){return ul},BQs:function(){return yr.BQ},Hj5:function(){return Rn.H},M0b:function(){return pi},wn$:function(){return xn.wn},GzZ:function(){return xn.Gz},tJZ:function(){return xn.tJ},fox:function(){return xn.fo},VTd:function(){return xn.VT},XsZ:function(){return xn.Xs},AsW:function(){return Ho},cLM:function(){return Wo},m__:function(){return Oo},l09:function(){return ne},D_t:function(){return Qi.D},WiK:function(){return Vn},xJW:function(){return q.xJ},RVL:function(){return C.RV},Bc8:function(){return Et},hG9:function(){return hi},DCh:function(){return fi},rjZ:function(){return qr.rj},Cqo:function(){return $a},jg7:function(){return qr.jg},gsn:function(){return yr.gs},$18:function(){return Is},IIB:function(){return yr.II},RnZ:function(){return qi},mX2:function(){return yr.mX},zDC:function(){return cr.zD},Phs:function(){return yr.Ph},aVo:function(){return Va},UGj:function(){return nl},yq5:function(){return ol},v2r:function(){return sa},HIW:function(){return Du},T3C:function(){return or},d97:function(){return da.d9},hGv:function(){return mr},tlE:function(){return Qs},rop:function(){return Xs},gGi:function(){return qs},DBW:function(){return va.D},MBS:function(){return eu.M},pGO:function(){return nu},Y8K:function(){return Pi},iVT:function(){return yr.iV},ODP:function(){return cr.OD},lbb:function(){return cr.lb},b7w:function(){return cr.b7},sUk:function(){return cr.sU},x1j:function(){return P.x1},m1v:function(){return C.m1},glM:function(){return Vt},xZD:function(){return P.xZ},IuH:function(){return xn.Iu},MkN:function(){return P.Mk},Hof:function(){return ru},n6:function(){return C.n6},DDd:function(){return hv.D},G0E:function(){return C.G0},a$w:function(){return C.a$},TzZ:function(){return C.Tz},y00:function(){return P.y0},PhF:function(){return Ct},Cqv:function(){return y.ShowFormData},cof:function(){return P.co},bts:function(){return y.Sortable},Fop:function(){return y.SortableContext},TRI:function(){return y.SortableItem},ORg:function(){return y.SortableProvider},TaI:function(){return au},qHe:function(){return kn.q},iA_:function(){return Lr},gvM:function(){return fu},SnY:function(){return ml},ASv:function(){return gu},bwk:function(){return Zr},mQc:function(){return Si},c__:function(){return ka.c},QZ3:function(){return At},L39:function(){return Na.L},jII:function(){return vl},mPs:function(){return yu},tgM:function(){return Eu},gqx:function(){return $r.gq},Qm7:function(){return $r.Qm},_wD:function(){return Pa._w},rjl:function(){return Pa.rj},Fjw:function(){return P.Fj},SLL:function(){return P.SL},sBv:function(){return P.sB},iTm:function(){return q.iT},Pls:function(){return jt.Pl},Oxq:function(){return wt},WLi:function(){return Ge},$9M:function(){return q.$9},nCn:function(){return za},iNG:function(){return _a},tD8:function(){return Ci},pg9:function(){return Zn},Ofb:function(){return q.Of},ibf:function(){return Xn},WyG:function(){return k},l6$:function(){return Fe.l6},WGR:function(){return Dn},C$H:function(){return cr.C$},cNQ:function(){return cr.cN},I9l:function(){return y.getRenderContent},XQ2:function(){return zr.XQ},ZZb:function(){return q.ZZ},elO:function(){return cr.el},CfU:function(){return Tr},SJF:function(){return gr},_Ko:function(){return Nr},Mev:function(){return ma},i2K:function(){return qn},WmO:function(){return xn.Wm},oBi:function(){return jt.oB},hKP:function(){return zr.hK},DU1:function(){return P.DU},XCj:function(){return P.XC},Vpg:function(){return hr},lIL:function(){return jt.lI},KxP:function(){return Co.K},hi9:function(){return jt.hi},p27:function(){return P.p2},z9d:function(){return cl.z},eJW:function(){return jt.eJ},Cor:function(){return jt.Co},aZq:function(){return jt.aZ},P1D:function(){return Xr.P1},ngQ:function(){return jt.ng},ett:function(){return jt.et},ySm:function(){return Rn.y},Zd$:function(){return q.Zd},cLh:function(){return jt.cL},baz:function(){return q.b},fde:function(){return jt.fd},Xdt:function(){return cr.Xd},Cld:function(){return jt.Cl},vH8:function(){return jt.vH},PLH:function(){return xn.PL},V8t:function(){return xn.V8},tMk:function(){return xn.tM},xQm:function(){return xn.xQ},sRe:function(){return jt.sR},frb:function(){return Ro},$N2:function(){return Uo},U1u:function(){return qe},HS$:function(){return P.HS},vBu:function(){return P.vB},QYZ:function(){return P.QY},t9d:function(){return P.t9},Kgy:function(){return xn.Kg},aJ2:function(){return xn.aJ},n14:function(){return qr.n1},DiB:function(){return qr.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 cr.Il},zCB:function(){return P.zC},a4r:function(){return va.a},wNf:function(){return jt.wN},Dmu:function(){return jt.Dm},Bsl:function(){return C.Bs},yKv:function(){return Js.y},fMB:function(){return jt.fM},gCg:function(){return ka.g},eT6:function(){return q.eT},q4O:function(){return q.q4},ymE:function(){return Pa.ym},uqQ:function(){return P.uq},K5K:function(){return P.K5}});var N={};e.r(N),e.d(N,{Action:function(){return P.aU},ActionBar:function(){return P.ol},ActionBarProvider:function(){return P.N0},ActionContext:function(){return P.fW},ActionContextProvider:function(){return P.EI},ActionDesigner:function(){return P.$L},AfterSuccess:function(){return P.$b},AntdSchemaComponentPlugin:function(){return ya},AntdSchemaComponentProvider:function(){return wr},AppendsTreeSelect:function(){return Ja},AssignedFieldValues:function(){return P.eY},AssociationField:function(){return Hr},AssociationFieldMode:function(){return Sr},AssociationFieldModeProvider:function(){return br},AssociationSelect:function(){return mi},AttachmentList:function(){return $r.fU},AutoComplete:function(){return Hl},BackButtonUsedInSubPage:function(){return Co.M},Block:function(){return _s},BlockItem:function(){return Na.j},ButtonEditor:function(){return P.C1},CardItem:function(){return Jl},Cascader:function(){return Xl},Checkbox:function(){return Yr},CollectionSelect:function(){return ns},ColorPicker:function(){return ls},ColorSelect:function(){return cs},Cron:function(){return vi},CronSet:function(){return ps},DataSourceCollectionCascader:function(){return rs},DataSourceSelect:function(){return os},DatePicker:function(){return Xr.Mt},DatePickerProvider:function(){return Xr.iN},Details:function(){return fs},DetailsDesigner:function(){return ve},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 dl},EditTitle:function(){return q.$w},EditTitleField:function(){return q.nB},EditTooltip:function(){return q.Oc},EditValidationRules:function(){return q.zd},Editable:function(){return ul},EllipsisWithTooltip:function(){return yr.BQ},ErrorFallback:function(){return Rn.H},Expand:function(){return pi},Filter:function(){return xn.wn},FilterAction:function(){return xn.Gz},FilterActionContext:function(){return xn.tJ},FilterContext:function(){return xn.fo},FilterDynamicComponent:function(){return xn.VT},FilterLogicContext:function(){return xn.Xs},FixedBlock:function(){return Ho},FixedBlockDesignerItem:function(){return Wo},FixedBlockWrapper:function(){return Oo},Form:function(){return ne},FormDialog:function(){return Qi.D},FormField:function(){return Vn},FormItem:function(){return q.xJ},FormV2:function(){return Et},G2Plot:function(){return hi},G2PlotRenderer:function(){return fi},Grid:function(){return qr.rj},GridCard:function(){return $a},GridRowContext:function(){return qr.jg},HTMLEncode:function(){return yr.gs},IconPicker:function(){return Is},Input:function(){return yr.II},InputNumber:function(){return qi},InputReadPretty:function(){return yr.mX},InputRecordPicker:function(){return cr.zD},Json:function(){return yr.Ph},List:function(){return Va},Markdown:function(){return nl},MarkdownReadPretty:function(){return ol},Menu:function(){return sa},NanoIDInput:function(){return Du},Page:function(){return or},PagePopups:function(){return da.d9},PageTabs:function(){return mr},Pagination:function(){return Qs},Password:function(){return Xs},Percent:function(){return qs},PopupSettingsProvider:function(){return va.D},Preview:function(){return eu.M},QuickEdit:function(){return nu},Radio:function(){return Pi},ReadPretty:function(){return yr.iV},ReadPrettyRecordPicker:function(){return cr.OD},RecordPicker:function(){return cr.lb},RecordPickerContext:function(){return cr.b7},RecordPickerProvider:function(){return cr.sU},RefreshDataBlockRequest:function(){return P.x1},RemoteSelect:function(){return Vt},RemoveButton:function(){return P.xZ},RemoveConditionContext:function(){return xn.Iu},RequestSettings:function(){return P.Mk},RichText:function(){return ru},SecondConFirm:function(){return P.y0},Select:function(){return Ct},SkipValidation:function(){return P.co},Space:function(){return au},StablePopover:function(){return kn.q},Table:function(){return Lr},TableBlockDesigner:function(){return fu},TableField:function(){return ml},TableSelectorDesigner:function(){return gu},TableV2:function(){return Zr},Tabs:function(){return Si},TabsContextProvider:function(){return ka.c},Templates:function(){return At},TestDesigner:function(){return Na.L},TimePicker:function(){return vl},TreeSelect:function(){return yu},UnixTimestamp:function(){return Eu},Upload:function(){return $r.gq},Uploader:function(){return $r.Qm},Variable:function(){return Pa._w},VariableScopeProvider:function(){return Pa.rj},WorkflowConfig:function(){return P.Fj},actionSettings:function(){return P.SL},actionSettingsItems:function(){return P.sB},allowAddNew:function(){return q.iT},defaultFieldNames:function(){return wt},fetchTemplateData:function(){return Ge},filterFormItemSettings:function(){return q.$9},findByUid:function(){return za},findKeysByUid:function(){return _a},findMenuItem:function(){return Ci},formDetailsSettings:function(){return Zn},formItemSettings:function(){return q.Of},formSettings:function(){return Xn},formV1Settings:function(){return k},genStyleHook:function(){return Fe.l6},getCurrentOptions:function(){return Dn},getDatePickerLabels:function(){return cr.C$},getLabelFormatValue:function(){return cr.cN},getStoredPopupContext:function(){return zr.XQ},isFileCollection:function(){return q.ZZ},isShowFilePicker:function(){return cr.el},isTabPage:function(){return Tr},navigateToTab:function(){return gr},pageSettings:function(){return Nr},pageTabSettings:function(){return ma},readPrettyFormSettings:function(){return qn},removeNullCondition:function(){return xn.Wm},storePopupContext:function(){return zr.hK},useActionBarContext:function(){return P.DU},useActionContext:function(){return P.XC},useAssociationFieldModeContext:function(){return hr},useBackButton:function(){return Co.K},useCloseAction:function(){return P.p2},useColumnSchema:function(){return cl.z},useDatePickerContext:function(){return Xr.P1},useDownloadLogs:function(){return Rn.y},useEnsureOperatorsValid:function(){return q.Zd},useFieldMode:function(){return q.b},useFieldNames:function(){return cr.Xd},useFilterActionProps:function(){return xn.PL},useFilterFieldOptions:function(){return xn.V8},useFilterFieldProps:function(){return xn.tM},useFilterOptions:function(){return xn.xQ},useFixedBlock:function(){return Ro},useFixedSchema:function(){return Uo},useFormDataTemplates:function(){return qe},useGetAriaLabelOfAction:function(){return P.HS},useGetAriaLabelOfDrawer:function(){return P.vB},useGetAriaLabelOfModal:function(){return P.QY},useGetAriaLabelOfPopover:function(){return P.t9},useGetFilterFieldOptions:function(){return xn.Kg},useGetFilterOptions:function(){return xn.aJ},useGridContext:function(){return qr.n1},useGridRowContext:function(){return qr.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 cr.Il},useLinkageAction:function(){return P.zC},usePopupSettings:function(){return va.a},useStyles:function(){return Js.y},useTabsContext:function(){return ka.g},useTitleFieldOptions:function(){return q.eT},useValidateSchema:function(){return q.q4},useVariableScope:function(){return Pa.ym},useZIndexContext:function(){return P.uq},zIndexContext:function(){return P.K5}});var l=e(15009),$=e.n(l),c=e(99289),A=e.n(c),f=e(12444),L=e.n(f),o=e(72004),W=e.n(o),v=e(31996),D=e.n(v),h=e(26037),I=e.n(h),t=e(97857),r=e.n(t),u=e(67294),B=e(31601),y=e(14896),C=e(70993),O=e(89127),K=function(T){return A()($()().mark(function oe(){var le,me;return $()().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return Ae.prev=0,Ae.next=3,this.api.request(T);case 3:return me=Ae.sent,Ae.abrupt("return",me==null||(le=me.data)===null||le===void 0?void 0:le.data);case 7:return Ae.prev=7,Ae.t0=Ae.catch(0),Ae.abrupt("return",[]);case 10:case"end":return Ae.stop()}},oe,this,[[0,7]])}))},P=e(76157),M=e(13769),p=e.n(M),S=e(57134),x=e(86201),i=e(80844),w=e(28459),E=e(57953),g=e(12174),m=e(6145),a=e(26386),d=e(64016),F=e(15195),R=e(23461),n=e(85893),b=["form","children"],z=["form","children","disabled"],V=["request","effects","initialValue","useValues"],G=function(T){var oe=T.form,le=T.children,me=p()(T,b),Pe=(0,i.useField)(),Ae=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(oe.createVoidField(r()(r()({},Pe.props),{},{basePath:""})));return(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},me),{},{children:(0,n.jsx)(i.RecursionField,{basePath:Ve.address,schema:Ae,onlyRenderProperties:!0})}))})})},Y=function(T){return T.children},U=function(T){var oe=T.form,le=T.children,me=T.disabled,Pe=p()(T,z),Ae=(0,i.useField)(),Ve=(0,i.useFieldSchema)(),ze=(0,jt.lI)(oe.createVoidField(r()(r()({},Ae.props),{},{basePath:""}))),we=(0,jt.Co)(Ve["x-component"],Y);return(0,u.useEffect)(function(){oe.disabled=me||Ae.disabled},[me,Ae.disabled]),(0,n.jsx)(w.ZP,{componentDisabled:me,children:(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},Pe),{},{children:(0,n.jsx)(i.FieldContext.Provider,{value:ze,children:(0,n.jsx)(we,r()(r()({},Ae.componentProps),{},{children:(0,n.jsx)(i.RecursionField,{basePath:ze.address,schema:Ve,onlyRenderProperties:!0})}))})}))})})})},H=function(T){var oe=T.request,le=T.initialValue;return oe||function(){return Promise.resolve({data:le})}},Z=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,g.QT)(H(oe),T)},re=(0,u.createContext)(null);re.displayName="FormBlockContext";var ne=(0,i.observer)(function(Q){var T=Q.request,oe=Q.effects,le=Q.initialValue,me=Q.useValues,Pe=me===void 0?Z:me,Ae=p()(Q,V),Ve=(0,i.useFieldSchema)(),ze=(0,i.useField)(),we=(0,u.useMemo)(function(){return(0,x.createForm)({effects:oe})},[]),tt=Pe({uid:Ve["x-uid"],onSuccess:function(rt){return A()($()().mark(function ht(){return $()().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,we.reset();case 2:we.setValues(rt==null?void 0:rt.data),we.setInitialValues(rt==null?void 0:rt.data);case 4:case"end":return gt.stop()}},ht)}))()}},Q),et=(0,u.useContext)(re);return(0,n.jsx)(re.Provider,{value:{parent:et,form:we,result:tt,field:ze,fieldSchema:Ve},children:(0,n.jsx)(E.Z,{spinning:(tt==null?void 0:tt.loading)||!1,children:Ve["x-decorator"]==="Form"?(0,n.jsx)(U,r()({form:we},Ae)):(0,n.jsx)(G,r()({form:we},Ae))})})},{displayName:"Form"});ne.Designer=function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=T.title,me=(0,F.zy)(),Pe=(0,R.rE)(),Ae=Pe.componentNamePrefix;return(0,n.jsxs)(a.aN,{template:me,title:le||oe,children:[(0,n.jsx)(d.G,{componentName:"".concat(Ae,"Form"),collectionName:oe}),(0,n.jsx)(a.Z5,{}),(0,n.jsx)(a.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var J=e(5537),k=new J.F5({name:"FormV1Settings",items:[{name:"template",Component:d.G,useComponentProps:function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=(0,R.rE)(),me=le.componentNamePrefix;return{componentName:"".concat(me,"Form"),collectionName:oe}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),q=e(54801),Se=function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=T.title,me=(0,F.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"FormSettings",template:me,title:le||oe})},ee=function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=T.title,me=(0,F.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"ReadPrettyFormSettings",template:me,title:le||oe})},ve=function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=T.title,me=(0,F.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"FormDetailsSettings",template:me,title:le||oe})},be=function(){var T=(0,m.useCollection_deprecated)(),oe=T.name,le=T.title,me=(0,F.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"blockSettings:filterForm",template:me,title:le||oe})},Re=e(7340),Ce=e(15503),Oe=e(68230),De=e(68400),ue=e.n(De),ie=e(97133),ge=e(84327),se=e(9361),fe=e(31019),xe=e(22229),ye=e(43321),je=e(8281),Be=e(9780),Ie=e(18686),pe=e(94804),he=e(5574),ce=e.n(he),X=e(68433),j=e(42075),de=e(34041),_e=e(96486),ae=e.n(_e),Ee=e(26793),Te=e(32268),Fe=e(60094),$e=e(9783),Ke=e.n($e),yt=e(52677),Je=e.n(yt),st=e(50888),Ue=e(66309),St=e(96074),Xt=e(27484),hn=e.n(Xt),Zt=e(87714),jt=e(84577),ln=e(4340),xt=e(97937),Kt=e(32983),Lt=e(58812),qt=e(96695),Rt=e.n(qt),$t=e(19632),Tt=e.n($t),wt={label:"label",value:"value",color:"color",options:"children"};function an(Q,T){var oe=[];if(!Array.isArray(Q))return oe;for(var le=0;le<Q.length;le++){var me=Q[le][T.options];Array.isArray(me)&&oe.push.apply(oe,Tt()(an(me,T))),oe.push(r()({},Q[le]))}return oe}function Dn(Q,T,oe){var le=an(T,oe),me=(0,_e.castArray)(Q).map(function(Ae){return(0,X.isPlainObject)(Ae)?Ae[oe.value]:Ae});function Pe(Ae){if(!Ae)return[];var Ve=[],ze=Rt()(me),we;try{var tt=function(){var bt=we.value,rt=Ae.find(function(ht){return ht[oe.value]==bt})||{value:bt,label:bt&&bt.toString()};Ve.push(rt)};for(ze.s();!(we=ze.n()).done;)tt()}catch(et){ze.e(et)}finally{ze.f()}return Ve}return Pe(le)}var Wn=e(67668),Nn=(0,i.observer)(function(Q){var T,oe=r()(r()({},wt),Q.fieldNames),le=(0,i.useField)(),me=(0,Wn.Hy)(),Pe=le.dataSource||Q.options||(me==null?void 0:me.uiSchema.enum)||[],Ae=Dn(le.value,Pe,oe);return!(0,ge.isValid)(Q.value)&&!Ae.length?(0,n.jsx)("div",{}):(0,x.isArrayField)(le)&&(le==null||(T=le.value)===null||T===void 0?void 0:T.length)===0?(0,n.jsx)("div",{}):(0,n.jsx)("div",{children:(0,n.jsx)(Lt.B,{ellipsis:Q.ellipsis,children:Ae.map(function(Ve,ze){return(0,n.jsx)(Ue.Z,{color:Ve[oe.color],icon:Ve.icon,children:Ve[oe.label]},ze)})})})},{displayName:"ReadPretty"}),oo=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],Yn=["objectValue","loading","value","rawOptions","defaultValue"],$n=function(T){return!(0,ge.isValid)(T)||Je()(T)==="object"&&Object.keys(T).length===0},Gn=function(T){var oe=T.value,le=T.options,me=T.onChange,Pe=T.fieldNames,Ae=T.mode,Ve=T.loading,ze=T.rawOptions,we=T.defaultValue,tt=p()(T,oo),et=function(rt){var ht;if(!$n(rt)){var ft=(0,ge.toArr)(rt).filter(function(Ft){return Ft}).map(function(Ft){return(0,X.isPlainObject)(Ft)?Ft[Pe.value]:Ft}),gt=(ht=Dn(ft,le,Pe))===null||ht===void 0?void 0:ht.map(function(Ft){return{label:Ft[Pe.label],value:Ft[Pe.value]}});return["tags","multiple"].includes(Ae)||T.multiple?gt:gt.shift()}};return(0,n.jsx)(de.default,r()({role:"button","data-testid":"select-object-".concat(Ae||"single"),value:et(oe),defaultValue:et(we),allowClear:{clearIcon:(0,n.jsx)(ln.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Ve?(0,n.jsx)(E.Z,{}):(0,n.jsx)(Kt.Z,{image:Kt.Z.PRESENTED_IMAGE_SIMPLE}),options:le,fieldNames:Pe,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(rt,ht){var ft;return((ft=ht==null?void 0:ht[Pe.label||"label"])!==null&&ft!==void 0?ft:"").includes(rt)},filterSort:function(rt,ht){var ft,gt;return((ft=rt==null?void 0:rt[Pe.label||"label"])!==null&&ft!==void 0?ft:"").toLowerCase().localeCompare(((gt=ht==null?void 0:ht[Pe.label||"label"])!==null&>!==void 0?gt:"").toLowerCase())},onChange:function(rt){var ht=Dn((0,ge.toArr)(rt).map(function(ft){return ft.value}),ze||le,Pe);["tags","multiple"].includes(Ae)||T.multiple?me==null||me(ht):me==null||me(ht.shift()||null)},mode:Ae,tagRender:function(rt){return(0,n.jsx)(Ue.Z,r()(r()({role:"button","aria-label":rt.label,closeIcon:(0,n.jsx)(xt.Z,{role:"button","aria-label":"icon-close-tag"})},rt),{},{children:rt.label}))}},tt))},fn=function(T,oe){var le;return((le=oe==null?void 0:oe.label)!==null&&le!==void 0?le:"").toLowerCase().includes((T||"").toLowerCase())},Ot=(0,i.connect)(function(Q){var T=Q.objectValue,oe=Q.loading,le=Q.value,me=Q.rawOptions,Pe=Q.defaultValue,Ae=p()(Q,Yn),Ve=Q.multiple?"multiple":Q.mode;if(Ve&&!["multiple","tags"].includes(Ve)&&(Ve=void 0),T)return(0,n.jsx)(Gn,r()(r()({rawOptions:me},Ae),{},{defaultValue:Pe,value:le,mode:Ve,loading:oe}));var ze=function(tt){return["tags","multiple"].includes(Q.mode)||Q.multiple?tt?(0,ge.toArr)(tt):void 0:tt};return(0,n.jsx)(de.default,r()(r()({role:"button","data-testid":"select-".concat(Ve||"single"),showSearch:!0,filterOption:fn,allowClear:{clearIcon:(0,n.jsx)(ln.Z,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:oe?(0,n.jsx)(E.Z,{}):(0,n.jsx)(Kt.Z,{image:Kt.Z.PRESENTED_IMAGE_SIMPLE}),value:ze(le),defaultValue:ze(Pe),tagRender:function(tt){return(0,n.jsx)(Ue.Z,r()(r()({role:"button","aria-label":tt.label,closeIcon:(0,n.jsx)(xt.Z,{role:"button","aria-label":"icon-close-tag"})},tt),{},{children:tt.label}))}},Ae),{},{onChange:function(tt){var et;(et=Q.onChange)===null||et===void 0||et.call(Q,tt===void 0?null:tt)},mode:Ve}))},(0,i.mapProps)({dataSource:"options"},function(Q,T){return r()(r()({},Q),{},{fieldNames:r()(r()({},wt),Q.fieldNames),suffixIcon:T!=null&&T.loading||T!=null&&T.validating?(0,n.jsx)(st.Z,{}):Q.suffixIcon})}),(0,i.mapReadPretty)(Nn)),Ct=Ot;Ct.ReadPretty=Nn;var Pt=Ct,Nt=e(36586),kt=function(T,oe){return(0,_e.castArray)(T).filter(function(le){return le!=null}).map(function(le){return Je()(le)==="object"?le[oe.value]:le})},Qt=(0,i.observer)(function(Q){var T=r()(r()({},wt),Q.fieldNames),oe=(0,i.useField)(),le=(0,i.useFieldSchema)(),me=(0,Nt.a)(),Pe=(0,P.XC)(),Ae=Pe.snapshot,Ve=(0,g.QT)(Ae?A()($()().mark(function we(){return $()().wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return et.abrupt("return",{data:me[le.name]});case 1:case"end":return et.stop()}},we)})):r()(r()({action:"list"},Q.service),{},{params:{paginate:!1,filter:Ke()({},T.value,{$in:kt(oe.value,T)})}}),{refreshDeps:[Q.service,oe.value]}),ze=Ve.data;return(0,n.jsx)(Ct.ReadPretty,r()(r()({},Q),{},{options:ze==null?void 0:ze.data}))},{displayName:"ReadPretty"}),zt=e(8341),yn=e(44990),mn=["fieldNames","service","wait","value","defaultValue","objectValue","manual","mapOptions","targetField","CustomDropdownRender","optionFilter","dataSource"],nn="N/A",bn=(0,i.connect)(function(Q){var T,oe,le=Q.fieldNames,me=le===void 0?{}:le,Pe=Q.service,Ae=Pe===void 0?{}:Pe,Ve=Q.wait,ze=Ve===void 0?300:Ve,we=Q.value,tt=Q.defaultValue,et=Q.objectValue,bt=Q.manual,rt=bt===void 0?!0:bt,ht=Q.mapOptions,ft=Q.targetField,gt=Q.CustomDropdownRender,Ft=Q.optionFilter,Wt=Q.dataSource,vn=p()(Q,mn),Yt=(0,yn.FC)(),zn=(0,zt.FE)(Wt||Yt),jn=(0,u.useState)(!1),en=ce()(jn,2),tn=en[0],Ln=en[1],In=(0,u.useRef)(!1),Tn=(0,i.useFieldSchema)(),Mn=((T=Tn["x-component-props"])===null||T===void 0?void 0:T.addMode)==="quickAdd",An=(0,m.useCollection_deprecated)(),En=An.getField,So=(0,u.useRef)(null),bo=(0,m.useCollectionManager_deprecated)(),Do=bo.getCollectionJoinField,ro=bo.getInterface,so=Tn["x-collection-field"]||Tn.name,Un=En(so)||Do(so),Bn=ft||(Un==null?void 0:Un.target)&&(me==null?void 0:me.label)&&Do("".concat(Un.target,".").concat(me.label)),Qn=(0,u.useMemo)(function(){if(Bn!=null&&Bn.interface){var er,Zo=((er=ro(Bn.interface))===null||er===void 0||(er=er.filterable)===null||er===void 0?void 0:er.operators[0].value)||"$includes";return Zo!=="$eq"?Zo:"$includes"}return"$includes"},[Bn]),vo=(0,jt.eJ)(),wn=(0,u.useCallback)(function(er){try{return er.filter(function(Zo){return["number","string"].includes(Je()(Zo[me.value]))}).map(function(Zo){var Cr,Pr,rr=vo(Zo[me.label]);if(Bn!=null&&(Cr=Bn.uiSchema)!==null&&Cr!==void 0&&Cr.enum)if(Array.isArray(rr))rr=rr.map(function(Dr,Jr){var Kr=Bn.uiSchema.enum.find(function(wa){return wa.value===Dr});return Kr?(0,n.jsx)(Ue.Z,{role:"button",color:Kr.color,style:{marginRight:3},children:(Kr==null?void 0:Kr.label)||Dr},Jr):(0,n.jsx)(Ue.Z,{role:"button",children:Dr},Dr)}).reverse();else{var vr=Bn.uiSchema.enum.find(function(Dr){return Dr.value===rr});vr&&(rr=(0,n.jsx)(Ue.Z,{role:"button",color:vr.color,children:vr.label}))}if((Bn==null?void 0:Bn.type)==="date"&&(rr=hn()(rr).format("YYYY-MM-DD")),ht){var Ur;return ht((Ur={},Ke()(Ur,me.label,rr||nn),Ke()(Ur,me.value,Zo[me.value]),Ur))}return r()(r()({},Zo),{},(Pr={},Ke()(Pr,me.label,rr||nn),Ke()(Pr,me.value,Zo[me.value]),Pr))}).filter(Boolean)}catch(Zo){return console.error(Zo),er}},[Bn==null?void 0:Bn.uiSchema,me]),no=(0,g.QT)(r()(r()({action:"list"},Ae),{},{headers:zn,params:r()(r()({pageSize:200},Ae==null?void 0:Ae.params),{},{filter:Ae==null||(oe=Ae.params)===null||oe===void 0?void 0:oe.filter})}),{manual:rt,debounceWait:ze}),co=no.data,po=no.run,Io=no.loading,No=(0,u.useMemo)(function(){return JSON.stringify({service:Ae,fieldNames:me})},[Ae,me]),Mo=(0,u.useCallback)(function(){return So.current&>?(0,n.jsx)(gt,{search:So.current,callBack:function(){So.current=null,Ln(!1)}}):null},[So.current]);(0,u.useEffect)(function(){In.current&&po()},[No]);var $o=function(){var er=A()($()().mark(function Zo(Cr){var Pr;return $()().wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:po({filter:(0,Zt.EO)([Cr?Ke()({},me.label,Ke()({},Qn,Cr)):{},Ae==null||(Pr=Ae.params)===null||Pr===void 0?void 0:Pr.filter])}),So.current=Cr;case 2:case"end":return vr.stop()}},Zo)}));return function(Cr){return er.apply(this,arguments)}}(),pr=(0,u.useMemo)(function(){var er,Zo=we||tt;if(!(co!=null&&(er=co.data)!==null&&er!==void 0&&er.length))return Zo!=null?Array.isArray(Zo)?Zo:[Zo]:[];var Cr=Zo!=null&&(Array.isArray(Zo)?Zo:[r()(r()({},Zo),{},Ke()({},me.value,Zo[me.value]||Zo))])||[],Pr=typeof Ft=="function"?co.data.filter(Ft):co.data;return(0,_e.uniqBy)(Pr.concat(Cr!=null?Cr:[]),me.value)},[we,tt,co==null?void 0:co.data,me.value,Ft]),sr=function(Zo){Ln(Zo),So.current=null,Zo&&po(),In.current=!0};return(0,n.jsx)(Ct,r()(r()({open:tn,popupMatchSelectWidth:!1,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:me,onSearch:$o,onDropdownVisibleChange:sr,objectValue:et,value:we,defaultValue:tt},vn),{},{loading:co?Io:!0,options:wn(pr),rawOptions:pr,dropdownRender:function(Zo){var Cr=pr.some(function(Pr){return Pr[me.label]===So.current});return(0,n.jsx)(n.Fragment,{children:Mn?(0,n.jsxs)(n.Fragment,{children:[!((co==null?void 0:co.data.length)===0&&So!==null&&So!==void 0&&So.current)&&Zo,(co==null?void 0:co.data.length)>0&&(So==null?void 0:So.current)&&!Cr&&(0,n.jsx)(St.Z,{style:{margin:0}}),!Cr&&(0,n.jsx)(Mo,{})]}):Zo})}}))},(0,i.mapProps)({dataSource:"options"},function(Q,T){var oe,le=(0,i.useFieldSchema)();return r()(r()({},Q),{},{fieldNames:r()(r()(r()(r()({},wt),Q.fieldNames),T.componentProps.fieldNames),(oe=le["x-component-props"])===null||oe===void 0?void 0:oe.fieldNames),suffixIcon:T!=null&&T.loading||T!=null&&T.validating?(0,n.jsx)(st.Z,{}):Q.suffixIcon})}),(0,i.mapReadPretty)(Qt)),Vt=bn;Vt.ReadPretty=Qt;var dt=null,qe=function(){var T=(0,i.useFieldSchema)(),oe=(0,Ee.$)(),le=oe.t,me=(0,Re.bz)(),Pe=me.duplicateData,Ae=(0,m.useCollectionManager_deprecated)(),Ve=Ae.getCollectionJoinField;if(Pe)return Pe;var ze=Bt(T),we=ze.items,tt=we===void 0?[]:we,et=ze.display,bt=et===void 0?!0:et;tt.forEach(function(ft){try{var gt;ft.fields=(gt=ft.fields)===null||gt===void 0?void 0:gt.map(function(Ft){var Wt=Ve("".concat(ft.collection,".").concat(Ft));return Wt?Ft:""}).filter(Boolean)}catch(Ft){(0,X.error)(Ft),ft.fields=[]}});var rt=[{key:"none",title:le("None")}].concat(tt.map(function(ft,gt){return r()(r()({key:gt},ft),{},{isLeaf:ft.dataId!==null&&ft.dataId!==void 0,titleCollectionField:(ft==null?void 0:ft.titleField)&&Ve("".concat(ft.collection,".").concat(ft.titleField))})})),ht=tt.find(function(ft){return ft.default});return{templates:rt,display:bt,defaultTemplate:ht,enabled:tt.length>0&&tt.every(function(ft){return ft.dataId||ft.dataScope})}},At=function(T){var oe=T.style,le=oe===void 0?{}:oe,me=T.form,Pe=(0,Fe.dQ)(),Ae=Pe.token,Ve=qe(),ze=Ve.templates,we=Ve.display,tt=Ve.enabled,et=Ve.defaultTemplate,bt=(0,m.useCollectionManager_deprecated)(),rt=bt.getCollectionJoinField,ht=(0,Te.ss)(ze),ft=(0,u.useState)((et==null?void 0:et.key)||"none"),gt=ce()(ft,2),Ft=gt[0],Wt=gt[1],vn=(0,u.useState)(null),Yt=ce()(vn,2),zn=Yt[0],jn=Yt[1],en=(0,g.LY)(),tn=(0,Ee.$)(),Ln=tn.t;(0,u.useEffect)(function(){tt&&et&&me&&(me.__template=!0,et.key==="duplicate"&&An(et.dataId,et))},[]),(0,u.useEffect)(function(){ht!=null&&ht.some(function(So){return So.key===Ft})||Mn("none")},[ht]);var In=(0,u.useMemo)(function(){return r()({display:"flex",alignItems:"center",backgroundColor:Ae.colorFillAlter,padding:Ae.padding},le)},[le,Ae.colorFillAlter]),Tn=(0,u.useMemo)(function(){return{fontSize:Ae.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:Ae.marginXS}},[Ae.fontSize,Ae.marginXS]),Mn=(0,u.useCallback)(function(){var So=A()($()().mark(function bo(Do){return $()().wrap(function(so){for(;;)switch(so.prev=so.next){case 0:Wt(Do),jn(null),me==null||me.reset();case 3:case"end":return so.stop()}},bo)}));return function(bo){return So.apply(this,arguments)}}(),[]),An=(0,u.useCallback)(function(){var So=A()($()().mark(function bo(Do,ro){var so;return $()().wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:so=r()(r()({},ro),{},{dataId:Do}),jn(ro),Ge(en,so,Ln).then(function(Qn){return me&&Qn&&(me.reset(),me.__template=!0,(0,X.forEach)(Qn,function(vo,wn){if(vo){var no;me.values[wn]=vo,me==null||(no=me.setInitialValuesIn)===null||no===void 0||no.call(me,wn,vo)}})),Qn}).catch(function(Qn){console.error(Qn)});case 3:case"end":return Bn.stop()}},bo)}));return function(bo,Do){return So.apply(this,arguments)}}(),[]);if(!tt||!we)return null;var En=ht==null?void 0:ht.find(function(So){return So.key===Ft});return(0,n.jsx)("div",{style:In,children:(0,n.jsxs)(j.Z,{wrap:!0,children:[(0,n.jsxs)("label",{style:Tn,children:[Ln("Data template"),": "]}),(0,n.jsx)(de.default,{role:"button","data-testid":"select-form-data-template",popupMatchSelectWidth:!1,options:ht,fieldNames:{label:"title",value:"key"},value:Ft,onChange:Mn}),Ft!=="none"&&En&&(0,n.jsx)(Vt,{style:{width:220},fieldNames:{label:En==null?void 0:En.titleField,value:"id"},target:En==null?void 0:En.collection,value:zn,objectValue:!0,service:{resource:En==null?void 0:En.collection,params:{filter:En==null?void 0:En.dataScope}},onChange:function(bo){return An(bo==null?void 0:bo.id,r()(r()({},bo),En))},targetField:rt("".concat(En==null?void 0:En.collection,".").concat(En.titleField))})]})})};function Bt(Q){var T=(0,Re.Fi)(Q);return T?ae().cloneDeep(T["x-data-templates"])||{}:{}}function Ge(Q,T,oe){return Me.apply(this,arguments)}function Me(){return Me=A()($()().mark(function Q(T,oe,le){return $()().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!(oe.fields.length===0||!oe.dataId)){Pe.next=2;break}return Pe.abrupt("return");case 2:return Pe.abrupt("return",T.resource(oe.collection).get({filterByTk:oe.dataId,fields:oe.fields,isTemplate:!0}).then(function(Ae){var Ve;return(Ve=Ae.data)===null||Ve===void 0?void 0:Ve.data}));case 3:case"end":return Pe.stop()}},Q)})),Me.apply(this,arguments)}var Le=e(3192),Ze=function(){var T,oe,le=(0,Ie.aZ)(),me=(0,i.useFieldSchema)(),Pe=se.Z.useToken(),Ae=Pe.token,Ve=(0,jt.ng)(),ze=Ve.designable,we=(0,Le.g)()||{},tt=we.heightProps,et=tt||{},bt=et.title,rt=qe(),ht=rt.display,ft=rt.enabled,gt=me.reduceProperties(function(An,En){return En["x-component"]==="ActionBar"?En:An}),Ft=Object.keys((gt==null?void 0:gt.properties)||{}).length>0,Wt=me==null||(T=me.parent)===null||T===void 0||(T=T["x-decorator"])===null||T===void 0||(oe=T.includes)===null||oe===void 0?void 0:oe.call(T,"FormBlockProvider"),vn=Ft||ze?Ae.controlHeight+(Wt?1:2)*Ae.marginLG:Ae.marginLG,Yt=bt?Ae.fontSizeLG*Ae.lineHeightLG+Ae.padding*2-1:0,zn=(0,pe.hS)()||{},jn=zn.data,en=(jn==null?void 0:jn.meta)||{},tn=en.count,Ln=en.pageSize,In=tn>Ln,Tn=In?Ae.controlHeightSM+1*Ae.paddingLG:0,Mn=ht&&ft?Ae.controlHeight+2*Ae.padding+Ae.margin:0;return le-vn-Ae.paddingLG-Yt-Tn-Mn},Xe,it,ut=["form","children"],_t=["form","children","disabled"],mt=["form","disabled"],ot=function(T){var oe=T.form,le=T.children,me=p()(T,ut),Pe=(0,i.useField)(),Ae=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(oe.createVoidField(r()(r()({},Pe.props),{},{basePath:""}))),ze=Ze(),we=se.Z.useToken(),tt=we.token,et=(0,jt.ng)(),bt=et.designable;return(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},me),{},{children:(0,n.jsx)("div",{className:(0,ie.css)(Xe||(Xe=ue()([`
|
|
689
689
|
.nb-grid-container {
|
|
690
690
|
height: `,`;
|
|
691
691
|
overflow-y: auto;
|