homebridge-config-ui-x 5.6.2-beta.4 → 5.6.2-beta.5

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/package.json +1 -1
  3. package/public/{chunk-QW24XYP4.js → chunk-2U4A7JIA.js} +1 -1
  4. package/public/{chunk-IVSC57ZO.js → chunk-2YWIGYRQ.js} +1 -1
  5. package/public/{chunk-WK3G6ODO.js → chunk-4ZJF4BRP.js} +1 -1
  6. package/public/{chunk-Z7A7I4CB.js → chunk-54VEQSYX.js} +1 -1
  7. package/public/{chunk-WAFW4WKO.js → chunk-5H2H6GV5.js} +1 -1
  8. package/public/{chunk-NKYXSMFX.js → chunk-63H66SN7.js} +1 -1
  9. package/public/{chunk-Z4QSDA2A.js → chunk-6K47JJJN.js} +1 -1
  10. package/public/{chunk-KKNK6UV7.js → chunk-77SV5TMG.js} +1 -1
  11. package/public/{chunk-DY6UNDS6.js → chunk-7FYFNZTQ.js} +1 -1
  12. package/public/{chunk-GJNC52XA.js → chunk-7XGJYWYJ.js} +1 -1
  13. package/public/{chunk-CJ4SXXR6.js → chunk-B5KGSPBB.js} +1 -1
  14. package/public/{chunk-4UZT4CWL.js → chunk-BGUMMZ2C.js} +1 -1
  15. package/public/{chunk-BH22NGQA.js → chunk-CMFP5UNE.js} +1 -1
  16. package/public/{chunk-ISO2GRTR.js → chunk-CMYYLT6V.js} +1 -1
  17. package/public/{chunk-PHD5ZMC2.js → chunk-CO4NZMWO.js} +1 -1
  18. package/public/{chunk-5LPNXWFL.js → chunk-CUR56OIQ.js} +1 -1
  19. package/public/{chunk-XQWLMHVF.js → chunk-FKNEWYVP.js} +1 -1
  20. package/public/{chunk-D22SUY53.js → chunk-FZKZZ4RE.js} +1 -1
  21. package/public/{chunk-O2XW2OU3.js → chunk-FZSUY7NB.js} +1 -1
  22. package/public/{chunk-Q26KC4IB.js → chunk-G262EKYR.js} +1 -1
  23. package/public/{chunk-DZJPWLJP.js → chunk-HDDWXQCC.js} +1 -1
  24. package/public/{chunk-DNXIVWN6.js → chunk-HLBXNZT2.js} +1 -1
  25. package/public/{chunk-YALGVC7M.js → chunk-IPYUZTFM.js} +1 -1
  26. package/public/{chunk-YI5HDCRW.js → chunk-ITOBTSSK.js} +1 -1
  27. package/public/{chunk-BEUTGLPT.js → chunk-IVRRJDMF.js} +1 -1
  28. package/public/{chunk-UOXNLYDZ.js → chunk-LJEJT7XC.js} +1 -1
  29. package/public/{chunk-IE3V3626.js → chunk-MDBPS3HU.js} +1 -1
  30. package/public/{chunk-VWALJTBB.js → chunk-MLO5MHQZ.js} +1 -1
  31. package/public/{chunk-LAGMFNSS.js → chunk-MZXVAALT.js} +1 -1
  32. package/public/{chunk-VF2IGSWQ.js → chunk-N6F46ZR6.js} +1 -1
  33. package/public/{chunk-SUAYNYGQ.js → chunk-NE45RJPZ.js} +1 -1
  34. package/public/{chunk-NEPDVJTH.js → chunk-NG5KAPYX.js} +1 -1
  35. package/public/{chunk-KYJP2JUP.js → chunk-NYBBGETL.js} +1 -1
  36. package/public/{chunk-VFGREPGX.js → chunk-OJHYMECP.js} +1 -1
  37. package/public/{chunk-RIRCP4IY.js → chunk-PAVMGVYO.js} +1 -1
  38. package/public/chunk-PG65YVBK.js +1 -0
  39. package/public/{chunk-IRW2X6KD.js → chunk-Q2242BUJ.js} +1 -1
  40. package/public/{chunk-TBHJJ5AF.js → chunk-QBPL6XFG.js} +1 -1
  41. package/public/{chunk-RSC6KQC6.js → chunk-QISNGTEW.js} +1 -1
  42. package/public/{chunk-YCVAE2GW.js → chunk-QQCYNHHX.js} +2 -2
  43. package/public/{chunk-W57Z652M.js → chunk-S6QABMMB.js} +2 -2
  44. package/public/{chunk-SAAY45A7.js → chunk-V6OEXTM4.js} +1 -1
  45. package/public/{chunk-L5S7W2A7.js → chunk-V7G4OBHO.js} +1 -1
  46. package/public/{chunk-QVBEXZ7A.js → chunk-V7QYRB3O.js} +1 -1
  47. package/public/{chunk-22BONRNP.js → chunk-XCTMQV5H.js} +1 -1
  48. package/public/{chunk-ISO6GPND.js → chunk-XQAFGYWU.js} +1 -1
  49. package/public/{chunk-QJVZW2TP.js → chunk-XW456IS6.js} +1 -1
  50. package/public/{chunk-WB2AUNM5.js → chunk-Y54JZMAX.js} +1 -1
  51. package/public/{chunk-DELCRL3W.js → chunk-YG7LM534.js} +1 -1
  52. package/public/{chunk-UKRY5TMZ.js → chunk-YIXNA3NA.js} +1 -1
  53. package/public/{chunk-P7PS27MA.js → chunk-YPAGUJHG.js} +1 -1
  54. package/public/{chunk-WAPGX2D2.js → chunk-Z6YBMUNH.js} +1 -1
  55. package/public/index.html +1 -1
  56. package/public/{main-Q4FDCMVL.js → main-QERAHIA4.js} +1 -1
  57. package/public/chunk-VJC32FSY.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as Qv}from"./chunk-NKYXSMFX.js";import{a as Pp,c as Gv,d as Wv,e as Zv,f as pn,g as _R,h as zp}from"./chunk-XQWLMHVF.js";import{a as Fv}from"./chunk-7ZQT7GPI.js";import{a as Lv}from"./chunk-5M7A3XMS.js";import{a as Jv}from"./chunk-ISO2GRTR.js";import{a as qv,b as Kv,c as $v}from"./chunk-S7JFZWBJ.js";import{a as ja}from"./chunk-5XSDDD4U.js";import{a as Yv}from"./chunk-4JL4TGFX.js";import{a as pd,b as gn}from"./chunk-4XDXTE6Q.js";import{a as dn,b as un}from"./chunk-5JDHV5WO.js";import{a as Vv}from"./chunk-WK3G6ODO.js";import{a as ad,b as ld,c as cd,d as dd,e as ud,f as gd,g as cn,m as zt,n as Di,o as Ev,p as Mv,q as Uv,r as Rv,s as Ov,t as Ko}from"./chunk-J2VLADZD.js";import{A as Bv,B as xs,C as Aa,a as Iv,b as Oo,c as wr,e as ci,f as Tv,h as Pv,i as zv,j as Av,k as jv,l as cs,m as Nv,o as Dv,p as Fo,s as ln,t as Vo,u as Tp,v as qo}from"./chunk-QPTX7IVE.js";import{a as Lo}from"./chunk-Z7A7I4CB.js";import{d as Fs}from"./chunk-VHUDBTN7.js";import{b as jt}from"./chunk-BH22NGQA.js";import{k as nt,l as At,n as at,p as $o,q as tt}from"./chunk-UOXNLYDZ.js";import{$ as Ta,$c as Cv,Ac as rd,Ba as rn,D as mv,Db as ae,Ga as Ve,Gb as Q,Hb as sd,Ib as x,Ka as yv,Kc as Ni,La as m,Lc as Ro,M as sn,Mb as xp,Mc as li,Nb as Cp,Ob as Ip,Pa as Qc,Pb as Bo,Qa as co,Qb as Eo,Rb as kv,Sa as br,Sb as Hs,Tb as Os,Tc as nd,Ub as fe,Vb as A,Wa as we,Wb as le,Xa as nn,Xb as se,Xc as xv,Y as Sp,Ya as yr,Yb as Mo,Za as vv,Zb as od,a as be,ab as Ie,ac as gt,b as Xe,bb as wv,bc as pt,c as cv,cb as Xc,cc as mt,da as _v,dc as Hv,e as w,ea as vi,ec as Sv,fa as on,fc as _t,g as ut,gc as Ss,h as _e,ha as hv,hc as vr,ia as fv,ic as Si,ja as V,jc as an,k as dv,kb as pe,lb as R,mb as O,mc as N,n as Yi,nc as M,o as Hp,oa as J,ob as wi,oc as Et,pa as Z,pb as ki,q as uv,qb as Hi,rb as I,sb as y,tb as b,ub as E,v as gv,vb as ed,vc as xi,w as Ue,wa as Zc,wb as td,wc as re,x as pv,xb as id,xc as Uo,ya as Do,yb as Pa,za as bv,zb as za}from"./chunk-M33HG622.js";var nw=w(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.formatNames=qs.fastFormats=qs.fullFormats=void 0;function Vs(e,i){return{validate:e,compare:i}}qs.fullFormats={date:Vs(iw,Dp),time:Vs(jp(!0),Bp),"date-time":Vs(Xv(!0),ow),"iso-time":Vs(jp(),sw),"iso-date-time":Vs(Xv(),rw),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:wR,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:TR,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:kR,int32:{type:"number",validate:xR},int64:{type:"number",validate:CR},float:{type:"number",validate:tw},double:{type:"number",validate:tw},password:!0,binary:!0};qs.fastFormats=Xe(be({},qs.fullFormats),{date:Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Dp),time:Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Bp),"date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,ow),"iso-time":Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,sw),"iso-date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,rw),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});qs.formatNames=Object.keys(qs.fullFormats);function hR(e){return e%4===0&&(e%100!==0||e%400===0)}var fR=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,bR=[0,31,28,31,30,31,30,31,31,30,31,30,31];function iw(e){let i=fR.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],o=+i[3];return s>=1&&s<=12&&o>=1&&o<=(s===2&&hR(t)?29:bR[s])}function Dp(e,i){if(e&&i)return e>i?1:e<i?-1:0}var Ap=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function jp(e){return function(t){let s=Ap.exec(t);if(!s)return!1;let o=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),_=+(s[7]||0);if(p>23||_>59||e&&!c)return!1;if(o<=23&&n<=59&&l<60)return!0;let f=n-_*u,S=o-p*u-(f<0?1:0);return(S===23||S===-1)&&(f===59||f===-1)&&l<61}}function Bp(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function sw(e,i){if(!(e&&i))return;let t=Ap.exec(e),s=Ap.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var Np=/t|\s/i;function Xv(e){let i=jp(e);return function(s){let o=s.split(Np);return o.length===2&&iw(o[0])&&i(o[1])}}function ow(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function rw(e,i){if(!(e&&i))return;let[t,s]=e.split(Np),[o,n]=i.split(Np),l=Dp(t,o);if(l!==void 0)return l||Bp(s,n)}var yR=/\/|:/,vR=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function wR(e){return yR.test(e)&&vR.test(e)}var ew=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function kR(e){return ew.lastIndex=0,ew.test(e)}var HR=-(2**31),SR=2**31-1;function xR(e){return Number.isInteger(e)&&e<=SR&&e>=HR}function CR(e){return Number.isInteger(e)}function tw(){return!0}var IR=/[^\\]\\Z/;function TR(e){if(IR.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Ba=w(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.regexpCode=et.getEsmExportName=et.getProperty=et.safeStringify=et.stringify=et.strConcat=et.addCodeArg=et.str=et._=et.nil=et._Code=et.Name=et.IDENTIFIER=et._CodeOrName=void 0;var Na=class{};et._CodeOrName=Na;et.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var kr=class extends Na{constructor(i){if(super(),!et.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};et.Name=kr;var ds=class extends Na{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof kr&&(t[s.str]=(t[s.str]||0)+1),t),{})}};et._Code=ds;et.nil=new ds("");function aw(e,...i){let t=[e[0]],s=0;for(;s<i.length;)Mp(t,i[s]),t.push(e[++s]);return new ds(t)}et._=aw;var Ep=new ds("+");function lw(e,...i){let t=[Da(e[0])],s=0;for(;s<i.length;)t.push(Ep),Mp(t,i[s]),t.push(Ep,Da(e[++s]));return PR(t),new ds(t)}et.str=lw;function Mp(e,i){i instanceof ds?e.push(...i._items):i instanceof kr?e.push(i):e.push(jR(i))}et.addCodeArg=Mp;function PR(e){let i=1;for(;i<e.length-1;){if(e[i]===Ep){let t=zR(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function zR(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof kr||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof kr))return`"${e}${i.slice(1)}`}function AR(e,i){return i.emptyStr()?e:e.emptyStr()?i:lw`${e}${i}`}et.strConcat=AR;function jR(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Da(Array.isArray(e)?e.join(","):e)}function NR(e){return new ds(Da(e))}et.stringify=NR;function Da(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}et.safeStringify=Da;function DR(e){return typeof e=="string"&&et.IDENTIFIER.test(e)?new ds(`.${e}`):aw`[${e}]`}et.getProperty=DR;function BR(e){if(typeof e=="string"&&et.IDENTIFIER.test(e))return new ds(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}et.getEsmExportName=BR;function ER(e){return new ds(e.toString())}et.regexpCode=ER});var Op=w(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.ValueScope=Ei.ValueScopeName=Ei.Scope=Ei.varKinds=Ei.UsedValueState=void 0;var Bi=Ba(),Up=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},md=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(md||(Ei.UsedValueState=md={}));Ei.varKinds={const:new Bi.Name("const"),let:new Bi.Name("let"),var:new Bi.Name("var")};var _d=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof Bi.Name?i:this.name(i)}name(i){return new Bi.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Ei.Scope=_d;var hd=class extends Bi.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,Bi._)`.${new Bi.Name(t)}[${s}]`}};Ei.ValueScopeName=hd;var MR=(0,Bi._)`\n`,Rp=class extends _d{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=Xe(be({},i),{_n:i.lines?MR:Bi.nil})}get(){return this._scope}name(i){return new hd(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:n}=o,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let _=c.get(l);if(_)return _}else c=this._values[n]=new Map;c.set(l,o);let u=this._scope[n]||(this._scope[n]=[]),p=u.length;return u[p]=t.ref,o.setValue(t,{property:n,itemIndex:p}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,Bi._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let n=Bi.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,md.Started);let _=t(p);if(_){let f=this.opts.es5?Ei.varKinds.var:Ei.varKinds.const;n=(0,Bi._)`${n}${f} ${p} = ${_};${this.opts._n}`}else if(_=o?.(p))n=(0,Bi._)`${n}${_}${this.opts._n}`;else throw new Up(p);u.set(p,md.Completed)})}return n}};Ei.ValueScope=Rp});var ke=w(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.or=Fe.and=Fe.not=Fe.CodeGen=Fe.operators=Fe.varKinds=Fe.ValueScopeName=Fe.ValueScope=Fe.Scope=Fe.Name=Fe.regexpCode=Fe.stringify=Fe.getProperty=Fe.nil=Fe.strConcat=Fe.str=Fe._=void 0;var Je=Ba(),Cs=Op(),Go=Ba();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return Go._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return Go.str}});Object.defineProperty(Fe,"strConcat",{enumerable:!0,get:function(){return Go.strConcat}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return Go.nil}});Object.defineProperty(Fe,"getProperty",{enumerable:!0,get:function(){return Go.getProperty}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return Go.stringify}});Object.defineProperty(Fe,"regexpCode",{enumerable:!0,get:function(){return Go.regexpCode}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return Go.Name}});var wd=Op();Object.defineProperty(Fe,"Scope",{enumerable:!0,get:function(){return wd.Scope}});Object.defineProperty(Fe,"ValueScope",{enumerable:!0,get:function(){return wd.ValueScope}});Object.defineProperty(Fe,"ValueScopeName",{enumerable:!0,get:function(){return wd.ValueScopeName}});Object.defineProperty(Fe,"varKinds",{enumerable:!0,get:function(){return wd.varKinds}});Fe.operators={GT:new Je._Code(">"),GTE:new Je._Code(">="),LT:new Je._Code("<"),LTE:new Je._Code("<="),EQ:new Je._Code("==="),NEQ:new Je._Code("!=="),NOT:new Je._Code("!"),OR:new Je._Code("||"),AND:new Je._Code("&&"),ADD:new Je._Code("+")};var uo=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Fp=class extends uo{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?Cs.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=_n(this.rhs,i,t)),this}get names(){return this.rhs instanceof Je._CodeOrName?this.rhs.names:{}}},bd=class extends uo{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Je.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=_n(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Je.Name?{}:be({},this.lhs.names);return vd(i,this.rhs)}},Vp=class extends bd{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},qp=class extends uo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Kp=class extends uo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},$p=class extends uo{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},Lp=class extends uo{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=_n(this.code,i,t),this}get names(){return this.code instanceof Je._CodeOrName?this.code.names:{}}},Ea=class extends uo{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let n=s[o];n.optimizeNames(i,t)||(UR(i,n.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Hr(i,t.names),{})}},go=class extends Ea{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},Gp=class extends Ea{},Wp=(()=>{class e extends go{}return e.kind="else",e})(),fd=(()=>{class e extends go{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new Wp(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(pw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=_n(this.condition,t,s),this}get names(){let t=super.names;return vd(t,this.condition),this.else&&Hr(t,this.else.names),t}}return e.kind="if",e})(),kd=(()=>{class e extends go{}return e.kind="for",e})(),Yp=class extends kd{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=_n(this.iteration,i,t),this}get names(){return Hr(super.names,this.iteration.names)}},Jp=class extends kd{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?Cs.varKinds.var:this.varKind,{name:s,from:o,to:n}=this;return`for(${t} ${s}=${o}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=vd(super.names,this.from);return vd(i,this.to)}},yd=class extends kd{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=_n(this.iterable,i,t),this}get names(){return Hr(super.names,this.iterable.names)}},cw=(()=>{class e extends go{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),dw=(()=>{class e extends Ea{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Zp=class extends go{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Hr(i,this.catch.names),this.finally&&Hr(i,this.finally.names),i}},uw=(()=>{class e extends go{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),gw=(()=>{class e extends go{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Qp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Xe(be({},t),{_n:t.lines?`
1
+ import{a as Qv}from"./chunk-63H66SN7.js";import{a as Pp,c as Gv,d as Wv,e as Zv,f as pn,g as _R,h as zp}from"./chunk-FKNEWYVP.js";import{a as Fv}from"./chunk-7ZQT7GPI.js";import{a as Lv}from"./chunk-5M7A3XMS.js";import{a as Jv}from"./chunk-CMYYLT6V.js";import{a as qv,b as Kv,c as $v}from"./chunk-S7JFZWBJ.js";import{a as ja}from"./chunk-5XSDDD4U.js";import{a as Yv}from"./chunk-4JL4TGFX.js";import{a as pd,b as gn}from"./chunk-4XDXTE6Q.js";import{a as dn,b as un}from"./chunk-5JDHV5WO.js";import{a as Vv}from"./chunk-4ZJF4BRP.js";import{a as ad,b as ld,c as cd,d as dd,e as ud,f as gd,g as cn,m as zt,n as Di,o as Ev,p as Mv,q as Uv,r as Rv,s as Ov,t as Ko}from"./chunk-J2VLADZD.js";import{A as Bv,B as xs,C as Aa,a as Iv,b as Oo,c as wr,e as ci,f as Tv,h as Pv,i as zv,j as Av,k as jv,l as cs,m as Nv,o as Dv,p as Fo,s as ln,t as Vo,u as Tp,v as qo}from"./chunk-QPTX7IVE.js";import{a as Lo}from"./chunk-54VEQSYX.js";import{d as Fs}from"./chunk-VHUDBTN7.js";import{b as jt}from"./chunk-CMFP5UNE.js";import{k as nt,l as At,n as at,p as $o,q as tt}from"./chunk-LJEJT7XC.js";import{$ as Ta,$c as Cv,Ac as rd,Ba as rn,D as mv,Db as ae,Ga as Ve,Gb as Q,Hb as sd,Ib as x,Ka as yv,Kc as Ni,La as m,Lc as Ro,M as sn,Mb as xp,Mc as li,Nb as Cp,Ob as Ip,Pa as Qc,Pb as Bo,Qa as co,Qb as Eo,Rb as kv,Sa as br,Sb as Hs,Tb as Os,Tc as nd,Ub as fe,Vb as A,Wa as we,Wb as le,Xa as nn,Xb as se,Xc as xv,Y as Sp,Ya as yr,Yb as Mo,Za as vv,Zb as od,a as be,ab as Ie,ac as gt,b as Xe,bb as wv,bc as pt,c as cv,cb as Xc,cc as mt,da as _v,dc as Hv,e as w,ea as vi,ec as Sv,fa as on,fc as _t,g as ut,gc as Ss,h as _e,ha as hv,hc as vr,ia as fv,ic as Si,ja as V,jc as an,k as dv,kb as pe,lb as R,mb as O,mc as N,n as Yi,nc as M,o as Hp,oa as J,ob as wi,oc as Et,pa as Z,pb as ki,q as uv,qb as Hi,rb as I,sb as y,tb as b,ub as E,v as gv,vb as ed,vc as xi,w as Ue,wa as Zc,wb as td,wc as re,x as pv,xb as id,xc as Uo,ya as Do,yb as Pa,za as bv,zb as za}from"./chunk-M33HG622.js";var nw=w(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.formatNames=qs.fastFormats=qs.fullFormats=void 0;function Vs(e,i){return{validate:e,compare:i}}qs.fullFormats={date:Vs(iw,Dp),time:Vs(jp(!0),Bp),"date-time":Vs(Xv(!0),ow),"iso-time":Vs(jp(),sw),"iso-date-time":Vs(Xv(),rw),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:wR,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:TR,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:kR,int32:{type:"number",validate:xR},int64:{type:"number",validate:CR},float:{type:"number",validate:tw},double:{type:"number",validate:tw},password:!0,binary:!0};qs.fastFormats=Xe(be({},qs.fullFormats),{date:Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Dp),time:Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Bp),"date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,ow),"iso-time":Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,sw),"iso-date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,rw),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});qs.formatNames=Object.keys(qs.fullFormats);function hR(e){return e%4===0&&(e%100!==0||e%400===0)}var fR=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,bR=[0,31,28,31,30,31,30,31,31,30,31,30,31];function iw(e){let i=fR.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],o=+i[3];return s>=1&&s<=12&&o>=1&&o<=(s===2&&hR(t)?29:bR[s])}function Dp(e,i){if(e&&i)return e>i?1:e<i?-1:0}var Ap=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function jp(e){return function(t){let s=Ap.exec(t);if(!s)return!1;let o=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),_=+(s[7]||0);if(p>23||_>59||e&&!c)return!1;if(o<=23&&n<=59&&l<60)return!0;let f=n-_*u,S=o-p*u-(f<0?1:0);return(S===23||S===-1)&&(f===59||f===-1)&&l<61}}function Bp(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function sw(e,i){if(!(e&&i))return;let t=Ap.exec(e),s=Ap.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var Np=/t|\s/i;function Xv(e){let i=jp(e);return function(s){let o=s.split(Np);return o.length===2&&iw(o[0])&&i(o[1])}}function ow(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function rw(e,i){if(!(e&&i))return;let[t,s]=e.split(Np),[o,n]=i.split(Np),l=Dp(t,o);if(l!==void 0)return l||Bp(s,n)}var yR=/\/|:/,vR=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function wR(e){return yR.test(e)&&vR.test(e)}var ew=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function kR(e){return ew.lastIndex=0,ew.test(e)}var HR=-(2**31),SR=2**31-1;function xR(e){return Number.isInteger(e)&&e<=SR&&e>=HR}function CR(e){return Number.isInteger(e)}function tw(){return!0}var IR=/[^\\]\\Z/;function TR(e){if(IR.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Ba=w(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.regexpCode=et.getEsmExportName=et.getProperty=et.safeStringify=et.stringify=et.strConcat=et.addCodeArg=et.str=et._=et.nil=et._Code=et.Name=et.IDENTIFIER=et._CodeOrName=void 0;var Na=class{};et._CodeOrName=Na;et.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var kr=class extends Na{constructor(i){if(super(),!et.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};et.Name=kr;var ds=class extends Na{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof kr&&(t[s.str]=(t[s.str]||0)+1),t),{})}};et._Code=ds;et.nil=new ds("");function aw(e,...i){let t=[e[0]],s=0;for(;s<i.length;)Mp(t,i[s]),t.push(e[++s]);return new ds(t)}et._=aw;var Ep=new ds("+");function lw(e,...i){let t=[Da(e[0])],s=0;for(;s<i.length;)t.push(Ep),Mp(t,i[s]),t.push(Ep,Da(e[++s]));return PR(t),new ds(t)}et.str=lw;function Mp(e,i){i instanceof ds?e.push(...i._items):i instanceof kr?e.push(i):e.push(jR(i))}et.addCodeArg=Mp;function PR(e){let i=1;for(;i<e.length-1;){if(e[i]===Ep){let t=zR(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function zR(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof kr||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof kr))return`"${e}${i.slice(1)}`}function AR(e,i){return i.emptyStr()?e:e.emptyStr()?i:lw`${e}${i}`}et.strConcat=AR;function jR(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Da(Array.isArray(e)?e.join(","):e)}function NR(e){return new ds(Da(e))}et.stringify=NR;function Da(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}et.safeStringify=Da;function DR(e){return typeof e=="string"&&et.IDENTIFIER.test(e)?new ds(`.${e}`):aw`[${e}]`}et.getProperty=DR;function BR(e){if(typeof e=="string"&&et.IDENTIFIER.test(e))return new ds(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}et.getEsmExportName=BR;function ER(e){return new ds(e.toString())}et.regexpCode=ER});var Op=w(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.ValueScope=Ei.ValueScopeName=Ei.Scope=Ei.varKinds=Ei.UsedValueState=void 0;var Bi=Ba(),Up=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},md=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(md||(Ei.UsedValueState=md={}));Ei.varKinds={const:new Bi.Name("const"),let:new Bi.Name("let"),var:new Bi.Name("var")};var _d=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof Bi.Name?i:this.name(i)}name(i){return new Bi.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Ei.Scope=_d;var hd=class extends Bi.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,Bi._)`.${new Bi.Name(t)}[${s}]`}};Ei.ValueScopeName=hd;var MR=(0,Bi._)`\n`,Rp=class extends _d{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=Xe(be({},i),{_n:i.lines?MR:Bi.nil})}get(){return this._scope}name(i){return new hd(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:n}=o,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let _=c.get(l);if(_)return _}else c=this._values[n]=new Map;c.set(l,o);let u=this._scope[n]||(this._scope[n]=[]),p=u.length;return u[p]=t.ref,o.setValue(t,{property:n,itemIndex:p}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,Bi._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let n=Bi.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,md.Started);let _=t(p);if(_){let f=this.opts.es5?Ei.varKinds.var:Ei.varKinds.const;n=(0,Bi._)`${n}${f} ${p} = ${_};${this.opts._n}`}else if(_=o?.(p))n=(0,Bi._)`${n}${_}${this.opts._n}`;else throw new Up(p);u.set(p,md.Completed)})}return n}};Ei.ValueScope=Rp});var ke=w(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.or=Fe.and=Fe.not=Fe.CodeGen=Fe.operators=Fe.varKinds=Fe.ValueScopeName=Fe.ValueScope=Fe.Scope=Fe.Name=Fe.regexpCode=Fe.stringify=Fe.getProperty=Fe.nil=Fe.strConcat=Fe.str=Fe._=void 0;var Je=Ba(),Cs=Op(),Go=Ba();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return Go._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return Go.str}});Object.defineProperty(Fe,"strConcat",{enumerable:!0,get:function(){return Go.strConcat}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return Go.nil}});Object.defineProperty(Fe,"getProperty",{enumerable:!0,get:function(){return Go.getProperty}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return Go.stringify}});Object.defineProperty(Fe,"regexpCode",{enumerable:!0,get:function(){return Go.regexpCode}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return Go.Name}});var wd=Op();Object.defineProperty(Fe,"Scope",{enumerable:!0,get:function(){return wd.Scope}});Object.defineProperty(Fe,"ValueScope",{enumerable:!0,get:function(){return wd.ValueScope}});Object.defineProperty(Fe,"ValueScopeName",{enumerable:!0,get:function(){return wd.ValueScopeName}});Object.defineProperty(Fe,"varKinds",{enumerable:!0,get:function(){return wd.varKinds}});Fe.operators={GT:new Je._Code(">"),GTE:new Je._Code(">="),LT:new Je._Code("<"),LTE:new Je._Code("<="),EQ:new Je._Code("==="),NEQ:new Je._Code("!=="),NOT:new Je._Code("!"),OR:new Je._Code("||"),AND:new Je._Code("&&"),ADD:new Je._Code("+")};var uo=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Fp=class extends uo{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?Cs.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=_n(this.rhs,i,t)),this}get names(){return this.rhs instanceof Je._CodeOrName?this.rhs.names:{}}},bd=class extends uo{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Je.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=_n(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Je.Name?{}:be({},this.lhs.names);return vd(i,this.rhs)}},Vp=class extends bd{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},qp=class extends uo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Kp=class extends uo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},$p=class extends uo{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},Lp=class extends uo{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=_n(this.code,i,t),this}get names(){return this.code instanceof Je._CodeOrName?this.code.names:{}}},Ea=class extends uo{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let n=s[o];n.optimizeNames(i,t)||(UR(i,n.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Hr(i,t.names),{})}},go=class extends Ea{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},Gp=class extends Ea{},Wp=(()=>{class e extends go{}return e.kind="else",e})(),fd=(()=>{class e extends go{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new Wp(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(pw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=_n(this.condition,t,s),this}get names(){let t=super.names;return vd(t,this.condition),this.else&&Hr(t,this.else.names),t}}return e.kind="if",e})(),kd=(()=>{class e extends go{}return e.kind="for",e})(),Yp=class extends kd{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=_n(this.iteration,i,t),this}get names(){return Hr(super.names,this.iteration.names)}},Jp=class extends kd{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?Cs.varKinds.var:this.varKind,{name:s,from:o,to:n}=this;return`for(${t} ${s}=${o}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=vd(super.names,this.from);return vd(i,this.to)}},yd=class extends kd{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=_n(this.iterable,i,t),this}get names(){return Hr(super.names,this.iterable.names)}},cw=(()=>{class e extends go{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),dw=(()=>{class e extends Ea{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Zp=class extends go{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Hr(i,this.catch.names),this.finally&&Hr(i,this.finally.names),i}},uw=(()=>{class e extends go{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),gw=(()=>{class e extends go{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Qp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Xe(be({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=i,this._scope=new Cs.Scope({parent:i}),this._nodes=[new Gp]}toString(){return this._root.render(this.opts)}name(i){return this._scope.name(i)}scopeName(i){return this._extScope.name(i)}scopeValue(i,t){let s=this._extScope.value(i,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(i,t){return this._extScope.getValue(i,t)}scopeRefs(i){return this._extScope.scopeRefs(i,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(i,t,s,o){let n=this._scope.toName(t);return s!==void 0&&o&&(this._constants[n.str]=s),this._leafNode(new Fp(i,n,s)),n}const(i,t,s){return this._def(Cs.varKinds.const,i,t,s)}let(i,t,s){return this._def(Cs.varKinds.let,i,t,s)}var(i,t,s){return this._def(Cs.varKinds.var,i,t,s)}assign(i,t,s){return this._leafNode(new bd(i,t,s))}add(i,t){return this._leafNode(new Vp(i,Fe.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==Je.nil&&this._leafNode(new Lp(i)),this}object(...i){let t=["{"];for(let[s,o]of i)t.length>1&&t.push(","),t.push(s),(s!==o||this.opts.es5)&&(t.push(":"),(0,Je.addCodeArg)(t,o));return t.push("}"),new Je._Code(t)}if(i,t,s){if(this._blockNode(new fd(i)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new fd(i))}else(){return this._elseNode(new Wp)}endIf(){return this._endBlockNode(fd,Wp)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new Yp(i),t)}forRange(i,t,s,o,n=this.opts.es5?Cs.varKinds.var:Cs.varKinds.let){let l=this._scope.toName(i);return this._for(new Jp(n,l,t,s),()=>o(l))}forOf(i,t,s,o=Cs.varKinds.const){let n=this._scope.toName(i);if(this.opts.es5){let l=t instanceof Je.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Je._)`${l}.length`,c=>{this.var(n,(0,Je._)`${l}[${c}]`),s(n)})}return this._for(new yd("of",o,n,t),()=>s(n))}forIn(i,t,s,o=this.opts.es5?Cs.varKinds.var:Cs.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,Je._)`Object.keys(${t})`,s);let n=this._scope.toName(i);return this._for(new yd("in",o,n,t),()=>s(n))}endFor(){return this._endBlockNode(kd)}label(i){return this._leafNode(new qp(i))}break(i){return this._leafNode(new Kp(i))}return(i){let t=new dw;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(dw)}try(i,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new Zp;if(this._blockNode(o),this.code(i),t){let n=this.name("e");this._currNode=o.catch=new uw(n),t(n)}return s&&(this._currNode=o.finally=new gw,this.code(s)),this._endBlockNode(uw,gw)}throw(i){return this._leafNode(new $p(i))}block(i,t){return this._blockStarts.push(this._nodes.length),i&&this.code(i).endBlock(t),this}endBlock(i){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-t;if(s<0||i!==void 0&&s!==i)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=Je.nil,s,o){return this._blockNode(new cw(i,t,s)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(cw)}optimize(i=1){for(;i-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(i){return this._currNode.nodes.push(i),this}_blockNode(i){this._currNode.nodes.push(i),this._nodes.push(i)}_endBlockNode(i,t){let s=this._currNode;if(s instanceof i||t&&s instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${i.kind}/${t.kind}`:i.kind}"`)}_elseNode(i){let t=this._currNode;if(!(t instanceof fd))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=i,this}get _root(){return this._nodes[0]}get _currNode(){let i=this._nodes;return i[i.length-1]}set _currNode(i){let t=this._nodes;t[t.length-1]=i}};Fe.CodeGen=Qp;function Hr(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function vd(e,i){return i instanceof Je._CodeOrName?Hr(e,i.names):e}function _n(e,i,t){if(e instanceof Je.Name)return s(e);if(!o(e))return e;return new Je._Code(e._items.reduce((n,l)=>(l instanceof Je.Name&&(l=s(l)),l instanceof Je._Code?n.push(...l._items):n.push(l),n),[]));function s(n){let l=t[n.str];return l===void 0||i[n.str]!==1?n:(delete i[n.str],l)}function o(n){return n instanceof Je._Code&&n._items.some(l=>l instanceof Je.Name&&i[l.str]===1&&t[l.str]!==void 0)}}function UR(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function pw(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Je._)`!${Xp(e)}`}Fe.not=pw;var RR=mw(Fe.operators.AND);function OR(...e){return e.reduce(RR)}Fe.and=OR;var FR=mw(Fe.operators.OR);function VR(...e){return e.reduce(FR)}Fe.or=VR;function mw(e){return(i,t)=>i===Je.nil?t:t===Je.nil?i:(0,Je._)`${Xp(i)} ${e} ${Xp(t)}`}function Xp(e){return e instanceof Je.Name?e:(0,Je._)`(${e})`}});var $e=w(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.checkStrictMode=qe.getErrorPath=qe.Type=qe.useFunc=qe.setEvaluated=qe.evaluatedPropsToName=qe.mergeEvaluated=qe.eachItem=qe.unescapeJsonPointer=qe.escapeJsonPointer=qe.escapeFragment=qe.unescapeFragment=qe.schemaRefOrVal=qe.schemaHasRulesButRef=qe.schemaHasRules=qe.checkUnknownRules=qe.alwaysValidSchema=qe.toHash=void 0;var bt=ke(),qR=Ba();function KR(e){let i={};for(let t of e)i[t]=!0;return i}qe.toHash=KR;function $R(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(fw(e,i),!bw(i,e.self.RULES.all))}qe.alwaysValidSchema=$R;function fw(e,i=e.schema){let{opts:t,self:s}=e;if(!t.strictSchema||typeof i=="boolean")return;let o=s.RULES.keywords;for(let n in i)o[n]||ww(e,`unknown keyword: "${n}"`)}qe.checkUnknownRules=fw;function bw(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}qe.schemaHasRules=bw;function LR(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}qe.schemaHasRulesButRef=LR;function GR({topSchemaRef:e,schemaPath:i},t,s,o){if(!o){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,bt._)`${t}`}return(0,bt._)`${e}${i}${(0,bt.getProperty)(s)}`}qe.schemaRefOrVal=GR;function WR(e){return yw(decodeURIComponent(e))}qe.unescapeFragment=WR;function YR(e){return encodeURIComponent(tm(e))}qe.escapeFragment=YR;function tm(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}qe.escapeJsonPointer=tm;function yw(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}qe.unescapeJsonPointer=yw;function JR(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}qe.eachItem=JR;function _w({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:s}){return(o,n,l,c)=>{let u=l===void 0?n:l instanceof bt.Name?(n instanceof bt.Name?e(o,n,l):i(o,n,l),l):n instanceof bt.Name?(i(o,l,n),n):t(n,l);return c===bt.Name&&!(u instanceof bt.Name)?s(o,u):u}}qe.mergeEvaluated={props:_w({mergeNames:(e,i,t)=>e.if((0,bt._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,bt._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,bt._)`${t} || {}`).code((0,bt._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,bt._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,bt._)`${t} || {}`),im(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:be(be({},e),i),resultToName:vw}),items:_w({mergeNames:(e,i,t)=>e.if((0,bt._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,bt._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,bt._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,bt._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function vw(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,bt._)`{}`);return i!==void 0&&im(e,t,i),t}qe.evaluatedPropsToName=vw;function im(e,i,t){Object.keys(t).forEach(s=>e.assign((0,bt._)`${i}${(0,bt.getProperty)(s)}`,!0))}qe.setEvaluated=im;var hw={};function ZR(e,i){return e.scopeValue("func",{ref:i,code:hw[i.code]||(hw[i.code]=new qR._Code(i.code))})}qe.useFunc=ZR;var em=(function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e})(em||(qe.Type=em={}));function QR(e,i,t){if(e instanceof bt.Name){let s=i===em.Num;return t?s?(0,bt._)`"[" + ${e} + "]"`:(0,bt._)`"['" + ${e} + "']"`:s?(0,bt._)`"/" + ${e}`:(0,bt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,bt.getProperty)(e).toString():"/"+tm(e)}qe.getErrorPath=QR;function ww(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}qe.checkStrictMode=ww});var us=w(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var di=ke(),XR={data:new di.Name("data"),valCxt:new di.Name("valCxt"),instancePath:new di.Name("instancePath"),parentData:new di.Name("parentData"),parentDataProperty:new di.Name("parentDataProperty"),rootData:new di.Name("rootData"),dynamicAnchors:new di.Name("dynamicAnchors"),vErrors:new di.Name("vErrors"),errors:new di.Name("errors"),this:new di.Name("this"),self:new di.Name("self"),scope:new di.Name("scope"),json:new di.Name("json"),jsonPos:new di.Name("jsonPos"),jsonLen:new di.Name("jsonLen"),jsonPart:new di.Name("jsonPart")};sm.default=XR});var Ma=w(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.extendErrors=ui.resetErrorsCount=ui.reportExtraError=ui.reportError=ui.keyword$DataError=ui.keywordError=void 0;var Qe=ke(),Hd=$e(),Ci=us();ui.keywordError={message:({keyword:e})=>(0,Qe.str)`must pass "${e}" keyword validation`};ui.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,Qe.str)`"${e}" keyword must be ${i} ($data)`:(0,Qe.str)`"${e}" keyword is invalid ($data)`};function eO(e,i=ui.keywordError,t,s){let{it:o}=e,{gen:n,compositeRule:l,allErrors:c}=o,u=Sw(e,i,t);s??(l||c)?kw(n,u):Hw(o,(0,Qe._)`[${u}]`)}ui.reportError=eO;function tO(e,i=ui.keywordError,t){let{it:s}=e,{gen:o,compositeRule:n,allErrors:l}=s,c=Sw(e,i,t);kw(o,c),n||l||Hw(s,Ci.default.vErrors)}ui.reportExtraError=tO;function iO(e,i){e.assign(Ci.default.errors,i),e.if((0,Qe._)`${Ci.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,Qe._)`${Ci.default.vErrors}.length`,i),()=>e.assign(Ci.default.vErrors,null)))}ui.resetErrorsCount=iO;function sO({gen:e,keyword:i,schemaValue:t,data:s,errsCount:o,it:n}){if(o===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",o,Ci.default.errors,c=>{e.const(l,(0,Qe._)`${Ci.default.vErrors}[${c}]`),e.if((0,Qe._)`${l}.instancePath === undefined`,()=>e.assign((0,Qe._)`${l}.instancePath`,(0,Qe.strConcat)(Ci.default.instancePath,n.errorPath))),e.assign((0,Qe._)`${l}.schemaPath`,(0,Qe.str)`${n.errSchemaPath}/${i}`),n.opts.verbose&&(e.assign((0,Qe._)`${l}.schema`,t),e.assign((0,Qe._)`${l}.data`,s))})}ui.extendErrors=sO;function kw(e,i){let t=e.const("err",i);e.if((0,Qe._)`${Ci.default.vErrors} === null`,()=>e.assign(Ci.default.vErrors,(0,Qe._)`[${t}]`),(0,Qe._)`${Ci.default.vErrors}.push(${t})`),e.code((0,Qe._)`${Ci.default.errors}++`)}function Hw(e,i){let{gen:t,validateName:s,schemaEnv:o}=e;o.$async?t.throw((0,Qe._)`new ${e.ValidationError}(${i})`):(t.assign((0,Qe._)`${s}.errors`,i),t.return(!1))}var Sr={keyword:new Qe.Name("keyword"),schemaPath:new Qe.Name("schemaPath"),params:new Qe.Name("params"),propertyName:new Qe.Name("propertyName"),message:new Qe.Name("message"),schema:new Qe.Name("schema"),parentSchema:new Qe.Name("parentSchema")};function Sw(e,i,t){let{createErrors:s}=e.it;return s===!1?(0,Qe._)`{}`:oO(e,i,t)}function oO(e,i,t={}){let{gen:s,it:o}=e,n=[rO(o,t),nO(e,t)];return aO(e,i,n),s.object(...n)}function rO({errorPath:e},{instancePath:i}){let t=i?(0,Qe.str)`${e}${(0,Hd.getErrorPath)(i,Hd.Type.Str)}`:e;return[Ci.default.instancePath,(0,Qe.strConcat)(Ci.default.instancePath,t)]}function nO({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:s}){let o=s?i:(0,Qe.str)`${i}/${e}`;return t&&(o=(0,Qe.str)`${o}${(0,Hd.getErrorPath)(t,Hd.Type.Str)}`),[Sr.schemaPath,o]}function aO(e,{params:i,message:t},s){let{keyword:o,data:n,schemaValue:l,it:c}=e,{opts:u,propertyName:p,topSchemaRef:_,schemaPath:f}=c;s.push([Sr.keyword,o],[Sr.params,typeof i=="function"?i(e):i||(0,Qe._)`{}`]),u.messages&&s.push([Sr.message,typeof t=="function"?t(e):t]),u.verbose&&s.push([Sr.schema,l],[Sr.parentSchema,(0,Qe._)`${_}${f}`],[Ci.default.data,n]),p&&s.push([Sr.propertyName,p])}});var Cw=w(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.boolOrEmptySchema=hn.topBoolOrEmptySchema=void 0;var lO=Ma(),cO=ke(),dO=us(),uO={message:"boolean schema is false"};function gO(e){let{gen:i,schema:t,validateName:s}=e;t===!1?xw(e,!1):typeof t=="object"&&t.$async===!0?i.return(dO.default.data):(i.assign((0,cO._)`${s}.errors`,null),i.return(!0))}hn.topBoolOrEmptySchema=gO;function pO(e,i){let{gen:t,schema:s}=e;s===!1?(t.var(i,!1),xw(e)):t.var(i,!0)}hn.boolOrEmptySchema=pO;function xw(e,i){let{gen:t,data:s}=e,o={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,lO.reportError)(o,uO,void 0,i)}});var om=w(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.getRules=fn.isJSONType=void 0;var mO=["string","number","integer","boolean","null","object","array"],_O=new Set(mO);function hO(e){return typeof e=="string"&&_O.has(e)}fn.isJSONType=hO;function fO(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Xe(be({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}fn.getRules=fO});var rm=w(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.shouldUseRule=Wo.shouldUseGroup=Wo.schemaHasRulesForType=void 0;function bO({schema:e,self:i},t){let s=i.RULES.types[t];return s&&s!==!0&&Iw(e,s)}Wo.schemaHasRulesForType=bO;function Iw(e,i){return i.rules.some(t=>Tw(e,t))}Wo.shouldUseGroup=Iw;function Tw(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(s=>e[s]!==void 0))}Wo.shouldUseRule=Tw});var Ua=w(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.reportTypeError=gi.checkDataTypes=gi.checkDataType=gi.coerceAndCheckDataType=gi.getJSONTypes=gi.getSchemaTypes=gi.DataType=void 0;var yO=om(),vO=rm(),wO=Ma(),Ee=ke(),Pw=$e(),bn=(function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e})(bn||(gi.DataType=bn={}));function kO(e){let i=zw(e.type);if(i.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!i.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&i.push("null")}return i}gi.getSchemaTypes=kO;function zw(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(yO.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}gi.getJSONTypes=zw;function HO(e,i){let{gen:t,data:s,opts:o}=e,n=SO(i,o.coerceTypes),l=i.length>0&&!(n.length===0&&i.length===1&&(0,vO.schemaHasRulesForType)(e,i[0]));if(l){let c=am(i,s,o.strictNumbers,bn.Wrong);t.if(c,()=>{n.length?xO(e,i,n):lm(e)})}return l}gi.coerceAndCheckDataType=HO;var Aw=new Set(["string","number","integer","boolean","null"]);function SO(e,i){return i?e.filter(t=>Aw.has(t)||i==="array"&&t==="array"):[]}function xO(e,i,t){let{gen:s,data:o,opts:n}=e,l=s.let("dataType",(0,Ee._)`typeof ${o}`),c=s.let("coerced",(0,Ee._)`undefined`);n.coerceTypes==="array"&&s.if((0,Ee._)`${l} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>s.assign(o,(0,Ee._)`${o}[0]`).assign(l,(0,Ee._)`typeof ${o}`).if(am(i,o,n.strictNumbers),()=>s.assign(c,o))),s.if((0,Ee._)`${c} !== undefined`);for(let p of t)(Aw.has(p)||p==="array"&&n.coerceTypes==="array")&&u(p);s.else(),lm(e),s.endIf(),s.if((0,Ee._)`${c} !== undefined`,()=>{s.assign(o,c),CO(e,c)});function u(p){switch(p){case"string":s.elseIf((0,Ee._)`${l} == "number" || ${l} == "boolean"`).assign(c,(0,Ee._)`"" + ${o}`).elseIf((0,Ee._)`${o} === null`).assign(c,(0,Ee._)`""`);return;case"number":s.elseIf((0,Ee._)`${l} == "boolean" || ${o} === null
3
3
  || (${l} == "string" && ${o} && ${o} == +${o})`).assign(c,(0,Ee._)`+${o}`);return;case"integer":s.elseIf((0,Ee._)`${l} === "boolean" || ${o} === null
4
4
  || (${l} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(c,(0,Ee._)`+${o}`);return;case"boolean":s.elseIf((0,Ee._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(c,!1).elseIf((0,Ee._)`${o} === "true" || ${o} === 1`).assign(c,!0);return;case"null":s.elseIf((0,Ee._)`${o} === "" || ${o} === 0 || ${o} === false`),s.assign(c,null);return;case"array":s.elseIf((0,Ee._)`${l} === "string" || ${l} === "number"
@@ -28,7 +28,7 @@ function print() { __p += __j.call(arguments, '') }
28
28
  Should be: [ [ object1, pointer1 ], [ object 2, pointer2 ], etc... ]`);return}return o}if(hs(s)){for(let[l,c]of s){if(l===null||!this.isJsonPointer(c))continue;let u=n?this.getCopy(l,c):this.get(l,c);if(u)return u}return o}return console.error(`getFirst error: Input not in correct format.
29
29
  Should be: [ [ object1, pointer1 ], [ object 2, pointer2 ], etc... ]`),o}}static getFirstCopy(s,o=null){return this.getFirst(s,o,!0)}static set(s,o,n,l=!1){let c=this.parse(o);if(c!==null&&c.length){let u=s;for(let _=0;_<c.length-1;++_){let f=c[_];f==="-"&&L(u)&&(f=u.length),hs(u)&&u.has(f)?u=u.get(f):(B(u,f)||(u[f]=c[_+1].match(/^(\d+|-)$/)?[]:{}),u=u[f])}let p=c[c.length-1];return L(u)&&p==="-"?u.push(n):l&&L(u)&&!isNaN(+p)?u.splice(p,0,n):hs(u)?u.set(p,n):u[p]=n,s}return console.error(`set error: Invalid JSON Pointer: ${o}`),s}static setCopy(s,o,n,l=!1){let c=this.parse(o);if(c!==null){let u=$u(s),p=u;for(let f=0;f<c.length-1;++f){let S=c[f];S==="-"&&L(p)&&(S=p.length),hs(p)&&p.has(S)?(p.set(S,$u(p.get(S))),p=p.get(S)):(B(p,S)||(p[S]=c[f+1].match(/^(\d+|-)$/)?[]:{}),p[S]=$u(p[S]),p=p[S])}let _=c[c.length-1];return L(p)&&_==="-"?p.push(n):l&&L(p)&&!isNaN(+_)?p.splice(_,0,n):hs(p)?p.set(_,n):p[_]=n,u}return console.error(`setCopy error: Invalid JSON Pointer: ${o}`),s}static insert(s,o,n){return this.set(s,o,n,!0)}static insertCopy(s,o,n){return this.setCopy(s,o,n,!0)}static remove(s,o){let n=this.parse(o);if(n!==null&&n.length){let l=n.pop(),c=this.get(s,n);return L(c)?(l==="-"&&(l=c.length-1),c.splice(l,1)):te(c)&&delete c[l],s}return console.error(`remove error: Invalid JSON Pointer: ${o}`),s}static has(s,o){return this.get(s,o,0,null,!0)}static dict(s){let o={};return this.forEachDeep(s,(n,l)=>{typeof n!="object"&&(o[l]=n)}),o}static forEachDeep(s,o=u=>u,n=!1,l="",c=s){if(typeof o!="function"){console.error("forEachDeep error: Iterator is not a function:",o);return}if(n||o(s,l,c),te(s)||L(s))for(let u of Object.keys(s)){let p=l+"/"+this.escape(u);this.forEachDeep(s[u],o,n,p,c)}n&&o(s,l,c)}static forEachDeepCopy(s,o=u=>u,n=!1,l="",c=s){if(typeof o!="function")return console.error("forEachDeepCopy error: Iterator is not a function:",o),null;if(te(s)||L(s)){let u=L(s)?[...s]:be({},s);n||(u=o(u,l,c));for(let p of Object.keys(u)){let _=l+"/"+this.escape(p);u[p]=this.forEachDeepCopy(u[p],o,n,_,c)}return n&&(u=o(u,l,c)),u}else return o(s,l,c)}static escape(s){return s.toString().replace(/~/g,"~0").replace(/\//g,"~1")}static unescape(s){return s.toString().replace(/~1/g,"/").replace(/~0/g,"~")}static parse(s,o=!1){if(!this.isJsonPointer(s))return o&&console.error(`parse error: Invalid JSON Pointer: ${s}`),null;if(L(s))return s;if(typeof s=="string")return s[0]==="#"&&(s=s.slice(1)),s===""||s==="/"?[]:s.slice(1).split("/").map(this.unescape)}static compile(s,o="",n=!1){if(s==="#")return"";if(!this.isJsonPointer(s))return n&&console.error(`compile error: Invalid JSON Pointer: ${s}`),null;if(L(s))return s.length===0?"":"/"+s.map(l=>l===""?o:this.escape(l)).join("/");if(typeof s=="string")return s[0]==="#"&&(s=s.slice(1)),s}static toKey(s,o=!1){let n=this.parse(s,o);return n===null?null:n.length?n[n.length-1]:""}static isJsonPointer(s){if(L(s))return s.every(o=>typeof o=="string");if(yt(s)){if(s===""||s==="#")return!0;if(s[0]==="/"||s.slice(0,2)==="#/")return!/(~[^01]|~$)/g.test(s)}return!1}static isSubPointer(s,o,n=!1,l=!1){if(!this.isJsonPointer(s)||!this.isJsonPointer(o)){if(l){let c="";this.isJsonPointer(s)||(c+=` 1: ${s}`),this.isJsonPointer(o)||(c+=` 2: ${o}`),console.error(`isSubPointer error: Invalid JSON Pointer ${c}`)}return}return s=this.compile(s,"",l),o=this.compile(o,"",l),s===o?n:`${s}/`===o.slice(0,s.length+1)}static toIndexedPointer(s,o,n=null){if(this.isJsonPointer(s)&&L(o)){let l=this.compile(s);if(hs(n)){let c=0;return l.replace(/\/\-(?=\/|$)/g,(u,p)=>n.has(l.slice(0,p))?"/"+o[c++]:u)}else{for(let c of o)l=l.replace("/-","/"+c);return l}}this.isJsonPointer(s)||console.error(`toIndexedPointer error: Invalid JSON Pointer: ${s}`),L(o)||console.error(`toIndexedPointer error: Invalid indexArray: ${o}`)}static toGenericPointer(s,o=new Map){if(this.isJsonPointer(s)&&hs(o)){let n=this.parse(s);for(let l=1;l<n.length;l++){let c=this.compile(n.slice(0,l));o.has(c)&&o.get(c)<=+n[l]&&(n[l]="-")}return this.compile(n)}this.isJsonPointer(s)||console.error(`toGenericPointer error: invalid JSON Pointer: ${s}`),hs(o)||console.error(`toGenericPointer error: invalid arrayMap: ${o}`)}static toControlPointer(s,o,n=!1){let l=this.parse(s),c=[],u=o;if(l!==null){for(let p of l)if(B(u,"controls")&&(c.push("controls"),u=u.controls),L(u)&&p==="-")c.push((u.length-1).toString()),u=u[u.length-1];else if(B(u,p))c.push(p),u=u[p];else if(n){console.error(`toControlPointer error: Unable to find "${p}" item in FormGroup.`),console.error(s),console.error(o);return}else c.push(p),u={controls:{}};return this.compile(c)}console.error(`toControlPointer error: Invalid JSON Pointer: ${s}`)}static toSchemaPointer(s,o){if(this.isJsonPointer(s)&&typeof o=="object"){let n=this.parse(s);if(!n.length)return"";let l=n.shift();if(o.type==="object"||o.properties||o.additionalProperties){if((o.properties||{})[l])return`/properties/${this.escape(l)}`+this.toSchemaPointer(n,o.properties[l]);if(o.additionalProperties)return"/additionalProperties"+this.toSchemaPointer(n,o.additionalProperties)}if((o.type==="array"||o.items)&&(Ut(l)||l==="-"||l==="")){let c=l==="-"||l===""?0:+l;if(L(o.items)){if(c<o.items.length)return"/items/"+c+this.toSchemaPointer(n,o.items[c]);if(o.additionalItems)return"/additionalItems"+this.toSchemaPointer(n,o.additionalItems)}else{if(te(o.items))return"/items"+this.toSchemaPointer(n,o.items);if(te(o.additionalItems))return"/additionalItems"+this.toSchemaPointer(n,o.additionalItems)}}return console.error(`toSchemaPointer error: Data pointer ${s} not compatible with schema ${o}`),null}return this.isJsonPointer(s)||console.error(`toSchemaPointer error: Invalid JSON Pointer: ${s}`),typeof o!="object"&&console.error(`toSchemaPointer error: Invalid JSON Schema: ${o}`),null}static toDataPointer(s,o,n=!1){if(this.isJsonPointer(s)&&typeof o=="object"&&this.has(o,s)){let l=this.parse(s);if(!l.length)return"";let c=l.shift();if(c==="properties"||c==="items"&&L(o.items)){let u=l.shift(),p=this.toDataPointer(l,o[c][u]);return p===null?null:"/"+u+p}else if(c==="additionalItems"||c==="items"&&te(o.items)){let u=this.toDataPointer(l,o[c]);return u===null?null:"/-"+u}else if(["allOf","anyOf","oneOf"].includes(c)){let u=l.shift();return this.toDataPointer(l,o[c][u])}else{if(c==="not")return this.toDataPointer(l,o[c]);["contains","definitions","dependencies","additionalItems","additionalProperties","patternProperties","propertyNames"].includes(c)&&n&&console.error("toDataPointer error: Ambiguous location")}return""}return n&&(this.isJsonPointer(s)||console.error(`toDataPointer error: Invalid JSON Pointer: ${s}`),typeof o!="object"&&console.error(`toDataPointer error: Invalid JSON Schema: ${o}`),typeof o!="object"&&console.error(`toDataPointer error: Pointer ${s} invalid for Schema: ${o}`)),null}static parseObjectPath(s){if(L(s))return s;if(this.isJsonPointer(s))return this.parse(s);if(typeof s=="string"){let o=0,n=[];for(;o<s.length;){let l=s.indexOf(".",o),c=s.indexOf("[",o);if(l===-1&&c===-1)n.push(s.slice(o)),o=s.length;else if(l!==-1&&(l<c||c===-1))n.push(s.slice(o,l)),o=l+1;else{c>o&&(n.push(s.slice(o,c)),o=c);let u=s.charAt(c+1);if(u==='"'||u==="'"){let p=s.indexOf(u+"]",c);for(;p!==-1&&s.charAt(p-1)==="\\";)p=s.indexOf(u+"]",p+2);p===-1&&(p=s.length),n.push(s.slice(o+2,p).replace(new RegExp("\\"+u,"g"),u)),o=p+2}else{let p=s.indexOf("]",c);p===-1&&(p=s.length),n.push(s.slice(o+1,p)),o=p+1}s.charAt(o)==="."&&o++}}return n}console.error("parseObjectPath error: Input object path must be a string.")}};i.\u0275fac=function(o){return new(o||i)},i.\u0275prov=vi({token:i,factory:i.\u0275fac});let e=i;return e})(),Pee={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d(?::[0-5]\d)?(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"iso-date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d(?::[0-5]\d)?(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,uri:/^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,color:/^\s*(#(?:[\da-f]{3}){1,2}|rgb\((?:\d{1,3},\s*){2}\d{1,3}\)|rgba\((?:\d{1,3},\s*){3}\d*\.?\d+\)|hsl\(\d{1,3}(?:,\s*\d{1,3}%){2}\)|hsla\(\d{1,3}(?:,\s*\d{1,3}%){2},\s*\d*\.?\d+\))\s*$/gi,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,duration:/^P(?!$)(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?$/,regex:function(e){if(/[^\\]\\Z/.test(e))return!1;try{return!0}catch{return!1}}},ic=class e{static required(i){switch(i===void 0&&(i=!0),i){case!0:return(t,s=!1)=>s||Se(t.value)?null:{required:!0};case!1:return e.nullValidator;default:return Se(i.value)?null:{required:!0}}}static type(i){return Se(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o=t.value,n=L(i)?i.some(l=>o2(o,l)):o2(o,i);return Dt(n,s)?null:{type:{requiredType:i,currentValue:o}}}:e.nullValidator}static enum(i){return L(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o=t.value,n=(c,u)=>c===u||Ut(c)&&+u==+c||Es(c,"strict")&&nr(u,"boolean")===c||c===null&&!Se(u)||(0,Xi.default)(c,u),l=L(o)?o.every(c=>i.some(u=>n(u,c))):i.some(c=>n(c,o));return Dt(l,s)?null:{enum:{allowedValues:i,currentValue:o}}}:e.nullValidator}static const(i){return Se(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o=t.value,l=((c,u)=>c===u||Ut(c)&&+u==+c||Es(c,"strict")&&nr(u,"boolean")===c||c===null&&!Se(u))(i,o);return Dt(l,s)?null:{const:{requiredValue:i,currentValue:o}}}:e.nullValidator}static minLength(i){return Se(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o=yt(t.value)?t.value.length:0,n=o>=i;return Dt(n,s)?null:{minLength:{minimumLength:i,currentLength:o}}}:e.nullValidator}static maxLength(i){return Se(i)?(t,s=!1)=>{let o=yt(t.value)?t.value.length:0,n=o<=i;return Dt(n,s)?null:{maxLength:{maximumLength:i,currentLength:o}}}:e.nullValidator}static pattern(i,t=!1){return Se(i)?(s,o=!1)=>{if(Ne(s.value))return null;let n,l;typeof i=="string"?(l=t?`^${i}$`:i,n=new RegExp(l)):(l=i.toString(),n=i);let c=s.value,u=yt(c)?n.test(c):!1;return Dt(u,o)?null:{pattern:{requiredPattern:l,currentValue:c}}}:e.nullValidator}static format(i){return Se(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o,n=t.value;if(yt(n)){let l=Pee[i];typeof l=="object"?o=new RegExp(l.source,l.flags).test(n):typeof l=="function"?o=l(n):(console.error(`format validator error: "${i}" is not a recognized format.`),o=!0)}else o=["date","time","iso-date-time"].includes(i)&&Object.prototype.toString.call(n)==="[object Date]";return Dt(o,s)?null:{format:{requiredFormat:i,currentValue:n}}}:e.nullValidator}static minimum(i){return Se(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o=t.value,n=!Ut(o)||o>=i;return Dt(n,s)?null:{minimum:{minimumValue:i,currentValue:o}}}:e.nullValidator}static exclusiveMinimum(i){return Se(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o=t.value,n=!Ut(o)||+o<i;return Dt(n,s)?null:{exclusiveMinimum:{exclusiveMinimumValue:i,currentValue:o}}}:e.nullValidator}static maximum(i){return Se(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o=t.value,n=!Ut(o)||+o<=i;return Dt(n,s)?null:{maximum:{maximumValue:i,currentValue:o}}}:e.nullValidator}static exclusiveMaximum(i){return Se(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o=t.value,n=!Ut(o)||+o<i;return Dt(n,s)?null:{exclusiveMaximum:{exclusiveMaximumValue:i,currentValue:o}}}:e.nullValidator}static multipleOf(i){return Se(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o=t.value,n=Ut(o)&&o%i===0;return Dt(n,s)?null:{multipleOf:{multipleOfValue:i,currentValue:o}}}:e.nullValidator}static minProperties(i){return Se(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o=Object.keys(t.value).length||0,n=o>=i;return Dt(n,s)?null:{minProperties:{minimumProperties:i,currentProperties:o}}}:e.nullValidator}static maxProperties(i){return Se(i)?(t,s=!1)=>{let o=Object.keys(t.value).length||0,n=o<=i;return Dt(n,s)?null:{maxProperties:{maximumProperties:i,currentProperties:o}}}:e.nullValidator}static dependencies(i){return ta(i)!=="object"||Ne(i)?e.nullValidator:(t,s=!1)=>{if(Ne(t.value))return null;let o=vo(gf(i,(n,l)=>{if(!Se(t.value[l]))return null;let c={},u,p={};ta(i[l])==="array"?u=i[l]:ta(i[l])==="object"&&(u=i[l].required||[],p=i[l].properties||{});for(let _ of u)Dt(!Se(t.value[_]),s)&&(c[_]={required:!0});return c=vo(c,gf(p,(_,f)=>{let S=vo(gf(_,(C,P)=>{let H=null;if(C==="maximum"||C==="minimum"){let U=!!_["exclusiveM"+C.slice(1)];H=e[C](P,U)}else typeof e[C]=="function"&&(H=e[C](P));return ot(H)?H(t.value[f]):null}));return Ne(S)?null:{[f]:S}})),Ne(c)?null:{[l]:c}}));return Ne(o)?null:o}}static minItems(i){return Se(i)?(t,s=!1)=>{if(Ne(t.value))return null;let o=L(t.value)?t.value.length:0,n=o>=i;return Dt(n,s)?null:{minItems:{minimumItems:i,currentItems:o}}}:e.nullValidator}static maxItems(i){return Se(i)?(t,s=!1)=>{let o=L(t.value)?t.value.length:0,n=o<=i;return Dt(n,s)?null:{maxItems:{maximumItems:i,currentItems:o}}}:e.nullValidator}static uniqueItems(i=!0){return i?(t,s=!1)=>{if(Ne(t.value))return null;let o=t.value.slice().sort(),n=[];for(let c=1;c<o.length;c++)o[c-1]===o[c]&&n.includes(o[c])&&n.push(o[c]);let l=!n.length;return Dt(l,s)?null:{uniqueItems:{duplicateItems:n}}}:e.nullValidator}static contains(i=!0){return i?(t,s=!1)=>{if(Ne(t.value)||!L(t.value))return null;let o=t.value;return Dt(!0,s)?null:{contains:{requiredItem:i,currentItems:o}}}:e.nullValidator}static nullValidator(i){return null}static composeAnyOf(i){if(!i)return null;let t=i.filter(ot);return t.length===0?null:(s,o=!1)=>{let n=ec(s,t,o).filter(ot),l=i.length>n.length;return Dt(l,o)?null:vo(...n,{anyOf:!o})}}static composeOneOf(i){if(!i)return null;let t=i.filter(ot);return t.length===0?null:(s,o=!1)=>{let n=ec(s,t),c=i.length-n.filter(ot).length===1;if(Dt(c,o))return null;let u=ec(s,t,o);return vo(...n,...u,{oneOf:!o})}}static composeAllOf(i){if(!i)return null;let t=i.filter(ot);return t.length===0?null:(s,o=!1)=>{let n=uf(ec(s,t,o));return Dt(n===null,o)?null:vo(n,{allOf:!o})}}static composeNot(i){return i?(t,s=!1)=>{if(Ne(t.value))return null;let o=i(t,!s);return Dt(o===null,s)?null:vo(o,{not:!s})}:null}static compose(i){if(!i)return null;let t=i.filter(ot);return t.length===0?null:(s,o=!1)=>uf(ec(s,t,o))}static composeAsync(i){if(!i)return null;let t=i.filter(ot);return t.length===0?null:s=>{let o=fee(s,t).map(Hee);return pv.call(mv(o),uf)}}static min(i){return Se(i)?t=>{if(Ne(t.value)||Ne(i))return null;let s=parseFloat(t.value),o=t.value;return isNaN(s)||s>=i?null:{min:{min:i,actual:o}}}:e.nullValidator}static max(i){return Se(i)?t=>{if(Ne(t.value)||Ne(i))return null;let s=parseFloat(t.value),o=t.value;return isNaN(s)||s<=i?null:{max:{max:i,actual:o}}}:e.nullValidator}static requiredTrue(i){return i?i.value===!0?null:{required:!0}:e.nullValidator}static email(i){return i?/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/.test(i.value)?null:{email:!0}:e.nullValidator}};function Qi(...e){if(e=e.filter(t=>!Ne(t)),e.some(t=>!te(t)))return null;let i={};for(let t of e)for(let s of Object.keys(t)){let o=i[s],n=t[s];if(!B(i,s)||(0,Xi.default)(o,n))i[s]=n;else switch(s){case"allOf":if(L(o)&&L(n))i.allOf=Qi(...o,...n);else return{allOf:[...e]};break;case"additionalItems":case"additionalProperties":case"contains":case"propertyNames":if(te(o)&&te(n))i[s]=Qi(o,n);else if(s==="additionalProperties"&&(o===!1||n===!1))i.combinedSchema=!1;else return{allOf:[...e]};break;case"anyOf":case"oneOf":case"enum":if(L(o)&&L(n)){if(i[s]=o.filter(l=>n.findIndex(c=>(0,Xi.default)(l,c))>-1),!i[s].length)return{allOf:[...e]}}else return{allOf:[...e]};break;case"definitions":if(te(o)&&te(n)){let l=be({},o);for(let c of Object.keys(n))if(!B(l,c)||(0,Xi.default)(l[c],n[c]))l[c]=n[c];else return{allOf:[...e]};i.definitions=l}else return{allOf:[...e]};break;case"dependencies":if(te(o)&&te(n)){let l=be({},o);for(let c of Object.keys(n))if(!B(l,c)||(0,Xi.default)(l[c],n[c]))l[c]=n[c];else if(L(n[c])&&L(l[c]))l[c]=Vu(...l[c],...n[c]);else if((L(n[c])||te(n[c]))&&(L(l[c])||te(l[c]))){let u=L(i.required)?i.required:[],p=L(l[c])?{required:Vu(...u,l[c])}:l[c],_=L(n[c])?{required:Vu(...u,n[c])}:n[c];l[c]=Qi(p,_)}else return{allOf:[...e]};i.dependencies=l}else return{allOf:[...e]};break;case"items":if(L(o)&&L(n)){if(i.items=o.filter(l=>n.findIndex(c=>(0,Xi.default)(l,c))>-1),!i.items.length)return{allOf:[...e]}}else if(te(o)&&te(n))i.items=Qi(o,n);else if(L(o)&&te(n))i.items=o.map(l=>Qi(l,n));else if(te(o)&&L(n))i.items=n.map(l=>Qi(l,o));else return{allOf:[...e]};break;case"multipleOf":if(Ut(o)&&Ut(n)){let l=(u,p)=>p?l(p,u%p):u,c=(u,p)=>u*p/l(u,p);i.multipleOf=c(o,n)}else return{allOf:[...e]};break;case"maximum":case"exclusiveMaximum":case"maxLength":case"maxItems":case"maxProperties":if(Ut(o)&&Ut(n))i[s]=Math.min(o,n);else return{allOf:[...e]};break;case"minimum":case"exclusiveMinimum":case"minLength":case"minItems":case"minProperties":if(Ut(o)&&Ut(n))i[s]=Math.max(o,n);else return{allOf:[...e]};break;case"not":if(te(o)&&te(n)){let l=[o,n].reduce((c,u)=>L(u.anyOf)&&Object.keys(u).length===1?[...c,...u.anyOf]:[...c,u],[]);i.not={anyOf:l}}else return{allOf:[...e]};break;case"patternProperties":if(te(o)&&te(n)){let l=be({},o);for(let c of Object.keys(n))if(!B(l,c)||(0,Xi.default)(l[c],n[c]))l[c]=n[c];else if(te(n[c])&&te(l[c]))l[c]=Qi(l[c],n[c]);else return{allOf:[...e]};i.patternProperties=l}else return{allOf:[...e]};break;case"properties":if(te(o)&&te(n)){let l=be({},o);B(n,"additionalProperties")&&Object.keys(o).filter(c=>!Object.keys(n).includes(c)).forEach(c=>{n.additionalProperties===!1?delete l[c]:te(n.additionalProperties)&&(l[c]=Qi(l[c],n.additionalProperties))});for(let c of Object.keys(n))if((0,Xi.default)(l[c],n[c])||!B(l,c)&&!B(l,"additionalProperties"))l[c]=n[c];else if(!B(l,c)&&B(l,"additionalProperties"))te(l.additionalProperties)&&(l[c]=Qi(l.additionalProperties,n[c]));else if(te(n[c])&&te(l[c]))l[c]=Qi(l[c],n[c]);else return{allOf:[...e]};i.properties=l}else return{allOf:[...e]};break;case"required":if(L(o)&&L(n))i.required=Vu(...o,...n);else if(typeof n=="boolean"&&typeof o=="boolean")i.required=!!o||!!n;else return{allOf:[...e]};break;case"$schema":case"$id":case"id":break;case"title":case"description":case"$comment":i[s]=n;break;case"type":if((L(n)||yt(n))&&(L(o)||yt(o))){let l=Tee(o,n);if(!l.length)return{allOf:[...e]};i.type=l.length>1?l:l[0]}else return{allOf:[...e]};break;case"uniqueItems":i.uniqueItems=!!o||!!n;break;default:return{allOf:[...e]}}}return i}function ff(e,i=!1,t=!0){let s={},o=l=>{let c=ta(l,"strict");return{integer:"number",null:"string"}[c]||c},n=l=>ff(l,i,!1);if(t&&(s.$schema="http://json-schema.org/draft-06/schema#"),s.type=o(e),s.type==="object"){s.properties={},i&&(s.required=[]);for(let l of Object.keys(e))s.properties[l]=n(e[l]),i&&s.required.push(l)}else s.type==="array"&&(s.items=e.map(n),new Set(e.map(o)).size===1&&(s.items=s.items.reduce((l,c)=>be(be({},l),c),{})),i&&(s.minItems=1));return s}function zee(e,i,t="schema"){let s=K.parse(i);if(s===null)return console.error(`getFromSchema error: Invalid JSON Pointer: ${i}`),null;let o=e,n=[],l=s.length;t.slice(0,6)==="parent"&&s.length--;for(let c=0;c<l;++c){let u=o,p=s[c],_=!1;if(typeof o!="object")return console.error(`getFromSchema error: Unable to find "${p}" key in schema.`),console.error(e),console.error(i),null;if(o.type==="array"&&(!isNaN(p)||p==="-")?(B(o,"items")&&(te(o.items)?(_=!0,o=o.items,n.push("items")):L(o.items)&&!isNaN(p)&&o.items.length>=+p&&(_=!0,o=o.items[+p],n.push("items",p))),!_&&te(o.additionalItems)?(_=!0,o=o.additionalItems,n.push("additionalItems")):o.additionalItems!==!1&&(_=!0,o={},n.push("additionalItems"))):o.type==="object"&&(te(o.properties)&&B(o.properties,p)?(_=!0,o=o.properties[p],n.push("properties",p)):te(o.additionalProperties)?(_=!0,o=o.additionalProperties,n.push("additionalProperties")):o.additionalProperties!==!1&&(_=!0,o={},n.push("additionalProperties"))),!_){console.error(`getFromSchema error: Unable to find "${p}" item in schema.`),console.error(e),console.error(i);return}}return t.slice(-7)==="Pointer"?n:o}function _i(e,i,t=new Map){if(!e)return"";let s=K.toGenericPointer(K.compile(e),t);if(s.indexOf("/")===-1)return s;let o=!0;for(;o;)o=!1,i.forEach((n,l)=>{if(K.isSubPointer(n,l))for(;K.isSubPointer(l,s,!0);)s=K.toGenericPointer(n+s.slice(l.length),t),o=!0});return s}function bf(e,i=null){let t=K.getFirst([[e,"/x-schema-form/type"],[e,"/x-schema-form/widget/component"],[e,"/x-schema-form/widget"],[e,"/widget/component"],[e,"/widget"]]);if(yt(t))return yf(t,e,i);let s=e.type;if(s){if(L(s)&&(s=Wt("object",s)&&B(e,"properties")?"object":Wt("array",s)&&B(e,"items")||Wt("array",s)&&B(e,"additionalItems")?"array":Wt("string",s)?"string":Wt("number",s)?"number":Wt("integer",s)?"integer":Wt("boolean",s)?"boolean":"unknown"),s==="boolean")return"checkbox";if(s==="object"){if(B(e,"properties")||B(e,"additionalProperties"))return"section";if(B(e,"$ref"))return"$ref"}if(s==="array"){let o=K.getFirst([[e,"/items"],[e,"/additionalItems"]])||{};return B(o,"enum")&&e.maxItems!==1?yf("checkboxes",e,i):"array"}if(s==="null")return"none";if(K.has(i,"/options/titleMap")||B(e,"enum")||vf(e,null,!0))return"select";if(s==="number"||s==="integer")return(s==="integer"||B(e,"multipleOf"))&&B(e,"maximum")&&B(e,"minimum")?"range":s;if(s==="string")return{color:"color",date:"date","iso-date-time":"datetime-local",email:"email",uri:"url"}[e.format]||"text"}return B(e,"$ref")?"$ref":L(e.oneOf)?"one-of":B(e,"if")?"if":B(e,"then")?"then":B(e,"else")?"else":(console.error(`getInputType error: Unable to determine input type for ${s}`),console.error("schema",e),i&&console.error("layoutNode",i),"none")}function yf(e,i,t=null){return!yt(e)||e.slice(0,8)!=="checkbox"&&e.slice(0,5)!=="radio"?e:K.getFirst([[t,"/inline"],[t,"/options/inline"],[i,"/inline"],[i,"/x-schema-form/inline"],[i,"/x-schema-form/options/inline"],[i,"/x-schema-form/widget/inline"],[i,"/x-schema-form/widget/component/inline"],[i,"/x-schema-form/widget/component/options/inline"],[i,"/widget/inline"],[i,"/widget/component/inline"],[i,"/widget/component/options/inline"]])===!0?e.slice(0,5)==="radio"?"radios-inline":"checkboxes-inline":e}function Lu(e,i){if(!te(e))return console.error("isInputRequired error: Input schema must be an object."),!1;let t=K.parse(i);if(L(t)){if(!t.length)return e.required===!0;let s=t.pop(),o=t[t.length-1];["properties","additionalProperties","patternProperties","items","additionalItems"].includes(o)&&t.pop();let n=K.get(e,t)||{};if(L(n.required))return n.required.includes(s);if(n.type==="array")return B(n,"minItems")&&Ut(s)&&+n.minItems>+s}return!1}function tc(e,i,t){if(!te(e)||!te(e.options))return;let s={},o=n=>n.slice(0,3).toLowerCase()==="ui:"?n.slice(3):n;if(r2(s,t.formOptions.defaultWidgetOptions,[],o),[[K.get(i,"/ui:widget/options"),[]],[K.get(i,"/ui:widget"),[]],[i,["additionalProperties","additionalItems","properties","items","required","type","x-schema-form","$ref"]],[K.get(i,"/x-schema-form/options"),[]],[K.get(i,"/x-schema-form"),["items","options"]],[e,["_id","$ref","arrayItem","arrayItemType","dataPointer","dataType","items","key","name","options","recursiveReference","type","widget"]],[e.options,[]]].forEach(([n,l])=>r2(s,n,l,o)),!B(s,"titleMap")){let n=null;n=vf(i,s.flatList),n&&(s.titleMap=n),!B(s,"titleMap")&&!B(s,"enum")&&B(i,"items")&&(K.has(i,"/items/titleMap")?s.titleMap=i.items.titleMap:K.has(i,"/items/enum")?(s.enum=i.items.enum,!B(s,"enumNames")&&K.has(i,"/items/enumNames")&&(s.enumNames=i.items.enumNames)):K.has(i,"/items/oneOf")&&(n=vf(i.items,s.flatList),n&&(s.titleMap=n)))}i.type==="integer"&&!Se(s.multipleOf)&&(s.multipleOf=1),K.has(s,"/autocomplete/source")?s.typeahead=s.autocomplete:K.has(s,"/tagsinput/source")?s.typeahead=s.tagsinput:K.has(s,"/tagsinput/typeahead/source")&&(s.typeahead=s.tagsinput.typeahead),e.options=s}function vf(e={},i=null,t=!1){let s=null,o=e.oneOf||e.anyOf||null;if(L(o)&&o.every(n=>n.title)){if(o.every(n=>L(n.enum)&&n.enum.length===1)){if(t)return!0;s=o.map(n=>({name:n.title,value:n.enum[0]}))}else if(o.every(n=>n.const)){if(t)return!0;s=o.map(n=>({name:n.title,value:n.const}))}if(i!==!1&&(s||[]).filter(n=>((n||{}).name||"").indexOf(": ")).length>1){let n=s.map(l=>{let[c,u]=l.name.split(/: (.+)/);return c&&u?Xe(be({},l),{group:c,name:u}):l});(i===!0||n.some((l,c)=>c&&B(l,"group")&&l.group===n[c-1].group))&&(s=n)}}return t?!1:s}function Aee(e){if(!te(e))return null;let i={};if(B(e,"type"))switch(e.type){case"string":Vi(["pattern","format","minLength","maxLength"],t=>{B(e,t)&&(i[t]=[e[t]])});break;case"number":case"integer":Vi(["Minimum","Maximum"],t=>{let s="exclusive"+t,o=t.toLowerCase();if(B(e,o)){let n=B(e,s)&&e[s]===!0;i[o]=[e[o],n]}}),Vi(["multipleOf","type"],t=>{B(e,t)&&(i[t]=[e[t]])});break;case"object":Vi(["minProperties","maxProperties","dependencies"],t=>{B(e,t)&&(i[t]=[e[t]])});break;case"array":Vi(["minItems","maxItems","uniqueItems"],t=>{B(e,t)&&(i[t]=[e[t]])});break}return B(e,"enum")&&(i.enum=[e.enum]),i}function jee(e,i,t,s,o){if(!te(e)){console.error("resolveSchemaReferences error: schema must be an object.");return}let n=new Set,l=new Set,c=new Map,u=new Map,p={};K.forEachDeep(e,(S,C)=>{if(B(S,"$ref")&&yt(S.$ref)){let P=K.compile(S.$ref);n.add(P),l.add(C+"~~"+P),c.set(C,P)}}),n.forEach(S=>p[S]=Gu(e,S));let _=!0;for(;_;)_=!1,Array.from(c).forEach(([S,C])=>Array.from(c).filter(([P,H])=>K.isSubPointer(C,P,!0)&&!K.isSubPointer(H,C,!0)&&!l.has(S+P.slice(C.length)+"~~"+H)).forEach(([P,H])=>{l.add(S+P.slice(C.length)+"~~"+H),_=!0}));Array.from(l).map(S=>S.split("~~")).filter(([S,C])=>K.isSubPointer(C,S)).forEach(([S,C])=>u.set(S,C)),Array.from(c).filter(([S,C])=>Array.from(u.keys()).every(P=>!K.isSubPointer(S,P,!0))).forEach(([S,C])=>Array.from(u).filter(([P,H])=>!u.has(S+P.slice(C.length))&&K.isSubPointer(C,P,!0)&&!K.isSubPointer(C,S,!0)).forEach(([P,H])=>u.set(S+P.slice(C.length),S+H.slice(C.length))));let f=be({},e);return delete f.definitions,f=Gu(f,"",p,u),K.forEachDeep(f,(S,C)=>{if(yt(S.$ref)){let P=K.compile(S.$ref);K.isSubPointer(P,C,!0)||(P=_i(C,u),K.set(f,C,{$ref:`#${P}`})),B(i,"refPointer")||(i[P]=P.length?Gu(f,P,i,u):f),t.has(C)||t.set(C,P);let H=K.toDataPointer(C,f);if(!s.has(H)){let U=K.toDataPointer(P,f);s.set(H,U)}}if(S.type==="array"&&(B(S,"items")||B(S,"additionalItems"))){let P=K.toDataPointer(C,f);if(!o.has(P)){let H=L(S.items)?S.items.length:0;o.set(P,H)}}},!0),f}function Gu(e,i,t=null,s=null,o=[]){if(!t||!s)return K.getCopy(e,i);typeof i!="string"&&(i=K.compile(i)),o=[...o,i];let n=null;if(i==="")n=(0,Re.default)(e);else{let l=_i(i,s);l!==i&&(o=[...o,l]),n=K.getFirstCopy([[t,[l]],[e,i],[e,l]])}return K.forEachDeepCopy(n,(l,c)=>{if(te(l)){if(yt(l.$ref)){let u=K.compile(l.$ref);if(u.length&&o.every(p=>!K.isSubPointer(u,p,!0))){let p=Gu(e,u,t,s,o);if(Object.keys(l).length===1)return p;{let _=be({},l);return delete _.$ref,Qi(p,_)}}}if(L(l.allOf))return Dee(l);if(l.type==="array"&&L(l.required))return Bee(l)}return l},!0,i)}function Nee(e,i){return e.map(t=>(0,a2.default)(t,i))}function Dee(e){if(!te(e)||!L(e.allOf))return e;let i=e.allOf.map(o=>o.if&&o).filter(o=>!(0,es.isEmpty)(o)),t=Nee(e.allOf,["if","then","else"]),s=Qi(...t);if(Object.keys(e).length>1){let o=be({},e);delete o.allOf,s=Qi(o,s),i&&i.length>0&&(s.allOf=s.allOf||[],s.allOf.push(...i))}return s}function Bee(e){if(e.type==="array"&&L(e.required)){let i=B(e.items,"properties")?"items":B(e.additionalItems,"properties")?"additionalItems":null;i&&!B(e[i],"required")&&(B(e[i],"additionalProperties")||e.required.every(t=>B(e[i].properties,t)))&&(e=(0,Re.default)(e),e[i].required=e.required,delete e.required)}return e}function n2(e,i,t=!1){let s="",o={},n=t?"!":"",l=i.dataPointer?i.dataPointer.split("/").slice(1,-1).map((p,_)=>{let f=_==0?"":".";return p=="-"?"[arrayIndices]":f+p}).join(""):"",c=l?`model.${l}`:"model",u=c.split(".").map((p,_,f)=>f.slice(0,_+1).join(".")).join(" && ");return e.if&&Object.keys(e.if.properties).forEach((p,_)=>{let f=_>0?"&":"",C=(B(e.if.properties[p],"const")?[e.if.properties[p].const]:B(e.if.properties[p],"enum")?e.if.properties[p].enum:[]).map(P=>`"${P}"`);s+=`${f} ${u} && [${C}].includes(${c}.${p}+"")`}),o.functionBody=`return ${n}(${s})`,o}function Xn(e,i={}){let t=i.draft||null,s=i.changed||!1;if(typeof e!="object")return e;if(typeof e.map=="function")return[...e.map(l=>Xn(l,{changed:s,draft:t}))];let o=be({},e),n=["array","boolean","integer","null","number","object","string"];if(typeof o.$schema=="string"&&/http\:\/\/json\-schema\.org\/draft\-0\d\/schema\#/.test(o.$schema)&&(t=o.$schema[30]),o.contentEncoding&&(o.media={binaryEncoding:o.contentEncoding},delete o.contentEncoding,s=!0),typeof o.extends=="object"&&(o.allOf=typeof o.extends.map=="function"?o.extends.map(l=>Xn(l,{changed:s,draft:t})):[Xn(o.extends,{changed:s,draft:t})],delete o.extends,s=!0),o.disallow&&(typeof o.disallow=="string"?o.not={type:o.disallow}:typeof o.disallow.map=="function"&&(o.not={anyOf:o.disallow.map(l=>typeof l=="object"?l:{type:l})}),delete o.disallow,s=!0),typeof o.dependencies=="object"&&Object.keys(o.dependencies).some(l=>typeof o.dependencies[l]=="string")&&(o.dependencies=be({},o.dependencies),Object.keys(o.dependencies).filter(l=>typeof o.dependencies[l]=="string").forEach(l=>o.dependencies[l]=[o.dependencies[l]]),s=!0),typeof o.maxDecimal=="number"&&(o.multipleOf=1/Math.pow(10,o.maxDecimal),delete o.divisibleBy,s=!0,(!t||t===2)&&(t=1)),typeof o.divisibleBy=="number"&&(o.multipleOf=o.divisibleBy,delete o.divisibleBy,s=!0),typeof o.minimum=="number"&&o.minimumCanEqual===!1?(o.exclusiveMinimum=o.minimum,delete o.minimum,s=!0,t||(t=2)):typeof o.minimumCanEqual=="boolean"&&(delete o.minimumCanEqual,s=!0,t||(t=2)),typeof o.minimum=="number"&&o.exclusiveMinimum===!0?(o.exclusiveMinimum=o.minimum,delete o.minimum,s=!0):typeof o.exclusiveMinimum=="boolean"&&(delete o.exclusiveMinimum,s=!0),typeof o.maximum=="number"&&o.maximumCanEqual===!1?(o.exclusiveMaximum=o.maximum,delete o.maximum,s=!0,t||(t=2)):typeof o.maximumCanEqual=="boolean"&&(delete o.maximumCanEqual,s=!0,t||(t=2)),typeof o.maximum=="number"&&o.exclusiveMaximum===!0?(o.exclusiveMaximum=o.maximum,delete o.maximum,s=!0):typeof o.exclusiveMaximum=="boolean"&&(delete o.exclusiveMaximum,s=!0),typeof o.properties=="object"){let l=be({},o.properties),c=Array.isArray(o.required)?new Set(o.required):new Set;if((t===1||t===2||Object.keys(l).some(u=>l[u].optional===!0))&&(Object.keys(l).filter(u=>l[u].optional!==!0).forEach(u=>c.add(u)),s=!0,t||(t=2)),Object.keys(l).some(u=>l[u].required===!0)&&(Object.keys(l).filter(u=>l[u].required===!0).forEach(u=>c.add(u)),s=!0),c.size&&(o.required=Array.from(c)),Object.keys(l).some(u=>l[u].requires)){let u=typeof o.dependencies=="object"?be({},o.dependencies):{};Object.keys(l).filter(p=>l[p].requires).forEach(p=>u[p]=typeof l[p].requires=="string"?[l[p].requires]:l[p].requires),o.dependencies=u,s=!0,t||(t=2)}o.properties=l}if(typeof o.optional=="boolean"&&(delete o.optional,s=!0,t||(t=2)),o.requires&&delete o.requires,typeof o.required=="boolean"&&delete o.required,typeof o.id=="string"&&!o.$id&&(o.id.slice(-1)==="#"&&(o.id=o.id.slice(0,-1)),o.$id=o.id+"-CONVERTED-TO-DRAFT-06#",delete o.id,s=!0),o.type&&(typeof o.type.every=="function"?!o.type.every(l=>n.includes(l)):!n.includes(o.type))&&(s=!0),typeof o.$schema=="string"&&/http\:\/\/json\-schema\.org\/draft\-0[1-4]\/schema\#/.test(o.$schema))o.$schema="http://json-schema.org/draft-06/schema#",s=!0;else if(s&&typeof o.$schema=="string"){let l="Converted to draft 6 from "+o.$schema;typeof o.description=="string"&&o.description.length?o.description+=`
30
30
  `+l:o.description=l,delete o.$schema}if(o.type&&(typeof o.type.every=="function"?!o.type.every(l=>n.includes(l)):!n.includes(o.type)))if(o.type.length===1&&(o.type=o.type[0]),typeof o.type=="string")o.type==="any"?o.type=n:delete o.type;else if(typeof o.type=="object"){if(typeof o.type.every=="function")if(o.type.every(l=>typeof l=="string"))o.type=o.type.some(l=>l==="any")?o.type=n:o.type.filter(l=>n.includes(l));else if(o.type.length>1){let l=["additionalItems","items","maxItems","minItems","uniqueItems","contains"],c=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"],u=["maxProperties","minProperties","required","additionalProperties","properties","patternProperties","dependencies","propertyNames"],p=["maxLength","minLength","pattern","format"],_={array:[...c,...u,...p],integer:[...l,...u,...p],number:[...l,...u,...p],object:[...l,...c,...p],string:[...l,...c,...u],all:[...l,...c,...u,...p]},f=[];for(let S of o.type){let C=typeof S=="string"?{type:S}:be({},S);Object.keys(o).filter(P=>!C.hasOwnProperty(P)&&![..._[C.type]||_.all,"type","default"].includes(P)).forEach(P=>C[P]=o[P]),f.push(C)}o=o.hasOwnProperty("default")?{anyOf:f,default:o.default}:{anyOf:f}}else{let l=o.type;delete o.type,Object.assign(o,l)}}else delete o.type;return Object.keys(o).filter(l=>typeof o[l]=="object").forEach(l=>{if(["definitions","dependencies","properties","patternProperties"].includes(l)&&typeof o[l].map!="function"){let c={};Object.keys(o[l]).forEach(u=>c[u]=Xn(o[l][u],{changed:s,draft:t})),o[l]=c}else["items","additionalItems","additionalProperties","allOf","anyOf","oneOf","not"].includes(l)?o[l]=Xn(o[l],{changed:s,draft:t}):o[l]=(0,Re.default)(o[l])}),o}function Rr(e){return e.replace(/\//g,"$")}function Ds(e,i=null,t=!0,s="",o="",n=""){let l=K.get(e.schema,s);t?!ot(i)&&(e.formOptions.setSchemaDefaults===!0||e.formOptions.setSchemaDefaults==="auto"&&Ne(e.formValues))&&(i=K.get(e.schema,s+"/default")):i=null;let c=K.get(l,"/type"),p=(B(l,"if")||B(l,"then")||B(l,"else"))&&!c?"IfThenElse":(B(l,"properties")||B(l,"additionalProperties"))&&c==="object"?"FormGroup":(B(l,"items")||B(l,"additionalItems"))&&c==="array"?"FormArray":!c&&B(l,"$ref")?"$ref":"FormControl",_=_i(o,e.dataRecursiveRefMap,e.arrayMap);e.dataMap.has(_)||e.dataMap.set(_,new Map);let f=e.dataMap.get(_);f.has("schemaType")||(f.set("schemaPointer",s),f.set("schemaType",l.type),l.format&&(f.set("schemaFormat",l.format),l.type||f.set("schemaType","string")),p&&(f.set("templatePointer",n),f.set("templateType",p)));let S,C=Aee(l);switch(p){case"FormGroup":if(S={},B(l,"ui:order")||B(l,"properties")){let ie=l["ui:order"]||Object.keys(l.properties);if(ie.includes("*")&&!B(l.properties,"*")){let oe=Object.keys(l.properties).filter(me=>!ie.includes(me));for(let me=ie.length-1;me>=0;me--)ie[me]==="*"&&ie.splice(me,1,...oe)}ie.filter(oe=>B(l.properties,oe)||B(l,"additionalProperties")).forEach(oe=>{S[oe]=Ds(e,K.get(i,[oe]),t,s+(B(l.properties,oe)?"/properties/"+oe:"/additionalProperties"),o+"/"+oe,n+"/controls/"+oe),["allOf","anyOf","oneOf"].forEach(me=>{S[oe].controls&&S[oe].controls[`_${me}`]&&(Object.keys(S[oe].controls[`_${me}`]).forEach(Le=>{S[Le]=S[oe].controls[`_${me}`][Le],delete S[oe].controls[Le]}),delete S[oe].controls[`_${me}`])})}),B(l,"if")&&["then","else"].forEach(oe=>{if(B(l,oe)){let me=`/${oe}`,Le=Ds(e,i,t,s+me,o,n+`/controls/${oe}`);Object.assign(S,Le.controls)}});let ee=["allOf","anyOf","oneOf","if","then","else","type","properties","items"];["allOf","anyOf","oneOf"].forEach(oe=>{B(l,oe)&&L(l[oe])&&l[oe].forEach((me,Le)=>{let it=Object.keys(me),dt=ee.filter(lt=>it.includes(lt));if(dt&&dt.length>0){let lt=`/${oe}/${Le}`,Zt=i;oe=="oneOf"&&(Zt=i);let Qt=Ds(e,Zt,t,s+lt,o,n+"/controls/"+Le);Qt.controls&&Object.keys(Qt.controls).forEach(kt=>{let Zs=B(l,"properties")?"/properties/"+kt:kt,hi=Qt.controls[kt].schemaPointer||`${s}${lt}${Zs}`;hi=Rr(hi);let Tt=(0,Re.default)(Qt.controls[kt]);Tt.key=kt,Tt.schemaPointer=Tt.schemaPointer||`${s}${lt}${Zs}`,S[hi]=Tt;let tg=kt.startsWith("$oneOf")?Tt.schemaPointer:lt,lr=K.get(e.schema,Tt.schemaPointer),Qs=Tt.schemaPointer.replace(/(anyOf|allOf|oneOf|none)\/[\d]+\//g,"").replace(/(if|then|else|properties)\//g,"").replace(/\/items\//g,"/-/");Qs=Qs.indexOf(o)==0?Qs.substring(o.length):Qs;let Ho=K.get(i,Qs),Fr=kt,ra=Ho;B(Tt,"value")&&(e.ajv.validate(lr,ra)?Tt.value.value=lr.properties?ra[Fr]:ra:Tt.value.value=null),S[`_${oe}`]=S[`_${oe}`]||{},S[`_${oe}`][hi]=Tt})}})}),e.formOptions.fieldsRequired=Eee(l,S)}return{controlType:p,controls:S,validators:C,schemaPointer:s};case"FormArray":S=[];let P=Math.max(l.minItems||0,f.get("minItems")||0),H=Math.min(l.maxItems||1e3,f.get("maxItems")||1e3),U=null;if(L(l.items)){let ie=f.get("tupleItems")||(L(l.items)?Math.min(l.items.length,H):0);for(let ee=0;ee<ie;ee++)if(ee<P)S.push(Ds(e,L(i)?i[ee]:i,t,s+"/items/"+ee,o+"/"+ee,n+"/controls/"+ee));else{let oe=_i(s+"/items/"+ee,e.schemaRecursiveRefMap),me=_i(_+"/"+ee,e.dataRecursiveRefMap,e.arrayMap),Le=me!==_+"/"+ee;B(e.templateRefLibrary,me)||(e.templateRefLibrary[me]=null,e.templateRefLibrary[me]=Ds(e,null,t,oe,me,n+"/controls/"+ee)),S.push(L(i)?Ds(e,i[ee],t,s+"/items/"+ee,o+"/"+ee,n+"/controls/"+ee):Le?null:(0,Re.default)(e.templateRefLibrary[me]))}l.items.length<H&&te(l.additionalItems)&&(U=s+"/additionalItems")}else U=s+"/items";if(U){let ie=_i(U,e.schemaRecursiveRefMap),ee=_i(_+"/-",e.dataRecursiveRefMap,e.arrayMap),oe=ee!==_+"/-";B(e.templateRefLibrary,ee)||(e.templateRefLibrary[ee]=null,e.templateRefLibrary[ee]=Ds(e,null,t,ie,ee,n+"/controls/-"));let me=f;if(!oe||B(C,"required")){let Le=Math.min(Math.max(oe?0:me.get("tupleItems")+me.get("listItems")||0,L(i)?i.length:0),H);for(let it=S.length;it<Le;it++)S.push(L(i)?Ds(e,i[it],t,ie,o+"/-",n+"/controls/-"):oe?null:(0,Re.default)(e.templateRefLibrary[ee]))}}return{controlType:p,controls:S,validators:C,schemaPointer:s};case"$ref":let F=K.compile(l.$ref),de=K.toDataPointer(F,l),ce=_i(de,e.dataRecursiveRefMap,e.arrayMap);if(ce&&!B(e.templateRefLibrary,ce)){e.templateRefLibrary[ce]=null;let ie=Ds(e,t,t,F);ie?e.templateRefLibrary[ce]=ie:delete e.templateRefLibrary[ce]}return null;case"FormControl":let ne={value:t&&bee(i)?i:null,disabled:f.get("disabled")||!1};return{controlType:p,value:ne,validators:C,schemaPointer:s};case"IfThenElse":S={};let G;return B(l,"if")&&["then","else"].forEach(ie=>{if(B(l,ie)){let ee=`/${ie}`,oe=Ds(e,i,t,s+ee,o,n+`/controls/${ie}`);B(oe,"controls")&&Object.keys(oe.controls).forEach(me=>{let Le=oe.controls[me].schemaPointer;if(Le){Le=Rr(Le);let it=Object.assign({},oe.controls[me]);S[Le]=it}})}}),{controlType:p,controls:S,validators:C,schemaPointer:s};default:return null}}function sc(e){let i=[],t=null;if(B(e,"validators")&&(Vi(e.validators,(s,o)=>{typeof ic[o]=="function"&&i.push(ic[o].apply(null,s))}),i.length&&Wt(e.controlType,["FormGroup","FormArray"])&&(t=i.length>1?ic.compose(i):i[0])),B(e,"controlType"))switch(e.controlType){case"FormGroup":let s={};return Vi(e.controls,(o,n)=>{let l=sc(o);l&&(s[n]=l)}),new Pv(s,t);case"FormArray":return new Bv((0,l2.default)((0,c2.default)(e.controls,o=>sc(o))),t);case"FormControl":return new jv(e.value,i)}return null}function Eee(e,i){let t=!1;if(B(e,"required")&&!Ne(e.required)){t=!0;let s=L(e.required)?e.required:[e.required];s=Vi(s,o=>K.set(i,"/"+o+"/validators/required",[]))}return t}function Mee(e,i,t,s,o=!1,n=!1){if(e===null||typeof e!="object")return e;let l=L(e)?[]:{};return K.forEachDeep(e,(c,u)=>{if(o&&L(c))K.set(l,u,[]);else if(o&&te(c)&&!ia(c))K.set(l,u,{});else{let p=K.has(i,[u,"schemaType"])?u:_i(u,t,s);if(K.has(i,[p,"schemaType"])){let _=i.get(p).get("schemaType");if(_==="null")K.set(l,u,null);else if((Se(c)||o)&&Wt(_,["string","integer","number","boolean"])){let f=n||c===null&&o?vee(c,_):nr(c,_);(ot(f)||o)&&K.set(l,u,f)}}else if(typeof c!="object"||ia(c)||c===null&&o){if(p.indexOf("/$")>=0)return l;console.error(`formatFormData error: Schema type not found for form value at ${p}`),console.error("dataMap",i),console.error("recursiveRefMap",t),console.error("genericPointer",p)}}}),l}function qu(e,i,t=!1,s){if(!te(e)||!K.isJsonPointer(i)){if(!K.isJsonPointer(i)){if(typeof i=="string"){let l=s?Rr(s):i,c=e.get(l);if(c)return c}console.error(`getControl error: Invalid JSON Pointer: ${i}`)}return te(e)||console.error(`getControl error: Invalid formGroup: ${e}`),null}let o=K.parse(i);if(t&&(o=o.slice(0,-1)),typeof e.get=="function"&&o.every(l=>l.indexOf(".")===-1)){let l=s?Rr(s):o.join("."),c=e.get(l);if(c)return c}let n=e;for(let l of o){if(B(n,"controls")&&(n=n.controls),s&&B(n,Rr(s)))return n=n[Rr(s)],n;if(L(n)&&l==="-")n=n[n.length-1];else if(B(n,l))n=n[l];else{console.error(`getControl error: Unable to find "${l}" item in FormGroup.`),console.error(i),console.error(e);return}}return n}function Uee(e,i,t,s){let o=K.parse(i),n=e;for(let c=0;c<o.length-1;c++)if(n=n.get(o[c]),typeof n.setControl!="function")throw new Error(`Path '${o[c]}' is not a valid FormGroup or FormArray.`);let l=o[o.length-1];n.setControl(l,t)}function Ree(e,i){let t=!K.get(e,"/formOptions/addSubmit"),s=m2(e.layout,(o,n,l)=>{let c={_id:(0,wo.default)(),options:{}};if(te(o))Object.assign(c,o),Object.keys(c).filter(p=>!Wt(p,["_id","$ref","arrayItem","arrayItemType","dataPointer","dataType","items","key","name","options","recursiveReference","type","widget"])).forEach(p=>{c.options[p]=c[p],delete c[p]}),!B(c,"type")&&yt(c.widget)&&(c.type=c.widget,delete c.widget),B(c.options,"title")||B(c.options,"legend")&&(c.options.title=c.options.legend,delete c.options.legend),B(c.options,"validationMessages")||(B(c.options,"errorMessages")?(c.options.validationMessages=c.options.errorMessages,delete c.options.errorMessages):B(c.options,"validationMessage")&&(typeof c.options.validationMessage=="string"?c.options.validationMessages=c.options.validationMessage:(c.options.validationMessages={},Object.keys(c.options.validationMessage).forEach(p=>{let _=p+"",f=_==="0"?"type":_==="1"?"enum":_==="100"?"multipleOf":_==="101"?"minimum":_==="102"?"exclusiveMinimum":_==="103"?"maximum":_==="104"?"exclusiveMaximum":_==="200"?"minLength":_==="201"?"maxLength":_==="202"?"pattern":_==="300"?"minProperties":_==="301"?"maxProperties":_==="302"?"required":_==="304"?"dependencies":_==="400"?"minItems":_==="401"?"maxItems":_==="402"?"uniqueItems":_==="500"?"format":_+"";c.options.validationMessages[f]=c.options.validationMessage[p]})),delete c.options.validationMessage));else if(K.isJsonPointer(o))c.dataPointer=o;else if(yt(o))c.key=o;else return console.error("buildLayout error: Form layout element not recognized:"),console.error(o),null;let u=null;if(!B(c,"dataPointer")){if(B(c,"key"))c.dataPointer=c.key==="*"?c.key:K.compile(K.parseObjectPath(c.key),"-"),delete c.key;else if(B(c,"type")&&c.type.slice(-5)==="array"){let p=f=>{if(!(f===null||typeof f!="object")){if(B(f,"dataPointer"))return f.dataPointer;if(L(f.items))for(let S of f.items){if(B(S,"dataPointer")&&S.dataPointer.indexOf("/-")!==-1)return S.dataPointer;if(B(S,"items")){let C=p(S);if(C)return C}}}},_=p(c);_&&(c.dataPointer=_.slice(0,_.lastIndexOf("/-")))}}if(B(c,"dataPointer")){if(c.dataPointer==="*")return Bs(e,i,e.formValues);let p=K.get(e.formValues,c.dataPointer.replace(/\/-/g,"/1"));c.dataPointer=K.toGenericPointer(c.dataPointer,e.arrayMap);let _=K.toKey(c.dataPointer);!c.name&&yt(_)&&_!=="-"&&(c.name=_);let f=_i(c.dataPointer,e.dataRecursiveRefMap,e.arrayMap),S=!f.length||f!==c.dataPointer,C;e.dataMap.has(f)||e.dataMap.set(f,new Map);let P=e.dataMap.get(f);if(P.has("schemaPointer")?C=P.get("schemaPointer"):(C=K.toSchemaPointer(f,e.schema),P.set("schemaPointer",C)),u=K.get(e.schema,C),u){if(!B(c,"type"))c.type=bf(u,c);else if(i.hasWidget(c.type))c.type=yf(c.type,u,c);else{let H=c.type;c.type=bf(u,c),console.error(`error: widget type "${H}" not found in library. Replacing with "${c.type}".`)}u.type==="object"&&L(u.required)&&P.set("required",u.required),c.dataType=u.type||(B(u,"$ref")?"$ref":null),tc(c,u,e),P.set("disabled",!!c.options.disabled),c.type==="checkboxes"&&B(u,"items")?tc(c,u.items,e):c.dataType==="array"&&(c.options.maxItems=Math.min(u.maxItems||1e3,c.options.maxItems||1e3),c.options.minItems=Math.max(u.minItems||0,c.options.minItems||0),c.options.listItems=Math.max(c.options.listItems||0,L(p)?p.length:0),c.options.tupleItems=L(u.items)?u.items.length:0,c.options.maxItems<c.options.tupleItems?(c.options.tupleItems=c.options.maxItems,c.options.listItems=0):c.options.maxItems<c.options.tupleItems+c.options.listItems?c.options.listItems=c.options.maxItems-c.options.tupleItems:c.options.minItems>c.options.tupleItems+c.options.listItems&&(c.options.listItems=c.options.minItems-c.options.tupleItems),P.has("maxItems")||(P.set("maxItems",c.options.maxItems),P.set("minItems",c.options.minItems),P.set("tupleItems",c.options.tupleItems),P.set("listItems",c.options.listItems)),e.arrayMap.has(f)||e.arrayMap.set(f,c.options.tupleItems)),Lu(e.schema,C)&&(c.options.required=!0,e.fieldsRequired=!0)}else tc(c,{},e);if(!c.options.title&&!/^\d+$/.test(c.name)&&(c.options.title=ko(c.name)),B(c.options,"copyValueTo")&&(typeof c.options.copyValueTo=="string"&&(c.options.copyValueTo=[c.options.copyValueTo]),L(c.options.copyValueTo)&&(c.options.copyValueTo=c.options.copyValueTo.map(H=>K.compile(K.parseObjectPath(H),"-")))),c.widget=i.getWidget(c.type),P.set("inputType",c.type),P.set("widget",c.widget),c.dataType==="array"&&(B(c,"items")||B(c,"additionalItems"))){let H=_i(c.dataPointer+"/-",e.dataRecursiveRefMap,e.arrayMap);if(e.dataMap.has(H)||e.dataMap.set(H,new Map),e.dataMap.get(H).set("inputType","section"),c.items.length>1){let U=[];for(let F=c.items.length-1;F>=0;F--){let de=c.items[F];if(B(de,"dataPointer")&&de.dataPointer.slice(0,H.length)===H){let ce=c.items.splice(F,1)[0];ce.dataPointer=c.dataPointer+"/-"+ce.dataPointer.slice(H.length),U.unshift(ce)}else de.arrayItem=!0,de.arrayItemType="list",de.removable=c.options.removable!==!1}U.length&&c.items.push({_id:(0,wo.default)(),arrayItem:!0,arrayItemType:c.options.tupleItems>c.items.length?"tuple":"list",items:U,options:{removable:c.options.removable!==!1},dataPointer:c.dataPointer+"/-",type:"section",widget:i.getWidget("section")})}else c.items[0].arrayItem=!0,c.items[0].dataPointer||(c.items[0].dataPointer=K.toGenericPointer(H,e.arrayMap)),K.has(c,"/items/0/options/removable")||(c.items[0].options.removable=!0),c.options.orderable===!1&&(c.items[0].options.orderable=!1),c.items[0].arrayItemType=c.options.tupleItems?"tuple":"list";if(L(c.items)){let U=c.items.filter(F=>F.type!=="$ref").length-c.options.tupleItems;U>c.options.listItems&&(c.options.listItems=U,P.set("listItems",U))}if(B(e.layoutRefLibrary,H)||(e.layoutRefLibrary[H]=(0,Re.default)(c.items[c.items.length-1]),S&&(e.layoutRefLibrary[H].recursiveReference=!0),Vi(e.layoutRefLibrary[H],(U,F)=>{B(U,"_id")&&(U._id=null),S&&B(U,"dataPointer")&&(U.dataPointer=U.dataPointer.slice(H.length))},"top-down")),!c.recursiveReference||c.options.required){let U=Math.min(Math.max(c.options.tupleItems+c.options.listItems,L(p)?p.length:0),c.options.maxItems);for(let F=c.items.length;F<U;F++)c.items.push(Yu({$ref:H,dataPointer:c.dataPointer,recursiveReference:c.recursiveReference},e,i))}if(c.options.addable!==!1&&c.options.minItems<c.options.maxItems&&(c.items[c.items.length-1]||{}).type!=="$ref"){let U="Add";if(c.options.title)/^add\b/i.test(c.options.title)?U=c.options.title:U+=" "+c.options.title;else if(c.name&&!/^\d+$/.test(c.name))/^add\b/i.test(c.name)?U+=" "+ko(c.name):U=ko(c.name);else{let F=zee(e.schema,c.dataPointer,"parentSchema");if(B(F,"title"))U+=" to "+F.title;else{let de=K.parse(c.dataPointer);U+=" to "+ko(de[de.length-2])}}c.items.push({_id:(0,wo.default)(),arrayItem:!0,arrayItemType:"list",dataPointer:c.dataPointer+"/-",options:{listItems:c.options.listItems,maxItems:c.options.maxItems,minItems:c.options.minItems,removable:!1,title:U,tupleItems:c.options.tupleItems},recursiveReference:S,type:"$ref",widget:i.getWidget("$ref"),$ref:H}),yt(K.get(c,"/style/add"))&&(c.items[c.items.length-1].options.fieldStyle=c.style.add,delete c.style.add,Ne(c.style)&&delete c.style)}}else c.arrayItem=!1}else if(B(c,"type")||B(c,"items")){let p=K.get(e.layout,l,0,-2).type;B(c,"type")||(c.type=Wt(p,["tabs","tabarray"])?"tab":"array"),c.arrayItem=p==="array",c.widget=i.getWidget(c.type),tc(c,{},e)}return c.type==="submit"&&(t=!0),c});if(e.hasRootReference){let o=(0,Re.default)(s);o[o.length-1].type==="submit"&&o.pop(),e.layoutRefLibrary[""]={_id:null,dataPointer:"",dataType:"object",items:o,name:"",options:(0,Re.default)(e.formOptions.defaultWidgetOptions),recursiveReference:!0,required:!1,type:"section",widget:i.getWidget("section")}}return t||s.push({_id:(0,wo.default)(),options:{title:"Submit"},type:"submit",widget:i.getWidget("submit")}),s}function Oee(e,i){let t=Ree(e,i);if(e.formValues){let s=Fee({builtLayout:t,formData:e.formValues})}return t}function Fee(e){let{builtLayout:i,formData:t}=e,s={},o=function(p,_,f){if((0,Ku.default)(p)){f&&f(p,_),p.forEach((S,C)=>{f&&f(S,_+"/"+C),o(S,_+"/"+C,f)});return}if((0,d2.default)(p)){f&&f(p,_),Object.keys(p).forEach(S=>{f&&f(p[S],_+"/"+S),o(p[S],_+"/"+S,f)});return}};o(t,"",(p,_)=>{(0,Ku.default)(p)&&(s[_]=s[_]||p.length)});let n=p=>{let{data:_,dataPointer:f,indexArray:S}=p,C=0,P=f.substring(1).split("/").map((U,F)=>U=="-"&&S[C]!=null?S[C++]:U).join("/");return P="/"+P,s[P]},l=p=>{let _={type:"section",recursiveReference:!1,items:[]};return(0,Re.default)(p)},c=p=>{let{builtLayout:_,indices:f,parentDataPointer:S,indexPos:C}=p;if(f=f||[],C=C??(C=-1),(0,Ku.default)(_)){_.forEach((H,U)=>{c({builtLayout:H,indices:f,indexPos:C,parentDataPointer:S})});return}let P=["array"];if(_.items&&P.indexOf(_.dataType)>=0&&_.dataPointer&&!_.recursiveReference){let H=n({data:t,dataPointer:_.dataPointer,indexArray:f}),U=_.items.length;if(_.items.forEach(F=>{F.type&&F.type=="$ref"&&U--}),U=Math.max(U,0),U<H){let F=H-U;U==0&&_.items[0].recursiveReference&&(F=0);for(let de=0;de<F;de++){let ne=_.items[0].type&&_.items[0].type=="$ref"?l(_.items[0]):(0,Re.default)(_.items[0]);ne._id=(0,wo.default)("new_"),_.items.unshift(ne)}_.options.listItems&&(_.options.listItems=H)}f[_.dataPointer]=f[_.dataPointer]||-1,C++,_.items.forEach((F,de)=>{f[C]=de,c({builtLayout:F,indices:f,parentDataPointer:_.dataPointer,indexPos:C})}),C--}else _.items&&_.items.forEach((H,U)=>{c({builtLayout:H,indices:f,parentDataPointer:S,indexPos:C})})};return c({builtLayout:i}),i}function Bs(e,i,t=null,s="",o="",n=!1,l=null,c=null,u=!1,p="",_){function f(ne,G,ie,ee,oe){if(ne){if(oe&&oe.isITEItem&&oe.options.condition)return;L(ne)?ne.forEach(me=>{me.isITEItem=!0,me.options.condition=n2(C,me,ee),f(me,G,ie,ee,ne)}):B(ne,"items")?f(ne.items,G,ie,ee,ne):(ne.isITEItem=!0,ne.options.condition=n2(C,ne,ee))}}let S=_||e.schema,C=K.get(S,s);if(!B(C,"type")&&!B(C,"$ref")&&!B(C,"x-schema-form")&&!B(C,"if")&&!B(C,"then")&&!B(C,"else"))return null;let P=bf(C);!ot(t)&&(e.formOptions.setSchemaDefaults===!0||e.formOptions.setSchemaDefaults==="auto"&&Ne(e.formValues))&&(t=K.get(S,s+"/default"));let H={_id:u?null:(0,wo.default)(),arrayItem:n,dataPointer:K.toGenericPointer(o,e.arrayMap),dataType:C.type||(B(C,"$ref")?"$ref":null),options:{},required:Lu(S,s),type:P,widget:i.getWidget(P)},U=K.toKey(H.dataPointer);U!=="-"&&(H.name=U),H.arrayItem&&(H.arrayItemType=l,H.options.removable=c!==!1);let F=_i(p+o,e.dataRecursiveRefMap,e.arrayMap),de=!F.length||F!==p+o;e.dataMap.has(F)||e.dataMap.set(F,new Map),tc(H,C,e);let ce=e.dataMap.get(F);if(ce.has("inputType")||(ce.set("schemaPointer",s),ce.set("inputType",H.type),ce.set("widget",H.widget),ce.set("disabled",!!H.options.disabled)),!H.options.title&&H.name&&!/^\d+$/.test(H.name)&&(H.options.title=ko(H.name)),H.dataType==="object"){if(L(C.required)&&!ce.has("required")&&ce.set("required",C.required),te(C.properties)){let ne=[],G=C["ui:order"]||Object.keys(C.properties);if(G.includes("*")&&!B(C.properties,"*")){let ie=Object.keys(C.properties).filter(ee=>!G.includes(ee));for(let ee=G.length-1;ee>=0;ee--)G[ee]==="*"&&G.splice(ee,1,...ie)}G.filter(ie=>B(C.properties,ie)||B(C,"additionalProperties")).forEach(ie=>{let ee=B(C.properties,ie)?"/properties/"+ie:"/additionalProperties",oe=Bs(e,i,te(t)?t[ie]:null,s+ee,o+"/"+ie,!1,null,null,u,p);oe&&(oe.schemaPointer=s+ee,Lu(C,"/"+ie)&&(oe.options.required=!0,e.fieldsRequired=!0),ne.push(oe))}),["allOf","anyOf","oneOf"].forEach(ie=>{if(B(C,ie)&&L(C[ie])){let ee;ie=="oneOf"&&(ee=Bs(e,i,C.oneOf,"/",o,!1,null,null,u,p,{type:"one-of",items:C.oneOf,oneOf:C.oneOf}),ne.push(ee)),C[ie].forEach((oe,me)=>{let Le=`/${ie}/${me}`,it=Bs(e,i,oe,s+Le,o,!1,null,null,ie=="oneOf",p);if(it)if(it.items&&it.items.forEach(dt=>{let lt=B(oe,"properties")?"/properties/"+dt.name:dt.name,Zt={anyOf:"anyOfPointer",oneOf:"oneOfPointer"}[ie];dt[Zt]=Zt?dt.schemaPointer:void 0}),L(it)){let dt=(0,Re.default)(H);it.forEach(lt=>{let Zt=B(oe,"properties")?"/properties/"+lt.name:lt.name;ie=="anyOf"&&(lt.anyOfPointer=lt.schemaPointer),ee?(dt.items=dt.items||[],dt.items.push(lt)):ne.push(lt)}),ee&&(ee.items=ee.items||[],ee.items.push(dt))}else if(ee){let dt={anyOf:"anyOfPointer",oneOf:"oneOfPointer"}[ie];it[dt]=dt?s+Le:void 0,ee.items=ee.items||[],ee.items.push(it)}else ne.push(it)})}}),B(C,"if")&&["then","else"].forEach(ie=>{if(B(C,ie)){let ee=`/${ie}`,oe=ie=="else",me=Bs(e,i,t[ie],s+ee,o,!1,null,null,u,p);me&&(f(me,s,ee,oe),L(me)?me.forEach(Le=>{ne.push(Le)}):ne.push(me))}}),o===""&&!u?H=ne:H.items=ne}}else if(H.dataType==="array"){H.items=[],H.options.maxItems=Math.min(C.maxItems||1e3,H.options.maxItems||1e3),H.options.minItems=Math.max(C.minItems||0,H.options.minItems||0),!H.options.minItems&&Lu(S,s)&&(H.options.minItems=1),B(H.options,"listItems")||(H.options.listItems=1),H.options.tupleItems=L(C.items)?C.items.length:0,H.options.maxItems<=H.options.tupleItems?(H.options.tupleItems=H.options.maxItems,H.options.listItems=0):H.options.maxItems<H.options.tupleItems+H.options.listItems?H.options.listItems=H.options.maxItems-H.options.tupleItems:H.options.minItems>H.options.tupleItems+H.options.listItems&&(H.options.listItems=H.options.minItems-H.options.tupleItems),ce.has("maxItems")||(ce.set("maxItems",H.options.maxItems),ce.set("minItems",H.options.minItems),ce.set("tupleItems",H.options.tupleItems),ce.set("listItems",H.options.listItems)),e.arrayMap.has(F)||e.arrayMap.set(F,H.options.tupleItems),c=H.options.removable!==!1;let ne=null;if(L(C.items)){H.items=[];for(let G=0;G<H.options.tupleItems;G++){let ie,ee=_i(F+"/"+G,e.dataRecursiveRefMap,e.arrayMap),oe=!ee.length||ee!==F+"/"+G;c&&G>=H.options.minItems?(B(e.layoutRefLibrary,ee)||(e.layoutRefLibrary[ee]=null,e.layoutRefLibrary[ee]=Bs(e,i,L(t)?t[G]:null,s+"/items/"+G,oe?"":o+"/"+G,!0,"tuple",!0,!0,oe?o+"/"+G:""),oe&&(e.layoutRefLibrary[ee].recursiveReference=!0)),ie=Yu({$ref:ee,dataPointer:o+"/"+G,recursiveReference:oe},e,i,L(t)?t[G]:null)):ie=Bs(e,i,L(t)?t[G]:null,s+"/items/"+G,o+"/"+G,!0,"tuple",!1,u,p),ie&&H.items.push(ie)}te(C.additionalItems)&&(ne=s+"/additionalItems")}else te(C.items)&&(ne=s+"/items");if(ne){let G=_i(F+"/-",e.dataRecursiveRefMap,e.arrayMap),ie=!G.length||G!==F+"/-",ee=_i(ne,e.schemaRecursiveRefMap,e.arrayMap);if(G.length&&!B(e.layoutRefLibrary,G)&&(e.layoutRefLibrary[G]=null,e.layoutRefLibrary[G]=Bs(e,i,null,ee,ie?"":o+"/-",!0,"list",c,!0,ie?o+"/-":""),ie&&(e.layoutRefLibrary[G].recursiveReference=!0)),!ie||H.options.required){let oe=Math.min(Math.max(ie?0:H.options.tupleItems+H.options.listItems,L(t)?t.length:0),H.options.maxItems);if(H.items.length<oe)for(let me=H.items.length;me<oe;me++)H.items.push(Yu({$ref:G,dataPointer:o+"/-",recursiveReference:ie},e,i,L(t)?t[me]:null))}if(H.options.addable!==!1&&H.options.minItems<H.options.maxItems&&(H.items[H.items.length-1]||{}).type!=="$ref"){let oe=((e.layoutRefLibrary[G]||{}).options||{}).title,me=oe?"Add ":"Add to ";oe||(oe=C.title||ko(K.toKey(o))),/^add\b/i.test(oe)||(oe=me+oe),H.items.push({_id:(0,wo.default)(),arrayItem:!0,arrayItemType:"list",dataPointer:H.dataPointer+"/-",options:{listItems:H.options.listItems,maxItems:H.options.maxItems,minItems:H.options.minItems,removable:!1,title:oe,tupleItems:H.options.tupleItems},recursiveReference:ie,type:"$ref",widget:i.getWidget("$ref"),$ref:G})}}}else if(H.dataType==="$ref"){let ne=K.compile(C.$ref),G=K.toDataPointer(ne,S),ie="";if(H.options.add)ie=H.options.add;else if(H.name&&!/^\d+$/.test(H.name))ie=(/^add\b/i.test(H.name)?"":"Add ")+ko(H.name);else{let ee=K.get(S,s,0,-1);if(B(ee,"title"))ie="Add to "+ee.title;else{let oe=K.parse(H.dataPointer);ie="Add to "+ko(oe[oe.length-2])}}if(Object.assign(H,{recursiveReference:!0,widget:i.getWidget("$ref"),$ref:G}),Object.assign(H.options,{removable:!1,title:ie}),Ut(K.get(S,s,0,-1).maxItems)&&(H.options.maxItems=K.get(S,s,0,-1).maxItems),G.length)if(B(e.layoutRefLibrary,G))e.layoutRefLibrary[G].recursiveReference||(e.layoutRefLibrary[G].recursiveReference=!0);else{e.layoutRefLibrary[G]=null;let ee=Bs(e,i,null,ne,"",H.arrayItem,H.arrayItemType,!0,!0,o);ee?(ee.recursiveReference=!0,e.layoutRefLibrary[G]=ee):delete e.layoutRefLibrary[G]}}else if(H.type==="if"){let ne=[];["then","else"].forEach(G=>{if(B(C,G)){let ie=`/${G}`,ee=G=="else",oe=Bs(e,i,t[G],s+ie,o,!1,null,null,u,p);oe&&(f(oe,s,ie,ee),L(oe)?oe.forEach(me=>{ne.push(me)}):ne.push(oe))}}),H=ne}return H}function m2(e,i,t="",s=e){let o=0,n=[];return Vi(e,(l,c)=>{let u=+c+o,p=t+"/"+u,_=$u(l),f=[];te(l)&&(B(l,"tabs")&&(l.items=l.tabs,delete l.tabs),B(l,"items")&&(f=L(l.items)?l.items:[l.items])),f.length&&(_.items=m2(f,i,p+"/items",s)),_=i(_,u,p,s),ot(_)?(L(_)&&(o+=_.length-1),n=n.concat(_)):o--}),n}function Yu(e,i,t=null,s=null){if(e.recursiveReference&&t){let o=(0,Re.default)(e);return o.options||(o.options={}),Object.assign(o,{recursiveReference:!0,widget:t.getWidget("$ref")}),Object.assign(o.options,{removable:!1,title:"Add "+o.$ref}),o}else{let o=i.layoutRefLibrary[e.$ref];return ot(s)?o=Bs(i,t,s,K.toSchemaPointer(e.$ref,i.schema),e.$ref,o.arrayItem,o.arrayItemType,o.options.removable,!1):(o=(0,Re.default)(o),K.forEachDeep(o,(n,l)=>{B(n,"_id")&&(n._id=(0,wo.default)()),e.recursiveReference&&B(n,"dataPointer")&&(n.dataPointer=e.dataPointer+n.dataPointer)})),o}}function oc(e,i,t=!0,s=!0){let o=[],n=!1;if(e)if(L(e))if(i){for(let l of Object.keys(e))if(te(e[l])){let c=e[l].value;if(i.includes(c)){let u=e[l].name;o.push({name:u,value:c}),c==null&&(n=!0)}}else if(yt(e[l])&&l<i.length){let c=e[l],u=i[l];o.push({name:c,value:u}),u==null&&(n=!0)}}else o=e,t||(n=!!o.filter(l=>l.value===void 0||l.value===null).length);else if(i)for(let l of Object.keys(i)){let c=i[l];if(B(e,c)){let u=e[c];o.push({name:u,value:c}),c==null&&(n=!0)}}else for(let l of Object.keys(e)){let c=e[l];o.push({name:c,value:l}),l==null&&(n=!0)}else if(i)for(let l of Object.keys(i)){let c=i[l],u=i[l];o.push({name:c,value:u}),u==null&&(n=!0)}else o=[{name:"True",value:!0},{name:"False",value:!1}];return o.some(l=>B(l,"group"))&&(n=!1,s?o=o.reduce((l,c)=>(B(c,"group")?(L(c.items)&&(l=[...l,...c.items.map(u=>Xe(be({},u),{name:`${c.group}: ${u.name}`}))],c.items.some(u=>u.value===void 0||u.value===null)&&(n=!0)),B(c,"name")&&B(c,"value")&&(c.name=`${c.group}: ${c.name}`,delete c.group,l.push(c),(c.value===void 0||c.value===null)&&(n=!0))):(l.push(c),(c.value===void 0||c.value===null)&&(n=!0)),l),[]):o=o.reduce((l,c)=>(B(c,"group")?(c.group!==(l[l.length-1]||{}).group&&l.push({group:c.group,items:c.items||[]}),B(c,"name")&&B(c,"value")&&(l[l.length-1].items.push({name:c.name,value:c.value}),(c.value===void 0||c.value===null)&&(n=!0))):(l.push(c),(c.value===void 0||c.value===null)&&(n=!0)),l),[])),!t&&!n&&o.unshift({name:"<em>None</em>",value:null}),o}var Rt=(()=>{let i=class i{setDraggableState(s){this.draggableStateSubject.next(s)}setSortableOptions(s){this.sortableOptionsSubject.next(s)}createAjvInstance(s){let o=new mf.default(s);return o.addMetaSchema(F_),o.addMetaSchema(V_),(0,pf.default)(o),o}createAndRegisterAjvInstance(s,o){let n=o||`ajv_${Date.now()}`;if(this.ajvRegistry[n])throw new Error(`ajv instance with name:'${n}' has already been registered`);let l=this.createAjvInstance(s);return this.ajvRegistry[n]={name:n,ajvInstance:l,ajvValidator:null},this.ajvRegistry[n]}getAjvInstance(s="default"){return this.ajvRegistry[s].ajvInstance}getAjvValidator(s="default"){return this.ajvRegistry[s]?.ajvValidator}constructor(){this.JsonFormCompatibility=!1,this.ReactJsonSchemaFormCompatibility=!1,this.AngularSchemaFormCompatibility=!1,this.tpldata={},this.ajvOptions={allErrors:!0,strict:!1},this.ajv=(0,u2.default)(new mf.default(this.ajvOptions),["uniqueItemProperties"]),this.validateFormData=null,this.formValues={},this.data={},this.schema={},this.layout=[],this.formGroupTemplate={},this.formGroup=null,this.framework=null,this.validData=null,this.isValid=null,this.ajvErrors=null,this.validationErrors=null,this.dataErrors=new Map,this.formValueSubscription=null,this.dataChanges=new Yi,this.isValidChanges=new Yi,this.validationErrorChanges=new Yi,this.arrayMap=new Map,this.dataMap=new Map,this.dataRecursiveRefMap=new Map,this.schemaRecursiveRefMap=new Map,this.schemaRefLibrary={},this.layoutRefLibrary={"":null},this.templateRefLibrary={},this.hasRootReference=!1,this.language="en-US",this.defaultFormOptions={autocomplete:!0,addSubmit:"auto",debug:!1,disableInvalidSubmit:!0,formDisabled:!1,formReadonly:!1,fieldsRequired:!1,framework:"no-framework",loadExternalAssets:!1,pristine:{errors:!0,success:!0},supressPropertyTitles:!1,setSchemaDefaults:"auto",setLayoutDefaults:"auto",validateOnRender:"auto",widgets:{},defaultWidgetOptions:{listItems:1,addable:!0,orderable:!0,removable:!0,enableErrorState:!0,enableSuccessState:!0,feedback:!1,feedbackOnRender:!1,notitle:!1,disabled:!1,readonly:!1,returnEmptyFields:!0,validationMessages:{}}},this.draggableStateSubject=new Hp(!0),this.draggableState$=this.draggableStateSubject.asObservable(),this.sortableOptionsSubject=new Hp({disabled:!1}),this.sortableOptions$=this.sortableOptionsSubject.asObservable(),this.ajvRegistry={},this.setLanguage(this.language),this.ajv.addMetaSchema(F_),this.ajv.addMetaSchema(V_),(0,pf.default)(this.ajv),this.ajvRegistry.default={name:"default",ajvInstance:this.ajv,ajvValidator:null}}ngOnDestroy(){this.fcValueChangesSubs?.unsubscribe(),this.fcStatusChangesSubs?.unsubscribe(),this.formValueSubscription?.unsubscribe(),this.fcValueChangesSubs=null,this.fcStatusChangesSubs=null,this.formValueSubscription=null}setLanguage(s="en-US"){this.language=s;let o={de:dee,en:uee,es:gee,fr:pee,it:mee,pt:_ee,zh:hee},n=s.slice(0,2),l=o[n];this.defaultFormOptions.defaultWidgetOptions.validationMessages=(0,Re.default)(l)}getData(){return this.data}getSchema(){return this.schema}getLayout(){return this.layout}resetAllValues(){this.JsonFormCompatibility=!1,this.ReactJsonSchemaFormCompatibility=!1,this.AngularSchemaFormCompatibility=!1,this.tpldata={},this.validateFormData=null,this.formValues={},this.schema={},this.layout=[],this.formGroupTemplate={},this.formGroup=null,this.framework=null,this.data={},this.validData=null,this.isValid=null,this.validationErrors=null,this.arrayMap=new Map,this.dataMap=new Map,this.dataRecursiveRefMap=new Map,this.schemaRecursiveRefMap=new Map,this.layoutRefLibrary={},this.schemaRefLibrary={},this.templateRefLibrary={},this.formOptions=(0,Re.default)(this.defaultFormOptions),this.ajvRegistry={},this.ajvRegistry.default={name:"default",ajvInstance:this.ajv,ajvValidator:null}}buildRemoteError(s){Vi(s,(o,n)=>{if(n in this.formGroup.controls)for(let l of o){let c={};c[l.code]=l.message,this.formGroup.get(n).setErrors(c,{emitEvent:!0})}})}validateData(s,o=!0,n="default"){this.data=Mee(s,this.dataMap,this.dataRecursiveRefMap,this.arrayMap,this.formOptions.returnEmptyFields),this.isValid=this.getAjvValidator(n)(this.data),this.validData=this.isValid?this.data:null;let l=c=>{let u={};return(c||[]).forEach(p=>{let _=p.instancePath||"ROOT";u[_]||(u[_]=[]),u[_].push(p.message)}),u};this.ajvErrors=this.getAjvValidator(n).errors,this.validationErrors=l(this.ajvErrors),o&&(this.dataChanges.next(this.data),this.isValidChanges.next(this.isValid),this.validationErrorChanges.next(this.ajvErrors))}buildFormGroupTemplate(s=null,o=!0){this.formGroupTemplate=Ds(this,s,o)}buildFormGroup(s){this.formGroup=sc(this.formGroupTemplate),this.formGroup&&(this.compileAjvSchema(s),this.validateData(this.formGroup.value,!0,s),this.formValueSubscription&&this.formValueSubscription.unsubscribe(),this.formValueSubscription=this.formGroup.valueChanges.subscribe(o=>this.validateData(o,!0,s)))}buildLayout(s){this.layout=Oee(this,s)}setOptions(s){if(te(s)){let o=(0,Re.default)(s);te(o.defaultOptions)&&(Object.assign(this.formOptions.defaultWidgetOptions,o.defaultOptions),delete o.defaultOptions),te(o.defaultWidgetOptions)&&(Object.assign(this.formOptions.defaultWidgetOptions,o.defaultWidgetOptions),delete o.defaultWidgetOptions),Object.assign(this.formOptions,o);let n=this.formOptions.defaultWidgetOptions;["ErrorState","SuccessState"].filter(l=>B(n,"disable"+l)).forEach(l=>{n["enable"+l]=!n["disable"+l],delete n["disable"+l]})}}compileAjvSchema(s="default"){let o=this.getAjvValidator(s);o||(Array.isArray(this.schema.properties["ui:order"])&&(this.schema["ui:order"]=this.schema.properties["ui:order"],delete this.schema.properties["ui:order"]),this.getAjvInstance(s).removeSchema(this.schema),o=this.getAjvInstance(s).compile(this.schema),this.ajvRegistry[s].ajvValidator=o)}buildSchemaFromData(s,o=!1){if(s)return ff(s,o);this.schema=ff(this.formValues,o)}buildSchemaFromLayout(s){if(s)return void 0;this.schema=(this.layout,void 0)}setTpldata(s={}){this.tpldata=s}parseText(s="",o={},n={},l=null){return!s||!/{{.+?}}/.test(s)?s:s.replace(/{{(.+?)}}/g,(...c)=>this.parseExpression(c[1],o,n,l,this.tpldata))}parseExpression(s="",o={},n={},l=null,c=null){if(typeof s!="string")return"";let u=typeof l=="number"?l+1+"":l||"";if(s=s.trim(),(s[0]==="'"||s[0]==='"')&&s[0]===s[s.length-1]&&s.slice(1,s.length-1).indexOf(s[0])===-1)return s.slice(1,s.length-1);if(s==="idx"||s==="$index")return u;if(s==="value"&&!B(n,"value"))return o;if(['"',"'"," ","||","&&","+"].every(p=>s.indexOf(p)===-1)){let p=K.parseObjectPath(s);return p[0]==="value"&&K.has(o,p.slice(1))?K.get(o,p.slice(1)):p[0]==="values"&&K.has(n,p.slice(1))?K.get(n,p.slice(1)):p[0]==="tpldata"&&K.has(c,p.slice(1))?K.get(c,p.slice(1)):K.has(n,p)?K.get(n,p):""}return s.indexOf("[idx]")>-1&&(s=s.replace(/\[idx\]/g,u)),s.indexOf("[$index]")>-1&&(s=s.replace(/\[$index\]/g,u)),s.indexOf("||")>-1?s.split("||").reduce((p,_)=>p||this.parseExpression(_,o,n,l,c),""):s.indexOf("&&")>-1?s.split("&&").reduce((p,_)=>p&&this.parseExpression(_,o,n,l,c)," ").trim():s.indexOf("+")>-1?s.split("+").map(p=>this.parseExpression(p,o,n,l,c)).join(""):""}setArrayItemTitle(s={},o=null,n=null){let l={layoutNode:()=>te(s.layoutNode)?s.layoutNode:s.layoutNode(),dataIndex:()=>te(s.dataIndex)?s.dataIndex:s.dataIndex()},c=l.layoutNode();if(c.options.buttonText)return c.options.buttonText;let u=this.getFormControlValue(l),p=(c.type||"").slice(-5)==="array"&&L(u),_=K.getFirst(p&&o.type!=="$ref"?[[o,"/options/legend"],[o,"/options/title"],[c,"/options/title"],[c,"/options/legend"]]:[[o,"/options/title"],[o,"/options/legend"],[c,"/options/title"],[c,"/options/legend"]]);if(!_)return _;let f=L(u)&&n<u.length?u[n]:u;return this.parseText(_,f,u,n)}setItemTitle(s){return!s.options.title&&/^(\d+|-)$/.test(s.layoutNode().name)?null:this.parseText(s.options.title||g2(s.layoutNode().name),this.getFormControlValue(s),(this.getFormControlGroup(s)||{}).value,s.dataIndex()[s.dataIndex().length-1])}evaluateCondition(s,o){let n=o&&o[o.length-1],l=!0;if(Se((s.options||{}).condition)){if(typeof s.options.condition=="string"){let c=s.options.condition;Se(n)&&(c=c.replace("[arrayIndex]",`[${n}]`)),c=K.parseObjectPath(c),l=!!K.get(this.data,c),!l&&c[0]==="model"&&(l=!!K.get({model:this.data},c))}else if(typeof s.options.condition=="function")l=s.options.condition(this.data);else if(typeof s.options.condition.functionBody=="string")try{l=new Function("model","arrayIndices",s.options.condition.functionBody)(this.data,o)}catch{l=!0,console.error("condition functionBody errored out on evaluation: "+s.options.condition.functionBody)}}return l}initializeControl(s,o=!0){if(!te(s))return!1;let n=s.layoutNode();if(Ne(s.options)&&(s.options=Ne((n||{}).options)?(0,Re.default)(this.formOptions):n.options),s.formControl=this.getFormControl(s),(n?.schemaPointer&&n.isITEItem||n?.schemaPointer&&n?.oneOfPointer||n?.schemaPointer&&n.anyOfPointer)&&(this.dataMap.get(n?.dataPointer).get("schemaType")!=n.dataType&&this.dataMap.get(n?.dataPointer).set("schemaType",n.dataType),this.setFormControl(s,s.formControl)),s.boundControl=o&&!!s.formControl,s.formControl)s.controlName=this.getFormControlName(s),s.controlValue=s.formControl.value,s.controlDisabled=s.formControl.disabled,s.options.errorMessage=s.formControl.status==="VALID"?null:this.formatErrors(s.formControl.errors,s.options.validationMessages),s.options.showErrors=this.formOptions.validateOnRender===!0||this.formOptions.validateOnRender==="auto"&&Se(s.controlValue),this.fcStatusChangesSubs=s.formControl.statusChanges.subscribe(l=>s.options.errorMessage=l==="VALID"?null:this.formatErrors(s.formControl.errors,s.options.validationMessages)),this.fcValueChangesSubs=s.formControl.valueChanges.subscribe(l=>{(0,Xi.default)(s.controlValue,l)||(s.controlValue=l)});else{s.controlName=n.name,s.controlValue=n.value||null;let l=this.getDataPointer(s);o&&l&&console.error(`warning: control "${l}" is not bound to the Angular FormGroup.`)}if(s.options?.condition||n?.oneOfPointer||n?.anyOfPointer){let l=this.getDataPointer(s),c=s.formControl?.value,u=K.has(this.data,l)?K.get(this.data,l):void 0,p=K.has(this.formValues,l)?K.get(this.formValues,l):void 0,_=s.options?.default,f=this.formValues&&(0,Xi.default)(p,c)||!this.formValues&&(0,Xi.default)(_,c)?u:_;s.formControl?.patchValue(f)}return s.boundControl}formatErrors(s,o={}){if(Ne(s))return null;te(o)||(o={});let n=u=>u[0].toUpperCase()+(u.slice(1)||"").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," "),l=u=>typeof u=="object"?Object.keys(u).map(p=>u[p]===!0?n(p):u[p]===!1?"Not "+n(p):n(p)+": "+l(u[p])).join(", "):n(u.toString()),c=[];return Object.keys(s).filter(u=>u!=="required"||Object.keys(s).length===1).map(u=>typeof o=="string"?o:typeof o[u]=="function"?o[u](s[u]):typeof o[u]=="string"?/{{.+?}}/.test(o[u])?Object.keys(s[u]).reduce((p,_)=>p.replace(new RegExp("{{"+_+"}}","g"),s[u][_]),o[u]):o[u]:n(u)+" Error: "+l(s[u])).join("<br>")}updateValue(s,o){if(s.controlValue=o,s.boundControl&&(s.formControl.setValue(o),s.formControl.markAsDirty()),s.layoutNode().value=o,L(s.options.copyValueTo))for(let n of s.options.copyValueTo){let l=qu(this.formGroup,n);te(l)&&typeof l.setValue=="function"&&(l.setValue(o),l.markAsDirty())}}updateArrayCheckboxList(s,o){let n=this.getFormControl(s);for(;n.value.length;)n.removeAt(0);let l=_i(s.layoutNode().dataPointer+"/-",this.dataRecursiveRefMap,this.arrayMap);for(let c of o)if(c.checked){let u=sc(this.templateRefLibrary[l]);u.setValue(c.value),n.push(u)}n.markAsDirty()}updateArrayMultiSelectList(s,o){this.updateArrayCheckboxList(s,o)}getFormControl(s){if(!s||!s.layoutNode||!ot(s.layoutNode().dataPointer)||s.layoutNode().type==="$ref")return null;let o=s.layoutNode()?.isITEItem?s.layoutNode()?.schemaPointer:null,n=s.layoutNode()?.oneOfPointer,l=s.layoutNode()?.anyOfPointer;return qu(this.formGroup,this.getDataPointer(s),!1,o||n||l)}setFormControl(s,o){return!s||!s.layoutNode||!ot(s.layoutNode().dataPointer)||s.layoutNode().type==="$ref"?null:Uee(this.formGroup,this.getDataPointer(s),o)}getFormControlValue(s){if(!s||!s.layoutNode||!ot(s.layoutNode().dataPointer)||s.layoutNode().type==="$ref")return null;let o=s.layoutNode()?.isITEItem?s.layoutNode()?.schemaPointer:null,n=s.layoutNode()?.oneOfPointer,l=s.layoutNode()?.anyOfPointer,c=qu(this.formGroup,this.getDataPointer(s),!1,o||n||l);return c?c.value:null}getFormControlGroup(s){if(!s||!s.layoutNode||!ot(s.layoutNode().dataPointer))return null;let o=s.layoutNode()?.isITEItem?s.layoutNode()?.schemaPointer:null,n=s.layoutNode()?.oneOfPointer,l=s.layoutNode()?.anyOfPointer;return qu(this.formGroup,this.getDataPointer(s),!0,o||n||l)}getFormControlName(s){return!s||!s.layoutNode||!ot(s.layoutNode().dataPointer)||!Se(s.dataIndex())?null:K.toKey(this.getDataPointer(s))}getLayoutArray(s){return K.get(this.layout,this.getLayoutPointer(s),0,-1)}getParentNode(s){return K.get(this.layout,this.getLayoutPointer(s),0,-2)}getDataPointer(s){return!s||!s.layoutNode||!ot(s.layoutNode().dataPointer)||!Se(s.dataIndex())?null:K.toIndexedPointer(s.layoutNode().dataPointer,s.dataIndex(),this.arrayMap)}getLayoutPointer(s){return Se(s.layoutIndex())?"/"+s.layoutIndex().join("/items/"):null}isControlBound(s){if(!s||!s.layoutNode||!ot(s.layoutNode().dataPointer)||!Se(s.dataIndex()))return!1;let o=this.getFormControlGroup(s),n=this.getFormControlName(s);return o?B(o.controls,n):!1}addItem(s,o){if(!s||!s.layoutNode||!ot(s.layoutNode().$ref)||!Se(s.dataIndex())||!Se(s.layoutIndex()))return!1;let n=sc(this.templateRefLibrary[s.layoutNode().$ref]);s.layoutNode().arrayItem?this.getFormControlGroup(s).push(n):this.getFormControlGroup(s).addControl(o||this.getFormControlName(s),n);let l=Yu(s.layoutNode(),this);return l.arrayItem=s.layoutNode().arrayItem,s.layoutNode().arrayItemType?l.arrayItemType=s.layoutNode().arrayItemType:delete l.arrayItemType,o&&(l.name=o,l.dataPointer+="/"+K.escape(o),l.options.title=ko(o)),K.insert(this.layout,this.getLayoutPointer(s),l),!0}moveArrayItem(s,o,n,l=!0){if(!s||!s.layoutNode||!ot(s.layoutNode().dataPointer)||!Se(s.dataIndex())||!Se(s.layoutIndex())||!ot(o)||!ot(n)||o===n)return!1;let c=this.getFormControlGroup(s),u=c.at(o);if(c.removeAt(o),c.insert(n,u),c.updateValueAndValidity(),l){let p=this.getLayoutArray(s);p.splice(n,0,p.splice(o,1)[0])}return!0}removeItem(s){return!s||!s.layoutNode||!ot(s.layoutNode().dataPointer)||!Se(s.dataIndex())||!Se(s.layoutIndex())?!1:(s.layoutNode().arrayItem?this.getFormControlGroup(s).removeAt(s.dataIndex()[s.dataIndex().length-1]):this.getFormControlGroup(s).removeControl(this.getFormControlName(s)),K.remove(this.layout,this.getLayoutPointer(s)),!0)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275prov=vi({token:i,factory:i.\u0275fac});let e=i;return e})(),_2=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.newComponent=null,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0),this.widgetContainer=Uo("widgetContainer",{read:br})}ngOnInit(){this.updateComponent()}ngOnChanges(){this.updateComponent()}updateComponent(){let s=this.widgetContainer();if(s&&!this.newComponent&&(this.layoutNode()||{}).widget&&(this.newComponent=s.createComponent(this.layoutNode().widget)),this.newComponent)for(let o of["layoutNode","layoutIndex","dataIndex"])this.newComponent.instance[o]=this[o]}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["select-widget-widget"]],viewQuery:function(o,n){o&1&&Bo(n.widgetContainer,kf,5,br),o&2&&Eo()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Do],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(o,n){o&1&&E(0,"div",null,0)},encapsulation:2});let e=i;return e})(),Vee=(()=>{let i=class i{constructor(){this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["no-framework"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:1,vars:3,consts:[[3,"dataIndex","layoutIndex","layoutNode"]],template:function(o,n){o&1&&E(0,"select-widget-widget",0),o&2&&I("dataIndex",n.dataIndex())("layoutIndex",n.layoutIndex())("layoutNode",n.layoutNode())},dependencies:[_2],encapsulation:2});let e=i;return e})(),qee=(()=>{let i=class i extends Hf{constructor(){super(...arguments),this.name="no-framework",this.text="None (plain HTML)",this.framework=Vee}};i.\u0275fac=(()=>{let s;return function(n){return(s||(s=bv(i)))(n||i)}})(),i.\u0275prov=vi({token:i,factory:i.\u0275fac});let e=i;return e})(),h2=(()=>{let i=class i{constructor(s,o){this.renderer=s,this.elementRef=o}ngOnChanges(s){if(s.attributes)for(let o in this.attributes){let n=this.attributes[o];n?this.renderer.setAttribute(this.elementRef.nativeElement,o,n):this.renderer.removeAttribute(this.elementRef.nativeElement,o)}}};i.\u0275fac=function(o){return new(o||i)(co(Qc),co(rn))},i.\u0275dir=yr({type:i,selectors:[["","attributes",""]],inputs:{attributes:"attributes"},standalone:!1,features:[Do]});let e=i;return e})(),Kee=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){this.options=this.layoutNode().options||{}}get showAddButton(){return!this.layoutNode().arrayItem||this.layoutIndex()[this.layoutIndex().length-1]<this.options.maxItems}addItem(s){s.preventDefault(),this.jsf.addItem(this)}get buttonText(){let s={dataIndex:this.dataIndex().slice(0,-1),layoutIndex:this.layoutIndex().slice(0,-1),layoutNode:this.jsf.getParentNode(this)};return s.layoutNode.add||this.jsf.setArrayItemTitle(s,this.layoutNode(),this.itemCount)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["add-reference-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:2,vars:3,consts:[["align","end"],["class","sortable-filter sortable-fixed",3,"class","disabled","click",4,"ngIf"],[1,"sortable-filter","sortable-fixed",3,"click","disabled"],[3,"class",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(o,n){o&1&&(y(0,"section",0),Ie(1,WQ,3,5,"button",1),b()),o&2&&(fe((n.options==null?null:n.options.htmlClass)||""),m(),I("ngIf",n.showAddButton))},dependencies:[li],encapsulation:2});let e=i;return e})(),$ee=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(s){typeof this.options.onClick=="function"?this.options.onClick(s):this.jsf.updateValue(this,s.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["button-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:11,consts:[[3,"click","disabled","name","type","value"],[3,"class","innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(o,n){if(o&1&&(y(0,"div")(1,"button",0),Q("click",function(c){return n.updateValue(c)}),Ie(2,YQ,1,3,"span",1),b()()),o&2){let l,c;fe((n.options==null?null:n.options.htmlClass)||""),m(),fe((n.options==null?null:n.options.fieldHtmlClass)||""),I("disabled",n.controlDisabled)("name",n.controlName)("type",(l=n.layoutNode())==null?null:l.type)("value",n.controlValue),pe("readonly",n.options!=null&&n.options.readonly?"readonly":null)("aria-describedby","control"+((c=n.layoutNode())==null?null:c._id)+"Status"),m(),I("ngIf",(n.options==null?null:n.options.icon)||(n.options==null?null:n.options.title))}},dependencies:[li],encapsulation:2});let e=i;return e})(),Lee=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.controlDisabled=!1,this.boundControl=!1,this.trueValue=!0,this.falseValue=!1,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),(this.controlValue===null||this.controlValue===void 0)&&(this.controlValue=!1,this.jsf.updateValue(this,this.falseValue))}updateValue(s){s.preventDefault(),this.jsf.updateValue(this,s.target.checked?this.trueValue:this.falseValue)}get isChecked(){return this.jsf.getFormControlValue(this)===this.trueValue}ngOnDestroy(){this.jsf.updateValue(this,null)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["checkbox-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[["type","checkbox",3,"formControl","class","id","name","readonly",4,"ngIf"],["type","checkbox",3,"checked","class","disabled","id","name","readonly","value","change",4,"ngIf"],[3,"display","innerHTML",4,"ngIf"],[1,"hb-uix-slider","hb-uix-round"],["type","checkbox",3,"formControl","id","name","readonly"],["type","checkbox",3,"change","checked","disabled","id","name","readonly","value"],[3,"innerHTML"]],template:function(o,n){if(o&1&&(y(0,"label"),Ie(1,JQ,1,7,"input",0)(2,ZQ,1,9,"input",1)(3,QQ,1,3,"span",2),E(4,"span",3),b()),o&2){let l;fe((n.options==null?null:n.options.itemLabelHtmlClass)||"hb-uix-switch"),pe("for","control"+((l=n.layoutNode())==null?null:l._id)),m(),I("ngIf",n.boundControl),m(),I("ngIf",!n.boundControl),m(),I("ngIf",n.options==null?null:n.options.title)}},dependencies:[li,Oo,ci,Fo],encapsulation:2});let e=i;return e})(),Gee=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.controlDisabled=!1,this.boundControl=!1,this.checkboxList=[],this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){this.options=this.layoutNode().options||{};let s=this.layoutNode();if(this.layoutOrientation=s.type==="checkboxes-inline"||s.type==="checkboxbuttons"?"horizontal":"vertical",this.jsf.initializeControl(this),this.checkboxList=oc(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.boundControl){let o=this.jsf.getFormControl(this);this.checkboxList.forEach(n=>n.checked=o.value.includes(n.value))}}updateValue(s){for(let o of this.checkboxList)s.target.value===o.value&&(o.checked=s.target.checked);this.boundControl&&this.jsf.updateArrayCheckboxList(this,this.checkboxList)}ngOnDestroy(){let s=[];this.formControl.reset(s),this.controlValue=null}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["checkboxes-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:3,consts:[[3,"class","display","innerHTML",4,"ngIf"],[3,"class",4,"ngIf"],[4,"ngIf"],[3,"innerHTML"],[3,"class",4,"ngFor","ngForOf"],["type","checkbox",3,"change","checked","disabled","id","name","readonly","value"],[1,"hb-uix-slider","hb-uix-round"]],template:function(o,n){o&1&&Ie(0,XQ,1,5,"label",0)(1,tX,2,3,"div",1)(2,sX,2,1,"div",2),o&2&&(I("ngIf",n.options==null?null:n.options.title),m(),I("ngIf",n.layoutOrientation==="horizontal"),m(),I("ngIf",n.layoutOrientation==="vertical"))},dependencies:[Ro,li],encapsulation:2});let e=i;return e})(),Wee=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(s){this.jsf.updateValue(this,s.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["file-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:0,vars:0,template:function(o,n){},encapsulation:2});let e=i;return e})();var Yee=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.controlDisabled=!1,this.boundControl=!1,this.autoCompleteList=[],this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}get inputAttributes(){return this.options?.["x-inputAttributes"]}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(s){this.jsf.updateValue(this,s.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["input-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[[1,"sortable-filter"],[3,"class","display","innerHTML",4,"ngIf"],[3,"formControl","class","id","name","readonly","type","attributes",4,"ngIf"],[3,"class","disabled","id","name","readonly","type","value","attributes","input",4,"ngIf"],[3,"id",4,"ngIf"],[3,"innerHTML"],[3,"formControl","id","name","readonly","type","attributes"],[3,"input","disabled","id","name","readonly","type","value","attributes"],[3,"id"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(o,n){o&1&&(y(0,"div",0),Ie(1,oX,1,6,"label",1)(2,rX,1,15,"input",2)(3,nX,1,16,"input",3)(4,lX,2,2,"datalist",4),b()),o&2&&(fe((n.options==null?null:n.options.htmlClass)||""),m(),I("ngIf",n.options==null?null:n.options.title),m(),I("ngIf",n.boundControl),m(),I("ngIf",!n.boundControl),m(),I("ngIf",n.options==null||n.options.typeahead==null?null:n.options.typeahead.source))},dependencies:[Ro,li,Vo,qo,wr,ci,Fo,h2],encapsulation:2});let e=i;return e})(),Jee=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.message=null,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.message=this.options.help||this.options.helpvalue||this.options.msg||this.options.message}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["message-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:1,vars:1,consts:[[3,"class","innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(o,n){o&1&&Ie(0,cX,1,3,"span",0),o&2&&I("ngIf",n.message)},dependencies:[li],encapsulation:2});let e=i;return e})(),Zee=(()=>{let i=class i{constructor(){this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["none-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:0,vars:0,template:function(o,n){},encapsulation:2});let e=i;return e})(),Qee=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.controlDisabled=!1,this.boundControl=!1,this.allowNegative=!0,this.allowDecimal=!0,this.allowExponents=!1,this.lastValidNumber="",this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}get inputAttributes(){return this.options?.["x-inputAttributes"]}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),this.layoutNode().dataType==="integer"&&(this.allowDecimal=!1)}updateValue(s){this.jsf.updateValue(this,s.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["number-widget"]],viewQuery:function(o,n){if(o&1&&(xp(dX,5),xp(uX,5)),o&2){let l;Cp(l=Ip())&&(n.inputControl=l.first),Cp(l=Ip())&&(n.div=l.first)}},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:6,vars:6,consts:[["divElt",""],["inputControl",""],[1,"sortable-filter"],[3,"class","display","innerHTML",4,"ngIf"],[3,"formControl","class","id","name","readonly","title","type","attributes",4,"ngIf"],[3,"class","disabled","id","name","readonly","title","type","value","attributes","input",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[3,"formControl","id","name","readonly","title","type","attributes"],[3,"input","disabled","id","name","readonly","title","type","value","attributes"]],template:function(o,n){if(o&1&&(y(0,"div",2,0),Ie(2,gX,1,6,"label",3)(3,pX,2,16,"input",4)(4,mX,2,17,"input",5)(5,_X,1,1,"span",6),b()),o&2){let l;fe((n.options==null?null:n.options.htmlClass)||""),m(2),I("ngIf",n.options==null?null:n.options.title),m(),I("ngIf",n.boundControl),m(),I("ngIf",!n.boundControl),m(),I("ngIf",((l=n.layoutNode())==null?null:l.type)==="range")}},dependencies:[li,wr,ci,Fo,h2],encapsulation:2});let e=i;return e})(),Sf=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.newComponent=null,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0),this.widgetContainer=Uo("widgetContainer",{read:br})}ngOnInit(){this.updateComponent()}ngOnChanges(){this.updateComponent()}updateComponent(){let s=this.widgetContainer();if(s&&!this.newComponent&&this.jsf.framework&&(this.newComponent=s.createComponent(this.jsf.framework)),this.newComponent)for(let o of["layoutNode","layoutIndex","dataIndex"])this.newComponent.instance[o]=this[o]}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["select-framework-widget"]],viewQuery:function(o,n){o&1&&Bo(n.widgetContainer,kf,5,br),o&2&&Eo()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Do],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(o,n){o&1&&E(0,"div",null,0)},encapsulation:2});let e=i;return e})(),f2=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.selectedItem=0,this.showAddTab=!0,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.options.selectedTab&&(this.selectedItem=this.options.selectedTab),this.itemCount=this.layoutNode().items.length-1,this.updateControl()}select(s){let o=this.layoutNode();o.items[s].type==="$ref"&&(this.itemCount=o.items.length,this.jsf.addItem({layoutNode:Zc(o.items[s]),layoutIndex:Zc(this.layoutIndex().concat(s)),dataIndex:Zc(this.dataIndex().concat(s))}),this.updateControl()),this.selectedItem=s}updateControl(){let s=this.layoutNode().items[this.layoutNode().items.length-1];s.type==="$ref"&&this.itemCount>=(s.options.maxItems||1e3)&&(this.showAddTab=!1)}setTabTitle(s,o){return this.jsf.setArrayItemTitle(this,s,o)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["tabs-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:4,consts:[["role","presentation","data-tabs","",3,"class",4,"ngFor","ngForOf"],[3,"class",4,"ngFor","ngForOf"],["role","presentation","data-tabs",""],[3,"class","click",4,"ngIf"],[3,"click"],["type","radio","name","tabSelection",3,"value","ngModel","class","ngModelChange","change",4,"ngIf"],["type","radio","name","tabSelection",3,"ngModelChange","change","value","ngModel"],[4,"ngIf"],[3,"class","dataIndex","layoutIndex","layoutNode",4,"ngIf"],[3,"dataIndex","layoutIndex","layoutNode"]],template:function(o,n){if(o&1&&(y(0,"ul"),Ie(1,bX,2,3,"li",0),b(),Ie(2,kX,3,4,"div",1)),o&2){let l,c;fe((n.options==null?null:n.options.labelHtmlClass)||""),m(),I("ngForOf",(l=n.layoutNode())==null?null:l.items),m(),I("ngForOf",(c=n.layoutNode())==null?null:c.items)}},dependencies:[Ro,li,wr,Dv,ci,cs,Sf],styles:["a[_ngcontent-%COMP%]{cursor:pointer}.ngf-hidden[_ngcontent-%COMP%]{display:none}"]});let e=i;return e})(),Xee=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.options.tabMode="oneOfMode",this.options.selectedTab=this.findSelectedTab(),this.jsf.initializeControl(this)}findSelectedTab(){let s=-1;return this.layoutNode().items&&this.layoutNode().items.forEach((o,n)=>{let l=K.get(this.jsf.formValues,o.dataPointer);if(o.oneOfPointer){let c=Rr(o.oneOfPointer),u=o.name;B(this.jsf.formGroup.controls,c)&&(l||p2(this.jsf.formGroup.controls[c].value))&&(s=n),s==-1&&Object.keys(this.jsf.formGroup.controls).filter(_=>_.startsWith(c)).forEach(_=>{let f=_.split("$"),S=f[f.length-1],C=this.jsf.formGroup.controls[_].value,P=K.get(this.jsf.schema,f.join("/")),U=f.join("/").replace(/(anyOf|allOf|oneOf|none)\/[\d]+\//g,"").replace(/(if|then|else|properties)\//g,"").replace(/\/items\//g,"/-/"),F=K.get(this.jsf.formValues,U),de=F;P&&P.properties&&(de=(0,es.isObject)(F)&&B(F,S)?(0,es.pick)(F[S],Object.keys(P.properties)):(0,es.pick)(F,Object.keys(P.properties))),(0,es.isEqual)(de,C)&&(s=n)})}}),Math.max(s,0)}updateValue(s){this.jsf.updateValue(this,s.target.value)}ngOnDestroy(){}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["one-of-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:4,vars:4,consts:[["tabs",""],[3,"layoutNode","layoutIndex","dataIndex"]],template:function(o,n){o&1&&(y(0,"h4"),A(1),b(),E(2,"tabs-widget",1,0)),o&2&&(m(),le(n.options==null?null:n.options.description),m(),I("layoutNode",n.layoutNode())("layoutIndex",n.layoutIndex())("dataIndex",n.dataIndex()))},dependencies:[f2],encapsulation:2});let e=i;return e})(),ete=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutOrientation="vertical",this.radiosList=[],this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){this.options=this.layoutNode().options||{};let s=this.layoutNode();(s.type==="radios-inline"||s.type==="radiobuttons")&&(this.layoutOrientation="horizontal"),this.radiosList=oc(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.jsf.initializeControl(this)}updateValue(s){this.jsf.updateValue(this,s.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["radios-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:3,consts:[[3,"class","display","innerHTML",4,"ngIf"],[3,"class",4,"ngIf"],[4,"ngIf"],[3,"innerHTML"],[3,"class",4,"ngFor","ngForOf"],["type","radio",3,"change","checked","disabled","id","name","value"]],template:function(o,n){o&1&&Ie(0,HX,1,6,"label",0)(1,xX,2,3,"div",1)(2,IX,2,1,"div",2),o&2&&(I("ngIf",n.options==null?null:n.options.title),m(),I("ngIf",n.layoutOrientation==="horizontal"),m(),I("ngIf",n.layoutOrientation!=="horizontal"))},dependencies:[Ro,li],encapsulation:2});let e=i;return e})(),tte=(()=>{let i=class i{constructor(){this.elementRef=V(rn),this.jsf=V(Rt),this.ngZone=V(Xc),this.overParentElement=!1,this.overChildElement=!1,this.orderable=re(void 0),this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){let s=this.layoutIndex();this.orderable()&&this.layoutNode()&&s&&this.dataIndex()&&(this.element=this.elementRef.nativeElement,this.element.draggable=!0,this.arrayLayoutIndex="move:"+s.slice(0,-1).toString(),this.ngZone.runOutsideAngular(()=>{this.element.addEventListener("dragstart",o=>{o.dataTransfer.effectAllowed="move",o.dataTransfer.setData("text","");let n=this.dataIndex()[this.dataIndex().length-1];sessionStorage.setItem(this.arrayLayoutIndex,n+"")}),this.element.addEventListener("dragover",o=>(o.preventDefault&&o.preventDefault(),o.dataTransfer.dropEffect="move",!1)),this.element.addEventListener("dragenter",o=>{if(this.overParentElement)return this.overChildElement=!0;this.overParentElement=!0;let n=sessionStorage.getItem(this.arrayLayoutIndex);n!==null&&(this.dataIndex()[this.dataIndex().length-1]<+n?this.element.classList.add("drag-target-top"):this.dataIndex()[this.dataIndex().length-1]>+n&&this.element.classList.add("drag-target-bottom"))}),this.element.addEventListener("dragleave",o=>{this.overChildElement?this.overChildElement=!1:this.overParentElement&&(this.overParentElement=!1);let n=sessionStorage.getItem(this.arrayLayoutIndex);!this.overParentElement&&!this.overChildElement&&n!==null&&(this.element.classList.remove("drag-target-top"),this.element.classList.remove("drag-target-bottom"))}),this.element.addEventListener("drop",o=>{this.element.classList.remove("drag-target-top"),this.element.classList.remove("drag-target-bottom");let n=sessionStorage.getItem(this.arrayLayoutIndex),l=this.dataIndex()[this.dataIndex().length-1];return n!==null&&+n!==l&&this.jsf.moveArrayItem(this,+n,l),sessionStorage.removeItem(this.arrayLayoutIndex),!1})}),this.draggableStateSubscription=this.jsf.draggableState$.subscribe(o=>{this.element.draggable=o}))}ngOnDestroy(){this.draggableStateSubscription&&this.draggableStateSubscription.unsubscribe()}};i.\u0275fac=function(o){return new(o||i)},i.\u0275dir=yr({type:i,selectors:[["","orderable",""]],inputs:{orderable:[1,"orderable"],layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1});let e=i;return e})(),xf=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.dataIndex=re(void 0),this.layoutIndex=re(void 0),this.layout=re(void 0),this.isOrderable=re(void 0),this.isFlexItem=re(!1),this.sortableConfig={filter:".sortable-filter",preventOnFilter:!1,delay:1e3,delayOnTouchOnly:!0,onEnd:s=>{s.newIndex;let o=s.oldIndex,n=s.newIndex,l=this.layout()[n],c=l?.arrayItem?(this.dataIndex()||[]).concat(n):this.dataIndex()||[],u=(this.layoutIndex()||[]).concat(n),p={dataIndex:()=>c,layoutIndex:()=>u,layoutNode:()=>l};this.jsf.moveArrayItem(p,s.oldIndex,s.newIndex,!1)},onMove:function(s,o){if(s.related.classList.contains("sortable-fixed"))return!1}}}sortableInit(s){this.sortableObj=s}isDraggable(s){let o=s.arrayItem&&s.type!=="$ref"&&s.arrayItemType==="list"&&this.isOrderable()!==!1;return this.sortableObj,o}isFixed(s){return s.type=="$ref"}getFlexAttribute(s,o){let n=["flex-grow","flex-shrink","flex-basis"].indexOf(o);return((s.options||{}).flex||"").split(/\s+/)[n]||(s.options||{})[o]||["1","1","auto"][n]}showWidget(s){return this.jsf.evaluateCondition(s,this.dataIndex())}ngOnInit(){this.sortableOptionsSubscription=this.jsf.sortableOptions$.subscribe(s=>{this.sortableObj&&Object.keys(s).forEach(o=>{let n=s[o];this.sortableObj.option(o,n)})})}ngOnDestroy(){this.sortableOptionsSubscription&&this.sortableOptionsSubscription.unsubscribe()}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["root-widget"]],inputs:{dataIndex:[1,"dataIndex"],layoutIndex:[1,"layoutIndex"],layout:[1,"layout"],isOrderable:[1,"isOrderable"],isFlexItem:[1,"isFlexItem"]},standalone:!1,decls:3,vars:5,consts:[["sortableContainter",""],[3,"init","nxtSortablejs","config"],[3,"form-flex-item","align-self","flex-basis","flex-grow","flex-shrink","order","sortable-filter","sortable-fixed",4,"ngFor","ngForOf"],[3,"dataIndex","layoutIndex","layoutNode","orderable"],[3,"dataIndex","layoutIndex","layoutNode",4,"ngIf"],[3,"dataIndex","layoutIndex","layoutNode"]],template:function(o,n){if(o&1){let l=ae();y(0,"div",1,0),Q("init",function(u){return J(l),Z(n.sortableInit(u))}),Ie(2,PX,3,30,"div",2),b()}o&2&&(Os("flex-inherit",!0),I("nxtSortablejs",n.layout())("config",n.sortableConfig),m(2),I("ngForOf",n.layout()))},dependencies:[Ro,li,iP,Sf,tte],styles:["[draggable=true][_ngcontent-%COMP%]{transition:all .15s cubic-bezier(.4,0,.2,1)}[draggable=true][_ngcontent-%COMP%]:hover{cursor:move;box-shadow:2px 2px 4px #0003;position:relative;z-index:10;margin:-1px 1px 1px -1px}[draggable=true].drag-target-top[_ngcontent-%COMP%]{box-shadow:0 -2px #000;position:relative;z-index:20}[draggable=true].drag-target-bottom[_ngcontent-%COMP%]{box-shadow:0 2px #000;position:relative;z-index:20}.flex-inherit[_ngcontent-%COMP%]{display:inherit;flex-flow:inherit;flex-wrap:inherit;flex-direction:inherit;width:100%}"]});let e=i;return e})(),ite=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.expanded=!0,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}get sectionTitle(){return this.options.notitle?null:this.jsf.setItemTitle(this)}ngOnInit(){switch(this.jsf.initializeControl(this),this.options=this.layoutNode().options||{},this.expanded=typeof this.options.expanded=="boolean"?this.options.expanded:!this.options.expandable,this.layoutNode().type){case"fieldset":case"array":case"tab":case"advancedfieldset":case"authfieldset":case"optionfieldset":case"selectfieldset":this.containerType="fieldset";break;default:this.containerType="div";break}}toggleExpanded(){this.options.expandable&&(this.expanded=!this.expanded)}getFlexAttribute(s){let o=this.layoutNode().type==="flex"||!!this.options.displayFlex||this.options.display==="flex";if(s!=="flex"&&!o)return null;switch(s){case"is-flex":return o;case"display":return o?"flex":"initial";case"flex-direction":case"flex-wrap":let n=["flex-direction","flex-wrap"].indexOf(s);return(this.options["flex-flow"]||"").split(/\s+/)[n]||this.options[s]||["column","nowrap"][n];case"justify-content":case"align-items":case"align-content":return this.options[s]}}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["section-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:2,vars:2,consts:[[3,"class","expandable","expanded",4,"ngIf"],[3,"class","expandable","expanded","disabled",4,"ngIf"],["class","legend",3,"class","innerHTML","click",4,"ngIf"],[3,"dataIndex","layout","layoutIndex","isFlexItem","isOrderable"],[1,"legend",3,"click","innerHTML"],[3,"disabled"],[4,"ngIf"],["class","help-block",3,"class","innerHTML",4,"ngIf"],[1,"help-block",3,"innerHTML"]],template:function(o,n){o&1&&Ie(0,AX,3,28,"div",0)(1,MX,5,31,"fieldset",1),o&2&&(I("ngIf",n.containerType==="div"),m(),I("ngIf",n.containerType==="fieldset"))},dependencies:[li,xf],styles:[".legend[_ngcontent-%COMP%]{font-weight:700}.expandable[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%], .expandable[_ngcontent-%COMP%] > label[_ngcontent-%COMP%], .expanded[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%], .expanded[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{cursor:pointer;}.expandable[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%]:before, .expandable[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]:before{font-weight:900;font-family:'Font Awesome 7 Free';content:'\\f054';padding-right:.3em;}.expanded[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%]:before, .expanded[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]:before{font-weight:900;font-family:'Font Awesome 7 Free';content:'\\f078';padding-right:.2em;}"]});let e=i;return e})(),ste=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.controlDisabled=!1,this.boundControl=!1,this.selectList=[],this.selectListFlatGroup=[],this.isArray=L,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.selectList=oc(this.options.titleMap||this.options.enumNames,this.options.enum,!!this.options.required,!!this.options.flatList),this.selectListFlatGroup=oc(this.options.titleMap||this.options.enumNames,this.options.enum,!!this.options.required,!0),this.jsf.initializeControl(this)}deselectAll(){this.selectListFlatGroup.forEach(s=>{s.checked=!1})}updateValue(s){if(this.options.showErrors=!0,this.options.multiple){this.controlValue?.includes(null)?(this.deselectAll(),this.jsf.updateArrayMultiSelectList(this,[])):(this.selectListFlatGroup.forEach(o=>{o.checked=this.controlValue?.indexOf(o.value)>=0}),this.jsf.updateArrayMultiSelectList(this,this.selectListFlatGroup));return}this.jsf.updateValue(this,this.controlValue)}ngOnDestroy(){let s=this.options.multiple?[null]:null;this.formControl.reset(s),this.controlValue=null}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["select-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[[3,"class","display","innerHTML",4,"ngIf"],[3,"formControl","class","id","name",4,"ngIf"],[3,"class","disabled","id","name","change",4,"ngIf"],[3,"class","disabled","id","multiple","name","ngModel","ngModelChange","change",4,"ngIf"],[3,"innerHTML"],[3,"formControl","id","name"],["ngFor","",3,"ngForOf"],[3,"ngValue",4,"ngIf"],[3,"label",4,"ngIf"],[3,"ngValue"],[3,"label"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"change","disabled","id","name"],[3,"selected","ngValue",4,"ngIf"],[3,"selected","ngValue"],[3,"ngModelChange","change","disabled","id","multiple","name","ngModel"]],template:function(o,n){o&1&&(y(0,"div"),Ie(1,UX,1,6,"label",0)(2,qX,2,9,"select",1)(3,WX,2,9,"select",2)(4,XX,2,11,"select",3),b()),o&2&&(fe((n.options==null?null:n.options.htmlClass)||""),m(),I("ngIf",n.options==null?null:n.options.title),m(),I("ngIf",n.boundControl&&!(n.options!=null&&n.options.multiple)),m(),I("ngIf",!n.boundControl),m(),I("ngIf",n.boundControl&&(n.options==null?null:n.options.multiple)))},dependencies:[Ro,li,Vo,qo,ln,Tp,ci,cs,Fo],encapsulation:2});let e=i;return e})(),ote=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnDestroy(){this.isValidChangesSubs?.unsubscribe(),this.isValidChangesSubs=null,this.updateValue({target:{value:null}})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),B(this.options,"disabled")?this.controlDisabled=this.options.disabled:this.jsf.formOptions.disableInvalidSubmit&&(this.controlDisabled=!this.jsf.isValid,this.isValidChangesSubs=this.jsf.isValidChanges.subscribe(s=>this.controlDisabled=!s)),(this.controlValue===null||this.controlValue===void 0)&&(this.controlValue=this.options.title)}updateValue(s){typeof this.options.onClick=="function"?this.options.onClick(s):this.jsf.updateValue(this,s.target.value)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["submit-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:2,vars:12,consts:[[3,"click","disabled","id","name","type","value"]],template:function(o,n){if(o&1&&(y(0,"div")(1,"input",0),Q("click",function(c){return n.updateValue(c)}),b()()),o&2){let l,c,u;fe((n.options==null?null:n.options.htmlClass)||""),m(),fe((n.options==null?null:n.options.fieldHtmlClass)||""),I("disabled",n.controlDisabled)("id","control"+((l=n.layoutNode())==null?null:l._id))("name",n.controlName)("type",(c=n.layoutNode())==null?null:c.type)("value",n.controlValue),pe("aria-describedby","control"+((u=n.layoutNode())==null?null:u._id)+"Status")("readonly",n.options!=null&&n.options.readonly?"readonly":null)("required",n.options==null?null:n.options.required)}},encapsulation:2});let e=i;return e})(),rte=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.newComponent=null,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0),this.widgetContainer=Uo("widgetContainer",{read:br})}ngOnInit(){this.updateComponent()}ngOnChanges(){this.updateComponent()}updateComponent(){let s=this.layoutNode(),o=this.widgetContainer();if(o&&!this.newComponent&&s.options.template&&(this.newComponent=o.createComponent(s.options.template)),this.newComponent)for(let n of["layoutNode","layoutIndex","dataIndex"])this.newComponent.instance[n]=this[n]}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["template-widget"]],viewQuery:function(o,n){o&1&&Bo(n.widgetContainer,kf,5,br),o&2&&Eo()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[Do],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(o,n){o&1&&E(0,"div",null,0)},encapsulation:2});let e=i;return e})(),nte=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),this.valueChanges=this.formControl.valueChanges.subscribe(s=>{s==="null"&&this.formControl.setValue(null)})}ngOnDestroy(){this.valueChanges&&this.valueChanges.unsubscribe()}updateValue(s){this.jsf.updateValue(this,s.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["textarea-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:4,vars:5,consts:[[3,"class","display","innerHTML",4,"ngIf"],[3,"formControl","class","id","name",4,"ngIf"],[3,"class","disabled","id","name","value","input",4,"ngIf"],[3,"innerHTML"],[3,"formControl","id","name"],[3,"input","disabled","id","name","value"]],template:function(o,n){o&1&&(y(0,"div"),Ie(1,eee,1,6,"label",0)(2,tee,1,12,"textarea",1)(3,iee,2,14,"textarea",2),b()),o&2&&(fe((n.options==null?null:n.options.htmlClass)||""),m(),I("ngIf",n.options==null?null:n.options.title),m(),I("ngIf",n.boundControl),m(),I("ngIf",!n.boundControl))},dependencies:[li,wr,ci,Fo],encapsulation:2});let e=i;return e})(),b2=(()=>{let i=class i{constructor(){this.defaultWidget="text",this.widgetLibrary={none:Zee,root:xf,"select-framework":Sf,"select-widget":_2,$ref:Kee,email:"text",integer:"number",number:Qee,password:"text",search:"text",tel:"text",text:Yee,url:"text",color:"text",date:"text",datetime:"text","datetime-local":"text",month:"text",range:"number",time:"text",week:"text",checkbox:Lee,file:Wee,hidden:"text",image:"text",radio:"radios",reset:"submit",submit:ote,button:$ee,select:ste,textarea:nte,checkboxes:Gee,"checkboxes-inline":"checkboxes",checkboxbuttons:"checkboxes",radios:ete,"radios-inline":"radios",radiobuttons:"radios",section:ite,div:"section",fieldset:"section",flex:"section","one-of":Xee,array:"section",tabarray:"tabs",tab:"section",tabs:f2,message:Jee,help:"message",msg:"message",html:"message",template:rte,advancedfieldset:"section",authfieldset:"section",optionfieldset:"one-of",selectfieldset:"one-of",conditional:"section",actions:"section",tagsinput:"section",updown:"number","iso-date-time":"datetime-local","alt-datetime":"datetime-local","alt-date":"date",wizard:"section",textline:"text",selectcheckbox:ate},this.registeredWidgets={},this.frameworkWidgets={},this.activeWidgets={},this.setActiveWidgets()}setActiveWidgets(){this.activeWidgets=Object.assign({},this.widgetLibrary,this.frameworkWidgets,this.registeredWidgets);for(let s of Object.keys(this.activeWidgets)){let o=this.activeWidgets[s];if(typeof o=="string"){let n=[];for(;typeof o=="string"&&!n.includes(o);)n.push(o),o=this.activeWidgets[o];typeof o!="string"&&(this.activeWidgets[s]=o)}}return!0}setDefaultWidget(s){return this.hasWidget(s)?(this.defaultWidget=s,!0):!1}hasWidget(s,o="activeWidgets"){return!s||typeof s!="string"?!1:B(this[o],s)}hasDefaultWidget(s){return this.hasWidget(s,"widgetLibrary")}registerWidget(s,o){return!s||!o||typeof s!="string"?!1:(this.registeredWidgets[s]=o,this.setActiveWidgets())}unRegisterWidget(s){return B(this.registeredWidgets,s)?(delete this.registeredWidgets[s],this.setActiveWidgets()):!1}unRegisterAllWidgets(s=!0){return this.registeredWidgets={},s&&(this.frameworkWidgets={}),this.setActiveWidgets()}registerFrameworkWidgets(s){return(s===null||typeof s!="object")&&(s={}),this.frameworkWidgets=s,this.setActiveWidgets()}unRegisterFrameworkWidgets(){return Object.keys(this.frameworkWidgets).length?(this.frameworkWidgets={},this.setActiveWidgets()):!1}getWidget(s,o="activeWidgets"){return this.hasWidget(s,o)?this[o][s]:this.hasWidget(this.defaultWidget,o)?this[o][this.defaultWidget]:null}getAllWidgets(){return{widgetLibrary:this.widgetLibrary,registeredWidgets:this.registeredWidgets,frameworkWidgets:this.frameworkWidgets,activeWidgets:this.activeWidgets}}};i.\u0275fac=function(o){return new(o||i)},i.\u0275prov=vi({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})(),y2=(()=>{let i=class i{constructor(s){this.frameworks=s,this.widgetLibrary=V(b2),this.http=V(Cv),this.activeFramework=null,this.loadExternalAssets=!1,this.frameworkLibrary={},this.frameworks.forEach(o=>this.frameworkLibrary[o.name]=o),this.defaultFramework=this.frameworks[0].name,this.activeFrameworkName=this.defaultFramework,this.activeFrameworkNameSubject=new Yi,this.activeFrameworkName$=this.activeFrameworkNameSubject.asObservable(),this.setFramework(this.defaultFramework)}setLoadExternalAssets(s=!0){this.loadExternalAssets=!!s}setFramework(s=this.defaultFramework,o=this.loadExternalAssets){return this.activeFramework=typeof s=="string"&&this.hasFramework(s)?this.frameworkLibrary[s]:typeof s=="object"&&B(s,"framework")?s:this.frameworkLibrary[this.defaultFramework],this.activeFramework.name!=this.activeFrameworkName&&(this.activeFrameworkName=this.activeFramework.name,this.activeFrameworkNameSubject.next(this.activeFrameworkName)),this.registerFrameworkWidgets(this.activeFramework)}registerFrameworkWidgets(s){return B(s,"widgets")?this.widgetLibrary.registerFrameworkWidgets(s.widgets):this.widgetLibrary.unRegisterFrameworkWidgets()}hasFramework(s){return B(this.frameworkLibrary,s)}getFramework(){return this.activeFramework||this.setFramework("default",!0),this.activeFramework.framework}getFrameworkList(){return this.frameworks.map(s=>({name:s.name,text:s.text}))}getFrameworkWidgets(){return this.activeFramework.widgets||{}}getFrameworkStylesheets(s=this.loadExternalAssets){return s&&this.activeFramework.stylesheets||[]}getFrameworkScripts(s=this.loadExternalAssets){return s&&this.activeFramework.scripts||[]}getFrameworkConfig(s){return(s||this.activeFramework).config}getFrameworkAssetConfig(s,o=!0){let l=`assets/${(s||this.activeFramework).name}/cssframework`,c=`${l}/assets.json`,u=this.http.get(c,{responseType:"text"});return gv(u).then(p=>{let _=JSON.parse(p);return o&&(_.stylesheets=_.stylesheets.map(f=>{let S=["/","//","http:","https:"],C=!1;return S.forEach(P=>{C=C||f.indexOf(P)==0}),C?f:`${l}/${f}`}),_.scripts=_.scripts.map(f=>`${l}/${f}`)),_})}getFrameworkThemes(){let s=this.getFrameworkConfig(),o;return s&&(o=s?.widgetstyles?.__themes__||[]),o}requestThemeChange(s,o=!1,n){let l=n||this.activeFramework;if(l.requestThemeChange){if(o){let u=this.getFrameworkThemes().filter(p=>p.name==s);if(!u||u.length==0)return!1}return l.requestThemeChange(s),!0}}getActiveTheme(s){let o=s||this.activeFramework;if(o.getActiveTheme)return o.getActiveTheme()}registerTheme(s,o){let n=o||this.activeFramework;if(n.registerTheme)return n.registerTheme(s)}unregisterTheme(s,o){let n=o||this.activeFramework;if(n.registerTheme)return n.unregisterTheme(s)}};i.\u0275fac=function(o){return new(o||i)(fv(Hf))},i.\u0275prov=vi({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})(),ate=(()=>{let i=class i{constructor(){this.jsf=V(Rt),this.jsfFLService=V(y2),this.controlDisabled=!1,this.boundControl=!1,this.selectList=[],this.selectListFlatGroup=[],this.isArray=L,this.layoutNode=re(void 0),this.layoutIndex=re(void 0),this.dataIndex=re(void 0),this.frameworkStyles={daisyui:{selectClass:"select-box",optionClass:"checkbox tw:dui-checkbox",optionChecked:"active",optionUnchecked:""},"bootstrap-3":{selectClass:"select-box",optionClass:"bs3-option checkbox display-inline-block",optionChecked:"active",optionUnchecked:""},"bootstrap-4":{selectClass:"select-box",optionClass:"bs4-option checkbox display-inline-block",optionChecked:"active",optionUnchecked:""},"bootstrap-5":{selectClass:" select-box",optionClass:"form-check-input display-inline-block",optionChecked:"active",optionUnchecked:""}}}ngOnInit(){this.options=this.layoutNode().options||{},this.activeFramework=this.jsfFLService.activeFramework.name,this.selectList=oc(this.options.enumNames||this.options?.title&&[this.options?.title]||[this.layoutNode().name],[!0],!0,!!this.options.flatList),this.jsf.initializeControl(this),this.selectValue=[this.controlValue]}deselectAll(){this.selectListFlatGroup.forEach(s=>{s.checked=!1})}updateValue(s){this.options.showErrors=!0,this.controlValue=this.selectValue[0],this.jsf.updateValue(this,this.controlValue)}onSelectClicked(s){this.selectValue=this.selectValue&&this.selectValue[0]?[!1]:[!0],this.controlValue=this.selectValue[0],this.jsf.updateValue(this,this.controlValue)}ngOnDestroy(){let s=this.options.multiple?[null]:null;this.formControl.reset(s),this.controlValue=null}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["selectcheckbox-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:4,consts:[[3,"class","multiple","id","name","ngModel",4,"ngIf"],[3,"class","multiple","disabled","id","name","change",4,"ngIf"],[3,"multiple","id","name","ngModel"],["ngFor","",3,"ngForOf"],["type","checkbox",3,"class","active","unchecked-notusing","value","click",4,"ngIf"],[3,"innerHTML"],["type","checkbox",3,"click","value"],[3,"change","multiple","disabled","id","name"],["type","checkbox",3,"selected","class","checked-notusing","unchecked-notusing]","value",4,"ngIf"],["type","checkbox",3,"selected","value"]],template:function(o,n){o&1&&(y(0,"div"),Ie(1,ree,2,10,"select",0)(2,lee,2,10,"select",1),b()),o&2&&(fe((n.options==null?null:n.options.htmlClass)||""),m(),I("ngIf",n.boundControl),m(),I("ngIf",!n.boundControl))},dependencies:[Ro,li,Vo,qo,Tp,ci,cs],styles:['.select-box[_ngcontent-%COMP%]{font-size:16px;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none;height:25px;overflow:hidden;text-overflow:ellipsis;background-color:#fff;color:#000;background-color:transparent}.select-box[_ngcontent-%COMP%]:focus{outline:none}.select-option[_ngcontent-%COMP%]{font-size:20px;color:#000;background-color:#fff;display:inline-block}.unchecked[_ngcontent-%COMP%]:before{content:"\\2610";left:5px;top:50%;transform:translateY(-50%);font-size:30px}.checked[_ngcontent-%COMP%]:before{content:"\\2611";left:5px;top:50%;transform:translateY(-50%);font-size:30px}.select-option[_ngcontent-%COMP%]:checked{background-image:linear-gradient(0deg,#fff 0% 100%);color:#000}.select-box[multiple][_ngcontent-%COMP%]:focus{background-color:transparent;color:#00f;-webkit-text-fill-color:black}.display-inline-block[_ngcontent-%COMP%]{display:inline-block}.bs4-option[_ngcontent-%COMP%], .bs3-option[_ngcontent-%COMP%]{width:14px;height:14px;border:solid 1px;color:#a9a9a9;min-block-size:auto;border-radius:3px}.bs4-option[_ngcontent-%COMP%]:checked[type=checkbox], .bs3-option[_ngcontent-%COMP%]:checked[type=checkbox]{background-image:url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!--%20License%3A%20MIT.%20Made%20by%20jaynewey%3A%20https%3A%2F%2Fgithub.com%2Fjaynewey%2Fcharm-icons%20--%3E%3Csvg%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20fill%3D%22none%22%20stroke%3D%22%23000000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222.5%22%3E%3Cpolyline%20points%3D%224%208.75%2C6.25%2012.25%2C13.25%203.5%22%2F%3E%3C%2Fsvg%3E);background-color:#00ced1}']});let e=i;return e})();var wf=(()=>{let i=class i{};i.\u0275fac=function(o){return new(o||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=on({imports:[nd,xs,Aa,sP.forRoot({filter:".sortable-filter",preventOnFilter:!1,onMove:function(s,o){if(s.related.classList.contains("sortable-fixed"))return!1}})]});let e=i;return e})(),lte=(()=>{let i=class i{};i.\u0275fac=function(o){return new(o||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=on({providers:[{provide:Hf,useClass:qee,multi:!0}],imports:[nd,wf]});let e=i;return e})(),cte={provide:Iv,useExisting:_v(()=>rc),multi:!0},rc=(()=>{let i=class i{constructor(){this.changeDetector=V(rd),this.frameworkLibrary=V(y2),this.widgetLibrary=V(b2),this.jsf=V(Rt),this.unsubscribeOnActivateForm$=new Yi,this.formValueSubscription=null,this.formInitialized=!1,this.objectWrap=!1,this.previousInputs={schema:null,layout:null,data:null,options:null,framework:null,widgets:null,form:null,model:null,JSONSchema:null,UISchema:null,formData:null,loadExternalAssets:null,debug:null,ajvOptions:null},this.schema=re(void 0),this.layout=re(void 0),this.data=re(void 0),this.options=re(void 0),this.framework=re(void 0),this.widgets=re(void 0),this.form=re(void 0),this.model=re(void 0),this.JSONSchema=re(void 0),this.UISchema=re(void 0),this.formData=re(void 0),this.ngModel=re(void 0),this.language=re(void 0),this.loadExternalAssets=re(void 0),this.debug=re(void 0),this.theme=re(void 0),this.ajvOptions=re(void 0),this.onChanges=xi(),this.onSubmit=xi(),this.isValid=xi(),this.validationErrors=xi(),this.formSchema=xi(),this.formLayout=xi(),this.dataChange=xi(),this.modelChange=xi(),this.formDataChange=xi(),this.ngModelChange=xi()}get value(){return this.objectWrap?this.jsf.data[1]:this.jsf.data}set value(s){this.setFormValues(s,!1)}ngOnDestroy(){this.dataChangesSubs?.unsubscribe(),this.statusChangesSubs?.unsubscribe(),this.isValidChangesSubs?.unsubscribe(),this.validationErrorChangesSubs?.unsubscribe(),this.dataChangesSubs=null,this.statusChangesSubs=null,this.isValidChangesSubs=null,this.validationErrorChangesSubs=null}getInputValue(s){return typeof this[s]=="function"?this[s]():this[s]}resetScriptsAndStyleSheets(){document.querySelectorAll(".ajsf").forEach(s=>s.remove())}loadScripts(s){(s||this.frameworkLibrary.getFrameworkScripts()).map(n=>{let l=document.createElement("script");l.src=n,l.type="text/javascript",l.async=!0,l.setAttribute("class","ajsf"),document.getElementsByTagName("head")[0].appendChild(l)})}loadStyleSheets(s){(s||this.frameworkLibrary.getFrameworkStylesheets()).map(n=>{let l=document.createElement("link");l.rel="stylesheet",l.href=n,l.setAttribute("class","ajsf"),document.getElementsByTagName("head")[0].appendChild(l)})}loadAssets(){this.frameworkLibrary.getFrameworkAssetConfig().then(s=>{this.resetScriptsAndStyleSheets(),this.loadScripts(s.scripts),this.loadStyleSheets(s.stylesheets)}).catch(s=>{console.log(s),this.resetScriptsAndStyleSheets(),this.loadScripts(),this.loadStyleSheets()})}ngOnInit(){this.updateForm(),this.loadAssets()}ngOnChanges(s){this.updateForm(),s.framework&&!s.framework.isFirstChange()&&s.framework.previousValue!==s.framework.currentValue&&this.loadAssets()}writeValue(s){this.setFormValues(s,!1),this.formValuesInput||(this.formValuesInput="ngModel")}registerOnChange(s){this.onChange=s}registerOnTouched(s){this.onTouched=s}setDisabledState(s){this.jsf.formOptions.formDisabled!==!!s&&(this.jsf.formOptions.formDisabled=!!s,this.initializeForm())}updateForm(){let s,o=this.language();if(!this.formInitialized||!this.formValuesInput||o&&o!==this.jsf.language)this.initializeForm();else{o&&o!==this.jsf.language&&this.jsf.setLanguage(o);let n=Object.keys(this.previousInputs).filter(u=>this.previousInputs[u]!==this.getInputValue(u)),l=!0;if(n.length===1&&n[0]==="form"&&this.formValuesInput.startsWith("form.")&&(n=Object.keys(this.previousInputs.form||{}).filter(u=>!(0,Xi.default)(this.previousInputs.form[u],this.form()[u])).map(u=>`form.${u}`),l=!1),n.length===1&&n[0]===this.formValuesInput)if(this.formValuesInput.indexOf(".")===-1)s=this.getInputValue(this.formValuesInput),this.setFormValues(s,l);else{let[u,p]=this.formValuesInput.split(".");s=this.getInputValue(u)[p],this.setFormValues(s,l)}else n.length&&(this.initializeForm(s),this.onChange&&this.onChange(this.jsf.formValues),this.onTouched&&this.onTouched(this.jsf.formValues));let c=this.theme();c&&c!==this.frameworkLibrary.getActiveTheme()?.name&&this.frameworkLibrary.requestThemeChange(c),Object.keys(this.previousInputs).filter(u=>this.previousInputs[u]!==this.getInputValue(u)).forEach(u=>this.previousInputs[u]=this.getInputValue(u))}}setFormValues(s,o=!0){if(s){let n=this.objectWrap?s[1]:s;this.jsf.formGroup?o&&this.jsf.formGroup.reset({},{emitEvent:!1}):(this.jsf.formValues=s,this.activateForm()),this.jsf.formGroup&&this.jsf.formGroup.patchValue(n,{emitEvent:!1}),this.onChange&&this.onChange(n),this.onTouched&&this.onTouched(n)}else this.jsf.formGroup.reset()}submitForm(){let s=this.jsf.validData;this.onSubmit.emit(this.objectWrap?s[1]:s)}initializeForm(s){if(this.schema()||this.layout()||this.data()||this.form()||this.model()||this.JSONSchema()||this.UISchema()||this.formData()||this.ngModel()||this.jsf.data){if(this.jsf.resetAllValues(),this.initializeAjv(),this.initializeOptions(),this.initializeSchema(),this.initializeLayout(),this.initializeData(),s&&(this.jsf.formValues=s),this.activateForm(),this.debug()||this.jsf.formOptions.debug){let o=[];this.debugOutput=o.map(n=>JSON.stringify(n,null,2)).join(`
31
- `)}this.formInitialized=!0}}initializeAjv(){let s=this.form(),o=(0,Re.default)(this.ajvOptions())||s&&B(s,"ajvOptions")&&te(s.ajvOptions)&&(0,Re.default)(s.ajvOptions);o&&(this.ajvInstanceName=this.jsf.createAndRegisterAjvInstance(o).name)}initializeOptions(){let s=this.language();s&&s!==this.jsf.language&&this.jsf.setLanguage(s),this.jsf.setOptions({debug:!!this.debug()});let o=this.loadExternalAssets()||!1,n=this.framework()||"default",l=this.options();te(l)&&(this.jsf.setOptions(l),o=l.loadExternalAssets||o,n=l.framework||n);let c=this.form();te(c)&&te(c.options)&&(this.jsf.setOptions(c.options),o=c.options.loadExternalAssets||o,n=c.options.framework||n);let u=this.widgets();if(te(u)&&this.jsf.setOptions({widgets:u}),this.frameworkLibrary.setLoadExternalAssets(o),this.frameworkLibrary.setFramework(n),this.jsf.framework=this.frameworkLibrary.getFramework(),te(this.jsf.formOptions.widgets))for(let _ of Object.keys(this.jsf.formOptions.widgets))this.widgetLibrary.registerWidget(_,this.jsf.formOptions.widgets[_]);te(c)&&te(c.tpldata)&&this.jsf.setTpldata(c.tpldata);let p=this.theme();p&&this.frameworkLibrary.requestThemeChange(p)}initializeSchema(){let s=this.form(),o=this.schema(),n=this.JSONSchema();te(o)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.schema=(0,Re.default)(o)):B(s,"schema")&&te(s.schema)?this.jsf.schema=(0,Re.default)(s.schema):te(n)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,Re.default)(n)):B(s,"JSONSchema")&&te(s.JSONSchema)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,Re.default)(s.JSONSchema)):B(s,"properties")&&te(s.properties)?this.jsf.schema=(0,Re.default)(s):te(s),Ne(this.jsf.schema)||(Wt("object",this.jsf.schema.type)&&(this.jsf.schema.type="object"),B(this.jsf.schema,"type")&&this.jsf.schema.type!=="object"?(this.jsf.schema={type:"object",properties:{1:this.jsf.schema}},this.objectWrap=!0):B(this.jsf.schema,"type")||(te(this.jsf.schema.properties)||te(this.jsf.schema.patternProperties)||te(this.jsf.schema.additionalProperties)?this.jsf.schema.type="object":(this.jsf.JsonFormCompatibility=!0,this.jsf.schema={type:"object",properties:this.jsf.schema})),this.jsf.schema=Xn(this.jsf.schema),this.jsf.schema=jee(this.jsf.schema,this.jsf.schemaRefLibrary,this.jsf.schemaRecursiveRefMap,this.jsf.dataRecursiveRefMap,this.jsf.arrayMap),B(this.jsf.schemaRefLibrary,"")&&(this.jsf.hasRootReference=!0))}initializeData(){let s=this.form(),o=this.data(),n=this.model(),l=this.ngModel();Se(o)?(this.jsf.formValues=(0,Re.default)(o),this.formValuesInput="data"):Se(n)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(n),this.formValuesInput="model"):Se(l)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(l),this.formValuesInput="ngModel"):te(s)&&Se(s.value)?(this.jsf.JsonFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(s.value),this.formValuesInput="form.value"):te(s)&&Se(s.data)?(this.jsf.formValues=(0,Re.default)(s.data),this.formValuesInput="form.data"):Se(this.formData())?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.formValuesInput="formData"):B(s,"formData")&&Se(s.formData)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(s.formData),this.formValuesInput="form.formData"):this.formValuesInput="data"}initializeLayout(){let s=p=>((te(p)||L(p))&&Vi(p,(_,f)=>{B(_,"options")&&te(_.options)&&(_.titleMap=_.options,delete _.options)},"top-down"),p),o=this.form(),n=this.layout();L(n)?this.jsf.layout=(0,Re.default)(n):L(o)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.layout=(0,Re.default)(o)):o&&L(o.form)?(this.jsf.JsonFormCompatibility=!0,this.jsf.layout=s((0,Re.default)(o.form))):o&&L(o.layout)?this.jsf.layout=(0,Re.default)(o.layout):this.jsf.layout=["*"];let l=null,c=this.form(),u=this.UISchema();te(u)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,l=(0,Re.default)(u)):B(c,"UISchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,l=(0,Re.default)(c.UISchema)):B(c,"uiSchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,l=(0,Re.default)(c.uiSchema)):B(c,"customFormItems")&&(this.jsf.JsonFormCompatibility=!0,l=s((0,Re.default)(c.customFormItems))),l&&K.forEachDeep(l,(p,_)=>{let f=_.replace(/\//g,"/properties/").replace(/\/properties\/items\/properties\//g,"/items/properties/").replace(/\/properties\/titleMap\/properties\//g,"/titleMap/properties/");if(Se(p)&&Se(_)){let S=K.toKey(_),C=(K.parse(f)||[]).slice(0,-2),P;S.toLowerCase()==="ui:order"?P=[...C,"ui:order"]:(S.slice(0,3).toLowerCase()==="ui:"&&(S=S.slice(3)),P=[...C,"x-schema-form",S]),K.has(this.jsf.schema,C)&&!K.has(this.jsf.schema,P)&&K.set(this.jsf.schema,P,p)}})}activateForm(){if(this.unsubscribeOnActivateForm$.next(),Ne(this.jsf.schema)&&(Ne(this.jsf.formValues)||this.jsf.buildSchemaFromData()),Ne(this.jsf.schema)||(this.jsf.buildLayout(this.widgetLibrary),this.jsf.buildFormGroupTemplate(this.jsf.formValues),this.jsf.buildFormGroup(this.ajvInstanceName)),this.jsf.formGroup){!Ne(this.jsf.formValues)&&this.jsf.formOptions.setSchemaDefaults!==!0&&this.jsf.formOptions.setLayoutDefaults!==!0&&this.setFormValues(this.jsf.formValues),this.dataChangesSubs=this.jsf.dataChanges.pipe(Ta(this.unsubscribeOnActivateForm$)).subscribe(o=>{this.onChanges.emit(this.objectWrap?o[1]:o),this.formValuesInput&&this.formValuesInput.indexOf(".")===-1&&this[`${this.formValuesInput}Change`].emit(this.objectWrap?o[1]:o)}),this.statusChangesSubs=this.jsf.formGroup.statusChanges.pipe(Ta(this.unsubscribeOnActivateForm$)).subscribe(()=>this.changeDetector.markForCheck()),this.isValidChangesSubs=this.jsf.isValidChanges.pipe(Ta(this.unsubscribeOnActivateForm$)).subscribe(o=>this.isValid.emit(o)),this.validationErrorChangesSubs=this.jsf.validationErrorChanges.pipe(Ta(this.unsubscribeOnActivateForm$)).subscribe(o=>this.validationErrors.emit(o)),this.formSchema.emit(this.jsf.schema),this.formLayout.emit(this.jsf.layout),this.onChanges.emit(this.objectWrap?this.jsf.data[1]:this.jsf.data);let s=K.get(this.jsf,"/formOptions/validateOnRender");if(s){let o=n=>{(s===!0||Se(n.value))&&n.markAsTouched(),Object.keys(n.controls||{}).forEach(l=>o(n.controls[l]))};o(this.jsf.formGroup),this.isValid.emit(this.jsf.isValid),this.validationErrors.emit(this.jsf.ajvErrors)}}}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["json-schema-form"]],inputs:{schema:[1,"schema"],layout:[1,"layout"],data:[1,"data"],options:[1,"options"],framework:[1,"framework"],widgets:[1,"widgets"],form:[1,"form"],model:[1,"model"],JSONSchema:[1,"JSONSchema"],UISchema:[1,"UISchema"],formData:[1,"formData"],ngModel:[1,"ngModel"],language:[1,"language"],loadExternalAssets:[1,"loadExternalAssets"],debug:[1,"debug"],theme:[1,"theme"],ajvOptions:[1,"ajvOptions"],value:"value"},outputs:{onChanges:"onChanges",onSubmit:"onSubmit",isValid:"isValid",validationErrors:"validationErrors",formSchema:"formSchema",formLayout:"formLayout",dataChange:"dataChange",modelChange:"modelChange",formDataChange:"formDataChange",ngModelChange:"ngModelChange"},standalone:!1,features:[Sv([Rt,cte]),Do],decls:3,vars:3,consts:[[1,"json-schema-form",3,"ngSubmit","autocomplete"],[3,"layout"],[4,"ngIf"]],template:function(o,n){o&1&&(y(0,"form",0),Q("ngSubmit",function(){return n.submitForm()}),E(1,"root-widget",1),b(),Ie(2,cee,4,1,"div",2)),o&2&&(I("autocomplete",!(n.jsf==null||n.jsf.formOptions==null)&&n.jsf.formOptions.autocomplete?"on":"off"),m(),I("layout",n.jsf==null?null:n.jsf.layout),m(),I("ngIf",n.debug()||(n.jsf==null||n.jsf.formOptions==null?null:n.jsf.formOptions.debug)))},dependencies:[li,Nv,Tv,zv,xf],encapsulation:2,changeDetection:0});let e=i;return e})(),v2=(()=>{let i=class i{};i.\u0275fac=function(o){return new(o||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=on({imports:[nd,xs,Aa,wf,lte,wf]});let e=i;return e})();var w2=(()=>{class e{jsonSchemaForm=V(rc,{host:!0,self:!0,optional:!0});jsfPatch=!1;constructor(){let t=this.jsonSchemaForm,s=t.jsf.buildLayout.bind(t.jsf);t.jsf.buildLayout=o=>{if(s(o),t.jsf.formValues&&this.jsfPatch)return this.fixNestedArrayLayout(t.jsf.layout,t.jsf.formValues)}}fixNestedArrayLayout(t,s){return this.fixArray(t,s,""),t}fixArray(t,s,o){if(Array.isArray(t)){let n=t.filter(u=>u.name!=="_bridge"),l=n.filter(u=>u.items&&Array.isArray(u.items)).flatMap(u=>u.items).filter(u=>u.dataType==="array"||u.arrayItem);n.concat(l).filter(u=>u.dataType==="array"||u.arrayItem).forEach(u=>{this.fixNestedArray(u,s,o)})}else this.fixNestedArray(t,s,o)}fixNestedArray(t,s,o){if(t.items&&Array.isArray(t.items)){let n=t.items.find(l=>l.type==="$ref");if(n){let l=t.items.filter(p=>p.type==="section"||p.type==="div"),c=l.length>0?l.reduce((p,_)=>p.id>_.id?p:_):this.getItemTemplateFromRef(n),u=this.getDataFromPointer(s,n.dataPointer.replace(o,""));if(u===null)return;if(Array.isArray(u)){for(;t.items.length-1<u.length;){let p=Pp(c);p._id=Wv("new_"),t.items.unshift(p)}u.forEach((p,_)=>{this.fixArray(t.items[_],p,n.dataPointer)})}else this.fixArray(t.items,s,n.dataPointer)}else this.fixArray(t.items,s,o);t.items.filter(l=>l.items&&Array.isArray(l.items)).forEach(l=>{this.fixArray(l.items,s,o)})}}getDataFromPointer(t,s){let o=t;return s.substring(1).split(/\//).filter(n=>n!=="-").forEach(n=>{try{o=o[n]}catch{o=null}}),o}getItemTemplateFromRef(t){let s={type:"section",items:[]},o=Pp(t);return Gv(o,s),o}static \u0275fac=function(s){return new(s||e)};static \u0275dir=yr({type:e,selectors:[["","jsfPatch",""]],inputs:{jsfPatch:"jsfPatch"}})}return e})();function ute(e,i){if(e&1){let t=ae();y(0,"json-schema-form",1),Q("onChanges",function(o){J(t);let n=x();return Z(n.onChanges(o))})("isValid",function(o){J(t);let n=x();return Z(n.validChange(o))}),b()}if(e&2){let t=x();I("jsfPatch",t.configSchema.fixArrays)("options",t.jsonFormOptions)("schema",t.configSchema.schema)("UISchema",t.configSchema.uiSchema)("layout",t.configSchema.layout)("form",t.configSchema.form)("data",t.currentData)("language",t.language)}}var Zu=(()=>{class e{$settings=V(jt);availableLanguages=["de","en","es","fr","it","pt","zh"];configSchema;data;dataChange=xi();dataChanged=xi();isValid=xi();currentData;language="en";jsonFormOptions={addSubmit:!1,loadExternalAssets:!1,returnEmptyFields:!1,setSchemaDefaults:!0,autocomplete:!1};ngOnInit(){let t=this.$settings.env.lang.split("-")[0];this.availableLanguages.includes(t)&&(this.language=t),this.currentData=this.data}onChanges(t){this.dataChange.emit(t),this.dataChanged.emit(t)}validChange(t){this.isValid.emit(t)}static \u0275fac=function(s){return new(s||e)};static \u0275cmp=we({type:e,selectors:[["app-schema-form"]],inputs:{configSchema:"configSchema",data:"data"},outputs:{dataChange:"dataChange",dataChanged:"dataChanged",isValid:"isValid"},decls:2,vars:1,consts:[["framework","bootstrap-5",1,"ng-bs5-validate",3,"jsfPatch","options","schema","UISchema","layout","form","data","language"],["framework","bootstrap-5",1,"ng-bs5-validate",3,"onChanges","isValid","jsfPatch","options","schema","UISchema","layout","form","data","language"]],template:function(s,o){s&1&&(Pa(0),R(1,ute,1,8,"json-schema-form",0),za()),s&2&&(m(),O(o.configSchema.schema?1:-1))},dependencies:[v2,rc,w2],encapsulation:2})}return e})();var Ote=cv({"../../../../i18n/bg.json":()=>k2(),"../../../../i18n/ca.json":()=>H2(),"../../../../i18n/cs.json":()=>S2(),"../../../../i18n/de.json":()=>x2(),"../../../../i18n/en.json":()=>C2(),"../../../../i18n/es.json":()=>I2(),"../../../../i18n/fi.json":()=>T2(),"../../../../i18n/fr.json":()=>P2(),"../../../../i18n/he.json":()=>z2(),"../../../../i18n/hu.json":()=>A2(),"../../../../i18n/id.json":()=>j2(),"../../../../i18n/it.json":()=>N2(),"../../../../i18n/ja.json":()=>D2(),"../../../../i18n/ko.json":()=>B2(),"../../../../i18n/mk.json":()=>E2(),"../../../../i18n/nl.json":()=>M2(),"../../../../i18n/no.json":()=>U2(),"../../../../i18n/pl.json":()=>R2(),"../../../../i18n/pt-BR.json":()=>O2(),"../../../../i18n/pt.json":()=>F2(),"../../../../i18n/ru.json":()=>V2(),"../../../../i18n/sl.json":()=>q2(),"../../../../i18n/sv.json":()=>K2(),"../../../../i18n/th.json":()=>$2(),"../../../../i18n/tr.json":()=>L2(),"../../../../i18n/uk.json":()=>G2(),"../../../../i18n/zh-CN.json":()=>W2(),"../../../../i18n/zh-TW.json":()=>Y2()});var Fte=["custompluginui"];function Vte(e,i){e&1&&(y(0,"div",6),E(1,"i",18),b())}function qte(e,i){if(e&1){let t=ae();y(0,"div",8)(1,"app-schema-form",19),mt("dataChange",function(o){J(t);let n=x();return pt(n.pluginConfig[0],o)||(n.pluginConfig[0]=o),Z(o)}),Q("dataChanged",function(o){J(t);let n=x();return Z(n.schemaFormUpdatedSubject.next(o))})("isValid",function(o){J(t);let n=x();return Z(n.onIsValid(o))}),b()()}if(e&2){let t=x();m(),I("configSchema",t.schema),gt("data",t.pluginConfig[0])}}function Kte(e,i){if(e&1){let t=ae();y(0,"button",23),Q("click",function(){J(t);let o=x(2);return Z(o.formActionSubject.next("cancel"))}),A(1),b()}if(e&2){let t=x(2);m(),le(t.formCancelButtonLabel)}}function $te(e,i){if(e&1){let t=ae();y(0,"button",24),Q("click",function(){J(t);let o=x(2);return Z(o.formActionSubject.next("submit"))}),A(1),b()}if(e&2){let t=x(2);I("disabled",!t.formValid),m(),se(" ",t.formSubmitButtonLabel," ")}}function Lte(e,i){if(e&1){let t=ae();y(0,"div",8)(1,"app-schema-form",19),mt("dataChange",function(o){J(t);let n=x();return pt(n.formData,o)||(n.formData=o),Z(o)}),Q("dataChanged",function(o){J(t);let n=x();return Z(n.formUpdatedSubject.next(o))})("isValid",function(o){J(t);let n=x();return Z(n.formValidEvent(o))}),b(),y(2,"div",20),R(3,Kte,2,1,"button",21),R(4,$te,2,2,"button",22),b()()}if(e&2){let t=x();m(),I("configSchema",t.formSchema),gt("data",t.formData),m(2),O(t.formCancelButtonLabel?3:-1),m(),O(t.formSubmitButtonLabel?4:-1)}}function Gte(e,i){e&1&&(y(0,"div",9),E(1,"i",18),b())}function Wte(e,i){if(e&1&&(E(0,"i",15),N(1,"translate")),e&2){let t=x();I("ngClass",t.formIsValid?"fa-circle-check green-text":t.strictValidation?"fa-circle-exclamation red-text":"fa-circle-exclamation orange-text")("ngbTooltip",M(1,3,t.formIsValid?"form.label_valid":t.strictValidation?"form.label_invalid_strict":"form.label_invalid"))("openDelay",150)}}function Yte(e,i){e&1&&(A(0),N(1,"translate")),e&2&&se(" ",M(1,1,"form.button_save")," ")}function Jte(e,i){e&1&&E(0,"i",17)}var J2=(()=>{class e{$activeModal=V(zt);$api=V(tt);$cb=V(mn);$plugin=V(ar);$settings=V(jt);$toastr=V(at);$translate=V(nt);$ws=V(Lo);customPluginUiElementTarget=Uo("custompluginui");plugin;schema;pluginConfig;pluginAlias;pluginType;loading=!0;saveInProgress=!1;pluginSpinner=!1;saveButtonDisabled=!1;uiLoaded=!1;showSchemaForm=!1;schemaFormUpdatedSubject=new Yi;formId;formSchema;formData;formSubmitButtonLabel;formCancelButtonLabel;formValid=!0;formUpdatedSubject=new Yi;formActionSubject=new Yi;isFirstSave=!1;formIsValid=!0;strictValidation=!1;io;basePath;iframe;schemaFormRecentlyUpdated=!1;schemaFormRecentlyRefreshed=!1;schemaFormRefreshSubject=new Yi;ngOnInit(){this.io=this.$ws.connectToNamespace("plugins/settings-ui"),this.pluginAlias=this.schema.pluginAlias,this.pluginType=this.schema.pluginType,this.strictValidation=this.schema.strictValidation,this.pluginConfig.length===0&&(this.isFirstSave=!0),this.io.connected?(this.io.socket.emit("start",this.plugin.name),setTimeout(()=>{this.io.connected.subscribe(()=>{this.io.socket.emit("start",this.plugin.name)})},1e3)):this.io.connected.subscribe(()=>{this.io.socket.emit("start",this.plugin.name)}),this.io.socket.on("response",t=>{t.action="response",this.iframe.contentWindow.postMessage(t,$o.api.origin)}),this.io.socket.on("stream",t=>{t.action="stream",this.iframe.contentWindow.postMessage(t,$o.api.origin)}),this.io.socket.on("ready",()=>{this.loading=!1,this.loadUi()}),this.schemaFormRefreshSubject.pipe(sn(250)).subscribe(this.schemaFormRefresh.bind(this)),this.schemaFormUpdatedSubject.pipe(sn(250),Sp(1)).subscribe(this.schemaFormUpdated.bind(this)),this.formUpdatedSubject.pipe(sn(100),Sp(1)).subscribe(this.formUpdated.bind(this)),this.formActionSubject.subscribe(this.formActionEvent.bind(this)),this.basePath=`/plugins/settings-ui/${encodeURIComponent(this.plugin.name)}`,window.addEventListener("message",this.handleMessage,!1)}onIsValid(t){this.formIsValid=t}formValidEvent(t){this.formValid=t}savePluginConfig(t=!1){return _e(this,null,function*(){this.saveInProgress=!0;try{let s=yield Ue(this.$api.post(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`,this.pluginConfig));if(this.saveInProgress=!1,t){if(this.isFirstSave&&this.$settings.env.recommendChildBridges&&s[0]?.platform){this.$activeModal.close(),this.$plugin.bridgeSettings(this.plugin,!0);return}this.$activeModal.close(),yield this.$cb.openCorrectRestartModalForPlugin(this.plugin.name)}}catch(s){console.error(s),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error")),this.saveInProgress=!1}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){window.removeEventListener("message",this.handleMessage),this.io.end(),this.schemaFormRefreshSubject.complete(),this.schemaFormUpdatedSubject.complete(),this.formUpdatedSubject.complete()}loadUi(){this.iframe=this.customPluginUiElementTarget().nativeElement,this.iframe.src=`${$o.api.base+this.basePath}/index.html?origin=${encodeURIComponent(location.origin)}&v=${encodeURIComponent(this.plugin.installedVersion)}`}handleMessage=t=>{if(t.origin===$o.api.origin||t.origin===window.origin)switch(t.data.action){case"loaded":this.injectDefaultStyles(t),this.confirmReady(t);break;case"request":{this.handleRequest(t);break}case"scrollHeight":this.setiFrameHeight(t),this.uiLoaded=!0;break;case"config.get":{this.requestResponse(t,this.getConfigBlocks());break}case"config.save":{this.requestResponse(t,this.savePluginConfig());break}case"config.update":{this.handleUpdateConfig(t,t.data.pluginConfig);break}case"config.schema":{this.requestResponse(t,this.schema);break}case"cachedAccessories.get":{this.handleGetCachedAccessories(t);break}case"schema.show":{this.formEnd(),this.showSchemaForm=!0;break}case"schema.hide":{this.showSchemaForm=!1;break}case"form.create":{this.showSchemaForm=!1,this.formCreate(t.data.formId,t.data.schema,t.data.data,t.data.submitButton,t.data.cancelButton);break}case"form.end":{this.formEnd();break}case"user.lightingMode":{this.requestResponse(t,this.$settings.actualLightingMode);break}case"i18n.lang":{this.requestResponse(t,this.$translate.getCurrentLang());break}case"i18n.translations":{this.requestResponse(t,Ote(`../../../../i18n/${this.$translate.getCurrentLang()}.json`));break}case"close":{this.$activeModal.close();break}case"toast.success":this.$toastr.success(t.data.message,t.data.title);break;case"toast.error":this.$toastr.error(t.data.message,t.data.title);break;case"toast.warning":this.$toastr.warning(t.data.message,t.data.title);break;case"toast.info":this.$toastr.info(t.data.message,t.data.title);break;case"spinner.show":this.pluginSpinner=!0;break;case"spinner.hide":this.pluginSpinner=!1;break;case"button.save.disabled":this.saveButtonDisabled=!0;break;case"button.save.enabled":this.saveButtonDisabled=!1;break}};confirmReady(t){t.source.postMessage({action:"ready"},t.origin)}setiFrameHeight(t){this.iframe.style.height=`${t.data.scrollHeight+10}px`}handleRequest(t){this.io.socket.emit("request",t.data)}handleUpdateConfig(t,s){if(this.schemaFormRefreshSubject.next(void 0),!Array.isArray(s))return this.$toastr.error(this.$translate.instant("plugins.config.must_be_array"),this.$translate.instant("toast.title_error")),this.requestResponse(t,{message:this.$translate.instant("plugins.config.must_be_array")},!1);for(let o of s)if(typeof o!="object"||Array.isArray(o))return this.$toastr.error(this.$translate.instant("plugins.config.must_be_array_objects"),this.$translate.instant("toast.title_error")),this.requestResponse(t,{message:this.$translate.instant("plugins.config.must_be_array_objects")},!1);return this.updateConfigBlocks(s),this.requestResponse(t,this.getConfigBlocks())}requestResponse(t,s,o=!0){t.source.postMessage({action:"response",requestId:t.data.requestId,success:o,data:s},t.origin)}injectDefaultStyles(t){return _e(this,null,function*(){let s=Array.from(window.document.body.classList).find(u=>u.startsWith("config-ui-x-")),o=window.document.body.classList.contains("dark-mode");t.source.postMessage({action:"body-class",class:s},t.origin),t.source.postMessage({action:"body-class",class:"modal-content"},t.origin),o&&t.source.postMessage({action:"body-class",class:"dark-mode"},t.origin);let n=Array.from(document.querySelectorAll("link"));for(let u of n)if(u.getAttribute("rel")==="stylesheet"){let p=u.getAttribute("href"),_=document.baseURI+(p.startsWith("/")?p.substring(1):p);t.source.postMessage({action:"link-element",href:_,rel:"stylesheet"},t.origin)}let l=Array.from(document.querySelectorAll("style"));for(let u of l)t.source.postMessage({action:"inline-style",style:u.innerHTML},t.origin);let c=`
31
+ `)}this.formInitialized=!0}}initializeAjv(){let s=this.form(),o=(0,Re.default)(this.ajvOptions())||s&&B(s,"ajvOptions")&&te(s.ajvOptions)&&(0,Re.default)(s.ajvOptions);o&&(this.ajvInstanceName=this.jsf.createAndRegisterAjvInstance(o).name)}initializeOptions(){let s=this.language();s&&s!==this.jsf.language&&this.jsf.setLanguage(s),this.jsf.setOptions({debug:!!this.debug()});let o=this.loadExternalAssets()||!1,n=this.framework()||"default",l=this.options();te(l)&&(this.jsf.setOptions(l),o=l.loadExternalAssets||o,n=l.framework||n);let c=this.form();te(c)&&te(c.options)&&(this.jsf.setOptions(c.options),o=c.options.loadExternalAssets||o,n=c.options.framework||n);let u=this.widgets();if(te(u)&&this.jsf.setOptions({widgets:u}),this.frameworkLibrary.setLoadExternalAssets(o),this.frameworkLibrary.setFramework(n),this.jsf.framework=this.frameworkLibrary.getFramework(),te(this.jsf.formOptions.widgets))for(let _ of Object.keys(this.jsf.formOptions.widgets))this.widgetLibrary.registerWidget(_,this.jsf.formOptions.widgets[_]);te(c)&&te(c.tpldata)&&this.jsf.setTpldata(c.tpldata);let p=this.theme();p&&this.frameworkLibrary.requestThemeChange(p)}initializeSchema(){let s=this.form(),o=this.schema(),n=this.JSONSchema();te(o)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.schema=(0,Re.default)(o)):B(s,"schema")&&te(s.schema)?this.jsf.schema=(0,Re.default)(s.schema):te(n)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,Re.default)(n)):B(s,"JSONSchema")&&te(s.JSONSchema)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,Re.default)(s.JSONSchema)):B(s,"properties")&&te(s.properties)?this.jsf.schema=(0,Re.default)(s):te(s),Ne(this.jsf.schema)||(Wt("object",this.jsf.schema.type)&&(this.jsf.schema.type="object"),B(this.jsf.schema,"type")&&this.jsf.schema.type!=="object"?(this.jsf.schema={type:"object",properties:{1:this.jsf.schema}},this.objectWrap=!0):B(this.jsf.schema,"type")||(te(this.jsf.schema.properties)||te(this.jsf.schema.patternProperties)||te(this.jsf.schema.additionalProperties)?this.jsf.schema.type="object":(this.jsf.JsonFormCompatibility=!0,this.jsf.schema={type:"object",properties:this.jsf.schema})),this.jsf.schema=Xn(this.jsf.schema),this.jsf.schema=jee(this.jsf.schema,this.jsf.schemaRefLibrary,this.jsf.schemaRecursiveRefMap,this.jsf.dataRecursiveRefMap,this.jsf.arrayMap),B(this.jsf.schemaRefLibrary,"")&&(this.jsf.hasRootReference=!0))}initializeData(){let s=this.form(),o=this.data(),n=this.model(),l=this.ngModel();Se(o)?(this.jsf.formValues=(0,Re.default)(o),this.formValuesInput="data"):Se(n)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(n),this.formValuesInput="model"):Se(l)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(l),this.formValuesInput="ngModel"):te(s)&&Se(s.value)?(this.jsf.JsonFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(s.value),this.formValuesInput="form.value"):te(s)&&Se(s.data)?(this.jsf.formValues=(0,Re.default)(s.data),this.formValuesInput="form.data"):Se(this.formData())?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.formValuesInput="formData"):B(s,"formData")&&Se(s.formData)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(s.formData),this.formValuesInput="form.formData"):this.formValuesInput="data"}initializeLayout(){let s=p=>((te(p)||L(p))&&Vi(p,(_,f)=>{B(_,"options")&&te(_.options)&&(_.titleMap=_.options,delete _.options)},"top-down"),p),o=this.form(),n=this.layout();L(n)?this.jsf.layout=(0,Re.default)(n):L(o)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.layout=(0,Re.default)(o)):o&&L(o.form)?(this.jsf.JsonFormCompatibility=!0,this.jsf.layout=s((0,Re.default)(o.form))):o&&L(o.layout)?this.jsf.layout=(0,Re.default)(o.layout):this.jsf.layout=["*"];let l=null,c=this.form(),u=this.UISchema();te(u)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,l=(0,Re.default)(u)):B(c,"UISchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,l=(0,Re.default)(c.UISchema)):B(c,"uiSchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,l=(0,Re.default)(c.uiSchema)):B(c,"customFormItems")&&(this.jsf.JsonFormCompatibility=!0,l=s((0,Re.default)(c.customFormItems))),l&&K.forEachDeep(l,(p,_)=>{let f=_.replace(/\//g,"/properties/").replace(/\/properties\/items\/properties\//g,"/items/properties/").replace(/\/properties\/titleMap\/properties\//g,"/titleMap/properties/");if(Se(p)&&Se(_)){let S=K.toKey(_),C=(K.parse(f)||[]).slice(0,-2),P;S.toLowerCase()==="ui:order"?P=[...C,"ui:order"]:(S.slice(0,3).toLowerCase()==="ui:"&&(S=S.slice(3)),P=[...C,"x-schema-form",S]),K.has(this.jsf.schema,C)&&!K.has(this.jsf.schema,P)&&K.set(this.jsf.schema,P,p)}})}activateForm(){if(this.unsubscribeOnActivateForm$.next(),Ne(this.jsf.schema)&&(Ne(this.jsf.formValues)||this.jsf.buildSchemaFromData()),Ne(this.jsf.schema)||(this.jsf.buildLayout(this.widgetLibrary),this.jsf.buildFormGroupTemplate(this.jsf.formValues),this.jsf.buildFormGroup(this.ajvInstanceName)),this.jsf.formGroup){!Ne(this.jsf.formValues)&&this.jsf.formOptions.setSchemaDefaults!==!0&&this.jsf.formOptions.setLayoutDefaults!==!0&&this.setFormValues(this.jsf.formValues),this.dataChangesSubs=this.jsf.dataChanges.pipe(Ta(this.unsubscribeOnActivateForm$)).subscribe(o=>{this.onChanges.emit(this.objectWrap?o[1]:o),this.formValuesInput&&this.formValuesInput.indexOf(".")===-1&&this[`${this.formValuesInput}Change`].emit(this.objectWrap?o[1]:o)}),this.statusChangesSubs=this.jsf.formGroup.statusChanges.pipe(Ta(this.unsubscribeOnActivateForm$)).subscribe(()=>this.changeDetector.markForCheck()),this.isValidChangesSubs=this.jsf.isValidChanges.pipe(Ta(this.unsubscribeOnActivateForm$)).subscribe(o=>this.isValid.emit(o)),this.validationErrorChangesSubs=this.jsf.validationErrorChanges.pipe(Ta(this.unsubscribeOnActivateForm$)).subscribe(o=>this.validationErrors.emit(o)),this.formSchema.emit(this.jsf.schema),this.formLayout.emit(this.jsf.layout),this.onChanges.emit(this.objectWrap?this.jsf.data[1]:this.jsf.data);let s=K.get(this.jsf,"/formOptions/validateOnRender");if(s){let o=n=>{(s===!0||Se(n.value))&&n.markAsTouched(),Object.keys(n.controls||{}).forEach(l=>o(n.controls[l]))};o(this.jsf.formGroup),this.isValid.emit(this.jsf.isValid),this.validationErrors.emit(this.jsf.ajvErrors)}}}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=we({type:i,selectors:[["json-schema-form"]],inputs:{schema:[1,"schema"],layout:[1,"layout"],data:[1,"data"],options:[1,"options"],framework:[1,"framework"],widgets:[1,"widgets"],form:[1,"form"],model:[1,"model"],JSONSchema:[1,"JSONSchema"],UISchema:[1,"UISchema"],formData:[1,"formData"],ngModel:[1,"ngModel"],language:[1,"language"],loadExternalAssets:[1,"loadExternalAssets"],debug:[1,"debug"],theme:[1,"theme"],ajvOptions:[1,"ajvOptions"],value:"value"},outputs:{onChanges:"onChanges",onSubmit:"onSubmit",isValid:"isValid",validationErrors:"validationErrors",formSchema:"formSchema",formLayout:"formLayout",dataChange:"dataChange",modelChange:"modelChange",formDataChange:"formDataChange",ngModelChange:"ngModelChange"},standalone:!1,features:[Sv([Rt,cte]),Do],decls:3,vars:3,consts:[[1,"json-schema-form",3,"ngSubmit","autocomplete"],[3,"layout"],[4,"ngIf"]],template:function(o,n){o&1&&(y(0,"form",0),Q("ngSubmit",function(){return n.submitForm()}),E(1,"root-widget",1),b(),Ie(2,cee,4,1,"div",2)),o&2&&(I("autocomplete",!(n.jsf==null||n.jsf.formOptions==null)&&n.jsf.formOptions.autocomplete?"on":"off"),m(),I("layout",n.jsf==null?null:n.jsf.layout),m(),I("ngIf",n.debug()||(n.jsf==null||n.jsf.formOptions==null?null:n.jsf.formOptions.debug)))},dependencies:[li,Nv,Tv,zv,xf],encapsulation:2,changeDetection:0});let e=i;return e})(),v2=(()=>{let i=class i{};i.\u0275fac=function(o){return new(o||i)},i.\u0275mod=nn({type:i}),i.\u0275inj=on({imports:[nd,xs,Aa,wf,lte,wf]});let e=i;return e})();var w2=(()=>{class e{jsonSchemaForm=V(rc,{host:!0,self:!0,optional:!0});jsfPatch=!1;constructor(){let t=this.jsonSchemaForm,s=t.jsf.buildLayout.bind(t.jsf);t.jsf.buildLayout=o=>{if(s(o),t.jsf.formValues&&this.jsfPatch)return this.fixNestedArrayLayout(t.jsf.layout,t.jsf.formValues)}}fixNestedArrayLayout(t,s){return this.fixArray(t,s,""),t}fixArray(t,s,o){if(Array.isArray(t)){let n=t.filter(u=>u.name!=="_bridge"),l=n.filter(u=>u.items&&Array.isArray(u.items)).flatMap(u=>u.items).filter(u=>u.dataType==="array"||u.arrayItem);n.concat(l).filter(u=>u.dataType==="array"||u.arrayItem).forEach(u=>{this.fixNestedArray(u,s,o)})}else this.fixNestedArray(t,s,o)}fixNestedArray(t,s,o){if(t.items&&Array.isArray(t.items)){let n=t.items.find(l=>l.type==="$ref");if(n){let l=t.items.filter(p=>p.type==="section"||p.type==="div"),c=l.length>0?l.reduce((p,_)=>p.id>_.id?p:_):this.getItemTemplateFromRef(n),u=this.getDataFromPointer(s,n.dataPointer.replace(o,""));if(u===null)return;if(Array.isArray(u)){for(;t.items.length-1<u.length;){let p=Pp(c);p._id=Wv("new_"),t.items.unshift(p)}u.forEach((p,_)=>{this.fixArray(t.items[_],p,n.dataPointer)})}else this.fixArray(t.items,s,n.dataPointer)}else this.fixArray(t.items,s,o);t.items.filter(l=>l.items&&Array.isArray(l.items)).forEach(l=>{this.fixArray(l.items,s,o)})}}getDataFromPointer(t,s){let o=t;return s.substring(1).split(/\//).filter(n=>n!=="-").forEach(n=>{try{o=o[n]}catch{o=null}}),o}getItemTemplateFromRef(t){let s={type:"section",items:[]},o=Pp(t);return Gv(o,s),o}static \u0275fac=function(s){return new(s||e)};static \u0275dir=yr({type:e,selectors:[["","jsfPatch",""]],inputs:{jsfPatch:"jsfPatch"}})}return e})();function ute(e,i){if(e&1){let t=ae();y(0,"json-schema-form",1),Q("onChanges",function(o){J(t);let n=x();return Z(n.onChanges(o))})("isValid",function(o){J(t);let n=x();return Z(n.validChange(o))}),b()}if(e&2){let t=x();I("jsfPatch",t.configSchema.fixArrays)("options",t.jsonFormOptions)("schema",t.configSchema.schema)("UISchema",t.configSchema.uiSchema)("layout",t.configSchema.layout)("form",t.configSchema.form)("data",t.currentData)("language",t.language)}}var Zu=(()=>{class e{$settings=V(jt);availableLanguages=["de","en","es","fr","it","pt","zh"];configSchema;data;dataChange=xi();dataChanged=xi();isValid=xi();currentData;language="en";jsonFormOptions={addSubmit:!1,loadExternalAssets:!1,returnEmptyFields:!1,setSchemaDefaults:!0,autocomplete:!1};ngOnInit(){let t=this.$settings.env.lang.split("-")[0];this.availableLanguages.includes(t)&&(this.language=t),this.currentData=this.data}onChanges(t){this.dataChange.emit(t),this.dataChanged.emit(t)}validChange(t){this.isValid.emit(t)}static \u0275fac=function(s){return new(s||e)};static \u0275cmp=we({type:e,selectors:[["app-schema-form"]],inputs:{configSchema:"configSchema",data:"data"},outputs:{dataChange:"dataChange",dataChanged:"dataChanged",isValid:"isValid"},decls:2,vars:1,consts:[["framework","bootstrap-5",1,"ng-bs5-validate",3,"jsfPatch","options","schema","UISchema","layout","form","data","language"],["framework","bootstrap-5",1,"ng-bs5-validate",3,"onChanges","isValid","jsfPatch","options","schema","UISchema","layout","form","data","language"]],template:function(s,o){s&1&&(Pa(0),R(1,ute,1,8,"json-schema-form",0),za()),s&2&&(m(),O(o.configSchema.schema?1:-1))},dependencies:[v2,rc,w2],encapsulation:2})}return e})();var Ote=cv({"../../../../i18n/bg.json":()=>k2(),"../../../../i18n/ca.json":()=>H2(),"../../../../i18n/cs.json":()=>S2(),"../../../../i18n/de.json":()=>x2(),"../../../../i18n/en.json":()=>C2(),"../../../../i18n/es.json":()=>I2(),"../../../../i18n/fi.json":()=>T2(),"../../../../i18n/fr.json":()=>P2(),"../../../../i18n/he.json":()=>z2(),"../../../../i18n/hu.json":()=>A2(),"../../../../i18n/id.json":()=>j2(),"../../../../i18n/it.json":()=>N2(),"../../../../i18n/ja.json":()=>D2(),"../../../../i18n/ko.json":()=>B2(),"../../../../i18n/mk.json":()=>E2(),"../../../../i18n/nl.json":()=>M2(),"../../../../i18n/no.json":()=>U2(),"../../../../i18n/pl.json":()=>R2(),"../../../../i18n/pt-BR.json":()=>O2(),"../../../../i18n/pt.json":()=>F2(),"../../../../i18n/ru.json":()=>V2(),"../../../../i18n/sl.json":()=>q2(),"../../../../i18n/sv.json":()=>K2(),"../../../../i18n/th.json":()=>$2(),"../../../../i18n/tr.json":()=>L2(),"../../../../i18n/uk.json":()=>G2(),"../../../../i18n/zh-CN.json":()=>W2(),"../../../../i18n/zh-TW.json":()=>Y2()});var Fte=["custompluginui"];function Vte(e,i){e&1&&(y(0,"div",6),E(1,"i",18),b())}function qte(e,i){if(e&1){let t=ae();y(0,"div",8)(1,"app-schema-form",19),mt("dataChange",function(o){J(t);let n=x();return pt(n.pluginConfig[0],o)||(n.pluginConfig[0]=o),Z(o)}),Q("dataChanged",function(o){J(t);let n=x();return Z(n.schemaFormUpdatedSubject.next(o))})("isValid",function(o){J(t);let n=x();return Z(n.onIsValid(o))}),b()()}if(e&2){let t=x();m(),I("configSchema",t.schema),gt("data",t.pluginConfig[0])}}function Kte(e,i){if(e&1){let t=ae();y(0,"button",23),Q("click",function(){J(t);let o=x(2);return Z(o.formActionSubject.next("cancel"))}),A(1),b()}if(e&2){let t=x(2);m(),le(t.formCancelButtonLabel)}}function $te(e,i){if(e&1){let t=ae();y(0,"button",24),Q("click",function(){J(t);let o=x(2);return Z(o.formActionSubject.next("submit"))}),A(1),b()}if(e&2){let t=x(2);I("disabled",!t.formValid),m(),se(" ",t.formSubmitButtonLabel," ")}}function Lte(e,i){if(e&1){let t=ae();y(0,"div",8)(1,"app-schema-form",19),mt("dataChange",function(o){J(t);let n=x();return pt(n.formData,o)||(n.formData=o),Z(o)}),Q("dataChanged",function(o){J(t);let n=x();return Z(n.formUpdatedSubject.next(o))})("isValid",function(o){J(t);let n=x();return Z(n.formValidEvent(o))}),b(),y(2,"div",20),R(3,Kte,2,1,"button",21),R(4,$te,2,2,"button",22),b()()}if(e&2){let t=x();m(),I("configSchema",t.formSchema),gt("data",t.formData),m(2),O(t.formCancelButtonLabel?3:-1),m(),O(t.formSubmitButtonLabel?4:-1)}}function Gte(e,i){e&1&&(y(0,"div",9),E(1,"i",18),b())}function Wte(e,i){if(e&1&&(E(0,"i",15),N(1,"translate")),e&2){let t=x();I("ngClass",t.formIsValid?"fa-circle-check green-text":t.strictValidation?"fa-circle-exclamation red-text":"fa-circle-exclamation orange-text")("ngbTooltip",M(1,3,t.formIsValid?"form.label_valid":t.strictValidation?"form.label_invalid_strict":"form.label_invalid"))("openDelay",150)}}function Yte(e,i){e&1&&(A(0),N(1,"translate")),e&2&&se(" ",M(1,1,"form.button_save")," ")}function Jte(e,i){e&1&&E(0,"i",17)}var J2=(()=>{class e{$activeModal=V(zt);$api=V(tt);$cb=V(mn);$plugin=V(ar);$settings=V(jt);$toastr=V(at);$translate=V(nt);$ws=V(Lo);customPluginUiElementTarget=Uo("custompluginui");plugin;schema;pluginConfig;pluginAlias;pluginType;loading=!0;saveInProgress=!1;pluginSpinner=!1;saveButtonDisabled=!1;uiLoaded=!1;showSchemaForm=!1;schemaFormUpdatedSubject=new Yi;formId;formSchema;formData;formSubmitButtonLabel;formCancelButtonLabel;formValid=!0;formUpdatedSubject=new Yi;formActionSubject=new Yi;isFirstSave=!1;formIsValid=!0;strictValidation=!1;io;basePath;iframe;schemaFormRecentlyUpdated=!1;schemaFormRecentlyRefreshed=!1;schemaFormRefreshSubject=new Yi;ngOnInit(){this.io=this.$ws.connectToNamespace("plugins/settings-ui"),this.pluginAlias=this.schema.pluginAlias,this.pluginType=this.schema.pluginType,this.strictValidation=this.schema.strictValidation,this.pluginConfig.length===0&&(this.isFirstSave=!0),this.io.connected?(this.io.socket.emit("start",this.plugin.name),setTimeout(()=>{this.io.connected.subscribe(()=>{this.io.socket.emit("start",this.plugin.name)})},1e3)):this.io.connected.subscribe(()=>{this.io.socket.emit("start",this.plugin.name)}),this.io.socket.on("response",t=>{t.action="response",this.iframe.contentWindow.postMessage(t,$o.api.origin)}),this.io.socket.on("stream",t=>{t.action="stream",this.iframe.contentWindow.postMessage(t,$o.api.origin)}),this.io.socket.on("ready",()=>{this.loading=!1,this.loadUi()}),this.schemaFormRefreshSubject.pipe(sn(250)).subscribe(this.schemaFormRefresh.bind(this)),this.schemaFormUpdatedSubject.pipe(sn(250),Sp(1)).subscribe(this.schemaFormUpdated.bind(this)),this.formUpdatedSubject.pipe(sn(100),Sp(1)).subscribe(this.formUpdated.bind(this)),this.formActionSubject.subscribe(this.formActionEvent.bind(this)),this.basePath=`/plugins/settings-ui/${encodeURIComponent(this.plugin.name)}`,window.addEventListener("message",this.handleMessage,!1)}onIsValid(t){this.formIsValid=t}formValidEvent(t){this.formValid=t}savePluginConfig(t=!1){return _e(this,null,function*(){this.saveInProgress=!0;try{let s=yield Ue(this.$api.post(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`,this.pluginConfig));if(this.saveInProgress=!1,t){if(this.isFirstSave&&this.$settings.env.recommendChildBridges&&s[0]?.platform){this.$activeModal.close(),this.$plugin.bridgeSettings(this.plugin,!0);return}this.$activeModal.close(),yield this.$cb.openCorrectRestartModalForPlugin(this.plugin.name)}}catch(s){console.error(s),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error")),this.saveInProgress=!1}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){window.removeEventListener("message",this.handleMessage),this.io.end(),this.schemaFormRefreshSubject.complete(),this.schemaFormUpdatedSubject.complete(),this.formUpdatedSubject.complete()}loadUi(){this.iframe=this.customPluginUiElementTarget().nativeElement,this.iframe.src=`${$o.api.base+this.basePath}/index.html?origin=${encodeURIComponent(location.origin)}&v=${encodeURIComponent(this.plugin.installedVersion)}`}handleMessage=t=>{if(t.origin===$o.api.origin||t.origin===window.origin)switch(t.data.action){case"loaded":this.injectDefaultStyles(t),this.confirmReady(t);break;case"request":{this.handleRequest(t);break}case"scrollHeight":this.setiFrameHeight(t),this.uiLoaded=!0;break;case"config.get":{this.requestResponse(t,this.getConfigBlocks());break}case"config.save":{this.requestResponse(t,this.savePluginConfig());break}case"config.update":{this.handleUpdateConfig(t,t.data.pluginConfig);break}case"config.schema":{this.requestResponse(t,this.schema);break}case"cachedAccessories.get":{this.handleGetCachedAccessories(t);break}case"schema.show":{this.formEnd(),this.showSchemaForm=!0;break}case"schema.hide":{this.showSchemaForm=!1;break}case"form.create":{this.showSchemaForm=!1,this.formCreate(t.data.formId,t.data.schema,t.data.data,t.data.submitButton,t.data.cancelButton);break}case"form.end":{this.formEnd();break}case"user.lightingMode":{this.requestResponse(t,this.$settings.actualLightingMode);break}case"i18n.lang":{this.requestResponse(t,this.$translate.getCurrentLang());break}case"i18n.translations":{this.requestResponse(t,Ote(`../../../../i18n/${this.$translate.getCurrentLang()}.json`));break}case"close":{this.$activeModal.close();break}case"toast.success":this.$toastr.success(t.data.message,t.data.title);break;case"toast.error":this.$toastr.error(t.data.message,t.data.title);break;case"toast.warning":this.$toastr.warning(t.data.message,t.data.title);break;case"toast.info":this.$toastr.info(t.data.message,t.data.title);break;case"spinner.show":this.pluginSpinner=!0;break;case"spinner.hide":this.pluginSpinner=!1;break;case"button.save.disabled":this.saveButtonDisabled=!0;break;case"button.save.enabled":this.saveButtonDisabled=!1;break}};confirmReady(t){t.source.postMessage({action:"ready"},t.origin)}setiFrameHeight(t){this.iframe.style.height=`${t.data.scrollHeight+10}px`}handleRequest(t){this.io.socket.emit("request",t.data)}handleUpdateConfig(t,s){if(this.showSchemaForm&&this.schemaFormRefreshSubject.next(void 0),!Array.isArray(s))return this.$toastr.error(this.$translate.instant("plugins.config.must_be_array"),this.$translate.instant("toast.title_error")),this.requestResponse(t,{message:this.$translate.instant("plugins.config.must_be_array")},!1);for(let o of s)if(typeof o!="object"||Array.isArray(o))return this.$toastr.error(this.$translate.instant("plugins.config.must_be_array_objects"),this.$translate.instant("toast.title_error")),this.requestResponse(t,{message:this.$translate.instant("plugins.config.must_be_array_objects")},!1);return this.updateConfigBlocks(s),this.requestResponse(t,this.getConfigBlocks())}requestResponse(t,s,o=!0){t.source.postMessage({action:"response",requestId:t.data.requestId,success:o,data:s},t.origin)}injectDefaultStyles(t){return _e(this,null,function*(){let s=Array.from(window.document.body.classList).find(u=>u.startsWith("config-ui-x-")),o=window.document.body.classList.contains("dark-mode");t.source.postMessage({action:"body-class",class:s},t.origin),t.source.postMessage({action:"body-class",class:"modal-content"},t.origin),o&&t.source.postMessage({action:"body-class",class:"dark-mode"},t.origin);let n=Array.from(document.querySelectorAll("link"));for(let u of n)if(u.getAttribute("rel")==="stylesheet"){let p=u.getAttribute("href"),_=document.baseURI+(p.startsWith("/")?p.substring(1):p);t.source.postMessage({action:"link-element",href:_,rel:"stylesheet"},t.origin)}let l=Array.from(document.querySelectorAll("style"));for(let u of l)t.source.postMessage({action:"inline-style",style:u.innerHTML},t.origin);let c=`
32
32
  body {
33
33
  height: unset !important;
34
34
  background-color: ${o?"#242424":"#FFFFFF"} !important;