@reventlessdev/reventless-host-shell 3.0.0-alpha.83 → 3.0.0-alpha.85
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/assets/{Geocoder.res-lo8_gw5x.js → Geocoder.res-BhG45M1K.js} +1 -1
- package/dist/assets/{GraphMode.res-BSZRxAIF.js → GraphMode.res-3KIITtcn.js} +1 -1
- package/dist/assets/{GraphView.res-C2uUvQXJ.js → GraphView.res-DxaoewS-.js} +1 -1
- package/dist/assets/{MapMode.res-DuTus3z1.js → MapMode.res-Bw8jTTaX.js} +1 -1
- package/dist/assets/{StateMachineDiagram.res-VKaK4oME.js → StateMachineDiagram.res-ByRwN1Sc.js} +1 -1
- package/dist/assets/index-BPpA5yNt.js +133 -0
- package/dist/assets/{index-e9PJmSsU.js → index-ClvBwV6J.js} +1 -1
- package/dist/mf-entry-bootstrap-0.js +1 -1
- package/package.json +5 -5
- package/dist/assets/index-KyPbXhAY.js +0 -133
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GraphMode.res-3KIITtcn.js","assets/GraphView.res-DxaoewS-.js","assets/StateMachineDiagram.res-ByRwN1Sc.js","assets/MapMode.res-Bw8jTTaX.js","assets/Geocoder.res-BhG45M1K.js","assets/index-ClvBwV6J.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import"./virtualExposes-DN39MDG_.js";import{d as nO}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__reventless_host_shell__remoteEntry-_hash_-C8lRAcSv.js";import{_ as ih}from"./preload-helper-BlTxHScW.js";import{_ as Yq}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-BzAfciYp.js";import{_ as L,a as _,b as Bt}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-hre-5-8f.js";import{a as ce,b as Ae,c as Zt,d as ur,e as Xq,f as xt,g as Nr,h as Ne,i as It,j as Tv,k as Zq,l as iO,m as _o,n as eV,o as tV,p as rV,q as nV}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs-CuPed97e.js";import{a as oO,b as Dm}from"./_virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs-Bp_g55i_.js";import{c as g0,_ as qe}from"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react__loadShare__.mjs_commonjs-proxy-CfkhEoF5.js";function iV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import"./__virtual_mf___mfe_internal__reventless_host_shell__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-BUE6rcGI.js";function oV(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Nt(e){return e===void 0?{BS_PRIVATE_NESTED_SOME_NONE:0}:e!==null&&e.BS_PRIVATE_NESTED_SOME_NONE!==void 0?{BS_PRIVATE_NESTED_SOME_NONE:e.BS_PRIVATE_NESTED_SOME_NONE+1|0}:e}function Li(e){if(e!=null)return Nt(e)}function kt(e){if(e===null||e.BS_PRIVATE_NESTED_SOME_NONE===void 0)return e;let t=e.BS_PRIVATE_NESTED_SOME_NONE;if(t!==0)return{BS_PRIVATE_NESTED_SOME_NONE:t-1|0}}let Nv="JsExn";function aV(e){if(e.RE_EXN_ID===Nv)return Nt(e._1)}function sV(e){return e==null?!1:typeof e.RE_EXN_ID=="string"}function Ds(e){return sV(e)?e:{RE_EXN_ID:"JsExn",_1:e}}let lV=["map","graph"];async function uV(e,t){switch(e){case"graph":return(await ih(()=>import("./GraphMode.res-3KIITtcn.js"),__vite__mapDeps([0,1])).then(a=>a.init))(t.graphLayout,void 0),(await ih(()=>import("./StateMachineDiagram.res-ByRwN1Sc.js"),__vite__mapDeps([2,1])).then(a=>a.init))();case"map":let i=await ih(()=>import("./MapMode.res-Bw8jTTaX.js"),__vite__mapDeps([3])).then(a=>a.init),o=await ih(()=>import("./Geocoder.res-BhG45M1K.js"),__vite__mapDeps([4])).then(a=>a.fromShell);return i(t.mapStyle,o(),void 0);default:console.error('[host-shell] config.json viewModes: unknown mode "'+e+'" — known modes: '+lV.join(", "));return}}async function cV(e){await Promise.all(e.viewModes.map(async t=>{try{return await uV(t,e)}catch(r){let n=Ds(r);if(n.RE_EXN_ID===Nv){console.error('[host-shell] view mode "'+t+'" failed to load: '+String(n._1));return}throw n}}))}function gi(e,t){if(e!==void 0&&t(kt(e)))return e}function ee(e,t){if(e!==void 0)return t(kt(e))}function ne(e,t,r){return e!==void 0?r(kt(e)):t}function q(e,t){if(e!==void 0)return Nt(t(kt(e)))}function k(e,t){if(e!==void 0)return t(kt(e))}function D(e,t){return e!==void 0?kt(e):t}function vn(e,t){return e!==void 0?e:t}function Ee(e){return e!==void 0}function ir(e){return e===void 0}function dV(e){if(typeof Event=="function")return new Event(e);let t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function FR(e){switch(e){case"":case"/":return 0;default:let t=e.slice(1),n=t[t.length-1|0]==="/"?t.slice(0,-1):t,i=n.split("?",2),a=(i.length!==2?n:i[0]).split("/").filter(c=>c.length!==0),s=a.length-1|0,l=0;for(;;){let c=l,d=s;if(d<0)return c;l={hd:a[d],tl:c},s=d-1|0}}}function fV(e,t){let r=globalThis.window;return e!==void 0?FR(e):r!==void 0?FR(kt(r).location.pathname):0}function hV(){let e=globalThis.window;if(e===void 0)return"";let t=kt(e).location.hash;switch(t){case"":case"#":return"";default:return t.slice(1)}}function IR(e){switch(e){case"":case"?":return"";default:let t=e.split("?",2);return t.length!==2?"":t[1]}}function pV(e,t){let r=globalThis.window;return e!==void 0?IR(e):r!==void 0?IR(kt(r).location.search):""}function ca(e){let t=globalThis.history,r=globalThis.window;if(t!==void 0&&r!==void 0){kt(t).pushState(null,"",e),kt(r).dispatchEvent(dV("popstate"));return}}function mV(e,t){if(e.hash!==t.hash||e.search!==t.search)return!0;{let r=e.path,n=t.path;for(;;){let i=n,o=r;if(o===0)return i!==0;if(i===0||o.hd!==i.hd)return!0;n=i.tl,r=o.tl}}}function v0(e,t){return{path:fV(e),hash:hV(),search:pV(e)}}function gV(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=()=>e(v0(void 0));return kt(t).addEventListener("popstate",r),r}function vV(e){let t=globalThis.window;if(t!==void 0){kt(t).removeEventListener("popstate",e);return}}function bV(e,t){let r=ce(()=>v0(void 0)),n=r[1],i=r[0];return Ae(()=>{let o=gV(s=>n(l=>s)),a=v0(void 0);return mV(a,i)&&n(s=>a),()=>vV(o)},[]),i}let _V=v0,Dv=Zt({prefix:"",path:""});function aO(e,t){return e===""||t.startsWith(e)?t:e+t}let yV=Dv.Provider;function xV(e){return ur(yV,{value:e.value,children:e.children})}let SV=xV,PR="popstate";function wV(){let e=globalThis.window;return e!==void 0?kt(e).location.pathname:""}function EV(e){let t=globalThis.window;if(t===void 0)return()=>{};let r=kt(t);return r.addEventListener(PR,e),()=>{r.removeEventListener(PR,e)}}function Fv(e,t){return Xq(EV,wV,()=>D(e,""))}function zs(){let t=xt(Dv).prefix;return r=>ca(aO(t,r))}function sO(){let t=xt(Dv).path,r=Fv(void 0);return t===""?r:t}function Mt(e,t){return e.catch(r=>t(Ds(r)))}function kd(e,t){return e===t?0:e<t?-1:1}function _w(e,t){return e<t?-1:e===t?0:1}function Fo(e,t){if(t===0)throw{RE_EXN_ID:"Division_by_zero",Error:new Error};return e%t}function lO(e,t){if(e<=0)return[];let r=new Array(e);return r.fill(t),r}function Il(e,t){if(e<=0)return[];let r=new Array(e);for(let n=0;n<e;++n)r[n]=t(n);return r}function nt(e,t,r){return e.reduce(r,t)}function kV(e,t){let r=e.findIndex(t);if(r!==-1)return r}function Q(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let a=e[o],s=t(a);s!==void 0&&(n[i]=kt(s),i=i+1|0)}return n.length=i,n}function yw(e,t){let r=e.length,n=new Array(r),i=0;for(let o=0;o<r;++o){let a=e[o],s=t(a,o);s!==void 0&&(n[i]=kt(s),i=i+1|0)}return n.length=i,n}function CV(e,t){let r=0;for(;;){let n=r;if(n===e.length)return;let i=t(e[n]);if(i!==void 0)return i;r=n+1|0}}function uO(e,t){let r=parseInt(e);if(!(Number.isNaN(r)||r>2147483647||r<-2147483648))return r|0}function RV(e,t){for(;;){let r=t,n=e;if(n===0)return r;let i={hd:n.hd,tl:0};r.tl=i,t=i,e=n.tl}}function AV(e,t){if(e===0)return t;let r={hd:e.hd,tl:0};return RV(e.tl,r).tl=t,r}function $V(e){let t=e,r=0;for(;;){let n=r,i=t;if(i===0)return n;r=n+1|0,t=i.tl}}function TV(e,t,r){for(;;){let n=r,i=t;if(n===0)return;e[i]=n.hd,r=n.tl,t=i+1|0}}function Iv(e){let t=e.length-1|0,r=0;for(;;){let n=r,i=t;if(i<0)return n;r={hd:e[i],tl:n},t=i-1|0}}function Pv(e){let t=$V(e),r=new Array(t);return TV(r,0,e),r}function NV(e,t){for(;;){let r=t,n=e;if(n===0)return r;t={hd:n.hd,tl:r},e=n.tl}}function cO(e){return NV(e,0)}function DV(e,t){for(;;){let r=e;if(r===0)return;t(r.hd),e=r.tl}}function dO(e,t,r){for(;;){let n=t,i=e;if(i===0)return n;t=r(n,i.hd),e=i.tl}}function FV(e){let t=e.length,r=0;for(let i=0;i<t;++i)r=r+e[i].length|0;let n=new Array(r);r=0;for(let i=0;i<t;++i){let o=e[i];for(let a=0,s=o.length;a<s;++a)n[r]=o[a],r=r+1|0}return n}function IV(e,t,r){let n=t;for(let i=0,o=e.length;i<o;++i)n=r(n,e[i]);return n}let fO=IV;function Yc(e){return e!==void 0?e.h:0}function Ca(e,t,r,n){let i=Yc(e),o=Yc(n);return{k:t,v:r,h:i>=o?i+1|0:o+1|0,l:e,r:n}}function PV(e,t){return{k:e,v:t,h:1,l:void 0,r:void 0}}function OV(e,t){return e.v===t?e:{k:e.k,v:t,h:e.h,l:e.l,r:e.r}}function OR(e,t,r,n){let i=e!==void 0?e.h:0,o=n!==void 0?n.h:0;if(i>(o+2|0)){let l=e.l,c=e.r;return Yc(l)>=Yc(c)?Ca(l,e.k,e.v,Ca(c,t,r,n)):Ca(Ca(l,e.k,e.v,c.l),c.k,c.v,Ca(c.r,t,r,n))}if(o<=(i+2|0))return{k:t,v:r,h:i>=o?i+1|0:o+1|0,l:e,r:n};let a=n.l,s=n.r;return Yc(s)>=Yc(a)?Ca(Ca(e,t,r,a),n.k,n.v,s):Ca(Ca(e,t,r,a.l),a.k,a.v,Ca(a.r,n.k,n.v,s))}function MV(e,t){for(;;){let r=e;if(r===void 0)return;let n=r.k;if(t===n)return Nt(r.v);e=t<n?r.l:r.r}}function lx(e,t,r){if(e===void 0)return PV(t,r);let n=e.k;if(t===n)return OV(e,r);let i=e.v;return t<n?OR(lx(e.l,t,r),n,i,e.r):OR(e.l,n,i,lx(e.r,t,r))}let hO=MV;function pO(e){let t=n=>{switch(n){case"":case"/":return 0;default:let i=Iv(n.split("/"));return i!==0&&i.hd===""?i.tl:i}},r=e.indexOf("?");return r===-1?t(e):r===0?0:t(e.slice(0,r))}let ux={parsers:0,children:void 0,capture:void 0,wildcard:!1};function LV(e,t){let r=e,n=t;for(;;){let i=n,o=r,a=o.parsers,s=0;if(a!==0)s=1;else{if(i===0)return 0;s=1}if(s===1){let l=o.capture,c=0;if(i===0)return a;if(i.hd===""){if(i.tl===0)return a;c=2}else c=2;if(c===2){if(o.wildcard)return a;let d=i.tl,f=hO(o.children,i.hd);if(f!==void 0){n=d,r=f;continue}if(l===void 0)return 0;n=d,r=l;continue}}}}function zV(e,t,r){let n=(i,o)=>{if(i===0)return{parsers:{hd:t,tl:o.parsers},children:o.children,capture:o.capture,wildcard:o.wildcard};let a=o.capture,s=o.children,l=i.tl,c=i.hd;if(typeof c!="object"){if(c!=="Capture")return{parsers:{hd:t,tl:o.parsers},children:o.children,capture:o.capture,wildcard:!0};let f=n(l,a!==void 0?a:ux);return{parsers:o.parsers,children:o.children,capture:f,wildcard:o.wildcard}}else{let d=c._0,f=hO(s,d),p=n(l,f!==void 0?f:ux);return{parsers:o.parsers,children:lx(s,d,p),capture:o.capture,wildcard:o.wildcard}}};return n(e,r)}function UV(e){return{prefix:0,matched:pO(e)}}function BV(e){return Pv({hd:"",tl:e.matched}).join("/")}function jV(e){return Pv({hd:"",tl:e.prefix}).join("/")}function qV(e,t){return{TAG:"Route",_0:e,_1:t,_2:r=>r}}function b0(e,t){return{TAG:"Match",_0:e,_1:t}}function cx(e){return typeof e!="object"?e==="End"?0:{hd:"Wildcard",tl:0}:e.TAG==="Match"?{hd:{TAG:"Match",_0:e._0},tl:cx(e._1)}:{hd:"Capture",tl:cx(e._1)}}function VV(e,t){let r=i=>e("/"+Pv(i).join("/")),n=(i,o)=>{for(;;){let a=o,s=i;if(typeof a!="object")return a==="End"?s(0):d=>s(AV(d.matched,0));if(a.TAG==="Match"){let d=a._0;o=a._1,i=f=>s({hd:d,tl:f});continue}let l=a._1,c=a._0.to_;return d=>n(f=>s({hd:c(d),tl:f}),l)}};return n(r,t)}function GV(e){return VV(t=>t,e)}function KV(e,t,r){let n=e,i=t,o=0,a=r;for(;;){let s=a,l=o,c=i,d=n;if(typeof d!="object")return d==="End"?s!==0?s.hd===""&&s.tl===0?{TAG:"MatchWithTrailingSlash",_0:c}:"NoMatch":{TAG:"FullMatch",_0:c}:{TAG:"FullMatch",_0:c({prefix:cO(l),matched:s})};if(d.TAG==="Match"){if(s===0)return"NoMatch";let p=s.hd;if(d._0!==p)return"NoMatch";a=s.tl,o={hd:p,tl:l},n=d._1;continue}if(s===0)return"NoMatch";let f=s.hd,h=d._0.from_(f);if(h===void 0)return"NoMatch";a=s.tl,o={hd:f,tl:l},i=c(kt(h)),n=d._1}}function HV(e){let t=cO(e);return dO(t,ux,(r,n)=>{let i=cx(n._0);return zV(i,n,r)})}function WV(e,t){let r=pO(t),i=LV(e,r);for(;;){let o=i;if(o===0)return"NoMatch";let a=o.hd,s=a._2,l=KV(a._0,a._1,r);if(typeof l=="object")return l.TAG==="FullMatch"?{TAG:"FullMatch",_0:s(l._0)}:{TAG:"MatchWithTrailingSlash",_0:s(l._0)};i=o.tl}}function JV(e,t){let r=WV(e,t);if(typeof r=="object")return Nt(r._0)}function mO(e){return e("End")}let gO={prefix:jV,wildcard_match:BV,of_parts:UV},QV="Wildcard",bs=GV,jc=qV;function Iu(){return{}}let vO=Zt({});function YV(e,t){return e+("."+t)}function XV(e,t,r,n){return e[YV(t,r)]=bs(n),e}function dx(e,t){return Object.assign(Object.assign({},e),t)}function Tp(){return xt(vO)}let ZV=vO.Provider;function eG(e){return ur(ZV,{value:e.registry,children:e.children})}let tG={make:eG},bO={contents:{}};function rG(e){bO.contents=e}function nG(e){return e.startsWith("/")?e.slice(1):e}function iG(e){let t=nG(e);return q(nt(Object.entries(bO.contents),void 0,(r,n)=>{let i=n[0];if(!t.startsWith(i+"/"))return r;let o=n[1];return r!==void 0&&r[0].length>=i.length?r:[i,o]}),r=>r[1])}function Pu(e){if(e.startsWith("http://")||e.startsWith("https://"))return e;let t=iG(e);if(t===void 0)return e;let r=e.startsWith("/")?e:"/"+e;return(t.endsWith("/")?t.slice(0,t.length-1|0):t)+r}let oG=((e,t)=>{for(var r in e)t(e[r],r)});function aG(e){if(typeof e=="boolean")return e}function sG(e){if(e===null)return null}function lG(e){if(typeof e=="string")return e}function uG(e){if(typeof e=="number")return e}function cG(e){if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}function dG(e){if(Array.isArray(e))return e}let he={bool:aG,$$null:sG,string:lG,float:uG,object:cG,array:dG};function F(e,t){if(t in e)return Nt(e[t])}function Te(e){let t=Object.keys(e),r=t.length,n=new Array(r);for(let i=0;i<r;++i){let o=t[i];n[i]=[o,e[o]]}return n}function Np(e){let t=Object.keys(e),r=t.length,n=new Array(r);for(let i=0;i<r;++i)n[i]=e[t[i]];return n}function Oe(e){let t={},r=e.length;for(let n=0;n<r;++n){let i=e[n];t[i[0]]=i[1]}return t}let fG=/[^aeiou]y$/i;function hG(e){return fG.test(e)?e.slice(0,e.length-1|0)+"ies":e.endsWith("s")||e.endsWith("x")||e.endsWith("z")||e.endsWith("ch")||e.endsWith("sh")?e+"es":e+"s"}function Eo(e){return e.endsWith("ies")?e.slice(0,e.length-3|0)+"y":e.endsWith("ses")||e.endsWith("xes")||e.endsWith("zes")||e.endsWith("ches")||e.endsWith("shes")?e.slice(0,e.length-2|0):e.endsWith("s")?e.slice(0,e.length-1|0):e}function Dp(e){return hG(Eo(e))}let pG=[["id","ID"],["ids","IDs"],["url","URL"],["uri","URI"],["api","API"],["arn","ARN"],["aws","AWS"],["iam","IAM"],["sqs","SQS"],["sns","SNS"],["uuid","UUID"],["ip","IP"],["dns","DNS"],["http","HTTP"],["https","HTTPS"],["json","JSON"],["xml","XML"],["sql","SQL"],["ui","UI"],["ux","UX"]],mG=Oe(pG);function T_(e){return e===e.toUpperCase()?e!==e.toLowerCase():!1}function N_(e){return e===e.toLowerCase()?e!==e.toUpperCase():!1}function gG(e){switch(e){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return!0;default:return!1}}function vG(e){let t=e.length,r=[],n={contents:""},i=()=>{if(n.contents.length>0){r.push(n.contents),n.contents="";return}};for(let o=0;o<t;++o){let a=e.charAt(o);if(a==="_"||a==="-"||a===" ")i();else if(T_(a)){let s=o>0&&N_(e.charAt(o-1|0)),l=(o+1|0)<t&&N_(e.charAt(o+1|0)),c=o>0&&T_(e.charAt(o-1|0));(s||c&&l)&&i(),n.contents=n.contents+a}else if(gG(a)){let s=!1;if(o>0){let l=e.charAt(o-1|0);s=T_(l)||N_(l)}s&&i(),n.contents=n.contents+a}else n.contents=n.contents+a}return i(),r}function bG(e){let t=e.toLowerCase(),r=F(mG,t);return r!==void 0?r:e.length===0?"":e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function pt(e){let t=vG(e);return t.length!==0?t.map(bG).join(" "):e}let _G=Eo;function Ze(e){let t=typeof e;return t==="string"?{TAG:"JSONString",_0:e}:t==="number"?{TAG:"JSONNumber",_0:e}:t==="boolean"?e===!0?"JSONTrue":"JSONFalse":e===null?"JSONNull":Array.isArray(e)?{TAG:"JSONArray",_0:e}:{TAG:"JSONObject",_0:e}}function ie(e){if(typeof e=="string")return e}function zi(e){if(typeof e=="number")return e}function G(e){if(typeof e=="object"&&!Array.isArray(e)&&e!==null)return e}function Et(e){if(Array.isArray(e))return e}function Ov(e){if(typeof e=="boolean")return e}let MR=(function(e,t){for(var r in e)t(r)});function Ce(e,t){if(e===t)return!0;let r=typeof e;if(r==="string"||r==="number"||r==="bigint"||r==="boolean"||r==="undefined"||e===null)return!1;let n=typeof t;if(r==="function"||n==="function")throw{RE_EXN_ID:"Invalid_argument",_1:"equal: functional value",Error:new Error};if(n==="number"||n==="bigint"||n==="undefined"||t===null)return!1;let i=e.TAG,o=t.TAG;if(i!==o)return!1;let a=e.length|0,s=t.length|0;if(a===s)if(Array.isArray(e)){let l=0;for(;;){let c=l;if(c===a)return!0;if(!Ce(e[c],t[c]))return!1;l=c+1|0}}else{if(e instanceof Date&&t instanceof Date)return!(e>t||e<t);{let l={contents:!0},c=f=>{if(!Object.prototype.hasOwnProperty.call(t,f)){l.contents=!1;return}},d=f=>{if(!Object.prototype.hasOwnProperty.call(e,f)||!Ce(t[f],e[f])){l.contents=!1;return}};return MR(e,c),l.contents&&MR(t,d),l.contents}}else return!1}function da(e,t){return(typeof e=="number"||typeof e=="bigint")&&(typeof t=="number"||typeof t=="bigint")?e!==t:!Ce(e,t)}let x={background:"--rv-color-background",surface:"--rv-color-surface",surfaceSubtle:"--rv-color-surface-subtle",surfaceElevated:"--rv-color-surface-elevated",brand:"--rv-color-brand",brandSubtle:"--rv-color-brand-subtle",success:"--rv-color-success",warning:"--rv-color-warning",error:"--rv-color-error",info:"--rv-color-info",textPrimary:"--rv-color-text-primary",textSecondary:"--rv-color-text-secondary",textDisabled:"--rv-color-text-disabled",textOnBrand:"--rv-color-text-on-brand",border:"--rv-color-border",borderSubtle:"--rv-color-border-subtle"},O={xs:"--rv-spacing-xs",sm:"--rv-spacing-sm",md:"--rv-spacing-md",lg:"--rv-spacing-lg",xl:"--rv-spacing-xl",xxl:"--rv-spacing-xxl"},$={fontFamily:"--rv-font-family",fontFamilyMono:"--rv-font-family-mono",sizeXs:"--rv-font-size-xs",sizeSm:"--rv-font-size-sm",sizeMd:"--rv-font-size-md",sizeLg:"--rv-font-size-lg",sizeXl:"--rv-font-size-xl",sizeXxl:"--rv-font-size-xxl",weightNormal:"--rv-font-weight-normal",weightMedium:"--rv-font-weight-medium",weightBold:"--rv-font-weight-bold",lineHeightTight:"--rv-line-height-tight",lineHeightNormal:"--rv-line-height-normal",lineHeightRelaxed:"--rv-line-height-relaxed"},Y={sm:"--rv-radius-sm",md:"--rv-radius-md",lg:"--rv-radius-lg",full:"--rv-radius-full"},Zr={sm:"--rv-shadow-sm",md:"--rv-shadow-md",lg:"--rv-shadow-lg"};function fx(e){switch(e){case"Wide":return 0;case"Compact":return 1;case"Narrow":return 2;case"Tight":return 3}}function yG(e,t){return fx(e)>=fx(t)}function xG(e){switch(e){case"Wide":return"wide";case"Compact":return"compact";case"Narrow":return"narrow";case"Tight":return"tight"}}function SG(e){switch(e){case"compact":return"Compact";case"narrow":return"Narrow";case"tight":return"Tight";case"wide":return"Wide";default:return}}let Jn={compact:"(max-width: 1024px)",narrow:"(max-width: 720px)",tight:"(max-width: 520px)",bandRank:fx,atLeastAsNarrow:yG,bandName:xG,bandOfName:SG},_O="x-reventless-union",yO="x-reventless-union-member";function wG(e){let t=F(e,_O),r;if(t!==void 0){let n=ie(t);r=n!==void 0?n:k(k(G(t),i=>F(i,"name")),ie)}else r=void 0;return k(r,n=>{if(n!=="")return n})}function EG(e){return Ce(k(k(G(e),t=>F(t,"type")),ie),"null")}function kG(e){return k(k(F(e,yO),ie),t=>{if(t!=="")return t})}function CG(e){return k(G(e),t=>k(k(F(t,"properties"),G),r=>q(k(k(k(F(r,"TAG"),G),n=>F(n,"const")),ie),n=>({tag:n,memberType:kG(t),properties:Oe(Te(r).filter(i=>i[0]!=="TAG"))}))))}function Wl(e){return k(G(e),t=>nt(["oneOf","anyOf"],void 0,(r,n)=>r!==void 0?r:k(k(F(t,n),Et),i=>{let o=i.filter(l=>!EG(l)),a=o.length;if(a===1)return Wl(o[0]);if(a===0)return;let s=Q(o,CG);if(s.length===o.length)return{name:wG(t),arms:s}})))}function hx(e,t){let r=t.memberType;return r!==void 0?r:q(e.name,n=>n+t.tag)}function xw(e,t){let r=e.arms.find(i=>i.tag===t?!0:Ce(hx(e,i),t));if(r!==void 0)return r;let n=e.arms.filter(i=>t.endsWith(i.tag));if(n.length===1)return n[0]}function xO(e){return Oe([["type","object"],["properties",e.properties]])}function bn(e){let t=G(e);if(t===void 0)return e;let r=F(t,"type"),n=F(t,"properties");return r!==void 0||n!==void 0||Ee(Wl(e))?e:D(q(nt(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:k(k(F(t,o),Et),a=>a.find(s=>da(k(k(G(s),l=>F(l,"type")),ie),"null")))),bn),e)}function SO(e){return k(G(bn(e)),t=>{if(k(F(t,"type"),ie)==="array")return q(F(t,"items"),bn)})}function RG(e,t){return t.startsWith(e)}function AG(e){return e==="inherit_"?"inherit":e==="unset"?"unset":"initial"}let cn={initial:"initial",inherit_:"inherit_",unset:"unset",toString:AG};function $G(e){return{NAME:"var",VAL:e}}function TG(e,t){return{NAME:"varDefault",VAL:[e,t]}}function LR(e){return RG("--",e)?e:"--"+e}function Mv(e){if(e.NAME==="var")return"var("+LR(e.VAL)+")";let t=e.VAL;return"var("+LR(t[0])+","+t[1]+")"}function NG(e){return{NAME:"s",VAL:e}}function DG(e){return{NAME:"ms",VAL:e}}function FG(e){return e.NAME==="ms"?e.VAL.toString()+"ms":e.VAL.toString()+"s"}let IG={s:NG,ms:DG,toString:FG};function Sw(e){return e.VAL.toString()+"%"}function PG(e){return{NAME:"ch",VAL:e}}function OG(e){return{NAME:"em",VAL:e}}function MG(e){return{NAME:"ex",VAL:e}}function LG(e){return{NAME:"rem",VAL:e}}function zG(e){return{NAME:"vh",VAL:e}}function UG(e){return{NAME:"vw",VAL:e}}function BG(e){return{NAME:"vmin",VAL:e}}function jG(e){return{NAME:"vmax",VAL:e}}function qG(e){return{NAME:"px",VAL:e}}function VG(e){return{NAME:"pxFloat",VAL:e}}function GG(e){return{NAME:"cm",VAL:e}}function KG(e){return{NAME:"mm",VAL:e}}function HG(e){return{NAME:"inch",VAL:e}}function WG(e){return{NAME:"pc",VAL:e}}function JG(e){return{NAME:"pt",VAL:e}}function px(e){if(typeof e!="object")return"0";let t=e.NAME;return t==="inch"?e.VAL.toString()+"in":t==="vmax"?e.VAL.toString()+"vmax":t==="vmin"?e.VAL.toString()+"vmin":t==="percent"?e.VAL.toString()+"%":t==="ch"?e.VAL.toString()+"ch":t==="cm"?e.VAL.toString()+"cm":t==="em"?e.VAL.toString()+"em":t==="ex"?e.VAL.toString()+"ex":t==="mm"?e.VAL.toString()+"mm":t==="pc"?e.VAL.toString()+"pc":t==="pt"?e.VAL.toString()+"pt":t==="px"?e.VAL.toString()+"px":t==="vh"?e.VAL.toString()+"vh":t==="vw"?e.VAL.toString()+"vw":t==="rem"?e.VAL.toString()+"rem":e.VAL.toString()+"px"}let wO={ch:PG,em:OG,ex:MG,rem:LG,vh:zG,vw:UG,vmin:BG,vmax:jG,px:qG,pxFloat:VG,cm:GG,mm:KG,inch:HG,pc:WG,pt:JG,zero:"zero",toString:px};function QG(e,t){return{NAME:"min",VAL:[e,t]}}function YG(e,t){return{NAME:"max",VAL:[e,t]}}function Qo(e){if(typeof e!="object")return px(e);let t=e.NAME;if(t==="subtract"){let n=e.VAL;return"calc("+Qo(n[0])+" - "+Qo(n[1])+")"}if(t==="percent")return Sw(e);if(t==="add"){let n=e.VAL;return"calc("+Qo(n[0])+" + "+Qo(n[1])+")"}if(t==="div"){let n=e.VAL;return"calc("+Qo(n[0])+" / "+n[1].toString()+")"}if(t==="max"){let n=e.VAL;return"max("+Qo(n[0])+", "+Qo(n[1])+")"}if(t==="min"){let n=e.VAL;return"min("+Qo(n[0])+", "+Qo(n[1])+")"}if(t!=="mul")return px(e);let r=e.VAL;return"calc("+Qo(r[0])+" * "+r[1].toString()+")"}let en={min:QG,max:YG,toString:Qo};function XG(e){let t=e.NAME;return t==="turn"?e.VAL.toString()+"turn":t==="deg"?e.VAL.toString()+"deg":t==="rad"?e.VAL.toString()+"rad":e.VAL.toString()+"grad"}function ZG(e){return e==="fixed"?"fixed":e==="static"?"static":e==="sticky"?"sticky":e==="relative"?"relative":"absolute"}let eK={absolute:"absolute",relative:"relative",$$static:"static",fixed:"fixed",sticky:"sticky",toString:ZG};function tK(e){return e==="clip"?"clip":e==="scroll"?"scroll":e==="hidden"?"hidden":e==="visible"?"visible":"auto"}let EO={hidden:"hidden",visible:"visible",scroll:"scroll",auto:"auto",clip:"clip",toString:tK};function rK(e){return"auto"}let nK={auto:"auto",toString:rK};function iK(e,t){return{NAME:"steps",VAL:[e,t]}}function oK(e,t,r,n){return{NAME:"cubicBezier",VAL:[e,t,r,n]}}function aK(e){if(typeof e!="object")return e==="easeInOut"?"ease-in-out":e==="linear"?"linear":e==="jumpBoth"?"jump-both":e==="stepStart"?"step-start":e==="jumpNone"?"jump-none":e==="stepEnd"?"step-end":e==="easeIn"?"ease-in":e==="jumpEnd"?"jump-end":e==="jumpStart"?"jump-start":e==="easeOut"?"ease-out":"ease";if(e.NAME==="steps"){let r=e.VAL,n=r[0];return r[1]==="start"?"steps("+n.toString()+", start)":"steps("+n.toString()+", end)"}let t=e.VAL;return"cubic-bezier("+t[0].toString()+", "+t[1].toString()+", "+t[2].toString()+", "+t[3].toString()+")"}function sK(e){return e==="none"?"none":e==="circle"?"circle":e==="lowerGreek"?"lower-greek":e==="square"?"square":e==="lowerAlpha"?"lower-alpha":e==="upperAlpha"?"upper-alpha":e==="decimal"?"decimal":e==="lowerRoman"?"lower-roman":e==="lowerLatin"?"lower-latin":e==="upperRoman"?"upper-roman":e==="upperLatin"?"upper-latin":"disc"}let lK={toString:sK};function uK(e){return typeof e=="object"?e.VAL.toString():"infinite"}let cK={toString:uK};function dK(e){return e==="cell"?"cell":e==="copy"?"copy":e==="swResize"?"sw-resize":e==="grab"?"grab":e==="help"?"help":e==="move"?"move":e==="none"?"none":e==="text"?"text":e==="rowResize"?"row-resize":e==="wait"?"wait":e==="pointer"?"pointer":e==="seResize"?"se-resize":e==="zoomOut"?"zoom-out":e==="sResize"?"s-resize":e==="zoomIn"?"zoom-in":e==="grabbing"?"grabbing":e==="nsResize"?"ns-resize":e==="nwseResize"?"nwse-resize":e==="progress"?"progress":e==="crosshair"?"crosshair":e==="wResize"?"w-resize":e==="noDrop"?"no-drop":e==="allScroll"?"all-scroll":e==="verticalText"?"vertical-text":e==="nResize"?"n-resize":e==="default"?"default":e==="neswResize"?"nesw-resize":e==="alias"?"alias":e==="ewResize"?"ew-resize":e==="eResize"?"e-resize":e==="nwResize"?"nw-resize":e==="contextMenu"?"context-menu":e==="colResize"?"col-resize":e==="notAllowed"?"not-allowed":e==="neResize"?"ne-resize":"auto"}let fK={auto:"auto",$$default:"default",none:"none",contextMenu:"contextMenu",help:"help",pointer:"pointer",progress:"progress",wait:"wait",cell:"cell",crosshair:"crosshair",text:"text",verticalText:"verticalText",alias:"alias",copy:"copy",move:"move",noDrop:"noDrop",notAllowed:"notAllowed",grab:"grab",grabbing:"grabbing",allScroll:"allScroll",colResize:"colResize",rowResize:"rowResize",nResize:"nResize",eResize:"eResize",sResize:"sResize",wResize:"wResize",neResize:"neResize",nwResize:"nwResize",seResize:"seResize",swResize:"swResize",ewResize:"ewResize",nsResize:"nsResize",neswResize:"neswResize",nwseResize:"nwseResize",zoomIn:"zoomIn",zoomOut:"zoomOut",toString:dK};function hK(e,t,r){return{NAME:"rgb",VAL:[e,t,r]}}function pK(e,t,r,n){return{NAME:"rgba",VAL:[e,t,r,n]}}function mK(e,t,r){return{NAME:"hsl",VAL:[e,t,r]}}function gK(e,t,r,n){return{NAME:"hsla",VAL:[e,t,r,n]}}function vK(e){return{NAME:"hex",VAL:e}}function zR(e){let t=e.NAME;return t==="var"||t==="varDefault"?Mv(e):XG(e)}function UR(e){let t=e.NAME;return t==="percent"?Sw(e):t==="num"?e.VAL.toString():Mv(e)}function Fm(e){return e.NAME==="percent"?Sw(e):Mv(e)}function Im(e){if(typeof e!="object")return e==="transparent"?"transparent":"currentColor";let t=e.NAME;if(t==="rgba"){let n=e.VAL;return"rgba("+n[0].toString()+", "+n[1].toString()+", "+n[2].toString()+", "+UR(n[3])+")"}if(t==="hex")return"#"+e.VAL;if(t==="hsl"){let n=e.VAL;return"hsl("+zR(n[0])+", "+Fm(n[1])+", "+Fm(n[2])+")"}if(t==="rgb"){let n=e.VAL;return"rgb("+n[0].toString()+", "+n[1].toString()+", "+n[2].toString()+")"}let r=e.VAL;return"hsla("+zR(r[0])+", "+Fm(r[1])+", "+Fm(r[2])+", "+UR(r[3])+")"}function bK(e){if(typeof e!="object"||e.NAME!=="lightDark")return Im(e);let t=e.VAL;return"light-dark("+Im(t[0])+", "+Im(t[1])+")"}function _K(e){return e==="hidden"?"hidden":e==="ridge"?"ridge":e==="solid"?"solid":e==="outset"?"outset":e==="groove"?"groove":e==="dashed"?"dashed":e==="dotted"?"dotted":e==="double"?"double":e==="inset"?"inset":"none"}let yK={toString:_K};function xK(e){return typeof e=="object"?e.VAL.toString():"normal"}let BR={toString:xK};function SK(e){return e==="inline"?"inline":e==="block"?"block":"run-in"}let wK={toString:SK};function EK(e){return e==="grid"?"grid":e==="table"?"table":"flex"}let kK={toString:EK};function CK(e){return"list-item"}let RK={toString:CK};function AK(e){return e==="tableRow"?"table-row":e==="tableRowGroup"?"table-row-group":e==="tableColumn"?"table-column":e==="tableHeaderGroup"?"table-header-group":e==="tableCell"?"table-cell":e==="tableColumnGroup"?"table-column-group":e==="tableCaption"?"table-caption":"table-footer-group"}let $K={toString:AK};function TK(e){return e==="contents"?"contents":"none"}let NK={toString:TK};function DK(e){return e==="inlineBlock"?"inline-block":e==="inlineFlex"?"inline-flex":e==="inlineGrid"?"inline-grid":"inline-table"}let FK={toString:DK};function IK(e){return e==="left"?"left":e==="right"?"right":e==="selfEnd"?"self-end":e==="start"?"start":e==="center"?"center":e==="flexStart"?"flex-start":e==="flexEnd"?"flex-end":e==="selfStart"?"self-start":"end"}let ww={toString:IK};function PK(e){return e==="firstBaseline"?"first baseline":e==="baseline"?"baseline":"last baseline"}let kO={toString:PK};function OK(e){return"normal"}let MK={toString:OK};function LK(e){return e==="spaceAround"?"space-around":e==="stretch"?"stretch":e==="spaceBetween"?"space-between":"space-evenly"}let zK={toString:LK};function UK(e){return e==="right"?"right":e==="justify"?"justify":e==="start"?"start":e==="center"?"center":"left"}let BK={toString:UK};function jK(e){return e==="normal"?"normal":"stretch"}let qK={toString:jK};function VK(e){return e==="stretch"?"stretch":e==="normal"?"normal":"auto"}let GK={toString:VK};function KK(e){return e==="wrapReverse"?"wrap-reverse":e==="nowrap"?"nowrap":"wrap"}let HK={toString:KK};function WK(e){return e==="row"?"row":e==="columnReverse"?"column-reverse":e==="rowReverse"?"row-reverse":"column"}let JK={toString:WK};function QK(e){return e==="none"?"none":e==="text"?"text":e==="all"?"all":e==="contain"?"contain":"auto"}let YK={toString:QK};function XK(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let Ew={toString:XK};function ZK(e){return"none"}let Lv={toString:ZK};function eH(e){return e==="minContent"?"min-content":e==="fitContent"?"fit-content":e==="maxContent"?"max-content":"auto"}let kw={toString:eH},tn={$$var:$G,varDefault:TG,toString:Mv},tH={linear:"linear",ease:"ease",easeIn:"easeIn",easeOut:"easeOut",easeInOut:"easeInOut",stepStart:"stepStart",stepEnd:"stepEnd",steps:iK,cubicBezier:oK,jumpStart:"jumpStart",jumpEnd:"jumpEnd",jumpNone:"jumpNone",jumpBoth:"jumpBoth",toString:aK},mx={rgb:hK,rgba:pK,hsl:mK,hsla:gK,hex:vK,transparent:"transparent",currentColor:"currentColor",toString:bK},rH=Lv,nH=Lv,iH=Lv,oH=Lv,aH=mx.transparent;function sH(e,t){switch(t.TAG){case"D":let r=t._1,n=t._0;n==="content"?e[n]=r===""?'""':r:e[n]=r;break;case"S":e[t._0]=bu(t._1);break;case"PseudoClass":e[":"+t._0]=bu(t._1);break;case"PseudoClassParam":e[":"+(t._0+("("+(t._1+")")))]=bu(t._2);break}return e}function bu(e){return fO(e,{},sH)}function lH(e){let t=p=>e.injectRaw(p),r=(p,m)=>e.renderRaw(p,m),n=(p,m)=>e.injectRules(p,bu(m)),i=(p,m,g)=>e.renderRules(p,m,bu(g)),o=p=>e.make(bu(p)),a=p=>e.mergeStyles(p),s=(p,m)=>e.mergeStyles([p,m]),l=(p,m,g)=>e.mergeStyles([p,m,g]),c=(p,m,g,v)=>e.mergeStyles([p,m,g,v]),d=p=>fO(p,{},(m,g)=>(m[g[0].toString()+"%"]=bu(g[1]),m));return{insertRule:t,renderRule:r,global:n,renderGlobal:i,style:o,merge:a,merge2:s,merge3:l,merge4:c,keyframes:p=>e.makeKeyframes(d(p)),renderKeyframes:(p,m)=>e.renderKeyframes(p,d(m))}}function zv(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="zero"?en.toString(e):"auto";let t=e.NAME;return t==="var"||t==="varDefault"?tn.toString(e):en.toString(e)}function uH(e){if(typeof e!="object")return mx.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?tn.toString(e):mx.toString(e)}function cH(e){return{TAG:"D",_0:"alignItems",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?kO.toString(e):e==="normal"||e==="stretch"?qK.toString(e):ww.toString(e)}}function dH(e){return{TAG:"D",_0:"alignSelf",_1:typeof e=="object"?tn.toString(e):e==="selfStart"||e==="flexEnd"||e==="flexStart"||e==="center"||e==="start"||e==="selfEnd"||e==="right"||e==="left"||e==="end_"?ww.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="baseline"||e==="firstBaseline"||e==="lastBaseline"?kO.toString(e):GK.toString(e)}}function fH(e){return{TAG:"D",_0:"animationDuration",_1:IG.toString(e)}}function hH(e){return{TAG:"D",_0:"animationIterationCount",_1:cK.toString(e)}}function pH(e){return{TAG:"D",_0:"animationTimingFunction",_1:tH.toString(e)}}function mH(e){return{TAG:"D",_0:"bottom",_1:zv(e)}}function gH(e){return{TAG:"D",_0:"cursor",_1:fK.toString(e)}}function vH(e){return{TAG:"D",_0:"display",_1:typeof e=="object"?tn.toString(e):e==="table"||e==="grid"||e==="flex"?kK.toString(e):e==="contents"||e==="none"?NK.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="inlineGrid"||e==="inlineFlex"||e==="inlineBlock"||e==="inlineTable"?FK.toString(e):e==="block"||e==="inline"||e==="runIn"?wK.toString(e):e==="listItem"?RK.toString(e):$K.toString(e)}}function bH(e){return{TAG:"D",_0:"flexDirection",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):JK.toString(e)}}function _H(e){return{TAG:"D",_0:"flexGrow",_1:e.toString()}}function yH(e){return{TAG:"D",_0:"flexShrink",_1:e.toString()}}function xH(e){return{TAG:"D",_0:"flexWrap",_1:typeof e=="object"?tn.toString(e):e==="nowrap"||e==="wrapReverse"||e==="wrap"?HK.toString(e):cn.toString(e)}}function SH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="zero"?en.toString(e):kw.toString(e);return{TAG:"D",_0:"height",_1:t}}function wH(e){return{TAG:"D",_0:"justifyContent",_1:typeof e=="object"?tn.toString(e):e==="spaceBetween"||e==="stretch"||e==="spaceAround"||e==="spaceEvenly"?zK.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="normal"?MK.toString(e):ww.toString(e)}}function EH(e){return{TAG:"D",_0:"left",_1:zv(e)}}function kH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):r==="abs"?BR.toString(e):en.toString(e)}else t=e==="zero"?en.toString(e):e==="normal"?BR.toString(e):cn.toString(e);return{TAG:"D",_0:"lineHeight",_1:t}}function CH(e){return{TAG:"D",_0:"listStyleType",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):lK.toString(e)}}function Ou(e){if(typeof e!="object")return e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="zero"?en.toString(e):nK.toString(e);let t=e.NAME;return t==="var"||t==="varDefault"?tn.toString(e):en.toString(e)}function RH(e){return{TAG:"D",_0:"margin",_1:Ou(e)}}function AH(e,t){return{TAG:"D",_0:"margin",_1:Ou(e)+(" "+Ou(t))}}function $H(e){return{TAG:"D",_0:"marginLeft",_1:Ou(e)}}function TH(e){return{TAG:"D",_0:"marginRight",_1:Ou(e)}}function NH(e){return{TAG:"D",_0:"marginTop",_1:Ou(e)}}function DH(e){return{TAG:"D",_0:"marginBottom",_1:Ou(e)}}function FH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="none"?iH.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="zero"?en.toString(e):kw.toString(e);return{TAG:"D",_0:"maxHeight",_1:t}}function IH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="none"?rH.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="zero"?en.toString(e):Ew.toString(e);return{TAG:"D",_0:"maxWidth",_1:t}}function PH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="none"?oH.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="zero"?en.toString(e):kw.toString(e);return{TAG:"D",_0:"minHeight",_1:t}}function OH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="none"?nH.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="zero"?en.toString(e):Ew.toString(e);return{TAG:"D",_0:"minWidth",_1:t}}function MH(e){return{TAG:"D",_0:"opacity",_1:e.toString()}}function LH(e){return{TAG:"D",_0:"overflow",_1:EO.toString(e)}}function zH(e){return{TAG:"D",_0:"overflowY",_1:EO.toString(e)}}function UH(e){return{TAG:"D",_0:"padding",_1:en.toString(e)}}function BH(e,t){return{TAG:"D",_0:"padding",_1:en.toString(e)+(" "+en.toString(t))}}function jH(e){return{TAG:"D",_0:"position",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):eK.toString(e)}}function qH(e){return{TAG:"D",_0:"right",_1:zv(e)}}function VH(e){return{TAG:"D",_0:"textAlign",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):BK.toString(e)}}function GH(e){return{TAG:"D",_0:"top",_1:zv(e)}}function KH(e,t){return{TAG:"D",_0:e,_1:t}}function HH(e){return{TAG:"D",_0:"userSelect",_1:typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):YK.toString(e)}}function WH(e){let t;if(typeof e=="object"){let r=e.NAME;t=r==="var"||r==="varDefault"?tn.toString(e):en.toString(e)}else t=e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):e==="zero"?en.toString(e):Ew.toString(e);return{TAG:"D",_0:"width",_1:t}}function JH(e){return{TAG:"D",_0:"zIndex",_1:e.toString()}}function QH(e,t){return{TAG:"S",_0:"@media "+e,_1:t}}function YH(e,t){return{TAG:"S",_0:e,_1:t}}function XH(e){return{TAG:"PseudoClass",_0:"disabled",_1:e}}function ZH(e){return{TAG:"PseudoClass",_0:"focus",_1:e}}function eW(e){return{TAG:"PseudoClass",_0:"focus-within",_1:e}}function tW(e){return{TAG:"PseudoClass",_0:"hover",_1:e}}function rW(e){return{TAG:"PseudoClass",_0:"last-child",_1:e}}function nW(e){return{TAG:"S",_0:"::placeholder",_1:e}}let iW=wO.px;function oW(e){return typeof e=="object"?tn.toString(e):e==="unset"||e==="inherit_"||e==="initial"?cn.toString(e):yK.toString(e)}function aW(e,t,r){return{TAG:"D",_0:"border",_1:wO.toString(e)+" "+oW(t)+" "+uH(r)}}function sW(e){return{TAG:"D",_0:"animationName",_1:e}}function lW(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function uW(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var cW=(function(){function e(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(uW(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=lW(i);try{o.insertRule(n,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},e})(),ti="-ms-",_0="-moz-",Qt="-webkit-",CO="comm",Cw="rule",Rw="decl",dW="@import",RO="@keyframes",fW="@layer",hW=Math.abs,Uv=String.fromCharCode,pW=Object.assign;function mW(e,t){return Gn(e,0)^45?(((t<<2^Gn(e,0))<<2^Gn(e,1))<<2^Gn(e,2))<<2^Gn(e,3):0}function AO(e){return e.trim()}function gW(e,t){return(e=t.exec(e))?e[0]:e}function Yt(e,t,r){return e.replace(t,r)}function gx(e,t){return e.indexOf(t)}function Gn(e,t){return e.charCodeAt(t)|0}function Oh(e,t,r){return e.slice(t,r)}function Na(e){return e.length}function Aw(e){return e.length}function Pm(e,t){return t.push(e),e}function vW(e,t){return e.map(t).join("")}var Bv=1,Cd=1,$O=0,Ui=0,ln=0,Hd="";function jv(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:Bv,column:Cd,length:a,return:""}}function Df(e,t){return pW(jv("",null,null,"",null,null,0),e,{length:-e.length},t)}function bW(){return ln}function _W(){return ln=Ui>0?Gn(Hd,--Ui):0,Cd--,ln===10&&(Cd=1,Bv--),ln}function io(){return ln=Ui<$O?Gn(Hd,Ui++):0,Cd++,ln===10&&(Cd=1,Bv++),ln}function ja(){return Gn(Hd,Ui)}function jg(){return Ui}function Fp(e,t){return Oh(Hd,e,t)}function Mh(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function TO(e){return Bv=Cd=1,$O=Na(Hd=e),Ui=0,[]}function NO(e){return Hd="",e}function qg(e){return AO(Fp(Ui-1,vx(e===91?e+2:e===40?e+1:e)))}function yW(e){for(;(ln=ja())&&ln<33;)io();return Mh(e)>2||Mh(ln)>3?"":" "}function xW(e,t){for(;--t&&io()&&!(ln<48||ln>102||ln>57&&ln<65||ln>70&&ln<97););return Fp(e,jg()+(t<6&&ja()==32&&io()==32))}function vx(e){for(;io();)switch(ln){case e:return Ui;case 34:case 39:e!==34&&e!==39&&vx(ln);break;case 40:e===41&&vx(e);break;case 92:io();break}return Ui}function SW(e,t){for(;io()&&e+ln!==57;)if(e+ln===84&&ja()===47)break;return"/*"+Fp(t,Ui-1)+"*"+Uv(e===47?e:io())}function wW(e){for(;!Mh(ja());)io();return Fp(e,Ui)}function EW(e){return NO(Vg("",null,null,null,[""],e=TO(e),0,[0],e))}function Vg(e,t,r,n,i,o,a,s,l){for(var c=0,d=0,f=a,h=0,p=0,m=0,g=1,v=1,b=1,y=0,S="",w=i,C=o,A=n,T=S;v;)switch(m=y,y=io()){case 40:if(m!=108&&Gn(T,f-1)==58){gx(T+=Yt(qg(y),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:T+=qg(y);break;case 9:case 10:case 13:case 32:T+=yW(m);break;case 92:T+=xW(jg()-1,7);continue;case 47:switch(ja()){case 42:case 47:Pm(kW(SW(io(),jg()),t,r),l);break;default:T+="/"}break;case 123*g:s[c++]=Na(T)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+d:b==-1&&(T=Yt(T,/\f/g,"")),p>0&&Na(T)-f&&Pm(p>32?qR(T+";",n,r,f-1):qR(Yt(T," ","")+";",n,r,f-2),l);break;case 59:T+=";";default:if(Pm(A=jR(T,t,r,c,d,i,s,S,w=[],C=[],f),o),y===123)if(d===0)Vg(T,t,A,A,w,o,f,s,C);else switch(h===99&&Gn(T,3)===110?100:h){case 100:case 108:case 109:case 115:Vg(e,A,A,n&&Pm(jR(e,A,A,0,0,i,s,S,i,w=[],f),C),i,C,f,s,n?w:C);break;default:Vg(T,A,A,A,[""],C,0,s,C)}}c=d=p=0,g=b=1,S=T="",f=a;break;case 58:f=1+Na(T),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&_W()==125)continue}switch(T+=Uv(y),y*g){case 38:b=d>0?1:(T+="\f",-1);break;case 44:s[c++]=(Na(T)-1)*b,b=1;break;case 64:ja()===45&&(T+=qg(io())),h=ja(),d=f=Na(S=T+=wW(jg())),y++;break;case 45:m===45&&Na(T)==2&&(g=0)}}return o}function jR(e,t,r,n,i,o,a,s,l,c,d){for(var f=i-1,h=i===0?o:[""],p=Aw(h),m=0,g=0,v=0;m<n;++m)for(var b=0,y=Oh(e,f+1,f=hW(g=a[m])),S=e;b<p;++b)(S=AO(g>0?h[b]+" "+y:Yt(y,/&\f/g,h[b])))&&(l[v++]=S);return jv(e,t,r,i===0?Cw:s,l,c,d)}function kW(e,t,r){return jv(e,t,r,CO,Uv(bW()),Oh(e,2,-2),0)}function qR(e,t,r,n){return jv(e,t,r,Rw,Oh(e,0,n),Oh(e,n+1,-1),n)}function ad(e,t){for(var r="",n=Aw(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function CW(e,t,r,n){switch(e.type){case fW:if(e.children.length)break;case dW:case Rw:return e.return=e.return||e.value;case CO:return"";case RO:return e.return=e.value+"{"+ad(e.children,n)+"}";case Cw:e.value=e.props.join(",")}return Na(r=ad(e.children,n))?e.return=e.value+"{"+r+"}":""}function RW(e){var t=Aw(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}function AW(e){return function(t){t.root||(t=t.return)&&e(t)}}function $W(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var TW=function(t,r,n){for(var i=0,o=0;i=o,o=ja(),i===38&&o===12&&(r[n]=1),!Mh(o);)io();return Fp(t,Ui)},NW=function(t,r){var n=-1,i=44;do switch(Mh(i)){case 0:i===38&&ja()===12&&(r[n]=1),t[n]+=TW(Ui-1,r,n);break;case 2:t[n]+=qg(i);break;case 4:if(i===44){t[++n]=ja()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Uv(i)}while(i=io());return t},DW=function(t,r){return NO(NW(TO(t),r))},VR=new WeakMap,FW=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!VR.get(n))&&!i){VR.set(t,!0);for(var o=[],a=DW(r,o),s=n.props,l=0,c=0;l<a.length;l++)for(var d=0;d<s.length;d++,c++)t.props[c]=o[l]?a[l].replace(/&\f/g,s[d]):s[d]+" "+a[l]}}},IW=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function DO(e,t){switch(mW(e,t)){case 5103:return Qt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Qt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Qt+e+_0+e+ti+e+e;case 6828:case 4268:return Qt+e+ti+e+e;case 6165:return Qt+e+ti+"flex-"+e+e;case 5187:return Qt+e+Yt(e,/(\w+).+(:[^]+)/,Qt+"box-$1$2"+ti+"flex-$1$2")+e;case 5443:return Qt+e+ti+"flex-item-"+Yt(e,/flex-|-self/,"")+e;case 4675:return Qt+e+ti+"flex-line-pack"+Yt(e,/align-content|flex-|-self/,"")+e;case 5548:return Qt+e+ti+Yt(e,"shrink","negative")+e;case 5292:return Qt+e+ti+Yt(e,"basis","preferred-size")+e;case 6060:return Qt+"box-"+Yt(e,"-grow","")+Qt+e+ti+Yt(e,"grow","positive")+e;case 4554:return Qt+Yt(e,/([^-])(transform)/g,"$1"+Qt+"$2")+e;case 6187:return Yt(Yt(Yt(e,/(zoom-|grab)/,Qt+"$1"),/(image-set)/,Qt+"$1"),e,"")+e;case 5495:case 3959:return Yt(e,/(image-set\([^]*)/,Qt+"$1$`$1");case 4968:return Yt(Yt(e,/(.+:)(flex-)?(.*)/,Qt+"box-pack:$3"+ti+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Qt+e+e;case 4095:case 3583:case 4068:case 2532:return Yt(e,/(.+)-inline(.+)/,Qt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Na(e)-1-t>6)switch(Gn(e,t+1)){case 109:if(Gn(e,t+4)!==45)break;case 102:return Yt(e,/(.+:)(.+)-([^]+)/,"$1"+Qt+"$2-$3$1"+_0+(Gn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~gx(e,"stretch")?DO(Yt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Gn(e,t+1)!==115)break;case 6444:switch(Gn(e,Na(e)-3-(~gx(e,"!important")&&10))){case 107:return Yt(e,":",":"+Qt)+e;case 101:return Yt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Qt+(Gn(e,14)===45?"inline-":"")+"box$3$1"+Qt+"$2$3$1"+ti+"$2box$3")+e}break;case 5936:switch(Gn(e,t+11)){case 114:return Qt+e+ti+Yt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Qt+e+ti+Yt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Qt+e+ti+Yt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Qt+e+ti+e+e}return e}var PW=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case Rw:t.return=DO(t.value,t.length);break;case RO:return ad([Df(t,{value:Yt(t.value,"@","@"+Qt)})],i);case Cw:if(t.length)return vW(t.props,function(o){switch(gW(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ad([Df(t,{props:[Yt(o,/:(read-\w+)/,":"+_0+"$1")]})],i);case"::placeholder":return ad([Df(t,{props:[Yt(o,/:(plac\w+)/,":"+Qt+"input-$1")]}),Df(t,{props:[Yt(o,/:(plac\w+)/,":"+_0+"$1")]}),Df(t,{props:[Yt(o,/:(plac\w+)/,ti+"input-$1")]})],i)}return""})}},OW=[PW],MW=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||OW,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),b=1;b<v.length;b++)o[v[b]]=!0;s.push(g)});var l,c=[FW,IW];{var d,f=[CW,AW(function(g){d.insert(g)})],h=RW(c.concat(i,f)),p=function(v){return ad(EW(v),h)};l=function(v,b,y,S){d=y,p(v?v+"{"+b.styles+"}":b.styles),S&&(m.inserted[b.name]=!0)}}var m={key:r,sheet:new cW({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m};function LW(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var zW={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},UW=/[A-Z]|^ms/g,BW=/_EMO_([^_]+?)_([^]*?)_EMO_/g,FO=function(t){return t.charCodeAt(1)===45},GR=function(t){return t!=null&&typeof t!="boolean"},D_=$W(function(e){return FO(e)?e:e.replace(UW,"-$&").toLowerCase()}),KR=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(BW,function(n,i,o){return bl={name:i,styles:o,next:bl},i})}return zW[t]!==1&&!FO(t)&&typeof r=="number"&&r!==0?r+"px":r};function y0(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return bl={name:i.name,styles:i.styles,next:bl},i.name;var o=r;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)bl={name:a.name,styles:a.styles,next:bl},a=a.next;var s=o.styles+";";return s}return jW(e,t,r)}}var l=r;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function jW(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=y0(e,t,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=o+"{"+t[s]+"}":GR(s)&&(n+=D_(o)+":"+KR(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)GR(a[l])&&(n+=D_(o)+":"+KR(o,a[l])+";");else{var c=y0(e,t,a);switch(o){case"animation":case"animationName":{n+=D_(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}var HR=/label:\s*([^\s;{]+)\s*(;|$)/g,bl;function F_(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";bl=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,i+=y0(r,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=y0(r,t,e[s]),n){var l=o;i+=l[s]}HR.lastIndex=0;for(var c="",d;(d=HR.exec(i))!==null;)c+="-"+d[1];var f=LW(i)+c;return{name:f,styles:i,next:bl}}function IO(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var qW=function(t,r,n){var i=t.key+"-"+r.name;t.registered[i]===void 0&&(t.registered[i]=r.styles)},VW=function(t,r,n){qW(t,r);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function WR(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function JR(e,t,r){var n=[],i=IO(e,n,r);return n.length<2?r:i+t(n)}var GW=function(t){var r=MW(t);r.sheet.speedy=function(s){this.isSpeedy=s},r.compat=!0;var n=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var f=F_(c,r.registered,void 0);return VW(r,f),r.key+"-"+f.name},i=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var f=F_(c,r.registered),h="animation-"+f.name;return WR(r,{name:f.name,styles:"@keyframes "+h+"{"+f.styles+"}"}),h},o=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var f=F_(c,r.registered);WR(r,f)},a=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];return JR(r.registered,n,KW(c))};return{css:n,cx:a,injectGlobal:o,keyframes:i,hydrate:function(l){l.forEach(function(c){r.inserted[c]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:IO.bind(null,r.registered),merge:JR.bind(null,r.registered,n)}},KW=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(r&&(r+=" "),r+=o)}}return r},qv=GW({key:"css"}),HW=qv.cx,Vv=qv.injectGlobal,PO=qv.keyframes,WW=qv.css;function JW(e,t){Vv(t)}function QW(e,t){Vv(Oe([[e,t]]))}function YW(e,t,r){Vv(Oe([[t,r]]))}function XW(e){return PO(e)}function ZW(e,t){return PO(t)}let Gv=lH({injectRaw:e=>{Vv(e)},renderRaw:JW,injectRules:QW,renderRules:YW,make:e=>WW(e),mergeStyles:e=>HW(e),makeKeyframes:XW,renderKeyframes:ZW}),u=KH,X=cH,OO=dH,Ip=mH,Re=gH,z=vH,_e=bH,si=_H,rn=yH,xi=xH,MO=SH,et=wH,Us=EH,eJ=kH,tJ=CH,yn=RH,rJ=AH,Pp=$H,LO=TH,Uo=NH,Op=DH,nJ=FH,iJ=IH,oJ=PH,$w=OH,Cs=MH,Bs=LH,aJ=zH,sJ=UH,lJ=BH,At=jH,js=qH,Xa=VH,Bo=GH,zO=HH,ga=WH,uJ=JH,lr=YH,Ga=QH,Tw=XH,qs=ZH,UO=eW,Ue=tW,BO=rW,cJ=nW,ke=iW,dJ=aW,fJ=sW,hJ=fH,pJ=hH,mJ=pH,gJ=aH,vJ=Gv.global,E=Gv.style,xr=Gv.merge,bJ=Gv.keyframes;function ko(e){return"var("+e+")"}let _J=E([z("flex"),_e("column"),X("center"),et("center"),u("gap",ko(O.md)),si(1),u("min-height","200px"),Xa("center"),u("padding",ko(O.xxl))]),yJ=E([u("font-size","40px"),u("color",ko(x.textDisabled)),u("line-height","1")]),xJ=E([u("color",ko(x.textPrimary)),u("font-size",ko($.sizeLg)),u("font-weight",ko($.weightMedium)),yn(ke(0))]),SJ=E([u("color",ko(x.textSecondary)),u("font-size",ko($.sizeMd)),u("max-width","360px"),yn(ke(0))]),wJ=E([u("background",ko(x.brand)),u("color",ko(x.textOnBrand)),u("border","none"),u("border-radius",ko(Y.md)),u("padding","var("+O.sm+") var("+O.lg+")"),u("font-size",ko($.sizeMd)),u("cursor","pointer"),Uo(ke(8))]);function EJ(e){let t=e.title,r=t!==void 0?t:"Nothing here yet";return L("div",{children:[_("div",{children:"( )",className:yJ}),_("h3",{children:r,className:xJ}),ne(e.description,null,n=>_("p",{children:n,className:SJ})),ne(e.action,null,n=>{let i=n[1];return _("button",{children:n[0],className:wJ,onClick:o=>i()})})],className:_J})}let Wd=EJ;function Ii(e){return"var("+e+")"}let kJ=E([ga({NAME:"percent",VAL:100}),u("border-collapse","collapse"),u("font-size",Ii($.sizeMd))]),CJ=E([u("background",Ii(x.surfaceSubtle)),u("border-bottom","2px solid var("+x.border+")")]),QR=E([u("padding","var("+O.xs+") var("+O.sm+")"),u("color",Ii(x.textSecondary)),u("font-weight",Ii($.weightMedium)),u("font-size",Ii($.sizeSm)),u("text-align","left"),u("white-space","nowrap"),u("user-select","none")]),RJ=E([u("padding","var("+O.sm+") var("+O.md+")"),u("font-size",Ii($.sizeMd))]),AJ=E([Re("pointer"),Ue([u("color",Ii(x.textPrimary))])]),$J=E([u("color",Ii(x.textPrimary))]),TJ=E([Pp(ke(4)),u("font-size",Ii($.sizeXs)),u("color",Ii(x.brand))]),YR=E([u("border-bottom","1px solid var("+x.borderSubtle+")"),Ue([u("background",Ii(x.surfaceSubtle))])]),NJ=E([u("min-height","44px")]),DJ=E([Re("pointer")]),FJ=E([u("background",Ii(x.surfaceSubtle)),u("box-shadow","inset 3px 0 0 0 var("+x.brand+")")]),XR=E([u("padding","var("+O.xs+") var("+O.sm+")"),u("color",Ii(x.textPrimary)),u("vertical-align","middle")]),IJ=E([u("padding","var("+O.sm+") var("+O.md+")")]),PJ=E([Xa("center"),u("padding",Ii(O.xxl))]);function OJ(e){let t=e.onSort,r=e.sortState,n=e.density==="Comfortable"?QR+" "+RJ:QR;return _("thead",{children:_("tr",{children:e.columns.map(i=>{let o=ne(r,!1,l=>l.key===i.key),a=ne(r,"Asc",l=>l.direction),s=i.sortable?n+" "+AJ+(o?" "+$J:""):n;return L("th",{children:[i.label,o?_("span",{children:a==="Asc"?"^":"v",className:TJ}):null],className:s,style:ne(i.width,{},l=>({width:l})),onClick:l=>{if(i.sortable)return ee(t,c=>{let d=o&&a==="Asc"?"Desc":"Asc";c(i.key,d)})}},i.key)})}),className:CJ})}function MJ(e){let t=e.activeKey,r=e.density,n=e.onRowClick,i=e.keyFn,o=e.data,a=e.columns,s=r!==void 0?r:"Compact",l=s==="Comfortable"?XR+" "+IJ:XR,c=s==="Comfortable"?YR+" "+NJ:YR;return L("table",{children:[_(OJ,{columns:a,sortState:e.sortState,onSort:e.onSort,density:s}),_("tbody",{children:o.length===0?_("tr",{children:_("td",{children:D(e.emptyView,_(Wd,{title:"No data"})),className:l+" "+PJ,colSpan:a.length})}):o.map(d=>{let f=i(d),h=ne(n,c,m=>c+" "+DJ),p=Ce(t,f)?h+" "+FJ:h;return _("tr",{children:a.map(m=>_("td",{children:m.render(d),className:l},m.key)),className:p,onClick:m=>ee(n,g=>g(d))},f)})})],className:kJ})}let Lh=MJ;function zh(e){return e?{TAG:"Partial",_0:"FromStart"}:"Complete"}function LJ(e,t){return e?t?{TAG:"Partial",_0:"Between"}:{TAG:"Partial",_0:"ToEnd"}:t?{TAG:"Partial",_0:"FromStart"}:"Complete"}function zJ(e){let t=Q(e,i=>{if(typeof i=="object")return i._0});if(t.length===0)return e.length===0||e.some(i=>i===void 0)?void 0:"Complete";let r=t.some(i=>i!=="FromStart"),n=t.some(i=>i!=="ToEnd");return{TAG:"Partial",_0:r?n?"Between":"ToEnd":"FromStart"}}function ZR(e,t){return e.toString()+" "+t+(e===1?"":"s")}function jO(e,t,r,n){let i=n!==void 0?n:"item",o=D(r,t),a=o===t?ZR(o,i):o.toString()+" of "+ZR(t,i);if(e===void 0)return"Showing the "+a+" loaded";if(typeof e!="object")return"Showing all "+a;switch(e._0){case"FromStart":return"Showing the first "+a+" — more available";case"Between":return"Showing "+a+" — more before and after";case"ToEnd":return"Showing the last "+a+" — more before"}}function qO(e,t){return t?e+"+":e}function UJ(e){return typeof e=="object"}function VO(e){switch(e){case"Small":return 20;case"Medium":return 28;case"Large":return 44}}let GO=["#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74","#5e7c9c"];function BJ(e){let t={contents:5381};return e.split("").forEach(r=>{let n=D(r.codePointAt(0),0);t.contents=(t.contents*33|0)+n&2147483647}),Fo(t.contents,GO.length)}function jJ(e){let t=Q(e.split(/[\s_.@-]+/),o=>o).filter(o=>o!==""),r=o=>o.slice(0,1).toUpperCase(),n=t[0],i=t[1];return n!==void 0?i!==void 0?r(n)+r(i):r(n):"?"}function I_(e){return"var("+e+")"}let qJ=E([z("inlineFlex"),X("center"),et("center"),u("border-radius",I_(Y.full)),u("color","#ffffff"),u("font-family",I_($.fontFamily)),u("font-weight",I_($.weightMedium)),u("flex-shrink","0"),u("user-select","none"),u("vertical-align","middle"),u("overflow","hidden")]),VJ=E([u("width","100%"),u("height","100%"),u("object-fit","cover")]);function GJ(e){let t=e.size,r=e.src,n=e.name,i=t!==void 0?t:"Medium",o=ce(()=>!1),a=o[1],s=VO(i),l=s.toString()+"px",c=r!==void 0?r!==""&&!o[0]:!1,d={background:c?"transparent":GO[BJ(n)],fontSize:((s/2|0)-1|0).toString()+"px",height:l,width:l};return _("span",{children:c?_("img",{className:VJ,alt:n,src:D(r,""),onError:f=>a(h=>!0)}):jJ(n),"aria-label":n,className:qJ,role:"img",style:d,title:n})}let Jd=GJ;function pl(e){return"var("+e+")"}let KJ=E([z("flex"),xi("wrap"),u("gap",pl(O.xs)),X("center")]),HJ=E([z("inlineFlex"),X("center"),u("padding","2px 8px"),u("border-radius",pl(Y.full)),u("background",pl(x.surfaceElevated)),u("color",pl(x.textSecondary)),u("font-size",pl($.sizeXs)),u("font-weight",pl($.weightMedium)),u("line-height","1.5"),u("white-space","nowrap")]),WJ=E([u("color",pl(x.textDisabled)),u("font-size",pl($.sizeSm))]);function JJ(e){let t=e.items;return t.length===0?_("span",{children:"—",className:WJ}):_("div",{children:t.map((r,n)=>_("span",{children:r,className:HJ},n.toString()+":"+r)),className:KJ})}let KO=JJ;function pu(e){return"var("+e+")"}let eA=E([z("inlineFlex"),X("center"),u("gap","4px"),u("background","transparent"),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",pu(Y.sm)),u("padding","1px 6px"),u("color",pu(x.textSecondary)),u("font-size",pu($.sizeXs)),u("line-height","1"),Re("pointer"),Ue([u("background",pu(x.surfaceElevated)),u("color",pu(x.textPrimary))])]),QJ=E([u("color",pu(x.success)),u("border-color",pu(x.success))]);function YJ(e){let t=e.label,r=e.value,n=t!==void 0?t:"Copy",i=ce(()=>!1),o=i[1],a=i[0],s=c=>{c.stopPropagation(),c.preventDefault(),Mt(navigator.clipboard.writeText(r).then(()=>(o(d=>!0),setTimeout(()=>o(d=>!1),1500),Promise.resolve())),d=>Promise.resolve())},l=a?eA+" "+QJ:eA;return _("button",{children:a?"Copied":n,"aria-label":"Copy to clipboard",className:l,type:"button",onClick:s})}let XJ=YJ;function x0(e){return"var("+e+")"}let ZJ=E([z("inlineFlex"),X("center"),u("gap",x0(O.xs)),u("min-width","0")]),eQ=E([u("color",x0(x.brand)),u("text-decoration","none"),u("max-width","260px"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap"),Ue([u("text-decoration","underline")])]),tQ=E([u("color",x0(x.textPrimary)),u("font-family","var(--rv-font-mono, ui-monospace, monospace)"),u("font-size",x0($.sizeSm)),u("max-width","200px"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]);function rQ(e,t){return e.length>t?e.slice(0,6)+"…"+e.slice(e.length-4|0,e.length):e}function nQ(e){let t=e.copyable,r=e.rawValue,n=e.label,i=e.href,o=t!==void 0?t:!1,a=zs();return L("span",{children:[i!==void 0?_("a",{children:n,className:eQ,title:n,href:i,onClick:l=>{if(!(l.metaKey||l.ctrlKey||l.shiftKey||l.altKey||l.button!==0)&&i!==void 0)return l.preventDefault(),l.stopPropagation(),a(i)}}):_("span",{children:rQ(n,18),className:tQ,title:r}),o?_(XJ,{value:r}):null],className:ZJ})}let iQ=nQ;function _s(e){return"var("+e+")"}let tA=E([z("inlineFlex"),X("center"),u("gap","4px"),u("padding","2px 8px"),u("border-radius",_s(Y.full)),u("background",_s(x.surfaceElevated)),u("color",_s(x.textSecondary)),u("font-size",_s($.sizeXs)),u("font-weight",_s($.weightMedium)),u("line-height","1.5"),u("white-space","nowrap"),u("border","none")]),oQ=E([Re("pointer"),Ue([u("background",_s(x.surface)),u("color",_s(x.textPrimary))])]),aQ=E([u("font-weight",_s($.weightBold)),u("color",_s(x.textPrimary))]);function sQ(e){let t=e.onClick,r=ne(t,tA,i=>tA+" "+oQ),n=L(Bt,{children:[_("span",{children:e.count.toString(),className:aQ})," "+e.label,ne(t,null,i=>_("span",{children:" ▸","aria-hidden":!0}))]});return t!==void 0?_("button",{children:n,className:r,type:"button",onClick:i=>t()}):_("span",{children:n,className:r})}let mh=sQ;function Ff(e){let t=e.toString();return t.length<2?"0"+t:t}function Kv(e){let t=new Date(e),r=t.getTime();if(Number.isNaN(r))return e;let n=t.getFullYear()|0,i=(t.getMonth()|0)+1|0,o=t.getDate()|0,a=t.getHours()|0,s=t.getMinutes()|0,l=t.getSeconds()|0;return n.toString()+"-"+Ff(i)+"-"+Ff(o)+" "+Ff(a)+":"+Ff(s)+":"+Ff(l)}let lQ=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/;function Uh(e){if(lQ.test(e))return Kv(e)}function uQ(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function HO(e,t){if(!ne(e,!1,uQ))return Uh(t)}function P_(e){return"var("+e+")"}function cQ(e){if(typeof e=="object")return[e.bg,e.fg];switch(e){case"Success":return[x.success,x.background];case"Warning":return[x.warning,x.background];case"Error":return[x.error,x.background];case"Info":return[x.info,x.background];case"Neutral":return[x.surfaceElevated,x.textSecondary]}}function dQ(e,t){return E([z("inlineFlex"),X("center"),u("gap","4px"),u("padding","2px 8px"),u("border-radius",P_(Y.full)),u("font-size",P_($.sizeXs)),u("font-weight",P_($.weightMedium)),u("line-height","1.5"),u("white-space","nowrap"),u("background",e.startsWith("--rv-")?"var("+e+")":e),u("color",t.startsWith("--rv-")?"var("+t+")":t)])}function fQ(e){let t=e.dot,r=e.variant,n=r!==void 0?r:"Neutral",i=t!==void 0?t:!1,o=cQ(n);return L("span",{children:[i?_("span",{style:{background:"currentColor",display:"inline-block",height:"6px",width:"6px",borderRadius:"50%",flexShrink:"0"}}):null,e.label],className:dQ(o[0],o[1])})}let oa=fQ;function hQ(e){return q(e.plugin,t=>t+"."+e.store)}let WO={isId:!1,isCompositeId:!1,isSubId:!1,isCompositeSubId:!1,index:void 0,hidden:!1,summary:!1,groupBy:!1,drillTarget:void 0,collapsed:!1,scan:!1,scanSort:!1,semantic:void 0,semanticFromType:!1,storeTarget:void 0,channel:void 0,setter:void 0,retired:void 0};function Ni(e,t){let r=q(F(e,t),Ze);return r==="JSONTrue"&&typeof r!="object"}function If(e,t){return k(F(e,t),ie)}function pQ(e){return k(k(F(e,"x-reventless-semantic-target"),G),t=>q(k(F(t,"store"),ie),r=>({plugin:k(F(t,"plugin"),ie),store:r})))}function mQ(e){return k(k(F(e,"x-reventless-setter"),G),t=>q(k(F(t,"command"),ie),r=>({command:r,field:k(F(t,"field"),ie)})))}function gQ(e){return q(k(F(e,"x-reventless-retired"),G),t=>{let r=k(F(t,"values"),Et);return{label:gi(k(F(t,"label"),ie),n=>n.trim()!==""),showWhenFalse:Ni(t,"showWhenFalse"),values:r!==void 0?Q(r,n=>gi(ie(n),i=>i.trim()!=="")):q(gi(k(F(t,"value"),ie),n=>n.trim()!==""),n=>[n]),namedWhenRetired:Ni(t,"namedWhenRetired")}})}function vQ(e){let t=q(F(e,"x-reventless-index"),Ze);if(t!==void 0)return typeof t!="object"?t==="JSONTrue"?"":void 0:t.TAG==="JSONString"?t._0:void 0}function JO(e){let t=G(e);if(t===void 0)return;let r=G(bn(e));if(r===void 0||r===t)return t;let n=Oe(Te(r));return Te(t).forEach(i=>{n[i[0]]=i[1]}),n}function Io(e){let t=JO(e);return t!==void 0?{isId:Ni(t,"x-reventless-id"),isCompositeId:Ni(t,"x-reventless-compositeId"),isSubId:Ni(t,"x-reventless-subId"),isCompositeSubId:Ni(t,"x-reventless-compositeSubId"),index:vQ(t),hidden:Ni(t,"x-reventless-hidden")||Ni(t,"x-reventless-ui-hidden"),summary:Ni(t,"x-reventless-summary"),groupBy:Ni(t,"x-reventless-group-by"),drillTarget:q(If(t,"x-reventless-drillTarget"),r=>({slice:r,keyPath:If(t,"x-reventless-drillTargetKey")})),collapsed:Ni(t,"x-reventless-collapsed"),scan:Ni(t,"x-reventless-scan"),scanSort:Ni(t,"x-reventless-scanSort"),semantic:If(t,"x-reventless-semantic"),semanticFromType:Ce(If(t,"x-reventless-semantic-source"),"type"),storeTarget:pQ(t),channel:If(t,"x-reventless-channel"),setter:mQ(t),retired:gQ(t)}:WO}function bQ(e){return ne(JO(e),!1,t=>Ni(t,"x-reventless-hidden"))}function Mp(e,t){return D(q(k(k(G(e),r=>F(r,"properties")),G),r=>Q(Te(r),n=>{if(t(Io(n[1])))return n[0]})),[])}function _Q(e){return D(q(k(k(G(e),t=>F(t,"properties")),G),t=>Q(Te(t),r=>{let n=r[0];return k(k(k(G(r[1]),i=>F(i,"x-reventless-metric")),G),i=>{let o=k(F(i,"aggregate"),ie),a=k(F(i,"label"),ie);return q(o,s=>[n,s,a])})})),[])}function Hv(e){return Mp(e,t=>t.summary)}function QO(e){return Mp(e,t=>t.isId)[0]}function yQ(e){return Mp(e,t=>t.groupBy)[0]}function Lp(e){return k(k(k(G(e),t=>F(t,"properties")),G),t=>Q(Te(t),r=>{let n=r[0];return q(Io(r[1]).retired,i=>[n,i])})[0])}function xQ(e){return q(Lp(e),t=>t[0])}function YO(e){return Mp(e,t=>t.isCompositeId)}function Nw(e){return Mp(e,t=>t.isSubId?!0:t.isCompositeSubId)[0]}function SQ(e){return k(k(G(e),t=>F(t,"x-reventless-live")),t=>{let r=Ze(t);if(typeof r!="object")switch(r){case"JSONFalse":return!1;case"JSONTrue":return!0;default:return}})}function wQ(e){return D(SQ(e),!0)}function Dw(e){return k(k(G(e),t=>F(t,"x-reventless-viewmode")),ie)}function EQ(e){return k(k(G(e),t=>F(t,"x-reventless-layout")),ie)}function kQ(e){let t=G(e),r=n=>D(k(k(k(k(k(k(t,i=>F(i,"properties")),G),i=>F(i,n)),G),i=>F(i,"title")),ie),pt(n));return k(k(k(t,n=>F(n,"x-reventless-owner-unscoped")),G),n=>q(k(F(n,"field"),ie),i=>({ownerLabel:r(i),matchedGroups:ne(k(F(n,"as"),Et),[],o=>Q(o,ie))})))}function rc(e){return k(q(k(k(G(bn(e)),t=>F(t,"enum")),Et),t=>Q(t,ie)),t=>{if(t.length!==0)return t})}function fo(e,t){return D(k(k(k(k(G(e),r=>F(r,"properties")),G),r=>F(r,t)),rc),[])}function Fw(e,t){return q(Lp(e),r=>{let n=r[1],i=r[0];return{field:i,label:D(vn(gi(t,o=>o.trim()!==""),n.label),pt(i)),showWhenFalse:n.showWhenFalse,values:n.values,namedWhenRetired:n.namedWhenRetired}})}function CQ(e,t){return k(t,r=>{let n=e.values,i=Ze(r);if(n!==void 0)return typeof i!="object"||i.TAG!=="JSONString"?void 0:n.includes(i._0);if(typeof i!="object")switch(i){case"JSONFalse":return!1;case"JSONTrue":return!0;default:return}})}function Bh(e,t){let r=e.values,n=CQ(e,t);return r!==void 0?n!==void 0&&n?q(k(t,ie),i=>_(oa,{variant:"Warning",label:i,dot:!1})):void 0:n!==void 0?n?_(oa,{variant:"Warning",label:e.label,dot:!1}):e.showWhenFalse?_(oa,{variant:"Neutral",label:"Not "+e.label,dot:!1}):void 0:void 0}let XO="archived",Iw="1";function RQ(e){return e.values!==void 0?"Show retired":"Show "+e.label.toLowerCase()}function AQ(e,t){return e?Ee(t):!1}function $Q(e,t){return e?Ce(t,Iw):!1}function TQ(e){return[[XO,e?"":Iw],["after",""],["before",""]]}let Nc={param:XO,on:Iw,label:RQ,offered:AQ,showing:$Q,toggleParams:TQ};function NQ(e,t){return e>t?e-t|0:0}function qc(e){return"var("+e+")"}let DQ=E([z("inlineFlex"),X("center"),u("vertical-align","middle")]),rA=E([z("inlineFlex"),u("border-radius",qc(Y.full)),u("box-shadow","0 0 0 2px var("+x.surface+")")]),FQ=E([z("inlineFlex"),X("center"),et("center"),u("border-radius",qc(Y.full)),u("background",qc(x.surfaceElevated)),u("color",qc(x.textSecondary)),u("font-family",qc($.fontFamily)),u("font-weight",qc($.weightMedium)),u("flex-shrink","0"),u("user-select","none")]);function IQ(e){let t=e.max,r=e.size,n=e.members,i=r!==void 0?r:"Medium",o=t!==void 0?t:4,a=NQ(n.length,o),s=a>0?n.slice(0,o):n,l=a>0?n.slice(o):[],c=VO(i),d=(-c|0)/3|0,f=h=>({marginLeft:h===0?"0":d.toString()+"px",zIndex:((s.length+1|0)-h|0).toString()});return L("span",{children:[s.map((h,p)=>_("span",{children:_(Jd,{name:h.name,src:h.imageUrl,size:i}),className:rA,style:f(p)},p.toString())),a>0?_("span",{children:"+"+a.toString(),className:rA+" "+FQ,style:{fontSize:((c/2|0)-2|0).toString()+"px",height:c.toString()+"px",marginLeft:d.toString()+"px",width:c.toString()+"px",zIndex:(s.length+2|0).toString()},title:l.map(h=>h.name).join(", ")}):null],className:DQ})}let ZO=IQ,eM=Zt(void 0),PQ=eM.Provider;function OQ(e){return ur(PQ,{value:e.fill,children:e.children})}let tM={make:OQ};function MQ(e){return k(xt(eM),t=>t(e))}function Fs(e){let t=parseFloat(e);if(!Number.isNaN(t))return t}function Qd(e){switch(e){case"Email":return"email";case"Phone":return"phone";case"Url":return"url";case"DateTime":return"date-time";case"Currency":return"currency";case"Percent":return"percent";case"Bytes":return"bytes";case"Duration":return"duration";case"Color":return"color";case"Image":return"image";case"Status":return"status";case"GeoLat":return"geo-lat";case"GeoLng":return"geo-lng";case"GeoPoint":return"geo-point";case"Label":return"label";case"UserRef":return"user-ref";case"File":return"file";case"Markdown":return"markdown";case"ChannelText":return"channel-text";case"Rating":return"rating";case"Progress":return"progress";case"FileUrl":return"file-url";case"Country":return"country";case"Address":return"address";case"Qr":return"qr";case"Barcode":return"barcode";case"Signature":return"signature";case"ParentRef":return"parent-ref";case"Money":return"money";case"DateRange":return"date-range";case"Geolocation":return"geolocation"}}let LQ=["Email","Phone","Url","DateTime","Currency","Percent","Bytes","Duration","Color","Image","Status","GeoLat","GeoLng","GeoPoint","Label","UserRef","File","Markdown","ChannelText","Rating","Progress","FileUrl","Country","Address","Qr","Barcode","Signature","ParentRef","Money","DateRange","Geolocation"],rM="storageRef",zQ="uploadableImage",UQ="uploadableFile";function BQ(e){return e===rM||e===zQ?!0:e===UQ}function Pw(e){switch(e){case"address":return"Address";case"barcode":return"Barcode";case"bytes":return"Bytes";case"channel-text":return"ChannelText";case"color":return"Color";case"country":return"Country";case"currency":return"Currency";case"date-time":return"DateTime";case"date-range":case"dateRange":return"DateRange";case"duration":return"Duration";case"email":return"Email";case"file-url":return"FileUrl";case"geo-lat":return"GeoLat";case"geo-lng":return"GeoLng";case"geo-point":case"geoPoint":return"GeoPoint";case"geolocation":return"Geolocation";case"label":return"Label";case"markdown":return"Markdown";case"money":return"Money";case"parent-ref":return"ParentRef";case"percent":return"Percent";case"phone":return"Phone";case"progress":return"Progress";case"qr":return"Qr";case"rating":return"Rating";case"signature":return"Signature";case"status":return"Status";case"file":case"fileRef":case"uploadableFile":return"File";case"image":case"imageRef":case"uploadableImage":return"Image";case"url":return"Url";case"user-ref":return"UserRef";default:return}}function nM(e){switch(e){case"Image":return["Illustrable"];case"Status":return["Stageable"];case"ParentRef":return["Hierarchical"];case"Money":return["Measure"];case"DateRange":return["Schedulable"];case"GeoPoint":case"Geolocation":return["Mappable"];default:return[]}}function S0(e,t){return k(k(F(e,t),ie),r=>{if(r!=="")return r})}function iM(e,t,r){return k(k(k(k(F(e,t),G),n=>F(n,r)),ie),n=>{if(n!=="")return n})}function nc(e,t){return e.TAG==="Pair"?S0(t,e.startField):iM(t,e._0,"start")}function Ow(e,t){if(e.TAG!=="Pair")return iM(t,e._0,"end");let r=e.endField;if(r!==void 0)return S0(t,r)}function oM(e){return e.TAG==="Pair"?e.endField!==void 0:!0}function nA(e,t){let r=F(e,t);if(r===void 0)return;let n=zi(r);return n!==void 0?n:k(ie(r),Fs)}function w0(e,t,r){return k(k(k(F(e,t),G),n=>F(n,r)),zi)}function Wv(e){return k(G(e),t=>{let r=k(k(vn(F(t,"__typename"),F(t,"TAG")),ie),n=>{if(n!=="")return n});return q(r,n=>[n,Oe(Te(t).filter(i=>{let o=i[0];return o!=="__typename"?o!=="TAG":!1}))])})}function Mw(e){return k(Wv(e),t=>{let r=t[1],n=t[0];if(!n.endsWith("Located"))return n.endsWith("Pending")?{TAG:"Pending",requestedFor:S0(r,"requestedFor")}:n.endsWith("Unresolvable")?{TAG:"Unresolvable",reason:S0(r,"reason")}:void 0;let i=w0(r,"point","lat"),o=w0(r,"point","lng");return{TAG:"Located",point:i!==void 0&&o!==void 0?[i,o]:void 0}})}function jQ(e,t){return k(F(e,t),Mw)}function Lw(e){switch(e.TAG){case"Located":let t=e.point;return t!==void 0?t:void 0;case"Pending":case"Unresolvable":return}}function qQ(e){switch(e.TAG){case"Pending":let t=e.requestedFor;return t!==void 0?t:void 0;case"Located":case"Unresolvable":return}}function aM(e){switch(e.TAG){case"Pending":case"Located":return;case"Unresolvable":let t=e.reason;return t!==void 0?t:void 0}}function RHe(e,t){switch(e.TAG){case"Paired":let r=nA(t,e.latField),n=nA(t,e.lngField);return r!==void 0&&n!==void 0?[r,n]:void 0;case"Pointed":let i=e._0,o=w0(t,i,"lat"),a=w0(t,i,"lng");return o!==void 0&&a!==void 0?[o,a]:void 0;case"Geolocated":return k(jQ(t,e._0),Lw)}}function Dr(e){return D(q(k(k(G(bn(e)),t=>F(t,"properties")),G),Te),[]).map(t=>[t[0],bn(t[1])])}function Ur(e,t){return k(k(G(bn(e)),r=>F(r,t)),ie)}function VQ(e){return Ur(e,"type")}function Is(e){let t=Ur(e,"type");if(t===void 0)return!1;switch(t){case"integer":case"number":return!0;default:return!1}}function zp(e){return Ce(Ur(e,"type"),"string")}function Jv(e){let t=Ur(e,"format");if(t===void 0)return!1;switch(t){case"date":case"date-time":return!0;default:return!1}}let sM=["user","username","owner","assignee","assignedto","author","creator","createdby","updatedby","reporter","approver","reviewer","actor","member"];function lM(e){return sM.includes(e.toLowerCase())}function E0(e,t){return t.some(r=>e.endsWith(r))}function GQ(e){return E0(e,["fileurl","documenturl","downloadurl","attachmenturl","pdfurl"])}function KQ(e){let t=Ur(e,"format");if(t!==void 0)switch(t){case"date":case"date-time":return["DateTime","format:date-time"];case"email":return["Email","format:email"];case"uri":case"url":return["Url","format:uri"];default:return}}function iA(e){return ne(rc(e),0,t=>t.length)}function jh(e,t){return k(k(G(bn(e)),r=>F(r,t)),zi)}function HQ(e,t){if(!Is(t))return;let r=jh(t,"maximum");return["rating","stars","starrating"].includes(e)?r!==void 0&&r>10?void 0:["Rating","name:rating"]:e==="score"&&r!==void 0&&r<=10?["Rating","name:score-scale"]:void 0}let WQ=[["street","streetaddress","line1","addressline1","address1","housenumber"],["city","town","locality"],["postalcode","zip","zipcode","postcode"],["state","region","province","county"],["country","countrycode"]];function JQ(e){let t=Dr(e),r=(n,i)=>t.some(o=>o[0].toLowerCase()===n?i(o[1]):!1);return r("amount",Is)?r("currency",zp):!1}function QQ(e){let t=Dr(e),r=n=>t.some(i=>{let o=i[1];return i[0].toLowerCase()===n&&Ce(Ur(o,"type"),"string")?Jv(o):!1});return r("start")?r("end"):!1}function YQ(e){let t=Dr(e);return WQ.filter(r=>t.some(n=>r.includes(n[0].toLowerCase()))).length>=2}let XQ=["parent","parentid","manager","managerid","reportsto","reportstoid","supervisor","supervisorid"];function ZQ(e){return XQ.includes(e)?!0:e.startsWith("parent")?e.endsWith("id"):!1}function eY(e,t){let r=e.toLowerCase(),n=HQ(r,t);return n!==void 0?n:["status","state","stage"].includes(r)&&iA(t)>0?iA(t)<=8?["Status","name:status-enum"]:void 0:Ce(Ur(t,"type"),"string")&&["imageurl","image","photo","photourl","avatar","avatarurl","thumbnail"].includes(r)?["Image","name:image"]:Is(t)&&E0(r,["price","amount","total"])?["Currency","name:currency"]:Ce(Ur(t,"type"),"string")&&["email"].includes(r)?["Email","name:email"]:Ce(Ur(t,"type"),"string")&&["phone","phonenumber"].includes(r)?["Phone","name:phone"]:Ce(Ur(t,"type"),"string")&&["website","url","homepage"].includes(r)?["Url","name:url"]:Ce(Ur(t,"type"),"string")&&(["file","attachment","upload"].includes(r)||E0(r,["storageref","fileref","attachmentref"]))?["File","name:file"]:Is(t)&&["progress","percentcomplete","percentdone","completion"].includes(r)?["Progress","name:progress"]:Ce(Ur(t,"type"),"string")&&["country","countrycode","countryname"].includes(r)?["Country","name:country"]:Ce(Ur(t,"type"),"string")&&["address","streetaddress","billingaddress","shippingaddress"].includes(r)?["Address","name:address"]:Ce(Ur(t,"type"),"string")&&ZQ(r)?["ParentRef","name:parent-ref"]:Ce(Ur(t,"type"),"string")&&["name","title","label","displayname"].includes(r)?["Label","name:label"]:Ce(Ur(t,"type"),"string")&&sM.includes(r)?["UserRef","name:user"]:void 0}function zw(e){return["lat","latitude"].includes(e)}function Uw(e){return["lng","lon","long","longitude"].includes(e)}function tY(e){let t=Dr(e),r=t.some(i=>zw(i[0].toLowerCase())?Is(i[1]):!1),n=t.some(i=>Uw(i[0].toLowerCase())?Is(i[1]):!1);return r?n:!1}function rY(e){return["createdat","updatedat","deletedat"].includes(e)}let oA={contents:[]};function uM(e,t,r){let n=e+"."+t+"."+r;if(oA.contents.some(o=>o===n))return;oA.contents.push(n);let i=LQ.map(Qd).join(", ");console.error('[AutoUI] Unknown semantic "'+r+'" ('+e+') on field "'+t+'" — ignored. Valid ids: '+i+".")}function Rd(e,t){let r=bn(t),n=Io(r),i=n.semanticFromType?"Type":"Annotation",o=ne(n.semantic,!1,BQ),a=k(n.semantic,d=>{if(d===rM)return;let f=Pw(d);if(f!==void 0)return{semantic:f,provenance:i};uM("x-reventless-semantic",e,d)});if(a!==void 0)return a;let s=e.toLowerCase(),l=Ce(Ur(r,"type"),"object")&&JQ(r)?["Money","shape:money"]:Ce(Ur(r,"type"),"object")&&QQ(r)?["DateRange","shape:date-range"]:Ce(Ur(r,"type"),"object")&&YQ(r)?["Address","shape:address"]:Ce(Ur(r,"type"),"object")&&tY(r)?["GeoPoint","shape:geo-point"]:zw(s)&&Is(r)?["GeoLat","name:geo-pair"]:Uw(s)&&Is(r)?["GeoLng","name:geo-pair"]:void 0,c;if(l!==void 0)c=l;else if(Ce(Ur(r,"type"),"string")&&GQ(s))c=["FileUrl","name:file-url"];else{let d=KQ(r);c=d!==void 0?d:eY(e,r)}return vn(q(c,d=>({semantic:d[0],provenance:{TAG:"Heuristic",_0:d[1]}})),o?{semantic:"File",provenance:i}:void 0)}function cM(e,t){let r=Rd(e,t);return r!==void 0?r:k(SO(t),n=>Rd(_G(e),n))}function _n(e,t,r){let n=Dr(e),i={};n.forEach(R=>{let N=R[0],I=k(k(t,M=>F(M,N)),M=>{let P=Pw(M);if(P!==void 0)return{semantic:P,provenance:"Hint"};uM("uiHints.fields",N,M)});if(I!==void 0){i[N]=I;return}else return ee(Rd(N,R[1]),M=>{i[N]=M})});let o=R=>n.map(N=>N[0]).find(N=>ne(F(i,N),!1,I=>I.semantic===R)),a=R=>n.map(N=>N[0]).find(N=>ne(F(i,N),!1,I=>nM(I.semantic).includes(R))),s=k(gi(r,R=>R.field!=="id"),R=>q(n.find(N=>N[0]===R.field?Ce(Ur(N[1],"type"),"string"):!1),N=>N[0])),l=ne(r,!1,R=>Ce(R.source,"annotation")),c=l?s:void 0,d=n.map(R=>R[0]).find(R=>ne(F(i,R),!1,N=>N.semantic==="Label"?N.provenance==="Hint":!1)),f;if(d!==void 0)f=d;else{let R=0;if(s!==void 0&&l?f=s:R=1,R===1){let N=o("Label");f=N!==void 0?N:s}}if(f!==void 0&&s!==void 0&&f===s){let N={semantic:"Label",provenance:l?"Annotation":{TAG:"Heuristic",_0:"declared:labelField"}},I=F(i,f);if(I!==void 0){let M=0,P=I.provenance;(typeof P=="object"||P!=="Hint")&&(M=1),M===1&&I.semantic==="Label"&&(i[f]=N)}else i[f]=N}let h=a("Mappable"),p=o("GeoLat"),m=o("GeoLng"),g=p!==void 0&&m!==void 0?{TAG:"Paired",latField:p,lngField:m}:void 0,v=o("Geolocation"),b=v!==void 0?{TAG:"Geolocated",_0:v}:h!==void 0?{TAG:"Pointed",_0:h}:g,y=a("Schedulable"),S=Q(n,R=>{let N=R[0];if(ne(F(i,N),!1,I=>I.semantic==="DateTime")||Jv(R[1]))return N}),w=S.find(R=>R.toLowerCase().startsWith("start")),C=S.find(R=>R.toLowerCase().startsWith("end")),A=w!==void 0?C!==void 0?{TAG:"Pair",startField:w,endField:C}:{TAG:"Pair",startField:w}:q(S.find(R=>{let N=R.toLowerCase();return rY(N)?!1:E0(N,["at","date"])?!0:N==="date"}),R=>({TAG:"Pair",startField:R}));return{semantics:i,geo:b,dateSpan:y!==void 0?{TAG:"Ranged",_0:y}:A,statusField:a("Stageable"),labelField:f,projectedLabelField:c,imageField:a("Illustrable"),parentField:a("Hierarchical")}}function nY(e,t){let n=_n(e,t,void 0).semantics;return Q(Dr(e),i=>{let o=i[0];return k(F(n,o),a=>{if(nM(a.semantic).includes("Measure"))return o})})}let dM=Zt([]),fM=Zt(e=>{}),iY=dM.Provider,oY=fM.Provider;function aY(e){let t=e.initial,r=t!==void 0?t:[],n=ce(()=>r),i=n[1],o=Nr(a=>i(s=>a),[]);return ur(oY,{value:o,children:ur(iY,{value:n[0],children:e.children})})}let sY={make:aY};function va(){return xt(dM)}function lY(){return xt(fM)}function uY(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}function jo(e,t){let r=uY(t),n=Dp(r),i=e.find(o=>o.name===n);return i!==void 0?i:e.find(o=>o.name===r)}function hM(e,t){return e.find(r=>r.name===t)}function cl(e,t){return mO(r=>b0(e,b0(encodeURIComponent(t),r)))}function Vc(e,t){return b0(e,b0(encodeURIComponent(t),QV))}function Ka(e,t,r,n){let i=[r].concat(n).map(o=>encodeURIComponent(o));return bs(Vc(e,t))(gO.of_parts(i.join("/")))}function cY(e){let r=gO.wildcard_match(e).split("/").filter(o=>o!=="");if(r.length===0)return[void 0,[]];let n=q(r[0],o=>decodeURIComponent(o)),i=r.slice(1).map(o=>decodeURIComponent(o));return[n,i]}var mu=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(mu||{});const dY=[0,1],pM=[1,0],mM=[2,3],gM=[3,2],fY={L:dY,M:pM,Q:mM,H:gM},hY=/^\d*$/,pY=/^[A-Z0-9 $%*+./:-]*$/,O_="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Bw=1,jw=40,aA=3,mY=3,Om=40,gY=10,vM=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],bM=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];let vY=class{constructor(t,r,n,i){if(this.version=t,this.ecc=r,t<Bw||t>jw)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const o=Array.from({length:this.size}).fill(!1);for(let s=0;s<this.size;s++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),i===-1){let s=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);const c=this.getPenaltyScore();c<s&&(i=l,s=c),this.applyMask(l)}}this.mask=i,this.applyMask(i),this.drawFormatBits(i)}size;mask;modules=[];types=[];getModule(t,r){return t>=0&&t<this.size&&r>=0&&r<this.size&&this.modules[r][t]}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2===0,mu.Timing),this.setFunctionModule(n,6,n%2===0,mu.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),r=t.length;for(let n=0;n<r;n++)for(let i=0;i<r;i++)n===0&&i===0||n===0&&i===r-1||n===r-1&&i===0||this.drawAlignmentPattern(t[n],t[i]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const r=this.ecc[1]<<3|t;let n=r;for(let o=0;o<10;o++)n=n<<1^(n>>>9)*1335;const i=(r<<10|n)^21522;for(let o=0;o<=5;o++)this.setFunctionModule(8,o,ls(i,o));this.setFunctionModule(8,7,ls(i,6)),this.setFunctionModule(8,8,ls(i,7)),this.setFunctionModule(7,8,ls(i,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,ls(i,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,ls(i,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,ls(i,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let n=0;n<12;n++)t=t<<1^(t>>>11)*7973;const r=this.version<<12|t;for(let n=0;n<18;n++){const i=ls(r,n),o=this.size-11+n%3,a=Math.floor(n/3);this.setFunctionModule(o,a,i),this.setFunctionModule(a,o,i)}}drawFinderPattern(t,r){for(let n=-4;n<=4;n++)for(let i=-4;i<=4;i++){const o=Math.max(Math.abs(i),Math.abs(n)),a=t+i,s=r+n;a>=0&&a<this.size&&s>=0&&s<this.size&&this.setFunctionModule(a,s,o!==2&&o!==4,mu.Position)}}drawAlignmentPattern(t,r){for(let n=-2;n<=2;n++)for(let i=-2;i<=2;i++)this.setFunctionModule(t+i,r+n,Math.max(Math.abs(i),Math.abs(n))!==1,mu.Alignment)}setFunctionModule(t,r,n,i=mu.Function){this.modules[r][t]=n,this.types[r][t]=i}addEccAndInterleave(t){const r=this.version,n=this.ecc;if(t.length!==Gg(r,n))throw new RangeError("Invalid argument");const i=bM[n[0]][r],o=vM[n[0]][r],a=Math.floor(bx(r)/8),s=i-a%i,l=Math.floor(a/i),c=[],d=CY(o);for(let h=0,p=0;h<i;h++){const m=t.slice(p,p+l-o+(h<s?0:1));p+=m.length;const g=RY(m,d);h<s&&m.push(0),c.push(m.concat(g))}const f=[];for(let h=0;h<c[0].length;h++)c.forEach((p,m)=>{(h!==l-o||m>=s)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(bx(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let i=0;i<this.size;i++)for(let o=0;o<2;o++){const a=n-o,l=(n+1&2)===0?this.size-1-i:i;!this.types[l][a]&&r<t.length*8&&(this.modules[l][a]=ls(t[r>>>3],7-(r&7)),r++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let r=0;r<this.size;r++)for(let n=0;n<this.size;n++){let i;switch(t){case 0:i=(n+r)%2===0;break;case 1:i=r%2===0;break;case 2:i=n%3===0;break;case 3:i=(n+r)%3===0;break;case 4:i=(Math.floor(n/3)+Math.floor(r/2))%2===0;break;case 5:i=n*r%2+n*r%3===0;break;case 6:i=(n*r%2+n*r%3)%2===0;break;case 7:i=((n+r)%2+n*r%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[r][n]&&i&&(this.modules[r][n]=!this.modules[r][n])}}getPenaltyScore(){let t=0;for(let o=0;o<this.size;o++){let a=!1,s=0;const l=[0,0,0,0,0,0,0];for(let c=0;c<this.size;c++)this.modules[o][c]===a?(s++,s===5?t+=aA:s>5&&t++):(this.finderPenaltyAddHistory(s,l),a||(t+=this.finderPenaltyCountPatterns(l)*Om),a=this.modules[o][c],s=1);t+=this.finderPenaltyTerminateAndCount(a,s,l)*Om}for(let o=0;o<this.size;o++){let a=!1,s=0;const l=[0,0,0,0,0,0,0];for(let c=0;c<this.size;c++)this.modules[c][o]===a?(s++,s===5?t+=aA:s>5&&t++):(this.finderPenaltyAddHistory(s,l),a||(t+=this.finderPenaltyCountPatterns(l)*Om),a=this.modules[c][o],s=1);t+=this.finderPenaltyTerminateAndCount(a,s,l)*Om}for(let o=0;o<this.size-1;o++)for(let a=0;a<this.size-1;a++){const s=this.modules[o][a];s===this.modules[o][a+1]&&s===this.modules[o+1][a]&&s===this.modules[o+1][a+1]&&(t+=mY)}let r=0;for(const o of this.modules)r=o.reduce((a,s)=>a+(s?1:0),r);const n=this.size*this.size,i=Math.ceil(Math.abs(r*20-n*10)/n)-1;return t+=i*gY,t}getAlignmentPatternPositions(){if(this.version===1)return[];{const t=Math.floor(this.version/7)+2,r=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,n=[6];for(let i=this.size-7;n.length<t;i-=r)n.splice(1,0,i);return n}}finderPenaltyCountPatterns(t){const r=t[1],n=r>0&&t[2]===r&&t[3]===r*3&&t[4]===r&&t[5]===r;return(n&&t[0]>=r*4&&t[6]>=r?1:0)+(n&&t[6]>=r*4&&t[0]>=r?1:0)}finderPenaltyTerminateAndCount(t,r,n){return t&&(this.finderPenaltyAddHistory(r,n),r=0),r+=this.size,this.finderPenaltyAddHistory(r,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(t,r){r[0]===0&&(t+=this.size),r.pop(),r.unshift(t)}};function ys(e,t,r){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function ls(e,t){return(e>>>t&1)!==0}class qw{constructor(t,r,n){if(this.mode=t,this.numChars=r,this.bitData=n,r<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}getData(){return this.bitData.slice()}}const bY=[1,10,12,14],_Y=[2,9,11,13],yY=[4,8,16,16];function _M(e,t){return e[Math.floor((t+7)/17)+1]}function yM(e){const t=[];for(const r of e)ys(r,8,t);return new qw(yY,e.length,t)}function xY(e){if(!xM(e))throw new RangeError("String contains non-numeric characters");const t=[];for(let r=0;r<e.length;){const n=Math.min(e.length-r,3);ys(Number.parseInt(e.substring(r,r+n),10),n*3+1,t),r+=n}return new qw(bY,e.length,t)}function SY(e){if(!SM(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");const t=[];let r;for(r=0;r+2<=e.length;r+=2){let n=O_.indexOf(e.charAt(r))*45;n+=O_.indexOf(e.charAt(r+1)),ys(n,11,t)}return r<e.length&&ys(O_.indexOf(e.charAt(r)),6,t),new qw(_Y,e.length,t)}function wY(e){return e===""?[]:xM(e)?[xY(e)]:SM(e)?[SY(e)]:[yM(kY(e))]}function xM(e){return hY.test(e)}function SM(e){return pY.test(e)}function EY(e,t){let r=0;for(const n of e){const i=_M(n.mode,t);if(n.numChars>=1<<i)return Number.POSITIVE_INFINITY;r+=4+i+n.bitData.length}return r}function kY(e){e=encodeURI(e);const t=[];for(let r=0;r<e.length;r++)e.charAt(r)!=="%"?t.push(e.charCodeAt(r)):(t.push(Number.parseInt(e.substring(r+1,r+3),16)),r+=2);return t}function bx(e){if(e<Bw||e>jw)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return t}function Gg(e,t){return Math.floor(bx(e)/8)-vM[t[0]][e]*bM[t[0]][e]}function CY(e){if(e<1||e>255)throw new RangeError("Degree out of range");const t=[];for(let n=0;n<e-1;n++)t.push(0);t.push(1);let r=1;for(let n=0;n<e;n++){for(let i=0;i<t.length;i++)t[i]=_x(t[i],r),i+1<t.length&&(t[i]^=t[i+1]);r=_x(r,2)}return t}function RY(e,t){const r=t.map(n=>0);for(const n of e){const i=n^r.shift();r.push(0),t.forEach((o,a)=>r[a]^=_x(o,i))}return r}function _x(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^(r>>>7)*285,r^=(t>>>n&1)*e;return r}function AY(e,t,r=1,n=40,i=-1,o=!0){if(!(Bw<=r&&r<=n&&n<=jw)||i<-1||i>7)throw new RangeError("Invalid value");let a,s;for(a=r;;a++){const f=Gg(a,t)*8,h=EY(e,a);if(h<=f){s=h;break}if(a>=n)throw new RangeError("Data too long")}for(const f of[pM,mM,gM])o&&s<=Gg(a,f)*8&&(t=f);const l=[];for(const f of e){ys(f.mode[0],4,l),ys(f.numChars,_M(f.mode,a),l);for(const h of f.getData())l.push(h)}const c=Gg(a,t)*8;ys(0,Math.min(4,c-l.length),l),ys(0,(8-l.length%8)%8,l);for(let f=236;l.length<c;f^=253)ys(f,8,l);const d=Array.from({length:Math.ceil(l.length/8)},()=>0);return l.forEach((f,h)=>d[h>>>3]|=f<<7-(h&7)),new vY(a,t,d,i)}function $Y(e,t){const{ecc:r="L",boostEcc:n=!1,minVersion:i=1,maxVersion:o=40,maskPattern:a=-1,border:s=1}=t||{},l=typeof e=="string"?wY(e):Array.isArray(e)?[yM(e)]:void 0;if(!l)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const c=AY(l,fY[r],i,o,a,n),d=TY({version:c.version,maskPattern:c.mask,size:c.size,data:c.modules,types:c.types},s);return t?.invert&&(d.data=d.data.map(f=>f.map(h=>!h))),t?.onEncoded?.(d),d}function TY(e,t=1){if(!t)return e;const{size:r}=e,n=r+t*2;e.size=n,e.data.forEach(o=>{for(let a=0;a<t;a++)o.unshift(!1),o.push(!1)});for(let o=0;o<t;o++)e.data.unshift(Array.from({length:n},a=>!1)),e.data.push(Array.from({length:n},a=>!1));const i=mu.Border;e.types.forEach(o=>{for(let a=0;a<t;a++)o.unshift(i),o.push(i)});for(let o=0;o<t;o++)e.types.unshift(Array.from({length:n},a=>i)),e.types.push(Array.from({length:n},a=>i));return e}function NY(e){return"var("+e+")"}let DY=E([z("inlineBlock"),u("background","#ffffff"),u("padding","6px"),u("border-radius",NY(Y.md)),u("border","1px solid var("+x.borderSubtle+")"),u("line-height","0")]),FY=E([u("color","#000000"),u("display","block")]);function IY(e){return e.map((t,r)=>t.map((n,i)=>n?"M"+i.toString()+" "+r.toString()+"h1v1h-1z":"").join("")).join("")}function PY(e){if(e.trim()!=="")try{return $Y(e,{ecc:"M",border:4})}catch{return}}function OY(e){let t=e.size,r=e.value,n=t!==void 0?t:128,i=PY(r);if(i===void 0)return null;let o=i.size.toString();return _("span",{children:_("svg",{children:_("path",{d:IY(i.data),fill:"currentColor"}),"aria-label":D(e.title,"QR code for "+r),className:FY,role:"img",height:n.toString(),width:n.toString(),shapeRendering:"crispEdges",viewBox:"0 0 "+o+" "+o,xmlns:"http://www.w3.org/2000/svg"}),className:DY})}let MY=OY,LY=["11011001100","11001101100","11001100110","10010011000","10010001100","10001001100","10011001000","10011000100","10001100100","11001001000","11001000100","11000100100","10110011100","10011011100","10011001110","10111001100","10011101100","10011100110","11001110010","11001011100","11001001110","11011100100","11001110100","11101101110","11101001100","11100101100","11100100110","11101100100","11100110100","11100110010","11011011000","11011000110","11000110110","10100011000","10001011000","10001000110","10110001000","10001101000","10001100010","11010001000","11000101000","11000100010","10110111000","10110001110","10001101110","10111011000","10111000110","10001110110","11101110110","11010001110","11000101110","11011101000","11011100010","11011101110","11101011000","11101000110","11100010110","11101101000","11101100010","11100011010","11101111010","11001000010","11110001010","10100110000","10100001100","10010110000","10010000110","10000101100","10000100110","10110010000","10110000100","10011010000","10011000010","10000110100","10000110010","11000010010","11001010000","11110111010","11000010100","10001111010","10100111100","10010111100","10010011110","10111100100","10011110100","10011110010","11110100100","11110010100","11110010010","11011011110","11011110110","11110110110","10101111000","10100011110","10001011110","10111101000","10111100010","11110101000","11110100010","10111011110","10111101110","11101011110","11110101110","11010000100","11010010000","11010011100","1100011101011"];function sA(e){return e>="0"?e<="9":!1}function zY(e){let t=[],r=0,n=e.length;for(;r<n;)if(sA(D(e[r],""))){let i=r;for(;r<n&&sA(D(e[r],""));)r=r+1|0;t.push([i,r-i|0])}else r=r+1|0;return t}function UY(e){let t={};return zY(e).forEach(r=>{let n=r[1],i=r[0],o=n%2,a=n-o|0;if(a<=0)return;let s=(i+n|0)===e.length;if((((o+(i===0&&o===0?0:1)|0)+(a/2|0)|0)+(s?0:1)|0)<n){t[(i+o|0).toString()]=a;return}}),t}function BY(e){let t=e.length;if(t===0||e.split("").some(l=>{let c=D(l.codePointAt(0),0);return c<32?!0:c>126}))return;let n=UY(e),i=[],o=Ee(n[0]);i.push(o?105:104);let a=o?"C":"B",s=0;for(;s<t;){let l=n[s.toString()];if(l!==void 0){a!=="C"&&(i.push(99),a="C");for(let c=0,d=l/2|0;c<d;++c){let f=e.substring(s+(c<<1)|0,(s+(c<<1)|0)+2|0);i.push(D(uO(f),0))}s=s+l|0}else a==="C"&&(i.push(100),a="B"),i.push(D(e.codePointAt(s),32)-32|0),s=s+1|0}return i}function jY(e){return q(BY(e),t=>{let r={contents:t[0]};return t.forEach((n,i)=>{if(i>0){r.contents=r.contents+(n*i|0)|0;return}}),t.concat([r.contents%103,106]).map(n=>LY[n]).join("")})}function qY(e,t,r){let n=r.toString(),i=[],o=0,a=e.length;for(;o<a;)if(Ce(e[o],"1")){let s=o;for(;o<a&&Ce(e[o],"1");)o=o+1|0;let l=(o-s|0).toString();i.push("M"+(s+t|0).toString()+" 0h"+l+"v"+n+"h-"+l+"z")}else o=o+1|0;return i.join("")}function VY(e){return"var("+e+")"}let GY=E([z("inlineBlock"),iJ({NAME:"percent",VAL:100}),u("overflow-x","auto"),u("background","#ffffff"),u("padding","6px"),u("border-radius",VY(Y.md)),u("border","1px solid var("+x.borderSubtle+")"),u("line-height","0")]),KY=E([u("color","#000000"),u("display","block")]);function HY(e){let t=e.moduleWidth,r=e.height,n=e.value,i=r!==void 0?r:64,o=t!==void 0?t:2,a=jY(n);if(a===void 0)return null;let s=a.length+20|0;return _("span",{children:_("svg",{children:_("path",{d:qY(a,10,40),fill:"currentColor"}),"aria-label":D(e.title,"Barcode for "+n),className:KY,role:"img",height:i.toString(),width:(s*o|0).toString(),preserveAspectRatio:"none",shapeRendering:"crispEdges",viewBox:"0 0 "+s.toString()+" 40",xmlns:"http://www.w3.org/2000/svg"}),className:GY})}let WY=HY;function lo(e){return"var("+e+")"}let JY=E([At("fixed"),Bo(ke(0)),Us(ke(0)),js(ke(0)),Ip(ke(0)),u("background","rgba(0,0,0,0.82)"),z("flex"),_e("column"),X("center"),et("center"),u("gap",lo(O.md)),u("padding",lo(O.lg)),u("z-index","1100")]),QY=E([u("max-width","min(92vw, 1400px)"),u("max-height","78vh"),u("object-fit","contain"),u("border-radius",lo(Y.sm)),u("box-shadow",lo(Zr.lg))]),YY=E([z("flex"),X("center"),u("gap",lo(O.md)),u("max-width","100%")]),XY=E([z("flex"),X("center"),u("gap",lo(O.md)),u("max-width","92vw"),u("color","#f5f5f5"),u("font-size",lo($.sizeSm))]),ZY=E([u("font-size",lo($.sizeMd)),u("font-weight",lo($.weightMedium)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),eX=E([u("color","#c8c8c8")]),tX=E([u("font-family",lo($.fontFamilyMono)),u("color","#c8c8c8")]),wM=E([z("inlineFlex"),X("center"),et("center"),u("background","rgba(255,255,255,0.12)"),u("border","1px solid rgba(255,255,255,0.25)"),u("border-radius",lo(Y.md)),u("color","#f5f5f5"),u("padding","4px var("+O.sm+")"),u("font-size",lo($.sizeSm)),Re("pointer"),Ue([u("background","rgba(255,255,255,0.22)")])]),lA=xr([wM,E([u("width","40px"),u("height","40px"),u("border-radius","50%"),u("font-size",lo($.sizeLg)),rn(0)])]),rX=xr([wM,E([At("absolute"),Bo(ke(16)),js(ke(16)),u("width","32px")])]);function Dc(e,t,r){return t===0?0:Fo(Fo(e+r|0,t)+t|0,t)}function nX(e){let t=e.onClose,r=e.onIndexChange,n=e.index,i=e.slides,o=i.length,a=o>1;Ae(()=>{let d=f=>{switch(f.key){case"ArrowLeft":return a?r(Dc(n,o,-1)):void 0;case"ArrowRight":return a?r(Dc(n,o,1)):void 0;case"Escape":return t();default:return}};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[n,o]);let s=i[Dc(n,o,0)];if(s===void 0)return null;let l=s.title,c=s.caption;return L("div",{children:[_("button",{children:"✕",className:rX,title:"Close",type:"button",onClick:d=>t()}),L("div",{children:[a?_("button",{children:"‹",className:lA,title:"Previous",type:"button",onClick:d=>r(Dc(n,o,-1))}):null,_("img",{className:QY,alt:D(s.title,""),src:s.src}),a?_("button",{children:"›",className:lA,title:"Next",type:"button",onClick:d=>r(Dc(n,o,1))}):null],className:YY,onClick:d=>{d.stopPropagation()}}),L("div",{children:[l!==void 0?_("span",{children:l,className:ZY,title:l}):null,c!==void 0?_("span",{children:c,className:eX}):null,a?_("span",{children:(Dc(n,o,0)+1|0).toString()+" / "+o.toString(),className:tX}):null,D(e.action,null)],className:XY,onClick:d=>{d.stopPropagation()}})],"aria-modal":!0,className:JY,role:"dialog",onClick:d=>t()})}let EM=nX;function vi(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()}function Ro(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime()}function kM(e,t){let r=new Date(e);return new Date(r.getFullYear(),r.getMonth()+t,1).getTime()}function Qv(e){let t=new Date(e).getDay()|0,r=t===0?6:t-1|0;return Ro(vi(e),-r|0)}function CM(e){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),1).getTime()}function iX(e){let t=Qv(CM(e));return Il(42,r=>Ro(t,r))}function RM(e,t){return vi(e)===vi(t)}function oX(e,t){let r=new Date(e),n=new Date(t);return r.getFullYear()===n.getFullYear()?r.getMonth()===n.getMonth():!1}function AM(e,t,r){let n=vi(r),i=n+864e5;return e<i?t>=n:!1}function uA(e){let t=e.toString();return t.length<2?"0"+t:t}function $M(e){let t=new Date(e);return uA(t.getHours()|0)+":"+uA(t.getMinutes()|0)}function TM(e){return e===vi(e)}let NM=["January","February","March","April","May","June","July","August","September","October","November","December"];function xo(e){let t=new Date(e),r=t.getMonth()|0;return D(NM[r],"")+" "+t.getFullYear().toString()}let Vw=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function DM(e){return new Date(e).getDate()|0}function Ps(e){let r=new Date(e).getDay()|0,n=r===0?6:r-1|0;return D(Vw[n],"")+" "+(new Date(e).getDate()|0).toString()}function Qn(e){let t=new Date(e).getTime();if(!Number.isNaN(t))return t}let FM=864e5;function _u(e){return"var("+e+")"}function aX(e){return E([u("width","100%"),u("height",e),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",_u(Y.md)),u("background",_u(x.surfaceSubtle)),Bs("hidden")])}let sX=E([z("flex"),_e("column"),X("center"),et("center"),u("gap",_u(O.sm)),u("height","100%"),u("padding",_u(O.lg)),u("color",_u(x.textSecondary)),u("font-size",_u($.sizeSm)),u("text-align","center")]),lX=E([u("color",_u(x.brand)),u("text-decoration","none"),Ue([u("text-decoration","underline")])]);function uX(e){return D(D(e.split("?")[0],e).split("#")[0],e).toLowerCase().endsWith(".pdf")}function cX(e){let t=e.height,r=e.title,n=e.src,i=r!==void 0?r:"Document",o=t!==void 0?t:"70vh";return _("object",{children:L("div",{children:["This browser can't display the document inline.",_("a",{children:"Open "+i,className:lX,href:n,rel:"noopener noreferrer",target:"_blank"})],className:sX}),"aria-label":i,className:aX(o),data:n,type:"application/pdf"})}let dX=cX;function IM(e){return e==="Small"?"13px":"18px"}let PM="★";function fX(e,t){let r=t<=0?1:t;return(e<0?0:e>r?r:e)/r}function Mu(e){return"var("+e+")"}function hX(e){return E([z("inlineFlex"),At("relative"),u("font-size",IM(e)),u("line-height","1"),u("letter-spacing","1px"),u("white-space","nowrap"),u("vertical-align","-1px")])}let pX=E([u("color",Mu(x.borderSubtle))]);function mX(e){return E([At("absolute"),u("top","0"),u("left","0"),u("width",(e*100).toString()+"%"),Bs("hidden"),u("white-space","nowrap"),u("color",Mu(x.warning)),u("pointer-events","none")])}let cA=E([z("inlineFlex"),u("gap","2px"),X("center")]);function gX(e,t){return E([u("background","none"),u("border","none"),u("padding","0 1px"),u("font-size",IM(t)),u("line-height","1"),Re("pointer"),u("color",Mu(e?x.warning:x.borderSubtle)),u("transition","color 120ms, transform 120ms"),Ue([u("transform","scale(1.15)")]),lr("&:focus-visible",[u("outline","2px solid var("+x.brand+")"),u("outline-offset","1px"),u("border-radius","2px")])])}let dA=E([u("color",Mu(x.textSecondary)),u("font-size",Mu($.sizeSm))]),vX=E([z("inlineFlex"),X("center"),u("gap","6px")]),bX=E([u("border","1px solid var("+x.error+")"),u("border-radius",Mu(Y.sm)),u("padding","2px 4px")]);function _X(e){return lO(e<=0?0:e,PM).join("")}function yX(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.showValue,o=e.size,a=e.max,s=e.value,l=a!==void 0?a:5,c=o!==void 0?o:"Small",d=i!==void 0?i:!1,f=t!==void 0?t:!1,h=l<=0?5:l,p=_X(h),m=D(e.label,(Math.round(s*10)/10).toString()+" of "+h.toString());return n!==void 0?L("span",{children:[Il(h,g=>g+1|0).map(g=>{let v=g<=s;return _("button",{children:PM,"aria-label":g.toString()+" of "+h.toString(),"aria-pressed":v?"true":"false",className:gX(v,c),title:g.toString()+" of "+h.toString(),type:"button",onBlur:b=>ee(r,y=>y()),onClick:b=>{b.stopPropagation(),n(g===s?0:g)}},g.toString())}),d?_("span",{children:s<=0?"—":s.toString(),className:dA}):null],"aria-label":m,className:f?cA+" "+bX:cA,role:"group"}):L("span",{children:[L("span",{children:[_("span",{children:p,className:pX}),_("span",{children:p,className:mX(fX(s,h))})],"aria-label":m,className:hX(c),role:"img",title:m}),d?_("span",{children:(Math.round(s*10)/10).toString()+" / "+h.toString(),className:dA}):null],className:vX})}let M_=yX;function Lu(e){return"var("+e+")"}let xX=E([z("flex"),_e("column"),u("gap","4px")]),SX=E([z("flex"),et("spaceBetween"),u("font-size",Lu($.sizeSm))]),wX=E([u("color",Lu(x.textSecondary))]),EX=E([u("color",Lu(x.textPrimary)),u("font-weight",Lu($.weightMedium))]),kX=E([u("background",Lu(x.surfaceSubtle)),u("border-radius",Lu(Y.full)),u("height","8px"),Bs("hidden")]);function CX(e,t){return E([u("background",t!==void 0?t:"var("+x.brand+")"),u("border-radius",Lu(Y.full)),u("height","100%"),u("width",e.toString()+"%"),u("transition","width 0.3s ease")])}function RX(e){let t=e.showValue,r=e.label,n=e.value,i=t!==void 0?t:!0,o=n>100?100:n,a=o<0?0:o;return L("div",{children:[Ee(r)||i?L("div",{children:[ne(r,null,s=>_("span",{children:s,className:wX})),i?_("span",{children:Math.round(a).toString()+"%",className:EX}):null],className:SX}):null,_("div",{children:_("div",{className:CX(a,e.color)}),className:kX})],className:xX})}let OM=RX,Yv={};function MM(e){Yv[e.id]=e}function LM(e){return F(Yv,e)}let zM={};function AX(e){return ne(F(Yv,e),zM,t=>t.constraints)}let fA={contents:[]};function $X(e,t){if(fA.contents.some(n=>n===e))return;fA.contents.push(e);let r=Np(Yv).map(n=>n.id).join(", ");console.error('[AutoUI] Unknown channel "'+e+'" ('+t+") — falling back to a plain-text preview. Registered channels: "+(r===""?"(none — has the channel adapter's init() run?)":r))}let UM="#111111";function ea(e){return"var("+e+")"}let hA=E([z("flex"),_e("column"),u("gap",ea(O.xs))]);function TX(e){return E([u("background","#ffffff"),u("border",e?"1px solid var("+x.error+")":"1px dashed var("+x.border+")"),u("border-radius",ea(Y.md)),u("touch-action","none"),u("max-width","100%"),u("width","100%"),u("height","auto"),Re("crosshair"),u("display","block")])}let NX=E([u("fill","#9ca3af"),u("font-size","13px"),u("pointer-events","none"),u("user-select","none")]),DX=E([u("stroke","#e5e7eb"),u("stroke-width","1")]),pA=E([z("flex"),X("center"),u("gap",ea(O.sm)),u("font-size",ea($.sizeXs)),u("color",ea(x.textSecondary))]),mA=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",ea(Y.sm)),u("color",ea(x.textSecondary)),u("font-size",ea($.sizeXs)),u("padding","2px 8px"),Re("pointer"),Ue([u("border-color",ea(x.brand)),u("color",ea(x.brand))])]),FX=E([u("background","#ffffff"),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",ea(Y.md)),u("padding","4px"),u("display","inline-block"),u("line-height","0")]),IX=E([u("display","block"),u("max-width","100%"),u("height","auto")]);function Di(e){return(Math.round(e*10)/10).toString()}function BM(e){return e.map(t=>Di(t.x)+","+Di(t.y)).join(" ")}function PX(e,t,r){let n=e.filter(o=>o.length!==0);if(n.length===0)return"";let i=n.map(o=>{let a=o.length===1?o.concat(o):o;return'<polyline points="'+BM(a)+'"/>'}).join("");return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 '+Di(t)+" "+Di(r)+'" width="'+Di(t)+'" height="'+Di(r)+'"><g fill="none" stroke="'+UM+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'+i+"</g></svg>"}function gA(e){return e.trim().startsWith("<svg")}function jM(e){return"data:image/svg+xml;utf8,"+encodeURIComponent(e)}function OX(e,t){let r=e.x-t.x,n=e.y-t.y;return r*r+n*n>=1.5*1.5}function MX(e){let t=e.hasError,r=e.height,n=e.width,i=e.onBlur,o=e.onChange,a=e.value,s=n!==void 0?n:480,l=r!==void 0?r:160,c=t!==void 0?t:!1,d=Ne(null),f=ce(()=>[]),h=f[1],p=f[0],m=ce(()=>!1),g=m[1],v=Ne(!1),b=R=>q(Li(d.current),N=>{let I=N.getBoundingClientRect(),M=I.width===0?1:s/I.width,P=I.height===0?1:l/I.height;return{x:(R.clientX-I.left)*M,y:(R.clientY-I.top)*P}}),y=R=>o(PX(R,s,l)),S=R=>{R.preventDefault();let N=b(R);if(N!==void 0)return v.current=!0,ee(Li(d.current),I=>{I.setPointerCapture(R.pointerId)}),h(I=>I.concat([[N]]))},w=R=>{if(!v.current)return;let N=b(R);if(N!==void 0)return h(I=>{let M=I[I.length-1|0];if(M===void 0)return I;let P=M[M.length-1|0];return P!==void 0&&!OX(N,P)?I:I.slice(0,I.length-1|0).concat([M.concat([N])])})},C=R=>{if(v.current)return v.current=!1,y(p),ee(i,N=>N())},A=()=>{h(R=>[]),g(R=>!0),o("")},T=p.length!==0;return a.trim().startsWith("<svg")&&!T&&!m[0]?L("div",{children:[_("span",{children:_("img",{className:IX,alt:"Signature",src:jM(a)}),className:FX}),_("div",{children:_("button",{children:"Sign again",className:mA,type:"button",onClick:R=>A()}),className:pA})],className:hA}):L("div",{children:[L("svg",{children:[_("line",{className:DX,x1:Di(s*.06),x2:Di(s*.94),y1:Di(l*.78),y2:Di(l*.78)}),T?null:_("text",{children:"Sign here",className:NX,textAnchor:"middle",x:Di(s/2),y:Di(l*.7)}),_("g",{children:p.map((R,N)=>_("polyline",{points:BM(R.length===1?R.concat(R):R)},N.toString())),fill:"none",stroke:UM,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})],ref:Nt(d),"aria-label":"Signature pad",className:TX(c),role:"img",onPointerDown:S,onPointerMove:w,onPointerUp:C,onPointerCancel:C,viewBox:"0 0 "+Di(s)+" "+Di(l),xmlns:"http://www.w3.org/2000/svg"}),L("div",{children:[T?_("button",{children:"Clear",className:mA,type:"button",onClick:R=>A()}):null,_("span",{children:"Draw your signature above"})],className:pA})],className:hA})}let LX=MX;function zX(e,t,r){let n={};return n[t]=r,Object.assign({},e,n)}function Co(e){return"var("+e+")"}let UX=E([z("flex"),_e("column"),u("gap",Co(O.sm))]),BX=E([z("flex"),u("gap","4px")]),vA=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",Co(Y.sm)),u("color",Co(x.textSecondary)),u("font-size",Co($.sizeXs)),u("padding","2px 8px"),Re("pointer")]),jX=E([u("background",Co(x.brandSubtle)),u("border-color",Co(x.brand)),u("color",Co(x.textPrimary))]),qX=E([ga({NAME:"percent",VAL:100}),u("min-height","220px"),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",Co(Y.sm)),u("background","#ffffff")]),VX=E([u("margin","0"),u("font-family",Co($.fontFamilyMono)),u("font-size",Co($.sizeXs)),u("line-height",Co($.lineHeightRelaxed)),u("color",Co(x.textPrimary)),u("white-space","pre-wrap"),u("word-break","break-word")]);function GX(e){let t=e.textAlternative,r=ce(()=>!1),n=r[1],i=r[0],o=(l,c,d)=>_("button",{children:l,className:c?vA+" "+jX:vA,type:"button",onClick:d}),a,s=0;return i&&t!==void 0?a=_("pre",{children:t,className:VX}):s=1,s===1&&(a=_("iframe",{className:qX,title:"Email preview",sandbox:"",srcDoc:e.html})),L("div",{children:[t!==void 0?L("div",{children:[o("HTML",!i,l=>n(c=>!1)),o("Plain text",i,l=>n(c=>!0))],className:BX}):null,a],className:UX})}function KX(e,t){return _(GX,{html:e.body,textAlternative:e.textAlternative})}function HX(){MM({id:"email",label:"Email",constraints:{subjectMaxLength:78,note:"Subject lines are elided in inbox lists past ~78 characters"},preview:KX})}const bA={};function WX(e){let t=bA[e];if(t)return t;t=bA[e]=[];for(let r=0;r<128;r++){const n=String.fromCharCode(r);t.push(n)}for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2)}return t}function Ad(e,t){typeof t!="string"&&(t=Ad.defaultChars);const r=WX(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(n){let i="";for(let o=0,a=n.length;o<a;o+=3){const s=parseInt(n.slice(o+1,o+3),16);if(s<128){i+=r[s];continue}if((s&224)===192&&o+3<a){const l=parseInt(n.slice(o+4,o+6),16);if((l&192)===128){const c=s<<6&1984|l&63;c<128?i+="��":i+=String.fromCharCode(c),o+=3;continue}}if((s&240)===224&&o+6<a){const l=parseInt(n.slice(o+4,o+6),16),c=parseInt(n.slice(o+7,o+9),16);if((l&192)===128&&(c&192)===128){const d=s<<12&61440|l<<6&4032|c&63;d<2048||d>=55296&&d<=57343?i+="���":i+=String.fromCharCode(d),o+=6;continue}}if((s&248)===240&&o+9<a){const l=parseInt(n.slice(o+4,o+6),16),c=parseInt(n.slice(o+7,o+9),16),d=parseInt(n.slice(o+10,o+12),16);if((l&192)===128&&(c&192)===128&&(d&192)===128){let f=s<<18&1835008|l<<12&258048|c<<6&4032|d&63;f<65536||f>1114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}i+="�"}return i})}Ad.defaultChars=";/?:@&=+$,#";Ad.componentChars="";const _A={};function JX(e){let t=_A[e];if(t)return t;t=_A[e]=[];for(let r=0;r<128;r++){const n=String.fromCharCode(r);/^[0-9a-z]$/i.test(n)?t.push(n):t.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r<e.length;r++)t[e.charCodeAt(r)]=e[r];return t}function Up(e,t,r){typeof t!="string"&&(r=t,t=Up.defaultChars),typeof r>"u"&&(r=!0);const n=JX(t);let i="";for(let o=0,a=e.length;o<a;o++){const s=e.charCodeAt(o);if(r&&s===37&&o+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){i+=e.slice(o,o+3),o+=2;continue}if(s<128){i+=n[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<a){const l=e.charCodeAt(o+1);if(l>=56320&&l<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}Up.defaultChars=";/?:@&=+$,-_.!~*'()#";Up.componentChars="-_.!~*'()";function Gw(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function k0(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const QX=/^([a-z0-9.+-]+:)/i,YX=/:[0-9]*$/,XX=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ZX=["<",">",'"',"`"," ","\r",`
|
|
3
|
+
`," "],eZ=["{","}","|","\\","^","`"].concat(ZX),tZ=["'"].concat(eZ),yA=["%","/","?",";","#"].concat(tZ),xA=["/","?","#"],rZ=255,SA=/^[+a-z0-9A-Z_-]{0,63}$/,nZ=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,wA={javascript:!0,"javascript:":!0},EA={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Kw(e,t){if(e&&e instanceof k0)return e;const r=new k0;return r.parse(e,t),r}k0.prototype.parse=function(e,t){let r,n,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const c=XX.exec(o);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let a=QX.exec(o);if(a&&(a=a[0],r=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&wA[a])&&(o=o.substr(2),this.slashes=!0)),!wA[a]&&(i||a&&!EA[a])){let c=-1;for(let m=0;m<xA.length;m++)n=o.indexOf(xA[m]),n!==-1&&(c===-1||n<c)&&(c=n);let d,f;c===-1?f=o.lastIndexOf("@"):f=o.lastIndexOf("@",c),f!==-1&&(d=o.slice(0,f),o=o.slice(f+1),this.auth=d),c=-1;for(let m=0;m<yA.length;m++)n=o.indexOf(yA[m]),n!==-1&&(c===-1||n<c)&&(c=n);c===-1&&(c=o.length),o[c-1]===":"&&c--;const h=o.slice(0,c);o=o.slice(c),this.parseHost(h),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const m=this.hostname.split(/\./);for(let g=0,v=m.length;g<v;g++){const b=m[g];if(b&&!b.match(SA)){let y="";for(let S=0,w=b.length;S<w;S++)b.charCodeAt(S)>127?y+="x":y+=b[S];if(!y.match(SA)){const S=m.slice(0,g),w=m.slice(g+1),C=b.match(nZ);C&&(S.push(C[1]),w.unshift(C[2])),w.length&&(o=w.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>rZ&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),EA[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};k0.prototype.parseHost=function(e){let t=YX.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const iZ=Object.freeze(Object.defineProperty({__proto__:null,decode:Ad,encode:Up,format:Gw,parse:Kw},Symbol.toStringTag,{value:"Module"})),qM=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,VM=/[\0-\x1F\x7F-\x9F]/,oZ=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,Hw=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,GM=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,KM=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,aZ=Object.freeze(Object.defineProperty({__proto__:null,Any:qM,Cc:VM,Cf:oZ,P:Hw,S:GM,Z:KM},Symbol.toStringTag,{value:"Module"})),sZ=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),lZ=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var L_;const uZ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),cZ=(L_=String.fromCodePoint)!==null&&L_!==void 0?L_:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function dZ(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=uZ.get(e))!==null&&t!==void 0?t:e}var $n;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})($n||($n={}));const fZ=32;var _l;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(_l||(_l={}));function yx(e){return e>=$n.ZERO&&e<=$n.NINE}function hZ(e){return e>=$n.UPPER_A&&e<=$n.UPPER_F||e>=$n.LOWER_A&&e<=$n.LOWER_F}function pZ(e){return e>=$n.UPPER_A&&e<=$n.UPPER_Z||e>=$n.LOWER_A&&e<=$n.LOWER_Z||yx(e)}function mZ(e){return e===$n.EQUALS||pZ(e)}var kn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(kn||(kn={}));var xs;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(xs||(xs={}));class gZ{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=kn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=xs.Strict}startEntity(t){this.decodeMode=t,this.state=kn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case kn.EntityStart:return t.charCodeAt(r)===$n.NUM?(this.state=kn.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=kn.NamedEntity,this.stateNamedEntity(t,r));case kn.NumericStart:return this.stateNumericStart(t,r);case kn.NumericDecimal:return this.stateNumericDecimal(t,r);case kn.NumericHex:return this.stateNumericHex(t,r);case kn.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|fZ)===$n.LOWER_X?(this.state=kn.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=kn.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,i){if(r!==n){const o=n-r;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(r,o),i),this.consumed+=o}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(yx(i)||hZ(i))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(yx(i))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===$n.SEMI)this.consumed+=1;else if(this.decodeMode===xs.Strict)return 0;return this.emitCodePoint(dZ(this.result),this.consumed),this.errors&&(t!==$n.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let i=n[this.treeIndex],o=(i&_l.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const a=t.charCodeAt(r);if(this.treeIndex=vZ(n,i,this.treeIndex+Math.max(1,o),a),this.treeIndex<0)return this.result===0||this.decodeMode===xs.Attribute&&(o===0||mZ(a))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],o=(i&_l.VALUE_LENGTH)>>14,o!==0){if(a===$n.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==xs.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,i=(n[r]&_l.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:i}=this;return this.emitCodePoint(r===1?i[t]&~_l.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case kn.NamedEntity:return this.result!==0&&(this.decodeMode!==xs.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case kn.NumericDecimal:return this.emitNumericEntity(0,2);case kn.NumericHex:return this.emitNumericEntity(0,3);case kn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case kn.EntityStart:return 0}}}function HM(e){let t="";const r=new gZ(e,n=>t+=cZ(n));return function(i,o){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),r.startEntity(o);const c=r.write(i,s+1);if(c<0){a=s+r.end();break}a=s+c,s=c===0?a+1:a}const l=t+i.slice(a);return t="",l}}function vZ(e,t,r,n){const i=(t&_l.BRANCH_LENGTH)>>7,o=t&_l.JUMP_TABLE;if(i===0)return o!==0&&n===o?r:-1;if(o){const l=n-o;return l<0||l>=i?-1:e[r+l]-1}let a=r,s=a+i-1;for(;a<=s;){const l=a+s>>>1,c=e[l];if(c<n)a=l+1;else if(c>n)s=l-1;else return e[l+i]}return-1}const WM=HM(sZ);HM(lZ);function bZ(e,t=xs.Legacy){return WM(e,t)}function _Z(e){return WM(e,xs.Strict)}function yZ(e){return Object.prototype.toString.call(e)}function Ww(e){return yZ(e)==="[object String]"}const xZ=Object.prototype.hasOwnProperty;function SZ(e,t){return xZ.call(e,t)}function Xv(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(n){e[n]=r[n]})}}),e}function JM(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function Jw(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function qh(e){if(e>65535){e-=65536;const t=55296+(e>>10),r=56320+(e&1023);return String.fromCharCode(t,r)}return String.fromCharCode(e)}const QM=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,wZ=/&([a-z#][a-z0-9]{1,31});/gi,EZ=new RegExp(QM.source+"|"+wZ.source,"gi"),kZ=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function CZ(e,t){if(t.charCodeAt(0)===35&&kZ.test(t)){const n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return Jw(n)?qh(n):e}const r=bZ(e);return r!==e?r:e}function RZ(e){return e.indexOf("\\")<0?e:e.replace(QM,"$1")}function $d(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(EZ,function(t,r,n){return r||CZ(t,n)})}const AZ=/[&<>"]/,$Z=/[&<>"]/g,TZ={"&":"&","<":"<",">":">",'"':"""};function NZ(e){return TZ[e]}function Pl(e){return AZ.test(e)?e.replace($Z,NZ):e}const DZ=/[.?*+^$[\]\\(){}|-]/g;function FZ(e){return e.replace(DZ,"\\$&")}function _r(e){switch(e){case 9:case 32:return!0}return!1}function Vh(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function YM(e){return Hw.test(e)||GM.test(e)}function Gh(e){return YM(qh(e))}function Kh(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Zv(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function kA(e){return e===32||e===9||e===10||e===13}function eb(e){let t=0;for(;t<e.length&&kA(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&kA(e.charCodeAt(r));r--);return e.slice(t,r+1)}const IZ={mdurl:iZ,ucmicro:aZ},PZ=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:JM,asciiTrim:eb,assign:Xv,escapeHtml:Pl,escapeRE:FZ,fromCodePoint:qh,has:SZ,isMdAsciiPunct:Kh,isPunctChar:YM,isPunctCharCode:Gh,isSpace:_r,isString:Ww,isValidEntityCode:Jw,isWhiteSpace:Vh,lib:IZ,normalizeReference:Zv,unescapeAll:$d,unescapeMd:RZ},Symbol.toStringTag,{value:"Module"}));function OZ(e,t,r){let n,i,o,a;const s=e.posMax,l=e.pos;for(e.pos=t+1,n=1;e.pos<s;){if(o=e.src.charCodeAt(e.pos),o===93&&(n--,n===0)){i=!0;break}if(a=e.pos,e.md.inline.skipToken(e),o===91){if(a===e.pos-1)n++;else if(r)return e.pos=l,-1}}let c=-1;return i&&(c=e.pos),e.pos=l,c}function MZ(e,t,r){let n,i=t;const o={ok:!1,pos:0,str:""};if(e.charCodeAt(i)===60){for(i++;i<r;){if(n=e.charCodeAt(i),n===10||n===60)return o;if(n===62)return o.pos=i+1,o.str=$d(e.slice(t+1,i)),o.ok=!0,o;if(n===92&&i+1<r){i+=2;continue}i++}return o}let a=0;for(;i<r&&(n=e.charCodeAt(i),!(n===32||n<32||n===127));){if(n===92&&i+1<r){if(e.charCodeAt(i+1)===32)break;i+=2;continue}if(n===40&&(a++,a>32))return o;if(n===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=$d(e.slice(t,i)),o.pos=i,o.ok=!0),o}function LZ(e,t,r,n){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(n)a.str=n.str,a.marker=n.marker;else{if(o>=r)return a;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return a;t++,o++,s===40&&(s=41),a.marker=s}for(;o<r;){if(i=e.charCodeAt(o),i===a.marker)return a.pos=o+1,a.str+=$d(e.slice(t,o)),a.ok=!0,a;if(i===40&&a.marker===41)return a;i===92&&o+1<r&&o++,o++}return a.can_continue=!0,a.str+=$d(e.slice(t,o)),a}const zZ=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:MZ,parseLinkLabel:OZ,parseLinkTitle:LZ},Symbol.toStringTag,{value:"Module"})),Za={};Za.code_inline=function(e,t,r,n,i){const o=e[t];return"<code"+i.renderAttrs(o)+">"+Pl(o.content)+"</code>"};Za.code_block=function(e,t,r,n,i){const o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+Pl(e[t].content)+`</code></pre>
|
|
4
|
+
`};Za.fence=function(e,t,r,n,i){const o=e[t],a=o.info?$d(o.info).trim():"";let s="",l="";if(a){const d=a.split(/(\s+)/g);s=d[0],l=d.slice(2).join("")}let c;if(r.highlight?c=r.highlight(o.content,s,l)||Pl(o.content):c=Pl(o.content),c.indexOf("<pre")===0)return c+`
|
|
5
|
+
`;if(a){const d=o.attrIndex("class"),f=o.attrs?o.attrs.slice():[];d<0?f.push(["class",r.langPrefix+s]):(f[d]=f[d].slice(),f[d][1]+=" "+r.langPrefix+s);const h={attrs:f};return`<pre><code${i.renderAttrs(h)}>${c}</code></pre>
|
|
6
|
+
`}return`<pre><code${i.renderAttrs(o)}>${c}</code></pre>
|
|
7
|
+
`};Za.image=function(e,t,r,n,i){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,r,n),i.renderToken(e,t,r)};Za.hardbreak=function(e,t,r){return r.xhtmlOut?`<br />
|
|
8
|
+
`:`<br>
|
|
9
|
+
`};Za.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?`<br />
|
|
10
|
+
`:`<br>
|
|
11
|
+
`:`
|
|
12
|
+
`};Za.text=function(e,t){return Pl(e[t].content)};Za.html_block=function(e,t){return e[t].content};Za.html_inline=function(e,t){return e[t].content};function Yd(){this.rules=Xv({},Za)}Yd.prototype.renderAttrs=function(t){let r,n,i;if(!t.attrs)return"";for(i="",r=0,n=t.attrs.length;r<n;r++)i+=" "+Pl(t.attrs[r][0])+'="'+Pl(t.attrs[r][1])+'"';return i};Yd.prototype.renderToken=function(t,r,n){const i=t[r];let o="";if(i.hidden)return"";i.block&&i.nesting!==-1&&r&&t[r-1].hidden&&(o+=`
|
|
13
|
+
`),o+=(i.nesting===-1?"</":"<")+i.tag,o+=this.renderAttrs(i),i.nesting===0&&n.xhtmlOut&&(o+=" /");let a=!1;if(i.block&&(a=!0,i.nesting===1&&r+1<t.length)){const s=t[r+1];(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===i.tag)&&(a=!1)}return o+=a?`>
|
|
14
|
+
`:">",o};Yd.prototype.renderInline=function(e,t,r){let n="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const s=e[o].type;typeof i[s]<"u"?n+=i[s](e,o,t,r,this):n+=this.renderToken(e,o,t)}return n};Yd.prototype.renderInlineAsText=function(e,t,r){let n="";for(let i=0,o=e.length;i<o;i++)switch(e[i].type){case"text":n+=e[i].content;break;case"image":n+=this.renderInlineAsText(e[i].children,t,r);break;case"html_inline":case"html_block":n+=e[i].content;break;case"softbreak":case"hardbreak":n+=`
|
|
15
|
+
`;break}return n};Yd.prototype.render=function(e,t,r){let n="";const i=this.rules;for(let o=0,a=e.length;o<a;o++){const s=e[o].type;s==="inline"?n+=this.renderInline(e[o].children,t,r):typeof i[s]<"u"?n+=i[s](e,o,t,r,this):n+=this.renderToken(e,o,t,r)}return n};function Bi(){this.__rules__=[],this.__cache__=null}Bi.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Bi.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(n){t.indexOf(n)<0&&t.push(n)})}),e.__cache__={},t.forEach(function(r){e.__cache__[r]=[],e.__rules__.forEach(function(n){n.enabled&&(r&&n.alt.indexOf(r)<0||e.__cache__[r].push(n.fn))})})};Bi.prototype.at=function(e,t,r){const n=this.__find__(e),i=r||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=i.alt||[],this.__cache__=null};Bi.prototype.before=function(e,t,r,n){const i=this.__find__(e),o=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null};Bi.prototype.after=function(e,t,r,n){const i=this.__find__(e),o=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null};Bi.prototype.push=function(e,t,r){const n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};Bi.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(n){const i=this.__find__(n);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[i].enabled=!0,r.push(n)},this),this.__cache__=null,r};Bi.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,t)};Bi.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(n){const i=this.__find__(n);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[i].enabled=!1,r.push(n)},this),this.__cache__=null,r};Bi.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function ba(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ba.prototype.attrIndex=function(t){if(!this.attrs)return-1;const r=this.attrs;for(let n=0,i=r.length;n<i;n++)if(r[n][0]===t)return n;return-1};ba.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};ba.prototype.attrSet=function(t,r){const n=this.attrIndex(t),i=[t,r];n<0?this.attrPush(i):this.attrs[n]=i};ba.prototype.attrGet=function(t){const r=this.attrIndex(t);let n=null;return r>=0&&(n=this.attrs[r][1]),n};ba.prototype.attrJoin=function(t,r){const n=this.attrIndex(t);n<0?this.attrPush([t,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};function XM(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}XM.prototype.Token=ba;const UZ=/\r\n?|\n/g,BZ=/\0/g;function jZ(e){let t;t=e.src.replace(UZ,`
|
|
16
|
+
`),t=t.replace(BZ,"�"),e.src=t}function qZ(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function VZ(e){const t=e.tokens;for(let r=0,n=t.length;r<n;r++){const i=t[r];i.type==="inline"&&e.md.inline.parse(i.content,e.md,e.env,i.children)}}function GZ(e){return/^<a[>\s]/i.test(e)}function KZ(e){return/^<\/a\s*>/i.test(e)}function HZ(e){const t=e.tokens;if(e.md.options.linkify)for(let r=0,n=t.length;r<n;r++){if(t[r].type!=="inline"||!e.md.linkify.pretest(t[r].content))continue;let i=t[r].children,o=0;for(let a=i.length-1;a>=0;a--){const s=i[a];if(s.type==="link_close"){for(a--;i[a].level!==s.level&&i[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(GZ(s.content)&&o>0&&o--,KZ(s.content)&&o++),!(o>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const l=s.content;let c=e.md.linkify.match(l);const d=[];let f=s.level,h=0;c.length>0&&c[0].index===0&&a>0&&i[a-1].type==="text_special"&&(c=c.slice(1));for(let p=0;p<c.length;p++){const m=c[p].url,g=e.md.normalizeLink(m);if(!e.md.validateLink(g))continue;let v=c[p].text;c[p].schema?c[p].schema==="mailto:"&&!/^mailto:/i.test(v)?v=e.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):v=e.md.normalizeLinkText(v):v=e.md.normalizeLinkText("http://"+v).replace(/^http:\/\//,"");const b=c[p].index;if(b>h){const C=new e.Token("text","",0);C.content=l.slice(h,b),C.level=f,d.push(C)}const y=new e.Token("link_open","a",1);y.attrs=[["href",g]],y.level=f++,y.markup="linkify",y.info="auto",d.push(y);const S=new e.Token("text","",0);S.content=v,S.level=f,d.push(S);const w=new e.Token("link_close","a",-1);w.level=--f,w.markup="linkify",w.info="auto",d.push(w),h=c[p].lastIndex}if(h<l.length){const p=new e.Token("text","",0);p.content=l.slice(h),p.level=f,d.push(p)}t[r].children=i=JM(i,a,d)}}}}const ZM=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,WZ=/\((c|tm|r)\)/i,JZ=/\((c|tm|r)\)/ig,QZ={c:"©",r:"®",tm:"™"};function YZ(e,t){return QZ[t.toLowerCase()]}function XZ(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&(n.content=n.content.replace(JZ,YZ)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function ZZ(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&ZM.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function eee(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(WZ.test(e.tokens[t].content)&&XZ(e.tokens[t].children),ZM.test(e.tokens[t].content)&&ZZ(e.tokens[t].children))}const tee=/['"]/,CA=/['"]/g,RA="’";function Mm(e,t,r,n){e[t]||(e[t]=[]),e[t].push({pos:r,ch:n})}function ree(e,t){let r="",n=0;t.sort((i,o)=>i.pos-o.pos);for(let i=0;i<t.length;i++){const o=t[i];r+=e.slice(n,o.pos)+o.ch,n=o.pos+1}return r+e.slice(n)}function nee(e,t){let r;const n=[],i={};for(let o=0;o<e.length;o++){const a=e[o],s=e[o].level;for(r=n.length-1;r>=0&&!(n[r].level<=s);r--);if(n.length=r+1,a.type!=="text")continue;const l=a.content;let c=0;const d=l.length;e:for(;c<d;){CA.lastIndex=c;const f=CA.exec(l);if(!f)break;let h=!0,p=!0;c=f.index+1;const m=f[0]==="'";let g=32;if(f.index-1>=0)g=l.charCodeAt(f.index-1);else for(r=o-1;r>=0&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r--)if(e[r].content){g=e[r].content.charCodeAt(e[r].content.length-1);break}let v=32;if(c<d)v=l.charCodeAt(c);else for(r=o+1;r<e.length&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r++)if(e[r].content){v=e[r].content.charCodeAt(0);break}const b=Kh(g)||Gh(g),y=Kh(v)||Gh(v),S=Vh(g),w=Vh(v);if(w?h=!1:y&&(S||b||(h=!1)),S?p=!1:b&&(w||y||(p=!1)),v===34&&f[0]==='"'&&g>=48&&g<=57&&(p=h=!1),h&&p&&(h=b,p=y),!h&&!p){m&&Mm(i,o,f.index,RA);continue}if(p)for(r=n.length-1;r>=0;r--){let C=n[r];if(n[r].level<s)break;if(C.single===m&&n[r].level===s){C=n[r];let A,T;m?(A=t.md.options.quotes[2],T=t.md.options.quotes[3]):(A=t.md.options.quotes[0],T=t.md.options.quotes[1]),Mm(i,o,f.index,T),Mm(i,C.token,C.pos,A),n.length=r;continue e}}h?n.push({token:o,pos:f.index,single:m,level:s}):p&&m&&Mm(i,o,f.index,RA)}}Object.keys(i).forEach(function(o){e[o].content=ree(e[o].content,i[o])})}function iee(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!tee.test(e.tokens[t].content)||nee(e.tokens[t].children,e)}function oee(e){let t,r;const n=e.tokens,i=n.length;for(let o=0;o<i;o++){if(n[o].type!=="inline")continue;const a=n[o].children,s=a.length;for(t=0;t<s;t++)a[t].type==="text_special"&&(a[t].type="text");for(t=r=0;t<s;t++)a[t].type==="text"&&t+1<s&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==r&&(a[r]=a[t]),r++);t!==r&&(a.length=r)}}const z_=[["normalize",jZ],["block",qZ],["inline",VZ],["linkify",HZ],["replacements",eee],["smartquotes",iee],["text_join",oee]];function Qw(){this.ruler=new Bi;for(let e=0;e<z_.length;e++)this.ruler.push(z_[e][0],z_[e][1])}Qw.prototype.process=function(e){const t=this.ruler.getRules("");for(let r=0,n=t.length;r<n;r++)t[r](e)};Qw.prototype.State=XM;function es(e,t,r,n){this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let o=0,a=0,s=0,l=0,c=i.length,d=!1;a<c;a++){const f=i.charCodeAt(a);if(!d)if(_r(f)){s++,f===9?l+=4-l%4:l++;continue}else d=!0;(f===10||a===c-1)&&(f!==10&&a++,this.bMarks.push(o),this.eMarks.push(a),this.tShift.push(s),this.sCount.push(l),this.bsCount.push(0),d=!1,s=0,l=0,o=a+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}es.prototype.push=function(e,t,r){const n=new ba(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n};es.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};es.prototype.skipEmptyLines=function(t){for(let r=this.lineMax;t<r&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};es.prototype.skipSpaces=function(t){for(let r=this.src.length;t<r;t++){const n=this.src.charCodeAt(t);if(!_r(n))break}return t};es.prototype.skipSpacesBack=function(t,r){if(t<=r)return t;for(;t>r;)if(!_r(this.src.charCodeAt(--t)))return t+1;return t};es.prototype.skipChars=function(t,r){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===r;t++);return t};es.prototype.skipCharsBack=function(t,r,n){if(t<=n)return t;for(;t>n;)if(r!==this.src.charCodeAt(--t))return t+1;return t};es.prototype.getLines=function(t,r,n,i){if(t>=r)return"";const o=new Array(r-t);for(let a=0,s=t;s<r;s++,a++){let l=0;const c=this.bMarks[s];let d=c,f;for(s+1<r||i?f=this.eMarks[s]+1:f=this.eMarks[s];d<f&&l<n;){const h=this.src.charCodeAt(d);if(_r(h))h===9?l+=4-(l+this.bsCount[s])%4:l++;else if(d-c<this.tShift[s])l++;else break;d++}l>n?o[a]=new Array(l-n+1).join(" ")+this.src.slice(d,f):o[a]=this.src.slice(d,f)}return o.join("")};es.prototype.Token=ba;const aee=65536;function U_(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function AA(e){const t=[],r=e.length;let n=0,i=e.charCodeAt(n),o=!1,a=0,s="";for(;n<r;)i===124&&(o?(s+=e.substring(a,n-1),a=n):(t.push(s+e.substring(a,n)),s="",a=n+1)),o=i===92,n++,i=e.charCodeAt(n);return t.push(s+e.substring(a)),t}function see(e,t,r,n){if(t+2>r)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!_r(s)||a===45&&_r(s))return!1;for(;o<e.eMarks[i];){const w=e.src.charCodeAt(o);if(w!==124&&w!==45&&w!==58&&!_r(w))return!1;o++}let l=U_(e,t+1),c=l.split("|");const d=[];for(let w=0;w<c.length;w++){const C=c[w].trim();if(!C){if(w===0||w===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?d.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?d.push("left"):d.push("")}if(l=U_(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=AA(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const f=c.length;if(f===0||f!==d.length)return!1;if(n)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),g=[t,0];m.map=g;const v=e.push("thead_open","thead",1);v.map=[t,t+1];const b=e.push("tr_open","tr",1);b.map=[t,t+1];for(let w=0;w<c.length;w++){const C=e.push("th_open","th",1);d[w]&&(C.attrs=[["style","text-align:"+d[w]]]);const A=e.push("inline","",0);A.content=c[w].trim(),A.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y,S=0;for(i=t+2;i<r&&!(e.sCount[i]<e.blkIndent);i++){let w=!1;for(let A=0,T=p.length;A<T;A++)if(p[A](e,i,r,!0)){w=!0;break}if(w||(l=U_(e,i).trim(),!l)||e.sCount[i]-e.blkIndent>=4||(c=AA(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),S+=f-c.length,S>aee))break;if(i===t+2){const A=e.push("tbody_open","tbody",1);A.map=y=[t+2,0]}const C=e.push("tr_open","tr",1);C.map=[i,i+1];for(let A=0;A<f;A++){const T=e.push("td_open","td",1);d[A]&&(T.attrs=[["style","text-align:"+d[A]]]);const R=e.push("inline","",0);R.content=c[A]?c[A].trim():"",R.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return y&&(e.push("tbody_close","tbody",-1),y[1]=i),e.push("table_close","table",-1),g[1]=i,e.parentType=h,e.line=i,!0}function lee(e,t,r){if(e.sCount[t]-e.blkIndent<4)return!1;let n=t+1,i=n;for(;n<r;){if(e.isEmpty(n)){n++;continue}if(e.sCount[n]-e.blkIndent>=4){n++,i=n;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+`
|
|
17
|
+
`,o.map=[t,e.line],!0}function uee(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let l=i-s;if(l<3)return!1;const c=e.src.slice(s,i),d=e.src.slice(i,o);if(a===96&&d.indexOf(String.fromCharCode(a))>=0)return!1;if(n)return!0;let f=t,h=!1;for(;f++,!(f>=r||(i=s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i<o&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(i)===a&&!(e.sCount[f]-e.blkIndent>=4)&&(i=e.skipChars(i,a),!(i-s<l)&&(i=e.skipSpaces(i),!(i<o)))){h=!0;break}l=e.sCount[t],e.line=f+(h?1:0);const p=e.push("fence","code",0);return p.info=d,p.content=e.getLines(t+1,f,l,!0),p.markup=c,p.map=[t,e.line],!0}function cee(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(n)return!0;const s=[],l=[],c=[],d=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m<r;m++){const S=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],o=e.eMarks[m],i>=o)break;if(e.src.charCodeAt(i++)===62&&!S){let C=e.sCount[m]+1,A,T;e.src.charCodeAt(i)===32?(i++,C++,T=!1,A=!0):e.src.charCodeAt(i)===9?(A=!0,(e.bsCount[m]+C)%4===3?(i++,C++,T=!1):T=!0):A=!1;let R=C;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<o;){const N=e.src.charCodeAt(i);if(_r(N))N===9?R+=4-(R+e.bsCount[m]+(T?1:0))%4:R++;else break;i++}p=i>=o,l.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(A?1:0),c.push(e.sCount[m]),e.sCount[m]=R-C,d.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let w=!1;for(let C=0,A=f.length;C<A;C++)if(f[C](e,m,r,!0)){w=!0;break}if(w){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),c.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),c.push(e.sCount[m]),e.sCount[m]=-1}const g=e.blkIndent;e.blkIndent=0;const v=e.push("blockquote_open","blockquote",1);v.markup=">";const b=[t,0];v.map=b,e.md.block.tokenize(e,t,m);const y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=a,e.parentType=h,b[1]=e.line;for(let S=0;S<d.length;S++)e.bMarks[S+t]=s[S],e.tShift[S+t]=d[S],e.sCount[S+t]=c[S],e.bsCount[S+t]=l[S];return e.blkIndent=g,!0}function dee(e,t,r,n){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o<i;){const c=e.src.charCodeAt(o++);if(c!==a&&!_r(c))return!1;c===a&&s++}if(s<3)return!1;if(n)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(s+1).join(String.fromCharCode(a)),!0}function $A(e,t){const r=e.eMarks[t];let n=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(n++);if(i!==42&&i!==45&&i!==43)return-1;if(n<r){const o=e.src.charCodeAt(n);if(!_r(o))return-1}return n}function TA(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];let i=r;if(i+1>=n)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=n)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-r>=10)return-1;continue}if(o===41||o===46)break;return-1}return i<n&&(o=e.src.charCodeAt(i),!_r(o))?-1:i}function fee(e,t){const r=e.level+2;for(let n=t+2,i=e.tokens.length-2;n<i;n++)e.tokens[n].level===r&&e.tokens[n].type==="paragraph_open"&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}function hee(e,t,r,n){let i,o,a,s,l=t,c=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let d=!1;n&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(d=!0);let f,h,p;if((p=TA(e,l))>=0){if(f=!0,a=e.bMarks[l]+e.tShift[l],h=Number(e.src.slice(a,p-1)),d&&h!==1)return!1}else if((p=$A(e,l))>=0)f=!1;else return!1;if(d&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(n)return!0;const m=e.src.charCodeAt(p-1),g=e.tokens.length;f?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const v=[l,0];s.map=v,s.markup=String.fromCharCode(m);let b=!1;const y=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";l<r;){o=p,i=e.eMarks[l];const w=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]);let C=w;for(;o<i;){const W=e.src.charCodeAt(o);if(W===9)C+=4-(C+e.bsCount[l])%4;else if(W===32)C++;else break;o++}const A=o;let T;A>=i?T=1:T=C-w,T>4&&(T=1);const R=w+T;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const N=[l,0];s.map=N,f&&(s.info=e.src.slice(a,p-1));const I=e.tight,M=e.tShift[l],P=e.sCount[l],B=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=R,e.tight=!0,e.tShift[l]=A-e.bMarks[l],e.sCount[l]=C,A>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,l,r,!0),(!e.tight||b)&&(c=!1),b=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=B,e.tShift[l]=M,e.sCount[l]=P,e.tight=I,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),l=e.line,N[1]=l,l>=r||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let j=!1;for(let W=0,te=y.length;W<te;W++)if(y[W](e,l,r,!0)){j=!0;break}if(j)break;if(f){if(p=TA(e,l),p<0)break;a=e.bMarks[l]+e.tShift[l]}else if(p=$A(e,l),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return f?s=e.push("ordered_list_close","ol",-1):s=e.push("bullet_list_close","ul",-1),s.markup=String.fromCharCode(m),v[1]=l,e.line=l,e.parentType=S,c&&fee(e,g),!0}function pee(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(y){const S=e.lineMax;if(y>=S||e.isEmpty(y))return null;let w=!1;if(e.sCount[y]-e.blkIndent>3&&(w=!0),e.sCount[y]<0&&(w=!0),!w){const T=e.md.block.ruler.getRules("reference"),R=e.parentType;e.parentType="reference";let N=!1;for(let I=0,M=T.length;I<M;I++)if(T[I](e,y,S,!0)){N=!0;break}if(e.parentType=R,N)return null}const C=e.bMarks[y]+e.tShift[y],A=e.eMarks[y];return e.src.slice(C,A+1)}let l=e.src.slice(i,o+1);o=l.length;let c=-1;for(i=1;i<o;i++){const y=l.charCodeAt(i);if(y===91)return!1;if(y===93){c=i;break}else if(y===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(y===92&&(i++,i<o&&l.charCodeAt(i)===10)){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}}if(c<0||l.charCodeAt(c+1)!==58)return!1;for(i=c+2;i<o;i++){const y=l.charCodeAt(i);if(y===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(!_r(y))break}const d=e.md.helpers.parseLinkDestination(l,i,o);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;i=d.pos;const h=i,p=a,m=i;for(;i<o;i++){const y=l.charCodeAt(i);if(y===10){const S=s(a);S!==null&&(l+=S,o=l.length,a++)}else if(!_r(y))break}let g=e.md.helpers.parseLinkTitle(l,i,o);for(;g.can_continue;){const y=s(a);if(y===null)break;l+=y,i=o,o=l.length,a++,g=e.md.helpers.parseLinkTitle(l,i,o,g)}let v;for(i<o&&m!==i&&g.ok?(v=g.str,i=g.pos):(v="",i=h,a=p);i<o;){const y=l.charCodeAt(i);if(!_r(y))break;i++}if(i<o&&l.charCodeAt(i)!==10&&v)for(v="",i=h,a=p;i<o;){const y=l.charCodeAt(i);if(!_r(y))break;i++}if(i<o&&l.charCodeAt(i)!==10)return!1;const b=Zv(l.slice(1,c));return b?(n||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[b]>"u"&&(e.env.references[b]={title:v,href:f}),e.line=a),!0):!1}const mee=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],gee="[a-zA-Z_:][a-zA-Z0-9:._-]*",vee="[^\"'=<>`\\x00-\\x20]+",bee="'[^']*'",_ee='"[^"]*"',yee="(?:"+vee+"|"+bee+"|"+_ee+")",xee="(?:\\s+"+gee+"(?:\\s*=\\s*"+yee+")?)",e6="<[A-Za-z][A-Za-z0-9\\-]*"+xee+"*\\s*\\/?>",t6="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",See="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",wee="<[?][\\s\\S]*?[?]>",Eee="<![A-Za-z][^>]*>",kee="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Cee=new RegExp("^(?:"+e6+"|"+t6+"|"+See+"|"+wee+"|"+Eee+"|"+kee+")"),Ree=new RegExp("^(?:"+e6+"|"+t6+")"),nu=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+mee.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Ree.source+"\\s*$"),/^$/,!1]];function Aee(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),s=0;for(;s<nu.length&&!nu[s][0].test(a);s++);if(s===nu.length)return!1;if(n)return nu[s][2];let l=t+1;const c=nu[s][1].test("");if(!nu[s][1].test(a)){for(;l<r&&!(e.sCount[l]<e.blkIndent&&(c||!e.isEmpty(l)));l++)if(i=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],a=e.src.slice(i,o),nu[s][1].test(a)){a.length!==0&&l++;break}}e.line=l;const d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}function $ee(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i<o&&s<=6;)s++,a=e.src.charCodeAt(++i);if(s>6||i<o&&!_r(a))return!1;if(n)return!0;o=e.skipSpacesBack(o,i);const l=e.skipCharsBack(o,35,i);l>i&&_r(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const c=e.push("heading_open","h"+String(s),1);c.markup="########".slice(0,s),c.map=[t,e.line];const d=e.push("inline","",0);d.content=eb(e.src.slice(i,o)),d.map=[t,e.line],d.children=[];const f=e.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function Tee(e,t,r){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,s=t+1;for(;s<r&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p<m&&(a=e.src.charCodeAt(p),(a===45||a===61)&&(p=e.skipChars(p,a),p=e.skipSpaces(p),p>=m))){o=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=n.length;p<m;p++)if(n[p](e,s,r,!0)){h=!0;break}if(h)break}if(!o)return e.parentType=i,!1;const l=eb(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;const c=e.push("heading_open","h"+String(o),1);c.markup=String.fromCharCode(a),c.map=[t,e.line];const d=e.push("inline","",0);d.content=l,d.map=[t,e.line-1],d.children=[];const f=e.push("heading_close","h"+String(o),-1);return f.markup=String.fromCharCode(a),e.parentType=i,!0}function Nee(e,t,r){const n=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let o=t+1;for(e.parentType="paragraph";o<r&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let c=!1;for(let d=0,f=n.length;d<f;d++)if(n[d](e,o,r,!0)){c=!0;break}if(c)break}const a=eb(e.getLines(t,o,e.blkIndent,!1));e.line=o;const s=e.push("paragraph_open","p",1);s.map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const Lm=[["table",see,["paragraph","reference"]],["code",lee],["fence",uee,["paragraph","reference","blockquote","list"]],["blockquote",cee,["paragraph","reference","blockquote","list"]],["hr",dee,["paragraph","reference","blockquote","list"]],["list",hee,["paragraph","reference","blockquote"]],["reference",pee],["html_block",Aee,["paragraph","reference","blockquote"]],["heading",$ee,["paragraph","reference","blockquote"]],["lheading",Tee],["paragraph",Nee]];function tb(){this.ruler=new Bi;for(let e=0;e<Lm.length;e++)this.ruler.push(Lm[e][0],Lm[e][1],{alt:(Lm[e][2]||[]).slice()})}tb.prototype.tokenize=function(e,t,r){const n=this.ruler.getRules(""),i=n.length,o=e.md.options.maxNesting;let a=t,s=!1;for(;a<r&&(e.line=a=e.skipEmptyLines(a),!(a>=r||e.sCount[a]<e.blkIndent));){if(e.level>=o){e.line=r;break}const l=e.line;let c=!1;for(let d=0;d<i;d++)if(c=n[d](e,a,r,!1),c){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a<r&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}};tb.prototype.parse=function(e,t,r,n){if(!e)return;const i=new this.State(e,t,r,n);this.tokenize(i,i.line,i.lineMax)};tb.prototype.State=es;function Bp(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Bp.prototype.pushPending=function(){const e=new ba("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};Bp.prototype.push=function(e,t,r){this.pending&&this.pushPending();const n=new ba(e,t,r);let i=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n};Bp.prototype.scanDelims=function(e,t){const r=this.posMax,n=this.src.charCodeAt(e);let i;if(e===0)i=32;else if(e===1)i=this.src.charCodeAt(0),(i&63488)===55296&&(i=65533);else if(i=this.src.charCodeAt(e-1),(i&64512)===56320){const v=this.src.charCodeAt(e-2);i=(v&64512)===55296?65536+(v-55296<<10)+(i-56320):65533}else(i&64512)===55296&&(i=65533);let o=e;for(;o<r&&this.src.charCodeAt(o)===n;)o++;const a=o-e;let s=o<r?this.src.charCodeAt(o):32;if((s&64512)===55296){const v=this.src.charCodeAt(o+1);s=(v&64512)===56320?65536+(s-55296<<10)+(v-56320):65533}else(s&64512)===56320&&(s=65533);const l=Kh(i)||Gh(i),c=Kh(s)||Gh(s),d=Vh(i),f=Vh(s),h=!f&&(!c||d||l),p=!d&&(!l||f||c);return{can_open:h&&(t||!p||l),can_close:p&&(t||!h||c),length:a}};Bp.prototype.Token=ba;function Dee(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Fee(e,t){let r=e.pos;for(;r<e.posMax&&!Dee(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const Iee=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function Pee(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const r=e.pos,n=e.posMax;if(r+3>n||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47)return!1;const i=e.pending.match(Iee);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(r-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;let l=s.length;for(;l>0&&s.charCodeAt(l-1)===42;)l--;l!==s.length&&(s=s.slice(0,l));const c=e.md.normalizeLink(s);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const d=e.push("link_open","a",1);d.attrs=[["href",c]],d.markup="linkify",d.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(s);const h=e.push("link_close","a",-1);h.markup="linkify",h.info="auto"}return e.pos+=s.length-o.length,!0}function Oee(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;const n=e.pending.length-1,i=e.posMax;if(!t)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){let o=n-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(r++;r<i&&_r(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const Yw=[];for(let e=0;e<256;e++)Yw.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Yw[e.charCodeAt(0)]=1});function Mee(e,t){let r=e.pos;const n=e.posMax;if(e.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let i=e.src.charCodeAt(r);if(i===10){for(t||e.push("hardbreak","br",0),r++;r<n&&(i=e.src.charCodeAt(r),!!_r(i));)r++;return e.pos=r,!0}let o=e.src[r];if(i>=55296&&i<=56319&&r+1<n){const s=e.src.charCodeAt(r+1);s>=56320&&s<=57343&&(o+=e.src[r+1],r++)}const a="\\"+o;if(!t){const s=e.push("text_special","",0);i<256&&Yw[i]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return e.pos=r+1,!0}function Lee(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;const i=r;r++;const o=e.posMax;for(;r<o&&e.src.charCodeAt(r)===96;)r++;const a=e.src.slice(i,r),s=a.length;if(e.backticksScanned&&(e.backticks[s]||0)<=i)return t||(e.pending+=a),e.pos+=s,!0;let l=r,c;for(;(c=e.src.indexOf("`",l))!==-1;){for(l=c+1;l<o&&e.src.charCodeAt(l)===96;)l++;const d=l-c;if(d===s){if(!t){const f=e.push("code_inline","code",0);f.markup=a,f.content=e.src.slice(r,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[d]=c}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=s,!0}function zee(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==126)return!1;const i=e.scanDelims(e.pos,!0);let o=i.length;const a=String.fromCharCode(n);if(o<2)return!1;let s;o%2&&(s=e.push("text","",0),s.content=a,o--);for(let l=0;l<o;l+=2)s=e.push("text","",0),s.content=a+a,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function NA(e,t){let r;const n=[],i=t.length;for(let o=0;o<i;o++){const a=t[o];if(a.marker!==126||a.end===-1)continue;const s=t[a.end];r=e.tokens[a.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[s.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[s.token-1].type==="text"&&e.tokens[s.token-1].content==="~"&&n.push(s.token-1)}for(;n.length;){const o=n.pop();let a=o+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,o!==a&&(r=e.tokens[a],e.tokens[a]=e.tokens[o],e.tokens[o]=r)}}function Uee(e){const t=e.tokens_meta,r=e.tokens_meta.length;NA(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&NA(e,t[n].delimiters)}const r6={tokenize:zee,postProcess:Uee};function Bee(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==95&&n!==42)return!1;const i=e.scanDelims(e.pos,n===42);for(let o=0;o<i.length;o++){const a=e.push("text","",0);a.content=String.fromCharCode(n),e.delimiters.push({marker:n,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function DA(e,t){const r=t.length;for(let n=r-1;n>=0;n--){const i=t[n];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=n>0&&t[n-1].end===i.end+1&&t[n-1].marker===i.marker&&t[n-1].token===i.token-1&&t[i.end+1].token===o.token+1,s=String.fromCharCode(i.marker),l=e.tokens[i.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?s+s:s,l.content="";const c=e.tokens[o.token];c.type=a?"strong_close":"em_close",c.tag=a?"strong":"em",c.nesting=-1,c.markup=a?s+s:s,c.content="",a&&(e.tokens[t[n-1].token].content="",e.tokens[t[i.end+1].token].content="",n--)}}function jee(e){const t=e.tokens_meta,r=e.tokens_meta.length;DA(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&DA(e,t[n].delimiters)}const n6={tokenize:Bee,postProcess:jee};function qee(e,t){let r,n,i,o,a="",s="",l=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const d=e.pos,f=e.posMax,h=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<f&&e.src.charCodeAt(m)===40){for(c=!1,m++;m<f&&(r=e.src.charCodeAt(m),!(!_r(r)&&r!==10));m++);if(m>=f)return!1;if(l=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?m=i.pos:a="",l=m;m<f&&(r=e.src.charCodeAt(m),!(!_r(r)&&r!==10));m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<f&&l!==m&&i.ok)for(s=i.str,m=i.pos;m<f&&(r=e.src.charCodeAt(m),!(!_r(r)&&r!==10));m++);}(m>=f||e.src.charCodeAt(m)!==41)&&(c=!0),m++}if(c){if(typeof e.env.references>"u")return!1;if(m<f&&e.src.charCodeAt(m)===91?(l=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?n=e.src.slice(l,m++):m=p+1):m=p+1,n||(n=e.src.slice(h,p)),o=e.env.references[Zv(n)],!o)return e.pos=d,!1;a=o.href,s=o.title}if(!t){e.pos=h,e.posMax=p;const g=e.push("link_open","a",1),v=[["href",a]];g.attrs=v,s&&v.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=f,!0}function Vee(e,t){let r,n,i,o,a,s,l,c,d="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(o=m+1,o<h&&e.src.charCodeAt(o)===40){for(o++;o<h&&(r=e.src.charCodeAt(o),!(!_r(r)&&r!==10));o++);if(o>=h)return!1;for(c=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(d=e.md.normalizeLink(s.str),e.md.validateLink(d)?o=s.pos:d=""),c=o;o<h&&(r=e.src.charCodeAt(o),!(!_r(r)&&r!==10));o++);if(s=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<h&&c!==o&&s.ok)for(l=s.str,o=s.pos;o<h&&(r=e.src.charCodeAt(o),!(!_r(r)&&r!==10));o++);else l="";if(o>=h||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<h&&e.src.charCodeAt(o)===91?(c=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?i=e.src.slice(c,o++):o=m+1):o=m+1,i||(i=e.src.slice(p,m)),a=e.env.references[Zv(i)],!a)return e.pos=f,!1;d=a.href,l=a.title}if(!t){n=e.src.slice(p,m);const g=[];e.md.inline.parse(n,e.md,e.env,g);const v=e.push("image","img",0),b=[["src",d],["alt",""]];v.attrs=b,v.children=g,v.content=n,l&&b.push(["title",l])}return e.pos=o,e.posMax=h,!0}const Gee=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[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])?)*)$/,Kee=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Hee(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==60)return!1;const n=e.pos,i=e.posMax;for(;;){if(++r>=i)return!1;const a=e.src.charCodeAt(r);if(a===60)return!1;if(a===62)break}const o=e.src.slice(n+1,r);if(Kee.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=o.length+2,!0}if(Gee.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=o.length+2,!0}return!1}function Wee(e){return/^<a[>\s]/i.test(e)}function Jee(e){return/^<\/a\s*>/i.test(e)}function Qee(e){const t=e|32;return t>=97&&t<=122}function Yee(e,t){if(!e.md.options.html)return!1;const r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==60||n+2>=r)return!1;const i=e.src.charCodeAt(n+1);if(i!==33&&i!==63&&i!==47&&!Qee(i))return!1;const o=e.src.slice(n).match(Cee);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],Wee(a.content)&&e.linkLevel++,Jee(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const Xee=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Zee=/^&([a-z][a-z0-9]{1,31});/i;function ete(e,t){const r=e.pos,n=e.posMax;if(e.src.charCodeAt(r)!==38||r+1>=n)return!1;if(e.src.charCodeAt(r+1)===35){const o=e.src.slice(r).match(Xee);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=Jw(a)?qh(a):qh(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(r).match(Zee);if(o){const a=_Z(o[0]);if(a!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function FA(e){const t={},r=e.length;if(!r)return;let n=0,i=-2;const o=[];for(let a=0;a<r;a++){const s=e[a];if(o.push(0),(e[n].marker!==s.marker||i!==s.token-1)&&(n=a),i=s.token,s.length=s.length||0,!s.close)continue;t.hasOwnProperty(s.marker)||(t[s.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[s.marker][(s.open?3:0)+s.length%3];let c=n-o[n]-1,d=c;for(;c>l;c-=o[c]+1){const f=e[c];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=c>0&&!e[c-1].open?o[c-1]+1:0;o[a]=a-c+p,o[c]=p,s.open=!1,f.end=a,f.close=!1,d=-1,i=-2;break}}}d!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=d)}}function tte(e){const t=e.tokens_meta,r=e.tokens_meta.length;FA(e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&FA(t[n].delimiters)}function rte(e){let t,r,n=0;const i=e.tokens,o=e.tokens.length;for(t=r=0;t<o;t++)i[t].nesting<0&&n--,i[t].level=n,i[t].nesting>0&&n++,i[t].type==="text"&&t+1<o&&i[t+1].type==="text"?i[t+1].content=i[t].content+i[t+1].content:(t!==r&&(i[r]=i[t]),r++);t!==r&&(i.length=r)}const B_=[["text",Fee],["linkify",Pee],["newline",Oee],["escape",Mee],["backticks",Lee],["strikethrough",r6.tokenize],["emphasis",n6.tokenize],["link",qee],["image",Vee],["autolink",Hee],["html_inline",Yee],["entity",ete]],j_=[["balance_pairs",tte],["strikethrough",r6.postProcess],["emphasis",n6.postProcess],["fragments_join",rte]];function jp(){this.ruler=new Bi;for(let e=0;e<B_.length;e++)this.ruler.push(B_[e][0],B_[e][1]);this.ruler2=new Bi;for(let e=0;e<j_.length;e++)this.ruler2.push(j_[e][0],j_[e][1])}jp.prototype.skipToken=function(e){const t=e.pos,r=this.ruler.getRules(""),n=r.length,i=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let a=!1;if(e.level<i){for(let s=0;s<n;s++)if(e.level++,a=r[s](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};jp.prototype.tokenize=function(e){const t=this.ruler.getRules(""),r=t.length,n=e.posMax,i=e.md.options.maxNesting;for(;e.pos<n;){const o=e.pos;let a=!1;if(e.level<i){for(let s=0;s<r;s++)if(a=t[s](e,!1),a){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};jp.prototype.parse=function(e,t,r,n){const i=new this.State(e,t,r,n);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s<a;s++)o[s](i)};jp.prototype.State=Bp;function nte(e){const t={};e=e||{},t.src_Any=qM.source,t.src_Cc=VM.source,t.src_Z=KM.source,t.src_P=Hw.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const r="[><|]";return t.src_pseudo_letter="(?:(?!"+r+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(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]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+r+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function xx(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){e[n]=r[n]})}),e}function rb(e){return Object.prototype.toString.call(e)}function ite(e){return rb(e)==="[object String]"}function ote(e){return rb(e)==="[object Object]"}function ate(e){return rb(e)==="[object RegExp]"}function IA(e){return rb(e)==="[object Function]"}function ste(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const i6={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function lte(e){return Object.keys(e||{}).reduce(function(t,r){return t||i6.hasOwnProperty(r)},!1)}const ute={"http:":{validate:function(e,t,r){const n=e.slice(t);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){const n=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){const n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},cte="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",dte="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function fte(e){return function(t,r){const n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function PA(){return function(e,t){t.normalize(e)}}function C0(e){const t=e.re=nte(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(cte),r.push(t.src_xn),t.src_tlds=r.join("|");function n(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(n(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(n(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(n(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(s,l){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+l)}Object.keys(e.__schemas__).forEach(function(s){const l=e.__schemas__[s];if(l===null)return;const c={validate:null,link:null};if(e.__compiled__[s]=c,ote(l)){ate(l.validate)?c.validate=fte(l.validate):IA(l.validate)?c.validate=l.validate:o(s,l),IA(l.normalize)?c.normalize=l.normalize:l.normalize?o(s,l):c.normalize=PA();return}if(ite(l)){i.push(s);return}o(s,l)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:PA()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(ste).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i")}function o6(e,t,r,n){const i=e.slice(r,n);this.schema=t.toLowerCase(),this.index=r,this.lastIndex=n,this.raw=i,this.text=i,this.url=i}function uo(e,t){if(!(this instanceof uo))return new uo(e,t);t||lte(e)&&(t=e,e={}),this.__opts__=xx({},i6,t),this.__schemas__=xx({},ute,e),this.__compiled__={},this.__tlds__=dte,this.__tlds_replaced__=!1,this.re={},C0(this)}uo.prototype.add=function(t,r){return this.__schemas__[t]=r,C0(this),this};uo.prototype.set=function(t){return this.__opts__=xx(this.__opts__,t),this};uo.prototype.test=function(t){if(!t.length)return!1;let r,n;if(this.re.schema_test.test(t)){for(n=this.re.schema_search,n.lastIndex=0;(r=n.exec(t))!==null;)if(this.testSchemaAt(t,r[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};uo.prototype.pretest=function(t){return this.re.pretest.test(t)};uo.prototype.testSchemaAt=function(t,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(t,n,this):0};uo.prototype.match=function(t){const r=[],n=[],i=[],o=[];let a,s,l;function c(h,p){return h?p?h.index!==p.index?h.index<p.index?h:p:h.lastIndex>=p.lastIndex?h:p:h:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(l=this.re.schema_search,l.lastIndex=0;(a=l.exec(t))!==null;)s=this.testSchemaAt(t,a[2],l.lastIndex),s&&n.push({schema:a[2],index:a.index+a[1].length,lastIndex:a.index+a[0].length+s});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;(a=l.exec(t))!==null;)i.push({schema:"",index:a.index+a[1].length,lastIndex:a.index+a[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(a=l.exec(t))!==null;)o.push({schema:"mailto:",index:a.index+a[1].length,lastIndex:a.index+a[0].length});const d=[0,0,0];let f=0;for(;;){const h=[n[d[0]],o[d[1]],i[d[2]]],p=c(c(h[0],h[1]),h[2]);if(!p)break;if(p===h[0]?d[0]++:p===h[1]?d[1]++:d[2]++,p.index<f)continue;const m=new o6(t,p.schema,p.index,p.lastIndex);this.__compiled__[m.schema].normalize(m,this),r.push(m),f=p.lastIndex}return r.length?r:null};uo.prototype.matchAtStart=function(t){if(!t.length)return null;const r=this.re.schema_at_start.exec(t);if(!r)return null;const n=this.testSchemaAt(t,r[2],r[0].length);if(!n)return null;const i=new o6(t,r[2],r.index+r[1].length,r.index+r[0].length+n);return this.__compiled__[i.schema].normalize(i,this),i};uo.prototype.tlds=function(t,r){return t=Array.isArray(t)?t:[t],r?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(n,i,o){return n!==o[i-1]}).reverse(),C0(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,C0(this),this)};uo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};uo.prototype.onCompile=function(){};const sd=2147483647,Ma=36,Xw=1,Hh=26,hte=38,pte=700,a6=72,s6=128,l6="-",mte=/^xn--/,gte=/[^\0-\x7F]/,vte=/[\x2E\u3002\uFF0E\uFF61]/g,bte={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q_=Ma-Xw,La=Math.floor,V_=String.fromCharCode;function dl(e){throw new RangeError(bte[e])}function _te(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}function u6(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(vte,".");const i=e.split("."),o=_te(i,t).join(".");return n+o}function c6(e){const t=[];let r=0;const n=e.length;for(;r<n;){const i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){const o=e.charCodeAt(r++);(o&64512)==56320?t.push(((i&1023)<<10)+(o&1023)+65536):(t.push(i),r--)}else t.push(i)}return t}const yte=e=>String.fromCodePoint(...e),xte=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ma},OA=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},d6=function(e,t,r){let n=0;for(e=r?La(e/pte):e>>1,e+=La(e/t);e>q_*Hh>>1;n+=Ma)e=La(e/q_);return La(n+(q_+1)*e/(e+hte))},f6=function(e){const t=[],r=e.length;let n=0,i=s6,o=a6,a=e.lastIndexOf(l6);a<0&&(a=0);for(let s=0;s<a;++s)e.charCodeAt(s)>=128&&dl("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s<r;){const l=n;for(let d=1,f=Ma;;f+=Ma){s>=r&&dl("invalid-input");const h=xte(e.charCodeAt(s++));h>=Ma&&dl("invalid-input"),h>La((sd-n)/d)&&dl("overflow"),n+=h*d;const p=f<=o?Xw:f>=o+Hh?Hh:f-o;if(h<p)break;const m=Ma-p;d>La(sd/m)&&dl("overflow"),d*=m}const c=t.length+1;o=d6(n-l,c,l==0),La(n/c)>sd-i&&dl("overflow"),i+=La(n/c),n%=c,t.splice(n++,0,i)}return String.fromCodePoint(...t)},h6=function(e){const t=[];e=c6(e);const r=e.length;let n=s6,i=0,o=a6;for(const l of e)l<128&&t.push(V_(l));const a=t.length;let s=a;for(a&&t.push(l6);s<r;){let l=sd;for(const d of e)d>=n&&d<l&&(l=d);const c=s+1;l-n>La((sd-i)/c)&&dl("overflow"),i+=(l-n)*c,n=l;for(const d of e)if(d<n&&++i>sd&&dl("overflow"),d===n){let f=i;for(let h=Ma;;h+=Ma){const p=h<=o?Xw:h>=o+Hh?Hh:h-o;if(f<p)break;const m=f-p,g=Ma-p;t.push(V_(OA(p+m%g,0))),f=La(m/g)}t.push(V_(OA(f,0))),o=d6(i,c,s===a),i=0,++s}++i,++n}return t.join("")},Ste=function(e){return u6(e,function(t){return mte.test(t)?f6(t.slice(4).toLowerCase()):t})},wte=function(e){return u6(e,function(t){return gte.test(t)?"xn--"+h6(t):t})},p6={version:"2.3.1",ucs2:{decode:c6,encode:yte},decode:f6,encode:h6,toASCII:wte,toUnicode:Ste},Ete={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},kte={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},Cte={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},Rte={default:Ete,zero:kte,commonmark:Cte},Ate=/^(vbscript|javascript|file|data):/,$te=/^data:image\/(gif|png|jpeg|webp);/;function Tte(e){const t=e.trim().toLowerCase();return Ate.test(t)?$te.test(t):!0}const m6=["http:","https:","mailto:"];function Nte(e){const t=Kw(e,!0);if(t.hostname&&(!t.protocol||m6.indexOf(t.protocol)>=0))try{t.hostname=p6.toASCII(t.hostname)}catch{}return Up(Gw(t))}function Dte(e){const t=Kw(e,!0);if(t.hostname&&(!t.protocol||m6.indexOf(t.protocol)>=0))try{t.hostname=p6.toUnicode(t.hostname)}catch{}return Ad(Gw(t),Ad.defaultChars+"%")}function Po(e,t){if(!(this instanceof Po))return new Po(e,t);t||Ww(e)||(t=e||{},e="default"),this.inline=new jp,this.block=new tb,this.core=new Qw,this.renderer=new Yd,this.linkify=new uo,this.validateLink=Tte,this.normalizeLink=Nte,this.normalizeLinkText=Dte,this.utils=PZ,this.helpers=Xv({},zZ),this.options={},this.configure(e),t&&this.set(t)}Po.prototype.set=function(e){return Xv(this.options,e),this};Po.prototype.configure=function(e){const t=this;if(Ww(e)){const r=e;if(e=Rte[r],!e)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this};Po.prototype.enable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};Po.prototype.disable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};Po.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Po.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const r=new this.core.State(e,this,t);return this.core.process(r),r.tokens};Po.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Po.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens};Po.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};function an(e){return"var("+e+")"}let Fte=E([u("color",an(x.textPrimary)),u("font-size",an($.sizeSm)),u("line-height",an($.lineHeightRelaxed)),u("word-break","break-word"),lr("& > :first-child",[u("margin-top","0")]),lr("& > :last-child",[u("margin-bottom","0")]),lr("& h1, & h2, & h3, & h4, & h5, & h6",[u("margin","var("+O.md+") 0 var("+O.sm+")"),u("line-height",an($.lineHeightTight)),u("font-weight",an($.weightBold))]),lr("& h1",[u("font-size",an($.sizeXl))]),lr("& h2",[u("font-size",an($.sizeLg))]),lr("& h3, & h4, & h5, & h6",[u("font-size",an($.sizeMd))]),lr("& p",[u("margin","var("+O.sm+") 0")]),lr("& a",[u("color",an(x.brand)),u("text-decoration","none")]),lr("& a:hover",[u("text-decoration","underline")]),lr("& ul, & ol",[u("margin","var("+O.sm+") 0"),u("padding-left","1.5em")]),lr("& li",[u("margin","var("+O.xs+") 0")]),lr("& code",[u("font-family",an($.fontFamilyMono)),u("font-size","0.9em"),u("background",an(x.surfaceSubtle)),u("padding","1px 4px"),u("border-radius",an(Y.sm))]),lr("& pre",[u("background",an(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",an(Y.md)),u("padding",an(O.md)),u("overflow","auto"),u("margin","var("+O.sm+") 0")]),lr("& pre code",[u("background","none"),u("padding","0")]),lr("& blockquote",[u("margin","var("+O.sm+") 0"),u("padding-left",an(O.md)),u("border-left","3px solid var("+x.border+")"),u("color",an(x.textSecondary))]),lr("& table",[u("border-collapse","collapse"),u("margin","var("+O.sm+") 0")]),lr("& th, & td",[u("border","1px solid var("+x.borderSubtle+")"),u("padding","var("+O.xs+") var("+O.sm+")"),u("text-align","left")]),lr("& th",[u("background",an(x.surfaceSubtle)),u("font-weight",an($.weightMedium))]),lr("& img",[u("max-width","100%"),u("border-radius",an(Y.sm))]),lr("& hr",[u("border","none"),u("border-top","1px solid var("+x.borderSubtle+")"),u("margin","var("+O.md+") 0")])]),Ite=new Po({html:!1,linkify:!0});function Pte(e){let t=e.source,r=It(()=>Ite.render(t),[t]),n=Ne(null);return Ae(()=>{ee(Li(n.current),i=>{Array.from(i.querySelectorAll("a")).forEach(o=>{o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer")})})},[r]),_("div",{ref:Nt(n),className:Fte,dangerouslySetInnerHTML:{__html:r}})}let g6=Pte;function Ote(e,t){return _(g6,{source:e.body})}function Mte(){MM({id:"markdown",label:"Markdown",constraints:{},preview:Ote})}function ld(e){return Array.from(e).length}function Zw(e,t){let r=Array.from(e),n=t<0?0:t;return r.length<=n?[e,""]:[r.slice(0,n).join(""),r.slice(n).join("")]}function v6(e,t){return k(t,r=>{let i=Zw(e,r)[1];if(i!=="")return i})}function Ar(e){return"var("+e+")"}let Lte=E([z("flex"),_e("column"),u("gap","4px")]),MA=E([u("background",Ar(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Ar(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")"),u("font-family","inherit"),u("font-size",Ar($.sizeMd)),u("line-height",Ar($.lineHeightNormal)),u("color",Ar(x.textPrimary)),u("outline","none"),u("resize","vertical"),ga({NAME:"percent",VAL:100}),u("box-sizing","border-box"),u("transition","border-color 120ms"),qs([u("border-color",Ar(x.brand))])]),zte=E([u("border-color",Ar(x.error)),qs([u("border-color",Ar(x.error))])]),Ute=E([z("flex"),X("center"),et("spaceBetween"),u("gap",Ar(O.sm)),u("font-size",Ar($.sizeXs)),u("color",Ar(x.textSecondary))]),Bte=E([z("inlineFlex"),X("center"),u("gap","4px"),u("color",Ar(x.textSecondary))]),LA=E([u("font-variant-numeric","tabular-nums")]),jte=E([u("color",Ar(x.error)),u("font-weight",Ar($.weightMedium))]),qte=E([u("background",Ar(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-left","3px solid var("+x.error+")"),u("border-radius",Ar(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")"),u("font-size",Ar($.sizeXs)),u("line-height",Ar($.lineHeightNormal)),u("white-space","pre-wrap"),u("word-break","break-word"),u("max-height","8em"),u("overflow","auto")]),Vte=E([u("color",Ar(x.textSecondary)),u("font-size",Ar($.sizeXs)),Op(ke(2))]),Gte=E([u("color",Ar(x.textPrimary))]),Kte=E([u("color",Ar(x.error)),u("font-weight",Ar($.weightMedium))]),Hte=E([u("color",Ar(x.textDisabled)),u("text-decoration","line-through")]);function b6(e){return e.toString()+" character"+(e===1?"":"s")}function _6(e,t){return t!==void 0?e>t?(e-t|0).toString()+" over the "+t.toString()+"-character limit":e.toString()+" / "+t.toString():e.toString()+" characters"}function Wte(e){let t=e.note,r=e.hasError,n=e.rows,i=e.channelLabel,o=e.maxLength,a=e.onBlur,s=e.onChange,l=e.value,c=a!==void 0?a:()=>{},d=n!==void 0?n:6,f=r!==void 0?r:!1,h=Array.from(l).length,p=v6(l,o),m=Ee(p),g=f||m?MA+" "+zte:MA,v;if(p!==void 0&&o!==void 0){let b=Zw(l,o);v=L("div",{children:[_("div",{children:"Sent as:",className:Vte}),L("div",{children:[_("span",{children:b[0],className:Gte}),_("span",{children:"✂",className:Kte}),_("span",{children:p,className:Hte})],className:qte})]})}else v=null;return L("div",{children:[_("textarea",{className:g,name:e.name,placeholder:e.placeholder,rows:d,value:l,onBlur:b=>c(),onChange:b=>s(b.target.value)}),L("div",{children:[L("span",{children:[i!==void 0?i:null,t!==void 0?Ee(i)?" · "+t:t:null],className:Bte}),_("span",{children:_6(h,o),className:m?LA+" "+jte:LA})],className:Ute}),v],className:Lte})}let Jte=Wte;HX();Mte();function nr(e){return"var("+e+")"}let Qte=E([z("flex"),_e("column"),u("gap",nr(O.sm)),u("background",nr(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",nr(Y.md)),u("padding",nr(O.md))]),Yte=E([z("flex"),X("center"),et("spaceBetween"),u("gap",nr(O.sm))]),Xte=E([u("font-size",nr($.sizeSm)),u("font-weight",nr($.weightMedium)),u("color",nr(x.textPrimary))]),Zte=E([u("font-size",nr($.sizeXs)),u("color",nr(x.textSecondary))]),zm=E([u("font-size",nr($.sizeXs)),u("color",nr(x.textSecondary)),u("font-variant-numeric","tabular-nums"),u("white-space","nowrap")]),zA=E([u("color",nr(x.error)),u("font-weight",nr($.weightMedium))]),ere=E([z("flex"),X("baseline"),et("spaceBetween"),u("gap",nr(O.sm)),u("border-bottom","1px solid var("+x.borderSubtle+")"),u("padding-bottom",nr(O.xs))]),tre=E([u("font-size",nr($.sizeMd)),u("font-weight",nr($.weightMedium)),u("color",nr(x.textPrimary)),u("word-break","break-word")]),rre=E([u("color",nr(x.textDisabled)),u("text-decoration","line-through")]),nre=E([u("color",nr(x.error)),u("font-weight",nr($.weightMedium))]),ire=E([u("margin","0"),u("font-family","inherit"),u("font-size",nr($.sizeSm)),u("line-height",nr($.lineHeightRelaxed)),u("color",nr(x.textPrimary)),u("white-space","pre-wrap"),u("word-break","break-word")]),ore=E([u("max-width","100%"),u("border-radius",nr(Y.sm)),u("border","1px solid var("+x.borderSubtle+")"),u("object-fit","cover")]),are=E([u("font-size",nr($.sizeXs)),u("color",nr(x.error)),u("background",nr(x.surfaceSubtle)),u("border-left","3px solid var("+x.error+")"),u("border-radius",nr(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")")]);function UA(e,t){let r=Zw(e,t),n=r[1];return n===""?e:L(Bt,{children:[r[0],_("span",{children:"✂",className:nre}),_("span",{children:n,className:rre})]})}function sre(e){let t=e.showHeader,r=e.message,n=e.channelId,i=t!==void 0?t:!0,o=LM(n);Ae(()=>{ir(o)&&$X(n,"ChannelPreview")},[n]);let a=ne(o,n,b=>b.label),s=ne(o,zM,b=>b.constraints),l=ld(r.body),c=v6(r.body,s.maxLength),d=r.subject,f;if(d!==void 0){let b=s.subjectMaxLength,y=ld(d),S=ne(b,!1,w=>y>w);f=L("div",{children:[_("span",{children:b!==void 0?UA(d,b):d,className:tre}),b!==void 0?_("span",{children:y.toString()+" / "+b.toString(),className:S?zm+" "+zA:zm}):null],className:ere})}else f=null;let h=k(o,b=>b.preview),p;if(h!==void 0)p=h(r,s);else{let b=s.maxLength;p=_("pre",{children:b!==void 0?UA(r.body,b):r.body,className:ire})}let m=r.imageUrl,g;if(m!==void 0){let b=s.mediaAspect;g=_("img",{className:ore,style:b!==void 0?zX({},"aspectRatio",b):{},alt:"Message media",src:Pu(m)})}else g=null;let v=s.note;return L("div",{children:[i?L("div",{children:[_("span",{children:a,className:Xte}),_("span",{children:_6(l,s.maxLength),className:Ee(c)?zm+" "+zA:zm})],className:Yte}):null,f,p,c!==void 0?_("div",{children:b6(ld(c))+" past the limit — "+a+" will cut the tail.",className:are}):null,g,v!==void 0?_("span",{children:v,className:Zte}):null],className:Qte})}let lre=sre;function ae(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function y6(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);r.search=n.toString(),console.warn(`Minified Lexical warning #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const _a=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,ure=_a&&"documentMode"in document?document.documentMode:null,Yo=_a&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ol=_a&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Td=!(!_a||!("InputEvent"in window)||ure)&&"getTargetRanges"in new window.InputEvent("input"),Ml=_a&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,x6=_a&&/Android/.test(navigator.userAgent),qp=_a&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!x6,S6=_a&&/^(?=.*Chrome).*/i.test(navigator.userAgent),R0=_a&&x6&&S6,Vp=_a&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Yo&&!S6,cre=0,dre=1,fre=2,BA=1,jA=2,qA=4,VA=8,hre=16,G_=32,K_=64,eE=128,pre=1,mre=2,gre=3,vre=4,bre=5,_re=6,Wh=qp||Ml||Vp?" ":"",yu=`
|
|
18
|
+
|
|
19
|
+
`,tE=Ol?" ":Wh,Os={bold:1,capitalize:1024,code:16,highlight:eE,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},yre={directionless:1,unmergeable:2},A0={center:2,end:6,justify:4,left:1,right:3,start:5},xre={[mre]:"center",[_re]:"end",[vre]:"justify",[pre]:"left",[gre]:"right",[bre]:"start"},Sre={normal:0,segmented:2,token:1},wre={[cre]:"normal",[fre]:"segmented",[dre]:"token"},GA="$config";function KA(){return Fr()._blockCursorElement}function Ere(e){return e!==null&&e.nodeType===1&&e.hasAttribute("data-lexical-slot")}let w6=class Kg{element;before;after;constructor(t,r,n){this.element=t,this.before=r||null,this.after=n||null}withBefore(t){return new Kg(this.element,t,this.after)}withAfter(t){return new Kg(this.element,this.before,t)}withElement(t){return this.element===t?this:new Kg(t,this.before,this.after)}insertChild(t){const r=this.getInsertionAnchor();return r!==null&&r.parentElement!==this.element&&ae(357),this.element.insertBefore(t,r),this}removeChild(t){return t.parentElement!==this.element&&ae(358),this.element.removeChild(t),this}replaceChild(t,r){return r.parentElement!==this.element&&ae(359),this.element.replaceChild(t,r),this}getFirstChild(){const t=this.getFirstChildAnchor(),r=t?t.nextSibling:this.element.firstChild;return r===this.getInsertionAnchor()?null:r}getFirstChildAnchor(){return this.after}resolveLeafPosition(t,r,n){if(this.element===t)return r===t&&n===0?"before":"after";const i=HA(t,this.element);if(i===null)return"after";const o=Array.prototype.indexOf.call(t.childNodes,i);if(o<0)return"after";if(r===t)return n<=o?"before":"after";const a=HA(t,r);if(a===null)return"after";const s=Array.prototype.indexOf.call(t.childNodes,a);return s>=0&&s<=o?"before":"after"}getInsertionAnchor(){return this.before}};function HA(e,t){let r=t;for(;r!==null&&r.parentNode!==e;)r=r.parentNode;return r}class ud extends w6{withBefore(t){return new ud(this.element,t,this.after)}withAfter(t){return new ud(this.element,this.before,t)}withElement(t){return this.element===t?this:new ud(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),r=t?t.nextSibling:this.element.firstChild;for(;Ere(r);)t=r,r=r.nextSibling;const n=t?t.nextSibling:this.element.firstChild;return n!==null&&n===KA()?n:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,t===null)this.removeManagedLineBreak();else{const r=t==="decorator"&&(Vp||Ml||qp);this.insertManagedLineBreak(r)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const r=this.element,n=t.nodeName==="IMG"?t.nextSibling:null;n&&r.removeChild(n),r.removeChild(t),r.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const r=this.getManagedLineBreak();if(r){if(t===(r.nodeName==="IMG"))return;this.removeManagedLineBreak()}const n=this.element,i=this.before,o=gr().createElement("br");if(o.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(o,i),t){const a=gr().createElement("img");a.setAttribute("data-lexical-managed-linebreak","true"),a.style.setProperty("display","inline","important"),a.style.setProperty("border","0px","important"),a.style.setProperty("margin","0px","important"),a.alt="",n.insertBefore(a,o),n.__lexicalLineBreak=a}else n.__lexicalLineBreak=o}getFirstChildOffset(){const t=this.getFirstChild(),r=this.getInsertionAnchor();let n=0;for(let i=this.element.firstChild;i!==null&&i!==t&&i!==r;i=i.nextSibling)n++;return n}resolveChildIndex(t,r,n,i){if(n===this.element){const l=this.getFirstChildOffset(),c=KA(),d=this.element.childNodes,f=Math.min(i,d.length);let h=0;for(let p=l;p<f;p++)d[p]!==c&&h++;return[t,Math.min(h,t.getChildrenSize())]}const o=WA(r,n);o.push(i);const a=WA(r,this.element);let s=t.getIndexWithinParent();for(let l=0;l<a.length;l++){const c=o[l],d=a[l];if(c===void 0||c<d)break;if(c>d){s+=1;break}}return[t.getParentOrThrow(),s]}}function WA(e,t){const r=[];let n=t;for(;n!==e&&n!==null;n=n.parentNode){let i=0;for(let o=n.previousSibling;o!==null;o=o.previousSibling)i++;r.push(i)}return n!==e&&ae(225),r.reverse()}let E6;try{E6="0.48.0+prod.esm"}catch{}const k6=E6??'"<unknown>+source"';let Pf=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(t){return delete this._cache,this._front.has(t)||this._back.add(t),this}addFront(t){return delete this._cache,this._back.has(t)||this._front.add(t),this}delete(t){return delete this._cache,this._front.delete(t)||this._back.delete(t)}toArray(){const t=Array.from(this._front).reverse();for(const r of this._back)t.push(r);return t}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};const iu=null;function C6(e,t=1e3){return e instanceof Sx?e.clone():e.size<t?new Map(e):new Sx().init(new Map(e),void 0,e.size)}let Sx=class R6{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new R6().init(this._old,this._nursery,this._size)}init(t,r,n){return this._old=t,this._nursery=r,this._size=n,this}get size(){return this._size}has(t){return this.get(t)!==void 0}getWithTombstone(t){const r=this._nursery&&this._nursery.get(t);return r!==void 0?r:this._old&&this._old.get(t)}get(t){const r=this.getWithTombstone(t);return r===iu?void 0:r}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(t=!1){if(this._nursery&&this._nursery.size>0&&(t||this.shouldCompact())){const r=new Map(this._old);for(const[n,i]of this._nursery)i!==iu?r.set(n,i):r.delete(n);this._old=r,this._nursery=void 0}return this._mutable=!1,this}set(t,r){const n=this.getWithTombstone(t);if(n===r)return this;const i=this.getNursery();return n!==iu&&n!==void 0||(this._size++,n===iu&&i.delete(t)),i.set(t,r),this}delete(t){const r=this.has(t);return r&&(this.getNursery().set(t,iu),this._size--),r}getOrInsert(t,r){const n=this.get(t);return n!==void 0?n:(this.set(t,r),r)}getOrInsertComputed(t,r){const n=this.get(t);if(n!==void 0)return n;const i=r(t);return this.set(t,i),i}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const t of this.entries())yield t[0]}*values(){for(const t of this.entries())yield t[1]}*entries(){const t=this._nursery,r=this._old;if(r)for(const n of r){const i=n[0],o=t?t.get(i):void 0;o!==iu&&(o!==void 0&&(n[1]=o),yield n)}if(t)for(const n of t)n[1]===iu||r&&r.has(n[0])||(yield n)}forEach(t,r){r!==void 0&&(t=t.bind(r));for(const[n,i]of this.entries())t(i,n,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function $0(e,t,r,n,i,o){if(H(e)){let a=e.getFirstChild();for(;a!==null;){const s=a.__key;a.__parent===t&&((H(a)||Rs(a)&&a.__slots!==null)&&$0(a,s,r,n,i,o),r.has(s)||o.delete(s),i.push(s)),a=a.getNextSibling()}}for(const a of Rs(e)&&e.__slots!==null?e.__slots.values():[]){const s=n.get(a);s!==void 0&&Gu(s)&&s.__slotHost===t&&((H(s)||Rs(s)&&s.__slots!==null)&&$0(s,a,r,n,i,o),r.has(a)||o.delete(a),i.push(a))}}let wx=!1,rE=0;function kre(e){rE=e.timeStamp}function H_(e,t,r){const n=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||n&&e.previousSibling===i)||n&&af(e,r)!==void 0}function Cre(e,t,r){const n=Si(Gi(r)),i=n&&Oo(n,r._rootElement);let o=null,a=null;i!==null&&i.anchorNode===e&&(o=i.anchorOffset,a=i.focusOffset);const s=e.nodeValue;s!==null&&bE(t,s,o,a,!1)}function Rre(e,t,r){if(ue(e)){const n=e.anchor.getNode();if(n.is(r)&&e.format!==n.getFormat())return!1}return Vi(t)&&r.isAttached()}function Are(e,t,r){for(let n=e;n&&!sL(n);n=ac(n)){const i=af(n,t);if(i!==void 0){const o=mr(i,r);if(o)return mt(o)||!it(n)?void 0:[n,o]}}}function A6(e,t,r){wx=!0;const n=performance.now()-rE>100;try{Ao(e,()=>{const i=xe()||(function(f){return f.read("latest",()=>{const h=xe();return h!==null?h.clone():null})})(e),o=new Map,a=e._editorState,s=e._blockCursorElement;let l=!1,c="";for(let f=0;f<t.length;f++){const h=t[f],p=h.type,m=h.target,g=Are(m,e,a);if(!g)continue;const[v,b]=g;if(p==="characterData")n&&fe(b)&&Vi(m)&&Rre(i,m,b)&&Cre(m,b,e);else if(p==="childList"){l=!0;const y=h.addedNodes;for(let C=0;C<y.length;C++){const A=y[C],T=H4(A),R=A.parentNode;if(!(R==null||A===s||T!==null||H_(A,R,e)||e._slotsUsed&&it(A)&&A.hasAttribute("data-lexical-slot")||sL(A))){if(Ol){const N=(it(A)?A.innerText:null)||A.nodeValue;N&&(c+=N)}R.removeChild(A)}}const S=h.removedNodes,w=S.length;if(w>0){let C=0;for(let A=0;A<w;A++){const T=S[A];(H_(T,m,e)||s===T)&&(m.appendChild(T),C++)}w!==C&&o.set(v,b)}}}if(o.size>0)for(const[f,h]of o)h.reconcileObservedMutation(f,e);const d=r.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const h=d[f],p=h.addedNodes,m=h.target;for(let g=0;g<p.length;g++){const v=p[g],b=v.parentNode;b==null||v.nodeName!=="BR"||H_(v,m,e)||b.removeChild(v)}}r.takeRecords()}i!==null&&(l&&In(i),Ol&&Z4(e)&&i.insertRawText(c))})}finally{wx=!1}}function $6(e){const t=e._observer;t!==null&&A6(e,t.takeRecords(),t)}function T6(e){(function(t){rE===0&&Gi(t).addEventListener("textInput",kre,!0)})(e),e._observer=new MutationObserver((t,r)=>{A6(e,t,r)})}const JA="latest";let $re=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(t,r){this.key=t,this.parse=r.parse.bind(r),this.unparse=(r.unparse||Dre).bind(r),this.isEqual=(r.isEqual||Object.is).bind(r),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=r.resetOnCopyNode||!1}};function Gp(e,t){return new $re(e,t)}function Kp(e,t,r=JA){const n=(r===JA?e.getLatest():e).__state;return n?n.getValue(t):t.defaultValue}function cd(e,t,r){let n;if(Rn(),typeof r=="function"){const o=e.getLatest(),a=Kp(o,t);if(n=r(a),t.isEqual(a,n))return o}else n=r;const i=e.getWritable();return D6(i).updateFromKnown(t,n),i}function Tre(e){const t=new Map,r=new Set;for(const{ownNodeConfig:n}of wE(typeof e=="function"?e:e.replace))if(n&&n.stateConfigs)for(const i of n.stateConfigs){let o;"stateConfig"in i?(o=i.stateConfig,i.flat&&r.add(o.key)):o=i,t.set(o.key,o)}return{flatKeys:r,sharedConfigMap:t}}const QA=new Set(["__proto__","constructor","prototype"]);let Nre=class N6{node;knownState;unknownState;sharedNodeState;size;constructor(t,r,n=void 0,i=new Map,o=void 0){this.node=t,this.sharedNodeState=r,this.unknownState=n,this.knownState=i;const{sharedConfigMap:a}=this.sharedNodeState,s=o!==void 0?o:(function(l,c,d){let f=d.size;if(c)for(const h in c){const p=l.get(h);p&&d.has(p)||f++}return f})(a,n,i);this.size=s}getValue(t){const r=this.knownState.get(t);if(r!==void 0)return r;this.sharedNodeState.sharedConfigMap.set(t.key,t);let n=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(n=t.parse(i)),this.updateFromKnown(t,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},r={};for(const[n,i]of this.knownState)n.isEqual(i,n.defaultValue)?delete t[n.key]:t[n.key]=n.unparse(i);for(const n of this.sharedNodeState.flatKeys)n in t&&(r[n]=t[n],delete t[n]);return YA(t)&&(r.$=t),r}getWritable(t){if(this.node===t)return this;const{sharedNodeState:r,unknownState:n}=this,i=new Map(this.knownState);return new N6(t,r,(function(o,a,s){let l;if(s)for(const[c,d]of Object.entries(s)){if(QA.has(c))continue;const f=o.get(c);f?a.has(f)||a.set(f,f.parse(d)):(l=l||{},l[c]=d)}return l})(r.sharedConfigMap,i,n),i,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,r){const n=t.key;this.sharedNodeState.sharedConfigMap.set(n,t);const{knownState:i,unknownState:o}=this;i.has(t)||o&&n in o||(o&&(delete o[n],this.unknownState=YA(o)),this.size++),i.set(t,r)}updateFromUnknown(t,r){if(QA.has(t))return;const n=this.sharedNodeState.sharedConfigMap.get(t);n?this.updateFromKnown(n,n.parse(r)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=r)}updateFromJSON(t){const{knownState:r}=this;for(const n of r.keys())r.set(n,n.defaultValue);if(this.size=r.size,this.unknownState=void 0,t)for(const[n,i]of Object.entries(t))this.updateFromUnknown(n,i)}};function D6(e){const t=e.getWritable(),r=t.__state?t.__state.getWritable(t):new Nre(t,F6(t));return t.__state=r,r}function F6(e){return e.__state?e.__state.sharedNodeState:V4(Fr(),e.getType()).sharedNodeState}function YA(e){if(e)for(const t in e)return e}function Dre(e){return e}function XA(e,t,r){for(const[n,i]of t.knownState){if(e.has(n.key))continue;e.add(n.key);const o=r?r.getValue(n):n.defaultValue;if(o!==i&&!n.isEqual(o,i))return!0}return!1}function ZA(e,t,r){const{unknownState:n}=t,i=r?r.unknownState:void 0;if(n){for(const[o,a]of Object.entries(n))if(!e.has(o)&&(e.add(o),a!==(i?i[o]:void 0)))return!0}return!1}function e$(e,t){const r=e.__state;return r&&r.node===e?r.getWritable(t):r}function t$(e,t){const r=e.__mode,n=e.__format,i=e.__style,o=t.__mode,a=t.__format,s=t.__style,l=e.__state,c=t.__state;return(r===null||r===o)&&(n===null||n===a)&&(i===null||i===s)&&(e.__state===null||l===c||(function(d,f){if(d===f)return!0;const h=new Set;return!(d&&XA(h,d,f)||f&&XA(h,f,d)||d&&ZA(h,d,f)||f&&ZA(h,f,d))})(l,c))}function r$(e,t){const r=e.mergeWithSibling(t),n=Wt()._normalizedNodes;return n.add(e.__key),n.add(t.__key),r}function n$(e){let t,r,n=e;if(n.__text!==""||!n.isSimpleText()||n.isUnmergeable()){for(;(t=n.getPreviousSibling())!==null&&fe(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(t$(t,n)){n=r$(t,n);break}break}t.remove()}for(;(r=n.getNextSibling())!==null&&fe(r)&&r.isSimpleText()&&!r.isUnmergeable();){if(r.__text!==""){if(t$(n,r)){n=r$(n,r);break}break}r.remove()}}else n.remove()}function yl(e){return i$(e.anchor),i$(e.focus),e}function i$(e){for(;e.type==="element";){const t=e.getNode(),r=e.offset;let n,i;if(r===t.getChildrenSize()?(n=t.getChildAtIndex(r-1),i=!0):(n=t.getChildAtIndex(r),i=!1),fe(n)){e.set(n.__key,i?n.getTextContentSize():0,"text",!0);break}if(!H(n))break;e.set(n.__key,i?n.getChildrenSize():0,"element",!0)}}const Jh=Symbol.for("@lexical/CachedTextSize");function o$(e,t){return kx.read(()=>{let r=0,n=e;for(let i=0;i<t&&n!==null;i++){const o=ta.get(n);if(o===void 0&&ae(345,n),H(o)){const a=Rr.get(n);if(a!==void 0&&H(a)&&a.__parent!==o.__parent)r+=o.getTextContentSize();else{const s=zu.get(n),l=s&&s.__lexicalTextContent;typeof l!="string"&&ae(346,o.getType()),r+=l.length}i<t-1&&!o.isInline()&&(r+=2)}else{const a=o[Jh];a===void 0&&ae(347,o.getType(),n),r+=a}n=o.__next}return r},{editor:Ot})}function I6(e){H(e)||e[Jh]===void 0&&(e[Jh]=fe(e)?e.__text.length:e.getTextContentSize())}const Fre=4;let Qh,Ot,Yh,bt="",zr=null,ri=null,jn=null;function za(){return{firstTextKey:jn,format:zr,style:ri}}function yo(e){e.firstTextKey!==null&&(zr=e.format,ri=e.style,jn=e.firstTextKey)}function Ex(e){if(jn!==null)return;const t=e.__lexicalFirstTextKey;if(t===void 0&&ae(348),t===null)return;const r=Rr.get(t);fe(r)&&(zr=r.getFormat(),ri=r.getStyle(),jn=t)}let nb,gh,vh,ta,kx,Rr,zu,Cx,Xh,Uu,Ss=!1,T0=!1;function Al(e,t){const r=ta.get(e),n=Rr.has(e);if(t!==null){const i=Nx(e);i.parentNode===t&&t.removeChild(i)}if(!n){if(Ot._keyToDOMMap.delete(e),H(r)){const i=H0(r,ta);Rx(i,0,i.length-1,null)}if(r!==void 0){for(const i of Xi(r).values()){const o=$x(i);Al(i,null),o!==null&&o.remove()}_E(Xh,Yh,nb,r,"destroyed")}}}function Rx(e,t,r,n){for(let i=t;i<=r;++i){const o=e[i];o!==void 0&&Al(o,n)}}function ou(e,t){e.setProperty("text-align",t)}const Ire="40px";function P6(e,t){const r=Qh.theme.indent;if(typeof r=="string"){const n=e.classList.contains(r);t>0&&!n?e.classList.add(r):t<1&&n&&e.classList.remove(r)}e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * var(--lexical-indent-base-value, ${Ire}))`)}function O6(e,t){const r=e.style;t===0?ou(r,""):t===1?ou(r,"left"):t===2?ou(r,"center"):t===3?ou(r,"right"):t===4?ou(r,"justify"):t===5?ou(r,"start"):t===6&&ou(r,"end")}function Ax(e,t){const r=(function(n){const i=n.__dir;if(i!==null)return i;if(Mr(n))return null;const o=n.getParent();return o===null||br(o)&&o.__dir===null?"auto":null})(t);r!==null?e.dir=r:e.removeAttribute("dir")}function M6(e){const t=gr().createElement("div");return t.setAttribute("data-lexical-slot",e),t.style.display="none",t}function L6(e,t,r){t||e.contentEditable==="false"?Yne(r,Ot):r.removeAttribute("contenteditable")}function a$(e,t,r){const n=bt,i=za();bt="";let o="";const a=mt(e);for(const[s,l]of r){const c=M6(s);L6(t,a,c),t.appendChild(c),bt="";const d=za();$l(l,Mo(e,c,Ot)),yo(d),z6(e,s,t,c),o+=bt}return yo(i),bt=n,o}function Xi(e){return Rs(e)&&e.__slots!==null?e.__slots:cL}function z6(e,t,r,n){const i=Uu.$getSlotTargetElement(e,t,r,Ot);i!==null&&(n.parentElement!==i&&i.appendChild(n),n.style.display="")}function $x(e){const t=zu.get(e);return t!==void 0?t.parentElement:null}function s$(e,t,r){const n=Xi(e),i=Xi(t);for(const[d,f]of n)if(!i.has(d)){const h=$x(f);Al(f,null),h!==null&&h.remove()}const o=bt,a=za();let s="",l=null;const c=mt(t);for(const[d,f]of i){const h=n.get(d);let p=h!==void 0?$x(h):null;bt="";const m=za();if(p===null){p=M6(d);let g=null;for(const v of r.children)if(!v.hasAttribute("data-lexical-slot")){g=v;break}r.insertBefore(p,g),$l(f,Mo(t,p,Ot))}else h===f?gs(f,p):(h!==void 0&&Al(h,p),$l(f,Mo(t,p,Ot)));if(yo(m),L6(r,c,p),z6(t,d,r,p),s+=bt,p.parentElement===r){const g=l===null?r.firstChild:l.nextSibling;g!==p&&r.insertBefore(p,g),l=p}}return yo(a),bt=o,s}function $l(e,t){const r=Rr.get(e);if(r===void 0&&ae(60),t!==null){const i=ta.get(e);if(i!==void 0){const o=zu.get(e);if(o!==void 0){const a=Gu(i)?i.__slotHost:null,s=Gu(r)?r.__slotHost:null,l=i.__parent!==r.__parent||a!==s,c=s!==null&&o.parentElement!==t.element;if(l||c)return t.insertChild(o),gs(e,t.element)}}}const n=Uu.$createDOM(r,Ot);if((function(i,o,a){const s=a._keyToDOMMap;W4(o,a,i),s.set(i,o)})(e,n,Ot),fe(r)?n.setAttribute("data-lexical-text","true"):mt(r)&&(n.setAttribute("data-lexical-decorator","true"),Qne(n,{captureSelection:!0})),H(r)){const i=r.__indent,o=r.__size;Ax(n,r),i!==0&&P6(n,i);const a=Xi(r),s=a.size>0?a$(r,n,a):"";if(o===0)n.__lexicalTextContent=s,n.__lexicalFirstTextKey=null,bt+=s,a.size>0&&(n.__lexicalSlotTextLength=s.length);else{const c=bt,d=o-1;if(Tx(H0(r,Rr),r,0,d,Mo(r,n,Ot)),s!==""){const f=n.__lexicalTextContent||"";n.__lexicalTextContent=s+f,bt=c+s+f}a.size>0&&(n.__lexicalSlotTextLength=s.length)}const l=r.__format;l!==0&&O6(n,l),r.isInline()||U6(null,r,n)}else{const i=r.getTextContent();if(mt(r)){const o=r.decorate(Ot,Qh);o!==null&&B6(e,o),n.contentEditable="false";const a=Xi(r);a.size>0&&a$(r,n,a)}bt+=i}return t!==null&&t.insertChild(n),Uu.$decorateDOM(r,null,n,Ot),I6(r),_E(Xh,Yh,nb,r,"created"),n}function Tx(e,t,r,n,i){const o=bt,a=za();bt="",zr=null,ri=null,jn=null;let s=r;for(;s<=n;++s){const c=za();$l(e[s],i);const d=Rr.get(e[s]);d!==null&&fe(d)?zr===null&&(zr=d.getFormat(),ri=d.getStyle(),jn=d.__key):H(d)&&s<n&&!d.isInline()&&(bt+=yu),yo(c)}const l=Ot._keyToDOMMap.get(t.__key);l===void 0&&ae(349,t.__key),l.__lexicalTextContent=bt,l.__lexicalFirstTextKey=jn,bt=o+bt,yo(a)}function U6(e,t,r){const n=Mo(t,r,Ot),i=n.element.__lexicalLastChildKind??null,o=(function(a,s){if(a){const l=a.__last;if(l){const c=s.get(l);if(c)return _i(c)?"line-break":mt(c)&&c.isInline()?"decorator":null}return Xi(a).size>0?null:"empty"}return null})(t,Rr);i!==o&&n.setManagedLineBreak(o)}function Pre(e,t,r){var n;zr=null,ri=null,jn=null,(function(i,o,a){const s=bt,l=i.__size,c=o.__size;bt="";const d=a.element,f=Ot._keyToDOMMap.get(o.__key);f===void 0&&ae(351,o.__key);const h=c-l;if(!Ss&&Math.abs(h)<=1&&l>=Fre&&i.__first===o.__first&&(h!==0||!Ot._cloneNotNeeded.has(i.__key))){const p=f.__lexicalTextContent,m=Cx.get(i.__key);if(!Ss&&typeof p=="string"&&m!==void 0){const g=(function(v,b){const y=b.size;if(y===0||y>=v.__size)return null;let S=v.__last,w=null,C=0;for(;S!==null&&C<y;){if(!b.has(S))return null;w=S;const A=Rr.get(S);if(A===void 0)return null;S=A.__prev,C++}return C!==y||S!==null&&b.has(S)?null:w})(o,m);if(g!==null){const v=m.size;if(h===0){const b=o$(g,v);let y=g,S=0;for(;y!==null&&S<v;){const R=Rr.get(y);if(R===void 0)break;const N=za();gs(y,d),fe(R)&&zr===null&&(zr=R.getFormat(),ri=R.getStyle(),jn=R.__key),yo(N),y=R.__next,S++}let w="";for(y=g,S=0;y!==null&&S<v;){const R=Rr.get(y);if(R===void 0)break;let N;if(H(R)){const I=Ot._keyToDOMMap.get(y),M=I&&I.__lexicalTextContent;typeof M!="string"&&ae(352,R.getType()),N=M}else N=R.getTextContent();w+=N,S<v-1&&H(R)&&!R.isInline()&&(w+=yu),y=R.__next,S++}const C=f.__lexicalSlotTextLength||0,A=C>0?p.slice(C):p,T=A.slice(0,A.length-b)+w;return f.__lexicalTextContent=T,bt=s+T,void l$(o,f,m)}if((function(b,y,S,w,C,A,T,R){if(R!==1&&R!==-1||T!==(R===1?2:1))return!1;const I=T-R;let M=b.__last;for(let me=0;me<I-1;me++){if(M===null)return!1;const be=ta.get(M);if(be===void 0)return!1;M=be.__prev}if(M===null)return!1;const P=Rr.get(A),B=ta.get(M);if(P===void 0||B===void 0||P.__prev!==B.__prev)return!1;const j=[];let W=A;for(let me=0;me<T;me++){if(W===null)return!1;j.push(W);const be=Rr.get(W);W=be?be.__next:null}const te=[];W=M;for(let me=0;me<I;me++){if(W===null)return!1;te.push(W);const be=ta.get(W);W=be?be.__next:null}const J=new Set(te),re=new Set(j),se=[];let pe=0,K=0;for(;pe<I&&K<T;)if(j[K]===te[pe])se.push({key:j[K],kind:"reconcile"}),pe++,K++;else if(re.has(te[pe])){if(J.has(j[K]))return!1;se.push({key:j[K],kind:"create",nextIndex:K}),K++}else se.push({key:te[pe],kind:"destroy"}),pe++;for(;pe<I;)se.push({key:te[pe++],kind:"destroy"});for(;K<T;)se.push({key:j[K],kind:"create",nextIndex:K}),K++;const oe=o$(M,I);for(const me of se){const be=za();if(me.kind==="reconcile")gs(me.key,S.element);else if(me.kind==="destroy")Al(me.key,S.element);else{let Ge=null;for(let Lt=me.nextIndex+1;Lt<T;Lt++){const Ct=Ot._keyToDOMMap.get(j[Lt]);if(Ct!==void 0){Ge=Ct;break}}$l(me.key,S.withBefore(Ge??S.before))}if(me.kind!=="destroy"){const Ge=Rr.get(me.key);Ge&&fe(Ge)&&zr===null&&(zr=Ge.getFormat(),ri=Ge.getStyle(),jn=Ge.__key)}yo(be)}let le="";for(let me=0;me<T;me++){const be=Rr.get(j[me]);if(be===void 0)return!1;let Ge;if(H(be)){const Lt=Ot._keyToDOMMap.get(j[me]),Ct=Lt&&Lt.__lexicalTextContent;typeof Ct!="string"&&ae(350,be.getType()),Ge=Ct}else Ge=be.getTextContent();le+=Ge,me<T-1&&H(be)&&!be.isInline()&&(le+=yu)}const Z=w.__lexicalSlotTextLength||0,ve=Z>0?C.slice(Z):C;return w.__lexicalTextContent=ve.slice(0,ve.length-oe)+le,!0})(i,0,a,f,p,g,v,h)){const b=f.__lexicalTextContent;return typeof b!="string"&&ae(353),bt=s+b,void l$(o,f,m)}}}if(h===0){let g=i.__first,v=0;for(;g!==null;){const b=Rr.get(g);if(b===void 0)break;const y=Ss||vh.has(g)||gh.has(g),S=za();if(y)gs(g,d);else{let w,C;if(H(b)){C=zu.get(g);const A=C&&C.__lexicalTextContent;typeof A!="string"&&ae(354,b.getType()),w=A}else w=b.getTextContent();bt+=w,C!==void 0&&Ex(C)}fe(b)?zr===null&&(zr=b.getFormat(),ri=b.getStyle(),jn=b.__key):H(b)&&v<c-1&&!b.isInline()&&(bt+=yu),yo(S),g=b.__next,v++}return f.__lexicalTextContent=bt,f.__lexicalFirstTextKey=jn,void(bt=s+bt)}}if(l===1&&c===1){const p=i.__first,m=o.__first;if(p===m)gs(p,d);else{const v=Nx(p),b=$l(m,null);try{v.parentNode===d?d.replaceChild(b,v):a.insertChild(b)}catch(y){if(typeof y=="object"&&y!=null){const S=`${y.toString()} Parent: ${d.tagName}, new child: {tag: ${b.tagName} key: ${m}}, old child: {tag: ${v.tagName}, key: ${p}}.`;throw new Error(S)}throw y}Al(p,null)}const g=Rr.get(m);fe(g)&&zr===null&&(zr=g.getFormat(),ri=g.getStyle(),jn=g.__key)}else{const p=H0(i,ta),m=H0(o,Rr);if(p.length!==l&&ae(227),m.length!==c&&ae(228),l===0)c!==0&&Tx(m,o,0,c-1,a);else if(c===0){if(l!==0){const g=a.after==null&&a.before==null&&Xi(o).size===0&&a.element.__lexicalLineBreak==null;Rx(p,0,l-1,g?null:d),g&&(d.textContent="")}}else(function(g,v,b,y,S,w){const C=y-1,A=S-1;let T,R,N=w.getFirstChild(),I=0,M=0;for(;I<=C&&M<=A;){const j=v[I],W=b[M],te=za();if(j===W)N=W_(gs(W,w.element)),I++,M++;else{if(R===void 0&&(R=u$(b,M)),T===void 0)T=u$(v,I);else if(!T.has(j)){I++,yo(te);continue}if(!R.has(j)){N=W_(Nx(j)),Al(j,w.element),I++,T.delete(j),yo(te);continue}if(T.has(W)){const re=Id(Ot,W);re!==N&&w.withBefore(N??w.before).insertChild(re),N=W_(gs(W,w.element)),I++,M++}else $l(W,w.withBefore(N??w.before)),M++}const J=Rr.get(W);J!==null&&fe(J)?zr===null&&(zr=J.getFormat(),ri=J.getStyle(),jn=J.__key):H(J)&&M<=A&&!J.isInline()&&(bt+=yu),yo(te)}const P=I>C,B=M>A;if(P&&!B){const j=b[A+1],W=j===void 0?null:Ot.getElementByKey(j);Tx(b,g,M,A,w.withBefore(W??w.before))}else B&&!P&&Rx(v,I,C,w.element)})(o,p,m,l,c,a)}f.__lexicalTextContent=bt,f.__lexicalFirstTextKey=jn,bt=s+bt})(e,t,Mo(t,r,Ot)),br(t)||(n=t,zr==null||zr===n.__textFormat||T0||n.setTextFormat(zr),(function(i){ri==null||ri===i.__textStyle||T0||i.setTextStyle(ri)})(t))}function l$(e,t,r){const n=t.__lexicalFirstTextKey;if(n!=null){const i=e.__key;let o=n;for(;o!==null;){const a=Rr.get(o);if(a===void 0){o=null;break}if(a.__parent===i)break;o=a.__parent}if(o!==null&&!r.has(o)){const a=Rr.get(n);if(fe(a))return zr=a.getFormat(),void(ri=a.getStyle())}}t.__lexicalFirstTextKey=jn}function gs(e,t){const r=ta.get(e);let n=Rr.get(e);r!==void 0&&n!==void 0||ae(61);const i=Ss||vh.has(e)||gh.has(e),o=Id(Ot,e);if(r===n&&!i){let a;if(H(r)){const s=o.__lexicalTextContent;typeof s!="string"&&ae(355,r.getType()),a=s,Ex(o)}else a=r.getTextContent();return bt+=a,o}if(r!==n&&i&&_E(Xh,Yh,nb,n,"updated"),Uu.$updateDOM(n,r,o,Ot)){const a=$l(e,null);return t===null&&ae(62),t.replaceChild(a,o),Al(e,null),a}if(H(r)){H(n)||ae(334,e);const a=n.__indent;(Ss||a!==r.__indent)&&P6(o,a);const s=n.__format;(Ss||s!==r.__format)&&O6(o,s);const l=i&&(Xi(n).size>0||Xi(r).size>0)?s$(r,n,o):"";if(i){const c=bt;if(Pre(r,n,o),Mr(n)||n.isInline()||U6(0,n,o),l!==""){const d=o.__lexicalTextContent||"";o.__lexicalTextContent=l+d,bt=c+l+d,o.__lexicalSlotTextLength=l.length}else(Xi(n).size>0||Xi(r).size>0)&&(o.__lexicalSlotTextLength=0)}else{const c=o.__lexicalTextContent;typeof c!="string"&&ae(356,r.getType()),bt+=c,Ex(o)}if((Ss||n.__dir!==r.__dir||n.__parent!==r.__parent)&&(Ax(o,n),Mr(n)&&!Ss))for(const c of n.getChildren())H(c)&&Ax(Id(Ot,c.getKey()),c)}else{const a=n.getTextContent();if(mt(n)){const s=n.decorate(Ot,Qh);s!==null&&B6(e,s),i&&(Xi(n).size>0||Xi(r).size>0)&&s$(r,n,o)}bt+=a}if(!T0&&Mr(n)){const a=n.getLatest();if(a.__cachedText!==bt){const s=a.getWritable();s.__cachedText=bt,n=s}}return Uu.$decorateDOM(n,r,o,Ot),I6(n),o}function B6(e,t){let r=Ot._pendingDecorators;const n=Ot._decorators;if(r===null){if(n[e]===t)return;r=J4(Ot)}r[e]=t}function W_(e){let t=e.nextSibling;return t!==null&&t===Ot._blockCursorElement&&(t=t.nextSibling),t}function u$(e,t){const r=new Set;for(let n=t;n<e.length;n++)r.add(e[n]);return r}function Ore(e,t,r,n,i,o){bt="",zr=null,ri=null,jn=null,Ss=n===2,Ot=r,Qh=r._config,Uu=r._config.dom||j0,Yh=r._nodes,nb=Ot._listeners.mutation,gh=i,vh=o,ta=e._nodeMap,kx=e,Rr=t._nodeMap,T0=t._readOnly,zu=C6(r._keyToDOMMap),Cx=(function(){const s=new Map,l=c=>{for(const d of c){const f=Rr.get(d);if(f===void 0)continue;const h=f.__parent;if(h===null)continue;let p=s.get(h);p===void 0&&(p=new Set,s.set(h,p)),p.add(d)}};return l(gh.keys()),l(vh),s})();const a=new Map;return Xh=a,gs("root",null),Ot=void 0,Yh=void 0,gh=void 0,vh=void 0,ta=void 0,kx=void 0,Rr=void 0,Qh=void 0,zu=void 0,Cx=void 0,Xh=void 0,Uu=j0,a}function Nx(e){const t=zu.get(e);return t===void 0&&ae(75,e),t}function Ke(e){return{type:e}}const j6=Ke("SELECTION_CHANGE_COMMAND"),Mre=Ke("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),q6=Ke("CLICK_COMMAND"),V6=Ke("BEFORE_INPUT_COMMAND"),G6=Ke("INPUT_COMMAND"),K6=Ke("COMPOSITION_START_COMMAND"),H6=Ke("COMPOSITION_END_COMMAND"),Eu=Ke("DELETE_CHARACTER_COMMAND"),dd=Ke("INSERT_LINE_BREAK_COMMAND"),Zh=Ke("INSERT_PARAGRAPH_COMMAND"),fd=Ke("CONTROLLED_TEXT_INSERTION_COMMAND"),nE=Ke("PASTE_COMMAND"),Hg=Ke("REMOVE_TEXT_COMMAND"),ep=Ke("DELETE_WORD_COMMAND"),tp=Ke("DELETE_LINE_COMMAND"),ra=Ke("FORMAT_TEXT_COMMAND"),Lre=Ke("SET_TEXT_FORMAT_COMMAND"),ib=Ke("UNDO_COMMAND"),ob=Ke("REDO_COMMAND"),W6=Ke("KEYDOWN_COMMAND"),J6=Ke("KEY_ARROW_RIGHT_COMMAND"),Q6=Ke("MOVE_TO_END"),Y6=Ke("KEY_ARROW_LEFT_COMMAND"),X6=Ke("MOVE_TO_START"),Z6=Ke("KEY_ARROW_UP_COMMAND"),e4=Ke("KEY_ARROW_DOWN_COMMAND"),rp=Ke("KEY_ENTER_COMMAND"),t4=Ke("KEY_SPACE_COMMAND"),iE=Ke("KEY_BACKSPACE_COMMAND"),r4=Ke("KEY_ESCAPE_COMMAND"),n4=Ke("KEY_DELETE_COMMAND"),i4=Ke("KEY_TAB_COMMAND"),zre=Ke("INSERT_TAB_COMMAND"),Ure=Ke("INDENT_CONTENT_COMMAND"),c$=Ke("OUTDENT_CONTENT_COMMAND"),o4=Ke("DROP_COMMAND"),Bre=Ke("FORMAT_ELEMENT_COMMAND"),a4=Ke("DRAGSTART_COMMAND"),s4=Ke("DRAGOVER_COMMAND"),jre=Ke("DRAGEND_COMMAND"),ab=Ke("COPY_COMMAND"),oE=Ke("CUT_COMMAND"),l4=Ke("SELECT_ALL_COMMAND"),qre=Ke("CLEAR_EDITOR_COMMAND"),Vre=Ke("CLEAR_HISTORY_COMMAND"),Um=Ke("CAN_REDO_COMMAND"),Bm=Ke("CAN_UNDO_COMMAND"),Gre=Ke("FOCUS_COMMAND"),Kre=Ke("BLUR_COMMAND"),Hre=Ke("KEY_MODIFIER_COMMAND");function Wre(e){const t=new Map;return{dispose(){for(const r of t.values())r.dispose();t.clear()},register(r,n){let i=t.get(r);i===void 0&&(i={dispose:e(r,n),holders:new Set},t.set(r,i));const o=()=>{const a=t.get(r);a&&a.holders.delete(o)&&a.holders.size===0&&(t.delete(r),a.dispose())};return i.holders.add(o),o}}}function Jre(e,t,r,n){return e.addEventListener(t,r,n),e.removeEventListener.bind(e,t,r,n)}const us=Object.freeze({}),Dx=[["keydown",function(e,t){const r=t._inputState;r.lastKeyDownTimeStamp=e.timeStamp,r.lastKeyCode=e.key,e.key!=="Backspace"&&np(r),!t.isComposing()&&$e(t,W6,e)}],["pointerdown",function(e,t){const r=iL(e),n=e.pointerType;sf(r)&&n!=="touch"&&n!=="pen"&&e.button===0&&Ao(t,()=>{K0(r,t)||(t._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(e,t){$e(t,K6,e)}],["compositionend",function(e,t){const r=t._inputState;Ol?r.compositionPhase="ending-firefox":Ml||!qp&&!Vp?$e(t,H6,e):(r.compositionPhase="ending-safari",r.compositionEndData=e.data)}],["input",function(e,t){e.stopPropagation();const r=t._inputState;np(r),Ao(t,()=>{f4(e,t)||t.dispatchCommand(G6,e)},{event:e}),r.unprocessedBeforeInputData=null}],["click",function(e,t){Ao(t,()=>{const r=xe(),n=Si(Gi(t)),i=ef();if(n){if(ue(r)){const o=r.anchor,a=o.getNode();o.type==="element"&&o.offset===0&&r.isCollapsed()&&!Mr(a)&&un().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&r.is(i)&&(n.removeAllRanges(),r.dirty=!0)}else if(e.pointerType==="touch"||e.pointerType==="pen"){const o=Oo(n,t._rootElement).anchorNode;(it(o)||Vi(o))&&In(lE(i,n,t,e))}}$e(t,q6,e)})}],["cut",us],["copy",us],["dragstart",us],["dragover",us],["dragend",us],["paste",us],["focus",us],["blur",us],["drop",us]];Td&&Dx.push(["beforeinput",(e,t)=>(function(r,n){const i=r.inputType;i==="deleteCompositionText"||Ol&&Z4(n)||i!=="insertCompositionText"&&Ao(n,()=>{f4(r,n)||$e(n,V6,r)},{event:r})})(e,t)]);const Fx=new WeakMap,N0=new WeakMap,Qre=Wre(e=>(e.addEventListener("selectionchange",m$),()=>e.removeEventListener("selectionchange",m$)));function u4(e,t,r,n,i,o){const a=e.anchor,s=e.focus,l=a.getNode(),c=Wt();let d;if(o!==void 0)d=o;else{const g=Si(Gi(c));d=g!==null?Oo(g,c._rootElement):null}const f=d!==null?d.anchorNode:null,h=a.key,p=c.getElementByKey(h),m=r.length;return h!==s.key||!fe(l)||(!i&&(!Td||c._inputState.lastBeforeInputInsertTextTimeStamp<n+50)||l.isDirty()&&m<2||Q4(r))&&a.offset!==s.offset&&!l.isComposing()||eo(l)||l.isDirty()&&m>1||(i||!Td)&&p!==null&&!l.isComposing()&&f!==Tl(l,p,c)||d!==null&&t!==null&&(!t.collapsed||t.startContainer!==d.anchorNode||t.startOffset!==d.anchorOffset)||!l.isComposing()&&(l.getFormat()!==e.format||l.getStyle()!==e.style)||(function(g,v){if(v.isSegmented())return!0;if(!g.isCollapsed())return!1;const b=g.anchor.offset,y=v.getParentOrThrow(),S=ku(v);return b===0?!v.canInsertTextBefore()||!y.canInsertTextBefore()&&!v.isComposing()||S||(function(w){const C=w.getPreviousSibling();return(fe(C)||H(C)&&C.isInline())&&!C.canInsertTextAfter()})(v):b===v.getTextContentSize()&&(!v.canInsertTextAfter()||!y.canInsertTextAfter()&&!v.isComposing()||S)})(e,l)}function d$(e,t){return Vi(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function f$(e,t,r){const{anchorNode:n,anchorOffset:i,focusNode:o,focusOffset:a}=Oo(e,t._rootElement),s=t._inputState;s.isSelectionChangeFromDOMUpdate&&(s.isSelectionChangeFromDOMUpdate=!1,d$(n,i)&&d$(o,a)&&!s.postDeleteSelectionToRestore)||Ao(t,()=>{if(!r)return void In(null);if(!Wp(t,n,o))return;let l=xe();if(s.postDeleteSelectionToRestore&&ue(l)&&l.isCollapsed()){const c=l.anchor,d=s.postDeleteSelectionToRestore.anchor;(c.key===d.key&&c.offset===d.offset+1||c.offset===1&&d.getNode().is(c.getNode().getPreviousSibling()))&&(l=s.postDeleteSelectionToRestore.clone(),In(l))}if(s.postDeleteSelectionToRestore=null,ue(l)){const c=l.anchor,d=c.getNode();if(l.isCollapsed()){e.type==="Range"&&n===o&&(l.dirty=!0);const f=Gi(t).event,h=f?f.timeStamp:performance.now(),{format:p,style:m,offset:g,key:v,timeStamp:b}=s.collapsedSelectionFormat,y=un(),S=t.isComposing()===!1&&y.getTextContent()==="";if(h<b+200&&c.offset===g&&c.key===v)Wg(l,p,m);else if(c.type==="text")fe(d)||ae(141),c4(l,d);else if(c.type==="element"&&!S){H(d)||ae(259);const w=c.getNode();w.isEmpty()?(function(C,A){const T=A.getTextFormat(),R=A.getTextStyle();Wg(C,T,R)})(l,w):Wg(l,l.format,"")}}else{const f=c.key,h=l.focus.key,p=l.getNodes(),m=p.length,g=l.isBackward(),v=g?a:i,b=g?i:a,y=g?h:f,S=g?f:h;let w=2047,C=!1;for(let A=0;A<m;A++){const T=p[A],R=T.getTextContentSize();if(fe(T)&&R!==0&&!(A===0&&T.__key===y&&v===R||A===m-1&&T.__key===S&&b===0)&&(C=!0,w&=T.getFormat(),w===0))break}l.format=C?w:0}}$e(t,j6,void 0)})}function Wg(e,t,r){e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}function c4(e,t){Wg(e,t.getFormat(),t.getStyle())}function d4(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function h$(e){const{lastKeyCode:t}=Wt()._inputState;if(e==null||e.length<=1||t==null)return;const r=t.length===1?t:t==="Enter"?`
|
|
20
|
+
`:t==="Tab"?" ":null;if(!r)return;const n=xe();if(!ue(n)||!n.isCollapsed())return;const i=n.anchor.getNode();if(!fe(i))return;const{offset:o}=n.anchor;if(i.getTextContentSize()===o){const a=i.getNextSibling();if(r===`
|
|
21
|
+
`){if(_i(a))a.selectEnd();else if(!a){const s=cr(i,Nd),l=s&&s.getNextSibling();H(l)&&l.selectStart()}}else r===" "?Bu(a)&&a.selectEnd():fe(a)&&a.getTextContent()[0]===r&&a.select(1,1)}else i.getTextContent()[o]===r&&i.select(o+1,o+1)}function np(e){e.isInsertTextAfterHandledSelectionCommand=!1,e.handledSelectionCommandTimeoutId!==null&&(clearTimeout(e.handledSelectionCommandTimeoutId),e.handledSelectionCommandTimeoutId=null)}function p$(e){np(e),e.isInsertTextAfterHandledSelectionCommand=!0,e.handledSelectionCommandTimeoutId=setTimeout(()=>np(e),0)}function f4(e,t){const r=iL(e);if(it(r)&&K0(r,t))return!0;const n=t.getRootElement();if(n===null)return!1;const i=ap(n.ownerDocument);return i!==null&&n.contains(i)&&K0(i,t)}function Yre(e){const t=e.inputType,r=d4(e),n=Wt(),i=n._inputState,o=xe();if(t==="insertText"&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(np(i),e.preventDefault(),ue(o)&&!o.isCollapsed()){const f=o.isBackward()?o.anchor:o.focus;o.anchor.set(f.key,f.offset,f.type),o.focus.set(f.key,f.offset,f.type)}return!0}if(t==="deleteContentBackward"){if(o===null){const f=ef();if(!ue(f))return!0;In(f.clone())}if(ue(o)){const f=o.anchor.key===o.focus.key;if((function(h,p){return h.lastKeyCode==="MediaLast"&&p<h.lastKeyDownTimeStamp+30})(i,e.timeStamp)&&n.isComposing()&&f){if(An(null),i.lastKeyDownTimeStamp=0,setTimeout(()=>{Ao(n,()=>{An(null)})},30),ue(o)){const h=o.anchor.getNode();h.markDirty(),fe(h)||ae(142),c4(o,h)}}else{if(An(null),Ml&&r!==null&&!r.collapsed&&(o.applyDOMRange(r),!o.isCollapsed()))return e.preventDefault(),o.removeText(),!0;e.preventDefault();const h=o.anchor.getNode(),p=h.getTextContent(),m=h.canInsertTextAfter(),g=o.anchor.offset===0&&o.focus.offset===p.length;let v=R0&&f&&!g&&m;if(v&&o.isCollapsed()&&(v=!mt(Pne(o.anchor,!0))),!v){$e(n,Eu,!0);const b=xe();R0&&ue(b)&&b.isCollapsed()&&(i.postDeleteSelectionToRestore=b,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!ue(o))return!0;const a=e.data;i.unprocessedBeforeInputData!==null&&vE(!1,n,i.unprocessedBeforeInputData),o.dirty&&i.unprocessedBeforeInputData===null||!o.isCollapsed()||Mr(o.anchor.getNode())||r===null||o.applyDOMRange(r),i.unprocessedBeforeInputData=null;const s=o.anchor,l=o.focus,c=s.getNode(),d=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(a===`
|
|
22
|
+
`)e.preventDefault(),$e(n,dd,!1);else if(a===yu)e.preventDefault(),$e(n,Zh,void 0);else if(a==null&&e.dataTransfer){const f=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(f)}else a!=null&&u4(o,r,a,e.timeStamp,!0)?(e.preventDefault(),$e(n,fd,a),h$(a)):i.unprocessedBeforeInputData=a;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":$e(n,fd,e),h$((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const f=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const h=n._compositionKey;An(null),f||$e(n,fd,e),Jg(h);break}case"insertLineBreak":An(null),$e(n,dd,!1);break;case"insertParagraph":An(null),i.isInsertLineBreak&&!Ml?(i.isInsertLineBreak=!1,$e(n,dd,!1)):$e(n,Zh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":$e(n,nE,e);break;case"deleteByComposition":(function(f,h){return f!==h||H(f)||H(h)||!ku(f)||!ku(h)})(c,d)&&$e(n,Hg,e);break;case"deleteByDrag":Vu(Px),$e(n,Hg,e);break;case"deleteByCut":$e(n,Hg,e);break;case"deleteContent":$e(n,Eu,!1);break;case"deleteWordBackward":$e(n,ep,!0);break;case"deleteWordForward":$e(n,ep,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":$e(n,tp,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":$e(n,tp,!1);break;case"formatStrikeThrough":$e(n,ra,"strikethrough");break;case"formatBold":$e(n,ra,"bold");break;case"formatItalic":$e(n,ra,"italic");break;case"formatUnderline":$e(n,ra,"underline");break;case"historyUndo":$e(n,ib,void 0);break;case"historyRedo":$e(n,ob,void 0)}return!0}function Xre(e){const t=Wt(),r=t._inputState,n=xe(),i=e.data,o=d4(e);let a=!1;if(i!=null&&ue(n)){const s=Si(Gi(t)),l=s!==null?Oo(s,t._rootElement):null,c=e.inputType==="insertCompositionText"&&r.compositionPhase!=="ending-firefox"&&!t.isComposing();c&&(r.hadOrphanedCompositionEvents=!0);const d=n.anchor.getNode(),f=e.inputType==="insertCompositionText"&&r.compositionPhase!=="ending-firefox"&&t.isComposing()&&fe(d)&&eo(d);if(!c&&!f&&u4(n,o,i,e.timeStamp,!1,l)){if(a=!0,r.compositionPhase==="ending-firefox"){const b=D0(t,i);if(r.compositionPhase="idle",b)return Vu(ip),U$(),!0}const h=n.anchor.getNode();if(s===null||l===null)return!0;const p=n.isBackward(),m=p?n.anchor.offset:n.focus.offset,g=p?n.focus.offset:n.anchor.offset;Td&&!n.isCollapsed()&&fe(h)&&l.anchorNode!==null&&h.getTextContent().slice(0,m)+i+h.getTextContent().slice(m+g)===X4(l.anchorNode)||$e(t,fd,i);const v=i.length;Ol&&v>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=v,n._cachedNodes=null,n._cachedIsBackward=null),R0&&t.isComposing()&&(r.lastKeyDownTimeStamp=0,An(null))}}return a||(vE(!1,t,i!==null?i:void 0),r.compositionPhase==="ending-firefox"&&(D0(t,i||void 0),Vu(ip),r.compositionPhase="idle")),U$(),!0}function Zre(e){const t=Wt(),r=t._inputState,n=xe();if(ue(n)&&!t.isComposing()){r.compositionPhase="composing",r.hadOrphanedCompositionEvents=!1;const i=n.anchor,o=n.anchor.getNode();if(An(i.key),Vu(y4),e.timeStamp<r.lastKeyDownTimeStamp+30||i.type==="element"||!n.isCollapsed()||!R0&&(o.getFormat()!==n.format||fe(o)&&o.getStyle()!==n.style)||fe(o)&&(eo(o)||i.offset===0&&!o.canInsertTextBefore()||i.offset===o.getTextContentSize()&&!o.canInsertTextAfter())){$e(t,fd,tE);const a=xe();ue(a)&&An(a.anchor.key)}}return!0}function ene(e){const t=Wt();return t._inputState.compositionPhase="idle",D0(t,e.data),Vu(ip),!0}function Jg(e){if(e===null)return;const t=mr(e);if(!fe(t)||t.getType()==="text"||eo(t)||!t.isAttached())return;const r=xe(),n=ue(r)&&r.anchor.key===e?r.anchor.offset:null,i=Pr(t.getTextContent());if(i.setFormat(t.getFormat()),i.setStyle(t.getStyle()),t.replace(i),n!==null){const o=Math.min(n,i.getTextContentSize());i.select(o,o)}}function D0(e,t){const r=e._compositionKey;if(An(null),r!==null&&t!=null){if(t===""){const i=mr(r),o=e.getElementByKey(r),a=o!==null&&fe(i)?Tl(i,o,e):null;if(a!==null&&a.nodeValue!==null&&fe(i)){const s=Si(Gi(e)),l=s&&Oo(s,e._rootElement);let c=null,d=null;l!==null&&l.anchorNode===a&&(c=l.anchorOffset,d=l.focusOffset),bE(i,a.nodeValue,c,d,!0)}return Jg(r),!1}if(t[t.length-1]===`
|
|
23
|
+
`){const i=xe();if(ue(i)||fr(i)){if(ue(i)){const o=i.focus;i.anchor.set(o.key,o.offset,o.type)}return $e(e,rp,null),Jg(r),!1}}const n=mr(r);if(n!==null&&fe(n)&&eo(n)){n.markDirty();const i=xe(),o=n.getTextContentSize(),a=ue(i)&&i.anchor.key===r?i.anchor.offset:o;return n.select(a,a).insertText(t),!0}}return vE(!0,e,t),Jg(r),!1}function tne(e){const t=Wt(),r=t._inputState;if(e.key==null)return!0;if(r.compositionPhase==="ending-safari"){const n=j$(e);if(n&&Ao(t,()=>{D0(t,r.compositionEndData)}),r.compositionPhase="idle",r.compositionEndData="",n)return!0}if((function(n){return sr(n,"ArrowRight",{shiftKey:"any"})})(e))$e(t,J6,e);else if((function(n){return sr(n,"ArrowRight",{...ds,shiftKey:"any"})})(e))$e(t,Q6,e);else if((function(n){return sr(n,"ArrowLeft",{shiftKey:"any"})})(e))$e(t,Y6,e);else if((function(n){return sr(n,"ArrowLeft",{...ds,shiftKey:"any"})})(e))$e(t,X6,e);else if((function(n){return sr(n,"ArrowUp",{altKey:"any",shiftKey:"any"})})(e))$e(t,Z6,e);else if((function(n){return sr(n,"ArrowDown",{altKey:"any",shiftKey:"any"})})(e))$e(t,e4,e);else if((function(n){return sr(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})})(e))r.isInsertLineBreak=!0,$e(t,rp,e);else if((function(n){return n.key===" "})(e))$e(t,t4,e);else if((function(n){return Yo&&sr(n,"o",{ctrlKey:!0})})(e))e.preventDefault(),r.isInsertLineBreak=!0,$e(t,dd,!0);else if((function(n){return sr(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})})(e))r.isInsertLineBreak=!1,$e(t,rp,e);else if((function(n){return sr(n,"Backspace",{shiftKey:"any"})||Yo&&sr(n,"h",{ctrlKey:!0})})(e))j$(e)?$e(t,iE,e)&&p$(r):(e.preventDefault(),$e(t,Eu,!0));else if((function(n){return n.key==="Escape"})(e))$e(t,r4,e);else if((function(n){return sr(n,"Delete",{})||Yo&&sr(n,"d",{ctrlKey:!0})})(e))(function(n){return n.key==="Delete"})(e)?$e(t,n4,e):(e.preventDefault(),$e(t,Eu,!1));else if((function(n){return sr(n,"Backspace",B$)})(e))e.preventDefault(),$e(t,ep,!0);else if((function(n){return sr(n,"Delete",B$)})(e))e.preventDefault(),$e(t,ep,!1);else if((function(n){return Yo&&sr(n,"Backspace",{metaKey:!0})})(e))e.preventDefault(),$e(t,tp,!0);else if((function(n){return Yo&&(sr(n,"Delete",{metaKey:!0})||sr(n,"k",{ctrlKey:!0}))})(e))e.preventDefault(),$e(t,tp,!1);else if((function(n){return sr(n,"b",ds)})(e))e.preventDefault(),$e(t,ra,"bold");else if((function(n){return sr(n,"u",ds)})(e))e.preventDefault(),$e(t,ra,"underline");else if((function(n){return sr(n,"i",ds)})(e))e.preventDefault(),$e(t,ra,"italic");else if((function(n){return sr(n,"Tab",{shiftKey:"any"})})(e))$e(t,i4,e);else if((function(n){return sr(n,"z",ds)})(e))e.preventDefault(),$e(t,ib,void 0);else if((function(n){return Yo?sr(n,"z",{metaKey:!0,shiftKey:!0}):sr(n,"y",{ctrlKey:!0})||sr(n,"z",{ctrlKey:!0,shiftKey:!0})})(e))e.preventDefault(),$e(t,ob,void 0);else{const n=t._editorState._selection;(function(i){return sr(i,"a",ds)})(e)?(e.preventDefault(),$e(t,l4,e)&&p$(r)):n===null||ue(n)||((function(i){return sr(i,"c",ds)})(e)?(e.preventDefault(),$e(t,ab,e)):(function(i){return sr(i,"x",ds)})(e)&&(e.preventDefault(),$e(t,oE,e)))}return(function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey})(e)&&t.dispatchCommand(Hre,e),!0}function h4(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const hd=new Map;function m$(e){const t=zne(e.target);if(t===null)return;const r=yE(e.target);let n=null,i=null;const o=r!==null?N0.get(r):void 0;if(r!==null){if(o!==void 0){const f=o.editors;let h=o.hasShadowEditor;if(h===void 0){h=!1;for(const p of f)if(p._rootElement!==null&&Ms(p._rootElement.getRootNode())){h=!0;break}o.hasShadowEditor=h}if(h){let p=null,m=null;for(const g of f){const v=g._rootElement;if(v===null)continue;const b=Oo(t,v).anchorNode;if(b!==null&&md(b)===g){if(Ms(v.getRootNode())){n=g,i=b;break}p===null&&(p=g,m=b)}}n===null&&p!==null&&(n=p,i=m)}else{const p=t.anchorNode;p===null||it(p)&&p.shadowRoot!==null||(n=md(p),n!==null&&(i=p))}}if(n===null){const f=ap(r);n=f!==null?md(f):null}}if(n===null)return;if(n._inputState.isSelectionChangeFromMouseDown){if(o!==void 0)for(const f of o.editors)f._inputState.isSelectionChangeFromMouseDown=!1;Ao(n,()=>{const f=ef(),h=i??Oo(t,n._rootElement).anchorNode;(it(h)||Vi(h))&&In(lE(f,t,n,e))})}const a=gE(n),s=a[a.length-1],l=s._key,c=hd.get(l),d=c||s;d!==n&&f$(t,d,!1),f$(t,n,!0),n!==s?hd.set(l,n):c&&hd.delete(l)}function g$(e){e._lexicalHandled=!0}function v$(e){return e._lexicalHandled===!0}function rne(e){const t=Fx.get(e);if(t===void 0)return;const r=N0.get(t);if(r===void 0)return;Fx.delete(e);const n=Jp(e);ub(n)?((function(o){if(o._parentEditor!==null){const a=gE(o),s=a[a.length-1]._key;hd.get(s)===o&&hd.delete(s)}else hd.delete(o._key)})(n),r.editors.delete(n),r.hasShadowEditor=void 0,e.__lexicalEditor=null):n&&ae(198);const i=h4(e);for(let o=0;o<i.length;o++)i[o]();e.__lexicalEventHandles=[]}function Ix(e,t,r){Rn();const n=e.__key,i=e.getParent();if(i===null)return void(Wn(e)!==null&&ae(367,n,String(Wn(e))));const o=(function(s){const l=xe();if(!ue(l)||!H(s))return l;const{anchor:c,focus:d}=l,f=c.getNode(),h=d.getNode();return Pd(f,s)&&c.set(s.__key,0,"element"),Pd(h,s)&&d.set(s.__key,0,"element"),l})(e);let a=!1;if(ue(o)&&t){const s=o.anchor,l=o.focus;s.key===n&&(M0(s,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0),l.key===n&&(M0(l,e,i,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else fr(o)&&t&&e.isSelected()&&e.selectPrevious();if(ue(o)&&t&&!a){const s=e.getIndexWithinParent();ws(e),gu(o,i,s,-1)}else ws(e);r||br(i)||i.canBeEmpty()||!i.isEmpty()||Ix(i,t),t&&o&&Mr(i)&&i.isEmpty()&&i.selectEnd()}const p4=Symbol.for("ephemeral");function F0(e){return e[p4]||!1}const b$={configurable:!0,enumerable:!1,value:void 0,writable:!0};class oo{__type;__key;__parent;__prev;__next;__state;[Jh];static getType(){const{ownNodeType:t}=SE(this);return t===void 0&&ae(64,this.name),t}static clone(t){ae(65,this.name)}$config(){return{}}config(t,r){const n=r.extends||uL(this.constructor);return Object.assign(r,{extends:n}),typeof t=="string"&&Object.assign(r,{type:t}),{[t]:r}}afterCloneFrom(t){this.__key===t.__key?(this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state):t.__state&&(this.__state=t.__state.getWritable(this))}resetOnCopyNodeFrom(t){this.__state&&(this.__state=this.__state.getWritable(this).resetOnCopyNode())}static importDOM;constructor(t){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",b$),Object.defineProperty(this,Jh,b$),K4(this,t)}getType(){return this.__type}isInline(){ae(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const r=mr(t);if(r===null)break;t=r.__parent!==null?r.__parent:Wn(r)}return!1}isSelected(t){const r=t||xe();if(r==null)return!1;const n=r.getNodes().some(i=>i.__key===this.__key);if(fe(this))return n;if(ue(r)&&r.anchor.type==="element"&&r.focus.type==="element"){if(r.isCollapsed())return!1;const i=this.getParent();if(mt(this)&&this.isInline()&&i){const o=r.isBackward()?r.focus:r.anchor;if(i.is(o.getNode())&&o.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let r=t.getFirstChild(),n=0;for(;r!==null;){if(this.is(r))return n;n++,r=r.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:mr(t)}getParentOrThrow(){const t=this.getParent();return t===null&&ae(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const r=t.getParent();if(br(r)||Wn(t)!==null)return H(t)||t===this&&mt(t)||ae(194),t;t=r}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&ae(67,this.__key),t}getParents(){const t=[];let r=this.getParent();for(;r!==null;)t.push(r),r=r.getParent();return t}getParentKeys(){const t=[];let r=this.getParent();for(;r!==null;)t.push(r.__key),r=r.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:mr(t)}getPreviousSiblings(){const t=[],r=this.getParent();if(r===null)return t;let n=r.getFirstChild();for(;n!==null&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:mr(t)}getNextSiblings(){const t=[];let r=this.getNextSibling();for(;r!==null;)t.push(r),r=r.getNextSibling();return t}getCommonAncestor(t){const r=H(this)?this:this.getParent(),n=H(t)?t:t.getParent(),i=r&&n?Gx(r,n):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const r=Gx(this,t);return r!==null&&(r.type==="descendant"||(r.type==="branch"?mL(r)===-1:(r.type!=="same"&&r.type!=="ancestor"&&ae(279),!1)))}isParentOf(t){return Pd(t,this)}getNodesBetween(t){const r=this.isBefore(t),n=[],i=new Set;let o=this;for(;o!==null;){const a=o.__key;if(i.has(a)||(i.add(a),n.push(o)),o===t)break;const s=H(o)?r?o.getFirstChild():o.getLastChild():null;if(s!==null){o=s;continue}const l=r?o.getNextSibling():o.getPreviousSibling();if(l!==null){o=l;continue}const c=o.getParentOrThrow();if(i.has(c.__key)||n.push(c),c===t)break;let d=null,f=c;do{if(f===null&&ae(68),d=r?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),f===null)break;d!==null||i.has(f.__key)||n.push(f)}while(d===null);o=d}return r||n.reverse(),n}isDirty(){const t=Wt()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){if(F0(this))return this;const t=mr(this.__key);return t===null&&ae(113),t}getWritable(){if(F0(this))return this;Rn();const t=Gs(),r=Wt(),n=t._nodeMap,i=this.__key,o=this.getLatest(),a=r._cloneNotNeeded,s=xe();if(s!==null&&s.setCachedNodes(null),a.has(i))return q0(o),o;const l=aL(o);return a.add(i),q0(l),n.set(i,l),l}getTextContent(){return dL(this)}getTextContentSize(){return this.getTextContent().length}createDOM(t,r){ae(70)}updateDOM(t,r,n){ae(71)}getDOMSlot(t){return new w6(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){ae(18,this.name)}updateFromJSON(t){return(function(r,n){const i=r.getWritable(),o=n.$;let a=o;for(const s of F6(i).flatKeys)s in n&&(a!==void 0&&a!==o||(a={...o}),a[s]=n[s]);return(i.__state||a)&&D6(r).updateFromJSON(a),i})(this,t)}static transform(){return null}remove(t){Ix(this,!0,t)}replace(t,r){Rn();let n=xe();n!==null&&(n=n.clone()),ny(this,t);const i=this.getLatest(),o=this.__key,a=t.__key,s=t.getWritable(),l=this.getParentOrThrow().getWritable(),c=l.__size,d=s.getParent(),f=d!==null?s.getIndexWithinParent():-1;ws(s),d!==null&&ue(n)&&gu(n,d,f,-1);const h=i.getPreviousSibling(),p=i.getNextSibling(),m=i.__prev,g=i.__next,v=i.__parent;Ix(i,!1,!0),h===null?l.__first=a:h.getWritable().__next=a,s.__prev=m,p===null?l.__last=a:p.getWritable().__prev=a,s.__next=g,s.__parent=v,l.__size=c;let b=0;r&&(H(this)&&H(s)||ae(139),b=s.getChildrenSize(),s.splice(b,0,this.getChildren()));const y=$o(this);if(y.length>0){Rs(this)&&Rs(s)||ae(368,this.__key,s.__key);for(const S of y){const w=Ku(this,S);w!==null&&(nie(this,S),fL(s,S,w))}}if(ue(n)){In(n);const S=n.anchor,w=n.focus;S.key===o&&(r&&S.type==="element"?S.set(s.__key,b+S.offset,"element"):S$(S,s)),w.key===o&&(r&&w.type==="element"?w.set(s.__key,b+w.offset,"element"):S$(w,s))}return Es()===o&&An(a),s}insertAfter(t,r=!0){Rn(),ny(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.getParent(),a=xe();let s=!1,l=!1;if(o!==null){const p=t.getIndexWithinParent();if(ue(a)){const m=o.__key,g=a.anchor,v=a.focus;s=g.type==="element"&&g.key===m&&g.offset===p+1,l=v.type==="element"&&v.key===m&&v.offset===p+1}ws(i),r&&ue(a)&&gu(a,o,p,-1)}else ws(i);const c=this.getNextSibling(),d=this.getParentOrThrow().getWritable(),f=i.__key,h=n.__next;if(c===null?d.__last=f:c.getWritable().__prev=f,d.__size++,n.__next=f,i.__next=h,i.__prev=n.__key,i.__parent=n.__parent,r&&ue(a)){const p=this.getIndexWithinParent();gu(a,d,p+1);const m=d.__key;s&&a.anchor.set(m,p+2,"element"),l&&a.focus.set(m,p+2,"element")}return t}insertBefore(t,r=!0){Rn(),ny(this,t);const n=this.getWritable(),i=t.getWritable();this.getParentOrThrow();const o=i.__key,a=xe(),s=i.getParent(),l=s!==null?i.getIndexWithinParent():-1;ws(i),s!==null&&r&&ue(a)&&gu(a,s,l,-1);const c=this.getPreviousSibling(),d=this.getParentOrThrow().getWritable(),f=n.__prev,h=this.getIndexWithinParent();return c===null?d.__first=o:c.getWritable().__next=o,d.__size++,n.__prev=o,i.__prev=f,i.__next=n.__key,i.__parent=n.__parent,r&&ue(a)&&gu(a,this.getParentOrThrow(),h),t}isParentRequired(){return!1}createParentElementNode(){return Xt()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,r){Rn();const n=na(this);if(n!==null)return n.selectPrevious(t,r);const i=this.getPreviousSibling(),o=this.getParentOrThrow();if(i===null)return o.select(0,0);if(H(i))return i.select();if(!fe(i)){const a=i.getIndexWithinParent()+1;return o.select(a,a)}return i.select(t,r)}selectNext(t,r){Rn();const n=na(this);if(n!==null)return n.selectNext(t,r);const i=this.getNextSibling(),o=this.getParentOrThrow();if(i===null)return o.select();if(H(i))return i.select(0,0);if(!fe(i)){const a=i.getIndexWithinParent();return o.select(a,a)}return i.select(t,r)}markDirty(){this.getWritable()}reconcileObservedMutation(t,r){this.markDirty()}}function m4(e){return e instanceof oo}const I0="historic",g4="history-push",bh="history-merge",v4="paste",b4="cut",_4="collaboration",nne="skip-scroll-into-view",ine="skip-dom-selection",Px="skip-selection-focus",y4="composition-start",ip="composition-end",one="!important";function P0(e){const t={};if(!e)return t;let r="",n="",i=null,o=!1,a=!1,s=!1,l=0;const c=e.length;let d=-1;for(let p=0;p<c;p++){const m=e[p];if(o)m==="*"&&e[p+1]==="/"&&(o=!1,p++);else if(a)d===-1&&(d=p),a=!1;else if(i===null)if(m!=="/"||e[p+1]!=="*")if(m!=='"'&&m!=="'")if(m!=="(")if(m!==")")if(s||m!==":"||l!==0){if(m===";"&&l===0){d!==-1&&(s?n+=e.slice(d,p):r+=e.slice(d,p),d=-1);const g=r.trim(),v=n.trim();g!==""&&v!==""&&(t[g]=v),r="",n="",s=!1;continue}d===-1&&(d=p)}else d!==-1&&(r+=e.slice(d,p),d=-1),s=!0;else d===-1&&(d=p),l=Math.max(0,l-1);else d===-1&&(d=p),l++;else d===-1&&(d=p),i=m;else d!==-1&&(s?n+=e.slice(d,p):r+=e.slice(d,p),d=-1),o=!0,p++;else d===-1&&(d=p),m==="\\"?a=!0:m===i&&(i=null)}d!==-1&&(s?n+=e.slice(d,c):r+=e.slice(d,c));const f=r.trim(),h=n.trim();return f!==""&&h!==""&&(t[f]=h),t}function ane(e,t,r){const n=r.trimEnd(),i=n.length-10;i>=0&&n.slice(i).toLowerCase()===one?e.setProperty(t,n.slice(0,i).trim(),"important"):e.setProperty(t,r,"")}function pd(e,t,r=""){if(t===r)return;const n=P0(r),i=P0(t);for(const o in i)delete n[o],ane(e,o,i[o]);for(const o in n)e.removeProperty(o)}function J_(e,t){return 16&t?"code":t&eE?"mark":32&t?"sub":64&t?"sup":null}function Q_(e,t){return 1&t?"strong":2&t?"em":"span"}function x4(e,t,r,n,i){const o=n.classList;let a=gd(i,"base");a!==void 0&&o.add(...a),a=gd(i,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;a!==void 0&&(8&r&&4&r?(s=!0,l||o.add(...a)):l&&o.remove(...a));for(const c in Os){const d=Os[c];if(a=gd(i,c),a!==void 0)if(r&d){if(s&&(c==="underline"||c==="strikethrough")){t&d&&o.remove(...a);continue}((t&d)===0||l&&c==="underline"||c==="strikethrough")&&o.add(...a)}else t&d&&o.remove(...a)}}function S4(e,t,r){const n=r.isComposing(),i=e+(n?Wh:""),o=Fr(),a=db(o).$getDOMSlot(r,t,o),s=a.getFirstChild();if(s===null||s.nodeType!==Node.TEXT_NODE)return void a.insertChild(gr().createTextNode(i));const l=s,c=l.nodeValue;if(c!==i)if(n||Ol){const[d,f,h]=(function(p,m){const g=p.length,v=m.length;let b=0,y=0;for(;b<g&&b<v&&p[b]===m[b];)b++;for(;y+b<g&&y+b<v&&p[g-y-1]===m[v-y-1];)y++;return[b,g-b-y,m.slice(b,v-y)]})(c,i);f!==0&&l.deleteData(d,f),l.insertData(d,h)}else l.nodeValue=i}function _$(e,t,r,n,i,o){S4(i,e,t);const a=o.theme.text;a!==void 0&&x4(0,0,n,e,a)}function jm(e,t){const r=gr().createElement(t);return r.appendChild(e),r}function Ox(e){return e!=null&&e.__isInlineFormattable===!0}class Vs extends oo{__text;__format;__style;__mode;__detail;get __isInlineFormattable(){return!0}static getType(){return"text"}static clone(t){return new Vs(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",r){super(r),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return wre[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Es()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const r=Os[t];return(this.getFormat()&r)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,r){return ju(this.getLatest().__format,t,r)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,r){const n=this.__format,i=J_(0,n),o=Q_(0,n),a=i===null?o:i,s=gr().createElement(a);let l=s;this.hasFormat("code")&&s.setAttribute("spellcheck","false"),i!==null&&(l=gr().createElement(o),s.appendChild(l)),_$(l,this,0,n,this.__text,t);const c=this.__style;return c!==""&&pd(s.style,c),s}updateDOM(t,r,n){const i=this.__text,o=t.__format,a=this.__format,s=J_(0,o),l=J_(0,a),c=Q_(0,o),d=Q_(0,a);if((s===null?c:s)!==(l===null?d:l))return!0;if(s===l&&c!==d){const g=r.firstChild;g==null&&ae(48);const v=gr().createElement(d);return _$(v,this,0,a,i,n),r.replaceChild(v,g),!1}let f=r;l!==null&&s!==null&&(f=r.firstChild,f==null&&ae(49)),S4(i,f,this);const h=n.theme.text;h!==void 0&&o!==a&&x4(0,o,a,f,h);const p=t.__style,m=this.__style;return p!==m&&pd(r.style,m,p),!1}static importDOM(){return{"#text":()=>({conversion:cne,priority:0}),b:()=>({conversion:lne,priority:0}),code:()=>({conversion:cs,priority:0}),em:()=>({conversion:cs,priority:0}),i:()=>({conversion:cs,priority:0}),mark:()=>({conversion:cs,priority:0}),s:()=>({conversion:cs,priority:0}),span:()=>({conversion:sne,priority:0}),strong:()=>({conversion:cs,priority:0}),sub:()=>({conversion:cs,priority:0}),sup:()=>({conversion:cs,priority:0}),u:()=>({conversion:cs,priority:0})}}static importJSON(t){return Pr().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:r}=super.exportDOM(t);return it(r)||ae(132),r.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?r.style.textTransform="lowercase":this.hasFormat("uppercase")?r.style.textTransform="uppercase":this.hasFormat("capitalize")&&(r.style.textTransform="capitalize"),this.hasFormat("bold")&&(r=jm(r,"b")),this.hasFormat("italic")&&(r=jm(r,"i")),this.hasFormat("strikethrough")&&(r=jm(r,"s")),this.hasFormat("underline")&&(r=jm(r,"u")),{element:r}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,r){}setFormat(t){const r=this.getWritable();return r.__format=typeof t=="string"?Os[t]:t,r}setDetail(t){const r=this.getWritable();return r.__detail=typeof t=="string"?yre[t]:t,r}setStyle(t){const r=this.getWritable();return r.__style=t,r}toggleFormat(t){const r=ju(this.getFormat(),t,null);return this.setFormat(r)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const r=Sre[t];if(this.__mode===r)return this;const n=this.getWritable();return n.__mode=r,n}setTextContent(t){if(this.__text===t)return this;const r=this.getWritable();return r.__text=t,r}select(t,r){Rn();let n=t,i=r;const o=xe(),a=this.getTextContent(),s=this.__key;if(typeof a=="string"){const l=a.length;n===void 0&&(n=l),i===void 0&&(i=l)}else n=0,i=0;if(!ue(o))return F4(s,n,s,i,"text","text");{const l=Es();l!==o.anchor.key&&l!==o.focus.key||An(s),o.setTextNodeRange(this,n,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,r,n,i){const o=this.getWritable(),a=o.__text,s=n.length;let l=t;l<0&&(l=s+l,l<0&&(l=0));const c=xe();if(i&&ue(c)){const f=t+s;c.setTextNodeRange(o,f,o,f)}const d=a.slice(0,l)+n+a.slice(l+r);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){Rn();const r=this.getLatest(),n=r.getTextContent();if(n==="")return[];const i=r.__key,o=Es(),a=n.length;t.sort((R,N)=>R-N),t.push(a);const s=[],l=t.length;for(let R=0,N=0;R<a&&N<=l;N++){const I=t[N];I>R&&(s.push(n.slice(R,I)),R=I)}const c=s.length;if(c===1)return[r];const d=s[0],f=r.getParent();let h;const p=r.getFormat(),m=r.getStyle(),g=r.__detail;let v=!1,b=null,y=null;const S=xe();if(ue(S)){const[R,N]=S.isBackward()?[S.focus,S.anchor]:[S.anchor,S.focus];R.type==="text"&&R.key===i&&(b=R),N.type==="text"&&N.key===i&&(y=N)}r.isSegmented()?(h=Pr(d),h.__format=p,h.__style=m,h.__detail=g,h.__state=e$(r,h),v=!0):h=r.setTextContent(d);const w=[h];for(let R=1;R<c;R++){const N=Pr(s[R]);N.__format=p,N.__style=m,N.__detail=g,N.__state=e$(r,N);const I=N.__key;o===i&&An(I),w.push(N)}const C=b?b.offset:null,A=y?y.offset:null;let T=0;for(const R of w){if(!b&&!y)break;const N=T+R.getTextContentSize();if(b!==null&&C!==null&&C<=N&&C>=T&&(b.set(R.getKey(),C-T,"text"),C<N&&(b=null)),y!==null&&A!==null&&A<=N&&A>=T){y.set(R.getKey(),A-T,"text");break}T=N}if(f!==null){(function(I){const M=I.getPreviousSibling(),P=I.getNextSibling();M!==null&&q0(M),P!==null&&q0(P)})(this);const R=f.getWritable(),N=this.getIndexWithinParent();v?(R.splice(N,0,w),this.remove()):R.splice(N,1,w),ue(S)&&gu(S,f,N,c-1)}return w}mergeWithSibling(t){const r=t===this.getPreviousSibling();r||t===this.getNextSibling()||ae(50);const n=this.__key,i=t.__key,o=this.__text,a=o.length;Es()===i&&An(n);const s=xe();if(ue(s)){const f=s.anchor,h=s.focus;f!==null&&f.key===i&&$$(f,r,n,t,a),h!==null&&h.key===i&&$$(h,r,n,t,a)}const l=t.__text,c=r?l+o:o+l;this.setTextContent(c);const d=this.getWritable();return t.remove(),d}isTextEntity(){return!1}}function sne(e){return{forChild:aE(e.style),node:null}}function lne(e){const t=e,r=t.style.fontWeight==="normal";return{forChild:aE(t.style,r?void 0:"bold"),node:null}}const y$=new WeakMap;function une(e){if(!it(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function cne(e){const t=e;e.parentElement===null&&ae(129);let r=t.textContent||"";if((function(n){let i,o=n.parentNode;const a=[n];for(;o!==null&&(i=y$.get(o))===void 0&&!une(o);)a.push(o),o=o.parentNode;const s=i===void 0?o:i;for(let l=0;l<a.length;l++)y$.set(a[l],s);return s})(t)!==null)return{node:op(r)};if(r=r.replace(/\r/g,"").replace(/[ \t\n]+/g," "),r==="")return{node:null};if(r[0]===" "){let n=t,i=!0;for(;n!==null&&(n=x$(n,!1))!==null;){const o=n.textContent||"";if(o.length>0){/[ \t\n]$/.test(o)&&(r=r.slice(1)),i=!1;break}}i&&(r=r.slice(1))}if(r[r.length-1]===" "){let n=t,i=!0;for(;n!==null&&(n=x$(n,!0))!==null;)if((n.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(r=r.slice(0,r.length-1))}return r===""?{node:null}:{node:Pr(r)}}function x$(e,t){let r=e;for(;;){let n;for(;(n=t?r.nextSibling:r.previousSibling)===null;){const o=r.parentElement;if(o===null)return null;r=o}if(r=n,it(r)){const o=r.style.display;if(o===""&&!G0(r)||o!==""&&!o.startsWith("inline"))return null}let i=r;for(;(i=t?r.firstChild:r.lastChild)!==null;)r=i;if(Vi(r))return r;if(r.nodeName==="BR")return null}}const dne={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function cs(e){const t=dne[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:aE(e.style,t),node:null}}function Pr(e=""){return ya(new Vs(e))}function fe(e){return e instanceof Vs}function aE(e,t){const r=e.fontWeight,n=e.textDecoration.split(" "),i=r==="700"||r==="bold",o=n.includes("line-through"),a=e.fontStyle==="italic",s=n.includes("underline"),l=e.verticalAlign;return c=>((fe(c)||Ox(c))&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),o&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),a&&!c.hasFormat("italic")&&c.toggleFormat("italic"),s&&!c.hasFormat("underline")&&c.toggleFormat("underline"),l!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),l!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),t&&!c.hasFormat(t)&&c.toggleFormat(t)),c)}class Xd extends Vs{static getType(){return"tab"}static clone(t){return new Xd(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const r=super.createDOM(t),n=gd(t.theme,"tab");return n!==void 0&&r.classList.add(...n),r}static importJSON(t){return Zd().updateFromJSON(t)}setTextContent(t){return super.setTextContent(" ")}spliceText(t,r,n,i){return n===""&&r===0||n===" "&&r===1||ae(286),this}setDetail(t){return t!==2&&ae(127),this}setMode(t){return t!=="normal"&&ae(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Zd(){return ya(new Xd)}function Bu(e){return e instanceof Xd}class fne{key;offset;type;_selection;constructor(t,r,n){this._selection=null,this.key=t,this.offset=r,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:lp(to(Oi(this,"next")),to(Oi(t,"next")))<0}getNode(){const t=mr(this.key);return t===null&&ae(20),t}set(t,r,n,i){const o=this._selection,a=this.key;i&&this.key===t&&this.offset===r&&this.type===n||(this.key=t,this.offset=r,this.type=n,Dd()||(Es()===a&&An(t),o!==null&&(o.setCachedNodes(null),ue(o)&&(o._cachedIsBackward=null),o.dirty=!0)))}}function Ha(e,t,r){return new fne(e,t,r)}function Y_(e,t){let r=t.__key,n=e.offset,i="element";if(fe(t)){i="text";const o=t.getTextContentSize();n>o&&(n=o)}else if(!H(t)){const o=t.getNextSibling();if(fe(o))r=o.__key,n=0,i="text";else{const a=t.getParent();a&&(r=a.__key,n=t.getIndexWithinParent()+1)}}e.set(r,n,i)}function S$(e,t){if(H(t)){const r=t.getLastDescendant();H(r)||fe(r)?Y_(e,r):Y_(e,t)}else Y_(e,t)}class sb{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!fr(t))return!1;const r=this._nodes,n=t._nodes;return r.size===n.size&&Array.from(r).every(i=>n.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new sb(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const r=this.getNodes().filter(a=>Wn(a)===null),n=r.length;if(n===0)return;const i=r[n-1];let o;if(fe(i))o=i.select();else{const a=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(a,a)}o.insertNodes(t);for(let a=0;a<n;a++)r[a].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=this._nodes,n=[];for(const i of r){const o=mr(i);o!==null&&n.push(o)}return Dd()||(this._cachedNodes=n),n}getTextContent(){const t=this.getNodes();let r="";for(let n=0;n<t.length;n++)r+=t[n].getTextContent();return r}deleteNodes(){const t=this.getNodes().filter(r=>Wn(r)===null);if((xe()||ef())===this&&t[0]){const r=Ht(t[0],"next");up(aa(r,r))}for(const r of t)r.remove();w4()}}function w4(){const e=un();if(e.isEmpty()){const t=Xt();e.append(t),t.select()}}function ue(e){return e instanceof ic}class ic{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,r,n,i){this.anchor=t,this.focus=r,t._selection=this,r._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!ue(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const r=(function(n){const i=[],[o,a]=n.getTextSlices();o&&i.push(o.caret.origin);const s=new Set,l=new Set;for(const c of n)if(No(c)){const{origin:d}=c;i.length===0?s.add(d):(l.add(d),i.push(d))}else{const{origin:d}=c;H(d)&&l.has(d)||i.push(d)}if(a&&i.push(a.caret.origin),Ll(n.focus)&&H(n.focus.origin)&&n.focus.getNodeAtCaret()===null)for(let c=Lo(n.focus.origin,"previous");No(c)&&s.has(c.origin)&&!c.origin.isEmpty()&&c.origin.is(i[i.length-1]);c=CE(c))s.delete(c.origin),i.pop();for(;i.length>1;){const c=i[i.length-1];if(!H(c)||l.has(c)||c.isEmpty()||s.has(c))break;i.pop()}if(i.length===0&&n.isCollapsed()){const c=to(n.anchor),d=to(n.anchor.getFlipped()),f=p=>To(p)?p.origin:p.getNodeAtCaret(),h=f(c)||f(d)||(n.anchor.getNodeAtCaret()?c.origin:d.origin);i.push(h)}return i})($E(Kx(this),"next"));return Dd()||(this._cachedNodes=r),r}setTextNodeRange(t,r,n,i){return this.anchor.set(t.__key,r,"text"),this.focus.set(n.__key,i,"text"),this}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const r=t[0],n=t[t.length-1],i=this.anchor,o=this.focus,a=i.isBefore(o),[s,l]=Mx(this);let c="",d=!0;for(let f=0;f<t.length;f++){const h=t[f];if(H(h)&&!h.isInline()){d||(c+=`
|
|
24
|
+
`);let p="";for(const m of $o(h)){const g=Ku(h,m);g!==null&&(p+=g.getTextContent())}p!==""?(c+=p,d=!1):d=!h.isEmpty()}else if(d=!1,fe(h)){let p=h.getTextContent();h===r?h===n?i.type==="element"&&o.type==="element"&&o.offset!==i.offset||(p=s<l?p.slice(s,l):p.slice(l,s)):p=a?p.slice(s):p.slice(l):h===n&&(p=a?p.slice(0,l):p.slice(0,s)),c+=p}else!mt(h)&&!_i(h)||h===n&&this.isCollapsed()||(c+=h.getTextContent())}return c}applyDOMRange(t){const r=Wt(),n=r.getEditorState()._selection,i=D4(t.startContainer,t.startOffset,t.endContainer,t.endOffset,r,n);if(i===null)return;const[o,a,s]=i;this.anchor.set(o.key,o.offset,o.type,!0),this.focus.set(a.key,a.offset,a.type,!0),s&&(this.dirty=!0),yl(this)}clone(){const t=this.anchor,r=this.focus;return new ic(Ha(t.key,t.offset,t.type),Ha(r.key,r.offset,r.type),this.format,this.style)}toggleFormat(t){this.format=ju(this.format,t,null),this.dirty=!0}setFormat(t){this.format=t,this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const r=Os[t];return(this.format&r)!==0}insertRawText(t){this.insertNodes(op(t))}insertText(t){const r=this.anchor,n=this.focus,i=this.format,o=this.style;let a=r,s=n;!this.isCollapsed()&&n.isBefore(r)&&(a=n,s=r),a.type==="element"&&(function(v,b,y,S){const w=v.getNode(),C=w.getChildAtIndex(v.offset),A=Pr();if(A.setFormat(y),A.setStyle(S),of(C))C.splice(0,0,[A]);else if(C!==null){const T=br(w)?Xt().append(A):A;C.insertBefore(T)}else if(br(w)){const T=w.getLastChild();H(T)&&!T.isInline()&&T.isEmpty()?T.append(A):w.append(Xt().append(A))}else w.append(A);v.is(b)&&b.set(A.__key,0,"text"),v.set(A.__key,0,"text")})(a,s,i,o),s.type==="element"&&Ju(s,to(Oi(s,"next")));const l=a.offset;let c=s.offset;const d=this.getNodes(),f=d.length;let h=d[0];fe(h)||ae(26);const p=h.getTextContent().length,m=h.getParentOrThrow();let g=d[f-1];if(f===1&&s.type==="element"&&(c=p,s.set(a.key,c,"text")),this.isCollapsed()&&l===p&&(eo(h)||!h.canInsertTextAfter()||!m.canInsertTextAfter()&&h.getNextSibling()===null)){const v=h.getNextSibling();let b;if(fe(v)&&v.canInsertTextBefore()&&!eo(v)?b=v:(b=Pr(),b.setFormat(i),b.setStyle(o),m.canInsertTextAfter()?h.insertAfter(b):m.insertAfter(b)),b.select(0,0),h=b,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(eo(h)||!h.canInsertTextBefore()||!m.canInsertTextBefore()&&h.getPreviousSibling()===null)){const v=h.getPreviousSibling();let b;if(!fe(v)||eo(v)?(b=Pr(),b.setFormat(i),m.canInsertTextBefore()?h.insertBefore(b):m.insertBefore(b)):b=v,b.select(),h=b,t!=="")return void this.insertText(t)}else if(h.isSegmented()&&l!==p)if(Es()!==null)h=h.setMode("normal").setFormat(i).setStyle(o);else{const v=Pr(h.getTextContent());v.setFormat(i),h.replace(v),h=v}else if(!this.isCollapsed()&&t!==""){const v=g.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||H(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),$4(this.anchor,this.focus),void this.insertText(t)}if(f===1){if(ku(h)){const S=Pr(t);return S.select(),void h.replace(S)}const v=h.getFormat(),b=h.getStyle();if(l!==c||v===i&&b===o){if(Bu(h)){const S=Pr(t);return S.setFormat(i),S.setStyle(o),S.select(),void h.replace(S)}}else{if(h.getTextContent()!==""){const S=Pr(t);if(S.setFormat(i),S.setStyle(o),S.select(),l===0)h.insertBefore(S,!1);else{const[w]=h.splitText(l);w.insertAfter(S,!1)}return void(S.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}h.setFormat(i),h.setStyle(o)}const y=c-l;h=h.spliceText(l,y,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=v,this.style=b,h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null))}else{const v=new Set([...h.getParentKeys(),...g.getParentKeys()]),b=H(h)?h:h.getParentOrThrow();let y=H(g)?g:g.getParentOrThrow(),S=g;if(!b.is(y)&&y.isInline())do S=y,y=y.getParentOrThrow();while(y.isInline());if(s.type==="text"&&(c!==0||g.getTextContent()==="")||s.type==="element"&&g.getIndexWithinParent()<c)if(fe(g)&&!ku(g)&&c!==g.getTextContentSize()){if(g.isSegmented()){const R=Pr(g.getTextContent());g.replace(R),g=R}Mr(s.getNode())||s.type!=="text"||(fe(g)||ae(395),g=g.spliceText(0,c,"")),v.add(g.__key)}else{const R=g.getParentOrThrow();R.canBeEmpty()||R.getChildrenSize()!==1?g.remove():R.remove()}else v.add(g.__key);const w=y.getChildren(),C=new Set(d),A=b.is(y),T=b.isInline()&&h.getNextSibling()===null?b:h;for(let R=w.length-1;R>=0;R--){const N=w[R];if(N.is(h)||H(N)&&N.isParentOf(h))break;N.isAttached()&&(!C.has(N)||N.is(S)?A||T.insertAfter(N,!1):N.remove())}if(!A){let R=y,N=null;for(;R!==null;){const I=R.getChildren(),M=I.length;(M===0||I[M-1].is(N))&&(v.delete(R.__key),N=R),R=R.getParent()}}if(ku(h))if(l===p)h.select();else{const R=Pr(t);R.select(),h.replace(R)}else h=h.spliceText(l,p-l,t,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(this.format=h.getFormat(),this.style=h.getStyle(),h.isComposing()&&(this.anchor.offset-=t.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let R=1;R<f;R++){const N=d[R],I=N.__key;v.has(I)||N.remove()}}}removeText(){const t=xe()===this;Zg(this,die(Kx(this))),t&&xe()!==this&&In(this)}formatText(t,r=null){k4(this,t,r)}insertNodes(t){if(t.length===0)return;this.isCollapsed()||this.removeText();const r=this.anchor.getNode();if(this.anchor.type==="element"&&H(r)&&Wn(r)!==null){let g=r.isShadowRoot()?r.getFirstChild()??r.append(Xt()).getFirstChild():r.getFirstChild();if(r.isShadowRoot()&&g!==null&&!H(g)){const v=Xt();g.insertBefore(v),g=v}if(g!==null){g.selectStart();const v=xe();return ue(v)||ae(369),v.insertNodes(t)}}if(this.anchor.type==="element"&&br(r)){const g=Z_(t),v=g.getLastDescendant();return r.splice(this.anchor.offset,0,g.getChildren()),void(v!==null&&v.selectEnd())}let n=(this.isBackward()?this.focus:this.anchor).getNode(),i=cr(n,qn);const o=t[t.length-1];if(H(i)&&"__language"in i){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const g=Of(this);i.splice(g,0,t),o.selectEnd()}return}if(!t.some(g=>(H(g)||mt(g))&&!g.isInline())){H(i)||ae(211,n.constructor.name,n.getType());const g=Of(this);return i.splice(g,0,t),void o.selectEnd()}if(H(i)&&Wn(i)!==null){const g=Of(this),v=zx(t);i.splice(g,0,v);const b=v[v.length-1];return void(b!==void 0?b.selectEnd():i.select(g,g))}if(i===null){const g=Z_(t),v=g.getLastDescendant();let b=Oi(this.anchor,"next");for(const y of g.getChildren())b=vL(y,b);return void(v!==null&&v.selectEnd())}if(H(i)&&!i.isParentRequired()&&!br(i.getParentOrThrow())){const g=Of(this),v=zx(t);i.splice(g,0,v);const b=v[v.length-1];return void(b!==void 0?b.selectEnd():i.select(g,g))}const a=Z_(t),s=a.getLastDescendant(),l=a.getChildren(),c=!H(i)||!i.isEmpty()?this.insertParagraph():null;c&&!i.isAttached()&&(n=this.anchor.getNode(),i=cr(n,qn));const d=l[l.length-1];let f=l[0];var h;H(h=f)&&qn(h)&&!h.isEmpty()&&H(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(H(i)||ae(211,n.constructor.name,n.getType()),i.append(...f.getChildren()),f=l[1]),f&&(i===null&&ae(212,n.constructor.name,n.getType()),(function(g,v){const b=v.getParentOrThrow().getLastChild();let y=v;const S=[v];for(;y!==b;)y.getNextSibling()||ae(140),y=y.getNextSibling(),S.push(y);let w=g;for(const C of S)w=w.insertAfter(C)})(i,f));const p=cr(s,qn);c&&H(p)&&(c.canMergeWhenEmpty()||qn(d))&&(p.append(...c.getChildren()),c.remove()),H(i)&&i.isEmpty()&&i.remove(),s.selectEnd();const m=H(i)?i.getLastChild():null;_i(m)&&p!==i&&m.remove()}insertParagraph(){const t=this.anchor.getNode();if(this.anchor.type==="element"&&br(t)){const s=Xt();return t.splice(this.anchor.offset,0,[s]),s.select(),s}const r=Of(this),n=cr(this.anchor.getNode(),qn);if(n!==null&&Wn(n)!==null)return null;H(n)||ae(213);const i=n.getChildAtIndex(r),o=i?[i,...i.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...o),a.selectStart(),a):null}insertLineBreak(t){const r=fa();if(this.insertNodes([r]),t){const n=r.getParentOrThrow(),i=r.getIndexWithinParent();n.select(i,i)}}extract(){const t=[...this.getNodes()],r=t.length;let n=t[0],i=t[r-1];const[o,a]=Mx(this),s=this.isBackward(),[l,c]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[d,f]=s?[a,o]:[o,a];if(r===0)return[];if(r===1){if(fe(n)&&!this.isCollapsed()){const h=n.splitText(d,f),p=d===0?h[0]:h[1];return p?(l.set(p.getKey(),0,"text"),c.set(p.getKey(),p.getTextContentSize(),"text"),[p]):[]}return[n]}if(fe(n)&&(d===n.getTextContentSize()?t.shift():d!==0&&([,n]=n.splitText(d),t[0]=n,l.set(n.getKey(),0,"text"))),fe(i)){const h=i.getTextContent().length;f===0?t.pop():f!==h&&([i]=i.splitText(f),t[t.length-1]=i,c.set(i.getKey(),i.getTextContentSize(),"text"))}return t}modify(t,r,n){if(z0(this,t,r,n))return;const i=t==="move",o=Wt(),a=Si(Gi(o));if(!a)return;const s=o._blockCursorElement,l=o._rootElement,c=this.focus.getNode();l===null||s===null||!H(c)||c.isInline()||c.canBeEmpty()||V0(s,o,l);const d=Id(o,this.focus.key);let f=d;if(this.focus.type==="text"&&(f=fe(c)?Tl(c,d,o):null),this.dirty){const h=Id(o,this.anchor.key);let p=h;if(this.anchor.type==="text"){const m=this.anchor.getNode();p=fe(m)?Tl(m,h,o):null}p&&f&&L0(a,p,this.anchor.offset,f,this.focus.offset)}if(n==="character"&&fe(c)&&c.isUnmergeable()&&(r?this.focus.offset===0:this.focus.offset===c.getTextContentSize())){const h=Ht(c,r?"previous":"next").getNodeAtCaret();if(fe(h)){if(!i){const p=h.getTextContentSize();return r?this.focus.set(h.__key,p-1,"text"):this.focus.set(h.__key,1,"text"),void(this.dirty=!0)}{const p=o.getElementByKey(h.getKey()),m=p?Tl(h,p,o):null;if(m){const g=r?m.length:0;L0(a,m,g,m,g)}}}}if(R4(a,t,r?"backward":"forward",n),a.rangeCount>0){const h=cb(a,o._rootElement),p=h||a.getRangeAt(0),m=this.anchor.getNode(),g=Mr(m)?m:eL(m);this.applyDOMRange(p),this.dirty=!0,!i&&(A4(this,r,g),(h?a.direction!=="backward":a.anchorNode===p.startContainer&&a.anchorOffset===p.startOffset)||C4(this))}n==="lineboundary"&&z0(this,t,r,n,"decorators")}forwardDeletion(t,r,n){if(!n&&(t.type==="element"&&H(r)&&t.offset===r.getChildrenSize()||t.type==="text"&&t.offset===r.getTextContentSize())){const i=r.getParent(),o=r.getNextSibling()||(i===null?null:i.getNextSibling());if(H(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const r=this.isCollapsed();if(this.isCollapsed()){const n=this.anchor;let i=n.getNode();if(this.forwardDeletion(n,i,t))return;const o=pb(Oi(n,t?"previous":"next"));if(o.getTextSlices().every(s=>s===null||s.distance===0)){let s={type:"initial"};for(const l of o.iterNodeCarets("shadowRoot"))if(No(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(s.type==="merge-block")break;if(H(o.anchor.origin)&&o.anchor.origin.isEmpty()){const c=to(l);Zg(this,aa(c,c)),o.anchor.origin.remove()}return}s.type!=="merge-next-block"&&s.type!=="merge-block"||(s={block:s.block,caret:l,type:"merge-block"})}}else{if(s.type==="merge-block")break;if(Ll(l)){if(H(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(o.anchor.origin))break}else s={block:l.origin,type:"merge-next-block"};continue}if(mt(l.origin)){if(!l.origin.isIsolated())if($o(l.origin).length>0){if(H(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const c=O0();c.add(l.origin.getKey()),In(c)}}else if(s.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&H(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const c=O0();c.add(l.origin.getKey()),In(c)}else l.origin.remove();return}break}}if(s.type==="merge-block"){const{caret:l,block:c}=s;return $o(c).length>0?void 0:l.origin.isEmpty()&&!c.isEmpty()&&l.origin.getParent()===c.getParent()?void l.origin.remove(!0):(Zg(this,aa(!l.origin.isEmpty()&&c.isEmpty()?lc(Ht(c,l.direction)):o.anchor,l)),this.removeText())}for(let l=n.getNode();l!==null;){if(Wn(l)!==null)return;if(H(l)&&l.isShadowRoot())break;l=l.getParent()}}const a=this.focus;if(X_(this,t,"character"),this.isCollapsed()){if(t&&n.offset===0&&E$(this,n.getNode()))return}else{const s=a.type==="text"?a.getNode():null;if(i=n.type==="text"?n.getNode():null,s!==null&&s.isSegmented()){const l=a.offset,c=s.getTextContentSize();if(s.is(i)||t&&l!==c||!t&&l!==0)return void k$(s,t,l)}else if(i!==null&&i.isSegmented()){const l=n.offset,c=i.getTextContentSize();if(i.is(s)||t&&l!==0||!t&&l!==c)return void k$(i,t,l)}(function(l,c){const d=l.anchor,f=l.focus,h=d.getNode(),p=f.getNode();if(h===p&&d.type==="text"&&f.type==="text"){const m=d.offset,g=f.offset,v=m<g,b=v?m:g,y=v?g:m,S=y-1;b!==S&&(function(w){return!(Q4(w)||pne(w))})(h.getTextContent().slice(b,y))&&(c?f.set(f.key,S,f.type):d.set(d.key,S,d.type))}})(this,t)}}if(this.removeText(),t&&!r&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const n=this.anchor.getNode();n.isEmpty()&&Mr(n.getParent())&&n.getPreviousSibling()===null&&E$(this,n),w4()}}deleteLine(t){const r=Lx(this.anchor);if(r!==null&&mt(na(r)))return this.isCollapsed()||this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),void this.deleteCharacter(t);this.isCollapsed()&&X_(this,t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):cr(this.anchor.getNode(),qn)!==cr(this.focus.getNode(),qn)?(this.focus.set(this.anchor.key,this.anchor.offset,this.anchor.type),this.deleteCharacter(t)):this.removeText()}deleteWord(t){if(this.isCollapsed()){const r=this.anchor,n=r.getNode();if(this.forwardDeletion(r,n,t))return;X_(this,t,"word")}this.isCollapsed()?this.deleteCharacter(t):this.removeText()}isBackward(){const t=this._cachedIsBackward;if(t!==null)return t;const r=this.focus.isBefore(this.anchor);return Dd()||(this._cachedIsBackward=r),r}getStartEndPoints(){return[this.anchor,this.focus]}}function fr(e){return e instanceof sb}function E4(e,t){if(fr(e)){for(const b of e.getNodes())Ox(b)&&b.setFormat(t(b.getFormat()));return}if(e.isCollapsed())return e.setFormat(t(e.format)),void An(null);const r=[];for(const b of e.getNodes())fe(b)?r.push(b):H(b)?b.setTextFormat(t(b.getTextFormat())):Ox(b)&&b.setFormat(t(b.getFormat()));const n=r.length;if(n===0)return e.setFormat(t(e.format)),void An(null);const i=e.anchor,o=e.focus,a=e.isBackward(),s=a?o:i,l=a?i:o;let c=0,d=r[0],f=s.type==="element"?0:s.offset;if(s.type==="text"&&f===d.getTextContentSize()&&(c=1,d=r[1],f=0),d==null)return;const h=n-1;let p=r[h];const m=l.type==="text"?l.offset:p.getTextContentSize();if(d.is(p)){if(f===m)return;const b=t(d.getFormat());if(eo(d)||f===0&&m===d.getTextContentSize())d.setFormat(b);else{const y=d.splitText(f,m),S=f===0?y[0]:y[1];S.setFormat(b),s.type==="text"&&s.set(S.__key,0,"text"),l.type==="text"&&l.set(S.__key,m-f,"text")}return void(e.format=b)}f===0||eo(d)||([,d]=d.splitText(f),f=0);const g=t(d.getFormat());d.setFormat(g);const v=t(p.getFormat());m>0&&(m===p.getTextContentSize()||eo(p)||([p]=p.splitText(m)),p.setFormat(v));for(let b=c+1;b<h;b++){const y=r[b];y.setFormat(t(y.getFormat()))}s.type==="text"&&s.set(d.__key,f,"text"),l.type==="text"&&l.set(p.__key,m,"text"),e.format=g|v}function hne(e,t){const r=[];for(const[n,i]of Object.entries(t))typeof i=="boolean"&&r.push([n,i]);r.length!==0&&E4(e,n=>{for(const[i,o]of r)n=ju(n,i,o?Os[i]:0);return n})}function k4(e,t,r=null){const n=r===null&&ue(e)?ju(e.format,t,null):r;E4(e,i=>ju(i,t,n))}function w$(e){const t=e.offset;if(e.type==="text")return t;const r=e.getNode();return t===r.getChildrenSize()?r.getTextContent().length:0}function Mx(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[r,n]=t;return r.type==="element"&&n.type==="element"&&r.key===n.key&&r.offset===n.offset?[0,0]:[w$(r),w$(n)]}function E$(e,t){for(let r=t;r;r=r.getParent()){if(H(r)){if(r.collapseAtStart(e))return!0;if(br(r))break}if(r.getPreviousSibling())break}return!1}function C4(e){const t=e.focus,r=e.anchor,n=r.key,i=r.offset,o=r.type;r.set(t.key,t.offset,t.type,!0),t.set(n,i,o,!0)}function R4(e,t,r,n){e.modify(t,r,n)}function A4(e,t,r){const n=e.getNodes(),i=n.filter(s=>Pd(s,r));if(i.length===0||i.length===n.length)return!1;const o=t?i[0]:i[i.length-1],a=H(o)?o:o.getParentOrThrow();return t?a.selectStart():a.selectEnd(),!0}function X_(e,t,r){if(z0(e,"extend",t,r))return;const n=Wt(),i=Si(Gi(n));if(!i||typeof i.modify!="function")return;const o=n._blockCursorElement,a=n._rootElement,s=e.anchor,l=e.focus.getNode();a===null||o===null||!H(l)||l.isInline()||l.canBeEmpty()||V0(o,n,a);const c=N=>{const I=N.getNode(),M=n.getElementByKey(N.key);return M!==null&&N.type==="text"&&fe(I)?Tl(I,M,n):M},d=s.getNode(),f=c(s);if(f===null)return;const h=s.offset,p=e.isCollapsed(),m=e.focus,g=p?f:c(m);if(g===null)return;const v=m.offset;if(L0(i,g,v,g,v),R4(i,"move",t?"backward":"forward",r),i.rangeCount===0)return;const b=cb(i,a)||i.getRangeAt(0),y=b.startContainer,S=b.startOffset;if(p&&r==="character"&&s.type==="text"&&fe(d)&&d.isUnmergeable()&&h===(t?0:d.getTextContentSize())){const N=Ht(d,t?"previous":"next").getNodeAtCaret();if(fe(N)){const I=t?N.getTextContentSize()-1:1;return e.focus.set(N.__key,I,"text"),void(e.dirty=!0)}}if(p&&r==="character"&&s.type==="text"){const N=t?0:d.getTextContentSize(),I=y===f?S:h!==N?N:-1;if(I>=0)return void(I!==h&&(e.focus.set(s.key,I,"text"),e.dirty=!0))}const[w,C,A,T]=t?[y,S,f,h]:[f,h,y,S],R=Mr(d)?d:eL(d);e.applyDOMRange({collapsed:!1,endContainer:A,endOffset:T,startContainer:w,startOffset:C}),e.dirty=!0,!A4(e,t,R)&&t&&C4(e),r==="lineboundary"&&z0(e,"extend",t,r,"decorators")}const pne=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function k$(e,t,r){const n=e,i=n.getTextContent().split(/(?=\s)/g),o=i.length;let a=0,s=0;for(let c=0;c<o;c++){const d=c===o-1;if(s=a,a+=i[c].length,t&&a===r||a>r||d){i.splice(c,1),d&&(s=void 0);break}}const l=i.join("").trim();l===""?n.remove():(n.setTextContent(l),n.select(s,s))}function C$(e,t,r,n){let i,o=t,a=!1;if(it(e)){let s=!1;const l=e.childNodes,c=l.length,d=n._blockCursorElement;o===c&&c>0&&(s=!0,o=c-1),af(e,n)!==void 0||K0(e,n)||(a=!0);let f=l[o],h=!1;if(f===d)f=l[o+1],h=!0;else if(d!==null){const p=d.parentNode;e===p&&t>Array.prototype.indexOf.call(p.children,d)&&o--}if(i=Xc(f),fe(i))o=qa(i,s?"next":"previous");else{let p=Xc(e);if(p===null)return null;if(H(p)){const m=n.getElementByKey(p.getKey());m===null&&ae(214),[p,o]=Mo(p,m,n).resolveChildIndex(p,m,e,t),H(p)||ae(215),s&&o>=p.getChildrenSize()&&(o=Math.max(0,p.getChildrenSize()-1));let v=p.getChildAtIndex(o);if(H(v)&&(function(b,y,S){const w=b.getParent();return S===null||w===null||!w.canBeEmpty()||w!==S.getNode()})(v,0,r)){const b=s?v.getLastDescendant():v.getFirstDescendant();b===null?p=v:(v=b,p=H(v)?v:v.getParentOrThrow()),o=0}fe(v)?(i=v,p=null,o=qa(v,s?"next":"previous")):v!==p&&s&&!h&&(H(p)||ae(216),o=Math.min(p.getChildrenSize(),o+1))}else{const m=na(p),g=m!==null?m:p,v=g.getIndexWithinParent(),b=n.getElementByKey(p.getKey());let y="after";if(b!==null&&Xc(e)===p){const S=Mo(p,b,n);S.element!==b?y=S.resolveLeafPosition(b,e,t):t===0&&mt(p)&&(y="before")}o=y==="before"?v:v+1,p=g.getParentOrThrow()}if(H(p))return[Ha(p.__key,o,"element"),a]}}else i=Xc(e);return fe(i)?[Ha(i.__key,qa(i,o,"clamp"),"text"),a]:null}function R$(e,t,r){const n=e.offset,i=e.getNode();if(n===0){const o=i.getPreviousSibling(),a=i.getParent();if(t){if((r||!t)&&o===null&&H(a)&&a.isInline()){const s=a.getPreviousSibling();fe(s)&&e.set(s.__key,s.getTextContent().length,"text")}}else H(o)&&!r&&o.isInline()?e.set(o.__key,o.getChildrenSize(),"element"):fe(o)&&!i.isUnmergeable()&&e.set(o.__key,o.getTextContent().length,"text")}else if(n===i.getTextContent().length){const o=i.getNextSibling(),a=i.getParent();if(t&&H(o)&&o.isInline())e.set(o.__key,0,"element");else if((r||t)&&o===null&&H(a)&&a.isInline()&&!a.canInsertTextAfter()&&a.getTextContentSize()>1){const s=a.getNextSibling();fe(s)&&e.set(s.__key,0,"text")}}}function $4(e,t,r){if(e.type==="text"&&t.type==="text"){const n=e.isBefore(t),i=e.is(t);R$(e,n,i),R$(t,!n,i),i&&t.set(e.key,e.offset,e.type)}}function Lx(e){const t=mr(e.key);return t===null?null:fb(t)}function T4(e,t,r){const n=Lx(e),i=Lx(t);if(n===i||n!==null&&i!==null&&n.is(i))return!1;const o=r(n,i);if(n!==null)return H(n)?t.set(n.getKey(),o?n.getChildrenSize():0,"element"):t.set(n.getKey(),o?n.getTextContentSize():0,"text"),!0;const a=na(i);if(a===null)return!1;const s=a.getParent();if(s===null)return!1;const l=a.getIndexWithinParent();return t.set(s.getKey(),o?l+1:l,"element"),!0}function N4(e){const t=T4(e.anchor,e.focus,(r,n)=>(function(i,o,a,s){if(a!==null&&s!==null){const d=na(a),f=na(s);if(d!==null&&d.is(f)){for(const h of hb(d).values()){if(h===a.getKey())return!0;if(h===s.getKey())return!1}return!0}return d===null||f===null||d.isBefore(f)}if(a!==null){const d=na(a),f=mr(o.key);return d===null||f===null||!(!d.is(f)&&!d.isParentOf(f))||d.isBefore(f)}const l=na(s),c=mr(i.key);return l!==null&&c!==null&&!l.is(c)&&!l.isParentOf(c)&&c.isBefore(l)})(e.anchor,e.focus,r,n));return t&&(e.dirty=!0),t}function D4(e,t,r,n,i,o){if(e===null||r===null||!Wp(i,e,r))return null;const a=C$(e,t,ue(o)?o.anchor:null,i);if(a===null)return null;const s=C$(r,n,ue(o)?o.focus:null,i);if(s===null)return null;const[l,c]=a,[d,f]=s;if(l.type==="element"&&d.type==="element"){const p=Xc(e),m=Xc(r);if(mt(p)&&mt(m))return null}const h=i._slotsUsed&&T4(l,d,()=>(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)!==0);return $4(l,d),[l,d,c||f||h]}function Nd(e){return H(e)&&!e.isInline()}function F4(e,t,r,n,i,o){const a=Gs(),s=new ic(Ha(e,t,i),Ha(r,n,o),0,"");return s.dirty=!0,a._selection=s,s}function sE(){const e=Ha("root",0,"element"),t=Ha("root",0,"element");return new ic(e,t,0,"")}function O0(){return new sb(new Set)}function lE(e,t,r,n){const i=r._window;if(i===null)return null;const o=n||i.event,a=o?o.type:void 0,s=a==="selectionchange",l=!wx&&(s||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&o&&o.detail===3||a==="drop"||a===void 0);let c,d,f,h;if(ue(e)&&!l)return e.clone();{if(t===null)return null;const w=Oo(t,r._rootElement);if(c=w.anchorNode,d=w.focusNode,f=w.anchorOffset,h=w.focusOffset,(s||a===void 0)&&ue(e)&&!Wp(r,c,d))return e.clone()}const p=D4(c,f,d,h,r,e);if(p===null)return null;const[m,g,v]=p;let b=0,y="";if(ue(e)){const w=e.anchor;if(m.key===w.key)b=e.format,y=e.style;else{const C=m.getNode();fe(C)?(b=C.getFormat(),y=C.getStyle()):H(C)&&(b=C.getTextFormat(),y=C.getTextStyle())}}const S=new ic(m,g,b,y);return v&&(S.dirty=!0),S}function xe(){return Gs()._selection}function ef(){return Wt()._editorState._selection}function gu(e,t,r,n=1){const i=e.anchor,o=e.focus,a=i.getNode(),s=o.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const c=i.offset;if(r<=c&&n>0||r<c&&n<0){const d=Math.max(0,c+n);i.set(l,d,"element"),o.set(l,d,"element"),A$(e)}}else{const c=e.isBackward(),d=c?o:i,f=d.getNode(),h=c?i:o,p=h.getNode();if(t.is(f)){const m=d.offset;(r<=m&&n>0||r<m&&n<0)&&d.set(l,Math.max(0,m+n),"element")}if(t.is(p)){const m=h.offset;(r<=m&&n>0||r<m&&n<0)&&h.set(l,Math.max(0,m+n),"element")}}A$(e)}function A$(e){const t=e.anchor,r=t.offset,n=e.focus,i=n.offset,o=t.getNode(),a=n.getNode();if(e.isCollapsed()){if(!H(o))return;const s=o.getChildrenSize(),l=r>=s,c=l?o.getChildAtIndex(s-1):o.getChildAtIndex(r);if(fe(c)){let d=0;l&&(d=c.getTextContentSize()),t.set(c.__key,d,"text"),n.set(c.__key,d,"text")}return}if(H(o)){const s=o.getChildrenSize(),l=r>=s,c=l?o.getChildAtIndex(s-1):o.getChildAtIndex(r);if(fe(c)){let d=0;l&&(d=c.getTextContentSize()),t.set(c.__key,d,"text")}}if(H(a)){const s=a.getChildrenSize(),l=i>=s,c=l?a.getChildAtIndex(s-1):a.getChildAtIndex(i);if(fe(c)){let d=0;l&&(d=c.getTextContentSize()),n.set(c.__key,d,"text")}}}function M0(e,t,r,n,i){let o=null,a=0,s=null;n!==null?(o=n.__key,fe(n)?(a=n.getTextContentSize(),s="text"):H(n)&&(a=n.getChildrenSize(),s="element")):i!==null&&(o=i.__key,fe(i)?s="text":H(i)&&(s="element")),o!==null&&s!==null?e.set(o,a,s):(a=t.getIndexWithinParent(),a===-1&&(a=r.getChildrenSize()),e.set(r.__key,a,"element"))}function $$(e,t,r,n,i){e.type==="text"?e.set(r,e.offset+(t?0:i),"text"):e.offset>n.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function L0(e,t,r,n,i){try{e.setBaseAndExtent(t,r,n,i)}catch{}}function T$(e,t,r){const n=Id(e,t.getKey());if(H(t)){const i=Mo(t,n,e);return[i.element,r+i.getFirstChildOffset()]}return[n,r]}function mne(e,t,r,n,i,o){const a=o.getRootNode(),s=oc(a)||Ms(a)?ap(a):null;if(i.has(_4)&&s!==o||s!==null&&mE(s,s))return;const l=Oo(n,o);let c;if(!ue(t))return void(e!==null&&Wp(r,l.anchorNode,l.focusNode)&&n.removeAllRanges());const d=t.anchor,f=t.focus,h=d.getNode(),p=f.getNode(),[m,g]=T$(r,h,d.offset),[v,b]=T$(r,p,f.offset),y=t.format,S=t.style,w=t.isCollapsed();let C=m,A=v,T=!1;if(d.type==="text"?(C=fe(h)?Tl(h,m,r):null,T=h.getFormat()!==y||h.getStyle()!==S):ue(e)&&e.anchor.type==="text"&&(T=!0),f.type==="text"&&(A=fe(p)?Tl(p,v,r):null),C!==null&&A!==null){if(w&&(e===null||T||ue(e)&&(e.format!==y||e.style!==S))&&(function(R,N,I,M,P,B){R._inputState.collapsedSelectionFormat={format:N,key:P,offset:M,style:I,timeStamp:B}})(r,y,S,g,d.key,performance.now()),(n.type!=="Range"||!w)&&l.anchorOffset===g&&l.focusOffset===b&&l.anchorNode===C&&l.focusNode===A){if(s===null||!o.contains(s)){const R=s!==null?md(s):null;R!==null&&R!==r||i.has(Px)||o.focus({preventScroll:!0})}if(d.type!=="element")return}if(L0(n,C,g,A,b),Ol&&t.isCollapsed()&&o!==null&&!i.has(Px)){const R=jx(o);if(R===null||!o.contains(R)){const N=ap(o.ownerDocument),I=N!==null?md(N):null;I!==null&&I!==r||o.focus({preventScroll:!0})}}if(!i.has(nne)&&t.isCollapsed()&&o!==null&&o===jx(o)){const R=ue(t)&&t.anchor.type==="element"?C.childNodes[g]||null:(c===void 0&&(c=Bne(n,o)),c);if(R!==null){let N;if(Vi(R)){const I=R.ownerDocument.createRange();I.selectNode(R),N=I.getBoundingClientRect()}else N=R.getBoundingClientRect();(function(I,M,P){const B=yE(P),j=xE(B);if(B===null||j===null)return;const W=P.getBoundingClientRect();if(M.bottom<W.top)return;let{top:te,bottom:J}=M,re=0,se=0,pe=P;for(;pe!==null;){const K=pe===B.body;if(K){const le=j.visualViewport;if(le){const be=le.offsetTop;re=be,se=be+le.height}else re=0,se=Gi(I).innerHeight;const Z=j.getComputedStyle(B.documentElement),ve=parseFloat(Z.scrollPaddingTop),me=parseFloat(Z.scrollPaddingBottom);isFinite(ve)&&(re+=ve),isFinite(me)&&(se-=me)}else{const le=pe===P?W:pe.getBoundingClientRect();re=le.top,se=le.bottom}let oe=0;if(te<re?oe=-(re-te):J>se&&(oe=J-se),oe!==0)if(K)j.scrollBy(0,oe);else{const le=pe.scrollTop;pe.scrollTop+=oe;const Z=pe.scrollTop-le;te-=Z,J-=Z}if(K)break;pe=ac(pe)}})(r,N,o)}}(function(R){R._inputState.isSelectionChangeFromDOMUpdate=!0})(r)}}function gne(e){let t=xe()||ef();t===null&&(t=un().selectEnd()),t.insertNodes(e)}function I4(e,t){for(const r of e.split(/(\r?\n|\t)/))r===`
|
|
25
|
+
`||r===`\r
|
|
26
|
+
`?t.linebreak():r===" "?t.tab():r!==""&&t.text(r)}function op(e){const t=[];return I4(e,{linebreak:()=>t.push(fa()),tab:()=>t.push(Zd()),text:r=>t.push(Pr(r))}),t}function zx(e){const t=[];for(const r of e)_i(r)||(!H(r)&&!mt(r)||r.isInline()?t.push(r):H(r)&&t.push(...zx(r.getChildren())));return t}function Of(e){let t=e;e.isCollapsed()||t.removeText();const r=xe();ue(r)&&(t=r),ue(t)||ae(161);const n=t.anchor;let i=n.getNode(),o=n.offset;for(;!qn(i)&&Wn(i)===null;){const a=i;if([i,o]=vne(i,o),a.is(i))break}return o}function vne(e,t){const r=e.getParent();if(!r){const i=Xt();return un().append(i),i.select(),[un(),0]}if(fe(e)){const i=e.splitText(t);if(i.length===0)return[r,e.getIndexWithinParent()];const o=t===0?0:1;return[r,i[0].getIndexWithinParent()+o]}if(!H(e)||t===0)return[r,e.getIndexWithinParent()];const n=e.getChildAtIndex(t);if(n){const i=new ic(Ha(e.__key,t,"element"),Ha(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(n,...n.getNextSiblings())}return[r,e.getIndexWithinParent()+1]}function N$(e){return _i(e)||Mne(e)||fe(e)||e.isParentRequired()}function Z_(e){const t=Xt();let r=null;for(let n=0;n<e.length;n++){const i=e[n];if(N$(i)){if(r===null){r=i.createParentElementNode(),t.append(r);const o=e[n+1];if(_i(i)&&(o===void 0||!N$(o)))continue}r.append(i)}else t.append(i),r=null}return t}function z0(e,t,r,n,i="decorators-and-blocks"){if(t==="move"&&n==="character"&&!e.isCollapsed()){const[d,f]=r===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return f.set(d.key,d.offset,d.type),!0}const o=Oi(e.focus,r?"previous":"next"),a=n==="lineboundary",s=t==="move";let l=o,c=i==="decorators-and-blocks";if(!AE(l)){for(const d of l){c=!1;const{origin:f}=d;if(!mt(f)||f.isIsolated()||(l=d,!a||!f.isInline()))break}if(c)for(const d of pb(o).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(No(d))d.origin.isInline()||(l=d);else{if(H(d.origin))continue;mt(d.origin)&&!d.origin.isInline()&&(l=d)}break}}if(l===o)return!1;if(s&&!a&&mt(l.origin)&&l.origin.isKeyboardSelectable()){const d=O0();return d.add(l.origin.getKey()),In(d),!0}return l=to(l),s&&Ju(e.anchor,l),Ju(e.focus,l),c||!a}let Tn=null,Xr=null,Pi=!1,ey=!1,Qg=!1;const ty=new Set;let Yg=0;const D$={characterData:!0,childList:!0,subtree:!0};function Dd(){return Pi||Tn!==null&&Tn._readOnly}function Rn(){Pi&&ae(13)}function P4(){Yg>99&&ae(14)}function Gs(){return Tn===null&&ae(195,O4()),Tn}function bne(e){Gs()!==null&&Xr===null&&(Xr=e),Xr!==e&&y6(378)}function Wt(){return Xr===null&&ae(337,O4()),Xr}function _ne(){Wt()._dirtyType=2}function O4(){let e=0;const t=new Set,r=Fd.version;if(typeof window<"u")for(const i of rL(document)){const o=Jp(i);if(ub(o))e++;else if(o){let a=String(o.constructor.version||"<0.17.1");a===r&&(a+=" (separately built, likely a bundler configuration issue)"),t.add(a)}}let n=` Detected on the page: ${e} compatible editor(s) with version ${r}`;return t.size&&(n+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),n}function M4(){return Xr}function F$(e,t,r){const n=t.__type,i=V4(e,n);let o=r.get(n);o===void 0&&(o=Array.from(i.transforms),r.set(n,o));const a=o.length;for(let s=0;s<a&&(o[s](t),t.isAttached());s++);}function I$(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function L4(e,t){if(!t)return;const r=e._updateTags;let n=t;Array.isArray(t)||(n=[t]);for(const i of n)r.add(i)}function yne(e){return U0(e,Wt()._nodes)}function U0(e,t){const r=e.type,n=t.get(r);n===void 0&&ae(17,r);const i=n.klass;e.type!==i.getType()&&ae(18,i.name);const o=i.importJSON(e),a=e.children;if(H(o)&&Array.isArray(a))for(let l=0;l<a.length;l++){const c=U0(a[l],t);o.append(c)}const s=e.$slots;if(s){Rs(o)||ae(379,i.name);for(const l in s)fL(o,l,U0(s[l],t))}return o}function P$(e,t,r){const n=Tn,i=Pi,o=Xr;Tn=t,Pi=!0,Xr=e;try{return r()}finally{Tn=n,Pi=i,Xr=o}}function xl(e,t){const r=Qg;Qg=!0;try{(function(n,i){const o=n._pendingEditorState,a=n._rootElement,s=n._headless||a===null;if(o===null)return void(!n._updating&&n._deferred.length>0&&O$(n,n._deferred));const l=n._editorState,c=l._selection,d=o._selection,f=n._dirtyType!==0,h=Tn,p=Pi,m=Xr,g=n._updating,v=n._observer;let b=null;if(n._pendingEditorState=null,n._editorState=o,!s&&f&&v!==null){Xr=n,Tn=o,Pi=!1,n._updating=!0;try{const R=n._dirtyType,N=n._dirtyElements,I=n._dirtyLeaves;v.disconnect(),b=Ore(l,o,n,R,N,I)}catch(R){if(R instanceof Error&&n._onError(R),ey)throw R;return q4(n,null,a,o),T6(n),n._dirtyType=2,ey=!0,xl(n,l),void(ey=!1)}finally{v.observe(a,D$),n._updating=g,Tn=h,Pi=p,Xr=m}}o._readOnly||(o._readOnly=!0);const y=n._dirtyLeaves,S=n._dirtyElements,w=n._normalizedNodes,C=n._updateTags;f&&(n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set),n._updateTags=new Set,(function(R,N){const I=R._decorators;let M=R._pendingDecorators||I;const P=N._nodeMap;let B;for(B in M)P.has(B)||(M===I&&(M=J4(R)),delete M[B])})(n,o);const A=s?null:Si(Gi(n));if(n._editable&&A!==null&&(f||d===null||d.dirty||!d.is(c))&&a!==null&&!C.has(ine)){Xr=n,Tn=o;try{if(v!==null&&v.disconnect(),f||d===null||d.dirty){const R=n._blockCursorElement;R!==null&&V0(R,n,a),mne(c,d,n,A,C,a)}(function(R,N,I){let M=R._blockCursorElement;if(ue(I)&&I.isCollapsed()&&I.anchor.type==="element"&&N.contains(jx(N))){const P=I.anchor,B=P.getNode(),j=P.offset;let W=!1,te=null;if(j===B.getChildrenSize())Xg(B.getChildAtIndex(j-1))&&(W=!0);else{const J=B.getChildAtIndex(j);if(J!==null&&Xg(J)){const re=J.getPreviousSibling();(re===null||Xg(re))&&(W=!0,te=R.getElementByKey(J.__key))}}if(W){const J=Mo(B,R.getElementByKey(B.__key),R).element;return M===null&&(R._blockCursorElement=M=(function(re){const se=re.theme,pe=gr().createElement("div");pe.contentEditable="false",pe.setAttribute("data-lexical-cursor","true");let K=se.blockCursor;if(K!==void 0){if(typeof K=="string"){const oe=As(K);K=se.blockCursor=oe}K!==void 0&&pe.classList.add(...K)}return pe})(R._config)),N.style.caretColor="transparent",void(te===null?J.appendChild(M):J.insertBefore(M,te))}}M!==null&&V0(M,R,N)})(n,a,d)}finally{v!==null&&v.observe(a,D$),Xr=m,Tn=h}}b!==null&&(function(R,N,I,M,P){const B=Array.from(R._listeners.mutation),j=B.length;for(let W=0;W<j;W++){const[te,J]=B[W];for(const re of J){const se=N.get(re);se!==void 0&&te(se,{dirtyLeaves:M,prevEditorState:P,updateTags:I})}}})(n,b,C,y,l),ue(d)||d===null||c!==null&&c.is(d)||n.dispatchCommand(j6,void 0);const T=n._pendingDecorators;T!==null&&(n._decorators=T,n._pendingDecorators=null,_h("decorator",n,!0,T)),(function(R,N,I){const M=z$(N),P=z$(I);M!==P&&_h("textcontent",R,!0,P)})(n,i||l,o),_h("update",n,!0,{dirtyElements:S,dirtyLeaves:y,editorState:o,mutatedNodes:b,normalizedNodes:w,prevEditorState:i||l,tags:C}),!g&&O$(n,n._deferred),(function(R){const N=R._updates;if(N.length===0)return void(R._cascadeCount=0);if((function(M){ty.has(M)||(ty.add(M),setTimeout(()=>{ty.delete(M),M._cascadeCount=0},0))})(R),R._cascadeCount++>99)return R._updates=[],R._cascadeCount=0,void R._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${R._config.namespace}`));const I=N.shift();if(I){const[M,P]=I;lb(R,M,P)}})(n)})(e,t)}finally{Qg=r}}function _h(e,t,r,...n){const i=t._updating;t._updating=r;try{const o=t._listeners[e],a=Array.from(o);for(const[s,l]of a){l&&l();const c=s(...n);o.has(s)?o.set(s,c):c&&c()}}finally{t._updating=i}}function z4(e,t,r,n){const i=gE(e);let o;if(!Qg)for(let a=0;a<i.length;a++)i[a]._updating||(i[a]._cascadeCount=0);for(let a=4;a>=0;a--)for(let s=0;s<i.length;s++){const l=i[s];if(s>0&&l._updating){o=l;break}const c=l._commands.get(t);if(c!==void 0){const d=c[a];if(d.size>0){let f=!1;if(Ao(l,()=>{for(const h of d)if(h(r,n))return void(f=!0)}),f)return f}}}return o&&o.update(()=>{z4(o,t,r,n)}),!1}function O$(e,t){if(e._deferred=[],t.length!==0){const r=e._updating;e._updating=!0;try{for(let n=0;n<t.length;n++)t[n]()}finally{e._updating=r}}}function M$(e,t){const r=e._updates;let n=t||!1;for(;r.length!==0;){const i=r.shift();if(i){const[o,a]=i,s=e._pendingEditorState;let l;a!==void 0&&(l=a.onUpdate,a.skipTransforms&&(n=!0),a.discrete&&(s===null&&ae(191),s._flushSync=!0),l&&e._deferred.push(l),L4(e,a.tag)),s==null?lb(e,o,a):o()}}return n}function lb(e,t,r){const n=e._updateTags;let i,o=!1,a=!1;r!==void 0&&(i=r.onUpdate,L4(e,r.tag),o=r.skipTransforms||!1,a=r.discrete||!1),i&&e._deferred.push(i);const s=e._editorState;let l=e._pendingEditorState,c=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=U4(l||s),c=!0),l._flushSync=a;const d=Tn,f=Pi,h=Xr,p=e._updating;Tn=l,Pi=!1,e._updating=!0,Xr=e;const m=e._headless||e.getRootElement()===null;hE(null);try{c&&(m?s._selection!==null&&(l._selection=s._selection.clone()):l._selection=(function(y,S){const w=y.getEditorState()._selection,C=Si(Gi(y));return ue(w)||w==null?lE(w,C,y,S):w.clone()})(e,r&&r.event||null));const v=e._compositionKey;t(),o=M$(e,o),(function(y,S){const w=S.getEditorState()._selection,C=y._selection;if(ue(C)){const A=C.anchor,T=C.focus;let R;if(A.type==="text"&&(R=A.getNode(),R.selectionTransform(w,C)),T.type==="text"){const N=T.getNode();R!==N&&N.selectionTransform(w,C)}}})(l,e),e._dirtyType!==0&&(o?(function(y,S){const w=S._dirtyLeaves,C=y._nodeMap;for(const A of w){const T=C.get(A);fe(T)&&T.isAttached()&&T.isSimpleText()&&!T.isUnmergeable()&&n$(T)}})(l,e):(function(y,S){const w=S._dirtyLeaves,C=S._dirtyElements,A=y._nodeMap,T=Es(),R=new Map;let N=w,I=N.size,M=C,P=M.size;for(;I>0||P>0;){if(I>0){S._dirtyLeaves=new Set;for(const B of N){const j=A.get(B);fe(j)&&j.isAttached()&&j.isSimpleText()&&!j.isUnmergeable()&&n$(j),j!==void 0&&I$(j,T)&&F$(S,j,R),w.add(B)}if(N=S._dirtyLeaves,I=N.size,I>0){Yg++;continue}}S._dirtyLeaves=new Set,S._dirtyElements=new Map,M.delete("root")&&M.set("root",!0);for(const B of M){const j=B[0],W=B[1];if(C.set(j,W),!W)continue;const te=A.get(j);te!==void 0&&I$(te,T)&&F$(S,te,R)}N=S._dirtyLeaves,I=N.size,M=S._dirtyElements,P=M.size,Yg++}S._dirtyLeaves=w,S._dirtyElements=C})(l,e),M$(e),(function(y,S,w,C){const A=y._nodeMap,T=S._nodeMap,R=[];for(const[M]of C){const P=T.get(M);P!==void 0&&(P.isAttached()||(H(P)&&$0(P,M,A,T,R,C),A.has(M)||C.delete(M),R.push(M)))}for(const M of w){const P=T.get(M);P===void 0||P.isAttached()||(Rs(P)&&P.__slots!==null&&$0(P,M,A,T,R,w),A.has(M)||w.delete(M),R.push(M))}for(const M of R)T.delete(M);const N=Wt(),I=N._compositionKey;I===null||T.has(I)||(N._compositionKey=null)})(s,l,e._dirtyLeaves,e._dirtyElements)),v!==e._compositionKey&&(l._flushSync=!0);const b=l._selection;if(ue(b)){e._slotsUsed&&N4(b);const y=l._nodeMap,S=b.anchor.key,w=b.focus.key;y.get(S)!==void 0&&y.get(w)!==void 0||ae(19)}else fr(b)&&b._nodes.size===0&&(l._selection=null)}catch(v){return v instanceof Error&&e._onError(v),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void xl(e)}finally{Tn=d,Pi=f,Xr=h,e._updating=p,Yg=0}e._dirtyType!==0||e._deferred.length>0||(function(v,b){const y=b.getEditorState()._selection,S=v._selection;if(S!==null){if(S.dirty||!S.is(y))return!0}else if(y!==null)return!0;return!1})(l,e)?l._flushSync?(l._flushSync=!1,xl(e)):c&&Nne(()=>{xl(e)}):(l._flushSync=!1,c&&(n.clear(),e._deferred=[],e._pendingEditorState=null))}function Ao(e,t,r){Xr===e&&r===void 0?t():lb(e,t,r)}function xne(e){if(br(e)){let t=null;for(const r of e.getChildren())t=r.isInline()?(t||r.replace(r.createParentElementNode())).append(r):null}}class ji extends oo{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:xne,extends:oo})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(t){super.afterCloneFrom(t),this.__key===t.__key&&(this.__first=t.__first,this.__last=t.__last,this.__size=t.__size,this.__slotHost=t.__slotHost,this.__slotHost!==null&&this.__parent!==null&&ae(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=t.__slots),this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir,this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return xre[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let r=this.getFirstChild();for(;r!==null;)t.push(r),r=r.getNextSibling();return t}getChildrenKeys(){const t=[];let r=this.getFirstChild();for(;r!==null;)t.push(r.__key),r=r.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0&&$o(this).length===0}isDirty(){const t=Wt()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),r=this.getParentOrThrow().getLastChild();return r!==null&&r.is(t)}getAllTextNodes(){const t=[];for(const n of $o(this)){const i=Ku(this,n);H(i)&&t.push(...i.getAllTextNodes())}let r=this.getFirstChild();for(;r!==null;){if(fe(r)&&t.push(r),H(r)){const n=r.getAllTextNodes();t.push(...n)}r=r.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;H(t);){const r=t.getFirstChild();if(r===null)break;t=r}return t}getLastDescendant(){let t=this.getLastChild();for(;H(t);){const r=t.getLastChild();if(r===null)break;t=r}return t}getDescendantByIndex(t){const r=this.getChildren(),n=r.length;if(t>=n){const o=r[n-1];return H(o)&&o.getLastDescendant()||o||null}const i=r[t];return H(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:mr(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&ae(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:mr(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&ae(96,this.__key),t}getChildAtIndex(t){const r=this.getChildrenSize();let n,i;if(t<r/2){for(n=this.getFirstChild(),i=0;n!==null&&i<=t;){if(i===t)return n;n=n.getNextSibling(),i++}return null}for(n=this.getLastChild(),i=r-1;n!==null&&i>=t;){if(i===t)return n;n=n.getPreviousSibling(),i--}return null}getTextContent(){let t=dL(this);const r=this.getChildren(),n=r.length;for(let i=0;i<n;i++){const o=r[i];t+=o.getTextContent(),H(o)&&i!==n-1&&!o.isInline()&&(t+=yu)}return t}getTextContentSize(){let t=(function(i){let o=0;for(const a of $o(i)){const s=Ku(i,a);s!==null&&(o+=s.getTextContentSize())}return o})(this);const r=this.getChildren(),n=r.length;for(let i=0;i<n;i++){const o=r[i];t+=o.getTextContentSize(),H(o)&&i!==n-1&&!o.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const r=A0[t];return(this.getFormat()&r)!==0}return!1}hasTextFormat(t){const r=Os[t];return(this.getTextFormat()&r)!==0}getFormatFlags(t,r){return ju(this.getLatest().__textFormat,t,r)}getTextStyle(){return this.getLatest().__textStyle}select(t,r){Rn();const n=xe();let i=t,o=r;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&r===0){const l=this.getFirstChild();if(fe(l)||H(l))return l.select(0,0)}else if(!(t!==void 0&&t!==a||r!==void 0&&r!==a)){const l=this.getLastChild();if(fe(l)||H(l))return l.select()}}i===void 0&&(i=a),o===void 0&&(o=a);const s=this.__key;return ue(n)?(n.anchor.set(s,i,"element"),n.focus.set(s,o,"element"),n.dirty=!0,n):F4(s,i,s,o,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();return this.getChildren().forEach(r=>r.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const r=this.getWritable();return r.__dir=t,r}setFormat(t){return this.getWritable().__format=t!==""&&A0[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const r=this.getWritable();return r.__textFormat=t,r}setTextStyle(t){const r=this.getWritable();return r.__textStyle=t,r}setIndent(t){return this.getWritable().__indent=t,this}splice(t,r,n){F0(this)&&ae(324,this.__key,this.__type);const i=this.getChildrenSize(),o=this.getWritable();t+r<=i||ae(226,String(t),String(r),String(i));for(const p of n);const a=o.__key,s=[],l=[],c=this.getChildAtIndex(t+r);let d=null,f=i-r+n.length;if(t!==0)if(t===i)d=this.getLastChild();else{const p=this.getChildAtIndex(t);p!==null&&(d=p.getPreviousSibling())}if(r>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let m=0;m<r;m++){p===null&&ae(100);const g=p.getNextSibling(),v=p.__key;ws(p.getWritable()),l.push(v),p=g}}let h=d;for(const p of n){h!==null&&p.is(h)&&(d=h=h.getPreviousSibling());const m=p.getWritable();m.__parent===a&&f--,ws(m);const g=p.__key;if(h===null)o.__first=g,m.__prev=null;else{const v=h.getWritable();v.__next=g,m.__prev=v.__key}p.__key===a&&ae(76),m.__parent=a,s.push(g),h=p}if(t+r===i)h!==null&&(h.getWritable().__next=null,o.__last=h.__key);else if(c!==null){const p=c.getWritable();if(h!==null){const m=h.getWritable();p.__prev=h.__key,m.__next=c.__key}else p.__prev=null}if(o.__size=f,l.length){const p=xe();if(ue(p)){const m=new Set(l),g=new Set(s),{anchor:v,focus:b}=p;L$(v,m,g)&&M0(v,v.getNode(),this,d,c),L$(b,m,g)&&M0(b,b.getNode(),this,d,c),f!==0||this.canBeEmpty()||br(this)||this.remove()}}return o}getDOMSlot(t){return new ud(t)}exportDOM(t){const{element:r}=super.exportDOM(t);if(it(r)){const n=this.getIndent();n>0&&(r.style.paddingInlineStart=40*n+"px",r.setAttribute("data-lexical-indent",String(n)));const i=this.getDirection();i&&(r.dir=i)}return{element:r}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},r=this.getTextFormat(),n=this.getTextStyle();return r===0&&n===""||br(this)||this.getChildren().some(fe)||(r!==0&&(t.textFormat=r),n!==""&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,r){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,r,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,r){const n=Mo(this,t,r);let i=n.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const a=r.getElementByKey(o.getKey());a!==null&&(i==null?(n.insertChild(a),i=a):i!==a&&n.replaceChild(a,i),i=i.nextSibling)}}}function H(e){return e instanceof ji}function L$(e,t,r){let n=e.getNode();for(;n;){const i=n.__key;if(t.has(i)&&!r.has(i))return!0;n=n.getParent()}return!1}class uE extends oo{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(t){super.afterCloneFrom(t),this.__key===t.__key&&(this.__slotHost=t.__slotHost,this.__slotHost!==null&&this.__parent!==null&&ae(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=t.__slots)}decorate(t,r){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function mt(e){return e instanceof uE}class tf extends ji{__cachedText;static getType(){return"root"}static clone(){return new tf}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){ae(51)}getTextContent(){const t=this.__cachedText;return t===null||!Dd()&&Wt()._dirtyType!==0?super.getTextContent():t}remove(){ae(52)}replace(t){ae(53)}insertBefore(t){ae(54)}insertAfter(t){ae(55)}updateDOM(t,r){return!1}splice(t,r,n){for(const i of n)H(i)||mt(i)||ae(282);return super.splice(t,r,n)}static importJSON(t){return un().updateFromJSON(t)}collapseAtStart(){return!0}}function Mr(e){return e instanceof tf}function U4(e){return new Hp(C6(e._nodeMap),null,e._slotsUsed)}function cE(){return new Hp(new Map([["root",new tf]]),null,!1)}function Ux(e){const t=e.exportJSON(),r=e.constructor;if(t.type!==r.getType()&&ae(130,r.name),H(e)){const i=t.children;Array.isArray(i)||ae(59,r.name);const o=e.getChildren();for(let a=0;a<o.length;a++){const s=Ux(o[a]);i.push(s)}}const n=$o(e);if(n.length>0){const i={};for(const o of n){const a=Ku(e,o);a===null&&ae(366,r.name,o),i[o]=Ux(a)}t.$slots=i}return t}function Sne(e){return e instanceof Hp}class Hp{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,r=null,n=!1){this._nodeMap=t,this._selection=r||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,r){return P$(r&&r.editor||null,this,t)}clone(t){const r=new Hp(this._nodeMap,t===void 0?this._selection:t,this._slotsUsed);return r._readOnly=!0,r}toJSON(){return P$(null,this,()=>({root:Ux(un())}))}}class dE extends ji{static getType(){return"artificial"}createDOM(t){return gr().createElement("div")}}class rf extends oo{static getType(){return"linebreak"}static clone(t){return new rf(t.__key)}constructor(t){super(t)}getTextContent(){return`
|
|
27
|
+
`}createDOM(){return gr().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>B4(t)||j4(t)?null:{conversion:wne,priority:0}}}static importJSON(t){return fa().updateFromJSON(t)}}function wne(e){return{node:fa()}}function fa(){return ya(new rf)}function _i(e){return e instanceof rf}function B4(e){const t=e.parentElement;if(t!==null&&Od(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&B0(r)){const n=t.lastChild;if(n===e||n.previousSibling===e&&B0(n))return!0}}return!1}function j4(e){const t=e.parentElement;if(t!==null&&Od(t)){const r=t.firstChild;if(r===e||r.nextSibling===e&&B0(r))return!1;const n=t.lastChild;if(n===e||n.previousSibling===e&&B0(n))return!0}return!1}function B0(e){return Vi(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}class nf extends ji{static getType(){return"paragraph"}static clone(t){return new nf(t.__key)}createDOM(t){const r=gr().createElement("p"),n=gd(t.theme,"paragraph");return n!==void 0&&r.classList.add(...n),r}updateDOM(t,r,n){return!1}static importDOM(){return{p:t=>({conversion:Ene,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(it(r)){this.isEmpty()&&r.append(gr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n)}return{element:r}}static importJSON(t){return Xt().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const r=this.getChildren().find(fe);r?(t.textFormat=r.getFormat(),t.textStyle=r.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,r){const n=Xt();n.setTextFormat(t.format),n.setTextStyle(t.style);const i=this.getDirection();return n.setDirection(i),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,r),n}collapseAtStart(){const t=this.getChildren();if(t.length===0||fe(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function Ene(e){const t=Xt();if(ts(t,e),sc(e,t),t.getFormatType()===""){const r=e.getAttribute("align");r&&r&&r in A0&&t.setFormat(r)}return qo(t,e),{node:t}}function Xt(){return ya(new nf)}function of(e){return e instanceof nf}function kne(e){console.warn(e)}const ht=0,Gc=1,Cne=4,Rne=-8;function q4(e,t,r,n,i){const o=e._keyToDOMMap;o.clear(),e._editorState=cE(),e._pendingEditorState=n,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,i&&i.preserveUpdateQueue||(e._updateTags=new Set,e._updates=[],e._cascadeCount=0),e._blockCursorElement=null,e._inputState.handledSelectionCommandTimeoutId!==null&&clearTimeout(e._inputState.handledSelectionCommandTimeoutId),e._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const a=e._observer;a!==null&&(a.disconnect(),e._observer=null),t!==null&&(t.textContent="",(function(s,l){const c=`__lexicalKey_${l._key}`;delete s[c]})(t,e)),r!==null&&(r.textContent="",o.set("root",r),W4(r,e,"root"))}function Ane(e){const t=new Set,r=new Set;for(const{klass:n,ownNodeConfig:i}of wE(e)){const o=n.transform;if(!r.has(o)){r.add(o);const a=n.transform();a&&t.add(a)}if(i){const a=i.$transform;a&&t.add(a)}}return t}const j0={$createDOM:(e,t)=>e.createDOM(t._config,t),$decorateDOM:(e,t,r,n)=>{},$exportDOM:(e,t)=>{const r=pE(t,e.getType());return r&&r.exportDOM!==void 0?r.exportDOM(t,e):e.exportDOM(t)},$extractWithChild:(e,t,r,n,i)=>H(e)&&e.extractWithChild(t,r,n),$getDOMSlot:(e,t,r)=>e.getDOMSlot(t),$getSlotTargetElement:(e,t,r,n)=>null,$shouldExclude:(e,t,r)=>H(e)&&e.excludeFromCopy("html"),$shouldInclude:(e,t,r)=>!t||e.isSelected(t),$updateDOM:(e,t,r,n)=>e.updateDOM(t,r,n._config)};function fE(e){const t=e||{},r=M4(),n=t.theme||{},i=e===void 0?r:t.parentEditor||null,o=t.disableEvents||!1,a=cE(),s=t.namespace||(i!==null?i._config.namespace:Y4()),l=t.editorState,c=[tf,Vs,rf,Xd,nf,dE,...t.nodes||[]],{onError:d,onWarn:f,html:h}=t,p=t.editable===void 0||t.editable;let m;if(e===void 0&&r!==null)m=r._nodes;else{m=new Map;for(let v=0;v<c.length;v++){let b=c[v],y=null,S=null;if(b&&typeof b=="object"){const A=b;b=A.replace,y=A.with,S=A.withKlass||null}if(typeof b!="function"||!b.prototype||!(b===oo||b.prototype instanceof oo)){let A="<unknown>";try{A=JSON.parse(k6)}catch{}ae(365,String(v-c.length+(t.nodes?t.nodes.length:0)),typeof b=="function"?`${b.name}${typeof b.getType=="function"?` (type ${String(b.getType())})`:""}`:String(b),String(A))}SE(b);const w=b.getType(),C=Ane(b);m.set(w,{exportDOM:h&&h.export?h.export.get(b):void 0,klass:b,replace:y,replaceWithKlass:S,sharedNodeState:Tre(c[v]),transforms:C})}}const g=new Fd(a,i,m,{disableEvents:o,dom:{...j0,...e&&e.dom},namespace:s,theme:n},d||console.error,f||kne,(function(v,b){const y=new Map,S=new Set,w=C=>{Object.keys(C).forEach(A=>{let T=y.get(A);T===void 0&&(T=[],y.set(A,T)),T.push(C[A])})};return v.forEach(C=>{const A=C.klass.importDOM;if(A==null||S.has(A))return;S.add(A);const T=A.call(C.klass);T!==null&&w(T)}),b&&w(b),y})(m,h?h.import:void 0),p,e);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=2),(function(v){v.registerCommand(V6,Yre,ht),v.registerCommand(G6,Xre,ht),v.registerCommand(K6,Zre,ht),v.registerCommand(H6,ene,ht),v.registerCommand(W6,tne,ht)})(g),g}function $ne(e,t){const r=e.get(t);e.delete(t),r&&r()}function Mf(e,t,r){return e.set(t,r),$ne.bind(null,e,t)}class Fd{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,r,n,i,o,a,s,l,c){this._createEditorArgs=c,this._parentEditor=r,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Sx,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=i,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Y4(),this._onError=o,this._onWarn=a,this._htmlConversions=s,this._editable=l,this._headless=r!==null&&r._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){return Mf(this._listeners.update,t)}registerEditableListener(t){return Mf(this._listeners.editable,t)}registerDecoratorListener(t){return Mf(this._listeners.decorator,t)}registerTextContentListener(t){return Mf(this._listeners.textcontent,t)}registerRootListener(t){const r=this._listeners.root;return Ul(Mf(r,t,t(this._rootElement,null)||void 0),()=>(function(n,i,o){const a=n.get(i);a&&a(),n.set(i,i(...o)||void 0)})(r,t,[null,this._rootElement]))}registerCommand(t,r,n){n===void 0&&ae(35);const i=this._commands;i.has(t)||i.set(t,[new Pf,new Pf,new Pf,new Pf,new Pf]);const o=i.get(t);o===void 0&&ae(36,String(t));const a=(function(l){return 7&l})(n),s=o[a];return a!==n?s.addFront(r):s.addBack(r),()=>{s.delete(r),o.every(l=>l.size===0)&&i.delete(t)}}registerMutationListener(t,r,n){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,o=this._listeners.mutation;let a=o.get(r);a===void 0&&(a=new Set,o.set(r,a)),a.add(i);const s=n&&n.skipInitialization;return s!==void 0&&s||this.initializeMutationListener(r,i),()=>{a.delete(i),a.size===0&&o.delete(r)}}getRegisteredNode(t){const r=this._nodes.get(t.getType());return r===void 0&&ae(37,t.name),r}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,r){const n=this._editorState,i=G$(n).get(r.getType());if(!i)return;const o=new Map;for(const a of i.keys())o.set(a,"created");o.size>0&&t(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,r){const n=this.getRegisteredNode(t);return n.transforms.add(r),n}registerNodeTransform(t,r){const n=this.registerNodeTransformToKlass(t,r),i=[n],o=n.replaceWithKlass;if(o!=null){const a=this.registerNodeTransformToKlass(o,r);i.push(a)}return(function(a,s){const l=G$(a.getEditorState()),c=[];for(const d of s){const f=l.get(d);f&&c.push(f)}c.length!==0&&a.update(()=>{for(const d of c)for(const f of d.keys()){const h=mr(f);h&&h.markDirty()}},a._pendingEditorState===null?{tag:bh}:void 0)})(this,i.map(a=>a.klass.getType())),()=>{i.forEach(a=>a.transforms.delete(r))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,r){return $e(this,t,r)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const r=this._rootElement;if(t!==r){const n=gd(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,q4(this,r,t,i,{preserveUpdateQueue:!0}),r!==null&&(this._config.disableEvents||rne(r),n!=null&&r.classList.remove(...n)),t!==null){const o=xE(t),a=t.style;a.userSelect="text",a.whiteSpace="pre-wrap",a.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=2,T6(this),this._updateTags.add(bh),xl(this),this._config.disableEvents||(function(s,l){const c=s.ownerDocument;Fx.set(s,c);let d=N0.get(c);d===void 0&&(d={editors:new Set,hasShadowEditor:void 0},N0.set(c,d)),d.editors.add(l),d.hasShadowEditor=void 0,s.__lexicalEditor=l;const f=h4(s);f.push(Qre.register(c));for(let h=0;h<Dx.length;h++){const[p,m]=Dx[h],g=typeof m=="function"?v=>{v$(v)||(g$(v),(l.isEditable()||p==="click")&&m(v,l))}:v=>{if(v$(v))return;g$(v);const b=l.isEditable();switch(p){case"cut":return b&&$e(l,oE,v);case"copy":return $e(l,ab,v);case"paste":return b&&$e(l,nE,v);case"dragstart":return b&&$e(l,a4,v);case"dragover":return b&&$e(l,s4,v);case"dragend":return b&&$e(l,jre,v);case"focus":return b&&$e(l,Gre,v);case"blur":return b&&$e(l,Kre,v);case"drop":return b&&$e(l,o4,v)}};f.push(Jre(s,p,g))}})(t,this),n!=null&&t.classList.add(...n)}else this._window=null,this._updateTags.add(bh),xl(this);_h("root",this,!1,t,r)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,r){t.isEmpty()&&ae(38);let n=t;n._readOnly&&(n=U4(t),n._selection=t._selection?t._selection.clone():null),$6(this);const i=this._pendingEditorState,o=r!==void 0?r.tag:null;i===null||i.isEmpty()||(o!=null&&this._updateTags.add(o),xl(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||t._slotsUsed,Ao(this,()=>{if(o&&this._updateTags.add(o),t._parsed)for(const[a,s]of n._nodeMap.entries())H(s)?this._dirtyElements.set(a,!0):this._dirtyLeaves.add(a)},{discrete:!this._updating||void 0})}parseEditorState(t,r){return(function(n,i,o){const a=cE(),s=Tn,l=Pi,c=Xr,d=i._dirtyElements,f=i._dirtyLeaves,h=i._cloneNotNeeded,p=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,Tn=a,Pi=!1,Xr=i,hE(null);try{const m=i._nodes;U0(n.root,m),o&&o(),a._readOnly=!0,a._parsed=!0}catch(m){m instanceof Error&&i._onError(m)}finally{i._dirtyElements=d,i._dirtyLeaves=f,i._cloneNotNeeded=h,i._dirtyType=p,Tn=s,Pi=l,Xr=c}return a})(typeof t=="string"?JSON.parse(t):t,this,r)}read(...t){const[r,n]=t.length===1?["force-commit",t[0]]:t;return r==="force-commit"&&xl(this),(r==="pending"?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,r){(function(n,i,o){n._updating?n._updates.push([i,o]):lb(n,i,o)})(this,t,r)}focus(t,r={}){const n=this._rootElement;n!==null&&(n.setAttribute("autocapitalize","off"),Ao(this,()=>{const i=xe(),o=un();i!==null?i.dirty||In(i.clone()):o.getChildrenSize()!==0&&(r.defaultSelection==="rootStart"?o.selectStart():o.selectEnd()),Vu("focus"),One(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const r=Si(this._window);r!==null&&r.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,_h("editable",this,!0,t),this._slotsUsed&&this.update(()=>_ne()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Fd.version=k6;let Bx=null;function hE(e){Bx=e}let Tne=1;function V4(e,t){const r=pE(e,t);return r===void 0&&ae(30,t),r}function pE(e,t){return e._nodes.get(t)}const Nne=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function mE(e,t){const r=t!==void 0?t:(()=>{const o=e.getRootNode();return oc(o)||Ms(o)?ap(o):null})();if(!it(r)||r.hasAttribute("data-lexical-slot"))return!1;const n=qu(r),i=r.nodeName;return m4(n)&&(i==="INPUT"||i==="TEXTAREA"||r.contentEditable==="true"&&Jp(r)==null)}function Wp(e,t,r){const n=e.getRootElement();if(!n)return!1;try{if(!t||!n.contains(t)||!n.contains(r))return!1}catch{return!1}return md(t)===e&&e.read("latest",()=>!mE(t))}function ub(e){return e instanceof Fd}function md(e){let t=e;for(;t!=null;){const r=Jp(t);if(ub(r))return r;t=ac(t)}return null}function Jp(e){return e?e.__lexicalEditor:null}function ku(e){return Bu(e)||e.isToken()}function eo(e){return ku(e)||e.isSegmented()}function Vi(e){return sf(e)&&e.nodeType===3}function oc(e){return sf(e)&&e.nodeType===9}function Dne(e){let t=e;for(;t!=null;){if(Vi(t))return t;t=t.firstChild}return null}function ju(e,t,r){const n=Os[t];if(r!==null&&(e&n)===(r&n))return e;let i=e^n;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function G4(e){return fe(e)||_i(e)||mt(e)}function K4(e,t){const r=(function(){const a=Bx;return Bx=null,a})();if((t=t||r&&r.__key)!=null)return void(e.__key=t);Rn(),P4();const n=Wt(),i=Gs(),o=""+Tne++;i._nodeMap.set(o,e),H(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType===0&&(n._dirtyType=1),e.__key=o}function ws(e){Wn(e)!==null&&ae(380,e.__key,String(Wn(e)));const t=e.getParent();if(t!==null){const r=e.getWritable(),n=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling(),a=o!==null?o.__key:null,s=i!==null?i.__key:null,l=i!==null?i.getWritable():null,c=o!==null?o.getWritable():null;i===null&&(n.__first=a),o===null&&(n.__last=s),l!==null&&(l.__next=a),c!==null&&(c.__prev=s),r.__prev=null,r.__next=null,r.__parent=null,n.__size--}}function q0(e){P4(),F0(e)&&ae(323,e.__key,e.__type);const t=e.getLatest(),r=t.__parent!==null?t.__parent:Gu(t)?t.__slotHost:null,n=Gs(),i=Wt(),o=n._nodeMap,a=i._dirtyElements;r!==null&&(function(l,c,d){let f=l;for(;f!==null;){if(d.has(f))return;const h=c.get(f);if(h===void 0)break;d.set(f,!1),f=h.__parent!==null?h.__parent:Gu(h)?h.__slotHost:null}})(r,o,a);const s=t.__key;i._dirtyType===0&&(i._dirtyType=1),H(e)?a.set(s,!0):i._dirtyLeaves.add(s)}function An(e){Rn();const t=Wt(),r=t._compositionKey;if(e!==r){if(t._compositionKey=e,r!==null){const n=mr(r);n!==null&&n.getWritable()}if(e!==null){const n=mr(e);n!==null&&n.getWritable()}}}function Es(){return Dd()?null:Wt()._compositionKey}function mr(e,t){const r=(t||Gs())._nodeMap.get(e);return r===void 0?null:r}function H4(e,t){const r=af(e,Wt());return r!==void 0?mr(r,t):null}function W4(e,t,r){e[`__lexicalKey_${t._key}`]=r}function af(e,t){return e[`__lexicalKey_${t._key}`]}function qu(e,t){let r=e;for(;r!=null;){const n=H4(r,t);if(n!==null)return n;r=ac(r)}return null}function J4(e){const t=e._decorators,r=Object.assign({},t);return e._pendingDecorators=r,r}function z$(e){return e.read(()=>un().getTextContent())}function un(){return Gs()._nodeMap.get("root")}function In(e){Rn();const t=Gs();e!==null&&(e.dirty=!0,e.setCachedNodes(null),ue(e)&&Wt()._slotsUsed&&N4(e)),t._selection=e}function U$(){Rn(),$6(Wt())}function Xc(e){const t=(function(r,n){let i=r;for(;i!=null;){const o=af(i,n);if(o!==void 0)return o;i=ac(i)}return null})(e,Wt());return t===null?null:mr(t)}function Q4(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function gE(e){const t=[];for(let r=e;r!==null;r=r._parentEditor)t.push(r);return t}function Y4(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function X4(e){return Vi(e)?e.nodeValue:null}function vE(e,t,r){const n=Si(Gi(t));if(n===null)return;const i=Oo(n,t._rootElement),o=i.anchorNode;let{anchorOffset:a,focusOffset:s}=i;if(o!==null){let l=X4(o);const c=qu(o);if(l!==null&&fe(c)){if((l===Wh||l===tE)&&r){const d=r.length;l=r,a=d,s=d}l!==null&&bE(c,l,a,s,e)}}}function bE(e,t,r,n,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const a=o.isComposing();if(o.isToken()&&a)return;let s=t;if((a||i)&&(t.endsWith(Wh)&&(s=t.slice(0,-Wh.length)),i)){const c=tE;let d;for(;(d=s.indexOf(c))!==-1;)s=s.slice(0,d)+s.slice(d+c.length),r!==null&&r>d&&(r=Math.max(d,r-c.length)),n!==null&&n>d&&(n=Math.max(d,n-c.length))}const l=o.getTextContent();if(i||s!==l){const c=xe();if(s===""){if(An(null),qp||Ml||Vp)o.remove();else{const g=Wt();ry(o,"",c),setTimeout(()=>{g.update(()=>{o.isAttached()&&o.getTextContent()===""&&o.remove()})},20)}return}const d=o.getParent(),f=ef(),h=o.getTextContentSize(),p=Es(),m=o.getKey();if(o.isToken()&&!a||p!==null&&m===p&&!a||ue(f)&&(d!==null&&!d.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===e.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!a||f.focus.key===e.__key&&f.focus.offset===h&&!o.canInsertTextAfter()&&!a))return void o.markDirty();if(!ue(c)||r===null||n===null)return void ry(o,s,c);if(c.setTextNodeRange(o,r,o,n),o.isSegmented()){const g=Pr(o.getTextContent());o.replace(g),o=g}ry(o,s,c)}}}function ry(e,t,r){if(e.setTextContent(t),ue(r)){const n=e.getKey();let i=!1;for(const o of["anchor","focus"]){const a=r[o];a.type==="text"&&a.key===n&&(a.offset=qa(e,a.offset,"clamp"),i=!0)}i&&(r._cachedNodes=null,r._cachedIsBackward=null)}}function qm(e,t,r){const n=t[r]||!1;return n==="any"||n===e[r]}function Fne(e,t){return qm(e,t,"altKey")&&qm(e,t,"ctrlKey")&&qm(e,t,"shiftKey")&&qm(e,t,"metaKey")}function sr(e,t,r){if(!Fne(e,r))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;if(e.code.startsWith("Digit")&&/^\d$/.test(t))return e.code===`Digit${t}`;const n="Key"+t.toUpperCase();return e.code===n}const ds={ctrlKey:!Yo,metaKey:Yo},B$={altKey:Yo,ctrlKey:!Yo};function j$(e){return e.key==="Backspace"}function Ine(e){const t=un();if(ue(e)){const r=e.anchor,n=e.focus,i=r.getNode();if(Mr(i))return r.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),yl(e),e;const o=i.getTopLevelElementOrThrow(),a=o.getParent();if(a===null)return H(o)&&(r.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),yl(e)),e;const s=a;return r.set(s.getKey(),0,"element"),n.set(s.getKey(),s.getChildrenSize(),"element"),yl(e),e}{const r=t.select(0,t.getChildrenSize());return In(yl(r)),r}}function gd(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const r=e.__lexicalClassNameCache,n=r[t];if(n!==void 0)return n;const i=e[t];if(typeof i=="string"){const o=As(i);return r[t]=o,o}return i}function _E(e,t,r,n,i){if(r.size===0)return;const o=n.__type,a=n.__key,s=t.get(o);s===void 0&&ae(33,o);const l=s.klass;let c=e.get(l);c===void 0&&(c=new Map,e.set(l,c));const d=c.get(a),f=d==="destroyed"&&i==="created";(d===void 0||f)&&c.set(a,f?"updated":i)}function q$(e,t,r){const n=e.getParent();let i=r,o=e;return n!==null&&(r===0&&(i=o.getIndexWithinParent(),o=n)),o.getChildAtIndex(i-1)}function Pne(e,t){const r=e.offset;if(e.type==="element")return q$(e.getNode(),t,r);{const n=e.getNode();if(r===0||!t){const i=n.getPreviousSibling();return i===null?q$(n.getParentOrThrow(),t,n.getIndexWithinParent()+0):i}}return null}function Z4(e){const t=Gi(e).event,r=t&&t.inputType;return r==="insertFromPaste"||r==="insertFromPasteAsQuotation"}function $e(e,t,r){return z4(e,t,r,e)}function Id(e,t){const r=e._keyToDOMMap.get(t);return r===void 0&&ae(75,t),r}function ac(e){const t=e.assignedSlot||e.parentElement;if(t!==null)return t;const r=e.parentNode;return Ms(r)?r.host:null}function yE(e){return oc(e)?e:it(e)?e.ownerDocument:null}function Vu(e){Rn(),Wt()._updateTags.add(e)}function One(e){Rn(),Wt()._deferred.push(e)}function Pd(e,t){let r=e.getParent();for(;r!==null;){if(r.is(t))return!0;r=r.getParent()}return!1}function xE(e){const t=yE(e);return t?t.defaultView:null}function Gi(e){const t=e._window;return t===null&&ae(78),t}function Mne(e){return H(e)&&e.isInline()||mt(e)&&e.isInline()}function eL(e){let t=e.getLatest();for(;t!==null;){if(Wn(t)!==null&&H(t))return t;const r=t.getParentOrThrow();if(br(r))return r;t=r}return t}function vd(e){return H(e)&&e.isShadowRoot()}function br(e){return Mr(e)||vd(e)}function oi(e,t=!1){const r=e.constructor.clone(e);return K4(r,null),r.afterCloneFrom(e),t||r.resetOnCopyNodeFrom(e),r}function ya(e){const t=Wt(),r=e.getType(),n=pE(t,r);n===void 0&&ae(200,e.constructor.name,r);const{replace:i,replaceWithKlass:o}=n;if(i!==null){const a=i(e),s=a.constructor;return o!==null?a instanceof o||ae(201,o.name,o.getType(),s.name,s.getType(),e.constructor.name,r):a instanceof e.constructor&&s!==e.constructor||ae(202,s.name,s.getType(),e.constructor.name,r),a.__key===e.__key&&ae(203,e.constructor.name,r,s.name,s.getType()),a}return e}function ny(e,t){!Mr(e.getParent())||H(t)||mt(t)||ae(99)}function Lne(e){const t=mr(e);return t===null&&ae(63,e),t}function Xg(e){if(!e||e.isInline())return!1;if(mt(e))return!0;if(H(e)){if(e.isShadowRoot()){const t=e.getParent();return!(H(t)&&t.isShadowRoot())}return!e.canBeEmpty()}return!1}function V0(e,t,r){r.style.removeProperty("caret-color"),t._blockCursorElement=null;const n=e.parentElement;n!==null&&n.removeChild(e)}function Si(e){return _a?(e||window).getSelection():null}function zne(e){const t=xE(e);return t?t.getSelection():null}function Ms(e){return qx(e)&&"host"in e}const Une=[];function tL(e){const t=e.getRootNode();if(t===e||!Ms(t))return Une;const r=[t];let n=t.host;for(;;){const i=n.getRootNode();if(i===n||!Ms(i))break;r.push(i),n=i.host}return r}function*rL(e){const t=[e];let r;for(;r=t.pop();){yield*r.querySelectorAll('[data-lexical-editor="true"]');const n=(oc(r)?r:r.ownerDocument).createTreeWalker(r,NodeFilter.SHOW_ELEMENT);let i;for(;i=n.nextNode();)i.shadowRoot&&t.push(i.shadowRoot)}}function nL(e){return e!==null?e.ownerDocument:document}function gr(){const e=M4();return nL(e!==null?e._rootElement:null)}function cb(e,t){if(t===null||typeof e.getComposedRanges!="function")return null;const r=tL(t);if(r.length===0)return null;const n=e.getComposedRanges;try{const i=n.call(e,{shadowRoots:r})[0];if(i!==void 0)return i}catch{}try{const i=n.apply(e,r)[0];if(i!==void 0)return i}catch{}return null}function Bne(e,t){const r=cb(e,t);if(r!==null){const n=jne(r);if(n!==null)return n}return e.rangeCount>0?e.getRangeAt(0):null}function Oo(e,t){const r=cb(e,t);return r===null?e:qne(r,Vne(e))}function jne(e){const t=e.startContainer.ownerDocument;if(t===null)return null;const r=t.createRange();try{return r.setStart(e.startContainer,e.startOffset),r.setEnd(e.endContainer,e.endOffset),r}catch{return null}}function qne(e,t){const{startContainer:r,startOffset:n,endContainer:i,endOffset:o}=e;return t==="backward"?{anchorNode:i,anchorOffset:o,direction:t,focusNode:r,focusOffset:n}:{anchorNode:r,anchorOffset:n,direction:t,focusNode:i,focusOffset:o}}function Vne(e){return e.direction}function jx(e){const t=e.getRootNode();return oc(t)||Ms(t)?t.activeElement:null}function ap(e){let t=e.activeElement;for(;t!==null&&t.shadowRoot!==null;){const r=t.shadowRoot.activeElement;if(r===null)break;t=r}return t}function iL(e){const t=e.target;if(t!==null&&it(t)&&t.shadowRoot!==null&&typeof e.composedPath=="function"){const r=e.composedPath();if(r.length>0)return r[0]}return t}function oL(e){return it(e)&&e.tagName==="A"}function it(e){return sf(e)&&e.nodeType===1}function sf(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function qx(e){return sf(e)&&e.nodeType===11}const Gne=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function G0(e){return!(!it(e)||!e.style.display.startsWith("inline"))||Gne.test(e.nodeName)}const Kne=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function Od(e){return(!it(e)||!e.style.display.startsWith("inline"))&&Kne.test(e.nodeName)}function qn(e){if(mt(e)&&!e.isInline())return!0;if(!H(e)||br(e))return!1;const t=e.getFirstChild(),r=t===null||_i(t)||fe(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&r}function Fr(){return Wt()}function db(e=Fr()){return e._config.dom||j0}function Mo(e,t,r=Fr()){const n=db(r).$getDOMSlot(e,t,r);return H(e)&&(Hne(n)||ae(344,e.getKey(),e.getType())),n}function Hne(e){return e instanceof ud}function Tl(e,t,r=Fr()){return Dne(Mo(e,t,r).element)}const V$=new WeakMap,Wne=new Map;function G$(e){if(!e._readOnly&&e.isEmpty())return Wne;e._readOnly||ae(192);let t=V$.get(e);return t||(t=(function(r){const n=new Map;for(const[i,o]of r._nodeMap){const a=o.__type;let s=n.get(a);s||(s=new Map,n.set(a,s)),s.set(i,o)}return n})(e),V$.set(e,t)),t}function aL(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function Jne(e){return(t=aL(e))[p4]=!0,t;var t}function sc(e,t){const r=e.getAttribute("data-lexical-indent");if(r!==null){const o=parseInt(r,10);if(Number.isFinite(o)&&o>=0)return void t.setIndent(o)}const n=parseInt(e.style.paddingInlineStart,10)||0,i=Math.round(n/40);t.setIndent(i)}function qo(e,t){const r=t.getAttribute("dir");return r==="ltr"||r==="rtl"?e.setDirection(r):e}function ts(e,t){const r=t.style.textAlign;return r&&r in A0?e.setFormat(r):e}function Qne(e,t){e.__lexicalUnmanaged=!0,t&&t.captureSelection!==void 0&&(e.__lexicalCapturedSelection=t.captureSelection)}function sL(e){return e.__lexicalUnmanaged===!0}function Yne(e,t=Fr()){const r=t.isEditable();e.contentEditable=r?"true":"false",r?e.__lexicalEditor=t:delete e.__lexicalEditor}function K0(e,t){let r=e;for(;r!=null;){if(r.__lexicalCapturedSelection===!0)return!0;if(it(r)&&r.hasAttribute("data-lexical-slot")||af(r,t)!==void 0)return!1;r=ac(r)}return!1}function Lf(e,t){return(function(r,n){return Object.prototype.hasOwnProperty.call(r,n)})(e,t)&&e[t]!==oo[t]}const K$=new WeakMap;function SE(e){const t=K$.get(e);if(t)return t;const r=e.prototype!=null&&GA in e.prototype?e.prototype[GA]():void 0,n=(function(l){if(!(l===oo||l.prototype instanceof oo)){let c="<unknown>",d="<unknown>";try{c=l.getType()}catch{}try{Fd.version&&(d=JSON.parse(Fd.version))}catch{}ae(290,l.name,c,d)}return l===uE||l===ji||l===oo})(e),i=!n&&Lf(e,"getType")?e.getType():void 0;let o,a=i;if(r)if(i)o=r[i];else{for(const[l,c]of Object.entries(r))a=l,o=c;if(!o)for(const l of Object.getOwnPropertySymbols(r)){const c=r[l];if(c){o=c;break}}}if(!n&&a&&(Lf(e,"getType")||(e.getType=()=>a),Lf(e,"clone")||(e.clone=l=>(hE(l),new e)),Lf(e,"importJSON")||(e.importJSON=o&&o.$importJSON||(l=>new e().updateFromJSON(l))),!Lf(e,"importDOM")&&o)){const{importDOM:l}=o;l&&(e.importDOM=()=>l)}const s={klass:e,ownNodeConfig:o,ownNodeType:a};return K$.set(e,s),s}function*wE(e){for(let t=e;t&&(t===oo||m4(t.prototype));){const r=SE(t);yield r,t=r.ownNodeConfig&&r.ownNodeConfig.extends||uL(t)}}function lL(e){const t=Fr();return Rn(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const cr=(e,t)=>{let r=e;for(;r!=null&&!Mr(r);){if(t(r))return r;r=r.getParent()}return null};function H0(e,t){const r=[];let n=e.__first;for(;n!==null;){const i=t===null?mr(n):t.get(n);i==null&&ae(174),r.push(n),n=i.__next}return r}function uL(e){const t=Object.getPrototypeOf(e);if(typeof t=="function"&&t!==Function.prototype)return t;const r=e.prototype&&Object.getPrototypeOf(e.prototype);return r?r.constructor:null}const cL=new Map;function Rs(e){return H(e)||mt(e)}function Gu(e){return H(e)||mt(e)}function Wn(e){const t=e.getLatest();return Gu(t)?t.__slotHost:null}function na(e){const t=Wn(e);if(t===null)return null;const r=mr(t);return H(r)||mt(r)||ae(370),r}function Xne(e){const t=na(e);if(t===null)return null;const r=e.getLatest().__key;for(const[n,i]of hb(t))if(i===r)return n;return null}function fb(e){let t=e.getLatest();for(;t!==null;){if(Wn(t)!==null)return t;t=t.getParent()}return null}function hb(e){const t=e.getLatest();return Rs(t)&&t.__slots!==null?t.__slots:cL}function $o(e){return Array.from(hb(e).keys())}function Ku(e,t){const r=hb(e).get(t);return r===void 0?null:mr(r)}const Zne=["__proto__","constructor","prototype"],H$=Symbol("slotMapOwner");function Vx(e){let t=e.__slots;return t!==null&&t[H$]===e||(t=new Map(t),t[H$]=e,e.__slots=t),t}const W$=new WeakMap,eie=[];function tie(e){for(const{ownNodeConfig:t}of wE(e)){const r=t&&t.slots;if(r)return r}return eie}function dL(e){let t="";for(const r of $o(e)){const n=Ku(e,r);n!==null&&(t+=n.getTextContent())}return t}function J$(e,t,r){const n=r.get(e),i=r.get(t);return n!==void 0?i!==void 0?n-i:-1:i!==void 0?1:e<t?-1:e>t?1:0}function rie(e){const t=e.__slots;if(t===null||t.size<2)return;const r=(function(a){let s=W$.get(a);if(s===void 0){const l=tie(a),c=new Map;for(const d of l)Zne.includes(d)&&ae(371,a.name,d),c.has(d)&&ae(372,a.name,d),c.set(d,c.size);s=c,W$.set(a,s)}return s})(e.constructor);let n=null,i=!0;for(const a of t.keys()){if(n!==null&&J$(n,a,r)>0){i=!1;break}n=a}if(i)return;const o=Array.from(t).sort(([a],[s])=>J$(a,s,r));t.clear();for(const[a,s]of o)t.set(a,s)}function fL(e,t,r){t!=="__proto__"&&t!=="constructor"&&t!=="prototype"||ae(373,t);const n=e.getLatest();if(n.__slots!==null&&n.__slots.get(t)===r.getLatest().__key)return n;(!H(r)&&!mt(r)||r.isInline())&&ae(374,r.__key);const i=e.getWritable(),o=Vx(i),a=o.get(t);a!==void 0&&hL(a);const s=r.getWritable(),l=na(s);if(l!==null){const c=Xne(s);c!==null&&Vx(l.getWritable()).delete(c),s.__slotHost=null}return ws(s),s.__slotHost=i.__key,o.set(t,s.__key),rie(i),(function(){const c=Fr();c._slotsUsed=!0,c._pendingEditorState&&(c._pendingEditorState._slotsUsed=!0)})(),i}function nie(e,t){const r=e.getWritable();if(r.__slots===null)return r;const n=r.__slots.get(t);return n!==void 0&&(hL(n),Vx(r).delete(t)),r}function hL(e){const t=mr(e);if(t===null)return;const r=t.getWritable();Gu(r)||ae(377,e),r.__slotHost=null,r.remove()}const iie={next:"previous",previous:"next"};class EE{origin;constructor(t){this.origin=t}[Symbol.iterator](){return pL({hasNext:Ll,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Ht(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Ht(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,r){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(n===null?this.insert(t):n.replace(t,r)),this}splice(t,r,n="next"){const i=n===this.direction?r:Array.from(r).reverse();let o=this;const a=this.getParentAtCaret(),s=new Map;for(let l=o.getAdjacentCaret();l!==null&&s.size<t;l=l.getAdjacentCaret()){const c=l.origin.getWritable();s.set(c.getKey(),c)}for(const l of i){if(s.size>0){const c=o.getNodeAtCaret();if(c){if(s.delete(c.getKey()),s.delete(l.getKey()),!(c.is(l)||o.origin.is(l))){const d=l.getParent();d&&d.is(a)&&l.remove(),c.replace(l)}}else c===null&&ae(263,Array.from(s).join(" "))}else o.insert(l);o=Ht(l,this.direction)}for(const l of s.values())l.remove();return this}}class sp extends EE{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Lo(t,this.direction)}getParentCaret(t="root"){return Ht(kE(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Jl(this.direction);return Ht(this.getNodeAtCaret(),t)||Lo(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof sp&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const oie={root:Mr,shadowRoot:br};function Jl(e){return iie[e]}function kE(e,t="root"){return e===null||oie[t](e)?null:Wn(e)===null?e:null}class Hu extends EE{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Ht(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return H(this.origin)?Lo(this.origin,this.direction):null}getParentCaret(t="root"){return Ht(kE(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Jl(this.direction);return Ht(this.getNodeAtCaret(),t)||Lo(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof Hu&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof Hu||t instanceof Wu)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Wu extends EE{type="text";offset;constructor(t,r){super(t),this.offset=r}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:zl(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Ht(kE(this.getParentAtCaret(),t),this.direction)}getFlipped(){return zl(this.origin,Jl(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Wu&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof Hu||t instanceof Wu)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Ht(this.origin,this.direction)}}function To(e){return e instanceof Wu}function Ll(e){return e instanceof Hu}function No(e){return e instanceof sp}const aie={next:class extends Wu{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Wu{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},sie={next:class extends Hu{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Hu{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},lie={next:class extends sp{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends sp{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function Ht(e,t){return e?new sie[t](e):null}function zl(e,t,r){return e?new aie[t](e,qa(e,r)):null}function qa(e,t,r="error"){const n=e.getTextContentSize();let i=t==="next"?n:t==="previous"?0:t;return(i<0||i>n)&&(r!=="clamp"&&y6(284,String(t),String(n),e.getKey()),i=i<0?0:n),i}function Q$(e,t){return new cie(e,t)}function Lo(e,t){return H(e)?new lie[t](e):null}function uie(e){return e&&e.getChildCaret()||e}function CE(e){return e&&uie(e.getAdjacentCaret())}class RE{type="node-caret-range";direction;anchor;focus;constructor(t,r,n){this.anchor=t,this.focus=r,this.direction=n}getLatest(){const t=this.anchor.getLatest(),r=this.focus.getLatest();return t===this.anchor&&r===this.focus?this:new RE(t,r,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const o=this[i].getLatest();return To(o)?(function(a,s){const{direction:l,origin:c}=a,d=qa(c,s==="focus"?Jl(l):l);return Q$(a,d-a.offset)})(o,i):null},r=t("anchor"),n=t("focus");if(r&&n){const{caret:i}=r,{caret:o}=n;if(i.isSameNodeCaret(o))return[Q$(i,o.offset-i.offset),null]}return[r,n]}iterNodeCarets(t="root"){const r=To(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),i=To(n),o=a=>a.isSameNodeCaret(n)?null:CE(a)||a.getParentCaret(t);return pL({hasNext:a=>a!==null&&!(i&&n.isSameNodeCaret(a)),initial:r.isSameNodeCaret(n)?null:o(r),map:a=>a,step:o})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class cie{type="slice";caret;distance;constructor(t,r){this.caret=t,this.distance=r}getSliceIndices(){const{distance:t,caret:{offset:r}}=this,n=r+t;return n<r?[n,r]:[r,n]}getTextContent(){const[t,r]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,r)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:r}}=this,[n,i]=this.getSliceIndices(),o=t.getTextContent();return zl(t.setTextContent(o.slice(0,n)+o.slice(i)),r,n)}}function pb(e){return aa(e,Ht(un(),e.direction))}function mb(e){return aa(e,e)}function aa(e,t){return e.direction!==t.direction&&ae(265),new RE(e,t,e.direction)}function pL(e){const{initial:t,hasNext:r,step:n,map:i}=e;let o=t;return{[Symbol.iterator](){return this},next(){if(!r(o))return{done:!0,value:void 0};const a={done:!1,value:i(o)};return o=n(o),a}}}function lp(e,t){const r=Gx(e.origin,t.origin);switch(r===null&&ae(275,e.origin.getKey(),t.origin.getKey()),r.type){case"same":{const n=e.type==="text",i=t.type==="text";return n&&i?(function(o,a){return Math.sign(o-a)})(e.offset,t.offset):e.type===t.type?0:n?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return mL(r)}}function mL(e){const{a:t,b:r}=e,n=t.__key,i=r.__key;let o=t,a=r;for(;o&&a;o=o.getNextSibling(),a=a.getNextSibling()){if(o.__key===i)return-1;if(a.__key===n)return 1}return o===null?1:-1}function Vm(e,t){return t.is(e)}function Y$(e){return H(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function Gx(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const r=new Map;for(let[n,i]=Y$(e);n;i=n,n=n.getParent())r.set(n,i);for(let[n,i]=Y$(t);n;i=n,n=n.getParent()){const o=r.get(n);if(o!==void 0)return o===null?(Vm(e,n)||ae(276),{commonAncestor:n,type:"ancestor"}):i===null?(Vm(t,n)||ae(277),{commonAncestor:n,type:"descendant"}):((H(o)||Vm(e,o))&&(H(i)||Vm(t,i))&&n.is(o.getParent())&&n.is(i.getParent())||ae(278),{a:o,b:i,commonAncestor:n,type:"branch"})}return null}function Oi(e,t){const{type:r,key:n,offset:i}=e,o=Lne(e.key);return r==="text"?(fe(o)||ae(266,o.getType(),n),zl(o,t,i)):(H(o)||ae(267,o.getType(),n),Hx(o,e.offset,t))}function Ju(e,t){const{origin:r,direction:n}=t,i=n==="next";To(t)?e.set(r.getKey(),t.offset,"text"):Ll(t)?fe(r)?e.set(r.getKey(),qa(r,n),"text"):e.set(r.getParentOrThrow().getKey(),r.getIndexWithinParent()+(i?1:0),"element"):(No(t)&&H(r)||ae(268),e.set(r.getKey(),i?0:r.getChildrenSize(),"element"))}function up(e){const t=xe(),r=ue(t)?t:sE();return Zg(r,e),In(r),r}function Zg(e,t){Ju(e.anchor,t.anchor),Ju(e.focus,t.focus)}function Kx(e){const{anchor:t,focus:r}=e,n=Oi(t,"next"),i=Oi(r,"next"),o=lp(n,i)<=0?"next":"previous";return aa(Ls(n,o),Ls(i,o))}function lc(e){const{direction:t,origin:r}=e,n=Ht(r,Jl(t)).getNodeAtCaret();return n?Ht(n,t):Lo(r.getParentOrThrow(),t)}function X$(e,t="root"){const r=[e];for(let n=No(e)?e.getParentCaret(t):e.getSiblingCaret();n!==null;n=n.getParentCaret(t))r.push(lc(n));return r}function iy(e){return!!e&&e.origin.isAttached()}function die(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const r="root",n="next";let i=t;const o=$E(e,n),a=X$(o.anchor,r),s=X$(o.focus.getFlipped(),r),l=new Set,c=[];for(const m of o.iterNodeCarets(r))if(No(m))l.add(m.origin.getKey());else if(Ll(m)){const{origin:g}=m;H(g)&&!l.has(g.getKey())||c.push(g)}for(const m of c)m.remove();for(const m of o.getTextSlices()){if(!m)continue;const{origin:g}=m.caret,v=g.getTextContentSize(),b=lc(Ht(g,n)),y=g.getMode();if(Math.abs(m.distance)===v&&i==="removeEmptySlices"||y==="token"&&m.distance!==0)b.remove();else if(m.distance!==0){i="removeEmptySlices";let S=m.removeTextSlice();const w=m.caret.origin;if(y==="segmented"){const C=S.origin,A=Pr(C.getTextContent()).setStyle(C.getStyle()).setFormat(C.getFormat());b.replaceOrInsert(A),S=zl(A,n,S.offset)}w.is(a[0].origin)&&(a[0]=S),w.is(s[0].origin)&&(s[0]=S.getFlipped())}}let d,f;for(const m of a)if(iy(m)){d=to(m);break}for(const m of s)if(iy(m)){f=to(m);break}const h=(function(m,g,v){if(!m||!g)return null;const b=m.getParentAtCaret(),y=g.getParentAtCaret();if(!b||!y)return null;const S=b.getParents().reverse();S.push(b);const w=y.getParents().reverse();w.push(y);const C=Math.min(S.length,w.length);let A;for(A=0;A<C&&S[A]===w[A];A++);const T=(I,M)=>{let P;for(let B=A;B<I.length;B++){const j=I[B];if(br(j))return;!P&&M(j)&&(P=j)}return P},R=T(S,qn),N=R&&T(w,I=>v.has(I.getKey())&&qn(I));return N&&$o(N).length>0?null:R&&N?[R,N]:null})(d,f,l);if(h){const[m,g]=h;Lo(m,"previous").splice(0,g.getChildren());let v=g.getParent();for(g.remove(!0);v&&v.isEmpty();){const b=v;v=v.getParent(),b.remove(!0)}}else if(f){const m=(function(b){if(No(b)){const y=b.origin;if(qn(y))return y}else{const y=b.getParentAtCaret();if(y&&qn(y))return y}return null})(f),g=m&&m.getParent(),v=m&&m.getParents().findLast(vd);if(m&&g&&!Mr(g)&&m.isEmpty()&&l.has(m.getKey())&&$o(m).length===0&&(!v||l.has(v.getKey()))){m.remove(!0);let b=g;for(;b&&!Mr(b)&&b.isEmpty();){const y=b.getParent();if(y&&Mr(y)&&y.getChildrenSize()<=1)break;const S=b;b=y,S.remove(!0)}}}const p=[d,f,...a,...s].find(iy);if(p)return mb(Ls(to(p),e.direction));ae(269,JSON.stringify(a.map(m=>m.origin.__key)))}function to(e){const t=(function(i){let o=i;for(;No(o);){const a=CE(o);if(!No(a))break;o=a}return o})(e.getLatest()),{direction:r}=t;if(fe(t.origin))return To(t)?t:zl(t.origin,r,r);const n=t.getAdjacentCaret();return Ll(n)&&fe(n.origin)?zl(n.origin,r,Jl(r)):t}function AE(e){return To(e)&&e.offset!==qa(e.origin,e.direction)}function Ls(e,t){return e.direction===t?e:e.getFlipped()}function $E(e,t){return e.direction===t?e:aa(Ls(e.focus,t),Ls(e.anchor,t))}function Hx(e,t,r){let n=Lo(e,"next");for(let i=0;i<t;i++){const o=n.getAdjacentCaret();if(o===null)break;n=o}return Ls(n,r)}function fie(e){const{origin:t,offset:r,direction:n}=e;if(r===qa(t,n))return e.getSiblingCaret();if(r===qa(t,Jl(n)))return lc(e.getSiblingCaret());const[i]=t.splitText(r);return fe(i)||ae(281),Ls(Ht(i,"next"),n)}function hie(e,t){return!0}function gL(e,{$copyElementNode:t=oi,$splitTextPointCaretNext:r=fie,rootMode:n="shadowRoot",$shouldSplit:i=hie,removeEmptyDestination:o=!1}={}){if(To(e))return r(e);const a=e.getParentCaret(n);if(a){const{origin:s}=a;if(No(e)){const c=lc(a);if(o&&s.isEmpty())return s.remove(),c;if(!s.canBeEmpty()||!i(s,"first"))return c}const l=(function(c){const d=[];for(let f=c.getAdjacentCaret();f;f=f.getAdjacentCaret())d.push(f.origin);return d})(e);(l.length>0||!o&&s.canBeEmpty()&&i(s,"last"))&&a.insert(t(s).splice(0,0,l))}return a}function vL(e,t,r){let n=Ls(t,"next");To(n)&&(n.offset===0?n=Ht(n.origin,"previous").getFlipped():n.offset===n.origin.getTextContentSize()&&(n=Ht(n.origin,"next"))),n.origin.is(e)&&(Ll(n)||ae(342,e.getKey(),e.getType()),n=lc(n)),(e.is(n.getNodeAtCaret())||e.is(n.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let i=n;i;i=gL(i,r))n=i;return To(n)&&ae(283),n.insert(e.isInline()?Xt().append(e):e),Ls(Ht(e.getLatest(),"next"),t.direction)}function TE(e,t){if(!t||e===t)return e;for(const r in t)if(e[r]!==t[r])return{...e,...t};return e}function As(...e){const t=[];for(const r of e)if(r&&typeof r=="string")for(const[n]of r.matchAll(/\S+/g))t.push(n);return t}function Wa(e,...t){const r=As(...t);r.length>0&&e.classList.add(...r)}function NE(e,...t){const r=As(...t);r.length>0&&e.classList.remove(...r)}function Ul(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function bL(e){const t=Fr().getElementByKey(e.getKey());if(t===null)return null;const r=t.ownerDocument.defaultView;return r===null?null:r.getComputedStyle(t)}function _L(e){return bL(Mr(e)?e:e.getParentOrThrow())}function Gm(e){const t=_L(e);return t!==null&&t.direction==="rtl"}function yL(e,t,r="self"){const n=e.getStartEndPoints();if(t.isSelected(e)&&!eo(t)&&n!==null){const[i,o]=n,a=e.isBackward(),s=i.getNode(),l=o.getNode(),c=t.is(s),d=t.is(l);if(c||d){const[f,h]=Mx(e),p=s.is(l),m=t.is(a?l:s),g=t.is(a?s:l);let v,b=0;p?(b=f>h?h:f,v=f>h?f:h):m?(b=a?h:f,v=void 0):g&&(b=0,v=a?f:h);const y=t.__text.slice(b,v);y!==t.__text&&(r==="clone"&&(t=Jne(t)),t.__text=y)}}return t}function pie(e,t){const r=e.getFormatType(),n=e.getIndent();r!==t.getFormatType()&&t.setFormat(r),n!==t.getIndent()&&t.setIndent(n)}function mie(e,t,r){let n=Oi(e,r);if(AE(n))return!1;for(;n;n=n.getParentCaret()){const i=n.getParentAtCaret();if(!i||n.getNodeAtCaret())return!1;if(t.is(i))return!0}return!1}function gie(e,t,r=pie){if(!e)return;const n=e.getStartEndPoints();let i=!1,o=null;const a=new Map;if(n){const[s,l]=n,c=cr(s.getNode(),qn);o=cr(l.getNode(),qn);const d=e.isBackward()?"previous":"next";i=H(o)&&!o.is(c)&&(function(f,h,p){const m=f.getNode();return(!H(m)||!m.isEmpty())&&mie(f,h,p)})(l,o,Jl(d)),H(c)&&a.set(c.getKey(),c),H(o)&&!i&&a.set(o.getKey(),o)}for(const s of e.getNodes())if(H(s)&&qn(s)){if(i&&s.is(o))continue;a.set(s.getKey(),s)}else if(!n){const l=cr(s,qn);H(l)&&a.set(l.getKey(),l)}for(const s of a.values()){const l=t();r(s,l),s.replace(l,!0)}}function xL(e){const t=SL(e);return t!==null&&t.writingMode==="vertical-rl"}function SL(e){const t=e.anchor.getNode();return H(t)?bL(t):_L(t)}function Z$(e,t){let r=xL(e)?!t:t;wL(e)&&(r=!r);const n=Oi(e.focus,r?"previous":"next");if(AE(n))return!1;if(To(n)&&!Bu(n.origin)&&n.origin.isUnmergeable()){const i=n.getNodeAtCaret();if(fe(i)&&!Bu(i))return!0}for(const i of pb(n)){if(No(i))return!i.origin.isInline();if(!H(i.origin)){if(mt(i.origin))return!0;break}}return!1}function vie(e,t,r,n){e.modify(t?"extend":"move",r,n)}function wL(e){const t=SL(e);return t!==null&&t.direction==="rtl"}function eT(e,t,r){const n=wL(e);let i;i=xL(e)||n?!r:r,vie(e,t,i,"character")}function bie(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function _ie(e,t){let r=e;for(;r!=null;){if(r instanceof t)return r;r=r.getParent()}return null}function yie(e){const t=cr(e,r=>H(r)&&!r.isInline());return H(t)||bie(4,e.__key),t}function Sl(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function Km(e){let t=null;if(Sl(e,DragEvent)?t=e.dataTransfer:Sl(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const r=t.types,n=r.includes("Files"),i=r.includes("text/html")||r.includes("text/plain");return[n,Array.from(t.files),i]}function tT(e){const t=xe();if(!ue(t))return!1;const r=new Set,n=t.getNodes();for(let i=0;i<n.length;i++){const o=n[i],a=o.getKey();if(r.has(a))continue;const s=cr(o,c=>H(c)&&!c.isInline());if(s===null)continue;const l=s.getKey();s.canIndent()&&!r.has(l)&&(r.add(l),e(s))}return r.size>0}const xie=Symbol.for("preact-signals");function DE(){if(Cu>1)return void Cu--;let e,t=!1;for(!(function(){let r=W0;for(W0=void 0;r!==void 0;)r.S.v===r.v&&(r.S.i=r.i),r=r.o})();yh!==void 0;){let r=yh;for(yh=void 0,J0++;r!==void 0;){const n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&EL(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(J0=0,Cu--,t)throw e}let tr,yh;function rT(e){const t=tr;tr=void 0;try{return e()}finally{tr=t}}let W0,Cu=0,J0=0,nT=0,e0=0;function iT(e){if(tr===void 0)return;let t=e.n;return t===void 0||t.t!==tr?(t={i:0,S:e,p:tr.s,n:void 0,t:tr,e:void 0,x:void 0,r:t},tr.s!==void 0&&(tr.s.n=t),tr.s=t,e.n=t,32&tr.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=tr.s,t.n=void 0,tr.s.n=t,tr.s=t),t):void 0}function ui(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function Sie(e,t){return new ui(e,t)}function EL(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function oT(e){for(let t=e.s;t!==void 0;t=t.n){const r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function kL(e){let t,r=e.s;for(;r!==void 0;){const n=r.p;r.i===-1?(r.S.U(r),n!==void 0&&(n.n=r.n),r.n!==void 0&&(r.n.p=n)):t=r,r.S.n=r.r,r.r!==void 0&&(r.r=void 0),r=n}e.s=t}function Fc(e,t){ui.call(this,void 0),this.x=e,this.s=void 0,this.g=e0-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function CL(e){const t=e.m;if(e.m=void 0,typeof t=="function"){Cu++;const r=tr;tr=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,FE(e),n}finally{tr=r,DE()}}}function FE(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,CL(e)}function wie(e){if(tr!==this)throw new Error("Out-of-order effect");kL(this),tr=e,this.f&=-2,8&this.f&&FE(this),DE()}function Kc(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}function Eie(e,t){const r=new Kc(e,t);try{r.c()}catch(i){throw r.d(),i}const n=r.d.bind(r);return n[Symbol.dispose]=n,n}ui.prototype.brand=xie,ui.prototype.h=function(){return!0},ui.prototype.S=function(e){const t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t!==void 0?t.e=e:rT(()=>{var r;(r=this.W)==null||r.call(this)}))},ui.prototype.U=function(e){if(this.t!==void 0){const t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&rT(()=>{var n;(n=this.Z)==null||n.call(this)}))}},ui.prototype.subscribe=function(e){return Eie(()=>{const t=this.value,r=tr;tr=void 0;try{e(t)}finally{tr=r}},{name:"sub"})},ui.prototype.valueOf=function(){return this.value},ui.prototype.toString=function(){return this.value+""},ui.prototype.toJSON=function(){return this.value},ui.prototype.peek=function(){const e=tr;tr=void 0;try{return this.value}finally{tr=e}},Object.defineProperty(ui.prototype,"value",{get(){const e=iT(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(J0>100)throw new Error("Cycle detected");(function(t){Cu!==0&&J0===0&&t.l!==nT&&(t.l=nT,W0={S:t,v:t.v,i:t.i,o:W0})})(this),this.v=e,this.i++,e0++,Cu++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{DE()}}}}),Fc.prototype=new ui,Fc.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===e0))return!0;if(this.g=e0,this.f|=1,this.i>0&&!EL(this))return this.f&=-2,!0;const e=tr;try{oT(this),tr=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return tr=e,kL(this),this.f&=-2,!0},Fc.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}ui.prototype.S.call(this,e)},Fc.prototype.U=function(e){if(this.t!==void 0&&(ui.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Fc.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Fc.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=iT(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Kc.prototype.c=function(){const e=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}},Kc.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,CL(this),oT(this),Cu++;const e=tr;return tr=this,wie.bind(this,e)},Kc.prototype.N=function(){2&this.f||(this.f|=2,this.u=yh,yh=this)},Kc.prototype.d=function(){this.f|=8,1&this.f||FE(this)},Kc.prototype.dispose=function(){this.d()};function kie(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}function pr(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let RL;try{RL="0.48.0+prod.esm"}catch{}const Cie=RL??'"<unknown>+source"',Rie=new Set(["__proto__","constructor","prototype"]);function AL(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const r=e,n=t;for(const i in n)!Rie.has(i)&&Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=AL(r[i],n[i]));return e}return t}const IE=0,Wx=1,$L=2,oy=3,Hm=4,Ic=5,ay=6,zf=7;function sy(e){return e.id===IE}function TL(e){return e.id===$L}function Aie(e){return(function(t){return t.id===Wx})(e)||pr(305,String(e.id),String(Wx)),Object.assign(e,{id:$L})}const $ie=new Set;let Tie=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(t,r){this.builder=t,this.extension=r,this.configs=new Set,this.state={id:IE}}mergeConfigs(){let t=this.extension.config||{};const r=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):TE;for(const n of this.configs)t=r(t,n);return t}init(t){const r=this.state;TL(r)||pr(306,String(r.id));const n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},o=(function(s,l,c){return Object.assign(s,{config:l,id:oy,registerState:c})})(r,this.mergeConfigs(),n);let a;this.state=o,this.extension.init&&(a=this.extension.init(t,o.config,n)),this.state=(function(s,l,c){return Object.assign(s,{id:Hm,initResult:l,registerState:c})})(o,a,i)}build(t){const r=this.state;let n;r.id!==Hm&&pr(307,String(r.id),String(Ic)),this.extension.build&&(n=this.extension.build(t,r.config,r.registerState));const i={...r.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=(function(o,a,s){return Object.assign(o,{id:Ic,output:a,registerState:s})})(r,n,i)}register(t,r){this._signal=r;const n=this.state;n.id!==Ic&&pr(308,String(n.id),String(Ic));const i=this.extension.register&&this.extension.register(t,n.config,n.registerState);return this.state=(function(o){return Object.assign(o,{id:ay})})(n),()=>{const o=this.state;o.id!==zf&&pr(309,String(n.id),String(zf)),this.state=(function(a){return Object.assign(a,{id:Ic})})(o),i&&i()}}afterRegistration(t){const r=this.state;let n;return r.id!==ay&&pr(310,String(r.id),String(ay)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(t,r.config,r.registerState)),this.state=(function(i){return Object.assign(i,{id:zf})})(r),n}getSignal(){return this._signal===void 0&&pr(311),this._signal}getInitResult(){this.extension.init===void 0&&pr(312,this.extension.name);const t=this.state;return(function(r){return r.id>=Hm})(t)||pr(313,String(t.id),String(Hm)),t.initResult}getInitPeer(t){const r=this.builder.extensionNameMap.get(t);return r?r.getExtensionInitDependency():void 0}getExtensionInitDependency(){const t=this.state;return(function(r){return r.id>=oy})(t)||pr(314,String(t.id),String(oy)),{config:t.config}}getPeer(t){const r=this.builder.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}getInitDependency(t){const r=this.builder.getExtensionRep(t);return r===void 0&&pr(315,this.extension.name,t.name),r.getExtensionInitDependency()}getDependency(t){const r=this.builder.getExtensionRep(t);return r===void 0&&pr(315,this.extension.name,t.name),r.getExtensionDependency()}getState(){const t=this.state;return(function(r){return r.id>=zf})(t)||pr(316,String(t.id),String(zf)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||$ie}getPeerNameSet(){let t=this._peerNameSet;return t||(t=new Set((this.extension.peerDependencies||[]).map(([r])=>r)),this._peerNameSet=t),t}getExtensionDependency(){if(!this._dependency){const t=this.state;(function(r){return r.id>=Ic})(t)||pr(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}};const aT={tag:bh};function Nie(){const e=un();e.isEmpty()&&e.append(Xt())}const Die={config:{setOptions:aT,updateOptions:aT},init:({$initialEditorState:e=Nie})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:r},n){const i=n.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:o}=i;if(Sne(o))e.setEditorState(o,r);else if(typeof o=="function")e.update(()=>{o(e)},t);else if(o&&(typeof o=="string"||typeof o=="object")){const a=e.parseEditorState(o);e.setEditorState(a,r)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[tf,Vs,rf,Xd,nf]},sT=Symbol.for("@lexical/extension/LexicalBuilder");function lT(){}function Fie(e){throw e}function Wm(e){return Array.isArray(e)?e:[e]}const ly=Cie;class xh{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(t){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=ly,this.roots=t;for(const r of t)this.addExtension(r)}static fromExtensions(t){const r=[Wm(Die)];for(const n of t)r.push(Wm(n));return new xh(r)}static maybeFromEditor(t){const r=t[sT];return r&&(r.PACKAGE_VERSION!==ly&&pr(292,r.PACKAGE_VERSION,ly),r instanceof xh||pr(293)),r}static fromEditor(t){const r=xh.maybeFromEditor(t);return r===void 0&&pr(294),r}constructEditor(){const{$initialEditorState:t,onError:r,onWarn:n,...i}=this.buildCreateEditorArgs(),o=Object.assign(fE({...i,...r?{onError:a=>{r(a,o)}}:{},...n?{onWarn:a=>{n(a,o)}}:{}}),{[sT]:this});for(const a of this.sortedExtensionReps())a.build(o);return o}buildEditor(){let t=lT;function r(){try{t()}finally{t=lT}}const n=Object.assign(this.constructEditor(),{dispose:r,[Symbol.dispose]:r});return t=Ul(this.registerEditor(n),()=>n.setRootElement(null)),n}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const r=this.extensionNameMap.get(t.name);if(r)return r.extension!==t&&pr(295,t.name),r}addEdge(t,r,n){const i=this.outgoingConfigEdges.get(t);i?i.set(r,n):this.outgoingConfigEdges.set(t,new Map([[r,n]]));const o=this.incomingEdges.get(r);o?o.add(t):this.incomingEdges.set(r,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&pr(296);const r=Wm(t),[n]=r;typeof n.name!="string"&&pr(297,typeof n.name);let i=this.extensionNameMap.get(n.name);if(i!==void 0&&i.extension!==n&&pr(298,n.name),!i){i=new Tie(this,n),this.extensionNameMap.set(n.name,i);const o=this.conflicts.get(n.name);typeof o=="string"&&pr(299,n.name,o);for(const a of n.conflictsWith||[])this.extensionNameMap.has(a)&&pr(299,n.name,a),this.conflicts.set(a,n.name);for(const a of n.dependencies||[]){const s=Wm(a);this.addEdge(n.name,s[0].name,s.slice(1)),this.addExtension(s)}for(const[a,s]of n.peerDependencies||[])this.addEdge(n.name,a,s?[s]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],r=(n,i)=>{let o=n.state;if(TL(o))return;const a=n.extension.name;var s;sy(o)||pr(300,a,i||"[unknown]"),sy(s=o)||pr(304,String(s.id),String(IE)),o=Object.assign(s,{id:Wx}),n.state=o;const l=this.outgoingConfigEdges.get(a);if(l)for(const c of l.keys()){const d=this.extensionNameMap.get(c);d&&r(d,a)}o=Aie(o),n.state=o,t.push(n)};for(const n of this.extensionNameMap.values())sy(n.state)&&r(n);for(const n of t)for(const[i,o]of this.outgoingConfigEdges.get(n.extension.name)||[])if(o.length>0){const a=this.extensionNameMap.get(i);if(a)for(const s of o)a.configs.add(s)}for(const[n,...i]of this.roots)if(i.length>0){const o=this.extensionNameMap.get(n.name);o===void 0&&pr(301,n.name);for(const a of i)o.configs.add(a)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const r=this.sortedExtensionReps(),n=new AbortController,i=[()=>n.abort()],o=n.signal;for(const a of r){const s=a.register(t,o);s&&i.push(s)}for(const a of r){const s=a.afterRegistration(t);s&&i.push(s)}return Ul(...i)}buildCreateEditorArgs(){const t={},r=new Set,n=new Map,i=new Map,o={},a={},s=this.sortedExtensionReps();for(const d of s){const{extension:f}=d;if(f.onError!==void 0&&(t.onError=f.onError),f.onWarn!==void 0&&(t.onWarn=f.onWarn),f.disableEvents!==void 0&&(t.disableEvents=f.disableEvents),f.parentEditor!==void 0&&(t.parentEditor=f.parentEditor),f.editable!==void 0&&(t.editable=f.editable),f.namespace!==void 0&&(t.namespace=f.namespace),f.$initialEditorState!==void 0&&(t.$initialEditorState=f.$initialEditorState),f.nodes)for(const h of kie(f)){if(typeof h!="function"){const p=n.get(h.replace);p&&pr(302,f.name,h.replace.name,p.extension.name),n.set(h.replace,d)}r.add(h)}if(f.html){if(f.html.export)for(const[h,p]of f.html.export.entries())i.set(h,p);f.html.import&&Object.assign(o,f.html.import)}f.theme&&AL(a,f.theme)}Object.keys(a).length>0&&(t.theme=a),r.size&&(t.nodes=[...r]);const l=Object.keys(o).length>0,c=i.size>0;(l||c)&&(t.html={},l&&(t.html.import=o),c&&(t.html.export=i));for(const d of s)d.init(t);return t.onError||(t.onError=Fie),t}}function Qp(e,t){const r=xh.maybeFromEditor(e);if(!r)return;const n=r.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}function Iie(e){return Qp(Fr(),e)}class gb extends uE{static getType(){return"horizontalrule"}static clone(t){return new gb(t.__key)}static importJSON(t){return PE().updateFromJSON(t)}static importDOM(){return{hr:()=>({conversion:Pie,priority:0})}}exportDOM(){return{element:gr().createElement("hr")}}createDOM(t){const r=gr().createElement("hr");return Wa(r,t.theme.hr),r}getTextContent(){return`
|
|
28
|
+
`}isInline(){return!1}updateDOM(){return!1}}function Pie(){return{node:PE()}}function PE(){return lL(gb)}function lf(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let bd;function NL(e,t){const{key:r}=t;return e&&r in e?e[r]:t.defaultValue}function DL(e){return bd&&bd.editor===e?bd:void 0}function Oie(e,t){if("cfg"in t){const{cfg:r,updater:n}=t;return[r,n(NL(e,r))]}return t}function Mie(e,t){let r=t;for(const n of e){const[i,o]=Oie(r,n),a=i.key;if(r===t&&NL(r,i)===o)continue;const s=r===t||r===void 0?Lie(t):r;s[a]=o,r=s}return r}function Lie(e){return Object.create(e||null)}function FL(e,t){return[e,t]}function zie(e,t,r,n=Fr()){const i=bd,o=DL(n);try{return bd={...o,editor:n,[e]:t},r()}finally{bd=i}}function Uie(e,t=()=>{}){return(r,n=Fr())=>i=>{const o=DL(n),a=o&&o[e],s=Mie(r,a||t(n));return s&&s!==a?zie(e,s,i,n):i()}}function IL(e,t,r,n){return Object.assign(Gp(Symbol(t),{isEqual:n,parse:r}),{[e]:!0})}function Bie(e){if(!oc(e))return;const t=e;if(t.querySelector("style")===null)return;const r=new Map;function n(i){let o=r.get(i);if(o===void 0){o=new Set;for(let a=0;a<i.style.length;a++)o.add(i.style[a]);r.set(i,o)}return o}try{for(const i of Array.from(t.styleSheets)){let o;try{o=i.cssRules}catch{continue}for(const a of Array.from(o)){if(!Sl(a,CSSStyleRule))continue;let s;try{s=t.querySelectorAll(a.selectorText)}catch{continue}for(const l of Array.from(s)){if(!it(l))continue;const c=n(l);for(let d=0;d<a.style.length;d++){const f=a.style[d];c.has(f)||l.style.setProperty(f,a.style.getPropertyValue(f),a.style.getPropertyPriority(f))}}}}}catch{}}const PL="@lexical/html/DOM",OL=Symbol.for("@lexical/html/DOMExportContext"),jie=Symbol.for("@lexical/html/DOMImportContext");function qie(e,t,r){return IL(OL,e,t,r)}const Vie=qie("isExport",Boolean);function Gie(e){const t=Qp(e,PL);return t?t.output.defaults:void 0}function Kie(e){const t=Qp(e,PL);return t?t.output.runtime:void 0}function Hie(e=Fr()){const t=Kie(e);return t?t.getSessionConfig():db(e)}const Wie=Uie(OL,Gie),vb=Symbol.for("@lexical/html/SelectorImpl");function cp(e,t){const r={kind:"element",predicate:(n=t,n.length===0?it:n.length===1?n[0]:(o,a)=>{for(const s of n)if(!s(o,a))return!1;return!0}),tags:e};var n;const i=o=>cp(e,[...t,o]);return{[vb]:r,attr:(o,a,s)=>i(Jx(o,a,s)),classAll:(...o)=>i(LL(o)),classAny:(...o)=>i((function(a){const s=ML(a);return s.length===0?()=>!1:l=>{if(!it(l))return!1;const c=l.classList;for(const d of s)if(c.contains(d))return!0;return!1}})(o)),styleAny:(o,a,s)=>i((function(l,c,d){if(typeof c=="string")return f=>it(f)&&f.style.getPropertyValue(l)===c;if(c instanceof RegExp){const f=d&&d.capture,h=c;return(p,m)=>{if(!it(p))return!1;const g=p.style.getPropertyValue(l);if(!g)return!1;const v=g.match(h);return v!==null&&(f!==void 0&&(m[f]=v),!0)}}lf(362,JSON.stringify(l))})(o,a,s))}}function ML(e){const t=[];for(const r of e)r&&t.push(r);return t}function LL(e){const t=ML(e);return t.length===0?()=>!0:r=>{if(!it(r))return!1;const n=r.classList;for(const i of t)if(!n.contains(i))return!1;return!0}}function Jx(e,t,r){if(t===!0)return n=>it(n)&&n.hasAttribute(e);if(typeof t=="string")return n=>it(n)&&n.getAttribute(e)===t;if(t instanceof RegExp){const n=r&&r.capture,i=t;return(o,a)=>{if(!it(o))return!1;const s=o.getAttribute(e);if(s==null)return!1;const l=s.match(i);return l!==null&&(n!==void 0&&(a[n]=l),!0)}}lf(361,JSON.stringify(e))}const Jie={kind:"text",predicate:Vi,tags:new Set},Qie={[vb]:Jie},Yie={kind:"comment",predicate:e=>e.nodeType===8,tags:new Set},Xie={[vb]:Yie},Zc={any:()=>cp(new Set,[]),comment:()=>Xie,tag(...e){e.length>0||lf(363);const t=new Set;for(const r of e)t.add(r.toUpperCase());return cp(t,[])},text:()=>Qie};function zL(e,t){return it(e)&&e.nodeName===t.toUpperCase()}const UL=/[A-Za-z0-9_-]/;let Zie=class{constructor(t,r){this.source=t,this.pos=r}peek(t=0){return this.source[this.pos+t]||""}consume(){return this.source[this.pos++]||""}eof(){return this.pos>=this.source.length}skipWhitespace(){for(;!this.eof()&&/\s/.test(this.peek());)this.pos++}readIdent(){const t=this.pos;for(;!this.eof()&&UL.test(this.peek());)this.pos++;return this.source.slice(t,this.pos)}readQuoted(){const t=this.consume();this.assert(t==='"'||t==="'","expected quote");const r=this.pos;for(;!this.eof()&&this.peek()!==t;)this.peek()==="\\"?this.pos+=2:this.pos++;this.assert(!this.eof(),"unterminated string");const n=this.source.slice(r,this.pos);return this.pos++,n.replace(/\\(.)/g,"$1")}assert(t,r){t||lf(364,String(this.pos+1),r,this.source)}};function eoe(e){const t=new Set,r=[],n=[];if(e.skipWhitespace(),e.peek()==="*")e.consume();else if(UL.test(e.peek())){const i=e.readIdent();i&&t.add(i.toUpperCase())}for(;!e.eof();){const i=e.peek();if(i==="."){e.consume();const o=e.readIdent();e.assert(o!=="",'expected class name after "."'),n.push(o)}else if(i==="#"){e.consume();const o=e.readIdent();e.assert(o!=="",'expected id after "#"'),r.push(Jx("id",o))}else{if(i!=="[")break;{e.consume(),e.skipWhitespace();const o=e.readIdent();e.assert(o!=="",'expected attribute name after "["'),e.skipWhitespace();let a=!0;if(e.peek()==="="){e.consume(),e.skipWhitespace();const s=e.peek();s==='"'||s==="'"?a=e.readQuoted():(a=e.readIdent(),e.assert(a!=="","expected attribute value")),e.skipWhitespace()}e.assert(e.peek()==="]",'expected "]"'),e.consume(),r.push(Jx(o,a))}}}return n.length>0&&r.push(LL(n)),{predicates:r,tags:t}}function toe(e){const t=new Zie(e,0),r=[];for(;;){const i=eoe(t);if(r.push(i),t.skipWhitespace(),t.eof())break;t.assert(t.peek()===",",'expected "," (selector lists are the only supported combinator)'),t.consume(),t.skipWhitespace()}if(r.length===1)return cp(r[0].tags,r[0].predicates);const n=new Set;for(const i of r)for(const o of i.tags)n.add(o);return cp(n,[(i,o)=>{for(const a of r){const s=i.nodeName;if(a.tags.size>0&&!a.tags.has(s))continue;let l=!0;for(const c of a.predicates)if(!c(i,o)){l=!1;break}if(l)return!0}return!1}])}function OE(e,t,r){return IL(jie,e,t,r)}const Qx=OE("textFormat",()=>0),roe=OE("textStyle",()=>({}));function noe(e){if(!it(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function ioe(e){if(Vi(e))return!0;if(!it(e))return!1;const t=e.style.display;return t?t.startsWith("inline"):!Od(e)&&G0(e)}const ooe=OE("whitespaceConfig",()=>({isInline:ioe,preservesWhitespace:noe}));function ME(e){return Nd(e)||mt(e)&&!e.isInline()}function BL(e,t){const r=[];let n=[];const i=()=>{n.length!==0&&(r.push(t().splice(0,0,n)),n=[])};for(const o of e)if(ME(o)){if(i(),H(o)){const a=BL(o.getChildren(),t);o.splice(0,o.getChildrenSize(),a)}r.push(o)}else n.push(o);return i(),r}function jL(e,t){if(!it(t))return e;const r=t.style.textAlign;if(!LE(r))return e;for(const n of e)Nd(n)&&n.getFormatType()===""&&n.setFormat(r);return e}function aoe(e,t,r){e.length===1&&_i(e[0])&&(e=[]);const n=Xt();if(it(r)){const i=r.style.textAlign;LE(i)&&n.setFormat(i)}return[n.splice(0,0,e)]}const qL={$accepts:ME,$packageRun:aoe,name:"BlockSchema"},uc=Zc,soe=new Set(["center","end","justify","left","right","start"]);function LE(e){return soe.has(e)}const loe={B:{fontWeight:"bold"},EM:{fontStyle:"italic"},I:{fontStyle:"italic"},S:{textDecoration:"line-through"},STRONG:{fontWeight:"bold"},SUB:{verticalAlign:"sub"},SUP:{verticalAlign:"super"},U:{textDecoration:"underline"}},uoe={CODE:hre,MARK:eE},coe=new Set(["font-weight","font-style","text-decoration","vertical-align"]),doe={$import:(e,t)=>{const r=e.get(Qx),n=loe[t.nodeName],i=(function(h){return{fontStyle:h.style.fontStyle,fontWeight:h.style.fontWeight,textDecoration:h.style.textDecoration,verticalAlign:h.style.verticalAlign}})(t),o=n?(a=n,{fontStyle:(s=i).fontStyle||a.fontStyle,fontWeight:s.fontWeight||a.fontWeight,textDecoration:s.textDecoration||a.textDecoration,verticalAlign:s.verticalAlign||a.verticalAlign}):i;var a,s;let l=(c=r,d=(function(h){let p=0,m=0;const{fontWeight:g,fontStyle:v,textDecoration:b,verticalAlign:y}=h;if(g==="700"||g==="bold"?p|=BA:g!=="normal"&&g!=="400"||(m|=BA),v==="italic"?p|=jA:v==="normal"&&(m|=jA),b){const S=b.split(" ");S.includes("underline")&&(p|=VA),S.includes("line-through")&&(p|=qA),S.includes("none")&&(m|=VA|qA)}return y==="sub"?(p|=G_,m|=K_):y==="super"?(p|=K_,m|=G_):y==="baseline"&&(m|=G_|K_),{clear:m,set:p}})(o),c&~d.clear|d.set);var c,d;const f=uoe[t.nodeName];return f&&(l|=f),l===r?e.$importChildren(t):e.$importChildren(t,{context:[FL(Qx,l)]})},match:uc.tag("b","strong","em","i","code","mark","s","sub","sup","u","span"),name:"@lexical/html/inline-format"};function uT(e,t,r){let n=e;for(;;){let i=null;for(;(i=t?n.nextSibling:n.previousSibling)===null;){const a=n.parentNode;if(a===null)return null;n=a}if(n=i,!r.isInline(n))return null;let o=n;for(;(o=t?n.firstChild:n.lastChild)!==null;)n=o;if(Vi(n))return n;if(n.nodeName==="BR")return null}}function cT(e,t){return t!==0&&fe(e)?e.setFormat(t):e}function dT(e,t){if(fe(e)){const r=(function(n){let i="";for(const o in n)coe.has(o)||(i+=`${o}: ${n[o]}; `);return i.trimEnd()})(t);r!==""&&e.setStyle(r)}return e}const foe={$import:(e,t)=>{const r=e.get(Qx),n=e.get(roe),i=e.get(ooe);if((function(s,l){let c=s.parentNode;for(;c!==null;){if(l.preservesWhitespace(c))return!0;c=c.parentNode}return!1})(t,i)){const s=op(t.textContent||"");for(const l of s)cT(l,r),dT(l,n);return s}const o=(function(s,l){let c=(s.textContent||"").replace(/\r/g,"").replace(/[ \t\n]+/g," ");if(c.length===0)return"";if(c[0]===" "){let d=s,f=!0;for(;d!==null&&(d=uT(d,!1,l))!==null;){const h=d.textContent||"";if(h.length>0){/[ \t\n]$/.test(h)&&(c=c.slice(1)),f=!1;break}}f&&(c=c.slice(1))}if(c.length>0&&c[c.length-1]===" "){let d=s,f=!0;for(;d!==null&&(d=uT(d,!0,l))!==null;)if((d.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){f=!1;break}f&&(c=c.slice(0,-1))}return c})(t,i);if(o==="")return[];const a=Pr(o);return cT(a,r),dT(a,n),[a]},match:uc.text(),name:"@lexical/html/#text"},hoe={$import:()=>[],match:uc.tag("script","style"),name:"@lexical/html/script-style-ignore"},poe={$import:(e,t)=>B4(t)||j4(t)?[]:[fa()],match:uc.tag("br"),name:"@lexical/html/br"},moe={$import:(e,t)=>{const r=Xt();if(ts(r,t),sc(t,r),r.getFormatType()===""){const n=t.getAttribute("align");n&&LE(n)&&r.setFormat(n)}return qo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:uc.tag("p"),name:"@lexical/html/p"},goe={$import:(e,t,r)=>Fr().hasNode(gb)?[PE()]:r(),match:uc.tag("hr"),name:"@lexical/html/hr"};uc.any();function voe(e,t){const r=[];let n=0,i=0;for(;n<e.length&&i<t.length;)e[n]<=t[i]?r.push(e[n++]):r.push(t[i++]);for(;n<e.length;)r.push(e[n++]);for(;i<t.length;)r.push(t[i++]);return r}function boe(e){const t=[],r=new Map,n=[],i=[],o=[],a=new Set;e.forEach((l,c)=>{const d=(function(h){const p=h[vb];return p===void 0&&lf(360),p})(l.match),f=l.name||(function(h,p){return h.kind==="text"?`#text@${p}`:h.kind==="comment"?`#comment@${p}`:h.tags.size===0?`*@${p}`:`${Array.from(h.tags).join(",").toLowerCase()}@${p}`})(d,c);if(l.name&&a.add(l.name),t.push({$import:l.$import,name:f,predicate:d.predicate}),d.kind==="text")i.push(c);else if(d.kind==="comment")o.push(c);else if(d.tags.size===0)n.push(c);else for(const h of d.tags){let p=r.get(h);p||(p=[],r.set(h,p)),p.push(c)}});const s=new Map;if(n.length===0)for(const[l,c]of r)s.set(l,c);else for(const[l,c]of r)s.set(l,voe(c,n));return{byTag:s,commentIndices:o,rules:t,textIndices:i,wildcardIndices:n}}function _oe(e){const t=[];for(const r of e)if(yoe(r))for(const n of r.rules)t.push(n);else t.push(r);return t}function yoe(e){return typeof e=="object"&&e!==null&&"__type"in e&&e.__type==="CompiledOverlayRules"}function VL(e){const t=_oe(e);return{__type:"CompiledOverlayRules",dispatch:boe(t),rules:t}}Zc.any();const On={any:Zc.any,comment:Zc.comment,css:toe,tag:Zc.tag,text:Zc.text},GL=new Set(["STYLE","SCRIPT"]);function xoe(e,t){Bie(t);const r=oc(t)?t.body.childNodes:t.childNodes,n=[],i=[];for(const o of r)if(!GL.has(o.nodeName)){const a=HL(o,e,i,!1);if(a!==null)for(const s of a)n.push(s)}return(function(o){for(const a of o)a.getParent()&&a.getNextSibling()instanceof dE&&a.insertAfter(fa());for(const a of o){const s=a.getParent();s&&s.splice(a.getIndexWithinParent(),1,a.getChildren())}})(i),n}function Soe(e,t=null,r=Fr()){return Wie([FL(Vie,!0)],r)(()=>{const n=un(),i=Hie(r),o=ue(t)?fb(t.anchor.getNode()):null,a=e.append.bind(e);for(const s of(H(o)?o:n).getChildren())KL(r,s,a,t,i);return e})}function woe(e,t=null){return(typeof document>"u"||typeof window>"u"&&global.window===void 0)&&lf(338),bne(e),Soe(gr().createElement("div"),t,e).innerHTML}function KL(e,t,r,n=null,i=db(e)){let o=i.$shouldInclude(t,n,e);const a=i.$shouldExclude(t,n,e);let s=t;n!==null&&fe(t)&&(s=yL(n,t,"clone"));const l=i.$exportDOM(s,e),{element:c,after:d,append:f,$getChildNodes:h}=l;if(!c)return!1;const p=gr().createDocumentFragment(),m=h?h():H(s)?s.getChildren():[],g=o&&fr(n)&&H(t)?null:n,v=p.append.bind(p);for(const b of m){const y=KL(e,b,v,g,i);!o&&y&&i.$extractWithChild(t,b,n,"html",e)&&(o=!0)}if(o&&!a){if((it(c)||qx(c))&&(f?f(p):c.append(p)),r(c),d){const b=d.call(s,c);b&&(qx(c)?c.replaceChildren(b):c.replaceWith(b))}}else r(p);return o}function HL(e,t,r,n,i=new Map,o){const a=[];if(GL.has(e.nodeName))return a;let s=null;const l=(function(m,g){const{nodeName:v}=m,b=g._htmlConversions.get(v.toLowerCase());let y=null;if(b!==void 0)for(const S of b){const w=S(m);w!==null&&(y===null||(y.priority||0)<=(w.priority||0))&&(y=w)}return y!==null?y.conversion:null})(e,t),c=l?l(e):null;let d=null;if(c!==null){d=c.after;const m=c.node;if(s=Array.isArray(m)?m[m.length-1]:m,s!==null){for(const[,g]of i)if(s=g(s,o),!s)break;s&&a.push(...Array.isArray(m)?m:[s])}c.forChild!=null&&i.set(e.nodeName,c.forChild)}const f=e.childNodes;let h=[];const p=(s==null||!br(s))&&(s!=null&&Nd(s)||n);for(let m=0;m<f.length;m++)h.push(...HL(f[m],t,r,p,new Map(i),s));if(d!=null&&(h=d(h)),Od(e)&&(h=Eoe(e,h,p?()=>{const m=new dE;return r.push(m),m}:Xt)),s==null)if(h.length>0)for(const m of h)a.push(m);else Od(e)&&(function(m){return m.nextSibling==null||m.previousSibling==null?!1:G0(m.nextSibling)&&G0(m.previousSibling)})(e)&&a.push(fa());else H(s)&&s.append(...h);return a}function Eoe(e,t,r){const n=e.style.textAlign,i=[];let o=[];for(let a=0;a<t.length;a++){const s=t[a];if(Nd(s))n&&!s.getFormat()&&s.setFormat(n),i.push(s);else if(o.push(s),a===t.length-1||a<t.length-1&&Nd(t[a+1])){const l=r();l.setFormat(n),l.append(...o),i.push(l),o=[]}}return i}function ml(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function koe(e){let t=1,r=e.getParent();for(;r!=null;){if(Ut(r)){const n=r.getParent();if(ct(n)){t++,r=n.getParent();continue}ml(40)}return t}return t}function Yx(e){const t=e.getParent();ct(t)||ml(40);let r=t,n=t;for(;n!==null;)n=n.getParent(),ct(n)&&(r=n);return r}function WL(e){let t=[];const r=e.getChildren().filter(Ut);for(let n=0;n<r.length;n++){const i=r[n],o=i.getFirstChild();ct(o)?t=t.concat(WL(o)):t.push(i)}return t}function So(e){return Ut(e)&&ct(e.getFirstChild())}function JL(e,t){return Ut(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function fT(e){const t=xe();if(t!==null){let r=t.getNodes();if(ue(t)){const[i]=t.getStartEndPoints(),o=i.getNode(),a=o.getParent();if(br(o)){const s=o.getFirstChild();if(s)r=s.selectStart().getNodes();else{const l=Xt();o.append(l),r=l.select().getNodes()}}else if(JL(o,r)){const s=sa(e);if(br(a)){o.replace(s);const l=Ja();H(o)&&(l.setFormat(o.getFormatType()),l.setIndent(o.getIndent())),s.append(l)}else if(Ut(o)){const l=o.getParentOrThrow();Qu(s,l.getChildren()),l.replace(s)}return}}const n=new Set;for(let i=0;i<r.length;i++){const o=r[i];if(H(o)&&o.isEmpty()&&!Ut(o)&&!n.has(o.getKey())){hT(o,e);continue}let a=G4(o)?o.getParent():Ut(o)&&o.isEmpty()?o:null;for(;a!=null;){const s=a.getKey();if(ct(a)){if(!n.has(s)){const l=sa(e);Qu(l,a.getChildren()),a.replace(l),n.add(s)}break}{const l=a.getParent();if(br(l)&&!n.has(s)){n.add(s),hT(a,e);break}a=l}}}}}function Qu(e,t){e.splice(e.getChildrenSize(),0,t)}function hT(e,t){if(ct(e))return e;const r=e.getPreviousSibling(),n=e.getNextSibling(),i=Ja();let o;if(Qu(i,e.getChildren()),ct(r)&&t===r.getListType())r.append(i),ct(n)&&t===n.getListType()&&(Qu(r,n.getChildren()),n.remove()),o=r;else if(ct(n)&&t===n.getListType())n.getFirstChildOrThrow().insertBefore(i),o=n;else{const s=sa(t);s.append(i),e.replace(s),o=s}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const a=xe();return ue(a)&&(o.getKey()===a.anchor.key&&a.anchor.set(i.getKey(),a.anchor.offset,"element"),o.getKey()===a.focus.key&&a.focus.set(i.getKey(),a.focus.offset,"element")),e.remove(),o}function zE(e,t){const r=e.getLastChild(),n=t.getFirstChild();r&&n&&So(r)&&So(n)&&(zE(r.getFirstChild(),n.getFirstChild()),n.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function Coe(){const e=xe();if(ue(e)){const t=new Set,r=e.getNodes(),n=e.anchor.getNode();if(JL(n,r))t.add(Yx(n));else for(let i=0;i<r.length;i++){const o=r[i];if(G4(o)){const a=_ie(o,cc);a!=null&&t.add(Yx(a))}}for(const i of t){let o=i;const a=WL(i);for(const s of a){const l=Xt().setTextStyle(e.style).setTextFormat(e.format);Qu(l,s.getChildren()),o.insertAfter(l),o=l,s.__key===e.anchor.key&&Ju(e.anchor,to(Lo(l,"next"))),s.__key===e.focus.key&&Ju(e.focus,to(Lo(l,"next"))),s.remove()}i.remove()}}}function QL(e){const t=e.getListType()!=="check";let r=e.getStart();for(const n of e.getChildren())Ut(n)&&(n.getValue()!==r&&n.setValue(r),t&&n.getLatest().__checked!=null&&n.setChecked(void 0),ct(n.getFirstChild())||r++)}function Roe(e){const t=new Set;if(So(e)||t.has(e.getKey()))return;const r=e.getParent(),n=e.getNextSibling(),i=e.getPreviousSibling();if(So(n)&&So(i)){const o=i.getFirstChild();if(ct(o)){o.append(e);const a=n.getFirstChild();ct(a)&&(Qu(o,a.getChildren()),n.remove(),t.add(n.getKey()))}}else if(So(n)){const o=n.getFirstChild();if(ct(o)){const a=o.getFirstChild();a!==null&&a.insertBefore(e)}}else if(So(i)){const o=i.getFirstChild();ct(o)&&o.append(e)}else if(ct(r)){const o=oi(e),a=oi(r);o.append(a),a.append(e),i?i.insertAfter(o):n?n.insertBefore(o):r.append(o)}}function pT(e){if(So(e))return;const t=e.getParent(),r=t?t.getParent():void 0;if(ct(r?r.getParent():void 0)&&Ut(r)&&ct(t)){const n=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(n))r.insertBefore(e),t.isEmpty()&&r.remove();else if(e.is(i))r.insertAfter(e),t.isEmpty()&&r.remove();else{const o=oi(e),a=oi(t);o.append(a),e.getPreviousSiblings().forEach(c=>a.append(c));const s=oi(e),l=oi(t);s.append(l),Qu(l,e.getNextSiblings()),r.insertBefore(o),r.insertAfter(s),r.replace(e)}}}function Aoe(e=!1){const t=xe();if(!ue(t)||!t.isCollapsed())return!1;const r=t.anchor.getNode();let n=null;if(Ut(r)&&r.getChildrenSize()===0)n=r;else if(fe(r)){const c=r.getParent();Ut(c)&&c.getChildren().every(d=>fe(d)&&d.getTextContent().trim()==="")&&(n=c)}if(n===null)return!1;const i=Yx(n),o=n.getParent();ct(o)||ml(40);const a=o.getParent();let s;if(br(a))s=Xt(),i.insertAfter(s);else{if(!Ut(a))return!1;s=oi(a),a.insertAfter(s)}s.setTextStyle(t.style).setTextFormat(t.format).select();const l=n.getNextSiblings();if(l.length>0){const c=e?(function(f,h){return f.getStart()+h.getIndexWithinParent()})(o,n):1,d=oi(o).setStart(c);if(Ut(s)){const f=oi(s);f.append(d),s.insertAfter(f)}else s.insertAfter(d);d.append(...l)}return(function(c){let d=c;for(;d.getNextSibling()==null&&d.getPreviousSibling()==null;){const f=d.getParent();if(f==null||!Ut(f)&&!ct(f))break;d=f}d.remove()})(n),!0}let cc=class extends ji{__value;__checked;$config(){return this.config("listitem",{$transform:t=>{const r=t.getParent();if(ct(r))r.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0);else if(r){const n=t.createParentElementNode();ct(n)||ml(340);const i=[t];for(const o of["previous","next"]){i.reverse();for(const{origin:a}of Ht(t,o)){if(!Ut(a))break;i.push(a)}}t.insertBefore(n),n.splice(0,0,i),br(r)||(vL(n,lc(Ht(n,"next")),{$shouldSplit:()=>!1,removeEmptyDestination:!0}),r.isEmpty()&&r.isAttached()&&r.remove())}},extends:ji,importDOM:{li:()=>({conversion:$oe,priority:0})}})}constructor(t=1,r=void 0,n){super(n),this.__value=t===void 0?1:t,this.__checked=r}afterCloneFrom(t){super.afterCloneFrom(t),this.__value=t.__value,this.__checked=t.__checked}createDOM(t){const r=gr().createElement("li");return this.updateListItemDOM(null,r,t),r}updateListItemDOM(t,r,n){(function(a,s){const l=s.getParent();!ct(l)||l.getListType()!=="check"||ct(s.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),a.setAttribute("aria-checked",s.getChecked()?"true":"false"))})(r,this),r.value=this.__value,(function(a,s,l){const c=s.list;if(!c)return;const d=c.listitem,f=c.nested&&c.nested.listitem,h=l.getParent(),p=ct(h)&&h.getListType()==="check",m=l.getChecked(),g=l.getChildren().some(y=>ct(y)),v=[];c.listitemChecked!==void 0&&v.push(c.listitemChecked),c.listitemUnchecked!==void 0&&v.push(c.listitemUnchecked),f!==void 0&&v.push(...As(f)),v.length>0&&NE(a,...v);const b=[];if(d!==void 0&&b.push(...As(d)),p){const y=m?c.listitemChecked:c.listitemUnchecked;y!==void 0&&b.push(y)}f!==void 0&&g&&b.push(...As(f)),b.length>0&&Wa(a,...b)})(r,n.theme,this);const i=t?t.__style:"",o=this.__style;i!==o&&pd(r.style,o,i),(function(a,s,l){const c=s.__textStyle,d=l?l.__textStyle:"";if(l!==null&&d===c)return;const f=P0(c);for(const h in f)a.style.setProperty(`--listitem-marker-${h}`,f[h]);if(d!=="")for(const h in P0(d))h in f||a.style.removeProperty(`--listitem-marker-${h}`)})(r,this,t)}updateDOM(t,r,n){const i=r;return this.updateListItemDOM(t,i,n),!1}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const r=this.createDOM(t._config),n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();return i&&(r.dir=i),So(this)?{after(o){if(it(o)){const a=o.previousElementSibling;if(it(a)&&a.nodeName==="LI"){for(;o.firstChild;)a.append(o.firstChild);o.remove()}}return o},element:r}:{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let r=0;r<t.length;r++){const n=t[r];if(H(n)&&this.canMergeWith(n)){const i=n.getChildren();this.append(...i),n.remove()}else super.append(n)}return this}replace(t,r){if(Ut(t))return super.replace(t);this.setIndent(0);const n=this.getParentOrThrow();if(!ct(n))return t;if(n.__first===this.getKey())n.insertBefore(t);else if(n.__last===this.getKey())n.insertAfter(t);else{const a=oi(n);let s=this.getNextSibling();for(;s;){const l=s;s=s.getNextSibling(),a.append(l)}n.insertAfter(t),t.insertAfter(a)}const i=this.__key;let o=0;if(r&&(H(t)||ml(139),o=t.getChildrenSize(),t.splice(o,0,this.getChildren())),r&&H(t)){const a=xe();if(ue(a))for(const s of a.getStartEndPoints())s.key===i&&s.type==="element"&&s.set(t.getKey(),o+s.offset,"element")}return this.remove(),n.getChildrenSize()===0&&n.remove(),t}insertAfter(t,r=!0){const n=this.getParentOrThrow();if(ct(n)||ml(39),Ut(t))return super.insertAfter(t,r);const i=this.getNextSiblings();if(n.insertAfter(t,r),i.length!==0){const o=oi(n);i.forEach(a=>o.append(a)),t.insertAfter(o,r)}return t}remove(t){const r=this.getPreviousSibling(),n=this.getNextSibling();super.remove(t),r&&n&&So(r)&&So(n)&&(zE(r.getFirstChild(),n.getFirstChild()),n.remove())}resetOnCopyNodeFrom(t){super.resetOnCopyNodeFrom(t),t.getChecked()&&this.setChecked(!1)}insertNewAfter(t,r=!0){const n=oi(this);return this.insertAfter(n,r),n}collapseAtStart(t){if(So(this))return!1;const r=this.getParentOrThrow();if(Ut(r.getParentOrThrow()))return pT(this),!0;const n=Xt().append(...this.getChildren()),i=this.getNextSiblings();if(i.length>0){const o=oi(r);o.append(...i),r.insertAfter(o)}return r.insertAfter(n),this.remove(),r.getChildrenSize()===0&&r.remove(),n.selectStart(),!0}getValue(){return this.getLatest().__value}setValue(t){const r=this.getWritable();return r.__value=t,r}getChecked(){const t=this.getLatest();let r;const n=this.getParent();return ct(n)&&(r=n.getListType()),r==="check"?!!t.__checked:void 0}setChecked(t){const r=this.getWritable();return r.__checked=t,r}toggleChecked(){const t=this.getWritable();return t.setChecked(!t.__checked)}getIndent(){const t=this.getParent();if(t===null||!this.isAttached())return this.getLatest().__indent;let r=t.getParentOrThrow(),n=0;for(;Ut(r);)r=r.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t!="number"&&ml(117),(t=Math.floor(t))>=0||ml(199);let r=this.getIndent();for(;r!==t;)r<t?(Roe(this),r++):(pT(this),r--);return this}canInsertAfter(t){return Ut(t)}canReplaceWith(t){return Ut(t)}canMergeWith(t){return Ut(t)||of(t)}extractWithChild(t,r){if(!ue(r))return!1;const n=r.anchor.getNode(),i=r.focus.getNode();return this.isParentOf(n)&&this.isParentOf(i)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return sa("bullet")}canMergeWhenEmpty(){return!0}};function $oe(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return mT(n)}if(e.classList.contains("joplin-checkbox")){for(const n of e.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return mT(n.children[0])}const t=e.getAttribute("aria-checked"),r=Ja(t==="true"||t!=="false"&&void 0);return ts(r,e),{after:YL.bind(null,r),node:qo(r,e)}}function mT(e){if(e.getAttribute("type")!=="checkbox")return{node:null};const t=Ja(e.hasAttribute("checked"));return{after:YL.bind(null,t),node:t}}function YL(e,t){const r=t[0];return t.length===1&&of(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function Ja(e){return ya(new cc(void 0,e))}function Ut(e){return e instanceof cc}let Yp=class extends ji{__tag;__start;__listType;$config(){return this.config("list",{$transform:t=>{(function(r){const n=r.getNextSibling();ct(n)&&r.getListType()===n.getListType()&&zE(r,n)})(t),QL(t)},extends:ji,importDOM:{ol:()=>({conversion:vT,priority:0}),ul:()=>({conversion:vT,priority:0})}})}constructor(t="number",r=1,n){super(n);const i=Toe[t]||t;this.__listType=i,this.__tag=i==="number"?"ol":"ul",this.__start=r}afterCloneFrom(t){super.afterCloneFrom(t),this.__listType=t.__listType,this.__tag=t.__tag,this.__start=t.__start}getTag(){return this.getLatest().__tag}setListType(t){const r=this.getWritable();return r.__listType=t,r.__tag=t==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(t){const r=this.getWritable();return r.__start=t,r}createDOM(t,r){const n=this.__tag,i=gr().createElement(n);return this.__start!==1&&i.setAttribute("start",String(this.__start)),i.__lexicalListType=this.__listType,gT(i,t.theme,this),i}updateDOM(t,r,n){return t.__tag!==this.__tag||t.__listType!==this.__listType||(gT(r,n.theme,this),t.__start!==this.__start&&r.setAttribute("start",String(this.__start)),!1)}updateFromJSON(t){return super.updateFromJSON(t).setListType(t.listType).setStart(t.start)}exportDOM(t){const r=this.createDOM(t._config,t);return it(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(t,r,n){let i=n;for(let o=0;o<n.length;o++){const a=n[o];Ut(a)||(i===n&&(i=[...n]),i[o]=this.createListItemNode().append(!H(a)||ct(a)||a.isInline()?a:Pr(a.getTextContent())))}return super.splice(t,r,i)}extractWithChild(t){return Ut(t)}createListItemNode(){return Ja()}};function gT(e,t,r){const n=[],i=[],o=t.list;if(o!==void 0){const a=o[`${r.__tag}Depth`]||[],s=koe(r)-1,l=s%a.length,c=a[l],d=o[r.__tag];let f;const h=o.nested,p=o.checklist;if(h!==void 0&&h.list&&(f=h.list),d!==void 0&&n.push(d),p!==void 0&&r.__listType==="check"&&n.push(p),c!==void 0){n.push(...As(c));for(let m=0;m<a.length;m++)m!==l&&i.push(r.__tag+m)}if(f!==void 0){const m=As(f);s>1?n.push(...m):i.push(...m)}}i.length>0&&NE(e,...i),n.length>0&&Wa(e,...n)}function vT(e){let t;if((function(r){return it(r)&&r.nodeName.toLowerCase()==="ol"})(e)){const r=e.start;t=sa("number",r)}else t=(function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const n of r.childNodes)if(it(n)&&n.hasAttribute("aria-checked"))return!0;return!1})(e)?sa("check"):sa("bullet");return qo(t,e),{after:r=>(function(n,i){const o=i.createListItemNode.bind(i),a=[];for(let s=0;s<n.length;s++){const l=n[s];if(Ut(l)){a.push(l);const c=l.getChildren();c.length>1&&c.forEach(d=>{ct(d)&&a.push(o().append(d))})}else a.push(o().append(l))}return a})(r,t),node:t}}const Toe={ol:"number",ul:"bullet"};function sa(e="number",t=1){return ya(new Yp(e,t))}function ct(e){return e instanceof Yp}function Noe(e){const t=[];for(const r of e)if(Ut(r)){t.push(r);const n=r.getChildren();if(n.length>1)for(const i of n)ct(i)&&t.push(Ja().append(i))}else t.push(Ja().append(r));return t}const Doe={$import:(e,t)=>{let r;var n;return zL(t,"ol")?r=sa("number",t.start):r=(n=t).matches('[__lexicallisttype="check"], .contains-task-list, [data-is-checklist="1"]')||n.querySelector(":scope > [aria-checked]")!==null?sa("check"):sa("bullet"),qo(r,t),[r.splice(0,0,jL(Noe(e.$importChildren(t)),t))]},match:On.tag("ol","ul"),name:"@lexical/list/list"};function XL(e,t){if(t.length!==1)return t;const r=t[0];return of(r)&&!e.getFormatType()&&r.getFormatType()?(e.setFormat(r.getFormatType()),r.getChildren()):t}function ZL(e){const t=a=>ME(a)&&!ct(a);if(!e.some(t))return e;const r=[];let n=[];const i=()=>{n.length>0&&(r.push(n),n=[])};for(const a of e)t(a)?(i(),r.push(H(a)?a.getChildren():[a])):n.push(a);i();const o=[];for(const a of r)o.length>0&&o.push(fa()),o.push(...a);return o}const Foe={$import:(e,t)=>{const r=t.getAttribute("aria-checked"),n=Ja(r==="true"||r!=="false"&&void 0);return ts(n,t),qo(n,t),[n.splice(0,0,ZL(XL(n,e.$importChildren(t))))]},match:On.tag("li"),name:"@lexical/list/li"};function bT(e,t,r){const n=zL(r,"input")?r:r.querySelector('input[type="checkbox"]');if(!n||n.getAttribute("type")!=="checkbox")return[];const i=Ja(n.hasAttribute("checked"));return ts(i,t),qo(i,t),[i.splice(0,0,ZL(XL(i,e.$importChildren(t))))]}On.tag("li").classAll("task-list-item"),On.tag("li").classAll("joplin-checkbox");const Ioe=Ke("UPDATE_LIST_START_COMMAND"),e8=Ke("INSERT_UNORDERED_LIST_COMMAND"),t8=Ke("INSERT_ORDERED_LIST_COMMAND"),Poe=Ke("REMOVE_LIST_COMMAND");function Ooe(e,t){return Ul(e.registerCommand(t8,()=>(fT("number"),!0),Gc),e.registerCommand(Ioe,r=>{const{listNodeKey:n,newStart:i}=r,o=mr(n);return!!ct(o)&&(o.getListType()==="number"&&(o.setStart(i),QL(o)),!0)},Gc),e.registerCommand(e8,()=>(fT("bullet"),!0),Gc),e.registerCommand(Poe,()=>(Coe(),!0),Gc),e.registerCommand(Zh,()=>Aoe(!1),Gc),e.registerCommand(iE,r=>{if((function(){const a=xe();if(!ue(a)||!a.isCollapsed()||a.anchor.offset!==0)return!1;const s=a.anchor.getNode(),l=cr(s,Ut);if(!Ut(l))return!1;const c=l.getFirstDescendant();if(c===null||!l.is(s)&&!c.is(s))return!1;const d=l.getParent();if(!ct(d)||!l.is(d.getFirstChild()))return!1;const f=d.getPreviousSibling();if(!mt(f)||f.isIsolated()||!f.isKeyboardSelectable()&&f.isInline())return!1;const h=Xt().append(...l.getChildren());return d.insertBefore(h),l.remove(),d.isEmpty()&&d.remove(),h.selectStart(),!0})())return r.preventDefault(),!0;const n=xe();if(!ue(n)||!n.isCollapsed())return!1;const{anchor:i}=n;if(i.offset!==0)return!1;let o=i.getNode();for(;!Ut(o);){if(o.getPreviousSibling()!==null)return!1;const a=o.getParent();if(a===null)return!1;o=a}return!(!Ut(o)||!o.collapseAtStart(n))&&(r.preventDefault(),!0)},Rne),e.registerNodeTransform(cc,r=>{const n=r.getFirstChild();if(n){if(fe(n)){const i=n.getStyle(),o=n.getFormat();r.getTextStyle()!==i&&r.setTextStyle(i),r.getTextFormat()!==o&&r.setTextFormat(o)}}else{const i=xe();ue(i)&&(i.style!==r.getTextStyle()||i.format!==r.getTextFormat())&&i.isCollapsed()&&r.is(i.anchor.getNode())&&r.setTextStyle(i.style).setTextFormat(i.format)}}),e.registerNodeTransform(Vs,r=>{const n=r.getParent();if(Ut(n)&&r.is(n.getFirstChild())){const i=r.getStyle(),o=r.getFormat();i===n.getTextStyle()&&o===n.getTextFormat()||n.setTextStyle(i).setTextFormat(o)}}))}function Moe(e,t,r,n,i){if(e===null||r.size===0&&n.size===0&&!i)return 0;const o=t._selection,a=e._selection;if(i)return 1;if(!(ue(o)&&ue(a)&&a.isCollapsed()&&o.isCollapsed()))return 0;const s=(function(b,y,S){const w=b._nodeMap,C=[];for(const A of y){const T=w.get(A);T!==void 0&&C.push(T)}for(const[A,T]of S){if(!T)continue;const R=w.get(A);R===void 0||Mr(R)||C.push(R)}return C})(t,r,n);if(s.length===0)return 0;if(s.length>1){const b=t._nodeMap,y=b.get(o.anchor.key),S=b.get(a.anchor.key);return y&&S&&!e._nodeMap.has(y.__key)&&fe(y)&&y.__text.length===1&&o.anchor.offset===1?2:0}const l=s[0],c=e._nodeMap.get(l.__key);if(!fe(c)||!fe(l)||c.__mode!==l.__mode)return 0;const d=c.__text,f=l.__text;if(d===f)return 0;const h=o.anchor,p=a.anchor;if(h.key!==p.key||h.type!=="text")return 0;const m=h.offset,g=p.offset,v=f.length-d.length;return v===1&&g===m-1?2:v===-1&&g===m+1?3:v===-1&&g===m?4:0}function Loe(e,t,r){let n=r(),i=0,o=n,a=0,s=null;return(l,c,d,f,h,p)=>{const m=r();if(p.has(y4)&&(o=n,a=i,s=l),p.has(I0))return i=0,n=m,2;p.has(ip)&&s&&(n=o,i=a,l=s);const g=p.has(v4)||p.has(b4)?0:Moe(l,c,f,h,e.isComposing()),v=(()=>{const b=d===null||d.editor===e,y=p.has(g4);if(!y&&b&&p.has(bh))return 0;if(g===1)return 2;if(l===null)return 1;const S=c._selection;return f.size>0||h.size>0?y===!1&&g!==0&&g===i&&m<n+t&&b||f.size===1&&(function(C,A,T){const R=A._nodeMap.get(C),N=T._nodeMap.get(C),I=A._selection,M=T._selection;return!(ue(I)&&ue(M)&&I.anchor.type==="element"&&I.focus.type==="element"&&M.anchor.type==="text"&&M.focus.type==="text"||!fe(R)||!fe(N)||R.__parent!==N.__parent)&&JSON.stringify(A.read(()=>R.exportJSON()))===JSON.stringify(T.read(()=>N.exportJSON()))})(Array.from(f)[0],l,c)?0:1:S!==null?0:2})();return n=m,i=g,v}}function _T(e,t){e.undoStack=[],e.redoStack=[],e.current=null}function zoe(e,t,r,n=Date.now,i,o=null){const a=Loe(e,r,n);return Ul(e.registerCommand(ib,()=>((function(s,l,c){const d=l.redoStack,f=l.undoStack;if(f.length!==0){const h=l.current,p=f.pop();h!==null&&(d.push(h),s.dispatchCommand(Um,!0)),f.length===0&&s.dispatchCommand(Bm,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:I0})}})(e,t),!0),ht),e.registerCommand(ob,()=>((function(s,l,c){const d=l.redoStack,f=l.undoStack;if(d.length!==0){const h=l.current;h!==null&&(f.push(h),s.dispatchCommand(Bm,!0));const p=d.pop();d.length===0&&s.dispatchCommand(Um,!1),l.current=p||null,p&&p.editor.setEditorState(p.editorState,{tag:I0})}})(e,t),!0),ht),e.registerCommand(qre,()=>(_T(t),!1),ht),e.registerCommand(Vre,()=>(_T(t),e.dispatchCommand(Um,!1),e.dispatchCommand(Bm,!1),!0),ht),e.registerUpdateListener(({editorState:s,prevEditorState:l,dirtyLeaves:c,dirtyElements:d,tags:f})=>{const h=t.current,p=t.redoStack,m=t.undoStack,g=h===null?null:h.editorState;if(h!==null&&s===g)return;const v=a(l,s,h,c,d,f);if(v===1){if(p.length!==0&&(t.redoStack=[],e.dispatchCommand(Um,!1)),h!==null){m.push({...h});const b=typeof o=="number"||o===null?o:o.peek();b!==null&&m.length>b&&m.splice(0,m.length-b),e.dispatchCommand(Bm,!0)}}else if(v===2)return;t.current={editor:e,editorState:s}}))}function Uoe(){return{current:null,redoStack:[],undoStack:[]}}function Boe(e,t){let r=e;for(let n=Ht(e,t);n&&(i8(n.origin)||Bu(n.origin));n=n.getAdjacentCaret())r=n.origin;return r}function joe(e){return Boe(e,"previous")}function r8(e,t){for(const r of e.childNodes)if(it(r)&&r.tagName===t||r8(r,t))return!0;return!1}const oh="data-language",Uf="data-highlight-language",Jm="data-theme";class uf extends ji{__language;__theme;__isSyntaxHighlightSupported;static getType(){return"code"}static clone(t){return new uf(t.__language,t.__key)}constructor(t,r){super(r),this.__language=t||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(t){super.afterCloneFrom(t),this.__language=t.__language,this.__theme=t.__theme,this.__isSyntaxHighlightSupported=t.__isSyntaxHighlightSupported}createDOM(t){const r=gr().createElement("code");Wa(r,t.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(oh,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Uf,n));const i=this.getTheme();i&&r.setAttribute(Jm,i);const o=this.getStyle();return o&&pd(r.style,o),r}updateDOM(t,r,n){const i=this.__language,o=t.__language;i?i!==o&&r.setAttribute(oh,i):o&&r.removeAttribute(oh);const a=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?a&&i?i!==o&&r.setAttribute(Uf,i):r.removeAttribute(Uf):a&&i&&r.setAttribute(Uf,i);const s=this.__theme,l=t.__theme;s?s!==l&&r.setAttribute(Jm,s):l&&r.removeAttribute(Jm);const c=this.__style,d=t.__style;return c!==d&&pd(r.style,c,d),!1}exportDOM(t){const r=gr().createElement("pre");Wa(r,t._config.theme.code),r.setAttribute("spellcheck","false");const n=this.getLanguage();n&&(r.setAttribute(oh,n),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Uf,n));const i=this.getTheme();i&&r.setAttribute(Jm,i);const o=this.getStyle();return o&&pd(r.style,o),{element:r}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||r8(t,"BR"))?{conversion:yT,priority:1}:null,div:()=>({conversion:qoe,priority:1}),pre:()=>({conversion:yT,priority:0}),table:t=>uy(t)?{conversion:Voe,priority:3}:null,td:t=>{const r=t,n=r.closest("table");return r.classList.contains("js-file-line")||n&&uy(n)?{conversion:xT,priority:3}:null},tr:t=>{const r=t.closest("table");return r&&uy(r)?{conversion:xT,priority:3}:null}}}static importJSON(t){return pi().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language).setTheme(t.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(t,r=!0){if(!Qp(Fr(),"@lexical/code")){const a=Goe(t);if(a)return a}const{anchor:n,focus:i}=t,o=(n.isBefore(i)?n:i).getNode();if(fe(o)){let a=joe(o);const s=[];for(;;)if(Bu(a))s.push(Zd()),a=a.getNextSibling();else{if(!i8(a))break;{let m=0;const g=a.getTextContent(),v=a.getTextContentSize();for(;m<v&&g[m]===" ";)m++;if(m!==0&&s.push(n8(" ".repeat(m))),m!==v)break;a=a.getNextSibling()}}const l=o.splitText(n.offset)[0],c=n.offset===0?0:1,d=l.getIndexWithinParent()+c,f=o.getParentOrThrow(),h=[fa(),...s];f.splice(d,0,h);const p=s[s.length-1];p?p.select():n.offset===0?l.selectPrevious():l.getNextSibling().selectNext(0,0)}if(dp(o)){const{offset:a}=t.anchor;o.splice(a,0,[fa()]),o.select(a+1,a+1)}return null}canIndent(){return!1}collapseAtStart(){const t=Xt();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}setLanguage(t){const r=this.getWritable();return r.__language=t||void 0,r}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(t){const r=this.getWritable();return r.__isSyntaxHighlightSupported=t,r}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(t){const r=this.getWritable();return r.__theme=t||void 0,r}getTheme(){return this.getLatest().__theme}}function pi(e,t){return lL(uf).setLanguage(e).setTheme(t)}function dp(e){return e instanceof uf}function yT(e){return{node:pi(e.getAttribute(oh))}}function qoe(e){const t=e,r=ST(t);return r||(function(n){let i=n.parentElement;for(;i!==null;){if(ST(i))return!0;i=i.parentElement}return!1})(t)?{node:r?pi():null}:{node:null}}function Voe(){return{node:pi()}}function xT(){return{node:null}}function ST(e){return e.style.fontFamily.match("monospace")!==null}function uy(e){return e.classList.contains("js-file-line-container")}function Goe(e){const{anchor:t}=e;if(e.isCollapsed()&&t.type==="element"){const r=t.getNode();if(dp(r)){const n=r.getChildrenSize();if(n>=2&&t.offset===n){const i=r.getLastChild();if(_i(i)&&_i(i.getPreviousSibling())){const o=Xt();return r.splice(n-2,2,[]).insertAfter(o,!1),o.select(),o}}}}return null}class bb extends Vs{__highlightType;constructor(t="",r,n){super(t,n),this.__highlightType=r}static getType(){return"code-highlight"}static clone(t){return new bb(t.__text,t.__highlightType||void 0,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__highlightType=t.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const r=this.getWritable();return r.__highlightType=t||void 0,r}canHaveFormat(){return!1}createDOM(t){const r=super.createDOM(t),n=cy(t.theme,this.__highlightType);return Wa(r,n),r}updateDOM(t,r,n){const i=super.updateDOM(t,r,n),o=cy(n.theme,t.__highlightType),a=cy(n.theme,this.__highlightType);return o!==a&&(o&&NE(r,o),a&&Wa(r,a)),i}static importJSON(t){return n8().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return pi()}}function cy(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function n8(e="",t){return ya(new bb(e,t))}function i8(e){return e instanceof bb}const o8="data-language";function a8(e){return e.style.fontFamily.match("monospace")!==null}function Xx(e){let t=e.parentElement;for(;t!==null;){if(a8(t))return!0;t=t.parentElement}return!1}const Koe=VL([{$import:(e,t)=>e.$importChildren(t),match:On.tag("tr","td"),name:"@lexical/code/github-code-table/unwrap"}]),Hoe={$import:(e,t)=>[pi(t.getAttribute(o8)).splice(0,0,e.$importChildren(t))],match:On.tag("pre"),name:"@lexical/code/pre"},Woe={$import:(e,t,r)=>{const n=t.textContent||"";return/\r?\n/.test(n)||t.querySelector("br")!==null?[pi(t.getAttribute(o8)).splice(0,0,e.$importChildren(t))]:r()},match:On.tag("code"),name:"@lexical/code/code-multiline"};function Qm(e){if(!it(e))return!1;const t=e.style.fontFamily,r=e.style.whiteSpace;return typeof t=="string"&&/monospace/i.test(t)&&typeof r=="string"&&r.startsWith("pre")}function Joe(e){let t=!1;const r=[];let n="",i=!1;const o=()=>{i&&(r.push(n),n="",i=!1)};for(const a of Array.from(e.childNodes))if(it(a))a.tagName==="DIV"?(o(),r.push(a.textContent||""),t=!0):a.tagName==="BR"?(o(),r.push(""),t=!0):(n+=a.textContent||"",i=!0);else if(Vi(a)){const s=a.textContent||"";s.length>0&&(n+=s,i=!0)}return o(),t?r:null}On.tag("div"),On.tag("div","br");const Qoe={$import:(e,t,r)=>a8(t)?[pi().splice(0,0,e.$importChildren(t))]:Xx(t)?e.$importChildren(t):r(),match:On.tag("div"),name:"@lexical/code/div"};On.tag("table").classAll("js-file-line-container"),On.tag("td").classAll("js-file-line");const wT=new Set(["http:","https:","mailto:","sms:","tel:"]);let Xp=class s8 extends ji{__url;__target;__rel;__title;static getType(){return"link"}static clone(t){return new s8(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t="",r={},n){super(n);const{target:i=null,rel:o=null,title:a=null}=r;this.__url=t,this.__target=i,this.__rel=o,this.__title=a}afterCloneFrom(t){super.afterCloneFrom(t),this.__url=t.__url,this.__rel=t.__rel,this.__target=t.__target,this.__title=t.__title}createDOM(t){const r=gr().createElement("a");return this.updateLinkDOM(null,r,t),Wa(r,t.theme.link),r}updateLinkDOM(t,r,n){if(oL(r)){t&&t.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const i of["target","rel","title"]){const o=`__${i}`,a=this[o];t&&t[o]===a||(a?r[i]=a:r.removeAttribute(i))}}}updateDOM(t,r,n){return this.updateLinkDOM(t,r,n),!1}static importDOM(){return{a:t=>({conversion:Yoe,priority:1})}}static importJSON(t){return Md().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){const r=t;t=CT(t);try{const n=new URL(CT(t));if(!wT.has(n.protocol))return"about:blank"}catch{const i=r.replace(/[\u0000-\u001F\u007F\s]/g,"").match(/^([a-z][a-z0-9+.-]*):/i);if(i!=null&&!wT.has(`${i[1].toLowerCase()}:`))return"about:blank"}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const r=this.getWritable();return r.__url=t,r}getTarget(){return this.getLatest().__target}setTarget(t){const r=this.getWritable();return r.__target=t,r}getRel(){return this.getLatest().__rel}setRel(t){const r=this.getWritable();return r.__rel=t,r}getTitle(){return this.getLatest().__title}setTitle(t){const r=this.getWritable();return r.__title=t,r}insertNewAfter(t,r=!0){const n=oi(this);return this.insertAfter(n,r),n}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,r,n){if(!ue(r))return!1;const i=r.anchor.getNode(),o=r.focus.getNode();return(this.is(i)||this.isParentOf(i))&&(this.is(o)||this.isParentOf(o))&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}shouldMergeAdjacentLink(t){return this.getType()===t.getType()&&this.__url===t.__url&&this.__target===t.__target&&this.__rel===t.__rel&&this.__title===t.__title}};function Yoe(e){let t=null;if(oL(e)){const r=e.textContent;(r!==null&&r!==""||e.children.length>0)&&(t=Md(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function Md(e="",t){return ya(new Xp(e,t))}function $a(e){return e instanceof Xp}let l8=class u8 extends Xp{__isUnlinked;constructor(t="",r={},n){super(t,r,n),this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}afterCloneFrom(t){super.afterCloneFrom(t),this.__isUnlinked=t.__isUnlinked}static getType(){return"autolink"}static clone(t){return new u8(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}shouldMergeAdjacentLink(t){return!1}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const r=this.getWritable();return r.__isUnlinked=t,r}createDOM(t){return this.__isUnlinked?gr().createElement("span"):super.createDOM(t)}updateDOM(t,r,n){return super.updateDOM(t,r,n)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return ET().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,r=!0){const n=ET(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(n,r),n}};function ET(e="",t){return ya(new l8(e,t))}function Hc(e){return e instanceof l8}function kT(e,t){if(e.type==="element"){const r=e.getNode();return H(r)||(function(n,...i){const o=new URL("https://lexical.dev/docs/error"),a=new URLSearchParams;a.append("code",n);for(const s of i)a.append("v",s);throw o.search=a.toString(),Error(`Minified Lexical error #${n}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(252),r.getChildren()[e.offset+t]||null}return null}function Xoe(e,t={}){let r;if(e&&typeof e=="object"){const{url:d,...f}=e;r=d,t={...f,...t}}else r=e;const{target:n,title:i}=t,o=t.rel===void 0?"noreferrer":t.rel,a=xe();if(a===null||!ue(a)&&!fr(a))return;if(fr(a)){const d=a.getNodes();return d.length===0?void 0:void d.forEach(f=>{if(r===null){const h=cr(f,p=>!Hc(p)&&$a(p));h&&(h.insertBefore(f),h.getChildren().length===0&&h.remove())}else{const h=cr(f,p=>!Hc(p)&&$a(p));if(h)h.setURL(r),n!==void 0&&h.setTarget(n),o!==void 0&&h.setRel(o);else{const p=Md(r,{rel:o,target:n});f.insertBefore(p),p.append(f)}}})}if(a.isCollapsed()&&r===null)for(const d of a.getNodes()){const f=cr(d,h=>!Hc(h)&&$a(h));return void(f!==null&&(f.getParentOrThrow().splice(f.getIndexWithinParent(),0,f.getChildren()),f.remove()))}const s=a.extract();if(r===null){const d=new Set;return void s.forEach(f=>{const h=cr(f,p=>!Hc(p)&&$a(p));if(h!==null){const p=h.getKey();if(d.has(p))return;(function(m,g){const v=new Set(g.filter(R=>m.isParentOf(R)).map(R=>R.getKey())),b=m.getChildren(),y=R=>v.has(R.getKey())||H(R)&&g.some(N=>m.isParentOf(N)&&R.isParentOf(N)),S=b.filter(y);if(S.length===b.length)return b.forEach(R=>m.insertBefore(R)),void m.remove();const w=b.findIndex(y),C=b.findLastIndex(y),A=w===0,T=C===b.length-1;if(A)S.forEach(R=>m.insertBefore(R));else if(T)for(let R=S.length-1;R>=0;R--)m.insertAfter(S[R]);else{for(let N=S.length-1;N>=0;N--)m.insertAfter(S[N]);const R=b.slice(C+1);if(R.length>0){const N=oi(m);S[S.length-1].insertAfter(N),R.forEach(I=>N.append(I))}}})(h,s),d.add(p)}})}const l=new Set,c=d=>{l.has(d.getKey())||(l.add(d.getKey()),d.setURL(r),n!==void 0&&d.setTarget(n),o!==void 0&&d.setRel(o),i!==void 0&&d.setTitle(i))};if(s.length===1){const d=s[0],f=cr(d,$a);if(f!==null)return c(f)}(function(d){const f=xe();if(!ue(f))return d();const h=yl(f),p=h.isBackward(),m=kT(h.anchor,p?-1:0),g=kT(h.focus,p?0:-1);if(d(),m||g){const v=xe();if(ue(v)){const b=v.clone();if(m){const y=m.getParent();y&&b.anchor.set(y.getKey(),m.getIndexWithinParent()+(p?1:0),"element")}if(g){const y=g.getParent();y&&b.focus.set(y.getKey(),g.getIndexWithinParent()+(p?0:1),"element")}In(yl(b))}}})(()=>{let d=null;for(const f of s){if(!f.isAttached())continue;const h=cr(f,$a);if(h){c(h);continue}if(H(f)){if(!f.isInline())continue;if($a(f)){if(!(Hc(f)||d!==null&&d.getParentOrThrow().isParentOf(f))){c(f),d=f;continue}for(const m of f.getChildren())f.insertBefore(m);f.remove();continue}}const p=f.getPreviousSibling();$a(p)&&p.is(d)?p.append(f):(d=Md(r,{rel:o,target:n,title:i}),f.insertAfter(d),d.append(f))}})}const Zoe=/^\+?[0-9\s()-]{5,}$/;function CT(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:Zoe.test(e)?`tel:${e}`:`https://${e}`}On.tag("a");function Q0(e,t,r=null){const n=nL(r),i=r?tL(r):[],o=r!==null&&i.length>0;if(o&&typeof n.caretPositionFromPoint=="function"){const a=n.caretPositionFromPoint(e,t,{shadowRoots:i});if(a!==null&&(function(s,l){for(let c=s;c!==null;){if(c===l)return!0;c=ac(c)}return!1})(a.offsetNode,r))return{node:a.offsetNode,offset:a.offset}}if(o){const a=r.getRootNode();if(Ms(a)){const s=a.elementFromPoint(e,t);if(s!==null&&r.contains(s)){const l=(function(c,d,f,h){const p=h.createRange(),m=T=>d<T.top?T.top-d:d>T.bottom?d-T.bottom:0,g=T=>c<T.left?T.left-c:c>T.right?c-T.right:0,v=h.createTreeWalker(f,NodeFilter.SHOW_TEXT);let b=null,y=1/0,S=1/0;for(let T=v.nextNode();T;T=v.nextNode()){p.selectNodeContents(T);for(const R of p.getClientRects()){const N=m(R),I=g(R);(N<y||N===y&&I<S)&&(y=N,S=I,b=T)}}if(b===null)return null;let w=0,C=1/0,A=1/0;for(let T=0;T<=b.length;T++){p.setStart(b,T),p.collapse(!0);const R=p.getBoundingClientRect(),N=m(R),I=Math.abs(c-R.left);(N<C||N===C&&I<A)&&(C=N,A=I,w=T)}return{node:b,offset:w}})(e,t,s,n);if(l!==null)return l}}}if(typeof n.caretRangeFromPoint=="function"){const a=n.caretRangeFromPoint(e,t);return a===null?null:{node:a.startContainer,offset:a.startOffset}}if(typeof n.caretPositionFromPoint=="function"){const a=n.caretPositionFromPoint(e,t);return a===null?null:{node:a.offsetNode,offset:a.offset}}return null}function ed(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Zx={"application/x-lexical-editor":0,"text/html":10,"text/plain":20,"text/uri-list":30};function eae(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:t=>t}).createHTML(e):e}const RT=(e,t)=>{if(!ue(t))return t.insertRawText(e),!0;const r=n=>{const i=xe();ue(i)&&n(i)};return I4(e,{linebreak:()=>r(n=>n.insertParagraph()),tab:()=>r(n=>n.insertNodes([Zd()])),text:n=>r(i=>i.insertText(n))}),!0},eS={"application/x-lexical-editor":[(e,t,r)=>{try{const n=Fr(),i=JSON.parse(e);if(i&&i.namespace===n._config.namespace&&Array.isArray(i.nodes))return AT(n,lae(i.nodes),t),!0}catch(n){console.error(n)}return r()}],"text/html":[(e,t,r)=>{try{const n=Fr(),i=new DOMParser().parseFromString(eae(e),"text/html");return AT(n,xoe(n,i),t),!0}catch(n){return console.error(n),r()}}],"text/plain":[RT],"text/uri-list":[RT]};function tae(e,t,r,n){if(!e)return!1;const i=o=>!!e[o]&&e[o](t,r,i.bind(null,o-1),n);return i(e.length-1)}function c8(e,t,r){const n=t.getData("text/plain");for(const i of(function(o){return Object.keys(o.$importMimeType).filter(a=>o.$importMimeType[a]!==void 0).sort((a,s)=>{const l=o.priority[a],c=o.priority[s];return l===void 0&&c===void 0?a<s?-1:a>s?1:0:l===void 0?1:c===void 0?-1:l-c})})(e)){const o=t.getData(i);if(o&&(i!=="text/html"||o!==n)&&tae(e.$importMimeType[i],o,r,t))return!0}return!1}const rae={$importMimeType:eS,$insertDataTransfer:(e,t)=>c8({$importMimeType:eS,priority:Zx},e,t),priority:Zx},nae={build:(e,t)=>({$importMimeType:t.$importMimeType,$insertDataTransfer:(r,n)=>c8(t,r,n),priority:t.priority}),config:{$importMimeType:eS,priority:Zx},mergeConfig(e,t){const r=TE(e,t);if(t.$importMimeType){const n={...e.$importMimeType};for(const[i,o]of Object.entries(t.$importMimeType))if(o){const a=n[i];n[i]=a?[...a,...o]:o}r.$importMimeType=n}return t.priority&&(r.priority={...e.priority,...t.priority}),r},name:"@lexical/clipboard/Import"};function d8(e,t=xe()){return t==null&&ed(166),ue(t)&&t.isCollapsed()||t.getNodes().length===0?"":woe(e,t)}function f8(e,t=xe()){return t==null&&ed(166),ue(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(sae(e,t))}function tS(e,t,r){(function(){const n=Iie(nae.name);return n?n.output:rae})().$insertDataTransfer(e,t)}const h8="application/x-lexical-drag";function iae(e,t){const r={editorKey:t.getKey()};e.setData(h8,JSON.stringify(r))}function oae(e,t,r){const n=e.dataTransfer;if(n===null)return!1;const i=(function(c){const d=c.getData(h8);if(!d)return null;let f;try{f=JSON.parse(d)}catch{return null}return(h=f)!==null&&typeof h=="object"&&"editorKey"in h&&typeof h.editorKey=="string"?f:null;var h})(n);if(i===null)return!1;const o=(function(c,d){const f=Q0(c.clientX,c.clientY,d.getRootElement());if(f===null)return null;const h=qu(f.node);if(h===null)return null;if(fe(h))return zl(h,"next",f.offset);if(H(h))return Hx(h,f.offset,"next");const p=h.getParent();return p===null?null:Hx(p,h.getIndexWithinParent()+1,"next")})(e,t);if(o===null)return!1;const a=gL(o);if(a===null)return!1;const s=i.editorKey===t.getKey(),l=xe();if(s){if(!ue(l)||l.isCollapsed())return!1;if((function(c,d){const{anchor:f,focus:h}=$E(Kx(d),"next");return lp(f,c)<0&&lp(c,h)<0})(o,l))return e.preventDefault(),!0;l.removeText()}if(!a.origin.isAttached())return e.preventDefault(),!0;if(r(n,up(mb(a)),t),!s){const c=t.getRootElement(),d=c?c.ownerDocument:null,f=d?(function(h,p){for(const m of rL(p)){const g=Jp(m);if(ub(g)&&g.getKey()===h&&it(m))return m}return null})(i.editorKey,d):null;f!==null&&f.dispatchEvent(new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteByDrag"}))}return e.preventDefault(),!0}function aae(e,t){return oae(e,t,tS)}function AT(e,t,r){e.dispatchCommand(Mre,{nodes:t,selection:r})||(r.insertNodes(t),(function(n){if(ue(n)&&n.isCollapsed()){const i=n.anchor;let o=null;const a=Oi(i,"previous");if(a)if(To(a))o=a.origin;else{const s=aa(a,Lo(un(),"next").getFlipped());for(const l of s){if(fe(l.origin)){o=l.origin;break}if(H(l.origin)&&!l.origin.isInline())break}}if(o&&fe(o)){const s=o.getFormat(),l=o.getStyle();n.format===s&&n.style===l||(n.format=s,n.style=l,n.dirty=!0)}}})(r))}function rS(e,t,r,n=[]){let i=t===null||r.isSelected(t);const o=H(r)&&r.excludeFromCopy("html");let a=r;t!==null&&fe(a)&&(a=yL(t,a,"clone"));const s=H(a)?a.getChildren():[],l=(function(d){const f=d.exportJSON(),h=d.constructor;if(f.type!==h.getType()&&ed(58,h.name),H(d)){const p=f.children;Array.isArray(p)||ed(59,h.name)}return f})(a);fe(a)&&a.getTextContentSize()===0&&(i=!1);const c=i&&fr(t)&&H(r)?null:t;for(let d=0;d<s.length;d++){const f=s[d],h=rS(e,c,f,l.children);!i&&H(r)&&h&&r.extractWithChild(f,t,"clone")&&(i=!0)}if(i&&!o){const d=$o(a);if(d.length>0){const f={};for(const h of d){const p=Ku(a,h);p===null&&ed(366,a.constructor.name,h);const m=[];rS(e,null,p,m),m.length===1&&m[0].type===p.getType()||ed(385,h,a.constructor.name,String(m.length),String(m.length>0?m[0].type:"none")),f[h]=m[0]}l.$slots=f}}if(i&&!o)n.push(l);else if(Array.isArray(l.children))for(let d=0;d<l.children.length;d++){const f=l.children[d];n.push(f)}return i}function sae(e,t){const r=[],n=un(),i=ue(t)?t.anchor.getNode():fr(t)?t.getNodes()[0]??null:null,o=i!==null?fb(i):null,a=(H(o)?o:n).getChildren();for(let s=0;s<a.length;s++)rS(e,t,a[s],r);return{namespace:e._config.namespace,nodes:r}}function lae(e){const t=[];for(const r of e)t.push(yne(r));return t}let Pc=null;async function $T(e,t,r){if(Pc!==null)return!1;if(t!==null)return new Promise((c,d)=>{e.update(()=>{c(TT(e,t,r))})});const n=e.getRootElement(),i=e._window||window,o=i.document,a=Si(i);if(n===null||a===null)return!1;const s=o.createElement("span");s.style.position="fixed",s.style.top="-1000px",s.append(o.createTextNode("#")),n.append(s);const l=o.createRange();return l.setStart(s,0),l.setEnd(s,1),a.removeAllRanges(),a.addRange(l),new Promise((c,d)=>{const f=e.registerCommand(ab,h=>(Sl(h,ClipboardEvent)&&(f(),Pc!==null&&(i.clearTimeout(Pc),Pc=null),c(TT(e,h,r))),!0),Cne);Pc=i.setTimeout(()=>{f(),Pc=null,c(!1)},50),o.execCommand("copy"),s.remove()})}function TT(e,t,r){if(r===void 0){const i=Si(e._window),o=xe();if(!o||o.isCollapsed()||!i)return!1;const a=Oo(i,e.getRootElement()),s=a.anchorNode,l=a.focusNode;if(s!==null&&l!==null&&!Wp(e,s,l))return!1;r=p8(o)}t.preventDefault();const n=t.clipboardData;return n!==null&&(m8(n,r),!0)}const uae=[["text/html",d8],["application/x-lexical-editor",f8]];function p8(e=xe()){return(function(t,r){const n={"text/plain":""};for(const[i,o]of Object.entries(t))if(o){const a=dae(o,r);a!==null&&(n[i]=a)}return n})(cae(),e)}function m8(e,t){for(const[r]of uae)t[r]===void 0&&e.setData(r,"");for(const r in t){const n=t[r];n!==void 0&&e.setData(r,n)}}function cae(e=Fr()){const t=Qp(e,fae.name);return t?t.output:g8}const g8={"application/x-lexical-editor":[(e,t)=>e?f8(Fr(),e):t()],"text/html":[(e,t)=>e?d8(Fr(),e):t()],"text/plain":[(e,t)=>e?e.getTextContent():t()]};function dae(e,t){const r=n=>e[n]?e[n](t,r.bind(null,n-1)):null;return r(e.length-1)}const fae={build:(e,t,r)=>t.$exportMimeType,config:{$exportMimeType:g8},mergeConfig(e,t){const r=TE(e,t);if(t.$exportMimeType){const n={...e.$exportMimeType};for(const[i,o]of Object.entries(t.$exportMimeType))if(o){const a=n[i];n[i]=a?[...a,...o]:o}r.$exportMimeType=n}return r},name:"@lexical/clipboard/GetClipboardData"},hae={$import:(e,t)=>{const r=$s(t.nodeName.toLowerCase());return sc(t,r),ts(r,t),qo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:On.tag("h1","h2","h3","h4","h5","h6"),name:"@lexical/rich-text/heading"},pae={$import:(e,t)=>{const r=df();return ts(r,t),sc(t,r),qo(r,t),[r.splice(0,0,e.$importChildren(t))]},match:On.tag("blockquote"),name:"@lexical/rich-text/blockquote"};On.tag("blockquote");On.tag("p"),On.tag("span");const NT=Ke("DRAG_DROP_PASTE_FILE"),dy=Gp("shadowRoot",{parse:Boolean});class cf extends ji{static getType(){return"quote"}static clone(t){return new cf(t.__key)}$config(){return this.config("quote",{extends:ji,stateConfigs:[{flat:!0,stateConfig:dy}]})}isShadowRoot(){return Kp(this,dy)}setIsShadowRoot(t){return cd(this,dy,t)}createDOM(t){const r=gr().createElement("blockquote");return Wa(r,t.theme.quote),r}updateDOM(t,r){return!1}static importDOM(){return{blockquote:t=>({conversion:mae,priority:0})}}exportDOM(t){const{element:r}=super.exportDOM(t);if(it(r)){this.isEmpty()&&r.append(gr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();i&&(r.dir=i)}return{element:r}}static importJSON(t){return df().updateFromJSON(t)}exportJSON(){return super.exportJSON()}insertNewAfter(t,r){const n=Xt(),i=this.getDirection();return n.setDirection(i),this.insertAfter(n,r),n}collapseAtStart(){if(this.isShadowRoot()){for(const r of this.getChildren())this.insertBefore(r);return this.remove(),!0}const t=Xt();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function df(e){const t=ya(new cf);return e&&e.shadowRoot?t.setIsShadowRoot(!0):t}function nS(e){return e instanceof cf}let _b=class v8 extends ji{__tag;static getType(){return"heading"}static clone(t){return new v8(t.__tag,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__tag=t.__tag}constructor(t="h1",r){super(r),this.__tag=t}getTag(){return this.getLatest().__tag}setTag(t){const r=this.getWritable();return r.__tag=t,r}createDOM(t){const r=this.__tag,n=gr().createElement(r),i=t.theme.heading;if(i!==void 0){const o=i[r];Wa(n,o)}return n}updateDOM(t,r,n){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:Oc,priority:0}),h2:t=>({conversion:Oc,priority:0}),h3:t=>({conversion:Oc,priority:0}),h4:t=>({conversion:Oc,priority:0}),h5:t=>({conversion:Oc,priority:0}),h6:t=>({conversion:Oc,priority:0}),p:t=>{const r=t.firstChild;return r!==null&&DT(r)?{conversion:()=>({node:null}),priority:3}:null},span:t=>DT(t)?{conversion:r=>({node:$s("h1")}),priority:3}:null}}exportDOM(t){const{element:r}=super.exportDOM(t);if(it(r)){this.isEmpty()&&r.append(gr().createElement("br"));const n=this.getFormatType();n&&(r.style.textAlign=n);const i=this.getDirection();i&&(r.dir=i)}return{element:r}}static importJSON(t){return $s(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,r=!0){const n=t?t.anchor.offset:0,i=this.getLastDescendant(),o=!i||t&&t.anchor.key===i.getKey()&&n===i.getTextContentSize()||!t?Xt():$s(this.getTag()),a=this.getDirection();if(o.setDirection(a),this.insertAfter(o,r),n===0&&!this.isEmpty()&&t){const s=Xt();s.select(),this.replace(s,!0)}return o}collapseAtStart(){if(this.isEmpty()){const t=Xt();this.getChildren().forEach(r=>t.append(r)),this.replace(t)}return!0}extractWithChild(){return!0}};function DT(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function Oc(e){const t=e.nodeName.toLowerCase();let r=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(r=$s(t),sc(e,r),ts(r,e),qo(r,e)),{node:r}}function mae(e){const t=df();return ts(t,e),sc(e,t),qo(t,e),{node:t}}function $s(e="h1"){return ya(new _b(e))}function gae(e){return e instanceof _b}function FT(e){const t=qu(e);return mt(t)}function Mc(e,t,r,n){let i=!1,o=null;if(e.isCollapsed()&&e.anchor.type==="text"){const s=e.anchor.getNode();if(fe(s)){o=s;const l=e.anchor.offset,c=l===s.getTextContentSize()&&s.getNextSibling()===null,d=l===0&&s.getPreviousSibling()===null;i=r==="end"&&c||r==="start"&&d||r==="both"&&(c||d)}}let a=!1;for(const[s,l]of Object.entries(n)){if(l==null||!l[t])continue;const c=s;if(l.onlyAtBoundary){if(!(i&&o&&fe(o)&&o.hasFormat(c)))continue;a=!0}e.hasFormat(c)&&e.toggleFormat(c)}a&&e.setStyle("")}const vae={capitalize:{enter:!0,space:!0,tab:!0},lowercase:{enter:!0,space:!0,tab:!0},uppercase:{enter:!0,space:!0,tab:!0}};function Ym(e,t){return(function(r,n){if(!r.isCollapsed())return!1;const i=Oi(r.focus,n),o=cr(i.origin,vd);if(!o)return!1;const a=r.focus.getNode();if(!o.is(a)&&!Pd(a,o))return!1;const s=aa(i,Ht(o,n));if(s.getTextSlices().some(f=>f&&f.getTextContentSize()>0))return!1;const l=aa(s.anchor.getSiblingCaret(),s.focus);let c=l.anchor.origin;for(const f of l){if(!Ll(f)||!f.origin.is(c.getParent()))return!1;c=f.origin}let d=o;for(const f of pb(Ht(o,n))){if(!f.origin.is(d.getParent())){if(Xg(f.origin)){const h=Ht(d,n);return up(aa(h,h)),!0}break}if(!vd(f.origin))break;d=f.origin}return!1})(e,t)||(function(r,n){if(!r.isCollapsed()||r.anchor.type!=="element")return!1;const i=Oi(r.anchor,n).getNodeAtCaret();return!(!vd(i)||i.isInline()||(up(mb(to(Lo(i,n)))),0))})(e,t)}function IT(e){return mt(e)&&!e.isInline()&&!e.isIsolated()&&e.isKeyboardSelectable()}function Xm(e){const t=O0();t.add(e),In(t)}function PT(e,t){if(!e.isCollapsed())return!1;const r=e.focus,n=r.getNode(),i=t?"previous":"next",o=Oi(r,i);if(r.type==="element"&&H(n)&&(Mr(n)||vd(n))){const b=o.getNodeAtCaret();return!(b===null||!IT(b))&&(Xm(b.__key),!0)}const a=cr(H(n)?n:n.getParentOrThrow(),b=>H(b)&&!b.isInline()&&br(b.getParent()));if(a===null)return!1;const s=Ht(a,i).getNodeAtCaret();if(s===null||!IT(s))return!1;if(a.getTextContentSize()===0)return Xm(s.__key),!0;const l=Fr().getRootElement();if(l===null)return!1;const c=Si(l.ownerDocument.defaultView);if(c===null||c.rangeCount===0)return!1;const d=c.anchorNode,f=c.anchorOffset,h=c.focusNode,p=c.focusOffset;c.modify("move",t?"backward":"forward","line");const m=c.anchorNode,g=c.anchorOffset;if(m===null)return OT(c,d,f,h,p),!1;const v=qu(m);return OT(c,d,f,h,p),v===null?!1:(m===d&&g===f||!v.is(a)&&!Pd(v,a))&&(Xm(s.__key),!0)}function OT(e,t,r,n,i){t!==null&&n!==null&&e.setBaseAndExtent(t,r,n,i)}function MT(e,t){if(!e.isCollapsed())return!1;const r=e.focus.getNode(),n=cr(H(r)?r:r.getParentOrThrow(),v=>H(v)&&!v.isInline());if(n===null)return!1;const i=Fr(),o=i.getRootElement();if(o===null)return!1;const a=o.ownerDocument.defaultView;if(a===null)return!1;let s=!1;for(const v of n.getChildren())if(H(v)&&v.isInline()){const b=i.getElementByKey(v.getKey());if(b!==null){const y=a.getComputedStyle(b).display;if(y==="inline-grid"||y==="inline-flex"){s=!0;break}}}if(!s)return!1;const l=Ht(n,t?"previous":"next").getNodeAtCaret();if(l===null||!H(l)){if(t){const v=n.getFirstDescendant();fe(v)?v.select(0,0):n.select(0,0)}else{const v=n.getLastDescendant();if(fe(v)){const b=v.getTextContentSize();v.select(b,b)}else{const b=n.getChildrenSize();n.select(b,b)}}return!0}const c=i.getElementByKey(l.getKey());if(c===null)return!1;const d=Si(a);if(d===null||d.rangeCount===0)return!1;const f=d.getRangeAt(0).cloneRange();f.collapse(!0);const h=f.getBoundingClientRect(),p=c.getBoundingClientRect(),m=p.top+p.height/2;if(h.height>0){const v=Q0(h.left,m,o);if(v!==null&&c.contains(v.node)){const b=o.ownerDocument.createRange();return b.setStart(v.node,v.offset),b.collapse(!0),e.applyDOMRange(b),e.dirty=!0,!0}}const g=t?l.getLastDescendant():l.getFirstDescendant();if(fe(g)){const v=t?g.getTextContentSize():0;g.select(v,v)}else{const v=l.getChildrenSize();l.select(t?v:0,t?v:0)}return!0}function Zm(e,t){const r=Ht(e,t),n=r.getAdjacentCaret();n!==null&&H(n.origin)&&!n.origin.isInline()&&n.origin.isShadowRoot()?up(mb(r)):t==="next"?e.selectNext(0,0):e.selectPrevious()}function LT(e,t,r){r.preventDefault(),r.stopPropagation();const n=e.getNodes();if(n.length===0)return!0;const i=n.map(l=>Ht(l,"next")).sort(lp),o=(t?i[0]:i[i.length-1]).origin,a=cr(o,l=>l!==o&&H(l)&&!l.isInline())??un(),s=t?0:a.getChildrenSize();return a.select(s,s),!0}function bae(e,t=Sie(vae)){return Ul(e.registerCommand(q6,()=>{const r=xe();return fr(r)?(r.clear(),!0):(ue(r)&&Mc(r,"click","both",t.peek()),!1)},ht),e.registerCommand(Eu,r=>{const n=xe();return ue(n)?(n.deleteCharacter(r),!0):!!fr(n)&&(n.deleteNodes(),!0)},ht),e.registerCommand(ep,r=>{const n=xe();return!!ue(n)&&(n.deleteWord(r),!0)},ht),e.registerCommand(tp,r=>{const n=xe();return!!ue(n)&&(n.deleteLine(r),!0)},ht),e.registerCommand(fd,r=>{const n=xe();if(typeof r=="string")n!==null&&n.insertText(r);else{if(n===null)return!1;const i=r.dataTransfer;if(i!=null)tS(i,n);else if(ue(n)){const o=r.data;return o&&n.insertText(o),!0}}return!0},ht),e.registerCommand(Hg,()=>{const r=xe();return!!ue(r)&&(r.removeText(),!0)},ht),e.registerCommand(ra,r=>{const n=xe();return!(!ue(n)&&!fr(n))&&(k4(n,r),!0)},ht),e.registerCommand(Lre,r=>{const n=xe();return!(!ue(n)&&!fr(n))&&(hne(n,r),!0)},ht),e.registerCommand(Bre,r=>{const n=xe();if(!ue(n)&&!fr(n))return!1;const i=n.getNodes();for(const o of i){const a=cr(o,s=>H(s)&&!s.isInline());a!==null&&a.setFormat(r)}return!0},ht),e.registerCommand(dd,r=>{const n=xe();return!!ue(n)&&(n.insertLineBreak(r),!0)},ht),e.registerCommand(Zh,()=>{const r=xe();return!!ue(r)&&(r.insertParagraph(),!0)},ht),e.registerCommand(zre,()=>{const r=Zd(),n=xe();return ue(n)&&(r.setFormat(n.format),r.setStyle(n.style)),gne([r]),!0},ht),e.registerCommand(Ure,()=>tT(r=>{const n=r.getIndent();r.setIndent(n+1)}),ht),e.registerCommand(c$,()=>tT(r=>{const n=r.getIndent();n>0&&r.setIndent(Math.max(0,n-1))}),ht),e.registerCommand(Z6,r=>{const n=xe();if(fr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),Zm(i[0],"previous"),!0}else if(ue(n)&&(!r.shiftKey&&Ym(n,"previous")||!r.shiftKey&&PT(n,!0)||!r.shiftKey&&MT(n,!0)))return r.preventDefault(),!0;return!1},ht),e.registerCommand(e4,r=>{const n=xe();if(fr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),Zm(i[0],"next"),!0}else if(ue(n)&&((function(i){const o=i.focus;return o.key==="root"&&o.offset===un().getChildrenSize()})(n)||!r.shiftKey&&Ym(n,"next")||!r.shiftKey&&PT(n,!1)||!r.shiftKey&&MT(n,!1)))return r.preventDefault(),!0;return!1},ht),e.registerCommand(Y6,r=>{const n=xe();if(fr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),Zm(i[0],Gm(i[0])?"next":"previous"),!0}if(!ue(n))return!1;if(!r.shiftKey&&Ym(n,Gm(n.anchor.getNode())?"next":"previous"))return r.preventDefault(),!0;if(r.shiftKey||Mc(n,"arrow","start",t.peek()),Z$(n,!0)){const i=r.shiftKey;return r.preventDefault(),eT(n,i,!0),!0}return!1},ht),e.registerCommand(J6,r=>{const n=xe();if(fr(n)){const i=n.getNodes();if(i.length>0)return r.preventDefault(),Zm(i[0],Gm(i[0])?"previous":"next"),!0}if(!ue(n))return!1;if(!r.shiftKey&&Ym(n,Gm(n.anchor.getNode())?"previous":"next"))return r.preventDefault(),!0;if(r.shiftKey||Mc(n,"arrow","end",t.peek()),Z$(n,!1)){const i=r.shiftKey;return r.preventDefault(),eT(n,i,!1),!0}return!1},ht),e.registerCommand(iE,r=>{const n=xe();if(!fr(n)&&FT(r.target))return!1;if(ue(n)){if((function(i){if(!i.isCollapsed())return!1;const{anchor:o}=i;if(o.offset!==0)return!1;const a=o.getNode();if(Mr(a))return!1;const s=yie(a);return s.getIndent()>0&&(s.is(a)||a.is(s.getFirstDescendant()))})(n))return r.preventDefault(),e.dispatchCommand(c$,void 0);if(Ml&&Td)return!1}else if(!fr(n))return!1;return r.preventDefault(),e.dispatchCommand(Eu,!0)},ht),e.registerCommand(n4,r=>{const n=xe();return!(!fr(n)&&FT(r.target))&&!(!ue(n)&&!fr(n))&&(r.preventDefault(),e.dispatchCommand(Eu,!1))},ht),e.registerCommand(rp,r=>{let n=xe();if(fr(n)){const i=n.getNodes();i.length===1&&mt(i[0])&&!i[0].isInline()&&(n=i[0].selectNext())}if(!ue(n))return!1;if(Mc(n,"enter","both",t.peek()),r!==null){if((Ml||qp||Vp)&&Td)return!1;if(r.preventDefault(),r.shiftKey)return e.dispatchCommand(dd,!1)}return e.dispatchCommand(Zh,void 0)},ht),e.registerCommand(r4,()=>{const r=xe();return!!ue(r)&&(e.blur(),!0)},ht),e.registerCommand(o4,r=>{const[,n]=Km(r);if(n.length>0){const i=r.clientX,o=r.clientY,a=Q0(i,o,e.getRootElement());if(a!==null){const{offset:s,node:l}=a,c=qu(l);if(c!==null){const d=sE();if(fe(c))d.anchor.set(c.getKey(),s,"text"),d.focus.set(c.getKey(),s,"text");else{const h=c.getParentOrThrow().getKey(),p=c.getIndexWithinParent()+1;d.anchor.set(h,p,"element"),d.focus.set(h,p,"element")}const f=yl(d);In(f)}e.dispatchCommand(NT,n)}return r.preventDefault(),!0}return aae(r,e)},ht),e.registerCommand(a4,r=>{const[n]=Km(r),i=xe();return!(n&&!ue(i))&&(ue(i)&&!i.isCollapsed()&&r.dataTransfer!==null&&(m8(r.dataTransfer,p8(i)),iae(r.dataTransfer,e)),!0)},ht),e.registerCommand(s4,r=>{const[n]=Km(r),i=xe();if(n&&!ue(i))return!1;const o=r.clientX,a=r.clientY,s=Q0(o,a,e.getRootElement());if(s!==null){const l=qu(s.node);mt(l)&&r.preventDefault()}return!0},ht),e.registerCommand(l4,()=>{const r=xe();return Ine(ue(r)&&fb(r.anchor.getNode())!==null?r:null),!0},ht),e.registerCommand(ab,r=>($T(e,Sl(r,ClipboardEvent)?r:null),!0),ht),e.registerCommand(oE,r=>((async function(n,i){await $T(i,Sl(n,ClipboardEvent)?n:null),i.update(()=>{const o=xe();ue(o)?o.removeText():fr(o)&&o.getNodes().forEach(a=>a.remove())},{tag:b4})})(r,e),!0),ht),e.registerCommand(nE,r=>{const[,n,i]=Km(r);return n.length>0&&!i?(e.dispatchCommand(NT,n),!0):sf(r.target)&&mE(r.target)?!1:xe()!==null&&((function(o,a){o.preventDefault(),a.update(()=>{const s=xe(),l=Sl(o,InputEvent)||Sl(o,KeyboardEvent)?null:o.clipboardData;l!=null&&s!==null&&tS(l,s)},{tag:v4})})(r,e),!0)},ht),e.registerCommand(t4,()=>{const r=xe();return ue(r)&&Mc(r,"space","both",t.peek()),!1},ht),e.registerCommand(i4,()=>{const r=xe();return ue(r)&&Mc(r,"tab","both",t.peek()),!1},ht),e.registerCommand(Q6,r=>{const n=xe();if(fr(n))return LT(n,!1,r);if(!ue(n))return!1;const{anchor:i}=n;if(i.type!=="element"||i.offset!==0)return!1;const o=i.getNode();if(!H(o))return!1;const a=o.getFirstChild();if(!mt(a)||!a.isInline())return!1;const s=o.getKey(),l=o.selectEnd();return r.shiftKey&&l.anchor.set(s,0,"element"),r.preventDefault(),r.stopPropagation(),!0},ht),e.registerCommand(X6,r=>{const n=xe();if(fr(n))return LT(n,!0,r);if(!ue(n))return!1;const{anchor:i,focus:o}=n,a=cr(o.getNode(),c=>H(c)&&!c.isInline());if(a===null)return!1;const s=a.getFirstChild();if(!mt(s)||!s.isInline()||cr(i.getNode(),c=>H(c)&&!c.isInline())!==a)return!1;const l=a.getKey();return(o.type!=="element"||o.key!==l||o.offset!==0)&&(n.focus.set(l,0,"element"),r.shiftKey||n.anchor.set(l,0,"element"),r.preventDefault(),r.stopPropagation(),!0)},ht))}function iS(e,t){const r={};for(const n of e){const i=t(n);i&&(r[i]?r[i].push(n):r[i]=[n])}return r}function UE(e){const t=iS(e,r=>r.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}const zT=/[!-/:-@[-`{-~\s]/,UT=/\s/,oS=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/,_ae=/^\s{0,3}$/;function aS(e){if(!of(e))return!1;const t=e.getFirstChild();return t==null||e.getChildrenSize()===1&&fe(t)&&_ae.test(t.getTextContent())}function sS(e){return e.replace(/\\([!-/:-@[-`{-~])/g,"$1").replace(/&#(\d+);/g,(t,r)=>String.fromCodePoint(Number(r)))}const b8=/^(\s*)(\d{1,})\.\s/,_8=/^(\s*)[-*+]\s/,yae=/^(\s*)(?:[-*+]\s)?\s?(\[(\s|x)?\])\s/i,lS=/^(#{1,6})\s/,y8=/^>\s/,x8=/^([ \t]*`{3,})([\w-]+)?[ \t]?/,uS=/^[ \t]*`{3,}$/,xae=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,Sae=/^(?:\|)(.+)(?:\|)\s?$/;function wae(e){if(e[0]!=="|")return!1;const{length:t}=e;let r=1,n=0;for(;r<t;){let i=r;for(e[i]===" "&&i++,e[i]===":"&&i++;e[i]==="-";)i++;if(e[i]===":"&&i++,e[i]===" "&&i++,e[i]!=="|")break;n++,r=i+1}return n>0&&(r===t||r===t-1&&/\s/.test(e[r]))}const BT=/^<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,jT=/^<\/[a-z_][\w-]*\s*>/i,qT=e=>new RegExp(`(?:${e.source})$`,e.flags),ah=Gp("mdListMarker",{parse:e=>typeof e=="string"&&/^[-*+]$/.test(e)?e:"-",resetOnCopyNode:!0}),VT=Gp("mdCodeFence",{parse:e=>typeof e=="string"&&/^`{3,}$/.test(e)?e:"```",resetOnCopyNode:!0}),S8=Gp("mdHardLineBreak",{parse:e=>typeof e=="string"&&/^(\\| {2,})$/.test(e)?e:"",resetOnCopyNode:!0});function cS(e){if(e.endsWith("\\"))return[e.slice(0,-1),"\\"];const t=e.match(/^(.*?\S)( {2,})$/);return t?[t[1],t[2]]:null}function Eae(e){const t=e.getChildren(),r=t.length-1,n=t[r];if(!fe(n))return null;const i=n.getTextContent(),o=cS(i);if(o!==null){const[a,s]=o;return n.setTextContent(a),s}return/^ {2,}$/.test(i)&&(function(a,s){for(let l=s-1;l>=0;l--){if(_i(a[l]))return!1;if(/\S/.test(a[l].getTextContent()))return!0}return!1})(t,r)?(n.setTextContent(""),i):null}function w8(e){const t=fa(),r=Eae(e);return r!==null&&cd(t,S8,r),t}const E8=e=>(t,r,n,i)=>{const o=e(n);o.append(...r),t.replace(o),i||o.select(0,0)},k8=e=>(t,r,n,i)=>{const o=t.getPreviousSibling(),a=t.getNextSibling(),s=Ja(e==="check"?n[3]==="x":void 0),l=n[0].trim()[0],c=e!=="bullet"&&e!=="check"||l!==ah.parse(l)?void 0:l;if(ct(a)&&a.getListType()===e){c&&cd(a,ah,c);const f=a.getFirstChild();f!==null?f.insertBefore(s):a.append(s),e==="number"&&a.setStart(Number(n[2])),t.remove()}else if(ct(o)&&o.getListType()===e)c&&cd(o,ah,c),o.append(s),t.remove();else{const f=sa(e,e==="number"?Number(n[2]):void 0);c&&cd(f,ah,c),f.append(s),t.replace(f)}s.append(...r),i||s.select(0,0);const d=(function(f){const h=f.match(/\t/g),p=f.match(/ /g);let m=0;return h&&(m+=h.length),p&&(m+=Math.floor(p.length/4)),m})(n[1]);d&&s.setIndent(d)},BE=(e,t,r,n)=>{const i=[],o=e.getChildren();let a=0;for(const s of o)if(Ut(s)){if(s.getChildrenSize()===1){const p=s.getFirstChild();if(ct(p)){const m=BE(p,t,r+1,n);m&&i.push(m);continue}}if(n&&!s.getChildren().some(p=>p.isSelected(n)))continue;const l=" ".repeat(4*r),c=e.getListType(),d=Kp(e,ah),f=c==="number"?`${e.getStart()+a}. `:c==="check"?`${d} [${s.getChecked()?"x":" "}] `:d+" ";let h=t(s);c!=="number"&&(h=h.replace(/^(\s{0,3}\d+)(\.\s)/,"$1\\$2")),i.push(l+f+h),a++}return i.join(`
|
|
29
|
+
`)},kae={dependencies:[_b],export:(e,t)=>{if(!gae(e))return null;const r=Number(e.getTag().slice(1));return"#".repeat(r)+" "+t(e)},regExp:lS,replace:E8(e=>{const t="h"+e[1].length;return $s(t)}),triggerOnEnter:!0,type:"element"},Cae={dependencies:[cf],export:(e,t)=>{if(!nS(e))return null;const r=t(e).split(`
|
|
30
|
+
`),n=[];for(const i of r)n.push("> "+i);return n.join(`
|
|
31
|
+
`)},regExp:y8,replace:(e,t,r,n)=>{if(n){const o=e.getPreviousSibling();if(nS(o))return o.splice(o.getChildrenSize(),0,[w8(o),...t]),void e.remove()}const i=df();i.append(...t),e.replace(i),n||i.select(0,0)},triggerOnEnter:!0,type:"element"},t0={dependencies:[uf],export:e=>{if(!dp(e))return null;const t=e.getTextContent();let r=Kp(e,VT);if(t.indexOf(r)>-1){const n=t.match(/`{3,}/g);if(n){const i=Math.max(...n.map(o=>o.length));r="`".repeat(i+1)}}return r+(e.getLanguage()||"")+(t?`
|
|
32
|
+
`+t:"")+`
|
|
33
|
+
`+r},handleImportAfterStartMatch:({lines:e,rootNode:t,startLineIndex:r,startMatch:n})=>{const i=n[1],o=i.trim().length,a=e[r],s=n.index+i.length,l=a.slice(s),c=new RegExp(`\`{${o},}$`);if(c.test(l)){const p=l.match(c),m=l.slice(0,l.lastIndexOf(p[0])),g=[...n];return g[2]="",t0.replace(t,null,g,p,[m],!0),[!0,r]}const d=new RegExp(`^[ \\t]*\`{${o},}$`);for(let p=r+1;p<e.length;p++){const m=e[p];if(d.test(m)){const g=m.match(d),v=e.slice(r+1,p),b=a.slice(n[0].length);return b.length>0&&v.unshift(b),t0.replace(t,null,n,g,v,!0),[!0,p]}}const f=e.slice(r+1),h=a.slice(n[0].length);return h.length>0&&f.unshift(h),t0.replace(t,null,n,null,f,!0),[!0,e.length-1]},regExpEnd:{optional:!0,regExp:uS},regExpStart:x8,replace:(e,t,r,n,i,o)=>{let a,s;const l=r[1]?r[1].trim():"```",c=r[2]||void 0;if(!t&&i){if(i.length===1)n?(a=pi(c),s=i[0]):(a=pi(c),s=i[0].startsWith(" ")?i[0].slice(1):i[0]);else{for(a=pi(c),i.length>0&&(i[0].trim().length===0?i.shift():i[0].startsWith(" ")&&(i[0]=i[0].slice(1)));i.length>0&&!i[i.length-1].length;)i.pop();s=i.join(`
|
|
34
|
+
`)}cd(a,VT,l);const d=Pr(s);a.append(d),e.append(a)}else t&&E8(d=>pi(d?d[2]:void 0))(e,t,r,o)},type:"multiline-element"},Rae={dependencies:[Yp,cc],export:(e,t,r)=>ct(e)?BE(e,t,0,r):null,regExp:_8,replace:k8("bullet"),triggerOnEnter:!0,type:"element"},Aae={dependencies:[Yp,cc],export:(e,t,r)=>ct(e)?BE(e,t,0,r):null,regExp:b8,replace:k8("number"),triggerOnEnter:!0,type:"element"},$ae={format:["code"],tag:"`",type:"text-format"},Tae={format:["highlight"],tag:"==",type:"text-format"},Nae={format:["bold","italic"],tag:"***",type:"text-format"},Dae={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},Fae={format:["bold"],tag:"**",type:"text-format"},Iae={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Pae={format:["strikethrough"],tag:"~~",type:"text-format"},Oae={format:["italic"],tag:"*",type:"text-format"},Mae={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Lae={dependencies:[Xp],export:(e,t,r)=>{if(!$a(e)||Hc(e))return null;const n=t(e);let i=e.getTitle();return i!=null&&(i=i.replace(/([\\"])/g,"\\$1")),i?`[${n}](${e.getURL()} "${i}")`:`[${n}](${e.getURL()})`},importRegExp:/(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[\]]*(?:\[[^[\]]*\][^[\]]*)*)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(e,t)=>{if(cr(e,$a))return;const[,r,n,i]=t,o=n!=null?sS(n):void 0,a=i!=null?sS(i):void 0,s=Md(o,{title:a}),l=r.split("[").length-1,c=r.split("]").length-1;let d=r,f="";if(l<c)return;if(l>c){const p=r.split("[");f="["+p[0],d=p.slice(1).join("[")}const h=Pr(d);return h.setFormat(e.getFormat()),s.append(h),e.replace(s),f&&s.insertBefore(Pr(f)),h},trigger:")",type:"text-match"},zae=[kae,Cae,Rae,Aae],Uae=[t0],Bae=[$ae,Nae,Dae,Fae,Iae,Tae,Oae,Mae,Pae],jae=[Lae],Nl=[...zae,...Uae,...Bae,...jae];function qae(e,t=!1){const r=e.split(`
|
|
35
|
+
`);let n=0;const i=[];for(let o=0;o<r.length;o++){const a=r[o],s=a.trimEnd(),l=i[i.length-1],c=o<r.length-1?cS(a):null,d=l!==void 0&&cS(l)!==null;if(xae.test(s))i.push(s);else if(n===0){{const f=s.match(x8);if(f){n=f[1].trim().length,i.push(s);continue}}s===""||l===""||!l||lS.test(l)||lS.test(s)||y8.test(s)||b8.test(s)||_8.test(s)||yae.test(s)||Sae.test(s)||wae(s)||d||!t||BT.test(s)||jT.test(s)||qT(jT).test(l)||qT(BT).test(l)||uS.test(l)?i.push(!t&&s!==""||c!==null?a:s):i[i.length-1]=l+" "+(c===null?s:a).trimStart()}else{if(uS.test(s)&&s.trim().length>=n){n=0,i.push(s);continue}i.push(a)}}return i.join(`
|
|
36
|
+
`)}function Vae(e,t,r,n,i){for(const o of t){if(!o.export)continue;const a=o.export(e,s=>Y0(s,r,n,void 0,void 0,i));if(a!=null)return a}return H(e)?Y0(e,r,n,void 0,void 0,i):mt(e)?e.getTextContent():null}function Y0(e,t,r,n,i,o=!1){const a=[],s=e.getChildren();n||(n=[]),i||(i=[]);e:for(const l of s){for(const c of r){if(!c.export)continue;const d=c.export(l,f=>Y0(f,t,r,n,[...i,...n],o),(f,h)=>GT(f,h,t,n,i,o));if(d!=null){a.push(d);continue e}}_i(l)?a.push(Gae(l)):fe(l)?a.push(GT(l,l.getTextContent(),t,n,i,o)):H(l)?a.push(Y0(l,t,r,n,i,o)):mt(l)&&a.push(l.getTextContent())}return a.join("")}function Gae(e){return Kp(e,S8)+`
|
|
37
|
+
`}function GT(e,t,r,n,i,o=!1){const a=e.hasFormat("code");let s,l,c,d,f=t;if(a||(f=o?f.replace(/([*_`~])/g,"\\$1"):f.replace(/([*_`~\\])/g,"\\$1")),a){const{fence:y,padded:S}=(function(w){const C=w.match(/`+/g),A=C?Math.max(...C.map(T=>T.length)):0;return{fence:"`".repeat(A+1),padded:w.length===0||w.includes("`")||/^\s/.test(w)&&/\s$/.test(w)?` ${w} `:w}})(t);s="",c="",l=y+S+y,d=!1}else{const y=f.match(/^(\s*)(.*?)(\s*)$/s)||["","",f,""];s=y[1],l=y[2],c=y[3],d=l===""}let h="",p="",m="";const g=KT(e,!0),v=KT(e,!1),b=new Set;for(const y of r){const S=y.format[0],w=y.tag;S!=="code"&&HT(e,S)&&!b.has(S)&&(b.add(S),HT(g,S)&&n.find(C=>C.tag===w)||(n.push({format:S,tag:w}),h+=w))}for(let y=0;y<n.length;y++){const S=dS(e,n[y].format),w=dS(v,n[y].format);if(S&&w)continue;const C=[...n];for(;C.length>y;){const A=C.pop();i&&A&&i.find(T=>T.tag===A.tag)||(A&&typeof A.tag=="string"&&(S?w||(m+=A.tag):p+=A.tag),n.pop())}break}return d&&!e.hasFormat("code")?p+f:p+s+h+l+m+c}function KT(e,t){const r=t?e.getPreviousSibling():e.getNextSibling();return fe(r)?r:null}function dS(e,t){return fe(e)&&e.hasFormat(t)}function HT(e,t){return!!dS(e,t)&&(t==="code"||!e||!/^\s*$/.test(e.getTextContent()))}function Kae(e,t){const r=e.getTextContent(),n=t.transformersByTag["`"],i=[];let o=null;if(n){const f=(function(h){const p=y=>{let S=0;for(let w=y-1;w>=0&&h[w]==="\\";w--)S++;return S%2==1},m=[];let g=0;for(;g<h.length;)if(h[g]==="`"){let y=1;for(;g+y<h.length&&h[g+y]==="`";)y++;m.push({index:g,length:y}),g+=y}else g++;const v=[];let b=0;for(;b<m.length;){const y=m[b];if(p(y.index)){b++;continue}let S=-1;for(let A=b+1;A<m.length;A++)if(m[A].length===y.length){S=A;break}if(S===-1){b++;continue}const w=m[S];let C=h.slice(y.index+y.length,w.index);C.length>=2&&C.startsWith(" ")&&C.endsWith(" ")&&/[^ ]/.test(C)&&(C=C.slice(1,-1)),v.push({content:C,endIndex:w.index+w.length,startIndex:y.index}),b=S+1}return v})(r);for(const h of f)o||(o={content:h.content,endIndex:h.endIndex,startIndex:h.startIndex,tag:"`"}),i.push({end:h.endIndex,start:h.startIndex})}const a=(function(f,h,p=[]){const m=[],g=new Set(Object.keys(h.transformersByTag).filter(S=>S[0]!=="`").map(S=>S[0])),v=S=>{let w=0;for(let C=S-1;C>=0&&f[C]==="\\";C--)w++;return w%2==1},b=S=>p.some(w=>S>=w.start&&S<w.end);let y=0;for(;y<f.length;){const S=f[y];if(!g.has(S)||v(y)||b(y)){y++;continue}let w=1;for(;y+w<f.length&&f[y+w]===S;)w++;const C=WT(S,f,y,w,!0),A=WT(S,f,y,w,!1);(C||A)&&m.push({active:!0,canClose:A,canOpen:C,char:S,index:y,length:w}),y+=w}return m})(r,t,i),s=a.length>0?(function(f,h,p){const m={};let g=0,v=null;for(;g<h.length;){const b=h[g];if(!b.active||!b.canClose||b.length===0){g++;continue}const y=`${b.char}${b.canOpen}${b.length%3}`,S=m[y]??-1;let w=!1;for(let C=g-1;C>S;C--){const A=h[C];if(!A.active||!A.canOpen||A.length===0||A.char!==b.char||(A.canClose||b.canOpen)&&(A.length+b.length)%3==0&&A.length%3!=0&&b.length%3!=0)continue;const T=Math.min(A.length,b.length),R=Object.keys(p.transformersByTag).filter(M=>M[0]===A.char&&M.length<=T).sort((M,P)=>P.length-M.length)[0];if(!R)continue;w=!0;const N=R.length,I={content:f.slice(A.index+A.length,b.index),endIndex:b.index+N,startIndex:A.index+(A.length-N),tag:R};(!v||I.startIndex<v.startIndex||I.startIndex===v.startIndex&&I.endIndex>v.endIndex)&&(v=I);for(let M=C+1;M<g;M++)h[M].active=!1;A.length-=N,b.length-=N,A.active=A.length>0,b.length>0?b.index+=N:(b.active=!1,g++);break}w||(m[y]=g-1,b.canOpen||(b.active=!1),g++)}return v})(r,a,t):null;let l=null,c=null;if(o&&s?s.startIndex<=o.startIndex&&s.endIndex>=o.endIndex?(l=s,c=t.transformersByTag[s.tag]):(l=o,c=n):o?(l=o,c=n):s&&(l=s,c=t.transformersByTag[s.tag]),!l||!c)return null;const d=[r.slice(l.startIndex,l.endIndex),l.tag,l.content];return d.index=l.startIndex,d.input=r,{endIndex:l.endIndex,isCodeSpan:c===n,match:d,startIndex:l.startIndex,transformer:c}}function WT(e,t,r,n,i){if(!JT(t,r,n,i))return!1;if(e==="*")return!0;if(e==="_"){if(!JT(t,r,n,!i))return!0;const o=i?t[r-1]:t[r+n];return o!==void 0&&oS.test(o)}return!0}function JT(e,t,r,n){const i=e[t-1],o=e[t+r],[a,s]=n?[o,i]:[i,o];return a!==void 0&&!UT.test(a)&&(!oS.test(a)||s===void 0||UT.test(s)||oS.test(s))}function fl(e){return fe(e)&&!e.hasFormat("code")}function lu(e,t,r){let n=Kae(e,t),i=(function(a,s){const l=a;let c,d,f,h;for(const p of s){if(!p.replace||!p.importRegExp)continue;const m=l.getTextContent().match(p.importRegExp);if(!m)continue;const g=m.index||0,v=p.getEndIndex?p.getEndIndex(l,m):g+m[0].length;v!==!1&&(c===void 0||d===void 0||g<c&&(v>d||v<=c))&&(c=g,d=v,f=p,h=m)}return c===void 0||d===void 0||f===void 0||h===void 0?null:{endIndex:d,match:h,startIndex:c,transformer:f}})(e,r);if(n&&i&&(n.isCodeSpan?i.startIndex<=n.startIndex&&i.endIndex>=n.endIndex?n=null:i=null:n.startIndex<=i.startIndex&&n.endIndex>=i.endIndex||i.startIndex>n.endIndex?i=null:n=null),n){const a=(function(s,l,c,d,f){const h=s.getTextContent();let p,m,g;if(f[0]===h?p=s:l===0?[p,m]=s.splitText(c):[g,p,m]=s.splitText(l,c),p.setTextContent(f[2]),d)for(const v of d.format)p.hasFormat(v)||p.toggleFormat(v);return{nodeAfter:m,nodeBefore:g,transformedNode:p}})(e,n.startIndex,n.endIndex,n.transformer,n.match);fl(a.nodeAfter)&&lu(a.nodeAfter,t,r),fl(a.nodeBefore)&&lu(a.nodeBefore,t,r),fl(a.transformedNode)&&lu(a.transformedNode,t,r)}else if(i){const a=(function(s,l,c,d,f){let h,p,m;return l===0?[h,p]=s.splitText(c):[m,h,p]=s.splitText(l,c),d.replace?{nodeAfter:p,nodeBefore:m,transformedNode:d.replace(h,f)||void 0}:null})(e,i.startIndex,i.endIndex,i.transformer,i.match);if(!a)return;fl(a.nodeAfter)&&lu(a.nodeAfter,t,r),fl(a.nodeBefore)&&lu(a.nodeBefore,t,r),fl(a.transformedNode)&&lu(a.transformedNode,t,r)}const o=sS(e.getTextContent());e.setTextContent(o)}function Hae(e,t,r,n=!1){const i=UE(r),o=(function(c){const d={},f={},h=[];for(const p of c){const{tag:m}=p;d[m]=p;const g=m.replace(/(\*|\^|\+)/g,"\\$1");h.push(g),m.length===1?f[m]=m==="`"?new RegExp("(^|[^\\\\`])(`)((?:\\\\`|[^`])+?)(`)(?!`)"):new RegExp(`(^|[^\\\\${g}])(${g})((\\\\${g})?.*?[^${g}\\s](\\\\${g})?)(${g})(?![\\\\${g}])`):f[m]=new RegExp(`(^|[^\\\\])(${g})((\\\\${g})?.*?[^\\s](\\\\${g})?)(${g})(?!\\\\)`)}return{fullMatchRegExpByTag:f,openTagsRegExp:new RegExp(`(${h.join("|")})`,"g"),transformersByTag:d}})(i.textFormat),a=e.split(`
|
|
38
|
+
`),s=a.length;for(let c=0;c<s;c++){const d=a[c],[f,h]=Wae(a,c,i.multilineElement,t);f?c=h:Jae(d,t,i.element,o,i.textMatch,n)}const l=t.getChildren();for(const c of l)if(!n&&aS(c)&&t.getChildrenSize()>1)c.remove();else if(H(c))for(const d of c.getAllTextNodes())Qae(d)}function Wae(e,t,r,n){for(const i of r){const{handleImportAfterStartMatch:o,regExpEnd:a,regExpStart:s,replace:l}=i,c=e[t].match(s);if(!c)continue;if(o){const m=o({lines:e,rootNode:n,startLineIndex:t,startMatch:c,transformer:i});if(m===null)continue;if(m)return m}const d=typeof a=="object"&&"regExp"in a?a.regExp:a,f=a&&typeof a=="object"&&"optional"in a?a.optional:!a;let h=t;const p=e.length;for(;h<p;){const m=d?e[h].match(d):null;if(!m&&(!f||f&&h<p-1)){h++;continue}if(m&&t===h&&m.index===c.index){h++;continue}const g=[];if(m&&t===h)g.push(e[t].slice(c[0].length,-m[0].length));else for(let v=t;v<=h;v++)if(v===t){const b=e[v].slice(c[0].length);g.push(b)}else if(v===h&&m){const b=e[v].slice(0,-m[0].length);g.push(b)}else g.push(e[v]);if(l(n,null,c,m,g,!0)!==!1)return[!0,h];break}}return[!1,t]}function Jae(e,t,r,n,i,o){const a=Pr(e),s=Xt();s.append(a),t.append(s);for(const{regExp:l,replace:c}of r){const d=e.match(l);if(d&&(a.setTextContent(e.slice(d[0].length)),c(s,[a],d,!0)!==!1))break}if(lu(a,n,i),s.getParent()!==null&&e.length>0){const l=s.getPreviousSibling();if(!o&&(of(l)||nS(l)||ct(l))){let c=l;if(ct(l)){const d=l.getLastDescendant();c=d==null?null:cr(d,Ut)}c!=null&&c.getTextContentSize()>0&&(c.splice(c.getChildrenSize(),0,[w8(c),...s.getChildren()]),s.remove())}}}function Qae(e){const t=new Set,r=e.getTextContent();let n=r.indexOf(" ");for(;n!==-1;)t.add(n),t.add(n+1),n=r.indexOf(" ",n+1);e.splitText(...t).forEach(i=>{i.getTextContent()===" "&&i.replace(Zd())})}function Yae(e,...t){const r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;n.append("code",e);for(const i of t)n.append("v",i);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function QT(e,t,r,n,i){const o=e.getParent();if(!br(o)||e.getFirstChild()!==t)return!1;const a=t.getTextContent();if(!i&&a[r-1]!==" ")return!1;for(const{regExp:s,replace:l}of n){const c=a.match(s),d=i||c&&c[0].endsWith(" ")?r:r-1;if(c&&c[0].length===d){const f=t.getNextSiblings(),[h,p]=t.splitText(r);if(l(e,p?[p,...f]:f,c,!1)!==!1)return h.remove(),!0}}return!1}function YT(e,t,r,n,i){const o=e.getParent();if(!br(o)||e.getFirstChild()!==t)return!1;const a=t.getTextContent();if(!i&&a[r-1]!==" ")return!1;for(const{regExpStart:s,replace:l,regExpEnd:c}of n){if(c&&!("optional"in c)||c&&"optional"in c&&!c.optional)continue;const d=a.match(s);if(d){const f=i||d[0].endsWith(" ")?r:r-1;if(d[0].length!==f)continue;const h=t.getNextSiblings(),[p,m]=t.splitText(r);if(l(e,m?[m,...h]:h,d,null,null,!1)!==!1)return p.remove(),!0}}return!1}function Xae(e,t){let r=0;const n=e.getTextContent();for(let i=0;i<t;i++)n[i]==="`"&&r++;return r%2!=0}function XT(e,t,r){const n=r.length;for(let i=t;i>=n;i--){const o=i-n;if(C8(e,o,r,0,n)&&e[o+n]!==" ")return o}return-1}function C8(e,t,r,n,i){for(let o=0;o<i;o++)if(e[t+o]!==r[n+o])return!1;return!0}function Zae(e,t=Nl){const r=UE(t),n=r.element.filter(l=>l.triggerOnEnter),i=iS(r.textFormat,({tag:l})=>l[l.length-1]),o=iS(r.textMatch,({trigger:l})=>l),a=new Set([" "]);for(const l of r.textFormat)a.add(l.tag.slice(-1));for(const l of r.textMatch)l.trigger!==void 0&&a.add(l.trigger);for(const l of t){const c=l.type;if(c==="element"||c==="text-match"||c==="multiline-element"){const d=l.dependencies;for(const f of d)e.hasNode(f)||Yae(173,f.getType())}}const s=(l,c,d)=>!!QT(l,c,d,r.element)||!!YT(l,c,d,r.multilineElement)||!!(function(f,h,p){let m=f.getTextContent();const g=p[m[h-1]];if(g==null)return!1;h<m.length&&(m=m.slice(0,h));for(const v of g){if(!v.replace||!v.regExp)continue;const b=m.match(v.regExp);if(b===null)continue;const y=b.index||0,S=y+b[0].length;let w;return y===0?[w]=f.splitText(S):[,w]=f.splitText(y,S),w.selectNext(0,0),v.replace(w,b),!0}return!1})(c,d,o)||!!(function(f,h,p){const m=f.getTextContent(),g=h-1,v=m[g],b=p[v];if(!b)return!1;for(const y of b){const{tag:S}=y,w=S.length,C=g-w+1;if(w>1&&!C8(m,C,S,0,w)||m[C-1]===" ")continue;const A=m[g+1];if(y.intraword===!1&&A&&!zT.test(A))continue;const T=f;let R=T,N=XT(m,C,S),I=R;for(;N<0&&(I=I.getPreviousSibling())&&!_i(I);)if(fe(I)){if(I.hasFormat("code"))continue;const se=I.getTextContent();R=I,N=XT(se,se.length,S)}if(N<0||R===T&&N+w===C)continue;const M=R.getTextContent();if(N>0&&M[N-1]===v)continue;const P=M[N-1];if(y.intraword===!1&&P&&!zT.test(P)||!y.format.includes("code")&&Xae(R,N))continue;const B=T.getTextContent(),j=B.slice(0,C)+B.slice(g+1);T.setTextContent(j);const W=R===T?j:M;R.setTextContent(W.slice(0,N)+W.slice(N+w));const te=xe(),J=sE();In(J);const re=g-w*(R===T?2:1)+1;J.anchor.set(R.__key,N,"text"),J.focus.set(T.__key,re,"text");for(const se of y.format)J.formatText(se,Os[se]);J.anchor.set(J.focus.key,J.focus.offset,J.focus.type);for(const se of y.format)J.hasFormat(se)&&J.toggleFormat(se);return ue(te)&&(J.format=te.format),!0}return!1})(c,d,i);return Ul(e.registerUpdateListener(({tags:l,dirtyLeaves:c,editorState:d,prevEditorState:f})=>{if(l.has(_4)||l.has(I0)||e.isComposing())return;const h=l.has(ip),p=d.read(xe),m=f.read(xe);if(!ue(m)||!ue(p)||!p.isCollapsed()||p.is(m)&&!h)return;const g=p.anchor.key,v=p.anchor.offset,b=d._nodeMap.get(g);if(fe(b)&&c.has(g)&&(h||v===1||!(v>m.anchor.offset+1))){if(h){const y=d.read(()=>b.getTextContent())[v-1];if(!a.has(y))return}e.update(()=>{if(!fl(b))return;const y=b.getParent();y===null||dp(y)||s(y,b,p.anchor.offset)&&Vu(g4)})}}),e.registerCommand(rp,l=>{if(l!==null&&l.shiftKey)return!1;const c=xe();if(!ue(c)||!c.isCollapsed())return!1;const d=c.anchor.offset,f=c.anchor.getNode();if(!fe(f)||!fl(f))return!1;const h=f.getParent();return h===null||dp(h)?!1:d===f.getTextContent().length&&!(!YT(h,f,d,r.multilineElement,!0)&&!QT(h,f,d,n,!0))&&(l!==null&&l.preventDefault(),!0)},Gc))}function R8(e,t=Nl,r,n=!1,i=!1){const o=n?e:qae(e,i),a=un();a.clear(),Hae(o,a,t,n),xe()!==null&&a.selectStart()}function A8(e=Nl,t,r=!1){return(function(i,o=!1){const a=UE(i),s=[...a.multilineElement,...a.element],l=!o,c=a.textFormat.filter(d=>d.format.length===1).sort((d,f)=>Number(d.format.includes("code"))-Number(f.format.includes("code")));return d=>{const f=[],h=(d||un()).getChildren();for(let p=0;p<h.length;p++){const m=h[p],g=Vae(m,s,c,a.textMatch,o);g!=null&&f.push(l&&p>0&&!aS(m)&&!aS(h[p-1])?`
|
|
39
|
+
`.concat(g):g)}return f.join(`
|
|
40
|
+
`)}})(e,r)(t)}let $8=[_b,cf,Yp,cc,Xp,uf];function Fi(e){return"var("+e+")"}let ese=E([z("flex"),xi("wrap"),X("center"),u("gap","2px"),u("padding","var("+O.xs+")"),u("border-bottom","1px solid var("+x.borderSubtle+")")]),fy=E([u("background","none"),u("border","1px solid transparent"),u("border-radius",Fi(Y.sm)),u("color",Fi(x.textSecondary)),u("font-family","inherit"),u("font-size",Fi($.sizeSm)),u("line-height","1"),u("min-width","26px"),u("padding","5px 6px"),Re("pointer"),Ue([u("background",Fi(x.surfaceSubtle))])]),tse=E([u("background",Fi(x.surfaceSubtle)),u("border-color",Fi(x.border)),u("color",Fi(x.textPrimary))]),rse=E([Cs(.4),Re("notAllowed")]),hy=E([u("width","1px"),u("align-self","stretch"),u("background",Fi(x.borderSubtle)),u("margin","2px 4px")]),nse=E([z("flex"),X("center"),u("gap",Fi(O.xs)),u("padding","var("+O.xs+")"),u("border-bottom","1px solid var("+x.borderSubtle+")")]),ise=E([si(1),u("background",Fi(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Fi(Y.sm)),u("color",Fi(x.textPrimary)),u("font-family","inherit"),u("font-size",Fi($.sizeSm)),u("padding","3px 6px"),u("outline","none"),qs([u("border-color",Fi(x.brand))])]);function ose(e){let t=e.disabled,r=e.formats,n=e.editor,i=t!==void 0?t:!1,o=ce(()=>{}),a=o[1],s=o[0],l=(h,p)=>{n.dispatchCommand(h,p)},c=h=>{n.update(()=>{let p=xe();if(p!=null&&ue(p)){gie(p,h);return}})},d=(h,p,m,g)=>{let v=m!==void 0?m:!1,b=i?fy+" "+rse:v?fy+" "+tse:fy;return _("button",{children:h,"aria-label":p,"aria-pressed":v?"true":"false",className:b,title:p,disabled:i,type:"button",onClick:y=>g(),onMouseDown:y=>{y.preventDefault()}})},f=h=>{let p=h.trim();n.update(()=>{Xoe(p===""?null:p)}),a(m=>{})};return L(Bt,{children:[L("div",{children:[d("B","Bold",r.bold,()=>l(ra,"bold")),d("I","Italic",r.italic,()=>l(ra,"italic")),d("</>","Inline code",r.code,()=>l(ra,"code")),_("span",{className:hy}),d("H1","Heading 1",void 0,()=>c(()=>$s("h1"))),d("H2","Heading 2",void 0,()=>c(()=>$s("h2"))),d("¶","Paragraph",void 0,()=>c(()=>Xt())),_("span",{className:hy}),d("•","Bulleted list",void 0,()=>l(e8,void 0)),d("1.","Numbered list",void 0,()=>l(t8,void 0)),d("“","Quote",void 0,()=>c(()=>df())),d("🔗","Link",void 0,()=>a(h=>{if(!Ee(h))return""})),_("span",{className:hy}),d("↩","Undo",void 0,()=>l(ib,void 0)),d("↪","Redo",void 0,()=>l(ob,void 0))],"aria-label":"Formatting",className:ese,role:"toolbar"}),s!==void 0?L("div",{children:[_("input",{"aria-label":"Link URL",className:ise,autoFocus:!0,placeholder:"https://…",type:"url",value:s,onKeyDown:h=>{switch(h.key){case"Enter":return h.preventDefault(),f(s);case"Escape":return a(m=>{});default:return}},onChange:h=>{let p=h.target.value;a(m=>p)}}),d("Apply","Apply link",void 0,()=>f(s)),d("Remove","Remove link",void 0,()=>f(""))],className:nse}):null]})}let ZT={bold:!1,italic:!1,code:!1},ase=ose;function sse(e){return e.trim()===""}let eN={contents:void 0};function lse(){let e=eN.contents;if(e!==void 0)return kt(e);let t=fE({namespace:"reventless-rich-text-probe",nodes:$8,onError:r=>{}});return eN.contents=Nt(t),t}function use(e){let t=lse(),r={contents:""};return t.update(()=>{R8(e,Nl)},{discrete:!0}),t.read(()=>{r.contents=A8(Nl)}),r.contents}function cse(e){return e.trim()!==""?e.trimEnd()!==use(e).trimEnd():!1}function st(e){return"var("+e+")"}let tN=E([z("flex"),_e("column"),u("background",st(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",st(Y.sm)),u("box-sizing","border-box"),u("transition","border-color 120ms"),ga({NAME:"percent",VAL:100}),Bs("hidden"),UO([u("border-color",st(x.brand))])]),dse=E([u("border-color",st(x.error)),UO([u("border-color",st(x.error))])]),fse=E([z("flex"),X("center"),u("gap","2px"),u("justify-content","flex-end"),u("padding","var("+O.xs+")"),u("border-bottom","1px solid var("+x.borderSubtle+")")]);function hse(e){return E([u("background",e?st(x.surfaceSubtle):"transparent"),u("border","1px solid "+(e?st(x.border):"transparent")),u("border-radius",st(Y.sm)),u("color",st(e?x.textPrimary:x.textSecondary)),u("font-family","inherit"),u("font-size",st($.sizeXs)),u("padding","2px var("+O.sm+")"),Re("pointer")])}let pse=E([u("background",st(x.surfaceSubtle)),u("border-bottom","1px solid var("+x.borderSubtle+")"),u("color",st(x.textSecondary)),u("font-size",st($.sizeXs)),u("line-height",st($.lineHeightNormal)),u("padding","var("+O.xs+") var("+O.sm+")")]),mse=E([At("relative"),z("flex"),_e("column")]),gse=E([At("absolute"),u("top","var("+O.sm+")"),u("left","var("+O.sm+")"),u("color",st(x.textDisabled)),u("font-size",st($.sizeSm)),u("pointer-events","none"),u("user-select","none")]);function vse(e){return E([u("color",st(x.textPrimary)),u("font-size",st($.sizeSm)),u("line-height",st($.lineHeightRelaxed)),u("min-height",e),u("outline","none"),u("padding",st(O.sm)),u("word-break","break-word"),u("overflow-y","auto"),u("tab-size","4")])}let bse=E([u("margin","0 0 var("+O.sm+")")]),_se=E([u("font-size",st($.sizeXl)),u("font-weight",st($.weightBold)),u("line-height",st($.lineHeightTight)),u("margin","var("+O.sm+") 0 var("+O.xs+")")]),yse=E([u("font-size",st($.sizeLg)),u("font-weight",st($.weightBold)),u("line-height",st($.lineHeightTight)),u("margin","var("+O.sm+") 0 var("+O.xs+")")]),xse=E([u("font-size",st($.sizeMd)),u("font-weight",st($.weightBold)),u("margin","var("+O.sm+") 0 var("+O.xs+")")]),Sse=E([u("border-left","3px solid var("+x.border+")"),u("color",st(x.textSecondary)),u("margin","var("+O.xs+") 0"),u("padding-left",st(O.md))]),rN=E([u("margin","var("+O.xs+") 0"),u("padding-left","1.5em")]),wse=E([u("margin","2px 0")]),Ese=E([u("color",st(x.brand)),u("text-decoration","underline")]),kse=E([u("font-weight",st($.weightBold))]),Cse=E([u("font-style","italic")]),Rse=E([u("text-decoration","line-through")]),Ase=E([u("background",st(x.surfaceSubtle)),u("border-radius",st(Y.sm)),u("font-family",st($.fontFamilyMono)),u("font-size","0.9em"),u("padding","1px 4px")]),$se=E([u("background",st(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",st(Y.md)),u("display","block"),u("font-family",st($.fontFamilyMono)),u("font-size","0.9em"),u("margin","var("+O.xs+") 0"),u("padding",st(O.sm)),u("white-space","pre-wrap")]);function Tse(e){return E([u("background","transparent"),u("border","none"),u("color",st(x.textPrimary)),u("font-family",st($.fontFamilyMono)),u("font-size",st($.sizeSm)),u("line-height",st($.lineHeightNormal)),u("min-height",e),u("outline","none"),u("padding",st(O.sm)),u("resize","vertical"),u("box-sizing","border-box"),ga({NAME:"percent",VAL:100})])}let Nse=Object.fromEntries([["paragraph",bse],["quote",Sse],["link",Ese],["code",$se],["heading",Object.fromEntries([["h1",_se],["h2",yse],["h3",xse]])],["list",Object.fromEntries([["ul",rN],["ol",rN],["listitem",wse]])],["text",Object.fromEntries([["bold",kse],["italic",Cse],["strikethrough",Rse],["code",Ase]])]]);function Dse(e){let t=e.readOnly,r=e.hasError,n=e.minHeight,i=e.placeholder,o=e.onBlur,a=e.onChange,s=e.value,l=o!==void 0?o:()=>{},c=i!==void 0?i:"Write markdown…",d=n!==void 0?n:"180px",f=r!==void 0?r:!1,h=t!==void 0?t:!1,p=ce(()=>"Rich"),m=p[1],g=p[0],v=ce(()=>ZT),b=v[1],y=ce(()=>s.trim()===""),S=y[1],w=ce(()=>!1),C=w[1],A=Ne(null),T=Ne(s),R=Ne(s),N=Ne(!1),I=Ne(a);I.current=a;let M=It(()=>fE({namespace:"reventless-rich-text",nodes:$8,onError:re=>{console.error("[RichTextEditor] Lexical error — the document may be incomplete:",re)},theme:Nse}),[]),P=()=>{let re={contents:""};return M.read(()=>{re.contents=A8(Nl)}),re.contents},B=re=>{R.current=re,T.current=re,N.current=!0,C(se=>cse(re)),M.update(()=>{R8(re,Nl)})},j=()=>{let re=P();if(S(se=>re.trim()===""),b(se=>{let pe={contents:ZT};return M.read(()=>{let K=xe();if(K!=null&&ue(K)){pe.contents={bold:K.hasFormat("bold"),italic:K.hasFormat("italic"),code:K.hasFormat("code")};return}}),pe.contents}),N.current){N.current=!1,T.current=re;return}else return re!==T.current?(T.current=re,I.current(re)):void 0},W=g==="Rich";Ae(()=>{if(!W)return;M.setRootElement(A.current);let re=Ul(bae(M),Ooe(M),zoe(M,Uoe(),300),Zae(M,Nl),M.registerUpdateListener(se=>j()));return B(s),()=>{re(),M.setRootElement(null)}},[W]),Ae(()=>{W&&s!==T.current&&s!==R.current&&B(s)},[s]),Ae(()=>{M.setEditable(!h)},[h]);let te=(re,se)=>_("button",{children:se,"aria-pressed":g===re?"true":"false",className:hse(g===re),type:"button",onClick:pe=>{if(m(K=>re),re==="Source")return C(K=>!1)}}),J;return J=g==="Rich"?L("div",{children:[_("div",{ref:Nt(A),"aria-label":"Rich text editor","aria-multiline":!0,className:vse(d),contentEditable:!h,role:"textbox",spellCheck:!0,onBlur:re=>l(),suppressContentEditableWarning:!0}),y[0]&&!h?_("div",{children:c,className:gse}):null],className:mse}):_("textarea",{"aria-label":"Markdown source",className:Tse(d),spellCheck:!1,placeholder:c,readOnly:h,value:s,onBlur:re=>l(),onChange:re=>{let se=re.target.value;T.current=se,R.current=se,a(se)}}),L("div",{children:[L("div",{children:[te("Rich","Rich text"),te("Source","Markdown")],className:fse}),!h&&W?_(ase,{editor:M,formats:v[0]}):null,w[0]&&W?_("div",{children:"Editing as rich text will reformat this document — switch to Markdown to keep it as written.",className:pse}):null,J],className:f?tN+" "+dse:tN})}let Fse=Dse;function Bl(e){return"var("+e+")"}let T8=E([z("inlineFlex"),X("center"),et("center"),u("background",Bl(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("color",Bl(x.textDisabled))]),nN=xr([T8,E([u("width","24px"),u("height","24px"),u("border-radius",Bl(Y.sm)),u("font-size",Bl($.sizeSm)),u("vertical-align","middle")])]),N8=xr([T8,E([u("border-radius",Bl(Y.md)),u("font-size",Bl($.sizeSm))])]),Ise=xr([N8,E([_e("column"),u("gap",Bl(O.xs)),u("aspect-ratio","4 / 3")])]),Pse=xr([N8,E([_e("row"),u("gap",Bl(O.sm)),u("padding","var("+O.sm+") var("+O.md+")")])]),Ose=E([u("width","240px"),u("max-width","100%")]),Mse=E([u("width","100%")]),Lse=E([u("width","100%"),u("height","100%"),u("aspect-ratio","auto")]),iN=E([u("font-size","20px"),u("line-height","1")]),zse=E([u("position","absolute"),u("width","1px"),u("height","1px"),u("padding","0"),u("margin","-1px"),Bs("hidden"),u("clip","rect(0, 0, 0, 0)"),u("white-space","nowrap"),u("border","0")]);function eg(e){return e==="Media"?"⬚":"▤"}function Use(e){return e==="Media"?"No image":"No file"}function oN(e){switch(e){case"Thumb":case"Detail":return Ose;case"Tile":return Mse;case"Fill":return Lse}}function Bse(e){let t=e.size,r=e.kind,n=r!==void 0?r:"Media",i=t!==void 0?t:"Detail",o=D(e.label,Use(n)),a;return a=n==="Media"?Ise:Pse,n==="Media"?i==="Thumb"?_("span",{children:eg(n),"aria-label":o,className:nN,role:"img",title:o}):L("span",{children:[_("span",{children:eg(n),"aria-hidden":!0,className:iN}),o],"aria-label":o,className:xr([a,oN(i)]),role:"img"}):i==="Thumb"?L("span",{children:[_("span",{children:eg(n),"aria-hidden":!0}),_("span",{children:o,className:zse})],className:nN,title:o}):L("span",{children:[_("span",{children:eg(n),"aria-hidden":!0,className:iN}),o],className:xr([a,oN(i)])})}let fS=Bse;function gt(e){return"var("+e+")"}let hS=E([u("color",gt(x.brand)),u("text-decoration","none"),Ue([u("text-decoration","underline")])]),jse=E([z("inlineBlock"),u("width","12px"),u("height","12px"),u("border-radius","3px"),u("border","1px solid var("+x.border+")"),u("vertical-align","-1px")]),ff=E([z("inlineFlex"),X("center"),u("gap","6px")]),qse=E([u("height","24px"),u("width","24px"),u("object-fit","cover"),u("border-radius",gt(Y.sm)),u("border","1px solid var("+x.borderSubtle+")"),u("vertical-align","middle")]),Vse=E([u("max-height","160px"),u("max-width","240px"),u("object-fit","cover"),u("border-radius",gt(Y.md)),u("border","1px solid var("+x.borderSubtle+")"),Re("zoomIn")]),Gse=E([u("color",gt(x.error)),u("font-size",gt($.sizeXs)),u("font-weight",gt($.weightMedium)),u("white-space","nowrap"),Pp(ke(6))]),Kse=E([z("inlineBlock"),u("background",gt(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius","3px"),u("color",gt(x.textSecondary)),u("font-size",gt($.sizeXs)),u("font-weight",gt($.weightMedium)),u("letter-spacing","0.03em"),u("padding","1px 4px"),u("line-height","1.2")]),D8=E([u("color",gt(x.textSecondary))]),F8=E([u("color",gt(x.warning)),u("font-weight",gt($.weightMedium))]),aN=E([u("color",gt(x.textSecondary)),u("font-weight",gt($.weightNormal))]),I8=E([z("inlineBlock"),u("background",gt(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius","3px"),u("color",gt(x.textSecondary)),u("font-size",gt($.sizeXs)),u("padding","1px 4px"),u("line-height","1.2")]),Hse=E([z("inlineBlock"),u("background",gt(x.surfaceSubtle)),u("border-radius",gt(Y.full)),u("width","64px"),u("height","6px"),Bs("hidden")]);function Wse(e){return E([u("background",gt(x.brand)),u("border-radius",gt(Y.full)),u("height","100%"),u("width",e.toString()+"%")])}let jE=E([u("color",gt(x.textSecondary)),u("font-size",gt($.sizeXs)),u("font-variant-numeric","tabular-nums")]),Jse=E([u("width","220px"),u("max-width","100%")]),Qse=E([z("flex"),_e("column"),u("gap","1px"),u("line-height","1.35")]),Yse=E([u("background","none"),u("border","none"),u("padding","0"),Re("zoomIn")]),Xse=E([z("inlineFlex"),u("background","none"),u("border","none"),u("padding","0"),u("line-height","0"),u("max-width","100%"),Re("pointer"),Ue([u("opacity","0.75")])]),Zse=E([z("flex"),_e("column"),u("gap",gt(O.xs)),u("width","100%")]),ele=E([u("background","none"),u("border","none"),u("padding","0"),u("color",gt(x.textSecondary)),u("font-size",gt($.sizeXs)),u("text-decoration","underline"),Re("pointer"),Ue([u("color",gt(x.brand))])]),P8=E([z("flex"),_e("column"),X("flexStart"),u("gap","6px")]),O8=E([u("color",gt(x.textSecondary)),u("font-family",gt($.fontFamilyMono)),u("font-size",gt($.sizeXs))]),tle=E([z("inlineBlock"),u("background","#ffffff"),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",gt(Y.md)),u("padding","4px"),u("line-height","0")]),rle=E([u("display","block"),u("max-width","260px"),u("height","auto")]),nle=E([z("flex"),X("center"),u("gap",gt(O.xs))]);function Sh(e){return E([u("background",gt(x.surface)),u("border","1px solid var("+(e?x.error:x.border)+")"),u("border-radius",gt(Y.sm)),u("color",gt(x.textPrimary)),u("font-family","inherit"),u("font-size",gt($.sizeSm)),u("padding","6px 8px")])}let sN=E([u("flex","1 1 auto"),u("min-width","0")]),lN=E([u("flex","0 0 auto")]),ile=E([u("color",gt(x.textSecondary)),u("font-size",gt($.sizeXs)),u("font-variant-numeric","tabular-nums")]),ole=E([z("inlineFlex"),X("center"),u("gap","6px")]);function M8(e){return E([u("color",gt(e?x.error:x.textSecondary)),u("font-size",gt($.sizeXs)),u("font-variant-numeric","tabular-nums")])}let ale=E([z("flex"),_e("column"),u("gap","4px")]),sle=E([z("flex"),X("center"),u("gap",gt(O.xs))]);function hf(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function qE(e){let t=e<0,n=(t?-e:e).toFixed(2).split("."),i=D(n[0],"0"),o=D(n[1],"00"),a=s=>{let l=s.length;return l<=3?s:a(s.slice(0,l-3|0))+","+s.slice(l-3|0)};return(t?"-":"")+a(i)+"."+o}function lle(e){return/^[A-Z]{3}$/.test(e)}function L8(e){if(lle(e))try{return Nt(new Intl.NumberFormat("en-US",{style:"currency",currency:e}))}catch{return}}function z8(e,t){let r=L8(t);if(r===void 0)return qE(e)+" "+t;let n=kt(r),i=n.resolvedOptions().maximumFractionDigits;return n.format(e/Math.pow(10,i))}function yb(e){return k(G(e),t=>{let r=k(F(t,"amount"),zi),n=k(F(t,"currency"),ie);if(r!==void 0&&n!==void 0)return[r,n]})}function ule(e,t){let r=L8(t);return r!==void 0?e/Math.pow(10,kt(r).resolvedOptions().maximumFractionDigits):e}function U8(e){let r=e.toFixed(2).replace(/\.?0+$/,"");return(r===""||r==="-"?"0":r)+"%"}function B8(e){let t=["B","KB","MB","GB","TB","PB"],n=((s,l)=>{for(;;){let c=l,d=s;if(!(d>=1024&&c<(t.length-1|0)))return[d,c];l=c+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],o=n[0];return(i===0?Math.round(o).toString():(Math.round(o*10)/10).toString())+" "+t[i]}function VE(e){let t=e<0?0:Math.floor(e)|0,r=t/86400|0,n=t%86400/3600|0,i=t%3600/60|0,o=t%60;return r>0?r.toString()+"d "+n.toString()+"h":n>0?n.toString()+"h "+i.toString()+"m":i>0?i.toString()+"m "+o.toString()+"s":o.toString()+"s"}function GE(e){return k(G(e),t=>{let r=o=>k(k(F(t,o),ie),a=>{if(a!=="")return a}),n=r("start"),i=r("end");if(n!==void 0&&i!==void 0)return[n,i]})}function KE(e,t){let r=Qn(e),n=Qn(t);return r!==void 0&&n!==void 0?n<r?"Ends before it starts":void 0:"Not a date-time"}function j8(e,t){let r=Qn(e),n=Qn(t);if(r!==void 0&&n!==void 0&&n>=r)return VE((n-r)/1e3)}function cle(e){return e.replace(/```[^\n]*\n?/g,"").replace(/`([^`]*)`/g,"$1").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^#{1,6}\s+/gm,"").replace(/^\s{0,3}(?:[-*+]|\d+\.)\s+/gm,"").replace(/^>\s?/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/~~(.*?)~~/g,"$1").replace(/\s+/g," ").trim()}function dle(e,t){return nt(t,e,(r,n)=>D(r.split(n)[0],r))}function X0(e){let r=dle(e,["?","#"]).split("/").filter(o=>o!==""),n=D(r[r.length-1|0],""),i;try{i=decodeURIComponent(n)}catch{i=n}return i===""?"file":i}function fle(e){let t=e.split("."),r=t.length;if(r===0||r===1)return;let n=D(t[r-1|0],"");if(/^[A-Za-z0-9]{1,5}$/.test(n))return n.toUpperCase()}function HE(e){return/^[A-Za-z]{2}$/.test(e)}function q8(e){if(HE(e))return e.toUpperCase().split("").map(t=>D(t.codePointAt(0),65)+127397|0).map(t=>String.fromCodePoint(t)).join("")}let uN={contents:void 0};function hle(){let e=uN.contents;if(e!==void 0)return kt(e);let t;try{t=Nt(new Intl.DisplayNames(["en"],{type:"region"}))}catch{t=void 0}return uN.contents=Nt(t),t}function WE(e){if(!HE(e))return e;let t=hle();if(t===void 0)return e;try{let r=kt(t).of(e.toUpperCase());return r===""?e:r}catch{return e}}let ple=["street","streetaddress","line1","addressline1","address1"],mle=["line2","addressline2","address2","apartment","unit","suite"],gle=["postalcode","zip","zipcode","postcode"],vle=["city","town","locality"],ble=["state","region","province","county"],_le=["country","countrycode"];function yle(e){let t=Ze(e);if(typeof t=="object")switch(t.TAG){case"JSONString":let r=t._0;return r===""?void 0:r;case"JSONNumber":return t._0.toString();default:return}}function V8(e){let t=Ze(e);if(typeof t=="object")switch(t.TAG){case"JSONString":let r=t._0.split(`
|
|
41
|
+
`).map(c=>c.trim()).filter(c=>c!=="");return r.length===0?void 0:r;case"JSONObject":let n=Te(t._0),i=c=>k(n.find(d=>c.includes(d[0].toLowerCase())),d=>yle(d[1])),o=i(gle),a=i(vle),s=o!==void 0?a!==void 0?o+" "+a:o:a!==void 0?a:void 0,l=Q([i(ple),i(mle),s,i(ble),i(_le)],c=>c).map(c=>c.trim()).filter(c=>c!=="");return l.length===0?void 0:l;default:return}}function xle(e){return q(V8(e),t=>t.map(r=>HE(r)?WE(r):r).join(", "))}function Sle(e){let t=q8(e);return t!==void 0?t+" "+WE(e):e}function wle(e){return k(G(e),t=>{let r=o=>k(Te(t).find(a=>o(a[0].toLowerCase())),a=>zi(a[1])),n=r(zw),i=r(Uw);if(n!==void 0&&i!==void 0)return[n,i]})}function Ld(e){let r=e.toFixed(5).replace(/\.?0+$/,"");return r===""||r==="-"?"0":r}function tg(e){return ne(q(jh(e,"maximum"),t=>t|0),5,t=>t<=0?5:t)}function cN(e,t){let r=jh(e,"maximum");return r!==void 0&&r>0&&r<=1?t/r*100:t}let xb={};function Sr(e,t){xb[Qd(e)]=t}function Ele(e){return F(xb,Qd(e))}function G8(e,t){return k(Rd(e,t),r=>F(xb,Qd(r.semantic)))}function K8(e,t,r){return k(G8(e,t),n=>n.cell(e,t,r))}function r0(e,t,r){return k(G8(e,t),n=>n.detail(e,t,r))}function kle(e,t){return K8(e,t,null)}function Cle(e,t){return r0(e,t,null)}function JE(e,t){return k(cM(e,t),r=>F(xb,Qd(r.semantic)))}function Rle(e,t){return ne(JE(e,t),!1,r=>Ee(r.input))}function Ale(e,t,r,n,i,o,a){return q(k(JE(e,t),s=>s.input),s=>s(e,t,r,n,i,o,a))}function $le(e,t,r,n){return k(k(JE(e,t),i=>i.validateInput),i=>i(e,t,r,n))}function Z0(e){e.stopPropagation()}function ev(e,t,r){return r?_("a",{children:t,className:hS,href:e,rel:"noopener noreferrer",target:"_blank",onClick:Z0}):_("a",{children:t,className:hS,href:e,onClick:Z0})}function yi(e){return k(ie(e),t=>{if(t!=="")return t})}function QE(e){let t=(r,n,i)=>q(yi(i),e);return{cell:t,detail:t}}function Sb(e){let t=(r,n,i)=>q(zi(i),o=>e(o));return{cell:t,detail:t}}Sr("Email",QE(e=>ev("mailto:"+e,e,!1)));Sr("Phone",QE(e=>ev("tel:"+e,e,!1)));Sr("Url",{cell:(e,t,r)=>q(yi(r),n=>ev(n,hf(n,40),!0)),detail:(e,t,r)=>q(yi(r),n=>ev(n,n,!0))});Sr("Currency",Sb(qE));Sr("Percent",Sb(U8));Sr("Bytes",Sb(B8));Sr("Duration",Sb(VE));Sr("Color",QE(e=>L("span",{children:[_("span",{className:jse,style:{background:e}}),e],className:ff})));function Tle(e){return e==="Media"?["Add an image","Add image"]:["Add a file","Add file"]}function tv(e){let t=e.size,r=e.kind,n=MQ(e.field);if(n===void 0)return _(fS,{kind:r,size:t});let i=Tle(r);return _("button",{children:_(fS,{kind:r,size:t,label:i[1]}),className:Xse,title:i[0],type:"button",onClick:o=>{o.stopPropagation(),n()}})}function Nle(e){let t=e.alt,r=e.src,n=ce(()=>!1);if(r===void 0)return _(tv,{field:e.field,kind:"Media",size:"Detail"});let i=n[1];return L(Bt,{children:[_("button",{children:_("img",{className:Vse,alt:t,src:r}),className:Yse,title:"Click to enlarge",onClick:o=>{o.stopPropagation(),i(a=>!0)}}),n[0]?_(EM,{slides:[{key:r,src:r,title:t}],index:0,onIndexChange:o=>{},onClose:()=>i(o=>!1)}):null]})}function rv(e){let t=Ze(e);if(typeof t!="object")return t==="JSONNull"?Nt(void 0):void 0;if(t.TAG!=="JSONString")return;let r=t._0;return Nt(r===""?void 0:r)}Sr("Image",{cell:(e,t,r)=>q(rv(r),n=>n!==void 0?_("img",{className:qse,alt:e,src:Pu(n),onClick:Z0}):_(tv,{field:e,kind:"Media",size:"Thumb"})),detail:(e,t,r)=>q(rv(r),n=>_(Nle,{src:q(n,Pu),alt:e,field:e}))});function Dle(e){return/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)?!0:/^[0-9A-Za-z_-]{16,}$/.test(e)}function Fle(e){return L("span",{children:[_(Jd,{name:e,size:"Small"}),e],className:ff})}function dN(e,t,r){return k(yi(r),n=>{if(!Dle(n))return Fle(n)})}Sr("UserRef",{cell:dN,detail:dN});Sr("Markdown",{cell:(e,t,r)=>q(yi(r),n=>hf(cle(n),80)),detail:(e,t,r)=>q(yi(r),n=>_(g6,{source:n})),input:(e,t,r,n,i,o,a)=>_(Fse,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(n&&sse(r))return"Required"}});Sr("Rating",{cell:(e,t,r)=>q(zi(r),n=>_(M_,{value:n,max:tg(t)})),detail:(e,t,r)=>q(zi(r),n=>_(M_,{value:n,max:tg(t),size:"Medium",showValue:!0})),input:(e,t,r,n,i,o,a)=>_(M_,{value:D(Fs(r),0),max:tg(t),size:"Medium",showValue:!0,onChange:s=>n(s<=0?"":s.toString()),onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i=Fs(r);if(i===void 0)return"Invalid rating";let o=tg(t);if(i<0||i>o)return"Must be between 0 and "+o.toString()}});function Ile(e){return e<0?0:e>100?100:e}Sr("Progress",{cell:(e,t,r)=>q(zi(r),n=>{let i=Ile(cN(t,n));return L("span",{children:[_("span",{children:_("span",{className:Wse(i)}),className:Hse}),_("span",{children:Math.round(i).toString()+"%",className:jE})],className:ff})}),detail:(e,t,r)=>q(zi(r),n=>_("div",{children:_(OM,{value:cN(t,n)}),className:Jse}))});function YE(e,t){let r=Pu(e),n=fle(t);return L("span",{children:[n!==void 0?_("span",{children:n,className:Kse}):null,_("a",{children:t,className:hS,download:"",href:r,rel:"noopener noreferrer",target:"_blank",onClick:Z0})],className:ff})}function H8(e){let t=e.name,r=e.href,n=ce(()=>!1),i=n[1],o=n[0];return L("span",{children:[L("span",{children:[YE(r,t),uX(r)?_("button",{children:o?"Hide preview":"Preview","aria-expanded":o,className:ele,type:"button",onClick:a=>{a.stopPropagation(),i(s=>!s)}}):null],className:ff}),o?_(dX,{src:Pu(r),title:t,height:"60vh"}):null],className:Zse})}Sr("FileUrl",{cell:(e,t,r)=>q(yi(r),n=>YE(n,hf(X0(n),40))),detail:(e,t,r)=>q(yi(r),n=>_(H8,{href:n,name:X0(n)}))});Sr("File",{cell:(e,t,r)=>q(rv(r),n=>n!==void 0?YE(n,hf(X0(n),40)):_(tv,{field:e,kind:"Document",size:"Thumb"})),detail:(e,t,r)=>q(rv(r),n=>n!==void 0?_(H8,{href:n,name:X0(n)}):_(tv,{field:e,kind:"Document",size:"Detail"}))});function Ple(e){return D(k(Dr(e).find(t=>t[0].toLowerCase()==="currency"),t=>rc(t[1])),[])}function Ole(e,t){return _("span",{children:z8(e,t),className:jE})}function fN(e,t,r){return q(yb(r),n=>Ole(n[0],n[1]))}function Mle(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o=Ple(e.propSchema),a;if(i==="")a=void 0;else try{a=yb(JSON.parse(i))}catch{a=void 0}let s=a!==void 0?[a[0].toString(),a[1]]:["",D(o[0],"")],l=s[1],c=s[0],d=(h,p)=>{let m=Fs(h);n(m!==void 0&&p!==""?JSON.stringify(Oe([["amount",m],["currency",p]])):"")},f=Fs(c);return L("span",{children:[L("span",{children:[_("input",{"aria-label":"Amount in minor units",className:Sh(t)+" "+sN,step:1,type:"number",value:c,onBlur:h=>r(),onChange:h=>d(h.target.value,l)}),_("span",{children:f!==void 0&&l!==""?"= "+z8(f,l):"minor units",className:ile})],className:sN}),o.length===0?_("input",{"aria-label":"Currency",className:Sh(t)+" "+lN,placeholder:"EUR",value:l,onBlur:h=>r(),onChange:h=>d(c,h.target.value)}):_("select",{children:o.map(h=>_("option",{children:h,value:h},h)),"aria-label":"Currency",className:Sh(t)+" "+lN,value:l,onBlur:h=>r(),onChange:h=>d(c,h.target.value)})],className:nle})}Sr("Money",{cell:fN,detail:fN,input:(e,t,r,n,i,o,a)=>_(Mle,{propSchema:t,value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=yb(i);if(o===void 0)return"Invalid amount";let a=o[0];if(a!==Math.trunc(a))return"An amount is a whole number of minor units"}});function Lle(e,t){let r=KE(e,t),n=j8(e,t),i=r!==void 0?r:n!==void 0?n:"";return L("span",{children:[D(Uh(e),e)+" → "+D(Uh(t),t),i===""?null:_("span",{children:i,className:M8(Ee(r))})],className:ole})}function hN(e,t,r){return q(GE(r),n=>Lle(n[0],n[1]))}function rg(e){if(e==="")return;let t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toISOString()}function pN(e){let t=Kv(e);return t===e?"":t.slice(0,10)+"T"+t.slice(11,16)}function zle(e){let t=e.hasError,r=e.onBlur,n=e.onChange,i=e.value,o;if(i==="")o=void 0;else try{o=GE(JSON.parse(i))}catch{o=void 0}let a=o!==void 0?[pN(o[0]),pN(o[1])]:["",""],s=a[1],l=a[0],c=(p,m)=>{let g=rg(p),v=rg(m);n(g!==void 0&&v!==void 0?JSON.stringify(Oe([["start",g],["end",v]])):"")},d=rg(l),f=rg(s),h;if(d!==void 0&&f!==void 0){let p=KE(d,f);h=p!==void 0?[p,!0]:[D(j8(d,f),""),!1]}else h=["start and end",!1];return L("span",{children:[L("span",{children:[_("input",{"aria-label":"Start",className:Sh(t),type:"datetime-local",value:l,onBlur:p=>r(),onChange:p=>c(p.target.value,s)}),_("span",{children:"→","aria-hidden":!0}),_("input",{"aria-label":"End",className:Sh(t),type:"datetime-local",value:s,onBlur:p=>r(),onChange:p=>c(l,p.target.value)})],className:sle}),_("span",{children:h[0],className:M8(h[1])})],className:ale})}Sr("DateRange",{cell:hN,detail:hN,input:(e,t,r,n,i,o,a)=>_(zle,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(r==="")return n?"Required":void 0;let i;try{i=JSON.parse(r)}catch{i=null}let o=GE(i);return o!==void 0?KE(o[0],o[1]):"Invalid range"}});function Ule(e){let t=q8(e);return t!==void 0?L("span",{children:[_("span",{children:t,"aria-hidden":!0}),WE(e)],className:ff}):e}function mN(e,t,r){return q(yi(r),Ule)}Sr("Country",{cell:mN,detail:mN});Sr("Address",{cell:(e,t,r)=>q(xle(r),n=>hf(n,60)),detail:(e,t,r)=>q(V8(r),n=>_("span",{children:n.map((i,o)=>_("span",{children:Sle(i)},o.toString())),className:Qse}))});function gN(e,t,r){return q(wle(r),n=>Ld(n[0])+", "+Ld(n[1]))}let Ble={cell:gN,detail:gN};Sr("GeoPoint",Ble);let W8="Located — this query selected only which arm the value is in, not the coordinates";function jle(e,t,r){return q(Mw(r),n=>{switch(n.TAG){case"Pending":return _("span",{children:"Locating…",className:D8});case"Located":let i=Lw(n);return i!==void 0?Ld(i[0])+", "+Ld(i[1]):_("span",{children:"Located",className:I8,title:W8});case"Unresolvable":return _("span",{children:"Not located",className:F8,title:D(aM(n),"No reason given")})}})}function qle(e,t,r){return q(Mw(r),n=>{switch(n.TAG){case"Pending":let i=qQ(n);return L("span",{children:["Locating…",i!==void 0?_("span",{children:" "+i,className:aN}):null],className:D8});case"Located":let o=Lw(n);return o!==void 0?Ld(o[0])+", "+Ld(o[1]):_("span",{children:"Located",className:I8,title:W8});case"Unresolvable":let a=aM(n);return L("span",{children:["Not located",a!==void 0?_("span",{children:" "+a,className:aN}):null],className:F8})}})}Sr("Geolocation",{cell:jle,detail:qle});function Vle(e){return q(k(k(G(e),t=>F(t,"maxLength")),zi),t=>t|0)}function py(e){let t=k(Io(e).channel,n=>AX(n).maxLength),r=Vle(e);return t!==void 0?r!==void 0?t<r?t:r:t:r}Sr("ChannelText",{cell:(e,t,r)=>q(yi(r),n=>{let i=k(py(t),o=>{if(ld(n)>o)return ld(n)-o|0});return L("span",{children:[hf(n,80),i!==void 0?_("span",{children:i.toString()+" over",className:Gse}):null]})}),detail:(e,t,r)=>{let n=yi(r),i=Io(t).channel;if(n!==void 0&&i!==void 0)return _(lre,{channelId:i,message:{body:n}})},input:(e,t,r,n,i,o,a)=>{let s=k(Io(t).channel,LM);return _(Jte,{value:r,onChange:n,onBlur:i,maxLength:py(t),channelLabel:q(s,l=>l.label),hasError:a,note:k(s,l=>l.constraints.note),name:e})},validateInput:(e,t,r,n)=>n&&r===""?"Required":k(py(t),i=>{let o=ld(r);if(o>i)return b6(o-i|0)+" over the "+i.toString()+"-character limit"})});Sr("Qr",{cell:(e,t,r)=>{},detail:(e,t,r)=>q(yi(r),n=>L("span",{children:[_(MY,{value:n}),_("span",{children:n,className:O8})],className:P8}))});Sr("Barcode",{cell:(e,t,r)=>{},detail:(e,t,r)=>q(yi(r),n=>L("span",{children:[_(WY,{value:n}),_("span",{children:n,className:O8})],className:P8}))});Sr("Signature",{cell:(e,t,r)=>k(yi(r),n=>{if(gA(n))return _("span",{children:"✓ Signed",className:jE})}),detail:(e,t,r)=>k(yi(r),n=>{if(gA(n))return _("span",{children:_("img",{className:rle,alt:"Signature",src:jM(n)}),className:tle})}),input:(e,t,r,n,i,o,a)=>_(LX,{value:r,onChange:n,onBlur:i,hasError:a}),validateInput:(e,t,r,n)=>{if(n&&r==="")return"Required"}});function fp(e){return"var("+e+")"}let Gle=E([z("inlineFlex"),X("center"),xi("wrap"),u("gap","4px"),u("font-size",fp($.sizeSm)),u("min-width","0")]),Kle=E([u("color",fp(x.textDisabled)),u("font-size",fp($.sizeXs))]),Hle=E([u("color",fp(x.brand)),u("text-decoration","none"),Ue([u("text-decoration","underline")])]),Wle=E([u("color",fp(x.textPrimary))]);function Jle(e){let t=e.segments,r=zs();return _("span",{children:t.map((n,i)=>{let o=i===(t.length-1|0),a=n.href;return L(Tv,{children:[a!==void 0?_("a",{children:n.label,className:Hle,href:a,onClick:s=>{if(!(s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.button!==0))return s.preventDefault(),s.stopPropagation(),r(a)}}):_("span",{children:n.label,className:Wle}),o?null:_("span",{children:" › ",className:Kle})]},i.toString()+":"+n.label)}),className:Gle})}let Qle=Jle;function vN(e){return k(k(G(e),t=>F(t,"type")),ie)}function XE(e){return k(k(G(e),t=>F(t,"format")),ie)}function Yle(e){return k(G(e),t=>F(t,"items"))}function bN(e){return Ee(k(k(G(e),t=>F(t,"properties")),G))}function Qa(e){let t=e.toLowerCase(),r=e.length,n=o=>{let a=o.length;if(r>a&&t.endsWith(o))return e.slice(0,r-a|0)},i=n("ids");return i!==void 0?i:n("id")}function Xle(e,t,r){let n=bn(t);if(e==="compositeId")return"KCompositeId";let i=Wl(n);if(i!==void 0)return{TAG:"KUnion",_0:i};let o=rc(n);if(o!==void 0)return{TAG:"KEnum",_0:o};let a=vN(n),s=0;if(a!==void 0)switch(a){case"array":let l=Yle(n);if(l===void 0)return"KArrayOfStrings";if(bN(l)||Ce(vN(l),"object"))return{TAG:"KArrayOfObjects",_0:l};let c=Qa(e);return c!==void 0?{TAG:"KArrayOfEntityIds",_0:c}:"KArrayOfStrings";case"boolean":return"KBoolean";case"integer":case"number":return"KNumber";case"object":return bN(n)?{TAG:"KNestedObject",_0:n}:"KString";default:s=1}else s=1;if(s===1){let l=XE(n),c=0;if(l!==void 0)switch(l){case"date":case"date-time":return"KDate";default:c=2}else c=2;if(c===2){if(r.isId)return"KString";let d=Qa(e);return d!==void 0?{TAG:"KEntityId",_0:d}:"KString"}}}function Yu(e,t,r){let n=jo(t,e);return r!==void 0&&n!==void 0&&r.pluginId===n.pluginId?r.viewName===n.name:!1}function Zle(e){switch(e){case"sortKey":case"subId":return!0;default:return!1}}function eue(e,t){return e==="id"||e==="compositeId"?!0:t.isId}function tue(e,t,r,n){return t.hidden||Zle(e)?!1:eue(e,t)?Ce(n,e):r?t.summary:!0}function rue(e,t,r){if(e==="compositeId"||r.isId)return 0;if(e==="id")return 1;if(r.summary)return 2;if(typeof t!="object")switch(t){case"KBoolean":return 7;case"KCompositeId":return 0;case"KDate":return 4;case"KNumber":return 8;case"KString":return 5;case"KArrayOfStrings":return 11}else switch(t.TAG){case"KEnum":return 6;case"KEntityId":return 9;case"KArrayOfEntityIds":return 10;case"KArrayOfObjects":return 12;case"KNestedObject":return 13;case"KUnion":return 14}}function nue(e,t){if(typeof e!="object")switch(e){case"KBoolean":return"80px";case"KCompositeId":return"260px";case"KNumber":return"100px";case"KString":return t==="id"?"220px":void 0;case"KDate":case"KArrayOfStrings":return"180px"}else switch(e.TAG){case"KEnum":return"140px";case"KEntityId":return"220px";case"KArrayOfEntityIds":return"260px";default:return"240px"}}function _N(e,t){let r=Io(t),n=Xle(e,t,r),i=D(k(k(G(t),o=>F(o,"title")),ie),pt(e));return{key:e,label:i,kind:n,ann:r,propSchema:t,priority:rue(e,n,r),width:nue(n,e)}}function fi(e,t,r,n,i,o){let a=t!==void 0?t:"List",s=r!==void 0?r:[],l=D(q(k(k(G(e),m=>F(m,"properties")),G),Te),[]),c=Hv(e),d=a==="List"&&c.length!==0,f=gi(vn(i,_n(e,void 0,void 0).labelField),m=>m!=="id"),h=Q(l,m=>{let g=m[0],v=_N(g,m[1]),b=v.kind,y;if(typeof b!="object")y=!1;else switch(b.TAG){case"KEntityId":case"KArrayOfEntityIds":y=Yu(b._0,s,n);break;default:y=!1}let S=Ce(g,o);if(tue(g,v.ann,d,f)&&!y&&!S)return v}),p;if(h.length===0){let m=g=>l.find(v=>v[0]===g);p=ne(vn(vn(k(QO(e),m),m("compositeId")),m("id")),[],g=>[_N(g[0],g[1])])}else p=h;return p.toSorted((m,g)=>m.priority-g.priority|0)}function iue(e,t){return e.length>t?e.slice(0,t-1|0)+"…":e}function hp(e){return _(oa,{variant:"Neutral",label:e,dot:!1})}function yN(e,t,r,n,i){let o=jo(r,e);return o===void 0?[void 0,t]:(i!==void 0?i.pluginId===o.pluginId&&i.viewName===o.name:!1)?[void 0,t]:[Ka(o.pluginId,o.name,t,[]),t]}function pS(e,t,r,n){let i=jo(r,e);return i!==void 0?t?Dp(i.name):Eo(i.name):n}function Ru(e,t,r){let n=e.kind;if(typeof n!="object")return e.label;switch(n.TAG){case"KEntityId":let i=n._0;return Yu(i,t,r)?e.label:pS(i,!1,t,e.label);case"KArrayOfEntityIds":let o=n._0;return Yu(o,t,r)?e.label:pS(o,!0,t,e.label);default:return e.label}}function xN(e,t,r){if(r===void 0)return[t,!1];let n=r.lookupLabel(e,t);return n!==void 0?[n,!1]:[t,r.isMissing(e,t)]}function nv(e,t,r,n,i,o,a,s,l){let c=l!==void 0?l:!1,d=Yu(t,n,a),f=D(s,lM(t)),h=g=>{let v=yN(t,g,n,i,a),b=v[1],y=d?[b,!1]:xN(t,b,o),S=y[0],w;if(o!==void 0){let N=o.retiredBadge;w=N!==void 0&&!d?N(t,b):void 0}else w=void 0;let C;if(o!==void 0){let N=o.linkable;C=N!==void 0&&!d?N(t,b):!0}else C=!0;let A=C?_(iQ,{href:v[0],label:S,rawValue:b}):_("span",{children:S,title:S+" is not available to open"}),T=w!==void 0?L("span",{children:[A,w],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):A,R=f&&S!==b?L("span",{children:[_(Jd,{name:S,size:"Small"}),T],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):T;return y[1]?_("span",{children:R,style:{fontStyle:"italic",opacity:"0.55"},title:"Referenced "+t+" not found (id: "+b+")"}):R},p=g=>{let v=Q(g,b=>{let S=yN(t,b,n,i,a)[1],C=xN(t,S,o)[0];if(C!==S)return{name:C}});if(c&&f&&!d&&g.length>=2&&v.length===g.length)return _(ZO,{members:v,size:"Small"})},m=Ze(r);if(typeof m!="object")return JSON.stringify(r);switch(m.TAG){case"JSONString":return h(m._0);case"JSONArray":let g=m._0,v=Q(g,ie),b=v.length===g.length?p(v):void 0;return b!==void 0?b:_("span",{children:g.map((y,S)=>{let w=Ze(y);return typeof w!="object"||w.TAG!=="JSONString"?null:L("span",{children:[h(w._0),S<(g.length-1|0)?", ":null]},S.toString())})});default:return JSON.stringify(r)}}function oue(e){let t=Ze(e);if(typeof t!="object"||t.TAG!=="JSONString")return JSON.stringify(e);let r=t._0.split("/").map(n=>({label:n,href:void 0}));return _(Qle,{segments:r})}function Xo(e,t,r){let n=Ze(r);if(typeof n!="object")switch(n){case"JSONFalse":return _(oa,{variant:"Neutral",label:"No",dot:!1});case"JSONTrue":return _(oa,{variant:"Success",label:"Yes",dot:!1});case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":let i=n._0,o=HO(e,i);if(t===void 0)return o!==void 0?o:i;switch(t){case"date":case"date-time":return Kv(i);default:return o!==void 0?o:i}case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}}function mS(e,t,r,n,i,o){let a=G(t);if(a===void 0)return;let s=F(a,"name");if(s!==void 0&&Ze(s)!=="JSONNull")return Xo("name",void 0,s);let l=fi(e,"Drill",r,o,void 0,void 0),c=Q(l,m=>{let g=m.kind,v;if(typeof g!="object")v=g!=="KArrayOfStrings";else switch(g.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":case"KUnion":v=!1;break;default:v=!0}let b=F(a,m.key);if(!v||b===void 0)return;let y=Ze(b);if(!(typeof y!="object"&&y==="JSONNull"))return[m,b]});if(c.length===0)return;let d=c.slice(0,2),f=l.length-d.length|0,h=d.map((m,g)=>{let v=m[1],b=m[0],y=b.kind,S;if(typeof y!="object")S=y==="KDate"?Xo(b.key,XE(b.propSchema),v):Xo(b.key,void 0,v);else switch(y.TAG){case"KEnum":let w=Ze(v);S=typeof w!="object"||w.TAG!=="JSONString"?Xo(b.key,void 0,v):hp(w._0);break;case"KEntityId":S=nv(b.key,y._0,v,r,n,i,o,void 0,void 0);break;default:S=Xo(b.key,void 0,v)}return L("span",{children:[g>0?" · ":null,S]},g.toString())}),p=f>0?_("span",{children:"+"+f.toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null;return L("span",{children:[h,p],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}})}function aue(e,t,r,n,i,o){let a=Wv(t);if(a===void 0)return JSON.stringify(t);let s=a[1],l=a[0],c=xw(e,l),d=ne(c,l,h=>h.tag),f=D(k(c,h=>mS(xO(h),s,r,n,i,o)),null);return L("span",{children:[hp(d),f],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap",gap:"6px"}})}function wl(e,t,r,n,i,o,a,s,l){let c=i!==void 0?i:WO,d=gi(n,p=>Ze(p)!=="JSONNull");if(d===void 0)return D(kle(e,r),"—");let f=K8(e,r,d);if(f!==void 0)return f;if(typeof t!="object")switch(t){case"KCompositeId":return oue(d);case"KDate":return Xo(e,XE(r),d);case"KBoolean":case"KNumber":return Xo(e,void 0,d);case"KString":let p=Ze(d);if(typeof p!="object"||p.TAG!=="JSONString")return Xo(e,void 0,d);let m=p._0;return m.length>60?_("span",{children:iue(m,60),title:m}):Xo(e,void 0,d);case"KArrayOfStrings":let g=D(q(Et(d),v=>Q(v,ie)),[]);return _(KO,{items:g})}else switch(t.TAG){case"KEnum":let p=Ze(d);return typeof p!="object"||p.TAG!=="JSONString"?Xo(e,void 0,d):hp(p._0);case"KEntityId":case"KArrayOfEntityIds":break;case"KArrayOfObjects":let m=t._0,g=D(Et(d),[]),v=g.length;if(c.collapsed){let C=g[0];return C!==void 0?SN(m,C,o,a,s,l):_(mh,{count:v,label:"items"})}let b=k(g[0],C=>mS(m,C,o,a,s,l));return b!==void 0?L("span",{children:[b,v>1?_("span",{children:"+"+(v-1|0).toString(),style:{marginLeft:"4px",opacity:"0.55"}}):null],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap"}}):_(mh,{count:v,label:"items"});case"KNestedObject":let y=t._0;if(c.collapsed)return SN(y,d,o,a,s,l);let S=mS(y,d,o,a,s,l);if(S!==void 0)return S;let w=D(q(G(d),C=>Object.keys(C).length),0);return _(mh,{count:w,label:"fields"});case"KUnion":return aue(t._0,d,o,a,s,l)}let h=ne(Rd(e,r),!1,p=>p.semantic==="UserRef");return nv(e,t._0,d,o,a,s,l,h?!0:void 0,!0)}function SN(e,t,r,n,i,o){let a=D(G(t),{}),s=fi(e,"Drill",r,o,void 0,void 0).filter(l=>{let c=l.kind;if(typeof c!="object")return!0;switch(c.TAG){case"KArrayOfObjects":case"KNestedObject":return!1;default:return!0}});return _("div",{children:s.map(l=>L("div",{children:[_("span",{children:Ru(l,r,o),style:{fontSize:"0.85em",minWidth:"80px",opacity:"0.55"}}),_("span",{children:wl(l.key,l.kind,l.propSchema,F(a,l.key),l.ann,r,n,i,o)})],style:{display:"flex",alignItems:"baseline",gap:"6px"}},l.key)),style:{display:"flex",maxHeight:"120px",overflow:"auto",flexDirection:"column",gap:"2px"}})}function sue(e){if(typeof e!="object")return e!=="KArrayOfStrings";switch(e.TAG){case"KArrayOfEntityIds":case"KArrayOfObjects":case"KNestedObject":case"KUnion":return!1;default:return!0}}function lue(e){return typeof e!="object"?e==="KBoolean":e.TAG==="KEnum"}function J8(e,t,r,n,i,o,a,s,l,c){let d=i!==void 0?i:!1,f=vn(gi(c,h=>e.some(p=>p.key===h)),q(e[0],h=>h.key));return e.map(h=>{let p=Ru(h,t,a),m=ne(Rd(h.key,h.propSchema),!1,g=>g.semantic==="Image"?!0:g.semantic==="File");return{key:h.key,label:p,render:g=>{let v=wl(h.key,h.kind,h.propSchema,n(g,h.key),h.ann,t,r,o,a),b=s!==void 0&&m?_(tM.make,{fill:S=>s(g,S),children:v}):v;if(l===void 0)return b;if(Ee(l.values)&&h.key===l.field){let S=Bh(l,n(g,l.field));return S!==void 0?S:b}if(l.values!==void 0||!Ce(f,h.key))return b;let y=Bh(l,n(g,l.field));return y!==void 0?L("span",{children:[b,y],style:{display:"inline-flex",alignItems:"center",gap:"6px"}}):b},sortable:d&&sue(h.kind),width:h.width}})}function Q8(e){return(t,r)=>e(t,r).then(n=>n.data)}let Y8=Zt(void 0),X8=Zt(void 0),uue={contents:void 0},cue=Y8.Provider,due=X8.Provider;function fue(e){let t=e.executeResult,r=e.execute,n=It(()=>{if(r!==void 0)return r;if(t!==void 0)return Q8(t);console.error('AutoGraphQL.Provider: neither `execute` nor `executeResult` was supplied — every query below this provider will report "Not connected".')},[r,t]);return ur(cue,{value:n,children:ur(due,{value:t,children:e.children})})}let hue={make:fue};function li(){return xt(Y8)}function Zp(){return xt(X8)}let Z8={hasNextPage:!1,hasPreviousPage:!1,startCursor:void 0,endCursor:void 0};function e5(e,t){let r=G(e),n=k(k(k(r,i=>F(i,"data")),G),i=>F(i,t));return n!==void 0?n:k(r,i=>F(i,t))}function ZE(e,t){let r=e5(e,t),n=k(r,Et);return n!==void 0?n:Q(D(k(k(k(r,G),i=>F(i,"edges")),Et),[]),i=>k(G(i),o=>F(o,"node")))}function t5(e,t){return Q(ZE(e,t),G)}function r5(e,t){let r=(i,o)=>D(k(F(i,o),Ov),!1),n=(i,o)=>k(F(i,o),ie);return ne(k(k(k(e5(e,t),G),i=>F(i,"pageInfo")),G),Z8,i=>({hasNextPage:r(i,"hasNextPage"),hasPreviousPage:r(i,"hasPreviousPage"),startCursor:n(i,"startCursor"),endCursor:n(i,"endCursor")}))}function pue(e,t){return t!==void 0&&t!==""?"Backward":e!==void 0&&e!==""?"Forward":"FirstPage"}function mue(e,t){return e.hasNextPage?!0:t==="Backward"}function gue(e,t){return e.hasPreviousPage?!0:t==="Forward"}let Bf=[];function vue(e,t){return e.concat([D(t,"")])}function bue(e){let t=e.length;return t!==0?[e.slice(0,t-1|0),e[t-1|0]]:[e,void 0]}let n5={};function pf(e,t,r,n){return k(jo(r,t),i=>k(F(e,i.queryField),o=>F(o.labels,n)))}function em(e,t,r,n){return k(jo(r,t),i=>k(i.namedRetirement,o=>k(k(F(e,i.queryField),a=>F(a.states,n)),a=>{let s=o.values;return Bh(o,s!==void 0?a:!0)})))}function tm(e,t,r,n,i){if(i)return!0;let o=jo(r,t);if(o===void 0)return!0;let a=F(e,o.queryField);return a!==void 0?ir(F(a.states,n)):!0}function rm(e,t,r,n){let i=jo(r,t);if(i===void 0)return!1;let o=F(e,i.queryField);return o!==void 0&&o.loaded&&ne(o.asked,!0,a=>Ee(F(a,n)))?ir(F(o.labels,n)):!1}function _ue(e){let t=Ze(e);if(typeof t!="object")return[];switch(t.TAG){case"JSONString":let r=t._0;return r!==""?[r]:[];case"JSONArray":return Q(t._0,ie).filter(n=>n!=="");default:return[]}}function yue(e,t,r,n){let i={},o=(l,c)=>Q(l,d=>k(F(d,c),G)),a=(l,c)=>l.map(d=>Q(D(k(F(d,c),Et),[]),G)).flat(),s=(l,c,d)=>{c.forEach(f=>{let h=f.kind;if(typeof h!="object")return;switch(h.TAG){case"KEntityId":case"KArrayOfEntityIds":break;case"KArrayOfObjects":return d>0?s(a(l,f.key),fi(h._0,"Drill",r,n,void 0,void 0),d-1|0):void 0;case"KNestedObject":return d>0?s(o(l,f.key),fi(h._0,"Drill",r,n,void 0,void 0),d-1|0):void 0;default:return}let p=h._0;if(Yu(p,r,n))return;let m=jo(r,p);if(m!==void 0){l.forEach(g=>ee(F(g,f.key),v=>{_ue(v).forEach(b=>{let y=m.queryField,S=D(F(i,y),[]);S.some(w=>w===b)||S.push(b),i[y]=S})}));return}})};return s(e,t,3),i}function xue(e){return Te(e).toSorted((r,n)=>kd(r[0],n[0])).map(r=>r[0]+":"+r[1].toSorted(kd).join(",")).join("|")}function i5(e){try{let t=atob(e),r=t.indexOf(":");return r>0&&r<(t.length-1|0)?t.slice(r+1|0):void 0}catch{return}}function Sue(e,t){let r={},n={};return D(k(k(G(D(k(G(e),i=>F(i,"data")),e)),i=>F(i,t+"Refs")),Et),[]).forEach(i=>{let o=G(i);if(o===void 0)return;let a=k(F(o,"id"),ie);if(a===void 0)return;let s=D(k(F(o,"label"),ie),a),l=D(k(F(o,"retired"),Ov),!1),c=D(k(F(o,"retiredState"),ie),""),d=f=>{if(r[f]=s,l){n[f]=c;return}};d(a),ee(i5(a),d)}),[r,n]}function wue(e,t){return Ee(k(k(G(D(k(G(e),r=>F(r,"data")),e)),r=>F(r,t+"Refs")),Et))}function Eue(e,t,r){let n={};return t5(e,t).forEach(i=>{let o=k(F(i,"id"),ie),a=D(k(F(i,r),ie),"");if(o===void 0)return;let s=i5(o),l=r==="id"?s!==void 0?s:o:a===""?o:a;if(n[o]=l,s!==void 0){n[s]=l;return}}),n}function e2(e,t,r){let n=t.queryField,i=t.labelField,o=i==="id"?"id":"id "+i,a="query($ids: [ID!]!) { "+n+"Refs(ids: $ids) { id label retired retiredState } }",s="query($ids: [ID!]) { "+n+"(first: "+r.length.toString()+", filter: {ids: $ids}) { edges { node { "+o+" } } } }",l={};return l.ids=r.map(c=>c),e(a,l).then(c=>wue(c,n)?Promise.resolve(Sue(c,n)):e(s,l).then(d=>[Eue(d,n,i),{}]))}let nm=Zt(void 0);function kue(){return xt(nm)}function Cue(){let e=xt(nm);return e!==void 0?e.invalidate:t=>{}}let o5=nm.Provider;function Rue(e){let t=li(),r=ce(()=>n5),n=r[1],i=r[0],o=Ne({}),a=(g,v)=>n(b=>{let y=Oe(Te(b)),S=Oe(ne(F(o.current,g),[],C=>C.ids).map(C=>[C,!0])),w={...v(F(b,g))};return w.asked=S,y[g]=w,y}),s=(g,v)=>{let b=Oe(Te(g));return Te(v).forEach(y=>{b[y[0]]=y[1]}),b},l=(g,v,b,y)=>a(g,S=>{let w=y?void 0:S;return{loaded:!0,labels:s(ne(w,{},C=>C.labels),v),states:s(ne(w,{},C=>C.states),b)}}),c=Ne(g=>{}),d=(g,v,b)=>{let y=g.queryField;if(t===void 0)return;let S=(w,C)=>{l(y,w,C,b);let A=F(o.current,y);if(A!==void 0)return o.current[y]={entity:A.entity,ids:A.ids,refetching:!1,stale:!1},A.stale?c.current(y):void 0};Mt(e2(t,g,v).then(w=>S(w[0],w[1])),w=>(console.warn("[AutoUI] RefLabel batch "+y+" failed; cells fall back to raw ids",w),S({},{}),Promise.resolve()))},f=g=>{let v=F(o.current,g);if(v!==void 0&&v.ids.length!==0)if(v.refetching){o.current[g]={entity:v.entity,ids:v.ids,refetching:v.refetching,stale:!0};return}else return o.current[g]={entity:v.entity,ids:v.ids,refetching:!0,stale:!1},a(g,b=>{if(b===void 0)return{loaded:!1,labels:{},states:{}};let y={...b};return y.loaded=!1,y}),d(v.entity,v.ids,!0)};c.current=f;let h=Nr((g,v)=>{Te(g).forEach(b=>{let y=b[0],S=F(o.current,y),w=ne(S,[],T=>T.ids),C=b[1].filter(T=>!w.includes(T));if(C.length===0)return;let A=v.find(T=>T.queryField===y);if(A!==void 0)return o.current[y]={entity:A,ids:w.concat(C),refetching:ne(S,!1,T=>T.refetching),stale:ne(S,!1,T=>T.stale)},a(y,T=>{if(T===void 0)return{loaded:!1,labels:{},states:{}};let R={...T};return R.loaded=!1,R}),d(A,C,!1)})},[t]),p=Nr(f,[t]),m=It(()=>({entries:i,request:h,invalidate:p}),[i,h,p]);return ur(o5,{value:m,children:e.children})}let Aue={provider:o5,make:Rue},a5={context:nm,use:kue,useInvalidate:Cue,Provider:Aue};function mf(e,t,r,n,i){let o=i!==void 0?i:!0,a=li(),s=xt(nm),l=ce(()=>n5),c=l[1],d=o?yue(e,t,r,n):{},f=xue(d);return Ae(()=>{let h={contents:!1};return f!==""&&(s!==void 0?s.request(d,r):a!==void 0&&Te(d).forEach(p=>{let m=p[1];if(m.length===0)return;let g=p[0],v=r.find(b=>b.queryField===g);if(v!==void 0){Mt(e2(a,v,m).then(b=>{if(h.contents)return;let y=b[1],S=b[0];c(w=>{let C=Oe(Te(w));return C[g]={loaded:!0,labels:S,states:y},C})}),b=>(h.contents||(console.warn("[AutoUI] RefLabel batch "+g+" failed; cells fall back to raw ids",b),c(y=>{let S=Oe(Te(y));return S[g]={loaded:!0,labels:{},states:{}},S})),Promise.resolve()));return}})),()=>{h.contents=!0}},[f,a]),s!==void 0?s.entries:l[0]}let $ue=[],s5={registry:$ue},ha="table",gl={contents:[]};function xa(e){gl.contents.some(t=>t.id===e.id)?gl.contents=gl.contents.map(t=>t.id===e.id?e:t):gl.contents=gl.contents.concat([e])}function l5(e){return gl.contents.find(t=>t.id===e)}function iv(){return gl.contents}function t2(e,t){let r=t!==void 0?t:s5,n=_n(e,void 0,void 0),i=gl.contents.filter(o=>{let a=o.arity;return typeof a!="object"||a.TAG==="Multi"?o.isCapable(e,n,r):!1});return i.filter(o=>o.id===ha).concat(i.filter(o=>o.id!==ha))}function r2(e){return zJ(e.map(t=>t.window))}function Tue(e){return nt(e,0,(t,r)=>t+r.rows.length|0)}function im(e,t,r){let n=r!==void 0?r:"item";return jO(r2(e),Tue(e),t,n)}function u5(e){try{return Li(localStorage.getItem(e))}catch{return}}function Nue(e,t){try{return localStorage.setItem(e,t)}catch{return}}function n2(e,t,r){return"autoui.viewmode."+D(e,"default")+"."+t+ne(r,"",n=>"."+n)}function Due(e){try{return G(JSON.parse(e))}catch{return}}function i2(e){return q(u5(e),t=>{let r=Due(t);if(r===void 0)return{mode:t};let n=k(F(r,"mode"),ie);return n!==void 0?{mode:n,band:k(k(F(r,"band"),ie),Jn.bandOfName)}:{mode:t}})}function o2(e,t,r){let n={};n.mode=t,n.band=Jn.bandName(r),Nue(e,JSON.stringify(n))}function El(e){return"var("+e+")"}let c5=E([z("inlineFlex"),X("center"),u("border","1px solid var("+x.border+")"),u("border-radius",El(Y.md)),u("overflow","hidden")]),a2=E([z("inlineFlex"),X("center"),u("gap","4px"),u("background","none"),u("border","none"),u("padding","2px var("+O.sm+")"),u("color",El(x.textSecondary)),u("font-size",El($.sizeSm)),Re("pointer"),Ue([u("background",El(x.surfaceSubtle)),u("color",El(x.textPrimary))])]),d5=xr([a2,E([u("background",El(x.surfaceSubtle)),u("color",El(x.textPrimary)),u("font-weight",El($.weightMedium))])]),f5=E([Ga(Jn.compact,[u("display","none")])]),Fue={group:c5,btn:a2,btnActive:d5,btnLabel:f5};function Iue(e){let t=e.onSelect,r=e.activeId;return _("div",{children:e.modes.map(n=>L("button",{children:[n.icon,_("span",{children:n.label,className:f5})],"aria-label":n.label,"aria-pressed":n.id===r?"true":"false",className:n.id===r?d5:a2,title:n.label,onClick:i=>t(n.id)},n.id)),"aria-label":"View mode",className:c5,role:"group"})}let Fa={Style:Fue,make:Iue};function Pue(e){let t=e.source,r=va(),n=Tp(),i=fi(t.schema,"List",r,t.ownEntity,t.semantics.labelField,t.semantics.projectedLabelField),o=t.rows.map((d,f)=>{let h=D(G(d),{});return{rowKey:D(k(F(h,"id"),ie),"#"+f.toString()),json:d,dict:h}}),a=mf(o.map(d=>d.dict),i,r,t.ownEntity,ir(t.refLabels)),s=t.refLabels,l=s!==void 0?s:{lookupLabel:(d,f)=>pf(a,d,r,f),isMissing:(d,f)=>rm(a,d,r,f),retiredBadge:(d,f)=>em(a,d,r,f),linkable:(d,f)=>tm(a,d,r,f,!1)},c=i.map(d=>({key:d.key,label:Ru(d,r,t.ownEntity),render:f=>wl(d.key,d.kind,d.propSchema,F(f.dict,d.key),d.ann,r,n,l,t.ownEntity),sortable:!1,width:d.width}));return _(Lh,{columns:c,data:o,keyFn:d=>d.rowKey,onRowClick:d=>t.onOpenRow(d.rowKey,d.json)})}let Oue=_("span",{children:"▦","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}});xa({id:ha,label:"Table",icon:Oue,arity:"Single",isCapable:(e,t,r)=>!0,render:e=>{let t=e[0];return t!==void 0?_(Pue,{source:t}):null},capability:"always — the universal default"});let wN=["resources","events"],EN=["split","full"],kN=["funnel","scatter"],n0={};function hn(e,t){return k(e.views,r=>F(r,t))}function Ya(e,t){return k(e.fields,r=>F(r,t))}function Mn(e,t){console.error("[AutoUI] ui-hints "+e+": "+t)}function Br(e,t,r){let n=e[t];if(n===void 0)return;let i=he.string(n);if(i!==void 0)return i;Mn(r+"."+t,"expected a string — dropped")}function gS(e,t,r){let n=e[t];if(n===void 0)return;let i=he.bool(n);if(i!==void 0)return i;Mn(r+"."+t,"expected a boolean — dropped")}function Mue(e,t,r){let n=e[t];if(n===void 0)return;let i=he.float(n);if(i!==void 0){if(i===Math.trunc(i))return i|0;Mn(r+"."+t,"expected a whole number — dropped");return}else{Mn(r+"."+t,"expected a number — dropped");return}}function my(e,t,r){let n=e[t];if(n===void 0)return;let i=he.array(n);if(i!==void 0)return Q(i,he.string);Mn(r+"."+t,"expected an array of strings — dropped")}function CN(e,t,r,n){let i=e[t];if(i===void 0)return;let o=he.object(i);if(o!==void 0){let a={};return Object.entries(o).forEach(s=>{let l=s[0];ee(n(s[1],r+"."+t+'["'+l+'"]'),c=>{a[l]=c})}),a}Mn(r+"."+t,"expected an object — dropped")}function h5(e,t){let r=he.object(e);if(r!==void 0){let n={};return Object.entries(r).forEach(i=>{let o=i[0],a=he.string(i[1]);if(a!==void 0){n[o]=a;return}else return Mn(t+"."+o,"expected a string — dropped")}),n}Mn(t,"expected an object of string values — dropped")}function Lue(e,t){let r=he.object(e);if(r!==void 0)return{label:Br(r,"label",t),scopedLabel:Br(r,"scopedLabel",t),group:Br(r,"group",t),order:Mue(r,"order",t),hidden:gS(r,"hidden",t)};Mn(t,"expected an object — dropped")}function zue(e,t){let r=he.object(e);if(r!==void 0){let n=Br(r,"pluginId",t),i=Br(r,"slice",t),o=Br(r,"command",t),a=Br(r,"field",t);if(n!==void 0&&i!==void 0&&o!==void 0&&a!==void 0)return{label:Br(r,"label",t),pluginId:n,slice:i,command:o,field:a,then:Br(r,"then",t)};Mn(t,"a row action needs pluginId, slice, command and field — dropped");return}Mn(t,"expected an object — dropped")}function Uue(e,t){let r=he.object(e);if(r!==void 0){let n=r.nav,i=r.rowActions,o;if(i!==void 0){let s=he.array(i);s!==void 0?o=yw(s,(l,c)=>zue(l,t+".rowActions["+c.toString()+"]")):(Mn(t+".rowActions","expected an array of row actions — dropped"),o=void 0)}else o=void 0;let a=r.transitions;return{mode:Br(r,"mode",t),layout:Br(r,"layout",t),canvas:Br(r,"canvas",t),role:Br(r,"role",t),resourceRef:Br(r,"resourceRef",t),accent:Br(r,"accent",t),audit:gS(r,"audit",t),presence:gS(r,"presence",t),related:my(r,"related",t),nav:n!==void 0?Lue(n,t+".nav"):void 0,rowActions:o,suppressRowActions:my(r,"suppressRowActions",t),retiredLabel:Br(r,"retiredLabel",t),suppress:my(r,"suppress",t),transitions:a!==void 0?h5(a,t+".transitions"):void 0}}Mn(t,"expected an object — dropped")}function Bue(e,t){let r=he.object(e);if(r!==void 0){let n=Br(r,"view",t);if(n!==void 0)return{view:n,label:Br(r,"label",t),field:Br(r,"field",t),aggregate:Br(r,"aggregate",t),viz:Br(r,"viz",t),xField:Br(r,"xField",t)};Mn(t,"metric without a `view` — dropped");return}Mn(t,"expected an object — dropped")}function jue(e,t){let r=e!==void 0?e:"ui-hints",n=he.object(t);if(n!==void 0){let i=n.dashboard,o;if(i!==void 0){let a=he.array(i);a!==void 0?o=yw(a,(s,l)=>Bue(s,r+".dashboard["+l.toString()+"]")):(Mn(r+".dashboard","expected an array of metrics — dropped"),o=void 0)}else o=void 0;return{views:CN(n,"views",r,Uue),fields:CN(n,"fields",r,h5),dashboard:o}}return Mn(r,"expected an object — no hints applied"),n0}function que(e){let t=he.object(e);if(t!==void 0){let r={};return Object.entries(t).forEach(n=>{let i=n[0];r[i]=jue('ui-hints["'+i+'"]',n[1])}),r}return Mn("ui-hints.json","top-level value is not a {pluginId: hints} object — ignored"),{}}function Vue(e,t){let r={};return Object.entries(e).forEach(n=>{r[n[0]]=n[1]}),Object.entries(t).forEach(n=>{let i=n[0];Ee(e[i])&&console.info("[AutoUI] uiHints ("+i+"): code-supplied hints replace the ui-hints.json entry"),r[i]=n[1]}),r}function uu(e){return D(q(k(k(G(bn(e)),t=>F(t,"properties")),G),t=>Object.keys(t)),[])}function Gue(e,t){return k(k(q(k(k(k(G(bn(e)),r=>F(r,"properties")),G),r=>F(r,t)),bn),G),r=>F(r,"items"))}function gy(e,t){let r=t.split("."),n=D(r[0],t),i=e.readModels.find(a=>a.name===n),o=i!==void 0?i.schema:q(e.stateViewSlices.find(a=>a.name===n),a=>a.schema);return o!==void 0?nt(r.slice(1),{TAG:"Ok",_0:{schema:o}},(a,s)=>{if(a.TAG!=="Ok")return a;let l=a._0.schema,c=Gue(l,s);return c!==void 0?{TAG:"Ok",_0:{schema:c}}:uu(l).includes(s)?ne(k(k(k(G(bn(l)),d=>F(d,"properties")),G),d=>F(d,s)),{TAG:"Error",_0:'unresolvable path segment "'+s+'" in "'+t+'"'},d=>({TAG:"Ok",_0:{schema:d}})):{TAG:"Error",_0:'unknown field "'+s+'" in path "'+t+'"'}}):{TAG:"Error",_0:'unknown view "'+n+'" — known views: '+e.readModels.map(a=>a.name).concat(e.stateViewSlices.map(a=>a.name)).join(", ")}}function Kue(e){return e.aggregates.flatMap(t=>t.commands).concat(e.stateChangeSlices.flatMap(t=>t.commands).concat(e.readModels.flatMap(t=>t.commands))).map(t=>t.name)}function p5(e,t){let r=e.readModels.find(n=>n.name===t);return r!==void 0?r.lifecycleField:k(e.stateViewSlices.find(n=>n.name===t),n=>n.lifecycleField)}function Hue(e,t){let r=e.readModels.find(n=>n.name===t);return r!==void 0?r.ownerField:k(e.stateViewSlices.find(n=>n.name===t),n=>n.ownerField)}function Wue(e,t,r){let n=vn(p5(e,t),_n(r,void 0,void 0).statusField);return n!==void 0?fo(r,n):[]}function Jue(e){return Dr(e).filter(t=>Is(t[1])).map(t=>t[0])}function RN(e,t){if(l5(e)!==void 0)return;let n=iv().map(i=>i.id).join(", ");return t+': unknown view-mode id "'+e+'" — registered modes: '+n}function Que(e,t){let r=e.aggregates.find(i=>i.name===t);if(r!==void 0)return{TAG:"Ok",_0:r.commands};let n=e.stateChangeSlices.find(i=>i.name===t);return n!==void 0?{TAG:"Ok",_0:n.commands}:{TAG:"Error",_0:e.aggregates.map(i=>i.name).concat(e.stateChangeSlices.map(i=>i.name))}}function Yue(e,t,r,n){let i=r!==void 0?r:[],o=n!==void 0?n:{},a=i.length===0?[t]:i,s=[],l=c=>{s.push("[AutoUI] uiHints ("+t.id+"): "+c)};return ee(e.views,c=>{Te(c).forEach(d=>{let f=d[1],h=d[0],p=gy(t,h);p.TAG!=="Ok"&&l('views["'+h+'"]: '+p._0),ee(f.role,m=>{if(!wN.includes(m))return l('views["'+h+'"].role: unknown role "'+m+'" — expected '+wN.join(" or "));if(m!=="events")return;let g=f.resourceRef;return g!==void 0?p.TAG==="Ok"&&!uu(p._0.schema).includes(g)?l('views["'+h+'"].resourceRef: unknown field "'+g+'"'):void 0:l('views["'+h+'"]: role "events" requires a resourceRef field')}),ee(f.resourceRef,m=>{if(da(f.role,"events"))return l('views["'+h+'"].resourceRef: only meaningful with role "events"')}),ee(f.transitions,m=>{let g=Kue(t),v=p5(t,h),b;b=p.TAG==="Ok"?v!==void 0?fo(p._0.schema,v):[]:[],b.length===0&&l('views["'+h+'"].transitions: the view declares no status enum, so no transition can apply'),Te(m).forEach(y=>{let S=y[1],w=y[0];if(g.includes(S)||l('views["'+h+'"].transitions["'+w+'"]: unknown command "'+S+'" — known commands: '+g.join(", ")),b.length!==0&&!b.includes(w))return l('views["'+h+'"].transitions: unknown target state "'+w+'" — known states: '+b.join(", "))})}),ee(f.nav,m=>{h.includes(".")&&l('views["'+h+'"].nav: a nested path has no menu entry of its own — nav belongs on the top-level view'),[["label",m.label],["scopedLabel",m.scopedLabel],["group",m.group]].forEach(g=>{let v=g[0];ee(g[1],b=>{if(b.trim()==="")return l('views["'+h+'"].nav.'+v+": blank — an empty "+v+" renders nothing, so it is ignored")})}),ee(m.scopedLabel,g=>{if(!h.includes(".")&&ir(Hue(t,h)))return l('views["'+h+'"].nav.scopedLabel: the view declares no @owner field, so no caller is narrowed to their own rows and this label never renders')})}),ee(f.rowActions,m=>{h.includes(".")&&m.length!==0&&l('views["'+h+'"].rowActions: a nested path names a collection drilled into inside a detail, not a view whose rows an action can be declared about — they belong on the top-level view'),m.forEach((g,v)=>{let b='views["'+h+'"].rowActions['+v.toString()+"]",y=a.find(S=>S.id===g.pluginId);if(y!==void 0){let S=Que(y,g.slice);if(S.TAG==="Ok"){let w=S._0,C=w.find(A=>A.name===g.command);if(C!==void 0){let A=uu(C.schema);A.includes(g.field)||l(b+': unknown field "'+g.field+'" on command "'+g.command+'" — known fields: '+A.join(", "))}else l(b+': unknown command "'+g.command+'" in "'+g.slice+'" — known commands: '+w.map(A=>A.name).join(", "))}else l(b+': unknown slice "'+g.slice+'" in plugin "'+g.pluginId+'" — known aggregates and slices: '+S._0.join(", "))}else l(b+': unknown plugin "'+g.pluginId+'" — known plugins: '+a.map(S=>S.id).join(", "));ee(g.then,S=>{if(S.trim()==="")return l(b+".then: blank — an empty route navigates nowhere, so it is ignored")})})}),ee(f.suppressRowActions,m=>{h.includes(".")&&m.length!==0&&l('views["'+h+'"].suppressRowActions: a nested path names a collection drilled into inside a detail, not a view whose rows an action can be offered on — they belong on the top-level view');let g=D(f.rowActions,[]).map(y=>y.pluginId+"."+y.slice+"."+y.command),v=D(F(o,h),[]),b=g.concat(v);m.forEach((y,S)=>{let w='views["'+h+'"].suppressRowActions['+S.toString()+"]";return y.trim()===""?l(w+": blank — an empty pointer names no action, so it is ignored"):b.some(C=>C===y)?void 0:l(w+': "'+y+'" matches no declared or inferred action on this view — '+(b.length!==0?"it offers "+b.join(", "):"it offers none"))})}),ee(f.retiredLabel,m=>{if(m.trim()==="")return l('views["'+h+'"].retiredLabel: blank — an empty label renders an empty badge, so it is ignored');if(p.TAG!=="Ok")return;let g=Lp(p._0.schema);return g!==void 0?g[1].values!==void 0?l('views["'+h+'"].retiredLabel: "'+g[0]+'" retires the row by its lifecycle state, so each row badges by the state it is in — rename the states themselves to change the word'):void 0:l('views["'+h+'"].retiredLabel: the view declares no @retired field, so there is no retirement state to label')}),ee(f.mode,m=>ee(RN(m,'views["'+h+'"].mode'),l)),ee(f.layout,m=>{if(!EN.includes(m))return l('views["'+h+'"].layout: unknown layout "'+m+'" — expected '+EN.join(" or "))}),ee(f.suppress,m=>{m.forEach(g=>{if(ee(RN(g,'views["'+h+'"].suppress'),l),g===ha)return l('views["'+h+'"].suppress: the "table" mode is the universal fallback and cannot be suppressed')})})})}),ee(e.fields,c=>{Te(c).forEach(d=>{let f=d[0],h=gy(t,f);if(h.TAG!=="Ok")return l('fields["'+f+'"]: '+h._0);let p=uu(h._0.schema);Te(d[1]).forEach(m=>{let g=m[1],v=m[0];if(p.includes(v)||l('fields["'+f+'"]: unknown field "'+v+'"'),ir(Pw(g)))return l('fields["'+f+'"].'+v+': unknown semantic "'+g+'"')})})}),ee(e.dashboard,c=>{c.forEach(d=>{let f=D(d.aggregate,"count");["count","sum","avg"].includes(f)?f!=="count"&&ir(d.field)&&l('dashboard metric on "'+d.view+'": aggregate "'+f+'" requires a field'):l('dashboard metric on "'+d.view+'": unknown aggregate "'+f+'" — expected count, sum, or avg');let h=gy(t,d.view);if(h.TAG!=="Ok")return l("dashboard metric: "+h._0);let p=h._0.schema;ee(d.field,m=>{if(!uu(p).includes(m))return l('dashboard metric on "'+d.view+'": unknown field "'+m+'"')}),ee(d.xField,m=>{if(!uu(p).includes(m))return l('dashboard metric on "'+d.view+'": unknown xField "'+m+'"')}),ee(d.viz,m=>{if(!kN.includes(m))return l('dashboard metric on "'+d.view+'": unknown viz "'+m+'" — expected '+kN.join(", "));if(m==="funnel"&&Wue(t,d.view,p).length===0)return l('dashboard metric on "'+d.view+'": viz "funnel" needs a status enum to order the stages, and this view declares none');if(m!=="scatter")return;let g=d.field,v=d.xField;if(g!==void 0&&v!==void 0){let b=uu(p),y=Jue(p);[["field",g],["xField",v]].forEach(S=>{let w=S[1];if(b.includes(w)&&!y.includes(w))return l('dashboard metric on "'+d.view+'": viz "scatter" '+S[0]+' "'+w+'" is not a numeric field')});return}l('dashboard metric on "'+d.view+'": viz "scatter" needs both a field (the y measure) and an xField (the x measure)')})})}),s.forEach(c=>{console.error(c)}),s}function s2(e,t,r){let i=t2(e,r!==void 0?r:s5),o=k(t,a=>a.suppress);return o!==void 0?i.filter(a=>a.id===ha?!0:!o.includes(a.id)):i}let Xue="cards";function l2(e,t,r,n,i){let o=m=>k(m,g=>i.find(v=>v.id===g)),a=Ce(n,"Tight"),s=m=>{if(!a)return!0;let g=m.band;return g!==void 0?Jn.atLeastAsNarrow(g,"Tight"):!1},l=q(e,m=>m.mode),c=o(k(e,m=>{if(s(m))return m.mode}));if(c!==void 0)return c;let d=o(k(t,m=>m.mode));if(d!==void 0)return d;let f=o(r);if(f!==void 0)return f;let h=a?o(Xue):void 0;if(h!==void 0)return h;let p=o(l);return p!==void 0?p:i[0]}function vy(e){switch(e){case"full":return"Full";case"split":return"Split";default:return}}function Zue(e,t,r,n){if(!n)return"Full";let i=k(e,vy);if(i!==void 0)return i;let o=k(k(t,a=>a.layout),vy);return o!==void 0?o:D(k(r,vy),"Full")}function ece(e,t){return D(k(e,r=>r.audit),!1)?!0:t}function tce(e){return D(k(e,t=>t.presence),!1)}function rce(e){return k(e,t=>t.related)}function nce(e){return e.toLowerCase()==="hide"?"Hide":"Lock"}function td(e,t){return t!==void 0&&t.length!==0?t.some(r=>e.includes(r)):!0}function m5(e){return k(e,t=>t[0])}function ice(e,t){let r=n=>n.filter(i=>td(e,i.requiredAccess));return t.map(n=>{let i={...n};return i.internalQueryables=q(n.internalQueryables,o=>o.filter(a=>td(e,a.requiredAccess))),i.stateChangeSlices=n.stateChangeSlices.map(o=>{let a={...o};return a.commands=r(o.commands),a}),i.stateViewSlices=n.stateViewSlices.filter(o=>td(e,o.requiredAccess)),i.aggregates=n.aggregates.map(o=>{let a={...o};return a.commands=r(o.commands),a}),i.readModels=n.readModels.filter(o=>td(e,o.requiredAccess)).map(o=>{let a={...o};return a.commands=r(o.commands),a}),i})}function oce(e,t){let r={},n=(i,o)=>{let a=!td(e,o),s=m5(o);if(a&&s!==void 0){r[i]=s;return}};return t.forEach(i=>{i.readModels.forEach(o=>n(o.name,o.requiredAccess)),i.stateViewSlices.forEach(o=>n(o.name,o.requiredAccess))}),r}function ace(e,t){let r={},n=(i,o)=>{if(o.length!==0&&o.every(a=>!td(e,a.requiredAccess)))return ee(k(o[0],a=>m5(a.requiredAccess)),a=>{r[i]=a})};return t.forEach(i=>{i.aggregates.forEach(o=>n(o.name,o.commands)),i.stateChangeSlices.forEach(o=>n(o.name,o.commands))}),r}function sce(e,t,r){return e==="Lock"?[r,oce(t,r),ace(t,r)]:[ice(t,r),{},{}]}let lce=[u(x.background,"#0d1117"),u(x.surface,"#161b22"),u(x.surfaceSubtle,"#1c2128"),u(x.surfaceElevated,"#21262d"),u(x.brand,"#2f81f7"),u(x.brandSubtle,"#1f4b8e"),u(x.success,"#3fb950"),u(x.warning,"#d29922"),u(x.error,"#f85149"),u(x.info,"#58a6ff"),u(x.textPrimary,"#e6edf3"),u(x.textSecondary,"#8b949e"),u(x.textDisabled,"#484f58"),u(x.textOnBrand,"#ffffff"),u(x.border,"#30363d"),u(x.borderSubtle,"#21262d"),u(O.xs,"4px"),u(O.sm,"8px"),u(O.md,"16px"),u(O.lg,"24px"),u(O.xl,"32px"),u(O.xxl,"48px"),u($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u($.sizeXs,"11px"),u($.sizeSm,"12px"),u($.sizeMd,"14px"),u($.sizeLg,"16px"),u($.sizeXl,"20px"),u($.sizeXxl,"24px"),u($.weightNormal,"400"),u($.weightMedium,"500"),u($.weightBold,"600"),u($.lineHeightTight,"1.25"),u($.lineHeightNormal,"1.5"),u($.lineHeightRelaxed,"1.75"),u(Y.sm,"4px"),u(Y.md,"6px"),u(Y.lg,"12px"),u(Y.full,"9999px"),u(Zr.sm,"0 1px 3px rgba(0,0,0,0.4)"),u(Zr.md,"0 4px 12px rgba(0,0,0,0.5)"),u(Zr.lg,"0 8px 24px rgba(0,0,0,0.6)")],uce=[u(x.background,"#ffffff"),u(x.surface,"#f6f8fa"),u(x.surfaceSubtle,"#eaeef2"),u(x.surfaceElevated,"#ffffff"),u(x.brand,"#0969da"),u(x.brandSubtle,"#ddf4ff"),u(x.success,"#1a7f37"),u(x.warning,"#9a6700"),u(x.error,"#cf222e"),u(x.info,"#0550ae"),u(x.textPrimary,"#1f2328"),u(x.textSecondary,"#636c76"),u(x.textDisabled,"#bec1c5"),u(x.textOnBrand,"#ffffff"),u(x.border,"#d0d7de"),u(x.borderSubtle,"#eaeef2"),u(O.xs,"4px"),u(O.sm,"8px"),u(O.md,"16px"),u(O.lg,"24px"),u(O.xl,"32px"),u(O.xxl,"48px"),u($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u($.sizeXs,"11px"),u($.sizeSm,"12px"),u($.sizeMd,"14px"),u($.sizeLg,"16px"),u($.sizeXl,"20px"),u($.sizeXxl,"24px"),u($.weightNormal,"400"),u($.weightMedium,"500"),u($.weightBold,"600"),u($.lineHeightTight,"1.25"),u($.lineHeightNormal,"1.5"),u($.lineHeightRelaxed,"1.75"),u(Y.sm,"4px"),u(Y.md,"6px"),u(Y.lg,"12px"),u(Y.full,"9999px"),u(Zr.sm,"0 1px 3px rgba(0,0,0,0.08)"),u(Zr.md,"0 4px 12px rgba(0,0,0,0.12)"),u(Zr.lg,"0 8px 24px rgba(0,0,0,0.16)")],cce=[u(x.background,"#f5f5f5"),u(x.surface,"#ffffff"),u(x.surfaceSubtle,"#eeeeee"),u(x.surfaceElevated,"#ffffff"),u(x.brand,"#424242"),u(x.brandSubtle,"#e0e0e0"),u(x.success,"#388e3c"),u(x.warning,"#f57c00"),u(x.error,"#d32f2f"),u(x.info,"#1976d2"),u(x.textPrimary,"#212121"),u(x.textSecondary,"#757575"),u(x.textDisabled,"#bdbdbd"),u(x.textOnBrand,"#ffffff"),u(x.border,"#bdbdbd"),u(x.borderSubtle,"#e0e0e0"),u(O.xs,"4px"),u(O.sm,"8px"),u(O.md,"16px"),u(O.lg,"24px"),u(O.xl,"32px"),u(O.xxl,"48px"),u($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u($.sizeXs,"11px"),u($.sizeSm,"12px"),u($.sizeMd,"14px"),u($.sizeLg,"16px"),u($.sizeXl,"20px"),u($.sizeXxl,"24px"),u($.weightNormal,"400"),u($.weightMedium,"500"),u($.weightBold,"600"),u($.lineHeightTight,"1.25"),u($.lineHeightNormal,"1.5"),u($.lineHeightRelaxed,"1.75"),u(Y.sm,"4px"),u(Y.md,"6px"),u(Y.lg,"12px"),u(Y.full,"9999px"),u(Zr.sm,"0 1px 3px rgba(0,0,0,0.12)"),u(Zr.md,"0 4px 12px rgba(0,0,0,0.14)"),u(Zr.lg,"0 8px 24px rgba(0,0,0,0.18)")],dce=[u(x.background,"#000000"),u(x.surface,"#0a0a0a"),u(x.surfaceSubtle,"#111111"),u(x.surfaceElevated,"#1a1a1a"),u(x.brand,"#ffdd00"),u(x.brandSubtle,"#332b00"),u(x.success,"#00ff00"),u(x.warning,"#ffaa00"),u(x.error,"#ff4444"),u(x.info,"#44aaff"),u(x.textPrimary,"#ffffff"),u(x.textSecondary,"#cccccc"),u(x.textDisabled,"#555555"),u(x.textOnBrand,"#000000"),u(x.border,"#ffffff"),u(x.borderSubtle,"#888888"),u(O.xs,"4px"),u(O.sm,"8px"),u(O.md,"16px"),u(O.lg,"24px"),u(O.xl,"32px"),u(O.xxl,"48px"),u($.fontFamily,"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"),u($.fontFamilyMono,"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"),u($.sizeXs,"11px"),u($.sizeSm,"12px"),u($.sizeMd,"14px"),u($.sizeLg,"16px"),u($.sizeXl,"20px"),u($.sizeXxl,"24px"),u($.weightNormal,"400"),u($.weightMedium,"500"),u($.weightBold,"600"),u($.lineHeightTight,"1.25"),u($.lineHeightNormal,"1.5"),u($.lineHeightRelaxed,"1.75"),u(Y.sm,"4px"),u(Y.md,"6px"),u(Y.lg,"12px"),u(Y.full,"9999px"),u(Zr.sm,"0 1px 3px rgba(255,255,255,0.1)"),u(Zr.md,"0 4px 12px rgba(255,255,255,0.15)"),u(Zr.lg,"0 8px 24px rgba(255,255,255,0.2)")];function ng(e,t){let r=t!==void 0?[u(x.brand,t.primaryColor)]:[];return E(e.concat(r))}function fce(e){let t=e.theme,r=t.preset,n;switch(r){case"Dark":n=ng(lce,t.brand);break;case"Light":n=ng(uce,t.brand);break;case"Neutral":n=ng(cce,t.brand);break;case"HighContrast":n=ng(dce,t.brand);break}return _("div",{children:e.children,className:n})}let hce=fce;function pce(e){}let mce={preset:"Light",setPreset:pce},g5=Zt(mce),gce=g5.Provider;function vce(){return xt(g5)}let v5="reventless-ui:theme",bce=["Light","Dark","Neutral","HighContrast"];function _ce(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Light":return"Light";case"Neutral":return"Neutral";default:return}}function yce(e){switch(e){case"Dark":return"Dark";case"HighContrast":return"HighContrast";case"Neutral":return"Neutral";default:return"Light"}}function b5(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"HighContrast"}}function xce(e){let t=localStorage.getItem(v5);return t==null?e:yce(t)}function Sce(e){let t=e.initialPreset,r=t!==void 0?t:"Light",n=ce(()=>xce(r)),i=n[1],o=n[0],a=Nr(l=>{localStorage.setItem(v5,b5(l)),i(c=>l)},[]),s=It(()=>({preset:o,setPreset:a}),[o,a]);return _(gce,{value:s,children:_(hce,{theme:{preset:o,brand:e.brand},children:e.children})})}let wce={make:Sce};function _5(e){return e.startsWith("/")?!e.startsWith("//"):!1}function Ece(e){let t;e.startsWith("https://")?t="wss://"+e.slice(8):e.startsWith("http://")?t="ws://"+e.slice(7):_5(e)?t=(location.protocol==="https:"?"wss":"ws")+"://"+location.host+e:t=e;let r=t.replace("appsync-api.","appsync-realtime-api.");return r.endsWith("/realtime")?r:r+"/realtime"}function kce(e){let t=e.startsWith("https://")?e.slice(8):e.startsWith("http://")?e.slice(7):_5(e)?location.host:e,r=t.indexOf("/");return r!==-1?t.slice(0,r):t}function Cce(e){return btoa(e).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function Rce(e,t){let r=JSON.stringify(Object.fromEntries([["host",e],["Authorization",t]]));return"header-"+Cce(r)}function Ace(e){return e===4401?!0:e===4403}function i0(e,t){if(e.state===t)return;let r=e.state;e.state=t;let n=0;switch(t){case"Closed":case"Connecting":n=1;break;case"Open":let i=e.disconnectedSince;if(i!==void 0){let o=Date.now()-i;e.disconnectedSince=void 0,ee(e.onReconnect,a=>a(o))}break}n===1&&r==="Open"&&(e.disconnectedSince=Date.now()),ee(e.onStateChange,i=>i(t))}function $ce(e){switch(e){case 1:return 1e3;case 2:return 2e3;case 3:return 4e3;case 4:return 8e3;case 5:return 16e3;default:return 3e4}}let Tce='{"type":"connection_init"}';function y5(e,t){let r=e.ws,n=e.getToken();if(r===void 0||n===void 0)return;let i=Object.fromEntries([["host",e.host],["Authorization",n]]),o=JSON.stringify(Object.fromEntries([["type","subscribe"],["id",t.id],["channel",t.channel],["authorization",i]]));try{kt(r).send(o);return}catch{return}}function Nce(e,t){let r=e.ws;if(r===void 0)return;let n=JSON.stringify(Object.fromEntries([["type","unsubscribe"],["id",t]]));try{kt(r).send(n);return}catch{return}}function Dce(e){e.subscriptions.forEach(t=>y5(e,t))}function AN(e){let t=k(e.errors,he.array);return t!==void 0&&t.length!==0?t.map(r=>{let n=he.object(r);if(n===void 0)return JSON.stringify(r);let i=s=>k(n[s],he.string),o=i("errorType"),a=i("message");return o!==void 0?a!==void 0?o+": "+a:o:a!==void 0?a:JSON.stringify(r)}).join("; "):JSON.stringify(e)}function Fce(e,t){let r;try{r=JSON.parse(t)}catch{r=void 0}let n=k(r,he.object);if(n===void 0)return;let i=k(n.type,he.string);if(i!==void 0)switch(i){case"connection_ack":return i0(e,"Open"),e.reconnectAttempts=0,Dce(e);case"connection_error":console.error("Events connection refused: "+AN(n));return;case"data":let o=k(n.id,he.string),a=D(n.event,null),s=p=>{let m=he.string(p);if(m===void 0)return p;try{return JSON.parse(m)}catch{return p}},l=he.array(a),c=l!==void 0?l.map(s):[s(a)],d=k(o,p=>e.subscriptions.get(p));if(d!==void 0){c.forEach(p=>d.onMessage(p));return}else return;case"subscribe_error":let f=k(n.id,he.string),h=D(q(k(f,p=>e.subscriptions.get(p)),p=>p.channel),"<unknown channel>");console.error("Events subscribe refused for "+h+": "+AN(n));return;default:return}}function x5(e){if(e.disposed)return;let t=["aws-appsync-event-ws"],r=e.getToken(),n=r!==void 0?t.concat([Rce(e.host,r)]):t,i=new WebSocket(e.url,n);e.ws=Nt(i),i0(e,"Connecting"),i.onopen=()=>{try{i.send(Tce);return}catch{return}},i.onmessage=o=>Fce(e,o.data),i.onclose=o=>{if(e.ws=void 0,Ace(o.code))return i0(e,"Unauthorized"),ee(e.onAuthFailure,s=>{try{return s()}catch{return}});if(i0(e,"Closed"),e.disposed)return;let a=e.reconnectAttempts+1|0;e.reconnectAttempts=a,e.reconnectTimer=setTimeout(()=>x5(e),$ce(a))},i.onerror=o=>{}}function Ice(e,t,r,n,i,o){let a={ws:void 0,state:"Closed",url:e,host:t,getToken:r,subscriptions:new Map,reconnectAttempts:0,reconnectTimer:void 0,disposed:!1,onStateChange:n,disconnectedSince:void 0,onReconnect:i,onAuthFailure:o};return x5(a),a}function Pce(e,t,r){let n=crypto.randomUUID(),i={id:n,channel:t,onMessage:r};return e.subscriptions.set(n,i),e.state==="Open"&&y5(e,i),()=>{if(e.subscriptions.has(n))return e.subscriptions.delete(n),Nce(e,n)}}function $N(e){e.disposed=!0;let t=e.reconnectTimer;t!==void 0&&clearTimeout(t),e.reconnectTimer=void 0;let r=e.ws;if(r!==void 0)try{kt(r).close()}catch{}e.ws=void 0,e.subscriptions.clear()}async function Oce(e,t,r,n){let i=JSON.stringify(Object.fromEntries([["channel",r],["events",n.map(a=>JSON.stringify(a))]])),o=Object.fromEntries([["Content-Type","application/json"]]);t!==void 0&&(o.Authorization=t);try{let a=await fetch(e,{method:"POST",headers:o,body:i});return a.ok?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:"publish failed with status "+a.status.toString()}}catch(a){let s=Ds(a);return s.RE_EXN_ID===Nv?{TAG:"Error",_0:D(s._1.message,"publish failed")}:{TAG:"Error",_0:"publish failed"}}}function TN(){return ne(Li(globalThis.document),!1,e=>e.hidden)}function Mce(e){let t=Li(globalThis.document);if(t===void 0)return()=>{};let r=kt(t);return r.addEventListener("visibilitychange",e),()=>{r.removeEventListener("visibilitychange",e)}}let S5=["Platform_"];function NN(e,t){let r=t.toLowerCase();return e.some(n=>r.startsWith(n.toLowerCase()))?"Platform":"Domain"}let w5=Zt(void 0);function om(){return xt(w5)}function DN(){return{client:void 0,registry:new Map,refcount:0,idleTimer:void 0,reconnectListeners:[],torndown:!1}}let Lce=w5.Provider;function zce(e){let t=e.getToken,r=e.platformReadModelPrefixes,n=e.onAuthFailure,i=e.clientEventsNamespace,o=e.liveReconnectRefetch,a=e.liveUpdates,s=e.platformEventsEndpoint,l=e.domainEventsEndpoint,c=o!==void 0?o:!0,d=r!==void 0?r:S5,f=Ne(t);Ae(()=>{f.current=t},[t]);let h=()=>f.current(),p=Ne(DN()),m=Ne(DN()),g=Ne(TN()),v=ce(()=>"Closed"),b=v[1],y=v[0],S=ce(()=>"Closed"),w=S[1],C=S[0],A=K=>K==="Domain"?p:m,T=K=>K==="Domain"?l:s,R=K=>{let oe=A(K).current;if(!c)return;oe.reconnectListeners.slice().forEach(Z=>{try{return Z()}catch{return}})},N=K=>{let oe=A(K).current,le=oe.client;if(le!==void 0)return le;let Z=T(K);if(Z===void 0)return;let ve=Ece(Z),me=kce(Z),be=Ice(ve,me,h,Ge=>K==="Domain"?b(Lt=>Ge):w(Lt=>Ge),Ge=>{if(Ge>=2e3)return R(K)},n);return oe.client=be,be},I=K=>{let oe=A(K).current,le=oe.idleTimer;if(le!==void 0){clearTimeout(le),oe.idleTimer=void 0;return}},M=(K,oe,le)=>{if(!ir(le.underlyingUnsub))return;let Z=N(K);if(Z===void 0)return;let ve=Pce(Z,oe,me=>{le.callbacks.forEach(be=>be(me))});le.underlyingUnsub=ve},P=(K,oe,le)=>{let Z=A(K).current;if(!a||ir(T(K)))return()=>{};I(K),Z.refcount=Z.refcount+1|0;let ve=Z.registry.get(oe),me;if(ve!==void 0){let be=ve.drainTimer;be!==void 0&&(clearTimeout(be),ve.drainTimer=void 0),me=ve}else{let be={refcount:0,callbacks:[],underlyingUnsub:void 0,drainTimer:void 0};Z.registry.set(oe,be),me=be}return me.callbacks.push(le),me.refcount=me.refcount+1|0,me.refcount===1&&!g.current&&M(K,oe,me),()=>{if(me.callbacks=me.callbacks.filter(be=>be!==le),me.refcount=me.refcount-1|0,Z.torndown?(me.underlyingUnsub=void 0,Z.registry.delete(oe)):me.refcount===0&&(me.drainTimer=setTimeout(()=>{let be=me.underlyingUnsub;be!==void 0&&be(),me.underlyingUnsub=void 0,me.drainTimer=void 0,Z.registry.delete(oe)},5e3)),Z.refcount=Z.refcount-1|0,Z.refcount===0&&!Z.torndown){let be=A(K).current,Ge=be.idleTimer;Ge!==void 0&&clearTimeout(Ge),be.idleTimer=setTimeout(()=>{let Lt=be.client;Lt!==void 0&&($N(Lt),be.client=void 0),be.idleTimer=void 0},3e4);return}}},B=K=>a?Ee(T(NN(d,K))):!1,j=()=>{["Domain","Platform"].forEach(K=>{A(K).current.registry.forEach(le=>{let Z=le.underlyingUnsub;if(Z!==void 0){Z(),le.underlyingUnsub=void 0;return}})})},W=()=>{["Domain","Platform"].forEach(K=>{let oe=A(K).current,le={contents:!1};if(oe.registry.forEach((Z,ve)=>{if(Z.refcount>0&&ir(Z.underlyingUnsub))if(M(K,ve,Z),Ee(Z.underlyingUnsub)){le.contents=!0;return}else return}),le.contents)return R(K)})};Ae(()=>Mce(()=>{let oe=TN();if(oe!==g.current)return g.current=oe,oe?j():W()}),[]),Ae(()=>(()=>{["Domain","Platform"].forEach(K=>{let oe=A(K).current,le=oe.idleTimer;le!==void 0&&clearTimeout(le),oe.idleTimer=void 0,oe.registry.forEach(ve=>{let me=ve.drainTimer;if(me!==void 0){clearTimeout(me),ve.drainTimer=void 0;return}});let Z=oe.client;Z!==void 0&&$N(Z),oe.client=void 0,oe.torndown=!0})}),[]);let te=K=>K==="Domain"?y:C,J=(K,oe)=>{let le=A(K).current;return le.reconnectListeners.push(oe),()=>{le.reconnectListeners=le.reconnectListeners.filter(Z=>Z!==oe)}},re=()=>a&&Ee(i)?Ee(l):!1,se=async(K,oe,le)=>{let Z=T(K);return Z!==void 0?await Oce(Z,f.current(),oe,le):{TAG:"Error",_0:"no events endpoint configured"}},pe=It(()=>({subscribe:P,isLive:B,apiForReadModel:K=>NN(d,K),statusFor:te,registerReconnect:J,publish:se,clientChannelsAvailable:re,clientNamespace:()=>i,liveUpdatesEnabled:()=>a}),[a,l,s,y,C,i,d]);return ur(Lce,{value:pe,children:e.children})}let Uce={make:zce};function E5(e,t){if(e.length===0)return"Unknown";let r=t.filter(n=>e.includes(n));return r.length!==0?{TAG:"Elevated",_0:r}:"Scoped"}function k5(e,t){let r=G(e);if(r===void 0)return e;let n=k(F(r,"properties"),G);if(n===void 0)return e;let i=k(F(n,t),G);if(i===void 0)return e;let o=Oe(Te(i));o["x-reventless-ui-hidden"]=!0;let a=Oe(Te(n));a[t]=o;let s=Oe(Te(r));return s.properties=a,s}function Bce(e,t,r){let n=G(e);if(n===void 0)return e;let i={};i.field=t,i.as=r.map(a=>a);let o=Oe(Te(n));return o["x-reventless-owner-unscoped"]=i,o}function jce(e,t,r){if(typeof e!="object"){if(e==="Unknown"||t==="")return r;let n=o=>o.map(a=>{if(a.ownerField===void 0)return a;let l={...a};return l.ownerValue=t,l}),i=(o,a)=>a!==void 0?k5(o,a):o;return r.map(o=>{let a={...o};return a.internalQueryables=q(o.internalQueryables,s=>s.map(l=>{let c={...l};return c.schema=i(l.schema,l.ownerField),c})),a.stateChangeSlices=o.stateChangeSlices.map(s=>{let l={...s};return l.commands=n(s.commands),l}),a.stateViewSlices=o.stateViewSlices.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a.aggregates=o.aggregates.map(s=>{let l={...s};return l.commands=n(s.commands),l}),a.readModels=o.readModels.map(s=>{let l={...s};return l.commands=n(s.commands),l.schema=i(s.schema,s.ownerField),l}),a})}else{let n=e._0,i=(o,a)=>a!==void 0?Bce(o,a,n):o;return r.map(o=>{let a={...o};return a.stateViewSlices=o.stateViewSlices.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a.readModels=o.readModels.map(s=>{let l={...s};return l.schema=i(s.schema,s.ownerField),l}),a})}}function qce(e,t){return ee(k(k(G(t),r=>F(r,"properties")),G),r=>{Np(r).forEach(n=>ee(k(k(G(n),i=>F(i,"x-reventless-semantic-target")),G),i=>{let o=F(i,"store"),a=F(i,"plugin");if(o!==void 0&&a===void 0){i.plugin=e;return}}))}),t}function Vce(e){let t=Lp(e);return t!==void 0&&t[1].values===void 0?k5(e,t[0]):e}function vS(e,t){let r=ie(t);return Vce(qce(e,r!==void 0?JSON.parse(r):t))}function FN(e){switch(e){case"boolean":return"Boolean";case"integer":return"Int";case"number":return"Float";default:return"String"}}function IN(e){let t=e.toLowerCase();return t.length>=2?t.endsWith("id"):!1}function Gce(e){let t=e.toLowerCase();return t.length>3?t.endsWith("ids"):!1}function PN(e){if(Ce(k(F(e,"type"),ie),"object"))return k(F(e,"x-reventless-graphql-input"),ie)}function Kce(e){return k(F(e,"x-reventless-graphql-type"),ie)}function Hce(e,t){let r=D(k(F(t,"type"),ie),"string");if(r==="array"){let i=k(F(t,"items"),G),o=k(i,PN);return"["+(o!==void 0?o:D(q(k(k(i,s=>F(s,"type")),ie),s=>s==="string"&&(Gce(e)||IN(e))?"ID":FN(s)),"String"))+"!]"}let n=PN(t);return n!==void 0?n:IN(e)&&r==="string"?"ID":FN(r)}function C5(e){return q(k(k(G(e),t=>F(t,"required")),Et),t=>Q(t,ie))}function Wce(e,t,r){let n=C5(t),i=D(q(k(k(G(t),d=>F(d,"properties")),G),d=>Object.keys(d).filter(f=>f!=="TAG").map(f=>{let h=k(F(d,f),G),p=k(h,Kce),m;if(p!==void 0)m=p;else{let g=ne(h,"String",v=>Hce(f,v));m=n!==void 0?n.includes(f)?g+"!":g:g+"!"}return[f,m]})),[]),a=(r!==void 0?[]:[["id","ID!"]]).concat(i),s="__typename ... on CommandAccepted { msgId entityId eventCount } ... on CommandRejected { msgId errorCode errorDetail } ... on CommandPending { msgId }";if(a.length===0)return"mutation { "+e+" { "+s+" } }";let l=a.map(d=>"$"+d[0]+": "+d[1]).join(", "),c=a.map(d=>{let f=d[0];return f+": $"+f}).join(", ");return"mutation "+e+"("+l+") { "+e+"("+c+") { "+s+" } }"}function Jce(e){let t=e.split(".");return D(t[t.length-1|0],e)}function Qce(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2")}function Yce(e){return Q(D(Et(e),[]),t=>q(G(t),r=>{let n=i=>D(k(F(r,i),ie),"");return{fieldName:n("fieldName"),entity:n("entity"),plugin:k(F(r,"plugin"),ie)}}))}function bS(e){return da(k(F(e,"apiExposed"),Ov),!1)}function _S(e,t,r){return Q(D(Et(r),[]),n=>q(k(G(n),i=>{if(t(i))return i}),i=>{let o=v=>D(k(F(i,v),ie),""),a=o("name"),l=o("level")==="Instance"?"Instance":"Collection",c=D(q(F(i,"schema"),v=>vS(e,v)),null),d=o("mutationField"),f=k(F(i,"aggregateIdField"),ie),h=D(q(F(i,"references"),Yce),[]),p=q(k(F(i,"allowedStates"),Et),v=>Q(v,ie)),m=k(F(i,"targetState"),ie),g=k(q(k(F(i,"requiredAccess"),Et),v=>Q(v,ie)),v=>{if(v.length!==0)return v});return{name:a,label:Qce(Jce(a)),schema:c,mutationDocument:d===""?"":Wce(d,c,f),requiredRole:void 0,level:l,aggregateIdField:f,refFields:[],references:h,allowedStates:p,targetState:m,requiredAccess:g,ownerField:k(F(i,"ownerField"),ie)}}))}function ON(e,t){return _S(e,r=>!bS(r),t)}function yS(e){return Q(D(Et(e),[]),t=>q(G(t),r=>{let n=g=>D(k(F(r,g),ie),""),i=g=>D(k(F(r,g),Et),[]),o=(g,v)=>Q(D(k(F(g,v),Et),[]),ie),a=n("pluginId"),s=g=>k(q(k(F(g,"requiredAccess"),Et),v=>Q(v,ie)),v=>{if(v.length!==0)return v}),l=Q(i("readModels"),g=>q(G(g),v=>{let b=y=>D(k(F(v,y),ie),"");return{name:b("name"),schema:D(q(F(v,"schema"),y=>vS(a,y)),null),queryDocument:"",queryField:b("queryField"),sortIndex:0,commands:[],linkedWriteSide:o(v,"linkedWriteSide"),labelField:b("labelField"),labelFieldSource:k(F(v,"labelFieldSource"),ie),searchableFields:o(v,"searchableFields"),lifecycleField:k(F(v,"lifecycleField"),ie),requiredAccess:s(v),ownerField:k(F(v,"ownerField"),ie)}})),c=Q(i("aggregates"),g=>q(G(g),v=>({name:(y=>D(k(F(v,y),ie),""))("name"),schema:null,commands:_S(a,bS,D(F(v,"commands"),[])),systemCommands:ON(a,D(F(v,"commands"),[])),linkedViews:o(v,"linkedViews")}))),d=g=>Q(i(g),v=>q(G(v),b=>{let y=S=>D(k(F(b,S),ie),"");return{name:y("name"),schema:D(q(F(b,"schema"),S=>vS(a,S)),null),queryField:y("queryField"),sortIndex:0,linkedWriteSide:o(b,"linkedWriteSide"),labelField:y("labelField"),labelFieldSource:k(F(b,"labelFieldSource"),ie),searchableFields:o(b,"searchableFields"),lifecycleField:k(F(b,"lifecycleField"),ie),requiredAccess:s(b),ownerField:k(F(b,"ownerField"),ie)}})),f=d("stateViewSlices"),h=d("internalQueryables"),p=Q(i("stateChangeSlices"),g=>q(G(g),v=>({name:(y=>D(k(F(v,y),ie),""))("name"),commands:_S(a,bS,D(F(v,"commands"),[])),systemCommands:ON(a,D(F(v,"commands"),[])),linkedViews:o(v,"linkedViews"),consistencyRead:k(F(v,"consistencyRead"),ie)}))),m=q(k(F(r,"derivedPages"),Et),g=>Q(g,ie));return{id:a,name:a,readModels:l,aggregates:c,stateViewSlices:f,stateChangeSlices:p,internalQueryables:h,derivedPages:m}}))}function Xce(e){return D(q(k(k(k(he.object(e),t=>t.data),he.object),t=>t.Platform_ComponentDefinitions),yS),[])}function Zce(e){if(he.array(e)!==void 0)return{TAG:"Ok",_0:yS(e)};let r=gi(k(k(k(he.object(e),n=>n.data),he.object),n=>n.Platform_ComponentDefinitions),n=>Ee(he.array(n)));return r!==void 0?{TAG:"Ok",_0:yS(r)}:{TAG:"Error",_0:"expected a JSON array of component-definition entries (or a `{data:{Platform_ComponentDefinitions:[…]}}` envelope)"}}let ede=`{
|
|
42
|
+
Platform_ComponentDefinitions {
|
|
43
|
+
pluginId
|
|
44
|
+
readModels { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields lifecycleField requiredAccess ownerField }
|
|
45
|
+
aggregates { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed requiredAccess ownerField } linkedViews }
|
|
46
|
+
stateViewSlices { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields lifecycleField requiredAccess ownerField }
|
|
47
|
+
internalQueryables { name queryField schema linkedWriteSide labelField labelFieldSource searchableFields lifecycleField requiredAccess ownerField }
|
|
48
|
+
stateChangeSlices { name commands { name schema level aggregateIdField mutationField references { fieldName entity plugin } allowedStates targetState apiExposed requiredAccess ownerField } linkedViews consistencyRead }
|
|
49
|
+
}
|
|
50
|
+
}`;function tde(e){return e.startsWith("https://")?"wss://"+e.slice(8):e.startsWith("http://")?"ws://"+e.slice(7):e.startsWith("/")?(location.protocol==="https:"?"wss":"ws")+"://"+location.host+e:e}let rde="/ui-hints.json",nde="Reventless";function ide(e){let t=e.appName,r=e.platformName;return t!==void 0&&t.trim()!==""?t.trim():r!==void 0&&r.trim()!==""?pt(r):nde}function ode(e){return e.toLowerCase()==="fleet"?"Fleet":"Single"}function ade(e){switch(e.toLowerCase()){case"cognito":return"Cognito";case"inmemory":case"local":return"Local";default:return"Anonymous"}}function sde(e){let t=he.object(e);if(t===void 0)return{TAG:"Error",_0:"config.json: top-level value is not an object"};let r=s=>k(t[s],he.string),n=r("apiEndpoint");if(n===void 0)return{TAG:"Error",_0:"config.json: missing required field `apiEndpoint`"};let i=D(r("platformApiEndpoint"),n),o=s=>k(t[s],he.bool),a=s=>D(q(k(t[s],he.object),l=>Object.fromEntries(Q(Object.entries(l),c=>{let d=c[0];return q(he.string(c[1]),f=>[d,f])}))),{});return{TAG:"Ok",_0:{apiEndpoint:n,platformApiEndpoint:i,platformApiSubscriptionEndpoint:D(r("platformApiSubscriptionEndpoint"),tde(i)),domainApiEventsEndpoint:r("domainApiEventsEndpoint"),platformApiEventsEndpoint:r("platformApiEventsEndpoint"),clientEventsNamespace:r("clientEventsNamespace"),liveUpdates:D(o("liveUpdates"),!0),liveReconnectRefetch:D(o("liveReconnectRefetch"),!0),platformReadModelPrefixes:D(q(k(t.platformReadModelPrefixes,he.array),s=>Q(s,he.string)),S5),region:r("region"),authMode:D(q(r("authMode"),ade),"Anonymous"),identityProviderId:vn(r("identityProviderId"),r("cognitoUserPoolId")),identityProviderClientId:vn(r("identityProviderClientId"),r("cognitoClientId")),autoRedirectFirstPage:D(o("autoRedirectFirstPage"),!1),home:r("home"),mode:D(q(r("mode"),ode),"Single"),environment:r("environment"),platformName:r("platformName"),accessTiers:Q(D(k(t.accessTiers,he.array),[]),he.string),viewModes:Q(D(k(t.viewModes,he.array),[]),he.string),mapStyle:r("mapStyle"),graphLayout:r("graphLayout"),assetOrigins:a("assetOrigins"),uiHintsUrl:D(r("uiHintsUrl"),rde),manifestUrl:r("manifestUrl"),journeyManifestUrls:ne(k(t.journeyManifestUrls,he.object),{},s=>{let l={};return oG(s,(c,d)=>ee(he.string(c),f=>{l[d]=f})),l}),deniedSurfaces:D(q(r("deniedSurfaces"),nce),"Lock"),appName:r("appName"),logoUrl:r("logoUrl"),theme:k(r("theme"),s=>{let l=_ce(s);if(l!==void 0)return l;console.warn('[Shell] config.json: unknown theme "'+s+'" — expected '+bce.join(", ")+". Opening on the default instead.")}),elevatedGroups:Q(D(k(t.elevatedGroups,he.array),[]),he.string)}}}function lde(e){return Mt(fetch(e).then(t=>t.ok?t.json().then(que):(console.warn("[AutoUI] "+e+": not loaded (status "+t.status.toString()+") — no UI hints applied"),Promise.resolve({}))),t=>(console.warn("[AutoUI] "+e+": not loaded ("+String(t)+") — no UI hints applied"),Promise.resolve({})))}function R5(e){return Mt(fetch(e).then(t=>t.ok?Mt(t.json().then(r=>{let n=Zce(r);return n.TAG==="Ok"?n:{TAG:"Error",_0:e+": "+n._0}}),r=>Promise.resolve({TAG:"Error",_0:e+": not valid JSON — "+String(r)})):Promise.resolve({TAG:"Error",_0:e+": fetch failed with status "+t.status.toString()})),t=>Promise.resolve({TAG:"Error",_0:e+": fetch threw — "+String(t)}))}function ude(){return Mt(fetch("/config.json").then(e=>e.ok?e.json().then(sde):Promise.resolve({TAG:"Error",_0:"config.json: fetch failed with status "+e.status.toString()})),e=>Promise.resolve({TAG:"Error",_0:"config.json: fetch threw — "+String(e)}))}function cde(e){let t=he.string(e);return t!==void 0?t:q(he.float(e),r=>r.toString())}function dde(e){return q(he.object(e),t=>({message:D(k(t.message,he.string),""),path:Q(D(k(t.path,he.array),[]),cde),code:k(k(k(t.extensions,he.object),r=>r.code),he.string),errorType:k(t.errorType,he.string)}))}function u2(e){let t=he.object(e);return{data:D(k(t,r=>r.data),null),errors:Q(D(k(k(t,r=>r.errors),he.array),[]),dde)}}function fde(e,t){return e.errors.find(r=>Ce(r.path[0],t))}function A5(e,t){let r=k(he.object(e.data),n=>n[t]);if(!(r!==void 0&&Ze(r)!=="JSONNull"))return fde(e,t)}function $5(e){return e.errors.some(t=>Ce(t.code,"UNAUTHORIZED"))}function hde(e){return e.errors.some(t=>Ce(t.code,"FORBIDDEN")?!0:Ce(t.errorType,"Unauthorized"))}function pde(e){return t=>((r,n)=>{let i={contents:void 0};return e((a,s)=>t(a,s).then(l=>(i.contents=l,l.data)))(r,n).then(a=>{let s=i.contents;return s!==void 0?s:{data:a,errors:[]}})})}function mde(e,t,r,n){return(i,o)=>{let a=i.includes("Platform")||i.includes("platform")?t:e,s=Object.fromEntries([["content-type","application/json"]]),l=r();return l!==void 0&&(s.Authorization="Bearer "+l),fetch(a,{method:"POST",headers:s,body:D(JSON.stringify({query:i,variables:o}),"")}).then(c=>(c.status===401&&n(),c.json())).then(c=>{let d=u2(c);return $5(d)&&n(),Promise.resolve(d)})}}let gde=Q8;class sh extends Error{}sh.prototype.name="InvalidTokenError";function vde(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function bde(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return vde(t)}catch{return atob(t)}}function _de(e,t){if(typeof e!="string")throw new sh("Invalid token specified: must be a string");t||(t={});const r=t.header===!0?0:1,n=e.split(".")[r];if(typeof n!="string")throw new sh(`Invalid token specified: missing part #${r+1}`);let i;try{i=bde(n)}catch(o){throw new sh(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(i)}catch(o){throw new sh(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}let yde=(function(e){return e&&e.name?String(e.name):"UnknownError"}),xde=(function(e){return e&&e.message?String(e.message):""});function wb(e){return{name:yde(e),message:xde(e)}}function Eb(e){switch(e.name){case"PasswordResetRequiredException":return"Password reset required — contact your administrator";case"LimitExceededException":case"TooManyRequestsException":return"Too many attempts — please wait a moment and try again";case"UserNotConfirmedException":return"Account not confirmed — check your email";case"NotAuthorizedException":case"UserNotFoundException":return"Incorrect username or password";default:return"Sign-in failed. Please try again."}}const Sde=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),wde=e=>({httpHandler:e.httpHandler()});var pp;(function(e){e.HTTP="http",e.HTTPS="https"})(pp||(pp={}));var mp;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(mp||(mp={}));const xS="__smithy_context";class co{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const r=new co({...t,headers:{...t.headers}});return r.query&&(r.query=Ede(r.query)),r}static isInstance(t){if(!t)return!1;const r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return co.clone(this)}}function Ede(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class zd{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}const kde=e=>t=>async r=>{if(!co.isInstance(r.request))return t(r);const{request:n}=r,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let o=n.hostname;n.port!=null&&(o+=`:${n.port}`),n.headers.host=o}return t(r)},Cde={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Rde=e=>({applyToStack:t=>{t.add(kde(e),Cde)}}),Ade=()=>(e,t)=>async r=>{try{const n=await e(r),{clientName:i,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:c}=s,d=l??t.inputFilterSensitiveLog,f=c??t.outputFilterSensitiveLog,{$metadata:h,...p}=n.output;return a?.info?.({clientName:i,commandName:o,input:d(r.input),output:f(p),metadata:h}),n}catch(n){const{clientName:i,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:l}=s,c=l??t.inputFilterSensitiveLog;throw a?.error?.({clientName:i,commandName:o,input:c(r.input),error:n,metadata:n.$metadata}),n}},$de={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Tde=e=>({applyToStack:t=>{t.add(Ade(),$de)}}),Nde={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Dde=()=>e=>async t=>e(t),Fde=e=>({applyToStack:t=>{t.add(Dde(),Nde)}}),gf=e=>e[xS]||(e[xS]={}),Ts=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},Ide=(e,t)=>{if(!t||t.length===0)return e;const r=[];for(const n of t)for(const i of e)i.schemeId.split("#")[1]===n&&r.push(i);for(const n of e)r.find(({schemeId:i})=>i===n.schemeId)||r.push(n);return r};function Pde(e){const t=new Map;for(const r of e)t.set(r.schemeId,r);return t}const Ode=(e,t)=>(r,n)=>async i=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,i.input)),a=e.authSchemePreference?await e.authSchemePreference():[],s=Ide(o,a),l=Pde(e.httpAuthSchemes),c=gf(n),d=[];for(const f of s){const h=l.get(f.schemeId);if(!h){d.push(`HttpAuthScheme \`${f.schemeId}\` was not enabled for this service.`);continue}const p=h.identityProvider(await t.identityProviderConfigProvider(e));if(!p){d.push(`HttpAuthScheme \`${f.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:m={},signingProperties:g={}}=f.propertiesExtractor?.(e,n)||{};f.identityProperties=Object.assign(f.identityProperties||{},m),f.signingProperties=Object.assign(f.signingProperties||{},g),c.selectedHttpAuthScheme={httpAuthOption:f,identity:await p(f.identityProperties),signer:h.signer};break}if(!c.selectedHttpAuthScheme)throw new Error(d.join(`
|
|
51
|
+
`));return r(i)},Mde={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Lde=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(Ode(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),Mde)}}),zde=e=>t=>{throw t},Ude=(e,t)=>{},Bde=e=>(t,r)=>async n=>{if(!co.isInstance(n.request))return t(n);const o=gf(r).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:s,signer:l}=o,c=await t({...n,request:await l.sign(n.request,s,a)}).catch((l.errorHandler||zde)(a));return(l.successHandler||Ude)(c.response,a),c},jde={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},qde=e=>({applyToStack:t=>{t.addRelativeTo(Bde(),jde)}}),wh=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},T5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",MN=Object.entries(T5).reduce((e,[t,r])=>(e[r]=Number(t),e),{}),Vde=T5.split(""),_d=6,Eh=8,Gde=63,kb=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const r=new ArrayBuffer(t),n=new DataView(r);for(let i=0;i<e.length;i+=4){let o=0,a=0;for(let c=i,d=i+3;c<=d;c++)if(e[c]!=="="){if(!(e[c]in MN))throw new TypeError(`Invalid character ${e[c]} in base64 string.`);o|=MN[e[c]]<<(d-c)*_d,a+=_d}else o>>=_d;const s=i/4*3;o>>=a%Eh;const l=Math.floor(a/Eh);for(let c=0;c<l;c++){const d=(l-c-1)*Eh;n.setUint8(s+c,(o&255<<d)>>d)}}return new Uint8Array(r)},Ud=e=>new TextEncoder().encode(e),gp=e=>typeof e=="string"?Ud(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),c2=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function ov(e){let t;typeof e=="string"?t=Ud(e):t=e;const r=typeof t=="object"&&typeof t.length=="number",n=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let o=0;o<t.length;o+=3){let a=0,s=0;for(let c=o,d=Math.min(o+3,t.length);c<d;c++)a|=t[c]<<(d-c-1)*Eh,s+=Eh;const l=Math.ceil(s/_d);a<<=l*_d-s;for(let c=1;c<=l;c++){const d=(l-c)*_d;i+=Vde[(a&Gde<<d)>>d]}i+="==".slice(0,4-l)}return i}class Au extends Uint8Array{static fromString(t,r="utf-8"){if(typeof t=="string")return r==="base64"?Au.mutate(kb(t)):Au.mutate(Ud(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,Au.prototype),t}transformToString(t="utf-8"){return t==="base64"?ov(this):c2(this)}}const $u=e=>encodeURIComponent(e).replace(/[!'()*]/g,Kde),Kde=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function Hde(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=$u(r),Array.isArray(n))for(let i=0,o=n.length;i<o;i++)t.push(`${r}=${$u(n[i])}`);else{let i=r;(n||typeof n=="string")&&(i+=`=${$u(n)}`),t.push(i)}}return t.join("&")}function LN(e,t){return new Request(e,t)}function Wde(e=0){return new Promise((t,r)=>{e&&setTimeout(()=>{const n=new Error(`Request did not complete within ${e} ms`);n.name="TimeoutError",r(n)},e)})}const by={supported:void 0};class d2{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new d2(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(r=>r||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),by.supported===void 0&&(by.supported=typeof Request<"u"&&"keepalive"in LN("https://[::1]"))}destroy(){}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const i=n??this.config.requestTimeout,o=this.config.keepAlive===!0,a=this.config.credentials;if(r?.aborted){const y=zN(r);return Promise.reject(y)}let s=t.path;const l=Hde(t.query||{});l&&(s+=`?${l}`),t.fragment&&(s+=`#${t.fragment}`);let c="";if(t.username!=null||t.password!=null){const y=t.username??"",S=t.password??"";c=`${y}:${S}@`}const{port:d,method:f}=t,h=`${t.protocol}//${c}${t.hostname}${d?`:${d}`:""}${s}`,p=f==="GET"||f==="HEAD"?void 0:t.body,m={body:p,headers:new Headers(t.headers),method:f,credentials:a};this.config?.cache&&(m.cache=this.config.cache),p&&(m.duplex="half"),typeof AbortController<"u"&&(m.signal=r),by.supported&&(m.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(m,this.config.requestInit(t));let g=()=>{};const v=LN(h,m),b=[fetch(v).then(y=>{const S=y.headers,w={};for(const A of S.entries())w[A[0]]=A[1];return y.body!=null?{response:new zd({headers:w,reason:y.statusText,statusCode:y.status,body:y.body})}:y.blob().then(A=>({response:new zd({headers:w,reason:y.statusText,statusCode:y.status,body:A})}))}),Wde(i)];return r&&b.push(new Promise((y,S)=>{const w=()=>{const C=zN(r);S(C)};if(typeof r.addEventListener=="function"){const C=r;C.addEventListener("abort",w,{once:!0}),g=()=>C.removeEventListener("abort",w)}else r.onabort=w})),Promise.race(b).finally(g)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}}function zN(e){const t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){const i=new Error("Request aborted");return i.name="AbortError",i.cause=t,i}const n=new Error(String(t));return n.name="AbortError",n}const r=new Error("Request aborted");return r.name="AbortError",r}const Jde=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):Qde(e):Yde(e);async function Qde(e){const t=await Xde(e),r=kb(t);return new Uint8Array(r)}async function Yde(e){const t=[],r=e.getReader();let n=!1,i=0;for(;!n;){const{done:s,value:l}=await r.read();l&&(t.push(l),i+=l.length),n=s}const o=new Uint8Array(i);let a=0;for(const s of t)o.set(s,a),a+=s.length;return o}function Xde(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const i=n.result??"",o=i.indexOf(","),a=o>-1?o+1:i.length;t(i.substring(a))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}const N5={},SS={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),N5[e]=t,SS[t]=e}function Zde(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=e.slice(r,r+2).toLowerCase();if(n in SS)t[r/2]=SS[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function Tu(e){let t="";for(let r=0;r<e.byteLength;r++)t+=N5[e[r]];return t}const wS=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Au.mutate(e);if(!e)return Au.mutate(new Uint8Array);const r=t.streamCollector(e);return Au.mutate(await r)},o0=e=>typeof e=="function"?e():e,D5=(e,t,r,n,i)=>({name:t,namespace:e,traits:r,input:n,output:i}),efe=e=>(t,r)=>async n=>{const{response:i}=await t(n),{operationSchema:o}=gf(r),[,a,s,l,c,d]=o??[];try{const f=await e.protocol.deserializeResponse(D5(a,s,l,c,d),{...e,...r},i);return{response:i,output:f}}catch(f){if(Object.defineProperty(f,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in f)){const h="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{f.message+=`
|
|
52
|
+
`+h}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(h):r.logger?.warn?.(h)}typeof f.$responseBodyText<"u"&&f.$response&&(f.$response.body=f.$responseBodyText);try{if(zd.isInstance(i)){const{headers:p={}}=i,m=Object.entries(p);f.$metadata={httpStatusCode:i.statusCode,requestId:_y(/^x-[\w-]+-request-?id$/,m),extendedRequestId:_y(/^x-[\w-]+-id-2$/,m),cfId:_y(/^x-[\w-]+-cf-id$/,m)}}}catch{}}throw f}},_y=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1];function tfe(e){const t={};if(e=e.replace(/^\?/,""),e)for(const r of e.split("&")){let[n,i=null]=r.split("=");n=decodeURIComponent(n),i&&(i=decodeURIComponent(i)),n in t?Array.isArray(t[n])?t[n].push(i):t[n]=[t[n],i]:t[n]=i}return t}const Bd=e=>{if(typeof e=="string")return Bd(new URL(e));const{hostname:t,pathname:r,port:n,protocol:i,search:o}=e;let a;return o&&(a=tfe(o)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:a}},rfe=e=>{if(typeof e=="object"){if("url"in e){const t=Bd(e.url);if(e.headers){t.headers={};for(const r in e.headers)t.headers[r.toLowerCase()]=e.headers[r].join(", ")}return t}return e}return Bd(e)},nfe=e=>(t,r)=>async n=>{const{operationSchema:i}=gf(r),[,o,a,s,l,c]=i??[],d=r.endpointV2?async()=>rfe(r.endpointV2):e.endpoint,f=await e.protocol.serializeRequest(D5(o,a,s,l,c),n.input,{...e,...r,endpoint:d});return t({...n,request:f})},ife={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},ofe={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function afe(e){return{applyToStack:t=>{t.add(nfe(e),ofe),t.add(efe(e),ife),e.protocol.setSerdeContext(e)}}}const yy=[];function lh(e){if(typeof e=="object")return e;if(e=e|0,yy[e])return yy[e];const t={};let r=0;for(const n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>r++&1)===1&&(t[n]=1);return yy[e]=t}const jf={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},xy=[],Sy={};class Nn{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=Nn.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,r){this.ref=t,this.memberName=r;const n=[];let i=t,o=t;for(this._isMemberSchema=!1;wy(i);)n.push(i[1]),i=i[0],o=o0(i),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let a=n.length-1;a>=0;--a){const s=n[a];Object.assign(this.memberTraits,lh(s))}}else this.memberTraits=0;if(o instanceof Nn){const a=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},a,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??o.memberName;return}if(this.schema=o0(o),sfe(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(o),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const r=this.prototype.isPrototypeOf(t);return!r&&typeof t=="object"&&t!==null?t.symbol===this.symbol:r}static of(t){const r=typeof t=="function"||typeof t=="object"&&t!==null;if(typeof t=="number"){if(xy[t])return xy[t]}else if(typeof t=="string"){if(Sy[t])return Sy[t]}else if(r&&t[jf.ns])return t[jf.ns];const n=o0(t);if(n instanceof Nn)return n;if(wy(n)){const[o,a]=n;if(o instanceof Nn)return Object.assign(o.getMergedTraits(),lh(a)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}const i=new Nn(n);return r?t[jf.ns]=i:typeof n=="string"?Sy[n]=i:typeof n=="number"?xy[n]=i:i}getSchema(){const t=this.schema;return Array.isArray(t)&&t[0]===0?t[4]:t}getName(t=!1){const{name:r}=this;return!t&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const t=this.getSchema();if(typeof t!="object")return!1;const r=t[0];return r===3||r===-3||r===4}isUnionSchema(){const t=this.getSchema();return typeof t!="object"?!1:t[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return lh(this.memberTraits)}getOwnTraits(){return lh(this.traits)}getKeySchema(){const[t,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const n=this.getSchema(),i=t?15:n[4]??0;return qf([i,0],"key")}getValueSchema(){const t=this.getSchema(),[r,n,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],o=typeof t=="number"?63&t:t&&typeof t=="object"&&(n||i)?t[3+t[0]]:r?15:void 0;if(o!=null)return qf([o,0],n?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const r=this.getSchema();if(this.isStructSchema()&&r[4].includes(t)){const n=r[4].indexOf(t),i=r[5][n];return qf(wy(i)?i:[i,0],t)}if(this.isDocumentSchema())return qf([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[r,n]of this.structIterator())t[r]=n}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),r=t[4].length;let n=t[jf.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let i=0;i<r;++i){const o=t[4][i],a=qf([t[5][i],0],o);yield n[i]=[o,a]}t[jf.it]=n}}function qf(e,t){if(e instanceof Nn)return Object.assign(e,{memberName:t,_isMemberSchema:!0});const r=Nn;return new r(e,t)}const wy=e=>Array.isArray(e)&&e.length===2,sfe=e=>Array.isArray(e)&&e.length>=5;class Yi{namespace;schemas;exceptions;static registries=new Map;constructor(t,r=new Map,n=new Map){this.namespace=t,this.schemas=r,this.exceptions=n}static for(t){return Yi.registries.has(t)||Yi.registries.set(t,new Yi(t)),Yi.registries.get(t)}copyFrom(t){const{schemas:r,exceptions:n}=this;for(const[i,o]of t.schemas)r.has(i)||r.set(i,o);for(const[i,o]of t.exceptions)n.has(i)||n.set(i,o)}register(t,r){const n=this.normalizeShapeId(t);for(const i of[this,Yi.for(n.split("#")[0])])i.schemas.set(n,r)}getSchema(t){const r=this.normalizeShapeId(t);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(t,r){const n=t,i=n[1];for(const o of[this,Yi.for(i)])o.schemas.set(i+"#"+n[2],n),o.exceptions.set(n,r)}getErrorCtor(t){const r=t;return this.exceptions.has(r)?this.exceptions.get(r):Yi.for(r[1]).exceptions.get(r)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,r,n]=t,i=r+"#"+n;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){for(const r of this.schemas.values())if(t(r))return r}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const ES=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&gfe.warn(mfe(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},lfe=Math.ceil(2**127*(2-2**-23)),UN=e=>{const t=ES(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>lfe)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},ufe=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},BN=e=>F5(e,16),jN=e=>F5(e,8),F5=(e,t)=>{const r=ufe(e);if(r!==void 0&&cfe(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},cfe=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},dfe=e=>ES(typeof e=="string"?Cb(e):e),ffe=e=>UN(typeof e=="string"?Cb(e):e),hfe=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Cb=e=>{const t=e.match(hfe);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},av=e=>BN(typeof e=="string"?Cb(e):e),pfe=e=>jN(typeof e=="string"?Cb(e):e),mfe=e=>String(new TypeError(e).stack||e).split(`
|
|
53
|
+
`).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
|
|
54
|
+
`),gfe={warn:console.warn},vfe=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],f2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function bfe(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),a=e.getUTCMinutes(),s=e.getUTCSeconds(),l=i<10?`0${i}`:`${i}`,c=o<10?`0${o}`:`${o}`,d=a<10?`0${a}`:`${a}`,f=s<10?`0${s}`:`${s}`;return`${vfe[n]}, ${l} ${f2[r]} ${t} ${c}:${d}:${f} GMT`}const _fe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),yfe=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=_fe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,i,o,a,s,l,c,d]=t,f=av(vp(n)),h=Dl(i,"month",1,12),p=Dl(o,"day",1,31),m=a0(f,h,p,{hours:a,minutes:s,seconds:l,fractionalMilliseconds:c});return d.toUpperCase()!="Z"&&m.setTime(m.getTime()-Dfe(d)),m},xfe=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Sfe=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),wfe=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),I5=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=xfe.exec(e);if(t){const[r,n,i,o,a,s,l,c]=t;return a0(av(vp(o)),Ey(i),Dl(n,"day",1,31),{hours:a,minutes:s,seconds:l,fractionalMilliseconds:c})}if(t=Sfe.exec(e),t){const[r,n,i,o,a,s,l,c]=t;return Rfe(a0(kfe(o),Ey(i),Dl(n,"day",1,31),{hours:a,minutes:s,seconds:l,fractionalMilliseconds:c}))}if(t=wfe.exec(e),t){const[r,n,i,o,a,s,l,c]=t;return a0(av(vp(c)),Ey(n),Dl(i.trimLeft(),"day",1,31),{hours:o,minutes:a,seconds:s,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},Efe=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=dfe(e);else if(typeof e=="object"&&e.tag===1)t=e.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},a0=(e,t,r,n)=>{const i=t-1;return $fe(e,i,r),new Date(Date.UTC(e,i,r,Dl(n.hours,"hour",0,23),Dl(n.minutes,"minute",0,59),Dl(n.seconds,"seconds",0,60),Nfe(n.fractionalMilliseconds)))},kfe=e=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+av(vp(e));return r<t?r+100:r},Cfe=50*365*24*60*60*1e3,Rfe=e=>e.getTime()-new Date().getTime()>Cfe?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Ey=e=>{const t=f2.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Afe=[31,28,31,30,31,30,31,31,30,31,30,31],$fe=(e,t,r)=>{let n=Afe[t];if(t===1&&Tfe(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${f2[t]} in ${e}: ${r}`)},Tfe=e=>e%4===0&&(e%100!==0||e%400===0),Dl=(e,t,r,n)=>{const i=pfe(vp(e));if(i<r||i>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return i},Nfe=e=>e==null?0:ffe("0."+e)*1e3,Dfe=e=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const n=Number(e.substring(1,3)),i=Number(e.substring(4,6));return r*(n*60+i)*60*1e3},vp=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},qN=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ei=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),P5=()=>{if(qN)return qN();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,ei[e[0]]+ei[e[1]]+ei[e[2]]+ei[e[3]]+"-"+ei[e[4]]+ei[e[5]]+"-"+ei[e[6]]+ei[e[7]]+"-"+ei[e[8]]+ei[e[9]]+"-"+ei[e[10]]+ei[e[11]]+ei[e[12]]+ei[e[13]]+ei[e[14]]+ei[e[15]]},kl=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};kl.from=e=>e&&typeof e=="object"&&(e instanceof kl||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?kl(String(e)):kl(JSON.stringify(e));kl.fromObject=kl.from;const VN=/^-?\d*(\.\d+)?$/;class Ua{string;type;constructor(t,r){if(this.string=t,this.type=r,!VN.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const r=t;return Ua.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&VN.test(r.string)}}class Ffe{serdeContext;setSerdeContext(t){this.serdeContext=t}}class Ife extends Ffe{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=Yi.for(t.defaultNamespace);for(const r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return co}getResponseType(){return zd}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,r){if("url"in r){t.protocol=r.url.protocol,t.hostname=r.url.hostname,t.port=r.url.port?Number(r.url.port):void 0,t.path=r.url.pathname,t.fragment=r.url.hash||void 0,t.username=r.url.username||void 0,t.password=r.url.password||void 0,t.query||(t.query={});for(const[n,i]of r.url.searchParams.entries())t.query[n]=i;if(r.headers)for(const n in r.headers)t.headers[n]=r.headers[n].join(", ");return t}else{if(t.protocol=r.protocol,t.hostname=r.hostname,t.port=r.port?Number(r.port):void 0,t.path=r.path,t.query={...r.query},r.headers)for(const n in r.headers)t.headers[n]=r.headers[n];return t}}setHostPrefix(t,r,n){if(this.serdeContext?.disableHostPrefix)return;const i=Nn.of(r.input),o=lh(r.traits??{});if(o.endpoint){let a=o.endpoint?.[0];if(typeof a=="string"){for(const[s,l]of i.structIterator()){if(!l.getMergedTraits().hostLabel)continue;const c=n[s];if(typeof c!="string")throw new Error(`@smithy/core/schema - ${s} in input must be a string as hostLabel.`);a=a.replace(`{${s}}`,c)}t.hostname=a+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await ih(async()=>{const{EventStreamSerde:r}=await import("./index-ClvBwV6J.js");return{EventStreamSerde:r}},__vite__mapDeps([5]));return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,r,n,i,o){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class Pfe extends Ife{async serializeRequest(t,r,n){const i=this.serializer,o={},a={},s=await n.endpoint(),l=Nn.of(t?.input),c=l.getSchema();let d;const f=r&&typeof r=="object"?r:{},h=new co({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:o,headers:a,body:void 0});if(s&&(this.updateServiceEndpoint(h,s),this.setHostPrefix(h,t,f)),f){const p=l.getEventStreamMember();if(p){if(f[p]){const m={};for(const[g,v]of l.structIterator())g!==p&&f[g]&&(i.write(v,f[g]),m[g]=i.flush());d=await this.serializeEventStream({eventStream:f[p],requestSchema:l,initialRequest:m})}}else i.write(c,f),d=i.flush()}return h.headers=Object.assign(h.headers,a),h.query=o,h.body=d,h.method="POST",h}async deserializeResponse(t,r,n){const i=this.deserializer,o=Nn.of(t.output),a={};if(n.statusCode>=300){const l=await wS(n.body,r);throw l.byteLength>0&&Object.assign(a,await i.read(15,l)),await this.handleError(t,r,n,a,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const l in n.headers){const c=n.headers[l];delete n.headers[l],n.headers[l.toLowerCase()]=c}const s=o.getEventStreamMember();if(s)a[s]=await this.deserializeEventStream({response:n,responseSchema:o,initialResponseContainer:a});else{const l=await wS(n.body,r);l.byteLength>0&&Object.assign(a,await i.read(o,l))}return a.$metadata=this.deserializeMetadata(n),a}}function O5(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:r,httpPrefixHeaders:n,httpHeader:i,httpQuery:o}=e.getMergedTraits();return(t.httpBindings?typeof n=="string"||i?6:o||r?5:void 0:void 0)??t.timestampFormat.default}function Ofe(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}class Mfe{authSchemes=new Map;constructor(t){for(const r in t){const n=t[r];n!==void 0&&this.authSchemes.set(r,n)}}getIdentityProvider(t){return this.authSchemes.get(t)}}class Lfe{async sign(t,r,n){return t}}const zfe=e=>function(r){return M5(r)&&r.expiration.getTime()-Date.now()<e},Ufe=3e5,Bfe=zfe(Ufe),M5=e=>e.expiration!==void 0,jfe=(e,t,r)=>{if(e===void 0)return;const n=typeof e!="function"?async()=>Promise.resolve(e):e;let i,o,a,s=!1;const l=async c=>{o||(o=n(c));try{i=await o,a=!0,s=!1}finally{o=void 0}return i};return t===void 0?async c=>((!a||c?.forceRefresh)&&(i=await l(c)),i):async c=>((!a||c?.forceRefresh)&&(i=await l(c)),s?i:r(i)?(t(i)&&await l(c),i):(s=!0,i))},qfe=void 0;function Vfe(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function Gfe(e){const t=wh(e.userAgentAppId??qfe),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{const n=await t();if(!Vfe(n)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof n!="string"?i?.warn("userAgentAppId must be a string or undefined."):n.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}class h2{nodes;root;conditions;results;constructor(t,r,n,i){this.nodes=t,this.root=r,this.conditions=n,this.results=i}static from(t,r,n,i){return new h2(t,r,n,i)}}class Kfe{capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){const n=this.hash(t);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const i=this.data.keys();let o=0;for(;;){const{value:a,done:s}=i.next();if(this.data.delete(a),s||++o>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(t){let r="";const{parameters:n}=this;if(n.length===0)return!1;for(const i of n){const o=String(t[i]??"");if(o.includes("|;"))return!1;r+=o+"|;"}return r}}class pa extends Error{constructor(t){super(t),this.name="EndpointError"}}const Hfe="endpoints";function sv(e){return typeof e!="object"||e==null?e:"ref"in e?`$${sv(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(sv).join(", ")})`:JSON.stringify(e,null,2)}const p2={},Wfe=(e,t)=>e===t;function Jfe(...e){for(const t of e)if(t!=null)return t}const Qfe=e=>{const t=e.split("."),r=[];for(const n of t){const i=n.indexOf("[");if(i!==-1){if(n.indexOf("]")!==n.length-1)throw new pa(`Path: '${e}' does not end with ']'`);const o=n.slice(i+1,-1);if(Number.isNaN(parseInt(o)))throw new pa(`Invalid array index: '${o}' in path: '${e}'`);i!==0&&r.push(n.slice(0,i)),r.push(o)}else r.push(n)}return r},L5=(e,t)=>Qfe(t).reduce((r,n)=>{if(typeof r!="object")throw new pa(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);if(Array.isArray(r)){const i=parseInt(n);return r[i<0?r.length+i:i]}return r[n]},e),Yfe=e=>e!=null,Xfe=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Rb=(e,t=!1)=>{if(!t)return Xfe.test(e);const r=e.split(".");for(const n of r)if(!Rb(n))return!1;return!0};function Zfe(e,t,r){return e?t:r}const ehe=e=>!e,the=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),z5=e=>the.test(e)||e.startsWith("[")&&e.endsWith("]"),ky={[pp.HTTP]:80,[pp.HTTPS]:443},rhe=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:h,port:p,protocol:m="",path:g="",query:v={}}=e,b=new URL(`${m}//${h}${p?`:${p}`:""}${g}`);return b.search=Object.entries(v).map(([y,S])=>`${y}=${S}`).join("&"),b}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const r=t.href,{host:n,hostname:i,pathname:o,protocol:a,search:s}=t;if(s)return null;const l=a.slice(0,-1);if(!Object.values(pp).includes(l))return null;const c=z5(i),d=r.includes(`${n}:${ky[l]}`)||typeof e=="string"&&e.includes(`${n}:${ky[l]}`),f=`${n}${d?`:${ky[l]}`:""}`;return{scheme:l,authority:f,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:c}};function nhe(e,t,r){if(r===1)return[e];if(e==="")return[""];const n=e.split(t);return r===0?n:n.slice(0,r-1).concat(n.slice(1).join(t))}const ihe=(e,t)=>e===t,ohe=(e,t,r,n)=>e==null||t>=r||e.length<r||/[^\u0000-\u007f]/.test(e)?null:n?e.substring(e.length-r,e.length-t):e.substring(t,r),ahe=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),she={booleanEquals:Wfe,coalesce:Jfe,getAttr:L5,isSet:Yfe,isValidHostLabel:Rb,ite:Zfe,not:ehe,parseURL:rhe,split:nhe,stringEquals:ihe,substring:ohe,uriEncode:ahe},U5=(e,t)=>{const r=[],{referenceRecord:n,endpointParams:i}=t;let o=0;for(;o<e.length;){const a=e.indexOf("{",o);if(a===-1){r.push(e.slice(o));break}r.push(e.slice(o,a));const s=e.indexOf("}",a);if(s===-1){r.push(e.slice(a));break}e[a+1]==="{"&&e[s+1]==="}"&&(r.push(e.slice(a+1,s)),o=s+2);const l=e.substring(a+1,s);if(l.includes("#")){const[c,d]=l.split("#");r.push(L5(n[c]??i[c],d))}else r.push(n[l]??i[l]);o=s+1}return r.join("")},lhe=({ref:e},t)=>t.referenceRecord[e]??t.endpointParams[e],Ab=(e,t,r)=>{if(typeof e=="string")return U5(e,r);if(e.fn)return j5.callFunction(e,r);if(e.ref)return lhe(e,r);throw new pa(`'${t}': ${String(e)} is not a string, function or reference.`)},B5=({fn:e,argv:t},r)=>{const n=Array(t.length);for(let a=0;a<n.length;++a){const s=t[a];typeof s=="boolean"||typeof s=="number"?n[a]=s:n[a]=j5.evaluateExpression(s,"arg",r)}const i=e.indexOf(".");if(i!==-1){const s=p2[e.slice(0,i)]?.[e.slice(i+1)];if(typeof s=="function")return s(...n)}const o=she[e];if(typeof o=="function")return o(...n);throw new Error(`function ${e} not loaded in endpointFunctions.`)},j5={evaluateExpression:Ab,callFunction:B5},uhe=(e,t)=>{const{assign:r}=e;if(r&&r in t.referenceRecord)throw new pa(`'${r}' is already defined in Reference Record.`);const n=B5(e,t);t.logger?.debug?.(`${Hfe} evaluateCondition: ${sv(e)} = ${sv(n)}`);const i=n===""?!0:!!n;return r!=null?{result:i,toAssign:{name:r,value:n}}:{result:i}},che=(e,t)=>Object.entries(e??{}).reduce((r,[n,i])=>(r[n]=i.map(o=>{const a=Ab(o,"Header value entry",t);if(typeof a!="string")throw new pa(`Header '${n}' value '${a}' is not a string`);return a}),r),{}),q5=(e,t)=>Object.entries(e).reduce((r,[n,i])=>(r[n]=G5.getEndpointProperty(i,t),r),{}),V5=(e,t)=>{if(Array.isArray(e))return e.map(r=>V5(r,t));switch(typeof e){case"string":return U5(e,t);case"object":if(e===null)throw new pa(`Unexpected endpoint property: ${e}`);return G5.getEndpointProperties(e,t);case"boolean":return e;default:throw new pa(`Unexpected endpoint property type: ${typeof e}`)}},G5={getEndpointProperty:V5,getEndpointProperties:q5},dhe=(e,t)=>{const r=Ab(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new pa(`Endpoint URL must be a string, got ${typeof r}`)},Cy=1e8,fhe=(e,t)=>{const{nodes:r,root:n,results:i,conditions:o}=e;let a=n;const s={},l={referenceRecord:s,endpointParams:t.endpointParams,logger:t.logger};for(;a!==1&&a!==-1&&a<Cy;){const c=3*(Math.abs(a)-1),[d,f,h]=[r[c],r[c+1],r[c+2]],[p,m,g]=o[d],v=uhe({fn:p,assign:g,argv:m},l);if(v.toAssign){const{name:b,value:y}=v.toAssign;s[b]=y}a=a>=0===v.result?f:h}if(a>=Cy){const c=i[a-Cy];if(c[0]===-1){const[,p]=c;throw new pa(Ab(p,"Error",l))}const[d,f,h]=c;return{url:dhe(d,l),properties:q5(f,l),headers:che(h??{},l)}}throw new pa("No matching endpoint.")},K5=(e,t=!1)=>{if(t){for(const r of e.split("."))if(!K5(r))return!1;return!0}return!(!Rb(e)||e.length<3||e.length>63||e!==e.toLowerCase()||z5(e))},GN=":",hhe="/",phe=e=>{const t=e.split(GN);if(t.length<6)return null;const[r,n,i,o,a,...s]=t;if(r!=="arn"||n===""||i===""||s.join(GN)==="")return null;const l=s.map(c=>c.split(hhe)).flat();return{partition:n,service:i,region:o,accountId:a,resourceId:l}},mhe=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],ghe={partitions:mhe};let vhe=ghe;const bhe=e=>{const{partitions:t}=vhe;for(const n of t){const{regions:i,outputs:o}=n;for(const[a,s]of Object.entries(i))if(a===e)return{...o,...s}}for(const n of t){const{regionRegex:i,outputs:o}=n;if(new RegExp(i).test(e))return{...o}}const r=t.find(n=>n.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},H5={isVirtualHostableS3Bucket:K5,parseArn:phe,partition:bhe};p2.aws=H5;function _he(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}function fs(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}var jl;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(jl||(jl={}));const kh=3,yhe=jl.STANDARD,xhe=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],She=["TimeoutError","RequestTimeout","RequestTimeoutException"],whe=[500,502,503,504],Ehe=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],khe=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Che=e=>e?.$retryable!==void 0,Rhe=e=>e.$metadata?.clockSkewCorrected,Ahe=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},W5=e=>e.$metadata?.httpStatusCode===429||xhe.includes(e.name)||e.$retryable?.throttling==!0,m2=(e,t=0)=>Che(e)||Rhe(e)||She.includes(e.name)||Ehe.includes(e?.code||"")||khe.includes(e?.code||"")||whe.includes(e.$metadata?.httpStatusCode||0)||Ahe(e)||The(e)||e.cause!==void 0&&t<=10&&m2(e.cause,t+1),$he=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!m2(e)}return!1};function The(e){return e.code==="ERR_HTTP2_STREAM_ERROR"&&e.message.includes("NGHTTP2_REFUSED_STREAM")}class g2{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(t){let r;this.updateMeasuredRate();const n=t;if(n?.errorType==="THROTTLING"||W5(n?.error??t)){const a=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=a,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(a),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const o=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(o)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.availableTokens){const r=(t-this.availableTokens)/this.fillRate*1e3;await new Promise(n=>g2.setTimeoutFn(n,r))}this.availableTokens=this.availableTokens-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const r=(t-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+r),this.lastTimestamp=t}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}}const J5=20*1e3,KN=500,Nhe=1,Dhe="amz-sdk-invocation-id",Fhe="amz-sdk-request";var Ihe={};class di{static v2026=typeof process<"u"&&Ihe?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return di.v2026?50:100}static throttlingDelay(){return di.v2026?1e3:500}static cost(){return di.v2026?14:5}static throttlingCost(){return di.v2026?5:10}static modifiedCostType(){return di.v2026?"THROTTLING":"TRANSIENT"}}class Phe{x=di.delay();computeNextBackoffDelay(t){const i=Math.random()*Math.min(this.x*2**t,J5);return Math.floor(i)}setDelayBase(t){this.x=t}}class HN{delay;count;cost;longPoll;constructor(t,r,n,i){this.delay=t,this.count=r,this.cost=n,this.longPoll=i}getRetryCount(){return this.count}getRetryDelay(){return Math.min(J5,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}class kS{mode=jl.STANDARD;capacity=KN;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(t){typeof t=="number"?this.maxAttemptsProvider=async()=>t:typeof t=="function"?this.maxAttemptsProvider=t:t&&typeof t=="object"&&(this.maxAttemptsProvider=async()=>t.maxAttempts,this.baseDelay=t.baseDelay,this.retryBackoffStrategy=t.backoff),this.maxAttemptsProvider??=async()=>kh,this.baseDelay??=di.delay(),this.retryBackoffStrategy??=new Phe}async acquireInitialRetryToken(t){return new HN(di.delay(),0,void 0,di.v2026&&t.includes(":longpoll"))}async refreshRetryTokenForRetry(t,r){const n=await this.getMaxAttempts(),i=this.shouldRetry(t,r,n);if(i||t.isLongPoll?.()){const o=r.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?di.throttlingDelay():this.baseDelay);const a=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount());let s=a;if(r.retryAfterHint instanceof Date&&(s=Math.max(a,Math.min(r.retryAfterHint.getTime()-Date.now(),a+5e3))),i){const l=this.getCapacityCost(o);return this.capacity-=l,new HN(s,t.getRetryCount()+1,l,t.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:di.v2026?s:0})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.min(KN,this.capacity+(t.getRetryCost()??Nhe))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${kh}`),kh}}shouldRetry(t,r,n){return t.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t===di.modifiedCostType()?di.throttlingCost():di.cost()}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}async maxAttempts(){return this.maxAttemptsProvider()}}class Ohe{mode=jl.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(t,r){const{rateLimiter:n}=r??{};this.rateLimiter=n??new g2,this.standardRetryStrategy=r?new kS({maxAttempts:typeof t=="number"?t:3,...r}):new kS(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(t,r)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}const Mhe=/\d{12}\.ddb/;async function Lhe(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&fs(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const o=await t.retryStrategy();if(typeof o.mode=="string")switch(o.mode){case jl.ADAPTIVE:fs(e,"RETRY_MODE_ADAPTIVE","F");break;case jl.STANDARD:fs(e,"RETRY_MODE_STANDARD","E");break}}if(typeof t.accountIdEndpointMode=="function"){const o=e.endpointV2;switch(String(o?.url?.hostname).match(Mhe)&&fs(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":fs(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":fs(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":fs(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const o=i;o.accountId&&fs(e,"RESOLVED_ACCOUNT_ID","T");for(const[a,s]of Object.entries(o.$source??{}))fs(e,a,s)}}const WN="user-agent",Ry="x-amz-user-agent",JN=" ",Ay="/",zhe=/[^!$%&'*+\-.^_`|~\w]/g,Uhe=/[^!$%&'*+\-.^_`|~\w#]/g,QN="-",Bhe=1024;function jhe(e){let t="";for(const r in e){const n=e[r];if(t.length+n.length+1<=Bhe){t.length?t+=","+n:t+=n;continue}break}return t}const qhe=e=>(t,r)=>async n=>{const{request:i}=n;if(!co.isInstance(i))return t(n);const{headers:o}=i,a=r?.userAgent?.map(ig)||[],s=(await e.defaultUserAgentProvider()).map(ig);await Lhe(r,e,n);const l=r;s.push(`m/${jhe(Object.assign({},r.__smithy_context?.features,l.__aws_sdk_context?.features))}`);const c=e?.customUserAgent?.map(ig)||[],d=await e.userAgentAppId();d&&s.push(ig(["app",`${d}`]));const f=[].concat([...s,...a,...c]).join(JN),h=[...s.filter(p=>p.startsWith("aws-sdk-")),...c].join(JN);return e.runtime!=="browser"?(h&&(o[Ry]=o[Ry]?`${o[WN]} ${h}`:h),o[WN]=f):o[Ry]=f,t({...n,request:i})},ig=e=>{const t=e[0].split(Ay).map(a=>a.replace(zhe,QN)).join(Ay),r=e[1]?.replace(Uhe,QN),n=t.indexOf(Ay),i=t.substring(0,n);let o=t.substring(n+1);return i==="api"&&(o=o.toLowerCase()),[i,o,r].filter(a=>a&&a.length>0).reduce((a,s,l)=>{switch(l){case 0:return s;case 1:return`${a}/${s}`;default:return`${a}#${s}`}},"")},Vhe={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Ghe=e=>({applyToStack:t=>{t.add(qhe(e),Vhe)}}),Khe=!1,Hhe=!1,YN=new Set,Whe=(e,t=Rb)=>{if(!YN.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else YN.add(e)},Q5=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),Jhe=e=>Q5(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Qhe=e=>{const{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const n=typeof t=="function"?await t():t,i=Jhe(n);return Whe(i),i},useFipsEndpoint:async()=>{const n=typeof t=="string"?t:await t();return Q5(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},XN="content-length";function Yhe(e){return t=>async r=>{const n=r.request;if(co.isInstance(n)){const{body:i,headers:o}=n;if(i&&Object.keys(o).map(a=>a.toLowerCase()).indexOf(XN)===-1)try{const a=e(i);n.headers={...n.headers,[XN]:String(a)}}catch{}}return t({...r,request:n})}}const Xhe={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Zhe=e=>({applyToStack:t=>{t.add(Yhe(e.bodyLengthChecker),Xhe)}}),epe=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),ope(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!ipe(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},tpe=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,rpe=/(\d+\.){3}\d+/,npe=/\.\./,ipe=e=>tpe.test(e)&&!rpe.test(e)&&!npe.test(e),ope=e=>{const[t,r,n,,,i]=e.split(":"),o=t==="arn"&&e.split(":").length>=6,a=!!(o&&r&&n&&i);if(o&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},ape=(e,t,r,n=!1)=>{const i=async()=>{let o;return n?o=r.clientContextParams?.[e]??r[e]??r[t]:o=r[e]??r[t],typeof o=="function"?o():o};return e==="credentialScope"||t==="CredentialScope"?async()=>{const o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.credentialScope??o?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.accountId??o?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const o=await i();if(o&&typeof o=="object"){if("url"in o)return o.url.href;if("hostname"in o){const{protocol:a,hostname:s,port:l,path:c}=o;return`${a}//${s}${l?":"+l:""}${c}`}}return o}:i},Y5=async e=>{},X5=e=>{if(typeof e=="object"){if("url"in e){const t=Bd(e.url);if(e.headers){t.headers={};for(const[r,n]of Object.entries(e.headers))t.headers[r.toLowerCase()]=n.join(", ")}return t}return e}return Bd(e)},spe=async(e,t,r,n)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await Y5(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(X5(a)),r.isCustomEndpoint=!0)}const i=await lpe(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");const o=r.endpointProvider(i,n);if(r.isCustomEndpoint&&r.endpoint){const a=await r.endpoint();if(a?.headers){o.headers??={};for(const[s,l]of Object.entries(a.headers))o.headers[s]=Array.isArray(l)?l:[l]}}return o},lpe=async(e,t,r)=>{const n={},i=t?.getEndpointParameterInstructions?.()||{};for(const[o,a]of Object.entries(i))switch(a.type){case"staticContextParams":n[o]=a.value;break;case"contextParams":n[o]=e[a.name];break;case"clientContextParams":case"builtInParams":n[o]=await ape(a.name,o,r,a.type!=="builtInParams")();break;case"operationContextParams":n[o]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(i).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await epe(n),n},upe=({config:e,instructions:t})=>(r,n)=>async i=>{e.isCustomEndpoint&&Ofe(n,"ENDPOINT_OVERRIDE","N");const o=await spe(i.input,{getEndpointParameterInstructions(){return t}},{...e},n);n.endpointV2=o,n.authSchemes=o.properties?.authSchemes;const a=n.authSchemes?.[0];if(a){n.signing_region=a.signingRegion,n.signing_service=a.signingName;const l=gf(n)?.selectedHttpAuthScheme?.httpAuthOption;l&&(l.signingProperties=Object.assign(l.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...i})},cpe={name:"serializerMiddleware"},dpe={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:cpe.name},fpe=(e,t)=>({applyToStack:r=>{r.addRelativeTo(upe({config:e,instructions:t}),dpe)}}),hpe=e=>{const t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:i}=e,o=r!=null?async()=>X5(await Ts(r)()):void 0,s=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:Ts(n??!1),useFipsEndpoint:Ts(i??!1)});let l;return s.serviceConfiguredEndpoint=async()=>(e.serviceId&&!l&&(l=Y5(e.serviceId)),l),s},ppe=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),mpe=e=>{const{retryStrategy:t,retryMode:r}=e,n=Ts(e.maxAttempts??kh);let i=t?Promise.resolve(t):void 0;const o=async()=>await Ts(r)()===jl.ADAPTIVE?new Ohe(n):new kS(n);return Object.assign(e,{maxAttempts:n,retryStrategy:()=>i??=o()})},au=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const n of t)r.push(n);return r},sl=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,lv=()=>{let e=[],t=[],r=!1;const n=new Set,i=f=>f.sort((h,p)=>ZN[p.step]-ZN[h.step]||e3[p.priority||"normal"]-e3[h.priority||"normal"]),o=f=>{let h=!1;const p=m=>{const g=au(m.name,m.aliases);if(g.includes(f)){h=!0;for(const v of g)n.delete(v);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},a=f=>{let h=!1;const p=m=>{if(m.middleware===f){h=!0;for(const g of au(m.name,m.aliases))n.delete(g);return!1}return!0};return e=e.filter(p),t=t.filter(p),h},s=f=>(e.forEach(h=>{f.add(h.middleware,{...h})}),t.forEach(h=>{f.addRelativeTo(h.middleware,{...h})}),f.identifyOnResolve?.(d.identifyOnResolve()),f),l=f=>{const h=[];return f.before.forEach(p=>{p.before.length===0&&p.after.length===0?h.push(p):h.push(...l(p))}),h.push(f),f.after.reverse().forEach(p=>{p.before.length===0&&p.after.length===0?h.push(p):h.push(...l(p))}),h},c=(f=!1)=>{const h=[],p=[],m={};return e.forEach(v=>{const b={...v,before:[],after:[]};for(const y of au(b.name,b.aliases))m[y]=b;h.push(b)}),t.forEach(v=>{const b={...v,before:[],after:[]};for(const y of au(b.name,b.aliases))m[y]=b;p.push(b)}),p.forEach(v=>{if(v.toMiddleware){const b=m[v.toMiddleware];if(b===void 0){if(f)return;throw new Error(`${v.toMiddleware} is not found when adding ${sl(v.name,v.aliases)} middleware ${v.relation} ${v.toMiddleware}`)}v.relation==="after"&&b.after.push(v),v.relation==="before"&&b.before.push(v)}}),i(h).map(l).reduce((v,b)=>(v.push(...b),v),[])},d={add:(f,h={})=>{const{name:p,override:m,aliases:g}=h,v={step:"initialize",priority:"normal",middleware:f,...h},b=au(p,g);if(b.length>0){if(b.some(y=>n.has(y))){if(!m)throw new Error(`Duplicate middleware name '${sl(p,g)}'`);for(const y of b){const S=e.findIndex(C=>C.name===y||C.aliases?.some(A=>A===y));if(S===-1)continue;const w=e[S];if(w.step!==v.step||v.priority!==w.priority)throw new Error(`"${sl(w.name,w.aliases)}" middleware with ${w.priority} priority in ${w.step} step cannot be overridden by "${sl(p,g)}" middleware with ${v.priority} priority in ${v.step} step.`);e.splice(S,1)}}for(const y of b)n.add(y)}e.push(v)},addRelativeTo:(f,h)=>{const{name:p,override:m,aliases:g}=h,v={middleware:f,...h},b=au(p,g);if(b.length>0){if(b.some(y=>n.has(y))){if(!m)throw new Error(`Duplicate middleware name '${sl(p,g)}'`);for(const y of b){const S=t.findIndex(C=>C.name===y||C.aliases?.some(A=>A===y));if(S===-1)continue;const w=t[S];if(w.toMiddleware!==v.toMiddleware||w.relation!==v.relation)throw new Error(`"${sl(w.name,w.aliases)}" middleware ${w.relation} "${w.toMiddleware}" middleware cannot be overridden by "${sl(p,g)}" middleware ${v.relation} "${v.toMiddleware}" middleware.`);t.splice(S,1)}}for(const y of b)n.add(y)}t.push(v)},clone:()=>s(lv()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?o(f):a(f),removeByTag:f=>{let h=!1;const p=m=>{const{tags:g,name:v,aliases:b}=m;if(g&&g.includes(f)){const y=au(v,b);for(const S of y)n.delete(S);return h=!0,!1}return!0};return e=e.filter(p),t=t.filter(p),h},concat:f=>{const h=s(lv());return h.use(f),h.identifyOnResolve(r||h.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),h},applyToStack:s,identify:()=>c(!0).map(f=>{const h=f.step??f.relation+" "+f.toMiddleware;return sl(f.name,f.aliases)+" - "+h}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,h)=>{for(const p of c().map(m=>m.middleware).reverse())f=p(f,h);return r&&console.log(d.identify()),f}};return d},ZN={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},e3={high:3,normal:2,low:1};class gpe{config;middlewareStack=lv();initConfig;handlers;constructor(t){this.config=t;const{protocol:r,protocolSettings:n}=t;n&&typeof r=="function"&&(t.protocol=new r(n))}send(t,r,n){const i=typeof r!="function"?r:void 0,o=typeof r=="function"?r:n,a=i===void 0&&this.config.cacheMiddleware===!0;let s;if(a){this.handlers||(this.handlers=new WeakMap);const l=this.handlers;l.has(t.constructor)?s=l.get(t.constructor):(s=t.resolveMiddleware(this.middlewareStack,this.config,i),l.set(t.constructor,s))}else delete this.handlers,s=t.resolveMiddleware(this.middlewareStack,this.config,i);if(o)s(t).then(l=>o(null,l.output),l=>o(l)).catch(()=>{});else return s(t).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const $y="***SensitiveInformation***";function CS(e,t){if(t==null)return t;const r=Nn.of(e);if(r.getMergedTraits().sensitive)return $y;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return $y}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return $y}else if(r.isStructSchema()&&typeof t=="object"){const n=t,i={};for(const[o,a]of r.structIterator())n[o]!=null&&(i[o]=CS(a,n[o]));return i}return t}let Z5=class{middlewareStack=lv();schema;static classBuilder(){return new vpe}resolveMiddlewareWithContext(t,r,n,{middlewareFn:i,clientName:o,commandName:a,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,smithyContext:c,additionalContext:d,CommandCtor:f}){for(const b of i.bind(this)(f,t,r,n))this.middlewareStack.use(b);const h=t.concat(this.middlewareStack),{logger:p}=r,m={logger:p,clientName:o,commandName:a,inputFilterSensitiveLog:s,outputFilterSensitiveLog:l,[xS]:{commandInstance:this,...c},...d},{requestHandler:g}=r;let v=n??{};return c.eventStream&&(v={isEventStream:!0,...v}),h.resolve(b=>g.handle(b.request,v),m)}};class vpe{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,r,n={}){return this._smithyContext={service:t,operation:r,...n},this}c(t={}){return this._additionalContext=t,this}n(t,r){return this._clientName=t,this._commandName=r,this}f(t=n=>n,r=n=>n){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=r,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let r;return r=class extends Z5{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[n]){super(),this.input=n??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(n,i,o){const a=t._operationSchema,s=a?.[4]??a?.input,l=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(n,i,o,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(a?CS.bind(null,s):c=>c),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(a?CS.bind(null,l):c=>c),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class rd extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const r=t;return rd.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const r=t;return this===rd?rd.isInstance(t):rd.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}}const t3=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,i])=>{(e[n]==null||e[n]==="")&&(e[n]=i)});const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},bpe=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},ez=Object.values(mp),_pe=e=>{const t=[];for(const r in mp){const n=mp[r];e[n]!==void 0&&t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}for(const[r,n]of Object.entries(e.checksumAlgorithms??{}))t.push({algorithmId:()=>r,checksumConstructor:()=>n});return{addChecksumAlgorithm(r){e.checksumAlgorithms=e.checksumAlgorithms??{};const n=r.algorithmId(),i=r.checksumConstructor();ez.includes(n)?e.checksumAlgorithms[n.toUpperCase()]=i:e.checksumAlgorithms[n]=i,t.push(r)},checksumAlgorithms(){return t}}},ype=e=>{const t={};return e.checksumAlgorithms().forEach(r=>{const n=r.algorithmId();ez.includes(n)&&(t[n]=r.checksumConstructor())}),t},xpe=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),Spe=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},wpe=e=>Object.assign(_pe(e),xpe(e)),Epe=e=>Object.assign(ype(e),Spe(e));class tz{trace(){}debug(){}info(){}warn(){}error(){}}const kpe=e=>e?.body instanceof ReadableStream;function Cpe(e,t){if(zd.isInstance(e))for(const r of Object.keys(e.headers)){const n=r.toLowerCase();if(n==="retry-after"){const i=e.headers[r];let o=NaN;if(i.endsWith("GMT"))try{o=(I5(i).getTime()-Date.now())/1e3}catch(a){t?.trace?.("Failed to parse retry-after header"),t?.trace?.(a)}else i.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?o=Number(i.match(/ GMT, ([\d.]+)$/)?.[1]):i.match(/^((\d+)|(\d+\.\d+))$/)?o=Number(i):Date.parse(i)>=Date.now()&&(o=(Date.parse(i)-Date.now())/1e3);return isNaN(o)?void 0:new Date(Date.now()+o*1e3)}else if(n==="x-amz-retry-after"){const i=e.headers[r],o=Number(i);if(isNaN(o)){t?.trace?.(`Failed to parse x-amz-retry-after=${i}`);return}return new Date(Date.now()+o)}}}const Rpe=e=>(t,r)=>async n=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(Ape(i)){i=i;let a=await i.acquireInitialRetryToken((r.partition_id??"")+(r.__retryLongPoll?":longpoll":"")),s=new Error,l=0,c=0;const{request:d}=n,f=co.isInstance(d);for(f&&(d.headers[Dhe]=P5());;)try{f&&(d.headers[Fhe]=`attempt=${l+1}; max=${o}`);const{response:h,output:p}=await t(n);return i.recordSuccess(a),p.$metadata.attempts=l+1,p.$metadata.totalRetryDelay=c,{response:h,output:p}}catch(h){const p=$pe(h,e.logger);if(s=ppe(h),f&&kpe(d))throw(r.logger instanceof tz?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{a=await i.refreshRetryTokenForRetry(a,p)}catch(g){throw typeof g.$backoff=="number"&&await r3(g.$backoff),s.$metadata||(s.$metadata={}),s.$metadata.attempts=l+1,s.$metadata.totalRetryDelay=c,s}l=a.getRetryCount();const m=a.getRetryDelay();c+=m,await r3(m)}}else return i=i,i?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,n)},r3=e=>new Promise(t=>setTimeout(t,e)),Ape=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",$pe=(e,t)=>{const r={error:e,errorType:Tpe(e)},n=Cpe(e.$response,t);return n&&(r.retryAfterHint=n),r},Tpe=e=>W5(e)?"THROTTLING":m2(e)?"TRANSIENT":$he(e)?"SERVER_ERROR":"CLIENT_ERROR",Npe={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Dpe=e=>({applyToStack:t=>{t.add(Rpe(e),Npe)}}),n3=e=>zd.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,rz=e=>new Date(Date.now()+e),Fpe=(e,t)=>Math.abs(rz(t).getTime()-e)>=3e5,i3=(e,t)=>{const r=Date.parse(e);return Fpe(r,t)?r-Date.now():t},Ch=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},Ipe=async e=>{const t=Ch("context",e.context),r=Ch("config",e.config),n=t.endpointV2?.properties?.authSchemes?.[0],o=await Ch("signer",r.signer)(n),a=e?.signingRegion,s=e?.signingRegionSet,l=e?.signingName;return{config:r,signer:o,signingRegion:a,signingRegionSet:s,signingName:l}};class Ppe{async sign(t,r,n){if(!co.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await Ipe(n),{config:o,signer:a}=i;let{signingRegion:s,signingName:l}=i;const c=n.context;if(c?.authSchemes?.length??!1){const[f,h]=c.authSchemes;f?.name==="sigv4a"&&h?.name==="sigv4"&&(s=h?.signingRegion??s,l=h?.signingName??l)}return await a.sign(t,{signingDate:rz(o.systemClockOffset),signingRegion:s,signingService:l})}errorHandler(t){return r=>{const n=r.ServerTime??n3(r.$response);if(n){const i=Ch("config",t.config),o=i.systemClockOffset;i.systemClockOffset=i3(n,i.systemClockOffset),i.systemClockOffset!==o&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){const n=n3(t);if(n){const i=Ch("config",r.config);i.systemClockOffset=i3(n,i.systemClockOffset)}}}const Ope=(e,t,r)=>{let n,i,o,a=!1;const s=async()=>{i||(i=e());try{n=await i,o=!0,a=!1}finally{i=void 0}return n};return async l=>((!o||l?.forceRefresh)&&(n=await s()),n)},Mpe="X-Amz-Algorithm",Lpe="X-Amz-Credential",nz="X-Amz-Date",zpe="X-Amz-SignedHeaders",Upe="X-Amz-Expires",iz="X-Amz-Signature",oz="X-Amz-Security-Token",az="authorization",sz=nz.toLowerCase(),Bpe="date",jpe=[az,sz,Bpe],qpe=iz.toLowerCase(),RS="x-amz-content-sha256",Vpe=oz.toLowerCase(),Gpe={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Kpe=/^proxy-/,Hpe=/^sec-/,Ty="AWS4-HMAC-SHA256",Wpe="AWS4-HMAC-SHA256-PAYLOAD",Jpe="UNSIGNED-PAYLOAD",Qpe=50,lz="aws4_request",Ype=3600*24*7,og={},Ny=[],Dy=(e,t,r)=>`${e}/${t}/${r}/${lz}`,Xpe=async(e,t,r,n,i)=>{const o=await o3(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${n}:${i}:${Tu(o)}:${t.sessionToken}`;if(a in og)return og[a];for(Ny.push(a);Ny.length>Qpe;)delete og[Ny.shift()];let s=`AWS4${t.secretAccessKey}`;for(const l of[r,n,i,lz])s=await o3(e,s,l);return og[a]=s},o3=(e,t,r)=>{const n=new e(t);return n.update(gp(r)),n.digest()},a3=({headers:e},t,r)=>{const n={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const o=i.toLowerCase();(o in Gpe||t?.has(o)||Kpe.test(o)||Hpe.test(o))&&(!r||r&&!r.has(o))||(n[o]=e[i].trim().replace(/\s+/g," "))}return n},Zpe=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",Fy=async({headers:e,body:t},r)=>{for(const n of Object.keys(e))if(n.toLowerCase()===RS)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||Zpe(t)){const n=new r;return n.update(gp(t)),Tu(await n.digest())}return Jpe};class eme{format(t){const r=[];for(const o of Object.keys(t)){const a=Ud(o);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[o]))}const n=new Uint8Array(r.reduce((o,a)=>o+a.byteLength,0));let i=0;for(const o of r)n.set(o,i),i+=o.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const o=new DataView(new ArrayBuffer(3+t.value.byteLength));o.setUint8(0,6),o.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(o.buffer);return a.set(t.value,3),a;case"string":const s=Ud(t.value),l=new DataView(new ArrayBuffer(3+s.byteLength));l.setUint8(0,7),l.setUint16(1,s.byteLength,!1);const c=new Uint8Array(l.buffer);return c.set(s,3),c;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(v2.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!tme.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(Zde(t.value.replace(/\-/g,"")),1),f}}}var s3;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(s3||(s3={}));const tme=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class v2{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(t));n>-1&&i>0;n--,i/=256)r[n]=i;return t<0&&l3(r),new v2(r)}valueOf(){const t=this.bytes.slice(0),r=t[0]&128;return r&&l3(t),parseInt(Tu(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function l3(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const rme=(e,t)=>{e=e.toLowerCase();for(const r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},nme=(e,t={})=>{const{headers:r,query:n={}}=co.clone(e);for(const i of Object.keys(r)){const o=i.toLowerCase();(o.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(o)||t.hoistableHeaders?.has(o))&&(n[i]=r[i],delete r[i])}return{...e,headers:r,query:n}},u3=e=>{e=co.clone(e);for(const t of Object.keys(e.headers))jpe.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},ime=({query:e={}})=>{const t=[],r={};for(const n of Object.keys(e)){if(n.toLowerCase()===qpe)continue;const i=$u(n);t.push(i);const o=e[n];typeof o=="string"?r[i]=`${i}=${$u(o)}`:Array.isArray(o)&&(r[i]=o.slice(0).reduce((a,s)=>a.concat([`${i}=${$u(s)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},ome=e=>ame(e).toISOString().replace(/\.\d{3}Z$/,"Z"),ame=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class sme{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a=!0}){this.service=i,this.sha256=o,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=Ts(n),this.credentialProvider=Ts(r)}createCanonicalRequest(t,r,n){const i=Object.keys(r).sort();return`${t.method}
|
|
55
|
+
${this.getCanonicalPath(t)}
|
|
56
|
+
${ime(t)}
|
|
57
|
+
${i.map(o=>`${o}:${r[o]}`).join(`
|
|
58
|
+
`)}
|
|
59
|
+
|
|
60
|
+
${i.join(";")}
|
|
61
|
+
${n}`}async createStringToSign(t,r,n,i){const o=new this.sha256;o.update(gp(n));const a=await o.digest();return`${i}
|
|
62
|
+
${t}
|
|
63
|
+
${r}
|
|
64
|
+
${Tu(a)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const r=[];for(const o of t.split("/"))o?.length!==0&&o!=="."&&(o===".."?r.pop():r.push(o));const n=`${t?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&t?.endsWith("/")?"/":""}`;return $u(n).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const r=ome(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class c3 extends sme{headerFormatter=new eme;constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a=!0}){super({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:a})}async presign(t,r={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:o,unhoistableHeaders:a,signableHeaders:s,hoistableHeaders:l,signingRegion:c,signingService:d}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);const h=c??await this.regionProvider(),{longDate:p,shortDate:m}=this.formatDate(n);if(i>Ype)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const g=Dy(m,h,d??this.service),v=nme(u3(t),{unhoistableHeaders:a,hoistableHeaders:l});f.sessionToken&&(v.query[oz]=f.sessionToken),v.query[Mpe]=Ty,v.query[Lpe]=`${f.accessKeyId}/${g}`,v.query[nz]=p,v.query[Upe]=i.toString(10);const b=a3(v,o,s);return v.query[zpe]=this.getCanonicalHeaderList(b),v.query[iz]=await this.getSignature(p,g,this.getSigningKey(f,h,m,d),this.createCanonicalRequest(v,b,await Fy(t,this.sha256))),v}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:n=new Date,priorSignature:i,signingRegion:o,signingService:a,eventStreamCredentials:s}){const l=o??await this.regionProvider(),{shortDate:c,longDate:d}=this.formatDate(n),f=Dy(c,l,a??this.service),h=await Fy({headers:{},body:r},this.sha256),p=new this.sha256;p.update(t);const m=Tu(await p.digest()),g=[Wpe,d,f,i,m,h].join(`
|
|
65
|
+
`);return this.signString(g,{signingDate:n,signingRegion:l,signingService:a,eventStreamCredentials:s})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:i,priorSignature:t.priorSignature,eventStreamCredentials:o}).then(s=>({message:t.message,signature:s}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:i,eventStreamCredentials:o}={}){const a=o??await this.credentialProvider();this.validateResolvedCredentials(a);const s=n??await this.regionProvider(),{shortDate:l}=this.formatDate(r),c=new this.sha256(await this.getSigningKey(a,s,l,i));return c.update(gp(t)),Tu(await c.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:o,signingService:a}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const l=o??await this.regionProvider(),c=u3(t),{longDate:d,shortDate:f}=this.formatDate(r),h=Dy(f,l,a??this.service);c.headers[sz]=d,s.sessionToken&&(c.headers[Vpe]=s.sessionToken);const p=await Fy(c,this.sha256);!rme(RS,c.headers)&&this.applyChecksum&&(c.headers[RS]=p);const m=a3(c,i,n),g=await this.getSignature(d,h,this.getSigningKey(s,l,f,a),this.createCanonicalRequest(c,m,p));return c.headers[az]=`${Ty} Credential=${s.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(m)}, Signature=${g}`,c}async getSignature(t,r,n,i){const o=await this.createStringToSign(t,r,i,Ty),a=new this.sha256(await n);return a.update(gp(o)),Tu(await a.digest())}getSigningKey(t,r,n,i){return Xpe(this.sha256,t,n,r,i||this.service)}}const lme=e=>{let t=e.credentials,r=!!e.credentials,n;Object.defineProperty(e,"credentials",{set(c){c&&c!==t&&c!==n&&(r=!0),t=c;const d=ume(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=cme(e,d);if(r&&!f.attributed){const h=typeof t=="object"&&t!==null;n=async p=>{const g=await f(p);return h&&(!g.$source||Object.keys(g.$source).length===0)?_he(g,"CREDENTIALS_CODE","e"):g},n.memoized=f.memoized,n.configBound=f.configBound,n.attributed=!0}else n=f},get(){return n},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:a}=e;let s;return e.signer?s=wh(e.signer):e.regionInfoProvider?s=()=>wh(e.region)().then(async c=>[await e.regionInfoProvider(c,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},c]).then(([c,d])=>{const{signingRegion:f,signingService:h}=c;e.signingRegion=e.signingRegion||f||d,e.signingName=e.signingName||h||e.serviceId;const p={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},m=e.signerConstructor||c3;return new m(p)}):s=async c=>{c=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await wh(e.region)(),properties:{}},c);const d=c.signingRegion,f=c.signingName;e.signingRegion=e.signingRegion||d,e.signingName=e.signingName||f||e.serviceId;const h={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:i},p=e.signerConstructor||c3;return new p(h)},Object.assign(e,{systemClockOffset:o,signingEscapePath:i,signer:s})};function ume(e,{credentials:t,credentialDefaultProvider:r}){let n;return t?t?.memoized?n=t:n=jfe(t,Bfe,M5):r?n=wh(r(Object.assign({},e,{parentClientConfig:e}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function cme(e,t){if(t.configBound)return t;const r=async n=>t({...n,callerClientConfig:e});return r.memoized=t.memoized,r.configBound=!0,r}const dme=async(e,t,r)=>({operation:gf(t).operation,region:await Ts(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function fme(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Gt(e){return{schemeId:"smithy.api#noAuth"}}const hme=e=>{const t=[];switch(e.operation){case"AssociateSoftwareToken":{t.push(Gt());break}case"ChangePassword":{t.push(Gt());break}case"CompleteWebAuthnRegistration":{t.push(Gt());break}case"ConfirmDevice":{t.push(Gt());break}case"ConfirmForgotPassword":{t.push(Gt());break}case"ConfirmSignUp":{t.push(Gt());break}case"DeleteUser":{t.push(Gt());break}case"DeleteUserAttributes":{t.push(Gt());break}case"DeleteWebAuthnCredential":{t.push(Gt());break}case"ForgetDevice":{t.push(Gt());break}case"ForgotPassword":{t.push(Gt());break}case"GetDevice":{t.push(Gt());break}case"GetTokensFromRefreshToken":{t.push(Gt());break}case"GetUser":{t.push(Gt());break}case"GetUserAttributeVerificationCode":{t.push(Gt());break}case"GetUserAuthFactors":{t.push(Gt());break}case"GlobalSignOut":{t.push(Gt());break}case"InitiateAuth":{t.push(Gt());break}case"ListDevices":{t.push(Gt());break}case"ListWebAuthnCredentials":{t.push(Gt());break}case"ResendConfirmationCode":{t.push(Gt());break}case"RespondToAuthChallenge":{t.push(Gt());break}case"RevokeToken":{t.push(Gt());break}case"SetUserMFAPreference":{t.push(Gt());break}case"SetUserSettings":{t.push(Gt());break}case"SignUp":{t.push(Gt());break}case"StartWebAuthnRegistration":{t.push(Gt());break}case"UpdateAuthEventFeedback":{t.push(Gt());break}case"UpdateDeviceStatus":{t.push(Gt());break}case"UpdateUserAttributes":{t.push(Gt());break}case"VerifySoftwareToken":{t.push(Gt());break}case"VerifyUserAttribute":{t.push(Gt());break}default:t.push(fme(e))}return t},pme=e=>{const t=lme(e);return Object.assign(t,{authSchemePreference:Ts(e.authSchemePreference??[])})},mme=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),gme={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},vme="3.1033.0",bme={version:vme},_me=e=>new TextEncoder().encode(e);var yme=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:_me;function bp(e){return e instanceof Uint8Array?e:typeof e=="string"?yme(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function AS(e){return typeof e=="string"?e.length===0:e.byteLength===0}var uz={name:"SHA-256"},d3={name:"HMAC",hash:uz},xme=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Sme={};function s0(){return typeof window<"u"?window:typeof self<"u"?self:Sme}var wme=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!AS(t)){var r=bp(t),n=new Uint8Array(this.toHash.byteLength+r.byteLength);n.set(this.toHash,0),n.set(r,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return s0().crypto.subtle.sign(d3,r,t.toHash).then(function(n){return new Uint8Array(n)})}):AS(this.toHash)?Promise.resolve(xme):Promise.resolve().then(function(){return s0().crypto.subtle.digest(uz,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){var t=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,n){s0().crypto.subtle.importKey("raw",bp(t.secret),d3,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},e})();function Eme(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{c(n.next(d))}catch(f){a(f)}}function l(d){try{c(n.throw(d))}catch(f){a(f)}}function c(d){d.done?o(d.value):i(d.value).then(s,l)}c((n=n.apply(e,t||[])).next())})}function kme(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var mo=64,Cme=32,Rme=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ame=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],$me=Math.pow(2,53)-1,l0=(function(){function e(){this.state=Int32Array.from(Ame),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,n=t.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>$me)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=t[r++],n--,this.bufferLength===mo&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%mo>=mo-8){for(var i=this.bufferLength;i<mo;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<mo-8;i++)r.setUint8(i,0);r.setUint32(mo-8,Math.floor(t/4294967296),!0),r.setUint32(mo-4,t),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(Cme),i=0;i<8;i++)o[i*4]=this.state[i]>>>24&255,o[i*4+1]=this.state[i]>>>16&255,o[i*4+2]=this.state[i]>>>8&255,o[i*4+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,n=t.state,i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],c=n[5],d=n[6],f=n[7],h=0;h<mo;h++){if(h<16)this.temp[h]=(r[h*4]&255)<<24|(r[h*4+1]&255)<<16|(r[h*4+2]&255)<<8|r[h*4+3]&255;else{var p=this.temp[h-2],m=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10;p=this.temp[h-15];var g=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[h]=(m+this.temp[h-7]|0)+(g+this.temp[h-16]|0)}var v=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&c^~l&d)|0)+(f+(Rme[h]+this.temp[h]|0)|0)|0,b=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&o^i&a^o&a)|0;f=d,d=c,c=l,l=s+v|0,s=a,a=o,o=i,i=v+b|0}n[0]+=i,n[1]+=o,n[2]+=a,n[3]+=s,n[4]+=l,n[5]+=c,n[6]+=d,n[7]+=f},e})(),Tme=(function(){function e(t){this.secret=t,this.hash=new l0,this.reset()}return e.prototype.update=function(t){if(!(AS(t)||this.error))try{this.hash.update(bp(t))}catch(r){this.error=r}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return Eme(this,void 0,void 0,function(){return kme(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new l0,this.secret){this.outer=new l0;var t=Nme(this.secret),r=new Uint8Array(mo);r.set(t);for(var n=0;n<mo;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(var n=0;n<t.byteLength;n++)t[n]=0}},e})();function Nme(e){var t=bp(e);if(t.byteLength>mo){var r=new l0;r.update(t),t=r.digest()}var n=new Uint8Array(mo);return n.set(t),n}var Dme=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Fme(e){if(Ime(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return Pme(t)}return!1}function Ime(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function Pme(e){return e&&Dme.every(function(t){return typeof e[t]=="function"})}var Ome=(function(){function e(t){Fme(s0())?this.hash=new wme(t):this.hash=new Tme(t)}return e.prototype.update=function(t,r){this.hash.update(bp(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const Mme=({serviceId:e,clientVersion:t})=>async r=>{const n=typeof window<"u"?window.navigator:void 0,i=n?.userAgent??"",o=n?.userAgentData?.platform??f3.os(i)??"other",a=void 0,s=n?.userAgentData?.brands??[],l=s[s.length-1],c=l?.brand??f3.browser(i)??"unknown",d=l?.version??"unknown",f=[["aws-sdk-js",t],["ua","2.1"],[`os/${o}`,a],["lang/js"],["md/browser",`${c}_${d}`]];e&&f.push([`api/${e}`,t]);const h=await r?.userAgentAppId?.();return h&&f.push([`app/${h}`]),f},f3={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},Lme=e=>()=>Promise.reject(e),h3=typeof TextEncoder=="function"?new TextEncoder:null,zme=e=>{if(typeof e=="string"){if(h3)return h3.encode(e).byteLength;let t=e.length;for(let r=t-1;r>=0;r--){const n=e.charCodeAt(r);n>127&&n<=2047?t++:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&r--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},Ume=["in-region","cross-region","mobile","standard","legacy"],Bme=({defaultsMode:e}={})=>Ope(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(jme()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Ume.join(", ")}, got ${t}`)}}),jme=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:r,downlink:n}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(r)>100||Number(n)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1};class qme{queryCompat;errorRegistry;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,r){const n=r.getMemberSchemas(),i=Object.values(n).find(o=>!!o.getMergedTraits().httpPayload);if(i){const o=i.getMergedTraits().mediaType;return o||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!r.isUnitSchema()&&Object.values(n).find(a=>{const{httpQuery:s,httpQueryParams:l,httpHeader:c,httpLabel:d,httpPrefixHeaders:f}=a.getMergedTraits();return!s&&!l&&!c&&!d&&f===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,n,i,o,a){let s=t;t.includes("#")&&([,s]=t.split("#"));const l={$metadata:o,$fault:n.statusCode<500?"client":"server"};if(!this.errorRegistry)throw new Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:a?.(this.errorRegistry,s)??this.errorRegistry.getSchema(t),errorMetadata:l}}catch{i.message=i.message??i.Message??"UnknownError";const d=this.errorRegistry,f=d.getBaseException();if(f){const m=d.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new m({name:s}),l),i)}const h=i,p=h?.message??h?.Message??h?.Error?.Message??h?.Error?.message;throw this.decorateServiceException(Object.assign(new Error(p),{name:s},l),i)}}compose(t,r,n){let i=n;r.includes("#")&&([i]=r.split("#"));const o=Yi.for(i),a=Yi.for("smithy.ts.sdk.synthetic."+n);t.copyFrom(o),t.copyFrom(a),this.errorRegistry=t}decorateServiceException(t,r={}){if(this.queryCompat){const n=t.Message??r.Message,i=t3(t,r);n&&(i.message=n);const o=i.Error??{};o.Type=i.Error?.Type,o.Code=i.Error?.Code,o.Message=i.Error?.message??i.Error?.Message??n,i.Error=o;const a=i.$metadata.requestId;return a&&(i.RequestId=a),i}return t3(t,r)}setQueryCompatError(t,r){const n=r.headers?.["x-amzn-query-error"];if(t!==void 0&&n!=null){const[i,o]=n.split(";"),a=Object.keys(t),s={Code:i,Type:o};t.Code=i,t.Type=o;for(let l=0;l<a.length;l++){const c=a[l];s[c==="message"?"Message":c]=t[c]}delete s.__type,t.Error=s}}queryCompatOutput(t,r){t.Error&&(r.Error=t.Error),t.Type&&(r.Type=t.Type),t.Code&&(r.Code=t.Code)}findQueryCompatibleError(t,r){try{return t.getSchema(r)}catch{return t.find(i=>Nn.of(i).getMergedTraits().awsQueryError?.[0]===r)}}}class b2{serdeContext;setSerdeContext(t){this.serdeContext=t}}class Vme{from;to;keys;constructor(t,r){this.from=t,this.to=r;const n=Object.keys(this.from),i=new Set(n);i.delete("__type"),this.keys=i}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,r=this.from[t];this.to.$unknown=[t,r]}}}function Gme(e,t,r){if(r?.source){const n=r.source;if(typeof t=="number"&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||n!==String(t)))return n.includes(".")?new Ua(n,"bigDecimal"):BigInt(n)}return t}const Kme=(e,t)=>wS(e,t).then(r=>(t?.utf8Encoder??c2)(r)),Hme=(e,t)=>Kme(e,t).then(r=>{if(r.length)try{return JSON.parse(r)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:r}),n}return{}}),p3=(e,t)=>Object.keys(e).find(r=>r.toLowerCase()===t.toLowerCase()),Iy=e=>{let t=e;return typeof t=="number"&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},Wme=(e,t)=>{const r=p3(e.headers,"x-amzn-errortype");if(r!==void 0)return Iy(e.headers[r]);if(t&&typeof t=="object"){const n=p3(t,"code");if(n&&t[n]!==void 0)return Iy(t[n]);if(t.__type!==void 0)return Iy(t.__type)}};class Jme extends b2{settings;constructor(t){super(),this.settings=t}async read(t,r){return this._read(t,typeof r=="string"?JSON.parse(r,Gme):await Hme(r,this.serdeContext))}readObject(t,r){return this._read(t,r)}_read(t,r){const n=r!==null&&typeof r=="object",i=Nn.of(t);if(n){if(i.isStructSchema()){const a=r,s=i.isUnionSchema(),l={};let c;const{jsonName:d}=this.settings;d&&(c={});let f;s&&(f=new Vme(a,l));for(const[h,p]of i.structIterator()){let m=h;d&&(m=p.getMergedTraits().jsonName??m,c[m]=h),s&&f.mark(m),a[m]!=null&&(l[h]=this._read(p,a[m]))}if(s)f.writeUnknown();else if(typeof a.__type=="string")for(const h in a){const p=a[h],m=d?c[h]??h:h;m in l||(l[m]=p)}return l}if(Array.isArray(r)&&i.isListSchema()){const a=i.getValueSchema(),s=[];for(const l of r)s.push(this._read(a,l));return s}if(i.isMapSchema()){const a=i.getValueSchema(),s={};for(const l in r)s[l]=this._read(a,r[l]);return s}}if(i.isBlobSchema()&&typeof r=="string")return kb(r);const o=i.getMergedTraits().mediaType;if(i.isStringSchema()&&typeof r=="string"&&o)return o==="application/json"||o.endsWith("+json")?kl.from(r):r;if(i.isTimestampSchema()&&r!=null)switch(O5(i,this.settings)){case 5:return yfe(r);case 6:return I5(r);case 7:return Efe(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(i.isBigIntegerSchema()&&(typeof r=="number"||typeof r=="string"))return BigInt(r);if(i.isBigDecimalSchema()&&r!=null){if(r instanceof Ua)return r;const a=r;return a.type==="bigDecimal"&&"string"in a?new Ua(a.string,a.type):new Ua(String(r),"bigDecimal")}if(i.isNumericSchema()&&typeof r=="string"){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return r}if(i.isDocumentSchema())if(n){const a=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof Ua?a[s]=l:a[s]=this._read(i,l)}return a}else return structuredClone(r);return r}}const m3="Ν";class Qme{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(t,r)=>{if(r instanceof Ua){const n=`${m3+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){const n=r.toString(),i=`${m3+"b"+this.counter++}_`+n;return this.values.set(`"${i}"`,n),i}return r}}replaceInJson(t){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return t;for(const[r,n]of this.values)t=t.replace(r,n);return t}}class Yme extends b2{settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,r){this.rootSchema=Nn.of(t),this.buffer=this._write(this.rootSchema,r)}flush(){const{rootSchema:t,useReplacer:r}=this;if(this.rootSchema=void 0,this.useReplacer=!1,t?.isStructSchema()||t?.isDocumentSchema()){if(!r)return JSON.stringify(this.buffer);const n=new Qme;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}writeDiscriminatedDocument(t,r){this.write(t,r),typeof this.buffer=="object"&&(this.buffer.__type=Nn.of(t).getName(!0))}_write(t,r,n){const i=r!==null&&typeof r=="object",o=Nn.of(t);if(i){if(o.isStructSchema()){const a=r,s={},{jsonName:l}=this.settings;let c;l&&(c={});let d=0;for(const[f,h]of o.structIterator()){const p=this._write(h,a[f],o);if(p!==void 0){let m=f;l&&(m=h.getMergedTraits().jsonName??f,c[f]=m),s[m]=p,d++}}if(o.isUnionSchema()&&d===0){const{$unknown:f}=a;if(Array.isArray(f)){const[h,p]=f;s[h]=this._write(15,p)}}else if(typeof a.__type=="string")for(const f in a){const h=a[f],p=l?c[f]??f:f;p in s||(s[p]=this._write(15,h))}return s}if(Array.isArray(r)&&o.isListSchema()){const a=o.getValueSchema(),s=[],l=!!o.getMergedTraits().sparse;for(const c of r)(l||c!=null)&&s.push(this._write(a,c));return s}if(o.isMapSchema()){const a=o.getValueSchema(),s={},l=!!o.getMergedTraits().sparse;for(const c in r){const d=r[c];(l||d!=null)&&(s[c]=this._write(a,d))}return s}if(r instanceof Uint8Array&&(o.isBlobSchema()||o.isDocumentSchema()))return o===this.rootSchema?r:(this.serdeContext?.base64Encoder??ov)(r);if(r instanceof Date&&(o.isTimestampSchema()||o.isDocumentSchema()))switch(O5(o,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return bfe(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof Ua&&(this.useReplacer=!0)}if(!(r===null&&n?.isStructSchema())){if(o.isStringSchema()){if(typeof r>"u"&&o.isIdempotencyToken())return P5();const a=o.getMergedTraits().mediaType;return r!=null&&a&&(a==="application/json"||a.endsWith("+json"))?kl.from(r):r}if(typeof r=="number"&&o.isNumericSchema())return Math.abs(r)===1/0||isNaN(r)?String(r):r;if(typeof r=="string"&&o.isBlobSchema())return o===this.rootSchema?r:(this.serdeContext?.base64Encoder??ov)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),o.isDocumentSchema())if(i){const a=Array.isArray(r)?[]:{};for(const s in r){const l=r[s];l instanceof Ua?(this.useReplacer=!0,a[s]=l):a[s]=this._write(o,l)}return a}else return structuredClone(r);return r}}}class Xme extends b2{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new Yme(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new Jme(this.settings);return t.setSerdeContext(this.serdeContext),t}}class Zme extends Pfe{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o}){super({defaultNamespace:t,errorTypeRegistries:r}),this.serviceTarget=n,this.codec=o??new Xme({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new qme(this.awsQueryCompatible)}async serializeRequest(t,r,n){const i=await super.serializeRequest(t,r,n);return i.path.endsWith("/")||(i.path+="/"),i.headers["content-type"]=`application/x-amz-json-${this.getJsonRpcVersion()}`,i.headers["x-amz-target"]=`${this.serviceTarget}.${t.name}`,this.awsQueryCompatible&&(i.headers["x-amzn-query-mode"]="true"),(o0(t.input)==="unit"||!i.body)&&(i.body="{}"),i}getPayloadCodec(){return this.codec}async handleError(t,r,n,i,o){this.awsQueryCompatible&&this.mixin.setQueryCompatError(i,n);const a=Wme(n,i)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,a,this.options.defaultNamespace);const{errorSchema:s,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(a,this.options.defaultNamespace,n,i,o,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=Nn.of(s),d=i.message??i.Message??"UnknownError",f=this.compositeErrorRegistry.getErrorCtor(s)??Error,h=new f(d),p={},m=this.codec.createDeserializer();for(const[g,v]of c.structIterator())i[g]!=null&&(p[g]=m.readObject(v,i[g]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(i,p),this.mixin.decorateServiceException(Object.assign(h,l,{$fault:c.getMergedTraits().error,message:d},p),i)}}class ege extends Zme{constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o}){super({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:i,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const _p="ref",su=-1,ag=!0,g3="isSet",cz="PartitionResult",sg="booleanEquals",Py="getAttr",Vf="stringEquals",v3={[_p]:"Endpoint"},Oy={[_p]:cz},uh={[_p]:"Region"},Ra={},b3=[uh],_3={conditions:[[g3,[v3]],[g3,b3],["aws.partition",b3,cz],[sg,[{[_p]:"UseFIPS"},ag]],[sg,[{fn:Py,argv:[Oy,"supportsFIPS"]},ag]],[sg,[{[_p]:"UseDualStack"},ag]],[sg,[{fn:Py,argv:[Oy,"supportsDualStack"]},ag]],[Vf,[{fn:Py,argv:[Oy,"name"]},"aws"]],[Vf,[uh,"us-east-1"]],[Vf,[uh,"us-east-2"]],[Vf,[uh,"us-west-1"]],[Vf,[uh,"us-west-2"]]],results:[[su],[su,"Invalid Configuration: FIPS and custom endpoint are not supported"],[su,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[v3,Ra],["https://cognito-idp-fips.us-east-1.amazonaws.com",Ra],["https://cognito-idp-fips.us-east-2.amazonaws.com",Ra],["https://cognito-idp-fips.us-west-1.amazonaws.com",Ra],["https://cognito-idp-fips.us-west-2.amazonaws.com",Ra],["https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Ra],[su,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",Ra],[su,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-idp.{Region}.amazonaws.com",Ra],["https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",Ra],[su,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",Ra],[su,"Invalid Configuration: Missing Region"]]},tge=2,wn=1e8,rge=new Int32Array([-1,1,-1,0,17,3,1,4,wn+16,2,5,wn+16,3,9,6,5,7,wn+15,6,8,wn+14,7,wn+12,wn+13,4,11,10,5,wn+9,wn+11,5,12,wn+10,6,13,wn+9,8,wn+4,14,9,wn+5,15,10,wn+6,16,11,wn+7,wn+8,3,wn+1,18,5,wn+2,wn+3]),nge=h2.from(rge,tge,_3.conditions,_3.results),ige=new Kfe({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),oge=(e,t={})=>ige.get(e,()=>fhe(nge,{endpointParams:e,logger:t.logger}));p2.aws=H5;class Le extends rd{constructor(t){super(t),Object.setPrototypeOf(this,Le.prototype)}}class _2 extends Le{name="AccessDeniedException";$fault="client";constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,_2.prototype)}}class y2 extends Le{name="InternalErrorException";$fault="server";constructor(t){super({name:"InternalErrorException",$fault:"server",...t}),Object.setPrototypeOf(this,y2.prototype)}}class x2 extends Le{name="InvalidParameterException";$fault="client";reasonCode;constructor(t){super({name:"InvalidParameterException",$fault:"client",...t}),Object.setPrototypeOf(this,x2.prototype),this.reasonCode=t.reasonCode}}class S2 extends Le{name="NotAuthorizedException";$fault="client";constructor(t){super({name:"NotAuthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,S2.prototype)}}class w2 extends Le{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,w2.prototype)}}class E2 extends Le{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,E2.prototype)}}class k2 extends Le{name="UserImportInProgressException";$fault="client";constructor(t){super({name:"UserImportInProgressException",$fault:"client",...t}),Object.setPrototypeOf(this,k2.prototype)}}class C2 extends Le{name="InternalServerException";$fault="server";constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,C2.prototype)}}class R2 extends Le{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,R2.prototype)}}class A2 extends Le{name="UserNotFoundException";$fault="client";constructor(t){super({name:"UserNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,A2.prototype)}}class $2 extends Le{name="InvalidLambdaResponseException";$fault="client";constructor(t){super({name:"InvalidLambdaResponseException",$fault:"client",...t}),Object.setPrototypeOf(this,$2.prototype)}}class T2 extends Le{name="TooManyFailedAttemptsException";$fault="client";constructor(t){super({name:"TooManyFailedAttemptsException",$fault:"client",...t}),Object.setPrototypeOf(this,T2.prototype)}}class N2 extends Le{name="UnexpectedLambdaException";$fault="client";constructor(t){super({name:"UnexpectedLambdaException",$fault:"client",...t}),Object.setPrototypeOf(this,N2.prototype)}}class D2 extends Le{name="UserLambdaValidationException";$fault="client";constructor(t){super({name:"UserLambdaValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,D2.prototype)}}class F2 extends Le{name="CodeDeliveryFailureException";$fault="client";constructor(t){super({name:"CodeDeliveryFailureException",$fault:"client",...t}),Object.setPrototypeOf(this,F2.prototype)}}class I2 extends Le{name="InvalidPasswordException";$fault="client";constructor(t){super({name:"InvalidPasswordException",$fault:"client",...t}),Object.setPrototypeOf(this,I2.prototype)}}class P2 extends Le{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,P2.prototype)}}class O2 extends Le{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(t){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...t}),Object.setPrototypeOf(this,O2.prototype)}}class M2 extends Le{name="PreconditionNotMetException";$fault="client";constructor(t){super({name:"PreconditionNotMetException",$fault:"client",...t}),Object.setPrototypeOf(this,M2.prototype)}}class L2 extends Le{name="UnsupportedUserStateException";$fault="client";constructor(t){super({name:"UnsupportedUserStateException",$fault:"client",...t}),Object.setPrototypeOf(this,L2.prototype)}}class z2 extends Le{name="UsernameExistsException";$fault="client";constructor(t){super({name:"UsernameExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,z2.prototype)}}class U2 extends Le{name="AliasExistsException";$fault="client";constructor(t){super({name:"AliasExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,U2.prototype)}}class B2 extends Le{name="InvalidUserPoolConfigurationException";$fault="client";constructor(t){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...t}),Object.setPrototypeOf(this,B2.prototype)}}class j2 extends Le{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(t){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...t}),Object.setPrototypeOf(this,j2.prototype)}}class q2 extends Le{name="MFAMethodNotFoundException";$fault="client";constructor(t){super({name:"MFAMethodNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,q2.prototype)}}class V2 extends Le{name="PasswordResetRequiredException";$fault="client";constructor(t){super({name:"PasswordResetRequiredException",$fault:"client",...t}),Object.setPrototypeOf(this,V2.prototype)}}class G2 extends Le{name="UnsupportedOperationException";$fault="client";constructor(t){super({name:"UnsupportedOperationException",$fault:"client",...t}),Object.setPrototypeOf(this,G2.prototype)}}class K2 extends Le{name="UserNotConfirmedException";$fault="client";constructor(t){super({name:"UserNotConfirmedException",$fault:"client",...t}),Object.setPrototypeOf(this,K2.prototype)}}class H2 extends Le{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(t){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,H2.prototype)}}class W2 extends Le{name="CodeMismatchException";$fault="client";constructor(t){super({name:"CodeMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,W2.prototype)}}class J2 extends Le{name="ExpiredCodeException";$fault="client";constructor(t){super({name:"ExpiredCodeException",$fault:"client",...t}),Object.setPrototypeOf(this,J2.prototype)}}class Q2 extends Le{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(t){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...t}),Object.setPrototypeOf(this,Q2.prototype)}}class Y2 extends Le{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(t){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,Y2.prototype)}}class X2 extends Le{name="ConcurrentModificationException";$fault="client";constructor(t){super({name:"ConcurrentModificationException",$fault:"client",...t}),Object.setPrototypeOf(this,X2.prototype)}}class Z2 extends Le{name="ForbiddenException";$fault="client";constructor(t){super({name:"ForbiddenException",$fault:"client",...t}),Object.setPrototypeOf(this,Z2.prototype)}}class ek extends Le{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(t){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,ek.prototype)}}class tk extends Le{name="WebAuthnClientMismatchException";$fault="client";constructor(t){super({name:"WebAuthnClientMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,tk.prototype)}}class rk extends Le{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(t){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...t}),Object.setPrototypeOf(this,rk.prototype)}}class nk extends Le{name="WebAuthnNotEnabledException";$fault="client";constructor(t){super({name:"WebAuthnNotEnabledException",$fault:"client",...t}),Object.setPrototypeOf(this,nk.prototype)}}class ik extends Le{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(t){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,ik.prototype)}}class ok extends Le{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(t){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,ok.prototype)}}class ak extends Le{name="DeviceKeyExistsException";$fault="client";constructor(t){super({name:"DeviceKeyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,ak.prototype)}}class sk extends Le{name="GroupExistsException";$fault="client";constructor(t){super({name:"GroupExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,sk.prototype)}}class lk extends Le{name="DuplicateProviderException";$fault="client";constructor(t){super({name:"DuplicateProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,lk.prototype)}}class uk extends Le{name="ManagedLoginBrandingExistsException";$fault="client";constructor(t){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,uk.prototype)}}class ck extends Le{name="TermsExistsException";$fault="client";constructor(t){super({name:"TermsExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,ck.prototype)}}class dk extends Le{name="FeatureUnavailableInTierException";$fault="client";constructor(t){super({name:"FeatureUnavailableInTierException",$fault:"client",...t}),Object.setPrototypeOf(this,dk.prototype)}}class fk extends Le{name="TierChangeNotAllowedException";$fault="client";constructor(t){super({name:"TierChangeNotAllowedException",$fault:"client",...t}),Object.setPrototypeOf(this,fk.prototype)}}class hk extends Le{name="UserPoolTaggingException";$fault="client";constructor(t){super({name:"UserPoolTaggingException",$fault:"client",...t}),Object.setPrototypeOf(this,hk.prototype)}}class pk extends Le{name="InvalidOAuthFlowException";$fault="client";constructor(t){super({name:"InvalidOAuthFlowException",$fault:"client",...t}),Object.setPrototypeOf(this,pk.prototype)}}class mk extends Le{name="ScopeDoesNotExistException";$fault="client";constructor(t){super({name:"ScopeDoesNotExistException",$fault:"client",...t}),Object.setPrototypeOf(this,mk.prototype)}}class gk extends Le{name="UnsupportedIdentityProviderException";$fault="client";constructor(t){super({name:"UnsupportedIdentityProviderException",$fault:"client",...t}),Object.setPrototypeOf(this,gk.prototype)}}class vk extends Le{name="RefreshTokenReuseException";$fault="client";constructor(t){super({name:"RefreshTokenReuseException",$fault:"client",...t}),Object.setPrototypeOf(this,vk.prototype)}}class bk extends Le{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,bk.prototype)}}class _k extends Le{name="UnsupportedTokenTypeException";$fault="client";constructor(t){super({name:"UnsupportedTokenTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,_k.prototype)}}class yk extends Le{name="WebAuthnConfigurationMissingException";$fault="client";constructor(t){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...t}),Object.setPrototypeOf(this,yk.prototype)}}class xk extends Le{name="EnableSoftwareTokenMFAException";$fault="client";constructor(t){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...t}),Object.setPrototypeOf(this,xk.prototype)}}const age="AvailableChallenges",sge="AccessDeniedException",lge="AliasExistsException",uge="AnalyticsEndpointId",cge="AuthFlow",dge="AnalyticsMetadata",fge="AnalyticsMetadataType",hge="AuthParameters",pge="AuthParametersType",mge="AuthenticationResult",gge="AuthenticationResultType",vge="AccessToken",bge="CodeDeliveryFailureException",_ge="ClientId",yge="ClientIdType",xge="ClientMetadata",Sge="CodeMismatchException",wge="ConcurrentModificationException",Ege="ChallengeName",kge="ChallengeParameters",Cge="DeviceGroupKey",Rge="DeviceKey",Age="DeviceKeyExistsException",$ge="DuplicateProviderException",Tge="ExpiredCodeException",Nge="EncodedData",Dge="ExpiresIn",Fge="EnableSoftwareTokenMFAException",Ige="ForbiddenException",Pge="FeatureUnavailableInTierException",Oge="GroupExistsException",Mge="IpAddress",Lge="InitiateAuthRequest",zge="InitiateAuthResponse",Uge="InitiateAuth",Bge="InternalErrorException",jge="InvalidEmailRoleAccessPolicyException",qge="InvalidLambdaResponseException",Vge="InvalidOAuthFlowException",Gge="InvalidParameterException",Kge="InvalidPasswordException",Hge="InternalServerException",Wge="InvalidSmsRoleAccessPolicyException",Jge="InvalidSmsRoleTrustRelationshipException",Qge="IdToken",Yge="InvalidUserPoolConfigurationException",Xge="LimitExceededException",Zge="MFAMethodNotFoundException",e0e="ManagedLoginBrandingExistsException",t0e="NotAuthorizedException",r0e="NewDeviceMetadata",n0e="NewDeviceMetadataType",i0e="PasswordHistoryPolicyViolationException",o0e="PreconditionNotMetException",a0e="PasswordResetRequiredException",s0e="ResourceNotFoundException",l0e="RefreshToken",u0e="RefreshTokenReuseException",dz="Session",c0e="ScopeDoesNotExistException",d0e="SessionType",f0e="SoftwareTokenMFANotFoundException",h0e="TierChangeNotAllowedException",p0e="TermsExistsException",m0e="TooManyFailedAttemptsException",g0e="TooManyRequestsException",v0e="TokenModelType",b0e="TokenType",_0e="UserContextDataType",y0e="UserContextData",x0e="UnauthorizedException",S0e="UsernameExistsException",w0e="UserImportInProgressException",E0e="UnsupportedIdentityProviderException",k0e="UnexpectedLambdaException",C0e="UserLambdaValidationException",R0e="UserNotConfirmedException",A0e="UserNotFoundException",$0e="UnsupportedOperationException",T0e="UserPoolAddOnNotEnabledException",N0e="UserPoolTaggingException",D0e="UnsupportedTokenTypeException",F0e="UnsupportedUserStateException",I0e="WebAuthnClientMismatchException",P0e="WebAuthnConfigurationMissingException",O0e="WebAuthnChallengeNotFoundException",M0e="WebAuthnCredentialNotSupportedException",L0e="WebAuthnNotEnabledException",z0e="WebAuthnOriginNotAllowedException",U0e="WebAuthnRelyingPartyMismatchException",He="client",qe="error",We="httpError",Ve="message",B0e="reasonCode",fz="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",hz="server",De="com.amazonaws.cognitoidentityprovider",pz=Yi.for(fz);var j0e=[-3,fz,"CognitoIdentityProviderServiceException",0,[],[]];pz.registerError(j0e,Le);const je=Yi.for(De);var q0e=[-3,De,sge,{[qe]:He,[We]:403},[Ve],[0]];je.registerError(q0e,_2);var V0e=[-3,De,lge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(V0e,U2);var G0e=[-3,De,bge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(G0e,F2);var K0e=[-3,De,Sge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(K0e,W2);var H0e=[-3,De,wge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(H0e,X2);var W0e=[-3,De,Age,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(W0e,ak);var J0e=[-3,De,$ge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(J0e,lk);var Q0e=[-3,De,Fge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Q0e,xk);var Y0e=[-3,De,Tge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Y0e,J2);var X0e=[-3,De,Pge,{[qe]:He,[We]:403},[Ve],[0]];je.registerError(X0e,dk);var Z0e=[-3,De,Ige,{[qe]:He,[We]:403},[Ve],[0]];je.registerError(Z0e,Z2);var eve=[-3,De,Oge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(eve,sk);var tve=[-3,De,Bge,{[qe]:hz},[Ve],[0]];je.registerError(tve,y2);var rve=[-3,De,Hge,{[qe]:hz},[Ve],[0]];je.registerError(rve,C2);var nve=[-3,De,jge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(nve,j2);var ive=[-3,De,qge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(ive,$2);var ove=[-3,De,Vge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(ove,pk);var ave=[-3,De,Gge,{[qe]:He,[We]:400},[Ve,B0e],[0,0]];je.registerError(ave,x2);var sve=[-3,De,Kge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(sve,I2);var lve=[-3,De,Wge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(lve,P2);var uve=[-3,De,Jge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(uve,O2);var cve=[-3,De,Yge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(cve,B2);var dve=[-3,De,Xge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(dve,R2);var fve=[-3,De,e0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(fve,uk);var hve=[-3,De,Zge,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(hve,q2);var pve=[-3,De,t0e,{[qe]:He,[We]:403},[Ve],[0]];je.registerError(pve,S2);var mve=[-3,De,i0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(mve,Q2);var gve=[-3,De,a0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(gve,V2);var vve=[-3,De,o0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(vve,M2);var bve=[-3,De,u0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(bve,vk);var _ve=[-3,De,s0e,{[qe]:He,[We]:404},[Ve],[0]];je.registerError(_ve,w2);var yve=[-3,De,c0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(yve,mk);var xve=[-3,De,f0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(xve,Y2);var Sve=[-3,De,p0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Sve,ck);var wve=[-3,De,h0e,{[qe]:He,[We]:403},[Ve],[0]];je.registerError(wve,fk);var Eve=[-3,De,m0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Eve,T2);var kve=[-3,De,g0e,{[qe]:He,[We]:429},[Ve],[0]];je.registerError(kve,E2);var Cve=[-3,De,x0e,{[qe]:He,[We]:401},[Ve],[0]];je.registerError(Cve,bk);var Rve=[-3,De,k0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Rve,N2);var Ave=[-3,De,E0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Ave,gk);var $ve=[-3,De,$0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError($ve,G2);var Tve=[-3,De,D0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Tve,_k);var Nve=[-3,De,F0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Nve,L2);var Dve=[-3,De,w0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Dve,k2);var Fve=[-3,De,C0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Fve,D2);var Ive=[-3,De,S0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Ive,z2);var Pve=[-3,De,R0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Pve,K2);var Ove=[-3,De,A0e,{[qe]:He,[We]:404},[Ve],[0]];je.registerError(Ove,A2);var Mve=[-3,De,T0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Mve,H2);var Lve=[-3,De,N0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Lve,hk);var zve=[-3,De,O0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(zve,ek);var Uve=[-3,De,I0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Uve,tk);var Bve=[-3,De,P0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Bve,yk);var jve=[-3,De,M0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(jve,rk);var qve=[-3,De,L0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(qve,nk);var Vve=[-3,De,z0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Vve,ik);var Gve=[-3,De,U0e,{[qe]:He,[We]:400},[Ve],[0]];je.registerError(Gve,ok);const Kve=[pz,je];var Hve=[0,De,yge,8,0],mz=[0,De,d0e,8,0],My=[0,De,v0e,8,0],Wve=[3,De,fge,0,[uge],[0]],Jve=[3,De,gge,0,[vge,Dge,b0e,l0e,Qge,r0e],[[()=>My,0],1,0,[()=>My,0],[()=>My,0],()=>Xve]],Qve=[3,De,Lge,0,[cge,_ge,hge,xge,dge,y0e,dz],[0,[()=>Hve,0],[()=>ebe,0],128,()=>Wve,[()=>Zve,0],[()=>mz,0]],2],Yve=[3,De,zge,0,[Ege,dz,kge,mge,age],[0,[()=>mz,0],128,[()=>Jve,0],64]],Xve=[3,De,n0e,0,[Rge,Cge],[0,0]],Zve=[3,De,_0e,8,[Mge,Nge],[0,0]],ebe=[2,De,pge,8,0,0],tbe=[9,De,Uge,0,()=>Qve,()=>Yve];const rbe=e=>({apiVersion:"2016-04-18",base64Decoder:e?.base64Decoder??kb,base64Encoder:e?.base64Encoder??ov,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??oge,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??hme,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Ppe},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Lfe}],logger:e?.logger??new tz,protocol:e?.protocol??ege,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",errorTypeRegistries:Kve,xmlNamespace:"http://cognito-idp.amazonaws.com/doc/2016-04-18/",version:"2016-04-18",serviceTarget:"AWSCognitoIdentityProviderService"},serviceId:e?.serviceId??"Cognito Identity Provider",urlParser:e?.urlParser??Bd,utf8Decoder:e?.utf8Decoder??Ud,utf8Encoder:e?.utf8Encoder??c2}),nbe=e=>{const t=Bme(e),r=()=>t().then(bpe),n=rbe(e);return{...n,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??zme,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Mme({serviceId:n.serviceId,clientVersion:bme.version}),maxAttempts:e?.maxAttempts??kh,region:e?.region??Lme("Region is missing"),requestHandler:d2.create(e?.requestHandler??r),retryMode:e?.retryMode??(async()=>(await r()).retryMode||yhe),sha256:e?.sha256??Ome,streamCollector:e?.streamCollector??Jde,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Khe)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Hhe))}},ibe=e=>({setRegion(t){e.region=t},region(){return e.region}}),obe=e=>({region:e.region()}),abe=e=>{const t=e.httpAuthSchemes;let r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){const o=t.findIndex(a=>a.schemeId===i.schemeId);o===-1?t.push(i):t.splice(o,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}},sbe=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),lbe=(e,t)=>{const r=Object.assign(ibe(e),wpe(e),Sde(e),abe(e));return t.forEach(n=>n.configure(r)),Object.assign(e,obe(r),Epe(r),wde(r),sbe(r))};class gz extends gpe{config;constructor(...[t]){const r=nbe(t||{});super(r),this.initConfig=r;const n=mme(r),i=Gfe(n),o=mpe(i),a=Qhe(o),s=a,l=hpe(s),c=pme(l),d=lbe(c,t?.extensions||[]);this.config=d,this.middlewareStack.use(afe(this.config)),this.middlewareStack.use(Ghe(this.config)),this.middlewareStack.use(Dpe(this.config)),this.middlewareStack.use(Zhe(this.config)),this.middlewareStack.use(Rde(this.config)),this.middlewareStack.use(Tde(this.config)),this.middlewareStack.use(Fde(this.config)),this.middlewareStack.use(Lde(this.config,{httpAuthSchemeParametersProvider:dme,identityProviderConfigProvider:async f=>new Mfe({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(qde(this.config))}destroy(){super.destroy()}}class vz extends Z5.classBuilder().ep(gme).m(function(t,r,n,i){return[fpe(n,t.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(tbe).build(){}let ube="reventless.auth.v1",uv="reventless.role-switched",cbe=300*1e3,Sk="activeRole",wk="availableRoles",Ek="activeRoleStale";function bz(e){return e.split(",").map(t=>t.trim()).filter(t=>t!=="")}function $S(e){let t=i=>D(k(e[i],he.string),""),r=Q(D(k(e.groups,he.array),[]),he.string),n=i=>k(k(k(e.claims,he.object),o=>o[i]),he.string);return{userId:t("userId"),username:t("username"),groups:r,provider:t("provider"),activeRole:n(Sk),availableRoles:ne(n(wk),[],bz),staleRole:n(Ek)}}function dbe(e){let t=[["userId",e.userId],["username",e.username],["groups",e.groups.map(s=>s)],["provider",e.provider]],r=e.activeRole,n=e.availableRoles,i=e.staleRole,o,a=0;if(r!==void 0||n.length!==0||i!==void 0?a=1:o=[],a===1){let s=[];ee(r,l=>{s.push([Sk,l])}),n.length!==0&&s.push([wk,n.join(",")]),ee(i,l=>{s.push([Ek,l])}),o=[["claims",Object.fromEntries(s)]]}return Object.fromEntries(t.concat(o))}function fbe(e){let t=localStorage.getItem(e);if(t!=null)try{let r=JSON.parse(t),n=he.object(r);if(n===void 0)return;let i=k(n.token,he.string),o=n.identity,a=k(n.refreshToken,he.string),s=k(n.expiresAt,he.float);return i!==void 0&&o!==void 0?q(he.object(o),l=>({token:i,identity:$S(l),refreshToken:a,expiresAt:s})):void 0}catch{return}}function Gf(e,t){let r=[["token",t.token],["identity",dbe(t.identity)]],n=t.refreshToken,i=n!==void 0?r.concat([["refreshToken",n]]):r,o=t.expiresAt,a=o!==void 0?i.concat([["expiresAt",o]]):i,s=JSON.stringify(Object.fromEntries(a));localStorage.setItem(e,s)}function hbe(){return sessionStorage.getItem(uv)==null?!1:(sessionStorage.removeItem(uv),!0)}function pbe(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/login"}function mbe(e){return(e.endsWith("/graphql")?e.slice(0,e.length-8|0):e)+"/__inmemory/switch-role"}function _z(e){let t=n=>k(e[n],he.string),r=Q(D(k(e["cognito:groups"],he.array),[]),he.string);return{userId:D(t("sub"),""),username:D(vn(t("cognito:username"),t("email")),""),groups:r,provider:"Cognito",activeRole:t(Sk),availableRoles:ne(t(wk),[],bz),staleRole:t(Ek)}}let gbe=`mutation SetActiveRole($activeRole: String) {
|
|
66
|
+
Platform_SetActiveRole(activeRole: $activeRole) {
|
|
67
|
+
activeRole
|
|
68
|
+
availableRoles
|
|
69
|
+
}
|
|
70
|
+
}`;async function TS(e){try{let t=await e.text();return JSON.parse(t)}catch{return}}function y3(e,t){let r=e.status;return t+" (HTTP "+r.toString()+")"}function vbe(e){return JSON.stringify(e!==void 0?Object.fromEntries([["activeRole",e]]):{})}async function x3(e,t,r){try{let n=JSON.stringify(Object.fromEntries([["query",gbe],["variables",Object.fromEntries([["activeRole",ne(r,null,l=>l)]])]])),i=await fetch(e,{method:"POST",headers:{"content-type":"application/json",authorization:"Bearer "+t},body:n}),o=await TS(i),a=k(k(k(k(k(k(k(o,he.object),l=>l.errors),he.array),l=>l.at(0)),he.object),l=>l.message),he.string),s=i.ok;return a!==void 0?{TAG:"Error",_0:a}:s?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:"Could not switch role"}}catch(n){let i=Ds(n);return{TAG:"Error",_0:Eb(wb(i))}}}function yz(e){try{return _de(e)}catch{return}}function bbe(e){let t=e.IdToken;if(t===void 0)return;let r=yz(t);if(r===void 0)return;let n=e.ExpiresIn,i=n!==void 0?Date.now()+n*1e3:void 0;return{token:t,identity:_z(r),refreshToken:e.RefreshToken,expiresAt:i}}async function _be(e,t,r,n){try{let i=new gz({region:t}),o=new vz({ClientId:e,AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:Object.fromEntries([["USERNAME",r],["PASSWORD",n]])}),a=await i.send(o),s=k(a.AuthenticationResult,bbe);return s!==void 0?{TAG:"Ok",_0:s}:{TAG:"Error",_0:"Cognito returned no usable tokens"}}catch(i){let o=Ds(i);return{TAG:"Error",_0:Eb(wb(o))}}}async function S3(e,t,r,n){try{let i=new gz({region:t}),o=new vz({ClientId:e,AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:Object.fromEntries([["REFRESH_TOKEN",r]])}),s=(await i.send(o)).AuthenticationResult;if(s===void 0)return{TAG:"Error",_0:"Cognito refresh returned no tokens"};let l=s.IdToken;if(l===void 0)return{TAG:"Error",_0:"Cognito refresh missing IdToken"};let c=yz(l),d=D(q(c,_z),n),f=s.ExpiresIn,h=f!==void 0?Date.now()+f*1e3:void 0,p=s.RefreshToken;return{TAG:"Ok",_0:{token:l,identity:d,refreshToken:p!==void 0?p:r,expiresAt:h}}}catch(i){let o=Ds(i);return{TAG:"Error",_0:Eb(wb(o))}}}function ybe(e){switch(e){case"Anonymous":return!1;case"Local":case"Cognito":return!0}}let xz=Zt(void 0),xbe=xz.Provider;function Sbe(e){let t=e.storageKey,r=e.region,n=e.cognitoClientId,i=e.apiEndpoint,o=e.authMode,a=t!==void 0?t:ube,s=ce(()=>fbe(a)),l=s[1],c=s[0];Ae(()=>{if(c===void 0)return;let y=c.refreshToken;if(y===void 0)return;let S=c.expiresAt;if(S===void 0)return;let w=c.identity;switch(o){case"Anonymous":case"Local":return;case"Cognito":if(n===void 0||r===void 0)return;let C=Math.max(0,S-Date.now()-cbe),A=setTimeout(()=>{S3(n,r,y,w).then(T=>{if(T.TAG==="Ok"){let R=T._0;return Gf(a,R),l(N=>R)}localStorage.removeItem(a),l(R=>{})})},C);return()=>{clearTimeout(A)}}},[c,o,n,r]);let d=q(c,y=>y.identity),f=Ee(c),h=async(y,S)=>{try{let w=0;switch(o){case"Anonymous":case"Local":w=1;break;case"Cognito":if(n===void 0)return{TAG:"LoginErr",_0:"Cognito mode missing clientId or region in config.json"};if(r===void 0)return{TAG:"LoginErr",_0:"Cognito mode missing clientId or region in config.json"};let C=await _be(n,r,y,S);if(C.TAG!=="Ok")return{TAG:"LoginErr",_0:C._0};let A=C._0;return Gf(a,A),l(T=>A),"LoginOk"}if(w===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};let C=await fetch(pbe(i),{method:"POST",headers:{"content-type":"application/json"},body:D(JSON.stringify({username:y,password:S}),"")}),A=await TS(C);if(C.ok){let R=k(A,he.object);if(R===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let N=k(R.token,he.string),I=k(R.identity,he.object);if(N===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};if(I===void 0)return{TAG:"LoginErr",_0:"Malformed login response"};let M=$S(I),P={token:N,identity:M,refreshToken:void 0,expiresAt:void 0};return Gf(a,P),l(B=>P),"LoginOk"}return{TAG:"LoginErr",_0:D(k(k(k(A,he.object),R=>R.error),he.string),y3(C,"Login failed"))}}}catch(w){let C=Ds(w);return{TAG:"LoginErr",_0:Eb(wb(C))}}},p=async y=>{try{let S=0;switch(o){case"Anonymous":case"Local":S=1;break;case"Cognito":if(c===void 0)return{TAG:"LoginErr",_0:"Not signed in"};let w=c.refreshToken;if(i===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};if(n===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};if(r===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};if(w===void 0)return{TAG:"LoginErr",_0:"Switching roles is not available on this deployment"};let C=await x3(i,c.token,y);if(C.TAG!=="Ok")return{TAG:"LoginErr",_0:C._0};let A=await S3(n,r,w,c.identity),T=0;if(A.TAG==="Ok"){let R=A._0;if(Ce(R.identity.activeRole,y))return Gf(a,R),sessionStorage.setItem(uv,"1"),l(N=>R),"LoginOk";T=2}else T=2;if(T===2)return await x3(i,c.token,c.identity.activeRole),A.TAG==="Ok"?{TAG:"LoginErr",_0:"The server did not narrow this session to that role"}:{TAG:"LoginErr",_0:A._0};break}if(S===1){if(i===void 0)return{TAG:"LoginErr",_0:"Local auth mode requires an apiEndpoint"};if(c===void 0)return{TAG:"LoginErr",_0:"Not signed in"};let w=await fetch(mbe(i),{method:"POST",headers:{"content-type":"application/json",authorization:"Bearer "+c.token},body:vbe(y)}),C=await TS(w);if(!w.ok)return{TAG:"LoginErr",_0:D(k(k(k(C,he.object),M=>M.error),he.string),y3(w,"Could not switch role"))};let A=k(C,he.object);if(A===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};let T=k(A.token,he.string),R=k(A.identity,he.object);if(T===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};if(R===void 0)return{TAG:"LoginErr",_0:"Malformed switch response"};let N=$S(R),I={token:T,identity:N,refreshToken:void 0,expiresAt:void 0};return Gf(a,I),sessionStorage.setItem(uv,"1"),l(M=>I),"LoginOk"}}catch(S){let w=Ds(S);return console.error("[AuthProvider] switchRole threw; session left as it was",w),{TAG:"LoginErr",_0:"Could not switch role. You are still acting as the role you had."}}},m=ybe(o);return ur(xbe,{value:{identity:d,isAuthenticated:f,login:h,switchRole:p,canSwitchRoles:m,logout:()=>{localStorage.removeItem(a),l(y=>{})},getToken:()=>q(c,y=>y.token)},children:e.children})}let wbe={make:Sbe};function Sa(){return xt(xz)}function Sz(e){let t=globalThis.window;if(t!=null)try{return Li(t.matchMedia(e))}catch{return}}function Ly(e){let t=Sz(e);if(t===void 0)return!1;try{return kt(t).matches}catch{return!1}}function yd(e){let t=ce(()=>Ly(e)),r=t[1];return Ae(()=>{r(a=>Ly(e));let n=Sz(e);if(n===void 0)return;let i=kt(n),o=()=>r(a=>Ly(e));try{return i.addEventListener("change",o),()=>{try{i.removeEventListener("change",o);return}catch{return}}}catch{return}},[e]),t[0]}function wz(){let e=yd(Jn.compact),t=yd(Jn.narrow),r=yd(Jn.tight);return{compact:e,narrow:t,tight:r}}function Ez(e){return e.tight?"Tight":e.narrow?"Narrow":e.compact?"Compact":"Wide"}function kz(){return Ez(wz())}let Ebe={background:"var("+x.surface+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",display:"inline-flex",fontFamily:"var("+$.fontFamily+")",fontSize:"var("+$.sizeSm+")",fontWeight:"var("+$.weightMedium+")",lineHeight:"1",padding:"0.375rem 0.75rem",borderRadius:"var("+Y.md+")",alignItems:"center",gap:"0.375rem"},kbe={color:"var("+x.textSecondary+")",fontSize:"0.625rem"},Cbe={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+$.fontFamily+")",minWidth:"200px",padding:"0.75rem 1rem",position:"absolute",right:"0",top:"calc(100% + 0.5rem)",zIndex:"10",borderRadius:"var("+Y.md+")",boxShadow:"var("+Zr.md+")"},Rbe={background:"var("+x.brandSubtle+")",color:"var("+x.brand+")",display:"inline-block",fontSize:"var("+$.sizeXs+")",marginRight:"0.25rem",marginBottom:"0.25rem",padding:"0.125rem 0.5rem",borderRadius:"var("+Y.full+")"},w3={border:"none",borderTop:"1px solid var("+x.borderSubtle+")",margin:"0.5rem 0"},Abe={background:"transparent",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",fontSize:"var("+$.sizeSm+")",padding:"0.375rem 0.5rem",width:"100%",borderRadius:"var("+Y.sm+")"},$be={color:"var("+x.textSecondary+")",fontSize:"var("+$.sizeXs+")",letterSpacing:"0.04em",marginBottom:"0.25rem",textTransform:"uppercase"};function Tbe(e){return{background:"transparent",border:"none",color:"var("+x.textPrimary+")",cursor:e?"default":"pointer",display:"flex",fontSize:"var("+$.sizeSm+")",fontWeight:"var("+(e?$.weightMedium:$.weightNormal)+")",padding:"0.3125rem 0.5rem",textAlign:"left",width:"100%",borderRadius:"var("+Y.sm+")",alignItems:"center",justifyContent:"space-between",gap:"0.75rem"}}let Nbe={color:"var("+x.textSecondary+")",fontSize:"var("+$.sizeXs+")"},Dbe={color:"var("+x.textSecondary+")",fontWeight:"var("+$.weightNormal+")"},Fbe={background:"transparent",border:"none",color:"var("+x.textSecondary+")",cursor:"pointer",display:"block",fontFamily:"var("+$.fontFamily+")",fontSize:"var("+$.sizeSm+")",padding:"0.3125rem 0.5rem",textAlign:"left",width:"100%",borderRadius:"var("+Y.sm+")"},Ibe={color:"var("+x.textSecondary+")",fontSize:"var("+$.sizeXs+")",marginBottom:"0.25rem"},Pbe={color:"var("+x.error+")",fontSize:"var("+$.sizeXs+")",marginTop:"0.25rem"},Obe={color:"var("+x.textSecondary+")",fontSize:"var("+$.sizeXs+")",marginBottom:"0.25rem"};function Mbe(e){let t=e.trim()[0];return t!==void 0&&t.trim()!==""?t.toUpperCase():"☺"}function Cz(e,t){if(!e)return[];let r=t.availableRoles;return r.length!==0?r:t.groups}let Lbe="Stop acting as one role",zbe="All of them — choose one to narrow.";function Ube(e,t){let r=e.length;if(r!==1&&r!==0)return t.activeRole}function Bbe(e){let t=Sa(),r=ce(()=>!1),n=r[1],i=r[0],o=ce(()=>!1),a=o[1],s=o[0],l=ce(()=>{}),c=l[1],d=l[0],f=yd(Jn.compact);if(t===void 0)return null;let h=t.identity;if(h===void 0)return null;let p=Cz(t.canSwitchRoles,h),m=Ube(p,h),g=b=>{a(y=>!0),c(y=>{}),t.switchRole(b).then(y=>{if(a(w=>!1),typeof y!="object")return n(w=>!1);let S=y._0;c(w=>S)})},v;if(i){let b=h.staleRole,y=p.length,S;if(y!==1&&y!==0){let w=h.activeRole,C=h.activeRole;S=L(Bt,{children:[L("div",{children:[_("div",{children:"Acting as",style:$be}),w!==void 0?null:_("div",{children:zbe,style:Ibe}),p.map(A=>{let T=Ce(h.activeRole,A);return L("button",{children:[A,T?_("span",{children:"✓",style:Nbe}):null],"aria-checked":T?"true":"false",role:"radio",style:Tbe(T),disabled:s,onClick:R=>{if(!T)return g(A)}},A)})],"aria-label":"Acting as",role:"radiogroup"}),C!==void 0?L(Bt,{children:[_("hr",{style:w3}),_("button",{children:Lbe,style:Fbe,disabled:s,onClick:A=>g(void 0)})]}):null,d!==void 0?_("div",{children:d,style:Pbe}):null]})}else S=null;v=L("div",{children:[_("div",{children:h.username,style:{fontSize:"var("+$.sizeMd+")",fontWeight:"var("+$.weightMedium+")",marginBottom:"0.25rem"}}),h.groups.length!==0&&p.length<=1?_("div",{children:h.groups.map(w=>_("span",{children:w,style:Rbe},w)),style:{marginBottom:"0.25rem"}}):null,b!==void 0?_("div",{children:b+" is no longer one of your roles, so you are acting as all of them.",style:Obe}):null,S,_("hr",{style:w3}),_("button",{children:"Sign out",style:Abe,onClick:w=>{n(C=>!1),t.logout()}})],style:Cbe})}else v=null;return L("div",{children:[L("button",{children:[f?Mbe(h.username):L(Bt,{children:[h.username,m!==void 0?_("span",{children:"· "+m,style:Dbe}):null]}),_("span",{children:i?"▴":"▾",style:kbe})],"aria-label":m!==void 0?"Signed in as "+h.username+", acting as "+m:"Signed in as "+h.username,style:Ebe,onClick:b=>n(y=>!y)}),v],style:{position:"relative"}})}let jbe=Bbe,qbe={background:"var("+x.surface+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+$.fontFamily+")",margin:"6rem auto",maxWidth:"360px",padding:"2rem",borderRadius:"var("+Y.md+")"},E3={color:"var("+x.textSecondary+")",display:"block",fontSize:"var("+$.sizeSm+")",marginBottom:"0.25rem"},k3={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",fontSize:"var("+$.sizeMd+")",marginBottom:"1rem",padding:"0.5rem 0.75rem",width:"100%",borderRadius:"var("+Y.sm+")",boxSizing:"border-box"};function Vbe(e){return{background:e?"var("+x.textDisabled+")":"var("+x.brand+")",border:"none",color:"var("+x.textOnBrand+")",cursor:e?"not-allowed":"pointer",fontSize:"var("+$.sizeMd+")",fontWeight:"var("+$.weightMedium+")",padding:"0.625rem",width:"100%",borderRadius:"var("+Y.sm+")"}}let Gbe={color:"var("+x.error+")",fontSize:"var("+$.sizeSm+")",marginBottom:"0.75rem"};function Kbe(e){let t=Sa(),r=ce(()=>""),n=r[1],i=r[0],o=ce(()=>""),a=o[1],s=o[0],l=ce(()=>{}),c=l[1],d=l[0],f=ce(()=>!1),h=f[1],p=f[0],m=g=>{g.preventDefault(),c(v=>{}),h(v=>!0),t!==void 0?Mt(t.login(i,s).then(v=>{if(h(y=>!1),typeof v!="object")return;let b=v._0;c(y=>b)}),v=>(h(b=>!1),c(b=>"Unexpected error during sign-in"),Promise.resolve())):(c(v=>"Auth provider missing"),h(v=>!1),Promise.resolve())};return L("div",{children:[_("h1",{children:"Sign in",style:{fontSize:"var("+$.sizeXl+")",fontWeight:"var("+$.weightBold+")",margin:"0 0 1.5rem"}}),L("form",{children:[_("label",{children:"Username",style:E3}),_("input",{style:k3,autoComplete:"username",autoFocus:!0,type:"text",value:i,onChange:g=>{let v=g.target.value;n(b=>v)}}),_("label",{children:"Password",style:E3}),_("input",{style:k3,autoComplete:"current-password",type:"password",value:s,onChange:g=>{let v=g.target.value;a(b=>v)}}),d!==void 0?_("div",{children:d,style:Gbe}):null,_("button",{children:p?"Signing in…":"Sign in",style:Vbe(p),disabled:p,type:"submit"})],onSubmit:m})],style:qbe})}let C3=Kbe;function Hbe(e){let t=e.children,r=e.url,n=r!==void 0?r:"",i=t!==void 0?t:"No route matched!";return D(JV(e.routes,n),i)}let Wbe=Hbe;function Jbe(e){return e.button===0&&!e.altKey&&!e.ctrlKey&&!e.metaKey?!e.shiftKey:!1}function Qbe(e){let t=xt(Dv),r=aO(t.prefix,e.route),n=i=>{if(!i.defaultPrevented&&Jbe(i))return i.preventDefault(),ca(r)};return _("a",{children:e.children,href:r,onClick:n})}let Ybe=Qbe,am=Zt(void 0),Xbe=am.Provider;function Zbe(e){let t=e.initialPages,r=t!==void 0?t:[],n=ce(()=>r),i=n[1],o=ce(()=>[]),a=o[1],s=n[0].concat(o[0]);return ur(Xbe,{value:{register:m=>i(g=>g.concat(m)),deregister:m=>i(g=>g.filter(v=>v.fragmentId!==m)),setPluginPages:m=>a(g=>m),getPages:()=>s,getPage:m=>s.find(g=>g.fragmentId===m)},children:e.children})}let e_e={make:Zbe};function Rz(){let e=xt(am);return e!==void 0?e.getPages():[]}function Az(e){return!D(e.menuEntry.hidden,!1)}let t_e=[];function r_e(e){return!1}let n_e={activeAccess:t_e,hasAccess:r_e},$z=Zt(n_e),i_e=$z.Provider;function o_e(e){let t=e.access;return ur(i_e,{value:{activeAccess:t,hasAccess:i=>t.some(o=>o===i)},children:e.children})}function Ks(){return xt($z).hasAccess}let a_e=o_e;function xu(e){return"var("+e+")"}let s_e=E([z("flex"),X("center"),u("gap",xu(O.sm)),u("padding","6px var("+O.sm+") 6px 14px"),u("border-radius",xu(Y.md)),u("color",xu(x.textDisabled)),u("font-size",xu($.sizeSm)),Re("notAllowed"),zO("none")]),l_e=E([u("font-size","14px"),rn(0)]),u_e=E([si(1),u("font-weight",xu($.weightMedium))]),c_e=E([u("font-size",xu($.sizeXs)),u("color",xu(x.brand)),Re("pointer"),u("text-decoration","none"),rn(0)]);function d_e(e){return L("div",{children:[_("span",{children:"[locked]",className:l_e}),_("span",{children:e.label,className:u_e}),_("span",{children:"Upgrade",className:c_e})],className:s_e})}let f_e=d_e;function h_e(e,t){return e.length===0?"Absent":e.every(r=>{let n=r.requiredAccess;return n!==void 0?!t(n):!1})?"Locked":"Active"}function Vn(e){return"var("+e+")"}let p_e=E([z("flex"),_e("column"),u("gap","2px"),u("padding","var("+O.sm+")"),lr("& a",[u("text-decoration","none"),u("color","inherit"),u("display","block"),u("outline-offset","2px")])]),m_e=E([u("color",Vn(x.textDisabled)),u("font-size",Vn($.sizeXs)),u("font-weight",Vn($.weightBold)),u("letter-spacing","0.08em"),u("text-transform","uppercase"),u("padding","var("+O.xs+") var("+O.sm+")"),Uo(ke(12)),Op(ke(2))]),R3=E([At("relative"),z("flex"),X("center"),u("gap",Vn(O.sm)),u("padding","6px var("+O.sm+") 6px 14px"),u("color",Vn(x.textSecondary)),u("font-size",Vn($.sizeMd)),u("line-height","1.4"),Re("pointer"),u("border-radius",Vn(Y.md)),u("text-decoration","none"),u("transition","background-color 140ms ease, color 140ms ease, transform 140ms ease"),lr("&::before",[u("content","''"),At("absolute"),u("left","4px"),u("top","50%"),u("width","3px"),u("height","0"),u("border-radius",Vn(Y.full)),u("background",Vn(x.brand)),u("transform","translateY(-50%)"),u("transition","height 160ms ease")]),Ue([u("background",Vn(x.surfaceSubtle)),u("color",Vn(x.textPrimary)),u("transform","translateX(2px)")]),Ga("(prefers-reduced-motion: reduce)",[u("transition","none"),Ue([u("transform","none")]),lr("&::before",[u("transition","none")])])]),g_e=E([u("background",Vn(x.brandSubtle)),u("color",Vn(x.textPrimary)),u("font-weight",Vn($.weightMedium)),lr("&::before",[u("height","56%")]),Ue([u("background",Vn(x.brandSubtle)),u("color",Vn(x.textPrimary)),u("transform","none")])]),v_e=E([u("font-size","14px"),u("line-height","1"),rn(0)]),b_e=E([u("white-space","nowrap"),u("overflow","hidden"),u("text-overflow","ellipsis")]),__e=E([u("font-size","12px"),u("color",Vn(x.textDisabled)),Pp("auto"),rn(0)]);function y_e(e,t){let r=e.url;return r!==void 0?r===t?!0:t.startsWith(r+"/"):!1}function x_e(e){let t=e.onNavigate,r=e.hasAccess,n=e.isActive,i=e.page,o=ne(i.requiredAccess,!1,c=>!r(c)),a=n?R3+" "+g_e:R3,s=L(Bt,{children:[ne(i.menuEntry.icon,null,c=>_("span",{children:c,"aria-hidden":!0,className:v_e})),_("span",{children:i.menuEntry.label,className:b_e}),o?_("span",{children:"[locked]",className:__e}):null]}),l=i.url;return!o&&l!==void 0?_(Ybe,{route:l,children:_("span",{children:s,"aria-current":n?"page":void 0,className:a,onClick:c=>t()})}):_("div",{children:s,className:a,role:"button"})}function A3(e){let t=e.onNavigate,r=e.hasAccess,n=e.currentUrl,i=e.pages.toSorted((o,a)=>_w(o.menuEntry.sortOrder,a.menuEntry.sortOrder));return L(Bt,{children:[ne(e.label,null,o=>_("div",{children:o,className:m_e})),i.map(o=>_(x_e,{page:o,isActive:y_e(o,n),hasAccess:r,onNavigate:t},o.fragmentId))]})}function S_e(e){let t=e.onNavigate,r=e.currentUrl,n=t!==void 0?t:()=>{},i=Rz(),o=Ks(),a=i.filter(Az),s={};a.forEach(d=>{let f=D(d.menuEntry.group,""),h=D(s[f],[]);s[f]=h.concat([d])});let l=D(s[""],[]),c=Object.entries(s).filter(d=>d[0]!=="").toSorted((d,f)=>{let h=nt(d[1],999,(m,g)=>m<g.menuEntry.sortOrder?m:g.menuEntry.sortOrder),p=nt(f[1],999,(m,g)=>m<g.menuEntry.sortOrder?m:g.menuEntry.sortOrder);return _w(h,p)});return L("nav",{children:[l.length!==0?_(A3,{label:void 0,pages:l,currentUrl:r,hasAccess:o,onNavigate:n}):null,c.map(d=>{let f=d[1],h=d[0];switch(h_e(f,o)){case"Active":return _(A3,{label:h,pages:f,currentUrl:r,hasAccess:o,onNavigate:n},h);case"Locked":return _(f_e,{label:h},h);case"Absent":return null}})],"aria-label":"primary navigation",className:p_e})}let w_e=S_e,Tz=Zt(void 0),Nz=Zt(void 0),E_e=Tz.Provider,k_e=Nz.Provider;function C_e(e){return ur(E_e,{value:e.target,children:ur(k_e,{value:e.controlsTarget,children:e.children})})}let R_e={make:C_e};function Dz(){return xt(Tz)}function A_e(){return xt(Nz)}function cv(e,t){return e!==void 0?oO(t,kt(e)):t}function mn(e){return"var("+e+")"}let Fz="52px",$_e=E([z("flex"),_e("row"),MO({NAME:"vh",VAL:100}),u("overflow","hidden"),u("background",mn(x.background)),u("font-family",mn($.fontFamily)),u("color",mn(x.textPrimary))]),Iz=E([z("flex"),_e("column"),u("width","236px"),rn(0),u("background",mn(x.surface)),u("border-right","1px solid var("+x.borderSubtle+")"),u("overflow","hidden"),Ga(Jn.compact,[At("fixed"),Bo(ke(0)),Us(ke(0)),Ip(ke(0)),u("width","min(268px, 82vw)"),u("z-index","950"),u("box-shadow",mn(Zr.lg)),u("transform","translateX(-100%)"),u("visibility","hidden"),u("transition","transform 180ms ease, visibility 0s linear 180ms")]),Ga("(prefers-reduced-motion: reduce)",[u("transition","none")])]),T_e=xr([Iz,E([Ga(Jn.compact,[u("transform","translateX(0)"),u("visibility","visible"),u("transition","transform 180ms ease, visibility 0s linear 0s")])])]),N_e=E([At("fixed"),Bo(ke(0)),Us(ke(0)),js(ke(0)),Ip(ke(0)),u("background","rgba(0,0,0,0.45)"),u("z-index","900"),u("display","none"),Ga(Jn.compact,[u("display","block")])]),D_e=E([u("display","none"),Ga(Jn.compact,[u("display","inline-flex")]),X("center"),et("center"),u("vertical-align","middle"),u("margin-right",mn(O.sm)),u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",mn(Y.md)),u("padding","2px var("+O.sm+")"),u("color",mn(x.textSecondary)),u("font-size",mn($.sizeMd)),u("line-height","1.6"),Re("pointer"),Ue([u("background",mn(x.surfaceSubtle)),u("color",mn(x.textPrimary))])]),F_e=E([z("flex"),X("center"),u("gap",mn(O.sm)),u("height",Fz),rn(0),u("padding","0 var("+O.md+")"),u("color",mn(x.textPrimary)),u("font-size",mn($.sizeLg)),u("font-weight",mn($.weightBold)),u("letter-spacing","-0.01em")]),I_e=E([u("white-space","nowrap"),u("overflow","hidden"),u("text-overflow","ellipsis")]),P_e=E([si(1),u("overflow-y","auto"),u("min-height","0")]),O_e=E([z("flex"),_e("column"),si(1),u("min-width","0"),u("overflow","hidden")]),M_e=E([z("flex"),X("center"),u("min-height",Fz),rn(0),u("padding","var("+O.xs+") var("+O.lg+")"),u("border-bottom","1px solid var("+x.borderSubtle+")"),u("background",mn(x.surface))]),L_e=E([u("display","flow-root"),si(1),u("min-width","0")]),Pz=E([u("display","contents")]),z_e=E([u("float","right"),z("flex"),X("center"),et("flexEnd"),u("flex-wrap","wrap"),u("gap",mn(O.sm)),u("margin-left",mn(O.md)),u("max-width","100%"),lr("& > *, & > ."+Pz+" > *",[u("min-width","0"),u("max-width","100%")])]),U_e=E([u("display","block"),u("min-width","0")]),B_e=E([z("flex"),_e("column"),si(1),u("overflow","auto"),u("padding","var("+O.md+") var("+O.lg+")"),u("background",mn(x.background))]),Oz="a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])";function j_e(e){let t=Array.from(e.querySelectorAll(Oz))[0];if(t!==void 0){kt(t).focus();return}}function q_e(e,t){let r=n=>{switch(n.key){case"Escape":return t();case"Tab":let o=Array.from(e.querySelectorAll(Oz)),a=o.length;if(a===0){n.preventDefault();return}let s=o[0],l=o[a-1|0],c=document.activeElement,d=c==null?void 0:Nt(c),f=ne(d,!1,m=>e.contains(m)),h=m=>c!=null&&m!==void 0?c===kt(m):!1,p=f?n.shiftKey&&h(s)?l:!n.shiftKey&&h(l)?s:void 0:s;if(p!==void 0){n.preventDefault(),kt(p).focus();return}else return;default:return}};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}}function V_e(e){let t=e.loading,r=e.routesReady,n=e.fallback,i=e.appName,o=i!==void 0?i:"Reventless",a=n!==void 0?n:"404 — Page not found",s=r!==void 0?r:!0,l=t!==void 0?t:null,c=sO(),d=ce(()=>{}),f=d[1],h=ce(()=>{}),p=h[1],m=(N,I)=>{let M=I==null?void 0:Nt(I);return N(P=>P!==void 0&&I!=null&&kt(P)===I?P:M)},g=N=>m(f,N),v=N=>m(p,N),b=ce(()=>!1),y=b[1],S=b[0],w=yd(Jn.compact),C=Nr(()=>y(N=>!1),[]),A=Ne(null),T=Ne(null),R=Ne(!1);return Ae(()=>{if(S&&!w){y(N=>!1);return}if(S){R.current=!0;let N=T.current;return N!=null?(j_e(N),q_e(N,C)):void 0}if(R.current&&(R.current=!1,w)){let N=A.current;N?.focus()}},[S,w]),L("div",{children:[L("aside",{children:[L("div",{children:[ne(e.logoUrl,null,N=>_("img",{style:{height:"22px"},alt:o,src:N})),_("span",{children:o,className:I_e,title:o})],className:F_e}),_("div",{children:_(w_e,{currentUrl:c,onNavigate:C}),className:P_e})],ref:Nt(T),className:S?T_e:Iz,id:"rv-shell-nav"}),S?_("div",{"aria-hidden":!0,className:N_e,onClick:N=>C()}):null,L("main",{children:[_("div",{children:L("div",{children:[L("div",{children:[_("div",{ref:Nt(v),className:Pz}),D(e.headerSlot,null)],className:z_e}),_("div",{children:_("button",{children:"☰",ref:Nt(A),"aria-label":S?"Close navigation":"Open navigation","aria-expanded":S,"aria-controls":"rv-shell-nav",className:D_e,onClick:N=>y(I=>!I)}),ref:Nt(g),className:U_e})],className:L_e}),className:M_e}),_("div",{children:_(R_e.make,{target:d[0],controlsTarget:h[0],children:s?_(Wbe,{url:c,routes:e.router,children:a}):l}),className:B_e})],className:O_e})],className:$_e})}let G_e=V_e,sm=Zt(void 0),K_e=sm.Provider;function H_e(e){let t=e.access,r=e.initialPanels,n=r!==void 0?r:[],i=t!==void 0?t:[],o=ce(()=>n),a=o[1],s=ce(()=>[]),l=s[1],c=o[0].concat(s[0]);return ur(K_e,{value:{register:b=>a(y=>y.concat(b)),deregister:b=>a(y=>y.filter(S=>S.extensionPackage!==b)),setPluginPanels:b=>l(y=>b),getPanel:b=>c.find(y=>y.fragmentId===b),getPanelsForPosition:b=>c.filter(y=>y.positions.some(S=>S===b)),hasAccess:b=>i.some(y=>y===b)},children:e.children})}let W_e={make:H_e};function J_e(e){let t=xt(sm);return t!==void 0?t.getPanelsForPosition(e):[]}function Q_e(e){let t=xt(sm);if(t!==void 0)return t.getPanel(e)}function kk(e){return"/"+e.environment+"/"+e.platformName}function Mz(e){let t=e.split("?")[0],r=t.split("/").filter(l=>l!==""),n=r[0],i=r[1];if(n===void 0||i===void 0)return;let o={environment:n,platformName:i},a=kk(o),s=t.startsWith(a)?t.slice(a.length):"/";return[o,s===""?"/":s]}let Y_e=Zt(void 0),X_e=Y_e.Provider;function Z_e(e){return ur(X_e,{value:e.scope,children:e.children})}let Lz={make:Z_e};function eye(e){let t=e.length-1|0,r=0;for(;;){let n=r,i=t;if(i<0)return n;r={hd:e[i],tl:n},t=i-1|0}}let zz=Zt(void 0),Uz=Zt({routes:[],publicLinks:Iu()}),Bz=Zt(!1),tye=zz.Provider;function rye(e){return ur(tye,{value:e.value,children:e.children})}let nye=Uz.Provider;function iye(e){return ur(nye,{value:e.value,children:e.children})}let oye=Bz.Provider;function aye(e){return ur(oye,{value:e.value,children:e.children})}function sye(e){let t=ce(()=>({routes:[],publicLinks:Iu()})),r=t[1],n=t[0],i=ce(()=>({routes:[],publicLinks:Iu()})),o=i[1],a=i[0],s=ce(()=>!1),l=s[1],c=n.routes.concat(a.routes),d=dx(n.publicLinks,a.publicLinks),f={routes:c,publicLinks:d};return _(rye,{value:{register:(g,v)=>r(b=>({routes:b.routes.concat(g),publicLinks:dx(b.publicLinks,v)})),setPluginRoutes:(g,v)=>{o(b=>({routes:g,publicLinks:v})),l(b=>!0)}},children:_(aye,{value:s[0],children:_(iye,{value:f,children:_(tG.make,{registry:d,children:e.children})})})})}let lye={make:sye};function Ck(){return xt(zz)}function uye(){return xt(Bz)}function cye(){let e=xt(Uz).routes;return It(()=>HV(eye(e.toReversed())),[e])}let dye=(function(e,t){return e.contains(t)});function Yr(e){return"var("+e+")"}let fye=E([u("position","relative"),z("inlineFlex")]),hye=E([z("inlineFlex"),X("center"),u("gap","3px"),u("background",Yr(x.surface)),u("color",Yr(x.textPrimary)),u("border","1px solid var("+x.border+")"),u("border-radius",Yr(Y.md)),u("padding","2px var("+O.xs+")"),u("font-family",Yr($.fontFamily)),u("font-size",Yr($.sizeMd)),u("line-height","1.4"),Re("pointer"),Ue([u("background",Yr(x.surfaceSubtle))])]),pye=E([u("font-size","0.625rem"),u("color",Yr(x.textSecondary))]),mye=E([u("position","absolute"),u("top","calc(100% + 0.5rem)"),u("right","0"),u("min-width","170px"),u("padding",Yr(O.xs)),u("background",Yr(x.surfaceElevated)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",Yr(Y.md)),u("box-shadow",Yr(Zr.md)),u("z-index","10")]),jz=E([z("flex"),X("center"),u("gap",Yr(O.sm)),u("width","100%"),u("padding","var("+O.xs+") var("+O.sm+")"),u("background","transparent"),u("border","none"),u("border-radius",Yr(Y.sm)),u("color",Yr(x.textPrimary)),u("font-family",Yr($.fontFamily)),u("font-size",Yr($.sizeSm)),u("text-align","left"),Re("pointer"),Ue([u("background",Yr(x.surfaceSubtle))])]),gye=xr([jz,E([u("font-weight",Yr($.weightMedium))])]),vye=E([u("font-size",Yr($.sizeMd)),u("line-height","1"),u("width","1.25em"),u("text-align","center"),rn(0)]),bye=E([u("margin-left","auto"),u("color",Yr(x.textSecondary)),u("font-size",Yr($.sizeXs))]);function zy(e){switch(e){case"Dark":return"Dark";case"Light":return"Light";case"Neutral":return"Neutral";case"HighContrast":return"High contrast"}}function $3(e){switch(e){case"Dark":return"☾";case"Light":return"☀";case"Neutral":return"◯";case"HighContrast":return"◐"}}let _ye=["Light","Dark","Neutral","HighContrast"];function yye(e){let t=vce(),r=t.setPreset,n=t.preset,i=ce(()=>!1),o=i[1],a=i[0],s=Ne(null);return Ae(()=>{if(!a)return;let l=d=>{let f=d.target,h=s.current;if(h!=null&&!dye(h,f))return o(p=>!1)},c=d=>{if(d.key==="Escape")return o(f=>!1)};return document.addEventListener("mousedown",l),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c)}},[a]),L("div",{children:[L("button",{children:[_("span",{children:$3(n),"aria-hidden":!0}),_("span",{children:a?"▴":"▾","aria-hidden":!0,className:pye})],"aria-label":"Theme: "+zy(n),"aria-expanded":a,"aria-haspopup":"menu",className:hye,title:"Theme: "+zy(n),onClick:l=>o(c=>!c)}),a?_("div",{children:_ye.map(l=>{let c=l===n;return L("button",{children:[_("span",{children:$3(l),"aria-hidden":!0,className:vye}),zy(l),c?_("span",{children:"✓",className:bye}):null],"aria-checked":c?"true":"false",className:c?gye:jz,role:"radio",onClick:d=>{r(l),o(f=>!1)}},b5(l))}),"aria-label":"Theme",className:mye,role:"radiogroup"}):null],ref:Nt(s),className:fye})}let xye=yye;function T3(e){return Object.fromEntries([["eq",e]])}function Sye(e,t){let r=he.object(e),n=r!==void 0?Object.fromEntries(Object.entries(r)):{},i=k(n.filter,he.object),o=i!==void 0?Object.fromEntries(Object.entries(i)):{};return o.environment=T3(t.environment),o.platformName=T3(t.platformName),n.filter=o,n}let wye=/\$filter\s*:\s*[A-Za-z0-9_]*Filter\b/,Eye=/\$filter\s*:/,N3={};function kye(e){if(N3[e]===void 0){N3[e]=!0,console.warn("PlatformFilter: this query declares a `$filter` variable that is not a fleet-scope `<Type>Filter` input object, so it is left untouched. `$filter` is reserved for platform-scope injection in fleet mode — rename the variable (e.g. `$logFilter`) to avoid ambiguity. Query: "+e);return}}function Cye(e){return t=>((r,n)=>wye.test(r)?t(r,Sye(n,e)):(Eye.test(r)&&kye(r),t(r,n)))}let Rye={background:"var("+x.surface+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",fontFamily:"var("+$.fontFamily+")",margin:"6rem auto",maxWidth:"480px",padding:"2rem",borderRadius:"var("+Y.md+")"},Aye={background:"var("+x.surfaceElevated+")",border:"1px solid var("+x.border+")",color:"var("+x.textPrimary+")",cursor:"pointer",display:"flex",fontSize:"var("+$.sizeMd+")",marginBottom:"0.5rem",padding:"0.75rem 1rem",textAlign:"left",width:"100%",borderRadius:"var("+Y.sm+")",alignItems:"center",justifyContent:"space-between"},$ye={background:"var("+x.brandSubtle+")",color:"var("+x.brand+")",fontSize:"var("+$.sizeXs+")",padding:"0.125rem 0.5rem",borderRadius:"var("+Y.full+")"};function Tye(e){let t=e.discover,r=li(),n=ce(()=>"Loading"),i=n[1],o=n[0];Ae(()=>{r!==void 0?(i(s=>"Loading"),Mt(t(r).then(s=>i(l=>({TAG:"Loaded",_0:s}))),s=>{let l=D(k(aV(s),c=>c.message),"Platform discovery failed");return i(c=>({TAG:"Failed",_0:l})),Promise.resolve()})):i(s=>({TAG:"Failed",_0:"PlatformPicker rendered outside AutoGraphQL.Provider"}))},[Ee(r)]);let a;if(typeof o!="object")a=_("div",{children:"Discovering platforms…",style:{color:"var("+x.textSecondary+")"}});else if(o.TAG==="Loaded"){let s=o._0;a=s.length!==0?s.map(l=>L("button",{children:[l.platformName,_("span",{children:l.environment,style:$ye})],style:Aye,onClick:c=>ca(kk(l)+"/")},l.environment+"/"+l.platformName)):_("div",{children:"No platforms discovered.",style:{color:"var("+x.textSecondary+")"}})}else a=_("div",{children:o._0,style:{color:"var("+x.error+")",fontSize:"var("+$.sizeSm+")"}});return L("div",{children:[_("h1",{children:"Select a platform",style:{fontSize:"var("+$.sizeXl+")",fontWeight:"var("+$.weightBold+")",margin:"0 0 1.5rem"}}),a],style:Rye})}let Nye=Tye;function Uy(e){return k(e,t=>{if(t.trim()!=="")return t})}function Kf(e,t,r,n,i){let o=i!==void 0?i:!1,a=k(n,c=>c.nav),s=o?Uy(k(a,c=>c.scopedLabel)):void 0,l=s!==void 0?s:Uy(k(a,c=>c.label));return{label:D(l,t),icon:void 0,group:D(Uy(k(a,c=>c.group)),e),sortOrder:D(k(a,c=>c.order),r),hidden:k(a,c=>c.hidden)}}function Dye(e){let t=e.lastIndexOf("_");if(t!==-1)return e.slice(0,t)}function Fye(e,t){return e+"_"+t+"EventHistory"}function Iye(e){return`query AuditTrail($entityId: ID, $eventTypes: [String!], $user: String, $timeFrom: String, $timeTo: String, $first: Int, $after: String) {
|
|
71
|
+
`+e+`(
|
|
72
|
+
filter: {entityId: $entityId, eventTypes: $eventTypes, user: $user, timeFrom: $timeFrom, timeTo: $timeTo}
|
|
73
|
+
first: $first
|
|
74
|
+
after: $after
|
|
75
|
+
) {
|
|
76
|
+
edges {
|
|
77
|
+
node {
|
|
78
|
+
position
|
|
79
|
+
eventType
|
|
80
|
+
payload
|
|
81
|
+
tags { key value }
|
|
82
|
+
meta { user time correlationId causationId }
|
|
83
|
+
recordedAt
|
|
84
|
+
}
|
|
85
|
+
cursor
|
|
86
|
+
}
|
|
87
|
+
pageInfo { hasNextPage endCursor }
|
|
88
|
+
}
|
|
89
|
+
}`}function Pye(e){return ne(k(G(e),t=>F(t,"x-reventless-audit")),!1,t=>{let r=Ze(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let D3={contents:[]};function F3(e){if(!D3.contents.includes(e)){D3.contents.push(e),console.error('[AutoUI] View "'+e+'" opted into an audit trail but no event log could be resolved for it — the view declares no linked write side, so there is no `…EventHistory` field to query. Remove the audit hint, or check that the read model projects an aggregate or slice.');return}}function Oye(e,t){if(!t)return;let r=e.linkedWriteSide[0],n=Dye(e.queryField);if(r!==void 0){if(n!==void 0){let i=Fye(n,r);return{queryField:i,queryDocument:Iye(i),displayName:r}}F3(e.name);return}F3(e.name)}function ll(e,t){return k(F(e,t),ie)}function Mye(e){let t=D(G(e),{}),r=D(k(F(t,"meta"),G),{}),n=Q(D(k(F(t,"tags"),Et),[]),s=>{let l=D(G(s),{}),c=ll(l,"key"),d=ll(l,"value");if(c!==void 0&&d!==void 0)return[c,d]}),i=ll(t,"position"),o=ll(t,"eventType");if(i===void 0||o===void 0)return;let a=D(ll(r,"time"),D(ll(t,"recordedAt"),""));return{position:i,eventType:o,payload:D(F(t,"payload"),{}),tags:n,actor:ll(r,"user"),time:a,recordedAt:D(ll(t,"recordedAt"),a)}}function Lye(e,t){return Q(ZE(e,t),Mye)}function zye(e,t){let r=r5(e,t);return[r.hasNextPage,r.endCursor]}function Uye(e,t){let r=e.startsWith(t)&&e.length>t.length?e.slice(t.length):e;return pt(r).toLowerCase()}function Bye(e){return D(q(G(e),Te),[]).filter(t=>t[0]!=="TAG")}function jye(e){let t={};return e.map(r=>{let n=JSON.stringify(Oe(Te(t)),null,2);Bye(r.payload).forEach(o=>{t[o[0]]=o[1]});let i=JSON.stringify(Oe(Te(t)),null,2);return[n,i]})}let qye="System";function Vye(e,t){let r=jye(e);return e.map((n,i)=>{let o=D(r[i],["",""]),a=ne(n.tags[0],t,s=>t+" "+s[1]);return{id:n.position,verb:Uye(n.eventType,t),subject:a,actor:D(n.actor,qye),timestamp:n.time,before:o[0],after:o[1]}}).toReversed()}function Gye(e){let t=[];return e.forEach(r=>ee(r.actor,n=>{if(!t.includes(n)){t.push(n);return}})),t.toSorted(kd)}function Kye(e){let t=[];return e.forEach(r=>{if(!t.includes(r.eventType)){t.push(r.eventType);return}}),t.toSorted(kd)}function Zi(e){return"var("+e+")"}let Hye=E([z("flex"),_e("column"),X("center"),et("center"),u("gap",Zi(O.lg)),u("padding",Zi(O.xxl)),ga({NAME:"percent",VAL:100}),MO({NAME:"percent",VAL:100}),Xa("center"),u("min-height","400px")]),Wye=E([u("font-size","48px"),u("line-height","1")]),Jye=E([u("color",Zi(x.textPrimary)),u("font-size",Zi($.sizeXxl)),u("font-weight",Zi($.weightBold)),yn(ke(0))]),Qye=E([u("color",Zi(x.textSecondary)),u("font-size",Zi($.sizeLg)),u("line-height",Zi($.lineHeightRelaxed)),u("max-width","480px"),yn(ke(0))]),Yye=E([u("background",Zi(x.brand)),u("color",Zi(x.textOnBrand)),u("border-radius",Zi(Y.md)),u("padding","var("+O.sm+") var("+O.lg+")"),u("font-size",Zi($.sizeMd)),u("font-weight",Zi($.weightMedium)),u("border","none"),u("cursor","pointer"),Uo(ke(8))]);function Xye(e){let t=e.definition;return L("div",{children:[_("div",{children:"[locked]",className:Wye}),_("h2",{children:t.title,className:Jye}),_("p",{children:ne(t.requiredAccess,"This feature requires an upgrade.",r=>'This feature requires the "'+r+'" access tier.'),className:Qye}),_("button",{children:"Upgrade to unlock",className:Yye})],className:Hye})}let Zye=Xye;function e1e(e){let t=e.children,r=e.definition,n=Ks(),i=r.requiredAccess;return i!==void 0&&!n(i)?_(Zye,{definition:r}):t}let lg=e1e,t1e=F;function I3(e,t){let r=k(t[0],n=>F(e,n));if(r!==void 0&&t.every(n=>Ce(F(e,n),r)))return r}function dv(e,t,r){let n=F(e,t);return n!==void 0?r(n):!0}function Rk(e,t,r){return Q(t,n=>{let i=F(e,n);if(i!==void 0&&!r(i))return n+': requires "'+i+'"'})}let Ak=["body","text","message","comment","content"],r1e=["author","createdby","user","commenter","postedby"],n1e=["createdat","postedat","at","commentedat"];function qz(e){return Q(Dr(e),t=>{if(zp(t[1]))return t[0]})}function $k(e,t){return qz(e).find(r=>t.includes(r.toLowerCase()))}function i1e(e){let t=_n(e,void 0,void 0),r=Dr(e).map(n=>n[0]).find(n=>ne(F(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:$k(e,r1e)}function o1e(e){return Q(Dr(e),t=>{if(Jv(t[1]))return t[0]}).find(t=>n1e.includes(t.toLowerCase()))}function Vz(e){return qz(e).filter(t=>{let r=t.toLowerCase();return r!=="id"?r.endsWith("id"):!1})}function Gz(e,t){let r=Eo(t).toLowerCase();return Vz(e).find(n=>n.toLowerCase()===r+"id")}function a1e(e){let t=Vz(e);if(t.length===1)return t[0]}function s1e(e){return ne(k(G(e),t=>F(t,"x-reventless-comments")),!1,t=>{let r=Ze(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}function P3(e,t){let r=e.toLowerCase(),n=t.toLowerCase(),i=Eo(t).toLowerCase();return r.endsWith("comments")?r===i+"comments"?!0:r===n+"comments":!1}let l1e=["addcomment","postcomment","comment","writecomment","leavecomment"];function u1e(e,t){let r=Q(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>l1e.some(i=>n.name.toLowerCase().startsWith(i)))}let O3={contents:[]};function c1e(e){if(!O3.contents.includes(e)){O3.contents.push(e),console.error('[AutoUI] Read model "'+e+'" announces itself as comments but has no body field — no comment thread is wired. The convention expects a string field named '+Ak.join(" | ")+' (plus an entity ref like "orderId"); see docs/guides/comments-read-model-convention.md.');return}}function d1e(e,t){return Q(e.readModels.filter(r=>r.name!==t?s1e(r.schema)?!0:P3(r.name,t):!1),r=>{let n=Gz(r.schema,t),i=n!==void 0?n:P3(r.name,t)?a1e(r.schema):void 0,o=$k(r.schema,Ak);if(o!==void 0)return i!==void 0?{readModel:r,entityField:i,bodyField:o,authorField:i1e(r.schema),timestampField:o1e(r.schema),postCommand:u1e(r,e)}:void 0;c1e(r.name)})[0]}function Lc(e,t){return k(F(e,t),ie)}function f1e(e,t,r){let n=Q(t,o=>{let a=D(G(o),{});if(Ce(Lc(a,e.entityField),r))return a}),i=o=>k(k(e.timestampField,a=>Lc(o,a)),Qn);return n.toSorted((o,a)=>{let s=i(o),l=i(a);return s!==void 0?l!==void 0?s-l:-1:l!==void 0?1:0}).map((o,a)=>({id:D(Lc(o,"id"),"#"+a.toString()),body:D(Lc(o,e.bodyField),""),author:k(e.authorField,s=>Lc(o,s)),timestamp:k(e.timestampField,s=>Lc(o,s))}))}function h1e(e,t,r){let n=e.postCommand,i=D(k(n,a=>a.aggregateIdField),e.entityField),o=D(k(n,a=>$k(a.schema,Ak)),e.bodyField);return Oe([[i,t],[o,r]])}function lm(e){let t=e.isId||e.isCompositeId||e.isSubId||e.isCompositeSubId||Ee(e.index)||e.scan,r=e.isId||e.isSubId||e.isCompositeSubId||Ee(e.index)||e.scanSort;return{filter:t,sort:r}}function M3(e){return lm(e.ann)}function Kz(e){let t=Ee(QO(e)),r=Hv(e).length!==0,n=YO(e).length!==0;return{search:t||r||n}}function NS(e){let r=D(q(k(k(G(e),a=>F(a,"properties")),G),Te),[]).map(a=>lm(Io(a[1]))),n=r.some(a=>a.filter),i=r.some(a=>a.sort),o=Kz(e);return{hasFilter:n,hasSort:i,hasSearch:o.search}}function L3(e,t){let r={},n={};return Te(e).forEach(i=>{let o=i[1];if(o==="")return;let a=i[0],s=t.find(l=>l.key===a);if(s!==void 0){lm(s.ann).filter?r[a]=o:n[a]=o;return}n[a]=o}),[r,n]}function z3(e,t,r){if(e===void 0)return"NoSort";let n=r.find(i=>i.key===e);return n!==void 0?lm(n.ann).sort?{TAG:"ServerSort",_0:e,_1:t}:{TAG:"ClientSort",_0:e,_1:t}:"NoSort"}function Hz(e,t,r,n){let i={};if(r.search&&t!==""&&(i.search=t),Te(e).forEach(o=>{let a=o[1],s=o[0],l=n.find(f=>f.key===s),c=q(l,f=>f.kind),d;if(c!==void 0&&typeof c!="object")switch(c){case"KBoolean":d=a==="true";break;case"KNumber":d=D(q(Fs(a),f=>f),a);break;default:d=a}else d=a;i[s+"Eq"]=d}),Te(i).length!==0)return i}function p1e(e){if(typeof e!="object"||e.TAG!=="ServerSort")return;let t=e._1==="Asc"?"ASC":"DESC";return Oe([["field",e._0],["direction",t]])}function m1e(e,t){return ne(Dr(e).find(r=>r[0]===t),!1,r=>lm(Io(r[1])).filter)}let U3={contents:[]};function g1e(e,t,r){let n=e+"."+t;if(!U3.contents.includes(n)){U3.contents.push(n),console.error('[AutoUI] View "'+e+'" references "'+r+'" through "'+t+'", but the server cannot filter on that field — so "'+r+'" gets no "'+e+'" panel on its detail page. Annotate '+t+" with @index (or @scan, for a small view) on the read model's state so the connection gains a "+t+"Eq filter; see docs/guides/related-rows.md.");return}}function v1e(e,t){return Q(e.readModels.filter(r=>r.name!==t),r=>{let n=Gz(r.schema,t);if(n!==void 0){if(m1e(r.schema,n))return{readModel:r,refField:n};g1e(r.name,n,t);return}})}function b1e(e,t,r){return t!==void 0?Q(t,n=>{let i=e.find(o=>o.readModel.name===n);if(i!==void 0)return i;console.error("[AutoUI] uiHints.views."+r+'.related names "'+n+'", which does not reference '+r+" through a filterable field — no panel for it. Detected: "+e.map(o=>o.readModel.name).join(", ")+".")}):e}function _1e(e,t){return e+"."+t.readModel.name}function y1e(e,t){let r=G(e);if(r===void 0)return e;let n=Oe(Te(r)),i=k(F(n,"properties"),G);if(i===void 0)return e;let o=Oe(Te(i).filter(s=>s[0]!==t));n.properties=o;let a=k(F(n,"required"),Et);return a!==void 0&&(n.required=a.filter(s=>da(ie(s),t))),n}function x1e(e,t){let r={};return ee(Hz(Oe([[e.refField,t]]),"",{search:!1},[]),n=>{r.filter=n}),r}function Ia(e){return"var("+e+")"}function Wz(e){switch(e){case"Success":return x.success;case"Warning":return x.warning;case"Error":return x.error;case"Info":return x.info}}function S1e(e){return E([z("flex"),X("flexStart"),u("gap",Ia(O.sm)),u("padding","var("+O.sm+") var("+O.md+")"),u("border-radius",Ia(Y.md)),u("border-left","3px solid var("+Wz(e)+")"),u("background",Ia(x.surfaceElevated)),u("font-size",Ia($.sizeMd)),u("line-height",Ia($.lineHeightNormal))])}function w1e(e){return E([u("color",Ia(Wz(e))),u("font-size","16px"),rn(0),Uo(ke(1))])}let E1e=E([si(1)]),k1e=E([u("font-weight",Ia($.weightMedium)),u("color",Ia(x.textPrimary)),Op(ke(2))]),C1e=E([u("color",Ia(x.textSecondary))]),R1e=E([u("background","none"),dJ(ke(0),"none",gJ),Re("pointer"),u("color",Ia(x.textSecondary)),u("font-size","16px"),u("line-height","1"),u("padding","0"),rn(0)]);function A1e(e){switch(e){case"Success":return"OK";case"Warning":return"!";case"Error":return"X";case"Info":return"i"}}function $1e(e){let t=e.variant,r=t!==void 0?t:"Info";return L("div",{children:[_("span",{children:A1e(r),className:w1e(r)}),L("div",{children:[ne(e.title,null,n=>_("div",{children:n,className:k1e})),_("div",{children:e.message,className:C1e})],className:E1e}),ne(e.onDismiss,null,n=>_("button",{children:"×","aria-label":"Dismiss",className:R1e,onClick:i=>n()}))],className:S1e(r),role:"alert"})}let Tk=$1e;function Va(e){return"var("+e+")"}let T1e=E([At("fixed"),Bo(ke(0)),Us(ke(0)),js(ke(0)),Ip(ke(0)),u("background","rgba(0,0,0,0.5)"),z("flex"),X("center"),et("center"),u("z-index","1000"),u("backdrop-filter","blur(2px)")]),N1e=E([u("background",Va(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Va(Y.lg)),u("box-shadow",Va(Zr.lg)),z("flex"),_e("column"),u("max-height","90vh"),u("max-width","90vw"),u("min-width","400px"),u("overflow","hidden")]),D1e=E([z("flex"),X("center"),et("spaceBetween"),u("padding","var("+O.md+") var("+O.lg+")"),u("border-bottom","1px solid var("+x.borderSubtle+")"),rn(0)]),F1e=E([u("color",Va(x.textPrimary)),u("font-size",Va($.sizeLg)),u("font-weight",Va($.weightMedium)),yn(ke(0))]),I1e=E([u("background","none"),u("border","none"),u("cursor","pointer"),u("color",Va(x.textSecondary)),u("font-size","18px"),u("padding","0"),u("line-height","1"),Ue([u("color",Va(x.textPrimary))])]),P1e=E([u("padding",Va(O.lg)),u("overflow-y","auto"),si(1)]),O1e=E([z("flex"),X("center"),et("flexEnd"),u("gap",Va(O.sm)),u("padding","var("+O.md+") var("+O.lg+")"),u("border-top","1px solid var("+x.borderSubtle+")"),rn(0)]);function M1e(e){let t=e.onClose,r=e.isOpen;return Ae(()=>{if(!r)return;let n=i=>{if(i.key==="Escape")return t()};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[r]),r?_("div",{children:L("div",{children:[L("div",{children:[_("h2",{children:e.title,className:F1e}),_("button",{children:"x",className:I1e,onClick:n=>t()})],className:D1e}),_("div",{children:e.children,className:P1e}),ne(e.footer,null,n=>_("div",{children:n,className:O1e}))],className:N1e,style:ne(e.width,{},n=>({width:n})),onClick:n=>{n.stopPropagation()}}),className:T1e,onClick:n=>t()}):null}let Nk=M1e;function L1e(e){switch(e){case"Added":return"Added";case"BulkInvalidated":return"BulkInvalidated";case"Removed":return"Removed";case"Updated":return"Updated";default:return}}function z1e(e){let t=he.object(e);if(t===void 0)return;let r=s=>k(t[s],he.string),n=t.state,i=n!==void 0&&Ee(he.object(n))?n:void 0,o=k(r("changeKind"),L1e),a=r("id");if(o!==void 0&&a!==void 0)return{changeKind:o,id:a,sortKeyValue:r("sortKeyValue"),state:i,seq:r("seq")}}function B3(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}let j3="default";function U1e(e,t){let r=B3(e);return typeof t!="object"?"/"+j3+"/"+r+"/*":"/"+j3+"/"+r+"/"+B3(t._0)}function DS(e,t,r,n,i){let o=r!==void 0?r:!0,a=om(),s=U1e(e,t),l=Ne(n);Ae(()=>{l.current=n},[n]);let c=Ne(i);Ae(()=>{c.current=i},[i]);let d=Ne(void 0);Ae(()=>{if(o){if(a===void 0)return;let f=a.apiForReadModel(e),h={contents:void 0},p={contents:void 0},m=setTimeout(()=>{let g=a.subscribe(f,s,b=>{let y=z1e(b);if(y!==void 0)return l.current(y)});h.contents=g;let v=a.registerReconnect(f,()=>ee(c.current,b=>b()));if(p.contents=v,Ce(d.current,s))return d.current=void 0,ee(c.current,b=>b())},100);return()=>{clearTimeout(m);let g=h.contents;g!==void 0&&g();let v=p.contents;if(v!==void 0)return v()}}d.current=s},[s,o,a])}function ao(e){return"var("+e+")"}let B1e=E([z("flex"),_e("column"),u("gap",ao(O.sm))]),j1e=E([u("overflow-x","auto")]),q1e=E([u("border-collapse","collapse"),u("font-size",ao($.sizeSm)),u("min-width","min-content")]),Dk=[u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("background",ao(x.surfaceSubtle)),u("white-space","nowrap"),u("font-weight",ao($.weightMedium))],V1e=E(Dk.concat([u("text-align","left"),u("color",ao(x.textSecondary))])),G1e=E(Dk.concat([u("text-align","right"),u("color",ao(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),u("font-size",ao($.sizeXs))])),K1e=E(Dk.concat([u("text-align","left"),u("color",ao(x.textPrimary))]));function H1e(e){return E([u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("text-align","right"),u("white-space","nowrap"),u("background",e<=0?"transparent":"color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)"),u("color",e>=.55?ao(x.textOnBrand):e<=0?ao(x.textDisabled):ao(x.textPrimary))])}let W1e=E([z("flex"),X("center"),u("gap","6px"),u("font-size",ao($.sizeXs)),u("color",ao(x.textSecondary))]);function J1e(e){return E([u("width","18px"),u("height","10px"),u("background","color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)"),u("border","1px solid var("+x.borderSubtle+")")])}function Jz(e,t){if(e<=0||t<=0)return 0;let r=e/t;return r<.12?.12:r>1?1:r}function Q1e(e){return nt(e,0,(t,r)=>nt(r,t,(n,i)=>i.value>n?i.value:n))}let Qz=[.12,.35,.6,.85,1];function Y1e(e){let t=e.cells,r=e.colHeaders,n=Q1e(t);return L("div",{children:[_("div",{children:L("table",{children:[_("thead",{children:L("tr",{children:[_("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:V1e,scope:"col"}),r.map(i=>_("th",{children:i.label,className:G1e,scope:"col"},i.value))]})}),_("tbody",{children:e.rowHeaders.map((i,o)=>L("tr",{children:[_("th",{children:i.label,className:K1e,scope:"row"}),r.map((a,s)=>{let l=D(k(t[o],c=>c[s]),{value:0,display:""});return _("td",{children:_("span",{children:l.display,title:i.label+" × "+a.label+": "+l.display}),className:H1e(Jz(l.value,n))},i.value+":"+a.value)})]},i.value))})],className:q1e}),className:j1e}),L("div",{children:["0",Qz.map(i=>_("span",{className:J1e(i)},i.toString())),e.maxLabel],className:W1e})],className:B1e})}let X1e=Y1e;function Z1e(e,t){let r=a=>{throw{RE_EXN_ID:"Undefined_recursive_module",_1:e,Error:new Error}},n=(a,s,l)=>{if(typeof a!="object")switch(a){case"Function":case"Lazy":s[l]=r;return;case"Class":s[l]=[r,r,r,0];return}else{if(a.TAG!=="Module"){s[l]=a._0;return}let c=a._0,d={};s[l]=d;let f=c.length;for(let h=0;h<f;++h){let p=c[h];n(p[0],d,p[1])}return}},i={},o="dummy";return n(t,i,o),i[o]}function exe(e,t,r){let n=(i,o,a,s,l)=>{if(typeof i!="object")switch(i){case"Function":s[l]=a;return;case"Lazy":case"Class":Object.assign(o,a);return}else{if(i.TAG!=="Module")return;let c=i._0;for(let d=0,f=c.length;d<f;++d){let h=c[d],p=h[1];n(h[0],o[p],a[p],o,p)}return}};if(typeof e!="object")throw{RE_EXN_ID:"Assert_failure",_1:["Primitive_module.res",68,9],Error:new Error};{let i=e._0;for(let o=0,a=i.length;o<a;++o){let s=i[o],l=s[1];n(s[0],t[l],r[l],t,l)}return}}function FS(e){let t=e.parent;if(t!==void 0&&t!=="")return t}function txe(e,t,r){let n=k(F(e,t),FS);if(n!==void 0){if(n===t)return!0;{let i=n,o=0;for(;;){let a=o,s=i;if(a>r)return!0;let l=k(F(e,s),FS);if(l===void 0)return!1;if(l===t)return!0;o=a+1|0,i=l}}}else return!1}function rxe(e){let t={};e.forEach(l=>{t[l.key]=l});let r=e.length,n={},i=[],o={contents:0},a={contents:0};e.forEach(l=>{let c=FS(l);if(c!==void 0){if(F(t,c)!==void 0){if(txe(t,l.key,r)){a.contents=a.contents+1|0,i.push(l.key);return}let f=D(F(n,c),[]);n[c]=f.concat([l.key]);return}o.contents=o.contents+1|0,i.push(l.key);return}i.push(l.key)});let s=(l,c)=>{let d=F(t,l);if(d===void 0)return;let f=c>=r?[]:Q(D(F(n,l),[]),h=>s(h,c+1|0));return{node:d,children:f}};return{roots:Q(i,l=>s(l,0)),detached:o.contents,cycles:a.contents}}function Yz(e){return nt(e.children,e.children.length,(t,r)=>t+Yz(r)|0)}let nxe="14px";function Fn(e){return"var("+e+")"}let ixe=E([z("flex"),_e("column"),u("gap",Fn(O.sm))]),oxe=E([u("overflow-x","auto"),u("padding-bottom","4px")]),axe=E([z("flex"),X("flexStart"),et("center"),u("gap",Fn(O.lg)),u("min-width","min-content"),u("padding","var("+O.xs+") 0")]),sxe=E([z("flex"),_e("column"),X("center"),u("min-width","min-content")]);function lxe(e){return E([z("flex"),_e("column"),u("gap","2px"),u("min-width","132px"),u("max-width","180px"),u("padding","var("+O.xs+") var("+O.sm+")"),u("border","1px solid var("+x.borderSubtle+")"),u("border-top","3px solid "+e),u("border-radius",Fn(Y.md)),u("background",Fn(x.surface)),u("text-align","left"),Re("pointer"),Ue([u("background",Fn(x.surfaceSubtle))])])}let uxe=E([u("font-size",Fn($.sizeSm)),u("font-weight",Fn($.weightMedium)),u("color",Fn(x.textPrimary)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),cxe=E([u("font-size",Fn($.sizeXs)),u("color",Fn(x.textSecondary)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),dxe=E([u("margin-top","2px"),u("padding","0 6px"),u("border","1px solid var("+x.border+")"),u("border-radius","10px"),u("background",Fn(x.surface)),u("color",Fn(x.textSecondary)),u("font-size",Fn($.sizeXs)),u("line-height","16px"),Re("pointer"),Ue([u("color",Fn(x.textPrimary))])]),q3=E([u("width","1px"),u("height",nxe),u("background",Fn(x.border))]),fxe=E([z("flex"),X("flexStart"),u("min-width","min-content")]),hxe=E([z("flex"),_e("column"),X("center"),u("min-width","min-content")]),pxe=E([u("padding","0 var("+O.xs+")")]),mxe=E([z("flex"),u("width","100%"),u("height","1px")]);function V3(e){return E([u("flex","1 1 50%"),u("background",e?Fn(x.border):"transparent")])}let gxe=E([u("font-size",Fn($.sizeXs)),u("color",Fn(x.textDisabled))]),vxe="var("+x.brand+")",Fk=Z1e(["OrgChart.res",255,4],{TAG:"Module",_0:[["Function","make"]]});function bxe(e){let t=e.depth,r=e.tree,n=ce(()=>!1),i=n[1],o=n[0],a=Yz(r),s=r.children.length,l=r.node.subtitle;return L("div",{children:[L("button",{children:[_("span",{children:r.node.title,className:uxe}),l!==void 0&&l!==""?_("span",{children:l,className:cxe}):null],className:lxe(D(r.node.accent,vxe)),title:r.node.title,onClick:c=>ee(r.node.onOpen,d=>d())}),s===0?null:L(Bt,{children:[_("button",{children:o?"+"+a.toString():"−","aria-expanded":!o,className:dxe,title:o?"Expand":"Collapse",onClick:c=>i(d=>!d)}),o?null:L(Bt,{children:[_("div",{className:q3}),_("div",{children:r.children.map((c,d)=>L("div",{children:[L("div",{children:[_("div",{className:V3(d>0)}),_("div",{className:V3(d<(s-1|0))})],className:mxe}),_("div",{className:q3}),_("div",{children:_(Fk.make,{tree:c,depth:t+1|0}),className:pxe})],className:hxe},c.node.key)),className:fxe})]})]})],className:sxe})}exe({_0:[["Function","make"]]},Fk,{make:bxe});function _xe(e){let t=rxe(e.nodes);if(t.roots.length===0)return _(Wd,{title:"Nothing to chart",description:"No rows in this window."});let r=Q([e.windowNote,t.detached>0?t.detached.toString()+" item(s) whose parent is outside this window":void 0,t.cycles>0?t.cycles.toString()+" item(s) in a parent loop, shown as roots":void 0],n=>n);return L("div",{children:[_("div",{children:_("div",{children:t.roots.map(n=>_(Fk.make,{tree:n,depth:0},n.node.key)),className:axe}),className:oxe}),r.length===0?null:_("span",{children:r.join(" · "),className:gxe})],className:ixe})}let yxe=_xe;function so(e){return"var("+e+")"}let xxe=E([At("relative"),u("padding-left","28px"),z("flex"),_e("column"),u("gap",so(O.md))]),Sxe=E([At("absolute"),Us(ke(7)),Bo(ke(8)),Ip(ke(0)),u("width","2px"),u("background",so(x.borderSubtle))]),wxe=E([At("absolute"),Us(ke(-21)),Bo(ke(6)),u("width","10px"),u("height","10px"),u("border-radius","50%"),u("background",so(x.brand)),u("border","2px solid var("+x.surface+")"),rn(0)]),Xz=E([At("relative"),z("flex"),_e("column"),u("gap","2px")]),Exe=xr([Xz,E([u("background","none"),u("border","none"),u("padding","0"),Xa("left"),Re("pointer"),Ue([u("opacity","0.85")])])]),kxe=E([z("flex"),X("center"),u("gap",so(O.sm))]),Cxe=E([u("color",so(x.textDisabled)),u("font-size",so($.sizeXs)),u("font-family",so($.fontFamilyMono))]),Rxe=E([u("color",so(x.textPrimary)),u("font-size",so($.sizeMd)),u("font-weight",so($.weightMedium))]),Axe=E([u("color",so(x.textSecondary)),u("font-size",so($.sizeSm)),u("line-height",so($.lineHeightNormal)),Pp(ke(0))]);function $xe(e){let t=e.onSelect,r=n=>L(Bt,{children:[_("div",{className:wxe,style:q(n.accent,i=>({background:i}))}),L("div",{children:[_("span",{children:n.timestamp,className:Cxe}),ne(n.variant,null,i=>_(oa,{variant:i,label:n.label})),ne(n.variant,_("span",{children:n.label,className:Rxe}),i=>null)],className:kxe}),ne(n.detail,null,i=>_("div",{children:i,className:Axe}))]});return L("div",{children:[_("div",{className:Sxe}),e.entries.map(n=>t!==void 0?_("button",{children:r(n),className:Exe,type:"button",onClick:i=>t(n.id)},n.id):_("div",{children:r(n),className:Xz},n.id))],className:xxe})}let Txe=$xe,Nxe="The server did not confirm this command. It may not have been applied.";function Zz(e){let t=k(k(G(e),n=>Np(n)[0]),G),r=k(k(t,n=>F(n,"__typename")),ie);if(r===void 0)return{TAG:"NotExecuted",_0:Nxe};switch(r){case"CommandAccepted":return"Accepted";case"CommandPending":return"Pending";case"CommandRejected":let n=k(k(t,o=>F(o,"errorCode")),ie),i=k(k(t,o=>F(o,"errorDetail")),ie);return{TAG:"Rejected",_0:{errorCode:n,detail:i}};default:return{TAG:"NotExecuted",_0:"The server answered with an unexpected result type ("+r+")."}}}function Dxe(e){let t=Zz(e.data);if(typeof t!="object"||t.TAG!=="NotExecuted")return t;let r=t._0,n=e.errors[0];return n!==void 0&&n.message!==""?{TAG:"NotExecuted",_0:n.message}:{TAG:"NotExecuted",_0:r}}function wa(e,t){let r=F(e,t);if(r===void 0)return;let n=ie(r);return n!==void 0?n:k(k(G(r),i=>F(i,"TAG")),ie)}function e9(e,t,r){if(r===void 0)return e;let n=wa(t,r);return e.filter(i=>{let o=i.allowedStates;return o!==void 0?n!==void 0?o.includes(n):!1:!0})}function Fxe(e){let t=e[0];if(t===void 0)return;let r=nt(e,t.start,(i,o)=>o.start<i?o.start:i),n=nt(e,t.end_,(i,o)=>o.end_>i?o.end_:i);return[vi(r),Ro(vi(n),1)]}function Ixe(e,t){let r=(t-e)/FM;return r<=21?"Days":r<=120?"Weeks":"Months"}function G3(e){let t=new Date(e).getMonth()|0;return D(NM[t],"").slice(0,3)}function Pxe(e,t){switch(t){case"Days":return Ps(e);case"Weeks":return DM(e).toString()+" "+G3(e);case"Months":let r=new Date(e).getFullYear().toString();return G3(e)+" '"+r.slice(2)}}function Oxe(e,t,r){let n=l=>{switch(r){case"Days":return Ro(vi(e),l);case"Weeks":return Ro(Qv(e),l*7|0);case"Months":return kM(CM(e),l)}},i=[],o=0;for(;n(o)<t&&o<2e3;){let l=n(o);l>=e&&i.push(l),o=o+1|0}let a=i.length,s=a<=40?1:(a/40|0)+1|0;return yw(i,(l,c)=>{if(Fo(c,s)===0)return[l,Pxe(l,r)]})}function fv(e,t,r){return r<=t?0:(e-t)/(r-t)*100}function Rh(e){return e<0?0:e>100?100:e}function IS(e,t,r){let n=Rh(fv(e.start,t,r)),o=Rh(fv(e.end_>e.start?e.end_:e.start,t,r))-n,a=o<.6?.6:o;return[n+a>100?100-a:n,a]}function t9(e){return e.map(t=>Q(t.dependsOn,r=>q(e.find(n=>n.key===r?n.key!==t.key:!1),n=>({from:n.key,to_:t.key,violated:t.start<n.end_})))).flat()}function Mxe(e){return nt(e,0,(t,r)=>t+r.dependsOn.filter(n=>!e.some(i=>i.key===n)).length|0)}function r9(e){return t9(e).filter(t=>t.violated)}function Lxe(e,t){return r9(e).some(r=>r.to_===t)}let Ik="184px";function dr(e){return"var("+e+")"}let zxe=E([z("flex"),_e("column"),u("gap",dr(O.sm))]),Uxe=E([z("flex"),X("center"),et("spaceBetween"),xi("wrap"),u("gap",dr(O.sm))]),Bxe=E([z("inlineFlex"),X("center"),u("gap",dr(O.xs))]),n9=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",dr(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",dr(x.textSecondary)),u("font-size",dr($.sizeSm)),Re("pointer"),Ue([u("background",dr(x.surfaceSubtle)),u("color",dr(x.textPrimary))])]),jxe=xr([n9,E([u("background",dr(x.surfaceSubtle)),u("color",dr(x.textPrimary)),u("font-weight",dr($.weightMedium))])]),qxe=E([u("font-size",dr($.sizeMd)),u("font-weight",dr($.weightMedium)),u("color",dr(x.textPrimary))]),Vxe=E([u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",dr(Y.md)),u("overflow","hidden")]),i9=E([z("flex"),X("stretch")]),Gxe=xr([i9,E([u("background",dr(x.surfaceSubtle)),u("border-bottom","1px solid var("+x.borderSubtle+")")])]),Kxe=E([u("flex","0 0 "+Ik),u("padding","4px var("+O.sm+")"),u("font-size",dr($.sizeXs)),u("color",dr(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),Hxe=E([At("relative"),u("flex","1 1 auto"),u("height","22px"),u("overflow","hidden")]),Wxe=E([At("absolute"),u("top","4px"),u("padding-left","3px"),u("border-left","1px solid var("+x.borderSubtle+")"),u("font-size",dr($.sizeXs)),u("color",dr(x.textSecondary)),u("white-space","nowrap"),u("pointer-events","none")]),Jxe=E([At("relative")]),Qxe=xr([i9,E([u("height","30px"),u("border-top","1px solid var("+x.borderSubtle+")")])]),Yxe=E([u("flex","0 0 "+Ik),z("flex"),X("center"),u("gap","4px"),u("padding","0 var("+O.sm+")"),u("font-size",dr($.sizeSm)),u("color",dr(x.textPrimary)),u("border-right","1px solid var("+x.borderSubtle+")"),u("overflow","hidden")]),Xxe=E([u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),Zxe=E([u("color",dr(x.warning)),u("font-size",dr($.sizeXs)),u("flex","0 0 auto")]),eSe=E([At("relative"),u("flex","1 1 auto")]),tSe=E([At("absolute"),u("top","0"),u("bottom","0"),u("width","1px"),u("background",dr(x.borderSubtle)),u("opacity","0.6"),u("pointer-events","none")]);function rSe(e){return E([At("absolute"),u("top","5px"),u("height","19px"),u("border","none"),u("border-radius",dr(Y.sm)),u("background",e),u("padding","0"),Re("pointer"),Ue([u("filter","brightness(1.12)")])])}let nSe=E([u("outline","2px solid var("+x.warning+")"),u("outline-offset","1px")]),iSe=E([At("absolute"),u("top","0"),u("left",Ik),u("right","0"),u("bottom","0"),u("pointer-events","none")]),oSe=E([u("display","block"),u("width","100%"),u("height","100%")]),aSe=E([u("font-size",dr($.sizeXs)),u("color",dr(x.textDisabled))]),sSe="var("+x.brand+")";function Cl(e){return(Math.round(e*100)/100).toString()}function lSe(e,t){let r=Ro(t,-1);return xo(e)===xo(r)?xo(e):xo(e)+" – "+xo(r)}function uSe(e){let t=e.to_,r=e.from,n=e.tasks,i=e.edge,o=w=>n.findIndex(C=>C.key===w),a=o(i.from),s=o(i.to_),l=n[a],c=n[s];if(l===void 0||c===void 0)return null;let d=IS(l,r,t),h=IS(c,r,t)[0],p=d[0]+d[1],m=a*30+30/2,g=s*30+30/2,v=i.violated?e.arrowBadId:e.arrowId,b;if(h>p){let w=Rh((p+h)/2);b=[[p,m],[w,m],[w,g],[h,g]]}else{let w=Rh(p+1.4),C=Rh(h-1.4),A=(m+g)/2;b=[[p,m],[w,m],[w,A],[C,A],[C,g],[h,g]]}let y=i.violated?"var("+x.warning+")":"var("+x.border+")",S=b.length-2|0;return _("g",{children:b.map((w,C)=>{let A=b[C+1|0];return A!==void 0?_("line",{markerEnd:C===S?"url(#"+v+")":void 0,stroke:y,strokeWidth:"1.5",x1:Cl(w[0])+"%",x2:Cl(A[0])+"%",y1:Cl(w[1]),y2:Cl(A[1])},C.toString()):null})})}function cSe(e){let t=e.initialGranularity,r=e.windowNote,n=e.tasks,i=Zq(),o=ce(()=>t),a=o[1],s="rv-gantt-arrow-"+i,l="rv-gantt-arrow-bad-"+i,c=Fxe(n);if(c===void 0)return _(Wd,{title:"Nothing scheduled",description:"No row in this window carries a start and end date."});let d=c[1],f=c[0],h=D(o[0],Ixe(f,d)),p=Oxe(f,d,h),m=t9(n),g=Mxe(n),v=r9(n).length,b=(w,C)=>_("button",{children:C,className:h===w?jxe:n9,onClick:A=>a(T=>w)}),y,S=0;if(r!==void 0||g!==0||v!==0?S=1:y=null,S===1){let w=Q([r,g>0?g.toString()+" dependency link(s) outside this window":void 0,v>0?v.toString()+" start(s) before a dependency ends":void 0],C=>C);y=_("span",{children:w.join(" · "),className:aSe})}return L("div",{children:[L("div",{children:[_("span",{children:lSe(f,d),className:qxe}),L("div",{children:[b("Days","Days"),b("Weeks","Weeks"),b("Months","Months")],className:Bxe})],className:Uxe}),L("div",{children:[L("div",{children:[_("div",{children:"Task",className:Kxe}),_("div",{children:p.map(w=>{let C=w[0];return _("span",{children:w[1],className:Wxe,style:{left:Cl(fv(C,f,d))+"%"}},C.toString())}),className:Hxe})],className:Gxe}),L("div",{children:[n.map(w=>{let C=IS(w,f,d),A=Lxe(n,w.key),T=rSe(D(w.accent,sSe)),R=A?T+" "+nSe:T;return L("div",{children:[L("div",{children:[A?_("span",{children:"▲",className:Zxe,title:"Starts before a dependency ends"}):null,_("span",{children:w.title,className:Xxe,title:w.title})],className:Yxe}),L("div",{children:[p.map(N=>{let I=N[0];return _("div",{className:tSe,style:{left:Cl(fv(I,f,d))+"%"}},I.toString())}),_("button",{className:R,style:{left:Cl(C[0])+"%",width:Cl(C[1])+"%"},title:w.title+" · "+Ps(w.start)+" → "+Ps(w.end_),onClick:N=>w.onOpen()})],className:eSe})],className:Qxe},w.key)}),_("div",{children:L("svg",{children:[L("defs",{children:[_("marker",{children:_("path",{d:"M0,0 L6,3 L0,6 z",fill:"var("+x.border+")"}),id:s,markerHeight:"6",markerWidth:"6",orient:"auto",refX:"5",refY:"3"}),_("marker",{children:_("path",{d:"M0,0 L6,3 L0,6 z",fill:"var("+x.warning+")"}),id:l,markerHeight:"6",markerWidth:"6",orient:"auto",refX:"5",refY:"3"})]}),m.map(w=>_(uSe,{edge:w,tasks:n,from:f,to_:d,arrowId:s,arrowBadId:l},w.from+"->"+w.to_))],className:oSe}),className:iSe})],className:Jxe})],className:Vxe}),y],className:zxe})}let dSe=cSe;function ai(e){return"var("+e+")"}let fSe=E([u("overflow-x","auto")]),hSe=E([u("border-collapse","collapse"),u("font-size",ai($.sizeSm)),u("color",ai(x.textPrimary)),u("min-width","min-content")]),Pk=[u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("text-align","right"),u("white-space","nowrap")],pSe=E(Pk),mSe=E(Pk.concat([u("color",ai(x.textDisabled))])),gSe=E([u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("text-align","left"),u("color",ai(x.textSecondary)),u("font-weight",ai($.weightMedium)),u("white-space","nowrap")]),vSe=E([u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("text-align","right"),u("background",ai(x.surfaceSubtle)),u("color",ai(x.textSecondary)),u("font-weight",ai($.weightMedium)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),u("font-size",ai($.sizeXs)),u("white-space","nowrap")]),bSe=E([u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("text-align","left"),u("background",ai(x.surfaceSubtle)),u("color",ai(x.textPrimary)),u("font-weight",ai($.weightMedium)),u("white-space","nowrap")]),By=E(Pk.concat([u("font-weight",ai($.weightMedium))])),K3=E([u("border","1px solid var("+x.borderSubtle+")"),u("padding","4px var("+O.sm+")"),u("background",ai(x.surfaceSubtle)),u("color",ai(x.textSecondary)),u("font-weight",ai($.weightMedium)),u("white-space","nowrap")]),H3="Total";function _Se(e){let t=e.colTotals,r=e.rowTotals,n=e.cells,i=e.colHeaders;return _("div",{children:L("table",{children:[_("thead",{children:L("tr",{children:[_("th",{children:e.rowDimLabel+" ╲ "+e.colDimLabel,className:gSe,scope:"col"}),i.map(o=>_("th",{children:o.label,className:vSe,scope:"col"},o.value)),_("th",{children:H3,className:K3,scope:"col"})]})}),_("tbody",{children:e.rowHeaders.map((o,a)=>{let s=D(n[a],[]);return L("tr",{children:[_("th",{children:o.label,className:bSe,scope:"row"}),i.map((l,c)=>{let d=D(s[c],{display:"",empty:!0});return _("td",{children:d.empty?"—":d.display,className:d.empty?mSe:pSe},l.value)}),_("td",{children:D(r[a],""),className:By})]},o.value)})}),_("tfoot",{children:L("tr",{children:[_("th",{children:H3,className:K3,scope:"row"}),i.map((o,a)=>_("td",{children:D(t[a],""),className:By},o.value)),_("td",{children:e.grandTotal,className:By})]})})],className:hSe}),className:fSe})}let ySe=_Se;function xSe(e){let t=e.label,r=e.size;return _(fS,{kind:"Media",size:r!==void 0?r:"Detail",label:t!==void 0?t:"No image"})}let PS=xSe;function Mi(e){return"var("+e+")"}let SSe=E([z("grid"),u("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),u("gap",Mi(O.md))]),wSe=E([z("flex"),_e("column"),X("stretch"),u("gap",Mi(O.xs)),u("padding","0"),u("background","none"),u("border","none"),u("text-align","left"),Re("pointer"),Ue([u("opacity","0.88")])]),ESe=E([u("width","100%"),u("aspect-ratio","4 / 3"),u("object-fit","cover"),u("background",Mi(x.surfaceSubtle)),u("border","1px solid var("+x.border+")"),u("border-radius",Mi(Y.md))]),kSe=E([z("flex"),X("center"),et("spaceBetween"),u("gap",Mi(O.sm))]),CSe=E([u("color",Mi(x.textPrimary)),u("font-size",Mi($.sizeSm)),u("font-weight",Mi($.weightMedium)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),RSe=E([u("color",Mi(x.textSecondary)),u("font-size",Mi($.sizeXs)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),ASe=E([u("background","rgba(255,255,255,0.12)"),u("border","1px solid rgba(255,255,255,0.25)"),u("border-radius",Mi(Y.md)),u("color","#f5f5f5"),u("padding","4px var("+O.sm+")"),u("font-size",Mi($.sizeSm)),Re("pointer"),Ue([u("background","rgba(255,255,255,0.22)")])]),$Se=E([u("color",Mi(x.textDisabled)),u("font-size",Mi($.sizeSm))]);function TSe(e){return Q(e,t=>q(t.src,r=>({key:t.key,src:r,title:t.title,caption:t.caption})))}function NSe(e){let t=e.onOpen,r=e.items,n=ce(()=>{}),i=n[1],o=n[0],a=TSe(r);if(r.length===0)return _("span",{children:"(empty)",className:$Se});let s;if(o!==void 0){let l=k(t,c=>q(a[o],d=>_("button",{children:"Open record →",className:ASe,type:"button",onClick:f=>{i(h=>{}),c(d.key)}})));s=_(EM,{slides:a,index:o,onIndexChange:c=>i(d=>c),onClose:()=>i(c=>{}),action:l})}else s=null;return L(Bt,{children:[_("div",{children:r.map(l=>{let c=l.src,d=l.onUpload,f=l.caption;return L("button",{children:[c!==void 0?_("img",{className:ESe,alt:l.title,src:c}):d!==void 0?_(PS,{size:"Tile",label:"Add image"}):_(PS,{size:"Tile"}),L("div",{children:[_("span",{children:l.title,className:CSe}),D(l.badge,null)],className:kSe}),f!==void 0?_("span",{children:f,className:RSe}):null],className:wSe,title:ir(l.src)&&Ee(l.onUpload)?"Add an image":l.title,type:"button",onClick:h=>{let p=l.src,m=l.onUpload;if(p===void 0)return m!==void 0?m():ee(t,v=>v(l.key));let g=a.findIndex(v=>v.key===l.key);return g!==-1?i(v=>g):ee(t,v=>v(l.key))}},l.key)}),className:SSe}),s]})}let DSe=NSe;const $b=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function vf(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Ok(e){return"nodeType"in e}function Ki(e){var t,r;return e?vf(e)?e:Ok(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function Mk(e){const{Document:t}=Ki(e);return e instanceof t}function um(e){return vf(e)?!1:e instanceof Ki(e).HTMLElement}function o9(e){return e instanceof Ki(e).SVGElement}function bf(e){return e?vf(e)?e.document:Ok(e)?Mk(e)?e:um(e)||o9(e)?e.ownerDocument:document:document:document}const ql=$b?iO:Ae;function Lk(e){const t=Ne(e);return ql(()=>{t.current=e}),Nr(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function FSe(){const e=Ne(null),t=Nr((n,i)=>{e.current=setInterval(n,i)},[]),r=Nr(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function yp(e,t){t===void 0&&(t=[e]);const r=Ne(e);return ql(()=>{r.current!==e&&(r.current=e)},t),r}function cm(e,t){const r=Ne();return It(()=>{const n=e(r.current);return r.current=n,n},[...t])}function hv(e){const t=Lk(e),r=Ne(null),n=Nr(i=>{i!==r.current&&t?.(i,r.current),r.current=i},[]);return[r,n]}function OS(e){const t=Ne();return Ae(()=>{t.current=e},[e]),t.current}let jy={};function Tb(e,t){return It(()=>{if(t)return t;const r=jy[e]==null?0:jy[e]+1;return jy[e]=r,e+"-"+r},[e,t])}function a9(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>{const s=Object.entries(a);for(const[l,c]of s){const d=o[l];d!=null&&(o[l]=d+e*c)}return o},{...t})}}const xd=a9(1),pv=a9(-1);function ISe(e){return"clientX"in e&&"clientY"in e}function s9(e){if(!e)return!1;const{KeyboardEvent:t}=Ki(e.target);return t&&e instanceof t}function PSe(e){if(!e)return!1;const{TouchEvent:t}=Ki(e.target);return t&&e instanceof t}function MS(e){if(PSe(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return ISe(e)?{x:e.clientX,y:e.clientY}:null}const W3="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function OSe(e){return e.matches(W3)?e:e.querySelector(W3)}const MSe={display:"none"};function LSe(e){let{id:t,value:r}=e;return _o.createElement("div",{id:t,style:MSe},r)}function zSe(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return _o.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function USe(){const[e,t]=ce("");return{announce:Nr(n=>{n!=null&&t(n)},[]),announcement:e}}const l9=Zt(null);function BSe(e){const t=xt(l9);Ae(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function jSe(){const[e]=ce(()=>new Set),t=Nr(n=>(e.add(n),()=>e.delete(n)),[e]);return[Nr(n=>{let{type:i,event:o}=n;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const qSe={draggable:`
|
|
90
|
+
To pick up a draggable item, press the space bar.
|
|
91
|
+
While dragging, use the arrow keys to move the item.
|
|
92
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
93
|
+
`},VSe={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function GSe(e){let{announcements:t=VSe,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=qSe}=e;const{announce:o,announcement:a}=USe(),s=Tb("DndLiveRegion"),[l,c]=ce(!1);if(Ae(()=>{c(!0)},[]),BSe(It(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&o(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;o(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;o(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;o(t.onDragCancel({active:h,over:p}))}}),[o,t])),!l)return null;const d=_o.createElement(_o.Fragment,null,_o.createElement(LSe,{id:n,value:i.draggable}),_o.createElement(zSe,{id:s,announcement:a}));return r?oO(d,r):d}var pn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(pn||(pn={}));function mv(){}function J3(e,t){return It(()=>({sensor:e,options:t??{}}),[e,t])}function KSe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return It(()=>[...t].filter(n=>n!=null),[...t])}const ma=Object.freeze({x:0,y:0});function HSe(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function WSe(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function JSe(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-n,s=o-r;if(n<i&&r<o){const l=t.width*t.height,c=e.width*e.height,d=a*s,f=d/(l+c-d);return Number(f.toFixed(4))}return 0}const QSe=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const o of n){const{id:a}=o,s=r.get(a);if(s){const l=JSe(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort(HSe)};function YSe(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function u9(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ma}function XSe(e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...r})}}const ZSe=XSe(1);function ewe(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function twe(e,t,r){const n=ewe(t);if(!n)return e;const{scaleX:i,scaleY:o,x:a,y:s}=n,l=e.left-a-(1-i)*parseFloat(r),c=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:c,right:l+d,bottom:c+f,left:l}}const rwe={ignoreTransform:!1};function dm(e,t){t===void 0&&(t=rwe);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Ki(e).getComputedStyle(e);c&&(r=twe(r,c,d))}const{top:n,left:i,width:o,height:a,bottom:s,right:l}=r;return{top:n,left:i,width:o,height:a,bottom:s,right:l}}function Q3(e){return dm(e,{ignoreTransform:!0})}function nwe(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function iwe(e,t){return t===void 0&&(t=Ki(e).getComputedStyle(e)),t.position==="fixed"}function owe(e,t){t===void 0&&(t=Ki(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?r.test(o):!1})}function zk(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(Mk(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!um(i)||o9(i)||r.includes(i))return r;const o=Ki(e).getComputedStyle(i);return i!==e&&owe(i,o)&&r.push(i),iwe(i,o)?r:n(i.parentNode)}return e?n(e):r}function c9(e){const[t]=zk(e,1);return t??null}function qy(e){return!$b||!e?null:vf(e)?e:Ok(e)?Mk(e)||e===bf(e).scrollingElement?window:um(e)?e:null:null}function d9(e){return vf(e)?e.scrollX:e.scrollLeft}function f9(e){return vf(e)?e.scrollY:e.scrollTop}function LS(e){return{x:d9(e),y:f9(e)}}var Cn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Cn||(Cn={}));function h9(e){return!$b||!e?!1:e===document.scrollingElement}function p9(e){const t={x:0,y:0},r=h9(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:n,minScroll:t}}const awe={x:.2,y:.2};function swe(e,t,r,n,i){let{top:o,left:a,right:s,bottom:l}=r;n===void 0&&(n=10),i===void 0&&(i=awe);const{isTop:c,isBottom:d,isLeft:f,isRight:h}=p9(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+g.height?(p.y=Cn.Backward,m.y=n*Math.abs((t.top+g.height-o)/g.height)):!d&&l>=t.bottom-g.height&&(p.y=Cn.Forward,m.y=n*Math.abs((t.bottom-g.height-l)/g.height)),!h&&s>=t.right-g.width?(p.x=Cn.Forward,m.x=n*Math.abs((t.right-g.width-s)/g.width)):!f&&a<=t.left+g.width&&(p.x=Cn.Backward,m.x=n*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function lwe(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function m9(e){return e.reduce((t,r)=>xd(t,LS(r)),ma)}function uwe(e){return e.reduce((t,r)=>t+d9(r),0)}function cwe(e){return e.reduce((t,r)=>t+f9(r),0)}function dwe(e,t){if(t===void 0&&(t=dm),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);c9(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const fwe=[["x",["left","right"],uwe],["y",["top","bottom"],cwe]];class Uk{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=zk(r),i=m9(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of fwe)for(const l of a)Object.defineProperty(this,l,{get:()=>{const c=s(n),d=i[o]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ah{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function hwe(e){const{EventTarget:t}=Ki(e);return e instanceof t?e:bf(e)}function Vy(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var vo;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(vo||(vo={}));function Y3(e){e.preventDefault()}function pwe(e){e.stopPropagation()}var hr;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(hr||(hr={}));const g9={start:[hr.Space,hr.Enter],cancel:[hr.Esc],end:[hr.Space,hr.Enter,hr.Tab]},mwe=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case hr.Right:return{...r,x:r.x+25};case hr.Left:return{...r,x:r.x-25};case hr.Down:return{...r,y:r.y+25};case hr.Up:return{...r,y:r.y-25}}};class Bk{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Ah(bf(r)),this.windowListeners=new Ah(Ki(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(vo.Resize,this.handleCancel),this.windowListeners.add(vo.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(vo.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&dwe(n),r(ma)}handleKeyDown(t){if(s9(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=g9,coordinateGetter:a=mwe,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=n.current,d=c?{x:c.left,y:c.top}:ma;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:r,context:n.current,currentCoordinates:d});if(f){const h=pv(f,d),p={x:0,y:0},{scrollableAncestors:m}=n.current;for(const g of m){const v=t.code,{isTop:b,isRight:y,isLeft:S,isBottom:w,maxScroll:C,minScroll:A}=p9(g),T=lwe(g),R={x:Math.min(v===hr.Right?T.right-T.width/2:T.right,Math.max(v===hr.Right?T.left:T.left+T.width/2,f.x)),y:Math.min(v===hr.Down?T.bottom-T.height/2:T.bottom,Math.max(v===hr.Down?T.top:T.top+T.height/2,f.y))},N=v===hr.Right&&!y||v===hr.Left&&!S,I=v===hr.Down&&!w||v===hr.Up&&!b;if(N&&R.x!==f.x){const M=g.scrollLeft+h.x,P=v===hr.Right&&M<=C.x||v===hr.Left&&M>=A.x;if(P&&!h.y){g.scrollTo({left:M,behavior:s});return}P?p.x=g.scrollLeft-M:p.x=v===hr.Right?g.scrollLeft-C.x:g.scrollLeft-A.x,p.x&&g.scrollBy({left:-p.x,behavior:s});break}else if(I&&R.y!==f.y){const M=g.scrollTop+h.y,P=v===hr.Down&&M<=C.y||v===hr.Up&&M>=A.y;if(P&&!h.x){g.scrollTo({top:M,behavior:s});return}P?p.y=g.scrollTop-M:p.y=v===hr.Down?g.scrollTop-C.y:g.scrollTop-A.y,p.y&&g.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,xd(pv(f,this.referenceCoordinates),p))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Bk.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=g9,onActivation:i}=t,{active:o}=r;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function X3(e){return!!(e&&"distance"in e)}function Z3(e){return!!(e&&"delay"in e)}class jk{constructor(t,r,n){var i;n===void 0&&(n=hwe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:o}=t,{target:a}=o;this.props=t,this.events=r,this.document=bf(a),this.documentListeners=new Ah(this.document),this.listeners=new Ah(n),this.windowListeners=new Ah(Ki(a)),this.initialCoordinates=(i=MS(o))!=null?i:ma,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(vo.Resize,this.handleCancel),this.windowListeners.add(vo.DragStart,Y3),this.windowListeners.add(vo.VisibilityChange,this.handleCancel),this.windowListeners.add(vo.ContextMenu,Y3),this.documentListeners.add(vo.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Z3(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(X3(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:i}=this.props;i(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(vo.Click,pwe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(vo.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(r=MS(t))!=null?r:ma,c=pv(i,l);if(!n&&s){if(X3(s)){if(s.tolerance!=null&&Vy(c,s.tolerance))return this.handleCancel();if(Vy(c,s.distance))return this.handleStart()}if(Z3(s)&&Vy(c,s.tolerance))return this.handleCancel();this.handlePending(s,c);return}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===hr.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const gwe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class qk extends jk{constructor(t){const{event:r}=t,n=bf(r.target);super(t,gwe,n)}}qk.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n?.({event:r}),!0)}}];const vwe={move:{name:"mousemove"},end:{name:"mouseup"}};var zS;(function(e){e[e.RightClick=2]="RightClick"})(zS||(zS={}));class bwe extends jk{constructor(t){super(t,vwe,bf(t.event.target))}}bwe.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===zS.RightClick?!1:(n?.({event:r}),!0)}}];const Gy={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class _we extends jk{constructor(t){super(t,Gy)}static setup(){return window.addEventListener(Gy.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Gy.move.name,t)};function t(){}}}_we.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return i.length>1?!1:(n?.({event:r}),!0)}}];var $h;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})($h||($h={}));var gv;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(gv||(gv={}));function ywe(e){let{acceleration:t,activator:r=$h.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=gv.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=Swe({delta:f,disabled:!o}),[m,g]=FSe(),v=Ne({x:0,y:0}),b=Ne({x:0,y:0}),y=It(()=>{switch(r){case $h.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case $h.DraggableRect:return i}},[r,i,l]),S=Ne(null),w=Nr(()=>{const A=S.current;if(!A)return;const T=v.current.x*b.current.x,R=v.current.y*b.current.y;A.scrollBy(T,R)},[]),C=It(()=>s===gv.TreeOrder?[...c].reverse():c,[s,c]);Ae(()=>{if(!o||!c.length||!y){g();return}for(const A of C){if(n?.(A)===!1)continue;const T=c.indexOf(A),R=d[T];if(!R)continue;const{direction:N,speed:I}=swe(A,R,y,t,h);for(const M of["x","y"])p[M][N[M]]||(I[M]=0,N[M]=0);if(I.x>0||I.y>0){g(),S.current=A,m(w,a),v.current=I,b.current=N;return}}v.current={x:0,y:0},b.current={x:0,y:0},g()},[t,w,n,g,o,a,JSON.stringify(y),JSON.stringify(p),m,c,C,d,JSON.stringify(h)])}const xwe={x:{[Cn.Backward]:!1,[Cn.Forward]:!1},y:{[Cn.Backward]:!1,[Cn.Forward]:!1}};function Swe(e){let{delta:t,disabled:r}=e;const n=OS(t);return cm(i=>{if(r||!n||!i)return xwe;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Cn.Backward]:i.x[Cn.Backward]||o.x===-1,[Cn.Forward]:i.x[Cn.Forward]||o.x===1},y:{[Cn.Backward]:i.y[Cn.Backward]||o.y===-1,[Cn.Forward]:i.y[Cn.Forward]||o.y===1}}},[r,t,n])}function wwe(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return cm(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function Ewe(e,t){return It(()=>e.reduce((r,n)=>{const{sensor:i}=n,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,n)}));return[...r,...o]},[]),[e,t])}var xp;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(xp||(xp={}));var US;(function(e){e.Optimized="optimized"})(US||(US={}));const eD=new Map;function kwe(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=ce(null),{frequency:s,measure:l,strategy:c}=i,d=Ne(e),f=v(),h=yp(f),p=Nr(function(b){b===void 0&&(b=[]),!h.current&&a(y=>y===null?b:y.concat(b.filter(S=>!y.includes(S))))},[h]),m=Ne(null),g=cm(b=>{if(f&&!r)return eD;if(!b||b===eD||d.current!==e||o!=null){const y=new Map;for(let S of e){if(!S)continue;if(o&&o.length>0&&!o.includes(S.id)&&S.rect.current){y.set(S.id,S.rect.current);continue}const w=S.node.current,C=w?new Uk(l(w),w):null;S.rect.current=C,C&&y.set(S.id,C)}return y}return b},[e,o,r,f,l]);return Ae(()=>{d.current=e},[e]),Ae(()=>{f||p()},[r,f]),Ae(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),Ae(()=>{f||typeof s!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,f,p,...n]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(c){case xp.Always:return!1;case xp.BeforeDragging:return r;default:return!r}}}function v9(e,t){return cm(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function Cwe(e,t){return v9(e,t)}function Rwe(e){let{callback:t,disabled:r}=e;const n=Lk(t),i=It(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return Ae(()=>()=>i?.disconnect(),[i]),i}function Nb(e){let{callback:t,disabled:r}=e;const n=Lk(t),i=It(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return Ae(()=>()=>i?.disconnect(),[i]),i}function Awe(e){return new Uk(dm(e),e)}function tD(e,t,r){t===void 0&&(t=Awe);const[n,i]=ce(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??r)!=null?c:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const a=Rwe({callback(l){if(e)for(const c of l){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),s=Nb({callback:o});return ql(()=>{o(),e?(s?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),a?.disconnect())},[e]),n}function $we(e){const t=v9(e);return u9(e,t)}const rD=[];function Twe(e){const t=Ne(e),r=cm(n=>e?n&&n!==rD&&e&&t.current&&e.parentNode===t.current.parentNode?n:zk(e):rD,[e]);return Ae(()=>{t.current=e},[e]),r}function Nwe(e){const[t,r]=ce(null),n=Ne(e),i=Nr(o=>{const a=qy(o.target);a&&r(s=>s?(s.set(a,LS(a)),new Map(s)):null)},[]);return Ae(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(l=>{const c=qy(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,LS(c)]):null}).filter(l=>l!=null);r(s.length?new Map(s):null),n.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const c=qy(l);c?.removeEventListener("scroll",i)})}},[i,e]),It(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>xd(o,a),ma):m9(e):ma,[e,t])}function nD(e,t){t===void 0&&(t=[]);const r=Ne(null);return Ae(()=>{r.current=null},t),Ae(()=>{const n=e!==ma;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?pv(e,r.current):ma}function Dwe(e){Ae(()=>{if(!$b)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function Fwe(e,t){return It(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=a=>{o(a,t)},r},{}),[e,t])}function b9(e){return It(()=>e?nwe(e):null,[e])}const iD=[];function Iwe(e,t){t===void 0&&(t=dm);const[r]=e,n=b9(r?Ki(r):null),[i,o]=ce(iD);function a(){o(()=>e.length?e.map(l=>h9(l)?n:new Uk(t(l),l)):iD)}const s=Nb({callback:a});return ql(()=>{s?.disconnect(),a(),e.forEach(l=>s?.observe(l))},[e]),i}function Pwe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return um(t)?t:e}function Owe(e){let{measure:t}=e;const[r,n]=ce(null),i=Nr(c=>{for(const{target:d}of c)if(um(d)){n(f=>{const h=t(d);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=Nb({callback:i}),a=Nr(c=>{const d=Pwe(c);o?.disconnect(),d&&o?.observe(d),n(d?t(d):null)},[t,o]),[s,l]=hv(a);return It(()=>({nodeRef:s,rect:r,setRef:l}),[r,s,l])}const Mwe=[{sensor:qk,options:{}},{sensor:Bk,options:{}}],Lwe={current:{}},u0={draggable:{measure:Q3},droppable:{measure:Q3,strategy:xp.WhileDragging,frequency:US.Optimized},dragOverlay:{measure:dm}};class Th extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const zwe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Th,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:mv},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:u0,measureDroppableContainers:mv,windowRect:null,measuringScheduled:!1},Uwe={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:mv,draggableNodes:new Map,over:null,measureDroppableContainers:mv},Db=Zt(Uwe),Bwe=Zt(zwe);function jwe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Th}}}function qwe(e,t){switch(t.type){case pn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case pn.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case pn.DragEnd:case pn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case pn.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Th(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case pn.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const a=new Th(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case pn.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Th(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Vwe(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=xt(Db),o=OS(n),a=OS(r?.id);return Ae(()=>{if(!t&&!n&&o&&a!=null){if(!s9(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[l.current,c.current]){if(!d)continue;const f=OSe(d);if(f){f.focus();break}}})}},[n,t,i,a,o]),null}function Gwe(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function Kwe(e){return It(()=>({draggable:{...u0.draggable,...e?.draggable},droppable:{...u0.droppable,...e?.droppable},dragOverlay:{...u0.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Hwe(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=Ne(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;ql(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!n)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const d=r(c),f=u9(d,n);if(a||(f.x=0),s||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=c9(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,s,n,r])}const _9=Zt({...ma,scaleX:1,scaleY:1});var hl;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(hl||(hl={}));const y9=eV(function(t){var r,n,i,o;let{id:a,accessibility:s,autoScroll:l=!0,children:c,sensors:d=Mwe,collisionDetection:f=QSe,measuring:h,modifiers:p,...m}=t;const g=tV(qwe,void 0,jwe),[v,b]=g,[y,S]=jSe(),[w,C]=ce(hl.Uninitialized),A=w===hl.Initialized,{draggable:{active:T,nodes:R,translate:N},droppable:{containers:I}}=v,M=T!=null?R.get(T):null,P=Ne({initial:null,translated:null}),B=It(()=>{var Ie;return T!=null?{id:T,data:(Ie=M?.data)!=null?Ie:Lwe,rect:P}:null},[T,M]),j=Ne(null),[W,te]=ce(null),[J,re]=ce(null),se=yp(m,Object.values(m)),pe=Tb("DndDescribedBy",a),K=It(()=>I.getEnabled(),[I]),oe=Kwe(h),{droppableRects:le,measureDroppableContainers:Z,measuringScheduled:ve}=kwe(K,{dragging:A,dependencies:[N.x,N.y],config:oe.droppable}),me=wwe(R,T),be=It(()=>J?MS(J):null,[J]),Ge=Me(),Lt=Cwe(me,oe.draggable.measure);Hwe({activeNode:T!=null?R.get(T):null,config:Ge.layoutShiftCompensation,initialRect:Lt,measure:oe.draggable.measure});const Ct=tD(me,oe.draggable.measure,Lt),kr=tD(me?me.parentElement:null),nn=Ne({activatorEvent:null,active:null,activeNode:me,collisionRect:null,collisions:null,droppableRects:le,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ln=I.getNodeFor((r=nn.current.over)==null?void 0:r.id),qt=Owe({measure:oe.dragOverlay.measure}),Ei=(n=qt.nodeRef.current)!=null?n:me,Yn=A?(i=qt.rect)!=null?i:Ct:null,rt=!!(qt.nodeRef.current&&qt.rect),dt=$we(rt?null:Ct),Vt=b9(Ei?Ki(Ei):null),Pt=Twe(A?Ln??me:null),Dt=Iwe(Pt),ki=Gwe(p,{transform:{x:N.x-dt.x,y:N.y-dt.y,scaleX:1,scaleY:1},activatorEvent:J,active:B,activeNodeRect:Ct,containerNodeRect:kr,draggingNodeRect:Yn,over:nn.current.over,overlayNodeRect:qt.rect,scrollableAncestors:Pt,scrollableAncestorRects:Dt,windowRect:Vt}),zn=be?xd(be,N):null,Xn=Nwe(Pt),is=nD(Xn),Ho=nD(Xn,[Ct]),Ci=xd(ki,is),Ri=Yn?ZSe(Yn,ki):null,Hi=B&&Ri?f({active:B,collisionRect:Ri,droppableRects:le,droppableContainers:K,pointerCoordinates:zn}):null,Se=WSe(Hi,"id"),[Fe,Lr]=ce(null),Jt=rt?ki:xd(ki,Ho),V=YSe(Jt,(o=Fe?.rect)!=null?o:null,Ct),ye=Ne(null),Pe=Nr((Ie,tt)=>{let{sensor:Qe,options:ze}=tt;if(j.current==null)return;const zt=R.get(j.current);if(!zt)return;const ut=Ie.nativeEvent,Ir=new Qe({active:j.current,activeNode:zt,event:ut,options:ze,context:nn,onAbort(vr){if(!R.get(vr))return;const{onDragAbort:Cr}=se.current,Vr={id:vr};Cr?.(Vr),y({type:"onDragAbort",event:Vr})},onPending(vr,Tt,Cr,Vr){if(!R.get(vr))return;const{onDragPending:Sn}=se.current,Gr={id:vr,constraint:Tt,initialCoordinates:Cr,offset:Vr};Sn?.(Gr),y({type:"onDragPending",event:Gr})},onStart(vr){const Tt=j.current;if(Tt==null)return;const Cr=R.get(Tt);if(!Cr)return;const{onDragStart:Vr}=se.current,xn={activatorEvent:ut,active:{id:Tt,data:Cr.data,rect:P}};Dm(()=>{Vr?.(xn),C(hl.Initializing),b({type:pn.DragStart,initialCoordinates:vr,active:Tt}),y({type:"onDragStart",event:xn}),te(ye.current),re(ut)})},onMove(vr){b({type:pn.DragMove,coordinates:vr})},onEnd:Un(pn.DragEnd),onCancel:Un(pn.DragCancel)});ye.current=Ir;function Un(vr){return async function(){const{active:Cr,collisions:Vr,over:xn,scrollAdjustedTranslate:Sn}=nn.current;let Gr=null;if(Cr&&Sn){const{cancelDrop:Zn}=se.current;Gr={activatorEvent:ut,active:Cr,collisions:Vr,delta:Sn,over:xn},vr===pn.DragEnd&&typeof Zn=="function"&&await Promise.resolve(Zn(Gr))&&(vr=pn.DragCancel)}j.current=null,Dm(()=>{b({type:vr}),C(hl.Uninitialized),Lr(null),te(null),re(null),ye.current=null;const Zn=vr===pn.DragEnd?"onDragEnd":"onDragCancel";if(Gr){const Kr=se.current[Zn];Kr?.(Gr),y({type:Zn,event:Gr})}})}}},[R]),lt=Nr((Ie,tt)=>(Qe,ze)=>{const zt=Qe.nativeEvent,ut=R.get(ze);if(j.current!==null||!ut||zt.dndKit||zt.defaultPrevented)return;const Ir={active:ut};Ie(Qe,tt.options,Ir)===!0&&(zt.dndKit={capturedBy:tt.sensor},j.current=ze,Pe(Qe,tt))},[R,Pe]),ft=Ewe(d,lt);Dwe(d),ql(()=>{Ct&&w===hl.Initializing&&C(hl.Initialized)},[Ct,w]),Ae(()=>{const{onDragMove:Ie}=se.current,{active:tt,activatorEvent:Qe,collisions:ze,over:zt}=nn.current;if(!tt||!Qe)return;const ut={active:tt,activatorEvent:Qe,collisions:ze,delta:{x:Ci.x,y:Ci.y},over:zt};Dm(()=>{Ie?.(ut),y({type:"onDragMove",event:ut})})},[Ci.x,Ci.y]),Ae(()=>{const{active:Ie,activatorEvent:tt,collisions:Qe,droppableContainers:ze,scrollAdjustedTranslate:zt}=nn.current;if(!Ie||j.current==null||!tt||!zt)return;const{onDragOver:ut}=se.current,Ir=ze.get(Se),Un=Ir&&Ir.rect.current?{id:Ir.id,rect:Ir.rect.current,data:Ir.data,disabled:Ir.disabled}:null,vr={active:Ie,activatorEvent:tt,collisions:Qe,delta:{x:zt.x,y:zt.y},over:Un};Dm(()=>{Lr(Un),ut?.(vr),y({type:"onDragOver",event:vr})})},[Se]),ql(()=>{nn.current={activatorEvent:J,active:B,activeNode:me,collisionRect:Ri,collisions:Hi,droppableRects:le,draggableNodes:R,draggingNode:Ei,draggingNodeRect:Yn,droppableContainers:I,over:Fe,scrollableAncestors:Pt,scrollAdjustedTranslate:Ci},P.current={initial:Yn,translated:Ri}},[B,me,Hi,Ri,R,Ei,Yn,le,I,Fe,Pt,Ci]),ywe({...Ge,delta:N,draggingRect:Ri,pointerCoordinates:zn,scrollableAncestors:Pt,scrollableAncestorRects:Dt});const Ft=It(()=>({active:B,activeNode:me,activeNodeRect:Ct,activatorEvent:J,collisions:Hi,containerNodeRect:kr,dragOverlay:qt,draggableNodes:R,droppableContainers:I,droppableRects:le,over:Fe,measureDroppableContainers:Z,scrollableAncestors:Pt,scrollableAncestorRects:Dt,measuringConfiguration:oe,measuringScheduled:ve,windowRect:Vt}),[B,me,Ct,J,Hi,kr,qt,R,I,le,Fe,Z,Pt,Dt,oe,ve,Vt]),at=It(()=>({activatorEvent:J,activators:ft,active:B,activeNodeRect:Ct,ariaDescribedById:{draggable:pe},dispatch:b,draggableNodes:R,over:Fe,measureDroppableContainers:Z}),[J,ft,B,Ct,b,pe,R,Fe,Z]);return _o.createElement(l9.Provider,{value:S},_o.createElement(Db.Provider,{value:at},_o.createElement(Bwe.Provider,{value:Ft},_o.createElement(_9.Provider,{value:V},c)),_o.createElement(Vwe,{disabled:s?.restoreFocus===!1})),_o.createElement(GSe,{...s,hiddenTextDescribedById:pe}));function Me(){const Ie=W?.autoScrollEnabled===!1,tt=typeof l=="object"?l.enabled===!1:l===!1,Qe=A&&!Ie&&!tt;return typeof l=="object"?{...l,enabled:Qe}:{enabled:Qe}}}),Wwe=Zt(null),oD="button",Jwe="Draggable";function x9(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=Tb(Jwe),{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:h}=xt(Db),{role:p=oD,roleDescription:m="draggable",tabIndex:g=0}=i??{},v=l?.id===t,b=xt(v?_9:Wwe),[y,S]=hv(),[w,C]=hv(),A=Fwe(a,t),T=yp(r);ql(()=>(f.set(t,{id:t,key:o,node:y,activatorNode:w,data:T}),()=>{const N=f.get(t);N&&N.key===o&&f.delete(t)}),[f,t]);const R=It(()=>({role:p,tabIndex:g,"aria-disabled":n,"aria-pressed":v&&p===oD?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[n,p,g,v,m,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:R,isDragging:v,listeners:n?void 0:A,node:y,over:h,setNodeRef:S,setActivatorNodeRef:C,transform:b}}const Qwe="Droppable",Ywe={timeout:25};function S9(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=Tb(Qwe),{active:a,dispatch:s,over:l,measureDroppableContainers:c}=xt(Db),d=Ne({disabled:r}),f=Ne(!1),h=Ne(null),p=Ne(null),{disabled:m,updateMeasurementsFor:g,timeout:v}={...Ywe,...i},b=yp(g??n),y=Nr(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(b.current)?b.current:[b.current]),p.current=null},v)},[v]),S=Nb({callback:y,disabled:m||!a}),w=Nr((R,N)=>{S&&(N&&(S.unobserve(N),f.current=!1),R&&S.observe(R))},[S]),[C,A]=hv(w),T=yp(t);return Ae(()=>{!S||!C.current||(S.disconnect(),f.current=!1,S.observe(C.current))},[C,S]),Ae(()=>(s({type:pn.RegisterDroppable,element:{id:n,key:o,disabled:r,node:C,rect:h,data:T}}),()=>s({type:pn.UnregisterDroppable,key:o,id:n})),[n]),Ae(()=>{r!==d.current.disabled&&(s({type:pn.SetDroppableDisabled,id:n,key:o,disabled:r}),d.current.disabled=r)},[n,o,r,s]),{active:a,rect:h,isOver:l?.id===n,node:C,over:l,setNodeRef:A}}function w9(e,t){ee(Li(e.onPointerDown),r=>r(t))}function E9(e,t){ee(Li(e.onKeyDown),r=>r(t))}function k9(e){return q(e==null?void 0:Nt(e),t=>"translate3d("+t.x.toString()+"px, "+t.y.toString()+"px, 0)")}let aD=[{bg:"#d1fae5",border:"#059669",fg:"#065f46"},{bg:"#fef3c7",border:"#d97706",fg:"#78350f"},{bg:"#ede9fe",border:"#7c3aed",fg:"#4c1d95"},{bg:"#ccfbf1",border:"#0d9488",fg:"#134e4a"},{bg:"#fce7f3",border:"#db2777",fg:"#831843"},{bg:"#ffedd5",border:"#ea580c",fg:"#7c2d12"},{bg:"#ecfccb",border:"#65a30d",fg:"#365314"}],C9={bg:"#e2e8f0",border:"#64748b",fg:"#1e293b"};function Xwe(e){return e<0?C9:aD[Fo(e,aD.length)]}function Vk(e,t){let r=e.indexOf(t);return r!==-1?Xwe(r):C9}let Zwe={bg:"#dbeafe",border:"#2563eb",fg:"#1e3a8a"};function jd(e){return"var("+e+")"}let R9=[z("inlineFlex"),X("center"),u("gap","4px"),u("font-size",jd($.sizeXs)),u("font-weight",jd($.weightMedium)),u("line-height","1.5"),u("white-space","nowrap")];function A9(e,t){return E(R9.concat([u("background",e.bg),u("border","1px solid "+e.border),u("color",e.fg)]).concat(t))}function eEe(e){return A9(e,[u("padding","2px 8px"),u("border-radius",jd(Y.full))])}let tEe=A9(Zwe,[u("padding","2px 8px"),u("border-radius",jd(Y.sm))]),rEe=E(R9.concat([u("padding","2px 0"),u("color",jd(x.textSecondary)),u("font-weight",jd($.weightNormal)),u("font-style","italic"),u("border-bottom","1px dashed var("+x.border+")")]));function nEe(e){return{background:e.border,display:"inline-block",height:"6px",width:"6px",borderRadius:"50%",flexShrink:"0"}}function iEe(e){let t=e.dot,r=e.swatch;return L("span",{children:[(t!==void 0?t:!0)?_("span",{style:nEe(r)}):null,e.label],className:eEe(r)})}let Gk={make:iEe};function oEe(e){return _("span",{children:e.label,className:tEe})}let aEe={make:oEe};function sEe(e){let t=e.label;return _("span",{children:t,className:rEe,title:t+" — run by the platform, not callable"})}let lEe={make:sEe};function jr(e){return"var("+e+")"}let uEe=E([z("flex"),X("stretch"),u("gap",jr(O.md)),u("overflow-x","auto"),u("padding-bottom",jr(O.sm))]),$9=[z("flex"),_e("column"),u("gap",jr(O.sm)),u("flex","0 0 240px"),u("padding",jr(O.sm)),u("background",jr(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",jr(Y.md)),u("min-height","120px")],cEe=E($9);function dEe(e){return E($9.concat([u("border-top","3px solid "+e.border)]))}let fEe=E([u("border-color",jr(x.brand))]),hEe=E([Cs(.45)]),pEe=E([z("flex"),X("center"),et("spaceBetween"),u("gap",jr(O.sm)),u("font-size",jr($.sizeSm)),u("font-weight",jr($.weightMedium)),u("color",jr(x.textSecondary))]),mEe=E([u("text-transform","uppercase"),u("letter-spacing","0.04em")]),sD=E([z("flex"),_e("column"),X("stretch"),u("gap","4px"),u("padding",jr(O.sm)),u("background",jr(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",jr(Y.sm)),u("text-align","left"),Re("pointer"),Ue([u("border-color",jr(x.brand))])]),gEe=E([Re("grab")]),vEe=E([Cs(.85),u("z-index","10"),Re("grabbing")]),bEe=E([u("font-size",jr($.sizeSm)),u("font-weight",jr($.weightMedium)),u("color",jr(x.textPrimary))]),_Ee=E([u("font-size",jr($.sizeXs)),u("color",jr(x.textSecondary)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),yEe=E([u("color",jr(x.textDisabled)),u("font-size",jr($.sizeSm))]);function xEe(e){let t=e.onClick,r=e.draggable,n=e.card,i=x9({id:n.key,disabled:!r}),o=r?sD+" "+gEe:sD,a=i.isDragging?o+" "+vEe:o,s=k9(i.transform),l=s!==void 0?{transform:s}:void 0,c=i.listeners,d=c==null?void 0:Nt(c),f=n.meta;return L("div",{children:[_("span",{children:n.title,className:bEe}),f!==void 0?_("span",{children:f,className:_Ee,title:f}):null],ref:Nt(i.setNodeRef),className:a,role:"button",style:l,tabIndex:0,onKeyDown:h=>ee(d,p=>E9(p,h)),onClick:h=>ee(t,p=>p(n.key)),onPointerDown:h=>ee(d,p=>w9(p,h))})}function SEe(e){let t=e.accepts,r=e.onCardClick,n=e.draggable,i=e.column,o=t!==void 0?t:!0,a=S9({id:i.value,disabled:!o}),s=i.swatch,l=s!==void 0?dEe(s):cEe,c=a.isOver,d=o?c?l+" "+fEe:l:l+" "+hEe,f=i.swatch;return L("div",{children:[L("div",{children:[f!==void 0?_(Gk.make,{swatch:f,label:i.label}):_("span",{children:i.label,className:mEe}),_(mh,{count:i.cards.length,label:""})],className:pEe}),i.cards.length===0?_("span",{children:"—",className:yEe}):i.cards.map(h=>_(xEe,{card:h,draggable:n,onClick:r},h.key))],ref:Nt(a.setNodeRef),className:d})}function wEe(e){let t=e.canDrop,r=e.onMove,n=e.onCardClick,i=e.columns,o=Ee(r),a=KSe(J3(qk,{activationConstraint:{distance:5}}),J3(Bk,{})),s=ce(()=>{}),l=s[1],c=s[0],d=h=>t!==void 0&&c!==void 0?t(c,h.value):!0,f=h=>{l(v=>{});let p=h.over;if(r===void 0||p==null)return;let m=i.find(v=>v.cards.some(b=>b.key===h.active.id));if(ne(t,!0,v=>v(h.active.id,p.id))&&ne(m,!0,v=>v.value!==p.id))return r(h.active.id,p.id)};return _(y9,{sensors:Nt(a),onDragStart:h=>l(p=>h.active.id),onDragEnd:f,onDragCancel:()=>l(h=>{}),children:_("div",{children:i.map(h=>_(SEe,{column:h,draggable:o,onCardClick:n,accepts:d(h)},h.value)),className:uEe})})}let EEe=wEe;function _t(e){return"var("+e+")"}let kEe=E([z("flex"),_e("column"),u("gap",_t(O.sm))]),CEe=E([z("flex"),X("center"),et("spaceBetween"),u("gap",_t(O.sm))]),lD=E([z("inlineFlex"),X("center"),u("gap",_t(O.xs))]),ch=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",_t(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",_t(x.textSecondary)),u("font-size",_t($.sizeSm)),Re("pointer"),Ue([u("background",_t(x.surfaceSubtle)),u("color",_t(x.textPrimary))])]),REe=xr([ch,E([u("background",_t(x.surfaceSubtle)),u("color",_t(x.textPrimary)),u("font-weight",_t($.weightMedium))])]),AEe=E([u("font-size",_t($.sizeMd)),u("font-weight",_t($.weightMedium)),u("color",_t(x.textPrimary))]),$Ee=E([z("grid"),u("grid-template-columns","repeat(7, 1fr)"),u("gap","1px")]),TEe=E([u("font-size",_t($.sizeXs)),u("color",_t(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),u("padding","2px var("+O.xs+")")]),NEe=E([z("grid"),u("grid-template-columns","repeat(7, 1fr)"),u("gap","1px"),u("background",_t(x.borderSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",_t(Y.md)),u("overflow","hidden")]),T9=E([z("flex"),_e("column"),u("gap","2px"),u("min-height","96px"),u("padding","4px"),u("background",_t(x.surface))]),DEe=xr([T9,E([u("opacity","0.55")])]),N9=E([u("font-size",_t($.sizeXs)),u("color",_t(x.textSecondary))]),FEe=xr([N9,E([u("color",_t(x.brand)),u("font-weight",_t($.weightMedium))])]);function IEe(e){return E([z("block"),u("width","100%"),u("text-align","left"),u("border","none"),u("border-left","3px solid "+e),u("border-radius",_t(Y.sm)),u("background",_t(x.surfaceSubtle)),u("color",_t(x.textPrimary)),u("font-size",_t($.sizeXs)),u("padding","1px var("+O.xs+")"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap"),Re("pointer"),Ue([u("background",_t(x.surfaceElevated))])])}let PEe=E([u("background","none"),u("border","none"),u("padding","0"),u("text-align","left"),u("font-size",_t($.sizeXs)),u("color",_t(x.brand)),Re("pointer"),Ue([u("text-decoration","underline")])]);function OEe(e){return E([z("grid"),u("grid-template-columns","repeat("+e.toString()+", 1fr)"),u("gap","1px"),u("background",_t(x.borderSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",_t(Y.md)),u("overflow","hidden")])}let MEe=E([z("flex"),_e("column"),u("gap","2px"),u("min-height","200px"),u("padding","4px"),u("background",_t(x.surface))]),LEe=E([u("font-size",_t($.sizeXs)),u("color",_t(x.textSecondary)),u("padding-bottom","2px"),u("border-bottom","1px solid var("+x.borderSubtle+")")]),zEe=E([z("flex"),xi("wrap"),X("center"),u("gap",_t(O.md)),u("font-size",_t($.sizeXs)),u("color",_t(x.textSecondary))]);function UEe(e){return E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e),u("margin-right","4px")])}let BEe=E([u("font-size",_t($.sizeXs)),u("color",_t(x.textDisabled))]),jEe="var("+x.brand+")";function qEe(e){return D(e.end_,e.start)}function uD(e,t){return e.filter(r=>AM(r.start,qEe(r),t)).toSorted((r,n)=>r.start-n.start)}function VEe(e,t){return TM(e.start)||!RM(e.start,t)?e.title:$M(e.start)+" "+e.title}function GEe(e){let t=e.initialDate,r=e.windowNote,n=e.legend,i=e.events,o=n!==void 0?n:[],a=ce(()=>"Month"),s=a[1],l=a[0],c=ce(()=>vi(D(t,Date.now()))),d=c[1],f=c[0],h=vi(Date.now()),p=w=>d(C=>{switch(l){case"Month":return kM(C,w);case"Week":return Ro(C,w*7|0);case"Day":return Ro(C,w)}}),m=(w,C)=>_("button",{children:VEe(w,C),className:IEe(D(w.accent,jEe)),title:w.title,onClick:A=>w.onOpen()},w.key),g=()=>{let w=iX(f);return L(Bt,{children:[_("div",{children:Vw.map(C=>_("div",{children:C,className:TEe},C)),className:$Ee}),_("div",{children:w.map(C=>{let A=uD(i,C),T=A.slice(0,3),R=A.length-T.length|0;return L("div",{children:[_("span",{children:DM(C).toString(),className:C===h?FEe:N9}),T.map(N=>m(N,C)),R>0?_("button",{children:"+"+R.toString()+" more",className:PEe,onClick:N=>{d(I=>C),s(I=>"Day")}}):null],className:oX(C,f)?T9:DEe},C.toString())}),className:NEe})]})},v=w=>_("div",{children:w.map(C=>L("div",{children:[_("div",{children:Ps(C),className:LEe}),uD(i,C).map(A=>m(A,C))],className:MEe},C.toString())),className:OEe(w.length)}),b;switch(l){case"Month":b=g();break;case"Week":b=v(Il(7,w=>Ro(Qv(f),w)));break;case"Day":b=v([vi(f)]);break}let y;switch(l){case"Month":case"Week":y=xo(f);break;case"Day":y=Ps(f)+" — "+xo(f);break}let S=(w,C)=>_("button",{children:C,className:l===w?REe:ch,onClick:A=>s(T=>w)});return L("div",{children:[L("div",{children:[L("div",{children:[_("button",{children:"‹",className:ch,onClick:w=>p(-1)}),_("button",{children:"Today",className:ch,onClick:w=>d(C=>h)}),_("button",{children:"›",className:ch,onClick:w=>p(1)}),_("span",{children:y,className:AEe})],className:lD}),L("div",{children:[S("Month","Month"),S("Week","Week"),S("Day","Day")],className:lD})],className:CEe}),o.length!==0?_("div",{children:o.map(w=>L("span",{children:[_("span",{className:UEe(w.accent)}),w.label]},w.label)),className:zEe}):null,b,r!==void 0?_("span",{children:r,className:BEe}):null],className:kEe})}let KEe=GEe;function Er(e){return"var("+e+")"}let HEe=E([z("grid"),u("grid-template-columns","repeat(auto-fill, minmax(220px, 1fr))"),u("gap",Er(O.md))]),WEe=E([z("flex"),_e("column"),X("stretch"),u("gap",Er(O.sm)),u("padding",Er(O.md)),u("background",Er(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Er(Y.md)),u("text-align","left"),Ue([u("border-color",Er(x.brand)),u("background",Er(x.surfaceSubtle))])]),JEe=E([z("flex"),_e("column"),X("stretch"),u("gap",Er(O.sm)),u("background","none"),u("border","none"),u("padding","0"),u("font","inherit"),u("color","inherit"),u("text-align","left"),Re("pointer")]),QEe=E([z("flex"),xi("wrap"),u("gap","4px")]),YEe=E([u("background",Er(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Er(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",Er(x.textPrimary)),u("font-size",Er($.sizeSm)),Re("pointer"),Ue([u("border-color",Er(x.brand)),u("color",Er(x.brand))])]),XEe=E([u("width","100%"),u("height","96px"),u("object-fit","cover"),u("border-radius",Er(Y.sm))]),ZEe=E([u("width","100%"),u("height","96px")]),e2e=E([z("flex"),X("center"),et("spaceBetween"),u("gap",Er(O.sm))]),t2e=E([u("font-size",Er($.sizeMd)),u("font-weight",Er($.weightMedium)),u("color",Er(x.textPrimary)),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),r2e=E([z("flex"),X("baseline"),u("gap",Er(O.sm)),u("font-size",Er($.sizeSm))]),n2e=E([u("color",Er(x.textSecondary)),u("white-space","nowrap"),rn(0)]),i2e=E([u("color",Er(x.textPrimary)),u("min-width","0"),u("overflow","hidden"),u("text-overflow","ellipsis")]),o2e=E([u("color",Er(x.textDisabled)),u("font-size",Er($.sizeSm))]);function a2e(e){let t=e.cards;if(t.length===0)return _("span",{children:"(empty)",className:o2e});let r=e.onCardClick;return _("div",{children:t.map(n=>{let i=n.media,o;o=i!==void 0?typeof i!="object"?_("span",{children:_(PS,{size:"Fill"}),className:ZEe}):_("img",{className:XEe,alt:n.title,src:i._0}):null;let a=n.actions;return L("div",{children:[L("button",{children:[o,L("div",{children:[_("span",{children:n.title,className:t2e,title:n.title}),D(n.badge,null)],className:e2e}),n.fields.map(s=>L("div",{children:[_("span",{children:s.label,className:n2e}),_("span",{children:s.value,className:i2e})],className:r2e},s.label))],className:JEe,onClick:s=>ee(r,l=>l(n.key))}),a!==void 0&&a.length!==0?_("div",{children:a.map(s=>_("button",{children:s.label,className:YEe,onClick:l=>s.onClick()},s.label)),className:QEe}):null],className:WEe},n.key)}),className:HEe})}let s2e=a2e;function l2e(e,t){let r=e.length,n=t.length,i=lO((r+1|0)*(n+1|0)|0,0),o=(c,d)=>i[(c*(n+1|0)|0)+d|0];for(let c=0;c<r;++c)for(let d=0;d<n;++d)i[((c+1|0)*(n+1|0)|0)+(d+1|0)|0]=e[c]===t[d]?o(c,d)+1|0:o(c,d+1|0)>o(c+1|0,d)?o(c,d+1|0):o(c+1|0,d);let a=[],s=r,l=n;for(;s>0||l>0;){let c=e[s-1|0],d=t[l-1|0];s>0&&l>0&&c===d?(a=[{kind:"Unchanged",text:c}].concat(a),s=s-1|0,l=l-1|0):l>0&&(s===0||o(s,l-1|0)>=o(s-1|0,l))?(a=[{kind:"Added",text:d}].concat(a),l=l-1|0):(a=[{kind:"Removed",text:c}].concat(a),s=s-1|0)}return a}function Su(e){return"var("+e+")"}let u2e=E([u("font-family",Su($.fontFamilyMono)),u("font-size",Su($.sizeSm)),u("line-height",Su($.lineHeightNormal)),u("border","1px solid var("+x.border+")"),u("border-radius",Su(Y.md)),Bs("auto")]),Ky=E([z("flex"),u("padding","1px var("+O.md+")")]),c2e=E([u("background","rgba(248,81,73,0.12)"),u("color",Su(x.error))]),d2e=E([u("background","rgba(63,185,80,0.12)"),u("color",Su(x.success))]),f2e=E([u("color",Su(x.textSecondary))]),h2e=E([u("width","16px"),rn(0),u("user-select","none"),LO(ke(8))]);function p2e(e){let t=e.before.split(`
|
|
94
|
+
`),r=e.after.split(`
|
|
95
|
+
`),n=l2e(t,r);return _("div",{children:n.map((i,o)=>{let a=i.kind,s;switch(a){case"Removed":s=[Ky+" "+c2e,"-"];break;case"Added":s=[Ky+" "+d2e,"+"];break;case"Unchanged":s=[Ky+" "+f2e," "];break}return L("div",{children:[_("span",{children:s[1],className:h2e}),_("span",{children:i.text})],className:s[0]},o.toString())}),className:u2e})}let m2e=p2e;function Fb(e,t){let r=new Date(t).getTime();if(Number.isNaN(r))return t;let n=(e-r)/1e3;return n<45?"just now":n<3600?Math.floor(n/60).toString()+"m ago":n<86400?Math.floor(n/3600).toString()+"h ago":n<1209600?Math.floor(n/86400).toString()+"d ago":t.slice(0,10)}function bi(e){return"var("+e+")"}let g2e=E([z("flex"),_e("column"),u("gap","2px"),u("font-family",bi($.fontFamily)),u("font-size",bi($.sizeSm))]),cD=E([z("flex"),X("flexStart"),u("gap","10px"),u("padding",bi(O.xs)+" "+bi(O.sm)),u("border-radius",bi(Y.sm))]),v2e=E([Re("pointer"),Ue([u("background",bi(x.surfaceSubtle))])]),b2e=E([z("flex"),_e("column"),u("gap","2px"),u("min-width","0"),u("flex","1")]),_2e=E([u("color",bi(x.textPrimary))]),y2e=E([u("font-weight",bi($.weightMedium))]),x2e=E([u("color",bi(x.textSecondary))]),S2e=E([z("inlineFlex"),X("center"),u("gap","6px"),u("color",bi(x.textSecondary)),u("font-size",bi($.sizeXs)),u("white-space","nowrap")]),w2e=E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("flex-shrink","0")]),E2e=E([u("background","none"),u("border","none"),u("padding","0"),u("color",bi(x.brand)),u("font-size",bi($.sizeXs)),Re("pointer"),u("text-align","left"),Ue([u("text-decoration","underline")])]),k2e=E([u("margin-top","4px"),u("max-width","560px")]),C2e=E([u("color",bi(x.textSecondary)),u("padding",bi(O.md)),Xa("center")]);function R2e(e){let t=e.onClick,r=e.entry,n=ce(()=>!1),i=n[1],o=n[0],a=Ee(r.before)&&Ee(r.after),s=D(r.actor,r.subject),l=t!==void 0?cD+" "+v2e:cD,c=r.actor,d=r.accent,f=r.timestamp;return L("div",{children:[_(Jd,{name:s,src:r.actorImageUrl,size:"Medium"}),L("div",{children:[L("span",{children:[c!==void 0?_("span",{children:c+" ",className:y2e}):null,_("span",{children:r.verb+" ",className:x2e}),r.subject],className:_2e}),L("span",{children:[d!==void 0?_("span",{className:w2e,style:{background:d}}):null,f!==void 0?Fb(e.nowMs,f):null],className:S2e}),a?_("button",{children:o?"Hide changes":"Show changes",className:E2e,onClick:h=>{h.stopPropagation(),i(p=>!p)}}):null,o&&a?_("div",{children:_(m2e,{before:D(r.before,""),after:D(r.after,"")}),className:k2e}):null],className:b2e})],className:l,onClick:h=>ee(t,p=>p(r))})}function A2e(e){let t=e.nowMs,r=e.onEntryClick,n=e.emptyLabel,i=e.entries,o=n!==void 0?n:"No activity yet",a=t!==void 0?t:Date.now();return i.length===0?_("div",{children:o,className:C2e}):_("div",{children:i.map(s=>_(R2e,{entry:s,nowMs:a,onClick:r},s.id)),className:g2e})}let $2e=A2e;function T2e(e,t){let r=e.indexOf(t);return e.map((n,i)=>{let o=r<0?"Upcoming":i<r?"Done":i===r?"Current":"Upcoming";return[n,o]})}function N2e(e,t,r){return T2e(fo(e,t),r).map(n=>{let i=n[0];return{key:i,label:pt(i),state:n[1]}})}function zo(e){return"var("+e+")"}let D2e=E([z("flex"),X("flexStart"),u("gap","0"),u("width","100%")]),F2e=E([z("flex"),_e("column"),X("center"),u("gap","4px"),u("flex","0 0 auto")]);function I2e(e){return E([u("flex","1 1 auto"),u("height","2px"),u("margin","0 6px"),u("margin-top","11px"),u("min-width","16px"),u("background",zo(e?x.brand:x.borderSubtle))])}let Kk=[z("inlineFlex"),X("center"),et("center"),u("width","24px"),u("height","24px"),u("border-radius","50%"),u("font-size",zo($.sizeXs)),u("font-weight",zo($.weightMedium)),u("box-sizing","border-box")],P2e=E(Kk.concat([u("background",zo(x.brand)),u("color","#fff")])),O2e=E(Kk.concat([u("background",zo(x.surface)),u("color",zo(x.brand)),u("border","2px solid var("+x.brand+")")])),M2e=E(Kk.concat([u("background",zo(x.surface)),u("color",zo(x.textDisabled)),u("border","1px solid var("+x.border+")")])),D9=[u("font-size",zo($.sizeXs)),u("text-align","center"),u("max-width","96px")],L2e=E(D9.concat([u("color",zo(x.textPrimary))])),z2e=E(D9.concat([u("color",zo(x.textDisabled))])),U2e=E([u("display","none")]);function B2e(e){switch(e){case"Done":return P2e;case"Current":return O2e;case"Upcoming":return M2e}}function j2e(e){switch(e){case"Done":case"Current":return L2e;case"Upcoming":return z2e}}function q2e(e,t){switch(e){case"Done":return"✓";case"Current":case"Upcoming":return(t+1|0).toString()}}function V2e(e){let t=e.compact,r=t!==void 0?t:!1;return _("div",{children:e.steps.map((n,i)=>{let o=i===0?null:_("div",{className:I2e(n.state==="Done"||n.state==="Current")},n.key+":c"),a=r?U2e:j2e(n.state);return L(Tv,{children:[o,L("div",{children:[_("span",{children:q2e(n.state,i),className:B2e(n.state)}),_("span",{children:n.label,className:a})],className:F2e,role:"listitem"})]},n.key)}),"aria-label":"Progress",className:D2e,role:"list"})}let F9=V2e;function I9(e){switch(e.toLowerCase().replaceAll("_","").replaceAll("-","")){case"accepted":case"approve":case"approved":case"confirmed":case"granted":case"signed":return"Approved";case"awaiting":case"escalated":case"inreview":case"pending":case"submitted":case"underreview":return"Pending";case"na":case"notrequired":case"skipped":case"waived":return"Skipped";case"declined":case"denied":case"refused":case"reject":case"rejected":case"withdrawn":return"Rejected";default:return{TAG:"Other",_0:e}}}function G2e(e){if(typeof e=="object")return pt(e._0);switch(e){case"Approved":return"Approved";case"Rejected":return"Rejected";case"Pending":return"Pending";case"Skipped":return"Skipped"}}function K2e(e){if(typeof e=="object")return"Neutral";switch(e){case"Approved":return"Success";case"Rejected":return"Error";case"Pending":return"Info";case"Skipped":return"Neutral"}}function H2e(e){if(typeof e=="object")return"•";switch(e){case"Approved":return"✓";case"Rejected":return"✕";case"Pending":return"•";case"Skipped":return"–"}}function W2e(e){if(typeof e=="object")return"var("+x.border+")";switch(e){case"Approved":return"var("+x.success+")";case"Rejected":return"var("+x.error+")";case"Pending":return"var("+x.info+")";case"Skipped":return"var("+x.border+")"}}function Pn(e){return"var("+e+")"}let J2e=E([z("flex"),_e("column"),u("gap",Pn(O.md)),u("font-family",Pn($.fontFamily))]),Q2e=E([z("flex"),_e("column")]),Y2e=E([z("flex"),X("stretch"),u("gap",Pn(O.sm))]),X2e=E([z("flex"),_e("column"),X("center"),u("flex","0 0 22px")]);function Z2e(e){return E([z("inlineFlex"),X("center"),et("center"),u("width","20px"),u("height","20px"),u("border-radius","50%"),u("box-sizing","border-box"),u("border","2px solid "+e),u("color",e),u("background",Pn(x.surface)),u("font-size","11px"),u("line-height","1"),u("flex","0 0 auto")])}let eke=E([u("flex","1 1 auto"),u("width","1px"),u("min-height","12px"),u("background",Pn(x.borderSubtle))]),dD=E([z("flex"),_e("column"),u("gap","2px"),u("flex","1 1 auto"),u("min-width","0"),u("padding-bottom",Pn(O.sm))]),tke=E([Re("pointer"),Ue([u("background",Pn(x.surfaceSubtle))]),u("border-radius",Pn(Y.sm)),u("padding-left","4px"),u("margin-left","-4px")]),rke=E([z("flex"),X("center"),xi("wrap"),u("gap",Pn(O.xs))]),nke=E([u("font-size",Pn($.sizeSm)),u("font-weight",Pn($.weightMedium)),u("color",Pn(x.textPrimary))]),ike=E([z("flex"),X("center"),u("gap","6px"),u("font-size",Pn($.sizeXs)),u("color",Pn(x.textSecondary))]),oke=E([u("font-size",Pn($.sizeSm)),u("color",Pn(x.textSecondary)),u("white-space","pre-wrap")]),ake=E([u("font-size",Pn($.sizeXs)),u("color",Pn(x.textDisabled))]);function ske(e){let t=e.entries;if(t.length===0)return _(Wd,{title:"No approvals",description:"Nothing in this window carries a decision."});let r=e.windowNote,n=e.nowMs,i=e.steps,o=t.length-1|0;return L("div",{children:[i!==void 0&&i.length>1?_(F9,{steps:i}):null,_("div",{children:t.map((a,s)=>{let l=Ee(a.onOpen),c=a.actor,d=a.at,f,h=0;c!==void 0||d!==void 0?h=1:f=null,h===1&&(f=L("div",{children:[c!==void 0?L(Bt,{children:[_(Jd,{name:c,src:a.actorImageUrl,size:"Small"}),_("span",{children:c})]}):null,d!==void 0?_("span",{children:Fb(D(n,Date.now()),d),title:D(Uh(d),d)}):null],className:ike}));let p=a.note;return L("div",{children:[L("div",{children:[_("span",{children:H2e(a.decision),className:Z2e(W2e(a.decision))}),s===o?null:_("div",{className:eke})],className:X2e}),L("div",{children:[L("div",{children:[_("span",{children:a.step,className:nke}),_(oa,{variant:K2e(a.decision),label:G2e(a.decision)})],className:rke}),f,p!==void 0&&p!==""?_("div",{children:p,className:oke}):null],className:l?dD+" "+tke:dD,onClick:m=>ee(a.onOpen,g=>g())})],className:Y2e},a.key)}),className:Q2e}),r!==void 0?_("span",{children:r,className:ake}):null],className:J2e})}let lke=ske;function la(e){return e.toLowerCase().replaceAll("_","").replaceAll("-","").replaceAll(" ","")}let uke=["approved","approve","accepted","granted","signed","confirmed","rejected","reject","declined","denied","refused","withdrawn","pending","awaiting","submitted","inreview","underreview","escalated","skipped","waived","notrequired"],cke=["decision","outcome","verdict","approval","approvalstatus","result"],dke=["step","stage","level","tier","approvalstep","approvallevel","phase"],fke=["note","notes","comment","comments","reason","remarks","justification","rationale"];function hke(e){let t=rc(e);if(t!==void 0&&t.length>=2&&t.length<=12)return t}function pke(e){return e.filter(t=>uke.includes(la(t))).length>=2}function P9(e){return Q(Dr(e),t=>{let r=t[1],n=t[0];if(zp(r))return q(hke(r),i=>[n,i])})}function mke(e){let t=P9(e),r=t.find(n=>cke.includes(la(n[0])));return r!==void 0?r:t.find(n=>pke(n[1]))}function gke(e,t){let r=Dr(e).map(n=>n[0]).find(n=>ne(F(t.semantics,n),!1,i=>i.semantic==="UserRef"));return r!==void 0?r:Dr(e).map(n=>n[0]).find(n=>ne(Qa(n),!1,lM))}function O9(e,t){let r=D(t,_n(e,void 0,void 0)),n=mke(e),i=r.dateSpan;if(n===void 0||i===void 0)return;let o=n[0],a=P9(e).find(s=>{let l=s[0];return l!==o?dke.includes(la(l)):!1});return{decisionField:o,dateSpan:i,stepField:q(a,s=>s[0]),stepValues:ne(a,[],s=>s[1]),actorField:gke(e,r),noteField:Q(Dr(e),s=>{let l=s[0];if(zp(s[1])&&fke.includes(la(l)))return l})[0]}}function vke(e){return Ee(O9(e,void 0))}function Hk(e){return e.rows.map((t,r)=>{let n=D(G(t),{});return{key:D(k(F(n,"id"),ie),"#"+r.toString()),json:t,dict:n}})}function vu(e,t){return k(F(e,t),ie)}function fD(e,t){return k(nc(t,e),Qn)}function hD(e,t){if(t===void 0)return e.length;let r=e.findIndex(n=>la(n)===la(t));return r!==-1?r:e.length}function bke(e,t,r){let n=r!==void 0?r:f=>f,a=Hk(e).map(f=>{let h=k(t.stepField,m=>vu(f.dict,m)),p=vu(f.dict,t.decisionField);return[f,h,p]}).slice();t.stepField!==void 0?a.sort((f,h)=>hD(t.stepValues,f[1])-hD(t.stepValues,h[1])|0):a.sort((f,h)=>{let p=fD(f[0].dict,t.dateSpan),m=fD(h[0].dict,t.dateSpan);return p!==void 0?m!==void 0?p-m:-1:m!==void 0?1:0});let l=a.map(f=>{let h=f[0];return{key:h.key,step:D(q(f[1],pt),D(k(e.semantics.labelField,p=>vu(h.dict,p)),"Decision")),decision:ne(f[2],"Pending",I9),actor:q(k(t.actorField,p=>vu(h.dict,p)),n),at:nc(t.dateSpan,h.dict),note:k(t.noteField,p=>vu(h.dict,p)),onOpen:()=>e.onOpenRow(h.key,h.json)}}),c=Q(a,f=>q(f[1],la)),d=t.stepValues.filter(f=>!c.includes(la(f))).map(f=>({key:"pending:"+f,step:pt(f),decision:"Pending"}));return l.concat(d)}function _ke(e,t){let r=t.stepField;if(r===void 0)return[];let n=Hk(e),i=Q(n,a=>{let s=vu(a.dict,r),l=vu(a.dict,t.decisionField);if(s===void 0||l===void 0)return;let c=I9(l);if(!(typeof c!="object"&&c==="Pending"))return la(s)}),o=t.stepValues.find(a=>!i.includes(la(a)));return t.stepValues.map(a=>({key:a,label:pt(a),state:i.includes(la(a))?"Done":Ce(o,a)?"Current":"Upcoming"}))}function Hs(e){return e.rows.map((t,r)=>{let n=D(G(t),{});return{key:D(k(F(n,"id"),ie),"#"+r.toString()),json:t,dict:n}})}function _f(e,t){return k(F(e,t),ie)}function M9(e,t,r){return q(_f(t,r),n=>{let i=Qa(r);return i!==void 0?D(k(e.refLabels,o=>o.lookupLabel(i,n)),n):n})}function dc(e,t){return D(k(e.semantics.labelField,r=>_f(t.dict,r)),t.key)}function yke(e,t){return q(e.semantics.imageField,r=>{let n=k(_f(t.dict,r),i=>{if(i!=="")return i});return n!==void 0?{TAG:"Picture",_0:Pu(n)}:"EmptySlot"})}function L9(e,t,r){ee(t.find(n=>n.key===r),n=>e.onOpenRow(n.key,n.json))}function z9(e,t,r){return _("span",{children:im(e,t,r!==void 0?r:"item"),style:{color:"var("+x.textDisabled+")",fontSize:"var("+$.sizeXs+")"}})}function Ib(e,t,r,n){return L("div",{children:[e,z9(t,r,n!==void 0?n:"item")],style:{display:"flex",flexDirection:"column",gap:"var("+O.sm+")"}})}function xke(e){let t=e.source,r=va(),n=Tp(),i=Hs(t),o=fi(t.schema,"List",r,t.ownEntity,t.semantics.labelField,t.semantics.projectedLabelField),a=mf(i.map(h=>h.dict),o,r,t.ownEntity,ir(t.refLabels)),s=t.refLabels,l=s!==void 0?s:{lookupLabel:(h,p)=>pf(a,h,r,p),isMissing:(h,p)=>rm(a,h,r,p),retiredBadge:(h,p)=>em(a,h,r,p),linkable:(h,p)=>tm(a,h,r,p,!1)},c=Q([t.semantics.labelField,t.semantics.imageField,t.semantics.statusField],h=>h),d=o.filter(h=>!c.includes(h.key)).slice(0,4),f=i.map(h=>{let p=q(k(t.semantics.statusField,y=>wa(h.dict,y)),y=>_(oa,{variant:"Neutral",label:pt(y),dot:!1})),m=k(t.retired,y=>Bh(y,F(h.dict,y.field))),g=p!==void 0?m!==void 0?L(Bt,{children:[p,m]}):p:m!==void 0?m:void 0,v=yke(t,h),b=q(t.rowActionsFor,y=>y(h.key,h.json).map(S=>({label:S.label,onClick:S.run})));return{key:h.key,title:dc(t,h),media:v,badge:g,fields:d.map(y=>({label:Ru(y,r,t.ownEntity),value:wl(y.key,y.kind,y.propSchema,F(h.dict,y.key),y.ann,r,n,l,t.ownEntity)})),actions:b}});return Ib(_(s2e,{cards:f,onCardClick:h=>L9(t,i,h)}),[t],void 0,void 0)}function Ske(e){let t=Hs(e),r=D(e.semantics.statusField,""),n=fo(e.schema,r),i=s=>D(wa(s.dict,r),""),o=s=>s.map(l=>({value:l,label:l===""?"(no status)":pt(l),cards:t.filter(c=>i(c)===l).map(c=>{let d=Q(Hv(e.schema),f=>{if(f!==r)return M9(e,c.dict,f)})[0];return{key:c.key,title:dc(e,c),meta:d}}),swatch:Vk(n,l)})),a=nt(t.map(i).filter(s=>!n.includes(s)),[],(s,l)=>s.includes(l)?s:s.concat([l]));return o(n).concat(o(a))}function wke(e){let t=e.source,r=Hs(t),n=D(t.semantics.statusField,""),i=Ske(t),o=f=>D(k(r.find(h=>h.key===f),h=>wa(h.dict,n)),""),a=(f,h)=>k(t.statusCommandFor,p=>p(o(f),h)),s=t.onCommand,l=s!==void 0&&Ee(t.statusCommandFor)?(f,h)=>ee(a(f,h),p=>s(p.command,f,p.patch)):void 0,d=t.statusCommandFor!==void 0?(f,h)=>Ee(a(f,h)):void 0;return Ib(_(EEe,{columns:i,onCardClick:f=>L9(t,r,f),onMove:l,canDrop:d}),[t],void 0,"card")}let qd=["var("+x.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function Wk(e,t){return D(e.accent,qd[Fo(t,qd.length)])}function Eke(e){return e.map((t,r)=>{let n=Wk(t,r),i=t.semantics.dateSpan;return i!==void 0?Q(Hs(t),o=>q(k(nc(i,o.dict),Qn),a=>{let s=k(Ow(i,o.dict),Qn);return{key:r.toString()+":"+o.key,title:dc(t,o),start:a,end_:s,accent:n,onOpen:()=>t.onOpenRow(o.key,o.json)}})):[]}).flat()}function kke(e){let t=e.sources,r=Eke(t),n=t.length>1?t.map((i,o)=>({label:i.readModelName,accent:Wk(i,o)})):[];return _(KEe,{events:r,legend:n,windowNote:im(t,void 0,void 0)})}function Cke(e){return e.map((r,n)=>{let i=r.semantics.dateSpan,o=Wk(r,n);return Hs(r).map(a=>{let s=k(i,f=>nc(f,a.dict)),l=k(s,Qn),c=s!==void 0?D(Uh(s),s):"",d=q(k(r.semantics.statusField,f=>wa(a.dict,f)),pt);return{entry:{id:n.toString()+":"+a.key,timestamp:c,label:dc(r,a),detail:d,variant:void 0,accent:o},sort:l,open_:()=>r.onOpenRow(a.key,a.json)}})}).flat().toSorted((r,n)=>{let i=r.sort,o=n.sort;return i!==void 0?o!==void 0?o-i:-1:o!==void 0?1:0})}function Rke(e){let t=e.sources,r=Cke(t),n=i=>ee(r.find(o=>o.entry.id===i),o=>o.open_());return Ib(_(Txe,{entries:r.map(i=>i.entry),onSelect:n}),t,void 0,void 0)}function U9(e,t){let r=F(e,t);if(r===void 0)return[];let n=ie(r);return n!==void 0?[n]:Q(D(Et(r),[]),ie)}function Ake(e,t){let r=t.map(n=>n.key);return Q(Dr(e.schema),n=>{let i=n[0];return q(Qa(i),o=>i)}).filter(n=>t.some(i=>U9(i.dict,n).some(o=>o!==i.key?r.includes(o):!1)))}function $ke(e){let t=Hs(e),r=Ake(e,t),n=gi(e.semantics.dateSpan,oM);return n!==void 0?Q(t,i=>q(k(nc(n,i.dict),Qn),o=>{let a=D(k(Ow(n,i.dict),Qn),o);return{key:i.key,title:dc(e,i),start:o,end_:a<o?o:a,accent:e.accent,dependsOn:r.map(s=>U9(i.dict,s)).flat(),onOpen:()=>e.onOpenRow(i.key,i.json)}})):[]}function Tke(e){let t=e.source,r=$ke(t),n=t.rows.length,i=r.length,o=im([t],i,void 0),a=i===n?o:o+" (the rest carry no start date)";return _(dSe,{tasks:r,windowNote:a})}function Nke(e,t){let r=e.semantics.labelField,n=k(e.semantics.statusField,i=>_f(t.dict,i));return n!==void 0?n:k(Hv(e.schema).find(i=>da(i,r)?da(i,e.semantics.parentField):!1),i=>M9(e,t.dict,i))}function Dke(e){let t=Hs(e),r=e.semantics.parentField;return t.map(n=>({key:n.key,title:dc(e,n),subtitle:Nke(e,n),parent:k(r,i=>_f(n.dict,i)),accent:e.accent,onOpen:()=>e.onOpenRow(n.key,n.json)}))}function Fke(e){let t=e.source,r=Dke(t);return _(yxe,{nodes:r,windowNote:im([t],void 0,void 0)})}function Ike(e){let t=e.source,r=va(),n=Hk(t),i=fi(t.schema,"List",r,t.ownEntity,t.semantics.labelField,t.semantics.projectedLabelField),o=mf(n.map(h=>h.dict),i,r,t.ownEntity,ir(t.refLabels)),a=t.refLabels,s=a!==void 0?a.lookupLabel:(h,p)=>pf(o,h,r,p),l=O9(t.schema,t.semantics);if(l===void 0)return null;let d=bke(t,l,h=>{let p=k(l.actorField,Qa);return p!==void 0?D(s(p,h),h):h}),f=_ke(t,l);return _(lke,{entries:d,steps:f,windowNote:im([t],void 0,"decision")})}function Pke(e){return Q(Dr(e),t=>{let r=rc(t[1]);if(r!==void 0&&r.length>=2&&r.length<=12)return[t[0],r]})}function B9(e){let t=Pke(e),r=_n(e,void 0,void 0).statusField,n=r!==void 0&&t.some(a=>a[0]===r)?t.filter(a=>a[0]===r).concat(t.filter(a=>a[0]!==r)):t,i=n[0],o=n[1];if(i!==void 0&&o!==void 0)return[i,o]}function Oke(e){return q(B9(e.schema),t=>{let r=t[1],n=r[1],i=r[0],o=t[0],a=o[1],s=o[0],l=Hs(e),c=(b,y)=>D(wa(b.dict,y),""),d=(b,y)=>nt(l.map(S=>c(S,b)).filter(S=>!y.includes(S)),[],(S,w)=>S.includes(w)?S:S.concat([w])),f=a.concat(d(s,a)),h=n.concat(d(i,n)),p=f.map(b=>h.map(y=>nt(l,0,(S,w)=>c(w,s)===b&&c(w,i)===y?S+1|0:S))),m=p.map(b=>nt(b,0,(y,S)=>y+S|0)),g=h.map((b,y)=>nt(p,0,(S,w)=>S+w[y]|0)),v=nt(m,0,(b,y)=>b+y|0);return{rowField:s,colField:i,rowValues:f,colValues:h,counts:p,rowTotals:m,colTotals:g,grandTotal:v}})}function Mke(e,t){return qO(e.toString(),UJ(t))}function Lke(e){let t=e.source,r=ce(()=>"Numbers"),n=r[1],i=r[0],o=Oke(t);if(o===void 0)return null;let a=g=>g===""?"(none)":pt(g),s=pt(o.rowField),l=pt(o.colField),c=o.rowValues.map(g=>[g,a(g)]),d=o.colValues.map(g=>[g,a(g)]),f=nt(o.counts,0,(g,v)=>nt(v,g,(b,y)=>y>b?y:b)),h=g=>Mke(g,r2([t])),p=(g,v)=>_("button",{children:v,style:{background:"none",backgroundColor:i===g?"var("+x.surfaceSubtle+")":"transparent",border:"1px solid var("+x.border+")",color:i===g?"var("+x.textPrimary+")":"var("+x.textSecondary+")",cursor:"pointer",fontSize:"var("+$.sizeSm+")",padding:"2px var("+O.sm+")",borderRadius:"var("+Y.sm+")"},type:"button",onClick:b=>n(y=>g)}),m;return m=i==="Numbers"?_(ySe,{rowDimLabel:s,colDimLabel:l,rowHeaders:c.map(g=>({value:g[0],label:g[1]})),colHeaders:d.map(g=>({value:g[0],label:g[1]})),cells:o.counts.map(g=>g.map(v=>({display:v.toString(),empty:v===0}))),rowTotals:o.rowTotals.map(h),colTotals:o.colTotals.map(h),grandTotal:h(o.grandTotal)}):_(X1e,{rowDimLabel:s,colDimLabel:l,rowHeaders:c.map(g=>({value:g[0],label:g[1]})),colHeaders:d.map(g=>({value:g[0],label:g[1]})),cells:o.counts.map(g=>g.map(v=>({value:v,display:v.toString()}))),maxLabel:f.toString()}),L("div",{children:[L("div",{children:[p("Numbers","Numbers"),p("Heat","Heat")],style:{display:"inline-flex",alignSelf:"flex-end",gap:"var("+O.xs+")"}}),m,z9([t],void 0,"row")],style:{display:"flex",flexDirection:"column",gap:"var("+O.sm+")"}})}function zke(e){return e.map((t,r)=>{let n=t.semantics.imageField;return Hs(t).map(i=>{let o=k(k(n,c=>_f(i.dict,c)),c=>{if(c!=="")return Pu(c)}),a=q(k(t.semantics.statusField,c=>wa(i.dict,c)),pt),s=t.fillSlot,l=o!==void 0||s===void 0||n===void 0?void 0:s(i.key,n);return{item:{key:r.toString()+":"+i.key,src:o,title:dc(t,i),caption:a,onUpload:l},open_:()=>t.onOpenRow(i.key,i.json)}})}).flat()}function Uke(e){let t=e.sources,r=zke(t),n=i=>ee(r.find(o=>o.item.key===i),o=>o.open_());return Ib(_(DSe,{items:r.map(i=>i.item),onOpen:n}),t,void 0,void 0)}function Ws(e){return _("span",{children:e,"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}})}function yf(e,t){let r=e[0];return r!==void 0?t(r):null}xa({id:"cards",label:"Cards",icon:Ws("▤"),arity:"Single",isCapable:(e,t,r)=>!0,render:e=>yf(e,t=>_(xke,{source:t})),capability:"always — richer with label/image semantics and summary fields"});xa({id:"board",label:"Board",icon:Ws("▥"),arity:"Single",isCapable:(e,t,r)=>ne(t.statusField,!1,n=>fo(e,n).length!==0),render:e=>yf(e,t=>_(wke,{source:t})),capability:"statusField — status/state/stage string enum (≤ 8 values) supplying the columns"});xa({id:"calendar",label:"Calendar",icon:Ws("▣"),arity:{TAG:"Multi",min:1},isCapable:(e,t,r)=>Ee(t.dateSpan),render:e=>_(kke,{sources:e}),capability:"dateSpan — a `date-range` field, a start*/end* date-time pair, or a lone non-infrastructure date field"});xa({id:"timeline",label:"Timeline",icon:Ws("▚"),arity:{TAG:"Multi",min:2},isCapable:(e,t,r)=>Ee(t.dateSpan),render:e=>_(Rke,{sources:e}),capability:"dateSpan — a date field to place rows on a most-recent-first chronological stream; several sources merge into one stream, accent-coded per source"});xa({id:"gantt",label:"Gantt",icon:Ws("▬"),arity:"Single",isCapable:(e,t,r)=>ne(t.dateSpan,!1,oM),render:e=>yf(e,t=>_(Tke,{source:t})),capability:"dateSpan stating an end — a `date-range` field or a start*/end* date-time pair; dependency connectors come from entity-ref fields whose ids point at other loaded rows"});xa({id:"hierarchy",label:"Hierarchy",icon:Ws("⑂"),arity:"Single",isCapable:(e,t,r)=>Ee(t.parentField),render:e=>yf(e,t=>_(Fke,{source:t})),capability:"parentField — a parent*/manager/reportsTo/supervisor string field (or one annotated `parent-ref`) whose values point at other rows of the same collection"});xa({id:"approvals",label:"Approvals",icon:Ws("✓"),arity:"Single",isCapable:(e,t,r)=>vke(e),render:e=>yf(e,t=>_(Ike,{source:t})),capability:"a decision enum — a small string enum named decision/outcome/verdict/approval/result, or any small enum declaring two or more approval values (approved/rejected/pending/…) — plus a date field to sequence the chain"});xa({id:"pivot",label:"Pivot",icon:Ws("⊞"),arity:"Single",isCapable:(e,t,r)=>Ee(B9(e)),render:e=>yf(e,t=>_(Lke,{source:t})),capability:"two small string enums (2–12 values) as the row and column dimensions"});xa({id:"gallery",label:"Gallery",icon:Ws("▨"),arity:"Single",isCapable:(e,t,r)=>Ee(t.imageField),render:e=>_(Uke,{sources:e}),capability:"imageField — a string field named image/imageUrl/photo/avatar/thumbnail (or annotated `image`) supplying each row's picture"});function pD(e,t){return e===t?0:e<t?-1:1}function Bke(e){return typeof e!="object"?e==="KBoolean"?[["true","Yes"],["false","No"]]:void 0:e.TAG==="KEnum"?e._0.map(t=>[t,t]):void 0}function dh(e,t){if(t===void 0)return"";let r=Ze(t),n=0;if(typeof r!="object"){if(r==="JSONNull")return"";n=2}else switch(r.TAG){case"JSONString":return r._0;case"JSONNumber":return r._0.toString();default:n=2}if(n===2){if(typeof e!="object")switch(e){case"KBoolean":return typeof r!="object"?r==="JSONFalse"?"No":"Yes":JSON.stringify(t);case"KArrayOfStrings":if(typeof r=="object")return r.TAG==="JSONObject"?JSON.stringify(t):Q(r._0,ie).join(", ");break}else if(e.TAG==="KUnion"&&typeof r=="object"){if(r.TAG!=="JSONObject")return JSON.stringify(t);let i=Wv(t);if(i===void 0)return"";let o=i[0];return ne(xw(e._0,o),o,a=>a.tag)}}return typeof r!="object"?r==="JSONFalse"?"false":"true":JSON.stringify(t)}function jke(e,t,r){let n=a=>a!==void 0?Ze(a)==="JSONNull":!0,i=n(t),o=n(r);if(i)return o?0:1;if(o)return-1;if(typeof e!="object")switch(e){case"KBoolean":let a=c=>{if(c===void 0)return 0;let d=Ze(c);if(typeof d=="object")return 0;switch(d){case"JSONTrue":return 1;default:return 0}};return a(t)-a(r);case"KDate":return pD(dh(e,t),dh(e,r));case"KNumber":let s=D(k(t,zi),0),l=D(k(r,zi),0);return s-l}return pD(dh(e,t),dh(e,r))}function qke(e,t,r){if(r==="")return!0;if(typeof e=="object")return e.TAG==="KEnum"?ne(k(t,ie),!1,i=>i===r):!0;if(e!=="KBoolean")return!0;let n=q(t,Ze);if(n===void 0||typeof n=="object")return!1;switch(n){case"JSONFalse":return r==="false";case"JSONTrue":return r==="true";default:return!1}}function Vke(e,t,r){if(r==="")return!0;let n=r.toLowerCase();return t.some(i=>dh(i.kind,F(e,i.key)).toLowerCase().includes(n))}function Gke(e,t,r){let n=Te(r).filter(i=>i[1]!=="");return n.length===0?e:e.filter(i=>n.every(o=>{let a=o[0],s=t.find(l=>l.key===a);return s!==void 0?qke(s.kind,F(i,a),o[1]):!0}))}function Kke(e,t,r){return r===""?e:e.filter(n=>Vke(n,t,r))}function Hke(e,t,r,n){if(r===void 0)return e;let i=t.find(a=>a.key===r);if(i===void 0)return e;let o=n==="Asc"?1:-1;return e.toSorted((a,s)=>jke(i.kind,F(a,r),F(s,r))*o)}function Wke(e,t){return Q(e,r=>{if(!lue(r.kind))return;let n=Bke(r.kind);if(n===void 0)return;let i=n.map(o=>({label:o[1],value:o[0]}));return{key:r.key,label:r.label,options:i,value:D(F(t,r.key),"")}})}function Zo(e){return"var("+e+")"}let Jke=E([At("relative"),z("inlineFlex"),X("center")]),Qke=E([u("background",Zo(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Zo(Y.md)),u("padding","var("+O.xs+") var("+O.md+")"),u("padding-left","32px"),u("font-size",Zo($.sizeMd)),u("color",Zo(x.textPrimary)),u("outline","none"),u("width","240px"),qs([u("border-color",Zo(x.brand))]),cJ([u("color",Zo(x.textDisabled))])]),Yke=E([At("absolute"),Us(ke(10)),u("color",Zo(x.textDisabled)),u("font-size",Zo($.sizeSm)),u("pointer-events","none")]),Xke=E([At("absolute"),js(ke(8)),u("background","none"),u("border","none"),u("cursor","pointer"),u("color",Zo(x.textDisabled)),u("font-size",Zo($.sizeSm)),u("padding","0"),u("line-height","1"),Ue([u("color",Zo(x.textSecondary))])]);function Zke(e){let t=e.placeholder,r=e.onChange,n=e.value,i=t!==void 0?t:"Search...";return L("div",{children:[_("span",{children:"/",className:Yke}),_("input",{className:Qke,placeholder:i,type:"text",value:n,onChange:o=>r(o.target.value)}),n!==""?_("button",{children:"x",className:Xke,onClick:o=>r("")}):null],className:Jke})}let j9=Zke;function vl(e){return"var("+e+")"}let eCe=E([z("flex"),X("center"),u("gap",vl(O.sm)),xi("wrap")]),tCe=E([z("flex"),X("center"),u("gap","4px")]),rCe=E([u("color",vl(x.textSecondary)),u("font-size",vl($.sizeSm)),u("white-space","nowrap")]),nCe=E([u("background",vl(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",vl(Y.sm)),u("padding","2px var("+O.sm+")"),u("font-size",vl($.sizeSm)),u("color",vl(x.textPrimary)),u("cursor","pointer"),u("outline","none"),qs([u("border-color",vl(x.brand))])]);function q9(e){let t=e.onChange,r=e.filter;return L("div",{children:[_("span",{children:r.label+":",className:rCe}),L("select",{children:[_("option",{children:"All",value:""}),r.options.map(n=>_("option",{children:n.label,value:n.value},n.value))],className:nCe,value:r.value,onChange:n=>t(r.key,n.target.value)})],className:tCe})}let iCe={make:q9};function oCe(e){let t=e.onSearchChange,r=e.searchValue,n=e.onFilterChange;return L("div",{children:[r!==void 0&&t!==void 0?_(j9,{value:r,onChange:t}):null,e.filters.map(i=>_(q9,{filter:i,onChange:n},i.key))],className:eCe})}let V9=oCe;function Jk(){let e=ce(()=>{}),t=e[1],r=e[0],n=o=>{if(typeof o!="object")return t(s=>{});let a=o._0;t(s=>a)};return{element:r!==void 0?_(Tk,{variant:"Error",title:r.command,message:r.reason,onDismiss:()=>t(o=>{})}):null,onNotice:n}}function mD(e){try{return decodeURIComponent(e)}catch{return e}}function aCe(e,t){return encodeURIComponent(e)+"/"+encodeURIComponent(t)}function gD(e){let t=e.split("/");if(t.length!==2)return[e,void 0];let r=t[0],n=t[1];return[mD(r),mD(n)]}function ro(e){return"var("+e+")"}let sCe=E([z("flex"),_e("column"),X("center"),et("center"),u("gap",ro(O.md)),si(1),u("min-height","160px"),Xa("center"),u("padding",ro(O.lg))]),lCe=E([u("font-size","32px"),u("color",ro(x.error)),u("line-height","1")]),uCe=E([u("color",ro(x.textPrimary)),u("font-size",ro($.sizeLg)),u("font-weight",ro($.weightMedium)),yn(ke(0))]),cCe=E([u("color",ro(x.textSecondary)),u("font-size",ro($.sizeSm)),u("line-height",ro($.lineHeightNormal)),yn(ke(0))]),dCe=E([u("background",ro(x.brand)),u("color",ro(x.textOnBrand)),u("border","none"),u("border-radius",ro(Y.md)),u("padding","var("+O.xs+") var("+O.md+")"),u("font-size",ro($.sizeSm)),u("cursor","pointer"),Uo(ke(4))]);function fCe(e){let t=e.title,r=t!==void 0?t:"Something went wrong";return L("div",{children:[_("div",{children:"X",className:lCe}),_("h3",{children:r,className:uCe}),ne(e.detail,null,n=>_("p",{children:n,className:cCe})),ne(e.onRetry,null,n=>_("button",{children:"Try again",className:dCe,onClick:i=>n()}))],className:sCe})}let Pa=fCe;function hCe(e){return e.metaKey||e.ctrlKey||e.shiftKey||e.altKey?!0:e.button!==0}function Fl(e){return"var("+e+")"}let pCe=E([z("flex"),X("center"),u("gap",Fl(O.xs)),u("font-size",Fl($.sizeSm)),u("color",Fl(x.textSecondary)),u("min-width","0")]),mCe=E([u("color",Fl(x.brand)),u("text-decoration","none"),u("white-space","nowrap"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("max-width","18ch"),Ue([u("text-decoration","underline")])]),gCe=E([u("color",Fl(x.textPrimary)),u("font-weight",Fl($.weightMedium))]),vCe=E([u("color",Fl(x.textDisabled)),u("font-size",Fl($.sizeLg)),u("line-height","1"),rn(0),zO("none")]),G9=_("span",{children:"›","aria-hidden":!0,className:vCe});function bCe(e){let t=e.allLinks,r=e.crumbs,n=t!==void 0?t:!1;return _("nav",{children:r.map((i,o)=>{let a=!n&&o===(r.length-1|0);return L(Tv,{children:[o>0?G9:null,a||ir(i.href)&&ir(i.onClick)?_("span",{children:i.label,className:gCe}):_("a",{children:i.label,className:mCe,title:i.label,href:D(i.href,"#"),onClick:q(i.onClick,s=>(l=>{if(!hCe(l))return l.preventDefault(),s()}))})]},i.label)}),"aria-label":"breadcrumbs",className:pCe})}let K9=bCe;function wo(e){return"var("+e+")"}let _Ce=E([At("relative"),z("inlineBlock")]),yCe=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",wo(Y.sm)),u("cursor","pointer"),u("color",wo(x.textSecondary)),u("padding","2px var("+O.sm+")"),u("font-size",wo($.sizeSm)),Ue([u("background",wo(x.surfaceSubtle)),u("color",wo(x.textPrimary))])]),xCe=E([At("absolute"),js(ke(0)),Bo({NAME:"percent",VAL:100}),Uo(ke(4)),u("background",wo(x.surfaceElevated)),u("border","1px solid var("+x.border+")"),u("border-radius",wo(Y.md)),u("box-shadow",wo(Zr.md)),u("min-width","160px"),u("z-index","200"),u("overflow","hidden"),lJ(ke(4),ke(0))]);function SCe(e){return E([z("block"),ga({NAME:"percent",VAL:100}),u("background","none"),u("border","none"),u("text-align","left"),u("padding","var("+O.xs+") var("+O.md+")"),u("font-size",wo($.sizeMd)),u("color",wo(e?x.error:x.textPrimary)),Re("pointer"),Ue([u("background",wo(x.surfaceSubtle))])])}let wCe=E([u("border","none"),u("border-top","1px solid var("+x.borderSubtle+")"),rJ(ke(4),ke(0))]);function ECe(e){let t=e.triggerLabel,r=t!==void 0?t:"...",n=ce(()=>!1),i=n[1],o=n[0];return Ae(()=>{if(!o)return;let a=s=>i(l=>!1);return document.addEventListener("click",a),()=>{document.removeEventListener("click",a)}},[o]),L("div",{children:[_("button",{children:r,className:yCe,onClick:a=>{a.stopPropagation(),i(s=>!s)}}),o?_("div",{children:e.items.map((a,s)=>{if(typeof a!="object")return _("hr",{className:wCe},s.toString());let l=a.onClick,c=a.label;return _("button",{children:c,className:SCe(a.danger),onClick:d=>{i(f=>!1),l()}},c)}),className:xCe,onClick:a=>{a.stopPropagation()}}):null],className:_Ce})}let H9=ECe;function Ba(e){return"var("+e+")"}let kCe=E([z("flex"),X("center"),u("gap",Ba(O.md)),u("flex-wrap","wrap"),u("padding-bottom",Ba(O.sm)),u("border-bottom","1px solid var("+x.borderSubtle+")")]),W9=E([u("display","inline-flex"),X("center"),u("vertical-align","middle"),u("gap",Ba(O.xs)),u("min-width","0"),u("max-width","100%"),u("margin-right",Ba(O.md)),u("flex","0 1 auto")]),CCe=E([u("font-size",Ba($.sizeLg)),u("font-weight",Ba($.weightMedium)),u("color",Ba(x.textPrimary)),u("line-height",Ba($.lineHeightTight)),yn(ke(0)),u("min-width","8ch"),u("white-space","nowrap"),u("overflow","hidden"),u("text-overflow","ellipsis")]),RCe=E([u("display","inline-flex"),X("center"),u("vertical-align","middle"),u("flex-wrap","wrap"),u("gap",Ba(O.sm)),u("flex","0 1 auto"),u("min-width","0"),u("max-width","100%")]),ACe=E([z("flex"),X("center"),u("flex-wrap","wrap"),et("flexEnd"),u("gap",Ba(O.sm)),rn(0),u("margin-left","auto")]),$Ce={titleGroup:W9};function Nu(e){return"var("+e+")"}let J9=E([z("inlineFlex"),X("center"),u("gap","4px"),u("border-radius",Nu(Y.md)),u("padding","2px var("+O.sm+")"),u("font-size",Nu($.sizeSm)),u("line-height","1.6"),u("white-space","nowrap"),Re("pointer"),Tw([u("opacity","0.4"),Re("notAllowed")])]),TCe=xr([J9,E([u("background",Nu(x.brand)),u("color",Nu(x.textOnBrand)),u("border","1px solid transparent"),Ue([u("filter","brightness(1.08)")])])]),Q9=xr([J9,E([u("background",Nu(x.surface)),u("color",Nu(x.textPrimary)),u("border","1px solid var("+x.border+")"),Ue([u("background",Nu(x.surfaceSubtle))])])]);function NCe(e){let t=e.inBar,r=e.actions,n=e.commands,i=e.titleAccessory,o=e.title,a=e.crumbs,s=a!==void 0?a:[],l=i!==void 0?i:null,c=n!==void 0?n:[],d=r!==void 0?r:null,f=t!==void 0?t:!1,h=A_e(),p=yd(Jn.narrow),m=s.length!==0,g=w=>_("button",{children:w.label,className:D(w.primary,!1)?TCe:Q9,onClick:C=>w.run()},w.key),v=p&&c.length>2,b;if(v){let w=c.slice(1);b=L(Bt,{children:[ne(c[0],null,g),_(H9,{items:w.map(C=>({TAG:"Action",label:C.label,onClick:C.run,danger:!1})),triggerLabel:"⋯ "+w.length.toString()})]})}else b=c.map(g);let y=ne(e.controls,null,w=>cv(f?h:void 0,_("div",{children:w,className:ACe}))),S=L(Bt,{children:[L("div",{children:[m?_(K9,{crumbs:s,allLinks:!0}):null,m?G9:null,_("h1",{children:o,className:CCe,title:o}),l],className:W9}),L("div",{children:[b,d],className:RCe}),y]});return f?S:_("div",{children:S,className:kCe})}let DCe=Q9,Y9=NCe;function X9(e,t){return t!==void 0?(r,n)=>t(r,n).then(Dxe):e!==void 0?(r,n)=>e(r,n).then(Zz):void 0}function fm(){let e=li(),t=Zp();return X9(e,t)}let FCe=Oe([["ProductsNotAvailable",{template:"These products aren't available yet: {{missing}}.",idFields:[{field:"missing",entityStem:"product"}]}],["OrderAlreadyPlaced",{template:"This order has already been placed.",idFields:[]}],["CategoryAlreadyArchived",{template:"This category is already archived.",idFields:[]}]]);function ICe(e,t){return e!==void 0?t!==void 0?t+" ("+e+")":"Command rejected: "+e:t!==void 0?t:"Command rejected"}function vD(e,t){return ne(k(G(e),r=>F(r,t)),[],r=>{let n=Ze(r);if(typeof n!="object")return[];switch(n.TAG){case"JSONString":let i=n._0;return i!==""?[i]:[];case"JSONArray":return Q(n._0,ie).filter(o=>o!=="");default:return[]}})}function PCe(e){return k(e,t=>{try{return JSON.parse(t)}catch{return}})}function bD(e,t){return nt(Te(t),e,(r,n)=>r.replaceAll("{{"+n[0]+"}}",n[1]))}function OCe(e,t,r,n){let i=jo(t,r);return i!==void 0?Mt(e2(e,i,n).then(o=>{let a=o[0];return n.map(s=>{let l=F(a,s);return l!==void 0?l:s})}),o=>Promise.resolve(n)):Promise.resolve(n)}function hm(e,t,r,n){let i=ICe(r,n);if(r===void 0)return Promise.resolve(i);let o=F(FCe,r);if(o===void 0)return Promise.resolve(i);if(o.idFields.length===0)return Promise.resolve(o.template);let a=PCe(n);if(a===void 0)return Promise.resolve(o.template);if(e!==void 0){let l=o.idFields.map(c=>{let d=c.field,f=vD(a,d);return f.length===0?Promise.resolve([d,""]):OCe(e,t,c.entityStem,f).then(h=>Promise.resolve([d,h.join(", ")]))});return Promise.all(l).then(c=>{let d={};return c.forEach(f=>{d[f[0]]=f[1]}),Promise.resolve(bD(o.template,d))})}let s={};return o.idFields.forEach(l=>{let c=l.field,d=vD(a,c);s[c]=d.join(", ")}),Promise.resolve(bD(o.template,s))}let MCe="The request failed — the change was not sent.",_D="This command could not be sent. See the console for details.";function LCe(e,t,r){let n={};return Te(D(G(r),{})).forEach(i=>{n[i[0]]=i[1]}),n[D(e.aggregateIdField,"id")]=t,n}function Qk(e,t,r,n,i,o,a,s,l){let c=a!==void 0?a:[],d=s!==void 0?s:m=>{},f=l!==void 0?l:m=>{},h=r.filter(m=>m.level==="Instance"),p=X9(e,t);return(m,g,v)=>{let b=h.find(y=>y.name===m);if(p!==void 0)if(b!==void 0){f(g),Mt(p(b.mutationDocument,LCe(b,g,v)).then(y=>{if(typeof y!="object")return y==="Accepted"?(i||o(),d("Cleared"),Promise.resolve()):(i||setTimeout(()=>o(),500),d("Cleared"),Promise.resolve());{if(y.TAG==="Rejected"){let w=y._0;return console.warn("[AutoUI] "+n+": command "+m+" rejected"+ne(w.errorCode,"",C=>" ("+C+")")),o(),hm(e,c,w.errorCode,w.detail).then(C=>(d({TAG:"Failed",_0:{command:b.label,reason:C}}),Promise.resolve()))}let S=y._0;return console.error("[AutoUI] "+n+": command "+m+" not executed — "+S),o(),d({TAG:"Failed",_0:{command:b.label,reason:S}}),Promise.resolve()}}),y=>(console.error("[AutoUI] "+n+": command "+m+" failed to reach the server"),d({TAG:"Failed",_0:{command:b.label,reason:MCe}}),o(),Promise.resolve()));return}else return console.error("[AutoUI] "+n+': command "'+m+'" is not an instance command of this view'),d({TAG:"Failed",_0:{command:m,reason:_D}});else return console.error("[AutoUI] "+n+': command "'+m+'" not sent — no GraphQL executor in context'),d({TAG:"Failed",_0:{command:m,reason:_D}})}}let zCe=500;function hi(e){return"var("+e+")"}let UCe=E([At("relative"),z("inlineBlock")]),BCe=E([z("inlineFlex"),X("center"),u("gap","6px"),u("background",hi(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",hi(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",hi(x.textSecondary)),u("font-size",hi($.sizeSm)),u("white-space","nowrap"),Re("pointer"),Ue([u("background",hi(x.surfaceSubtle)),u("color",hi(x.textPrimary))])]),jCe=E([z("inlineFlex"),X("center"),et("center"),u("min-width","16px"),u("height","16px"),u("padding","0 4px"),u("border-radius",hi(Y.full)),u("background",hi(x.brand)),u("color",hi(x.textOnBrand)),u("font-size",hi($.sizeXs)),u("line-height","1")]),qCe=E([At("absolute"),Us(ke(0)),Bo({NAME:"percent",VAL:100}),Uo(ke(4)),z("flex"),_e("column"),u("gap",hi(O.sm)),u("align-items","stretch"),u("background",hi(x.surfaceElevated)),u("border","1px solid var("+x.border+")"),u("border-radius",hi(Y.md)),u("box-shadow",hi(Zr.md)),u("padding",hi(O.md)),u("min-width","220px"),u("max-width","min(320px, calc(100vw - 32px))"),u("max-height","min(60vh, 420px)"),u("overflow-y","auto"),u("z-index","200")]);function VCe(e){let t=e.label,r=e.activeCount,n=t!==void 0?t:"Filters",i=ce(()=>!1),o=i[1],a=i[0];return Ae(()=>{if(!a)return;let s=l=>o(c=>!1);return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}},[a]),L("div",{children:[L("button",{children:[n,r>0?_("span",{children:r.toString(),className:jCe}):null,_("span",{children:"▾","aria-hidden":!0})],"aria-expanded":a,className:BCe,onClick:s=>{s.stopPropagation(),o(l=>!l)}}),a?_("div",{children:e.children,className:qCe,onKeyDown:s=>{if(s.key==="Escape")return o(l=>!1)},onClick:s=>{s.stopPropagation()}}):null],className:UCe})}let GCe=VCe;function BS(e){return"var("+e+")"}let KCe=E([z("grid"),u("grid-template-columns","minmax(0, 1fr) minmax(0, 1.4fr)"),u("gap",BS(O.lg)),u("align-items","start"),Ga(Jn.narrow,[u("grid-template-columns","minmax(0, 1fr)")])]),Z9=E([u("min-width","0"),u("overflow","auto")]),HCe=xr([Z9,E([u("border-left","1px solid var("+x.border+")"),u("padding-left",BS(O.lg)),Ga(Jn.narrow,[u("border-left","none"),u("padding-left","0"),u("border-top","1px solid var("+x.border+")"),u("padding-top",BS(O.lg))])])]);function WCe(e){return L("div",{children:[_("div",{children:e.master,className:Z9}),_("div",{children:e.detail,className:HCe})],className:KCe})}let JCe=WCe;function Sp(e){return"var("+e+")"}let QCe=E([z("flex"),_e("column"),X("center"),et("center"),u("gap",Sp(O.md)),si(1),u("min-height","160px"),u("color",Sp(x.textSecondary))]),YCe=E([u("width","32px"),u("height","32px"),u("border","3px solid var("+x.borderSubtle+")"),u("border-top-color",Sp(x.brand)),u("border-radius","50%"),u("animation","rv-spin 0.7s linear infinite")]),XCe=E([u("font-size",Sp($.sizeSm)),u("color",Sp(x.textSecondary))]);vJ("@keyframes rv-spin",[lr("from",[u("transform","rotate(0deg)")]),lr("to",[u("transform","rotate(360deg)")])]);function ZCe(e){return L("div",{children:[_("div",{className:YCe}),ne(e.label,null,t=>_("span",{children:t,className:XCe}))],className:QCe})}let Sd=ZCe;function eRe(e,t){return D(k(F(e,t),ie),"")}function tRe(e,t,r){let n={},i=[];e.forEach(a=>{let s=eRe(a,t),l=F(n,s);l!==void 0?l.push(a):(n[s]=[a],i.push(s))});let o=a=>{if(a==="")return r.length+1|0;let s=r.indexOf(a);return s!==-1?s:r.length};return i.toSorted((a,s)=>{let l=o(a),c=o(s);return l!==c?l-c|0:a<s?-1:a>s?1:0}).map(a=>[a,D(F(n,a),[])])}function go(e){return k(k(G(e),t=>F(t,"id")),ie)}function e7(e){return D(q(k(k(G(e),t=>F(t,"properties")),G),t=>Object.keys(t)),[])}function Nh(e,t){return k(G(e),r=>F(r,t))}function rRe(e,t,r,n){let i=n!==void 0?n:[],o=G(e),a=G(t);if(o===void 0||a===void 0)return e;let s=Oe(Te(o));return r.filter(l=>!i.includes(l)).forEach(l=>{let c=F(a,l),d=F(o,l);if(c!==void 0){s[l]=c;return}else if(d!==void 0){s[l]=null;return}else return}),s}function t7(e){return e.startsWith("__")?!0:e.startsWith("$")}function nRe(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")?!0:r>3?t.endsWith("ids"):!1}let r7="$offload";function jS(e){let t=Ze(e);if(typeof t!="object")return!1;switch(t.TAG){case"JSONObject":let r=t._0;return Ee(F(r,r7))?!0:Np(r).some(jS);case"JSONArray":return t._0.some(jS);default:return!1}}function qS(e){let t=Ze(e);if(typeof t=="object")switch(t.TAG){case"JSONObject":let r=t._0,n=k(F(r,r7),G);if(n===void 0)return nt(Np(r),void 0,(o,a)=>vn(o,qS(a)));let i=k(F(n,"hash"),ie);return i!==void 0?i:k(F(n,"key"),ie);case"JSONArray":return nt(t._0,void 0,(o,a)=>vn(o,qS(a)));default:return}}function n7(e,t){return Q(t,r=>q(k(Nh(e,r),qS),n=>[r,n]))}function iRe(e,t,r,n){let i=n!==void 0?n:[],o=r.some(l=>i.includes(l)?!1:ne(Nh(t,l),!1,jS)),s=ne(G(e),!1,l=>Object.keys(l).some(c=>t7(c)?!1:!r.includes(c)))&&r.some(l=>nRe(l)?da(Nh(e,l),Nh(t,l)):!1);return o?!1:!s}let yD=new Map;function oRe(e,t){let r=ne(G(e),[],i=>Object.keys(i).filter(o=>t7(o)?!1:!t.includes(o)));if(r.length===0)return;let n=r.join(",");if(ir(yD.get(n))){yD.set(n,!0),console.warn("AutoLiveApply: the live-update payload carries fields the state schema does not declare ("+n+") — they will not be merged. The persisted manifest is likely behind the deployed projection.");return}}function aRe(e,t,r,n){return Q(n7(t,r),i=>{let o=i[1],a=i[0],s=n.some(c=>c[0]===a?c[1]===o:!1),l=ne(Nh(e,a),!1,c=>Ze(c)!=="JSONNull");if(s&&l)return a})}function i7(e,t,r,n){let i=n!==void 0?n:[],o=t.state;if(o===void 0)return;let a=e7(r);if(a.length===0)return;oRe(o,a);let s=aRe(e,o,a,i),l=rRe(e,o,a,s);if(iRe(e,l,a,s))return l}function sRe(e,t){return i7({},e,t,void 0)}function lRe(e,t,r){return q(k(k(G(t),n=>F(n,r)),Et),n=>{let i=Q(n,go);return{rows:n,gone:e.filter(o=>!i.includes(o))}})}function uRe(e,t){let r=k(G(e),n=>F(n,t));if(r!==void 0)return Ze(r)==="JSONNull"?"Absent":{TAG:"Present",_0:r}}function cRe(e,t){return t.length===0?e:e.filter(r=>{let n=go(r);return n!==void 0?!t.includes(n):!0})}let Hy={fromBatch:lRe,fromSingle:uRe,drop:cRe},dRe=/^[0-9]+$/;function xD(e){if(!dRe.test(e))return;let t=e.length,r=n=>{for(;;){let i=n;if(!(i<(t-1|0)&&Ce(e[i],"0")))return i;n=i+1|0}};return e.slice(r(0))}function fRe(e,t){let r=xD(e),n=xD(t);if(r===void 0||n===void 0)return!0;let i=r.length,o=n.length;return i===o?r>n:i>o}function hRe(){return new Map}function o7(e,t,r){if(r===void 0)return!0;let n=e.get(t);return n!==void 0?fRe(r,n):!0}function pRe(e,t,r){if(r!==void 0&&o7(e,t,r)){e.set(t,r);return}}let vs={make:hRe,shouldApply:o7,record:pRe};function mRe(){return new Map}function a7(e,t){return D(e.get(t),[])}function s7(e,t,r){if(r.length!==0){e.set(t,r);return}}function gRe(e,t,r,n){let i=i7(t,r,n,a7(e,r.id)),o=r.state;return o!==void 0&&s7(e,r.id,n7(o,e7(n))),i}let nd={make:mRe,known:a7,record:s7,apply:gRe},SD=21;function l7(e,t,r){return Q(t5(e,t),n=>{let i=k(F(n,"id"),ie),o=D(k(F(n,r),ie),D(i,""));return q(i,a=>({id:a,label:o}))})}function vRe(e,t){let r=li(),n=ce(()=>({loading:!0,options:[],hasMore:!1})),i=n[1];return Ae(()=>{let o={contents:!1};if(i(a=>({loading:!0,options:[],hasMore:!1})),r!==void 0){let a=t==="id"?"id":"id "+t,s="query { "+e+"(first: "+SD.toString()+") { edges { node { "+a+" } } } }";Mt(r(s,{}).then(l=>{if(!o.contents){let c=l7(l,e,t),d=c.length>=SD,f=d?c.slice(0,20):c;i(h=>({loading:!1,options:f,hasMore:d}))}return Promise.resolve()}),l=>(o.contents||(console.warn("[AutoUI] RefField "+e+" fetch failed",l),i(c=>({loading:!1,options:[],hasMore:!1}))),Promise.resolve()))}else o.contents||i(a=>({loading:!1,options:[],hasMore:!1}));return()=>{o.contents=!0}},[r,e,t]),n[0]}function bRe(e,t,r){let n=li(),i=ce(()=>({loading:!1,options:[],error:!1})),o=i[1];return Ae(()=>{if(r===""){o(l=>({loading:!1,options:[],error:!1}));return}let a={contents:!1};o(l=>({loading:!0,options:l.options,error:l.error}));let s=setTimeout(()=>{if(a.contents)return;if(n===void 0)return o(f=>({loading:!1,options:[],error:!1}));let l=t==="id"?"id":"id "+t,c="query($q: String!) { "+e+"(first: 20, filter: {search: $q}) { edges { node { "+l+" } } } }",d={};d.q=r,Mt(n(c,d).then(f=>{if(!a.contents){let h=l7(f,e,t);o(p=>({loading:!1,options:h,error:!1}))}return Promise.resolve()}),f=>(a.contents||(console.warn("[AutoUI] RefField "+e+" search failed; falling back to client-side filter",f),o(h=>({loading:!1,options:[],error:!0}))),Promise.resolve()))},250);return()=>{a.contents=!0,clearTimeout(s)}},[n,r,e]),i[0]}function _Re(e,t,r){let n=li(),i=ce(()=>{}),o=i[1];return Ae(()=>{let a={contents:!1},s=0;if(n!==void 0&&t!==void 0&&t!==""){let l=r==="id"?"id":"id "+r,c="query($id: ID!) { "+e+"(id: $id) { "+l+" } }",d={};d.id=t,Mt(n(c,d).then(f=>{if(!a.contents){let h=G(f),p=D(k(k(h,b=>F(b,"data")),G),{}),m=F(p,e),g=m!==void 0?m:k(h,b=>F(b,e)),v=k(g,G);if(v!==void 0){let b=D(k(F(v,"id"),ie),t),y=D(k(F(v,r),ie),b);o(S=>({id:b,label:y}))}else o(b=>{})}return Promise.resolve()}),f=>Promise.resolve())}else s=1;return s===1&&o(l=>{}),()=>{a.contents=!0}},[n,t,r]),i[0]}function $r(e){return"var("+e+")"}function fh(e){if(e==="")return[];let t=Et(JSON.parse(e));return t!==void 0?Q(t,ie):[e]}function yRe(e){return JSON.stringify(e.map(t=>t))}function xRe(e,t){if(t==="")return e;let r=t.toLowerCase();return e.filter(n=>n.label.toLowerCase().includes(r))}let SRe=E([At("relative"),ga({NAME:"percent",VAL:100})]),wD=E([u("background",$r(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",$r(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")"),u("font-size",$r($.sizeMd)),u("color",$r(x.textPrimary)),u("outline","none"),ga({NAME:"percent",VAL:100}),oJ(ke(34)),z("flex"),X("center"),xi("wrap"),u("gap","4px"),Re("pointer"),Xa("left"),qs([u("border-color",$r(x.brand))])]),wRe=E([u("border-color",$r(x.brand))]),ERe=E([u("border-color",$r(x.error))]),kRe=E([u("color",$r(x.textSecondary))]),CRe=E([z("inlineFlex"),X("center"),u("background",$r(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",$r(Y.sm)),u("padding","2px 6px"),u("font-size",$r($.sizeSm)),u("gap","4px")]),RRe=E([Re("pointer"),u("color",$r(x.textSecondary)),u("font-weight",$r($.weightBold))]),ARe=E([u("border","none"),u("background","transparent"),u("outline","none"),u("color",$r(x.textPrimary)),u("font-size",$r($.sizeMd)),si(1),$w(ke(40))]),$Re=E([At("absolute"),Bo({NAME:"percent",VAL:100}),Us("zero"),js("zero"),Uo(ke(2)),u("background",$r(x.surfaceElevated)),u("border","1px solid var("+x.border+")"),u("border-radius",$r(Y.sm)),u("box-shadow",$r(Zr.md)),tJ("none"),yn("zero"),sJ("zero"),nJ(ke(240)),aJ("auto"),uJ(20)]),TRe=E([u("padding","var("+O.xs+") var("+O.sm+")"),Re("pointer"),u("color",$r(x.textPrimary)),u("font-size",$r($.sizeMd))]),NRe=E([u("background",$r(x.surfaceSubtle))]),DRe=E([u("background",$r(x.brandSubtle))]),ED=E([u("padding","var("+O.xs+") var("+O.sm+")"),u("color",$r(x.textSecondary)),u("font-size",$r($.sizeSm))]),FRe=(function(e,t){return e.contains(t)});function IRe(e){let t=e.getBoundingClientRect(),r=window.innerHeight-t.bottom-12,n=t.top-12,i=r<240&&n>r,a=Math.max(120,Math.min(240,i?n:r));return[i,a]}function PRe(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,o=e.value,a=e.required,s=e.multi,l=e.labelField,c=e.queryField,d=e.fieldKey,f=n!==void 0?n:()=>{},h=r!==void 0?r:!1,p=t!==void 0?t:!1,m=vRe(c,l),g=m.options,v=m.loading,b=Ne(void 0),y;if(s)y="Search";else{let rt=b.current;if(rt!==void 0)y=rt;else if(v)y="Inline";else{let dt=m.hasMore?"Search":"Inline";b.current=dt,y=dt}}let S=ce(()=>!1),w=S[1],C=S[0],A=ce(()=>0),T=A[1],R=A[0],N=ce(()=>""),I=N[1],M=N[0],P=ce(()=>[!1,240]),B=P[1],j=P[0],W=Ne(null),te=Ne(null),J=s||o===""?!1:!g.some(rt=>rt.id===o),re=_Re(e.singleQueryField,J?o:void 0,l),se=rt=>{let dt=q(g.find(Pt=>Pt.id===rt),Pt=>Pt.label),Vt=k(re,Pt=>{if(Pt.id===rt)return Pt.label});return dt!==void 0?dt:Vt!==void 0?Vt:rt};Ae(()=>{if(!C)return;let rt=dt=>{let Vt=dt.target,Pt=W.current;if(Pt!=null&&!FRe(Pt,Vt))return w(Dt=>!1)};return document.addEventListener("mousedown",rt),()=>{document.removeEventListener("mousedown",rt)}},[C]),iO(()=>{if(C){let rt=W.current;rt!=null&&B(dt=>IRe(rt))}},[C]);let pe=y==="Search"&&M!=="",K=bRe(c,l,pe?M:""),oe=xRe(g,M),le=pe&&!K.error?K.options:oe,Z=le.length,ve=v||pe&&K.loading,me=rt=>{let dt=fh(o),Vt=dt.some(Dt=>Dt===rt)?dt.filter(Dt=>Dt!==rt):dt.concat([rt]);i(d,JSON.stringify(Vt.map(Dt=>Dt))),I(Dt=>""),T(Dt=>0);let Pt=te.current;if(Pt!=null){Pt.focus();return}},be=rt=>{let dt=le[rt];if(dt!==void 0){if(s)return me(dt.id);{let Vt=dt.id;return i(d,Vt),w(Pt=>!1),I(Pt=>"")}}},Ge=rt=>{switch(rt.key){case"ArrowDown":return rt.preventDefault(),C?T(Dt=>Z===0?0:Fo(Dt+1|0,Z)):w(Dt=>!0);case"ArrowUp":return rt.preventDefault(),T(Dt=>Z===0?0:Fo((Dt-1|0)+Z|0,Z));case"Backspace":if(!(s&&M===""))return;let Vt=fh(o);if(Vt.length===0)return;let Pt=Vt.slice(0,Vt.length-1|0);return i(d,JSON.stringify(Pt.map(Dt=>Dt)));case"Enter":return C?(rt.preventDefault(),be(R)):void 0;case"Escape":return C?w(Dt=>!1):void 0;default:return}},Lt=C?wD+" "+wRe:wD,Ct=h?Lt+" "+ERe:Lt,kr=()=>fh(o).map(dt=>L("span",{children:[se(dt),_("span",{children:"×",className:RRe,onClick:Vt=>{Vt.stopPropagation(),me(dt)}})],className:CRe},dt)),nn=(j[1]|0).toString()+"px",Ln=j[0]?{bottom:"100%",marginTop:"0",marginBottom:"2px",maxHeight:nn,top:"auto"}:{maxHeight:nn},qt;if(ve)qt=_("li",{children:"Loading…",className:ED});else if(Z===0)qt=_("li",{children:M===""?"No options":"No matches",className:ED});else{let rt=s?fh(o):o===""?[]:[o];qt=le.map((dt,Vt)=>{let Pt=rt.some(zn=>zn===dt.id),ki=FV([[TRe],Vt===R?[NRe]:[],Pt?[DRe]:[]]).join(" ");return _("li",{children:dt.label,"aria-selected":Pt,className:ki,role:"option",onMouseDown:zn=>{zn.preventDefault(),be(Vt)},onMouseEnter:zn=>T(Xn=>Vt)},dt.id)})}let Ei=_("ul",{children:qt,className:$Re,role:"listbox",style:Ln}),Yn;return Yn=y==="Inline"?_("button",{children:o===""?_("span",{children:a?"Select…":"—",className:kRe}):se(o),className:Ct,autoFocus:p,type:"button",onKeyDown:Ge,onBlur:rt=>f(),onClick:rt=>w(dt=>!dt)}):L("div",{children:[s?kr():null,_("input",{ref:Nt(te),className:ARe,autoFocus:p,placeholder:a?"Search…":"—",type:"text",value:s||C?M:o===""?"":se(o),onKeyDown:Ge,onFocus:rt=>w(dt=>!0),onBlur:rt=>f(),onChange:rt=>{let dt=rt.target.value;I(Vt=>dt)}})],className:Ct,onClick:rt=>w(dt=>!0)}),L("div",{children:[Yn,C?Ei:null],ref:Nt(W),className:SRe})}let ORe=PRe;function Pb(e){return e.pluginId+"."+e.slice+"."+e.command.name}function MRe(e,t,r,n){return k(e.find(i=>i.id===t),i=>{let o=i.aggregates.find(a=>a.name===r);return o!==void 0?q(o.commands.find(a=>a.name===n),a=>({plugin:i,enclosingAggregate:o,command:a})):k(i.stateChangeSlices.find(a=>a.name===r),a=>q(a.commands.find(s=>s.name===n),s=>({plugin:i,enclosingAggregate:void 0,command:s})))})}function Ob(e,t,r){return e}function LRe(e,t,r){let n=r!==void 0?r:Ob;return q(MRe(t,e.pluginId,e.slice,e.command),i=>{let o=i.plugin,a=n(i.command,i.enclosingAggregate,o.id);return{label:D(e.label,a.label),pluginId:o.id,slice:e.slice,command:a,field:e.field,navigateTo:k(e.then,s=>{if(s.trim()!=="")return s})}})}function zRe(e,t,r){let n=r!==void 0?r:Ob;return Q(D(k(e,i=>i.rowActions),[]),i=>LRe(i,t,n))}function URe(e,t,r){let n=t!==void 0?t:[],i=r!==void 0?r:[],o=e.slice();return n.forEach(a=>{if(!o.some(s=>s.command.name===a.command.name)){o.push(a);return}}),i.length===0?o:o.filter(a=>!i.some(s=>s===Pb(a)))}function BRe(e,t){let r=e.refFields.find(n=>n.propertyKey===t);return r!==void 0?r.multi:D(k(k(k(q(k(k(k(G(e.schema),n=>F(n,"properties")),G),n=>F(n,t)),bn),G),n=>F(n,"type")),ie),"")==="array"}function jRe(e,t){return Oe([[e.field,BRe(e.command,e.field)?yRe([t]):t]])}function u7(e,t){return{command:e.command,initialValues:jRe(e,t),navigateTo:e.navigateTo,formKey:e.command.name+":"+t}}function jt(e){return"var("+e+")"}let c7="168px",qRe=E([z("flex"),_e("column"),u("gap",jt(O.sm))]),VRe=E([z("flex"),X("center"),et("spaceBetween"),u("gap",jt(O.sm))]),kD=E([z("inlineFlex"),X("center"),u("gap",jt(O.xs))]),hh=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",jt(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",jt(x.textSecondary)),u("font-size",jt($.sizeSm)),Re("pointer"),Ue([u("background",jt(x.surfaceSubtle)),u("color",jt(x.textPrimary))])]),GRe=xr([hh,E([u("background",jt(x.surfaceSubtle)),u("color",jt(x.textPrimary)),u("font-weight",jt($.weightMedium))])]),KRe=E([u("font-size",jt($.sizeMd)),u("font-weight",jt($.weightMedium)),u("color",jt(x.textPrimary))]),HRe=E([u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",jt(Y.md)),u("overflow","hidden")]),d7=E([z("flex"),X("stretch")]),WRe=xr([d7,E([u("background",jt(x.surfaceSubtle)),u("border-bottom","1px solid var("+x.borderSubtle+")")])]),JRe=xr([d7,E([u("border-top","1px solid var("+x.borderSubtle+")")])]),QRe=E([u("flex","0 0 "+c7),u("padding","4px var("+O.sm+")"),u("font-size",jt($.sizeXs)),u("color",jt(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),f7=E([u("flex","0 0 "+c7),u("padding","6px var("+O.sm+")"),u("font-size",jt($.sizeSm)),u("font-weight",jt($.weightMedium)),u("color",jt(x.textPrimary)),u("border-right","1px solid var("+x.borderSubtle+")"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),YRe=xr([f7,E([u("color",jt(x.textDisabled)),u("font-style","italic")])]);function VS(e){return E([z("grid"),u("flex","1 1 auto"),u("grid-template-columns","repeat("+e.toString()+", minmax(0, 1fr))")])}let XRe=E([u("background",jt(x.surfaceSubtle))]),ZRe=E([u("padding","4px var("+O.xs+")"),u("font-size",jt($.sizeXs)),u("color",jt(x.textSecondary)),u("border-left","1px solid var("+x.borderSubtle+")")]),h7=E([z("flex"),_e("column"),u("gap","2px"),u("min-height","48px"),u("padding","3px"),u("border-left","1px solid var("+x.borderSubtle+")")]),eAe=xr([h7,E([u("background",jt(x.surfaceSubtle))])]);function CD(e){return E([z("block"),u("width","100%"),u("text-align","left"),u("border","none"),u("border-left","3px solid "+e),u("border-radius",jt(Y.sm)),u("background",jt(x.surfaceSubtle)),u("color",jt(x.textPrimary)),u("font-size",jt($.sizeXs)),u("padding","1px var("+O.xs+")"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap"),Re("pointer"),Ue([u("background",jt(x.surfaceElevated))])])}let tAe=E([Re("grab")]),rAe=E([Cs(.85),u("z-index","10"),Re("grabbing")]),nAe=E([u("font-size",jt($.sizeXs)),u("color",jt(x.textDisabled))]),RD="var("+x.brand+")";function iAe(e){return D(e.end_,e.start)}function oAe(e,t){return e.filter(r=>AM(r.start,iAe(r),t)).toSorted((r,n)=>r.start-n.start)}function aAe(e,t){return TM(e.start)||!RM(e.start,t)?e.title:$M(e.start)+" "+e.title}function sAe(e){let t=e.draggable,r=e.event,n=x9({id:r.key,disabled:!t}),i=t?CD(D(r.accent,RD))+" "+tAe:CD(D(r.accent,RD)),o=n.isDragging?i+" "+rAe:i,a=q(k9(n.transform),c=>({transform:c})),s=n.listeners,l=s==null?void 0:Nt(s);return _("button",{children:aAe(r,e.day),ref:Nt(n.setNodeRef),className:o,style:a,title:r.title,onKeyDown:c=>ee(l,d=>E9(d,c)),onClick:c=>r.onOpen(),onPointerDown:c=>ee(l,d=>w9(d,c))})}function lAe(e){let t=e.draggable,r=e.today,n=e.days,i=e.lane,o=i.unassigned?"":i.resourceId,a=S9({id:o}),s=!i.unassigned&&a.isOver?VS(n.length)+" "+XRe:VS(n.length);return L("div",{children:[_("div",{children:i.label,className:i.unassigned?YRe:f7}),_("div",{children:n.map(l=>_("div",{children:oAe(i.events,l).map(c=>_(sAe,{event:c,day:l,draggable:t},c.key)),className:l===r?eAe:h7},l.toString())),ref:Nt(a.setNodeRef),className:s})],className:JRe})}function uAe(e){let t=e.onReassign,r=e.initialDate,n=e.windowNote,i=e.lanes,o=ce(()=>"Week"),a=o[1],s=o[0],l=ce(()=>vi(D(r,Date.now()))),c=l[1],d=l[0],f=vi(Date.now()),h=Ee(t),p;p=s==="Week"?Il(7,y=>Ro(Qv(d),y)):[vi(d)];let m=y=>c(S=>s==="Week"?Ro(S,y*7|0):Ro(S,y)),g=y=>{let S=y.over;if(t===void 0||S==null||S.id==="")return;let w=i.find(C=>C.events.some(A=>A.key===y.active.id));if(ne(w,!0,C=>C.resourceId!==S.id))return t(y.active.id,S.id)},v=(y,S)=>_("button",{children:S,className:s===y?GRe:hh,onClick:w=>a(C=>y)}),b;return b=s==="Week"?xo(d):Ps(d)+" — "+xo(d),L("div",{children:[L("div",{children:[L("div",{children:[_("button",{children:"‹",className:hh,onClick:y=>m(-1)}),_("button",{children:"Today",className:hh,onClick:y=>c(S=>f)}),_("button",{children:"›",className:hh,onClick:y=>m(1)}),_("span",{children:b,className:KRe})],className:kD}),L("div",{children:[v("Week","Week"),v("Day","Day")],className:kD})],className:VRe}),_(y9,{onDragEnd:g,children:L("div",{children:[L("div",{children:[_("div",{children:"Resource",className:QRe}),_("div",{children:p.map(y=>_("div",{children:Ps(y),className:ZRe},y.toString())),className:VS(p.length)})],className:WRe}),i.map(y=>_(lAe,{lane:y,days:p,today:f,draggable:h},y.unassigned?"\0unassigned":y.resourceId))],className:HRe})}),n!==void 0?_("span",{children:n,className:nAe}):null],className:qRe})}let cAe=uAe;function dAe(e){switch(e){case"Hints":return"hints";case"DeclaredTarget":return"declared-target";case"SchemaTarget":return"schema-target";case"Setter":return"setter"}}function p7(e,t){return e+"→"+t}function Yk(e){return D(q(k(k(G(e),t=>F(t,"properties")),G),t=>Object.keys(t)),[])}function Mb(e){return Q(D(k(k(G(e),t=>F(t,"required")),Et),[]),ie).filter(t=>t!=="TAG")}function fAe(e,t){let r=k(k(k(G(e),o=>F(o,"properties")),G),o=>F(o,t));if(r===void 0)return;let n=k(k(G(r),o=>F(o,"const")),ie);if(n!==void 0)return n;let i=rc(r);if(i!==void 0&&i.length===1)return i[0]}function m7(e){return e.filter(t=>t.level==="Instance")}function Wy(e,t){let r=e.allowedStates;return r!==void 0&&r.length!==0?r.includes(t):!0}function g7(e){let t=e.allowedStates,r=e.targetState;return t!==void 0?r===void 0:!1}function hAe(e,t,r){return Yk(e.schema).includes(t)?Oe([[t,r]]):{}}function pAe(e,t){let r=e.filter(n=>!g7(n)&&Yk(n.schema).includes(t)?Mb(n.schema).every(i=>i===t||i==="id"?!0:Ce(i,n.aggregateIdField)):!1);if(r.length===1)return r[0]}function AD(e){if(e.length===1)return e[0]}function Lb(e,t,r){let n=m7(t),i=pAe(n,e);return(o,a)=>{let s=(f,h)=>{if(Wy(f,o))return{command:f.name,patch:hAe(f,e,a),tier:h}},l=k(k(k(r,f=>f[a]),f=>n.find(h=>h.name===f)),f=>s(f,"Hints"));if(l!==void 0)return l;let c=k(AD(n.filter(f=>Wy(f,o)?Ce(f.targetState,a):!1)),f=>s(f,"DeclaredTarget"));if(c!==void 0)return c;let d=k(AD(n.filter(f=>!g7(f)&&Wy(f,o)?Ce(fAe(f.schema,e),a):!1)),f=>s(f,"SchemaTarget"));return d!==void 0?d:k(i,f=>s(f,"Setter"))}}function mAe(e,t,r){let n=m7(r),i=fo(e,t),o={};return n.forEach(a=>{let s=a.targetState;if(s!==void 0){D(a.allowedStates,[]).forEach(l=>{if(i.includes(l)&&i.includes(s)){o[p7(l,s)]={command:a.name,patch:{},tier:"DeclaredTarget"};return}});return}}),o}function v7(e,t,r,n){let i=Lb(t,r,n),o=fo(e,t),a={};return o.forEach(s=>{o.forEach(l=>ee(i(s,l),c=>{a[p7(s,l)]=c}))}),a}function gAe(e,t,r){let n=t+"→",i=Q(Object.entries(e),o=>{let a=o[0];if(o[1].command===r&&a.startsWith(n))return a.slice(n.length)});if(i.length===1)return i[0]}let Xu="resources",Zu="events";function vAe(e){return e.find(t=>Ce(t.role,Xu))}function b7(e){return e.filter(t=>Ce(t.role,Zu))}function bAe(e,t){return e.toString()+"::"+t}function _Ae(e){let t=e.indexOf("::");if(t!==-1)return q(uO(e.slice(0,t)),r=>[r,e.slice(t+2|0)])}function Hf(e,t){return k(F(e,t),ie)}function yAe(e){let t=vAe(e),r=b7(e),n=t!==void 0?t.rows.map(d=>{let f=D(G(d),{}),h=D(Hf(f,"id"),""),p=D(k(t.semantics.labelField,m=>Hf(f,m)),h);return[h,p]}):[],i=n.map(d=>d[0]),o=r.map((d,f)=>Q(d.rows,h=>{let p=D(G(h),{}),m=D(Hf(p,"id"),""),g=d.semantics.dateSpan;if(g!==void 0)return q(k(nc(g,p),Qn),v=>{let b=k(Ow(g,p),Qn),y=D(k(d.semantics.labelField,R=>Hf(p,R)),m),S=D(k(d.resourceRef,R=>Hf(p,R)),""),w=bAe(f,m),C=d.accent;return[S,{key:w,title:y,start:v,end_:b,accent:C,onOpen:()=>d.onOpenRow(m,h)}]})})).flat(),a=d=>Q(o,f=>{if(d(f[0]))return f[1]}),s=n.map(d=>{let f=d[0];return{resourceId:f,label:d[1],unassigned:!1,events:a(h=>h===f)}}),l=a(d=>!i.includes(d)),c=l.length!==0?[{resourceId:"",label:"Unassigned",unassigned:!0,events:l}]:[];return s.concat(c)}function xAe(e){let t=e.sources,r=yAe(t),n=b7(t),o=n.some(l=>Ee(l.onCommand)&&Ee(l.assignCommand)?Ee(l.resourceRef):!1)?(l,c)=>ee(_Ae(l),d=>{let f=d[1];ee(n[d[0]],h=>{let p=h.onCommand,m=h.assignCommand,g=h.resourceRef;if(p!==void 0&&m!==void 0&&g!==void 0)return p(m,f,Oe([[g,c]]))})}):void 0,a=nt(n,0,(l,c)=>l+c.rows.length|0),s=jO(r2(t),a,void 0,"scheduled item");return _(cAe,{lanes:r,windowNote:s,onReassign:o})}let SAe=_("span",{children:"☰","aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),ph="scheduler";function _7(e){return Ee(_n(e,void 0,void 0).dateSpan)?Dr(e).some(t=>Ee(Qa(t[0]))):!1}function wAe(e,t,r){return r?!1:_7(t)}function y7(e,t){let r=e.filter(i=>i.level==="Instance").filter(i=>Yk(i.schema).includes(t)?Mb(i.schema).every(o=>o===t||o==="id"?!0:Ce(o,i.aggregateIdField)):!1);return r.length!==1?void 0:r[0].name}function EAe(e,t,r){let n=r!==void 0?r:(o,a)=>{},i={};return iv().filter(o=>{let a=o.arity;return typeof a!="object"?!1:a.TAG!=="Multi"}).forEach(o=>{let a={},s={},l=(c,d,f)=>{let h=F(c,d);h!==void 0?h.push(f):c[d]=[f]};e.forEach(c=>{let d=k(t,p=>hn(p,c.name)),f=D(k(d,p=>p.canvas),o.label),h=k(d,p=>p.role);if(h!==void 0)return h===Xu?l(a,f,c):h===Zu?ee(k(d,p=>p.resourceRef),p=>l(s,f,[c,p])):void 0}),Te(s).forEach(c=>{let d=c[0],f=D(F(a,d),[]),h=f.length;if(h!==1)return h!==0?n(d,f.length):void 0;let p=f[0];c[1].forEach(m=>{i[m[0].name]={resource:p,resourceRef:m[1]}})})}),i}xa({id:ph,label:"Scheduler",icon:SAe,arity:{TAG:"Slots",_0:[{role:Xu,min:1,max:1},{role:Zu,min:1}]},isCapable:(e,t,r)=>_7(e),render:e=>_(xAe,{sources:e}),capability:"role join: a resources source (lanes) + an events source with a date span and an entity-ref to the resource"});function Ns(e){return"var("+e+")"}let ug=E([z("inlineFlex"),X("center"),u("gap","6px"),u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",Ns(Y.full)),u("padding","2px var("+O.sm+")"),u("color",Ns(x.textSecondary)),u("font-size",Ns($.sizeXs)),u("line-height","1.5")]),Jy=E([Re("pointer"),Ue([u("background",Ns(x.surfaceSubtle)),u("color",Ns(x.textPrimary))])]),kAe=E([Cs(.6),Re("notAllowed")]),CAe=E([Ga(Jn.compact,[u("display","none")])]);function Xk(e){return E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let RAe=Xk(Ns(x.success)),AAe=Xk(Ns(x.border)),$Ae=Xk(Ns(x.border)),TAe=bJ([[0,[Cs(.4)]],[50,[Cs(1)]],[100,[Cs(.4)]]]),NAe=E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",Ns(x.warning)),fJ(TAe),hJ({NAME:"ms",VAL:1200}),pJ("infinite"),mJ("easeInOut")]);function DAe(e){let t=e.onToggle,r=e.reconnecting,n=e.canBeLive,i=e.live,o=r!==void 0?r:!1,a=n?i&&o?[ug+" "+Jy,NAe,"Reconnecting…"]:i?[ug+" "+Jy,RAe,"Live"]:[ug+" "+Jy,AAe,"Snapshot"]:[ug+" "+kAe,$Ae,"Off"],s=a[2],l=n?d=>t():void 0,c=n?i&&o?"Live updates on — reconnecting to the server":i?"Live updates on — click for snapshot mode":"Snapshot mode — click for live updates":"Live updates disabled globally";return L("button",{children:[_("span",{className:a[1]}),_("span",{children:s,className:CAe})],"aria-label":"Live updates: "+s,className:a[0],title:c,disabled:!n,type:"button",onClick:l})}let FAe=DAe;function Wf(e){return"var("+e+")"}let IAe=E([z("inlineFlex"),X("center"),u("gap","6px"),u("background",Wf(x.brand)),u("color",Wf(x.textOnBrand)),u("border","none"),u("border-radius",Wf(Y.full)),u("padding","var("+O.xs+") var("+O.md+")"),u("font-size",Wf($.sizeSm)),u("font-weight",Wf($.weightMedium)),Re("pointer"),Ue([u("opacity","0.85")])]),PAe=E([z("flex"),X("center"),et("center"),u("padding","var("+O.xs+") 0")]);function OAe(e){let t=e.onClick,r=e.count,n=r===1?"1 new item — click to refresh":r.toString()+" new items — click to refresh";return _("div",{children:_("button",{children:n,className:IAe,type:"button",onClick:i=>t()}),className:PAe})}let MAe=OAe;function Zk(e,t,r,n,i,o){let a=t!==void 0?t:{},s=r!==void 0?r:"",l=n!==void 0?n:!0,c=i!==void 0?i:()=>{},d=li(),f=Zp(),h=ce(()=>[]),p=h[1],m=ce(()=>Z8),g=m[1],v=m[0],b=ce(()=>"Loading"),y=b[1],S=ce(()=>0),w=S[1],C=ce(()=>1),A=C[1],T=C[0],R=f!==void 0?(N,I)=>f(N,I).then(M=>[M.data,A5(M,e.queryField)]):d!==void 0?(N,I)=>d(N,I).then(M=>[M,void 0]):void 0;return Ae(()=>{if(l)if(R!==void 0){y(I=>"Loading"),c();let N;if(o!==void 0){let I=Oe(ne(G(a),[],Te));I.first=o*T|0,N=I}else N=a;Mt(R(e.queryDocument,N).then(I=>{let M=I[1],P=I[0];return M!==void 0?y(B=>({TAG:"Refused",_0:M.message})):(p(B=>ZE(P,e.queryField)),g(B=>r5(P,e.queryField)),y(B=>"Loaded")),Promise.resolve()}),I=>(y(M=>({TAG:"Error",_0:"Failed to load data"})),Promise.resolve()))}else y(N=>({TAG:"Error",_0:"Not connected"}));else y(N=>"Loaded")},[S[0],s,l,T]),{rows:h[0],setRows:p,pageInfo:v,fetchState:b[0],refetch:()=>w(N=>N+1|0),loadMore:()=>A(N=>N+1|0),canLoadMore:v.hasNextPage}}function ec(e,t,r){let n=t!==void 0?t:!0,o=Zk(e,void 0,void 0,n,void 0,50),a=Ne(void 0),s=Ne(vs.make()),l=Ne(nd.make()),c=()=>{let p=a.current;p!==void 0&&clearTimeout(p),a.current=setTimeout(()=>{a.current=void 0,o.refetch()},250)},d=p=>{if(!vs.shouldApply(s.current,p.id,p.seq))return;vs.record(s.current,p.id,p.seq);let m=p.changeKind,g;return g=m==="Updated"?k(o.rows.find(v=>Ce(go(v),p.id)),v=>nd.apply(l.current,v,p,e.schema)):void 0,g!==void 0?o.setRows(v=>v.map(b=>Ce(go(b),p.id)?g:b)):c()},f=om(),h=n&&ne(f,!1,p=>p.isLive(e.queryField));return DS(e.queryField,"All",h,d,o.refetch),{rows:o.rows,fetchState:o.fetchState,refetch:o.refetch,isLive:h,loadMore:o.loadMore,canLoadMore:o.canLoadMore}}let LAe=50;function x7(){try{return Li(globalThis.localStorage)}catch{return}}let S7="reventless.live.";function $D(e){let t=x7();if(t===void 0)return!1;try{let r=kt(t).getItem(S7+e);return r==null?!1:r==="true"}catch{return!1}}function zAe(e,t){let r=x7();if(r!==void 0)try{kt(r).setItem(S7+e,t?"true":"false");return}catch{return}}function UAe(e){let t=ce(()=>$D(e)),r=t[1],n=t[0];Ae(()=>{r(o=>$D(e))},[e]);let i=Nr(()=>{let o=!n;zAe(e,o),r(a=>o)},[n,e]);return[n,i]}function BAe(e,t){switch(e.TAG){case"Valid":return!0;case"Invalid":return!1;case"Pending":return!1}}function jAe(e){return BAe(e)}function eC(e){switch(e.TAG){case"Invalid":return e._1;case"Valid":case"Pending":return 0}}function Vo(e){return[e._0,eC(e)]}function w7(e,t){return dO(t,e,(r,n)=>n(r))}function Go(e){switch(e.TAG){case"Invalid":return e;case"Valid":case"Pending":return{TAG:"Valid",_0:e._0}}}function E7(e){if(!e.includes("."))return e;let t=e.replace(/0+$/,"");return t.endsWith(".")?t.slice(0,t.length-1|0):t}function qAe(e){return t=>{let r=Vo(t),n=r[0];return n>=e?Go(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+E7(e.toString()),tl:r[1]}}}}function VAe(e){return t=>{let r=Vo(t),n=r[0];return n<=e?Go(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+E7(e.toString()),tl:r[1]}}}}function GAe(e){let t=Vo(e),r=t[0];return isFinite(r)&&(r|0)===r?Go(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a whole number",tl:t[1]}}}function vv(e,t){let r=q(F(e,t),Ze);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0|0}function TD(e,t){let r=q(F(e,t),Ze);if(typeof r=="object"&&r.TAG==="JSONNumber")return r._0}function bv(e,t){let r=q(F(e,t),Ze);if(typeof r=="object"&&r.TAG==="JSONString")return r._0}function KAe(e){let t=bv(e,"format");if(bv(e,"x-reventless-format")==="cuid")return"Cuid";if(t!==void 0)switch(t){case"date-time":return"DateTime";case"email":return"Email";case"uri":return"Url";case"uuid":return"Uuid";default:return}}function ND(e){let t=vv(e,"minLength"),r=vv(e,"maxLength"),n=q(bv(e,"pattern"),a=>new RegExp(a)),i=KAe(e),o=bv(e,"description");return{minLength:t,maxLength:r,pattern:n,format:i,patternHint:o}}function DD(e,t){let r=TD(e,"minimum"),n=TD(e,"maximum");return{min:r,max:n,integer:t}}function HAe(e){let t=vv(e,"minItems"),r=vv(e,"maxItems");return{minItems:t,maxItems:r}}function zb(e){if(typeof e!="object")return!1;switch(e.TAG){case"TextField":case"NumberField":return e.required;case"EnumField":return e.required;case"RefField":return e.required;case"ItemsField":return e.required}}function k7(e){let t=e.indexOf("[]");if(t===-1)return;let r=e.slice(0,t),n=e.slice(t+2|0),i=n.startsWith(".")?n.slice(1):n;if(!(r===""||i===""||i.includes("[]")))return[r,i]}function C7(e){return k(F(e,"items"),t=>{let r=k(G(t),n=>F(n,"type"));if(r!==void 0&&Ce(ie(r),"object"))return t})}function tC(e,t){let r=t!==void 0?t:[],n={},i={};r.forEach(f=>{let h=k7(f.propertyKey);if(h!==void 0){let p=h[0],m=D(F(i,p),[]);m.push({propertyKey:h[1],queryField:f.queryField,singleQueryField:f.singleQueryField,labelField:f.labelField,multi:f.multi,required:f.required,entityName:f.entityName,entityNamePlural:f.entityNamePlural}),i[p]=m;return}n[f.propertyKey]=f});let o=Ze(e);if(typeof o!="object")return[];if(o.TAG!=="JSONObject")return[];let a=o._0,s=F(a,"required"),l;if(s!==void 0){let f=Ze(s);l=typeof f!="object"?[]:f.TAG==="JSONArray"?Q(f._0,h=>{let p=Ze(h);if(!(typeof p!="object"||p.TAG!=="JSONString"))return p._0}):[]}else l=[];let c=F(a,"properties");if(c===void 0)return[];let d=Ze(c);return typeof d!="object"?[]:d.TAG==="JSONObject"?Q(Te(d._0),f=>{let h=f[1],p=f[0],m=Ze(h);if(typeof m!="object"||m.TAG!=="JSONObject")return;let g=m._0;if(Ee(F(g,"const")))return;let v=F(g,"type"),b;if(v!==void 0){let R=Ze(v);b=typeof R!="object"||R.TAG!=="JSONString"?"string":R._0}else b="string";let y=l.some(R=>R===p),S=F(n,p),w;if(S!==void 0)w=S.multi?S.entityNamePlural:S.entityName;else{let R=F(g,"title");if(R!==void 0){let N=Ze(R);w=typeof N!="object"||N.TAG!=="JSONString"?pt(p):N._0}else w=pt(p)}let C=F(g,"enum"),A;if(C!==void 0){let R=Ze(C);A=typeof R!="object"||R.TAG!=="JSONArray"?void 0:Q(R._0,N=>{let I=Ze(N);if(!(typeof I!="object"||I.TAG!=="JSONString"))return I._0})}else A=void 0;let T;if(S!==void 0)T={TAG:"RefField",queryField:S.queryField,singleQueryField:S.singleQueryField,labelField:S.labelField,multi:S.multi,required:y,constraints:S.multi?HAe(g):{}};else if(b==="boolean")T="BoolField";else if(A!==void 0)T={TAG:"EnumField",options:A,required:y};else switch(b){case"array":let R=C7(g);T=R!==void 0?{TAG:"ItemsField",itemSchema:R,itemRefFields:D(F(i,p),[]),required:y}:{TAG:"TextField",required:y,constraints:ND(g)};break;case"integer":T={TAG:"NumberField",required:y,constraints:DD(g,!0)};break;case"number":T={TAG:"NumberField",required:y,constraints:DD(g,!1)};break;default:T={TAG:"TextField",required:y,constraints:ND(g)}}return q(T,R=>({key:p,label:w,fieldType:R,propSchema:h}))}):[]}function rC(e){let t={};return e.forEach(r=>{let n=r.fieldType,i;if(typeof n!="object")i="false";else switch(n.TAG){case"EnumField":i=D(n.options[0],"");break;case"ItemsField":i="[]";break;default:i=""}t[r.key]=i}),t}function WAe(e){return D(k(k(G(e),t=>F(t,"properties")),G),{})}function R7(e,t){return k(q(F(e,t),bn),G)}function JAe(e,t){return D(k(k(R7(e,t),r=>F(r,"type")),ie),"string")}function QAe(e,t){return Ee(k(k(R7(e,t),r=>F(r,"enum")),Et))}function YAe(e,t,r){let n=t!==void 0?t:!1,i=0,o=0,a=0;if(r===""){if(n)return null;a=3}else a=3;if(a===3)switch(e){case"array":if(r==="")return[];try{return JSON.parse(r)}catch{return[r]}case"boolean":case"integer":case"number":case"object":o=2;break;default:i=1}if(o===2){if(r==="")return null;i=1}if(i===1){let s=0;switch(e){case"boolean":return r==="true";case"integer":case"number":s=2;break;case"object":try{return JSON.parse(r)}catch{return null}default:return r}if(s===2)return D(q(Fs(r),l=>l),r)}}function Ub(e,t){let r=WAe(e),n=C5(e),i=a=>n!==void 0?!n.includes(a):!1,o={};return Te(t).forEach(a=>{let s=a[1],l=a[0],c=JAe(r,l),d=QAe(r,l);if(!(s===""&&i(l)&&(d||c!=="string"))){o[l]=YAe(c,d,s);return}}),o}function XAe(e){let t=Ze(e);if(typeof t!="object")switch(t){case"JSONFalse":return"false";case"JSONTrue":return"true";case"JSONNull":return""}else switch(t.TAG){case"JSONString":return t._0;case"JSONNumber":return t._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function A7(e){let t={};return ee(G(e),r=>{Te(r).forEach(n=>{t[n[0]]=XAe(n[1])})}),t}let ZAe="Must not be empty";function e$e(e){let t=Vo(e),r=t[0];return r.length>0?Go(e):{TAG:"Invalid",_0:r,_1:{hd:ZAe,tl:t[1]}}}let t$e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function r$e(e){let t=Vo(e),r=t[0];return t$e.exec(r)!==null?Go(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid email address",tl:t[1]}}}function n$e(e){let t=Vo(e),r=t[0],n;try{new URL(r),n=!0}catch{n=!1}return n?Go(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid URL",tl:t[1]}}}let i$e=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function o$e(e){let t=Vo(e),r=t[0];return i$e.exec(r)!==null?Go(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid UUID",tl:t[1]}}}let a$e=/^c[a-z0-9]{23,24}$/;function s$e(e){let t=Vo(e),r=t[0];return a$e.exec(r)!==null?Go(e):{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid CUID",tl:t[1]}}}function l$e(e){let t=Vo(e),r=t[0],n=Date.parse(r);return Number.isNaN(n)?{TAG:"Invalid",_0:r,_1:{hd:"Must be a valid ISO 8601 date-time",tl:t[1]}}:Go(e)}function u$e(e){return t=>{let r=Vo(t),n=r[0];return n.length>=e?Go(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at least "+e.toString()+" characters",tl:r[1]}}}}function c$e(e){return t=>{let r=Vo(t),n=r[0];return n.length<=e?Go(t):{TAG:"Invalid",_0:n,_1:{hd:"Must be at most "+e.toString()+" characters",tl:r[1]}}}}function d$e(e,t){return r=>{let n=Vo(r),i=n[0];return e.exec(i)!==null?Go(r):{TAG:"Invalid",_0:i,_1:{hd:D(t,"Does not match the required pattern"),tl:n[1]}}}}function nC(e){let t=eC(e);if(t!==0)return t.hd}function f$e(e){switch(e){case"Email":return r$e;case"Url":return n$e;case"Uuid":return o$e;case"Cuid":return s$e;case"DateTime":return l$e}}function h$e(e,t,r){if(e==="")return t?e$e({TAG:"Pending",_0:e}):{TAG:"Valid",_0:e};let n=[];return ee(r.minLength,i=>{n.push(u$e(i))}),ee(r.maxLength,i=>{n.push(c$e(i))}),ee(r.format,i=>{n.push(f$e(i))}),ee(r.pattern,i=>{n.push(d$e(i,r.patternHint))}),n.length===0?{TAG:"Valid",_0:e}:w7({TAG:"Pending",_0:e},Iv(n))}function p$e(e,t,r){if(e==="")return t?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e};let n=Fs(e);if(n===void 0)return{TAG:"Invalid",_0:e,_1:{hd:"Must be a number",tl:0}};let i=[];D(r.integer,!1)&&i.push(GAe),ee(r.min,s=>{i.push(qAe(s))}),ee(r.max,s=>{i.push(VAe(s))});let o=w7({TAG:"Pending",_0:n},Iv(i)),a=eC(o);return a!==0?{TAG:"Invalid",_0:e,_1:a}:{TAG:"Valid",_0:e}}function m$e(e,t,r){let i=fh(e).length;if(i===0&&t)return{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}};let o={contents:0};return ee(r.maxItems,s=>{if(i>s){o.contents={hd:"Select at most "+s.toString()+" items",tl:o.contents};return}}),ee(r.minItems,s=>{if(i<s&&(t||i>0)){o.contents={hd:"Select at least "+s.toString()+" items",tl:o.contents};return}}),o.contents!==0?{TAG:"Invalid",_0:e,_1:o.contents}:{TAG:"Valid",_0:e}}function FD(e,t){return t&&e===""?{TAG:"Invalid",_0:e,_1:{hd:"Required",tl:0}}:{TAG:"Valid",_0:e}}function iC(e,t){let r=e.propSchema;if(r!==void 0&&Rle(e.key,r)){let i=zb(e.fieldType),o=$le(e.key,r,t,i);return o!==void 0?{TAG:"Invalid",_0:t,_1:{hd:o,tl:0}}:{TAG:"Valid",_0:t}}let n=e.fieldType;if(typeof n!="object")return{TAG:"Valid",_0:t};switch(n.TAG){case"TextField":return h$e(t,n.required,n.constraints);case"NumberField":return p$e(t,n.required,n.constraints);case"EnumField":return FD(t,n.required);case"RefField":return n.multi?m$e(t,n.required,n.constraints):FD(t,n.required);case"ItemsField":return g$e(t,n.required,n.itemSchema,n.itemRefFields)}}function g$e(e,t,r,n){let i;if(e==="")i=[];else try{i=Et(JSON.parse(e))}catch{i=void 0}if(i===void 0)return{TAG:"Invalid",_0:e,_1:{hd:"Not a valid list",tl:0}};if(i.length===0)return t?{TAG:"Invalid",_0:e,_1:{hd:"Add at least one row",tl:0}}:{TAG:"Valid",_0:e};let o=tC(r,n),a=Q(i.map((s,l)=>{let c=A7(s);return Q(o,d=>q(nC(iC(d,D(F(c,d.key),""))),f=>"Row "+(l+1|0).toString()+": "+f))[0]}),s=>s);return a.length!==0?{TAG:"Invalid",_0:e,_1:Iv(a)}:{TAG:"Valid",_0:e}}function rr(e){return"var("+e+")"}let v$e=E([z("flex"),_e("column"),u("gap",rr(O.md))]),b$e=E([z("flex"),_e("column"),u("gap","4px")]),$7=E([u("color",rr(x.textSecondary)),u("font-size",rr($.sizeSm)),u("font-weight",rr($.weightMedium))]),_$e=E([u("color",rr(x.error)),Pp(ke(2))]),ID=E([u("background",rr(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",rr(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")"),u("font-size",rr($.sizeMd)),u("color",rr(x.textPrimary)),u("outline","none"),ga({NAME:"percent",VAL:100}),u("transition","border-color 120ms, box-shadow 120ms"),qs([u("border-color",rr(x.brand))])]),y$e=E([u("border-color",rr(x.error)),qs([u("border-color",rr(x.error)),u("box-shadow","0 0 0 2px color-mix(in srgb, var("+x.error+") 25%, transparent)")])]),x$e=E([u("color",rr(x.error)),u("font-size",rr($.sizeXs)),u("min-height","1.1em"),u("line-height","1.1"),Uo(ke(2))]),S$e=E([Re("pointer"),LO(ke(6))]),PD=E([u("background",rr(x.brand)),u("color",rr(x.textOnBrand)),u("border","none"),u("border-radius",rr(Y.sm)),u("padding","var("+O.xs+") var("+O.md+")"),u("font-size",rr($.sizeMd)),Re("pointer"),OO("flexStart"),u("transition","opacity 120ms")]),w$e=E([Cs(.5),Re("notAllowed")]),E$e=E([z("flex"),_e("column"),u("gap",rr(O.sm)),u("border","1px solid var("+x.border+")"),u("border-radius",rr(Y.sm)),u("padding",rr(O.sm))]),k$e=E([u("color",rr(x.textSecondary)),u("font-size",rr($.sizeSm))]),C$e=E([z("flex"),X("flexStart"),u("gap",rr(O.sm)),u("padding-bottom",rr(O.sm)),u("border-bottom","1px solid var("+x.border+")")]),R$e=E([z("flex"),xi("wrap"),u("gap",rr(O.sm)),si(1),$w(ke(0))]),OD=E([u("background",rr(x.surface)),u("color",rr(x.textPrimary)),u("border","1px solid var("+x.border+")"),u("border-radius",rr(Y.sm)),u("padding","var("+O.xs+") var("+O.sm+")"),u("font-size",rr($.sizeSm)),Re("pointer")]),A$e=E([u("margin-top","1.4em")]),$$e=E([OO("flexStart")]);function T7(e){let t=e.error;return L("div",{children:[L("label",{children:[e.label,e.required?_("span",{children:"*",className:_$e}):null],className:$7}),e.children,_("div",{children:t!==void 0?t:null,className:x$e})],className:b$e})}function N7(e){let t=e.autoFocus,r=e.hasError,n=e.onBlur,i=e.onChange,o=e.value,a=e.field,s=r!==void 0?r:!1,l=t!==void 0?t:!1,c=zb(a.fieldType),d=s?ID+" "+y$e:ID,f=g=>n(a.key),h=a.propSchema,p=h!==void 0?Ale(a.key,h,o,g=>i(a.key,g),()=>n(a.key),c,s):void 0;if(p!==void 0)return p;let m=a.fieldType;if(typeof m!="object")return L("label",{children:[_("input",{className:S$e,checked:o==="true",type:"checkbox",onBlur:f,onChange:g=>i(a.key,g.target.checked?"true":"false")}),"Enabled"],className:$7});switch(m.TAG){case"TextField":let g=m.constraints.format,v;if(g!==void 0)switch(g){case"Email":v="email";break;case"Url":v="url";break;default:v="text"}else v="text";return _("input",{className:d,autoFocus:l,type:v,value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)});case"NumberField":return _("input",{className:d,autoFocus:l,type:"number",value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)});case"EnumField":return _("select",{children:m.options.map(b=>_("option",{children:b,value:b},b)),className:d,value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)});case"RefField":return _(ORe,{fieldKey:a.key,queryField:m.queryField,singleQueryField:m.singleQueryField,labelField:m.labelField,multi:m.multi,required:m.required,value:o,onChange:i,onBlur:()=>n(a.key),hasError:s,autoFocus:l});case"ItemsField":return _("input",{className:d,autoFocus:l,type:"text",value:o,onBlur:f,onChange:b=>i(a.key,b.target.value)})}}function T$e(e,t){let r=rC(t),n;if(e==="")n=[];else{let i;try{i=Et(JSON.parse(e))}catch{i=void 0}n=i!==void 0?i:[]}return n.map(i=>{let o=Oe(Te(r));return Te(A7(i)).forEach(a=>{o[a[0]]=a[1]}),o})}function N$e(e,t){return JSON.stringify(e.map(r=>Ub(t,r)))}function D$e(e){let t=e.showError,r=e.onBlur,n=e.onChange,i=e.itemRefFields,o=e.itemSchema,a=e.fieldKey,s=It(()=>tC(o,i),[o,i]),l=T$e(e.value,s),c=f=>n(a,N$e(f,o)),d=f=>c(l.concat([rC(s)]));return L("div",{children:[l.length===0?_("div",{children:"No rows yet.",className:k$e}):null,l.map((f,h)=>L("div",{children:[_("div",{children:s.map(p=>{let m=D(F(f,p.key),""),g=t?nC(iC(p,m)):void 0;return _(T7,{label:p.label,required:zb(p.fieldType),error:g,children:_(N7,{field:p,value:m,onChange:(v,b)=>c(l.map((y,S)=>{if(S!==h)return y;let w=Oe(Te(y));return w[v]=b,w})),onBlur:v=>r(a),hasError:Ee(g)})},p.key)}),className:R$e}),_("button",{children:"Remove","aria-label":"Remove row "+(h+1|0).toString(),className:OD+" "+A$e,type:"button",onClick:p=>c(l.filter((m,g)=>g!==h))})],className:C$e},h.toString())),_("button",{children:"Add row",className:OD+" "+$$e,type:"button",onClick:d})],className:E$e})}function F$e(e){let t=e.autoFocus,r=e.showError,n=e.errorMessage,i=e.onBlur,o=e.onChange,a=e.value,s=e.field,l=r!==void 0?r:!1,c=t!==void 0?t:!1,d=zb(s.fieldType),f=l&&Ee(n),h=s.fieldType,p,m=0;return typeof h!="object"||h.TAG!=="ItemsField"?m=1:p=_(D$e,{fieldKey:s.key,itemSchema:h.itemSchema,itemRefFields:h.itemRefFields,value:a,onChange:o,onBlur:i,showError:l}),m===1&&(p=_(N7,{field:s,value:a,onChange:o,onBlur:i,hasError:f,autoFocus:c})),_(T7,{label:s.label,required:d,error:f?n:void 0,children:p})}function I$e(e){let t=e.refFields,r=e.initialValues,n=e.submitLabel,i=e.onSubmit,o=e.schema,a=n!==void 0?n:"Submit",s=t!==void 0?t:[],l=It(()=>tC(o,s),[o,s]),c=ce(()=>{let I=rC(l);return ee(r,M=>{Te(M).forEach(P=>{I[P[0]]=P[1]})}),I}),d=c[1],f=c[0],h=ce(()=>({})),p=h[1],m=h[0],g=ce(()=>!1),v=g[1],b=g[0],y=It(()=>l.map(I=>{let M=D(F(f,I.key),"");return[I.key,iC(I,M)]}),[l,f]),S=y.every(I=>jAe(I[1])),w={};y.forEach(I=>{let M=nC(I[1]);if(M!==void 0){w[I[0]]=M;return}});let C=(I,M)=>d(P=>{let B=Oe(Te(P));return B[I]=M,B}),A=I=>p(M=>{let P=Oe(Te(M));return P[I]=!0,P}),T=I=>{if(I.preventDefault(),v(M=>!0),S)return i(f)},R=b&&!S,N=R?PD+" "+w$e:PD;return L("form",{children:[l.map((I,M)=>{let P=D(F(m,I.key),!1);return _(F$e,{field:I,value:D(F(f,I.key),""),onChange:C,onBlur:A,errorMessage:F(w,I.key),showError:P||b,autoFocus:M===0},I.key)}),_("button",{children:a,className:N,disabled:R,type:"submit"})],className:v$e,noValidate:!0,onSubmit:T})}let P$e=I$e;function Qy(e){switch(e){case"SubmitStarted":return!1;case"FormOpened":case"SubmitFailed":return!0}}let D7=Zt(void 0),O$e=D7.Provider;function M$e(e){return ur(O$e,{value:e.session,children:e.children})}let L$e={make:M$e};function z$e(){return xt(D7)}function U$e(e,t){return e.concat([t])}function B$e(e,t){return e.filter(r=>r!==t)}function j$e(e,t){return ne(e,[],r=>r.armed.current?t:[])}function q$e(e){return"var("+e+")"}let V$e=E([z("flex"),_e("column"),u("gap",q$e(O.md))]);function G$e(e){let t=e.submitLabel,r=e.onSubmit,n=e.refFields,i=e.ownerValue,o=e.ownerField,a=e.injectNewId,s=e.aggregateIdField,l=e.aggregateId,c=e.schema,d=a!==void 0?a:!1,f=n!==void 0?n:[],h=t!==void 0?t:"Submit",p=ce(()=>{}),m=p[1],g=ce(()=>!1),v=g[1],y=ce(()=>crypto.randomUUID())[0],S=Ne(Qy("FormOpened")),w=It(()=>({armed:S}),[]),C=o!==void 0&&i!==void 0?[o,i]:void 0,A=I=>{let M=Oe(Te(I));ee(C,P=>{M[P[0]]=P[1]}),ee(l,P=>{M[D(s,"id")]=P}),d&&(M[D(s,"id")]=y),v(P=>!0),m(P=>{}),S.current=Qy("SubmitStarted"),r(M).then(P=>{if(v(B=>!1),typeof P=="object"){let B=P._0;S.current=Qy("SubmitFailed"),m(j=>B)}return Promise.resolve()})},R=Q([l!==void 0?s!==void 0||d?s:void 0:d?s:void 0,q(C,I=>I[0])],I=>I),N=R.length===0?c:D(q(G(c),I=>{let M=Oe(Te(I));return ee(k(F(M,"properties"),G),P=>{let B=Oe(Te(P).filter(j=>!R.includes(j[0])));M.properties=B}),M}),c);return _(L$e.make,{session:w,children:L("div",{children:[ne(p[0],null,I=>_(Tk,{variant:"Error",message:I})),g[0]?_(Sd,{label:"Submitting..."}):null,_(P$e,{schema:N,onSubmit:A,submitLabel:h,initialValues:e.initialValues,refFields:f})],className:V$e})})}let oC=G$e;function K$e(e){let t={},r=e.startsWith("?")?e.slice(1):e;return r===""||r.split("&").forEach(n=>{let i=n.split("="),o=i.length;if(!(o>=3))switch(o){case 0:return;case 1:let a=i[0];if(a!==""){t[decodeURIComponent(a)]="";return}else return;case 2:let s=i[0],l=i[1];if(s!==""){t[decodeURIComponent(s)]=decodeURIComponent(l);return}else return}}),t}function H$e(e,t){return e===t?0:e<t?-1:1}function F7(e){let t=Te(e).filter(r=>r[1]!=="").toSorted((r,n)=>H$e(r[0],n[0]));return t.length===0?"":"?"+t.map(r=>encodeURIComponent(r[0])+"="+encodeURIComponent(r[1])).join("&")}function W$e(e){if(e.path===0)return"/";let r=[];return DV(e.path,n=>{r.push(n)}),"/"+r.join("/")}function MD(e,t){let r=t.filter(o=>o[1]==="").map(o=>o[0]),n=t.filter(o=>o[1]!==""),i=Te(e).filter(o=>{let a=o[0];return r.includes(a)?!1:!n.some(s=>s[0]===a)});return Oe(i.concat(n))}function I7(){let e=bV(),t=K$e(e.search),r=W$e(e),n=e.hash===""?"":"#"+e.hash,i=l=>{let c=F7(l);ca(r+c+n)};return{params:t,get:l=>F(t,l),set:(l,c)=>i(MD(t,[[l,c]])),setMany:l=>i(MD(t,l))}}let P7=Zt(void 0),J$e=P7.Provider;function Q$e(e){return ur(J$e,{value:e.chrome,children:e.children})}let LD={make:Q$e};function Y$e(){return xt(P7)}function Do(e){return"var("+e+")"}let X$e=E([z("flex"),_e("column"),X("center"),et("center"),u("gap",Do(O.md)),si(1),u("min-height","160px"),Xa("center"),u("padding",Do(O.lg))]),Z$e=E([u("font-size","32px"),u("color",Do(x.warning)),u("line-height","1")]),eTe=E([u("color",Do(x.textPrimary)),u("font-size",Do($.sizeLg)),u("font-weight",Do($.weightMedium)),yn(ke(0))]),tTe=E([u("color",Do(x.textSecondary)),u("font-size",Do($.sizeSm)),u("line-height",Do($.lineHeightNormal)),u("max-width","440px"),yn(ke(0))]),rTe=E([u("background","transparent"),u("color",Do(x.textSecondary)),u("border","1px solid var("+x.border+")"),u("border-radius",Do(Y.md)),u("padding","var("+O.xs+") var("+O.md+")"),u("font-size",Do($.sizeSm)),u("cursor","pointer"),Uo(ke(4))]);function nTe(e){let t=e.title,r=t!==void 0?t:"Unavailable";return L("div",{children:[_("div",{children:"( ! )",className:Z$e}),_("h3",{children:r,className:eTe}),_("p",{children:e.detail,className:tTe}),ne(e.onRetry,null,n=>_("button",{children:"Try again",className:rTe,onClick:i=>n()}))],className:X$e})}let c0=nTe;function aC(e){return ne(k(k(G(e),t=>F(t,"properties")),G),[],Te)}function iTe(e,t){return q(aC(e).find(r=>r[0]===t),r=>r[1])}function sC(e){if(e.length===1)return Nt(e[0])}function oTe(e,t){return Mb(e.schema).every(r=>r===t||r==="id"?!0:Ce(r,e.aggregateIdField))}function GS(e,t){return q(sC(aC(e.schema).filter(r=>t(r[0],r[1]))),r=>r[0])}function zD(e,t,r){return sC(Q(e,n=>k(GS(n,r),i=>{if(oTe(n,i))return{command:n,argument:i,tier:t}})))}function O7(e,t){return Ce(Io(e).storeTarget,t)}function aTe(e,t,r,n){let i=t.field;return i!==void 0?aC(e.schema).some(o=>o[0]===i)?i:void 0:vn(k(n,o=>GS(e,(a,s)=>O7(s,o))),GS(e,(o,a)=>o===r))}let UD={contents:[]};function BD(e,t,r){let n=e+"."+t.command+"."+D(t.field,"")+"."+r;if(!UD.contents.some(i=>i===n)){UD.contents.push(n),console.error('[AutoUI] x-reventless-setter on field "'+e+'": '+r);return}}function sTe(e,t,r,n){let i=sC(e.filter(o=>o.name===t.command));if(i!==void 0){let o=aTe(i,t,r,n);if(o!==void 0)return{command:i,argument:o,tier:"Declared"};BD(r,t,'"'+t.command+'" takes no argument this field could fill — the slot stays static.');return}BD(r,t,'no exposed instance command named "'+t.command+'" — the slot stays static.')}function M7(e,t,r){return k(iTe(e,t),n=>{let i=Io(n),o=i.storeTarget,a=r.filter(c=>c.level==="Instance"),s=i.setter;if(s!==void 0)return sTe(a,s,t,o);let l=k(o,c=>zD(a,"StoreMatch",(d,f)=>O7(f,c)));return l!==void 0?l:zD(a,"NameMatch",(c,d)=>c===t)})}function L7(e,t){let r=e.requiredRole;return r!==void 0?t.includes(r):!0}function lTe(e){let t=e.resource,r=ec(t,void 0),n=t.name,i=r.rows,o=t.schema,a=e.resourceSemantics,s=zh(r.canLoadMore),d={readModelName:n,rows:i,schema:o,semantics:a,window:s,onOpenRow:(R,N)=>{},role:Xu},f=e.eventReadModelName,h=e.eventRows,p=e.eventSchema,m=e.eventSemantics,g=e.eventAccent,v=e.eventWindow,b=e.onOpenEvent,y=e.onCommand,S=Zu,w=e.resourceRef,C=e.assignCommand,A={readModelName:f,rows:h,schema:p,semantics:m,accent:g,window:v,onOpenRow:b,onCommand:y,role:S,resourceRef:w,assignCommand:C},T=r.fetchState;return typeof T!="object"?T==="Loading"?_(Sd,{}):e.mode.render([d,A]):T.TAG==="Error"?_(Pa,{detail:T._0,onRetry:()=>r.refetch()}):_(c0,{detail:T._0,onRetry:()=>r.refetch()})}let uTe=lTe,z7=Zt(void 0),cTe=z7.Provider;function dTe(e){return ur(cTe,{value:e.refresh,children:e.children})}let jD={make:dTe};function fTe(){return xt(z7)}function hTe(e){try{return Li(localStorage.getItem(e))}catch{return}}function pTe(e,t){try{return localStorage.setItem(e,t)}catch{return}}function Hn(e){return"var("+e+")"}let Yy=E([z("flex"),_e("column"),u("gap",Hn(O.lg))]),mTe=E([z("flex"),_e("column"),u("gap",Hn(O.lg))]),gTe=E([z("flex"),_e("column"),u("gap",Hn(O.sm))]),vTe=E([u("font-size",Hn($.sizeSm)),u("font-weight",Hn($.weightMedium)),u("color",Hn(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em"),yn(ke(0))]),bTe=E([z("flex"),X("center"),u("gap",Hn(O.sm)),u("flex-wrap","wrap")]),U7=E([z("inlineFlex"),X("center"),u("gap","6px"),u("margin-left","auto"),u("font-size",Hn($.sizeSm)),u("color",Hn(x.textSecondary)),u("cursor","pointer"),u("white-space","nowrap")]),_Te=E([z("flex"),_e("column"),u("gap",Hn(O.sm)),u("align-items","stretch"),lr("& ."+U7,[u("margin-left","0")])]),yTe=E([z("flex"),X("center"),et("flexEnd"),u("gap",Hn(O.xs)),u("padding-top",Hn(O.sm))]),qD=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",Hn(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",Hn(x.textSecondary)),u("font-size",Hn($.sizeSm)),Re("pointer"),Ue([u("background",Hn(x.surfaceSubtle)),u("color",Hn(x.textPrimary))]),Tw([u("opacity","0.4"),Re("notAllowed")])]);function xTe(e,t,r){return t!==void 0&&t!==""?[["before",t],["first",r]]:e!==void 0?e!==""?[["first",r],["after",e]]:[["first",r]]:[["first",r]]}let VD={contents:[]},GD={contents:[]};function STe(e,t,r){let n=D(e,"<no-plugin>")+"."+t+"."+r;if(!VD.contents.some(i=>i===n)){VD.contents.push(n),console.warn("[AutoUI] Read model "+t+' declared lifecycleField="'+r+`" but the list-view rows don't include that field; per-row command filtering is disabled.`);return}}function wTe(e,t,r){let n=D(e,"<no-plugin>")+"."+t;if(!GD.contents.some(i=>i===n)){GD.contents.push(n),console.warn("[AutoUI] Read model "+t+' lifecycleField="'+r+'" value is neither a string nor a TAG-shaped object; per-row command filter cannot match against allowedStates.');return}}let KD={contents:[]};function ETe(e,t){let r=D(e,"<no-plugin>")+"."+t;if(!KD.contents.some(n=>n===r)){KD.contents.push(r),console.warn("[AutoUI] Read model "+t+" produced duplicate row keys — row identity is ambiguous and row clicks may open the wrong row. Give each row a unique id, or annotate the distinguishing field with @subId.");return}}function kTe(e){let t=e.archiveOffered,r=e.rowActions,n=e.schedulerJoin,i=e.uiHints,o=e.liveOffered,a=e.sortKeyField,s=e.byIdsQueryDocument,l=e.byIdsQueryField,c=e.detailQueryDocument,d=e.singleQueryField,f=e.drillPath,h=e.openRowId,p=e.pluginId,m=e.detailView,g=e.rows,v=e.readModel,b=f!==void 0?f:[],y=o!==void 0?o:!0,S=r!==void 0?r:[],w=t!==void 0?t:!1,C=li(),A=Zp(),T=fm(),R=ce(()=>{}),N=R[1],I=ce(()=>{}),M=I[1],P=I[0],B=ce(()=>({})),j=B[1],W=B[0],te=ce(()=>"Loaded"),J=te[1],re=te[0],se=ce(()=>{}),pe=se[1],K=se[0],oe=om(),le=ne(oe,!1,U=>U.isLive(v.queryField)),Z=UAe(D(p,"default")+"."+v.name),ve=Z[0],be=le&&y&&ve,Ge=va(),Lt=q(p,U=>({pluginId:U,viewName:v.name})),Ct=k(i,U=>hn(U,v.name)),kr=s2(v.schema,Ct,{registry:Ge,ownEntity:Lt}),nn=ne(k(Ct,U=>U.suppress),!1,U=>U.includes(ph)),Ln;if(n!==void 0&&wAe(!0,v.schema,nn)){let U=l5(ph);Ln=U!==void 0&&!kr.some(de=>de.id===U.id)?kr.concat([U]):kr}else Ln=kr;let qt=n2(p,v.name,void 0),Ei=ce(()=>i2(qt)),Yn=Ei[1],rt=wz(),dt=rt.narrow,Vt=Ez(rt),Pt=U=>{o2(qt,U,Vt),Yn(de=>({mode:U,band:Vt}))},Dt=l2(Ei[0],Ct,Dw(v.schema),Vt,Ln),ki=n!==void 0&&Dt!==void 0?Dt.id===ph:!1,zn=Ee(m)&&!ki,Xn="reventless.layout."+D(p,"default")+"."+v.name,is=ce(()=>hTe(Xn)),Ho=is[1],Ci=Zue(is[0],Ct,EQ(v.schema),zn),Ri=oe!==void 0&&be?oe.statusFor(oe.apiForReadModel(v.queryField))!=="Open":!1,Hi=be&&!Ri,Se=ce(()=>0),Fe=Se[1],Lr=Se[0],Jt=Ne({}),V=Ne(void 0),ye=Ne(vs.make()),Pe=Ne(vs.make()),lt=Ne(nd.make()),ft=Ne(nd.make()),Ft=Ne(new Map),at=U=>{Ft.current.set(U,Date.now())},Me=U=>{let de=Ft.current.get(U);return de!==void 0?Date.now()-de<6e4:!1},Ie=I7(),tt=F7(Ie.params),Qe=Ne(Bf),ze=zs(),zt=q(p,U=>bs(cl(U,v.name))+tt),ut=Nw(v.schema),Ir=U=>q(k(F(U,"id"),ie),de=>{let ge=k(ut,we=>k(F(U,we),ie));return ge!==void 0?aCe(de,ge):de}),Un=U=>ut!==void 0?gD(U)[0]:U,vr=U=>{if(ut===void 0)return Oe([["id",U]]);let de=gD(U),ge=de[1],we=de[0];return Oe(ge!==void 0?[["id",we],["subId",ge]]:[["id",we]])},Tt=h!==void 0?h:P,Cr=U=>p!==void 0?ze(Ka(p,v.name,U,[])+tt):M(de=>U),Vr=()=>zt!==void 0?ze(zt):M(U=>{}),xn=NS(v.schema),Sn=Kz(v.schema),Gr=xn.hasFilter||xn.hasSort||xn.hasSearch,Zn=_n(v.schema,k(i,U=>Ya(U,v.name)),{field:v.labelField,source:v.labelFieldSource}),Kr=fi(v.schema,void 0,Ge,Lt,Zn.labelField,Zn.projectedLabelField),tl=Fw(v.schema,k(Ct,U=>U.retiredLabel)),os=Nc.offered(w,tl),wc=Nc.showing(os,Ie.get(Nc.param)),Wo=[];Te(Ie.params).forEach(U=>{let de=U[1];if(de==="")return;let ge=U[0];if(ge==="after"||ge==="before"){Wo.push(ge+"="+de);return}if(ge===Nc.param&&os){Wo.push(ge+"="+de);return}if(!Gr)return;if(ge==="sort"||ge==="dir"){Wo.push(ge+"="+de);return}if(ge==="q"&&Sn.search){Wo.push(ge+"="+de);return}if(!ge.startsWith("f."))return;let we=ge.slice(2);if(ne(Kr.find(Xe=>Xe.key===we),!1,Xe=>M3(Xe).filter)){Wo.push(ge+"="+de);return}});let y_=Wo.toSorted((U,de)=>U===de?0:U<de?-1:1).join("|"),rl={};if(Gr){let U={};Te(Ie.params).forEach(dn=>{let ar=dn[0];if(ar.startsWith("f.")){U[ar.slice(2)]=dn[1];return}});let de=L3(U,Kr),ge=D(Ie.get("q"),""),we=Hz(de[0],ge,Sn,Kr),Xe=Ie.get("dir")==="desc"?"Desc":"Asc",wt=z3(Ie.get("sort"),Xe,Kr),er=p1e(wt);ee(we,dn=>{rl.filter=dn}),ee(er,dn=>{rl.orderBy=dn})}xTe(Ie.get("after"),Ie.get("before"),LAe).forEach(U=>{rl[U[0]]=U[1]}),os&&(rl.includeRetired=wc);let eu=Zk(v,rl,y_,void 0,()=>j(U=>({})),void 0),on=eu.refetch,Wi=eu.fetchState,tu=eu.pageInfo,Ec=eu.setRows,nl=eu.rows,Af=(U,de,ge)=>A!==void 0?()=>A(U,vr(ge)).then(we=>[we.data,A5(we,de)]):C!==void 0?()=>C(U,vr(ge)).then(we=>[we,void 0]):void 0,kc=U=>{if(c===void 0||d===void 0)return;let de=Af(c,d,U);if(de!==void 0){J(ge=>"Loading"),Mt(de().then(ge=>{let we=ge[1],Ye=k(G(ge[0]),wt=>F(wt,d)),Xe=0;return we!==void 0||Ye===void 0||Ze(Ye)==="JSONNull"?Xe=1:(j(wt=>{let er=Oe(Te(wt));return er[U]=Ye,er}),J(wt=>"Loaded")),Xe===1&&(j(wt=>Oe(Te(wt).filter(er=>er[0]!==U))),J(wt=>we!==void 0?{TAG:"Refused",_0:we.message}:{TAG:"Error",_0:"Detail not found"})),Promise.resolve()}),ge=>(J(we=>({TAG:"Error",_0:"Failed to load detail"})),Promise.resolve()));return}},$f=()=>{if(ee(Tt,kc),!Hi)return on()};Ae(()=>{let U=h!==void 0?h:P;U!==void 0&&(ir(F(W,U))?kc(U):J(de=>"Loaded"))},[h,P]);let Em=Tp(),Tf=Jk(),km=ne(k(Sa(),U=>U.identity),[],U=>U.groups),Cm=(U,de)=>q(gi(M7(v.schema,de,v.commands),ge=>L7(ge.command,km)),ge=>(()=>N(we=>({command:ge.command,rowId:U,formKey:ge.command.name+":"+U})))),vt=U=>{let de=k(F(U,"id"),ie);return de!==void 0?S.map(ge=>{let we=u7(ge,de);return{label:ge.label,run:()=>N(Ye=>({command:we.command,rowId:void 0,initialValues:we.initialValues,navigateTo:we.navigateTo,formKey:we.formKey}))}}):[]},as=(U,de)=>vt(D(G(de),{})),Cc=(U,de)=>k(k(F(U,"id"),ie),ge=>Cm(ge,de)),fR=(g!==void 0?g:nl).map(U=>D(G(U),{})),Rc=mf(fR,Kr,Ge,Lt,void 0),Ac={lookupLabel:(U,de)=>pf(Rc,U,Ge,de),isMissing:(U,de)=>rm(Rc,U,Ge,de),retiredBadge:(U,de)=>em(Rc,U,Ge,de),linkable:(U,de)=>tm(Rc,U,Ge,de,w)},mR=pue(Ie.get("after"),Ie.get("before")),S_=mue(tu,mR),w_=gue(tu,mR),gR=S_||w_,vR=J8(Kr,Ge,Em,F,!0,Ac,Lt,Cc,tl,Zn.labelField).map(U=>{if(!U.sortable||!gR)return U;let de=ne(Kr.find(ge=>ge.key===U.key),!1,ge=>M3(ge).sort);return{key:U.key,label:U.label,render:U.render,sortable:de,width:U.width}}),bR=Ie.get("sort"),Rm=Ie.get("dir")==="desc"?"Desc":"Asc",E_=U=>Ec(de=>de.map(ge=>{let we=go(ge);if(we===void 0)return ge;let Ye=U.find(Xe=>Ce(go(Xe),we));return Ye!==void 0?Ye:ge})),Am=a!==void 0?Q(nl,U=>k(k(G(U),de=>F(de,a)),ie)):[],_R=U=>{let de=tu.hasNextPage,ge=Am.length;if(U===void 0||a===void 0||!de||ge<=0)return!1;let we=Am[0];if(Rm==="Asc"){let Xe=nt(Am,we,(wt,er)=>wt>er?wt:er);return U>Xe}let Ye=nt(Am,we,(Xe,wt)=>Xe<wt?Xe:wt);return U<Ye},yR=U=>{if(U.length!==0)return Ec(de=>Hy.drop(de,U))},Aq=()=>{let U=Object.keys(Jt.current);if(Jt.current={},V.current=void 0,U.length!==0){if(U.length>10)return on();if(l!==void 0&&s!==void 0&&C!==void 0){let de=Oe([["ids",U.map(ge=>ge)]]);Mt(C(s,de).then(ge=>{let we=Hy.fromBatch(U,ge,l);return we!==void 0&&(E_(we.rows),ir(ut)&&yR(we.gone)),Promise.resolve()}),ge=>Promise.resolve());return}if(ut!==void 0||d===void 0||c===void 0||C===void 0)return on();U.forEach(de=>{let ge=Oe([["id",de]]);Mt(C(c,ge).then(we=>{let Ye=Hy.fromSingle(we,d);return Ye!==void 0&&(typeof Ye!="object"?yR([de]):E_([Ye._0])),Promise.resolve()}),we=>Promise.resolve())})}},k_=U=>{Jt.current[U]=!0;let de=V.current;de!==void 0&&clearTimeout(de),V.current=setTimeout(Aq,150)},C_=U=>Ec(de=>{let ge=de.map(Xe=>{let wt=go(Xe);if(wt===void 0)return Xe;let er=U.find(dn=>Ce(go(dn),wt));return er!==void 0?er:Xe}),we=Q(ge,go),Ye=U.filter(Xe=>{let wt=go(Xe);return wt!==void 0?!we.includes(wt):!1});return ge.concat(Ye)}),$q=U=>nl.find(de=>Ce(go(de),U)),xR=a5.useInvalidate(),Tq=U=>{if(!vs.shouldApply(ye.current,U.id,U.seq))return;vs.record(ye.current,U.id,U.seq),xR(v.queryField);let de=$q(U.id),ge=Ee(de);switch(U.changeKind){case"Added":if(!Me(U.id))return _R(U.sortKeyValue)?void 0:Fe(er=>er+1|0);if(Ft.current.delete(U.id),ge)return;let Ye=sRe(U,v.schema);if(ut!==void 0||Ye===void 0){let er=U.id;if(ut!==void 0)return on();if(l!==void 0&&s!==void 0&&C!==void 0){let ar=Oe([["ids",[er]]]);Mt(C(s,ar).then(fn=>{let ol=D(k(k(G(fn),Tc=>F(Tc,l)),Et),[]);return C_(ol),Promise.resolve()}),fn=>Promise.resolve());return}if(d===void 0||c===void 0||C===void 0)return on();let dn=Oe([["id",er]]);Mt(C(c,dn).then(ar=>{let fn=k(G(ar),ol=>F(ol,d));return fn!==void 0&&Ze(fn)!=="JSONNull"&&C_([fn]),Promise.resolve()}),ar=>Promise.resolve());return}else return C_([Ye]);case"Updated":if(ut!==void 0)return ge?k_(U.id):void 0;if(de===void 0)return;let Xe=_R(U.sortKeyValue),wt=nd.apply(lt.current,de,U,v.schema);return Xe||wt===void 0?k_(U.id):E_([wt]);case"Removed":return ge?ut!==void 0?k_(U.id):Ec(er=>er.filter(dn=>da(go(dn),U.id))):void 0;case"BulkInvalidated":return Fe(er=>0),on()}},Nq=()=>on();DS(v.queryField,"All",be,Tq,Nq);let Dq=U=>{if(Tt===void 0||U.id!==Un(Tt)||!vs.shouldApply(Pe.current,U.id,U.seq))return;vs.record(Pe.current,U.id,U.seq),xR(v.queryField);let de=U.changeKind;if(ut!==void 0)switch(de){case"Updated":case"Removed":return kc(Tt);case"Added":case"BulkInvalidated":return}else switch(de){case"Updated":let ge=k(F(W,Tt),we=>nd.apply(ft.current,we,U,v.schema));return ge!==void 0?(j(we=>{let Ye=Oe(Te(we));return Ye[Tt]=ge,Ye}),J(we=>"Loaded")):kc(Tt);case"Removed":return pe(we=>Tt);case"Added":case"BulkInvalidated":return}},Fq=()=>{if(Tt!==void 0&&c!==void 0&&d!==void 0&&C!==void 0){Mt(C(c,vr(Tt)).then(U=>{let de=k(G(U),we=>F(we,d)),ge=0;return de!==void 0&&Ze(de)!=="JSONNull"?(j(we=>{let Ye=Oe(Te(we));return Ye[Tt]=de,Ye}),J(we=>"Loaded")):ge=1,ge===1&&pe(we=>Tt),Promise.resolve()}),U=>Promise.resolve());return}};DS(v.queryField,{_0:D(q(Tt,Un),"")},be&&Ee(Tt),Dq,Fq),Ae(()=>{pe(U=>{})},[D(Tt,"")]);let SR=D(Ie.get("q"),""),R_={};Te(Ie.params).forEach(U=>{let de=U[0];if(de.startsWith("f.")){R_[de.slice(2)]=U[1];return}});let $m=Wke(Kr,R_),wR=$m.length!==0,Iq=q(bR,U=>({key:U,direction:Rm==="Asc"?"Asc":"Desc"})),Pq=(U,de)=>{let ge=de==="Asc"?"asc":"desc";Qe.current=Bf,Ie.setMany([["sort",U],["dir",ge],["after",""],["before",""]])},Oq=U=>{Qe.current=Bf,Ie.setMany([["q",U],["after",""],["before",""]])},ER=(U,de)=>{Qe.current=Bf,Ie.setMany([["f."+U,de],["after",""],["before",""]])},Mq=()=>ee(tu.endCursor,U=>{Qe.current=vue(Qe.current,Ie.get("after")),Ie.setMany([["after",U],["before",""]])}),Lq=()=>{let U=bue(Qe.current),de=U[1];return de!==void 0?(Qe.current=U[0],Ie.setMany([["after",de],["before",""]])):ee(tu.startCursor,ge=>Ie.setMany([["before",ge],["after",""]]))},Nf=v.commands.filter(U=>U.level==="Instance"),zq=Nf.length!==0||S.length!==0,$c;if(zq){let ge={key:"__actions",label:"",render:we=>{let Ye=k(F(we,"id"),ie),Xe=v.lifecycleField;Xe!==void 0&&(F(we,Xe)!==void 0?wa(we,Xe)===void 0&&wTe(p,v.name,Xe):STe(p,v.name,Xe));let er=e9(Nf,we,v.lifecycleField).map(ar=>({TAG:"Action",label:ar.label,onClick:()=>N(fn=>({command:ar,rowId:Ye,formKey:ar.name+":"+D(Ye,"")})),danger:!1})),dn=vt(we).map(ar=>({TAG:"Action",label:ar.label,onClick:ar.run,danger:!1}));return _(H9,{items:er.concat(dn),triggerLabel:"..."})},sortable:!1,width:"56px"};$c=vR.concat([ge])}else $c=vR;let Uq=v.commands.filter(U=>U.level==="Collection"),kR=U=>{let de=U.map(er=>D(G(er),{})),ge=L3(R_,Kr),Ye=Gr&&Sn.search?"":SR,Xe=z3(bR,Rm,Kr),wt;return wt=typeof Xe!="object"||Xe.TAG==="ServerSort"?[void 0,Rm]:[Xe._0,Xe._1],Hke(Kke(Gke(de,Kr,ge[1]),Kr,Ye),Kr,wt[0],wt[1])},CR=U=>{if(Dt!==void 0&&Dt.id!==ha){let de=q(Zn.statusField,ss=>Lb(ss,Nf,k(Ct,al=>al.transitions))),ge=Qk(C,A,Nf,v.name,be,()=>on(),Ge,Tf.onNotice,at),we=kR(U).map(ss=>ss),Ye=LJ(w_,S_);if(n!==void 0&&Dt.id===ph){let ss=_n(n.resource.schema,k(i,al=>Ya(al,n.resource.name)),{field:n.resource.labelField,source:n.resource.labelFieldSource});return _(uTe,{mode:Dt,resource:n.resource,resourceSemantics:ss,resourceRef:n.resourceRef,assignCommand:y7(Nf,n.resourceRef),eventReadModelName:v.name,eventSchema:v.schema,eventRows:we,eventWindow:Ye,eventSemantics:Zn,eventAccent:k(Ct,al=>al.accent),onOpenEvent:(al,Qq)=>ee(k(G(Qq),Ir),Cr),onCommand:ge})}let Xe=v.name,wt=v.schema,er=k(Ct,ss=>ss.accent),dn=Ye,ar=(ss,al)=>ee(k(G(al),Ir),Cr),fn=q(de,ss=>ge),ol=Cm,Tc=S.length===0?void 0:as,Jq={readModelName:Xe,rows:we,schema:wt,semantics:Zn,accent:er,window:dn,onOpenRow:ar,onCommand:fn,statusCommandFor:de,fillSlot:ol,rowActionsFor:Tc,ownEntity:Lt,retired:tl,refLabels:Ac};return Dt.render([Jq])}else{let de=kR(U),ge=q(m,ar=>(fn=>ee(Ir(fn),Cr))),we=ar=>D(Ir(ar),JSON.stringify(ar)),Ye=(ar,fn)=>{let ol=fn.map(we),Tc={};return ol.forEach(DR=>{Tc[DR]=!0}),Object.keys(Tc).length!==ol.length&&ETe(p,v.name),_(Lh,{columns:ar,data:fn,keyFn:we,sortState:Iq,onSort:Pq,onRowClick:ge,activeKey:Tt})},Xe=yQ(v.schema);if(Xe===void 0)return Ye($c,de);let wt=tRe(de,Xe,fo(v.schema,Xe)),er=wt.length;if(er===1||er===0)return Ye($c,de);let dn=$c.filter(ar=>ar.key!==Xe);return _("div",{children:wt.map(ar=>{let fn=ar[0];return L("div",{children:[_("div",{children:pt(fn),className:vTe}),Ye(dn,ar[1])],className:gTe},fn)}),className:mTe})}},Bq=g!==void 0?CR(g):typeof Wi!="object"?Wi==="Loading"?_(Sd,{}):CR(nl):Wi.TAG==="Error"?_(Pa,{detail:Wi._0,onRetry:()=>on()}):_(c0,{detail:Wi._0,onRetry:()=>on()}),il;if(Tt!==void 0&&m!==void 0){let de=(g!==void 0?g:nl).find(Ye=>Ce(k(G(Ye),Ir),Tt)),ge=F(W,Tt);il=[Tt,m,ge!==void 0?ge:de]}else il=void 0;let jq=U=>da(K,U[0])?Ee(U[2]):!1,RR=U=>{let de=U[2],ge=U[0];if(Ce(K,ge))return _(Pa,{title:"Entity removed",detail:"This entity no longer exists. Return to the list to continue.",onRetry:()=>Vr()});if(de!==void 0)return U[1](Un(ge),b,kt(de));let we=0,Ye=0,Xe=0;if(typeof Wi!="object"){if(Wi==="Loading")return _(Sd,{});if(typeof re!="object"){if(re!=="Loading")return _(Pa,{title:"Row not found",detail:"The row data is no longer in the current page."});Xe=4}else{if(re.TAG!=="Error")return _(c0,{detail:re._0,onRetry:()=>on()});we=2}}else Xe=4;if(Xe===4)if(typeof re!="object"){if(re==="Loading")return _(Sd,{});Ye=3}else Ye=3;if(Ye===3&&typeof Wi=="object"){if(Wi.TAG==="Error")return _(Pa,{detail:Wi._0,onRetry:()=>on()});we=2}return we===2&&typeof re=="object"&&re.TAG==="Error"?_(Pa,{detail:re._0,onRetry:()=>on()}):_(c0,{detail:Wi._0,onRetry:()=>on()})},qq=zn?_("div",{children:[["full","Full","▭"],["split","Split","▤"]].map(U=>{let de=U[1],ge=U[0],we;return we=Ci==="Full"?ge==="full":ge==="split",L("button",{children:[_("span",{children:U[2],"aria-hidden":!0,style:{fontSize:"0.9em",lineHeight:"1"}}),_("span",{children:de,className:Fa.Style.btnLabel})],"aria-label":de,"aria-pressed":we?"true":"false",className:we?Fa.Style.btnActive:Fa.Style.btn,title:de,onClick:Ye=>{pTe(Xn,ge),Ho(Xe=>ge)}},ge)}),"aria-label":"Layout",className:Fa.Style.group,role:"group"}):null,Tm=Dz(),AR=y?_(FAe,{live:ve,canBeLive:le,reconnecting:Ri,onToggle:Z[1]}):null,Vq=_(Y9,{title:v.name,commands:Uq.map(U=>({key:U.name,label:"+ "+U.label,run:()=>N(de=>({command:U,rowId:void 0,formKey:U.name})),primary:!0})),controls:L(Bt,{children:[Ln.length>1?_(Fa.make,{modes:Ln,activeId:ne(Dt,ha,U=>U.id),onSelect:Pt}):null,qq,AR]}),inBar:Ee(Tm)}),$R=cv(Tm,Vq),TR=tl!==void 0&&os?L("label",{children:[_("input",{checked:wc,type:"checkbox",onChange:U=>Ie.setMany(Nc.toggleParams(wc))}),Nc.label(tl)],className:U7}):null,Gq=wR?_(V9,{filters:$m,onFilterChange:ER}):null,Kq=nt($m,0,(U,de)=>de.value===""?U:U+1|0)+(wc&&os?1:0)|0,Hq=L(Bt,{children:[L("div",{children:[_(j9,{value:SR,onChange:Oq}),dt&&(wR||os)?_(GCe,{activeCount:Kq,children:L("div",{children:[$m.map(U=>_(iCe.make,{filter:U,onChange:ER},U.key)),TR],className:_Te})}):L(Bt,{children:[Gq,TR]})],className:bTe}),Lr>0?_(MAe,{count:Lr,onClick:()=>{Fe(U=>0),Qe.current=Bf,Ie.setMany([["after",""],["before",""]]),on()}}):null]}),Wq=gR?L("div",{children:[_("button",{children:"‹ Prev",className:qD,disabled:!w_,onClick:U=>Lq()}),_("button",{children:"Next ›",className:qD,disabled:!S_,onClick:U=>Mq()})],className:yTe}):null,A_=kQ(v.schema),$_;if(A_!==void 0){let U=A_.matchedGroups,de=U.length,ge=de!==1?de!==0?U.join(" / "):"an elevated role":U[0];$_=_(Tk,{variant:"Info",title:"Viewing as "+ge,message:"This list is not filtered to you — it shows rows for every "+A_.ownerLabel+"."})}else $_=null;let NR=L(Bt,{children:[Hq,$_,Tf.element,Bq,Wq]}),Nm;if(Ci==="Full")if(il!==void 0){let U=il[2],de=il[1],ge=il[0],Xe={label:v.name,href:zt,onClick:Vr},wt=jq([ge,de,U]),fn={placement:Ee(Tm)?"Bar":"Pane",ancestors:[Xe],controls:AR};Nm=_(jD.make,{refresh:$f,children:L("div",{children:[wt?null:cv(Tm,_("div",{children:_(K9,{crumbs:[Xe],allLinks:!0}),className:$Ce.titleGroup})),_(LD.make,{chrome:fn,children:RR([ge,de,U])})],className:Yy})})}else Nm=L("div",{children:[$R,NR],className:Yy});else{let U=il!==void 0?RR(il):_(Wd,{title:"Select an item",description:"Choose a row on the left to see its details here."});Nm=_(jD.make,{refresh:$f,children:L("div",{children:[$R,_(LD.make,{chrome:{placement:"Pane",ancestors:[]},children:_(JCe,{master:NR,detail:U})})],className:Yy})})}return L(Bt,{children:[Nm,ne(R[0],null,U=>_(Nk,{isOpen:!0,onClose:()=>N(de=>{}),title:U.command.label,children:_(oC,{schema:U.command.schema,aggregateId:U.rowId,aggregateIdField:U.command.aggregateIdField,injectNewId:U.command.level==="Collection",ownerField:U.command.ownerField,ownerValue:U.command.ownerValue,initialValues:U.initialValues,refFields:U.command.refFields,onSubmit:de=>{if(T!==void 0){let ge=U.rowId;return ge!==void 0?at(ge):ee(F(de,D(U.command.aggregateIdField,"id")),at),Mt(T(U.command.mutationDocument,Ub(U.command.schema,de)).then(we=>{if(typeof we!="object")return we==="Accepted"?(N(Ye=>{}),Hi||on(),ee(U.navigateTo,ca),Promise.resolve("Ok")):(N(Ye=>{}),!Hi&&ir(U.navigateTo)&&setTimeout(()=>on(),zCe),ee(U.navigateTo,ca),Promise.resolve("Ok"));{if(we.TAG==="Rejected"){let Xe=we._0;return hm(C,Ge,Xe.errorCode,Xe.detail).then(wt=>Promise.resolve({TAG:"Err",_0:wt}))}let Ye=we._0;return console.error("[AutoUI] "+v.name+": command "+U.command.name+" not executed — "+Ye),Promise.resolve({TAG:"Err",_0:Ye})}}),we=>Promise.resolve({TAG:"Err",_0:"Request failed"}))}return N(ge=>{}),Promise.resolve("Ok")},submitLabel:"Execute"},U.formKey)}))]})}let CTe=kTe;function RTe(e,t,r){if(e.length<2)return[];let n=nt(e,Number.MAX_VALUE,(s,l)=>s<l?s:l),o=nt(e,Number.MIN_VALUE,(s,l)=>s>l?s:l)-n,a=t/(e.length-1|0);return e.map((s,l)=>({x:l*a,y:o===0?r/2:r-(s-n)/o*r}))}function ATe(e){return e.map(t=>t.x.toString()+","+t.y.toString()).join(" ")}function $Te(e){let t=e.color,r=e.height,n=e.width,i=n!==void 0?n:80,o=r!==void 0?r:24,a=t!==void 0?t:"",s=RTe(e.values,i,o),l=a===""?"var("+x.brand+")":a;return s.length<2?null:_("svg",{children:_("polyline",{fill:"none",points:ATe(s),stroke:l,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),style:{display:"block",overflow:"visible"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let TTe=$Te;function mi(e){return"var("+e+")"}let NTe=E([z("flex"),_e("column"),u("gap",mi(O.xs)),u("padding",mi(O.lg)),u("background",mi(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",mi(Y.md))]),DTe=E([u("color",mi(x.textSecondary)),u("font-size",mi($.sizeSm)),u("font-weight",mi($.weightMedium))]),FTe=E([z("flex"),X("baseline"),u("gap",mi(O.sm))]),ITe=E([u("color",mi(x.textPrimary)),u("font-size",mi($.sizeXxl)),u("font-weight",mi($.weightBold)),u("line-height",mi($.lineHeightTight))]);function PTe(e){switch(e){case"Up":return x.success;case"Down":return x.error;case"Neutral":return x.textDisabled}}function OTe(e){return E([u("color",mi(PTe(e))),u("font-size",mi($.sizeSm)),u("font-weight",mi($.weightMedium))])}function MTe(e){let t=e.trendLabel,r=e.trend,n;if(r!==void 0&&t!==void 0){let i;switch(r){case"Up":i="^";break;case"Down":i="v";break;case"Neutral":i="-";break}n=_("span",{children:i+" "+t,className:OTe(r)})}else n=null;return L("div",{children:[_("div",{children:e.label,className:DTe}),L("div",{children:[_("span",{children:e.value,className:ITe}),n],className:FTe}),ne(e.sublabel,null,i=>_("div",{children:i,style:{color:"var("+x.textDisabled+")",fontSize:"var("+$.sizeXs+")"}})),D(e.footer,null)],className:NTe})}let LTe=MTe;function B7(e){return"var("+e+")"}let zTe=E([z("grid"),u("grid-template-columns","repeat(auto-fill, minmax(180px, 1fr))"),u("gap",B7(O.md))]),UTe=E([Re("pointer"),u("border-radius",B7(Y.md)),Ue([u("filter","brightness(0.98)")])]);function BTe(e){let t=e.kpis;return t.length===0?null:_("div",{children:t.map(r=>{let n=q(r.spark,a=>_(TTe,{values:a,width:120,height:24})),i=_(LTe,{label:r.label,value:r.value,trend:r.trend,trendLabel:r.trendLabel,sublabel:r.sublabel,footer:n}),o=r.onOpen;return o!==void 0?_("div",{children:i,className:UTe,role:"button",tabIndex:0,onKeyDown:a=>{if(a.key==="Enter")return o()},onClick:a=>o()},r.key):_("div",{children:i},r.key)}),className:zTe})}let jTe=BTe,_v=["var("+x.brand+")","#7c9c5e","#b0743c","#7466a3","#4d8a8a","#a35f74"];function j7(e,t){return D(e.color,_v[Fo(t,_v.length)])}function qTe(e){let t=nt(e,0,(n,i)=>n+(i.value>0?i.value:0));if(t<=0)return[];let r={contents:0};return e.map(n=>{let i=r.contents,o=(n.value>0?n.value:0)/t;return r.contents=i+o,[i,i+o]})}function cg(e,t,r,n){let i=(n-.25)*2*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function sn(e){return(Math.round(e*1e3)/1e3).toString()}function Xy(e,t,r,n,i,o){let a=cg(e,t,r,i),s=a[1],l=a[0],c=cg(e,t,r,o),d=c[1],f=c[0],h=o-i>.5?"1":"0";if(n<=0)return"M "+sn(e)+" "+sn(t)+" L "+sn(l)+" "+sn(s)+" A "+sn(r)+" "+sn(r)+" 0 "+h+" 1 "+sn(f)+" "+sn(d)+" Z";let p=cg(e,t,n,i),m=cg(e,t,n,o);return"M "+sn(l)+" "+sn(s)+" A "+sn(r)+" "+sn(r)+" 0 "+h+" 1 "+sn(f)+" "+sn(d)+" L "+sn(m[0])+" "+sn(m[1])+" A "+sn(n)+" "+sn(n)+" 0 "+h+" 0 "+sn(p[0])+" "+sn(p[1])+" Z"}function VTe(e){let t=e.innerRatio,r=e.size,n=e.slices,i=r!==void 0?r:120,o=t!==void 0?t:0,a=qTe(n);if(a.length===0)return null;let s=i/2,l=i/2-1,c=o>0?l*o:0;return _("svg",{children:a.map((d,f)=>{let h=d[1],p=d[0],m=n[f],g=j7(m,f),v=h-p>=.999?Xy(s,s,l,c,p,p+.5)+" "+Xy(s,s,l,c,p+.5,h):Xy(s,s,l,c,p,h);return _("path",{children:_("title",{children:m.label}),d:v,fill:g},m.label+f.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:i.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+i.toString()})}let GTe=VTe,KTe=["var("+x.brand+")","var("+x.success+")"];function HTe(e){let t=e.flatMap(i=>i.values),r=nt(t,Number.MAX_VALUE,(i,o)=>i<o?i:o),n=nt(t,Number.MIN_VALUE,(i,o)=>i>o?i:o);return[r,n]}function WTe(e){let t=e.height,r=e.width,n=e.series,i=r!==void 0?r:320,o=t!==void 0?t:120;if(n.length===0||n.every(m=>m.values.length<2))return null;let a=HTe(n),s=a[0],l=a[1]-s,c=l===0?1:l,d=o-16,f=nt(n,0,(m,g)=>m>g.values.length?m:g.values.length),h=i/(f-1|0),p=8+d;return _("svg",{children:n.map((m,g)=>{let v=D(m.color,D(KTe[g],"var("+x.brand+")")),y=m.values.map((C,A)=>{let T=A*h,R=8+d-(C-s)/c*d;return[T,R]}).map(C=>C[0].toString()+","+C[1].toString()).join(" "),S=(m.values.length-1|0)*h,w="0,"+p.toString()+" "+y+(" "+S.toString()+","+p.toString());return L("g",{children:[_("polygon",{fill:v,fillOpacity:"0.15",points:w,stroke:"none"}),_("polyline",{fill:"none",points:y,stroke:v,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})]},m.label)}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let JTe=WTe;function QTe(e){let t=e.size,r=t!==void 0?t:120;return _(GTe,{slices:e.slices,size:r,innerRatio:.6})}let YTe=QTe;function Du(e){return"var("+e+")"}function XTe(e){return E([z("flex"),_e("column"),X("center"),u("gap","2px"),u("width","100%"),u("max-width",e.toString()+"px")])}let ZTe=E([At("relative"),u("width","100%"),u("line-height","0")]),eNe=E([At("absolute"),u("left","0"),u("right","0"),u("bottom","0"),u("text-align","center"),u("line-height","1.1"),u("font-size",Du($.sizeXl)),u("font-weight",Du($.weightMedium)),u("color",Du(x.textPrimary))]),tNe=E([z("flex"),et("spaceBetween"),u("width","100%"),u("font-size",Du($.sizeXs)),u("color",Du(x.textDisabled))]),rNe=E([u("font-size",Du($.sizeSm)),u("color",Du(x.textSecondary))]);function nNe(e,t,r){if(r<=t)return 0;let n=(e-t)/(r-t);return n<0?0:n>1?1:n}function Bn(e){return(Math.round(e*100)/100).toString()}function HD(e,t,r,n){let i=Math.PI+n*Math.PI;return[e+r*Math.cos(i),t+r*Math.sin(i)]}function WD(e,t,r,n,i){let o=HD(e,t,r,n),a=HD(e,t,r,i);return"M "+Bn(o[0])+" "+Bn(o[1])+" A "+Bn(r)+" "+Bn(r)+" 0 0 1 "+Bn(a[0])+" "+Bn(a[1])}function iNe(e){let t=e.size,r=e.caption,n=e.max,i=e.min,o=e.value,a=i!==void 0?i:0,s=t!==void 0?t:160;if(n<=a)return null;let l=nNe(o,a,n),c=s*.09,d=s/2,f=s/2-c/2,h=f+c/2,p=h+c/2;return L("div",{children:[L("div",{children:[L("svg",{children:[_("path",{d:WD(d,h,f,0,1),fill:"none",stroke:"var("+x.surfaceSubtle+")",strokeLinecap:"round",strokeWidth:Bn(c)}),l<=0?null:_("path",{d:WD(d,h,f,0,l),fill:"none",stroke:"var("+x.brand+")",strokeLinecap:"round",strokeWidth:Bn(c)})],"aria-label":Bn(o)+" of "+Bn(n),role:"img",style:{display:"block",height:"auto",maxWidth:"100%"},height:Bn(p),width:Bn(s),viewBox:"0 0 "+Bn(s)+" "+Bn(p)}),_("div",{children:D(e.display,Bn(o)),className:eNe})],className:ZTe}),L("div",{children:[_("span",{children:Bn(a)}),_("span",{children:Bn(n)})],className:tNe}),r!==void 0?_("div",{children:r,className:rNe}):null],className:XTe(s)})}let oNe=iNe;function Dh(e){return"var("+e+")"}let aNe=E([z("flex"),_e("column"),u("gap","6px")]),sNe=E([u("overflow-x","auto")]),lNe=E([z("flex"),u("gap","4px"),X("flexStart")]);function uNe(e){return E([z("grid"),u("grid-template-rows","repeat(7, "+e.toString()+"px)"),u("gap","2px"),X("center"),u("font-size",Dh($.sizeXs)),u("color",Dh(x.textDisabled)),u("line-height","1")])}function cNe(e){return E([z("grid"),u("grid-auto-flow","column"),u("grid-auto-columns",e.toString()+"px"),u("grid-template-rows","repeat(7, "+e.toString()+"px)"),u("gap","2px")])}function dNe(e){return E([u("border-radius","2px"),u("border","1px solid var("+x.borderSubtle+")"),u("background",e<=0?"transparent":"color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}let fNe=E([u("visibility","hidden")]),hNe=E([z("flex"),X("center"),xi("wrap"),u("gap",Dh(O.md)),u("font-size",Dh($.sizeXs)),u("color",Dh(x.textSecondary))]),pNe=E([z("flex"),X("center"),u("gap","4px")]);function mNe(e){return E([u("width","10px"),u("height","10px"),u("border-radius","2px"),u("border","1px solid var("+x.borderSubtle+")"),u("background","color-mix(in srgb, var("+x.brand+") "+Math.round(e*100).toString()+"%, transparent)")])}function gNe(e){let t=new Date(e).getDay()|0;return t===0?6:t-1|0}function vNe(e){let t=e[0];if(t===void 0)return[];let r=Il(gNe(t.time),n=>{});for(e.forEach(n=>{r.push(n)});r.length%7!==0;)r.push(void 0);return Il(r.length/7|0,n=>r.slice(n*7|0,(n*7|0)+7|0))}function bNe(e){return nt(e,0,(t,r)=>r.value>t?r.value:t)}function JD(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function _Ne(e){return e%2===0?D(Vw[e],""):""}function yNe(e){let t=e.cellSize,r=e.days,n=t!==void 0?t:11,i=vNe(r);if(i.length===0)return null;let o=bNe(r),a=r[0],s=r[r.length-1|0],l=a!==void 0&&s!==void 0?xo(a.time)+" – "+xo(s.time):"";return L("div",{children:[_("div",{children:L("div",{children:[_("div",{children:Il(7,c=>_("span",{children:_Ne(c)},c.toString())),className:uNe(n)}),_("div",{children:i.map((c,d)=>c.map((f,h)=>f!==void 0?_("div",{className:dNe(Jz(f.value,o)),title:Ps(f.time)+" "+xo(f.time)+": "+JD(f.value)},f.time.toString()):_("div",{className:fNe},"b:"+d.toString()+":"+h.toString()))),className:cNe(n)})],className:lNe}),className:sNe}),L("div",{children:[_("span",{children:l}),L("span",{children:["less",Qz.map(c=>_("span",{className:mNe(c)},c.toString())),"more (max "+JD(o)+")"],className:pNe})],className:hNe})],className:aNe})}let xNe=yNe;function qi(e){return"var("+e+")"}let SNe=E([z("flex"),_e("column"),u("gap","2px")]),wNe=E([z("flex"),_e("column"),u("gap","3px")]),ENe=E([z("flex"),et("spaceBetween"),X("baseline"),u("gap",qi(O.sm)),u("font-size",qi($.sizeSm))]),kNe=E([u("color",qi(x.textPrimary))]),CNe=E([u("color",qi(x.textPrimary)),u("font-weight",qi($.weightMedium)),u("white-space","nowrap")]),RNe=E([u("color",qi(x.textSecondary)),u("font-weight",qi($.weightNormal))]),ANe=E([u("background",qi(x.surfaceSubtle)),u("border-radius",qi(Y.sm)),u("height","14px"),Bs("hidden")]);function $Ne(e,t){return E([u("background",t),u("border-radius",qi(Y.sm)),u("height","100%"),u("width",e.toString()+"%"),u("min-width",e>0?"2px":"0")])}let TNe=E([u("padding","2px 0 4px"),u("font-size",qi($.sizeXs)),u("color",qi(x.textDisabled))]),NNe=E([u("padding-top","4px"),u("font-size",qi($.sizeXs)),u("color",qi(x.textDisabled))]);function QD(e,t){return t<=0?0:Math.round(e/t*1e3)/10}function DNe(e){return e===Math.trunc(e)?Math.trunc(e).toString():e.toString()}function FNe(e){let t=ne(e[0],0,r=>r.value);return e.map((r,n)=>{let i=e[n-1|0];return{conversion:QD(r.value,t),dropOff:i!==void 0&&i.value>0&&r.value<i.value?QD(i.value-r.value,i.value):void 0}})}function INe(e){let t=e.stages;if(t.length===0)return null;let r=e.note,n=FNe(t),i=ne(t[0],0,o=>o.value);return L("div",{children:[t.map((o,a)=>{let s=n[a],l=i<=0?0:o.value/i*100,c=k(s,d=>d.dropOff);return L("div",{children:[c!==void 0?_("div",{children:"↓ "+c.toString()+"% drop-off",className:TNe}):null,L("div",{children:[L("div",{children:[_("span",{children:o.label,className:kNe}),L("span",{children:[DNe(o.value),a===0?null:_("span",{children:" · "+ne(s,0,d=>d.conversion).toString()+"%",className:RNe})],className:CNe})],className:ENe}),_("div",{children:_("div",{className:$Ne(l,D(o.color,"var("+x.brand+")"))}),className:ANe})],className:wNe})]},o.label+":"+a.toString())}),r!==void 0?_("div",{children:r,className:NNe}):null],className:SNe})}let PNe=INe;function Fh(e){return"var("+e+")"}let ONe=E([z("flex"),_e("column"),u("gap","2px")]),MNe=E([z("flex"),u("gap","4px")]),q7=[u("font-size",Fh($.sizeXs)),u("color",Fh(x.textDisabled)),u("white-space","nowrap")],LNe=E(q7.concat([z("flex"),_e("column"),et("spaceBetween"),u("text-align","right")]));function zNe(e){return E(q7.concat([z("flex"),et("spaceBetween"),u("margin-left",e.toString()+"px")]))}let UNe=E([z("flex"),et("spaceBetween"),u("gap",Fh(O.sm)),u("font-size",Fh($.sizeXs)),u("color",Fh(x.textSecondary))]);function BNe(e){let t=e[0];if(t!==void 0)return nt(e,{xMin:t.x,xMax:t.x,yMin:t.y,yMax:t.y},(r,n)=>({xMin:n.x<r.xMin?n.x:r.xMin,xMax:n.x>r.xMax?n.x:r.xMax,yMin:n.y<r.yMin?n.y:r.yMin,yMax:n.y>r.yMax?n.y:r.yMax}))}function Hr(e){return(Math.round(e*100)/100).toString()}function YD(e,t,r){return r<=t?.5:(e-t)/(r-t)}function jNe(e){let t=e.height,r=e.width,n=e.yLabel,i=e.xLabel,o=e.points,a=r!==void 0?r:320,s=t!==void 0?t:200,l=BNe(o);if(l===void 0)return null;let c=3.5+1,d=a-c*2,f=s-c*2,h,p=0;return i!==void 0||n!==void 0?p=1:h=null,p===1&&(h=L("div",{children:[_("span",{children:"↑ "+D(n,"y")}),_("span",{children:D(i,"x")+" →"})],className:UNe})),L("div",{children:[L("div",{children:[L("div",{children:[_("span",{children:Hr(l.yMax)}),_("span",{children:Hr(l.yMin)})],className:LNe,style:{width:"34px"}}),L("svg",{children:[_("line",{stroke:"var("+x.borderSubtle+")",strokeWidth:"1",x1:Hr(c),x2:Hr(a-c),y1:Hr(s-c),y2:Hr(s-c)}),_("line",{stroke:"var("+x.borderSubtle+")",strokeWidth:"1",x1:Hr(c),x2:Hr(c),y1:Hr(c),y2:Hr(s-c)}),o.map((m,g)=>{let v=c+YD(m.x,l.xMin,l.xMax)*d,b=c+(1-YD(m.y,l.yMin,l.yMax))*f;return _("circle",{children:_("title",{children:m.label+" — "+D(i,"x")+": "+Hr(m.x)+", "+D(n,"y")+": "+Hr(m.y)}),cx:Hr(v),cy:Hr(b),fill:D(m.color,"var("+x.brand+")"),fillOpacity:"0.75",r:Hr(3.5)},m.label+":"+g.toString())})],style:{display:"block",height:"auto",maxWidth:"100%",minWidth:"0"},height:Hr(s),width:Hr(a),viewBox:"0 0 "+Hr(a)+" "+Hr(s)})],className:MNe}),L("div",{children:[_("span",{children:Hr(l.xMin)}),_("span",{children:Hr(l.xMax)})],className:zNe(38)}),h],className:ONe})}let qNe=jNe;function ua(e){return"var("+e+")"}let VNe=E([z("flex"),_e("column"),u("gap","6px"),yn(ke(0)),u("padding","0"),u("list-style","none")]),V7=[z("grid"),u("grid-template-columns","1.5rem 1fr auto"),X("center"),u("gap",ua(O.sm)),u("font-size",ua($.sizeSm)),u("color",ua(x.textPrimary))],GNe=E(V7),KNe=E(V7.concat([Re("pointer"),u("background","transparent"),u("border","none"),u("padding","2px 0"),u("text-align","left"),u("width","100%"),u("font","inherit"),Ue([u("color",ua(x.brand))])])),HNe=E([u("align-self","start"),u("font-size",ua($.sizeXs)),u("color",ua(x.textDisabled)),u("text-align","right"),u("font-variant-numeric","tabular-nums")]),WNe=E([z("flex"),_e("column"),u("gap","3px"),$w(ke(0))]),JNe=E([u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),QNe=E([u("background",ua(x.surfaceSubtle)),u("border-radius",ua(Y.sm)),u("height","6px"),Bs("hidden")]);function YNe(e){return E([u("background",ua(x.brand)),u("border-radius",ua(Y.sm)),u("height","100%"),u("width",e.toString()+"%"),u("min-width",e>0?"2px":"0")])}let XNe=E([u("align-self","start"),u("font-weight",ua($.weightMedium)),u("white-space","nowrap"),u("font-variant-numeric","tabular-nums")]);function ZNe(e,t){return t<=0||e<=0?0:e/t*100}function e3e(e){let t=e.limit,r=t!==void 0?t:10,n=e.entries.slice(0,r);if(n.length===0)return null;let i=nt(n,0,(o,a)=>a.value>o?a.value:o);return _("ol",{children:n.map((o,a)=>{let s=L(Bt,{children:[_("span",{children:(a+1|0).toString(),className:HNe}),L("span",{children:[_("span",{children:o.label,className:JNe,title:o.label}),_("span",{children:_("span",{className:YNe(ZNe(o.value,i))}),className:QNe})],className:WNe}),_("span",{children:o.display,className:XNe})]}),l=o.onOpen;return _("li",{children:l!==void 0?_("button",{children:s,className:KNe,type:"button",onClick:c=>l()}):_("div",{children:s,className:GNe})},o.key)}),className:VNe})}let t3e=e3e;function r3e(e){return nt(e.segments,0,(t,r)=>t+(r.value>0?r.value:0))}function n3e(e){let t=e.height,r=e.width,n=e.bars,i=r!==void 0?r:320,o=t!==void 0?t:120;if(n.length===0)return null;let a=nt(n,0,(f,h)=>{let p=r3e(h);return f>p?f:p}),s=a===0?1:a,l=n.length,c=(i-2*(l+1|0))/l,d=o-4;return _("svg",{children:n.map((f,h)=>{let p=2+h*(c+2),m={contents:o};return _("g",{children:f.segments.map((g,v)=>{let b=g.value>0?g.value:0,y=b/s*d,S=m.contents-y;return m.contents=S,b===0?null:_("rect",{children:_("title",{children:f.label+" — "+g.key+": "+b.toString()}),height:y.toString(),width:c.toString(),fill:D(g.color,"var("+x.brand+")"),x:p.toString(),y:S.toString()},g.key+":"+v.toString())})},f.label+":"+h.toString())}),style:{display:"block",height:"auto",maxWidth:"100%"},height:o.toString(),width:i.toString(),viewBox:"0 0 "+i.toString()+" "+o.toString()})}let i3e=n3e;function Tr(e){return"var("+e+")"}let o3e=E([z("flex"),_e("column"),u("gap",Tr(O.lg))]),a3e=E([u("font-size",Tr($.sizeXl)),u("font-weight",Tr($.weightMedium)),u("color",Tr(x.textPrimary)),yn(ke(0))]),s3e=E([z("grid"),u("grid-template-columns","repeat(auto-fill, minmax(300px, 1fr))"),u("gap",Tr(O.md))]),Wc=E([z("flex"),_e("column"),u("gap",Tr(O.sm)),u("padding",Tr(O.lg)),u("background",Tr(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Tr(Y.md))]),Jc=E([u("font-size",Tr($.sizeSm)),u("font-weight",Tr($.weightMedium)),u("color",Tr(x.textSecondary))]),l3e=E([z("flex"),X("center"),u("gap",Tr(O.lg))]),XD=E([z("flex"),_e("column"),u("gap","4px"),u("font-size",Tr($.sizeSm)),u("color",Tr(x.textSecondary))]),ZD=E([z("flex"),X("center"),u("gap","6px")]);function eF(e){return E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let tF=E([u("font-size",Tr($.sizeXs)),u("color",Tr(x.textDisabled))]),u3e=E([z("flex"),et("spaceBetween"),X("center"),u("gap",Tr(O.sm))]),c3e=E([z("inlineFlex"),u("gap",Tr(O.xs))]);function d3e(e){return E([u("background",e?Tr(x.surfaceSubtle):"transparent"),u("border","1px solid var("+x.border+")"),u("border-radius",Tr(Y.sm)),u("padding","2px var("+O.sm+")"),u("font-size",Tr($.sizeXs)),u("color",Tr(e?x.textPrimary:x.textSecondary)),Re("pointer")])}function yv(e,t){return k(F(e,t),r=>{let n=zi(r);return n!==void 0?n:q(yb(r),i=>ule(i[0],i[1]))})}function pm(e){return e.map(t=>D(G(t),{}))}function KS(e,t,r){switch(t){case"avg":case"sum":break;default:return e.length}if(r===void 0)return e.length;let n=Q(pm(e),o=>yv(o,r)),i=nt(n,0,(o,a)=>o+a);return t==="sum"?i:n.length===0?0:i/n.length}function xv(e){let t=Math.round(e*100)/100;return t===Math.trunc(t)?Math.trunc(t).toString():t.toString()}function f3e(e,t,r){return qO(e,r&&(t==="count"||t==="sum"))}function h3e(e,t,r,n){return r?t==="avg"?e+" · avg of the first "+n.toString()+" loaded":e+" · over the first "+n.toString()+" loaded":e}function hs(e){let t=D(e.aggregate,"count"),r=e.label;if(r!==void 0)return r;let n=e.field;switch(t){case"avg":return n!==void 0?e.view+" — avg "+pt(n):e.view;case"sum":return n!==void 0?e.view+" — total "+pt(n):e.view;default:return e.view}}function G7(e,t,r,n){let i=Il(r,o=>[]);return pm(e).forEach(o=>ee(k(nc(t,o),Qn),a=>{let s=Math.floor((n-a)/864e5)|0;if(s>=0&&s<r)return ee(i[(r-1|0)-s|0],l=>{l.push(o)})})),i}function HS(e,t,r,n,i,o){return G7(e,t,r,n).map(a=>KS(a.map(s=>s),i,o))}function K7(e,t){return Q(pm(e),r=>wa(r,t))}function H7(e,t,r){let n=fo(t,r),i=nt(e.filter(o=>!n.includes(o)),[],(o,a)=>o.includes(a)?o:o.concat([a]));return n.concat(i)}function p3e(e,t,r){let n=K7(e,r);return Q(H7(n,t,r),i=>{let o=n.filter(a=>a===i).length;if(o!==0)return{label:pt(i),value:o}})}function W7(e){return _v[Fo(e,_v.length)]}function m3e(e,t,r,n,i,o){let a=G7(e,t,r,n),s=f=>Q(f,h=>wa(h,o)),l=a.flatMap(s),c=H7(l,i,o).filter(f=>l.some(h=>h===f)),d=a.map((f,h)=>{let p=s(f);return{label:Ps(n-((r-1|0)-h|0)*864e5),segments:c.map((m,g)=>({key:pt(m),value:p.filter(v=>v===m).length,color:W7(g)}))}});return{statuses:c,bars:d}}function g3e(e,t,r){let n=fo(t,r),i=K7(e,r),o=Q(i,a=>{let s=n.indexOf(a);if(!(s<0))return s});return{stages:n.map((a,s)=>({label:pt(a),value:o.filter(l=>l>=s).length})),excluded:i.length-o.length|0}}function v3e(e,t){return q(Dr(e).find(r=>r[0]===t),r=>r[1])}function J7(e,t){return q(F(e.semantics,t),r=>r.semantic)}function b3e(e,t,r){let n=v3e(e,t);if(n===void 0)return;let i=jh(n,"maximum");if(i===void 0)return Ce(J7(r,t),"Percent")?{min:0,max:100}:void 0;let o=D(jh(n,"minimum"),0);if(i>o)return{min:o,max:i}}function rF(e,t,r){let n=J7(e,t);if(n===void 0)return xv(r);switch(n){case"Percent":return U8(r);case"Bytes":return B8(r);case"Duration":return VE(r);case"Currency":case"Money":return qE(r);default:return xv(r)}}function _3e(e,t,r,n){return Q(pm(e),i=>q(yv(i,t),o=>{let a=D(k(F(i,"id"),ie),"");return{id:a,label:D(k(F(i,r),ie),a===""?"—":a),value:o}})).toSorted((i,o)=>o.value-i.value).slice(0,n)}function y3e(e,t,r,n){return Q(pm(e),i=>{let o=yv(i,t),a=yv(i,r);if(o!==void 0&&a!==void 0)return{label:D(k(F(i,n),ie),D(k(F(i,"id"),ie),"—")),x:o,y:a}})}function x3e(e,t,r,n,i,o){return HS(e,t,r,n,i,o).map((a,s)=>({time:vi(n-((r-1|0)-s|0)*FM),value:a}))}function S3e(e){let t=ce(()=>"Days30"),r=t[1],n=t[0],i=(a,s)=>_("button",{children:s,className:d3e(n===a),type:"button",onClick:l=>r(c=>a)}),o;return o=n==="Days30"?e.body:_(xNe,{days:e.yearDays}),L("div",{children:[L("div",{children:[_("span",{children:e.title,className:Jc}),L("div",{children:[i("Days30","30 days"),i("Year","Year")],className:c3e})],className:u3e}),o],className:Wc})}function w3e(e){let t=e.viewAccess,r=e.mockRows,n=e.uiHints,i=e.readModels,o=e.metrics,a=e.pluginId,s=t!==void 0?t:{},l=zs(),c=Ks(),d=Q(nt(o.map(P=>P.view),[],(P,B)=>P.includes(B)?P:P.concat([B])),P=>i.find(B=>B.name===P)),f=d.map(P=>{let B=dv(s,P.name,c),j=ec(P,B&&ir(r));return[P,B,j]}),h=P=>r!==void 0?D(F(r,P),[]):ne(f.find(B=>B[0].name===P),[],B=>B[2].rows),p=P=>r!==void 0?!1:ne(f.find(B=>B[0].name===P),!1,B=>B[2].canLoadMore),m=Date.now(),g=Q(o,P=>q(d.find(B=>B.name===P.view?dv(s,B.name,c):!1),B=>({metric:P,readModel:B,rows:h(B.name),partial:p(B.name),semantics:_n(B.schema,k(n,j=>Ya(j,B.name)),{field:B.labelField,source:B.labelFieldSource})}))),v=g.map((P,B)=>{let j=D(P.metric.aggregate,"count"),W=q(P.semantics.dateSpan,te=>HS(P.rows,te,14,m,j,P.metric.field));return{key:B.toString()+":"+P.readModel.name,label:hs(P.metric),value:f3e(xv(KS(P.rows,j,P.metric.field)),j,P.partial),sublabel:h3e(P.readModel.name,j,P.partial,P.rows.length),spark:W,onOpen:()=>l(bs(cl(a,P.readModel.name)))}}),b=P=>{let B=P.readModel.lifecycleField;return B!==void 0?B:P.semantics.statusField},y=Q(g,P=>q(P.semantics.dateSpan,B=>{let j=D(P.metric.aggregate,"count"),W=hs(P.metric)+" — trend",te=b(P),J;if(j==="count"&&te!==void 0){let se=m3e(P.rows,B,30,m,P.readModel.schema,te),pe=se.statuses;J=pe.length===0?void 0:L(Bt,{children:[_(i3e,{bars:se.bars}),_("div",{children:pe.map((K,oe)=>L("span",{children:[_("span",{className:eF(W7(oe))}),pt(K)],className:ZD},K)),className:XD})]})}else J=void 0;let re;if(J!==void 0)re=J;else{let se=HS(P.rows,B,30,m,j,P.metric.field);re=_(JTe,{series:[{label:hs(P.metric),values:se}]})}return _(S3e,{title:W,body:re,yearDays:x3e(P.rows,B,365,m,j,P.metric.field)},"trend:"+hs(P.metric))})),S=Q(g,P=>{let B=P.metric.aggregate,j=P.metric.field;if(B==="avg"&&j!==void 0)return q(b3e(P.readModel.schema,j,P.semantics),W=>{let te=KS(P.rows,"avg",j);return L("div",{children:[_("span",{children:hs(P.metric),className:Jc}),_(oNe,{value:te,min:W.min,max:W.max,display:rF(P.semantics,j,te),caption:P.readModel.name+" · "+pt(j)})],className:Wc},"gauge:"+hs(P.metric))})}),w=[],C=Q(g,P=>{let B=P.metric.aggregate,j=P.metric.field;if(B===void 0)return;switch(B){case"avg":case"sum":break;default:return}if(j===void 0||w.includes(P.readModel.name+":"+j))return;w.push(P.readModel.name+":"+j);let W=_3e(P.rows,j,P.readModel.labelField,10).map(te=>({key:te.id===""?te.label:te.id,label:te.label,display:rF(P.semantics,j,te.value),value:te.value,onOpen:te.id===""?void 0:()=>l(Ka(a,P.readModel.name,te.id,[]))}));if(W.length!==0)return L("div",{children:[_("span",{children:P.readModel.name+" — top by "+pt(j),className:Jc}),_(t3e,{entries:W})],className:Wc},"top:"+P.readModel.name+":"+j)}),A=Q(g,P=>{let B=P.metric.viz,j=P.metric.field,W=P.metric.xField;if(B===void 0||B!=="scatter"||j===void 0||W===void 0)return;let te=y3e(P.rows,W,j,P.readModel.labelField);if(te.length!==0)return L("div",{children:[_("span",{children:P.readModel.name+" — "+pt(j)+" by "+pt(W),className:Jc}),_(qNe,{points:te,xLabel:pt(W),yLabel:pt(j)})],className:Wc},"scatter:"+hs(P.metric))}),T=Q(g,P=>{let B=P.metric.viz,j=b(P);if(B===void 0||B!=="funnel"||j===void 0)return;let W=g3e(P.rows,P.readModel.schema,j),te=W.stages;if(te.length===0)return;let J=W.excluded;return L("div",{children:[_("span",{children:hs(P.metric)+" — "+pt(j)+" funnel",className:Jc}),_(PNe,{stages:te,note:J===0?void 0:J.toString()+" row(s) with an unlisted "+pt(j)+" excluded"})],className:Wc},"funnel:"+hs(P.metric))}),R=Q(g,P=>{let B=D(P.metric.aggregate,"count"),j=Ce(P.metric.viz,"funnel")?void 0:b(P);if(B!=="count"||j===void 0)return;let W=p3e(P.rows,P.readModel.schema,j);if(W.length!==0)return L("div",{children:[_("span",{children:P.readModel.name+" — by "+pt(j),className:Jc}),L("div",{children:[_(YTe,{slices:W}),_("div",{children:W.map((te,J)=>L("span",{children:[_("span",{className:eF(j7(te,J))}),te.label+" ("+xv(te.value)+")"],className:ZD},te.label)),className:XD})],className:l3e})],className:Wc},"status:"+P.readModel.name)}),N=(Ee(r)?[]:Q(f,P=>{let B=P[0],j=P[2].fetchState;if(P[1])return typeof j!="object"?j==="Loading"?B.name+": loading…":void 0:(j.TAG,B.name+": "+j._0)})).concat(Rk(s,d.map(P=>P.name),c)),I=[T,A,S,y,C,R].flatMap(P=>P),M=nt(Q(g,P=>{if(P.partial)return P.readModel.name}),[],(P,B)=>P.includes(B)?P:P.concat([B]));return L("div",{children:[_("h2",{children:"Dashboard",className:a3e}),_(jTe,{kpis:v}),I.length!==0?_("div",{children:I,className:s3e}):null,M.length!==0?_("span",{children:"Figures cover the rows loaded for: "+M.join(", "),className:tF}):null,N.length!==0?_("span",{children:N.join(" · "),className:tF}):null],className:o3e})}let E3e=w3e;function Q7(e){return"explicit-ref-same-plugin"}function k3e(e){switch(e){case"PlatformSuppliedField":return"platform-supplied-field";case"NewEntityIdentity":return"new-entity-identity";case"SelfReference":return"self-reference";case"AlreadyPlaced":return"already-placed";case"NarrowerRefTarget":return"narrower-ref-target";case"OptionalField":return"optional-field";case"SystemCommand":return"system-command"}}function C3e(e){switch(e){case"PlatformSuppliedField":return"the field is @owner — the resolver overwrites it with the caller's id";case"NewEntityIdentity":return"the field is the new entity's own id, minted at submit";case"SelfReference":return"the command's own aggregate is this view — it is already an Instance command";case"AlreadyPlaced":return"this view already offers the command";case"NarrowerRefTarget":return"an explicit @ref names a different view, so this one is wider than the command accepts";case"OptionalField":return"the field is optional, so the command is not about the row";case"SystemCommand":return"the command is platform-run, never clicked"}}function Bb(e){return Ee(e.tier)?e.vetoes.length===0:!1}function Y7(e){return e.vetoes.length!==0}function X7(e){return ir(e.tier)?e.vetoes.length===0:!1}function R3e(e){return e.flatMap(t=>{let r=(o,a,s,l)=>s.map(c=>({pluginId:t.id,slice:o,command:c,enclosingAggregate:a,system:l})),n=t.aggregates.flatMap(o=>r(o.name,o,o.commands,!1).concat(r(o.name,o,D(o.systemCommands,[]),!0))),i=t.stateChangeSlices.flatMap(o=>r(o.name,void 0,o.commands,!1).concat(r(o.name,void 0,D(o.systemCommands,[]),!0)));return n.concat(i)})}function A3e(e){return ne(k(k(G(e),t=>F(t,"properties")),G),[],t=>Q(Te(t),r=>{let n=r[0],i=G(r[1]),o=Ee(k(i,l=>F(l,"const"))),a=k(k(i,l=>F(l,"type")),ie),s=k(k(k(k(i,l=>F(l,"items")),G),l=>F(l,"type")),ie);if(!o&&a!==void 0)switch(a){case"array":return s==="string"?n:void 0;case"string":return n;default:return}}))}function $3e(e,t,r){return q(e.references.find(n=>n.fieldName===t),n=>{let i=n.plugin,o=i!==void 0?r.filter(s=>s.pluginId===i):r,a=hM(o,n.entity);return a!==void 0?a:jo(o,n.entity)})}function T3e(e,t){return k(Qa(e),r=>jo(t,r))}function N3e(e){let t=e.command.aggregateIdField;if(t!==void 0)return D(Qa(t),t);let r=e.enclosingAggregate;return r!==void 0?r.name:e.slice}function D3e(e,t,r,n,i,o){let a=[];Ce(e.command.ownerField,r)&&a.push("PlatformSuppliedField");let s=e.enclosingAggregate,l=Qa(r),c=s!==void 0&&l!==void 0?l.toLowerCase()===s.name.toLowerCase():!1;return e.command.level==="Collection"&&(Ce(e.command.aggregateIdField,r)||c)&&a.push("NewEntityIdentity"),Yu(N3e(e),o,{pluginId:t.pluginId,viewName:t.name})&&a.push("SelfReference"),t.placed.some(d=>d===e.command.name)&&a.push("AlreadyPlaced"),i&&a.push("NarrowerRefTarget"),n.some(d=>d===r)||a.push("OptionalField"),e.system&&a.push("SystemCommand"),a}function F3e(e,t,r,n,i){let o=R3e(t),a=i!==void 0?i:Ob,s=[];return o.forEach(l=>{let c=Mb(l.command.schema);A3e(l.command.schema).forEach(d=>{let f=$3e(l.command,d,n),h=T3e(d,n),p;if(f!==void 0){let m=kt(f),g=0;m!==void 0&&h!==void 0&&m.pluginId===h.pluginId&&m.name===h.name?p=[[m,!0]]:g=1,g===1&&(p=[[m,!0],[h,!1]])}else p=[[h,!1]];p.forEach(m=>{let g=m[1];ee(m[0],v=>{e.filter(b=>b.pluginId===v.pluginId?b.name===v.name:!1).forEach(b=>{let y=D3e(l,b,d,c,!g&&Ee(f),n),S=g&&l.pluginId===b.pluginId?"ExplicitRefSamePlugin":void 0,w=Ee(S)&&y.length===0?a(l.command,l.enclosingAggregate,l.pluginId):l.command;s.push({viewName:b.name,action:{label:w.label,pluginId:l.pluginId,slice:l.slice,command:w,field:d},tier:S,vetoes:y})})})})})}),s}function Z7(e,t){return e.filter(r=>r.viewName===t)}function I3e(e,t){return Z7(e,t).filter(Bb).map(r=>r.action)}let eU={actor:"",eventType:"",timeFrom:"",timeTo:""};function nF(e){return e.actor!==""||e.eventType!==""||e.timeFrom!==""?!0:e.timeTo!==""}function Dn(e){return"var("+e+")"}let P3e=E([z("flex"),_e("column"),u("gap",Dn(O.sm))]),O3e=E([z("flex"),X("center"),u("gap",Dn(O.md)),xi("wrap"),u("padding-bottom",Dn(O.xs)),u("border-bottom","1px solid var("+x.border+")")]),M3e=E([z("flex"),X("center"),u("gap","4px")]),iF=E([u("color",Dn(x.textSecondary)),u("font-size",Dn($.sizeSm)),u("white-space","nowrap")]),oF=E([u("background",Dn(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Dn(Y.sm)),u("padding","2px var("+O.sm+")"),u("font-size",Dn($.sizeSm)),u("color",Dn(x.textPrimary)),u("outline","none"),qs([u("border-color",Dn(x.brand))])]),L3e=E([u("background","none"),u("border","none"),u("padding","0"),u("color",Dn(x.brand)),u("font-size",Dn($.sizeSm)),Re("pointer"),Ue([u("text-decoration","underline")])]),z3e=E([z("flex"),et("center"),u("padding-top",Dn(O.xs))]),U3e=E([u("background",Dn(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Dn(Y.sm)),u("padding","4px var("+O.md+")"),u("font-size",Dn($.sizeSm)),u("color",Dn(x.textPrimary)),Re("pointer"),Ue([u("border-color",Dn(x.brand))])]);function B3e(e){let t=e.emptyLabel,r=e.onLoadMore,n=e.loading,i=e.hasMore,o=e.onFilterChange,a=e.filter,s=i!==void 0?i:!1,l=n!==void 0?n:!1,c=t!==void 0?t:"No recorded history for this record",d=Q([["actor","Actor",e.actors.map(h=>({label:h,value:h})),a.actor],["eventType","Event",e.eventTypes.map(h=>({label:pt(h),value:h})),a.eventType]],h=>{let p=h[2];if(p.length!==0)return{key:h[0],label:h[1],options:p,value:h[3]}});return L("div",{children:[L("div",{children:[_(V9,{filters:d,onFilterChange:(h,p)=>{switch(h){case"actor":return o({actor:p,eventType:a.eventType,timeFrom:a.timeFrom,timeTo:a.timeTo});case"eventType":return o({actor:a.actor,eventType:p,timeFrom:a.timeFrom,timeTo:a.timeTo});default:return}}}),L("div",{children:[_("span",{children:"From:",className:iF}),_("input",{className:oF,type:"date",value:a.timeFrom,onChange:h=>o({actor:a.actor,eventType:a.eventType,timeFrom:h.target.value,timeTo:a.timeTo})}),_("span",{children:"To:",className:iF}),_("input",{className:oF,type:"date",value:a.timeTo,onChange:h=>o({actor:a.actor,eventType:a.eventType,timeFrom:a.timeFrom,timeTo:h.target.value})})],className:M3e}),nF(a)?_("button",{children:"Clear filters",className:L3e,onClick:h=>o(eU)}):null],className:O3e}),_($2e,{entries:e.entries,emptyLabel:nF(a)?"No events match these filters":c,onEntryClick:e.onEntryClick,nowMs:e.nowMs}),s?_("div",{children:_("button",{children:l?"Loading…":"Load earlier events",className:U3e,disabled:l,onClick:h=>ee(r,p=>p())}),className:z3e}):null],className:P3e})}let j3e=B3e;function q3e(e){if(e!=="")return e+"T00:00:00.000Z"}function V3e(e){if(e!=="")return e+"T23:59:59.999Z"}function G3e(e,t,r){let n={};return n.entityId=e,n.first=50,ee(r,i=>{n.after=i}),t.actor!==""&&(n.user=t.actor),t.eventType!==""&&(n.eventTypes=[t.eventType]),ee(q3e(t.timeFrom),i=>{n.timeFrom=i}),ee(V3e(t.timeTo),i=>{n.timeTo=i}),n}function K3e(e){let t=e.entityId,r=e.binding,n=li(),i=Ks(),o=ne(e.requiredAccess,!1,P=>!i(P)),a=ce(()=>[]),s=a[1],l=a[0],c=ce(()=>eU),d=c[1],f=c[0],h=ce(()=>!0),p=h[1],m=ce(()=>{}),g=m[1],v=m[0],b=ce(()=>!1),y=b[1],w=ce(()=>{})[1],C=ce(()=>0),A=C[1],T=C[0],R=Ne(void 0),N=f.actor+"|"+f.eventType+"|"+f.timeFrom+"|"+f.timeTo;Ae(()=>{if(!o)if(n!==void 0){let P=T===0,B=P?void 0:R.current;p(j=>!0),g(j=>{}),Mt(n(r.queryDocument,G3e(t,f,B)).then(j=>{let W=Lye(j,r.queryField),te=zye(j,r.queryField),J=te[1],re=te[0];return s(se=>P?W:W.concat(se)),y(se=>re),w(se=>J),R.current=J,p(se=>!1),Promise.resolve()}),j=>(p(W=>!1),g(W=>"Could not load the history for this record."),Promise.resolve()))}else g(P=>"Not connected")},[N,T,o]);let I=P=>{R.current=void 0,A(B=>0),s(B=>[]),d(B=>P)},M=()=>A(P=>P+1|0);return o?null:v!==void 0?_(Pa,{title:"History unavailable",detail:v,onRetry:()=>A(P=>P+1|0)}):_(j3e,{entries:Vye(l,r.displayName),actors:Gye(l),eventTypes:Kye(l),filter:f,onFilterChange:I,hasMore:b[0],loading:h[0],onLoadMore:M})}let H3e=K3e;function ni(e){return"var("+e+")"}let W3e=E([z("flex"),_e("column"),u("gap",ni(O.lg))]),J3e=E([z("flex"),X("center"),et("spaceBetween"),u("gap",ni(O.md))]),Q3e=E([u("font-size",ni($.sizeXl)),u("font-weight",ni($.weightMedium)),u("color",ni(x.textPrimary)),yn(ke(0))]),Y3e=E([z("flex"),xi("wrap"),X("center"),u("gap",ni(O.md)),u("font-size",ni($.sizeSm)),u("color",ni(x.textSecondary))]),X3e=E([z("inlineFlex"),X("center"),u("gap","4px"),Re("pointer")]);function Z3e(e){return E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let aF=E([u("font-size",ni($.sizeXs)),u("color",ni(x.textDisabled))]),eDe=E([z("flex"),X("center"),u("gap",ni(O.sm))]),tDe=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",ni(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",ni(x.textSecondary)),u("font-size",ni($.sizeSm)),Re("pointer"),Ue([u("background",ni(x.surfaceSubtle)),u("color",ni(x.textPrimary))])]);function rDe(e){let t=e.viewAccess,r=e.uiHints,n=e.readModels,i=e.pluginId,o=t!==void 0?t:{},a=zs(),s=Ks(),l=li(),c=Zp(),d=va(),f=Jk(),h=ce(()=>[]),p=h[1],m=h[0],g=n.map((C,A)=>{let T=dv(o,C.name,s),R=T&&!m.includes(C.name),N=ec(C,R);return[C,A,R,T,N]}),v=(C,A)=>D(k(k(r,T=>hn(T,C.name)),T=>T.accent),qd[Fo(A,qd.length)]),b=Q(g,C=>{let A=C[4],T=C[0],R=k(r,P=>hn(P,T.name)),N=_n(T.schema,k(r,P=>Ya(P,T.name)),{field:T.labelField,source:T.labelFieldSource}),I=q(N.statusField,P=>Lb(P,T.commands,k(R,B=>B.transitions))),M=Qk(l,c,T.commands,T.name,A.isLive,A.refetch,d,f.onNotice,void 0);if(C[2])return{readModelName:T.name,rows:A.rows,schema:T.schema,semantics:N,accent:v(T,C[1]),window:zh(A.canLoadMore),onOpenRow:(P,B)=>a(Ka(i,T.name,P,[])),onCommand:q(I,P=>M),statusCommandFor:I,ownEntity:{pluginId:i,viewName:T.name}}}),y=Q(g,C=>{if(C[2]&&C[4].canLoadMore)return C[0].name}),S=()=>{g.forEach(C=>{let A=C[4];if(C[2]&&A.canLoadMore)return A.loadMore()})},w=Q(g,C=>{let A=C[0],T=C[4].fetchState;if(C[2])return typeof T!="object"?T==="Loading"?A.name+": loading…":void 0:(T.TAG,A.name+": "+T._0)}).concat(Rk(o,n.map(C=>C.name),s));return L("div",{children:[_("div",{children:_("h2",{children:e.canvasName,className:Q3e}),className:J3e}),_("div",{children:g.filter(C=>C[3]).map(C=>{let A=C[0];return L("label",{children:[_("input",{checked:C[2],type:"checkbox",onChange:T=>{let R=A.name;p(N=>N.includes(R)?N.filter(I=>I!==R):N.concat([R]))}}),_("span",{className:Z3e(v(A,C[1]))}),A.name],className:X3e},A.name)}),className:Y3e}),f.element,e.mode.render(b),y.length!==0?L("div",{children:[_("button",{children:"Load more",className:tDe,onClick:C=>S()}),_("span",{children:"More rows available: "+y.join(", "),className:aF})],className:eDe}):null,w.length!==0?_("span",{children:w.join(" · "),className:aF}):null],className:W3e})}let nDe=rDe;function yr(e){return"var("+e+")"}let iDe=E([z("flex"),_e("column"),u("gap",yr(O.lg)),u("padding","0 var("+O.md+")"),u("min-width","0")]),oDe=E([z("flex"),X("center"),u("gap",yr(O.sm)),rn(0)]),aDe=E([z("flex"),_e("column"),u("gap",yr(O.sm)),u("min-width","0")]),Zy=E([z("flex"),X("start"),u("gap",yr(O.md)),u("padding","var("+O.xs+") 0"),u("border-bottom","1px solid var("+x.borderSubtle+")"),BO([u("border-bottom","none")])]),e1=E([u("color",yr(x.textSecondary)),u("font-size",yr($.sizeMd)),u("font-weight",yr($.weightMedium)),u("white-space","nowrap"),u("padding-top","2px"),rn(0),u("min-width","200px")]),dg=E([u("color",yr(x.textPrimary)),u("font-size",yr($.sizeMd)),u("word-break","break-word"),u("min-width","0")]),sF=E([z("flex"),X("start"),u("gap",yr(O.md)),u("padding","var("+O.xs+") 0"),u("border-bottom","1px solid var("+x.borderSubtle+")"),BO([u("border-bottom","none")])]),lF=E([u("color",yr(x.textSecondary)),u("font-size",yr($.sizeMd)),u("font-weight",yr($.weightMedium)),u("padding-top","2px"),rn(0),u("min-width","200px")]),uF=E([z("flex"),_e("column"),u("gap",yr(O.sm)),si(1),u("padding",yr(O.md)),u("background",yr(x.surfaceSubtle)),u("border-radius",yr(Y.md)),u("border","1px solid var("+x.borderSubtle+")"),u("min-width","0")]),sDe=E([z("flex"),_e("column"),u("gap",yr(O.sm)),u("min-width","0")]),lDe=E([z("flex"),X("center"),et("spaceBetween"),u("gap",yr(O.md)),u("padding-bottom",yr(O.xs)),u("border-bottom","1px solid var("+x.borderSubtle+")")]),uDe=E([u("color",yr(x.textPrimary)),u("font-size",yr($.sizeMd)),u("font-weight",yr($.weightMedium))]),cF=E([u("overflow-x","auto"),u("max-width","100%"),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",yr(Y.md))]),Qc=E([u("color",yr(x.textDisabled)),u("font-size",yr($.sizeSm))]);function tU(e,t){return D(k(k(G(e),r=>F(r,"title")),ie),pt(t))}function dF(e){return k(k(G(e),t=>F(t,"type")),ie)}function fF(e){return k(k(G(e),t=>F(t,"format")),ie)}function cDe(e){return k(G(e),t=>F(t,"items"))}function hF(e){return Ee(k(k(G(e),t=>F(t,"properties")),G))}function dDe(e){let t=e.toLowerCase(),r=t.length;return r>2&&t.endsWith("id")&&t!=="id"?!0:r>3?t.endsWith("ids"):!1}function pF(e){let t=e.toLowerCase(),r=e.length,n=a=>{let s=a.length;if(r>s&&t.endsWith(a))return e.slice(0,r-s|0)},i=n("ids");if(i!==void 0)return i;let o=n("id");if(o!==void 0)return o}function fDe(e,t){let r=bn(t),n=dF(r),i=Wl(r);if(i!==void 0)return{TAG:"TaggedUnion",_0:i};if(n!==void 0)switch(n){case"array":let a=cDe(r);if(a===void 0)return"ArrayOfScalars";let s=dF(a);if(hF(a)||Ce(s,"object"))return{TAG:"ArrayOfObjects",_0:a};if(!Ce(s,"string"))return"ArrayOfScalars";let l=pF(e);return l!==void 0?{TAG:"EntityRefArray",_0:l}:"ArrayOfStrings";case"boolean":return"Bool";case"object":return hF(r)?{TAG:"NestedObject",_0:r}:{TAG:"Scalar",_0:"object",_1:void 0}}if(!dDe(e))return{TAG:"Scalar",_0:D(n,"string"),_1:fF(r)};let o=pF(e);return o!==void 0?{TAG:"EntityRef",_0:o}:{TAG:"Scalar",_0:D(n,"string"),_1:fF(r)}}function fg(e,t,r,n){let i=Ze(e);if(typeof i!="object")switch(i){case"JSONFalse":return _(oa,{variant:"Neutral",label:"false",dot:!1});case"JSONTrue":return _(oa,{variant:"Success",label:"true",dot:!1});case"JSONNull":return _("span",{children:"—",className:Qc})}else switch(i.TAG){case"JSONString":let o=i._0;return t==="date-time"?Kv(o):D(HO(r,o),o);case"JSONNumber":return i._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(e)}}function hDe(e){return D(q(Et(e),t=>t.map(r=>{let n=Ze(r);if(typeof n!="object")switch(n){case"JSONFalse":return"false";case"JSONTrue":return"true";case"JSONNull":return"—"}else switch(n.TAG){case"JSONString":return n._0;case"JSONNumber":return n._0.toString();case"JSONObject":case"JSONArray":return JSON.stringify(r)}})),[])}function mF(e){return D(q(Et(e),t=>Q(t,G)),[])}function rU(e,t){let r=k(F(e,"id"),ie);if(r!==void 0)return r;let n=k(F(e,"compositeId"),ie);return n!==void 0?n:"#"+t.toString()}function gF(e){return e.map((t,r)=>({key:rU(t,r),row:t}))}function pDe(e,t,r){for(;;){let n=t,i=n[0];if(i===void 0)return e;let o=e[e.length-1|0];if(o===void 0)return;let a=Ee(G(o.data)),s=Et(o.data),l;if(a){let c=D(G(o.data),{}),d=k(k(G(o.schema),p=>F(p,"properties")),G),f=k(d,p=>F(p,i)),h=F(c,i);l=h!==void 0&&f!==void 0?{data:h,schema:f,label:tU(f,i)}:void 0}else if(Ee(s)){let c=D(s,[]),d=D(k(G(o.schema),h=>F(h,"items")),o.schema),f=c.find((h,p)=>{let m=D(G(h),{});return rU(m,p)===i});l=f!==void 0?{data:f,schema:d,label:i}:void 0}else l=void 0;if(l===void 0)return;e.push(l),r.push(i),t=n.slice(1)}}function mDe(e,t){if(t!==void 0&&t!=="id")return k(k(k(G(e),r=>F(r,t)),ie),r=>{if(r!=="")return r})}function gDe(e,t){let r=e.filter(n=>da(n.key,t));return r.length===0?e:r}function vDe(e){let t=e.headerAccessory,r=e.entityPanel,n=e.uiHints,i=e.viewName,o=e.pluginId,a=e.drillPath,s=e.labelField,l=e.aggregateId,c=e.lifecycleField,d=e.rowActions,f=e.commands,h=e.rootLabel,p=e.schema,m=e.data,g=f!==void 0?f:[],v=d!==void 0?d:[],b=a!==void 0?a:[],y=li(),S=fm(),w=va(),C=Tp(),A=fTe(),T=Dz(),R=Y$e(),N=ne(R,!1,Se=>Se.placement==="Bar")&&Ee(T),I=o!==void 0&&i!==void 0?{pluginId:o,viewName:i}:void 0,M=zs(),P=ce(()=>[]),B=P[1],j=ce(()=>{}),W=j[1],te=ce(()=>({})),J=te[1],re=te[0],se=kz(),K=Ee(o)&&Ee(i)?b:P[0],oe=Se=>{if(o!==void 0&&i!==void 0&&l!==void 0)return M(Ka(o,i,l,Se));B(Fe=>Se)},le=pDe([{data:m,schema:p,label:h}],K,[]),Z=D(G(m),{}),ve=fi(p,"Drill",w,I,s,void 0),me=mf([Z],ve,w,I,void 0),kr={lookupLabel:(Se,Fe)=>pf(me,Se,w,Fe),isMissing:(Se,Fe)=>rm(me,Se,w,Fe),retiredBadge:(Se,Fe)=>em(me,Se,w,Fe),linkable:(Se,Fe)=>tm(me,Se,w,Fe,!1)},nn=ne(k(Sa(),Se=>Se.identity),[],Se=>Se.groups),Ln=Se=>{if(l!==void 0)return q(gi(M7(p,Se,g),Fe=>L7(Fe.command,nn)),Fe=>(()=>W(Lr=>({command:Fe.command,rowId:l,formKey:Fe.command.name+":"+D(l,"")}))))},qt=(Se,Fe,Lr)=>L("div",{children:[_("div",{children:Fe,className:e1}),_("div",{children:Lr,className:dg})],className:Zy},Se),Ei=(Se,Fe,Lr)=>Yu(Se,w,I)?Lr:pS(Se,Fe,w,Lr),Yn=mDe(m,s),rt=Se=>{let Fe=Ze(Se.data);if(typeof Fe!="object"){if(Fe==="JSONNull")return _("span",{children:"—",className:Qc})}else switch(Fe.TAG){case"JSONObject":let Lr=D(G(Se.data),{}),Jt=K.length===0,V=fi(Se.schema,"Drill",w,I,Jt?s:void 0,void 0),ye=Jt&&Ee(Yn)?gDe(V,s):V;return ye.length===0?_("span",{children:"(no fields)",className:Qc}):_("div",{children:ye.map(at=>{let Me=at.key,Ie=at.propSchema,tt=gi(F(Lr,Me),zt=>Ze(zt)!=="JSONNull"),Qe=tU(Ie,Me),ze=fDe(Me,Ie);if(tt===void 0)return qt(Me,Qe,D(Cle(Me,Ie),_("span",{children:"—",className:Qc})));if(typeof ze!="object")switch(ze){case"Bool":return qt(Me,Qe,fg(tt,void 0,Me))}else switch(ze.TAG){case"Scalar":let zt=r0(Me,Ie,tt);return zt!==void 0?qt(Me,Qe,zt):qt(Me,Qe,fg(tt,ze._1,Me));case"EntityRef":let ut=ze._0;return qt(Me,Ei(ut,!1,Qe),nv(Me,ut,tt,w,C,kr,I,void 0,void 0));case"EntityRefArray":let Ir=ze._0;return qt(Me,Ei(Ir,!0,Qe),nv(Me,Ir,tt,w,C,kr,I,void 0,void 0));case"NestedObject":let Un=r0(Me,Ie,tt);if(Un!==void 0)return qt(Me,Qe,Un);let vr=fi(ze._0,"Drill",w,I,void 0,void 0),Tt=D(k(F(Lr,Me),G),{});return L("div",{children:[_("div",{children:Qe,className:lF}),_("div",{children:vr.map(vt=>{let as=F(Tt,vt.key);return L("div",{children:[_("div",{children:Ru(vt,w,I),className:e1}),_("div",{children:wl(vt.key,vt.kind,vt.propSchema,as,void 0,w,C,kr,I),className:dg})],className:Zy},vt.key)}),className:uF})],className:sF},Me);case"ArrayOfObjects":let Cr=ze._0,Vr=gF(mF(tt)),xn=Vr.length,Sn=D(i,h),Gr=Sn+"."+Me,Zn=k(n,vt=>hn(vt,Gr)),Kr=s2(Cr,Zn,{registry:w,ownEntity:I}),tl=n2(o,Sn,Me),os=F(re,Me),wc=os!==void 0?os:i2(tl),Wo=l2(wc,Zn,Dw(Cr),void 0,Kr),y_=vt=>{o2(tl,vt,se),J(as=>{let Cc=Oe(Te(as));return Cc[Me]={mode:vt,band:se},Cc})},rl=D(Et(tt),[]),eu=vt=>{let as=_n(Cr,k(n,ru=>Ya(ru,Gr)),void 0),Cc=k(Zn,ru=>ru.accent),Rc={readModelName:Gr,rows:rl,schema:Cr,semantics:as,accent:Cc,window:"Complete",onOpenRow:(ru,hR)=>{let x_=kV(rl,Ac=>Ac===hR),pR=x_!==void 0?ne(Vr[x_],ru,Ac=>Ac.key):ru;oe(K.concat([Me,pR]))}};return vt.render([Rc])},Wi=fi(Cr,"Drill",w,I,void 0,void 0).map(vt=>({key:vt.key,label:vt.label,render:as=>wl(vt.key,vt.kind,vt.propSchema,F(as.row,vt.key),void 0,w,C,kr,I),sortable:!1,width:vt.width})),tu=xn===0?_("span",{children:"(empty)",className:Qc}):_("div",{children:_(Lh,{columns:Wi,data:Vr,keyFn:vt=>vt.key,onRowClick:vt=>oe(K.concat([Me,vt.key])),density:"Comfortable"}),className:cF}),Ec=Wo!==void 0&&Wo.id!==ha?eu(Wo):tu;return L("div",{children:[L("div",{children:[_("span",{children:Qe,className:uDe}),L("span",{children:[Kr.length>1?_(Fa.make,{modes:Kr,activeId:ne(Wo,ha,vt=>vt.id),onSelect:y_}):null,_(mh,{count:xn,label:"items",onClick:()=>oe(K.concat([Me]))})],style:{display:"inline-flex",alignItems:"center",gap:"8px"}})],className:lDe}),Ec],className:sDe},Me);case"TaggedUnion":let nl=r0(Me,Ie,tt);if(nl!==void 0)return qt(Me,Qe,nl);let Af=Wv(tt);if(Af===void 0)return qt(Me,Qe,fg(tt,void 0,Me));let kc=Af[1],$f=Af[0],Em=xw(ze._0,$f),Tf=ne(Em,$f,vt=>vt.tag),km=ne(Em,[],vt=>fi(xO(vt),"Drill",w,I,void 0,void 0)),Cm=L("span",{children:[Qe,hp(Tf)],style:{display:"inline-flex",alignItems:"center",flexWrap:"wrap",gap:"6px"}});return km.length!==0?L("div",{children:[_("div",{children:Cm,className:lF}),_("div",{children:km.map(vt=>L("div",{children:[_("div",{children:Ru(vt,w,I),className:e1}),_("div",{children:wl(vt.key,vt.kind,vt.propSchema,F(kc,vt.key),void 0,w,C,kr,I),className:dg})],className:Zy},vt.key)),className:uF})],className:sF},Me):qt(Me,Qe,hp(Tf))}return qt(Me,Qe,_(KO,{items:hDe(tt)}))}),className:aDe});case"JSONArray":let Pe=gF(mF(Se.data)),lt=D(k(G(Se.schema),at=>F(at,"items")),Se.schema),Ft=fi(lt,"Drill",w,I,void 0,void 0).map(at=>({key:at.key,label:Ru(at,w,I),render:Me=>wl(at.key,at.kind,at.propSchema,F(Me.row,at.key),void 0,w,C,kr,I),sortable:!1,width:at.width}));return Pe.length===0?_("span",{children:"(empty)",className:Qc}):_("div",{children:_(Lh,{columns:Ft,data:Pe,keyFn:at=>at.key,onRowClick:at=>oe(K.concat([at.key])),density:"Comfortable"}),className:cF})}return _("div",{children:fg(Se.data,void 0,void 0),className:dg})},dt=D(Yn,D(l,h)),Vt=Se=>{if(o!==void 0&&i!==void 0&&l!==void 0)return Ka(o,i,l,K.slice(0,Se))},Pt=le!==void 0?le.slice(0,le.length-1|0).map((Se,Fe)=>({label:Fe===0?dt:Se.label,href:Vt(Fe),onClick:()=>oe(K.slice(0,Fe))})):[],Dt=ne(R,[],Se=>Se.ancestors).concat(Pt),ki;if(le!==void 0){let Se=le.length,Fe=le[le.length-1|0];ki=Se!==1&&Fe!==void 0?Fe.label:dt}else ki=dt;let zn;if(le!==void 0){let Se=le[le.length-1|0];zn=Se!==void 0?rt(Se):null}else zn=_(Pa,{title:"Drill path no longer valid",detail:"The data shape has changed since this view was opened.",onRetry:()=>oe([])});let Xn=K.length===0,is=Xn?e9(g.filter(Se=>Se.level==="Instance"),Z,c):[],Ho;if(Xn&&c!==void 0){let Se=fo(p,c),Fe=Lb(c,g,k(k(n,Jt=>k(i,V=>hn(Jt,V))),Jt=>Jt.transitions));if(Se.map((Jt,V)=>Se.slice(0,V).some(ye=>Ee(Fe(Jt,ye)))).some(Jt=>Jt))Ho=void 0;else{let Jt=N2e(p,c,D(wa(Z,c),""));Ho=Jt.length!==0?_(F9,{steps:Jt}):void 0}}else Ho=void 0;let Ci=Xn?D(k(Fw(p,k(k(n,Se=>k(i,Fe=>hn(Se,Fe))),Se=>Se.retiredLabel)),Se=>Bh(Se,F(Z,Se.field))),null):null,Ri=Xn?l!==void 0?v.map(Se=>{let Fe=u7(Se,l);return{key:"rowAction:"+Se.command.name,label:Se.label,run:()=>W(Lr=>({command:Fe.command,rowId:void 0,initialValues:Fe.initialValues,navigateTo:Fe.navigateTo,formKey:Fe.formKey}))}}):[]:[],Hi=_(Y9,{crumbs:Dt,title:ki,titleAccessory:L("div",{children:[Ci,Xn&&t!==void 0&&l!==void 0?t(l):null],className:oDe}),commands:is.map(Se=>({key:Se.name,label:Se.label,run:()=>W(Fe=>({command:Se,rowId:l,formKey:Se.name+":"+D(l,"")}))})).concat(Ri),controls:k(R,Se=>Se.controls),inBar:N});return L("div",{children:[cv(N?T:void 0,Hi),D(Ho,null),Xn?_(tM.make,{fill:Ln,children:zn}):zn,Xn&&r!==void 0&&l!==void 0?r(l):null,ne(j[0],null,Se=>{let Fe=Se.command;return _(Nk,{isOpen:!0,onClose:()=>W(Lr=>{}),title:Fe.label,children:_(oC,{schema:Fe.schema,aggregateId:Se.rowId,aggregateIdField:Fe.aggregateIdField,injectNewId:Fe.level==="Collection",ownerField:Fe.ownerField,ownerValue:Fe.ownerValue,initialValues:Se.initialValues,refFields:Fe.refFields,onSubmit:Lr=>S!==void 0?Mt(S(Fe.mutationDocument,Ub(Fe.schema,Lr)).then(Jt=>{if(typeof Jt!="object")return Jt==="Accepted"?(W(V=>{}),ee(A,V=>V()),ee(Se.navigateTo,ca),Promise.resolve("Ok")):(W(V=>{}),ir(Se.navigateTo)&&ee(A,V=>{setTimeout(V,500)}),ee(Se.navigateTo,ca),Promise.resolve("Ok"));{if(Jt.TAG==="Rejected"){let ye=Jt._0;return hm(y,w,ye.errorCode,ye.detail).then(Pe=>Promise.resolve({TAG:"Err",_0:Pe}))}let V=Jt._0;return console.error("[AutoUI] "+Fe.name+": command not executed — "+V),Promise.resolve({TAG:"Err",_0:V})}}),Jt=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(W(Jt=>{}),Promise.resolve("Ok")),submitLabel:"Execute"},Se.formKey)})})],className:iDe})}let vF=vDe;function Fu(e){return"var("+e+")"}let bDe=E([z("flex"),_e("column"),u("gap",Fu(O.md))]),_De=E([z("flex"),X("center"),u("gap",Fu(O.md)),u("flex-wrap","wrap"),u("padding-bottom",Fu(O.sm)),u("border-bottom","1px solid var("+x.border+")")]),yDe=E([u("font-size",Fu($.sizeLg)),u("font-weight",Fu($.weightMedium)),u("color",Fu(x.textPrimary)),yn(ke(0))]),xDe=E([z("flex"),X("center"),xi("wrap"),u("gap",Fu(O.sm)),u("margin-left","auto")]);function SDe(e){let t=e.contextId,r=e.slice,n=li(),i=fm(),o=va(),a=ce(()=>{}),s=a[1];return L("div",{children:[L("div",{children:[_("h2",{children:r.name,className:yDe}),_("div",{children:r.commands.map(l=>_("button",{children:l.label,className:DCe,onClick:c=>s(d=>l)},l.name)),className:xDe})],className:_De}),ne(a[0],null,l=>_(Nk,{isOpen:!0,onClose:()=>s(c=>{}),title:l.label,children:_(oC,{schema:l.schema,aggregateId:t,aggregateIdField:l.aggregateIdField,injectNewId:l.level==="Collection",ownerField:l.ownerField,ownerValue:l.ownerValue,refFields:l.refFields,onSubmit:c=>i!==void 0?Mt(i(l.mutationDocument,Ub(l.schema,c)).then(d=>{if(typeof d=="object"){if(d.TAG==="Rejected"){let h=d._0;return hm(n,o,h.errorCode,h.detail).then(p=>Promise.resolve({TAG:"Err",_0:p}))}let f=d._0;return console.error("[AutoUI] "+l.name+": command not executed — "+f),Promise.resolve({TAG:"Err",_0:f})}return s(f=>{}),Promise.resolve("Ok")}),d=>Promise.resolve({TAG:"Err",_0:"Request failed"})):(s(d=>{}),Promise.resolve("Ok")),submitLabel:"Execute"},l.name+":"+D(t,""))}))],className:bDe})}let wDe=SDe;function EDe(e){let t=e.uiHints,r=e.hostViewName,n=e.entityId,i=e.binding,o=va(),a=Tp(),s=zs(),l=Ks(),c=ne(e.requiredAccess,!1,Z=>!l(Z)),d=Zk(i.readModel,x1e(i,n),n,!c,void 0,25),f=d.rows.map(Z=>D(G(Z),{})),h=y1e(i.readModel.schema,i.refField),p=hM(o,i.readModel.name),m=q(p,Z=>({pluginId:Z.pluginId,viewName:i.readModel.name})),g=_1e(r,i),v=_n(h,k(t,Z=>Ya(Z,g)),{field:i.readModel.labelField,source:i.readModel.labelFieldSource}),b=fi(h,"List",o,m,v.labelField,v.projectedLabelField),y=k(t,Z=>hn(Z,g)),S=s2(i.readModel.schema,y,{registry:o,ownEntity:m}),w=n2(e.pluginId,r,i.readModel.name),C=ce(()=>i2(w)),A=C[1],T=kz(),R=Z=>{o2(w,Z,T),A(ve=>({mode:Z,band:T}))},N=l2(C[0],y,Dw(i.readModel.schema),void 0,S),I=mf(f,b,o,m,void 0),W={lookupLabel:(Z,ve)=>pf(I,Z,o,ve),isMissing:(Z,ve)=>rm(I,Z,o,ve),retiredBadge:(Z,ve)=>em(I,Z,o,ve),linkable:(Z,ve)=>tm(I,Z,o,ve,!1)},te=J8(b,o,a,F,void 0,W,m,void 0,void 0,void 0),J=Z=>k(F(Z,"id"),ie),re=Z=>D(J(Z),JSON.stringify(Z)),se=Z=>ee(p,ve=>s(Ka(ve.pluginId,ve.name,Z,[]))),pe=q(p,Z=>(ve=>ee(J(ve),se))),K=Z=>{let ve=i.readModel.name,me=d.rows,be=k(y,nn=>nn.accent),Ge=zh(d.canLoadMore),kr={readModelName:ve,rows:me,schema:h,semantics:v,accent:be,window:Ge,onOpenRow:(nn,Ln)=>{let qt=k(G(Ln),J);return se(qt!==void 0?qt:nn)},ownEntity:m,refLabels:W};return Z.render([kr])};if(c)return null;let oe=d.fetchState,le;if(typeof oe!="object")if(oe==="Loading")le=_(Sd,{});else{let Z,ve=0;N!==void 0&&N.id!==ha?Z=K(N):ve=1,ve===1&&(Z=_(Lh,{columns:te,data:f,keyFn:re,onRowClick:pe})),le=L(Bt,{children:[Z,d.canLoadMore?_("button",{children:"Load more",onClick:me=>d.loadMore()}):null]})}else le=oe.TAG==="Error"?_(Pa,{title:"Could not load related rows",detail:oe._0,onRetry:d.refetch}):_(Pa,{title:"Not available",detail:oe._0});return L("section",{children:[L("div",{children:[_("h3",{children:pt(i.readModel.name)}),S.length>1?_(Fa.make,{modes:S,activeId:ne(N,ha,Z=>Z.id),onSelect:R}):null],style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px"}}),le]})}let kDe=EDe,lC={contents:void 0};function OHe(e){lC.contents=e}function CDe(){return Ee(lC.contents)}function RDe(e,t){return q(lC.contents,r=>r(e,t))}function Sv(e){return e.filter(t=>t.level==="Instance")}function ADe(e,t,r,n){let i=n!==void 0?n:[];return t!==void 0&&fo(e,t).length!==0?Sv(r.concat(i)).some(o=>{let a=o.allowedStates;return a!==void 0?a.length!==0:!1}):!1}function $De(e,t,r,n,i){let o=n!==void 0?n:[],a=Sv(r),s=Sv(o),l=fo(e,t),c=v7(e,t,r,i),d=mAe(e,t,o),f=(v,b,y)=>({commandName:y.name,label:y.label,toState:v!==void 0?gAe(b?d:c,v,y.name):y.targetState,system:b}),h=(v,b,y)=>Q(y,S=>{let w=S.allowedStates;if(w!==void 0&&w.includes(v))return f(v,b,S)}),p=l.map(v=>{let b=h(v,!1,a).concat(h(v,!0,s));return{value:v,label:pt(v),terminal:b.length===0,outgoing:b}}),m=(v,b)=>b.filter(y=>ir(y.allowedStates)).map(y=>f(void 0,v,y)),g=m(!1,a).concat(m(!0,s));return{lifecycleField:t,states:p,anyState:g}}function TDe(e){return Q(Sv(e),t=>t.targetState)}function NDe(e,t){let r=t!==void 0?t:[],n=e.states.flatMap(s=>Q(s.outgoing,l=>q(l.toState,c=>({fromState:s.value,toState:c,command:l.label,selfLoop:c===s.value,system:l.system})))),i=Q(n,s=>{if(!s.selfLoop)return s.toState}).concat(TDe(r)),o=q(e.states[0],s=>s.value);return{nodes:e.states.map(s=>({value:s.value,label:s.label,terminal:s.terminal,unreachable:!i.includes(s.value)&&da(s.value,o),unresolved:s.outgoing.filter(l=>ir(l.toState)).map(l=>l.label)})),edges:n,anyState:e.anyState.map(s=>({label:s.label,system:s.system,toState:s.toState}))}}function Or(e){return"var("+e+")"}let DDe=E([z("flex"),_e("column"),u("gap",Or(O.md))]),FDe=E([u("font-size",Or($.sizeLg)),u("font-weight",Or($.weightMedium)),u("color",Or(x.textPrimary)),yn(ke(0))]),IDe=E([u("font-size",Or($.sizeXs)),u("color",Or(x.textDisabled))]),PDe=E([z("flex"),u("flex-wrap","wrap"),X("flexStart"),u("gap",Or(O.md))]);function ODe(e){return E([z("flex"),_e("column"),u("gap",Or(O.sm)),u("flex","0 1 240px"),u("padding",Or(O.md)),u("background",Or(x.surface)),u("border","1px solid var("+x.border+")"),u("border-left","3px solid "+e.border),u("border-radius",Or(Y.md))])}let MDe=E([z("flex"),X("center"),et("spaceBetween"),u("gap",Or(O.sm))]),LDe=E([u("font-size",Or($.sizeXs)),u("color",Or(x.textDisabled)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),zDe=E([z("flex"),_e("column"),u("gap","6px")]),UDe=E([z("flex"),X("center"),u("flex-wrap","wrap"),u("gap","4px")]),BDe=E([u("color",Or(x.textSecondary)),u("font-size",Or($.sizeSm))]),jDe=E([u("font-size",Or($.sizeXs)),u("color",Or(x.textDisabled))]),qDe=E([z("flex"),_e("column"),u("gap",Or(O.sm)),u("padding-top",Or(O.sm))]),VDe=E([u("font-size",Or($.sizeXs)),u("font-weight",Or($.weightMedium)),u("color",Or(x.textSecondary)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),GDe=E([z("flex"),u("flex-wrap","wrap"),u("gap","6px")]);function bF(e,t){let r=t.toState;return L("div",{children:[t.system?_(lEe.make,{label:t.label}):_(aEe.make,{label:t.label}),r!==void 0?L(Bt,{children:[_("span",{children:"→",className:BDe}),_(Gk.make,{swatch:Vk(e,r),label:pt(r),dot:!1})]}):null],className:UDe},t.commandName)}function KDe(e){let t=e.display,r=e.title,n=e.systemCommands,i=e.lifecycleField,o=n!==void 0?n:[],a=t!==void 0?t:"Lane",s=$De(e.schema,i,e.commands,o,e.transitions),l=s.states.map(d=>d.value),c;return c=a==="Lane"?void 0:RDe(NDe(s,o),D(r,pt(i))),L("div",{children:[r!==void 0?_("h3",{children:r,className:FDe}):null,_("div",{children:"Lifecycle on “"+pt(i)+"”",className:IDe}),c!==void 0?c:L(Bt,{children:[_("div",{children:s.states.map(d=>{let f=Vk(l,d.value);return L("div",{children:[L("div",{children:[_(Gk.make,{swatch:f,label:d.label}),d.terminal?_("span",{children:"end",className:LDe}):null],className:MDe}),d.terminal?_("span",{children:"No commands available",className:jDe}):_("div",{children:d.outgoing.map(h=>bF(l,h)),className:zDe})],className:ODe(f)},d.value)}),className:PDe}),s.anyState.length!==0?L("div",{children:[_("span",{children:"Any state",className:VDe}),_("div",{children:s.anyState.map(d=>bF(l,d)),className:GDe})],className:qDe}):null]})],className:DDe})}let HDe=KDe;function ks(e){return"var("+e+")"}let WDe=E([z("flex"),_e("column"),u("gap",ks(O.xl))]),JDe=E([u("font-size",ks($.sizeXl)),u("font-weight",ks($.weightMedium)),u("color",ks(x.textPrimary)),yn(ke(0))]),QDe=E([z("flex"),X("center"),et("spaceBetween"),u("gap",ks(O.md))]),YDe=E([z("flex"),_e("column"),u("gap",ks(O.md)),u("padding",ks(O.lg)),u("background",ks(x.surfaceSubtle)),u("border","1px solid var("+x.borderSubtle+")"),u("border-radius",ks(Y.md))]);function nU(e){return e.filter(t=>ADe(t.schema,t.lifecycleField,t.commands,D(t.systemCommands,[])))}let _F="lifecycle",yF="diagram";function XDe(e){let t=e.uiHints,r=I7(),n=nU(e.views),i=Ce(r.get(_F),yF)?"Diagram":"Lane",o=(s,l,c)=>_("button",{children:s,"aria-pressed":c?"true":"false",className:c?Fa.Style.btnActive:Fa.Style.btn,onClick:d=>r.set(_F,l)},l),a=CDe()?L("div",{children:[o("Lane","",i==="Lane"),o("Diagram",yF,i==="Diagram")],"aria-label":"Lifecycle rendering",className:Fa.Style.group,role:"group"}):null;return L("div",{children:[L("div",{children:[_("h2",{children:"Lifecycles",className:JDe}),a],className:QDe}),n.length!==0?n.map(s=>_("div",{children:_(HDe,{schema:s.schema,lifecycleField:D(s.lifecycleField,""),commands:s.commands,systemCommands:D(s.systemCommands,[]),title:s.name,transitions:k(k(t,l=>hn(l,s.name)),l=>l.transitions),display:i}),className:YDe},s.name)):_(Wd,{title:"No lifecycles",description:"No view in this plugin declares a lifecycle enum with state-scoped commands."})],className:WDe})}let ZDe=XDe;function Rt(e){return"var("+e+")"}let eFe=E([z("flex"),_e("column"),u("gap",Rt(O.md)),u("font-family",Rt($.fontFamily))]),tFe=E([z("flex"),X("center"),u("gap",Rt(O.sm)),u("color",Rt(x.textSecondary)),u("font-size",Rt($.sizeSm)),u("font-weight",Rt($.weightMedium)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),rFe=E([z("inlineFlex"),X("center"),u("padding","0 6px"),u("border-radius",Rt(Y.full)),u("background",Rt(x.surfaceElevated)),u("color",Rt(x.textPrimary)),u("font-size",Rt($.sizeXs)),u("letter-spacing","0")]),nFe=E([z("flex"),_e("column"),u("gap",Rt(O.md))]),iFe=E([z("flex"),X("flexStart"),u("gap",Rt(O.sm))]),oFe=E([z("flex"),_e("column"),u("gap","2px"),u("min-width","0"),si(1)]),aFe=E([z("flex"),X("baseline"),u("gap",Rt(O.sm))]),sFe=E([u("color",Rt(x.textPrimary)),u("font-size",Rt($.sizeSm)),u("font-weight",Rt($.weightMedium))]),lFe=E([u("color",Rt(x.textDisabled)),u("font-size",Rt($.sizeXs))]),uFe=E([u("color",Rt(x.textPrimary)),u("font-size",Rt($.sizeSm)),u("line-height",Rt($.lineHeightNormal)),u("white-space","pre-wrap"),u("word-break","break-word")]),cFe=E([u("color",Rt(x.textDisabled)),u("font-size",Rt($.sizeSm)),u("padding","var("+O.sm+") 0")]),dFe=E([z("flex"),_e("column"),X("flexEnd"),u("gap",Rt(O.sm))]),fFe=E([u("width","100%"),u("min-height","64px"),u("padding",Rt(O.sm)),u("background",Rt(x.surface)),u("border","1px solid var("+x.border+")"),u("border-radius",Rt(Y.md)),u("color",Rt(x.textPrimary)),u("font-family",Rt($.fontFamily)),u("font-size",Rt($.sizeSm)),u("resize","vertical")]),hFe=E([u("background",Rt(x.brand)),u("border","none"),u("border-radius",Rt(Y.md)),u("color",Rt(x.textOnBrand)),u("padding","4px var("+O.md+")"),u("font-size",Rt($.sizeSm)),u("font-weight",Rt($.weightMedium)),Re("pointer"),Tw([u("opacity","0.5"),Re("default")])]),pFe=E([u("color",Rt(x.error)),u("font-size",Rt($.sizeXs)),u("align-self","flex-start")]);function mFe(e){let t=e.comment,r=t.timestamp;return L("div",{children:[_(Jd,{name:D(t.author,"?"),src:t.authorImageUrl,size:"Medium"}),L("div",{children:[L("div",{children:[_("span",{children:D(t.author,"Unknown"),className:sFe}),r!==void 0?_("span",{children:Fb(e.nowMs,r),className:lFe}):null],className:aFe}),_("span",{children:t.body,className:uFe})],className:oFe})],className:iFe})}function gFe(e){let t=e.nowMs,r=e.error,n=e.posting,i=e.onPost,o=e.emptyLabel,a=e.title,s=e.comments,l=a!==void 0?a:"Comments",c=o!==void 0?o:"No comments yet",d=n!==void 0?n:!1,f=t!==void 0?t:Date.now(),h=ce(()=>""),p=h[1],m=h[0],g=m.trim(),v=g!==""&&!d,b=()=>{if(v)return ee(i,y=>y(g)),p(y=>"")};return L("div",{children:[L("div",{children:[l,_("span",{children:s.length.toString(),className:rFe})],className:tFe}),s.length===0?_("div",{children:c,className:cFe}):_("div",{children:s.map(y=>_(mFe,{comment:y,nowMs:f},y.id)),className:nFe}),i!==void 0?L("div",{children:[_("textarea",{className:fFe,disabled:d,placeholder:"Write a comment…",value:m,onKeyDown:y=>{if(y.key==="Enter"&&(y.metaKey||y.ctrlKey))return y.preventDefault(),b()},onChange:y=>{let S=y.target.value;p(w=>S)}}),r!==void 0?_("span",{children:r,className:pFe}):null,_("button",{children:d?"Posting…":"Comment",className:hFe,disabled:!v,onClick:y=>b()})],className:dFe}):null],className:eFe})}let vFe=gFe;function bFe(e){let t=e.entityId,r=e.binding,n=li(),i=fm(),o=va(),a=Ks(),s=ne(e.requiredAccess,!1,b=>!a(b)),l=ec(r.readModel,!s),c=ce(()=>!1),d=c[1],f=ce(()=>{}),h=f[1],p=b=>{let y=r.postCommand;if(i!==void 0&&y!==void 0){d(S=>!0),h(S=>{}),Mt(i(y.mutationDocument,h1e(r,t,b)).then(S=>{if(d(w=>!1),typeof S!="object")return l.refetch(),Promise.resolve();{if(S.TAG==="Rejected"){let C=S._0;return hm(n,o,C.errorCode,C.detail).then(A=>(h(T=>A),Promise.resolve()))}let w=S._0;return console.error("[AutoUI] comment not posted — "+w),h(C=>w),Promise.resolve()}}),S=>(d(w=>!1),h(w=>"Could not post the comment."),Promise.resolve()));return}};if(s)return null;let m=f1e(r,l.rows,t),g=r.postCommand;return _(vFe,{comments:m,onPost:n!==void 0&&g!==void 0?p:void 0,posting:c[0],error:f[0]})}let _Fe=bFe;function ii(e){return"var("+e+")"}let yFe=E([z("flex"),_e("column"),u("gap",ii(O.lg))]),xFe=E([z("flex"),X("center"),et("spaceBetween"),u("gap",ii(O.md))]),SFe=E([u("font-size",ii($.sizeXl)),u("font-weight",ii($.weightMedium)),u("color",ii(x.textPrimary)),yn(ke(0))]),wFe=E([z("flex"),xi("wrap"),X("center"),u("gap",ii(O.md)),u("font-size",ii($.sizeSm)),u("color",ii(x.textSecondary))]),EFe=E([z("inlineFlex"),X("center"),u("gap","4px"),Re("pointer")]);function kFe(e){return E([z("inlineBlock"),u("width","8px"),u("height","8px"),u("border-radius","50%"),u("background",e)])}let xF=E([u("font-size",ii($.sizeXs)),u("color",ii(x.textDisabled))]),CFe=E([z("flex"),X("center"),u("gap",ii(O.sm))]),RFe=E([u("background","none"),u("border","1px solid var("+x.border+")"),u("border-radius",ii(Y.sm)),u("padding","2px var("+O.sm+")"),u("color",ii(x.textSecondary)),u("font-size",ii($.sizeSm)),Re("pointer"),Ue([u("background",ii(x.surfaceSubtle)),u("color",ii(x.textPrimary))])]);function AFe(e){let t=e.viewAccess,r=e.uiHints,n=e.events,i=e.resource,o=e.pluginId,a=t!==void 0?t:{},s=zs(),l=Ks(),c=li(),d=Zp(),f=va(),h=Jk(),p=ce(()=>[]),m=p[1],g=p[0],v=K=>_n(K.schema,k(r,oe=>Ya(oe,K.name)),{field:K.labelField,source:K.labelFieldSource}),b=ec(i,!0),y=i.name,S=b.rows,w=i.schema,C=v(i),A=zh(b.canLoadMore),T=(K,oe)=>s(Ka(o,i.name,K,[])),R=Xu,N={pluginId:o,viewName:i.name},I={readModelName:y,rows:S,schema:w,semantics:C,window:A,onOpenRow:T,role:R,ownEntity:N},M=n.map((K,oe)=>{let le=dv(a,K.readModel.name,l),Z=le&&!g.includes(K.readModel.name),ve=ec(K.readModel,Z);return[K,oe,Z,le,ve]}),P=(K,oe)=>D(k(k(r,le=>hn(le,K.name)),le=>le.accent),qd[Fo(oe,qd.length)]),B=Q(M,K=>{let oe=K[4],le=K[0],Z=y7(le.readModel.commands,le.resourceRef),ve=Qk(c,d,le.readModel.commands,le.readModel.name,oe.isLive,oe.refetch,f,h.onNotice,void 0);if(K[2])return{readModelName:le.readModel.name,rows:oe.rows,schema:le.readModel.schema,semantics:v(le.readModel),accent:P(le.readModel,K[1]),window:zh(oe.canLoadMore),onOpenRow:(me,be)=>s(Ka(o,le.readModel.name,me,[])),onCommand:q(Z,me=>ve),role:Zu,resourceRef:le.resourceRef,assignCommand:Z,ownEntity:{pluginId:o,viewName:le.readModel.name}}}),j=[I].concat(B),W=(b.canLoadMore?[i.name]:[]).concat(Q(M,K=>{if(K[2]&&K[4].canLoadMore)return K[0].readModel.name})),te=()=>{b.canLoadMore&&b.loadMore(),M.forEach(K=>{let oe=K[4];if(K[2]&&oe.canLoadMore)return oe.loadMore()})},J=b.fetchState,re,se=0;typeof J!="object"?re=J==="Loading"?[i.name+": loading…"]:[]:se=1,se===1&&(re=[i.name+": "+J._0]);let pe=re.concat(Q(M,K=>{let oe=K[0],le=K[4].fetchState;if(K[2])return typeof le!="object"?le==="Loading"?oe.readModel.name+": loading…":void 0:(le.TAG,oe.readModel.name+": "+le._0)}).concat(Rk(a,n.map(K=>K.readModel.name),l)));return L("div",{children:[_("div",{children:_("h2",{children:e.canvasName,className:SFe}),className:xFe}),_("div",{children:M.filter(K=>K[3]).map(K=>{let oe=K[0];return L("label",{children:[_("input",{checked:K[2],type:"checkbox",onChange:le=>{let Z=oe.readModel.name;m(ve=>ve.includes(Z)?ve.filter(me=>me!==Z):ve.concat([Z]))}}),_("span",{className:kFe(P(oe.readModel,K[1]))}),oe.readModel.name],className:EFe},oe.readModel.name)}),className:wFe}),h.element,e.mode.render(j),W.length!==0?L("div",{children:[_("button",{children:"Load more",className:RFe,onClick:K=>te()}),_("span",{children:"More rows available: "+W.join(", "),className:xF})],className:CFe}):null,pe.length!==0?_("span",{children:pe.join(" · "),className:xF}):null],className:yFe})}let $Fe=AFe;function TFe(e){return e}function SF(e,t){let r=t!==void 0?t:[];return e.map(n=>({name:n.name,schema:n.schema,commands:n.commands,rowActionCandidates:Z7(r,n.name),declaredLabelField:n.labelField,declaredLabelSource:n.labelFieldSource}))}function wv(e){if(typeof e=="object")return"heuristic:"+e._0;switch(e){case"Annotation":return"annotation";case"Type":return"type";case"Hint":return"hint"}}function iU(e,t,r){return t!==void 0?Object.entries(v7(e.schema,t,e.commands,k(r,n=>n.transitions))):[]}function NFe(e){let t=[["command",Pb(e.action)],["field",e.action.field]],r=ne(e.tier,[],o=>[["tier",Q7()]]),n=e.vetoes,i=n.length!==0?[["vetoes",n.map(k3e)]]:[];return Oe(t.concat(r).concat(i))}function DFe(e){let t=r=>e.filter(r).map(NFe);return Oe([["attached",t(Bb)],["vetoed",t(Y7)],["deferred",t(X7)]])}function oU(e){return q(e.declaredLabelField,t=>({field:t,source:e.declaredLabelSource}))}function aU(e,t){return ne(gi(e.declaredLabelSource,r=>Ce(e.declaredLabelField,t)),t,r=>t+" ("+r+")")}function sU(e,t){if(t.TAG==="Pair"){let n=t.endField,i=t.startField;return n!==void 0?i+".."+n:i}let r=t._0;return ne(F(e.semantics,r),r,n=>r+" ("+wv(n.provenance)+")")}function lU(e,t){switch(t.TAG){case"Paired":return t.latField+"/"+t.lngField;case"Pointed":let r=t._0;return ne(F(e.semantics,r),r,i=>r+" ("+wv(i.provenance)+")");case"Geolocated":let n=t._0;return ne(F(e.semantics,n),n+" (point on Located)",i=>n+" ("+wv(i.provenance)+", point on Located)")}}function FFe(e,t,r){let n=e.name,i=e.schema,o=_n(i,t,oU(e)),a=Te(o.semantics).map(d=>{let f=d[1];return Oe([["field",d[0]],["semantic",Qd(f.semantic)],["provenance",wv(f.provenance)]])}),s=[];ee(o.geo,d=>{s.push(["geo",lU(o,d)])}),ee(o.dateSpan,d=>{s.push(["dateSpan",sU(o,d)])}),ee(o.statusField,d=>{s.push(["status",d])}),ee(o.labelField,d=>{s.push(["label",aU(e,d)])}),ee(o.imageField,d=>{s.push(["image",d])}),ee(o.parentField,d=>{s.push(["parent",d])});let l=t2(i,void 0).map(d=>d.id),c=iU(e,o.statusField,r).map(d=>{let f=d[1];return[d[0],f.command+" ("+dAe(f.tier)+")"]});return Oe([["view",n],["capableModes",l],["roles",Oe(s)],["transitions",Oe(c)],["rowActions",DFe(D(e.rowActionCandidates,[]))],["fields",a]])}function uU(e,t,r,n){return Oe([["plugin",e],["hintErrors",(n!==void 0?n:[]).map(TFe)],["views",t.map(o=>FFe(o,k(r,a=>Ya(a,o.name)),k(r,a=>hn(a,o.name))))]])}function IFe(e,t){return e.map(r=>{let n=r.name,i=r.schema,o=_n(i,k(t,b=>Ya(b,n)),oU(r)),a=t2(i,void 0).map(b=>b.id).join(", "),s=[];ee(o.geo,b=>{s.push("geo="+lU(o,b))}),ee(o.dateSpan,b=>{s.push("dateSpan="+sU(o,b))}),ee(o.statusField,b=>{s.push("status="+b)}),ee(o.labelField,b=>{s.push("label="+aU(r,b))}),ee(o.imageField,b=>{s.push("image="+b)}),ee(o.parentField,b=>{s.push("parent="+b)});let l=s.length===0?"":"; "+s.join("; "),c=Object.keys(o.semantics).length,d=iU(r,o.statusField,k(t,b=>hn(b,n))),f=o.statusField,h=d.length,p=f!==void 0?"; "+h.toString()+" transition(s)":"",m=D(r.rowActionCandidates,[]),g=b=>m.filter(b).length.toString(),v=m.length!==0?"; row actions "+g(Bb)+" attached, "+g(Y7)+" vetoed, "+g(X7)+" deferred":"";return n+": modes "+a+l+p+v+"; "+c.toString()+" field semantic(s)"})}function PFe(e,t,r,n){let i=n!==void 0?n:[];console.log('[AutoUI] Inference report — plugin "'+e+'"'),IFe(t,r).forEach(o=>{console.log(" "+o)}),t.forEach(o=>{D(o.rowActionCandidates,[]).forEach(a=>{let s=a.tier,l=a.vetoes,c,d=0;s!==void 0&&l.length===0?c="attached ("+Q7()+")":d=1,d===1&&(c=l.length!==0?"not offered — "+l.map(C3e).join("; "):"deferred — no tier admits it yet"),console.log(" "+o.name+" · "+Pb(a.action)+"("+a.action.field+"): "+c)})}),console.log(JSON.stringify(uU(e,t,r,i),null,2))}function t1(e){return e.replace(/[^A-Za-z0-9-]/g,"-")}function OFe(e,t,r){return"/"+t1(e)+"/"+t1(t)+"/"+t1(r)}function MFe(e){return Object.fromEntries([["kind",e.kind],["senderId",e.senderId],["sentAt",e.sentAt],["body",e.body]])}function LFe(e){let t=he.object(e);if(t===void 0)return;let r=o=>k(t[o],he.string),n=r("kind"),i=r("senderId");if(n!==void 0&&i!==void 0)return{kind:n,senderId:i,sentAt:D(k(t.sentAt,he.float),0),body:D(t.body,null)}}function zFe(e,t,r,n,i){let o=n!==void 0?n:!0,a=om(),s=k(a,h=>h.clientNamespace()),l=o&&Ee(s)&&ne(a,!1,h=>h.clientChannelsAvailable()),c=s!==void 0?OFe(s,e,t):void 0,d=Ne(i);return d.current=i,Ae(()=>{let h=l?a:void 0;if(h!==void 0&&c!==void 0)return h.subscribe("Domain",c,p=>{let m=LFe(p);if(m!==void 0&&m.senderId!==r)return d.current(m)})},[l,D(c,""),r]),{available:l,publish:(h,p)=>{let m=l?a:void 0;if(m===void 0||c===void 0)return;let g=Date.now(),v={kind:h,senderId:r,sentAt:g,body:p};m.publish("Domain",c,[MFe(v)]).then(b=>{b.TAG!=="Ok"&&console.warn("[AutoClientChannel] publish to "+c+" failed: "+b._0)})}}}let WS="heartbeat",JS="hello",cU="leave";function wF(e){let t=he.object(e);if(t===void 0)return;let r=i=>k(t[i],he.string),n=r("userId");if(n!==void 0&&n!=="")return[n,D(r("username"),n)]}function UFe(e,t,r){let n=t.kind;if(n===cU){let s=wF(t.body);if(s===void 0)return e;let l=s[0];return e.filter(c=>c.userId!==l)}if(n!==WS&&n!==JS)return e;let i=wF(t.body);if(i===void 0)return e;let o=i[0];return e.filter(s=>s.userId!==o).concat([{userId:o,username:i[1],lastSeen:r}])}function BFe(e,t){return e.filter(r=>t-r.lastSeen<25e3)}function jFe(e,t){return Object.fromEntries([["userId",e],["username",t]])}function qFe(e,t,r,n,i){let o="presence",a=i!==void 0?i:!0,s=ce(()=>[]),l=s[1],c=Ne(void 0),f=zFe(o,t,r,a&&r!=="",m=>{if(l(v=>UFe(v,m,Date.now())),m.kind!==JS)return;let g=c.current;if(g!==void 0){setTimeout(()=>g(),Math.random()*1e3);return}}),h=f.available,p=f.publish;return Ae(()=>{if(!h)return;let m=jFe(r,n),g=()=>p(WS,m);c.current=g,p(JS,m),p(WS,m);let v=setInterval(g,1e4);return()=>{clearInterval(v),c.current=void 0,p(cU,m)}},[h,r,n,t]),Ae(()=>{if(!h)return;let m=setInterval(()=>l(g=>BFe(g,Date.now())),1e4);return()=>{clearInterval(m)}},[h]),h?s[0]:[]}function d0(e){return"var("+e+")"}let VFe=E([z("inlineFlex"),X("center"),u("gap",d0(O.xs))]),GFe=E([u("font-family",d0($.fontFamily)),u("font-size",d0($.sizeSm)),u("color",d0(x.textSecondary)),u("white-space","nowrap")]);function KFe(e){return e===1?"1 other here":e.toString()+" others here"}function HFe(e){let t=e.showLabel,r=e.max,n=e.size,i=e.people,o=n!==void 0?n:"Small",a=r!==void 0?r:4,s=t!==void 0?t:!0;if(i.length===0)return null;let l=i.map(c=>({name:c.username,imageUrl:c.imageUrl}));return L("span",{children:[_(ZO,{members:l,size:o,max:a}),s?_("span",{children:KFe(i.length),className:GFe}):null],className:VFe,title:i.map(c=>c.username).join(", ")})}let WFe=HFe;function JFe(e){let t=Sa(),r=k(t,s=>s.identity),n=ne(r,"",s=>s.userId),i=ne(r,"",s=>s.username),a=qFe(void 0,e.readModel+"-"+e.entityId,n,i===""?n:i,n!=="").map(s=>({userId:s.userId,username:s.username}));return _(WFe,{people:a})}let QFe=JFe;function dU(e){return e===""?e:e.slice(0,1).toUpperCase()+e.slice(1,e.length)}let QS={contents:[]},YS={contents:[]};function fU(e,t,r){if(r!=="id")return;let n=e+"."+t;if(!QS.contents.some(i=>i===n)){QS.contents.push(n),console.warn("[AutoUI] Entity "+n+' has labelField="id" — dropdown labels will render as raw UUIDs. Add a @displayName annotation on the source state to fix.');return}}function hU(e,t,r,n){if(r==="id"||n.length!==0&&n.some(o=>o===r))return;let i=e+"."+t;if(!YS.contents.some(o=>o===i)){YS.contents.push(i),console.warn("[AutoUI] Entity "+i+' labelField="'+r+`" is not @searchable; the reference dropdown's search will scan the table — OK at small scale, worth designing around before production volumes.`);return}}function XS(e){let t=[];return e.forEach(r=>{let n=(o,a,s,l,c)=>{fU(r.id,o,s),hU(r.id,o,s,l);let d=Fw(c,void 0),f=d!==void 0&&d.namedWhenRetired?d:void 0;t.push({pluginId:r.id,name:o,queryField:a,singleQueryField:Eo(a),labelField:s,namedRetirement:f})};r.readModels.forEach(o=>n(o.name,o.queryField,o.labelField,o.searchableFields,o.schema)),r.stateViewSlices.concat(D(r.internalQueryables,[])).forEach(o=>n(o.name,o.queryField,o.labelField,o.searchableFields,o.schema))}),t}function f0(e,t){let r=e.toLowerCase(),n=o=>{let a=o.length,s=e.length;if(s>a&&r.endsWith(o))return e.slice(0,s-a|0)};if(!t)return n("id");let i=n("ids");return i!==void 0?i:n("id")}function uC(e){return[Eo(e),Dp(e)]}function Vd(e,t){return e.find(r=>r.name===t)}function cC(e,t){let r=dU(t),n=Dp(r),i=Vd(e,n);return i!==void 0?i:Vd(e,r)}function dC(e){return Q(D(k(k(G(e),t=>F(t,"required")),Et),[]),ie)}function pU(e,t,r,n){return Q(e.references,i=>{let o=i.fieldName.includes("[]"),a=k7(i.fieldName),s;if(a!==void 0){let g=a[1],v=k(k(F(n,a[0]),G),C7),b=k(k(k(k(v,G),y=>F(y,"properties")),G),y=>F(y,g));s=b!==void 0?[b,!0,D(q(v,dC),[]).some(y=>y===g)]:[void 0,!1,!1]}else s=o?[void 0,!1,!1]:[F(n,i.fieldName),!0,r.some(g=>g===i.fieldName)];let l=k(s[0],G),c=k(k(l,g=>F(g,"type")),ie),d=Ce(c,"array"),f=i.plugin,h=f!==void 0?t.filter(g=>g.pluginId===f):t,p=Vd(h,i.entity),m=p!==void 0?p:cC(h,i.entity);if(s[1]){if(m!==void 0){let g=uC(m.name);return{propertyKey:i.fieldName,queryField:m.queryField,singleQueryField:m.singleQueryField,labelField:m.labelField,multi:d,required:s[2],entityName:g[0],entityNamePlural:g[1]}}console.warn("[AutoUI] Command "+e.name+" field "+i.fieldName+': explicit @ref to "'+i.entity+'" did not resolve to a registered entity. Falling back to text input.');return}console.warn("[AutoUI] Command "+e.name+" field "+i.fieldName+": explicit @ref path does not name a property of a record array on this command. Falling back to text input.")})}function mU(e,t,r,n,i,o){let a=[];return i!==void 0&&Te(i).forEach(s=>{let l=s[0],c=G(s[1]);if(Ee(k(c,S=>F(S,"const"))))return;let f=k(k(c,S=>F(S,"type")),ie),h=k(k(k(k(c,S=>F(S,"items")),G),S=>F(S,"type")),ie),p;if(f!==void 0)switch(f){case"array":p=h==="string"?!0:void 0;break;case"string":p=!1;break;default:p=void 0}else p=void 0;if(p===void 0)return;let m=!1;if(e.level==="Collection"&&!p){let S;if(t!==void 0)if(Ce(e.aggregateIdField,l))S=!0;else{let w=f0(l,!1);S=w!==void 0?w.toLowerCase()===t.name.toLowerCase():!1}else S=Ce(e.aggregateIdField,l);m=S}if(m)return;let g=e.aggregateIdField,v;if(g!==void 0&&t!==void 0&&g===l&&!p){let S=Vd(r,Dp(t.name));v=S!==void 0?S:Vd(r,t.name)}else v=void 0;let b;if(v!==void 0)b=v;else{let S=f0(l,p);b=S!==void 0?cC(r,S):void 0}if(b!==void 0){b.pluginId!==o&&console.warn("[AutoUI] Command "+e.name+" field "+l+' resolved cross-plugin to "'+b.name+'" in plugin "'+b.pluginId+'" via naming heuristic. Add @ref("'+b.pluginId+"."+b.name+'") to make the cross-plugin reference explicit, or @ref("<LocalEntity>") to target a same-plugin entity.');let S=uC(b.name),w=b.queryField,C=b.singleQueryField,A=b.labelField,T=n.some(M=>M===l),R=S[0],N=S[1],I={propertyKey:l,queryField:w,singleQueryField:C,labelField:A,multi:p,required:T,entityName:R,entityNamePlural:N};a.push(I);return}if(f0(l,p)!==void 0){console.warn("[AutoUI] Command "+e.name+" field "+l+" looks like a reference but no matching entity was registered. Falling back to text input.");return}}),a}function fC(e,t,r,n){let i=dC(e.schema),o=k(k(G(e.schema),s=>F(s,"properties")),G);if(e.references.length===0)return mU(e,t,r,i,o,n);let a=D(o,{});return pU(e,r,i,a)}function gU(e,t){let r=(i,o)=>{let a={...i};return a.refFields=fC(i,o,t,e.id),a},n={...e};return n.stateChangeSlices=e.stateChangeSlices.map(i=>{let o={...i};return o.commands=i.commands.map(a=>r(a,void 0)),o}),n.aggregates=e.aggregates.map(i=>{let o={...i};return o.commands=i.commands.map(a=>r(a,i)),o}),n.readModels=e.readModels.map(i=>{let o={...i};return o.commands=i.commands.map(a=>r(a,void 0)),o}),n}let YFe={capitalize:dU,singularize:Eo,warnedIdLabel:QS,warnedUnsearchable:YS,warnIfIdLabel:fU,warnIfUnsearchable:hU,buildRegistry:XS,stemFromKey:f0,entityDisplayNames:uC,findByName:Vd,findByStem:cC,requiredSet:dC,resolveExplicitRefs:pU,resolveByHeuristic:mU,resolveForCommand:fC,enrichPlugin:gU};function jb(e){let t=he.object(e);if(t===void 0||Ee(Wl(e)))return;let r=k(t.properties,he.object);if(r!==void 0)return r;let n=k(k(k(t.items,he.object),i=>i.properties),he.object);return n!==void 0?n:nt(["anyOf","oneOf","allOf"],void 0,(i,o)=>i!==void 0?i:k(k(t[o],he.array),a=>nt(a,void 0,(s,l)=>s!==void 0?s:jb(l))))}function hC(e,t){let r=Q(Object.entries(e),n=>{if(!bQ(n[1]))return n[0]});return t&&!r.includes("id")?["id"].concat(r):r}let EF=new Map;function XFe(e){if(ir(EF.get(e))){EF.set(e,!0),console.error('AutoUI: the union field "'+e+'" carries neither '+_O+" on the field nor "+yO+" on its arms, so its member types cannot be named. It will be selected as `"+e+" { __typename }` — the arm is readable, its fields are not. The platform emitting this schema is behind the union contract.");return}}function pC(e,t,r){let n=Q(t.arms,i=>{let o=hx(t,i);if(o===void 0)return;let a=r(i);if(a!=="")return"... on "+o+" { "+a+" }"});return t.arms.some(i=>ir(hx(t,i)))&&XFe(e),n.length!==0?e+" { __typename "+n.join(" ")+" }":e+" { __typename }"}function wp(e,t,r){let n=t!==void 0?t:3;return hC(e,r!==void 0?r:!0).map(a=>{let s=k(e[a],Wl);if(s!==void 0)return pC(a,s,c=>n<=0?"":wp(c.properties,n-1|0,!1));if(n<=0)return a;let l=k(e[a],jb);return l!==void 0?a+" { "+wp(l,n-1|0,!1)+" }":a}).join(" ")}function ZFe(e,t){let r=hC(e,t);return Q(r,n=>{let i=e[n];if(i===void 0)return n;let o=Wl(i);return o!==void 0?pC(n,o,a=>wp(a.properties,1,!1)):ir(jb(i))?n:void 0}).join(" ")}function vU(e,t,r){let n=!0,i=1,o=hC(e,n);return Q(o,a=>{let s=e[a];if(s===void 0)return a;let l=Wl(s);if(l!==void 0)return pC(a,l,f=>wp(f.properties,i,!1));let c=jb(s);if(c===void 0)return a;let d=ZFe(c,!1);if(d!=="")return a+" { "+d+" }"}).join(" ")}function qb(e){return D(k(k(he.object(e),t=>t.properties),he.object),{})}function kF(e,t,r,n,i,o){let a=n!==void 0?n:!1,s=i!==void 0?i:!1,l=o!==void 0?o:!1,c=vU(qb(t)),d=a||l,f=["$first: Int","$after: String","$last: Int","$before: String"],h=["first: $first","after: $after","last: $last","before: $before"],p=Ee(xQ(t)),m=p?f.concat(["$includeRetired: Boolean"]):f,g=p?h.concat(["includeRetired: $includeRetired"]):h,v;if(r!==void 0){let S=d?["$filter: "+r+"Filter"].concat(m):m,w=d?["filter: $filter"].concat(g):g,C=s?S.concat(["$orderBy: "+r+"OrderBy"]):S,A=s?w.concat(["orderBy: $orderBy"]):w;v=[C,A]}else v=[m,g];let b=v[0].join(", "),y=v[1].join(", ");return"query("+b+") { "+e+"("+y+") { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { cursor node { "+c+" } } } }"}function CF(e,t){let r=wp(qb(t),void 0,void 0),i=ne(Lp(t),!1,a=>a[1].namedWhenRetired)?", includeRetired: true":"",o=Nw(t);return o!==void 0?"query($id: ID!, $subId: String!) { "+e+"(id: $id, "+o+": $subId"+i+") { "+r+" } }":"query($id: ID!) { "+e+"(id: $id"+i+") { "+r+" } }"}function eIe(e,t){let r=vU(qb(t));return"query($ids: [String!]!) { "+e+"ByIds(ids: $ids) { "+r+" } }"}function tIe(e){return YO(e).length===0?ir(Nw(e)):!1}function rIe(e){let t=Object.keys(qb(e));return t.includes("updatedAt")?"updatedAt":t.includes("createdAt")?"createdAt":void 0}function RF(e,t,r){return e==="Operator"?t:D(r,[])}function r1(e,t){let r={},n=(i,o)=>{let a=F(r,i);if(a!==void 0){let s=o.filter(l=>!a.some(c=>c.name===l.name));r[i]=a.concat(s);return}r[i]=o};return e.aggregates.forEach(i=>{i.linkedViews.forEach(o=>n(o,RF(t,i.commands,i.systemCommands)))}),e.stateChangeSlices.forEach(i=>{let o=RF(t,i.commands,i.systemCommands),a=o.filter(c=>c.level==="Collection"),s=o.filter(c=>c.level==="Instance");i.linkedViews.forEach(c=>n(c,a));let l=i.consistencyRead;if(l!==void 0)return n(l,s);i.linkedViews.forEach(c=>n(c,s))}),r}function AF(e,t,r,n,i){let o=i!==void 0?i:Ob,a=e.readModels.map(s=>s.name).concat(e.stateViewSlices.map(s=>s.name)).map(s=>({pluginId:e.id,name:s,placed:D(F(n,s),[]).map(l=>l.name)}));return F3e(a,t,void 0,r,o)}function nIe(e,t,r,n,i,o,a,s,l,c,d,f,h,p){let m=[],g=i!==void 0?i:[],v=o!==void 0?o:[],b=a!==void 0?a:[],y=s!==void 0?s:[],S={},w=c!==void 0?c:{},C=d!==void 0?d:{},A=f!==void 0?f:!1,T=g.length===0?[e]:g,R=XS(T),N=gU(e,R),I=r1(N,"Operator"),M=r1(N,"System"),P=(V,ye,Pe)=>{let lt={...V};return lt.refFields=fC(V,ye,R,Pe),lt},B=AF(N,T,R,I,P),j=v.find(V=>V.id===N.id),W;if(j!==void 0){let V=XS(v);W=AF(j,v,V,r1(j,"Operator"),void 0)}else W=B;let te={};W.filter(Bb).forEach(V=>{te[V.viewName]=D(F(te,V.viewName),[]).concat([Pb(V.action)])});let J=ne(h,[],V=>Yue(V,N,v,te)),re=[],se=Iu(),pe=N.id,K=V=>{let ye=N.derivedPages;return ye!==void 0?ye.includes(V):!0},oe=V=>{let ye=k(h,Pe=>hn(Pe,V));return URe(zRe(ye,T,P),I3e(B,V),D(k(ye,Pe=>Pe.suppressRowActions),[]))},le=(V,ye,Pe,lt,ft,Ft)=>{let at=tIe(V.schema),Me=at?V.queryField+"ByIds":void 0,Ie=at?eIe(V.queryField,V.schema):void 0,tt=rIe(V.schema),Qe=wQ(V.schema),ze=V.name,zt=bs(cl(pe,ze)),ut=F(w,ze),Ir=Pe+ze,Un=Kf(N.name,ze,V.sortIndex,k(h,Sn=>hn(Sn,ze)),A&&Ee(V.ownerField)),Tt={fragmentId:Ir,title:ze,menuEntry:Un,requiredAccess:ut,url:zt},Cr=oe(ze),Vr=pe+"."+ze,xn=(Sn,Gr)=>_(CTe,{readModel:V,detailView:ye,pluginId:pe,openRowId:Sn,drillPath:Gr,singleQueryField:lt,detailQueryDocument:ft,byIdsQueryField:Me,byIdsQueryDocument:Ie,sortKeyField:tt,liveOffered:Qe,uiHints:h,schedulerJoin:Ft,rowActions:Cr,archiveOffered:!A},Vr);return re.push(jc(Vc(pe,ze),Sn=>{let Gr=cY(Sn);return _(lg,{definition:Tt,children:xn(Gr[0],Gr[1])})})),XV(se,pe,ze,cl(pe,ze)),Tt},Z=N.readModels.filter(V=>!b.includes(V.name)).map(V=>{let ye=D(F(I,V.name),V.commands),Pe=D(F(M,V.name),D(V.systemCommands,[])),lt=Eo(V.queryField),ft=NS(V.schema);if(V.queryDocument===""){let at={...V};return at.systemCommands=Pe,at.commands=ye,at.queryDocument=kF(V.queryField,V.schema,lt,ft.hasFilter,ft.hasSort,ft.hasSearch),at}let Ft={...V};return Ft.systemCommands=Pe,Ft.commands=ye,Ft}),ve=N.stateViewSlices.filter(V=>!b.includes(V.name)).map(V=>{let ye=D(F(I,V.name),[]),Pe=D(F(M,V.name),[]),lt=Eo(V.queryField),ft=NS(V.schema),Ft=kF(V.queryField,V.schema,lt,ft.hasFilter,ft.hasSort,ft.hasSearch);return{name:V.name,schema:V.schema,queryDocument:Ft,queryField:V.queryField,sortIndex:V.sortIndex,commands:ye,linkedWriteSide:V.linkedWriteSide,labelField:V.labelField,labelFieldSource:V.labelFieldSource,searchableFields:V.searchableFields,lifecycleField:V.lifecycleField,ownerField:V.ownerField,systemCommands:Pe}}),me=EAe(Z.concat(ve),h,(V,ye)=>{console.warn("[AutoUI] "+N.id+': scheduler canvas "'+V+'" has '+ye.toString()+" resource models — its events list omits the scheduler toggle (the generated page still renders)")}),be={...N};be.readModels=Z;let Ge=V=>q(d1e(be,V),ye=>{let Pe=F(w,ye.readModel.name);return lt=>_(_Fe,{binding:ye,entityId:lt,requiredAccess:Pe})}),Lt=V=>{let ye=D(h,n0),Pe=ece(hn(ye,V.name),Pye(V.schema));return q(Oye(V,Pe),lt=>{let ft=F(w,V.name);return Ft=>_(H3e,{binding:lt,entityId:Ft,requiredAccess:ft})})},Ct=V=>{let ye=D(h,n0);if(tce(hn(ye,V.name)))return Pe=>_(QFe,{readModel:V.name,entityId:Pe})},kr={...N};kr.readModels=Z.concat(ve);let nn=V=>{let ye=D(h,n0);return b1e(v1e(kr,V.name),rce(hn(ye,V.name)),V.name).map(Pe=>{let lt=F(w,Pe.readModel.name);return ft=>_(kDe,{binding:Pe,entityId:ft,hostViewName:V.name,pluginId:pe,uiHints:h,requiredAccess:lt})})},Ln=V=>{let ye=Q([Ge(V.name)].concat(nn(V).map(Pe=>Pe)).concat([Lt(V)]),Pe=>Pe);if(ye.length!==0)return Pe=>_(Bt,{children:ye.map((lt,ft)=>_(Tv,{children:lt(Pe)},ft.toString()))})},qt=Z.map(V=>{let ye=Eo(V.queryField),Pe=CF(ye,V.schema),lt=oe(V.name),ft=F(S,V.name);return le(V,ft!==void 0?ft:(at,Me,Ie)=>_(vF,{data:Ie,schema:V.schema,rootLabel:V.name,commands:V.commands,rowActions:lt,lifecycleField:V.lifecycleField,aggregateId:at,labelField:V.labelField,drillPath:Me,pluginId:N.id,viewName:V.name,uiHints:h,entityPanel:Ln(V),headerAccessory:Ct(V)}),N.id+".",ye,Pe,F(me,V.name))}),Ei=ve.map(V=>{let ye=Eo(V.queryField),Pe=CF(ye,V.schema),lt=oe(V.name),ft=F(S,V.name);return le(V,ft!==void 0?ft:(at,Me,Ie)=>_(vF,{data:Ie,schema:V.schema,rootLabel:V.name,commands:V.commands,rowActions:lt,lifecycleField:V.lifecycleField,aggregateId:at,labelField:V.labelField,drillPath:Me,pluginId:N.id,viewName:V.name,uiHints:h,entityPanel:Ln(V),headerAccessory:Ct(V)}),N.id+".slice.",ye,Pe,F(me,V.name))}),Yn=N.stateChangeSlices.filter(V=>!y.includes(V.name)).map(V=>({fragmentId:N.id+".commands."+V.name,title:V.name,description:"Auto-generated command panel for "+V.name,extensionPackage:N.id,positions:m,component:ye=>_(wDe,{slice:V,contextId:ye.contextId}),requiredAccess:F(C,V.name),minWidth:void 0})),rt=Z.concat(ve).toSorted((V,ye)=>V.sortIndex===ye.sortIndex?kd(V.name,ye.name):_w(V.sortIndex,ye.sortIndex));Ee(u5("autoui.inferenceReport"))&&PFe(N.id,SF(rt,B),h,J),ee(p,V=>V(uU(N.id,SF(rt,B),h,J)));let dt=rt.map(V=>[V,_n(V.schema,void 0,void 0)]),Vt=Q(iv(),V=>{let ye=V.arity;if(!(typeof ye!="object"||ye.TAG!=="Multi"))return[V,ye.min]}).flatMap(V=>{let ye=V[1],Pe=V[0],lt={};return dt.forEach(ft=>{let Ft=ft[0],at=k(h,ze=>hn(ze,Ft.name)),Me=ne(k(at,ze=>ze.suppress),!1,ze=>ze.includes(Pe.id)),Ie={registry:R};if(!(Pe.isCapable(Ft.schema,ft[1],Ie)&&!Me))return;let tt=D(k(at,ze=>ze.canvas),Pe.label),Qe=F(lt,tt);Qe!==void 0?Qe.push(Ft):lt[tt]=[Ft]}),Q(Te(lt),ft=>{let Ft=ft[1];if(Ft.length>=ye)return[Pe,ft[0],Ft]})}),Pt=(V,ye)=>Vt.some(Pe=>Pe[1]===ye?Pe[0].id!==V.id:!1)?ye+" — "+V.label:ye,Dt=K("canvas")?Vt.map(V=>{let ye=V[2],Pe=V[0],lt=Pt(Pe,V[1]),ft=N.id+".canvas."+lt,Ft=Kf(N.name,lt,900,void 0,void 0),at=I3(w,ye.map(tt=>tt.name)),Me=bs(cl(pe,lt)),Ie={fragmentId:ft,title:lt,menuEntry:Ft,requiredAccess:at,url:Me};return re.push(jc(Vc(pe,lt),tt=>_(lg,{definition:Ie,children:_(nDe,{pluginId:pe,mode:Pe,canvasName:lt,readModels:ye,uiHints:h,viewAccess:w})}))),Ie}):[],ki=K("scheduler")?Q(iv(),V=>{let ye=V.arity;if(!(typeof ye!="object"||ye.TAG==="Multi"))return[V,ye._0]}).flatMap(V=>{let ye=V[1],Pe=V[0],lt={},ft={},Ft=(tt,Qe,ze)=>{let zt=F(tt,Qe);zt!==void 0?zt.push(ze):tt[Qe]=[ze]};rt.forEach(tt=>{let Qe=k(h,ut=>hn(ut,tt.name)),ze=D(k(Qe,ut=>ut.canvas),Pe.label),zt=k(Qe,ut=>ut.role);if(zt!==void 0)return zt===Xu?Ft(lt,ze,tt):zt===Zu?ee(k(Qe,ut=>ut.resourceRef),ut=>Ft(ft,ze,[tt,ut])):void 0});let at=(tt,Qe)=>ne(ye.find(ze=>ze.role===tt),Qe,ze=>ze.min),Me=at(Xu,1),Ie=at(Zu,1);return Q(Te(lt),tt=>{let Qe=tt[1],ze=tt[0],zt=D(F(ft,ze),[]),ut=Qe[0];if(ut===void 0||!(Qe.length>=Me&&zt.length>=Ie))return;let Ir=zt.map(xn=>({readModel:xn[0],resourceRef:xn[1]})),Un=N.id+".scheduler."+ze,vr=Kf(N.name,ze,910,void 0,void 0),Tt=t1e(w,ut.name),Cr=bs(cl(pe,ze)),Vr={fragmentId:Un,title:ze,menuEntry:vr,requiredAccess:Tt,url:Cr};return re.push(jc(Vc(pe,ze),xn=>_(lg,{definition:Vr,children:_($Fe,{pluginId:pe,canvasName:ze,mode:Pe,resource:ut,events:Ir,uiHints:h,viewAccess:w})}))),Vr})}):[],zn=Z.concat(ve).flatMap(V=>_Q(V.schema).map(ye=>({view:V.name,label:ye[2],field:ye[0],aggregate:ye[1]}))),Xn=Z.concat(ve).flatMap(V=>nY(V.schema,k(h,ye=>Ya(ye,V.name))).map(ye=>({view:V.name,field:ye,aggregate:"sum"}))),is=D(k(h,V=>V.dashboard),[]),Ho=is.map(V=>[V.view,D(V.field,"")]),Ci=(V,ye)=>!V.some(Pe=>Pe[0]===ye.view?Pe[1]===D(ye.field,""):!1),Ri=zn.filter(V=>Ci(Ho,V)),Hi=Ho.concat(Ri.map(V=>[V.view,D(V.field,"")])),Se=is.concat(Ri).concat(Xn.filter(V=>Ci(Hi,V))),Fe;if(Se.length!==0&&K("dashboard")){let V="Dashboard",ye=Z.concat(ve),Pe=N.id+".dashboard",lt=Kf(N.name,V,-100,void 0,void 0),ft=I3(w,nt(Se.map(Me=>Me.view),[],(Me,Ie)=>Me.includes(Ie)?Me:Me.concat([Ie])).filter(Me=>ye.some(Ie=>Ie.name===Me))),Ft=bs(cl(pe,V)),at={fragmentId:Pe,title:V,menuEntry:lt,requiredAccess:ft,url:Ft};re.push(jc(Vc(pe,V),Me=>_(lg,{definition:at,children:_(E3e,{pluginId:pe,metrics:Se,readModels:ye,uiHints:h,viewAccess:w})}))),Fe=[at]}else Fe=[];let Lr=nU(Z.concat(ve)),Jt;if(Lr.length!==0&&K("lifecycles")){let V="Lifecycles",ye=N.id+".lifecycles",Pe=Kf(N.name,V,-50,void 0,void 0),lt=bs(cl(pe,V)),ft={fragmentId:ye,title:V,menuEntry:Pe,requiredAccess:void 0,url:lt};re.push(jc(Vc(pe,V),Ft=>_(ZDe,{views:Lr,uiHints:h}))),Jt=[ft]}else Jt=[];return{pages:Fe.concat(Jt.concat(qt.concat(Ei.concat(Dt.concat(ki))))),panels:Yn,routes:re,publicLinks:se}}function ZS(e){return $5(u2(e))}function $F(e){return hde(u2(e))}let TF=new Map;function iIe(e,t){let r=TF.get(e);if(!(r!==void 0?r===t:!1)){nO.registerRemotes([{name:e,entry:t}]),TF.set(e,t);return}}async function oIe(e,t,r){iIe(e,r);try{let n=await nO.loadRemote(e+"/"+t);return n==null?{TAG:"Error",_0:"Module Federation returned null for "+e+"/"+t+" — the plugin's vite federation config probably doesn't expose this fragment."}:{TAG:"Ok",_0:n.default}}catch(n){let i=Ds(n);if(i.RE_EXN_ID!==Nv)return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r};let o=D(i._1.message,"unknown error");return{TAG:"Error",_0:"Failed to load "+e+"/"+t+" from "+r+": "+o}}}const aIe=Zt(null),n1={didCatch:!1,error:null};class sIe extends rV{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=n1}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:o,reason:"imperative-api"}),this.setState(n1)}}componentDidCatch(t,r){var n,i;(n=(i=this.props).onError)===null||n===void 0||n.call(i,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:i}=this.props;if(n&&r.error!==null&&lIe(t.resetKeys,i)){var o,a;(o=(a=this.props).onReset)===null||o===void 0||o.call(a,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(n1)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:o,error:a}=this.state;let s=t;if(o){const l={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")s=r(l);else if(n)s=ur(n,l);else if(i!==void 0)s=i;else throw a}return ur(aIe.Provider,{value:{didCatch:o,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}}function lIe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}function uIe(e){let t=D(e.error.message,"unknown error");return _("div",{children:"Plugin fragment crashed: "+t,style:{color:"#a00",fontFamily:"system-ui",padding:"1rem"}})}function cIe(e,t){console.error("Fragment crashed:",e)}function dIe(e){let t=e.fallbackComponent;return ur(sIe,{FallbackComponent:t!==void 0?t:uIe,onError:cIe,children:e.children})}let fIe=dIe;function hIe(e){let t=e.remoteEntryUrl,r=e.fragmentId,n=e.pluginId,i=ce(()=>"Loading"),o=i[1],a=i[0];return Ae(()=>{o(l=>"Loading");let s={contents:!1};return oIe(n,r,t).then(l=>{if(s.contents)return;if(l.TAG==="Ok"){let d=l._0;return o(f=>({TAG:"Loaded",_0:d}))}let c=l._0;o(d=>({TAG:"Failed",_0:c}))}),()=>{s.contents=!0}},[n,r,t]),typeof a!="object"?_("div",{children:"Loading panel…",style:{fontFamily:"system-ui",padding:"0.75rem"}}):a.TAG==="Loaded"?_(fIe,{children:ur(a._0,e.panelProps)}):_("div",{children:"Panel error: "+a._0,style:{color:"#a00",padding:"0.75rem"}})}let pIe=hIe;function Ti(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function cu(e){return Ti(e)==="object"}function mIe(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function NF(e,t){return e.length<124?e:t}const gIe="graphql-transport-ws";var Qi;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(Qi||(Qi={}));var Qr;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(Qr||(Qr={}));function bU(e){if(!cu(e))throw new Error(`Message is expected to be an object, but got ${Ti(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${Ti(e.type)}`);switch(e.type){case Qr.ConnectionInit:case Qr.ConnectionAck:case Qr.Ping:case Qr.Pong:{if(e.payload!=null&&!cu(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case Qr.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ti(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!cu(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Ti(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${Ti(e.payload.query)}`);if(e.payload.variables!=null&&!cu(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${Ti(e.payload.variables)}`);if(e.payload.operationName!=null&&Ti(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${Ti(e.payload.operationName)}`);if(e.payload.extensions!=null&&!cu(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${Ti(e.payload.extensions)}`);break}case Qr.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ti(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!cu(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Ti(e.payload)}`);break}case Qr.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ti(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!mIe(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case Qr.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Ti(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function vIe(e,t){return bU(typeof e=="string"?JSON.parse(e,t):e)}function Jf(e,t){return bU(e),JSON.stringify(e,t)}var wd=function(e){return this instanceof wd?(this.v=e,this):new wd(e)},bIe=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(m){return Promise.resolve(m).then(p,f)}}function s(p,m){n[p]&&(i[p]=function(g){return new Promise(function(v,b){o.push([p,g,v,b])>1||l(p,g)})},m&&(i[p]=m(i[p])))}function l(p,m){try{c(n[p](m))}catch(g){h(o[0][3],g)}}function c(p){p.value instanceof wd?Promise.resolve(p.value.v).then(d,f):h(o[0][2],p)}function d(p){l("next",p)}function f(p){l("throw",p)}function h(p,m){p(m),o.shift(),o.length&&l(o[0][0],o[0][1])}};function _Ie(e){const{url:t,connectionParams:r,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:o=0,keepAlive:a=0,disablePong:s,connectionAckWaitTimeout:l=0,retryAttempts:c=5,retryWait:d=async function(te){let J=1e3;for(let re=0;re<te;re++)J*=2;await new Promise(re=>setTimeout(re,J+Math.floor(Math.random()*2700+300)))},shouldRetry:f=i1,isFatalConnectionProblem:h,on:p,webSocketImpl:m,generateID:g=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,te=>{const J=Math.random()*16|0;return(te=="x"?J:J&3|8).toString(16)})},jsonMessageReplacer:v,jsonMessageReviver:b}=e;let y;if(m){if(!xIe(m))throw new Error("Invalid WebSocket implementation provided");y=m}else typeof WebSocket<"u"?y=WebSocket:typeof global<"u"?y=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(y=window.WebSocket||window.MozWebSocket);if(!y)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const S=y,w=(()=>{const W=(()=>{const J={};return{on(re,se){return J[re]=se,()=>{delete J[re]}},emit(re){var se;"id"in re&&((se=J[re.id])===null||se===void 0||se.call(J,re))}}})(),te={connecting:p?.connecting?[p.connecting]:[],opened:p?.opened?[p.opened]:[],connected:p?.connected?[p.connected]:[],ping:p?.ping?[p.ping]:[],pong:p?.pong?[p.pong]:[],message:p?.message?[W.emit,p.message]:[W.emit],closed:p?.closed?[p.closed]:[],error:p?.error?[p.error]:[]};return{onMessage:W.on,on(J,re){const se=te[J];return se.push(re),()=>{se.splice(se.indexOf(re),1)}},emit(J,...re){for(const se of[...te[J]])se(...re)}}})();function C(W){const te=[w.on("error",J=>{te.forEach(re=>re()),W(J)}),w.on("closed",J=>{te.forEach(re=>re()),W(J)})]}let A,T=0,R,N=!1,I=0,M=!1;async function P(){clearTimeout(R);const[W,te]=await(A??(A=new Promise((se,pe)=>(async()=>{if(N){if(await d(I),!T)return A=void 0,pe({code:1e3,reason:"All Subscriptions Gone"});I++}w.emit("connecting",N);const K=new S(typeof t=="function"?await t():t,gIe);let oe,le;function Z(){isFinite(a)&&a>0&&(clearTimeout(le),le=setTimeout(()=>{K.readyState===S.OPEN&&(K.send(Jf({type:Qr.Ping})),w.emit("ping",!1,void 0))},a))}C(me=>{A=void 0,clearTimeout(oe),clearTimeout(le),pe(me),me instanceof DF&&(K.close(4499,"Terminated"),K.onerror=null,K.onclose=null)}),K.onerror=me=>w.emit("error",me),K.onclose=me=>w.emit("closed",me),K.onopen=async()=>{try{w.emit("opened",K);const me=typeof r=="function"?await r():r;if(K.readyState!==S.OPEN)return;K.send(Jf(me?{type:Qr.ConnectionInit,payload:me}:{type:Qr.ConnectionInit},v)),isFinite(l)&&l>0&&(oe=setTimeout(()=>{K.close(Qi.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Z()}catch(me){w.emit("error",me),K.close(Qi.InternalClientError,NF(me instanceof Error?me.message:new Error(me).message,"Internal client error"))}};let ve=!1;K.onmessage=({data:me})=>{try{const be=vIe(me,b);if(w.emit("message",be),be.type==="ping"||be.type==="pong"){w.emit(be.type,!0,be.payload),be.type==="pong"?Z():s||(K.send(Jf(be.payload?{type:Qr.Pong,payload:be.payload}:{type:Qr.Pong})),w.emit("pong",!1,be.payload));return}if(ve)return;if(be.type!==Qr.ConnectionAck)throw new Error(`First message cannot be of type ${be.type}`);clearTimeout(oe),ve=!0,w.emit("connected",K,be.payload,N),N=!1,I=0,se([K,new Promise((Ge,Lt)=>C(Lt))])}catch(be){K.onmessage=null,w.emit("error",be),K.close(Qi.BadResponse,NF(be instanceof Error?be.message:new Error(be).message,"Bad response"))}}})())));W.readyState===S.CLOSING&&await te;let J=()=>{};const re=new Promise(se=>J=se);return[W,J,Promise.race([re.then(()=>{if(!T){const se=()=>W.close(1e3,"Normal Closure");isFinite(o)&&o>0?R=setTimeout(()=>{W.readyState===S.OPEN&&se()},o):se()}}),te])]}function B(W){if(i1(W)&&(yIe(W.code)||[Qi.InternalServerError,Qi.InternalClientError,Qi.BadRequest,Qi.BadResponse,Qi.Unauthorized,Qi.SubprotocolNotAcceptable,Qi.SubscriberAlreadyExists,Qi.TooManyInitialisationRequests].includes(W.code)))throw W;if(M)return!1;if(i1(W)&&W.code===1e3)return T>0;if(!c||I>=c||!f(W)||h?.(W))throw W;return N=!0}n||(async()=>{for(T++;;)try{const[,,W]=await P();await W}catch(W){try{if(!B(W))return}catch(te){return i?.(te)}}})();function j(W,te){const J=g(W);let re=!1,se=!1,pe=()=>{T--,re=!0};return(async()=>{for(T++;;)try{const[K,oe,le]=await P();if(re)return oe();const Z=w.onMessage(J,ve=>{switch(ve.type){case Qr.Next:{te.next(ve.payload);return}case Qr.Error:{se=!0,re=!0,te.error(ve.payload),pe();return}case Qr.Complete:{re=!0,pe();return}}});K.send(Jf({id:J,type:Qr.Subscribe,payload:W},v)),pe=()=>{!re&&K.readyState===S.OPEN&&K.send(Jf({id:J,type:Qr.Complete},v)),T--,re=!0,oe()},await le.finally(Z);return}catch(K){if(!B(K))return}})().then(()=>{se||te.complete()}).catch(K=>{te.error(K)}),()=>{re||pe()}}return{on:w.on,subscribe:j,iterate(W){const te=[],J={done:!1,error:null,resolve:()=>{}},re=j(W,{next(pe){te.push(pe),J.resolve()},error(pe){J.done=!0,J.error=pe,J.resolve()},complete(){J.done=!0,J.resolve()}}),se=(function(){return bIe(this,arguments,function*(){for(;;){for(te.length||(yield wd(new Promise(oe=>J.resolve=oe)));te.length;)yield yield wd(te.shift());if(J.error)throw J.error;if(J.done)return yield wd(void 0)}})})();return se.throw=async pe=>(J.done||(J.done=!0,J.error=pe,J.resolve()),{done:!0,value:void 0}),se.return=async()=>(re(),{done:!0,value:void 0}),se},async dispose(){if(M=!0,A){const[W]=await A;W.close(1e3,"Normal Closure")}},terminate(){A&&w.emit("closed",new DF)}}}class DF extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function i1(e){return cu(e)&&"code"in e&&"reason"in e}function yIe(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function xIe(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}function SIe(e,t){let r=t!==void 0?{Authorization:"Bearer "+t}:void 0;return _Ie({url:e,connectionParams:r,lazy:!0,retryAttempts:5})}function Ep(e,t){return k(e[t],he.string)}function ia(e,t){return D(Ep(e,t),"")}function wIe(e,t){return q(k(e[t],he.float),r=>r|0)}function EIe(e,t){return Q(D(k(e[t],he.array),[]),he.string)}function kIe(e){let t=he.object(e);return t!==void 0?{label:ia(t,"label"),icon:Ep(t,"icon"),group:Ep(t,"group"),sortOrder:D(wIe(t,"sortOrder"),0)}:{label:"",icon:void 0,group:void 0,sortOrder:0}}function CIe(e){return q(he.object(e),t=>({fragmentId:ia(t,"fragmentId"),title:ia(t,"title"),description:ia(t,"description"),positions:EIe(t,"positions"),requiredAccess:Ep(t,"requiredAccess")}))}function RIe(e){return q(he.object(e),t=>({fragmentId:ia(t,"fragmentId"),title:ia(t,"title"),menuEntry:D(q(t.menuEntry,kIe),{label:ia(t,"title"),icon:void 0,group:void 0,sortOrder:0}),requiredAccess:Ep(t,"requiredAccess")}))}function AIe(e){return q(he.object(e),t=>({pluginId:ia(t,"pluginId"),remoteEntryUrl:ia(t,"remoteEntryUrl"),panels:Q(D(k(t.panels,he.array),[]),CIe),pages:Q(D(k(t.pages,he.array),[]),RIe),registeredAt:ia(t,"registeredAt"),updatedAt:ia(t,"updatedAt")}))}function $Ie(e){return Q(D(k(k(k(k(he.object(e),t=>t.data),he.object),t=>t.Platform_UIFragments),he.array),[]),AIe)}let TIe=`{
|
|
96
|
+
Platform_UIFragments {
|
|
97
|
+
pluginId
|
|
98
|
+
remoteEntryUrl
|
|
99
|
+
panels { fragmentId title description positions requiredAccess }
|
|
100
|
+
pages {
|
|
101
|
+
fragmentId
|
|
102
|
+
title
|
|
103
|
+
menuEntry { label icon group sortOrder }
|
|
104
|
+
requiredAccess
|
|
105
|
+
}
|
|
106
|
+
registeredAt
|
|
107
|
+
updatedAt
|
|
108
|
+
}
|
|
109
|
+
}`,FF=["message","body","text","title","content"],_U=["userId","recipientId","recipient","user","targetUserId"],NIe=["createdAt","sentAt","notifiedAt","at","timestamp"],DIe=["read","isRead","seen","acknowledged"];function mC(e,t){return t.some(r=>r.toLowerCase()===e.toLowerCase())}function yU(e){return Q(Dr(e),t=>{if(zp(t[1]))return t[0]})}function xU(e,t){return yU(e).find(r=>mC(r,t))}function FIe(e){let t=xU(e,_U);if(t!==void 0)return t;let r=_n(e,void 0,void 0);return Dr(e).map(n=>n[0]).find(n=>ne(F(r.semantics,n),!1,i=>i.semantic==="UserRef"))}function IIe(e){return Q(Dr(e),t=>{if(Jv(t[1]))return t[0]}).find(t=>mC(t,NIe))}function PIe(e){return Q(Dr(e),t=>{if(Ce(VQ(t[1]),"boolean"))return t[0]}).find(t=>mC(t,DIe))}function OIe(e,t){return Q(yU(e),r=>{let n=r.toLowerCase();if(!(r===t||n==="id"||!n.endsWith("id")))return{field:r,stem:r.slice(0,r.length-2|0)}})}function MIe(e){return ne(k(G(e),t=>F(t,"x-reventless-notifications")),!1,t=>{let r=Ze(t);return typeof r!="object"?r==="JSONTrue":r.TAG==="JSONString"})}let LIe=["markread","marknotificationread","readnotification","acknowledge","dismiss","markseen"];function zIe(e,t){let r=Q(e.linkedWriteSide,n=>t.aggregates.find(i=>i.name===n)).map(n=>n.commands).flat();return e.commands.concat(r).find(n=>LIe.some(i=>n.name.toLowerCase().startsWith(i)))}let IF={contents:[]};function PF(e,t,r){if(!IF.contents.includes(e)){IF.contents.push(e),console.error('[AutoUI] Read model "'+e+'" announces itself as notifications but has no '+t+" field — no notification bell is wired. The convention expects a string field named "+r.join(" | ")+"; see docs/guides/notifications-read-model-convention.md.");return}}function UIe(e){return Q(e.readModels.filter(t=>MIe(t.schema)?!0:t.name.toLowerCase().endsWith("notifications")),t=>{let r=xU(t.schema,FF),n=FIe(t.schema);if(r!==void 0){if(n!==void 0)return{readModel:t,messageField:r,recipientField:n,timestampField:IIe(t.schema),readField:PIe(t.schema),refFields:OIe(t.schema,n),markReadCommand:zIe(t,e)};PF(t.name,"recipient",_U);return}else{PF(t.name,"message",FF);return}})[0]}function id(e,t){return k(F(e,t),ie)}function BIe(e,t,r){let n=id(e,t.recipientField);return n!==void 0&&r!==void 0&&n!==r.userId?n===r.username:!0}function Ev(e,t){return k(k(t.timestampField,r=>id(e,r)),Qn)}function jIe(e,t,r){let n=t.readField;if(n!==void 0){let o=q(F(e,n),Ze);return o==="JSONTrue"&&typeof o!="object"}let i=Ev(e,t);return i!==void 0?r!==void 0?i<=r:!1:!0}function qIe(e,t,r,n){return Q(t,i=>{let o=D(G(i),{});if(BIe(o,e,r))return o}).toSorted((i,o)=>{let a=Ev(i,e),s=Ev(o,e);return a!==void 0?s!==void 0?s-a:-1:s!==void 0?1:0}).map((i,o)=>({id:D(id(i,"id"),"#"+o.toString()),message:D(id(i,e.messageField),""),timestamp:k(e.timestampField,a=>id(i,a)),read:jIe(i,e,n),refs:Q(e.refFields,a=>q(id(i,a.field),s=>[a.stem,s]))}))}function VIe(e,t){return nt(t,void 0,(r,n)=>{let i=D(G(n),{}),o=Ev(i,e);return r!==void 0?o!==void 0?Math.max(r,o):r:o})}function GIe(e,t){let r=D(k(e.markReadCommand,n=>n.aggregateIdField),"id");return Oe([[r,t]])}let SU=Zt([]),wU=Zt(e=>{}),KIe=SU.Provider,HIe=wU.Provider;function WIe(e){let t=e.initial,r=t!==void 0?t:[],n=ce(()=>r),i=n[1],o=Nr(a=>i(s=>a),[]);return ur(HIe,{value:o,children:ur(KIe,{value:n[0],children:e.children})})}let JIe={make:WIe};function QIe(){return xt(SU)}function YIe(){return xt(wU)}function ew(e,t){return e+"/"+t}function XIe(e){let t=new Map;return e.forEach(r=>{let n=r.remoteEntryUrl;if(n.length>0){r.pages.forEach(i=>{t.set(ew(r.pluginId,i.fragmentId),n)}),r.panels.forEach(i=>{t.set(ew(r.pluginId,i.fragmentId),n)});return}}),t}function ZIe(e,t,r){return e.get(ew(t,r))}function ePe(e,t,r){return e.map(n=>{let i=ZIe(r,t,n.fragmentId);return i!==void 0?{fragmentId:n.fragmentId,title:n.title,description:n.description,extensionPackage:n.extensionPackage,positions:n.positions,component:o=>_(pIe,{pluginId:t,fragmentId:n.fragmentId,remoteEntryUrl:i,panelProps:o}),requiredAccess:n.requiredAccess,minWidth:n.minWidth}:n})}function OF(e,t){let r=t+".",n=e.startsWith(r)?e.slice(r.length):e;return D(q([".list",".detail"].find(o=>n.endsWith(o)),o=>n.slice(0,n.length-o.length|0)),n)}function tPe(e,t){let r=t.find(n=>n.pluginId===e?n.remoteEntryUrl.length>0:!1);return r!==void 0?[r.pages.map(n=>OF(n.fragmentId,e)),r.panels.map(n=>OF(n.fragmentId,e))]:[[],[]]}let EU={contents:[]};function MF(e,t,r){let n=Object.fromEntries([["content-type","application/json"]]);return r!==void 0&&(n.Authorization="Bearer "+r),Mt(fetch(e,{method:"POST",headers:n,body:D(JSON.stringify({query:t}),"")}).then(i=>i.json()),i=>Promise.resolve(null))}function kU(e,t,r,n,i,o,a){let s=XIe(t),l=sce(i,n,e),c=l[2],d=l[1],f=jce(o,a,l[0]),h;h=typeof o!="object"?o!=="Unknown":!1;let p=YFe.buildRegistry(f),m=Q(f,S=>q(UIe(S),w=>({pluginId:S.id,binding:w}))),g=[],v=[],b=[],y={contents:Iu()};return f.forEach(S=>{let w=tPe(S.id,t),C=nIe(S,void 0,void 0,void 0,f,e,w[0],w[1],void 0,d,c,h,r[S.id],void 0),A=ePe(C.panels,S.id,s);C.pages.forEach(T=>{g.push(T)}),A.forEach(T=>{v.push(T)}),C.routes.forEach(T=>{b.push(T)}),y.contents=dx(y.contents,C.publicLinks)}),t.forEach(S=>{}),{pages:g,panels:v,routes:b,publicLinks:y.contents,entities:p,notificationBindings:m}}function rPe(e,t,r,n,i,o,a,s,l,c,d,f){let h=kU(o,a,s,l,c,d,f);n(h.entities),i(h.notificationBindings),ee(e,p=>p.setPluginPages(h.pages)),EU.contents=Q(h.pages,p=>p.url),ee(t,p=>p.setPluginPanels(h.panels)),ee(r,p=>p.setPluginRoutes(h.routes,h.publicLinks))}let kv="Admin";function nPe(e,t){return e?!1:t.includes(kv)}function iPe(e){return e!==void 0?"You are acting as "+e+", and this deployment has no surfaces configured for that role. Its pages are discovered from an admin-only query, which only the "+kv+" group can reach.":"This deployment has no surfaces configured for your roles. Its pages are discovered from an admin-only query, which only the "+kv+" group can reach."}function oPe(e,t){return vn(k(t,r=>e.journeyManifestUrls[r]),e.manifestUrl)}function CU(e,t,r,n){if(e.manifestUrl!==void 0&&(typeof t!="object"||!r.includes(kv)))return oPe(e,n)}function tw(e,t){return t==="/"?!0:e.some(r=>t===r?!0:t.startsWith(r+"/"))}function aPe(){return"/"+Pv(_V(void 0).path).join("/")}function sPe(e){if(!hbe())return;let t=EU.contents,r=i=>tw(t,i);if(tw(t,aPe()))return;let n=gi(k(q(e.home,i=>i.trim()),i=>{if(i!=="")return i}),r);ca(D(vn(n,t[0]),"/"))}function lPe(e){return e.TAG==="ManifestUnreadable"?"Component manifest could not be loaded":"Nothing here for the role you are acting as"}function LF(e,t,r,n,i,o,a,s,l,c,d,f,h,p){let m=(y,S)=>rPe(n,i,o,a,s,y,S,l,c,e.deniedSurfaces,d,f),g=CU(e,d,h,p);if(g!==void 0)return R5(g).then(y=>{if(y.TAG!=="Ok")return{TAG:"ManifestUnreadable",_0:y._0};m(y._0,[])});let v=MF(e.platformApiEndpoint,ede,t),b=MF(e.platformApiEndpoint,TIe,t);return Promise.all([v,b]).then(y=>{let S=y[1],w=y[0],C=$F(w)||$F(S),A=C||ZS(w)||ZS(S);if(m(Xce(w),$Ie(S)),A)if(nPe(C,h)){r();return}else return{TAG:"NoSurfacesForCaller",_0:iPe(p)}})}let uPe=`subscription OnPluginStatusChange {
|
|
110
|
+
onPluginStatusChange { pluginId status }
|
|
111
|
+
}`,cPe=`subscription OnUIFragmentChange {
|
|
112
|
+
onUIFragmentChange { pluginId changeKind }
|
|
113
|
+
}`;function dPe(e,t,r,n){return ir(CU(e,t,r,n))}function fPe(e){return L("div",{children:[_("strong",{children:e.title}),_("p",{children:e.message,style:{margin:"0.5rem 0 0",whiteSpace:"pre-wrap"}})],role:"alert",style:{background:"var("+x.surfaceSubtle+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.error+")",margin:"1rem",padding:"1rem 1.25rem",borderRadius:"0.375rem"}})}function hPe(e){let t=e.uiHints,r=e.config,n=t!==void 0?t:{},i=xt(am),o=xt(sm),a=Ck(),s=lY(),l=YIe(),c=Sa(),d=k(c,S=>S.getToken()),f=ne(k(c,S=>S.identity),[],S=>S.groups),h=k(k(c,S=>S.identity),S=>S.activeRole),p=f.concat(r.accessTiers),m=E5(r.elevatedGroups,f),g=ne(k(c,S=>S.identity),"",S=>S.userId),v=ce(()=>{}),b=v[1],y=v[0];return Ae(()=>{LF(r,d,()=>ee(c,S=>S.logout()),i,o,a,s,l,n,p,m,g,f,h).then(S=>{ee(S,w=>{console.error("[Shell] "+w._0)}),b(w=>S),sPe(r)})},[d,n]),Ae(()=>{if(dPe(r,m,f,h))try{let S=SIe(r.platformApiSubscriptionEndpoint,d),w=()=>{LF(r,d,()=>ee(c,T=>T.logout()),i,o,a,s,l,n,p,m,g,f,h)},C=S.subscribe({query:uPe,variables:void 0},{next:T=>w(),error:T=>{},complete:()=>{}}),A=S.subscribe({query:cPe,variables:void 0},{next:T=>w(),error:T=>{},complete:()=>{}});return()=>{C(),A(),S.dispose()}}catch{return}},[d]),y!==void 0?_(fPe,{message:y._0,title:lPe(y)}):null}let pPe=hPe;function mPe(e,t,r){return Q(t,n=>{if(!Ce(n,r))return q(e[n],i=>[n,i])})}async function gPe(e,t,r,n,i,o){let a=[],s=mPe(e.journeyManifestUrls,t,r);return(await Promise.all(s.map(c=>{let d=c[0];return R5(c[1]).then(f=>[d,f])}))).forEach(c=>{let d=c[1],f=c[0];if(d.TAG!=="Ok")return;let h=kU(d._0,[],i,[f].concat(e.accessTiers),e.deniedSurfaces,E5(e.elevatedGroups,[f]),o),p=Q(h.pages,m=>m.url);if(tw(p,n)){a.push(f);return}}),a}let vPe={display:"flex",padding:"2rem",alignItems:"flex-start",flexDirection:"column",gap:"var("+O.sm+")"},bPe={fontSize:"var("+$.sizeLg+")",fontWeight:"var("+$.weightMedium+")",margin:"0"},_Pe={color:"var("+x.textSecondary+")",margin:"0"},yPe={background:"var("+x.surface+")",border:"1px solid var("+x.borderSubtle+")",color:"var("+x.textPrimary+")",cursor:"pointer",padding:"0.4rem 0.9rem",borderRadius:"0.375rem"},xPe={color:"var("+x.error+")",margin:"0"};function SPe(e){let t=e.uiHints,r=e.config,n=Sa(),i=sO(),o=k(n,w=>w.identity),a=ne(n,!1,w=>w.canSwitchRoles),s=ne(o,[],w=>Cz(a,w)),l=k(o,w=>w.activeRole),c=ne(o,"",w=>w.userId),d=ce(()=>[]),f=d[1],h=d[0],p=ce(()=>!1),m=p[1],g=p[0],v=ce(()=>{}),b=v[1],y=v[0];Ae(()=>{let w={contents:!0};return gPe(r,s,l,i,t,c).then(C=>{if(w.contents)return f(A=>C)}),()=>{w.contents=!1}},[i,s.join(",")]);let S;if(h.length!==0){let w;h.length!==1?w="This page is part of another role you hold: "+h.join(", ")+".":w="This page is part of your "+h[0]+" role.",S=L(Bt,{children:[_("p",{children:w,style:_Pe}),h.map(C=>_("button",{children:"Act as "+C,style:yPe,disabled:g,onClick:A=>ee(n,T=>{m(R=>!0),b(R=>{}),T.switchRole(C).then(R=>{if(m(I=>!1),typeof R!="object")return;let N=R._0;b(I=>N)})})},C)),y!==void 0?_("p",{children:y,style:xPe}):null]})}else S=null;return L("div",{children:[_("h1",{children:"404 — Page not found",style:bPe}),S],style:vPe})}let wPe=SPe;function Kt(e){return"var("+e+")"}let EPe=E([At("relative"),z("inlineBlock")]),kPe=E([At("relative"),z("inlineFlex"),X("center"),et("center"),u("background","none"),u("border","none"),u("border-radius",Kt(Y.md)),u("cursor","pointer"),u("color",Kt(x.textSecondary)),u("padding","6px"),Ue([u("background",Kt(x.surfaceSubtle)),u("color",Kt(x.textPrimary))])]),CPe=E([At("absolute"),Bo(ke(0)),js(ke(0)),z("inlineFlex"),X("center"),et("center"),u("min-width","16px"),u("height","16px"),u("padding","0 4px"),u("border-radius",Kt(Y.full)),u("background",Kt(x.brand)),u("color",Kt(x.textOnBrand)),u("font-family",Kt($.fontFamily)),u("font-size","10px"),u("font-weight",Kt($.weightBold)),u("line-height","1")]),RPe=E([At("absolute"),js(ke(0)),Bo({NAME:"percent",VAL:100}),Uo(ke(4)),u("width","320px"),u("background",Kt(x.surfaceElevated)),u("border","1px solid var("+x.border+")"),u("border-radius",Kt(Y.md)),u("box-shadow",Kt(Zr.md)),u("z-index","200"),u("overflow","hidden"),u("font-family",Kt($.fontFamily))]),APe=E([z("flex"),X("center"),et("spaceBetween"),u("padding","var("+O.sm+") var("+O.md+")"),u("border-bottom","1px solid var("+x.borderSubtle+")"),u("color",Kt(x.textSecondary)),u("font-size",Kt($.sizeSm)),u("font-weight",Kt($.weightMedium)),u("text-transform","uppercase"),u("letter-spacing","0.04em")]),$Pe=E([u("background","none"),u("border","none"),u("color",Kt(x.brand)),u("font-size",Kt($.sizeXs)),u("text-transform","none"),u("letter-spacing","0"),Re("pointer"),Ue([u("text-decoration","underline")])]),TPe=E([u("max-height","360px"),u("overflow-y","auto")]);function NPe(e){return E([z("flex"),X("flexStart"),u("gap",Kt(O.sm)),u("width","100%"),u("background","none"),u("border","none"),u("border-bottom","1px solid var("+x.borderSubtle+")"),u("text-align","left"),u("padding","var("+O.sm+") var("+O.md+")"),Re(e?"pointer":"default"),Ue(e?[u("background",Kt(x.surfaceSubtle))]:[])])}function DPe(e){return E([u("width","8px"),u("height","8px"),u("border-radius",Kt(Y.full)),u("margin-top","5px"),u("flex-shrink","0"),u("background",e?"transparent":Kt(x.brand))])}let FPe=E([z("flex"),_e("column"),u("gap","2px"),u("min-width","0")]);function IPe(e){return E([u("color",Kt(x.textPrimary)),u("font-size",Kt($.sizeSm)),u("font-weight",Kt(e?$.weightNormal:$.weightMedium)),u("line-height",Kt($.lineHeightNormal)),u("word-break","break-word")])}let PPe=E([u("color",Kt(x.textDisabled)),u("font-size",Kt($.sizeXs))]),OPe=E([u("color",Kt(x.textDisabled)),u("font-size",Kt($.sizeSm)),u("padding",Kt(O.md)),u("text-align","center")]);function MPe(e){return L("svg",{children:[_("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),_("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})],"aria-hidden":!0,height:"18",width:"18",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24"})}function LPe(e){let t=e.defaultOpen,r=e.nowMs,n=e.emptyLabel,i=e.onPanelOpen,o=e.onMarkAllRead,a=e.onOpen,s=e.notifications,l=n!==void 0?n:"No notifications",c=t!==void 0?t:!1,d=r!==void 0?r:Date.now(),f=ce(()=>c),h=f[1],p=f[0],m=s.filter(v=>!v.read).length;Ae(()=>{if(!p)return;let v=y=>h(S=>!1),b=y=>{if(y.key==="Escape")return h(S=>!1)};return document.addEventListener("click",v),document.addEventListener("keydown",b),()=>{document.removeEventListener("click",v),document.removeEventListener("keydown",b)}},[p]);let g=()=>{let v=!p;v&&ee(i,b=>b()),h(b=>v)};return L("div",{children:[L("button",{children:[_(MPe,{}),m>0?_("span",{children:m>99?"99+":m.toString(),className:CPe}):null],"aria-label":m>0?"Notifications ("+m.toString()+" unread)":"Notifications",className:kPe,title:"Notifications",type:"button",onClick:v=>{v.stopPropagation(),g()}}),p?L("div",{children:[L("div",{children:["Notifications",o!==void 0&&m>0?_("button",{children:"Mark all read",className:$Pe,type:"button",onClick:v=>o()}):null],className:APe}),s.length===0?_("div",{children:l,className:OPe}):_("div",{children:s.map(v=>{let b=v.timestamp;return L("button",{children:[_("span",{className:DPe(v.read)}),L("span",{children:[_("span",{children:v.message,className:IPe(v.read)}),b!==void 0?_("span",{children:Fb(d,b),className:PPe}):null],className:FPe})],className:NPe(Ee(a)),type:"button",onClick:y=>{ee(a,S=>S(v)),h(S=>!1)}},v.id)}),className:TPe})],className:RPe,onClick:v=>{v.stopPropagation()}}):null],className:EPe})}let zPe=LPe;function RU(e){return"autoui.notifications.seen."+e}function UPe(e){let t=localStorage.getItem(RU(e));if(t!=null)return Fs(t)}function BPe(e,t){localStorage.setItem(RU(e),t.toString())}function jPe(e){let t=e.onData,r=ec(e.binding.readModel,void 0);return Ae(()=>{t({rows:r.rows,refetch:r.refetch})},[r.rows]),null}function qPe(e){let t=QIe(),r=Sa(),n=li(),i=fm(),o=va(),a=zs(),s=ce(()=>({})),l=s[1],c=s[0],f=ce(()=>0)[1],h=C=>(A=>l(T=>{let R=Oe(Te(T));return R[C]=A,R})),p=q(k(r,C=>C.identity),C=>({userId:C.userId,username:C.username})),m=t.flatMap(C=>{let A=ne(F(c,C.pluginId),[],T=>T.rows);return qIe(C.binding,A,p,UPe(C.pluginId)).map(T=>({key:C.pluginId+":"+T.id,appBinding:C,entry:T}))}).toSorted((C,A)=>{let T=k(C.entry.timestamp,Qn),R=k(A.entry.timestamp,Qn);return T!==void 0?R!==void 0?R-T:-1:R!==void 0?1:0}),g=(C,A)=>{let T=C.binding.markReadCommand;if(T!==void 0&&i!==void 0){Mt(i(T.mutationDocument,GIe(C.binding,A)).then(R=>{if(typeof R!="object"){let N=C.pluginId;return ee(F(c,N),I=>I.refetch())}R.TAG!=="Rejected"&&console.error("[AutoUI] notification markRead not executed — "+R._0)}),R=>Promise.resolve());return}},v=C=>ee(m.find(A=>A.key===C.id),A=>{A.entry.read||g(A.appBinding,A.entry.id);let T=A.entry;ee(CV(T.refs,R=>{let N=R[1];return q(jo(o,R[0]),I=>[I,N])}),R=>{let N=R[0];a(Ka(N.pluginId,N.name,R[1],[]))})}),b=Ee(n)&&t.some(C=>Ee(C.binding.markReadCommand)),y=()=>{m.forEach(C=>{if(!C.entry.read)return g(C.appBinding,C.entry.id)})},S=()=>{t.forEach(C=>{let A=ne(F(c,C.pluginId),[],T=>T.rows);ee(VIe(C.binding,A),T=>BPe(C.pluginId,T))}),f(C=>C+1|0)},w=m.map(C=>({id:C.key,message:C.entry.message,timestamp:C.entry.timestamp,read:C.entry.read}));return t.length===0?null:L(Bt,{children:[t.map(C=>_(jPe,{binding:C.binding,onData:h(C.pluginId)},C.pluginId)),_(zPe,{notifications:w,onOpen:v,onMarkAllRead:b?y:void 0,onPanelOpen:S})]})}let VPe=qPe,GPe="/default/dev/uiHints";function KPe(e){let t=e.onChange,r=om(),n=e.config.authMode,i;switch(n){case"Local":i=!0;break;case"Anonymous":case"Cognito":i=!1;break}let o=Ne(t);return o.current=t,Ae(()=>{let a=i?r:void 0;if(a===void 0)return;let s=a.subscribe("Domain",GPe,c=>o.current()),l=a.registerReconnect("Domain",()=>o.current());return()=>{s(),l()}},[i?Ee(r):!1]),null}let HPe=KPe;function WPe(e,t,r){if(e===void 0)return!0;let n=t.toLowerCase(),i=r.toLowerCase();return e.split(",").map(o=>o.trim().toLowerCase()).filter(o=>o!=="").some(o=>o.startsWith(".")?n.endsWith(o):o.endsWith("/*")?i.startsWith(o.slice(0,o.length-1|0)):i===o)}function JPe(e){let t=["B","KB","MB","GB"],n=((s,l)=>{for(;;){let c=l,d=s;if(!(d>=1024&&c<(t.length-1|0)))return[d,c];l=c+1|0,s=d/1024}})(e<0?0:e,0),i=n[1],o=n[0];return(i===0?Math.round(o).toString():(Math.round(o*10)/10).toString())+" "+t[i]}function QPe(e,t){if(e)return[t,!1];let r=t.slice(0,1);return[r,r.length!==0]}function gn(e){return"var("+e+")"}let zF=E([z("flex"),_e("column"),X("center"),et("center"),u("gap","6px"),u("padding",gn(O.lg)),u("border","2px dashed var("+x.border+")"),u("border-radius",gn(Y.md)),u("color",gn(x.textSecondary)),u("font-family",gn($.fontFamily)),u("font-size",gn($.sizeSm)),Re("pointer"),u("transition","border-color 120ms, background 120ms"),Xa("center")]),YPe=E([u("border-color",gn(x.brand)),u("background",gn(x.brandSubtle))]),XPe=E([u("font-size",gn($.sizeXs))]),ZPe=E([z("flex"),X("center"),u("gap","8px"),u("padding",gn(O.xs)+" 0"),u("font-family",gn($.fontFamily)),u("font-size",gn($.sizeSm)),u("color",gn(x.textPrimary))]),eOe=E([u("flex","1"),u("min-width","0"),u("overflow","hidden"),u("text-overflow","ellipsis"),u("white-space","nowrap")]),tOe=E([u("color",gn(x.textSecondary)),u("font-size",gn($.sizeXs)),u("white-space","nowrap")]),rOe=E([u("color",gn(x.success))]),UF=E([u("color",gn(x.error))]),nOe=E([u("width","120px")]),iOe=E([u("flex","0 0 auto"),u("border","none"),u("background","transparent"),u("padding","0 4px"),u("color",gn(x.textSecondary)),u("font-size",gn($.sizeMd)),eJ({NAME:"abs",VAL:1}),Re("pointer")]),oOe=E([u("width","40px"),u("height","40px"),u("flex","0 0 auto"),u("object-fit","cover"),u("border-radius",gn(Y.sm)),u("border","1px solid var("+x.border+")")]);function aOe(e){let t=e.onRemoved,r=e.onUploaded,n=e.label,i=e.multiple,o=e.accept,a=e.adapter,s=i!==void 0?i:!0,l=n!==void 0?n:"Drop files here or click to browse",c=ce(()=>[]),d=c[1],f=c[0],h=ce(()=>!1),p=h[1],m=Ne(null),g=Ne(0),v=Ne([]),b=Ne([]);Ae(()=>(()=>{v.current.forEach(M=>{URL.revokeObjectURL(M)})}),[]);let y=(M,P)=>d(B=>B.map(j=>j.key===M?{key:j.key,name:j.name,size:j.size,status:P,preview:j.preview}:j)),S=M=>ee(M.preview,P=>{URL.revokeObjectURL(P),v.current=v.current.filter(B=>B!==P)}),w=M=>ee(a.remove,P=>{Mt(P(M).then(B=>{B.TAG!=="Ok"&&console.error("[FileDropzone] could not remove "+M+": "+B._0)}),B=>(console.error("[FileDropzone] could not remove "+M),Promise.resolve()))}),C=M=>{b.current=b.current.concat([M.key]),S(M);let P=M.status;if(P.TAG!=="Done")return;let B=P._0;ee(t,j=>j(B)),w(B)},A=M=>{let P=QPe(s,M),B=P[1];B&&f.forEach(C),P[0].forEach((j,W)=>{let te=B&&W===0;g.current=g.current+1|0;let J=g.current.toString()+":"+j.name,re=WPe(o,j.name,j.type),se=re?{TAG:"Uploading",_0:0}:{TAG:"Rejected",_0:"File type not accepted"},pe=j.type,K;if(pe.toLowerCase().startsWith("image/")){let ve=URL.createObjectURL(j);v.current=v.current.concat([ve]),K=ve}else K=void 0;let oe=j.name,le=j.size,Z={key:J,name:oe,size:le,status:se,preview:K};if(d(ve=>te?[Z]:ve.concat([Z])),re){Mt(a.upload(j,ve=>y(J,{TAG:"Uploading",_0:ve})).then(ve=>{if(ve.TAG==="Ok"){let me=ve._0;b.current.includes(J)?w(me):(y(J,{TAG:"Done",_0:me}),ee(r,be=>be(j.name,me)))}else y(J,{TAG:"Failed",_0:ve._0});return Promise.resolve()}),ve=>(y(J,{TAG:"Failed",_0:"Upload failed"}),Promise.resolve()));return}})},T=M=>{M.preventDefault(),p(B=>!1);let P=M.dataTransfer;if(P!=null)return A(Array.from(P.files))},R=M=>{let P=M.target.files;P!=null&&A(Array.from(P)),M.target.value=""},N=()=>ee(Li(m.current),M=>M.click()),I=h[0]?zF+" "+YPe:zF;return L("div",{children:[L("div",{children:[_("span",{children:l}),o!==void 0?_("span",{children:"Accepted: "+o,className:XPe}):null],className:I,role:"button",onClick:M=>N(),onDragLeave:M=>p(P=>!1),onDragOver:M=>{M.preventDefault(),p(P=>!0)},onDrop:T}),_("input",{ref:Nt(m),style:{display:"none"},accept:o,multiple:s,type:"file",onChange:R}),f.map(M=>{let P=M.preview,B=M.status,j;switch(B.TAG){case"Uploading":j=_("span",{children:_(OM,{value:B._0,showValue:!1}),className:nOe});break;case"Done":j=_("span",{children:"Uploaded",className:rOe});break;case"Rejected":j=_("span",{children:"Rejected",className:UF,title:B._0});break;case"Failed":j=_("span",{children:"Failed",className:UF,title:B._0});break}return L("div",{children:[P!==void 0?_("img",{className:oOe,alt:M.name,src:P}):null,_("span",{children:M.name,className:eOe,title:M.name}),_("span",{children:JPe(M.size),className:tOe}),j,_("button",{children:"×","aria-label":"Remove "+M.name,className:iOe,title:"Remove "+M.name,type:"button",onClick:W=>{W.stopPropagation();let te=M.key;ee(f.find(J=>J.key===te),C),d(J=>J.filter(re=>re.key!==te))}})],className:ZPe},M.key)})]})}let sOe=aOe;function AU(e){if(e==="")return[];let t;try{t=Et(JSON.parse(e))}catch{return[e]}return t!==void 0?Q(t,ie):[e]}function lOe(e){return{upload:(t,r)=>Promise.resolve({TAG:"Error",_0:e!==void 0?'No upload endpoint is configured for the store "'+e+'".':"No upload endpoint is configured."})}}function uOe(e,t){let r=cM(e,t);if(r!==void 0&&r.semantic==="Image")return"image/*"}function cOe(e){return Ce(k(k(G(bn(e)),t=>F(t,"type")),ie),"array")}function $U(e){let t=r=>k(Io(r).storeTarget,hQ);return vn(t(e),k(SO(e),t))}function dOe(e,t,r){return vn(k($U(e),r),t)}function fOe(e,t,r){return D(dOe(e,t,r),lOe($U(e)))}function hOe(e){let t=e.onChange,r=e.value,n=e.multiple,i=e.adapter,o=Ne(n?AU(r):r===""?[]:[r]),a=Ne([]),s=z$e(),l=h=>n?JSON.stringify(h.map(p=>p)):D(h[0],""),c=(h,p)=>{let m=n?o.current.concat([p]):[p];o.current=m,a.current=U$e(a.current,p),t(l(m))},d=h=>{let p=o.current.filter(m=>m!==h);o.current=p,a.current=B$e(a.current,h),t(l(p))},f=h=>ee(i.remove,p=>{Mt(p(h).then(m=>{m.TAG!=="Ok"&&console.error("[FileDropzoneInput] could not release "+h+": "+m._0)}),m=>(console.error("[FileDropzoneInput] could not release "+h),Promise.resolve()))});return Ae(()=>(()=>{j$e(s,a.current).forEach(f)}),[]),_(sOe,{adapter:i,accept:e.accept,multiple:n,onUploaded:c,onRemoved:d})}function pOe(e,t,r,n){if(n&&AU(r).length===0)return"Required"}function mOe(e,t,r){let n=e!==void 0?e:a=>{},i=(a,s,l,c,d,f,h)=>_(hOe,{adapter:fOe(s,void 0,n),accept:vn(t,uOe(a,s)),multiple:D(r,cOe(s)),value:l,onChange:c}),o=a=>{let l={...D(Ele(a),{cell:(c,d,f)=>{},detail:(c,d,f)=>{}})};Sr(a,(l.validateInput=pOe,l.input=i,l))};o("File"),o("Image")}var gOe={FRAGMENT:"Fragment",INLINE_DATA_FRAGMENT:"InlineDataFragment",LINKED_FIELD:"LinkedField",LITERAL:"Literal",LIST_VALUE:"ListValue",RELAY_LIVE_RESOLVER:"RelayLiveResolver",OBJECT_VALUE:"ObjectValue",REQUEST:"Request",SCALAR_FIELD:"ScalarField",SPLIT_OPERATION:"SplitOperation",UPDATABLE_QUERY:"UpdatableQuery",VARIABLE:"Variable"},fc=gOe,vOe=function(e,t,r,n,i,o,a,s){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,i,o,a,s],d=0;l=new Error(t.replace(/%s/g,function(){return c[d++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},Be=vOe;function Vb(e){return function(){return e}}var xf=function(){};xf.thatReturns=Vb;xf.thatReturnsFalse=Vb(!1);xf.thatReturnsTrue=Vb(!0);xf.thatReturnsNull=Vb(null);xf.thatReturnsThis=function(){return this};xf.thatReturnsArgument=function(e){return e};var Gb=fc,mm=Be;function bOe(e){mm(!1)}function Js(e){var t=e;return typeof t=="function"?t=t():t.default&&(t=t.default),t}function TU(e){var t=Js(e);return typeof t=="object"&&t!==null&&t.kind===Gb.FRAGMENT}function NU(e){var t=Js(e);return typeof t=="object"&&t!==null&&t.kind===Gb.REQUEST}function _Oe(e){var t=Js(e);return typeof t=="object"&&t!==null&&t.kind===Gb.UPDATABLE_QUERY}function DU(e){var t=Js(e);return typeof t=="object"&&t!==null&&t.kind===Gb.INLINE_DATA_FRAGMENT}function gC(e){var t=Js(e);return TU(t)||mm(!1),t}function yOe(e){var t,r=gC(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch,i=n?.connection;return n===null||typeof n!="object"||i===null||typeof i!="object"?null:r}function xOe(e){var t,r=gC(e),n=(t=r.metadata)===null||t===void 0?void 0:t.refetch;return n===null||typeof n!="object"?null:r}function SOe(e){var t=Js(e);return NU(t)||mm(!1),t}function wOe(e){var t=Js(e);return _Oe(t)||mm(!1),t}function EOe(e){var t=Js(e);return DU(t)||mm(!1),t}var Ea={getFragment:gC,getNode:Js,getPaginationFragment:yOe,getRefetchableFragment:xOe,getRequest:SOe,getUpdatableQuery:wOe,getInlineDataFragment:EOe,graphql:bOe,isFragment:TU,isRequest:NU,isInlineDataFragment:DU},FU={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(FU);var Je=FU.exports,IU={exports:{}},PU={exports:{}},OU={exports:{}},MU={exports:{}};(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(MU);var LU=MU.exports,zU={exports:{}};(function(e){var t=LU.default;function r(n,i){if(t(n)!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var a=o.call(n,i||"default");if(t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(zU);var kOe=zU.exports;(function(e){var t=LU.default,r=kOe;function n(i){var o=r(i,"string");return t(o)=="symbol"?o:o+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(OU);var UU=OU.exports;(function(e){var t=UU;function r(n,i,o){return(i=t(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(PU);var wi=PU.exports;(function(e){var t=wi;function r(i,o){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);o&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable})),a.push.apply(a,s)}return a}function n(i){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{};o%2?r(Object(a),!0).forEach(function(s){t(i,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(a,s))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(IU);var or=IU.exports,BU={exports:{}},jU={exports:{}},qU={exports:{}};(function(e){function t(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,o=Array(n);i<n;i++)o[i]=r[i];return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(qU);var VU=qU.exports;(function(e){var t=VU;function r(n,i){if(n){if(typeof n=="string")return t(n,i);var o={}.toString.call(n).slice(8,-1);return o==="Object"&&n.constructor&&(o=n.constructor.name),o==="Map"||o==="Set"?Array.from(n):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(n,i):void 0}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(jU);var GU=jU.exports;(function(e){var t=GU;function r(n,i){var o=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!o){if(Array.isArray(n)||(o=t(n))||i&&n&&typeof n.length=="number"){o&&(n=o);var a=0,s=function(){};return{s,n:function(){return a>=n.length?{done:!0}:{done:!1,value:n[a++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
114
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,c=!0,d=!1;return{s:function(){o=o.call(n)},n:function(){var h=o.next();return c=h.done,h},e:function(h){d=!0,l=h},f:function(){try{c||o.return==null||o.return()}finally{if(d)throw l}}}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(BU);var qr=BU.exports,KU=Je.default,BF=KU(or),jF=KU(qr),COe=Be;function ROe(e,t,r){var n=(0,jF.default)(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;e.relayFieldLogger((0,BF.default)((0,BF.default)({},o),{},{uiContext:r}))}}catch(c){n.e(c)}finally{n.f()}var a=(0,jF.default)(t),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(HU(l))switch(l.kind){case"relay_resolver.error":throw new Error("Relay: Resolver error at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'. Message: ").concat(l.error.message));case"relay_field_payload.error":throw new Error("Relay: Unexpected response payload - check server logs for details.");case"missing_expected_data.throw":throw new Error("Relay: Missing expected data at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'."));case"missing_required_field.throw":throw new Error("Relay: Missing @required value at path '".concat(l.fieldPath,"' in '").concat(l.owner,"'."));case"missing_required_field.log":case"missing_expected_data.log":break;default:l.kind,COe(!1)}}}catch(c){a.e(c)}finally{a.f()}}function HU(e){switch(e.kind){case"relay_resolver.error":case"relay_field_payload.error":return e.shouldThrow&&!e.handled;case"missing_expected_data.throw":case"missing_required_field.throw":return!e.handled;case"missing_required_field.log":case"missing_expected_data.log":return!1;default:throw e.kind,new Error("Relay: Unexpected event kind")}}function AOe(e,t,r){t!=null&&ROe(e,t,r)}var gm={handlePotentialSnapshotErrors:AOe,eventShouldThrow:HU},WU={exports:{}},JU={exports:{}};(function(e){var t=VU;function r(n){if(Array.isArray(n))return t(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(JU);var $Oe=JU.exports,QU={exports:{}};(function(e){function t(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(QU);var TOe=QU.exports,YU={exports:{}};(function(e){function t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
115
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(YU);var NOe=YU.exports;(function(e){var t=$Oe,r=TOe,n=GU,i=NOe;function o(a){return t(a)||r(a)||n(a)||i()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(WU);var Ql=WU.exports,XU={DEFAULT_HANDLE_KEY:""},DOe=XU,FOe=DOe.DEFAULT_HANDLE_KEY,IOe=Be;function POe(e,t,r){return t&&t!==FOe?"__".concat(t,"_").concat(e):(r==null&&IOe(!1),"__".concat(r,"_").concat(e))}var ZU=POe,OOe={ENABLE_VARIABLE_CONNECTION_KEY:!1,ENABLE_RELAY_RESOLVERS:!1,ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION:!1,ENABLE_FRIENDLY_QUERY_NAME_GQL_URL:!1,ENABLE_DO_NOT_WRAP_LIVE_QUERY:!1,ENABLE_NOTIFY_SUBSCRIPTION:!1,BATCH_ASYNC_MODULE_UPDATES_FN:null,ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT:!1,MAX_DATA_ID_LENGTH:null,STRING_INTERN_LEVEL:0,LOG_MISSING_RECORDS_IN_PROD:!1,ENABLE_STORE_ID_COLLISION_LOGGING:!1,ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS:!1,ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION:!1,ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES:!1,ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE:!1,PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION:!1,MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD:!1,ENABLE_CYLE_DETECTION_IN_VARIABLES:!1,ENABLE_ACTIVITY_COMPATIBILITY:!1,ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX:!0,ENABLE_USE_PAGINATION_IS_LOADING_FIX:!1,DISALLOW_NESTED_UPDATES:!1,ENABLE_TYPENAME_PREFIXED_DATA_ID:!1,ENABLE_UI_CONTEXT_ON_RELAY_LOGGER:!1,CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES:!1},Ko=OOe;function rw(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(rw);for(var t=Object.keys(e).sort(),r={},n=0;n<t.length;n++)r[t[n]]=rw(e[t[n]]);return r}function eB(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;if(!e||typeof e!="object")return!1;if(t.has(e))return!0;var r=new Set(t);r.add(e);var n=Array.isArray(e)?e:Object.values(e);return n.some(function(i){return eB(i,r)})}var hc={stableCopy:rw,hasCycle:eB},MOe=Je.default,LOe=MOe(Ql),zOe=ZU,Kb=fc,UOe=Ko,BOe=hc,tB=BOe.stableCopy,jOe=Be,qOe=Kb.VARIABLE,VOe=Kb.LITERAL,GOe=Kb.OBJECT_VALUE,KOe=Kb.LIST_VALUE,HOe="__errors",WOe="__module_component_",JOe="__module_operation_";function nw(e,t){if(e.kind===qOe)return eMe(e.variableName,t);if(e.kind===VOe)return e.value;if(e.kind===GOe){var r={};return e.fields.forEach(function(i){r[i.name]=nw(i,t)}),r}else if(e.kind===KOe){var n=[];return e.items.forEach(function(i){i!=null&&n.push(nw(i,t))}),n}}function vC(e,t,r){var n={};return r&&(n[nB.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT]=!0),e&&e.forEach(function(i){n[i.name]=nw(i,t)}),n}function QOe(e,t){var r=e.dynamicKey,n=e.handle,i=e.key,o=e.name,a=e.args,s=e.filters,l=zOe(n,i,o),c=null;return a&&s&&a.length!==0&&s.length!==0&&(c=a.filter(function(d){return s.indexOf(d.name)>-1})),r&&(c=c!=null?[r].concat((0,LOe.default)(c)):[r]),c===null?l:bC(l,vC(c,t))}function rB(e,t){if(e.storageKey)return e.storageKey;var r=XOe(e),n=e.name;return r&&r.length!==0?bC(n,vC(r,t)):n}function YOe(e,t){var r=rB(e,t);return UOe.ENABLE_READ_TIME_RESOLVER_STORAGE_KEY_PREFIX?"$r:"+r:r}function XOe(e){if(e.kind==="RelayResolver"||e.kind==="RelayLiveResolver"){var t;if(e.args==null){var r;return(r=e.fragment)===null||r===void 0?void 0:r.args}return((t=e.fragment)===null||t===void 0?void 0:t.args)==null?e.args:e.args.concat(e.fragment.args)}var n=typeof e.args>"u"?void 0:e.args;return n}function ZOe(e,t){return bC(e,tB(t))}function bC(e,t){if(!t)return e;var r=[];for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i!=null){var o;r.push(n+":"+((o=JSON.stringify(i))!==null&&o!==void 0?o:"undefined"))}}return r.length===0?e:e+"(".concat(r.join(","),")")}function eMe(e,t){return t.hasOwnProperty(e)||jOe(!1),tB(t[e])}function tMe(e){return"".concat(WOe).concat(e)}function rMe(e){return"".concat(JOe).concat(e)}var nB={ACTOR_IDENTIFIER_KEY:"__actorIdentifier",CLIENT_EDGE_TRAVERSAL_PATH:"__clientEdgeTraversalPath",FRAGMENTS_KEY:"__fragments",FRAGMENT_OWNER_KEY:"__fragmentOwner",FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT:"$isWithinUnmatchedTypeRefinement",FRAGMENT_PROP_NAME_KEY:"__fragmentPropName",MODULE_COMPONENT_KEY:"__module_component",ERRORS_KEY:HOe,ID_KEY:"__id",REF_KEY:"__ref",REFS_KEY:"__refs",ROOT_ID:"client:root",ROOT_TYPE:"__Root",TYPENAME_KEY:"__typename",INVALIDATED_AT_KEY:"__invalidated_at",RELAY_RESOLVER_VALUE_KEY:"__resolverValue",RELAY_RESOLVER_INVALIDATION_KEY:"__resolverValueMayBeInvalid",RELAY_RESOLVER_SNAPSHOT_KEY:"__resolverSnapshot",RELAY_RESOLVER_ERROR_KEY:"__resolverError",RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS:"__resolverOutputTypeRecordIDs",getArgumentValues:vC,getHandleStorageKey:QOe,getStorageKey:rB,getReadTimeResolverStorageKey:YOe,getStableStorageKey:ZOe,getModuleComponentKey:tMe,getModuleOperationKey:rMe},wr=nB,nMe=Je.default,iB=nMe(or),iMe=wr,oMe=iMe.getArgumentValues,aMe=Be;function sMe(e,t,r){if(e.argumentDefinitions==null)return r;var n;return e.argumentDefinitions.forEach(function(i){if(!r.hasOwnProperty(i.name))switch(n=n||(0,iB.default)({},r),i.kind){case"LocalArgument":n[i.name]=i.defaultValue;break;case"RootArgument":if(!t.hasOwnProperty(i.name)){n[i.name]=void 0;break}n[i.name]=t[i.name];break;default:aMe(!1)}}),n||r}function lMe(e,t,r){var n={};return e.argumentDefinitions.forEach(function(i){var o=i.defaultValue;r[i.name]!=null&&(o=r[i.name]),n[i.name]=o}),t!=null&&Object.keys(t).forEach(function(i){n[i]=t[i].get()}),n}function uMe(e,t,r){if(t==null)return e;var n=(0,iB.default)({},e),i=r?oMe(r,e):{};return t.forEach(function(o){var a,s=(a=i[o.name])!==null&&a!==void 0?a:o.defaultValue;n[o.name]=s}),n}var Yl={getLocalVariables:uMe,getFragmentVariables:sMe,getOperationVariables:lMe},o1=[],a1=[];/**
|
|
116
|
+
* Checks if two values are equal. Values may be primitives, arrays, or objects.
|
|
117
|
+
* Returns true if both arguments have the same keys and values.
|
|
118
|
+
*
|
|
119
|
+
* @see http://underscorejs.org
|
|
120
|
+
* @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
|
|
121
|
+
* @license MIT
|
|
122
|
+
*/function cMe(e,t){var r=o1.length?o1.pop():[],n=a1.length?a1.pop():[],i=iw(e,t,r,n);return r.length=0,n.length=0,o1.push(r),a1.push(n),i}function iw(e,t,r,n){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;var i=Object.prototype.toString,o=i.call(e);if(o!=i.call(t))return!1;switch(o){case"[object String]":return e==String(t);case"[object Number]":return isNaN(e)||isNaN(t)?!1:e==Number(t);case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}for(var a=r.length;a--;)if(r[a]==e)return n[a]==t;r.push(e),n.push(t);var s=0;if(o==="[object Array]"){if(s=e.length,s!==t.length)return!1;for(;s--;)if(!iw(e[s],t[s],r,n))return!1}else{if(e.constructor!==t.constructor)return!1;if(e.hasOwnProperty("valueOf")&&t.hasOwnProperty("valueOf"))return e.valueOf()==t.valueOf();var l=Object.keys(e);if(l.length!=Object.keys(t).length)return!1;for(var c=0;c<l.length;c++)if(!iw(e[l[c]],t[l[c]],r,n))return!1}return r.pop(),n.pop(),!0}var Qs=cMe,dMe=Yl,fMe=dMe.getFragmentVariables,vm=wr,hMe=vm.CLIENT_EDGE_TRAVERSAL_PATH,pMe=vm.FRAGMENT_OWNER_KEY,mMe=vm.FRAGMENT_POINTER_IS_WITHIN_UNMATCHED_TYPE_REFINEMENT,gMe=vm.FRAGMENTS_KEY,oB=vm.ID_KEY,aB=Qs,Vl=Be;function Hb(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||Vl(!1);var r=t[oB],n=t[gMe],i=t[pMe],o=t[hMe];if(typeof r=="string"&&typeof n=="object"&&n!==null&&typeof n[e.name]=="object"&&n[e.name]!==null&&typeof i=="object"&&i!==null&&(o==null||Array.isArray(o))){var a=i,s=o,l=n[e.name],c=fMe(e,a.variables,l),d=l[mMe]===!0;return hB(e,r,c,a,d,s)}return null}function sB(e,t){var r=null;return t.forEach(function(n,i){var o=n!=null?Hb(e,n):null;o!=null&&(r=r||[],r.push(o))}),r==null?null:{kind:"PluralReaderSelector",selectors:r}}function lB(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||Vl(!1),sB(e,t)):(Array.isArray(t)&&Vl(!1),Hb(e,t))}function vMe(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=lB(i,o)}return r}function bMe(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n];r[n]=uB(i,o)}return r}function uB(e,t){return t==null?t:e.metadata&&e.metadata.plural===!0?(Array.isArray(t)||Vl(!1),_Me(e,t)):(Array.isArray(t)&&Vl(!1),cB(e,t))}function _Me(e,t){var r=null;return t.forEach(function(n){var i=n!=null?cB(e,n):null;i!=null&&(r=r||[],r.push(i))}),r}function cB(e,t){typeof t=="object"&&t!==null&&!Array.isArray(t)||Vl(!1);var r=t[oB];return typeof r=="string"?r:null}function yMe(e,t){var r={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=t[n],a=dB(i,o);Object.assign(r,a)}return r}function dB(e,t){var r;return t==null?{}:((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0?(Array.isArray(t)||Vl(!1),fB(e,t)):(Array.isArray(t)&&Vl(!1),_C(e,t)||{})}function _C(e,t){var r=Hb(e,t);return r?r.variables:null}function fB(e,t){var r={};return t.forEach(function(n,i){if(n!=null){var o=_C(e,n);o!=null&&Object.assign(r,o)}}),r}function qF(e,t){return e.dataID===t.dataID&&e.node===t.node&&aB(e.variables,t.variables)&&xMe(e.owner,t.owner)&&e.isWithinUnmatchedTypeRefinement===t.isWithinUnmatchedTypeRefinement&&SMe(e.clientEdgeTraversalPath,t.clientEdgeTraversalPath)}function xMe(e,t){return e===t?!0:e.identifier===t.identifier&&aB(e.cacheConfig,t.cacheConfig)}function SMe(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(var r=e.length;r--;){var n=e[r],i=t[r];if(n!==i&&(n==null||i==null||n.clientEdgeDestinationID!==i.clientEdgeDestinationID||n.readerClientEdge!==i.readerClientEdge))return!1}return!0}function wMe(e,t){return e===t?!0:e==null?t==null:t==null?e==null:e.kind==="SingularReaderSelector"&&t.kind==="SingularReaderSelector"?qF(e,t):e.kind==="PluralReaderSelector"&&t.kind==="PluralReaderSelector"?e.selectors.length===t.selectors.length&&e.selectors.every(function(r,n){return qF(r,t.selectors[n])}):!1}function hB(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,o=arguments.length>5?arguments[5]:void 0;return{kind:"SingularReaderSelector",dataID:t,isWithinUnmatchedTypeRefinement:i,clientEdgeTraversalPath:o??null,node:e,variables:r,owner:n}}function EMe(e,t,r){return{dataID:t,node:e,variables:r}}var ka={areEqualSelectors:wMe,createReaderSelector:hB,createNormalizationSelector:EMe,getDataIDsFromFragment:uB,getDataIDsFromObject:bMe,getSingularSelector:Hb,getPluralSelector:sB,getSelector:lB,getSelectorsFromObject:vMe,getVariablesFromSingularFragment:_C,getVariablesFromPluralFragment:fB,getVariablesFromFragment:dB,getVariablesFromObject:yMe},kMe=Ea,CMe=kMe.getFragment,RMe=gm,AMe=RMe.eventShouldThrow,$Me=ka,TMe=$Me.getSelector,VF=Be,Ih=[];function NMe(e,t){Ih.push(e);try{return t()}finally{Ih.pop()}}function DMe(e,t){if(!Ih.length)throw new Error("readFragment should be called only from within a Relay Resolver function.");var r=Ih[Ih.length-1],n=CMe(e),i=TMe(n,t);i==null&&VF(!1),i.kind!=="SingularReaderSelector"&&VF(!1);var o=r.getDataForResolverFragment(i,t),a=o.data,s=o.isMissingData,l=o.fieldErrors;if(s||l!=null&&l.some(AMe))throw pB;return a}var pB={},yC={readFragment:DMe,withResolverContext:NMe,RESOLVER_FRAGMENT_ERRORED_SENTINEL:pB},FMe=yC;FMe.readFragment;var mB={exports:{}};(function(e){function t(n,i,o,a,s,l,c){try{var d=n[l](c),f=d.value}catch(h){return void o(h)}d.done?i(f):Promise.resolve(f).then(a,s)}function r(n){return function(){var i=this,o=arguments;return new Promise(function(a,s){var l=n.apply(i,o);function c(f){t(l,a,s,c,d,"next",f)}function d(f){t(l,a,s,c,d,"throw",f)}c(void 0)})}}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(mB);var gB=mB.exports;function IMe(e){return e!=null&&typeof e=="object"&&typeof e.then=="function"}var vB=IMe,PMe=vB,ms=BMe,kp=(function(){e.create=function(n){return new e(n)};function e(r){this._source=r}e.onUnhandledError=function(n){ms=n},e.from=function(n){return OMe(n)?MMe(n):PMe(n)?LMe(n):zMe(n)};var t=e.prototype;return t.catch=function(n){var i=this;return e.create(function(o){var a;return i.subscribe({start:function(l){a=l},next:o.next,complete:o.complete,error:function(l){try{n(l).subscribe({start:function(d){a=d},next:o.next,complete:o.complete,error:o.error})}catch(c){o.error(c,!0)}}}),function(){return a.unsubscribe()}})},t.concat=function(n){var i=this;return e.create(function(o){var a;return i.subscribe({start:function(l){a=l},next:o.next,error:o.error,complete:function(){a=n.subscribe(o)}}),function(){a&&a.unsubscribe()}})},t.do=function(n){var i=this;return e.create(function(o){var a=function(l){return function(){try{n[l]&&n[l].apply(n,arguments)}catch(c){ms(c,!0)}o[l]&&o[l].apply(o,arguments)}};return i.subscribe({start:a("start"),next:a("next"),error:a("error"),complete:a("complete"),unsubscribe:a("unsubscribe")})})},t.finally=function(n){var i=this;return e.create(function(o){var a=i.subscribe(o);return function(){a.unsubscribe(),n()}})},t.ifEmpty=function(n){var i=this;return e.create(function(o){var a=!1,s;return s=i.subscribe({next:function(c){a=!0,o.next(c)},error:o.error,complete:function(){a?o.complete():s=n.subscribe(o)}}),function(){s&&s.unsubscribe()}})},t.subscribe=function(n){return UMe(this._source,n)},t.map=function(n){var i=this;return e.create(function(o){var a=i.subscribe({complete:o.complete,error:o.error,next:function(l){try{var c=n(l);o.next(c)}catch(d){o.error(d,!0)}}});return function(){a.unsubscribe()}})},t.mergeMap=function(n){var i=this;return e.create(function(o){var a=[];function s(c){this._sub=c,a.push(c)}function l(){a.splice(a.indexOf(this._sub),1),a.length===0&&o.complete()}return i.subscribe({start:s,next:function(d){try{o.closed||e.from(n(d)).subscribe({start:s,next:o.next,error:o.error,complete:l})}catch(f){o.error(f,!0)}},error:o.error,complete:l}),function(){a.forEach(function(c){return c.unsubscribe()}),a.length=0}})},t.poll=function(n){var i=this;return e.create(function(o){var a,s,l=function c(){a=i.subscribe({next:o.next,error:o.error,complete:function(){s=setTimeout(c,n)}})};return l(),function(){clearTimeout(s),a.unsubscribe()}})},t.toPromise=function(){var n=this;return new Promise(function(i,o){var a=!1;n.subscribe({next:function(l){a||(a=!0,i(l))},error:o,complete:i})})},e})();function OMe(e){return typeof e=="object"&&e!==null&&typeof e.subscribe=="function"}function MMe(e){return e instanceof kp?e:kp.create(function(t){return e.subscribe(t)})}function LMe(e){return kp.create(function(t){e.then(function(r){t.next(r),t.complete()},t.error)})}function zMe(e){return kp.create(function(t){t.next(e),t.complete()})}function UMe(e,t){var r=!1,n,i=function(c){return Object.defineProperty(c,"closed",{get:function(){return r}})};function o(){if(n){if(n.unsubscribe)n.unsubscribe();else try{n()}catch(l){ms(l,!0)}n=void 0}}var a=i({unsubscribe:function(){if(!r){r=!0;try{t.unsubscribe&&t.unsubscribe(a)}catch(c){ms(c,!0)}finally{o()}}}});try{t.start&&t.start(a)}catch(l){ms(l,!0)}if(r)return a;var s=i({next:function(c){if(!r&&t.next)try{t.next(c)}catch(d){ms(d,!0)}},error:function(c,d){if(r||!t.error)r=!0,ms(c,d||!1),o();else{r=!0;try{t.error(c)}catch(f){ms(f,!0)}finally{o()}}},complete:function(){if(!r){r=!0;try{t.complete&&t.complete()}catch(c){ms(c,!0)}finally{o()}}}});try{n=e(s)}catch(l){s.error(l,!0)}return r&&o(),a}function BMe(e,t){}var Xl=kp,bB=Je.default,jMe=bB(qr),hg=bB(wi),qMe=Xl,VMe=Be,GMe=(function(){function e(){var r=this;(0,hg.default)(this,"_complete",!1),(0,hg.default)(this,"_events",[]),(0,hg.default)(this,"_sinks",new Set),(0,hg.default)(this,"_subscription",[]),this._observable=qMe.create(function(n){r._sinks.add(n);for(var i=r._events,o=0;o<i.length&&!n.closed;o++){var a=i[o];switch(a.kind){case"complete":n.complete();break;case"error":n.error(a.error);break;case"next":n.next(a.data);break;default:a.kind,VMe(!1)}}return function(){r._sinks.delete(n)}})}var t=e.prototype;return t.complete=function(){this._complete!==!0&&(this._complete=!0,this._events.push({kind:"complete"}),this._sinks.forEach(function(n){return n.complete()}))},t.error=function(n){this._complete!==!0&&(this._complete=!0,this._events.push({kind:"error",error:n}),this._sinks.forEach(function(i){return i.error(n)}))},t.next=function(n){this._complete!==!0&&(this._events.push({kind:"next",data:n}),this._sinks.forEach(function(i){return i.next(n)}))},t.subscribe=function(n){var i=this._observable.subscribe(n);return this._subscription.push(i),i},t.unsubscribe=function(){var n=(0,jMe.default)(this._subscription),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.unsubscribe()}}catch(a){n.e(a)}finally{n.f()}this._subscription=[]},t.getObserverCount=function(){return this._sinks.size},e})(),_B=GMe,xC=Xl,GF=_B,yB=Be,KMe=typeof WeakMap=="function",KF=KMe?new WeakMap:new Map;function HMe(e,t){return xB(e,t.request.identifier,function(){return e.execute({operation:t})})}function xB(e,t,r){return xC.create(function(n){var i=SC(e),o=i.get(t);return o||r().finally(function(){return i.delete(t)}).subscribe({start:function(s){o={identifier:t,subject:new GF,subjectForInFlightStatus:new GF,subscription:s,promise:null},i.set(t,o)},next:function(s){var l=pg(i,t);l.subject.next(s),l.subjectForInFlightStatus.next(s)},error:function(s){var l=pg(i,t);l.subject.error(s),l.subjectForInFlightStatus.error(s)},complete:function(){var s=pg(i,t);s.subject.complete(),s.subjectForInFlightStatus.complete()},unsubscribe:function(s){var l=pg(i,t);l.subject.unsubscribe(),l.subjectForInFlightStatus.unsubscribe()}}),o==null&&yB(!1),WMe(i,o).subscribe(n)})}function WMe(e,t){return xC.create(function(r){var n=t.subject.subscribe(r);return function(){n.unsubscribe();var i=e.get(t.identifier);if(i){var o=i.subscription;o!=null&&i.subject.getObserverCount()===0&&(o.unsubscribe(),e.delete(t.identifier))}}})}function SB(e,t,r){return xC.create(function(n){var i=r.subjectForInFlightStatus.subscribe({error:n.error,next:function(a){if(!e.isRequestActive(r.identifier)){n.complete();return}n.next()},complete:n.complete,unsubscribe:n.complete});return function(){i.unsubscribe()}})}function JMe(e,t){var r=SC(e),n=r.get(t.identifier);if(!n||!e.isRequestActive(n.identifier))return null;var i=new Promise(function(o,a){var s=!1;SB(e,r,n).subscribe({complete:o,error:a,next:function(c){s&&o(c)}}),s=!0});return i}function QMe(e,t){var r=SC(e),n=r.get(t.identifier);return!n||!e.isRequestActive(n.identifier)?null:SB(e,r,n)}function SC(e){var t=KF.get(e);if(t!=null)return t;var r=new Map;return KF.set(e,r),r}function pg(e,t){var r=e.get(t);return r==null&&yB(!1),r}var Wb={fetchQuery:HMe,fetchQueryDeduped:xB,getPromiseForActiveRequest:JMe,getObservableForActiveRequest:QMe},YMe=Je.default;gB.default;var XMe=YMe(qr),wB=Xl,ZMe=Wb,e6e=ZMe.getObservableForActiveRequest,t6e=Ea,r6e=t6e.getFragment,n6e=gm,i6e=n6e.handlePotentialSnapshotErrors,o6e=ka,a6e=o6e.getSelector,h0=Be;function s6e(e,t,r){var n,i=r6e(t),o=a6e(i,r);switch(((n=i.metadata)===null||n===void 0?void 0:n.hasClientEdges)!=null&&h0(!1),o==null&&h0(!1),o.kind){case"SingularReaderSelector":return l6e(e,t,o);case"PluralReaderSelector":return u6e(e,t,o)}h0(!1)}function l6e(e,t,r){var n=e.lookup(r);return wB.create(function(i){i.next(Cv(e,t,r.owner,n));var o=e.subscribe(n,function(a){i.next(Cv(e,t,r.owner,a))});return function(){return o.dispose()}})}function u6e(e,t,r){var n=r.selectors.map(function(i){return e.lookup(i)});return wB.create(function(i){var o=n.map(function(s,l){return Cv(e,t,r.selectors[l].owner,s)});i.next(HF(o));var a=n.map(function(s,l){return e.subscribe(s,function(c){o[l]=Cv(e,t,r.selectors[l].owner,c),i.next(HF(o))})});return function(){return a.forEach(function(s){return s.dispose()})}})}function Cv(e,t,r,n){var i=n.missingLiveResolverFields!=null&&n.missingLiveResolverFields.length>0,o=n.missingClientEdges!=null&&n.missingClientEdges.length>0;if(i||o)return{state:"loading"};if(n.isMissingData&&(e6e(e,r)!=null||e.getOperationTracker().getPendingOperationsAffectingOwner(r)!=null))return{state:"loading"};try{i6e(e,n.fieldErrors)}catch(a){return{error:a,state:"error"}}return n.data==null&&h0(!1),{state:"ok",value:n.data}}function HF(e){var t=[],r=(0,XMe.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.state==="ok")t.push(i.value);else return i}}catch(o){r.e(o)}finally{r.f()}return{state:"ok",value:t}}var wC={observeFragment:s6e};function EB(e){return c6e(e)&&(Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];r&&typeof r=="object"&&!Object.isFrozen(r)&&EB(r)})),e}function c6e(e){return e!=null&&(Array.isArray(e)||typeof e=="object"&&e.constructor===Object)}var kB=EB,d6e=hc,f6e=d6e.stableCopy,h6e=Be;function p6e(e,t){var r=e.cacheID!=null?e.cacheID:e.id;return r==null&&h6e(!1),r+JSON.stringify(f6e(t))}var CB=p6e,m6e=CB,g6e=Ko,v6e=hc,b6e=v6e.hasCycle,_6e=Yl,y6e=_6e.getOperationVariables,RB=ka,x6e=RB.createNormalizationSelector,S6e=RB.createReaderSelector,w6e=wr,E6e=w6e.ROOT_ID,k6e=Be;function C6e(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:E6e,i=e.operation,o=y6e(i,e.params.providedVariables,t);g6e.ENABLE_CYLE_DETECTION_IN_VARIABLES&&b6e(o)&&k6e(!1);var a=AB(e,o,r),s={fragment:S6e(e.fragment,n,o,a),request:a,root:x6e(i,n,o)};return s}function AB(e,t,r){var n={identifier:m6e(e.params,t),node:e,variables:t,cacheConfig:r};return n}var Zl={createOperationDescriptor:C6e,createRequestDescriptor:AB},R6e=Je.default,A6e=R6e(wi),$6e=wC,T6e=$6e.observeFragment,N6e=Zl,D6e=N6e.createOperationDescriptor;function F6e(e,t,r){var n=D6e(t,r),i={__id:n.fragment.dataID,__fragments:(0,A6e.default)({},n.fragment.node.name,n.request.variables),__fragmentOwner:n.request},o=n.request.node.fragment;return T6e(e,o,i)}var I6e={observeQuery:F6e},P6e=gB.default,O6e=wC,M6e=O6e.observeFragment;function L6e(e,t,r){return ow.apply(this,arguments)}function ow(){return ow=P6e(function*(e,t,r){var n;try{var i,o=yield new Promise(function(s,l){n=M6e(e,t,r).subscribe({next:function(d){d.state==="ok"?s(d.value):d.state==="error"&&l(d.error)}})});return(i=n)===null||i===void 0||i.unsubscribe(),o}catch(s){var a;throw(a=n)===null||a===void 0||a.unsubscribe(),s}}),ow.apply(this,arguments)}var z6e={waitForFragmentData:L6e},U6e=wC;U6e.observeFragment;var B6e=I6e;B6e.observeQuery;var j6e=z6e;j6e.waitForFragmentData;function q6e(e){return e.ok===!0}function V6e(e){return e.ok===!1}var G6e={isValueResult:q6e,isErrorResult:V6e},WF=new Map,K6e=1,H6e=W6e(),$B=" ",JF="\v";function W6e(){for(var e=new Set,t=0;t<10;++t)e.add(t.toString());return e}function J6e(e){return e[0]===$B&&H6e.has(e[1])||e[0]===JF?JF+e:e}function Q6e(e,t){if(t==null||e.length<t)return J6e(e);var r=WF.get(e);return r!=null||(r=$B+K6e++,WF.set(e,r)),r}var TB={intern:Q6e},QF=Ko,Y6e=TB,X6e=Y6e.intern,Cp="client:";function Z6e(e,t,r){var n=QF.STRING_INTERN_LEVEL<=0?e:X6e(e,QF.MAX_DATA_ID_LENGTH),i=n+":"+t;return r!=null&&(i+=":"+r),i.indexOf(Cp)!==0&&(i=Cp+i),i}function e4e(e){return e.indexOf(Cp)===0}var t4e=0;function r4e(){return"".concat(Cp,"local:").concat(t4e++)}function n4e(e,t,r){var n="".concat(Cp).concat(e,":").concat(t);return r!=null&&(n+=":"+r),n}var rs={generateClientID:Z6e,generateClientObjectClientID:n4e,generateUniqueClientID:r4e,isClientID:e4e},i4e={after:!0,before:!0,find:!0,first:!0,last:!0,surrounds:!0},YF={CURSOR:"cursor",EDGES:"edges",END_CURSOR:"endCursor",HAS_NEXT_PAGE:"hasNextPage",HAS_PREV_PAGE:"hasPreviousPage",NODE:"node",PAGE_INFO_TYPE:"PageInfo",PAGE_INFO:"pageInfo",START_CURSOR:"startCursor"},o4e={inject:function(t){YF=t},get:function(){return YF},isConnectionCall:function(t){return i4e.hasOwnProperty(t.name)}},EC=o4e,a4e=rs,Rp=a4e.generateClientID,s4e=wr,l4e=s4e.getStableStorageKey,NB=ZU,pc=EC,u4e=Be,DB="connection",aw="__connection_next_edge_index";function c4e(e,t){var r=e.get(t.dataID);if(r){var n=pc.get(),i=n.EDGES,o=n.END_CURSOR,a=n.HAS_NEXT_PAGE,s=n.HAS_PREV_PAGE,l=n.PAGE_INFO,c=n.PAGE_INFO_TYPE,d=n.START_CURSOR,f=r.getLinkedRecord(t.fieldKey),h=f&&f.getLinkedRecord(l);if(!f){r.setValue(null,t.handleKey,void 0,r.getErrors(t.fieldKey));return}var p=Rp(r.getDataID(),t.handleKey),m=r.getLinkedRecord(t.handleKey),g=m??e.get(p),v=g&&g.getLinkedRecord(l);if(g){m==null&&r.setLinkedRecord(g,t.handleKey);var S=g,w=f.getLinkedRecords(i);w&&(w=w.map(function(re){return sw(e,S,re)}));var C=S.getLinkedRecords(i),A=S.getLinkedRecord(l);S.copyFieldsFrom(f),C&&S.setLinkedRecords(C,i),A&&S.setLinkedRecord(A,l);var T=[],R=t.args;if(C&&w)if(R.after!=null){var N,I=(N=v)===null||N===void 0?void 0:N.getValue(o),M=h?.getValue(o),P=v&&R.after===I,B=v&&I===M;if(P||B){var j=new Set;mg(C,T,j),mg(w,T,j)}else return}else if(R.before!=null)if(v&&R.before===v.getValue(d)){var W=new Set;mg(w,T,W),mg(C,T,W)}else return;else T=w;else w?T=w:T=C;if(T!=null&&T!==C&&S.setLinkedRecords(T,i),v&&h){if(R.after==null&&R.before==null)v.copyFieldsFrom(h);else if(R.before!=null||R.after==null&&R.last){v.setValue(!!h.getValue(s),s);var te=h.getValue(d);typeof te=="string"&&v.setValue(te,d)}else if(R.after!=null||R.before==null&&R.first){v.setValue(!!h.getValue(a),a);var J=h.getValue(o);typeof J=="string"&&v.setValue(J,o)}}}else{var b=e.create(p,f.getType());b.setValue(0,aw),b.copyFieldsFrom(f);var y=f.getLinkedRecords(i);y&&(y=y.map(function(re){return sw(e,b,re)}),b.setLinkedRecords(y,i)),r.setLinkedRecord(b,t.handleKey),v=e.create(Rp(b.getDataID(),l),c),v.setValue(!1,a),v.setValue(!1,s),v.setValue(null,o),v.setValue(null,d),h&&v.copyFieldsFrom(h),b.setLinkedRecord(v,l)}}}function d4e(e,t,r){var n=NB(DB,t,null);return e.getLinkedRecord(n,r)}function f4e(e,t,r){var n=NB(DB,t,null),i=l4e(n,r);return Rp(e,i)}function h4e(e,t,r){var n=pc.get(),i=n.CURSOR,o=n.EDGES,a=e.getLinkedRecords(o);if(!a){e.setLinkedRecords([t],o);return}var s;if(r==null)s=a.concat(t);else{s=[];for(var l=!1,c=0;c<a.length;c++){var d=a[c];if(s.push(d),d!=null){var f=d.getValue(i);r===f&&(s.push(t),l=!0)}}l||s.push(t)}e.setLinkedRecords(s,o)}function p4e(e,t,r,n){var i=pc.get(),o=i.NODE,a=Rp(t.getDataID(),r.getDataID()),s=e.get(a);return s||(s=e.create(a,n)),s.setLinkedRecord(r,o),s.getValue("cursor")==null&&s.setValue(null,"cursor"),s}function m4e(e,t,r){var n=pc.get(),i=n.CURSOR,o=n.EDGES,a=e.getLinkedRecords(o);if(!a){e.setLinkedRecords([t],o);return}var s;if(r==null)s=[t].concat(a);else{s=[];for(var l=!1,c=0;c<a.length;c++){var d=a[c];if(d!=null){var f=d.getValue(i);r===f&&(s.push(t),l=!0)}s.push(d)}l||s.unshift(t)}e.setLinkedRecords(s,o)}function g4e(e,t){var r=pc.get(),n=r.EDGES,i=r.NODE,o=e.getLinkedRecords(n);if(o){for(var a,s=0;s<o.length;s++){var l=o[s],c=l&&l.getLinkedRecord(i);c!=null&&c.getDataID()===t?a===void 0&&(a=o.slice(0,s)):a!==void 0&&a.push(l)}a!==void 0&&e.setLinkedRecords(a,n)}}function sw(e,t,r){if(r==null)return r;var n=pc.get(),i=n.EDGES,o=t.getValue(aw);typeof o!="number"&&u4e(!1);var a=Rp(t.getDataID(),i,o),s=e.create(a,r.getType());return s.copyFieldsFrom(r),s.getValue("cursor")==null&&s.setValue(null,"cursor"),t.setValue(o+1,aw),s}function mg(e,t,r){for(var n=pc.get(),i=n.NODE,o=0;o<e.length;o++){var a=e[o];if(a){var s=a.getLinkedRecord(i),l=s&&s.getDataID();if(l){if(r.has(l))continue;r.add(l)}t.push(a)}}}var Jb={buildConnectionEdge:sw,createEdge:p4e,deleteNode:g4e,getConnection:d4e,getConnectionID:f4e,insertEdgeAfter:h4e,insertEdgeBefore:m4e,update:c4e},v4e=Je.default,Ap=v4e(qr),mc=Jb,FB=EC,Ed=Be;var b4e={update:function(t,r){var n=t.get(r.dataID);if(n!=null){var i=n.getValue(r.fieldKey);typeof i=="string"?t.delete(i):Array.isArray(i)&&i.forEach(function(o){typeof o=="string"&&t.delete(o)})}}},_4e={update:function(t,r){var n=t.get(r.dataID);if(n!=null){var i=r.handleArgs.connections;i==null&&Ed(!1);var o=n.getValue(r.fieldKey),a=Array.isArray(o)?o:[o];a.forEach(function(s){if(typeof s=="string"){var l=(0,Ap.default)(i),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=t.get(d);f!=null&&mc.deleteNode(f,s)}}catch(h){l.e(h)}finally{l.f()}}})}}},y4e={update:IB(mc.insertEdgeAfter)},x4e={update:IB(mc.insertEdgeBefore)},S4e={update:PB(mc.insertEdgeAfter)},w4e={update:PB(mc.insertEdgeBefore)};function IB(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs.connections;o==null&&Ed(!1);var a,s;try{a=i.getLinkedRecord(r.fieldKey)}catch{}if(!a)try{s=i.getLinkedRecords(r.fieldKey)}catch{}if(!(a==null&&s==null)){var l=FB.get(),c=l.NODE,d=l.EDGES,f=(n=s)!==null&&n!==void 0?n:[a],h=(0,Ap.default)(f),p;try{var m=function(){var y=p.value;if(y==null)return"continue";var S=y.getLinkedRecord("node");if(!S)return"continue";var w=S.getDataID(),C=(0,Ap.default)(o),A;try{for(C.s();!(A=C.n()).done;){var T=A.value,R=t.get(T);if(R!=null){var N=(g=R.getLinkedRecords(d))===null||g===void 0?void 0:g.some(function(M){var P;return(M==null||(P=M.getLinkedRecord(c))===null||P===void 0?void 0:P.getDataID())===w});if(!N){var I=mc.buildConnectionEdge(t,R,y);I==null&&Ed(!1),e(R,I)}}}}catch(M){C.e(M)}finally{C.f()}};for(h.s();!(p=h.n()).done;)var g,v=m()}catch(b){h.e(b)}finally{h.f()}}}}}function PB(e){return function(t,r){var n,i=t.get(r.dataID);if(i!=null){var o=r.handleArgs,a=o.connections,s=o.edgeTypeName;a==null&&Ed(!1),s==null&&Ed(!1);var l,c;try{l=i.getLinkedRecord(r.fieldKey)}catch{}if(!l)try{c=i.getLinkedRecords(r.fieldKey)}catch{}if(!(l==null&&c==null)){var d=FB.get(),f=d.NODE,h=d.EDGES,p=(n=c)!==null&&n!==void 0?n:[l],m=(0,Ap.default)(p),g;try{var v=function(){var w=g.value;if(w==null)return"continue";var C=w.getDataID(),A=(0,Ap.default)(a),T;try{for(A.s();!(T=A.n()).done;){var R=T.value,N=t.get(R);if(N!=null){var I=(b=N.getLinkedRecords(h))===null||b===void 0?void 0:b.some(function(P){var B;return(P==null||(B=P.getLinkedRecord(f))===null||B===void 0?void 0:B.getDataID())===C});if(!I){var M=mc.createEdge(t,N,w,s);M==null&&Ed(!1),e(N,M)}}}}catch(P){A.e(P)}finally{A.f()}};for(m.s();!(g=m.n()).done;)var b,y=v()}catch(S){m.e(S)}finally{m.f()}}}}}var E4e={AppendEdgeHandler:y4e,DeleteRecordHandler:b4e,PrependEdgeHandler:x4e,AppendNodeHandler:S4e,PrependNodeHandler:w4e,DeleteEdgeHandler:_4e},k4e=Jb,zc=E4e,C4e=Be;function R4e(e){switch(e){case"connection":return k4e;case"deleteRecord":return zc.DeleteRecordHandler;case"deleteEdge":return zc.DeleteEdgeHandler;case"appendEdge":return zc.AppendEdgeHandler;case"prependEdge":return zc.PrependEdgeHandler;case"appendNode":return zc.AppendNodeHandler;case"prependNode":return zc.PrependNodeHandler}C4e(!1)}var A4e=R4e;function $4e(e){return!!(e&&e["@@RelayModernEnvironment"])}var kC=$4e,T4e=Je.default,CC=T4e(qr),od=Jb;var N4e=Object.freeze({RANGE_ADD:"RANGE_ADD",RANGE_DELETE:"RANGE_DELETE",NODE_DELETE:"NODE_DELETE"}),D4e=Object.freeze({APPEND:"append",PREPEND:"prepend"});function F4e(e,t,r,n){var i=r?[r]:[],o=n?[n]:[];return e.forEach(function(a){switch(a.type){case"NODE_DELETE":var s=I4e(a,t);s&&(i.push(s),o.push(s));break;case"RANGE_ADD":var l=P4e(a,t);l&&(i.push(l),o.push(l));break;case"RANGE_DELETE":var c=O4e(a,t);c&&(i.push(c),o.push(c));break}}),{optimisticUpdater:function(s,l){i.forEach(function(c){c(s,l)})},updater:function(s,l){o.forEach(function(c){c(s,l)})}}}function I4e(e,t){var r=e.deletedIDFieldName,n=RC(t);return n?function(i,o){var a=i.getRootField(n);if(a){var s=a.getValue(r),l=Array.isArray(s)?s:[s];l.forEach(function(c){c&&typeof c=="string"&&i.delete(c)})}}:null}function P4e(e,t){var r=e.parentID,n=e.connectionInfo,i=e.edgeName;if(!r)return null;var o=RC(t);return!n||!o?null:function(a,s){var l=a.get(r);if(l){var c=a.getRootField(o);if(c){var d=c.getLinkedRecord(i),f=(0,CC.default)(n),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;if(d){var m=od.getConnection(l,p.key,p.filters);if(m){var g=od.buildConnectionEdge(a,m,d);if(g)switch(p.rangeBehavior){case"append":od.insertEdgeAfter(m,g);break;case"prepend":od.insertEdgeBefore(m,g);break;default:break}}}}}catch(v){f.e(v)}finally{f.f()}}}}}function O4e(e,t){var r=e.parentID,n=e.connectionKeys,i=e.pathToConnection,o=e.deletedIDFieldName;if(!r)return null;var a=RC(t);return a?function(s,l){if(l){var c=[],d=l[a];if(d&&Array.isArray(o)){var f=(0,CC.default)(o),h;try{for(f.s();!(h=f.n()).done;){var p=h.value;d&&typeof d=="object"&&(d=d[p])}}catch(m){f.e(m)}finally{f.f()}Array.isArray(d)?d.forEach(function(m){m&&m.id&&typeof m=="object"&&typeof m.id=="string"&&c.push(m.id)}):d&&d.id&&typeof d.id=="string"&&c.push(d.id)}else d&&typeof o=="string"&&typeof d=="object"&&(d=d[o],typeof d=="string"?c.push(d):Array.isArray(d)&&d.forEach(function(m){typeof m=="string"&&c.push(m)}));M4e(r,n,i,s,c)}}:null}function M4e(e,t,r,n,i){var o=n.get(e);if(o&&!(r.length<2)){for(var a=o,s=1;s<r.length-1;s++)a&&(a=a.getLinkedRecord(r[s]));if(!(!t||!a)){var l=(0,CC.default)(t),c;try{var d=function(){var h=c.value,p=od.getConnection(a,h.key,h.filters);p&&i.forEach(function(m){od.deleteNode(p,m)})};for(l.s();!(c=l.n()).done;)d()}catch(f){l.e(f)}finally{l.f()}}}}function RC(e){return e.fragment.selections&&e.fragment.selections.length>0&&e.fragment.selections[0].kind==="LinkedField"?e.fragment.selections[0].name:null}var Qb={MutationTypes:N4e,RangeOperations:D4e,convert:F4e},L4e=Ea,z4e=L4e.getRequest,U4e=kC,B4e=Zl,j4e=B4e.createOperationDescriptor,q4e=Qb,V4e=Be;function G4e(e,t){U4e(e)||V4e(!1);var r=z4e(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");var n=t.optimisticUpdater,i=t.configs,o=t.optimisticResponse,a=t.variables,s=j4e(r,a);if(i){var l=q4e.convert(i,r,n);n=l.optimisticUpdater}return e.applyMutation({operation:s,response:o,updater:n})}var K4e=G4e;function H4e(e,t){e.commitUpdate(t)}var W4e=H4e,J4e=Je.default;J4e(or);var Q4e=Je.default,XF=Q4e(Ql),Y4e=Ea,X4e=Y4e.getRequest,Z4e=rs,eLe=Z4e.generateUniqueClientID,tLe=kC,rLe=Zl,nLe=rLe.createOperationDescriptor,iLe=Qb,oLe=Be;function aLe(e,t){tLe(e)||oLe(!1);var r=X4e(t.mutation);if(r.params.operationKind!=="mutation")throw new Error("commitMutation: Expected mutation operation");if(r.kind!=="Request")throw new Error("commitMutation: Expected mutation to be of type request");var n=t.optimisticResponse,i=t.optimisticUpdater,o=t.updater,a=t.configs,s=t.cacheConfig,l=t.onError,c=t.onUnsubscribe,d=t.variables,f=t.uploadables,h=nLe(r,d,s,eLe());if(typeof n=="function"&&(n=n()),a){var p=iLe.convert(a,r,i,o);i=p.optimisticUpdater,o=p.updater}var m=[],g=e.executeMutation({operation:h,optimisticResponse:n,optimisticUpdater:i,updater:o,uploadables:f}).subscribe({next:function(b){var y;Array.isArray(b)?b.forEach(function(S){S.errors&&m.push.apply(m,(0,XF.default)(S.errors))}):b.errors&&m.push.apply(m,(0,XF.default)(b.errors)),(y=t.onNext)===null||y===void 0||y.call(t)},complete:function(){var b=t.onCompleted;if(b){var y=e.lookup(h.fragment);b(y.data,m.length!==0?m:null)}},error:l,unsubscribe:c});return{dispose:g.unsubscribe}}var sLe=aLe,lLe=typeof WeakMap=="function",s1=lLe?new WeakMap:new Map;function OB(e,t){if(t!=null){var r={};return Object.assign(r,e),Object.keys(t).forEach(function(n){var i=t[n].get,o=i();if(!s1.has(i))s1.set(i,o),r[n]=o;else{var a=s1.get(i);r[n]=a}}),r}else return e}OB.tests_only_resetDebugCache=void 0;var uLe=OB,ZF=Xl;function cLe(e){return function(r,n,i,o,a){var s=e(r,n,i,o,a);return s instanceof Error?ZF.create(function(l){return l.error(s)}):ZF.from(s)}}var dLe={convertFetch:cLe},fLe=uLe,hLe=dLe,pLe=hLe.convertFetch,l1=Be;function mLe(e,t){var r=pLe(e);function n(i,o,a,s,l){var c=fLe(o,i.providedVariables);if(i.operationKind==="subscription")return t||l1(!1),s&&l1(!1),t(i,c,a);var d=a.poll;return d!=null?(s&&l1(!1),r(i,c,{force:!0}).poll(d)):r(i,c,a,s,l)}return{execute:n}}var gLe={create:mLe},vLe=Je.default;vLe(or);var bLe=hc;bLe.stableCopy;var _Le=Je.default,yLe=_Le(or),xLe=Xl,SLe=Zl,wLe=SLe.createOperationDescriptor,ELe=gm,kLe=ELe.handlePotentialSnapshotErrors,CLe=Wb,RLe=Ea,ALe=RLe.getRequest,$Le=Be;function TLe(e,t,r,n){var i,o=ALe(t);o.params.operationKind!=="query"&&$Le(!1);var a=(0,yLe.default)({force:!0},n?.networkCacheConfig),s=wLe(o,r,a),l=(i=n?.fetchPolicy)!==null&&i!==void 0?i:"network-only";function c(d){return kLe(e,d.fieldErrors),d.data}switch(l){case"network-only":return eI(e,s).map(c);case"store-or-network":return e.check(s).status==="available"?xLe.from(e.lookup(s.fragment)).map(c):eI(e,s).map(c);default:throw new Error("fetchQuery: Invalid fetchPolicy "+l)}}function eI(e,t){return CLe.fetchQuery(e,t).map(function(){return e.lookup(t.fragment)})}var NLe=TLe,DLe=Zl,FLe=DLe.createOperationDescriptor,ILe=Ea,PLe=ILe.getRequest;function OLe(e,t,r,n){var i=PLe(t);if(i.params.operationKind!=="query")throw new Error("fetchQuery: Expected query operation");var o=FLe(i,r,n);return e.execute({operation:o}).map(function(){return e.lookup(o.fragment).data}).toPromise()}var MLe=OLe,LLe=(function(){function e(){this._preloadableQueries=new Map,this._callbacks=new Map}var t=e.prototype;return t.set=function(n,i){this._preloadableQueries.set(n,i);var o=this._callbacks.get(n);o?.forEach(function(a){try{a(i)}catch(s){setTimeout(function(){throw s},0)}})},t.get=function(n){return this._preloadableQueries.get(n)},t.onLoad=function(n,i){var o,a=(o=this._callbacks.get(n))!==null&&o!==void 0?o:new Set;a.add(i);var s=function(){a.delete(i)};return this._callbacks.set(n,a),{dispose:s}},t.clear=function(){this._preloadableQueries.clear()},e})(),zLe=new LLe,ULe=zLe,BLe=Wb,jLe=BLe.getPromiseForActiveRequest;function qLe(e,t,r){var n,i,o=[],a=jLe(e,r);if(a!=null)o=[r];else{var s,l,c=e.getOperationTracker(),d=c.getPendingOperationsAffectingOwner(r);o=(s=d?.pendingOperations)!==null&&s!==void 0?s:[],a=(l=d?.promise)!==null&&l!==void 0?l:null}if(!a)return null;var f=(n=(i=o)===null||i===void 0?void 0:i.map(function(m){return m.node.params.name}).join(","))!==null&&n!==void 0?n:null;(f==null||f.length===0)&&(f="Unknown pending operation");var h=t.name,p=f===h?"Relay(".concat(f,")"):"Relay(".concat(f,":").concat(h,")");return a.displayName=p,e.__log({name:"pendingoperation.found",fragment:t,fragmentOwner:r,pendingOperations:o}),{promise:a,pendingOperations:o}}var MB=qLe;function VLe(e,t){return e===t&&(e===null||typeof e!="object")}var LB=VLe;function GLe(e,t){return lw(e,t,!0)}function lw(e,t,r){if(e===t||typeof e!="object"||!e||e.constructor!==Object&&!Array.isArray(e)||typeof t!="object"||!t||t.constructor!==Object&&!Array.isArray(t))return t;var n=!1,i=Array.isArray(e)?e:null,o=Array.isArray(t)?t:null;if(i&&o){var a=r&&!Object.isFrozen(o);n=o.reduce(function(h,p,m){var g=i[m],v=lw(g,p,a);return v!==o[m]&&a&&(o[m]=v),h&&v===i[m]},!0)&&i.length===o.length}else if(!i&&!o){var s=e,l=t,c=Object.keys(s),d=Object.keys(l),f=r&&!Object.isFrozen(l);n=d.reduce(function(h,p){var m=s[p],g=lw(m,l[p],f);return g!==l[p]&&f&&(l[p]=g),h&&g===s[p]},!0)&&c.length===d.length}return n?e:t}var Yb=GLe,zB=Je.default,tI=zB(or),AC=zB(wi),KLe=MB,HLe=gm,WLe=HLe.handlePotentialSnapshotErrors,JLe=LB,QLe=Yb,UB=Ko,YLe=Zl,XLe=YLe.createRequestDescriptor,$C=ka,ZLe=$C.areEqualSelectors,e8e=$C.createReaderSelector,t8e=$C.getSelectorsFromObject,r8e=Qs,rI=Be,n8e=(function(){function e(r,n,i,o,a){var s=this;(0,AC.default)(this,"_onChange",function(){s._stale=!0,typeof s._callback=="function"&&s._callback()}),this._callback=o,this._context=r,this._data={},this._fragments=n,this._props={},this._resolvers={},this._stale=!1,this._rootIsQueryRenderer=a,this.setProps(i)}var t=e.prototype;return t.dispose=function(){for(var n in this._resolvers)this._resolvers.hasOwnProperty(n)&&BB(this._resolvers[n])},t.resolve=function(){if(this._stale){var n=this._data,i;for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var a=this._resolvers[o],s=n[o];if(a){var l=a.resolve();(i||l!==s)&&(i=i||(0,tI.default)({},n),i[o]=l)}else{var c=this._props[o],d=c!==void 0?c:null;(i||!JLe(d,s))&&(i=i||(0,tI.default)({},n),i[o]=d)}}this._data=i||n,this._stale=!1}return this._data},t.setCallback=function(n,i){this._callback=i,UB.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this.setProps(n)},t.setProps=function(n){this._props={};var i=t8e(this._fragments,n);for(var o in i)if(i.hasOwnProperty(o)){var a=i[o],s=this._resolvers[o];a==null?(s?.dispose(),s=null):a.kind==="PluralReaderSelector"?s==null?s=new nI(this._context.environment,this._rootIsQueryRenderer,a,this._callback!=null,this._onChange):(s instanceof nI||rI(!1),s.setSelector(a)):s==null?s=new uw(this._context.environment,this._rootIsQueryRenderer,a,this._callback!=null,this._onChange):(s instanceof uw||rI(!1),s.setSelector(a)),this._props[o]=n[o],this._resolvers[o]=s}this._stale=!0},t.setVariables=function(n,i){for(var o in this._resolvers)if(this._resolvers.hasOwnProperty(o)){var a=this._resolvers[o];a&&a.setVariables(n,i)}this._stale=!0},e})(),uw=(function(){function e(r,n,i,o,a){var s=this;(0,AC.default)(this,"_onChange",function(c){s._data=c.data,s._isMissingData=c.isMissingData,s._fieldErrors=c.fieldErrors,s._callback()});var l=r.lookup(i);this._callback=a,this._data=l.data,this._isMissingData=l.isMissingData,this._fieldErrors=l.fieldErrors,this._environment=r,this._rootIsQueryRenderer=n,this._selector=i,UB.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?o&&(this._subscription=r.subscribe(l,this._onChange)):this._subscription=r.subscribe(l,this._onChange)}var t=e.prototype;return t.dispose=function(){this._subscription&&(this._subscription.dispose(),this._subscription=null)},t.resolve=function(){if(this._isMissingData===!0){var n=KLe(this._environment,this._selector.node,this._selector.owner),i=n?.promise;if(i!=null&&!this._rootIsQueryRenderer){var o,a=(o=n?.pendingOperations)!==null&&o!==void 0?o:[];throw this._environment.__log({name:"suspense.fragment",data:this._data,fragment:this._selector.node,isRelayHooks:!1,isMissingData:this._isMissingData,isPromiseCached:!1,pendingOperations:a}),i}}return WLe(this._environment,this._fieldErrors),this._data},t.setSelector=function(n){if(!(this._subscription!=null&&ZLe(n,this._selector))){this.dispose();var i=this._environment.lookup(n);this._data=QLe(this._data,i.data),this._isMissingData=i.isMissingData,this._fieldErrors=i.fieldErrors,this._selector=n,this._subscription=this._environment.subscribe(i,this._onChange)}},t.setVariables=function(n,i){if(!r8e(n,this._selector.variables)){var o=XLe(i,n),a=e8e(this._selector.node,this._selector.dataID,n,o);this.setSelector(a)}},e})(),nI=(function(){function e(r,n,i,o,a){var s=this;(0,AC.default)(this,"_onChange",function(l){s._stale=!0,s._callback()}),this._callback=a,this._data=[],this._environment=r,this._resolvers=[],this._stale=!0,this._rootIsQueryRenderer=n,this._subscribeOnConstruction=o,this.setSelector(i)}var t=e.prototype;return t.dispose=function(){this._resolvers.forEach(BB)},t.resolve=function(){if(this._stale){for(var n=this._data,i,o=0;o<this._resolvers.length;o++){var a=n[o],s=this._resolvers[o].resolve();(i||s!==a)&&(i=i||n.slice(0,o),i.push(s))}!i&&this._resolvers.length!==n.length&&(i=n.slice(0,this._resolvers.length)),this._data=i||n,this._stale=!1}return this._data},t.setSelector=function(n){for(var i=n.selectors;this._resolvers.length>i.length;){var o=this._resolvers.pop();o.dispose()}for(var a=0;a<i.length;a++)a<this._resolvers.length?this._resolvers[a].setSelector(i[a]):this._resolvers[a]=new uw(this._environment,this._rootIsQueryRenderer,i[a],this._subscribeOnConstruction,this._onChange);this._stale=!0},t.setVariables=function(n,i){this._resolvers.forEach(function(o){return o.setVariables(n,i)}),this._stale=!0},e})();function BB(e){e&&e.dispose()}var i8e=n8e,o8e=i8e;function a8e(e,t,r,n,i,o){return new o8e(e,r,n,o,i)}var s8e=a8e,l8e=Be,u1,iI;function u8e(e){return u1||(u1=e.createContext(null),iI=e),e!==iI&&l8e(!1),u1}var c8e=u8e,d8e=Be,c1,oI;function f8e(e){return c1||(c1=e.createContext(null),oI=e),e!==oI&&d8e(!1),c1}var h8e=f8e,jB=Object.freeze({__LIVE_RESOLVER_SUSPENSE_SENTINEL:!0});function p8e(){return jB}function m8e(e){return e===jB}var Xb={isSuspenseSentinel:m8e,suspenseSentinel:p8e},qB={exports:{}};(function(e){function t(r,n){if(r==null)return{};var i={};for(var o in r)if({}.hasOwnProperty.call(r,o)){if(n.indexOf(o)!==-1)continue;i[o]=r[o]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(qB);var Sf=qB.exports,Zb=Je.default,g8e=Zb(wi),aI=Zb(Sf),sI=Zb(UU),Rl=Zb(or),v8e=kB,VB=rs,GB=VB.generateClientObjectClientID;VB.isClientID;var b8e=Xb,KB=b8e.isSuspenseSentinel,Ys=wr,cw=Ys.ACTOR_IDENTIFIER_KEY,Kn=Ys.ERRORS_KEY,TC=Ys.ID_KEY,_8e=Ys.INVALIDATED_AT_KEY,Gl=Ys.REF_KEY,Gd=Ys.REFS_KEY,HB=Ys.RELAY_RESOLVER_VALUE_KEY;Ys.ROOT_ID;var NC=Ys.TYPENAME_KEY,d1=Qs,tc=Be;function y8e(e){return(0,Rl.default)({},e)}function x8e(e,t){for(var r in e)e.hasOwnProperty(r)&&r!==TC&&r!==NC&&(t[r]=e[r])}function S8e(e,t){var r={};return r[TC]=e,r[NC]=t,r}function w8e(e){return e}function E8e(e){return e[TC]}function k8e(e){return Kn in e?Object.keys(e).filter(function(t){return t!==Kn}):Object.keys(e)}function C8e(e){return e[NC]}function R8e(e,t){var r;return(r=e[Kn])===null||r===void 0?void 0:r[t]}function DC(e,t){var r=e[t];return r&&typeof r=="object"&&(!r.hasOwnProperty(Gl)&&!r.hasOwnProperty(Gd)||tc(!1)),r}function A8e(e,t){return t in e}function $8e(e,t){var r=e[t];if(r==null)return r;var n=r;return typeof n=="object"&&n&&typeof n[Gl]=="string"||tc(!1),n[Gl]}function T8e(e,t){var r=e[t];if(r==null)return!1;var n=r;return typeof n=="object"&&n&&typeof n[Gl]=="string"}function N8e(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&Array.isArray(r[Gd])||tc(!1),r[Gd])}function D8e(e,t){var r=e[t];return r==null?!1:typeof r=="object"&&Array.isArray(r[Gd])&&r[Gd].every(function(n){return typeof n=="string"})}function F8e(e){if(e==null)return null;var t=e[_8e];return typeof t!="number"?null:t}function I8e(e,t){var r,n=e[Kn],i=t[Kn],o=null;if(n==null&&i==null){var a;for(var s in t)(o||!d1(e[s],t[s]))&&(o=o!==null?o:(0,Rl.default)({},e),o[s]=t[s]);return(a=o)!==null&&a!==void 0?a:e}for(var l in t)if(l!==Kn){var c=t[l],d=i?.[l];if(o==null){var f=e[l],h=n?.[l];if(d1(f,c)&&d1(h,d))continue;o=(0,Rl.default)({},e),n!=null&&(o[Kn]=(0,Rl.default)({},n))}JB(o,l,c),WB(o,l,d)}return(r=o)!==null&&r!==void 0?r:e}function P8e(e,t){if(Kn in e||Kn in t){var r=e[Kn],n=(0,aI.default)(e,[Kn].map(sI.default)),i=t[Kn],o=(0,aI.default)(t,[Kn].map(sI.default)),a=(0,Rl.default)((0,Rl.default)({},n),o);if(r==null&&i==null)return a;var s={};for(var l in r)o.hasOwnProperty(l)||(s[l]=r[l]);for(var c in i)s[c]=i[c];for(var d in s){a[Kn]=s;break}return a}else return(0,Rl.default)((0,Rl.default)({},e),t)}function O8e(e){v8e(e)}function WB(e,t,r){var n=e[Kn];if(r!=null&&r.length>0)n==null?e[Kn]=(0,g8e.default)({},t,r):n[t]=r;else if(n!=null&&delete n[t]){for(var i in n)if(n.hasOwnProperty(i))return;delete e[Kn]}}function JB(e,t,r){e[t]=r}function M8e(e,t,r){var n={};n[Gl]=r,e[t]=n}function L8e(e,t,r){var n={};n[Gd]=r,e[t]=n}function z8e(e,t,r,n){var i={};i[Gl]=n,i[cw]=r,e[t]=i}function U8e(e,t){var r=e[t];return r==null?r:(typeof r=="object"&&typeof r[Gl]=="string"&&r[cw]!=null||tc(!1),[r[cw],r[Gl]])}function B8e(e,t){var r=DC(e,HB);return r==null||KB(r)?null:(typeof r=="object"&&(r=r.id),typeof r!="string"&&tc(!1),GB(t,r))}function j8e(e,t){var r=DC(e,HB);return r==null||KB(r)?null:(Array.isArray(r)||tc(!1),r.map(function(n){return n==null?null:(typeof n=="object"&&(n=n.id),typeof n!="string"&&tc(!1),GB(t,n))}))}function q8e(e){return e}var ho={clone:y8e,copyFields:x8e,create:S8e,freeze:O8e,fromObject:w8e,getDataID:E8e,getErrors:R8e,getFields:k8e,getInvalidationEpoch:F8e,getLinkedRecordID:$8e,getLinkedRecordIDs:N8e,getType:C8e,getValue:DC,hasValue:A8e,hasLinkedRecordID:T8e,hasLinkedRecordIDs:D8e,merge:P8e,setErrors:WB,setValue:JB,setLinkedRecordID:M8e,setLinkedRecordIDs:L8e,update:I8e,getActorLinkedRecordID:U8e,setActorLinkedRecordID:z8e,getResolverLinkedRecordID:B8e,getResolverLinkedRecordIDs:j8e,toJSON:q8e},V8e={EXISTENT:"EXISTENT",NONEXISTENT:"NONEXISTENT",UNKNOWN:"UNKNOWN"},e_=V8e,G8e=Je.default,K8e=G8e(qr),lI=ho,FC=e_,H8e=FC.EXISTENT,W8e=FC.NONEXISTENT,J8e=FC.UNKNOWN,Q8e=(function(){function e(r){var n=this;this._records=new Map,r!=null&&Object.keys(r).forEach(function(i){var o=r[i],a=lI.fromObject(o);n._records.set(i,a)})}e.create=function(n){return new e(n)};var t=e.prototype;return t.clear=function(){this._records=new Map},t.delete=function(n){this._records.set(n,null)},t.get=function(n){return this._records.get(n)},t.getRecordIDs=function(){return Array.from(this._records.keys())},t.getStatus=function(n){return this._records.has(n)?this._records.get(n)==null?W8e:H8e:J8e},t.has=function(n){return this._records.has(n)},t.remove=function(n){this._records.delete(n)},t.set=function(n,i){this._records.set(n,i)},t.size=function(){return this._records.size},t.toJSON=function(){var n={},i=(0,K8e.default)(this._records),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=a[0],l=a[1];n[s]=lI.toJSON(l)}}catch(c){i.e(c)}finally{i.f()}return n},e})(),gc=Q8e,Y8e=Be,QB="INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE";function X8e(e){e!==QB&&Y8e(!1)}var IC={assertInternalActorIdentifier:X8e,getActorIdentifier:function(t){return t},INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE:QB},dw="actor_key",Z8e=IC,e5e=Z8e.getActorIdentifier;function t5e(e){if(e!=null&&typeof e=="object"&&typeof e[dw]=="string")return e5e(e[dw])}var r5e={ACTOR_IDENTIFIER_FIELD_NAME:dw,getActorIdentifierFromPayload:t5e},t_=Je.default,uI=t_(or),n5e=t_(Sf),YB=t_(qr),i5e=t_(Ql),o5e=["path","locations"],fw=Symbol("$SELF");function a5e(e){if(e==null)return null;var t=new Map,r=(0,YB.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i.path,a=i.locations,s=(0,n5e.default)(i,o5e);if(o!=null){var l=o.length;if(l!==0){for(var c=l-1,d=t,f=0;f<c;f++){var h=o[f],p=d.get(h);if(p instanceof Map){d=p;continue}var m=new Map;Array.isArray(p)&&m.set(fw,p),d.set(h,m),d=m}var g=o[c],v=d.get(g);v instanceof Map&&(d=v,v=d.get(g),g=fw),Array.isArray(v)?v.push(s):d.set(g,[s])}}}}catch(b){r.e(b)}finally{r.f()}return t}function s5e(e,t){var r=e.get(t);if(r==null)return null;if(Array.isArray(r))return r;var n=[];return XB(r,n),n}function XB(e,t){var r=(0,YB.default)(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=i[0],a=i[1],s=t.length;if(Array.isArray(a)?t.push.apply(t,(0,i5e.default)(a)):XB(a,t),o!==fw)for(var l=t.length,c=s;c<l;c++){var d=t[c];d.path==null?t[c]=(0,uI.default)((0,uI.default)({},d),{},{path:[o]}):d.path.unshift(o)}}}catch(f){r.e(f)}finally{r.f()}}function l5e(e,t){var r=e.get(t);return r instanceof Map?r:null}var u5e={buildErrorTrie:a5e,getNestedErrorTrieByKey:l5e,getErrorsByKey:s5e},c5e="client:__type:",d5e="__TypeSchema";function f5e(e){return c5e+e}var r_={generateTypeID:f5e,TYPE_SCHEMA_TYPE:d5e},ZB=Je.default,h5e=ZB(qr),Qf=ZB(Ql),ej=r5e;ej.ACTOR_IDENTIFIER_FIELD_NAME;var p5e=ej.getActorIdentifierFromPayload,cI=Ko,tj=rs,f1=tj.generateClientID,m5e=tj.isClientID,g5e=Yl,v5e=g5e.getLocalVariables,PC=u5e,b5e=PC.buildErrorTrie,_5e=PC.getErrorsByKey,dI=PC.getNestedErrorTrieByKey,yt=ho,y5e=ka,x5e=y5e.createNormalizationSelector,vc=wr,S5e=vc.ROOT_ID,w5e=vc.TYPENAME_KEY,fI=vc.getArgumentValues,E5e=vc.getHandleStorageKey,k5e=vc.getModuleComponentKey,C5e=vc.getModuleOperationKey,h1=vc.getStorageKey,rj=r_,p1=rj.TYPE_SCHEMA_TYPE,m1=rj.generateTypeID,Ai=Be;function R5e(e,t,r,n,i,o){var a=t.dataID,s=t.node,l=t.variables,c=new A5e(e,l,n,o??!1);return c.normalizeResponse(s,a,r,i)}var A5e=(function(){function e(r,n,i,o){this._actorIdentifier=i.actorIdentifier,this._getDataId=i.getDataID,this._handleFieldPayloads=[],this._treatMissingFieldsAsNull=i.treatMissingFieldsAsNull,this._incrementalPlaceholders=[],this._isClientExtension=!1,this._isUnmatchedAbstractType=!1,this._useExecTimeResolvers=o,this._followupPayloads=[],this._path=i.path?(0,Qf.default)(i.path):[],this._recordSource=r,this._variables=n,this._shouldProcessClientComponents=i.shouldProcessClientComponents,this._log=i.log}var t=e.prototype;return t.normalizeResponse=function(n,i,o,a){var s=this._recordSource.get(i);return s||Ai(!1),this._assignClientAbstractTypes(n),this._errorTrie=b5e(a),this._traverseSelections(n,s,o),{errors:a,fieldPayloads:this._handleFieldPayloads,incrementalPlaceholders:this._incrementalPlaceholders,followupPayloads:this._followupPayloads,source:this._recordSource,isFinal:!1}},t._assignClientAbstractTypes=function(n){var i=n.clientAbstractTypes;if(i!=null)for(var o=0,a=Object.keys(i);o<a.length;o++){var s=a[o],l=(0,h5e.default)(i[s]),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=m1(d),h=this._recordSource.get(f);h==null&&(h=yt.create(f,p1),this._recordSource.set(f,h)),yt.setValue(h,s,!0)}}catch(p){l.e(p)}finally{l.f()}}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Ai(!1),this._variables[n]},t._getRecordType=function(n){var i=n[w5e];return i==null&&Ai(!1),i},t._traverseSelections=function(n,i,o){for(var a=0;a<n.selections.length;a++){var s=n.selections[a];switch(s.kind){case"ScalarField":case"LinkedField":this._normalizeField(s,i,o);break;case"Condition":var l=!!this._getVariableValue(s.condition);l===s.passingValue&&this._traverseSelections(s,i,o);break;case"FragmentSpread":{var c=this._variables;this._variables=v5e(this._variables,s.fragment.argumentDefinitions,s.args),this._traverseSelections(s.fragment,i,o),this._variables=c;break}case"InlineFragment":{var d=s.abstractKey;if(d==null){var f=yt.getType(i);f===s.type&&this._traverseSelections(s,i,o)}else{var h=Object.prototype.hasOwnProperty.call(o,d),p=yt.getType(i),m=m1(p),g=this._recordSource.get(m);g==null&&(g=yt.create(m,p1),this._recordSource.set(m,g)),yt.setValue(g,d,h),h&&this._traverseSelections(s,i,o)}break}case"TypeDiscriminator":{var v=s.abstractKey,b=Object.prototype.hasOwnProperty.call(o,v),y=yt.getType(i),S=m1(y),w=this._recordSource.get(S);w==null&&(w=yt.create(S,p1),this._recordSource.set(S,w)),yt.setValue(w,v,b);break}case"LinkedHandle":case"ScalarHandle":var C=s.args?fI(s.args,this._variables):{},A=h1(s,this._variables),T=E5e(s,this._variables);this._handleFieldPayloads.push({args:C,dataID:yt.getDataID(i),fieldKey:A,handle:s.handle,handleKey:T,handleArgs:s.handleArgs?fI(s.handleArgs,this._variables):{}});break;case"ModuleImport":this._normalizeModuleImport(s,i,o);break;case"Defer":this._normalizeDefer(s,i,o);break;case"Stream":this._normalizeStream(s,i,o);break;case"ClientExtension":var R=this._isClientExtension;this._isClientExtension=!0,this._traverseSelections(s,i,o),this._isClientExtension=R;break;case"ClientComponent":if(this._shouldProcessClientComponents===!1)break;this._traverseSelections(s.fragment,i,o);break;case"ActorChange":this._normalizeActorChange(s,i,o);break;case"RelayResolver":case"RelayLiveResolver":this._useExecTimeResolvers||this._normalizeResolver(s,i,o);break;case"ClientEdgeToClientObject":this._useExecTimeResolvers||this._normalizeResolver(s.backingField,i,o);break;default:Ai(!1)}}},t._normalizeResolver=function(n,i,o){n.fragment!=null&&this._traverseSelections(n.fragment,i,o)},t._normalizeDefer=function(n,i,o){var a=n.if===null||this._getVariableValue(n.if);a===!1?this._traverseSelections(n,i,o):this._incrementalPlaceholders.push({kind:"defer",data:o,label:n.label,path:(0,Qf.default)(this._path),selector:x5e(n,yt.getDataID(i),this._variables),typeName:yt.getType(i),actorIdentifier:this._actorIdentifier})},t._normalizeStream=function(n,i,o){this._traverseSelections(n,i,o);var a=n.if===null||this._getVariableValue(n.if);a===!0&&this._incrementalPlaceholders.push({kind:"stream",label:n.label,path:(0,Qf.default)(this._path),parentID:yt.getDataID(i),node:n,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeModuleImport=function(n,i,o){typeof o=="object"&&o||Ai(!1);var a=yt.getType(i),s=k5e(n.documentName),l=n.componentModuleProvider||o[s];yt.setValue(i,s,l??null);var c=C5e(n.documentName),d=n.operationModuleProvider||o[c];yt.setValue(i,c,d??null),d!=null&&this._followupPayloads.push({kind:"ModuleImportPayload",args:n.args,data:o,dataID:yt.getDataID(i),operationReference:d,path:(0,Qf.default)(this._path),typeName:a,variables:this._variables,actorIdentifier:this._actorIdentifier})},t._normalizeField=function(n,i,o){typeof o=="object"&&o||Ai(!1);var a=n.alias||n.name,s=h1(n,this._variables),l=o[a],c=cI.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(l)&&l.length===0;if(l==null||c){if(l===void 0){var d=this._isClientExtension||this._isUnmatchedAbstractType;if(d)return;if(!this._treatMissingFieldsAsNull)return}n.kind==="ScalarField"&&this._validateConflictingFieldsWithIdenticalId(i,s,null),c?n.kind==="LinkedField"?yt.setLinkedRecordIDs(i,s,[]):yt.setValue(i,s,[]):yt.setValue(i,s,null);var f=this._errorTrie;if(f!=null){var h=_5e(f,a);h!=null&&yt.setErrors(i,s,h)}return}if(n.kind==="ScalarField")this._validateConflictingFieldsWithIdenticalId(i,s,l),yt.setValue(i,s,l);else if(n.kind==="LinkedField"){this._path.push(a);var p=this._errorTrie;this._errorTrie=p==null?null:dI(p,a),n.plural?this._normalizePluralLink(n,i,s,l):this._normalizeLink(n,i,s,l),this._errorTrie=p,this._path.pop()}else Ai(!1)},t._normalizeActorChange=function(n,i,o){var a,s=n.linkedField;typeof o=="object"&&o||Ai(!1);var l=s.alias||s.name,c=h1(s,this._variables),d=o[l];if(d==null){if(d===void 0){var f=this._isClientExtension||this._isUnmatchedAbstractType;if(f)return;if(!this._treatMissingFieldsAsNull)return}yt.setValue(i,c,null);return}var h=p5e(d);if(h==null){yt.setValue(i,c,null);return}var p=(a=s.concreteType)!==null&&a!==void 0?a:this._getRecordType(d),m=this._getDataId(d,p)||yt.getLinkedRecordID(i,c)||f1(yt.getDataID(i),c);typeof m!="string"&&Ai(!1),yt.setActorLinkedRecordID(i,c,h,m),this._followupPayloads.push({kind:"ActorPayload",data:d,dataID:m,path:[].concat((0,Qf.default)(this._path),[l]),typeName:p,variables:this._variables,node:s,actorIdentifier:h})},t._normalizeLink=function(n,i,o,a){var s;typeof a=="object"&&a||Ai(!1);var l=this._getDataId(a,(s=n.concreteType)!==null&&s!==void 0?s:this._getRecordType(a))||yt.getLinkedRecordID(i,o)||f1(yt.getDataID(i),o);typeof l!="string"&&Ai(!1),this._validateConflictingLinkedFieldsWithIdenticalId(yt.getLinkedRecordID(i,o),l,o),yt.setLinkedRecordID(i,o,l);var c=this._recordSource.get(l);if(c)this._validateRecordType(c,n,a);else{var d=n.concreteType||this._getRecordType(a);c=yt.create(l,d),this._recordSource.set(l,c)}this._traverseSelections(n,c,a)},t._normalizePluralLink=function(n,i,o,a){var s=this;Array.isArray(a)||Ai(!1);var l=yt.getLinkedRecordIDs(i,o),c=[];a.forEach(function(d,f){var h;if(d==null){c.push(d);return}s._path.push(String(f));var p=s._errorTrie;s._errorTrie=p==null?null:dI(p,f),typeof d!="object"&&Ai(!1);var m=s._getDataId(d,(h=n.concreteType)!==null&&h!==void 0?h:s._getRecordType(d))||l&&l[f]||f1(yt.getDataID(i),o,f);typeof m!="string"&&Ai(!1),c.push(m);var g=s._recordSource.get(m);if(g)s._validateRecordType(g,n,d);else{var v=n.concreteType||s._getRecordType(d);g=yt.create(m,v),s._recordSource.set(m,g)}l&&s._validateConflictingLinkedFieldsWithIdenticalId(l[f],m,o),s._traverseSelections(n,g,d),s._errorTrie=p,s._path.pop()}),yt.setLinkedRecordIDs(i,o,c)},t._validateRecordType=function(n,i,o){if(cI.ENABLE_STORE_ID_COLLISION_LOGGING){var a,s=(a=i.concreteType)!==null&&a!==void 0?a:this._getRecordType(o),l=yt.getDataID(n),c=m5e(l)&&l!==S5e||yt.getType(n)===s;if(!c){var d={name:"idCollision.typename",previous_typename:yt.getType(n),new_typename:s};this._log!=null&&this._log(d)}}},t._validateConflictingFieldsWithIdenticalId=function(n,i,o){},t._validateConflictingLinkedFieldsWithIdenticalId=function(n,i,o){},e})(),nj={normalize:R5e},n_=Je.default,hI=n_(or),$5e=n_(ho),T5e=n_(gc),N5e=n_(nj);function D5e(e,t,r,n,i){var o,a=e.data,s=e.errors,l=T5e.default.create(),c=$5e.default.create(t.dataID,r);l.set(t.dataID,c);var d=N5e.default.normalize(l,t,a,n,s,i);return(0,hI.default)((0,hI.default)({},d),{},{isFinal:((o=e.extensions)===null||o===void 0?void 0:o.is_final)===!0})}var F5e=D5e,I5e=Ea,P5e=I5e.getInlineDataFragment,O5e=wr,M5e=O5e.FRAGMENTS_KEY,pI=Be;function L5e(e,t){var r,n=P5e(e);if(t==null)return t;typeof t!="object"&&pI(!1);var i=(r=t[M5e])===null||r===void 0?void 0:r[n.name];return i==null&&pI(!1),i}var z5e=L5e,U5e=1e5;function B5e(){return U5e++}var ij=B5e,j5e=ij;function q5e(e,t){return{execute:function(n,i,o,a,s,l,c,d){var f=j5e(),h={start:function(g){e.__log({name:"network.start",networkRequestId:f,params:n,variables:i,cacheConfig:o})},next:function(g){e.__log({name:"network.next",networkRequestId:f,response:g})},error:function(g){e.__log({name:"network.error",networkRequestId:f,error:g})},complete:function(){e.__log({name:"network.complete",networkRequestId:f})},unsubscribe:function(){e.__log({name:"network.unsubscribe",networkRequestId:f})}},p=function(g){e.__log({name:"network.info",networkRequestId:f,info:g})};return t.execute(n,i,o,a,p,l,c,d).do(h)}}}var V5e=q5e,G5e=Je.default,Yf=G5e(qr),K5e=Be,H5e=(function(){function e(){this._ownersToPendingOperations=new Map,this._pendingOperationsToOwners=new Map,this._ownersToPendingPromise=new Map}var t=e.prototype;return t.update=function(n,i){if(i.size!==0){var o=n.identifier,a=new Set,s=(0,Yf.default)(i),l;try{for(s.s();!(l=s.n()).done;){var c=l.value,d=c.identifier,f=this._ownersToPendingOperations.get(d);f!=null?f.has(o)||(f.set(o,n),a.add(d)):(this._ownersToPendingOperations.set(d,new Map([[o,n]])),a.add(d))}}catch(v){s.e(v)}finally{s.f()}if(a.size!==0){var h=this._pendingOperationsToOwners.get(o)||new Set,p=(0,Yf.default)(a),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;this._resolveOwnerResolvers(g),h.add(g)}}catch(v){p.e(v)}finally{p.f()}this._pendingOperationsToOwners.set(o,h)}}},t.complete=function(n){var i=n.identifier,o=this._pendingOperationsToOwners.get(i);if(o!=null){var a=new Set,s=new Set,l=(0,Yf.default)(o),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=this._ownersToPendingOperations.get(d);f&&(f.delete(i),f.size>0?s.add(d):a.add(d))}}catch(y){l.e(y)}finally{l.f()}var h=(0,Yf.default)(a),p;try{for(h.s();!(p=h.n()).done;){var m=p.value;this._resolveOwnerResolvers(m),this._ownersToPendingOperations.delete(m)}}catch(y){h.e(y)}finally{h.f()}var g=(0,Yf.default)(s),v;try{for(g.s();!(v=g.n()).done;){var b=v.value;this._resolveOwnerResolvers(b)}}catch(y){g.e(y)}finally{g.f()}this._pendingOperationsToOwners.delete(i)}},t._resolveOwnerResolvers=function(n){var i=this._ownersToPendingPromise.get(n);i?.resolve(),this._ownersToPendingPromise.delete(n)},t.getPendingOperationsAffectingOwner=function(n){var i=n.identifier,o=this._ownersToPendingOperations.get(i);if(o==null||o.size===0)return null;var a=this._ownersToPendingPromise.get(i);if(a!=null)return{promise:a.promise,pendingOperations:a.pendingOperations};var s,l=new Promise(function(d){s=d});s==null&&K5e(!1);var c=Array.from(o.values());return this._ownersToPendingPromise.set(i,{promise:l,resolve:s,pendingOperations:c}),{promise:l,pendingOperations:c}},e})(),W5e=H5e;function J5e(e){var t=typeof g0<"u"?g0:typeof window<"u"?window:void 0,r=t&&t.__RELAY_DEVTOOLS_HOOK__;r&&r.registerEnvironment(e)}var Q5e=J5e,Y5e=rs,X5e=Y5e.generateClientID,Z5e=wr,eze=Z5e.ROOT_ID,tze=X5e(eze,"viewer"),rze="Viewer",OC={VIEWER_ID:tze,VIEWER_TYPE:rze},oj=OC,nze=oj.VIEWER_ID,ize=oj.VIEWER_TYPE;function oze(e,t){return t===ize&&e.id==null?nze:e.id}var aj=oze,aze=function(t){},sze=aze,sj=fc,lze=sj.REQUEST,uze=sj.SPLIT_OPERATION;function cze(e){switch(e.kind){case lze:return e.operation;case uze:default:return e}}var MC=cze;function mI(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];var a=0,s=r.replace(/%s/g,function(){return String(i[a++])}),l=new Error(s),c=Object.assign(l,{name:t,messageFormat:r,messageParams:i,type:e,taalOpcodes:[2,2]});if(c.stack===void 0)try{throw c}catch{}return c}var dze={create:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return mI.apply(void 0,["error",t,r].concat(i))},createWarning:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return mI.apply(void 0,["warn",t,r].concat(i))}},g1,v1,fze=typeof window<"u"&&typeof((g1=window)===null||g1===void 0||(v1=g1.performance)===null||v1===void 0?void 0:v1.now)=="function";function gI(){return fze?window.performance.now():Date.now()}function hze(e){var t=gI(),r=e();return[t,gI()-t,r]}var pze=hze,lj=Je.default,Xf=lj(qr),Zf=lj(Ql),b1=Xl,mze=ij,_1=MC,gze=dze,gg=Ko,vze=hc,bze=vze.stableCopy,_ze=pze,uj=rs,vI=uj.generateClientID,yze=uj.generateUniqueClientID,xze=Yl,Sze=xze.getLocalVariables,vg=ho,cj=ka,y1=cj.createNormalizationSelector,wze=cj.createReaderSelector,bg=gc,LC=wr,bI=LC.ROOT_TYPE,Eze=LC.TYPENAME_KEY,kze=LC.getStorageKey,Wr=Be;function Cze(e){return new Rze(e)}var Rze=(function(){function e(r){var n=this,i,o,a,s=r.actorIdentifier,l=r.getDataID,c=r.getPublishQueue,d=r.getStore,f=r.isClientPayload,h=r.operation,p=r.operationExecutions,m=r.operationLoader,g=r.operationTracker,v=r.optimisticConfig,b=r.scheduler,y=r.shouldProcessClientComponents,S=r.sink,w=r.source,C=r.treatMissingFieldsAsNull,A=r.updater,T=r.log,R=r.normalizeResponse;this._actorIdentifier=s,this._getDataID=l,this._treatMissingFieldsAsNull=C,this._incrementalPayloadsPending=!1,this._incrementalResults=new Map,this._log=T,this._executeId=mze(),this._nextSubscriptionId=0,this._operation=h,this._operationExecutions=p,this._operationLoader=m,this._operationTracker=g,this._operationUpdateEpochs=new Map,this._optimisticUpdates=null,this._useExecTimeResolvers=(i=(o=this._operation.request.node.operation.use_exec_time_resolvers)!==null&&o!==void 0?o:((a=this._operation.request.node.operation.exec_time_resolvers_enabled_provider)===null||a===void 0?void 0:a.get())===!0)!==null&&i!==void 0?i:!1,this._execTimeResolverResponseComplete=!1,this._pendingModulePayloadsCount=0,this._getPublishQueue=c,this._scheduler=b,this._sink=S,this._source=new Map,this._state="started",this._getStore=d,this._subscriptions=new Map,this._updater=A,this._isClientPayload=f===!0,this._isSubscriptionOperation=this._operation.request.node.params.operationKind==="subscription",this._shouldProcessClientComponents=y,this._retainDisposables=new Map,this._seenActors=new Set,this._completeFns=[],this._normalizeResponse=R;var N=this._nextSubscriptionId++;gg.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&v!=null&&this._processOptimisticResponse(v.response!=null?{data:v.response}:null,v.updater,!1),w.subscribe({complete:function(){return n._complete(N)},error:function(M){return n._error(M)},next:function(M){try{n._next(N,M)}catch(P){S.error(P)}},start:function(M){var P;n._start(N,M),n._log({name:"execute.start",executeId:n._executeId,params:n._operation.request.node.params,variables:n._operation.request.variables,cacheConfig:(P=n._operation.request.cacheConfig)!==null&&P!==void 0?P:{}})},unsubscribe:function(){n._log({name:"execute.unsubscribe",executeId:n._executeId})}}),!gg.PROCESS_OPTIMISTIC_UPDATE_BEFORE_SUBSCRIPTION&&v!=null&&this._processOptimisticResponse(v.response!=null?{data:v.response}:null,v.updater,!1)}var t=e.prototype;return t.cancel=function(){var n=this;if(this._state!=="completed"){this._state="completed",this._operationExecutions.delete(this._operation.request.identifier),this._subscriptions.size!==0&&(this._subscriptions.forEach(function(o){return o.unsubscribe()}),this._subscriptions.clear());var i=this._optimisticUpdates;i!==null&&(this._optimisticUpdates=null,i.forEach(function(o){return n._getPublishQueueAndSaveActor().revertUpdate(o)}),this._runPublishQueue()),this._incrementalResults.clear(),this._asyncStoreUpdateDisposable!=null&&(this._asyncStoreUpdateDisposable.dispose(),this._asyncStoreUpdateDisposable=null),this._completeFns=[],this._completeOperationTracker(),this._disposeRetainedData()}},t._updateActiveState=function(){var n;switch(this._state){case"started":{n="active";break}case"loading_incremental":{n="active";break}case"completed":{n="inactive";break}case"loading_final":{n=this._pendingModulePayloadsCount>0||this._useExecTimeResolvers&&!this._execTimeResolverResponseComplete?"active":"inactive";break}default:this._state,Wr(!1)}this._operationExecutions.set(this._operation.request.identifier,n)},t._schedule=function(n,i){var o=this,a=this._scheduler;if(a!=null){var s=this._nextSubscriptionId++;b1.create(function(l){var c=a.schedule(function(){try{n(),l.complete()}catch(d){l.error(d)}},i);return function(){return a.cancel(c)}}).subscribe({complete:function(){return o._complete(s)},error:function(c){return o._error(c)},start:function(c){return o._start(s,c)}})}else n()},t._complete=function(n){this._subscriptions.delete(n),this._subscriptions.size===0&&(this.cancel(),this._sink.complete(),this._log({name:"execute.complete",executeId:this._executeId}))},t._error=function(n){this.cancel(),this._sink.error(n),this._log({name:"execute.error",executeId:this._executeId,error:n})},t._start=function(n,i){this._subscriptions.set(n,i),this._updateActiveState()},t._next=function(n,i){var o=this,a=this._state==="loading_incremental"?"low":"default";this._schedule(function(){o._log({name:"execute.next.start",executeId:o._executeId,response:i,operation:o._operation}),o._handleNext(i),o._maybeCompleteSubscriptionOperationTracking(),o._log({name:"execute.next.end",executeId:o._executeId,response:i,operation:o._operation})},a)},t._handleErrorResponse=function(n){var i=this,o=[];return n.forEach(function(a){if(!(a.data===null&&a.extensions!=null&&!a.hasOwnProperty("errors")))if(a.data==null){var s=a.hasOwnProperty("errors")&&a.errors!=null?a.errors:null,l=s?s.map(function(f){var h=f.message;return h}).join(`
|
|
123
|
+
`):"(No errors)",c=gze.create("RelayNetwork","No data returned for operation `"+i._operation.request.node.params.name+"`, got error(s):\n"+l+"\n\nSee the error `source` property for more information.");throw c.source={errors:s,operation:i._operation.request.node,variables:i._operation.request.variables},c.stack,c}else{var d=a;o.push(d)}}),o},t._handleOptimisticResponses=function(n){var i;if(n.length>1)return n.some(function(s){var l;return((l=s.extensions)===null||l===void 0?void 0:l.isOptimistic)===!0})&&Wr(!1),!1;var o=n[0],a=((i=o.extensions)===null||i===void 0?void 0:i.isOptimistic)===!0;return a&&this._state!=="started"&&Wr(!1),a?(this._processOptimisticResponse(o,null,this._treatMissingFieldsAsNull),this._sink.next(o),!0):!1},t._handleNext=function(n){if(this._state!=="completed"){this._seenActors.clear();var i=Array.isArray(n)?n:[n],o=this._handleErrorResponse(i);if(o.length===0){var a=i.some(function(R){var N;return((N=R.extensions)===null||N===void 0?void 0:N.is_final)===!0});a&&(this._state="loading_final",this._updateActiveState(),this._incrementalPayloadsPending=!1),this._sink.next(n);return}var s=this._handleOptimisticResponses(o);if(!s){var l=Aze(o),c=l[0],d=l[1],f=l[2],h=c.length>0,p=f.length>0;if(h){if(this._isSubscriptionOperation){var m=yze();this._operation={request:this._operation.request,fragment:wze(this._operation.fragment.node,m,this._operation.fragment.variables,this._operation.fragment.owner),root:y1(this._operation.root.node,m,this._operation.root.variables)}}var g=this._processResponses(c);this._processPayloadFollowups(g)}if(p)for(var v=[],b=0;b<f.length;b++){var y,S=f[b],w=new bg(S.data),a=((y=S.extensions)===null||y===void 0?void 0:y.is_final)===!0,C={errors:[],fieldPayloads:[],followupPayloads:[],incrementalPlaceholders:[],isFinal:a,source:w};this._getPublishQueueAndSaveActor().commitPayload(this._operation,C,this._updater),v.push(C),this._execTimeResolverResponseComplete=a,a&&this._updateActiveState()}if(d.length>0){var A=this._processIncrementalResponses(d);this._processPayloadFollowups(A)}this._isSubscriptionOperation&&(o[0].extensions==null?o[0].extensions={__relay_subscription_root_id:this._operation.fragment.dataID}:o[0].extensions.__relay_subscription_root_id=this._operation.fragment.dataID);var T=this._runPublishQueue(h||p?this._operation:void 0);h&&this._incrementalPayloadsPending&&this._retainData(),this._updateOperationTracker(T),this._sink.next(n)}}},t._processOptimisticResponse=function(n,i,o){var a=this;if(this._optimisticUpdates!==null&&Wr(!1),!(n==null&&i==null)){var s=[];if(n){var l=this._normalizeResponse(n,this._operation.root,bI,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[],shouldProcessClientComponents:this._shouldProcessClientComponents,treatMissingFieldsAsNull:o},this._useExecTimeResolvers);_I(l),s.push({operation:this._operation,payload:l,updater:i}),this._processOptimisticFollowups(l,s)}else i&&s.push({operation:this._operation,payload:{errors:null,fieldPayloads:null,incrementalPlaceholders:null,followupPayloads:null,source:bg.create(),isFinal:!1},updater:i});this._optimisticUpdates=s,s.forEach(function(d){return a._getPublishQueueAndSaveActor().applyUpdate(d)});var c=this._runPublishQueue();gg.ENABLE_OPERATION_TRACKER_OPTIMISTIC_UPDATES&&this._updateOperationTracker(c)}},t._processOptimisticFollowups=function(n,i){if(n.followupPayloads&&n.followupPayloads.length){var o=n.followupPayloads,a=(0,Xf.default)(o),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;switch(l.kind){case"ModuleImportPayload":var c=this._expectOperationLoader(),d=c.get(l.operationReference);if(d==null)this._processAsyncOptimisticModuleImport(l);else{var f=this._processOptimisticModuleImport(d,l);i.push.apply(i,(0,Zf.default)(f))}break;case"ActorPayload":break;default:Wr(!1)}}}catch(h){a.e(h)}finally{a.f()}}},t._normalizeFollowupPayload=function(n,i){var o;i.kind==="SplitOperation"&&n.kind==="ModuleImportPayload"?o=Sze(n.variables,i.argumentDefinitions,n.args):o=n.variables;var a=y1(i,n.dataID,o),s={data:n.data,extensions:this._state==="loading_final"?{is_final:!0}:void 0};return this._normalizeResponse(s,a,n.typeName,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:n.path,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers)},t._processOptimisticModuleImport=function(n,i){var o=_1(n),a=[],s=this._normalizeFollowupPayload(i,o);return _I(s),a.push({operation:this._operation,payload:s,updater:null}),this._processOptimisticFollowups(s,a),a},t._processAsyncOptimisticModuleImport=function(n){var i=this;this._expectOperationLoader().load(n.operationReference).then(function(o){if(!(o==null||i._state!=="started")){var a=i._processOptimisticModuleImport(o,n);if(a.forEach(function(l){return i._getPublishQueueAndSaveActor().applyUpdate(l)}),i._optimisticUpdates!=null){var s;(s=i._optimisticUpdates).push.apply(s,(0,Zf.default)(a)),i._runPublishQueue()}}})},t._processResponses=function(n){var i=this;return this._log({name:"execute.normalize.start",operation:this._operation}),this._optimisticUpdates!==null&&(this._optimisticUpdates.forEach(function(o){i._getPublishQueueAndSaveActor().revertUpdate(o)}),this._optimisticUpdates=null),this._incrementalPayloadsPending=!1,this._incrementalResults.clear(),this._source.clear(),n.map(function(o){var a=i._normalizeResponse(o,i._operation.root,bI,{actorIdentifier:i._actorIdentifier,getDataID:i._getDataID,log:i._log,path:[],treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,shouldProcessClientComponents:i._shouldProcessClientComponents},i._useExecTimeResolvers);return i._getPublishQueueAndSaveActor().commitPayload(i._operation,a,i._updater),i._log({name:"execute.normalize.end",operation:i._operation}),a})},t._processPayloadFollowups=function(n){var i=this;this._state!=="completed"&&n.forEach(function(o){var a=o.incrementalPlaceholders,s=o.followupPayloads,l=o.isFinal;if(i._state=l?"loading_final":"loading_incremental",i._updateActiveState(),l&&(i._incrementalPayloadsPending=!1),s&&s.length!==0&&s.forEach(function(d){var f,h=i._actorIdentifier;i._actorIdentifier=(f=d.actorIdentifier)!==null&&f!==void 0?f:i._actorIdentifier,i._processFollowupPayload(d),i._actorIdentifier=h}),a&&a.length!==0&&(i._incrementalPayloadsPending=i._state!=="loading_final",a.forEach(function(d){var f,h=i._actorIdentifier;i._actorIdentifier=(f=d.actorIdentifier)!==null&&f!==void 0?f:i._actorIdentifier,i._processIncrementalPlaceholder(o,d),i._actorIdentifier=h}),i._isClientPayload||i._state==="loading_final")){var c=[];a.forEach(function(d){d.kind==="defer"&&c.push(i._processDeferResponse(d.label,d.path,d,{data:d.data,extensions:{is_final:!0}}))}),c.length>0&&i._processPayloadFollowups(c)}})},t._maybeCompleteSubscriptionOperationTracking=function(){!this._isSubscriptionOperation&&!(this._useExecTimeResolvers&&this._execTimeResolverResponseComplete&&this._state==="loading_final")||this._pendingModulePayloadsCount===0&&this._incrementalPayloadsPending===!1&&this._completeOperationTracker()},t._processFollowupPayload=function(n){var i=this;switch(n.kind){case"ModuleImportPayload":var o=this._expectOperationLoader(),a=o.get(n.operationReference);if(a!=null)this._processFollowupPayloadWithNormalizationNode(n,_1(a));else{var s=this._nextSubscriptionId++;this._pendingModulePayloadsCount++;var l=function(){i._pendingModulePayloadsCount--,i._maybeCompleteSubscriptionOperationTracking()},c=b1.from(new Promise(function(d,f){o.load(n.operationReference).then(d,f)}));b1.create(function(d){var f,h=c.subscribe({next:function(m){if(m!=null){var g=function(){try{var y=_1(m),S=gg.BATCH_ASYNC_MODULE_UPDATES_FN,w=S!=null&&i._pendingModulePayloadsCount>1,C=_ze(function(){if(i._handleFollowupPayload(n,y),w)i._scheduleAsyncStoreUpdate(S,d.complete);else{var R=i._runPublishQueue();i._updateOperationTracker(R)}}),A=C[0],T=C[1];i._log({name:"execute.async.module",executeId:i._executeId,operationName:y.name,duration:T}),w||d.complete()}catch(R){d.error(R)}},v=i._scheduler;v==null?g():f=v.schedule(g)}else d.complete()},error:d.error});return function(){h.unsubscribe(),i._scheduler!=null&&f!=null&&i._scheduler.cancel(f)}}).subscribe({complete:function(){i._complete(s),l()},error:function(f){i._error(f),l()},start:function(f){return i._start(s,f)}})}break;case"ActorPayload":this._processFollowupPayloadWithNormalizationNode(n,n.node);break;default:Wr(!1)}},t._processFollowupPayloadWithNormalizationNode=function(n,i){this._handleFollowupPayload(n,i),this._maybeCompleteSubscriptionOperationTracking()},t._handleFollowupPayload=function(n,i){var o=this._normalizeFollowupPayload(n,i);this._getPublishQueueAndSaveActor().commitPayload(this._operation,o),this._processPayloadFollowups([o])},t._processIncrementalPlaceholder=function(n,i){var o,a=i.label,s=i.path,l=s.map(String).join("."),c=this._incrementalResults.get(a);c==null&&(c=new Map,this._incrementalResults.set(a,c));var d=c.get(l),f=d!=null&&d.kind==="response"?d.responses:null;c.set(l,{kind:"placeholder",placeholder:i});var h;i.kind==="stream"?h=i.parentID:i.kind==="defer"?h=i.selector.dataID:Wr(!1);var p=n.source.get(h),m=((o=n.fieldPayloads)!==null&&o!==void 0?o:[]).filter(function(C){var A=vI(C.dataID,C.fieldKey);return C.dataID===h||A===h});p==null&&Wr(!1);var g,v,b=this._source.get(h);if(b!=null){g=vg.update(b.record,p);var y=new Map,S=function(A){var T=$ze(A);y.set(T,A)};b.fieldPayloads.forEach(S),m.forEach(S),v=Array.from(y.values())}else g=p,v=m;if(this._source.set(h,{record:g,fieldPayloads:v}),f!=null){var w=this._processIncrementalResponses(f);this._processPayloadFollowups(w)}},t._processIncrementalResponses=function(n){var i=this,o=[];return n.forEach(function(a){var s=a.label,l=a.path,c=a.response,d=i._incrementalResults.get(s);if(d==null&&(d=new Map,i._incrementalResults.set(s,d)),s.indexOf("$defer$")!==-1){var f=l.map(String).join("."),h=d.get(f);if(h==null){h={kind:"response",responses:[a]},d.set(f,h);return}else if(h.kind==="response"){h.responses.push(a);return}var p=h.placeholder;p.kind!=="defer"&&Wr(!1),o.push(i._processDeferResponse(s,l,p,c))}else{var m=l.slice(0,-2).map(String).join("."),g=d.get(m);if(g==null){g={kind:"response",responses:[a]},d.set(m,g);return}else if(g.kind==="response"){g.responses.push(a);return}var v=g.placeholder;v.kind!=="stream"&&Wr(!1),o.push(i._processStreamResponse(s,l,v,c))}}),o},t._processDeferResponse=function(n,i,o,a){var s,l=o.selector.dataID,c=this._actorIdentifier;this._actorIdentifier=(s=o.actorIdentifier)!==null&&s!==void 0?s:this._actorIdentifier;var d=this._normalizeResponse(a,o.selector,o.typeName,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:o.path,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);this._getPublishQueueAndSaveActor().commitPayload(this._operation,d);var f=this._source.get(l);f==null&&Wr(!1);var h=f.fieldPayloads;if(h.length!==0){var p,m={errors:null,fieldPayloads:h,incrementalPlaceholders:null,followupPayloads:null,source:bg.create(),isFinal:((p=a.extensions)===null||p===void 0?void 0:p.is_final)===!0};this._getPublishQueueAndSaveActor().commitPayload(this._operation,m)}return this._actorIdentifier=c,d},t._processStreamResponse=function(n,i,o,a){var s=o.parentID,l=o.node,c=o.variables,d=o.actorIdentifier,f=this._actorIdentifier;this._actorIdentifier=d??this._actorIdentifier;var h=l.selections[0];h!=null&&h.kind==="LinkedField"&&h.plural===!0||Wr(!1);var p=this._normalizeStreamItem(a,s,h,c,i,o.path),m=p.fieldPayloads,g=p.itemID,v=p.itemIndex,b=p.prevIDs,y=p.relayPayload,S=p.storageKey;if(this._getPublishQueueAndSaveActor().commitPayload(this._operation,y,function(C){var A=C.get(s);if(A!=null){var T=A.getLinkedRecords(S);if(T!=null&&!(T.length!==b.length||T.some(function(N,I){return b[I]!==(N&&N.getDataID())}))){var R=(0,Zf.default)(T);R[v]=C.get(g),A.setLinkedRecords(R,S)}}}),m.length!==0){var w={errors:null,fieldPayloads:m,incrementalPlaceholders:null,followupPayloads:null,source:bg.create(),isFinal:!1};this._getPublishQueueAndSaveActor().commitPayload(this._operation,w)}return this._actorIdentifier=f,y},t._normalizeStreamItem=function(n,i,o,a,s,l){var c,d,f,h,p=n.data;typeof p!="object"&&Wr(!1);var m=(c=o.alias)!==null&&c!==void 0?c:o.name,g=kze(o,a),v=this._source.get(i);v==null&&Wr(!1);var b=v.record,y=v.fieldPayloads,S=vg.getLinkedRecordIDs(b,g);S==null&&Wr(!1);var w=s[s.length-1],C=parseInt(w,10);C===w&&C>=0||Wr(!1);var A=(d=o.concreteType)!==null&&d!==void 0?d:p[Eze];typeof A!="string"&&Wr(!1);var T=(f=(h=this._getDataID(p,A))!==null&&h!==void 0?h:S?.[C])!==null&&f!==void 0?f:vI(i,g,C);typeof T!="string"&&Wr(!1);var R=y1(o,T,a),N=vg.clone(b),I=(0,Zf.default)(S);I[C]=T,vg.setLinkedRecordIDs(N,g,I),this._source.set(i,{record:N,fieldPayloads:y});var M=this._normalizeResponse(n,R,A,{actorIdentifier:this._actorIdentifier,getDataID:this._getDataID,log:this._log,path:[].concat((0,Zf.default)(l),[m,String(C)]),treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents},this._useExecTimeResolvers);return{fieldPayloads:y,itemID:T,itemIndex:C,prevIDs:S,relayPayload:M,storageKey:g}},t._scheduleAsyncStoreUpdate=function(n,i){var o=this;this._completeFns.push(i),this._asyncStoreUpdateDisposable==null&&(this._asyncStoreUpdateDisposable=n(function(){o._asyncStoreUpdateDisposable=null;var a=o._runPublishQueue();o._updateOperationTracker(a);var s=(0,Xf.default)(o._completeFns),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;c()}}catch(d){s.e(d)}finally{s.f()}o._completeFns=[]}))},t._updateOperationTracker=function(n){n!=null&&n.length>0&&this._operationTracker.update(this._operation.request,new Set(n))},t._completeOperationTracker=function(){this._operationTracker.complete(this._operation.request)},t._getPublishQueueAndSaveActor=function(){return this._seenActors.add(this._actorIdentifier),this._getPublishQueue(this._actorIdentifier)},t._getActorsToVisit=function(){return this._seenActors.size===0?new Set([this._actorIdentifier]):this._seenActors},t._runPublishQueue=function(n){var i=new Set,o=(0,Xf.default)(this._getActorsToVisit()),a;try{for(o.s();!(a=o.n()).done;){var s=a.value,l=this._getPublishQueue(s).run(n);l.forEach(function(c){return i.add(c)})}}catch(c){o.e(c)}finally{o.f()}return Array.from(i)},t._retainData=function(){var n=(0,Xf.default)(this._getActorsToVisit()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;this._retainDisposables.has(o)||this._retainDisposables.set(o,this._getStore(o).retain(this._operation))}}catch(a){n.e(a)}finally{n.f()}},t._disposeRetainedData=function(){var n=(0,Xf.default)(this._retainDisposables.values()),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;o.dispose()}}catch(a){n.e(a)}finally{n.f()}this._retainDisposables.clear()},t._expectOperationLoader=function(){var n=this._operationLoader;return n||Wr(!1),n},e})();function Aze(e){var t=[],r=[],n=[];return e.forEach(function(i){var o;if(i.path!=null||i.label!=null){var a=i.label,s=i.path;(a==null||s==null)&&Wr(!1),r.push({label:a,path:s,response:i})}else((o=i.extensions)===null||o===void 0?void 0:o.is_normalized)===!0?n.push(i):t.push(i)}),[t,r,n]}function $ze(e){var t;return(t=JSON.stringify(bze(e)))!==null&&t!==void 0?t:""}function _I(e){var t=e.incrementalPlaceholders;t!=null&&t.length!==0&&Wr(!1)}var Tze={execute:Cze},Nze=Promise.resolve();function Dze(e){Nze.then(e).catch(Fze)}function Fze(e){setTimeout(function(){throw e},0)}var Ize=Dze,En=ho,Pze=e_,yI=Pze.EXISTENT,x1=Be,Oze=(function(){function e(r,n){this.__sources=[n,r],this._base=r,this._sink=n}var t=e.prototype;return t.unstable_getRawRecordWithChanges=function(n){var i=this._base.get(n),o=this._sink.get(n);if(o===void 0){if(i==null)return i;var a=En.clone(i);return a}else{if(o===null)return null;if(i!=null){var s=En.update(i,o);return s}else{var l=En.clone(o);return l}}},t._getSinkRecord=function(n){var i=this._sink.get(n);if(!i){var o=this._base.get(n);o||x1(!1),i=En.create(n,En.getType(o)),this._sink.set(n,i)}return i},t.copyFields=function(n,i){var o=this._sink.get(n),a=this._base.get(n);o||a||x1(!1);var s=this._getSinkRecord(i);a&&En.copyFields(a,s),o&&En.copyFields(o,s)},t.copyFieldsFromRecord=function(n,i){var o=this._getSinkRecord(i);En.copyFields(n,o)},t.create=function(n,i){this._base.getStatus(n)!==yI&&this._sink.getStatus(n)!==yI||x1(!1);var o=En.create(n,i);this._sink.set(n,o)},t.delete=function(n){this._sink.delete(n)},t.getStatus=function(n){return this._sink.has(n)?this._sink.getStatus(n):this._base.getStatus(n)},t.getType=function(n){for(var i=0;i<this.__sources.length;i++){var o=this.__sources[i].get(n);if(o)return En.getType(o);if(o===null)return null}},t.getValue=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=En.getValue(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setValue=function(n,i,o){var a=this._getSinkRecord(n);En.setValue(a,i,o)},t.getErrors=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=En.getErrors(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setErrors=function(n,i,o){var a=this._getSinkRecord(n);En.setErrors(a,i,o)},t.getLinkedRecordID=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=En.getLinkedRecordID(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setLinkedRecordID=function(n,i,o){var a=this._getSinkRecord(n);En.setLinkedRecordID(a,i,o)},t.getLinkedRecordIDs=function(n,i){for(var o=0;o<this.__sources.length;o++){var a=this.__sources[o].get(n);if(a){var s=En.getLinkedRecordIDs(a,i);if(s!==void 0)return s}else if(a===null)return null}},t.setLinkedRecordIDs=function(n,i,o){var a=this._getSinkRecord(n);En.setLinkedRecordIDs(a,i,o)},e})(),dj=Oze,Mze=Je.default,i_=Mze(qr),Lze=wr,Kd=Lze.getArgumentValues,zze=["id","__id","__typename","js"];function Uze(e,t,r,n,i){var o={};return $p(o,e,t,r,n,i),o}function $p(e,t,r,n,i,o){var a,s=(0,i_.default)(n),l;try{var c=function(){var p=l.value;switch(p.kind){case"LinkedField":p.plural?Object.defineProperty(e,(d=p.alias)!==null&&d!==void 0?d:p.name,{get:qze(p,r,t,i,o),set:Bze(p,r,t,i)}):Object.defineProperty(e,(f=p.alias)!==null&&f!==void 0?f:p.name,{get:Vze(p,r,t,i,o),set:jze(p,r,t,i)});break;case"ScalarField":var m=(a=p.alias)!==null&&a!==void 0?a:p.name;Object.defineProperty(e,m,{get:function(){var v,b=Kd((v=p.args)!==null&&v!==void 0?v:[],r),y=t.getValue(p.name,b);return y==null&&(y=Hze(p,b,t,i,o)),y},set:zze.includes(p.name)?void 0:function(g){var v,b=Kd((v=p.args)!==null&&v!==void 0?v:[],r);t.setValue__UNSAFE(g,p.name,b)}});break;case"InlineFragment":t.getType()===p.type&&$p(e,t,r,p.selections,i,o);break;case"ClientExtension":$p(e,t,r,p.selections,i,o);break;case"FragmentSpread":break;case"Condition":case"ActorChange":case"InlineDataFragmentSpread":case"AliasedInlineFragmentSpread":case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":case"Defer":case"ModuleImport":case"RequiredField":case"CatchField":case"Stream":case"RelayResolver":case"RelayLiveResolver":throw new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.");default:throw p.kind,new Error("Encountered an unexpected ReaderSelection variant in RelayRecordSourceProxy. This indicates a bug in Relay.")}};for(s.s();!(l=s.n()).done;){var d,f;c()}}catch(h){s.e(h)}finally{s.f()}}function Bze(e,t,r,n){return function(o){var a,s=Kd((a=e.args)!==null&&a!==void 0?a:[],t);if(o==null)throw new Error("Do not assign null to plural linked fields; assign an empty array instead.");var l=o.map(function(c){if(c==null)throw new Error("When assigning an array of items, none of the items should be null or undefined.");var d=c.__id;if(d==null)throw new Error("The __id field must be present on each item passed to the setter. This indicates a bug in Relay.");var f=n.get(d);if(f==null)throw new Error("Did not find item with data id ".concat(d," in the store."));return f});r.setLinkedRecords(l,e.name,s)}}function jze(e,t,r,n){return function(o){var a,s=Kd((a=e.args)!==null&&a!==void 0?a:[],t);if(o==null)r.setValue(o,e.name,s);else{var l=o.__id;if(l==null)throw new Error("The __id field must be present on the argument. This indicates a bug in Relay.");var c=n.get(l);if(c==null)throw new Error("Did not find item with data id ".concat(l," in the store."));r.setLinkedRecord(c,e.name,s)}}}function qze(e,t,r,n,i){return function(){var o,a=Kd((o=e.args)!==null&&o!==void 0?o:[],t),s=r.getLinkedRecords(e.name,a);return s===void 0&&(s=Kze(e,a,r,n,i)),s!=null?s.map(function(l){if(l!=null){var c={};return $p(c,l,t,e.selections,n,i),c}else return l}):s}}function Vze(e,t,r,n,i){return function(){var o,a=Kd((o=e.args)!==null&&o!==void 0?o:[],t),s=r.getLinkedRecord(e.name,a);if(s===void 0&&(s=Gze(e,a,r,n,i)),s!=null){var l={};return $p(l,s,t,e.selections,n,i),l}else return s}}function Gze(e,t,r,n,i){var o=(0,i_.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="linked"){var l=s.handle(e,r,t,n);if(l!=null)return n.get(l)}}}catch(c){o.e(c)}finally{o.f()}}function Kze(e,t,r,n,i){var o=(0,i_.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="pluralLinked"){var l=s.handle(e,r,t,n);if(l!=null)return l.map(function(c){if(c!=null)return n.get(c)})}}}catch(c){o.e(c)}finally{o.f()}}function Hze(e,t,r,n,i){var o=(0,i_.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;if(s.kind==="scalar"){var l=s.handle(e,r,t,n);if(l!==void 0)return l}}}catch(c){o.e(c)}finally{o.f()}}var fj={createUpdatableProxy:Uze},Wze=Ea,Jze=Wze.getFragment,Qze=ka,Yze=Qze.getVariablesFromFragment,Xze=wr,Zze=Xze.ID_KEY,e9e=fj,t9e=e9e.createUpdatableProxy,r9e=Be;function n9e(e,t,r,n){var i=Jze(e),o=Yze(i,t),a=t[Zze],s=r.get(a);return s==null&&r9e(!1),{updatableData:t9e(s,o,i.selections,r,n)}}var hj={readUpdatableFragment:n9e},i9e=Ea,o9e=i9e.getUpdatableQuery,a9e=fj,s9e=a9e.createUpdatableProxy;function l9e(e,t,r,n){var i=o9e(e);return{updatableData:s9e(r.getRoot(),t,i.fragment.selections,r,n)}}var pj={readUpdatableQuery:l9e},u9e=rs,c9e=u9e.generateClientID,d9e=wr,ul=d9e.getStableStorageKey,_g=Be,f9e=(function(){function e(r,n,i){this._dataID=i,this._mutator=n,this._source=r}var t=e.prototype;return t.copyFieldsFrom=function(n){this._mutator.copyFields(n.getDataID(),this._dataID)},t.getDataID=function(){return this._dataID},t.getType=function(){var n=this._mutator.getType(this._dataID);return n==null&&_g(!1),n},t.getValue=function(n,i){var o=ul(n,i);return this._mutator.getValue(this._dataID,o)},t.setValue=function(n,i,o,a){return mj(n)||_g(!1),this.setValue__UNSAFE(n,i,o,a)},t.getErrors=function(n,i){var o=ul(n,i);return this._mutator.getErrors(this._dataID,o)},t.setValue__UNSAFE=function(n,i,o,a){var s=ul(i,o);return this._mutator.setValue(this._dataID,s,n),a!=null&&(a.length===0?this._mutator.setErrors(this._dataID,s):this._mutator.setErrors(this._dataID,s,a)),this},t.getLinkedRecord=function(n,i){var o=ul(n,i),a=this._mutator.getLinkedRecordID(this._dataID,o);return a!=null?this._source.get(a):a},t.setLinkedRecord=function(n,i,o){n instanceof e||_g(!1);var a=ul(i,o),s=n.getDataID();return this._mutator.setLinkedRecordID(this._dataID,a,s),this},t.getOrCreateLinkedRecord=function(n,i,o){var a=this.getLinkedRecord(n,o);if(!a){var s,l=ul(n,o),c=c9e(this.getDataID(),l);a=(s=this._source.get(c))!==null&&s!==void 0?s:this._source.create(c,i),this.setLinkedRecord(a,n,o)}return a},t.getLinkedRecords=function(n,i){var o=this,a=ul(n,i),s=this._mutator.getLinkedRecordIDs(this._dataID,a);return s==null?s:s.map(function(l){return l!=null?o._source.get(l):l})},t.setLinkedRecords=function(n,i,o){Array.isArray(n)||_g(!1);var a=ul(i,o),s=n.map(function(l){return l&&l.getDataID()});return this._mutator.setLinkedRecordIDs(this._dataID,a,s),this},t.invalidateRecord=function(){this._source.markIDForInvalidation(this._dataID)},e})();function mj(e){return e==null||typeof e!="object"||Array.isArray(e)&&e.every(mj)}var h9e=f9e,p9e=ho,gj=e_,S1=gj.EXISTENT,xI=gj.NONEXISTENT,vj=wr,w1=vj.ROOT_ID,SI=vj.ROOT_TYPE,m9e=hj,g9e=m9e.readUpdatableFragment,v9e=pj,b9e=v9e.readUpdatableQuery,_9e=h9e,yg=Be,y9e=(function(){function e(r,n,i,o,a){this.__mutator=r,this._handlerProvider=i||null,this._proxies={},this._getDataID=n,this._invalidatedStore=!1,this._idsMarkedForInvalidation=new Set,this._missingFieldHandlers=o,this._log=a??function(s){}}var t=e.prototype;return t.publishSource=function(n,i){var o=this,a=n.getRecordIDs();a.forEach(function(s){var l=n.getStatus(s);if(l===S1){var c=n.get(s);c&&(o.__mutator.getStatus(s)!==S1&&o.create(s,p9e.getType(c)),o.__mutator.copyFieldsFromRecord(c,s))}else l===xI&&o.delete(s)}),i&&i.length&&i.forEach(function(s){var l=o._handlerProvider&&o._handlerProvider(s.handle);l||yg(!1),l.update(o,s)})},t.create=function(n,i){this.__mutator.create(n,i),delete this._proxies[n];var o=this.get(n);return o||yg(!1),o},t.delete=function(n){n===w1&&yg(!1),delete this._proxies[n],this.__mutator.delete(n)},t.get=function(n){if(!this._proxies.hasOwnProperty(n)){var i=this.__mutator.getStatus(n);i===S1?this._proxies[n]=new _9e(this,this.__mutator,n):this._proxies[n]=i===xI?null:void 0}return this._proxies[n]},t.getRoot=function(){var n=this.get(w1);return n||(n=this.create(w1,SI)),n&&n.getType()===SI||yg(!1),n},t.invalidateStore=function(){this._invalidatedStore=!0},t.isStoreMarkedForInvalidation=function(){return this._invalidatedStore},t.markIDForInvalidation=function(n){this._idsMarkedForInvalidation.add(n)},t.getIDsMarkedForInvalidation=function(){return this._idsMarkedForInvalidation},t.readUpdatableQuery=function(n,i){return b9e(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return g9e(n,i,this,this._missingFieldHandlers)},e})(),bj=y9e,x9e=fc,wI=x9e.LINKED_FIELD,S9e=wr,w9e=S9e.getHandleStorageKey,E9e=Qs,k9e=Be;function C9e(e,t,r){var n=t.find(function(o){return o.kind===wI&&o.name===e.name&&o.alias===e.alias&&E9e(o.args,e.args)});n&&n.kind===wI||k9e(!1);var i=w9e(e,r);return{kind:"LinkedField",alias:n.alias,name:i,storageKey:i,args:null,concreteType:n.concreteType,plural:n.plural,selections:n.selections}}var _j=C9e,R9e=fc,EI=R9e.SCALAR_FIELD,A9e=wr,$9e=A9e.getHandleStorageKey,T9e=Qs,N9e=Be;function D9e(e,t,r){var n=t.find(function(o){return o.kind===EI&&o.name===e.name&&o.alias===e.alias&&T9e(o.args,e.args)});n&&n.kind===EI||N9e(!1);var i=$9e(e,r);return{kind:"ScalarField",alias:n.alias,name:i,storageKey:i,args:null}}var F9e=D9e,I9e=Je.default,xg=I9e(qr),P9e=dj,O9e=bj,M9e=MC,L9e=rs,z9e=L9e.isClientID,U9e=_j,B9e=F9e,j9e=Yl,kI=j9e.getLocalVariables,CI=ho,yj=e_,E1=yj.EXISTENT,q9e=yj.UNKNOWN,zC=wr,xj=r_,V9e=xj.TYPE_SCHEMA_TYPE,k1=xj.generateTypeID,eh=Be,G9e=zC.getModuleOperationKey,Sg=zC.getStorageKey,C1=zC.getArgumentValues;function K9e(e,t,r,n,i,o,a,s,l,c){l?.({name:"store.datachecker.start",selector:n});var d=n.dataID,f=n.node,h=n.variables,p=new H9e(e,t,r,h,i,o,a,s,l,c),m=p.check(f,d);return l?.({name:"store.datachecker.end",selector:n}),m}var H9e=(function(){function e(r,n,i,o,a,s,l,c,d,f){this._getSourceForActor=r,this._getTargetForActor=n,this._getDataID=l,this._source=r(i),this._mutatorRecordSourceProxyCache=new Map;var h=this._getMutatorAndRecordProxyForActor(i),p=h[0],m=h[1];this._useExecTimeResolvers=f??!1,this._mostRecentlyInvalidatedAt=null,this._handlers=a,this._mutator=p,this._operationLoader=s??null,this._recordSourceProxy=m,this._recordWasMissing=!1,this._variables=o,this._shouldProcessClientComponents=c,this._log=d}var t=e.prototype;return t._getMutatorAndRecordProxyForActor=function(n){var i=this._mutatorRecordSourceProxyCache.get(n);if(i==null){var o=this._getTargetForActor(n),a=new P9e(this._getSourceForActor(n),o),s=new O9e(a,this._getDataID,void 0,this._handlers,this._log);i=[a,s],this._mutatorRecordSourceProxyCache.set(n,i)}return i},t.check=function(n,i){return this._assignClientAbstractTypes(n),this._traverse(n,i),this._recordWasMissing===!0?{status:"missing",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}:{status:"available",mostRecentlyInvalidatedAt:this._mostRecentlyInvalidatedAt}},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||eh(!1),this._variables[n]},t._handleMissing=function(){this._recordWasMissing=!0},t._handleMissingScalarField=function(n,i){if(!(n.name==="id"&&n.alias==null&&z9e(i))){var o=n.args!=null?C1(n.args,this._variables):{},a=(0,xg.default)(this._handlers),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(l.kind==="scalar"){var c=l.handle(n,this._recordSourceProxy.get(i),o,this._recordSourceProxy);if(c!==void 0)return c}}}catch(d){a.e(d)}finally{a.f()}this._handleMissing()}},t._handleMissingLinkField=function(n,i){var o=n.args!=null?C1(n.args,this._variables):{},a=(0,xg.default)(this._handlers),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;if(l.kind==="linked"){var c=l.handle(n,this._recordSourceProxy.get(i),o,this._recordSourceProxy);if(c!==void 0&&(c===null||this._mutator.getStatus(c)===E1))return c}}}catch(d){a.e(d)}finally{a.f()}this._handleMissing()},t._handleMissingPluralLinkField=function(n,i){var o=this,a=n.args!=null?C1(n.args,this._variables):{},s=(0,xg.default)(this._handlers),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;if(c.kind==="pluralLinked"){var d=c.handle(n,this._recordSourceProxy.get(i),a,this._recordSourceProxy);if(d!=null){var f=d.every(function(h){return h!=null&&o._mutator.getStatus(h)===E1});if(f)return d}else if(d===null)return null}}}catch(h){s.e(h)}finally{s.f()}this._handleMissing()},t._traverse=function(n,i){var o=this._mutator.getStatus(i);if(o===q9e&&this._handleMissing(),o===E1){var a=this._source.get(i),s=CI.getInvalidationEpoch(a);s!=null&&(this._mostRecentlyInvalidatedAt=this._mostRecentlyInvalidatedAt!=null?Math.max(this._mostRecentlyInvalidatedAt,s):s),this._traverseSelections(n.selections,i)}},t._traverseSelections=function(n,i){var o=this;n.forEach(function(a){switch(a.kind){case"ScalarField":o._checkScalar(a,i);break;case"LinkedField":a.plural?o._checkPluralLink(a,i):o._checkLink(a,i);break;case"ActorChange":o._checkActorChange(a.linkedField,i);break;case"Condition":var s=!!o._getVariableValue(a.condition);s===a.passingValue&&o._traverseSelections(a.selections,i);break;case"InlineFragment":{var l=a.abstractKey;if(l==null){var c=o._mutator.getType(i);c===a.type&&o._traverseSelections(a.selections,i)}else{var d=o._mutator.getType(i);d==null&&eh(!1);var f=k1(d),h=o._mutator.getValue(f,l);h===!0?o._traverseSelections(a.selections,i):h==null&&o._handleMissing()}break}case"LinkedHandle":{var p=U9e(a,n,o._variables);p.plural?o._checkPluralLink(p,i):o._checkLink(p,i);break}case"ScalarHandle":{var m=B9e(a,n,o._variables);o._checkScalar(m,i);break}case"ModuleImport":o._checkModuleImport(a,i);break;case"Defer":case"Stream":o._traverseSelections(a.selections,i);break;case"FragmentSpread":var g=o._variables;o._variables=kI(o._variables,a.fragment.argumentDefinitions,a.args),o._traverseSelections(a.fragment.selections,i),o._variables=g;break;case"ClientExtension":var v=o._recordWasMissing;o._traverseSelections(a.selections,i),o._recordWasMissing=v;break;case"TypeDiscriminator":var b=a.abstractKey,y=o._mutator.getType(i);y==null&&eh(!1);var S=k1(y),w=o._mutator.getValue(S,b);w==null&&o._handleMissing();break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(a.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._useExecTimeResolvers||o._checkResolver(a,i);break;case"ClientEdgeToClientObject":o._useExecTimeResolvers||o._checkResolver(a.backingField,i);break;default:eh(!1)}})},t._checkResolver=function(n,i){n.fragment&&this._traverseSelections([n.fragment],i)},t._checkModuleImport=function(n,i){var o=this._operationLoader;o===null&&eh(!1);var a=G9e(n.documentName),s=this._mutator.getValue(i,a);if(s==null){s===void 0&&this._handleMissing();return}var l=o.get(s);if(l!=null){var c=M9e(l),d=this._variables;this._variables=kI(this._variables,c.argumentDefinitions,n.args),this._traverse(c,i),this._variables=d}else this._handleMissing()},t._checkScalar=function(n,i){var o=Sg(n,this._variables),a=this._mutator.getValue(i,o);a===void 0&&(a=this._handleMissingScalarField(n,i),a!==void 0&&this._mutator.setValue(i,o,a))},t._checkLink=function(n,i){var o=Sg(n,this._variables),a=this._mutator.getLinkedRecordID(i,o);a===void 0&&(a=this._handleMissingLinkField(n,i),a!=null?this._mutator.setLinkedRecordID(i,o,a):a===null&&this._mutator.setValue(i,o,null)),a!=null&&this._traverse(n,a)},t._checkPluralLink=function(n,i){var o=this,a=Sg(n,this._variables),s=this._mutator.getLinkedRecordIDs(i,a);s===void 0&&(s=this._handleMissingPluralLinkField(n,i),s!=null?this._mutator.setLinkedRecordIDs(i,a,s):s===null&&this._mutator.setValue(i,a,null)),s&&s.forEach(function(l){l!=null&&o._traverse(n,l)})},t._checkActorChange=function(n,i){var o=Sg(n,this._variables),a=this._source.get(i),s=a!=null?CI.getActorLinkedRecordID(a,o):a;if(s==null)s===void 0&&this._handleMissing();else{var l=s[0],c=s[1],d=this._source,f=this._mutator,h=this._recordSourceProxy,p=this._getMutatorAndRecordProxyForActor(l),m=p[0],g=p[1];this._source=this._getSourceForActor(l),this._mutator=m,this._recordSourceProxy=g,this._assignClientAbstractTypes(n),this._traverse(n,c),this._source=d,this._mutator=f,this._recordSourceProxy=h}},t._assignClientAbstractTypes=function(n){var i=n.clientAbstractTypes;if(i!=null)for(var o=0,a=Object.keys(i);o<a.length;o++){var s=a[o],l=(0,xg.default)(i[s]),c;try{for(l.s();!(c=l.n()).done;){var d=c.value,f=k1(d);this._source.get(f)==null&&this._mutator.create(f,V9e),this._mutator.getValue(f,s)==null&&this._mutator.setValue(f,s,!0)}}catch(h){l.e(h)}finally{l.f()}}},e})(),W9e={check:K9e},J9e=function(t){typeof t=="object"&&t!=null&&(Array.isArray(t)||t.constructor===Object)&&Object.freeze(t)},Q9e=ho,Y9e=wr,X9e=Y9e.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,Z9e=Be;function e7e(e){var t=Q9e.getValue(e,X9e);return t==null?null:(t instanceof Set||Z9e(!1),t)}var Sj=e7e;function t7e(e){return e!=null&&typeof e=="object"&&typeof e.read=="function"&&typeof e.subscribe=="function"}var r7e=t7e,n7e=Je.default,Da=n7e(qr),i7e=Yb,o7e=fc,RI=o7e.RELAY_LIVE_RESOLVER,a7e=Ko,AI=J9e,wj=rs,wg=wj.generateClientID,R1=wj.generateClientObjectClientID,ot=ho,s7e=ka,l7e=s7e.createNormalizationSelector,Eg=gc,u7e=nj,c7e=u7e.normalize,bc=wr,A1=bc.RELAY_RESOLVER_ERROR_KEY,hw=bc.RELAY_RESOLVER_INVALIDATION_KEY,d7e=bc.RELAY_RESOLVER_OUTPUT_TYPE_RECORD_IDS,$1=bc.RELAY_RESOLVER_SNAPSHOT_KEY,T1=bc.RELAY_RESOLVER_VALUE_KEY,f7e=bc.getReadTimeResolverStorageKey,h7e=bc.getStorageKey,p7e=Sj,m7e=r7e,g7e=Xb,$I=g7e.isSuspenseSentinel,Ta=Be,UC="__resolverLiveStateSubscription",kg="__resolverLiveStateValue",Cg="__resolverLiveStateDirty",Ej="__RELAY_RESOLVER__",v7e="__relay_model_instance";function N1(e,t,r){var n=e.get(t);n||(n=new Set,e.set(t,n)),n.add(r)}var b7e=(function(){function e(r,n){this._resolverIDToRecordIDs=new Map,this._recordIDToResolverIDs=new Map,this._getRecordSource=r,this._store=n,this._handlingBatch=!1,this._liveResolverBatchRecordSource=null}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,a,s){var l=this._getRecordSource(),c=Ph(l,n),d=f7e(i,o),f=ot.getLinkedRecordID(c,d),h=f==null?null:l.get(f),p;if(h==null||this._isInvalid(h,s)){var m;h!=null&&Cj(h),f=(m=f)!==null&&m!==void 0?m:wg(n,d),h=ot.create(f,Ej);var g=a();if(ot.setValue(h,$1,g.snapshot),ot.setValue(h,A1,g.error),i.kind===RI){if(g.resolverResult!=null){g.error!=null&&Ta(!1);var v=g.resolverResult;p=this._setLiveStateValue(h,f,v,i,o)}}else p=this._setResolverValue(h,g.resolverResult,i,o);l.set(f,h);var b=Ph(l,n),y=ot.clone(b);if(ot.setLinkedRecordID(y,d,f),l.set(n,y),i.fragment!=null){var S,w=h7e(i.fragment,o),C=wg(n,w);N1(this._resolverIDToRecordIDs,C,f),N1(this._recordIDToResolverIDs,n,C);var A=(S=g.snapshot)===null||S===void 0?void 0:S.seenRecords;if(A!=null){var T=(0,Da.default)(A),R;try{for(T.s();!(R=T.n()).done;){var N=R.value;N1(this._recordIDToResolverIDs,N,C)}}catch(J){T.e(J)}finally{T.f()}}}}else if(i.kind===RI&&ot.getValue(h,Cg)){var I;f=(I=f)!==null&&I!==void 0?I:wg(n,d),h=ot.clone(h);var M=ot.getValue(h,kg);m7e(M)||Ta(!1),p=this._setLiveResolverValue(h,M,i,o),ot.setValue(h,Cg,!1),l.set(f,h)}var P=this._getResolverValue(h),B=ot.getValue(h,$1),j=ot.getValue(h,A1),W=null;if($I(P)){var te;W=(te=f)!==null&&te!==void 0?te:wg(n,d)}return[P,f,j,B,W,p]},t.getLiveResolverPromise=function(n){var i=this._getRecordSource(),o=i.get(n);o==null&&Ta(!1);var a=ot.getValue(o,kg);return new Promise(function(s){var l=a.subscribe(function(){l(),s()})})},t._setLiveStateValue=function(n,i,o,a,s){var l=this._makeLiveStateHandler(i),c=o.subscribe(l);ot.setValue(n,kg,o);var d=this._setLiveResolverValue(n,o,a,s);return ot.setValue(n,Cg,!1),ot.setValue(n,UC,c),d},t._makeLiveStateHandler=function(n){var i=this;return function(){var o=i._getRecordSource(),a=o.get(n);if(a&&ot.hasValue(a,kg)){var s=ot.clone(a);ot.setValue(s,Cg,!0),i._setLiveResolverUpdate(n,s)}}},t._setLiveResolverUpdate=function(n,i){if(this._handlingBatch)this._liveResolverBatchRecordSource==null&&(this._liveResolverBatchRecordSource=Eg.create()),this._liveResolverBatchRecordSource.set(n,i);else{var o=Eg.create();o.set(n,i),this._store.publish(o),this._store.notify()}},t.batchLiveStateUpdates=function(n){this._handlingBatch&&Ta(!1),this._handlingBatch=!0;try{n()}finally{this._liveResolverBatchRecordSource!=null&&(this._store.publish(this._liveResolverBatchRecordSource),this._store.notify()),this._liveResolverBatchRecordSource=null,this._handlingBatch=!1}},t._setLiveResolverValue=function(n,i,o,a){var s=null,l=null;try{s=i.read()}catch(c){l=c}return ot.setValue(n,A1,l),this._setResolverValue(n,s,o,a)},t._setResolverValue=function(n,i,o,a){var s=o.normalizationInfo,l=null;if(i!=null&&s!=null&&!$I(i)){var c,d=p7e(n),f=new Set,h=this._getRecordSource();if(s.plural){Array.isArray(i)||Ta(!1),c=[];for(var p=Eg.create(),m=0;m<i.length;m++){var g=i[m];if(g!=null){typeof g!="object"&&Ta(!1);var v=NI(s,g),b=R1(v,ot.getDataID(n),m),y=this._normalizeOutputTypeValue(b,g,a,s,[o.path,String(m)],v),S=(0,Da.default)(y.getRecordIDs()),w;try{for(S.s();!(w=S.n()).done;){var C=w.value;p.set(C,Ph(y,C)),f.add(C)}}catch(P){S.e(P)}finally{S.f()}c.push(b)}}l=TI(h,p,d)}else{typeof i!="object"&&Ta(!1);var A=NI(s,i),T=R1(A,ot.getDataID(n)),R=this._normalizeOutputTypeValue(T,i,a,s,[o.path],A),N=(0,Da.default)(R.getRecordIDs()),I;try{for(N.s();!(I=N.n()).done;){var M=I.value;f.add(M)}}catch(P){N.e(P)}finally{N.f()}c=T,l=TI(h,R,d)}ot.setValue(n,d7e,f),AI(c),ot.setValue(n,T1,c)}else AI(i),ot.setValue(n,T1,i);return l},t.notifyUpdatedSubscribers=function(n){this._store.__notifyUpdatedSubscribers(n)},t._getResolverValue=function(n){return ot.getValue(n,T1)},t.invalidateDataIDs=function(n){for(var i=this._getRecordSource(),o=new Set,a=Array.from(n);a.length;){var s=a.pop();o.add(s),n.add(s);var l=this._recordIDToResolverIDs.get(s);if(l!=null){var c=(0,Da.default)(l),d;try{for(c.s();!(d=c.n()).done;){var f=d.value;if(!o.has(f)){o.add(f);var h=this._resolverIDToRecordIDs.get(f);if(h==null)continue;var p=(0,Da.default)(h),m;try{for(p.s();!(m=p.n()).done;){var g=m.value;kj(g,i),o.has(g)||(o.add(g),a.push(g))}}catch(v){p.e(v)}finally{p.f()}}}}catch(v){c.e(v)}finally{c.f()}}}},t._isInvalid=function(n,i){if(!ot.getValue(n,hw))return!1;var o=ot.getValue(n,$1),a=o?.data,s=o?.selector;if(a==null||s==null)return!0;var l=i(s),c=l.data,d=i7e(a,c);if(d!==a)return!0;if(a7e.MARK_RESOLVER_VALUES_AS_CLEAN_AFTER_FRAGMENT_REREAD){var f=ot.clone(n);ot.setValue(f,hw,!1);var h=this._getRecordSource();h.set(ot.getDataID(n),f)}return!1},t._normalizeOutputTypeValue=function(n,i,o,a,s,l){var c=Eg.create();switch(a.kind){case"OutputType":{var d=ot.create(n,l);c.set(n,d);var f=l7e(a.normalizationNode,n,o),h=!1,p=this._store.__getNormalizationOptions(s);return c7e(c,f,i,p,void 0,h).source}case"WeakModel":{var m=ot.create(n,l);return ot.setValue(m,v7e,i),c.set(n,m),c}default:a.kind,Ta(!1)}},t.ensureClientRecord=function(n,i){var o=R1(i,n),a=this._getRecordSource();if(!a.has(o)){var s=ot.create(o,i);ot.setValue(s,"id",n),a.set(o,s)}return o},t.unsubscribeFromLiveResolverRecords=function(n){return x7e(this._getRecordSource(),n)},t.invalidateResolverRecords=function(n){if(n.size!==0){var i=(0,Da.default)(n),o;try{for(i.s();!(o=i.n()).done;){var a=o.value,s=this._getRecordSource().get(a);s!=null&&BC(s)&&this._getRecordSource().delete(a)}}catch(l){i.e(l)}finally{i.f()}}},e})();function TI(e,t,r){var n=new Set;if(r!=null){var i=(0,Da.default)(r),o;try{for(i.s();!(o=i.n()).done;){var a=o.value;t.has(a)||(n.add(a),e.remove(a))}}catch(p){i.e(p)}finally{i.f()}}var s=(0,Da.default)(t.getRecordIDs()),l;try{for(s.s();!(l=s.n()).done;){var c=l.value,d=Ph(t,c);if(e.has(c)){var f=Ph(e,c),h=ot.update(f,d);h!==f&&(n.add(c),e.set(c,h),y7e(f,e))}else e.set(c,d)}}catch(p){s.e(p)}finally{s.f()}return n}function _7e(e){var t=new Set;return ot.getFields(e).forEach(function(r){if(ot.hasLinkedRecordID(e,r)){var n=ot.getLinkedRecordID(e,r);n!=null&&t.add(n)}else if(ot.hasLinkedRecordIDs(e,r)){var i;(i=ot.getLinkedRecordIDs(e,r))===null||i===void 0||i.forEach(function(o){o!=null&&t.add(o)})}}),t}function kj(e,t){var r=t.get(e);if(r){var n=ot.clone(r);ot.setValue(n,hw,!0),t.set(e,n)}}function y7e(e,t){var r=_7e(e),n=(0,Da.default)(r),i;try{for(n.s();!(i=n.n()).done;){var o=i.value,a=t.get(o);a!=null&&BC(a)&&kj(o,t)}}catch(s){n.e(s)}finally{n.f()}}function x7e(e,t){if(t.size!==0){var r=(0,Da.default)(t),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e.get(i);o!=null&&BC(o)&&Cj(o)}}catch(a){r.e(a)}finally{r.f()}}}function BC(e){return ot.getType(e)===Ej}function Cj(e){var t=ot.getValue(e,UC);t?.()}function Ph(e,t){var r=e.get(t);return r==null&&Ta(!1),r}function S7e(e){return e}function NI(e,t){var r,n=(r=e.concreteType)!==null&&r!==void 0?r:t.__typename;return n==null&&Ta(!1),n}var w7e={LiveResolverCache:b7e,getUpdatedDataIDs:S7e,RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY:UC},E7e=Je.default,k7e=E7e(or),Rj=ho,DI=gc,C7e=Be,D1=Rj.fromObject(Object.freeze({__UNPUBLISH_RECORD_SENTINEL:!0})),Aj=(function(){function e(r){this._base=r,this._sink=DI.create()}var t=e.prototype;return t.has=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i!==D1}else return this._base.has(n)},t.get=function(n){if(this._sink.has(n)){var i=this._sink.get(n);return i===D1?void 0:i}else return this._base.get(n)},t.getStatus=function(n){var i=this.get(n);return i===void 0?"UNKNOWN":i===null?"NONEXISTENT":"EXISTENT"},t.clear=function(){this._base=DI.create(),this._sink.clear()},t.delete=function(n){this._sink.delete(n)},t.remove=function(n){this._sink.set(n,D1)},t.set=function(n,i){this._sink.set(n,i)},t.getRecordIDs=function(){return Object.keys(this.toJSON())},t.size=function(){return Object.keys(this.toJSON()).length},t.toJSON=function(){var n=this,i=(0,k7e.default)({},this._base.toJSON());return this._sink.getRecordIDs().forEach(function(o){var a=n.get(o);a===void 0?delete i[o]:i[o]=Rj.toJSON(a)}),i},t.getOptimisticRecordIDs=function(){return new Set(this._sink.getRecordIDs())},e})();function R7e(e){return new Aj(e)}function A7e(e){return e instanceof Aj||C7e(!1),e.getOptimisticRecordIDs()}var $7e={create:R7e,getOptimisticRecordIDs:A7e},T7e=fc,N7e=T7e.RELAY_LIVE_RESOLVER,FI=Be,D7e=(function(){function e(){}var t=e.prototype;return t.readFromCacheOrEvaluate=function(n,i,o,a,s){i.kind===N7e&&FI(!1);var l=a(),c=l.resolverResult,d=l.snapshot,f=l.error;return[c,void 0,f,d,void 0,void 0]},t.invalidateDataIDs=function(n){},t.ensureClientRecord=function(n,i){FI(!1)},t.notifyUpdatedSubscribers=function(n){},e})(),F7e={NoopResolverCache:D7e},o_=Je.default,II=o_(or),I7e=o_(wi),P7e=o_(Sf),F1=o_(Ql),O7e=["message"],PI=Ko,M7e=Xb,L7e=M7e.isSuspenseSentinel,z7e=Yl,$i=ho,ns=wr,OI=ns.CLIENT_EDGE_TRAVERSAL_PATH,U7e=ns.FRAGMENT_OWNER_KEY,B7e=ns.FRAGMENT_PROP_NAME_KEY,Rg=ns.FRAGMENTS_KEY,Ag=ns.ID_KEY,j7e=ns.MODULE_COMPONENT_KEY,q7e=ns.ROOT_ID,p0=ns.getArgumentValues,V7e=ns.getModuleComponentKey,$g=ns.getStorageKey,G7e=F7e,K7e=G7e.NoopResolverCache,$j=yC,H7e=$j.RESOLVER_FRAGMENT_ERRORED_SENTINEL,W7e=$j.withResolverContext,J7e=r_,Q7e=J7e.generateTypeID,Jr=Be;function Tj(e,t,r,n){var i=new Y7e(e,t,r??new K7e,n);return i.read()}var Y7e=(function(){function e(r,n,i,o){var a,s,l,c;this._clientEdgeTraversalPath=(a=n.clientEdgeTraversalPath)!==null&&a!==void 0&&a.length?(0,F1.default)(n.clientEdgeTraversalPath):[],this._missingClientEdges=[],this._missingLiveResolverFields=[],this._isMissingData=!1,this._isWithinUnmatchedTypeRefinement=!1,this._fieldErrors=null,this._owner=n.owner,this._useExecTimeResolvers=(s=(l=this._owner.node.operation.use_exec_time_resolvers)!==null&&l!==void 0?l:((c=this._owner.node.operation.exec_time_resolvers_enabled_provider)===null||c===void 0?void 0:c.get())===!0)!==null&&s!==void 0?s:!1,this._recordSource=r,this._seenRecords=new Set,this._selector=n,this._variables=n.variables,this._resolverCache=i,this._fragmentName=n.node.name,this._updatedDataIDs=new Set,this._resolverContext=o}var t=e.prototype;return t.read=function(){var n,i=this._selector,o=i.node,a=i.dataID,s=i.isWithinUnmatchedTypeRefinement,l=o.abstractKey,c=this._recordSource.get(a),d=!s;if(d&&l==null&&c!=null&&(this._recordMatchesTypeCondition(c,o.type)||(d=!1)),d&&l!=null&&c!=null){var f=this._implementsInterface(c,l);f===!1&&(d=!1)}this._isWithinUnmatchedTypeRefinement=!d;var h=this._traverse(o,a,null),p=(n=this._selector.node.metadata)===null||n===void 0?void 0:n.catchTo;return p!=null&&(h=this._catchErrors(h,p,null)),this._updatedDataIDs.size>0&&(this._resolverCache.notifyUpdatedSubscribers(this._updatedDataIDs),this._updatedDataIDs.clear()),{data:h,isMissingData:this._isMissingData&&d,missingClientEdges:this._missingClientEdges.length?this._missingClientEdges:null,missingLiveResolverFields:this._missingLiveResolverFields,seenRecords:this._seenRecords,selector:this._selector,fieldErrors:this._fieldErrors}},t._maybeAddFieldErrors=function(n,i){var o=$i.getErrors(n,i);if(o!=null){var a=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);for(var s=0;s<o.length;s++){var l,c,d,f=o[s];this._fieldErrors.push({kind:"relay_field_payload.error",owner:a,fieldPath:((l=f.path)!==null&&l!==void 0?l:[]).join("."),error:f,shouldThrow:(c=(d=this._selector.node.metadata)===null||d===void 0?void 0:d.throwOnFieldError)!==null&&c!==void 0?c:!1,handled:!1,uiContext:void 0})}}},t._markDataAsMissing=function(n){var i,o;if(!this._isWithinUnmatchedTypeRefinement){this._fieldErrors==null&&(this._fieldErrors=[]);var a=this._fragmentName;if(this._fieldErrors.push((i=(o=this._selector.node.metadata)===null||o===void 0?void 0:o.throwOnFieldError)!==null&&i!==void 0&&i?{kind:"missing_expected_data.throw",owner:a,fieldPath:n,handled:!1,uiContext:void 0}:{kind:"missing_expected_data.log",owner:a,fieldPath:n,uiContext:void 0}),this._isMissingData=!0,this._clientEdgeTraversalPath.length){var s=this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1];s!==null&&this._missingClientEdges.push({request:s.readerClientEdge.operation,clientEdgeDestinationID:s.clientEdgeDestinationID})}}},t._traverse=function(n,i,o){var a=this._recordSource.get(i);if(this._seenRecords.add(i),a==null)return a===void 0&&this._markDataAsMissing("<record>"),a;var s=o||{},l=this._traverseSelections(n.selections,a,s);return l?s:null},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||Jr(!1),this._variables[n]},t._maybeReportUnexpectedNull=function(n){if(n.action!=="NONE"){var i=this._fragmentName;this._fieldErrors==null&&(this._fieldErrors=[]);var o;if(n.field.linkedField!=null){var a;o=(a=n.field.linkedField.alias)!==null&&a!==void 0?a:n.field.linkedField.name}else{var s;o=(s=n.field.alias)!==null&&s!==void 0?s:n.field.name}switch(n.action){case"THROW":this._fieldErrors.push({kind:"missing_required_field.throw",fieldPath:o,owner:i,handled:!1,uiContext:void 0});return;case"LOG":this._fieldErrors.push({kind:"missing_required_field.log",fieldPath:o,owner:i,uiContext:void 0});return;default:n.action}}},t._handleRequiredFieldValue=function(n,i){return i==null?(this._maybeReportUnexpectedNull(n),!1):!0},t._catchErrors=function(n,i,o){var a=n;switch(i){case"RESULT":a=this._asResult(n);break;case"NULL":this._fieldErrors!=null&&this._fieldErrors.length>0&&(a=null);break}var s=this._fieldErrors;if(this._fieldErrors=o,s!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var l=0;l<s.length;l++)this._fieldErrors.push(MI(s[l]))}return a},t._asResult=function(n){if(this._fieldErrors==null||this._fieldErrors.length===0)return{ok:!0,value:n};var i=this._fieldErrors.map(function(o){switch(o.kind){case"relay_field_payload.error":var a=o.error;a.message;var s=(0,P7e.default)(a,O7e);return s;case"missing_expected_data.throw":case"missing_expected_data.log":return{path:o.fieldPath.split(".")};case"relay_resolver.error":return{message:"Relay: Error in resolver for field at ".concat(o.fieldPath," in ").concat(o.owner)};case"missing_required_field.throw":return{message:"Relay: Missing @required value at path '".concat(o.fieldPath,"' in '").concat(o.owner,"'.")};case"missing_required_field.log":return null;default:o.kind,Jr(!1)}}).filter(Boolean);return{ok:!1,errors:i}},t._traverseSelections=function(n,i,o){for(var a=0;a<n.length;a++){var s=n[a];switch(s.kind){case"RequiredField":var l=this._readClientSideDirectiveField(s,i,o);if(!this._handleRequiredFieldValue(s,l))return!1;break;case"CatchField":{var c,d,f,h=this._fieldErrors;this._fieldErrors=null;var p=this._readClientSideDirectiveField(s,i,o),m=(c=(d=s.field)===null||d===void 0?void 0:d.backingField)!==null&&c!==void 0?c:s.field,g=(f=m?.alias)!==null&&f!==void 0?f:m?.name;g==null&&Jr(!1),o[g]=this._catchErrors(p,s.to,h);break}case"ScalarField":this._readScalar(s,i,o);break;case"LinkedField":s.plural?this._readPluralLink(s,i,o):this._readLink(s,i,o);break;case"Condition":var v=!!this._getVariableValue(s.condition);if(v===s.passingValue){var b=this._traverseSelections(s.selections,i,o);if(!b)return!1}break;case"InlineFragment":{var y=this._readInlineFragment(s,i,o,!1);if(y===!1)return!1;break}case"RelayLiveResolver":case"RelayResolver":{this._useExecTimeResolvers?this._readScalar(s,i,o):this._readResolverField(s,i,o);break}case"FragmentSpread":this._createFragmentPointer(s,i,o);break;case"AliasedInlineFragmentSpread":{this._readAliasedInlineFragment(s,i,o);break}case"ModuleImport":this._readModuleImport(s,i,o);break;case"InlineDataFragmentSpread":this._createInlineDataOrResolverFragmentPointer(s,i,o);break;case"Defer":case"ClientExtension":{var S=this._isMissingData,w=this._missingClientEdges.length;this._clientEdgeTraversalPath.push(null);var C=this._traverseSelections(s.selections,i,o);if(this._isMissingData=S||this._missingClientEdges.length>w||this._missingLiveResolverFields.length>0,this._clientEdgeTraversalPath.pop(),!C)return!1;break}case"Stream":{var A=this._traverseSelections(s.selections,i,o);if(!A)return!1;break}case"ActorChange":this._readActorChange(s,i,o);break;case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(s.backingField.kind==="RelayResolver"||s.backingField.kind==="RelayLiveResolver")){var T=s.linkedField;T.plural?this._readPluralLink(T,i,o):this._readLink(T,i,o)}else this._readClientEdge(s,i,o);break;default:Jr(!1)}}return!0},t._readClientSideDirectiveField=function(n,i,o){switch(n.field.kind){case"ScalarField":return this._readScalar(n.field,i,o);case"LinkedField":return n.field.plural?this._readPluralLink(n.field,i,o):this._readLink(n.field,i,o);case"RelayResolver":case"RelayLiveResolver":return this._useExecTimeResolvers?this._readScalar(n.field,i,o):this._readResolverField(n.field,i,o);case"ClientEdgeToClientObject":case"ClientEdgeToServerObject":if(this._useExecTimeResolvers&&(n.field.backingField.kind==="RelayResolver"||n.field.backingField.kind==="RelayLiveResolver")){var a=n.field;return a.linkedField.plural?this._readPluralLink(a.linkedField,i,o):this._readLink(a.linkedField,i,o)}else return this._readClientEdge(n.field,i,o);case"AliasedInlineFragmentSpread":return this._readAliasedInlineFragment(n.field,i,o);default:n.field.kind,Jr(!1)}},t._readResolverField=function(n,i,o){var a,s=$i.getDataID(i),l=this._fieldErrors;this._fieldErrors=null;var c=this._readResolverFieldImpl(n,s),d=(a=n.alias)!==null&&a!==void 0?a:n.name;return this._prependPreviousErrors(l,d),o[d]=c,c},t._readResolverFieldImpl=function(n,i){var o=this,a=n.fragment,s,l=function(y){return s!=null?{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors}:(s=Tj(o._recordSource,y,o._resolverCache),{data:s.data,isMissingData:s.isMissingData,fieldErrors:s.fieldErrors})},c=function(){if(a!=null){var y={__id:i,__fragmentOwner:o._owner,__fragments:(0,I7e.default)({},a.name,a.args?p0(a.args,o._variables):{})};o._clientEdgeTraversalPath.length>0&&o._clientEdgeTraversalPath[o._clientEdgeTraversalPath.length-1]!==null&&(y[OI]=(0,F1.default)(o._clientEdgeTraversalPath));var S={getDataForResolverFragment:l};return W7e(S,function(){var T=LI(n,o._variables,y,o._resolverContext),R=T[0],N=T[1];return{resolverResult:R,snapshot:s,error:N}})}else{var w=LI(n,o._variables,null,o._resolverContext),C=w[0],A=w[1];return{resolverResult:C,snapshot:void 0,error:A}}},d=this._resolverCache.readFromCacheOrEvaluate(i,n,this._variables,c,l),f=d[0],h=d[1],p=d[2],m=d[3],g=d[4],v=d[5];return this._propagateResolverMetadata(n.path,m,p,h,g,v),f},t._propagateResolverMetadata=function(n,i,o,a,s,l){var c=this;if(i!=null){if(i.missingClientEdges!=null)for(var d=0;d<i.missingClientEdges.length;d++){var f=i.missingClientEdges[d];this._missingClientEdges.push(f)}if(i.missingLiveResolverFields!=null){this._isMissingData=this._isMissingData||i.missingLiveResolverFields.length>0;for(var h=0;h<i.missingLiveResolverFields.length;h++){var p=i.missingLiveResolverFields[h];this._missingLiveResolverFields.push(p)}}if(i.fieldErrors!=null){this._fieldErrors==null&&(this._fieldErrors=[]);for(var m=0;m<i.fieldErrors.length;m++){var g,v=i.fieldErrors[m];((g=this._selector.node.metadata)===null||g===void 0?void 0:g.throwOnFieldError)===!0?this._fieldErrors.push(v):this._fieldErrors.push(MI(v))}}this._isMissingData=this._isMissingData||i.isMissingData}if(o){var b,y,S={kind:"relay_resolver.error",fieldPath:n,owner:this._fragmentName,error:o,shouldThrow:(b=(y=this._selector.node.metadata)===null||y===void 0?void 0:y.throwOnFieldError)!==null&&b!==void 0?b:!1,handled:!1,uiContext:void 0};this._fieldErrors==null?this._fieldErrors=[S]:this._fieldErrors.push(S)}a!=null&&this._seenRecords.add(a),s!=null&&(this._isMissingData=!0,this._missingLiveResolverFields.push(s)),l?.forEach(function(w){c._updatedDataIDs.add(w)})},t._readClientEdge=function(n,i,o){var a=this,s,l=n.backingField;l.kind==="ClientExtension"&&Jr(!1);var c=(s=l.alias)!==null&&s!==void 0?s:l.name,d={};this._traverseSelections([l],i,d);var f=d[c];if(f==null||L7e(f))return o[c]=f,f;if(n.linkedField.plural){Array.isArray(f)||Jr(!1);var h;n.kind!=="ClientEdgeToClientObject"&&Jr(!1),n.backingField.normalizationInfo==null?h=f.map(function(N){var I,M=(I=n.concreteType)!==null&&I!==void 0?I:N.__typename;typeof M!="string"&&Jr(!1);var P=I1(N,l.path,a._owner.identifier),B=a._resolverCache.ensureClientRecord(P,M),j=n.modelResolvers;if(j!=null){var W=j[M];W===void 0&&Jr(!1);var te=a._readResolverFieldImpl(W,B);return te!=null?B:null}return B}):h=f.map(function(N){return I1(N,l.path,a._owner.identifier)}),this._clientEdgeTraversalPath.push(null);var p=this._readLinkedIds(n.linkedField,h,i,o);return this._clientEdgeTraversalPath.pop(),o[c]=p,p}else{var m,g=I1(f,l.path,this._owner.identifier),v,b=(m=n.concreteType)!==null&&m!==void 0?m:f.__typename,y;n.kind==="ClientEdgeToClientObject"?n.backingField.normalizationInfo==null?(typeof b!="string"&&Jr(!1),v=this._resolverCache.ensureClientRecord(g,b),y=null):(v=g,y=null):(v=g,y={readerClientEdge:n,clientEdgeDestinationID:g});var S=n.modelResolvers;if(S!=null){typeof b!="string"&&Jr(!1);var w=S[b];w===void 0&&Jr(!1);var C=this._readResolverFieldImpl(w,v);if(C==null)return o[c]=null,null}this._clientEdgeTraversalPath.push(y);var A=o[c];A==null||typeof A=="object"||Jr(!1);var T=this._fieldErrors;this._fieldErrors=null;var R=this._traverse(n.linkedField,v,A);return this._prependPreviousErrors(T,c),this._clientEdgeTraversalPath.pop(),o[c]=R,R}},t._readScalar=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=$g(n,this._variables),c=$i.getValue(i,l);return c===null||PI.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(c)&&c.length===0?this._maybeAddFieldErrors(i,l):c===void 0&&this._markDataAsMissing(s),o[s]=c,c},t._readLink=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=$g(n,this._variables),c=$i.getLinkedRecordID(i,l);if(c==null)return o[s]=c,c===null?this._maybeAddFieldErrors(i,l):c===void 0&&this._markDataAsMissing(s),c;var d=o[s];d==null||typeof d=="object"||Jr(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=this._traverse(n,c,d);return this._prependPreviousErrors(f,s),o[s]=h,h},t._prependPreviousErrors=function(n,i){if(this._fieldErrors!=null){for(var o=0;o<this._fieldErrors.length;o++){var a=this._fieldErrors[o];a.owner===this._fragmentName&&(a.kind==="missing_expected_data.throw"||a.kind==="missing_expected_data.log"||a.kind==="missing_required_field.throw"||a.kind==="missing_required_field.log")&&(a.fieldPath="".concat(i,".").concat(a.fieldPath))}if(n!=null){for(var s=this._fieldErrors.length-1;s>=0;s--)n.push(this._fieldErrors[s]);this._fieldErrors=n}}else this._fieldErrors=n},t._readActorChange=function(n,i,o){var a,s=(a=n.alias)!==null&&a!==void 0?a:n.name,l=$g(n,this._variables),c=$i.getActorLinkedRecordID(i,l);if(c==null)return o[s]=c,c===void 0?this._markDataAsMissing(s):c===null&&this._maybeAddFieldErrors(i,l),o[s];var d=c[0],f=c[1],h={};return this._createFragmentPointer(n.fragmentSpread,$i.fromObject({__id:f}),h),o[s]={__fragmentRef:h,__viewer:d},o[s]},t._readPluralLink=function(n,i,o){var a=$g(n,this._variables),s=$i.getLinkedRecordIDs(i,a);return(s===null||PI.ENABLE_NONCOMPLIANT_ERROR_HANDLING_ON_LISTS&&Array.isArray(s)&&s.length===0)&&this._maybeAddFieldErrors(i,a),this._readLinkedIds(n,s,i,o)},t._readLinkedIds=function(n,i,o,a){var s=this,l,c=(l=n.alias)!==null&&l!==void 0?l:n.name;if(i==null)return a[c]=i,i===void 0&&this._markDataAsMissing(c),i;var d=a[c];d==null||Array.isArray(d)||Jr(!1);var f=this._fieldErrors;this._fieldErrors=null;var h=d||[];return i.forEach(function(p,m){if(p==null){p===void 0&&s._markDataAsMissing(String(m)),h[m]=p;return}var g=h[m];g==null||typeof g=="object"||Jr(!1);var v=s._fieldErrors;s._fieldErrors=null,h[m]=s._traverse(n,p,g),s._prependPreviousErrors(v,m)}),this._prependPreviousErrors(f,c),a[c]=h,h},t._readModuleImport=function(n,i,o){var a=V7e(n.documentName),s=$i.getValue(i,a),l=s!==void 0?s:n.componentModuleProvider;if(l==null){l===void 0&&this._markDataAsMissing("<module-import>");return}this._createFragmentPointer({kind:"FragmentSpread",name:n.fragmentName,args:n.args},i,o),o[B7e]=n.fragmentPropName,o[j7e]=l},t._readAliasedInlineFragment=function(n,i,o){var a=this._fieldErrors;this._fieldErrors=null;var s=this._readInlineFragment(n.fragment,i,{},!0);this._prependPreviousErrors(a,n.name),s===!1&&(s=null),o[n.name]=s},t._readInlineFragment=function(n,i,o,a){if(n.type==null){var s=this._traverseSelections(n.selections,i,o);return s===!1?!1:o}var l=n.abstractKey;if(l==null)if(this._recordMatchesTypeCondition(i,n.type)){var s=this._traverseSelections(n.selections,i,o);if(!s)return!1}else return null;else{var c=this._implementsInterface(i,l);if(c===!1&&a)return null;var d=this._isMissingData,f=this._isWithinUnmatchedTypeRefinement;this._isWithinUnmatchedTypeRefinement=f||c===!1;var h=this._traverseSelections(n.selections,i,o);if(this._isWithinUnmatchedTypeRefinement=f,c===!1)return this._isMissingData=d,null;if(c==null)return;if(h===!1)return!1}return o},t._recordMatchesTypeCondition=function(n,i){var o=$i.getType(n);return o!=null&&o===i||$i.getDataID(n)===q7e},t._createFragmentPointer=function(n,i,o){var a=o[Rg];a==null&&(a=o[Rg]={}),typeof a=="object"&&a!=null||Jr(!1),o[Ag]==null&&(o[Ag]=$i.getDataID(i)),a[n.name]=p0(n.args,this._variables,this._isWithinUnmatchedTypeRefinement),o[U7e]=this._owner,this._clientEdgeTraversalPath.length>0&&this._clientEdgeTraversalPath[this._clientEdgeTraversalPath.length-1]!==null&&(o[OI]=(0,F1.default)(this._clientEdgeTraversalPath))},t._createInlineDataOrResolverFragmentPointer=function(n,i,o){var a=o[Rg];a==null&&(a=o[Rg]={}),typeof a=="object"&&a!=null||Jr(!1),o[Ag]==null&&(o[Ag]=$i.getDataID(i));var s={},l=this._fragmentName;this._fragmentName=n.name;var c=this._variables,d=n.args?p0(n.args,this._variables):{};this._variables=z7e.getFragmentVariables(n,this._owner.variables,d),this._traverseSelections(n.selections,i,s),this._variables=c,this._fragmentName=l,a[n.name]=s},t._implementsInterface=function(n,i){var o=$i.getType(n),a=this._recordSource.get(Q7e(o)),s=a!=null?$i.getValue(a,i):null;return s==null&&this._markDataAsMissing("<abstract-type-hint>"),s},e})();function MI(e){switch(e.kind){case"missing_expected_data.throw":case"missing_required_field.throw":case"relay_field_payload.error":case"relay_resolver.error":return(0,II.default)((0,II.default)({},e),{},{handled:!0});case"missing_expected_data.log":case"missing_required_field.log":return e;default:e.kind,Jr(!1)}}function LI(e,t,r,n){var i=typeof e.resolverModule=="function"?e.resolverModule:e.resolverModule.default,o=null,a=null;try{var s=[];e.fragment!=null&&s.push(r);var l=e.args?p0(e.args,t):void 0;s.push(l),s.push(n),o=i.apply(null,s)}catch(c){o=null,c!==H7e&&(a=c)}return[o,a]}function I1(e,t,r){if(typeof e=="string")return e;if(typeof e=="object"&&e!=null&&typeof e.id=="string")return e.id;Jr(!1)}var jC={read:Tj},X7e=Je.default,zI=X7e(qr),Z7e=MC,eUe=_j,tUe=Sj,rUe=Yl,UI=rUe.getLocalVariables,ps=ho,a_=wr,nUe=r_,BI=nUe.generateTypeID,P1=Be,iUe=a_.getReadTimeResolverStorageKey,jI=a_.getStorageKey,oUe=a_.getModuleOperationKey;function aUe(e,t,r,n,i,o){var a=t.dataID,s=t.node,l=t.variables,c=new sUe(e,l,r,n,i,o);c.mark(s,a)}var sUe=(function(){function e(r,n,i,o,a,s){this._operationLoader=o??null,this._operationName=null,this._useExecTimeResolvers=s??!1,this._recordSource=r,this._references=i,this._variables=n,this._shouldProcessClientComponents=a}var t=e.prototype;return t.mark=function(n,i){(n.kind==="Operation"||n.kind==="SplitOperation")&&(this._operationName=n.name),this._traverse(n,i)},t._traverse=function(n,i){this._references.add(i);var o=this._recordSource.get(i);o!=null&&this._traverseSelections(n.selections,o)},t._getVariableValue=function(n){return this._variables.hasOwnProperty(n)||P1(!1),this._variables[n]},t._traverseSelections=function(n,i){var o=this;n.forEach(function(a){switch(a.kind){case"ActorChange":o._traverseLink(a.linkedField,i);break;case"LinkedField":a.plural?o._traversePluralLink(a,i):o._traverseLink(a,i);break;case"Condition":var s=!!o._getVariableValue(a.condition);s===a.passingValue&&o._traverseSelections(a.selections,i);break;case"InlineFragment":if(a.abstractKey==null){var l=ps.getType(i);(l!=null&&l===a.type||l===a_.ROOT_TYPE)&&o._traverseSelections(a.selections,i)}else{var c=ps.getType(i),d=BI(c);o._references.add(d),o._traverseSelections(a.selections,i)}break;case"FragmentSpread":var f=o._variables;o._variables=UI(o._variables,a.fragment.argumentDefinitions,a.args),o._traverseSelections(a.fragment.selections,i),o._variables=f;break;case"LinkedHandle":var h=eUe(a,n,o._variables);h.plural?o._traversePluralLink(h,i):o._traverseLink(h,i);break;case"Defer":case"Stream":o._traverseSelections(a.selections,i);break;case"ScalarField":case"ScalarHandle":break;case"TypeDiscriminator":{var p=ps.getType(i),m=BI(p);o._references.add(m);break}case"ModuleImport":o._traverseModuleImport(a,i);break;case"ClientExtension":o._traverseSelections(a.selections,i);break;case"ClientComponent":if(o._shouldProcessClientComponents===!1)break;o._traverseSelections(a.fragment.selections,i);break;case"RelayResolver":case"RelayLiveResolver":o._traverseResolverField(a,i);break;case"ClientEdgeToClientObject":o._traverseClientEdgeToClientObject(a,i);break;default:P1(!1)}})},t._traverseClientEdgeToClientObject=function(n,i){if(this._useExecTimeResolvers){this._traverseLink(n.linkedField,i);return}var o=this._traverseResolverField(n.backingField,i);if(o!=null){var a=this._recordSource.get(o);if(a!=null)if(n.backingField.isOutputType){var s=tUe(a);if(s!=null){var l=(0,zI.default)(s),c;try{for(l.s();!(c=l.n()).done;){var d=c.value;this._references.add(d)}}catch(y){l.e(y)}finally{l.f()}}}else{var f=n.linkedField,h=f.concreteType;if(h==null)return;if(f.plural){var p=ps.getResolverLinkedRecordIDs(a,h);if(p!=null){var m=(0,zI.default)(p),g;try{for(m.s();!(g=m.n()).done;){var v=g.value;v!=null&&this._traverse(f,v)}}catch(y){m.e(y)}finally{m.f()}}}else{var b=ps.getResolverLinkedRecordID(a,h);b!=null&&this._traverse(f,b)}}}},t._traverseResolverField=function(n,i){if(!this._useExecTimeResolvers){var o=iUe(n,this._variables),a=ps.getLinkedRecordID(i,o);a!=null&&this._references.add(a);var s=n.fragment;return s!=null&&this._traverseSelections([s],i),a}},t._traverseModuleImport=function(n,i){var o=this._operationLoader;o===null&&P1(!1);var a=oUe(n.documentName),s=ps.getValue(i,a);if(s!=null){var l=o.get(s);if(l!=null){var c=Z7e(l),d=this._variables;this._variables=UI(this._variables,c.argumentDefinitions,n.args),this._traverseSelections(c.selections,i),this._variables=d}}},t._traverseLink=function(n,i){var o=jI(n,this._variables),a=ps.getLinkedRecordID(i,o);a!=null&&this._traverse(n,a)},t._traversePluralLink=function(n,i){var o=this,a=jI(n,this._variables),s=ps.getLinkedRecordIDs(i,a);s?.forEach(function(l){l!=null&&o._traverse(n,l)})},e})(),lUe={mark:aUe},uUe=Symbol.iterator;function cUe(e,t){for(var r=e[uUe](),n=r.next();!n.done;){var i=n.value;if(t.has(i))return!0;n=r.next()}return!1}var dUe=cUe,fUe=wr,hUe=fUe.ROOT_ID,pUe=OC,mUe=pUe.VIEWER_ID,gUe=Symbol.iterator;function vUe(e,t){for(var r=e[gUe](),n=r.next();!n.done;){var i=n.value;if(t.has(i)&&i!==hUe&&i!==mUe)return!0;n=r.next()}return!1}var bUe=vUe,qI=Yb,VI=Ko,_Ue=dUe,yUe=bUe,GI=jC,xUe=(function(){function e(r,n,i){this._subscriptions=new Set,this.__log=r,this._resolverCache=n,this._resolverContext=i}var t=e.prototype;return t.subscribe=function(n,i){var o=this,a={backup:null,callback:i,snapshot:n,stale:!1},s=function(){o._subscriptions.delete(a)};return this._subscriptions.add(a),{dispose:s}},t.snapshotSubscriptions=function(n){var i=this;this._subscriptions.forEach(function(o){if(!o.stale){o.backup=o.snapshot;return}var a=o.snapshot,s=GI.read(n,a.selector,i._resolverCache,i._resolverContext),l=qI(a.data,s.data);s.data=l,o.backup=s})},t.restoreSubscriptions=function(){this._subscriptions.forEach(function(n){var i=n.backup;n.backup=null,i?(i.data!==n.snapshot.data&&(n.stale=!0),n.snapshot={data:n.snapshot.data,isMissingData:i.isMissingData,missingClientEdges:i.missingClientEdges,missingLiveResolverFields:i.missingLiveResolverFields,seenRecords:i.seenRecords,selector:i.selector,fieldErrors:i.fieldErrors}):n.stale=!0})},t.updateSubscriptions=function(n,i,o,a){var s=this,l=i.size!==0;this._subscriptions.forEach(function(c){var d=s._updateSubscription(n,c,i,l,a);d!=null&&o.push(d)})},t._updateSubscription=function(n,i,o,a,s){var l=i.backup,c=i.callback,d=i.snapshot,f=i.stale,h=a&&_Ue(d.seenRecords,o);if(!(!f&&!h)){var p=h||!l?GI.read(n,d.selector,this._resolverCache,this._resolverContext):l,m=qI(d.data,p.data);if(p={data:m,isMissingData:p.isMissingData,missingClientEdges:p.missingClientEdges,missingLiveResolverFields:p.missingLiveResolverFields,seenRecords:p.seenRecords,selector:p.selector,fieldErrors:p.fieldErrors},i.snapshot=p,i.stale=!1,p.data!==d.data)return this.__log&&VI.ENABLE_NOTIFY_SUBSCRIPTION&&this.__log({name:"store.notify.subscription",sourceOperation:s,snapshot:d,nextSnapshot:p}),c(p),d.selector.owner;if(VI.ENABLE_LOOSE_SUBSCRIPTION_ATTRIBUTION&&(f||yUe(d.seenRecords,o)))return d.selector.owner}},t.size=function(){return this._subscriptions.size},e})(),SUe=xUe,Nj=Je.default,KI=Nj(qr),wUe=Nj(wi),Dj=IC,EUe=Dj.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,HI=Dj.assertInternalActorIdentifier,kUe=Ize,CUe=W9e,RUe=aj,qC=w7e,AUe=qC.LiveResolverCache,$Ue=qC.RELAY_RESOLVER_LIVE_STATE_SUBSCRIPTION_KEY,TUe=qC.getUpdatedDataIDs,wu=ho,WI=$7e,NUe=jC,DUe=lUe,FUe=SUe,IUe=wr,Fj=wr,O1=Fj.ROOT_ID,PUe=Fj.ROOT_TYPE,M1=Be,OUe=10,MUe=(function(){function e(r,n){var i=this,o,a,s,l,c,d,f,h;(0,wUe.default)(this,"_gcStep",function(){i._gcRun&&(i._gcRun.next().done?i._gcRun=null:i._gcScheduler(i._gcStep))}),this._currentWriteEpoch=0,this._gcHoldCounter=0,this._gcReleaseBufferSize=(o=n?.gcReleaseBufferSize)!==null&&o!==void 0?o:OUe,this._shouldRetainWithinTTL_EXPERIMENTAL=(a=n?.shouldRetainWithinTTL_EXPERIMENTAL)!==null&&a!==void 0?a:!1,this._gcRun=null,this._gcScheduler=(s=n?.gcScheduler)!==null&&s!==void 0?s:kUe,this._getDataID=(l=n?.getDataID)!==null&&l!==void 0?l:RUe,this._globalInvalidationEpoch=null,this._invalidationSubscriptions=new Set,this._invalidatedRecordIDs=new Set,this.__log=(c=n?.log)!==null&&c!==void 0?c:null,this._queryCacheExpirationTime=n?.queryCacheExpirationTime,this._operationLoader=(d=n?.operationLoader)!==null&&d!==void 0?d:null,this._optimisticSource=null,this._recordSource=r,this._releaseBuffer=[],this._roots=new Map,this._shouldScheduleGC=!1,this._resolverCache=new AUe(function(){return i._getMutableRecordSource()},this),this._resolverContext=n?.resolverContext,this._storeSubscriptions=new FUe(n?.log,this._resolverCache,this._resolverContext),this._updatedRecordIDs=new Set,this._shouldProcessClientComponents=(f=n?.shouldProcessClientComponents)!==null&&f!==void 0?f:!1,this._treatMissingFieldsAsNull=(h=n?.treatMissingFieldsAsNull)!==null&&h!==void 0?h:!1,this._actorIdentifier=n?.actorIdentifier,LUe(this._recordSource)}var t=e.prototype;return t.getSource=function(){var n;return(n=this._optimisticSource)!==null&&n!==void 0?n:this._recordSource},t.getOperationLoader=function(){return this._operationLoader},t._getMutableRecordSource=function(){var n;return(n=this._optimisticSource)!==null&&n!==void 0?n:this._recordSource},t.getLiveResolverPromise=function(n){return this._resolverCache.getLiveResolverPromise(n)},t.batchLiveStateUpdates=function(n){this.__log!=null&&this.__log({name:"liveresolver.batch.start"});try{this._resolverCache.batchLiveStateUpdates(n)}finally{this.__log!=null&&this.__log({name:"liveresolver.batch.end"})}},t.check=function(n,i){var o,a,s,l,c,d,f,h=n.root,p=this._getMutableRecordSource(),m=this._globalInvalidationEpoch,g=(o=(a=n.request.node.operation.use_exec_time_resolvers)!==null&&a!==void 0?a:((s=n.request.node.operation.exec_time_resolvers_enabled_provider)===null||s===void 0?void 0:s.get())===!0)!==null&&o!==void 0?o:!1,v=this._roots.get(n.request.identifier),b=v!=null?v.epoch:null;if(m!=null&&(b==null||b<=m))return{status:"stale"};var y=(l=i?.handlers)!==null&&l!==void 0?l:[],S=(c=i?.getSourceForActor)!==null&&c!==void 0?c:function(A){return HI(A),p},w=(d=i?.getTargetForActor)!==null&&d!==void 0?d:function(A){return HI(A),p},C=CUe.check(S,w,(f=i?.defaultActorIdentifier)!==null&&f!==void 0?f:EUe,h,y,this._operationLoader,this._getDataID,this._shouldProcessClientComponents,this.__log,g);return UUe(C,b,v?.fetchTime,this._queryCacheExpirationTime)},t.retain=function(n){var i=this,o=n.request.identifier,a=!1,s=function(){if(!a){a=!0;var d=i._roots.get(o);if(d!=null&&(d.refCount--,d.refCount===0)){var f=i._queryCacheExpirationTime,h=d.fetchTime!=null&&f!=null&&d.fetchTime<=Date.now()-f;if(h)i._shouldRetainWithinTTL_EXPERIMENTAL||i._roots.delete(o),i.scheduleGC();else if(i._releaseBuffer.push(o),i._releaseBuffer.length>i._gcReleaseBufferSize){var p=i._releaseBuffer.shift();i._shouldRetainWithinTTL_EXPERIMENTAL||i._roots.delete(p),i.scheduleGC()}}}},l=this._roots.get(o);return l!=null?(l.refCount===0&&(this._releaseBuffer=this._releaseBuffer.filter(function(c){return c!==o})),l.refCount+=1):this._roots.set(o,{operation:n,refCount:1,epoch:null,fetchTime:null}),{dispose:s}},t.lookup=function(n){var i=this.__log;i?.({name:"store.lookup.start",selector:n});var o=this.getSource(),a=NUe.read(o,n,this._resolverCache,this._resolverContext);return i?.({name:"store.lookup.end",selector:n}),a},t.notify=function(n,i){var o=this,a=this.__log;a?.({name:"store.notify.start",sourceOperation:n}),this._currentWriteEpoch++,i===!0&&(this._globalInvalidationEpoch=this._currentWriteEpoch),this._resolverCache.invalidateDataIDs(this._updatedRecordIDs);var s=this.getSource(),l=[];if(this._storeSubscriptions.updateSubscriptions(s,this._updatedRecordIDs,l,n),this._invalidationSubscriptions.forEach(function(h){o._updateInvalidationSubscription(h,i===!0)}),n!=null){var c=n.request.identifier,d=this._roots.get(c);if(d!=null)d.epoch=this._currentWriteEpoch,d.fetchTime=Date.now();else if(n.request.node.params.operationKind==="query"&&this._gcReleaseBufferSize>0&&this._releaseBuffer.length<this._gcReleaseBufferSize){var f={operation:n,refCount:0,epoch:this._currentWriteEpoch,fetchTime:Date.now()};this._releaseBuffer.push(c),this._roots.set(c,f)}}return a?.({name:"store.notify.complete",sourceOperation:n,updatedRecordIDs:this._updatedRecordIDs,invalidatedRecordIDs:this._invalidatedRecordIDs,subscriptionsSize:this._storeSubscriptions.size(),updatedOwners:l}),this._updatedRecordIDs.clear(),this._invalidatedRecordIDs.clear(),l},t.publish=function(n,i){var o=this._getMutableRecordSource();zUe(o,n,this._currentWriteEpoch+1,i,this._updatedRecordIDs,this._invalidatedRecordIDs);var a=this.__log;a?.({name:"store.publish",source:n,optimistic:o===this._optimisticSource})},t.subscribe=function(n,i){return this._storeSubscriptions.subscribe(n,i)},t.holdGC=function(){var n=this;this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._gcHoldCounter++;var i=function(){n._gcHoldCounter>0&&(n._gcHoldCounter--,n._gcHoldCounter===0&&n._shouldScheduleGC&&(n.scheduleGC(),n._shouldScheduleGC=!1))};return{dispose:i}},t.toJSON=function(){return"RelayModernStore()"},t.getEpoch=function(){return this._currentWriteEpoch},t.__getUpdatedRecordIDs=function(){return this._updatedRecordIDs},t.lookupInvalidationState=function(n){var i=this,o=new Map;return n.forEach(function(a){var s,l=i.getSource().get(a);o.set(a,(s=wu.getInvalidationEpoch(l))!==null&&s!==void 0?s:null)}),o.set("global",this._globalInvalidationEpoch),{dataIDs:n,invalidations:o}},t.checkInvalidationState=function(n){var i=this.lookupInvalidationState(n.dataIDs),o=i.invalidations,a=n.invalidations;if(o.get("global")!==a.get("global"))return!0;var s=(0,KI.default)(n.dataIDs),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;if(o.get(c)!==a.get(c))return!0}}catch(d){s.e(d)}finally{s.f()}return!1},t.subscribeToInvalidationState=function(n,i){var o=this,a={callback:i,invalidationState:n},s=function(){o._invalidationSubscriptions.delete(a)};return this._invalidationSubscriptions.add(a),{dispose:s}},t._updateInvalidationSubscription=function(n,i){var o=this,a=n.callback,s=n.invalidationState,l=s.dataIDs,c=i||l.some(function(d){return o._invalidatedRecordIDs.has(d)});c&&a()},t.snapshot=function(){this._optimisticSource!=null&&M1(!1);var n=this.__log;n?.({name:"store.snapshot"}),this._storeSubscriptions.snapshotSubscriptions(this.getSource()),this._gcRun&&(this._gcRun=null,this._shouldScheduleGC=!0),this._optimisticSource=WI.create(this.getSource())},t.restore=function(){var n=this._optimisticSource;n||M1(!1);var i=this.__log;i?.({name:"store.restore"});var o=WI.getOptimisticRecordIDs(n);this._resolverCache.unsubscribeFromLiveResolverRecords(o),this._optimisticSource=null,this._shouldScheduleGC&&this.scheduleGC(),this._storeSubscriptions.restoreSubscriptions(),this._resolverCache.invalidateResolverRecords(o)},t.scheduleGC=function(){if(this._gcHoldCounter>0){this._shouldScheduleGC=!0;return}this._gcRun||(this._gcRun=this._collect(),this._gcScheduler(this._gcStep))},t.__gc=function(){if(this._optimisticSource==null)for(var n=this._collect();!n.next().done;);},t._collect=function*(){if(!(this._shouldRetainWithinTTL_EXPERIMENTAL&&this._queryCacheExpirationTime==null)){var n=this.__log;e:for(;;){n?.({name:"store.gc.start"});var i=this._currentWriteEpoch,o=new Set,a=(0,KI.default)(this._roots.entries()),s;try{for(a.s();!(s=a.n()).done;){var l,c,d,f=s.value,h=f[0],p=f[1],m=p.operation,g=p.refCount,v=p.fetchTime;if(this._shouldRetainWithinTTL_EXPERIMENTAL){var b=this._queryCacheExpirationTime;b==null&&M1(!1);var y=v==null||v<=Date.now()-b,S=y&&g===0&&!this._releaseBuffer.includes(h);if(S)continue}var w=m.root,C=(l=(c=m.request.node.operation.use_exec_time_resolvers)!==null&&c!==void 0?c:((d=m.request.node.operation.exec_time_resolvers_enabled_provider)===null||d===void 0?void 0:d.get())===!0)!==null&&l!==void 0?l:!1;if(DUe.mark(this._recordSource,w,o,this._operationLoader,this._shouldProcessClientComponents,C),yield,i!==this._currentWriteEpoch){n?.({name:"store.gc.interrupted"});continue e}}}catch(M){a.e(M)}finally{a.f()}for(var A=this._recordSource.getRecordIDs(),T=0;T<A.length;T++){var R=A[T];if(!o.has(R)){var N=this._recordSource.get(R);if(N!=null){var I=wu.getValue(N,$Ue);I?.()}this._recordSource.remove(R),this._shouldRetainWithinTTL_EXPERIMENTAL&&this._roots.delete(R)}}n?.({name:"store.gc.end",references:o});return}}},t.__getNormalizationOptions=function(n){return{path:n,getDataID:this._getDataID,log:this.__log,treatMissingFieldsAsNull:this._treatMissingFieldsAsNull,shouldProcessClientComponents:this._shouldProcessClientComponents,actorIdentifier:this._actorIdentifier}},t.__notifyUpdatedSubscribers=function(n){var i=TUe(n),o=this._updatedRecordIDs;this._updatedRecordIDs=i,this.notify(),this._updatedRecordIDs=o},e})();function LUe(e){if(!e.has(O1)){var t=wu.create(O1,PUe);e.set(O1,t)}}function zUe(e,t,r,n,i,o){n&&n.forEach(function(h){var p=e.get(h),m=t.get(h);if(m!==null){var g;p!=null?g=wu.clone(p):g=m!=null?wu.clone(m):null,g&&(wu.setValue(g,IUe.INVALIDATED_AT_KEY,r),o.add(h),e.set(h,g))}});for(var a=t.getRecordIDs(),s=0;s<a.length;s++){var l=a[s],c=t.get(l),d=e.get(l);if(c&&d){var f=wu.update(d,c);f!==d&&(i.add(l),e.set(l,f))}else c===null?(e.delete(l),d!==null&&i.add(l)):c&&(e.set(l,c),i.add(l))}}function UUe(e,t,r,n){var i=e.mostRecentlyInvalidatedAt,o=e.status;if(typeof i=="number"&&(t==null||i>t))return{status:"stale"};if(o==="missing")return{status:"missing"};if(r!=null&&n!=null){var a=r<=Date.now()-n;if(a)return{status:"stale"}}return{status:"available",fetchTime:r??null}}var VC=MUe,Ij=wr,BUe=Ij.ROOT_TYPE,JI=Ij.getStorageKey,jUe=hj,qUe=jUe.readUpdatableFragment,VUe=pj,GUe=VUe.readUpdatableQuery,QI=Be,KUe=(function(){function e(r,n,i,o){this.__mutator=r,this.__recordSource=n,this._readSelector=i,this._missingFieldHandlers=o}var t=e.prototype;return t.create=function(n,i){return this.__recordSource.create(n,i)},t.delete=function(n){this.__recordSource.delete(n)},t.get=function(n){return this.__recordSource.get(n)},t.getRoot=function(){return this.__recordSource.getRoot()},t.getOperationRoot=function(){var n=this.__recordSource.get(this._readSelector.dataID);return n||(n=this.__recordSource.create(this._readSelector.dataID,BUe)),n},t._getRootField=function(n,i,o){var a=n.node.selections.find(function(s){return s.kind==="LinkedField"&&s.name===i||s.kind==="RequiredField"&&s.field.name===i});return a&&a.kind==="RequiredField"&&(a=a.field),a&&a.kind==="LinkedField"||QI(!1),a.plural!==o&&QI(!1),a},t.getRootField=function(n){var i=this._getRootField(this._readSelector,n,!1),o=JI(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecord(o)},t.getPluralRootField=function(n){var i=this._getRootField(this._readSelector,n,!0),o=JI(i,this._readSelector.variables);return this.getOperationRoot().getLinkedRecords(o)},t.invalidateStore=function(){this.__recordSource.invalidateStore()},t.readUpdatableQuery=function(n,i){return GUe(n,i,this,this._missingFieldHandlers)},t.readUpdatableFragment=function(n,i){return qUe(n,i,this,this._missingFieldHandlers)},e})(),HUe=KUe,L1,z1,U1=dj,B1=bj,YI=HUe,WUe=Ko,JUe=jC,XI=gc,Tg=Be,j1=typeof g0<"u"?g0:typeof window<"u"?window:void 0,q1=(L1=j1==null||(z1=j1.ErrorUtils)===null||z1===void 0?void 0:z1.applyWithGuard)!==null&&L1!==void 0?L1:function(e,t,r,n,i){return e.apply(t,r)},QUe=(function(){function e(r,n,i,o,a){this._hasStoreSnapshot=!1,this._handlerProvider=n||null,this._pendingBackupRebase=!1,this._pendingData=new Set,this._pendingOptimisticUpdates=new Set,this._store=r,this._appliedOptimisticUpdates=new Set,this._gcHold=null,this._getDataID=i,this._missingFieldHandlers=o,this._log=a}var t=e.prototype;return t.applyUpdate=function(n){!this._appliedOptimisticUpdates.has(n)&&!this._pendingOptimisticUpdates.has(n)||Tg(!1),this._pendingOptimisticUpdates.add(n)},t.revertUpdate=function(n){this._pendingOptimisticUpdates.has(n)?this._pendingOptimisticUpdates.delete(n):this._appliedOptimisticUpdates.has(n)&&(this._pendingBackupRebase=!0,this._appliedOptimisticUpdates.delete(n))},t.revertAll=function(){this._pendingBackupRebase=!0,this._pendingOptimisticUpdates.clear(),this._appliedOptimisticUpdates.clear()},t.commitPayload=function(n,i,o){this._pendingBackupRebase=!0,this._pendingData.add({kind:"payload",operation:n,payload:i,updater:o})},t.commitUpdate=function(n){this._pendingBackupRebase=!0,this._pendingData.add({kind:"updater",updater:n})},t.commitSource=function(n){this._pendingBackupRebase=!0,this._pendingData.add({kind:"source",source:n})},t.run=function(n){var i=this._appliedOptimisticUpdates===0&&!!this._gcHold,o=!this._pendingBackupRebase&&this._pendingOptimisticUpdates.size===0&&!i;if(WUe.DISALLOW_NESTED_UPDATES&&this._isRunning===!0&&Tg(!1),this._isRunning=!0,o)return this._isRunning=!1,[];this._pendingBackupRebase&&this._hasStoreSnapshot&&(this._store.restore(),this._hasStoreSnapshot=!1);var a=this._commitData();return(this._pendingOptimisticUpdates.size||this._pendingBackupRebase&&this._appliedOptimisticUpdates.size)&&(this._hasStoreSnapshot||(this._store.snapshot(),this._hasStoreSnapshot=!0),this._applyUpdates()),this._pendingBackupRebase=!1,this._appliedOptimisticUpdates.size>0?this._gcHold||(this._gcHold=this._store.holdGC()):this._gcHold&&(this._gcHold.dispose(),this._gcHold=null),this._isRunning=!1,this._store.notify(n,a)},t._publishSourceFromPayload=function(n){var i=this,o=n.payload,a=n.operation,s=n.updater,l=o.source,c=o.fieldPayloads,d=new U1(this._store.getSource(),l),f=new B1(d,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log);if(c&&c.length&&c.forEach(function(v){var b=i._handlerProvider&&i._handlerProvider(v.handle);b||Tg(!1),b.update(f,v)}),s){var h=a.fragment;h==null&&Tg(!1);var p=new YI(d,f,h,this._missingFieldHandlers),m=ZI(l,h);s(p,m)}var g=f.getIDsMarkedForInvalidation();return this._store.publish(l,g),f.isStoreMarkedForInvalidation()},t._commitData=function(){var n=this;if(!this._pendingData.size)return!1;var i=!1;return this._pendingData.forEach(function(o){if(o.kind==="payload"){var a=n._publishSourceFromPayload(o);i=i||a}else if(o.kind==="source"){var s=o.source;n._store.publish(s)}else{var l=o.updater,c=XI.create(),d=new U1(n._store.getSource(),c),f=new B1(d,n._getDataID,n._handlerProvider,n._missingFieldHandlers,n._log);q1(l,null,[f],null,"RelayPublishQueue:commitData"),i=i||f.isStoreMarkedForInvalidation();var h=f.getIDsMarkedForInvalidation();n._store.publish(c,h)}}),this._pendingData.clear(),i},t._applyUpdates=function(){var n=this,i=XI.create(),o=new U1(this._store.getSource(),i),a=new B1(o,this._getDataID,this._handlerProvider,this._missingFieldHandlers,this._log),s=function(c){if(c.storeUpdater){var d=c.storeUpdater;q1(d,null,[a],null,"RelayPublishQueue:applyUpdates")}else{var f=c.operation,h=c.payload,p=c.updater,m=h.source,g=h.fieldPayloads;if(m&&a.publishSource(m,g),p){var v;m&&(v=ZI(m,f.fragment));var b=new YI(o,a,f.fragment,n._missingFieldHandlers);q1(p,null,[b,v],null,"RelayPublishQueue:applyUpdates")}}};this._pendingBackupRebase&&this._appliedOptimisticUpdates.size&&this._appliedOptimisticUpdates.forEach(s),this._pendingOptimisticUpdates.size&&(this._pendingOptimisticUpdates.forEach(function(l){s(l),n._appliedOptimisticUpdates.add(l)}),this._pendingOptimisticUpdates.clear()),this._store.publish(i)},e})();function ZI(e,t){var r=JUe.read(e,t).data;return r}var YUe=QUe,XUe=Je.default,eP=XUe(or),ZUe=A4e,Pj=IC,tP=Pj.INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,Ng=Pj.assertInternalActorIdentifier,V1=Xl,rP=V5e,eBe=W5e,tBe=Q5e,rBe=aj,nBe=sze,iBe=F5e,oBe=Tze,aBe=VC,sBe=YUe,nP=gc,Oj=(function(){function e(r){var n=this,i,o,a,s,l,c,d,f,h,p,m;this.configName=r.configName,this._treatMissingFieldsAsNull=r.treatMissingFieldsAsNull===!0;var g=r.operationLoader,v=(i=r.store)!==null&&i!==void 0?i:new aBe(new nP,{log:r.log,operationLoader:r.operationLoader,getDataID:r.getDataID,shouldProcessClientComponents:r.shouldProcessClientComponents});this.__log=(o=r.log)!==null&&o!==void 0?o:uBe,this.relayFieldLogger=(a=r.relayFieldLogger)!==null&&a!==void 0?a:nBe,this._defaultRenderPolicy=(s=r.UNSTABLE_defaultRenderPolicy)!==null&&s!==void 0?s:"partial",this._operationLoader=g,this._operationExecutions=new Map,this._network=rP(this,r.network),this._getDataID=(l=r.getDataID)!==null&&l!==void 0?l:rBe,this._missingFieldHandlers=(c=r.missingFieldHandlers)!==null&&c!==void 0?c:[],this._publishQueue=new sBe(v,(d=r.handlerProvider)!==null&&d!==void 0?d:ZUe,this._getDataID,this._missingFieldHandlers,this.__log),this._scheduler=(f=r.scheduler)!==null&&f!==void 0?f:null,this._store=v,this.options=r.options,this._isServer=(h=r.isServer)!==null&&h!==void 0?h:!1,this._normalizeResponse=(p=r.normalizeResponse)!==null&&p!==void 0?p:iBe,this.__setNet=function(b){return n._network=rP(n,b)},this._operationTracker=(m=r.operationTracker)!==null&&m!==void 0?m:new eBe,this._shouldProcessClientComponents=r.shouldProcessClientComponents,tBe(this)}var t=e.prototype;return t.getStore=function(){return this._store},t.getNetwork=function(){return this._network},t.getOperationTracker=function(){return this._operationTracker},t.getScheduler=function(){return this._scheduler},t.isRequestActive=function(n){var i=this._operationExecutions.get(n);return i==="active"},t.UNSTABLE_getDefaultRenderPolicy=function(){return this._defaultRenderPolicy},t.applyUpdate=function(n){var i=this,o=function(){i._scheduleUpdates(function(){i._publishQueue.revertUpdate(n),i._publishQueue.run()})};return this._scheduleUpdates(function(){i._publishQueue.applyUpdate(n),i._publishQueue.run()}),{dispose:o}},t.revertUpdate=function(n){var i=this;this._scheduleUpdates(function(){i._publishQueue.revertUpdate(n),i._publishQueue.run()})},t.replaceUpdate=function(n,i){var o=this;this._scheduleUpdates(function(){o._publishQueue.revertUpdate(n),o._publishQueue.applyUpdate(i),o._publishQueue.run()})},t.applyMutation=function(n){var i=this._execute({createSource:function(){return V1.create(function(a){})},isClientPayload:!1,operation:n.operation,optimisticConfig:n,updater:null}).subscribe({});return{dispose:function(){return i.unsubscribe()}}},t.check=function(n){return this._missingFieldHandlers.length===0&&!lBe(n)?this._store.check(n):this._checkSelectorAndHandleMissingFields(n,this._missingFieldHandlers)},t.commitPayload=function(n,i){this._execute({createSource:function(){return V1.from({data:i})},isClientPayload:!0,operation:n,optimisticConfig:null,updater:null}).subscribe({})},t.commitUpdate=function(n){var i=this;this._scheduleUpdates(function(){i._publishQueue.commitUpdate(n),i._publishQueue.run()})},t.lookup=function(n){return this._store.lookup(n)},t.subscribe=function(n,i){return this._store.subscribe(n,i)},t.retain=function(n){return this._store.retain(n)},t.isServer=function(){return this._isServer},t._checkSelectorAndHandleMissingFields=function(n,i){var o=this,a=nP.create(),s=this._store.getSource(),l=this._store.check(n,{handlers:i,defaultActorIdentifier:tP,getSourceForActor:function(d){return Ng(d),s},getTargetForActor:function(d){return Ng(d),a}});return a.size()>0&&this._scheduleUpdates(function(){o._publishQueue.commitSource(a),o._publishQueue.run()}),l},t._scheduleUpdates=function(n){var i=this._scheduler;i!=null?i.schedule(n):n()},t.execute=function(n){var i=this,o=n.operation;return this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,o.request.cacheConfig||{},null,void 0,void 0,void 0,function(){return i.check(o)})},isClientPayload:!1,operation:o,optimisticConfig:null,updater:null})},t.executeSubscription=function(n){var i=this,o=n.operation,a=n.updater;return this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,o.request.cacheConfig||{},null)},isClientPayload:!1,operation:o,optimisticConfig:null,updater:a})},t.executeMutation=function(n){var i=this,o=n.operation,a=n.optimisticResponse,s=n.optimisticUpdater,l=n.updater,c=n.uploadables,d;return(a||s)&&(d={operation:o,response:a,updater:s}),this._execute({createSource:function(){return i.getNetwork().execute(o.request.node.params,o.request.variables,(0,eP.default)((0,eP.default)({},o.request.cacheConfig),{},{force:!0}),c)},isClientPayload:!1,operation:o,optimisticConfig:d,updater:l})},t.executeWithSource=function(n){var i=n.operation,o=n.source;return this._execute({createSource:function(){return o},isClientPayload:!1,operation:i,optimisticConfig:null,updater:null})},t.toJSON=function(){var n;return"RelayModernEnvironment(".concat((n=this.configName)!==null&&n!==void 0?n:"",")")},t._execute=function(n){var i=this,o=n.createSource,a=n.isClientPayload,s=n.operation,l=n.optimisticConfig,c=n.updater,d=this._publishQueue,f=this._store;return V1.create(function(h){var p=oBe.execute({actorIdentifier:tP,getDataID:i._getDataID,isClientPayload:a,log:i.__log,operation:s,operationExecutions:i._operationExecutions,operationLoader:i._operationLoader,operationTracker:i._operationTracker,optimisticConfig:l,getPublishQueue:function(g){return Ng(g),d},scheduler:i._scheduler,shouldProcessClientComponents:i._shouldProcessClientComponents,sink:h,source:o(),getStore:function(g){return Ng(g),f},treatMissingFieldsAsNull:i._treatMissingFieldsAsNull,updater:c,normalizeResponse:i._normalizeResponse});return function(){return p.cancel()}})},e})();function lBe(e){return e.root.node.kind==="Operation"&&e.root.node.clientAbstractTypes!=null}Oj.prototype["@@RelayModernEnvironment"]=!0;function uBe(){}var cBe=Oj,dBe=Qb,fBe=Ea,hBe=fBe.getRequest,pBe=Zl,mBe=pBe.createOperationDescriptor,gBe=ka,vBe=gBe.createReaderSelector;function bBe(e,t){var r=hBe(t.subscription);if(r.params.operationKind!=="subscription")throw new Error("requestSubscription: Must use Subscription operation");var n=t.configs,i=t.onCompleted,o=t.onError,a=t.onNext,s=t.variables,l=t.cacheConfig,c=mBe(r,s,l),d=n?dBe.convert(n,r,null,t.updater):t,f=d.updater,h=e.executeSubscription({operation:c,updater:f}).subscribe({next:function(m){if(a!=null){var g=c.fragment,v;if(Array.isArray(m)){var b,y;v=(b=m[0])===null||b===void 0||(y=b.extensions)===null||y===void 0?void 0:y.__relay_subscription_root_id}else{var S;v=(S=m.extensions)===null||S===void 0?void 0:S.__relay_subscription_root_id}typeof v=="string"&&(g=vBe(g.node,v,g.variables,g.owner));var w=e.lookup(g).data;a(w)}},error:o,complete:i});return{dispose:h.unsubscribe}}var _Be=bBe,yBe=Je.default;yBe(or);var Mj=wr;Mj.getModuleComponentKey;Mj.getModuleOperationKey;var xBe=Object.prototype.hasOwnProperty;function SBe(e){for(var t in e)if(xBe.call(e,t))return!1;return!0}var wBe=SBe,GC=ka,EBe=GC.getDataIDsFromFragment,kBe=GC.getSelector,CBe=GC.getVariablesFromFragment,RBe=wBe,th=Ko,ABe=hc,iP=ABe.stableCopy,$Be=TB,oP=$Be.intern;function TBe(e,t){var r=kBe(e,t),n=r==null?"null":r.kind==="SingularReaderSelector"?r.owner.identifier:"["+r.selectors.map(function(c){return c.owner.identifier}).join(",")+"]",i=CBe(e,t),o=EBe(e,t);if(th.ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION){var a=typeof o>"u"?"missing":o==null?"null":Array.isArray(o)?"["+o.join(",")+"]":o;return a=th.STRING_INTERN_LEVEL<=1?a:oP(a,th.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+(i==null||RBe(i)?"{}":JSON.stringify(iP(i)))+"/"+a}else{var s,l=(s=JSON.stringify(o))!==null&&s!==void 0?s:"missing";return l=th.STRING_INTERN_LEVEL<=1?l:oP(l,th.MAX_DATA_ID_LENGTH),n+"/"+e.name+"/"+JSON.stringify(iP(i))+"/"+l}}var NBe=TBe,rh=Be;function DBe(e,t){var r,n;((r=e.metadata)===null||r===void 0?void 0:r.plural)===!0&&rh(!1);var i=(n=e.metadata)===null||n===void 0?void 0:n.refetch;i==null&&rh(!1);var o=i.operation.default?i.operation.default:i.operation,a=i.fragmentPathInResult;typeof o=="string"&&rh(!1);var s=i.identifierInfo;return s!=null&&(s.identifierField==null||typeof s.identifierField=="string"||rh(!1),s.identifierQueryVariableName==null||typeof s.identifierQueryVariableName=="string"||rh(!1)),{fragmentRefPathInResponse:a,identifierInfo:s,refetchableRequest:o,refetchMetadata:i}}var Lj=DBe,FBe=Lj,G1=Be;function IBe(e,t){var r,n,i=FBe(e),o=i.refetchableRequest,a=i.refetchMetadata,s=a.connection;s==null&&G1(!1);var l=s.path,c=((r=(n=e.metadata)===null||n===void 0?void 0:n.connection)!==null&&r!==void 0?r:[])[0];c==null&&G1(!1);var d=a.identifierInfo;return d?.identifierField==null||typeof d.identifierField=="string"||G1(!1),{connectionPathInFragmentData:l,identifierField:d?.identifierField,paginationRequest:o,paginationMetadata:s,stream:c.stream===!0}}var PBe=IBe,zj=Je.default,Dg=zj(wi),Uc=zj(or),aP=Be;function OBe(e,t,r,n,i,o){var a,s=o.backward,l=o.forward;if(e==="backward"){var c;s!=null&&s.count!=null&&s.cursor!=null||aP(!1);var d=(0,Uc.default)((0,Uc.default)((0,Uc.default)({},n),i),{},(c={},(0,Dg.default)(c,s.cursor,r),(0,Dg.default)(c,s.count,t),c));return l&&l.cursor&&(d[l.cursor]=null),l&&l.count&&(d[l.count]=null),d}l!=null&&l.count!=null&&l.cursor!=null||aP(!1);var f=(0,Uc.default)((0,Uc.default)((0,Uc.default)({},n),i),{},(a={},(0,Dg.default)(a,l.cursor,r),(0,Dg.default)(a,l.count,t),a));return s&&s.cursor&&(f[s.cursor]=null),s&&s.count&&(f[s.count]=null),f}var MBe=OBe,LBe=Je.default,zBe=LBe(qr),sP=Be;function UBe(e,t){var r=e,n=(0,zBe.default)(t),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(r==null)return null;typeof o=="number"?(Array.isArray(r)||sP(!1),r=r[o]):(typeof r=="object"&&!Array.isArray(r)||sP(!1),r=r[o])}}catch(a){n.e(a)}finally{n.f()}return r}var BBe=UBe,Uj=G6e;Uj.isErrorResult;Uj.isValueResult;var jBe=Jb,qBe=EC,VBe=K4e,GBe=W4e,KBe=sLe,lP=Qb,HBe=gLe,WBe=Xl,JBe=NLe,QBe=MLe,Fg=Wb,Aa=Ea,YBe=ULe,KC=rs;KC.generateClientID;KC.generateUniqueClientID;KC.isClientID;var XBe=s8e,ZBe=c8e,eje=h8e,tje=kC,Bj=Xb;Bj.isSuspenseSentinel;Bj.suspenseSentinel;var rje=z5e,uP=Yl,nje=cBe,cP=Zl,Ji=ka,ije=VC,oje=gc,po=wr,aje=yC,dP=OC,sje=_Be,lje=kB,uje=NBe,cje=PBe,dje=MBe,fje=MB,hje=Lj,pje=CB,mje=BBe,gje=gm,vje=gje.handlePotentialSnapshotErrors,bje=vB,_je=LB,yje=Yb,xje=XU,Sje=Ko,wje=_B,jj=hc;jj.hasCycle;jj.stableCopy;var Eje={Environment:nje,Network:HBe,Observable:WBe,RecordSource:oje,ReplaySubject:wje,Store:ije,areEqualSelectors:Ji.areEqualSelectors,createFragmentSpecResolver:XBe,createNormalizationSelector:Ji.createNormalizationSelector,createOperationDescriptor:cP.createOperationDescriptor,createReaderSelector:Ji.createReaderSelector,createRequestDescriptor:cP.createRequestDescriptor,getArgumentValues:po.getArgumentValues,getDataIDsFromFragment:Ji.getDataIDsFromFragment,getDataIDsFromObject:Ji.getDataIDsFromObject,getNode:Aa.getNode,getFragment:Aa.getFragment,getInlineDataFragment:Aa.getInlineDataFragment,getModuleComponentKey:po.getModuleComponentKey,getModuleOperationKey:po.getModuleOperationKey,getPaginationFragment:Aa.getPaginationFragment,getPluralSelector:Ji.getPluralSelector,getRefetchableFragment:Aa.getRefetchableFragment,getRequest:Aa.getRequest,getRequestIdentifier:pje,getSelector:Ji.getSelector,getSelectorsFromObject:Ji.getSelectorsFromObject,getSingularSelector:Ji.getSingularSelector,getStorageKey:po.getStorageKey,getVariablesFromFragment:Ji.getVariablesFromFragment,getVariablesFromObject:Ji.getVariablesFromObject,getVariablesFromPluralFragment:Ji.getVariablesFromPluralFragment,getVariablesFromSingularFragment:Ji.getVariablesFromSingularFragment,handlePotentialSnapshotErrors:vje,graphql:Aa.graphql,isFragment:Aa.isFragment,isInlineDataFragment:Aa.isInlineDataFragment,isRequest:Aa.isRequest,readInlineData:rje,readFragment:aje.readFragment,MutationTypes:lP.MutationTypes,RangeOperations:lP.RangeOperations,ConnectionHandler:jBe,VIEWER_ID:dP.VIEWER_ID,VIEWER_TYPE:dP.VIEWER_TYPE,applyOptimisticMutation:VBe,commitLocalUpdate:GBe,commitMutation:KBe,fetchQuery:JBe,fetchQuery_DEPRECATED:QBe,isRelayModernEnvironment:tje,requestSubscription:sje,ConnectionInterface:qBe,PreloadableQueryRegistry:YBe,RelayFeatureFlags:Sje,DEFAULT_HANDLE_KEY:xje.DEFAULT_HANDLE_KEY,FRAGMENTS_KEY:po.FRAGMENTS_KEY,FRAGMENT_OWNER_KEY:po.FRAGMENT_OWNER_KEY,ID_KEY:po.ID_KEY,REF_KEY:po.REF_KEY,REFS_KEY:po.REFS_KEY,ROOT_ID:po.ROOT_ID,ROOT_TYPE:po.ROOT_TYPE,TYPENAME_KEY:po.TYPENAME_KEY,deepFreeze:lje,isPromise:bje,isScalarAndEqual:_je,recycleNodesInto:yje,getFragmentIdentifier:uje,getRefetchMetadata:hje,getPaginationMetadata:cje,getPaginationVariables:dje,getPendingOperationsForFragment:fje,getValueAtPath:mje,__internal:{createRelayContext:ZBe,createRelayLoggingContext:eje,getOperationVariables:uP.getOperationVariables,getLocalVariables:uP.getLocalVariables,fetchQuery:Fg.fetchQuery,fetchQueryDeduped:Fg.fetchQueryDeduped,getPromiseForActiveRequest:Fg.getPromiseForActiveRequest,getObservableForActiveRequest:Fg.getObservableForActiveRequest}},St=Eje,kje=VC,qj=kje;const Vj=iV(qj),Cje=oV({__proto__:null,default:Vj},[qj]);let fP={kind:"linked",handle:(e,t,r,n)=>{let i=e.name,o=r.id;if(!(t==null||i!=="node"||t.getType()!==St.ROOT_TYPE))return o}};function Rje(e,t,r){return new St.Store(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function Aje(e,t,r){return new Vj(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}function $je(e,t,r){return new Cje(e,{gcReleaseBufferSize:t,queryCacheExpirationTime:r})}let Tje={make:Rje,makeLiveStore:Aje,_makeLiveStoreCjs:$je};function Nje(e,t,r,n,i,o,a){return new St.Environment({network:e,store:t,getDataID:r,treatMissingFieldsAsNull:n,missingFieldHandlers:i!==void 0?i.concat([fP]):[fP],relayFieldLogger:o,isServer:a})}function Gj(e,t,r){let n=[],i=e.getStore().getSource()._records.get(r);return i!==void 0&&Object.entries(i).forEach(o=>{if(o[0].startsWith("__"+t+"_connection")){n.push(o[1].__ref);return}}),n}function Dje(e,t,r,n){let i=n!==void 0?n:[];St.commitLocalUpdate(e,o=>{Gj(e,t,r).forEach(a=>{if(!i.includes(a))return ee(Li(o.get(a)),s=>{s.invalidateRecord()})})})}let Fje={make:Nje,findAllConnectionIds:Gj,invalidateAllOfConnection:Dje};var Ije=$t,Pje=St,Oje=Pje.__internal.createRelayContext,wf=Oje(Ije),Kj={exports:{}};(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var o in i)({}).hasOwnProperty.call(i,o)&&(r[o]=i[o])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Kj);var s_=Kj.exports,Hj={exports:{}};(function(e){function t(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Hj);var l_=Hj.exports,Wj={exports:{}},Jj={exports:{}};(function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Jj);var Mje=Jj.exports;(function(e){var t=Mje;function r(n,i){n.prototype=Object.create(i.prototype),n.prototype.constructor=n,t(n,i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Wj);var u_=Wj.exports,hP=Be;function Lje(e,t){t&&typeof t=="object"||hP(!1);for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];n&&(typeof n=="object"||typeof n=="function")||hP(!1)}}var zje=Lje;function Qj(e){return e.displayName||e.name||"Component"}function Uje(e){return"Relay("+Qj(e)+")"}var c_={getComponentName:Qj,getContainerName:Uje},Bje=$t,Yj=Bje.createContext({rootIsQueryRenderer:!1}),jje=Je.default,qje=jje(s_),Vje=zje,Xj=c_,Gje=Xj.getComponentName,Kje=Xj.getContainerName,Hje=wf,Wje=Yj,Jje=Be,pw=$t,Qje=St,Yje=Qje.getFragment,pP=pw.useContext;function Xje(e,t,r){var n=Kje(e);Vje(Gje(e),t);var i={};for(var o in t)i[o]=Yje(t[o]);var a=r(e,i);a.displayName=n;function s(c,d){var f,h=pP(Hje);h==null&&Jje(!1);var p=pP(Wje);return pw.createElement(a,(0,qje.default)({},c,{__relayContext:h,__rootIsQueryRenderer:(f=p?.rootIsQueryRenderer)!==null&&f!==void 0?f:!1,componentRef:c.componentRef||d}))}s.displayName=n;var l=pw.forwardRef(s);return l}var HC=Xje;function Zje(e){return typeof e=="object"&&e!==null&&typeof e.check=="function"&&typeof e.lookup=="function"&&typeof e.retain=="function"&&typeof e.execute=="function"&&typeof e.subscribe=="function"}var eqe=Zje,tqe=eqe,rqe=Be;function nqe(e){return iqe(e)||rqe(!1),e}function iqe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&tqe(e.environment)}var WC={assertRelayContext:nqe},bm=Je.default,oqe=bm(s_),aqe=bm(Sf),sqe=bm(l_),lqe=bm(u_),mP=bm(wi),uqe=["componentRef","__relayContext","__rootIsQueryRenderer"],cqe=HC,dqe=c_,fqe=dqe.getContainerName,hqe=WC,gP=hqe.assertRelayContext,pqe=Qs,vP=$t,JC=St,bP=JC.createFragmentSpecResolver,_P=JC.getDataIDsFromObject,mqe=JC.isScalarAndEqual;function gqe(e,t){var r,n=fqe(e);return r=(function(i){(0,lqe.default)(o,i);function o(s){var l,c;c=i.call(this,s)||this,(0,mP.default)((0,sqe.default)(c),"_handleFragmentDataUpdate",function(){var p=c.state.resolver;c.setState(function(m){return p===m.resolver?{data:m.resolver.resolve(),relayProp:Ig(m.relayProp.environment)}:null})});var d=gP(s.__relayContext),f=(l=s.__rootIsQueryRenderer)!==null&&l!==void 0?l:!1,h=bP(d,n,t,s,f);return c.state={data:h.resolve(),prevProps:s,prevPropsContext:d,relayProp:Ig(d.environment),resolver:h},c}o.getDerivedStateFromProps=function(l,c){var d,f=c.prevProps,h=gP(l.__relayContext),p=(d=l.__rootIsQueryRenderer)!==null&&d!==void 0?d:!1,m=_P(t,f),g=_P(t,l),v=c.resolver;if(c.prevPropsContext.environment!==h.environment||!pqe(m,g))return v=bP(h,n,t,l,p),{data:v.resolve(),prevPropsContext:h,prevProps:l,relayProp:Ig(h.environment),resolver:v};v.setProps(l);var b=v.resolve();return b!==c.data?{data:b,prevProps:l,prevPropsContext:h,relayProp:Ig(h.environment)}:null};var a=o.prototype;return a.componentDidMount=function(){this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},a.componentDidUpdate=function(l,c){this.state.resolver!==c.resolver?(c.resolver.dispose(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},a.componentWillUnmount=function(){this.state.resolver.dispose()},a.shouldComponentUpdate=function(l,c){if(c.data!==this.state.data)return!0;for(var d=Object.keys(l),f=0;f<d.length;f++){var h=d[f];if(h==="__relayContext"){if(c.prevPropsContext.environment!==this.state.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(h)&&!mqe(l[h],this.props[h]))return!0}return!1},a._rerenderIfStoreHasChanged=function(){var l=this.state,c=l.data,d=l.resolver,f=d.resolve();c!==f&&this.setState({data:f})},a._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var l=this.state,c=l.data,d=l.resolver,f=d.resolve();d.setCallback(this.props,this._handleFragmentDataUpdate),c!==f&&this.setState({data:f})},a.render=function(){var l=this.props,c=l.componentRef;l.__relayContext,l.__rootIsQueryRenderer;var d=(0,aqe.default)(l,uqe);return vP.createElement(e,(0,oqe.default)({},d,this.state.data,{ref:c,relay:this.state.relayProp}))},o})(vP.Component),(0,mP.default)(r,"displayName",n),r}function Ig(e){return{environment:e}}function vqe(e,t){return cqe(e,t,gqe)}var bqe={createContainer:vqe},d_=$t,QC=St;QC.createOperationDescriptor;QC.deepFreeze;QC.getRequest;d_.useLayoutEffect;d_.useState;d_.useRef;d_.useMemo;var _qe=Je.default,yP=_qe(or),yqe=St,xqe=yqe.getSelector;function Sqe(e,t){var r={};return Object.keys(e).forEach(function(n){var i,o,a,s=e[n],l=t[n],c=xqe(s,l),d=c!=null&&c.kind==="PluralReaderSelector"?(i=(o=c.selectors[0])===null||o===void 0?void 0:o.owner.variables)!==null&&i!==void 0?i:{}:(a=c?.owner.variables)!==null&&a!==void 0?a:{};r=(0,yP.default)((0,yP.default)({},r),d)}),r}var Zj=Sqe,wqe=Je.default,xP=wqe(wi),K1=Be,YC=St,Eqe=YC.__internal.fetchQuery,kqe=YC.createOperationDescriptor,Cqe=YC.isRelayModernEnvironment,Rqe=(function(){function e(r){(0,xP.default)(this,"_selectionReferences",[]),(0,xP.default)(this,"_didFetchFinish",!1),r!=null&&(this._cacheSelectionReference=r.cacheSelectionReference,this._selectionReferences=r.selectionReferences)}var t=e.prototype;return t.getSelectionReferences=function(){return{cacheSelectionReference:this._cacheSelectionReference,selectionReferences:this._selectionReferences}},t.lookupInStore=function(n,i,o){return(o==="store-and-network"||o==="store-or-network")&&n.check(i).status==="available"?(this._retainCachedOperation(n,i),n.lookup(i.fragment)):null},t.getFetchResult=function(){if(this._didFetchFinish){if(this._error!=null)return{error:this._error};if(this._snapshot!=null)return{snapshot:this._snapshot}}else return null},t.execute=function(n){var i=this,o=n.environment,a=n.operation,s=n.preservePreviousReferences,l=s===void 0?!1:s,c=o.retain(a),d=function(){i._selectionReferences=i._selectionReferences.concat(c)},f=function(){l||i.disposeSelectionReferences(),i._selectionReferences=i._selectionReferences.concat(c)},h=function(){i._selectionReferences=i._selectionReferences.concat(c)};return Cqe(o)?Eqe(o,a).do({error:d,complete:f,unsubscribe:h}):o.execute({operation:a}).do({error:d,complete:f,unsubscribe:h})},t.setOnDataChange=function(n){this._fetchOptions||K1(!1),typeof n=="function"&&(this._fetchOptions.onDataChangeCallbacks=this._fetchOptions.onDataChangeCallbacks||[],this._fetchOptions.onDataChangeCallbacks.push(n),this._didFetchFinish&&(this._error!=null?n({error:this._error}):this._snapshot!=null&&n({snapshot:this._snapshot})))},t.fetch=function(n,i){var o=this,a=n.environment,s=n.operation,l=n.onDataChange,c=!1,d;this.disposeRequest();var f=this._fetchOptions&&this._fetchOptions.onDataChangeCallbacks;this._fetchOptions={environment:a,onDataChangeCallbacks:f||[],operation:s},l&&this._fetchOptions.onDataChangeCallbacks.indexOf(l)===-1&&this._fetchOptions.onDataChangeCallbacks.push(l);var h=i?kqe(s.request.node,s.request.variables,i):s,p=this.execute({environment:a,operation:h}).finally(function(){o._pendingRequest=null}).subscribe({next:function(){o._didFetchFinish=!0,o._error=null,o._onQueryDataAvailable({notifyFirstResult:c})},error:function(g){o._didFetchFinish=!0,o._error=g,o._snapshot=null;var v=o._fetchOptions&&o._fetchOptions.onDataChangeCallbacks;c?v&&v.forEach(function(b){b({error:g})}):d=g}});if(this._pendingRequest={dispose:function(){p.unsubscribe()}},c=!0,d)throw d;return this._snapshot},t.retry=function(n){return this._fetchOptions||K1(!1),this.fetch({environment:this._fetchOptions.environment,operation:this._fetchOptions.operation,onDataChange:null},n)},t.dispose=function(){this.disposeRequest(),this.disposeSelectionReferences()},t.disposeRequest=function(){this._error=null,this._snapshot=null,this._pendingRequest&&this._pendingRequest.dispose(),this._rootSubscription&&(this._rootSubscription.dispose(),this._rootSubscription=null)},t._retainCachedOperation=function(n,i){this._disposeCacheSelectionReference(),this._cacheSelectionReference=n.retain(i)},t._disposeCacheSelectionReference=function(){this._cacheSelectionReference&&this._cacheSelectionReference.dispose(),this._cacheSelectionReference=null},t.disposeSelectionReferences=function(){this._disposeCacheSelectionReference(),this._selectionReferences.forEach(function(n){return n.dispose()}),this._selectionReferences=[]},t._onQueryDataAvailable=function(n){var i=this,o=n.notifyFirstResult;this._fetchOptions||K1(!1);var a=this._fetchOptions,s=a.environment,l=a.onDataChangeCallbacks,c=a.operation;if(!this._snapshot&&(this._snapshot=s.lookup(c.fragment),this._rootSubscription=s.subscribe(this._snapshot,function(f){if(i._fetchOptions!=null){var h=i._fetchOptions.onDataChangeCallbacks;Array.isArray(h)&&h.forEach(function(p){return p({snapshot:f})})}}),this._snapshot&&o&&Array.isArray(l))){var d=this._snapshot;l.forEach(function(f){return f({snapshot:d})})}},e})(),XC=Rqe,Ef=Je.default,Aqe=Ef(s_),H1=Ef(Sf),nh=Ef(l_),$qe=Ef(u_),du=Ef(wi),ci=Ef(or),Tqe=["componentRef"],Nqe=["componentRef","__relayContext","__rootIsQueryRenderer"],Dqe=["componentRef","__relayContext","__rootIsQueryRenderer"],Fqe=HC,W1=Zj,eq=c_,Iqe=eq.getComponentName,Pqe=eq.getContainerName,Oqe=wf,Mqe=XC,Lqe=WC,J1=Lqe.assertRelayContext,Q1=Qs,Oa=Be,Y1=$t,Xs=St,SP=Xs.ConnectionInterface,wP=Xs.Observable,Pg=Xs.RelayFeatureFlags,Og=Xs.createFragmentSpecResolver,zqe=Xs.createOperationDescriptor,EP=Xs.getDataIDsFromObject,Uqe=Xs.getRequest,Bqe=Xs.getVariablesFromObject,jqe=Xs.isScalarAndEqual,kP="forward";function qqe(e){var t=e.path;return t||Oa(!1),function(r){for(var n=r[e.fragmentName],i=0;i<t.length;i++){if(!n||typeof n!="object")return null;n=n[t[i]]}return n}}function Vqe(e){var t=e.count;return t||Oa(!1),function(r,n){return(0,ci.default)((0,ci.default)({},r),{},(0,du.default)({},t,n))}}function Gqe(e){var t=null,r=!1;for(var n in e){var i=e[n],o=i.metadata&&i.metadata.connection;i.metadata!==void 0&&(r=!0),o&&(o.length!==1&&Oa(!1),t&&Oa(!1),t=(0,ci.default)((0,ci.default)({},o[0]),{},{fragmentName:n}))}return!r||t!==null||Oa(!1),t||{}}function CP(e){return typeof e=="function"?{error:e,complete:e,unsubscribe:function(r){typeof e=="function"&&e()}}:e||{}}function Kqe(e,t,r){var n;Iqe(e);var i=Pqe(e),o=Gqe(t),a=r.getConnectionFromProps||qqe(o),s=r.direction||o.direction;s||Oa(!1);var l=r.getFragmentVariables||Vqe(o);return n=(function(c){(0,$qe.default)(d,c);function d(h){var p,m;m=c.call(this,h)||this,(0,du.default)((0,nh.default)(m),"_handleFragmentDataUpdate",function(){m.setState({data:m._resolver.resolve()})}),(0,du.default)((0,nh.default)(m),"_hasMore",function(){var b=m._getConnectionData();return!!(b&&b.hasMore&&b.cursor)}),(0,du.default)((0,nh.default)(m),"_isLoading",function(){return!!m._refetchSubscription}),(0,du.default)((0,nh.default)(m),"_refetchConnection",function(b,y,S){if(!m._canFetchPage("refetchConnection"))return{dispose:function(){}};m._refetchVariables=S;var w={count:b,cursor:null,totalCount:b},C=m._fetchPage(w,CP(y),{force:!0});return{dispose:C.unsubscribe}}),(0,du.default)((0,nh.default)(m),"_loadMore",function(b,y,S){if(!m._canFetchPage("loadMore"))return{dispose:function(){}};var w=CP(y),C=m._getConnectionData();if(!C)return wP.create(function(M){return M.complete()}).subscribe(w),null;var A=C.edgeCount+b;if(S&&S.force)return m._refetchConnection(A,y);var T=SP.get();T.END_CURSOR,T.START_CURSOR;var R=C.cursor,N={count:b,cursor:R,totalCount:A},I=m._fetchPage(N,w,S);return{dispose:I.unsubscribe}});var g=J1(h.__relayContext),v=(p=h.__rootIsQueryRenderer)!==null&&p!==void 0?p:!1;return m._isARequestInFlight=!1,m._refetchSubscription=null,m._refetchVariables=null,Pg.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?m._resolver=Og(g,i,t,h,v):m._resolver=Og(g,i,t,h,v,m._handleFragmentDataUpdate),m.state={data:m._resolver.resolve(),prevContext:g,contextForChildren:g,relayProp:m._buildRelayProp(g),resolverGeneration:0},m._isUnmounted=!1,m._hasFetched=!1,m}var f=d.prototype;return f.componentDidMount=function(){this._isUnmounted=!1,Pg.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},f.componentDidUpdate=function(p,m){Pg.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0&&(m.resolverGeneration!==this.state.resolverGeneration?this._subscribeToNewResolverAndRerenderIfStoreHasChanged():this._rerenderIfStoreHasChanged())},f.UNSAFE_componentWillReceiveProps=function(p){var m=this,g,v=J1(p.__relayContext),b=(g=p.__rootIsQueryRenderer)!==null&&g!==void 0?g:!1,y=EP(t,this.props),S=EP(t,p),w=W1(t,this.props),C=W1(t,p);v.environment!==this.state.prevContext.environment||!Q1(w,C)||!Q1(y,S)?(this._cleanup(),Pg.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT===!0?this._resolver=Og(v,i,t,p,b):this._resolver=Og(v,i,t,p,b,this._handleFragmentDataUpdate),this.setState(function(T){return{prevContext:v,contextForChildren:v,relayProp:m._buildRelayProp(v),resolverGeneration:T.resolverGeneration+1}})):this._hasFetched||this._resolver.setProps(p);var A=this._resolver.resolve();A!==this.state.data&&this.setState({data:A})},f.componentWillUnmount=function(){this._isUnmounted=!0,this._cleanup()},f.shouldComponentUpdate=function(p,m){if(m.data!==this.state.data||m.relayProp!==this.state.relayProp||m.resolverGeneration!==this.state.resolverGeneration)return!0;for(var g=Object.keys(p),v=0;v<g.length;v++){var b=g[v];if(b==="__relayContext"){if(m.prevContext.environment!==this.state.prevContext.environment)return!0}else if(!t.hasOwnProperty(b)&&!jqe(p[b],this.props[b]))return!0}return!1},f._buildRelayProp=function(p){return{hasMore:this._hasMore,isLoading:this._isLoading,loadMore:this._loadMore,refetchConnection:this._refetchConnection,environment:p.environment}},f._rerenderIfStoreHasChanged=function(){var p=this.state.data,m=this._resolver.resolve();p!==m&&this.setState({data:m})},f._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var p=this.state.data,m=this._resolver.resolve();this._resolver.setCallback(this.props,this._handleFragmentDataUpdate),p!==m&&this.setState({data:m})},f._getConnectionData=function(){var p=this.props;p.componentRef;var m=(0,H1.default)(p,Tqe),g=(0,ci.default)((0,ci.default)({},m),this.state.data),v=a(g);if(v==null)return null;var b=SP.get(),y=b.EDGES,S=b.PAGE_INFO,w=b.HAS_NEXT_PAGE,C=b.HAS_PREV_PAGE,A=b.END_CURSOR,T=b.START_CURSOR;typeof v!="object"&&Oa(!1);var R=v[y],N=v[S];if(R==null||N==null)return null;Array.isArray(R)||Oa(!1),typeof N!="object"&&Oa(!1);var I=s===kP?N[w]:N[C],M=s===kP?N[A]:N[T];return typeof I!="boolean"||R.length!==0&&typeof M>"u"?null:{cursor:M,edgeCount:R.length,hasMore:I}},f._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new Mqe),this._queryFetcher},f._canFetchPage=function(p){return!this._isUnmounted},f._fetchPage=function(p,m,g){var v=this,b=J1(this.props.__relayContext),y=b.environment,S=this.props;S.componentRef,S.__relayContext,S.__rootIsQueryRenderer;var w=(0,H1.default)(S,Nqe),C=(0,ci.default)((0,ci.default)({},w),this.state.data),A,T=W1(t,w);A=Bqe(t,w),A=(0,ci.default)((0,ci.default)((0,ci.default)({},T),A),this._refetchVariables);var R=r.getVariables(C,{count:p.count,cursor:p.cursor},A);typeof R=="object"&&R!==null||Oa(!1),R=(0,ci.default)((0,ci.default)({},R),this._refetchVariables),A=(0,ci.default)((0,ci.default)({},R),A);var N=g?{force:!!g.force}:void 0;N!=null&&g?.metadata!=null&&(N.metadata=g?.metadata);var I=Uqe(r.query),M=zqe(I,R,N),P=null;this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._hasFetched=!0;var B=function(te,J){var re=v._resolver.resolve();v._resolver.setVariables(l(A,p.totalCount),M.request.node);var se=v._resolver.resolve();Q1(re,se)?J():v.setState({data:se,contextForChildren:{environment:v.props.__relayContext.environment}},J)},j=function(){v._refetchSubscription===P&&(v._refetchSubscription=null,v._isARequestInFlight=!1)};return this._isARequestInFlight=!0,P=this._getQueryFetcher().execute({environment:y,operation:M,preservePreviousReferences:!0}).mergeMap(function(W){return wP.create(function(te){B(W,function(){te.next(),te.complete()})})}).do({error:j,complete:j,unsubscribe:j}).subscribe(m||{}),this._refetchSubscription=this._isARequestInFlight?P:null,P},f._cleanup=function(){this._resolver.dispose(),this._refetchVariables=null,this._hasFetched=!1,this._refetchSubscription&&(this._refetchSubscription.unsubscribe(),this._refetchSubscription=null,this._isARequestInFlight=!1),this._queryFetcher&&this._queryFetcher.dispose()},f.render=function(){var p=this.props,m=p.componentRef;p.__relayContext,p.__rootIsQueryRenderer;var g=(0,H1.default)(p,Dqe);return Y1.createElement(Oqe.Provider,{value:this.state.contextForChildren},Y1.createElement(e,(0,Aqe.default)({},g,this.state.data,{ref:m,relay:this.state.relayProp})))},d})(Y1.Component),(0,du.default)(n,"displayName",i),n}function Hqe(e,t,r){return Fqe(e,t,function(n,i){return Kqe(n,i,r)})}var Wqe={createContainer:Hqe},f_=Je.default,tq=f_(or),Jqe=f_(l_),Qqe=f_(u_),Yqe=f_(wi),Xqe=wf,Rv=XC,Zqe=Yj,eVe=Qs,X1=$t,ZC=St,tVe=ZC.createOperationDescriptor;ZC.deepFreeze;var eR=ZC.getRequest,bo={},rVe={rootIsQueryRenderer:!0};X1.Component;function mw(){return{error:null,props:null,retry:null}}function nVe(){return{error:null,props:{},retry:null}}function m0(e,t,r,n){return{error:e||null,props:t?t.data:null,retry:function(o){var a=r.retry(o);a&&typeof n.handleDataChange=="function"?n.handleDataChange({snapshot:a}):e&&typeof n.handleRetryAfterError=="function"&&n.handleRetryAfterError(e)}}}function tR(e,t){return JSON.stringify({id:e.cacheID?e.cacheID:e.id,variables:t})}function RP(e,t){var r=e.query,n=t.queryFetcher.getSelectionReferences();t.queryFetcher.disposeRequest();var i;if(r){var o=eR(r),a=tR(o.params,e.variables);i=bo[a]?bo[a].queryFetcher:new Rv(n)}else i=new Rv(n);return(0,tq.default)({prevQuery:e.query,prevPropsEnvironment:e.environment,prevPropsVariables:e.variables,queryFetcher:i},rq(e,i,t.retryCallbacks))}function rq(e,t,r,n){var i=e.environment,o=e.query,a=e.variables,s=e.cacheConfig,l=i;if(o){var c=eR(o),d=tVe(c,a,s),f={environment:l};if(typeof n=="string"&&bo[n]){var h=bo[n].snapshot;return h?{error:null,relayContext:f,renderProps:m0(null,h,t,r),snapshot:h,requestCacheKey:n}:{error:null,relayContext:f,renderProps:mw(),snapshot:null,requestCacheKey:n}}try{var p=t.lookupInStore(l,d,e.fetchPolicy),m=t.fetch({environment:l,onDataChange:null,operation:d}),g=m||p;return n=n||tR(c.params,e.variables),bo[n]={queryFetcher:t,snapshot:g},g?{error:null,relayContext:f,renderProps:m0(null,g,t,r),snapshot:g,requestCacheKey:n}:{error:null,relayContext:f,renderProps:mw(),snapshot:null,requestCacheKey:n}}catch(b){return{error:b,relayContext:f,renderProps:m0(b,null,t,r),snapshot:null,requestCacheKey:n}}}else{t.dispose();var v={environment:l};return{error:null,relayContext:v,renderProps:nVe(),requestCacheKey:null}}}var kf=Je.default,iVe=kf(s_),oVe=kf(Sf),Bc=kf(or),AP=kf(l_),aVe=kf(u_),Z1=kf(wi),sVe=["componentRef","__relayContext","__rootIsQueryRenderer"],lVe=HC,ex=Zj,uVe=c_,cVe=uVe.getContainerName,dVe=wf,fVe=XC,hVe=WC,tx=hVe.assertRelayContext,$P=Qs,rx=$t,_c=St,pVe=_c.Observable,TP=_c.createFragmentSpecResolver,mVe=_c.createOperationDescriptor,NP=_c.getDataIDsFromObject,gVe=_c.getRequest,vVe=_c.getVariablesFromObject,bVe=_c.isScalarAndEqual;function _Ve(e,t,r){var n,i=cVe(e);return n=(function(o){(0,aVe.default)(a,o);function a(l){var c,d;d=o.call(this,l)||this,(0,Z1.default)((0,AP.default)(d),"_handleFragmentDataUpdate",function(){var m=d.state.resolver;d.setState(function(g){return m===g.resolver?{data:g.resolver.resolve()}:null})}),(0,Z1.default)((0,AP.default)(d),"_refetch",function(m,g,v,b){if(d._isUnmounted)return{dispose:function(){}};var y=tx(d.props.__relayContext),S=y.environment,w=ex(t,d.props),C=typeof m=="function"?m(d._getFragmentVariables()):m;C=(0,Bc.default)((0,Bc.default)({},w),C);var A=g?(0,Bc.default)((0,Bc.default)({},C),g):C,T=b?{force:!!b.force}:void 0;T!=null&&b?.metadata!=null&&(T.metadata=b?.metadata);var R=typeof v=="function"?{next:v,error:v}:v||{},N=gVe(r),I=mVe(N,C,T);d.state.localVariables=C,d._refetchSubscription&&d._refetchSubscription.unsubscribe();var M,P=d._getQueryFetcher().lookupInStore(S,I,b?.fetchPolicy);return P!=null?(d.state.resolver.setVariables(A,I.request.node),d.setState(function(B){return{data:B.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){R.next&&R.next(),R.complete&&R.complete()}),{dispose:function(){}}):(d._getQueryFetcher().execute({environment:S,operation:I,preservePreviousReferences:!0}).mergeMap(function(B){return d.state.resolver.setVariables(A,I.request.node),pVe.create(function(j){return d.setState(function(W){return{data:W.resolver.resolve(),contextForChildren:{environment:d.props.__relayContext.environment}}},function(){j.next(),j.complete()})})}).finally(function(){d._refetchSubscription===M&&(d._refetchSubscription=null)}).subscribe((0,Bc.default)((0,Bc.default)({},R),{},{start:function(j){d._refetchSubscription=M=j,R.start&&R.start(j)}})),{dispose:function(){M&&M.unsubscribe()}})});var f=tx(l.__relayContext),h=(c=l.__rootIsQueryRenderer)!==null&&c!==void 0?c:!1;d._refetchSubscription=null;var p=TP(f,i,t,l,h);return d.state={data:p.resolve(),localVariables:null,prevProps:l,prevPropsContext:f,contextForChildren:f,relayProp:DP(f.environment,d._refetch),resolver:p},d._isUnmounted=!1,d}var s=a.prototype;return s.componentDidMount=function(){this._isUnmounted=!1,this._subscribeToNewResolverAndRerenderIfStoreHasChanged()},s.componentDidUpdate=function(c,d){this.state.resolver!==d.resolver?(d.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe(),this._subscribeToNewResolverAndRerenderIfStoreHasChanged()):this._rerenderIfStoreHasChanged()},a.getDerivedStateFromProps=function(c,d){var f,h=d.prevProps,p=tx(c.__relayContext),m=(f=c.__rootIsQueryRenderer)!==null&&f!==void 0?f:!1,g=NP(t,h),v=NP(t,c),b=ex(t,h),y=ex(t,c),S=d.resolver;if(d.prevPropsContext.environment!==p.environment||!$P(b,y)||!$P(g,v))return S=TP(p,i,t,c,m),{data:S.resolve(),localVariables:null,prevProps:c,prevPropsContext:p,contextForChildren:p,relayProp:DP(p.environment,d.relayProp.refetch),resolver:S};d.localVariables||S.setProps(c);var w=S.resolve();return w!==d.data?{data:w,prevProps:c}:null},s.componentWillUnmount=function(){this._isUnmounted=!0,this.state.resolver.dispose(),this._queryFetcher&&this._queryFetcher.dispose(),this._refetchSubscription&&this._refetchSubscription.unsubscribe()},s.shouldComponentUpdate=function(c,d){if(d.data!==this.state.data||d.relayProp!==this.state.relayProp)return!0;for(var f=Object.keys(c),h=0;h<f.length;h++){var p=f[h];if(p==="__relayContext"){if(this.state.prevPropsContext.environment!==d.prevPropsContext.environment)return!0}else if(!t.hasOwnProperty(p)&&!bVe(c[p],this.props[p]))return!0}return!1},s._rerenderIfStoreHasChanged=function(){var c=this.state,d=c.data,f=c.resolver,h=f.resolve();d!==h&&this.setState({data:h})},s._subscribeToNewResolverAndRerenderIfStoreHasChanged=function(){var c=this.state,d=c.data,f=c.resolver,h=f.resolve();f.setCallback(this.props,this._handleFragmentDataUpdate),d!==h&&this.setState({data:h})},s._getFragmentVariables=function(){return vVe(t,this.props)},s._getQueryFetcher=function(){return this._queryFetcher||(this._queryFetcher=new fVe),this._queryFetcher},s.render=function(){var c=this.props,d=c.componentRef;c.__relayContext,c.__rootIsQueryRenderer;var f=(0,oVe.default)(c,sVe),h=this.state,p=h.relayProp,m=h.contextForChildren;return rx.createElement(dVe.Provider,{value:m},rx.createElement(e,(0,iVe.default)({},f,this.state.data,{ref:d,relay:p})))},a})(rx.Component),(0,Z1.default)(n,"displayName",i),n}function DP(e,t){return{environment:e,refetch:t}}function yVe(e,t,r){return lVe(e,t,function(n,i){return _Ve(n,i,r)})}var xVe={createContainer:yVe},SVe=$t;SVe.createContext({wrapPrepareQueryResource:function(t){return t()}});var wVe=wf,EVe=Be,kVe=$t,CVe=kVe.useContext;function RVe(){var e=CVe(wVe);return e==null&&EVe(!1),e.environment}var nq=RVe,iq=$t;iq.useContext;iq.useEffect;var AVe=Je.default,FP=AVe(or),$Ve=Be,yc=St,IP=yc.__internal.fetchQueryDeduped,PP=yc.Observable,OP=yc.PreloadableQueryRegistry,MP=yc.ReplaySubject,LP=yc.createOperationDescriptor,TVe=yc.getRequest,NVe=yc.getRequestIdentifier,zP=100001;function DVe(e,t,r,n,i){var o;zP++;var a=(o=n?.fetchPolicy)!==null&&o!==void 0?o:"store-or-network",s=(0,FP.default)((0,FP.default)({},n?.networkCacheConfig),{},{force:!0}),l,c=!1,d=function(pe,K){return c=!0,e.executeWithSource({operation:pe,source:K})},f=new MP,h=PP.create(function(se){return f.subscribe(se)}),p,m=null,g=!1,v=function(pe,K){g=!0;var oe=new MP,le="raw-network-request-"+NVe(pe,r),Z=IP(e,le,function(){var be=e.getNetwork();return be.execute(pe,r,s,void 0,void 0,void 0,void 0,K)}),ve=Z.subscribe({error:function(Ge){m=Ge,oe.error(Ge)},next:function(Ge){oe.next(Ge)},complete:function(){oe.complete()}}),me=ve.unsubscribe;return p=me,PP.create(function(be){var Ge=oe.subscribe(be);return function(){Ge.unsubscribe(),p()}})},b,y=function(pe,K){g=!0;var oe=IP(e,pe.request.identifier,K).subscribe({error:function(Z){f.error(Z)},next:function(Z){f.next(Z)},complete:function(){f.complete()}});b=oe.unsubscribe},S=function(pe){var K=LP(pe,r,s);if(l=e.retain(K),a!=="store-only"){var oe=a!=="store-or-network"||e.check(K).status!=="available";oe&&y(K,function(){var le=v(pe.params,function(){return e.check(K)}),Z=d(K,le);return Z})}},w,C,A;if(t.kind==="PreloadableConcreteRequest"){var T=t;w=T.params;var R=w;A=R.id,A===null&&$Ve(!1);var N=OP.get(A);if(N!=null)S(N);else{var I=a==="store-only"?null:v(w),M=OP.onLoad(A,function(se){C();var pe=LP(se,r,s);l=e.retain(pe),I!=null&&y(pe,function(){return d(pe,I)})});C=M.dispose}}else{var P=t,B=TVe(P);w=B.params,A=w.cacheID!=null?w.cacheID:w.id,S(B)}var j=!1,W=!1,te=!1,J=function(){W||(l&&l.dispose(),W=!0)},re=function(){te||(c?b&&b():p&&p(),C&&C(),te=!0)};return{kind:"PreloadedQuery",environment:e,environmentProviderOptions:i,dispose:function(){j||(J(),re(),j=!0)},releaseQuery:J,cancelNetworkRequest:re,fetchKey:zP,id:A,get isDisposed(){return j||W},get networkError(){return m},name:w.name,networkCacheConfig:s,fetchPolicy:a,source:g?h:void 0,variables:r}}var h_={loadQuery:DVe},FVe=h_;FVe.loadQuery;var IVe=$t;IVe.useMemo;var PVe=Be,OVe=(function(){function e(r){this._capacity=r,this._capacity>0||PVe(!1),this._map=new Map}var t=e.prototype;return t.set=function(n,i){if(this._map.delete(n),this._map.set(n,i),this._map.size>this._capacity){var o=this._map.keys().next();o.done||this._map.delete(o.value)}},t.get=function(n){var i=this._map.get(n);return i!=null&&(this._map.delete(n),this._map.set(n,i)),i},t.has=function(n){return this._map.has(n)},t.delete=function(n){this._map.delete(n)},t.size=function(){return this._map.size},t.capacity=function(){return this._capacity-this._map.size},t.clear=function(){this._map.clear()},e})();function MVe(e){return new OVe(e)}var LVe={create:MVe},zVe=Je.default,nx=zVe(wi),UVe=300*1e3,BVe=(function(){function e(r){var n=this;(0,nx.default)(this,"_retainCount",0),(0,nx.default)(this,"_retainDisposable",null),(0,nx.default)(this,"_releaseTemporaryRetain",null),this._retain=function(i){return n._retainCount++,n._retainCount===1&&(n._retainDisposable=r(i)),{dispose:function(){n._retainCount=Math.max(0,n._retainCount-1),n._retainCount===0&&n._retainDisposable!=null&&(n._retainDisposable.dispose(),n._retainDisposable=null)}}}}var t=e.prototype;return t.temporaryRetain=function(n){var i=this,o;if(n.isServer())return{dispose:function(){}};var a=this._retain(n),s=null,l=function(){clearTimeout(s),s=null,i._releaseTemporaryRetain=null,a.dispose()};return s=setTimeout(l,UVe),(o=this._releaseTemporaryRetain)===null||o===void 0||o.call(this),this._releaseTemporaryRetain=l,{dispose:function(){var d;(d=i._releaseTemporaryRetain)===null||d===void 0||d.call(i)}}},t.permanentRetain=function(n){var i=this._retain(n);return this.releaseTemporaryRetain(),i},t.releaseTemporaryRetain=function(){var n;(n=this._releaseTemporaryRetain)===null||n===void 0||n.call(this),this._releaseTemporaryRetain=null},t.getRetainCount=function(){return this._retainCount},e})(),jVe=BVe,oq=Je.default,Mg=oq(or),aq=oq(wi),qVe=LVe,VVe=jVe,GVe=Be,KVe=St,HVe=KVe.isPromise,WVe=1e3,sq="store-or-network",lq="store-and-network",JVe=typeof WeakMap=="function";function Av(e){return e.request.node.params.metadata.live!==void 0}function gw(e,t,r,n,i){var o=r??(Av(t)?lq:sq),a=n??e.UNSTABLE_getDefaultRenderPolicy(),s="".concat(o,"-").concat(a,"-").concat(t.request.identifier);return i!=null?"".concat(s,"-").concat(i):s}function UP(e,t){var r={__id:e.fragment.dataID,__fragments:(0,aq.default)({},e.fragment.node.name,e.request.variables),__fragmentOwner:e.request};return{cacheIdentifier:t,fragmentNode:e.request.node.fragment,fragmentRef:r,operation:e}}var QVe=2e5;function ix(e,t,r,n,i,o){var a=Av(t),s=n,l=i,c=new VVe(function(f){var h=f.retain(t);return{dispose:function(){a&&l!=null&&l.unsubscribe(),h.dispose(),o(d)}}}),d={cacheIdentifier:e,id:QVe++,processedPayloadsCount:0,operationAvailability:r,getValue:function(){return s},setValue:function(h){s=h},setNetworkSubscription:function(h){a&&l!=null&&l.unsubscribe(),l=h},temporaryRetain:function(h){return c.temporaryRetain(h)},permanentRetain:function(h){return c.permanentRetain(h)},releaseTemporaryRetain:function(){c.releaseTemporaryRetain()}};return d}var YVe=(function(){function e(r){var n=this;(0,aq.default)(this,"_clearCacheEntry",function(i){n._cache.delete(i.cacheIdentifier)}),this._environment=r,this._cache=qVe.create(WVe)}var t=e.prototype;return t.prepare=function(n,i,o,a,s,l,c){var d=gw(this._environment,n,o,a,l);return this.prepareWithIdentifier(d,n,i,o,a,s,c)},t.prepareWithIdentifier=function(n,i,o,a,s,l,c){var d=this._environment,f=a??(Av(i)?lq:sq),h=s??d.UNSTABLE_getDefaultRenderPolicy(),p=this._cache.get(n),m=null,g=p!=null;p==null&&(p=this._fetchAndSaveQuery(n,i,o,f,h,c,(0,Mg.default)((0,Mg.default)({},l),{},{unsubscribe:function(y){m?.dispose();var S=l?.unsubscribe;S&&S(y)}}))),m=p.temporaryRetain(d);var v=p.getValue();if(HVe(v))throw d.__log({name:"suspense.query",fetchPolicy:f,isPromiseCached:g,operation:i,queryAvailability:p.operationAvailability,renderPolicy:h}),v;if(v instanceof Error)throw v;return v},t.retain=function(n,i){var o=this._environment,a=n.cacheIdentifier,s=n.operation,l=this._getOrCreateCacheEntry(a,s,null,n,null),c=l.permanentRetain(o);return o.__log({name:"queryresource.retain",profilerContext:i,resourceID:l.id}),{dispose:function(){c.dispose()}}},t.releaseTemporaryRetain=function(n){var i=this._cache.get(n.cacheIdentifier);i?.releaseTemporaryRetain()},t.TESTS_ONLY__getCacheEntry=function(n,i,o,a){var s=this._environment,l=gw(s,n,i,o,a);return this._cache.get(l)},t._getOrCreateCacheEntry=function(n,i,o,a,s){var l=this._cache.get(n);return l==null&&(l=ix(n,i,o,a,s,this._clearCacheEntry),this._cache.set(n,l)),l},t._fetchAndSaveQuery=function(n,i,o,a,s,l,c){var d=this,f=this._environment,h=f.check(i),p=h.status,m=p==="available",g=m||s==="partial"&&p!=="stale",v,b,y=function(){};switch(a){case"store-only":{v=!1,b=!0;break}case"store-or-network":{v=!m,b=g;break}case"store-and-network":{v=!0,b=g;break}case"network-only":default:{v=!0,b=!1;break}}if(b){var S=UP(i,n),w=ix(n,i,h,S,null,this._clearCacheEntry);this._cache.set(n,w)}if(v){var C=UP(i,n),A;o.subscribe({start:function(P){A=P;var B=d._cache.get(n);B&&B.setNetworkSubscription(A);var j=c?.start;if(j){var W=(0,Mg.default)((0,Mg.default)({},P),{},{unsubscribe:function(){Av(i)&&P.unsubscribe()}});j(W)}},next:function(){var P=d._getOrCreateCacheEntry(n,i,h,C,A);P.processedPayloadsCount+=1,P.setValue(C),y();var B=c?.next;if(B!=null){var j=f.lookup(i.fragment);B(j)}},error:function(P){var B=d._getOrCreateCacheEntry(n,i,h,P,A);B.processedPayloadsCount===0&&B.setValue(P),y(),A=null,B.setNetworkSubscription(null);var j=c?.error;j&&j(P)},complete:function(){y(),A=null;var P=d._cache.get(n);P&&P.setNetworkSubscription(null);var B=c?.complete;B&&B()},unsubscribe:c?.unsubscribe});var T=this._cache.get(n);if(!T){var R=new Promise(function(M){y=M});R.displayName="Relay("+i.fragment.node.name+")",T=ix(n,i,h,R,A,this._clearCacheEntry),this._cache.set(n,T)}}else{var N=c?.complete;N&&N()}var I=this._cache.get(n);return I==null&&GVe(!1),f.__log({name:"queryresource.fetch",resourceID:I.id,operation:i,profilerContext:l,fetchPolicy:a,renderPolicy:s,queryAvailability:h,shouldFetch:v}),I},e})();function XVe(e){return new YVe(e)}var BP=JVe?new WeakMap:new Map;function ZVe(e){var t=BP.get(e);if(t)return t;var r=XVe(e);return BP.set(e,r),r}var _m={getQueryResourceForEnvironment:ZVe,getQueryCacheIdentifier:gw},eGe=$t;eGe.useMemo;var uq=$t;uq.useCallback;uq.useEffect;var tGe=$t,rGe=St,nGe=rGe.__internal.createRelayLoggingContext,iGe=nGe(tGe),oGe=iGe,aGe=$t,sGe=aGe.useContext;function lGe(){return sGe(oGe)}var cq=lGe,rR=Je.default,jP=rR(or),Kl=rR(qr),uGe=rR(Ql),cGe=_m,dq=cGe.getQueryResourceForEnvironment,dGe=nq,fGe=cq,fu=Be,ym=$t;ym.useDebugValue;var ox=ym.useEffect,ax=ym.useMemo,qP=ym.useRef,Lg=ym.useState,Zs=St,fq=Zs.__internal,hGe=fq.fetchQuery,pGe=fq.getPromiseForActiveRequest,zg=Zs.RelayFeatureFlags,VP=Zs.areEqualSelectors,mGe=Zs.createOperationDescriptor,gGe=Zs.getPendingOperationsForFragment,vGe=Zs.getSelector,bGe=Zs.getVariablesFromFragment,GP=Zs.handlePotentialSnapshotErrors,KP=Zs.recycleNodesInto;function _Ge(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function yGe(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingClientEdges)!==null&&t!==void 0?t:null}else{var r=null,n=(0,Kl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,Kl.default)(o.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function xGe(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingLiveResolverFields)!==null&&t!==void 0?t:null}else{var r=null,n=(0,Kl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,Kl.default)(o.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function SGe(e,t,r){if(t.kind==="singular")GP(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,Kl.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;GP(e,o.fieldErrors,r)}}catch(a){n.e(a)}finally{n.f()}}}function $v(e,t){if(t.kind==="bailout")return null;var r=e.getStore().getEpoch();if(r===t.epoch)return null;if(t.kind==="singular"){var n=e.lookup(t.snapshot.selector),i=KP(t.snapshot.data,n.data),o={data:i,isMissingData:n.isMissingData,missingClientEdges:n.missingClientEdges,missingLiveResolverFields:n.missingLiveResolverFields,seenRecords:n.seenRecords,selector:n.selector,fieldErrors:n.fieldErrors};return[i!==t.snapshot.data,{kind:"singular",snapshot:o,epoch:r}]}else{for(var a=!1,s=[],l=0;l<t.snapshots.length;l++){var c=t.snapshots[l],d=e.lookup(c.selector),f=KP(c.data,d.data),h={data:f,isMissingData:d.isMissingData,missingClientEdges:d.missingClientEdges,missingLiveResolverFields:d.missingLiveResolverFields,seenRecords:d.seenRecords,selector:d.selector,fieldErrors:d.fieldErrors};f!==c.data&&(a=!0),s.push(h)}return s.length!==t.snapshots.length&&fu(!1),[a,{kind:"plural",snapshots:s,epoch:r}]}}function wGe(e,t,r,n,i){var o=bGe(t,r),a=(0,jP.default)((0,jP.default)({},o),{},{id:n.clientEdgeDestinationID}),s=mGe(n.request,a,i?.networkCacheConfig),l=dq(e),c=l.prepare(s,hGe(e,s),i?.fetchPolicy);return[c,pGe(e,s.request)]}function EGe(e,t,r,n){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var i=e.subscribe(t.snapshot,function(a){r(function(s){if(s.kind!=="singular"||s.snapshot.selector!==a.selector){var l=$v(e,s);if(l!=null){var c=l[0],d=l[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:c}),n.current=c,c?d:s}else return s}return n.current=!0,{kind:"singular",snapshot:a,epoch:e.getStore().getEpoch()}})});return function(){i.dispose()}}else{var o=t.snapshots.map(function(a,s){return e.subscribe(a,function(l){r(function(c){var d;if(c.kind!=="plural"||((d=c.snapshots[s])===null||d===void 0?void 0:d.selector)!==l.selector){var f=$v(e,c);if(f!=null){var h=f[0],p=f[1];return e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:h}),n.current=n.current||h,h?p:c}else return c}var m=(0,uGe.default)(c.snapshots);return m[s]=l,n.current=!0,{kind:"plural",snapshots:m,epoch:e.getStore().getEpoch()}})})});return function(){var a=(0,Kl.default)(o),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;l.dispose()}}catch(c){a.e(c)}finally{a.f()}}}}function HP(e,t){return t==null?{kind:"bailout"}:t.kind==="PluralReaderSelector"?{kind:"plural",snapshots:t.selectors.map(function(r){return e.lookup(r)}),epoch:e.getStore().getEpoch()}:{kind:"singular",snapshot:e.lookup(t),epoch:e.getStore().getEpoch()}}function kGe(e,t,r,n){var i,o,a=ax(function(){return vGe(e,t)},[e,t]),s=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;s?t==null||Array.isArray(t)||fu(!1):Array.isArray(t)&&fu(!1),t==null||s&&Array.isArray(t)&&t.length===0||a!=null||fu(!1);var l=dGe(),c;zg.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(c=fGe());var d=Lg(function(){return HP(l,a)}),f=d[0],h=d[1],p=f,m=Lg(p),g=m[0],v=m[1],b=g,y=Lg(a),S=y[0],w=y[1],C=Lg(l),A=C[0],T=C[1];if(!VP(a,S)||l!==A){w(a),T(l);var R=HP(l,a);h(R),v(R),p=R,b=R}var N=qP(!1);if(ox(function(){N.current=a},[a]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||zg.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var I=ax(function(){var oe=yGe(p),le,Z=[];if(oe!=null&&oe.length){le=[];var ve=(0,Kl.default)(oe),me;try{for(ve.s();!(me=ve.n()).done;){var be=me.value,Ge=wGe(l,e,t,be,n),Lt=Ge[0],Ct=Ge[1];le.push(Lt),Ct!=null&&Z.push(Ct)}}catch(kr){ve.e(kr)}finally{ve.f()}}return[le,Z]},[p,l,e,t,n]),M=I[0],P=I[1];if(P.length)throw Promise.all(P);ox(function(){var oe=dq(l);if(M!=null&&M.length){var le=[],Z=(0,Kl.default)(M),ve;try{for(Z.s();!(ve=Z.n()).done;){var me=ve.value;le.push(oe.retain(me))}}catch(be){Z.e(be)}finally{Z.f()}return function(){for(var be=0,Ge=le;be<Ge.length;be++){var Lt=Ge[be];Lt.dispose()}}}},[l,M])}if(_Ge(p)){var B=xGe(p);if(B!=null&&B.length>0)throw Promise.all(B.map(function(oe){return l.getStore().getLiveResolverPromise(oe)}));if(zg.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==A||!N.current||!VP(N.current,a)){a==null&&fu(!1);var j=a.kind==="PluralReaderSelector"?a.selectors[0].owner:a.owner,W=gGe(l,e,j);if(W)throw W.promise}}SGe(l,p,c);var te=qP(!1);if(ox(function(){var oe=b,le=$v(l,b);if(le!==null){var Z=le[0],ve=le[1];Z&&h(ve),oe=ve}return EGe(l,oe,h,te)},[l,b]),te.current){var J=$v(l,p);if(J!=null){var re=J[0],se=J[1];re&&(h(se),p=se)}te.current=!1}var pe;if(s){var K=t==null;pe=ax(function(){return p.kind==="bailout"?K?null:[]:(p.kind!=="plural"&&fu(!1),p.snapshots.map(function(oe){return oe.data}))},[p,K])}else p.kind==="bailout"?pe=null:(p.kind!=="singular"&&fu(!1),pe=p.snapshot.data);return zg.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(pe===void 0||Array.isArray(pe)&&pe.length>0&&pe.every(function(oe){return oe===void 0})),pe}var CGe=kGe,nR=Je.default,WP=nR(or),Hl=nR(qr),RGe=nR(Ql),AGe=_m,hq=AGe.getQueryResourceForEnvironment,$Ge=nq,TGe=cq,hu=Be,xm=$t;xm.useDebugValue;var Ug=xm.useEffect,sx=xm.useMemo,JP=xm.useRef,NGe=xm.useState,el=St,pq=el.__internal,DGe=pq.fetchQuery,FGe=pq.getPromiseForActiveRequest,Bg=el.RelayFeatureFlags,QP=el.areEqualSelectors,IGe=el.createOperationDescriptor,PGe=el.getPendingOperationsForFragment,OGe=el.getSelector,MGe=el.getVariablesFromFragment,YP=el.handlePotentialSnapshotErrors,XP=el.recycleNodesInto;function LGe(e){return e.kind==="bailout"?!1:e.kind==="singular"?e.snapshot.isMissingData:e.snapshots.some(function(t){return t.isMissingData})}function zGe(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingClientEdges)!==null&&t!==void 0?t:null}else{var r=null,n=(0,Hl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingClientEdges){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,Hl.default)(o.missingClientEdges),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function UGe(e){if(e.kind==="bailout")return null;if(e.kind==="singular"){var t;return(t=e.snapshot.missingLiveResolverFields)!==null&&t!==void 0?t:null}else{var r=null,n=(0,Hl.default)(e.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o.missingLiveResolverFields){var a;r=(a=r)!==null&&a!==void 0?a:[];var s=(0,Hl.default)(o.missingLiveResolverFields),l;try{for(s.s();!(l=s.n()).done;){var c=l.value;r.push(c)}}catch(d){s.e(d)}finally{s.f()}}}}catch(d){n.e(d)}finally{n.f()}return r}}function BGe(e,t,r){if(t.kind==="singular")YP(e,t.snapshot.fieldErrors,r);else if(t.kind==="plural"){var n=(0,Hl.default)(t.snapshots),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;YP(e,o.fieldErrors,r)}}catch(a){n.e(a)}finally{n.f()}}}function vw(e,t){if(t.kind==="bailout")return null;var r=e.getStore().getEpoch();if(r===t.epoch)return null;if(t.kind==="singular"){var n=e.lookup(t.snapshot.selector),i=XP(t.snapshot.data,n.data),o={data:i,isMissingData:n.isMissingData,missingClientEdges:n.missingClientEdges,missingLiveResolverFields:n.missingLiveResolverFields,seenRecords:n.seenRecords,selector:n.selector,fieldErrors:n.fieldErrors};return[i!==t.snapshot.data,{kind:"singular",snapshot:o,epoch:r,selector:t.selector,environment:t.environment}]}else{for(var a=!1,s=[],l=0;l<t.snapshots.length;l++){var c=t.snapshots[l],d=e.lookup(c.selector),f=XP(c.data,d.data),h={data:f,isMissingData:d.isMissingData,missingClientEdges:d.missingClientEdges,missingLiveResolverFields:d.missingLiveResolverFields,seenRecords:d.seenRecords,selector:d.selector,fieldErrors:d.fieldErrors};f!==c.data&&(a=!0),s.push(h)}return s.length!==t.snapshots.length&&hu(!1),[a,{kind:"plural",snapshots:s,epoch:r,selector:t.selector,environment:t.environment}]}}function jGe(e,t,r,n,i){var o=MGe(t,r),a=(0,WP.default)((0,WP.default)({},o),{},{id:n.clientEdgeDestinationID}),s=IGe(n.request,a,i?.networkCacheConfig),l=hq(e),c=l.prepare(s,DGe(e,s),i?.fetchPolicy),d=FGe(e,s.request);return d!=null&&d.displayName==null&&(d.displayName=n.request.params.name),[c,d]}function ZP(e,t,r){if(t.kind==="bailout")return function(){};if(t.kind==="singular"){var n=e.subscribe(t.snapshot,function(o){r(function(a){var s=null;if(a.kind!=="singular"||a.snapshot.selector!==o.selector||a.environment!==e){var l=vw(a.environment,a);if(l!=null){var c=l[0],d=l[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:c}),s=c?d:a}else s=a}else s={kind:"singular",snapshot:o,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment};return s})});return function(){n.dispose()}}else{var i=t.snapshots.map(function(o,a){return e.subscribe(o,function(s){r(function(l){var c,d=null;if(l.kind!=="plural"||((c=l.snapshots[a])===null||c===void 0?void 0:c.selector)!==s.selector||l.environment!==e){var f=vw(l.environment,l);if(f!=null){var h=f[0],p=f[1];e.__log({name:"useFragment.subscription.missedUpdates",hasDataChanges:h}),d=h?p:l}else d=l}else{var m=(0,RGe.default)(l.snapshots);m[a]=s,d={kind:"plural",snapshots:m,epoch:e.getStore().getEpoch(),selector:t.selector,environment:t.environment}}return d})})});return function(){var o=(0,Hl.default)(i),a;try{for(o.s();!(a=o.n()).done;){var s=a.value;s.dispose()}}catch(l){o.e(l)}finally{o.f()}}}}function eO(e,t){return t==null?{kind:"bailout",environment:e}:t.kind==="PluralReaderSelector"?{kind:"plural",snapshots:t.selectors.map(function(r){return e.lookup(r)}),epoch:e.getStore().getEpoch(),selector:t,environment:e}:{kind:"singular",snapshot:e.lookup(t),epoch:e.getStore().getEpoch(),selector:t,environment:e}}function qGe(e,t,r,n){var i,o,a=sx(function(){return OGe(e,t)},[e,t]),s=(e==null||(i=e.metadata)===null||i===void 0?void 0:i.plural)===!0;s?t==null||Array.isArray(t)||hu(!1):Array.isArray(t)&&hu(!1),t==null||s&&Array.isArray(t)&&t.length===0||a!=null||hu(!1);var l=$Ge(),c;Bg.ENABLE_UI_CONTEXT_ON_RELAY_LOGGER&&(c=TGe());var d=NGe(function(){return eO(l,a)}),f=d[0],h=d[1],p=f,m=p.environment;if(!QP(a,p.selector)||l!==p.environment){var g=eO(l,a);h(g),p=g}var v=JP(!1);if(Ug(function(){v.current=a},[a]),((o=e.metadata)===null||o===void 0?void 0:o.hasClientEdges)===!0||Bg.CHECK_ALL_FRAGMENTS_FOR_MISSING_CLIENT_EDGES){var b=sx(function(){var P=zGe(p),B,j=[];if(P!=null&&P.length){B=[];var W=(0,Hl.default)(P),te;try{for(W.s();!(te=W.n()).done;){var J=te.value,re=jGe(l,e,t,J,n),se=re[0],pe=re[1];B.push(se),pe!=null&&j.push(pe)}}catch(K){W.e(K)}finally{W.f()}}return[B,j]},[p,l,e,t,n]),y=b[0],S=b[1];if(S.length){var w=Promise.all(S);throw w.displayName="RelayClientEdge(".concat(S.map(function(P){return P.displayName}).join(","),")"),w}Ug(function(){var P=hq(l);if(y!=null&&y.length){var B=[],j=(0,Hl.default)(y),W;try{for(j.s();!(W=j.n()).done;){var te=W.value;B.push(P.retain(te))}}catch(J){j.e(J)}finally{j.f()}return function(){for(var J=0,re=B;J<re.length;J++){var se=re[J];se.dispose()}}}},[l,y])}if(LGe(p)){var C=UGe(p);if(C!=null&&C.length>0){var A=Promise.all(C.map(function(P){return l.getStore().getLiveResolverPromise(P)}));throw A.displayName="RelayLiveResolver("+e.name+")",A}if(Bg.ENABLE_RELAY_OPERATION_TRACKER_SUSPENSE||l!==m||!v.current||!QP(v.current,a)){a==null&&hu(!1);var T=a.kind==="PluralReaderSelector"?a.selectors[0].owner:a.owner,R=PGe(l,e,T);if(R)throw R.promise}}BGe(l,p,c);var N=JP(null);Ug(function(){var P=N.current;if(P!=null){if(p.environment===P.environment&&p.selector===P.selector)return;P.dispose()}if(p.kind!=="bailout"){var B=p,j=vw(p.environment,p);if(j!==null){var W=j[0],te=j[1];if(W){h(te);return}B=te}var J=ZP(p.environment,B,h);N.current={dispose:J,selector:p.selector,environment:p.environment}}},[p]),Ug(function(){if(N.current==null&&p.kind!=="bailout"){var P=ZP(p.environment,p,h);N.current={dispose:P,selector:p.selector,environment:p.environment}}return function(){var B;(B=N.current)===null||B===void 0||B.dispose(),N.current=null}},[]);var I;if(s){var M=t==null;I=sx(function(){return p.kind==="bailout"?M?null:[]:(p.kind!=="plural"&&hu(!1),p.snapshots.map(function(P){return P.data}))},[p,M])}else p.kind==="bailout"?I=null:(p.kind!=="singular"&&hu(!1),I=p.snapshot.data);return Bg.LOG_MISSING_RECORDS_IN_PROD&&t!=null&&(I===void 0||Array.isArray(I)&&I.length>0&&I.every(function(P){return P===void 0})),I}var VGe=qGe,mq=Je.default;mq(CGe);mq(VGe);var gq=_m;gq.getQueryCacheIdentifier;gq.getQueryResourceForEnvironment;var p_=$t;p_.useContext;p_.useEffect;p_.useState;p_.useRef;var GGe=$t;GGe.useState;var KGe=$t,vq=St;vq.createOperationDescriptor;vq.getRequest;KGe.useMemo;var HGe=St;HGe.__internal.fetchQuery;var WGe=Je.default;WGe(or);var bq=$t;bq.useEffect;bq.useRef;var JGe=Je.default;JGe(qr);var m_=$t;m_.useCallback;m_.useEffect;m_.useRef;m_.useState;var QGe=$t;QGe.useDebugValue;var YGe=St;YGe.getFragment;var XGe=Je.default;XGe(or);var g_=$t,ZGe=St;ZGe.commitMutation;g_.useState;g_.useEffect;g_.useRef;g_.useCallback;var _q=St;_q.ConnectionInterface;_q.getValueAtPath;var iR=$t,yq=St;yq.__internal.getObservableForActiveRequest;yq.getSelector;iR.useEffect;iR.useState;iR.useMemo;var eKe=Je.default;eKe(or);var oR=$t;oR.useCallback;oR.useRef;oR.useState;var Sm=St;Sm.__internal.fetchQuery;Sm.createOperationDescriptor;Sm.getPaginationVariables;Sm.getRefetchMetadata;Sm.getSelector;var tKe=Je.default;tKe(or);var aR=$t;aR.useCallback;aR.useEffect;aR.useState;var Cf=St;Cf.__internal.fetchQuery;Cf.RelayFeatureFlags;Cf.createOperationDescriptor;Cf.getPaginationVariables;Cf.getRefetchMetadata;Cf.getSelector;var xq=Je.default;xq(or);xq(qr);var rKe=_m;rKe.getQueryResourceForEnvironment;var xc=St;xc.__internal.fetchQuery;xc.RelayFeatureFlags;xc.createOperationDescriptor;xc.getPendingOperationsForFragment;xc.getSelector;xc.getVariablesFromFragment;xc.handlePotentialSnapshotErrors;var nKe=Je.default;nKe(qr);var iKe=h_;iKe.loadQuery;var wm=$t;wm.useCallback;wm.useEffect;wm.useInsertionEffect;wm.useRef;wm.useState;var oKe=St;oKe.getRequest;var aKe=Je.default;aKe(qr);var sKe=h_;sKe.loadQuery;var v_=$t;v_.useCallback;v_.useEffect;v_.useRef;v_.useState;var Sq=St;Sq.RelayFeatureFlags;Sq.getRequest;var lKe=Je.default;lKe(or);var uKe=_m;uKe.getQueryResourceForEnvironment;var sR=$t;sR.useCallback;sR.useContext;sR.useReducer;var Rf=St;Rf.__internal.fetchQuery;Rf.createOperationDescriptor;Rf.getFragmentIdentifier;Rf.getRefetchMetadata;Rf.getSelector;Rf.getValueAtPath;var cKe=Je.default;cKe(or);var lR=$t;lR.useCallback;lR.useDebugValue;lR.useState;var b_=St;b_.RelayFeatureFlags;b_.getFragment;b_.getFragmentIdentifier;b_.getPaginationMetadata;var dKe=Je.default;dKe(or);var Sc=$t;Sc.useCallback;Sc.useDebugValue;Sc.useEffect;Sc.useLayoutEffect;Sc.useMemo;Sc.useRef;Sc.useState;var uR=St;uR.getFragment;uR.getFragmentIdentifier;uR.getPaginationMetadata;var __=St;__.ConnectionInterface;__.RelayFeatureFlags;__.getSelector;__.getValueAtPath;var fKe=$t;fKe.useDebugValue;var hKe=St,wq=hKe.__internal;wq.fetchQueryDeduped;wq.fetchQuery;var pKe=$t;pKe.useDebugValue;var mKe=St;mKe.getFragment;var Eq=$t;Eq.useEffect;Eq.useRef;var gKe=$t;gKe.useEffect;var vKe=St;vKe.requestSubscription;var bKe=wf,_Ke=bqe,yKe=Wqe,xKe=xVe,SKe=h_;SKe.loadQuery;var Jo=St,wKe={ConnectionHandler:Jo.ConnectionHandler,MutationTypes:Jo.MutationTypes,RangeOperations:Jo.RangeOperations,ReactRelayContext:bKe,applyOptimisticMutation:Jo.applyOptimisticMutation,commitLocalUpdate:Jo.commitLocalUpdate,commitMutation:Jo.commitMutation,createFragmentContainer:_Ke.createContainer,createPaginationContainer:yKe.createContainer,createRefetchContainer:xKe.createContainer,fetchQuery_DEPRECATED:Jo.fetchQuery_DEPRECATED,graphql:Jo.graphql,readInlineData:Jo.readInlineData,requestSubscription:Jo.requestSubscription,fetchQuery:Jo.fetchQuery},EKe=wKe;function kKe(e){let t=EKe.ReactRelayContext.Provider;return ur(t,{value:{environment:e.environment},children:e.children})}let CKe={make:kKe},RKe={Provider:CKe};function AKe(e,t,r){let n=async(i,o,a,s)=>{let l=D(Li(i.text),""),c=l.includes("Platform")||l.includes("platform")?e.platformApiEndpoint:e.apiEndpoint,d=Object.fromEntries([["content-type","application/json"]]),f=t();f!==void 0&&(d.Authorization="Bearer "+f);let p=(await fetch(c,{method:"POST",headers:d,body:D(JSON.stringify({query:l,variables:o}),"")})).json,m=await p();return ZS(m)&&r(),m};return Fje.make(St.Network.create(n),Tje.make(new St.RecordSource,void 0,void 0),void 0,void 0,void 0,void 0,void 0)}function $Ke(e){let t=e.config,r=Sa(),n=It(()=>AKe(t,()=>k(r,i=>i.getToken()),()=>ee(r,i=>i.logout())),[t,r]);return _(RKe.Provider.make,{environment:n,children:e.children})}let TKe=$Ke;function no(e){return"var("+e+")"}let NKe=E([u("background",no(x.surfaceElevated)),u("border","1px solid var("+x.border+")"),u("border-radius",no(Y.md)),u("padding",no(O.lg)),z("flex"),_e("column"),X("center"),et("center"),u("gap",no(O.sm)),u("min-height","160px"),Xa("center"),ga({NAME:"percent",VAL:100}),u("box-sizing","border-box")]),DKe=E([u("font-size","32px"),u("line-height","1"),Op(ke(4))]),FKe=E([u("color",no(x.textPrimary)),u("font-size",no($.sizeMd)),u("font-weight",no($.weightMedium)),Op(ke(4))]),IKe=E([u("color",no(x.textSecondary)),u("font-size",no($.sizeSm)),u("line-height",no($.lineHeightNormal))]),PKe=E([u("color",no(x.textDisabled)),u("font-size",no($.sizeXs)),u("font-family",no($.fontFamilyMono)),Uo(ke(8))]);function OKe(e){let t=e.definition;return L("div",{children:[_("div",{children:"[locked]",className:DKe}),_("div",{children:t.title,className:FKe}),_("div",{children:t.description,className:IKe}),_("div",{children:t.extensionPackage,className:PKe})],className:NKe})}let MKe=OKe,LKe=E([z("flex"),X("center"),et("center"),u("min-height","160px"),u("color","var("+x.textSecondary+")"),u("font-size","var("+$.sizeSm+")")]);function zKe(e){return _("div",{children:"Loading…",className:LKe})}E([z("flex"),X("center"),et("center"),u("min-height","160px"),u("color","var("+x.error+")"),u("font-size","var("+$.sizeSm+")")]);function UKe(e){let t=Ks(),r=Q_e(e.fragmentId);if(r===void 0)return null;let n=r.requiredAccess;return n!==void 0&&!t(n)?_(MKe,{definition:r}):_(nV,{children:r.component(e.props),fallback:_(zKe,{})})}let BKe=UKe;function jKe(e){let t=J_e(e.name),r=e.contextId,n=e.resourceId,i={contextId:r,resourceId:n};return t.length!==0?_("div",{children:t.map(o=>_(BKe,{fragmentId:o.fragmentId,props:i},o.fragmentId)),style:{display:"flex",flexDirection:"column",gap:"1rem"}}):null}let qKe=jKe;function VKe(e){return L("div",{children:[L("header",{children:[_("h1",{children:"Platform overview",style:{margin:"0"}}),_("p",{children:"Summary panels contributed by connected plugins appear below.",style:{color:"#666",margin:"0.25rem 0 0"}})]}),_(qKe,{name:"platform-summary"})],style:{display:"flex",fontFamily:"system-ui",padding:"1.5rem",flexDirection:"column",gap:"1.5rem"}})}let GKe=VKe,KKe="host.home",cR="/",HKe={label:"Home",icon:void 0,group:void 0,sortOrder:0},WKe=cR,JKe={fragmentId:KKe,title:"Home",menuEntry:HKe,requiredAccess:void 0,url:WKe};function QKe(e){return k(q(e.home,t=>t.trim()),t=>{if(!(t===""||t===cR))return t})}function YKe(e){let t=e.config,r=xt(am),n=Ck(),i=Rz(),o=Fv(void 0),a=QKe(t);return Ae(()=>{!t.autoRedirectFirstPage&&ir(a)&&(ee(r,s=>s.register([JKe])),ee(n,s=>s.register([jc(mO(l=>l),_(GKe,{}))],Iu())))},[]),Ae(()=>{if((o===""||o===cR)&&i.length!==0){if(a!==void 0)ca(a);else if(t.autoRedirectFirstPage){let l=i.find(c=>Ee(c.url)?Az(c):!1);if(l!==void 0){let c=l.url;c!==void 0&&ca(c)}}}},[i.length,o]),null}let XKe=YKe,ZKe=`mutation UploadPresign($store: ID!, $fileName: String!, $contentType: String) {
|
|
124
|
+
Upload_Presign(store: $store, fileName: $fileName, contentType: $contentType) {
|
|
125
|
+
uploadUrl
|
|
126
|
+
storageRef
|
|
127
|
+
}
|
|
128
|
+
}`,eHe=`mutation UploadRelease($store: ID!, $storageRef: String!) {
|
|
129
|
+
Upload_Release(store: $store, storageRef: $storageRef) {
|
|
130
|
+
released
|
|
131
|
+
reason
|
|
132
|
+
}
|
|
133
|
+
}`;function kq(e,t){return k(k(G(e),r=>F(r,t)),G)}function tHe(e){return k(kq(e,"Upload_Presign"),t=>{let r=k(F(t,"uploadUrl"),ie),n=k(F(t,"storageRef"),ie);if(r!==void 0&&n!==void 0)return{uploadUrl:r,storageRef:n}})}function rHe(e){let t=kq(e,"Upload_Release");return t!==void 0?Ce(k(F(t,"released"),Ov),!0)?{TAG:"Ok",_0:void 0}:{TAG:"Error",_0:D(k(F(t,"reason"),ie),"Could not release the uploaded file")}:{TAG:"Error",_0:"Could not release the uploaded file"}}function nHe(e,t,r,n,i){return new Promise((o,a)=>{let s=new XMLHttpRequest;s.open("PUT",e),s.setRequestHeader("Content-Type",n),s.upload.onprogress=l=>{if(l.lengthComputable&&l.total>0)return i(l.loaded/l.total*100)},s.onload=()=>{let l=s.status;return l>=200&&l<300?(i(100),o({TAG:"Ok",_0:t})):o({TAG:"Error",_0:"Upload failed (status "+l.toString()+")"})},s.onerror=()=>o({TAG:"Error",_0:"Upload failed (network error)"}),s.send(r)})}function iHe(e,t){return{upload:(r,n)=>{let i=r.type;return Mt(e()(ZKe,Oe([["store",t],["fileName",r.name],["contentType",i]])).then(o=>{let a=tHe(o);return a!==void 0?nHe(a.uploadUrl,a.storageRef,r,i,n):Promise.resolve({TAG:"Error",_0:"Could not obtain an upload target"})}),o=>Promise.resolve({TAG:"Error",_0:"Upload request failed"}))},remove:r=>Mt(e()(eHe,Oe([["store",t],["storageRef",r]])).then(rHe),n=>Promise.resolve({TAG:"Error",_0:"Release request failed"}))}}let oHe=[],aHe=[],sHe=[],lHe={pages:oHe,panels:aHe,routes:sHe};function Cq(e){return L("div",{children:[_("h1",{children:"Shell failed to boot"}),_("pre",{children:e.message})],style:{color:"#a00",fontFamily:"system-ui",padding:"2rem"}})}function dR(e){return _("div",{children:"Loading…",style:{fontFamily:"system-ui",padding:"2rem"}})}function uHe(e){let t=e.extensions,r=xt(am),n=xt(sm),i=Ck();return Ae(()=>{t.pages.length!==0&&ee(r,o=>o.register(t.pages)),t.panels.length!==0&&ee(n,o=>o.register(t.panels)),t.routes.length!==0&&ee(i,o=>o.register(t.routes,Iu()))},[]),null}function bw(e){let t=e.uiHints,r=e.config,n=cye(),i=uye(),o=ide(r),a=L(Bt,{children:[_(VPe,{}),_(xye,{}),_(jbe,{})]});return Ae(()=>{document.title=o},[o]),L(Bt,{children:[_(XKe,{config:r}),_(pPe,{config:r,uiHints:t}),_(uHe,{extensions:e.extensions}),_(G_e,{appName:o,logoUrl:r.logoUrl,router:n,headerSlot:a,fallback:_(wPe,{config:r,uiHints:t}),routesReady:i,loading:_(dR,{})})]})}function cHe(e){let t=e.discoverPlatforms,r=Fv(void 0),n=Mz(r);if(n===void 0)return t!==void 0?_(Nye,{discover:t}):_(Cq,{message:"config.json sets mode = fleet but the app supplied no discoverPlatforms adapter to ShellApp"});let i=n[0];return _(Lz.make,{scope:i,children:_(SV,{value:{prefix:kk(i),path:n[1]},children:_(bw,{config:e.config,extensions:e.extensions,uiHints:e.uiHints})})})}function tO(e){let t=e.access;return _(a_e,{access:t,children:_(e_e.make,{children:_(W_e.make,{access:t,children:_(lye.make,{children:_(sY.make,{children:_(a5.Provider.make,{children:_(JIe.make,{children:e.children})})})})})})})}function dHe(e){let t=e.uiHints,r=e.extensions,n=e.config,i=Sa(),o=n.mode,a;if(o==="Single"){let c=n.environment,d=n.platformName;a=c!==void 0&&d!==void 0?_(Lz.make,{scope:{environment:c,platformName:d},children:_(bw,{config:n,extensions:r,uiHints:t})}):_(bw,{config:n,extensions:r,uiHints:t})}else a=_(cHe,{config:n,extensions:r,uiHints:t,discoverPlatforms:e.discoverPlatforms});if(n.authMode==="Anonymous")return _(tO,{access:n.accessTiers,children:a});if(i===void 0)return _(C3,{});let l=i.identity;return l!==void 0&&i.isAuthenticated?_(tO,{access:l.groups.concat(n.accessTiers),children:a}):_(C3,{})}function fHe(e){let t=e.config,r=Sa();rG(t.assetOrigins);let n=Fv(void 0),i=t.mode,o;o=i==="Single"?void 0:q(Mz(n),p=>p[0]);let a=ne(o,"",p=>p.environment+"|"+p.platformName),s=It(()=>{let p=mde(t.apiEndpoint,t.platformApiEndpoint,()=>k(r,g=>g.getToken()),()=>ee(r,g=>g.logout())),m=o!==void 0?pde(Cye(o))(p):p;return[gde(m),m]},[t,r,a]),l=s[0],c=()=>k(r,p=>p.getToken()),d=Ne(l);d.current=l,uue.contents=l,Ae(()=>{let p={},m=g=>{let v=p[g];if(v!==void 0)return v;let b=iHe(()=>d.current,g);return p[g]=b,b};mOe(g=>m(g),void 0,void 0)},[]);let f=D(t.theme,"Light"),h=ne(k(r,p=>p.identity),"anonymous",p=>p.userId+"|"+p.groups.toSorted(kd).join(","));return _(hue.make,{execute:l,executeResult:s[1],children:_(TKe,{config:t,children:L(Uce.make,{domainEventsEndpoint:t.domainApiEventsEndpoint,platformEventsEndpoint:t.platformApiEventsEndpoint,liveUpdates:t.liveUpdates,liveReconnectRefetch:t.liveReconnectRefetch,clientEventsNamespace:t.clientEventsNamespace,onAuthFailure:()=>ee(r,p=>p.logout()),platformReadModelPrefixes:t.platformReadModelPrefixes,getToken:c,children:[_(HPe,{config:t,onChange:e.reloadUiHints}),_(wce.make,{initialPreset:f,children:_(dHe,{config:t,extensions:e.extensions,uiHints:e.uiHints,discoverPlatforms:e.discoverPlatforms})})]})})},h)}function hHe(e,t){let r=ce(()=>{}),n=r[1],i=r[0],o=Nr(()=>{lde(e.uiHintsUrl).then(s=>n(l=>s))},[e.uiHintsUrl]);return Ae(()=>{o()},[e.uiHintsUrl]),[It(()=>q(i,s=>Vue(s,D(t.uiHints,{}))),[i]),o]}function pHe(e){let t=e.extensions,r=e.config,n=hHe(r,t),i=n[0];return _(wbe.make,{authMode:r.authMode,apiEndpoint:r.apiEndpoint,cognitoClientId:r.identityProviderClientId,cognitoUserPoolId:r.identityProviderId,region:r.region,children:i!==void 0?_(fHe,{config:r,extensions:t,uiHints:i,reloadUiHints:n[1],discoverPlatforms:e.discoverPlatforms}):_(dR,{})})}function mHe(e){let t=e.registerModes,r=e.extensions,n=r!==void 0?r:lHe,i=ce(()=>"LoadingConfig"),o=i[1],a=i[0];return Ae(()=>{ude().then(s=>{if(s.TAG==="Ok"){let c=s._0;return t!==void 0?Mt(t(c).then(()=>o(d=>({TAG:"Ready",_0:c}))),d=>(console.error("[ShellApp] optional view modes failed to register — continuing without them: "+String(d)),o(f=>({TAG:"Ready",_0:c})),Promise.resolve())):(o(d=>({TAG:"Ready",_0:c})),Promise.resolve())}let l=s._0;return o(c=>({TAG:"Failed",_0:l})),Promise.resolve()})},[]),typeof a!="object"?_(dR,{}):a.TAG==="Ready"?_(pHe,{config:a._0,extensions:n,discoverPlatforms:e.discoverPlatforms}):_(Cq,{message:a._0})}let gHe={make:mHe},rO=document.querySelector("#root");rO!=null&&Yq(rO).render(_(gHe.make,{registerModes:cV}));export{Mt as $,kt as A,q as B,aEe as C,Fo as D,x as E,O as F,$ as G,RHe as H,G as I,Li as J,Ee as K,zi as L,Sr as M,Ble as N,uue as O,c2 as P,Ud as Q,Y as R,Gk as S,lEe as T,OHe as a,F as b,Zwe as c,nt as d,Q as e,ee as f,D as g,pt as h,Io as i,Xle as j,Yu as k,Dr as l,ie as m,k as n,L9 as o,Hs as p,Et as q,xa as r,Vk as s,dc as t,ne as u,_f as v,im as w,Oe as x,vce as y,Nt as z};
|