@beinformed/ui 2.0.0-beta.1 → 2.0.0-beta.2
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/CHANGELOG.md +6 -0
- package/dist/{Constants-Cw7d8vue.d.cts → Constants-CYAEbTZ4.d.cts} +13 -1
- package/dist/{Constants-Cw7d8vue.d.ts → Constants-CYAEbTZ4.d.ts} +13 -1
- package/dist/{FormModel-VQaB1SCS.d.ts → FormModel-Cmzm2g7k.d.ts} +1 -1
- package/dist/{FormModel-DnizzHJs.d.cts → FormModel-Qa655sE-.d.cts} +1 -1
- package/dist/chunk-24FITWGX.js +2 -0
- package/dist/{chunk-WVQSFYWD.js.map → chunk-24FITWGX.js.map} +1 -1
- package/dist/chunk-4BYHEGUN.js +2 -0
- package/dist/{chunk-6GV6KLAV.js.map → chunk-4BYHEGUN.js.map} +1 -1
- package/dist/chunk-GDEYM54A.js +2 -0
- package/dist/chunk-GDEYM54A.js.map +1 -0
- package/dist/{chunk-VIKUDFQV.js → chunk-GHQP5QNP.js} +2 -2
- package/dist/{chunk-UE323PGR.js → chunk-NOB2I3DW.js} +2 -2
- package/dist/{chunk-KCZQQTX6.js → chunk-QTZ77JJN.js} +2 -2
- package/dist/{chunk-LCMAAW7B.js → chunk-RI2O4J7J.js} +2 -2
- package/dist/chunk-SFI46XCV.js +2 -0
- package/dist/{chunk-OBB3YOFC.js.map → chunk-SFI46XCV.js.map} +1 -1
- package/dist/chunk-VLKSMXSB.js +2 -0
- package/dist/chunk-VLKSMXSB.js.map +1 -0
- package/dist/{chunk-333J3Q2L.js → chunk-WHWNPOV6.js} +2 -2
- package/dist/{chunk-ZDZHA43Q.js → chunk-XWOLLK42.js} +2 -2
- package/dist/{chunk-YOBCFXEM.js → chunk-Y3XZHSPE.js} +2 -2
- package/dist/constants/index.cjs +1 -1
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +6 -2
- package/dist/constants/index.d.ts +6 -2
- package/dist/constants/index.js +1 -1
- package/dist/exceptions/index.cjs +1 -1
- package/dist/exceptions/index.d.cts +3 -3
- package/dist/exceptions/index.d.ts +3 -3
- package/dist/exceptions/index.js +1 -1
- package/dist/{index-BFD-cKUB.d.cts → index-BxJE8Lob.d.ts} +1 -1
- package/dist/{index-CEg8Nt57.d.ts → index-RuAoNZgc.d.cts} +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/layouthints/index.cjs +7 -7
- package/dist/layouthints/index.cjs.map +1 -1
- package/dist/layouthints/index.d.cts +2 -2
- package/dist/layouthints/index.d.ts +2 -2
- package/dist/layouthints/index.js +1 -1
- package/dist/models/index.cjs +4 -4
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.d.cts +5 -5
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js +1 -1
- package/dist/modularui/index.cjs +6 -6
- package/dist/modularui/index.cjs.map +1 -1
- package/dist/modularui/index.d.cts +35 -8
- package/dist/modularui/index.d.ts +35 -8
- package/dist/modularui/index.js +1 -1
- package/dist/settings/index.cjs +1 -1
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.d.cts +5 -1
- package/dist/settings/index.d.ts +5 -1
- package/dist/settings/index.js +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/utils/index.cjs +8 -8
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-5BR5HMNQ.js +0 -2
- package/dist/chunk-5BR5HMNQ.js.map +0 -1
- package/dist/chunk-6GV6KLAV.js +0 -2
- package/dist/chunk-BTDN4ZDB.js +0 -2
- package/dist/chunk-BTDN4ZDB.js.map +0 -1
- package/dist/chunk-OBB3YOFC.js +0 -2
- package/dist/chunk-WVQSFYWD.js +0 -2
- /package/dist/{chunk-VIKUDFQV.js.map → chunk-GHQP5QNP.js.map} +0 -0
- /package/dist/{chunk-UE323PGR.js.map → chunk-NOB2I3DW.js.map} +0 -0
- /package/dist/{chunk-KCZQQTX6.js.map → chunk-QTZ77JJN.js.map} +0 -0
- /package/dist/{chunk-LCMAAW7B.js.map → chunk-RI2O4J7J.js.map} +0 -0
- /package/dist/{chunk-333J3Q2L.js.map → chunk-WHWNPOV6.js.map} +0 -0
- /package/dist/{chunk-ZDZHA43Q.js.map → chunk-XWOLLK42.js.map} +0 -0
- /package/dist/{chunk-YOBCFXEM.js.map → chunk-Y3XZHSPE.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var ax=Object.create;var ea=Object.defineProperty;var ux=Object.getOwnPropertyDescriptor;var lx=Object.getOwnPropertyNames;var cx=Object.getPrototypeOf,hx=Object.prototype.hasOwnProperty;var S=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports),px=(o,t)=>{for(var e in t)ea(o,e,{get:t[e],enumerable:!0})},Np=(o,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of lx(t))!hx.call(o,a)&&a!==e&&ea(o,a,{get:()=>t[a],enumerable:!(n=ux(t,a))||n.enumerable});return o};var Y=(o,t,e)=>(e=o!=null?ax(cx(o)):{},Np(t||!o||!o.__esModule?ea(e,"default",{value:o,enumerable:!0}):e,o)),fx=o=>Np(ea({},"__esModule",{value:!0}),o);var Hp=S((FO,Pp)=>{"use strict";var yx=Object.prototype,bx=yx.hasOwnProperty;function Cx(o,t){return o!=null&&bx.call(o,t)}Pp.exports=Cx});var Ii=S((NO,Bp)=>{"use strict";var _x=Array.isArray;Bp.exports=_x});var Vp=S((PO,Up)=>{"use strict";var Ax=typeof global=="object"&&global&&global.Object===Object&&global;Up.exports=Ax});var na=S((HO,jp)=>{"use strict";var vx=Vp(),Mx=typeof self=="object"&&self&&self.Object===Object&&self,xx=vx||Mx||Function("return this")();jp.exports=xx});var An=S((BO,Wp)=>{"use strict";var Ex=na(),Tx=Ex.Symbol;Wp.exports=Tx});var Kp=S((UO,$p)=>{"use strict";var Gp=An(),qp=Object.prototype,Sx=qp.hasOwnProperty,Ox=qp.toString,vn=Gp?Gp.toStringTag:void 0;function Dx(o){var t=Sx.call(o,vn),e=o[vn];try{o[vn]=void 0;var n=!0}catch{}var a=Ox.call(o);return n&&(t?o[vn]=e:delete o[vn]),a}$p.exports=Dx});var Xp=S((VO,zp)=>{"use strict";var Ix=Object.prototype,Rx=Ix.toString;function Lx(o){return Rx.call(o)}zp.exports=Lx});var Mn=S((jO,Zp)=>{"use strict";var Jp=An(),wx=Kp(),kx=Xp(),Fx="[object Null]",Nx="[object Undefined]",Yp=Jp?Jp.toStringTag:void 0;function Px(o){return o==null?o===void 0?Nx:Fx:Yp&&Yp in Object(o)?wx(o):kx(o)}Zp.exports=Px});var xn=S((WO,Qp)=>{"use strict";function Hx(o){return o!=null&&typeof o=="object"}Qp.exports=Hx});var sa=S((GO,tf)=>{"use strict";var Bx=Mn(),Ux=xn(),Vx="[object Symbol]";function jx(o){return typeof o=="symbol"||Ux(o)&&Bx(o)==Vx}tf.exports=jx});var rf=S((qO,ef)=>{"use strict";var Wx=Ii(),Gx=sa(),qx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$x=/^\w*$/;function Kx(o,t){if(Wx(o))return!1;var e=typeof o;return e=="number"||e=="symbol"||e=="boolean"||o==null||Gx(o)?!0:$x.test(o)||!qx.test(o)||t!=null&&o in Object(t)}ef.exports=Kx});var il=S(($O,nf)=>{"use strict";function zx(o){var t=typeof o;return o!=null&&(t=="object"||t=="function")}nf.exports=zx});var of=S((KO,sf)=>{"use strict";var Xx=Mn(),Jx=il(),Yx="[object AsyncFunction]",Zx="[object Function]",Qx="[object GeneratorFunction]",tE="[object Proxy]";function eE(o){if(!Jx(o))return!1;var t=Xx(o);return t==Zx||t==Qx||t==Yx||t==tE}sf.exports=eE});var uf=S((zO,af)=>{"use strict";var rE=na(),iE=rE["__core-js_shared__"];af.exports=iE});var hf=S((XO,cf)=>{"use strict";var nl=uf(),lf=(function(){var o=/[^.]+$/.exec(nl&&nl.keys&&nl.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function nE(o){return!!lf&&lf in o}cf.exports=nE});var ff=S((JO,pf)=>{"use strict";var sE=Function.prototype,oE=sE.toString;function aE(o){if(o!=null){try{return oE.call(o)}catch{}try{return o+""}catch{}}return""}pf.exports=aE});var mf=S((YO,df)=>{"use strict";var uE=of(),lE=hf(),cE=il(),hE=ff(),pE=/[\\^$.*+?()[\]{}|]/g,fE=/^\[object .+?Constructor\]$/,dE=Function.prototype,mE=Object.prototype,gE=dE.toString,yE=mE.hasOwnProperty,bE=RegExp("^"+gE.call(yE).replace(pE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function CE(o){if(!cE(o)||lE(o))return!1;var t=uE(o)?bE:fE;return t.test(hE(o))}df.exports=CE});var yf=S((ZO,gf)=>{"use strict";function _E(o,t){return o?.[t]}gf.exports=_E});var sl=S((QO,bf)=>{"use strict";var AE=mf(),vE=yf();function ME(o,t){var e=vE(o,t);return AE(e)?e:void 0}bf.exports=ME});var En=S((tD,Cf)=>{"use strict";var xE=sl(),EE=xE(Object,"create");Cf.exports=EE});var vf=S((eD,Af)=>{"use strict";var _f=En();function TE(){this.__data__=_f?_f(null):{},this.size=0}Af.exports=TE});var xf=S((rD,Mf)=>{"use strict";function SE(o){var t=this.has(o)&&delete this.__data__[o];return this.size-=t?1:0,t}Mf.exports=SE});var Tf=S((iD,Ef)=>{"use strict";var OE=En(),DE="__lodash_hash_undefined__",IE=Object.prototype,RE=IE.hasOwnProperty;function LE(o){var t=this.__data__;if(OE){var e=t[o];return e===DE?void 0:e}return RE.call(t,o)?t[o]:void 0}Ef.exports=LE});var Of=S((nD,Sf)=>{"use strict";var wE=En(),kE=Object.prototype,FE=kE.hasOwnProperty;function NE(o){var t=this.__data__;return wE?t[o]!==void 0:FE.call(t,o)}Sf.exports=NE});var If=S((sD,Df)=>{"use strict";var PE=En(),HE="__lodash_hash_undefined__";function BE(o,t){var e=this.__data__;return this.size+=this.has(o)?0:1,e[o]=PE&&t===void 0?HE:t,this}Df.exports=BE});var Lf=S((oD,Rf)=>{"use strict";var UE=vf(),VE=xf(),jE=Tf(),WE=Of(),GE=If();function Ri(o){var t=-1,e=o==null?0:o.length;for(this.clear();++t<e;){var n=o[t];this.set(n[0],n[1])}}Ri.prototype.clear=UE;Ri.prototype.delete=VE;Ri.prototype.get=jE;Ri.prototype.has=WE;Ri.prototype.set=GE;Rf.exports=Ri});var kf=S((aD,wf)=>{"use strict";function qE(){this.__data__=[],this.size=0}wf.exports=qE});var Nf=S((uD,Ff)=>{"use strict";function $E(o,t){return o===t||o!==o&&t!==t}Ff.exports=$E});var Tn=S((lD,Pf)=>{"use strict";var KE=Nf();function zE(o,t){for(var e=o.length;e--;)if(KE(o[e][0],t))return e;return-1}Pf.exports=zE});var Bf=S((cD,Hf)=>{"use strict";var XE=Tn(),JE=Array.prototype,YE=JE.splice;function ZE(o){var t=this.__data__,e=XE(t,o);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():YE.call(t,e,1),--this.size,!0}Hf.exports=ZE});var Vf=S((hD,Uf)=>{"use strict";var QE=Tn();function tT(o){var t=this.__data__,e=QE(t,o);return e<0?void 0:t[e][1]}Uf.exports=tT});var Wf=S((pD,jf)=>{"use strict";var eT=Tn();function rT(o){return eT(this.__data__,o)>-1}jf.exports=rT});var qf=S((fD,Gf)=>{"use strict";var iT=Tn();function nT(o,t){var e=this.__data__,n=iT(e,o);return n<0?(++this.size,e.push([o,t])):e[n][1]=t,this}Gf.exports=nT});var Kf=S((dD,$f)=>{"use strict";var sT=kf(),oT=Bf(),aT=Vf(),uT=Wf(),lT=qf();function Li(o){var t=-1,e=o==null?0:o.length;for(this.clear();++t<e;){var n=o[t];this.set(n[0],n[1])}}Li.prototype.clear=sT;Li.prototype.delete=oT;Li.prototype.get=aT;Li.prototype.has=uT;Li.prototype.set=lT;$f.exports=Li});var Xf=S((mD,zf)=>{"use strict";var cT=sl(),hT=na(),pT=cT(hT,"Map");zf.exports=pT});var Zf=S((gD,Yf)=>{"use strict";var Jf=Lf(),fT=Kf(),dT=Xf();function mT(){this.size=0,this.__data__={hash:new Jf,map:new(dT||fT),string:new Jf}}Yf.exports=mT});var td=S((yD,Qf)=>{"use strict";function gT(o){var t=typeof o;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?o!=="__proto__":o===null}Qf.exports=gT});var Sn=S((bD,ed)=>{"use strict";var yT=td();function bT(o,t){var e=o.__data__;return yT(t)?e[typeof t=="string"?"string":"hash"]:e.map}ed.exports=bT});var id=S((CD,rd)=>{"use strict";var CT=Sn();function _T(o){var t=CT(this,o).delete(o);return this.size-=t?1:0,t}rd.exports=_T});var sd=S((_D,nd)=>{"use strict";var AT=Sn();function vT(o){return AT(this,o).get(o)}nd.exports=vT});var ad=S((AD,od)=>{"use strict";var MT=Sn();function xT(o){return MT(this,o).has(o)}od.exports=xT});var ld=S((vD,ud)=>{"use strict";var ET=Sn();function TT(o,t){var e=ET(this,o),n=e.size;return e.set(o,t),this.size+=e.size==n?0:1,this}ud.exports=TT});var hd=S((MD,cd)=>{"use strict";var ST=Zf(),OT=id(),DT=sd(),IT=ad(),RT=ld();function wi(o){var t=-1,e=o==null?0:o.length;for(this.clear();++t<e;){var n=o[t];this.set(n[0],n[1])}}wi.prototype.clear=ST;wi.prototype.delete=OT;wi.prototype.get=DT;wi.prototype.has=IT;wi.prototype.set=RT;cd.exports=wi});var dd=S((xD,fd)=>{"use strict";var pd=hd(),LT="Expected a function";function ol(o,t){if(typeof o!="function"||t!=null&&typeof t!="function")throw new TypeError(LT);var e=function(){var n=arguments,a=t?t.apply(this,n):n[0],l=e.cache;if(l.has(a))return l.get(a);var d=o.apply(this,n);return e.cache=l.set(a,d)||l,d};return e.cache=new(ol.Cache||pd),e}ol.Cache=pd;fd.exports=ol});var gd=S((ED,md)=>{"use strict";var wT=dd(),kT=500;function FT(o){var t=wT(o,function(n){return e.size===kT&&e.clear(),n}),e=t.cache;return t}md.exports=FT});var bd=S((TD,yd)=>{"use strict";var NT=gd(),PT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,HT=/\\(\\)?/g,BT=NT(function(o){var t=[];return o.charCodeAt(0)===46&&t.push(""),o.replace(PT,function(e,n,a,l){t.push(a?l.replace(HT,"$1"):n||e)}),t});yd.exports=BT});var _d=S((SD,Cd)=>{"use strict";function UT(o,t){for(var e=-1,n=o==null?0:o.length,a=Array(n);++e<n;)a[e]=t(o[e],e,o);return a}Cd.exports=UT});var Td=S((OD,Ed)=>{"use strict";var Ad=An(),VT=_d(),jT=Ii(),WT=sa(),GT=1/0,vd=Ad?Ad.prototype:void 0,Md=vd?vd.toString:void 0;function xd(o){if(typeof o=="string")return o;if(jT(o))return VT(o,xd)+"";if(WT(o))return Md?Md.call(o):"";var t=o+"";return t=="0"&&1/o==-GT?"-0":t}Ed.exports=xd});var Od=S((DD,Sd)=>{"use strict";var qT=Td();function $T(o){return o==null?"":qT(o)}Sd.exports=$T});var Id=S((ID,Dd)=>{"use strict";var KT=Ii(),zT=rf(),XT=bd(),JT=Od();function YT(o,t){return KT(o)?o:zT(o,t)?[o]:XT(JT(o))}Dd.exports=YT});var Ld=S((RD,Rd)=>{"use strict";var ZT=Mn(),QT=xn(),tS="[object Arguments]";function eS(o){return QT(o)&&ZT(o)==tS}Rd.exports=eS});var al=S((LD,Fd)=>{"use strict";var wd=Ld(),rS=xn(),kd=Object.prototype,iS=kd.hasOwnProperty,nS=kd.propertyIsEnumerable,sS=wd((function(){return arguments})())?wd:function(o){return rS(o)&&iS.call(o,"callee")&&!nS.call(o,"callee")};Fd.exports=sS});var Pd=S((wD,Nd)=>{"use strict";var oS=9007199254740991,aS=/^(?:0|[1-9]\d*)$/;function uS(o,t){var e=typeof o;return t=t??oS,!!t&&(e=="number"||e!="symbol"&&aS.test(o))&&o>-1&&o%1==0&&o<t}Nd.exports=uS});var Bd=S((kD,Hd)=>{"use strict";var lS=9007199254740991;function cS(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=lS}Hd.exports=cS});var Vd=S((FD,Ud)=>{"use strict";var hS=sa(),pS=1/0;function fS(o){if(typeof o=="string"||hS(o))return o;var t=o+"";return t=="0"&&1/o==-pS?"-0":t}Ud.exports=fS});var Wd=S((ND,jd)=>{"use strict";var dS=Id(),mS=al(),gS=Ii(),yS=Pd(),bS=Bd(),CS=Vd();function _S(o,t,e){t=dS(t,o);for(var n=-1,a=t.length,l=!1;++n<a;){var d=CS(t[n]);if(!(l=o!=null&&e(o,d)))break;o=o[d]}return l||++n!=a?l:(a=o==null?0:o.length,!!a&&bS(a)&&yS(d,a)&&(gS(o)||mS(o)))}jd.exports=_S});var ki=S((PD,Gd)=>{"use strict";var AS=Hp(),vS=Wd();function MS(o,t){return o!=null&&vS(o,t,AS)}Gd.exports=MS});var te=S((Ni,kn)=>{"use strict";(function(){var o,t="4.17.23",e=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",l="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",b=500,x="__lodash_placeholder__",D=1,gt=2,We=4,hi=1,oo=2,ie=1,Or=2,ic=4,Oe=8,pi=16,De=32,fi=64,Ge=128,Xi=256,Z=512,pg=30,fg="...",dg=800,mg=16,nc=1,gg=2,yg=3,Dr=1/0,hr=9007199254740991,bg=17976931348623157e292,ao=NaN,Ie=4294967295,Cg=Ie-1,_g=Ie>>>1,Ag=[["ary",Ge],["bind",ie],["bindKey",Or],["curry",Oe],["curryRight",pi],["flip",Z],["partial",De],["partialRight",fi],["rearg",Xi]],di="[object Arguments]",uo="[object Array]",vg="[object AsyncFunction]",Ji="[object Boolean]",Yi="[object Date]",Mg="[object DOMException]",lo="[object Error]",co="[object Function]",sc="[object GeneratorFunction]",de="[object Map]",Zi="[object Number]",xg="[object Null]",qe="[object Object]",oc="[object Promise]",Eg="[object Proxy]",Qi="[object RegExp]",me="[object Set]",tn="[object String]",ho="[object Symbol]",Tg="[object Undefined]",en="[object WeakMap]",Sg="[object WeakSet]",rn="[object ArrayBuffer]",mi="[object DataView]",Ma="[object Float32Array]",xa="[object Float64Array]",Ea="[object Int8Array]",Ta="[object Int16Array]",Sa="[object Int32Array]",Oa="[object Uint8Array]",Da="[object Uint8ClampedArray]",Ia="[object Uint16Array]",Ra="[object Uint32Array]",Og=/\b__p \+= '';/g,Dg=/\b(__p \+=) '' \+/g,Ig=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ac=/&(?:amp|lt|gt|quot|#39);/g,uc=/[&<>"']/g,Rg=RegExp(ac.source),Lg=RegExp(uc.source),wg=/<%-([\s\S]+?)%>/g,kg=/<%([\s\S]+?)%>/g,lc=/<%=([\s\S]+?)%>/g,Fg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ng=/^\w*$/,Pg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,La=/[\\^$.*+?()[\]{}|]/g,Hg=RegExp(La.source),wa=/^\s+/,Bg=/\s/,Ug=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vg=/\{\n\/\* \[wrapped with (.+)\] \*/,jg=/,? & /,Wg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Gg=/[()=,{}\[\]\/\s]/,qg=/\\(\\)?/g,$g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cc=/\w*$/,Kg=/^[-+]0x[0-9a-f]+$/i,zg=/^0b[01]+$/i,Xg=/^\[object .+?Constructor\]$/,Jg=/^0o[0-7]+$/i,Yg=/^(?:0|[1-9]\d*)$/,Zg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,po=/($^)/,Qg=/['\n\r\u2028\u2029\\]/g,fo="\\ud800-\\udfff",ty="\\u0300-\\u036f",ey="\\ufe20-\\ufe2f",ry="\\u20d0-\\u20ff",hc=ty+ey+ry,pc="\\u2700-\\u27bf",fc="a-z\\xdf-\\xf6\\xf8-\\xff",iy="\\xac\\xb1\\xd7\\xf7",ny="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",sy="\\u2000-\\u206f",oy=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dc="A-Z\\xc0-\\xd6\\xd8-\\xde",mc="\\ufe0e\\ufe0f",gc=iy+ny+sy+oy,ka="['\u2019]",ay="["+fo+"]",yc="["+gc+"]",mo="["+hc+"]",bc="\\d+",uy="["+pc+"]",Cc="["+fc+"]",_c="[^"+fo+gc+bc+pc+fc+dc+"]",Fa="\\ud83c[\\udffb-\\udfff]",ly="(?:"+mo+"|"+Fa+")",Ac="[^"+fo+"]",Na="(?:\\ud83c[\\udde6-\\uddff]){2}",Pa="[\\ud800-\\udbff][\\udc00-\\udfff]",gi="["+dc+"]",vc="\\u200d",Mc="(?:"+Cc+"|"+_c+")",cy="(?:"+gi+"|"+_c+")",xc="(?:"+ka+"(?:d|ll|m|re|s|t|ve))?",Ec="(?:"+ka+"(?:D|LL|M|RE|S|T|VE))?",Tc=ly+"?",Sc="["+mc+"]?",hy="(?:"+vc+"(?:"+[Ac,Na,Pa].join("|")+")"+Sc+Tc+")*",py="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fy="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Oc=Sc+Tc+hy,dy="(?:"+[uy,Na,Pa].join("|")+")"+Oc,my="(?:"+[Ac+mo+"?",mo,Na,Pa,ay].join("|")+")",gy=RegExp(ka,"g"),yy=RegExp(mo,"g"),Ha=RegExp(Fa+"(?="+Fa+")|"+my+Oc,"g"),by=RegExp([gi+"?"+Cc+"+"+xc+"(?="+[yc,gi,"$"].join("|")+")",cy+"+"+Ec+"(?="+[yc,gi+Mc,"$"].join("|")+")",gi+"?"+Mc+"+"+xc,gi+"+"+Ec,fy,py,bc,dy].join("|"),"g"),Cy=RegExp("["+vc+fo+hc+mc+"]"),_y=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ay=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vy=-1,it={};it[Ma]=it[xa]=it[Ea]=it[Ta]=it[Sa]=it[Oa]=it[Da]=it[Ia]=it[Ra]=!0,it[di]=it[uo]=it[rn]=it[Ji]=it[mi]=it[Yi]=it[lo]=it[co]=it[de]=it[Zi]=it[qe]=it[Qi]=it[me]=it[tn]=it[en]=!1;var tt={};tt[di]=tt[uo]=tt[rn]=tt[mi]=tt[Ji]=tt[Yi]=tt[Ma]=tt[xa]=tt[Ea]=tt[Ta]=tt[Sa]=tt[de]=tt[Zi]=tt[qe]=tt[Qi]=tt[me]=tt[tn]=tt[ho]=tt[Oa]=tt[Da]=tt[Ia]=tt[Ra]=!0,tt[lo]=tt[co]=tt[en]=!1;var My={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},xy={"&":"&","<":"<",">":">",'"':""","'":"'"},Ey={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ty={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Sy=parseFloat,Oy=parseInt,Dc=typeof global=="object"&&global&&global.Object===Object&&global,Dy=typeof self=="object"&&self&&self.Object===Object&&self,At=Dc||Dy||Function("return this")(),Ba=typeof Ni=="object"&&Ni&&!Ni.nodeType&&Ni,Ir=Ba&&typeof kn=="object"&&kn&&!kn.nodeType&&kn,Ic=Ir&&Ir.exports===Ba,Ua=Ic&&Dc.process,ne=(function(){try{var g=Ir&&Ir.require&&Ir.require("util").types;return g||Ua&&Ua.binding&&Ua.binding("util")}catch{}})(),Rc=ne&&ne.isArrayBuffer,Lc=ne&&ne.isDate,wc=ne&&ne.isMap,kc=ne&&ne.isRegExp,Fc=ne&&ne.isSet,Nc=ne&&ne.isTypedArray;function Kt(g,_,C){switch(C.length){case 0:return g.call(_);case 1:return g.call(_,C[0]);case 2:return g.call(_,C[0],C[1]);case 3:return g.call(_,C[0],C[1],C[2])}return g.apply(_,C)}function Iy(g,_,C,T){for(var w=-1,$=g==null?0:g.length;++w<$;){var yt=g[w];_(T,yt,C(yt),g)}return T}function se(g,_){for(var C=-1,T=g==null?0:g.length;++C<T&&_(g[C],C,g)!==!1;);return g}function Ry(g,_){for(var C=g==null?0:g.length;C--&&_(g[C],C,g)!==!1;);return g}function Pc(g,_){for(var C=-1,T=g==null?0:g.length;++C<T;)if(!_(g[C],C,g))return!1;return!0}function pr(g,_){for(var C=-1,T=g==null?0:g.length,w=0,$=[];++C<T;){var yt=g[C];_(yt,C,g)&&($[w++]=yt)}return $}function go(g,_){var C=g==null?0:g.length;return!!C&&yi(g,_,0)>-1}function Va(g,_,C){for(var T=-1,w=g==null?0:g.length;++T<w;)if(C(_,g[T]))return!0;return!1}function nt(g,_){for(var C=-1,T=g==null?0:g.length,w=Array(T);++C<T;)w[C]=_(g[C],C,g);return w}function fr(g,_){for(var C=-1,T=_.length,w=g.length;++C<T;)g[w+C]=_[C];return g}function ja(g,_,C,T){var w=-1,$=g==null?0:g.length;for(T&&$&&(C=g[++w]);++w<$;)C=_(C,g[w],w,g);return C}function Ly(g,_,C,T){var w=g==null?0:g.length;for(T&&w&&(C=g[--w]);w--;)C=_(C,g[w],w,g);return C}function Wa(g,_){for(var C=-1,T=g==null?0:g.length;++C<T;)if(_(g[C],C,g))return!0;return!1}var wy=Ga("length");function ky(g){return g.split("")}function Fy(g){return g.match(Wg)||[]}function Hc(g,_,C){var T;return C(g,function(w,$,yt){if(_(w,$,yt))return T=$,!1}),T}function yo(g,_,C,T){for(var w=g.length,$=C+(T?1:-1);T?$--:++$<w;)if(_(g[$],$,g))return $;return-1}function yi(g,_,C){return _===_?Ky(g,_,C):yo(g,Bc,C)}function Ny(g,_,C,T){for(var w=C-1,$=g.length;++w<$;)if(T(g[w],_))return w;return-1}function Bc(g){return g!==g}function Uc(g,_){var C=g==null?0:g.length;return C?$a(g,_)/C:ao}function Ga(g){return function(_){return _==null?o:_[g]}}function qa(g){return function(_){return g==null?o:g[_]}}function Vc(g,_,C,T,w){return w(g,function($,yt,Q){C=T?(T=!1,$):_(C,$,yt,Q)}),C}function Py(g,_){var C=g.length;for(g.sort(_);C--;)g[C]=g[C].value;return g}function $a(g,_){for(var C,T=-1,w=g.length;++T<w;){var $=_(g[T]);$!==o&&(C=C===o?$:C+$)}return C}function Ka(g,_){for(var C=-1,T=Array(g);++C<g;)T[C]=_(C);return T}function Hy(g,_){return nt(_,function(C){return[C,g[C]]})}function jc(g){return g&&g.slice(0,$c(g)+1).replace(wa,"")}function zt(g){return function(_){return g(_)}}function za(g,_){return nt(_,function(C){return g[C]})}function nn(g,_){return g.has(_)}function Wc(g,_){for(var C=-1,T=g.length;++C<T&&yi(_,g[C],0)>-1;);return C}function Gc(g,_){for(var C=g.length;C--&&yi(_,g[C],0)>-1;);return C}function By(g,_){for(var C=g.length,T=0;C--;)g[C]===_&&++T;return T}var Uy=qa(My),Vy=qa(xy);function jy(g){return"\\"+Ty[g]}function Wy(g,_){return g==null?o:g[_]}function bi(g){return Cy.test(g)}function Gy(g){return _y.test(g)}function qy(g){for(var _,C=[];!(_=g.next()).done;)C.push(_.value);return C}function Xa(g){var _=-1,C=Array(g.size);return g.forEach(function(T,w){C[++_]=[w,T]}),C}function qc(g,_){return function(C){return g(_(C))}}function dr(g,_){for(var C=-1,T=g.length,w=0,$=[];++C<T;){var yt=g[C];(yt===_||yt===x)&&(g[C]=x,$[w++]=C)}return $}function bo(g){var _=-1,C=Array(g.size);return g.forEach(function(T){C[++_]=T}),C}function $y(g){var _=-1,C=Array(g.size);return g.forEach(function(T){C[++_]=[T,T]}),C}function Ky(g,_,C){for(var T=C-1,w=g.length;++T<w;)if(g[T]===_)return T;return-1}function zy(g,_,C){for(var T=C+1;T--;)if(g[T]===_)return T;return T}function Ci(g){return bi(g)?Jy(g):wy(g)}function ge(g){return bi(g)?Yy(g):ky(g)}function $c(g){for(var _=g.length;_--&&Bg.test(g.charAt(_)););return _}var Xy=qa(Ey);function Jy(g){for(var _=Ha.lastIndex=0;Ha.test(g);)++_;return _}function Yy(g){return g.match(Ha)||[]}function Zy(g){return g.match(by)||[]}var Qy=(function g(_){_=_==null?At:mr.defaults(At.Object(),_,mr.pick(At,Ay));var C=_.Array,T=_.Date,w=_.Error,$=_.Function,yt=_.Math,Q=_.Object,Ja=_.RegExp,tb=_.String,oe=_.TypeError,Co=C.prototype,eb=$.prototype,_i=Q.prototype,_o=_["__core-js_shared__"],Ao=eb.toString,z=_i.hasOwnProperty,rb=0,Kc=(function(){var r=/[^.]+$/.exec(_o&&_o.keys&&_o.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),vo=_i.toString,ib=Ao.call(Q),nb=At._,sb=Ja("^"+Ao.call(z).replace(La,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mo=Ic?_.Buffer:o,gr=_.Symbol,xo=_.Uint8Array,zc=Mo?Mo.allocUnsafe:o,Eo=qc(Q.getPrototypeOf,Q),Xc=Q.create,Jc=_i.propertyIsEnumerable,To=Co.splice,Yc=gr?gr.isConcatSpreadable:o,sn=gr?gr.iterator:o,Rr=gr?gr.toStringTag:o,So=(function(){try{var r=Nr(Q,"defineProperty");return r({},"",{}),r}catch{}})(),ob=_.clearTimeout!==At.clearTimeout&&_.clearTimeout,ab=T&&T.now!==At.Date.now&&T.now,ub=_.setTimeout!==At.setTimeout&&_.setTimeout,Oo=yt.ceil,Do=yt.floor,Ya=Q.getOwnPropertySymbols,lb=Mo?Mo.isBuffer:o,Zc=_.isFinite,cb=Co.join,hb=qc(Q.keys,Q),bt=yt.max,Ot=yt.min,pb=T.now,fb=_.parseInt,Qc=yt.random,db=Co.reverse,Za=Nr(_,"DataView"),on=Nr(_,"Map"),Qa=Nr(_,"Promise"),Ai=Nr(_,"Set"),an=Nr(_,"WeakMap"),un=Nr(Q,"create"),Io=an&&new an,vi={},mb=Pr(Za),gb=Pr(on),yb=Pr(Qa),bb=Pr(Ai),Cb=Pr(an),Ro=gr?gr.prototype:o,ln=Ro?Ro.valueOf:o,th=Ro?Ro.toString:o;function h(r){if(lt(r)&&!k(r)&&!(r instanceof j)){if(r instanceof ae)return r;if(z.call(r,"__wrapped__"))return ep(r)}return new ae(r)}var Mi=(function(){function r(){}return function(i){if(!at(i))return{};if(Xc)return Xc(i);r.prototype=i;var s=new r;return r.prototype=o,s}})();function Lo(){}function ae(r,i){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=o}h.templateSettings={escape:wg,evaluate:kg,interpolate:lc,variable:"",imports:{_:h}},h.prototype=Lo.prototype,h.prototype.constructor=h,ae.prototype=Mi(Lo.prototype),ae.prototype.constructor=ae;function j(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ie,this.__views__=[]}function _b(){var r=new j(this.__wrapped__);return r.__actions__=Bt(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Bt(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Bt(this.__views__),r}function Ab(){if(this.__filtered__){var r=new j(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function vb(){var r=this.__wrapped__.value(),i=this.__dir__,s=k(r),u=i<0,c=s?r.length:0,p=kC(0,c,this.__views__),f=p.start,m=p.end,y=m-f,A=u?m:f-1,v=this.__iteratees__,M=v.length,E=0,O=Ot(y,this.__takeCount__);if(!s||!u&&c==y&&O==y)return xh(r,this.__actions__);var R=[];t:for(;y--&&E<O;){A+=i;for(var H=-1,L=r[A];++H<M;){var V=v[H],W=V.iteratee,Yt=V.type,Ft=W(L);if(Yt==gg)L=Ft;else if(!Ft){if(Yt==nc)continue t;break t}}R[E++]=L}return R}j.prototype=Mi(Lo.prototype),j.prototype.constructor=j;function Lr(r){var i=-1,s=r==null?0:r.length;for(this.clear();++i<s;){var u=r[i];this.set(u[0],u[1])}}function Mb(){this.__data__=un?un(null):{},this.size=0}function xb(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}function Eb(r){var i=this.__data__;if(un){var s=i[r];return s===d?o:s}return z.call(i,r)?i[r]:o}function Tb(r){var i=this.__data__;return un?i[r]!==o:z.call(i,r)}function Sb(r,i){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=un&&i===o?d:i,this}Lr.prototype.clear=Mb,Lr.prototype.delete=xb,Lr.prototype.get=Eb,Lr.prototype.has=Tb,Lr.prototype.set=Sb;function $e(r){var i=-1,s=r==null?0:r.length;for(this.clear();++i<s;){var u=r[i];this.set(u[0],u[1])}}function Ob(){this.__data__=[],this.size=0}function Db(r){var i=this.__data__,s=wo(i,r);if(s<0)return!1;var u=i.length-1;return s==u?i.pop():To.call(i,s,1),--this.size,!0}function Ib(r){var i=this.__data__,s=wo(i,r);return s<0?o:i[s][1]}function Rb(r){return wo(this.__data__,r)>-1}function Lb(r,i){var s=this.__data__,u=wo(s,r);return u<0?(++this.size,s.push([r,i])):s[u][1]=i,this}$e.prototype.clear=Ob,$e.prototype.delete=Db,$e.prototype.get=Ib,$e.prototype.has=Rb,$e.prototype.set=Lb;function Ke(r){var i=-1,s=r==null?0:r.length;for(this.clear();++i<s;){var u=r[i];this.set(u[0],u[1])}}function wb(){this.size=0,this.__data__={hash:new Lr,map:new(on||$e),string:new Lr}}function kb(r){var i=qo(this,r).delete(r);return this.size-=i?1:0,i}function Fb(r){return qo(this,r).get(r)}function Nb(r){return qo(this,r).has(r)}function Pb(r,i){var s=qo(this,r),u=s.size;return s.set(r,i),this.size+=s.size==u?0:1,this}Ke.prototype.clear=wb,Ke.prototype.delete=kb,Ke.prototype.get=Fb,Ke.prototype.has=Nb,Ke.prototype.set=Pb;function wr(r){var i=-1,s=r==null?0:r.length;for(this.__data__=new Ke;++i<s;)this.add(r[i])}function Hb(r){return this.__data__.set(r,d),this}function Bb(r){return this.__data__.has(r)}wr.prototype.add=wr.prototype.push=Hb,wr.prototype.has=Bb;function ye(r){var i=this.__data__=new $e(r);this.size=i.size}function Ub(){this.__data__=new $e,this.size=0}function Vb(r){var i=this.__data__,s=i.delete(r);return this.size=i.size,s}function jb(r){return this.__data__.get(r)}function Wb(r){return this.__data__.has(r)}function Gb(r,i){var s=this.__data__;if(s instanceof $e){var u=s.__data__;if(!on||u.length<e-1)return u.push([r,i]),this.size=++s.size,this;s=this.__data__=new Ke(u)}return s.set(r,i),this.size=s.size,this}ye.prototype.clear=Ub,ye.prototype.delete=Vb,ye.prototype.get=jb,ye.prototype.has=Wb,ye.prototype.set=Gb;function eh(r,i){var s=k(r),u=!s&&Hr(r),c=!s&&!u&&Ar(r),p=!s&&!u&&!c&&Si(r),f=s||u||c||p,m=f?Ka(r.length,tb):[],y=m.length;for(var A in r)(i||z.call(r,A))&&!(f&&(A=="length"||c&&(A=="offset"||A=="parent")||p&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||Ye(A,y)))&&m.push(A);return m}function rh(r){var i=r.length;return i?r[cu(0,i-1)]:o}function qb(r,i){return $o(Bt(r),kr(i,0,r.length))}function $b(r){return $o(Bt(r))}function tu(r,i,s){(s!==o&&!be(r[i],s)||s===o&&!(i in r))&&ze(r,i,s)}function cn(r,i,s){var u=r[i];(!(z.call(r,i)&&be(u,s))||s===o&&!(i in r))&&ze(r,i,s)}function wo(r,i){for(var s=r.length;s--;)if(be(r[s][0],i))return s;return-1}function Kb(r,i,s,u){return yr(r,function(c,p,f){i(u,c,s(c),f)}),u}function ih(r,i){return r&&Le(i,vt(i),r)}function zb(r,i){return r&&Le(i,Vt(i),r)}function ze(r,i,s){i=="__proto__"&&So?So(r,i,{configurable:!0,enumerable:!0,value:s,writable:!0}):r[i]=s}function eu(r,i){for(var s=-1,u=i.length,c=C(u),p=r==null;++s<u;)c[s]=p?o:Fu(r,i[s]);return c}function kr(r,i,s){return r===r&&(s!==o&&(r=r<=s?r:s),i!==o&&(r=r>=i?r:i)),r}function ue(r,i,s,u,c,p){var f,m=i&D,y=i>,A=i&We;if(s&&(f=c?s(r,u,c,p):s(r)),f!==o)return f;if(!at(r))return r;var v=k(r);if(v){if(f=NC(r),!m)return Bt(r,f)}else{var M=Dt(r),E=M==co||M==sc;if(Ar(r))return Sh(r,m);if(M==qe||M==di||E&&!c){if(f=y||E?{}:$h(r),!m)return y?EC(r,zb(f,r)):xC(r,ih(f,r))}else{if(!tt[M])return c?r:{};f=PC(r,M,m)}}p||(p=new ye);var O=p.get(r);if(O)return O;p.set(r,f),Ap(r)?r.forEach(function(L){f.add(ue(L,i,s,L,r,p))}):Cp(r)&&r.forEach(function(L,V){f.set(V,ue(L,i,s,V,r,p))});var R=A?y?Au:_u:y?Vt:vt,H=v?o:R(r);return se(H||r,function(L,V){H&&(V=L,L=r[V]),cn(f,V,ue(L,i,s,V,r,p))}),f}function Xb(r){var i=vt(r);return function(s){return nh(s,r,i)}}function nh(r,i,s){var u=s.length;if(r==null)return!u;for(r=Q(r);u--;){var c=s[u],p=i[c],f=r[c];if(f===o&&!(c in r)||!p(f))return!1}return!0}function sh(r,i,s){if(typeof r!="function")throw new oe(a);return yn(function(){r.apply(o,s)},i)}function hn(r,i,s,u){var c=-1,p=go,f=!0,m=r.length,y=[],A=i.length;if(!m)return y;s&&(i=nt(i,zt(s))),u?(p=Va,f=!1):i.length>=e&&(p=nn,f=!1,i=new wr(i));t:for(;++c<m;){var v=r[c],M=s==null?v:s(v);if(v=u||v!==0?v:0,f&&M===M){for(var E=A;E--;)if(i[E]===M)continue t;y.push(v)}else p(i,M,u)||y.push(v)}return y}var yr=Lh(Re),oh=Lh(iu,!0);function Jb(r,i){var s=!0;return yr(r,function(u,c,p){return s=!!i(u,c,p),s}),s}function ko(r,i,s){for(var u=-1,c=r.length;++u<c;){var p=r[u],f=i(p);if(f!=null&&(m===o?f===f&&!Jt(f):s(f,m)))var m=f,y=p}return y}function Yb(r,i,s,u){var c=r.length;for(s=N(s),s<0&&(s=-s>c?0:c+s),u=u===o||u>c?c:N(u),u<0&&(u+=c),u=s>u?0:Mp(u);s<u;)r[s++]=i;return r}function ah(r,i){var s=[];return yr(r,function(u,c,p){i(u,c,p)&&s.push(u)}),s}function Mt(r,i,s,u,c){var p=-1,f=r.length;for(s||(s=BC),c||(c=[]);++p<f;){var m=r[p];i>0&&s(m)?i>1?Mt(m,i-1,s,u,c):fr(c,m):u||(c[c.length]=m)}return c}var ru=wh(),uh=wh(!0);function Re(r,i){return r&&ru(r,i,vt)}function iu(r,i){return r&&uh(r,i,vt)}function Fo(r,i){return pr(i,function(s){return Ze(r[s])})}function Fr(r,i){i=Cr(i,r);for(var s=0,u=i.length;r!=null&&s<u;)r=r[we(i[s++])];return s&&s==u?r:o}function lh(r,i,s){var u=i(r);return k(r)?u:fr(u,s(r))}function wt(r){return r==null?r===o?Tg:xg:Rr&&Rr in Q(r)?wC(r):$C(r)}function nu(r,i){return r>i}function Zb(r,i){return r!=null&&z.call(r,i)}function Qb(r,i){return r!=null&&i in Q(r)}function tC(r,i,s){return r>=Ot(i,s)&&r<bt(i,s)}function su(r,i,s){for(var u=s?Va:go,c=r[0].length,p=r.length,f=p,m=C(p),y=1/0,A=[];f--;){var v=r[f];f&&i&&(v=nt(v,zt(i))),y=Ot(v.length,y),m[f]=!s&&(i||c>=120&&v.length>=120)?new wr(f&&v):o}v=r[0];var M=-1,E=m[0];t:for(;++M<c&&A.length<y;){var O=v[M],R=i?i(O):O;if(O=s||O!==0?O:0,!(E?nn(E,R):u(A,R,s))){for(f=p;--f;){var H=m[f];if(!(H?nn(H,R):u(r[f],R,s)))continue t}E&&E.push(R),A.push(O)}}return A}function eC(r,i,s,u){return Re(r,function(c,p,f){i(u,s(c),p,f)}),u}function pn(r,i,s){i=Cr(i,r),r=Jh(r,i);var u=r==null?r:r[we(ce(i))];return u==null?o:Kt(u,r,s)}function ch(r){return lt(r)&&wt(r)==di}function rC(r){return lt(r)&&wt(r)==rn}function iC(r){return lt(r)&&wt(r)==Yi}function fn(r,i,s,u,c){return r===i?!0:r==null||i==null||!lt(r)&&!lt(i)?r!==r&&i!==i:nC(r,i,s,u,fn,c)}function nC(r,i,s,u,c,p){var f=k(r),m=k(i),y=f?uo:Dt(r),A=m?uo:Dt(i);y=y==di?qe:y,A=A==di?qe:A;var v=y==qe,M=A==qe,E=y==A;if(E&&Ar(r)){if(!Ar(i))return!1;f=!0,v=!1}if(E&&!v)return p||(p=new ye),f||Si(r)?Wh(r,i,s,u,c,p):RC(r,i,y,s,u,c,p);if(!(s&hi)){var O=v&&z.call(r,"__wrapped__"),R=M&&z.call(i,"__wrapped__");if(O||R){var H=O?r.value():r,L=R?i.value():i;return p||(p=new ye),c(H,L,s,u,p)}}return E?(p||(p=new ye),LC(r,i,s,u,c,p)):!1}function sC(r){return lt(r)&&Dt(r)==de}function ou(r,i,s,u){var c=s.length,p=c,f=!u;if(r==null)return!p;for(r=Q(r);c--;){var m=s[c];if(f&&m[2]?m[1]!==r[m[0]]:!(m[0]in r))return!1}for(;++c<p;){m=s[c];var y=m[0],A=r[y],v=m[1];if(f&&m[2]){if(A===o&&!(y in r))return!1}else{var M=new ye;if(u)var E=u(A,v,y,r,i,M);if(!(E===o?fn(v,A,hi|oo,u,M):E))return!1}}return!0}function hh(r){if(!at(r)||VC(r))return!1;var i=Ze(r)?sb:Xg;return i.test(Pr(r))}function oC(r){return lt(r)&&wt(r)==Qi}function aC(r){return lt(r)&&Dt(r)==me}function uC(r){return lt(r)&&Zo(r.length)&&!!it[wt(r)]}function ph(r){return typeof r=="function"?r:r==null?jt:typeof r=="object"?k(r)?mh(r[0],r[1]):dh(r):kp(r)}function au(r){if(!gn(r))return hb(r);var i=[];for(var s in Q(r))z.call(r,s)&&s!="constructor"&&i.push(s);return i}function lC(r){if(!at(r))return qC(r);var i=gn(r),s=[];for(var u in r)u=="constructor"&&(i||!z.call(r,u))||s.push(u);return s}function uu(r,i){return r<i}function fh(r,i){var s=-1,u=Ut(r)?C(r.length):[];return yr(r,function(c,p,f){u[++s]=i(c,p,f)}),u}function dh(r){var i=Mu(r);return i.length==1&&i[0][2]?zh(i[0][0],i[0][1]):function(s){return s===r||ou(s,r,i)}}function mh(r,i){return Eu(r)&&Kh(i)?zh(we(r),i):function(s){var u=Fu(s,r);return u===o&&u===i?Nu(s,r):fn(i,u,hi|oo)}}function No(r,i,s,u,c){r!==i&&ru(i,function(p,f){if(c||(c=new ye),at(p))cC(r,i,f,s,No,u,c);else{var m=u?u(Su(r,f),p,f+"",r,i,c):o;m===o&&(m=p),tu(r,f,m)}},Vt)}function cC(r,i,s,u,c,p,f){var m=Su(r,s),y=Su(i,s),A=f.get(y);if(A){tu(r,s,A);return}var v=p?p(m,y,s+"",r,i,f):o,M=v===o;if(M){var E=k(y),O=!E&&Ar(y),R=!E&&!O&&Si(y);v=y,E||O||R?k(m)?v=m:ht(m)?v=Bt(m):O?(M=!1,v=Sh(y,!0)):R?(M=!1,v=Oh(y,!0)):v=[]:bn(y)||Hr(y)?(v=m,Hr(m)?v=xp(m):(!at(m)||Ze(m))&&(v=$h(y))):M=!1}M&&(f.set(y,v),c(v,y,u,p,f),f.delete(y)),tu(r,s,v)}function gh(r,i){var s=r.length;if(s)return i+=i<0?s:0,Ye(i,s)?r[i]:o}function yh(r,i,s){i.length?i=nt(i,function(p){return k(p)?function(f){return Fr(f,p.length===1?p[0]:p)}:p}):i=[jt];var u=-1;i=nt(i,zt(I()));var c=fh(r,function(p,f,m){var y=nt(i,function(A){return A(p)});return{criteria:y,index:++u,value:p}});return Py(c,function(p,f){return MC(p,f,s)})}function hC(r,i){return bh(r,i,function(s,u){return Nu(r,u)})}function bh(r,i,s){for(var u=-1,c=i.length,p={};++u<c;){var f=i[u],m=Fr(r,f);s(m,f)&&dn(p,Cr(f,r),m)}return p}function pC(r){return function(i){return Fr(i,r)}}function lu(r,i,s,u){var c=u?Ny:yi,p=-1,f=i.length,m=r;for(r===i&&(i=Bt(i)),s&&(m=nt(r,zt(s)));++p<f;)for(var y=0,A=i[p],v=s?s(A):A;(y=c(m,v,y,u))>-1;)m!==r&&To.call(m,y,1),To.call(r,y,1);return r}function Ch(r,i){for(var s=r?i.length:0,u=s-1;s--;){var c=i[s];if(s==u||c!==p){var p=c;Ye(c)?To.call(r,c,1):fu(r,c)}}return r}function cu(r,i){return r+Do(Qc()*(i-r+1))}function fC(r,i,s,u){for(var c=-1,p=bt(Oo((i-r)/(s||1)),0),f=C(p);p--;)f[u?p:++c]=r,r+=s;return f}function hu(r,i){var s="";if(!r||i<1||i>hr)return s;do i%2&&(s+=r),i=Do(i/2),i&&(r+=r);while(i);return s}function B(r,i){return Ou(Xh(r,i,jt),r+"")}function dC(r){return rh(Oi(r))}function mC(r,i){var s=Oi(r);return $o(s,kr(i,0,s.length))}function dn(r,i,s,u){if(!at(r))return r;i=Cr(i,r);for(var c=-1,p=i.length,f=p-1,m=r;m!=null&&++c<p;){var y=we(i[c]),A=s;if(y==="__proto__"||y==="constructor"||y==="prototype")return r;if(c!=f){var v=m[y];A=u?u(v,y,m):o,A===o&&(A=at(v)?v:Ye(i[c+1])?[]:{})}cn(m,y,A),m=m[y]}return r}var _h=Io?function(r,i){return Io.set(r,i),r}:jt,gC=So?function(r,i){return So(r,"toString",{configurable:!0,enumerable:!1,value:Hu(i),writable:!0})}:jt;function yC(r){return $o(Oi(r))}function le(r,i,s){var u=-1,c=r.length;i<0&&(i=-i>c?0:c+i),s=s>c?c:s,s<0&&(s+=c),c=i>s?0:s-i>>>0,i>>>=0;for(var p=C(c);++u<c;)p[u]=r[u+i];return p}function bC(r,i){var s;return yr(r,function(u,c,p){return s=i(u,c,p),!s}),!!s}function Po(r,i,s){var u=0,c=r==null?u:r.length;if(typeof i=="number"&&i===i&&c<=_g){for(;u<c;){var p=u+c>>>1,f=r[p];f!==null&&!Jt(f)&&(s?f<=i:f<i)?u=p+1:c=p}return c}return pu(r,i,jt,s)}function pu(r,i,s,u){var c=0,p=r==null?0:r.length;if(p===0)return 0;i=s(i);for(var f=i!==i,m=i===null,y=Jt(i),A=i===o;c<p;){var v=Do((c+p)/2),M=s(r[v]),E=M!==o,O=M===null,R=M===M,H=Jt(M);if(f)var L=u||R;else A?L=R&&(u||E):m?L=R&&E&&(u||!O):y?L=R&&E&&!O&&(u||!H):O||H?L=!1:L=u?M<=i:M<i;L?c=v+1:p=v}return Ot(p,Cg)}function Ah(r,i){for(var s=-1,u=r.length,c=0,p=[];++s<u;){var f=r[s],m=i?i(f):f;if(!s||!be(m,y)){var y=m;p[c++]=f===0?0:f}}return p}function vh(r){return typeof r=="number"?r:Jt(r)?ao:+r}function Xt(r){if(typeof r=="string")return r;if(k(r))return nt(r,Xt)+"";if(Jt(r))return th?th.call(r):"";var i=r+"";return i=="0"&&1/r==-Dr?"-0":i}function br(r,i,s){var u=-1,c=go,p=r.length,f=!0,m=[],y=m;if(s)f=!1,c=Va;else if(p>=e){var A=i?null:DC(r);if(A)return bo(A);f=!1,c=nn,y=new wr}else y=i?[]:m;t:for(;++u<p;){var v=r[u],M=i?i(v):v;if(v=s||v!==0?v:0,f&&M===M){for(var E=y.length;E--;)if(y[E]===M)continue t;i&&y.push(M),m.push(v)}else c(y,M,s)||(y!==m&&y.push(M),m.push(v))}return m}function fu(r,i){i=Cr(i,r);var s=-1,u=i.length;if(!u)return!0;for(var c=r==null||typeof r!="object"&&typeof r!="function";++s<u;){var p=i[s];if(typeof p=="string"){if(p==="__proto__"&&!z.call(r,"__proto__"))return!1;if(p==="constructor"&&s+1<u&&typeof i[s+1]=="string"&&i[s+1]==="prototype"){if(c&&s===0)continue;return!1}}}var f=Jh(r,i);return f==null||delete f[we(ce(i))]}function Mh(r,i,s,u){return dn(r,i,s(Fr(r,i)),u)}function Ho(r,i,s,u){for(var c=r.length,p=u?c:-1;(u?p--:++p<c)&&i(r[p],p,r););return s?le(r,u?0:p,u?p+1:c):le(r,u?p+1:0,u?c:p)}function xh(r,i){var s=r;return s instanceof j&&(s=s.value()),ja(i,function(u,c){return c.func.apply(c.thisArg,fr([u],c.args))},s)}function du(r,i,s){var u=r.length;if(u<2)return u?br(r[0]):[];for(var c=-1,p=C(u);++c<u;)for(var f=r[c],m=-1;++m<u;)m!=c&&(p[c]=hn(p[c]||f,r[m],i,s));return br(Mt(p,1),i,s)}function Eh(r,i,s){for(var u=-1,c=r.length,p=i.length,f={};++u<c;){var m=u<p?i[u]:o;s(f,r[u],m)}return f}function mu(r){return ht(r)?r:[]}function gu(r){return typeof r=="function"?r:jt}function Cr(r,i){return k(r)?r:Eu(r,i)?[r]:tp(X(r))}var CC=B;function _r(r,i,s){var u=r.length;return s=s===o?u:s,!i&&s>=u?r:le(r,i,s)}var Th=ob||function(r){return At.clearTimeout(r)};function Sh(r,i){if(i)return r.slice();var s=r.length,u=zc?zc(s):new r.constructor(s);return r.copy(u),u}function yu(r){var i=new r.constructor(r.byteLength);return new xo(i).set(new xo(r)),i}function _C(r,i){var s=i?yu(r.buffer):r.buffer;return new r.constructor(s,r.byteOffset,r.byteLength)}function AC(r){var i=new r.constructor(r.source,cc.exec(r));return i.lastIndex=r.lastIndex,i}function vC(r){return ln?Q(ln.call(r)):{}}function Oh(r,i){var s=i?yu(r.buffer):r.buffer;return new r.constructor(s,r.byteOffset,r.length)}function Dh(r,i){if(r!==i){var s=r!==o,u=r===null,c=r===r,p=Jt(r),f=i!==o,m=i===null,y=i===i,A=Jt(i);if(!m&&!A&&!p&&r>i||p&&f&&y&&!m&&!A||u&&f&&y||!s&&y||!c)return 1;if(!u&&!p&&!A&&r<i||A&&s&&c&&!u&&!p||m&&s&&c||!f&&c||!y)return-1}return 0}function MC(r,i,s){for(var u=-1,c=r.criteria,p=i.criteria,f=c.length,m=s.length;++u<f;){var y=Dh(c[u],p[u]);if(y){if(u>=m)return y;var A=s[u];return y*(A=="desc"?-1:1)}}return r.index-i.index}function Ih(r,i,s,u){for(var c=-1,p=r.length,f=s.length,m=-1,y=i.length,A=bt(p-f,0),v=C(y+A),M=!u;++m<y;)v[m]=i[m];for(;++c<f;)(M||c<p)&&(v[s[c]]=r[c]);for(;A--;)v[m++]=r[c++];return v}function Rh(r,i,s,u){for(var c=-1,p=r.length,f=-1,m=s.length,y=-1,A=i.length,v=bt(p-m,0),M=C(v+A),E=!u;++c<v;)M[c]=r[c];for(var O=c;++y<A;)M[O+y]=i[y];for(;++f<m;)(E||c<p)&&(M[O+s[f]]=r[c++]);return M}function Bt(r,i){var s=-1,u=r.length;for(i||(i=C(u));++s<u;)i[s]=r[s];return i}function Le(r,i,s,u){var c=!s;s||(s={});for(var p=-1,f=i.length;++p<f;){var m=i[p],y=u?u(s[m],r[m],m,s,r):o;y===o&&(y=r[m]),c?ze(s,m,y):cn(s,m,y)}return s}function xC(r,i){return Le(r,xu(r),i)}function EC(r,i){return Le(r,Gh(r),i)}function Bo(r,i){return function(s,u){var c=k(s)?Iy:Kb,p=i?i():{};return c(s,r,I(u,2),p)}}function xi(r){return B(function(i,s){var u=-1,c=s.length,p=c>1?s[c-1]:o,f=c>2?s[2]:o;for(p=r.length>3&&typeof p=="function"?(c--,p):o,f&&kt(s[0],s[1],f)&&(p=c<3?o:p,c=1),i=Q(i);++u<c;){var m=s[u];m&&r(i,m,u,p)}return i})}function Lh(r,i){return function(s,u){if(s==null)return s;if(!Ut(s))return r(s,u);for(var c=s.length,p=i?c:-1,f=Q(s);(i?p--:++p<c)&&u(f[p],p,f)!==!1;);return s}}function wh(r){return function(i,s,u){for(var c=-1,p=Q(i),f=u(i),m=f.length;m--;){var y=f[r?m:++c];if(s(p[y],y,p)===!1)break}return i}}function TC(r,i,s){var u=i&ie,c=mn(r);function p(){var f=this&&this!==At&&this instanceof p?c:r;return f.apply(u?s:this,arguments)}return p}function kh(r){return function(i){i=X(i);var s=bi(i)?ge(i):o,u=s?s[0]:i.charAt(0),c=s?_r(s,1).join(""):i.slice(1);return u[r]()+c}}function Ei(r){return function(i){return ja(Lp(Rp(i).replace(gy,"")),r,"")}}function mn(r){return function(){var i=arguments;switch(i.length){case 0:return new r;case 1:return new r(i[0]);case 2:return new r(i[0],i[1]);case 3:return new r(i[0],i[1],i[2]);case 4:return new r(i[0],i[1],i[2],i[3]);case 5:return new r(i[0],i[1],i[2],i[3],i[4]);case 6:return new r(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new r(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var s=Mi(r.prototype),u=r.apply(s,i);return at(u)?u:s}}function SC(r,i,s){var u=mn(r);function c(){for(var p=arguments.length,f=C(p),m=p,y=Ti(c);m--;)f[m]=arguments[m];var A=p<3&&f[0]!==y&&f[p-1]!==y?[]:dr(f,y);if(p-=A.length,p<s)return Bh(r,i,Uo,c.placeholder,o,f,A,o,o,s-p);var v=this&&this!==At&&this instanceof c?u:r;return Kt(v,this,f)}return c}function Fh(r){return function(i,s,u){var c=Q(i);if(!Ut(i)){var p=I(s,3);i=vt(i),s=function(m){return p(c[m],m,c)}}var f=r(i,s,u);return f>-1?c[p?i[f]:f]:o}}function Nh(r){return Je(function(i){var s=i.length,u=s,c=ae.prototype.thru;for(r&&i.reverse();u--;){var p=i[u];if(typeof p!="function")throw new oe(a);if(c&&!f&&Go(p)=="wrapper")var f=new ae([],!0)}for(u=f?u:s;++u<s;){p=i[u];var m=Go(p),y=m=="wrapper"?vu(p):o;y&&Tu(y[0])&&y[1]==(Ge|Oe|De|Xi)&&!y[4].length&&y[9]==1?f=f[Go(y[0])].apply(f,y[3]):f=p.length==1&&Tu(p)?f[m]():f.thru(p)}return function(){var A=arguments,v=A[0];if(f&&A.length==1&&k(v))return f.plant(v).value();for(var M=0,E=s?i[M].apply(this,A):v;++M<s;)E=i[M].call(this,E);return E}})}function Uo(r,i,s,u,c,p,f,m,y,A){var v=i&Ge,M=i&ie,E=i&Or,O=i&(Oe|pi),R=i&Z,H=E?o:mn(r);function L(){for(var V=arguments.length,W=C(V),Yt=V;Yt--;)W[Yt]=arguments[Yt];if(O)var Ft=Ti(L),Zt=By(W,Ft);if(u&&(W=Ih(W,u,c,O)),p&&(W=Rh(W,p,f,O)),V-=Zt,O&&V<A){var pt=dr(W,Ft);return Bh(r,i,Uo,L.placeholder,s,W,pt,m,y,A-V)}var Ce=M?s:this,tr=E?Ce[r]:r;return V=W.length,m?W=KC(W,m):R&&V>1&&W.reverse(),v&&y<V&&(W.length=y),this&&this!==At&&this instanceof L&&(tr=H||mn(tr)),tr.apply(Ce,W)}return L}function Ph(r,i){return function(s,u){return eC(s,r,i(u),{})}}function Vo(r,i){return function(s,u){var c;if(s===o&&u===o)return i;if(s!==o&&(c=s),u!==o){if(c===o)return u;typeof s=="string"||typeof u=="string"?(s=Xt(s),u=Xt(u)):(s=vh(s),u=vh(u)),c=r(s,u)}return c}}function bu(r){return Je(function(i){return i=nt(i,zt(I())),B(function(s){var u=this;return r(i,function(c){return Kt(c,u,s)})})})}function jo(r,i){i=i===o?" ":Xt(i);var s=i.length;if(s<2)return s?hu(i,r):i;var u=hu(i,Oo(r/Ci(i)));return bi(i)?_r(ge(u),0,r).join(""):u.slice(0,r)}function OC(r,i,s,u){var c=i&ie,p=mn(r);function f(){for(var m=-1,y=arguments.length,A=-1,v=u.length,M=C(v+y),E=this&&this!==At&&this instanceof f?p:r;++A<v;)M[A]=u[A];for(;y--;)M[A++]=arguments[++m];return Kt(E,c?s:this,M)}return f}function Hh(r){return function(i,s,u){return u&&typeof u!="number"&&kt(i,s,u)&&(s=u=o),i=Qe(i),s===o?(s=i,i=0):s=Qe(s),u=u===o?i<s?1:-1:Qe(u),fC(i,s,u,r)}}function Wo(r){return function(i,s){return typeof i=="string"&&typeof s=="string"||(i=he(i),s=he(s)),r(i,s)}}function Bh(r,i,s,u,c,p,f,m,y,A){var v=i&Oe,M=v?f:o,E=v?o:f,O=v?p:o,R=v?o:p;i|=v?De:fi,i&=~(v?fi:De),i&ic||(i&=~(ie|Or));var H=[r,i,c,O,M,R,E,m,y,A],L=s.apply(o,H);return Tu(r)&&Yh(L,H),L.placeholder=u,Zh(L,r,i)}function Cu(r){var i=yt[r];return function(s,u){if(s=he(s),u=u==null?0:Ot(N(u),292),u&&Zc(s)){var c=(X(s)+"e").split("e"),p=i(c[0]+"e"+(+c[1]+u));return c=(X(p)+"e").split("e"),+(c[0]+"e"+(+c[1]-u))}return i(s)}}var DC=Ai&&1/bo(new Ai([,-0]))[1]==Dr?function(r){return new Ai(r)}:Vu;function Uh(r){return function(i){var s=Dt(i);return s==de?Xa(i):s==me?$y(i):Hy(i,r(i))}}function Xe(r,i,s,u,c,p,f,m){var y=i⩔if(!y&&typeof r!="function")throw new oe(a);var A=u?u.length:0;if(A||(i&=~(De|fi),u=c=o),f=f===o?f:bt(N(f),0),m=m===o?m:N(m),A-=c?c.length:0,i&fi){var v=u,M=c;u=c=o}var E=y?o:vu(r),O=[r,i,s,u,c,v,M,p,f,m];if(E&&GC(O,E),r=O[0],i=O[1],s=O[2],u=O[3],c=O[4],m=O[9]=O[9]===o?y?0:r.length:bt(O[9]-A,0),!m&&i&(Oe|pi)&&(i&=~(Oe|pi)),!i||i==ie)var R=TC(r,i,s);else i==Oe||i==pi?R=SC(r,i,m):(i==De||i==(ie|De))&&!c.length?R=OC(r,i,s,u):R=Uo.apply(o,O);var H=E?_h:Yh;return Zh(H(R,O),r,i)}function Vh(r,i,s,u){return r===o||be(r,_i[s])&&!z.call(u,s)?i:r}function jh(r,i,s,u,c,p){return at(r)&&at(i)&&(p.set(i,r),No(r,i,o,jh,p),p.delete(i)),r}function IC(r){return bn(r)?o:r}function Wh(r,i,s,u,c,p){var f=s&hi,m=r.length,y=i.length;if(m!=y&&!(f&&y>m))return!1;var A=p.get(r),v=p.get(i);if(A&&v)return A==i&&v==r;var M=-1,E=!0,O=s&oo?new wr:o;for(p.set(r,i),p.set(i,r);++M<m;){var R=r[M],H=i[M];if(u)var L=f?u(H,R,M,i,r,p):u(R,H,M,r,i,p);if(L!==o){if(L)continue;E=!1;break}if(O){if(!Wa(i,function(V,W){if(!nn(O,W)&&(R===V||c(R,V,s,u,p)))return O.push(W)})){E=!1;break}}else if(!(R===H||c(R,H,s,u,p))){E=!1;break}}return p.delete(r),p.delete(i),E}function RC(r,i,s,u,c,p,f){switch(s){case mi:if(r.byteLength!=i.byteLength||r.byteOffset!=i.byteOffset)return!1;r=r.buffer,i=i.buffer;case rn:return!(r.byteLength!=i.byteLength||!p(new xo(r),new xo(i)));case Ji:case Yi:case Zi:return be(+r,+i);case lo:return r.name==i.name&&r.message==i.message;case Qi:case tn:return r==i+"";case de:var m=Xa;case me:var y=u&hi;if(m||(m=bo),r.size!=i.size&&!y)return!1;var A=f.get(r);if(A)return A==i;u|=oo,f.set(r,i);var v=Wh(m(r),m(i),u,c,p,f);return f.delete(r),v;case ho:if(ln)return ln.call(r)==ln.call(i)}return!1}function LC(r,i,s,u,c,p){var f=s&hi,m=_u(r),y=m.length,A=_u(i),v=A.length;if(y!=v&&!f)return!1;for(var M=y;M--;){var E=m[M];if(!(f?E in i:z.call(i,E)))return!1}var O=p.get(r),R=p.get(i);if(O&&R)return O==i&&R==r;var H=!0;p.set(r,i),p.set(i,r);for(var L=f;++M<y;){E=m[M];var V=r[E],W=i[E];if(u)var Yt=f?u(W,V,E,i,r,p):u(V,W,E,r,i,p);if(!(Yt===o?V===W||c(V,W,s,u,p):Yt)){H=!1;break}L||(L=E=="constructor")}if(H&&!L){var Ft=r.constructor,Zt=i.constructor;Ft!=Zt&&"constructor"in r&&"constructor"in i&&!(typeof Ft=="function"&&Ft instanceof Ft&&typeof Zt=="function"&&Zt instanceof Zt)&&(H=!1)}return p.delete(r),p.delete(i),H}function Je(r){return Ou(Xh(r,o,np),r+"")}function _u(r){return lh(r,vt,xu)}function Au(r){return lh(r,Vt,Gh)}var vu=Io?function(r){return Io.get(r)}:Vu;function Go(r){for(var i=r.name+"",s=vi[i],u=z.call(vi,i)?s.length:0;u--;){var c=s[u],p=c.func;if(p==null||p==r)return c.name}return i}function Ti(r){var i=z.call(h,"placeholder")?h:r;return i.placeholder}function I(){var r=h.iteratee||Bu;return r=r===Bu?ph:r,arguments.length?r(arguments[0],arguments[1]):r}function qo(r,i){var s=r.__data__;return UC(i)?s[typeof i=="string"?"string":"hash"]:s.map}function Mu(r){for(var i=vt(r),s=i.length;s--;){var u=i[s],c=r[u];i[s]=[u,c,Kh(c)]}return i}function Nr(r,i){var s=Wy(r,i);return hh(s)?s:o}function wC(r){var i=z.call(r,Rr),s=r[Rr];try{r[Rr]=o;var u=!0}catch{}var c=vo.call(r);return u&&(i?r[Rr]=s:delete r[Rr]),c}var xu=Ya?function(r){return r==null?[]:(r=Q(r),pr(Ya(r),function(i){return Jc.call(r,i)}))}:ju,Gh=Ya?function(r){for(var i=[];r;)fr(i,xu(r)),r=Eo(r);return i}:ju,Dt=wt;(Za&&Dt(new Za(new ArrayBuffer(1)))!=mi||on&&Dt(new on)!=de||Qa&&Dt(Qa.resolve())!=oc||Ai&&Dt(new Ai)!=me||an&&Dt(new an)!=en)&&(Dt=function(r){var i=wt(r),s=i==qe?r.constructor:o,u=s?Pr(s):"";if(u)switch(u){case mb:return mi;case gb:return de;case yb:return oc;case bb:return me;case Cb:return en}return i});function kC(r,i,s){for(var u=-1,c=s.length;++u<c;){var p=s[u],f=p.size;switch(p.type){case"drop":r+=f;break;case"dropRight":i-=f;break;case"take":i=Ot(i,r+f);break;case"takeRight":r=bt(r,i-f);break}}return{start:r,end:i}}function FC(r){var i=r.match(Vg);return i?i[1].split(jg):[]}function qh(r,i,s){i=Cr(i,r);for(var u=-1,c=i.length,p=!1;++u<c;){var f=we(i[u]);if(!(p=r!=null&&s(r,f)))break;r=r[f]}return p||++u!=c?p:(c=r==null?0:r.length,!!c&&Zo(c)&&Ye(f,c)&&(k(r)||Hr(r)))}function NC(r){var i=r.length,s=new r.constructor(i);return i&&typeof r[0]=="string"&&z.call(r,"index")&&(s.index=r.index,s.input=r.input),s}function $h(r){return typeof r.constructor=="function"&&!gn(r)?Mi(Eo(r)):{}}function PC(r,i,s){var u=r.constructor;switch(i){case rn:return yu(r);case Ji:case Yi:return new u(+r);case mi:return _C(r,s);case Ma:case xa:case Ea:case Ta:case Sa:case Oa:case Da:case Ia:case Ra:return Oh(r,s);case de:return new u;case Zi:case tn:return new u(r);case Qi:return AC(r);case me:return new u;case ho:return vC(r)}}function HC(r,i){var s=i.length;if(!s)return r;var u=s-1;return i[u]=(s>1?"& ":"")+i[u],i=i.join(s>2?", ":" "),r.replace(Ug,`{
|
|
1
|
+
"use strict";var lx=Object.create;var ea=Object.defineProperty;var cx=Object.getOwnPropertyDescriptor;var hx=Object.getOwnPropertyNames;var px=Object.getPrototypeOf,fx=Object.prototype.hasOwnProperty;var S=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports),dx=(o,t)=>{for(var e in t)ea(o,e,{get:t[e],enumerable:!0})},Up=(o,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of hx(t))!fx.call(o,a)&&a!==e&&ea(o,a,{get:()=>t[a],enumerable:!(n=cx(t,a))||n.enumerable});return o};var Y=(o,t,e)=>(e=o!=null?lx(px(o)):{},Up(t||!o||!o.__esModule?ea(e,"default",{value:o,enumerable:!0}):e,o)),mx=o=>Up(ea({},"__esModule",{value:!0}),o);var Vp=S((UO,Bp)=>{"use strict";var Ax=Object.prototype,vx=Ax.hasOwnProperty;function Mx(o,t){return o!=null&&vx.call(o,t)}Bp.exports=Mx});var Ri=S((BO,jp)=>{"use strict";var xx=Array.isArray;jp.exports=xx});var Gp=S((VO,Wp)=>{"use strict";var Ex=typeof global=="object"&&global&&global.Object===Object&&global;Wp.exports=Ex});var na=S((jO,qp)=>{"use strict";var Tx=Gp(),Sx=typeof self=="object"&&self&&self.Object===Object&&self,Ox=Tx||Sx||Function("return this")();qp.exports=Ox});var An=S((WO,$p)=>{"use strict";var Dx=na(),Ix=Dx.Symbol;$p.exports=Ix});var Jp=S((GO,Xp)=>{"use strict";var Kp=An(),zp=Object.prototype,Rx=zp.hasOwnProperty,Lx=zp.toString,vn=Kp?Kp.toStringTag:void 0;function wx(o){var t=Rx.call(o,vn),e=o[vn];try{o[vn]=void 0;var n=!0}catch{}var a=Lx.call(o);return n&&(t?o[vn]=e:delete o[vn]),a}Xp.exports=wx});var Zp=S((qO,Yp)=>{"use strict";var kx=Object.prototype,Fx=kx.toString;function Nx(o){return Fx.call(o)}Yp.exports=Nx});var Mn=S(($O,ef)=>{"use strict";var Qp=An(),Px=Jp(),Hx=Zp(),Ux="[object Null]",Bx="[object Undefined]",tf=Qp?Qp.toStringTag:void 0;function Vx(o){return o==null?o===void 0?Bx:Ux:tf&&tf in Object(o)?Px(o):Hx(o)}ef.exports=Vx});var xn=S((KO,rf)=>{"use strict";function jx(o){return o!=null&&typeof o=="object"}rf.exports=jx});var sa=S((zO,nf)=>{"use strict";var Wx=Mn(),Gx=xn(),qx="[object Symbol]";function $x(o){return typeof o=="symbol"||Gx(o)&&Wx(o)==qx}nf.exports=$x});var of=S((XO,sf)=>{"use strict";var Kx=Ri(),zx=sa(),Xx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jx=/^\w*$/;function Yx(o,t){if(Kx(o))return!1;var e=typeof o;return e=="number"||e=="symbol"||e=="boolean"||o==null||zx(o)?!0:Jx.test(o)||!Xx.test(o)||t!=null&&o in Object(t)}sf.exports=Yx});var il=S((JO,af)=>{"use strict";function Zx(o){var t=typeof o;return o!=null&&(t=="object"||t=="function")}af.exports=Zx});var lf=S((YO,uf)=>{"use strict";var Qx=Mn(),tE=il(),eE="[object AsyncFunction]",rE="[object Function]",iE="[object GeneratorFunction]",nE="[object Proxy]";function sE(o){if(!tE(o))return!1;var t=Qx(o);return t==rE||t==iE||t==eE||t==nE}uf.exports=sE});var hf=S((ZO,cf)=>{"use strict";var oE=na(),aE=oE["__core-js_shared__"];cf.exports=aE});var df=S((QO,ff)=>{"use strict";var nl=hf(),pf=(function(){var o=/[^.]+$/.exec(nl&&nl.keys&&nl.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})();function uE(o){return!!pf&&pf in o}ff.exports=uE});var gf=S((tD,mf)=>{"use strict";var lE=Function.prototype,cE=lE.toString;function hE(o){if(o!=null){try{return cE.call(o)}catch{}try{return o+""}catch{}}return""}mf.exports=hE});var bf=S((eD,yf)=>{"use strict";var pE=lf(),fE=df(),dE=il(),mE=gf(),gE=/[\\^$.*+?()[\]{}|]/g,yE=/^\[object .+?Constructor\]$/,bE=Function.prototype,CE=Object.prototype,_E=bE.toString,AE=CE.hasOwnProperty,vE=RegExp("^"+_E.call(AE).replace(gE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ME(o){if(!dE(o)||fE(o))return!1;var t=pE(o)?vE:yE;return t.test(mE(o))}yf.exports=ME});var _f=S((rD,Cf)=>{"use strict";function xE(o,t){return o?.[t]}Cf.exports=xE});var sl=S((iD,Af)=>{"use strict";var EE=bf(),TE=_f();function SE(o,t){var e=TE(o,t);return EE(e)?e:void 0}Af.exports=SE});var En=S((nD,vf)=>{"use strict";var OE=sl(),DE=OE(Object,"create");vf.exports=DE});var Ef=S((sD,xf)=>{"use strict";var Mf=En();function IE(){this.__data__=Mf?Mf(null):{},this.size=0}xf.exports=IE});var Sf=S((oD,Tf)=>{"use strict";function RE(o){var t=this.has(o)&&delete this.__data__[o];return this.size-=t?1:0,t}Tf.exports=RE});var Df=S((aD,Of)=>{"use strict";var LE=En(),wE="__lodash_hash_undefined__",kE=Object.prototype,FE=kE.hasOwnProperty;function NE(o){var t=this.__data__;if(LE){var e=t[o];return e===wE?void 0:e}return FE.call(t,o)?t[o]:void 0}Of.exports=NE});var Rf=S((uD,If)=>{"use strict";var PE=En(),HE=Object.prototype,UE=HE.hasOwnProperty;function BE(o){var t=this.__data__;return PE?t[o]!==void 0:UE.call(t,o)}If.exports=BE});var wf=S((lD,Lf)=>{"use strict";var VE=En(),jE="__lodash_hash_undefined__";function WE(o,t){var e=this.__data__;return this.size+=this.has(o)?0:1,e[o]=VE&&t===void 0?jE:t,this}Lf.exports=WE});var Ff=S((cD,kf)=>{"use strict";var GE=Ef(),qE=Sf(),$E=Df(),KE=Rf(),zE=wf();function Li(o){var t=-1,e=o==null?0:o.length;for(this.clear();++t<e;){var n=o[t];this.set(n[0],n[1])}}Li.prototype.clear=GE;Li.prototype.delete=qE;Li.prototype.get=$E;Li.prototype.has=KE;Li.prototype.set=zE;kf.exports=Li});var Pf=S((hD,Nf)=>{"use strict";function XE(){this.__data__=[],this.size=0}Nf.exports=XE});var Uf=S((pD,Hf)=>{"use strict";function JE(o,t){return o===t||o!==o&&t!==t}Hf.exports=JE});var Tn=S((fD,Bf)=>{"use strict";var YE=Uf();function ZE(o,t){for(var e=o.length;e--;)if(YE(o[e][0],t))return e;return-1}Bf.exports=ZE});var jf=S((dD,Vf)=>{"use strict";var QE=Tn(),tT=Array.prototype,eT=tT.splice;function rT(o){var t=this.__data__,e=QE(t,o);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():eT.call(t,e,1),--this.size,!0}Vf.exports=rT});var Gf=S((mD,Wf)=>{"use strict";var iT=Tn();function nT(o){var t=this.__data__,e=iT(t,o);return e<0?void 0:t[e][1]}Wf.exports=nT});var $f=S((gD,qf)=>{"use strict";var sT=Tn();function oT(o){return sT(this.__data__,o)>-1}qf.exports=oT});var zf=S((yD,Kf)=>{"use strict";var aT=Tn();function uT(o,t){var e=this.__data__,n=aT(e,o);return n<0?(++this.size,e.push([o,t])):e[n][1]=t,this}Kf.exports=uT});var Jf=S((bD,Xf)=>{"use strict";var lT=Pf(),cT=jf(),hT=Gf(),pT=$f(),fT=zf();function wi(o){var t=-1,e=o==null?0:o.length;for(this.clear();++t<e;){var n=o[t];this.set(n[0],n[1])}}wi.prototype.clear=lT;wi.prototype.delete=cT;wi.prototype.get=hT;wi.prototype.has=pT;wi.prototype.set=fT;Xf.exports=wi});var Zf=S((CD,Yf)=>{"use strict";var dT=sl(),mT=na(),gT=dT(mT,"Map");Yf.exports=gT});var ed=S((_D,td)=>{"use strict";var Qf=Ff(),yT=Jf(),bT=Zf();function CT(){this.size=0,this.__data__={hash:new Qf,map:new(bT||yT),string:new Qf}}td.exports=CT});var id=S((AD,rd)=>{"use strict";function _T(o){var t=typeof o;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?o!=="__proto__":o===null}rd.exports=_T});var Sn=S((vD,nd)=>{"use strict";var AT=id();function vT(o,t){var e=o.__data__;return AT(t)?e[typeof t=="string"?"string":"hash"]:e.map}nd.exports=vT});var od=S((MD,sd)=>{"use strict";var MT=Sn();function xT(o){var t=MT(this,o).delete(o);return this.size-=t?1:0,t}sd.exports=xT});var ud=S((xD,ad)=>{"use strict";var ET=Sn();function TT(o){return ET(this,o).get(o)}ad.exports=TT});var cd=S((ED,ld)=>{"use strict";var ST=Sn();function OT(o){return ST(this,o).has(o)}ld.exports=OT});var pd=S((TD,hd)=>{"use strict";var DT=Sn();function IT(o,t){var e=DT(this,o),n=e.size;return e.set(o,t),this.size+=e.size==n?0:1,this}hd.exports=IT});var dd=S((SD,fd)=>{"use strict";var RT=ed(),LT=od(),wT=ud(),kT=cd(),FT=pd();function ki(o){var t=-1,e=o==null?0:o.length;for(this.clear();++t<e;){var n=o[t];this.set(n[0],n[1])}}ki.prototype.clear=RT;ki.prototype.delete=LT;ki.prototype.get=wT;ki.prototype.has=kT;ki.prototype.set=FT;fd.exports=ki});var yd=S((OD,gd)=>{"use strict";var md=dd(),NT="Expected a function";function ol(o,t){if(typeof o!="function"||t!=null&&typeof t!="function")throw new TypeError(NT);var e=function(){var n=arguments,a=t?t.apply(this,n):n[0],l=e.cache;if(l.has(a))return l.get(a);var d=o.apply(this,n);return e.cache=l.set(a,d)||l,d};return e.cache=new(ol.Cache||md),e}ol.Cache=md;gd.exports=ol});var Cd=S((DD,bd)=>{"use strict";var PT=yd(),HT=500;function UT(o){var t=PT(o,function(n){return e.size===HT&&e.clear(),n}),e=t.cache;return t}bd.exports=UT});var Ad=S((ID,_d)=>{"use strict";var BT=Cd(),VT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jT=/\\(\\)?/g,WT=BT(function(o){var t=[];return o.charCodeAt(0)===46&&t.push(""),o.replace(VT,function(e,n,a,l){t.push(a?l.replace(jT,"$1"):n||e)}),t});_d.exports=WT});var Md=S((RD,vd)=>{"use strict";function GT(o,t){for(var e=-1,n=o==null?0:o.length,a=Array(n);++e<n;)a[e]=t(o[e],e,o);return a}vd.exports=GT});var Dd=S((LD,Od)=>{"use strict";var xd=An(),qT=Md(),$T=Ri(),KT=sa(),zT=1/0,Ed=xd?xd.prototype:void 0,Td=Ed?Ed.toString:void 0;function Sd(o){if(typeof o=="string")return o;if($T(o))return qT(o,Sd)+"";if(KT(o))return Td?Td.call(o):"";var t=o+"";return t=="0"&&1/o==-zT?"-0":t}Od.exports=Sd});var Rd=S((wD,Id)=>{"use strict";var XT=Dd();function JT(o){return o==null?"":XT(o)}Id.exports=JT});var wd=S((kD,Ld)=>{"use strict";var YT=Ri(),ZT=of(),QT=Ad(),tS=Rd();function eS(o,t){return YT(o)?o:ZT(o,t)?[o]:QT(tS(o))}Ld.exports=eS});var Fd=S((FD,kd)=>{"use strict";var rS=Mn(),iS=xn(),nS="[object Arguments]";function sS(o){return iS(o)&&rS(o)==nS}kd.exports=sS});var al=S((ND,Hd)=>{"use strict";var Nd=Fd(),oS=xn(),Pd=Object.prototype,aS=Pd.hasOwnProperty,uS=Pd.propertyIsEnumerable,lS=Nd((function(){return arguments})())?Nd:function(o){return oS(o)&&aS.call(o,"callee")&&!uS.call(o,"callee")};Hd.exports=lS});var Bd=S((PD,Ud)=>{"use strict";var cS=9007199254740991,hS=/^(?:0|[1-9]\d*)$/;function pS(o,t){var e=typeof o;return t=t??cS,!!t&&(e=="number"||e!="symbol"&&hS.test(o))&&o>-1&&o%1==0&&o<t}Ud.exports=pS});var jd=S((HD,Vd)=>{"use strict";var fS=9007199254740991;function dS(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=fS}Vd.exports=dS});var Gd=S((UD,Wd)=>{"use strict";var mS=sa(),gS=1/0;function yS(o){if(typeof o=="string"||mS(o))return o;var t=o+"";return t=="0"&&1/o==-gS?"-0":t}Wd.exports=yS});var $d=S((BD,qd)=>{"use strict";var bS=wd(),CS=al(),_S=Ri(),AS=Bd(),vS=jd(),MS=Gd();function xS(o,t,e){t=bS(t,o);for(var n=-1,a=t.length,l=!1;++n<a;){var d=MS(t[n]);if(!(l=o!=null&&e(o,d)))break;o=o[d]}return l||++n!=a?l:(a=o==null?0:o.length,!!a&&vS(a)&&AS(d,a)&&(_S(o)||CS(o)))}qd.exports=xS});var Fi=S((VD,Kd)=>{"use strict";var ES=Vp(),TS=$d();function SS(o,t){return o!=null&&TS(o,t,ES)}Kd.exports=SS});var te=S((Pi,kn)=>{"use strict";(function(){var o,t="4.17.23",e=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",l="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",b=500,x="__lodash_placeholder__",D=1,gt=2,We=4,pi=1,oo=2,ie=1,Ir=2,oc=4,Oe=8,fi=16,De=32,di=64,Ge=128,Xi=256,Z=512,dg=30,mg="...",gg=800,yg=16,ac=1,bg=2,Cg=3,Rr=1/0,pr=9007199254740991,_g=17976931348623157e292,ao=NaN,Ie=4294967295,Ag=Ie-1,vg=Ie>>>1,Mg=[["ary",Ge],["bind",ie],["bindKey",Ir],["curry",Oe],["curryRight",fi],["flip",Z],["partial",De],["partialRight",di],["rearg",Xi]],mi="[object Arguments]",uo="[object Array]",xg="[object AsyncFunction]",Ji="[object Boolean]",Yi="[object Date]",Eg="[object DOMException]",lo="[object Error]",co="[object Function]",uc="[object GeneratorFunction]",de="[object Map]",Zi="[object Number]",Tg="[object Null]",qe="[object Object]",lc="[object Promise]",Sg="[object Proxy]",Qi="[object RegExp]",me="[object Set]",tn="[object String]",ho="[object Symbol]",Og="[object Undefined]",en="[object WeakMap]",Dg="[object WeakSet]",rn="[object ArrayBuffer]",gi="[object DataView]",Ma="[object Float32Array]",xa="[object Float64Array]",Ea="[object Int8Array]",Ta="[object Int16Array]",Sa="[object Int32Array]",Oa="[object Uint8Array]",Da="[object Uint8ClampedArray]",Ia="[object Uint16Array]",Ra="[object Uint32Array]",Ig=/\b__p \+= '';/g,Rg=/\b(__p \+=) '' \+/g,Lg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,cc=/&(?:amp|lt|gt|quot|#39);/g,hc=/[&<>"']/g,wg=RegExp(cc.source),kg=RegExp(hc.source),Fg=/<%-([\s\S]+?)%>/g,Ng=/<%([\s\S]+?)%>/g,pc=/<%=([\s\S]+?)%>/g,Pg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hg=/^\w*$/,Ug=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,La=/[\\^$.*+?()[\]{}|]/g,Bg=RegExp(La.source),wa=/^\s+/,Vg=/\s/,jg=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Wg=/\{\n\/\* \[wrapped with (.+)\] \*/,Gg=/,? & /,qg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$g=/[()=,{}\[\]\/\s]/,Kg=/\\(\\)?/g,zg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fc=/\w*$/,Xg=/^[-+]0x[0-9a-f]+$/i,Jg=/^0b[01]+$/i,Yg=/^\[object .+?Constructor\]$/,Zg=/^0o[0-7]+$/i,Qg=/^(?:0|[1-9]\d*)$/,ty=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,po=/($^)/,ey=/['\n\r\u2028\u2029\\]/g,fo="\\ud800-\\udfff",ry="\\u0300-\\u036f",iy="\\ufe20-\\ufe2f",ny="\\u20d0-\\u20ff",dc=ry+iy+ny,mc="\\u2700-\\u27bf",gc="a-z\\xdf-\\xf6\\xf8-\\xff",sy="\\xac\\xb1\\xd7\\xf7",oy="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ay="\\u2000-\\u206f",uy=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",yc="A-Z\\xc0-\\xd6\\xd8-\\xde",bc="\\ufe0e\\ufe0f",Cc=sy+oy+ay+uy,ka="['\u2019]",ly="["+fo+"]",_c="["+Cc+"]",mo="["+dc+"]",Ac="\\d+",cy="["+mc+"]",vc="["+gc+"]",Mc="[^"+fo+Cc+Ac+mc+gc+yc+"]",Fa="\\ud83c[\\udffb-\\udfff]",hy="(?:"+mo+"|"+Fa+")",xc="[^"+fo+"]",Na="(?:\\ud83c[\\udde6-\\uddff]){2}",Pa="[\\ud800-\\udbff][\\udc00-\\udfff]",yi="["+yc+"]",Ec="\\u200d",Tc="(?:"+vc+"|"+Mc+")",py="(?:"+yi+"|"+Mc+")",Sc="(?:"+ka+"(?:d|ll|m|re|s|t|ve))?",Oc="(?:"+ka+"(?:D|LL|M|RE|S|T|VE))?",Dc=hy+"?",Ic="["+bc+"]?",fy="(?:"+Ec+"(?:"+[xc,Na,Pa].join("|")+")"+Ic+Dc+")*",dy="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",my="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rc=Ic+Dc+fy,gy="(?:"+[cy,Na,Pa].join("|")+")"+Rc,yy="(?:"+[xc+mo+"?",mo,Na,Pa,ly].join("|")+")",by=RegExp(ka,"g"),Cy=RegExp(mo,"g"),Ha=RegExp(Fa+"(?="+Fa+")|"+yy+Rc,"g"),_y=RegExp([yi+"?"+vc+"+"+Sc+"(?="+[_c,yi,"$"].join("|")+")",py+"+"+Oc+"(?="+[_c,yi+Tc,"$"].join("|")+")",yi+"?"+Tc+"+"+Sc,yi+"+"+Oc,my,dy,Ac,gy].join("|"),"g"),Ay=RegExp("["+Ec+fo+dc+bc+"]"),vy=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,My=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xy=-1,nt={};nt[Ma]=nt[xa]=nt[Ea]=nt[Ta]=nt[Sa]=nt[Oa]=nt[Da]=nt[Ia]=nt[Ra]=!0,nt[mi]=nt[uo]=nt[rn]=nt[Ji]=nt[gi]=nt[Yi]=nt[lo]=nt[co]=nt[de]=nt[Zi]=nt[qe]=nt[Qi]=nt[me]=nt[tn]=nt[en]=!1;var tt={};tt[mi]=tt[uo]=tt[rn]=tt[gi]=tt[Ji]=tt[Yi]=tt[Ma]=tt[xa]=tt[Ea]=tt[Ta]=tt[Sa]=tt[de]=tt[Zi]=tt[qe]=tt[Qi]=tt[me]=tt[tn]=tt[ho]=tt[Oa]=tt[Da]=tt[Ia]=tt[Ra]=!0,tt[lo]=tt[co]=tt[en]=!1;var Ey={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Ty={"&":"&","<":"<",">":">",'"':""","'":"'"},Sy={"&":"&","<":"<",">":">",""":'"',"'":"'"},Oy={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Dy=parseFloat,Iy=parseInt,Lc=typeof global=="object"&&global&&global.Object===Object&&global,Ry=typeof self=="object"&&self&&self.Object===Object&&self,vt=Lc||Ry||Function("return this")(),Ua=typeof Pi=="object"&&Pi&&!Pi.nodeType&&Pi,Lr=Ua&&typeof kn=="object"&&kn&&!kn.nodeType&&kn,wc=Lr&&Lr.exports===Ua,Ba=wc&&Lc.process,ne=(function(){try{var g=Lr&&Lr.require&&Lr.require("util").types;return g||Ba&&Ba.binding&&Ba.binding("util")}catch{}})(),kc=ne&&ne.isArrayBuffer,Fc=ne&&ne.isDate,Nc=ne&&ne.isMap,Pc=ne&&ne.isRegExp,Hc=ne&&ne.isSet,Uc=ne&&ne.isTypedArray;function Kt(g,_,C){switch(C.length){case 0:return g.call(_);case 1:return g.call(_,C[0]);case 2:return g.call(_,C[0],C[1]);case 3:return g.call(_,C[0],C[1],C[2])}return g.apply(_,C)}function Ly(g,_,C,T){for(var w=-1,$=g==null?0:g.length;++w<$;){var yt=g[w];_(T,yt,C(yt),g)}return T}function se(g,_){for(var C=-1,T=g==null?0:g.length;++C<T&&_(g[C],C,g)!==!1;);return g}function wy(g,_){for(var C=g==null?0:g.length;C--&&_(g[C],C,g)!==!1;);return g}function Bc(g,_){for(var C=-1,T=g==null?0:g.length;++C<T;)if(!_(g[C],C,g))return!1;return!0}function fr(g,_){for(var C=-1,T=g==null?0:g.length,w=0,$=[];++C<T;){var yt=g[C];_(yt,C,g)&&($[w++]=yt)}return $}function go(g,_){var C=g==null?0:g.length;return!!C&&bi(g,_,0)>-1}function Va(g,_,C){for(var T=-1,w=g==null?0:g.length;++T<w;)if(C(_,g[T]))return!0;return!1}function st(g,_){for(var C=-1,T=g==null?0:g.length,w=Array(T);++C<T;)w[C]=_(g[C],C,g);return w}function dr(g,_){for(var C=-1,T=_.length,w=g.length;++C<T;)g[w+C]=_[C];return g}function ja(g,_,C,T){var w=-1,$=g==null?0:g.length;for(T&&$&&(C=g[++w]);++w<$;)C=_(C,g[w],w,g);return C}function ky(g,_,C,T){var w=g==null?0:g.length;for(T&&w&&(C=g[--w]);w--;)C=_(C,g[w],w,g);return C}function Wa(g,_){for(var C=-1,T=g==null?0:g.length;++C<T;)if(_(g[C],C,g))return!0;return!1}var Fy=Ga("length");function Ny(g){return g.split("")}function Py(g){return g.match(qg)||[]}function Vc(g,_,C){var T;return C(g,function(w,$,yt){if(_(w,$,yt))return T=$,!1}),T}function yo(g,_,C,T){for(var w=g.length,$=C+(T?1:-1);T?$--:++$<w;)if(_(g[$],$,g))return $;return-1}function bi(g,_,C){return _===_?Xy(g,_,C):yo(g,jc,C)}function Hy(g,_,C,T){for(var w=C-1,$=g.length;++w<$;)if(T(g[w],_))return w;return-1}function jc(g){return g!==g}function Wc(g,_){var C=g==null?0:g.length;return C?$a(g,_)/C:ao}function Ga(g){return function(_){return _==null?o:_[g]}}function qa(g){return function(_){return g==null?o:g[_]}}function Gc(g,_,C,T,w){return w(g,function($,yt,Q){C=T?(T=!1,$):_(C,$,yt,Q)}),C}function Uy(g,_){var C=g.length;for(g.sort(_);C--;)g[C]=g[C].value;return g}function $a(g,_){for(var C,T=-1,w=g.length;++T<w;){var $=_(g[T]);$!==o&&(C=C===o?$:C+$)}return C}function Ka(g,_){for(var C=-1,T=Array(g);++C<g;)T[C]=_(C);return T}function By(g,_){return st(_,function(C){return[C,g[C]]})}function qc(g){return g&&g.slice(0,Xc(g)+1).replace(wa,"")}function zt(g){return function(_){return g(_)}}function za(g,_){return st(_,function(C){return g[C]})}function nn(g,_){return g.has(_)}function $c(g,_){for(var C=-1,T=g.length;++C<T&&bi(_,g[C],0)>-1;);return C}function Kc(g,_){for(var C=g.length;C--&&bi(_,g[C],0)>-1;);return C}function Vy(g,_){for(var C=g.length,T=0;C--;)g[C]===_&&++T;return T}var jy=qa(Ey),Wy=qa(Ty);function Gy(g){return"\\"+Oy[g]}function qy(g,_){return g==null?o:g[_]}function Ci(g){return Ay.test(g)}function $y(g){return vy.test(g)}function Ky(g){for(var _,C=[];!(_=g.next()).done;)C.push(_.value);return C}function Xa(g){var _=-1,C=Array(g.size);return g.forEach(function(T,w){C[++_]=[w,T]}),C}function zc(g,_){return function(C){return g(_(C))}}function mr(g,_){for(var C=-1,T=g.length,w=0,$=[];++C<T;){var yt=g[C];(yt===_||yt===x)&&(g[C]=x,$[w++]=C)}return $}function bo(g){var _=-1,C=Array(g.size);return g.forEach(function(T){C[++_]=T}),C}function zy(g){var _=-1,C=Array(g.size);return g.forEach(function(T){C[++_]=[T,T]}),C}function Xy(g,_,C){for(var T=C-1,w=g.length;++T<w;)if(g[T]===_)return T;return-1}function Jy(g,_,C){for(var T=C+1;T--;)if(g[T]===_)return T;return T}function _i(g){return Ci(g)?Zy(g):Fy(g)}function ge(g){return Ci(g)?Qy(g):Ny(g)}function Xc(g){for(var _=g.length;_--&&Vg.test(g.charAt(_)););return _}var Yy=qa(Sy);function Zy(g){for(var _=Ha.lastIndex=0;Ha.test(g);)++_;return _}function Qy(g){return g.match(Ha)||[]}function tb(g){return g.match(_y)||[]}var eb=(function g(_){_=_==null?vt:gr.defaults(vt.Object(),_,gr.pick(vt,My));var C=_.Array,T=_.Date,w=_.Error,$=_.Function,yt=_.Math,Q=_.Object,Ja=_.RegExp,rb=_.String,oe=_.TypeError,Co=C.prototype,ib=$.prototype,Ai=Q.prototype,_o=_["__core-js_shared__"],Ao=ib.toString,z=Ai.hasOwnProperty,nb=0,Jc=(function(){var r=/[^.]+$/.exec(_o&&_o.keys&&_o.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),vo=Ai.toString,sb=Ao.call(Q),ob=vt._,ab=Ja("^"+Ao.call(z).replace(La,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mo=wc?_.Buffer:o,yr=_.Symbol,xo=_.Uint8Array,Yc=Mo?Mo.allocUnsafe:o,Eo=zc(Q.getPrototypeOf,Q),Zc=Q.create,Qc=Ai.propertyIsEnumerable,To=Co.splice,th=yr?yr.isConcatSpreadable:o,sn=yr?yr.iterator:o,wr=yr?yr.toStringTag:o,So=(function(){try{var r=Hr(Q,"defineProperty");return r({},"",{}),r}catch{}})(),ub=_.clearTimeout!==vt.clearTimeout&&_.clearTimeout,lb=T&&T.now!==vt.Date.now&&T.now,cb=_.setTimeout!==vt.setTimeout&&_.setTimeout,Oo=yt.ceil,Do=yt.floor,Ya=Q.getOwnPropertySymbols,hb=Mo?Mo.isBuffer:o,eh=_.isFinite,pb=Co.join,fb=zc(Q.keys,Q),bt=yt.max,Ot=yt.min,db=T.now,mb=_.parseInt,rh=yt.random,gb=Co.reverse,Za=Hr(_,"DataView"),on=Hr(_,"Map"),Qa=Hr(_,"Promise"),vi=Hr(_,"Set"),an=Hr(_,"WeakMap"),un=Hr(Q,"create"),Io=an&&new an,Mi={},yb=Ur(Za),bb=Ur(on),Cb=Ur(Qa),_b=Ur(vi),Ab=Ur(an),Ro=yr?yr.prototype:o,ln=Ro?Ro.valueOf:o,ih=Ro?Ro.toString:o;function h(r){if(lt(r)&&!k(r)&&!(r instanceof j)){if(r instanceof ae)return r;if(z.call(r,"__wrapped__"))return np(r)}return new ae(r)}var xi=(function(){function r(){}return function(i){if(!at(i))return{};if(Zc)return Zc(i);r.prototype=i;var s=new r;return r.prototype=o,s}})();function Lo(){}function ae(r,i){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=o}h.templateSettings={escape:Fg,evaluate:Ng,interpolate:pc,variable:"",imports:{_:h}},h.prototype=Lo.prototype,h.prototype.constructor=h,ae.prototype=xi(Lo.prototype),ae.prototype.constructor=ae;function j(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ie,this.__views__=[]}function vb(){var r=new j(this.__wrapped__);return r.__actions__=Ut(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Ut(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Ut(this.__views__),r}function Mb(){if(this.__filtered__){var r=new j(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function xb(){var r=this.__wrapped__.value(),i=this.__dir__,s=k(r),u=i<0,c=s?r.length:0,p=NC(0,c,this.__views__),f=p.start,m=p.end,y=m-f,A=u?m:f-1,v=this.__iteratees__,M=v.length,E=0,O=Ot(y,this.__takeCount__);if(!s||!u&&c==y&&O==y)return Sh(r,this.__actions__);var R=[];t:for(;y--&&E<O;){A+=i;for(var H=-1,L=r[A];++H<M;){var V=v[H],W=V.iteratee,Yt=V.type,Ft=W(L);if(Yt==bg)L=Ft;else if(!Ft){if(Yt==ac)continue t;break t}}R[E++]=L}return R}j.prototype=xi(Lo.prototype),j.prototype.constructor=j;function kr(r){var i=-1,s=r==null?0:r.length;for(this.clear();++i<s;){var u=r[i];this.set(u[0],u[1])}}function Eb(){this.__data__=un?un(null):{},this.size=0}function Tb(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}function Sb(r){var i=this.__data__;if(un){var s=i[r];return s===d?o:s}return z.call(i,r)?i[r]:o}function Ob(r){var i=this.__data__;return un?i[r]!==o:z.call(i,r)}function Db(r,i){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=un&&i===o?d:i,this}kr.prototype.clear=Eb,kr.prototype.delete=Tb,kr.prototype.get=Sb,kr.prototype.has=Ob,kr.prototype.set=Db;function $e(r){var i=-1,s=r==null?0:r.length;for(this.clear();++i<s;){var u=r[i];this.set(u[0],u[1])}}function Ib(){this.__data__=[],this.size=0}function Rb(r){var i=this.__data__,s=wo(i,r);if(s<0)return!1;var u=i.length-1;return s==u?i.pop():To.call(i,s,1),--this.size,!0}function Lb(r){var i=this.__data__,s=wo(i,r);return s<0?o:i[s][1]}function wb(r){return wo(this.__data__,r)>-1}function kb(r,i){var s=this.__data__,u=wo(s,r);return u<0?(++this.size,s.push([r,i])):s[u][1]=i,this}$e.prototype.clear=Ib,$e.prototype.delete=Rb,$e.prototype.get=Lb,$e.prototype.has=wb,$e.prototype.set=kb;function Ke(r){var i=-1,s=r==null?0:r.length;for(this.clear();++i<s;){var u=r[i];this.set(u[0],u[1])}}function Fb(){this.size=0,this.__data__={hash:new kr,map:new(on||$e),string:new kr}}function Nb(r){var i=qo(this,r).delete(r);return this.size-=i?1:0,i}function Pb(r){return qo(this,r).get(r)}function Hb(r){return qo(this,r).has(r)}function Ub(r,i){var s=qo(this,r),u=s.size;return s.set(r,i),this.size+=s.size==u?0:1,this}Ke.prototype.clear=Fb,Ke.prototype.delete=Nb,Ke.prototype.get=Pb,Ke.prototype.has=Hb,Ke.prototype.set=Ub;function Fr(r){var i=-1,s=r==null?0:r.length;for(this.__data__=new Ke;++i<s;)this.add(r[i])}function Bb(r){return this.__data__.set(r,d),this}function Vb(r){return this.__data__.has(r)}Fr.prototype.add=Fr.prototype.push=Bb,Fr.prototype.has=Vb;function ye(r){var i=this.__data__=new $e(r);this.size=i.size}function jb(){this.__data__=new $e,this.size=0}function Wb(r){var i=this.__data__,s=i.delete(r);return this.size=i.size,s}function Gb(r){return this.__data__.get(r)}function qb(r){return this.__data__.has(r)}function $b(r,i){var s=this.__data__;if(s instanceof $e){var u=s.__data__;if(!on||u.length<e-1)return u.push([r,i]),this.size=++s.size,this;s=this.__data__=new Ke(u)}return s.set(r,i),this.size=s.size,this}ye.prototype.clear=jb,ye.prototype.delete=Wb,ye.prototype.get=Gb,ye.prototype.has=qb,ye.prototype.set=$b;function nh(r,i){var s=k(r),u=!s&&Br(r),c=!s&&!u&&vr(r),p=!s&&!u&&!c&&Oi(r),f=s||u||c||p,m=f?Ka(r.length,rb):[],y=m.length;for(var A in r)(i||z.call(r,A))&&!(f&&(A=="length"||c&&(A=="offset"||A=="parent")||p&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||Ye(A,y)))&&m.push(A);return m}function sh(r){var i=r.length;return i?r[cu(0,i-1)]:o}function Kb(r,i){return $o(Ut(r),Nr(i,0,r.length))}function zb(r){return $o(Ut(r))}function tu(r,i,s){(s!==o&&!be(r[i],s)||s===o&&!(i in r))&&ze(r,i,s)}function cn(r,i,s){var u=r[i];(!(z.call(r,i)&&be(u,s))||s===o&&!(i in r))&&ze(r,i,s)}function wo(r,i){for(var s=r.length;s--;)if(be(r[s][0],i))return s;return-1}function Xb(r,i,s,u){return br(r,function(c,p,f){i(u,c,s(c),f)}),u}function oh(r,i){return r&&Le(i,Mt(i),r)}function Jb(r,i){return r&&Le(i,Vt(i),r)}function ze(r,i,s){i=="__proto__"&&So?So(r,i,{configurable:!0,enumerable:!0,value:s,writable:!0}):r[i]=s}function eu(r,i){for(var s=-1,u=i.length,c=C(u),p=r==null;++s<u;)c[s]=p?o:Fu(r,i[s]);return c}function Nr(r,i,s){return r===r&&(s!==o&&(r=r<=s?r:s),i!==o&&(r=r>=i?r:i)),r}function ue(r,i,s,u,c,p){var f,m=i&D,y=i>,A=i&We;if(s&&(f=c?s(r,u,c,p):s(r)),f!==o)return f;if(!at(r))return r;var v=k(r);if(v){if(f=HC(r),!m)return Ut(r,f)}else{var M=Dt(r),E=M==co||M==uc;if(vr(r))return Ih(r,m);if(M==qe||M==mi||E&&!c){if(f=y||E?{}:Xh(r),!m)return y?SC(r,Jb(f,r)):TC(r,oh(f,r))}else{if(!tt[M])return c?r:{};f=UC(r,M,m)}}p||(p=new ye);var O=p.get(r);if(O)return O;p.set(r,f),xp(r)?r.forEach(function(L){f.add(ue(L,i,s,L,r,p))}):vp(r)&&r.forEach(function(L,V){f.set(V,ue(L,i,s,V,r,p))});var R=A?y?Au:_u:y?Vt:Mt,H=v?o:R(r);return se(H||r,function(L,V){H&&(V=L,L=r[V]),cn(f,V,ue(L,i,s,V,r,p))}),f}function Yb(r){var i=Mt(r);return function(s){return ah(s,r,i)}}function ah(r,i,s){var u=s.length;if(r==null)return!u;for(r=Q(r);u--;){var c=s[u],p=i[c],f=r[c];if(f===o&&!(c in r)||!p(f))return!1}return!0}function uh(r,i,s){if(typeof r!="function")throw new oe(a);return yn(function(){r.apply(o,s)},i)}function hn(r,i,s,u){var c=-1,p=go,f=!0,m=r.length,y=[],A=i.length;if(!m)return y;s&&(i=st(i,zt(s))),u?(p=Va,f=!1):i.length>=e&&(p=nn,f=!1,i=new Fr(i));t:for(;++c<m;){var v=r[c],M=s==null?v:s(v);if(v=u||v!==0?v:0,f&&M===M){for(var E=A;E--;)if(i[E]===M)continue t;y.push(v)}else p(i,M,u)||y.push(v)}return y}var br=Fh(Re),lh=Fh(iu,!0);function Zb(r,i){var s=!0;return br(r,function(u,c,p){return s=!!i(u,c,p),s}),s}function ko(r,i,s){for(var u=-1,c=r.length;++u<c;){var p=r[u],f=i(p);if(f!=null&&(m===o?f===f&&!Jt(f):s(f,m)))var m=f,y=p}return y}function Qb(r,i,s,u){var c=r.length;for(s=N(s),s<0&&(s=-s>c?0:c+s),u=u===o||u>c?c:N(u),u<0&&(u+=c),u=s>u?0:Tp(u);s<u;)r[s++]=i;return r}function ch(r,i){var s=[];return br(r,function(u,c,p){i(u,c,p)&&s.push(u)}),s}function xt(r,i,s,u,c){var p=-1,f=r.length;for(s||(s=VC),c||(c=[]);++p<f;){var m=r[p];i>0&&s(m)?i>1?xt(m,i-1,s,u,c):dr(c,m):u||(c[c.length]=m)}return c}var ru=Nh(),hh=Nh(!0);function Re(r,i){return r&&ru(r,i,Mt)}function iu(r,i){return r&&hh(r,i,Mt)}function Fo(r,i){return fr(i,function(s){return Ze(r[s])})}function Pr(r,i){i=_r(i,r);for(var s=0,u=i.length;r!=null&&s<u;)r=r[we(i[s++])];return s&&s==u?r:o}function ph(r,i,s){var u=i(r);return k(r)?u:dr(u,s(r))}function wt(r){return r==null?r===o?Og:Tg:wr&&wr in Q(r)?FC(r):zC(r)}function nu(r,i){return r>i}function tC(r,i){return r!=null&&z.call(r,i)}function eC(r,i){return r!=null&&i in Q(r)}function rC(r,i,s){return r>=Ot(i,s)&&r<bt(i,s)}function su(r,i,s){for(var u=s?Va:go,c=r[0].length,p=r.length,f=p,m=C(p),y=1/0,A=[];f--;){var v=r[f];f&&i&&(v=st(v,zt(i))),y=Ot(v.length,y),m[f]=!s&&(i||c>=120&&v.length>=120)?new Fr(f&&v):o}v=r[0];var M=-1,E=m[0];t:for(;++M<c&&A.length<y;){var O=v[M],R=i?i(O):O;if(O=s||O!==0?O:0,!(E?nn(E,R):u(A,R,s))){for(f=p;--f;){var H=m[f];if(!(H?nn(H,R):u(r[f],R,s)))continue t}E&&E.push(R),A.push(O)}}return A}function iC(r,i,s,u){return Re(r,function(c,p,f){i(u,s(c),p,f)}),u}function pn(r,i,s){i=_r(i,r),r=Qh(r,i);var u=r==null?r:r[we(ce(i))];return u==null?o:Kt(u,r,s)}function fh(r){return lt(r)&&wt(r)==mi}function nC(r){return lt(r)&&wt(r)==rn}function sC(r){return lt(r)&&wt(r)==Yi}function fn(r,i,s,u,c){return r===i?!0:r==null||i==null||!lt(r)&&!lt(i)?r!==r&&i!==i:oC(r,i,s,u,fn,c)}function oC(r,i,s,u,c,p){var f=k(r),m=k(i),y=f?uo:Dt(r),A=m?uo:Dt(i);y=y==mi?qe:y,A=A==mi?qe:A;var v=y==qe,M=A==qe,E=y==A;if(E&&vr(r)){if(!vr(i))return!1;f=!0,v=!1}if(E&&!v)return p||(p=new ye),f||Oi(r)?$h(r,i,s,u,c,p):wC(r,i,y,s,u,c,p);if(!(s&pi)){var O=v&&z.call(r,"__wrapped__"),R=M&&z.call(i,"__wrapped__");if(O||R){var H=O?r.value():r,L=R?i.value():i;return p||(p=new ye),c(H,L,s,u,p)}}return E?(p||(p=new ye),kC(r,i,s,u,c,p)):!1}function aC(r){return lt(r)&&Dt(r)==de}function ou(r,i,s,u){var c=s.length,p=c,f=!u;if(r==null)return!p;for(r=Q(r);c--;){var m=s[c];if(f&&m[2]?m[1]!==r[m[0]]:!(m[0]in r))return!1}for(;++c<p;){m=s[c];var y=m[0],A=r[y],v=m[1];if(f&&m[2]){if(A===o&&!(y in r))return!1}else{var M=new ye;if(u)var E=u(A,v,y,r,i,M);if(!(E===o?fn(v,A,pi|oo,u,M):E))return!1}}return!0}function dh(r){if(!at(r)||WC(r))return!1;var i=Ze(r)?ab:Yg;return i.test(Ur(r))}function uC(r){return lt(r)&&wt(r)==Qi}function lC(r){return lt(r)&&Dt(r)==me}function cC(r){return lt(r)&&Zo(r.length)&&!!nt[wt(r)]}function mh(r){return typeof r=="function"?r:r==null?jt:typeof r=="object"?k(r)?bh(r[0],r[1]):yh(r):Pp(r)}function au(r){if(!gn(r))return fb(r);var i=[];for(var s in Q(r))z.call(r,s)&&s!="constructor"&&i.push(s);return i}function hC(r){if(!at(r))return KC(r);var i=gn(r),s=[];for(var u in r)u=="constructor"&&(i||!z.call(r,u))||s.push(u);return s}function uu(r,i){return r<i}function gh(r,i){var s=-1,u=Bt(r)?C(r.length):[];return br(r,function(c,p,f){u[++s]=i(c,p,f)}),u}function yh(r){var i=Mu(r);return i.length==1&&i[0][2]?Yh(i[0][0],i[0][1]):function(s){return s===r||ou(s,r,i)}}function bh(r,i){return Eu(r)&&Jh(i)?Yh(we(r),i):function(s){var u=Fu(s,r);return u===o&&u===i?Nu(s,r):fn(i,u,pi|oo)}}function No(r,i,s,u,c){r!==i&&ru(i,function(p,f){if(c||(c=new ye),at(p))pC(r,i,f,s,No,u,c);else{var m=u?u(Su(r,f),p,f+"",r,i,c):o;m===o&&(m=p),tu(r,f,m)}},Vt)}function pC(r,i,s,u,c,p,f){var m=Su(r,s),y=Su(i,s),A=f.get(y);if(A){tu(r,s,A);return}var v=p?p(m,y,s+"",r,i,f):o,M=v===o;if(M){var E=k(y),O=!E&&vr(y),R=!E&&!O&&Oi(y);v=y,E||O||R?k(m)?v=m:ht(m)?v=Ut(m):O?(M=!1,v=Ih(y,!0)):R?(M=!1,v=Rh(y,!0)):v=[]:bn(y)||Br(y)?(v=m,Br(m)?v=Sp(m):(!at(m)||Ze(m))&&(v=Xh(y))):M=!1}M&&(f.set(y,v),c(v,y,u,p,f),f.delete(y)),tu(r,s,v)}function Ch(r,i){var s=r.length;if(s)return i+=i<0?s:0,Ye(i,s)?r[i]:o}function _h(r,i,s){i.length?i=st(i,function(p){return k(p)?function(f){return Pr(f,p.length===1?p[0]:p)}:p}):i=[jt];var u=-1;i=st(i,zt(I()));var c=gh(r,function(p,f,m){var y=st(i,function(A){return A(p)});return{criteria:y,index:++u,value:p}});return Uy(c,function(p,f){return EC(p,f,s)})}function fC(r,i){return Ah(r,i,function(s,u){return Nu(r,u)})}function Ah(r,i,s){for(var u=-1,c=i.length,p={};++u<c;){var f=i[u],m=Pr(r,f);s(m,f)&&dn(p,_r(f,r),m)}return p}function dC(r){return function(i){return Pr(i,r)}}function lu(r,i,s,u){var c=u?Hy:bi,p=-1,f=i.length,m=r;for(r===i&&(i=Ut(i)),s&&(m=st(r,zt(s)));++p<f;)for(var y=0,A=i[p],v=s?s(A):A;(y=c(m,v,y,u))>-1;)m!==r&&To.call(m,y,1),To.call(r,y,1);return r}function vh(r,i){for(var s=r?i.length:0,u=s-1;s--;){var c=i[s];if(s==u||c!==p){var p=c;Ye(c)?To.call(r,c,1):fu(r,c)}}return r}function cu(r,i){return r+Do(rh()*(i-r+1))}function mC(r,i,s,u){for(var c=-1,p=bt(Oo((i-r)/(s||1)),0),f=C(p);p--;)f[u?p:++c]=r,r+=s;return f}function hu(r,i){var s="";if(!r||i<1||i>pr)return s;do i%2&&(s+=r),i=Do(i/2),i&&(r+=r);while(i);return s}function U(r,i){return Ou(Zh(r,i,jt),r+"")}function gC(r){return sh(Di(r))}function yC(r,i){var s=Di(r);return $o(s,Nr(i,0,s.length))}function dn(r,i,s,u){if(!at(r))return r;i=_r(i,r);for(var c=-1,p=i.length,f=p-1,m=r;m!=null&&++c<p;){var y=we(i[c]),A=s;if(y==="__proto__"||y==="constructor"||y==="prototype")return r;if(c!=f){var v=m[y];A=u?u(v,y,m):o,A===o&&(A=at(v)?v:Ye(i[c+1])?[]:{})}cn(m,y,A),m=m[y]}return r}var Mh=Io?function(r,i){return Io.set(r,i),r}:jt,bC=So?function(r,i){return So(r,"toString",{configurable:!0,enumerable:!1,value:Hu(i),writable:!0})}:jt;function CC(r){return $o(Di(r))}function le(r,i,s){var u=-1,c=r.length;i<0&&(i=-i>c?0:c+i),s=s>c?c:s,s<0&&(s+=c),c=i>s?0:s-i>>>0,i>>>=0;for(var p=C(c);++u<c;)p[u]=r[u+i];return p}function _C(r,i){var s;return br(r,function(u,c,p){return s=i(u,c,p),!s}),!!s}function Po(r,i,s){var u=0,c=r==null?u:r.length;if(typeof i=="number"&&i===i&&c<=vg){for(;u<c;){var p=u+c>>>1,f=r[p];f!==null&&!Jt(f)&&(s?f<=i:f<i)?u=p+1:c=p}return c}return pu(r,i,jt,s)}function pu(r,i,s,u){var c=0,p=r==null?0:r.length;if(p===0)return 0;i=s(i);for(var f=i!==i,m=i===null,y=Jt(i),A=i===o;c<p;){var v=Do((c+p)/2),M=s(r[v]),E=M!==o,O=M===null,R=M===M,H=Jt(M);if(f)var L=u||R;else A?L=R&&(u||E):m?L=R&&E&&(u||!O):y?L=R&&E&&!O&&(u||!H):O||H?L=!1:L=u?M<=i:M<i;L?c=v+1:p=v}return Ot(p,Ag)}function xh(r,i){for(var s=-1,u=r.length,c=0,p=[];++s<u;){var f=r[s],m=i?i(f):f;if(!s||!be(m,y)){var y=m;p[c++]=f===0?0:f}}return p}function Eh(r){return typeof r=="number"?r:Jt(r)?ao:+r}function Xt(r){if(typeof r=="string")return r;if(k(r))return st(r,Xt)+"";if(Jt(r))return ih?ih.call(r):"";var i=r+"";return i=="0"&&1/r==-Rr?"-0":i}function Cr(r,i,s){var u=-1,c=go,p=r.length,f=!0,m=[],y=m;if(s)f=!1,c=Va;else if(p>=e){var A=i?null:RC(r);if(A)return bo(A);f=!1,c=nn,y=new Fr}else y=i?[]:m;t:for(;++u<p;){var v=r[u],M=i?i(v):v;if(v=s||v!==0?v:0,f&&M===M){for(var E=y.length;E--;)if(y[E]===M)continue t;i&&y.push(M),m.push(v)}else c(y,M,s)||(y!==m&&y.push(M),m.push(v))}return m}function fu(r,i){i=_r(i,r);var s=-1,u=i.length;if(!u)return!0;for(var c=r==null||typeof r!="object"&&typeof r!="function";++s<u;){var p=i[s];if(typeof p=="string"){if(p==="__proto__"&&!z.call(r,"__proto__"))return!1;if(p==="constructor"&&s+1<u&&typeof i[s+1]=="string"&&i[s+1]==="prototype"){if(c&&s===0)continue;return!1}}}var f=Qh(r,i);return f==null||delete f[we(ce(i))]}function Th(r,i,s,u){return dn(r,i,s(Pr(r,i)),u)}function Ho(r,i,s,u){for(var c=r.length,p=u?c:-1;(u?p--:++p<c)&&i(r[p],p,r););return s?le(r,u?0:p,u?p+1:c):le(r,u?p+1:0,u?c:p)}function Sh(r,i){var s=r;return s instanceof j&&(s=s.value()),ja(i,function(u,c){return c.func.apply(c.thisArg,dr([u],c.args))},s)}function du(r,i,s){var u=r.length;if(u<2)return u?Cr(r[0]):[];for(var c=-1,p=C(u);++c<u;)for(var f=r[c],m=-1;++m<u;)m!=c&&(p[c]=hn(p[c]||f,r[m],i,s));return Cr(xt(p,1),i,s)}function Oh(r,i,s){for(var u=-1,c=r.length,p=i.length,f={};++u<c;){var m=u<p?i[u]:o;s(f,r[u],m)}return f}function mu(r){return ht(r)?r:[]}function gu(r){return typeof r=="function"?r:jt}function _r(r,i){return k(r)?r:Eu(r,i)?[r]:ip(X(r))}var AC=U;function Ar(r,i,s){var u=r.length;return s=s===o?u:s,!i&&s>=u?r:le(r,i,s)}var Dh=ub||function(r){return vt.clearTimeout(r)};function Ih(r,i){if(i)return r.slice();var s=r.length,u=Yc?Yc(s):new r.constructor(s);return r.copy(u),u}function yu(r){var i=new r.constructor(r.byteLength);return new xo(i).set(new xo(r)),i}function vC(r,i){var s=i?yu(r.buffer):r.buffer;return new r.constructor(s,r.byteOffset,r.byteLength)}function MC(r){var i=new r.constructor(r.source,fc.exec(r));return i.lastIndex=r.lastIndex,i}function xC(r){return ln?Q(ln.call(r)):{}}function Rh(r,i){var s=i?yu(r.buffer):r.buffer;return new r.constructor(s,r.byteOffset,r.length)}function Lh(r,i){if(r!==i){var s=r!==o,u=r===null,c=r===r,p=Jt(r),f=i!==o,m=i===null,y=i===i,A=Jt(i);if(!m&&!A&&!p&&r>i||p&&f&&y&&!m&&!A||u&&f&&y||!s&&y||!c)return 1;if(!u&&!p&&!A&&r<i||A&&s&&c&&!u&&!p||m&&s&&c||!f&&c||!y)return-1}return 0}function EC(r,i,s){for(var u=-1,c=r.criteria,p=i.criteria,f=c.length,m=s.length;++u<f;){var y=Lh(c[u],p[u]);if(y){if(u>=m)return y;var A=s[u];return y*(A=="desc"?-1:1)}}return r.index-i.index}function wh(r,i,s,u){for(var c=-1,p=r.length,f=s.length,m=-1,y=i.length,A=bt(p-f,0),v=C(y+A),M=!u;++m<y;)v[m]=i[m];for(;++c<f;)(M||c<p)&&(v[s[c]]=r[c]);for(;A--;)v[m++]=r[c++];return v}function kh(r,i,s,u){for(var c=-1,p=r.length,f=-1,m=s.length,y=-1,A=i.length,v=bt(p-m,0),M=C(v+A),E=!u;++c<v;)M[c]=r[c];for(var O=c;++y<A;)M[O+y]=i[y];for(;++f<m;)(E||c<p)&&(M[O+s[f]]=r[c++]);return M}function Ut(r,i){var s=-1,u=r.length;for(i||(i=C(u));++s<u;)i[s]=r[s];return i}function Le(r,i,s,u){var c=!s;s||(s={});for(var p=-1,f=i.length;++p<f;){var m=i[p],y=u?u(s[m],r[m],m,s,r):o;y===o&&(y=r[m]),c?ze(s,m,y):cn(s,m,y)}return s}function TC(r,i){return Le(r,xu(r),i)}function SC(r,i){return Le(r,Kh(r),i)}function Uo(r,i){return function(s,u){var c=k(s)?Ly:Xb,p=i?i():{};return c(s,r,I(u,2),p)}}function Ei(r){return U(function(i,s){var u=-1,c=s.length,p=c>1?s[c-1]:o,f=c>2?s[2]:o;for(p=r.length>3&&typeof p=="function"?(c--,p):o,f&&kt(s[0],s[1],f)&&(p=c<3?o:p,c=1),i=Q(i);++u<c;){var m=s[u];m&&r(i,m,u,p)}return i})}function Fh(r,i){return function(s,u){if(s==null)return s;if(!Bt(s))return r(s,u);for(var c=s.length,p=i?c:-1,f=Q(s);(i?p--:++p<c)&&u(f[p],p,f)!==!1;);return s}}function Nh(r){return function(i,s,u){for(var c=-1,p=Q(i),f=u(i),m=f.length;m--;){var y=f[r?m:++c];if(s(p[y],y,p)===!1)break}return i}}function OC(r,i,s){var u=i&ie,c=mn(r);function p(){var f=this&&this!==vt&&this instanceof p?c:r;return f.apply(u?s:this,arguments)}return p}function Ph(r){return function(i){i=X(i);var s=Ci(i)?ge(i):o,u=s?s[0]:i.charAt(0),c=s?Ar(s,1).join(""):i.slice(1);return u[r]()+c}}function Ti(r){return function(i){return ja(Fp(kp(i).replace(by,"")),r,"")}}function mn(r){return function(){var i=arguments;switch(i.length){case 0:return new r;case 1:return new r(i[0]);case 2:return new r(i[0],i[1]);case 3:return new r(i[0],i[1],i[2]);case 4:return new r(i[0],i[1],i[2],i[3]);case 5:return new r(i[0],i[1],i[2],i[3],i[4]);case 6:return new r(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new r(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var s=xi(r.prototype),u=r.apply(s,i);return at(u)?u:s}}function DC(r,i,s){var u=mn(r);function c(){for(var p=arguments.length,f=C(p),m=p,y=Si(c);m--;)f[m]=arguments[m];var A=p<3&&f[0]!==y&&f[p-1]!==y?[]:mr(f,y);if(p-=A.length,p<s)return jh(r,i,Bo,c.placeholder,o,f,A,o,o,s-p);var v=this&&this!==vt&&this instanceof c?u:r;return Kt(v,this,f)}return c}function Hh(r){return function(i,s,u){var c=Q(i);if(!Bt(i)){var p=I(s,3);i=Mt(i),s=function(m){return p(c[m],m,c)}}var f=r(i,s,u);return f>-1?c[p?i[f]:f]:o}}function Uh(r){return Je(function(i){var s=i.length,u=s,c=ae.prototype.thru;for(r&&i.reverse();u--;){var p=i[u];if(typeof p!="function")throw new oe(a);if(c&&!f&&Go(p)=="wrapper")var f=new ae([],!0)}for(u=f?u:s;++u<s;){p=i[u];var m=Go(p),y=m=="wrapper"?vu(p):o;y&&Tu(y[0])&&y[1]==(Ge|Oe|De|Xi)&&!y[4].length&&y[9]==1?f=f[Go(y[0])].apply(f,y[3]):f=p.length==1&&Tu(p)?f[m]():f.thru(p)}return function(){var A=arguments,v=A[0];if(f&&A.length==1&&k(v))return f.plant(v).value();for(var M=0,E=s?i[M].apply(this,A):v;++M<s;)E=i[M].call(this,E);return E}})}function Bo(r,i,s,u,c,p,f,m,y,A){var v=i&Ge,M=i&ie,E=i&Ir,O=i&(Oe|fi),R=i&Z,H=E?o:mn(r);function L(){for(var V=arguments.length,W=C(V),Yt=V;Yt--;)W[Yt]=arguments[Yt];if(O)var Ft=Si(L),Zt=Vy(W,Ft);if(u&&(W=wh(W,u,c,O)),p&&(W=kh(W,p,f,O)),V-=Zt,O&&V<A){var pt=mr(W,Ft);return jh(r,i,Bo,L.placeholder,s,W,pt,m,y,A-V)}var Ce=M?s:this,tr=E?Ce[r]:r;return V=W.length,m?W=XC(W,m):R&&V>1&&W.reverse(),v&&y<V&&(W.length=y),this&&this!==vt&&this instanceof L&&(tr=H||mn(tr)),tr.apply(Ce,W)}return L}function Bh(r,i){return function(s,u){return iC(s,r,i(u),{})}}function Vo(r,i){return function(s,u){var c;if(s===o&&u===o)return i;if(s!==o&&(c=s),u!==o){if(c===o)return u;typeof s=="string"||typeof u=="string"?(s=Xt(s),u=Xt(u)):(s=Eh(s),u=Eh(u)),c=r(s,u)}return c}}function bu(r){return Je(function(i){return i=st(i,zt(I())),U(function(s){var u=this;return r(i,function(c){return Kt(c,u,s)})})})}function jo(r,i){i=i===o?" ":Xt(i);var s=i.length;if(s<2)return s?hu(i,r):i;var u=hu(i,Oo(r/_i(i)));return Ci(i)?Ar(ge(u),0,r).join(""):u.slice(0,r)}function IC(r,i,s,u){var c=i&ie,p=mn(r);function f(){for(var m=-1,y=arguments.length,A=-1,v=u.length,M=C(v+y),E=this&&this!==vt&&this instanceof f?p:r;++A<v;)M[A]=u[A];for(;y--;)M[A++]=arguments[++m];return Kt(E,c?s:this,M)}return f}function Vh(r){return function(i,s,u){return u&&typeof u!="number"&&kt(i,s,u)&&(s=u=o),i=Qe(i),s===o?(s=i,i=0):s=Qe(s),u=u===o?i<s?1:-1:Qe(u),mC(i,s,u,r)}}function Wo(r){return function(i,s){return typeof i=="string"&&typeof s=="string"||(i=he(i),s=he(s)),r(i,s)}}function jh(r,i,s,u,c,p,f,m,y,A){var v=i&Oe,M=v?f:o,E=v?o:f,O=v?p:o,R=v?o:p;i|=v?De:di,i&=~(v?di:De),i&oc||(i&=~(ie|Ir));var H=[r,i,c,O,M,R,E,m,y,A],L=s.apply(o,H);return Tu(r)&&tp(L,H),L.placeholder=u,ep(L,r,i)}function Cu(r){var i=yt[r];return function(s,u){if(s=he(s),u=u==null?0:Ot(N(u),292),u&&eh(s)){var c=(X(s)+"e").split("e"),p=i(c[0]+"e"+(+c[1]+u));return c=(X(p)+"e").split("e"),+(c[0]+"e"+(+c[1]-u))}return i(s)}}var RC=vi&&1/bo(new vi([,-0]))[1]==Rr?function(r){return new vi(r)}:Vu;function Wh(r){return function(i){var s=Dt(i);return s==de?Xa(i):s==me?zy(i):By(i,r(i))}}function Xe(r,i,s,u,c,p,f,m){var y=i&Ir;if(!y&&typeof r!="function")throw new oe(a);var A=u?u.length:0;if(A||(i&=~(De|di),u=c=o),f=f===o?f:bt(N(f),0),m=m===o?m:N(m),A-=c?c.length:0,i&di){var v=u,M=c;u=c=o}var E=y?o:vu(r),O=[r,i,s,u,c,v,M,p,f,m];if(E&&$C(O,E),r=O[0],i=O[1],s=O[2],u=O[3],c=O[4],m=O[9]=O[9]===o?y?0:r.length:bt(O[9]-A,0),!m&&i&(Oe|fi)&&(i&=~(Oe|fi)),!i||i==ie)var R=OC(r,i,s);else i==Oe||i==fi?R=DC(r,i,m):(i==De||i==(ie|De))&&!c.length?R=IC(r,i,s,u):R=Bo.apply(o,O);var H=E?Mh:tp;return ep(H(R,O),r,i)}function Gh(r,i,s,u){return r===o||be(r,Ai[s])&&!z.call(u,s)?i:r}function qh(r,i,s,u,c,p){return at(r)&&at(i)&&(p.set(i,r),No(r,i,o,qh,p),p.delete(i)),r}function LC(r){return bn(r)?o:r}function $h(r,i,s,u,c,p){var f=s&pi,m=r.length,y=i.length;if(m!=y&&!(f&&y>m))return!1;var A=p.get(r),v=p.get(i);if(A&&v)return A==i&&v==r;var M=-1,E=!0,O=s&oo?new Fr:o;for(p.set(r,i),p.set(i,r);++M<m;){var R=r[M],H=i[M];if(u)var L=f?u(H,R,M,i,r,p):u(R,H,M,r,i,p);if(L!==o){if(L)continue;E=!1;break}if(O){if(!Wa(i,function(V,W){if(!nn(O,W)&&(R===V||c(R,V,s,u,p)))return O.push(W)})){E=!1;break}}else if(!(R===H||c(R,H,s,u,p))){E=!1;break}}return p.delete(r),p.delete(i),E}function wC(r,i,s,u,c,p,f){switch(s){case gi:if(r.byteLength!=i.byteLength||r.byteOffset!=i.byteOffset)return!1;r=r.buffer,i=i.buffer;case rn:return!(r.byteLength!=i.byteLength||!p(new xo(r),new xo(i)));case Ji:case Yi:case Zi:return be(+r,+i);case lo:return r.name==i.name&&r.message==i.message;case Qi:case tn:return r==i+"";case de:var m=Xa;case me:var y=uπif(m||(m=bo),r.size!=i.size&&!y)return!1;var A=f.get(r);if(A)return A==i;u|=oo,f.set(r,i);var v=$h(m(r),m(i),u,c,p,f);return f.delete(r),v;case ho:if(ln)return ln.call(r)==ln.call(i)}return!1}function kC(r,i,s,u,c,p){var f=s&pi,m=_u(r),y=m.length,A=_u(i),v=A.length;if(y!=v&&!f)return!1;for(var M=y;M--;){var E=m[M];if(!(f?E in i:z.call(i,E)))return!1}var O=p.get(r),R=p.get(i);if(O&&R)return O==i&&R==r;var H=!0;p.set(r,i),p.set(i,r);for(var L=f;++M<y;){E=m[M];var V=r[E],W=i[E];if(u)var Yt=f?u(W,V,E,i,r,p):u(V,W,E,r,i,p);if(!(Yt===o?V===W||c(V,W,s,u,p):Yt)){H=!1;break}L||(L=E=="constructor")}if(H&&!L){var Ft=r.constructor,Zt=i.constructor;Ft!=Zt&&"constructor"in r&&"constructor"in i&&!(typeof Ft=="function"&&Ft instanceof Ft&&typeof Zt=="function"&&Zt instanceof Zt)&&(H=!1)}return p.delete(r),p.delete(i),H}function Je(r){return Ou(Zh(r,o,ap),r+"")}function _u(r){return ph(r,Mt,xu)}function Au(r){return ph(r,Vt,Kh)}var vu=Io?function(r){return Io.get(r)}:Vu;function Go(r){for(var i=r.name+"",s=Mi[i],u=z.call(Mi,i)?s.length:0;u--;){var c=s[u],p=c.func;if(p==null||p==r)return c.name}return i}function Si(r){var i=z.call(h,"placeholder")?h:r;return i.placeholder}function I(){var r=h.iteratee||Uu;return r=r===Uu?mh:r,arguments.length?r(arguments[0],arguments[1]):r}function qo(r,i){var s=r.__data__;return jC(i)?s[typeof i=="string"?"string":"hash"]:s.map}function Mu(r){for(var i=Mt(r),s=i.length;s--;){var u=i[s],c=r[u];i[s]=[u,c,Jh(c)]}return i}function Hr(r,i){var s=qy(r,i);return dh(s)?s:o}function FC(r){var i=z.call(r,wr),s=r[wr];try{r[wr]=o;var u=!0}catch{}var c=vo.call(r);return u&&(i?r[wr]=s:delete r[wr]),c}var xu=Ya?function(r){return r==null?[]:(r=Q(r),fr(Ya(r),function(i){return Qc.call(r,i)}))}:ju,Kh=Ya?function(r){for(var i=[];r;)dr(i,xu(r)),r=Eo(r);return i}:ju,Dt=wt;(Za&&Dt(new Za(new ArrayBuffer(1)))!=gi||on&&Dt(new on)!=de||Qa&&Dt(Qa.resolve())!=lc||vi&&Dt(new vi)!=me||an&&Dt(new an)!=en)&&(Dt=function(r){var i=wt(r),s=i==qe?r.constructor:o,u=s?Ur(s):"";if(u)switch(u){case yb:return gi;case bb:return de;case Cb:return lc;case _b:return me;case Ab:return en}return i});function NC(r,i,s){for(var u=-1,c=s.length;++u<c;){var p=s[u],f=p.size;switch(p.type){case"drop":r+=f;break;case"dropRight":i-=f;break;case"take":i=Ot(i,r+f);break;case"takeRight":r=bt(r,i-f);break}}return{start:r,end:i}}function PC(r){var i=r.match(Wg);return i?i[1].split(Gg):[]}function zh(r,i,s){i=_r(i,r);for(var u=-1,c=i.length,p=!1;++u<c;){var f=we(i[u]);if(!(p=r!=null&&s(r,f)))break;r=r[f]}return p||++u!=c?p:(c=r==null?0:r.length,!!c&&Zo(c)&&Ye(f,c)&&(k(r)||Br(r)))}function HC(r){var i=r.length,s=new r.constructor(i);return i&&typeof r[0]=="string"&&z.call(r,"index")&&(s.index=r.index,s.input=r.input),s}function Xh(r){return typeof r.constructor=="function"&&!gn(r)?xi(Eo(r)):{}}function UC(r,i,s){var u=r.constructor;switch(i){case rn:return yu(r);case Ji:case Yi:return new u(+r);case gi:return vC(r,s);case Ma:case xa:case Ea:case Ta:case Sa:case Oa:case Da:case Ia:case Ra:return Rh(r,s);case de:return new u;case Zi:case tn:return new u(r);case Qi:return MC(r);case me:return new u;case ho:return xC(r)}}function BC(r,i){var s=i.length;if(!s)return r;var u=s-1;return i[u]=(s>1?"& ":"")+i[u],i=i.join(s>2?", ":" "),r.replace(jg,`{
|
|
2
2
|
/* [wrapped with `+i+`] */
|
|
3
|
-
`)}function BC(r){return k(r)||Hr(r)||!!(Yc&&r&&r[Yc])}function Ye(r,i){var s=typeof r;return i=i??hr,!!i&&(s=="number"||s!="symbol"&&Yg.test(r))&&r>-1&&r%1==0&&r<i}function kt(r,i,s){if(!at(s))return!1;var u=typeof i;return(u=="number"?Ut(s)&&Ye(i,s.length):u=="string"&&i in s)?be(s[i],r):!1}function Eu(r,i){if(k(r))return!1;var s=typeof r;return s=="number"||s=="symbol"||s=="boolean"||r==null||Jt(r)?!0:Ng.test(r)||!Fg.test(r)||i!=null&&r in Q(i)}function UC(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}function Tu(r){var i=Go(r),s=h[i];if(typeof s!="function"||!(i in j.prototype))return!1;if(r===s)return!0;var u=vu(s);return!!u&&r===u[0]}function VC(r){return!!Kc&&Kc in r}var jC=_o?Ze:Wu;function gn(r){var i=r&&r.constructor,s=typeof i=="function"&&i.prototype||_i;return r===s}function Kh(r){return r===r&&!at(r)}function zh(r,i){return function(s){return s==null?!1:s[r]===i&&(i!==o||r in Q(s))}}function WC(r){var i=Jo(r,function(u){return s.size===b&&s.clear(),u}),s=i.cache;return i}function GC(r,i){var s=r[1],u=i[1],c=s|u,p=c<(ie|Or|Ge),f=u==Ge&&s==Oe||u==Ge&&s==Xi&&r[7].length<=i[8]||u==(Ge|Xi)&&i[7].length<=i[8]&&s==Oe;if(!(p||f))return r;u&ie&&(r[2]=i[2],c|=s&ie?0:ic);var m=i[3];if(m){var y=r[3];r[3]=y?Ih(y,m,i[4]):m,r[4]=y?dr(r[3],x):i[4]}return m=i[5],m&&(y=r[5],r[5]=y?Rh(y,m,i[6]):m,r[6]=y?dr(r[5],x):i[6]),m=i[7],m&&(r[7]=m),u&Ge&&(r[8]=r[8]==null?i[8]:Ot(r[8],i[8])),r[9]==null&&(r[9]=i[9]),r[0]=i[0],r[1]=c,r}function qC(r){var i=[];if(r!=null)for(var s in Q(r))i.push(s);return i}function $C(r){return vo.call(r)}function Xh(r,i,s){return i=bt(i===o?r.length-1:i,0),function(){for(var u=arguments,c=-1,p=bt(u.length-i,0),f=C(p);++c<p;)f[c]=u[i+c];c=-1;for(var m=C(i+1);++c<i;)m[c]=u[c];return m[i]=s(f),Kt(r,this,m)}}function Jh(r,i){return i.length<2?r:Fr(r,le(i,0,-1))}function KC(r,i){for(var s=r.length,u=Ot(i.length,s),c=Bt(r);u--;){var p=i[u];r[u]=Ye(p,s)?c[p]:o}return r}function Su(r,i){if(!(i==="constructor"&&typeof r[i]=="function")&&i!="__proto__")return r[i]}var Yh=Qh(_h),yn=ub||function(r,i){return At.setTimeout(r,i)},Ou=Qh(gC);function Zh(r,i,s){var u=i+"";return Ou(r,HC(u,zC(FC(u),s)))}function Qh(r){var i=0,s=0;return function(){var u=pb(),c=mg-(u-s);if(s=u,c>0){if(++i>=dg)return arguments[0]}else i=0;return r.apply(o,arguments)}}function $o(r,i){var s=-1,u=r.length,c=u-1;for(i=i===o?u:i;++s<i;){var p=cu(s,c),f=r[p];r[p]=r[s],r[s]=f}return r.length=i,r}var tp=WC(function(r){var i=[];return r.charCodeAt(0)===46&&i.push(""),r.replace(Pg,function(s,u,c,p){i.push(c?p.replace(qg,"$1"):u||s)}),i});function we(r){if(typeof r=="string"||Jt(r))return r;var i=r+"";return i=="0"&&1/r==-Dr?"-0":i}function Pr(r){if(r!=null){try{return Ao.call(r)}catch{}try{return r+""}catch{}}return""}function zC(r,i){return se(Ag,function(s){var u="_."+s[0];i&s[1]&&!go(r,u)&&r.push(u)}),r.sort()}function ep(r){if(r instanceof j)return r.clone();var i=new ae(r.__wrapped__,r.__chain__);return i.__actions__=Bt(r.__actions__),i.__index__=r.__index__,i.__values__=r.__values__,i}function XC(r,i,s){(s?kt(r,i,s):i===o)?i=1:i=bt(N(i),0);var u=r==null?0:r.length;if(!u||i<1)return[];for(var c=0,p=0,f=C(Oo(u/i));c<u;)f[p++]=le(r,c,c+=i);return f}function JC(r){for(var i=-1,s=r==null?0:r.length,u=0,c=[];++i<s;){var p=r[i];p&&(c[u++]=p)}return c}function YC(){var r=arguments.length;if(!r)return[];for(var i=C(r-1),s=arguments[0],u=r;u--;)i[u-1]=arguments[u];return fr(k(s)?Bt(s):[s],Mt(i,1))}var ZC=B(function(r,i){return ht(r)?hn(r,Mt(i,1,ht,!0)):[]}),QC=B(function(r,i){var s=ce(i);return ht(s)&&(s=o),ht(r)?hn(r,Mt(i,1,ht,!0),I(s,2)):[]}),t_=B(function(r,i){var s=ce(i);return ht(s)&&(s=o),ht(r)?hn(r,Mt(i,1,ht,!0),o,s):[]});function e_(r,i,s){var u=r==null?0:r.length;return u?(i=s||i===o?1:N(i),le(r,i<0?0:i,u)):[]}function r_(r,i,s){var u=r==null?0:r.length;return u?(i=s||i===o?1:N(i),i=u-i,le(r,0,i<0?0:i)):[]}function i_(r,i){return r&&r.length?Ho(r,I(i,3),!0,!0):[]}function n_(r,i){return r&&r.length?Ho(r,I(i,3),!0):[]}function s_(r,i,s,u){var c=r==null?0:r.length;return c?(s&&typeof s!="number"&&kt(r,i,s)&&(s=0,u=c),Yb(r,i,s,u)):[]}function rp(r,i,s){var u=r==null?0:r.length;if(!u)return-1;var c=s==null?0:N(s);return c<0&&(c=bt(u+c,0)),yo(r,I(i,3),c)}function ip(r,i,s){var u=r==null?0:r.length;if(!u)return-1;var c=u-1;return s!==o&&(c=N(s),c=s<0?bt(u+c,0):Ot(c,u-1)),yo(r,I(i,3),c,!0)}function np(r){var i=r==null?0:r.length;return i?Mt(r,1):[]}function o_(r){var i=r==null?0:r.length;return i?Mt(r,Dr):[]}function a_(r,i){var s=r==null?0:r.length;return s?(i=i===o?1:N(i),Mt(r,i)):[]}function u_(r){for(var i=-1,s=r==null?0:r.length,u={};++i<s;){var c=r[i];u[c[0]]=c[1]}return u}function sp(r){return r&&r.length?r[0]:o}function l_(r,i,s){var u=r==null?0:r.length;if(!u)return-1;var c=s==null?0:N(s);return c<0&&(c=bt(u+c,0)),yi(r,i,c)}function c_(r){var i=r==null?0:r.length;return i?le(r,0,-1):[]}var h_=B(function(r){var i=nt(r,mu);return i.length&&i[0]===r[0]?su(i):[]}),p_=B(function(r){var i=ce(r),s=nt(r,mu);return i===ce(s)?i=o:s.pop(),s.length&&s[0]===r[0]?su(s,I(i,2)):[]}),f_=B(function(r){var i=ce(r),s=nt(r,mu);return i=typeof i=="function"?i:o,i&&s.pop(),s.length&&s[0]===r[0]?su(s,o,i):[]});function d_(r,i){return r==null?"":cb.call(r,i)}function ce(r){var i=r==null?0:r.length;return i?r[i-1]:o}function m_(r,i,s){var u=r==null?0:r.length;if(!u)return-1;var c=u;return s!==o&&(c=N(s),c=c<0?bt(u+c,0):Ot(c,u-1)),i===i?zy(r,i,c):yo(r,Bc,c,!0)}function g_(r,i){return r&&r.length?gh(r,N(i)):o}var y_=B(op);function op(r,i){return r&&r.length&&i&&i.length?lu(r,i):r}function b_(r,i,s){return r&&r.length&&i&&i.length?lu(r,i,I(s,2)):r}function C_(r,i,s){return r&&r.length&&i&&i.length?lu(r,i,o,s):r}var __=Je(function(r,i){var s=r==null?0:r.length,u=eu(r,i);return Ch(r,nt(i,function(c){return Ye(c,s)?+c:c}).sort(Dh)),u});function A_(r,i){var s=[];if(!(r&&r.length))return s;var u=-1,c=[],p=r.length;for(i=I(i,3);++u<p;){var f=r[u];i(f,u,r)&&(s.push(f),c.push(u))}return Ch(r,c),s}function Du(r){return r==null?r:db.call(r)}function v_(r,i,s){var u=r==null?0:r.length;return u?(s&&typeof s!="number"&&kt(r,i,s)?(i=0,s=u):(i=i==null?0:N(i),s=s===o?u:N(s)),le(r,i,s)):[]}function M_(r,i){return Po(r,i)}function x_(r,i,s){return pu(r,i,I(s,2))}function E_(r,i){var s=r==null?0:r.length;if(s){var u=Po(r,i);if(u<s&&be(r[u],i))return u}return-1}function T_(r,i){return Po(r,i,!0)}function S_(r,i,s){return pu(r,i,I(s,2),!0)}function O_(r,i){var s=r==null?0:r.length;if(s){var u=Po(r,i,!0)-1;if(be(r[u],i))return u}return-1}function D_(r){return r&&r.length?Ah(r):[]}function I_(r,i){return r&&r.length?Ah(r,I(i,2)):[]}function R_(r){var i=r==null?0:r.length;return i?le(r,1,i):[]}function L_(r,i,s){return r&&r.length?(i=s||i===o?1:N(i),le(r,0,i<0?0:i)):[]}function w_(r,i,s){var u=r==null?0:r.length;return u?(i=s||i===o?1:N(i),i=u-i,le(r,i<0?0:i,u)):[]}function k_(r,i){return r&&r.length?Ho(r,I(i,3),!1,!0):[]}function F_(r,i){return r&&r.length?Ho(r,I(i,3)):[]}var N_=B(function(r){return br(Mt(r,1,ht,!0))}),P_=B(function(r){var i=ce(r);return ht(i)&&(i=o),br(Mt(r,1,ht,!0),I(i,2))}),H_=B(function(r){var i=ce(r);return i=typeof i=="function"?i:o,br(Mt(r,1,ht,!0),o,i)});function B_(r){return r&&r.length?br(r):[]}function U_(r,i){return r&&r.length?br(r,I(i,2)):[]}function V_(r,i){return i=typeof i=="function"?i:o,r&&r.length?br(r,o,i):[]}function Iu(r){if(!(r&&r.length))return[];var i=0;return r=pr(r,function(s){if(ht(s))return i=bt(s.length,i),!0}),Ka(i,function(s){return nt(r,Ga(s))})}function ap(r,i){if(!(r&&r.length))return[];var s=Iu(r);return i==null?s:nt(s,function(u){return Kt(i,o,u)})}var j_=B(function(r,i){return ht(r)?hn(r,i):[]}),W_=B(function(r){return du(pr(r,ht))}),G_=B(function(r){var i=ce(r);return ht(i)&&(i=o),du(pr(r,ht),I(i,2))}),q_=B(function(r){var i=ce(r);return i=typeof i=="function"?i:o,du(pr(r,ht),o,i)}),$_=B(Iu);function K_(r,i){return Eh(r||[],i||[],cn)}function z_(r,i){return Eh(r||[],i||[],dn)}var X_=B(function(r){var i=r.length,s=i>1?r[i-1]:o;return s=typeof s=="function"?(r.pop(),s):o,ap(r,s)});function up(r){var i=h(r);return i.__chain__=!0,i}function J_(r,i){return i(r),r}function Ko(r,i){return i(r)}var Y_=Je(function(r){var i=r.length,s=i?r[0]:0,u=this.__wrapped__,c=function(p){return eu(p,r)};return i>1||this.__actions__.length||!(u instanceof j)||!Ye(s)?this.thru(c):(u=u.slice(s,+s+(i?1:0)),u.__actions__.push({func:Ko,args:[c],thisArg:o}),new ae(u,this.__chain__).thru(function(p){return i&&!p.length&&p.push(o),p}))});function Z_(){return up(this)}function Q_(){return new ae(this.value(),this.__chain__)}function tA(){this.__values__===o&&(this.__values__=vp(this.value()));var r=this.__index__>=this.__values__.length,i=r?o:this.__values__[this.__index__++];return{done:r,value:i}}function eA(){return this}function rA(r){for(var i,s=this;s instanceof Lo;){var u=ep(s);u.__index__=0,u.__values__=o,i?c.__wrapped__=u:i=u;var c=u;s=s.__wrapped__}return c.__wrapped__=r,i}function iA(){var r=this.__wrapped__;if(r instanceof j){var i=r;return this.__actions__.length&&(i=new j(this)),i=i.reverse(),i.__actions__.push({func:Ko,args:[Du],thisArg:o}),new ae(i,this.__chain__)}return this.thru(Du)}function nA(){return xh(this.__wrapped__,this.__actions__)}var sA=Bo(function(r,i,s){z.call(r,s)?++r[s]:ze(r,s,1)});function oA(r,i,s){var u=k(r)?Pc:Jb;return s&&kt(r,i,s)&&(i=o),u(r,I(i,3))}function aA(r,i){var s=k(r)?pr:ah;return s(r,I(i,3))}var uA=Fh(rp),lA=Fh(ip);function cA(r,i){return Mt(zo(r,i),1)}function hA(r,i){return Mt(zo(r,i),Dr)}function pA(r,i,s){return s=s===o?1:N(s),Mt(zo(r,i),s)}function lp(r,i){var s=k(r)?se:yr;return s(r,I(i,3))}function cp(r,i){var s=k(r)?Ry:oh;return s(r,I(i,3))}var fA=Bo(function(r,i,s){z.call(r,s)?r[s].push(i):ze(r,s,[i])});function dA(r,i,s,u){r=Ut(r)?r:Oi(r),s=s&&!u?N(s):0;var c=r.length;return s<0&&(s=bt(c+s,0)),Qo(r)?s<=c&&r.indexOf(i,s)>-1:!!c&&yi(r,i,s)>-1}var mA=B(function(r,i,s){var u=-1,c=typeof i=="function",p=Ut(r)?C(r.length):[];return yr(r,function(f){p[++u]=c?Kt(i,f,s):pn(f,i,s)}),p}),gA=Bo(function(r,i,s){ze(r,s,i)});function zo(r,i){var s=k(r)?nt:fh;return s(r,I(i,3))}function yA(r,i,s,u){return r==null?[]:(k(i)||(i=i==null?[]:[i]),s=u?o:s,k(s)||(s=s==null?[]:[s]),yh(r,i,s))}var bA=Bo(function(r,i,s){r[s?0:1].push(i)},function(){return[[],[]]});function CA(r,i,s){var u=k(r)?ja:Vc,c=arguments.length<3;return u(r,I(i,4),s,c,yr)}function _A(r,i,s){var u=k(r)?Ly:Vc,c=arguments.length<3;return u(r,I(i,4),s,c,oh)}function AA(r,i){var s=k(r)?pr:ah;return s(r,Yo(I(i,3)))}function vA(r){var i=k(r)?rh:dC;return i(r)}function MA(r,i,s){(s?kt(r,i,s):i===o)?i=1:i=N(i);var u=k(r)?qb:mC;return u(r,i)}function xA(r){var i=k(r)?$b:yC;return i(r)}function EA(r){if(r==null)return 0;if(Ut(r))return Qo(r)?Ci(r):r.length;var i=Dt(r);return i==de||i==me?r.size:au(r).length}function TA(r,i,s){var u=k(r)?Wa:bC;return s&&kt(r,i,s)&&(i=o),u(r,I(i,3))}var SA=B(function(r,i){if(r==null)return[];var s=i.length;return s>1&&kt(r,i[0],i[1])?i=[]:s>2&&kt(i[0],i[1],i[2])&&(i=[i[0]]),yh(r,Mt(i,1),[])}),Xo=ab||function(){return At.Date.now()};function OA(r,i){if(typeof i!="function")throw new oe(a);return r=N(r),function(){if(--r<1)return i.apply(this,arguments)}}function hp(r,i,s){return i=s?o:i,i=r&&i==null?r.length:i,Xe(r,Ge,o,o,o,o,i)}function pp(r,i){var s;if(typeof i!="function")throw new oe(a);return r=N(r),function(){return--r>0&&(s=i.apply(this,arguments)),r<=1&&(i=o),s}}var Ru=B(function(r,i,s){var u=ie;if(s.length){var c=dr(s,Ti(Ru));u|=De}return Xe(r,u,i,s,c)}),fp=B(function(r,i,s){var u=ie|Or;if(s.length){var c=dr(s,Ti(fp));u|=De}return Xe(i,u,r,s,c)});function dp(r,i,s){i=s?o:i;var u=Xe(r,Oe,o,o,o,o,o,i);return u.placeholder=dp.placeholder,u}function mp(r,i,s){i=s?o:i;var u=Xe(r,pi,o,o,o,o,o,i);return u.placeholder=mp.placeholder,u}function gp(r,i,s){var u,c,p,f,m,y,A=0,v=!1,M=!1,E=!0;if(typeof r!="function")throw new oe(a);i=he(i)||0,at(s)&&(v=!!s.leading,M="maxWait"in s,p=M?bt(he(s.maxWait)||0,i):p,E="trailing"in s?!!s.trailing:E);function O(pt){var Ce=u,tr=c;return u=c=o,A=pt,f=r.apply(tr,Ce),f}function R(pt){return A=pt,m=yn(V,i),v?O(pt):f}function H(pt){var Ce=pt-y,tr=pt-A,Fp=i-Ce;return M?Ot(Fp,p-tr):Fp}function L(pt){var Ce=pt-y,tr=pt-A;return y===o||Ce>=i||Ce<0||M&&tr>=p}function V(){var pt=Xo();if(L(pt))return W(pt);m=yn(V,H(pt))}function W(pt){return m=o,E&&u?O(pt):(u=c=o,f)}function Yt(){m!==o&&Th(m),A=0,u=y=c=m=o}function Ft(){return m===o?f:W(Xo())}function Zt(){var pt=Xo(),Ce=L(pt);if(u=arguments,c=this,y=pt,Ce){if(m===o)return R(y);if(M)return Th(m),m=yn(V,i),O(y)}return m===o&&(m=yn(V,i)),f}return Zt.cancel=Yt,Zt.flush=Ft,Zt}var DA=B(function(r,i){return sh(r,1,i)}),IA=B(function(r,i,s){return sh(r,he(i)||0,s)});function RA(r){return Xe(r,Z)}function Jo(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new oe(a);var s=function(){var u=arguments,c=i?i.apply(this,u):u[0],p=s.cache;if(p.has(c))return p.get(c);var f=r.apply(this,u);return s.cache=p.set(c,f)||p,f};return s.cache=new(Jo.Cache||Ke),s}Jo.Cache=Ke;function Yo(r){if(typeof r!="function")throw new oe(a);return function(){var i=arguments;switch(i.length){case 0:return!r.call(this);case 1:return!r.call(this,i[0]);case 2:return!r.call(this,i[0],i[1]);case 3:return!r.call(this,i[0],i[1],i[2])}return!r.apply(this,i)}}function LA(r){return pp(2,r)}var wA=CC(function(r,i){i=i.length==1&&k(i[0])?nt(i[0],zt(I())):nt(Mt(i,1),zt(I()));var s=i.length;return B(function(u){for(var c=-1,p=Ot(u.length,s);++c<p;)u[c]=i[c].call(this,u[c]);return Kt(r,this,u)})}),Lu=B(function(r,i){var s=dr(i,Ti(Lu));return Xe(r,De,o,i,s)}),yp=B(function(r,i){var s=dr(i,Ti(yp));return Xe(r,fi,o,i,s)}),kA=Je(function(r,i){return Xe(r,Xi,o,o,o,i)});function FA(r,i){if(typeof r!="function")throw new oe(a);return i=i===o?i:N(i),B(r,i)}function NA(r,i){if(typeof r!="function")throw new oe(a);return i=i==null?0:bt(N(i),0),B(function(s){var u=s[i],c=_r(s,0,i);return u&&fr(c,u),Kt(r,this,c)})}function PA(r,i,s){var u=!0,c=!0;if(typeof r!="function")throw new oe(a);return at(s)&&(u="leading"in s?!!s.leading:u,c="trailing"in s?!!s.trailing:c),gp(r,i,{leading:u,maxWait:i,trailing:c})}function HA(r){return hp(r,1)}function BA(r,i){return Lu(gu(i),r)}function UA(){if(!arguments.length)return[];var r=arguments[0];return k(r)?r:[r]}function VA(r){return ue(r,We)}function jA(r,i){return i=typeof i=="function"?i:o,ue(r,We,i)}function WA(r){return ue(r,D|We)}function GA(r,i){return i=typeof i=="function"?i:o,ue(r,D|We,i)}function qA(r,i){return i==null||nh(r,i,vt(i))}function be(r,i){return r===i||r!==r&&i!==i}var $A=Wo(nu),KA=Wo(function(r,i){return r>=i}),Hr=ch((function(){return arguments})())?ch:function(r){return lt(r)&&z.call(r,"callee")&&!Jc.call(r,"callee")},k=C.isArray,zA=Rc?zt(Rc):rC;function Ut(r){return r!=null&&Zo(r.length)&&!Ze(r)}function ht(r){return lt(r)&&Ut(r)}function XA(r){return r===!0||r===!1||lt(r)&&wt(r)==Ji}var Ar=lb||Wu,JA=Lc?zt(Lc):iC;function YA(r){return lt(r)&&r.nodeType===1&&!bn(r)}function ZA(r){if(r==null)return!0;if(Ut(r)&&(k(r)||typeof r=="string"||typeof r.splice=="function"||Ar(r)||Si(r)||Hr(r)))return!r.length;var i=Dt(r);if(i==de||i==me)return!r.size;if(gn(r))return!au(r).length;for(var s in r)if(z.call(r,s))return!1;return!0}function QA(r,i){return fn(r,i)}function tv(r,i,s){s=typeof s=="function"?s:o;var u=s?s(r,i):o;return u===o?fn(r,i,o,s):!!u}function wu(r){if(!lt(r))return!1;var i=wt(r);return i==lo||i==Mg||typeof r.message=="string"&&typeof r.name=="string"&&!bn(r)}function ev(r){return typeof r=="number"&&Zc(r)}function Ze(r){if(!at(r))return!1;var i=wt(r);return i==co||i==sc||i==vg||i==Eg}function bp(r){return typeof r=="number"&&r==N(r)}function Zo(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=hr}function at(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}function lt(r){return r!=null&&typeof r=="object"}var Cp=wc?zt(wc):sC;function rv(r,i){return r===i||ou(r,i,Mu(i))}function iv(r,i,s){return s=typeof s=="function"?s:o,ou(r,i,Mu(i),s)}function nv(r){return _p(r)&&r!=+r}function sv(r){if(jC(r))throw new w(n);return hh(r)}function ov(r){return r===null}function av(r){return r==null}function _p(r){return typeof r=="number"||lt(r)&&wt(r)==Zi}function bn(r){if(!lt(r)||wt(r)!=qe)return!1;var i=Eo(r);if(i===null)return!0;var s=z.call(i,"constructor")&&i.constructor;return typeof s=="function"&&s instanceof s&&Ao.call(s)==ib}var ku=kc?zt(kc):oC;function uv(r){return bp(r)&&r>=-hr&&r<=hr}var Ap=Fc?zt(Fc):aC;function Qo(r){return typeof r=="string"||!k(r)&<(r)&&wt(r)==tn}function Jt(r){return typeof r=="symbol"||lt(r)&&wt(r)==ho}var Si=Nc?zt(Nc):uC;function lv(r){return r===o}function cv(r){return lt(r)&&Dt(r)==en}function hv(r){return lt(r)&&wt(r)==Sg}var pv=Wo(uu),fv=Wo(function(r,i){return r<=i});function vp(r){if(!r)return[];if(Ut(r))return Qo(r)?ge(r):Bt(r);if(sn&&r[sn])return qy(r[sn]());var i=Dt(r),s=i==de?Xa:i==me?bo:Oi;return s(r)}function Qe(r){if(!r)return r===0?r:0;if(r=he(r),r===Dr||r===-Dr){var i=r<0?-1:1;return i*bg}return r===r?r:0}function N(r){var i=Qe(r),s=i%1;return i===i?s?i-s:i:0}function Mp(r){return r?kr(N(r),0,Ie):0}function he(r){if(typeof r=="number")return r;if(Jt(r))return ao;if(at(r)){var i=typeof r.valueOf=="function"?r.valueOf():r;r=at(i)?i+"":i}if(typeof r!="string")return r===0?r:+r;r=jc(r);var s=zg.test(r);return s||Jg.test(r)?Oy(r.slice(2),s?2:8):Kg.test(r)?ao:+r}function xp(r){return Le(r,Vt(r))}function dv(r){return r?kr(N(r),-hr,hr):r===0?r:0}function X(r){return r==null?"":Xt(r)}var mv=xi(function(r,i){if(gn(i)||Ut(i)){Le(i,vt(i),r);return}for(var s in i)z.call(i,s)&&cn(r,s,i[s])}),Ep=xi(function(r,i){Le(i,Vt(i),r)}),ta=xi(function(r,i,s,u){Le(i,Vt(i),r,u)}),gv=xi(function(r,i,s,u){Le(i,vt(i),r,u)}),yv=Je(eu);function bv(r,i){var s=Mi(r);return i==null?s:ih(s,i)}var Cv=B(function(r,i){r=Q(r);var s=-1,u=i.length,c=u>2?i[2]:o;for(c&&kt(i[0],i[1],c)&&(u=1);++s<u;)for(var p=i[s],f=Vt(p),m=-1,y=f.length;++m<y;){var A=f[m],v=r[A];(v===o||be(v,_i[A])&&!z.call(r,A))&&(r[A]=p[A])}return r}),_v=B(function(r){return r.push(o,jh),Kt(Tp,o,r)});function Av(r,i){return Hc(r,I(i,3),Re)}function vv(r,i){return Hc(r,I(i,3),iu)}function Mv(r,i){return r==null?r:ru(r,I(i,3),Vt)}function xv(r,i){return r==null?r:uh(r,I(i,3),Vt)}function Ev(r,i){return r&&Re(r,I(i,3))}function Tv(r,i){return r&&iu(r,I(i,3))}function Sv(r){return r==null?[]:Fo(r,vt(r))}function Ov(r){return r==null?[]:Fo(r,Vt(r))}function Fu(r,i,s){var u=r==null?o:Fr(r,i);return u===o?s:u}function Dv(r,i){return r!=null&&qh(r,i,Zb)}function Nu(r,i){return r!=null&&qh(r,i,Qb)}var Iv=Ph(function(r,i,s){i!=null&&typeof i.toString!="function"&&(i=vo.call(i)),r[i]=s},Hu(jt)),Rv=Ph(function(r,i,s){i!=null&&typeof i.toString!="function"&&(i=vo.call(i)),z.call(r,i)?r[i].push(s):r[i]=[s]},I),Lv=B(pn);function vt(r){return Ut(r)?eh(r):au(r)}function Vt(r){return Ut(r)?eh(r,!0):lC(r)}function wv(r,i){var s={};return i=I(i,3),Re(r,function(u,c,p){ze(s,i(u,c,p),u)}),s}function kv(r,i){var s={};return i=I(i,3),Re(r,function(u,c,p){ze(s,c,i(u,c,p))}),s}var Fv=xi(function(r,i,s){No(r,i,s)}),Tp=xi(function(r,i,s,u){No(r,i,s,u)}),Nv=Je(function(r,i){var s={};if(r==null)return s;var u=!1;i=nt(i,function(p){return p=Cr(p,r),u||(u=p.length>1),p}),Le(r,Au(r),s),u&&(s=ue(s,D|gt|We,IC));for(var c=i.length;c--;)fu(s,i[c]);return s});function Pv(r,i){return Sp(r,Yo(I(i)))}var Hv=Je(function(r,i){return r==null?{}:hC(r,i)});function Sp(r,i){if(r==null)return{};var s=nt(Au(r),function(u){return[u]});return i=I(i),bh(r,s,function(u,c){return i(u,c[0])})}function Bv(r,i,s){i=Cr(i,r);var u=-1,c=i.length;for(c||(c=1,r=o);++u<c;){var p=r==null?o:r[we(i[u])];p===o&&(u=c,p=s),r=Ze(p)?p.call(r):p}return r}function Uv(r,i,s){return r==null?r:dn(r,i,s)}function Vv(r,i,s,u){return u=typeof u=="function"?u:o,r==null?r:dn(r,i,s,u)}var Op=Uh(vt),Dp=Uh(Vt);function jv(r,i,s){var u=k(r),c=u||Ar(r)||Si(r);if(i=I(i,4),s==null){var p=r&&r.constructor;c?s=u?new p:[]:at(r)?s=Ze(p)?Mi(Eo(r)):{}:s={}}return(c?se:Re)(r,function(f,m,y){return i(s,f,m,y)}),s}function Wv(r,i){return r==null?!0:fu(r,i)}function Gv(r,i,s){return r==null?r:Mh(r,i,gu(s))}function qv(r,i,s,u){return u=typeof u=="function"?u:o,r==null?r:Mh(r,i,gu(s),u)}function Oi(r){return r==null?[]:za(r,vt(r))}function $v(r){return r==null?[]:za(r,Vt(r))}function Kv(r,i,s){return s===o&&(s=i,i=o),s!==o&&(s=he(s),s=s===s?s:0),i!==o&&(i=he(i),i=i===i?i:0),kr(he(r),i,s)}function zv(r,i,s){return i=Qe(i),s===o?(s=i,i=0):s=Qe(s),r=he(r),tC(r,i,s)}function Xv(r,i,s){if(s&&typeof s!="boolean"&&kt(r,i,s)&&(i=s=o),s===o&&(typeof i=="boolean"?(s=i,i=o):typeof r=="boolean"&&(s=r,r=o)),r===o&&i===o?(r=0,i=1):(r=Qe(r),i===o?(i=r,r=0):i=Qe(i)),r>i){var u=r;r=i,i=u}if(s||r%1||i%1){var c=Qc();return Ot(r+c*(i-r+Sy("1e-"+((c+"").length-1))),i)}return cu(r,i)}var Jv=Ei(function(r,i,s){return i=i.toLowerCase(),r+(s?Ip(i):i)});function Ip(r){return Pu(X(r).toLowerCase())}function Rp(r){return r=X(r),r&&r.replace(Zg,Uy).replace(yy,"")}function Yv(r,i,s){r=X(r),i=Xt(i);var u=r.length;s=s===o?u:kr(N(s),0,u);var c=s;return s-=i.length,s>=0&&r.slice(s,c)==i}function Zv(r){return r=X(r),r&&Lg.test(r)?r.replace(uc,Vy):r}function Qv(r){return r=X(r),r&&Hg.test(r)?r.replace(La,"\\$&"):r}var tM=Ei(function(r,i,s){return r+(s?"-":"")+i.toLowerCase()}),eM=Ei(function(r,i,s){return r+(s?" ":"")+i.toLowerCase()}),rM=kh("toLowerCase");function iM(r,i,s){r=X(r),i=N(i);var u=i?Ci(r):0;if(!i||u>=i)return r;var c=(i-u)/2;return jo(Do(c),s)+r+jo(Oo(c),s)}function nM(r,i,s){r=X(r),i=N(i);var u=i?Ci(r):0;return i&&u<i?r+jo(i-u,s):r}function sM(r,i,s){r=X(r),i=N(i);var u=i?Ci(r):0;return i&&u<i?jo(i-u,s)+r:r}function oM(r,i,s){return s||i==null?i=0:i&&(i=+i),fb(X(r).replace(wa,""),i||0)}function aM(r,i,s){return(s?kt(r,i,s):i===o)?i=1:i=N(i),hu(X(r),i)}function uM(){var r=arguments,i=X(r[0]);return r.length<3?i:i.replace(r[1],r[2])}var lM=Ei(function(r,i,s){return r+(s?"_":"")+i.toLowerCase()});function cM(r,i,s){return s&&typeof s!="number"&&kt(r,i,s)&&(i=s=o),s=s===o?Ie:s>>>0,s?(r=X(r),r&&(typeof i=="string"||i!=null&&!ku(i))&&(i=Xt(i),!i&&bi(r))?_r(ge(r),0,s):r.split(i,s)):[]}var hM=Ei(function(r,i,s){return r+(s?" ":"")+Pu(i)});function pM(r,i,s){return r=X(r),s=s==null?0:kr(N(s),0,r.length),i=Xt(i),r.slice(s,s+i.length)==i}function fM(r,i,s){var u=h.templateSettings;s&&kt(r,i,s)&&(i=o),r=X(r),i=ta({},i,u,Vh);var c=ta({},i.imports,u.imports,Vh),p=vt(c),f=za(c,p),m,y,A=0,v=i.interpolate||po,M="__p += '",E=Ja((i.escape||po).source+"|"+v.source+"|"+(v===lc?$g:po).source+"|"+(i.evaluate||po).source+"|$","g"),O="//# sourceURL="+(z.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++vy+"]")+`
|
|
4
|
-
`;r.replace(E,function(L,V,W,Yt,Ft,Zt){return W||(W=Yt),M+=r.slice(A,Zt).replace(
|
|
3
|
+
`)}function VC(r){return k(r)||Br(r)||!!(th&&r&&r[th])}function Ye(r,i){var s=typeof r;return i=i??pr,!!i&&(s=="number"||s!="symbol"&&Qg.test(r))&&r>-1&&r%1==0&&r<i}function kt(r,i,s){if(!at(s))return!1;var u=typeof i;return(u=="number"?Bt(s)&&Ye(i,s.length):u=="string"&&i in s)?be(s[i],r):!1}function Eu(r,i){if(k(r))return!1;var s=typeof r;return s=="number"||s=="symbol"||s=="boolean"||r==null||Jt(r)?!0:Hg.test(r)||!Pg.test(r)||i!=null&&r in Q(i)}function jC(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}function Tu(r){var i=Go(r),s=h[i];if(typeof s!="function"||!(i in j.prototype))return!1;if(r===s)return!0;var u=vu(s);return!!u&&r===u[0]}function WC(r){return!!Jc&&Jc in r}var GC=_o?Ze:Wu;function gn(r){var i=r&&r.constructor,s=typeof i=="function"&&i.prototype||Ai;return r===s}function Jh(r){return r===r&&!at(r)}function Yh(r,i){return function(s){return s==null?!1:s[r]===i&&(i!==o||r in Q(s))}}function qC(r){var i=Jo(r,function(u){return s.size===b&&s.clear(),u}),s=i.cache;return i}function $C(r,i){var s=r[1],u=i[1],c=s|u,p=c<(ie|Ir|Ge),f=u==Ge&&s==Oe||u==Ge&&s==Xi&&r[7].length<=i[8]||u==(Ge|Xi)&&i[7].length<=i[8]&&s==Oe;if(!(p||f))return r;u&ie&&(r[2]=i[2],c|=s&ie?0:oc);var m=i[3];if(m){var y=r[3];r[3]=y?wh(y,m,i[4]):m,r[4]=y?mr(r[3],x):i[4]}return m=i[5],m&&(y=r[5],r[5]=y?kh(y,m,i[6]):m,r[6]=y?mr(r[5],x):i[6]),m=i[7],m&&(r[7]=m),u&Ge&&(r[8]=r[8]==null?i[8]:Ot(r[8],i[8])),r[9]==null&&(r[9]=i[9]),r[0]=i[0],r[1]=c,r}function KC(r){var i=[];if(r!=null)for(var s in Q(r))i.push(s);return i}function zC(r){return vo.call(r)}function Zh(r,i,s){return i=bt(i===o?r.length-1:i,0),function(){for(var u=arguments,c=-1,p=bt(u.length-i,0),f=C(p);++c<p;)f[c]=u[i+c];c=-1;for(var m=C(i+1);++c<i;)m[c]=u[c];return m[i]=s(f),Kt(r,this,m)}}function Qh(r,i){return i.length<2?r:Pr(r,le(i,0,-1))}function XC(r,i){for(var s=r.length,u=Ot(i.length,s),c=Ut(r);u--;){var p=i[u];r[u]=Ye(p,s)?c[p]:o}return r}function Su(r,i){if(!(i==="constructor"&&typeof r[i]=="function")&&i!="__proto__")return r[i]}var tp=rp(Mh),yn=cb||function(r,i){return vt.setTimeout(r,i)},Ou=rp(bC);function ep(r,i,s){var u=i+"";return Ou(r,BC(u,JC(PC(u),s)))}function rp(r){var i=0,s=0;return function(){var u=db(),c=yg-(u-s);if(s=u,c>0){if(++i>=gg)return arguments[0]}else i=0;return r.apply(o,arguments)}}function $o(r,i){var s=-1,u=r.length,c=u-1;for(i=i===o?u:i;++s<i;){var p=cu(s,c),f=r[p];r[p]=r[s],r[s]=f}return r.length=i,r}var ip=qC(function(r){var i=[];return r.charCodeAt(0)===46&&i.push(""),r.replace(Ug,function(s,u,c,p){i.push(c?p.replace(Kg,"$1"):u||s)}),i});function we(r){if(typeof r=="string"||Jt(r))return r;var i=r+"";return i=="0"&&1/r==-Rr?"-0":i}function Ur(r){if(r!=null){try{return Ao.call(r)}catch{}try{return r+""}catch{}}return""}function JC(r,i){return se(Mg,function(s){var u="_."+s[0];i&s[1]&&!go(r,u)&&r.push(u)}),r.sort()}function np(r){if(r instanceof j)return r.clone();var i=new ae(r.__wrapped__,r.__chain__);return i.__actions__=Ut(r.__actions__),i.__index__=r.__index__,i.__values__=r.__values__,i}function YC(r,i,s){(s?kt(r,i,s):i===o)?i=1:i=bt(N(i),0);var u=r==null?0:r.length;if(!u||i<1)return[];for(var c=0,p=0,f=C(Oo(u/i));c<u;)f[p++]=le(r,c,c+=i);return f}function ZC(r){for(var i=-1,s=r==null?0:r.length,u=0,c=[];++i<s;){var p=r[i];p&&(c[u++]=p)}return c}function QC(){var r=arguments.length;if(!r)return[];for(var i=C(r-1),s=arguments[0],u=r;u--;)i[u-1]=arguments[u];return dr(k(s)?Ut(s):[s],xt(i,1))}var t_=U(function(r,i){return ht(r)?hn(r,xt(i,1,ht,!0)):[]}),e_=U(function(r,i){var s=ce(i);return ht(s)&&(s=o),ht(r)?hn(r,xt(i,1,ht,!0),I(s,2)):[]}),r_=U(function(r,i){var s=ce(i);return ht(s)&&(s=o),ht(r)?hn(r,xt(i,1,ht,!0),o,s):[]});function i_(r,i,s){var u=r==null?0:r.length;return u?(i=s||i===o?1:N(i),le(r,i<0?0:i,u)):[]}function n_(r,i,s){var u=r==null?0:r.length;return u?(i=s||i===o?1:N(i),i=u-i,le(r,0,i<0?0:i)):[]}function s_(r,i){return r&&r.length?Ho(r,I(i,3),!0,!0):[]}function o_(r,i){return r&&r.length?Ho(r,I(i,3),!0):[]}function a_(r,i,s,u){var c=r==null?0:r.length;return c?(s&&typeof s!="number"&&kt(r,i,s)&&(s=0,u=c),Qb(r,i,s,u)):[]}function sp(r,i,s){var u=r==null?0:r.length;if(!u)return-1;var c=s==null?0:N(s);return c<0&&(c=bt(u+c,0)),yo(r,I(i,3),c)}function op(r,i,s){var u=r==null?0:r.length;if(!u)return-1;var c=u-1;return s!==o&&(c=N(s),c=s<0?bt(u+c,0):Ot(c,u-1)),yo(r,I(i,3),c,!0)}function ap(r){var i=r==null?0:r.length;return i?xt(r,1):[]}function u_(r){var i=r==null?0:r.length;return i?xt(r,Rr):[]}function l_(r,i){var s=r==null?0:r.length;return s?(i=i===o?1:N(i),xt(r,i)):[]}function c_(r){for(var i=-1,s=r==null?0:r.length,u={};++i<s;){var c=r[i];u[c[0]]=c[1]}return u}function up(r){return r&&r.length?r[0]:o}function h_(r,i,s){var u=r==null?0:r.length;if(!u)return-1;var c=s==null?0:N(s);return c<0&&(c=bt(u+c,0)),bi(r,i,c)}function p_(r){var i=r==null?0:r.length;return i?le(r,0,-1):[]}var f_=U(function(r){var i=st(r,mu);return i.length&&i[0]===r[0]?su(i):[]}),d_=U(function(r){var i=ce(r),s=st(r,mu);return i===ce(s)?i=o:s.pop(),s.length&&s[0]===r[0]?su(s,I(i,2)):[]}),m_=U(function(r){var i=ce(r),s=st(r,mu);return i=typeof i=="function"?i:o,i&&s.pop(),s.length&&s[0]===r[0]?su(s,o,i):[]});function g_(r,i){return r==null?"":pb.call(r,i)}function ce(r){var i=r==null?0:r.length;return i?r[i-1]:o}function y_(r,i,s){var u=r==null?0:r.length;if(!u)return-1;var c=u;return s!==o&&(c=N(s),c=c<0?bt(u+c,0):Ot(c,u-1)),i===i?Jy(r,i,c):yo(r,jc,c,!0)}function b_(r,i){return r&&r.length?Ch(r,N(i)):o}var C_=U(lp);function lp(r,i){return r&&r.length&&i&&i.length?lu(r,i):r}function __(r,i,s){return r&&r.length&&i&&i.length?lu(r,i,I(s,2)):r}function A_(r,i,s){return r&&r.length&&i&&i.length?lu(r,i,o,s):r}var v_=Je(function(r,i){var s=r==null?0:r.length,u=eu(r,i);return vh(r,st(i,function(c){return Ye(c,s)?+c:c}).sort(Lh)),u});function M_(r,i){var s=[];if(!(r&&r.length))return s;var u=-1,c=[],p=r.length;for(i=I(i,3);++u<p;){var f=r[u];i(f,u,r)&&(s.push(f),c.push(u))}return vh(r,c),s}function Du(r){return r==null?r:gb.call(r)}function x_(r,i,s){var u=r==null?0:r.length;return u?(s&&typeof s!="number"&&kt(r,i,s)?(i=0,s=u):(i=i==null?0:N(i),s=s===o?u:N(s)),le(r,i,s)):[]}function E_(r,i){return Po(r,i)}function T_(r,i,s){return pu(r,i,I(s,2))}function S_(r,i){var s=r==null?0:r.length;if(s){var u=Po(r,i);if(u<s&&be(r[u],i))return u}return-1}function O_(r,i){return Po(r,i,!0)}function D_(r,i,s){return pu(r,i,I(s,2),!0)}function I_(r,i){var s=r==null?0:r.length;if(s){var u=Po(r,i,!0)-1;if(be(r[u],i))return u}return-1}function R_(r){return r&&r.length?xh(r):[]}function L_(r,i){return r&&r.length?xh(r,I(i,2)):[]}function w_(r){var i=r==null?0:r.length;return i?le(r,1,i):[]}function k_(r,i,s){return r&&r.length?(i=s||i===o?1:N(i),le(r,0,i<0?0:i)):[]}function F_(r,i,s){var u=r==null?0:r.length;return u?(i=s||i===o?1:N(i),i=u-i,le(r,i<0?0:i,u)):[]}function N_(r,i){return r&&r.length?Ho(r,I(i,3),!1,!0):[]}function P_(r,i){return r&&r.length?Ho(r,I(i,3)):[]}var H_=U(function(r){return Cr(xt(r,1,ht,!0))}),U_=U(function(r){var i=ce(r);return ht(i)&&(i=o),Cr(xt(r,1,ht,!0),I(i,2))}),B_=U(function(r){var i=ce(r);return i=typeof i=="function"?i:o,Cr(xt(r,1,ht,!0),o,i)});function V_(r){return r&&r.length?Cr(r):[]}function j_(r,i){return r&&r.length?Cr(r,I(i,2)):[]}function W_(r,i){return i=typeof i=="function"?i:o,r&&r.length?Cr(r,o,i):[]}function Iu(r){if(!(r&&r.length))return[];var i=0;return r=fr(r,function(s){if(ht(s))return i=bt(s.length,i),!0}),Ka(i,function(s){return st(r,Ga(s))})}function cp(r,i){if(!(r&&r.length))return[];var s=Iu(r);return i==null?s:st(s,function(u){return Kt(i,o,u)})}var G_=U(function(r,i){return ht(r)?hn(r,i):[]}),q_=U(function(r){return du(fr(r,ht))}),$_=U(function(r){var i=ce(r);return ht(i)&&(i=o),du(fr(r,ht),I(i,2))}),K_=U(function(r){var i=ce(r);return i=typeof i=="function"?i:o,du(fr(r,ht),o,i)}),z_=U(Iu);function X_(r,i){return Oh(r||[],i||[],cn)}function J_(r,i){return Oh(r||[],i||[],dn)}var Y_=U(function(r){var i=r.length,s=i>1?r[i-1]:o;return s=typeof s=="function"?(r.pop(),s):o,cp(r,s)});function hp(r){var i=h(r);return i.__chain__=!0,i}function Z_(r,i){return i(r),r}function Ko(r,i){return i(r)}var Q_=Je(function(r){var i=r.length,s=i?r[0]:0,u=this.__wrapped__,c=function(p){return eu(p,r)};return i>1||this.__actions__.length||!(u instanceof j)||!Ye(s)?this.thru(c):(u=u.slice(s,+s+(i?1:0)),u.__actions__.push({func:Ko,args:[c],thisArg:o}),new ae(u,this.__chain__).thru(function(p){return i&&!p.length&&p.push(o),p}))});function tA(){return hp(this)}function eA(){return new ae(this.value(),this.__chain__)}function rA(){this.__values__===o&&(this.__values__=Ep(this.value()));var r=this.__index__>=this.__values__.length,i=r?o:this.__values__[this.__index__++];return{done:r,value:i}}function iA(){return this}function nA(r){for(var i,s=this;s instanceof Lo;){var u=np(s);u.__index__=0,u.__values__=o,i?c.__wrapped__=u:i=u;var c=u;s=s.__wrapped__}return c.__wrapped__=r,i}function sA(){var r=this.__wrapped__;if(r instanceof j){var i=r;return this.__actions__.length&&(i=new j(this)),i=i.reverse(),i.__actions__.push({func:Ko,args:[Du],thisArg:o}),new ae(i,this.__chain__)}return this.thru(Du)}function oA(){return Sh(this.__wrapped__,this.__actions__)}var aA=Uo(function(r,i,s){z.call(r,s)?++r[s]:ze(r,s,1)});function uA(r,i,s){var u=k(r)?Bc:Zb;return s&&kt(r,i,s)&&(i=o),u(r,I(i,3))}function lA(r,i){var s=k(r)?fr:ch;return s(r,I(i,3))}var cA=Hh(sp),hA=Hh(op);function pA(r,i){return xt(zo(r,i),1)}function fA(r,i){return xt(zo(r,i),Rr)}function dA(r,i,s){return s=s===o?1:N(s),xt(zo(r,i),s)}function pp(r,i){var s=k(r)?se:br;return s(r,I(i,3))}function fp(r,i){var s=k(r)?wy:lh;return s(r,I(i,3))}var mA=Uo(function(r,i,s){z.call(r,s)?r[s].push(i):ze(r,s,[i])});function gA(r,i,s,u){r=Bt(r)?r:Di(r),s=s&&!u?N(s):0;var c=r.length;return s<0&&(s=bt(c+s,0)),Qo(r)?s<=c&&r.indexOf(i,s)>-1:!!c&&bi(r,i,s)>-1}var yA=U(function(r,i,s){var u=-1,c=typeof i=="function",p=Bt(r)?C(r.length):[];return br(r,function(f){p[++u]=c?Kt(i,f,s):pn(f,i,s)}),p}),bA=Uo(function(r,i,s){ze(r,s,i)});function zo(r,i){var s=k(r)?st:gh;return s(r,I(i,3))}function CA(r,i,s,u){return r==null?[]:(k(i)||(i=i==null?[]:[i]),s=u?o:s,k(s)||(s=s==null?[]:[s]),_h(r,i,s))}var _A=Uo(function(r,i,s){r[s?0:1].push(i)},function(){return[[],[]]});function AA(r,i,s){var u=k(r)?ja:Gc,c=arguments.length<3;return u(r,I(i,4),s,c,br)}function vA(r,i,s){var u=k(r)?ky:Gc,c=arguments.length<3;return u(r,I(i,4),s,c,lh)}function MA(r,i){var s=k(r)?fr:ch;return s(r,Yo(I(i,3)))}function xA(r){var i=k(r)?sh:gC;return i(r)}function EA(r,i,s){(s?kt(r,i,s):i===o)?i=1:i=N(i);var u=k(r)?Kb:yC;return u(r,i)}function TA(r){var i=k(r)?zb:CC;return i(r)}function SA(r){if(r==null)return 0;if(Bt(r))return Qo(r)?_i(r):r.length;var i=Dt(r);return i==de||i==me?r.size:au(r).length}function OA(r,i,s){var u=k(r)?Wa:_C;return s&&kt(r,i,s)&&(i=o),u(r,I(i,3))}var DA=U(function(r,i){if(r==null)return[];var s=i.length;return s>1&&kt(r,i[0],i[1])?i=[]:s>2&&kt(i[0],i[1],i[2])&&(i=[i[0]]),_h(r,xt(i,1),[])}),Xo=lb||function(){return vt.Date.now()};function IA(r,i){if(typeof i!="function")throw new oe(a);return r=N(r),function(){if(--r<1)return i.apply(this,arguments)}}function dp(r,i,s){return i=s?o:i,i=r&&i==null?r.length:i,Xe(r,Ge,o,o,o,o,i)}function mp(r,i){var s;if(typeof i!="function")throw new oe(a);return r=N(r),function(){return--r>0&&(s=i.apply(this,arguments)),r<=1&&(i=o),s}}var Ru=U(function(r,i,s){var u=ie;if(s.length){var c=mr(s,Si(Ru));u|=De}return Xe(r,u,i,s,c)}),gp=U(function(r,i,s){var u=ie|Ir;if(s.length){var c=mr(s,Si(gp));u|=De}return Xe(i,u,r,s,c)});function yp(r,i,s){i=s?o:i;var u=Xe(r,Oe,o,o,o,o,o,i);return u.placeholder=yp.placeholder,u}function bp(r,i,s){i=s?o:i;var u=Xe(r,fi,o,o,o,o,o,i);return u.placeholder=bp.placeholder,u}function Cp(r,i,s){var u,c,p,f,m,y,A=0,v=!1,M=!1,E=!0;if(typeof r!="function")throw new oe(a);i=he(i)||0,at(s)&&(v=!!s.leading,M="maxWait"in s,p=M?bt(he(s.maxWait)||0,i):p,E="trailing"in s?!!s.trailing:E);function O(pt){var Ce=u,tr=c;return u=c=o,A=pt,f=r.apply(tr,Ce),f}function R(pt){return A=pt,m=yn(V,i),v?O(pt):f}function H(pt){var Ce=pt-y,tr=pt-A,Hp=i-Ce;return M?Ot(Hp,p-tr):Hp}function L(pt){var Ce=pt-y,tr=pt-A;return y===o||Ce>=i||Ce<0||M&&tr>=p}function V(){var pt=Xo();if(L(pt))return W(pt);m=yn(V,H(pt))}function W(pt){return m=o,E&&u?O(pt):(u=c=o,f)}function Yt(){m!==o&&Dh(m),A=0,u=y=c=m=o}function Ft(){return m===o?f:W(Xo())}function Zt(){var pt=Xo(),Ce=L(pt);if(u=arguments,c=this,y=pt,Ce){if(m===o)return R(y);if(M)return Dh(m),m=yn(V,i),O(y)}return m===o&&(m=yn(V,i)),f}return Zt.cancel=Yt,Zt.flush=Ft,Zt}var RA=U(function(r,i){return uh(r,1,i)}),LA=U(function(r,i,s){return uh(r,he(i)||0,s)});function wA(r){return Xe(r,Z)}function Jo(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new oe(a);var s=function(){var u=arguments,c=i?i.apply(this,u):u[0],p=s.cache;if(p.has(c))return p.get(c);var f=r.apply(this,u);return s.cache=p.set(c,f)||p,f};return s.cache=new(Jo.Cache||Ke),s}Jo.Cache=Ke;function Yo(r){if(typeof r!="function")throw new oe(a);return function(){var i=arguments;switch(i.length){case 0:return!r.call(this);case 1:return!r.call(this,i[0]);case 2:return!r.call(this,i[0],i[1]);case 3:return!r.call(this,i[0],i[1],i[2])}return!r.apply(this,i)}}function kA(r){return mp(2,r)}var FA=AC(function(r,i){i=i.length==1&&k(i[0])?st(i[0],zt(I())):st(xt(i,1),zt(I()));var s=i.length;return U(function(u){for(var c=-1,p=Ot(u.length,s);++c<p;)u[c]=i[c].call(this,u[c]);return Kt(r,this,u)})}),Lu=U(function(r,i){var s=mr(i,Si(Lu));return Xe(r,De,o,i,s)}),_p=U(function(r,i){var s=mr(i,Si(_p));return Xe(r,di,o,i,s)}),NA=Je(function(r,i){return Xe(r,Xi,o,o,o,i)});function PA(r,i){if(typeof r!="function")throw new oe(a);return i=i===o?i:N(i),U(r,i)}function HA(r,i){if(typeof r!="function")throw new oe(a);return i=i==null?0:bt(N(i),0),U(function(s){var u=s[i],c=Ar(s,0,i);return u&&dr(c,u),Kt(r,this,c)})}function UA(r,i,s){var u=!0,c=!0;if(typeof r!="function")throw new oe(a);return at(s)&&(u="leading"in s?!!s.leading:u,c="trailing"in s?!!s.trailing:c),Cp(r,i,{leading:u,maxWait:i,trailing:c})}function BA(r){return dp(r,1)}function VA(r,i){return Lu(gu(i),r)}function jA(){if(!arguments.length)return[];var r=arguments[0];return k(r)?r:[r]}function WA(r){return ue(r,We)}function GA(r,i){return i=typeof i=="function"?i:o,ue(r,We,i)}function qA(r){return ue(r,D|We)}function $A(r,i){return i=typeof i=="function"?i:o,ue(r,D|We,i)}function KA(r,i){return i==null||ah(r,i,Mt(i))}function be(r,i){return r===i||r!==r&&i!==i}var zA=Wo(nu),XA=Wo(function(r,i){return r>=i}),Br=fh((function(){return arguments})())?fh:function(r){return lt(r)&&z.call(r,"callee")&&!Qc.call(r,"callee")},k=C.isArray,JA=kc?zt(kc):nC;function Bt(r){return r!=null&&Zo(r.length)&&!Ze(r)}function ht(r){return lt(r)&&Bt(r)}function YA(r){return r===!0||r===!1||lt(r)&&wt(r)==Ji}var vr=hb||Wu,ZA=Fc?zt(Fc):sC;function QA(r){return lt(r)&&r.nodeType===1&&!bn(r)}function tv(r){if(r==null)return!0;if(Bt(r)&&(k(r)||typeof r=="string"||typeof r.splice=="function"||vr(r)||Oi(r)||Br(r)))return!r.length;var i=Dt(r);if(i==de||i==me)return!r.size;if(gn(r))return!au(r).length;for(var s in r)if(z.call(r,s))return!1;return!0}function ev(r,i){return fn(r,i)}function rv(r,i,s){s=typeof s=="function"?s:o;var u=s?s(r,i):o;return u===o?fn(r,i,o,s):!!u}function wu(r){if(!lt(r))return!1;var i=wt(r);return i==lo||i==Eg||typeof r.message=="string"&&typeof r.name=="string"&&!bn(r)}function iv(r){return typeof r=="number"&&eh(r)}function Ze(r){if(!at(r))return!1;var i=wt(r);return i==co||i==uc||i==xg||i==Sg}function Ap(r){return typeof r=="number"&&r==N(r)}function Zo(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=pr}function at(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}function lt(r){return r!=null&&typeof r=="object"}var vp=Nc?zt(Nc):aC;function nv(r,i){return r===i||ou(r,i,Mu(i))}function sv(r,i,s){return s=typeof s=="function"?s:o,ou(r,i,Mu(i),s)}function ov(r){return Mp(r)&&r!=+r}function av(r){if(GC(r))throw new w(n);return dh(r)}function uv(r){return r===null}function lv(r){return r==null}function Mp(r){return typeof r=="number"||lt(r)&&wt(r)==Zi}function bn(r){if(!lt(r)||wt(r)!=qe)return!1;var i=Eo(r);if(i===null)return!0;var s=z.call(i,"constructor")&&i.constructor;return typeof s=="function"&&s instanceof s&&Ao.call(s)==sb}var ku=Pc?zt(Pc):uC;function cv(r){return Ap(r)&&r>=-pr&&r<=pr}var xp=Hc?zt(Hc):lC;function Qo(r){return typeof r=="string"||!k(r)&<(r)&&wt(r)==tn}function Jt(r){return typeof r=="symbol"||lt(r)&&wt(r)==ho}var Oi=Uc?zt(Uc):cC;function hv(r){return r===o}function pv(r){return lt(r)&&Dt(r)==en}function fv(r){return lt(r)&&wt(r)==Dg}var dv=Wo(uu),mv=Wo(function(r,i){return r<=i});function Ep(r){if(!r)return[];if(Bt(r))return Qo(r)?ge(r):Ut(r);if(sn&&r[sn])return Ky(r[sn]());var i=Dt(r),s=i==de?Xa:i==me?bo:Di;return s(r)}function Qe(r){if(!r)return r===0?r:0;if(r=he(r),r===Rr||r===-Rr){var i=r<0?-1:1;return i*_g}return r===r?r:0}function N(r){var i=Qe(r),s=i%1;return i===i?s?i-s:i:0}function Tp(r){return r?Nr(N(r),0,Ie):0}function he(r){if(typeof r=="number")return r;if(Jt(r))return ao;if(at(r)){var i=typeof r.valueOf=="function"?r.valueOf():r;r=at(i)?i+"":i}if(typeof r!="string")return r===0?r:+r;r=qc(r);var s=Jg.test(r);return s||Zg.test(r)?Iy(r.slice(2),s?2:8):Xg.test(r)?ao:+r}function Sp(r){return Le(r,Vt(r))}function gv(r){return r?Nr(N(r),-pr,pr):r===0?r:0}function X(r){return r==null?"":Xt(r)}var yv=Ei(function(r,i){if(gn(i)||Bt(i)){Le(i,Mt(i),r);return}for(var s in i)z.call(i,s)&&cn(r,s,i[s])}),Op=Ei(function(r,i){Le(i,Vt(i),r)}),ta=Ei(function(r,i,s,u){Le(i,Vt(i),r,u)}),bv=Ei(function(r,i,s,u){Le(i,Mt(i),r,u)}),Cv=Je(eu);function _v(r,i){var s=xi(r);return i==null?s:oh(s,i)}var Av=U(function(r,i){r=Q(r);var s=-1,u=i.length,c=u>2?i[2]:o;for(c&&kt(i[0],i[1],c)&&(u=1);++s<u;)for(var p=i[s],f=Vt(p),m=-1,y=f.length;++m<y;){var A=f[m],v=r[A];(v===o||be(v,Ai[A])&&!z.call(r,A))&&(r[A]=p[A])}return r}),vv=U(function(r){return r.push(o,qh),Kt(Dp,o,r)});function Mv(r,i){return Vc(r,I(i,3),Re)}function xv(r,i){return Vc(r,I(i,3),iu)}function Ev(r,i){return r==null?r:ru(r,I(i,3),Vt)}function Tv(r,i){return r==null?r:hh(r,I(i,3),Vt)}function Sv(r,i){return r&&Re(r,I(i,3))}function Ov(r,i){return r&&iu(r,I(i,3))}function Dv(r){return r==null?[]:Fo(r,Mt(r))}function Iv(r){return r==null?[]:Fo(r,Vt(r))}function Fu(r,i,s){var u=r==null?o:Pr(r,i);return u===o?s:u}function Rv(r,i){return r!=null&&zh(r,i,tC)}function Nu(r,i){return r!=null&&zh(r,i,eC)}var Lv=Bh(function(r,i,s){i!=null&&typeof i.toString!="function"&&(i=vo.call(i)),r[i]=s},Hu(jt)),wv=Bh(function(r,i,s){i!=null&&typeof i.toString!="function"&&(i=vo.call(i)),z.call(r,i)?r[i].push(s):r[i]=[s]},I),kv=U(pn);function Mt(r){return Bt(r)?nh(r):au(r)}function Vt(r){return Bt(r)?nh(r,!0):hC(r)}function Fv(r,i){var s={};return i=I(i,3),Re(r,function(u,c,p){ze(s,i(u,c,p),u)}),s}function Nv(r,i){var s={};return i=I(i,3),Re(r,function(u,c,p){ze(s,c,i(u,c,p))}),s}var Pv=Ei(function(r,i,s){No(r,i,s)}),Dp=Ei(function(r,i,s,u){No(r,i,s,u)}),Hv=Je(function(r,i){var s={};if(r==null)return s;var u=!1;i=st(i,function(p){return p=_r(p,r),u||(u=p.length>1),p}),Le(r,Au(r),s),u&&(s=ue(s,D|gt|We,LC));for(var c=i.length;c--;)fu(s,i[c]);return s});function Uv(r,i){return Ip(r,Yo(I(i)))}var Bv=Je(function(r,i){return r==null?{}:fC(r,i)});function Ip(r,i){if(r==null)return{};var s=st(Au(r),function(u){return[u]});return i=I(i),Ah(r,s,function(u,c){return i(u,c[0])})}function Vv(r,i,s){i=_r(i,r);var u=-1,c=i.length;for(c||(c=1,r=o);++u<c;){var p=r==null?o:r[we(i[u])];p===o&&(u=c,p=s),r=Ze(p)?p.call(r):p}return r}function jv(r,i,s){return r==null?r:dn(r,i,s)}function Wv(r,i,s,u){return u=typeof u=="function"?u:o,r==null?r:dn(r,i,s,u)}var Rp=Wh(Mt),Lp=Wh(Vt);function Gv(r,i,s){var u=k(r),c=u||vr(r)||Oi(r);if(i=I(i,4),s==null){var p=r&&r.constructor;c?s=u?new p:[]:at(r)?s=Ze(p)?xi(Eo(r)):{}:s={}}return(c?se:Re)(r,function(f,m,y){return i(s,f,m,y)}),s}function qv(r,i){return r==null?!0:fu(r,i)}function $v(r,i,s){return r==null?r:Th(r,i,gu(s))}function Kv(r,i,s,u){return u=typeof u=="function"?u:o,r==null?r:Th(r,i,gu(s),u)}function Di(r){return r==null?[]:za(r,Mt(r))}function zv(r){return r==null?[]:za(r,Vt(r))}function Xv(r,i,s){return s===o&&(s=i,i=o),s!==o&&(s=he(s),s=s===s?s:0),i!==o&&(i=he(i),i=i===i?i:0),Nr(he(r),i,s)}function Jv(r,i,s){return i=Qe(i),s===o?(s=i,i=0):s=Qe(s),r=he(r),rC(r,i,s)}function Yv(r,i,s){if(s&&typeof s!="boolean"&&kt(r,i,s)&&(i=s=o),s===o&&(typeof i=="boolean"?(s=i,i=o):typeof r=="boolean"&&(s=r,r=o)),r===o&&i===o?(r=0,i=1):(r=Qe(r),i===o?(i=r,r=0):i=Qe(i)),r>i){var u=r;r=i,i=u}if(s||r%1||i%1){var c=rh();return Ot(r+c*(i-r+Dy("1e-"+((c+"").length-1))),i)}return cu(r,i)}var Zv=Ti(function(r,i,s){return i=i.toLowerCase(),r+(s?wp(i):i)});function wp(r){return Pu(X(r).toLowerCase())}function kp(r){return r=X(r),r&&r.replace(ty,jy).replace(Cy,"")}function Qv(r,i,s){r=X(r),i=Xt(i);var u=r.length;s=s===o?u:Nr(N(s),0,u);var c=s;return s-=i.length,s>=0&&r.slice(s,c)==i}function tM(r){return r=X(r),r&&kg.test(r)?r.replace(hc,Wy):r}function eM(r){return r=X(r),r&&Bg.test(r)?r.replace(La,"\\$&"):r}var rM=Ti(function(r,i,s){return r+(s?"-":"")+i.toLowerCase()}),iM=Ti(function(r,i,s){return r+(s?" ":"")+i.toLowerCase()}),nM=Ph("toLowerCase");function sM(r,i,s){r=X(r),i=N(i);var u=i?_i(r):0;if(!i||u>=i)return r;var c=(i-u)/2;return jo(Do(c),s)+r+jo(Oo(c),s)}function oM(r,i,s){r=X(r),i=N(i);var u=i?_i(r):0;return i&&u<i?r+jo(i-u,s):r}function aM(r,i,s){r=X(r),i=N(i);var u=i?_i(r):0;return i&&u<i?jo(i-u,s)+r:r}function uM(r,i,s){return s||i==null?i=0:i&&(i=+i),mb(X(r).replace(wa,""),i||0)}function lM(r,i,s){return(s?kt(r,i,s):i===o)?i=1:i=N(i),hu(X(r),i)}function cM(){var r=arguments,i=X(r[0]);return r.length<3?i:i.replace(r[1],r[2])}var hM=Ti(function(r,i,s){return r+(s?"_":"")+i.toLowerCase()});function pM(r,i,s){return s&&typeof s!="number"&&kt(r,i,s)&&(i=s=o),s=s===o?Ie:s>>>0,s?(r=X(r),r&&(typeof i=="string"||i!=null&&!ku(i))&&(i=Xt(i),!i&&Ci(r))?Ar(ge(r),0,s):r.split(i,s)):[]}var fM=Ti(function(r,i,s){return r+(s?" ":"")+Pu(i)});function dM(r,i,s){return r=X(r),s=s==null?0:Nr(N(s),0,r.length),i=Xt(i),r.slice(s,s+i.length)==i}function mM(r,i,s){var u=h.templateSettings;s&&kt(r,i,s)&&(i=o),r=X(r),i=ta({},i,u,Gh);var c=ta({},i.imports,u.imports,Gh),p=Mt(c),f=za(c,p),m,y,A=0,v=i.interpolate||po,M="__p += '",E=Ja((i.escape||po).source+"|"+v.source+"|"+(v===pc?zg:po).source+"|"+(i.evaluate||po).source+"|$","g"),O="//# sourceURL="+(z.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xy+"]")+`
|
|
4
|
+
`;r.replace(E,function(L,V,W,Yt,Ft,Zt){return W||(W=Yt),M+=r.slice(A,Zt).replace(ey,Gy),V&&(m=!0,M+=`' +
|
|
5
5
|
__e(`+V+`) +
|
|
6
6
|
'`),Ft&&(y=!0,M+=`';
|
|
7
7
|
`+Ft+`;
|
|
@@ -11,14 +11,14 @@ __p += '`),W&&(M+=`' +
|
|
|
11
11
|
`;var R=z.call(i,"variable")&&i.variable;if(!R)M=`with (obj) {
|
|
12
12
|
`+M+`
|
|
13
13
|
}
|
|
14
|
-
`;else if(
|
|
14
|
+
`;else if($g.test(R))throw new w(l);M=(y?M.replace(Ig,""):M).replace(Rg,"$1").replace(Lg,"$1;"),M="function("+(R||"obj")+`) {
|
|
15
15
|
`+(R?"":`obj || (obj = {});
|
|
16
16
|
`)+"var __t, __p = ''"+(m?", __e = _.escape":"")+(y?`, __j = Array.prototype.join;
|
|
17
17
|
function print() { __p += __j.call(arguments, '') }
|
|
18
18
|
`:`;
|
|
19
19
|
`)+M+`return __p
|
|
20
|
-
}`;var H=wp(function(){return $(p,O+"return "+M).apply(o,f)});if(H.source=M,wu(H))throw H;return H}function dM(r){return X(r).toLowerCase()}function mM(r){return X(r).toUpperCase()}function gM(r,i,s){if(r=X(r),r&&(s||i===o))return jc(r);if(!r||!(i=Xt(i)))return r;var u=ge(r),c=ge(i),p=Wc(u,c),f=Gc(u,c)+1;return _r(u,p,f).join("")}function yM(r,i,s){if(r=X(r),r&&(s||i===o))return r.slice(0,$c(r)+1);if(!r||!(i=Xt(i)))return r;var u=ge(r),c=Gc(u,ge(i))+1;return _r(u,0,c).join("")}function bM(r,i,s){if(r=X(r),r&&(s||i===o))return r.replace(wa,"");if(!r||!(i=Xt(i)))return r;var u=ge(r),c=Wc(u,ge(i));return _r(u,c).join("")}function CM(r,i){var s=pg,u=fg;if(at(i)){var c="separator"in i?i.separator:c;s="length"in i?N(i.length):s,u="omission"in i?Xt(i.omission):u}r=X(r);var p=r.length;if(bi(r)){var f=ge(r);p=f.length}if(s>=p)return r;var m=s-Ci(u);if(m<1)return u;var y=f?_r(f,0,m).join(""):r.slice(0,m);if(c===o)return y+u;if(f&&(m+=y.length-m),ku(c)){if(r.slice(m).search(c)){var A,v=y;for(c.global||(c=Ja(c.source,X(cc.exec(c))+"g")),c.lastIndex=0;A=c.exec(v);)var M=A.index;y=y.slice(0,M===o?m:M)}}else if(r.indexOf(Xt(c),m)!=m){var E=y.lastIndexOf(c);E>-1&&(y=y.slice(0,E))}return y+u}function _M(r){return r=X(r),r&&Rg.test(r)?r.replace(ac,Xy):r}var AM=Ei(function(r,i,s){return r+(s?" ":"")+i.toUpperCase()}),Pu=kh("toUpperCase");function Lp(r,i,s){return r=X(r),i=s?o:i,i===o?Gy(r)?Zy(r):Fy(r):r.match(i)||[]}var wp=B(function(r,i){try{return Kt(r,o,i)}catch(s){return wu(s)?s:new w(s)}}),vM=Je(function(r,i){return se(i,function(s){s=we(s),ze(r,s,Ru(r[s],r))}),r});function MM(r){var i=r==null?0:r.length,s=I();return r=i?nt(r,function(u){if(typeof u[1]!="function")throw new oe(a);return[s(u[0]),u[1]]}):[],B(function(u){for(var c=-1;++c<i;){var p=r[c];if(Kt(p[0],this,u))return Kt(p[1],this,u)}})}function xM(r){return Xb(ue(r,D))}function Hu(r){return function(){return r}}function EM(r,i){return r==null||r!==r?i:r}var TM=Nh(),SM=Nh(!0);function jt(r){return r}function Bu(r){return ph(typeof r=="function"?r:ue(r,D))}function OM(r){return dh(ue(r,D))}function DM(r,i){return mh(r,ue(i,D))}var IM=B(function(r,i){return function(s){return pn(s,r,i)}}),RM=B(function(r,i){return function(s){return pn(r,s,i)}});function Uu(r,i,s){var u=vt(i),c=Fo(i,u);s==null&&!(at(i)&&(c.length||!u.length))&&(s=i,i=r,r=this,c=Fo(i,vt(i)));var p=!(at(s)&&"chain"in s)||!!s.chain,f=Ze(r);return se(c,function(m){var y=i[m];r[m]=y,f&&(r.prototype[m]=function(){var A=this.__chain__;if(p||A){var v=r(this.__wrapped__),M=v.__actions__=Bt(this.__actions__);return M.push({func:y,args:arguments,thisArg:r}),v.__chain__=A,v}return y.apply(r,fr([this.value()],arguments))})}),r}function LM(){return At._===this&&(At._=nb),this}function Vu(){}function wM(r){return r=N(r),B(function(i){return gh(i,r)})}var kM=bu(nt),FM=bu(Pc),NM=bu(Wa);function kp(r){return Eu(r)?Ga(we(r)):pC(r)}function PM(r){return function(i){return r==null?o:Fr(r,i)}}var HM=Hh(),BM=Hh(!0);function ju(){return[]}function Wu(){return!1}function UM(){return{}}function VM(){return""}function jM(){return!0}function WM(r,i){if(r=N(r),r<1||r>hr)return[];var s=Ie,u=Ot(r,Ie);i=I(i),r-=Ie;for(var c=Ka(u,i);++s<r;)i(s);return c}function GM(r){return k(r)?nt(r,we):Jt(r)?[r]:Bt(tp(X(r)))}function qM(r){var i=++rb;return X(r)+i}var $M=Vo(function(r,i){return r+i},0),KM=Cu("ceil"),zM=Vo(function(r,i){return r/i},1),XM=Cu("floor");function JM(r){return r&&r.length?ko(r,jt,nu):o}function YM(r,i){return r&&r.length?ko(r,I(i,2),nu):o}function ZM(r){return Uc(r,jt)}function QM(r,i){return Uc(r,I(i,2))}function tx(r){return r&&r.length?ko(r,jt,uu):o}function ex(r,i){return r&&r.length?ko(r,I(i,2),uu):o}var rx=Vo(function(r,i){return r*i},1),ix=Cu("round"),nx=Vo(function(r,i){return r-i},0);function sx(r){return r&&r.length?$a(r,jt):0}function ox(r,i){return r&&r.length?$a(r,I(i,2)):0}return h.after=OA,h.ary=hp,h.assign=mv,h.assignIn=Ep,h.assignInWith=ta,h.assignWith=gv,h.at=yv,h.before=pp,h.bind=Ru,h.bindAll=vM,h.bindKey=fp,h.castArray=UA,h.chain=up,h.chunk=XC,h.compact=JC,h.concat=YC,h.cond=MM,h.conforms=xM,h.constant=Hu,h.countBy=sA,h.create=bv,h.curry=dp,h.curryRight=mp,h.debounce=gp,h.defaults=Cv,h.defaultsDeep=_v,h.defer=DA,h.delay=IA,h.difference=ZC,h.differenceBy=QC,h.differenceWith=t_,h.drop=e_,h.dropRight=r_,h.dropRightWhile=i_,h.dropWhile=n_,h.fill=s_,h.filter=aA,h.flatMap=cA,h.flatMapDeep=hA,h.flatMapDepth=pA,h.flatten=np,h.flattenDeep=o_,h.flattenDepth=a_,h.flip=RA,h.flow=TM,h.flowRight=SM,h.fromPairs=u_,h.functions=Sv,h.functionsIn=Ov,h.groupBy=fA,h.initial=c_,h.intersection=h_,h.intersectionBy=p_,h.intersectionWith=f_,h.invert=Iv,h.invertBy=Rv,h.invokeMap=mA,h.iteratee=Bu,h.keyBy=gA,h.keys=vt,h.keysIn=Vt,h.map=zo,h.mapKeys=wv,h.mapValues=kv,h.matches=OM,h.matchesProperty=DM,h.memoize=Jo,h.merge=Fv,h.mergeWith=Tp,h.method=IM,h.methodOf=RM,h.mixin=Uu,h.negate=Yo,h.nthArg=wM,h.omit=Nv,h.omitBy=Pv,h.once=LA,h.orderBy=yA,h.over=kM,h.overArgs=wA,h.overEvery=FM,h.overSome=NM,h.partial=Lu,h.partialRight=yp,h.partition=bA,h.pick=Hv,h.pickBy=Sp,h.property=kp,h.propertyOf=PM,h.pull=y_,h.pullAll=op,h.pullAllBy=b_,h.pullAllWith=C_,h.pullAt=__,h.range=HM,h.rangeRight=BM,h.rearg=kA,h.reject=AA,h.remove=A_,h.rest=FA,h.reverse=Du,h.sampleSize=MA,h.set=Uv,h.setWith=Vv,h.shuffle=xA,h.slice=v_,h.sortBy=SA,h.sortedUniq=D_,h.sortedUniqBy=I_,h.split=cM,h.spread=NA,h.tail=R_,h.take=L_,h.takeRight=w_,h.takeRightWhile=k_,h.takeWhile=F_,h.tap=J_,h.throttle=PA,h.thru=Ko,h.toArray=vp,h.toPairs=Op,h.toPairsIn=Dp,h.toPath=GM,h.toPlainObject=xp,h.transform=jv,h.unary=HA,h.union=N_,h.unionBy=P_,h.unionWith=H_,h.uniq=B_,h.uniqBy=U_,h.uniqWith=V_,h.unset=Wv,h.unzip=Iu,h.unzipWith=ap,h.update=Gv,h.updateWith=qv,h.values=Oi,h.valuesIn=$v,h.without=j_,h.words=Lp,h.wrap=BA,h.xor=W_,h.xorBy=G_,h.xorWith=q_,h.zip=$_,h.zipObject=K_,h.zipObjectDeep=z_,h.zipWith=X_,h.entries=Op,h.entriesIn=Dp,h.extend=Ep,h.extendWith=ta,Uu(h,h),h.add=$M,h.attempt=wp,h.camelCase=Jv,h.capitalize=Ip,h.ceil=KM,h.clamp=Kv,h.clone=VA,h.cloneDeep=WA,h.cloneDeepWith=GA,h.cloneWith=jA,h.conformsTo=qA,h.deburr=Rp,h.defaultTo=EM,h.divide=zM,h.endsWith=Yv,h.eq=be,h.escape=Zv,h.escapeRegExp=Qv,h.every=oA,h.find=uA,h.findIndex=rp,h.findKey=Av,h.findLast=lA,h.findLastIndex=ip,h.findLastKey=vv,h.floor=XM,h.forEach=lp,h.forEachRight=cp,h.forIn=Mv,h.forInRight=xv,h.forOwn=Ev,h.forOwnRight=Tv,h.get=Fu,h.gt=$A,h.gte=KA,h.has=Dv,h.hasIn=Nu,h.head=sp,h.identity=jt,h.includes=dA,h.indexOf=l_,h.inRange=zv,h.invoke=Lv,h.isArguments=Hr,h.isArray=k,h.isArrayBuffer=zA,h.isArrayLike=Ut,h.isArrayLikeObject=ht,h.isBoolean=XA,h.isBuffer=Ar,h.isDate=JA,h.isElement=YA,h.isEmpty=ZA,h.isEqual=QA,h.isEqualWith=tv,h.isError=wu,h.isFinite=ev,h.isFunction=Ze,h.isInteger=bp,h.isLength=Zo,h.isMap=Cp,h.isMatch=rv,h.isMatchWith=iv,h.isNaN=nv,h.isNative=sv,h.isNil=av,h.isNull=ov,h.isNumber=_p,h.isObject=at,h.isObjectLike=lt,h.isPlainObject=bn,h.isRegExp=ku,h.isSafeInteger=uv,h.isSet=Ap,h.isString=Qo,h.isSymbol=Jt,h.isTypedArray=Si,h.isUndefined=lv,h.isWeakMap=cv,h.isWeakSet=hv,h.join=d_,h.kebabCase=tM,h.last=ce,h.lastIndexOf=m_,h.lowerCase=eM,h.lowerFirst=rM,h.lt=pv,h.lte=fv,h.max=JM,h.maxBy=YM,h.mean=ZM,h.meanBy=QM,h.min=tx,h.minBy=ex,h.stubArray=ju,h.stubFalse=Wu,h.stubObject=UM,h.stubString=VM,h.stubTrue=jM,h.multiply=rx,h.nth=g_,h.noConflict=LM,h.noop=Vu,h.now=Xo,h.pad=iM,h.padEnd=nM,h.padStart=sM,h.parseInt=oM,h.random=Xv,h.reduce=CA,h.reduceRight=_A,h.repeat=aM,h.replace=uM,h.result=Bv,h.round=ix,h.runInContext=g,h.sample=vA,h.size=EA,h.snakeCase=lM,h.some=TA,h.sortedIndex=M_,h.sortedIndexBy=x_,h.sortedIndexOf=E_,h.sortedLastIndex=T_,h.sortedLastIndexBy=S_,h.sortedLastIndexOf=O_,h.startCase=hM,h.startsWith=pM,h.subtract=nx,h.sum=sx,h.sumBy=ox,h.template=fM,h.times=WM,h.toFinite=Qe,h.toInteger=N,h.toLength=Mp,h.toLower=dM,h.toNumber=he,h.toSafeInteger=dv,h.toString=X,h.toUpper=mM,h.trim=gM,h.trimEnd=yM,h.trimStart=bM,h.truncate=CM,h.unescape=_M,h.uniqueId=qM,h.upperCase=AM,h.upperFirst=Pu,h.each=lp,h.eachRight=cp,h.first=sp,Uu(h,(function(){var r={};return Re(h,function(i,s){z.call(h.prototype,s)||(r[s]=i)}),r})(),{chain:!1}),h.VERSION=t,se(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){h[r].placeholder=h}),se(["drop","take"],function(r,i){j.prototype[r]=function(s){s=s===o?1:bt(N(s),0);var u=this.__filtered__&&!i?new j(this):this.clone();return u.__filtered__?u.__takeCount__=Ot(s,u.__takeCount__):u.__views__.push({size:Ot(s,Ie),type:r+(u.__dir__<0?"Right":"")}),u},j.prototype[r+"Right"]=function(s){return this.reverse()[r](s).reverse()}}),se(["filter","map","takeWhile"],function(r,i){var s=i+1,u=s==nc||s==yg;j.prototype[r]=function(c){var p=this.clone();return p.__iteratees__.push({iteratee:I(c,3),type:s}),p.__filtered__=p.__filtered__||u,p}}),se(["head","last"],function(r,i){var s="take"+(i?"Right":"");j.prototype[r]=function(){return this[s](1).value()[0]}}),se(["initial","tail"],function(r,i){var s="drop"+(i?"":"Right");j.prototype[r]=function(){return this.__filtered__?new j(this):this[s](1)}}),j.prototype.compact=function(){return this.filter(jt)},j.prototype.find=function(r){return this.filter(r).head()},j.prototype.findLast=function(r){return this.reverse().find(r)},j.prototype.invokeMap=B(function(r,i){return typeof r=="function"?new j(this):this.map(function(s){return pn(s,r,i)})}),j.prototype.reject=function(r){return this.filter(Yo(I(r)))},j.prototype.slice=function(r,i){r=N(r);var s=this;return s.__filtered__&&(r>0||i<0)?new j(s):(r<0?s=s.takeRight(-r):r&&(s=s.drop(r)),i!==o&&(i=N(i),s=i<0?s.dropRight(-i):s.take(i-r)),s)},j.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},j.prototype.toArray=function(){return this.take(Ie)},Re(j.prototype,function(r,i){var s=/^(?:filter|find|map|reject)|While$/.test(i),u=/^(?:head|last)$/.test(i),c=h[u?"take"+(i=="last"?"Right":""):i],p=u||/^find/.test(i);c&&(h.prototype[i]=function(){var f=this.__wrapped__,m=u?[1]:arguments,y=f instanceof j,A=m[0],v=y||k(f),M=function(V){var W=c.apply(h,fr([V],m));return u&&E?W[0]:W};v&&s&&typeof A=="function"&&A.length!=1&&(y=v=!1);var E=this.__chain__,O=!!this.__actions__.length,R=p&&!E,H=y&&!O;if(!p&&v){f=H?f:new j(this);var L=r.apply(f,m);return L.__actions__.push({func:Ko,args:[M],thisArg:o}),new ae(L,E)}return R&&H?r.apply(this,m):(L=this.thru(M),R?u?L.value()[0]:L.value():L)})}),se(["pop","push","shift","sort","splice","unshift"],function(r){var i=Co[r],s=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",u=/^(?:pop|shift)$/.test(r);h.prototype[r]=function(){var c=arguments;if(u&&!this.__chain__){var p=this.value();return i.apply(k(p)?p:[],c)}return this[s](function(f){return i.apply(k(f)?f:[],c)})}}),Re(j.prototype,function(r,i){var s=h[i];if(s){var u=s.name+"";z.call(vi,u)||(vi[u]=[]),vi[u].push({name:i,func:s})}}),vi[Uo(o,Or).name]=[{name:"wrapper",func:o}],j.prototype.clone=_b,j.prototype.reverse=Ab,j.prototype.value=vb,h.prototype.at=Y_,h.prototype.chain=Z_,h.prototype.commit=Q_,h.prototype.next=tA,h.prototype.plant=rA,h.prototype.reverse=iA,h.prototype.toJSON=h.prototype.valueOf=h.prototype.value=nA,h.prototype.first=h.prototype.head,sn&&(h.prototype[sn]=eA),h}),mr=Qy();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(At._=mr,define(function(){return mr})):Ir?((Ir.exports=mr)._=mr,Ba._=mr):At._=mr}).call(Ni)});var Kd=S((bI,$d)=>{"use strict";function DS(o,t){return function(e){return o(t(e))}}$d.exports=DS});var Xd=S((CI,zd)=>{"use strict";var IS=Kd(),RS=IS(Object.getPrototypeOf,Object);zd.exports=RS});var oa=S((_I,Yd)=>{"use strict";var LS=Mn(),wS=Xd(),kS=xn(),FS="[object Object]",NS=Function.prototype,PS=Object.prototype,Jd=NS.toString,HS=PS.hasOwnProperty,BS=Jd.call(Object);function US(o){if(!kS(o)||LS(o)!=FS)return!1;var t=wS(o);if(t===null)return!0;var e=HS.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&Jd.call(e)==BS}Yd.exports=US});var Wm=S((WB,jm)=>{"use strict";function cO(o,t){for(var e=-1,n=t.length,a=o.length;++e<n;)o[a+e]=t[e];return o}jm.exports=cO});var Km=S((GB,$m)=>{"use strict";var Gm=An(),hO=al(),pO=Ii(),qm=Gm?Gm.isConcatSpreadable:void 0;function fO(o){return pO(o)||hO(o)||!!(qm&&o&&o[qm])}$m.exports=fO});var Jm=S((qB,Xm)=>{"use strict";var dO=Wm(),mO=Km();function zm(o,t,e,n,a){var l=-1,d=o.length;for(e||(e=mO),a||(a=[]);++l<d;){var b=o[l];t>0&&e(b)?t>1?zm(b,t-1,e,n,a):dO(a,b):n||(a[a.length]=b)}return a}Xm.exports=zm});var Zm=S(($B,Ym)=>{"use strict";var gO=Jm(),yO=1/0;function bO(o){var t=o==null?0:o.length;return t?gO(o,yO):[]}Ym.exports=bO});var SO={};px(SO,{ALL_CONTENT_IN_DATA_SETTING:()=>tm,ATTRIBUTE_TYPE:()=>mt,ATTRIBUTE_WIDTH:()=>Wt,AVATAR:()=>OS,AVATAR_IN_TITLE:()=>SS,ActionCollection:()=>re,ActionModel:()=>ws,ApplicationModel:()=>ks,AssignmentFilterModel:()=>ni,AttributeCollection:()=>ft,AttributeContent:()=>Zr,AttributeDataMapper:()=>Ls,AttributeFactory:()=>Ct,AttributeSetModel:()=>Er,Authenticate:()=>Yl,BSNConstraint:()=>gs,BaseAttributeModel:()=>G,BaseCollection:()=>K,BaseDateTimeUtil:()=>qr,BaseLayoutHintRule:()=>ti,BaseModel:()=>q,BooleanAttributeModel:()=>es,CAPTCHA_PATH:()=>rl,CASEVIEW_LINK:()=>Wr,CHANGEPASSWORD_PATH:()=>mx,CHOICETYPE:()=>Fl,CONFIRM_PASSWORD:()=>dl,CONTENT_PATH:()=>tl,CREATE_ACTION:()=>Bn,Cache:()=>st,CaptchaAttributeModel:()=>rs,CaptchaRequest:()=>Zl,CaseSearchModel:()=>ro,CaseViewModel:()=>Fs,ChoiceAttributeModel:()=>Ve,ChoiceAttributeOptionCollection:()=>Be,ChoiceAttributeOptionModel:()=>Ee,CompositeAttributeChildCollection:()=>Ue,CompositeAttributeModel:()=>dt,ConceptDetailModel:()=>Me,ConceptIndexFilterModel:()=>ur,ConceptIndexModel:()=>Hs,ConceptLinkCollection:()=>Ps,ConceptLinkModel:()=>Kr,ConceptRelationCollection:()=>zn,ConceptRelationModel:()=>zr,ConceptTypeDetailModel:()=>He,ConfigurationException:()=>Qt,ConstraintCollection:()=>rt,ContentConfiguration:()=>li,ContentConfigurationElements:()=>It,ContentConfigurationEndResults:()=>js,ContentConfigurationQuestions:()=>Ws,ContentConfigurationResults:()=>ui,ContentIndexModel:()=>Us,ContentLinkCollection:()=>Bs,ContentLinkModel:()=>Ht,ContentModel:()=>ai,ContentTOCModel:()=>Vs,ContentTypeModel:()=>pe,DATETIME_OFFSET_FORMAT:()=>ke,DEFAULT_AUTHENTICATION_TYPE:()=>ra,DEFAULT_FIRST_WEEK_CONTAINS_DATE:()=>zu,DEFAULT_WEEK_STARTS_ON:()=>Ku,DELETE_ACTION:()=>Pn,DEPENDENT_ATTRIBUTE:()=>Nn,DEPENDENT_ATTRIBUTE_CONTROL:()=>Pi,DISABLED:()=>fl,DateBoundaryConstraint:()=>is,DateTimeDateFormatConstraint:()=>ns,DateTimeTimeFormatConstraint:()=>os,DateTimeUtil:()=>Ne,DateUtil:()=>St,DatetimeAttributeModel:()=>as,DatetimeFormatConstraint:()=>ss,DecimalFormat:()=>sr,DependentAttribute:()=>cs,DetailModel:()=>Se,ErrorCollection:()=>fe,ErrorCollectionType:()=>Jn,ErrorModel:()=>Jr,ErrorResponse:()=>qi,FILTER_TYPE:()=>wl,FetchException:()=>Vr,FileExtensionConstraint:()=>hs,FileSizeConstraint:()=>ps,FilterCollection:()=>Lt,FilterFactory:()=>oi,FilterModel:()=>Rt,FormModel:()=>lr,FormObjectModel:()=>Tr,GenericConstraintModel:()=>Zn,GroupModel:()=>va,GroupingModel:()=>$i,GroupingPanelModel:()=>eo,HIDE_IN_USER_INTERFACE:()=>yl,HIDE_WHEN_EMPTY:()=>jn,HTTP_METHODS:()=>Nt,HelptextAttributeModel:()=>us,Href:()=>U,IBANConstraint:()=>ys,INCLUDE_TIME_OFFSET:()=>em,INITIAL_FILTER:()=>Wn,INITIAL_TOTAL_FILESIZE:()=>Un,INTERNAL_LOGIN_TYPE:()=>_n,ISO_DATETIME_FORMAT:()=>Gu,ISO_DATE_FORMAT:()=>Cn,ISO_TIMESTAMP_FORMAT:()=>$u,ISO_TIME_FORMAT:()=>qu,IS_DEV:()=>MO,IS_GRAALJS:()=>Di,IS_SERVER:()=>dx,IllegalArgumentException:()=>P,IllegalReturnException:()=>On,IllegalStateException:()=>J,JsonParseException:()=>Dn,LOGIN_PASSWORD_SETTING:()=>Zu,LOGIN_PATH:()=>qS,LOGIN_PATH_SETTING:()=>Ju,LOGIN_TYPE:()=>Xu,LOGIN_USERNAME_SETTING:()=>Yu,LOGOUT_PATH:()=>$S,LOGOUT_PATH_SETTING:()=>Qu,LabelAttributeModel:()=>ls,LayoutHintCollection:()=>ut,LayoutHintConfiguration:()=>wn,LayoutHintProcessor:()=>$n,LayoutHintRuleCollection:()=>ms,LinkCollection:()=>ct,LinkModel:()=>ve,ListDetailModel:()=>Sr,ListHeaderModel:()=>Qr,ListHref:()=>cr,ListItemCollection:()=>$s,ListItemModel:()=>qs,ListModel:()=>ci,LookupOptionCollection:()=>Js,LookupOptionsModel:()=>Ys,MANDATORY:()=>Fn,MAX_TOTAL_FILESIZE:()=>Vn,MandatoryConstraint:()=>Qn,MandatoryRangeConstraint:()=>Os,MemoAttributeModel:()=>bs,MissingPropertyException:()=>ll,ModelCatalogModel:()=>to,ModelCategoryCollection:()=>Qs,ModelCategoryModel:()=>Zs,ModelResolver:()=>so,ModularUIError:()=>zi,ModularUIRequest:()=>tc,ModularUIResponse:()=>Pt,MoneyAttributeModel:()=>vs,NetworkException:()=>Fi,NotAllowedUriException:()=>In,NotFoundException:()=>Rn,NumberAttributeModel:()=>ri,NumberBoundaryConstraint:()=>Cs,NumberFormatConstraint:()=>_s,NumberGroupingConstraint:()=>As,NumberUtil:()=>_t,OPTION_MODE:()=>kl,PARAMETER_SEPARATOR:()=>Ur,PARAMETER_TYPES:()=>Br,PagesizeModel:()=>Ks,PagingModel:()=>zs,Parameter:()=>qt,ParameterCollection:()=>Ae,PasswordAttributeModel:()=>Ss,PasswordConfirmConstraint:()=>Wi,PasswordLowerAndUpperCaseConstraint:()=>Ms,PasswordMinNumericCharactersConstraint:()=>xs,PasswordMinSpecialCharactersConstraint:()=>Es,PasswordThreeConsecutiveCharactersNotAllowedConstraint:()=>Ts,ProcessStatusSettingsModel:()=>$r,RENDER_SECTION_LABEL:()=>Gn,RESOURCE_PATH:()=>ia,RangeAttributeModel:()=>or,RangeConstraint:()=>Ds,RangeFilterModel:()=>si,RegexConstraint:()=>nr,RemainingTotalUploadSize:()=>fs,ResourceCollection:()=>Tt,ResourceModel:()=>F,SHOW_ONE_RESULT_AS_DETAIL:()=>gl,SORT_OPTIONS:()=>ml,SORT_ORDER:()=>Jl,SectionModel:()=>xe,ServerRequestException:()=>cl,SortOptionModel:()=>Ki,SortingModel:()=>Xs,SourceReferenceCollection:()=>Xn,SourceReferenceModel:()=>ji,StringAttributeModel:()=>Te,StringFilterModel:()=>Ns,StringLengthConstraint:()=>ts,SubSectionModel:()=>Yn,TIMEVERSION_FILTER_NAME:()=>et,TITLE:()=>vr,TabModel:()=>io,TaskGroupCollection:()=>ar,TaskGroupModel:()=>$t,ThemePropertyException:()=>hl,TimeUtil:()=>ir,TimeoutException:()=>Ln,TimestampUtil:()=>Pe,UPDATE_ACTION:()=>Hn,UPLOAD_PATH:()=>el,USERPROFILE_PATH:()=>gx,UnauthorizedException:()=>jr,UnsupportedOperationException:()=>pl,UploadAttributeModel:()=>ei,UserModel:()=>je,UserProfileModel:()=>no,UserServicesModel:()=>ii,XMLAttributeModel:()=>Rs,XMLConstraint:()=>Is,addLayoutHintRule:()=>aO,allSettings:()=>GS,cacheContributions:()=>aa,clearCookie:()=>nO,createHash:()=>sO,createHashFromHref:()=>Xr,createHref:()=>AO,createUUID:()=>vO,filterParameters:()=>ec,getBooleanSetting:()=>Et,getCaptchaPath:()=>ca,getContentPath:()=>vl,getContextPath:()=>ee,getContextPathModularUI:()=>ot,getContextPathServer:()=>Ui,getCookie:()=>Sl,getEnabledLocales:()=>bl,getHint:()=>xt,getLayoutHintConfiguration:()=>TS,getNumberSetting:()=>Bi,getRepositoryResourceUrl:()=>xO,getSetting:()=>Gt,getStringSetting:()=>Fe,getUploadPath:()=>rm,graalFetch:()=>Ml,hasAllContentInData:()=>er,isIncludeTimeOffsetInDateTimes:()=>Mr,loginPasswordField:()=>_l,loginPath:()=>qn,loginType:()=>ua,loginUsernameField:()=>Cl,logoutPath:()=>la,normalizeLinkJSON:()=>Ll,parseUrl:()=>cg,removeUnwantedHtml:()=>TO,resourceExists:()=>CO,resourceRedirectsToSecureLogin:()=>_O,retrieveText:()=>Yr,setCookie:()=>iO,setSetting:()=>WS,setSettings:()=>jS,universalFetch:()=>_e,updateLayoutHintRules:()=>uO,xhr:()=>Gr});module.exports=fx(SO);var Di=typeof Graal<"u",dx=Di,Nt=(e=>(e.GET="GET",e.POST="POST",e))(Nt||{}),Br=(e=>(e.BODY="bodyParameter",e.QUERY="queryParameter",e))(Br||{}),Ur="~",et="entryDate",Cn="yyyy-MM-dd",Gu="yyyy-MM-dd'T'HH:mm:ss",qu="HH:mm:ss",$u="yyyy-MM-dd'T'HH:mm:ss.SSS",ke="xxx",Ku=1,zu=1,Wt=(l=>(l.EXTRA_SMALL="EXTRA_SMALL",l.SMALL="SMALL",l.MEDIUM="MEDIUM",l.LARGE="LARGE",l.EXTRA_LARGE="EXTRA_LARGE",l))(Wt||{}),_n=(a=>(a.JAAS="JAAS",a.PAC4J_FORM="PAC4J_FORM",a.PAC4J_BASIC="PAC4J_BASIC",a.PAC4J_INDIRECT="PAC4J_INDIRECT",a))(_n||{}),Xu="security.clients",Ju="FormClient.login_url",Yu="FormClient.username_field_name",Zu="FormClient.password_field_name",Qu="FormClient.logout_url",ra={name:"Form based authentication",authentication:"DefaultFormClient",isPrimary:!0};var tl="/content",el="/uploadFile",rl="/captchaServices",mx="/change-password",gx="/user",ia="/resource";var Qt=class extends Error{constructor(t){super(t),this.name="ConfigurationException"}};var ul=Y(ki(),1);var xS=400,Vr=class o extends Error{id;request;requestOptions;status;response;properties;parameters;constructor(t,e,n){let a=ES(t,n);super(a.id),Object.setPrototypeOf(this,o.prototype),this.name=a.id,this.id=a.id,this.request=e,this.requestOptions=n,this.status=e&&e.status?e.status:xS,this.response=t,this.properties=a.properties??{},this.parameters=a.param,"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,this.constructor)}},ES=(o,t)=>{let e={id:"Error.CannotRequestResource",defaultMessage:`Cannot request resource ${t?.url??""} with method ${t?.method??"GET"}`,properties:{},param:void 0};if(!o)return e;if((0,ul.default)(o,"error"))return{...e,...o.error};let[n]=Object.keys(o);return(0,ul.default)(o[n],"errors")?{...e,...o[n].errors}:e};var P=class extends Error{constructor(t){super(t),this.name="IllegalArgumentException"}};var On=class extends Error{constructor(t){super(t),this.name="IllegalReturnException"}};var qd=require("immer"),J=class extends Error{[qd.immerable]=!0;constructor(t){super(t),this.name="IllegalStateException"}};var Dn=class extends Error{constructor(t){super(t instanceof SyntaxError?t.message:t),this.name="JsonParseException"}};var ll=class extends Error{constructor(t){super(t),this.name="MissingPropertyException"}};var Fi=class extends Error{id;status;constructor(t,e){super(`An unexpected network error occurred, cannot request resource ${t} with method ${e}`),this.name="NetworkException",this.id="NetworkException",this.status=0}};var In=class extends Error{constructor(t){super(t),this.name="NotAllowedUriException"}};var Rn=class extends Error{id;status;isReload;constructor(t,e,n=!1){super(`Resource ${t} with method ${e} not found`),this.name="NotFoundException",this.id="NotFoundException",this.status=404,this.isReload=n}};var cl=class extends Error{constructor(t){super(t),this.name="ServerRequestException"}};var hl=class extends Error{constructor(t){super(t),this.name="ThemePropertyException"}};var Ln=class extends Error{constructor(t,e){super(`Timeout occurred in connection to ${t} with method ${e}.`),this.name="TimeoutException"}};var jr=class extends Error{id;status;response;constructor(t,e,n){super(`Cannot request resource ${t} with method ${e}`),this.name="UnauthorizedException",this.id="UnauthorizedException",this.status=401,this.response=n}};var pl=class extends Error{constructor(t){super(t),this.name="UnsupportedOperationException"}};var wn={MANDATORY:{hint:"mandatory",description:{NL:"Geeft aan of een attribuut verplicht is. Dient samen met de dependency hint gebruikt te worden.",EN:`Indicates a mandatory attribute.
|
|
21
|
-
Should be used together with the dependency hint.`},link:"",component:["attribute"]},DEPENDENT_ATTRIBUTE_CONTROL:{hint:"dependent-control:${unique-control-id}",description:{NL:"Geeft aan dat dit het attribuut is waar attributen van afhankelijk zijn. Het unique-control-id is een uniek id dat kan worden gebruikt in the hint voor de show|hide actie op het afhankelijke attribuut.",EN:"Marks the choice attribute where other attributes depend on. The unique control id is a unique id that can be used in the hint for the show|hide action on the dependent attribute."},link:"",component:["attribute/boolean","attribute/choice"]},DEPENDENT_ATTRIBUTE_ACTION:{hint:"dependent-attribute:(show|hide) when dependent-control:${unique-control-id} (equals|includes|notEquals|notIncludes) [${codemaps}]",description:{NL:"Toon of verberg een attribute dat afhankelijk is van de geselecteerde opties van een keuze attribute",EN:"To show or hide an attribute dependent on options of the choice control codemap that are selected or not selected."},link:"",component:["attribute"]},SHOW_ONE_RESULT_AS_DETAIL:{hint:"show-one-result-as-detail",description:{NL:"Een lijst met maar \xE9\xE9n item mag direct als detail getoond worden.",EN:"A list with only one detail must be shown as a detail."},link:"",component:["list"]},HIDE_WHEN_EMPTY:{hint:"hide-when-empty",description:{NL:"Een lijst zonder lijst-items en lijst-taken dient niet getoond worden.",EN:"A list without list-items and list-tasks should not be shown."},link:"",component:["list"]},INITIAL_FILTER:{hint:"initial-filter:${filter-name}=${initial-value}",description:{NL:"Laad de lijst met een standaardwaarde voor een filter, er is geen controle op het bestaan van het filter. Als het filter niet is geconfigureerd, treedt er een fout op. Houd er rekening mee dat filters hoofdlettergevoelig zijn.",EN:"Load the list with a default value for a filter, there is no check for the existence of the filter. If the filter is not configured, an error occurs. Keep in mind that filters are case sensitive."},link:"",component:["list"]},CONFIRM_PASSWORD:{hint:"confirm-password",description:{NL:"Wachtwoord attribuut moet bevestigd worden dmv een tweede wachtwoord attribuut.",EN:"Password attribute must be confirmed using a second password attribute."},link:"",component:["attribute/password"]},TITLE:{hint:"title",description:{NL:"Markeert een attribuut als een titel attribuut",EN:"Marks an attribute as a title attribute"},link:"",component:["caseview_table","codemap","list/appointment_table","list/assignment_table","list/caseproperties_table","list/document_table","list/timelimit_table","list/eventhistory_table","list/note_table","list/record_table","list/case_table","list/casesearch_table","list/datastore_table","list/datastoreview_table","list/instrumentresult_table","list/event_table","list/user_table","list/organization_table"]},INITIAL_TOTAL_FILESIZE:{hint:"initial-total-file-size",description:{NL:"Wordt gebruikt in samenwerking met een upload attribuut, deze hint moet worden gezet op een readonly attribuut dat de reeds gebruikte file grootte bevat.",EN:"Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the file size currently used."},link:"",component:["attribute/number"]},MAX_TOTAL_FILESIZE:{hint:"max-total-file-size",description:{NL:"Wordt gebruikt in samenwerking met een upload attribuut, deze hint moet worden gezet op een readonly attribuut dat de maximaal toegestane file grootte bevat.",EN:"Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the maximum allowed total file size."},link:"",component:["attribute/number"]},CREATE_ACTION:{hint:"create",description:{NL:"Markeer taak als cre\xEBer taak.",EN:"Mark task as create task"},component:["form"]},UPDATE_ACTION:{hint:"update",description:{NL:"Markeer taak als bewerk taak.",EN:"Mark task as update task"},component:["form"]},DELETE_ACTION:{hint:"delete",description:{NL:"Markeer taak als verwijder taak.",EN:"Mark task as delete task"},component:["form"]},SORT_OPTIONS:{hint:"sort-options",description:{NL:"Sorteer opties alfabetisch",EN:"Sort options alphabetically"},component:["attribute/choice"]},CASEVIEW_LINK:{hint:"case-view-link",description:{NL:"Markeer een case id reference attribute als de referentie naar de case view. Vervangt de self link van een lijst item",EN:"Mark a case id reference attribute as the reference to the case view. Replaces the self link of a list item"},component:["attribute/reference","list/datastore_table"]},DISABLED:{hint:"disabled",description:{NL:"Geeft aan of een attribuut uitgeschakeld is.",EN:"Indicates a disabled attribute."},component:["attribute"]},HIDE_IN_USER_INTERFACE:{hint:"hide-in-user-interface",description:{NL:"Verberg een tab in de user interface.",EN:"Hide a tab in the user interface."},component:["tab","list","groupingpanel"]},AVATAR:{hint:"avatar",description:{NL:"Geef het attribuut weer als de avatar van de gebruiker.",EN:"Render the attribute as the user's avatar."},link:"",component:["attribute/upload","list/user_table"]},AVATAR_IN_TITLE:{hint:"avatar-in-title",description:{NL:"Geeft aan dat de avatarafbeelding in de titel wordt opgenomen. De avatarafbeelding wordt v\xF3\xF3r het titel attribuut weergegeven in de lijstweergave en de snelle lijst quick view.",EN:"Indicates that the avatar image will be included in the title. The avatar image is shown in front of the title attribute in the list view and list quick view."},link:"",component:["list/user_table"]}};var nm=Y(te(),1);var xt=o=>o in wn?wn[o].hint:"",Fn=xt("MANDATORY"),fl=xt("DISABLED"),Pi="dependent-control",Nn="dependent-attribute:",dl=xt("CONFIRM_PASSWORD"),ml=xt("SORT_OPTIONS"),vr=xt("TITLE"),Pn=xt("DELETE_ACTION"),Hn=xt("UPDATE_ACTION"),Bn=xt("CREATE_ACTION"),Un=xt("INITIAL_TOTAL_FILESIZE"),Vn=xt("MAX_TOTAL_FILESIZE"),gl=xt("SHOW_ONE_RESULT_AS_DETAIL"),jn=xt("HIDE_WHEN_EMPTY"),Wn="initial-filter:",Wr=xt("CASEVIEW_LINK"),Gn="render-section-label",yl=xt("HIDE_IN_USER_INTERFACE"),TS=()=>wn,SS=xt("AVATAR_IN_TITLE"),OS=xt("AVATAR");var Zd=Y(ki(),1),Qd=Y(oa(),1);var tm="hasAllContentInData",em="isIncludeTimeOffsetInDateTimes",VS={UI_PARAMETERS:[],USE_CLIENTSIDE_VALIDATION:!0,USE_INSTANT_SERVER_VALIDATION:!0,CALENDAR_WEEK_STARTS_ON:1,ALWAYS_COMMIT_FORM:!1,ALLOW_HIDE_WHEN_EMPTY_ON_TABS:!0,HIDE_WHEN_EMPTY_IGNORE_TASKS:!1,SHOW_AVATARS:!0,COMPLETE_SOURCE:!1},Hi=VS,jS=o=>{(0,Qd.default)(o)&&(Hi=Object.assign(Hi,o))},Gt=(o,t)=>{if(!(0,Zd.default)(Hi,o)&&t===void 0)throw new Error(`Setting with name ${o} not found and no defaultValue given`);return Hi[o]??t},Fe=(o,t)=>{let e=Gt(o,t);if(typeof e=="string")return e;throw new J(`Expected the value of ${o} to be a string, but was ${typeof e}`)},Bi=(o,t)=>{let e=Gt(o,t);if(typeof e=="number")return e;throw new J(`Expected the value of ${o} to be a number, but was ${typeof e}`)},Et=(o,t)=>{let e=Gt(o,t);if(typeof e=="boolean")return e;throw new J(`Expected the value of ${o} to be a boolean, but was ${typeof e}`)},WS=(o,t)=>{Hi[o]=t},GS=()=>Hi,aa=()=>Et("CACHE_CONTRIBUTIONS",!0),er=()=>Et(tm,!0),Mr=()=>Gt(em,!1),bl=()=>{let o=Gt("ENABLED_LOCALES",["en"]);return Array.isArray(o)?o:["en"]},ua=()=>Fe(Xu,"PAC4J_FORM"),qn=(o="FormClient")=>Fe(Ju,`/callback?client_name=${o}`),Cl=()=>Fe(Yu,"j_username"),_l=()=>Fe(Zu,"j_password"),la=()=>Fe(Qu,"/logout"),qS=qn(),$S=la();var im=Y(te(),1);var KS="res:",Al=class o{_cache;static instance=new o;constructor(){typeof sessionStorage<"u"&&(this._cache=sessionStorage)}static getInstance(){return o.instance}createResourceKey(t){let e=t.url;return t.params&&(e+=`|${t.params}`),t.locale&&(e+=`|${t.locale}`),`${KS}${e}`}getItem(t){let e=this._cache;if(!e)return null;let n=e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return this._cache?.getItem(t)}}hasItem(t){return this.getItem(t)!==null}addItem(t,e){let n=typeof e=="string"?e:JSON.stringify(e);this._cache?.setItem(t,n)}setItem(t,e){this.addItem(t,e)}removeItem(t){this._cache?.removeItem(t)}clear(t){this._cache&&(t?Object.keys(this._cache).filter(e=>t?new RegExp(t).test(e):!0).forEach(e=>this._cache?.removeItem(e)):this._cache.clear())}loadOtherBrowserTabs(t){window.addEventListener("storage",e=>{this.sendSessionStorage(e),this.receiveSessionStorage(e,t)}),this._cache?.length===0&&localStorage.setItem("getSessionStorage",Date.now().toString())}sendSessionStorage(t){t.key==="getSessionStorage"&&(localStorage.setItem("sessionStorage",JSON.stringify(this._cache)),localStorage.removeItem("sessionStorage"))}receiveSessionStorage(t,e){if(t.key==="sessionStorage"&&!this.getItem("sessionStorageCopied")){let n=t.newValue?JSON.parse(t.newValue):{};return Object.entries(n).filter(([a])=>!this.hasItem(a)).forEach(([a,l])=>{(typeof l=="string"||typeof l=="object")&&this.addItem(a,l)}),this.setItem("sessionStorageCopied",Date.now().toString()),e()}return null}},st=Al.getInstance();var ee=()=>Fe("CONTEXT_PATH","/BeInformed"),ot=()=>Fe("CONTEXT_PATH_MODULARUI",ee()),Ui=()=>Fe("CONTEXT_PATH_SERVER",ee()),vl=(o=ot(),t="")=>`${t}${o}${tl}`,rm=(o=ot(),t="")=>`${t}${o}${el}`,ca=(o=ot(),t="")=>`${t}${o}${rl}`;var Ml=o=>{let t=o.url.includes("http")?o.url:o.url.replace(ee(),""),e=o.params?o.params.replace("includeContext=true",""):"",n=e===""?t:`${t}?${e}`,a=dataFetcher.fetch(n,o);try{let l=JSON.parse(a);return l.error?Promise.reject(new Vr(l,void 0,o)):Promise.resolve(l)}catch(l){return Promise.reject(l)}};var Vi=Y(te(),1);var zS=0,XS=200,JS=400,YS=401,ZS=300,QS=404,xl="application/json",El=class{_options;_attempts=0;_xmlhttp=new XMLHttpRequest;constructor(t){this._options=t}get xmlhttp(){return this._xmlhttp}set xmlhttp(t){this._xmlhttp=t}get options(){return this._options}set options(t){this._options=t}get attempts(){return this._attempts}set attempts(t){this._attempts=t}get url(){let{url:t}=this.options;if(this.params!==""){if(t.includes("?")){let e=t.split("?");return`${e[0]}?${e[1]}&${this.params}`}return`${t}?${this.params}`}return t}get params(){return this.options.params||""}get data(){return this.options.data||null}get method(){return this.options.method||"GET"}get timeout(){return this.options.timeout||Bi("XHR_TIMEOUT_MS",3e5)}get responseType(){return this.options.responseType||"json"}get events(){return this.options.events||{}}getBaseLocale(){return typeof navigator<"u"&&navigator.language&&navigator.language.split("-")[0]||"en"}get headers(){let t={Accept:xl,"Content-Type":xl,"X-Requested-With":"XMLHttpRequest","Accept-Language":this.getBaseLocale()};return this.options.headers?{...t,...this.options.headers}:t}timeoutHandler(t){return t(new Ln(this.url,this.method))}errorHandler(t,e){let{status:n}=this.xmlhttp,{isReload:a}=this.options;return t(n===zS?new Fi(this.url,this.method):n===QS?new Rn(this.url,this.method,a):n===YS?new jr(this.url,this.method,e):new Vr(e,this.xmlhttp,this.options))}getResponse(){let{responseType:t,response:e}=this.xmlhttp;if((t===""||t==="text")&&this.getResponseHeader("Content-Type")===xl){if((0,Vi.isPlainObject)(e))return e;try{return JSON.parse(e)}catch(n){throw new Dn(n)}}return e}responseHandler(t,e){let{status:n}=this.xmlhttp,a=null;try{a=this.getResponse()}catch(l){return e(l)}return n>=XS&&n<ZS||n===JS&&(0,Vi.has)(a,"formresponse")?t(a):this.errorHandler(e,a)}setEventListeners(t,e){let n=this.options.onProgress;n&&["load","loadend","loadstart","progress"].forEach(a=>{this.xmlhttp.addEventListener(a,l=>n(l))}),["abort","error"].forEach(a=>{this.xmlhttp.addEventListener(a,()=>this.errorHandler(e))}),this.xmlhttp.addEventListener("timeout",()=>this.timeoutHandler(e)),this.xmlhttp.addEventListener("load",()=>this.responseHandler(t,e)),Object.keys(this.events).forEach(a=>{this.xmlhttp.addEventListener(a,this.events[a])})}openConnection(){this.xmlhttp.open(this.method,this.url,!0)}setBasicAuthentication(){if(st.hasItem("basic")){let t=st.getItem("basic");typeof t=="string"&&this.xmlhttp.setRequestHeader("Authorization",`Basic ${t}`)}}getResponseHeader(t){return this.xmlhttp.getResponseHeader(t)}setCustomHeaders(){let t=this.headers;Object.keys(t).forEach(e=>{this.xmlhttp.setRequestHeader(e,t[e])})}setOtherOptions(){(this.options.withCredentials||Gt("XHR_ALWAYS_WITH_CREDENTIALS",st.hasItem("basic")))&&(this.xmlhttp.withCredentials=!0),this.xmlhttp.responseType=this.responseType,this.xmlhttp.timeout=this.timeout}sendData(){if(this.data==null)this.xmlhttp.send();else{let t=typeof this.data=="object"?JSON.stringify(this.data):this.data;this.xmlhttp.send(t)}}handleXMLHttpRequest(){return new Promise((t,e)=>{this.setEventListeners(t,e),this.openConnection(),this.setBasicAuthentication(),this.setCustomHeaders(),this.setOtherOptions(),this.sendData()})}async fetch(){try{return await this.handleXMLHttpRequest()}catch(t){if(t instanceof Fi&&this.attempts<2)return this.attempts+=1,this.fetch();throw t}}},tO=o=>{if(o==null)throw new P("Missing request options, expecting an object as argument for xhr");if(!(0,Vi.isPlainObject)(o))throw new P(`Expecting an object as argument for xhr, but received: ${o.toString()}`);if(!(0,Vi.has)(o,"url"))throw new P(`No url property found in arguments of xhr, received: ${JSON.stringify(o)}`);return!0},Gr=o=>(tO(o),new El(o).fetch());var Tl="is-fetching",eO=o=>{let t=3e3,e=100;return new Promise((n,a)=>{let l=()=>{if(st.getItem(o)!==Tl){let d=st.getItem(o);d!=null?n(d):a(new Error("Empty cached item"))}else t<=0?a(new Error("Empty cached item")):(t=t-e,setTimeout(l,e))};setTimeout(l,e)})},rO=o=>{if(aa()&&o.cache){let t=st.createResourceKey(o);if(st.hasItem(t)){let e=st.getItem(t);if(e!=null){if(e===Tl)return eO(t);if((0,im.isPlainObject)(e))return Promise.resolve(e)}}st.addItem(t,Tl)}return Gr(o).then(t=>{if(aa()&&o.cache&&(typeof t=="string"||typeof t=="object")){let e=st.createResourceKey(o);st.addItem(e,t)}return t})},_e=o=>(o.locale&&(o.headers={...o.headers,"Accept-Language":o.locale}),o.includeContext&&(o.url=`${o.url}?includeContext=true`),Di?Ml(o):rO(o));var $n=class{_origin;_contextPath;_requestOptions;constructor(t,e,n){this._origin=t,this._contextPath=e,this._requestOptions=n}setOrigin(t){this._origin=t}setContextPath(t){this._contextPath=t}setRequestOptions(t){this._requestOptions=t}async processAsyncLayoutHints(t){Et("ALLOW_HIDE_WHEN_EMPTY_ON_TABS")&&(await this.processApplicationLinks(t),await this.processTabLinks(t)),await this.processPanelLinks(t)}async processApplicationLinks(t){let e=t.contributions?._links,n=t.data?._links;if(typeof e=="object"&&typeof n=="object"&&e!=null&&n!=null&&"tab"in e&&"tab"in n){let a=e,l=n;await Promise.all(a.tab.map(async d=>{if("components"in d){let b=l.tab.find(x=>x.name===d.name);if(typeof b?.components=="object"){let x=await this.processLinks(b.components,d.components);Array.isArray(x)&&this.replaceApplicationLinks(t,d.name,x)}}}))}}replaceApplicationLinks(t,e,n){let a=t.data?._links;a&&Array.isArray(a.tab)&&(a.tab=a.tab.map(l=>l.name===e?{...l,components:n}:l))}async processTabLinks(t){let e=t.contributions?._links;if(!e)return;let n=e;if("component"in n){let a=t.data?._links;if(Array.isArray(a?.component)){let l=await this.processLinks(a.component,n.component);Array.isArray(l)&&(a.component=l)}}}async processPanelLinks(t){let e=t.contributions?._links;if(!(!t.data||!e)&&typeof e.panel<"u"){let n=t.data._links,a=await this.processLinks(n,e.panel);t.data&&(t.data._links=a)}}dataLinksPerName(t){let e={};if(Array.isArray(t)){for(let n of t)n.name&&(e[n.name]=n);return e}return t||e}async processLinks(t,e){let n=this.dataLinksPerName(t),a=e.filter(x=>x.layouthint?.includes(jn)),l=[];for(let x of a){let D=n?.[x.name];D?.href&&l.push(this.isHiddenList(x.name,D.href))}let d=await Promise.all(l);if(Array.isArray(t))return t.filter(x=>!d.includes(x.name));let b={};for(let x in n)if(x in n&&!d.includes(x)){let D=n[x];D&&(b[x]=D)}return b}async isHiddenList(t,e){let n=Et("HIDE_WHEN_EMPTY_IGNORE_TASKS",!1);try{let a=await _e({...this._requestOptions,url:`${this._origin}${this._contextPath}${e}`});if((0,nm.isPlainObject)(a)){let l=a,[d]=Object.keys(l),{_embedded:b,actions:x}=l[d],D=b===null||Array.isArray(b)&&b.length===0,gt=x==null||n;if(D&>)return t}return""}catch{return""}}};var sm=require("immer"),K=class o{[sm.immerable]=!0;_collection;constructor(t=[]){this._collection=t}get collection(){return this._collection}set collection(t){this._collection=t}get all(){return this.collection}add(t){t instanceof o?this.collection=[...this.collection,...t.all]:Array.isArray(t)?this.collection=[...this.collection,...t]:this.collection=[...this.collection,t]}removeByIndex(t){t>-1&&(this.collection=[...this.collection.slice(0,t),...this.collection.slice(t+1)])}hasItems(){return this.length>0}isEmpty(){return!this.hasItems()}get length(){return this.collection.length}get size(){return this.length}get first(){return this.collection[0]}get last(){return this.collection[this.collection.length-1]}get(t){return this.collection[t]}find(t,e){return this.collection.find(t,e)}filter(t,e){return this.collection.filter(t,e)}some(t,e){return this.collection.some(t,e)}every(t,e){return this.collection.every(t,e)}map(t,e){return this.collection.map(t,e)}forEach(t,e){this.collection.forEach(t,e)}sort(t){return this.collection.sort(t)}get sorted(){return this.collection.sort()}clear(){this.collection=[]}};var Hm=Y(ki(),1);var Pm=Y(ki(),1);var Tt=class extends K{getInitialChildModelLinks(){let t=[];return this.collection.forEach(e=>{typeof e?.getInitialChildModelLinks=="function"&&t.push(...e.getInitialChildModelLinks())}),t}setChildModels(t,e){this.collection.forEach(n=>{typeof n.setChildModels=="function"&&n.setChildModels(t,e)})}};var zl=Y(te(),1),_a=Y(oa(),1);var om=require("@date-fns/tz/tz"),rr=require("date-fns/add"),am=require("date-fns/endOfMonth"),pa=require("date-fns/format"),um=require("date-fns/getDay"),lm=require("date-fns/getHours"),cm=require("date-fns/getMinutes"),hm=require("date-fns/getWeek"),Ol=require("date-fns/isAfter"),Dl=require("date-fns/isBefore"),pm=require("date-fns/isSameDay"),Kn=require("date-fns/isValid"),fa=require("date-fns/locale"),fm=require("date-fns/parse"),Il=require("date-fns/set"),dm=require("date-fns/startOfMonth"),mm=require("date-fns/startOfWeek"),xr=require("date-fns/sub"),gm=Y(require("timezone-soft"),1);var ha=Y(require("js-cookie"),1);var Sl=o=>ha.default.get(o),iO=(o,t,e)=>{let n={path:Ui(),expires:e?.days,sameSite:e?.sameSite??"Strict",secure:e?.secure};ha.default.set(o,t,n)},nO=o=>{ha.default.remove(o,{path:Ui()})};var qr=class{_isoFormat;_doOffsets;_timeZone=typeof Intl>"u"?"Etc/UTC":Intl.DateTimeFormat().resolvedOptions().timeZone||"Etc/UTC";constructor(t,e=!1){this._isoFormat=t,this._doOffsets=e}get doOffsets(){return this._doOffsets?Mr():!1}getOptions(){let t=Bi("CALENDAR_WEEK_STARTS_ON",Ku),e=Bi("CALENDAR_FIRST_WEEK_CONTAINS_DATE",zu);return{weekStartsOn:t>-1&&t<7?t:void 0,firstWeekContainsDate:e===1||e===4?e:void 0}}getIsoFormat(){return this.doOffsets?this._isoFormat+ke:this._isoFormat}convertFormat(t){if(!t)return this.getIsoFormat();let e={ZZZ:"xxx",ZZ:"xx",Z:"x"},n=t,a=Object.keys(e).sort((l,d)=>d.length-l.length);for(let l of a){let d=e[l],b=new RegExp(l,"g");n=n.replace(b,d)}return n}getLocale(){let t=bl()[0];return(Sl("locale")??t??"en")==="nl"?fa.nl:fa.enGB}toDate(t,e=this.getIsoFormat()){if(t instanceof Date)return t;let{weekStartsOn:n,firstWeekContainsDate:a}=this.getOptions();return(0,fm.parse)(t,e,new Date,{in:this.getDateFnsContext(),weekStartsOn:n,firstWeekContainsDate:a})}toFormat(t,e,n=this.getIsoFormat()){let{weekStartsOn:a}=this.getOptions(),l=this.toDate(t,n);return(0,Kn.isValid)(l)?(0,pa.format)(l,e,{in:this.getDateFnsContext(),weekStartsOn:a,locale:this.getLocale()}):"Invalid Date"}toISO(t,e=this.getIsoFormat()){return this.toFormat(t,this.getIsoFormat(),e)}now(){return this.toISO(new Date)}hasFormat(t,e){let n=this.toDate(t,e),a=this.toFormat(n,e);return a==="Invalid Date"||(0,Dl.isBefore)(n,new Date(1e3,1,1))||(0,Ol.isAfter)(n,new Date(9999,11,31))?!1:a.replace(/0/gu,"").toUpperCase()===t.replace(/0/gu,"").toUpperCase()}isValid(t,e=this.getIsoFormat()){if(!t)return!1;let n=this.toDate(t,e);return(0,Kn.isValid)(n)}isAfter(t,e,n=this.getIsoFormat()){return e?(0,Ol.isAfter)(this.toDate(t,n),this.toDate(e)):!1}isSameOrAfter(t,e,n=this.getIsoFormat()){return e?this.isAfter(t,e,n)||this.isSame(t,e,n):!1}isBefore(t,e,n=this.getIsoFormat()){return e?(0,Dl.isBefore)(this.toDate(t,n),this.toDate(e)):!1}isSameOrBefore(t,e,n=this.getIsoFormat()){return e?this.isBefore(t,e,n)||this.isSame(t,e,n):!1}isSame(t,e,n=this.getIsoFormat()){return e?this.toDate(t,n).getTime()===this.toDate(e).getTime():!1}isSameDay(t,e,n=this.getIsoFormat()){return e?(0,pm.isSameDay)(this.toDate(t,n),this.toDate(e,n)):!1}isOther(t,e,n=this.getIsoFormat()){return!this.isSame(t,e,n)}isWeekend(t){let a=(0,um.getDay)(this.toDate(t));return a===6||a===0}isAmbiguous(t,e=this.getIsoFormat()){if(t==null||typeof Intl>"u")return!1;let n=this.toDate(t,e);if(!(0,Kn.isValid)(n))return!1;let l=[60,-60,30,-30].map(b=>{let x=(0,rr.add)(n,{minutes:b});return(0,pa.format)(x,"HH:mm")}),d=(0,pa.format)(n,"HH:mm");return l.indexOf(d)>-1}calculate(t,e,n,a,l=this.getIsoFormat()){let d=this.toDate(t,l);return this.toISO(e(d,{[n]:a},{in:this.getDateFnsContext()}))}addSeconds(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"seconds",e,n)}addMinutes(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"minutes",e,n)}addHours(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"hours",e,n)}addDays(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"days",e,n)}addWeeks(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"weeks",e,n)}addMonths(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"months",e,n)}addYears(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"years",e,n)}subtractSeconds(t,e,n=this.getIsoFormat()){return this.calculate(t,xr.sub,"seconds",e,n)}subtractMinutes(t,e,n=this.getIsoFormat()){return this.calculate(t,xr.sub,"minutes",e,n)}subtractHours(t,e,n=this.getIsoFormat()){return this.calculate(t,xr.sub,"hours",e,n)}subtractDays(t,e,n=this.getIsoFormat()){return this.calculate(t,xr.sub,"days",e,n)}subtractWeeks(t,e,n=this.getIsoFormat()){return this.calculate(t,xr.sub,"weeks",e,n)}subtractMonths(t,e,n=this.getIsoFormat()){return this.calculate(t,xr.sub,"months",e,n)}subtractYears(t,e,n=this.getIsoFormat()){return this.calculate(t,xr.sub,"years",e,n)}get(t,e,n=this.getIsoFormat(),a={}){let l=this.toDate(t,n);return this.toISO(e(l,{in:this.getDateFnsContext(),...a}))}startOfMonth(t,e=this.getIsoFormat()){return this.get(t,dm.startOfMonth,e)}endOfMonth(t,e=this.getIsoFormat()){return this.get(t,am.endOfMonth,e)}startOfWeek(t,e=this.getIsoFormat()){let{weekStartsOn:n}=this.getOptions();return this.get(t,mm.startOfWeek,e,{weekStartsOn:n})}getHours(t,e=this.getIsoFormat()){let n=this.toDate(t,e);return(0,lm.getHours)(n,{in:this.getDateFnsContext()})}getMinutes(t,e=this.getIsoFormat()){let n=this.toDate(t,e);return(0,cm.getMinutes)(n,{in:this.getDateFnsContext()})}getWeek(t,e=this.getIsoFormat()){let{weekStartsOn:n,firstWeekContainsDate:a}=this.getOptions(),l=this.toDate(t,e);return(0,hm.getWeek)(l,{in:this.getDateFnsContext(),weekStartsOn:n,firstWeekContainsDate:a})}set(t,e,n,a=this.getIsoFormat()){let l=this.toDate(t,a);return this.toISO((0,Il.set)(l,{[e]:n}))}setYear(t,e,n=this.getIsoFormat()){return this.set(t,"year",e,n)}setMonth(t,e,n=this.getIsoFormat()){return this.set(t,"month",e,n)}setDay(t,e,n=this.getIsoFormat()){return this.set(t,"date",e,n)}setHour(t,e,n=this.getIsoFormat()){return this.set(t,"hours",e,n)}setMinute(t,e,n=this.getIsoFormat()){return this.set(t,"minutes",e,n)}setSecond(t,e,n=this.getIsoFormat()){return this.set(t,"seconds",e,n)}setMilliseconds(t,e,n=this.getIsoFormat()){return this.set(t,"milliseconds",e,n)}setTime(t,e,n,a,l,d=this.getIsoFormat()){let b=this.toDate(t,d);return this.toISO((0,Il.set)(b,{hours:e,minutes:n,seconds:a,milliseconds:l},{in:this.getDateFnsContext()}))}getTimeZone(){return this._timeZone}setTimeZone(t){this._timeZone=t}getDateFnsContext(){if(this.doOffsets&&!Di)return(0,om.tz)(this.getTimeZone())}getOffset(t,e=this.getIsoFormat()){let n=this.toDate(t,e);if((0,Kn.isValid)(n)){let a=this.toFormat(n,ke),l=this.getTimezoneOffsets();if(typeof l.daylight<"u"&&l.daylight.value===a)return l.daylight;if(typeof l.standard<"u"&&l.standard.value===a)return l.standard}return null}createOffsetObject(t){let e=t.offset<0?"-":"+",n=Math.abs(t.offset),a=Math.trunc(n),l=Math.round(n%1*60),d=`${e}${String(a+(l===60?1:0)).padStart(2,"0")}:${String(l%60).padStart(2,"0")}`;return{label:t.name,abbr:t.abbr,value:d}}getTimezoneOffsets(){let t=(0,gm.default)(this.getTimeZone());if(t.length===0)return{standard:{label:"Etc/UTC",abbr:"Etc/UTC",value:"+00:00"}};let{daylight:e,standard:n}=t[0];return e?{daylight:this.createOffsetObject(e),standard:this.createOffsetObject(n)}:{standard:this.createOffsetObject(n)}}},St=new qr(Cn),Ne=new qr(Gu,!0),ir=new qr(qu),Pe=new qr($u,!0);var ut=class extends K{constructor(t=[]){if(super(t),!Array.isArray(t))throw new P(`${t} is not an Array`)}get layouthint(){return this.collection}has(...t){return(t.length>0?[...t]:[]).flat().some(n=>this.layouthint.includes(n)||this.layouthint.some(a=>a.startsWith(n)))}hasExact(...t){return(t.length>0?[...t]:[]).flat().some(n=>this.layouthint.includes(n))}getByLayoutHint(t){let e=null;return typeof t=="function"&&(e=this.layouthint.find(t)),typeof t=="string"&&(e=this.layouthint.find(n=>n.startsWith(t.toString()))),e||null}getLayoutHintValue(t){let e=t.endsWith(":")?t.substr(0,t.length-1):t,n=this.getByLayoutHint(a=>a.startsWith(`${e}=`)||a.startsWith(`${e}:`));return n?n.substr(e.length+1):null}getLayoutHintValues(t){if(!this.has(t))return null;let e=this.getLayoutHintValue(t);return e?e.split(";"):[]}};var It=class o{_configuration;_hasConfiguration=!1;constructor(t){this._hasConfiguration=Array.isArray(t),this._configuration=t??[]}includeLayoutHints(t){let e=this._configuration.filter(n=>{let[a]=Object.keys(n),l=n[a];return l.layouthint?l.layouthint.some(d=>t.includes(d)):!1});return new o(e)}excludeLayoutHints(t){let e=this._configuration.filter(n=>{let[a]=Object.keys(n),l=n[a];return l.layouthint?!l.layouthint.some(d=>t.includes(d)):!0});return new o(e)}get config(){return this._configuration.map(t=>{let[e]=Object.keys(t),n=t[e],a=[];return"labelTypes"in n?a=n.labelTypes:"propertyTypes"in n?a=n.propertyTypes:"sectionReferenceTypes"in n?a=n.sectionReferenceTypes:"textFragmentTypes"in n&&(a=n.textFragmentTypes),{type:e,label:n.label,types:a,layouthint:new ut(n.layouthint),icon:"icon"in n?n.icon:""}})}hasConfig(){return this._hasConfiguration}hasContent(){return this.config.some(t=>t.type==="configElement")}hasLayoutHint(t){return this.config.some(e=>e.layouthint.has(t))}byTypes(t=[]){return!t||t.length===0?this.config:this.config.filter(e=>t.includes(e.type))}get labelConfig(){return this.config.filter(t=>t.type==="labelElement")}getAllSectionReferenceTypes(){return this.config.filter(t=>t.type==="contentElement").flatMap(t=>t.types)}getContentElementConfigBySectionReferenceType(t){return this.config.filter(e=>e.type==="contentElement"&&e.types.includes(t))}getContentConfiguredLabel(t,e=""){let n=this.labelConfig.length>0?this.labelConfig[0].types:[];if(t&&n.length>0){let a=t.getLabelElementByIds(n).filter(l=>l.value&&l.value!=="");if(a.length>0){let l=n.filter(d=>(a.some(b=>d===b._id),!1)).map(d=>a.find(x=>x._id===d));if(l.length>0&&l[0]!==void 0)return l[0].value}}return e}get hasContentFromData(){return er()}};var ym=require("immer"),bm=require("klona/full"),da=Y(te(),1);var q=class{static[ym.immerable]=!0;_data;_contributions;_layouthint;_modelOptions;constructor(t,e,n={origin:"",contextPath:ot()}){typeof t=="object"&&t!=null?this._data=t:this._data={},typeof e=="object"&&e!=null?this._contributions=e:this._contributions={},this._modelOptions=n;let a=this.getContributionAsArray("layouthint",[]);this._layouthint=new ut(a)}get data(){return this._data}replaceData(t){this._data=t}get contributions(){return this._contributions}get modelOptions(){return this._modelOptions}get origin(){return this._modelOptions.origin}get contextPath(){return this._modelOptions.contextPath}get layouthint(){return this._layouthint}getData(t,e){return e?(0,da.get)(this.data,t,e):(0,da.get)(this.data,t)}getDataAsString(t,e){let n=this.getData(t,e);return typeof n=="string"?n:e}getDataAsNumber(t,e){let n=this.getData(t,e);return typeof n=="number"?n:e}getDataAsBoolean(t,e){let n=this.getData(t,e);return typeof n=="boolean"?n:e}getDataAsArray(t,e){let n=this.getData(t,e);return Array.isArray(n)?n:e}getDataAsObject(t,e){let n=this.getData(t,e);return typeof n=="object"?n:e}getContribution(t,e){return(0,da.get)(this.contributions,t,e)}getContributionAsArray(t,e){let n=this.getContribution(t,e);return Array.isArray(n)?n:e}getContributionAsObject(t,e){let n=this.getContribution(t,e);return typeof n=="object"?n:e}getContributionAsString(t,e){let n=this.getContribution(t,e);return typeof n=="string"?n:e}getContributionAsBoolean(t,e){let n=this.getContribution(t,e);return typeof n=="boolean"?n:e}getContributionAsNumber(t,e){let n=this.getContribution(t,e);return typeof n=="number"?n:e}hasData(){return Object.keys(this.data).length>0}clone(){return(0,bm.klona)(this)}};var Cm=require("immer"),Rl=Y(ki(),1);var Pt=class o{[Cm.immerable]=!0;_key;_data;_contributions;_locale="en";_parameters;_origin;_contextPath=ot();_requestHref;constructor(t,e,n,a){this._key=t??"unknown",this._data=e,this._contributions=n,this._locale=a??"en"}static create(t){let e=new o;if((0,Rl.default)(t,"data")&&(0,Rl.default)(t,"contributions")){let[n]=Object.keys(t.data),[a]=Object.keys(t.contributions);e.key=t.key??a,e.data=t.data?.[n],e.contributions=t.contributions?.[a],e.origin=t.origin,e.contextPath=t.contextPath}return e}get resourcetype(){let t=this.contributions?.resourcetype;return typeof t=="string"?t:""}get modelOptions(){return{origin:this.origin,contextPath:this.contextPath}}set origin(t){this._origin=t??""}get origin(){return this._origin}set contextPath(t){this._contextPath=t??ot()}get contextPath(){return this._contextPath}set locale(t){this._locale=t}get locale(){return this._locale}set key(t){this._key=t}get key(){return this._key}set data(t){this._data=t}get data(){return this._data}set contributions(t){this._contributions=t}get contributions(){return this._contributions}set parameters(t){this._parameters=t}get parameters(){return this._parameters}set requestHref(t){this._requestHref=t}get requestHref(){return this._requestHref}static rehydrate(t){let e=new o;return e.origin=t.origin,e.contextPath=t.contextPath,e.locale=t.locale,e.key=t.key,e.data=t.data,e.contributions=t.contributions,e}};var Am=require("immer");var _m=require("immer");var qt=class o{[_m.immerable]=!0;_prefix;_name;_value;_isModUIParameter=!1;constructor(t,e,n){this._prefix=t,this._name=e??"",n!==null&&(this._value=typeof n=="string"?decodeURIComponent(n):n),e&&this.setIsModUIParameter(e)}get prefix(){return this._prefix}get name(){return this._name}get value(){return this._value}static fromString(t){if(t==null||t===""||!t.includes("="))return new o;let e=t.substring(0,t.indexOf("=")),n=t.substring(t.indexOf("=")+1);return o.fromURLSearchParam(e,n)}static fromURLSearchParam(t,e){let n,a=decodeURIComponent(t);return a.includes(Ur)&&(n=a.substring(0,a.indexOf("~")),a=a.substring(a.indexOf("~")+1)),a===""?null:new o(n,a,e)}toString(t=!0){if(!this.name)return"";let e=this.value==null?"":this.value;return t&&this.prefix?`${this.prefix}${Ur}${this.name}=${e}`:`${this.name}=${e}`}toQuerystring(t=!0){let e=this.value==null?"":this.paramValueToQuerystring(this.value);return t&&this.prefix?`${this.prefix}${Ur}${this.name}=${e}`:`${this.name}=${e}`}paramValueToQuerystring(t){return typeof t=="number"||typeof t=="string"||typeof t=="boolean"?encodeURIComponent(t):Array.isArray(t)?t.filter(e=>e!=null).map(e=>this.paramValueToQuerystring(e)).join(","):JSON.stringify(t)}get isModUIParameter(){return this._isModUIParameter}setIsModUIParameter(t){let e=Gt("UI_PARAMETERS",[]);Array.isArray(e)&&(this._isModUIParameter=!e.includes(t))}};var Ae=class o extends K{static fromSearch(t){let e=new o;return new URLSearchParams(t).forEach((a,l)=>{let d=qt.fromURLSearchParam(l,a);d&&e.add(d)}),e}static fromUrl(t){let e=new o;return t.includes("?")&&t.split("?")[1].split("&").forEach(n=>{let a=qt.fromString(n);a&&e.add(a)}),e}asQuerystring(t=!1){return this.collection.filter(e=>e.value!=null&&e.value!=="").map(e=>e.toQuerystring(t)).join("&")}asQueryStringForModularUI(t=""){return this.collection.filter(e=>e.isModUIParameter&&(!t||!e.prefix||e.prefix===t)&&e.value!=null&&e.value!=="").map(e=>e.toQuerystring(!1)).join("&")}removeParameter(t,e,n){if(n==null)this.collection=this.collection.filter(a=>a.prefix!==e||a.name!==t);else{let a=n;this.collection=this.collection.map(l=>{if(l.prefix===e&&l.name===t){let d;return typeof l.value=="string"?d=l.value.split(",").filter(b=>b!==a).join(","):d=l.value===n?null:n,new qt(l.prefix,l.name,d)}return l})}return this}};var U=class o{[Am.immerable]=!0;_origin="";_contextPath=ot();_path="";_hash="";_parameters=new Ae;_resourcetype;_method="GET";_state;_referenceHash;constructor(t,e,n){this._resourcetype=e??"",typeof t=="string"?this.initializeFromString(t):t instanceof o?this.initializeFromHref(t):t&&this.initializeFromLocation(t),typeof n?.origin=="string"&&(this.origin=n.origin),typeof n?.contextPath=="string"&&(this.contextPath=n.contextPath)}initializeFromString(t){this._path=o.getPathFromString(t),this._parameters=Ae.fromUrl(t),this._hash=o.getHashFromString(t)}initializeFromHref(t){this._origin=t.origin,this._contextPath=t.contextPath,this._path=t.path,this._parameters=t.parameters,this._hash=t.hash,this._state=t.state}initializeFromLocation(t){this._path=t.pathname??"",this._parameters=Ae.fromSearch(t.search),this._hash=t.hash??"",this.initializeStateFromLocation(t)}initializeStateFromLocation(t){t.state instanceof Object&&(this._state=t.state,this._origin="origin"in t.state&&typeof t.state.origin=="string"?t.state.origin:"",this._contextPath="contextPath"in t.state&&typeof t.state.contextPath=="string"?t.state.contextPath:"")}get key(){return Math.random().toString(36).substring(2,10)}get origin(){return this._origin}set origin(t){this._origin=t}get contextPath(){return this._contextPath}set contextPath(t){this._contextPath=t}get path(){return this._path||""}set path(t){this._path=t}get parameters(){return this._parameters}set parameters(t){this._parameters=t}get hash(){return this._hash}set hash(t){this._hash=t}get state(){return this._state}set state(t){this._state=t}setState(t){return this.state=t,this}set formdata(t){let e=this.state??{};this.state={...e,formdata:t}}get formdata(){return this.state?.formdata}get method(){return this._method}set method(t){this._method=t||"GET"}set resourcetype(t){this._resourcetype=t}get resourcetype(){return this._resourcetype}get isChangePassword(){return this.path.includes("/change-password")}get isExternal(){return o.checkAbsoluteUrl(this.path)}addParametersFromString(t){return t.includes("?")&&t.split("?")[1].split("&").forEach(e=>{let n=qt.fromString(e);n&&this.setParameter(n.name,n.value,n.prefix)}),this}addParameter(t,e,n){return e!==null&&(this.parameters.removeParameter(t,n),this.parameters.add(new qt(n,t,e))),this}setParameter(t,e,n){return e==null?this.parameters.removeParameter(t,n):this.addParameter(t,e,n),this}removeParameter(t,e,n){return this.parameters.removeParameter(t,e,n),this}getParameter(t,e){return this.parameters.find(n=>n.prefix===e&&n.name===t)}hasParameter(t,e){return this.getParameter(t,e)!==void 0}getQuerystring(t=!1){return this.parameters.asQuerystring(t)}getQuerystringForModularUI(t=""){return this.parameters.asQueryStringForModularUI(t)}get querystring(){return this.parameters.asQuerystring(!1)}get publicQuerystring(){return this.getQuerystring(!0)}get absolutepath(){return this.isExternal?this.path:this.origin+this.contextPath+this.path}get href(){return this.querystring.length>0?[this.path,this.querystring].join("?"):this.path}get absolutehref(){let t=this.getQuerystring(!1);return t.length>0?[this.absolutepath,t].join("?"):this.absolutepath}get absolutehrefPrefixedQuerystring(){let t=this.getQuerystring(!0);return t.length>0?[this.absolutepath,t].join("?"):this.absolutepath}startsWith(t){let e=`${this.path}/`,n=t instanceof o?`${t.path}/`:t;return e.startsWith(n)}equals(t){return t instanceof o?this.path===t.path:this.path===t}equalsWithParameters(t){if(t==null)return!1;let e=t instanceof o?t:new o(t);if(!this.equals(e)||this.parameters.length!==e.parameters.length)return!1;if(this.parameters.length===0&&e.parameters.length===0)return!0;let n=this.parameters.map(a=>a.toString());return e.parameters.every(a=>n.includes(a.toString()))}get isContent(){return this.absolutepath.startsWith(vl())}getReferenceHash(){return this._referenceHash}setReferenceHash(t){this._referenceHash=t}toString(){return this.href}toLocation(){let t=this.state instanceof Object?this.state:{};return{key:this.key,pathname:this.path,search:this.publicQuerystring.length>0?`?${this.publicQuerystring}`:"",hash:this.hash.length>0?`#${this.hash}`:"",state:{origin:this.origin,contextPath:this.contextPath,...t}}}static getPathFromString(t){return t.split("#")[0].split("?")[0]}static getHashFromString(t){return t.includes("#")?t.substring(t.indexOf("#")+1):""}static isCamelRoute(t){return t.startsWith("/restServices")&&!t.startsWith("/restServices/ui")}static checkAbsoluteUrl(t){return new RegExp("^(?:[a-z]+:)?//","i").test(t)}};var $r=class extends q{get concequenceType(){return this.getContributionAsString("consequenceType","").toLowerCase()}get transition(){return this.getContributionAsString("transition","").toLowerCase()}get isApplicable(){return this.getDataAsBoolean("applicable",!1)}get isCompleted(){return this.getDataAsBoolean("completed",!1)}get isNeeded(){let t=this.getDataAsString("needed","unknown");return t==="unknown"?null:t==="true"}get state(){return this.getDataAsString("state","")}get canComplete(){return this.getDataAsBoolean("canComplete",!0)}get links(){return ct.create(this.contributions,null,"process-status",this.modelOptions)}get referenceDate(){return St.now()}get conceptLink(){let t=this.links.getLinkByKey("concept");return t&&(t.href=t.href.addParameter(et,this.referenceDate),t.isCacheable=!0),t}};var ve=class o extends q{_href;_icon;_targetModel;_isCacheable=!1;_method="GET";constructor(t,e,n){super(t,e,n),this._href=this.createHref()}static create(t,e,n,a){return new o({name:t,href:e.toString()},{name:t,label:n},a)}createHref(){let t=new U(this.getDataAsString("href",""),this.resourcetype,this.modelOptions);return this.handleInitialFilters(t),t}handleInitialFilters(t){if(this.layouthint.has(Wn)){let e={},n=Wn.length;for(let a of this.layouthint.filter(l=>l.startsWith(Wn))){let l=a.substring(n),d=qt.fromString(l);d&&(e[d.name]||(e[d.name]=[]),typeof d.value=="string"&&e[d.name].push(d.value))}Object.keys(e).forEach(a=>{let l=e[a].join(",");t.addParameter(a,l)})}}get key(){return this.getDataAsString("name","")}get label(){return this.getContributionAsString("label",this.key)}get resourcetype(){return this.getContributionAsString("resourcetype","")}get group(){return this.getContributionAsString("group",this.getDataAsString("group",""))}get href(){return this._href}set href(t){this._href=t}get method(){return this._method}set method(t){this._method=t}get links(){return"components"in this.data&&"components"in this.contributions?new ct({components:this.data.components},{components:this.contributions.components}):new ct}isActive(t){return t.href.startsWith(this.href)}set icon(t){this._icon=t}get icon(){return this._icon}get targetModel(){return this._targetModel}set targetModel(t){this._targetModel=t}get isCacheable(){return this._isCacheable}set isCacheable(t){this._isCacheable=t}get filterName(){let t=this.getDataAsObject("filter");if(t&&"name"in t&&typeof t.name=="string")return t.name}get hasProcessStatusSettings(){return"processStatus"in this.data&&"processStatus"in this.contributions}get processStatus(){if(this.hasProcessStatusSettings)return new $r(this.data.processStatus,this.contributions.processStatus)}};var Ll=(o,t)=>{if(!o&&!t)return[];let e=[];if(o){let n=o;for(let a of Object.keys(n)){let l=n[a];if(Array.isArray(l))for(let d of l)e.push({data:{group:a,...d},contributions:{name:d.name}});else e.push({data:{name:a,group:a,...l},contributions:{name:a}})}}if(t){let n=t;for(let a of Object.keys(n)){let l=n[a];if(Array.isArray(l))for(let d of l){let b=e.findIndex(x=>x.data?.name===d.name);b>-1&&(e[b]={...e[b],contributions:{...d,group:a}})}else{let d=e.findIndex(b=>b.data?.name===a);d>-1?e[d]={...e[d],contributions:{name:a,...l}}:"href"in l&&e.push({data:{name:a,href:l.href},contributions:{name:a}})}}}return e};var ct=class o extends K{constructor(t,e,n){super();let a=Ll(t,e);this.collection=a.filter(l=>!l.contributions.layouthint?.includes(yl)).map(l=>new ve(l.data,l.contributions,n))}static create(t,e,n,a){let l="_links"in t?t._links:null,d=typeof e=="object"&&e!==null&&"_links"in e&&typeof e._links=="object"?{...e._links}:{};return new o(Array.isArray(l)?l[0]:l,{self:{resourcetype:n},...d},a)}get links(){return this.collection}set links(t){this.collection=t}getLinkByKey(t){return this.find(e=>e.key===t)}hasLinkByKey(t){return this.all.some(e=>e.key===t)}getLinkByHref(t){return this.find(e=>e.href.equals(t))}getLinksByGroup(...t){let e=t.length>0?[...t]:[],n=this.filter(l=>e.includes(l.group)),a=new o;return a.links=n,a}getLinkByResourceType(t){let e=new o;return e.collection=this.filter(n=>n.resourcetype===t),e}getLinksByLayoutHint(t){let e=new o;return e.collection=this.filter(n=>n.layouthint.has(t)),e}hasLinksByLayoutHint(t){return this.some(e=>e.layouthint.has(t))}toHrefArray(){return this.map(t=>t.href)}hasLink(t){return this.some(e=>e.href.equals(t.href))}update(t){let e=this.links.findIndex(n=>n.key===t.key);return e===-1?(this.collection=[...this.collection,t],this):(this.collection=[...this.links.slice(0,e),t,...this.links.slice(e+1)],this)}get routePath(){if(this.length===0)return"__NON_EXISTING_ROUTE__";let t=this.map(e=>e.href.path).join("|");return this.length>1?`(${t})`:t}};var F=class extends q{_key;_locale;_lastServerUpdate;_links;_childModels=[];_modularuiResponse;_connectKey;constructor(t=new Pt){super(t.data,t.contributions,t.modelOptions),this._modularuiResponse=t,this._key=t.key,this._locale=t.locale,this._lastServerUpdate=Date.now(),this._links=ct.create(this.data,this.contributions,this.resourcetype,this.modelOptions)}get modularuiResponse(){return this._modularuiResponse}set connectKey(t){this._connectKey=t}get connectKey(){return this._connectKey}get lastServerUpdate(){return this._lastServerUpdate}set lastServerUpdate(t){this._lastServerUpdate=t}get locale(){return this._locale}get key(){return this._key}set key(t){this._key=t}get resourcetype(){return this.getContributionAsString("resourcetype","unknown")}get label(){return this.getContributionAsString("label","")}get links(){return this._links}get selflink(){let t=this.links.getLinkByKey("self");if(t==null)throw new J(`Could not find self link for ${this.key===null?"unknown":this.key}`);return t}get selfhref(){return this.selflink?.href}getInitialChildModelLinks(){return[]}get childModels(){return this._childModels}addChildModels(t=[],e=[]){let n=t?.flat(),a=e?.flat();return this._childModels=n,this.setChildModels(n,a),this}setChildModels(t,e){if(!t&&!e)throw new P("No models send to setChildModels")}};var He=class extends F{get type(){return"ConceptTypeDetail"}get key(){return this.getDataAsString("_id","concepttype")}get label(){return this.getDataAsString("label","")}get isCoreTaxonomy(){return this.getDataAsBoolean("coreTaxonomy",!1)}get icon(){return this.getDataAsString("icon","")}get textColor(){return this.getDataAsString("textColor","#000")}get backgroundColor(){return this.getDataAsString("backgroundColor","#fff")}get borderColor(){return this.getDataAsString("lineColor","#000")}get labelTypes(){return this.getDataAsArray("labelTypes")||[]}get propertyTypes(){return this.getDataAsArray("propertyTypes")||[]}get textFragmentTypes(){return this.getDataAsArray("textFragmentTypes")||[]}get sectionReferenceTypes(){return this.getDataAsArray("sectionReferenceTypes")||[]}isOfConceptType(t){return this.selfhref?.equals(t)}};var Kr=class extends q{_entryDate;_links;_conceptType;constructor(t,e,n){super(t,{},n),this._entryDate=e,this._links=ct.create(t??{},null,"concept",this.modelOptions)}get type(){return"ConceptLinkModel"}getInitialChildModelLinks(){return this.conceptTypeLink?(this.conceptTypeLink.isCacheable=!0,[this.conceptTypeLink]):[]}setChildModels(t,e){if(this.conceptTypeLink){let n=this.conceptTypeLink.href,a=t.find(l=>l instanceof He?l.selfhref?.equalsWithParameters(n):!1);this.conceptType=a}}get conceptType(){return this._conceptType}set conceptType(t){this._conceptType=t}get key(){return this.getDataAsString("_id","")}get label(){let t=this.getDataAsString("label");return t||this.getDataAsString("conceptLabel","")}get links(){return this._links}get selflink(){let t=this.links.getLinkByKey("self");if(t===null)throw new Error(`Could not find self link for ${this.key===null?"unknown":this.key}`);return t}get selfhref(){return this._entryDate?this.selflink?.href.addParameter(et,this._entryDate):this.selflink?.href}get conceptTypeLink(){return this.links.getLinkByKey("concepttype")}get concepttypeHref(){return this.conceptTypeLink?.href??null}get taxonomyType(){return"default"}get modelCategory(){return this.getDataAsString("modelCategory")}get sectionId(){return this.data.section?._id}get fragment(){return this.data.section?.fragment}asLinkModel(){let t=ve.create(this.key,"",this.label,this.modelOptions);return this.selfhref&&(t.href=this.selfhref),t}};var zr=class extends q{_concept;constructor(t,e,n){super(t,void 0,n),this._concept=new Kr(t?.concept,e,this.modelOptions)}get selfhref(){throw new Error("Method not implemented.")}getInitialChildModelLinks(){return this.concept.getInitialChildModelLinks()}setChildModels(t,e){this.concept.setChildModels(t,e)}get type(){return this.getDataAsString("relationType","")}get key(){return this.type}get label(){return this.getDataAsString("relationLabel")}get direction(){return this.getDataAsString("relationDirection")}get relationTypeType(){return this.getDataAsString("relationTypeType","None")}get condition(){return this.getDataAsString("relationCondition")}get properties(){return this.getDataAsArray("properties")}get textfragments(){return this.getDataAsArray("textFragments")}get concept(){return this._concept}set concept(t){this._concept=t}};var zn=class o extends Tt{_entryDate;_modelOptions;constructor(t,e,n){super(),this._entryDate=e,this._modelOptions=n||{origin:"",contextPath:ot()},t&&this.createCollection(t,e)}createCollection(t,e){Array.isArray(t)?t.forEach(n=>{n instanceof zr?this.add(n):this.add(new zr(n,e,this._modelOptions))}):this.add(new zr(t,e,this._modelOptions))}get types(){return this.collection.filter((t,e,n)=>n.findIndex(a=>a.key===t.key)===e).map(t=>({key:t.key,label:t.label}))}byType(t){return new o(this.filter(e=>e.key===t),this._entryDate,this._modelOptions)}get incoming(){return new o(this.filter(t=>t.direction==="incoming"),this._entryDate,this._modelOptions)}get outgoing(){return new o(this.filter(t=>t.direction==="outgoing"),this._entryDate,this._modelOptions)}hasIncoming(){return this.incoming.length>0}hasOutgoing(){return this.outgoing.length>0}};var ma=require("hash-it"),sO=o=>(0,ma.hash)(o),Xr=(o,t)=>{if(o==null)return 0;let e=o.hash?[o.toString(),o.hash].join("#"):o.toString();return t?(0,ma.hash)({hrefString:e,fragment:t}):(0,ma.hash)(e)};var pe=class extends F{get type(){return"ContentType"}get label(){return this.getDataAsString("label","")}get icon(){return this.iconLarge}get iconSmall(){return this.getDataAsString("iconSmall")}get iconMedium(){return this.getDataAsString("iconMedium")}get iconLarge(){return this.getDataAsString("iconLarge")}get description(){return this.getDataAsString("description")}};var Ht=class extends q{_links;_entryDate;_contentType;_items;constructor(t,e,n){super(t,{},n),this._entryDate=e,this._links=ct.create(this.data,this.contributions,"content",this.modelOptions),this._items=[]}get type(){return"ContentLinkModel"}getInitialChildModelLinks(){return this.contentTypeLink?(this.contentTypeLink.isCacheable=!0,[this.contentTypeLink]):[]}setChildModels(t,e){if(this.contentTypeLink){let n=this.contentTypeLink.href;this.contentType=t.find(a=>a instanceof pe?a.selfhref?.equalsWithParameters(n):!1)}}get contentType(){return this._contentType}set contentType(t){this._contentType=t instanceof pe?t:void 0}set entryDate(t){this._entryDate=t}get key(){return this.getDataAsString("_id","")}get label(){return this.getDataAsString("label","")}get sourceLabel(){return this.getDataAsString("sourceLabel")}get abbreviation(){return this.getDataAsString("abbreviation")||this.getDataAsString("sourceAbbreviation")}get section(){return this.data.section}get encodedHref(){let t="/content/",e=new U(this.selfhref.path,"",this.modelOptions),n=e.path,a=this.section?n.substring(t.length,n.lastIndexOf("/")):n.substring(t.length);if(this.section!=null){let l=encodeURIComponent(this.section);e.path=`${t}${encodeURIComponent(a)}/${l}`}else e.path=`${t}${encodeURIComponent(a)}`;return this._entryDate!==null&&e.addParameter(et,this._entryDate),e}get links(){return this._links}get selflink(){let t=this.links.getLinkByKey("self");if(Gt("COMPLETE_SOURCE",!1)&&(this.links.hasLinkByKey("content")&&(t=this.links.getLinkByKey("content")),this.section!=null&&t&&!t.href.path.endsWith(encodeURIComponent(this.section))&&(t.href.addParameter("complete","true"),t.href.hash=this.section||"")),!t)throw new Error(`Could not find self link for '${this.key||"unknown"}'`);return t.href.state?t.href.state.fragment=this.fragment:t.href.state={fragment:this.fragment},t}get contentHref(){let t=this.data._links.self.href;if(this.data._links.content)t=this.data._links.content.href;else if(this.section){let e=encodeURIComponent(this.section);t.endsWith(e)&&(t=t.substring(0,t.lastIndexOf("/"+e)))}return new U(t).addParameter("complete","true").addParameter(et,this._entryDate)}get sectionHref(){if(this.section){let e=this.contentHref;return new U(e.path+"/"+encodeURIComponent(this.section)).addParameter(et,this._entryDate)}return null}get selfhref(){return this._entryDate?this.selflink.href.addParameter(et,this._entryDate):this.selflink.href}get subSectionID(){return this.selfhref.hash}get contentTypeLink(){return this.links.getLinkByKey("contenttype")}get contentTypeHref(){return this.contentTypeLink?.href}get fragment(){return this.data.sectionFragment}set items(t){this._items=t}get items(){return this._items}};var ji=class extends q{_entryDate;_links;constructor(t,e,n){super(t,void 0,n),this._links=ct.create(this.data,null,"concept",this.modelOptions),this._entryDate=e}get links(){return this._links}get link(){let t=this.selfhref?.path,e=this.links.getLinkByKey("content")?.href.path;if(t&&e)return new Ht({...this.data,label:this.label,section:this.sectionId,sectionFragment:this.fragment},this._entryDate,this.modelOptions)}get selflink(){return this.links.getLinkByKey("self")}get selfhref(){return this.selflink?.href}get type(){return this.getDataAsString("type","")}get typeLabel(){return this.getDataAsString("typeLabel","")}get label(){return this.getDataAsString("label")}get sourceLabel(){return this.getDataAsString("sourceLabel")}get sourceAbbreviation(){return this.getDataAsString("sourceAbbreviation")}get referenceHash(){if(this.selfhref)return Xr(this.selfhref)}get number(){return this.getDataAsString("number")}get sectionId(){return this.getDataAsString("sectionId")}get fragment(){return this.getDataAsObject("sectionFragment")}};var Xn=class extends K{constructor(t,e=[],n,a){super(),this.collection=this.createSourceReferences(t||[],n),this.collection=t?t.map(l=>{let d=e.find(b=>b._id===l.type);return new ji({typeLabel:d?.label,...l},n,a)}):[]}createSourceReferences(t,e){return t.map(n=>new ji(n,e))}byTypes(t){return this.filter(e=>t.includes(e.type))}};var Me=class extends F{_conceptType;_relations;_sourceReferences;constructor(t){super(t),this._relations=new zn(this.data.relations,this.entryDate,this.modelOptions)}get type(){return"ConceptDetail"}getInitialChildModelLinks(){let t=this.links.getLinkByKey("concepttype"),e=this.relationsCollection.getInitialChildModelLinks();return t?(t.isCacheable=!0,[t,...e]):e}setChildModels(t,e){let n=t.find(a=>a instanceof He);n instanceof He&&(this.conceptType=n),this.relationsCollection.setChildModels(t,e)}get key(){return this.getDataAsString("_id","concept")}get selfhref(){let{href:t}=this.selflink;return this.entryDate?t.setParameter(et,this.entryDate):t.removeParameter(et),t}get diagramLinks(){return this.links.getLinksByGroup("diagram")}get conceptType(){return this._conceptType}set conceptType(t){this._conceptType=t}get label(){return this.getDataAsString("conceptLabel","")}get modelCategory(){return this.getDataAsString("modelCategory","")}get taxonomyType(){return this.getDataAsString("taxonomyType")}get relationsCollection(){return this._relations}get formula(){return this.getDataAsString("formula")}get labels(){if(this.conceptType?.labelTypes){let t=this.getDataAsArray("labels",[]);return this.conceptType.labelTypes.map(e=>{let n=t.find(a=>a.type===e._id);return{...e,...n}})}return[]}getLabelElementByIds(t){return this.labels.filter(e=>t.includes(e._id))}get conceptProperties(){if(this.conceptType?.propertyTypes){let t=this.getDataAsArray("properties",[]);return this.conceptType.propertyTypes.map(e=>{let n=t.find(a=>a.type===e._id);return{...e,...n}})}return[]}getConceptPropertiesByIds(t){return this.conceptProperties.filter(e=>t.includes(e._id))}get textfragments(){let t=this.getDataAsArray("textFragments",[]),e=t.map(a=>({...this.conceptType?.textFragmentTypes.find(d=>a.type===d._id),...a})),n=this.conceptType?.textFragmentTypes?this.conceptType.textFragmentTypes.filter(a=>!t.some(l=>l.type===a._id)):[];return[...e,...n]}getTextFragmentByKeys(t){return this.textfragments.filter(e=>"type"in e&&typeof e.type=="string"&&t.includes(e.type))}getSourceReferenceCollection(t=[]){if(!this._sourceReferences){let e=[];this.conceptType&&this.conceptType.sectionReferenceTypes&&(e=this.conceptType.sectionReferenceTypes),this._sourceReferences=new Xn(this.getSourceReferencesForCurrentLanguage(t),e,this.entryDate,this.modelOptions)}return this._sourceReferences}getSourceReferencesForCurrentLanguage(t){let e=this.getDataAsArray("sourceReferences",[]);if(e.length===0)return[];let n=3,a=e.map(b=>b.type.substring(b.type.length-n)),l=`_${this.locale}`;if(a.includes(l))return e.filter(b=>b.type.endsWith(l));let d=t.map(b=>`_${b.split("-")[0]}`);return e.filter(b=>{let x=b.type.substring(b.type.length-n);return!d.includes(x)})}get entryDate(){return this.getDataAsString(`filter.${et}.value`)}isOfConceptType(t){return this.conceptType?.isOfConceptType(t)??!1}};var vm=require("immer");var Jr=class{[vm.immerable]=!0;_id;_defaultMessage;_parameters;_isClientConstraint;_layouthint;constructor(t,e,n,a=!1,l=new ut){this._id=t,this._parameters=n,this._defaultMessage=e,this._isClientConstraint=a,this._layouthint=Array.isArray(l)?new ut(l):l}get id(){return this._id}get defaultMessage(){return this._defaultMessage}get parameters(){return this._parameters}get isClientConstraint(){return this._isClientConstraint??!1}get layouthint(){return this._layouthint}get isMandatoryConstraint(){return this.id==="Constraint.Mandatory"}getMessage(){return{id:this.id,defaultMessage:this.defaultMessage??"",parameters:this.parameters??{}}}};var Jn=(a=>(a[a.FORM=0]="FORM",a[a.FORMOBJECT=1]="FORMOBJECT",a[a.ATTRIBUTE=2]="ATTRIBUTE",a[a.COMPOSITE_CHILDREN=3]="COMPOSITE_CHILDREN",a))(Jn||{}),fe=class extends K{_type;constructor(t,e){super(),this._type=t,this.collection=[],e&&(this.collection=[...e.collection])}get type(){return this._type}get serverErrors(){return this.collection.filter(t=>!t.isClientConstraint)}findById(t){return this.collection.findIndex(e=>e.id===t)}addError(t,e,n,a){let l=this.findById(t);l>-1&&this.removeByIndex(l),this.add(new Jr(t,e,n,!1,a))}removeError(t){let e=this.findById(t);this.removeByIndex(e)}addServerError(t,e,n,a){n?this.addError(t,e,n,a):this.addError(t,e,void 0,a)}removeServerError(t){this.removeError(t)}removeServerErrors(){this.serverErrors.forEach(t=>{this.removeError(t.id)})}addErrors(t){this.collection=[...this.collection,...t]}addConstraints(t){this.collection=[...this.collection,...t.map(e=>new Jr(e.id,e.defaultMessage,e.parameters,!0))]}hasMandatoryError(){return this.collection.some(t=>t.isMandatoryConstraint)}};var Mm=require("immer");var Yr=o=>{if(typeof o=="string")return o;if(typeof o=="object"&&"message"in o&&typeof o.message=="string")return o.message};var Yn=class o extends q{_entryDate;_links;constructor(t,e,n){super(t,{},n),this._entryDate=e,this._links=ct.create(this.data,this.contributions,"subsection",this.modelOptions)}get referred(){return this.getDataAsBoolean("referred",!1)}get id(){return"id"in this.data?this.getDataAsString("id"):this.getDataAsString("_id")}get key(){return this.id}get body(){return Yr(this.data.body)}get number(){return this.getDataAsString("number")}get label(){return this.getDataAsString("label","")}get subSections(){return this.data.subSections?this.data.subSections.map(t=>new o(t,this.entryDate,this.modelOptions)):[]}get links(){return this._links}get selflink(){return this.links.getLinkByKey("self")}get selfhref(){return this.selflink?.href}get entryDate(){return this._entryDate}get relatedConceptsHrefs(){let t=[];return this.relatedConceptsHref&&t.push(this.relatedConceptsHref),this.subSections.forEach(e=>{t.push(...e.relatedConceptsHrefs)}),t}get relatedConceptsHref(){let t=this.links.getLinkByKey("relatedConcepts");if(t){let{href:e}=t;if(e.hash.includes("/relatedConcepts")){let n=e.path.substring(0,e.path.lastIndexOf("/"));e.path=n+"/"+e.hash,e.hash=e.hash.includes("#")?e.hash.substring(e.hash.indexOf("#")):""}return e.addParameter("entryDate",this.entryDate),e.setReferenceHash(this.referenceHash),e}}get referenceHash(){return Xr(this.selfhref)}getReferredSections(){let t=[];for(let e of this.subSections){e.referred&&t.push(e);let n=e.getReferredSections();t.push(...n)}return t}};var xe=class o extends q{_entryDate;_selflink;_childSections;constructor(t,e,n){super(t,{},n),this._entryDate=e,this._selflink=this.createSelfLink(),this._childSections=this.createChildSections()}get referred(){return this.getDataAsBoolean("referred",!1)}get selflink(){return this._selflink}createSelfLink(){let t=this.getDataAsString("_links.self.href");if(typeof t<"u")return ve.create(this.key||"unknown",t,this.label,this.modelOptions)}get selfhref(){return this.selflink?.href}get entryDate(){return this._entryDate}get type(){return this.getDataAsString("type")}get sourceLabel(){return this.getDataAsString("sourceLabel")}get id(){let t=this.getDataAsString("id");return t||this.getDataAsString("_id","unknown")}get key(){return this.id}get label(){return this.getDataAsString("label","")}get number(){return this.getDataAsString("number")}get body(){let t=this.data.body;if(t)return Yr(t)}get childSectionLinks(){let t=[];return this.data.childSections?t=this.data.childSections:this.data.sections&&(t=this.data.sections),t.map(e=>{let n=e.id||e._id,a=e._links;return new Ht({section:n,_id:n,label:e.label,sourceLabel:e.sourceLabel,_links:a},this.entryDate,this.modelOptions)})}get selfContentLink(){let t=this.data._links;return new Ht({section:this.id,_id:this.id,label:this.label,sourceLabel:this.sourceLabel,_links:t},this.entryDate,this.modelOptions)}createChildSections(){let t=[];return this.data.childSections?t=this.data.childSections:this.data.sections&&(t=this.data.sections),t.filter(e=>"body"in e).map(e=>new o(e,this.entryDate,this.modelOptions))}get childSections(){return this._childSections}set childSections(t){this._childSections=t||[]}get sections(){return this.data.sections?this.data.sections.map(t=>new o(t,this.entryDate,this.modelOptions)):[]}get subSections(){return Array.isArray(this.data.subSections)?this.data.subSections.map(t=>new Yn(t,this.entryDate,this.modelOptions)):[]}get referenceHash(){return Xr(this.selfhref)}getReferredSections(){let t=[];for(let e of this.subSections){e.referred&&t.push(e);let n=e.getReferredSections();t.push(...n)}for(let e of this.childSections){e.referred&&t.push(e);let n=e.getReferredSections();t.push(...n)}return t}};var Zr=class o{[Mm.immerable]=!0;_content;constructor(t){this._content=t}static create(t){return typeof t=="object"&&t!==null&&"elements"in t&&Array.isArray(t.elements)?new o(t):new o}get fromData(){return er()}get header(){let t=null,e=null,n=this._content?.header?.label;n&&(t=n);let a=this._content?.header?.description;return a&&(typeof a=="object"&&"message"in a?e=a.message:typeof a=="string"&&(e=a)),{label:t,description:e}}mapToPropertyElement(t){let e=t.propertyElement;return{propertyElement:{label:e.label,layouthint:new ut(e.layouthint),properties:"properties"in e?e.properties:[]}}}mapToTextFragmentElement(t){let e=t.textFragmentElement;return{textFragmentElement:{label:e.label,layouthint:new ut(e.layouthint),textfragments:"textfragments"in e?e.textfragments.map(n=>typeof n=="object"?{...n,text:Yr(n.text)||""}:n):[]}}}mapToContentElement(t){let e=t.contentElement;return{contentElement:{label:e.label,layouthint:new ut(e.layouthint),sections:"sections"in e?e.sections.map(n=>new xe(n)):[]}}}get elements(){return Array.isArray(this._content?.elements)?this._content.elements.filter(t=>t!=null).map(t=>{switch(Object.keys(t)[0]){case"propertyElement":return this.mapToPropertyElement(t);case"textFragmentElement":return this.mapToTextFragmentElement(t);case"contentElement":return this.mapToContentElement(t);default:return t}}):[]}get label(){return this._content?.label}get properties(){return this.elements.filter(t=>Object.keys(t)[0]==="propertyElement").map(t=>{let{propertyElement:e}=t;return"properties"in e?e.properties:[]}).flat()}getConceptPropertiesByLabels(t){return this.elements.filter(e=>Object.keys(e)[0]==="propertyElement").map(e=>e.propertyElement).filter(e=>Array.isArray(t)?t.includes(e.label):t===e.label).map(e=>"properties"in e?e.properties:[]).flat()}get textfragments(){return this.elements.filter(t=>Object.keys(t)[0]==="textFragmentElement").map(t=>{let{textFragmentElement:e}=t;return"textfragments"in e?e.textfragments:[]}).flat()}getTextFragmentsByLabels(t){return this.elements.filter(e=>Object.keys(e)[0]==="textFragmentElement").map(e=>e.textFragmentElement).filter(e=>Array.isArray(t)?t.includes(e.label):t===e.label).map(e=>"textfragments"in e?e.textfragments:[]).flat()}get sections(){return this.elements.filter(t=>Object.keys(t)[0]==="contentElement").map(t=>t.contentElement.sections).flat()}getSectionsByType(t){return this.sections.filter(e=>{let n=e.type;return n?Array.isArray(t)?t.includes(n):t===n:!1})}getSectionsByLabels(t){return this.elements.filter(e=>Object.keys(e)[0]==="contentElement").map(e=>e.contentElement).filter(e=>Array.isArray(t)?t.includes(e.label):t===e.label).map(e=>e.sections).flat()}getReferredSections(){let t=[];for(let e of this.sections)t.push(...e.getReferredSections());return t}};var Zn=class{_id;_validateMethod;_defaultMessage;_parameters;_useClientsideValidation;constructor(t,e,n,a,l=Et("USE_CLIENTSIDE_VALIDATION")){this._id=t,this._validateMethod=e,this._defaultMessage=n,this._parameters=a,this._useClientsideValidation=l}get id(){return this._id}get defaultMessage(){return this._defaultMessage||"Missing default message"}get parameters(){return this._parameters}hasValidation(){return this._validateMethod!=null}validate(t){let e=this._validateMethod;return this._useClientsideValidation&&e?e(t):!0}get isMandatoryConstraint(){return this._id==="mandatory"||this._id==="Constraint.Mandatory"}};var rt=class extends K{addConstraint(t,e,n,a={},l=Et("USE_CLIENTSIDE_VALIDATION")){this.add(new Zn(t,e,n,a,l))}validate(t){return this.isEmpty()||this.collection.every(e=>e.validate(t))}hasMandatoryConstraint(){return this.collection.some(t=>t.isMandatoryConstraint)}invalidConstraints(t){return t===""&&!this.hasMandatoryConstraint()?[]:this.collection.filter(e=>!e.validate(t))}};var Qn=class{get id(){return"Constraint.Mandatory"}hasValidation(){return!0}get defaultMessage(){return"Field is mandatory"}get parameters(){return{}}validate(t){if(t==null)return!1;if(typeof t!="string")throw new TypeError(`isNotEmptyString: Not comparing to string: ${typeof t}`);return t!==""}get isMandatoryConstraint(){return!0}};var ga="Constraint.InvalidLengthExact",ya="Constraint.InvalidLengthBetween",ba="Constraint.InvalidLengthTooShort",Ca="Constraint.InvalidLengthTooLong",ts=class{_minLength;_maxLength;constructor(t,e){this._minLength=t,this._maxLength=e}get id(){return this.minLength&&this.maxLength&&this.minLength===this.maxLength?ga:this.minLength&&this.maxLength?ya:this.minLength?ba:this.maxLength?Ca:"Constraint.NoLengthConstraint"}get minLength(){return this._minLength}get maxLength(){return this._maxLength}hasValidation(){return!0}isExactLength(t){if(typeof t!="string")throw new TypeError("isExactLength: Not comparing to string");if(this.minLength==null)throw new Error("isExactLength: Min and max length not set");return t.length===this.minLength}isBetween(t){if(typeof t!="string")throw new TypeError("isBetween: Not comparing to string");if(this.minLength==null||this.maxLength==null)throw new Error("isBetween: Min or max length not set");return this.isLongEnough(t)&&this.isSmallEnough(t)}isLongEnough(t){if(typeof t!="string")throw new TypeError("isLongEnough: Not comparing to string");if(!this.minLength)throw new Error("isLongEnough: Min length not set");return t.length>=this.minLength}isSmallEnough(t){if(typeof t!="string")throw new TypeError("isSmallEnough: Not comparing to string");if(!this.maxLength)throw new Error("isSmallEnough: Max length not set");return t.length<=this.maxLength}get defaultMessage(){switch(this.id){case ga:return"Length must be precisely ${length} characters";case ya:return"Length must be between ${min-length} and ${max-length} characters";case ba:return"The length of the value must be larger than ${min-length}";case Ca:return"The length of the value must be smaller than ${max-length}";default:return""}}get parameters(){switch(this.id){case ga:return{length:this.minLength};case ya:return{"min-length":this.minLength,"max-length":this.maxLength};case ba:return{"min-length":this.minLength};case Ca:return{"max-length":this.maxLength};default:return{}}}validate(t){switch(this.id){case ga:return this.isExactLength(t);case ya:return this.isBetween(t);case ba:return this.isLongEnough(t);case Ca:return this.isSmallEnough(t);default:return!0}}get isMandatoryConstraint(){return!1}};var G=class extends q{_label;_links;_parentKey;_hasContentConfiguration=!1;_content;_concept;attributeReferenceDate;_lastModification=0;_initvalue;_value;_inputvalue;_previouslyValidatedValue;attributeErrors;_serverConstraints=new rt;_useClientsideValidation=Et("USE_CLIENTSIDE_VALIDATION",!0);_isValid=!0;_mandatory;_readonly=!1;_disabled=!1;_isResult;_isHidden=!1;_isEditable=!1;_layoutHintRules;_placeholder;constructor(t,e,n){super(t,e,n),this.attributeReferenceDate=this.getDataAsString("referenceDate",St.now()),this._links=ct.create(this.data,this.contributions,"attribute",this.modelOptions),this._content=this.createAttributeContent(),this._label=this.createLabel(),this._placeholder=this.getContributionAsString("placeholder"),this._initvalue=this.data.value,this._inputvalue=this.getInitialInputValue(this.data.value),this._value=this.data.value,this._isResult=this.getDataAsBoolean("isResult",!1),this._mandatory=this.layouthint.has(Fn)||this.getContributionAsBoolean("mandatory",!1),this._disabled=this.layouthint.has(fl),this.attributeErrors=this.createErrorCollection(this.data.message)}createLabel(){return this.hasContentFromData()&&this.content?.label&&(this._label=this.content.label),this.getContributionAsString("label","")}createErrorCollection(t){let e=new fe(2);return typeof t=="object"&&t!=null&&e.addServerError(t.id,t.message,t.properties,t.layouthint),e}static isApplicableModel(t){throw typeof t!="object"?new P("Given argument for isApplicableModel is not a contributions object"):new Error("isApplicableModel must be implemented on an attribute")}get key(){return this.getDataAsString("key","unknown")}get parentKey(){return this._parentKey||""}set parentKey(t){this._parentKey=t}get name(){return this.key}get label(){return this._label}set label(t){this._label=t}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t}get isEditable(){return this._isEditable}set isEditable(t){this._isEditable=t}get isVisible(){return!this._isHidden}get isHidden(){return this._isHidden}set isHidden(t){this._isHidden=t}show(){this.isHidden=!1}hide(){this.isHidden=!0}get links(){return this._links}get downloadLink(){let t=this.links.getLinksByGroup("download").first;if(t&&t.key===this.key)return t}getInitialChildModelLinks(){return!this.hasContentFromData()&&this.hasContentConfiguration()&&this.conceptLink?[this.conceptLink]:[]}setChildModels(t,e){let n=this.conceptLink?.href;if(n){let a=t.find(l=>l instanceof Me?l.selfhref.equalsWithParameters(n):!1);this.concept=a}}get conceptLink(){let t=this.links.getLinkByKey("concept");return t&&(t.href=t.href.addParameter(et,this.referenceDate),t.isCacheable=!0),t}get concept(){return this._concept}set concept(t){this._concept=t}get referenceDate(){return this.attributeReferenceDate}set referenceDate(t){this.attributeReferenceDate=t}hasContentFromData(){return er()}setHasContentConfiguration(t){this._hasContentConfiguration=t}hasContentConfiguration(){return this._hasContentConfiguration}createAttributeContent(){if("content"in this.data)return new Zr(this.data.content)}get content(){return this._content}indicateContentConfiguration(t){if(t){let e=t.questions?.hasConfig(),n=t.isConfiguredEndResultAttribute(this.key),a=t.isConfiguredIntermediateResultAttribute(this.key);this.setHasContentConfiguration(e||n||a)}}getContentConfiguredLabel(t){return this.hasContentFromData()?this.content?.label??this.label:t.getContentConfiguredLabel(this.concept,this.label)}get defaultAlignment(){return"left"}get alignment(){let t=this.layouthint.getByLayoutHint("align-"),e=t?t.substring(6):this.defaultAlignment;return e==="left"||e==="center"||e==="right"?e:this.defaultAlignment}get readonlyWidth(){return"MEDIUM"}get layoutHintRules(){return this._layoutHintRules}set layoutHintRules(t){this._layoutHintRules=t}processLayoutHintRules(t){this.layoutHintRules&&this.layoutHintRules.process(this,t)}get lastModification(){return this._lastModification}set lastModification(t){this._lastModification=t}updateLastModification(){this.lastModification=Date.now()}isChangedSince(t){return this.lastModification>t}getInitialInputValue(t){return t}get initvalue(){return this.getInitValue()}getInitValue(){return this._initvalue}setInitValue(t){this._initvalue=t}hasValue(){return this._value!=null&&this._value!==""}getValue(){return this.hasValue()?this._value:null}setValue(t){this._value=t}get value(){return this.getValue()}set value(t){this.updateLastModification(),this._value=t}getInputValue(){let t=this._inputvalue;return t?t.toString():""}setInputvalue(t){this._inputvalue=t}get inputvalue(){return this.getInputValue()}set inputvalue(t){this._inputvalue=t,this.value=t,this.validate(t)}formatValue(t){return JSON.stringify(t)}get readonlyvalue(){return this.value?this.value.toString():""}get validateValue(){return this.inputvalue}get mandatory(){return this._mandatory||!1}set mandatory(t){t!==this._mandatory&&(this._previouslyValidatedValue=null),this._mandatory=t}get configuredMandatory(){return this.layouthint.has(Fn)??this.getContributionAsBoolean("mandatory")}get readonly(){return this._readonly||this.getContributionAsBoolean("readonly")===!0||this.getDataAsBoolean("static")===!0||this.isResult}set readonly(t){this._readonly=t}get disabled(){return this._disabled}set disabled(t){this._disabled=t}get isResult(){return this._isResult}set isResult(t){this._isResult=t}get format(){return this.getContributionAsString("format")}get formatLabel(){return this.format}get minLength(){return this.getContributionAsNumber("minLength")}get maxLength(){return this.getContributionAsNumber("maxLength")}get operator(){return this.getContributionAsString("operator","")}get assistantMessage(){return this.getContributionAsString("assistant")}get isValid(){return this.validate(this.validateValue)}getIsValid(){return this._isValid}setIsValid(t){this._isValid=t}getServerConstraints(){return this._serverConstraints}get constraintCollection(){let t=new rt;return t.add(this._serverConstraints),this.mandatory&&t.add(new Qn),(this.minLength||this.maxLength)&&t.add(new ts(this.minLength,this.maxLength)),t.add(this.addConstraints()),t}addConstraints(){return new rt}setUseClientsideValidation(t){this._useClientsideValidation=t}useClientsideValidation(){return this._useClientsideValidation??!0}validate(t){return this.useClientsideValidation()?(this.isOptionalAndEmpty(t)?this._isValid=!0:this.getPreviouslyValidatedValue()!==t&&(this._isValid=this.constraintCollection.validate(t)),this.setPreviouslyValidatedValue(t),this._isValid):!0}setPreviouslyValidatedValue(t){this._previouslyValidatedValue=t}getPreviouslyValidatedValue(){return this._previouslyValidatedValue}isOptionalAndEmpty(t){if(t===void 0)throw new P("isOptionalAndEmpty method needs value argument");return!this.mandatory&&t===""}get errorCollection(){let t=new fe(2,this.attributeErrors);return t.addConstraints(this.constraintCollection.invalidConstraints(this.validateValue)),t}inError(){return!this._isValid&&this.isChangedSince(0)}resetErrors(){this.attributeErrors.clear()}addServerError(t){this.attributeErrors.addServerError(t.id,t.message,t.properties,t.layouthint)}removeServerError(t){this.attributeErrors.removeServerError(t)}hasServerErrors(){return this.errorCollection.serverErrors.length>0}hasErrors(){return this.errorCollection.hasItems()}addMissingError(t){this.attributeErrors.addServerError("Constraint.Missing")}removeMissingError(){this.removeServerError("Constraint.Missing")}addServerConstraint(t,e,n){this._serverConstraints.addConstraint(t,void 0,e||"",n,this.useClientsideValidation())}formatParameters(t){if(!t)return{};let e={};return Object.keys(t).forEach(n=>{let a=t[n];n.endsWith("-number")||n.endsWith("-date")?e[n]=this.formatValue(a):e[n]=a}),e}get hasDynamicValidationData(){return!0}updateValidations(t){t.some(e=>e.id==="Constraint.Mandatory")||this.layouthint.has(Fn)?this.mandatory=!0:this.hasValue()||(this.mandatory=!1),this._serverConstraints=new rt,this.resetErrors(),t.filter(e=>e.id!=="Constraint.Mandatory"||!this.hasValue()).forEach(e=>{this.hasValue()?this.attributeErrors.addServerError(e.id,e.message,this.formatParameters(e.properties),e.layouthint):this.addServerConstraint(e.id,e.message,this.formatParameters(e.properties))})}mergeAttribute(t){this.concept=t.concept,!t.readonly&&t.isValid&&t.inputvalue!==null&&this.update(t.inputvalue)}getFormData(){return this.inError()?null:{[this.name]:this.value}}get formdata(){return this.getFormData()}getEmptyFormData(){return{[this.name]:null}}equals(t){return this.key===t.key&&this.parentKey===t.parentKey}};var xm=require("immer");var Qr=class{[xm.immerable]=!0;_key;_header;_sortOption;_readonlyWidth;constructor(t,e){let[n]=Object.keys(t),a=Ct.createAttribute(n,{elementid:n},t[n]);this._readonlyWidth=a.readonlyWidth,this._key=n,this._header=t[n],this._sortOption=e?.find(l=>l.key===n)}get key(){return this._key}get label(){return this._header.label}get type(){return this._header.type}get layouthint(){return new ut(this._header.layouthint)}get alignment(){let t=this.layouthint.getByLayoutHint("align-");return t===null?"left":t.substring(6)}get readonlyWidth(){return this._readonlyWidth??"MEDIUM"}equals(t){return t.key===this.key}get sortOption(){return this._sortOption}hasSorting(){return this.sortOption!=null}};var Ee=class o extends q{_code;_isSelected;_concept;_referenceDate;_level;_attributeCollection;_children;_links;_content;_isUser=!1;constructor(t=[],e={},n){super({},e),this._code=this.getContributionAsString("code",this.getContributionAsString("key","")),this._isSelected=t.includes(this.code),this._referenceDate=n?.referenceDate||new Date().toISOString().split("T")[0],this._level=0,this._attributeCollection=this.createAttributeCollection(n),this._children=this.addChildren(t,e,n),this._links=new ct(this.contributions._links,{},{origin:n?.origin,contextPath:n?.contextPath}),this._content=this.createContent(),this._isUser="optionType"in e&&e.optionType==="user"}get type(){return"option"}static createFromListItemModel(t){let e=new o;return e.code=t.id?.toString()??"",e}get isChoiceAttributeOptionModel(){return!0}getInitialChildModelLinks(){let t=[];return!this.hasContentFromData()&&this.conceptLink&&t.push(this.conceptLink),this.children&&t.push(...this.children.getInitialChildModelLinks()),t}setChildModels(t,e=[]){let n=this.conceptLink?.href;if(n){let a=t.find(l=>l instanceof Me?l.selfhref.equalsWithParameters(n):!1);this.concept=a}this.children&&this.children.setChildModels(t,e)}get code(){return this._code}set code(t){this._code=t}equals(t){return this.code.toString()===t.code.toString()}createAttributeCollection(t){let e=this.getContributionAsArray("elementsContributions",[]),n=this.getContributionAsObject("elements",{});return new ft(n,e,{origin:t?.origin,contextPath:t?.contextPath,isReadonly:!0})}get attributeCollection(){return this._attributeCollection}set attributeCollection(t){this._attributeCollection=t}get label(){let t=this.getContributionAsString("label");if(t)return t;if(this.attributeCollection.hasItems()){let e=this.attributeCollection.getAttributeByLayoutHint(vr);if(e)return e.readonlyvalue;if(this.attributeCollection.first)return this.attributeCollection.first.readonlyvalue}return""}getContentConfiguredLabel(t){if(this.hasContentFromData())return this.content?.label||this.label;if(t)return t.getContentConfiguredLabel(this.concept,this.label)}hasContentFromData(){return er()}get content(){return this._content}addChildren(t=[],e={},n){if("elements"in e)return new Be;let a="children"in e?e.children:[];return Be.create({value:t},{options:a??[]},n)}get children(){return this._children}createContent(){return Zr.create(this.getContributionAsObject("content"))}get selected(){return this._isSelected}set selected(t){this._isSelected=t}get count(){return this.getContributionAsNumber("count")}get links(){return this._links}set links(t){this._links=t}get selfhref(){return this.links.getLinkByKey("self")?.href}get referenceDate(){return this._referenceDate}set referenceDate(t){this._referenceDate=t}get conceptLink(){let t=this.links.getLinkByKey("concept");return t&&(t.href=t.href.addParameter(et,this.referenceDate),t.isCacheable=!0),t}get concept(){return this._concept}set concept(t){this._concept=t}get level(){return this._level}set level(t){this._level=t}get isBooleanType(){return this.getContributionAsBoolean("isBooleanType",!1)}get hasAlternativeLabel(){return this.getContributionAsBoolean("hasAlternativeLabel",!1)}get isUser(){return this._isUser}mergeOption(t){this.concept=t.concept,this.children!=null&&t.children!=null&&this.children.mergeOptions(t.children)}};var Be=class o extends Tt{_modelOptions;_headers=[];_sortOptions=!1;constructor(t){super(),this._modelOptions=t||{origin:"",contextPath:ot(),referenceDate:new Date().toISOString().split("T")[0]}}set sortOptions(t){this._sortOptions=t,this.collection.forEach(e=>{e.children&&(e.children.sortOptions=t)})}get sortOptions(){return this._sortOptions}static create(t={},e={},n){let a=new o(n);if("type"in e&&e.type==="boolean"){let l="value"in t?t.value:void 0;a.addBooleanOptions(l,e)}else"dynamicschema"in t&&t.dynamicschema!=null?a.addDynamicSchema(t,e):"options"in e&&e.options!=null&&a.addOptions(t,e);return"children"in e&&Array.isArray(e.children)&&a.addHeaders(e.children),a}get all(){return this.sortOptions?this.collection.sort((t,e)=>t.label.localeCompare(e.label)):this.collection}getSelectedOptions(t){let e=[];return"options"in t&&Array.isArray(t.options)?e.push(...t.options.filter(n=>n.selected).map(n=>n.key)):"value"in t&&("value"in t&&Array.isArray(t.value)?e.push(...t.value):typeof t.value=="boolean"?e.push(t.value.toString()):e.push(t.value)),e}getOptionCount(t,e){if(Array.isArray(e)){let n=e.find(a=>"key"in a&&a.key===t);if(n)return"count"in n&&typeof n.count=="number"?n.count:void 0}}addOptions(t,e){let n=this.getSelectedOptions(t);if("options"in e&&Array.isArray(e.options)){let a="options"in t&&Array.isArray(t.options)?t.options:[];e.options.forEach(l=>{let d=l.code||l.key,b="optionType"in e?e.optionType:"generic";this.addOption(n,{...l,count:this.getOptionCount(d,a),optionType:b})})}return this}addDynamicSchema(t,e){let n=this.getSelectedOptions(t);if("dynamicschema"in t&&Array.isArray(t.dynamicschema)){let a="options"in t&&Array.isArray(t.options)?t.options:[],l="children"in e?e.children:void 0,d="optionType"in e?e.optionType:"generic";t.dynamicschema.forEach(b=>{this.addOption(n,{...b,count:this.getOptionCount(b.code,a),optionType:d,elementsContributions:l})})}return this}addBooleanOption(t,e,n,a=[]){let l=a.find(b=>"code"in b&&b.code===t),d=l&&"label"in l?l.label:e;this.addOption(n,{code:t,label:d,isBooleanType:!0,hasAlternativeLabel:l!=null})}addBooleanOptions(t,e){let n=t==null?[]:[t.toString()],a="options"in e&&Array.isArray(e.options)?e.options:[];return this.addBooleanOption("true","Yes",n,a),this.addBooleanOption("false","No",n,a),this}addOption(t,e){let n=new Ee(Array.isArray(t)?t:[t],e,this._modelOptions);return this.add(n),this}getOptionByCode(t){return this.collection.find(e=>e.code===t)}hasOptionByCode(t){return this.collection.some(e=>e.code===t)}get selected(){let t=[];return this.collection.forEach(e=>{e.selected&&e.selected===!0&&t.push(e),e.children&&t.push(...e.children.selected)}),t}deselectAll(){this.collection=this.collection.map(t=>(t.selected=!1,t.children&&t.children.deselectAll(),t))}select(t){this.toggle(t,"select")}deselect(t){this.toggle(t,"deselect")}toggle(t,e){this.collection=this.collection.map(n=>(n.code===t?n.selected=e==="select":n.children&&n.children.toggle(t,e),n))}setReferenceDate(t){return this.collection.map(e=>(e.referenceDate=t,e.children&&(e.children.referenceDate=t),e))}set referenceDate(t){this.collection=this.setReferenceDate(t)}addHeaders(t){this._headers=t.map(e=>new Qr(e))}get headers(){return this._headers?this._headers:[]}mergeOptions(t,e=!1,n=!1){let a=[];this.collection.forEach(l=>{let d=t.find(b=>b.code===l.code);d?(l.mergeOption(d),a.push(l)):n||a.push(l)}),e?this.collection=[...a,...t.filter(l=>!this.collection.some(d=>d.code===l.code))]:this.collection=a}some(t,e){return this.collection.some((n,a,l)=>{let d=t(n,a,l);return!d&&n.children?n.children.some(t,e):d})}};var Ue=class o extends Tt{get type(){return"composite-collection"}get selfhref(){}static create(t,e,n){return"children"in t&&"children"in e&&Array.isArray(e.children)&&Array.isArray(t.children)?Array.isArray(t.children[0])?o.createMultiData(t,e,n):o.createStandard(t,e,n):new o}static createStandard(t,e,n){let a=new o;return"children"in e&&"children"in t&&Array.isArray(e.children)&&Array.isArray(t.children)&&(a.collection=e.children.map(l=>{let[d]=Object.keys(l),b=Array.isArray(t.children)?t.children.find(gt=>gt.key===d):{},x=l[d];"type"in e&&typeof e.type=="string"&&e.type.includes("range")&&!x.type&&(x.type=e.type.replace("range",""));let D=Ct.createAttribute(d,{...b,dynamicschema:b?.dynamicschema},{...x,readonly:x.readonly??"readonly"in e},n);return D&&"key"in t&&typeof t.key=="string"&&(D.parentKey=t.key),D}).filter(l=>l!==null)),a}static createMultiData(t,e,n){let a=new o;return"children"in t&&Array.isArray(t.children)&&(a.collection=t.children.map(l=>o.create({...t,children:l},e,n))),a}getInputValue(){return this.collection.map(t=>t.inputvalue).join(",")}get inputvalue(){return this.getInputValue()}validate(){return this.collection.every(t=>t.isValid)}get errorCollection(){return new fe(3)}hasServerErrors(){return this.errorCollection.serverErrors.length>0||this.collection.some(t=>t.hasServerErrors())}hasErrors(){return this.errorCollection.hasItems()??this.collection.some(t=>t.hasErrors())}isValid(){return!this.hasErrors()}reset(){this.collection.forEach(t=>{t.reset()})}get initvalue(){let t={},e=[];for(let n of this.collection)n instanceof o?e.push(n.initvalue):n.initvalue!==null&&(t[n.key]=n.initvalue);if(!(e.length===0&&Object.keys(t).length===0))return e.length>0?e:t}get value(){if(this.first instanceof o)return this.collection.map(e=>e.value);let t={};if(this.collection.forEach(e=>{if(e instanceof o)return e.value;e.formdata!==null&&!e.readonly&&(t={...t,...e.formdata})}),Object.keys(t).length!==0)return t}get readonlyvalue(){return this.first instanceof o?this.collection.map(t=>t.readonlyvalue).join(" | "):this.collection.filter(t=>t.value!==null).map(t=>t.readonlyvalue).join(", ")}updateValidations(t,e){this.collection.forEach(n=>{if(n instanceof o)n.updateValidations(t,e);else{let a=e.filter(l=>l.anchor?.elementid===`${t}${n.key}`);n.updateValidations(a)}})}setUseClientsideValidation(t){this.collection.forEach(e=>{e.setUseClientsideValidation(t)})}hasValue(){return this.collection.some(t=>t.hasValue())}getChildByAttribute(t){return this.collection.find(e=>e instanceof G&&e.equals(t)?!0:e instanceof dt?e.getChildByAttribute(t):!1)}getChildByKey(t){return this.collection.find(e=>e instanceof G&&e.key===t?!0:e instanceof dt?e.getChildByKey(t):!1)}};var mt=(Z=>(Z.STRING="string",Z.NUMBER="number",Z.INTEGER="integer",Z.BOOLEAN="boolean",Z.MEMO="memo",Z.DATE="date",Z.DATETIME="datetime",Z.TIME="time",Z.TIMESTAMP="timestamp",Z.ARRAY="array",Z.BINARY="binary",Z.COMPOSITE="composite",Z.CAPTCHA="captcha",Z.PASSWORD="password",Z.CHOICE="choice",Z.LOOKUP="lookup",Z.RANGE="range",Z.HELPTEXT="helptext",Z.LABEL="label",Z.MONEY="money",Z.XML="xml",Z.UPLOAD="upload",Z.ASSIGNMENT="assignment",Z))(mt||{}),wl=(D=>(D.STRING="string",D.CHOICE="choice",D.DATE="date",D.DATETIME="datetime",D.ASSIGNMENT="assignment",D.DATERANGE="daterange",D.DATETIMERANGE="datetimerange",D.NUMBER="number",D.NUMBERRANGE="numberrange",D))(wl||{}),kl=(a=>(a.STATIC="static",a.DYNAMIC="dynamic",a.DYNAMIC_WITH_THRESHOLD="dynamicWithThreshold",a.LOOKUP="lookup",a))(kl||{});var dt=class o extends G{_children;constructor(t,e,n){super(t,e,n),this._children=Ue.create(t??{},e??{},n),this.setChildrenOptionality()}static isApplicableModel(t){return t.type==="composite"||t.type==="array"&&"children"in t}getInitialChildModelLinks(){return this.children.getInitialChildModelLinks()}setChildModels(t,e){this.children.setChildModels(t,e)}get type(){return"composite"}get children(){return this._children}set children(t){this._children=t}get start(){return this.children.all[0]}get end(){return this.children.all[this.children.size-1]}getInputValue(){return this.children.getInputValue()}hasValue(){return this.children.some(t=>t.hasValue())}get constraintCollection(){let t=new rt;return t.add(this.getServerConstraints()),t.add(this.addConstraints()),t}setUseClientsideValidation(t){super.setUseClientsideValidation(t),this.children.all.forEach(e=>e.setUseClientsideValidation(t))}validate(t){if(!this.useClientsideValidation())return!0;let e=this.children.validate();return e&&(e=this.constraintCollection.validate(t)),this.setIsValid(e),this.getIsValid()}get isValid(){return this.validate("")}hasServerErrors(){return this.errorCollection.serverErrors.length>0||this.children.some(t=>t.hasServerErrors())}hasErrors(){return this.errorCollection.hasItems()??this.children.some(t=>t.hasErrors())}reset(){this.children.reset()}getChildByAttribute(t){return this.children.find(e=>e instanceof Ue?!1:e.equals(t))}getChildByKey(t){return this.children.find(e=>e instanceof G&&e.key===t?!0:e instanceof o||e instanceof Ue?e.getChildByKey(t)!==void 0:!1)}mergeAttribute(t){this.concept=t.concept,this.children.forEach(e=>{if(t instanceof o&&e instanceof G){let n=t.getChildByKey(e.key);n&&e.mergeAttribute(n)}})}update(t,e){if(!e)throw new P("Composite attribute needs changed attribute on update call");return this.updateLastModification(),this.children.forEach(n=>{n instanceof o?n.update(t,e):n instanceof G&&n.equals(e)&&n.update(t)}),this.setChildrenOptionality(),this.validate(t),this}updateByAttribute(t){t instanceof o?t.children.forEach(e=>{if(!(e instanceof Ue)){let n=this.getChildByAttribute(e);n&&n.updateByAttribute(e)}}):console.error(`update of composite attribute with ${t.type} not supported`)}setChildrenOptionality(){let t=!this.mandatory&&this.children.every(e=>e.value===null);this.children.forEach(e=>{e instanceof G&&(e.mandatory=t||!e.configuredMandatory?!1:e.configuredMandatory)})}get readonly(){return super.readonly??this.children.every(t=>t instanceof G&&t.readonly)}set readonly(t){super.readonly=t}get readonlyvalue(){return this.children.readonlyvalue}get initvalue(){return this.children.initvalue}getFormData(){return{[this.name]:this.value}}getValue(){return this.children.value}getChildrenIds(){let t=this.data.value;return Array.isArray(t)?t.map(e=>{if(typeof e=="object"&&e!=null&&"_id"in e)return e._id}):t!=null&&typeof t=="object"&&"_id"in t?[t._id]:[]}get isResult(){return this._isResult}set isResult(t){this._isResult=t,this.children.forEach(e=>{e instanceof Ue||(e.isResult=t)})}indicateContentConfiguration(t){t&&this.children.forEach(e=>{e instanceof Ue||e.indicateContentConfiguration(t)})}equals(t){return this.key===t.key&&this.parentKey===t.parentKey||this.children.some(e=>e instanceof G&&e.equals(t))}get readonlyWidth(){if(this.type==="composite")return"LARGE";switch(this.start instanceof G?this.start.type:""){case"datetime":return"LARGE";case"timestamp":return"EXTRA_LARGE";default:return"MEDIUM"}}};var Fl=(x=>(x.CHECKBOX="checkbox",x.RADIOBUTTON="radiobutton",x.COMBOBOX="combobox",x.LIST="list",x.LISTVIEW="listview",x.TABLE="table",x.LONGLIST="longlist",x.TOGGLE="toggle",x))(Fl||{}),Ve=class o extends G{_options;constructor(t,e,n){super(t,e,n),this.attributeReferenceDate=this.getDataAsString("referenceDate",new Date().toISOString().split("T")[0]),this._options=Be.create(t,e,{...n,referenceDate:this.referenceDate}),this.layouthint.has(ml)&&(this._options.sortOptions=!0)}static isApplicableModel(t){let e="";return"type"in t&&typeof t.type=="string"&&(e=t.type),e==="choice"||e==="array"?!0:e!=="composite"&&e!=="boolean"?"enumerated"in t||"options"in t:!1}get type(){let t=this.getContributionAsString("optionMode",""),e=this.lookupLink||this.lookupListLink;return t==="lookup"||t==="dynamicWithThreshold"&&e?"lookup":"choice"}getInitialChildModelLinks(){let t=[];return this.hasContentConfiguration()&&(!this.hasContentFromData()&&this.conceptLink&&t.push(this.conceptLink),t.push(...this.options.getInitialChildModelLinks())),t}setChildModels(t,e){let n=this.conceptLink?.href;if(n){let a=t.find(l=>l instanceof Me?l.selfhref?.equalsWithParameters(n):!1);this.concept=a}this.options.setChildModels(t,e)}get optionType(){return this.contributions?.optionType??"generic"}get isUser(){return this.optionType==="user"}get lookupLink(){let t=this.links.getLinkByKey("lookupOptions");return t&&this.lookupParameterType==="bodyParameter"&&(t.method="POST"),t}get lookupParameterType(){return this.getContributionAsString("parameterType")==="bodyParameter"?"bodyParameter":"queryParameter"}get lookupListLink(){return this.links.getLinkByKey("lookupList")}get lookupListLabel(){return this.contributions.lookupList?.label??""}get referenceDate(){return this.attributeReferenceDate}set referenceDate(t){this.attributeReferenceDate=t,this.options.referenceDate=t}get options(){return this._options}get selected(){return this.options.selected.map(t=>t.code)}get readonlyvalue(){return this.options.selected.map(t=>t.label).join(", ")}get initvalue(){let t=this.getInitValue();return Array.isArray(t)&&t.length!==0,t}getValue(){return this.options.selected.length>0?this.options.selected.map(t=>t.code).join(","):null}hasValue(){return this.options.selected.length>0}getInputValue(){return this.selected.join(",")}toggleOption(t){this.selected.includes(t)?this.disableOption(t):this.enableOption(t)}enableOption(t){this.isMultiple||this.options.deselectAll(),this.options.select(t),this.inputvalue=this.getInputValue()}disableOption(t){this.options.deselect(t),this.inputvalue=this.getInputValue()}addOption(t){this.isMultiple||this.options.deselectAll();let e="code"in t&&typeof t.code=="string"?t.code:"";this.options.find(n=>n.code===e)===void 0&&this.options.addOption(e,t)}get choicetype(){return["checkbox","radiobutton","combobox","list","listview","table","longlist","toggle"].find(t=>this.layouthint.has(t))??"checkbox"}get isMultiple(){return this.getContributionAsBoolean("multiplechoice")??this.choicetype==="checkbox"}get isTree(){return this.getContributionAsArray("options",[]).some(t=>"children"in t)}reset(){this.options.deselectAll()}mergeAttribute(t,e=!1,n=!1){!this.readonly&&t instanceof o&&(this.concept=t.concept,this.options.mergeOptions(t.options,e??this.type==="lookup",n),this.options.deselectAll(),t.isValid&&t.inputvalue!==null&&this.update(t.inputvalue))}update(t){if(this.readonly)return this;this.updateLastModification();let e;return Array.isArray(t)?e=t:typeof t=="string"&&this.isMultiple?e=t.split(","):e=[t],e.forEach(n=>{n instanceof Ee?(this.options.some(a=>a.equals(n))||this.options.add(n),this.toggleOption(n.code)):typeof n=="string"&&this.options.some(a=>a.code.toString()===n)&&this.toggleOption(n)}),this}updateByAttribute(t){if(this.reset(),t instanceof o||t instanceof dt){let e;t instanceof o?e=t.options.selected:t instanceof dt&&(e=t.getChildrenIds()),e!=null&&this.update(e)}else console.error(`update of choice attribute with ${t.type} not supported`)}addMissingError(t){this.isChangedSince(0)&&this.attributeErrors.addServerError("Constraint.Missing"),t instanceof o&&this.mergeAttribute(t,!0,!0)}setHasContentConfiguration(t){super.setHasContentConfiguration(this.contentConfiguration!=null||t)}get contentConfiguration(){if(!this.contributions.content?.optionElements)return;let t=this.contributions.content.optionElements.map(e=>"contentElement"in e?{contentElement:{layouthint:[Gn],...e.contentElement}}:e);return new It(t)}get placeholder(){return this.getContributionAsString("placeholder","")}addServerError(t){let{id:e,message:n,properties:a,layouthint:l}=t,d="answer-option-key";if(a&&d in a){let b=a[d],x=this.options.find(D=>D.code===b);x&&(a[d]=x.getContentConfiguredLabel(this.contentConfiguration??void 0)??"")}this.attributeErrors.addServerError(e,n,a,l)}get readonlyWidth(){return"MEDIUM"}};var es=class o extends G{_referenceDate;_options;constructor(t,e,n){super(t,e,n),this._referenceDate=this.getDataAsString("referenceDate",St.now()),this._options=Be.create(t,e,{...n,referenceDate:this.referenceDate})}static isApplicableModel(t){return"type"in t&&t.type==="boolean"}get type(){return"boolean"}get referenceDate(){return this._referenceDate}set referenceDate(t){this._referenceDate=t,this.options.referenceDate=t}get choicetype(){return["checkbox","radiobutton","combobox","toggle"].find(t=>this.layouthint.has(t))??"radiobutton"}get isMultiple(){return!1}get isTree(){return!1}setHasContentConfiguration(t){super.setHasContentConfiguration(this.contentConfiguration!==null||t)}get contentConfiguration(){if("content"in this.contributions&&typeof this.contributions.content=="object"&&this.contributions.content!==null&&"optionElements"in this.contributions.content&&Array.isArray(this.contributions.content.optionElements)){let t=this.contributions.content.optionElements.map(e=>"contentElement"in e?{contentElement:{...e.contentElement,layouthint:[Gn]}}:e);return new It(t)}return null}get options(){return this._options}get selected(){return this.options.selected.map(t=>t.code)}get readonlyvalue(){return this.options.selected.map(t=>t.label).join(", ")}get initvalue(){let t=this.getInitValue();return Array.isArray(t)&&t.length!==0,t}getValue(){let t=this.options.selected;return t.length>0?t[0].code:null}hasValue(){return this.options.selected.length>0}getInputValue(){return this.selected.join(",")}toggleOption(t){this.selected.includes(t)?this.disableOption(t):this.enableOption(t)}enableOption(t){this.options.deselectAll(),this.options.select(t),this.inputvalue=this.getInputValue()}disableOption(t){this.options.deselect(t),this.inputvalue=this.getInputValue()}reset(){this.options.deselectAll()}mergeAttribute(t){!this.readonly&&t instanceof o&&(this.concept=t.concept,this.options.deselectAll(),t.isValid&&t.inputvalue!==null&&this.update(t.inputvalue))}update(t){if(this.readonly)return this;this.updateLastModification();let e;return Array.isArray(t)?e=t:typeof t=="string"&&this.isMultiple?e=t.split(","):typeof t=="string"?e=[t==="true"?"true":"false"]:e=[JSON.stringify(t)],e.forEach(n=>{n instanceof Ee?this.toggleOption(n.code):typeof n=="string"&&this.options.some(a=>a.code.toString()===n)&&this.toggleOption(n)}),this}updateByAttribute(t){this.reset(),t instanceof o?this.update(t.value):console.error(`update of boolean attribute with ${t.type} not supported`)}getFormData(){return this.inError()?null:this.hasValue()?{[this.name]:this.value==="true"}:this.choicetype==="checkbox"||this.choicetype==="toggle"?{[this.name]:!1}:{[this.name]:null}}get readonlyWidth(){return this.options.some(t=>t.hasAlternativeLabel)?"SMALL":"EXTRA_SMALL"}};var rs=class extends G{_answer="";static isApplicableModel(t){return t.type==="captcha"}get type(){return"captcha"}update(t){return this.updateLastModification(),this.inputvalue=t,this}updateByAttribute(t){}setAnswer(t){this._answer=t}getAnswer(){return this._answer}get hasDynamicValidationData(){return!1}reset(){this._answer="",this.inputvalue=""}};var Nl="Constraint.Date.InexactDate",Pl="Constraint.Date.OutOfRange",Hl="Constraint.Date.BelowMinimum",Bl="Constraint.Date.AboveMaximum",is=class{_type;_format;_minDate;_maxDate;constructor(t,e=null,n=null,a="yyyy-MM-dd"){this._type=t,this._format=a,this._minDate=e,this._maxDate=n}get type(){return this._type}get id(){return this.minDate!==null&&this.maxDate!==null&&this.minDate===this.maxDate?Nl:this.minDate!==null&&this.maxDate!==null?Pl:this.minDate!==null?Hl:this.maxDate!==null?Bl:"Constraint.Date.NoBoundaryConstraint"}get format(){return this._format}get minDate(){return this._minDate}get maxDate(){return this._maxDate}get defaultMessage(){switch(this.id){case Nl:return"Date must be precisely ${min-date}";case Pl:return"Must be between ${min-date} and ${max-date}";case Hl:return"Must be on or after ${min-date}";case Bl:return"Must be on or before ${max-date}";default:return""}}get parameters(){return{"min-date":this.minDate?this.formatUtil.toFormat(this.minDate,this.format):null,"max-date":this.maxDate?this.formatUtil.toFormat(this.maxDate,this.format):null}}hasValidation(){return!0}isExactDate(t){if(this.minDate===null)throw new J("isExactDate: Min and max date not set");return this.formatUtil.isSame(t,this.minDate,this.format)}isBetweenDates(t){if(this.minDate===null||this.maxDate===null)throw new J("isBetweenDate: Min or max date not set");return this.isSameOrAfterMinDate(t)&&this.isSameOrBeforeMaxDate(t)}isSameOrAfterMinDate(t){if(this.minDate==null)throw new J("isSameOrAfterMinDate: Min date not set");return this.formatUtil.isSameOrAfter(t,this.minDate,this.format)}isSameOrBeforeMaxDate(t){if(this.maxDate==null)throw new J("isSameOrBeforeMaxDate: Max date not set");return this.formatUtil.isSameOrBefore(t,this.maxDate,this.format)}get formatUtil(){switch(this.type){case"time":return ir;case"timestamp":return Pe;case"datetime":return Ne;default:return St}}validate(t){if(typeof t!="string")throw new TypeError("isNotEmptyString: Not comparing to string");switch(this.id){case Nl:return this.isExactDate(t);case Pl:return this.isBetweenDates(t);case Hl:return this.isSameOrAfterMinDate(t);case Bl:return this.isSameOrBeforeMaxDate(t);default:return!0}}get isMandatoryConstraint(){return!1}};var ns=class{_format;_formatLabel;constructor(t,e){this._format=t,this._formatLabel=e}get id(){return"Constraint.DateFormat.InvalidFormat"}get format(){return this._format}get formatLabel(){return this._formatLabel}hasValidation(){return!0}get defaultMessage(){return"Date must be entered in the format ${format}"}get parameters(){return{format:this.formatLabel}}validate(t){return t?St.hasFormat(t,this.format):!1}get isMandatoryConstraint(){return!1}};var ss=class{_type;_format;_formatLabel;_formatNoOffset;_id="Constraint.DateTime.MissingValue";constructor(t,e,n){this._type=t,this._format=e,this._formatNoOffset=e.replace(ke,"").trim(),this._formatLabel=n}get type(){return this._type}get id(){return this._id}get format(){return this._format}get formatLabel(){return this._formatLabel}hasValidation(){return!0}get defaultMessage(){return"Date and time should both be entered"}get parameters(){return{format:this.formatLabel}}get formatUtil(){return this.type==="timestamp"?Pe:Ne}validate(t){if(!t)return!1;if(this.formatUtil.hasFormat(t,this.format))return!0;if(Mr())if(this.formatUtil.hasFormat(t,this._formatNoOffset)){if(!new RegExp("[+-](0[0-9]|1[0-4]):[0-5][0-9]").test(t))return this._id="Constraint.DateTime.MissingOffset",!1}else return this._id="Constraint.DateTime.MissingValue",!1;return!1}get isMandatoryConstraint(){return!1}};var os=class{_format;_formatLabel;constructor(t,e){this._format=t,this._formatLabel=e}get id(){return"Constraint.TimeFormat.InvalidFormat"}get format(){return this._format}get formatLabel(){return this._formatLabel}hasValidation(){return!0}get defaultMessage(){return"Time must be entered in the format ${format}"}get parameters(){return{format:this.formatLabel}}validate(t){return t?ir.hasFormat(t,this.format):!1}get isMandatoryConstraint(){return!1}};var as=class o extends G{_dateInputFormat;constructor(t,e,n){super(t,e,n),this._inputvalue="",this._dateInputFormat="",this.updateInitValue()}get type(){return this.getContributionAsString("type","date")}static isApplicableModel(t){return t.type==="date"||t.type==="time"||t.type==="datetime"||t.type==="timestamp"}get formatUtil(){switch(this.type){case"time":return ir;case"timestamp":return Pe;case"datetime":return Ne;default:return St}}getInitValue(){let t=this.getDataAsString("value");return t&&(this.type==="time"&&t.length===5&&(t=`${t}:00`),this.type==="datetime"&&t.includes(".")?t=Pe.toFormat(t,Ne.getIsoFormat()):t=this.formatUtil.toISO(t),this.hasTime&&(t=this.getTimeValue(t))),t}getTimeValue(t){let e=t;if(this.timeInputFormat.toLowerCase().includes("h")||(e=this.formatUtil.setHour(t,0)),this.timeInputFormat.includes("m")||(e=this.formatUtil.setMinute(t,0)),this.timeInputFormat.includes("s")||(e=this.formatUtil.setSecond(t,0)),this.type==="timestamp"&&!this.timeInputFormat.includes("S")&&(e=this.formatUtil.setMilliseconds(t,0)),Mr()){let n=this.formatUtil.toFormat(t,ke),a=this.formatUtil.toFormat(e,ke);e=e.replace(a,n)}return e}updateInitValue(){let t=this.getInitValue();if(t!=null){this.setInitValue(t);let e=this.getInitialInputValue(t);this._inputvalue=e,this.setValue(t)}}getInitialInputValue(t){if(typeof t!="string")return"";let e=t;return this.type==="time"&&t.length===5&&(e=`${t}:00`),this.formatUtil.toFormat(e,this.inputFormat)}getInputValue(){return this._inputvalue?this._inputvalue.toString():""}get inputvalue(){return this.getInputValue()}set inputvalue(t){this.validate(t),this._inputvalue=t,this.value=t!==null&&t!==""?this.formatUtil.toISO(t,this.inputFormat):null}reset(){this.inputvalue=""}get format(){let t=this.getContributionAsString("format","");return this.formatUtil.convertFormat(t)}get formatLabel(){switch(this.type){case"date":return this.dateInputFormat.toLowerCase();case"time":return this.timeInputFormat.toLowerCase();default:return this.format.toLowerCase()}}get hasDate(){return this.type==="date"||this.type==="datetime"||this.type==="timestamp"}get hasTime(){return this.type==="time"||this.type==="datetime"||this.type==="timestamp"}get inputFormatWithoutOffset(){return this.hasDate&&this.hasTime?`${this.dateInputFormat} ${this.timeInputFormat}`.trim():this.hasDate?this.dateInputFormat:this.hasTime?this.timeInputFormat:""}get inputFormat(){return Mr()&&this.dateInputFormat!==""&&this.timeInputFormat!==""?`${this.inputFormatWithoutOffset} ${ke}`:this.inputFormatWithoutOffset}extractDateInputFormat(){let t=new Set("yMLdQDEewGu"),e=new Set("HhaKmsSZzXxO"),n=this.format,a="",l=!1,d=!1;for(let b=0;b<n.length;b++){let x=b>0?n[b-1]:"",D=b<n.length?n[b+1]:"",gt=n[b];gt==="'"?l=x==="'"||D==="'"||!l:!l&&t.has(gt)?d=!0:!l&&e.has(gt)&&(d=!1),d&&(a+=gt)}return a.trim()}get dateInputFormat(){return this.hasDate?(this._dateInputFormat||(this._dateInputFormat=this.extractDateInputFormat()),this._dateInputFormat):""}get dateReadonlyFormat(){return this.hasDate?this.hasTime?this.format.replace(this.timeInputFormat,"").trim():this.format:""}get placeholder(){if(super.placeholder)return super.placeholder;let t=this.getContributionAsString("formatlabel");return this.hasDate&&this.hasTime&&t?.includes(" ")?t.split(" ")[0]:t}createTimeInputFormat(){if(!this.hasTime)return"";let t=this.format,e=[];t.includes("H")?e.push("HH"):t.includes("h")&&e.push("hh"),t.includes("m")&&e.push("mm"),t.includes("s")&&e.push("ss");let n=e.join(":");return t.includes("S")&&(n=`${n}.SSS`),t.includes("a")?`${n} a`:n}get timeInputFormat(){return this.createTimeInputFormat()}get timeReadonlyFormat(){return this.createTimeInputFormat()}get dateInputValue(){return typeof this.value=="string"&&this.dateInputFormat!==""?this.formatUtil.toFormat(this.value,this.dateInputFormat):""}get timeInputValue(){return typeof this.value=="string"&&this.timeInputFormat!==""?this.formatUtil.toFormat(this.value,this.timeInputFormat):""}formatValue(t){return typeof t!="string"||t===""?"":(this.type==="datetime"||this.type==="timestamp")&&St.hasFormat(t,Cn)?St.toFormat(t,this.dateReadonlyFormat):this.type==="date"?this.formatUtil.toFormat(t,this.dateReadonlyFormat):this.formatUtil.toFormat(t,this.format)}get readonlyvalue(){return typeof this.value=="string"?this.formatValue(this.value):""}get isAmbiguous(){return typeof this.value=="string"?this.formatUtil.isAmbiguous(this.value):!1}get offset(){return typeof this.value=="string"?this.formatUtil.getOffset(this.value):null}get mindate(){return this.getContributionAsString("mindate")}get maxdate(){return this.getContributionAsString("maxdate")}addServerError(t){let{id:e,message:n,properties:a,layouthint:l}=t;a&&"format"in a&&this.formatLabel&&(a.format=this.formatLabel),this.attributeErrors.addServerError(e,n,a,l)}getFormatConstraint(){switch(this.type){case"date":return new ns(this.dateInputFormat,this.formatLabel);case"time":return new os(this.timeInputFormat,this.formatLabel);default:return new ss(this.type,this.inputFormat,this.formatLabel)}}addConstraints(){let t=new rt;return t.add(this.getFormatConstraint()),(this.mindate||this.maxdate)&&t.add(new is(this.type,this.mindate,this.maxdate,this.inputFormat)),t}get readonlyWidth(){return this.type==="date"||this.type==="time"?"SMALL":"MEDIUM"}update(t){return this.inputvalue===t?this:(this.updateLastModification(),this.inputvalue=t,this)}updateByAttribute(t){if(this.reset(),t instanceof o){let e=t.value;if(e!=null){let n=this.formatUtil.toFormat(e,this.inputFormat);this.update(n)}}else console.error(`update of datetime attribute with ${t.type} not supported`)}};var us=class extends G{static isApplicableModel(t){return t.type==="helptext"||"readonly"in t&&"text"in t}get type(){return"helptext"}get text(){let e=this.getData("content")?.text?.message;if(e)return e;let n=this.getContribution("text");return n!=null?typeof n=="string"?n:n.message:null}update(t){return this}updateByAttribute(t){}getFormData(){return null}reset(){}};var ls=class extends G{static isApplicableModel(t){return"layouthint"in t&&Array.isArray(t.layouthint)?t.layouthint.includes("label"):!1}get type(){return"label"}update(t){return this}updateByAttribute(t){}getFormData(){return null}reset(){}};var Em=require("immer");var ti=class{[Em.immerable]=!0;static checkHintApplicability=!1;static isApplicableForAttribute(t){return!0}static isApplicableForHint(t){throw new J("Missing isApplicableForHint implementation on layout hint rule")}static initAttribute(t){throw new J("Missing initAttribute implementation on layout hint rule")}static initHint(t){throw new J("Missing initHint implementation on layout hint rule")}};var Tm="equals",Sm="includes",Om="notEquals",Dm="notIncludes",Im="notIsEmpty",Rm="isEmpty",Lm="show",wm="hide",cs=class o extends ti{_action="";_control="";_operator="";_options=[];static checkHintApplicability=!0;static isApplicableForHint(t){return new RegExp(`^${Nn}\\s?(${Lm}|${wm})`,"i").test(t)}static getRuleInstance(){return new o}static initHint(t){let e=this.getRuleInstance(),n=`${Tm}|${Sm}|${Om}|${Dm}|${Im}|${Rm}`,a=new RegExp(`${Nn}\\s?(\\S*)\\swhen ${Pi}:\\s?(.*?)\\s*(${n})\\s(.*)`,"i"),l=new RegExp(`${Nn}\\s?(\\S*)\\swhen ${Pi}:\\s?(.*?)\\s*(${n})`,"i"),d=t.match(a)?t.match(a):t.match(l);if(d)e.action=d[1],e.control=d[2],e.operator=d[3],e.options=d[4]?d[4]:"";else throw new Qt(`No dependent information found on layout hint: ${t}`);return e}get action(){return this._action}set action(t){this._action=t}get control(){return this._control}set control(t){this._control=t}get operator(){return this._operator}set operator(t){this._operator=t}get options(){return this._options}set options(t){this._options=t.split("|").map(e=>e.trim())}processEqualsOptions(t){if("selected"in t&&Array.isArray(t.selected)){let e=t.selected;return this.options.every(n=>e.includes(n))}throw new Qt("Dependent control in combination with equals operator must be a choice, string or number attribute")}processIncludesOptions(t){if(t.type==="choice")return this.options.some(e=>t.selected.includes(e));throw new Qt("Dependent control in combination with includes operator must be a choice attribute")}handleOperator(t){switch(this.operator){case Tm:return this.processEqualsOptions(t);case Sm:return this.processIncludesOptions(t);case Om:return!this.processEqualsOptions(t);case Dm:return!this.processIncludesOptions(t);case Im:return t?.selected.length!==0;case Rm:return t?.selected.length===0;default:throw new Qt(`Unsupported operator for dependent question: ${this.operator}`)}}getControlAttribute(t){let e=t.getAttributeByLayoutHint(`${Pi}:${this.control}`,`${Pi}: ${this.control}`);return typeof e<"u"&&e!=null&&"selected"in e&&Array.isArray(e.selected)?e:null}process(t,e){let n=this.getControlAttribute(e);if(!n)return;if(n.processLayoutHintRules(e),n.isHidden){t.hide();return}let a=this.handleOperator(n);if(this.action===Lm)t.isHidden=!a;else if(this.action===wm)t.isHidden=a;else throw new Qt(`Unsupported action ${this.action} for dependent question on attribute: ${t.label}`)}};var hs=class{_filetypeConstraints;constructor(t){this._filetypeConstraints=t}get id(){return"Constraint.File.InvalidExtension"}get extensions(){return this._filetypeConstraints.map(t=>t.extensions.join(", ")).join(", ")}hasValidation(){return!1}get defaultMessage(){return"Allowed extensions are: ${extensions}"}get parameters(){return{extensions:this.extensions}}validate(){return!0}get isMandatoryConstraint(){return!1}};var jl=Y(require("file-size"),1),Ul="Constraint.File.MaxTotalFileSize",Vl="Constraint.File.MaxFileSize",ps=class{_filesizeConstraint;constructor(t){this._filesizeConstraint=t}get id(){return this.filesizeConstraint.isMaxTotal?Ul:this.filesizeConstraint.fileSize!==void 0?Vl:""}get filesizeConstraint(){return this._filesizeConstraint}hasValidation(){return!1}get defaultMessage(){return this.id===Ul?"{filesize-left} van {max-total-filesize} over van totaal toegestaan upload bestandsgrootte":this.id===Vl?"Maximale bestandsgroote is ${max-filesize}":""}get filesize(){return(0,jl.default)(this.filesizeConstraint.fileSize??0).human("jedec")}get maxTotalFileSize(){if(this.filesizeConstraint.maxTotalFileSize)return(0,jl.default)(this.filesizeConstraint.maxTotalFileSize).human("jedec")}get parameters(){return this.id===Ul?{"filesize-left":this.filesize,"max-total-filesize":this.maxTotalFileSize}:this.id===Vl?{"max-filesize":this.filesize}:{}}validate(){return!0}get isMandatoryConstraint(){return!1}};var oO="UNCHANGED",ei=class o extends G{_files;_initialTotalFileSize=0;_maxTotalFileSize;static isApplicableModel(t){return t.type==="binary"}get type(){return"upload"}get multiple(){return this.getContributionAsBoolean("multiple",!1)}get initialTotalFileSize(){return this._initialTotalFileSize??0}set initialTotalFileSize(t){this._initialTotalFileSize=t}get maxTotalFileSize(){return this._maxTotalFileSize}set maxTotalFileSize(t){this._maxTotalFileSize=t}get currentFilesize(){return this.initialTotalFileSize+this.uploadedFileSize}get maxFileSize(){if(this.maxTotalFileSize){let t=this.maxTotalFileSize-this.currentFilesize;return t<0?0:t}return this.getContributionAsNumber("uploadMaxFileSize")}get uploadedFileSize(){if(Object.keys(this.files).length===0)return 0;let t=0;return Object.keys(this.files).forEach(e=>{let n=this.files[e];n.size&&(t+=n.size)}),t}get uploadConstraints(){let t=this.getContributionAsArray("allowedMimeTypes",[]).filter(a=>a!=="[...]");return{fileTypes:this.getContributionAsArray("allowedExtensions",[]).filter(a=>a!=="[...]").map(a=>({extensions:[a],mimeTypes:t})),maxFileSize:{fileSize:this.maxFileSize,maxTotalFileSize:this.maxTotalFileSize,isMaxTotal:this.maxTotalFileSize!==void 0},acceptedFiles:this.acceptedFiles}}get acceptedFiles(){let t=this.getContributionAsArray("allowedMimeTypes",[]).filter(n=>n!=="[...]");return[...this.getContributionAsArray("allowedExtensions",[]).filter(n=>n!=="[...]"),...t]}addConstraints(){let t=new rt;return this.uploadConstraints.fileTypes.length>0&&t.add(new hs(this.uploadConstraints.fileTypes)),(this.uploadConstraints.maxFileSize.isMaxTotal||this.uploadConstraints.maxFileSize.fileSize!==void 0)&&t.add(new ps(this.uploadConstraints.maxFileSize)),t}get files(){return this._files??{}}set files(t){this._files=t}getFilesTypeFromValue(t){if(typeof t=="object")return t;if(typeof t=="string")try{return JSON.parse(t)}catch{console.warn(`Can't parse upload value: ${t}`)}return null}update(t){if(!t)return this;let e=this.getFilesTypeFromValue(t);return e==null?this.inputvalue=t:(this.files=e,this.inputvalue=Object.keys(e).map(n=>e[n].token).join(",")),this.updateLastModification(),this}updateByAttribute(t){}get readonlyvalue(){return this.initvalue?this.initvalue.toString():""}getValue(){return this.hasValue()?this.initvalue===this.inputvalue?oO:super.getValue():null}mergeAttribute(t){t instanceof o&&t.isValid&&t.inputvalue!==null&&this.update(JSON.stringify(t.files))}reset(){this._files={}}};var fs=class o extends ti{static isApplicableForAttribute(t){return t.type==="upload"}static initAttribute(){return new o}processUploadInformation(t,e){let n=e.getAttributesByLayoutHint(Un),a=e.getAttributesByLayoutHint(Vn);if(n.length>0&&a.length>0){let l=n[0].value,d=a[0].value;t.initialTotalFileSize=Number(l),t.maxTotalFileSize=Number(d)}}process(t,e){t instanceof ei&&this.processUploadInformation(t,e)}};var ds=[cs,fs],aO=o=>{ds.push(o)},uO=o=>{let t=o(ds);if(Array.isArray(t))ds=t;else throw new On("Result of updater of updateLayoutHintRules is not an array")},ms=class o extends K{get allRules(){return ds}static setLayoutHintRules(t){let e=new o;return ds.forEach(n=>{n.isApplicableForAttribute(t)&&(n.checkHintApplicability?t.layouthint.forEach(a=>{n.isApplicableForHint(a)&&e.add(n.initHint(a))}):e.add(n.initAttribute(t)))}),t.layoutHintRules=e,t}process(t,e){this.all.forEach(n=>{n.process(t,e)})}};var gs=class{get id(){return"Constraint.BSN.InvalidFormat"}hasValidation(){return!0}get defaultMessage(){return"Must be a valid BSN"}get parameters(){return{}}isValidBSN(t){if(t.replace(/[^\d]/gu,"").length!==t.length)return!1;let e=t.replace(/\D/gu,""),n=e.length;if(n<8||n>9||Number.isNaN(e))return!1;let d=0,b=0;for(let x=n;x>0;x--){let D=parseInt(e.charAt(d),10);b+=x===1?D*-1:D*x,d+=1}return b%11===0}validate(t){return this.isValidBSN(t)}get isMandatoryConstraint(){return!1}};var km=Y(require("iban"),1),ys=class{get id(){return"Constraint.IBAN.InvalidFormat"}hasValidation(){return!0}get defaultMessage(){return"Must be a valid IBAN number"}get parameters(){return{}}validate(t){return km.default.isValid(t)}get isMandatoryConstraint(){return!1}};var nr=class{_regexConstraint;constructor(t){this._regexConstraint=t}get id(){return this.regexConstraint.messageKey}get regexConstraint(){return this._regexConstraint}hasValidation(){return!0}get defaultMessage(){return this.regexConstraint.defaultMessage||this.regexConstraint.messageKey}get parameters(){return{regex:this.regexConstraint.regex}}validate(t){return this.regexConstraint.regex instanceof RegExp?this.regexConstraint.regex.test(t):new RegExp(this.regexConstraint.regex).test(t)}get isMandatoryConstraint(){return!1}};var Te=class o extends G{get type(){return"string"}static isApplicableModel(t){return"type"in t&&t.type==="string"?!0:"layouthint"in t&&Array.isArray(t.layouthint)?t.layouthint.includes("string"):!1}getInitialInputValue(t){return this.formatValue(t)}get regexp(){return this.getContributionAsString("regexp")}get regexpvalidationmessage(){return this.getContributionAsString("regexpValidationMessage")}get postfix(){return this.getContributionAsString("postfix","")}get prefix(){return this.getContributionAsString("prefix","")}isBSN(){return this.layouthint.has("bsn")}isIBAN(){return this.layouthint.has("iban")}isZipcode(){return this.layouthint.has("zipcode")}isEmail(){return this.layouthint.has("email")}addConstraints(){let t=new rt;return this.isBSN()?t.add(new gs):this.isIBAN()&&t.add(new ys),this.isZipcode()?t.add(new nr({messageKey:"Constraint.ZipCode.InvalidFormat",defaultMessage:"Must be a valid Dutch ZIP code, e.g. 1234 AB",regex:new RegExp("^[1-9][0-9]{3} ?[a-zA-Z]{2}$","gi")})):this.isEmail()&&this.regexp?t.add(new nr({messageKey:"Constraint.Email.InvalidFormat",defaultMessage:"Must be a valid e-mail address",regex:new RegExp(this.regexp,"gi")})):this.regexp&&t.add(new nr({messageKey:"Constraint.String.InvalidRegex",defaultMessage:this.regexpvalidationmessage,regex:this.regexp})),t}reset(){this.inputvalue=""}formatIBAN(t){let n=this.removeFormat(t).replace(/\s/g,"").match(/.{1,4}/g);return n==null?"":n.join(" ")}formatZipcode(t){let e=this.removeFormat(t);return e.length===6?e.substring(0,4)+" "+e.substring(4).toUpperCase():e}formatBSN(t){return this.removeFormat(t)}formatValue(t){return t==null||t.toString()===""?"":typeof t=="string"?this.isIBAN()?this.formatIBAN(t):this.isZipcode()?this.formatZipcode(t):this.isBSN()?this.formatBSN(t):t.replace(/ {2}/gi," \xA0"):JSON.stringify(t)}removeFormat(t){return t==null||t.toString()===""?"":typeof t=="string"?this.isIBAN()||this.isZipcode()||this.isBSN()?t.replace(/[^a-z0-9,]/gi,""):t:JSON.stringify(t)}get validateValue(){return this.removeFormat(this.inputvalue)}get inputvalue(){return this.getInputValue()}set inputvalue(t){this.setInputvalue(t),t==null?this.value=t:this.value=this.removeFormat(t),this.validate(this.validateValue)}get readonlyvalue(){return typeof this.value=="string"?this.formatValue(this.value).replace(/ {2}/gi," \xA0"):this.value==null?"":JSON.stringify(this.value)}update(t){return this.inputvalue===t?this:(this.updateLastModification(),this.inputvalue=t,this)}updateByAttribute(t){this.reset(),t instanceof o?this.update(t.value):console.error(`update of string attribute with ${t.type} not supported`)}get readonlyWidth(){return this.isZipcode()||this.isBSN()?"SMALL":this.isIBAN()?"LARGE":"MEDIUM"}};var bs=class extends Te{static isApplicableModel(t){return"type"in t&&typeof t.type=="string"&&t.type==="memo"?!0:"rows"in t&&typeof t.rows=="number"?t.rows>1:!1}get type(){return"memo"}get rows(){return this.getContributionAsNumber("rows",10)}get formatted(){return this.getContributionAsBoolean("formatted",!1)}get readonlyWidth(){return"LARGE"}};var Nm=Y(oa(),1);var Fm=Y(require("big.js"),1);var sr=class o{_prefix="";_suffix="";_comma=0;_minInt=1;_minFrac=0;_maxFrac=0;_isPercentage=!1;constructor(t){this.setAffix(t),this.setFractionLengths(t),this.setGroupLength(t),this.setMinLength(t),this.setPercentage()}get prefix(){return this._prefix}get suffix(){return this._suffix}get comma(){return this._comma}get minInt(){return this._minInt}get minFrac(){return this._minFrac}get maxFrac(){return this._maxFrac}get isPercentage(){return this._isPercentage}setAffix(t){let e=t.includes("#")?t.substring(0,t.indexOf("#")):t;this._prefix=e.includes("0")?e.substring(0,e.indexOf("0")):e,this._suffix=t.substring(this._prefix.length).replace(/[#,.0]/gu,"")}setFractionLengths(t){let e=t.replace(/[^#,.0]/gu,"");if(e.includes(".")){let a=e.substring(e.indexOf(".")+1).replace(/,|\.+/g,"");this._maxFrac=a.length;let l=a.replace(/[^0]/gu,"");this._minFrac=l.length}}setGroupLength(t){let e=t.replace(/[^#,.0]/gu,""),n=e.includes(".")?e.substring(0,e.indexOf(".")):e;n.includes(",")&&(this._comma=n.length-1-n.lastIndexOf(","))}setMinLength(t){let n=(t.includes(".")?t.substring(0,t.indexOf(".")):t).replace(/[^0]/gu,"");this._minInt=n.length>1?n.length:1}setPercentage(){this._isPercentage=this.suffix.charAt(0)==="%"}static getNumericString(t){let e=Number(t),n=String(e);return!n.includes(".")&&t.includes(".")?t.substring(t.indexOf(".")+1).replace(/0/gu,"").length>0?t:n:t}formatBack(t){let e=String(t);if(!e)return"";if(!isNaN(Number(e)))return o.getNumericString(e);let n=t,a=!1;t.charAt(0)==="-"&&(n=t.substr(1),a=!0);let l=t.startsWith(this.prefix),d=this.suffix===""?t.length:t.indexOf(this.suffix,this.prefix.length+1);return l&&d>0&&(n=n.substr(0,d),n=n.substr(this.prefix.length),n=n.replace(/,/gu,""),a&&(n=`-${n}`),!isNaN(Number(n)))?o.getNumericString(n):n}static scientificNumber(t){if(t.includes("e")){let e=Number(t);return e===1/0||e===-1/0?t:String(e)}return t}getFracAsNumber(t){let e=+`0.${t}`;return this.maxFrac===0?Math.round(e).toString(10):e.toFixed(this.maxFrac)}getRoundedFrac(t){return this.getFracAsNumber(t).substr(2)}static getFraction(t){let e=t.includes(".")?t.substring(t.indexOf(".")+1):"";return e=e.replace(/\./,""),e}getFracCorrectLength(t){let e=t;e.length>this.maxFrac&&(e=this.getRoundedFrac(e));for(let n=e.length;n<this.minFrac;n++)e=`${e}0`;for(;e.length>this.minFrac&&e.charAt(e.length-1)==="0";)e=e.substring(0,e.length-1);return e}getInteger(t){let e=t.includes(".")?t.substring(0,t.indexOf(".")):t,n=Number(this.getFracAsNumber(t))>1,a=e.length-1;for(;n;){if(a===-1){e=`1${e}`;break}let l=e.charAt(a);l==="9"?l="0":(l=`${l+1}`,n=!1),e=e.substring(0,a)+l+e.substring(a+1,e.length),a-=1}for(let l=e.length;l<this.minInt;l++)e=`0${e}`;for(;e.length>this.minInt&&e.charAt(0)==="0";)e=e.substring(1);return e}addGrouping(t){let e=t,n=0;for(let a=e.length;a>0;a--)n!==0&&n%this.comma===0&&(e=`${e.substring(0,a)},${e.substring(a)}`,n=0),n+=1;return e}getFormattedValue(t,e,n){let a;return e.length>0?a=`${this.prefix+t}.${e}${this.suffix}`:a=this.prefix+t+this.suffix,n&&(a=`-${a}`),a}format(t=""){if(t===null)return"";let e=this.formatBack(t).toLowerCase();if(isNaN(Number(e))||e.length===0)return t;if(e=o.scientificNumber(e),e.includes("e"))return e;let n=e.charAt(0)==="-";(n||e.charAt(0)==="+")&&(e=e.substring(1));let a=o.getFraction(e),l=this.getInteger(e);if(this.isPercentage){let b=`00${`${a}00`.substr(0,2)}`.substr(-2);l=`${l}${b}`,a=a.substr(2)}return a=this.getFracCorrectLength(a),l=this.addGrouping(l),this.getFormattedValue(l,a,n)}};var _t=class{static removeGroupingSeparator=(t,e)=>{if(typeof t=="number"||e==null)return t;let n=e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&");return t.replace(new RegExp(n,"g"),"")};static updateDecimalSeparator=(t,e)=>typeof t=="number"||e==null||e===""?t:t.replace(e,".");static parseToNumber=(t,e=",",n=".")=>{if(!(typeof t=="number"||typeof t=="string")||t==="")return NaN;let a=this.removeGroupingSeparator(t,e),l=this.updateDecimalSeparator(a,n);return Number(l)};static parseNumberToString=(t,e=",",n=".")=>{if(t==null||t==="")return"NaN";let a=this.removeGroupingSeparator(t,e),l=this.updateDecimalSeparator(a,n);try{return(0,Fm.default)(l).toFixed()}catch{return"NaN"}};static updateGroupingSeparator(t,e){return e==null?t:t.replace(/,/g,e)}static formatNumber(t,e="#",n=",",a="."){if(t==null)return"";let l=typeof t=="number"?t:this.parseToNumber(t,n,a);if(typeof l!="number")throw new P(`Not a valid number: ${t} for formatValue`);let d=this.parseNumberToString(l);if(e!=null){let b=new sr(e).format(d),[x,D]=b.split("."),gt=this.updateGroupingSeparator(x,n);return D?`${gt}${a}${D}`:gt}return d}static isSameOrBefore(t,e){return t<=e}static isBefore(t,e){return t<e}};var Wl="Constraint.Number.InexactNumber",Gl="Constraint.Number.OutOfRange",ql="Constraint.Number.BelowMinimum",$l="Constraint.Number.AboveMaximum",Cs=class{_minNumber;_maxNumber;_groupingSeparator=",";_decimalSeparator=".";_format="";constructor(t=null,e=null,n=",",a=".",l){this._format=l??"",this._groupingSeparator=n,this._decimalSeparator=a,this._minNumber=t,this._maxNumber=e}get id(){return this.minNumber!==null&&this.maxNumber!==null&&this.minNumber===this.maxNumber?Wl:this.minNumber!==null&&this.maxNumber!==null?Gl:this.minNumber!==null?ql:this.maxNumber!==null?$l:"Constraint.Number.NoBoundaryConstraint"}get minNumber(){return this._minNumber}get maxNumber(){return this._maxNumber}get format(){return this._format}get groupingSeparator(){return this._groupingSeparator}get decimalSeparator(){return this._decimalSeparator}hasValidation(){return!0}get defaultMessage(){switch(this.id){case Wl:return"Number must be precisely ${min-number}";case Gl:return"Must be between ${min-number} and ${max-number}";case ql:return"The number must be larger than ${min-number}";case $l:return"The number must be smaller than ${max-number}";default:return""}}get parameters(){return{"min-number":this.minNumber===null?null:_t.formatNumber(this.minNumber,this.format,this.groupingSeparator,this.decimalSeparator),"max-number":this.maxNumber===null?null:_t.formatNumber(this.maxNumber,this.format,this.groupingSeparator,this.decimalSeparator)}}isExactNumber(t){return _t.parseToNumber(t,this.groupingSeparator,this.decimalSeparator)===this.minNumber}isSameOrAboveMinNumber(t){let e=_t.parseToNumber(t,this.groupingSeparator,this.decimalSeparator);return isNaN(e)||e==null?!1:this.minNumber!=null&&e>=this.minNumber}isSameOrBelowMaxNumber(t){let e=_t.parseToNumber(t,this.groupingSeparator,this.decimalSeparator);return isNaN(e)||e==null?!1:this.maxNumber!=null&&e<=this.maxNumber}isBetweenNumbers(t){return this.isSameOrAboveMinNumber(t)&&this.isSameOrBelowMaxNumber(t)}validate(t){switch(this.id){case Wl:return this.isExactNumber(t);case Gl:return this.isBetweenNumbers(t);case ql:return this.isSameOrAboveMinNumber(t);case $l:return this.isSameOrBelowMaxNumber(t);default:return!0}}get isMandatoryConstraint(){return!1}};var Kl="Constraint.Number.InvalidInteger",_s=class{_decimalSeparator=",";_groupingSeparator=".";_format="0";constructor(t=",",e=".",n="0"){this._decimalSeparator=e,this._groupingSeparator=t,this._format=n??"0"}get id(){return this.maxDigits===0?Kl:"Constraint.Number.InvalidDecimal"}get decimalSeparator(){return this._decimalSeparator}get groupingSeparator(){return this._groupingSeparator}get format(){return this._format}get maxDigits(){return this.format?new sr(this.format).maxFrac:0}hasValidation(){return!0}get defaultMessage(){return this.id===Kl?"Must be a whole number":"The value is not correct numeric format"}get parameters(){return{"max-digits":this.maxDigits}}isInteger(t){return Number.isInteger(t)}getNumberOfDigits(t){return Math.floor(t)===t?0:_t.parseNumberToString(t).split(".")[1].length}isValidDecimal(t){if(isNaN(t))return!1;let e=this.getNumberOfDigits(t);return!isNaN(parseFloat(String(t)))&&isFinite(t)&&e<=this.maxDigits}validate(t){if(this.maxDigits===0&&this.decimalSeparator!==""&&t.toString().includes(this.decimalSeparator))return!1;let e=_t.parseToNumber(t,this.groupingSeparator,this.decimalSeparator);return this.id===Kl?this.isInteger(e):this.isValidDecimal(e)}get isMandatoryConstraint(){return!1}};var lO=3,As=class{_decimalSeparator;_groupingSeparator;_format;constructor(t=",",e=".",n="0"){this._decimalSeparator=e,this._groupingSeparator=t,this._format=n??"0"}get id(){return"Constraint.Number.GroupingSeparator"}get decimalSeparator(){return this._decimalSeparator}get groupingSeparator(){return this._groupingSeparator}get format(){return this._format}get groupSize(){if(this.format){let t=new sr(this.format).comma;if(t>0)return t}return lO}hasValidation(){return!0}get defaultMessage(){return"Group divider '${group-divider}' must be correctly placed"}get parameters(){return{"group-divider":this.groupingSeparator}}hasCorrectGrouping(t){let e=t.replace("-","").replace("+","");if(!e.includes(this.groupingSeparator))return!0;let n=e;if(this.decimalSeparator!==""&&e.includes(this.decimalSeparator)){if(e.indexOf(this.decimalSeparator)<e.indexOf(this.groupingSeparator))return!1;n=e.substring(0,e.indexOf(this.decimalSeparator))}let a=n.split(this.groupingSeparator);return a[0].length<this.groupSize&&(a=a.slice(1)),a.every(l=>l.length===this.groupSize)}validate(t){return this.groupingSeparator===""||typeof t!="string"||!t.includes(this.groupingSeparator)||this.hasCorrectGrouping(t)}get isMandatoryConstraint(){return!1}};var ri=class o extends G{static isApplicableModel(t){return"type"in t&&typeof t.type=="string"?t.type==="number"||t.type==="integer":!1}get type(){return"number"}getInitialInputValue(t){return t==null?"":this.formatValue(t)}get groupingSeparator(){return this.getContributionAsString("groupingSeparator","")}get decimalSeparator(){return this.getContributionAsString("decimalSeparator","")}get minNumber(){return this.getContributionAsNumber("minimum")}get maxNumber(){return this.getContributionAsNumber("maximum")}get maxDigits(){let t=this.format;return t!=null&&t.includes(".")?t.split(".")[1].length:0}get unit(){return this.getContributionAsString("unit","")}addConstraints(){let t=new rt;return t.add(new _s(this.groupingSeparator,this.decimalSeparator,this.format)),t.add(new As(this.groupingSeparator,this.decimalSeparator,this.format??void 0)),t.add(new Cs(this.minNumber,this.maxNumber,this.groupingSeparator,this.decimalSeparator,this.format??void 0)),t}reset(){this.inputvalue=""}get format(){return this.getContributionAsString("format","0")}formatValue(t){return typeof t=="string"||typeof t=="number"?_t.formatNumber(t,this.format,this.groupingSeparator,this.decimalSeparator):""}get readonlyvalue(){return(0,Nm.default)(this.value)?JSON.stringify(this.value):this.formatValue(this.value)}get inputvalue(){return this.getInputValue()}set inputvalue(t){this.setInputvalue(t),this.validate(t);let e=_t.parseToNumber(t,this.groupingSeparator,this.decimalSeparator);this.value=isNaN(e)?null:_t.parseNumberToString(e)}getValue(){let t=super.getValue();return t==null||t===""?null:Number(t)}update(t){return t===this.inputvalue?this:(this.updateLastModification(),this.inputvalue=t,this)}updateByAttribute(t){this.reset(),t instanceof o?this.update(t.value):console.error(`update of number attribute with ${t.type} not supported`)}get isHidden(){return super.isHidden||this.layouthint.has(Un,Vn,Wr)}set isHidden(t){super.isHidden=t}get readonlyWidth(){return"SMALL"}};var vs=class extends ri{static isApplicableModel(t){return"type"in t&&typeof t.type=="string"&&t.type==="money"?!0:"layouthint"in t&&Array.isArray(t.layouthint)?t.layouthint.includes("money"):!1}get type(){return"money"}get currencySymbol(){return this.getContributionAsString("currencySymbol","")}get prefix(){return this.currencySymbol}get readonlyWidth(){return"SMALL"}};var Wi=class{_otherPasswordLabel;_otherPasswordValue;constructor(t,e){this._otherPasswordLabel=e,this._otherPasswordValue=t}get id(){return"Constraint.Password.ConfirmMismatch"}get otherPasswordLabel(){return this._otherPasswordLabel}get otherPasswordValue(){return this._otherPasswordValue}hasValidation(){return!0}get defaultMessage(){return"Must match ${other} field"}get parameters(){return{other:this.otherPasswordLabel}}validate(t){return t===this.otherPasswordValue}get isMandatoryConstraint(){return!1}};var Ms=class{get id(){return"Constraint.Password.LowerAndUpperCaseMandatory"}hasValidation(){return!0}get defaultMessage(){return"Must contain both upper and lowercase characters"}get parameters(){return{}}validate(t){return/[a-z]/u.test(t)&&/[A-Z]/u.test(t)}get isMandatoryConstraint(){return!1}};var xs=class{_minNumeric;constructor(t){this._minNumeric=t}get id(){return"Constraint.Password.MinNumericCharactersMandatory"}get minNumeric(){return this._minNumeric}hasValidation(){return!0}get defaultMessage(){return"Must contain ${min-numeric} or more numerical characters"}get parameters(){return{"min-numeric":this.minNumeric}}validate(t){return t.replace(/\D/gu,"").length>=this.minNumeric}get isMandatoryConstraint(){return!1}};var Es=class{_minSpecial;constructor(t){this._minSpecial=t}get id(){return"Constraint.Password.MinSpecialCharactersMandatory"}get minSpecial(){return this._minSpecial}hasValidation(){return!0}get defaultMessage(){return"Must contain ${min-special} or more special characters"}get parameters(){return{"min-special":this.minSpecial}}validate(t){return t.replace(/[\da-z]/giu,"").length>=this.minSpecial}get isMandatoryConstraint(){return!1}};var Ts=class{_maxSequence;constructor(t=2){this._maxSequence=t}get id(){return"Constraint.Password.ThreeConsecutiveCharactersNotAllowed"}get maxSequence(){return this._maxSequence}hasValidation(){return!0}get defaultMessage(){return"Must not contain any character more than twice consecutively"}get parameters(){return{"max-sequence":this.maxSequence}}hasNoSequenceOfIdenticalCharacters(t){return!t.split("").filter((e,n)=>t.indexOf(e)===n).some(e=>{let n=e.repeat(this.maxSequence+1);return t.includes(n)})}validate(t){return this.hasNoSequenceOfIdenticalCharacters(t)}get isMandatoryConstraint(){return!1}};var Ss=class extends Te{_confirmValue;_isConfirmPassword=!1;_otherLabel="";static isApplicableModel(t){return t.type==="password"?!0:"layouthint"in t&&Array.isArray(t.layouthint)?t.layouthint.includes("password"):!1}get type(){return"password"}update(t){return this.updateLastModification(),this.inputvalue=t,this}get constraints(){return this.getContributionAsObject("constraints",{})}get upperAndLowerCaseMandatory(){return this.constraints.upperAndLowerCaseMandatory}get maxSequenceOfIdenticalCharacters(){return this.constraints.maxSequenceOfIdenticalCharacters}get maxSequenceOfUsernameCharacters(){return this.constraints.maxSequenceOfUsernameCharacters}get minNumberOfNumericCharacters(){return this.constraints.minNumberOfNumericCharacters}get minNumberOfSpecialCharacters(){return this.constraints.minNumberOfSpecialCharacters}get regexConstraint(){return this.constraints.regexConstraint}addConstraints(){return this.isConfirmPassword?this.getConfirmPasswordConstraints():this.getStandardPasswordConstraints()}getConfirmPasswordConstraints(){let t=new rt;return t.add(new Wi(this.confirmValue,this.otherLabel)),t}getStandardPasswordConstraints(){let t=new rt;return this.upperAndLowerCaseMandatory&&t.add(new Ms),this.maxSequenceOfIdenticalCharacters&&t.add(new Ts(this.maxSequenceOfIdenticalCharacters)),this.minNumberOfNumericCharacters&&t.add(new xs(this.minNumberOfNumericCharacters)),this.minNumberOfSpecialCharacters&&t.add(new Es(this.minNumberOfSpecialCharacters)),this.regexConstraint&&this.regexConstraint.length>0&&this.regexConstraint.forEach(e=>{t.add(new nr(e))}),this.layouthint.has(dl)&&this.isConfirmPassword==null&&t.add(new Wi(this.confirmValue,this.otherLabel)),t}get constraintCollection(){return this.isConfirmPassword?this.getConfirmPasswordConstraints():super.constraintCollection}get isConfirmPassword(){return this._isConfirmPassword}set isConfirmPassword(t){this._isConfirmPassword=t}get confirmValue(){return this._confirmValue??""}set confirmValue(t){this._confirmValue=t,this.validate(this.inputvalue)}get otherLabel(){return this._otherLabel}set otherLabel(t){this._otherLabel=t}validate(t){return this.useClientsideValidation()?(this.isOptionalAndEmpty(t)?this.setIsValid(!0):this.getPreviouslyValidatedValue()!==`${this.confirmValue}-${t}`&&this.setIsValid(this.constraintCollection.validate(t)),this.setPreviouslyValidatedValue(`${this.confirmValue}-${t}`),this.getIsValid()):!0}getFormData(){return this.isConfirmPassword||this.inError()?null:{[this.name]:this.value}}};var Os=class{_type;_start;_end;constructor(t,e,n){this._type=t,this._start=e,this._end=n}get type(){return this._type}get id(){switch(this.type){case"date":return"Constraint.DateRange.Mandatory";case"time":return"Constraint.TimeRange.Mandatory";case"datetime":return"Constraint.DateTimeRange.Mandatory";case"timestamp":return"Constraint.TimeStampRange.Mandatory";default:return"Constraint.Range.Mandatory"}}hasValidation(){return!0}get defaultMessage(){return"Field is mandatory: must contain at least a start or end value"}get parameters(){return{}}validate(){return this._start.hasErrors()||(this._end?.hasErrors()??!1)?!0:this._start.hasValue()||(this._end?.hasValue()??!1)}get isMandatoryConstraint(){return!0}};var Ds=class{_start;_end;constructor(t,e){this._start=t,this._end=e}get id(){let t=this.hasInclusiveBounds?"InvalidRangeInclusive":"InvalidRange";switch(this.rangeType){case"time":return`Constraint.TimeRange.${t}`;case"date":return`Constraint.DateRange.${t}`;case"datetime":return`Constraint.DateTimeRange.${t}`;case"timestamp":return`Constraint.TimeStampRange.${t}`;default:return`Constraint.NumberRange.${t}`}}get defaultMessage(){let t=this.hasInclusiveBounds?" or equal to the":"";switch(this.rangeType){case"time":return`Start time must be before${t} end time`;case"date":return`Start date must be before${t} end date`;case"datetime":return`Start value must be before${t} end value`;case"timestamp":return`Start value must be before${t} end value`;default:return`Start value must be less than${t} the end value`}}hasValidation(){return!0}get parameters(){return{}}get start(){return this._start}get end(){return this._end}get rangeType(){return this.start.type}get hasInclusiveBounds(){return this.start.operator==="greaterThanOrEqualTo"&&this.end.operator==="lessThanOrEqualTo"}getDateTimeUtil(){switch(this.rangeType){case"time":return ir;case"date":return St;case"timestamp":return Pe;default:return Ne}}doValidate(t,e){return typeof t=="number"&&typeof e=="number"?this.hasInclusiveBounds?_t.isSameOrBefore(t,e):_t.isBefore(t,e):typeof t=="string"&&typeof e=="string"?this.hasInclusiveBounds?this.getDateTimeUtil().isSameOrBefore(t,e):this.getDateTimeUtil().isBefore(t,e):!1}validate(){return this.start.inError()||this.end.inError()?!0:this.doValidate(this.start.value,this.end.value)}get isMandatoryConstraint(){return!1}};var or=class o extends G{_startAttribute;_endAttribute;constructor(t,e,n){if(super(t,e,n),!Array.isArray(e?.children))throw new Error(`Problem reading contributions of range attribute: ${this.key}, the children property must be an array.`);this._startAttribute=this.createChild(0),this._endAttribute=this.createChild(1),this.setChildrenOptionality()}get start(){return this._startAttribute}get end(){return this._endAttribute}get type(){return"range"}static isApplicableModel(t){return t.type.includes("range")}getInitialChildModelLinks(){return[...this.start.getInitialChildModelLinks(),...this.end.getInitialChildModelLinks()]}setChildModels(t,e){this.start.setChildModels(t,e),this.end.setChildModels(t,e)}getInputValue(){return[this.start.getInputValue(),this.end.getInputValue()].join(",")}hasValue(){return this.start.hasValue()||this.end.hasValue()}get constraintCollection(){let t=new rt;return t.add(this.getServerConstraints()),t.add(this.addConstraints()),t}setUseClientsideValidation(t){super.setUseClientsideValidation(t),this.start.setUseClientsideValidation(t),this.end.setUseClientsideValidation(t)}validate(t){if(!this.useClientsideValidation())return!0;let e=this.start.isValid&&this.end.isValid;return e&&(e=this.constraintCollection.validate(t)),this.setIsValid(e),this.getIsValid()}addConstraints(){let t=new rt;return this.start.hasValue()&&this.end.hasValue()&&t.add(new Ds(this.start,this.end)),this.mandatory&&!this.start.mandatory&&!this.end.mandatory&&t.add(new Os(this.start.type,this.start,this.end)),t}get isValid(){return this.validate("")}hasServerErrors(){return this.errorCollection.serverErrors.length>0||this.start.hasServerErrors()||this.end.hasServerErrors()}hasErrors(){return this.errorCollection.hasItems()||this.start.hasErrors()||this.end.hasErrors()}reset(){this.start.reset(),this.end.reset()}mergeAttribute(t){this.concept=t.concept,t instanceof o&&(this.start.mergeAttribute(t.start),this.end.mergeAttribute(t.end))}update(t,e){if(!e)throw new P("Range attribute needs changed attribute on update call");return this.updateLastModification(),this.start.equals(e)&&this.start.update(t),this.end.equals(e)&&this.end.update(t),this.setChildrenOptionality(),this.validate(t),this}updateByAttribute(t){t instanceof o?(this.start.updateByAttribute(t.start),this.end.updateByAttribute(t.end)):console.error(`update of range attribute with ${t.type} not supported`)}get readonly(){return super.readonly??(this.start.readonly&&this.end.readonly)}set readonly(t){super.readonly=t}get readonlyvalue(){let t=[];return this.start.value!==null&&t.push(this.start.value),this.end.value!==null&&t.push(this.end.value),t.join(", ")}get initvalue(){return{[this.start.key]:this.start.initvalue,[this.end.key]:this.end.initvalue}}getFormData(){return{[this.name]:this.value}}getValue(){return{...this.start.formdata,...this.end.formdata}}get isResult(){return this._isResult}set isResult(t){this._isResult=t,this.start.isResult=t,this.end.isResult=t}indicateContentConfiguration(t){t&&(this.start.indicateContentConfiguration(t),this.end.indicateContentConfiguration(t))}equals(t){return this.key===t.key&&this.parentKey===t.parentKey||this.start.equals(t)||this.end.equals(t)}get readonlyWidth(){switch(this.start.type){case"datetime":return"LARGE";case"timestamp":return"EXTRA_LARGE";default:return"MEDIUM"}}createChild(t){let e=this.data.children?.[t];Array.isArray(e)&&(e=void 0);let n=this.contributions.children[t],[a]=Object.keys(n),l=n[a],d=Ct.createAttribute(a,e??{},l,this.modelOptions);return d&&e&&"key"in e&&(d.parentKey=e.key),d}setChildrenOptionality(){let t=!this.mandatory&&this.start.value===null&&this.end.value===null;this.start&&(this.start.mandatory=t||this.start.configuredMandatory?!1:this.start.configuredMandatory),this.end&&(this.end.mandatory=t||this.end.configuredMandatory?!1:this.end.configuredMandatory)}};var Is=class{get id(){return"Constraint.XML.InvalidFormat"}hasValidation(){return!0}get defaultMessage(){return"Must be well-formed XML"}get parameters(){return{}}isValidXML(t){let e=new DOMParser;try{if(e.parseFromString(t,"text/xml").querySelectorAll("parsererror").length>0)return!1}catch{return!1}return!0}validate(t){return this.isValidXML(t)}get isMandatoryConstraint(){return!1}};var Rs=class extends Te{static isApplicableModel(t){return"type"in t&&typeof t.type=="string"&&t.type==="xml"?!0:"layouthint"in t&&Array.isArray(t.layouthint)?t.layouthint.includes("xml"):!1}get type(){return"xml"}get rows(){return 10}addConstraints(){let t=new rt;return t.add(new Is),t}get readonlyWidth(){return"EXTRA_LARGE"}};var Ct=class{static get ATTRIBUTE_MODELS(){return[Ve,es,us,ls,Rs,bs,Te,as,vs,ri,Ss,ei,dt,or,rs]}static createAttribute(t,e,n,a){let l=this.getAttributeModel(n);if(!l)throw new Error("Could not find model for contributions: "+n);let d=n.children,b=new Ls(t,e,Array.isArray(d)?Ls.getChildrenKeys(d):[]).getData(),x=new l(b,n,a);return ms.setLayoutHintRules(x),x}static getAttributeModel(t){return this.ATTRIBUTE_MODELS.find(e=>e.isApplicableModel(t))}},Ls=class o{_key;_data;_value;_links;_children;constructor(t,e,n){this._key=t,this._data=this.getAttributeData(t,e),this._value=this.getValue(),this._links=this.getLinks(),this._children=this.createChildren(e,n)}get key(){return this._key}get data(){return this._data}get value(){return this._value}get links(){return this._links}get children(){return this._children}getAttributeData(t,e){return Array.isArray(e)?e.find(n=>"elementid"in n&&n.elementid===t||"name"in n&&n.name===t||"param"in n&&n.param===t)||{}:e}getValue(){let t;return this.key in this.data?t=this.data[this.key]:"values"in this.data?t=this.data.values:"value"in this.data?t=this.data.value:"suggestions"in this.data?t=this.data.suggestions:"suggestion"in this.data?t=this.data.suggestion:"options"in this.data&&Array.isArray(this.data.options)&&(t=this.data.options.filter(e=>e.selected).map(e=>e.code||e.key)),t}getDynamicschemaFromData(){if("dynamicschema"in this.data){let{dynamicschema:t}=this.data;return Array.isArray(t),t}return null}getDynamicSchema(){let t=this.getDynamicschemaFromData();if(!t)return;if(Array.isArray(t))return t;let e=this.getDynamicSchemaId();if(typeof e=="string"&&e in t&&Array.isArray(t[e]))return t[e].map(n=>"elements"in n?{...n,elements:{...n.elements,dynamicschema:t}}:n)}getDynamicSchemaId(){return typeof this.data.dynamicschemaId=="string"||typeof this.data.dynamicschemaId=="number"?this.data.dynamicschemaId:this.key}getStatic(){return typeof this.data.static=="boolean"?this.data.static:!1}getLinks(){return(0,zl.pick)(this.data._links,["concept","download","lookupOptions","lookupList"])}getOptions(){return this.data.options}getMessage(){return this.data.message}isResult(){return typeof this.data.isResult=="boolean"?this.data.isResult:!1}getReferenceDate(){if(typeof this.data.referenceDate=="string")return this.data.referenceDate}getContent(){if("content"in this.data){let t=(0,zl.pick)(this.data.content,["header","label","elements","layouthint","text"]);if(Object.keys(t).length>0)return t}return null}getData(){return{key:this.key,value:this.value,static:this.getStatic(),_links:this.links,dynamicschema:this.getDynamicSchema(),dynamicschemaId:this.getDynamicSchemaId(),options:this.getOptions(),message:this.getMessage(),isResult:this.isResult(),referenceDate:this.getReferenceDate(),content:this.getContent(),children:this.children}}static getChildrenKeys(t){return t.map(e=>{let[n]=Object.keys(e),a=e[n].type==="range"||e[n].type==="composite",l=e[n].dynamicschemaId,d=a?e[n]?.children:[];return{key:n,dynamicschemaId:l,children:this.getChildrenKeys(d)}})}createChildren(t,e){if(this.value===null)return e.map(l=>this.createChild(t,{[l.key]:null},l));let a=this.value;return Array.isArray(a)?a.map(l=>e.map(d=>{let b=this.childData(l,this.key,d.key);return this.createChild(t,b,d)})):e.map(l=>{let d=this.childData(t,this.key,l.key);return this.createChild(t,d,l)})}getDataContent(t,e){if(t&&e in t)return t[e]}childData(t,e,n){if(Array.isArray(t)){if(Array.isArray(this.data.elements))return this.data.elements.find(a=>a.elementid===n)}else if(e in t&&(0,_a.default)(t[e])){let a=t[e],l=this.getDataContent(t.content,n);return{...a,content:l}}else if(n in t&&(0,_a.default)(t[n]))return t[n];return(0,_a.default)(t)?t:{}}createChild(t,e,n){let a="dynamicschema"in t?t.dynamicschema:void 0,l=null;return n.dynamicschemaId?l=n.dynamicschemaId:n.key&&typeof t=="object"&&"key"in t&&typeof t.key=="string"&&(l=`${t.key}.${n.key}`),new o(n.key,{...e,dynamicschema:a,dynamicschemaId:l},n.children).getData()}};var ft=class extends Tt{constructor(t={elementid:"none"},e=[],n){super(),e.forEach(a=>{let[l,d]=Object.entries(a)[0],b=Ct.createAttribute(l,t,d,{origin:n?.origin,contextPath:n?.contextPath});b!==null&&(n?.isReadonly&&!(0,Pm.default)(d,"readonly")&&(b.readonly=!0),this.collection.push(b))}),this.processLayoutHintRules()}get attributes(){return this.processLayoutHintRules(),this.all}set attributes(t){this.collection=t}processLayoutHintRules(){this.all.forEach(t=>{t.processLayoutHintRules(this)})}get visible(){return this.attributes.filter(t=>!t.isHidden)}get questions(){return this.visible.filter(t=>!t.isResult)}get results(){return this.visible.filter(t=>t.isResult)}getAttributeByAttribute(t){return this.find(e=>e.equals(t)?!0:t instanceof dt?t.getChildByAttribute(e):!1)}getAttributeByKey(t){return this.find(e=>e.key===t?!0:e instanceof dt?e.getChildByKey(t):!1)}hasAttributeByKey(t){return this.getAttributeByKey(t)!=null}getAttributeByLayoutHint(...t){return this.find(e=>e.layouthint.has(...t))}getChoiceAttributeByLayoutHint(t){let e=this.getAttributeByLayoutHint(t);if(e instanceof Ve)return e}getAttributesByLayoutHint(...t){return this.filter(e=>e.layouthint.has(...t))}replace(t,e){this.replaceByKey(t.key,e)}replaceByKey(t,e){this.forEach((n,a)=>{n.key===t&&(this.collection[a]=e)})}setReferenceDate(t){this.forEach(e=>{e.referenceDate=t})}hasServerErrors(){return this.collection.some(t=>t.hasServerErrors())}addServerError(t){let e=t?.anchor?.elementid;if(e){let n=this.getAttributeByKey(e);if(n)n.addServerError(t);else throw new Qt(`Could not add error to missing attribute with id ${e}`)}}hasErrors(){return this.visible.some(t=>t.hasErrors())}updateValidations(t){return this.all.filter(e=>e.hasDynamicValidationData).forEach(e=>{let n=t.filter(a=>a.anchor?.elementid===e.key);if(e.updateValidations(n),e instanceof dt){let a=t.filter(l=>{let d=l.anchor?.elementid;return d&&d.startsWith(`${e.key}.`)});e.children.updateValidations(`${e.key}.`,a)}}),this}indicateContentConfiguration(t){t&&this.all.forEach(e=>{e.indicateContentConfiguration(t)})}get formdata(){return this.getFormData(!1)}getFormData(t=!1){let e=this.attributes.filter(a=>a.formdata!==null&&!a.readonly&&(!t||a.hasDynamicValidationData)).map(a=>a.isVisible?a.formdata:a.getEmptyFormData()),n={};return e.forEach(a=>{n={...n,...a}}),n}};var ws=class o extends q{_fieldCollection;_selfhref;_icon;constructor(t,e,n){super(t,e,n),this._fieldCollection=this.createFieldCollection(n)}static create(t,e,n,a="form",l,d){let b={name:t,href:e},x={name:t,label:n??t,type:a};return new o(b,x,{origin:l,contextPath:d})}createFieldCollection(t){let e={},n=[];return"fields"in this.data&&typeof this.data.fields=="object"&&this.data.fields!=null&&(e=this.data.fields),"fields"in this.contributions&&Array.isArray(this.contributions.fields)&&(n=this.contributions.fields),new ft(e,n,{...t,isReadonly:!0})}get isDisabled(){return!this.data.href}get selfhref(){return this._selfhref??new U(`${this.data.href}?${this.querystring}`,"Form",this.modelOptions)}set selfhref(t){this._selfhref=t}get method(){let t=this.getDataAsString("method","POST");return Nt[t]}get type(){return this.layouthint.has(Bn)?"create":this.layouthint.has(Hn)?"update":this.layouthint.has(Pn)?"delete":this.getContributionAsString("type","general")}get name(){return this.getDataAsString("name","unknown")}get fields(){return this._fieldCollection.all}get fieldCollection(){return this._fieldCollection}set fieldCollection(t){this._fieldCollection=t}get querystring(){return this.fields.filter(t=>t.value!=null&&t.value!=="").map(t=>{let{value:e}=t;return e!==null?`${t.name}=${e}`:t.name}).join("&")}getFieldByKey(t){return this._fieldCollection.getAttributeByKey(t)}hasFieldByKey(t){return this.getFieldByKey(t)!=null}get key(){return this.getDataAsString("name")}get label(){return this.getContributionAsString("label",this.key)}get isProcessTask(){return(0,Hm.default)(this.contributions,"processTask")}get processStatus(){if(this.isProcessTask){let t=this.data.processStatus||{},e=this.contributions.processTask||{};return new $r(t,e,this.modelOptions)}}get icon(){return this._icon}set icon(t){this._icon=t}};var re=class o extends K{constructor(t,e,n){super(),this.collection=this.createCollection(t,e,n)}createCollection(t,e,n){let a=[];if(t&&e&&Array.isArray(t)&&Array.isArray(e))for(let l of t){let d=e.find(b=>{if(typeof b=="object"&&b!==null&&"name"in b&&"type"in b&&"name"in l)return b.name===l.name&&b.type!=="service-operation"});d&&a.push(new ws(l,d,n))}return a}getActionByKey(t){let e=new o;return e.collection=this.filter(n=>n.key===t),e.first}getActionsByType(t){let e=new o;return e.collection=this.filter(n=>Array.isArray(t)?t.includes(n.type):n.type===t),e}getActionsByLayoutHint(...t){let e=new o;return e.collection=this.filter(n=>n.layouthint.has(...t)),e}hasActionsByLayoutHint(...t){return this.getActionsByLayoutHint(...t).length>0}get routePath(){let t=this.collection.filter(n=>!n.isDisabled);if(t.length===0)return"__NON_EXISTING_ROUTE__";let e=t.map(n=>n.selfhref.path).join("|");return this.length>1?`(${e})`:e}};var je=class extends F{get type(){return"User"}get username(){return this.getDataAsString("Username","Guest")}get fullname(){return this.getDataAsString("Fullname","Guest")}};var ii=class extends F{_user;_mustChangePassword=!1;get type(){return"UserServices"}getInitialChildModelLinks(){let t=this.userLink;return t?[t]:[]}setChildModels(t,e){this.user=t.find(n=>n instanceof je)}get userLink(){return this.links.getLinkByKey("Userdata")}get user(){return this._user}set user(t){this._user=t}get changePassword(){return this.links.getLinkByKey("ChangePassword")?.href}get isLoggedIn(){let t=this.user instanceof je;return this.links.length>3||t||st.getItem("basic-ok")===!0}set mustChangePassword(t){this._mustChangePassword=t}get mustChangePassword(){return this._mustChangePassword}};var ks=class extends F{_userServices;constructor(t){super(t),st.setItem("primaryAuthenticationType",this.primaryAuthenticationType)}get type(){return"Application"}get tabs(){return this.links.getLinksByGroup("tab")}get modelcatalog(){return ve.create("modelcatalog","/modelcatalog","Model catalog",this.modelOptions)}get userServices(){return this._userServices}set userServices(t){this._userServices=t}get user(){return this.userServices?.user}get userHref(){return this.userServices?.userLink?.href}getInitialChildModelLinks(){let t=this.links.getLinkByKey("UserServices");if(t&&t.href.path==="/login")throw new In("The user service (Login panel) should not have the uri '/login', use a different URI because this uri matches the login service.");return t?[t]:[]}setChildModels(t,e){this.userServices=t.find(n=>n instanceof ii)}get isLoggedIn(){return this.userServices?.isLoggedIn??!1}get userMustChangePassword(){return this.userServices?.mustChangePassword??!1}get authenticationTypes(){let t=this.getContributionAsArray("security",[ra]);return t?t?.sort((e,n)=>e.isPrimary===n.isPrimary?0:e.isPrimary?-1:1):[ra]}get primaryAuthenticationType(){return this.authenticationTypes[0]}};var Bm=Y(te(),1);var Er=class o extends q{_key;_attributeCollection;constructor(t="",e,n,a){super(e,n,a);let l=this.contributions.attributes?this.contributions.attributes.filter(d=>{let[b]=Object.keys(d);return(0,Bm.has)(this.data,b)}):[];this._attributeCollection=new ft(this.data,l,{...a,isReadonly:!0}),this._key=t}get key(){return this._key}set key(t){this._key=t}get label(){return this.contributions.label}get attributeCollection(){return this._attributeCollection}set attributeCollection(t){this._attributeCollection=t}createChildAttributeSetModel(t,e,n){let a=this.contributions.objects;return new o(n?`${t}-${n+1}`:t,{...e,dynamicschema:this.data.dynamicschema},a?.[t],this.modelOptions)}getChildAttributeSets(){if(!this.contributions.objects)return[];let t=[];for(let e of Object.keys(this.contributions.objects))if(e in this.data){let n=this.data[e];if(Array.isArray(n))for(let[a,l]of n.entries())t.push(this.createChildAttributeSetModel(e,l,a));else t.push(this.createChildAttributeSetModel(e,n))}return t}};var Se=class o extends F{_attributeCollection;_metadataCollection;_actionCollection;constructor(t){super(t),this._attributeCollection=this.createAttributeCollection(),this._metadataCollection=this.createMetadataCollection(),this._actionCollection=this.createActionCollection()}get type(){return"Detail"}getInitialChildModelLinks(){return this._attributeCollection.getInitialChildModelLinks()}setChildModels(t,e){this._attributeCollection.setChildModels(t,e)}get id(){let t=this.getDataAsNumber("_id");return t||this.getDataAsString("_id",this.key)}get label(){return this.getContributionAsString("label","")}createAttributeCollection(){let t=this.getContributionAsArray("attributes",[]).filter(e=>{let[n]=Object.keys(e);return n in this.data});return new ft(this.data,t,{...this.modelOptions,isReadonly:!0})}get attributeCollection(){return this._attributeCollection}set attributeCollection(t){this._attributeCollection=t}get attributes(){return this.attributeCollection.all.filter(t=>!t.layouthint.has(vr)&&!t.isHidden)}getAttributeByKey(t){return this._attributeCollection.getAttributeByKey(t)}createMetadataCollection(){let t=this.getContributionAsObject("metadata",{}),e=Object.entries(t).map(([n,a])=>({[n]:a}));return new ft(this.data,e,{...this.modelOptions,isReadonly:!0})}get metadataCollection(){return this._metadataCollection}set metadataCollection(t){this._metadataCollection=t}createActionCollection(){let t=this.getDataAsArray("actions",[]),e=this.getContributionAsArray("actions",[]);return new re(t,e)}get actionCollection(){return this._actionCollection}set actionCollection(t){this._actionCollection=t}get isCase(){return this.getContributionAsString("resourcetype")==="CaseView"}get titleAttribute(){return this._attributeCollection.getAttributeByLayoutHint(vr)}update(t){if(t instanceof o){let e=new o(t.modularuiResponse);return e.attributeCollection=t.attributeCollection,e.metadataCollection=t.metadataCollection,e.actionCollection=t.actionCollection,e}return this}equals(t){return this.id?.toString()===t.id?.toString()}};var ar=class extends K{hasTasks(){return this.collection.some(t=>t.hasTasks())}};var $t=class o extends F{_actionCollection;constructor(t){super(t);let e=this.data.actions&&Array.isArray(this.data.actions)?this.data.actions:[],n=this.contributions.actions&&Array.isArray(this.contributions.actions)?this.contributions.actions:[];this._actionCollection=new re(e,n);try{let a=this.selflink.href.href;a&&(this.key=a.substring(a.lastIndexOf("/")+1))}catch{this.key=this.getDataAsString("name","unknown")}}static create(t,e,n,a){let l=new Pt;return l.key=t,l.data=e,l.contributions=n,l.origin=a?.origin,l.contextPath=a?.contextPath,new o(l)}get type(){return"TaskGroup"}hasTasks(){return this.actionCollection.length>0}get actionCollection(){return this._actionCollection}};var Fs=class extends Se{_taskGroupCollection;constructor(t){super(t),this._taskGroupCollection=this.createTaskGroupCollection()}get type(){return"CaseView"}getInitialChildModelLinks(){return this.links.getLinksByGroup("taskgroup").all}get panelLinks(){return this.links.getLinksByGroup("panel")}setChildModels(t,e){super.setChildModels(t,e);let n=t.filter(a=>a instanceof $t);this.taskGroupCollection.add(n)}get casename(){return this.attributeCollection.getAttributeByLayoutHint(vr)}get label(){return this.casename?.readonlyvalue||""}get viewLabel(){return this.getContributionAsString("label","")}hasIntroText(){return this.introtext!==""}get introtext(){let t=this.data._content;if(t&&"text"in t&&typeof t.text=="object"&&t.text!=null&&"message"in t.text)return t.text.message;let e=this.contributions;return e.text?typeof e.text=="object"&&"message"in e.text&&typeof e.text.message=="string"?e.text.message:e.text:Array.isArray(e.texts)?e.texts[0].text:""}get selfhref(){let t=this.links.getLinkByKey("self");if(t==null)throw new J("No self href available");return t.href}createTaskGroupCollection(){let t=this.getDataAsArray("taskgroups",[]),e=this.getContributionAsArray("taskgroups",[]),n=[];for(let a of t){let l=a.name,d=e.find(b=>b.name===l);if(d){let b=$t.create(l,a,d,this.modelOptions);n.push(b)}}return new ar(n)}set taskGroupCollection(t){this._taskGroupCollection=t}get taskGroupCollection(){return this._taskGroupCollection}hasTaskGroups(){return this.taskGroupCollection&&this.taskGroupCollection.hasItems()}};var Gi=class extends q{_context;_listKey;constructor(t,e,n){super(t,e,n),this._listKey=this.getContributionAsString("listKey")}get key(){return this.getDataAsString("name","")}get type(){return this.getContributionAsString("type","string").replace("filter","")}get parameterType(){return this.getContributionAsString("parameterType")==="bodyParameter"?"bodyParameter":"queryParameter"}get name(){return this.listkey?this.listkey+Ur+this.param:this.param}get param(){return this.getDataAsString("param")??this.getDataAsString("name","")}get isMultiple(){return this.getContributionAsBoolean("multiplechoice",!1)}get context(){return this._context}set context(t){this._context=t}setContext(t){this._context=t}get contextid(){return this.getContributionAsString("contextid","")}get contextLabel(){return this.context?.label??""}get listkey(){return this._listKey}set listkey(t){this._listKey=t}get label(){return this.getContributionAsString("label","")}isQuickSearch(){return this.getContributionAsBoolean("quicksearch",!1)}get assistantMessage(){return this.getContributionAsString("assistant")}};var Rt=class extends Gi{_attribute;constructor(t,e,n){super(t,e,n),this._attribute=this.createAttribute(this.type,this.param||"",this.data,this.contributions)}get attribute(){return this._attribute}get params(){return this.param?[{name:this.param,value:this.attribute?.value}]:[]}get value(){return this.attribute?.value}get inputvalue(){return this.attribute?.inputvalue??""}hasValue(){return this.value!==null&&this.value!==""}getAttributeType(t){switch(t){case"choice":return"choice";case"date":return"date";case"datetime":return"datetime";case"daterange":case"datetimerange":return"range";case"number":case"numberrange":return"range";default:return"string"}}getChildType(t){switch(t){case"daterange":return"date";case"datetimerange":return"datetime";case"numberrange":return"number";default:return"string"}}createAttribute(t,e,n,a){if(t==="assignment")return;let l=this.getAttributeType(t),d={...a,type:l};if(l==="range"&&"children"in d&&Array.isArray(d.children)){let b=this.getChildType(t);d.children=d.children.map(x=>{let D=Object.keys(x)[0];return{[D]:{...x[D],type:b}}})}return Ct.createAttribute(e,n,d,this.modelOptions)}reset(){return this.attribute?.reset(),this}update(t,e){this.attribute?.update(e)}isActive(){return this.attribute?.initvalue!=null}get isValid(){return this.attribute?.isValid??!1}get readonlyvalue(){return this.attribute?.readonlyvalue??""}get formdata(){return this.attribute?.formdata??null}};var ur=class extends Rt{constructor(t,e,n){if(super(t,e,n),t&&"options"in t&&t.options&&Array.isArray(t.options)){let a=t.options.filter(l=>l.selected).map(l=>l.key);t.options.forEach(l=>{this.attribute?.options.addOption(a,{code:l.key,label:l.key})})}}};var ni=class extends Gi{_assignmenttype;_user;constructor(t,e,n){super(t,e,n),this._assignmenttype=this.createAssignmentTypeModel(),this._user=this.createUserModel()}createAssignmentTypeModel(){let t=`${this.contextid}ASSIGNMENTTYPE`,e=this.data[t];if(typeof e>"u")throw new J(`Missing assignment type data for ${t}`);let n=this.data.dynamicschema;n&&(e.dynamicschema={[t]:n[t]});let l={...this.contributions[t],enumerated:!0,optionMode:e._links?"lookup":"static",type:"choice"},d=e.name||e.param;return Ct.createAttribute(d,e,l,this.modelOptions)}createUserModel(){let t=`${this.contextid}USERKEY`,e=this.data[t],n=this.data.dynamicschema;n&&n[t]&&(e.dynamicschema={[t]:n[t]});let l={...this.contributions[t],optionMode:e._links?"lookup":"static",type:"choice"},d=e.name||e.param;return Ct.createAttribute(d,e,l,this.modelOptions)}get assignmenttype(){return this._assignmenttype}get user(){return this._user}get params(){return this.assignmenttype&&this.user?[{name:this.assignmenttype.name,value:this.assignmenttype.value},{name:this.user.name,value:this.user.value}]:[]}get value(){return{[this.assignmenttype.name]:this.assignmenttype.value,[this.user.name]:this.user.value}}get inputvalue(){return{[this.assignmenttype.name]:this.assignmenttype.inputvalue,[this.user.name]:this.user.inputvalue}}hasValue(){return this.assignmenttype.value!==null&&this.assignmenttype.value!==""||this.user.value!==null&&this.user.value!==""}reset(){return this.assignmenttype&&this.assignmenttype.reset(),this.user&&this.user.reset(),this}update(t,e){this.user!=null&&this.user.key===t.key?this.user.update(e):this.assignmenttype!=null&&this.assignmenttype.key===t.key&&this.assignmenttype.update(e)}isActive(){return this.assignmenttype!=null&&this.assignmenttype.initvalue!==null||this.user!=null&&this.user.initvalue!==null}get isValid(){return this.assignmenttype!=null&&this.assignmenttype.isValid&&this.user!=null&&this.user.isValid}get readonlyvalue(){return{[this.assignmenttype.name]:this.assignmenttype.readonlyvalue,[this.user.name]:this.user.readonlyvalue}}get formdata(){return this.value}};var si=class extends Rt{update(t,e){this.attribute instanceof or?this.attribute.update(e,t):super.update(t,e)}get params(){return this.attribute?[{name:this.attribute.start.name,value:this.attribute.start.value},{name:this.attribute.end.name,value:this.attribute.end.value}]:[]}};var Ns=class extends Rt{_isValid=!0;_value;_inputvalue;constructor(t,e,n){if(super(t,e,n),this.attribute){let a=this.getDataAsString("value","");this.update(this.attribute,a)}this._inputvalue=this._value??""}get params(){return this.param?[{name:this.param,value:this.removeFormat(this.value??"")}]:[]}get value(){return this._value}get inputvalue(){return this._inputvalue}reset(){return this._inputvalue="",this._value=void 0,this}get isValid(){return this._isValid}update(t,e){if(this._isValid=!0,this._inputvalue=typeof e!="string"?String(e):e,this.shouldHandleFormat()){let n=this.isMultiple?this._inputvalue.split(",").map(l=>l.trim()):[this._inputvalue.trim()],a=[];for(let l of n){let d=this.formatValue(l);d!==""&&(a.push(d),this.attribute?.validate(d)||(this._isValid=!1))}this._value=a.join(",")}else this._value=e}get operator(){return this.getContributionAsString("operator","")}formatValue(t){return this.shouldHandleFormat()?this.attribute?.formatValue(t)||"":t}isBSN(){return this.layouthint.has("bsn")}isIBAN(){return this.layouthint.has("iban")}isZipcode(){return this.layouthint.has("zipcode")}removeFormat(t){return t==null||t.toString()===""?"":typeof t=="string"&&this.shouldHandleFormat()?t.replace(/[^a-z0-9,]/gi,""):t}shouldHandleFormat(){return(this.operator==="exactly"||this.operator==="isNot")&&(this.isIBAN()||this.isZipcode()||this.isBSN())}get formdata(){return{[this.param]:this.value}}};var oi=class{static createFilter(t,e,n,a){let l=n.type??"stringfilter";return l==="choicefilter"&&t==="index"?new ur(e,n,a):l.includes("rangefilter")?new si(e,n,a):l==="assignmentfilter"?new ni(e,n,a):l==="stringfilter"?new Ns(e,n,a):new Rt(e,n,a)}static setListKey(t,e){"listkey"in e&&typeof e.listkey=="string"&&(t.listkey=e.listkey)}static setFilterContext(t,e,n){if(n.contexts){let a=n.contexts.find(l=>l.id===e);a&&(t.context=a)}}};var Lt=class extends K{constructor(t={},e,n){super(),this.collection=this.createCollection(t,e,n)}createCollection(t,e,n){let a=[];if(e&&"filter"in e&&Array.isArray(e.filter))for(let l of e.filter){let[d]=Object.keys(l),b=t[d],x=l[d],D=oi.createFilter(d,b,x,{origin:n?.origin,contextPath:n?.contextPath});oi.setListKey(D,e),x.contextid&&oi.setFilterContext(D,x.contextid,e),a.push(D)}return a}reset(){return this.collection=this.collection.map(t=>t.reset()),this}checkRangeFilterByAttributeKey(t,e){let n=t.attribute;if(n instanceof or){let a=n.start,l=n.end;return n.key===e||a?.name===e||l?.name===e}return!1}checkAssignmentFilterByAttributeKey(t,e){return t.key===e||t.user?.key===e||t.assignmenttype?.key===e}getFilterByName(t){return this.find(e=>e.name===t)||null}getFilterByAttributeKey(t){return this.find(e=>e instanceof si?this.checkRangeFilterByAttributeKey(e,t):e instanceof ni?this.checkAssignmentFilterByAttributeKey(e,t):e instanceof Rt?e.attribute?.key===t:!1)}update(t,e){let n=t.parentKey?this.getFilterByAttributeKey(t.parentKey):this.getFilterByAttributeKey(t.key);if(!n)throw new Error(`Can not find filter by attribute key: ${t.key}`);n.update(t,e),this.collection=this.collection.map(a=>a.name===n.name?n:a)}get isValid(){return this.collection.every(t=>t.isValid)}hasActiveFilters(){return this.collection.some(t=>t.isActive())}getActiveFilters(){return this.collection.filter(t=>t.isActive())}get formdata(){let t=this.filter(e=>e.parameterType==="bodyParameter"&&e.hasValue()&&e.formdata);return t.length===0?null:t.reduce((e,n)=>Object.assign(e,n.formdata),{})}};var Ps=class extends Tt{};var Hs=class extends F{_filterCollection;_concepts;constructor(t){super(t),this._filterCollection=new Lt(this.data.filter,{filter:this.contributions.filter,dynamicschema:this.data.dynamicschema},this.modelOptions),this._concepts=new Ps,this._concepts.collection=this.data._embedded?this.data._embedded.results.map(e=>new Kr(e.concept,this.entryDate,this.modelOptions)):[]}get type(){return this.resourcetype.toLowerCase()==="relatedconcepts"?"RelatedConcepts":"ConceptIndex"}getInitialChildModelLinks(){return this.items.getInitialChildModelLinks()}setChildModels(t,e){this.items.setChildModels(t,e)}get selfhref(){let{href:t}=this.selflink;return this.filterCollection.hasItems()&&this.filterCollection.forEach(e=>{e.params.forEach(n=>{n.value?t.setParameter(n.name,n.value):t.removeParameter(n.name)})}),t}get label(){return this.getContributionAsString("label","")}get filterCollection(){return this._filterCollection}get indexfilter(){let t=this.filterCollection.getFilterByAttributeKey("index");if(t instanceof ur)return t}get entryDate(){let e=this.filterCollection.getFilterByAttributeKey(et)?.value;if(typeof e=="string")return e}get searchtermfilter(){let t=this.filterCollection.getFilterByAttributeKey("label");return t instanceof Rt?t:null}get modelCategoryFilter(){let t=this.filterCollection.getFilterByAttributeKey("modelCategory");return t instanceof Rt?t:null}get items(){return this._concepts}set items(t){this._concepts=t}};var Bs=class extends Tt{};var Us=class extends F{_filterCollection;_content;constructor(t){super(t),this._filterCollection=new Lt(this.data.filter,{filter:this.contributions.filter,dynamicschema:this.data.dynamicschema},this.modelOptions),this._content=new Bs,this._content.collection=this.data._embedded?this.data._embedded.results.map(e=>new Ht(e.content,void 0,this.modelOptions)):[]}get type(){return"ContentIndex"}getInitialChildModelLinks(){return this.items.getInitialChildModelLinks()}setChildModels(t,e){this.items.setChildModels(t,e)}get selfhref(){let t=this.selflink.href;return this.filterCollection.forEach(e=>{e.params.forEach(n=>{n.value?t.setParameter(n.name,n.value):t.removeParameter(n.name)})}),t}get label(){return this.getContributionAsString("label","unknown")}get filterCollection(){return this._filterCollection}get indexfilter(){let t=this._filterCollection.getFilterByAttributeKey("index");return t instanceof ur?t:null}get items(){return this._content}hasIndexFilter(){let t=this.indexfilter?.attribute;return t instanceof Ve&&t.options.length>0}hasFiltersSet(){return this.filterCollection.some(t=>t.isActive())}hasNoFiltersSet(){return!this.hasFiltersSet()}getFirstCharHref(){let t=this.indexfilter?.attribute,e="#";return t instanceof Ve&&(e=t.options.filter(n=>n.code!=="0")[0].code),new U(this.selfhref).addParameter("index",e)}};var ai=class extends F{_section;_contentType;_filterCollection;constructor(t){super(t),this._filterCollection=new Lt(this.data.filter,{filter:this.contributions.filter},this.modelOptions),this._section=new xe(this.data,this.entryDate,this.modelOptions)}get type(){return"Content"}getInitialChildModelLinks(){let t=this.links.getLinkByKey("contenttype");return t?[t]:[]}setChildModels(t,e){this.contentType=t.find(n=>n instanceof pe)}get section(){return this._section}get id(){return this.data._id}get filterCollection(){return this._filterCollection}get entryDate(){let e=this.filterCollection?.getFilterByAttributeKey(et)?.value;if(typeof e=="string")return e}get contentType(){return this._contentType}set contentType(t){this._contentType=t}get label(){return this.section.label}get number(){return this.section.number}get body(){return this.section.body}get childSectionLinks(){return this.section.childSectionLinks}get selfContentLink(){return this.section.selfContentLink}get childSections(){return this.section.childSections}set childSections(t){this.section.childSections=t||[]}get subSections(){return this.section.subSections}get relatedConceptsHrefs(){let t=[];return this.relatedConceptsHref&&t.push(this.relatedConceptsHref),this.subSections.forEach(e=>{t.push(...e.relatedConceptsHrefs)}),t}get relatedConceptsHref(){let t=this.links.getLinkByKey("relatedConcepts");if(t){let{href:e}=t;return e.addParameter("entryDate",this.entryDate),e.setReferenceHash(this.referenceHash),e}return null}get referenceHash(){return this.section.referenceHash}};var Vs=class extends F{_contentType;_filterCollection;constructor(t){super(t),this._filterCollection=new Lt(this.data.filter,{filter:this.contributions.filter},this.modelOptions)}get type(){return"ContentTOC"}getInitialChildModelLinks(){let t=this.links.getLinkByKey("contenttype");return t?[t]:[]}setChildModels(t,e){this.contentType=t.find(n=>n instanceof pe)}get label(){return this.getDataAsString("label","")}get abbreviation(){return this.getDataAsString("abbreviation")}get selfhref(){let t=new U(this.selflink.href);return this.filterCollection.forEach(e=>{e.params.forEach(n=>{n.value?t.setParameter(n.name,n.value):t.removeParameter(n.name)})}),t}get relatedConceptsHref(){let t=this.links.getLinkByKey("relatedConcepts");if(t){let{href:e}=t;return e.addParameter("entryDate",this.entryDate),e}}get selfContentLink(){return new Ht(this.data,this.entryDate,this.modelOptions)}getItems(t){return t.map(e=>{let n=new Ht(e,this.entryDate,this.modelOptions);return typeof e.items<"u"&&(n.items=this.getItems(e.items)),n})}getSectionItems(t){return t.map(e=>{let n=new Ht(e,this.entryDate,this.modelOptions);return typeof e.sections<"u"&&(n.items=this.getItems(e.sections)),n})}get items(){return Array.isArray(this.data.items)?this.getItems(this.data.items):Array.isArray(this.data.sections)?this.getSectionItems(this.data.sections):[]}get sections(){return this.data.sections?this.data.sections.map(e=>new xe(e,this.entryDate,this.modelOptions)):[]}get categories(){return Array.isArray(this.data.categories)?this.data.categories.map(t=>new Ht(t,void 0,this.modelOptions)):[]}get contentType(){return this._contentType}set contentType(t){this._contentType=t}get filterCollection(){return this._filterCollection}get entryDate(){let e=this.filterCollection.getFilterByAttributeKey(et)?.value;if(typeof e=="string")return e}get isCompleteSource(){return this.filterCollection.getFilterByAttributeKey("complete")?.value==="true"}};var Um=require("immer");var ui=class{_configuration;_layouthint;_calculatedResults;_positiveResults;_negativeResults;_results;constructor(t){this._configuration=t||null,this._layouthint=new ut(t?.layouthint),this._calculatedResults=new It(t?.calculatedResultElements),this._positiveResults=new It(t?.positiveResultElements),this._negativeResults=new It(t?.negativeResultElements),this._results=new It(t?.resultElements)}get label(){return this._configuration?.label}get description(){let t=this._configuration?.description;return typeof t=="object"&&"message"in t?t.message:t}get layouthint(){return this._layouthint}get attributes(){return this._configuration===null?[]:[...this._configuration.attributes,...this.layouthint.all.filter(t=>t.includes("attribute:")).map(t=>t.substring(10))]}get calculatedResultElements(){return this._calculatedResults}get positiveResultElements(){return this._positiveResults}get negativeResultElements(){return this._negativeResults}get resultElements(){return this._results}};var js=class{_configuration;constructor(t){this._configuration=t||[]}get config(){return this._configuration.filter(t=>{let[e]=Object.keys(t);return e==="decisionResult"||e==="classificationResult"||e==="calculatorResult"}).map(t=>{let[e]=Object.keys(t);return new ui(t[e])})}};var Ws=class{_question;_options;_answers;constructor(t){this._question=new It(t.questionElements),this._options=new It(t.optionElements),this._answers=new It(t.givenAnswerElements)}hasConfig(){return this._question.hasConfig()||this._options.hasConfig()||this._answers.hasConfig()}get question(){return this._question}get options(){return this._options}get answers(){return this._answers}};var li=class{[Um.immerable]=!0;_questions;_intermediateResults;_endResults;constructor(t){this._questions=this.createQuestionConfiguration(t),this._intermediateResults=this.createIntermedidateResultsConfiguration(t),this._endResults=this.createEndResultsConfiguration(t)}createQuestionConfiguration(t){if(t&&"questions"in t&&typeof t.questions=="object")return new Ws(t.questions)}createIntermedidateResultsConfiguration(t){if(t&&"intermediateResults"in t&&typeof t.intermediateResults=="object")return new ui(t.intermediateResults)}createEndResultsConfiguration(t){if(t&&"results"in t&&typeof t.results=="object")return new js(t.results)}get questions(){return this._questions}isConfiguredIntermediateResultAttribute(t){return this.intermediateResults?.attributes.includes(t)??!1}get intermediateResults(){return this._intermediateResults}isConfiguredEndResultAttribute(t){return this.endResults?this.endResults?.config.some(e=>e.attributes.includes(t)):!1}get endResults(){return this._endResults}};var Vm=require("immer");var qi=class{[Vm.immerable]=!0;_originalError;_connectKey;_modelOptions;constructor(t,e,n){this._originalError=t,this._connectKey=e,this._modelOptions=n}set connectKey(t){this._connectKey=t}get connectKey(){return this._connectKey}get origin(){return this._modelOptions?.origin||""}get contextPath(){return this._modelOptions?.contextPath||ot()}get error(){return this._originalError}get status(){let n=this.error;return"status"in n?parseInt(n.status,10):0}get id(){return this.isResourceNotFound&&"id"in this.error&&this.error.id!=="Error.NotAuthorized"?"Error.ResourceNotFound":"id"in this.error&&typeof this.error.id=="string"?this.error.id:this.error.name||"Error.GeneralError"}get message(){let t=this.error;return"message"in t?t.message:this.id}get responseMessage(){return this.response&&"message"in this.response?this.response.message:""}get title(){return this.response&&"title"in this.response?this.response.title:{id:""}}get titleMessage(){if("title"in this.error)return this.error.title?.message}get titleId(){return this.response?.title?.id}get titleProperties(){return this.response?.title?.properties}get redirect(){return this.response?.redirect}get redirectText(){if(this.redirect&&"text"in this.redirect)return this.redirect?.text}get redirectTextID(){return this.redirectText?.id}get redirectTextProperties(){return this.redirectText?.properties}get redirectMessage(){return this.redirectText?.message}get redirectHref(){if(this.redirect&&"href"in this.redirect){let t=this.redirect?.href;if(t)return new U(t)}}get layouthint(){return this.response&&Array.isArray(this.response.layouthint)?new ut(this.response.layouthint):new ut}get response(){let t=this.error;if("response"in t&&typeof t.response=="object")return t.response}get properties(){let t=this.error;if("properties"in t)return t.properties}get parameters(){let t=this.error;if("parameters"in t)return t.parameters}get isResourceNotFound(){return this.status===404}get isResourceNotFoundAfterReload(){let t=this.error;return"isReload"in t&&typeof t.isReload=="boolean"?this.isResourceNotFound&&t.isReload:!1}get isUnauthorized(){let e=this.status===401,n=this.id==="Error.NotAuthorized"||this.id==="Error.Authentication.Required"||this.id==="Error.Authentication.InvalidCredentials",a=this.error,l="action"in a&&typeof a.action=="object"&&a.action!==null&&"name"in a.action&&a.action.name==="login";return e||n||l}get isChangePassword(){return this.id==="Error.ChangePasswordRequired"}get isConcurrentUser(){return this.id==="Error.Authentication.ConcurrentUser"}get isConcurrentError(){return this.id==="Error.Case.ConcurrentModification"||this.id==="Error.DataStore.ConcurrentModification"||this.id==="Error.DataStore.RecordAlreadyExists"||this.id==="Error.DataStore.RowCannotBeLocked"}get isBlocked(){return this.id==="Error.Authentication.BlockedUser"}get isInvalidCredentials(){return this.id==="Error.Authentication.InvalidCredentials"}get isInvalidUsername(){return this.id==="Error.Authentication.InvalidUsername"}get isTimeoutError(){return this.id==="Error.CodemapLookup.InvalidToken"}get isRemoteServiceException(){return this.id==="Error.RemoteServiceException"}get changePasswordHref(){let t=this.properties;if(t&&"redirect"in t)return new U(t.redirect)}get isBasicAuthentication(){let e=this.error;return"error"in e?this.isUnauthorized&&this.status===401&&e.error==="No responseText":!1}get loginFailed(){return this.id==="Error.Authentication.Required"||this.id==="Error.Authentication.InvalidCredentials"}get shouldThrowOnServer(){return!this.isChangePassword&&!this.isBlocked&&!this.isConcurrentUser}};var Qm=Y(require("deepmerge"),1),Gs=Y(te(),1),tg=Y(Zm(),1);var Xl=Y(te(),1);var Tr=class o extends q{_attributeCollection;_contentConfiguration;_errorCollection;_repeatIndex;_dynamicValidationsLoaded=!1;constructor(t,e,n){super(t,e,n),t&&this.getElements().length>0?this._attributeCollection=new ft(this.getElements(),this.getApplicableAttributeContributions(),{...n,isReadonly:!1}):this._attributeCollection=new ft,this._contentConfiguration=new li(e?e.content:{}),this._errorCollection=new fe("formobject");let a=this.getDataAsString("referenceDate");a&&this.attributeCollection.setReferenceDate(a),this.attributeCollection.indicateContentConfiguration(this.contentConfiguration)}static createEmpty(t){if(!t)throw new P("createEmpty method needs a FormObjectModel as input argument to create a new version of the object");return new o(t.data,t.contributions,t.modelOptions)}equals(t,e=!0){if(!t||this.key!==t.key)return!1;let n=this.attributeCollection.all.filter(l=>!l.isResult).some(l=>t&&t.attributeCollection.hasAttributeByKey(l.key));return(e?this.repeatIndex===t.repeatIndex:!0)&&n}getAttributeByAttribute(t){return this.attributeCollection.getAttributeByAttribute(t)}getAttributeByKey(t){return this.attributeCollection.getAttributeByKey(t)}hasAttributeByKey(t){return this.attributeCollection.hasAttributeByKey(t)}getElements(){let t=[];if(Array.isArray(this.data.elements)&&t.push(...this.data.elements),Array.isArray(this.data.results)){let e=this.data.results.map(n=>({...n,isResult:!0}));t.push(...e)}return this.data.elementid&&t.push({...this.data}),t}getApplicableAttributeContributions(){if(this.data&&this.contributions){let t=this.getElements().map(n=>n.elementid),e=this.getAttributesInData(t,this.contributions.attributes);return this.isDynamic?e.map(n=>{let[a]=Object.keys(n);return{[a]:{...n[a],mandatory:!0}}}):e}return[]}getAttributesInData(t,e=[]){return e.filter(n=>{let[a]=Object.keys(n);return t.some(l=>l.split(".")[0]===a)})}getInitialChildModelLinks(){return this._attributeCollection.getInitialChildModelLinks()}setChildModels(t,e){this._attributeCollection.setChildModels(t,e)}get key(){return this.data.objectid||"unknown"}get contentConfiguration(){return this._contentConfiguration}get hasEndResultConfiguration(){return this.contributions.content?.results!=null}get isDynamic(){return this.getContributionAsBoolean("dynamicObject",!1)}get hasDynamicValidations(){return this.getContributionAsBoolean("dynamicValidations",!1)}get isRepeatable(){return this.getContributionAsBoolean("repeatable",!1)}get repeatIndex(){return this._repeatIndex??this.data.index??1}set repeatIndex(t){this._repeatIndex=t}get maxRepeats(){return this.isRepeatable?this.getDataAsNumber("numberofrepeats",-1):1}get hasFixedNrOfRepeats(){return this.maxRepeats>-1}get isRepeatWithUnknownTotal(){return this.isRepeatable&&this.maxRepeats===-1}get isLastRepeat(){return this.isRepeatable?this.getDataAsBoolean("last",!1):!0}get repeatIndexLabel(){return this.getDataAsString("index-identifier")}get label(){return this.getContributionAsString("label")}get introText(){if(typeof this.data.content=="object"&&this.data.content!=null&&"text"in this.data.content){let{message:t}=this.data.content.text;return t}return this.contributions.text?.message?this.contributions.text.message:this.contributions.introText}get assistent(){return this.contributions.assistent}get buttonLabels(){return this.getContributionAsObject("buttonLabels",{})}get attributeCollection(){return this._attributeCollection}set attributeCollection(t){this._attributeCollection=t}mergeObject(t){this.attributeCollection.forEach(e=>{let n=t.getAttributeByAttribute(e);n&&e.mergeAttribute(n)}),this.repeatIndex=t.repeatIndex}updateAttribute(t,e){let n=this.attributeCollection.getAttributeByAttribute(t);if(n==null)throw new Error(`Attribute with name: ${t.name} not found.`);return n instanceof dt?n.update(e,t):n.update(e),n}isChangedSince(t){return this.attributeCollection.find(e=>e.isChangedSince(t))!=null}resetErrors(){this._errorCollection.clear(),this.attributeCollection.forEach(t=>t.resetErrors())}get errorCollection(){return this._errorCollection}addServerError(t){t.anchor?.elementid!=null?this.attributeCollection.addServerError(t):this._errorCollection.addServerError(t.id,t.message,t.properties,t.layouthint)}hasServerErrors(){return this.errorCollection.hasItems()||this.attributeCollection.hasServerErrors()}hasErrors(){return this.errorCollection.hasItems()||this.attributeCollection.hasErrors()}get isValid(){return this.attributeCollection.visible.every(t=>t.isValid)&&!this.errorCollection.hasItems()}get dynamicValidationsLoaded(){return this._dynamicValidationsLoaded}set dynamicValidationsLoaded(t){this._dynamicValidationsLoaded=t}handleErrorValidations(t){let e=[];t.filter(n=>n.anchor?.objectid===this.key).forEach(n=>{(0,Xl.has)(n.anchor,"elementid")?e.push(n):this.errorCollection.addServerError(n.id,n.message,n.properties,new ut(n.layouthint))}),this.attributeCollection.updateValidations(e)}handleMissingValidations(t,e){let n=[];for(let a of t.anchors)if(!a.objectid||a.objectid===this.key)if(Array.isArray(a.elements))for(let l of a.elements)n.push({anchor:{objectid:l.objectid||"",elementid:l.elementid},id:"Constraint.Mandatory"});else n.push({anchor:{...a,objectid:a.objectid||""},id:"Constraint.Mandatory"});Array.isArray(e)&&e.filter(a=>a.id==="Constraint.Mandatory"&&a.anchor?.objectid===this.key&&(0,Xl.has)(a.anchor,"elementid")).forEach(a=>{n.push(a)}),this.attributeCollection.updateValidations(n)}updateValidations(t){return this.resetErrors(),Array.isArray(t.errors)&&this.handleErrorValidations(t.errors),Array.isArray(t.missing?.anchors)&&this.handleMissingValidations(t.missing,t.errors),this.dynamicValidationsLoaded=!0,this}get formdata(){return this.attributeCollection.formdata}getFormData(t=!1){return this.attributeCollection.getFormData(t)}};var lr=class o extends F{_lastUpdate;_completedFormObjects=[];_currentFormObject=null;_previouslyEnteredFormObjects=[];_mergePreviouslyEnteredObjects=!0;_endResultFormObjects=[];_previousEndResultKeys=[];_useClientsideValidation=Et("USE_CLIENTSIDE_VALIDATION");_errorCollection=new fe(0);_redirectLocation;_commit=!1;_isFinished=!1;_isComplete=!1;_success;_parameters=new Ae;_tokens=[];constructor(t){super(t),this._lastUpdate=0,this.currentFormObject=this.createFormObject(),this.endResultFormObjects=this.setEndResultFormObjects(),this.parameters=this.setParameters(t?.parameters),this.isComplete=this.getDataAsBoolean("complete",!1),Array.isArray(this.data.errors)&&this.handleRootErrors(this.data.errors),this.createSuccess(),this.setTokens()}get type(){return"Form"}get actiontype(){return this.layouthint.has(Bn)?"create":this.layouthint.has(Hn)?"update":this.layouthint.has(Pn)?"delete":this.getContributionAsString("actiontype","form")}getInitialChildModelLinks(){let t=(0,tg.default)(this.endResultFormObjects.map(e=>e.getInitialChildModelLinks()));return this.currentFormObject==null?t:[...this.currentFormObject.getInitialChildModelLinks(),...t]}setChildModels(t,e){this.currentFormObject&&this.currentFormObject.setChildModels(t,e),this.endResultFormObjects.forEach(n=>{n.setChildModels(t,e)})}get label(){return this.getContributionAsString("label","")}get buttonLabels(){return this.getContributionAsObject("buttonLabels",{})}getButtonLabel(t){if(t==="cancel"&&"cancel"in this.buttonLabels)return this.buttonLabels.cancel;let e=this.currentFormObject?.buttonLabels;if(e&&t in e)return e[t]}get allObjects(){return this.currentFormObject==null?this.completedFormObjects:[...this.completedFormObjects,this.currentFormObject]}get objectKeys(){let t=this.getContributionAsObject("objects",{});return Object.keys(t)}get numberOfExpectedQuestions(){return this.objectKeys.length}get hasNoQuestionsConfigured(){return this.isComplete&&(this.objectKeys.length===0||!("missing"in this.data)&&!("results"in this.data)&&!("errors"in this.data))}addDynamicSchemaToElements(t,e){return t?.map(n=>({...n,dynamicschema:n.dynamicschema?n.dynamicschema.map(a=>{let l="elements"in a?a.elements:[];return l.length?{...a,elements:{...l,dynamicschema:e}}:a}):void 0}))}getMissingAnchors(){return(this.data.missing?.anchors??[]).map(e=>{if(this.data.results){let n=this.data.results.find(a=>a.objectid===e.objectid&&"elements"in a);n&&(e.results=n.elements)}return e.elements&&this.data.dynamicschema?{...e,elements:this.addDynamicSchemaToElements(e.elements,this.data.dynamicschema)}:e})}createFormObject(){if(this.data&&this.contributions.objects){let t=this.getMissingAnchors();if(t.length){let e=t[0],n=t[0].objectid;if(n){let a=this.contributions.objects[n];if(a)return new Tr(e,a)}}}return null}addEmptyFormObject(t=this.currentFormObject){if(t){let e=Tr.createEmpty(t);e.repeatIndex=this.getHighestRepeatIndex(t)+1,this.addFormObject(e)}}getHighestRepeatIndex(t){return Math.max(...this.allObjects.filter(e=>e.equals(t,!1)).map(e=>e.repeatIndex))}addFormObject(t){if(!t)throw new P("Missing form object to add");this.completedFormObjects=[...this.allObjects],this.currentFormObject=t}getFormObjectByKey(t){return this.allObjects.find(e=>e.key===t)}getFormObjectByLayoutHint(t){return this.allObjects.find(e=>e.layouthint.has(t))}removeFormObject(t){if(!t)throw new P("Missing form object to remove");if(this.currentFormObject&&this.currentFormObject.equals(t))throw new P("Can not remove the current form object");this.completedFormObjects=this.completedFormObjects.filter(e=>!e.equals(t))}get currentFormObject(){return this._currentFormObject}set currentFormObject(t){this._currentFormObject=t}get completedFormObjects(){return this._completedFormObjects}set completedFormObjects(t){this._completedFormObjects=t}get previouslyEnteredFormObjects(){return this._previouslyEnteredFormObjects}set previouslyEnteredFormObjects(t){this._previouslyEnteredFormObjects=t}setEndResultFormObjects(){if(this.data&&this.data.results&&Array.isArray(this.data.results)){let e=(Array.isArray(this.data.missing?.anchors)?this.data.missing?.anchors:[]).map(a=>a.objectid),n=this.data.results.filter(a=>!e.includes(a.objectid)).map(a=>{let{elements:l,...d}=a;return{...d,results:l}});if(n.length>0)return n.map(a=>{let l=this.contributions.objects?.[a.objectid];return l?new Tr(a,l):null}).filter(a=>a!=null)}return[]}get expectsEndResultFormObjects(){let t=this.endResultFormObjects.map(e=>e.key);return this.objectKeys.some(e=>this.contributions.objects?.[e]?.content?.results&&!t.includes(e))}get endResultFormObjects(){return this._endResultFormObjects}set endResultFormObjects(t){this.previousEndResultKeys=this.endResultFormObjects.map(e=>e.key),this._endResultFormObjects=t}getEndResultFormObjects(){return this.endResultFormObjects.filter(t=>!this.previousEndResultKeys.includes(t.key))}get previousEndResultKeys(){return this._previousEndResultKeys}set previousEndResultKeys(t){this._previousEndResultKeys=t}get isValid(){return this.currentFormObject?this.currentFormObject.isRepeatable&&(!this.currentFormObject.hasFixedNrOfRepeats||this.allObjects.filter(e=>this.currentFormObject!=null&&e.equals(this.currentFormObject,!1)).find(e=>e.isValid))?!0:this.currentFormObject?.isValid??!0:!0}hasServerErrors(){return this.errorCollection.hasItems()?!0:this.currentFormObject?this.currentFormObject.hasServerErrors():!1}hasErrors(){return this.errorCollection.hasItems()?!0:this.currentFormObject?this.currentFormObject.hasErrors():!1}addServerError(t){this.errorCollection.addServerError(t.id,t.message,t.properties,t.layouthint)}resetErrors(){this._errorCollection.clear(),this.currentFormObject&&this.currentFormObject.resetErrors()}get errorCollection(){return this._errorCollection}set errorCollection(t){this._errorCollection=t}get commit(){return this._commit||!1}set commit(t){this._commit=t}get isFinished(){return this._isFinished||this.success!=null}set isFinished(t){this._isFinished=t}get isComplete(){return this._isComplete}set isComplete(t){this._isComplete=t}get successRedirect(){return this.isFinished&&this.success?.redirect?new U(this.success.redirect):void 0}get redirectLocation(){return this._redirectLocation||this.successRedirect}getSuccessData(){return this.success?.data}getResultData(){let t={};if(this.contributions.resultdata){let e=this.contributions.resultdata,n=Object.keys(e),a=this.getSuccessData();for(let l of n){let d=a?.[l]||{},b=l in e?e[l]:{};t[l]=new Er(l,d,b)}}return t}get resultData(){return this.getSuccessData()}setParameters(t){let e=t?t.map(n=>new qt(n.prefix,n.name,n.value)):[];return new Ae(e)}get parameters(){return this._parameters}set parameters(t){this._parameters=t}selfhrefNoCommitParam(){let t=this.parameters.filter(n=>n.name!=="commit"),e=this.selflink?.href;return e?(e.method="POST",e.parameters=new Ae(t),e):new U}selfhrefWithCommitParam(){let t=this.selfhrefNoCommitParam();return this.expectsEndResultFormObjects&&!this.isComplete&&!this.commit&&t.addParameter("commit","false"),t}get selfhref(){if(!this.selflink)throw new Error("No self link found for form");return Gt("ALWAYS_COMMIT_FORM")?this.selfhrefNoCommitParam():this.selfhrefWithCommitParam()}get tokens(){if(!this._tokens){let t=this.data?.tokens;this._tokens=Array.isArray(t)?t:[]}return this._tokens}set tokens(t){this._tokens=t}removeTokens(){this._tokens=[]}setTokens(){let t=this.data?.tokens;this._tokens=Array.isArray(t)?t:[]}isChanged(){return this.currentFormObject!==null&&this.currentFormObject.isChangedSince(this.lastUpdate)}get lastUpdate(){return this._lastUpdate}set lastUpdate(t){this._lastUpdate=t}getFormDataObjects(t=!0,e=!1){let n=this.allObjects.filter(l=>l.isRepeatable&&!l.hasFixedNrOfRepeats&&!l.attributeCollection.some(b=>b.value!==null)?!1:l.isValid||!t),a=[];return n.forEach(l=>{let d=l.getFormData(e);if(!d)return;let b=d&&Object.values(d).some(D=>D!==null);if(l.isDynamic?b:!0){let D=a.findIndex(gt=>gt.key===l.key&>.repeatIndex===l.repeatIndex);D>-1?a[D].formdata=(0,Qm.default)(a[D].formdata,d):a.push({key:l.key,repeatIndex:l.repeatIndex,formdata:d})}}),a.map(l=>({[l.key]:l.formdata}))}getFormData(t=!0,e=!0,n=!1){return e&&this.tokens.length>0?JSON.stringify({objects:this.getFormDataObjects(t,n),tokens:this.tokens}):JSON.stringify({objects:this.getFormDataObjects(t,n)})}setUseClientsideValidation(t){this._useClientsideValidation=t,this.allObjects.forEach(e=>{e.attributeCollection.all.forEach(n=>n.setUseClientsideValidation(t))})}useClientsideValidation(){return this._useClientsideValidation??!0}get formdata(){return this.getFormData(this.useClientsideValidation())}get validationData(){return this.getFormData(!1,!1,!0)}get hasPreviousStep(){let t=this.currentFormObject!=null?this.currentFormObject.key:"";return this.completedFormObjects.filter(e=>!e.isRepeatWithUnknownTotal||e.key!==t).length>0}setPreviousObject(){this.isComplete=!1,this.isFinished=!1,this.success=void 0;let t=this.currentFormObject;this.currentFormObject!=null&&(this.previouslyEnteredFormObjects=[this.currentFormObject,...this.previouslyEnteredFormObjects]),this.currentFormObject=this.completedFormObjects[this.completedFormObjects.length-1],this.completedFormObjects=this.completedFormObjects.slice(0,-1);let e=this.completedFormObjects.map(n=>n.key).filter(n=>n!==this.currentFormObject?.key);this.endResultFormObjects=this._endResultFormObjects.filter(n=>e.includes(n.key)),this.previousEndResultKeys=this.endResultFormObjects.map(n=>n.key),this.currentFormObject&&this.currentFormObject.equals(t,this.currentFormObject.hasFixedNrOfRepeats)&&this.setPreviousObject()}get hasNextStep(){if(this.isComplete||this.isFinished||this.hasNoQuestionsConfigured||!this.contributions.objects)return!1;if(this.currentFormObject&&this.currentFormObject.isDynamic||this.expectsEndResultFormObjects)return!0;let t=this.objectKeys.findIndex(n=>n===this.currentFormObject?.key),e=this.objectKeys.length-1===t;return e&&this.currentFormObject&&this.currentFormObject.isRepeatable&&!this.currentFormObject.isLastRepeat?!0:!e}update(t){if(t instanceof o){this.resetErrors(),this.lastUpdate=Date.now(),this.lastServerUpdate=t.lastServerUpdate,this.tokens=t.tokens,this.isComplete=t.isComplete,this.isFinished=t.isFinished,this.success=t.success;let e=t.data??{},n=(0,Gs.has)(e,"missing"),a=(0,Gs.has)(e,"errors");!n&&!a&&this.handleFinished(t),a&&this.handleErrors(t),n&&this.handleMissing(t)}return this}updateCurrentFormObject(t){if(t instanceof o){let e=t.data??{},n=(0,Gs.has)(e,"missing");(0,Gs.has)(e,"errors")&&this.handleErrors(t),n&&this.handleMissing(t)}}updateValidations(t){return this.currentFormObject&&this.currentFormObject.updateValidations(t),this}get success(){return this._success}set success(t){this._success=t}createSuccess(){this._success=this.data.success}handleFinished(t){this.currentFormObject&&(this.completedFormObjects=[...this.completedFormObjects,this.currentFormObject]),this.currentFormObject=t.currentFormObject,this.endResultFormObjects=t.endResultFormObjects,this.replaceData({...this.data,...t.data})}handleRootErrors(t){t.filter(e=>!e.anchor).forEach(e=>{this.errorCollection.addServerError(e.id,e.message,e.properties,e.layouthint)})}handleErrors(t){let e=Array.isArray(t.data.errors)?t.data.errors:[];e&&e.forEach(n=>{n.anchor&&this.currentFormObject&&this.currentFormObject.key===n.anchor.objectid?this.currentFormObject.addServerError(n):this.errorCollection.addServerError(n.id,n.message,n.properties,n.layouthint)})}handleMissing(t){this.currentFormObject&&this.currentFormObject.equals(t.currentFormObject)?this.handleMissingErrors(t):this.handleNewFormObject(t)}processMissingErrors(t){return this.currentFormObject===null?null:(this.currentFormObject.attributeCollection.map(e=>{let n=t.currentFormObject?.getAttributeByKey(e.key);return n?e.addMissingError(n):e.removeMissingError(),e}),this.currentFormObject)}handleMissingErrors(t){this.currentFormObject=this.processMissingErrors(t)}handleNewFormObject(t){this.endResultFormObjects=t.endResultFormObjects;let e=t.currentFormObject;e===null?(this.completedFormObjects=[...this.allObjects],this.currentFormObject=null):(this.currentFormObject?.isRepeatable?this.completedFormObjects=[...this.completedFormObjects,this.currentFormObject]:this.currentFormObject&&(this.completedFormObjects=[...this.allObjects]),this.currentFormObject=e)}get mergePreviouslyEnteredObjects(){return this._mergePreviouslyEnteredObjects}set mergePreviouslyEnteredObjects(t){this._mergePreviouslyEnteredObjects=t}handlePreviouslyEnteredFormObjects(t,e){e.forEach(n=>{let a=this.mergePreviouslyEnteredObjects?this.mergeObjects(t,n):t;this.addFormObject(a)}),this.previouslyEnteredFormObjects=this.previouslyEnteredFormObjects.filter(n=>!e.find(l=>n.equals(l)))}mergeObjects(t,e){let n=Tr.createEmpty(t);return n.mergeObject(e),n}findAttribute(t){return this.allObjects.flatMap(e=>e.attributeCollection.all).find(e=>t(e))}};var Aa=Y(te(),1);var Sr=class extends Se{_contentConfiguration;_listitem;_givenAnswers;_results;_eventdata;constructor(t){super(t),this._contentConfiguration=new li(this.contributions?this.contributions.content:{}),this.setResultSection(),this._eventdata=this.setEventData()}getInitialChildModelLinks(){let t=this.listitem?this.listitem.links.getLinksByGroup("panel").all:[],e=[...super.getInitialChildModelLinks(),...t];return this.hasResults&&(this.results&&e.push(...this.results.getInitialChildModelLinks()),this.givenAnswers&&e.push(...this.givenAnswers.getInitialChildModelLinks())),e}setChildModels(t,e){this.attributeCollection.setChildModels(t,e),this.results&&this.results.setChildModels(t,e),this.givenAnswers&&this.givenAnswers.setChildModels(t,e)}get type(){return"ListDetail"}set listitem(t){this._listitem=t,t&&(this.actionCollection=t.actionCollection)}get listitem(){return this._listitem}get panelLinks(){return this.listitem?.links.getLinksByGroup("panel")}get contentConfiguration(){return this._contentConfiguration}set contentConfiguration(t){this._contentConfiguration=t}get introtext(){return this.data._content?this.data._content.text.message:this.contributions.text?this.contributions.text.message??this.contributions.text:Array.isArray(this.contributions.texts)?this.contributions.texts[0].text:""}setResultSection(){let t=this.contributions.resultSection,e=this.data.resultSection;e&&t&&(this.setResults(e.results,t.results),this.setGivenAnswers(e.givenAnswers,t.givenAnswers))}setResults(t,e){if(t&&e){e.type==="composite"&&(e.children=e.children.filter(a=>Object.keys(a)[0]in t));let n=Ct.createAttribute("results",{key:"results",dynamicschema:this.data.dynamicschema,content:this.data.content?.results,...this.data.resultSection},e,this.modelOptions);n instanceof dt&&(n.isResult=!0,n.indicateContentConfiguration(this.contentConfiguration),this._results=n)}}setGivenAnswers(t,e){if(t&&e){let n=e.children?{...e,children:e.children.filter(l=>Object.keys(l)[0]in t)}:e,a=Ct.createAttribute("givenAnswers",{key:"givenAnswers",dynamicschema:this.data.dynamicschema,content:this.data.content?.givenAnswers,...this.data.resultSection},n,this.modelOptions);a instanceof dt&&(a.isResult=!0,this._givenAnswers=a)}}get givenAnswers(){return this._givenAnswers}get hasResults(){return(0,Aa.has)(this.contributions,"resultSection")}get results(){return this._results}get hasEventData(){return(0,Aa.has)(this.contributions,"eventdata")&&(0,Aa.has)(this.data,"eventdata")&&this.data.eventdata!=null&&this.contributions.eventdata!=null}setEventData(){if(!this.data.eventdata||!this.contributions.eventdata)return[];let t=[],{eventdata:e,dynamicschema:n}=this.data;return this.contributions.eventdata.forEach(l=>{for(let d of Object.keys(l)){let b=l[d],x=e[d];x&&(Array.isArray(x)?x.forEach((D,gt)=>{let We=`${d}-${gt+1}`;t.push(new Er(We,{...D,dynamicschema:n},b,this.modelOptions))}):t.push(new Er(d,{...x,dynamicschema:n},b,this.modelOptions)))}}),t}get eventdata(){return this._eventdata}};var eg=require("immer");var va=class{_group;_context;_attributeCollection;_grouping;constructor(t,e,n,a){this._group=t,this._context=e,this._attributeCollection=new ft(t,e?.attributes,{...a,isReadonly:!0}),t.grouping&&(this._grouping=new $i({...t.grouping,dynamicschema:t.dynamicschema},n,a))}get type(){return this._group.type}get id(){return this._group._id||"unknown"}get label(){return this._context?.label}get attributeCollection(){return this._attributeCollection}get grouping(){return this._grouping}get reference(){return this._group.reference||[]}hasAttributeByKey(t){return this.attributeCollection.hasAttributeByKey(t)?!0:this.grouping?this.grouping.hasAttributeByKey(t):!1}getAttributeByKey(t){let e=this.attributeCollection.getAttributeByKey(t);if(e)return e;if(this.grouping)return this.grouping.getAttributeByKey(t)}},$i=class{[eg.immerable]=!0;_prefix;_groups=[];constructor(t,e,n){this._prefix=t?.prefix,t?.group&&(this._groups=this.createGroup(t,e,n))}createGroup(t,e,n){if(!t.group)return[];let a=this.getContextFromContributionsByPrefix(e,this._prefix);return t.group.map(l=>{let d=this.getDynamicSchema(l.type,t.dynamicschema),b={...l,dynamicschema:d};return new va(b,a,e,n)})}getDynamicSchema(t,e){if(e)return this._prefix&&e[t]&&!e[this._prefix+t]&&(e[this._prefix+t]=e[t]),e}get groups(){return this._groups}hasGroups(){return this._groups.length>0}getContextFromContributionsByPrefix(t,e){if(t&&e)return t.find(n=>n.prefix===e)}hasAttributeByKey(t){return this.groups.some(e=>e.hasAttributeByKey(t))}getAttributeByKey(t){let e=this.groups.find(n=>n.hasAttributeByKey(t));if(e)return e.getAttributeByKey(t)}getGroupByAttributeKey(t){return this.groups.find(e=>e.hasAttributeByKey(t))}};var cr=class o extends U{_isPrefixed;_prefix;_pagingName;_pagesizeName;_sortingName;_lookupToken;constructor(t,e,n=!0){super(t,void 0),this._isPrefixed=n,e?this.setParametersFromListModel(e):t!=null&&t instanceof o&&this.setParameterNamesFromHref(t)}setParameterNamesFromHref(t){this._prefix=this._isPrefixed?t.prefix:void 0,this._pagingName=t.pagingName,this._pagesizeName=t.pagesizeName,this._sortingName=t.sortingName}setParametersFromListModel(t){this._prefix=this._isPrefixed?t.key:void 0,this._pagingName=t.paging?.name||"",this._pagesizeName=t.paging?.pagesize?.name||"",this._sortingName=t.sorting?.name||"",this.page=t.paging?.page,this.pagesize=t.paging&&t.paging.pagesize.options.length>0?t.paging.pagesize.value:void 0,this.sort=t.sorting?.param,this.filterCollection=t.filterCollection,this.formdata=t.formdata,this.lookupToken=t.lookupToken}get prefix(){return this._prefix}get pagingName(){return this._pagingName}get pagesizeName(){return this._pagesizeName}get sortingName(){return this._sortingName}set page(t){this.pagingName&&this.setParameter(this.pagingName,t?.toString(),this.prefix)}get page(){return this.pagingName?this.getParameter(this.pagingName,this.prefix):void 0}set sort(t){this.sortingName&&this.setParameter(this.sortingName,t,this.prefix)}set pagesize(t){this.pagesizeName&&this.setParameter(this.pagesizeName,t?.toString(),this.prefix)}set lookupToken(t){this.setParameter("lookupToken",t,this.prefix)}set filterCollection(t){t&&t.filter(e=>e.parameterType==="queryParameter").forEach(e=>{e.params.forEach(n=>{n.value==null?this.removeParameter(n.name,this.prefix):this.setParameter(n.name,n.value,this.prefix)})})}};var qs=class o extends Se{static createFromListResult(t,e,n,a){let l=new Pt;return l.key=t,l.data=e,l.contributions=n,l.origin=a?.origin,l.contextPath=a?.contextPath,new o(l)}static createFromChoiceAttributeOption(t){let e=new Pt;e.key=t.code;let n=new o(e);return n.attributeCollection=t.attributeCollection,n}get selfhref(){let t=this.links.getLinkByKey("self");return t?t.href:new U("#")}get caseviewHref(){let t=this.attributeCollection.getAttributeByLayoutHint(Wr);if(t){let e=t.name,n=this.links.getLinkByKey(e);if(n)return n.href}return this.selfhref}get panelLinks(){return this.links.getLinksByGroup("panel")}hasPanelLinks(){return this.panelLinks.length>-1}getActionsByType(t){return this.actionCollection.getActionsByType(t)}get additionalDetailRoutePath(){let t=this.panelLinks;return t.length===0?"__NON_EXISTING_ROUTE__":t.map(e=>e.href.path).join("|")}};var $s=class o extends K{static createFromList(t){let e=t.data._embedded;if(e){if(Array.isArray(e))throw new Qt(`One record panel with multiple tables is not supported, place all types in one panel for the panel with key ${t.key}`);let n=t.data.dynamicschema,a=e.results.map(l=>{let[d]=Object.keys(l),b=l[d];b.dynamicschema=n;let x=t.contributions.results[d];return qs.createFromListResult(d,b,x,t.modelOptions)});return new o(a)}return new o}get additionalDetailRoutePath(){if(this.isEmpty())return"__NON_EXISTING_ROUTE__";let t=this.all.map(e=>e.additionalDetailRoutePath).join("|");return t.includes("|")?`(${t})`:t}get actionCollection(){let t=new re;return this.all.forEach(e=>{t.collection.push(...e.actionCollection.all)}),t}};var ig=require("immer");var rg=require("immer"),Ks=class{[rg.immerable]=!0;_pagesize;_options;constructor(t,e){this._pagesize=t,this._options=e?.options||[]}get name(){return"pagesize"}get value(){return this._pagesize}set value(t){this._pagesize=t}get options(){return this._options}get querystring(){return`${this.name}=${this.value}`}};var zs=class{[ig.immerable]=!0;_data;_contributions;_page;_pagesize;constructor(t,e){this._data=t,this._contributions=e,this._page=this._data?.page,this._pagesize=new Ks(this._data?.pagesize,this._contributions?.pagesize)}get isEnabled(){return typeof this.page<"u"}get name(){return"page"}get value(){return this.page}get maxpages(){return this._data?.maxpages}get page(){return this._page}set page(t){this._page=t}get totalResults(){return this._data?.totalresults||-1}get pagesize(){return this._pagesize}get querystring(){let t=[];return this.pagesize&&t.push(this.pagesize.querystring),t.push(`${this.name}=${this.page}`),t.join("&")}};var ng=require("immer");var Jl=(e=>(e.ASC="asc",e.DESC="desc",e))(Jl||{}),Ki=class{[ng.immerable]=!0;_key;_label;_group;_sortorder="desc";_selected=!1;constructor(t,e,n){this._key=t,this._group=n,this._label=this.setLabel(t,e,n)}setLabel(t,e,n){if(e)this._label=e;else if(n){let a=n.getAttributeByKey(t);a&&(this._label=a.label)}return""}reset(){this.selected=!1,this.sortorder="desc"}get selected(){return this._selected}set selected(t){this._selected=t}get key(){return this._key}get value(){return`${this.key} ${this.sortorder}`}get oppositeDirection(){return this.sortorder==="desc"?"asc":"desc"}get oppositeValue(){return`${this.key} ${this.oppositeDirection}`}get label(){return this._label}get sortorder(){return this._sortorder}set sortorder(t){this._sortorder=t}get group(){return this._group}getHref(t){let e=new cr(t);return(e.prefix?e.hasParameter("page",e.prefix):e.hasParameter("page"))&&(e.page=1),e.sort=this.oppositeValue,e}};var Xs=class extends K{constructor(t,e,n,a){super();let l=t?.sorting?.attributes;l&&(this.collection=l.map(d=>{let b=e[d],x=n&&n.getGroupByAttributeKey(d);return new Ki(d,b,x)}),this.setSelected(a))}get name(){return"sort"}get value(){return this.filter(t=>t.selected).map(t=>t.value).join(",")}set value(t){this.reset(),this.setSelected(t)}get param(){return this.value}get options(){return this.collection}reset(){this.collection.forEach(t=>t.reset())}setSelected(t=""){t.split(",").forEach(e=>{let[n,a]=e.split(" ");this.collection.forEach(l=>{l.key===n&&(l.selected=!0,a==="asc"?l.sortorder="asc":a==="desc"&&(l.sortorder="desc"))})})}getUpdateQuerystring(t){if(!t)throw new P("Missing option key as input argument");return this.filter(e=>e.key===t).map(e=>e.key===t?e.oppositeValue:e.value).join(",")}getUpdateQuerystringBySortOption(t){if(!(t instanceof Ki))throw new P("Missing SortOptionModel as input argument");return this.getUpdateQuerystring(t.key)}createListHref(t,e){let n=new cr(t);return(n.prefix?n.hasParameter("page",n.prefix):n.hasParameter("page"))&&(n.page=1),n.sort=this.getUpdateQuerystringBySortOption(e),n}};var ci=class extends F{_detail;_headers;_paging;_filterCollection;_sorting;_actionCollection;_listItemCollection;_grouping;_lookupToken;constructor(t){super(t),this._headers=this.setHeaders(),this._paging=this.setPaging(),this._filterCollection=this.setFilters(),this._sorting=this.setSorting(),this._actionCollection=this.setActionCollection(),this._grouping=this.setGrouping(),this._lookupToken=this.setLookupToken(),this._listItemCollection=this._listItemCollection=$s.createFromList(this)}get type(){return"List"}getInitialChildModelLinks(){return this.layouthint.has(gl)&&this.listItemCollection.length===1?this.listItemCollection.map(t=>{let e=t.selflink;return e.targetModel=Sr,e}):[]}setChildModels(t,e){this.detail=t.find(n=>n instanceof Sr)}get requestMethod(){return this.filterCollection.some(e=>e.parameterType==="bodyParameter"&&e.hasValue())?"POST":"GET"}get label(){return this.contributions.label}get lookupToken(){return this._lookupToken}set lookupToken(t){this._lookupToken=t}get introtext(){return this.data.content?this.data.content.text.message:this.contributions.text?this.contributions.text.message??this.contributions.text:Array.isArray(this.contributions.texts)?this.contributions.texts[0].text:""}get listItemCollection(){return this._listItemCollection}set listItemCollection(t){this._listItemCollection=t}get detail(){return this._detail}set detail(t){let e=this.listItemCollection.find(n=>n.selfhref.equals(t?.selfhref));e&&t&&(t.listitem=e),this._detail=t}get grouping(){return this._grouping}setGrouping(){return new $i({...this.data.grouping,dynamicschema:this.data.dynamicschema},this.contributions.contexts,this.modelOptions)}hasGrouping(){return this.grouping.hasGroups()}hasResults(){return this.listItemCollection.hasItems}isEmpty(){return!this.hasResults()}get shouldHide(){return this.layouthint.has(jn)&&this.isEmpty()&&this.actionCollection.isEmpty()&&!this.filterCollection.hasActiveFilters()}getListItemById(t){let e=decodeURIComponent(t.toString());return this.listItemCollection.find(n=>n.id.toString()===e)}getListItemByHref(t){return this.listItemCollection.find(e=>e.selfhref.equals(t))}get paging(){return this._paging}setPaging(){return new zs(this.data.paging,this.contributions.paging)}get sorting(){return this._sorting}setSorting(){return new Xs(this.contributions,this.getSortingLabels(),this.grouping,this.data.sorting)}get filterCollection(){return this._filterCollection}set filterCollection(t){Array.isArray(t)?this._filterCollection.collection=t:this._filterCollection=t}setFilters(){return new Lt(this.data.filter,{listkey:this.key,filter:this.contributions.filter||{},contexts:this.contributions.contexts,dynamicschema:this.data.dynamicschema},this.modelOptions)}isFiltered(){return this.filterCollection.hasActiveFilters()}get actionCollection(){return this._actionCollection}setActionCollection(){return new re(this.data.actions,this.contributions.actions,this.modelOptions)}hasList(){return this.key!=null}getSelfHref(){let t=this.links.getLinkByKey("self");return new cr(t?.href,this)}setLookupToken(){return this.modularuiResponse.parameters?.find(t=>t.name==="lookupToken")?.value}get selfhref(){return this.getSelfHref()}get headers(){return this._headers}setHeaders(){let t=[];if(this.contributions.results){let{results:e}=this.contributions;Object.keys(e).forEach(n=>{e[n].attributes.forEach(a=>{let l=new Qr(a,this.sorting);!t.some(b=>b.equals(l))&&!l.layouthint.has(Wr)&&t.push(l)})})}return t}getSortingLabels(){let t={};return this.contributions.results&&Object.values(this.contributions.results).forEach(e=>{e.attributes.forEach(n=>{let a=Object.keys(n)[0],l=n[a].label;t[a]=l})}),t}getActionsByType(t){return this.actionCollection.getActionsByType(t)}getAdditionalDetailLabel(t){let e=Object.keys(this.contributions.results);for(let n of e){let a=this.contributions.results[n]._links?.panel?.find(l=>l.resourcetype===t);if(a)return a.label}}get formdata(){let{formdata:t}=this.filterCollection;return t!=null?JSON.stringify(t):null}};var Js=class o extends Tt{static create(t,e,n){let a=new o;return t.options&&e.options&&t.options.forEach(l=>{a.add(new Ee([],{...l,optionType:this.getOptionType(l,e),elementsContributions:e.options[0].elements},{...n,referenceDate:new Date().toISOString().split("T")[0]}))}),a}static getOptionType(t,e){return e.optionType?e.optionType:t._links?.download?.[0].name==="avatar"?"user":"generic"}};var Ys=class extends F{_options;_filterCollection;constructor(t){super(t),this._options=Js.create(this.data,this.contributions,this.modelOptions),this._filterCollection=this.createFilterCollection(this.data.filter,this.contributions.filter)}get type(){return"LookupOptions"}get options(){return this._options}createFilterCollection(t,e){return t&&e?new Lt({[t.name]:t},{filter:e},this.modelOptions):new Lt}get filterCollection(){return this._filterCollection}};var Zs=class{_modelCategory;constructor(t){this._modelCategory=t}get key(){return this._modelCategory._id}get label(){return this._modelCategory.label}get description(){return this._modelCategory.description}get iconSmall(){return this._modelCategory.iconSmall}get iconMedium(){return this._modelCategory.iconMedium}get iconLarge(){return this._modelCategory.iconLarge}};var Qs=class extends K{constructor(t=[]){super(),this.collection=t?t.map(e=>new Zs(e)):[]}};var to=class extends F{get type(){return"ModelCatalog"}get label(){return this.locale==="nl"?"Model catalogus":"Model catalog"}get conceptIndexLink(){let t=this.links.getLinkByKey("concepts");if(!t)throw new J("Missing concepts index link in model catalog");return t}get contentIndexLink(){let t=this.links.getLinkByKey("content");if(!t)throw new J("Missing content index link in model catalog");return t}get modelcategories(){return new Qs(this.data.modelcategories)}};var eo=class extends F{_taskGroupCollection;constructor(t){super(t),this._taskGroupCollection=this.createTaskGroupCollection()}get type(){return"GroupingPanel"}get label(){return this.contributions.label}getInitialChildModelLinks(){return this.links.getLinksByGroup("taskgroup").all}get panelLinks(){return this.links.getLinksByGroup("panel")}setChildModels(t,e){let n=t.filter(a=>a instanceof $t);this.taskGroupCollection.add(n)}hasIntroText(){return this.introtext!==""}get introtext(){return this.data._content?this.data._content.text.message:this.contributions.text?this.contributions.text.message??this.contributions.text:Array.isArray(this.contributions.texts)?this.contributions.texts[0].text:""}createTaskGroupCollection(){let t=this.getDataAsArray("taskgroups",[]),e=this.getContributionAsArray("taskgroups",[]),n=[];for(let a of t){let l=a.name,d=e.find(b=>b.name===l);if(d){let b=$t.create(l,a,d,this.modelOptions);n.push(b)}}return new ar(n)}set taskGroupCollection(t){this._taskGroupCollection=t}get taskGroupCollection(){return this._taskGroupCollection}hasTaskGroups(){return this.taskGroupCollection&&this.taskGroupCollection.hasItems()}hasTasks(){return this.taskGroupCollection.hasTasks()}};var ro=class extends ci{get type(){return"CaseSearch"}getQuickSearchFilters(){return this.filterCollection?this.filterCollection.filter(t=>t.isQuickSearch()):[]}hasQuickSearchFilters(){return this.getQuickSearchFilters().length>0}};var io=class extends F{_actionCollection;_taskGroupCollection;constructor(t){super(t),this._taskGroupCollection=this.createTaskGroupCollection(),this._actionCollection=new re(this.data.actions,this.contributions.actions,this.modelOptions)}get type(){return"Tab"}getInitialChildModelLinks(){return this.links.getLinksByGroup("taskgroup","actions").all}setChildModels(t,e){let n=t.filter(a=>a instanceof $t);this.taskGroupCollection.add(n)}get searchLink(){return this.links.getLinksByGroup("search").first}createTaskGroupCollection(){let t=this.getDataAsArray("taskgroups",[]),e=this.getContributionAsArray("taskgroups",[]),n=[];for(let a of t){let l=a.name,d=e.find(b=>b.name===l);if(d){let b=$t.create(l,a,d,this.modelOptions);n.push(b)}}return new ar(n)}get taskGroupCollection(){return this._taskGroupCollection}set taskGroupCollection(t){this._taskGroupCollection=t}get label(){return this.getContributionAsString("label","")}get components(){return this.links.getLinksByGroup("component","search")}get actionCollection(){return this._actionCollection}hasComponents(){return this.components.size>0}hasTaskGroups(){return this.taskGroupCollection&&this.taskGroupCollection?.hasItems()}hasActions(){return this.actionCollection&&this.actionCollection.hasItems()}};var sg=Y(te(),1);var no=class extends je{_attributeCollection;constructor(t=new Pt){super(t);let e=this.contributions;if(e&&e.attributes&&Array.isArray(e.attributes)){let n=e.attributes.filter(a=>{let[l]=Object.keys(a);return l!=="sessiondata"&&(0,sg.has)(this.data,l)});this._attributeCollection=new ft(this.data,n,{...this.modelOptions,isReadonly:!0})}else this._attributeCollection=new ft(this.data,[],{...this.modelOptions,isReadonly:!0})}get type(){return"UserProfile"}get attributeCollection(){return this._attributeCollection}};var Yl=class{_isBasicAuthentication;_authenticationType;constructor(){this._isBasicAuthentication=!1,this._authenticationType=this.getAuthenticationType()}getAuthenticationType(){let t=ua(),e=_n[t];return!e||e==="JAAS"?"JAAS":e==="PAC4J_FORM"||t.includes("FormClient")?"PAC4J_FORM":e==="PAC4J_BASIC"||t.includes("IndirectBasicClient")?"PAC4J_BASIC":"PAC4J_INDIRECT"}get authenticationType(){return this._authenticationType}set authenticationType(t){this._authenticationType=t}get isBasicAuthentication(){return this._isBasicAuthentication||this.authenticationType==="PAC4J_BASIC"}set isBasicAuthentication(t){this._isBasicAuthentication=t}requestLogin(){return _e({url:`${ee()}/login`,method:"GET",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"}})}initLogin(t){return this.isBasicAuthentication||!t?Promise.resolve(!0):this.requestLogin().catch(e=>(e instanceof jr&&(this.isBasicAuthentication=!0),Promise.resolve({})))}login(t,e){switch(this.authenticationType){case"PAC4J_FORM":return this.doFormLogin(t,e);case"PAC4J_BASIC":return this.doBasicAuthentication(t,e);case"PAC4J_INDIRECT":return Promise.resolve();default:return this.doJaasAuthentication(t,e)}}getFormLoginUrl(){switch(this.authenticationType){case"PAC4J_BASIC":return`${ee()}${qn("DirectBasicAuthClient")}`;case"PAC4J_FORM":return`${ee()}${qn("FormClient")}`;case"PAC4J_INDIRECT":return"";default:return`${ee()}/j_security_check`}}getFormLoginData(t,e){let n=encodeURIComponent(t),a=encodeURIComponent(e);switch(this.authenticationType){case"PAC4J_BASIC":case"PAC4J_FORM":return`${Cl()}=${n}&${_l()}=${a}`;case"JAAS":return`j_username=${n}&j_password=${a}`;default:return""}}doFormLogin(t,e){return _e({url:this.getFormLoginUrl(),method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},data:this.getFormLoginData(t,e)})}doBasicAuthentication(t,e){return st.addItem("basic",btoa(`${t}:${e}`)),this.requestLogin()}doJaasAuthentication(t,e){return this.initLogin(!0).then(()=>this.isBasicAuthentication?(st.removeItem("basic-ok"),this.doBasicAuthentication(t,e).then(()=>{st.addItem("basic-ok",!0)})):this.doFormLogin(t,e))}getLogoutUrl(){let t=ua();return!t||t==="JAAS"?`${ee()}/Logoff`:`${ee()}${la()}`}redirectToLogout(t){st.clear();let e=window.location.origin,n=t?.startsWith("http")?t:`${e}${ee()}`;window.location.assign(this.getLogoutUrl()+"?url="+n)}logout(){return _e({url:this.getLogoutUrl()}).then(t=>(st.clear(),t))}};var Zl=class{_tokenId;_image;_origin="";_contextPath=ot();CaptchaRequest(t){this._origin=t?.origin||"",this._contextPath=t?.contextPath||ot()}captchaResponse(t){return this._tokenId="tokenId"in t?t.tokenId:this._tokenId,this._image="image"in t?t.image:this._image,{tokenId:this._tokenId,image:this._image,valid:"valid"in t?t.valid:!1,error:"error"in t?t.error:null}}init(){return Gr({url:ca(this._contextPath,this._origin)}).then(t=>this.captchaResponse(t))}send(t){return Gr({url:ca(this._contextPath,this._origin),method:"POST",data:{tokenId:this._tokenId??"",answer:t??""}}).then(e=>this.captchaResponse(e)).catch(e=>this.captchaResponse(e.response))}refresh(){return this.init()}};var zi=class o extends Error{response;href;constructor(t,e,n){super(t),Object.setPrototypeOf(this,o.prototype),this.response=e,this.href=n,"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}get resource(){return this.href}};var og=Y(te(),1);var Ql=[{name:"Application",isMatch:({resourcetype:o})=>o==="Application",Model:ks},{name:"Tab",isMatch:({resourcetype:o})=>o.endsWith("Tab")||o.endsWith("KnowledgeBank"),Model:io},{name:"ListDetail",isMatch:({resourcetype:o})=>{let t=o.toLowerCase();return t.endsWith("listdetail")||t.endsWith("listpaneldetail")||t.endsWith("datastorepaneldetail")},Model:Sr},{name:"List",isMatch:({resourcetype:o})=>o.endsWith("List")||o.endsWith("ListPanel")||o.endsWith("RelatedDataStorePanel")||o.endsWith("RelatedDatastorePanel")||["list-related-cases","RecordPanel","EventHistoryPanel","NotePanel","AppointmentPanel","DocumentPanel","AssignmentPanel"].includes(o),Model:ci},{name:"GroupingPanel",isMatch:({resourcetype:o})=>["GroupingPanel","CaseTabGroupingPanel","TabGroupingPanel"].includes(o),Model:eo},{name:"CaseSearch",isMatch:({resourcetype:o})=>o==="CaseSearch",Model:ro},{name:"CaseView",isMatch:({resourcetype:o})=>o==="CaseView",Model:Fs},{name:"Detail",isMatch:({resourcetype:o})=>o.endsWith("DetailPanel")||["Detail","CasePropertiesPanel","CasePropertiesPanelDetail"].includes(o),Model:Se},{name:"TaskGroup",isMatch:({resourcetype:o})=>o==="TaskGroup",Model:$t},{name:"Form",isMatch:({resourcetype:o})=>o==="Form",Model:lr},{name:"User",isMatch:({resourcetype:o})=>o==="userdata",Model:je},{name:"UserProfile",isMatch:({resourcetype:o})=>o==="userdata",Model:no},{name:"UserServices",isMatch:({resourcetype:o})=>o==="user_services",Model:ii},{name:"ModelCatalog",isMatch:({resourcetype:o})=>o==="ModelCatalog",Model:to},{name:"ConceptIndex",isMatch:({resourcetype:o})=>o==="ConceptSearch"||o.toLowerCase()==="relatedconcepts",Model:Hs},{name:"ConceptDetail",isMatch:({resourcetype:o})=>o==="ConceptDetail",Model:Me},{name:"ConceptTypeDetail",isMatch:({resourcetype:o})=>o==="ConceptTypeDetail",Model:He},{name:"ContentIndex",isMatch:({resourcetype:o})=>o==="ContentSearch",Model:Us},{name:"ContentTOC",isMatch:({resourcetype:o})=>o==="ContentTOC",Model:Vs},{name:"Content",isMatch:({resourcetype:o})=>o==="ContentDetail",Model:ai},{name:"ContentType",isMatch:({resourcetype:o})=>o==="ContentTypeDetail",Model:pe},{name:"LookupOptions",isMatch:({resourcetype:o})=>o==="lookupOptions",Model:Ys}];var so=class{static resolve(t,e,n=!1){if(!t)throw new P("No data or contribution available, cannot resolve model");if(!(0,og.has)(t.contributions,"resourcetype"))throw new P(`Contributions has wrong format, missing resourcetype property in contributions of ${t.requestHref?.toString()}`);if(e){let l=Array.isArray(e)?e:[e];return l.length===1||n?l[0]:Ql.find(b=>b.isMatch(t)&&l.includes(b.Model))?.Model}return Ql.find(l=>l.isMatch(t))?.Model}};var ag=Y(require("deepmerge"),1),ug=require("klona/full"),lg=Y(te(),1);var tc=class o{_response=new Pt;_href;_options;_targetModel;_forceTargetModel=!1;_contributionsHref;_locale="en";_method="GET";_progressEvent;_origin="";_contextPath=ot();_layoutHintProcessor;constructor(t,e={}){if(!t)throw new P("You must pass a href to the resource that is requested");this._href=typeof t=="string"?new U(t):t,this._options=e,this._layoutHintProcessor=new $n(this._origin,this._contextPath,this.options),this._response=new Pt,this._response.requestHref=this.href,this.locale=this.getRequestLocale(e.locale),this._response.parameters=this.href.parameters.all,this.contextPath=e.contextPath||this.href.contextPath,this.origin=e.origin||this.href.origin,this._targetModel=e.targetModel,this.method=e.method||this.href.method}getRequestLocale(t){return t||typeof navigator<"u"&&navigator?.language&&navigator.language.split("-")[0]||"en"}get origin(){return this._origin}set origin(t){this._origin=t??"",this._response.origin=t??"",this._layoutHintProcessor.setOrigin(this._origin)}get contextPath(){return this._contextPath}set contextPath(t){let e=t??ot();this._contextPath=e,this._response.contextPath=e,this._layoutHintProcessor.setContextPath(e)}get contributionsHref(){return this._contributionsHref}set contributionsHref(t){this._contributionsHref=t}set locale(t){this._locale=t,this._response.locale=t,this._layoutHintProcessor.setRequestOptions(this.options)}get locale(){return this._locale}get response(){return this._response}set href(t){this._href=t}get href(){return this._href}set method(t){this._method=t}get method(){return this._method}get options(){return{...this._options,locale:this.locale,method:this.method}}set options(t){this._options=t,this._layoutHintProcessor.setRequestOptions(t)}get requestOptions(){let{targetModel:t,forceTargetModel:e,updateHandler:n,childmodels:a,isValidationRequest:l,removeOnUnmount:d,...b}=this.options;return b}get withChildModels(){return!("childmodels"in this.options)||this.options.childmodels===!0}set targetModel(t){this._targetModel=t}get targetModel(){return this._targetModel}set forceTargetModel(t){this._forceTargetModel=t??!1}get forceTargetModel(){return this._forceTargetModel}resolveModel(){let t=so.resolve(this.response,this.targetModel,this.forceTargetModel);if(t)return t;let e=this.href.toString(),n=this.response?.resourcetype||"unknown";if(this.targetModel){let a=Array.isArray(this.targetModel)?this.targetModel.map(l=>l.type||l.name).join(", "):this.targetModel.type||this.targetModel.name;throw new J(`Cannot find a matching model for URL: '${e}', resourcetype: '${n}'. Available overrides: [${a}]`)}throw new J(`No JavaScript model is applicable for the request to ${e}. Response resourcetype: '${n}'.`)}createModel(){let t=this.resolveModel();return new t(this.response)}processContributionsService(t){if(!(0,lg.isPlainObject)(t))throw new P("Missing contributions data or contributions is not JSON");if(typeof t=="object"&&t!=null){let e=t,[n]=Object.keys(e),a=e[n];n==="error"&&this.handleContributionsError(a),typeof a=="object"&&a!=null&&(this.response.key in a||(this.response.key=n),this.response.contributions=a)}}handleContributionsError(t){let e=t.properties?.message??"Error in contribution";throw new zi(e,t,this.contributionsHref)}handleDataError(t){if(typeof t=="object"&&t.properties){let e=t.properties?.message??"Error in data";throw new zi(e,t,this.href.absolutepath.toString())}throw new P(JSON.stringify(t))}handleData(t,e){this.response.key=t,this.response.data=e;let n=e?._links;if(!n)throw new P(`No _links object found in the data of ${this.href.toString()}`);if(n?.contributions)this.contributionsHref=n.contributions.href;else if(Array.isArray(n)&&n[0].contributions)this.contributionsHref=n[0].contributions.href;else throw new P(`Contributions link not found for data with key ${t}`)}processDataService(t){if(typeof t!="object"||t===null)throw new P("Missing data or data is not JSON");let e=t,[n]=Object.keys(e),a=e[n];if(n==="error")this.handleDataError(a);else{let[l]=Object.keys(t);this.handleData(l,a)}}fetchContributionsService(){if(!this.contributionsHref)throw new J("Missing a contributions href");return _e({url:`${this.origin}${this.contextPath}${this.contributionsHref}`,cache:!0,locale:this.options.locale})}fetchDataService(){return _e({...this.requestOptions,url:`${this.origin}${this.contextPath}${this.href.path}`,params:this.href.getQuerystringForModularUI(),locale:this.options.locale,onProgress:this.onProgress})}set onProgress(t){this._progressEvent=t}get onProgress(){return this._progressEvent}getDynamicValidationData(t){let e=typeof this.options.data=="string"?JSON.parse(this.options.data):this.options.data;if(t instanceof lr){let n=JSON.parse(t.validationData);return JSON.stringify((0,ag.default)(e||{},n))}return JSON.stringify(e)??"{}"}async loadDynamicValidations(t){if(!this.options.isValidationRequest&&Et("USE_INSTANT_SERVER_VALIDATION")&&t instanceof lr&&t.currentFormObject?.hasDynamicValidations){let e=this.href.setParameter("commit","false"),n=await _e({...this.requestOptions,url:`${this.origin}${this.contextPath}${this.href.path}`,params:e.getQuerystringForModularUI(),data:this.getDynamicValidationData(t)});if(n==null||typeof n!="object")return t;let a=n,[l]=Object.keys(a);return t.updateValidations(a[l])}return t}fetchFromCache(){return this.options={...this.options,cache:!0},this.fetch()}fetchChildModels(t){let n=t.getInitialChildModelLinks().map(a=>{let l=new o(a.href,{locale:this.locale});return a.targetModel&&(l.targetModel=a.targetModel),a.isCacheable?l.fetchFromCache():l.fetch()});return Promise.allSettled(n).then(a=>{let l=[],d=[];return a.forEach(b=>{if(b.status==="rejected"){let{reason:x}=b;x.name!=="Error.ChangePasswordRequired"&&console.debug("Unexpected error when retrieving child model:",x),d.push(new qi(x,"",{origin:this.origin,contextPath:this.contextPath}))}else l.push(b.value)}),t instanceof F&&t.addChildModels(l,d),t})}async fetchContent(t){let e=await this.fetchFromCache();return t&&e instanceof ai&&e.childSectionLinks.length>0?this.fetchContentChildSections(e):e}async fetchContentChildSections(t){let e=(0,ug.klona)(t),n=await Promise.all(t.childSectionLinks.map(a=>{let l=a.selfhref.addParameter(et,t.entryDate);return new o(l,{locale:this.locale}).fetchContent(!0)}));return e.childSections=n.filter(a=>a instanceof xe),e}async fetch(){let t=await this.fetchDataService();if(t==null)throw new Error(`No data received for ${this.href.toString()}`);this.processDataService(t);let e=await this.fetchContributionsService();if(e==null)throw new Error(`No contributions data received for ${this.contributionsHref}`);this.processContributionsService(e),await this._layoutHintProcessor.processAsyncLayoutHints(this.response);let n=this.createModel(),a=await this.loadDynamicValidations(n);return this.withChildModels?await this.fetchChildModels(a):a}post(t){return this.method="POST",this.options={...this.options,data:t},this.fetch()}postForm(t){return this.method="POST",this.options={...this.options,data:t.formdata},this.fetch().then(e=>e instanceof lr?t.update(e):t)}fetchSync(){let t={headers:{"Accept-Language":this.locale}},e=dataFetcher.fetch(this.href.toString(),t);if(e==null)throw new Error(`No data received for ${this.href.toString()}`);if(this.processDataService(JSON.parse(e)),this.contributionsHref==null)throw new Error(`No constributions received for ${this.href.toString()}`);let n=dataFetcher.fetch(this.contributionsHref.toString(),t);if(n==null)throw new Error(`No constributions received for ${this.contributionsHref.toString()}`);this.processContributionsService(JSON.parse(n));let a=this.createModel(),d=a.getInitialChildModelLinks().map(b=>new o(b.href,{locale:this.locale}).fetchSync());return a instanceof F&&a.addChildModels(d,[]),a}};var CO=o=>{let t=new U(o).absolutehref,e=new XMLHttpRequest;return e.open("HEAD",t,!1),e.setRequestHeader("Accept","application/json"),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.send(),e.status!==404},_O=o=>{let t=new U(o).absolutehref,e=new XMLHttpRequest;e.open("HEAD",t,!1),e.setRequestHeader("Accept","application/json"),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.send();let n=e.responseURL??"";return e.status===400&&n.endsWith("/secureLogin")};var cg=o=>{if(o instanceof U)return{path:o.path,querystring:o.querystring,hash:o.hash};let t=o,e,n;if(o.includes("#")){let a=o.split("#");t=a[0],e=a[1]}if(o.includes("?")){let a=t.split("?");t=a[0],n=a[1]}return{path:t,querystring:n,hash:e}},ec=(o,t)=>{if(!Array.isArray(t))return new U(o);let e=cg(o),n=e.path;if(e.querystring){let a=new URLSearchParams(e.querystring),l=Array.from(a.keys());for(let d of l)t.includes(d)||a.delete(d);n=n+"?"+a.toString()}return e.hash&&(n=n+"#"+e.hash),o instanceof U?new U(n,o.resourcetype,{origin:o.origin,contextPath:o.contextPath}):new U(n)},AO=(o,t,e,n,a)=>{let l=t.toString();if(l.startsWith(`/${o}/`)||(l=`/${o}/${l}`),l=l.replace(/\/\//g,"/"),n?.search&&!l.includes("?")){let b=n.search.startsWith("?")?n.search.substring(1):n.search;l=`${l}?${b}`}let d=t instanceof U?ec(new U(l,t.resourcetype,{origin:t.origin,contextPath:t.contextPath}),a):ec(l,a);return e?d.setParameter("entryDate",e):d.removeParameter("entryDate"),d};var vO=()=>{let o=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=(o+Math.random()*16)%16|0;return o=Math.floor(o/16),(t==="x"?e:e&3|8).toString(16)})};var rc={},MO=process?.env?.NODE_ENV?process.env.NODE_ENV!=="production":rc!==void 0&&rc.env?!!rc.env.DEV:!1;var xO=(o,t=Ui(),e="")=>o.startsWith(e+t)?o:o.startsWith(ia)?`${e}${t}${o}`:`${e}${t}${ia}${o}`;var hg=require("html-entities");var EO=o=>(0,hg.encode)(o,{mode:"nonAsciiPrintableOnly",level:"xml"}),TO=(o,t={allowedTags:["p","br","b","i","u","strike"]})=>{if(typeof o!="string")throw new P("sanitizeHTML method expects a string");let a=EO(o).replace(/<(\w+)(.|[\r\n])*?>/gi,"<$1>").replace(/<br\s*>/gi,"<br />"),d=`<(?!\\/?(${Array.isArray(t.allowedTags)?t.allowedTags.join("|"):""})(>|\\s\\/))[^<]+?>`,b=new RegExp(d,"gi");return a.replace(b,"")};0&&(module.exports={ALL_CONTENT_IN_DATA_SETTING,ATTRIBUTE_TYPE,ATTRIBUTE_WIDTH,AVATAR,AVATAR_IN_TITLE,ActionCollection,ActionModel,ApplicationModel,AssignmentFilterModel,AttributeCollection,AttributeContent,AttributeDataMapper,AttributeFactory,AttributeSetModel,Authenticate,BSNConstraint,BaseAttributeModel,BaseCollection,BaseDateTimeUtil,BaseLayoutHintRule,BaseModel,BooleanAttributeModel,CAPTCHA_PATH,CASEVIEW_LINK,CHANGEPASSWORD_PATH,CHOICETYPE,CONFIRM_PASSWORD,CONTENT_PATH,CREATE_ACTION,Cache,CaptchaAttributeModel,CaptchaRequest,CaseSearchModel,CaseViewModel,ChoiceAttributeModel,ChoiceAttributeOptionCollection,ChoiceAttributeOptionModel,CompositeAttributeChildCollection,CompositeAttributeModel,ConceptDetailModel,ConceptIndexFilterModel,ConceptIndexModel,ConceptLinkCollection,ConceptLinkModel,ConceptRelationCollection,ConceptRelationModel,ConceptTypeDetailModel,ConfigurationException,ConstraintCollection,ContentConfiguration,ContentConfigurationElements,ContentConfigurationEndResults,ContentConfigurationQuestions,ContentConfigurationResults,ContentIndexModel,ContentLinkCollection,ContentLinkModel,ContentModel,ContentTOCModel,ContentTypeModel,DATETIME_OFFSET_FORMAT,DEFAULT_AUTHENTICATION_TYPE,DEFAULT_FIRST_WEEK_CONTAINS_DATE,DEFAULT_WEEK_STARTS_ON,DELETE_ACTION,DEPENDENT_ATTRIBUTE,DEPENDENT_ATTRIBUTE_CONTROL,DISABLED,DateBoundaryConstraint,DateTimeDateFormatConstraint,DateTimeTimeFormatConstraint,DateTimeUtil,DateUtil,DatetimeAttributeModel,DatetimeFormatConstraint,DecimalFormat,DependentAttribute,DetailModel,ErrorCollection,ErrorCollectionType,ErrorModel,ErrorResponse,FILTER_TYPE,FetchException,FileExtensionConstraint,FileSizeConstraint,FilterCollection,FilterFactory,FilterModel,FormModel,FormObjectModel,GenericConstraintModel,GroupModel,GroupingModel,GroupingPanelModel,HIDE_IN_USER_INTERFACE,HIDE_WHEN_EMPTY,HTTP_METHODS,HelptextAttributeModel,Href,IBANConstraint,INCLUDE_TIME_OFFSET,INITIAL_FILTER,INITIAL_TOTAL_FILESIZE,INTERNAL_LOGIN_TYPE,ISO_DATETIME_FORMAT,ISO_DATE_FORMAT,ISO_TIMESTAMP_FORMAT,ISO_TIME_FORMAT,IS_DEV,IS_GRAALJS,IS_SERVER,IllegalArgumentException,IllegalReturnException,IllegalStateException,JsonParseException,LOGIN_PASSWORD_SETTING,LOGIN_PATH,LOGIN_PATH_SETTING,LOGIN_TYPE,LOGIN_USERNAME_SETTING,LOGOUT_PATH,LOGOUT_PATH_SETTING,LabelAttributeModel,LayoutHintCollection,LayoutHintConfiguration,LayoutHintProcessor,LayoutHintRuleCollection,LinkCollection,LinkModel,ListDetailModel,ListHeaderModel,ListHref,ListItemCollection,ListItemModel,ListModel,LookupOptionCollection,LookupOptionsModel,MANDATORY,MAX_TOTAL_FILESIZE,MandatoryConstraint,MandatoryRangeConstraint,MemoAttributeModel,MissingPropertyException,ModelCatalogModel,ModelCategoryCollection,ModelCategoryModel,ModelResolver,ModularUIError,ModularUIRequest,ModularUIResponse,MoneyAttributeModel,NetworkException,NotAllowedUriException,NotFoundException,NumberAttributeModel,NumberBoundaryConstraint,NumberFormatConstraint,NumberGroupingConstraint,NumberUtil,OPTION_MODE,PARAMETER_SEPARATOR,PARAMETER_TYPES,PagesizeModel,PagingModel,Parameter,ParameterCollection,PasswordAttributeModel,PasswordConfirmConstraint,PasswordLowerAndUpperCaseConstraint,PasswordMinNumericCharactersConstraint,PasswordMinSpecialCharactersConstraint,PasswordThreeConsecutiveCharactersNotAllowedConstraint,ProcessStatusSettingsModel,RENDER_SECTION_LABEL,RESOURCE_PATH,RangeAttributeModel,RangeConstraint,RangeFilterModel,RegexConstraint,RemainingTotalUploadSize,ResourceCollection,ResourceModel,SHOW_ONE_RESULT_AS_DETAIL,SORT_OPTIONS,SORT_ORDER,SectionModel,ServerRequestException,SortOptionModel,SortingModel,SourceReferenceCollection,SourceReferenceModel,StringAttributeModel,StringFilterModel,StringLengthConstraint,SubSectionModel,TIMEVERSION_FILTER_NAME,TITLE,TabModel,TaskGroupCollection,TaskGroupModel,ThemePropertyException,TimeUtil,TimeoutException,TimestampUtil,UPDATE_ACTION,UPLOAD_PATH,USERPROFILE_PATH,UnauthorizedException,UnsupportedOperationException,UploadAttributeModel,UserModel,UserProfileModel,UserServicesModel,XMLAttributeModel,XMLConstraint,addLayoutHintRule,allSettings,cacheContributions,clearCookie,createHash,createHashFromHref,createHref,createUUID,filterParameters,getBooleanSetting,getCaptchaPath,getContentPath,getContextPath,getContextPathModularUI,getContextPathServer,getCookie,getEnabledLocales,getHint,getLayoutHintConfiguration,getNumberSetting,getRepositoryResourceUrl,getSetting,getStringSetting,getUploadPath,graalFetch,hasAllContentInData,isIncludeTimeOffsetInDateTimes,loginPasswordField,loginPath,loginType,loginUsernameField,logoutPath,normalizeLinkJSON,parseUrl,removeUnwantedHtml,resourceExists,resourceRedirectsToSecureLogin,retrieveText,setCookie,setSetting,setSettings,universalFetch,updateLayoutHintRules,xhr});
|
|
20
|
+
}`;var H=Np(function(){return $(p,O+"return "+M).apply(o,f)});if(H.source=M,wu(H))throw H;return H}function gM(r){return X(r).toLowerCase()}function yM(r){return X(r).toUpperCase()}function bM(r,i,s){if(r=X(r),r&&(s||i===o))return qc(r);if(!r||!(i=Xt(i)))return r;var u=ge(r),c=ge(i),p=$c(u,c),f=Kc(u,c)+1;return Ar(u,p,f).join("")}function CM(r,i,s){if(r=X(r),r&&(s||i===o))return r.slice(0,Xc(r)+1);if(!r||!(i=Xt(i)))return r;var u=ge(r),c=Kc(u,ge(i))+1;return Ar(u,0,c).join("")}function _M(r,i,s){if(r=X(r),r&&(s||i===o))return r.replace(wa,"");if(!r||!(i=Xt(i)))return r;var u=ge(r),c=$c(u,ge(i));return Ar(u,c).join("")}function AM(r,i){var s=dg,u=mg;if(at(i)){var c="separator"in i?i.separator:c;s="length"in i?N(i.length):s,u="omission"in i?Xt(i.omission):u}r=X(r);var p=r.length;if(Ci(r)){var f=ge(r);p=f.length}if(s>=p)return r;var m=s-_i(u);if(m<1)return u;var y=f?Ar(f,0,m).join(""):r.slice(0,m);if(c===o)return y+u;if(f&&(m+=y.length-m),ku(c)){if(r.slice(m).search(c)){var A,v=y;for(c.global||(c=Ja(c.source,X(fc.exec(c))+"g")),c.lastIndex=0;A=c.exec(v);)var M=A.index;y=y.slice(0,M===o?m:M)}}else if(r.indexOf(Xt(c),m)!=m){var E=y.lastIndexOf(c);E>-1&&(y=y.slice(0,E))}return y+u}function vM(r){return r=X(r),r&&wg.test(r)?r.replace(cc,Yy):r}var MM=Ti(function(r,i,s){return r+(s?" ":"")+i.toUpperCase()}),Pu=Ph("toUpperCase");function Fp(r,i,s){return r=X(r),i=s?o:i,i===o?$y(r)?tb(r):Py(r):r.match(i)||[]}var Np=U(function(r,i){try{return Kt(r,o,i)}catch(s){return wu(s)?s:new w(s)}}),xM=Je(function(r,i){return se(i,function(s){s=we(s),ze(r,s,Ru(r[s],r))}),r});function EM(r){var i=r==null?0:r.length,s=I();return r=i?st(r,function(u){if(typeof u[1]!="function")throw new oe(a);return[s(u[0]),u[1]]}):[],U(function(u){for(var c=-1;++c<i;){var p=r[c];if(Kt(p[0],this,u))return Kt(p[1],this,u)}})}function TM(r){return Yb(ue(r,D))}function Hu(r){return function(){return r}}function SM(r,i){return r==null||r!==r?i:r}var OM=Uh(),DM=Uh(!0);function jt(r){return r}function Uu(r){return mh(typeof r=="function"?r:ue(r,D))}function IM(r){return yh(ue(r,D))}function RM(r,i){return bh(r,ue(i,D))}var LM=U(function(r,i){return function(s){return pn(s,r,i)}}),wM=U(function(r,i){return function(s){return pn(r,s,i)}});function Bu(r,i,s){var u=Mt(i),c=Fo(i,u);s==null&&!(at(i)&&(c.length||!u.length))&&(s=i,i=r,r=this,c=Fo(i,Mt(i)));var p=!(at(s)&&"chain"in s)||!!s.chain,f=Ze(r);return se(c,function(m){var y=i[m];r[m]=y,f&&(r.prototype[m]=function(){var A=this.__chain__;if(p||A){var v=r(this.__wrapped__),M=v.__actions__=Ut(this.__actions__);return M.push({func:y,args:arguments,thisArg:r}),v.__chain__=A,v}return y.apply(r,dr([this.value()],arguments))})}),r}function kM(){return vt._===this&&(vt._=ob),this}function Vu(){}function FM(r){return r=N(r),U(function(i){return Ch(i,r)})}var NM=bu(st),PM=bu(Bc),HM=bu(Wa);function Pp(r){return Eu(r)?Ga(we(r)):dC(r)}function UM(r){return function(i){return r==null?o:Pr(r,i)}}var BM=Vh(),VM=Vh(!0);function ju(){return[]}function Wu(){return!1}function jM(){return{}}function WM(){return""}function GM(){return!0}function qM(r,i){if(r=N(r),r<1||r>pr)return[];var s=Ie,u=Ot(r,Ie);i=I(i),r-=Ie;for(var c=Ka(u,i);++s<r;)i(s);return c}function $M(r){return k(r)?st(r,we):Jt(r)?[r]:Ut(ip(X(r)))}function KM(r){var i=++nb;return X(r)+i}var zM=Vo(function(r,i){return r+i},0),XM=Cu("ceil"),JM=Vo(function(r,i){return r/i},1),YM=Cu("floor");function ZM(r){return r&&r.length?ko(r,jt,nu):o}function QM(r,i){return r&&r.length?ko(r,I(i,2),nu):o}function tx(r){return Wc(r,jt)}function ex(r,i){return Wc(r,I(i,2))}function rx(r){return r&&r.length?ko(r,jt,uu):o}function ix(r,i){return r&&r.length?ko(r,I(i,2),uu):o}var nx=Vo(function(r,i){return r*i},1),sx=Cu("round"),ox=Vo(function(r,i){return r-i},0);function ax(r){return r&&r.length?$a(r,jt):0}function ux(r,i){return r&&r.length?$a(r,I(i,2)):0}return h.after=IA,h.ary=dp,h.assign=yv,h.assignIn=Op,h.assignInWith=ta,h.assignWith=bv,h.at=Cv,h.before=mp,h.bind=Ru,h.bindAll=xM,h.bindKey=gp,h.castArray=jA,h.chain=hp,h.chunk=YC,h.compact=ZC,h.concat=QC,h.cond=EM,h.conforms=TM,h.constant=Hu,h.countBy=aA,h.create=_v,h.curry=yp,h.curryRight=bp,h.debounce=Cp,h.defaults=Av,h.defaultsDeep=vv,h.defer=RA,h.delay=LA,h.difference=t_,h.differenceBy=e_,h.differenceWith=r_,h.drop=i_,h.dropRight=n_,h.dropRightWhile=s_,h.dropWhile=o_,h.fill=a_,h.filter=lA,h.flatMap=pA,h.flatMapDeep=fA,h.flatMapDepth=dA,h.flatten=ap,h.flattenDeep=u_,h.flattenDepth=l_,h.flip=wA,h.flow=OM,h.flowRight=DM,h.fromPairs=c_,h.functions=Dv,h.functionsIn=Iv,h.groupBy=mA,h.initial=p_,h.intersection=f_,h.intersectionBy=d_,h.intersectionWith=m_,h.invert=Lv,h.invertBy=wv,h.invokeMap=yA,h.iteratee=Uu,h.keyBy=bA,h.keys=Mt,h.keysIn=Vt,h.map=zo,h.mapKeys=Fv,h.mapValues=Nv,h.matches=IM,h.matchesProperty=RM,h.memoize=Jo,h.merge=Pv,h.mergeWith=Dp,h.method=LM,h.methodOf=wM,h.mixin=Bu,h.negate=Yo,h.nthArg=FM,h.omit=Hv,h.omitBy=Uv,h.once=kA,h.orderBy=CA,h.over=NM,h.overArgs=FA,h.overEvery=PM,h.overSome=HM,h.partial=Lu,h.partialRight=_p,h.partition=_A,h.pick=Bv,h.pickBy=Ip,h.property=Pp,h.propertyOf=UM,h.pull=C_,h.pullAll=lp,h.pullAllBy=__,h.pullAllWith=A_,h.pullAt=v_,h.range=BM,h.rangeRight=VM,h.rearg=NA,h.reject=MA,h.remove=M_,h.rest=PA,h.reverse=Du,h.sampleSize=EA,h.set=jv,h.setWith=Wv,h.shuffle=TA,h.slice=x_,h.sortBy=DA,h.sortedUniq=R_,h.sortedUniqBy=L_,h.split=pM,h.spread=HA,h.tail=w_,h.take=k_,h.takeRight=F_,h.takeRightWhile=N_,h.takeWhile=P_,h.tap=Z_,h.throttle=UA,h.thru=Ko,h.toArray=Ep,h.toPairs=Rp,h.toPairsIn=Lp,h.toPath=$M,h.toPlainObject=Sp,h.transform=Gv,h.unary=BA,h.union=H_,h.unionBy=U_,h.unionWith=B_,h.uniq=V_,h.uniqBy=j_,h.uniqWith=W_,h.unset=qv,h.unzip=Iu,h.unzipWith=cp,h.update=$v,h.updateWith=Kv,h.values=Di,h.valuesIn=zv,h.without=G_,h.words=Fp,h.wrap=VA,h.xor=q_,h.xorBy=$_,h.xorWith=K_,h.zip=z_,h.zipObject=X_,h.zipObjectDeep=J_,h.zipWith=Y_,h.entries=Rp,h.entriesIn=Lp,h.extend=Op,h.extendWith=ta,Bu(h,h),h.add=zM,h.attempt=Np,h.camelCase=Zv,h.capitalize=wp,h.ceil=XM,h.clamp=Xv,h.clone=WA,h.cloneDeep=qA,h.cloneDeepWith=$A,h.cloneWith=GA,h.conformsTo=KA,h.deburr=kp,h.defaultTo=SM,h.divide=JM,h.endsWith=Qv,h.eq=be,h.escape=tM,h.escapeRegExp=eM,h.every=uA,h.find=cA,h.findIndex=sp,h.findKey=Mv,h.findLast=hA,h.findLastIndex=op,h.findLastKey=xv,h.floor=YM,h.forEach=pp,h.forEachRight=fp,h.forIn=Ev,h.forInRight=Tv,h.forOwn=Sv,h.forOwnRight=Ov,h.get=Fu,h.gt=zA,h.gte=XA,h.has=Rv,h.hasIn=Nu,h.head=up,h.identity=jt,h.includes=gA,h.indexOf=h_,h.inRange=Jv,h.invoke=kv,h.isArguments=Br,h.isArray=k,h.isArrayBuffer=JA,h.isArrayLike=Bt,h.isArrayLikeObject=ht,h.isBoolean=YA,h.isBuffer=vr,h.isDate=ZA,h.isElement=QA,h.isEmpty=tv,h.isEqual=ev,h.isEqualWith=rv,h.isError=wu,h.isFinite=iv,h.isFunction=Ze,h.isInteger=Ap,h.isLength=Zo,h.isMap=vp,h.isMatch=nv,h.isMatchWith=sv,h.isNaN=ov,h.isNative=av,h.isNil=lv,h.isNull=uv,h.isNumber=Mp,h.isObject=at,h.isObjectLike=lt,h.isPlainObject=bn,h.isRegExp=ku,h.isSafeInteger=cv,h.isSet=xp,h.isString=Qo,h.isSymbol=Jt,h.isTypedArray=Oi,h.isUndefined=hv,h.isWeakMap=pv,h.isWeakSet=fv,h.join=g_,h.kebabCase=rM,h.last=ce,h.lastIndexOf=y_,h.lowerCase=iM,h.lowerFirst=nM,h.lt=dv,h.lte=mv,h.max=ZM,h.maxBy=QM,h.mean=tx,h.meanBy=ex,h.min=rx,h.minBy=ix,h.stubArray=ju,h.stubFalse=Wu,h.stubObject=jM,h.stubString=WM,h.stubTrue=GM,h.multiply=nx,h.nth=b_,h.noConflict=kM,h.noop=Vu,h.now=Xo,h.pad=sM,h.padEnd=oM,h.padStart=aM,h.parseInt=uM,h.random=Yv,h.reduce=AA,h.reduceRight=vA,h.repeat=lM,h.replace=cM,h.result=Vv,h.round=sx,h.runInContext=g,h.sample=xA,h.size=SA,h.snakeCase=hM,h.some=OA,h.sortedIndex=E_,h.sortedIndexBy=T_,h.sortedIndexOf=S_,h.sortedLastIndex=O_,h.sortedLastIndexBy=D_,h.sortedLastIndexOf=I_,h.startCase=fM,h.startsWith=dM,h.subtract=ox,h.sum=ax,h.sumBy=ux,h.template=mM,h.times=qM,h.toFinite=Qe,h.toInteger=N,h.toLength=Tp,h.toLower=gM,h.toNumber=he,h.toSafeInteger=gv,h.toString=X,h.toUpper=yM,h.trim=bM,h.trimEnd=CM,h.trimStart=_M,h.truncate=AM,h.unescape=vM,h.uniqueId=KM,h.upperCase=MM,h.upperFirst=Pu,h.each=pp,h.eachRight=fp,h.first=up,Bu(h,(function(){var r={};return Re(h,function(i,s){z.call(h.prototype,s)||(r[s]=i)}),r})(),{chain:!1}),h.VERSION=t,se(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){h[r].placeholder=h}),se(["drop","take"],function(r,i){j.prototype[r]=function(s){s=s===o?1:bt(N(s),0);var u=this.__filtered__&&!i?new j(this):this.clone();return u.__filtered__?u.__takeCount__=Ot(s,u.__takeCount__):u.__views__.push({size:Ot(s,Ie),type:r+(u.__dir__<0?"Right":"")}),u},j.prototype[r+"Right"]=function(s){return this.reverse()[r](s).reverse()}}),se(["filter","map","takeWhile"],function(r,i){var s=i+1,u=s==ac||s==Cg;j.prototype[r]=function(c){var p=this.clone();return p.__iteratees__.push({iteratee:I(c,3),type:s}),p.__filtered__=p.__filtered__||u,p}}),se(["head","last"],function(r,i){var s="take"+(i?"Right":"");j.prototype[r]=function(){return this[s](1).value()[0]}}),se(["initial","tail"],function(r,i){var s="drop"+(i?"":"Right");j.prototype[r]=function(){return this.__filtered__?new j(this):this[s](1)}}),j.prototype.compact=function(){return this.filter(jt)},j.prototype.find=function(r){return this.filter(r).head()},j.prototype.findLast=function(r){return this.reverse().find(r)},j.prototype.invokeMap=U(function(r,i){return typeof r=="function"?new j(this):this.map(function(s){return pn(s,r,i)})}),j.prototype.reject=function(r){return this.filter(Yo(I(r)))},j.prototype.slice=function(r,i){r=N(r);var s=this;return s.__filtered__&&(r>0||i<0)?new j(s):(r<0?s=s.takeRight(-r):r&&(s=s.drop(r)),i!==o&&(i=N(i),s=i<0?s.dropRight(-i):s.take(i-r)),s)},j.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},j.prototype.toArray=function(){return this.take(Ie)},Re(j.prototype,function(r,i){var s=/^(?:filter|find|map|reject)|While$/.test(i),u=/^(?:head|last)$/.test(i),c=h[u?"take"+(i=="last"?"Right":""):i],p=u||/^find/.test(i);c&&(h.prototype[i]=function(){var f=this.__wrapped__,m=u?[1]:arguments,y=f instanceof j,A=m[0],v=y||k(f),M=function(V){var W=c.apply(h,dr([V],m));return u&&E?W[0]:W};v&&s&&typeof A=="function"&&A.length!=1&&(y=v=!1);var E=this.__chain__,O=!!this.__actions__.length,R=p&&!E,H=y&&!O;if(!p&&v){f=H?f:new j(this);var L=r.apply(f,m);return L.__actions__.push({func:Ko,args:[M],thisArg:o}),new ae(L,E)}return R&&H?r.apply(this,m):(L=this.thru(M),R?u?L.value()[0]:L.value():L)})}),se(["pop","push","shift","sort","splice","unshift"],function(r){var i=Co[r],s=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",u=/^(?:pop|shift)$/.test(r);h.prototype[r]=function(){var c=arguments;if(u&&!this.__chain__){var p=this.value();return i.apply(k(p)?p:[],c)}return this[s](function(f){return i.apply(k(f)?f:[],c)})}}),Re(j.prototype,function(r,i){var s=h[i];if(s){var u=s.name+"";z.call(Mi,u)||(Mi[u]=[]),Mi[u].push({name:i,func:s})}}),Mi[Bo(o,Ir).name]=[{name:"wrapper",func:o}],j.prototype.clone=vb,j.prototype.reverse=Mb,j.prototype.value=xb,h.prototype.at=Q_,h.prototype.chain=tA,h.prototype.commit=eA,h.prototype.next=rA,h.prototype.plant=nA,h.prototype.reverse=sA,h.prototype.toJSON=h.prototype.valueOf=h.prototype.value=oA,h.prototype.first=h.prototype.head,sn&&(h.prototype[sn]=iA),h}),gr=eb();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(vt._=gr,define(function(){return gr})):Lr?((Lr.exports=gr)._=gr,Ua._=gr):vt._=gr}).call(Pi)});var Jd=S((vI,Xd)=>{"use strict";function wS(o,t){return function(e){return o(t(e))}}Xd.exports=wS});var Zd=S((MI,Yd)=>{"use strict";var kS=Jd(),FS=kS(Object.getPrototypeOf,Object);Yd.exports=FS});var oa=S((xI,tm)=>{"use strict";var NS=Mn(),PS=Zd(),HS=xn(),US="[object Object]",BS=Function.prototype,VS=Object.prototype,Qd=BS.toString,jS=VS.hasOwnProperty,WS=Qd.call(Object);function GS(o){if(!HS(o)||NS(o)!=US)return!1;var t=PS(o);if(t===null)return!0;var e=jS.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&Qd.call(e)==WS}tm.exports=GS});var qm=S((KU,Gm)=>{"use strict";function dO(o,t){for(var e=-1,n=t.length,a=o.length;++e<n;)o[a+e]=t[e];return o}Gm.exports=dO});var Xm=S((zU,zm)=>{"use strict";var $m=An(),mO=al(),gO=Ri(),Km=$m?$m.isConcatSpreadable:void 0;function yO(o){return gO(o)||mO(o)||!!(Km&&o&&o[Km])}zm.exports=yO});var Zm=S((XU,Ym)=>{"use strict";var bO=qm(),CO=Xm();function Jm(o,t,e,n,a){var l=-1,d=o.length;for(e||(e=CO),a||(a=[]);++l<d;){var b=o[l];t>0&&e(b)?t>1?Jm(b,t-1,e,n,a):bO(a,b):n||(a[a.length]=b)}return a}Ym.exports=Jm});var tg=S((JU,Qm)=>{"use strict";var _O=Zm(),AO=1/0;function vO(o){var t=o==null?0:o.length;return t?_O(o,AO):[]}Qm.exports=vO});var RO={};dx(RO,{ALL_CONTENT_IN_DATA_SETTING:()=>im,ATTRIBUTE_TYPE:()=>mt,ATTRIBUTE_WIDTH:()=>Wt,AVATAR:()=>LS,AVATAR_IN_TITLE:()=>RS,ActionCollection:()=>re,ActionModel:()=>ws,ApplicationModel:()=>ks,AssignmentFilterModel:()=>ni,AttributeCollection:()=>ft,AttributeContent:()=>Zr,AttributeDataMapper:()=>Ls,AttributeFactory:()=>_t,AttributeSetModel:()=>Sr,Authenticate:()=>Ql,BSNConstraint:()=>gs,BaseAttributeModel:()=>G,BaseCollection:()=>K,BaseDateTimeUtil:()=>$r,BaseLayoutHintRule:()=>ti,BaseModel:()=>q,BooleanAttributeModel:()=>es,CAPTCHA_PATH:()=>rl,CASEVIEW_LINK:()=>qr,CHANGEAVATAR_PATH:()=>_x,CHANGEPASSWORD_PATH:()=>bx,CHOICETYPE:()=>Pl,CONFIRM_PASSWORD:()=>dl,CONTENT_PATH:()=>tl,CREATE_ACTION:()=>Un,Cache:()=>ot,CaptchaAttributeModel:()=>rs,CaptchaRequest:()=>tc,CaseSearchModel:()=>ro,CaseViewModel:()=>Fs,ChoiceAttributeModel:()=>Ve,ChoiceAttributeOptionCollection:()=>Ue,ChoiceAttributeOptionModel:()=>Ee,CompositeAttributeChildCollection:()=>Be,CompositeAttributeModel:()=>dt,ConceptDetailModel:()=>Me,ConceptIndexFilterModel:()=>lr,ConceptIndexModel:()=>Hs,ConceptLinkCollection:()=>Ps,ConceptLinkModel:()=>zr,ConceptRelationCollection:()=>zn,ConceptRelationModel:()=>Xr,ConceptTypeDetailModel:()=>He,ConfigurationException:()=>Qt,ConstraintCollection:()=>it,ContentConfiguration:()=>li,ContentConfigurationElements:()=>It,ContentConfigurationEndResults:()=>js,ContentConfigurationQuestions:()=>Ws,ContentConfigurationResults:()=>ui,ContentIndexModel:()=>Bs,ContentLinkCollection:()=>Us,ContentLinkModel:()=>Ht,ContentModel:()=>ai,ContentTOCModel:()=>Vs,ContentTypeModel:()=>pe,DATETIME_OFFSET_FORMAT:()=>ke,DEFAULT_AUTHENTICATION_TYPE:()=>ra,DEFAULT_FIRST_WEEK_CONTAINS_DATE:()=>zu,DEFAULT_WEEK_STARTS_ON:()=>Ku,DELETE_ACTION:()=>Pn,DEPENDENT_ATTRIBUTE:()=>Nn,DEPENDENT_ATTRIBUTE_CONTROL:()=>Hi,DISABLED:()=>fl,DateBoundaryConstraint:()=>is,DateTimeDateFormatConstraint:()=>ns,DateTimeTimeFormatConstraint:()=>os,DateTimeUtil:()=>Ne,DateUtil:()=>St,DatetimeAttributeModel:()=>as,DatetimeFormatConstraint:()=>ss,DecimalFormat:()=>or,DependentAttribute:()=>cs,DetailModel:()=>Se,ErrorCollection:()=>fe,ErrorCollectionType:()=>Jn,ErrorModel:()=>nr,ErrorResponse:()=>ci,FILTER_TYPE:()=>Fl,FetchException:()=>Wr,FileExtensionConstraint:()=>hs,FileSizeConstraint:()=>ps,FilterCollection:()=>Lt,FilterFactory:()=>oi,FilterModel:()=>Rt,FormModel:()=>cr,FormObjectModel:()=>Or,GenericConstraintModel:()=>Zn,GroupModel:()=>va,GroupingModel:()=>$i,GroupingPanelModel:()=>eo,HIDE_IN_USER_INTERFACE:()=>yl,HIDE_WHEN_EMPTY:()=>jn,HTTP_METHODS:()=>Nt,HelptextAttributeModel:()=>us,Href:()=>B,IBANConstraint:()=>ys,INCLUDE_TIME_OFFSET:()=>nm,INITIAL_FILTER:()=>Wn,INITIAL_TOTAL_FILESIZE:()=>Bn,INTERNAL_LOGIN_TYPE:()=>_n,ISO_DATETIME_FORMAT:()=>Gu,ISO_DATE_FORMAT:()=>Cn,ISO_TIMESTAMP_FORMAT:()=>$u,ISO_TIME_FORMAT:()=>qu,IS_DEV:()=>SO,IS_GRAALJS:()=>Ii,IS_SERVER:()=>gx,IllegalArgumentException:()=>P,IllegalReturnException:()=>On,IllegalStateException:()=>J,JsonParseException:()=>Dn,KEYCODES:()=>yx,LOGIN_PASSWORD_SETTING:()=>Zu,LOGIN_PATH:()=>zS,LOGIN_PATH_SETTING:()=>Ju,LOGIN_TYPE:()=>Xu,LOGIN_USERNAME_SETTING:()=>Yu,LOGOUT_PATH:()=>XS,LOGOUT_PATH_SETTING:()=>Qu,LabelAttributeModel:()=>ls,LayoutHintCollection:()=>ut,LayoutHintConfiguration:()=>wn,LayoutHintProcessor:()=>$n,LayoutHintRuleCollection:()=>ms,LinkCollection:()=>ct,LinkModel:()=>ve,ListDetailModel:()=>Dr,ListHeaderModel:()=>Qr,ListHref:()=>hr,ListItemCollection:()=>$s,ListItemModel:()=>qs,ListModel:()=>hi,LookupOptionCollection:()=>Js,LookupOptionsModel:()=>Ys,MANDATORY:()=>Fn,MAX_TOTAL_FILESIZE:()=>Vn,MandatoryConstraint:()=>Qn,MandatoryRangeConstraint:()=>Os,MemoAttributeModel:()=>bs,MissingPropertyException:()=>ll,ModelCatalogModel:()=>to,ModelCategoryCollection:()=>Qs,ModelCategoryModel:()=>Zs,ModelResolver:()=>so,ModularUIError:()=>zi,ModularUIRequest:()=>rc,ModularUIResponse:()=>Pt,MoneyAttributeModel:()=>vs,NetworkException:()=>Ni,NotAllowedUriException:()=>In,NotFoundException:()=>Rn,NumberAttributeModel:()=>ri,NumberBoundaryConstraint:()=>Cs,NumberFormatConstraint:()=>_s,NumberGroupingConstraint:()=>As,NumberUtil:()=>At,OPTION_MODE:()=>Nl,PARAMETER_SEPARATOR:()=>jr,PARAMETER_TYPES:()=>Vr,PagesizeModel:()=>Ks,PagingModel:()=>zs,Parameter:()=>qt,ParameterCollection:()=>Ae,PasswordAttributeModel:()=>Ss,PasswordConfirmConstraint:()=>Gi,PasswordLowerAndUpperCaseConstraint:()=>Ms,PasswordMinNumericCharactersConstraint:()=>xs,PasswordMinSpecialCharactersConstraint:()=>Es,PasswordThreeConsecutiveCharactersNotAllowedConstraint:()=>Ts,ProcessStatusSettingsModel:()=>Kr,RENDER_SECTION_LABEL:()=>Gn,RESOURCE_PATH:()=>ia,RangeAttributeModel:()=>ar,RangeConstraint:()=>Ds,RangeFilterModel:()=>si,RegexConstraint:()=>sr,RemainingTotalUploadSize:()=>fs,ResourceCollection:()=>Tt,ResourceModel:()=>F,SHOW_ONE_RESULT_AS_DETAIL:()=>gl,SORT_OPTIONS:()=>ml,SORT_ORDER:()=>Zl,SectionModel:()=>xe,ServerRequestException:()=>cl,SortOptionModel:()=>Ki,SortingModel:()=>Xs,SourceReferenceCollection:()=>Xn,SourceReferenceModel:()=>Wi,StringAttributeModel:()=>Te,StringFilterModel:()=>Ns,StringLengthConstraint:()=>ts,SubSectionModel:()=>Yn,TIMEVERSION_FILTER_NAME:()=>et,TITLE:()=>Mr,TabModel:()=>io,TaskGroupCollection:()=>ur,TaskGroupModel:()=>$t,ThemePropertyException:()=>hl,TimeUtil:()=>ir,TimeoutException:()=>Ln,TimestampUtil:()=>Pe,UPDATE_ACTION:()=>Hn,UPLOAD_PATH:()=>el,USERPROFILE_PATH:()=>Cx,UnauthorizedException:()=>Gr,UnsupportedOperationException:()=>pl,UploadAttributeModel:()=>ei,UploadRequest:()=>ic,UserModel:()=>je,UserProfileModel:()=>no,UserServicesModel:()=>ii,XMLAttributeModel:()=>Rs,XMLConstraint:()=>Is,addLayoutHintRule:()=>hO,allSettings:()=>KS,cacheContributions:()=>aa,clearCookie:()=>uO,createHash:()=>lO,createHashFromHref:()=>Jr,createHref:()=>EO,createUUID:()=>TO,filterParameters:()=>nc,getBooleanSetting:()=>Ct,getCaptchaPath:()=>ca,getContentPath:()=>Ml,getContextPath:()=>ee,getContextPathModularUI:()=>rt,getContextPathServer:()=>Vi,getCookie:()=>Dl,getEnabledLocales:()=>Cl,getHint:()=>Et,getLayoutHintConfiguration:()=>IS,getNumberSetting:()=>Bi,getRepositoryResourceUrl:()=>OO,getSetting:()=>Gt,getStringSetting:()=>Fe,getUploadPath:()=>xl,graalFetch:()=>El,hasAllContentInData:()=>er,isIncludeTimeOffsetInDateTimes:()=>xr,loginPasswordField:()=>Al,loginPath:()=>qn,loginType:()=>ua,loginUsernameField:()=>_l,logoutPath:()=>la,normalizeLinkJSON:()=>kl,parseUrl:()=>pg,removeUnwantedHtml:()=>IO,resourceExists:()=>MO,resourceRedirectsToSecureLogin:()=>xO,retrieveText:()=>Yr,setContextPath:()=>YS,setCookie:()=>aO,setSetting:()=>bl,setSettings:()=>$S,universalFetch:()=>_e,updateLayoutHintRules:()=>pO,xhr:()=>Er});module.exports=mx(RO);var Ii=typeof Graal<"u",gx=Ii,Nt=(e=>(e.GET="GET",e.POST="POST",e))(Nt||{}),Vr=(e=>(e.BODY="bodyParameter",e.QUERY="queryParameter",e))(Vr||{}),jr="~",et="entryDate",Cn="yyyy-MM-dd",Gu="yyyy-MM-dd'T'HH:mm:ss",qu="HH:mm:ss",$u="yyyy-MM-dd'T'HH:mm:ss.SSS",ke="xxx",Ku=1,zu=1,Wt=(l=>(l.EXTRA_SMALL="EXTRA_SMALL",l.SMALL="SMALL",l.MEDIUM="MEDIUM",l.LARGE="LARGE",l.EXTRA_LARGE="EXTRA_LARGE",l))(Wt||{}),_n=(a=>(a.JAAS="JAAS",a.PAC4J_FORM="PAC4J_FORM",a.PAC4J_BASIC="PAC4J_BASIC",a.PAC4J_INDIRECT="PAC4J_INDIRECT",a))(_n||{}),Xu="security.clients",Ju="FormClient.login_url",Yu="FormClient.username_field_name",Zu="FormClient.password_field_name",Qu="FormClient.logout_url",ra={name:"Form based authentication",authentication:"DefaultFormClient",isPrimary:!0},yx={TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40};var tl="/content",el="/uploadFile",rl="/captchaServices",bx="/change-password",Cx="/user",ia="/resource",_x="/change-avatar";var Qt=class extends Error{constructor(t){super(t),this.name="ConfigurationException"}};var ul=Y(Fi(),1);var OS=400,Wr=class o extends Error{id;request;requestOptions;status;response;properties;parameters;constructor(t,e,n){let a=DS(t,n);super(a.id),Object.setPrototypeOf(this,o.prototype),this.name=a.id,this.id=a.id,this.request=e,this.requestOptions=n,this.status=e&&e.status?e.status:OS,this.response=t,this.properties=a.properties??{},this.parameters=a.param,"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,this.constructor)}},DS=(o,t)=>{let e={id:"Error.CannotRequestResource",defaultMessage:`Cannot request resource ${t?.url??""} with method ${t?.method??"GET"}`,properties:{},param:void 0};if(!o)return e;if((0,ul.default)(o,"error"))return{...e,...o.error};let[n]=Object.keys(o);return(0,ul.default)(o[n],"errors")?{...e,...o[n].errors}:e};var P=class extends Error{constructor(t){super(t),this.name="IllegalArgumentException"}};var On=class extends Error{constructor(t){super(t),this.name="IllegalReturnException"}};var zd=require("immer"),J=class extends Error{[zd.immerable]=!0;constructor(t){super(t),this.name="IllegalStateException"}};var Dn=class extends Error{constructor(t){super(t instanceof SyntaxError?t.message:t),this.name="JsonParseException"}};var ll=class extends Error{constructor(t){super(t),this.name="MissingPropertyException"}};var Ni=class extends Error{id;status;constructor(t,e){super(`An unexpected network error occurred, cannot request resource ${t} with method ${e}`),this.name="NetworkException",this.id="NetworkException",this.status=0}};var In=class extends Error{constructor(t){super(t),this.name="NotAllowedUriException"}};var Rn=class extends Error{id;status;isReload;constructor(t,e,n=!1){super(`Resource ${t} with method ${e} not found`),this.name="NotFoundException",this.id="NotFoundException",this.status=404,this.isReload=n}};var cl=class extends Error{constructor(t){super(t),this.name="ServerRequestException"}};var hl=class extends Error{constructor(t){super(t),this.name="ThemePropertyException"}};var Ln=class extends Error{constructor(t,e){super(`Timeout occurred in connection to ${t} with method ${e}.`),this.name="TimeoutException"}};var Gr=class extends Error{id;status;response;constructor(t,e,n){super(`Cannot request resource ${t} with method ${e}`),this.name="UnauthorizedException",this.id="UnauthorizedException",this.status=401,this.response=n}};var pl=class extends Error{constructor(t){super(t),this.name="UnsupportedOperationException"}};var wn={MANDATORY:{hint:"mandatory",description:{NL:"Geeft aan of een attribuut verplicht is. Dient samen met de dependency hint gebruikt te worden.",EN:`Indicates a mandatory attribute.
|
|
21
|
+
Should be used together with the dependency hint.`},link:"",component:["attribute"]},DEPENDENT_ATTRIBUTE_CONTROL:{hint:"dependent-control:${unique-control-id}",description:{NL:"Geeft aan dat dit het attribuut is waar attributen van afhankelijk zijn. Het unique-control-id is een uniek id dat kan worden gebruikt in the hint voor de show|hide actie op het afhankelijke attribuut.",EN:"Marks the choice attribute where other attributes depend on. The unique control id is a unique id that can be used in the hint for the show|hide action on the dependent attribute."},link:"",component:["attribute/boolean","attribute/choice"]},DEPENDENT_ATTRIBUTE_ACTION:{hint:"dependent-attribute:(show|hide) when dependent-control:${unique-control-id} (equals|includes|notEquals|notIncludes) [${codemaps}]",description:{NL:"Toon of verberg een attribute dat afhankelijk is van de geselecteerde opties van een keuze attribute",EN:"To show or hide an attribute dependent on options of the choice control codemap that are selected or not selected."},link:"",component:["attribute"]},SHOW_ONE_RESULT_AS_DETAIL:{hint:"show-one-result-as-detail",description:{NL:"Een lijst met maar \xE9\xE9n item mag direct als detail getoond worden.",EN:"A list with only one detail must be shown as a detail."},link:"",component:["list"]},HIDE_WHEN_EMPTY:{hint:"hide-when-empty",description:{NL:"Een lijst zonder lijst-items en lijst-taken dient niet getoond worden.",EN:"A list without list-items and list-tasks should not be shown."},link:"",component:["list"]},INITIAL_FILTER:{hint:"initial-filter:${filter-name}=${initial-value}",description:{NL:"Laad de lijst met een standaardwaarde voor een filter, er is geen controle op het bestaan van het filter. Als het filter niet is geconfigureerd, treedt er een fout op. Houd er rekening mee dat filters hoofdlettergevoelig zijn.",EN:"Load the list with a default value for a filter, there is no check for the existence of the filter. If the filter is not configured, an error occurs. Keep in mind that filters are case sensitive."},link:"",component:["list"]},CONFIRM_PASSWORD:{hint:"confirm-password",description:{NL:"Wachtwoord attribuut moet bevestigd worden dmv een tweede wachtwoord attribuut.",EN:"Password attribute must be confirmed using a second password attribute."},link:"",component:["attribute/password"]},TITLE:{hint:"title",description:{NL:"Markeert een attribuut als een titel attribuut",EN:"Marks an attribute as a title attribute"},link:"",component:["caseview_table","codemap","list/appointment_table","list/assignment_table","list/caseproperties_table","list/document_table","list/timelimit_table","list/eventhistory_table","list/note_table","list/record_table","list/case_table","list/casesearch_table","list/datastore_table","list/datastoreview_table","list/instrumentresult_table","list/event_table","list/user_table","list/organization_table"]},INITIAL_TOTAL_FILESIZE:{hint:"initial-total-file-size",description:{NL:"Wordt gebruikt in samenwerking met een upload attribuut, deze hint moet worden gezet op een readonly attribuut dat de reeds gebruikte file grootte bevat.",EN:"Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the file size currently used."},link:"",component:["attribute/number"]},MAX_TOTAL_FILESIZE:{hint:"max-total-file-size",description:{NL:"Wordt gebruikt in samenwerking met een upload attribuut, deze hint moet worden gezet op een readonly attribuut dat de maximaal toegestane file grootte bevat.",EN:"Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the maximum allowed total file size."},link:"",component:["attribute/number"]},CREATE_ACTION:{hint:"create",description:{NL:"Markeer taak als cre\xEBer taak.",EN:"Mark task as create task"},component:["form"]},UPDATE_ACTION:{hint:"update",description:{NL:"Markeer taak als bewerk taak.",EN:"Mark task as update task"},component:["form"]},DELETE_ACTION:{hint:"delete",description:{NL:"Markeer taak als verwijder taak.",EN:"Mark task as delete task"},component:["form"]},SORT_OPTIONS:{hint:"sort-options",description:{NL:"Sorteer opties alfabetisch",EN:"Sort options alphabetically"},component:["attribute/choice"]},CASEVIEW_LINK:{hint:"case-view-link",description:{NL:"Markeer een case id reference attribute als de referentie naar de case view. Vervangt de self link van een lijst item",EN:"Mark a case id reference attribute as the reference to the case view. Replaces the self link of a list item"},component:["attribute/reference","list/datastore_table"]},DISABLED:{hint:"disabled",description:{NL:"Geeft aan of een attribuut uitgeschakeld is.",EN:"Indicates a disabled attribute."},component:["attribute"]},HIDE_IN_USER_INTERFACE:{hint:"hide-in-user-interface",description:{NL:"Verberg een tab in de user interface.",EN:"Hide a tab in the user interface."},component:["tab","list","groupingpanel"]},AVATAR:{hint:"avatar",description:{NL:"Geef het attribuut weer als de avatar van de gebruiker.",EN:"Render the attribute as the user's avatar."},link:"",component:["attribute/upload","list/user_table"]},AVATAR_IN_TITLE:{hint:"avatar-in-title",description:{NL:"Geeft aan dat de avatarafbeelding in de titel wordt opgenomen. De avatarafbeelding wordt v\xF3\xF3r het titel attribuut weergegeven in de lijstweergave en de snelle lijst quick view.",EN:"Indicates that the avatar image will be included in the title. The avatar image is shown in front of the title attribute in the list view and list quick view."},link:"",component:["list/user_table"]}};var om=Y(te(),1);var Et=o=>o in wn?wn[o].hint:"",Fn=Et("MANDATORY"),fl=Et("DISABLED"),Hi="dependent-control",Nn="dependent-attribute:",dl=Et("CONFIRM_PASSWORD"),ml=Et("SORT_OPTIONS"),Mr=Et("TITLE"),Pn=Et("DELETE_ACTION"),Hn=Et("UPDATE_ACTION"),Un=Et("CREATE_ACTION"),Bn=Et("INITIAL_TOTAL_FILESIZE"),Vn=Et("MAX_TOTAL_FILESIZE"),gl=Et("SHOW_ONE_RESULT_AS_DETAIL"),jn=Et("HIDE_WHEN_EMPTY"),Wn="initial-filter:",qr=Et("CASEVIEW_LINK"),Gn="render-section-label",yl=Et("HIDE_IN_USER_INTERFACE"),IS=()=>wn,RS=Et("AVATAR_IN_TITLE"),LS=Et("AVATAR");var em=Y(Fi(),1),rm=Y(oa(),1);var im="hasAllContentInData",nm="isIncludeTimeOffsetInDateTimes",qS={UI_PARAMETERS:[],USE_CLIENTSIDE_VALIDATION:!0,USE_INSTANT_SERVER_VALIDATION:!0,CALENDAR_WEEK_STARTS_ON:1,ALWAYS_COMMIT_FORM:!1,ALLOW_HIDE_WHEN_EMPTY_ON_TABS:!0,HIDE_WHEN_EMPTY_IGNORE_TASKS:!1,SHOW_AVATARS:!0,COMPLETE_SOURCE:!1},Ui=qS,$S=o=>{(0,rm.default)(o)&&(Ui=Object.assign(Ui,o))},Gt=(o,t)=>{if(!(0,em.default)(Ui,o)&&t===void 0)throw new Error(`Setting with name ${o} not found and no defaultValue given`);return Ui[o]??t},Fe=(o,t)=>{let e=Gt(o,t);if(typeof e=="string")return e;throw new J(`Expected the value of ${o} to be a string, but was ${typeof e}`)},Bi=(o,t)=>{let e=Gt(o,t);if(typeof e=="number")return e;throw new J(`Expected the value of ${o} to be a number, but was ${typeof e}`)},Ct=(o,t)=>{let e=Gt(o,t);if(typeof e=="boolean")return e;throw new J(`Expected the value of ${o} to be a boolean, but was ${typeof e}`)},bl=(o,t)=>{Ui[o]=t},KS=()=>Ui,aa=()=>Ct("CACHE_CONTRIBUTIONS",!0),er=()=>Ct(im,!0),xr=()=>Gt(nm,!1),Cl=()=>{let o=Gt("ENABLED_LOCALES",["en"]);return Array.isArray(o)?o:["en"]},ua=()=>Fe(Xu,"PAC4J_FORM"),qn=(o="FormClient")=>Fe(Ju,`/callback?client_name=${o}`),_l=()=>Fe(Yu,"j_username"),Al=()=>Fe(Zu,"j_password"),la=()=>Fe(Qu,"/logout"),zS=qn(),XS=la();var sm=Y(te(),1);var JS="res:",vl=class o{_cache;static instance=new o;constructor(){typeof sessionStorage<"u"&&(this._cache=sessionStorage)}static getInstance(){return o.instance}createResourceKey(t){let e=t.url;return t.params&&(e+=`|${t.params}`),t.locale&&(e+=`|${t.locale}`),`${JS}${e}`}getItem(t){let e=this._cache;if(!e)return null;let n=e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return this._cache?.getItem(t)}}hasItem(t){return this.getItem(t)!==null}addItem(t,e){let n=typeof e=="string"?e:JSON.stringify(e);this._cache?.setItem(t,n)}setItem(t,e){this.addItem(t,e)}removeItem(t){this._cache?.removeItem(t)}clear(t){this._cache&&(t?Object.keys(this._cache).filter(e=>t?new RegExp(t).test(e):!0).forEach(e=>this._cache?.removeItem(e)):this._cache.clear())}loadOtherBrowserTabs(t){window.addEventListener("storage",e=>{this.sendSessionStorage(e),this.receiveSessionStorage(e,t)}),this._cache?.length===0&&localStorage.setItem("getSessionStorage",Date.now().toString())}sendSessionStorage(t){t.key==="getSessionStorage"&&(localStorage.setItem("sessionStorage",JSON.stringify(this._cache)),localStorage.removeItem("sessionStorage"))}receiveSessionStorage(t,e){if(t.key==="sessionStorage"&&!this.getItem("sessionStorageCopied")){let n=t.newValue?JSON.parse(t.newValue):{};return Object.entries(n).filter(([a])=>!this.hasItem(a)).forEach(([a,l])=>{(typeof l=="string"||typeof l=="object")&&this.addItem(a,l)}),this.setItem("sessionStorageCopied",Date.now().toString()),e()}return null}},ot=vl.getInstance();var ee=()=>Fe("CONTEXT_PATH","/BeInformed"),YS=o=>bl("CONTEXT_PATH",o),rt=()=>Fe("CONTEXT_PATH_MODULARUI",ee()),Vi=()=>Fe("CONTEXT_PATH_SERVER",ee()),Ml=(o=rt(),t="")=>`${t}${o}${tl}`,xl=(o=rt(),t="")=>`${t}${o}${el}`,ca=(o=rt(),t="")=>`${t}${o}${rl}`;var El=o=>{let t=o.url.includes("http")?o.url:o.url.replace(ee(),""),e=o.params?o.params.replace("includeContext=true",""):"",n=e===""?t:`${t}?${e}`,a=dataFetcher.fetch(n,o);try{let l=JSON.parse(a);return l.error?Promise.reject(new Wr(l,void 0,o)):Promise.resolve(l)}catch(l){return Promise.reject(l)}};var ji=Y(te(),1);var ZS=0,QS=200,tO=400,eO=401,rO=300,iO=404,Tl="application/json",Sl=class{_options;_attempts=0;_xmlhttp=new XMLHttpRequest;constructor(t){this._options=t}get xmlhttp(){return this._xmlhttp}set xmlhttp(t){this._xmlhttp=t}get options(){return this._options}set options(t){this._options=t}get attempts(){return this._attempts}set attempts(t){this._attempts=t}get url(){let{url:t}=this.options;if(this.params!==""){if(t.includes("?")){let e=t.split("?");return`${e[0]}?${e[1]}&${this.params}`}return`${t}?${this.params}`}return t}get params(){return this.options.params||""}get data(){return this.options.data||null}get method(){return this.options.method||"GET"}get timeout(){return this.options.timeout||Bi("XHR_TIMEOUT_MS",3e5)}get responseType(){return this.options.responseType||"json"}get events(){return this.options.events||{}}getBaseLocale(){return typeof navigator<"u"&&navigator.language&&navigator.language.split("-")[0]||"en"}get headers(){let t={Accept:Tl,"Content-Type":Tl,"X-Requested-With":"XMLHttpRequest","Accept-Language":this.getBaseLocale()};return this.options.headers?{...t,...this.options.headers}:t}timeoutHandler(t){return t(new Ln(this.url,this.method))}errorHandler(t,e){let{status:n}=this.xmlhttp,{isReload:a}=this.options;return t(n===ZS?new Ni(this.url,this.method):n===iO?new Rn(this.url,this.method,a):n===eO?new Gr(this.url,this.method,e):new Wr(e,this.xmlhttp,this.options))}getResponse(){let{responseType:t,response:e}=this.xmlhttp;if((t===""||t==="text")&&this.getResponseHeader("Content-Type")===Tl){if((0,ji.isPlainObject)(e))return e;try{return JSON.parse(e)}catch(n){throw new Dn(n)}}return e}responseHandler(t,e){let{status:n}=this.xmlhttp;try{let a=this.getResponse();return n>=QS&&n<rO||n===tO&&(0,ji.has)(a,"formresponse")?t(a):this.errorHandler(e,a)}catch(a){return e(a)}}setEventListeners(t,e){let n=this.options.onProgress;n&&["load","loadend","loadstart","progress"].forEach(a=>{this.xmlhttp.addEventListener(a,l=>n(l))}),["abort","error"].forEach(a=>{this.xmlhttp.addEventListener(a,()=>this.errorHandler(e))}),this.xmlhttp.addEventListener("timeout",()=>this.timeoutHandler(e)),this.xmlhttp.addEventListener("load",()=>this.responseHandler(t,e)),Object.keys(this.events).forEach(a=>{this.xmlhttp.addEventListener(a,this.events[a])})}openConnection(){this.xmlhttp.open(this.method,this.url,!0)}setBasicAuthentication(){if(ot.hasItem("basic")){let t=ot.getItem("basic");typeof t=="string"&&this.xmlhttp.setRequestHeader("Authorization",`Basic ${t}`)}}getResponseHeader(t){return this.xmlhttp.getResponseHeader(t)}setCustomHeaders(){let t=this.headers;Object.keys(t).forEach(e=>{this.xmlhttp.setRequestHeader(e,t[e])})}setOtherOptions(){(this.options.withCredentials||Gt("XHR_ALWAYS_WITH_CREDENTIALS",ot.hasItem("basic")))&&(this.xmlhttp.withCredentials=!0),this.xmlhttp.responseType=this.responseType,this.xmlhttp.timeout=this.timeout}sendData(){if(this.data==null)this.xmlhttp.send();else{let t=typeof this.data=="object"?JSON.stringify(this.data):this.data;this.xmlhttp.send(t)}}handleXMLHttpRequest(){return new Promise((t,e)=>{this.setEventListeners(t,e),this.openConnection(),this.setBasicAuthentication(),this.setCustomHeaders(),this.setOtherOptions(),this.sendData()})}async fetch(){try{return await this.handleXMLHttpRequest()}catch(t){if(t instanceof Ni&&this.attempts<2)return this.attempts+=1,this.fetch();throw t}}},nO=o=>{if(o==null)throw new P("Missing request options, expecting an object as argument for xhr");if(!(0,ji.isPlainObject)(o))throw new P(`Expecting an object as argument for xhr, but received: ${o.toString()}`);if(!(0,ji.has)(o,"url"))throw new P(`No url property found in arguments of xhr, received: ${JSON.stringify(o)}`);return!0},Er=o=>(nO(o),new Sl(o).fetch());var Ol="is-fetching",sO=o=>{let t=3e3,e=100;return new Promise((n,a)=>{let l=()=>{if(ot.getItem(o)!==Ol){let d=ot.getItem(o);d!=null?n(d):a(new Error("Empty cached item"))}else t<=0?a(new Error("Empty cached item")):(t=t-e,setTimeout(l,e))};setTimeout(l,e)})},oO=o=>{if(aa()&&o.cache){let t=ot.createResourceKey(o);if(ot.hasItem(t)){let e=ot.getItem(t);if(e!=null){if(e===Ol)return sO(t);if((0,sm.isPlainObject)(e))return Promise.resolve(e)}}ot.addItem(t,Ol)}return Er(o).then(t=>{if(aa()&&o.cache&&(typeof t=="string"||typeof t=="object")){let e=ot.createResourceKey(o);ot.addItem(e,t)}return t})},_e=o=>(o.locale&&(o.headers={...o.headers,"Accept-Language":o.locale}),o.includeContext&&(o.url=`${o.url}?includeContext=true`),Ii?El(o):oO(o));var $n=class{_origin;_contextPath;_requestOptions;constructor(t,e,n){this._origin=t,this._contextPath=e,this._requestOptions=n}setOrigin(t){this._origin=t}setContextPath(t){this._contextPath=t}setRequestOptions(t){this._requestOptions=t}async processAsyncLayoutHints(t){Ct("ALLOW_HIDE_WHEN_EMPTY_ON_TABS")&&(await this.processApplicationLinks(t),await this.processTabLinks(t)),await this.processPanelLinks(t)}async processApplicationLinks(t){let e=t.contributions?._links,n=t.data?._links;if(typeof e=="object"&&typeof n=="object"&&e!=null&&n!=null&&"tab"in e&&"tab"in n){let a=e,l=n;await Promise.all(a.tab.map(async d=>{if("components"in d){let b=l.tab.find(x=>x.name===d.name);if(typeof b?.components=="object"){let x=await this.processLinks(b.components,d.components);Array.isArray(x)&&this.replaceApplicationLinks(t,d.name,x)}}}))}}replaceApplicationLinks(t,e,n){let a=t.data?._links;a&&Array.isArray(a.tab)&&(a.tab=a.tab.map(l=>l.name===e?{...l,components:n}:l))}async processTabLinks(t){let e=t.contributions?._links;if(!e)return;let n=e;if("component"in n){let a=t.data?._links;if(Array.isArray(a?.component)){let l=await this.processLinks(a.component,n.component);Array.isArray(l)&&(a.component=l)}}}async processPanelLinks(t){let e=t.contributions?._links;if(!(!t.data||!e)&&typeof e.panel<"u"){let n=t.data._links,a=await this.processLinks(n,e.panel);t.data&&(t.data._links=a)}}dataLinksPerName(t){let e={};if(Array.isArray(t)){for(let n of t)n.name&&(e[n.name]=n);return e}return t||e}async processLinks(t,e){let n=this.dataLinksPerName(t),a=e.filter(x=>x.layouthint?.includes(jn)),l=[];for(let x of a){let D=n?.[x.name];D?.href&&l.push(this.isHiddenList(x.name,D.href))}let d=await Promise.all(l);if(Array.isArray(t))return t.filter(x=>!d.includes(x.name));let b={};for(let x in n)if(x in n&&!d.includes(x)){let D=n[x];D&&(b[x]=D)}return b}async isHiddenList(t,e){let n=Ct("HIDE_WHEN_EMPTY_IGNORE_TASKS",!1);try{let a=await _e({...this._requestOptions,url:`${this._origin}${this._contextPath}${e}`});if((0,om.isPlainObject)(a)){let l=a,[d]=Object.keys(l),{_embedded:b,actions:x}=l[d],D=b===null||Array.isArray(b)&&b.length===0,gt=x==null||n;if(D&>)return t}return""}catch{return""}}};var am=require("immer"),K=class o{[am.immerable]=!0;_collection;constructor(t=[]){this._collection=t}get collection(){return this._collection}set collection(t){this._collection=t}get all(){return this.collection}add(t){t instanceof o?this.collection=[...this.collection,...t.all]:Array.isArray(t)?this.collection=[...this.collection,...t]:this.collection=[...this.collection,t]}removeByIndex(t){t>-1&&(this.collection=[...this.collection.slice(0,t),...this.collection.slice(t+1)])}hasItems(){return this.length>0}isEmpty(){return!this.hasItems()}get length(){return this.collection.length}get size(){return this.length}get first(){return this.collection[0]}get last(){return this.collection[this.collection.length-1]}get(t){return this.collection[t]}find(t,e){return this.collection.find(t,e)}filter(t,e){return this.collection.filter(t,e)}some(t,e){return this.collection.some(t,e)}every(t,e){return this.collection.every(t,e)}map(t,e){return this.collection.map(t,e)}forEach(t,e){this.collection.forEach(t,e)}sort(t){return this.collection.sort(t)}get sorted(){return this.collection.sort()}clear(){this.collection=[]}};var Bm=Y(Fi(),1);var Um=Y(Fi(),1);var Tt=class extends K{getInitialChildModelLinks(){let t=[];return this.collection.forEach(e=>{typeof e?.getInitialChildModelLinks=="function"&&t.push(...e.getInitialChildModelLinks())}),t}setChildModels(t,e){this.collection.forEach(n=>{typeof n.setChildModels=="function"&&n.setChildModels(t,e)})}};var Jl=Y(te(),1),_a=Y(oa(),1);var um=require("@date-fns/tz/tz"),rr=require("date-fns/add"),lm=require("date-fns/endOfMonth"),pa=require("date-fns/format"),cm=require("date-fns/getDay"),hm=require("date-fns/getHours"),pm=require("date-fns/getMinutes"),fm=require("date-fns/getWeek"),Il=require("date-fns/isAfter"),Rl=require("date-fns/isBefore"),dm=require("date-fns/isSameDay"),Kn=require("date-fns/isValid"),fa=require("date-fns/locale"),mm=require("date-fns/parse"),Ll=require("date-fns/set"),gm=require("date-fns/startOfMonth"),ym=require("date-fns/startOfWeek"),Tr=require("date-fns/sub"),bm=Y(require("timezone-soft"),1);var ha=Y(require("js-cookie"),1);var Dl=o=>ha.default.get(o),aO=(o,t,e)=>{let n={path:Vi(),expires:e?.days,sameSite:e?.sameSite??"Strict",secure:e?.secure};ha.default.set(o,t,n)},uO=o=>{ha.default.remove(o,{path:Vi()})};var $r=class{_isoFormat;_doOffsets;_timeZone=typeof Intl>"u"?"Etc/UTC":Intl.DateTimeFormat().resolvedOptions().timeZone||"Etc/UTC";constructor(t,e=!1){this._isoFormat=t,this._doOffsets=e}get doOffsets(){return this._doOffsets?xr():!1}getOptions(){let t=Bi("CALENDAR_WEEK_STARTS_ON",Ku),e=Bi("CALENDAR_FIRST_WEEK_CONTAINS_DATE",zu);return{weekStartsOn:t>-1&&t<7?t:void 0,firstWeekContainsDate:e===1||e===4?e:void 0}}getIsoFormat(){return this.doOffsets?this._isoFormat+ke:this._isoFormat}convertFormat(t){if(!t)return this.getIsoFormat();let e={ZZZ:"xxx",ZZ:"xx",Z:"x"},n=t,a=Object.keys(e).sort((l,d)=>d.length-l.length);for(let l of a){let d=e[l],b=new RegExp(l,"g");n=n.replace(b,d)}return n}getLocale(){let t=Cl()[0];return(Dl("locale")??t??"en")==="nl"?fa.nl:fa.enGB}toDate(t,e=this.getIsoFormat()){if(t instanceof Date)return t;let{weekStartsOn:n,firstWeekContainsDate:a}=this.getOptions();return(0,mm.parse)(t,e,new Date,{in:this.getDateFnsContext(),weekStartsOn:n,firstWeekContainsDate:a})}toFormat(t,e,n=this.getIsoFormat()){let{weekStartsOn:a}=this.getOptions(),l=this.toDate(t,n);return(0,Kn.isValid)(l)?(0,pa.format)(l,e,{in:this.getDateFnsContext(),weekStartsOn:a,locale:this.getLocale()}):"Invalid Date"}toISO(t,e=this.getIsoFormat()){return this.toFormat(t,this.getIsoFormat(),e)}now(){return this.toISO(new Date)}hasFormat(t,e){let n=this.toDate(t,e),a=this.toFormat(n,e);return a==="Invalid Date"||(0,Rl.isBefore)(n,new Date(1e3,1,1))||(0,Il.isAfter)(n,new Date(9999,11,31))?!1:a.replace(/0/gu,"").toUpperCase()===t.replace(/0/gu,"").toUpperCase()}isValid(t,e=this.getIsoFormat()){if(!t)return!1;let n=this.toDate(t,e);return(0,Kn.isValid)(n)}isAfter(t,e,n=this.getIsoFormat()){return e?(0,Il.isAfter)(this.toDate(t,n),this.toDate(e)):!1}isSameOrAfter(t,e,n=this.getIsoFormat()){return e?this.isAfter(t,e,n)||this.isSame(t,e,n):!1}isBefore(t,e,n=this.getIsoFormat()){return e?(0,Rl.isBefore)(this.toDate(t,n),this.toDate(e)):!1}isSameOrBefore(t,e,n=this.getIsoFormat()){return e?this.isBefore(t,e,n)||this.isSame(t,e,n):!1}isSame(t,e,n=this.getIsoFormat()){return e?this.toDate(t,n).getTime()===this.toDate(e).getTime():!1}isSameDay(t,e,n=this.getIsoFormat()){return e?(0,dm.isSameDay)(this.toDate(t,n),this.toDate(e,n)):!1}isOther(t,e,n=this.getIsoFormat()){return!this.isSame(t,e,n)}isWeekend(t){let a=(0,cm.getDay)(this.toDate(t));return a===6||a===0}isAmbiguous(t,e=this.getIsoFormat()){if(t==null||typeof Intl>"u")return!1;let n=this.toDate(t,e);if(!(0,Kn.isValid)(n))return!1;let l=[60,-60,30,-30].map(b=>{let x=(0,rr.add)(n,{minutes:b});return(0,pa.format)(x,"HH:mm")}),d=(0,pa.format)(n,"HH:mm");return l.indexOf(d)>-1}calculate(t,e,n,a,l=this.getIsoFormat()){let d=this.toDate(t,l);return this.toISO(e(d,{[n]:a},{in:this.getDateFnsContext()}))}addSeconds(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"seconds",e,n)}addMinutes(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"minutes",e,n)}addHours(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"hours",e,n)}addDays(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"days",e,n)}addWeeks(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"weeks",e,n)}addMonths(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"months",e,n)}addYears(t,e,n=this.getIsoFormat()){return this.calculate(t,rr.add,"years",e,n)}subtractSeconds(t,e,n=this.getIsoFormat()){return this.calculate(t,Tr.sub,"seconds",e,n)}subtractMinutes(t,e,n=this.getIsoFormat()){return this.calculate(t,Tr.sub,"minutes",e,n)}subtractHours(t,e,n=this.getIsoFormat()){return this.calculate(t,Tr.sub,"hours",e,n)}subtractDays(t,e,n=this.getIsoFormat()){return this.calculate(t,Tr.sub,"days",e,n)}subtractWeeks(t,e,n=this.getIsoFormat()){return this.calculate(t,Tr.sub,"weeks",e,n)}subtractMonths(t,e,n=this.getIsoFormat()){return this.calculate(t,Tr.sub,"months",e,n)}subtractYears(t,e,n=this.getIsoFormat()){return this.calculate(t,Tr.sub,"years",e,n)}get(t,e,n=this.getIsoFormat(),a={}){let l=this.toDate(t,n);return this.toISO(e(l,{in:this.getDateFnsContext(),...a}))}startOfMonth(t,e=this.getIsoFormat()){return this.get(t,gm.startOfMonth,e)}endOfMonth(t,e=this.getIsoFormat()){return this.get(t,lm.endOfMonth,e)}startOfWeek(t,e=this.getIsoFormat()){let{weekStartsOn:n}=this.getOptions();return this.get(t,ym.startOfWeek,e,{weekStartsOn:n})}getHours(t,e=this.getIsoFormat()){let n=this.toDate(t,e);return(0,hm.getHours)(n,{in:this.getDateFnsContext()})}getMinutes(t,e=this.getIsoFormat()){let n=this.toDate(t,e);return(0,pm.getMinutes)(n,{in:this.getDateFnsContext()})}getWeek(t,e=this.getIsoFormat()){let{weekStartsOn:n,firstWeekContainsDate:a}=this.getOptions(),l=this.toDate(t,e);return(0,fm.getWeek)(l,{in:this.getDateFnsContext(),weekStartsOn:n,firstWeekContainsDate:a})}set(t,e,n,a=this.getIsoFormat()){let l=this.toDate(t,a);return this.toISO((0,Ll.set)(l,{[e]:n}))}setYear(t,e,n=this.getIsoFormat()){return this.set(t,"year",e,n)}setMonth(t,e,n=this.getIsoFormat()){return this.set(t,"month",e,n)}setDay(t,e,n=this.getIsoFormat()){return this.set(t,"date",e,n)}setHour(t,e,n=this.getIsoFormat()){return this.set(t,"hours",e,n)}setMinute(t,e,n=this.getIsoFormat()){return this.set(t,"minutes",e,n)}setSecond(t,e,n=this.getIsoFormat()){return this.set(t,"seconds",e,n)}setMilliseconds(t,e,n=this.getIsoFormat()){return this.set(t,"milliseconds",e,n)}setTime(t,e,n,a,l,d=this.getIsoFormat()){let b=this.toDate(t,d);return this.toISO((0,Ll.set)(b,{hours:e,minutes:n,seconds:a,milliseconds:l},{in:this.getDateFnsContext()}))}getTimeZone(){return this._timeZone}setTimeZone(t){this._timeZone=t}getDateFnsContext(){if(this.doOffsets&&!Ii)return(0,um.tz)(this.getTimeZone())}getOffset(t,e=this.getIsoFormat()){let n=this.toDate(t,e);if((0,Kn.isValid)(n)){let a=this.toFormat(n,ke),l=this.getTimezoneOffsets();if(typeof l.daylight<"u"&&l.daylight.value===a)return l.daylight;if(typeof l.standard<"u"&&l.standard.value===a)return l.standard}return null}createOffsetObject(t){let e=t.offset<0?"-":"+",n=Math.abs(t.offset),a=Math.trunc(n),l=Math.round(n%1*60),d=`${e}${String(a+(l===60?1:0)).padStart(2,"0")}:${String(l%60).padStart(2,"0")}`;return{label:t.name,abbr:t.abbr,value:d}}getTimezoneOffsets(){let t=(0,bm.default)(this.getTimeZone());if(t.length===0)return{standard:{label:"Etc/UTC",abbr:"Etc/UTC",value:"+00:00"}};let{daylight:e,standard:n}=t[0];return e?{daylight:this.createOffsetObject(e),standard:this.createOffsetObject(n)}:{standard:this.createOffsetObject(n)}}},St=new $r(Cn),Ne=new $r(Gu,!0),ir=new $r(qu),Pe=new $r($u,!0);var ut=class extends K{constructor(t=[]){if(super(t),!Array.isArray(t))throw new P(`${t} is not an Array`)}get layouthint(){return this.collection}has(...t){return(t.length>0?[...t]:[]).flat().some(n=>this.layouthint.includes(n)||this.layouthint.some(a=>a.startsWith(n)))}hasExact(...t){return(t.length>0?[...t]:[]).flat().some(n=>this.layouthint.includes(n))}getByLayoutHint(t){let e=null;return typeof t=="function"&&(e=this.layouthint.find(t)),typeof t=="string"&&(e=this.layouthint.find(n=>n.startsWith(t.toString()))),e||null}getLayoutHintValue(t){let e=t.endsWith(":")?t.substr(0,t.length-1):t,n=this.getByLayoutHint(a=>a.startsWith(`${e}=`)||a.startsWith(`${e}:`));return n?n.substr(e.length+1):null}getLayoutHintValues(t){if(!this.has(t))return null;let e=this.getLayoutHintValue(t);return e?e.split(";"):[]}};var It=class o{_configuration;_hasConfiguration=!1;constructor(t){this._hasConfiguration=Array.isArray(t),this._configuration=t??[]}includeLayoutHints(t){let e=this._configuration.filter(n=>{let[a]=Object.keys(n),l=n[a];return l.layouthint?l.layouthint.some(d=>t.includes(d)):!1});return new o(e)}excludeLayoutHints(t){let e=this._configuration.filter(n=>{let[a]=Object.keys(n),l=n[a];return l.layouthint?!l.layouthint.some(d=>t.includes(d)):!0});return new o(e)}get config(){return this._configuration.map(t=>{let[e]=Object.keys(t),n=t[e],a=[];return"labelTypes"in n?a=n.labelTypes:"propertyTypes"in n?a=n.propertyTypes:"sectionReferenceTypes"in n?a=n.sectionReferenceTypes:"textFragmentTypes"in n&&(a=n.textFragmentTypes),{type:e,label:n.label,types:a,layouthint:new ut(n.layouthint),icon:"icon"in n?n.icon:""}})}hasConfig(){return this._hasConfiguration}hasContent(){return this.config.some(t=>t.type==="configElement")}hasLayoutHint(t){return this.config.some(e=>e.layouthint.has(t))}byTypes(t=[]){return!t||t.length===0?this.config:this.config.filter(e=>t.includes(e.type))}get labelConfig(){return this.config.filter(t=>t.type==="labelElement")}getAllSectionReferenceTypes(){return this.config.filter(t=>t.type==="contentElement").flatMap(t=>t.types)}getContentElementConfigBySectionReferenceType(t){return this.config.filter(e=>e.type==="contentElement"&&e.types.includes(t))}getContentConfiguredLabel(t,e=""){let n=this.labelConfig.length>0?this.labelConfig[0].types:[];if(t&&n.length>0){let a=t.getLabelElementByIds(n).filter(l=>l.value&&l.value!=="");if(a.length>0){let l=n.filter(d=>(a.some(b=>d===b._id),!1)).map(d=>a.find(x=>x._id===d));if(l.length>0&&l[0]!==void 0)return l[0].value}}return e}get hasContentFromData(){return er()}};var Cm=require("immer"),_m=require("klona/full"),da=Y(te(),1);var q=class{static[Cm.immerable]=!0;_data;_contributions;_layouthint;_modelOptions;constructor(t,e,n={origin:"",contextPath:rt()}){typeof t=="object"&&t!=null?this._data=t:this._data={},typeof e=="object"&&e!=null?this._contributions=e:this._contributions={},this._modelOptions=n;let a=this.getContributionAsArray("layouthint",[]);this._layouthint=new ut(a)}get data(){return this._data}replaceData(t){this._data=t}get contributions(){return this._contributions}get modelOptions(){return this._modelOptions}get origin(){return this._modelOptions.origin}get contextPath(){return this._modelOptions.contextPath}get layouthint(){return this._layouthint}getData(t,e){return e?(0,da.get)(this.data,t,e):(0,da.get)(this.data,t)}getDataAsString(t,e){let n=this.getData(t,e);return typeof n=="string"?n:e}getDataAsNumber(t,e){let n=this.getData(t,e);return typeof n=="number"?n:e}getDataAsBoolean(t,e){let n=this.getData(t,e);return typeof n=="boolean"?n:e}getDataAsArray(t,e){let n=this.getData(t,e);return Array.isArray(n)?n:e}getDataAsObject(t,e){let n=this.getData(t,e);return typeof n=="object"?n:e}getContribution(t,e){return(0,da.get)(this.contributions,t,e)}getContributionAsArray(t,e){let n=this.getContribution(t,e);return Array.isArray(n)?n:e}getContributionAsObject(t,e){let n=this.getContribution(t,e);return typeof n=="object"?n:e}getContributionAsString(t,e){let n=this.getContribution(t,e);return typeof n=="string"?n:e}getContributionAsBoolean(t,e){let n=this.getContribution(t,e);return typeof n=="boolean"?n:e}getContributionAsNumber(t,e){let n=this.getContribution(t,e);return typeof n=="number"?n:e}hasData(){return Object.keys(this.data).length>0}clone(){return(0,_m.klona)(this)}};var Am=require("immer"),wl=Y(Fi(),1);var Pt=class o{[Am.immerable]=!0;_key;_data;_contributions;_locale="en";_parameters;_origin;_contextPath=rt();_requestHref;constructor(t,e,n,a){this._key=t??"unknown",this._data=e,this._contributions=n,this._locale=a??"en"}static create(t){let e=new o;if((0,wl.default)(t,"data")&&(0,wl.default)(t,"contributions")){let[n]=Object.keys(t.data),[a]=Object.keys(t.contributions);e.key=t.key??a,e.data=t.data?.[n],e.contributions=t.contributions?.[a],e.origin=t.origin,e.contextPath=t.contextPath}return e}get resourcetype(){let t=this.contributions?.resourcetype;return typeof t=="string"?t:""}get modelOptions(){return{origin:this.origin,contextPath:this.contextPath}}set origin(t){this._origin=t??""}get origin(){return this._origin}set contextPath(t){this._contextPath=t??rt()}get contextPath(){return this._contextPath}set locale(t){this._locale=t}get locale(){return this._locale}set key(t){this._key=t}get key(){return this._key}set data(t){this._data=t}get data(){return this._data}set contributions(t){this._contributions=t}get contributions(){return this._contributions}set parameters(t){this._parameters=t}get parameters(){return this._parameters}set requestHref(t){this._requestHref=t}get requestHref(){return this._requestHref}static rehydrate(t){let e=new o;return e.origin=t.origin,e.contextPath=t.contextPath,e.locale=t.locale,e.key=t.key,e.data=t.data,e.contributions=t.contributions,e}};var Mm=require("immer");var vm=require("immer");var qt=class o{[vm.immerable]=!0;_prefix;_name;_value;_isModUIParameter=!1;constructor(t,e,n){this._prefix=t,this._name=e??"",n!==null&&(this._value=typeof n=="string"?decodeURIComponent(n):n),e&&this.setIsModUIParameter(e)}get prefix(){return this._prefix}get name(){return this._name}get value(){return this._value}static fromString(t){if(t==null||t===""||!t.includes("="))return new o;let e=t.substring(0,t.indexOf("=")),n=t.substring(t.indexOf("=")+1);return o.fromURLSearchParam(e,n)}static fromURLSearchParam(t,e){let n,a=decodeURIComponent(t);return a.includes(jr)&&(n=a.substring(0,a.indexOf("~")),a=a.substring(a.indexOf("~")+1)),a===""?null:new o(n,a,e)}toString(t=!0){if(!this.name)return"";let e=this.value==null?"":this.value;return t&&this.prefix?`${this.prefix}${jr}${this.name}=${e}`:`${this.name}=${e}`}toQuerystring(t=!0){let e=this.value==null?"":this.paramValueToQuerystring(this.value);return t&&this.prefix?`${this.prefix}${jr}${this.name}=${e}`:`${this.name}=${e}`}paramValueToQuerystring(t){return typeof t=="number"||typeof t=="string"||typeof t=="boolean"?encodeURIComponent(t):Array.isArray(t)?t.filter(e=>e!=null).map(e=>this.paramValueToQuerystring(e)).join(","):JSON.stringify(t)}get isModUIParameter(){return this._isModUIParameter}setIsModUIParameter(t){let e=Gt("UI_PARAMETERS",[]);Array.isArray(e)&&(this._isModUIParameter=!e.includes(t))}};var Ae=class o extends K{static fromSearch(t){let e=new o;return new URLSearchParams(t).forEach((a,l)=>{let d=qt.fromURLSearchParam(l,a);d&&e.add(d)}),e}static fromUrl(t){let e=new o;return t.includes("?")&&t.split("?")[1].split("&").forEach(n=>{let a=qt.fromString(n);a&&e.add(a)}),e}asQuerystring(t=!1){return this.collection.filter(e=>e.value!=null&&e.value!=="").map(e=>e.toQuerystring(t)).join("&")}asQueryStringForModularUI(t=""){return this.collection.filter(e=>e.isModUIParameter&&(!t||!e.prefix||e.prefix===t)&&e.value!=null&&e.value!=="").map(e=>e.toQuerystring(!1)).join("&")}removeParameter(t,e,n){if(n==null)this.collection=this.collection.filter(a=>a.prefix!==e||a.name!==t);else{let a=n;this.collection=this.collection.map(l=>{if(l.prefix===e&&l.name===t){let d;return typeof l.value=="string"?d=l.value.split(",").filter(b=>b!==a).join(","):d=l.value===n?null:n,new qt(l.prefix,l.name,d)}return l})}return this}};var B=class o{[Mm.immerable]=!0;_origin="";_contextPath=rt();_path="";_hash="";_parameters=new Ae;_resourcetype;_method="GET";_state;_referenceHash;constructor(t,e,n){this._resourcetype=e??"",typeof t=="string"?this.initializeFromString(t):t instanceof o?this.initializeFromHref(t):t&&this.initializeFromLocation(t),typeof n?.origin=="string"&&(this.origin=n.origin),typeof n?.contextPath=="string"&&(this.contextPath=n.contextPath)}initializeFromString(t){this._path=o.getPathFromString(t),this._parameters=Ae.fromUrl(t),this._hash=o.getHashFromString(t)}initializeFromHref(t){this._origin=t.origin,this._contextPath=t.contextPath,this._path=t.path,this._parameters=t.parameters,this._hash=t.hash,this._state=t.state}initializeFromLocation(t){this._path=t.pathname??"",this._parameters=Ae.fromSearch(t.search),this._hash=t.hash??"",this.initializeStateFromLocation(t)}initializeStateFromLocation(t){t.state instanceof Object&&(this._state=t.state,this._origin="origin"in t.state&&typeof t.state.origin=="string"?t.state.origin:"",this._contextPath="contextPath"in t.state&&typeof t.state.contextPath=="string"?t.state.contextPath:"")}get key(){return Math.random().toString(36).substring(2,10)}get origin(){return this._origin}set origin(t){this._origin=t}get contextPath(){return this._contextPath}set contextPath(t){this._contextPath=t}get path(){return this._path||""}set path(t){this._path=t}get parameters(){return this._parameters}set parameters(t){this._parameters=t}get hash(){return this._hash}set hash(t){this._hash=t}get state(){return this._state}set state(t){this._state=t}setState(t){return this.state=t,this}set formdata(t){let e=this.state??{};this.state={...e,formdata:t}}get formdata(){return this.state?.formdata}get method(){return this._method}set method(t){this._method=t||"GET"}set resourcetype(t){this._resourcetype=t}get resourcetype(){return this._resourcetype}get isChangePassword(){return this.path.includes("/change-password")}get isExternal(){return o.checkAbsoluteUrl(this.path)}addParametersFromString(t){return t.includes("?")&&t.split("?")[1].split("&").forEach(e=>{let n=qt.fromString(e);n&&this.setParameter(n.name,n.value,n.prefix)}),this}addParameter(t,e,n){return e!==null&&(this.parameters.removeParameter(t,n),this.parameters.add(new qt(n,t,e))),this}setParameter(t,e,n){return e==null?this.parameters.removeParameter(t,n):this.addParameter(t,e,n),this}removeParameter(t,e,n){return this.parameters.removeParameter(t,e,n),this}getParameter(t,e){return this.parameters.find(n=>n.prefix===e&&n.name===t)}hasParameter(t,e){return this.getParameter(t,e)!==void 0}getQuerystring(t=!1){return this.parameters.asQuerystring(t)}getQuerystringForModularUI(t=""){return this.parameters.asQueryStringForModularUI(t)}get querystring(){return this.parameters.asQuerystring(!1)}get publicQuerystring(){return this.getQuerystring(!0)}get absolutepath(){return this.isExternal?this.path:this.origin+this.contextPath+this.path}get href(){return this.querystring.length>0?[this.path,this.querystring].join("?"):this.path}get absolutehref(){let t=this.getQuerystring(!1);return t.length>0?[this.absolutepath,t].join("?"):this.absolutepath}get absolutehrefPrefixedQuerystring(){let t=this.getQuerystring(!0);return t.length>0?[this.absolutepath,t].join("?"):this.absolutepath}startsWith(t){let e=`${this.path}/`,n=t instanceof o?`${t.path}/`:t;return e.startsWith(n)}equals(t){return t instanceof o?this.path===t.path:this.path===t}equalsWithParameters(t){if(t==null)return!1;let e=t instanceof o?t:new o(t);if(!this.equals(e)||this.parameters.length!==e.parameters.length)return!1;if(this.parameters.length===0&&e.parameters.length===0)return!0;let n=this.parameters.map(a=>a.toString());return e.parameters.every(a=>n.includes(a.toString()))}get isContent(){return this.absolutepath.startsWith(Ml())}getReferenceHash(){return this._referenceHash}setReferenceHash(t){this._referenceHash=t}toString(){return this.href}toLocation(){let t=this.state instanceof Object?this.state:{};return{key:this.key,pathname:this.path,search:this.publicQuerystring.length>0?`?${this.publicQuerystring}`:"",hash:this.hash.length>0?`#${this.hash}`:"",state:{origin:this.origin,contextPath:this.contextPath,...t}}}static getPathFromString(t){return t.split("#")[0].split("?")[0]}static getHashFromString(t){return t.includes("#")?t.substring(t.indexOf("#")+1):""}static isCamelRoute(t){return t.startsWith("/restServices")&&!t.startsWith("/restServices/ui")}static checkAbsoluteUrl(t){return new RegExp("^(?:[a-z]+:)?//","i").test(t)}};var Kr=class extends q{get concequenceType(){return this.getContributionAsString("consequenceType","").toLowerCase()}get transition(){return this.getContributionAsString("transition","").toLowerCase()}get isApplicable(){return this.getDataAsBoolean("applicable",!1)}get isCompleted(){return this.getDataAsBoolean("completed",!1)}get isNeeded(){let t=this.getDataAsString("needed","unknown");return t==="unknown"?null:t==="true"}get state(){return this.getDataAsString("state","")}get canComplete(){return this.getDataAsBoolean("canComplete",!0)}get links(){return ct.create(this.contributions,null,"process-status",this.modelOptions)}get referenceDate(){return St.now()}get conceptLink(){let t=this.links.getLinkByKey("concept");return t&&(t.href=t.href.addParameter(et,this.referenceDate),t.isCacheable=!0),t}};var ve=class o extends q{_href;_icon;_targetModel;_isCacheable=!1;_method="GET";constructor(t,e,n){super(t,e,n),this._href=this.createHref()}static create(t,e,n,a){return new o({name:t,href:e.toString()},{name:t,label:n},a)}createHref(){let t=new B(this.getDataAsString("href",""),this.resourcetype,this.modelOptions);return this.handleInitialFilters(t),t}handleInitialFilters(t){if(this.layouthint.has(Wn)){let e={},n=Wn.length;for(let a of this.layouthint.filter(l=>l.startsWith(Wn))){let l=a.substring(n),d=qt.fromString(l);d&&(e[d.name]||(e[d.name]=[]),typeof d.value=="string"&&e[d.name].push(d.value))}Object.keys(e).forEach(a=>{let l=e[a].join(",");t.addParameter(a,l)})}}get key(){return this.getDataAsString("name","")}get label(){return this.getContributionAsString("label",this.key)}get resourcetype(){return this.getContributionAsString("resourcetype","")}get group(){return this.getContributionAsString("group",this.getDataAsString("group",""))}get href(){return this._href}set href(t){this._href=t}get method(){return this._method}set method(t){this._method=t}get links(){return"components"in this.data&&"components"in this.contributions?new ct({components:this.data.components},{components:this.contributions.components}):new ct}isActive(t){return t.href.startsWith(this.href)}set icon(t){this._icon=t}get icon(){return this._icon}get targetModel(){return this._targetModel}set targetModel(t){this._targetModel=t}get isCacheable(){return this._isCacheable}set isCacheable(t){this._isCacheable=t}get filterName(){let t=this.getDataAsObject("filter");if(t&&"name"in t&&typeof t.name=="string")return t.name}get hasProcessStatusSettings(){return"processStatus"in this.data&&"processStatus"in this.contributions}get processStatus(){if(this.hasProcessStatusSettings)return new Kr(this.data.processStatus,this.contributions.processStatus)}};var kl=(o,t)=>{if(!o&&!t)return[];let e=[];if(o){let n=o;for(let a of Object.keys(n)){let l=n[a];if(Array.isArray(l))for(let d of l)e.push({data:{group:a,...d},contributions:{name:d.name}});else e.push({data:{name:a,group:a,...l},contributions:{name:a}})}}if(t){let n=t;for(let a of Object.keys(n)){let l=n[a];if(Array.isArray(l))for(let d of l){let b=e.findIndex(x=>x.data?.name===d.name);b>-1&&(e[b]={...e[b],contributions:{...d,group:a}})}else{let d=e.findIndex(b=>b.data?.name===a);d>-1?e[d]={...e[d],contributions:{name:a,...l}}:"href"in l&&e.push({data:{name:a,href:l.href},contributions:{name:a}})}}}return e};var ct=class o extends K{constructor(t,e,n){super();let a=kl(t,e);this.collection=a.filter(l=>!l.contributions.layouthint?.includes(yl)).map(l=>new ve(l.data,l.contributions,n))}static create(t,e,n,a){let l="_links"in t?t._links:null,d=typeof e=="object"&&e!==null&&"_links"in e&&typeof e._links=="object"?{...e._links}:{};return new o(Array.isArray(l)?l[0]:l,{self:{resourcetype:n},...d},a)}get links(){return this.collection}set links(t){this.collection=t}getLinkByKey(t){return this.find(e=>e.key===t)}hasLinkByKey(t){return this.all.some(e=>e.key===t)}getLinkByHref(t){return this.find(e=>e.href.equals(t))}getLinksByGroup(...t){let e=t.length>0?[...t]:[],n=this.filter(l=>e.includes(l.group)),a=new o;return a.links=n,a}getLinkByResourceType(t){let e=new o;return e.collection=this.filter(n=>n.resourcetype===t),e}getLinksByLayoutHint(t){let e=new o;return e.collection=this.filter(n=>n.layouthint.has(t)),e}hasLinksByLayoutHint(t){return this.some(e=>e.layouthint.has(t))}toHrefArray(){return this.map(t=>t.href)}hasLink(t){return this.some(e=>e.href.equals(t.href))}update(t){let e=this.links.findIndex(n=>n.key===t.key);return e===-1?(this.collection=[...this.collection,t],this):(this.collection=[...this.links.slice(0,e),t,...this.links.slice(e+1)],this)}get routePath(){if(this.length===0)return"__NON_EXISTING_ROUTE__";let t=this.map(e=>e.href.path).join("|");return this.length>1?`(${t})`:t}};var F=class extends q{_key;_locale;_lastServerUpdate;_links;_childModels=[];_modularuiResponse;_connectKey;constructor(t=new Pt){super(t.data,t.contributions,t.modelOptions),this._modularuiResponse=t,this._key=t.key,this._locale=t.locale,this._lastServerUpdate=Date.now(),this._links=ct.create(this.data,this.contributions,this.resourcetype,this.modelOptions)}get modularuiResponse(){return this._modularuiResponse}set connectKey(t){this._connectKey=t}get connectKey(){return this._connectKey}get lastServerUpdate(){return this._lastServerUpdate}set lastServerUpdate(t){this._lastServerUpdate=t}get locale(){return this._locale}get key(){return this._key}set key(t){this._key=t}get resourcetype(){return this.getContributionAsString("resourcetype","unknown")}get label(){return this.getContributionAsString("label","")}get links(){return this._links}get selflink(){let t=this.links.getLinkByKey("self");if(t==null)throw new J(`Could not find self link for ${this.key===null?"unknown":this.key}`);return t}get selfhref(){return this.selflink?.href}getInitialChildModelLinks(){return[]}get childModels(){return this._childModels}addChildModels(t=[],e=[]){let n=t?.flat(),a=e?.flat();return this._childModels=n,this.setChildModels(n,a),this}setChildModels(t,e){if(!t&&!e)throw new P("No models send to setChildModels")}};var He=class extends F{get type(){return"ConceptTypeDetail"}get key(){return this.getDataAsString("_id","concepttype")}get label(){return this.getDataAsString("label","")}get isCoreTaxonomy(){return this.getDataAsBoolean("coreTaxonomy",!1)}get icon(){return this.getDataAsString("icon","")}get textColor(){return this.getDataAsString("textColor","#000")}get backgroundColor(){return this.getDataAsString("backgroundColor","#fff")}get borderColor(){return this.getDataAsString("lineColor","#000")}get labelTypes(){return this.getDataAsArray("labelTypes")||[]}get propertyTypes(){return this.getDataAsArray("propertyTypes")||[]}get textFragmentTypes(){return this.getDataAsArray("textFragmentTypes")||[]}get sectionReferenceTypes(){return this.getDataAsArray("sectionReferenceTypes")||[]}isOfConceptType(t){return this.selfhref?.equals(t)}};var zr=class extends q{_entryDate;_links;_conceptType;constructor(t,e,n){super(t,{},n),this._entryDate=e,this._links=ct.create(t??{},null,"concept",this.modelOptions)}get type(){return"ConceptLinkModel"}getInitialChildModelLinks(){return this.conceptTypeLink?(this.conceptTypeLink.isCacheable=!0,[this.conceptTypeLink]):[]}setChildModels(t,e){if(this.conceptTypeLink){let n=this.conceptTypeLink.href,a=t.find(l=>l instanceof He?l.selfhref?.equalsWithParameters(n):!1);this.conceptType=a}}get conceptType(){return this._conceptType}set conceptType(t){this._conceptType=t}get key(){return this.getDataAsString("_id","")}get label(){let t=this.getDataAsString("label");return t||this.getDataAsString("conceptLabel","")}get links(){return this._links}get selflink(){let t=this.links.getLinkByKey("self");if(t===null)throw new Error(`Could not find self link for ${this.key===null?"unknown":this.key}`);return t}get selfhref(){return this._entryDate?this.selflink?.href.addParameter(et,this._entryDate):this.selflink?.href}get conceptTypeLink(){return this.links.getLinkByKey("concepttype")}get concepttypeHref(){return this.conceptTypeLink?.href??null}get taxonomyType(){return"default"}get modelCategory(){return this.getDataAsString("modelCategory")}get sectionId(){return this.data.section?._id}get fragment(){return this.data.section?.fragment}asLinkModel(){let t=ve.create(this.key,"",this.label,this.modelOptions);return this.selfhref&&(t.href=this.selfhref),t}};var Xr=class extends q{_concept;constructor(t,e,n){super(t,void 0,n),this._concept=new zr(t?.concept,e,this.modelOptions)}get selfhref(){throw new Error("Method not implemented.")}getInitialChildModelLinks(){return this.concept.getInitialChildModelLinks()}setChildModels(t,e){this.concept.setChildModels(t,e)}get type(){return this.getDataAsString("relationType","")}get key(){return this.type}get label(){return this.getDataAsString("relationLabel")}get direction(){return this.getDataAsString("relationDirection")}get relationTypeType(){return this.getDataAsString("relationTypeType","None")}get condition(){return this.getDataAsString("relationCondition")}get properties(){return this.getDataAsArray("properties")}get textfragments(){return this.getDataAsArray("textFragments")}get concept(){return this._concept}set concept(t){this._concept=t}};var zn=class o extends Tt{_entryDate;_modelOptions;constructor(t,e,n){super(),this._entryDate=e,this._modelOptions=n||{origin:"",contextPath:rt()},t&&this.createCollection(t,e)}createCollection(t,e){Array.isArray(t)?t.forEach(n=>{n instanceof Xr?this.add(n):this.add(new Xr(n,e,this._modelOptions))}):this.add(new Xr(t,e,this._modelOptions))}get types(){return this.collection.filter((t,e,n)=>n.findIndex(a=>a.key===t.key)===e).map(t=>({key:t.key,label:t.label}))}byType(t){return new o(this.filter(e=>e.key===t),this._entryDate,this._modelOptions)}get incoming(){return new o(this.filter(t=>t.direction==="incoming"),this._entryDate,this._modelOptions)}get outgoing(){return new o(this.filter(t=>t.direction==="outgoing"),this._entryDate,this._modelOptions)}hasIncoming(){return this.incoming.length>0}hasOutgoing(){return this.outgoing.length>0}};var ma=require("hash-it"),lO=o=>(0,ma.hash)(o),Jr=(o,t)=>{if(o==null)return 0;let e=o.hash?[o.toString(),o.hash].join("#"):o.toString();return t?(0,ma.hash)({hrefString:e,fragment:t}):(0,ma.hash)(e)};var pe=class extends F{get type(){return"ContentType"}get label(){return this.getDataAsString("label","")}get icon(){return this.iconLarge}get iconSmall(){return this.getDataAsString("iconSmall")}get iconMedium(){return this.getDataAsString("iconMedium")}get iconLarge(){return this.getDataAsString("iconLarge")}get description(){return this.getDataAsString("description")}};var Ht=class extends q{_links;_entryDate;_contentType;_items;constructor(t,e,n){super(t,{},n),this._entryDate=e,this._links=ct.create(this.data,this.contributions,"content",this.modelOptions),this._items=[]}get type(){return"ContentLinkModel"}getInitialChildModelLinks(){return this.contentTypeLink?(this.contentTypeLink.isCacheable=!0,[this.contentTypeLink]):[]}setChildModels(t,e){if(this.contentTypeLink){let n=this.contentTypeLink.href;this.contentType=t.find(a=>a instanceof pe?a.selfhref?.equalsWithParameters(n):!1)}}get contentType(){return this._contentType}set contentType(t){this._contentType=t instanceof pe?t:void 0}set entryDate(t){this._entryDate=t}get key(){return this.getDataAsString("_id","")}get label(){return this.getDataAsString("label","")}get sourceLabel(){return this.getDataAsString("sourceLabel")}get abbreviation(){return this.getDataAsString("abbreviation")||this.getDataAsString("sourceAbbreviation")}get section(){return this.data.section}get encodedHref(){let t="/content/",e=new B(this.selfhref.path,"",this.modelOptions),n=e.path,a=this.section?n.substring(t.length,n.lastIndexOf("/")):n.substring(t.length);if(this.section!=null){let l=encodeURIComponent(this.section);e.path=`${t}${encodeURIComponent(a)}/${l}`}else e.path=`${t}${encodeURIComponent(a)}`;return this._entryDate!==null&&e.addParameter(et,this._entryDate),e}get links(){return this._links}get selflink(){let t=this.links.getLinkByKey("self");if(Gt("COMPLETE_SOURCE",!1)&&(this.links.hasLinkByKey("content")&&(t=this.links.getLinkByKey("content")),this.section!=null&&t&&!t.href.path.endsWith(encodeURIComponent(this.section))&&(t.href.addParameter("complete","true"),t.href.hash=this.section||"")),!t)throw new Error(`Could not find self link for '${this.key||"unknown"}'`);return t.href.state?t.href.state.fragment=this.fragment:t.href.state={fragment:this.fragment},t}get contentHref(){let t=this.data._links.self.href;if(this.data._links.content)t=this.data._links.content.href;else if(this.section){let e=encodeURIComponent(this.section);t.endsWith(e)&&(t=t.substring(0,t.lastIndexOf("/"+e)))}return new B(t).addParameter("complete","true").addParameter(et,this._entryDate)}get sectionHref(){if(this.section){let e=this.contentHref;return new B(e.path+"/"+encodeURIComponent(this.section)).addParameter(et,this._entryDate)}return null}get selfhref(){return this._entryDate?this.selflink.href.addParameter(et,this._entryDate):this.selflink.href}get subSectionID(){return this.selfhref.hash}get contentTypeLink(){return this.links.getLinkByKey("contenttype")}get contentTypeHref(){return this.contentTypeLink?.href}get fragment(){return this.data.sectionFragment}set items(t){this._items=t}get items(){return this._items}};var Wi=class extends q{_entryDate;_links;constructor(t,e,n){super(t,void 0,n),this._links=ct.create(this.data,null,"concept",this.modelOptions),this._entryDate=e}get links(){return this._links}get link(){let t=this.selfhref?.path,e=this.links.getLinkByKey("content")?.href.path;if(t&&e)return new Ht({...this.data,label:this.label,section:this.sectionId,sectionFragment:this.fragment},this._entryDate,this.modelOptions)}get selflink(){return this.links.getLinkByKey("self")}get selfhref(){return this.selflink?.href}get type(){return this.getDataAsString("type","")}get typeLabel(){return this.getDataAsString("typeLabel","")}get label(){return this.getDataAsString("label")}get sourceLabel(){return this.getDataAsString("sourceLabel")}get sourceAbbreviation(){return this.getDataAsString("sourceAbbreviation")}get referenceHash(){if(this.selfhref)return Jr(this.selfhref)}get number(){return this.getDataAsString("number")}get sectionId(){return this.getDataAsString("sectionId")}get fragment(){return this.getDataAsObject("sectionFragment")}};var Xn=class extends K{constructor(t,e=[],n,a){super(),this.collection=this.createSourceReferences(t||[],n),this.collection=t?t.map(l=>{let d=e.find(b=>b._id===l.type);return new Wi({typeLabel:d?.label,...l},n,a)}):[]}createSourceReferences(t,e){return t.map(n=>new Wi(n,e))}byTypes(t){return this.filter(e=>t.includes(e.type))}};var Me=class extends F{_conceptType;_relations;_sourceReferences;constructor(t){super(t),this._relations=new zn(this.data.relations,this.entryDate,this.modelOptions)}get type(){return"ConceptDetail"}getInitialChildModelLinks(){let t=this.links.getLinkByKey("concepttype"),e=this.relationsCollection.getInitialChildModelLinks();return t?(t.isCacheable=!0,[t,...e]):e}setChildModels(t,e){let n=t.find(a=>a instanceof He);n instanceof He&&(this.conceptType=n),this.relationsCollection.setChildModels(t,e)}get key(){return this.getDataAsString("_id","concept")}get selfhref(){let{href:t}=this.selflink;return this.entryDate?t.setParameter(et,this.entryDate):t.removeParameter(et),t}get diagramLinks(){return this.links.getLinksByGroup("diagram")}get conceptType(){return this._conceptType}set conceptType(t){this._conceptType=t}get label(){return this.getDataAsString("conceptLabel","")}get modelCategory(){return this.getDataAsString("modelCategory","")}get taxonomyType(){return this.getDataAsString("taxonomyType")}get relationsCollection(){return this._relations}get formula(){return this.getDataAsString("formula")}get labels(){if(this.conceptType?.labelTypes){let t=this.getDataAsArray("labels",[]);return this.conceptType.labelTypes.map(e=>{let n=t.find(a=>a.type===e._id);return{...e,...n}})}return[]}getLabelElementByIds(t){return this.labels.filter(e=>t.includes(e._id))}get conceptProperties(){if(this.conceptType?.propertyTypes){let t=this.getDataAsArray("properties",[]);return this.conceptType.propertyTypes.map(e=>{let n=t.find(a=>a.type===e._id);return{...e,...n}})}return[]}getConceptPropertiesByIds(t){return this.conceptProperties.filter(e=>t.includes(e._id))}get textfragments(){let t=this.getDataAsArray("textFragments",[]),e=t.map(a=>({...this.conceptType?.textFragmentTypes.find(d=>a.type===d._id),...a})),n=this.conceptType?.textFragmentTypes?this.conceptType.textFragmentTypes.filter(a=>!t.some(l=>l.type===a._id)):[];return[...e,...n]}getTextFragmentByKeys(t){return this.textfragments.filter(e=>"type"in e&&typeof e.type=="string"&&t.includes(e.type))}getSourceReferenceCollection(t=[]){if(!this._sourceReferences){let e=[];this.conceptType&&this.conceptType.sectionReferenceTypes&&(e=this.conceptType.sectionReferenceTypes),this._sourceReferences=new Xn(this.getSourceReferencesForCurrentLanguage(t),e,this.entryDate,this.modelOptions)}return this._sourceReferences}getSourceReferencesForCurrentLanguage(t){let e=this.getDataAsArray("sourceReferences",[]);if(e.length===0)return[];let n=3,a=e.map(b=>b.type.substring(b.type.length-n)),l=`_${this.locale}`;if(a.includes(l))return e.filter(b=>b.type.endsWith(l));let d=t.map(b=>`_${b.split("-")[0]}`);return e.filter(b=>{let x=b.type.substring(b.type.length-n);return!d.includes(x)})}get entryDate(){return this.getDataAsString(`filter.${et}.value`)}isOfConceptType(t){return this.conceptType?.isOfConceptType(t)??!1}};var xm=require("immer");var nr=class{[xm.immerable]=!0;_id;_defaultMessage;_parameters;_isClientConstraint;_layouthint;constructor(t,e,n,a=!1,l=new ut){this._id=t,this._parameters=n,this._defaultMessage=e,this._isClientConstraint=a,this._layouthint=Array.isArray(l)?new ut(l):l}get id(){return this._id}get defaultMessage(){return this._defaultMessage}get parameters(){return this._parameters}get isClientConstraint(){return this._isClientConstraint??!1}get layouthint(){return this._layouthint}get isMandatoryConstraint(){return this.id==="Constraint.Mandatory"}getMessage(){return{id:this.id,defaultMessage:this.defaultMessage??"",parameters:this.parameters??{}}}};var Jn=(a=>(a[a.FORM=0]="FORM",a[a.FORMOBJECT=1]="FORMOBJECT",a[a.ATTRIBUTE=2]="ATTRIBUTE",a[a.COMPOSITE_CHILDREN=3]="COMPOSITE_CHILDREN",a))(Jn||{}),fe=class extends K{_type;constructor(t,e){super(),this._type=t,this.collection=[],e&&(this.collection=[...e.collection])}get type(){return this._type}get serverErrors(){return this.collection.filter(t=>!t.isClientConstraint)}findById(t){return this.collection.findIndex(e=>e.id===t)}addError(t,e,n,a){let l=this.findById(t);l>-1&&this.removeByIndex(l),this.add(new nr(t,e,n,!1,a))}removeError(t){let e=this.findById(t);this.removeByIndex(e)}addServerError(t,e,n,a){n?this.addError(t,e,n,a):this.addError(t,e,void 0,a)}removeServerError(t){this.removeError(t)}removeServerErrors(){this.serverErrors.forEach(t=>{this.removeError(t.id)})}addErrors(t){this.collection=[...this.collection,...t]}addConstraints(t){this.collection=[...this.collection,...t.map(e=>new nr(e.id,e.defaultMessage,e.parameters,!0))]}hasMandatoryError(){return this.collection.some(t=>t.isMandatoryConstraint)}};var Em=require("immer");var Yr=o=>{if(typeof o=="string")return o;if(typeof o=="object"&&"message"in o&&typeof o.message=="string")return o.message};var Yn=class o extends q{_entryDate;_links;constructor(t,e,n){super(t,{},n),this._entryDate=e,this._links=ct.create(this.data,this.contributions,"subsection",this.modelOptions)}get referred(){return this.getDataAsBoolean("referred",!1)}get id(){return"id"in this.data?this.getDataAsString("id"):this.getDataAsString("_id")}get key(){return this.id}get body(){return Yr(this.data.body)}get number(){return this.getDataAsString("number")}get label(){return this.getDataAsString("label","")}get subSections(){return this.data.subSections?this.data.subSections.map(t=>new o(t,this.entryDate,this.modelOptions)):[]}get links(){return this._links}get selflink(){return this.links.getLinkByKey("self")}get selfhref(){return this.selflink?.href}get entryDate(){return this._entryDate}get relatedConceptsHrefs(){let t=[];return this.relatedConceptsHref&&t.push(this.relatedConceptsHref),this.subSections.forEach(e=>{t.push(...e.relatedConceptsHrefs)}),t}get relatedConceptsHref(){let t=this.links.getLinkByKey("relatedConcepts");if(t){let{href:e}=t;if(e.hash.includes("/relatedConcepts")){let n=e.path.substring(0,e.path.lastIndexOf("/"));e.path=n+"/"+e.hash,e.hash=e.hash.includes("#")?e.hash.substring(e.hash.indexOf("#")):""}return e.addParameter("entryDate",this.entryDate),e.setReferenceHash(this.referenceHash),e}}get referenceHash(){return Jr(this.selfhref)}getReferredSections(){let t=[];for(let e of this.subSections){e.referred&&t.push(e);let n=e.getReferredSections();t.push(...n)}return t}};var xe=class o extends q{_entryDate;_selflink;_childSections;constructor(t,e,n){super(t,{},n),this._entryDate=e,this._selflink=this.createSelfLink(),this._childSections=this.createChildSections()}get referred(){return this.getDataAsBoolean("referred",!1)}get selflink(){return this._selflink}createSelfLink(){let t=this.getDataAsString("_links.self.href");if(typeof t<"u")return ve.create(this.key||"unknown",t,this.label,this.modelOptions)}get selfhref(){return this.selflink?.href}get entryDate(){return this._entryDate}get type(){return this.getDataAsString("type")}get sourceLabel(){return this.getDataAsString("sourceLabel")}get id(){let t=this.getDataAsString("id");return t||this.getDataAsString("_id","unknown")}get key(){return this.id}get label(){return this.getDataAsString("label","")}get number(){return this.getDataAsString("number")}get body(){let t=this.data.body;if(t)return Yr(t)}get childSectionLinks(){let t=[];return this.data.childSections?t=this.data.childSections:this.data.sections&&(t=this.data.sections),t.map(e=>{let n=e.id||e._id,a=e._links;return new Ht({section:n,_id:n,label:e.label,sourceLabel:e.sourceLabel,_links:a},this.entryDate,this.modelOptions)})}get selfContentLink(){let t=this.data._links;return new Ht({section:this.id,_id:this.id,label:this.label,sourceLabel:this.sourceLabel,_links:t},this.entryDate,this.modelOptions)}createChildSections(){let t=[];return this.data.childSections?t=this.data.childSections:this.data.sections&&(t=this.data.sections),t.filter(e=>"body"in e).map(e=>new o(e,this.entryDate,this.modelOptions))}get childSections(){return this._childSections}set childSections(t){this._childSections=t||[]}get sections(){return this.data.sections?this.data.sections.map(t=>new o(t,this.entryDate,this.modelOptions)):[]}get subSections(){return Array.isArray(this.data.subSections)?this.data.subSections.map(t=>new Yn(t,this.entryDate,this.modelOptions)):[]}get referenceHash(){return Jr(this.selfhref)}getReferredSections(){let t=[];for(let e of this.subSections){e.referred&&t.push(e);let n=e.getReferredSections();t.push(...n)}for(let e of this.childSections){e.referred&&t.push(e);let n=e.getReferredSections();t.push(...n)}return t}};var Zr=class o{[Em.immerable]=!0;_content;constructor(t){this._content=t}static create(t){return typeof t=="object"&&t!==null&&"elements"in t&&Array.isArray(t.elements)?new o(t):new o}get fromData(){return er()}get header(){let t=null,e=null,n=this._content?.header?.label;n&&(t=n);let a=this._content?.header?.description;return a&&(typeof a=="object"&&"message"in a?e=a.message:typeof a=="string"&&(e=a)),{label:t,description:e}}mapToPropertyElement(t){let e=t.propertyElement;return{propertyElement:{label:e.label,layouthint:new ut(e.layouthint),properties:"properties"in e?e.properties:[]}}}mapToTextFragmentElement(t){let e=t.textFragmentElement;return{textFragmentElement:{label:e.label,layouthint:new ut(e.layouthint),textfragments:"textfragments"in e?e.textfragments.map(n=>typeof n=="object"?{...n,text:Yr(n.text)||""}:n):[]}}}mapToContentElement(t){let e=t.contentElement;return{contentElement:{label:e.label,layouthint:new ut(e.layouthint),sections:"sections"in e?e.sections.map(n=>new xe(n)):[]}}}get elements(){return Array.isArray(this._content?.elements)?this._content.elements.filter(t=>t!=null).map(t=>{switch(Object.keys(t)[0]){case"propertyElement":return this.mapToPropertyElement(t);case"textFragmentElement":return this.mapToTextFragmentElement(t);case"contentElement":return this.mapToContentElement(t);default:return t}}):[]}get label(){return this._content?.label}get properties(){return this.elements.filter(t=>Object.keys(t)[0]==="propertyElement").map(t=>{let{propertyElement:e}=t;return"properties"in e?e.properties:[]}).flat()}getConceptPropertiesByLabels(t){return this.elements.filter(e=>Object.keys(e)[0]==="propertyElement").map(e=>e.propertyElement).filter(e=>Array.isArray(t)?t.includes(e.label):t===e.label).map(e=>"properties"in e?e.properties:[]).flat()}get textfragments(){return this.elements.filter(t=>Object.keys(t)[0]==="textFragmentElement").map(t=>{let{textFragmentElement:e}=t;return"textfragments"in e?e.textfragments:[]}).flat()}getTextFragmentsByLabels(t){return this.elements.filter(e=>Object.keys(e)[0]==="textFragmentElement").map(e=>e.textFragmentElement).filter(e=>Array.isArray(t)?t.includes(e.label):t===e.label).map(e=>"textfragments"in e?e.textfragments:[]).flat()}get sections(){return this.elements.filter(t=>Object.keys(t)[0]==="contentElement").map(t=>t.contentElement.sections).flat()}getSectionsByType(t){return this.sections.filter(e=>{let n=e.type;return n?Array.isArray(t)?t.includes(n):t===n:!1})}getSectionsByLabels(t){return this.elements.filter(e=>Object.keys(e)[0]==="contentElement").map(e=>e.contentElement).filter(e=>Array.isArray(t)?t.includes(e.label):t===e.label).map(e=>e.sections).flat()}getReferredSections(){let t=[];for(let e of this.sections)t.push(...e.getReferredSections());return t}};var Zn=class{_id;_validateMethod;_defaultMessage;_parameters;_useClientsideValidation;constructor(t,e,n,a,l=Ct("USE_CLIENTSIDE_VALIDATION")){this._id=t,this._validateMethod=e,this._defaultMessage=n,this._parameters=a,this._useClientsideValidation=l}get id(){return this._id}get defaultMessage(){return this._defaultMessage||"Missing default message"}get parameters(){return this._parameters}hasValidation(){return this._validateMethod!=null}validate(t){let e=this._validateMethod;return this._useClientsideValidation&&e?e(t):!0}get isMandatoryConstraint(){return this._id==="mandatory"||this._id==="Constraint.Mandatory"}};var it=class extends K{addConstraint(t,e,n,a={},l=Ct("USE_CLIENTSIDE_VALIDATION")){this.add(new Zn(t,e,n,a,l))}validate(t){return this.isEmpty()||this.collection.every(e=>e.validate(t))}hasMandatoryConstraint(){return this.collection.some(t=>t.isMandatoryConstraint)}invalidConstraints(t){return t===""&&!this.hasMandatoryConstraint()?[]:this.collection.filter(e=>!e.validate(t))}};var Qn=class{get id(){return"Constraint.Mandatory"}hasValidation(){return!0}get defaultMessage(){return"Field is mandatory"}get parameters(){return{}}validate(t){if(t==null)return!1;if(typeof t!="string")throw new TypeError(`isNotEmptyString: Not comparing to string: ${typeof t}`);return t!==""}get isMandatoryConstraint(){return!0}};var ga="Constraint.InvalidLengthExact",ya="Constraint.InvalidLengthBetween",ba="Constraint.InvalidLengthTooShort",Ca="Constraint.InvalidLengthTooLong",ts=class{_minLength;_maxLength;constructor(t,e){this._minLength=t,this._maxLength=e}get id(){return this.minLength&&this.maxLength&&this.minLength===this.maxLength?ga:this.minLength&&this.maxLength?ya:this.minLength?ba:this.maxLength?Ca:"Constraint.NoLengthConstraint"}get minLength(){return this._minLength}get maxLength(){return this._maxLength}hasValidation(){return!0}isExactLength(t){if(typeof t!="string")throw new TypeError("isExactLength: Not comparing to string");if(this.minLength==null)throw new Error("isExactLength: Min and max length not set");return t.length===this.minLength}isBetween(t){if(typeof t!="string")throw new TypeError("isBetween: Not comparing to string");if(this.minLength==null||this.maxLength==null)throw new Error("isBetween: Min or max length not set");return this.isLongEnough(t)&&this.isSmallEnough(t)}isLongEnough(t){if(typeof t!="string")throw new TypeError("isLongEnough: Not comparing to string");if(!this.minLength)throw new Error("isLongEnough: Min length not set");return t.length>=this.minLength}isSmallEnough(t){if(typeof t!="string")throw new TypeError("isSmallEnough: Not comparing to string");if(!this.maxLength)throw new Error("isSmallEnough: Max length not set");return t.length<=this.maxLength}get defaultMessage(){switch(this.id){case ga:return"Length must be precisely ${length} characters";case ya:return"Length must be between ${min-length} and ${max-length} characters";case ba:return"The length of the value must be larger than ${min-length}";case Ca:return"The length of the value must be smaller than ${max-length}";default:return""}}get parameters(){switch(this.id){case ga:return{length:this.minLength};case ya:return{"min-length":this.minLength,"max-length":this.maxLength};case ba:return{"min-length":this.minLength};case Ca:return{"max-length":this.maxLength};default:return{}}}validate(t){switch(this.id){case ga:return this.isExactLength(t);case ya:return this.isBetween(t);case ba:return this.isLongEnough(t);case Ca:return this.isSmallEnough(t);default:return!0}}get isMandatoryConstraint(){return!1}};var G=class extends q{_label;_links;_parentKey;_hasContentConfiguration=!1;_content;_concept;attributeReferenceDate;_lastModification=0;_initvalue;_value;_inputvalue;_previouslyValidatedValue;attributeErrors;_serverConstraints=new it;_useClientsideValidation=Ct("USE_CLIENTSIDE_VALIDATION",!0);_isValid=!0;_mandatory;_readonly=!1;_disabled=!1;_isResult;_isHidden=!1;_isEditable=!1;_layoutHintRules;_placeholder;constructor(t,e,n){super(t,e,n),this.attributeReferenceDate=this.getDataAsString("referenceDate",St.now()),this._links=ct.create(this.data,this.contributions,"attribute",this.modelOptions),this._content=this.createAttributeContent(),this._label=this.createLabel(),this._placeholder=this.getContributionAsString("placeholder"),this._initvalue=this.data.value,this._inputvalue=this.getInitialInputValue(this.data.value),this._value=this.data.value,this._isResult=this.getDataAsBoolean("isResult",!1),this._mandatory=this.layouthint.has(Fn)||this.getContributionAsBoolean("mandatory",!1),this._disabled=this.layouthint.has(fl),this.attributeErrors=this.createErrorCollection(this.data.message)}createLabel(){return this.hasContentFromData()&&this.content?.label&&(this._label=this.content.label),this.getContributionAsString("label","")}createErrorCollection(t){let e=new fe(2);return typeof t=="object"&&t!=null&&e.addServerError(t.id,t.message,t.properties,t.layouthint),e}static isApplicableModel(t){throw typeof t!="object"?new P("Given argument for isApplicableModel is not a contributions object"):new Error("isApplicableModel must be implemented on an attribute")}get key(){return this.getDataAsString("key","unknown")}get parentKey(){return this._parentKey||""}set parentKey(t){this._parentKey=t}get name(){return this.key}get label(){return this._label}set label(t){this._label=t}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t}get isEditable(){return this._isEditable}set isEditable(t){this._isEditable=t}get isVisible(){return!this._isHidden}get isHidden(){return this._isHidden}set isHidden(t){this._isHidden=t}show(){this.isHidden=!1}hide(){this.isHidden=!0}get links(){return this._links}get downloadLink(){let t=this.links.getLinksByGroup("download").first;if(t&&t.key===this.key)return t}getInitialChildModelLinks(){return!this.hasContentFromData()&&this.hasContentConfiguration()&&this.conceptLink?[this.conceptLink]:[]}setChildModels(t,e){let n=this.conceptLink?.href;if(n){let a=t.find(l=>l instanceof Me?l.selfhref.equalsWithParameters(n):!1);this.concept=a}}get conceptLink(){let t=this.links.getLinkByKey("concept");return t&&(t.href=t.href.addParameter(et,this.referenceDate),t.isCacheable=!0),t}get concept(){return this._concept}set concept(t){this._concept=t}get referenceDate(){return this.attributeReferenceDate}set referenceDate(t){this.attributeReferenceDate=t}hasContentFromData(){return er()}setHasContentConfiguration(t){this._hasContentConfiguration=t}hasContentConfiguration(){return this._hasContentConfiguration}createAttributeContent(){if("content"in this.data)return new Zr(this.data.content)}get content(){return this._content}indicateContentConfiguration(t){if(t){let e=t.questions?.hasConfig(),n=t.isConfiguredEndResultAttribute(this.key),a=t.isConfiguredIntermediateResultAttribute(this.key);this.setHasContentConfiguration(e||n||a)}}getContentConfiguredLabel(t){return this.hasContentFromData()?this.content?.label??this.label:t.getContentConfiguredLabel(this.concept,this.label)}get defaultAlignment(){return"left"}get alignment(){let t=this.layouthint.getByLayoutHint("align-"),e=t?t.substring(6):this.defaultAlignment;return e==="left"||e==="center"||e==="right"?e:this.defaultAlignment}get readonlyWidth(){return"MEDIUM"}get layoutHintRules(){return this._layoutHintRules}set layoutHintRules(t){this._layoutHintRules=t}processLayoutHintRules(t){this.layoutHintRules&&this.layoutHintRules.process(this,t)}get lastModification(){return this._lastModification}set lastModification(t){this._lastModification=t}updateLastModification(){this.lastModification=Date.now()}isChangedSince(t){return this.lastModification>t}getInitialInputValue(t){return t}get initvalue(){return this.getInitValue()}getInitValue(){return this._initvalue}setInitValue(t){this._initvalue=t}hasValue(){return this._value!=null&&this._value!==""}getValue(){return this.hasValue()?this._value:null}setValue(t){this._value=t}get value(){return this.getValue()}set value(t){this.updateLastModification(),this._value=t}getInputValue(){let t=this._inputvalue;return t?t.toString():""}setInputvalue(t){this._inputvalue=t}get inputvalue(){return this.getInputValue()}set inputvalue(t){this._inputvalue=t,this.value=t,this.validate(t)}formatValue(t){return JSON.stringify(t)}get readonlyvalue(){return this.value?this.value.toString():""}get validateValue(){return this.inputvalue}get mandatory(){return this._mandatory||!1}set mandatory(t){t!==this._mandatory&&(this._previouslyValidatedValue=null),this._mandatory=t}get configuredMandatory(){return this.layouthint.has(Fn)??this.getContributionAsBoolean("mandatory")}get readonly(){return this._readonly||this.getContributionAsBoolean("readonly")===!0||this.getDataAsBoolean("static")===!0||this.isResult}set readonly(t){this._readonly=t}get disabled(){return this._disabled}set disabled(t){this._disabled=t}get isResult(){return this._isResult}set isResult(t){this._isResult=t}get format(){return this.getContributionAsString("format")}get formatLabel(){return this.format}get minLength(){return this.getContributionAsNumber("minLength")}get maxLength(){return this.getContributionAsNumber("maxLength")}get operator(){return this.getContributionAsString("operator","")}get assistantMessage(){return this.getContributionAsString("assistant")}get isValid(){return this.validate(this.validateValue)}getIsValid(){return this._isValid}setIsValid(t){this._isValid=t}getServerConstraints(){return this._serverConstraints}get constraintCollection(){let t=new it;return t.add(this._serverConstraints),this.mandatory&&t.add(new Qn),(this.minLength||this.maxLength)&&t.add(new ts(this.minLength,this.maxLength)),t.add(this.addConstraints()),t}addConstraints(){return new it}setUseClientsideValidation(t){this._useClientsideValidation=t}useClientsideValidation(){return this._useClientsideValidation??!0}validate(t){return this.useClientsideValidation()?(this.isOptionalAndEmpty(t)?this._isValid=!0:this.getPreviouslyValidatedValue()!==t&&(this._isValid=this.constraintCollection.validate(t)),this.setPreviouslyValidatedValue(t),this._isValid):!0}setPreviouslyValidatedValue(t){this._previouslyValidatedValue=t}getPreviouslyValidatedValue(){return this._previouslyValidatedValue}isOptionalAndEmpty(t){if(t===void 0)throw new P("isOptionalAndEmpty method needs value argument");return!this.mandatory&&t===""}get errorCollection(){let t=new fe(2,this.attributeErrors);return t.addConstraints(this.constraintCollection.invalidConstraints(this.validateValue)),t}inError(){return!this._isValid&&this.isChangedSince(0)}resetErrors(){this.attributeErrors.clear()}addServerError(t){this.attributeErrors.addServerError(t.id,t.message,t.properties,t.layouthint)}removeServerError(t){this.attributeErrors.removeServerError(t)}hasServerErrors(){return this.errorCollection.serverErrors.length>0}hasErrors(){return this.errorCollection.hasItems()}addMissingError(t){this.attributeErrors.addServerError("Constraint.Missing")}removeMissingError(){this.removeServerError("Constraint.Missing")}addServerConstraint(t,e,n){this._serverConstraints.addConstraint(t,void 0,e||"",n,this.useClientsideValidation())}formatParameters(t){if(!t)return{};let e={};return Object.keys(t).forEach(n=>{let a=t[n];n.endsWith("-number")||n.endsWith("-date")?e[n]=this.formatValue(a):e[n]=a}),e}get hasDynamicValidationData(){return!0}updateValidations(t){t.some(e=>e.id==="Constraint.Mandatory")||this.layouthint.has(Fn)?this.mandatory=!0:this.hasValue()||(this.mandatory=!1),this._serverConstraints=new it,this.resetErrors(),t.filter(e=>e.id!=="Constraint.Mandatory"||!this.hasValue()).forEach(e=>{this.hasValue()?this.attributeErrors.addServerError(e.id,e.message,this.formatParameters(e.properties),e.layouthint):this.addServerConstraint(e.id,e.message,this.formatParameters(e.properties))})}mergeAttribute(t){this.concept=t.concept,!t.readonly&&t.isValid&&t.inputvalue!==null&&this.update(t.inputvalue)}getFormData(){return this.inError()?null:{[this.name]:this.value}}get formdata(){return this.getFormData()}getEmptyFormData(){return{[this.name]:null}}equals(t){return this.key===t.key&&this.parentKey===t.parentKey}};var Tm=require("immer");var Qr=class{[Tm.immerable]=!0;_key;_header;_sortOption;_readonlyWidth;constructor(t,e){let[n]=Object.keys(t),a=_t.createAttribute(n,{elementid:n},t[n]);this._readonlyWidth=a.readonlyWidth,this._key=n,this._header=t[n],this._sortOption=e?.find(l=>l.key===n)}get key(){return this._key}get label(){return this._header.label}get type(){return this._header.type}get layouthint(){return new ut(this._header.layouthint)}get alignment(){let t=this.layouthint.getByLayoutHint("align-");return t===null?"left":t.substring(6)}get readonlyWidth(){return this._readonlyWidth??"MEDIUM"}equals(t){return t.key===this.key}get sortOption(){return this._sortOption}hasSorting(){return this.sortOption!=null}};var Ee=class o extends q{_code;_isSelected;_concept;_referenceDate;_level;_attributeCollection;_children;_links;_content;_isUser=!1;constructor(t=[],e={},n){super({},e),this._code=this.getContributionAsString("code",this.getContributionAsString("key","")),this._isSelected=t.includes(this.code),this._referenceDate=n?.referenceDate||new Date().toISOString().split("T")[0],this._level=0,this._attributeCollection=this.createAttributeCollection(n),this._children=this.addChildren(t,e,n),this._links=new ct(this.contributions._links,{},{origin:n?.origin,contextPath:n?.contextPath}),this._content=this.createContent(),this._isUser="optionType"in e&&e.optionType==="user"}get type(){return"option"}static createFromListItemModel(t){let e=new o;return e.code=t.id?.toString()??"",e}get isChoiceAttributeOptionModel(){return!0}getInitialChildModelLinks(){let t=[];return!this.hasContentFromData()&&this.conceptLink&&t.push(this.conceptLink),this.children&&t.push(...this.children.getInitialChildModelLinks()),t}setChildModels(t,e=[]){let n=this.conceptLink?.href;if(n){let a=t.find(l=>l instanceof Me?l.selfhref.equalsWithParameters(n):!1);this.concept=a}this.children&&this.children.setChildModels(t,e)}get code(){return this._code}set code(t){this._code=t}equals(t){return this.code.toString()===t.code.toString()}createAttributeCollection(t){let e=this.getContributionAsArray("elementsContributions",[]),n=this.getContributionAsObject("elements",{});return new ft(n,e,{origin:t?.origin,contextPath:t?.contextPath,isReadonly:!0})}get attributeCollection(){return this._attributeCollection}set attributeCollection(t){this._attributeCollection=t}get label(){let t=this.getContributionAsString("label");if(t)return t;if(this.attributeCollection.hasItems()){let e=this.attributeCollection.getAttributeByLayoutHint(Mr);if(e)return e.readonlyvalue;if(this.attributeCollection.first)return this.attributeCollection.first.readonlyvalue}return""}getContentConfiguredLabel(t){if(this.hasContentFromData())return this.content?.label||this.label;if(t)return t.getContentConfiguredLabel(this.concept,this.label)}hasContentFromData(){return er()}get content(){return this._content}addChildren(t=[],e={},n){if("elements"in e)return new Ue;let a="children"in e?e.children:[];return Ue.create({value:t},{options:a??[]},n)}get children(){return this._children}createContent(){return Zr.create(this.getContributionAsObject("content"))}get selected(){return this._isSelected}set selected(t){this._isSelected=t}get count(){return this.getContributionAsNumber("count")}get links(){return this._links}set links(t){this._links=t}get selfhref(){return this.links.getLinkByKey("self")?.href}get referenceDate(){return this._referenceDate}set referenceDate(t){this._referenceDate=t}get conceptLink(){let t=this.links.getLinkByKey("concept");return t&&(t.href=t.href.addParameter(et,this.referenceDate),t.isCacheable=!0),t}get concept(){return this._concept}set concept(t){this._concept=t}get level(){return this._level}set level(t){this._level=t}get isBooleanType(){return this.getContributionAsBoolean("isBooleanType",!1)}get hasAlternativeLabel(){return this.getContributionAsBoolean("hasAlternativeLabel",!1)}get isUser(){return this._isUser}mergeOption(t){this.concept=t.concept,this.children!=null&&t.children!=null&&this.children.mergeOptions(t.children)}};var Ue=class o extends Tt{_modelOptions;_headers=[];_sortOptions=!1;constructor(t){super(),this._modelOptions=t||{origin:"",contextPath:rt(),referenceDate:new Date().toISOString().split("T")[0]}}set sortOptions(t){this._sortOptions=t,this.collection.forEach(e=>{e.children&&(e.children.sortOptions=t)})}get sortOptions(){return this._sortOptions}static create(t={},e={},n){let a=new o(n);if("type"in e&&e.type==="boolean"){let l="value"in t?t.value:void 0;a.addBooleanOptions(l,e)}else"dynamicschema"in t&&t.dynamicschema!=null?a.addDynamicSchema(t,e):"options"in e&&e.options!=null&&a.addOptions(t,e);return"children"in e&&Array.isArray(e.children)&&a.addHeaders(e.children),a}get all(){return this.sortOptions?this.collection.sort((t,e)=>t.label.localeCompare(e.label)):this.collection}getSelectedOptions(t){let e=[];return"options"in t&&Array.isArray(t.options)?e.push(...t.options.filter(n=>n.selected).map(n=>n.key)):"value"in t&&("value"in t&&Array.isArray(t.value)?e.push(...t.value):typeof t.value=="boolean"?e.push(t.value.toString()):e.push(t.value)),e}getOptionCount(t,e){if(Array.isArray(e)){let n=e.find(a=>"key"in a&&a.key===t);if(n)return"count"in n&&typeof n.count=="number"?n.count:void 0}}addOptions(t,e){let n=this.getSelectedOptions(t);if("options"in e&&Array.isArray(e.options)){let a="options"in t&&Array.isArray(t.options)?t.options:[];e.options.forEach(l=>{let d=l.code||l.key,b="optionType"in e?e.optionType:"generic";this.addOption(n,{...l,count:this.getOptionCount(d,a),optionType:b})})}return this}addDynamicSchema(t,e){let n=this.getSelectedOptions(t);if("dynamicschema"in t&&Array.isArray(t.dynamicschema)){let a="options"in t&&Array.isArray(t.options)?t.options:[],l="children"in e?e.children:void 0,d="optionType"in e?e.optionType:"generic";t.dynamicschema.forEach(b=>{this.addOption(n,{...b,count:this.getOptionCount(b.code,a),optionType:d,elementsContributions:l})})}return this}addBooleanOption(t,e,n,a=[]){let l=a.find(b=>"code"in b&&b.code===t),d=l&&"label"in l?l.label:e;this.addOption(n,{code:t,label:d,isBooleanType:!0,hasAlternativeLabel:l!=null})}addBooleanOptions(t,e){let n=t==null?[]:[t.toString()],a="options"in e&&Array.isArray(e.options)?e.options:[];return this.addBooleanOption("true","Yes",n,a),this.addBooleanOption("false","No",n,a),this}addOption(t,e){let n=new Ee(Array.isArray(t)?t:[t],e,this._modelOptions);return this.add(n),this}getOptionByCode(t){return this.collection.find(e=>e.code===t)}hasOptionByCode(t){return this.collection.some(e=>e.code===t)}get selected(){let t=[];return this.collection.forEach(e=>{e.selected&&e.selected===!0&&t.push(e),e.children&&t.push(...e.children.selected)}),t}deselectAll(){this.collection=this.collection.map(t=>(t.selected=!1,t.children&&t.children.deselectAll(),t))}select(t){this.toggle(t,"select")}deselect(t){this.toggle(t,"deselect")}toggle(t,e){this.collection=this.collection.map(n=>(n.code===t?n.selected=e==="select":n.children&&n.children.toggle(t,e),n))}setReferenceDate(t){return this.collection.map(e=>(e.referenceDate=t,e.children&&(e.children.referenceDate=t),e))}set referenceDate(t){this.collection=this.setReferenceDate(t)}addHeaders(t){this._headers=t.map(e=>new Qr(e))}get headers(){return this._headers?this._headers:[]}mergeOptions(t,e=!1,n=!1){let a=[];this.collection.forEach(l=>{let d=t.find(b=>b.code===l.code);d?(l.mergeOption(d),a.push(l)):n||a.push(l)}),e?this.collection=[...a,...t.filter(l=>!this.collection.some(d=>d.code===l.code))]:this.collection=a}some(t,e){return this.collection.some((n,a,l)=>{let d=t(n,a,l);return!d&&n.children?n.children.some(t,e):d})}};var Be=class o extends Tt{get type(){return"composite-collection"}get selfhref(){}static create(t,e,n){return"children"in t&&"children"in e&&Array.isArray(e.children)&&Array.isArray(t.children)?Array.isArray(t.children[0])?o.createMultiData(t,e,n):o.createStandard(t,e,n):new o}static createStandard(t,e,n){let a=new o;return"children"in e&&"children"in t&&Array.isArray(e.children)&&Array.isArray(t.children)&&(a.collection=e.children.map(l=>{let[d]=Object.keys(l),b=Array.isArray(t.children)?t.children.find(gt=>gt.key===d):{},x=l[d];"type"in e&&typeof e.type=="string"&&e.type.includes("range")&&!x.type&&(x.type=e.type.replace("range",""));let D=_t.createAttribute(d,{...b,dynamicschema:b?.dynamicschema},{...x,readonly:x.readonly??"readonly"in e},n);return D&&"key"in t&&typeof t.key=="string"&&(D.parentKey=t.key),D}).filter(l=>l!==null)),a}static createMultiData(t,e,n){let a=new o;return"children"in t&&Array.isArray(t.children)&&(a.collection=t.children.map(l=>o.create({...t,children:l},e,n))),a}getInputValue(){return this.collection.map(t=>t.inputvalue).join(",")}get inputvalue(){return this.getInputValue()}validate(){return this.collection.every(t=>t.isValid)}get errorCollection(){return new fe(3)}hasServerErrors(){return this.errorCollection.serverErrors.length>0||this.collection.some(t=>t.hasServerErrors())}hasErrors(){return this.errorCollection.hasItems()??this.collection.some(t=>t.hasErrors())}isValid(){return!this.hasErrors()}reset(){this.collection.forEach(t=>{t.reset()})}get initvalue(){let t={},e=[];for(let n of this.collection)n instanceof o?e.push(n.initvalue):n.initvalue!==null&&(t[n.key]=n.initvalue);if(!(e.length===0&&Object.keys(t).length===0))return e.length>0?e:t}get value(){if(this.first instanceof o)return this.collection.map(e=>e.value);let t={};if(this.collection.forEach(e=>{if(e instanceof o)return e.value;e.formdata!==null&&!e.readonly&&(t={...t,...e.formdata})}),Object.keys(t).length!==0)return t}get readonlyvalue(){return this.first instanceof o?this.collection.map(t=>t.readonlyvalue).join(" | "):this.collection.filter(t=>t.value!==null).map(t=>t.readonlyvalue).join(", ")}updateValidations(t,e){this.collection.forEach(n=>{if(n instanceof o)n.updateValidations(t,e);else{let a=e.filter(l=>l.anchor?.elementid===`${t}${n.key}`);n.updateValidations(a)}})}setUseClientsideValidation(t){this.collection.forEach(e=>{e.setUseClientsideValidation(t)})}hasValue(){return this.collection.some(t=>t.hasValue())}getChildByAttribute(t){return this.collection.find(e=>e instanceof G&&e.equals(t)?!0:e instanceof dt?e.getChildByAttribute(t):!1)}getChildByKey(t){return this.collection.find(e=>e instanceof G&&e.key===t?!0:e instanceof dt?e.getChildByKey(t):!1)}};var mt=(Z=>(Z.STRING="string",Z.NUMBER="number",Z.INTEGER="integer",Z.BOOLEAN="boolean",Z.MEMO="memo",Z.DATE="date",Z.DATETIME="datetime",Z.TIME="time",Z.TIMESTAMP="timestamp",Z.ARRAY="array",Z.BINARY="binary",Z.COMPOSITE="composite",Z.CAPTCHA="captcha",Z.PASSWORD="password",Z.CHOICE="choice",Z.LOOKUP="lookup",Z.RANGE="range",Z.HELPTEXT="helptext",Z.LABEL="label",Z.MONEY="money",Z.XML="xml",Z.UPLOAD="upload",Z.ASSIGNMENT="assignment",Z))(mt||{}),Fl=(D=>(D.STRING="string",D.CHOICE="choice",D.DATE="date",D.DATETIME="datetime",D.ASSIGNMENT="assignment",D.DATERANGE="daterange",D.DATETIMERANGE="datetimerange",D.NUMBER="number",D.NUMBERRANGE="numberrange",D))(Fl||{}),Nl=(a=>(a.STATIC="static",a.DYNAMIC="dynamic",a.DYNAMIC_WITH_THRESHOLD="dynamicWithThreshold",a.LOOKUP="lookup",a))(Nl||{});var dt=class o extends G{_children;constructor(t,e,n){super(t,e,n),this._children=Be.create(t??{},e??{},n),this.setChildrenOptionality()}static isApplicableModel(t){return t.type==="composite"||t.type==="array"&&"children"in t}getInitialChildModelLinks(){return this.children.getInitialChildModelLinks()}setChildModels(t,e){this.children.setChildModels(t,e)}get type(){return"composite"}get children(){return this._children}set children(t){this._children=t}get start(){return this.children.all[0]}get end(){return this.children.all[this.children.size-1]}getInputValue(){return this.children.getInputValue()}hasValue(){return this.children.some(t=>t.hasValue())}get constraintCollection(){let t=new it;return t.add(this.getServerConstraints()),t.add(this.addConstraints()),t}setUseClientsideValidation(t){super.setUseClientsideValidation(t),this.children.all.forEach(e=>e.setUseClientsideValidation(t))}validate(t){if(!this.useClientsideValidation())return!0;let e=this.children.validate();return e&&(e=this.constraintCollection.validate(t)),this.setIsValid(e),this.getIsValid()}get isValid(){return this.validate("")}hasServerErrors(){return this.errorCollection.serverErrors.length>0||this.children.some(t=>t.hasServerErrors())}hasErrors(){return this.errorCollection.hasItems()??this.children.some(t=>t.hasErrors())}reset(){this.children.reset()}getChildByAttribute(t){return this.children.find(e=>e instanceof Be?!1:e.equals(t))}getChildByKey(t){return this.children.find(e=>e instanceof G&&e.key===t?!0:e instanceof o||e instanceof Be?e.getChildByKey(t)!==void 0:!1)}mergeAttribute(t){this.concept=t.concept,this.children.forEach(e=>{if(t instanceof o&&e instanceof G){let n=t.getChildByKey(e.key);n&&e.mergeAttribute(n)}})}update(t,e){if(!e)throw new P("Composite attribute needs changed attribute on update call");return this.updateLastModification(),this.children.forEach(n=>{n instanceof o?n.update(t,e):n instanceof G&&n.equals(e)&&n.update(t)}),this.setChildrenOptionality(),this.validate(t),this}updateByAttribute(t){t instanceof o?t.children.forEach(e=>{if(!(e instanceof Be)){let n=this.getChildByAttribute(e);n&&n.updateByAttribute(e)}}):console.error(`update of composite attribute with ${t.type} not supported`)}setChildrenOptionality(){let t=!this.mandatory&&this.children.every(e=>e.value===null);this.children.forEach(e=>{e instanceof G&&(e.mandatory=t||!e.configuredMandatory?!1:e.configuredMandatory)})}get readonly(){return super.readonly??this.children.every(t=>t instanceof G&&t.readonly)}set readonly(t){super.readonly=t}get readonlyvalue(){return this.children.readonlyvalue}get initvalue(){return this.children.initvalue}getFormData(){return{[this.name]:this.value}}getValue(){return this.children.value}getChildrenIds(){let t=this.data.value;return Array.isArray(t)?t.map(e=>{if(typeof e=="object"&&e!=null&&"_id"in e)return e._id}):t!=null&&typeof t=="object"&&"_id"in t?[t._id]:[]}get isResult(){return this._isResult}set isResult(t){this._isResult=t,this.children.forEach(e=>{e instanceof Be||(e.isResult=t)})}indicateContentConfiguration(t){t&&this.children.forEach(e=>{e instanceof Be||e.indicateContentConfiguration(t)})}equals(t){return this.key===t.key&&this.parentKey===t.parentKey||this.children.some(e=>e instanceof G&&e.equals(t))}get readonlyWidth(){if(this.type==="composite")return"LARGE";switch(this.start instanceof G?this.start.type:""){case"datetime":return"LARGE";case"timestamp":return"EXTRA_LARGE";default:return"MEDIUM"}}};var Pl=(x=>(x.CHECKBOX="checkbox",x.RADIOBUTTON="radiobutton",x.COMBOBOX="combobox",x.LIST="list",x.LISTVIEW="listview",x.TABLE="table",x.LONGLIST="longlist",x.TOGGLE="toggle",x))(Pl||{}),Ve=class o extends G{_options;constructor(t,e,n){super(t,e,n),this.attributeReferenceDate=this.getDataAsString("referenceDate",new Date().toISOString().split("T")[0]),this._options=Ue.create(t,e,{...n,referenceDate:this.referenceDate}),this.layouthint.has(ml)&&(this._options.sortOptions=!0)}static isApplicableModel(t){let e="";return"type"in t&&typeof t.type=="string"&&(e=t.type),e==="choice"||e==="array"?!0:e!=="composite"&&e!=="boolean"?"enumerated"in t||"options"in t:!1}get type(){let t=this.getContributionAsString("optionMode",""),e=this.lookupLink||this.lookupListLink;return t==="lookup"||t==="dynamicWithThreshold"&&e?"lookup":"choice"}getInitialChildModelLinks(){let t=[];return this.hasContentConfiguration()&&(!this.hasContentFromData()&&this.conceptLink&&t.push(this.conceptLink),t.push(...this.options.getInitialChildModelLinks())),t}setChildModels(t,e){let n=this.conceptLink?.href;if(n){let a=t.find(l=>l instanceof Me?l.selfhref?.equalsWithParameters(n):!1);this.concept=a}this.options.setChildModels(t,e)}get optionType(){return this.contributions?.optionType??"generic"}get isUser(){return this.optionType==="user"}get lookupLink(){let t=this.links.getLinkByKey("lookupOptions");return t&&this.lookupParameterType==="bodyParameter"&&(t.method="POST"),t}get lookupParameterType(){return this.getContributionAsString("parameterType")==="bodyParameter"?"bodyParameter":"queryParameter"}get lookupListLink(){return this.links.getLinkByKey("lookupList")}get lookupListLabel(){return this.contributions.lookupList?.label??""}get referenceDate(){return this.attributeReferenceDate}set referenceDate(t){this.attributeReferenceDate=t,this.options.referenceDate=t}get options(){return this._options}get selected(){return this.options.selected.map(t=>t.code)}get readonlyvalue(){return this.options.selected.map(t=>t.label).join(", ")}get initvalue(){let t=this.getInitValue();return Array.isArray(t)&&t.length!==0,t}getValue(){return this.options.selected.length>0?this.options.selected.map(t=>t.code).join(","):null}hasValue(){return this.options.selected.length>0}getInputValue(){return this.selected.join(",")}toggleOption(t){this.selected.includes(t)?this.disableOption(t):this.enableOption(t)}enableOption(t){this.isMultiple||this.options.deselectAll(),this.options.select(t),this.inputvalue=this.getInputValue()}disableOption(t){this.options.deselect(t),this.inputvalue=this.getInputValue()}addOption(t){this.isMultiple||this.options.deselectAll();let e="code"in t&&typeof t.code=="string"?t.code:"";this.options.find(n=>n.code===e)===void 0&&this.options.addOption(e,t)}get choicetype(){return["checkbox","radiobutton","combobox","list","listview","table","longlist","toggle"].find(t=>this.layouthint.has(t))??"checkbox"}get isMultiple(){return this.getContributionAsBoolean("multiplechoice")??this.choicetype==="checkbox"}get isTree(){return this.getContributionAsArray("options",[]).some(t=>"children"in t)}reset(){this.options.deselectAll()}mergeAttribute(t,e=!1,n=!1){!this.readonly&&t instanceof o&&(this.concept=t.concept,this.options.mergeOptions(t.options,e??this.type==="lookup",n),this.options.deselectAll(),t.isValid&&t.inputvalue!==null&&this.update(t.inputvalue))}update(t){if(this.readonly)return this;this.updateLastModification();let e;return Array.isArray(t)?e=t:typeof t=="string"&&this.isMultiple?e=t.split(","):e=[t],e.forEach(n=>{n instanceof Ee?(this.options.some(a=>a.equals(n))||this.options.add(n),this.toggleOption(n.code)):typeof n=="string"&&this.options.some(a=>a.code.toString()===n)&&this.toggleOption(n)}),this}updateByAttribute(t){if(this.reset(),t instanceof o||t instanceof dt){let e;t instanceof o?e=t.options.selected:t instanceof dt&&(e=t.getChildrenIds()),e!=null&&this.update(e)}else console.error(`update of choice attribute with ${t.type} not supported`)}addMissingError(t){this.isChangedSince(0)&&this.attributeErrors.addServerError("Constraint.Missing"),t instanceof o&&this.mergeAttribute(t,!0,!0)}setHasContentConfiguration(t){super.setHasContentConfiguration(this.contentConfiguration!=null||t)}get contentConfiguration(){if(!this.contributions.content?.optionElements)return;let t=this.contributions.content.optionElements.map(e=>"contentElement"in e?{contentElement:{layouthint:[Gn],...e.contentElement}}:e);return new It(t)}get placeholder(){return this.getContributionAsString("placeholder","")}addServerError(t){let{id:e,message:n,properties:a,layouthint:l}=t,d="answer-option-key";if(a&&d in a){let b=a[d],x=this.options.find(D=>D.code===b);x&&(a[d]=x.getContentConfiguredLabel(this.contentConfiguration??void 0)??"")}this.attributeErrors.addServerError(e,n,a,l)}get readonlyWidth(){return"MEDIUM"}};var es=class o extends G{_referenceDate;_options;constructor(t,e,n){super(t,e,n),this._referenceDate=this.getDataAsString("referenceDate",St.now()),this._options=Ue.create(t,e,{...n,referenceDate:this.referenceDate})}static isApplicableModel(t){return"type"in t&&t.type==="boolean"}get type(){return"boolean"}get referenceDate(){return this._referenceDate}set referenceDate(t){this._referenceDate=t,this.options.referenceDate=t}get choicetype(){return["checkbox","radiobutton","combobox","toggle"].find(t=>this.layouthint.has(t))??"radiobutton"}get isMultiple(){return!1}get isTree(){return!1}setHasContentConfiguration(t){super.setHasContentConfiguration(this.contentConfiguration!==null||t)}get contentConfiguration(){if("content"in this.contributions&&typeof this.contributions.content=="object"&&this.contributions.content!==null&&"optionElements"in this.contributions.content&&Array.isArray(this.contributions.content.optionElements)){let t=this.contributions.content.optionElements.map(e=>"contentElement"in e?{contentElement:{...e.contentElement,layouthint:[Gn]}}:e);return new It(t)}return null}get options(){return this._options}get selected(){return this.options.selected.map(t=>t.code)}get readonlyvalue(){return this.options.selected.map(t=>t.label).join(", ")}get initvalue(){let t=this.getInitValue();return Array.isArray(t)&&t.length!==0,t}getValue(){let t=this.options.selected;return t.length>0?t[0].code:null}hasValue(){return this.options.selected.length>0}getInputValue(){return this.selected.join(",")}toggleOption(t){this.selected.includes(t)?this.disableOption(t):this.enableOption(t)}enableOption(t){this.options.deselectAll(),this.options.select(t),this.inputvalue=this.getInputValue()}disableOption(t){this.options.deselect(t),this.inputvalue=this.getInputValue()}reset(){this.options.deselectAll()}mergeAttribute(t){!this.readonly&&t instanceof o&&(this.concept=t.concept,this.options.deselectAll(),t.isValid&&t.inputvalue!==null&&this.update(t.inputvalue))}update(t){if(this.readonly)return this;this.updateLastModification();let e;return Array.isArray(t)?e=t:typeof t=="string"&&this.isMultiple?e=t.split(","):typeof t=="string"?e=[t==="true"?"true":"false"]:e=[JSON.stringify(t)],e.forEach(n=>{n instanceof Ee?this.toggleOption(n.code):typeof n=="string"&&this.options.some(a=>a.code.toString()===n)&&this.toggleOption(n)}),this}updateByAttribute(t){this.reset(),t instanceof o?this.update(t.value):console.error(`update of boolean attribute with ${t.type} not supported`)}getFormData(){return this.inError()?null:this.hasValue()?{[this.name]:this.value==="true"}:this.choicetype==="checkbox"||this.choicetype==="toggle"?{[this.name]:!1}:{[this.name]:null}}get readonlyWidth(){return this.options.some(t=>t.hasAlternativeLabel)?"SMALL":"EXTRA_SMALL"}};var rs=class extends G{_answer="";static isApplicableModel(t){return t.type==="captcha"}get type(){return"captcha"}update(t){return this.updateLastModification(),this.inputvalue=t,this}updateByAttribute(t){}setAnswer(t){this._answer=t}getAnswer(){return this._answer}get hasDynamicValidationData(){return!1}reset(){this._answer="",this.inputvalue=""}};var Hl="Constraint.Date.InexactDate",Ul="Constraint.Date.OutOfRange",Bl="Constraint.Date.BelowMinimum",Vl="Constraint.Date.AboveMaximum",is=class{_type;_format;_minDate;_maxDate;constructor(t,e=null,n=null,a="yyyy-MM-dd"){this._type=t,this._format=a,this._minDate=e,this._maxDate=n}get type(){return this._type}get id(){return this.minDate!==null&&this.maxDate!==null&&this.minDate===this.maxDate?Hl:this.minDate!==null&&this.maxDate!==null?Ul:this.minDate!==null?Bl:this.maxDate!==null?Vl:"Constraint.Date.NoBoundaryConstraint"}get format(){return this._format}get minDate(){return this._minDate}get maxDate(){return this._maxDate}get defaultMessage(){switch(this.id){case Hl:return"Date must be precisely ${min-date}";case Ul:return"Must be between ${min-date} and ${max-date}";case Bl:return"Must be on or after ${min-date}";case Vl:return"Must be on or before ${max-date}";default:return""}}get parameters(){return{"min-date":this.minDate?this.formatUtil.toFormat(this.minDate,this.format):null,"max-date":this.maxDate?this.formatUtil.toFormat(this.maxDate,this.format):null}}hasValidation(){return!0}isExactDate(t){if(this.minDate===null)throw new J("isExactDate: Min and max date not set");return this.formatUtil.isSame(t,this.minDate,this.format)}isBetweenDates(t){if(this.minDate===null||this.maxDate===null)throw new J("isBetweenDate: Min or max date not set");return this.isSameOrAfterMinDate(t)&&this.isSameOrBeforeMaxDate(t)}isSameOrAfterMinDate(t){if(this.minDate==null)throw new J("isSameOrAfterMinDate: Min date not set");return this.formatUtil.isSameOrAfter(t,this.minDate,this.format)}isSameOrBeforeMaxDate(t){if(this.maxDate==null)throw new J("isSameOrBeforeMaxDate: Max date not set");return this.formatUtil.isSameOrBefore(t,this.maxDate,this.format)}get formatUtil(){switch(this.type){case"time":return ir;case"timestamp":return Pe;case"datetime":return Ne;default:return St}}validate(t){if(typeof t!="string")throw new TypeError("isNotEmptyString: Not comparing to string");switch(this.id){case Hl:return this.isExactDate(t);case Ul:return this.isBetweenDates(t);case Bl:return this.isSameOrAfterMinDate(t);case Vl:return this.isSameOrBeforeMaxDate(t);default:return!0}}get isMandatoryConstraint(){return!1}};var ns=class{_format;_formatLabel;constructor(t,e){this._format=t,this._formatLabel=e}get id(){return"Constraint.DateFormat.InvalidFormat"}get format(){return this._format}get formatLabel(){return this._formatLabel}hasValidation(){return!0}get defaultMessage(){return"Date must be entered in the format ${format}"}get parameters(){return{format:this.formatLabel}}validate(t){return t?St.hasFormat(t,this.format):!1}get isMandatoryConstraint(){return!1}};var ss=class{_type;_format;_formatLabel;_formatNoOffset;_id="Constraint.DateTime.MissingValue";constructor(t,e,n){this._type=t,this._format=e,this._formatNoOffset=e.replace(ke,"").trim(),this._formatLabel=n}get type(){return this._type}get id(){return this._id}get format(){return this._format}get formatLabel(){return this._formatLabel}hasValidation(){return!0}get defaultMessage(){return"Date and time should both be entered"}get parameters(){return{format:this.formatLabel}}get formatUtil(){return this.type==="timestamp"?Pe:Ne}validate(t){if(!t)return!1;if(this.formatUtil.hasFormat(t,this.format))return!0;if(xr())if(this.formatUtil.hasFormat(t,this._formatNoOffset)){if(!new RegExp("[+-](0[0-9]|1[0-4]):[0-5][0-9]").test(t))return this._id="Constraint.DateTime.MissingOffset",!1}else return this._id="Constraint.DateTime.MissingValue",!1;return!1}get isMandatoryConstraint(){return!1}};var os=class{_format;_formatLabel;constructor(t,e){this._format=t,this._formatLabel=e}get id(){return"Constraint.TimeFormat.InvalidFormat"}get format(){return this._format}get formatLabel(){return this._formatLabel}hasValidation(){return!0}get defaultMessage(){return"Time must be entered in the format ${format}"}get parameters(){return{format:this.formatLabel}}validate(t){return t?ir.hasFormat(t,this.format):!1}get isMandatoryConstraint(){return!1}};var as=class o extends G{_dateInputFormat;constructor(t,e,n){super(t,e,n),this._inputvalue="",this._dateInputFormat="",this.updateInitValue()}get type(){return this.getContributionAsString("type","date")}static isApplicableModel(t){return t.type==="date"||t.type==="time"||t.type==="datetime"||t.type==="timestamp"}get formatUtil(){switch(this.type){case"time":return ir;case"timestamp":return Pe;case"datetime":return Ne;default:return St}}getInitValue(){let t=this.getDataAsString("value");return t&&(this.type==="time"&&t.length===5&&(t=`${t}:00`),this.type==="datetime"&&t.includes(".")?t=Pe.toFormat(t,Ne.getIsoFormat()):t=this.formatUtil.toISO(t),this.hasTime&&(t=this.getTimeValue(t))),t}getTimeValue(t){let e=t;if(this.timeInputFormat.toLowerCase().includes("h")||(e=this.formatUtil.setHour(t,0)),this.timeInputFormat.includes("m")||(e=this.formatUtil.setMinute(t,0)),this.timeInputFormat.includes("s")||(e=this.formatUtil.setSecond(t,0)),this.type==="timestamp"&&!this.timeInputFormat.includes("S")&&(e=this.formatUtil.setMilliseconds(t,0)),xr()){let n=this.formatUtil.toFormat(t,ke),a=this.formatUtil.toFormat(e,ke);e=e.replace(a,n)}return e}updateInitValue(){let t=this.getInitValue();if(t!=null){this.setInitValue(t);let e=this.getInitialInputValue(t);this._inputvalue=e,this.setValue(t)}}getInitialInputValue(t){if(typeof t!="string")return"";let e=t;return this.type==="time"&&t.length===5&&(e=`${t}:00`),this.formatUtil.toFormat(e,this.inputFormat)}getInputValue(){return this._inputvalue?this._inputvalue.toString():""}get inputvalue(){return this.getInputValue()}set inputvalue(t){this.validate(t),this._inputvalue=t,this.value=t!==null&&t!==""?this.formatUtil.toISO(t,this.inputFormat):null}reset(){this.inputvalue=""}get format(){let t=this.getContributionAsString("format","");return this.formatUtil.convertFormat(t)}get formatLabel(){switch(this.type){case"date":return this.dateInputFormat.toLowerCase();case"time":return this.timeInputFormat.toLowerCase();default:return this.format.toLowerCase()}}get hasDate(){return this.type==="date"||this.type==="datetime"||this.type==="timestamp"}get hasTime(){return this.type==="time"||this.type==="datetime"||this.type==="timestamp"}get inputFormatWithoutOffset(){return this.hasDate&&this.hasTime?`${this.dateInputFormat} ${this.timeInputFormat}`.trim():this.hasDate?this.dateInputFormat:this.hasTime?this.timeInputFormat:""}get inputFormat(){return xr()&&this.dateInputFormat!==""&&this.timeInputFormat!==""?`${this.inputFormatWithoutOffset} ${ke}`:this.inputFormatWithoutOffset}extractDateInputFormat(){let t=new Set("yMLdQDEewGu"),e=new Set("HhaKmsSZzXxO"),n=this.format,a="",l=!1,d=!1;for(let b=0;b<n.length;b++){let x=b>0?n[b-1]:"",D=b<n.length?n[b+1]:"",gt=n[b];gt==="'"?l=x==="'"||D==="'"||!l:!l&&t.has(gt)?d=!0:!l&&e.has(gt)&&(d=!1),d&&(a+=gt)}return a.trim()}get dateInputFormat(){return this.hasDate?(this._dateInputFormat||(this._dateInputFormat=this.extractDateInputFormat()),this._dateInputFormat):""}get dateReadonlyFormat(){return this.hasDate?this.hasTime?this.format.replace(this.timeInputFormat,"").trim():this.format:""}get placeholder(){if(super.placeholder)return super.placeholder;let t=this.getContributionAsString("formatlabel");return this.hasDate&&this.hasTime&&t?.includes(" ")?t.split(" ")[0]:t}createTimeInputFormat(){if(!this.hasTime)return"";let t=this.format,e=[];t.includes("H")?e.push("HH"):t.includes("h")&&e.push("hh"),t.includes("m")&&e.push("mm"),t.includes("s")&&e.push("ss");let n=e.join(":");return t.includes("S")&&(n=`${n}.SSS`),t.includes("a")?`${n} a`:n}get timeInputFormat(){return this.createTimeInputFormat()}get timeReadonlyFormat(){return this.createTimeInputFormat()}get dateInputValue(){return typeof this.value=="string"&&this.dateInputFormat!==""?this.formatUtil.toFormat(this.value,this.dateInputFormat):""}get timeInputValue(){return typeof this.value=="string"&&this.timeInputFormat!==""?this.formatUtil.toFormat(this.value,this.timeInputFormat):""}formatValue(t){return typeof t!="string"||t===""?"":(this.type==="datetime"||this.type==="timestamp")&&St.hasFormat(t,Cn)?St.toFormat(t,this.dateReadonlyFormat):this.type==="date"?this.formatUtil.toFormat(t,this.dateReadonlyFormat):this.formatUtil.toFormat(t,this.format)}get readonlyvalue(){return typeof this.value=="string"?this.formatValue(this.value):""}get isAmbiguous(){return typeof this.value=="string"?this.formatUtil.isAmbiguous(this.value):!1}get offset(){return typeof this.value=="string"?this.formatUtil.getOffset(this.value):null}get mindate(){return this.getContributionAsString("mindate")}get maxdate(){return this.getContributionAsString("maxdate")}addServerError(t){let{id:e,message:n,properties:a,layouthint:l}=t;a&&"format"in a&&this.formatLabel&&(a.format=this.formatLabel),this.attributeErrors.addServerError(e,n,a,l)}getFormatConstraint(){switch(this.type){case"date":return new ns(this.dateInputFormat,this.formatLabel);case"time":return new os(this.timeInputFormat,this.formatLabel);default:return new ss(this.type,this.inputFormat,this.formatLabel)}}addConstraints(){let t=new it;return t.add(this.getFormatConstraint()),(this.mindate||this.maxdate)&&t.add(new is(this.type,this.mindate,this.maxdate,this.inputFormat)),t}get readonlyWidth(){return this.type==="date"||this.type==="time"?"SMALL":"MEDIUM"}update(t){return this.inputvalue===t?this:(this.updateLastModification(),this.inputvalue=t,this)}updateByAttribute(t){if(this.reset(),t instanceof o){let e=t.value;if(e!=null){let n=this.formatUtil.toFormat(e,this.inputFormat);this.update(n)}}else console.error(`update of datetime attribute with ${t.type} not supported`)}};var us=class extends G{static isApplicableModel(t){return t.type==="helptext"||"readonly"in t&&"text"in t}get type(){return"helptext"}get text(){let e=this.getData("content")?.text?.message;if(e)return e;let n=this.getContribution("text");return n!=null?typeof n=="string"?n:n.message:null}update(t){return this}updateByAttribute(t){}getFormData(){return null}reset(){}};var ls=class extends G{static isApplicableModel(t){return"layouthint"in t&&Array.isArray(t.layouthint)?t.layouthint.includes("label"):!1}get type(){return"label"}update(t){return this}updateByAttribute(t){}getFormData(){return null}reset(){}};var Sm=require("immer");var ti=class{[Sm.immerable]=!0;static checkHintApplicability=!1;static isApplicableForAttribute(t){return!0}static isApplicableForHint(t){throw new J("Missing isApplicableForHint implementation on layout hint rule")}static initAttribute(t){throw new J("Missing initAttribute implementation on layout hint rule")}static initHint(t){throw new J("Missing initHint implementation on layout hint rule")}};var Om="equals",Dm="includes",Im="notEquals",Rm="notIncludes",Lm="notIsEmpty",wm="isEmpty",km="show",Fm="hide",cs=class o extends ti{_action="";_control="";_operator="";_options=[];static checkHintApplicability=!0;static isApplicableForHint(t){return new RegExp(`^${Nn}\\s?(${km}|${Fm})`,"i").test(t)}static getRuleInstance(){return new o}static initHint(t){let e=this.getRuleInstance(),n=`${Om}|${Dm}|${Im}|${Rm}|${Lm}|${wm}`,a=new RegExp(`${Nn}\\s?(\\S*)\\swhen ${Hi}:\\s?(.*?)\\s*(${n})\\s(.*)`,"i"),l=new RegExp(`${Nn}\\s?(\\S*)\\swhen ${Hi}:\\s?(.*?)\\s*(${n})`,"i"),d=t.match(a)?t.match(a):t.match(l);if(d)e.action=d[1],e.control=d[2],e.operator=d[3],e.options=d[4]?d[4]:"";else throw new Qt(`No dependent information found on layout hint: ${t}`);return e}get action(){return this._action}set action(t){this._action=t}get control(){return this._control}set control(t){this._control=t}get operator(){return this._operator}set operator(t){this._operator=t}get options(){return this._options}set options(t){this._options=t.split("|").map(e=>e.trim())}processEqualsOptions(t){if("selected"in t&&Array.isArray(t.selected)){let e=t.selected;return this.options.every(n=>e.includes(n))}throw new Qt("Dependent control in combination with equals operator must be a choice, string or number attribute")}processIncludesOptions(t){if(t.type==="choice")return this.options.some(e=>t.selected.includes(e));throw new Qt("Dependent control in combination with includes operator must be a choice attribute")}handleOperator(t){switch(this.operator){case Om:return this.processEqualsOptions(t);case Dm:return this.processIncludesOptions(t);case Im:return!this.processEqualsOptions(t);case Rm:return!this.processIncludesOptions(t);case Lm:return t?.selected.length!==0;case wm:return t?.selected.length===0;default:throw new Qt(`Unsupported operator for dependent question: ${this.operator}`)}}getControlAttribute(t){let e=t.getAttributeByLayoutHint(`${Hi}:${this.control}`,`${Hi}: ${this.control}`);return typeof e<"u"&&e!=null&&"selected"in e&&Array.isArray(e.selected)?e:null}process(t,e){let n=this.getControlAttribute(e);if(!n)return;if(n.processLayoutHintRules(e),n.isHidden){t.hide();return}let a=this.handleOperator(n);if(this.action===km)t.isHidden=!a;else if(this.action===Fm)t.isHidden=a;else throw new Qt(`Unsupported action ${this.action} for dependent question on attribute: ${t.label}`)}};var hs=class{_filetypeConstraints;constructor(t){this._filetypeConstraints=t}get id(){return"Constraint.File.InvalidExtension"}get extensions(){return this._filetypeConstraints.map(t=>t.extensions.join(", ")).join(", ")}hasValidation(){return!1}get defaultMessage(){return"Allowed extensions are: ${extensions}"}get parameters(){return{extensions:this.extensions}}validate(){return!0}get isMandatoryConstraint(){return!1}};var Gl=Y(require("file-size"),1),jl="Constraint.File.MaxTotalFileSize",Wl="Constraint.File.MaxFileSize",ps=class{_filesizeConstraint;constructor(t){this._filesizeConstraint=t}get id(){return this.filesizeConstraint.isMaxTotal?jl:this.filesizeConstraint.fileSize!==void 0?Wl:""}get filesizeConstraint(){return this._filesizeConstraint}hasValidation(){return!1}get defaultMessage(){return this.id===jl?"{filesize-left} van {max-total-filesize} over van totaal toegestaan upload bestandsgrootte":this.id===Wl?"Maximale bestandsgroote is ${max-filesize}":""}get filesize(){return(0,Gl.default)(this.filesizeConstraint.fileSize??0).human("jedec")}get maxTotalFileSize(){if(this.filesizeConstraint.maxTotalFileSize)return(0,Gl.default)(this.filesizeConstraint.maxTotalFileSize).human("jedec")}get parameters(){return this.id===jl?{"filesize-left":this.filesize,"max-total-filesize":this.maxTotalFileSize}:this.id===Wl?{"max-filesize":this.filesize}:{}}validate(){return!0}get isMandatoryConstraint(){return!1}};var cO="UNCHANGED",ei=class o extends G{_files;_initialTotalFileSize=0;_maxTotalFileSize;static isApplicableModel(t){return t.type==="binary"}get type(){return"upload"}get multiple(){return this.getContributionAsBoolean("multiple",!1)}get initialTotalFileSize(){return this._initialTotalFileSize??0}set initialTotalFileSize(t){this._initialTotalFileSize=t}get maxTotalFileSize(){return this._maxTotalFileSize}set maxTotalFileSize(t){this._maxTotalFileSize=t}get currentFilesize(){return this.initialTotalFileSize+this.uploadedFileSize}get maxFileSize(){if(this.maxTotalFileSize){let t=this.maxTotalFileSize-this.currentFilesize;return t<0?0:t}return this.getContributionAsNumber("uploadMaxFileSize")}get uploadedFileSize(){if(Object.keys(this.files).length===0)return 0;let t=0;return Object.keys(this.files).forEach(e=>{let n=this.files[e];n.size&&(t+=n.size)}),t}get uploadConstraints(){let t=this.getContributionAsArray("allowedMimeTypes",[]).filter(a=>a!=="[...]");return{fileTypes:this.getContributionAsArray("allowedExtensions",[]).filter(a=>a!=="[...]").map(a=>({extensions:[a],mimeTypes:t})),maxFileSize:{fileSize:this.maxFileSize,maxTotalFileSize:this.maxTotalFileSize,isMaxTotal:this.maxTotalFileSize!==void 0},acceptedFiles:this.acceptedFiles}}get acceptedFiles(){let t=this.getContributionAsArray("allowedMimeTypes",[]).filter(n=>n!=="[...]");return[...this.getContributionAsArray("allowedExtensions",[]).filter(n=>n!=="[...]"),...t]}addConstraints(){let t=new it;return this.uploadConstraints.fileTypes.length>0&&t.add(new hs(this.uploadConstraints.fileTypes)),(this.uploadConstraints.maxFileSize.isMaxTotal||this.uploadConstraints.maxFileSize.fileSize!==void 0)&&t.add(new ps(this.uploadConstraints.maxFileSize)),t}get files(){return this._files??{}}set files(t){this._files=t}getFilesTypeFromValue(t){if(typeof t=="object")return t;if(typeof t=="string")try{return JSON.parse(t)}catch{console.warn(`Can't parse upload value: ${t}`)}return null}update(t){if(!t)return this;let e=this.getFilesTypeFromValue(t);return e==null?this.inputvalue=t:(this.files=e,this.inputvalue=Object.keys(e).map(n=>e[n].token).join(",")),this.updateLastModification(),this}updateByAttribute(t){}get readonlyvalue(){return this.initvalue?this.initvalue.toString():""}getValue(){return this.hasValue()?this.initvalue===this.inputvalue?cO:super.getValue():null}mergeAttribute(t){t instanceof o&&t.isValid&&t.inputvalue!==null&&this.update(JSON.stringify(t.files))}reset(){this._files={}}};var fs=class o extends ti{static isApplicableForAttribute(t){return t.type==="upload"}static initAttribute(){return new o}processUploadInformation(t,e){let n=e.getAttributesByLayoutHint(Bn),a=e.getAttributesByLayoutHint(Vn);if(n.length>0&&a.length>0){let l=n[0].value,d=a[0].value;t.initialTotalFileSize=Number(l),t.maxTotalFileSize=Number(d)}}process(t,e){t instanceof ei&&this.processUploadInformation(t,e)}};var ds=[cs,fs],hO=o=>{ds.push(o)},pO=o=>{let t=o(ds);if(Array.isArray(t))ds=t;else throw new On("Result of updater of updateLayoutHintRules is not an array")},ms=class o extends K{get allRules(){return ds}static setLayoutHintRules(t){let e=new o;return ds.forEach(n=>{n.isApplicableForAttribute(t)&&(n.checkHintApplicability?t.layouthint.forEach(a=>{n.isApplicableForHint(a)&&e.add(n.initHint(a))}):e.add(n.initAttribute(t)))}),t.layoutHintRules=e,t}process(t,e){this.all.forEach(n=>{n.process(t,e)})}};var gs=class{get id(){return"Constraint.BSN.InvalidFormat"}hasValidation(){return!0}get defaultMessage(){return"Must be a valid BSN"}get parameters(){return{}}isValidBSN(t){if(t.replace(/[^\d]/gu,"").length!==t.length)return!1;let e=t.replace(/\D/gu,""),n=e.length;if(n<8||n>9||Number.isNaN(e))return!1;let d=0,b=0;for(let x=n;x>0;x--){let D=parseInt(e.charAt(d),10);b+=x===1?D*-1:D*x,d+=1}return b%11===0}validate(t){return this.isValidBSN(t)}get isMandatoryConstraint(){return!1}};var Nm=Y(require("iban"),1),ys=class{get id(){return"Constraint.IBAN.InvalidFormat"}hasValidation(){return!0}get defaultMessage(){return"Must be a valid IBAN number"}get parameters(){return{}}validate(t){return Nm.default.isValid(t)}get isMandatoryConstraint(){return!1}};var sr=class{_regexConstraint;constructor(t){this._regexConstraint=t}get id(){return this.regexConstraint.messageKey}get regexConstraint(){return this._regexConstraint}hasValidation(){return!0}get defaultMessage(){return this.regexConstraint.defaultMessage||this.regexConstraint.messageKey}get parameters(){return{regex:this.regexConstraint.regex}}validate(t){return this.regexConstraint.regex instanceof RegExp?this.regexConstraint.regex.test(t):new RegExp(this.regexConstraint.regex).test(t)}get isMandatoryConstraint(){return!1}};var Te=class o extends G{get type(){return"string"}static isApplicableModel(t){return"type"in t&&t.type==="string"?!0:"layouthint"in t&&Array.isArray(t.layouthint)?t.layouthint.includes("string"):!1}getInitialInputValue(t){return this.formatValue(t)}get regexp(){return this.getContributionAsString("regexp")}get regexpvalidationmessage(){return this.getContributionAsString("regexpValidationMessage")}get postfix(){return this.getContributionAsString("postfix","")}get prefix(){return this.getContributionAsString("prefix","")}isBSN(){return this.layouthint.has("bsn")}isIBAN(){return this.layouthint.has("iban")}isZipcode(){return this.layouthint.has("zipcode")}isEmail(){return this.layouthint.has("email")}addConstraints(){let t=new it;return this.isBSN()?t.add(new gs):this.isIBAN()&&t.add(new ys),this.isZipcode()?t.add(new sr({messageKey:"Constraint.ZipCode.InvalidFormat",defaultMessage:"Must be a valid Dutch ZIP code, e.g. 1234 AB",regex:new RegExp("^[1-9][0-9]{3} ?[a-zA-Z]{2}$","gi")})):this.isEmail()&&this.regexp?t.add(new sr({messageKey:"Constraint.Email.InvalidFormat",defaultMessage:"Must be a valid e-mail address",regex:new RegExp(this.regexp,"gi")})):this.regexp&&t.add(new sr({messageKey:"Constraint.String.InvalidRegex",defaultMessage:this.regexpvalidationmessage,regex:this.regexp})),t}reset(){this.inputvalue=""}formatIBAN(t){let n=this.removeFormat(t).replace(/\s/g,"").match(/.{1,4}/g);return n==null?"":n.join(" ")}formatZipcode(t){let e=this.removeFormat(t);return e.length===6?e.substring(0,4)+" "+e.substring(4).toUpperCase():e}formatBSN(t){return this.removeFormat(t)}formatValue(t){return t==null||t.toString()===""?"":typeof t=="string"?this.isIBAN()?this.formatIBAN(t):this.isZipcode()?this.formatZipcode(t):this.isBSN()?this.formatBSN(t):t.replace(/ {2}/gi," \xA0"):JSON.stringify(t)}removeFormat(t){return t==null||t.toString()===""?"":typeof t=="string"?this.isIBAN()||this.isZipcode()||this.isBSN()?t.replace(/[^a-z0-9,]/gi,""):t:JSON.stringify(t)}get validateValue(){return this.removeFormat(this.inputvalue)}get inputvalue(){return this.getInputValue()}set inputvalue(t){this.setInputvalue(t),t==null?this.value=t:this.value=this.removeFormat(t),this.validate(this.validateValue)}get readonlyvalue(){return typeof this.value=="string"?this.formatValue(this.value).replace(/ {2}/gi," \xA0"):this.value==null?"":JSON.stringify(this.value)}update(t){return this.inputvalue===t?this:(this.updateLastModification(),this.inputvalue=t,this)}updateByAttribute(t){this.reset(),t instanceof o?this.update(t.value):console.error(`update of string attribute with ${t.type} not supported`)}get readonlyWidth(){return this.isZipcode()||this.isBSN()?"SMALL":this.isIBAN()?"LARGE":"MEDIUM"}};var bs=class extends Te{static isApplicableModel(t){return"type"in t&&typeof t.type=="string"&&t.type==="memo"?!0:"rows"in t&&typeof t.rows=="number"?t.rows>1:!1}get type(){return"memo"}get rows(){return this.getContributionAsNumber("rows",10)}get formatted(){return this.getContributionAsBoolean("formatted",!1)}get readonlyWidth(){return"LARGE"}};var Hm=Y(oa(),1);var Pm=Y(require("big.js"),1);var or=class o{_prefix="";_suffix="";_comma=0;_minInt=1;_minFrac=0;_maxFrac=0;_isPercentage=!1;constructor(t){this.setAffix(t),this.setFractionLengths(t),this.setGroupLength(t),this.setMinLength(t),this.setPercentage()}get prefix(){return this._prefix}get suffix(){return this._suffix}get comma(){return this._comma}get minInt(){return this._minInt}get minFrac(){return this._minFrac}get maxFrac(){return this._maxFrac}get isPercentage(){return this._isPercentage}setAffix(t){let e=t.includes("#")?t.substring(0,t.indexOf("#")):t;this._prefix=e.includes("0")?e.substring(0,e.indexOf("0")):e,this._suffix=t.substring(this._prefix.length).replace(/[#,.0]/gu,"")}setFractionLengths(t){let e=t.replace(/[^#,.0]/gu,"");if(e.includes(".")){let a=e.substring(e.indexOf(".")+1).replace(/,|\.+/g,"");this._maxFrac=a.length;let l=a.replace(/[^0]/gu,"");this._minFrac=l.length}}setGroupLength(t){let e=t.replace(/[^#,.0]/gu,""),n=e.includes(".")?e.substring(0,e.indexOf(".")):e;n.includes(",")&&(this._comma=n.length-1-n.lastIndexOf(","))}setMinLength(t){let n=(t.includes(".")?t.substring(0,t.indexOf(".")):t).replace(/[^0]/gu,"");this._minInt=n.length>1?n.length:1}setPercentage(){this._isPercentage=this.suffix.charAt(0)==="%"}static getNumericString(t){let e=Number(t),n=String(e);return!n.includes(".")&&t.includes(".")?t.substring(t.indexOf(".")+1).replace(/0/gu,"").length>0?t:n:t}formatBack(t){let e=String(t);if(!e)return"";if(!isNaN(Number(e)))return o.getNumericString(e);let n=t,a=!1;t.charAt(0)==="-"&&(n=t.substr(1),a=!0);let l=t.startsWith(this.prefix),d=this.suffix===""?t.length:t.indexOf(this.suffix,this.prefix.length+1);return l&&d>0&&(n=n.substr(0,d),n=n.substr(this.prefix.length),n=n.replace(/,/gu,""),a&&(n=`-${n}`),!isNaN(Number(n)))?o.getNumericString(n):n}static scientificNumber(t){if(t.includes("e")){let e=Number(t);return e===1/0||e===-1/0?t:String(e)}return t}getFracAsNumber(t){let e=+`0.${t}`;return this.maxFrac===0?Math.round(e).toString(10):e.toFixed(this.maxFrac)}getRoundedFrac(t){return this.getFracAsNumber(t).substr(2)}static getFraction(t){let e=t.includes(".")?t.substring(t.indexOf(".")+1):"";return e=e.replace(/\./,""),e}getFracCorrectLength(t){let e=t;e.length>this.maxFrac&&(e=this.getRoundedFrac(e));for(let n=e.length;n<this.minFrac;n++)e=`${e}0`;for(;e.length>this.minFrac&&e.charAt(e.length-1)==="0";)e=e.substring(0,e.length-1);return e}getInteger(t){let e=t.includes(".")?t.substring(0,t.indexOf(".")):t,n=Number(this.getFracAsNumber(t))>1,a=e.length-1;for(;n;){if(a===-1){e=`1${e}`;break}let l=e.charAt(a);l==="9"?l="0":(l=`${l+1}`,n=!1),e=e.substring(0,a)+l+e.substring(a+1,e.length),a-=1}for(let l=e.length;l<this.minInt;l++)e=`0${e}`;for(;e.length>this.minInt&&e.charAt(0)==="0";)e=e.substring(1);return e}addGrouping(t){let e=t,n=0;for(let a=e.length;a>0;a--)n!==0&&n%this.comma===0&&(e=`${e.substring(0,a)},${e.substring(a)}`,n=0),n+=1;return e}getFormattedValue(t,e,n){let a;return e.length>0?a=`${this.prefix+t}.${e}${this.suffix}`:a=this.prefix+t+this.suffix,n&&(a=`-${a}`),a}format(t=""){if(t===null)return"";let e=this.formatBack(t).toLowerCase();if(isNaN(Number(e))||e.length===0)return t;if(e=o.scientificNumber(e),e.includes("e"))return e;let n=e.charAt(0)==="-";(n||e.charAt(0)==="+")&&(e=e.substring(1));let a=o.getFraction(e),l=this.getInteger(e);if(this.isPercentage){let b=`00${`${a}00`.substr(0,2)}`.substr(-2);l=`${l}${b}`,a=a.substr(2)}return a=this.getFracCorrectLength(a),l=this.addGrouping(l),this.getFormattedValue(l,a,n)}};var At=class{static removeGroupingSeparator=(t,e)=>{if(typeof t=="number"||e==null)return t;let n=e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&");return t.replace(new RegExp(n,"g"),"")};static updateDecimalSeparator=(t,e)=>typeof t=="number"||e==null||e===""?t:t.replace(e,".");static parseToNumber=(t,e=",",n=".")=>{if(!(typeof t=="number"||typeof t=="string")||t==="")return NaN;let a=this.removeGroupingSeparator(t,e),l=this.updateDecimalSeparator(a,n);return Number(l)};static parseNumberToString=(t,e=",",n=".")=>{if(t==null||t==="")return"NaN";let a=this.removeGroupingSeparator(t,e),l=this.updateDecimalSeparator(a,n);try{return(0,Pm.default)(l).toFixed()}catch{return"NaN"}};static updateGroupingSeparator(t,e){return e==null?t:t.replace(/,/g,e)}static formatNumber(t,e="#",n=",",a="."){if(t==null)return"";let l=typeof t=="number"?t:this.parseToNumber(t,n,a);if(typeof l!="number")throw new P(`Not a valid number: ${t} for formatValue`);let d=this.parseNumberToString(l);if(e!=null){let b=new or(e).format(d),[x,D]=b.split("."),gt=this.updateGroupingSeparator(x,n);return D?`${gt}${a}${D}`:gt}return d}static isSameOrBefore(t,e){return t<=e}static isBefore(t,e){return t<e}};var ql="Constraint.Number.InexactNumber",$l="Constraint.Number.OutOfRange",Kl="Constraint.Number.BelowMinimum",zl="Constraint.Number.AboveMaximum",Cs=class{_minNumber;_maxNumber;_groupingSeparator=",";_decimalSeparator=".";_format="";constructor(t=null,e=null,n=",",a=".",l){this._format=l??"",this._groupingSeparator=n,this._decimalSeparator=a,this._minNumber=t,this._maxNumber=e}get id(){return this.minNumber!==null&&this.maxNumber!==null&&this.minNumber===this.maxNumber?ql:this.minNumber!==null&&this.maxNumber!==null?$l:this.minNumber!==null?Kl:this.maxNumber!==null?zl:"Constraint.Number.NoBoundaryConstraint"}get minNumber(){return this._minNumber}get maxNumber(){return this._maxNumber}get format(){return this._format}get groupingSeparator(){return this._groupingSeparator}get decimalSeparator(){return this._decimalSeparator}hasValidation(){return!0}get defaultMessage(){switch(this.id){case ql:return"Number must be precisely ${min-number}";case $l:return"Must be between ${min-number} and ${max-number}";case Kl:return"The number must be larger than ${min-number}";case zl:return"The number must be smaller than ${max-number}";default:return""}}get parameters(){return{"min-number":this.minNumber===null?null:At.formatNumber(this.minNumber,this.format,this.groupingSeparator,this.decimalSeparator),"max-number":this.maxNumber===null?null:At.formatNumber(this.maxNumber,this.format,this.groupingSeparator,this.decimalSeparator)}}isExactNumber(t){return At.parseToNumber(t,this.groupingSeparator,this.decimalSeparator)===this.minNumber}isSameOrAboveMinNumber(t){let e=At.parseToNumber(t,this.groupingSeparator,this.decimalSeparator);return isNaN(e)||e==null?!1:this.minNumber!=null&&e>=this.minNumber}isSameOrBelowMaxNumber(t){let e=At.parseToNumber(t,this.groupingSeparator,this.decimalSeparator);return isNaN(e)||e==null?!1:this.maxNumber!=null&&e<=this.maxNumber}isBetweenNumbers(t){return this.isSameOrAboveMinNumber(t)&&this.isSameOrBelowMaxNumber(t)}validate(t){switch(this.id){case ql:return this.isExactNumber(t);case $l:return this.isBetweenNumbers(t);case Kl:return this.isSameOrAboveMinNumber(t);case zl:return this.isSameOrBelowMaxNumber(t);default:return!0}}get isMandatoryConstraint(){return!1}};var Xl="Constraint.Number.InvalidInteger",_s=class{_decimalSeparator=",";_groupingSeparator=".";_format="0";constructor(t=",",e=".",n="0"){this._decimalSeparator=e,this._groupingSeparator=t,this._format=n??"0"}get id(){return this.maxDigits===0?Xl:"Constraint.Number.InvalidDecimal"}get decimalSeparator(){return this._decimalSeparator}get groupingSeparator(){return this._groupingSeparator}get format(){return this._format}get maxDigits(){return this.format?new or(this.format).maxFrac:0}hasValidation(){return!0}get defaultMessage(){return this.id===Xl?"Must be a whole number":"The value is not correct numeric format"}get parameters(){return{"max-digits":this.maxDigits}}isInteger(t){return Number.isInteger(t)}getNumberOfDigits(t){return Math.floor(t)===t?0:At.parseNumberToString(t).split(".")[1].length}isValidDecimal(t){if(isNaN(t))return!1;let e=this.getNumberOfDigits(t);return!isNaN(parseFloat(String(t)))&&isFinite(t)&&e<=this.maxDigits}validate(t){if(this.maxDigits===0&&this.decimalSeparator!==""&&t.toString().includes(this.decimalSeparator))return!1;let e=At.parseToNumber(t,this.groupingSeparator,this.decimalSeparator);return this.id===Xl?this.isInteger(e):this.isValidDecimal(e)}get isMandatoryConstraint(){return!1}};var fO=3,As=class{_decimalSeparator;_groupingSeparator;_format;constructor(t=",",e=".",n="0"){this._decimalSeparator=e,this._groupingSeparator=t,this._format=n??"0"}get id(){return"Constraint.Number.GroupingSeparator"}get decimalSeparator(){return this._decimalSeparator}get groupingSeparator(){return this._groupingSeparator}get format(){return this._format}get groupSize(){if(this.format){let t=new or(this.format).comma;if(t>0)return t}return fO}hasValidation(){return!0}get defaultMessage(){return"Group divider '${group-divider}' must be correctly placed"}get parameters(){return{"group-divider":this.groupingSeparator}}hasCorrectGrouping(t){let e=t.replace("-","").replace("+","");if(!e.includes(this.groupingSeparator))return!0;let n=e;if(this.decimalSeparator!==""&&e.includes(this.decimalSeparator)){if(e.indexOf(this.decimalSeparator)<e.indexOf(this.groupingSeparator))return!1;n=e.substring(0,e.indexOf(this.decimalSeparator))}let a=n.split(this.groupingSeparator);return a[0].length<this.groupSize&&(a=a.slice(1)),a.every(l=>l.length===this.groupSize)}validate(t){return this.groupingSeparator===""||typeof t!="string"||!t.includes(this.groupingSeparator)||this.hasCorrectGrouping(t)}get isMandatoryConstraint(){return!1}};var ri=class o extends G{static isApplicableModel(t){return"type"in t&&typeof t.type=="string"?t.type==="number"||t.type==="integer":!1}get type(){return"number"}getInitialInputValue(t){return t==null?"":this.formatValue(t)}get groupingSeparator(){return this.getContributionAsString("groupingSeparator","")}get decimalSeparator(){return this.getContributionAsString("decimalSeparator","")}get minNumber(){return this.getContributionAsNumber("minimum")}get maxNumber(){return this.getContributionAsNumber("maximum")}get maxDigits(){let t=this.format;return t!=null&&t.includes(".")?t.split(".")[1].length:0}get unit(){return this.getContributionAsString("unit","")}addConstraints(){let t=new it;return t.add(new _s(this.groupingSeparator,this.decimalSeparator,this.format)),t.add(new As(this.groupingSeparator,this.decimalSeparator,this.format??void 0)),t.add(new Cs(this.minNumber,this.maxNumber,this.groupingSeparator,this.decimalSeparator,this.format??void 0)),t}reset(){this.inputvalue=""}get format(){return this.getContributionAsString("format","0")}formatValue(t){return typeof t=="string"||typeof t=="number"?At.formatNumber(t,this.format,this.groupingSeparator,this.decimalSeparator):""}get readonlyvalue(){return(0,Hm.default)(this.value)?JSON.stringify(this.value):this.formatValue(this.value)}get inputvalue(){return this.getInputValue()}set inputvalue(t){this.setInputvalue(t),this.validate(t);let e=At.parseToNumber(t,this.groupingSeparator,this.decimalSeparator);this.value=isNaN(e)?null:At.parseNumberToString(e)}getValue(){let t=super.getValue();return t==null||t===""?null:Number(t)}update(t){return t===this.inputvalue?this:(this.updateLastModification(),this.inputvalue=t,this)}updateByAttribute(t){this.reset(),t instanceof o?this.update(t.value):console.error(`update of number attribute with ${t.type} not supported`)}get isHidden(){return super.isHidden||this.layouthint.has(Bn,Vn,qr)}set isHidden(t){super.isHidden=t}get readonlyWidth(){return"SMALL"}};var vs=class extends ri{static isApplicableModel(t){return"type"in t&&typeof t.type=="string"&&t.type==="money"?!0:"layouthint"in t&&Array.isArray(t.layouthint)?t.layouthint.includes("money"):!1}get type(){return"money"}get currencySymbol(){return this.getContributionAsString("currencySymbol","")}get prefix(){return this.currencySymbol}get readonlyWidth(){return"SMALL"}};var Gi=class{_otherPasswordLabel;_otherPasswordValue;constructor(t,e){this._otherPasswordLabel=e,this._otherPasswordValue=t}get id(){return"Constraint.Password.ConfirmMismatch"}get otherPasswordLabel(){return this._otherPasswordLabel}get otherPasswordValue(){return this._otherPasswordValue}hasValidation(){return!0}get defaultMessage(){return"Must match ${other} field"}get parameters(){return{other:this.otherPasswordLabel}}validate(t){return t===this.otherPasswordValue}get isMandatoryConstraint(){return!1}};var Ms=class{get id(){return"Constraint.Password.LowerAndUpperCaseMandatory"}hasValidation(){return!0}get defaultMessage(){return"Must contain both upper and lowercase characters"}get parameters(){return{}}validate(t){return/[a-z]/u.test(t)&&/[A-Z]/u.test(t)}get isMandatoryConstraint(){return!1}};var xs=class{_minNumeric;constructor(t){this._minNumeric=t}get id(){return"Constraint.Password.MinNumericCharactersMandatory"}get minNumeric(){return this._minNumeric}hasValidation(){return!0}get defaultMessage(){return"Must contain ${min-numeric} or more numerical characters"}get parameters(){return{"min-numeric":this.minNumeric}}validate(t){return t.replace(/\D/gu,"").length>=this.minNumeric}get isMandatoryConstraint(){return!1}};var Es=class{_minSpecial;constructor(t){this._minSpecial=t}get id(){return"Constraint.Password.MinSpecialCharactersMandatory"}get minSpecial(){return this._minSpecial}hasValidation(){return!0}get defaultMessage(){return"Must contain ${min-special} or more special characters"}get parameters(){return{"min-special":this.minSpecial}}validate(t){return t.replace(/[\da-z]/giu,"").length>=this.minSpecial}get isMandatoryConstraint(){return!1}};var Ts=class{_maxSequence;constructor(t=2){this._maxSequence=t}get id(){return"Constraint.Password.ThreeConsecutiveCharactersNotAllowed"}get maxSequence(){return this._maxSequence}hasValidation(){return!0}get defaultMessage(){return"Must not contain any character more than twice consecutively"}get parameters(){return{"max-sequence":this.maxSequence}}hasNoSequenceOfIdenticalCharacters(t){return!t.split("").filter((e,n)=>t.indexOf(e)===n).some(e=>{let n=e.repeat(this.maxSequence+1);return t.includes(n)})}validate(t){return this.hasNoSequenceOfIdenticalCharacters(t)}get isMandatoryConstraint(){return!1}};var Ss=class extends Te{_confirmValue;_isConfirmPassword=!1;_otherLabel="";static isApplicableModel(t){return t.type==="password"?!0:"layouthint"in t&&Array.isArray(t.layouthint)?t.layouthint.includes("password"):!1}get type(){return"password"}update(t){return this.updateLastModification(),this.inputvalue=t,this}get constraints(){return this.getContributionAsObject("constraints",{})}get upperAndLowerCaseMandatory(){return this.constraints.upperAndLowerCaseMandatory}get maxSequenceOfIdenticalCharacters(){return this.constraints.maxSequenceOfIdenticalCharacters}get maxSequenceOfUsernameCharacters(){return this.constraints.maxSequenceOfUsernameCharacters}get minNumberOfNumericCharacters(){return this.constraints.minNumberOfNumericCharacters}get minNumberOfSpecialCharacters(){return this.constraints.minNumberOfSpecialCharacters}get regexConstraint(){return this.constraints.regexConstraint}addConstraints(){return this.isConfirmPassword?this.getConfirmPasswordConstraints():this.getStandardPasswordConstraints()}getConfirmPasswordConstraints(){let t=new it;return t.add(new Gi(this.confirmValue,this.otherLabel)),t}getStandardPasswordConstraints(){let t=new it;return this.upperAndLowerCaseMandatory&&t.add(new Ms),this.maxSequenceOfIdenticalCharacters&&t.add(new Ts(this.maxSequenceOfIdenticalCharacters)),this.minNumberOfNumericCharacters&&t.add(new xs(this.minNumberOfNumericCharacters)),this.minNumberOfSpecialCharacters&&t.add(new Es(this.minNumberOfSpecialCharacters)),this.regexConstraint&&this.regexConstraint.length>0&&this.regexConstraint.forEach(e=>{t.add(new sr(e))}),this.layouthint.has(dl)&&this.isConfirmPassword==null&&t.add(new Gi(this.confirmValue,this.otherLabel)),t}get constraintCollection(){return this.isConfirmPassword?this.getConfirmPasswordConstraints():super.constraintCollection}get isConfirmPassword(){return this._isConfirmPassword}set isConfirmPassword(t){this._isConfirmPassword=t}get confirmValue(){return this._confirmValue??""}set confirmValue(t){this._confirmValue=t,this.validate(this.inputvalue)}get otherLabel(){return this._otherLabel}set otherLabel(t){this._otherLabel=t}validate(t){return this.useClientsideValidation()?(this.isOptionalAndEmpty(t)?this.setIsValid(!0):this.getPreviouslyValidatedValue()!==`${this.confirmValue}-${t}`&&this.setIsValid(this.constraintCollection.validate(t)),this.setPreviouslyValidatedValue(`${this.confirmValue}-${t}`),this.getIsValid()):!0}getFormData(){return this.isConfirmPassword||this.inError()?null:{[this.name]:this.value}}};var Os=class{_type;_start;_end;constructor(t,e,n){this._type=t,this._start=e,this._end=n}get type(){return this._type}get id(){switch(this.type){case"date":return"Constraint.DateRange.Mandatory";case"time":return"Constraint.TimeRange.Mandatory";case"datetime":return"Constraint.DateTimeRange.Mandatory";case"timestamp":return"Constraint.TimeStampRange.Mandatory";default:return"Constraint.Range.Mandatory"}}hasValidation(){return!0}get defaultMessage(){return"Field is mandatory: must contain at least a start or end value"}get parameters(){return{}}validate(){return this._start.hasErrors()||(this._end?.hasErrors()??!1)?!0:this._start.hasValue()||(this._end?.hasValue()??!1)}get isMandatoryConstraint(){return!0}};var Ds=class{_start;_end;constructor(t,e){this._start=t,this._end=e}get id(){let t=this.hasInclusiveBounds?"InvalidRangeInclusive":"InvalidRange";switch(this.rangeType){case"time":return`Constraint.TimeRange.${t}`;case"date":return`Constraint.DateRange.${t}`;case"datetime":return`Constraint.DateTimeRange.${t}`;case"timestamp":return`Constraint.TimeStampRange.${t}`;default:return`Constraint.NumberRange.${t}`}}get defaultMessage(){let t=this.hasInclusiveBounds?" or equal to the":"";switch(this.rangeType){case"time":return`Start time must be before${t} end time`;case"date":return`Start date must be before${t} end date`;case"datetime":return`Start value must be before${t} end value`;case"timestamp":return`Start value must be before${t} end value`;default:return`Start value must be less than${t} the end value`}}hasValidation(){return!0}get parameters(){return{}}get start(){return this._start}get end(){return this._end}get rangeType(){return this.start.type}get hasInclusiveBounds(){return this.start.operator==="greaterThanOrEqualTo"&&this.end.operator==="lessThanOrEqualTo"}getDateTimeUtil(){switch(this.rangeType){case"time":return ir;case"date":return St;case"timestamp":return Pe;default:return Ne}}doValidate(t,e){return typeof t=="number"&&typeof e=="number"?this.hasInclusiveBounds?At.isSameOrBefore(t,e):At.isBefore(t,e):typeof t=="string"&&typeof e=="string"?this.hasInclusiveBounds?this.getDateTimeUtil().isSameOrBefore(t,e):this.getDateTimeUtil().isBefore(t,e):!1}validate(){return this.start.inError()||this.end.inError()?!0:this.doValidate(this.start.value,this.end.value)}get isMandatoryConstraint(){return!1}};var ar=class o extends G{_startAttribute;_endAttribute;constructor(t,e,n){if(super(t,e,n),!Array.isArray(e?.children))throw new Error(`Problem reading contributions of range attribute: ${this.key}, the children property must be an array.`);this._startAttribute=this.createChild(0),this._endAttribute=this.createChild(1),this.setChildrenOptionality()}get start(){return this._startAttribute}get end(){return this._endAttribute}get type(){return"range"}static isApplicableModel(t){return t.type.includes("range")}getInitialChildModelLinks(){return[...this.start.getInitialChildModelLinks(),...this.end.getInitialChildModelLinks()]}setChildModels(t,e){this.start.setChildModels(t,e),this.end.setChildModels(t,e)}getInputValue(){return[this.start.getInputValue(),this.end.getInputValue()].join(",")}hasValue(){return this.start.hasValue()||this.end.hasValue()}get constraintCollection(){let t=new it;return t.add(this.getServerConstraints()),t.add(this.addConstraints()),t}setUseClientsideValidation(t){super.setUseClientsideValidation(t),this.start.setUseClientsideValidation(t),this.end.setUseClientsideValidation(t)}validate(t){if(!this.useClientsideValidation())return!0;let e=this.start.isValid&&this.end.isValid;return e&&(e=this.constraintCollection.validate(t)),this.setIsValid(e),this.getIsValid()}addConstraints(){let t=new it;return this.start.hasValue()&&this.end.hasValue()&&t.add(new Ds(this.start,this.end)),this.mandatory&&!this.start.mandatory&&!this.end.mandatory&&t.add(new Os(this.start.type,this.start,this.end)),t}get isValid(){return this.validate("")}hasServerErrors(){return this.errorCollection.serverErrors.length>0||this.start.hasServerErrors()||this.end.hasServerErrors()}hasErrors(){return this.errorCollection.hasItems()||this.start.hasErrors()||this.end.hasErrors()}reset(){this.start.reset(),this.end.reset()}mergeAttribute(t){this.concept=t.concept,t instanceof o&&(this.start.mergeAttribute(t.start),this.end.mergeAttribute(t.end))}update(t,e){if(!e)throw new P("Range attribute needs changed attribute on update call");return this.updateLastModification(),this.start.equals(e)&&this.start.update(t),this.end.equals(e)&&this.end.update(t),this.setChildrenOptionality(),this.validate(t),this}updateByAttribute(t){t instanceof o?(this.start.updateByAttribute(t.start),this.end.updateByAttribute(t.end)):console.error(`update of range attribute with ${t.type} not supported`)}get readonly(){return super.readonly??(this.start.readonly&&this.end.readonly)}set readonly(t){super.readonly=t}get readonlyvalue(){let t=[];return this.start.value!==null&&t.push(this.start.value),this.end.value!==null&&t.push(this.end.value),t.join(", ")}get initvalue(){return{[this.start.key]:this.start.initvalue,[this.end.key]:this.end.initvalue}}getFormData(){return{[this.name]:this.value}}getValue(){return{...this.start.formdata,...this.end.formdata}}get isResult(){return this._isResult}set isResult(t){this._isResult=t,this.start.isResult=t,this.end.isResult=t}indicateContentConfiguration(t){t&&(this.start.indicateContentConfiguration(t),this.end.indicateContentConfiguration(t))}equals(t){return this.key===t.key&&this.parentKey===t.parentKey||this.start.equals(t)||this.end.equals(t)}get readonlyWidth(){switch(this.start.type){case"datetime":return"LARGE";case"timestamp":return"EXTRA_LARGE";default:return"MEDIUM"}}createChild(t){let e=this.data.children?.[t];Array.isArray(e)&&(e=void 0);let n=this.contributions.children[t],[a]=Object.keys(n),l=n[a],d=_t.createAttribute(a,e??{},l,this.modelOptions);return d&&e&&"key"in e&&(d.parentKey=e.key),d}setChildrenOptionality(){let t=!this.mandatory&&this.start.value===null&&this.end.value===null;this.start&&(this.start.mandatory=t||this.start.configuredMandatory?!1:this.start.configuredMandatory),this.end&&(this.end.mandatory=t||this.end.configuredMandatory?!1:this.end.configuredMandatory)}};var Is=class{get id(){return"Constraint.XML.InvalidFormat"}hasValidation(){return!0}get defaultMessage(){return"Must be well-formed XML"}get parameters(){return{}}isValidXML(t){let e=new DOMParser;try{if(e.parseFromString(t,"text/xml").querySelectorAll("parsererror").length>0)return!1}catch{return!1}return!0}validate(t){return this.isValidXML(t)}get isMandatoryConstraint(){return!1}};var Rs=class extends Te{static isApplicableModel(t){return"type"in t&&typeof t.type=="string"&&t.type==="xml"?!0:"layouthint"in t&&Array.isArray(t.layouthint)?t.layouthint.includes("xml"):!1}get type(){return"xml"}get rows(){return 10}addConstraints(){let t=new it;return t.add(new Is),t}get readonlyWidth(){return"EXTRA_LARGE"}};var _t=class{static get ATTRIBUTE_MODELS(){return[Ve,es,us,ls,Rs,bs,Te,as,vs,ri,Ss,ei,dt,ar,rs]}static createAttribute(t,e,n,a){let l=this.getAttributeModel(n);if(!l)throw new Error("Could not find model for contributions: "+n);let d=n.children,b=new Ls(t,e,Array.isArray(d)?Ls.getChildrenKeys(d):[]).getData(),x=new l(b,n,a);return ms.setLayoutHintRules(x),x}static getAttributeModel(t){return this.ATTRIBUTE_MODELS.find(e=>e.isApplicableModel(t))}},Ls=class o{_key;_data;_value;_links;_children;constructor(t,e,n){this._key=t,this._data=this.getAttributeData(t,e),this._value=this.getValue(),this._links=this.getLinks(),this._children=this.createChildren(e,n)}get key(){return this._key}get data(){return this._data}get value(){return this._value}get links(){return this._links}get children(){return this._children}getAttributeData(t,e){return Array.isArray(e)?e.find(n=>"elementid"in n&&n.elementid===t||"name"in n&&n.name===t||"param"in n&&n.param===t)||{}:e}getValue(){let t;return this.key in this.data?t=this.data[this.key]:"values"in this.data?t=this.data.values:"value"in this.data?t=this.data.value:"suggestions"in this.data?t=this.data.suggestions:"suggestion"in this.data?t=this.data.suggestion:"options"in this.data&&Array.isArray(this.data.options)&&(t=this.data.options.filter(e=>e.selected).map(e=>e.code||e.key)),t}getDynamicschemaFromData(){if("dynamicschema"in this.data){let{dynamicschema:t}=this.data;return Array.isArray(t),t}return null}getDynamicSchema(){let t=this.getDynamicschemaFromData();if(!t)return;if(Array.isArray(t))return t;let e=this.getDynamicSchemaId();if(typeof e=="string"&&e in t&&Array.isArray(t[e]))return t[e].map(n=>"elements"in n?{...n,elements:{...n.elements,dynamicschema:t}}:n)}getDynamicSchemaId(){return typeof this.data.dynamicschemaId=="string"||typeof this.data.dynamicschemaId=="number"?this.data.dynamicschemaId:this.key}getStatic(){return typeof this.data.static=="boolean"?this.data.static:!1}getLinks(){return(0,Jl.pick)(this.data._links,["concept","download","lookupOptions","lookupList"])}getOptions(){return this.data.options}getMessage(){return this.data.message}isResult(){return typeof this.data.isResult=="boolean"?this.data.isResult:!1}getReferenceDate(){if(typeof this.data.referenceDate=="string")return this.data.referenceDate}getContent(){if("content"in this.data){let t=(0,Jl.pick)(this.data.content,["header","label","elements","layouthint","text"]);if(Object.keys(t).length>0)return t}return null}getData(){return{key:this.key,value:this.value,static:this.getStatic(),_links:this.links,dynamicschema:this.getDynamicSchema(),dynamicschemaId:this.getDynamicSchemaId(),options:this.getOptions(),message:this.getMessage(),isResult:this.isResult(),referenceDate:this.getReferenceDate(),content:this.getContent(),children:this.children}}static getChildrenKeys(t){return t.map(e=>{let[n]=Object.keys(e),a=e[n].type==="range"||e[n].type==="composite",l=e[n].dynamicschemaId,d=a?e[n]?.children:[];return{key:n,dynamicschemaId:l,children:this.getChildrenKeys(d)}})}createChildren(t,e){if(this.value===null)return e.map(l=>this.createChild(t,{[l.key]:null},l));let a=this.value;return Array.isArray(a)?a.map(l=>e.map(d=>{let b=this.childData(l,this.key,d.key);return this.createChild(t,b,d)})):e.map(l=>{let d=this.childData(t,this.key,l.key);return this.createChild(t,d,l)})}getDataContent(t,e){if(t&&e in t)return t[e]}childData(t,e,n){if(Array.isArray(t)){if(Array.isArray(this.data.elements))return this.data.elements.find(a=>a.elementid===n)}else if(e in t&&(0,_a.default)(t[e])){let a=t[e],l=this.getDataContent(t.content,n);return{...a,content:l}}else if(n in t&&(0,_a.default)(t[n]))return t[n];return(0,_a.default)(t)?t:{}}createChild(t,e,n){let a="dynamicschema"in t?t.dynamicschema:void 0,l=null;return n.dynamicschemaId?l=n.dynamicschemaId:n.key&&typeof t=="object"&&"key"in t&&typeof t.key=="string"&&(l=`${t.key}.${n.key}`),new o(n.key,{...e,dynamicschema:a,dynamicschemaId:l},n.children).getData()}};var ft=class extends Tt{constructor(t={elementid:"none"},e=[],n){super(),e.forEach(a=>{let[l,d]=Object.entries(a)[0],b=_t.createAttribute(l,t,d,{origin:n?.origin,contextPath:n?.contextPath});b!==null&&(n?.isReadonly&&!(0,Um.default)(d,"readonly")&&(b.readonly=!0),this.collection.push(b))}),this.processLayoutHintRules()}get attributes(){return this.processLayoutHintRules(),this.all}set attributes(t){this.collection=t}processLayoutHintRules(){this.all.forEach(t=>{t.processLayoutHintRules(this)})}get visible(){return this.attributes.filter(t=>!t.isHidden)}get questions(){return this.visible.filter(t=>!t.isResult)}get results(){return this.visible.filter(t=>t.isResult)}getAttributeByAttribute(t){return this.find(e=>e.equals(t)?!0:t instanceof dt?t.getChildByAttribute(e):!1)}getAttributeByKey(t){return this.find(e=>e.key===t?!0:e instanceof dt?e.getChildByKey(t):!1)}hasAttributeByKey(t){return this.getAttributeByKey(t)!=null}getAttributeByLayoutHint(...t){return this.find(e=>e.layouthint.has(...t))}getChoiceAttributeByLayoutHint(t){let e=this.getAttributeByLayoutHint(t);if(e instanceof Ve)return e}getAttributesByLayoutHint(...t){return this.filter(e=>e.layouthint.has(...t))}replace(t,e){this.replaceByKey(t.key,e)}replaceByKey(t,e){this.forEach((n,a)=>{n.key===t&&(this.collection[a]=e)})}setReferenceDate(t){this.forEach(e=>{e.referenceDate=t})}hasServerErrors(){return this.collection.some(t=>t.hasServerErrors())}addServerError(t){let e=t?.anchor?.elementid;if(e){let n=this.getAttributeByKey(e);if(n)n.addServerError(t);else throw new Qt(`Could not add error to missing attribute with id ${e}`)}}hasErrors(){return this.visible.some(t=>t.hasErrors())}updateValidations(t){return this.all.filter(e=>e.hasDynamicValidationData).forEach(e=>{let n=t.filter(a=>a.anchor?.elementid===e.key);if(e.updateValidations(n),e instanceof dt){let a=t.filter(l=>{let d=l.anchor?.elementid;return d&&d.startsWith(`${e.key}.`)});e.children.updateValidations(`${e.key}.`,a)}}),this}indicateContentConfiguration(t){t&&this.all.forEach(e=>{e.indicateContentConfiguration(t)})}get formdata(){return this.getFormData(!1)}getFormData(t=!1){let e=this.attributes.filter(a=>a.formdata!==null&&!a.readonly&&(!t||a.hasDynamicValidationData)).map(a=>a.isVisible?a.formdata:a.getEmptyFormData()),n={};return e.forEach(a=>{n={...n,...a}}),n}};var ws=class o extends q{_fieldCollection;_selfhref;_icon;constructor(t,e,n){super(t,e,n),this._fieldCollection=this.createFieldCollection(n)}static create(t,e,n,a="form",l,d){let b={name:t,href:e},x={name:t,label:n??t,type:a};return new o(b,x,{origin:l,contextPath:d})}createFieldCollection(t){let e={},n=[];return"fields"in this.data&&typeof this.data.fields=="object"&&this.data.fields!=null&&(e=this.data.fields),"fields"in this.contributions&&Array.isArray(this.contributions.fields)&&(n=this.contributions.fields),new ft(e,n,{...t,isReadonly:!0})}get isDisabled(){return!this.data.href}get selfhref(){return this._selfhref??new B(`${this.data.href}?${this.querystring}`,"Form",this.modelOptions)}set selfhref(t){this._selfhref=t}get method(){let t=this.getDataAsString("method","POST");return Nt[t]}get type(){return this.layouthint.has(Un)?"create":this.layouthint.has(Hn)?"update":this.layouthint.has(Pn)?"delete":this.getContributionAsString("type","general")}get name(){return this.getDataAsString("name","unknown")}get fields(){return this._fieldCollection.all}get fieldCollection(){return this._fieldCollection}set fieldCollection(t){this._fieldCollection=t}get querystring(){return this.fields.filter(t=>t.value!=null&&t.value!=="").map(t=>{let{value:e}=t;return e!==null?`${t.name}=${e}`:t.name}).join("&")}getFieldByKey(t){return this._fieldCollection.getAttributeByKey(t)}hasFieldByKey(t){return this.getFieldByKey(t)!=null}get key(){return this.getDataAsString("name")}get label(){return this.getContributionAsString("label",this.key)}get isProcessTask(){return(0,Bm.default)(this.contributions,"processTask")}get processStatus(){if(this.isProcessTask){let t=this.data.processStatus||{},e=this.contributions.processTask||{};return new Kr(t,e,this.modelOptions)}}get icon(){return this._icon}set icon(t){this._icon=t}};var re=class o extends K{constructor(t,e,n){super(),this.collection=this.createCollection(t,e,n)}createCollection(t,e,n){let a=[];if(t&&e&&Array.isArray(t)&&Array.isArray(e))for(let l of t){let d=e.find(b=>{if(typeof b=="object"&&b!==null&&"name"in b&&"type"in b&&"name"in l)return b.name===l.name&&b.type!=="service-operation"});d&&a.push(new ws(l,d,n))}return a}getActionByKey(t){let e=new o;return e.collection=this.filter(n=>n.key===t),e.first}getActionsByType(t){let e=new o;return e.collection=this.filter(n=>Array.isArray(t)?t.includes(n.type):n.type===t),e}getActionsByLayoutHint(...t){let e=new o;return e.collection=this.filter(n=>n.layouthint.has(...t)),e}hasActionsByLayoutHint(...t){return this.getActionsByLayoutHint(...t).length>0}get routePath(){let t=this.collection.filter(n=>!n.isDisabled);if(t.length===0)return"__NON_EXISTING_ROUTE__";let e=t.map(n=>n.selfhref.path).join("|");return this.length>1?`(${e})`:e}};var je=class extends F{get type(){return"User"}get username(){return this.getDataAsString("Username","Guest")}get fullname(){return this.getDataAsString("Fullname","Guest")}};var ii=class extends F{_user;_mustChangePassword=!1;get type(){return"UserServices"}getInitialChildModelLinks(){let t=this.userLink;return t?[t]:[]}setChildModels(t,e){this.user=t.find(n=>n instanceof je)}get userLink(){return this.links.getLinkByKey("Userdata")}get user(){return this._user}set user(t){this._user=t}get changePassword(){return this.links.getLinkByKey("ChangePassword")?.href}get isLoggedIn(){let t=this.user instanceof je;return this.links.length>3||t||ot.getItem("basic-ok")===!0}set mustChangePassword(t){this._mustChangePassword=t}get mustChangePassword(){return this._mustChangePassword}};var ks=class extends F{_userServices;constructor(t){super(t),ot.setItem("primaryAuthenticationType",this.primaryAuthenticationType)}get type(){return"Application"}get tabs(){return this.links.getLinksByGroup("tab")}get modelcatalog(){return ve.create("modelcatalog","/modelcatalog","Model catalog",this.modelOptions)}get userServices(){return this._userServices}set userServices(t){this._userServices=t}get user(){return this.userServices?.user}get userHref(){return this.userServices?.userLink?.href}getInitialChildModelLinks(){let t=this.links.getLinkByKey("UserServices");if(t&&t.href.path==="/login")throw new In("The user service (Login panel) should not have the uri '/login', use a different URI because this uri matches the login service.");return t?[t]:[]}setChildModels(t,e){this.userServices=t.find(n=>n instanceof ii)}get isLoggedIn(){return this.userServices?.isLoggedIn??!1}get userMustChangePassword(){return this.userServices?.mustChangePassword??!1}get authenticationTypes(){let t=this.getContributionAsArray("security",[ra]);return t?t?.sort((e,n)=>e.isPrimary===n.isPrimary?0:e.isPrimary?-1:1):[ra]}get primaryAuthenticationType(){return this.authenticationTypes[0]}};var Vm=Y(te(),1);var Sr=class o extends q{_key;_attributeCollection;constructor(t="",e,n,a){super(e,n,a);let l=this.contributions.attributes?this.contributions.attributes.filter(d=>{let[b]=Object.keys(d);return(0,Vm.has)(this.data,b)}):[];this._attributeCollection=new ft(this.data,l,{...a,isReadonly:!0}),this._key=t}get key(){return this._key}set key(t){this._key=t}get label(){return this.contributions.label}get attributeCollection(){return this._attributeCollection}set attributeCollection(t){this._attributeCollection=t}createChildAttributeSetModel(t,e,n){let a=this.contributions.objects;return new o(n?`${t}-${n+1}`:t,{...e,dynamicschema:this.data.dynamicschema},a?.[t],this.modelOptions)}getChildAttributeSets(){if(!this.contributions.objects)return[];let t=[];for(let e of Object.keys(this.contributions.objects))if(e in this.data){let n=this.data[e];if(Array.isArray(n))for(let[a,l]of n.entries())t.push(this.createChildAttributeSetModel(e,l,a));else t.push(this.createChildAttributeSetModel(e,n))}return t}};var Se=class o extends F{_attributeCollection;_metadataCollection;_actionCollection;constructor(t){super(t),this._attributeCollection=this.createAttributeCollection(),this._metadataCollection=this.createMetadataCollection(),this._actionCollection=this.createActionCollection()}get type(){return"Detail"}getInitialChildModelLinks(){return this._attributeCollection.getInitialChildModelLinks()}setChildModels(t,e){this._attributeCollection.setChildModels(t,e)}get id(){let t=this.getDataAsNumber("_id");return t||this.getDataAsString("_id",this.key)}get label(){return this.getContributionAsString("label","")}createAttributeCollection(){let t=this.getContributionAsArray("attributes",[]).filter(e=>{let[n]=Object.keys(e);return n in this.data});return new ft(this.data,t,{...this.modelOptions,isReadonly:!0})}get attributeCollection(){return this._attributeCollection}set attributeCollection(t){this._attributeCollection=t}get attributes(){return this.attributeCollection.all.filter(t=>!t.layouthint.has(Mr)&&!t.isHidden)}getAttributeByKey(t){return this._attributeCollection.getAttributeByKey(t)}createMetadataCollection(){let t=this.getContributionAsObject("metadata",{}),e=Object.entries(t).map(([n,a])=>({[n]:a}));return new ft(this.data,e,{...this.modelOptions,isReadonly:!0})}get metadataCollection(){return this._metadataCollection}set metadataCollection(t){this._metadataCollection=t}createActionCollection(){let t=this.getDataAsArray("actions",[]),e=this.getContributionAsArray("actions",[]);return new re(t,e)}get actionCollection(){return this._actionCollection}set actionCollection(t){this._actionCollection=t}get isCase(){return this.getContributionAsString("resourcetype")==="CaseView"}get titleAttribute(){return this._attributeCollection.getAttributeByLayoutHint(Mr)}update(t){if(t instanceof o){let e=new o(t.modularuiResponse);return e.attributeCollection=t.attributeCollection,e.metadataCollection=t.metadataCollection,e.actionCollection=t.actionCollection,e}return this}equals(t){return this.id?.toString()===t.id?.toString()}};var ur=class extends K{hasTasks(){return this.collection.some(t=>t.hasTasks())}};var $t=class o extends F{_actionCollection;constructor(t){super(t);let e=this.data.actions&&Array.isArray(this.data.actions)?this.data.actions:[],n=this.contributions.actions&&Array.isArray(this.contributions.actions)?this.contributions.actions:[];this._actionCollection=new re(e,n);try{let a=this.selflink.href.href;a&&(this.key=a.substring(a.lastIndexOf("/")+1))}catch{this.key=this.getDataAsString("name","unknown")}}static create(t,e,n,a){let l=new Pt;return l.key=t,l.data=e,l.contributions=n,l.origin=a?.origin,l.contextPath=a?.contextPath,new o(l)}get type(){return"TaskGroup"}hasTasks(){return this.actionCollection.length>0}get actionCollection(){return this._actionCollection}};var Fs=class extends Se{_taskGroupCollection;constructor(t){super(t),this._taskGroupCollection=this.createTaskGroupCollection()}get type(){return"CaseView"}getInitialChildModelLinks(){return this.links.getLinksByGroup("taskgroup").all}get panelLinks(){return this.links.getLinksByGroup("panel")}setChildModels(t,e){super.setChildModels(t,e);let n=t.filter(a=>a instanceof $t);this.taskGroupCollection.add(n)}get casename(){return this.attributeCollection.getAttributeByLayoutHint(Mr)}get label(){return this.casename?.readonlyvalue||""}get viewLabel(){return this.getContributionAsString("label","")}hasIntroText(){return this.introtext!==""}get introtext(){let t=this.data._content;if(t&&"text"in t&&typeof t.text=="object"&&t.text!=null&&"message"in t.text)return t.text.message;let e=this.contributions;return e.text?typeof e.text=="object"&&"message"in e.text&&typeof e.text.message=="string"?e.text.message:e.text:Array.isArray(e.texts)?e.texts[0].text:""}get selfhref(){let t=this.links.getLinkByKey("self");if(t==null)throw new J("No self href available");return t.href}createTaskGroupCollection(){let t=this.getDataAsArray("taskgroups",[]),e=this.getContributionAsArray("taskgroups",[]),n=[];for(let a of t){let l=a.name,d=e.find(b=>b.name===l);if(d){let b=$t.create(l,a,d,this.modelOptions);n.push(b)}}return new ur(n)}set taskGroupCollection(t){this._taskGroupCollection=t}get taskGroupCollection(){return this._taskGroupCollection}hasTaskGroups(){return this.taskGroupCollection&&this.taskGroupCollection.hasItems()}};var qi=class extends q{_context;_listKey;constructor(t,e,n){super(t,e,n),this._listKey=this.getContributionAsString("listKey")}get key(){return this.getDataAsString("name","")}get type(){return this.getContributionAsString("type","string").replace("filter","")}get parameterType(){return this.getContributionAsString("parameterType")==="bodyParameter"?"bodyParameter":"queryParameter"}get name(){return this.listkey?this.listkey+jr+this.param:this.param}get param(){return this.getDataAsString("param")??this.getDataAsString("name","")}get isMultiple(){return this.getContributionAsBoolean("multiplechoice",!1)}get context(){return this._context}set context(t){this._context=t}setContext(t){this._context=t}get contextid(){return this.getContributionAsString("contextid","")}get contextLabel(){return this.context?.label??""}get listkey(){return this._listKey}set listkey(t){this._listKey=t}get label(){return this.getContributionAsString("label","")}isQuickSearch(){return this.getContributionAsBoolean("quicksearch",!1)}get assistantMessage(){return this.getContributionAsString("assistant")}};var Rt=class extends qi{_attribute;constructor(t,e,n){super(t,e,n),this._attribute=this.createAttribute(this.type,this.param||"",this.data,this.contributions)}get attribute(){return this._attribute}get params(){return this.param?[{name:this.param,value:this.attribute?.value}]:[]}get value(){return this.attribute?.value}get inputvalue(){return this.attribute?.inputvalue??""}hasValue(){return this.value!==null&&this.value!==""}getAttributeType(t){switch(t){case"choice":return"choice";case"date":return"date";case"datetime":return"datetime";case"daterange":case"datetimerange":return"range";case"number":case"numberrange":return"range";default:return"string"}}getChildType(t){switch(t){case"daterange":return"date";case"datetimerange":return"datetime";case"numberrange":return"number";default:return"string"}}createAttribute(t,e,n,a){if(t==="assignment")return;let l=this.getAttributeType(t),d={...a,type:l};if(l==="range"&&"children"in d&&Array.isArray(d.children)){let b=this.getChildType(t);d.children=d.children.map(x=>{let D=Object.keys(x)[0];return{[D]:{...x[D],type:b}}})}return _t.createAttribute(e,n,d,this.modelOptions)}reset(){return this.attribute?.reset(),this}update(t,e){this.attribute?.update(e)}isActive(){return this.attribute?.initvalue!=null}get isValid(){return this.attribute?.isValid??!1}get readonlyvalue(){return this.attribute?.readonlyvalue??""}get formdata(){return this.attribute?.formdata??null}};var lr=class extends Rt{constructor(t,e,n){if(super(t,e,n),t&&"options"in t&&t.options&&Array.isArray(t.options)){let a=t.options.filter(l=>l.selected).map(l=>l.key);t.options.forEach(l=>{this.attribute?.options.addOption(a,{code:l.key,label:l.key})})}}};var ni=class extends qi{_assignmenttype;_user;constructor(t,e,n){super(t,e,n),this._assignmenttype=this.createAssignmentTypeModel(),this._user=this.createUserModel()}createAssignmentTypeModel(){let t=`${this.contextid}ASSIGNMENTTYPE`,e=this.data[t];if(typeof e>"u")throw new J(`Missing assignment type data for ${t}`);let n=this.data.dynamicschema;n&&(e.dynamicschema={[t]:n[t]});let l={...this.contributions[t],enumerated:!0,optionMode:e._links?"lookup":"static",type:"choice"},d=e.name||e.param;return _t.createAttribute(d,e,l,this.modelOptions)}createUserModel(){let t=`${this.contextid}USERKEY`,e=this.data[t],n=this.data.dynamicschema;n&&n[t]&&(e.dynamicschema={[t]:n[t]});let l={...this.contributions[t],optionMode:e._links?"lookup":"static",type:"choice"},d=e.name||e.param;return _t.createAttribute(d,e,l,this.modelOptions)}get assignmenttype(){return this._assignmenttype}get user(){return this._user}get params(){return this.assignmenttype&&this.user?[{name:this.assignmenttype.name,value:this.assignmenttype.value},{name:this.user.name,value:this.user.value}]:[]}get value(){return{[this.assignmenttype.name]:this.assignmenttype.value,[this.user.name]:this.user.value}}get inputvalue(){return{[this.assignmenttype.name]:this.assignmenttype.inputvalue,[this.user.name]:this.user.inputvalue}}hasValue(){return this.assignmenttype.value!==null&&this.assignmenttype.value!==""||this.user.value!==null&&this.user.value!==""}reset(){return this.assignmenttype&&this.assignmenttype.reset(),this.user&&this.user.reset(),this}update(t,e){this.user!=null&&this.user.key===t.key?this.user.update(e):this.assignmenttype!=null&&this.assignmenttype.key===t.key&&this.assignmenttype.update(e)}isActive(){return this.assignmenttype!=null&&this.assignmenttype.initvalue!==null||this.user!=null&&this.user.initvalue!==null}get isValid(){return this.assignmenttype!=null&&this.assignmenttype.isValid&&this.user!=null&&this.user.isValid}get readonlyvalue(){return{[this.assignmenttype.name]:this.assignmenttype.readonlyvalue,[this.user.name]:this.user.readonlyvalue}}get formdata(){return this.value}};var si=class extends Rt{update(t,e){this.attribute instanceof ar?this.attribute.update(e,t):super.update(t,e)}get params(){return this.attribute?[{name:this.attribute.start.name,value:this.attribute.start.value},{name:this.attribute.end.name,value:this.attribute.end.value}]:[]}};var Ns=class extends Rt{_isValid=!0;_value;_inputvalue;constructor(t,e,n){if(super(t,e,n),this.attribute){let a=this.getDataAsString("value","");this.update(this.attribute,a)}this._inputvalue=this._value??""}get params(){return this.param?[{name:this.param,value:this.removeFormat(this.value??"")}]:[]}get value(){return this._value}get inputvalue(){return this._inputvalue}reset(){return this._inputvalue="",this._value=void 0,this}get isValid(){return this._isValid}update(t,e){if(this._isValid=!0,this._inputvalue=typeof e!="string"?String(e):e,this.shouldHandleFormat()){let n=this.isMultiple?this._inputvalue.split(",").map(l=>l.trim()):[this._inputvalue.trim()],a=[];for(let l of n){let d=this.formatValue(l);d!==""&&(a.push(d),this.attribute?.validate(d)||(this._isValid=!1))}this._value=a.join(",")}else this._value=e}get operator(){return this.getContributionAsString("operator","")}formatValue(t){return this.shouldHandleFormat()?this.attribute?.formatValue(t)||"":t}isBSN(){return this.layouthint.has("bsn")}isIBAN(){return this.layouthint.has("iban")}isZipcode(){return this.layouthint.has("zipcode")}removeFormat(t){return t==null||t.toString()===""?"":typeof t=="string"&&this.shouldHandleFormat()?t.replace(/[^a-z0-9,]/gi,""):t}shouldHandleFormat(){return(this.operator==="exactly"||this.operator==="isNot")&&(this.isIBAN()||this.isZipcode()||this.isBSN())}get formdata(){return{[this.param]:this.value}}};var oi=class{static createFilter(t,e,n,a){let l=n.type??"stringfilter";return l==="choicefilter"&&t==="index"?new lr(e,n,a):l.includes("rangefilter")?new si(e,n,a):l==="assignmentfilter"?new ni(e,n,a):l==="stringfilter"?new Ns(e,n,a):new Rt(e,n,a)}static setListKey(t,e){"listkey"in e&&typeof e.listkey=="string"&&(t.listkey=e.listkey)}static setFilterContext(t,e,n){if(n.contexts){let a=n.contexts.find(l=>l.id===e);a&&(t.context=a)}}};var Lt=class extends K{constructor(t={},e,n){super(),this.collection=this.createCollection(t,e,n)}createCollection(t,e,n){let a=[];if(e&&"filter"in e&&Array.isArray(e.filter))for(let l of e.filter){let[d]=Object.keys(l),b=t[d],x=l[d],D=oi.createFilter(d,b,x,{origin:n?.origin,contextPath:n?.contextPath});oi.setListKey(D,e),x.contextid&&oi.setFilterContext(D,x.contextid,e),a.push(D)}return a}reset(){return this.collection=this.collection.map(t=>t.reset()),this}checkRangeFilterByAttributeKey(t,e){let n=t.attribute;if(n instanceof ar){let a=n.start,l=n.end;return n.key===e||a?.name===e||l?.name===e}return!1}checkAssignmentFilterByAttributeKey(t,e){return t.key===e||t.user?.key===e||t.assignmenttype?.key===e}getFilterByName(t){return this.find(e=>e.name===t)||null}getFilterByAttributeKey(t){return this.find(e=>e instanceof si?this.checkRangeFilterByAttributeKey(e,t):e instanceof ni?this.checkAssignmentFilterByAttributeKey(e,t):e instanceof Rt?e.attribute?.key===t:!1)}update(t,e){let n=t.parentKey?this.getFilterByAttributeKey(t.parentKey):this.getFilterByAttributeKey(t.key);if(!n)throw new Error(`Can not find filter by attribute key: ${t.key}`);n.update(t,e),this.collection=this.collection.map(a=>a.name===n.name?n:a)}get isValid(){return this.collection.every(t=>t.isValid)}hasActiveFilters(){return this.collection.some(t=>t.isActive())}getActiveFilters(){return this.collection.filter(t=>t.isActive())}get formdata(){let t=this.filter(e=>e.parameterType==="bodyParameter"&&e.hasValue()&&e.formdata);return t.length===0?null:t.reduce((e,n)=>Object.assign(e,n.formdata),{})}};var Ps=class extends Tt{};var Hs=class extends F{_filterCollection;_concepts;constructor(t){super(t),this._filterCollection=new Lt(this.data.filter,{filter:this.contributions.filter,dynamicschema:this.data.dynamicschema},this.modelOptions),this._concepts=new Ps,this._concepts.collection=this.data._embedded?this.data._embedded.results.map(e=>new zr(e.concept,this.entryDate,this.modelOptions)):[]}get type(){return this.resourcetype.toLowerCase()==="relatedconcepts"?"RelatedConcepts":"ConceptIndex"}getInitialChildModelLinks(){return this.items.getInitialChildModelLinks()}setChildModels(t,e){this.items.setChildModels(t,e)}get selfhref(){let{href:t}=this.selflink;return this.filterCollection.hasItems()&&this.filterCollection.forEach(e=>{e.params.forEach(n=>{n.value?t.setParameter(n.name,n.value):t.removeParameter(n.name)})}),t}get label(){return this.getContributionAsString("label","")}get filterCollection(){return this._filterCollection}get indexfilter(){let t=this.filterCollection.getFilterByAttributeKey("index");if(t instanceof lr)return t}get entryDate(){let e=this.filterCollection.getFilterByAttributeKey(et)?.value;if(typeof e=="string")return e}get searchtermfilter(){let t=this.filterCollection.getFilterByAttributeKey("label");return t instanceof Rt?t:null}get modelCategoryFilter(){let t=this.filterCollection.getFilterByAttributeKey("modelCategory");return t instanceof Rt?t:null}get items(){return this._concepts}set items(t){this._concepts=t}};var Us=class extends Tt{};var Bs=class extends F{_filterCollection;_content;constructor(t){super(t),this._filterCollection=new Lt(this.data.filter,{filter:this.contributions.filter,dynamicschema:this.data.dynamicschema},this.modelOptions),this._content=new Us,this._content.collection=this.data._embedded?this.data._embedded.results.map(e=>new Ht(e.content,void 0,this.modelOptions)):[]}get type(){return"ContentIndex"}getInitialChildModelLinks(){return this.items.getInitialChildModelLinks()}setChildModels(t,e){this.items.setChildModels(t,e)}get selfhref(){let t=this.selflink.href;return this.filterCollection.forEach(e=>{e.params.forEach(n=>{n.value?t.setParameter(n.name,n.value):t.removeParameter(n.name)})}),t}get label(){return this.getContributionAsString("label","unknown")}get filterCollection(){return this._filterCollection}get indexfilter(){let t=this._filterCollection.getFilterByAttributeKey("index");return t instanceof lr?t:null}get items(){return this._content}hasIndexFilter(){let t=this.indexfilter?.attribute;return t instanceof Ve&&t.options.length>0}hasFiltersSet(){return this.filterCollection.some(t=>t.isActive())}hasNoFiltersSet(){return!this.hasFiltersSet()}getFirstCharHref(){let t=this.indexfilter?.attribute,e="#";return t instanceof Ve&&(e=t.options.filter(n=>n.code!=="0")[0].code),new B(this.selfhref).addParameter("index",e)}};var ai=class extends F{_section;_contentType;_filterCollection;constructor(t){super(t),this._filterCollection=new Lt(this.data.filter,{filter:this.contributions.filter},this.modelOptions),this._section=new xe(this.data,this.entryDate,this.modelOptions)}get type(){return"Content"}getInitialChildModelLinks(){let t=this.links.getLinkByKey("contenttype");return t?[t]:[]}setChildModels(t,e){this.contentType=t.find(n=>n instanceof pe)}get section(){return this._section}get id(){return this.data._id}get filterCollection(){return this._filterCollection}get entryDate(){let e=this.filterCollection?.getFilterByAttributeKey(et)?.value;if(typeof e=="string")return e}get contentType(){return this._contentType}set contentType(t){this._contentType=t}get label(){return this.section.label}get number(){return this.section.number}get body(){return this.section.body}get childSectionLinks(){return this.section.childSectionLinks}get selfContentLink(){return this.section.selfContentLink}get childSections(){return this.section.childSections}set childSections(t){this.section.childSections=t||[]}get subSections(){return this.section.subSections}get relatedConceptsHrefs(){let t=[];return this.relatedConceptsHref&&t.push(this.relatedConceptsHref),this.subSections.forEach(e=>{t.push(...e.relatedConceptsHrefs)}),t}get relatedConceptsHref(){let t=this.links.getLinkByKey("relatedConcepts");if(t){let{href:e}=t;return e.addParameter("entryDate",this.entryDate),e.setReferenceHash(this.referenceHash),e}return null}get referenceHash(){return this.section.referenceHash}};var Vs=class extends F{_contentType;_filterCollection;constructor(t){super(t),this._filterCollection=new Lt(this.data.filter,{filter:this.contributions.filter},this.modelOptions)}get type(){return"ContentTOC"}getInitialChildModelLinks(){let t=this.links.getLinkByKey("contenttype");return t?[t]:[]}setChildModels(t,e){this.contentType=t.find(n=>n instanceof pe)}get label(){return this.getDataAsString("label","")}get abbreviation(){return this.getDataAsString("abbreviation")}get selfhref(){let t=new B(this.selflink.href);return this.filterCollection.forEach(e=>{e.params.forEach(n=>{n.value?t.setParameter(n.name,n.value):t.removeParameter(n.name)})}),t}get relatedConceptsHref(){let t=this.links.getLinkByKey("relatedConcepts");if(t){let{href:e}=t;return e.addParameter("entryDate",this.entryDate),e}}get selfContentLink(){return new Ht(this.data,this.entryDate,this.modelOptions)}getItems(t){return t.map(e=>{let n=new Ht(e,this.entryDate,this.modelOptions);return typeof e.items<"u"&&(n.items=this.getItems(e.items)),n})}getSectionItems(t){return t.map(e=>{let n=new Ht(e,this.entryDate,this.modelOptions);return typeof e.sections<"u"&&(n.items=this.getItems(e.sections)),n})}get items(){return Array.isArray(this.data.items)?this.getItems(this.data.items):Array.isArray(this.data.sections)?this.getSectionItems(this.data.sections):[]}get sections(){return this.data.sections?this.data.sections.map(e=>new xe(e,this.entryDate,this.modelOptions)):[]}get categories(){return Array.isArray(this.data.categories)?this.data.categories.map(t=>new Ht(t,void 0,this.modelOptions)):[]}get contentType(){return this._contentType}set contentType(t){this._contentType=t}get filterCollection(){return this._filterCollection}get entryDate(){let e=this.filterCollection.getFilterByAttributeKey(et)?.value;if(typeof e=="string")return e}get isCompleteSource(){return this.filterCollection.getFilterByAttributeKey("complete")?.value==="true"}};var jm=require("immer");var ui=class{_configuration;_layouthint;_calculatedResults;_positiveResults;_negativeResults;_results;constructor(t){this._configuration=t||null,this._layouthint=new ut(t?.layouthint),this._calculatedResults=new It(t?.calculatedResultElements),this._positiveResults=new It(t?.positiveResultElements),this._negativeResults=new It(t?.negativeResultElements),this._results=new It(t?.resultElements)}get label(){return this._configuration?.label}get description(){let t=this._configuration?.description;return typeof t=="object"&&"message"in t?t.message:t}get layouthint(){return this._layouthint}get attributes(){return this._configuration===null?[]:[...this._configuration.attributes,...this.layouthint.all.filter(t=>t.includes("attribute:")).map(t=>t.substring(10))]}get calculatedResultElements(){return this._calculatedResults}get positiveResultElements(){return this._positiveResults}get negativeResultElements(){return this._negativeResults}get resultElements(){return this._results}};var js=class{_configuration;constructor(t){this._configuration=t||[]}get config(){return this._configuration.filter(t=>{let[e]=Object.keys(t);return e==="decisionResult"||e==="classificationResult"||e==="calculatorResult"}).map(t=>{let[e]=Object.keys(t);return new ui(t[e])})}};var Ws=class{_question;_options;_answers;constructor(t){this._question=new It(t.questionElements),this._options=new It(t.optionElements),this._answers=new It(t.givenAnswerElements)}hasConfig(){return this._question.hasConfig()||this._options.hasConfig()||this._answers.hasConfig()}get question(){return this._question}get options(){return this._options}get answers(){return this._answers}};var li=class{[jm.immerable]=!0;_questions;_intermediateResults;_endResults;constructor(t){this._questions=this.createQuestionConfiguration(t),this._intermediateResults=this.createIntermedidateResultsConfiguration(t),this._endResults=this.createEndResultsConfiguration(t)}createQuestionConfiguration(t){if(t&&"questions"in t&&typeof t.questions=="object")return new Ws(t.questions)}createIntermedidateResultsConfiguration(t){if(t&&"intermediateResults"in t&&typeof t.intermediateResults=="object")return new ui(t.intermediateResults)}createEndResultsConfiguration(t){if(t&&"results"in t&&typeof t.results=="object")return new js(t.results)}get questions(){return this._questions}isConfiguredIntermediateResultAttribute(t){return this.intermediateResults?.attributes.includes(t)??!1}get intermediateResults(){return this._intermediateResults}isConfiguredEndResultAttribute(t){return this.endResults?this.endResults?.config.some(e=>e.attributes.includes(t)):!1}get endResults(){return this._endResults}};var Wm=require("immer");var ci=class{[Wm.immerable]=!0;_originalError;_connectKey;_modelOptions;constructor(t,e,n){this._originalError=t,this._connectKey=e,this._modelOptions=n}set connectKey(t){this._connectKey=t}get connectKey(){return this._connectKey}get origin(){return this._modelOptions?.origin||""}get contextPath(){return this._modelOptions?.contextPath||rt()}get error(){return this._originalError}get status(){let n=this.error;return"status"in n?parseInt(n.status,10):0}get id(){return this.isResourceNotFound&&"id"in this.error&&this.error.id!=="Error.NotAuthorized"?"Error.ResourceNotFound":"id"in this.error&&typeof this.error.id=="string"?this.error.id:this.error.name||"Error.GeneralError"}get message(){let t=this.error;return"message"in t?t.message:this.id}get responseMessage(){return this.response&&"message"in this.response?this.response.message:""}get title(){return this.response&&"title"in this.response?this.response.title:{id:""}}get titleMessage(){if("title"in this.error)return this.error.title?.message}get titleId(){return this.response?.title?.id}get titleProperties(){return this.response?.title?.properties}get redirect(){return this.response?.redirect}get redirectText(){if(this.redirect&&"text"in this.redirect)return this.redirect?.text}get redirectTextID(){return this.redirectText?.id}get redirectTextProperties(){return this.redirectText?.properties}get redirectMessage(){return this.redirectText?.message}get redirectHref(){if(this.redirect&&"href"in this.redirect){let t=this.redirect?.href;if(t)return new B(t)}}get layouthint(){return this.response&&Array.isArray(this.response.layouthint)?new ut(this.response.layouthint):new ut}get response(){let t=this.error;if("response"in t&&typeof t.response=="object")return t.response}get properties(){let t=this.error;if("properties"in t)return t.properties}get parameters(){let t=this.error;if("parameters"in t)return t.parameters}get isResourceNotFound(){return this.status===404}get isResourceNotFoundAfterReload(){let t=this.error;return"isReload"in t&&typeof t.isReload=="boolean"?this.isResourceNotFound&&t.isReload:!1}get isUnauthorized(){let e=this.status===401,n=this.id==="Error.NotAuthorized"||this.id==="Error.Authentication.Required"||this.id==="Error.Authentication.InvalidCredentials",a=this.error,l="action"in a&&typeof a.action=="object"&&a.action!==null&&"name"in a.action&&a.action.name==="login";return e||n||l}get isChangePassword(){return this.id==="Error.ChangePasswordRequired"}get isConcurrentUser(){return this.id==="Error.Authentication.ConcurrentUser"}get isConcurrentError(){return this.id==="Error.Case.ConcurrentModification"||this.id==="Error.DataStore.ConcurrentModification"||this.id==="Error.DataStore.RecordAlreadyExists"||this.id==="Error.DataStore.RowCannotBeLocked"}get isBlocked(){return this.id==="Error.Authentication.BlockedUser"}get isInvalidCredentials(){return this.id==="Error.Authentication.InvalidCredentials"}get isInvalidUsername(){return this.id==="Error.Authentication.InvalidUsername"}get isTimeoutError(){return this.id==="Error.CodemapLookup.InvalidToken"}get isRemoteServiceException(){return this.id==="Error.RemoteServiceException"}get changePasswordHref(){let t=this.properties;if(t&&"redirect"in t)return new B(t.redirect)}get isBasicAuthentication(){let e=this.error;return"error"in e?this.isUnauthorized&&this.status===401&&e.error==="No responseText":!1}get loginFailed(){return this.id==="Error.Authentication.Required"||this.id==="Error.Authentication.InvalidCredentials"}get shouldThrowOnServer(){return!this.isChangePassword&&!this.isBlocked&&!this.isConcurrentUser}};var eg=Y(require("deepmerge"),1),Gs=Y(te(),1),rg=Y(tg(),1);var Yl=Y(te(),1);var Or=class o extends q{_attributeCollection;_contentConfiguration;_errorCollection;_repeatIndex;_dynamicValidationsLoaded=!1;constructor(t,e,n){super(t,e,n),t&&this.getElements().length>0?this._attributeCollection=new ft(this.getElements(),this.getApplicableAttributeContributions(),{...n,isReadonly:!1}):this._attributeCollection=new ft,this._contentConfiguration=new li(e?e.content:{}),this._errorCollection=new fe("formobject");let a=this.getDataAsString("referenceDate");a&&this.attributeCollection.setReferenceDate(a),this.attributeCollection.indicateContentConfiguration(this.contentConfiguration)}static createEmpty(t){if(!t)throw new P("createEmpty method needs a FormObjectModel as input argument to create a new version of the object");return new o(t.data,t.contributions,t.modelOptions)}equals(t,e=!0){if(!t||this.key!==t.key)return!1;let n=this.attributeCollection.all.filter(l=>!l.isResult).some(l=>t&&t.attributeCollection.hasAttributeByKey(l.key));return(e?this.repeatIndex===t.repeatIndex:!0)&&n}getAttributeByAttribute(t){return this.attributeCollection.getAttributeByAttribute(t)}getAttributeByKey(t){return this.attributeCollection.getAttributeByKey(t)}hasAttributeByKey(t){return this.attributeCollection.hasAttributeByKey(t)}getElements(){let t=[];if(Array.isArray(this.data.elements)&&t.push(...this.data.elements),Array.isArray(this.data.results)){let e=this.data.results.map(n=>({...n,isResult:!0}));t.push(...e)}return this.data.elementid&&t.push({...this.data}),t}getApplicableAttributeContributions(){if(this.data&&this.contributions){let t=this.getElements().map(n=>n.elementid),e=this.getAttributesInData(t,this.contributions.attributes);return this.isDynamic?e.map(n=>{let[a]=Object.keys(n);return{[a]:{...n[a],mandatory:!0}}}):e}return[]}getAttributesInData(t,e=[]){return e.filter(n=>{let[a]=Object.keys(n);return t.some(l=>l.split(".")[0]===a)})}getInitialChildModelLinks(){return this._attributeCollection.getInitialChildModelLinks()}setChildModels(t,e){this._attributeCollection.setChildModels(t,e)}get key(){return this.data.objectid||"unknown"}get contentConfiguration(){return this._contentConfiguration}get hasEndResultConfiguration(){return this.contributions.content?.results!=null}get isDynamic(){return this.getContributionAsBoolean("dynamicObject",!1)}get hasDynamicValidations(){return this.getContributionAsBoolean("dynamicValidations",!1)}get isRepeatable(){return this.getContributionAsBoolean("repeatable",!1)}get repeatIndex(){return this._repeatIndex??this.data.index??1}set repeatIndex(t){this._repeatIndex=t}get maxRepeats(){return this.isRepeatable?this.getDataAsNumber("numberofrepeats",-1):1}get hasFixedNrOfRepeats(){return this.maxRepeats>-1}get isRepeatWithUnknownTotal(){return this.isRepeatable&&this.maxRepeats===-1}get isLastRepeat(){return this.isRepeatable?this.getDataAsBoolean("last",!1):!0}get repeatIndexLabel(){return this.getDataAsString("index-identifier")}get label(){return this.getContributionAsString("label")}get introText(){if(typeof this.data.content=="object"&&this.data.content!=null&&"text"in this.data.content){let{message:t}=this.data.content.text;return t}return this.contributions.text?.message?this.contributions.text.message:this.contributions.introText}get assistent(){return this.contributions.assistent}get buttonLabels(){return this.getContributionAsObject("buttonLabels",{})}get attributeCollection(){return this._attributeCollection}set attributeCollection(t){this._attributeCollection=t}mergeObject(t){this.attributeCollection.forEach(e=>{let n=t.getAttributeByAttribute(e);n&&e.mergeAttribute(n)}),this.repeatIndex=t.repeatIndex}updateAttribute(t,e){let n=this.attributeCollection.getAttributeByAttribute(t);if(n==null)throw new Error(`Attribute with name: ${t.name} not found.`);return n instanceof dt?n.update(e,t):n.update(e),n}isChangedSince(t){return this.attributeCollection.find(e=>e.isChangedSince(t))!=null}resetErrors(){this._errorCollection.clear(),this.attributeCollection.forEach(t=>t.resetErrors())}get errorCollection(){return this._errorCollection}addServerError(t){t.anchor?.elementid!=null?this.attributeCollection.addServerError(t):this._errorCollection.addServerError(t.id,t.message,t.properties,t.layouthint)}hasServerErrors(){return this.errorCollection.hasItems()||this.attributeCollection.hasServerErrors()}hasErrors(){return this.errorCollection.hasItems()||this.attributeCollection.hasErrors()}get isValid(){return this.attributeCollection.visible.every(t=>t.isValid)&&!this.errorCollection.hasItems()}get dynamicValidationsLoaded(){return this._dynamicValidationsLoaded}set dynamicValidationsLoaded(t){this._dynamicValidationsLoaded=t}handleErrorValidations(t){let e=[];t.filter(n=>n.anchor?.objectid===this.key).forEach(n=>{(0,Yl.has)(n.anchor,"elementid")?e.push(n):this.errorCollection.addServerError(n.id,n.message,n.properties,new ut(n.layouthint))}),this.attributeCollection.updateValidations(e)}handleMissingValidations(t,e){let n=[];for(let a of t.anchors)if(!a.objectid||a.objectid===this.key)if(Array.isArray(a.elements))for(let l of a.elements)n.push({anchor:{objectid:l.objectid||"",elementid:l.elementid},id:"Constraint.Mandatory"});else n.push({anchor:{...a,objectid:a.objectid||""},id:"Constraint.Mandatory"});Array.isArray(e)&&e.filter(a=>a.id==="Constraint.Mandatory"&&a.anchor?.objectid===this.key&&(0,Yl.has)(a.anchor,"elementid")).forEach(a=>{n.push(a)}),this.attributeCollection.updateValidations(n)}updateValidations(t){return this.resetErrors(),Array.isArray(t.errors)&&this.handleErrorValidations(t.errors),Array.isArray(t.missing?.anchors)&&this.handleMissingValidations(t.missing,t.errors),this.dynamicValidationsLoaded=!0,this}get formdata(){return this.attributeCollection.formdata}getFormData(t=!1){return this.attributeCollection.getFormData(t)}};var cr=class o extends F{_lastUpdate;_completedFormObjects=[];_currentFormObject=null;_previouslyEnteredFormObjects=[];_mergePreviouslyEnteredObjects=!0;_endResultFormObjects=[];_previousEndResultKeys=[];_useClientsideValidation=Ct("USE_CLIENTSIDE_VALIDATION");_errorCollection=new fe(0);_redirectLocation;_commit=!1;_isFinished=!1;_isComplete=!1;_success;_parameters=new Ae;_tokens=[];constructor(t){super(t),this._lastUpdate=0,this.currentFormObject=this.createFormObject(),this.endResultFormObjects=this.setEndResultFormObjects(),this.parameters=this.setParameters(t?.parameters),this.isComplete=this.getDataAsBoolean("complete",!1),Array.isArray(this.data.errors)&&this.handleRootErrors(this.data.errors),this.createSuccess(),this.setTokens()}get type(){return"Form"}get actiontype(){return this.layouthint.has(Un)?"create":this.layouthint.has(Hn)?"update":this.layouthint.has(Pn)?"delete":this.getContributionAsString("actiontype","form")}getInitialChildModelLinks(){let t=(0,rg.default)(this.endResultFormObjects.map(e=>e.getInitialChildModelLinks()));return this.currentFormObject==null?t:[...this.currentFormObject.getInitialChildModelLinks(),...t]}setChildModels(t,e){this.currentFormObject&&this.currentFormObject.setChildModels(t,e),this.endResultFormObjects.forEach(n=>{n.setChildModels(t,e)})}get label(){return this.getContributionAsString("label","")}get buttonLabels(){return this.getContributionAsObject("buttonLabels",{})}getButtonLabel(t){if(t==="cancel"&&"cancel"in this.buttonLabels)return this.buttonLabels.cancel;let e=this.currentFormObject?.buttonLabels;if(e&&t in e)return e[t]}get allObjects(){return this.currentFormObject==null?this.completedFormObjects:[...this.completedFormObjects,this.currentFormObject]}get objectKeys(){let t=this.getContributionAsObject("objects",{});return Object.keys(t)}get numberOfExpectedQuestions(){return this.objectKeys.length}get hasNoQuestionsConfigured(){return this.isComplete&&(this.objectKeys.length===0||!("missing"in this.data)&&!("results"in this.data)&&!("errors"in this.data))}addDynamicSchemaToElements(t,e){return t?.map(n=>({...n,dynamicschema:n.dynamicschema?n.dynamicschema.map(a=>{let l="elements"in a?a.elements:[];return l.length?{...a,elements:{...l,dynamicschema:e}}:a}):void 0}))}getMissingAnchors(){return(this.data.missing?.anchors??[]).map(e=>{if(this.data.results){let n=this.data.results.find(a=>a.objectid===e.objectid&&"elements"in a);n&&(e.results=n.elements)}return e.elements&&this.data.dynamicschema?{...e,elements:this.addDynamicSchemaToElements(e.elements,this.data.dynamicschema)}:e})}createFormObject(){if(this.data&&this.contributions.objects){let t=this.getMissingAnchors();if(t.length){let e=t[0],n=t[0].objectid;if(n){let a=this.contributions.objects[n];if(a)return new Or(e,a)}}}return null}addEmptyFormObject(t=this.currentFormObject){if(t){let e=Or.createEmpty(t);e.repeatIndex=this.getHighestRepeatIndex(t)+1,this.addFormObject(e)}}getHighestRepeatIndex(t){return Math.max(...this.allObjects.filter(e=>e.equals(t,!1)).map(e=>e.repeatIndex))}addFormObject(t){if(!t)throw new P("Missing form object to add");this.completedFormObjects=[...this.allObjects],this.currentFormObject=t}getFormObjectByKey(t){return this.allObjects.find(e=>e.key===t)}getFormObjectByLayoutHint(t){return this.allObjects.find(e=>e.layouthint.has(t))}removeFormObject(t){if(!t)throw new P("Missing form object to remove");if(this.currentFormObject&&this.currentFormObject.equals(t))throw new P("Can not remove the current form object");this.completedFormObjects=this.completedFormObjects.filter(e=>!e.equals(t))}get currentFormObject(){return this._currentFormObject}set currentFormObject(t){this._currentFormObject=t}get completedFormObjects(){return this._completedFormObjects}set completedFormObjects(t){this._completedFormObjects=t}get previouslyEnteredFormObjects(){return this._previouslyEnteredFormObjects}set previouslyEnteredFormObjects(t){this._previouslyEnteredFormObjects=t}setEndResultFormObjects(){if(this.data&&this.data.results&&Array.isArray(this.data.results)){let e=(Array.isArray(this.data.missing?.anchors)?this.data.missing?.anchors:[]).map(a=>a.objectid),n=this.data.results.filter(a=>!e.includes(a.objectid)).map(a=>{let{elements:l,...d}=a;return{...d,results:l}});if(n.length>0)return n.map(a=>{let l=this.contributions.objects?.[a.objectid];return l?new Or(a,l):null}).filter(a=>a!=null)}return[]}get expectsEndResultFormObjects(){let t=this.endResultFormObjects.map(e=>e.key);return this.objectKeys.some(e=>this.contributions.objects?.[e]?.content?.results&&!t.includes(e))}get endResultFormObjects(){return this._endResultFormObjects}set endResultFormObjects(t){this.previousEndResultKeys=this.endResultFormObjects.map(e=>e.key),this._endResultFormObjects=t}getEndResultFormObjects(){return this.endResultFormObjects.filter(t=>!this.previousEndResultKeys.includes(t.key))}get previousEndResultKeys(){return this._previousEndResultKeys}set previousEndResultKeys(t){this._previousEndResultKeys=t}get isValid(){return this.currentFormObject?this.currentFormObject.isRepeatable&&(!this.currentFormObject.hasFixedNrOfRepeats||this.allObjects.filter(e=>this.currentFormObject!=null&&e.equals(this.currentFormObject,!1)).find(e=>e.isValid))?!0:this.currentFormObject?.isValid??!0:!0}hasServerErrors(){return this.errorCollection.hasItems()?!0:this.currentFormObject?this.currentFormObject.hasServerErrors():!1}hasErrors(){return this.errorCollection.hasItems()?!0:this.currentFormObject?this.currentFormObject.hasErrors():!1}addServerError(t){this.errorCollection.addServerError(t.id,t.message,t.properties,t.layouthint)}resetErrors(){this._errorCollection.clear(),this.currentFormObject&&this.currentFormObject.resetErrors()}get errorCollection(){return this._errorCollection}set errorCollection(t){this._errorCollection=t}get commit(){return this._commit||!1}set commit(t){this._commit=t}get isFinished(){return this._isFinished||this.success!=null}set isFinished(t){this._isFinished=t}get isComplete(){return this._isComplete}set isComplete(t){this._isComplete=t}get successRedirect(){return this.isFinished&&this.success?.redirect?new B(this.success.redirect):void 0}get redirectLocation(){return this._redirectLocation||this.successRedirect}getSuccessData(){return this.success?.data}getResultData(){let t={};if(this.contributions.resultdata){let e=this.contributions.resultdata,n=Object.keys(e),a=this.getSuccessData();for(let l of n){let d=a?.[l]||{},b=l in e?e[l]:{};t[l]=new Sr(l,d,b)}}return t}get resultData(){return this.getSuccessData()}setParameters(t){let e=t?t.map(n=>new qt(n.prefix,n.name,n.value)):[];return new Ae(e)}get parameters(){return this._parameters}set parameters(t){this._parameters=t}selfhrefNoCommitParam(){let t=this.parameters.filter(n=>n.name!=="commit"),e=this.selflink?.href;return e?(e.method="POST",e.parameters=new Ae(t),e):new B}selfhrefWithCommitParam(){let t=this.selfhrefNoCommitParam();return this.expectsEndResultFormObjects&&!this.isComplete&&!this.commit&&t.addParameter("commit","false"),t}get selfhref(){if(!this.selflink)throw new Error("No self link found for form");return Gt("ALWAYS_COMMIT_FORM")?this.selfhrefNoCommitParam():this.selfhrefWithCommitParam()}get tokens(){if(!this._tokens){let t=this.data?.tokens;this._tokens=Array.isArray(t)?t:[]}return this._tokens}set tokens(t){this._tokens=t}removeTokens(){this._tokens=[]}setTokens(){let t=this.data?.tokens;this._tokens=Array.isArray(t)?t:[]}isChanged(){return this.currentFormObject!==null&&this.currentFormObject.isChangedSince(this.lastUpdate)}get lastUpdate(){return this._lastUpdate}set lastUpdate(t){this._lastUpdate=t}getFormDataObjects(t=!0,e=!1){let n=this.allObjects.filter(l=>l.isRepeatable&&!l.hasFixedNrOfRepeats&&!l.attributeCollection.some(b=>b.value!==null)?!1:l.isValid||!t),a=[];return n.forEach(l=>{let d=l.getFormData(e);if(!d)return;let b=d&&Object.values(d).some(D=>D!==null);if(l.isDynamic?b:!0){let D=a.findIndex(gt=>gt.key===l.key&>.repeatIndex===l.repeatIndex);D>-1?a[D].formdata=(0,eg.default)(a[D].formdata,d):a.push({key:l.key,repeatIndex:l.repeatIndex,formdata:d})}}),a.map(l=>({[l.key]:l.formdata}))}getFormData(t=!0,e=!0,n=!1){return e&&this.tokens.length>0?JSON.stringify({objects:this.getFormDataObjects(t,n),tokens:this.tokens}):JSON.stringify({objects:this.getFormDataObjects(t,n)})}setUseClientsideValidation(t){this._useClientsideValidation=t,this.allObjects.forEach(e=>{e.attributeCollection.all.forEach(n=>n.setUseClientsideValidation(t))})}useClientsideValidation(){return this._useClientsideValidation??!0}get formdata(){return this.getFormData(this.useClientsideValidation())}get validationData(){return this.getFormData(!1,!1,!0)}get hasPreviousStep(){let t=this.currentFormObject!=null?this.currentFormObject.key:"";return this.completedFormObjects.filter(e=>!e.isRepeatWithUnknownTotal||e.key!==t).length>0}setPreviousObject(){this.isComplete=!1,this.isFinished=!1,this.success=void 0;let t=this.currentFormObject;this.currentFormObject!=null&&(this.previouslyEnteredFormObjects=[this.currentFormObject,...this.previouslyEnteredFormObjects]),this.currentFormObject=this.completedFormObjects[this.completedFormObjects.length-1],this.completedFormObjects=this.completedFormObjects.slice(0,-1);let e=this.completedFormObjects.map(n=>n.key).filter(n=>n!==this.currentFormObject?.key);this.endResultFormObjects=this._endResultFormObjects.filter(n=>e.includes(n.key)),this.previousEndResultKeys=this.endResultFormObjects.map(n=>n.key),this.currentFormObject&&this.currentFormObject.equals(t,this.currentFormObject.hasFixedNrOfRepeats)&&this.setPreviousObject()}get hasNextStep(){if(this.isComplete||this.isFinished||this.hasNoQuestionsConfigured||!this.contributions.objects)return!1;if(this.currentFormObject&&this.currentFormObject.isDynamic||this.expectsEndResultFormObjects)return!0;let t=this.objectKeys.findIndex(n=>n===this.currentFormObject?.key),e=this.objectKeys.length-1===t;return e&&this.currentFormObject&&this.currentFormObject.isRepeatable&&!this.currentFormObject.isLastRepeat?!0:!e}update(t){if(t instanceof o){this.resetErrors(),this.lastUpdate=Date.now(),this.lastServerUpdate=t.lastServerUpdate,this.tokens=t.tokens,this.isComplete=t.isComplete,this.isFinished=t.isFinished,this.success=t.success;let e=t.data??{},n=(0,Gs.has)(e,"missing"),a=(0,Gs.has)(e,"errors");!n&&!a&&this.handleFinished(t),a&&this.handleErrors(t),n&&this.handleMissing(t)}return this}updateCurrentFormObject(t){if(t instanceof o){let e=t.data??{},n=(0,Gs.has)(e,"missing");(0,Gs.has)(e,"errors")&&this.handleErrors(t),n&&this.handleMissing(t)}}updateValidations(t){return this.currentFormObject&&this.currentFormObject.updateValidations(t),this}get success(){return this._success}set success(t){this._success=t}createSuccess(){this._success=this.data.success}handleFinished(t){this.currentFormObject&&(this.completedFormObjects=[...this.completedFormObjects,this.currentFormObject]),this.currentFormObject=t.currentFormObject,this.endResultFormObjects=t.endResultFormObjects,this.replaceData({...this.data,...t.data})}handleRootErrors(t){t.filter(e=>!e.anchor).forEach(e=>{this.errorCollection.addServerError(e.id,e.message,e.properties,e.layouthint)})}handleErrors(t){let e=Array.isArray(t.data.errors)?t.data.errors:[];e&&e.forEach(n=>{n.anchor&&this.currentFormObject&&this.currentFormObject.key===n.anchor.objectid?this.currentFormObject.addServerError(n):this.errorCollection.addServerError(n.id,n.message,n.properties,n.layouthint)})}handleMissing(t){this.currentFormObject&&this.currentFormObject.equals(t.currentFormObject)?this.handleMissingErrors(t):this.handleNewFormObject(t)}processMissingErrors(t){return this.currentFormObject===null?null:(this.currentFormObject.attributeCollection.map(e=>{let n=t.currentFormObject?.getAttributeByKey(e.key);return n?e.addMissingError(n):e.removeMissingError(),e}),this.currentFormObject)}handleMissingErrors(t){this.currentFormObject=this.processMissingErrors(t)}handleNewFormObject(t){this.endResultFormObjects=t.endResultFormObjects;let e=t.currentFormObject;e===null?(this.completedFormObjects=[...this.allObjects],this.currentFormObject=null):(this.currentFormObject?.isRepeatable?this.completedFormObjects=[...this.completedFormObjects,this.currentFormObject]:this.currentFormObject&&(this.completedFormObjects=[...this.allObjects]),this.currentFormObject=e)}get mergePreviouslyEnteredObjects(){return this._mergePreviouslyEnteredObjects}set mergePreviouslyEnteredObjects(t){this._mergePreviouslyEnteredObjects=t}handlePreviouslyEnteredFormObjects(t,e){e.forEach(n=>{let a=this.mergePreviouslyEnteredObjects?this.mergeObjects(t,n):t;this.addFormObject(a)}),this.previouslyEnteredFormObjects=this.previouslyEnteredFormObjects.filter(n=>!e.find(l=>n.equals(l)))}mergeObjects(t,e){let n=Or.createEmpty(t);return n.mergeObject(e),n}findAttribute(t){return this.allObjects.flatMap(e=>e.attributeCollection.all).find(e=>t(e))}};var Aa=Y(te(),1);var Dr=class extends Se{_contentConfiguration;_listitem;_givenAnswers;_results;_eventdata;constructor(t){super(t),this._contentConfiguration=new li(this.contributions?this.contributions.content:{}),this.setResultSection(),this._eventdata=this.setEventData()}getInitialChildModelLinks(){let t=this.listitem?this.listitem.links.getLinksByGroup("panel").all:[],e=[...super.getInitialChildModelLinks(),...t];return this.hasResults&&(this.results&&e.push(...this.results.getInitialChildModelLinks()),this.givenAnswers&&e.push(...this.givenAnswers.getInitialChildModelLinks())),e}setChildModels(t,e){this.attributeCollection.setChildModels(t,e),this.results&&this.results.setChildModels(t,e),this.givenAnswers&&this.givenAnswers.setChildModels(t,e)}get type(){return"ListDetail"}set listitem(t){this._listitem=t,t&&(this.actionCollection=t.actionCollection)}get listitem(){return this._listitem}get panelLinks(){return this.listitem?.links.getLinksByGroup("panel")}get contentConfiguration(){return this._contentConfiguration}set contentConfiguration(t){this._contentConfiguration=t}get introtext(){return this.data._content?this.data._content.text.message:this.contributions.text?this.contributions.text.message??this.contributions.text:Array.isArray(this.contributions.texts)?this.contributions.texts[0].text:""}setResultSection(){let t=this.contributions.resultSection,e=this.data.resultSection;e&&t&&(this.setResults(e.results,t.results),this.setGivenAnswers(e.givenAnswers,t.givenAnswers))}setResults(t,e){if(t&&e){e.type==="composite"&&(e.children=e.children.filter(a=>Object.keys(a)[0]in t));let n=_t.createAttribute("results",{key:"results",dynamicschema:this.data.dynamicschema,content:this.data.content?.results,...this.data.resultSection},e,this.modelOptions);n instanceof dt&&(n.isResult=!0,n.indicateContentConfiguration(this.contentConfiguration),this._results=n)}}setGivenAnswers(t,e){if(t&&e){let n=e.children?{...e,children:e.children.filter(l=>Object.keys(l)[0]in t)}:e,a=_t.createAttribute("givenAnswers",{key:"givenAnswers",dynamicschema:this.data.dynamicschema,content:this.data.content?.givenAnswers,...this.data.resultSection},n,this.modelOptions);a instanceof dt&&(a.isResult=!0,this._givenAnswers=a)}}get givenAnswers(){return this._givenAnswers}get hasResults(){return(0,Aa.has)(this.contributions,"resultSection")}get results(){return this._results}get hasEventData(){return(0,Aa.has)(this.contributions,"eventdata")&&(0,Aa.has)(this.data,"eventdata")&&this.data.eventdata!=null&&this.contributions.eventdata!=null}setEventData(){if(!this.data.eventdata||!this.contributions.eventdata)return[];let t=[],{eventdata:e,dynamicschema:n}=this.data;return this.contributions.eventdata.forEach(l=>{for(let d of Object.keys(l)){let b=l[d],x=e[d];x&&(Array.isArray(x)?x.forEach((D,gt)=>{let We=`${d}-${gt+1}`;t.push(new Sr(We,{...D,dynamicschema:n},b,this.modelOptions))}):t.push(new Sr(d,{...x,dynamicschema:n},b,this.modelOptions)))}}),t}get eventdata(){return this._eventdata}};var ig=require("immer");var va=class{_group;_context;_attributeCollection;_grouping;constructor(t,e,n,a){this._group=t,this._context=e,this._attributeCollection=new ft(t,e?.attributes,{...a,isReadonly:!0}),t.grouping&&(this._grouping=new $i({...t.grouping,dynamicschema:t.dynamicschema},n,a))}get type(){return this._group.type}get id(){return this._group._id||"unknown"}get label(){return this._context?.label}get attributeCollection(){return this._attributeCollection}get grouping(){return this._grouping}get reference(){return this._group.reference||[]}hasAttributeByKey(t){return this.attributeCollection.hasAttributeByKey(t)?!0:this.grouping?this.grouping.hasAttributeByKey(t):!1}getAttributeByKey(t){let e=this.attributeCollection.getAttributeByKey(t);if(e)return e;if(this.grouping)return this.grouping.getAttributeByKey(t)}},$i=class{[ig.immerable]=!0;_prefix;_groups=[];constructor(t,e,n){this._prefix=t?.prefix,t?.group&&(this._groups=this.createGroup(t,e,n))}createGroup(t,e,n){if(!t.group)return[];let a=this.getContextFromContributionsByPrefix(e,this._prefix);return t.group.map(l=>{let d=this.getDynamicSchema(l.type,t.dynamicschema),b={...l,dynamicschema:d};return new va(b,a,e,n)})}getDynamicSchema(t,e){if(e)return this._prefix&&e[t]&&!e[this._prefix+t]&&(e[this._prefix+t]=e[t]),e}get groups(){return this._groups}hasGroups(){return this._groups.length>0}getContextFromContributionsByPrefix(t,e){if(t&&e)return t.find(n=>n.prefix===e)}hasAttributeByKey(t){return this.groups.some(e=>e.hasAttributeByKey(t))}getAttributeByKey(t){let e=this.groups.find(n=>n.hasAttributeByKey(t));if(e)return e.getAttributeByKey(t)}getGroupByAttributeKey(t){return this.groups.find(e=>e.hasAttributeByKey(t))}};var hr=class o extends B{_isPrefixed;_prefix;_pagingName;_pagesizeName;_sortingName;_lookupToken;constructor(t,e,n=!0){super(t,void 0),this._isPrefixed=n,e?this.setParametersFromListModel(e):t!=null&&t instanceof o&&this.setParameterNamesFromHref(t)}setParameterNamesFromHref(t){this._prefix=this._isPrefixed?t.prefix:void 0,this._pagingName=t.pagingName,this._pagesizeName=t.pagesizeName,this._sortingName=t.sortingName}setParametersFromListModel(t){this._prefix=this._isPrefixed?t.key:void 0,this._pagingName=t.paging?.name||"",this._pagesizeName=t.paging?.pagesize?.name||"",this._sortingName=t.sorting?.name||"",this.page=t.paging?.page,this.pagesize=t.paging&&t.paging.pagesize.options.length>0?t.paging.pagesize.value:void 0,this.sort=t.sorting?.param,this.filterCollection=t.filterCollection,this.formdata=t.formdata,this.lookupToken=t.lookupToken}get prefix(){return this._prefix}get pagingName(){return this._pagingName}get pagesizeName(){return this._pagesizeName}get sortingName(){return this._sortingName}set page(t){this.pagingName&&this.setParameter(this.pagingName,t?.toString(),this.prefix)}get page(){return this.pagingName?this.getParameter(this.pagingName,this.prefix):void 0}set sort(t){this.sortingName&&this.setParameter(this.sortingName,t,this.prefix)}set pagesize(t){this.pagesizeName&&this.setParameter(this.pagesizeName,t?.toString(),this.prefix)}set lookupToken(t){this.setParameter("lookupToken",t,this.prefix)}set filterCollection(t){t&&t.filter(e=>e.parameterType==="queryParameter").forEach(e=>{e.params.forEach(n=>{n.value==null?this.removeParameter(n.name,this.prefix):this.setParameter(n.name,n.value,this.prefix)})})}};var qs=class o extends Se{static createFromListResult(t,e,n,a){let l=new Pt;return l.key=t,l.data=e,l.contributions=n,l.origin=a?.origin,l.contextPath=a?.contextPath,new o(l)}static createFromChoiceAttributeOption(t){let e=new Pt;e.key=t.code;let n=new o(e);return n.attributeCollection=t.attributeCollection,n}get selfhref(){let t=this.links.getLinkByKey("self");return t?t.href:new B("#")}get caseviewHref(){let t=this.attributeCollection.getAttributeByLayoutHint(qr);if(t){let e=t.name,n=this.links.getLinkByKey(e);if(n)return n.href}return this.selfhref}get panelLinks(){return this.links.getLinksByGroup("panel")}hasPanelLinks(){return this.panelLinks.length>-1}getActionsByType(t){return this.actionCollection.getActionsByType(t)}get additionalDetailRoutePath(){let t=this.panelLinks;return t.length===0?"__NON_EXISTING_ROUTE__":t.map(e=>e.href.path).join("|")}};var $s=class o extends K{static createFromList(t){let e=t.data._embedded;if(e){if(Array.isArray(e))throw new Qt(`One record panel with multiple tables is not supported, place all types in one panel for the panel with key ${t.key}`);let n=t.data.dynamicschema,a=e.results.map(l=>{let[d]=Object.keys(l),b=l[d];b.dynamicschema=n;let x=t.contributions.results[d];return qs.createFromListResult(d,b,x,t.modelOptions)});return new o(a)}return new o}get additionalDetailRoutePath(){if(this.isEmpty())return"__NON_EXISTING_ROUTE__";let t=this.all.map(e=>e.additionalDetailRoutePath).join("|");return t.includes("|")?`(${t})`:t}get actionCollection(){let t=new re;return this.all.forEach(e=>{t.collection.push(...e.actionCollection.all)}),t}};var sg=require("immer");var ng=require("immer"),Ks=class{[ng.immerable]=!0;_pagesize;_options;constructor(t,e){this._pagesize=t,this._options=e?.options||[]}get name(){return"pagesize"}get value(){return this._pagesize}set value(t){this._pagesize=t}get options(){return this._options}get querystring(){return`${this.name}=${this.value}`}};var zs=class{[sg.immerable]=!0;_data;_contributions;_page;_pagesize;constructor(t,e){this._data=t,this._contributions=e,this._page=this._data?.page,this._pagesize=new Ks(this._data?.pagesize,this._contributions?.pagesize)}get isEnabled(){return typeof this.page<"u"}get name(){return"page"}get value(){return this.page}get maxpages(){return this._data?.maxpages}get page(){return this._page}set page(t){this._page=t}get totalResults(){return this._data?.totalresults||-1}get pagesize(){return this._pagesize}get querystring(){let t=[];return this.pagesize&&t.push(this.pagesize.querystring),t.push(`${this.name}=${this.page}`),t.join("&")}};var og=require("immer");var Zl=(e=>(e.ASC="asc",e.DESC="desc",e))(Zl||{}),Ki=class{[og.immerable]=!0;_key;_label;_group;_sortorder="desc";_selected=!1;constructor(t,e,n){this._key=t,this._group=n,this._label=this.setLabel(t,e,n)}setLabel(t,e,n){if(e)this._label=e;else if(n){let a=n.getAttributeByKey(t);a&&(this._label=a.label)}return""}reset(){this.selected=!1,this.sortorder="desc"}get selected(){return this._selected}set selected(t){this._selected=t}get key(){return this._key}get value(){return`${this.key} ${this.sortorder}`}get oppositeDirection(){return this.sortorder==="desc"?"asc":"desc"}get oppositeValue(){return`${this.key} ${this.oppositeDirection}`}get label(){return this._label}get sortorder(){return this._sortorder}set sortorder(t){this._sortorder=t}get group(){return this._group}getHref(t){let e=new hr(t);return(e.prefix?e.hasParameter("page",e.prefix):e.hasParameter("page"))&&(e.page=1),e.sort=this.oppositeValue,e}};var Xs=class extends K{constructor(t,e,n,a){super();let l=t?.sorting?.attributes;l&&(this.collection=l.map(d=>{let b=e[d],x=n&&n.getGroupByAttributeKey(d);return new Ki(d,b,x)}),this.setSelected(a))}get name(){return"sort"}get value(){return this.filter(t=>t.selected).map(t=>t.value).join(",")}set value(t){this.reset(),this.setSelected(t)}get param(){return this.value}get options(){return this.collection}reset(){this.collection.forEach(t=>t.reset())}setSelected(t=""){t.split(",").forEach(e=>{let[n,a]=e.split(" ");this.collection.forEach(l=>{l.key===n&&(l.selected=!0,a==="asc"?l.sortorder="asc":a==="desc"&&(l.sortorder="desc"))})})}getUpdateQuerystring(t){if(!t)throw new P("Missing option key as input argument");return this.filter(e=>e.key===t).map(e=>e.key===t?e.oppositeValue:e.value).join(",")}getUpdateQuerystringBySortOption(t){if(!(t instanceof Ki))throw new P("Missing SortOptionModel as input argument");return this.getUpdateQuerystring(t.key)}createListHref(t,e){let n=new hr(t);return(n.prefix?n.hasParameter("page",n.prefix):n.hasParameter("page"))&&(n.page=1),n.sort=this.getUpdateQuerystringBySortOption(e),n}};var hi=class extends F{_detail;_headers;_paging;_filterCollection;_sorting;_actionCollection;_listItemCollection;_grouping;_lookupToken;constructor(t){super(t),this._headers=this.setHeaders(),this._paging=this.setPaging(),this._filterCollection=this.setFilters(),this._sorting=this.setSorting(),this._actionCollection=this.setActionCollection(),this._grouping=this.setGrouping(),this._lookupToken=this.setLookupToken(),this._listItemCollection=this._listItemCollection=$s.createFromList(this)}get type(){return"List"}getInitialChildModelLinks(){return this.layouthint.has(gl)&&this.listItemCollection.length===1?this.listItemCollection.map(t=>{let e=t.selflink;return e.targetModel=Dr,e}):[]}setChildModels(t,e){this.detail=t.find(n=>n instanceof Dr)}get requestMethod(){return this.filterCollection.some(e=>e.parameterType==="bodyParameter"&&e.hasValue())?"POST":"GET"}get label(){return this.contributions.label}get lookupToken(){return this._lookupToken}set lookupToken(t){this._lookupToken=t}get introtext(){return this.data.content?this.data.content.text.message:this.contributions.text?this.contributions.text.message??this.contributions.text:Array.isArray(this.contributions.texts)?this.contributions.texts[0].text:""}get listItemCollection(){return this._listItemCollection}set listItemCollection(t){this._listItemCollection=t}get detail(){return this._detail}set detail(t){let e=this.listItemCollection.find(n=>n.selfhref.equals(t?.selfhref));e&&t&&(t.listitem=e),this._detail=t}get grouping(){return this._grouping}setGrouping(){return new $i({...this.data.grouping,dynamicschema:this.data.dynamicschema},this.contributions.contexts,this.modelOptions)}hasGrouping(){return this.grouping.hasGroups()}hasResults(){return this.listItemCollection.hasItems}isEmpty(){return!this.hasResults()}get shouldHide(){return this.layouthint.has(jn)&&this.isEmpty()&&this.actionCollection.isEmpty()&&!this.filterCollection.hasActiveFilters()}getListItemById(t){let e=decodeURIComponent(t.toString());return this.listItemCollection.find(n=>n.id.toString()===e)}getListItemByHref(t){return this.listItemCollection.find(e=>e.selfhref.equals(t))}get paging(){return this._paging}setPaging(){return new zs(this.data.paging,this.contributions.paging)}get sorting(){return this._sorting}setSorting(){return new Xs(this.contributions,this.getSortingLabels(),this.grouping,this.data.sorting)}get filterCollection(){return this._filterCollection}set filterCollection(t){Array.isArray(t)?this._filterCollection.collection=t:this._filterCollection=t}setFilters(){return new Lt(this.data.filter,{listkey:this.key,filter:this.contributions.filter||{},contexts:this.contributions.contexts,dynamicschema:this.data.dynamicschema},this.modelOptions)}isFiltered(){return this.filterCollection.hasActiveFilters()}get actionCollection(){return this._actionCollection}setActionCollection(){return new re(this.data.actions,this.contributions.actions,this.modelOptions)}hasList(){return this.key!=null}getSelfHref(){let t=this.links.getLinkByKey("self");return new hr(t?.href,this)}setLookupToken(){return this.modularuiResponse.parameters?.find(t=>t.name==="lookupToken")?.value}get selfhref(){return this.getSelfHref()}get headers(){return this._headers}setHeaders(){let t=[];if(this.contributions.results){let{results:e}=this.contributions;Object.keys(e).forEach(n=>{e[n].attributes.forEach(a=>{let l=new Qr(a,this.sorting);!t.some(b=>b.equals(l))&&!l.layouthint.has(qr)&&t.push(l)})})}return t}getSortingLabels(){let t={};return this.contributions.results&&Object.values(this.contributions.results).forEach(e=>{e.attributes.forEach(n=>{let a=Object.keys(n)[0],l=n[a].label;t[a]=l})}),t}getActionsByType(t){return this.actionCollection.getActionsByType(t)}getAdditionalDetailLabel(t){let e=Object.keys(this.contributions.results);for(let n of e){let a=this.contributions.results[n]._links?.panel?.find(l=>l.resourcetype===t);if(a)return a.label}}get formdata(){let{formdata:t}=this.filterCollection;return t!=null?JSON.stringify(t):null}};var Js=class o extends Tt{static create(t,e,n){let a=new o;return t.options&&e.options&&t.options.forEach(l=>{a.add(new Ee([],{...l,optionType:this.getOptionType(l,e),elementsContributions:e.options[0].elements},{...n,referenceDate:new Date().toISOString().split("T")[0]}))}),a}static getOptionType(t,e){return e.optionType?e.optionType:t._links?.download?.[0].name==="avatar"?"user":"generic"}};var Ys=class extends F{_options;_filterCollection;constructor(t){super(t),this._options=Js.create(this.data,this.contributions,this.modelOptions),this._filterCollection=this.createFilterCollection(this.data.filter,this.contributions.filter)}get type(){return"LookupOptions"}get options(){return this._options}createFilterCollection(t,e){return t&&e?new Lt({[t.name]:t},{filter:e},this.modelOptions):new Lt}get filterCollection(){return this._filterCollection}};var Zs=class{_modelCategory;constructor(t){this._modelCategory=t}get key(){return this._modelCategory._id}get label(){return this._modelCategory.label}get description(){return this._modelCategory.description}get iconSmall(){return this._modelCategory.iconSmall}get iconMedium(){return this._modelCategory.iconMedium}get iconLarge(){return this._modelCategory.iconLarge}};var Qs=class extends K{constructor(t=[]){super(),this.collection=t?t.map(e=>new Zs(e)):[]}};var to=class extends F{get type(){return"ModelCatalog"}get label(){return this.locale==="nl"?"Model catalogus":"Model catalog"}get conceptIndexLink(){let t=this.links.getLinkByKey("concepts");if(!t)throw new J("Missing concepts index link in model catalog");return t}get contentIndexLink(){let t=this.links.getLinkByKey("content");if(!t)throw new J("Missing content index link in model catalog");return t}get modelcategories(){return new Qs(this.data.modelcategories)}};var eo=class extends F{_taskGroupCollection;constructor(t){super(t),this._taskGroupCollection=this.createTaskGroupCollection()}get type(){return"GroupingPanel"}get label(){return this.contributions.label}getInitialChildModelLinks(){return this.links.getLinksByGroup("taskgroup").all}get panelLinks(){return this.links.getLinksByGroup("panel")}setChildModels(t,e){let n=t.filter(a=>a instanceof $t);this.taskGroupCollection.add(n)}hasIntroText(){return this.introtext!==""}get introtext(){return this.data._content?this.data._content.text.message:this.contributions.text?this.contributions.text.message??this.contributions.text:Array.isArray(this.contributions.texts)?this.contributions.texts[0].text:""}createTaskGroupCollection(){let t=this.getDataAsArray("taskgroups",[]),e=this.getContributionAsArray("taskgroups",[]),n=[];for(let a of t){let l=a.name,d=e.find(b=>b.name===l);if(d){let b=$t.create(l,a,d,this.modelOptions);n.push(b)}}return new ur(n)}set taskGroupCollection(t){this._taskGroupCollection=t}get taskGroupCollection(){return this._taskGroupCollection}hasTaskGroups(){return this.taskGroupCollection&&this.taskGroupCollection.hasItems()}hasTasks(){return this.taskGroupCollection.hasTasks()}};var ro=class extends hi{get type(){return"CaseSearch"}getQuickSearchFilters(){return this.filterCollection?this.filterCollection.filter(t=>t.isQuickSearch()):[]}hasQuickSearchFilters(){return this.getQuickSearchFilters().length>0}};var io=class extends F{_actionCollection;_taskGroupCollection;constructor(t){super(t),this._taskGroupCollection=this.createTaskGroupCollection(),this._actionCollection=new re(this.data.actions,this.contributions.actions,this.modelOptions)}get type(){return"Tab"}getInitialChildModelLinks(){return this.links.getLinksByGroup("taskgroup","actions").all}setChildModels(t,e){let n=t.filter(a=>a instanceof $t);this.taskGroupCollection.add(n)}get searchLink(){return this.links.getLinksByGroup("search").first}createTaskGroupCollection(){let t=this.getDataAsArray("taskgroups",[]),e=this.getContributionAsArray("taskgroups",[]),n=[];for(let a of t){let l=a.name,d=e.find(b=>b.name===l);if(d){let b=$t.create(l,a,d,this.modelOptions);n.push(b)}}return new ur(n)}get taskGroupCollection(){return this._taskGroupCollection}set taskGroupCollection(t){this._taskGroupCollection=t}get label(){return this.getContributionAsString("label","")}get components(){return this.links.getLinksByGroup("component","search")}get actionCollection(){return this._actionCollection}hasComponents(){return this.components.size>0}hasTaskGroups(){return this.taskGroupCollection&&this.taskGroupCollection?.hasItems()}hasActions(){return this.actionCollection&&this.actionCollection.hasItems()}};var ag=Y(te(),1);var no=class extends je{_attributeCollection;constructor(t=new Pt){super(t);let e=this.contributions;if(e&&e.attributes&&Array.isArray(e.attributes)){let n=e.attributes.filter(a=>{let[l]=Object.keys(a);return l!=="sessiondata"&&(0,ag.has)(this.data,l)});this._attributeCollection=new ft(this.data,n,{...this.modelOptions,isReadonly:!0})}else this._attributeCollection=new ft(this.data,[],{...this.modelOptions,isReadonly:!0})}get type(){return"UserProfile"}get attributeCollection(){return this._attributeCollection}};var Ql=class{_isBasicAuthentication;_authenticationType;constructor(){this._isBasicAuthentication=!1,this._authenticationType=this.getAuthenticationType()}getAuthenticationType(){let t=ua(),e=_n[t];return!e||e==="JAAS"?"JAAS":e==="PAC4J_FORM"||t.includes("FormClient")?"PAC4J_FORM":e==="PAC4J_BASIC"||t.includes("IndirectBasicClient")?"PAC4J_BASIC":"PAC4J_INDIRECT"}get authenticationType(){return this._authenticationType}set authenticationType(t){this._authenticationType=t}get isBasicAuthentication(){return this._isBasicAuthentication||this.authenticationType==="PAC4J_BASIC"}set isBasicAuthentication(t){this._isBasicAuthentication=t}requestLogin(){return _e({url:`${ee()}/login`,method:"GET",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"}})}initLogin(t){return this.isBasicAuthentication||!t?Promise.resolve(!0):this.requestLogin().catch(e=>(e instanceof Gr&&(this.isBasicAuthentication=!0),Promise.resolve({})))}login(t,e){switch(this.authenticationType){case"PAC4J_FORM":return this.doFormLogin(t,e);case"PAC4J_BASIC":return this.doBasicAuthentication(t,e);case"PAC4J_INDIRECT":return Promise.resolve();default:return this.doJaasAuthentication(t,e)}}getFormLoginUrl(){switch(this.authenticationType){case"PAC4J_BASIC":return`${ee()}${qn("DirectBasicAuthClient")}`;case"PAC4J_FORM":return`${ee()}${qn("FormClient")}`;case"PAC4J_INDIRECT":return"";default:return`${ee()}/j_security_check`}}getFormLoginData(t,e){let n=encodeURIComponent(t),a=encodeURIComponent(e);switch(this.authenticationType){case"PAC4J_BASIC":case"PAC4J_FORM":return`${_l()}=${n}&${Al()}=${a}`;case"JAAS":return`j_username=${n}&j_password=${a}`;default:return""}}doFormLogin(t,e){return _e({url:this.getFormLoginUrl(),method:"POST",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"},data:this.getFormLoginData(t,e)})}doBasicAuthentication(t,e){return ot.addItem("basic",btoa(`${t}:${e}`)),this.requestLogin()}doJaasAuthentication(t,e){return this.initLogin(!0).then(()=>this.isBasicAuthentication?(ot.removeItem("basic-ok"),this.doBasicAuthentication(t,e).then(()=>{ot.addItem("basic-ok",!0)})):this.doFormLogin(t,e))}getLogoutUrl(){let t=ua();return!t||t==="JAAS"?`${ee()}/Logoff`:`${ee()}${la()}`}redirectToLogout(t){ot.clear();let e=window.location.origin,n=t?.startsWith("http")?t:`${e}${ee()}`;window.location.assign(this.getLogoutUrl()+"?url="+n)}logout(){return _e({url:this.getLogoutUrl()}).then(t=>(ot.clear(),t))}};var tc=class{_tokenId;_image;_origin="";_contextPath=rt();CaptchaRequest(t){this._origin=t?.origin||"",this._contextPath=t?.contextPath||rt()}captchaResponse(t){return this._tokenId="tokenId"in t?t.tokenId:this._tokenId,this._image="image"in t?t.image:this._image,{tokenId:this._tokenId,image:this._image,valid:"valid"in t?t.valid:!1,error:"error"in t?t.error:null}}init(){return Er({url:ca(this._contextPath,this._origin)}).then(t=>this.captchaResponse(t))}send(t){return Er({url:ca(this._contextPath,this._origin),method:"POST",data:{tokenId:this._tokenId??"",answer:t??""}}).then(e=>this.captchaResponse(e)).catch(e=>this.captchaResponse(e.response))}refresh(){return this.init()}};var zi=class o extends Error{response;href;constructor(t,e,n){super(t),Object.setPrototypeOf(this,o.prototype),this.response=e,this.href=n,"captureStackTrace"in Error&&typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}get resource(){return this.href}};var ug=Y(te(),1);var ec=[{name:"Application",isMatch:({resourcetype:o})=>o==="Application",Model:ks},{name:"Tab",isMatch:({resourcetype:o})=>o.endsWith("Tab")||o.endsWith("KnowledgeBank"),Model:io},{name:"ListDetail",isMatch:({resourcetype:o})=>{let t=o.toLowerCase();return t.endsWith("listdetail")||t.endsWith("listpaneldetail")||t.endsWith("datastorepaneldetail")},Model:Dr},{name:"List",isMatch:({resourcetype:o})=>o.endsWith("List")||o.endsWith("ListPanel")||o.endsWith("RelatedDataStorePanel")||o.endsWith("RelatedDatastorePanel")||["list-related-cases","RecordPanel","EventHistoryPanel","NotePanel","AppointmentPanel","DocumentPanel","AssignmentPanel"].includes(o),Model:hi},{name:"GroupingPanel",isMatch:({resourcetype:o})=>["GroupingPanel","CaseTabGroupingPanel","TabGroupingPanel"].includes(o),Model:eo},{name:"CaseSearch",isMatch:({resourcetype:o})=>o==="CaseSearch",Model:ro},{name:"CaseView",isMatch:({resourcetype:o})=>o==="CaseView",Model:Fs},{name:"Detail",isMatch:({resourcetype:o})=>o.endsWith("DetailPanel")||["Detail","CasePropertiesPanel","CasePropertiesPanelDetail"].includes(o),Model:Se},{name:"TaskGroup",isMatch:({resourcetype:o})=>o==="TaskGroup",Model:$t},{name:"Form",isMatch:({resourcetype:o})=>o==="Form",Model:cr},{name:"User",isMatch:({resourcetype:o})=>o==="userdata",Model:je},{name:"UserProfile",isMatch:({resourcetype:o})=>o==="userdata",Model:no},{name:"UserServices",isMatch:({resourcetype:o})=>o==="user_services",Model:ii},{name:"ModelCatalog",isMatch:({resourcetype:o})=>o==="ModelCatalog",Model:to},{name:"ConceptIndex",isMatch:({resourcetype:o})=>o==="ConceptSearch"||o.toLowerCase()==="relatedconcepts",Model:Hs},{name:"ConceptDetail",isMatch:({resourcetype:o})=>o==="ConceptDetail",Model:Me},{name:"ConceptTypeDetail",isMatch:({resourcetype:o})=>o==="ConceptTypeDetail",Model:He},{name:"ContentIndex",isMatch:({resourcetype:o})=>o==="ContentSearch",Model:Bs},{name:"ContentTOC",isMatch:({resourcetype:o})=>o==="ContentTOC",Model:Vs},{name:"Content",isMatch:({resourcetype:o})=>o==="ContentDetail",Model:ai},{name:"ContentType",isMatch:({resourcetype:o})=>o==="ContentTypeDetail",Model:pe},{name:"LookupOptions",isMatch:({resourcetype:o})=>o==="lookupOptions",Model:Ys}];var so=class{static resolve(t,e,n=!1){if(!t)throw new P("No data or contribution available, cannot resolve model");if(!(0,ug.has)(t.contributions,"resourcetype"))throw new P(`Contributions has wrong format, missing resourcetype property in contributions of ${t.requestHref?.toString()}`);if(e){let l=Array.isArray(e)?e:[e];return l.length===1||n?l[0]:ec.find(b=>b.isMatch(t)&&l.includes(b.Model))?.Model}return ec.find(l=>l.isMatch(t))?.Model}};var lg=Y(require("deepmerge"),1),cg=require("klona/full"),hg=Y(te(),1);var rc=class o{_response=new Pt;_href;_options;_targetModel;_forceTargetModel=!1;_contributionsHref;_locale="en";_method="GET";_progressEvent;_origin="";_contextPath=rt();_layoutHintProcessor;constructor(t,e={}){if(!t)throw new P("You must pass a href to the resource that is requested");this._href=typeof t=="string"?new B(t):t,this._options=e,this._layoutHintProcessor=new $n(this._origin,this._contextPath,this.options),this._response=new Pt,this._response.requestHref=this.href,this.locale=this.getRequestLocale(e.locale),this._response.parameters=this.href.parameters.all,this.contextPath=e.contextPath||this.href.contextPath,this.origin=e.origin||this.href.origin,this._targetModel=e.targetModel,this.method=e.method||this.href.method}getRequestLocale(t){return t||typeof navigator<"u"&&navigator?.language&&navigator.language.split("-")[0]||"en"}get origin(){return this._origin}set origin(t){this._origin=t??"",this._response.origin=t??"",this._layoutHintProcessor.setOrigin(this._origin)}get contextPath(){return this._contextPath}set contextPath(t){let e=t??rt();this._contextPath=e,this._response.contextPath=e,this._layoutHintProcessor.setContextPath(e)}get contributionsHref(){return this._contributionsHref}set contributionsHref(t){this._contributionsHref=t}set locale(t){this._locale=t,this._response.locale=t,this._layoutHintProcessor.setRequestOptions(this.options)}get locale(){return this._locale}get response(){return this._response}set href(t){this._href=t}get href(){return this._href}set method(t){this._method=t}get method(){return this._method}get options(){return{...this._options,locale:this.locale,method:this.method}}set options(t){this._options=t,this._layoutHintProcessor.setRequestOptions(t)}get requestOptions(){let{targetModel:t,forceTargetModel:e,updateHandler:n,childmodels:a,isValidationRequest:l,removeOnUnmount:d,...b}=this.options;return b}get withChildModels(){return!("childmodels"in this.options)||this.options.childmodels===!0}set targetModel(t){this._targetModel=t}get targetModel(){return this._targetModel}set forceTargetModel(t){this._forceTargetModel=t??!1}get forceTargetModel(){return this._forceTargetModel}resolveModel(){let t=so.resolve(this.response,this.targetModel,this.forceTargetModel);if(t)return t;let e=this.href.toString(),n=this.response?.resourcetype||"unknown";if(this.targetModel){let a=Array.isArray(this.targetModel)?this.targetModel.map(l=>l.type||l.name).join(", "):this.targetModel.type||this.targetModel.name;throw new J(`Cannot find a matching model for URL: '${e}', resourcetype: '${n}'. Available overrides: [${a}]`)}throw new J(`No JavaScript model is applicable for the request to ${e}. Response resourcetype: '${n}'.`)}createModel(){let t=this.resolveModel();return new t(this.response)}processContributionsService(t){if(!(0,hg.isPlainObject)(t))throw new P("Missing contributions data or contributions is not JSON");if(typeof t=="object"&&t!=null){let e=t,[n]=Object.keys(e),a=e[n];n==="error"&&this.handleContributionsError(a),typeof a=="object"&&a!=null&&(this.response.key in a||(this.response.key=n),this.response.contributions=a)}}handleContributionsError(t){let e=t.properties?.message??"Error in contribution";throw new zi(e,t,this.contributionsHref)}handleDataError(t){if(typeof t=="object"&&t.properties){let e=t.properties?.message??"Error in data";throw new zi(e,t,this.href.absolutepath.toString())}throw new P(JSON.stringify(t))}handleData(t,e){this.response.key=t,this.response.data=e;let n=e?._links;if(!n)throw new P(`No _links object found in the data of ${this.href.toString()}`);if(n?.contributions)this.contributionsHref=n.contributions.href;else if(Array.isArray(n)&&n[0].contributions)this.contributionsHref=n[0].contributions.href;else throw new P(`Contributions link not found for data with key ${t}`)}processDataService(t){if(typeof t!="object"||t===null)throw new P("Missing data or data is not JSON");let e=t,[n]=Object.keys(e),a=e[n];if(n==="error")this.handleDataError(a);else{let[l]=Object.keys(t);this.handleData(l,a)}}fetchContributionsService(){if(!this.contributionsHref)throw new J("Missing a contributions href");return _e({url:`${this.origin}${this.contextPath}${this.contributionsHref}`,cache:!0,locale:this.options.locale})}fetchDataService(){return _e({...this.requestOptions,url:`${this.origin}${this.contextPath}${this.href.path}`,params:this.href.getQuerystringForModularUI(),locale:this.options.locale,onProgress:this.onProgress})}set onProgress(t){this._progressEvent=t}get onProgress(){return this._progressEvent}getDynamicValidationData(t){let e=typeof this.options.data=="string"?JSON.parse(this.options.data):this.options.data;if(t instanceof cr){let n=JSON.parse(t.validationData);return JSON.stringify((0,lg.default)(e||{},n))}return JSON.stringify(e)??"{}"}async loadDynamicValidations(t){if(!this.options.isValidationRequest&&Ct("USE_INSTANT_SERVER_VALIDATION")&&t instanceof cr&&t.currentFormObject?.hasDynamicValidations){let e=this.href.setParameter("commit","false"),n=await _e({...this.requestOptions,url:`${this.origin}${this.contextPath}${this.href.path}`,params:e.getQuerystringForModularUI(),data:this.getDynamicValidationData(t)});if(n==null||typeof n!="object")return t;let a=n,[l]=Object.keys(a);return t.updateValidations(a[l])}return t}fetchFromCache(){return this.options={...this.options,cache:!0},this.fetch()}fetchChildModels(t){let n=t.getInitialChildModelLinks().map(a=>{let l=new o(a.href,{locale:this.locale});return a.targetModel&&(l.targetModel=a.targetModel),a.isCacheable?l.fetchFromCache():l.fetch()});return Promise.allSettled(n).then(a=>{let l=[],d=[];return a.forEach(b=>{if(b.status==="rejected"){let{reason:x}=b;x.name!=="Error.ChangePasswordRequired"&&console.debug("Unexpected error when retrieving child model:",x),d.push(new ci(x,"",{origin:this.origin,contextPath:this.contextPath}))}else l.push(b.value)}),t instanceof F&&t.addChildModels(l,d),t})}async fetchContent(t){let e=await this.fetchFromCache();return t&&e instanceof ai&&e.childSectionLinks.length>0?this.fetchContentChildSections(e):e}async fetchContentChildSections(t){let e=(0,cg.klona)(t),n=await Promise.all(t.childSectionLinks.map(a=>{let l=a.selfhref.addParameter(et,t.entryDate);return new o(l,{locale:this.locale}).fetchContent(!0)}));return e.childSections=n.filter(a=>a instanceof xe),e}async fetch(){let t=await this.fetchDataService();if(t==null)throw new Error(`No data received for ${this.href.toString()}`);this.processDataService(t);let e=await this.fetchContributionsService();if(e==null)throw new Error(`No contributions data received for ${this.contributionsHref}`);this.processContributionsService(e),await this._layoutHintProcessor.processAsyncLayoutHints(this.response);let n=this.createModel(),a=await this.loadDynamicValidations(n);return this.withChildModels?await this.fetchChildModels(a):a}post(t){return this.method="POST",this.options={...this.options,data:t},this.fetch()}postForm(t){return this.method="POST",this.options={...this.options,data:t.formdata},this.fetch().then(e=>e instanceof cr?t.update(e):t)}fetchSync(){let t={headers:{"Accept-Language":this.locale}},e=dataFetcher.fetch(this.href.toString(),t);if(e==null)throw new Error(`No data received for ${this.href.toString()}`);if(this.processDataService(JSON.parse(e)),this.contributionsHref==null)throw new Error(`No constributions received for ${this.href.toString()}`);let n=dataFetcher.fetch(this.contributionsHref.toString(),t);if(n==null)throw new Error(`No constributions received for ${this.contributionsHref.toString()}`);this.processContributionsService(JSON.parse(n));let a=this.createModel(),d=a.getInitialChildModelLinks().map(b=>new o(b.href,{locale:this.locale}).fetchSync());return a instanceof F&&a.addChildModels(d,[]),a}};var ic=class{_uploadConstraints;_progressHandler;_origin="";_contextPath=rt();constructor(t,e,n){this._uploadConstraints=t,this._progressHandler=e,this._origin=n?.origin||"",this._contextPath=n?.contextPath||rt()}getFileExtension(t){return t.name.split(".").pop()?.toLowerCase()||""}isNotAllowedFileType(t){let e=this._uploadConstraints.fileTypes;if(e.length>0){let n=this.getFileExtension(t);return!e.some(a=>a.extensions.includes(n))}return!1}exceedsMaxFileSize(t){let e=this._uploadConstraints?.maxFileSize?.fileSize??-1;return e>-1&&t.size>e}uploadFile(t){let e=this._uploadConstraints?.maxFileSize?.fileSize??-1;return Ct("USE_CLIENTSIDE_VALIDATION")&&this.exceedsMaxFileSize(t)?(this._progressHandler&&this._progressHandler(t,{error:"errorExceedsMaxFileSize"}),Promise.reject(new nr("Constraint.File.MaxFileSizeExceeded","Maximum file upload size is ${max-filesize}",{"max-filesize":e},!0))):Ct("USE_CLIENTSIDE_VALIDATION")&&this.isNotAllowedFileType(t)?(this._progressHandler&&this._progressHandler(t,{error:"errorExtensionNotAllowed"}),Promise.reject(new nr("Constraint.File.InvalidExtension","Allowed extensions are: ${extensions}",{extension:this.getFileExtension(t),extensions:this._uploadConstraints.fileTypes.join(", ")},!0))):Er({url:xl(this._contextPath,this._origin),method:"POST",headers:{"Content-Type":t.type,"x-filename":encodeURIComponent(t.name),"x-filesize":t.size.toString()},onProgress:n=>{this._progressHandler&&n.lengthComputable&&this._progressHandler(t,{progress:Math.ceil(n.loaded/n.total*100)})},data:t}).then(n=>(this._progressHandler&&this._progressHandler(t,{progress:100,token:n.token}),n)).catch(n=>Promise.reject(new ci(n)))}};var MO=o=>{let t=new B(o).absolutehref,e=new XMLHttpRequest;return e.open("HEAD",t,!1),e.setRequestHeader("Accept","application/json"),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.send(),e.status!==404},xO=o=>{let t=new B(o).absolutehref,e=new XMLHttpRequest;e.open("HEAD",t,!1),e.setRequestHeader("Accept","application/json"),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.send();let n=e.responseURL??"";return e.status===400&&n.endsWith("/secureLogin")};var pg=o=>{if(o instanceof B)return{path:o.path,querystring:o.querystring,hash:o.hash};let t=o,e,n;if(o.includes("#")){let a=o.split("#");t=a[0],e=a[1]}if(o.includes("?")){let a=t.split("?");t=a[0],n=a[1]}return{path:t,querystring:n,hash:e}},nc=(o,t)=>{if(!Array.isArray(t))return new B(o);let e=pg(o),n=e.path;if(e.querystring){let a=new URLSearchParams(e.querystring),l=Array.from(a.keys());for(let d of l)t.includes(d)||a.delete(d);n=n+"?"+a.toString()}return e.hash&&(n=n+"#"+e.hash),o instanceof B?new B(n,o.resourcetype,{origin:o.origin,contextPath:o.contextPath}):new B(n)},EO=(o,t,e,n,a)=>{let l=t.toString();if(l.startsWith(`/${o}/`)||(l=`/${o}/${l}`),l=l.replace(/\/\//g,"/"),n?.search&&!l.includes("?")){let b=n.search.startsWith("?")?n.search.substring(1):n.search;l=`${l}?${b}`}let d=t instanceof B?nc(new B(l,t.resourcetype,{origin:t.origin,contextPath:t.contextPath}),a):nc(l,a);return e?d.setParameter("entryDate",e):d.removeParameter("entryDate"),d};var TO=()=>{let o=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=(o+Math.random()*16)%16|0;return o=Math.floor(o/16),(t==="x"?e:e&3|8).toString(16)})};var sc={},SO=process?.env?.NODE_ENV?process.env.NODE_ENV!=="production":sc!==void 0&&sc.env?!!sc.env.DEV:!1;var OO=(o,t=Vi(),e="")=>o.startsWith(e+t)?o:o.startsWith(ia)?`${e}${t}${o}`:`${e}${t}${ia}${o}`;var fg=require("html-entities");var DO=o=>(0,fg.encode)(o,{mode:"nonAsciiPrintableOnly",level:"xml"}),IO=(o,t={allowedTags:["p","br","b","i","u","strike"]})=>{if(typeof o!="string")throw new P("sanitizeHTML method expects a string");let a=DO(o).replace(/<(\w+)(.|[\r\n])*?>/gi,"<$1>").replace(/<br\s*>/gi,"<br />"),d=`<(?!\\/?(${Array.isArray(t.allowedTags)?t.allowedTags.join("|"):""})(>|\\s\\/))[^<]+?>`,b=new RegExp(d,"gi");return a.replace(b,"")};0&&(module.exports={ALL_CONTENT_IN_DATA_SETTING,ATTRIBUTE_TYPE,ATTRIBUTE_WIDTH,AVATAR,AVATAR_IN_TITLE,ActionCollection,ActionModel,ApplicationModel,AssignmentFilterModel,AttributeCollection,AttributeContent,AttributeDataMapper,AttributeFactory,AttributeSetModel,Authenticate,BSNConstraint,BaseAttributeModel,BaseCollection,BaseDateTimeUtil,BaseLayoutHintRule,BaseModel,BooleanAttributeModel,CAPTCHA_PATH,CASEVIEW_LINK,CHANGEAVATAR_PATH,CHANGEPASSWORD_PATH,CHOICETYPE,CONFIRM_PASSWORD,CONTENT_PATH,CREATE_ACTION,Cache,CaptchaAttributeModel,CaptchaRequest,CaseSearchModel,CaseViewModel,ChoiceAttributeModel,ChoiceAttributeOptionCollection,ChoiceAttributeOptionModel,CompositeAttributeChildCollection,CompositeAttributeModel,ConceptDetailModel,ConceptIndexFilterModel,ConceptIndexModel,ConceptLinkCollection,ConceptLinkModel,ConceptRelationCollection,ConceptRelationModel,ConceptTypeDetailModel,ConfigurationException,ConstraintCollection,ContentConfiguration,ContentConfigurationElements,ContentConfigurationEndResults,ContentConfigurationQuestions,ContentConfigurationResults,ContentIndexModel,ContentLinkCollection,ContentLinkModel,ContentModel,ContentTOCModel,ContentTypeModel,DATETIME_OFFSET_FORMAT,DEFAULT_AUTHENTICATION_TYPE,DEFAULT_FIRST_WEEK_CONTAINS_DATE,DEFAULT_WEEK_STARTS_ON,DELETE_ACTION,DEPENDENT_ATTRIBUTE,DEPENDENT_ATTRIBUTE_CONTROL,DISABLED,DateBoundaryConstraint,DateTimeDateFormatConstraint,DateTimeTimeFormatConstraint,DateTimeUtil,DateUtil,DatetimeAttributeModel,DatetimeFormatConstraint,DecimalFormat,DependentAttribute,DetailModel,ErrorCollection,ErrorCollectionType,ErrorModel,ErrorResponse,FILTER_TYPE,FetchException,FileExtensionConstraint,FileSizeConstraint,FilterCollection,FilterFactory,FilterModel,FormModel,FormObjectModel,GenericConstraintModel,GroupModel,GroupingModel,GroupingPanelModel,HIDE_IN_USER_INTERFACE,HIDE_WHEN_EMPTY,HTTP_METHODS,HelptextAttributeModel,Href,IBANConstraint,INCLUDE_TIME_OFFSET,INITIAL_FILTER,INITIAL_TOTAL_FILESIZE,INTERNAL_LOGIN_TYPE,ISO_DATETIME_FORMAT,ISO_DATE_FORMAT,ISO_TIMESTAMP_FORMAT,ISO_TIME_FORMAT,IS_DEV,IS_GRAALJS,IS_SERVER,IllegalArgumentException,IllegalReturnException,IllegalStateException,JsonParseException,KEYCODES,LOGIN_PASSWORD_SETTING,LOGIN_PATH,LOGIN_PATH_SETTING,LOGIN_TYPE,LOGIN_USERNAME_SETTING,LOGOUT_PATH,LOGOUT_PATH_SETTING,LabelAttributeModel,LayoutHintCollection,LayoutHintConfiguration,LayoutHintProcessor,LayoutHintRuleCollection,LinkCollection,LinkModel,ListDetailModel,ListHeaderModel,ListHref,ListItemCollection,ListItemModel,ListModel,LookupOptionCollection,LookupOptionsModel,MANDATORY,MAX_TOTAL_FILESIZE,MandatoryConstraint,MandatoryRangeConstraint,MemoAttributeModel,MissingPropertyException,ModelCatalogModel,ModelCategoryCollection,ModelCategoryModel,ModelResolver,ModularUIError,ModularUIRequest,ModularUIResponse,MoneyAttributeModel,NetworkException,NotAllowedUriException,NotFoundException,NumberAttributeModel,NumberBoundaryConstraint,NumberFormatConstraint,NumberGroupingConstraint,NumberUtil,OPTION_MODE,PARAMETER_SEPARATOR,PARAMETER_TYPES,PagesizeModel,PagingModel,Parameter,ParameterCollection,PasswordAttributeModel,PasswordConfirmConstraint,PasswordLowerAndUpperCaseConstraint,PasswordMinNumericCharactersConstraint,PasswordMinSpecialCharactersConstraint,PasswordThreeConsecutiveCharactersNotAllowedConstraint,ProcessStatusSettingsModel,RENDER_SECTION_LABEL,RESOURCE_PATH,RangeAttributeModel,RangeConstraint,RangeFilterModel,RegexConstraint,RemainingTotalUploadSize,ResourceCollection,ResourceModel,SHOW_ONE_RESULT_AS_DETAIL,SORT_OPTIONS,SORT_ORDER,SectionModel,ServerRequestException,SortOptionModel,SortingModel,SourceReferenceCollection,SourceReferenceModel,StringAttributeModel,StringFilterModel,StringLengthConstraint,SubSectionModel,TIMEVERSION_FILTER_NAME,TITLE,TabModel,TaskGroupCollection,TaskGroupModel,ThemePropertyException,TimeUtil,TimeoutException,TimestampUtil,UPDATE_ACTION,UPLOAD_PATH,USERPROFILE_PATH,UnauthorizedException,UnsupportedOperationException,UploadAttributeModel,UploadRequest,UserModel,UserProfileModel,UserServicesModel,XMLAttributeModel,XMLConstraint,addLayoutHintRule,allSettings,cacheContributions,clearCookie,createHash,createHashFromHref,createHref,createUUID,filterParameters,getBooleanSetting,getCaptchaPath,getContentPath,getContextPath,getContextPathModularUI,getContextPathServer,getCookie,getEnabledLocales,getHint,getLayoutHintConfiguration,getNumberSetting,getRepositoryResourceUrl,getSetting,getStringSetting,getUploadPath,graalFetch,hasAllContentInData,isIncludeTimeOffsetInDateTimes,loginPasswordField,loginPath,loginType,loginUsernameField,logoutPath,normalizeLinkJSON,parseUrl,removeUnwantedHtml,resourceExists,resourceRedirectsToSecureLogin,retrieveText,setContextPath,setCookie,setSetting,setSettings,universalFetch,updateLayoutHintRules,xhr});
|
|
22
22
|
/*! Bundled license information:
|
|
23
23
|
|
|
24
24
|
lodash/lodash.js:
|