@ws-ui/shared 1.10.0 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/declarations/datasources/datasource.d.ts +9 -1
- package/dist/declarations/webform/webform.d.ts +1 -0
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +78 -77
- package/dist/index.es.js.map +1 -1
- package/dist/shared.css +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/tests.d.ts +2 -0
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
`)},sg=function(){var e=parseInt(document.body.getAttribute(hi)||"0",10);return isFinite(e)?e:0},BR=function(){$.useEffect(function(){return document.body.setAttribute(hi,(sg()+1).toString()),function(){var e=sg()-1;e<=0?document.body.removeAttribute(hi):document.body.setAttribute(hi,e.toString())}},[])},UR=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;BR();var a=$.useMemo(function(){return jR(s)},[s]);return $.createElement(zR,{styles:WR(a,!t,s,r?"":"!important")})},dc=!1;if(typeof window<"u")try{var Us=Object.defineProperty({},"passive",{get:function(){return dc=!0,!0}});window.addEventListener("test",Us,Us),window.removeEventListener("test",Us,Us)}catch{dc=!1}var fi=dc?{passive:!1}:!1,HR=function(e){return e.tagName==="TEXTAREA"},_m=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!HR(e)&&r[t]==="visible")},qR=function(e){return _m(e,"overflowY")},ZR=function(e){return _m(e,"overflowX")},ag=function(e,t){var r=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=Om(e,i);if(s){var a=Am(e,i),l=a[1],c=a[2];if(l>c)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},GR=function(e){var t=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[t,r,i]},KR=function(e){var t=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[t,r,i]},Om=function(e,t){return e==="v"?qR(t):ZR(t)},Am=function(e,t){return e==="v"?GR(t):KR(t)},VR=function(e,t){return e==="h"&&t==="rtl"?-1:1},XR=function(e,t,r,i,s){var a=VR(e,window.getComputedStyle(t).direction),l=a*i,c=r.target,f=t.contains(c),m=!1,v=l>0,g=0,p=0;do{if(!c)break;var b=Am(e,c),x=b[0],d=b[1],w=b[2],h=d-w-a*x;(x||h)&&Om(e,c)&&(g+=h,p+=x);var S=c.parentNode;c=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(v&&Math.abs(g)<1||!v&&Math.abs(p)<1)&&(m=!0),m},Hs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ug=function(e){return[e.deltaX,e.deltaY]},lg=function(e){return e&&"current"in e?e.current:e},YR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},JR=function(e){return`
|
|
60
60
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
61
61
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
62
|
-
`)},QR=0,di=[];function eP(e){var t=$.useRef([]),r=$.useRef([0,0]),i=$.useRef(),s=$.useState(QR++)[0],a=$.useState(Em)[0],l=$.useRef(e);$.useEffect(function(){l.current=e},[e]),$.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var d=ma([e.lockRef.current],(e.shards||[]).map(lg),!0).filter(Boolean);return d.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),d.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var c=$.useCallback(function(d,w){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!l.current.allowPinchZoom;var h=Hs(d),S=r.current,E="deltaX"in d?d.deltaX:S[0]-h[0],R="deltaY"in d?d.deltaY:S[1]-h[1],O,k=d.target,B=Math.abs(E)>Math.abs(R)?"h":"v";if("touches"in d&&B==="h"&&k.type==="range")return!1;var M=ag(B,k);if(!M)return!0;if(M?O=B:(O=B==="v"?"h":"v",M=ag(B,k)),!M)return!1;if(!i.current&&"changedTouches"in d&&(E||R)&&(i.current=O),!O)return!0;var F=i.current||O;return XR(F,w,d,F==="h"?E:R)},[]),f=$.useCallback(function(d){var w=d;if(!(!di.length||di[di.length-1]!==a)){var h="deltaY"in w?ug(w):Hs(w),S=t.current.filter(function(O){return O.name===w.type&&(O.target===w.target||w.target===O.shadowParent)&&YR(O.delta,h)})[0];if(S&&S.should){w.cancelable&&w.preventDefault();return}if(!S){var E=(l.current.shards||[]).map(lg).filter(Boolean).filter(function(O){return O.contains(w.target)}),R=E.length>0?c(w,E[0]):!l.current.noIsolation;R&&w.cancelable&&w.preventDefault()}}},[]),m=$.useCallback(function(d,w,h,S){var E={name:d,delta:w,target:h,should:S,shadowParent:tP(h)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(R){return R!==E})},1)},[]),v=$.useCallback(function(d){r.current=Hs(d),i.current=void 0},[]),g=$.useCallback(function(d){m(d.type,ug(d),d.target,c(d,e.lockRef.current))},[]),p=$.useCallback(function(d){m(d.type,Hs(d),d.target,c(d,e.lockRef.current))},[]);$.useEffect(function(){return di.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:p}),document.addEventListener("wheel",f,fi),document.addEventListener("touchmove",f,fi),document.addEventListener("touchstart",v,fi),function(){di=di.filter(function(d){return d!==a}),document.removeEventListener("wheel",f,fi),document.removeEventListener("touchmove",f,fi),document.removeEventListener("touchstart",v,fi)}},[]);var b=e.removeScrollBar,x=e.inert;return $.createElement($.Fragment,null,x?$.createElement(a,{styles:JR(s)}):null,b?$.createElement(UR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rP=CR(Sm,eP);var Tm=$.forwardRef(function(e,t){return $.createElement(Ma,Or({},e,{ref:t,sideCar:rP}))});Tm.classNames=Ma.classNames;const nP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},iP=$.useId||(()=>{});let oP=0;function Rm(e){const[t,r]=$.useState(iP());return nP((()=>{r((i=>i??String(oP++)))}),[e]),e||(t?`radix-${t}`:"")}function Pm(...e){return t=>e.forEach((r=>(function(i,s){typeof i=="function"?i(s):i!=null&&(i.current=s)})(r,t)))}function mn(...e){return $.useCallback(Pm(...e),e)}const Cm=$.forwardRef(((e,t)=>{const{children:r,...i}=e;return $.Children.toArray(r).some(cg)?$.createElement($.Fragment,null,$.Children.map(r,(s=>cg(s)?$.createElement(pc,Ve({},i,{ref:t}),s.props.children):s))):$.createElement(pc,Ve({},i,{ref:t}),r)}));Cm.displayName="Slot";const pc=$.forwardRef(((e,t)=>{const{children:r,...i}=e;return $.isValidElement(r)?$.cloneElement(r,{...sP(i,r.props),ref:Pm(t,r.ref)}):$.Children.count(r)>1?$.Children.only(null):null}));pc.displayName="SlotClone";const km=({children:e})=>$.createElement($.Fragment,null,e);function cg(e){return $.isValidElement(e)&&e.type===km}function sP(e,t){const r={...t};for(const i in t){const s=e[i],a=t[i];/^on[A-Z]/.test(i)?r[i]=(...l)=>{a==null||a(...l),s==null||s(...l)}:i==="style"?r[i]={...s,...a}:i==="className"&&(r[i]=[s,a].filter(Boolean).join(" "))}return{...e,...r}}const yn=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:$.forwardRef(((r,i)=>{const{asChild:s,...a}=r,l=s?Cm:t;return $.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),$.createElement(l,Ve({},a,{ref:i}))}))})),{}),fg=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},Hc=e=>{const{present:t,children:r}=e,i=(function(l){const[c,f]=$.useState(),m=$.useRef({}),v=$.useRef(l),g=$.useRef("none"),p=l?"mounted":"unmounted",[b,x]=(function(d,w){return $.useReducer(((h,S)=>{const E=w[h][S];return E??h}),d)})(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return $.useEffect((()=>{const d=qs(m.current);g.current=b==="mounted"?d:"none"}),[b]),fg((()=>{const d=m.current,w=v.current;if(w!==l){const h=g.current,S=qs(d);l?x("MOUNT"):S==="none"||(d==null?void 0:d.display)==="none"?x("UNMOUNT"):x(w&&h!==S?"ANIMATION_OUT":"UNMOUNT"),v.current=l}}),[l,x]),fg((()=>{if(c){const d=h=>{const S=qs(m.current).includes(h.animationName);h.target===c&&S&&x("ANIMATION_END")},w=h=>{h.target===c&&(g.current=qs(m.current))};return c.addEventListener("animationstart",w),c.addEventListener("animationcancel",d),c.addEventListener("animationend",d),()=>{c.removeEventListener("animationstart",w),c.removeEventListener("animationcancel",d),c.removeEventListener("animationend",d)}}x("ANIMATION_END")}),[c,x]),{isPresent:["mounted","unmountSuspended"].includes(b),ref:$.useCallback((d=>{d&&(m.current=getComputedStyle(d)),f(d)}),[])}})(t),s=typeof r=="function"?r({present:i.isPresent}):$.Children.only(r),a=mn(i.ref,s.ref);return typeof r=="function"||i.isPresent?$.cloneElement(s,{ref:a}):null};function qs(e){return(e==null?void 0:e.animationName)||"none"}Hc.displayName="Presence";let Il=0;function aP(){$.useEffect((()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:dg()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:dg()),Il++,()=>{Il===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((i=>i.remove())),Il--}}),[])}function dg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const uP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},qc=$.forwardRef(((e,t)=>{var r,i;const{containerRef:s,style:a,...l}=e,c=(r=s==null?void 0:s.current)!==null&&r!==void 0?r:globalThis==null||(i=globalThis.document)===null||i===void 0?void 0:i.body,[,f]=$.useState({});return uP((()=>{f({})}),[]),c?Fo.createPortal($.createElement(yn.div,Ve({"data-radix-portal":""},l,{ref:t,style:c===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...a}:void 0})),c):null}));function Bn(e){const t=$.useRef(e);return $.useEffect((()=>{t.current=e})),$.useMemo((()=>(...r)=>{var i;return(i=t.current)===null||i===void 0?void 0:i.call(t,...r)}),[])}const pg={bubbles:!1,cancelable:!0},lP=$.forwardRef(((e,t)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...l}=e,[c,f]=$.useState(null),m=Bn(s),v=Bn(a),g=$.useRef(null),p=mn(t,(d=>f(d))),b=$.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;$.useEffect((()=>{if(i){let d=function(h){if(b.paused||!c)return;const S=h.target;c.contains(S)?g.current=S:kn(g.current,{select:!0})},w=function(h){!b.paused&&c&&(c.contains(h.relatedTarget)||kn(g.current,{select:!0}))};return document.addEventListener("focusin",d),document.addEventListener("focusout",w),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",w)}}}),[i,c,b.paused]),$.useEffect((()=>{if(c){vg.add(b);const w=document.activeElement;if(!c.contains(w)){const h=new Event("focusScope.autoFocusOnMount",pg);c.addEventListener("focusScope.autoFocusOnMount",m),c.dispatchEvent(h),h.defaultPrevented||((function(S,{select:E=!1}={}){const R=document.activeElement;for(const O of S)if(kn(O,{select:E}),document.activeElement!==R)return})((d=hg(c),d.filter((S=>S.tagName!=="A"))),{select:!0}),document.activeElement===w&&kn(c))}return()=>{c.removeEventListener("focusScope.autoFocusOnMount",m),setTimeout((()=>{const h=new Event("focusScope.autoFocusOnUnmount",pg);c.addEventListener("focusScope.autoFocusOnUnmount",v),c.dispatchEvent(h),h.defaultPrevented||kn(w??document.body,{select:!0}),c.removeEventListener("focusScope.autoFocusOnUnmount",v),vg.remove(b)}),0)}}var d}),[c,m,v,b]);const x=$.useCallback((d=>{if(!r&&!i||b.paused)return;const w=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,h=document.activeElement;if(w&&h){const S=d.currentTarget,[E,R]=(function(O){const k=hg(O),B=gg(k,O),M=gg(k.reverse(),O);return[B,M]})(S);E&&R?d.shiftKey||h!==R?d.shiftKey&&h===E&&(d.preventDefault(),r&&kn(R,{select:!0})):(d.preventDefault(),r&&kn(E,{select:!0})):h===S&&d.preventDefault()}}),[r,i,b.paused]);return $.createElement(yn.div,Ve({tabIndex:-1},l,{ref:p,onKeyDown:x}))}));function hg(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function gg(e,t){for(const r of e)if(!cP(r,{upTo:t}))return r}function cP(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function kn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(function(i){return i instanceof HTMLInputElement&&"select"in i})(e)&&t&&e.select()}}const vg=(function(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=mg(e,t),e.unshift(t)},remove(t){var r;e=mg(e,t),(r=e[0])===null||r===void 0||r.resume()}}})();function mg(e,t){const r=[...e],i=r.indexOf(t);return i!==-1&&r.splice(i,1),r}function $m(e){const t=Bn(e);$.useEffect((()=>{const r=i=>{i.key==="Escape"&&t(i)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)}),[t])}const fP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{};let yg,Zs=0;function dP({disabled:e}){const t=$.useRef(!1);fP((()=>{if(e){let r=function(){Zs--,Zs===0&&(document.body.style.pointerEvents=yg)},i=function(s){t.current=s.pointerType!=="mouse"};return Zs===0&&(yg=document.body.style.pointerEvents),document.body.style.pointerEvents="none",Zs++,document.addEventListener("pointerup",i),()=>{t.current?document.addEventListener("click",r,{once:!0}):r(),document.removeEventListener("pointerup",i)}}}),[e])}function Ut(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}const pP=$.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hP=$.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...f}=e,m=$.useContext(pP),[v,g]=$.useState(null),[,p]=$.useState({}),b=mn(t,(k=>g(k))),x=Array.from(m.layers),[d]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf(d),h=v?x.indexOf(v):-1,S=m.layersWithOutsidePointerEventsDisabled.size>0,E=h>=w,R=(function(k){const B=Bn(k),M=$.useRef(!1);return $.useEffect((()=>{const F=j=>{j.target&&!M.current&&wg("dismissableLayer.pointerDownOutside",B,{originalEvent:j}),M.current=!1},G=window.setTimeout((()=>{document.addEventListener("pointerdown",F)}),0);return()=>{window.clearTimeout(G),document.removeEventListener("pointerdown",F)}}),[B]),{onPointerDownCapture:()=>M.current=!0}})((k=>{const B=k.target,M=[...m.branches].some((F=>F.contains(B)));E&&!M&&(s==null||s(k),l==null||l(k),k.defaultPrevented||c==null||c())})),O=(function(k){const B=Bn(k),M=$.useRef(!1);return $.useEffect((()=>{const F=G=>{G.target&&!M.current&&wg("dismissableLayer.focusOutside",B,{originalEvent:G})};return document.addEventListener("focusin",F),()=>document.removeEventListener("focusin",F)}),[B]),{onFocusCapture:()=>M.current=!0,onBlurCapture:()=>M.current=!1}})((k=>{const B=k.target;[...m.branches].some((M=>M.contains(B)))||(a==null||a(k),l==null||l(k),k.defaultPrevented||c==null||c())}));return $m((k=>{h===m.layers.size-1&&(i==null||i(k),k.defaultPrevented||c==null||c())})),dP({disabled:r}),$.useEffect((()=>{v&&(r&&m.layersWithOutsidePointerEventsDisabled.add(v),m.layers.add(v),bg())}),[v,r,m]),$.useEffect((()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),bg())}),[v,m]),$.useEffect((()=>{const k=()=>p({});return document.addEventListener("dismissableLayer.update",k),()=>document.removeEventListener("dismissableLayer.update",k)}),[]),$.createElement(yn.div,Ve({},f,{ref:b,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:Ut(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ut(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ut(e.onPointerDownCapture,R.onPointerDownCapture)}))}));function bg(){const e=new Event("dismissableLayer.update");document.dispatchEvent(e)}function wg(e,t,r){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});return t&&i.addEventListener(e,t,{once:!0}),!i.dispatchEvent(s)}function xg(e){const[t,r]=$.useState(void 0);return $.useEffect((()=>{if(e){const i=new ResizeObserver((s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let l,c;if("borderBoxSize"in a){const f=a.borderBoxSize,m=Array.isArray(f)?f[0]:f;l=m.inlineSize,c=m.blockSize}else{const f=e.getBoundingClientRect();l=f.width,c=f.height}r({width:l,height:c})}));return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}r(void 0)}),[e]),t}function gP(e,t){const r=$n.get(e);return r===void 0?($n.set(e,{rect:{},callbacks:[t]}),$n.size===1&&(hc=requestAnimationFrame(Im))):(r.callbacks.push(t),t(e.getBoundingClientRect())),()=>{const i=$n.get(e);if(i===void 0)return;const s=i.callbacks.indexOf(t);s>-1&&i.callbacks.splice(s,1),i.callbacks.length===0&&($n.delete(e),$n.size===0&&cancelAnimationFrame(hc))}}let hc;const $n=new Map;function Im(){const e=[];$n.forEach(((t,r)=>{const i=r.getBoundingClientRect();var s,a;s=t.rect,a=i,(s.width!==a.width||s.height!==a.height||s.top!==a.top||s.right!==a.right||s.bottom!==a.bottom||s.left!==a.left)&&(t.rect=i,e.push(t))})),e.forEach((t=>{t.callbacks.forEach((r=>r(t.rect)))})),hc=requestAnimationFrame(Im)}function Lm(e){const[t,r]=$.useState();return $.useEffect((()=>{if(e){const i=gP(e,r);return()=>{r(void 0),i()}}}),[e]),t}function Zc(e,t=[]){let r=[];const i=()=>{const s=r.map((a=>$.createContext(a)));return function(a){const l=(a==null?void 0:a[e])||s;return $.useMemo((()=>({[`__scope${e}`]:{...a,[e]:l}})),[a,l])}};return i.scopeName=e,[function(s,a){const l=$.createContext(a),c=r.length;function f(m){const{scope:v,children:g,...p}=m,b=(v==null?void 0:v[e][c])||l,x=$.useMemo((()=>p),Object.values(p));return $.createElement(b.Provider,{value:x},g)}return r=[...r,a],f.displayName=s+"Provider",[f,function(m,v){const g=(v==null?void 0:v[e][c])||l,p=$.useContext(g);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${s}\``)}]},vP(i,...t)]}function vP(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const i=e.map((s=>({useScope:s(),scopeName:s.scopeName})));return function(s){const a=i.reduce(((l,{useScope:c,scopeName:f})=>({...l,...c(s)[`__scope${f}`]})),{});return $.useMemo((()=>({[`__scope${t.scopeName}`]:a})),[a])}};return r.scopeName=t.scopeName,r}function mP({anchorRect:e,popperSize:t,arrowSize:r,arrowOffset:i=0,side:s,sideOffset:a=0,align:l,alignOffset:c=0,shouldAvoidCollisions:f=!0,collisionBoundariesRect:m,collisionTolerance:v=0}){if(!e||!t||!m)return{popperStyles:yP,arrowStyles:Ll};const g=(function(B,M,F=0,G=0,j){const L=j?j.height:0,U=Sg(M,B,"x"),q=Sg(M,B,"y"),C=q.before-F-L,J=q.after+F+L,X=U.before-F-L,te=U.after+F+L;return{top:{start:{x:U.start+G,y:C},center:{x:U.center,y:C},end:{x:U.end-G,y:C}},right:{start:{x:te,y:q.start+G},center:{x:te,y:q.center},end:{x:te,y:q.end-G}},bottom:{start:{x:U.start+G,y:J},center:{x:U.center,y:J},end:{x:U.end-G,y:J}},left:{start:{x:X,y:q.start+G},center:{x:X,y:q.center},end:{x:X,y:q.end-G}}}})(t,e,a,c,r),p=g[s][l];if(f===!1){const B=Eg(p);let M=Ll;return r&&(M=Og({popperSize:t,arrowSize:r,arrowOffset:i,side:s,align:l})),{popperStyles:{...B,"--radix-popper-transform-origin":_g(t,s,l,i,r)},arrowStyles:M,placedSide:s,placedAlign:l}}const b=DOMRect.fromRect({...t,...p}),x=(d=m,w=v,DOMRect.fromRect({width:d.width-2*w,height:d.height-2*w,x:d.left+w,y:d.top+w}));var d,w;const h=Tg(b,x),S=g[Ag(s)][l],E=(function(B,M,F){const G=Ag(B);return M[B]&&!F[G]?G:B})(s,h,Tg(DOMRect.fromRect({...t,...S}),x)),R=(function(B,M,F,G,j){const L=F==="top"||F==="bottom",U=L?"left":"top",q=L?"right":"bottom",C=L?"width":"height",J=M[C]>B[C];return(G==="start"||G==="center")&&(j[U]&&J||j[q]&&!J)?"end":(G==="end"||G==="center")&&(j[q]&&J||j[U]&&!J)?"start":G})(t,e,s,l,h),O=Eg(g[E][R]);let k=Ll;return r&&(k=Og({popperSize:t,arrowSize:r,arrowOffset:i,side:E,align:R})),{popperStyles:{...O,"--radix-popper-transform-origin":_g(t,E,R,i,r)},arrowStyles:k,placedSide:E,placedAlign:R}}function Sg(e,t,r){const i=e[r==="x"?"left":"top"],s=r==="x"?"width":"height",a=e[s],l=t[s];return{before:i-l,start:i,center:i+(a-l)/2,end:i+a-l,after:i+a}}function Eg(e){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(e.x+window.scrollX)}px, ${Math.round(e.y+window.scrollY)}px, 0)`}}function _g(e,t,r,i,s){const a=t==="top"||t==="bottom",l=s?s.width:0,c=s?s.height:0,f=l/2+i;let m="",v="";return a?(m={start:`${f}px`,center:"center",end:e.width-f+"px"}[r],v=t==="top"?`${e.height+c}px`:-c+"px"):(m=t==="left"?`${e.width+c}px`:-c+"px",v={start:`${f}px`,center:"center",end:e.height-f+"px"}[r]),`${m} ${v}`}const yP={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},Ll={position:"absolute",opacity:0};function Og({popperSize:e,arrowSize:t,arrowOffset:r,side:i,align:s}){const a=(e.width-t.width)/2,l=(e.height-t.width)/2,c={top:0,right:90,bottom:180,left:-90}[i],f=Math.max(t.width,t.height),m={width:`${f}px`,height:`${f}px`,transform:`rotate(${c}deg)`,willChange:"transform",position:"absolute",[i]:"100%",direction:bP(i,s)};return i!=="top"&&i!=="bottom"||(s==="start"&&(m.left=`${r}px`),s==="center"&&(m.left=`${a}px`),s==="end"&&(m.right=`${r}px`)),i!=="left"&&i!=="right"||(s==="start"&&(m.top=`${r}px`),s==="center"&&(m.top=`${l}px`),s==="end"&&(m.bottom=`${r}px`)),m}function bP(e,t){return(e!=="top"&&e!=="right"||t!=="end")&&(e!=="bottom"&&e!=="left"||t==="end")?"ltr":"rtl"}function Ag(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function Tg(e,t){return{top:e.top<t.top,right:e.right>t.right,bottom:e.bottom>t.bottom,left:e.left<t.left}}const[Mm,Fa]=Zc("Popper"),[wP,Fm]=Mm("Popper"),xP=e=>{const{__scopePopper:t,children:r}=e,[i,s]=$.useState(null);return $.createElement(wP,{scope:t,anchor:i,onAnchorChange:s},r)},SP=$.forwardRef(((e,t)=>{const{__scopePopper:r,virtualRef:i,...s}=e,a=Fm("PopperAnchor",r),l=$.useRef(null),c=mn(t,l);return $.useEffect((()=>{a.onAnchorChange((i==null?void 0:i.current)||l.current)})),i?null:$.createElement(yn.div,Ve({},s,{ref:c}))})),[EP,JL]=Mm("PopperContent"),_P=$.forwardRef(((e,t)=>{const{__scopePopper:r,side:i="bottom",sideOffset:s,align:a="center",alignOffset:l,collisionTolerance:c,avoidCollisions:f=!0,...m}=e,v=Fm("PopperContent",r),[g,p]=$.useState(),b=Lm(v.anchor),[x,d]=$.useState(null),w=xg(x),[h,S]=$.useState(null),E=xg(h),R=mn(t,(L=>d(L))),O=(function(){const[L,U]=$.useState(void 0);return $.useEffect((()=>{let q;function C(){U({width:window.innerWidth,height:window.innerHeight})}function J(){window.clearTimeout(q),q=window.setTimeout(C,100)}return C(),window.addEventListener("resize",J),()=>window.removeEventListener("resize",J)}),[]),L})(),k=O?DOMRect.fromRect({...O,x:0,y:0}):void 0,{popperStyles:B,arrowStyles:M,placedSide:F,placedAlign:G}=mP({anchorRect:b,popperSize:w,arrowSize:E,arrowOffset:g,side:i,sideOffset:s,align:a,alignOffset:l,shouldAvoidCollisions:f,collisionBoundariesRect:k,collisionTolerance:c}),j=F!==void 0;return $.createElement("div",{style:B,"data-radix-popper-content-wrapper":""},$.createElement(EP,{scope:r,arrowStyles:M,onArrowChange:S,onArrowOffsetChange:p},$.createElement(yn.div,Ve({"data-side":F,"data-align":G},m,{style:{...m.style,animation:j?void 0:"none"},ref:R}))))})),Dm=xP,Nm=SP,jm=_P;function zm({prop:e,defaultProp:t,onChange:r=(()=>{})}){const[i,s]=(function({defaultProp:f,onChange:m}){const v=$.useState(f),[g]=v,p=$.useRef(g),b=Bn(m);return $.useEffect((()=>{p.current!==g&&(b(g),p.current=g)}),[g,p,b]),v})({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:i,c=Bn(r);return[l,$.useCallback((f=>{if(a){const m=f,v=typeof f=="function"?m(e):f;v!==e&&c(v)}else s(f)}),[a,e,s,c])]}const[OP]=Zc("Popover",[Fa]),Gc=Fa(),[AP,jo]=OP("Popover"),TP=e=>{const{__scopePopover:t,children:r,open:i,defaultOpen:s,onOpenChange:a,modal:l=!1}=e,c=Gc(t),f=$.useRef(null),[m,v]=$.useState(!1),[g=!1,p]=zm({prop:i,defaultProp:s,onChange:a});return $.createElement(Dm,c,$.createElement(AP,{scope:t,contentId:Rm(),triggerRef:f,open:g,onOpenChange:p,onOpenToggle:$.useCallback((()=>p((b=>!b))),[p]),hasCustomAnchor:m,onCustomAnchorAdd:$.useCallback((()=>v(!0)),[]),onCustomAnchorRemove:$.useCallback((()=>v(!1)),[]),modal:l},r))},RP=$.forwardRef(((e,t)=>{const{__scopePopover:r,...i}=e,s=jo("PopoverTrigger",r),a=Gc(r),l=mn(t,s.triggerRef),c=$.createElement(yn.button,Ve({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Bm(s.open)},i,{ref:l,onClick:Ut(e.onClick,s.onOpenToggle)}));return s.hasCustomAnchor?c:$.createElement(Nm,Ve({asChild:!0},a),c)})),PP=$.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=jo("PopoverContent",e.__scopePopover);return $.createElement(Hc,{present:r||s.open},s.modal?$.createElement(CP,Ve({},i,{ref:t})):$.createElement(kP,Ve({},i,{ref:t})))})),CP=$.forwardRef(((e,t)=>{const{allowPinchZoom:r,portalled:i=!0,...s}=e,a=jo("PopoverContent",e.__scopePopover),l=$.useRef(null),c=mn(t,l),f=$.useRef(!1);$.useEffect((()=>{const v=l.current;if(v)return xR(v)}),[]);const m=i?qc:$.Fragment;return $.createElement(m,null,$.createElement(Tm,{allowPinchZoom:r},$.createElement(Wm,Ve({},s,{ref:c,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ut(e.onCloseAutoFocus,(v=>{var g;v.preventDefault(),f.current||(g=a.triggerRef.current)===null||g===void 0||g.focus()})),onPointerDownOutside:Ut(e.onPointerDownOutside,(v=>{const g=v.detail.originalEvent,p=g.button===0&&g.ctrlKey===!0,b=g.button===2||p;f.current=b}),{checkForDefaultPrevented:!1}),onFocusOutside:Ut(e.onFocusOutside,(v=>v.preventDefault()),{checkForDefaultPrevented:!1})}))))})),kP=$.forwardRef(((e,t)=>{const{portalled:r=!0,...i}=e,s=jo("PopoverContent",e.__scopePopover),a=$.useRef(!1),l=r?qc:$.Fragment;return $.createElement(l,null,$.createElement(Wm,Ve({},i,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var f,m;(f=e.onCloseAutoFocus)===null||f===void 0||f.call(e,c),c.defaultPrevented||(a.current||(m=s.triggerRef.current)===null||m===void 0||m.focus(),c.preventDefault()),a.current=!1},onInteractOutside:c=>{var f,m;(f=e.onInteractOutside)===null||f===void 0||f.call(e,c),c.defaultPrevented||(a.current=!0);const v=c.target;!((m=s.triggerRef.current)===null||m===void 0)&&m.contains(v)&&c.preventDefault()}})))})),Wm=$.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:v,...g}=e,p=jo("PopoverContent",r),b=Gc(r);return aP(),$.createElement(lP,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:a},$.createElement(hP,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:v,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:m,onDismiss:()=>p.onOpenChange(!1)},$.createElement(jm,Ve({"data-state":Bm(p.open),role:"dialog",id:p.contentId},b,g,{ref:t,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))}));function Bm(e){return e?"open":"closed"}const $P=TP,IP=RP,LP=PP;var ca=(e=>(e.VIDEO="video",e.CAROUSEL="carousel",e.TEXT="text",e))(ca||{}),Ml={},ro={},Gs={},Ks={},Vs={exports:{}},Xs={exports:{}},Ie={};/** @license React v16.13.1
|
|
62
|
+
`)},QR=0,di=[];function eP(e){var t=$.useRef([]),r=$.useRef([0,0]),i=$.useRef(),s=$.useState(QR++)[0],a=$.useState(Em)[0],l=$.useRef(e);$.useEffect(function(){l.current=e},[e]),$.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var d=ma([e.lockRef.current],(e.shards||[]).map(lg),!0).filter(Boolean);return d.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),d.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var c=$.useCallback(function(d,w){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!l.current.allowPinchZoom;var h=Hs(d),S=r.current,E="deltaX"in d?d.deltaX:S[0]-h[0],R="deltaY"in d?d.deltaY:S[1]-h[1],O,k=d.target,B=Math.abs(E)>Math.abs(R)?"h":"v";if("touches"in d&&B==="h"&&k.type==="range")return!1;var M=ag(B,k);if(!M)return!0;if(M?O=B:(O=B==="v"?"h":"v",M=ag(B,k)),!M)return!1;if(!i.current&&"changedTouches"in d&&(E||R)&&(i.current=O),!O)return!0;var F=i.current||O;return XR(F,w,d,F==="h"?E:R)},[]),f=$.useCallback(function(d){var w=d;if(!(!di.length||di[di.length-1]!==a)){var h="deltaY"in w?ug(w):Hs(w),S=t.current.filter(function(O){return O.name===w.type&&(O.target===w.target||w.target===O.shadowParent)&&YR(O.delta,h)})[0];if(S&&S.should){w.cancelable&&w.preventDefault();return}if(!S){var E=(l.current.shards||[]).map(lg).filter(Boolean).filter(function(O){return O.contains(w.target)}),R=E.length>0?c(w,E[0]):!l.current.noIsolation;R&&w.cancelable&&w.preventDefault()}}},[]),m=$.useCallback(function(d,w,h,S){var E={name:d,delta:w,target:h,should:S,shadowParent:tP(h)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(R){return R!==E})},1)},[]),v=$.useCallback(function(d){r.current=Hs(d),i.current=void 0},[]),g=$.useCallback(function(d){m(d.type,ug(d),d.target,c(d,e.lockRef.current))},[]),p=$.useCallback(function(d){m(d.type,Hs(d),d.target,c(d,e.lockRef.current))},[]);$.useEffect(function(){return di.push(a),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:p}),document.addEventListener("wheel",f,fi),document.addEventListener("touchmove",f,fi),document.addEventListener("touchstart",v,fi),function(){di=di.filter(function(d){return d!==a}),document.removeEventListener("wheel",f,fi),document.removeEventListener("touchmove",f,fi),document.removeEventListener("touchstart",v,fi)}},[]);var b=e.removeScrollBar,x=e.inert;return $.createElement($.Fragment,null,x?$.createElement(a,{styles:JR(s)}):null,b?$.createElement(UR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rP=CR(Sm,eP);var Tm=$.forwardRef(function(e,t){return $.createElement(Ma,Or({},e,{ref:t,sideCar:rP}))});Tm.classNames=Ma.classNames;const nP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},iP=$.useId||(()=>{});let oP=0;function Rm(e){const[t,r]=$.useState(iP());return nP((()=>{r((i=>i??String(oP++)))}),[e]),e||(t?`radix-${t}`:"")}function Pm(...e){return t=>e.forEach((r=>(function(i,s){typeof i=="function"?i(s):i!=null&&(i.current=s)})(r,t)))}function mn(...e){return $.useCallback(Pm(...e),e)}const Cm=$.forwardRef(((e,t)=>{const{children:r,...i}=e;return $.Children.toArray(r).some(cg)?$.createElement($.Fragment,null,$.Children.map(r,(s=>cg(s)?$.createElement(pc,Ve({},i,{ref:t}),s.props.children):s))):$.createElement(pc,Ve({},i,{ref:t}),r)}));Cm.displayName="Slot";const pc=$.forwardRef(((e,t)=>{const{children:r,...i}=e;return $.isValidElement(r)?$.cloneElement(r,{...sP(i,r.props),ref:Pm(t,r.ref)}):$.Children.count(r)>1?$.Children.only(null):null}));pc.displayName="SlotClone";const km=({children:e})=>$.createElement($.Fragment,null,e);function cg(e){return $.isValidElement(e)&&e.type===km}function sP(e,t){const r={...t};for(const i in t){const s=e[i],a=t[i];/^on[A-Z]/.test(i)?r[i]=(...l)=>{a==null||a(...l),s==null||s(...l)}:i==="style"?r[i]={...s,...a}:i==="className"&&(r[i]=[s,a].filter(Boolean).join(" "))}return{...e,...r}}const yn=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>({...e,[t]:$.forwardRef(((r,i)=>{const{asChild:s,...a}=r,l=s?Cm:t;return $.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),$.createElement(l,Ve({},a,{ref:i}))}))})),{}),fg=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},Hc=e=>{const{present:t,children:r}=e,i=(function(l){const[c,f]=$.useState(),m=$.useRef({}),v=$.useRef(l),g=$.useRef("none"),p=l?"mounted":"unmounted",[b,x]=(function(d,w){return $.useReducer(((h,S)=>{const E=w[h][S];return E??h}),d)})(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return $.useEffect((()=>{const d=qs(m.current);g.current=b==="mounted"?d:"none"}),[b]),fg((()=>{const d=m.current,w=v.current;if(w!==l){const h=g.current,S=qs(d);l?x("MOUNT"):S==="none"||(d==null?void 0:d.display)==="none"?x("UNMOUNT"):x(w&&h!==S?"ANIMATION_OUT":"UNMOUNT"),v.current=l}}),[l,x]),fg((()=>{if(c){const d=h=>{const S=qs(m.current).includes(h.animationName);h.target===c&&S&&x("ANIMATION_END")},w=h=>{h.target===c&&(g.current=qs(m.current))};return c.addEventListener("animationstart",w),c.addEventListener("animationcancel",d),c.addEventListener("animationend",d),()=>{c.removeEventListener("animationstart",w),c.removeEventListener("animationcancel",d),c.removeEventListener("animationend",d)}}x("ANIMATION_END")}),[c,x]),{isPresent:["mounted","unmountSuspended"].includes(b),ref:$.useCallback((d=>{d&&(m.current=getComputedStyle(d)),f(d)}),[])}})(t),s=typeof r=="function"?r({present:i.isPresent}):$.Children.only(r),a=mn(i.ref,s.ref);return typeof r=="function"||i.isPresent?$.cloneElement(s,{ref:a}):null};function qs(e){return(e==null?void 0:e.animationName)||"none"}Hc.displayName="Presence";let Il=0;function aP(){$.useEffect((()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:dg()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:dg()),Il++,()=>{Il===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach((i=>i.remove())),Il--}}),[])}function dg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const uP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},qc=$.forwardRef(((e,t)=>{var r,i;const{containerRef:s,style:a,...l}=e,c=(r=s==null?void 0:s.current)!==null&&r!==void 0?r:globalThis==null||(i=globalThis.document)===null||i===void 0?void 0:i.body,[,f]=$.useState({});return uP((()=>{f({})}),[]),c?Fo.createPortal($.createElement(yn.div,Ve({"data-radix-portal":""},l,{ref:t,style:c===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...a}:void 0})),c):null}));function Bn(e){const t=$.useRef(e);return $.useEffect((()=>{t.current=e})),$.useMemo((()=>(...r)=>{var i;return(i=t.current)===null||i===void 0?void 0:i.call(t,...r)}),[])}const pg={bubbles:!1,cancelable:!0},lP=$.forwardRef(((e,t)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...l}=e,[c,f]=$.useState(null),m=Bn(s),v=Bn(a),g=$.useRef(null),p=mn(t,(d=>f(d))),b=$.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;$.useEffect((()=>{if(i){let d=function(h){if(b.paused||!c)return;const S=h.target;c.contains(S)?g.current=S:kn(g.current,{select:!0})},w=function(h){!b.paused&&c&&(c.contains(h.relatedTarget)||kn(g.current,{select:!0}))};return document.addEventListener("focusin",d),document.addEventListener("focusout",w),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",w)}}}),[i,c,b.paused]),$.useEffect((()=>{if(c){vg.add(b);const w=document.activeElement;if(!c.contains(w)){const h=new Event("focusScope.autoFocusOnMount",pg);c.addEventListener("focusScope.autoFocusOnMount",m),c.dispatchEvent(h),h.defaultPrevented||((function(S,{select:E=!1}={}){const R=document.activeElement;for(const O of S)if(kn(O,{select:E}),document.activeElement!==R)return})((d=hg(c),d.filter((S=>S.tagName!=="A"))),{select:!0}),document.activeElement===w&&kn(c))}return()=>{c.removeEventListener("focusScope.autoFocusOnMount",m),setTimeout((()=>{const h=new Event("focusScope.autoFocusOnUnmount",pg);c.addEventListener("focusScope.autoFocusOnUnmount",v),c.dispatchEvent(h),h.defaultPrevented||kn(w??document.body,{select:!0}),c.removeEventListener("focusScope.autoFocusOnUnmount",v),vg.remove(b)}),0)}}var d}),[c,m,v,b]);const x=$.useCallback((d=>{if(!r&&!i||b.paused)return;const w=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,h=document.activeElement;if(w&&h){const S=d.currentTarget,[E,R]=(function(O){const k=hg(O),B=gg(k,O),M=gg(k.reverse(),O);return[B,M]})(S);E&&R?d.shiftKey||h!==R?d.shiftKey&&h===E&&(d.preventDefault(),r&&kn(R,{select:!0})):(d.preventDefault(),r&&kn(E,{select:!0})):h===S&&d.preventDefault()}}),[r,i,b.paused]);return $.createElement(yn.div,Ve({tabIndex:-1},l,{ref:p,onKeyDown:x}))}));function hg(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function gg(e,t){for(const r of e)if(!cP(r,{upTo:t}))return r}function cP(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function kn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(function(i){return i instanceof HTMLInputElement&&"select"in i})(e)&&t&&e.select()}}const vg=(function(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=mg(e,t),e.unshift(t)},remove(t){var r;e=mg(e,t),(r=e[0])===null||r===void 0||r.resume()}}})();function mg(e,t){const r=[...e],i=r.indexOf(t);return i!==-1&&r.splice(i,1),r}function $m(e){const t=Bn(e);$.useEffect((()=>{const r=i=>{i.key==="Escape"&&t(i)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)}),[t])}const fP=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{};let yg,Zs=0;function dP({disabled:e}){const t=$.useRef(!1);fP((()=>{if(e){let r=function(){Zs--,Zs===0&&(document.body.style.pointerEvents=yg)},i=function(s){t.current=s.pointerType!=="mouse"};return Zs===0&&(yg=document.body.style.pointerEvents),document.body.style.pointerEvents="none",Zs++,document.addEventListener("pointerup",i),()=>{t.current?document.addEventListener("click",r,{once:!0}):r(),document.removeEventListener("pointerup",i)}}}),[e])}function Ut(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}const pP=$.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hP=$.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...f}=e,m=$.useContext(pP),[v,g]=$.useState(null),[,p]=$.useState({}),b=mn(t,(k=>g(k))),x=Array.from(m.layers),[d]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),w=x.indexOf(d),h=v?x.indexOf(v):-1,S=m.layersWithOutsidePointerEventsDisabled.size>0,E=h>=w,R=(function(k){const B=Bn(k),M=$.useRef(!1);return $.useEffect((()=>{const F=j=>{j.target&&!M.current&&wg("dismissableLayer.pointerDownOutside",B,{originalEvent:j}),M.current=!1},G=window.setTimeout((()=>{document.addEventListener("pointerdown",F)}),0);return()=>{window.clearTimeout(G),document.removeEventListener("pointerdown",F)}}),[B]),{onPointerDownCapture:()=>M.current=!0}})((k=>{const B=k.target,M=[...m.branches].some((F=>F.contains(B)));E&&!M&&(s==null||s(k),l==null||l(k),k.defaultPrevented||c==null||c())})),O=(function(k){const B=Bn(k),M=$.useRef(!1);return $.useEffect((()=>{const F=G=>{G.target&&!M.current&&wg("dismissableLayer.focusOutside",B,{originalEvent:G})};return document.addEventListener("focusin",F),()=>document.removeEventListener("focusin",F)}),[B]),{onFocusCapture:()=>M.current=!0,onBlurCapture:()=>M.current=!1}})((k=>{const B=k.target;[...m.branches].some((M=>M.contains(B)))||(a==null||a(k),l==null||l(k),k.defaultPrevented||c==null||c())}));return $m((k=>{h===m.layers.size-1&&(i==null||i(k),k.defaultPrevented||c==null||c())})),dP({disabled:r}),$.useEffect((()=>{v&&(r&&m.layersWithOutsidePointerEventsDisabled.add(v),m.layers.add(v),bg())}),[v,r,m]),$.useEffect((()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),bg())}),[v,m]),$.useEffect((()=>{const k=()=>p({});return document.addEventListener("dismissableLayer.update",k),()=>document.removeEventListener("dismissableLayer.update",k)}),[]),$.createElement(yn.div,Ve({},f,{ref:b,style:{pointerEvents:S?E?"auto":"none":void 0,...e.style},onFocusCapture:Ut(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ut(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ut(e.onPointerDownCapture,R.onPointerDownCapture)}))}));function bg(){const e=new Event("dismissableLayer.update");document.dispatchEvent(e)}function wg(e,t,r){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});return t&&i.addEventListener(e,t,{once:!0}),!i.dispatchEvent(s)}function xg(e){const[t,r]=$.useState(void 0);return $.useEffect((()=>{if(e){const i=new ResizeObserver((s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let l,c;if("borderBoxSize"in a){const f=a.borderBoxSize,m=Array.isArray(f)?f[0]:f;l=m.inlineSize,c=m.blockSize}else{const f=e.getBoundingClientRect();l=f.width,c=f.height}r({width:l,height:c})}));return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}r(void 0)}),[e]),t}function gP(e,t){const r=$n.get(e);return r===void 0?($n.set(e,{rect:{},callbacks:[t]}),$n.size===1&&(hc=requestAnimationFrame(Im))):(r.callbacks.push(t),t(e.getBoundingClientRect())),()=>{const i=$n.get(e);if(i===void 0)return;const s=i.callbacks.indexOf(t);s>-1&&i.callbacks.splice(s,1),i.callbacks.length===0&&($n.delete(e),$n.size===0&&cancelAnimationFrame(hc))}}let hc;const $n=new Map;function Im(){const e=[];$n.forEach(((t,r)=>{const i=r.getBoundingClientRect();var s,a;s=t.rect,a=i,(s.width!==a.width||s.height!==a.height||s.top!==a.top||s.right!==a.right||s.bottom!==a.bottom||s.left!==a.left)&&(t.rect=i,e.push(t))})),e.forEach((t=>{t.callbacks.forEach((r=>r(t.rect)))})),hc=requestAnimationFrame(Im)}function Lm(e){const[t,r]=$.useState();return $.useEffect((()=>{if(e){const i=gP(e,r);return()=>{r(void 0),i()}}}),[e]),t}function Zc(e,t=[]){let r=[];const i=()=>{const s=r.map((a=>$.createContext(a)));return function(a){const l=(a==null?void 0:a[e])||s;return $.useMemo((()=>({[`__scope${e}`]:{...a,[e]:l}})),[a,l])}};return i.scopeName=e,[function(s,a){const l=$.createContext(a),c=r.length;function f(m){const{scope:v,children:g,...p}=m,b=(v==null?void 0:v[e][c])||l,x=$.useMemo((()=>p),Object.values(p));return $.createElement(b.Provider,{value:x},g)}return r=[...r,a],f.displayName=s+"Provider",[f,function(m,v){const g=(v==null?void 0:v[e][c])||l,p=$.useContext(g);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${s}\``)}]},vP(i,...t)]}function vP(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const i=e.map((s=>({useScope:s(),scopeName:s.scopeName})));return function(s){const a=i.reduce(((l,{useScope:c,scopeName:f})=>({...l,...c(s)[`__scope${f}`]})),{});return $.useMemo((()=>({[`__scope${t.scopeName}`]:a})),[a])}};return r.scopeName=t.scopeName,r}function mP({anchorRect:e,popperSize:t,arrowSize:r,arrowOffset:i=0,side:s,sideOffset:a=0,align:l,alignOffset:c=0,shouldAvoidCollisions:f=!0,collisionBoundariesRect:m,collisionTolerance:v=0}){if(!e||!t||!m)return{popperStyles:yP,arrowStyles:Ll};const g=(function(B,M,F=0,G=0,j){const L=j?j.height:0,U=Sg(M,B,"x"),q=Sg(M,B,"y"),C=q.before-F-L,J=q.after+F+L,X=U.before-F-L,te=U.after+F+L;return{top:{start:{x:U.start+G,y:C},center:{x:U.center,y:C},end:{x:U.end-G,y:C}},right:{start:{x:te,y:q.start+G},center:{x:te,y:q.center},end:{x:te,y:q.end-G}},bottom:{start:{x:U.start+G,y:J},center:{x:U.center,y:J},end:{x:U.end-G,y:J}},left:{start:{x:X,y:q.start+G},center:{x:X,y:q.center},end:{x:X,y:q.end-G}}}})(t,e,a,c,r),p=g[s][l];if(f===!1){const B=Eg(p);let M=Ll;return r&&(M=Og({popperSize:t,arrowSize:r,arrowOffset:i,side:s,align:l})),{popperStyles:{...B,"--radix-popper-transform-origin":_g(t,s,l,i,r)},arrowStyles:M,placedSide:s,placedAlign:l}}const b=DOMRect.fromRect({...t,...p}),x=(d=m,w=v,DOMRect.fromRect({width:d.width-2*w,height:d.height-2*w,x:d.left+w,y:d.top+w}));var d,w;const h=Tg(b,x),S=g[Ag(s)][l],E=(function(B,M,F){const G=Ag(B);return M[B]&&!F[G]?G:B})(s,h,Tg(DOMRect.fromRect({...t,...S}),x)),R=(function(B,M,F,G,j){const L=F==="top"||F==="bottom",U=L?"left":"top",q=L?"right":"bottom",C=L?"width":"height",J=M[C]>B[C];return(G==="start"||G==="center")&&(j[U]&&J||j[q]&&!J)?"end":(G==="end"||G==="center")&&(j[q]&&J||j[U]&&!J)?"start":G})(t,e,s,l,h),O=Eg(g[E][R]);let k=Ll;return r&&(k=Og({popperSize:t,arrowSize:r,arrowOffset:i,side:E,align:R})),{popperStyles:{...O,"--radix-popper-transform-origin":_g(t,E,R,i,r)},arrowStyles:k,placedSide:E,placedAlign:R}}function Sg(e,t,r){const i=e[r==="x"?"left":"top"],s=r==="x"?"width":"height",a=e[s],l=t[s];return{before:i-l,start:i,center:i+(a-l)/2,end:i+a-l,after:i+a}}function Eg(e){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(e.x+window.scrollX)}px, ${Math.round(e.y+window.scrollY)}px, 0)`}}function _g(e,t,r,i,s){const a=t==="top"||t==="bottom",l=s?s.width:0,c=s?s.height:0,f=l/2+i;let m="",v="";return a?(m={start:`${f}px`,center:"center",end:e.width-f+"px"}[r],v=t==="top"?`${e.height+c}px`:-c+"px"):(m=t==="left"?`${e.width+c}px`:-c+"px",v={start:`${f}px`,center:"center",end:e.height-f+"px"}[r]),`${m} ${v}`}const yP={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},Ll={position:"absolute",opacity:0};function Og({popperSize:e,arrowSize:t,arrowOffset:r,side:i,align:s}){const a=(e.width-t.width)/2,l=(e.height-t.width)/2,c={top:0,right:90,bottom:180,left:-90}[i],f=Math.max(t.width,t.height),m={width:`${f}px`,height:`${f}px`,transform:`rotate(${c}deg)`,willChange:"transform",position:"absolute",[i]:"100%",direction:bP(i,s)};return i!=="top"&&i!=="bottom"||(s==="start"&&(m.left=`${r}px`),s==="center"&&(m.left=`${a}px`),s==="end"&&(m.right=`${r}px`)),i!=="left"&&i!=="right"||(s==="start"&&(m.top=`${r}px`),s==="center"&&(m.top=`${l}px`),s==="end"&&(m.bottom=`${r}px`)),m}function bP(e,t){return(e!=="top"&&e!=="right"||t!=="end")&&(e!=="bottom"&&e!=="left"||t==="end")?"ltr":"rtl"}function Ag(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function Tg(e,t){return{top:e.top<t.top,right:e.right>t.right,bottom:e.bottom>t.bottom,left:e.left<t.left}}const[Mm,Fa]=Zc("Popper"),[wP,Fm]=Mm("Popper"),xP=e=>{const{__scopePopper:t,children:r}=e,[i,s]=$.useState(null);return $.createElement(wP,{scope:t,anchor:i,onAnchorChange:s},r)},SP=$.forwardRef(((e,t)=>{const{__scopePopper:r,virtualRef:i,...s}=e,a=Fm("PopperAnchor",r),l=$.useRef(null),c=mn(t,l);return $.useEffect((()=>{a.onAnchorChange((i==null?void 0:i.current)||l.current)})),i?null:$.createElement(yn.div,Ve({},s,{ref:c}))})),[EP,QL]=Mm("PopperContent"),_P=$.forwardRef(((e,t)=>{const{__scopePopper:r,side:i="bottom",sideOffset:s,align:a="center",alignOffset:l,collisionTolerance:c,avoidCollisions:f=!0,...m}=e,v=Fm("PopperContent",r),[g,p]=$.useState(),b=Lm(v.anchor),[x,d]=$.useState(null),w=xg(x),[h,S]=$.useState(null),E=xg(h),R=mn(t,(L=>d(L))),O=(function(){const[L,U]=$.useState(void 0);return $.useEffect((()=>{let q;function C(){U({width:window.innerWidth,height:window.innerHeight})}function J(){window.clearTimeout(q),q=window.setTimeout(C,100)}return C(),window.addEventListener("resize",J),()=>window.removeEventListener("resize",J)}),[]),L})(),k=O?DOMRect.fromRect({...O,x:0,y:0}):void 0,{popperStyles:B,arrowStyles:M,placedSide:F,placedAlign:G}=mP({anchorRect:b,popperSize:w,arrowSize:E,arrowOffset:g,side:i,sideOffset:s,align:a,alignOffset:l,shouldAvoidCollisions:f,collisionBoundariesRect:k,collisionTolerance:c}),j=F!==void 0;return $.createElement("div",{style:B,"data-radix-popper-content-wrapper":""},$.createElement(EP,{scope:r,arrowStyles:M,onArrowChange:S,onArrowOffsetChange:p},$.createElement(yn.div,Ve({"data-side":F,"data-align":G},m,{style:{...m.style,animation:j?void 0:"none"},ref:R}))))})),Dm=xP,Nm=SP,jm=_P;function zm({prop:e,defaultProp:t,onChange:r=(()=>{})}){const[i,s]=(function({defaultProp:f,onChange:m}){const v=$.useState(f),[g]=v,p=$.useRef(g),b=Bn(m);return $.useEffect((()=>{p.current!==g&&(b(g),p.current=g)}),[g,p,b]),v})({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:i,c=Bn(r);return[l,$.useCallback((f=>{if(a){const m=f,v=typeof f=="function"?m(e):f;v!==e&&c(v)}else s(f)}),[a,e,s,c])]}const[OP]=Zc("Popover",[Fa]),Gc=Fa(),[AP,jo]=OP("Popover"),TP=e=>{const{__scopePopover:t,children:r,open:i,defaultOpen:s,onOpenChange:a,modal:l=!1}=e,c=Gc(t),f=$.useRef(null),[m,v]=$.useState(!1),[g=!1,p]=zm({prop:i,defaultProp:s,onChange:a});return $.createElement(Dm,c,$.createElement(AP,{scope:t,contentId:Rm(),triggerRef:f,open:g,onOpenChange:p,onOpenToggle:$.useCallback((()=>p((b=>!b))),[p]),hasCustomAnchor:m,onCustomAnchorAdd:$.useCallback((()=>v(!0)),[]),onCustomAnchorRemove:$.useCallback((()=>v(!1)),[]),modal:l},r))},RP=$.forwardRef(((e,t)=>{const{__scopePopover:r,...i}=e,s=jo("PopoverTrigger",r),a=Gc(r),l=mn(t,s.triggerRef),c=$.createElement(yn.button,Ve({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Bm(s.open)},i,{ref:l,onClick:Ut(e.onClick,s.onOpenToggle)}));return s.hasCustomAnchor?c:$.createElement(Nm,Ve({asChild:!0},a),c)})),PP=$.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=jo("PopoverContent",e.__scopePopover);return $.createElement(Hc,{present:r||s.open},s.modal?$.createElement(CP,Ve({},i,{ref:t})):$.createElement(kP,Ve({},i,{ref:t})))})),CP=$.forwardRef(((e,t)=>{const{allowPinchZoom:r,portalled:i=!0,...s}=e,a=jo("PopoverContent",e.__scopePopover),l=$.useRef(null),c=mn(t,l),f=$.useRef(!1);$.useEffect((()=>{const v=l.current;if(v)return xR(v)}),[]);const m=i?qc:$.Fragment;return $.createElement(m,null,$.createElement(Tm,{allowPinchZoom:r},$.createElement(Wm,Ve({},s,{ref:c,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ut(e.onCloseAutoFocus,(v=>{var g;v.preventDefault(),f.current||(g=a.triggerRef.current)===null||g===void 0||g.focus()})),onPointerDownOutside:Ut(e.onPointerDownOutside,(v=>{const g=v.detail.originalEvent,p=g.button===0&&g.ctrlKey===!0,b=g.button===2||p;f.current=b}),{checkForDefaultPrevented:!1}),onFocusOutside:Ut(e.onFocusOutside,(v=>v.preventDefault()),{checkForDefaultPrevented:!1})}))))})),kP=$.forwardRef(((e,t)=>{const{portalled:r=!0,...i}=e,s=jo("PopoverContent",e.__scopePopover),a=$.useRef(!1),l=r?qc:$.Fragment;return $.createElement(l,null,$.createElement(Wm,Ve({},i,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var f,m;(f=e.onCloseAutoFocus)===null||f===void 0||f.call(e,c),c.defaultPrevented||(a.current||(m=s.triggerRef.current)===null||m===void 0||m.focus(),c.preventDefault()),a.current=!1},onInteractOutside:c=>{var f,m;(f=e.onInteractOutside)===null||f===void 0||f.call(e,c),c.defaultPrevented||(a.current=!0);const v=c.target;!((m=s.triggerRef.current)===null||m===void 0)&&m.contains(v)&&c.preventDefault()}})))})),Wm=$.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:v,...g}=e,p=jo("PopoverContent",r),b=Gc(r);return aP(),$.createElement(lP,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:a},$.createElement(hP,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:v,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:m,onDismiss:()=>p.onOpenChange(!1)},$.createElement(jm,Ve({"data-state":Bm(p.open),role:"dialog",id:p.contentId},b,g,{ref:t,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))}));function Bm(e){return e?"open":"closed"}const $P=TP,IP=RP,LP=PP;var ca=(e=>(e.VIDEO="video",e.CAROUSEL="carousel",e.TEXT="text",e))(ca||{}),Ml={},ro={},Gs={},Ks={},Vs={exports:{}},Xs={exports:{}},Ie={};/** @license React v16.13.1
|
|
63
63
|
* react-is.production.min.js
|
|
64
64
|
*
|
|
65
65
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -198,11 +198,11 @@ __p += '`),Re&&(ee+=`' +
|
|
|
198
198
|
function print() { __p += __j.call(arguments, '') }
|
|
199
199
|
`:`;
|
|
200
200
|
`)+ee+`return __p
|
|
201
|
-
}`;var Se=nh(function(){return Pe(T,le+"return "+ee).apply(r,P)});if(Se.source=ee,il(Se))throw Se;return Se}function w_(n){return ke(n).toLowerCase()}function x_(n){return ke(n).toUpperCase()}function S_(n,o,u){if(n=ke(n),n&&(u||o===r))return dd(n);if(!n||!(o=Nt(o)))return n;var y=ar(n),_=ar(o),T=pd(y,_),P=hd(y,_)+1;return on(y,T,P).join("")}function E_(n,o,u){if(n=ke(n),n&&(u||o===r))return n.slice(0,vd(n)+1);if(!n||!(o=Nt(o)))return n;var y=ar(n),_=hd(y,ar(o))+1;return on(y,0,_).join("")}function __(n,o,u){if(n=ke(n),n&&(u||o===r))return n.replace(iu,"");if(!n||!(o=Nt(o)))return n;var y=ar(n),_=pd(y,ar(o));return on(y,_).join("")}function O_(n,o){var u=G,y=j;if(Ge(o)){var _="separator"in o?o.separator:_;u="length"in o?xe(o.length):u,y="omission"in o?Nt(o.omission):y}n=ke(n);var T=n.length;if(Yn(n)){var P=ar(n);T=P.length}if(u>=T)return n;var I=u-Jn(y);if(I<1)return y;var z=P?on(P,0,I).join(""):n.slice(0,I);if(_===r)return z+y;if(P&&(I+=z.length-I),ol(_)){if(n.slice(I).search(_)){var V,Y=z;for(_.global||(_=xu(_.source,ke(Lf.exec(_))+"g")),_.lastIndex=0;V=_.exec(Y);)var ee=V.index;z=z.slice(0,ee===r?I:ee)}}else if(n.indexOf(Nt(_),I)!=I){var oe=z.lastIndexOf(_);oe>-1&&(z=z.slice(0,oe))}return z+y}function A_(n){return n=ke(n),n&&D0.test(n)?n.replace(kf,tw):n}var T_=oi(function(n,o,u){return n+(u?" ":"")+o.toUpperCase()}),ul=ip("toUpperCase");function rh(n,o,u){return n=ke(n),o=u?r:o,o===r?Xb(n)?iw(n):Wb(n):n.match(o)||[]}var nh=_e(function(n,o){try{return Ft(n,r,o)}catch(u){return il(u)?u:new be(u)}}),R_=Dr(function(n,o){return Vt(o,function(u){u=br(u),Mr(n,u,rl(n[u],n))}),n});function P_(n){var o=n==null?0:n.length,u=pe();return n=o?Ue(n,function(y){if(typeof y[1]!="function")throw new Xt(l);return[u(y[0]),y[1]]}):[],_e(function(y){for(var _=-1;++_<o;){var T=n[_];if(Ft(T[0],this,y))return Ft(T[1],this,y)}})}function C_(n){return t1(Jt(n,g))}function ll(n){return function(){return n}}function k_(n,o){return n==null||n!==n?o:n}var $_=sp(),I_=sp(!0);function $t(n){return n}function cl(n){return Fd(typeof n=="function"?n:Jt(n,g))}function L_(n){return Nd(Jt(n,g))}function M_(n,o){return jd(n,Jt(o,g))}var F_=_e(function(n,o){return function(u){return Mi(u,n,o)}}),D_=_e(function(n,o){return function(u){return Mi(n,u,o)}});function fl(n,o,u){var y=lt(o),_=vs(o,y);u==null&&!(Ge(o)&&(_.length||!y.length))&&(u=o,o=n,n=this,_=vs(o,lt(o)));var T=!(Ge(u)&&"chain"in u)||!!u.chain,P=jr(n);return Vt(_,function(I){var z=o[I];n[I]=z,P&&(n.prototype[I]=function(){var V=this.__chain__;if(T||V){var Y=n(this.__wrapped__),ee=Y.__actions__=Pt(this.__actions__);return ee.push({func:z,args:arguments,thisArg:n}),Y.__chain__=V,Y}return z.apply(n,Jr([this.value()],arguments))})}),n}function N_(){return dt._===this&&(dt._=cw),this}function dl(){}function j_(n){return n=xe(n),_e(function(o){return zd(o,n)})}var z_=Uu(Ue),W_=Uu(ad),B_=Uu(hu);function ih(n){return Xu(n)?gu(br(n)):y1(n)}function U_(n){return function(o){return n==null?r:An(n,o)}}var H_=up(),q_=up(!0);function pl(){return[]}function hl(){return!1}function Z_(){return{}}function G_(){return""}function K_(){return!0}function V_(n,o){if(n=xe(n),n<1||n>te)return[];var u=Q,y=bt(n,Q);o=pe(o),n-=Q;for(var _=yu(y,o);++u<n;)o(u);return _}function X_(n){return we(n)?Ue(n,br):jt(n)?[n]:Pt(_p(ke(n)))}function Y_(n){var o=++uw;return ke(n)+o}var J_=Ss(function(n,o){return n+o},0),Q_=Hu("ceil"),eO=Ss(function(n,o){return n/o},1),tO=Hu("floor");function rO(n){return n&&n.length?gs(n,$t,Pu):r}function nO(n,o){return n&&n.length?gs(n,pe(o,2),Pu):r}function iO(n){return cd(n,$t)}function oO(n,o){return cd(n,pe(o,2))}function sO(n){return n&&n.length?gs(n,$t,Iu):r}function aO(n,o){return n&&n.length?gs(n,pe(o,2),Iu):r}var uO=Ss(function(n,o){return n*o},1),lO=Hu("round"),cO=Ss(function(n,o){return n-o},0);function fO(n){return n&&n.length?mu(n,$t):0}function dO(n,o){return n&&n.length?mu(n,pe(o,2)):0}return A.after=LS,A.ary=Mp,A.assign=xE,A.assignIn=Vp,A.assignInWith=Ms,A.assignWith=SE,A.at=EE,A.before=Fp,A.bind=rl,A.bindAll=R_,A.bindKey=Dp,A.castArray=ZS,A.chain=$p,A.chunk=tx,A.compact=rx,A.concat=nx,A.cond=P_,A.conforms=C_,A.constant=ll,A.countBy=fS,A.create=_E,A.curry=Np,A.curryRight=jp,A.debounce=zp,A.defaults=OE,A.defaultsDeep=AE,A.defer=MS,A.delay=FS,A.difference=ix,A.differenceBy=ox,A.differenceWith=sx,A.drop=ax,A.dropRight=ux,A.dropRightWhile=lx,A.dropWhile=cx,A.fill=fx,A.filter=pS,A.flatMap=vS,A.flatMapDeep=mS,A.flatMapDepth=yS,A.flatten=Rp,A.flattenDeep=dx,A.flattenDepth=px,A.flip=DS,A.flow=$_,A.flowRight=I_,A.fromPairs=hx,A.functions=IE,A.functionsIn=LE,A.groupBy=bS,A.initial=vx,A.intersection=mx,A.intersectionBy=yx,A.intersectionWith=bx,A.invert=FE,A.invertBy=DE,A.invokeMap=xS,A.iteratee=cl,A.keyBy=SS,A.keys=lt,A.keysIn=kt,A.map=Ps,A.mapKeys=jE,A.mapValues=zE,A.matches=L_,A.matchesProperty=M_,A.memoize=ks,A.merge=WE,A.mergeWith=Xp,A.method=F_,A.methodOf=D_,A.mixin=fl,A.negate=$s,A.nthArg=j_,A.omit=BE,A.omitBy=UE,A.once=NS,A.orderBy=ES,A.over=z_,A.overArgs=jS,A.overEvery=W_,A.overSome=B_,A.partial=nl,A.partialRight=Wp,A.partition=_S,A.pick=HE,A.pickBy=Yp,A.property=ih,A.propertyOf=U_,A.pull=Ex,A.pullAll=Cp,A.pullAllBy=_x,A.pullAllWith=Ox,A.pullAt=Ax,A.range=H_,A.rangeRight=q_,A.rearg=zS,A.reject=TS,A.remove=Tx,A.rest=WS,A.reverse=el,A.sampleSize=PS,A.set=ZE,A.setWith=GE,A.shuffle=CS,A.slice=Rx,A.sortBy=IS,A.sortedUniq=Mx,A.sortedUniqBy=Fx,A.split=v_,A.spread=BS,A.tail=Dx,A.take=Nx,A.takeRight=jx,A.takeRightWhile=zx,A.takeWhile=Wx,A.tap=rS,A.throttle=US,A.thru=Rs,A.toArray=Zp,A.toPairs=Jp,A.toPairsIn=Qp,A.toPath=X_,A.toPlainObject=Kp,A.transform=KE,A.unary=HS,A.union=Bx,A.unionBy=Ux,A.unionWith=Hx,A.uniq=qx,A.uniqBy=Zx,A.uniqWith=Gx,A.unset=VE,A.unzip=tl,A.unzipWith=kp,A.update=XE,A.updateWith=YE,A.values=ui,A.valuesIn=JE,A.without=Kx,A.words=rh,A.wrap=qS,A.xor=Vx,A.xorBy=Xx,A.xorWith=Yx,A.zip=Jx,A.zipObject=Qx,A.zipObjectDeep=eS,A.zipWith=tS,A.entries=Jp,A.entriesIn=Qp,A.extend=Vp,A.extendWith=Ms,fl(A,A),A.add=J_,A.attempt=nh,A.camelCase=r_,A.capitalize=eh,A.ceil=Q_,A.clamp=QE,A.clone=GS,A.cloneDeep=VS,A.cloneDeepWith=XS,A.cloneWith=KS,A.conformsTo=YS,A.deburr=th,A.defaultTo=k_,A.divide=eO,A.endsWith=n_,A.eq=lr,A.escape=i_,A.escapeRegExp=o_,A.every=dS,A.find=hS,A.findIndex=Ap,A.findKey=TE,A.findLast=gS,A.findLastIndex=Tp,A.findLastKey=RE,A.floor=tO,A.forEach=Ip,A.forEachRight=Lp,A.forIn=PE,A.forInRight=CE,A.forOwn=kE,A.forOwnRight=$E,A.get=sl,A.gt=JS,A.gte=QS,A.has=ME,A.hasIn=al,A.head=Pp,A.identity=$t,A.includes=wS,A.indexOf=gx,A.inRange=e_,A.invoke=NE,A.isArguments=Pn,A.isArray=we,A.isArrayBuffer=eE,A.isArrayLike=Ct,A.isArrayLikeObject=Je,A.isBoolean=tE,A.isBuffer=sn,A.isDate=rE,A.isElement=nE,A.isEmpty=iE,A.isEqual=oE,A.isEqualWith=sE,A.isError=il,A.isFinite=aE,A.isFunction=jr,A.isInteger=Bp,A.isLength=Is,A.isMap=Up,A.isMatch=uE,A.isMatchWith=lE,A.isNaN=cE,A.isNative=fE,A.isNil=pE,A.isNull=dE,A.isNumber=Hp,A.isObject=Ge,A.isObjectLike=Xe,A.isPlainObject=Wi,A.isRegExp=ol,A.isSafeInteger=hE,A.isSet=qp,A.isString=Ls,A.isSymbol=jt,A.isTypedArray=ai,A.isUndefined=gE,A.isWeakMap=vE,A.isWeakSet=mE,A.join=wx,A.kebabCase=s_,A.last=er,A.lastIndexOf=xx,A.lowerCase=a_,A.lowerFirst=u_,A.lt=yE,A.lte=bE,A.max=rO,A.maxBy=nO,A.mean=iO,A.meanBy=oO,A.min=sO,A.minBy=aO,A.stubArray=pl,A.stubFalse=hl,A.stubObject=Z_,A.stubString=G_,A.stubTrue=K_,A.multiply=uO,A.nth=Sx,A.noConflict=N_,A.noop=dl,A.now=Cs,A.pad=l_,A.padEnd=c_,A.padStart=f_,A.parseInt=d_,A.random=t_,A.reduce=OS,A.reduceRight=AS,A.repeat=p_,A.replace=h_,A.result=qE,A.round=lO,A.runInContext=N,A.sample=RS,A.size=kS,A.snakeCase=g_,A.some=$S,A.sortedIndex=Px,A.sortedIndexBy=Cx,A.sortedIndexOf=kx,A.sortedLastIndex=$x,A.sortedLastIndexBy=Ix,A.sortedLastIndexOf=Lx,A.startCase=m_,A.startsWith=y_,A.subtract=cO,A.sum=fO,A.sumBy=dO,A.template=b_,A.times=V_,A.toFinite=zr,A.toInteger=xe,A.toLength=Gp,A.toLower=w_,A.toNumber=tr,A.toSafeInteger=wE,A.toString=ke,A.toUpper=x_,A.trim=S_,A.trimEnd=E_,A.trimStart=__,A.truncate=O_,A.unescape=A_,A.uniqueId=Y_,A.upperCase=T_,A.upperFirst=ul,A.each=Ip,A.eachRight=Lp,A.first=Pp,fl(A,(function(){var n={};return mr(A,function(o,u){Fe.call(A.prototype,u)||(n[u]=o)}),n})(),{chain:!1}),A.VERSION=i,Vt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){A[n].placeholder=A}),Vt(["drop","take"],function(n,o){Te.prototype[n]=function(u){u=u===r?1:st(xe(u),0);var y=this.__filtered__&&!o?new Te(this):this.clone();return y.__filtered__?y.__takeCount__=bt(u,y.__takeCount__):y.__views__.push({size:bt(u,Q),type:n+(y.__dir__<0?"Right":"")}),y},Te.prototype[n+"Right"]=function(u){return this.reverse()[n](u).reverse()}}),Vt(["filter","map","takeWhile"],function(n,o){var u=o+1,y=u==q||u==J;Te.prototype[n]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:pe(_,3),type:u}),T.__filtered__=T.__filtered__||y,T}}),Vt(["head","last"],function(n,o){var u="take"+(o?"Right":"");Te.prototype[n]=function(){return this[u](1).value()[0]}}),Vt(["initial","tail"],function(n,o){var u="drop"+(o?"":"Right");Te.prototype[n]=function(){return this.__filtered__?new Te(this):this[u](1)}}),Te.prototype.compact=function(){return this.filter($t)},Te.prototype.find=function(n){return this.filter(n).head()},Te.prototype.findLast=function(n){return this.reverse().find(n)},Te.prototype.invokeMap=_e(function(n,o){return typeof n=="function"?new Te(this):this.map(function(u){return Mi(u,n,o)})}),Te.prototype.reject=function(n){return this.filter($s(pe(n)))},Te.prototype.slice=function(n,o){n=xe(n);var u=this;return u.__filtered__&&(n>0||o<0)?new Te(u):(n<0?u=u.takeRight(-n):n&&(u=u.drop(n)),o!==r&&(o=xe(o),u=o<0?u.dropRight(-o):u.take(o-n)),u)},Te.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Te.prototype.toArray=function(){return this.take(Q)},mr(Te.prototype,function(n,o){var u=/^(?:filter|find|map|reject)|While$/.test(o),y=/^(?:head|last)$/.test(o),_=A[y?"take"+(o=="last"?"Right":""):o],T=y||/^find/.test(o);_&&(A.prototype[o]=function(){var P=this.__wrapped__,I=y?[1]:arguments,z=P instanceof Te,V=I[0],Y=z||we(P),ee=function(Oe){var Re=_.apply(A,Jr([Oe],I));return y&&oe?Re[0]:Re};Y&&u&&typeof V=="function"&&V.length!=1&&(z=Y=!1);var oe=this.__chain__,le=!!this.__actions__.length,he=T&&!oe,Se=z&&!le;if(!T&&Y){P=Se?P:new Te(this);var ge=n.apply(P,I);return ge.__actions__.push({func:Rs,args:[ee],thisArg:r}),new Yt(ge,oe)}return he&&Se?n.apply(this,I):(ge=this.thru(ee),he?y?ge.value()[0]:ge.value():ge)})}),Vt(["pop","push","shift","sort","splice","unshift"],function(n){var o=es[n],u=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",y=/^(?:pop|shift)$/.test(n);A.prototype[n]=function(){var _=arguments;if(y&&!this.__chain__){var T=this.value();return o.apply(we(T)?T:[],_)}return this[u](function(P){return o.apply(we(P)?P:[],_)})}}),mr(Te.prototype,function(n,o){var u=A[o];if(u){var y=u.name+"";Fe.call(ri,y)||(ri[y]=[]),ri[y].push({name:o,func:u})}}),ri[xs(r,h).name]=[{name:"wrapper",func:r}],Te.prototype.clone=Aw,Te.prototype.reverse=Tw,Te.prototype.value=Rw,A.prototype.at=nS,A.prototype.chain=iS,A.prototype.commit=oS,A.prototype.next=sS,A.prototype.plant=uS,A.prototype.reverse=lS,A.prototype.toJSON=A.prototype.valueOf=A.prototype.value=cS,A.prototype.first=A.prototype.head,Ri&&(A.prototype[Ri]=aS),A}),Qn=ow();xn?((xn.exports=Qn)._=Qn,cu._=Qn):dt._=Qn}).call(Gk)})(go,go.exports)),go.exports}var rt=Kk();const Sc={FdSave:tt.FdSave,FdWarningDanger:tt.FdWarningDanger,FdInfoCircle:tt.FdInfoCircle,FdInfoBold:tt.FdInfoBold};var df=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(df||{}),zn=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(zn||{}),pi=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(pi||{});const Ay={[zn.PRIMARY]:{icon:"blue-500",button:"primary-dark"},[zn.DANGER]:{icon:"red-500",button:"primary-dark"},[zn.WARNING]:{icon:"yellow-400",button:"primary-dark"}},Gl=({color:e=zn.PRIMARY,variant:t="solid",children:r,autoFocus:i,...s})=>{const a=Ay[e].button,l=t==="outlined"?`bg-transparent text-white border border-white hover:border-white hover:bg-white hover:text-${a}`:`text-white bg-${a} border border-${a} hover:border-white hover:bg-primary-hover hover:text-white`;return D.jsx("button",{autoFocus:i,className:We("w-16 rounded px-2 py-1 text-xs font-medium hover:font-bold focus:outline-none",l),...s,children:r})},Vk=({name:e,color:t=zn.PRIMARY,className:r="w-8 h-8"})=>{const i=Sc[e]||Sc.FdInfoCircle,s=`text-${Ay[t].icon}`;return D.jsx(i,{className:We(r,s)})},Xk=({id:e,title:t,message:r,icon:i,type:s,color:a,zIndex:l=3e3,views:c,width:f=520,hasOverlay:m=!0,container:v,onClose:g,onEdit:p})=>{const b=w=>{g({id:e,reason:w})};W.useEffect(()=>{function w(h){h.key==="Escape"&&b(pi.CANCELED)}return window.addEventListener("keyup",w),()=>{window.removeEventListener("keyup",w)}},[]);const x=rt.merge(rt.values(c==null?void 0:c.toggles).flatMap(w=>w.value?w.warnings||[]:[]),c==null?void 0:c.tips),d=(w,h)=>{var E;if(!(c!=null&&c.toggles))return;const S=rt.cloneDeep(c);(E=S.toggles)!=null&&E[w]&&(S.toggles[w].value=h),p({id:e,views:S})};return Fo.createPortal(D.jsx(ba,{appear:!0,show:!0,as:W.Fragment,children:D.jsx("div",{className:We("absolute inset-0 flex h-full w-full items-center justify-center overflow-y-auto",{"bg-black bg-opacity-80":m}),style:{zIndex:l},onClick:()=>b(pi.CANCELED),children:D.jsx(ba.Child,{as:W.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsx("div",{"data-cy":"confirmation-modal-cy",className:"relative rounded-md border border-grey-50 bg-grey-900",style:{width:f},onClick:w=>w.stopPropagation(),children:D.jsxs("div",{className:"flex flex-col items-center gap-3 p-6 px-12",children:[i?D.jsx("div",{className:"flex items-center justify-center",children:D.jsx(Vk,{name:i,color:a,className:"w-6 h-6"})}):null,D.jsx(Yk,{condition:t,children:D.jsx("h4",{className:"w-full text-wrap text-lg font-bold leading-6 text-white text-center",children:t})}),D.jsx("p",{className:"w-full text-wrap text-center text-sm font-medium text-white",children:r}),D.jsx("div",{className:"text-xs text-white",children:rt.values(c==null?void 0:c.toggles).map(w=>D.jsx("div",{children:D.jsxs("label",{htmlFor:w.key,className:"flex items-center",children:[D.jsx(fy,{size:"xs",value:w.value,onChange:h=>d(w.key,h)}),D.jsx("span",{className:"ml-1",children:w.title})]})},w.key))}),D.jsx(Jk,{warnings:x}),D.jsx("div",{className:"flex items-center gap-4",children:s===df.CONFIRM?D.jsxs(D.Fragment,{children:[D.jsx(Gl,{autoFocus:!0,color:a,onClick:()=>b(pi.CONFIRMED),children:"Confirm"}),D.jsx(Gl,{color:a,variant:"outlined",onClick:()=>b(pi.CANCELED),children:"Cancel"})]}):D.jsx(Gl,{autoFocus:!0,onClick:()=>b(),children:"OK"})})]})})})})}),v||document.body)},Yk=e=>e.condition?D.jsx(D.Fragment,{children:e.children}):null,Jk=e=>e.warnings?D.jsx(ba,{appear:!0,show:!!e.warnings.length,as:W.Fragment,children:D.jsx("div",{className:"flex flex-col gap-1 rounded-sm bg-grey-600 p-2 text-xs text-white",children:e.warnings.map((t,r)=>D.jsx(ba.Child,{as:W.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsxs("div",{className:"flex flex-1 items-center gap-1 rounded-sm px-2 py-1",children:[D.jsx(tt.FdWarningDanger,{className:We({"h-3 w-3":!0,"text-yellow-500":t.type==="warning","text-red-400":t.type==="error","text-primary-dark":t.type==="info"},"mr-3")}),D.jsx("div",{className:"flex-1",children:t.message})]})},`modal-warnings-${r}`))})}):null;var Ty=(e=>(e[e.MIN=.5]="MIN",e[e.MAX=10]="MAX",e[e.STEP=.5]="STEP",e[e.INIT=1]="INIT",e[e.TRANSITION=200]="TRANSITION",e))(Ty||{});const Qk=({zoom:e,minZoom:t=.5,maxZoom:r=10,handleZoomIn:i,handleZoomOut:s})=>D.jsxs("div",{className:"flex items-center rounded bg-grey-300 p-1",children:[D.jsx(tt.FdMinusNaked,{onClick:s,className:We("h-5 w-5 p-1",{"text-grey-200":e<=t,"cursor-pointer rounded hover:bg-purple-800":e>t})}),D.jsxs("span",{className:"mx-1 w-10 select-none text-center text-xs",children:[(e*100).toFixed(0),"%"]}),D.jsx(tt.FdPlusNaked,{onClick:i,className:We("h-5 w-5 p-1",{"text-grey-200":e>=r,"cursor-pointer rounded hover:bg-purple-800":e<r})})]}),e$=$.forwardRef(((e,t)=>$.createElement(yn.span,Ve({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),t$=e$;function fv(e){const t=$.useRef({value:e,previous:e});return $.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const[Ry]=Zc("Tooltip",[Fa]),pf=Fa(),r$=700,[iM,n$]=Ry("TooltipProvider",{isOpenDelayed:!0,delayDuration:r$,onOpen:()=>{},onClose:()=>{}}),[i$,Ba]=Ry("Tooltip"),o$=e=>{const{__scopeTooltip:t,children:r,open:i,defaultOpen:s=!1,onOpenChange:a,delayDuration:l}=e,c=n$("Tooltip",t),f=pf(t),[m,v]=$.useState(null),g=Rm(),p=$.useRef(0),b=l??c.delayDuration,x=$.useRef(!1),{onOpen:d,onClose:w}=c,[h=!1,S]=zm({prop:i,defaultProp:s,onChange:k=>{k&&(document.dispatchEvent(new CustomEvent("tooltip.open")),d()),a==null||a(k)}}),E=$.useMemo((()=>h?x.current?"delayed-open":"instant-open":"closed"),[h]),R=$.useCallback((()=>{window.clearTimeout(p.current),x.current=!1,S(!0)}),[S]),O=$.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{x.current=!0,S(!0)}),b)}),[b,S]);return $.useEffect((()=>()=>window.clearTimeout(p.current)),[]),$.createElement(Dm,f,$.createElement(i$,{scope:t,contentId:g,open:h,stateAttribute:E,trigger:m,onTriggerChange:v,onTriggerEnter:$.useCallback((()=>{c.isOpenDelayed?O():R()}),[c.isOpenDelayed,O,R]),onOpen:$.useCallback(R,[R]),onClose:$.useCallback((()=>{window.clearTimeout(p.current),S(!1),w()}),[S,w])},r))},s$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,...i}=e,s=Ba("TooltipTrigger",r),a=pf(r),l=mn(t,s.onTriggerChange),c=$.useRef(!1),f=$.useCallback((()=>c.current=!1),[]);return $.useEffect((()=>()=>document.removeEventListener("mouseup",f)),[f]),$.createElement(Nm,Ve({asChild:!0},a),$.createElement(yn.button,Ve({"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute},i,{ref:l,onMouseEnter:Ut(e.onMouseEnter,s.onTriggerEnter),onMouseLeave:Ut(e.onMouseLeave,s.onClose),onMouseDown:Ut(e.onMouseDown,(()=>{s.onClose(),c.current=!0,document.addEventListener("mouseup",f,{once:!0})})),onFocus:Ut(e.onFocus,(()=>{c.current||s.onOpen()})),onBlur:Ut(e.onBlur,s.onClose),onClick:Ut(e.onClick,(m=>{m.detail===0&&s.onClose()}))})))})),a$=$.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=Ba("TooltipContent",e.__scopeTooltip);return $.createElement(Hc,{present:r||s.open},$.createElement(u$,Ve({ref:t},i)))})),u$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,children:i,"aria-label":s,portalled:a=!0,...l}=e,c=Ba("TooltipContent",r),f=pf(r),m=a?qc:$.Fragment,{onClose:v}=c;return $m((()=>v())),$.useEffect((()=>(document.addEventListener("tooltip.open",v),()=>document.removeEventListener("tooltip.open",v))),[v]),$.createElement(m,null,$.createElement(l$,{__scopeTooltip:r}),$.createElement(jm,Ve({"data-state":c.stateAttribute},f,l,{ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),$.createElement(km,null,i),$.createElement(t$,{id:c.contentId,role:"tooltip"},s||i)))}));function l$(e){const{__scopeTooltip:t}=e,r=Ba("CheckTriggerMoved",t),i=Lm(r.trigger),s=i==null?void 0:i.left,a=fv(s),l=i==null?void 0:i.top,c=fv(l),f=r.onClose;return $.useEffect((()=>{(a!==void 0&&a!==s||c!==void 0&&c!==l)&&f()}),[f,a,c,s,l]),null}const c$=o$,f$=s$,d$=a$;function p$(e){return D.jsxs(c$,{delayDuration:e.delayDuration,open:e.open,children:[D.jsx(f$,{tabIndex:-1,asChild:!0,children:D.jsx("span",{children:e.children})}),D.jsxs(d$,{side:e.side,sideOffset:e.sideOffset,alignOffset:e.alignOffset,children:[typeof e.message=="string"&&D.jsx("p",{className:"max-w-[240px] rounded-md bg-primary-light px-1 py-2 text-s font-semibold text-primary-dark",children:e.message}),typeof e.message!="string"&&e.message]})]})}const In=30,fa=500,h$=()=>D.jsx("div",{className:"h-2 w-full bg-opacity-40 hover:bg-primary-hover"}),g$=e=>{const[t,r]=W.useState(In),i=W.useRef(),s=t>In,a=W.useRef(null);return W.useEffect(()=>{e.isOpen&&!s&&r(fa),!e.isOpen&&s&&r(In)},[e.isOpen]),D.jsxs("div",{className:"relative w-full select-none isolate",style:{zIndex:49},children:[D.jsx(gO.Resizable,{enable:{top:!0,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},className:"w-full select-none border-t border-grey-900 bg-grey-800",size:{height:t,width:"100%"},maxHeight:700,minHeight:In,onResizeStart:()=>{i.current&&Date.now()-i.current<200?r(s?In:fa):i.current=Date.now()},onResize:(l,c,f)=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{var m;(m=e.onResize)==null||m.call(e),a.current=null})},onResizeStop:(l,c,f,m)=>{r(t+m.height)},handleComponent:{top:D.jsx(h$,{})}}),D.jsxs("div",{"data-cy":"contextualPanel",className:"absolute inset-0 flex flex-col overflow-hidden",id:`__cp-${rt.kebabCase(e.path)}`,children:[D.jsxs("div",{className:We("flex justify-between items-center px-3 py-0.5",{"flex-1":!s}),children:[D.jsxs("div",{className:"group flex items-center justify-start",children:[D.jsx("span",{className:"mr-2 text-sm text-fd-gray-lighter",children:"Contextual panel"}),D.jsx("span",{}),e.tipKey?D.jsx(Qm,{tipKey:e.tipKey,alwaysOn:!0,asButton:!0}):null,D.jsx("button",{className:"rounded p-1 text-white hover:bg-primary-hover focus:outline-none",onClick:()=>{s?(r(In),e.onClose()):(r(fa),e.onOpen())},children:s?D.jsx(tt.FdDoubleArrowDown,{className:"h-4 w-4 text-white"}):D.jsx(tt.FdDoubleArrowUp,{className:"h-4 w-4 text-white"})})]}),e.headerRightSide]}),D.jsxs(aa,{of:s,children:[D.jsx(aa,{of:e.render,children:e.render}),D.jsx(aa,{of:!e.render,children:e.children})]})]})]})};function Py({children:e,viewBox:t="0 0 24 24",...r}){return D.jsx("svg",{viewBox:t,width:"1em",height:"1em",fill:"none",className:"base-icon",...r,children:e})}function Cy(e){const t=e.isIndeterminate?"M2 12h20":"M4 11.5L9 17L20 6";return D.jsx(Py,{viewBox:"0 0 24 24",...e,children:D.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",d:t})})}function v$({isChecked:e,isIndeterminate:t,isInvalid:r,icon:i,label:s,className:a="",style:l,...c}){const f=W.useRef(null),m=i||D.jsx(Cy,{}),v=c.checked??e;W.useEffect(()=>{f.current&&(f.current.indeterminate=!!t)},[t]);const g=v||t,p=["base-checkbox-container",a].join(" ");return D.jsxs("label",{className:p,style:l,"data-invalid":r,children:[D.jsx("input",{ref:f,type:"checkbox",className:"base-checkbox-input",checked:v,...c,"aria-invalid":r||void 0}),D.jsx("span",{className:"base-checkbox-control",children:g&&m&&W.cloneElement(m,{isChecked:v,isIndeterminate:t,className:"base-checkbox-icon"})}),s&&D.jsx("span",{className:"base-checkbox-label",children:s})]})}function m$(e,t){const r=W.useRef(!1);W.useEffect(()=>{if(r.current)return e();r.current=!0},t)}const Kl=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Vl(e,t,r,i){e.addEventListener?e.addEventListener(t,r,i):e.attachEvent&&e.attachEvent("on".concat(t),r)}function fo(e,t,r,i){e.removeEventListener?e.removeEventListener(t,r,i):e.detachEvent&&e.detachEvent("on".concat(t),r)}function ky(e,t){const r=t.slice(0,t.length-1);for(let i=0;i<r.length;i++)r[i]=e[r[i].toLowerCase()];return r}function $y(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}function y$(e,t){const r=e.length>=t.length?e:t,i=e.length>=t.length?t:e;let s=!0;for(let a=0;a<r.length;a++)i.indexOf(r[a])===-1&&(s=!1);return s}const Ro={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Kl?173:189,"=":Kl?61:187,";":Kl?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},gr={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},vo={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},gt={16:!1,18:!1,17:!1,91:!1},Ke={};for(let e=1;e<20;e++)Ro["f".concat(e)]=111+e;let qe=[],_o=null,Iy="all";const Ur=new Map,_i=e=>Ro[e.toLowerCase()]||gr[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),b$=e=>Object.keys(Ro).find(t=>Ro[t]===e),w$=e=>Object.keys(gr).find(t=>gr[t]===e);function Ly(e){Iy=e||"all"}function Po(){return Iy||"all"}function x$(){return qe.slice(0)}function S$(){return qe.map(e=>b$(e)||w$(e)||String.fromCharCode(e))}function E$(){const e=[];return Object.keys(Ke).forEach(t=>{Ke[t].forEach(r=>{let{key:i,scope:s,mods:a,shortcut:l}=r;e.push({scope:s,shortcut:l,mods:a,keys:i.split("+").map(c=>_i(c))})})}),e}function _$(e){const t=e.target||e.srcElement,{tagName:r}=t;let i=!0;const s=r==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(s||r==="TEXTAREA"||r==="SELECT")&&!t.readOnly)&&(i=!1),i}function O$(e){return typeof e=="string"&&(e=_i(e)),qe.indexOf(e)!==-1}function A$(e,t){let r,i;e||(e=Po());for(const s in Ke)if(Object.prototype.hasOwnProperty.call(Ke,s))for(r=Ke[s],i=0;i<r.length;)r[i].scope===e?r.splice(i,1).forEach(l=>{let{element:c}=l;return hf(c)}):i++;Po()===e&&Ly(t||"all")}function T$(e){let t=e.keyCode||e.which||e.charCode;e.key&&e.key.toLowerCase()==="capslock"&&(t=_i(e.key));const r=qe.indexOf(t);if(r>=0&&qe.splice(r,1),e.key&&e.key.toLowerCase()==="meta"&&qe.splice(0,qe.length),(t===93||t===224)&&(t=91),t in gt){gt[t]=!1;for(const i in gr)gr[i]===t&&(hr[i]=!1)}}function My(e){if(typeof e>"u")Object.keys(Ke).forEach(s=>{Array.isArray(Ke[s])&&Ke[s].forEach(a=>Qs(a)),delete Ke[s]}),hf(null);else if(Array.isArray(e))e.forEach(s=>{s.key&&Qs(s)});else if(typeof e=="object")e.key&&Qs(e);else if(typeof e=="string"){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];let[s,a]=r;typeof s=="function"&&(a=s,s=""),Qs({key:e,scope:s,method:a,splitKey:"+"})}}const Qs=e=>{let{key:t,scope:r,method:i,splitKey:s="+"}=e;$y(t).forEach(l=>{const c=l.split(s),f=c.length,m=c[f-1],v=m==="*"?"*":_i(m);if(!Ke[v])return;r||(r=Po());const g=f>1?ky(gr,c):[],p=[];Ke[v]=Ke[v].filter(b=>{const d=(i?b.method===i:!0)&&b.scope===r&&y$(b.mods,g);return d&&p.push(b.element),!d}),p.forEach(b=>hf(b))})};function dv(e,t,r,i){if(t.element!==i)return;let s;if(t.scope===r||t.scope==="all"){s=t.mods.length>0;for(const a in gt)Object.prototype.hasOwnProperty.call(gt,a)&&(!gt[a]&&t.mods.indexOf(+a)>-1||gt[a]&&t.mods.indexOf(+a)===-1)&&(s=!1);(t.mods.length===0&&!gt[16]&&!gt[18]&&!gt[17]&&!gt[91]||s||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(qe),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function pv(e,t){const r=Ke["*"];let i=e.keyCode||e.which||e.charCode;if(e.key&&e.key.toLowerCase()==="capslock"||!hr.filter.call(this,e))return;if((i===93||i===224)&&(i=91),qe.indexOf(i)===-1&&i!==229&&qe.push(i),["metaKey","ctrlKey","altKey","shiftKey"].forEach(c=>{const f=vo[c];e[c]&&qe.indexOf(f)===-1?qe.push(f):!e[c]&&qe.indexOf(f)>-1?qe.splice(qe.indexOf(f),1):c==="metaKey"&&e[c]&&(qe=qe.filter(m=>m in vo||m===i))}),i in gt){gt[i]=!0;for(const c in gr)if(Object.prototype.hasOwnProperty.call(gr,c)){const f=vo[gr[c]];hr[c]=e[f]}if(!r)return}for(const c in gt)Object.prototype.hasOwnProperty.call(gt,c)&&(gt[c]=e[vo[c]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(qe.indexOf(17)===-1&&qe.push(17),qe.indexOf(18)===-1&&qe.push(18),gt[17]=!0,gt[18]=!0);const s=Po();if(r)for(let c=0;c<r.length;c++)r[c].scope===s&&(e.type==="keydown"&&r[c].keydown||e.type==="keyup"&&r[c].keyup)&&dv(e,r[c],s,t);if(!(i in Ke))return;const a=Ke[i],l=a.length;for(let c=0;c<l;c++)if((e.type==="keydown"&&a[c].keydown||e.type==="keyup"&&a[c].keyup)&&a[c].key){const f=a[c],{splitKey:m}=f,v=f.key.split(m),g=[];for(let p=0;p<v.length;p++)g.push(_i(v[p]));g.sort().join("")===qe.sort().join("")&&dv(e,f,s,t)}}function hr(e,t,r){qe=[];const i=$y(e);let s=[],a="all",l=document,c=0,f=!1,m=!0,v="+",g=!1,p=!1;for(r===void 0&&typeof t=="function"&&(r=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(a=t.scope),t.element&&(l=t.element),t.keyup&&(f=t.keyup),t.keydown!==void 0&&(m=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(v=t.splitKey),t.single===!0&&(p=!0)),typeof t=="string"&&(a=t),p&&My(e,a);c<i.length;c++)e=i[c].split(v),s=[],e.length>1&&(s=ky(gr,e)),e=e[e.length-1],e=e==="*"?"*":_i(e),e in Ke||(Ke[e]=[]),Ke[e].push({keyup:f,keydown:m,scope:a,mods:s,shortcut:i[c],method:r,key:i[c],splitKey:v,element:l});if(typeof l<"u"&&window){if(!Ur.has(l)){const b=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return pv(d,l)},x=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;pv(d,l),T$(d)};Ur.set(l,{keydownListener:b,keyupListenr:x,capture:g}),Vl(l,"keydown",b,g),Vl(l,"keyup",x,g)}if(!_o){const b=()=>{qe=[]};_o={listener:b,capture:g},Vl(window,"focus",b,g)}}}function R$(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Ke).forEach(r=>{Ke[r].filter(s=>s.scope===t&&s.shortcut===e).forEach(s=>{s&&s.method&&s.method()})})}function hf(e){const t=Object.values(Ke).flat();if(t.findIndex(i=>{let{element:s}=i;return s===e})<0){const{keydownListener:i,keyupListenr:s,capture:a}=Ur.get(e)||{};i&&s&&(fo(e,"keyup",s,a),fo(e,"keydown",i,a),Ur.delete(e))}if((t.length<=0||Ur.size<=0)&&(Object.keys(Ur).forEach(s=>{const{keydownListener:a,keyupListenr:l,capture:c}=Ur.get(s)||{};a&&l&&(fo(s,"keyup",l,c),fo(s,"keydown",a,c),Ur.delete(s))}),Ur.clear(),Object.keys(Ke).forEach(s=>delete Ke[s]),_o)){const{listener:s,capture:a}=_o;fo(window,"focus",s,a),_o=null}}const Xl={getPressedKeyString:S$,setScope:Ly,getScope:Po,deleteScope:A$,getPressedKeyCodes:x$,getAllKeyCodes:E$,isPressed:O$,filter:_$,trigger:R$,unbind:My,keyMap:Ro,modifier:gr,modifierMap:vo};for(const e in Xl)Object.prototype.hasOwnProperty.call(Xl,e)&&(hr[e]=Xl[e]);if(typeof window<"u"){const e=window.hotkeys;hr.noConflict=t=>(t&&window.hotkeys===hr&&(window.hotkeys=e),hr),window.hotkeys=hr}hr.filter=()=>!0;function P$(e,t,r,i){r instanceof Array&&(i=r,r=void 0),i=i||[],r=r||{};const{preventDefault:s=!0}=r,a=W.useCallback((c,f)=>{s&&c.preventDefault(),setTimeout(()=>t(c,f))},i),l=()=>{hr.unbind(e,a)};W.useEffect(()=>(hr(e,r,a),l),[e,r,a])}const C$=e=>{const t=W.useRef(null);return W.useEffect(()=>{const r=i=>{t.current&&!t.current.contains(i.target)&&e(i)};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[e]),t};function k$(e){const t=W.useRef();return W.useEffect(()=>{t.current=e},[e]),t.current}function $$(e){const t=W.useRef(e);return W.useEffect(()=>{t.current=e},[e]),t}function I$(e){const t=W.useRef(null);return W.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t}function L$(e){const[t,r]=W.useState(e),i=(a,l)=>{r(c=>({...c,features:{...c.features,[a]:{enabled:l}}}))},s=W.useCallback((...a)=>a.every(l=>{var c;return(c=t.features[l])==null?void 0:c.enabled}),[t.features]);return{setFeature:i,isFeatureEnabled:s}}const Fy=W.createContext(""),M$=e=>D.jsx(Fy.Provider,{value:e.value,children:e.children}),F$=()=>{const e=W.useContext(Fy);if(typeof e!="string")throw new Error("Error while calling useIdentity! Context has incorrect type (expected string)");return e};function D$(e){const[t,r]=W.useState(e),i=W.useMemo(()=>N$(t,r),[]);return{state:t,actions:{...i,set:s=>{r(typeof s=="function"?s:a=>({...a,...s}))}}}}function N$(e,t=()=>{}){return Object.keys(e).reduce((i,s)=>({...i,[`set${rt.upperFirst(s)}`]:a=>t(l=>({...l,[s]:a}))}),{})}const j$=(e,t,r={})=>{r={timeout:200,...r};const i=W.useRef(),s=()=>{i.current&&(clearTimeout(i.current),i.current=null)};return W.useCallback((a,...l)=>{s(),t&&a.detail===1&&(i.current=setTimeout(()=>{t(a,...l)},r.timeout)),a.detail%2===0&&e(a,...l)},[t,e,r.timeout])};function vt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(process.env.NODE_ENV!=="production"){var s=Z$[e],a=s?typeof s=="function"?s.apply(null,r):s:"unknown error nr: "+e;throw Error("[Immer] "+a)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(l){return"'"+l+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Si(e){return!!e&&!!e[qt]}function Hn(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var s=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===G$})(e)||Array.isArray(e)||!!e[xv]||!!(!((t=e.constructor)===null||t===void 0)&&t[xv])||gf(e)||vf(e))}function Co(e,t,r){r===void 0&&(r=!1),Oi(e)===0?(r?Object.keys:wf)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,s){return t(s,i,e)}))}function Oi(e){var t=e[qt];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:gf(e)?2:vf(e)?3:0}function Ec(e,t){return Oi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function z$(e,t){return Oi(e)===2?e.get(t):e[t]}function Dy(e,t,r){var i=Oi(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function W$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function gf(e){return H$&&e instanceof Map}function vf(e){return q$&&e instanceof Set}function Ln(e){return e.o||e.t}function mf(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=K$(e);delete t[qt];for(var r=wf(t),i=0;i<r.length;i++){var s=r[i],a=t[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(Object.getPrototypeOf(e),t)}function ko(e,t){return t===void 0&&(t=!1),yf(e)||Si(e)||!Hn(e)||(Oi(e)>1&&(e.set=e.add=e.clear=e.delete=B$),Object.freeze(e),t&&Co(e,(function(r,i){return ko(i,!0)}),!0)),e}function B$(){vt(2)}function yf(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Rr(e){var t=V$[e];return t||vt(18,e),t}function hv(){return process.env.NODE_ENV==="production"||Ei||vt(0),Ei}function Yl(e,t){t&&(Rr("Patches"),e.u=[],e.s=[],e.v=t)}function Ea(e){_c(e),e.p.forEach(U$),e.p=null}function _c(e){e===Ei&&(Ei=e.l)}function gv(e){return Ei={p:[],l:Ei,h:e,m:!0,_:0}}function U$(e){var t=e[qt];t.i===0||t.i===1?t.j():t.g=!0}function Jl(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||Rr("ES5").S(t,e,i),i?(r[qt].P&&(Ea(t),vt(4)),Hn(e)&&(e=_a(t,e),t.l||Oa(t,e)),t.u&&Rr("Patches").M(r[qt].t,e,t.u,t.s)):e=_a(t,r,[]),Ea(t),t.u&&t.v(t.u,t.s),e!==jy?e:void 0}function _a(e,t,r){if(yf(t))return t;var i=t[qt];if(!i)return Co(t,(function(c,f){return vv(e,i,t,c,f,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return Oa(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var s=i.i===4||i.i===5?i.o=mf(i.k):i.o,a=s,l=!1;i.i===3&&(a=new Set(s),s.clear(),l=!0),Co(a,(function(c,f){return vv(e,i,s,c,f,r,l)})),Oa(e,s,!1),r&&e.u&&Rr("Patches").N(i,r,e.u,e.s)}return i.o}function vv(e,t,r,i,s,a,l){if(process.env.NODE_ENV!=="production"&&s===r&&vt(5),Si(s)){var c=_a(e,s,a&&t&&t.i!==3&&!Ec(t.R,i)?a.concat(i):void 0);if(Dy(r,i,c),!Si(c))return;e.m=!1}else l&&r.add(s);if(Hn(s)&&!yf(s)){if(!e.h.D&&e._<1)return;_a(e,s),t&&t.A.l||Oa(e,s)}}function Oa(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ko(t,r)}function Ql(e,t){var r=e[qt];return(r?Ln(r):e)[t]}function mv(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function Oc(e){e.P||(e.P=!0,e.l&&Oc(e.l))}function ec(e){e.o||(e.o=mf(e.t))}function Ac(e,t,r){var i=gf(t)?Rr("MapSet").F(t,r):vf(t)?Rr("MapSet").T(t,r):e.O?(function(s,a){var l=Array.isArray(s),c={i:l?1:0,A:a?a.A:hv(),P:!1,I:!1,R:{},l:a,t:s,k:null,o:null,j:null,C:!1},f=c,m=Tc;l&&(f=[c],m=mo);var v=Proxy.revocable(f,m),g=v.revoke,p=v.proxy;return c.k=p,c.j=g,p})(t,r):Rr("ES5").J(t,r);return(r?r.A:hv()).p.push(i),i}function Ny(e){return Si(e)||vt(22,e),(function t(r){if(!Hn(r))return r;var i,s=r[qt],a=Oi(r);if(s){if(!s.P&&(s.i<4||!Rr("ES5").K(s)))return s.t;s.I=!0,i=yv(r,a),s.I=!1}else i=yv(r,a);return Co(i,(function(l,c){s&&z$(s.t,l)===c||Dy(i,l,t(c))})),a===3?new Set(i):i})(e)}function yv(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return mf(e)}var bv,Ei,bf=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",H$=typeof Map<"u",q$=typeof Set<"u",wv=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",jy=bf?Symbol.for("immer-nothing"):((bv={})["immer-nothing"]=!0,bv),xv=bf?Symbol.for("immer-draftable"):"__$immer_draftable",qt=bf?Symbol.for("immer-state"):"__$immer_state",Z$={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},G$=""+Object.prototype.constructor,wf=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,K$=Object.getOwnPropertyDescriptors||function(e){var t={};return wf(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},V$={},Tc={get:function(e,t){if(t===qt)return e;var r=Ln(e);if(!Ec(r,t))return(function(s,a,l){var c,f=mv(a,l);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(s.k):void 0})(e,r,t);var i=r[t];return e.I||!Hn(i)?i:i===Ql(e.t,t)?(ec(e),e.o[t]=Ac(e.A.h,i,e)):i},has:function(e,t){return t in Ln(e)},ownKeys:function(e){return Reflect.ownKeys(Ln(e))},set:function(e,t,r){var i=mv(Ln(e),t);if(i!=null&&i.set)return i.set.call(e.k,r),!0;if(!e.P){var s=Ql(Ln(e),t),a=s==null?void 0:s[qt];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(W$(r,s)&&(r!==void 0||Ec(e.t,t)))return!0;ec(e),Oc(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ql(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ec(e),Oc(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ln(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){vt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){vt(12)}},mo={};Co(Tc,(function(e,t){mo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),mo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&vt(13),mo.set.call(this,e,t,void 0)},mo.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&vt(14),Tc.set.call(this,e[0],t,r,e[0])};var X$=(function(){function e(r){var i=this;this.O=wv,this.D=!0,this.produce=function(s,a,l){if(typeof s=="function"&&typeof a!="function"){var c=a;a=s;var f=i;return function(d){var w=this;d===void 0&&(d=c);for(var h=arguments.length,S=Array(h>1?h-1:0),E=1;E<h;E++)S[E-1]=arguments[E];return f.produce(d,(function(R){var O;return(O=a).call.apply(O,[w,R].concat(S))}))}}var m;if(typeof a!="function"&&vt(6),l!==void 0&&typeof l!="function"&&vt(7),Hn(s)){var v=gv(i),g=Ac(i,s,void 0),p=!0;try{m=a(g),p=!1}finally{p?Ea(v):_c(v)}return typeof Promise<"u"&&m instanceof Promise?m.then((function(d){return Yl(v,l),Jl(d,v)}),(function(d){throw Ea(v),d})):(Yl(v,l),Jl(m,v))}if(!s||typeof s!="object"){if((m=a(s))===void 0&&(m=s),m===jy&&(m=void 0),i.D&&ko(m,!0),l){var b=[],x=[];Rr("Patches").M(s,m,b,x),l(b,x)}return m}vt(21,s)},this.produceWithPatches=function(s,a){if(typeof s=="function")return function(m){for(var v=arguments.length,g=Array(v>1?v-1:0),p=1;p<v;p++)g[p-1]=arguments[p];return i.produceWithPatches(m,(function(b){return s.apply(void 0,[b].concat(g))}))};var l,c,f=i.produce(s,a,(function(m,v){l=m,c=v}));return typeof Promise<"u"&&f instanceof Promise?f.then((function(m){return[m,l,c]})):[f,l,c]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Hn(r)||vt(8),Si(r)&&(r=Ny(r));var i=gv(this),s=Ac(this,r,void 0);return s[qt].C=!0,_c(i),s},t.finishDraft=function(r,i){var s=r&&r[qt];process.env.NODE_ENV!=="production"&&(s&&s.C||vt(9),s.I&&vt(10));var a=s.A;return Yl(a,i),Jl(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!wv&&vt(20),this.O=r},t.applyPatches=function(r,i){var s;for(s=i.length-1;s>=0;s--){var a=i[s];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}s>-1&&(i=i.slice(s+1));var l=Rr("Patches").$;return Si(r)?l(r,i):this.produce(r,(function(c){return l(c,i)}))},e})(),Zt=new X$,Y$=Zt.produce;Zt.produceWithPatches.bind(Zt);Zt.setAutoFreeze.bind(Zt);Zt.setUseProxies.bind(Zt);Zt.applyPatches.bind(Zt);Zt.createDraft.bind(Zt);Zt.finishDraft.bind(Zt);function J$(e){var t=W.useState(function(){return ko(typeof e=="function"?e():e,!0)}),r=t[1];return[t[0],W.useCallback(function(i){r(typeof i=="function"?Y$(i):ko(i))},[])]}const Q$=process.env.NODE_ENV==="development",tc=Q$&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:null,eI=(e,t,r)=>{const[i,s]=J$(e),a=W.useRef(null);W.useEffect(()=>{var f;return r&&(a.current=tc==null?void 0:tc.connect({name:r,trace:!0}),(f=a.current)==null||f.init(e)),()=>{var m,v;(v=(m=a.current)==null?void 0:m.disconnect)==null||v.call(m)}},[]);const l=t&&typeof t=="object"?t:{},c=W.useMemo(()=>Object.keys(l).reduce((f,m)=>({...f,[m]:v=>(s(g=>{var p;l[m](g,v),(p=a.current)==null||p.send({type:l[m].name},Ny(g))}),c)}),{}),[s]);return{state:i,dispatch:c}};function Zr(e){return typeof e=="function"}function zy(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var rc=zy(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
201
|
+
}`;var Se=nh(function(){return Pe(T,le+"return "+ee).apply(r,P)});if(Se.source=ee,il(Se))throw Se;return Se}function w_(n){return ke(n).toLowerCase()}function x_(n){return ke(n).toUpperCase()}function S_(n,o,u){if(n=ke(n),n&&(u||o===r))return dd(n);if(!n||!(o=Nt(o)))return n;var y=ar(n),_=ar(o),T=pd(y,_),P=hd(y,_)+1;return on(y,T,P).join("")}function E_(n,o,u){if(n=ke(n),n&&(u||o===r))return n.slice(0,vd(n)+1);if(!n||!(o=Nt(o)))return n;var y=ar(n),_=hd(y,ar(o))+1;return on(y,0,_).join("")}function __(n,o,u){if(n=ke(n),n&&(u||o===r))return n.replace(iu,"");if(!n||!(o=Nt(o)))return n;var y=ar(n),_=pd(y,ar(o));return on(y,_).join("")}function O_(n,o){var u=G,y=j;if(Ge(o)){var _="separator"in o?o.separator:_;u="length"in o?xe(o.length):u,y="omission"in o?Nt(o.omission):y}n=ke(n);var T=n.length;if(Yn(n)){var P=ar(n);T=P.length}if(u>=T)return n;var I=u-Jn(y);if(I<1)return y;var z=P?on(P,0,I).join(""):n.slice(0,I);if(_===r)return z+y;if(P&&(I+=z.length-I),ol(_)){if(n.slice(I).search(_)){var V,Y=z;for(_.global||(_=xu(_.source,ke(Lf.exec(_))+"g")),_.lastIndex=0;V=_.exec(Y);)var ee=V.index;z=z.slice(0,ee===r?I:ee)}}else if(n.indexOf(Nt(_),I)!=I){var oe=z.lastIndexOf(_);oe>-1&&(z=z.slice(0,oe))}return z+y}function A_(n){return n=ke(n),n&&D0.test(n)?n.replace(kf,tw):n}var T_=oi(function(n,o,u){return n+(u?" ":"")+o.toUpperCase()}),ul=ip("toUpperCase");function rh(n,o,u){return n=ke(n),o=u?r:o,o===r?Xb(n)?iw(n):Wb(n):n.match(o)||[]}var nh=_e(function(n,o){try{return Ft(n,r,o)}catch(u){return il(u)?u:new be(u)}}),R_=Dr(function(n,o){return Vt(o,function(u){u=br(u),Mr(n,u,rl(n[u],n))}),n});function P_(n){var o=n==null?0:n.length,u=pe();return n=o?Ue(n,function(y){if(typeof y[1]!="function")throw new Xt(l);return[u(y[0]),y[1]]}):[],_e(function(y){for(var _=-1;++_<o;){var T=n[_];if(Ft(T[0],this,y))return Ft(T[1],this,y)}})}function C_(n){return t1(Jt(n,g))}function ll(n){return function(){return n}}function k_(n,o){return n==null||n!==n?o:n}var $_=sp(),I_=sp(!0);function $t(n){return n}function cl(n){return Fd(typeof n=="function"?n:Jt(n,g))}function L_(n){return Nd(Jt(n,g))}function M_(n,o){return jd(n,Jt(o,g))}var F_=_e(function(n,o){return function(u){return Mi(u,n,o)}}),D_=_e(function(n,o){return function(u){return Mi(n,u,o)}});function fl(n,o,u){var y=lt(o),_=vs(o,y);u==null&&!(Ge(o)&&(_.length||!y.length))&&(u=o,o=n,n=this,_=vs(o,lt(o)));var T=!(Ge(u)&&"chain"in u)||!!u.chain,P=jr(n);return Vt(_,function(I){var z=o[I];n[I]=z,P&&(n.prototype[I]=function(){var V=this.__chain__;if(T||V){var Y=n(this.__wrapped__),ee=Y.__actions__=Pt(this.__actions__);return ee.push({func:z,args:arguments,thisArg:n}),Y.__chain__=V,Y}return z.apply(n,Jr([this.value()],arguments))})}),n}function N_(){return dt._===this&&(dt._=cw),this}function dl(){}function j_(n){return n=xe(n),_e(function(o){return zd(o,n)})}var z_=Uu(Ue),W_=Uu(ad),B_=Uu(hu);function ih(n){return Xu(n)?gu(br(n)):y1(n)}function U_(n){return function(o){return n==null?r:An(n,o)}}var H_=up(),q_=up(!0);function pl(){return[]}function hl(){return!1}function Z_(){return{}}function G_(){return""}function K_(){return!0}function V_(n,o){if(n=xe(n),n<1||n>te)return[];var u=Q,y=bt(n,Q);o=pe(o),n-=Q;for(var _=yu(y,o);++u<n;)o(u);return _}function X_(n){return we(n)?Ue(n,br):jt(n)?[n]:Pt(_p(ke(n)))}function Y_(n){var o=++uw;return ke(n)+o}var J_=Ss(function(n,o){return n+o},0),Q_=Hu("ceil"),eO=Ss(function(n,o){return n/o},1),tO=Hu("floor");function rO(n){return n&&n.length?gs(n,$t,Pu):r}function nO(n,o){return n&&n.length?gs(n,pe(o,2),Pu):r}function iO(n){return cd(n,$t)}function oO(n,o){return cd(n,pe(o,2))}function sO(n){return n&&n.length?gs(n,$t,Iu):r}function aO(n,o){return n&&n.length?gs(n,pe(o,2),Iu):r}var uO=Ss(function(n,o){return n*o},1),lO=Hu("round"),cO=Ss(function(n,o){return n-o},0);function fO(n){return n&&n.length?mu(n,$t):0}function dO(n,o){return n&&n.length?mu(n,pe(o,2)):0}return A.after=LS,A.ary=Mp,A.assign=xE,A.assignIn=Vp,A.assignInWith=Ms,A.assignWith=SE,A.at=EE,A.before=Fp,A.bind=rl,A.bindAll=R_,A.bindKey=Dp,A.castArray=ZS,A.chain=$p,A.chunk=tx,A.compact=rx,A.concat=nx,A.cond=P_,A.conforms=C_,A.constant=ll,A.countBy=fS,A.create=_E,A.curry=Np,A.curryRight=jp,A.debounce=zp,A.defaults=OE,A.defaultsDeep=AE,A.defer=MS,A.delay=FS,A.difference=ix,A.differenceBy=ox,A.differenceWith=sx,A.drop=ax,A.dropRight=ux,A.dropRightWhile=lx,A.dropWhile=cx,A.fill=fx,A.filter=pS,A.flatMap=vS,A.flatMapDeep=mS,A.flatMapDepth=yS,A.flatten=Rp,A.flattenDeep=dx,A.flattenDepth=px,A.flip=DS,A.flow=$_,A.flowRight=I_,A.fromPairs=hx,A.functions=IE,A.functionsIn=LE,A.groupBy=bS,A.initial=vx,A.intersection=mx,A.intersectionBy=yx,A.intersectionWith=bx,A.invert=FE,A.invertBy=DE,A.invokeMap=xS,A.iteratee=cl,A.keyBy=SS,A.keys=lt,A.keysIn=kt,A.map=Ps,A.mapKeys=jE,A.mapValues=zE,A.matches=L_,A.matchesProperty=M_,A.memoize=ks,A.merge=WE,A.mergeWith=Xp,A.method=F_,A.methodOf=D_,A.mixin=fl,A.negate=$s,A.nthArg=j_,A.omit=BE,A.omitBy=UE,A.once=NS,A.orderBy=ES,A.over=z_,A.overArgs=jS,A.overEvery=W_,A.overSome=B_,A.partial=nl,A.partialRight=Wp,A.partition=_S,A.pick=HE,A.pickBy=Yp,A.property=ih,A.propertyOf=U_,A.pull=Ex,A.pullAll=Cp,A.pullAllBy=_x,A.pullAllWith=Ox,A.pullAt=Ax,A.range=H_,A.rangeRight=q_,A.rearg=zS,A.reject=TS,A.remove=Tx,A.rest=WS,A.reverse=el,A.sampleSize=PS,A.set=ZE,A.setWith=GE,A.shuffle=CS,A.slice=Rx,A.sortBy=IS,A.sortedUniq=Mx,A.sortedUniqBy=Fx,A.split=v_,A.spread=BS,A.tail=Dx,A.take=Nx,A.takeRight=jx,A.takeRightWhile=zx,A.takeWhile=Wx,A.tap=rS,A.throttle=US,A.thru=Rs,A.toArray=Zp,A.toPairs=Jp,A.toPairsIn=Qp,A.toPath=X_,A.toPlainObject=Kp,A.transform=KE,A.unary=HS,A.union=Bx,A.unionBy=Ux,A.unionWith=Hx,A.uniq=qx,A.uniqBy=Zx,A.uniqWith=Gx,A.unset=VE,A.unzip=tl,A.unzipWith=kp,A.update=XE,A.updateWith=YE,A.values=ui,A.valuesIn=JE,A.without=Kx,A.words=rh,A.wrap=qS,A.xor=Vx,A.xorBy=Xx,A.xorWith=Yx,A.zip=Jx,A.zipObject=Qx,A.zipObjectDeep=eS,A.zipWith=tS,A.entries=Jp,A.entriesIn=Qp,A.extend=Vp,A.extendWith=Ms,fl(A,A),A.add=J_,A.attempt=nh,A.camelCase=r_,A.capitalize=eh,A.ceil=Q_,A.clamp=QE,A.clone=GS,A.cloneDeep=VS,A.cloneDeepWith=XS,A.cloneWith=KS,A.conformsTo=YS,A.deburr=th,A.defaultTo=k_,A.divide=eO,A.endsWith=n_,A.eq=lr,A.escape=i_,A.escapeRegExp=o_,A.every=dS,A.find=hS,A.findIndex=Ap,A.findKey=TE,A.findLast=gS,A.findLastIndex=Tp,A.findLastKey=RE,A.floor=tO,A.forEach=Ip,A.forEachRight=Lp,A.forIn=PE,A.forInRight=CE,A.forOwn=kE,A.forOwnRight=$E,A.get=sl,A.gt=JS,A.gte=QS,A.has=ME,A.hasIn=al,A.head=Pp,A.identity=$t,A.includes=wS,A.indexOf=gx,A.inRange=e_,A.invoke=NE,A.isArguments=Pn,A.isArray=we,A.isArrayBuffer=eE,A.isArrayLike=Ct,A.isArrayLikeObject=Je,A.isBoolean=tE,A.isBuffer=sn,A.isDate=rE,A.isElement=nE,A.isEmpty=iE,A.isEqual=oE,A.isEqualWith=sE,A.isError=il,A.isFinite=aE,A.isFunction=jr,A.isInteger=Bp,A.isLength=Is,A.isMap=Up,A.isMatch=uE,A.isMatchWith=lE,A.isNaN=cE,A.isNative=fE,A.isNil=pE,A.isNull=dE,A.isNumber=Hp,A.isObject=Ge,A.isObjectLike=Xe,A.isPlainObject=Wi,A.isRegExp=ol,A.isSafeInteger=hE,A.isSet=qp,A.isString=Ls,A.isSymbol=jt,A.isTypedArray=ai,A.isUndefined=gE,A.isWeakMap=vE,A.isWeakSet=mE,A.join=wx,A.kebabCase=s_,A.last=er,A.lastIndexOf=xx,A.lowerCase=a_,A.lowerFirst=u_,A.lt=yE,A.lte=bE,A.max=rO,A.maxBy=nO,A.mean=iO,A.meanBy=oO,A.min=sO,A.minBy=aO,A.stubArray=pl,A.stubFalse=hl,A.stubObject=Z_,A.stubString=G_,A.stubTrue=K_,A.multiply=uO,A.nth=Sx,A.noConflict=N_,A.noop=dl,A.now=Cs,A.pad=l_,A.padEnd=c_,A.padStart=f_,A.parseInt=d_,A.random=t_,A.reduce=OS,A.reduceRight=AS,A.repeat=p_,A.replace=h_,A.result=qE,A.round=lO,A.runInContext=N,A.sample=RS,A.size=kS,A.snakeCase=g_,A.some=$S,A.sortedIndex=Px,A.sortedIndexBy=Cx,A.sortedIndexOf=kx,A.sortedLastIndex=$x,A.sortedLastIndexBy=Ix,A.sortedLastIndexOf=Lx,A.startCase=m_,A.startsWith=y_,A.subtract=cO,A.sum=fO,A.sumBy=dO,A.template=b_,A.times=V_,A.toFinite=zr,A.toInteger=xe,A.toLength=Gp,A.toLower=w_,A.toNumber=tr,A.toSafeInteger=wE,A.toString=ke,A.toUpper=x_,A.trim=S_,A.trimEnd=E_,A.trimStart=__,A.truncate=O_,A.unescape=A_,A.uniqueId=Y_,A.upperCase=T_,A.upperFirst=ul,A.each=Ip,A.eachRight=Lp,A.first=Pp,fl(A,(function(){var n={};return mr(A,function(o,u){Fe.call(A.prototype,u)||(n[u]=o)}),n})(),{chain:!1}),A.VERSION=i,Vt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){A[n].placeholder=A}),Vt(["drop","take"],function(n,o){Te.prototype[n]=function(u){u=u===r?1:st(xe(u),0);var y=this.__filtered__&&!o?new Te(this):this.clone();return y.__filtered__?y.__takeCount__=bt(u,y.__takeCount__):y.__views__.push({size:bt(u,Q),type:n+(y.__dir__<0?"Right":"")}),y},Te.prototype[n+"Right"]=function(u){return this.reverse()[n](u).reverse()}}),Vt(["filter","map","takeWhile"],function(n,o){var u=o+1,y=u==q||u==J;Te.prototype[n]=function(_){var T=this.clone();return T.__iteratees__.push({iteratee:pe(_,3),type:u}),T.__filtered__=T.__filtered__||y,T}}),Vt(["head","last"],function(n,o){var u="take"+(o?"Right":"");Te.prototype[n]=function(){return this[u](1).value()[0]}}),Vt(["initial","tail"],function(n,o){var u="drop"+(o?"":"Right");Te.prototype[n]=function(){return this.__filtered__?new Te(this):this[u](1)}}),Te.prototype.compact=function(){return this.filter($t)},Te.prototype.find=function(n){return this.filter(n).head()},Te.prototype.findLast=function(n){return this.reverse().find(n)},Te.prototype.invokeMap=_e(function(n,o){return typeof n=="function"?new Te(this):this.map(function(u){return Mi(u,n,o)})}),Te.prototype.reject=function(n){return this.filter($s(pe(n)))},Te.prototype.slice=function(n,o){n=xe(n);var u=this;return u.__filtered__&&(n>0||o<0)?new Te(u):(n<0?u=u.takeRight(-n):n&&(u=u.drop(n)),o!==r&&(o=xe(o),u=o<0?u.dropRight(-o):u.take(o-n)),u)},Te.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Te.prototype.toArray=function(){return this.take(Q)},mr(Te.prototype,function(n,o){var u=/^(?:filter|find|map|reject)|While$/.test(o),y=/^(?:head|last)$/.test(o),_=A[y?"take"+(o=="last"?"Right":""):o],T=y||/^find/.test(o);_&&(A.prototype[o]=function(){var P=this.__wrapped__,I=y?[1]:arguments,z=P instanceof Te,V=I[0],Y=z||we(P),ee=function(Oe){var Re=_.apply(A,Jr([Oe],I));return y&&oe?Re[0]:Re};Y&&u&&typeof V=="function"&&V.length!=1&&(z=Y=!1);var oe=this.__chain__,le=!!this.__actions__.length,he=T&&!oe,Se=z&&!le;if(!T&&Y){P=Se?P:new Te(this);var ge=n.apply(P,I);return ge.__actions__.push({func:Rs,args:[ee],thisArg:r}),new Yt(ge,oe)}return he&&Se?n.apply(this,I):(ge=this.thru(ee),he?y?ge.value()[0]:ge.value():ge)})}),Vt(["pop","push","shift","sort","splice","unshift"],function(n){var o=es[n],u=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",y=/^(?:pop|shift)$/.test(n);A.prototype[n]=function(){var _=arguments;if(y&&!this.__chain__){var T=this.value();return o.apply(we(T)?T:[],_)}return this[u](function(P){return o.apply(we(P)?P:[],_)})}}),mr(Te.prototype,function(n,o){var u=A[o];if(u){var y=u.name+"";Fe.call(ri,y)||(ri[y]=[]),ri[y].push({name:o,func:u})}}),ri[xs(r,h).name]=[{name:"wrapper",func:r}],Te.prototype.clone=Aw,Te.prototype.reverse=Tw,Te.prototype.value=Rw,A.prototype.at=nS,A.prototype.chain=iS,A.prototype.commit=oS,A.prototype.next=sS,A.prototype.plant=uS,A.prototype.reverse=lS,A.prototype.toJSON=A.prototype.valueOf=A.prototype.value=cS,A.prototype.first=A.prototype.head,Ri&&(A.prototype[Ri]=aS),A}),Qn=ow();xn?((xn.exports=Qn)._=Qn,cu._=Qn):dt._=Qn}).call(Gk)})(go,go.exports)),go.exports}var rt=Kk();const Sc={FdSave:tt.FdSave,FdWarningDanger:tt.FdWarningDanger,FdInfoCircle:tt.FdInfoCircle,FdInfoBold:tt.FdInfoBold};var df=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(df||{}),zn=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(zn||{}),pi=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(pi||{});const Ay={[zn.PRIMARY]:{icon:"blue-500",button:"primary-dark"},[zn.DANGER]:{icon:"red-500",button:"primary-dark"},[zn.WARNING]:{icon:"yellow-400",button:"primary-dark"}},Gl=({color:e=zn.PRIMARY,variant:t="solid",children:r,autoFocus:i,...s})=>{const a=Ay[e].button,l=t==="outlined"?`bg-transparent text-white border border-white hover:border-white hover:bg-white hover:text-${a}`:`text-white bg-${a} border border-${a} hover:border-white hover:bg-primary-hover hover:text-white`;return D.jsx("button",{autoFocus:i,className:We("w-16 rounded px-2 py-1 text-xs font-medium hover:font-bold focus:outline-none",l),...s,children:r})},Vk=({name:e,color:t=zn.PRIMARY,className:r="w-8 h-8"})=>{const i=Sc[e]||Sc.FdInfoCircle,s=`text-${Ay[t].icon}`;return D.jsx(i,{className:We(r,s)})},Xk=({id:e,title:t,message:r,icon:i,type:s,color:a,zIndex:l=3e3,views:c,width:f=520,hasOverlay:m=!0,container:v,onClose:g,onEdit:p})=>{const b=w=>{g({id:e,reason:w})};W.useEffect(()=>{function w(h){h.key==="Escape"&&b(pi.CANCELED)}return window.addEventListener("keyup",w),()=>{window.removeEventListener("keyup",w)}},[]);const x=rt.merge(rt.values(c==null?void 0:c.toggles).flatMap(w=>w.value?w.warnings||[]:[]),c==null?void 0:c.tips),d=(w,h)=>{var E;if(!(c!=null&&c.toggles))return;const S=rt.cloneDeep(c);(E=S.toggles)!=null&&E[w]&&(S.toggles[w].value=h),p({id:e,views:S})};return Fo.createPortal(D.jsx(ba,{appear:!0,show:!0,as:W.Fragment,children:D.jsx("div",{className:We("absolute inset-0 flex h-full w-full items-center justify-center overflow-y-auto",{"bg-black bg-opacity-80":m}),style:{zIndex:l},onClick:()=>b(pi.CANCELED),children:D.jsx(ba.Child,{as:W.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsx("div",{"data-cy":"confirmation-modal-cy",className:"relative rounded-md border border-grey-50 bg-grey-900",style:{width:f},onClick:w=>w.stopPropagation(),children:D.jsxs("div",{className:"flex flex-col items-center gap-3 p-6 px-12",children:[i?D.jsx("div",{className:"flex items-center justify-center",children:D.jsx(Vk,{name:i,color:a,className:"w-6 h-6"})}):null,D.jsx(Yk,{condition:t,children:D.jsx("h4",{className:"w-full text-wrap text-lg font-bold leading-6 text-white text-center",children:t})}),D.jsx("p",{className:"w-full text-wrap text-center text-sm font-medium text-white",children:r}),D.jsx("div",{className:"text-xs text-white",children:rt.values(c==null?void 0:c.toggles).map(w=>D.jsx("div",{children:D.jsxs("label",{htmlFor:w.key,className:"flex items-center",children:[D.jsx(fy,{size:"xs",value:w.value,onChange:h=>d(w.key,h)}),D.jsx("span",{className:"ml-1",children:w.title})]})},w.key))}),D.jsx(Jk,{warnings:x}),D.jsx("div",{className:"flex items-center gap-4",children:s===df.CONFIRM?D.jsxs(D.Fragment,{children:[D.jsx(Gl,{autoFocus:!0,color:a,onClick:()=>b(pi.CONFIRMED),children:"Confirm"}),D.jsx(Gl,{color:a,variant:"outlined",onClick:()=>b(pi.CANCELED),children:"Cancel"})]}):D.jsx(Gl,{autoFocus:!0,onClick:()=>b(),children:"OK"})})]})})})})}),v||document.body)},Yk=e=>e.condition?D.jsx(D.Fragment,{children:e.children}):null,Jk=e=>e.warnings?D.jsx(ba,{appear:!0,show:!!e.warnings.length,as:W.Fragment,children:D.jsx("div",{className:"flex flex-col gap-1 rounded-sm bg-grey-600 p-2 text-xs text-white",children:e.warnings.map((t,r)=>D.jsx(ba.Child,{as:W.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:D.jsxs("div",{className:"flex flex-1 items-center gap-1 rounded-sm px-2 py-1",children:[D.jsx(tt.FdWarningDanger,{className:We({"h-3 w-3":!0,"text-yellow-500":t.type==="warning","text-red-400":t.type==="error","text-primary-dark":t.type==="info"},"mr-3")}),D.jsx("div",{className:"flex-1",children:t.message})]})},`modal-warnings-${r}`))})}):null;var Ty=(e=>(e[e.MIN=.5]="MIN",e[e.MAX=10]="MAX",e[e.STEP=.5]="STEP",e[e.INIT=1]="INIT",e[e.TRANSITION=200]="TRANSITION",e))(Ty||{});const Qk=({zoom:e,minZoom:t=.5,maxZoom:r=10,handleZoomIn:i,handleZoomOut:s})=>D.jsxs("div",{className:"flex items-center rounded bg-grey-300 p-1",children:[D.jsx(tt.FdMinusNaked,{onClick:s,className:We("h-5 w-5 p-1",{"text-grey-200":e<=t,"cursor-pointer rounded hover:bg-purple-800":e>t})}),D.jsxs("span",{className:"mx-1 w-10 select-none text-center text-xs",children:[(e*100).toFixed(0),"%"]}),D.jsx(tt.FdPlusNaked,{onClick:i,className:We("h-5 w-5 p-1",{"text-grey-200":e>=r,"cursor-pointer rounded hover:bg-purple-800":e<r})})]}),e$=$.forwardRef(((e,t)=>$.createElement(yn.span,Ve({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),t$=e$;function fv(e){const t=$.useRef({value:e,previous:e});return $.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}const[Ry]=Zc("Tooltip",[Fa]),pf=Fa(),r$=700,[oM,n$]=Ry("TooltipProvider",{isOpenDelayed:!0,delayDuration:r$,onOpen:()=>{},onClose:()=>{}}),[i$,Ba]=Ry("Tooltip"),o$=e=>{const{__scopeTooltip:t,children:r,open:i,defaultOpen:s=!1,onOpenChange:a,delayDuration:l}=e,c=n$("Tooltip",t),f=pf(t),[m,v]=$.useState(null),g=Rm(),p=$.useRef(0),b=l??c.delayDuration,x=$.useRef(!1),{onOpen:d,onClose:w}=c,[h=!1,S]=zm({prop:i,defaultProp:s,onChange:k=>{k&&(document.dispatchEvent(new CustomEvent("tooltip.open")),d()),a==null||a(k)}}),E=$.useMemo((()=>h?x.current?"delayed-open":"instant-open":"closed"),[h]),R=$.useCallback((()=>{window.clearTimeout(p.current),x.current=!1,S(!0)}),[S]),O=$.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{x.current=!0,S(!0)}),b)}),[b,S]);return $.useEffect((()=>()=>window.clearTimeout(p.current)),[]),$.createElement(Dm,f,$.createElement(i$,{scope:t,contentId:g,open:h,stateAttribute:E,trigger:m,onTriggerChange:v,onTriggerEnter:$.useCallback((()=>{c.isOpenDelayed?O():R()}),[c.isOpenDelayed,O,R]),onOpen:$.useCallback(R,[R]),onClose:$.useCallback((()=>{window.clearTimeout(p.current),S(!1),w()}),[S,w])},r))},s$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,...i}=e,s=Ba("TooltipTrigger",r),a=pf(r),l=mn(t,s.onTriggerChange),c=$.useRef(!1),f=$.useCallback((()=>c.current=!1),[]);return $.useEffect((()=>()=>document.removeEventListener("mouseup",f)),[f]),$.createElement(Nm,Ve({asChild:!0},a),$.createElement(yn.button,Ve({"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute},i,{ref:l,onMouseEnter:Ut(e.onMouseEnter,s.onTriggerEnter),onMouseLeave:Ut(e.onMouseLeave,s.onClose),onMouseDown:Ut(e.onMouseDown,(()=>{s.onClose(),c.current=!0,document.addEventListener("mouseup",f,{once:!0})})),onFocus:Ut(e.onFocus,(()=>{c.current||s.onOpen()})),onBlur:Ut(e.onBlur,s.onClose),onClick:Ut(e.onClick,(m=>{m.detail===0&&s.onClose()}))})))})),a$=$.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=Ba("TooltipContent",e.__scopeTooltip);return $.createElement(Hc,{present:r||s.open},$.createElement(u$,Ve({ref:t},i)))})),u$=$.forwardRef(((e,t)=>{const{__scopeTooltip:r,children:i,"aria-label":s,portalled:a=!0,...l}=e,c=Ba("TooltipContent",r),f=pf(r),m=a?qc:$.Fragment,{onClose:v}=c;return $m((()=>v())),$.useEffect((()=>(document.addEventListener("tooltip.open",v),()=>document.removeEventListener("tooltip.open",v))),[v]),$.createElement(m,null,$.createElement(l$,{__scopeTooltip:r}),$.createElement(jm,Ve({"data-state":c.stateAttribute},f,l,{ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),$.createElement(km,null,i),$.createElement(t$,{id:c.contentId,role:"tooltip"},s||i)))}));function l$(e){const{__scopeTooltip:t}=e,r=Ba("CheckTriggerMoved",t),i=Lm(r.trigger),s=i==null?void 0:i.left,a=fv(s),l=i==null?void 0:i.top,c=fv(l),f=r.onClose;return $.useEffect((()=>{(a!==void 0&&a!==s||c!==void 0&&c!==l)&&f()}),[f,a,c,s,l]),null}const c$=o$,f$=s$,d$=a$;function p$(e){return D.jsxs(c$,{delayDuration:e.delayDuration,open:e.open,children:[D.jsx(f$,{tabIndex:-1,asChild:!0,children:D.jsx("span",{children:e.children})}),D.jsxs(d$,{side:e.side,sideOffset:e.sideOffset,alignOffset:e.alignOffset,children:[typeof e.message=="string"&&D.jsx("p",{className:"max-w-[240px] rounded-md bg-primary-light px-1 py-2 text-s font-semibold text-primary-dark",children:e.message}),typeof e.message!="string"&&e.message]})]})}const In=30,fa=500,h$=()=>D.jsx("div",{className:"h-2 w-full bg-opacity-40 hover:bg-primary-hover"}),g$=e=>{const[t,r]=W.useState(In),i=W.useRef(),s=t>In,a=W.useRef(null);return W.useEffect(()=>{e.isOpen&&!s&&r(fa),!e.isOpen&&s&&r(In)},[e.isOpen]),D.jsxs("div",{className:"relative w-full select-none isolate",style:{zIndex:49},children:[D.jsx(gO.Resizable,{enable:{top:!0,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},className:"w-full select-none border-t border-grey-900 bg-grey-800",size:{height:t,width:"100%"},maxHeight:700,minHeight:In,onResizeStart:()=>{i.current&&Date.now()-i.current<200?r(s?In:fa):i.current=Date.now()},onResize:(l,c,f)=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{var m;(m=e.onResize)==null||m.call(e),a.current=null})},onResizeStop:(l,c,f,m)=>{r(t+m.height)},handleComponent:{top:D.jsx(h$,{})}}),D.jsxs("div",{"data-cy":"contextualPanel",className:"absolute inset-0 flex flex-col overflow-hidden",id:`__cp-${rt.kebabCase(e.path)}`,children:[D.jsxs("div",{className:We("flex justify-between items-center px-3 py-0.5",{"flex-1":!s}),children:[D.jsxs("div",{className:"group flex items-center justify-start",children:[D.jsx("span",{className:"mr-2 text-sm text-fd-gray-lighter",children:"Contextual panel"}),D.jsx("span",{}),e.tipKey?D.jsx(Qm,{tipKey:e.tipKey,alwaysOn:!0,asButton:!0}):null,D.jsx("button",{className:"rounded p-1 text-white hover:bg-primary-hover focus:outline-none",onClick:()=>{s?(r(In),e.onClose()):(r(fa),e.onOpen())},children:s?D.jsx(tt.FdDoubleArrowDown,{className:"h-4 w-4 text-white"}):D.jsx(tt.FdDoubleArrowUp,{className:"h-4 w-4 text-white"})})]}),e.headerRightSide]}),D.jsxs(aa,{of:s,children:[D.jsx(aa,{of:e.render,children:e.render}),D.jsx(aa,{of:!e.render,children:e.children})]})]})]})};function Py({children:e,viewBox:t="0 0 24 24",...r}){return D.jsx("svg",{viewBox:t,width:"1em",height:"1em",fill:"none",className:"base-icon",...r,children:e})}function Cy(e){const t=e.isIndeterminate?"M2 12h20":"M4 11.5L9 17L20 6";return D.jsx(Py,{viewBox:"0 0 24 24",...e,children:D.jsx("path",{fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",d:t})})}function v$({isChecked:e,isIndeterminate:t,isInvalid:r,icon:i,label:s,className:a="",style:l,...c}){const f=W.useRef(null),m=i||D.jsx(Cy,{}),v=c.checked??e;W.useEffect(()=>{f.current&&(f.current.indeterminate=!!t)},[t]);const g=v||t,p=["base-checkbox-container",a].join(" ");return D.jsxs("label",{className:p,style:l,"data-invalid":r,children:[D.jsx("input",{ref:f,type:"checkbox",className:"base-checkbox-input",checked:v,...c,"aria-invalid":r||void 0}),D.jsx("span",{className:"base-checkbox-control",children:g&&m&&W.cloneElement(m,{isChecked:v,isIndeterminate:t,className:"base-checkbox-icon"})}),s&&D.jsx("span",{className:"base-checkbox-label",children:s})]})}function m$(e,t){const r=W.useRef(!1);W.useEffect(()=>{if(r.current)return e();r.current=!0},t)}const Kl=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Vl(e,t,r,i){e.addEventListener?e.addEventListener(t,r,i):e.attachEvent&&e.attachEvent("on".concat(t),r)}function fo(e,t,r,i){e.removeEventListener?e.removeEventListener(t,r,i):e.detachEvent&&e.detachEvent("on".concat(t),r)}function ky(e,t){const r=t.slice(0,t.length-1);for(let i=0;i<r.length;i++)r[i]=e[r[i].toLowerCase()];return r}function $y(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let r=t.lastIndexOf("");for(;r>=0;)t[r-1]+=",",t.splice(r,1),r=t.lastIndexOf("");return t}function y$(e,t){const r=e.length>=t.length?e:t,i=e.length>=t.length?t:e;let s=!0;for(let a=0;a<r.length;a++)i.indexOf(r[a])===-1&&(s=!1);return s}const Ro={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Kl?173:189,"=":Kl?61:187,";":Kl?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},gr={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},vo={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},gt={16:!1,18:!1,17:!1,91:!1},Ke={};for(let e=1;e<20;e++)Ro["f".concat(e)]=111+e;let qe=[],_o=null,Iy="all";const Ur=new Map,_i=e=>Ro[e.toLowerCase()]||gr[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),b$=e=>Object.keys(Ro).find(t=>Ro[t]===e),w$=e=>Object.keys(gr).find(t=>gr[t]===e);function Ly(e){Iy=e||"all"}function Po(){return Iy||"all"}function x$(){return qe.slice(0)}function S$(){return qe.map(e=>b$(e)||w$(e)||String.fromCharCode(e))}function E$(){const e=[];return Object.keys(Ke).forEach(t=>{Ke[t].forEach(r=>{let{key:i,scope:s,mods:a,shortcut:l}=r;e.push({scope:s,shortcut:l,mods:a,keys:i.split("+").map(c=>_i(c))})})}),e}function _$(e){const t=e.target||e.srcElement,{tagName:r}=t;let i=!0;const s=r==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(s||r==="TEXTAREA"||r==="SELECT")&&!t.readOnly)&&(i=!1),i}function O$(e){return typeof e=="string"&&(e=_i(e)),qe.indexOf(e)!==-1}function A$(e,t){let r,i;e||(e=Po());for(const s in Ke)if(Object.prototype.hasOwnProperty.call(Ke,s))for(r=Ke[s],i=0;i<r.length;)r[i].scope===e?r.splice(i,1).forEach(l=>{let{element:c}=l;return hf(c)}):i++;Po()===e&&Ly(t||"all")}function T$(e){let t=e.keyCode||e.which||e.charCode;e.key&&e.key.toLowerCase()==="capslock"&&(t=_i(e.key));const r=qe.indexOf(t);if(r>=0&&qe.splice(r,1),e.key&&e.key.toLowerCase()==="meta"&&qe.splice(0,qe.length),(t===93||t===224)&&(t=91),t in gt){gt[t]=!1;for(const i in gr)gr[i]===t&&(hr[i]=!1)}}function My(e){if(typeof e>"u")Object.keys(Ke).forEach(s=>{Array.isArray(Ke[s])&&Ke[s].forEach(a=>Qs(a)),delete Ke[s]}),hf(null);else if(Array.isArray(e))e.forEach(s=>{s.key&&Qs(s)});else if(typeof e=="object")e.key&&Qs(e);else if(typeof e=="string"){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];let[s,a]=r;typeof s=="function"&&(a=s,s=""),Qs({key:e,scope:s,method:a,splitKey:"+"})}}const Qs=e=>{let{key:t,scope:r,method:i,splitKey:s="+"}=e;$y(t).forEach(l=>{const c=l.split(s),f=c.length,m=c[f-1],v=m==="*"?"*":_i(m);if(!Ke[v])return;r||(r=Po());const g=f>1?ky(gr,c):[],p=[];Ke[v]=Ke[v].filter(b=>{const d=(i?b.method===i:!0)&&b.scope===r&&y$(b.mods,g);return d&&p.push(b.element),!d}),p.forEach(b=>hf(b))})};function dv(e,t,r,i){if(t.element!==i)return;let s;if(t.scope===r||t.scope==="all"){s=t.mods.length>0;for(const a in gt)Object.prototype.hasOwnProperty.call(gt,a)&&(!gt[a]&&t.mods.indexOf(+a)>-1||gt[a]&&t.mods.indexOf(+a)===-1)&&(s=!1);(t.mods.length===0&&!gt[16]&&!gt[18]&&!gt[17]&&!gt[91]||s||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(qe),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function pv(e,t){const r=Ke["*"];let i=e.keyCode||e.which||e.charCode;if(e.key&&e.key.toLowerCase()==="capslock"||!hr.filter.call(this,e))return;if((i===93||i===224)&&(i=91),qe.indexOf(i)===-1&&i!==229&&qe.push(i),["metaKey","ctrlKey","altKey","shiftKey"].forEach(c=>{const f=vo[c];e[c]&&qe.indexOf(f)===-1?qe.push(f):!e[c]&&qe.indexOf(f)>-1?qe.splice(qe.indexOf(f),1):c==="metaKey"&&e[c]&&(qe=qe.filter(m=>m in vo||m===i))}),i in gt){gt[i]=!0;for(const c in gr)if(Object.prototype.hasOwnProperty.call(gr,c)){const f=vo[gr[c]];hr[c]=e[f]}if(!r)return}for(const c in gt)Object.prototype.hasOwnProperty.call(gt,c)&&(gt[c]=e[vo[c]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(qe.indexOf(17)===-1&&qe.push(17),qe.indexOf(18)===-1&&qe.push(18),gt[17]=!0,gt[18]=!0);const s=Po();if(r)for(let c=0;c<r.length;c++)r[c].scope===s&&(e.type==="keydown"&&r[c].keydown||e.type==="keyup"&&r[c].keyup)&&dv(e,r[c],s,t);if(!(i in Ke))return;const a=Ke[i],l=a.length;for(let c=0;c<l;c++)if((e.type==="keydown"&&a[c].keydown||e.type==="keyup"&&a[c].keyup)&&a[c].key){const f=a[c],{splitKey:m}=f,v=f.key.split(m),g=[];for(let p=0;p<v.length;p++)g.push(_i(v[p]));g.sort().join("")===qe.sort().join("")&&dv(e,f,s,t)}}function hr(e,t,r){qe=[];const i=$y(e);let s=[],a="all",l=document,c=0,f=!1,m=!0,v="+",g=!1,p=!1;for(r===void 0&&typeof t=="function"&&(r=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(a=t.scope),t.element&&(l=t.element),t.keyup&&(f=t.keyup),t.keydown!==void 0&&(m=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(v=t.splitKey),t.single===!0&&(p=!0)),typeof t=="string"&&(a=t),p&&My(e,a);c<i.length;c++)e=i[c].split(v),s=[],e.length>1&&(s=ky(gr,e)),e=e[e.length-1],e=e==="*"?"*":_i(e),e in Ke||(Ke[e]=[]),Ke[e].push({keyup:f,keydown:m,scope:a,mods:s,shortcut:i[c],method:r,key:i[c],splitKey:v,element:l});if(typeof l<"u"&&window){if(!Ur.has(l)){const b=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return pv(d,l)},x=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;pv(d,l),T$(d)};Ur.set(l,{keydownListener:b,keyupListenr:x,capture:g}),Vl(l,"keydown",b,g),Vl(l,"keyup",x,g)}if(!_o){const b=()=>{qe=[]};_o={listener:b,capture:g},Vl(window,"focus",b,g)}}}function R$(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Ke).forEach(r=>{Ke[r].filter(s=>s.scope===t&&s.shortcut===e).forEach(s=>{s&&s.method&&s.method()})})}function hf(e){const t=Object.values(Ke).flat();if(t.findIndex(i=>{let{element:s}=i;return s===e})<0){const{keydownListener:i,keyupListenr:s,capture:a}=Ur.get(e)||{};i&&s&&(fo(e,"keyup",s,a),fo(e,"keydown",i,a),Ur.delete(e))}if((t.length<=0||Ur.size<=0)&&(Object.keys(Ur).forEach(s=>{const{keydownListener:a,keyupListenr:l,capture:c}=Ur.get(s)||{};a&&l&&(fo(s,"keyup",l,c),fo(s,"keydown",a,c),Ur.delete(s))}),Ur.clear(),Object.keys(Ke).forEach(s=>delete Ke[s]),_o)){const{listener:s,capture:a}=_o;fo(window,"focus",s,a),_o=null}}const Xl={getPressedKeyString:S$,setScope:Ly,getScope:Po,deleteScope:A$,getPressedKeyCodes:x$,getAllKeyCodes:E$,isPressed:O$,filter:_$,trigger:R$,unbind:My,keyMap:Ro,modifier:gr,modifierMap:vo};for(const e in Xl)Object.prototype.hasOwnProperty.call(Xl,e)&&(hr[e]=Xl[e]);if(typeof window<"u"){const e=window.hotkeys;hr.noConflict=t=>(t&&window.hotkeys===hr&&(window.hotkeys=e),hr),window.hotkeys=hr}hr.filter=()=>!0;function P$(e,t,r,i){r instanceof Array&&(i=r,r=void 0),i=i||[],r=r||{};const{preventDefault:s=!0}=r,a=W.useCallback((c,f)=>{s&&c.preventDefault(),setTimeout(()=>t(c,f))},i),l=()=>{hr.unbind(e,a)};W.useEffect(()=>(hr(e,r,a),l),[e,r,a])}const C$=e=>{const t=W.useRef(null);return W.useEffect(()=>{const r=i=>{t.current&&!t.current.contains(i.target)&&e(i)};return document.addEventListener("click",r,!0),()=>{document.removeEventListener("click",r,!0)}},[e]),t};function k$(e){const t=W.useRef();return W.useEffect(()=>{t.current=e},[e]),t.current}function $$(e){const t=W.useRef(e);return W.useEffect(()=>{t.current=e},[e]),t}function I$(e){const t=W.useRef(null);return W.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t}function L$(e){const[t,r]=W.useState(e),i=(a,l)=>{r(c=>({...c,features:{...c.features,[a]:{enabled:l}}}))},s=W.useCallback((...a)=>a.every(l=>{var c;return(c=t.features[l])==null?void 0:c.enabled}),[t.features]);return{setFeature:i,isFeatureEnabled:s}}const Fy=W.createContext(""),M$=e=>D.jsx(Fy.Provider,{value:e.value,children:e.children}),F$=()=>{const e=W.useContext(Fy);if(typeof e!="string")throw new Error("Error while calling useIdentity! Context has incorrect type (expected string)");return e};function D$(e){const[t,r]=W.useState(e),i=W.useMemo(()=>N$(t,r),[]);return{state:t,actions:{...i,set:s=>{r(typeof s=="function"?s:a=>({...a,...s}))}}}}function N$(e,t=()=>{}){return Object.keys(e).reduce((i,s)=>({...i,[`set${rt.upperFirst(s)}`]:a=>t(l=>({...l,[s]:a}))}),{})}const j$=(e,t,r={})=>{r={timeout:200,...r};const i=W.useRef(),s=()=>{i.current&&(clearTimeout(i.current),i.current=null)};return W.useCallback((a,...l)=>{s(),t&&a.detail===1&&(i.current=setTimeout(()=>{t(a,...l)},r.timeout)),a.detail%2===0&&e(a,...l)},[t,e,r.timeout])};function vt(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];if(process.env.NODE_ENV!=="production"){var s=Z$[e],a=s?typeof s=="function"?s.apply(null,r):s:"unknown error nr: "+e;throw Error("[Immer] "+a)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(l){return"'"+l+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Si(e){return!!e&&!!e[qt]}function Hn(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var i=Object.getPrototypeOf(r);if(i===null)return!0;var s=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===G$})(e)||Array.isArray(e)||!!e[xv]||!!(!((t=e.constructor)===null||t===void 0)&&t[xv])||gf(e)||vf(e))}function Co(e,t,r){r===void 0&&(r=!1),Oi(e)===0?(r?Object.keys:wf)(e).forEach((function(i){r&&typeof i=="symbol"||t(i,e[i],e)})):e.forEach((function(i,s){return t(s,i,e)}))}function Oi(e){var t=e[qt];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:gf(e)?2:vf(e)?3:0}function Ec(e,t){return Oi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function z$(e,t){return Oi(e)===2?e.get(t):e[t]}function Dy(e,t,r){var i=Oi(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function W$(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function gf(e){return H$&&e instanceof Map}function vf(e){return q$&&e instanceof Set}function Ln(e){return e.o||e.t}function mf(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=K$(e);delete t[qt];for(var r=wf(t),i=0;i<r.length;i++){var s=r[i],a=t[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(Object.getPrototypeOf(e),t)}function ko(e,t){return t===void 0&&(t=!1),yf(e)||Si(e)||!Hn(e)||(Oi(e)>1&&(e.set=e.add=e.clear=e.delete=B$),Object.freeze(e),t&&Co(e,(function(r,i){return ko(i,!0)}),!0)),e}function B$(){vt(2)}function yf(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Rr(e){var t=V$[e];return t||vt(18,e),t}function hv(){return process.env.NODE_ENV==="production"||Ei||vt(0),Ei}function Yl(e,t){t&&(Rr("Patches"),e.u=[],e.s=[],e.v=t)}function Ea(e){_c(e),e.p.forEach(U$),e.p=null}function _c(e){e===Ei&&(Ei=e.l)}function gv(e){return Ei={p:[],l:Ei,h:e,m:!0,_:0}}function U$(e){var t=e[qt];t.i===0||t.i===1?t.j():t.g=!0}function Jl(e,t){t._=t.p.length;var r=t.p[0],i=e!==void 0&&e!==r;return t.h.O||Rr("ES5").S(t,e,i),i?(r[qt].P&&(Ea(t),vt(4)),Hn(e)&&(e=_a(t,e),t.l||Oa(t,e)),t.u&&Rr("Patches").M(r[qt].t,e,t.u,t.s)):e=_a(t,r,[]),Ea(t),t.u&&t.v(t.u,t.s),e!==jy?e:void 0}function _a(e,t,r){if(yf(t))return t;var i=t[qt];if(!i)return Co(t,(function(c,f){return vv(e,i,t,c,f,r)}),!0),t;if(i.A!==e)return t;if(!i.P)return Oa(e,i.t,!0),i.t;if(!i.I){i.I=!0,i.A._--;var s=i.i===4||i.i===5?i.o=mf(i.k):i.o,a=s,l=!1;i.i===3&&(a=new Set(s),s.clear(),l=!0),Co(a,(function(c,f){return vv(e,i,s,c,f,r,l)})),Oa(e,s,!1),r&&e.u&&Rr("Patches").N(i,r,e.u,e.s)}return i.o}function vv(e,t,r,i,s,a,l){if(process.env.NODE_ENV!=="production"&&s===r&&vt(5),Si(s)){var c=_a(e,s,a&&t&&t.i!==3&&!Ec(t.R,i)?a.concat(i):void 0);if(Dy(r,i,c),!Si(c))return;e.m=!1}else l&&r.add(s);if(Hn(s)&&!yf(s)){if(!e.h.D&&e._<1)return;_a(e,s),t&&t.A.l||Oa(e,s)}}function Oa(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&ko(t,r)}function Ql(e,t){var r=e[qt];return(r?Ln(r):e)[t]}function mv(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Object.getPrototypeOf(r)}}function Oc(e){e.P||(e.P=!0,e.l&&Oc(e.l))}function ec(e){e.o||(e.o=mf(e.t))}function Ac(e,t,r){var i=gf(t)?Rr("MapSet").F(t,r):vf(t)?Rr("MapSet").T(t,r):e.O?(function(s,a){var l=Array.isArray(s),c={i:l?1:0,A:a?a.A:hv(),P:!1,I:!1,R:{},l:a,t:s,k:null,o:null,j:null,C:!1},f=c,m=Tc;l&&(f=[c],m=mo);var v=Proxy.revocable(f,m),g=v.revoke,p=v.proxy;return c.k=p,c.j=g,p})(t,r):Rr("ES5").J(t,r);return(r?r.A:hv()).p.push(i),i}function Ny(e){return Si(e)||vt(22,e),(function t(r){if(!Hn(r))return r;var i,s=r[qt],a=Oi(r);if(s){if(!s.P&&(s.i<4||!Rr("ES5").K(s)))return s.t;s.I=!0,i=yv(r,a),s.I=!1}else i=yv(r,a);return Co(i,(function(l,c){s&&z$(s.t,l)===c||Dy(i,l,t(c))})),a===3?new Set(i):i})(e)}function yv(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return mf(e)}var bv,Ei,bf=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",H$=typeof Map<"u",q$=typeof Set<"u",wv=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",jy=bf?Symbol.for("immer-nothing"):((bv={})["immer-nothing"]=!0,bv),xv=bf?Symbol.for("immer-draftable"):"__$immer_draftable",qt=bf?Symbol.for("immer-state"):"__$immer_state",Z$={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},G$=""+Object.prototype.constructor,wf=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,K$=Object.getOwnPropertyDescriptors||function(e){var t={};return wf(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},V$={},Tc={get:function(e,t){if(t===qt)return e;var r=Ln(e);if(!Ec(r,t))return(function(s,a,l){var c,f=mv(a,l);return f?"value"in f?f.value:(c=f.get)===null||c===void 0?void 0:c.call(s.k):void 0})(e,r,t);var i=r[t];return e.I||!Hn(i)?i:i===Ql(e.t,t)?(ec(e),e.o[t]=Ac(e.A.h,i,e)):i},has:function(e,t){return t in Ln(e)},ownKeys:function(e){return Reflect.ownKeys(Ln(e))},set:function(e,t,r){var i=mv(Ln(e),t);if(i!=null&&i.set)return i.set.call(e.k,r),!0;if(!e.P){var s=Ql(Ln(e),t),a=s==null?void 0:s[qt];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(W$(r,s)&&(r!==void 0||Ec(e.t,t)))return!0;ec(e),Oc(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ql(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,ec(e),Oc(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Ln(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty:function(){vt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){vt(12)}},mo={};Co(Tc,(function(e,t){mo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),mo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&vt(13),mo.set.call(this,e,t,void 0)},mo.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&vt(14),Tc.set.call(this,e[0],t,r,e[0])};var X$=(function(){function e(r){var i=this;this.O=wv,this.D=!0,this.produce=function(s,a,l){if(typeof s=="function"&&typeof a!="function"){var c=a;a=s;var f=i;return function(d){var w=this;d===void 0&&(d=c);for(var h=arguments.length,S=Array(h>1?h-1:0),E=1;E<h;E++)S[E-1]=arguments[E];return f.produce(d,(function(R){var O;return(O=a).call.apply(O,[w,R].concat(S))}))}}var m;if(typeof a!="function"&&vt(6),l!==void 0&&typeof l!="function"&&vt(7),Hn(s)){var v=gv(i),g=Ac(i,s,void 0),p=!0;try{m=a(g),p=!1}finally{p?Ea(v):_c(v)}return typeof Promise<"u"&&m instanceof Promise?m.then((function(d){return Yl(v,l),Jl(d,v)}),(function(d){throw Ea(v),d})):(Yl(v,l),Jl(m,v))}if(!s||typeof s!="object"){if((m=a(s))===void 0&&(m=s),m===jy&&(m=void 0),i.D&&ko(m,!0),l){var b=[],x=[];Rr("Patches").M(s,m,b,x),l(b,x)}return m}vt(21,s)},this.produceWithPatches=function(s,a){if(typeof s=="function")return function(m){for(var v=arguments.length,g=Array(v>1?v-1:0),p=1;p<v;p++)g[p-1]=arguments[p];return i.produceWithPatches(m,(function(b){return s.apply(void 0,[b].concat(g))}))};var l,c,f=i.produce(s,a,(function(m,v){l=m,c=v}));return typeof Promise<"u"&&f instanceof Promise?f.then((function(m){return[m,l,c]})):[f,l,c]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Hn(r)||vt(8),Si(r)&&(r=Ny(r));var i=gv(this),s=Ac(this,r,void 0);return s[qt].C=!0,_c(i),s},t.finishDraft=function(r,i){var s=r&&r[qt];process.env.NODE_ENV!=="production"&&(s&&s.C||vt(9),s.I&&vt(10));var a=s.A;return Yl(a,i),Jl(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!wv&&vt(20),this.O=r},t.applyPatches=function(r,i){var s;for(s=i.length-1;s>=0;s--){var a=i[s];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}s>-1&&(i=i.slice(s+1));var l=Rr("Patches").$;return Si(r)?l(r,i):this.produce(r,(function(c){return l(c,i)}))},e})(),Zt=new X$,Y$=Zt.produce;Zt.produceWithPatches.bind(Zt);Zt.setAutoFreeze.bind(Zt);Zt.setUseProxies.bind(Zt);Zt.applyPatches.bind(Zt);Zt.createDraft.bind(Zt);Zt.finishDraft.bind(Zt);function J$(e){var t=W.useState(function(){return ko(typeof e=="function"?e():e,!0)}),r=t[1];return[t[0],W.useCallback(function(i){r(typeof i=="function"?Y$(i):ko(i))},[])]}const Q$=process.env.NODE_ENV==="development",tc=Q$&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:null,eI=(e,t,r)=>{const[i,s]=J$(e),a=W.useRef(null);W.useEffect(()=>{var f;return r&&(a.current=tc==null?void 0:tc.connect({name:r,trace:!0}),(f=a.current)==null||f.init(e)),()=>{var m,v;(v=(m=a.current)==null?void 0:m.disconnect)==null||v.call(m)}},[]);const l=t&&typeof t=="object"?t:{},c=W.useMemo(()=>Object.keys(l).reduce((f,m)=>({...f,[m]:v=>(s(g=>{var p;l[m](g,v),(p=a.current)==null||p.send({type:l[m].name},Ny(g))}),c)}),{}),[s]);return{state:i,dispatch:c}};function Zr(e){return typeof e=="function"}function zy(e){var t=function(i){Error.call(i),i.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var rc=zy(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
202
202
|
`+r.map(function(i,s){return s+1+") "+i.toString()}).join(`
|
|
203
203
|
`):"",this.name="UnsubscriptionError",this.errors=r}});function Rc(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ua=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,i,s,a;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var c=cc(l),f=c.next();!f.done;f=c.next()){var m=f.value;m.remove(this)}}catch(d){t={error:d}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}else l.remove(this);var v=this.initialTeardown;if(Zr(v))try{v()}catch(d){a=d instanceof rc?d.errors:[d]}var g=this._finalizers;if(g){this._finalizers=null;try{for(var p=cc(g),b=p.next();!b.done;b=p.next()){var x=b.value;try{Sv(x)}catch(d){a=a??[],d instanceof rc?a=ma(ma([],fc(a)),fc(d.errors)):a.push(d)}}}catch(d){i={error:d}}finally{try{b&&!b.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}}if(a)throw new rc(a)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Sv(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Rc(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Rc(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Wy=Ua.EMPTY;function By(e){return e instanceof Ua||e&&"closed"in e&&Zr(e.remove)&&Zr(e.add)&&Zr(e.unsubscribe)}function Sv(e){Zr(e)?e():e.unsubscribe()}var tI={Promise:void 0},rI={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return setTimeout.apply(void 0,ma([e,t],fc(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function nI(e){rI.setTimeout(function(){throw e})}function Ev(){}function da(e){e()}var Uy=(function(e){La(t,e);function t(r){var i=e.call(this)||this;return i.isStopped=!1,r?(i.destination=r,By(r)&&r.add(i)):i.destination=sI,i}return t.create=function(r,i,s){return new Pc(r,i,s)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Ua),iI=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(i){ea(i)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(i){ea(i)}else ea(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){ea(r)}},e})(),Pc=(function(e){La(t,e);function t(r,i,s){var a=e.call(this)||this,l;return Zr(r)||!r?l={next:r??void 0,error:i??void 0,complete:s??void 0}:l=r,a.destination=new iI(l),a}return t})(Uy);function ea(e){nI(e)}function oI(e){throw e}var sI={closed:!0,next:Ev,error:oI,complete:Ev},aI=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function uI(e){return e}function lI(e){return e.length===0?uI:e.length===1?e[0]:function(r){return e.reduce(function(i,s){return s(i)},r)}}var _v=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,i){var s=this,a=fI(t)?t:new Pc(t,r,i);return da(function(){var l=s,c=l.operator,f=l.source;a.add(c?c.call(a,f):f?s._subscribe(a):s._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var i=this;return r=Ov(r),new r(function(s,a){var l=new Pc({next:function(c){try{t(c)}catch(f){a(f),l.unsubscribe()}},error:a,complete:s});i.subscribe(l)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[aI]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return lI(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Ov(t),new t(function(i,s){var a;r.subscribe(function(l){return a=l},function(l){return s(l)},function(){return i(a)})})},e.create=function(t){return new e(t)},e})();function Ov(e){var t;return(t=e??tI.Promise)!==null&&t!==void 0?t:Promise}function cI(e){return e&&Zr(e.next)&&Zr(e.error)&&Zr(e.complete)}function fI(e){return e&&e instanceof Uy||cI(e)&&By(e)}var dI=zy(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),kr=(function(e){La(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var i=new Av(this,this);return i.operator=r,i},t.prototype._throwIfClosed=function(){if(this.closed)throw new dI},t.prototype.next=function(r){var i=this;da(function(){var s,a;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var l=cc(i.currentObservers),c=l.next();!c.done;c=l.next()){var f=c.value;f.next(r)}}catch(m){s={error:m}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(s)throw s.error}}}})},t.prototype.error=function(r){var i=this;da(function(){if(i._throwIfClosed(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=r;for(var s=i.observers;s.length;)s.shift().error(r)}})},t.prototype.complete=function(){var r=this;da(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var i=r.observers;i.length;)i.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var i=this,s=this,a=s.hasError,l=s.isStopped,c=s.observers;return a||l?Wy:(this.currentObservers=null,c.push(r),new Ua(function(){i.currentObservers=null,Rc(c,r)}))},t.prototype._checkFinalizedStatuses=function(r){var i=this,s=i.hasError,a=i.thrownError,l=i.isStopped;s?r.error(a):l&&r.complete()},t.prototype.asObservable=function(){var r=new _v;return r.source=this,r},t.create=function(r,i){return new Av(r,i)},t})(_v),Av=(function(e){La(t,e);function t(r,i){var s=e.call(this)||this;return s.destination=r,s.source=i,s}return t.prototype.next=function(r){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.next)===null||s===void 0||s.call(i,r)},t.prototype.error=function(r){var i,s;(s=(i=this.destination)===null||i===void 0?void 0:i.error)===null||s===void 0||s.call(i,r)},t.prototype.complete=function(){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||i===void 0||i.call(r)},t.prototype._subscribe=function(r){var i,s;return(s=(i=this.source)===null||i===void 0?void 0:i.subscribe(r))!==null&&s!==void 0?s:Wy},t})(kr),Hy=(e=>(e.RELOAD="reload",e.RECOMPUTE="recompute",e))(Hy||{}),qy=(e=>(e.RENAME="rename",e.TYPE_CHANGE="type-change",e))(qy||{});const pI=new kr,hI=new kr,Zy=new kr;var Gy=(e=>(e.SAVE_ALL="save-all",e))(Gy||{});const gI=new kr;var Ky=(e=>(e.WILL_SAVE="will-save",e.DID_SAVE="did-save",e.WILL_CREATE="will-create",e.WILL_RENAME="will-rename",e.WILL_DELETE="will-delete",e.DID_CREATE="did-create",e.DID_RENAME="did-rename",e.DID_DELETE="did-delete",e.DIAGNOSTIC_REFRESH="diagnostic-refresh",e))(Ky||{});const vI=new kr;var Vy=(e=>(e.RESEND_BREAKPOINTS="resend-breakpoints",e))(Vy||{});const mI=new kr,yI=new kr;var $o=(e=>(e.EVENT_STARTED="event-started",e.EVENT_ENDED="event-ended",e.EVENT_EMITED="event-emited",e.REQUEST_SENT="request-sent",e))($o||{});const Aa=new kr,bI=new kr,xf=31;var Sf=(e=>(e.EMPTY="Please enter a valid name",e.LENGTH_EXCEEDED=`The name is too long, it should not exceed ${xf} characters`,e.SHOULD_START_WITH_LETTER="The name can only start with a letter or a Japanese character",e.INVALID="Invalid name",e))(Sf||{});function Xy(e){if(e==="")throw new Error("Please enter a valid name");if(e.length>xf)throw new Error(Sf.LENGTH_EXCEEDED);if(!/^[a-zA-Z\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF]/.test(e))throw new Error("The name can only start with a letter or a Japanese character");if(!/^[\w\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF-]+$/i.test(e))throw new Error("Invalid name");return!0}function wI(e){if(!e)return null;if(typeof e=="string")try{Xy(e)}catch(t){return t.message}}function xI(e,t){let r="";if(["array","object"].includes(t))try{const i=JSON.parse(e);t==="array"&&(!Array.isArray(i)||!rt.isObject(i))&&(r=`Invalid value for type ${t}`),t==="object"&&(!rt.isObject(i)||Array.isArray(i))&&(r=`Invalid value for type ${t}`)}catch{r=`Invalid value for type ${t}`}return t==="date"&&(new RegExp(/^(0?[1-9]|[12][0-9]|3[01])[/-](0?[1-9]|1[012])[/-]\d{4}$/).test(e)||(r=`Invalid value for type ${t}`)),t==="number"&&isNaN(+e)&&(r=`Invalid value for type ${t}`),["boolean","bool"].includes(t)&&typeof e!="boolean"&&!["true","false"].includes(e)&&(r=`Invalid value for type ${t}`),r}function SI(){return{PLACEHOLDER_PREFIX:`@!MASK_${Date.now().toString(36)+Math.random().toString(36).substring(2,8)}_`,counter:0}}function Ha(e){const{PLACEHOLDER_PREFIX:t,counter:r}=SI();let i=r;const s=[],a="@!",l=v=>(s.push(v),`${t}${i++}${a}`);let c=e.replace(/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,l);c=c.replace(/([\{\s]\s*\w+\s*)(:\s*\d+)/g,(v,g,p)=>g+l(p)),c=c.replace(/:\d{2}:\d{2}/g,l);const f=new RegExp(":(?!4D\\.\\w+)[CPK]?\\d+","g");let m=c.replace(f,"");for(let v=0;v<s.length;v++){const p=`${t}${v}${a}`.replace(/([.*+?^${}()|[\]\\])/g,"\\$1"),b=new RegExp(p,"g");m=m.replace(b,s[v])}return m}var Ef=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e.REPORTS="report",e))(Ef||{});const hn={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms",CLASSES_FOLDER:"ClassesFolder",REPORTS:"Reports",DEBUGGER:"Debugger"};var ft=(e=>(e.FOLDER="folder",e.WEBFORM="webform",e.REPORT="report",e.METHOD="method",e.CLASS="class",e.CLASS_FOLDER="classfolder",e.DEBUGGER="debugger",e.WELCOME="welcome",e.SETTINGS="settings",e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.DEBUGGERS="debugger",e.MODELS="models",e.ROLES="roles",e.HTTP_HANDLERS="http-handlers",e.LOCALIZATION="localization",e.MODEL="model",e.DATA_EXPLORER="dataexplorer",e.MOBILE="mobile",e.MOBILEFORM="mform",e.FILE="file",e.TEXT="text",e))(ft||{}),bn=(e=>(e.GET_FOLDER="getFolder",e.GET="get",e.SAVE="save",e.RENAME="rename",e.DROP="drop",e.ADD_FOLDER="addFolder",e.CREATE_FOLDER="mkdir",e.RENAME_FOLDER="renameFolder",e.DROP_FOLDER="dropFolder",e.REMOVE_ITEM="removeItem",e.MOVE_ITEM="moveItem",e.GET_INFO="getInfo",e.SAVE_CONTENT="save",e.UPDATE_CHECK="update:check",e.UPDATE_INSTALL="update:install",e.GET_APP_SETTINGS="getWebServerInfo",e.GET_FILE_CONTENT="getFileContent",e.SET_FILE_CONTENT="setFileContent",e.GET_FILES_INFO="getFilesInfo",e))(bn||{}),_f=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(_f||{});const Yy="roles.json",Jy="qodlyApp.json",EI="model.4DModel",Qy="HTTPHandlers.json",e0="Shared/i18n.json";function _I(e){const t=Of(e);switch(t){case ft.SETTINGS:return{filename:"Settings",type:t};case ft.HTTP_HANDLERS:return{filename:"HTTP Handlers",type:t};case ft.ROLES:return{filename:"Roles & Privileges",type:t};case ft.LOCALIZATION:return{filename:"Localization",type:t};case ft.MODEL:return{filename:"Model",type:t};default:{const r=e.split("/"),[i]=r[1].split(".");return{filename:i,type:t}}}}function Of(e){const t=e.split("."),r=t.pop(),i=t.join(".").split("/")[0];switch(!0){case r==="4DModel":return ft.MODEL;case r==="WebForm":return ft.WEBFORM;case(["4dm","4qs","4qm"].includes(r)&&i===hn.METHODS):return ft.METHOD;case(["4dm","4qs","4qm"].includes(r)&&i===hn.CLASSES):return ft.CLASS;case e===Yy:return ft.ROLES;case e===Qy:return ft.HTTP_HANDLERS;case e===Jy:return ft.SETTINGS;case e===e0:return ft.LOCALIZATION;default:return ft.TEXT}}function OI(e,t=!1){switch(e){case hn.REPORTS:case"report":return"QoDoc";case hn.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case hn.CLASSES:case hn.METHODS:return t?"4qs":"4dm";default:return""}}function AI(e,t=""){const r=new RegExp("(?<=\\/)(\\w+)(?=\\.)").exec(e);return r?r[1]:t}class t0{constructor(){this.current=Promise.resolve()}lock(){let t;const r=new Promise(s=>{t=s}),i=this.current.then(()=>t);return this.current=r,i}}function Af(){const e=new t0;return async t=>{const r=await e.lock();try{const i=await t();return r(),i}catch(i){console.error(i),r();return}}}const r0=rt.curry((e,t,r)=>e&&rt.get(r,e)===t),TI=rt.curry((e,t,r)=>rt.get(r,e)!==t),RI=rt.curry((e,t)=>rt.get(t,"id")!==e),PI=rt.curry((e,t)=>rt.get(t,"id")===e),CI=rt.curry((e,t)=>rt.get(t,"path")===e);function kI(e="id",t,r){return r.findIndex(r0(e,t))!==-1}function $I(e){if(!e)return"";const{id:t,namespace:r}=e;return r&&t?`${r}:${t}`:t}function n0(e){return["bool","word","string","text","uuid","short","long","number","long64","duration","object","date","image","blob"].includes(e.type||"")}function II(e){return e.type==="object"}function i0(e){var t;return e.kind==="relatedEntities"||((t=e.type)==null?void 0:t.includes("Selection"))||e.behavior==="relatedEntities"}function o0(e){return e.kind==="relatedEntity"||e.behavior==="relatedEntity"||!n0(e)}function LI(e){return i0(e)||o0(e)}function MI(e){return e.applyTo==="dataStore"}function FI(e){return e.applyTo==="dataClass"}function DI(e){return e.applyTo==="entity"}function NI(e){return e.applyTo==="entityCollection"}function jI(e){return e.type==="entity"}function zI(e){return e.type==="entitysel"}function s0(e){return e.dataType==="array"}function a0(e){return e.dataType==="object"}function u0(e){return e.type==="scalar"}function WI(e){return s0(e)||a0(e)||u0(e)}const BI=e=>e!=null&&e.type==="entity",UI=e=>e.type==="entitysel",HI=e=>e.type==="array"||e.type==="scalar"&&e.dataType==="array",qI=e=>e.type==="object"||e.type==="scalar"&&e.dataType==="object",ZI=e=>e.type==="scalar"&&e.dataType==="date";function GI(){return new Promise((e,t)=>{window.addEventListener("bundle:ready",r=>r.data?e():t(r.caughtErr))})}function KI(){return new Promise(e=>{window.addEventListener("i18n:ready",()=>e())})}var Io=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(Io||{}),l0=(e=>(e.soap="soap",e.web="web",e.sql="sql",e.rest="rest",e))(l0||{}),Tf=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(Tf||{});const VI={publishedSoap:"soap",publishedWeb:"web",publishedSql:"sql",publishedRest:"rest"};function XI(e){var a;let t={};try{const l=((a=e.match(/\/\/%attributes = (.*)/))==null?void 0:a[1])||"";t=JSON.parse(l)}catch{}const{published4DMobile:r,...i}=t;return{...{invisible:!1,shared:!1,executedOnServer:!1,preemptive:Io.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!r,publishedRestOptions:r||{table:"",scope:Tf.table}},...i}}function c0(e){const t={};return e.invisible&&(t.invisible=!0),e.shared&&(t.shared=!0),e.executedOnServer&&(t.executedOnServer=!0),e.preemptive&&[Io.capable,Io.incapable].includes(e.preemptive)&&(t.preemptive=e.preemptive),e.publishedSoap&&(t.publishedSoap=!0,e.publishedWsdl&&(t.publishedWsdl=!0)),e.publishedWeb&&(t.publishedWeb=!0),e.publishedSql&&(t.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(t.published4DMobile=e.publishedRestOptions),JSON.stringify(t).replace(/"(true|false)"/g,"$1")}function YI(e,t,r=!1){const i=rt.isString(t)?t:c0(t);if(!r&&f0(e))return e;const s=d0(e);return`//%attributes = ${i}\r
|
|
204
|
-
${s}`}function f0(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function d0(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const JI=()=>Bc.uuid().replaceAll("-","").toUpperCase(),it="/rest/$designer",Uo="/rest/$designer-ext";function
|
|
205
|
-
`}t.prototype.toString=function(d){return this.errors.map(r).join("")},Object.defineProperty(t.prototype,"valid",{get:function(){return!this.errors.length}}),ht.ValidatorResultError=i;function i(x){typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,i),this.instance=x.instance,this.schema=x.schema,this.options=x.options,this.errors=x.errors}i.prototype=new Error,i.prototype.constructor=i,i.prototype.name="Validation Error";var s=ht.SchemaError=function x(d,w){this.message=d,this.schema=w,Error.call(this,d),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,x)};s.prototype=Object.create(Error.prototype,{constructor:{value:s,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var a=ht.SchemaContext=function(d,w,h,S,E){this.schema=d,this.options=w,Array.isArray(h)?(this.path=h,this.propertyPath=h.reduce(function(R,O){return R+c(O)},"instance")):this.propertyPath=h,this.base=S,this.schemas=E};a.prototype.resolve=function(d){return b(this.base,d)},a.prototype.makeChild=function(d,w){var h=w===void 0?this.path:this.path.concat([w]),S=d.$id||d.id;let E=b(this.base,S||"");var R=new a(d,this.options,h,E,Object.create(this.schemas));return S&&!R.schemas[E]&&(R.schemas[E]=d),R};var l=ht.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[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]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-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-Fa-f]{1,4}:){5}(((:[0-9A-Fa-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-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-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-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-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-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-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-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-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-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-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*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(x){return typeof x=="string"&&parseFloat(x)===parseInt(x,10)&&!isNaN(x)},regex:function(x){var d=!0;try{new RegExp(x)}catch{d=!1}return d},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};l.regexp=l.regex,l.pattern=l.regex,l.ipv4=l["ip-address"],ht.isFormat=function(d,w,h){if(typeof d=="string"&&l[w]!==void 0){if(l[w]instanceof RegExp)return l[w].test(d);if(typeof l[w]=="function")return l[w](d)}else if(h&&h.customFormats&&typeof h.customFormats[w]=="function")return h.customFormats[w](d);return!0};var c=ht.makeSuffix=function(d){return d=d.toString(),!d.match(/[.\s\[\]]/)&&!d.match(/^[\d]/)?"."+d:d.match(/^\d+$/)?"["+d+"]":"["+JSON.stringify(d)+"]"};ht.deepCompareStrict=function x(d,w){if(typeof d!=typeof w)return!1;if(Array.isArray(d))return!Array.isArray(w)||d.length!==w.length?!1:d.every(function(E,R){return x(d[R],w[R])});if(typeof d=="object"){if(!d||!w)return d===w;var h=Object.keys(d),S=Object.keys(w);return h.length!==S.length?!1:h.every(function(E){return x(d[E],w[E])})}return d===w};function f(x,d,w,h){typeof w=="object"?d[h]=g(x[h],w):x.indexOf(w)===-1&&d.push(w)}function m(x,d,w){d[w]=x[w]}function v(x,d,w,h){typeof d[h]!="object"||!d[h]?w[h]=d[h]:x[h]?w[h]=g(x[h],d[h]):w[h]=d[h]}function g(x,d){var w=Array.isArray(d),h=w&&[]||{};return w?(x=x||[],h=h.concat(x),d.forEach(f.bind(null,x,h))):(x&&typeof x=="object"&&Object.keys(x).forEach(m.bind(null,x,h)),Object.keys(d).forEach(v.bind(null,x,d,h))),h}ht.deepMerge=g,ht.objectGetPath=function(d,w){for(var h=w.split("/").slice(1),S;typeof(S=h.shift())=="string";){var E=decodeURIComponent(S.replace(/~0/,"~").replace(/~1/g,"/"));if(!(E in d))return;d=d[E]}return d};function p(x){return"/"+encodeURIComponent(x).replace(/~/g,"%7E")}ht.encodePath=function(d){return d.map(p).join("")},ht.getDecimalPlaces=function(d){var w=0;if(isNaN(d))return w;typeof d!="number"&&(d=Number(d));var h=d.toString().split("e");if(h.length===2){if(h[1][0]!=="-")return w;w=Number(h[1].slice(1))}var S=h[0].split(".");return S.length===2&&(w+=S[1].length),w},ht.isSchema=function(d){return typeof d=="object"&&d||typeof d=="boolean"};var b=ht.resolveUrl=function(d,w){const h=new URL(w,new URL(d,"resolve://"));if(h.protocol==="resolve:"){const{pathname:S,search:E,hash:R}=h;return S+E+R}return h.toString()};return ht}var nc,Rv;function t2(){if(Rv)return nc;Rv=1;var e=Fn(),t=e.ValidatorResult,r=e.SchemaError,i={};i.ignoreProperties={id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0};var s=i.validators={};s.type=function(g,p,b,x){if(g===void 0)return null;var d=new t(g,p,b,x),w=Array.isArray(p.type)?p.type:[p.type];if(!w.some(this.testType.bind(this,g,p,b,x))){var h=w.map(function(S){if(S){var E=S.$id||S.id;return E?"<"+E+">":S+""}});d.addError({name:"type",argument:h,message:"is not of a type(s) "+h})}return d};function a(v,g,p,b,x){var d=g.throwError,w=g.throwAll;g.throwError=!1,g.throwAll=!1;var h=this.validateSchema(v,x,g,p);return g.throwError=d,g.throwAll=w,!h.valid&&b instanceof Function&&b(h),h.valid}s.anyOf=function(g,p,b,x){if(g===void 0)return null;var d=new t(g,p,b,x),w=new t(g,p,b,x);if(!Array.isArray(p.anyOf))throw new r("anyOf must be an array");if(!p.anyOf.some(a.bind(this,g,b,x,function(S){w.importErrors(S)}))){var h=p.anyOf.map(function(S,E){var R=S.$id||S.id;return R?"<"+R+">":S.title&&JSON.stringify(S.title)||S.$ref&&"<"+S.$ref+">"||"[subschema "+E+"]"});b.nestedErrors&&d.importErrors(w),d.addError({name:"anyOf",argument:h,message:"is not any of "+h.join(",")})}return d},s.allOf=function(g,p,b,x){if(g===void 0)return null;if(!Array.isArray(p.allOf))throw new r("allOf must be an array");var d=new t(g,p,b,x),w=this;return p.allOf.forEach(function(h,S){var E=w.validateSchema(g,h,b,x);if(!E.valid){var R=h.$id||h.id,O=R||h.title&&JSON.stringify(h.title)||h.$ref&&"<"+h.$ref+">"||"[subschema "+S+"]";d.addError({name:"allOf",argument:{id:O,length:E.errors.length,valid:E},message:"does not match allOf schema "+O+" with "+E.errors.length+" error[s]:"}),d.importErrors(E)}}),d},s.oneOf=function(g,p,b,x){if(g===void 0)return null;if(!Array.isArray(p.oneOf))throw new r("oneOf must be an array");var d=new t(g,p,b,x),w=new t(g,p,b,x),h=p.oneOf.filter(a.bind(this,g,b,x,function(E){w.importErrors(E)})).length,S=p.oneOf.map(function(E,R){var O=E.$id||E.id;return O||E.title&&JSON.stringify(E.title)||E.$ref&&"<"+E.$ref+">"||"[subschema "+R+"]"});return h!==1&&(b.nestedErrors&&d.importErrors(w),d.addError({name:"oneOf",argument:S,message:"is not exactly one from "+S.join(",")})),d},s.if=function(g,p,b,x){if(g===void 0)return null;if(!e.isSchema(p.if))throw new Error('Expected "if" keyword to be a schema');var d=a.call(this,g,b,x,null,p.if),w=new t(g,p,b,x),h;if(d){if(p.then===void 0)return;if(!e.isSchema(p.then))throw new Error('Expected "then" keyword to be a schema');h=this.validateSchema(g,p.then,b,x.makeChild(p.then)),w.importErrors(h)}else{if(p.else===void 0)return;if(!e.isSchema(p.else))throw new Error('Expected "else" keyword to be a schema');h=this.validateSchema(g,p.else,b,x.makeChild(p.else)),w.importErrors(h)}return w};function l(v,g){if(Object.hasOwnProperty.call(v,g))return v[g];if(g in v){for(;v=Object.getPrototypeOf(v);)if(Object.propertyIsEnumerable.call(v,g))return v[g]}}s.propertyNames=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=p.propertyNames!==void 0?p.propertyNames:{};if(!e.isSchema(w))throw new r('Expected "propertyNames" to be a schema (object or boolean)');for(var h in g)if(l(g,h)!==void 0){var S=this.validateSchema(h,w,b,x.makeChild(w));d.importErrors(S)}return d}},s.properties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=p.properties||{};for(var h in w){var S=w[h];if(S!==void 0){if(S===null)throw new r('Unexpected null, expected schema in "properties"');typeof b.preValidateProperty=="function"&&b.preValidateProperty(g,h,S,b,x);var E=l(g,h),R=this.validateSchema(E,S,b,x.makeChild(S,h));R.instance!==d.instance[h]&&(d.instance[h]=R.instance),d.importErrors(R)}}return d}};function c(v,g,p,b,x,d){if(this.types.object(v)&&!(g.properties&&g.properties[x]!==void 0))if(g.additionalProperties===!1)d.addError({name:"additionalProperties",argument:x,message:"is not allowed to have the additional property "+JSON.stringify(x)});else{var w=g.additionalProperties||{};typeof p.preValidateProperty=="function"&&p.preValidateProperty(v,x,w,p,b);var h=this.validateSchema(v[x],w,p,b.makeChild(w,x));h.instance!==d.instance[x]&&(d.instance[x]=h.instance),d.importErrors(h)}}s.patternProperties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=p.patternProperties||{};for(var h in g){var S=!0;for(var E in w){var R=w[E];if(R!==void 0){if(R===null)throw new r('Unexpected null, expected schema in "patternProperties"');try{var O=new RegExp(E,"u")}catch{O=new RegExp(E)}if(O.test(h)){S=!1,typeof b.preValidateProperty=="function"&&b.preValidateProperty(g,h,R,b,x);var k=this.validateSchema(g[h],R,b,x.makeChild(R,h));k.instance!==d.instance[h]&&(d.instance[h]=k.instance),d.importErrors(k)}}}S&&c.call(this,g,p,b,x,h,d)}return d}},s.additionalProperties=function(g,p,b,x){if(this.types.object(g)){if(p.patternProperties)return null;var d=new t(g,p,b,x);for(var w in g)c.call(this,g,p,b,x,w,d);return d}},s.minProperties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=Object.keys(g);return w.length>=p.minProperties||d.addError({name:"minProperties",argument:p.minProperties,message:"does not meet minimum property length of "+p.minProperties}),d}},s.maxProperties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=Object.keys(g);return w.length<=p.maxProperties||d.addError({name:"maxProperties",argument:p.maxProperties,message:"does not meet maximum property length of "+p.maxProperties}),d}},s.items=function(g,p,b,x){var d=this;if(this.types.array(g)&&p.items!==void 0){var w=new t(g,p,b,x);return g.every(function(h,S){if(Array.isArray(p.items))var E=p.items[S]===void 0?p.additionalItems:p.items[S];else var E=p.items;if(E===void 0)return!0;if(E===!1)return w.addError({name:"items",message:"additionalItems not permitted"}),!1;var R=d.validateSchema(h,E,b,x.makeChild(E,S));return R.instance!==w.instance[S]&&(w.instance[S]=R.instance),w.importErrors(R),!0}),w}},s.contains=function(g,p,b,x){var d=this;if(this.types.array(g)&&p.contains!==void 0){if(!e.isSchema(p.contains))throw new Error('Expected "contains" keyword to be a schema');var w=new t(g,p,b,x),h=g.some(function(S,E){var R=d.validateSchema(S,p.contains,b,x.makeChild(p.contains,E));return R.errors.length===0});return h===!1&&w.addError({name:"contains",argument:p.contains,message:"must contain an item matching given schema"}),w}},s.minimum=function(g,p,b,x){if(this.types.number(g)){var d=new t(g,p,b,x);return p.exclusiveMinimum&&p.exclusiveMinimum===!0?g>p.minimum||d.addError({name:"minimum",argument:p.minimum,message:"must be greater than "+p.minimum}):g>=p.minimum||d.addError({name:"minimum",argument:p.minimum,message:"must be greater than or equal to "+p.minimum}),d}},s.maximum=function(g,p,b,x){if(this.types.number(g)){var d=new t(g,p,b,x);return p.exclusiveMaximum&&p.exclusiveMaximum===!0?g<p.maximum||d.addError({name:"maximum",argument:p.maximum,message:"must be less than "+p.maximum}):g<=p.maximum||d.addError({name:"maximum",argument:p.maximum,message:"must be less than or equal to "+p.maximum}),d}},s.exclusiveMinimum=function(g,p,b,x){if(typeof p.exclusiveMinimum!="boolean"&&this.types.number(g)){var d=new t(g,p,b,x),w=g>p.exclusiveMinimum;return w||d.addError({name:"exclusiveMinimum",argument:p.exclusiveMinimum,message:"must be strictly greater than "+p.exclusiveMinimum}),d}},s.exclusiveMaximum=function(g,p,b,x){if(typeof p.exclusiveMaximum!="boolean"&&this.types.number(g)){var d=new t(g,p,b,x),w=g<p.exclusiveMaximum;return w||d.addError({name:"exclusiveMaximum",argument:p.exclusiveMaximum,message:"must be strictly less than "+p.exclusiveMaximum}),d}};var f=function(g,p,b,x,d,w){if(this.types.number(g)){var h=p[d];if(h==0)throw new r(d+" cannot be zero");var S=new t(g,p,b,x),E=e.getDecimalPlaces(g),R=e.getDecimalPlaces(h),O=Math.max(E,R),k=Math.pow(10,O);return Math.round(g*k)%Math.round(h*k)!==0&&S.addError({name:d,argument:h,message:w+JSON.stringify(h)}),S}};s.multipleOf=function(g,p,b,x){return f.call(this,g,p,b,x,"multipleOf","is not a multiple of (divisible by) ")},s.divisibleBy=function(g,p,b,x){return f.call(this,g,p,b,x,"divisibleBy","is not divisible by (multiple of) ")},s.required=function(g,p,b,x){var d=new t(g,p,b,x);return g===void 0&&p.required===!0?d.addError({name:"required",message:"is required"}):this.types.object(g)&&Array.isArray(p.required)&&p.required.forEach(function(w){l(g,w)===void 0&&d.addError({name:"required",argument:w,message:"requires property "+JSON.stringify(w)})}),d},s.pattern=function(g,p,b,x){if(this.types.string(g)){var d=new t(g,p,b,x),w=p.pattern;try{var h=new RegExp(w,"u")}catch{h=new RegExp(w)}return g.match(h)||d.addError({name:"pattern",argument:p.pattern,message:"does not match pattern "+JSON.stringify(p.pattern.toString())}),d}},s.format=function(g,p,b,x){if(g!==void 0){var d=new t(g,p,b,x);return!d.disableFormat&&!e.isFormat(g,p.format,this)&&d.addError({name:"format",argument:p.format,message:"does not conform to the "+JSON.stringify(p.format)+" format"}),d}},s.minLength=function(g,p,b,x){if(this.types.string(g)){var d=new t(g,p,b,x),w=g.match(/[\uDC00-\uDFFF]/g),h=g.length-(w?w.length:0);return h>=p.minLength||d.addError({name:"minLength",argument:p.minLength,message:"does not meet minimum length of "+p.minLength}),d}},s.maxLength=function(g,p,b,x){if(this.types.string(g)){var d=new t(g,p,b,x),w=g.match(/[\uDC00-\uDFFF]/g),h=g.length-(w?w.length:0);return h<=p.maxLength||d.addError({name:"maxLength",argument:p.maxLength,message:"does not meet maximum length of "+p.maxLength}),d}},s.minItems=function(g,p,b,x){if(this.types.array(g)){var d=new t(g,p,b,x);return g.length>=p.minItems||d.addError({name:"minItems",argument:p.minItems,message:"does not meet minimum length of "+p.minItems}),d}},s.maxItems=function(g,p,b,x){if(this.types.array(g)){var d=new t(g,p,b,x);return g.length<=p.maxItems||d.addError({name:"maxItems",argument:p.maxItems,message:"does not meet maximum length of "+p.maxItems}),d}};function m(v,g,p){var b,x=p.length;for(b=g+1,x;b<x;b++)if(e.deepCompareStrict(v,p[b]))return!1;return!0}return s.uniqueItems=function(g,p,b,x){if(p.uniqueItems===!0&&this.types.array(g)){var d=new t(g,p,b,x);return g.every(m)||d.addError({name:"uniqueItems",message:"contains duplicate item"}),d}},s.dependencies=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x);for(var w in p.dependencies)if(g[w]!==void 0){var h=p.dependencies[w],S=x.makeChild(h,w);if(typeof h=="string"&&(h=[h]),Array.isArray(h))h.forEach(function(R){g[R]===void 0&&d.addError({name:"dependencies",argument:S.propertyPath,message:"property "+R+" not found, required by "+S.propertyPath})});else{var E=this.validateSchema(g,h,b,S);d.instance!==E.instance&&(d.instance=E.instance),E&&E.errors.length&&(d.addError({name:"dependencies",argument:S.propertyPath,message:"does not meet dependency required by "+S.propertyPath}),d.importErrors(E))}}return d}},s.enum=function(g,p,b,x){if(g===void 0)return null;if(!Array.isArray(p.enum))throw new r("enum expects an array",p);var d=new t(g,p,b,x);return p.enum.some(e.deepCompareStrict.bind(null,g))||d.addError({name:"enum",argument:p.enum,message:"is not one of enum values: "+p.enum.map(String).join(",")}),d},s.const=function(g,p,b,x){if(g===void 0)return null;var d=new t(g,p,b,x);return e.deepCompareStrict(p.const,g)||d.addError({name:"const",argument:p.const,message:"does not exactly match expected constant: "+p.const}),d},s.not=s.disallow=function(g,p,b,x){var d=this;if(g===void 0)return null;var w=new t(g,p,b,x),h=p.not||p.disallow;return h?(Array.isArray(h)||(h=[h]),h.forEach(function(S){if(d.testType(g,p,b,x,S)){var E=S&&(S.$id||S.id),R=E||S;w.addError({name:"not",argument:R,message:"is of prohibited type "+R})}}),w):null},nc=i,nc}var ta={},Pv;function kc(){if(Pv)return ta;Pv=1;var e=Fn();ta.SchemaScanResult=t;function t(r,i){this.id=r,this.ref=i}return ta.scan=function(i,s){function a(v,g){if(!g||typeof g!="object")return;if(g.$ref){let d=e.resolveUrl(v,g.$ref);m[d]=m[d]?m[d]+1:0;return}var p=g.$id||g.id;let b=e.resolveUrl(v,p);var x=p?b:v;if(x){if(x.indexOf("#")<0&&(x+="#"),f[x]){if(!e.deepCompareStrict(f[x],g))throw new Error("Schema <"+x+"> already exists with different definition");return f[x]}f[x]=g,x[x.length-1]=="#"&&(f[x.substring(0,x.length-1)]=g)}l(x+"/items",Array.isArray(g.items)?g.items:[g.items]),l(x+"/extends",Array.isArray(g.extends)?g.extends:[g.extends]),a(x+"/additionalItems",g.additionalItems),c(x+"/properties",g.properties),a(x+"/additionalProperties",g.additionalProperties),c(x+"/definitions",g.definitions),c(x+"/patternProperties",g.patternProperties),c(x+"/dependencies",g.dependencies),l(x+"/disallow",g.disallow),l(x+"/allOf",g.allOf),l(x+"/anyOf",g.anyOf),l(x+"/oneOf",g.oneOf),a(x+"/not",g.not)}function l(v,g){if(Array.isArray(g))for(var p=0;p<g.length;p++)a(v+"/"+p,g[p])}function c(v,g){if(!(!g||typeof g!="object"))for(var p in g)a(v+"/"+p,g[p])}var f={},m={};return a(i,s),new t(f,m)},ta}var ic,Cv;function r2(){if(Cv)return ic;Cv=1;var e=t2(),t=Fn(),r=kc().scan,i=t.ValidatorResult,s=t.ValidatorResultError,a=t.SchemaError,l=t.SchemaContext,c="/",f=function g(){this.customFormats=Object.create(g.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(v),this.attributes=Object.create(e.validators)};f.prototype.customFormats={},f.prototype.schemas=null,f.prototype.types=null,f.prototype.attributes=null,f.prototype.unresolvedRefs=null,f.prototype.addSchema=function(p,b){var x=this;if(!p)return null;var d=r(b||c,p),w=b||p.$id||p.id;for(var h in d.id)this.schemas[h]=d.id[h];for(var h in d.ref)this.unresolvedRefs.push(h);return this.unresolvedRefs=this.unresolvedRefs.filter(function(S){return typeof x.schemas[S]>"u"}),this.schemas[w]},f.prototype.addSubSchemaArray=function(p,b){if(Array.isArray(b))for(var x=0;x<b.length;x++)this.addSubSchema(p,b[x])},f.prototype.addSubSchemaObject=function(p,b){if(!(!b||typeof b!="object"))for(var x in b)this.addSubSchema(p,b[x])},f.prototype.setSchemas=function(p){this.schemas=p},f.prototype.getSchema=function(p){return this.schemas[p]},f.prototype.validate=function(p,b,x,d){if(typeof b!="boolean"&&typeof b!="object"||b===null)throw new a("Expected `schema` to be an object or boolean");x||(x={});var w=b.$id||b.id;let h=t.resolveUrl(x.base,w||"");if(!d){d=new l(b,x,[],h,Object.create(this.schemas)),d.schemas[h]||(d.schemas[h]=b);var S=r(h,b);for(var E in S.id){var R=S.id[E];d.schemas[E]=R}}if(x.required&&p===void 0){var O=new i(p,b,x,d);return O.addError("is required, but is undefined"),O}var O=this.validateSchema(p,b,x,d);if(O){if(x.throwAll&&O.errors.length)throw new s(O)}else throw new Error("Result undefined");return O};function m(g){var p=typeof g=="string"?g:g.$ref;return typeof p=="string"?p:!1}f.prototype.validateSchema=function(p,b,x,d){var w=new i(p,b,x,d);if(typeof b=="boolean")b===!0?b={}:b===!1&&(b={type:[]});else if(!b)throw new Error("schema is undefined");if(b.extends)if(Array.isArray(b.extends)){var h={schema:b,ctx:d};b.extends.forEach(this.schemaTraverser.bind(this,h)),b=h.schema,h.schema=null,h.ctx=null,h=null}else b=t.deepMerge(b,this.superResolve(b.extends,d));var S=m(b);if(S){var E=this.resolve(b,S,d),R=new l(E.subschema,x,d.path,E.switchSchema,d.schemas);return this.validateSchema(p,E.subschema,x,R)}var O=x&&x.skipAttributes||[];for(var k in b)if(!e.ignoreProperties[k]&&O.indexOf(k)<0){var B=null,M=this.attributes[k];if(M)B=M.call(this,p,b,x,d);else if(x.allowUnknownAttributes===!1)throw new a("Unsupported attribute: "+k,b);B&&w.importErrors(B)}if(typeof x.rewrite=="function"){var F=x.rewrite.call(this,p,b,x,d);w.instance=F}return w},f.prototype.schemaTraverser=function(p,b){p.schema=t.deepMerge(p.schema,this.superResolve(b,p.ctx))},f.prototype.superResolve=function(p,b){var x=m(p);return x?this.resolve(p,x,b).subschema:p},f.prototype.resolve=function(p,b,x){if(b=x.resolve(b),x.schemas[b])return{subschema:x.schemas[b],switchSchema:b};let w=new URL(b,"thismessage::/").hash;var h=w&&w.length&&b.substr(0,b.length-w.length);if(!h||!x.schemas[h])throw new a("no such schema <"+b+">",p);var S=t.objectGetPath(x.schemas[h],w.substr(1));if(S===void 0)throw new a("no such schema "+w+" located in <"+h+">",p);return{subschema:S,switchSchema:b}},f.prototype.testType=function(p,b,x,d,w){if(w!==void 0){if(w===null)throw new a('Unexpected null in "type" keyword');if(typeof this.types[w]=="function")return this.types[w].call(this,p);if(w&&typeof w=="object"){var h=this.validateSchema(p,w,x,d);return h===void 0||!(h&&h.errors.length)}return!0}};var v=f.prototype.types={};return v.string=function(p){return typeof p=="string"},v.number=function(p){return typeof p=="number"&&isFinite(p)},v.integer=function(p){return typeof p=="number"&&p%1===0},v.boolean=function(p){return typeof p=="boolean"},v.array=function(p){return Array.isArray(p)},v.null=function(p){return p===null},v.date=function(p){return p instanceof Date},v.any=function(p){return!0},v.object=function(p){return p&&typeof p=="object"&&!Array.isArray(p)&&!(p instanceof Date)},ic=f,ic}var kv;function n2(){if(kv)return xr;kv=1;var e=xr.Validator=r2();return xr.ValidatorResult=Fn().ValidatorResult,xr.ValidatorResultError=Fn().ValidatorResultError,xr.ValidationError=Fn().ValidationError,xr.SchemaError=Fn().SchemaError,xr.SchemaScanResult=kc().SchemaScanResult,xr.scan=kc().scan,xr.validate=function(t,r,i){var s=new e;return s.validate(t,r,i)},xr}var i2=n2();const p0=(e,t,r)=>{const i=e instanceof RegExp?$v(e,r):e,s=t instanceof RegExp?$v(t,r):t,a=i!==null&&s!=null&&o2(i,s,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+i.length,a[1]),post:r.slice(a[1]+s.length)}},$v=(e,t)=>{const r=t.match(e);return r?r[0]:null},o2=(e,t,r)=>{let i,s,a,l,c,f=r.indexOf(e),m=r.indexOf(t,f+1),v=f;if(f>=0&&m>0){if(e===t)return[f,m];for(i=[],a=r.length;v>=0&&!c;){if(v===f)i.push(v),f=r.indexOf(e,v+1);else if(i.length===1){const g=i.pop();g!==void 0&&(c=[g,m])}else s=i.pop(),s!==void 0&&s<a&&(a=s,l=m),m=r.indexOf(t,v+1);v=f<m&&f>=0?f:m}i.length&&l!==void 0&&(c=[a,l])}return c},h0="\0SLASH"+Math.random()+"\0",g0="\0OPEN"+Math.random()+"\0",Rf="\0CLOSE"+Math.random()+"\0",v0="\0COMMA"+Math.random()+"\0",m0="\0PERIOD"+Math.random()+"\0",s2=new RegExp(h0,"g"),a2=new RegExp(g0,"g"),u2=new RegExp(Rf,"g"),l2=new RegExp(v0,"g"),c2=new RegExp(m0,"g"),f2=/\\\\/g,d2=/\\{/g,p2=/\\}/g,h2=/\\,/g,g2=/\\./g;function oc(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function v2(e){return e.replace(f2,h0).replace(d2,g0).replace(p2,Rf).replace(h2,v0).replace(g2,m0)}function m2(e){return e.replace(s2,"\\").replace(a2,"{").replace(u2,"}").replace(l2,",").replace(c2,".")}function y0(e){if(!e)return[""];const t=[],r=p0("{","}",e);if(!r)return e.split(",");const{pre:i,body:s,post:a}=r,l=i.split(",");l[l.length-1]+="{"+s+"}";const c=y0(a);return a.length&&(l[l.length-1]+=c.shift(),l.push.apply(l,c)),t.push.apply(t,l),t}function y2(e){return e?(e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),yo(v2(e),!0).map(m2)):[]}function b2(e){return"{"+e+"}"}function w2(e){return/^-?0\d/.test(e)}function x2(e,t){return e<=t}function S2(e,t){return e>=t}function yo(e,t){const r=[],i=p0("{","}",e);if(!i)return[e];const s=i.pre,a=i.post.length?yo(i.post,!1):[""];if(/\$$/.test(i.pre))for(let l=0;l<a.length;l++){const c=s+"{"+i.body+"}"+a[l];r.push(c)}else{const l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),f=l||c,m=i.body.indexOf(",")>=0;if(!f&&!m)return i.post.match(/,(?!,).*\}/)?(e=i.pre+"{"+i.body+Rf+i.post,yo(e)):[e];let v;if(f)v=i.body.split(/\.\./);else if(v=y0(i.body),v.length===1&&v[0]!==void 0&&(v=yo(v[0],!1).map(b2),v.length===1))return a.map(p=>i.pre+v[0]+p);let g;if(f&&v[0]!==void 0&&v[1]!==void 0){const p=oc(v[0]),b=oc(v[1]),x=Math.max(v[0].length,v[1].length);let d=v.length===3&&v[2]!==void 0?Math.abs(oc(v[2])):1,w=x2;b<p&&(d*=-1,w=S2);const S=v.some(w2);g=[];for(let E=p;w(E,b);E+=d){let R;if(c)R=String.fromCharCode(E),R==="\\"&&(R="");else if(R=String(E),S){const O=x-R.length;if(O>0){const k=new Array(O+1).join("0");E<0?R="-"+k+R.slice(1):R=k+R}}g.push(R)}}else{g=[];for(let p=0;p<v.length;p++)g.push.apply(g,yo(v[p],!1))}for(let p=0;p<g.length;p++)for(let b=0;b<a.length;b++){const x=s+g[p]+a[b];(!t||f||x)&&r.push(x)}}return r}const E2=1024*64,Ta=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>E2)throw new TypeError("pattern is too long")},_2={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},po=e=>e.replace(/[[\]\\-]/g,"\\$&"),O2=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Iv=e=>e.join(""),A2=(e,t)=>{const r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");const i=[],s=[];let a=r+1,l=!1,c=!1,f=!1,m=!1,v=r,g="";e:for(;a<e.length;){const d=e.charAt(a);if((d==="!"||d==="^")&&a===r+1){m=!0,a++;continue}if(d==="]"&&l&&!f){v=a+1;break}if(l=!0,d==="\\"&&!f){f=!0,a++;continue}if(d==="["&&!f){for(const[w,[h,S,E]]of Object.entries(_2))if(e.startsWith(w,a)){if(g)return["$.",!1,e.length-r,!0];a+=w.length,E?s.push(h):i.push(h),c=c||S;continue e}}if(f=!1,g){d>g?i.push(po(g)+"-"+po(d)):d===g&&i.push(po(d)),g="",a++;continue}if(e.startsWith("-]",a+1)){i.push(po(d+"-")),a+=2;continue}if(e.startsWith("-",a+1)){g=d,a+=2;continue}i.push(po(d)),a++}if(v<a)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,e.length-r,!0];if(s.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!m){const d=i[0].length===2?i[0].slice(-1):i[0];return[O2(d),!1,v-r,!1]}const p="["+(m?"^":"")+Iv(i)+"]",b="["+(m?"":"^")+Iv(s)+"]";return[i.length&&s.length?"("+p+"|"+b+")":i.length?p:b,c,v-r,!0]},bo=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),T2=new Set(["!","?","+","*","@"]),Lv=e=>T2.has(e),R2="(?!(?:^|/)\\.\\.?(?:$|/))",ra="(?!\\.)",P2=new Set(["[","."]),C2=new Set(["..","."]),k2=new Set("().*{}+?[]^$\\!"),$2=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Pf="[^/]",Mv=Pf+"*?",Fv=Pf+"+?";var at,ct,qr,He,nt,fn,Dn,dn,Er,Nn,Mo,qn,b0,gn,pa,$c,w0;const Tt=class Tt{constructor(t,r,i={}){xt(this,qn);me(this,"type");xt(this,at);xt(this,ct);xt(this,qr,!1);xt(this,He,[]);xt(this,nt);xt(this,fn);xt(this,Dn);xt(this,dn,!1);xt(this,Er);xt(this,Nn);xt(this,Mo,!1);this.type=t,t&&Ye(this,ct,!0),Ye(this,nt,r),Ye(this,at,re(this,nt)?re(re(this,nt),at):this),Ye(this,Er,re(this,at)===this?i:re(re(this,at),Er)),Ye(this,Dn,re(this,at)===this?[]:re(re(this,at),Dn)),t==="!"&&!re(re(this,at),dn)&&re(this,Dn).push(this),Ye(this,fn,re(this,nt)?re(re(this,nt),He).length:0)}get hasMagic(){if(re(this,ct)!==void 0)return re(this,ct);for(const t of re(this,He))if(typeof t!="string"&&(t.type||t.hasMagic))return Ye(this,ct,!0);return re(this,ct)}toString(){return re(this,Nn)!==void 0?re(this,Nn):this.type?Ye(this,Nn,this.type+"("+re(this,He).map(t=>String(t)).join("|")+")"):Ye(this,Nn,re(this,He).map(t=>String(t)).join(""))}push(...t){for(const r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Tt&&re(r,nt)===this))throw new Error("invalid part: "+r);re(this,He).push(r)}}toJSON(){var r;const t=this.type===null?re(this,He).slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...re(this,He).map(i=>i.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===re(this,at)||re(re(this,at),dn)&&((r=re(this,nt))==null?void 0:r.type)==="!")&&t.push({}),t}isStart(){var r;if(re(this,at)===this)return!0;if(!((r=re(this,nt))!=null&&r.isStart()))return!1;if(re(this,fn)===0)return!0;const t=re(this,nt);for(let i=0;i<re(this,fn);i++){const s=re(t,He)[i];if(!(s instanceof Tt&&s.type==="!"))return!1}return!0}isEnd(){var r,i,s;if(re(this,at)===this||((r=re(this,nt))==null?void 0:r.type)==="!")return!0;if(!((i=re(this,nt))!=null&&i.isEnd()))return!1;if(!this.type)return(s=re(this,nt))==null?void 0:s.isEnd();const t=re(this,nt)?re(re(this,nt),He).length:0;return re(this,fn)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const r=new Tt(this.type,t);for(const i of re(this,He))r.copyIn(i);return r}static fromGlob(t,r={}){var s;const i=new Tt(null,void 0,r);return $e(s=Tt,gn,pa).call(s,t,i,0,r),i}toMMPattern(){if(this!==re(this,at))return re(this,at).toMMPattern();const t=this.toString(),[r,i,s,a]=this.toRegExpSource();if(!(s||re(this,ct)||re(this,Er).nocase&&!re(this,Er).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;const c=(re(this,Er).nocase?"i":"")+(a?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return re(this,Er)}toRegExpSource(t){var f;const r=t??!!re(this,Er).dot;if(re(this,at)===this&&$e(this,qn,b0).call(this),!this.type){const m=this.isStart()&&this.isEnd(),v=re(this,He).map(x=>{var E;const[d,w,h,S]=typeof x=="string"?$e(E=Tt,gn,w0).call(E,x,re(this,ct),m):x.toRegExpSource(t);return Ye(this,ct,re(this,ct)||h),Ye(this,qr,re(this,qr)||S),d}).join("");let g="";if(this.isStart()&&typeof re(this,He)[0]=="string"&&!(re(this,He).length===1&&C2.has(re(this,He)[0]))){const d=P2,w=r&&d.has(v.charAt(0))||v.startsWith("\\.")&&d.has(v.charAt(2))||v.startsWith("\\.\\.")&&d.has(v.charAt(4)),h=!r&&!t&&d.has(v.charAt(0));g=w?R2:h?ra:""}let p="";return this.isEnd()&&re(re(this,at),dn)&&((f=re(this,nt))==null?void 0:f.type)==="!"&&(p="(?:$|\\/)"),[g+v+p,bo(v),Ye(this,ct,!!re(this,ct)),re(this,qr)]}const i=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let a=$e(this,qn,$c).call(this,r);if(this.isStart()&&this.isEnd()&&!a&&this.type!=="!"){const m=this.toString();return Ye(this,He,[m]),this.type=null,Ye(this,ct,void 0),[m,bo(this.toString()),!1,!1]}let l=!i||t||r||!ra?"":$e(this,qn,$c).call(this,!0);l===a&&(l=""),l&&(a=`(?:${a})(?:${l})*?`);let c="";if(this.type==="!"&&re(this,Mo))c=(this.isStart()&&!r?ra:"")+Fv;else{const m=this.type==="!"?"))"+(this.isStart()&&!r&&!t?ra:"")+Mv+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&l?")":this.type==="*"&&l?")?":`)${this.type}`;c=s+a+m}return[c,bo(a),Ye(this,ct,!!re(this,ct)),re(this,qr)]}};at=new WeakMap,ct=new WeakMap,qr=new WeakMap,He=new WeakMap,nt=new WeakMap,fn=new WeakMap,Dn=new WeakMap,dn=new WeakMap,Er=new WeakMap,Nn=new WeakMap,Mo=new WeakMap,qn=new WeakSet,b0=function(){if(this!==re(this,at))throw new Error("should only call on root");if(re(this,dn))return this;this.toString(),Ye(this,dn,!0);let t;for(;t=re(this,Dn).pop();){if(t.type!=="!")continue;let r=t,i=re(r,nt);for(;i;){for(let s=re(r,fn)+1;!i.type&&s<re(i,He).length;s++)for(const a of re(t,He)){if(typeof a=="string")throw new Error("string part in extglob AST??");a.copyIn(re(i,He)[s])}r=i,i=re(r,nt)}}return this},gn=new WeakSet,pa=function(t,r,i,s){var b,x;let a=!1,l=!1,c=-1,f=!1;if(r.type===null){let d=i,w="";for(;d<t.length;){const h=t.charAt(d++);if(a||h==="\\"){a=!a,w+=h;continue}if(l){d===c+1?(h==="^"||h==="!")&&(f=!0):h==="]"&&!(d===c+2&&f)&&(l=!1),w+=h;continue}else if(h==="["){l=!0,c=d,f=!1,w+=h;continue}if(!s.noext&&Lv(h)&&t.charAt(d)==="("){r.push(w),w="";const S=new Tt(h,r);d=$e(b=Tt,gn,pa).call(b,t,S,d,s),r.push(S);continue}w+=h}return r.push(w),d}let m=i+1,v=new Tt(null,r);const g=[];let p="";for(;m<t.length;){const d=t.charAt(m++);if(a||d==="\\"){a=!a,p+=d;continue}if(l){m===c+1?(d==="^"||d==="!")&&(f=!0):d==="]"&&!(m===c+2&&f)&&(l=!1),p+=d;continue}else if(d==="["){l=!0,c=m,f=!1,p+=d;continue}if(Lv(d)&&t.charAt(m)==="("){v.push(p),p="";const w=new Tt(d,v);v.push(w),m=$e(x=Tt,gn,pa).call(x,t,w,m,s);continue}if(d==="|"){v.push(p),p="",g.push(v),v=new Tt(null,r);continue}if(d===")")return p===""&&re(r,He).length===0&&Ye(r,Mo,!0),v.push(p),p="",r.push(...g,v),m;p+=d}return r.type=null,Ye(r,ct,void 0),Ye(r,He,[t.substring(i-1)]),m},$c=function(t){return re(this,He).map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");const[i,s,a,l]=r.toRegExpSource(t);return Ye(this,qr,re(this,qr)||l),i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")},w0=function(t,r,i=!1){let s=!1,a="",l=!1;for(let c=0;c<t.length;c++){const f=t.charAt(c);if(s){s=!1,a+=(k2.has(f)?"\\":"")+f;continue}if(f==="\\"){c===t.length-1?a+="\\\\":s=!0;continue}if(f==="["){const[m,v,g,p]=A2(t,c);if(g){a+=m,l=l||v,c+=g-1,r=r||p;continue}}if(f==="*"){i&&t==="*"?a+=Fv:a+=Mv,r=!0;continue}if(f==="?"){a+=Pf,r=!0;continue}a+=$2(f)}return[a,bo(t),!!r,l]},xt(Tt,gn);let Ra=Tt;const I2=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Et=(e,t,r={})=>(Ta(t),!r.nocomment&&t.charAt(0)==="#"?!1:new qa(t,r).match(e)),L2=/^\*+([^+@!?\*\[\(]*)$/,M2=e=>t=>!t.startsWith(".")&&t.endsWith(e),F2=e=>t=>t.endsWith(e),D2=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),N2=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),j2=/^\*+\.\*+$/,z2=e=>!e.startsWith(".")&&e.includes("."),W2=e=>e!=="."&&e!==".."&&e.includes("."),B2=/^\.\*+$/,U2=e=>e!=="."&&e!==".."&&e.startsWith("."),H2=/^\*+$/,q2=e=>e.length!==0&&!e.startsWith("."),Z2=e=>e.length!==0&&e!=="."&&e!=="..",G2=/^\?+([^+@!?\*\[\(]*)?$/,K2=([e,t=""])=>{const r=x0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},V2=([e,t=""])=>{const r=S0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},X2=([e,t=""])=>{const r=S0([e]);return t?i=>r(i)&&i.endsWith(t):r},Y2=([e,t=""])=>{const r=x0([e]);return t?i=>r(i)&&i.endsWith(t):r},x0=([e])=>{const t=e.length;return r=>r.length===t&&!r.startsWith(".")},S0=([e])=>{const t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},E0=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Dv={win32:{sep:"\\"},posix:{sep:"/"}},J2=E0==="win32"?Dv.win32.sep:Dv.posix.sep;Et.sep=J2;const nr=Symbol("globstar **");Et.GLOBSTAR=nr;const Q2="[^/]",eL=Q2+"*?",tL="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",rL="(?:(?!(?:\\/|^)\\.).)*?",nL=(e,t={})=>r=>Et(r,e,t);Et.filter=nL;const rr=(e,t={})=>Object.assign({},e,t),iL=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Et;const t=Et;return Object.assign((i,s,a={})=>t(i,s,rr(e,a)),{Minimatch:class extends t.Minimatch{constructor(s,a={}){super(s,rr(e,a))}static defaults(s){return t.defaults(rr(e,s)).Minimatch}},AST:class extends t.AST{constructor(s,a,l={}){super(s,a,rr(e,l))}static fromGlob(s,a={}){return t.AST.fromGlob(s,rr(e,a))}},unescape:(i,s={})=>t.unescape(i,rr(e,s)),escape:(i,s={})=>t.escape(i,rr(e,s)),filter:(i,s={})=>t.filter(i,rr(e,s)),defaults:i=>t.defaults(rr(e,i)),makeRe:(i,s={})=>t.makeRe(i,rr(e,s)),braceExpand:(i,s={})=>t.braceExpand(i,rr(e,s)),match:(i,s,a={})=>t.match(i,s,rr(e,a)),sep:t.sep,GLOBSTAR:nr})};Et.defaults=iL;const _0=(e,t={})=>(Ta(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:y2(e));Et.braceExpand=_0;const oL=(e,t={})=>new qa(e,t).makeRe();Et.makeRe=oL;const sL=(e,t,r={})=>{const i=new qa(t,r);return e=e.filter(s=>i.match(s)),i.options.nonull&&!e.length&&e.push(t),e};Et.match=sL;const Nv=/[?*]|[+@!]\(.*?\)|\[|\]/,aL=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class qa{constructor(t,r={}){me(this,"options");me(this,"set");me(this,"pattern");me(this,"windowsPathsNoEscape");me(this,"nonegate");me(this,"negate");me(this,"comment");me(this,"empty");me(this,"preserveMultipleSlashes");me(this,"partial");me(this,"globSet");me(this,"globParts");me(this,"nocase");me(this,"isWindows");me(this,"platform");me(this,"windowsNoMagicRoot");me(this,"regexp");Ta(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||E0,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...a)=>console.error(...a)),this.debug(this.pattern,this.globSet);const i=this.globSet.map(a=>this.slashSplit(a));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((a,l,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){const f=a[0]===""&&a[1]===""&&(a[2]==="?"||!Nv.test(a[2]))&&!Nv.test(a[3]),m=/^[a-z]:/i.test(a[0]);if(f)return[...a.slice(0,4),...a.slice(4).map(v=>this.parse(v))];if(m)return[a[0],...a.slice(1).map(v=>this.parse(v))]}return a.map(f=>this.parse(f))});if(this.debug(this.pattern,s),this.set=s.filter(a=>a.indexOf(!1)===-1),this.isWindows)for(let a=0;a<this.set.length;a++){const l=this.set[a];l[0]===""&&l[1]===""&&this.globParts[a][2]==="?"&&typeof l[3]=="string"&&/^[a-z]:$/i.test(l[3])&&(l[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let s=0;s<t[i].length;s++)t[i][s]==="**"&&(t[i][s]="*");const{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let s=i;for(;r[s+1]==="**";)s++;s!==i&&r.splice(i,s-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,s)=>{const a=i[i.length-1];return s==="**"&&a==="**"?i:s===".."&&a&&a!==".."&&a!=="."&&a!=="**"?(i.pop(),i):(i.push(s),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const a=t[s];s===1&&a===""&&t[0]===""||(a==="."||a==="")&&(r=!0,t.splice(s,1),s--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){const s=t[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let s=-1;for(;(s=i.indexOf("**",s+1))!==-1;){let l=s;for(;i[l+1]==="**";)l++;l>s&&i.splice(s+1,l-s);let c=i[s+1];const f=i[s+2],m=i[s+3];if(c!==".."||!f||f==="."||f===".."||!m||m==="."||m==="..")continue;r=!0,i.splice(s,1);const v=i.slice(0);v[s]="**",t.push(v),s--}if(!this.preserveMultipleSlashes){for(let l=1;l<i.length-1;l++){const c=i[l];l===1&&c===""&&i[0]===""||(c==="."||c==="")&&(r=!0,i.splice(l,1),l--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let a=0;for(;(a=i.indexOf("..",a+1))!==-1;){const l=i[a-1];if(l&&l!=="."&&l!==".."&&l!=="**"){r=!0;const f=a===1&&i[a+1]==="**"?["."]:[];i.splice(a-1,2,...f),i.length===0&&i.push(""),a-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){const s=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(s){t[r]=[],t[i]=s;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let s=0,a=0,l=[],c="";for(;s<t.length&&a<r.length;)if(t[s]===r[a])l.push(c==="b"?r[a]:t[s]),s++,a++;else if(i&&t[s]==="**"&&r[a]===t[s+1])l.push(t[s]),s++;else if(i&&r[a]==="**"&&t[s]===r[a+1])l.push(r[a]),a++;else if(t[s]==="*"&&r[a]&&(this.options.dot||!r[a].startsWith("."))&&r[a]!=="**"){if(c==="b")return!1;c="a",l.push(t[s]),s++,a++}else if(r[a]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(c==="a")return!1;c="b",l.push(r[a]),s++,a++}else return!1;return t.length===r.length&&l}parseNegate(){if(this.nonegate)return;const t=this.pattern;let r=!1,i=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){const s=this.options;if(this.isWindows){const d=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),w=!d&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),h=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),S=!h&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),E=w?3:d?0:void 0,R=S?3:h?0:void 0;if(typeof E=="number"&&typeof R=="number"){const[O,k]=[t[E],r[R]];O.toLowerCase()===k.toLowerCase()&&(r[R]=O,R>E?r=r.slice(R):E>R&&(t=t.slice(E)))}}const{optimizationLevel:a=1}=this.options;a>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var l=0,c=0,f=t.length,m=r.length;l<f&&c<m;l++,c++){this.debug("matchOne loop");var v=r[c],g=t[l];if(this.debug(r,v,g),v===!1)return!1;if(v===nr){this.debug("GLOBSTAR",[r,v,g]);var p=l,b=c+1;if(b===m){for(this.debug("** at the end");l<f;l++)if(t[l]==="."||t[l]===".."||!s.dot&&t[l].charAt(0)===".")return!1;return!0}for(;p<f;){var x=t[p];if(this.debug(`
|
|
204
|
+
${s}`}function f0(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function d0(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const JI=()=>Bc.uuid().replaceAll("-","").toUpperCase(),QI=e=>e.toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/_{2,}/g,"_").replace(/^_|_$/g,""),it="/rest/$designer",Uo="/rest/$designer-ext";function e2(...e){return t=>{if(e.length===0)return t;const r={...t};return e.forEach(i=>{typeof r[i]=="string"&&(r[i]=new Date(r[i]))}),r}}class Cc extends Error{constructor(t,r,i){super(),this.url=t,this.response=r,this.data=i}log(){console.error("Error while sending the request",this)}}async function Me(e,t){var s;Aa.next({action:$o.REQUEST_SENT});const r=await window.fetch(e,t);if(/401/.test(r.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(r.status.toString())){let a;try{const l=await r.json();((s=l==null?void 0:l.__ERROR)==null?void 0:s.some(f=>f.errCode===1651))&&Aa.next({action:$o.EVENT_EMITED,payload:{eventName:"onsessionexpired"}}),a=new Cc(e,r,l)}catch{a=new Cc(e,r)}throw a.log(),a}return await r.json()}function t2(e){return Aa.next({action:$o.REQUEST_SENT}),e}var xr={},ht={},Tv;function Fn(){if(Tv)return ht;Tv=1;var e=ht.ValidationError=function(d,w,h,S,E,R){if(Array.isArray(S)?(this.path=S,this.property=S.reduce(function(k,B){return k+c(B)},"instance")):S!==void 0&&(this.property=S),d&&(this.message=d),h){var O=h.$id||h.id;this.schema=O||h}w!==void 0&&(this.instance=w),this.name=E,this.argument=R,this.stack=this.toString()};e.prototype.toString=function(){return this.property+" "+this.message};var t=ht.ValidatorResult=function(d,w,h,S){this.instance=d,this.schema=w,this.options=h,this.path=S.path,this.propertyPath=S.propertyPath,this.errors=[],this.throwError=h&&h.throwError,this.throwFirst=h&&h.throwFirst,this.throwAll=h&&h.throwAll,this.disableFormat=h&&h.disableFormat===!0};t.prototype.addError=function(d){var w;if(typeof d=="string")w=new e(d,this.instance,this.schema,this.path);else{if(!d)throw new Error("Missing error detail");if(!d.message)throw new Error("Missing error message");if(!d.name)throw new Error("Missing validator type");w=new e(d.message,this.instance,this.schema,this.path,d.name,d.argument)}if(this.errors.push(w),this.throwFirst)throw new i(this);if(this.throwError)throw w;return w},t.prototype.importErrors=function(d){typeof d=="string"||d&&d.validatorType?this.addError(d):d&&d.errors&&(this.errors=this.errors.concat(d.errors))};function r(x,d){return d+": "+x.toString()+`
|
|
205
|
+
`}t.prototype.toString=function(d){return this.errors.map(r).join("")},Object.defineProperty(t.prototype,"valid",{get:function(){return!this.errors.length}}),ht.ValidatorResultError=i;function i(x){typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,i),this.instance=x.instance,this.schema=x.schema,this.options=x.options,this.errors=x.errors}i.prototype=new Error,i.prototype.constructor=i,i.prototype.name="Validation Error";var s=ht.SchemaError=function x(d,w){this.message=d,this.schema=w,Error.call(this,d),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,x)};s.prototype=Object.create(Error.prototype,{constructor:{value:s,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var a=ht.SchemaContext=function(d,w,h,S,E){this.schema=d,this.options=w,Array.isArray(h)?(this.path=h,this.propertyPath=h.reduce(function(R,O){return R+c(O)},"instance")):this.propertyPath=h,this.base=S,this.schemas=E};a.prototype.resolve=function(d){return b(this.base,d)},a.prototype.makeChild=function(d,w){var h=w===void 0?this.path:this.path.concat([w]),S=d.$id||d.id;let E=b(this.base,S||"");var R=new a(d,this.options,h,E,Object.create(this.schemas));return S&&!R.schemas[E]&&(R.schemas[E]=d),R};var l=ht.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[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]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-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-Fa-f]{1,4}:){5}(((:[0-9A-Fa-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-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-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-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-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-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-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-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-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-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-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*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(x){return typeof x=="string"&&parseFloat(x)===parseInt(x,10)&&!isNaN(x)},regex:function(x){var d=!0;try{new RegExp(x)}catch{d=!1}return d},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};l.regexp=l.regex,l.pattern=l.regex,l.ipv4=l["ip-address"],ht.isFormat=function(d,w,h){if(typeof d=="string"&&l[w]!==void 0){if(l[w]instanceof RegExp)return l[w].test(d);if(typeof l[w]=="function")return l[w](d)}else if(h&&h.customFormats&&typeof h.customFormats[w]=="function")return h.customFormats[w](d);return!0};var c=ht.makeSuffix=function(d){return d=d.toString(),!d.match(/[.\s\[\]]/)&&!d.match(/^[\d]/)?"."+d:d.match(/^\d+$/)?"["+d+"]":"["+JSON.stringify(d)+"]"};ht.deepCompareStrict=function x(d,w){if(typeof d!=typeof w)return!1;if(Array.isArray(d))return!Array.isArray(w)||d.length!==w.length?!1:d.every(function(E,R){return x(d[R],w[R])});if(typeof d=="object"){if(!d||!w)return d===w;var h=Object.keys(d),S=Object.keys(w);return h.length!==S.length?!1:h.every(function(E){return x(d[E],w[E])})}return d===w};function f(x,d,w,h){typeof w=="object"?d[h]=g(x[h],w):x.indexOf(w)===-1&&d.push(w)}function m(x,d,w){d[w]=x[w]}function v(x,d,w,h){typeof d[h]!="object"||!d[h]?w[h]=d[h]:x[h]?w[h]=g(x[h],d[h]):w[h]=d[h]}function g(x,d){var w=Array.isArray(d),h=w&&[]||{};return w?(x=x||[],h=h.concat(x),d.forEach(f.bind(null,x,h))):(x&&typeof x=="object"&&Object.keys(x).forEach(m.bind(null,x,h)),Object.keys(d).forEach(v.bind(null,x,d,h))),h}ht.deepMerge=g,ht.objectGetPath=function(d,w){for(var h=w.split("/").slice(1),S;typeof(S=h.shift())=="string";){var E=decodeURIComponent(S.replace(/~0/,"~").replace(/~1/g,"/"));if(!(E in d))return;d=d[E]}return d};function p(x){return"/"+encodeURIComponent(x).replace(/~/g,"%7E")}ht.encodePath=function(d){return d.map(p).join("")},ht.getDecimalPlaces=function(d){var w=0;if(isNaN(d))return w;typeof d!="number"&&(d=Number(d));var h=d.toString().split("e");if(h.length===2){if(h[1][0]!=="-")return w;w=Number(h[1].slice(1))}var S=h[0].split(".");return S.length===2&&(w+=S[1].length),w},ht.isSchema=function(d){return typeof d=="object"&&d||typeof d=="boolean"};var b=ht.resolveUrl=function(d,w){const h=new URL(w,new URL(d,"resolve://"));if(h.protocol==="resolve:"){const{pathname:S,search:E,hash:R}=h;return S+E+R}return h.toString()};return ht}var nc,Rv;function r2(){if(Rv)return nc;Rv=1;var e=Fn(),t=e.ValidatorResult,r=e.SchemaError,i={};i.ignoreProperties={id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0};var s=i.validators={};s.type=function(g,p,b,x){if(g===void 0)return null;var d=new t(g,p,b,x),w=Array.isArray(p.type)?p.type:[p.type];if(!w.some(this.testType.bind(this,g,p,b,x))){var h=w.map(function(S){if(S){var E=S.$id||S.id;return E?"<"+E+">":S+""}});d.addError({name:"type",argument:h,message:"is not of a type(s) "+h})}return d};function a(v,g,p,b,x){var d=g.throwError,w=g.throwAll;g.throwError=!1,g.throwAll=!1;var h=this.validateSchema(v,x,g,p);return g.throwError=d,g.throwAll=w,!h.valid&&b instanceof Function&&b(h),h.valid}s.anyOf=function(g,p,b,x){if(g===void 0)return null;var d=new t(g,p,b,x),w=new t(g,p,b,x);if(!Array.isArray(p.anyOf))throw new r("anyOf must be an array");if(!p.anyOf.some(a.bind(this,g,b,x,function(S){w.importErrors(S)}))){var h=p.anyOf.map(function(S,E){var R=S.$id||S.id;return R?"<"+R+">":S.title&&JSON.stringify(S.title)||S.$ref&&"<"+S.$ref+">"||"[subschema "+E+"]"});b.nestedErrors&&d.importErrors(w),d.addError({name:"anyOf",argument:h,message:"is not any of "+h.join(",")})}return d},s.allOf=function(g,p,b,x){if(g===void 0)return null;if(!Array.isArray(p.allOf))throw new r("allOf must be an array");var d=new t(g,p,b,x),w=this;return p.allOf.forEach(function(h,S){var E=w.validateSchema(g,h,b,x);if(!E.valid){var R=h.$id||h.id,O=R||h.title&&JSON.stringify(h.title)||h.$ref&&"<"+h.$ref+">"||"[subschema "+S+"]";d.addError({name:"allOf",argument:{id:O,length:E.errors.length,valid:E},message:"does not match allOf schema "+O+" with "+E.errors.length+" error[s]:"}),d.importErrors(E)}}),d},s.oneOf=function(g,p,b,x){if(g===void 0)return null;if(!Array.isArray(p.oneOf))throw new r("oneOf must be an array");var d=new t(g,p,b,x),w=new t(g,p,b,x),h=p.oneOf.filter(a.bind(this,g,b,x,function(E){w.importErrors(E)})).length,S=p.oneOf.map(function(E,R){var O=E.$id||E.id;return O||E.title&&JSON.stringify(E.title)||E.$ref&&"<"+E.$ref+">"||"[subschema "+R+"]"});return h!==1&&(b.nestedErrors&&d.importErrors(w),d.addError({name:"oneOf",argument:S,message:"is not exactly one from "+S.join(",")})),d},s.if=function(g,p,b,x){if(g===void 0)return null;if(!e.isSchema(p.if))throw new Error('Expected "if" keyword to be a schema');var d=a.call(this,g,b,x,null,p.if),w=new t(g,p,b,x),h;if(d){if(p.then===void 0)return;if(!e.isSchema(p.then))throw new Error('Expected "then" keyword to be a schema');h=this.validateSchema(g,p.then,b,x.makeChild(p.then)),w.importErrors(h)}else{if(p.else===void 0)return;if(!e.isSchema(p.else))throw new Error('Expected "else" keyword to be a schema');h=this.validateSchema(g,p.else,b,x.makeChild(p.else)),w.importErrors(h)}return w};function l(v,g){if(Object.hasOwnProperty.call(v,g))return v[g];if(g in v){for(;v=Object.getPrototypeOf(v);)if(Object.propertyIsEnumerable.call(v,g))return v[g]}}s.propertyNames=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=p.propertyNames!==void 0?p.propertyNames:{};if(!e.isSchema(w))throw new r('Expected "propertyNames" to be a schema (object or boolean)');for(var h in g)if(l(g,h)!==void 0){var S=this.validateSchema(h,w,b,x.makeChild(w));d.importErrors(S)}return d}},s.properties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=p.properties||{};for(var h in w){var S=w[h];if(S!==void 0){if(S===null)throw new r('Unexpected null, expected schema in "properties"');typeof b.preValidateProperty=="function"&&b.preValidateProperty(g,h,S,b,x);var E=l(g,h),R=this.validateSchema(E,S,b,x.makeChild(S,h));R.instance!==d.instance[h]&&(d.instance[h]=R.instance),d.importErrors(R)}}return d}};function c(v,g,p,b,x,d){if(this.types.object(v)&&!(g.properties&&g.properties[x]!==void 0))if(g.additionalProperties===!1)d.addError({name:"additionalProperties",argument:x,message:"is not allowed to have the additional property "+JSON.stringify(x)});else{var w=g.additionalProperties||{};typeof p.preValidateProperty=="function"&&p.preValidateProperty(v,x,w,p,b);var h=this.validateSchema(v[x],w,p,b.makeChild(w,x));h.instance!==d.instance[x]&&(d.instance[x]=h.instance),d.importErrors(h)}}s.patternProperties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=p.patternProperties||{};for(var h in g){var S=!0;for(var E in w){var R=w[E];if(R!==void 0){if(R===null)throw new r('Unexpected null, expected schema in "patternProperties"');try{var O=new RegExp(E,"u")}catch{O=new RegExp(E)}if(O.test(h)){S=!1,typeof b.preValidateProperty=="function"&&b.preValidateProperty(g,h,R,b,x);var k=this.validateSchema(g[h],R,b,x.makeChild(R,h));k.instance!==d.instance[h]&&(d.instance[h]=k.instance),d.importErrors(k)}}}S&&c.call(this,g,p,b,x,h,d)}return d}},s.additionalProperties=function(g,p,b,x){if(this.types.object(g)){if(p.patternProperties)return null;var d=new t(g,p,b,x);for(var w in g)c.call(this,g,p,b,x,w,d);return d}},s.minProperties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=Object.keys(g);return w.length>=p.minProperties||d.addError({name:"minProperties",argument:p.minProperties,message:"does not meet minimum property length of "+p.minProperties}),d}},s.maxProperties=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x),w=Object.keys(g);return w.length<=p.maxProperties||d.addError({name:"maxProperties",argument:p.maxProperties,message:"does not meet maximum property length of "+p.maxProperties}),d}},s.items=function(g,p,b,x){var d=this;if(this.types.array(g)&&p.items!==void 0){var w=new t(g,p,b,x);return g.every(function(h,S){if(Array.isArray(p.items))var E=p.items[S]===void 0?p.additionalItems:p.items[S];else var E=p.items;if(E===void 0)return!0;if(E===!1)return w.addError({name:"items",message:"additionalItems not permitted"}),!1;var R=d.validateSchema(h,E,b,x.makeChild(E,S));return R.instance!==w.instance[S]&&(w.instance[S]=R.instance),w.importErrors(R),!0}),w}},s.contains=function(g,p,b,x){var d=this;if(this.types.array(g)&&p.contains!==void 0){if(!e.isSchema(p.contains))throw new Error('Expected "contains" keyword to be a schema');var w=new t(g,p,b,x),h=g.some(function(S,E){var R=d.validateSchema(S,p.contains,b,x.makeChild(p.contains,E));return R.errors.length===0});return h===!1&&w.addError({name:"contains",argument:p.contains,message:"must contain an item matching given schema"}),w}},s.minimum=function(g,p,b,x){if(this.types.number(g)){var d=new t(g,p,b,x);return p.exclusiveMinimum&&p.exclusiveMinimum===!0?g>p.minimum||d.addError({name:"minimum",argument:p.minimum,message:"must be greater than "+p.minimum}):g>=p.minimum||d.addError({name:"minimum",argument:p.minimum,message:"must be greater than or equal to "+p.minimum}),d}},s.maximum=function(g,p,b,x){if(this.types.number(g)){var d=new t(g,p,b,x);return p.exclusiveMaximum&&p.exclusiveMaximum===!0?g<p.maximum||d.addError({name:"maximum",argument:p.maximum,message:"must be less than "+p.maximum}):g<=p.maximum||d.addError({name:"maximum",argument:p.maximum,message:"must be less than or equal to "+p.maximum}),d}},s.exclusiveMinimum=function(g,p,b,x){if(typeof p.exclusiveMinimum!="boolean"&&this.types.number(g)){var d=new t(g,p,b,x),w=g>p.exclusiveMinimum;return w||d.addError({name:"exclusiveMinimum",argument:p.exclusiveMinimum,message:"must be strictly greater than "+p.exclusiveMinimum}),d}},s.exclusiveMaximum=function(g,p,b,x){if(typeof p.exclusiveMaximum!="boolean"&&this.types.number(g)){var d=new t(g,p,b,x),w=g<p.exclusiveMaximum;return w||d.addError({name:"exclusiveMaximum",argument:p.exclusiveMaximum,message:"must be strictly less than "+p.exclusiveMaximum}),d}};var f=function(g,p,b,x,d,w){if(this.types.number(g)){var h=p[d];if(h==0)throw new r(d+" cannot be zero");var S=new t(g,p,b,x),E=e.getDecimalPlaces(g),R=e.getDecimalPlaces(h),O=Math.max(E,R),k=Math.pow(10,O);return Math.round(g*k)%Math.round(h*k)!==0&&S.addError({name:d,argument:h,message:w+JSON.stringify(h)}),S}};s.multipleOf=function(g,p,b,x){return f.call(this,g,p,b,x,"multipleOf","is not a multiple of (divisible by) ")},s.divisibleBy=function(g,p,b,x){return f.call(this,g,p,b,x,"divisibleBy","is not divisible by (multiple of) ")},s.required=function(g,p,b,x){var d=new t(g,p,b,x);return g===void 0&&p.required===!0?d.addError({name:"required",message:"is required"}):this.types.object(g)&&Array.isArray(p.required)&&p.required.forEach(function(w){l(g,w)===void 0&&d.addError({name:"required",argument:w,message:"requires property "+JSON.stringify(w)})}),d},s.pattern=function(g,p,b,x){if(this.types.string(g)){var d=new t(g,p,b,x),w=p.pattern;try{var h=new RegExp(w,"u")}catch{h=new RegExp(w)}return g.match(h)||d.addError({name:"pattern",argument:p.pattern,message:"does not match pattern "+JSON.stringify(p.pattern.toString())}),d}},s.format=function(g,p,b,x){if(g!==void 0){var d=new t(g,p,b,x);return!d.disableFormat&&!e.isFormat(g,p.format,this)&&d.addError({name:"format",argument:p.format,message:"does not conform to the "+JSON.stringify(p.format)+" format"}),d}},s.minLength=function(g,p,b,x){if(this.types.string(g)){var d=new t(g,p,b,x),w=g.match(/[\uDC00-\uDFFF]/g),h=g.length-(w?w.length:0);return h>=p.minLength||d.addError({name:"minLength",argument:p.minLength,message:"does not meet minimum length of "+p.minLength}),d}},s.maxLength=function(g,p,b,x){if(this.types.string(g)){var d=new t(g,p,b,x),w=g.match(/[\uDC00-\uDFFF]/g),h=g.length-(w?w.length:0);return h<=p.maxLength||d.addError({name:"maxLength",argument:p.maxLength,message:"does not meet maximum length of "+p.maxLength}),d}},s.minItems=function(g,p,b,x){if(this.types.array(g)){var d=new t(g,p,b,x);return g.length>=p.minItems||d.addError({name:"minItems",argument:p.minItems,message:"does not meet minimum length of "+p.minItems}),d}},s.maxItems=function(g,p,b,x){if(this.types.array(g)){var d=new t(g,p,b,x);return g.length<=p.maxItems||d.addError({name:"maxItems",argument:p.maxItems,message:"does not meet maximum length of "+p.maxItems}),d}};function m(v,g,p){var b,x=p.length;for(b=g+1,x;b<x;b++)if(e.deepCompareStrict(v,p[b]))return!1;return!0}return s.uniqueItems=function(g,p,b,x){if(p.uniqueItems===!0&&this.types.array(g)){var d=new t(g,p,b,x);return g.every(m)||d.addError({name:"uniqueItems",message:"contains duplicate item"}),d}},s.dependencies=function(g,p,b,x){if(this.types.object(g)){var d=new t(g,p,b,x);for(var w in p.dependencies)if(g[w]!==void 0){var h=p.dependencies[w],S=x.makeChild(h,w);if(typeof h=="string"&&(h=[h]),Array.isArray(h))h.forEach(function(R){g[R]===void 0&&d.addError({name:"dependencies",argument:S.propertyPath,message:"property "+R+" not found, required by "+S.propertyPath})});else{var E=this.validateSchema(g,h,b,S);d.instance!==E.instance&&(d.instance=E.instance),E&&E.errors.length&&(d.addError({name:"dependencies",argument:S.propertyPath,message:"does not meet dependency required by "+S.propertyPath}),d.importErrors(E))}}return d}},s.enum=function(g,p,b,x){if(g===void 0)return null;if(!Array.isArray(p.enum))throw new r("enum expects an array",p);var d=new t(g,p,b,x);return p.enum.some(e.deepCompareStrict.bind(null,g))||d.addError({name:"enum",argument:p.enum,message:"is not one of enum values: "+p.enum.map(String).join(",")}),d},s.const=function(g,p,b,x){if(g===void 0)return null;var d=new t(g,p,b,x);return e.deepCompareStrict(p.const,g)||d.addError({name:"const",argument:p.const,message:"does not exactly match expected constant: "+p.const}),d},s.not=s.disallow=function(g,p,b,x){var d=this;if(g===void 0)return null;var w=new t(g,p,b,x),h=p.not||p.disallow;return h?(Array.isArray(h)||(h=[h]),h.forEach(function(S){if(d.testType(g,p,b,x,S)){var E=S&&(S.$id||S.id),R=E||S;w.addError({name:"not",argument:R,message:"is of prohibited type "+R})}}),w):null},nc=i,nc}var ta={},Pv;function kc(){if(Pv)return ta;Pv=1;var e=Fn();ta.SchemaScanResult=t;function t(r,i){this.id=r,this.ref=i}return ta.scan=function(i,s){function a(v,g){if(!g||typeof g!="object")return;if(g.$ref){let d=e.resolveUrl(v,g.$ref);m[d]=m[d]?m[d]+1:0;return}var p=g.$id||g.id;let b=e.resolveUrl(v,p);var x=p?b:v;if(x){if(x.indexOf("#")<0&&(x+="#"),f[x]){if(!e.deepCompareStrict(f[x],g))throw new Error("Schema <"+x+"> already exists with different definition");return f[x]}f[x]=g,x[x.length-1]=="#"&&(f[x.substring(0,x.length-1)]=g)}l(x+"/items",Array.isArray(g.items)?g.items:[g.items]),l(x+"/extends",Array.isArray(g.extends)?g.extends:[g.extends]),a(x+"/additionalItems",g.additionalItems),c(x+"/properties",g.properties),a(x+"/additionalProperties",g.additionalProperties),c(x+"/definitions",g.definitions),c(x+"/patternProperties",g.patternProperties),c(x+"/dependencies",g.dependencies),l(x+"/disallow",g.disallow),l(x+"/allOf",g.allOf),l(x+"/anyOf",g.anyOf),l(x+"/oneOf",g.oneOf),a(x+"/not",g.not)}function l(v,g){if(Array.isArray(g))for(var p=0;p<g.length;p++)a(v+"/"+p,g[p])}function c(v,g){if(!(!g||typeof g!="object"))for(var p in g)a(v+"/"+p,g[p])}var f={},m={};return a(i,s),new t(f,m)},ta}var ic,Cv;function n2(){if(Cv)return ic;Cv=1;var e=r2(),t=Fn(),r=kc().scan,i=t.ValidatorResult,s=t.ValidatorResultError,a=t.SchemaError,l=t.SchemaContext,c="/",f=function g(){this.customFormats=Object.create(g.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(v),this.attributes=Object.create(e.validators)};f.prototype.customFormats={},f.prototype.schemas=null,f.prototype.types=null,f.prototype.attributes=null,f.prototype.unresolvedRefs=null,f.prototype.addSchema=function(p,b){var x=this;if(!p)return null;var d=r(b||c,p),w=b||p.$id||p.id;for(var h in d.id)this.schemas[h]=d.id[h];for(var h in d.ref)this.unresolvedRefs.push(h);return this.unresolvedRefs=this.unresolvedRefs.filter(function(S){return typeof x.schemas[S]>"u"}),this.schemas[w]},f.prototype.addSubSchemaArray=function(p,b){if(Array.isArray(b))for(var x=0;x<b.length;x++)this.addSubSchema(p,b[x])},f.prototype.addSubSchemaObject=function(p,b){if(!(!b||typeof b!="object"))for(var x in b)this.addSubSchema(p,b[x])},f.prototype.setSchemas=function(p){this.schemas=p},f.prototype.getSchema=function(p){return this.schemas[p]},f.prototype.validate=function(p,b,x,d){if(typeof b!="boolean"&&typeof b!="object"||b===null)throw new a("Expected `schema` to be an object or boolean");x||(x={});var w=b.$id||b.id;let h=t.resolveUrl(x.base,w||"");if(!d){d=new l(b,x,[],h,Object.create(this.schemas)),d.schemas[h]||(d.schemas[h]=b);var S=r(h,b);for(var E in S.id){var R=S.id[E];d.schemas[E]=R}}if(x.required&&p===void 0){var O=new i(p,b,x,d);return O.addError("is required, but is undefined"),O}var O=this.validateSchema(p,b,x,d);if(O){if(x.throwAll&&O.errors.length)throw new s(O)}else throw new Error("Result undefined");return O};function m(g){var p=typeof g=="string"?g:g.$ref;return typeof p=="string"?p:!1}f.prototype.validateSchema=function(p,b,x,d){var w=new i(p,b,x,d);if(typeof b=="boolean")b===!0?b={}:b===!1&&(b={type:[]});else if(!b)throw new Error("schema is undefined");if(b.extends)if(Array.isArray(b.extends)){var h={schema:b,ctx:d};b.extends.forEach(this.schemaTraverser.bind(this,h)),b=h.schema,h.schema=null,h.ctx=null,h=null}else b=t.deepMerge(b,this.superResolve(b.extends,d));var S=m(b);if(S){var E=this.resolve(b,S,d),R=new l(E.subschema,x,d.path,E.switchSchema,d.schemas);return this.validateSchema(p,E.subschema,x,R)}var O=x&&x.skipAttributes||[];for(var k in b)if(!e.ignoreProperties[k]&&O.indexOf(k)<0){var B=null,M=this.attributes[k];if(M)B=M.call(this,p,b,x,d);else if(x.allowUnknownAttributes===!1)throw new a("Unsupported attribute: "+k,b);B&&w.importErrors(B)}if(typeof x.rewrite=="function"){var F=x.rewrite.call(this,p,b,x,d);w.instance=F}return w},f.prototype.schemaTraverser=function(p,b){p.schema=t.deepMerge(p.schema,this.superResolve(b,p.ctx))},f.prototype.superResolve=function(p,b){var x=m(p);return x?this.resolve(p,x,b).subschema:p},f.prototype.resolve=function(p,b,x){if(b=x.resolve(b),x.schemas[b])return{subschema:x.schemas[b],switchSchema:b};let w=new URL(b,"thismessage::/").hash;var h=w&&w.length&&b.substr(0,b.length-w.length);if(!h||!x.schemas[h])throw new a("no such schema <"+b+">",p);var S=t.objectGetPath(x.schemas[h],w.substr(1));if(S===void 0)throw new a("no such schema "+w+" located in <"+h+">",p);return{subschema:S,switchSchema:b}},f.prototype.testType=function(p,b,x,d,w){if(w!==void 0){if(w===null)throw new a('Unexpected null in "type" keyword');if(typeof this.types[w]=="function")return this.types[w].call(this,p);if(w&&typeof w=="object"){var h=this.validateSchema(p,w,x,d);return h===void 0||!(h&&h.errors.length)}return!0}};var v=f.prototype.types={};return v.string=function(p){return typeof p=="string"},v.number=function(p){return typeof p=="number"&&isFinite(p)},v.integer=function(p){return typeof p=="number"&&p%1===0},v.boolean=function(p){return typeof p=="boolean"},v.array=function(p){return Array.isArray(p)},v.null=function(p){return p===null},v.date=function(p){return p instanceof Date},v.any=function(p){return!0},v.object=function(p){return p&&typeof p=="object"&&!Array.isArray(p)&&!(p instanceof Date)},ic=f,ic}var kv;function i2(){if(kv)return xr;kv=1;var e=xr.Validator=n2();return xr.ValidatorResult=Fn().ValidatorResult,xr.ValidatorResultError=Fn().ValidatorResultError,xr.ValidationError=Fn().ValidationError,xr.SchemaError=Fn().SchemaError,xr.SchemaScanResult=kc().SchemaScanResult,xr.scan=kc().scan,xr.validate=function(t,r,i){var s=new e;return s.validate(t,r,i)},xr}var o2=i2();const p0=(e,t,r)=>{const i=e instanceof RegExp?$v(e,r):e,s=t instanceof RegExp?$v(t,r):t,a=i!==null&&s!=null&&s2(i,s,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+i.length,a[1]),post:r.slice(a[1]+s.length)}},$v=(e,t)=>{const r=t.match(e);return r?r[0]:null},s2=(e,t,r)=>{let i,s,a,l,c,f=r.indexOf(e),m=r.indexOf(t,f+1),v=f;if(f>=0&&m>0){if(e===t)return[f,m];for(i=[],a=r.length;v>=0&&!c;){if(v===f)i.push(v),f=r.indexOf(e,v+1);else if(i.length===1){const g=i.pop();g!==void 0&&(c=[g,m])}else s=i.pop(),s!==void 0&&s<a&&(a=s,l=m),m=r.indexOf(t,v+1);v=f<m&&f>=0?f:m}i.length&&l!==void 0&&(c=[a,l])}return c},h0="\0SLASH"+Math.random()+"\0",g0="\0OPEN"+Math.random()+"\0",Rf="\0CLOSE"+Math.random()+"\0",v0="\0COMMA"+Math.random()+"\0",m0="\0PERIOD"+Math.random()+"\0",a2=new RegExp(h0,"g"),u2=new RegExp(g0,"g"),l2=new RegExp(Rf,"g"),c2=new RegExp(v0,"g"),f2=new RegExp(m0,"g"),d2=/\\\\/g,p2=/\\{/g,h2=/\\}/g,g2=/\\,/g,v2=/\\./g;function oc(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function m2(e){return e.replace(d2,h0).replace(p2,g0).replace(h2,Rf).replace(g2,v0).replace(v2,m0)}function y2(e){return e.replace(a2,"\\").replace(u2,"{").replace(l2,"}").replace(c2,",").replace(f2,".")}function y0(e){if(!e)return[""];const t=[],r=p0("{","}",e);if(!r)return e.split(",");const{pre:i,body:s,post:a}=r,l=i.split(",");l[l.length-1]+="{"+s+"}";const c=y0(a);return a.length&&(l[l.length-1]+=c.shift(),l.push.apply(l,c)),t.push.apply(t,l),t}function b2(e){return e?(e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),yo(m2(e),!0).map(y2)):[]}function w2(e){return"{"+e+"}"}function x2(e){return/^-?0\d/.test(e)}function S2(e,t){return e<=t}function E2(e,t){return e>=t}function yo(e,t){const r=[],i=p0("{","}",e);if(!i)return[e];const s=i.pre,a=i.post.length?yo(i.post,!1):[""];if(/\$$/.test(i.pre))for(let l=0;l<a.length;l++){const c=s+"{"+i.body+"}"+a[l];r.push(c)}else{const l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),f=l||c,m=i.body.indexOf(",")>=0;if(!f&&!m)return i.post.match(/,(?!,).*\}/)?(e=i.pre+"{"+i.body+Rf+i.post,yo(e)):[e];let v;if(f)v=i.body.split(/\.\./);else if(v=y0(i.body),v.length===1&&v[0]!==void 0&&(v=yo(v[0],!1).map(w2),v.length===1))return a.map(p=>i.pre+v[0]+p);let g;if(f&&v[0]!==void 0&&v[1]!==void 0){const p=oc(v[0]),b=oc(v[1]),x=Math.max(v[0].length,v[1].length);let d=v.length===3&&v[2]!==void 0?Math.abs(oc(v[2])):1,w=S2;b<p&&(d*=-1,w=E2);const S=v.some(x2);g=[];for(let E=p;w(E,b);E+=d){let R;if(c)R=String.fromCharCode(E),R==="\\"&&(R="");else if(R=String(E),S){const O=x-R.length;if(O>0){const k=new Array(O+1).join("0");E<0?R="-"+k+R.slice(1):R=k+R}}g.push(R)}}else{g=[];for(let p=0;p<v.length;p++)g.push.apply(g,yo(v[p],!1))}for(let p=0;p<g.length;p++)for(let b=0;b<a.length;b++){const x=s+g[p]+a[b];(!t||f||x)&&r.push(x)}}return r}const _2=1024*64,Ta=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>_2)throw new TypeError("pattern is too long")},O2={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},po=e=>e.replace(/[[\]\\-]/g,"\\$&"),A2=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Iv=e=>e.join(""),T2=(e,t)=>{const r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");const i=[],s=[];let a=r+1,l=!1,c=!1,f=!1,m=!1,v=r,g="";e:for(;a<e.length;){const d=e.charAt(a);if((d==="!"||d==="^")&&a===r+1){m=!0,a++;continue}if(d==="]"&&l&&!f){v=a+1;break}if(l=!0,d==="\\"&&!f){f=!0,a++;continue}if(d==="["&&!f){for(const[w,[h,S,E]]of Object.entries(O2))if(e.startsWith(w,a)){if(g)return["$.",!1,e.length-r,!0];a+=w.length,E?s.push(h):i.push(h),c=c||S;continue e}}if(f=!1,g){d>g?i.push(po(g)+"-"+po(d)):d===g&&i.push(po(d)),g="",a++;continue}if(e.startsWith("-]",a+1)){i.push(po(d+"-")),a+=2;continue}if(e.startsWith("-",a+1)){g=d,a+=2;continue}i.push(po(d)),a++}if(v<a)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,e.length-r,!0];if(s.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!m){const d=i[0].length===2?i[0].slice(-1):i[0];return[A2(d),!1,v-r,!1]}const p="["+(m?"^":"")+Iv(i)+"]",b="["+(m?"":"^")+Iv(s)+"]";return[i.length&&s.length?"("+p+"|"+b+")":i.length?p:b,c,v-r,!0]},bo=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),R2=new Set(["!","?","+","*","@"]),Lv=e=>R2.has(e),P2="(?!(?:^|/)\\.\\.?(?:$|/))",ra="(?!\\.)",C2=new Set(["[","."]),k2=new Set(["..","."]),$2=new Set("().*{}+?[]^$\\!"),I2=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Pf="[^/]",Mv=Pf+"*?",Fv=Pf+"+?";var at,ct,qr,He,nt,fn,Dn,dn,Er,Nn,Mo,qn,b0,gn,pa,$c,w0;const Tt=class Tt{constructor(t,r,i={}){xt(this,qn);me(this,"type");xt(this,at);xt(this,ct);xt(this,qr,!1);xt(this,He,[]);xt(this,nt);xt(this,fn);xt(this,Dn);xt(this,dn,!1);xt(this,Er);xt(this,Nn);xt(this,Mo,!1);this.type=t,t&&Ye(this,ct,!0),Ye(this,nt,r),Ye(this,at,re(this,nt)?re(re(this,nt),at):this),Ye(this,Er,re(this,at)===this?i:re(re(this,at),Er)),Ye(this,Dn,re(this,at)===this?[]:re(re(this,at),Dn)),t==="!"&&!re(re(this,at),dn)&&re(this,Dn).push(this),Ye(this,fn,re(this,nt)?re(re(this,nt),He).length:0)}get hasMagic(){if(re(this,ct)!==void 0)return re(this,ct);for(const t of re(this,He))if(typeof t!="string"&&(t.type||t.hasMagic))return Ye(this,ct,!0);return re(this,ct)}toString(){return re(this,Nn)!==void 0?re(this,Nn):this.type?Ye(this,Nn,this.type+"("+re(this,He).map(t=>String(t)).join("|")+")"):Ye(this,Nn,re(this,He).map(t=>String(t)).join(""))}push(...t){for(const r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Tt&&re(r,nt)===this))throw new Error("invalid part: "+r);re(this,He).push(r)}}toJSON(){var r;const t=this.type===null?re(this,He).slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...re(this,He).map(i=>i.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===re(this,at)||re(re(this,at),dn)&&((r=re(this,nt))==null?void 0:r.type)==="!")&&t.push({}),t}isStart(){var r;if(re(this,at)===this)return!0;if(!((r=re(this,nt))!=null&&r.isStart()))return!1;if(re(this,fn)===0)return!0;const t=re(this,nt);for(let i=0;i<re(this,fn);i++){const s=re(t,He)[i];if(!(s instanceof Tt&&s.type==="!"))return!1}return!0}isEnd(){var r,i,s;if(re(this,at)===this||((r=re(this,nt))==null?void 0:r.type)==="!")return!0;if(!((i=re(this,nt))!=null&&i.isEnd()))return!1;if(!this.type)return(s=re(this,nt))==null?void 0:s.isEnd();const t=re(this,nt)?re(re(this,nt),He).length:0;return re(this,fn)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const r=new Tt(this.type,t);for(const i of re(this,He))r.copyIn(i);return r}static fromGlob(t,r={}){var s;const i=new Tt(null,void 0,r);return $e(s=Tt,gn,pa).call(s,t,i,0,r),i}toMMPattern(){if(this!==re(this,at))return re(this,at).toMMPattern();const t=this.toString(),[r,i,s,a]=this.toRegExpSource();if(!(s||re(this,ct)||re(this,Er).nocase&&!re(this,Er).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;const c=(re(this,Er).nocase?"i":"")+(a?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return re(this,Er)}toRegExpSource(t){var f;const r=t??!!re(this,Er).dot;if(re(this,at)===this&&$e(this,qn,b0).call(this),!this.type){const m=this.isStart()&&this.isEnd(),v=re(this,He).map(x=>{var E;const[d,w,h,S]=typeof x=="string"?$e(E=Tt,gn,w0).call(E,x,re(this,ct),m):x.toRegExpSource(t);return Ye(this,ct,re(this,ct)||h),Ye(this,qr,re(this,qr)||S),d}).join("");let g="";if(this.isStart()&&typeof re(this,He)[0]=="string"&&!(re(this,He).length===1&&k2.has(re(this,He)[0]))){const d=C2,w=r&&d.has(v.charAt(0))||v.startsWith("\\.")&&d.has(v.charAt(2))||v.startsWith("\\.\\.")&&d.has(v.charAt(4)),h=!r&&!t&&d.has(v.charAt(0));g=w?P2:h?ra:""}let p="";return this.isEnd()&&re(re(this,at),dn)&&((f=re(this,nt))==null?void 0:f.type)==="!"&&(p="(?:$|\\/)"),[g+v+p,bo(v),Ye(this,ct,!!re(this,ct)),re(this,qr)]}const i=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let a=$e(this,qn,$c).call(this,r);if(this.isStart()&&this.isEnd()&&!a&&this.type!=="!"){const m=this.toString();return Ye(this,He,[m]),this.type=null,Ye(this,ct,void 0),[m,bo(this.toString()),!1,!1]}let l=!i||t||r||!ra?"":$e(this,qn,$c).call(this,!0);l===a&&(l=""),l&&(a=`(?:${a})(?:${l})*?`);let c="";if(this.type==="!"&&re(this,Mo))c=(this.isStart()&&!r?ra:"")+Fv;else{const m=this.type==="!"?"))"+(this.isStart()&&!r&&!t?ra:"")+Mv+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&l?")":this.type==="*"&&l?")?":`)${this.type}`;c=s+a+m}return[c,bo(a),Ye(this,ct,!!re(this,ct)),re(this,qr)]}};at=new WeakMap,ct=new WeakMap,qr=new WeakMap,He=new WeakMap,nt=new WeakMap,fn=new WeakMap,Dn=new WeakMap,dn=new WeakMap,Er=new WeakMap,Nn=new WeakMap,Mo=new WeakMap,qn=new WeakSet,b0=function(){if(this!==re(this,at))throw new Error("should only call on root");if(re(this,dn))return this;this.toString(),Ye(this,dn,!0);let t;for(;t=re(this,Dn).pop();){if(t.type!=="!")continue;let r=t,i=re(r,nt);for(;i;){for(let s=re(r,fn)+1;!i.type&&s<re(i,He).length;s++)for(const a of re(t,He)){if(typeof a=="string")throw new Error("string part in extglob AST??");a.copyIn(re(i,He)[s])}r=i,i=re(r,nt)}}return this},gn=new WeakSet,pa=function(t,r,i,s){var b,x;let a=!1,l=!1,c=-1,f=!1;if(r.type===null){let d=i,w="";for(;d<t.length;){const h=t.charAt(d++);if(a||h==="\\"){a=!a,w+=h;continue}if(l){d===c+1?(h==="^"||h==="!")&&(f=!0):h==="]"&&!(d===c+2&&f)&&(l=!1),w+=h;continue}else if(h==="["){l=!0,c=d,f=!1,w+=h;continue}if(!s.noext&&Lv(h)&&t.charAt(d)==="("){r.push(w),w="";const S=new Tt(h,r);d=$e(b=Tt,gn,pa).call(b,t,S,d,s),r.push(S);continue}w+=h}return r.push(w),d}let m=i+1,v=new Tt(null,r);const g=[];let p="";for(;m<t.length;){const d=t.charAt(m++);if(a||d==="\\"){a=!a,p+=d;continue}if(l){m===c+1?(d==="^"||d==="!")&&(f=!0):d==="]"&&!(m===c+2&&f)&&(l=!1),p+=d;continue}else if(d==="["){l=!0,c=m,f=!1,p+=d;continue}if(Lv(d)&&t.charAt(m)==="("){v.push(p),p="";const w=new Tt(d,v);v.push(w),m=$e(x=Tt,gn,pa).call(x,t,w,m,s);continue}if(d==="|"){v.push(p),p="",g.push(v),v=new Tt(null,r);continue}if(d===")")return p===""&&re(r,He).length===0&&Ye(r,Mo,!0),v.push(p),p="",r.push(...g,v),m;p+=d}return r.type=null,Ye(r,ct,void 0),Ye(r,He,[t.substring(i-1)]),m},$c=function(t){return re(this,He).map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");const[i,s,a,l]=r.toRegExpSource(t);return Ye(this,qr,re(this,qr)||l),i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")},w0=function(t,r,i=!1){let s=!1,a="",l=!1;for(let c=0;c<t.length;c++){const f=t.charAt(c);if(s){s=!1,a+=($2.has(f)?"\\":"")+f;continue}if(f==="\\"){c===t.length-1?a+="\\\\":s=!0;continue}if(f==="["){const[m,v,g,p]=T2(t,c);if(g){a+=m,l=l||v,c+=g-1,r=r||p;continue}}if(f==="*"){i&&t==="*"?a+=Fv:a+=Mv,r=!0;continue}if(f==="?"){a+=Pf,r=!0;continue}a+=I2(f)}return[a,bo(t),!!r,l]},xt(Tt,gn);let Ra=Tt;const L2=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Et=(e,t,r={})=>(Ta(t),!r.nocomment&&t.charAt(0)==="#"?!1:new qa(t,r).match(e)),M2=/^\*+([^+@!?\*\[\(]*)$/,F2=e=>t=>!t.startsWith(".")&&t.endsWith(e),D2=e=>t=>t.endsWith(e),N2=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),j2=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),z2=/^\*+\.\*+$/,W2=e=>!e.startsWith(".")&&e.includes("."),B2=e=>e!=="."&&e!==".."&&e.includes("."),U2=/^\.\*+$/,H2=e=>e!=="."&&e!==".."&&e.startsWith("."),q2=/^\*+$/,Z2=e=>e.length!==0&&!e.startsWith("."),G2=e=>e.length!==0&&e!=="."&&e!=="..",K2=/^\?+([^+@!?\*\[\(]*)?$/,V2=([e,t=""])=>{const r=x0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},X2=([e,t=""])=>{const r=S0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},Y2=([e,t=""])=>{const r=S0([e]);return t?i=>r(i)&&i.endsWith(t):r},J2=([e,t=""])=>{const r=x0([e]);return t?i=>r(i)&&i.endsWith(t):r},x0=([e])=>{const t=e.length;return r=>r.length===t&&!r.startsWith(".")},S0=([e])=>{const t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},E0=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Dv={win32:{sep:"\\"},posix:{sep:"/"}},Q2=E0==="win32"?Dv.win32.sep:Dv.posix.sep;Et.sep=Q2;const nr=Symbol("globstar **");Et.GLOBSTAR=nr;const eL="[^/]",tL=eL+"*?",rL="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",nL="(?:(?!(?:\\/|^)\\.).)*?",iL=(e,t={})=>r=>Et(r,e,t);Et.filter=iL;const rr=(e,t={})=>Object.assign({},e,t),oL=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Et;const t=Et;return Object.assign((i,s,a={})=>t(i,s,rr(e,a)),{Minimatch:class extends t.Minimatch{constructor(s,a={}){super(s,rr(e,a))}static defaults(s){return t.defaults(rr(e,s)).Minimatch}},AST:class extends t.AST{constructor(s,a,l={}){super(s,a,rr(e,l))}static fromGlob(s,a={}){return t.AST.fromGlob(s,rr(e,a))}},unescape:(i,s={})=>t.unescape(i,rr(e,s)),escape:(i,s={})=>t.escape(i,rr(e,s)),filter:(i,s={})=>t.filter(i,rr(e,s)),defaults:i=>t.defaults(rr(e,i)),makeRe:(i,s={})=>t.makeRe(i,rr(e,s)),braceExpand:(i,s={})=>t.braceExpand(i,rr(e,s)),match:(i,s,a={})=>t.match(i,s,rr(e,a)),sep:t.sep,GLOBSTAR:nr})};Et.defaults=oL;const _0=(e,t={})=>(Ta(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:b2(e));Et.braceExpand=_0;const sL=(e,t={})=>new qa(e,t).makeRe();Et.makeRe=sL;const aL=(e,t,r={})=>{const i=new qa(t,r);return e=e.filter(s=>i.match(s)),i.options.nonull&&!e.length&&e.push(t),e};Et.match=aL;const Nv=/[?*]|[+@!]\(.*?\)|\[|\]/,uL=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class qa{constructor(t,r={}){me(this,"options");me(this,"set");me(this,"pattern");me(this,"windowsPathsNoEscape");me(this,"nonegate");me(this,"negate");me(this,"comment");me(this,"empty");me(this,"preserveMultipleSlashes");me(this,"partial");me(this,"globSet");me(this,"globParts");me(this,"nocase");me(this,"isWindows");me(this,"platform");me(this,"windowsNoMagicRoot");me(this,"regexp");Ta(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||E0,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...a)=>console.error(...a)),this.debug(this.pattern,this.globSet);const i=this.globSet.map(a=>this.slashSplit(a));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((a,l,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){const f=a[0]===""&&a[1]===""&&(a[2]==="?"||!Nv.test(a[2]))&&!Nv.test(a[3]),m=/^[a-z]:/i.test(a[0]);if(f)return[...a.slice(0,4),...a.slice(4).map(v=>this.parse(v))];if(m)return[a[0],...a.slice(1).map(v=>this.parse(v))]}return a.map(f=>this.parse(f))});if(this.debug(this.pattern,s),this.set=s.filter(a=>a.indexOf(!1)===-1),this.isWindows)for(let a=0;a<this.set.length;a++){const l=this.set[a];l[0]===""&&l[1]===""&&this.globParts[a][2]==="?"&&typeof l[3]=="string"&&/^[a-z]:$/i.test(l[3])&&(l[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let s=0;s<t[i].length;s++)t[i][s]==="**"&&(t[i][s]="*");const{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let s=i;for(;r[s+1]==="**";)s++;s!==i&&r.splice(i,s-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,s)=>{const a=i[i.length-1];return s==="**"&&a==="**"?i:s===".."&&a&&a!==".."&&a!=="."&&a!=="**"?(i.pop(),i):(i.push(s),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const a=t[s];s===1&&a===""&&t[0]===""||(a==="."||a==="")&&(r=!0,t.splice(s,1),s--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){const s=t[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let s=-1;for(;(s=i.indexOf("**",s+1))!==-1;){let l=s;for(;i[l+1]==="**";)l++;l>s&&i.splice(s+1,l-s);let c=i[s+1];const f=i[s+2],m=i[s+3];if(c!==".."||!f||f==="."||f===".."||!m||m==="."||m==="..")continue;r=!0,i.splice(s,1);const v=i.slice(0);v[s]="**",t.push(v),s--}if(!this.preserveMultipleSlashes){for(let l=1;l<i.length-1;l++){const c=i[l];l===1&&c===""&&i[0]===""||(c==="."||c==="")&&(r=!0,i.splice(l,1),l--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let a=0;for(;(a=i.indexOf("..",a+1))!==-1;){const l=i[a-1];if(l&&l!=="."&&l!==".."&&l!=="**"){r=!0;const f=a===1&&i[a+1]==="**"?["."]:[];i.splice(a-1,2,...f),i.length===0&&i.push(""),a-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){const s=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(s){t[r]=[],t[i]=s;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let s=0,a=0,l=[],c="";for(;s<t.length&&a<r.length;)if(t[s]===r[a])l.push(c==="b"?r[a]:t[s]),s++,a++;else if(i&&t[s]==="**"&&r[a]===t[s+1])l.push(t[s]),s++;else if(i&&r[a]==="**"&&t[s]===r[a+1])l.push(r[a]),a++;else if(t[s]==="*"&&r[a]&&(this.options.dot||!r[a].startsWith("."))&&r[a]!=="**"){if(c==="b")return!1;c="a",l.push(t[s]),s++,a++}else if(r[a]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(c==="a")return!1;c="b",l.push(r[a]),s++,a++}else return!1;return t.length===r.length&&l}parseNegate(){if(this.nonegate)return;const t=this.pattern;let r=!1,i=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){const s=this.options;if(this.isWindows){const d=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),w=!d&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),h=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),S=!h&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),E=w?3:d?0:void 0,R=S?3:h?0:void 0;if(typeof E=="number"&&typeof R=="number"){const[O,k]=[t[E],r[R]];O.toLowerCase()===k.toLowerCase()&&(r[R]=O,R>E?r=r.slice(R):E>R&&(t=t.slice(E)))}}const{optimizationLevel:a=1}=this.options;a>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var l=0,c=0,f=t.length,m=r.length;l<f&&c<m;l++,c++){this.debug("matchOne loop");var v=r[c],g=t[l];if(this.debug(r,v,g),v===!1)return!1;if(v===nr){this.debug("GLOBSTAR",[r,v,g]);var p=l,b=c+1;if(b===m){for(this.debug("** at the end");l<f;l++)if(t[l]==="."||t[l]===".."||!s.dot&&t[l].charAt(0)===".")return!1;return!0}for(;p<f;){var x=t[p];if(this.debug(`
|
|
206
206
|
globstar while`,t,p,r,b,x),this.matchOne(t.slice(p),r.slice(b),i))return this.debug("globstar found match!",p,f,x),!0;if(x==="."||x===".."||!s.dot&&x.charAt(0)==="."){this.debug("dot detected!",t,p,r,b);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(i&&(this.debug(`
|
|
207
|
-
>>> no match, partial?`,t,p,r,b),p===f))}let d;if(typeof v=="string"?(d=g===v,this.debug("string match",v,g,d)):(d=v.test(g),this.debug("pattern match",v,g,d)),!d)return!1}if(l===f&&c===m)return!0;if(l===f)return i;if(c===m)return l===f-1&&t[l]==="";throw new Error("wtf?")}braceExpand(){return _0(this.pattern,this.options)}parse(t){Ta(t);const r=this.options;if(t==="**")return nr;if(t==="")return"";let i,s=null;(i=t.match(H2))?s=r.dot?Z2:q2:(i=t.match(L2))?s=(r.nocase?r.dot?N2:D2:r.dot?F2:M2)(i[1]):(i=t.match(G2))?s=(r.nocase?r.dot?V2:K2:r.dot?X2:Y2)(i):(i=t.match(j2))?s=r.dot?W2:z2:(i=t.match(B2))&&(s=U2);const a=Ra.fromGlob(t,this.options).toMMPattern();return s&&typeof a=="object"&&Reflect.defineProperty(a,"test",{value:s}),a}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const r=this.options,i=r.noglobstar?eL:r.dot?tL:rL,s=new Set(r.nocase?["i"]:[]);let a=t.map(f=>{const m=f.map(v=>{if(v instanceof RegExp)for(const g of v.flags.split(""))s.add(g);return typeof v=="string"?aL(v):v===nr?nr:v._src});return m.forEach((v,g)=>{const p=m[g+1],b=m[g-1];v!==nr||b===nr||(b===void 0?p!==void 0&&p!==nr?m[g+1]="(?:\\/|"+i+"\\/)?"+p:m[g]=i:p===void 0?m[g-1]=b+"(?:\\/|"+i+")?":p!==nr&&(m[g-1]=b+"(?:\\/|\\/"+i+"\\/)"+p,m[g+1]=nr))}),m.filter(v=>v!==nr).join("/")}).join("|");const[l,c]=t.length>1?["(?:",")"]:["",""];a="^"+l+a+c+"$",this.negate&&(a="^(?!"+a+").+$");try{this.regexp=new RegExp(a,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;const i=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const a=this.set;this.debug(this.pattern,"set",a);let l=s[s.length-1];if(!l)for(let c=s.length-2;!l&&c>=0;c--)l=s[c];for(let c=0;c<a.length;c++){const f=a[c];let m=s;if(i.matchBase&&f.length===1&&(m=[l]),this.matchOne(m,f,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return Et.defaults(t).Minimatch}}Et.AST=Ra;Et.Minimatch=qa;Et.escape=I2;Et.unescape=bo;const Lo="/$shared",uL={"**/saved_conditions.json":{parser:"json",content:{conditions:[]},schema:{type:"object",properties:{conditions:{type:"array",items:{type:"object"}}},required:["conditions"]}},"**/shared_datasources.json":{parser:"json",content:{},schema:{type:"object",additionalProperties:!0,patternProperties:{"^.*$":{type:"array"}}}},"**/shared_css.json":{parser:"json",content:{classes:[]},schema:{type:"object",properties:{classes:{type:"array",items:{type:"object"}}},required:["classes"]}},"**/shared_app_events.json":{parser:"json",content:[]},"**/CustomComponents/manifest.json":{parser:"json",content:[],schema:{type:"array",items:{type:"object"}}},"**/crafted_components.json":{parser:"json",content:[],schema:{type:"array"}},"**/HTTPHandlers.json":{parser:"json",content:[],schema:{type:"array"}},"**/i18n.json":{parser:"json",content:{keys:{},userLang:{primary:"",supported:[]}},schema:{type:"object",properties:{keys:{type:"object"},userLang:{type:"object",properties:{primary:{type:"string"},supported:{type:"array",items:{type:"string"}}},required:["primary","supported"]}},required:["keys","userLang"]}},"**/*.json":{parser:"json",content:{}}};function O0(e){const t=Object.entries(uL).find(([r])=>Et(e,r));return t==null?void 0:t[1]}function Za(e){var i;const t=(i=O0(e))==null?void 0:i.content;if(!t)return;const r=e.replace(`${Lo}/`,"Shared/");Cf({name:r,content:t,asText:typeof t=="string"})}async function lL(){const e=["CustomComponents/manifest.json","shared_app_events.json","shared_css.json","saved_conditions.json","i18n.json"];for(const t of e)try{await Me(`${Lo}/${t}?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}catch(r){A0(r)&&Za(`${Lo}/${t}`)}}function Ho({path:e,createIfNotExists:t=!1}){const r=`${Lo}/${e}`;return Me(`${r}?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})}).then(i=>{const s=O0(e);let a=i;if(!s)return a;if(typeof a=="string")try{switch(s.parser){case"json":a=JSON.parse(a);break;default:break}}catch{throw new Error("Cannot parse")}if(s.schema&&!new i2.Validator().validate(a,s.schema).valid)throw new Error("Invalid Schema");return a}).catch(i=>{if(A0(i)&&t){const s=cL(i,e);Zy.next({message:s,kind:"warning"}),Za(r)}throw i})}function A0(e){var t;return((t=e==null?void 0:e.response)==null?void 0:t.status)===404||(e==null?void 0:e.message)==="Invalid Schema"||(e==null?void 0:e.message)==="Cannot parse"||(e==null?void 0:e.name)==="SyntaxError"}function cL(e,t){var r;switch(!0){case((e==null?void 0:e.message)==="Cannot parse "||(e==null?void 0:e.name)==="SyntaxError"):return`Cannot parse file '${t}', resetting...`;case(e==null?void 0:e.message)==="Invalid Schema":return`File '${t}' is corrupt, resetting...`;case((r=e==null?void 0:e.response)==null?void 0:r.status)===404:return`File '${t}' not found, creating...`;default:return e==null?void 0:e.message}}function fL(e){return Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function dL(e){return Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}const T0=()=>{const{host:e,protocol:t}=window.location,r=t==="https:";return{projectOpened:!1,remoteDebuggerMode:_f.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${r?"s":""}://${e}/remoteDebugger`,lsp:`ws${r?"s":""}://${e}/LSP`},isRestActive:!0}};async function pL(){const{hostname:e,host:t,protocol:r}=window.location,i=r==="https:";try{const s=await Me(it,{method:"POST",body:JSON.stringify({verb:bn.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),a=(()=>{if(s.rendererPath)return s.rendererPath;const l=`http://${e}:${s.webServerHTTPPort}`,c=`https://${e}:${s.webServerHTTPSPort}`;return s.webServerHTTPPort&&s.webServerHTTPSPort?i?c:l:s.webServerHTTPPort?l:c})();return{projectOpened:s.webServerHTTPSPort>0||s.webServerHTTPPort>0,remoteDebuggerMode:s.remoteDebuggerMode,baseUrl:a,qodly:typeof s.qodly>"u"?!0:s.qodly,urls:{renderer:s.rendererPath||`${a}/$lib/renderer/`,debugger:`ws${i?"s":""}://${t}/remoteDebugger`,lsp:`ws${i?"s":""}://${t}/LSP`},isRestActive:s.isRESTActive}}catch(s){return console.error(s),T0()}}async function R0(e){return await Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function hL(...e){return(await Promise.all(e.map(i=>R0({root:i,verb:bn.GET_FOLDER})))).map(({children:i})=>i.map(({name:s,date:a,type:l})=>({name:s,type:l,date:a,path:`${l}/${s}`}))).flat()}function gL(e,t={}){const{sanitize:r=!0}=t;return Me(`/rest/$getWebForm/${e}`,{method:"GET"}).then(i=>{if(!(i!=null&&i.components)||!r)return i;const s=new Map;return{...i,components:rt.entries(i.components).map(([a,l])=>{const c=a,{resolvedName:f}=l.type;if(f==="WebformLoader"){const m=Bc.generate();s.set(a,m),a=m}return[a,l,c]}).reduce((a,[l,c,f])=>{var m;return c.nodes&&(c.nodes=c.nodes.map(v=>s.get(v)||v)),c.linkedNodes&&(c.linkedNodes=rt.entries(c.linkedNodes).reduce((v,[g,p])=>({...v,[g]:s.get(p)||p}),{})),(m=c.props)!=null&&m.events&&(c.props.events=c.props.events.map(v=>(v.type==="navigation"&&v.loader&&(v.loader=s.get(v.loader)||v.loader),v))),{...a,[l]:{...c,props:{...c.props,__originalID:f}}}},{})}})}function vL(e){return Me(it,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(t=>({...t,content:[ft.METHOD,ft.CLASS].includes(t.type)?Ha(t.content):t.content}))}function mL(e){return e.type==="folder"?Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}):Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function yL(e){return e.type==="folder"?(await Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}function bL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function wL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function xL(e){return(await Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function SL(...e){return await Me(it,{method:"POST",body:JSON.stringify({verb:bn.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function EL(e){const t=await Me("/api/login",{method:"POST",body:JSON.stringify({accessKey:e}),headers:new Headers({"Content-Type":"application/json"})});return t.isLogged&&t.success}async function _L(){return await Me("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function OL(e){try{const t=process.env.NODE_ENV==="development"?"/i18n/languages.json":`/$lib/${e?"studio":"renderer"}/i18n/languages.json`,i=await(await fetch(t)).text(),{supported:s}=JSON.parse(i);return s}catch{return[]}}async function AL({name:e,path:t="",root:r="root",asText:i=!1}){return Me(it,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:r,path:t,name:e,asText:i}),headers:new Headers({"Content-Type":"application/json"})})}async function TL(e={}){try{return await Ho({path:"shared_datasources.json",...e})}catch{return{}}}async function RL(e={}){try{return await Ho({path:"shared_app_events.json",...e})}catch{return[]}}async function PL(e={}){try{return await Ho({path:"shared_css.json",...e})}catch{return{classes:[]}}}async function CL(e={}){try{return await Ho({path:"saved_conditions.json",...e})}catch{return{conditions:[]}}}async function kL(){try{return await Me("/rest/$info/privileges",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}catch{return{privileges:[]}}}async function $L(){try{return await(await fetch(`monaco_theme.json?t=${Date.now()}`)).json()}catch{return null}}const IL=Af(),LL=async e=>{const t={verb:bn.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return IL(async()=>(await Me(it,{method:"POST",body:JSON.stringify(t),headers:new Headers({"Content-Type":"application/json"})}),e))},ML=Af(),FL=async e=>{const t={verb:bn.SET_FILE_CONTENT,asText:!1,name:"shared_app_events.json",path:"",root:"shared",content:e};return ML(async()=>(await Me(it,{method:"POST",body:JSON.stringify(t),headers:new Headers({"Content-Type":"application/json"})}),e))},Cf=async e=>{const t=await Me(it,{method:"POST",body:JSON.stringify({...e,verb:bn.SET_FILE_CONTENT,root:Ef.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),r=Of(`${e.path||"Sources"}/${e.name}`);return{...t,type:r,size:0}},DL=async e=>await Cf({name:"crafted_components.json",path:hn.WEBFORMS,content:e});function NL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function jL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function zL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function WL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(t=>Array.isArray(t)?t:{...t,content:["4dm","4qm","4qs"].includes(t.ext)?Ha(t.content):t.content}).catch(t=>{var r,i;throw((i=(r=t.data)==null?void 0:r.__ERROR[0])==null?void 0:i.errCode)===1839&&Za(e.path),t})}function BL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function UL(e){const t=new RegExp(/^\((.+)(?=\))/gi).exec(e);return t!==null?t[1]:""}function HL(e){const t=new RegExp(/(->)(.*)/gi).exec(e);if(t!==null)return t[0].replace("->","");const r=/:([^)]*)$/.exec(e);return r!==null?`result : ${r[1].trim()}`:""}function qL(e){const t=UL(e).split(/[;,]/g).filter(Boolean).map(s=>{const a=s.split(":")[0].trim(),l=s.split(":")[1].trim();return{name:a,type:l}}),r=HL(e),i=r?{name:r.split(":")[0].trim(),type:r.split(":")[1].trim()}:{name:"result",type:"Variable"};return{params:t,result:i}}async function ZL(e,t){const i=e.split(".").pop();try{const s=await Me(it,{method:"POST",body:JSON.stringify({verb:"getFunctionContent",className:t,functionName:i}),headers:new Headers({"Content-Type":"application/json"})});s.content=Ha(s.content);const{params:a,result:l}=qL(s.parameters);return{...s,params:a,returns:l}}catch(s){return console.error(s),{className:t,functionName:i,filePath:e,content:"",params:[]}}}var P0=(e=>(e.STUDIO_LOADED="UA-1-0",e.WELCOME_TOUR_INIT="UA-1-3",e.WELCOME_TOUR_END="UA-1-4",e))(P0||{});function GL(e,t){fetch("/api/v1/activity",{body:JSON.stringify({AID:e,...t}),headers:{"Content-Type":"application/json"},method:"POST"}).catch(r=>{})}function KL(e){window.pagesense=window.pagesense||[],window.pagesense.push(["trackEvent",e])}var C0=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(C0||{}),k0=(e=>(e[e.METHOD=1]="METHOD",e[e.CLASS=10]="CLASS",e))(k0||{}),$0=(e=>(e.WelCome="WelCome",e.ActionPanel="ActionPanel",e.SideBar="SideBar",e.Settings="Settings",e.Main="Main",e.Explorer="Explorer",e.Header="Header",e.ComponentList="ComponentList",e))($0||{}),I0=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e[e.JSON_MALFORMED=554]="JSON_MALFORMED",e[e.JSON_MALFORMED_AT_LINE=550]="JSON_MALFORMED_AT_LINE",e))(I0||{});const VL={transparent:{backgroundColor:"transparent"},black:{backgroundColor:"#4a4a4a",color:"white",padding:"3px 5px",borderRadius:5},grey:{backgroundColor:"#e8e8e8",color:"#262626",padding:"3px 5px",borderRadius:5}},XL={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};exports.API_PREFIX=it;exports.AppLoader=Zk;exports.BaseCheckboxIcon=Py;exports.Checkbox=v$;exports.ControlledSwitch=fy;exports.DATASOURCE_THEMES=VL;exports.DatasourcesActions=qy;exports.DebuggerActions=Vy;exports.DefaultCheckboxIcon=Cy;exports.DesignerRequestVerb=bn;exports.Dialog=TA;exports.DialogBody=em;exports.EActivity=P0;exports.EDITOR=XL;exports.EIDENTIFIERS=$0;exports.ERROR_CODES=I0;exports.EWebFormStyleClassScope=C0;exports.EXT_API_PREFIX=Uo;exports.FileFolderType=ft;exports.FloatingTooltip=p$;exports.FolderRootPath=hn;exports.FolderRootType=Ef;exports.HTTPError=Cc;exports.HTTP_HANDLERS_TAB_PATH=Qy;exports.IPreemptive=Io;exports.IPublished=l0;exports.IPublishedRestScope=Tf;exports.IdentityProvider=M$;exports.Incase=aa;exports.IndentLines=hm;exports.LOCALIZATION_TAB_PATH=e0;exports.LogoSVG=Oy;exports.LspActions=Ky;exports.MAX_FILE_NAME_LENGTH=xf;exports.MODEL_TAB_PATH=EI;exports.Modal=Xk;exports.ModalCloseReason=pi;exports.ModalColor=zn;exports.ModalIcons=Sc;exports.ModalType=df;exports.Mutex=t0;exports.NameError=Sf;exports.Overlay=Qv;exports.PANEL_EXPANDED_HEIGHT=fa;exports.PANEL_INITIAL_HEIGHT=In;exports.Panel=g$;exports.Portal=Wv;exports.PublishOptions=VI;exports.ROLES_TAB_PATH=Yy;exports.RemoteDebuggerMode=_f;exports.SETTINGS_TAB_PATH=Jy;exports.SHARED_API_PREFIX=Lo;exports.SourceCodeDescriptor=k0;exports.Switcher=gm;exports.TabEventsActions=Gy;exports.Tip=Qm;exports.TipsProvider=eC;exports.Toast=LT;exports.Tooltip=Hk;exports.Tree=JT;exports.TreeIcon=cm;exports.TreeNode=Uc;exports.WebformActions=Hy;exports.WebformEventsActions=$o;exports.ZoomComponent=Qk;exports.ZoomLevel=Ty;exports._isArrayDatasource=HI;exports._isObjectDatasource=qI;exports.addAttributesToContent=YI;exports.addFolder=bL;exports.by=r0;exports.byId=PI;exports.byPath=CI;exports.callServerSideParser=e2;exports.checkUpdates=fL;exports.createFolder=NL;exports.datasourcesSubject=pI;exports.debuggerSubject=mI;exports.dropFile=yL;exports.dropFolder=xL;exports.exists=kI;exports.extractWebformName=AI;exports.generateUUID=JI;exports.getAppSettings=pL;exports.getCatalog=_L;exports.getDatasourceId=$I;exports.getDefaultAppSettings=T0;exports.getFile=vL;exports.getFileContent=AL;exports.getFileExtentionFromType=OI;exports.getFilenameAndTypeFromPath=_I;exports.getFilesInfo=SL;exports.getFolder=R0;exports.getFolders=hL;exports.getFunctionContent=ZL;exports.getMonacoTheme=$L;exports.getNodeInfo=WL;exports.getSavedConditions=CL;exports.getSharedAppEvents=RL;exports.getSharedCSS=PL;exports.getSharedDatasources=TL;exports.getSharedResource=Ho;exports.getSupportedLanguages=OL;exports.getTypeFromExtension=Of;exports.getUserPrivileges=kL;exports.getWebForm=gL;exports.hasAttributesString=f0;exports.http=Me;exports.i18nSubject=bI;exports.initializeDefaultProjectFiles=lL;exports.installUpdates=dL;exports.isArrayDatasource=s0;exports.isDataClassMethod=FI;exports.isDataStoreMethod=MI;exports.isDateDatasource=ZI;exports.isEntity=BI;exports.isEntityDatasource=jI;exports.isEntityMethod=DI;exports.isEntitySelection=UI;exports.isEntitySelectionDatasource=zI;exports.isEntitySelectionMethod=NI;exports.isObjectAttribute=II;exports.isObjectDatasource=a0;exports.isRelatedAttribute=LI;exports.isRelatedEntitiesAttribute=i0;exports.isRelatedEntityAttribute=o0;exports.isScalarDatasource=u0;exports.isSimpleAttribute=n0;exports.isSimpleDatasource=WI;exports.loadDS=GI;exports.loadI18n=KI;exports.log=GL;exports.login=EL;exports.lspSubject=vI;exports.moveItem=zL;exports.outBy=TI;exports.outById=RI;exports.parseAttributes=XI;exports.queue=Af;exports.removeAttributesString=d0;exports.removeItem=jL;exports.renameFile=mL;exports.renameFolder=wL;exports.sanitizeContent=Ha;exports.saveContent=BL;exports.setCraftedComponents=DL;exports.setFileContent=Cf;exports.setSharedAppEvents=FL;exports.setSharedSources=LL;exports.stringifyAttributes=c0;exports.tabEventsSubject=gI;exports.tasksManagerSubject=yI;exports.toastSubject=Zy;exports.trackEvent=KL;exports.transformDates=QI;exports.tryCreateSharedResource=Za;exports.useDidMountEffect=m$;exports.useDoubleClick=j$;exports.useEnhancedState=eI;exports.useFeatureFlags=L$;exports.useForwardedRef=I$;exports.useHotkeys=P$;exports.useIdentity=F$;exports.useOutsideClick=C$;exports.usePrevious=k$;exports.useStateObject=D$;exports.useStateRef=$$;exports.useTip=Jm;exports.validateName=Xy;exports.validateServerSide=wI;exports.validateValue=xI;exports.webformEventsSubject=Aa;exports.webformSubject=hI;
|
|
207
|
+
>>> no match, partial?`,t,p,r,b),p===f))}let d;if(typeof v=="string"?(d=g===v,this.debug("string match",v,g,d)):(d=v.test(g),this.debug("pattern match",v,g,d)),!d)return!1}if(l===f&&c===m)return!0;if(l===f)return i;if(c===m)return l===f-1&&t[l]==="";throw new Error("wtf?")}braceExpand(){return _0(this.pattern,this.options)}parse(t){Ta(t);const r=this.options;if(t==="**")return nr;if(t==="")return"";let i,s=null;(i=t.match(q2))?s=r.dot?G2:Z2:(i=t.match(M2))?s=(r.nocase?r.dot?j2:N2:r.dot?D2:F2)(i[1]):(i=t.match(K2))?s=(r.nocase?r.dot?X2:V2:r.dot?Y2:J2)(i):(i=t.match(z2))?s=r.dot?B2:W2:(i=t.match(U2))&&(s=H2);const a=Ra.fromGlob(t,this.options).toMMPattern();return s&&typeof a=="object"&&Reflect.defineProperty(a,"test",{value:s}),a}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const r=this.options,i=r.noglobstar?tL:r.dot?rL:nL,s=new Set(r.nocase?["i"]:[]);let a=t.map(f=>{const m=f.map(v=>{if(v instanceof RegExp)for(const g of v.flags.split(""))s.add(g);return typeof v=="string"?uL(v):v===nr?nr:v._src});return m.forEach((v,g)=>{const p=m[g+1],b=m[g-1];v!==nr||b===nr||(b===void 0?p!==void 0&&p!==nr?m[g+1]="(?:\\/|"+i+"\\/)?"+p:m[g]=i:p===void 0?m[g-1]=b+"(?:\\/|"+i+")?":p!==nr&&(m[g-1]=b+"(?:\\/|\\/"+i+"\\/)"+p,m[g+1]=nr))}),m.filter(v=>v!==nr).join("/")}).join("|");const[l,c]=t.length>1?["(?:",")"]:["",""];a="^"+l+a+c+"$",this.negate&&(a="^(?!"+a+").+$");try{this.regexp=new RegExp(a,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;const i=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const a=this.set;this.debug(this.pattern,"set",a);let l=s[s.length-1];if(!l)for(let c=s.length-2;!l&&c>=0;c--)l=s[c];for(let c=0;c<a.length;c++){const f=a[c];let m=s;if(i.matchBase&&f.length===1&&(m=[l]),this.matchOne(m,f,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return Et.defaults(t).Minimatch}}Et.AST=Ra;Et.Minimatch=qa;Et.escape=L2;Et.unescape=bo;const Lo="/$shared",lL={"**/saved_conditions.json":{parser:"json",content:{conditions:[]},schema:{type:"object",properties:{conditions:{type:"array",items:{type:"object"}}},required:["conditions"]}},"**/shared_datasources.json":{parser:"json",content:{},schema:{type:"object",additionalProperties:!0,patternProperties:{"^.*$":{type:"array"}}}},"**/shared_css.json":{parser:"json",content:{classes:[]},schema:{type:"object",properties:{classes:{type:"array",items:{type:"object"}}},required:["classes"]}},"**/shared_app_events.json":{parser:"json",content:[]},"**/CustomComponents/manifest.json":{parser:"json",content:[],schema:{type:"array",items:{type:"object"}}},"**/crafted_components.json":{parser:"json",content:[],schema:{type:"array"}},"**/HTTPHandlers.json":{parser:"json",content:[],schema:{type:"array"}},"**/i18n.json":{parser:"json",content:{keys:{},userLang:{primary:"",supported:[]}},schema:{type:"object",properties:{keys:{type:"object"},userLang:{type:"object",properties:{primary:{type:"string"},supported:{type:"array",items:{type:"string"}}},required:["primary","supported"]}},required:["keys","userLang"]}},"**/*.json":{parser:"json",content:{}}};function O0(e){const t=Object.entries(lL).find(([r])=>Et(e,r));return t==null?void 0:t[1]}function Za(e){var i;const t=(i=O0(e))==null?void 0:i.content;if(!t)return;const r=e.replace(`${Lo}/`,"Shared/");Cf({name:r,content:t,asText:typeof t=="string"})}async function cL(){const e=["CustomComponents/manifest.json","shared_app_events.json","shared_css.json","saved_conditions.json","i18n.json"];for(const t of e)try{await Me(`${Lo}/${t}?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}catch(r){A0(r)&&Za(`${Lo}/${t}`)}}function Ho({path:e,createIfNotExists:t=!1}){const r=`${Lo}/${e}`;return Me(`${r}?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})}).then(i=>{const s=O0(e);let a=i;if(!s)return a;if(typeof a=="string")try{switch(s.parser){case"json":a=JSON.parse(a);break;default:break}}catch{throw new Error("Cannot parse")}if(s.schema&&!new o2.Validator().validate(a,s.schema).valid)throw new Error("Invalid Schema");return a}).catch(i=>{if(A0(i)&&t){const s=fL(i,e);Zy.next({message:s,kind:"warning"}),Za(r)}throw i})}function A0(e){var t;return((t=e==null?void 0:e.response)==null?void 0:t.status)===404||(e==null?void 0:e.message)==="Invalid Schema"||(e==null?void 0:e.message)==="Cannot parse"||(e==null?void 0:e.name)==="SyntaxError"}function fL(e,t){var r;switch(!0){case((e==null?void 0:e.message)==="Cannot parse "||(e==null?void 0:e.name)==="SyntaxError"):return`Cannot parse file '${t}', resetting...`;case(e==null?void 0:e.message)==="Invalid Schema":return`File '${t}' is corrupt, resetting...`;case((r=e==null?void 0:e.response)==null?void 0:r.status)===404:return`File '${t}' not found, creating...`;default:return e==null?void 0:e.message}}function dL(e){return Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function pL(e){return Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}const T0=()=>{const{host:e,protocol:t}=window.location,r=t==="https:";return{projectOpened:!1,remoteDebuggerMode:_f.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${r?"s":""}://${e}/remoteDebugger`,lsp:`ws${r?"s":""}://${e}/LSP`},isRestActive:!0}};async function hL(){const{hostname:e,host:t,protocol:r}=window.location,i=r==="https:";try{const s=await Me(it,{method:"POST",body:JSON.stringify({verb:bn.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),a=(()=>{if(s.rendererPath)return s.rendererPath;const l=`http://${e}:${s.webServerHTTPPort}`,c=`https://${e}:${s.webServerHTTPSPort}`;return s.webServerHTTPPort&&s.webServerHTTPSPort?i?c:l:s.webServerHTTPPort?l:c})();return{projectOpened:s.webServerHTTPSPort>0||s.webServerHTTPPort>0,remoteDebuggerMode:s.remoteDebuggerMode,baseUrl:a,qodly:typeof s.qodly>"u"?!0:s.qodly,urls:{renderer:s.rendererPath||`${a}/$lib/renderer/`,debugger:`ws${i?"s":""}://${t}/remoteDebugger`,lsp:`ws${i?"s":""}://${t}/LSP`},isRestActive:s.isRESTActive}}catch(s){return console.error(s),T0()}}async function R0(e){return await Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function gL(...e){return(await Promise.all(e.map(i=>R0({root:i,verb:bn.GET_FOLDER})))).map(({children:i})=>i.map(({name:s,date:a,type:l})=>({name:s,type:l,date:a,path:`${l}/${s}`}))).flat()}function vL(e,t={}){const{sanitize:r=!0}=t;return Me(`/rest/$getWebForm/${e}`,{method:"GET"}).then(i=>{if(!(i!=null&&i.components)||!r)return i;const s=new Map;return{...i,components:rt.entries(i.components).map(([a,l])=>{const c=a,{resolvedName:f}=l.type;if(f==="WebformLoader"){const m=Bc.generate();s.set(a,m),a=m}return[a,l,c]}).reduce((a,[l,c,f])=>{var m;return c.nodes&&(c.nodes=c.nodes.map(v=>s.get(v)||v)),c.linkedNodes&&(c.linkedNodes=rt.entries(c.linkedNodes).reduce((v,[g,p])=>({...v,[g]:s.get(p)||p}),{})),(m=c.props)!=null&&m.events&&(c.props.events=c.props.events.map(v=>(v.type==="navigation"&&v.loader&&(v.loader=s.get(v.loader)||v.loader),v))),{...a,[l]:{...c,props:{...c.props,__originalID:f}}}},{})}})}function mL(e){return Me(it,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(t=>({...t,content:[ft.METHOD,ft.CLASS].includes(t.type)?Ha(t.content):t.content}))}function yL(e){return e.type==="folder"?Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}):Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function bL(e){return e.type==="folder"?(await Me(Uo,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}function wL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function xL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function SL(e){return(await Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function EL(...e){return await Me(it,{method:"POST",body:JSON.stringify({verb:bn.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function _L(e){const t=await Me("/api/login",{method:"POST",body:JSON.stringify({accessKey:e}),headers:new Headers({"Content-Type":"application/json"})});return t.isLogged&&t.success}async function OL(){return await Me("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function AL(e){try{const t=process.env.NODE_ENV==="development"?"/i18n/languages.json":`/$lib/${e?"studio":"renderer"}/i18n/languages.json`,i=await(await fetch(t)).text(),{supported:s}=JSON.parse(i);return s}catch{return[]}}async function TL({name:e,path:t="",root:r="root",asText:i=!1}){return Me(it,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:r,path:t,name:e,asText:i}),headers:new Headers({"Content-Type":"application/json"})})}async function RL(e={}){try{return await Ho({path:"shared_datasources.json",...e})}catch{return{}}}async function PL(e={}){try{return await Ho({path:"shared_app_events.json",...e})}catch{return[]}}async function CL(e={}){try{return await Ho({path:"shared_css.json",...e})}catch{return{classes:[]}}}async function kL(e={}){try{return await Ho({path:"saved_conditions.json",...e})}catch{return{conditions:[]}}}async function $L(){try{return await Me("/rest/$info/privileges",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}catch{return{privileges:[]}}}async function IL(){try{return await(await fetch(`monaco_theme.json?t=${Date.now()}`)).json()}catch{return null}}const LL=Af(),ML=async e=>{const t={verb:bn.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return LL(async()=>(await Me(it,{method:"POST",body:JSON.stringify(t),headers:new Headers({"Content-Type":"application/json"})}),e))},FL=Af(),DL=async e=>{const t={verb:bn.SET_FILE_CONTENT,asText:!1,name:"shared_app_events.json",path:"",root:"shared",content:e};return FL(async()=>(await Me(it,{method:"POST",body:JSON.stringify(t),headers:new Headers({"Content-Type":"application/json"})}),e))},Cf=async e=>{const t=await Me(it,{method:"POST",body:JSON.stringify({...e,verb:bn.SET_FILE_CONTENT,root:Ef.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),r=Of(`${e.path||"Sources"}/${e.name}`);return{...t,type:r,size:0}},NL=async e=>await Cf({name:"crafted_components.json",path:hn.WEBFORMS,content:e});function jL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function zL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function WL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function BL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(t=>Array.isArray(t)?t:{...t,content:["4dm","4qm","4qs"].includes(t.ext)?Ha(t.content):t.content}).catch(t=>{var r,i;throw((i=(r=t.data)==null?void 0:r.__ERROR[0])==null?void 0:i.errCode)===1839&&Za(e.path),t})}function UL(e){return Me(it,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function HL(e){const t=new RegExp(/^\((.+)(?=\))/gi).exec(e);return t!==null?t[1]:""}function qL(e){const t=new RegExp(/(->)(.*)/gi).exec(e);if(t!==null)return t[0].replace("->","");const r=/:([^)]*)$/.exec(e);return r!==null?`result : ${r[1].trim()}`:""}function ZL(e){const t=HL(e).split(/[;,]/g).filter(Boolean).map(s=>{const a=s.split(":")[0].trim(),l=s.split(":")[1].trim();return{name:a,type:l}}),r=qL(e),i=r?{name:r.split(":")[0].trim(),type:r.split(":")[1].trim()}:{name:"result",type:"Variable"};return{params:t,result:i}}async function GL(e,t){const i=e.split(".").pop();try{const s=await Me(it,{method:"POST",body:JSON.stringify({verb:"getFunctionContent",className:t,functionName:i}),headers:new Headers({"Content-Type":"application/json"})});s.content=Ha(s.content);const{params:a,result:l}=ZL(s.parameters);return{...s,params:a,returns:l}}catch(s){return console.error(s),{className:t,functionName:i,filePath:e,content:"",params:[]}}}var P0=(e=>(e.STUDIO_LOADED="UA-1-0",e.WELCOME_TOUR_INIT="UA-1-3",e.WELCOME_TOUR_END="UA-1-4",e))(P0||{});function KL(e,t){fetch("/api/v1/activity",{body:JSON.stringify({AID:e,...t}),headers:{"Content-Type":"application/json"},method:"POST"}).catch(r=>{})}function VL(e){window.pagesense=window.pagesense||[],window.pagesense.push(["trackEvent",e])}var C0=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(C0||{}),k0=(e=>(e[e.METHOD=1]="METHOD",e[e.CLASS=10]="CLASS",e))(k0||{}),$0=(e=>(e.WelCome="WelCome",e.ActionPanel="ActionPanel",e.SideBar="SideBar",e.Settings="Settings",e.Main="Main",e.Explorer="Explorer",e.Header="Header",e.ComponentList="ComponentList",e))($0||{}),I0=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e[e.JSON_MALFORMED=554]="JSON_MALFORMED",e[e.JSON_MALFORMED_AT_LINE=550]="JSON_MALFORMED_AT_LINE",e))(I0||{});const XL={transparent:{backgroundColor:"transparent"},black:{backgroundColor:"#4a4a4a",color:"white",padding:"3px 5px",borderRadius:5},grey:{backgroundColor:"#e8e8e8",color:"#262626",padding:"3px 5px",borderRadius:5}},YL={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};exports.API_PREFIX=it;exports.AppLoader=Zk;exports.BaseCheckboxIcon=Py;exports.Checkbox=v$;exports.ControlledSwitch=fy;exports.DATASOURCE_THEMES=XL;exports.DatasourcesActions=qy;exports.DebuggerActions=Vy;exports.DefaultCheckboxIcon=Cy;exports.DesignerRequestVerb=bn;exports.Dialog=TA;exports.DialogBody=em;exports.EActivity=P0;exports.EDITOR=YL;exports.EIDENTIFIERS=$0;exports.ERROR_CODES=I0;exports.EWebFormStyleClassScope=C0;exports.EXT_API_PREFIX=Uo;exports.FileFolderType=ft;exports.FloatingTooltip=p$;exports.FolderRootPath=hn;exports.FolderRootType=Ef;exports.HTTPError=Cc;exports.HTTP_HANDLERS_TAB_PATH=Qy;exports.IPreemptive=Io;exports.IPublished=l0;exports.IPublishedRestScope=Tf;exports.IdentityProvider=M$;exports.Incase=aa;exports.IndentLines=hm;exports.LOCALIZATION_TAB_PATH=e0;exports.LogoSVG=Oy;exports.LspActions=Ky;exports.MAX_FILE_NAME_LENGTH=xf;exports.MODEL_TAB_PATH=EI;exports.Modal=Xk;exports.ModalCloseReason=pi;exports.ModalColor=zn;exports.ModalIcons=Sc;exports.ModalType=df;exports.Mutex=t0;exports.NameError=Sf;exports.Overlay=Qv;exports.PANEL_EXPANDED_HEIGHT=fa;exports.PANEL_INITIAL_HEIGHT=In;exports.Panel=g$;exports.Portal=Wv;exports.PublishOptions=VI;exports.ROLES_TAB_PATH=Yy;exports.RemoteDebuggerMode=_f;exports.SETTINGS_TAB_PATH=Jy;exports.SHARED_API_PREFIX=Lo;exports.SourceCodeDescriptor=k0;exports.Switcher=gm;exports.TabEventsActions=Gy;exports.Tip=Qm;exports.TipsProvider=eC;exports.Toast=LT;exports.Tooltip=Hk;exports.Tree=JT;exports.TreeIcon=cm;exports.TreeNode=Uc;exports.WebformActions=Hy;exports.WebformEventsActions=$o;exports.ZoomComponent=Qk;exports.ZoomLevel=Ty;exports._isArrayDatasource=HI;exports._isObjectDatasource=qI;exports.addAttributesToContent=YI;exports.addFolder=wL;exports.by=r0;exports.byId=PI;exports.byPath=CI;exports.callServerSideParser=t2;exports.checkUpdates=dL;exports.createFolder=jL;exports.datasourcesSubject=pI;exports.debuggerSubject=mI;exports.dropFile=bL;exports.dropFolder=SL;exports.exists=kI;exports.extractWebformName=AI;exports.generateUUID=JI;exports.getAppSettings=hL;exports.getCatalog=OL;exports.getDatasourceId=$I;exports.getDefaultAppSettings=T0;exports.getFile=mL;exports.getFileContent=TL;exports.getFileExtentionFromType=OI;exports.getFilenameAndTypeFromPath=_I;exports.getFilesInfo=EL;exports.getFolder=R0;exports.getFolders=gL;exports.getFunctionContent=GL;exports.getMonacoTheme=IL;exports.getNodeInfo=BL;exports.getSavedConditions=kL;exports.getSharedAppEvents=PL;exports.getSharedCSS=CL;exports.getSharedDatasources=RL;exports.getSharedResource=Ho;exports.getSupportedLanguages=AL;exports.getTypeFromExtension=Of;exports.getUserPrivileges=$L;exports.getWebForm=vL;exports.hasAttributesString=f0;exports.http=Me;exports.i18nSubject=bI;exports.initializeDefaultProjectFiles=cL;exports.installUpdates=pL;exports.isArrayDatasource=s0;exports.isDataClassMethod=FI;exports.isDataStoreMethod=MI;exports.isDateDatasource=ZI;exports.isEntity=BI;exports.isEntityDatasource=jI;exports.isEntityMethod=DI;exports.isEntitySelection=UI;exports.isEntitySelectionDatasource=zI;exports.isEntitySelectionMethod=NI;exports.isObjectAttribute=II;exports.isObjectDatasource=a0;exports.isRelatedAttribute=LI;exports.isRelatedEntitiesAttribute=i0;exports.isRelatedEntityAttribute=o0;exports.isScalarDatasource=u0;exports.isSimpleAttribute=n0;exports.isSimpleDatasource=WI;exports.loadDS=GI;exports.loadI18n=KI;exports.log=KL;exports.login=_L;exports.lspSubject=vI;exports.moveItem=WL;exports.outBy=TI;exports.outById=RI;exports.parseAttributes=XI;exports.queue=Af;exports.removeAttributesString=d0;exports.removeItem=zL;exports.renameFile=yL;exports.renameFolder=xL;exports.sanitizeContent=Ha;exports.sanitizeNameCY=QI;exports.saveContent=UL;exports.setCraftedComponents=NL;exports.setFileContent=Cf;exports.setSharedAppEvents=DL;exports.setSharedSources=ML;exports.stringifyAttributes=c0;exports.tabEventsSubject=gI;exports.tasksManagerSubject=yI;exports.toastSubject=Zy;exports.trackEvent=VL;exports.transformDates=e2;exports.tryCreateSharedResource=Za;exports.useDidMountEffect=m$;exports.useDoubleClick=j$;exports.useEnhancedState=eI;exports.useFeatureFlags=L$;exports.useForwardedRef=I$;exports.useHotkeys=P$;exports.useIdentity=F$;exports.useOutsideClick=C$;exports.usePrevious=k$;exports.useStateObject=D$;exports.useStateRef=$$;exports.useTip=Jm;exports.validateName=Xy;exports.validateServerSide=wI;exports.validateValue=xI;exports.webformEventsSubject=Aa;exports.webformSubject=hI;
|
|
208
208
|
//# sourceMappingURL=index.cjs.js.map
|