formifex 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -21439,8 +21439,8 @@ const L6 = /* @__PURE__ */ Ll(U3), Nce = (n, e) => {
21439
21439
  if (!c)
21440
21440
  return Array.isArray(i) ? i.length > 0 : !!i;
21441
21441
  const v = {
21442
- "=": () => Array.isArray(c) ? i.includes(c) : i === c,
21443
- "!=": () => Array.isArray(c) ? !i.includes(c) : i !== c,
21442
+ "=": () => Array.isArray(c) ? c.includes(i) : i === c,
21443
+ "!=": () => Array.isArray(c) ? !c.includes(i) : i !== c,
21444
21444
  ">": () => i > c,
21445
21445
  "<": () => i < c,
21446
21446
  ">=": () => i >= c,
@@ -21778,16 +21778,16 @@ const L6 = /* @__PURE__ */ Ll(U3), Nce = (n, e) => {
21778
21778
  return /* @__PURE__ */ P.jsx(P.Fragment, {});
21779
21779
  }, Rce = (n, e) => {
21780
21780
  const t = n.field.split("."), i = e == null ? void 0 : e.getFieldValue(t), c = n.value, l = n.operator || "=";
21781
- if (!c)
21781
+ if (console.log("fieldValue", i), !c)
21782
21782
  return Array.isArray(i) ? i.length > 0 : !!i;
21783
21783
  const v = {
21784
- "=": () => i === c,
21785
- "!=": () => i !== c,
21784
+ "=": () => Array.isArray(c) ? c.includes(i) : i === c,
21785
+ "!=": () => Array.isArray(c) ? !c.includes(i) : i !== c,
21786
21786
  ">": () => i > c,
21787
21787
  "<": () => i < c,
21788
21788
  ">=": () => i >= c,
21789
21789
  "<=": () => i <= c,
21790
- includes: () => Array.isArray(i) || typeof i == "string" ? i.includes(c) : !1
21790
+ includes: () => Array.isArray(i) ? Array.isArray(c) ? i.some((h) => c.includes(h)) : i.includes(c) : typeof i == "string" ? Array.isArray(c) ? c.some((h) => i.includes(h)) : i.includes(c) : !1
21791
21791
  }[l];
21792
21792
  return v ? v() : !1;
21793
21793
  }, Kr = (n) => {
@@ -21813,14 +21813,14 @@ const L6 = /* @__PURE__ */ Ll(U3), Nce = (n, e) => {
21813
21813
  suppressionRef: n.suppressionRef,
21814
21814
  updateLookupData: n.updateLookupData
21815
21815
  },
21816
- c.id
21816
+ c.key || c.id
21817
21817
  );
21818
21818
  if (c.type === "section")
21819
21819
  return /* @__PURE__ */ P.jsx(Cce, { ...n, ...c });
21820
21820
  if (c.type === "grid")
21821
- return /* @__PURE__ */ P.jsx(JT, { ...n, ...c }, c.id);
21821
+ return /* @__PURE__ */ P.jsx(JT, { ...n, ...c }, c.key || c.id);
21822
21822
  if (c.type === "flex")
21823
- return /* @__PURE__ */ P.jsx(QT, { ...n, ...c }, c.id);
21823
+ return /* @__PURE__ */ P.jsx(QT, { ...n, ...c }, c.key || c.id);
21824
21824
  if (c.type === "divider")
21825
21825
  return /* @__PURE__ */ P.jsx(
21826
21826
  X3,
@@ -21831,7 +21831,7 @@ const L6 = /* @__PURE__ */ Ll(U3), Nce = (n, e) => {
21831
21831
  dashed: c.dashed,
21832
21832
  children: c.label
21833
21833
  },
21834
- c.id
21834
+ c.key || c.id
21835
21835
  );
21836
21836
  if (c.type === "custom" && typeof (c == null ? void 0 : c.render) == "function")
21837
21837
  return c.render(n);
package/dist/index.umd.js CHANGED
@@ -203,7 +203,7 @@ __p += '`),n1&&(ue+=`' +
203
203
  function print() { __p += __j.call(arguments, '') }
204
204
  `:`;
205
205
  `)+ue+`return __p
206
- }`;var qe=ay(function(){return o1(C,ye+"return "+ue).apply(t,P)});if(qe.source=ue,ta(qe))throw qe;return qe}function xoe(r){return u1(r).toLowerCase()}function Coe(r){return u1(r).toUpperCase()}function Moe(r,o,s){if(r=u1(r),r&&(s||o===t))return vz(r);if(!r||!(o=T4(o)))return r;var p=ct(r),O=ct(o),C=hz(p,O),P=mz(p,O)+1;return Gt(p,C,P).join("")}function Roe(r,o,s){if(r=u1(r),r&&(s||o===t))return r.slice(0,gz(r)+1);if(!r||!(o=T4(o)))return r;var p=ct(r),O=mz(p,ct(o))+1;return Gt(p,0,O).join("")}function Toe(r,o,s){if(r=u1(r),r&&(s||o===t))return r.replace(r4,"");if(!r||!(o=T4(o)))return r;var p=ct(r),O=hz(p,ct(o));return Gt(p,O).join("")}function Soe(r,o){var s=j,p=q;if(T1(o)){var O="separator"in o?o.separator:O;s="length"in o?ke(o.length):s,p="omission"in o?T4(o.omission):p}r=u1(r);var C=r.length;if(A2(r)){var P=ct(r);C=P.length}if(s>=C)return r;var W=s-P2(p);if(W<1)return p;var X=P?Gt(P,0,W).join(""):r.slice(0,W);if(O===t)return X+p;if(P&&(W+=X.length-W),na(O)){if(r.slice(W).search(O)){var oe,le=X;for(O.global||(O=w0(O.source,u1(i1.exec(O))+"g")),O.lastIndex=0;oe=O.exec(le);)var ue=oe.index;X=X.slice(0,ue===t?W:ue)}}else if(r.indexOf(T4(O),W)!=W){var we=X.lastIndexOf(O);we>-1&&(X=X.slice(0,we))}return X+p}function Foe(r){return r=u1(r),r&&P1.test(r)?r.replace(vt,o6e):r}var Hoe=Y2(function(r,o,s){return r+(s?" ":"")+o.toUpperCase()}),ia=ib("toUpperCase");function ry(r,o,s){return r=u1(r),o=s?t:o,o===t?n6e(r)?u6e(r):G8e(r):r.match(o)||[]}var ay=Ye(function(r,o){try{return M4(r,t,o)}catch(s){return ta(s)?s:new Le(s)}}),$oe=xt(function(r,o){return j4(o,function(s){s=pt(s),Vt(r,s,J0(r[s],r))}),r});function _oe(r){var o=r==null?0:r.length,s=Re();return r=o?M1(r,function(p){if(typeof p[1]!="function")throw new q4(d);return[s(p[0]),p[1]]}):[],Ye(function(p){for(var O=-1;++O<o;){var C=r[O];if(M4(C[0],this,p))return M4(C[1],this,p)}})}function Ioe(r){return o0e(U4(r,w))}function ca(r){return function(){return r}}function Loe(r,o){return r==null||r!==r?o:r}var Doe=ob(),Boe=ob(!0);function y4(r){return r}function oa(r){return Lz(typeof r=="function"?r:U4(r,w))}function Aoe(r){return Bz(U4(r,w))}function Poe(r,o){return Az(r,U4(o,w))}var koe=Ye(function(r,o){return function(s){return j3(s,r,o)}}),joe=Ye(function(r,o){return function(s){return j3(r,s,o)}});function la(r,o,s){var p=e4(o),O=yr(o,p);s==null&&!(T1(o)&&(O.length||!p.length))&&(s=o,o=r,r=this,O=yr(o,e4(o)));var C=!(T1(s)&&"chain"in s)||!!s.chain,P=Mt(r);return j4(O,function(W){var X=o[W];r[W]=X,P&&(r.prototype[W]=function(){var oe=this.__chain__;if(C||oe){var le=r(this.__wrapped__),ue=le.__actions__=E4(this.__actions__);return ue.push({func:X,args:arguments,thisArg:r}),le.__chain__=oe,le}return X.apply(r,Pt([this.value()],arguments))})}),r}function qoe(){return a4._===this&&(a4._=p6e),this}function sa(){}function Woe(r){return r=ke(r),Ye(function(o){return Pz(o,r)})}var Uoe=A0(M1),Goe=A0(lz),Yoe=A0(d0);function iy(r){return G0(r)?f0(pt(r)):V0e(r)}function Koe(r){return function(o){return r==null?t:u2(r,o)}}var Xoe=sb(),Zoe=sb(!0);function ua(){return[]}function da(){return!1}function Qoe(){return{}}function Joe(){return""}function ele(){return!0}function tle(r,o){if(r=ke(r),r<1||r>A)return[];var s=ne,p=u4(r,ne);o=Re(o),r-=ne;for(var O=m0(p,o);++s<r;)o(s);return O}function nle(r){return De(r)?M1(r,pt):S4(r)?[r]:E4(Nb(u1(r)))}function rle(r){var o=++h6e;return u1(r)+o}var ale=Rr(function(r,o){return r+o},0),ile=P0("ceil"),cle=Rr(function(r,o){return r/o},1),ole=P0("floor");function lle(r){return r&&r.length?br(r,y4,x0):t}function sle(r,o){return r&&r.length?br(r,Re(o,2),x0):t}function ule(r){return dz(r,y4)}function dle(r,o){return dz(r,Re(o,2))}function fle(r){return r&&r.length?br(r,y4,T0):t}function vle(r,o){return r&&r.length?br(r,Re(o,2),T0):t}var hle=Rr(function(r,o){return r*o},1),mle=P0("round"),ple=Rr(function(r,o){return r-o},0);function gle(r){return r&&r.length?h0(r,y4):0}function wle(r,o){return r&&r.length?h0(r,Re(o,2)):0}return V.after=Aie,V.ary=Ib,V.assign=Cce,V.assignIn=Xb,V.assignInWith=kr,V.assignWith=Mce,V.at=Rce,V.before=Lb,V.bind=J0,V.bindAll=$oe,V.bindKey=Db,V.castArray=Qie,V.chain=Hb,V.chunk=oae,V.compact=lae,V.concat=sae,V.cond=_oe,V.conforms=Ioe,V.constant=ca,V.countBy=gie,V.create=Tce,V.curry=Bb,V.curryRight=Ab,V.debounce=Pb,V.defaults=Sce,V.defaultsDeep=Fce,V.defer=Pie,V.delay=kie,V.difference=uae,V.differenceBy=dae,V.differenceWith=fae,V.drop=vae,V.dropRight=hae,V.dropRightWhile=mae,V.dropWhile=pae,V.fill=gae,V.filter=Oie,V.flatMap=bie,V.flatMapDeep=yie,V.flatMapDepth=Vie,V.flatten=Rb,V.flattenDeep=wae,V.flattenDepth=Oae,V.flip=jie,V.flow=Doe,V.flowRight=Boe,V.fromPairs=Eae,V.functions=Bce,V.functionsIn=Ace,V.groupBy=Nie,V.initial=bae,V.intersection=yae,V.intersectionBy=Vae,V.intersectionWith=Nae,V.invert=kce,V.invertBy=jce,V.invokeMap=Cie,V.iteratee=oa,V.keyBy=Mie,V.keys=e4,V.keysIn=b4,V.map=Ir,V.mapKeys=Wce,V.mapValues=Uce,V.matches=Aoe,V.matchesProperty=Poe,V.memoize=Dr,V.merge=Gce,V.mergeWith=Zb,V.method=koe,V.methodOf=joe,V.mixin=la,V.negate=Br,V.nthArg=Woe,V.omit=Yce,V.omitBy=Kce,V.once=qie,V.orderBy=Rie,V.over=Uoe,V.overArgs=Wie,V.overEvery=Goe,V.overSome=Yoe,V.partial=ea,V.partialRight=kb,V.partition=Tie,V.pick=Xce,V.pickBy=Qb,V.property=iy,V.propertyOf=Koe,V.pull=Rae,V.pullAll=Sb,V.pullAllBy=Tae,V.pullAllWith=Sae,V.pullAt=Fae,V.range=Xoe,V.rangeRight=Zoe,V.rearg=Uie,V.reject=Hie,V.remove=Hae,V.rest=Gie,V.reverse=Z0,V.sampleSize=_ie,V.set=Qce,V.setWith=Jce,V.shuffle=Iie,V.slice=$ae,V.sortBy=Bie,V.sortedUniq=Pae,V.sortedUniqBy=kae,V.split=boe,V.spread=Yie,V.tail=jae,V.take=qae,V.takeRight=Wae,V.takeRightWhile=Uae,V.takeWhile=Gae,V.tap=lie,V.throttle=Kie,V.thru=_r,V.toArray=Gb,V.toPairs=Jb,V.toPairsIn=ey,V.toPath=nle,V.toPlainObject=Kb,V.transform=eoe,V.unary=Xie,V.union=Yae,V.unionBy=Kae,V.unionWith=Xae,V.uniq=Zae,V.uniqBy=Qae,V.uniqWith=Jae,V.unset=toe,V.unzip=Q0,V.unzipWith=Fb,V.update=noe,V.updateWith=roe,V.values=Z2,V.valuesIn=aoe,V.without=eie,V.words=ry,V.wrap=Zie,V.xor=tie,V.xorBy=nie,V.xorWith=rie,V.zip=aie,V.zipObject=iie,V.zipObjectDeep=cie,V.zipWith=oie,V.entries=Jb,V.entriesIn=ey,V.extend=Xb,V.extendWith=kr,la(V,V),V.add=ale,V.attempt=ay,V.camelCase=loe,V.capitalize=ty,V.ceil=ile,V.clamp=ioe,V.clone=Jie,V.cloneDeep=tce,V.cloneDeepWith=nce,V.cloneWith=ece,V.conformsTo=rce,V.deburr=ny,V.defaultTo=Loe,V.divide=cle,V.endsWith=soe,V.eq=lt,V.escape=uoe,V.escapeRegExp=doe,V.every=wie,V.find=Eie,V.findIndex=Cb,V.findKey=Hce,V.findLast=zie,V.findLastIndex=Mb,V.findLastKey=$ce,V.floor=ole,V.forEach=$b,V.forEachRight=_b,V.forIn=_ce,V.forInRight=Ice,V.forOwn=Lce,V.forOwnRight=Dce,V.get=ra,V.gt=ace,V.gte=ice,V.has=Pce,V.hasIn=aa,V.head=Tb,V.identity=y4,V.includes=xie,V.indexOf=zae,V.inRange=coe,V.invoke=qce,V.isArguments=v2,V.isArray=De,V.isArrayBuffer=cce,V.isArrayLike=z4,V.isArrayLikeObject=L1,V.isBoolean=oce,V.isBuffer=Yt,V.isDate=lce,V.isElement=sce,V.isEmpty=uce,V.isEqual=dce,V.isEqualWith=fce,V.isError=ta,V.isFinite=vce,V.isFunction=Mt,V.isInteger=jb,V.isLength=Ar,V.isMap=qb,V.isMatch=hce,V.isMatchWith=mce,V.isNaN=pce,V.isNative=gce,V.isNil=Oce,V.isNull=wce,V.isNumber=Wb,V.isObject=T1,V.isObjectLike=H1,V.isPlainObject=K3,V.isRegExp=na,V.isSafeInteger=Ece,V.isSet=Ub,V.isString=Pr,V.isSymbol=S4,V.isTypedArray=X2,V.isUndefined=zce,V.isWeakMap=bce,V.isWeakSet=yce,V.join=xae,V.kebabCase=foe,V.last=Y4,V.lastIndexOf=Cae,V.lowerCase=voe,V.lowerFirst=hoe,V.lt=Vce,V.lte=Nce,V.max=lle,V.maxBy=sle,V.mean=ule,V.meanBy=dle,V.min=fle,V.minBy=vle,V.stubArray=ua,V.stubFalse=da,V.stubObject=Qoe,V.stubString=Joe,V.stubTrue=ele,V.multiply=hle,V.nth=Mae,V.noConflict=qoe,V.noop=sa,V.now=Lr,V.pad=moe,V.padEnd=poe,V.padStart=goe,V.parseInt=woe,V.random=ooe,V.reduce=Sie,V.reduceRight=Fie,V.repeat=Ooe,V.replace=Eoe,V.result=Zce,V.round=mle,V.runInContext=Y,V.sample=$ie,V.size=Lie,V.snakeCase=zoe,V.some=Die,V.sortedIndex=_ae,V.sortedIndexBy=Iae,V.sortedIndexOf=Lae,V.sortedLastIndex=Dae,V.sortedLastIndexBy=Bae,V.sortedLastIndexOf=Aae,V.startCase=yoe,V.startsWith=Voe,V.subtract=ple,V.sum=gle,V.sumBy=wle,V.template=Noe,V.times=tle,V.toFinite=Rt,V.toInteger=ke,V.toLength=Yb,V.toLower=xoe,V.toNumber=K4,V.toSafeInteger=xce,V.toString=u1,V.toUpper=Coe,V.trim=Moe,V.trimEnd=Roe,V.trimStart=Toe,V.truncate=Soe,V.unescape=Foe,V.uniqueId=rle,V.upperCase=Hoe,V.upperFirst=ia,V.each=$b,V.eachRight=_b,V.first=Tb,la(V,function(){var r={};return ht(V,function(o,s){f1.call(V.prototype,s)||(r[s]=o)}),r}(),{chain:!1}),V.VERSION=i,j4(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){V[r].placeholder=V}),j4(["drop","take"],function(r,o){t1.prototype[r]=function(s){s=s===t?1:K1(ke(s),0);var p=this.__filtered__&&!o?new t1(this):this.clone();return p.__filtered__?p.__takeCount__=u4(s,p.__takeCount__):p.__views__.push({size:u4(s,ne),type:r+(p.__dir__<0?"Right":"")}),p},t1.prototype[r+"Right"]=function(s){return this.reverse()[r](s).reverse()}}),j4(["filter","map","takeWhile"],function(r,o){var s=o+1,p=s==G||s==_;t1.prototype[r]=function(O){var C=this.clone();return C.__iteratees__.push({iteratee:Re(O,3),type:s}),C.__filtered__=C.__filtered__||p,C}}),j4(["head","last"],function(r,o){var s="take"+(o?"Right":"");t1.prototype[r]=function(){return this[s](1).value()[0]}}),j4(["initial","tail"],function(r,o){var s="drop"+(o?"":"Right");t1.prototype[r]=function(){return this.__filtered__?new t1(this):this[s](1)}}),t1.prototype.compact=function(){return this.filter(y4)},t1.prototype.find=function(r){return this.filter(r).head()},t1.prototype.findLast=function(r){return this.reverse().find(r)},t1.prototype.invokeMap=Ye(function(r,o){return typeof r=="function"?new t1(this):this.map(function(s){return j3(s,r,o)})}),t1.prototype.reject=function(r){return this.filter(Br(Re(r)))},t1.prototype.slice=function(r,o){r=ke(r);var s=this;return s.__filtered__&&(r>0||o<0)?new t1(s):(r<0?s=s.takeRight(-r):r&&(s=s.drop(r)),o!==t&&(o=ke(o),s=o<0?s.dropRight(-o):s.take(o-r)),s)},t1.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},t1.prototype.toArray=function(){return this.take(ne)},ht(t1.prototype,function(r,o){var s=/^(?:filter|find|map|reject)|While$/.test(o),p=/^(?:head|last)$/.test(o),O=V[p?"take"+(o=="last"?"Right":""):o],C=p||/^find/.test(o);O&&(V.prototype[o]=function(){var P=this.__wrapped__,W=p?[1]:arguments,X=P instanceof t1,oe=W[0],le=X||De(P),ue=function(Je){var n1=O.apply(V,Pt([Je],W));return p&&we?n1[0]:n1};le&&s&&typeof oe=="function"&&oe.length!=1&&(X=le=!1);var we=this.__chain__,ye=!!this.__actions__.length,Se=C&&!we,qe=X&&!ye;if(!C&&le){P=qe?P:new t1(this);var Fe=r.apply(P,W);return Fe.__actions__.push({func:_r,args:[ue],thisArg:t}),new W4(Fe,we)}return Se&&qe?r.apply(this,W):(Fe=this.thru(ue),Se?p?Fe.value()[0]:Fe.value():Fe)})}),j4(["pop","push","shift","sort","splice","unshift"],function(r){var o=or[r],s=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",p=/^(?:pop|shift)$/.test(r);V.prototype[r]=function(){var O=arguments;if(p&&!this.__chain__){var C=this.value();return o.apply(De(C)?C:[],O)}return this[s](function(P){return o.apply(De(P)?P:[],O)})}}),ht(t1.prototype,function(r,o){var s=V[o];if(s){var p=s.name+"";f1.call(W2,p)||(W2[p]=[]),W2[p].push({name:o,func:s})}}),W2[Mr(t,x).name]=[{name:"wrapper",func:t}],t1.prototype.clone=F6e,t1.prototype.reverse=H6e,t1.prototype.value=$6e,V.prototype.at=sie,V.prototype.chain=uie,V.prototype.commit=die,V.prototype.next=fie,V.prototype.plant=hie,V.prototype.reverse=mie,V.prototype.toJSON=V.prototype.valueOf=V.prototype.value=pie,V.prototype.first=V.prototype.head,I3&&(V.prototype[I3]=vie),V},k2=d6e();i2?((i2.exports=k2)._=k2,o0._=k2):a4._=k2}).call(D3e)}(z3,z3.exports)),z3.exports}var b3=B3e();const I6=va(b3),A3e=(n,e)=>{const t=n.field.split("."),i=e==null?void 0:e.getFieldValue(t),c=n.value,l=n.operator||"=";if(!c)return Array.isArray(i)?i.length>0:!!i;const v={"=":()=>Array.isArray(c)?i.includes(c):i===c,"!=":()=>Array.isArray(c)?!i.includes(c):i!==c,">":()=>i>c,"<":()=>i<c,">=":()=>i>=c,"<=":()=>i<=c,includes:()=>Array.isArray(i)?Array.isArray(c)?i.some(h=>c.includes(h)):i.includes(c):typeof i=="string"?Array.isArray(c)?c.some(h=>i.includes(h)):i.includes(c):!1}[l];return v?v():!1},P3e=n=>{var R,M,E;let e=(R=n==null?void 0:n.id)==null?void 0:R.split("."),t=de.Form.useWatch(e,n.formRef);const[i,c]=y.useState(!!n.lookupFetcher),l={textarea:$M,string:vy,number:LM,color:S3e,date:xo,datetime:xo,time:_3e,checkbox:_M,switch:IM,select:T3e,password:F3e,radio:H3e,rate:$3e,slider:I3e,upload:L3e};async function d(){var x,b;if(n.lookupFetcher&&n.lookupKey){c(!0);const F=await((x=n.lookupFetcher)==null?void 0:x.call(n,n))||[];(b=n.updateLookupData)==null||b.call(n,n.lookupKey||"",F),c(!1)}}const v=["select","checkbox","radio","upload"],h=(n.enableWhen||[]).reduce((x,b)=>{var F;if(typeof b!="function"&&(b!=null&&b.field)){const H=(F=b==null?void 0:b.field)==null?void 0:F.split(".");x[b==null?void 0:b.field]=de.Form.useWatch(H,n.formRef)}return x},{}),m=y.useRef({}),g=b3.debounce(()=>{var F,H,S;const x=m.current;if(m.current=h,(F=n.suppressionRef)!=null&&F.current)return;const b=Object.keys(h).filter(I=>x[I]!==h[I]);if(b.length>0){let I=(H=n==null?void 0:n.id)==null?void 0:H.split(".");const $=n.resetOnDependencyChange??!1,D=n.resetOnDependencyEmpty??!0;if(n.enableWhen&&((S=n==null?void 0:n.enableWhen)==null?void 0:S.length)>0){let L=n.formRef;(L&&D&&(b!=null&&b.some(j=>{var q;if((q=n.resetIgnoreFields)!=null&&q.includes(j))return!1;{let Q=j==null?void 0:j.split("."),U=L==null?void 0:L.getFieldValue(Q);return Array.isArray(U)?U.length==0:!U}}))||L&&$&&(b!=null&&b.some(j=>{var q;return!((q=n.resetIgnoreFields)!=null&&q.includes(j))})))&&L.setFieldValue(I,void 0)}}},200),w=b3.debounce(d,200);y.useEffect(()=>(w(),g(),()=>{w.cancel(),g.cancel()}),[...((M=n.enableWhen)==null?void 0:M.map(x=>{if(typeof x!="function")return h[x==null?void 0:x.field]}))||[]]);const z=x=>{if(!x||(x==null?void 0:x.length)==0)return!1;{let b=n.formRef;return!x.every(F=>typeof F!="function"?F.evaluate&&typeof F.evaluate=="function"?F.evaluate(n):F!=null&&F.field?A3e(F,b):!0:F(n))}};return y.useMemo(()=>{var H;const x=l==null?void 0:l[n.inputType];let b=(H=n==null?void 0:n.id)==null?void 0:H.split("."),F={...n};return v.includes(n.inputType)||(F==null||delete F.lookupData,F==null||delete F.initialData,F==null||delete F.httpAgent,F==null||delete F.form),typeof(F==null?void 0:F.addonBefore)=="function"&&(F.addonBefore=F.addonBefore(n)),typeof(F==null?void 0:F.addonAfter)=="function"&&(F.addonAfter=F.addonAfter(n)),F==null||delete F.resetOnDependencyChange,F==null||delete F.resetOnDependencyEmpty,F==null||delete F.inputType,F==null||delete F.dataType,F==null||delete F.input,F==null||delete F.enableWhen,n.inputType==="hidden"?k.jsx(de.Form.Item,{name:b,noStyle:!0}):x?k.jsx(de.Form.Item,{colon:typeof n.colon=="boolean"?n.colon:!0,className:n.wrapperClassName,style:n.wrapperStyle,label:typeof n.label=="function"?n.label(F):n.label,name:b,tooltip:n.tooltip,rules:[{required:n.required,message:n.defaultErrorMessage??`${n.label} is required`},...n.validators??[]],getValueProps:S=>(n.inputType==="date"&&fa(S).isValid()&&S&&(S=fa(S)),{value:S}),layout:n.layout??void 0,...n.inputType==="upload"?{valuePropName:"fileList",getValueFromEvent:S=>S.fileList}:{},...n.inputType==="color"?{getValueFromEvent:S=>S.toHexString()}:{},children:k.jsx(x,{loading:i,...F,form:n.formRef,data:t,disabled:n.disabled||z(n.enableWhen)})}):k.jsxs("div",{children:["Unknown Input Type - ",n.inputType]})},[n.id,t,n.lookupData,n.readOnly,n.disabled,i,...((E=n.enableWhen)==null?void 0:E.map(x=>{if(typeof x!="function")return h[x==null?void 0:x.field]}))||[]])},k3e=({children:n=[],label:e="",id:t="",className:i="",style:c={},section_id:l="",wrapperClassName:d="",wrapperStyle:v={},collapsible:h=!0,labelPlacement:m="start",labelMargin:g=0,showHeader:w=!0,showDivider:z=!0,expandIcon:N=null,collapseIcon:R=null,tooltip:M=null,...E})=>{var D;const[x,b]=y.useState(!0),[F,H]=y.useState("auto"),S=y.useRef(null);y.useEffect(()=>{if(!S.current)return;const L=()=>{S.current&&H(`${S.current.scrollHeight}px`)};L();const j=new ResizeObserver(()=>{L()});j.observe(S.current);const q=new MutationObserver(()=>{setTimeout(L,0)});return q.observe(S.current,{childList:!0,subtree:!0,attributes:!0}),()=>{j.disconnect(),q.disconnect()}},[]);const I={maxHeight:x?F:"0px",overflow:"hidden",transition:"max-height 0.3s ease-in-out",opacity:x?1:0,transform:`translateY(${x?"0":"-10px"})`},$=L=>k.jsxs("div",{className:`antd-form-section-wrapper ${d}`,style:{...v},children:[w&&(z?k.jsx(de.Divider,{orientation:m,orientationMargin:g,className:i,children:k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",...c},children:[h&&k.jsx(k.Fragment,{children:N&&R?k.jsx("div",{style:h?{transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:x?N:R}):k.jsx("div",{style:h?{transform:`rotate(${x?"0deg":"-90deg"})`,transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:k.jsx(Hn,{})})}),k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[" ",k.jsx("span",{style:h?{cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:e}),M&&k.jsx(de.Tooltip,{title:M,children:k.jsx(T6,{style:{opacity:.5}})})]})]})}):k.jsxs("div",{className:i,style:{margin:"16px 0",display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",...c},children:[h&&k.jsx(k.Fragment,{children:N&&R?k.jsx("div",{style:h?{transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:x?N:R}):k.jsx("div",{style:h?{transform:`rotate(${x?"0deg":"-90deg"})`,transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:k.jsx(Hn,{})})}),k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[" ",k.jsx("span",{style:h?{cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:e}),M&&k.jsx(de.Tooltip,{title:M,children:k.jsx(C6,{style:{opacity:.5}})})]})]})),k.jsx("div",{style:I,children:k.jsx("div",{ref:S,children:k.jsx(In,{...E,items:L},t)})})]});if(l){const L=(D=E.sections)==null?void 0:D.find(j=>j.id===l);if(L)return $((L==null?void 0:L.items)||[])}else if(n&&n.length>0)return $(n);return k.jsx(k.Fragment,{})},j3e=(n,e)=>{const t=n.field.split("."),i=e==null?void 0:e.getFieldValue(t),c=n.value,l=n.operator||"=";if(!c)return Array.isArray(i)?i.length>0:!!i;const v={"=":()=>i===c,"!=":()=>i!==c,">":()=>i>c,"<":()=>i<c,">=":()=>i>=c,"<=":()=>i<=c,includes:()=>Array.isArray(i)||typeof i=="string"?i.includes(c):!1}[l];return v?v():!1},In=n=>{var t;const e=((t=n==null?void 0:n.items)==null?void 0:t.sort((i,c)=>(i.sequence??9999)-(c.sequence??9999)))??[];return k.jsx(k.Fragment,{children:e.map(({displayWhen:i,...c})=>{if(i&&!i.every(l=>l!=null&&l.field?typeof l!="function"?l.evaluate&&typeof l.evaluate=="function"?l.evaluate(n):j3e(l,n.formRef):l(n):!0))return null;if("dataType"in c&&c.type==="input")return k.jsx(P3e,{initialData:n.initialData,resetOnDependencyChange:n.resetOnDependencyChange,resetOnDependencyEmpty:n.resetOnDependencyEmpty,disabled:n.disabled,readOnly:n.readOnly,...c,formRef:n.formRef,httpAgent:n.httpAgent,lookupData:n.lookupData,suppressionRef:n.suppressionRef,updateLookupData:n.updateLookupData},c.id);if(c.type==="section")return k.jsx(k3e,{...n,...c});if(c.type==="grid")return k.jsx(fy,{...n,...c},c.id);if(c.type==="flex")return k.jsx(dy,{...n,...c},c.id);if(c.type==="divider")return k.jsx(de.Divider,{...c,type:c.orientation||"horizontal",orientation:c.labelPlacement||"center",dashed:c.dashed,children:c.label},c.id);if(c.type==="custom"&&typeof(c==null?void 0:c.render)=="function")return c.render(n)})})},PO=n=>typeof n=="object"&&n!=null&&n.nodeType===1,kO=(n,e)=>(!e||n!=="hidden")&&n!=="visible"&&n!=="clip",Ln=(n,e)=>{if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){const t=getComputedStyle(n,null);return kO(t.overflowY,e)||kO(t.overflowX,e)||(i=>{const c=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!c&&(c.clientHeight<i.scrollHeight||c.clientWidth<i.scrollWidth)})(n)}return!1},Dn=(n,e,t,i,c,l,d,v)=>l<n&&d>e||l>n&&d<e?0:l<=n&&v<=t||d>=e&&v>=t?l-n-i:d>e&&v<t||l<n&&v>t?d-e+c:0,q3e=n=>{const e=n.parentElement;return e??(n.getRootNode().host||null)},jO=(n,e)=>{var t,i,c,l;if(typeof document>"u")return[];const{scrollMode:d,block:v,inline:h,boundary:m,skipOverflowHiddenElements:g}=e,w=typeof m=="function"?m:_=>_!==m;if(!PO(n))throw new TypeError("Invalid target");const z=document.scrollingElement||document.documentElement,N=[];let R=n;for(;PO(R)&&w(R);){if(R=q3e(R),R===z){N.push(R);break}R!=null&&R===document.body&&Ln(R)&&!Ln(document.documentElement)||R!=null&&Ln(R,g)&&N.push(R)}const M=(i=(t=window.visualViewport)==null?void 0:t.width)!=null?i:innerWidth,E=(l=(c=window.visualViewport)==null?void 0:c.height)!=null?l:innerHeight,{scrollX:x,scrollY:b}=window,{height:F,width:H,top:S,right:I,bottom:$,left:D}=n.getBoundingClientRect(),{top:L,right:j,bottom:q,left:Q}=(_=>{const T=window.getComputedStyle(_);return{top:parseFloat(T.scrollMarginTop)||0,right:parseFloat(T.scrollMarginRight)||0,bottom:parseFloat(T.scrollMarginBottom)||0,left:parseFloat(T.scrollMarginLeft)||0}})(n);let U=v==="start"||v==="nearest"?S-L:v==="end"?$+q:S+F/2-L+q,G=h==="center"?D+H/2-Q+j:h==="end"?I+j:D-Q;const re=[];for(let _=0;_<N.length;_++){const T=N[_],{height:A,width:K,top:J,right:ne,bottom:te,left:se}=T.getBoundingClientRect();if(d==="if-needed"&&S>=0&&D>=0&&$<=E&&I<=M&&(T===z&&!Ln(T)||S>=J&&$<=te&&D>=se&&I<=ne))return re;const ve=getComputedStyle(T),me=parseInt(ve.borderLeftWidth,10),ge=parseInt(ve.borderTopWidth,10),xe=parseInt(ve.borderRightWidth,10),be=parseInt(ve.borderBottomWidth,10);let Oe=0,pe=0;const Ce="offsetWidth"in T?T.offsetWidth-T.clientWidth-me-xe:0,Me="offsetHeight"in T?T.offsetHeight-T.clientHeight-ge-be:0,Ue="offsetWidth"in T?T.offsetWidth===0?0:K/T.offsetWidth:0,fe="offsetHeight"in T?T.offsetHeight===0?0:A/T.offsetHeight:0;if(z===T)Oe=v==="start"?U:v==="end"?U-E:v==="nearest"?Dn(b,b+E,E,ge,be,b+U,b+U+F,F):U-E/2,pe=h==="start"?G:h==="center"?G-M/2:h==="end"?G-M:Dn(x,x+M,M,me,xe,x+G,x+G+H,H),Oe=Math.max(0,Oe+b),pe=Math.max(0,pe+x);else{Oe=v==="start"?U-J-ge:v==="end"?U-te+be+Me:v==="nearest"?Dn(J,te,A,ge,be+Me,U,U+F,F):U-(J+A/2)+Me/2,pe=h==="start"?G-se-me:h==="center"?G-(se+K/2)+Ce/2:h==="end"?G-ne+xe+Ce:Dn(se,ne,K,me,xe+Ce,G,G+H,H);const{scrollLeft:Be,scrollTop:ze}=T;Oe=fe===0?0:Math.max(0,Math.min(ze+Oe/fe,T.scrollHeight-A/fe+Me)),pe=Ue===0?0:Math.max(0,Math.min(Be+pe/Ue,T.scrollWidth-K/Ue+Ce)),U+=ze-Oe,G+=Be-pe}re.push({el:T,top:Oe,left:pe})}return re},W3e=n=>n===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(n)?n:{block:"start",inline:"nearest"};function U3e(n,e){if(!n.isConnected||!(c=>{let l=c;for(;l&&l.parentNode;){if(l.parentNode===document)return!0;l=l.parentNode instanceof ShadowRoot?l.parentNode.host:l.parentNode}return!1})(n))return;const t=(c=>{const l=window.getComputedStyle(c);return{top:parseFloat(l.scrollMarginTop)||0,right:parseFloat(l.scrollMarginRight)||0,bottom:parseFloat(l.scrollMarginBottom)||0,left:parseFloat(l.scrollMarginLeft)||0}})(n);if((c=>typeof c=="object"&&typeof c.behavior=="function")(e))return e.behavior(jO(n,e));const i=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:c,top:l,left:d}of jO(n,W3e(e))){const v=l-t.top+t.bottom,h=d-t.left+t.right;c.scroll({top:v,left:h,behavior:i})}}const G3e=["parentNode"],Y3e="form_item";function qO(n){return n===void 0||n===!1?[]:Array.isArray(n)?n:[n]}function K3e(n,e){if(!n.length)return;const t=n.join("_");return e?`${e}_${t}`:G3e.includes(t)?`${Y3e}_${t}`:t}var X3e=function(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(n);c<i.length;c++)e.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(n,i[c])&&(t[i[c]]=n[i[c]]);return t};function WO(n){return qO(n).join("_")}function UO(n,e){const t=e.getFieldInstance(n),i=$a(t);if(i)return i;const c=K3e(qO(n),e.__INTERNAL__.name);if(c)return document.getElementById(c)}function GO(n){const[e]=d6(),t=a.useRef({}),i=a.useMemo(()=>n??Object.assign(Object.assign({},e),{__INTERNAL__:{itemRef:c=>l=>{const d=WO(c);l?t.current[d]=l:delete t.current[d]}},scrollToField:(c,l={})=>{const{focus:d}=l,v=X3e(l,["focus"]),h=UO(c,i);h&&(U3e(h,Object.assign({scrollMode:"if-needed",block:"nearest"},v)),d&&i.focusField(c))},focusField:c=>{var l,d;const v=i.getFieldInstance(c);typeof(v==null?void 0:v.focus)=="function"?v.focus():(d=(l=UO(c,i))===null||l===void 0?void 0:l.focus)===null||d===void 0||d.call(l)},getFieldInstance:c=>{const l=WO(c);return t.current[l]}}),[n,e]);return[i]}const Bn={};function Z3e({name:n}){const e=St("Form");a.useEffect(()=>{if(n)return Bn[n]=(Bn[n]||0)+1,process.env.NODE_ENV!=="production"&&e(Bn[n]<=1,"usage","There exist multiple Form with same `name`."),()=>{Bn[n]-=1}},[n])}const Q3e=n=>({[n.componentCls]:{[`${n.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${n.motionDurationMid} ${n.motionEaseInOut},
206
+ }`;var qe=ay(function(){return o1(C,ye+"return "+ue).apply(t,P)});if(qe.source=ue,ta(qe))throw qe;return qe}function xoe(r){return u1(r).toLowerCase()}function Coe(r){return u1(r).toUpperCase()}function Moe(r,o,s){if(r=u1(r),r&&(s||o===t))return vz(r);if(!r||!(o=T4(o)))return r;var p=ct(r),O=ct(o),C=hz(p,O),P=mz(p,O)+1;return Gt(p,C,P).join("")}function Roe(r,o,s){if(r=u1(r),r&&(s||o===t))return r.slice(0,gz(r)+1);if(!r||!(o=T4(o)))return r;var p=ct(r),O=mz(p,ct(o))+1;return Gt(p,0,O).join("")}function Toe(r,o,s){if(r=u1(r),r&&(s||o===t))return r.replace(r4,"");if(!r||!(o=T4(o)))return r;var p=ct(r),O=hz(p,ct(o));return Gt(p,O).join("")}function Soe(r,o){var s=j,p=q;if(T1(o)){var O="separator"in o?o.separator:O;s="length"in o?ke(o.length):s,p="omission"in o?T4(o.omission):p}r=u1(r);var C=r.length;if(A2(r)){var P=ct(r);C=P.length}if(s>=C)return r;var W=s-P2(p);if(W<1)return p;var X=P?Gt(P,0,W).join(""):r.slice(0,W);if(O===t)return X+p;if(P&&(W+=X.length-W),na(O)){if(r.slice(W).search(O)){var oe,le=X;for(O.global||(O=w0(O.source,u1(i1.exec(O))+"g")),O.lastIndex=0;oe=O.exec(le);)var ue=oe.index;X=X.slice(0,ue===t?W:ue)}}else if(r.indexOf(T4(O),W)!=W){var we=X.lastIndexOf(O);we>-1&&(X=X.slice(0,we))}return X+p}function Foe(r){return r=u1(r),r&&P1.test(r)?r.replace(vt,o6e):r}var Hoe=Y2(function(r,o,s){return r+(s?" ":"")+o.toUpperCase()}),ia=ib("toUpperCase");function ry(r,o,s){return r=u1(r),o=s?t:o,o===t?n6e(r)?u6e(r):G8e(r):r.match(o)||[]}var ay=Ye(function(r,o){try{return M4(r,t,o)}catch(s){return ta(s)?s:new Le(s)}}),$oe=xt(function(r,o){return j4(o,function(s){s=pt(s),Vt(r,s,J0(r[s],r))}),r});function _oe(r){var o=r==null?0:r.length,s=Re();return r=o?M1(r,function(p){if(typeof p[1]!="function")throw new q4(d);return[s(p[0]),p[1]]}):[],Ye(function(p){for(var O=-1;++O<o;){var C=r[O];if(M4(C[0],this,p))return M4(C[1],this,p)}})}function Ioe(r){return o0e(U4(r,w))}function ca(r){return function(){return r}}function Loe(r,o){return r==null||r!==r?o:r}var Doe=ob(),Boe=ob(!0);function y4(r){return r}function oa(r){return Lz(typeof r=="function"?r:U4(r,w))}function Aoe(r){return Bz(U4(r,w))}function Poe(r,o){return Az(r,U4(o,w))}var koe=Ye(function(r,o){return function(s){return j3(s,r,o)}}),joe=Ye(function(r,o){return function(s){return j3(r,s,o)}});function la(r,o,s){var p=e4(o),O=yr(o,p);s==null&&!(T1(o)&&(O.length||!p.length))&&(s=o,o=r,r=this,O=yr(o,e4(o)));var C=!(T1(s)&&"chain"in s)||!!s.chain,P=Mt(r);return j4(O,function(W){var X=o[W];r[W]=X,P&&(r.prototype[W]=function(){var oe=this.__chain__;if(C||oe){var le=r(this.__wrapped__),ue=le.__actions__=E4(this.__actions__);return ue.push({func:X,args:arguments,thisArg:r}),le.__chain__=oe,le}return X.apply(r,Pt([this.value()],arguments))})}),r}function qoe(){return a4._===this&&(a4._=p6e),this}function sa(){}function Woe(r){return r=ke(r),Ye(function(o){return Pz(o,r)})}var Uoe=A0(M1),Goe=A0(lz),Yoe=A0(d0);function iy(r){return G0(r)?f0(pt(r)):V0e(r)}function Koe(r){return function(o){return r==null?t:u2(r,o)}}var Xoe=sb(),Zoe=sb(!0);function ua(){return[]}function da(){return!1}function Qoe(){return{}}function Joe(){return""}function ele(){return!0}function tle(r,o){if(r=ke(r),r<1||r>A)return[];var s=ne,p=u4(r,ne);o=Re(o),r-=ne;for(var O=m0(p,o);++s<r;)o(s);return O}function nle(r){return De(r)?M1(r,pt):S4(r)?[r]:E4(Nb(u1(r)))}function rle(r){var o=++h6e;return u1(r)+o}var ale=Rr(function(r,o){return r+o},0),ile=P0("ceil"),cle=Rr(function(r,o){return r/o},1),ole=P0("floor");function lle(r){return r&&r.length?br(r,y4,x0):t}function sle(r,o){return r&&r.length?br(r,Re(o,2),x0):t}function ule(r){return dz(r,y4)}function dle(r,o){return dz(r,Re(o,2))}function fle(r){return r&&r.length?br(r,y4,T0):t}function vle(r,o){return r&&r.length?br(r,Re(o,2),T0):t}var hle=Rr(function(r,o){return r*o},1),mle=P0("round"),ple=Rr(function(r,o){return r-o},0);function gle(r){return r&&r.length?h0(r,y4):0}function wle(r,o){return r&&r.length?h0(r,Re(o,2)):0}return V.after=Aie,V.ary=Ib,V.assign=Cce,V.assignIn=Xb,V.assignInWith=kr,V.assignWith=Mce,V.at=Rce,V.before=Lb,V.bind=J0,V.bindAll=$oe,V.bindKey=Db,V.castArray=Qie,V.chain=Hb,V.chunk=oae,V.compact=lae,V.concat=sae,V.cond=_oe,V.conforms=Ioe,V.constant=ca,V.countBy=gie,V.create=Tce,V.curry=Bb,V.curryRight=Ab,V.debounce=Pb,V.defaults=Sce,V.defaultsDeep=Fce,V.defer=Pie,V.delay=kie,V.difference=uae,V.differenceBy=dae,V.differenceWith=fae,V.drop=vae,V.dropRight=hae,V.dropRightWhile=mae,V.dropWhile=pae,V.fill=gae,V.filter=Oie,V.flatMap=bie,V.flatMapDeep=yie,V.flatMapDepth=Vie,V.flatten=Rb,V.flattenDeep=wae,V.flattenDepth=Oae,V.flip=jie,V.flow=Doe,V.flowRight=Boe,V.fromPairs=Eae,V.functions=Bce,V.functionsIn=Ace,V.groupBy=Nie,V.initial=bae,V.intersection=yae,V.intersectionBy=Vae,V.intersectionWith=Nae,V.invert=kce,V.invertBy=jce,V.invokeMap=Cie,V.iteratee=oa,V.keyBy=Mie,V.keys=e4,V.keysIn=b4,V.map=Ir,V.mapKeys=Wce,V.mapValues=Uce,V.matches=Aoe,V.matchesProperty=Poe,V.memoize=Dr,V.merge=Gce,V.mergeWith=Zb,V.method=koe,V.methodOf=joe,V.mixin=la,V.negate=Br,V.nthArg=Woe,V.omit=Yce,V.omitBy=Kce,V.once=qie,V.orderBy=Rie,V.over=Uoe,V.overArgs=Wie,V.overEvery=Goe,V.overSome=Yoe,V.partial=ea,V.partialRight=kb,V.partition=Tie,V.pick=Xce,V.pickBy=Qb,V.property=iy,V.propertyOf=Koe,V.pull=Rae,V.pullAll=Sb,V.pullAllBy=Tae,V.pullAllWith=Sae,V.pullAt=Fae,V.range=Xoe,V.rangeRight=Zoe,V.rearg=Uie,V.reject=Hie,V.remove=Hae,V.rest=Gie,V.reverse=Z0,V.sampleSize=_ie,V.set=Qce,V.setWith=Jce,V.shuffle=Iie,V.slice=$ae,V.sortBy=Bie,V.sortedUniq=Pae,V.sortedUniqBy=kae,V.split=boe,V.spread=Yie,V.tail=jae,V.take=qae,V.takeRight=Wae,V.takeRightWhile=Uae,V.takeWhile=Gae,V.tap=lie,V.throttle=Kie,V.thru=_r,V.toArray=Gb,V.toPairs=Jb,V.toPairsIn=ey,V.toPath=nle,V.toPlainObject=Kb,V.transform=eoe,V.unary=Xie,V.union=Yae,V.unionBy=Kae,V.unionWith=Xae,V.uniq=Zae,V.uniqBy=Qae,V.uniqWith=Jae,V.unset=toe,V.unzip=Q0,V.unzipWith=Fb,V.update=noe,V.updateWith=roe,V.values=Z2,V.valuesIn=aoe,V.without=eie,V.words=ry,V.wrap=Zie,V.xor=tie,V.xorBy=nie,V.xorWith=rie,V.zip=aie,V.zipObject=iie,V.zipObjectDeep=cie,V.zipWith=oie,V.entries=Jb,V.entriesIn=ey,V.extend=Xb,V.extendWith=kr,la(V,V),V.add=ale,V.attempt=ay,V.camelCase=loe,V.capitalize=ty,V.ceil=ile,V.clamp=ioe,V.clone=Jie,V.cloneDeep=tce,V.cloneDeepWith=nce,V.cloneWith=ece,V.conformsTo=rce,V.deburr=ny,V.defaultTo=Loe,V.divide=cle,V.endsWith=soe,V.eq=lt,V.escape=uoe,V.escapeRegExp=doe,V.every=wie,V.find=Eie,V.findIndex=Cb,V.findKey=Hce,V.findLast=zie,V.findLastIndex=Mb,V.findLastKey=$ce,V.floor=ole,V.forEach=$b,V.forEachRight=_b,V.forIn=_ce,V.forInRight=Ice,V.forOwn=Lce,V.forOwnRight=Dce,V.get=ra,V.gt=ace,V.gte=ice,V.has=Pce,V.hasIn=aa,V.head=Tb,V.identity=y4,V.includes=xie,V.indexOf=zae,V.inRange=coe,V.invoke=qce,V.isArguments=v2,V.isArray=De,V.isArrayBuffer=cce,V.isArrayLike=z4,V.isArrayLikeObject=L1,V.isBoolean=oce,V.isBuffer=Yt,V.isDate=lce,V.isElement=sce,V.isEmpty=uce,V.isEqual=dce,V.isEqualWith=fce,V.isError=ta,V.isFinite=vce,V.isFunction=Mt,V.isInteger=jb,V.isLength=Ar,V.isMap=qb,V.isMatch=hce,V.isMatchWith=mce,V.isNaN=pce,V.isNative=gce,V.isNil=Oce,V.isNull=wce,V.isNumber=Wb,V.isObject=T1,V.isObjectLike=H1,V.isPlainObject=K3,V.isRegExp=na,V.isSafeInteger=Ece,V.isSet=Ub,V.isString=Pr,V.isSymbol=S4,V.isTypedArray=X2,V.isUndefined=zce,V.isWeakMap=bce,V.isWeakSet=yce,V.join=xae,V.kebabCase=foe,V.last=Y4,V.lastIndexOf=Cae,V.lowerCase=voe,V.lowerFirst=hoe,V.lt=Vce,V.lte=Nce,V.max=lle,V.maxBy=sle,V.mean=ule,V.meanBy=dle,V.min=fle,V.minBy=vle,V.stubArray=ua,V.stubFalse=da,V.stubObject=Qoe,V.stubString=Joe,V.stubTrue=ele,V.multiply=hle,V.nth=Mae,V.noConflict=qoe,V.noop=sa,V.now=Lr,V.pad=moe,V.padEnd=poe,V.padStart=goe,V.parseInt=woe,V.random=ooe,V.reduce=Sie,V.reduceRight=Fie,V.repeat=Ooe,V.replace=Eoe,V.result=Zce,V.round=mle,V.runInContext=Y,V.sample=$ie,V.size=Lie,V.snakeCase=zoe,V.some=Die,V.sortedIndex=_ae,V.sortedIndexBy=Iae,V.sortedIndexOf=Lae,V.sortedLastIndex=Dae,V.sortedLastIndexBy=Bae,V.sortedLastIndexOf=Aae,V.startCase=yoe,V.startsWith=Voe,V.subtract=ple,V.sum=gle,V.sumBy=wle,V.template=Noe,V.times=tle,V.toFinite=Rt,V.toInteger=ke,V.toLength=Yb,V.toLower=xoe,V.toNumber=K4,V.toSafeInteger=xce,V.toString=u1,V.toUpper=Coe,V.trim=Moe,V.trimEnd=Roe,V.trimStart=Toe,V.truncate=Soe,V.unescape=Foe,V.uniqueId=rle,V.upperCase=Hoe,V.upperFirst=ia,V.each=$b,V.eachRight=_b,V.first=Tb,la(V,function(){var r={};return ht(V,function(o,s){f1.call(V.prototype,s)||(r[s]=o)}),r}(),{chain:!1}),V.VERSION=i,j4(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){V[r].placeholder=V}),j4(["drop","take"],function(r,o){t1.prototype[r]=function(s){s=s===t?1:K1(ke(s),0);var p=this.__filtered__&&!o?new t1(this):this.clone();return p.__filtered__?p.__takeCount__=u4(s,p.__takeCount__):p.__views__.push({size:u4(s,ne),type:r+(p.__dir__<0?"Right":"")}),p},t1.prototype[r+"Right"]=function(s){return this.reverse()[r](s).reverse()}}),j4(["filter","map","takeWhile"],function(r,o){var s=o+1,p=s==G||s==_;t1.prototype[r]=function(O){var C=this.clone();return C.__iteratees__.push({iteratee:Re(O,3),type:s}),C.__filtered__=C.__filtered__||p,C}}),j4(["head","last"],function(r,o){var s="take"+(o?"Right":"");t1.prototype[r]=function(){return this[s](1).value()[0]}}),j4(["initial","tail"],function(r,o){var s="drop"+(o?"":"Right");t1.prototype[r]=function(){return this.__filtered__?new t1(this):this[s](1)}}),t1.prototype.compact=function(){return this.filter(y4)},t1.prototype.find=function(r){return this.filter(r).head()},t1.prototype.findLast=function(r){return this.reverse().find(r)},t1.prototype.invokeMap=Ye(function(r,o){return typeof r=="function"?new t1(this):this.map(function(s){return j3(s,r,o)})}),t1.prototype.reject=function(r){return this.filter(Br(Re(r)))},t1.prototype.slice=function(r,o){r=ke(r);var s=this;return s.__filtered__&&(r>0||o<0)?new t1(s):(r<0?s=s.takeRight(-r):r&&(s=s.drop(r)),o!==t&&(o=ke(o),s=o<0?s.dropRight(-o):s.take(o-r)),s)},t1.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},t1.prototype.toArray=function(){return this.take(ne)},ht(t1.prototype,function(r,o){var s=/^(?:filter|find|map|reject)|While$/.test(o),p=/^(?:head|last)$/.test(o),O=V[p?"take"+(o=="last"?"Right":""):o],C=p||/^find/.test(o);O&&(V.prototype[o]=function(){var P=this.__wrapped__,W=p?[1]:arguments,X=P instanceof t1,oe=W[0],le=X||De(P),ue=function(Je){var n1=O.apply(V,Pt([Je],W));return p&&we?n1[0]:n1};le&&s&&typeof oe=="function"&&oe.length!=1&&(X=le=!1);var we=this.__chain__,ye=!!this.__actions__.length,Se=C&&!we,qe=X&&!ye;if(!C&&le){P=qe?P:new t1(this);var Fe=r.apply(P,W);return Fe.__actions__.push({func:_r,args:[ue],thisArg:t}),new W4(Fe,we)}return Se&&qe?r.apply(this,W):(Fe=this.thru(ue),Se?p?Fe.value()[0]:Fe.value():Fe)})}),j4(["pop","push","shift","sort","splice","unshift"],function(r){var o=or[r],s=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",p=/^(?:pop|shift)$/.test(r);V.prototype[r]=function(){var O=arguments;if(p&&!this.__chain__){var C=this.value();return o.apply(De(C)?C:[],O)}return this[s](function(P){return o.apply(De(P)?P:[],O)})}}),ht(t1.prototype,function(r,o){var s=V[o];if(s){var p=s.name+"";f1.call(W2,p)||(W2[p]=[]),W2[p].push({name:o,func:s})}}),W2[Mr(t,x).name]=[{name:"wrapper",func:t}],t1.prototype.clone=F6e,t1.prototype.reverse=H6e,t1.prototype.value=$6e,V.prototype.at=sie,V.prototype.chain=uie,V.prototype.commit=die,V.prototype.next=fie,V.prototype.plant=hie,V.prototype.reverse=mie,V.prototype.toJSON=V.prototype.valueOf=V.prototype.value=pie,V.prototype.first=V.prototype.head,I3&&(V.prototype[I3]=vie),V},k2=d6e();i2?((i2.exports=k2)._=k2,o0._=k2):a4._=k2}).call(D3e)}(z3,z3.exports)),z3.exports}var b3=B3e();const I6=va(b3),A3e=(n,e)=>{const t=n.field.split("."),i=e==null?void 0:e.getFieldValue(t),c=n.value,l=n.operator||"=";if(!c)return Array.isArray(i)?i.length>0:!!i;const v={"=":()=>Array.isArray(c)?c.includes(i):i===c,"!=":()=>Array.isArray(c)?!c.includes(i):i!==c,">":()=>i>c,"<":()=>i<c,">=":()=>i>=c,"<=":()=>i<=c,includes:()=>Array.isArray(i)?Array.isArray(c)?i.some(h=>c.includes(h)):i.includes(c):typeof i=="string"?Array.isArray(c)?c.some(h=>i.includes(h)):i.includes(c):!1}[l];return v?v():!1},P3e=n=>{var R,M,E;let e=(R=n==null?void 0:n.id)==null?void 0:R.split("."),t=de.Form.useWatch(e,n.formRef);const[i,c]=y.useState(!!n.lookupFetcher),l={textarea:$M,string:vy,number:LM,color:S3e,date:xo,datetime:xo,time:_3e,checkbox:_M,switch:IM,select:T3e,password:F3e,radio:H3e,rate:$3e,slider:I3e,upload:L3e};async function d(){var x,b;if(n.lookupFetcher&&n.lookupKey){c(!0);const F=await((x=n.lookupFetcher)==null?void 0:x.call(n,n))||[];(b=n.updateLookupData)==null||b.call(n,n.lookupKey||"",F),c(!1)}}const v=["select","checkbox","radio","upload"],h=(n.enableWhen||[]).reduce((x,b)=>{var F;if(typeof b!="function"&&(b!=null&&b.field)){const H=(F=b==null?void 0:b.field)==null?void 0:F.split(".");x[b==null?void 0:b.field]=de.Form.useWatch(H,n.formRef)}return x},{}),m=y.useRef({}),g=b3.debounce(()=>{var F,H,S;const x=m.current;if(m.current=h,(F=n.suppressionRef)!=null&&F.current)return;const b=Object.keys(h).filter(I=>x[I]!==h[I]);if(b.length>0){let I=(H=n==null?void 0:n.id)==null?void 0:H.split(".");const $=n.resetOnDependencyChange??!1,D=n.resetOnDependencyEmpty??!0;if(n.enableWhen&&((S=n==null?void 0:n.enableWhen)==null?void 0:S.length)>0){let L=n.formRef;(L&&D&&(b!=null&&b.some(j=>{var q;if((q=n.resetIgnoreFields)!=null&&q.includes(j))return!1;{let Q=j==null?void 0:j.split("."),U=L==null?void 0:L.getFieldValue(Q);return Array.isArray(U)?U.length==0:!U}}))||L&&$&&(b!=null&&b.some(j=>{var q;return!((q=n.resetIgnoreFields)!=null&&q.includes(j))})))&&L.setFieldValue(I,void 0)}}},200),w=b3.debounce(d,200);y.useEffect(()=>(w(),g(),()=>{w.cancel(),g.cancel()}),[...((M=n.enableWhen)==null?void 0:M.map(x=>{if(typeof x!="function")return h[x==null?void 0:x.field]}))||[]]);const z=x=>{if(!x||(x==null?void 0:x.length)==0)return!1;{let b=n.formRef;return!x.every(F=>typeof F!="function"?F.evaluate&&typeof F.evaluate=="function"?F.evaluate(n):F!=null&&F.field?A3e(F,b):!0:F(n))}};return y.useMemo(()=>{var H;const x=l==null?void 0:l[n.inputType];let b=(H=n==null?void 0:n.id)==null?void 0:H.split("."),F={...n};return v.includes(n.inputType)||(F==null||delete F.lookupData,F==null||delete F.initialData,F==null||delete F.httpAgent,F==null||delete F.form),typeof(F==null?void 0:F.addonBefore)=="function"&&(F.addonBefore=F.addonBefore(n)),typeof(F==null?void 0:F.addonAfter)=="function"&&(F.addonAfter=F.addonAfter(n)),F==null||delete F.resetOnDependencyChange,F==null||delete F.resetOnDependencyEmpty,F==null||delete F.inputType,F==null||delete F.dataType,F==null||delete F.input,F==null||delete F.enableWhen,n.inputType==="hidden"?k.jsx(de.Form.Item,{name:b,noStyle:!0}):x?k.jsx(de.Form.Item,{colon:typeof n.colon=="boolean"?n.colon:!0,className:n.wrapperClassName,style:n.wrapperStyle,label:typeof n.label=="function"?n.label(F):n.label,name:b,tooltip:n.tooltip,rules:[{required:n.required,message:n.defaultErrorMessage??`${n.label} is required`},...n.validators??[]],getValueProps:S=>(n.inputType==="date"&&fa(S).isValid()&&S&&(S=fa(S)),{value:S}),layout:n.layout??void 0,...n.inputType==="upload"?{valuePropName:"fileList",getValueFromEvent:S=>S.fileList}:{},...n.inputType==="color"?{getValueFromEvent:S=>S.toHexString()}:{},children:k.jsx(x,{loading:i,...F,form:n.formRef,data:t,disabled:n.disabled||z(n.enableWhen)})}):k.jsxs("div",{children:["Unknown Input Type - ",n.inputType]})},[n.id,t,n.lookupData,n.readOnly,n.disabled,i,...((E=n.enableWhen)==null?void 0:E.map(x=>{if(typeof x!="function")return h[x==null?void 0:x.field]}))||[]])},k3e=({children:n=[],label:e="",id:t="",className:i="",style:c={},section_id:l="",wrapperClassName:d="",wrapperStyle:v={},collapsible:h=!0,labelPlacement:m="start",labelMargin:g=0,showHeader:w=!0,showDivider:z=!0,expandIcon:N=null,collapseIcon:R=null,tooltip:M=null,...E})=>{var D;const[x,b]=y.useState(!0),[F,H]=y.useState("auto"),S=y.useRef(null);y.useEffect(()=>{if(!S.current)return;const L=()=>{S.current&&H(`${S.current.scrollHeight}px`)};L();const j=new ResizeObserver(()=>{L()});j.observe(S.current);const q=new MutationObserver(()=>{setTimeout(L,0)});return q.observe(S.current,{childList:!0,subtree:!0,attributes:!0}),()=>{j.disconnect(),q.disconnect()}},[]);const I={maxHeight:x?F:"0px",overflow:"hidden",transition:"max-height 0.3s ease-in-out",opacity:x?1:0,transform:`translateY(${x?"0":"-10px"})`},$=L=>k.jsxs("div",{className:`antd-form-section-wrapper ${d}`,style:{...v},children:[w&&(z?k.jsx(de.Divider,{orientation:m,orientationMargin:g,className:i,children:k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",...c},children:[h&&k.jsx(k.Fragment,{children:N&&R?k.jsx("div",{style:h?{transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:x?N:R}):k.jsx("div",{style:h?{transform:`rotate(${x?"0deg":"-90deg"})`,transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:k.jsx(Hn,{})})}),k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[" ",k.jsx("span",{style:h?{cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:e}),M&&k.jsx(de.Tooltip,{title:M,children:k.jsx(T6,{style:{opacity:.5}})})]})]})}):k.jsxs("div",{className:i,style:{margin:"16px 0",display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",...c},children:[h&&k.jsx(k.Fragment,{children:N&&R?k.jsx("div",{style:h?{transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:x?N:R}):k.jsx("div",{style:h?{transform:`rotate(${x?"0deg":"-90deg"})`,transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:k.jsx(Hn,{})})}),k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[" ",k.jsx("span",{style:h?{cursor:"pointer"}:{},onClick:()=>h&&b(!x),children:e}),M&&k.jsx(de.Tooltip,{title:M,children:k.jsx(C6,{style:{opacity:.5}})})]})]})),k.jsx("div",{style:I,children:k.jsx("div",{ref:S,children:k.jsx(In,{...E,items:L},t)})})]});if(l){const L=(D=E.sections)==null?void 0:D.find(j=>j.id===l);if(L)return $((L==null?void 0:L.items)||[])}else if(n&&n.length>0)return $(n);return k.jsx(k.Fragment,{})},j3e=(n,e)=>{const t=n.field.split("."),i=e==null?void 0:e.getFieldValue(t),c=n.value,l=n.operator||"=";if(console.log("fieldValue",i),!c)return Array.isArray(i)?i.length>0:!!i;const v={"=":()=>Array.isArray(c)?c.includes(i):i===c,"!=":()=>Array.isArray(c)?!c.includes(i):i!==c,">":()=>i>c,"<":()=>i<c,">=":()=>i>=c,"<=":()=>i<=c,includes:()=>Array.isArray(i)?Array.isArray(c)?i.some(h=>c.includes(h)):i.includes(c):typeof i=="string"?Array.isArray(c)?c.some(h=>i.includes(h)):i.includes(c):!1}[l];return v?v():!1},In=n=>{var t;const e=((t=n==null?void 0:n.items)==null?void 0:t.sort((i,c)=>(i.sequence??9999)-(c.sequence??9999)))??[];return k.jsx(k.Fragment,{children:e.map(({displayWhen:i,...c})=>{if(i&&!i.every(l=>l!=null&&l.field?typeof l!="function"?l.evaluate&&typeof l.evaluate=="function"?l.evaluate(n):j3e(l,n.formRef):l(n):!0))return null;if("dataType"in c&&c.type==="input")return k.jsx(P3e,{initialData:n.initialData,resetOnDependencyChange:n.resetOnDependencyChange,resetOnDependencyEmpty:n.resetOnDependencyEmpty,disabled:n.disabled,readOnly:n.readOnly,...c,formRef:n.formRef,httpAgent:n.httpAgent,lookupData:n.lookupData,suppressionRef:n.suppressionRef,updateLookupData:n.updateLookupData},c.key||c.id);if(c.type==="section")return k.jsx(k3e,{...n,...c});if(c.type==="grid")return k.jsx(fy,{...n,...c},c.key||c.id);if(c.type==="flex")return k.jsx(dy,{...n,...c},c.key||c.id);if(c.type==="divider")return k.jsx(de.Divider,{...c,type:c.orientation||"horizontal",orientation:c.labelPlacement||"center",dashed:c.dashed,children:c.label},c.key||c.id);if(c.type==="custom"&&typeof(c==null?void 0:c.render)=="function")return c.render(n)})})},PO=n=>typeof n=="object"&&n!=null&&n.nodeType===1,kO=(n,e)=>(!e||n!=="hidden")&&n!=="visible"&&n!=="clip",Ln=(n,e)=>{if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){const t=getComputedStyle(n,null);return kO(t.overflowY,e)||kO(t.overflowX,e)||(i=>{const c=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!c&&(c.clientHeight<i.scrollHeight||c.clientWidth<i.scrollWidth)})(n)}return!1},Dn=(n,e,t,i,c,l,d,v)=>l<n&&d>e||l>n&&d<e?0:l<=n&&v<=t||d>=e&&v>=t?l-n-i:d>e&&v<t||l<n&&v>t?d-e+c:0,q3e=n=>{const e=n.parentElement;return e??(n.getRootNode().host||null)},jO=(n,e)=>{var t,i,c,l;if(typeof document>"u")return[];const{scrollMode:d,block:v,inline:h,boundary:m,skipOverflowHiddenElements:g}=e,w=typeof m=="function"?m:_=>_!==m;if(!PO(n))throw new TypeError("Invalid target");const z=document.scrollingElement||document.documentElement,N=[];let R=n;for(;PO(R)&&w(R);){if(R=q3e(R),R===z){N.push(R);break}R!=null&&R===document.body&&Ln(R)&&!Ln(document.documentElement)||R!=null&&Ln(R,g)&&N.push(R)}const M=(i=(t=window.visualViewport)==null?void 0:t.width)!=null?i:innerWidth,E=(l=(c=window.visualViewport)==null?void 0:c.height)!=null?l:innerHeight,{scrollX:x,scrollY:b}=window,{height:F,width:H,top:S,right:I,bottom:$,left:D}=n.getBoundingClientRect(),{top:L,right:j,bottom:q,left:Q}=(_=>{const T=window.getComputedStyle(_);return{top:parseFloat(T.scrollMarginTop)||0,right:parseFloat(T.scrollMarginRight)||0,bottom:parseFloat(T.scrollMarginBottom)||0,left:parseFloat(T.scrollMarginLeft)||0}})(n);let U=v==="start"||v==="nearest"?S-L:v==="end"?$+q:S+F/2-L+q,G=h==="center"?D+H/2-Q+j:h==="end"?I+j:D-Q;const re=[];for(let _=0;_<N.length;_++){const T=N[_],{height:A,width:K,top:J,right:ne,bottom:te,left:se}=T.getBoundingClientRect();if(d==="if-needed"&&S>=0&&D>=0&&$<=E&&I<=M&&(T===z&&!Ln(T)||S>=J&&$<=te&&D>=se&&I<=ne))return re;const ve=getComputedStyle(T),me=parseInt(ve.borderLeftWidth,10),ge=parseInt(ve.borderTopWidth,10),xe=parseInt(ve.borderRightWidth,10),be=parseInt(ve.borderBottomWidth,10);let Oe=0,pe=0;const Ce="offsetWidth"in T?T.offsetWidth-T.clientWidth-me-xe:0,Me="offsetHeight"in T?T.offsetHeight-T.clientHeight-ge-be:0,Ue="offsetWidth"in T?T.offsetWidth===0?0:K/T.offsetWidth:0,fe="offsetHeight"in T?T.offsetHeight===0?0:A/T.offsetHeight:0;if(z===T)Oe=v==="start"?U:v==="end"?U-E:v==="nearest"?Dn(b,b+E,E,ge,be,b+U,b+U+F,F):U-E/2,pe=h==="start"?G:h==="center"?G-M/2:h==="end"?G-M:Dn(x,x+M,M,me,xe,x+G,x+G+H,H),Oe=Math.max(0,Oe+b),pe=Math.max(0,pe+x);else{Oe=v==="start"?U-J-ge:v==="end"?U-te+be+Me:v==="nearest"?Dn(J,te,A,ge,be+Me,U,U+F,F):U-(J+A/2)+Me/2,pe=h==="start"?G-se-me:h==="center"?G-(se+K/2)+Ce/2:h==="end"?G-ne+xe+Ce:Dn(se,ne,K,me,xe+Ce,G,G+H,H);const{scrollLeft:Be,scrollTop:ze}=T;Oe=fe===0?0:Math.max(0,Math.min(ze+Oe/fe,T.scrollHeight-A/fe+Me)),pe=Ue===0?0:Math.max(0,Math.min(Be+pe/Ue,T.scrollWidth-K/Ue+Ce)),U+=ze-Oe,G+=Be-pe}re.push({el:T,top:Oe,left:pe})}return re},W3e=n=>n===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(n)?n:{block:"start",inline:"nearest"};function U3e(n,e){if(!n.isConnected||!(c=>{let l=c;for(;l&&l.parentNode;){if(l.parentNode===document)return!0;l=l.parentNode instanceof ShadowRoot?l.parentNode.host:l.parentNode}return!1})(n))return;const t=(c=>{const l=window.getComputedStyle(c);return{top:parseFloat(l.scrollMarginTop)||0,right:parseFloat(l.scrollMarginRight)||0,bottom:parseFloat(l.scrollMarginBottom)||0,left:parseFloat(l.scrollMarginLeft)||0}})(n);if((c=>typeof c=="object"&&typeof c.behavior=="function")(e))return e.behavior(jO(n,e));const i=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:c,top:l,left:d}of jO(n,W3e(e))){const v=l-t.top+t.bottom,h=d-t.left+t.right;c.scroll({top:v,left:h,behavior:i})}}const G3e=["parentNode"],Y3e="form_item";function qO(n){return n===void 0||n===!1?[]:Array.isArray(n)?n:[n]}function K3e(n,e){if(!n.length)return;const t=n.join("_");return e?`${e}_${t}`:G3e.includes(t)?`${Y3e}_${t}`:t}var X3e=function(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(n);c<i.length;c++)e.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(n,i[c])&&(t[i[c]]=n[i[c]]);return t};function WO(n){return qO(n).join("_")}function UO(n,e){const t=e.getFieldInstance(n),i=$a(t);if(i)return i;const c=K3e(qO(n),e.__INTERNAL__.name);if(c)return document.getElementById(c)}function GO(n){const[e]=d6(),t=a.useRef({}),i=a.useMemo(()=>n??Object.assign(Object.assign({},e),{__INTERNAL__:{itemRef:c=>l=>{const d=WO(c);l?t.current[d]=l:delete t.current[d]}},scrollToField:(c,l={})=>{const{focus:d}=l,v=X3e(l,["focus"]),h=UO(c,i);h&&(U3e(h,Object.assign({scrollMode:"if-needed",block:"nearest"},v)),d&&i.focusField(c))},focusField:c=>{var l,d;const v=i.getFieldInstance(c);typeof(v==null?void 0:v.focus)=="function"?v.focus():(d=(l=UO(c,i))===null||l===void 0?void 0:l.focus)===null||d===void 0||d.call(l)},getFieldInstance:c=>{const l=WO(c);return t.current[l]}}),[n,e]);return[i]}const Bn={};function Z3e({name:n}){const e=St("Form");a.useEffect(()=>{if(n)return Bn[n]=(Bn[n]||0)+1,process.env.NODE_ENV!=="production"&&e(Bn[n]<=1,"usage","There exist multiple Form with same `name`."),()=>{Bn[n]-=1}},[n])}const Q3e=n=>({[n.componentCls]:{[`${n.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${n.motionDurationMid} ${n.motionEaseInOut},
207
207
  opacity ${n.motionDurationMid} ${n.motionEaseInOut} !important`}},[`${n.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${n.motionDurationMid} ${n.motionEaseInOut},
208
208
  opacity ${n.motionDurationMid} ${n.motionEaseInOut} !important`}}}),YO=new _4("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}});new _4("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),new _4("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),new _4("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),new _4("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),new _4("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),new _4("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),new _4("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),new _4("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),new _4("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),new _4("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),new _4("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}});const J3e=n=>{const{componentCls:e}=n,t=`${e}-show-help`,i=`${e}-show-help-item`;return{[t]:{transition:`opacity ${n.motionDurationFast} ${n.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[i]:{overflow:"hidden",transition:`height ${n.motionDurationFast} ${n.motionEaseInOut},
209
209
  opacity ${n.motionDurationFast} ${n.motionEaseInOut},
@@ -44,6 +44,7 @@ export type TEnableConditionFunction = (props: TFormGeneralProps) => boolean;
44
44
  export type TEnableConditionItem = TEnableCondition | TEnableConditionFunction;
45
45
  export type TInput = {
46
46
  id: string;
47
+ key?: string;
47
48
  type: ELayoutType.input | "input";
48
49
  dataType: EDataType | "string" | "number" | "date" | "datetime" | "time" | "boolean" | "object";
49
50
  label: string | ((props: TFormGeneralProps) => ReactNode);
@@ -7,6 +7,7 @@ export type WrapperTooltipProps = TooltipProps & {
7
7
  };
8
8
  export type TSectionLayout = {
9
9
  id: string;
10
+ key?: string;
10
11
  type: ELayoutType.section | "section";
11
12
  label: ReactNode;
12
13
  tooltip?: React.ReactElement | string | null;
@@ -24,16 +25,19 @@ export type TSectionLayout = {
24
25
  };
25
26
  export type TFlexLayout = {
26
27
  id: string;
28
+ key?: string;
27
29
  type: ELayoutType.flex | "flex";
28
30
  children: TFormItems;
29
31
  };
30
32
  export type TGridLayout = {
31
33
  id: string;
34
+ key?: string;
32
35
  type: ELayoutType.grid | "grid";
33
36
  children: TFormItems;
34
37
  };
35
38
  export type TDivider = {
36
39
  id: string;
40
+ key?: string;
37
41
  label?: ReactNode;
38
42
  type: ELayoutType.divider | "divider";
39
43
  labelPlacement?: "start" | "center" | "left" | "right" | "end";
@@ -42,6 +46,7 @@ export type TDivider = {
42
46
  };
43
47
  export type TCustom = {
44
48
  id: string;
49
+ key?: string;
45
50
  type: ELayoutType.custom | "custom";
46
51
  render: (props: any) => ReactNode;
47
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formifex",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "author": "Perry Pue Khim Min (perry@rajang.com)",
6
6
  "main": "./dist/index.umd.js",