function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["./index-5u5REPT4.js","./serialization-DJC7NP0N.js","./Arrow.dom-GBJpMYQS.js","./CoreChatbotLoader-DJCIpDIF.js","./CoreChatbotLoader-BbtHS_O3.css","./CoreDataframe-B89Ng0p8.js","./CoreDataframe-DQFJ3VPU.css","./ComponentRenderer-BW0gEjYv.js","./instancePath-BsbOTTI8.js","./ComponentRenderer-BsWKHkf0.css","./BuilderApp-i1W1UlVq.js","./marked.esm-273vDTCT.js","./BuilderApp-CpqvHm87.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();const kg="modulepreload",Sg=function(e,t){return new URL(e,t).href},ru={},on=function(t,n,a){let o=Promise.resolve();if(n&&n.length>0){const r=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.all(n.map(c=>{if(c=Sg(c,a),c in ru)return;ru[c]=!0;const d=c.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(!!a)for(let k=r.length-1;k>=0;k--){const S=r[k];if(S.href===c&&(!d||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${h}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":kg,d||(m.as="script",m.crossOrigin=""),m.href=c,l&&m.setAttribute("nonce",l),document.head.appendChild(m),d)return new Promise((k,S)=>{m.addEventListener("load",k),m.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${c}`)))})}))}return o.then(()=>t()).catch(r=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=r,window.dispatchEvent(s),!s.defaultPrevented)throw r})};/**
* @vue/shared v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function ws(e,t){const n=new Set(e.split(","));return t?a=>n.has(a.toLowerCase()):a=>n.has(a)}const bt={},po=[],hn=()=>{},Tg=()=>!1,hr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),fl=e=>e.startsWith("onUpdate:"),Nt=Object.assign,pl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Eg=Object.prototype.hasOwnProperty,pt=(e,t)=>Eg.call(e,t),Ue=Array.isArray,ho=e=>To(e)==="[object Map]",Ya=e=>To(e)==="[object Set]",su=e=>To(e)==="[object Date]",$g=e=>To(e)==="[object RegExp]",Qe=e=>typeof e=="function",Ot=e=>typeof e=="string",ga=e=>typeof e=="symbol",xt=e=>e!==null&&typeof e=="object",hl=e=>(xt(e)||Qe(e))&&Qe(e.then)&&Qe(e.catch),Id=Object.prototype.toString,To=e=>Id.call(e),Mg=e=>To(e).slice(8,-1),xd=e=>To(e)==="[object Object]",vl=e=>Ot(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,vo=ws(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Is=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ng=/-(\w)/g,cn=Is(e=>e.replace(Ng,(t,n)=>n?n.toUpperCase():"")),Og=/\B([A-Z])/g,wn=Is(e=>e.replace(Og,"-$1").toLowerCase()),vr=Is(e=>e.charAt(0).toUpperCase()+e.slice(1)),Xo=Is(e=>e?`on${vr(e)}`:""),Rn=(e,t)=>!Object.is(e,t),mo=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},us=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},rr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ds=e=>{const t=Ot(e)?Number(e):NaN;return isNaN(t)?e:t};let iu;const kd=()=>iu||(iu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Pg="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error",Lg=ws(Pg);function it(e){if(Ue(e)){const t={};for(let n=0;n<e.length;n++){const a=e[n],o=Ot(a)?Fg(a):it(a);if(o)for(const r in o)t[r]=o[r]}return t}else if(Ot(e)||xt(e))return e}const Rg=/;(?![^(]*\))/g,Dg=/:([^]+)/,Bg=/\/\*[^]*?\*\//g;function Fg(e){const t={};return e.replace(Bg,"").split(Rg).forEach(n=>{if(n){const a=n.split(Dg);a.length>1&&(t[a[0].trim()]=a[1].trim())}}),t}function st(e){let t="";if(Ot(e))t=e;else if(Ue(e))for(let n=0;n<e.length;n++){const a=st(e[n]);a&&(t+=a+" ")}else if(xt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Vg(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Ot(t)&&(e.class=st(t)),n&&(e.style=it(n)),e}const Ug="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Hg=ws(Ug);function Sd(e){return!!e||e===""}function jg(e,t){if(e.length!==t.length)return!1;let n=!0;for(let a=0;n&&a<e.length;a++)n=ya(e[a],t[a]);return n}function ya(e,t){if(e===t)return!0;let n=su(e),a=su(t);if(n||a)return n&&a?e.getTime()===t.getTime():!1;if(n=ga(e),a=ga(t),n||a)return e===t;if(n=Ue(e),a=Ue(t),n||a)return n&&a?jg(e,t):!1;if(n=xt(e),a=xt(t),n||a){if(!n||!a)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const s in e){const l=e.hasOwnProperty(s),c=t.hasOwnProperty(s);if(l&&!c||!l&&c||!ya(e[s],t[s]))return!1}}return String(e)===String(t)}function xs(e,t){return e.findIndex(n=>ya(n,t))}const be=e=>Ot(e)?e:e==null?"":Ue(e)||xt(e)&&(e.toString===Id||!Qe(e.toString))?JSON.stringify(e,Td,2):String(e),Td=(e,t)=>t&&t.__v_isRef?Td(e,t.value):ho(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[a,o],r)=>(n[Ii(a,r)+" =>"]=o,n),{})}:Ya(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ii(n))}:ga(t)?Ii(t):xt(t)&&!Ue(t)&&!xd(t)?String(t):t,Ii=(e,t="")=>{var n;return ga(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let An;class ml{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=An,!t&&An&&(this.index=(An.scopes||(An.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=An;try{return An=this,t()}finally{An=n}}}on(){An=this}off(){An=this.parent}stop(t){if(this._active){let n,a;for(n=0,a=this.effects.length;n<a;n++)this.effects[n].stop();for(n=0,a=this.cleanups.length;n<a;n++)this.cleanups[n]();if(this.scopes)for(n=0,a=this.scopes.length;n<a;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0,this._active=!1}}}function zg(e){return new ml(e)}function Ed(e,t=An){t&&t.active&&t.effects.push(e)}function $d(){return An}function Kg(e){An&&An.cleanups.push(e)}let Ba;class Ao{constructor(t,n,a,o){this.fn=t,this.trigger=n,this.scheduler=a,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,Ed(this,o)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,Ja();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(Wg(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Qa()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=ma,n=Ba;try{return ma=!0,Ba=this,this._runnings++,lu(this),this.fn()}finally{cu(this),this._runnings--,Ba=n,ma=t}}stop(){var t;this.active&&(lu(this),cu(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function Wg(e){return e.value}function lu(e){e._trackId++,e._depsLength=0}function cu(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Md(e.deps[t],e);e.deps.length=e._depsLength}}function Md(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}function Gg(e,t){e.effect instanceof Ao&&(e=e.effect.fn);const n=new Ao(e,hn,()=>{n.dirty&&n.run()});t&&(Nt(n,t),t.scope&&Ed(n,t.scope)),(!t||!t.lazy)&&n.run();const a=n.run.bind(n);return a.effect=n,a}function Yg(e){e.effect.stop()}let ma=!0,Hi=0;const Nd=[];function Ja(){Nd.push(ma),ma=!1}function Qa(){const e=Nd.pop();ma=e===void 0?!0:e}function gl(){Hi++}function yl(){for(Hi--;!Hi&&ji.length;)ji.shift()()}function Od(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const a=e.deps[e._depsLength];a!==t?(a&&Md(a,e),e.deps[e._depsLength++]=t):e._depsLength++}}const ji=[];function Pd(e,t,n){gl();for(const a of e.keys()){let o;a._dirtyLevel<t&&(o??(o=e.get(a)===a._trackId))&&(a._shouldSchedule||(a._shouldSchedule=a._dirtyLevel===0),a._dirtyLevel=t),a._shouldSchedule&&(o??(o=e.get(a)===a._trackId))&&(a.trigger(),(!a._runnings||a.allowRecurse)&&a._dirtyLevel!==2&&(a._shouldSchedule=!1,a.scheduler&&ji.push(a.scheduler)))}yl()}const Ld=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},fs=new WeakMap,Fa=Symbol(""),zi=Symbol("");function gn(e,t,n){if(ma&&Ba){let a=fs.get(e);a||fs.set(e,a=new Map);let o=a.get(n);o||a.set(n,o=Ld(()=>a.delete(n))),Od(Ba,o)}}function Zn(e,t,n,a,o,r){const s=fs.get(e);if(!s)return;let l=[];if(t==="clear")l=[...s.values()];else if(n==="length"&&Ue(e)){const c=Number(a);s.forEach((d,h)=>{(h==="length"||!ga(h)&&h>=c)&&l.push(d)})}else switch(n!==void 0&&l.push(s.get(n)),t){case"add":Ue(e)?vl(n)&&l.push(s.get("length")):(l.push(s.get(Fa)),ho(e)&&l.push(s.get(zi)));break;case"delete":Ue(e)||(l.push(s.get(Fa)),ho(e)&&l.push(s.get(zi)));break;case"set":ho(e)&&l.push(s.get(Fa));break}gl();for(const c of l)c&&Pd(c,4);yl()}function Jg(e,t){var n;return(n=fs.get(e))==null?void 0:n.get(t)}const Qg=ws("__proto__,__v_isRef,__isVue"),Rd=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ga)),uu=qg();function qg(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const a=ut(this);for(let r=0,s=this.length;r<s;r++)gn(a,"get",r+"");const o=a[t](...n);return o===-1||o===!1?a[t](...n.map(ut)):o}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Ja(),gl();const a=ut(this)[t].apply(this,n);return yl(),Qa(),a}}),e}function Xg(e){const t=ut(this);return gn(t,"has",e),t.hasOwnProperty(e)}class Dd{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,a){const o=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return r;if(n==="__v_raw")return a===(o?r?jd:Hd:r?Ud:Vd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(a)?t:void 0;const s=Ue(t);if(!o){if(s&&pt(uu,n))return Reflect.get(uu,n,a);if(n==="hasOwnProperty")return Xg}const l=Reflect.get(t,n,a);return(ga(n)?Rd.has(n):Qg(n))||(o||gn(t,"get",n),r)?l:Qt(l)?s&&vl(n)?l:l.value:xt(l)?o?On(l):Ts(l):l}}class Bd extends Dd{constructor(t=!1){super(!1,t)}set(t,n,a,o){let r=t[n];if(!this._isShallow){const c=ja(r);if(!sr(a)&&!ja(a)&&(r=ut(r),a=ut(a)),!Ue(t)&&Qt(r)&&!Qt(a))return c?!1:(r.value=a,!0)}const s=Ue(t)&&vl(n)?Number(n)<t.length:pt(t,n),l=Reflect.set(t,n,a,o);return t===ut(o)&&(s?Rn(a,r)&&Zn(t,"set",n,a):Zn(t,"add",n,a)),l}deleteProperty(t,n){const a=pt(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&a&&Zn(t,"delete",n,void 0),o}has(t,n){const a=Reflect.has(t,n);return(!ga(n)||!Rd.has(n))&&gn(t,"has",n),a}ownKeys(t){return gn(t,"iterate",Ue(t)?"length":Fa),Reflect.ownKeys(t)}}class Fd extends Dd{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Zg=new Bd,ey=new Fd,ty=new Bd(!0),ny=new Fd(!0),_l=e=>e,ks=e=>Reflect.getPrototypeOf(e);function Ur(e,t,n=!1,a=!1){e=e.__v_raw;const o=ut(e),r=ut(t);n||(Rn(t,r)&&gn(o,"get",t),gn(o,"get",r));const{has:s}=ks(o),l=a?_l:n?Cl:ir;if(s.call(o,t))return l(e.get(t));if(s.call(o,r))return l(e.get(r));e!==o&&e.get(t)}function Hr(e,t=!1){const n=this.__v_raw,a=ut(n),o=ut(e);return t||(Rn(e,o)&&gn(a,"has",e),gn(a,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function jr(e,t=!1){return e=e.__v_raw,!t&&gn(ut(e),"iterate",Fa),Reflect.get(e,"size",e)}function du(e){e=ut(e);const t=ut(this);return ks(t).has.call(t,e)||(t.add(e),Zn(t,"add",e,e)),this}function fu(e,t){t=ut(t);const n=ut(this),{has:a,get:o}=ks(n);let r=a.call(n,e);r||(e=ut(e),r=a.call(n,e));const s=o.call(n,e);return n.set(e,t),r?Rn(t,s)&&Zn(n,"set",e,t):Zn(n,"add",e,t),this}function pu(e){const t=ut(this),{has:n,get:a}=ks(t);let o=n.call(t,e);o||(e=ut(e),o=n.call(t,e)),a&&a.call(t,e);const r=t.delete(e);return o&&Zn(t,"delete",e,void 0),r}function hu(){const e=ut(this),t=e.size!==0,n=e.clear();return t&&Zn(e,"clear",void 0,void 0),n}function zr(e,t){return function(a,o){const r=this,s=r.__v_raw,l=ut(s),c=t?_l:e?Cl:ir;return!e&&gn(l,"iterate",Fa),s.forEach((d,h)=>a.call(o,c(d),c(h),r))}}function Kr(e,t,n){return function(...a){const o=this.__v_raw,r=ut(o),s=ho(r),l=e==="entries"||e===Symbol.iterator&&s,c=e==="keys"&&s,d=o[e](...a),h=n?_l:t?Cl:ir;return!t&&gn(r,"iterate",c?zi:Fa),{next(){const{value:f,done:m}=d.next();return m?{value:f,done:m}:{value:l?[h(f[0]),h(f[1])]:h(f),done:m}},[Symbol.iterator](){return this}}}}function la(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ay(){const e={get(r){return Ur(this,r)},get size(){return jr(this)},has:Hr,add:du,set:fu,delete:pu,clear:hu,forEach:zr(!1,!1)},t={get(r){return Ur(this,r,!1,!0)},get size(){return jr(this)},has:Hr,add:du,set:fu,delete:pu,clear:hu,forEach:zr(!1,!0)},n={get(r){return Ur(this,r,!0)},get size(){return jr(this,!0)},has(r){return Hr.call(this,r,!0)},add:la("add"),set:la("set"),delete:la("delete"),clear:la("clear"),forEach:zr(!0,!1)},a={get(r){return Ur(this,r,!0,!0)},get size(){return jr(this,!0)},has(r){return Hr.call(this,r,!0)},add:la("add"),set:la("set"),delete:la("delete"),clear:la("clear"),forEach:zr(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{e[r]=Kr(r,!1,!1),n[r]=Kr(r,!0,!1),t[r]=Kr(r,!1,!0),a[r]=Kr(r,!0,!0)}),[e,n,t,a]}const[oy,ry,sy,iy]=ay();function Ss(e,t){const n=t?e?iy:sy:e?ry:oy;return(a,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?a:Reflect.get(pt(n,o)&&o in a?n:a,o,r)}const ly={get:Ss(!1,!1)},cy={get:Ss(!1,!0)},uy={get:Ss(!0,!1)},dy={get:Ss(!0,!0)},Vd=new WeakMap,Ud=new WeakMap,Hd=new WeakMap,jd=new WeakMap;function fy(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function py(e){return e.__v_skip||!Object.isExtensible(e)?0:fy(Mg(e))}function Ts(e){return ja(e)?e:Es(e,!1,Zg,ly,Vd)}function zd(e){return Es(e,!1,ty,cy,Ud)}function On(e){return Es(e,!0,ey,uy,Hd)}function hy(e){return Es(e,!0,ny,dy,jd)}function Es(e,t,n,a,o){if(!xt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=o.get(e);if(r)return r;const s=py(e);if(s===0)return e;const l=new Proxy(e,s===2?a:n);return o.set(e,l),l}function Va(e){return ja(e)?Va(e.__v_raw):!!(e&&e.__v_isReactive)}function ja(e){return!!(e&&e.__v_isReadonly)}function sr(e){return!!(e&&e.__v_isShallow)}function bl(e){return Va(e)||ja(e)}function ut(e){const t=e&&e.__v_raw;return t?ut(t):e}function Al(e){return Object.isExtensible(e)&&us(e,"__v_skip",!0),e}const ir=e=>xt(e)?Ts(e):e,Cl=e=>xt(e)?On(e):e;class Kd{constructor(t,n,a,o){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Ao(()=>t(this._value),()=>go(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=a}get value(){const t=ut(this);return(!t._cacheable||t.effect.dirty)&&Rn(t._value,t._value=t.effect.run())&&go(t,4),wl(t),t.effect._dirtyLevel>=2&&go(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function vy(e,t,n=!1){let a,o;const r=Qe(e);return r?(a=e,o=hn):(a=e.get,o=e.set),new Kd(a,o,r||!o,n)}function wl(e){var t;ma&&Ba&&(e=ut(e),Od(Ba,(t=e.dep)!=null?t:e.dep=Ld(()=>e.dep=void 0,e instanceof Kd?e:void 0)))}function go(e,t=4,n){e=ut(e);const a=e.dep;a&&Pd(a,t)}function Qt(e){return!!(e&&e.__v_isRef===!0)}function q(e){return Wd(e,!1)}function Il(e){return Wd(e,!0)}function Wd(e,t){return Qt(e)?e:new my(e,t)}class my{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:ut(t),this._value=n?t:ir(t)}get value(){return wl(this),this._value}set value(t){const n=this.__v_isShallow||sr(t)||ja(t);t=n?t:ut(t),Rn(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:ir(t),go(this,4))}}function gy(e){go(e,4)}function T(e){return Qt(e)?e.value:e}function yy(e){return Qe(e)?e():T(e)}const _y={get:(e,t,n)=>T(Reflect.get(e,t,n)),set:(e,t,n,a)=>{const o=e[t];return Qt(o)&&!Qt(n)?(o.value=n,!0):Reflect.set(e,t,n,a)}};function xl(e){return Va(e)?e:new Proxy(e,_y)}class by{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:a}=t(()=>wl(this),()=>go(this));this._get=n,this._set=a}get value(){return this._get()}set value(t){this._set(t)}}function Gd(e){return new by(e)}function kl(e){const t=Ue(e)?new Array(e.length):{};for(const n in e)t[n]=Yd(e,n);return t}class Ay{constructor(t,n,a){this._object=t,this._key=n,this._defaultValue=a,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Jg(ut(this._object),this._key)}}class Cy{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Co(e,t,n){return Qt(e)?e:Qe(e)?new Cy(e):xt(e)&&arguments.length>1?Yd(e,t,n):q(e)}function Yd(e,t,n){const a=e[t];return Qt(a)?a:new Ay(e,t,n)}const wy={GET:"get",HAS:"has",ITERATE:"iterate"},Iy={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};/**
* @vue/runtime-core v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function xy(e,t){}const ky={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},Sy={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function ea(e,t,n,a){try{return a?e(...a):e()}catch(o){qa(o,t,n)}}function In(e,t,n,a){if(Qe(e)){const r=ea(e,t,n,a);return r&&hl(r)&&r.catch(s=>{qa(s,t,n)}),r}const o=[];for(let r=0;r<e.length;r++)o.push(In(e[r],t,n,a));return o}function qa(e,t,n,a=!0){const o=t?t.vnode:null;if(t){let r=t.parent;const s=t.proxy,l=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){const d=r.ec;if(d){for(let h=0;h<d.length;h++)if(d[h](e,s,l)===!1)return}r=r.parent}const c=t.appContext.config.errorHandler;if(c){ea(c,null,10,[e,s,l]);return}}Ty(e,n,o,a)}function Ty(e,t,n,a=!0){console.error(e)}let lr=!1,Ki=!1;const an=[];let Un=0;const yo=[];let fa=null,La=0;const Jd=Promise.resolve();let Sl=null;function mn(e){const t=Sl||Jd;return e?t.then(this?e.bind(this):e):t}function Ey(e){let t=Un+1,n=an.length;for(;t<n;){const a=t+n>>>1,o=an[a],r=cr(o);r<e||r===e&&o.pre?t=a+1:n=a}return t}function $s(e){(!an.length||!an.includes(e,lr&&e.allowRecurse?Un+1:Un))&&(e.id==null?an.push(e):an.splice(Ey(e.id),0,e),Qd())}function Qd(){!lr&&!Ki&&(Ki=!0,Sl=Jd.then(qd))}function $y(e){const t=an.indexOf(e);t>Un&&an.splice(t,1)}function ps(e){Ue(e)?yo.push(...e):(!fa||!fa.includes(e,e.allowRecurse?La+1:La))&&yo.push(e),Qd()}function vu(e,t,n=lr?Un+1:0){for(;n<an.length;n++){const a=an[n];if(a&&a.pre){if(e&&a.id!==e.uid)continue;an.splice(n,1),n--,a()}}}function hs(e){if(yo.length){const t=[...new Set(yo)].sort((n,a)=>cr(n)-cr(a));if(yo.length=0,fa){fa.push(...t);return}for(fa=t,La=0;La<fa.length;La++)fa[La]();fa=null,La=0}}const cr=e=>e.id==null?1/0:e.id,My=(e,t)=>{const n=cr(e)-cr(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function qd(e){Ki=!1,lr=!0,an.sort(My);try{for(Un=0;Un<an.length;Un++){const t=an[Un];t&&t.active!==!1&&ea(t,null,14)}}finally{Un=0,an.length=0,hs(),lr=!1,Sl=null,(an.length||yo.length)&&qd()}}let uo,Wr=[];function Xd(e,t){var n,a;uo=e,uo?(uo.enabled=!0,Wr.forEach(({event:o,args:r})=>uo.emit(o,...r)),Wr=[]):typeof window<"u"&&window.HTMLElement&&!((a=(n=window.navigator)==null?void 0:n.userAgent)!=null&&a.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{Xd(r,t)}),setTimeout(()=>{uo||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Wr=[])},3e3)):Wr=[]}function Ny(e,t,...n){if(e.isUnmounted)return;const a=e.vnode.props||bt;let o=n;const r=t.startsWith("update:"),s=r&&t.slice(7);if(s&&s in a){const h=`${s==="modelValue"?"model":s}Modifiers`,{number:f,trim:m}=a[h]||bt;m&&(o=n.map(k=>Ot(k)?k.trim():k)),f&&(o=n.map(rr))}let l,c=a[l=Xo(t)]||a[l=Xo(cn(t))];!c&&r&&(c=a[l=Xo(wn(t))]),c&&In(c,e,6,o);const d=a[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,In(d,e,6,o)}}function Zd(e,t,n=!1){const a=t.emitsCache,o=a.get(e);if(o!==void 0)return o;const r=e.emits;let s={},l=!1;if(!Qe(e)){const c=d=>{const h=Zd(d,t,!0);h&&(l=!0,Nt(s,h))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!l?(xt(e)&&a.set(e,null),null):(Ue(r)?r.forEach(c=>s[c]=null):Nt(s,r),xt(e)&&a.set(e,s),s)}function Ms(e,t){return!e||!hr(t)?!1:(t=t.slice(2).replace(/Once$/,""),pt(e,t[0].toLowerCase()+t.slice(1))||pt(e,wn(t))||pt(e,t))}let Dt=null,Ns=null;function ur(e){const t=Dt;return Dt=e,Ns=e&&e.type.__scopeId||null,t}function zt(e){Ns=e}function Kt(){Ns=null}const Oy=e=>Ge;function Ge(e,t=Dt,n){if(!t||e._n)return e;const a=(...o)=>{a._d&&el(-1);const r=ur(t);let s;try{s=e(...o)}finally{ur(r),a._d&&el(1)}return s};return a._n=!0,a._c=!0,a._d=!0,a}function ss(e){const{type:t,vnode:n,proxy:a,withProxy:o,props:r,propsOptions:[s],slots:l,attrs:c,emit:d,render:h,renderCache:f,data:m,setupState:k,ctx:S,inheritAttrs:y}=e;let b,O;const I=ur(e);try{if(n.shapeFlag&4){const p=o||a,A=p;b=Cn(h.call(A,p,f,r,k,m,S)),O=c}else{const p=t;b=Cn(p.length>1?p(r,{attrs:c,slots:l,emit:d}):p(r,null)),O=t.props?c:Ly(c)}}catch(p){tr.length=0,qa(p,e,1),b=je(rn)}let g=b;if(O&&y!==!1){const p=Object.keys(O),{shapeFlag:A}=g;p.length&&A&7&&(s&&p.some(fl)&&(O=Ry(O,s)),g=jn(g,O))}return n.dirs&&(g=jn(g),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&(g.transition=n.transition),b=g,ur(I),b}function Py(e,t=!0){let n;for(let a=0;a<e.length;a++){const o=e[a];if(_a(o)){if(o.type!==rn||o.children==="v-if"){if(n)return;n=o}}else return}return n}const Ly=e=>{let t;for(const n in e)(n==="class"||n==="style"||hr(n))&&((t||(t={}))[n]=e[n]);return t},Ry=(e,t)=>{const n={};for(const a in e)(!fl(a)||!(a.slice(9)in t))&&(n[a]=e[a]);return n};function Dy(e,t,n){const{props:a,children:o,component:r}=e,{props:s,children:l,patchFlag:c}=t,d=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return a?mu(a,s,d):!!s;if(c&8){const h=t.dynamicProps;for(let f=0;f<h.length;f++){const m=h[f];if(s[m]!==a[m]&&!Ms(d,m))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:a===s?!1:a?s?mu(a,s,d):!0:!!s;return!1}function mu(e,t,n){const a=Object.keys(t);if(a.length!==Object.keys(e).length)return!0;for(let o=0;o<a.length;o++){const r=a[o];if(t[r]!==e[r]&&!Ms(n,r))return!0}return!1}function Tl({vnode:e,parent:t},n){for(;t;){const a=t.subTree;if(a.suspense&&a.suspense.activeBranch===e&&(a.el=e.el),a===e)(e=t.vnode).el=n,t=t.parent;else break}}const El="components",By="directives";function Fy(e,t){return $l(El,e,!0,t)||e}const ef=Symbol.for("v-ndc");function mr(e){return Ot(e)?$l(El,e,!1)||e:e||ef}function tf(e){return $l(By,e)}function $l(e,t,n=!0,a=!1){const o=Dt||jt;if(o){const r=o.type;if(e===El){const l=rl(r,!1);if(l&&(l===t||l===cn(t)||l===vr(cn(t))))return r}const s=gu(o[e]||r[e],t)||gu(o.appContext[e],t);return!s&&a?r:s}}function gu(e,t){return e&&(e[t]||e[cn(t)]||e[vr(cn(t))])}const nf=e=>e.__isSuspense;let Wi=0;const Vy={name:"Suspense",__isSuspense:!0,process(e,t,n,a,o,r,s,l,c,d){if(e==null)Hy(t,n,a,o,r,s,l,c,d);else{if(r&&r.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}jy(e,t,n,a,o,s,l,c,d)}},hydrate:zy,create:Ml,normalize:Ky},Uy=Vy;function dr(e,t){const n=e.props&&e.props[t];Qe(n)&&n()}function Hy(e,t,n,a,o,r,s,l,c){const{p:d,o:{createElement:h}}=c,f=h("div"),m=e.suspense=Ml(e,o,a,t,f,n,r,s,l,c);d(null,m.pendingBranch=e.ssContent,f,null,a,m,r,s),m.deps>0?(dr(e,"onPending"),dr(e,"onFallback"),d(null,e.ssFallback,t,n,a,null,r,s),_o(m,e.ssFallback)):m.resolve(!1,!0)}function jy(e,t,n,a,o,r,s,l,{p:c,um:d,o:{createElement:h}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const m=t.ssContent,k=t.ssFallback,{activeBranch:S,pendingBranch:y,isInFallback:b,isHydrating:O}=f;if(y)f.pendingBranch=m,Ln(m,y)?(c(y,m,f.hiddenContainer,null,o,f,r,s,l),f.deps<=0?f.resolve():b&&(O||(c(S,k,n,a,o,null,r,s,l),_o(f,k)))):(f.pendingId=Wi++,O?(f.isHydrating=!1,f.activeBranch=y):d(y,o,f),f.deps=0,f.effects.length=0,f.hiddenContainer=h("div"),b?(c(null,m,f.hiddenContainer,null,o,f,r,s,l),f.deps<=0?f.resolve():(c(S,k,n,a,o,null,r,s,l),_o(f,k))):S&&Ln(m,S)?(c(S,m,n,a,o,f,r,s,l),f.resolve(!0)):(c(null,m,f.hiddenContainer,null,o,f,r,s,l),f.deps<=0&&f.resolve()));else if(S&&Ln(m,S))c(S,m,n,a,o,f,r,s,l),_o(f,m);else if(dr(t,"onPending"),f.pendingBranch=m,m.shapeFlag&512?f.pendingId=m.component.suspenseId:f.pendingId=Wi++,c(null,m,f.hiddenContainer,null,o,f,r,s,l),f.deps<=0)f.resolve();else{const{timeout:I,pendingId:g}=f;I>0?setTimeout(()=>{f.pendingId===g&&f.fallback(k)},I):I===0&&f.fallback(k)}}function Ml(e,t,n,a,o,r,s,l,c,d,h=!1){const{p:f,m,um:k,n:S,o:{parentNode:y,remove:b}}=d;let O;const I=Wy(e);I&&t!=null&&t.pendingBranch&&(O=t.pendingId,t.deps++);const g=e.props?ds(e.props.timeout):void 0,p=r,A={vnode:e,parent:t,parentComponent:n,namespace:s,container:a,hiddenContainer:o,deps:0,pendingId:Wi++,timeout:typeof g=="number"?g:-1,activeBranch:null,pendingBranch:null,isInFallback:!h,isHydrating:h,isUnmounted:!1,effects:[],resolve(w=!1,V=!1){const{vnode:j,activeBranch:ee,pendingBranch:se,pendingId:le,effects:ae,parentComponent:ue,container:Ce}=A;let Re=!1;A.isHydrating?A.isHydrating=!1:w||(Re=ee&&se.transition&&se.transition.mode==="out-in",Re&&(ee.transition.afterLeave=()=>{le===A.pendingId&&(m(se,Ce,r===p?S(ee):r,0),ps(ae))}),ee&&(y(ee.el)!==A.hiddenContainer&&(r=S(ee)),k(ee,ue,A,!0)),Re||m(se,Ce,r,0)),_o(A,se),A.pendingBranch=null,A.isInFallback=!1;let pe=A.parent,he=!1;for(;pe;){if(pe.pendingBranch){pe.effects.push(...ae),he=!0;break}pe=pe.parent}!he&&!Re&&ps(ae),A.effects=[],I&&t&&t.pendingBranch&&O===t.pendingId&&(t.deps--,t.deps===0&&!V&&t.resolve()),dr(j,"onResolve")},fallback(w){if(!A.pendingBranch)return;const{vnode:V,activeBranch:j,parentComponent:ee,container:se,namespace:le}=A;dr(V,"onFallback");const ae=S(j),ue=()=>{A.isInFallback&&(f(null,w,se,ae,ee,null,le,l,c),_o(A,w))},Ce=w.transition&&w.transition.mode==="out-in";Ce&&(j.transition.afterLeave=ue),A.isInFallback=!0,k(j,ee,null,!0),Ce||ue()},move(w,V,j){A.activeBranch&&m(A.activeBranch,w,V,j),A.container=w},next(){return A.activeBranch&&S(A.activeBranch)},registerDep(w,V){const j=!!A.pendingBranch;j&&A.deps++;const ee=w.vnode.el;w.asyncDep.catch(se=>{qa(se,w,0)}).then(se=>{if(w.isUnmounted||A.isUnmounted||A.pendingId!==w.suspenseId)return;w.asyncResolved=!0;const{vnode:le}=w;al(w,se,!1),ee&&(le.el=ee);const ae=!ee&&w.subTree.el;V(w,le,y(ee||w.subTree.el),ee?null:S(w.subTree),A,s,c),ae&&b(ae),Tl(w,le.el),j&&--A.deps===0&&A.resolve()})},unmount(w,V){A.isUnmounted=!0,A.activeBranch&&k(A.activeBranch,n,w,V),A.pendingBranch&&k(A.pendingBranch,n,w,V)}};return A}function zy(e,t,n,a,o,r,s,l,c){const d=t.suspense=Ml(t,a,n,e.parentNode,document.createElement("div"),null,o,r,s,l,!0),h=c(e,d.pendingBranch=t.ssContent,n,d,r,s);return d.deps===0&&d.resolve(!1,!0),h}function Ky(e){const{shapeFlag:t,children:n}=e,a=t&32;e.ssContent=yu(a?n.default:n),e.ssFallback=a?yu(n.fallback):je(rn)}function yu(e){let t;if(Qe(e)){const n=Wa&&e._c;n&&(e._d=!1,C()),e=e(),n&&(e._d=!0,t=vn,Rf())}return Ue(e)&&(e=Py(e)),e=Cn(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function af(e,t){t&&t.pendingBranch?Ue(e)?t.effects.push(...e):t.effects.push(e):ps(e)}function _o(e,t){e.activeBranch=t;const{vnode:n,parentComponent:a}=e;let o=t.el;for(;!o&&t.component;)t=t.component.subTree,o=t.el;n.el=o,a&&a.subTree===n&&(a.vnode.el=o,Tl(a,o))}function Wy(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const of=Symbol.for("v-scx"),rf=()=>W(of);function Gy(e,t){return gr(e,null,t)}function sf(e,t){return gr(e,null,{flush:"post"})}function lf(e,t){return gr(e,null,{flush:"sync"})}const Gr={};function He(e,t,n){return gr(e,t,n)}function gr(e,t,{immediate:n,deep:a,flush:o,once:r,onTrack:s,onTrigger:l}=bt){if(t&&r){const w=t;t=(...V)=>{w(...V),A()}}const c=jt,d=w=>a===!0?w:Da(w,a===!1?1:void 0);let h,f=!1,m=!1;if(Qt(e)?(h=()=>e.value,f=sr(e)):Va(e)?(h=()=>d(e),f=!0):Ue(e)?(m=!0,f=e.some(w=>Va(w)||sr(w)),h=()=>e.map(w=>{if(Qt(w))return w.value;if(Va(w))return d(w);if(Qe(w))return ea(w,c,2)})):Qe(e)?t?h=()=>ea(e,c,2):h=()=>(k&&k(),In(e,c,3,[S])):h=hn,t&&a){const w=h;h=()=>Da(w())}let k,S=w=>{k=g.onStop=()=>{ea(w,c,4),k=g.onStop=void 0}},y;if(_r)if(S=hn,t?n&&In(t,c,3,[h(),m?[]:void 0,S]):h(),o==="sync"){const w=rf();y=w.__watcherHandles||(w.__watcherHandles=[])}else return hn;let b=m?new Array(e.length).fill(Gr):Gr;const O=()=>{if(!(!g.active||!g.dirty))if(t){const w=g.run();(a||f||(m?w.some((V,j)=>Rn(V,b[j])):Rn(w,b)))&&(k&&k(),In(t,c,3,[w,b===Gr?void 0:m&&b[0]===Gr?[]:b,S]),b=w)}else g.run()};O.allowRecurse=!!t;let I;o==="sync"?I=O:o==="post"?I=()=>en(O,c&&c.suspense):(O.pre=!0,c&&(O.id=c.uid),I=()=>$s(O));const g=new Ao(h,hn,I),p=$d(),A=()=>{g.stop(),p&&pl(p.effects,g)};return t?n?O():b=g.run():o==="post"?en(g.run.bind(g),c&&c.suspense):g.run(),y&&y.push(A),A}function Yy(e,t,n){const a=this.proxy,o=Ot(e)?e.includes(".")?cf(a,e):()=>a[e]:e.bind(a,a);let r;Qe(t)?r=t:(r=t.handler,n=t);const s=Ga(this),l=gr(o,r.bind(a),n);return s(),l}function cf(e,t){const n=t.split(".");return()=>{let a=e;for(let o=0;o<n.length&&a;o++)a=a[n[o]];return a}}function Da(e,t,n=0,a){if(!xt(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if(a=a||new Set,a.has(e))return e;if(a.add(e),Qt(e))Da(e.value,t,n,a);else if(Ue(e))for(let o=0;o<e.length;o++)Da(e[o],t,n,a);else if(Ya(e)||ho(e))e.forEach(o=>{Da(o,t,n,a)});else if(xd(e))for(const o in e)Da(e[o],t,n,a);return e}function Bt(e,t){if(Dt===null)return e;const n=Ds(Dt)||Dt.proxy,a=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,s,l,c=bt]=t[o];r&&(Qe(r)&&(r={mounted:r,updated:r}),r.deep&&Da(s),a.push({dir:r,instance:n,value:s,oldValue:void 0,arg:l,modifiers:c}))}return e}function Vn(e,t,n,a){const o=e.dirs,r=t&&t.dirs;for(let s=0;s<o.length;s++){const l=o[s];r&&(l.oldValue=r[s].value);let c=l.dir[a];c&&(Ja(),In(c,n,8,[e.el,l,e,t]),Qa())}}const pa=Symbol("_leaveCb"),Yr=Symbol("_enterCb");function Nl(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ft(()=>{e.isMounted=!0}),Xa(()=>{e.isUnmounting=!0}),e}const kn=[Function,Array],Ol={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:kn,onEnter:kn,onAfterEnter:kn,onEnterCancelled:kn,onBeforeLeave:kn,onLeave:kn,onAfterLeave:kn,onLeaveCancelled:kn,onBeforeAppear:kn,onAppear:kn,onAfterAppear:kn,onAppearCancelled:kn},Jy={name:"BaseTransition",props:Ol,setup(e,{slots:t}){const n=na(),a=Nl();return()=>{const o=t.default&&Os(t.default(),!0);if(!o||!o.length)return;let r=o[0];if(o.length>1){for(const m of o)if(m.type!==rn){r=m;break}}const s=ut(e),{mode:l}=s;if(a.isLeaving)return xi(r);const c=_u(r);if(!c)return xi(r);const d=wo(c,s,a,n);za(c,d);const h=n.subTree,f=h&&_u(h);if(f&&f.type!==rn&&!Ln(c,f)){const m=wo(f,s,a,n);if(za(f,m),l==="out-in")return a.isLeaving=!0,m.afterLeave=()=>{a.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},xi(r);l==="in-out"&&c.type!==rn&&(m.delayLeave=(k,S,y)=>{const b=df(a,f);b[String(f.key)]=f,k[pa]=()=>{S(),k[pa]=void 0,delete d.delayedLeave},d.delayedLeave=y})}return r}}},uf=Jy;function df(e,t){const{leavingVNodes:n}=e;let a=n.get(t.type);return a||(a=Object.create(null),n.set(t.type,a)),a}function wo(e,t,n,a){const{appear:o,mode:r,persisted:s=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:d,onEnterCancelled:h,onBeforeLeave:f,onLeave:m,onAfterLeave:k,onLeaveCancelled:S,onBeforeAppear:y,onAppear:b,onAfterAppear:O,onAppearCancelled:I}=t,g=String(e.key),p=df(n,e),A=(j,ee)=>{j&&In(j,a,9,ee)},w=(j,ee)=>{const se=ee[1];A(j,ee),Ue(j)?j.every(le=>le.length<=1)&&se():j.length<=1&&se()},V={mode:r,persisted:s,beforeEnter(j){let ee=l;if(!n.isMounted)if(o)ee=y||l;else return;j[pa]&&j[pa](!0);const se=p[g];se&&Ln(e,se)&&se.el[pa]&&se.el[pa](),A(ee,[j])},enter(j){let ee=c,se=d,le=h;if(!n.isMounted)if(o)ee=b||c,se=O||d,le=I||h;else return;let ae=!1;const ue=j[Yr]=Ce=>{ae||(ae=!0,Ce?A(le,[j]):A(se,[j]),V.delayedLeave&&V.delayedLeave(),j[Yr]=void 0)};ee?w(ee,[j,ue]):ue()},leave(j,ee){const se=String(e.key);if(j[Yr]&&j[Yr](!0),n.isUnmounting)return ee();A(f,[j]);let le=!1;const ae=j[pa]=ue=>{le||(le=!0,ee(),ue?A(S,[j]):A(k,[j]),j[pa]=void 0,p[se]===e&&delete p[se])};p[se]=e,m?w(m,[j,ae]):ae()},clone(j){return wo(j,t,n,a)}};return V}function xi(e){if(yr(e))return e=jn(e),e.children=null,e}function _u(e){return yr(e)?e.children?e.children[0]:void 0:e}function za(e,t){e.shapeFlag&6&&e.component?za(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Os(e,t=!1,n){let a=[],o=0;for(let r=0;r<e.length;r++){let s=e[r];const l=n==null?s.key:String(n)+String(s.key!=null?s.key:r);s.type===Oe?(s.patchFlag&128&&o++,a=a.concat(Os(s.children,t,l))):(t||s.type!==rn)&&a.push(l!=null?jn(s,{key:l}):s)}if(o>1)for(let r=0;r<a.length;r++)a[r].patchFlag=-2;return a}/*! #__NO_SIDE_EFFECTS__ */function Ie(e,t){return Qe(e)?Nt({name:e.name},t,{setup:e}):e}const Ua=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Gi(e){Qe(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:a,delay:o=200,timeout:r,suspensible:s=!0,onError:l}=e;let c=null,d,h=0;const f=()=>(h++,c=null,m()),m=()=>{let k;return c||(k=c=t().catch(S=>{if(S=S instanceof Error?S:new Error(String(S)),l)return new Promise((y,b)=>{l(S,()=>y(f()),()=>b(S),h+1)});throw S}).then(S=>k!==c&&c?c:(S&&(S.__esModule||S[Symbol.toStringTag]==="Module")&&(S=S.default),d=S,S)))};return Ie({name:"AsyncComponentWrapper",__asyncLoader:m,get __asyncResolved(){return d},setup(){const k=jt;if(d)return()=>ki(d,k);const S=I=>{c=null,qa(I,k,13,!a)};if(s&&k.suspense||_r)return m().then(I=>()=>ki(I,k)).catch(I=>(S(I),()=>a?je(a,{error:I}):null));const y=q(!1),b=q(),O=q(!!o);return o&&setTimeout(()=>{O.value=!1},o),r!=null&&setTimeout(()=>{if(!y.value&&!b.value){const I=new Error(`Async component timed out after ${r}ms.`);S(I),b.value=I}},r),m().then(()=>{y.value=!0,k.parent&&yr(k.parent.vnode)&&(k.parent.effect.dirty=!0,$s(k.parent.update))}).catch(I=>{S(I),b.value=I}),()=>{if(y.value&&d)return ki(d,k);if(b.value&&a)return je(a,{error:b.value});if(n&&!O.value)return je(n)}}})}function ki(e,t){const{ref:n,props:a,children:o,ce:r}=t.vnode,s=je(e,a,o);return s.ref=n,s.ce=r,delete t.vnode.ce,s}const yr=e=>e.type.__isKeepAlive,Qy={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=na(),a=n.ctx;if(!a.renderer)return()=>{const I=t.default&&t.default();return I&&I.length===1?I[0]:I};const o=new Map,r=new Set;let s=null;const l=n.suspense,{renderer:{p:c,m:d,um:h,o:{createElement:f}}}=a,m=f("div");a.activate=(I,g,p,A,w)=>{const V=I.component;d(I,g,p,0,l),c(V.vnode,I,g,p,V,l,A,I.slotScopeIds,w),en(()=>{V.isDeactivated=!1,V.a&&mo(V.a);const j=I.props&&I.props.onVnodeMounted;j&&pn(j,V.parent,I)},l)},a.deactivate=I=>{const g=I.component;d(I,m,null,1,l),en(()=>{g.da&&mo(g.da);const p=I.props&&I.props.onVnodeUnmounted;p&&pn(p,g.parent,I),g.isDeactivated=!0},l)};function k(I){Si(I),h(I,n,l,!0)}function S(I){o.forEach((g,p)=>{const A=rl(g.type);A&&(!I||!I(A))&&y(p)})}function y(I){const g=o.get(I);!s||!Ln(g,s)?k(g):s&&Si(s),o.delete(I),r.delete(I)}He(()=>[e.include,e.exclude],([I,g])=>{I&&S(p=>Jo(I,p)),g&&S(p=>!Jo(g,p))},{flush:"post",deep:!0});let b=null;const O=()=>{b!=null&&o.set(b,Ti(n.subTree))};return Ft(O),Ls(O),Xa(()=>{o.forEach(I=>{const{subTree:g,suspense:p}=n,A=Ti(g);if(I.type===A.type&&I.key===A.key){Si(A);const w=A.component.da;w&&en(w,p);return}k(I)})}),()=>{if(b=null,!t.default)return null;const I=t.default(),g=I[0];if(I.length>1)return s=null,I;if(!_a(g)||!(g.shapeFlag&4)&&!(g.shapeFlag&128))return s=null,g;let p=Ti(g);const A=p.type,w=rl(Ua(p)?p.type.__asyncResolved||{}:A),{include:V,exclude:j,max:ee}=e;if(V&&(!w||!Jo(V,w))||j&&w&&Jo(j,w))return s=p,g;const se=p.key==null?A:p.key,le=o.get(se);return p.el&&(p=jn(p),g.shapeFlag&128&&(g.ssContent=p)),b=se,le?(p.el=le.el,p.component=le.component,p.transition&&za(p,p.transition),p.shapeFlag|=512,r.delete(se),r.add(se)):(r.add(se),ee&&r.size>parseInt(ee,10)&&y(r.values().next().value)),p.shapeFlag|=256,s=p,nf(g.type)?g:p}}},qy=Qy;function Jo(e,t){return Ue(e)?e.some(n=>Jo(n,t)):Ot(e)?e.split(",").includes(t):$g(e)?e.test(t):!1}function ff(e,t){hf(e,"a",t)}function pf(e,t){hf(e,"da",t)}function hf(e,t,n=jt){const a=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ps(t,a,n),n){let o=n.parent;for(;o&&o.parent;)yr(o.parent.vnode)&&Xy(a,t,n,o),o=o.parent}}function Xy(e,t,n,a){const o=Ps(t,e,a,!0);Bn(()=>{pl(a[t],o)},n)}function Si(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Ti(e){return e.shapeFlag&128?e.ssContent:e}function Ps(e,t,n=jt,a=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;Ja();const l=Ga(n),c=In(t,n,e,s);return l(),Qa(),c});return a?o.unshift(r):o.push(r),r}}const ta=e=>(t,n=jt)=>(!_r||e==="sp")&&Ps(e,(...a)=>t(...a),n),Eo=ta("bm"),Ft=ta("m"),vf=ta("bu"),Ls=ta("u"),Xa=ta("bum"),Bn=ta("um"),mf=ta("sp"),gf=ta("rtg"),yf=ta("rtc");function _f(e,t=jt){Ps("ec",e,t)}function mt(e,t,n,a){let o;const r=n&&n[a];if(Ue(e)||Ot(e)){o=new Array(e.length);for(let s=0,l=e.length;s<l;s++)o[s]=t(e[s],s,void 0,r&&r[s])}else if(typeof e=="number"){o=new Array(e);for(let s=0;s<e;s++)o[s]=t(s+1,s,void 0,r&&r[s])}else if(xt(e))if(e[Symbol.iterator])o=Array.from(e,(s,l)=>t(s,l,void 0,r&&r[l]));else{const s=Object.keys(e);o=new Array(s.length);for(let l=0,c=s.length;l<c;l++){const d=s[l];o[l]=t(e[d],d,l,r&&r[l])}}else o=[];return n&&(n[a]=o),o}function Zy(e,t){for(let n=0;n<t.length;n++){const a=t[n];if(Ue(a))for(let o=0;o<a.length;o++)e[a[o].name]=a[o].fn;else a&&(e[a.name]=a.key?(...o)=>{const r=a.fn(...o);return r&&(r.key=a.key),r}:a.fn)}return e}function $t(e,t,n={},a,o){if(Dt.isCE||Dt.parent&&Ua(Dt.parent)&&Dt.parent.isCE)return t!=="default"&&(n.name=t),je("slot",n,a&&a());let r=e[t];r&&r._c&&(r._d=!1),C();const s=r&&bf(r(n)),l=Fe(Oe,{key:n.key||s&&s.key||`_${t}`},s||(a?a():[]),s&&e._===1?64:-2);return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),r&&r._c&&(r._d=!0),l}function bf(e){return e.some(t=>_a(t)?!(t.type===rn||t.type===Oe&&!bf(t.children)):!0)?e:null}function e_(e,t){const n={};for(const a in e)n[t&&/[A-Z]/.test(a)?`on:${a}`:Xo(a)]=e[a];return n}const Yi=e=>e?Uf(e)?Ds(e)||e.proxy:Yi(e.parent):null,Zo=Nt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Yi(e.parent),$root:e=>Yi(e.root),$emit:e=>e.emit,$options:e=>Pl(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,$s(e.update)}),$nextTick:e=>e.n||(e.n=mn.bind(e.proxy)),$watch:e=>Yy.bind(e)}),Ei=(e,t)=>e!==bt&&!e.__isScriptSetup&&pt(e,t),Ji={get({_:e},t){const{ctx:n,setupState:a,data:o,props:r,accessCache:s,type:l,appContext:c}=e;let d;if(t[0]!=="$"){const k=s[t];if(k!==void 0)switch(k){case 1:return a[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(Ei(a,t))return s[t]=1,a[t];if(o!==bt&&pt(o,t))return s[t]=2,o[t];if((d=e.propsOptions[0])&&pt(d,t))return s[t]=3,r[t];if(n!==bt&&pt(n,t))return s[t]=4,n[t];Qi&&(s[t]=0)}}const h=Zo[t];let f,m;if(h)return t==="$attrs"&&gn(e,"get",t),h(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==bt&&pt(n,t))return s[t]=4,n[t];if(m=c.config.globalProperties,pt(m,t))return m[t]},set({_:e},t,n){const{data:a,setupState:o,ctx:r}=e;return Ei(o,t)?(o[t]=n,!0):a!==bt&&pt(a,t)?(a[t]=n,!0):pt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:a,appContext:o,propsOptions:r}},s){let l;return!!n[s]||e!==bt&&pt(e,s)||Ei(t,s)||(l=r[0])&&pt(l,s)||pt(a,s)||pt(Zo,s)||pt(o.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:pt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},t_=Nt({},Ji,{get(e,t){if(t!==Symbol.unscopables)return Ji.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Lg(t)}});function n_(){return null}function a_(){return null}function o_(e){}function r_(e){}function s_(){return null}function i_(){}function l_(e,t){return null}function c_(){return Af().slots}function u_(){return Af().attrs}function Af(){const e=na();return e.setupContext||(e.setupContext=zf(e))}function fr(e){return Ue(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function d_(e,t){const n=fr(e);for(const a in t){if(a.startsWith("__skip"))continue;let o=n[a];o?Ue(o)||Qe(o)?o=n[a]={type:o,default:t[a]}:o.default=t[a]:o===null&&(o=n[a]={default:t[a]}),o&&t[`__skip_${a}`]&&(o.skipFactory=!0)}return n}function $o(e,t){return!e||!t?e||t:Ue(e)&&Ue(t)?e.concat(t):Nt({},fr(e),fr(t))}function f_(e,t){const n={};for(const a in e)t.includes(a)||Object.defineProperty(n,a,{enumerable:!0,get:()=>e[a]});return n}function p_(e){const t=na();let n=e();return nl(),hl(n)&&(n=n.catch(a=>{throw Ga(t),a})),[n,()=>Ga(t)]}let Qi=!0;function h_(e){const t=Pl(e),n=e.proxy,a=e.ctx;Qi=!1,t.beforeCreate&&bu(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:s,watch:l,provide:c,inject:d,created:h,beforeMount:f,mounted:m,beforeUpdate:k,updated:S,activated:y,deactivated:b,beforeDestroy:O,beforeUnmount:I,destroyed:g,unmounted:p,render:A,renderTracked:w,renderTriggered:V,errorCaptured:j,serverPrefetch:ee,expose:se,inheritAttrs:le,components:ae,directives:ue,filters:Ce}=t;if(d&&v_(d,a,null),s)for(const he in s){const de=s[he];Qe(de)&&(a[he]=de.bind(n))}if(o){const he=o.call(n,n);xt(he)&&(e.data=Ts(he))}if(Qi=!0,r)for(const he in r){const de=r[he],Le=Qe(de)?de.bind(n,n):Qe(de.get)?de.get.bind(n,n):hn,kt=!Qe(de)&&Qe(de.set)?de.set.bind(n):hn,qe=J({get:Le,set:kt});Object.defineProperty(a,he,{enumerable:!0,configurable:!0,get:()=>qe.value,set:Ct=>qe.value=Ct})}if(l)for(const he in l)Cf(l[he],a,n,he);if(c){const he=Qe(c)?c.call(n):c;Reflect.ownKeys(he).forEach(de=>{If(de,he[de])})}h&&bu(h,e,"c");function pe(he,de){Ue(de)?de.forEach(Le=>he(Le.bind(n))):de&&he(de.bind(n))}if(pe(Eo,f),pe(Ft,m),pe(vf,k),pe(Ls,S),pe(ff,y),pe(pf,b),pe(_f,j),pe(yf,w),pe(gf,V),pe(Xa,I),pe(Bn,p),pe(mf,ee),Ue(se))if(se.length){const he=e.exposed||(e.exposed={});se.forEach(de=>{Object.defineProperty(he,de,{get:()=>n[de],set:Le=>n[de]=Le})})}else e.exposed||(e.exposed={});A&&e.render===hn&&(e.render=A),le!=null&&(e.inheritAttrs=le),ae&&(e.components=ae),ue&&(e.directives=ue)}function v_(e,t,n=hn){Ue(e)&&(e=qi(e));for(const a in e){const o=e[a];let r;xt(o)?"default"in o?r=W(o.from||a,o.default,!0):r=W(o.from||a):r=W(o),Qt(r)?Object.defineProperty(t,a,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[a]=r}}function bu(e,t,n){In(Ue(e)?e.map(a=>a.bind(t.proxy)):e.bind(t.proxy),t,n)}function Cf(e,t,n,a){const o=a.includes(".")?cf(n,a):()=>n[a];if(Ot(e)){const r=t[e];Qe(r)&&He(o,r)}else if(Qe(e))He(o,e.bind(n));else if(xt(e))if(Ue(e))e.forEach(r=>Cf(r,t,n,a));else{const r=Qe(e.handler)?e.handler.bind(n):t[e.handler];Qe(r)&&He(o,r,e)}}function Pl(e){const t=e.type,{mixins:n,extends:a}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,l=r.get(t);let c;return l?c=l:!o.length&&!n&&!a?c=t:(c={},o.length&&o.forEach(d=>vs(c,d,s,!0)),vs(c,t,s)),xt(t)&&r.set(t,c),c}function vs(e,t,n,a=!1){const{mixins:o,extends:r}=t;r&&vs(e,r,n,!0),o&&o.forEach(s=>vs(e,s,n,!0));for(const s in t)if(!(a&&s==="expose")){const l=m_[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const m_={data:Au,props:Cu,emits:Cu,methods:Qo,computed:Qo,beforeCreate:ln,created:ln,beforeMount:ln,mounted:ln,beforeUpdate:ln,updated:ln,beforeDestroy:ln,beforeUnmount:ln,destroyed:ln,unmounted:ln,activated:ln,deactivated:ln,errorCaptured:ln,serverPrefetch:ln,components:Qo,directives:Qo,watch:y_,provide:Au,inject:g_};function Au(e,t){return t?e?function(){return Nt(Qe(e)?e.call(this,this):e,Qe(t)?t.call(this,this):t)}:t:e}function g_(e,t){return Qo(qi(e),qi(t))}function qi(e){if(Ue(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ln(e,t){return e?[...new Set([].concat(e,t))]:t}function Qo(e,t){return e?Nt(Object.create(null),e,t):t}function Cu(e,t){return e?Ue(e)&&Ue(t)?[...new Set([...e,...t])]:Nt(Object.create(null),fr(e),fr(t??{})):t}function y_(e,t){if(!e)return t;if(!t)return e;const n=Nt(Object.create(null),e);for(const a in t)n[a]=ln(e[a],t[a]);return n}function wf(){return{app:null,config:{isNativeTag:Tg,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let __=0;function b_(e,t){return function(a,o=null){Qe(a)||(a=Nt({},a)),o!=null&&!xt(o)&&(o=null);const r=wf(),s=new WeakSet;let l=!1;const c=r.app={_uid:__++,_component:a,_props:o,_container:null,_context:r,_instance:null,version:Wf,get config(){return r.config},set config(d){},use(d,...h){return s.has(d)||(d&&Qe(d.install)?(s.add(d),d.install(c,...h)):Qe(d)&&(s.add(d),d(c,...h))),c},mixin(d){return r.mixins.includes(d)||r.mixins.push(d),c},component(d,h){return h?(r.components[d]=h,c):r.components[d]},directive(d,h){return h?(r.directives[d]=h,c):r.directives[d]},mount(d,h,f){if(!l){const m=je(a,o);return m.appContext=r,f===!0?f="svg":f===!1&&(f=void 0),h&&t?t(m,d):e(m,d,f),l=!0,c._container=d,d.__vue_app__=c,Ds(m.component)||m.component.proxy}},unmount(){l&&(e(null,c._container),delete c._container.__vue_app__)},provide(d,h){return r.provides[d]=h,c},runWithContext(d){const h=bo;bo=c;try{return d()}finally{bo=h}}};return c}}let bo=null;function If(e,t){if(jt){let n=jt.provides;const a=jt.parent&&jt.parent.provides;a===n&&(n=jt.provides=Object.create(a)),n[e]=t}}function W(e,t,n=!1){const a=jt||Dt;if(a||bo){const o=a?a.parent==null?a.vnode.appContext&&a.vnode.appContext.provides:a.parent.provides:bo._context.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Qe(t)?t.call(a&&a.proxy):t}}function A_(){return!!(jt||Dt||bo)}function C_(e,t,n,a=!1){const o={},r={};us(r,Rs,1),e.propsDefaults=Object.create(null),xf(e,t,o,r);for(const s in e.propsOptions[0])s in o||(o[s]=void 0);n?e.props=a?o:zd(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function w_(e,t,n,a){const{props:o,attrs:r,vnode:{patchFlag:s}}=e,l=ut(o),[c]=e.propsOptions;let d=!1;if((a||s>0)&&!(s&16)){if(s&8){const h=e.vnode.dynamicProps;for(let f=0;f<h.length;f++){let m=h[f];if(Ms(e.emitsOptions,m))continue;const k=t[m];if(c)if(pt(r,m))k!==r[m]&&(r[m]=k,d=!0);else{const S=cn(m);o[S]=Xi(c,l,S,k,e,!1)}else k!==r[m]&&(r[m]=k,d=!0)}}}else{xf(e,t,o,r)&&(d=!0);let h;for(const f in l)(!t||!pt(t,f)&&((h=wn(f))===f||!pt(t,h)))&&(c?n&&(n[f]!==void 0||n[h]!==void 0)&&(o[f]=Xi(c,l,f,void 0,e,!0)):delete o[f]);if(r!==l)for(const f in r)(!t||!pt(t,f))&&(delete r[f],d=!0)}d&&Zn(e,"set","$attrs")}function xf(e,t,n,a){const[o,r]=e.propsOptions;let s=!1,l;if(t)for(let c in t){if(vo(c))continue;const d=t[c];let h;o&&pt(o,h=cn(c))?!r||!r.includes(h)?n[h]=d:(l||(l={}))[h]=d:Ms(e.emitsOptions,c)||(!(c in a)||d!==a[c])&&(a[c]=d,s=!0)}if(r){const c=ut(n),d=l||bt;for(let h=0;h<r.length;h++){const f=r[h];n[f]=Xi(o,c,f,d[f],e,!pt(d,f))}}return s}function Xi(e,t,n,a,o,r){const s=e[n];if(s!=null){const l=pt(s,"default");if(l&&a===void 0){const c=s.default;if(s.type!==Function&&!s.skipFactory&&Qe(c)){const{propsDefaults:d}=o;if(n in d)a=d[n];else{const h=Ga(o);a=d[n]=c.call(null,t),h()}}else a=c}s[0]&&(r&&!l?a=!1:s[1]&&(a===""||a===wn(n))&&(a=!0))}return a}function kf(e,t,n=!1){const a=t.propsCache,o=a.get(e);if(o)return o;const r=e.props,s={},l=[];let c=!1;if(!Qe(e)){const h=f=>{c=!0;const[m,k]=kf(f,t,!0);Nt(s,m),k&&l.push(...k)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!r&&!c)return xt(e)&&a.set(e,po),po;if(Ue(r))for(let h=0;h<r.length;h++){const f=cn(r[h]);wu(f)&&(s[f]=bt)}else if(r)for(const h in r){const f=cn(h);if(wu(f)){const m=r[h],k=s[f]=Ue(m)||Qe(m)?{type:m}:Nt({},m);if(k){const S=ku(Boolean,k.type),y=ku(String,k.type);k[0]=S>-1,k[1]=y<0||S<y,(S>-1||pt(k,"default"))&&l.push(f)}}}const d=[s,l];return xt(e)&&a.set(e,d),d}function wu(e){return e[0]!=="$"&&!vo(e)}function Iu(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function xu(e,t){return Iu(e)===Iu(t)}function ku(e,t){return Ue(t)?t.findIndex(n=>xu(n,e)):Qe(t)&&xu(t,e)?0:-1}const Sf=e=>e[0]==="_"||e==="$stable",Ll=e=>Ue(e)?e.map(Cn):[Cn(e)],I_=(e,t,n)=>{if(t._n)return t;const a=Ge((...o)=>Ll(t(...o)),n);return a._c=!1,a},Tf=(e,t,n)=>{const a=e._ctx;for(const o in e){if(Sf(o))continue;const r=e[o];if(Qe(r))t[o]=I_(o,r,a);else if(r!=null){const s=Ll(r);t[o]=()=>s}}},Ef=(e,t)=>{const n=Ll(t);e.slots.default=()=>n},x_=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=ut(t),us(t,"_",n)):Tf(t,e.slots={})}else e.slots={},t&&Ef(e,t);us(e.slots,Rs,1)},k_=(e,t,n)=>{const{vnode:a,slots:o}=e;let r=!0,s=bt;if(a.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:(Nt(o,t),!n&&l===1&&delete o._):(r=!t.$stable,Tf(t,o)),s=t}else t&&(Ef(e,t),s={default:1});if(r)for(const l in o)!Sf(l)&&s[l]==null&&delete o[l]};function ms(e,t,n,a,o=!1){if(Ue(e)){e.forEach((m,k)=>ms(m,t&&(Ue(t)?t[k]:t),n,a,o));return}if(Ua(a)&&!o)return;const r=a.shapeFlag&4?Ds(a.component)||a.component.proxy:a.el,s=o?null:r,{i:l,r:c}=e,d=t&&t.r,h=l.refs===bt?l.refs={}:l.refs,f=l.setupState;if(d!=null&&d!==c&&(Ot(d)?(h[d]=null,pt(f,d)&&(f[d]=null)):Qt(d)&&(d.value=null)),Qe(c))ea(c,l,12,[s,h]);else{const m=Ot(c),k=Qt(c);if(m||k){const S=()=>{if(e.f){const y=m?pt(f,c)?f[c]:h[c]:c.value;o?Ue(y)&&pl(y,r):Ue(y)?y.includes(r)||y.push(r):m?(h[c]=[r],pt(f,c)&&(f[c]=h[c])):(c.value=[r],e.k&&(h[e.k]=c.value))}else m?(h[c]=s,pt(f,c)&&(f[c]=s)):k&&(c.value=s,e.k&&(h[e.k]=s))};s?(S.id=-1,en(S,n)):S()}}}let ca=!1;const S_=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",T_=e=>e.namespaceURI.includes("MathML"),Jr=e=>{if(S_(e))return"svg";if(T_(e))return"mathml"},Qr=e=>e.nodeType===8;function E_(e){const{mt:t,p:n,o:{patchProp:a,createText:o,nextSibling:r,parentNode:s,remove:l,insert:c,createComment:d}}=e,h=(g,p)=>{if(!p.hasChildNodes()){n(null,g,p),hs(),p._vnode=g;return}ca=!1,f(p.firstChild,g,null,null,null),hs(),p._vnode=g,ca&&console.error("Hydration completed but contains mismatches.")},f=(g,p,A,w,V,j=!1)=>{const ee=Qr(g)&&g.data==="[",se=()=>y(g,p,A,w,V,ee),{type:le,ref:ae,shapeFlag:ue,patchFlag:Ce}=p;let Re=g.nodeType;p.el=g,Ce===-2&&(j=!1,p.dynamicChildren=null);let pe=null;switch(le){case Ka:Re!==3?p.children===""?(c(p.el=o(""),s(g),g),pe=g):pe=se():(g.data!==p.children&&(ca=!0,g.data=p.children),pe=r(g));break;case rn:I(g)?(pe=r(g),O(p.el=g.content.firstChild,g,A)):Re!==8||ee?pe=se():pe=r(g);break;case Ha:if(ee&&(g=r(g),Re=g.nodeType),Re===1||Re===3){pe=g;const he=!p.children.length;for(let de=0;de<p.staticCount;de++)he&&(p.children+=pe.nodeType===1?pe.outerHTML:pe.data),de===p.staticCount-1&&(p.anchor=pe),pe=r(pe);return ee?r(pe):pe}else se();break;case Oe:ee?pe=S(g,p,A,w,V,j):pe=se();break;default:if(ue&1)(Re!==1||p.type.toLowerCase()!==g.tagName.toLowerCase())&&!I(g)?pe=se():pe=m(g,p,A,w,V,j);else if(ue&6){p.slotScopeIds=V;const he=s(g);if(ee?pe=b(g):Qr(g)&&g.data==="teleport start"?pe=b(g,g.data,"teleport end"):pe=r(g),t(p,he,null,A,w,Jr(he),j),Ua(p)){let de;ee?(de=je(Oe),de.anchor=pe?pe.previousSibling:he.lastChild):de=g.nodeType===3?At(""):je("div"),de.el=g,p.component.subTree=de}}else ue&64?Re!==8?pe=se():pe=p.type.hydrate(g,p,A,w,V,j,e,k):ue&128&&(pe=p.type.hydrate(g,p,A,w,Jr(s(g)),V,j,e,f))}return ae!=null&&ms(ae,null,w,p),pe},m=(g,p,A,w,V,j)=>{j=j||!!p.dynamicChildren;const{type:ee,props:se,patchFlag:le,shapeFlag:ae,dirs:ue,transition:Ce}=p,Re=ee==="input"||ee==="option";if(Re||le!==-1){ue&&Vn(p,null,A,"created");let pe=!1;if(I(g)){pe=Of(w,Ce)&&A&&A.vnode.props&&A.vnode.props.appear;const de=g.content.firstChild;pe&&Ce.beforeEnter(de),O(de,g,A),p.el=g=de}if(ae&16&&!(se&&(se.innerHTML||se.textContent))){let de=k(g.firstChild,p,g,A,w,V,j);for(;de;){ca=!0;const Le=de;de=de.nextSibling,l(Le)}}else ae&8&&g.textContent!==p.children&&(ca=!0,g.textContent=p.children);if(se)if(Re||!j||le&48)for(const de in se)(Re&&(de.endsWith("value")||de==="indeterminate")||hr(de)&&!vo(de)||de[0]===".")&&a(g,de,null,se[de],void 0,void 0,A);else se.onClick&&a(g,"onClick",null,se.onClick,void 0,void 0,A);let he;(he=se&&se.onVnodeBeforeMount)&&pn(he,A,p),ue&&Vn(p,null,A,"beforeMount"),((he=se&&se.onVnodeMounted)||ue||pe)&&af(()=>{he&&pn(he,A,p),pe&&Ce.enter(g),ue&&Vn(p,null,A,"mounted")},w)}return g.nextSibling},k=(g,p,A,w,V,j,ee)=>{ee=ee||!!p.dynamicChildren;const se=p.children,le=se.length;for(let ae=0;ae<le;ae++){const ue=ee?se[ae]:se[ae]=Cn(se[ae]);if(g)g=f(g,ue,w,V,j,ee);else{if(ue.type===Ka&&!ue.children)continue;ca=!0,n(null,ue,A,null,w,V,Jr(A),j)}}return g},S=(g,p,A,w,V,j)=>{const{slotScopeIds:ee}=p;ee&&(V=V?V.concat(ee):ee);const se=s(g),le=k(r(g),p,se,A,w,V,j);return le&&Qr(le)&&le.data==="]"?r(p.anchor=le):(ca=!0,c(p.anchor=d("]"),se,le),le)},y=(g,p,A,w,V,j)=>{if(ca=!0,p.el=null,j){const le=b(g);for(;;){const ae=r(g);if(ae&&ae!==le)l(ae);else break}}const ee=r(g),se=s(g);return l(g),n(null,p,se,ee,A,w,Jr(se),V),ee},b=(g,p="[",A="]")=>{let w=0;for(;g;)if(g=r(g),g&&Qr(g)&&(g.data===p&&w++,g.data===A)){if(w===0)return r(g);w--}return g},O=(g,p,A)=>{const w=p.parentNode;w&&w.replaceChild(g,p);let V=A;for(;V;)V.vnode.el===p&&(V.vnode.el=V.subTree.el=g),V=V.parent},I=g=>g.nodeType===1&&g.tagName.toLowerCase()==="template";return[h,f]}const en=af;function $f(e){return Nf(e)}function Mf(e){return Nf(e,E_)}function Nf(e,t){const n=kd();n.__VUE__=!0;const{insert:a,remove:o,patchProp:r,createElement:s,createText:l,createComment:c,setText:d,setElementText:h,parentNode:f,nextSibling:m,setScopeId:k=hn,insertStaticContent:S}=e,y=(_,M,Q,te=null,re=null,ye=null,xe=void 0,me=null,_e=!!M.dynamicChildren)=>{if(_===M)return;_&&!Ln(_,M)&&(te=$(_),Ct(_,re,ye,!0),_=null),M.patchFlag===-2&&(_e=!1,M.dynamicChildren=null);const{type:ce,ref:Ee,shapeFlag:H}=M;switch(ce){case Ka:b(_,M,Q,te);break;case rn:O(_,M,Q,te);break;case Ha:_==null&&I(M,Q,te,xe);break;case Oe:ae(_,M,Q,te,re,ye,xe,me,_e);break;default:H&1?A(_,M,Q,te,re,ye,xe,me,_e):H&6?ue(_,M,Q,te,re,ye,xe,me,_e):(H&64||H&128)&&ce.process(_,M,Q,te,re,ye,xe,me,_e,K)}Ee!=null&&re&&ms(Ee,_&&_.ref,ye,M||_,!M)},b=(_,M,Q,te)=>{if(_==null)a(M.el=l(M.children),Q,te);else{const re=M.el=_.el;M.children!==_.children&&d(re,M.children)}},O=(_,M,Q,te)=>{_==null?a(M.el=c(M.children||""),Q,te):M.el=_.el},I=(_,M,Q,te)=>{[_.el,_.anchor]=S(_.children,M,Q,te,_.el,_.anchor)},g=({el:_,anchor:M},Q,te)=>{let re;for(;_&&_!==M;)re=m(_),a(_,Q,te),_=re;a(M,Q,te)},p=({el:_,anchor:M})=>{let Q;for(;_&&_!==M;)Q=m(_),o(_),_=Q;o(M)},A=(_,M,Q,te,re,ye,xe,me,_e)=>{M.type==="svg"?xe="svg":M.type==="math"&&(xe="mathml"),_==null?w(M,Q,te,re,ye,xe,me,_e):ee(_,M,re,ye,xe,me,_e)},w=(_,M,Q,te,re,ye,xe,me)=>{let _e,ce;const{props:Ee,shapeFlag:H,transition:Z,dirs:oe}=_;if(_e=_.el=s(_.type,ye,Ee&&Ee.is,Ee),H&8?h(_e,_.children):H&16&&j(_.children,_e,null,te,re,$i(_,ye),xe,me),oe&&Vn(_,null,te,"created"),V(_e,_,_.scopeId,xe,te),Ee){for(const Te in Ee)Te!=="value"&&!vo(Te)&&r(_e,Te,null,Ee[Te],ye,_.children,te,re,Xe);"value"in Ee&&r(_e,"value",null,Ee.value,ye),(ce=Ee.onVnodeBeforeMount)&&pn(ce,te,_)}oe&&Vn(_,null,te,"beforeMount");const ie=Of(re,Z);ie&&Z.beforeEnter(_e),a(_e,M,Q),((ce=Ee&&Ee.onVnodeMounted)||ie||oe)&&en(()=>{ce&&pn(ce,te,_),ie&&Z.enter(_e),oe&&Vn(_,null,te,"mounted")},re)},V=(_,M,Q,te,re)=>{if(Q&&k(_,Q),te)for(let ye=0;ye<te.length;ye++)k(_,te[ye]);if(re){let ye=re.subTree;if(M===ye){const xe=re.vnode;V(_,xe,xe.scopeId,xe.slotScopeIds,re.parent)}}},j=(_,M,Q,te,re,ye,xe,me,_e=0)=>{for(let ce=_e;ce<_.length;ce++){const Ee=_[ce]=me?ha(_[ce]):Cn(_[ce]);y(null,Ee,M,Q,te,re,ye,xe,me)}},ee=(_,M,Q,te,re,ye,xe)=>{const me=M.el=_.el;let{patchFlag:_e,dynamicChildren:ce,dirs:Ee}=M;_e|=_.patchFlag&16;const H=_.props||bt,Z=M.props||bt;let oe;if(Q&&Na(Q,!1),(oe=Z.onVnodeBeforeUpdate)&&pn(oe,Q,M,_),Ee&&Vn(M,_,Q,"beforeUpdate"),Q&&Na(Q,!0),ce?se(_.dynamicChildren,ce,me,Q,te,$i(M,re),ye):xe||de(_,M,me,null,Q,te,$i(M,re),ye,!1),_e>0){if(_e&16)le(me,M,H,Z,Q,te,re);else if(_e&2&&H.class!==Z.class&&r(me,"class",null,Z.class,re),_e&4&&r(me,"style",H.style,Z.style,re),_e&8){const ie=M.dynamicProps;for(let Te=0;Te<ie.length;Te++){const Ne=ie[Te],We=H[Ne],Ze=Z[Ne];(Ze!==We||Ne==="value")&&r(me,Ne,We,Ze,re,_.children,Q,te,Xe)}}_e&1&&_.children!==M.children&&h(me,M.children)}else!xe&&ce==null&&le(me,M,H,Z,Q,te,re);((oe=Z.onVnodeUpdated)||Ee)&&en(()=>{oe&&pn(oe,Q,M,_),Ee&&Vn(M,_,Q,"updated")},te)},se=(_,M,Q,te,re,ye,xe)=>{for(let me=0;me<M.length;me++){const _e=_[me],ce=M[me],Ee=_e.el&&(_e.type===Oe||!Ln(_e,ce)||_e.shapeFlag&70)?f(_e.el):Q;y(_e,ce,Ee,null,te,re,ye,xe,!0)}},le=(_,M,Q,te,re,ye,xe)=>{if(Q!==te){if(Q!==bt)for(const me in Q)!vo(me)&&!(me in te)&&r(_,me,Q[me],null,xe,M.children,re,ye,Xe);for(const me in te){if(vo(me))continue;const _e=te[me],ce=Q[me];_e!==ce&&me!=="value"&&r(_,me,ce,_e,xe,M.children,re,ye,Xe)}"value"in te&&r(_,"value",Q.value,te.value,xe)}},ae=(_,M,Q,te,re,ye,xe,me,_e)=>{const ce=M.el=_?_.el:l(""),Ee=M.anchor=_?_.anchor:l("");let{patchFlag:H,dynamicChildren:Z,slotScopeIds:oe}=M;oe&&(me=me?me.concat(oe):oe),_==null?(a(ce,Q,te),a(Ee,Q,te),j(M.children||[],Q,Ee,re,ye,xe,me,_e)):H>0&&H&64&&Z&&_.dynamicChildren?(se(_.dynamicChildren,Z,Q,re,ye,xe,me),(M.key!=null||re&&M===re.subTree)&&Rl(_,M,!0)):de(_,M,Q,Ee,re,ye,xe,me,_e)},ue=(_,M,Q,te,re,ye,xe,me,_e)=>{M.slotScopeIds=me,_==null?M.shapeFlag&512?re.ctx.activate(M,Q,te,xe,_e):Ce(M,Q,te,re,ye,xe,_e):Re(_,M,_e)},Ce=(_,M,Q,te,re,ye,xe)=>{const me=_.component=Vf(_,te,re);if(yr(_)&&(me.ctx.renderer=K),Hf(me),me.asyncDep){if(re&&re.registerDep(me,pe),!_.el){const _e=me.subTree=je(rn);O(null,_e,M,Q)}}else pe(me,_,M,Q,re,ye,xe)},Re=(_,M,Q)=>{const te=M.component=_.component;if(Dy(_,M,Q))if(te.asyncDep&&!te.asyncResolved){he(te,M,Q);return}else te.next=M,$y(te.update),te.effect.dirty=!0,te.update();else M.el=_.el,te.vnode=M},pe=(_,M,Q,te,re,ye,xe)=>{const me=()=>{if(_.isMounted){let{next:Ee,bu:H,u:Z,parent:oe,vnode:ie}=_;{const lt=Pf(_);if(lt){Ee&&(Ee.el=ie.el,he(_,Ee,xe)),lt.asyncDep.then(()=>{_.isUnmounted||me()});return}}let Te=Ee,Ne;Na(_,!1),Ee?(Ee.el=ie.el,he(_,Ee,xe)):Ee=ie,H&&mo(H),(Ne=Ee.props&&Ee.props.onVnodeBeforeUpdate)&&pn(Ne,oe,Ee,ie),Na(_,!0);const We=ss(_),Ze=_.subTree;_.subTree=We,y(Ze,We,f(Ze.el),$(Ze),_,re,ye),Ee.el=We.el,Te===null&&Tl(_,We.el),Z&&en(Z,re),(Ne=Ee.props&&Ee.props.onVnodeUpdated)&&en(()=>pn(Ne,oe,Ee,ie),re)}else{let Ee;const{el:H,props:Z}=M,{bm:oe,m:ie,parent:Te}=_,Ne=Ua(M);if(Na(_,!1),oe&&mo(oe),!Ne&&(Ee=Z&&Z.onVnodeBeforeMount)&&pn(Ee,Te,M),Na(_,!0),H&&Se){const We=()=>{_.subTree=ss(_),Se(H,_.subTree,_,re,null)};Ne?M.type.__asyncLoader().then(()=>!_.isUnmounted&&We()):We()}else{const We=_.subTree=ss(_);y(null,We,Q,te,_,re,ye),M.el=We.el}if(ie&&en(ie,re),!Ne&&(Ee=Z&&Z.onVnodeMounted)){const We=M;en(()=>pn(Ee,Te,We),re)}(M.shapeFlag&256||Te&&Ua(Te.vnode)&&Te.vnode.shapeFlag&256)&&_.a&&en(_.a,re),_.isMounted=!0,M=Q=te=null}},_e=_.effect=new Ao(me,hn,()=>$s(ce),_.scope),ce=_.update=()=>{_e.dirty&&_e.run()};ce.id=_.uid,Na(_,!0),ce()},he=(_,M,Q)=>{M.component=_;const te=_.vnode.props;_.vnode=M,_.next=null,w_(_,M.props,te,Q),k_(_,M.children,Q),Ja(),vu(_),Qa()},de=(_,M,Q,te,re,ye,xe,me,_e=!1)=>{const ce=_&&_.children,Ee=_?_.shapeFlag:0,H=M.children,{patchFlag:Z,shapeFlag:oe}=M;if(Z>0){if(Z&128){kt(ce,H,Q,te,re,ye,xe,me,_e);return}else if(Z&256){Le(ce,H,Q,te,re,ye,xe,me,_e);return}}oe&8?(Ee&16&&Xe(ce,re,ye),H!==ce&&h(Q,H)):Ee&16?oe&16?kt(ce,H,Q,te,re,ye,xe,me,_e):Xe(ce,re,ye,!0):(Ee&8&&h(Q,""),oe&16&&j(H,Q,te,re,ye,xe,me,_e))},Le=(_,M,Q,te,re,ye,xe,me,_e)=>{_=_||po,M=M||po;const ce=_.length,Ee=M.length,H=Math.min(ce,Ee);let Z;for(Z=0;Z<H;Z++){const oe=M[Z]=_e?ha(M[Z]):Cn(M[Z]);y(_[Z],oe,Q,null,re,ye,xe,me,_e)}ce>Ee?Xe(_,re,ye,!0,!1,H):j(M,Q,te,re,ye,xe,me,_e,H)},kt=(_,M,Q,te,re,ye,xe,me,_e)=>{let ce=0;const Ee=M.length;let H=_.length-1,Z=Ee-1;for(;ce<=H&&ce<=Z;){const oe=_[ce],ie=M[ce]=_e?ha(M[ce]):Cn(M[ce]);if(Ln(oe,ie))y(oe,ie,Q,null,re,ye,xe,me,_e);else break;ce++}for(;ce<=H&&ce<=Z;){const oe=_[H],ie=M[Z]=_e?ha(M[Z]):Cn(M[Z]);if(Ln(oe,ie))y(oe,ie,Q,null,re,ye,xe,me,_e);else break;H--,Z--}if(ce>H){if(ce<=Z){const oe=Z+1,ie=oe<Ee?M[oe].el:te;for(;ce<=Z;)y(null,M[ce]=_e?ha(M[ce]):Cn(M[ce]),Q,ie,re,ye,xe,me,_e),ce++}}else if(ce>Z)for(;ce<=H;)Ct(_[ce],re,ye,!0),ce++;else{const oe=ce,ie=ce,Te=new Map;for(ce=ie;ce<=Z;ce++){const wt=M[ce]=_e?ha(M[ce]):Cn(M[ce]);wt.key!=null&&Te.set(wt.key,ce)}let Ne,We=0;const Ze=Z-ie+1;let lt=!1,St=0;const Et=new Array(Ze);for(ce=0;ce<Ze;ce++)Et[ce]=0;for(ce=oe;ce<=H;ce++){const wt=_[ce];if(We>=Ze){Ct(wt,re,ye,!0);continue}let Ut;if(wt.key!=null)Ut=Te.get(wt.key);else for(Ne=ie;Ne<=Z;Ne++)if(Et[Ne-ie]===0&&Ln(wt,M[Ne])){Ut=Ne;break}Ut===void 0?Ct(wt,re,ye,!0):(Et[Ut-ie]=ce+1,Ut>=St?St=Ut:lt=!0,y(wt,M[Ut],Q,null,re,ye,xe,me,_e),We++)}const Pt=lt?$_(Et):po;for(Ne=Pt.length-1,ce=Ze-1;ce>=0;ce--){const wt=ie+ce,Ut=M[wt],ka=wt+1<Ee?M[wt+1].el:te;Et[ce]===0?y(null,Ut,Q,ka,re,ye,xe,me,_e):lt&&(Ne<0||ce!==Pt[Ne]?qe(Ut,Q,ka,2):Ne--)}}},qe=(_,M,Q,te,re=null)=>{const{el:ye,type:xe,transition:me,children:_e,shapeFlag:ce}=_;if(ce&6){qe(_.component.subTree,M,Q,te);return}if(ce&128){_.suspense.move(M,Q,te);return}if(ce&64){xe.move(_,M,Q,K);return}if(xe===Oe){a(ye,M,Q);for(let H=0;H<_e.length;H++)qe(_e[H],M,Q,te);a(_.anchor,M,Q);return}if(xe===Ha){g(_,M,Q);return}if(te!==2&&ce&1&&me)if(te===0)me.beforeEnter(ye),a(ye,M,Q),en(()=>me.enter(ye),re);else{const{leave:H,delayLeave:Z,afterLeave:oe}=me,ie=()=>a(ye,M,Q),Te=()=>{H(ye,()=>{ie(),oe&&oe()})};Z?Z(ye,ie,Te):Te()}else a(ye,M,Q)},Ct=(_,M,Q,te=!1,re=!1)=>{const{type:ye,props:xe,ref:me,children:_e,dynamicChildren:ce,shapeFlag:Ee,patchFlag:H,dirs:Z}=_;if(me!=null&&ms(me,null,Q,_,!0),Ee&256){M.ctx.deactivate(_);return}const oe=Ee&1&&Z,ie=!Ua(_);let Te;if(ie&&(Te=xe&&xe.onVnodeBeforeUnmount)&&pn(Te,M,_),Ee&6)at(_.component,Q,te);else{if(Ee&128){_.suspense.unmount(Q,te);return}oe&&Vn(_,null,M,"beforeUnmount"),Ee&64?_.type.remove(_,M,Q,re,K,te):ce&&(ye!==Oe||H>0&&H&64)?Xe(ce,M,Q,!1,!0):(ye===Oe&&H&384||!re&&Ee&16)&&Xe(_e,M,Q),te&&$e(_)}(ie&&(Te=xe&&xe.onVnodeUnmounted)||oe)&&en(()=>{Te&&pn(Te,M,_),oe&&Vn(_,null,M,"unmounted")},Q)},$e=_=>{const{type:M,el:Q,anchor:te,transition:re}=_;if(M===Oe){Ke(Q,te);return}if(M===Ha){p(_);return}const ye=()=>{o(Q),re&&!re.persisted&&re.afterLeave&&re.afterLeave()};if(_.shapeFlag&1&&re&&!re.persisted){const{leave:xe,delayLeave:me}=re,_e=()=>xe(Q,ye);me?me(_.el,ye,_e):_e()}else ye()},Ke=(_,M)=>{let Q;for(;_!==M;)Q=m(_),o(_),_=Q;o(M)},at=(_,M,Q)=>{const{bum:te,scope:re,update:ye,subTree:xe,um:me}=_;te&&mo(te),re.stop(),ye&&(ye.active=!1,Ct(xe,_,M,Q)),me&&en(me,M),en(()=>{_.isUnmounted=!0},M),M&&M.pendingBranch&&!M.isUnmounted&&_.asyncDep&&!_.asyncResolved&&_.suspenseId===M.pendingId&&(M.deps--,M.deps===0&&M.resolve())},Xe=(_,M,Q,te=!1,re=!1,ye=0)=>{for(let xe=ye;xe<_.length;xe++)Ct(_[xe],M,Q,te,re)},$=_=>_.shapeFlag&6?$(_.component.subTree):_.shapeFlag&128?_.suspense.next():m(_.anchor||_.el);let R=!1;const B=(_,M,Q)=>{_==null?M._vnode&&Ct(M._vnode,null,null,!0):y(M._vnode||null,_,M,null,null,null,Q),R||(R=!0,vu(),hs(),R=!1),M._vnode=_},K={p:y,um:Ct,m:qe,r:$e,mt:Ce,mc:j,pc:de,pbc:se,n:$,o:e};let X,Se;return t&&([X,Se]=t(K)),{render:B,hydrate:X,createApp:b_(B,X)}}function $i({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Na({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Of(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Rl(e,t,n=!1){const a=e.children,o=t.children;if(Ue(a)&&Ue(o))for(let r=0;r<a.length;r++){const s=a[r];let l=o[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[r]=ha(o[r]),l.el=s.el),n||Rl(s,l)),l.type===Ka&&(l.el=s.el)}}function $_(e){const t=e.slice(),n=[0];let a,o,r,s,l;const c=e.length;for(a=0;a<c;a++){const d=e[a];if(d!==0){if(o=n[n.length-1],e[o]<d){t[a]=o,n.push(a);continue}for(r=0,s=n.length-1;r<s;)l=r+s>>1,e[n[l]]<d?r=l+1:s=l;d<e[n[r]]&&(r>0&&(t[a]=n[r-1]),n[r]=a)}}for(r=n.length,s=n[r-1];r-- >0;)n[r]=s,s=t[s];return n}function Pf(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Pf(t)}const M_=e=>e.__isTeleport,er=e=>e&&(e.disabled||e.disabled===""),Su=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Tu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Zi=(e,t)=>{const n=e&&e.to;return Ot(n)?t?t(n):null:n},N_={name:"Teleport",__isTeleport:!0,process(e,t,n,a,o,r,s,l,c,d){const{mc:h,pc:f,pbc:m,o:{insert:k,querySelector:S,createText:y,createComment:b}}=d,O=er(t.props);let{shapeFlag:I,children:g,dynamicChildren:p}=t;if(e==null){const A=t.el=y(""),w=t.anchor=y("");k(A,n,a),k(w,n,a);const V=t.target=Zi(t.props,S),j=t.targetAnchor=y("");V&&(k(j,V),s==="svg"||Su(V)?s="svg":(s==="mathml"||Tu(V))&&(s="mathml"));const ee=(se,le)=>{I&16&&h(g,se,le,o,r,s,l,c)};O?ee(n,w):V&&ee(V,j)}else{t.el=e.el;const A=t.anchor=e.anchor,w=t.target=e.target,V=t.targetAnchor=e.targetAnchor,j=er(e.props),ee=j?n:w,se=j?A:V;if(s==="svg"||Su(w)?s="svg":(s==="mathml"||Tu(w))&&(s="mathml"),p?(m(e.dynamicChildren,p,ee,o,r,s,l),Rl(e,t,!0)):c||f(e,t,ee,se,o,r,s,l,!1),O)j?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):qr(t,n,A,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const le=t.target=Zi(t.props,S);le&&qr(t,le,null,d,0)}else j&&qr(t,w,V,d,1)}Lf(t)},remove(e,t,n,a,{um:o,o:{remove:r}},s){const{shapeFlag:l,children:c,anchor:d,targetAnchor:h,target:f,props:m}=e;if(f&&r(h),s&&r(d),l&16){const k=s||!er(m);for(let S=0;S<c.length;S++){const y=c[S];o(y,t,n,k,!!y.dynamicChildren)}}},move:qr,hydrate:O_};function qr(e,t,n,{o:{insert:a},m:o},r=2){r===0&&a(e.targetAnchor,t,n);const{el:s,anchor:l,shapeFlag:c,children:d,props:h}=e,f=r===2;if(f&&a(s,t,n),(!f||er(h))&&c&16)for(let m=0;m<d.length;m++)o(d[m],t,n,2);f&&a(l,t,n)}function O_(e,t,n,a,o,r,{o:{nextSibling:s,parentNode:l,querySelector:c}},d){const h=t.target=Zi(t.props,c);if(h){const f=h._lpa||h.firstChild;if(t.shapeFlag&16)if(er(t.props))t.anchor=d(s(e),t,l(e),n,a,o,r),t.targetAnchor=f;else{t.anchor=s(e);let m=f;for(;m;)if(m=s(m),m&&m.nodeType===8&&m.data==="teleport anchor"){t.targetAnchor=m,h._lpa=t.targetAnchor&&s(t.targetAnchor);break}d(f,t,h,n,a,o,r)}Lf(t)}return t.anchor&&s(t.anchor)}const P_=N_;function Lf(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const Oe=Symbol.for("v-fgt"),Ka=Symbol.for("v-txt"),rn=Symbol.for("v-cmt"),Ha=Symbol.for("v-stc"),tr=[];let vn=null;function C(e=!1){tr.push(vn=e?null:[])}function Rf(){tr.pop(),vn=tr[tr.length-1]||null}let Wa=1;function el(e){Wa+=e}function Df(e){return e.dynamicChildren=Wa>0?vn||po:null,Rf(),Wa>0&&vn&&vn.push(e),e}function N(e,t,n,a,o,r){return Df(U(e,t,n,a,o,r,!0))}function Fe(e,t,n,a,o){return Df(je(e,t,n,a,o,!0))}function _a(e){return e?e.__v_isVNode===!0:!1}function Ln(e,t){return e.type===t.type&&e.key===t.key}function L_(e){}const Rs="__vInternal",Bf=({key:e})=>e??null,is=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ot(e)||Qt(e)||Qe(e)?{i:Dt,r:e,k:t,f:!!n}:e:null);function U(e,t=null,n=null,a=0,o=null,r=e===Oe?0:1,s=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Bf(t),ref:t&&is(t),scopeId:Ns,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:a,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Dt};return l?(Dl(c,n),r&128&&e.normalize(c)):n&&(c.shapeFlag|=Ot(n)?8:16),Wa>0&&!s&&vn&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&vn.push(c),c}const je=R_;function R_(e,t=null,n=null,a=0,o=null,r=!1){if((!e||e===ef)&&(e=rn),_a(e)){const l=jn(e,t,!0);return n&&Dl(l,n),Wa>0&&!r&&vn&&(l.shapeFlag&6?vn[vn.indexOf(e)]=l:vn.push(l)),l.patchFlag|=-2,l}if(z_(e)&&(e=e.__vccOpts),t){t=Ff(t);let{class:l,style:c}=t;l&&!Ot(l)&&(t.class=st(l)),xt(c)&&(bl(c)&&!Ue(c)&&(c=Nt({},c)),t.style=it(c))}const s=Ot(e)?1:nf(e)?128:M_(e)?64:xt(e)?4:Qe(e)?2:0;return U(e,t,n,a,o,s,r,!0)}function Ff(e){return e?bl(e)||Rs in e?Nt({},e):e:null}function jn(e,t,n=!1){const{props:a,ref:o,patchFlag:r,children:s}=e,l=t?nr(a||{},t):a;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Bf(l),ref:t&&t.ref?n&&o?Ue(o)?o.concat(is(t)):[o,is(t)]:is(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Oe?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&jn(e.ssContent),ssFallback:e.ssFallback&&jn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function At(e=" ",t=0){return je(Ka,null,e,t)}function D_(e,t){const n=je(Ha,null,e);return n.staticCount=t,n}function Ae(e="",t=!1){return t?(C(),Fe(rn,null,e)):je(rn,null,e)}function Cn(e){return e==null||typeof e=="boolean"?je(rn):Ue(e)?je(Oe,null,e.slice()):typeof e=="object"?ha(e):je(Ka,null,String(e))}function ha(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:jn(e)}function Dl(e,t){let n=0;const{shapeFlag:a}=e;if(t==null)t=null;else if(Ue(t))n=16;else if(typeof t=="object")if(a&65){const o=t.default;o&&(o._c&&(o._d=!1),Dl(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!(Rs in t)?t._ctx=Dt:o===3&&Dt&&(Dt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Qe(t)?(t={default:t,_ctx:Dt},n=32):(t=String(t),a&64?(n=16,t=[At(t)]):n=8);e.children=t,e.shapeFlag|=n}function nr(...e){const t={};for(let n=0;n<e.length;n++){const a=e[n];for(const o in a)if(o==="class")t.class!==a.class&&(t.class=st([t.class,a.class]));else if(o==="style")t.style=it([t.style,a.style]);else if(hr(o)){const r=t[o],s=a[o];s&&r!==s&&!(Ue(r)&&r.includes(s))&&(t[o]=r?[].concat(r,s):s)}else o!==""&&(t[o]=a[o])}return t}function pn(e,t,n,a=null){In(e,t,7,[n,a])}const B_=wf();let F_=0;function Vf(e,t,n){const a=e.type,o=(t?t.appContext:e.appContext)||B_,r={uid:F_++,vnode:e,type:a,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new ml(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:kf(a,o),emitsOptions:Zd(a,o),emit:null,emitted:null,propsDefaults:bt,inheritAttrs:a.inheritAttrs,ctx:bt,data:bt,props:bt,attrs:bt,slots:bt,refs:bt,setupState:bt,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=Ny.bind(null,r),e.ce&&e.ce(r),r}let jt=null;const na=()=>jt||Dt;let gs,tl;{const e=kd(),t=(n,a)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(a),r=>{o.length>1?o.forEach(s=>s(r)):o[0](r)}};gs=t("__VUE_INSTANCE_SETTERS__",n=>jt=n),tl=t("__VUE_SSR_SETTERS__",n=>_r=n)}const Ga=e=>{const t=jt;return gs(e),e.scope.on(),()=>{e.scope.off(),gs(t)}},nl=()=>{jt&&jt.scope.off(),gs(null)};function Uf(e){return e.vnode.shapeFlag&4}let _r=!1;function Hf(e,t=!1){t&&tl(t);const{props:n,children:a}=e.vnode,o=Uf(e);C_(e,n,o,t),x_(e,a);const r=o?V_(e,t):void 0;return t&&tl(!1),r}function V_(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Al(new Proxy(e.ctx,Ji));const{setup:a}=n;if(a){const o=e.setupContext=a.length>1?zf(e):null,r=Ga(e);Ja();const s=ea(a,e,0,[e.props,o]);if(Qa(),r(),hl(s)){if(s.then(nl,nl),t)return s.then(l=>{al(e,l,t)}).catch(l=>{qa(l,e,0)});e.asyncDep=s}else al(e,s,t)}else jf(e,t)}function al(e,t,n){Qe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:xt(t)&&(e.setupState=xl(t)),jf(e,n)}let ys,ol;function U_(e){ys=e,ol=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,t_))}}const H_=()=>!ys;function jf(e,t,n){const a=e.type;if(!e.render){if(!t&&ys&&!a.render){const o=a.template||Pl(e).template;if(o){const{isCustomElement:r,compilerOptions:s}=e.appContext.config,{delimiters:l,compilerOptions:c}=a,d=Nt(Nt({isCustomElement:r,delimiters:l},s),c);a.render=ys(o,d)}}e.render=a.render||hn,ol&&ol(e)}{const o=Ga(e);Ja();try{h_(e)}finally{Qa(),o()}}}function j_(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return gn(e,"get","$attrs"),t[n]}}))}function zf(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return j_(e)},slots:e.slots,emit:e.emit,expose:t}}function Ds(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(xl(Al(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Zo)return Zo[n](e)},has(t,n){return n in t||n in Zo}}))}function rl(e,t=!0){return Qe(e)?e.displayName||e.name:e.name||t&&e.__name}function z_(e){return Qe(e)&&"__vccOpts"in e}const J=(e,t)=>vy(e,t,_r);function wa(e,t,n=bt){const a=na(),o=cn(t),r=wn(t),s=Gd((c,d)=>{let h;return lf(()=>{const f=e[t];Rn(h,f)&&(h=f,d())}),{get(){return c(),n.get?n.get(h):h},set(f){const m=a.vnode.props;!(m&&(t in m||o in m||r in m)&&(`onUpdate:${t}`in m||`onUpdate:${o}`in m||`onUpdate:${r}`in m))&&Rn(f,h)&&(h=f,d()),a.emit(`update:${t}`,n.set?n.set(f):f)}}}),l=t==="modelValue"?"modelModifiers":`${t}Modifiers`;return s[Symbol.iterator]=()=>{let c=0;return{next(){return c<2?{value:c++?e[l]||{}:s,done:!1}:{done:!0}}}},s}function ba(e,t,n){const a=arguments.length;return a===2?xt(t)&&!Ue(t)?_a(t)?je(e,null,[t]):je(e,t):je(e,null,t):(a>3?n=Array.prototype.slice.call(arguments,2):a===3&&_a(n)&&(n=[n]),je(e,t,n))}function K_(){}function W_(e,t,n,a){const o=n[a];if(o&&Kf(o,e))return o;const r=t();return r.memo=e.slice(),n[a]=r}function Kf(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let a=0;a<n.length;a++)if(Rn(n[a],t[a]))return!1;return Wa>0&&vn&&vn.push(e),!0}const Wf="3.4.21",G_=hn,Y_=Sy,J_=uo,Q_=Xd,q_={createComponentInstance:Vf,setupComponent:Hf,renderComponentRoot:ss,setCurrentRenderingInstance:ur,isVNode:_a,normalizeVNode:Cn},X_=q_,Z_=null,eb=null,tb=null;/**
* @vue/runtime-dom v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const nb="http://www.w3.org/2000/svg",ab="http://www.w3.org/1998/Math/MathML",va=typeof document<"u"?document:null,Eu=va&&va.createElement("template"),ob={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,a)=>{const o=t==="svg"?va.createElementNS(nb,e):t==="mathml"?va.createElementNS(ab,e):va.createElement(e,n?{is:n}:void 0);return e==="select"&&a&&a.multiple!=null&&o.setAttribute("multiple",a.multiple),o},createText:e=>va.createTextNode(e),createComment:e=>va.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>va.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,a,o,r){const s=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===r||!(o=o.nextSibling)););else{Eu.innerHTML=a==="svg"?`<svg>${e}</svg>`:a==="mathml"?`<math>${e}</math>`:e;const l=Eu.content;if(a==="svg"||a==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ua="transition",Ho="animation",Io=Symbol("_vtc"),Bs=(e,{slots:t})=>ba(uf,Yf(e),t);Bs.displayName="Transition";const Gf={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},rb=Bs.props=Nt({},Ol,Gf),Oa=(e,t=[])=>{Ue(e)?e.forEach(n=>n(...t)):e&&e(...t)},$u=e=>e?Ue(e)?e.some(t=>t.length>1):e.length>1:!1;function Yf(e){const t={};for(const ae in e)ae in Gf||(t[ae]=e[ae]);if(e.css===!1)return t;const{name:n="v",type:a,duration:o,enterFromClass:r=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=r,appearActiveClass:d=s,appearToClass:h=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:k=`${n}-leave-to`}=e,S=sb(o),y=S&&S[0],b=S&&S[1],{onBeforeEnter:O,onEnter:I,onEnterCancelled:g,onLeave:p,onLeaveCancelled:A,onBeforeAppear:w=O,onAppear:V=I,onAppearCancelled:j=g}=t,ee=(ae,ue,Ce)=>{da(ae,ue?h:l),da(ae,ue?d:s),Ce&&Ce()},se=(ae,ue)=>{ae._isLeaving=!1,da(ae,f),da(ae,k),da(ae,m),ue&&ue()},le=ae=>(ue,Ce)=>{const Re=ae?V:I,pe=()=>ee(ue,ae,Ce);Oa(Re,[ue,pe]),Mu(()=>{da(ue,ae?c:r),qn(ue,ae?h:l),$u(Re)||Nu(ue,a,y,pe)})};return Nt(t,{onBeforeEnter(ae){Oa(O,[ae]),qn(ae,r),qn(ae,s)},onBeforeAppear(ae){Oa(w,[ae]),qn(ae,c),qn(ae,d)},onEnter:le(!1),onAppear:le(!0),onLeave(ae,ue){ae._isLeaving=!0;const Ce=()=>se(ae,ue);qn(ae,f),Qf(),qn(ae,m),Mu(()=>{ae._isLeaving&&(da(ae,f),qn(ae,k),$u(p)||Nu(ae,a,b,Ce))}),Oa(p,[ae,Ce])},onEnterCancelled(ae){ee(ae,!1),Oa(g,[ae])},onAppearCancelled(ae){ee(ae,!0),Oa(j,[ae])},onLeaveCancelled(ae){se(ae),Oa(A,[ae])}})}function sb(e){if(e==null)return null;if(xt(e))return[Mi(e.enter),Mi(e.leave)];{const t=Mi(e);return[t,t]}}function Mi(e){return ds(e)}function qn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Io]||(e[Io]=new Set)).add(t)}function da(e,t){t.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const n=e[Io];n&&(n.delete(t),n.size||(e[Io]=void 0))}function Mu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ib=0;function Nu(e,t,n,a){const o=e._endId=++ib,r=()=>{o===e._endId&&a()};if(n)return setTimeout(r,n);const{type:s,timeout:l,propCount:c}=Jf(e,t);if(!s)return a();const d=s+"end";let h=0;const f=()=>{e.removeEventListener(d,m),r()},m=k=>{k.target===e&&++h>=c&&f()};setTimeout(()=>{h<c&&f()},l+1),e.addEventListener(d,m)}function Jf(e,t){const n=window.getComputedStyle(e),a=S=>(n[S]||"").split(", "),o=a(`${ua}Delay`),r=a(`${ua}Duration`),s=Ou(o,r),l=a(`${Ho}Delay`),c=a(`${Ho}Duration`),d=Ou(l,c);let h=null,f=0,m=0;t===ua?s>0&&(h=ua,f=s,m=r.length):t===Ho?d>0&&(h=Ho,f=d,m=c.length):(f=Math.max(s,d),h=f>0?s>d?ua:Ho:null,m=h?h===ua?r.length:c.length:0);const k=h===ua&&/\b(transform|all)(,|$)/.test(a(`${ua}Property`).toString());return{type:h,timeout:f,propCount:m,hasTransform:k}}function Ou(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,a)=>Pu(n)+Pu(e[a])))}function Pu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Qf(){return document.body.offsetHeight}function lb(e,t,n){const a=e[Io];a&&(t=(t?[t,...a]:[...a]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const _s=Symbol("_vod"),qf=Symbol("_vsh"),un={beforeMount(e,{value:t},{transition:n}){e[_s]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):jo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:a}){!t!=!n&&(a?t?(a.beforeEnter(e),jo(e,!0),a.enter(e)):a.leave(e,()=>{jo(e,!1)}):jo(e,t))},beforeUnmount(e,{value:t}){jo(e,t)}};function jo(e,t){e.style.display=t?e[_s]:"none",e[qf]=!t}function cb(){un.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Xf=Symbol("");function Za(e){const t=na();if(!t)return;const n=t.ut=(o=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(r=>il(r,o))},a=()=>{const o=e(t.proxy);sl(t.subTree,o),n(o)};sf(a),Ft(()=>{const o=new MutationObserver(a);o.observe(t.subTree.el.parentNode,{childList:!0}),Bn(()=>o.disconnect())})}function sl(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{sl(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)il(e.el,t);else if(e.type===Oe)e.children.forEach(n=>sl(n,t));else if(e.type===Ha){let{el:n,anchor:a}=e;for(;n&&(il(n,t),n!==a);)n=n.nextSibling}}function il(e,t){if(e.nodeType===1){const n=e.style;let a="";for(const o in t)n.setProperty(`--${o}`,t[o]),a+=`--${o}: ${t[o]};`;n[Xf]=a}}const ub=/(^|;)\s*display\s*:/;function db(e,t,n){const a=e.style,o=Ot(n);let r=!1;if(n&&!o){if(t)if(Ot(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&ls(a,l,"")}else for(const s in t)n[s]==null&&ls(a,s,"");for(const s in n)s==="display"&&(r=!0),ls(a,s,n[s])}else if(o){if(t!==n){const s=a[Xf];s&&(n+=";"+s),a.cssText=n,r=ub.test(n)}}else t&&e.removeAttribute("style");_s in e&&(e[_s]=r?a.display:"",e[qf]&&(a.display="none"))}const Lu=/\s*!important$/;function ls(e,t,n){if(Ue(n))n.forEach(a=>ls(e,t,a));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const a=fb(e,t);Lu.test(n)?e.setProperty(wn(a),n.replace(Lu,""),"important"):e[a]=n}}const Ru=["Webkit","Moz","ms"],Ni={};function fb(e,t){const n=Ni[t];if(n)return n;let a=cn(t);if(a!=="filter"&&a in e)return Ni[t]=a;a=vr(a);for(let o=0;o<Ru.length;o++){const r=Ru[o]+a;if(r in e)return Ni[t]=r}return t}const Du="http://www.w3.org/1999/xlink";function pb(e,t,n,a,o){if(a&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Du,t.slice(6,t.length)):e.setAttributeNS(Du,t,n);else{const r=Hg(t);n==null||r&&!Sd(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}function hb(e,t,n,a,o,r,s){if(t==="innerHTML"||t==="textContent"){a&&s(a,o,r),e[t]=n??"";return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const d=l==="OPTION"?e.getAttribute("value")||"":e.value,h=n??"";(d!==h||!("_value"in e))&&(e.value=h),n==null&&e.removeAttribute(t),e._value=n;return}let c=!1;if(n===""||n==null){const d=typeof e[t];d==="boolean"?n=Sd(n):n==null&&d==="string"?(n="",c=!0):d==="number"&&(n=0,c=!0)}try{e[t]=n}catch{}c&&e.removeAttribute(t)}function Xn(e,t,n,a){e.addEventListener(t,n,a)}function vb(e,t,n,a){e.removeEventListener(t,n,a)}const Bu=Symbol("_vei");function mb(e,t,n,a,o=null){const r=e[Bu]||(e[Bu]={}),s=r[t];if(a&&s)s.value=a;else{const[l,c]=gb(t);if(a){const d=r[t]=bb(a,o);Xn(e,l,d,c)}else s&&(vb(e,l,s,c),r[t]=void 0)}}const Fu=/(?:Once|Passive|Capture)$/;function gb(e){let t;if(Fu.test(e)){t={};let a;for(;a=e.match(Fu);)e=e.slice(0,e.length-a[0].length),t[a[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):wn(e.slice(2)),t]}let Oi=0;const yb=Promise.resolve(),_b=()=>Oi||(yb.then(()=>Oi=0),Oi=Date.now());function bb(e,t){const n=a=>{if(!a._vts)a._vts=Date.now();else if(a._vts<=n.attached)return;In(Ab(a,n.value),t,5,[a])};return n.value=e,n.attached=_b(),n}function Ab(e,t){if(Ue(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(a=>o=>!o._stopped&&a&&a(o))}else return t}const Vu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Cb=(e,t,n,a,o,r,s,l,c)=>{const d=o==="svg";t==="class"?lb(e,a,d):t==="style"?db(e,n,a):hr(t)?fl(t)||mb(e,t,n,a,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):wb(e,t,a,d))?hb(e,t,a,r,s,l,c):(t==="true-value"?e._trueValue=a:t==="false-value"&&(e._falseValue=a),pb(e,t,a,d))};function wb(e,t,n,a){if(a)return!!(t==="innerHTML"||t==="textContent"||t in e&&Vu(t)&&Qe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Vu(t)&&Ot(n)?!1:t in e}/*! #__NO_SIDE_EFFECTS__ */function Zf(e,t){const n=Ie(e);class a extends Fs{constructor(r){super(n,r,t)}}return a.def=n,a}/*! #__NO_SIDE_EFFECTS__ */const Ib=e=>Zf(e,lp),xb=typeof HTMLElement<"u"?HTMLElement:class{};class Fs extends xb{constructor(t,n={},a){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&a?a(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),mn(()=>{this._connected||(ll(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let a=0;a<this.attributes.length;a++)this._setAttr(this.attributes[a].name);this._ob=new MutationObserver(a=>{for(const o of a)this._setAttr(o.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(a,o=!1)=>{const{props:r,styles:s}=a;let l;if(r&&!Ue(r))for(const c in r){const d=r[c];(d===Number||d&&d.type===Number)&&(c in this._props&&(this._props[c]=ds(this._props[c])),(l||(l=Object.create(null)))[cn(c)]=!0)}this._numberProps=l,o&&this._resolveProps(a),this._applyStyles(s),this._update()},n=this._def.__asyncLoader;n?n().then(a=>t(a,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,a=Ue(n)?n:Object.keys(n||{});for(const o of Object.keys(this))o[0]!=="_"&&a.includes(o)&&this._setProp(o,this[o],!0,!1);for(const o of a.map(cn))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(r){this._setProp(o,r)}})}_setAttr(t){let n=this.getAttribute(t);const a=cn(t);this._numberProps&&this._numberProps[a]&&(n=ds(n)),this._setProp(a,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,a=!0,o=!0){n!==this._props[t]&&(this._props[t]=n,o&&this._instance&&this._update(),a&&(n===!0?this.setAttribute(wn(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(wn(t),n+""):n||this.removeAttribute(wn(t))))}_update(){ll(this._createVNode(),this.shadowRoot)}_createVNode(){const t=je(this._def,Nt({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const a=(r,s)=>{this.dispatchEvent(new CustomEvent(r,{detail:s}))};n.emit=(r,...s)=>{a(r,s),wn(r)!==r&&a(wn(r),s)};let o=this;for(;o=o&&(o.parentNode||o.host);)if(o instanceof Fs){n.parent=o._instance,n.provides=o._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const a=document.createElement("style");a.textContent=n,this.shadowRoot.appendChild(a)})}}function kb(e="$style"){{const t=na();if(!t)return bt;const n=t.type.__cssModules;if(!n)return bt;const a=n[e];return a||bt}}const ep=new WeakMap,tp=new WeakMap,bs=Symbol("_moveCb"),Uu=Symbol("_enterCb"),np={name:"TransitionGroup",props:Nt({},rb,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=na(),a=Nl();let o,r;return Ls(()=>{if(!o.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!Nb(o[0].el,n.vnode.el,s))return;o.forEach(Eb),o.forEach($b);const l=o.filter(Mb);Qf(),l.forEach(c=>{const d=c.el,h=d.style;qn(d,s),h.transform=h.webkitTransform=h.transitionDuration="";const f=d[bs]=m=>{m&&m.target!==d||(!m||/transform$/.test(m.propertyName))&&(d.removeEventListener("transitionend",f),d[bs]=null,da(d,s))};d.addEventListener("transitionend",f)})}),()=>{const s=ut(e),l=Yf(s);let c=s.tag||Oe;o=r,r=t.default?Os(t.default()):[];for(let d=0;d<r.length;d++){const h=r[d];h.key!=null&&za(h,wo(h,l,a,n))}if(o)for(let d=0;d<o.length;d++){const h=o[d];za(h,wo(h,l,a,n)),ep.set(h,h.el.getBoundingClientRect())}return je(c,null,r)}}},Sb=e=>delete e.mode;np.props;const Tb=np;function Eb(e){const t=e.el;t[bs]&&t[bs](),t[Uu]&&t[Uu]()}function $b(e){tp.set(e,e.el.getBoundingClientRect())}function Mb(e){const t=ep.get(e),n=tp.get(e),a=t.left-n.left,o=t.top-n.top;if(a||o){const r=e.el.style;return r.transform=r.webkitTransform=`translate(${a}px,${o}px)`,r.transitionDuration="0s",e}}function Nb(e,t,n){const a=e.cloneNode(),o=e[Io];o&&o.forEach(l=>{l.split(/\s+/).forEach(c=>c&&a.classList.remove(c))}),n.split(/\s+/).forEach(l=>l&&a.classList.add(l)),a.style.display="none";const r=t.nodeType===1?t:t.parentNode;r.appendChild(a);const{hasTransform:s}=Jf(a);return r.removeChild(a),s}const Aa=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ue(t)?n=>mo(t,n):t};function Ob(e){e.target.composing=!0}function Hu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Sn=Symbol("_assign"),xo={created(e,{modifiers:{lazy:t,trim:n,number:a}},o){e[Sn]=Aa(o);const r=a||o.props&&o.props.type==="number";Xn(e,t?"change":"input",s=>{if(s.target.composing)return;let l=e.value;n&&(l=l.trim()),r&&(l=rr(l)),e[Sn](l)}),n&&Xn(e,"change",()=>{e.value=e.value.trim()}),t||(Xn(e,"compositionstart",Ob),Xn(e,"compositionend",Hu),Xn(e,"change",Hu))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:a,number:o}},r){if(e[Sn]=Aa(r),e.composing)return;const s=o||e.type==="number"?rr(e.value):e.value,l=t??"";s!==l&&(document.activeElement===e&&e.type!=="range"&&(n||a&&e.value.trim()===l)||(e.value=l))}},Bl={deep:!0,created(e,t,n){e[Sn]=Aa(n),Xn(e,"change",()=>{const a=e._modelValue,o=ko(e),r=e.checked,s=e[Sn];if(Ue(a)){const l=xs(a,o),c=l!==-1;if(r&&!c)s(a.concat(o));else if(!r&&c){const d=[...a];d.splice(l,1),s(d)}}else if(Ya(a)){const l=new Set(a);r?l.add(o):l.delete(o),s(l)}else s(ap(e,r))})},mounted:ju,beforeUpdate(e,t,n){e[Sn]=Aa(n),ju(e,t,n)}};function ju(e,{value:t,oldValue:n},a){e._modelValue=t,Ue(t)?e.checked=xs(t,a.props.value)>-1:Ya(t)?e.checked=t.has(a.props.value):t!==n&&(e.checked=ya(t,ap(e,!0)))}const Fl={created(e,{value:t},n){e.checked=ya(t,n.props.value),e[Sn]=Aa(n),Xn(e,"change",()=>{e[Sn](ko(e))})},beforeUpdate(e,{value:t,oldValue:n},a){e[Sn]=Aa(a),t!==n&&(e.checked=ya(t,a.props.value))}},Vl={deep:!0,created(e,{value:t,modifiers:{number:n}},a){const o=Ya(t);Xn(e,"change",()=>{const r=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?rr(ko(s)):ko(s));e[Sn](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,mn(()=>{e._assigning=!1})}),e[Sn]=Aa(a)},mounted(e,{value:t,modifiers:{number:n}}){zu(e,t,n)},beforeUpdate(e,t,n){e[Sn]=Aa(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||zu(e,t,n)}};function zu(e,t,n){const a=e.multiple,o=Ue(t);if(!(a&&!o&&!Ya(t))){for(let r=0,s=e.options.length;r<s;r++){const l=e.options[r],c=ko(l);if(a)if(o){const d=typeof c;d==="string"||d==="number"?l.selected=t.includes(n?rr(c):c):l.selected=xs(t,c)>-1}else l.selected=t.has(c);else if(ya(ko(l),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!a&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ko(e){return"_value"in e?e._value:e.value}function ap(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const As={created(e,t,n){Xr(e,t,n,null,"created")},mounted(e,t,n){Xr(e,t,n,null,"mounted")},beforeUpdate(e,t,n,a){Xr(e,t,n,a,"beforeUpdate")},updated(e,t,n,a){Xr(e,t,n,a,"updated")}};function op(e,t){switch(e){case"SELECT":return Vl;case"TEXTAREA":return xo;default:switch(t){case"checkbox":return Bl;case"radio":return Fl;default:return xo}}}function Xr(e,t,n,a,o){const s=op(e.tagName,n.props&&n.props.type)[o];s&&s(e,t,n,a)}function Pb(){xo.getSSRProps=({value:e})=>({value:e}),Fl.getSSRProps=({value:e},t)=>{if(t.props&&ya(t.props.value,e))return{checked:!0}},Bl.getSSRProps=({value:e},t)=>{if(Ue(e)){if(t.props&&xs(e,t.props.value)>-1)return{checked:!0}}else if(Ya(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},As.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=op(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const Lb=["ctrl","shift","alt","meta"],Rb={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Lb.some(n=>e[`${n}Key`]&&!t.includes(n))},So=(e,t)=>{const n=e._withMods||(e._withMods={}),a=t.join(".");return n[a]||(n[a]=(o,...r)=>{for(let s=0;s<t.length;s++){const l=Rb[t[s]];if(l&&l(o,t))return}return e(o,...r)})},Db={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ca=(e,t)=>{const n=e._withKeys||(e._withKeys={}),a=t.join(".");return n[a]||(n[a]=o=>{if(!("key"in o))return;const r=wn(o.key);if(t.some(s=>s===r||Db[s]===r))return e(o)})},rp=Nt({patchProp:Cb},ob);let ar,Ku=!1;function sp(){return ar||(ar=$f(rp))}function ip(){return ar=Ku?ar:Mf(rp),Ku=!0,ar}const ll=(...e)=>{sp().render(...e)},lp=(...e)=>{ip().hydrate(...e)},cp=(...e)=>{const t=sp().createApp(...e),{mount:n}=t;return t.mount=a=>{const o=dp(a);if(!o)return;const r=t._component;!Qe(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,up(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},Bb=(...e)=>{const t=ip().createApp(...e),{mount:n}=t;return t.mount=a=>{const o=dp(a);if(o)return n(o,!0,up(o))},t};function up(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function dp(e){return Ot(e)?document.querySelector(e):e}let Wu=!1;const Fb=()=>{Wu||(Wu=!0,Pb(),cb())};/**
* vue v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Vb=()=>{},Ub=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:uf,BaseTransitionPropsValidators:Ol,Comment:rn,DeprecationTypes:tb,EffectScope:ml,ErrorCodes:ky,ErrorTypeStrings:Y_,Fragment:Oe,KeepAlive:qy,ReactiveEffect:Ao,Static:Ha,Suspense:Uy,Teleport:P_,Text:Ka,TrackOpTypes:wy,Transition:Bs,TransitionGroup:Tb,TriggerOpTypes:Iy,VueElement:Fs,assertNumber:xy,callWithAsyncErrorHandling:In,callWithErrorHandling:ea,camelize:cn,capitalize:vr,cloneVNode:jn,compatUtils:eb,compile:Vb,computed:J,createApp:cp,createBlock:Fe,createCommentVNode:Ae,createElementBlock:N,createElementVNode:U,createHydrationRenderer:Mf,createPropsRestProxy:f_,createRenderer:$f,createSSRApp:Bb,createSlots:Zy,createStaticVNode:D_,createTextVNode:At,createVNode:je,customRef:Gd,defineAsyncComponent:Gi,defineComponent:Ie,defineCustomElement:Zf,defineEmits:a_,defineExpose:o_,defineModel:i_,defineOptions:r_,defineProps:n_,defineSSRCustomElement:Ib,defineSlots:s_,devtools:J_,effect:Gg,effectScope:zg,getCurrentInstance:na,getCurrentScope:$d,getTransitionRawChildren:Os,guardReactiveProps:Ff,h:ba,handleError:qa,hasInjectionContext:A_,hydrate:lp,initCustomFormatter:K_,initDirectivesForSSR:Fb,inject:W,isMemoSame:Kf,isProxy:bl,isReactive:Va,isReadonly:ja,isRef:Qt,isRuntimeOnly:H_,isShallow:sr,isVNode:_a,markRaw:Al,mergeDefaults:d_,mergeModels:$o,mergeProps:nr,nextTick:mn,normalizeClass:st,normalizeProps:Vg,normalizeStyle:it,onActivated:ff,onBeforeMount:Eo,onBeforeUnmount:Xa,onBeforeUpdate:vf,onDeactivated:pf,onErrorCaptured:_f,onMounted:Ft,onRenderTracked:yf,onRenderTriggered:gf,onScopeDispose:Kg,onServerPrefetch:mf,onUnmounted:Bn,onUpdated:Ls,openBlock:C,popScopeId:Kt,provide:If,proxyRefs:xl,pushScopeId:zt,queuePostFlushCb:ps,reactive:Ts,readonly:On,ref:q,registerRuntimeCompiler:U_,render:ll,renderList:mt,renderSlot:$t,resolveComponent:Fy,resolveDirective:tf,resolveDynamicComponent:mr,resolveFilter:Z_,resolveTransitionHooks:wo,setBlockTracking:el,setDevtoolsHook:Q_,setTransitionHooks:za,shallowReactive:zd,shallowReadonly:hy,shallowRef:Il,ssrContextKey:of,ssrUtils:X_,stop:Yg,toDisplayString:be,toHandlerKey:Xo,toHandlers:e_,toRaw:ut,toRef:Co,toRefs:kl,toValue:yy,transformVNodeArgs:L_,triggerRef:gy,unref:T,useAttrs:u_,useCssModule:kb,useCssVars:Za,useModel:wa,useSSRContext:rf,useSlots:c_,useTransitionState:Nl,vModelCheckbox:Bl,vModelDynamic:As,vModelRadio:Fl,vModelSelect:Vl,vModelText:xo,vShow:un,version:Wf,warn:G_,watch:He,watchEffect:Gy,watchPostEffect:sf,watchSyncEffect:lf,withAsyncContext:p_,withCtx:Ge,withDefaults:l_,withDirectives:Bt,withKeys:Ca,withMemo:W_,withModifiers:So,withScopeId:Oy},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */const{entries:fp,setPrototypeOf:Gu,isFrozen:Hb,getPrototypeOf:jb,getOwnPropertyDescriptor:zb}=Object;let{freeze:dn,seal:Dn,create:pp}=Object,{apply:cl,construct:ul}=typeof Reflect<"u"&&Reflect;dn||(dn=function(t){return t});Dn||(Dn=function(t){return t});cl||(cl=function(t,n,a){return t.apply(n,a)});ul||(ul=function(t,n){return new t(...n)});const Zr=xn(Array.prototype.forEach),Yu=xn(Array.prototype.pop),zo=xn(Array.prototype.push),cs=xn(String.prototype.toLowerCase),Pi=xn(String.prototype.toString),Kb=xn(String.prototype.match),Ko=xn(String.prototype.replace),Wb=xn(String.prototype.indexOf),Gb=xn(String.prototype.trim),Nn=xn(Object.prototype.hasOwnProperty),bn=xn(RegExp.prototype.test),Wo=Yb(TypeError);function xn(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return cl(e,t,a)}}function Yb(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return ul(e,n)}}function rt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:cs;Gu&&Gu(e,null);let a=t.length;for(;a--;){let o=t[a];if(typeof o=="string"){const r=n(o);r!==o&&(Hb(t)||(t[a]=r),o=r)}e[o]=!0}return e}function Jb(e){for(let t=0;t<e.length;t++)Nn(e,t)||(e[t]=null);return e}function Pa(e){const t=pp(null);for(const[n,a]of fp(e))Nn(e,n)&&(Array.isArray(a)?t[n]=Jb(a):a&&typeof a=="object"&&a.constructor===Object?t[n]=Pa(a):t[n]=a);return t}function es(e,t){for(;e!==null;){const a=zb(e,t);if(a){if(a.get)return xn(a.get);if(typeof a.value=="function")return xn(a.value)}e=jb(e)}function n(){return null}return n}const Ju=dn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Li=dn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ri=dn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Qb=dn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Di=dn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),qb=dn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Qu=dn(["#text"]),qu=dn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Bi=dn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Xu=dn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ts=dn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Xb=Dn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Zb=Dn(/<%[\w\W]*|[\w\W]*%>/gm),e0=Dn(/\${[\w\W]*}/gm),t0=Dn(/^data-[\-\w.\u00B7-\uFFFF]/),n0=Dn(/^aria-[\-\w]+$/),hp=Dn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),a0=Dn(/^(?:\w+script|data):/i),o0=Dn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vp=Dn(/^html$/i);var Zu=Object.freeze({__proto__:null,MUSTACHE_EXPR:Xb,ERB_EXPR:Zb,TMPLIT_EXPR:e0,DATA_ATTR:t0,ARIA_ATTR:n0,IS_ALLOWED_URI:hp,IS_SCRIPT_OR_DATA:a0,ATTR_WHITESPACE:o0,DOCTYPE_NAME:vp});const r0=function(){return typeof window>"u"?null:window},s0=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(a=n.getAttribute(o));const r="dompurify"+(a?"#"+a:"");try{return t.createPolicy(r,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}};function mp(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r0();const t=ze=>mp(ze);if(t.version="3.0.9",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const a=n,o=a.currentScript,{DocumentFragment:r,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:d,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:m,trustedTypes:k}=e,S=c.prototype,y=es(S,"cloneNode"),b=es(S,"nextSibling"),O=es(S,"childNodes"),I=es(S,"parentNode");if(typeof s=="function"){const ze=n.createElement("template");ze.content&&ze.content.ownerDocument&&(n=ze.content.ownerDocument)}let g,p="";const{implementation:A,createNodeIterator:w,createDocumentFragment:V,getElementsByTagName:j}=n,{importNode:ee}=a;let se={};t.isSupported=typeof fp=="function"&&typeof I=="function"&&A&&A.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:le,ERB_EXPR:ae,TMPLIT_EXPR:ue,DATA_ATTR:Ce,ARIA_ATTR:Re,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:he}=Zu;let{IS_ALLOWED_URI:de}=Zu,Le=null;const kt=rt({},[...Ju,...Li,...Ri,...Di,...Qu]);let qe=null;const Ct=rt({},[...qu,...Bi,...Xu,...ts]);let $e=Object.seal(pp(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ke=null,at=null,Xe=!0,$=!0,R=!1,B=!0,K=!1,X=!1,Se=!1,_=!1,M=!1,Q=!1,te=!1,re=!0,ye=!1;const xe="user-content-";let me=!0,_e=!1,ce={},Ee=null;const H=rt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Z=null;const oe=rt({},["audio","video","img","source","image","track"]);let ie=null;const Te=rt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ne="http://www.w3.org/1998/Math/MathML",We="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let lt=Ze,St=!1,Et=null;const Pt=rt({},[Ne,We,Ze],Pi);let wt=null;const Ut=["application/xhtml+xml","text/html"],ka="text/html";let Lt=null,aa=null;const Ws=n.createElement("form"),wr=function(F){return F instanceof RegExp||F instanceof Function},Po=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(aa&&aa===F)){if((!F||typeof F!="object")&&(F={}),F=Pa(F),wt=Ut.indexOf(F.PARSER_MEDIA_TYPE)===-1?ka:F.PARSER_MEDIA_TYPE,Lt=wt==="application/xhtml+xml"?Pi:cs,Le=Nn(F,"ALLOWED_TAGS")?rt({},F.ALLOWED_TAGS,Lt):kt,qe=Nn(F,"ALLOWED_ATTR")?rt({},F.ALLOWED_ATTR,Lt):Ct,Et=Nn(F,"ALLOWED_NAMESPACES")?rt({},F.ALLOWED_NAMESPACES,Pi):Pt,ie=Nn(F,"ADD_URI_SAFE_ATTR")?rt(Pa(Te),F.ADD_URI_SAFE_ATTR,Lt):Te,Z=Nn(F,"ADD_DATA_URI_TAGS")?rt(Pa(oe),F.ADD_DATA_URI_TAGS,Lt):oe,Ee=Nn(F,"FORBID_CONTENTS")?rt({},F.FORBID_CONTENTS,Lt):H,Ke=Nn(F,"FORBID_TAGS")?rt({},F.FORBID_TAGS,Lt):{},at=Nn(F,"FORBID_ATTR")?rt({},F.FORBID_ATTR,Lt):{},ce=Nn(F,"USE_PROFILES")?F.USE_PROFILES:!1,Xe=F.ALLOW_ARIA_ATTR!==!1,$=F.ALLOW_DATA_ATTR!==!1,R=F.ALLOW_UNKNOWN_PROTOCOLS||!1,B=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,K=F.SAFE_FOR_TEMPLATES||!1,X=F.WHOLE_DOCUMENT||!1,M=F.RETURN_DOM||!1,Q=F.RETURN_DOM_FRAGMENT||!1,te=F.RETURN_TRUSTED_TYPE||!1,_=F.FORCE_BODY||!1,re=F.SANITIZE_DOM!==!1,ye=F.SANITIZE_NAMED_PROPS||!1,me=F.KEEP_CONTENT!==!1,_e=F.IN_PLACE||!1,de=F.ALLOWED_URI_REGEXP||hp,lt=F.NAMESPACE||Ze,$e=F.CUSTOM_ELEMENT_HANDLING||{},F.CUSTOM_ELEMENT_HANDLING&&wr(F.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($e.tagNameCheck=F.CUSTOM_ELEMENT_HANDLING.tagNameCheck),F.CUSTOM_ELEMENT_HANDLING&&wr(F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($e.attributeNameCheck=F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($e.allowCustomizedBuiltInElements=F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&($=!1),Q&&(M=!0),ce&&(Le=rt({},Qu),qe=[],ce.html===!0&&(rt(Le,Ju),rt(qe,qu)),ce.svg===!0&&(rt(Le,Li),rt(qe,Bi),rt(qe,ts)),ce.svgFilters===!0&&(rt(Le,Ri),rt(qe,Bi),rt(qe,ts)),ce.mathMl===!0&&(rt(Le,Di),rt(qe,Xu),rt(qe,ts))),F.ADD_TAGS&&(Le===kt&&(Le=Pa(Le)),rt(Le,F.ADD_TAGS,Lt)),F.ADD_ATTR&&(qe===Ct&&(qe=Pa(qe)),rt(qe,F.ADD_ATTR,Lt)),F.ADD_URI_SAFE_ATTR&&rt(ie,F.ADD_URI_SAFE_ATTR,Lt),F.FORBID_CONTENTS&&(Ee===H&&(Ee=Pa(Ee)),rt(Ee,F.FORBID_CONTENTS,Lt)),me&&(Le["#text"]=!0),X&&rt(Le,["html","head","body"]),Le.table&&(rt(Le,["tbody"]),delete Ke.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw Wo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Wo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=F.TRUSTED_TYPES_POLICY,p=g.createHTML("")}else g===void 0&&(g=s0(k,o)),g!==null&&typeof p=="string"&&(p=g.createHTML(""));dn&&dn(F),aa=F}},Ir=rt({},["mi","mo","mn","ms","mtext"]),xr=rt({},["foreignobject","desc","title","annotation-xml"]),Gs=rt({},["title","style","font","a","script"]),kr=rt({},[...Li,...Ri,...Qb]),Sr=rt({},[...Di,...qb]),Ys=function(F){let we=I(F);(!we||!we.tagName)&&(we={namespaceURI:lt,tagName:"template"});const Ve=cs(F.tagName),It=cs(we.tagName);return Et[F.namespaceURI]?F.namespaceURI===We?we.namespaceURI===Ze?Ve==="svg":we.namespaceURI===Ne?Ve==="svg"&&(It==="annotation-xml"||Ir[It]):!!kr[Ve]:F.namespaceURI===Ne?we.namespaceURI===Ze?Ve==="math":we.namespaceURI===We?Ve==="math"&&xr[It]:!!Sr[Ve]:F.namespaceURI===Ze?we.namespaceURI===We&&!xr[It]||we.namespaceURI===Ne&&!Ir[It]?!1:!Sr[Ve]&&(Gs[Ve]||!kr[Ve]):!!(wt==="application/xhtml+xml"&&Et[F.namespaceURI]):!1},Gn=function(F){zo(t.removed,{element:F});try{F.parentNode.removeChild(F)}catch{F.remove()}},Lo=function(F,we){try{zo(t.removed,{attribute:we.getAttributeNode(F),from:we})}catch{zo(t.removed,{attribute:null,from:we})}if(we.removeAttribute(F),F==="is"&&!qe[F])if(M||Q)try{Gn(we)}catch{}else try{we.setAttribute(F,"")}catch{}},Ro=function(F){let we=null,Ve=null;if(_)F="<remove></remove>"+F;else{const Gt=Kb(F,/^[\r\n\t ]+/);Ve=Gt&&Gt[0]}wt==="application/xhtml+xml"&&lt===Ze&&(F='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+F+"</body></html>");const It=g?g.createHTML(F):F;if(lt===Ze)try{we=new m().parseFromString(It,wt)}catch{}if(!we||!we.documentElement){we=A.createDocument(lt,"template",null);try{we.documentElement.innerHTML=St?p:It}catch{}}const Ht=we.body||we.documentElement;return F&&Ve&&Ht.insertBefore(n.createTextNode(Ve),Ht.childNodes[0]||null),lt===Ze?j.call(we,X?"html":"body")[0]:X?we.documentElement:Ht},Do=function(F){return w.call(F.ownerDocument||F,F,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null)},Js=function(F){return F instanceof f&&(typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||!(F.attributes instanceof h)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function")},Tr=function(F){return typeof l=="function"&&F instanceof l},Tn=function(F,we,Ve){se[F]&&Zr(se[F],It=>{It.call(t,we,Ve,aa)})},Sa=function(F){let we=null;if(Tn("beforeSanitizeElements",F,null),Js(F))return Gn(F),!0;const Ve=Lt(F.nodeName);if(Tn("uponSanitizeElement",F,{tagName:Ve,allowedTags:Le}),F.hasChildNodes()&&!Tr(F.firstElementChild)&&bn(/<[/\w]/g,F.innerHTML)&&bn(/<[/\w]/g,F.textContent))return Gn(F),!0;if(!Le[Ve]||Ke[Ve]){if(!Ke[Ve]&&Bo(Ve)&&($e.tagNameCheck instanceof RegExp&&bn($e.tagNameCheck,Ve)||$e.tagNameCheck instanceof Function&&$e.tagNameCheck(Ve)))return!1;if(me&&!Ee[Ve]){const It=I(F)||F.parentNode,Ht=O(F)||F.childNodes;if(Ht&&It){const Gt=Ht.length;for(let tn=Gt-1;tn>=0;--tn)It.insertBefore(y(Ht[tn],!0),b(F))}}return Gn(F),!0}return F instanceof c&&!Ys(F)||(Ve==="noscript"||Ve==="noembed"||Ve==="noframes")&&bn(/<\/no(script|embed|frames)/i,F.innerHTML)?(Gn(F),!0):(K&&F.nodeType===3&&(we=F.textContent,Zr([le,ae,ue],It=>{we=Ko(we,It," ")}),F.textContent!==we&&(zo(t.removed,{element:F.cloneNode()}),F.textContent=we)),Tn("afterSanitizeElements",F,null),!1)},Er=function(F,we,Ve){if(re&&(we==="id"||we==="name")&&(Ve in n||Ve in Ws))return!1;if(!($&&!at[we]&&bn(Ce,we))){if(!(Xe&&bn(Re,we))){if(!qe[we]||at[we]){if(!(Bo(F)&&($e.tagNameCheck instanceof RegExp&&bn($e.tagNameCheck,F)||$e.tagNameCheck instanceof Function&&$e.tagNameCheck(F))&&($e.attributeNameCheck instanceof RegExp&&bn($e.attributeNameCheck,we)||$e.attributeNameCheck instanceof Function&&$e.attributeNameCheck(we))||we==="is"&&$e.allowCustomizedBuiltInElements&&($e.tagNameCheck instanceof RegExp&&bn($e.tagNameCheck,Ve)||$e.tagNameCheck instanceof Function&&$e.tagNameCheck(Ve))))return!1}else if(!ie[we]){if(!bn(de,Ko(Ve,he,""))){if(!((we==="src"||we==="xlink:href"||we==="href")&&F!=="script"&&Wb(Ve,"data:")===0&&Z[F])){if(!(R&&!bn(pe,Ko(Ve,he,"")))){if(Ve)return!1}}}}}}return!0},Bo=function(F){return F!=="annotation-xml"&&F.indexOf("-")>0},$r=function(F){Tn("beforeSanitizeAttributes",F,null);const{attributes:we}=F;if(!we)return;const Ve={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:qe};let It=we.length;for(;It--;){const Ht=we[It],{name:Gt,namespaceURI:tn,value:Fn}=Ht,Ta=Lt(Gt);let nn=Gt==="value"?Fn:Gb(Fn);if(Ve.attrName=Ta,Ve.attrValue=nn,Ve.keepAttr=!0,Ve.forceKeepAttr=void 0,Tn("uponSanitizeAttribute",F,Ve),nn=Ve.attrValue,Ve.forceKeepAttr||(Lo(Gt,F),!Ve.keepAttr))continue;if(!B&&bn(/\/>/i,nn)){Lo(Gt,F);continue}K&&Zr([le,ae,ue],Nr=>{nn=Ko(nn,Nr," ")});const Mr=Lt(F.nodeName);if(Er(Mr,Ta,nn)){if(ye&&(Ta==="id"||Ta==="name")&&(Lo(Gt,F),nn=xe+nn),g&&typeof k=="object"&&typeof k.getAttributeType=="function"&&!tn)switch(k.getAttributeType(Mr,Ta)){case"TrustedHTML":{nn=g.createHTML(nn);break}case"TrustedScriptURL":{nn=g.createScriptURL(nn);break}}try{tn?F.setAttributeNS(tn,Gt,nn):F.setAttribute(Gt,nn),Yu(t.removed)}catch{}}}Tn("afterSanitizeAttributes",F,null)},Qs=function ze(F){let we=null;const Ve=Do(F);for(Tn("beforeSanitizeShadowDOM",F,null);we=Ve.nextNode();)Tn("uponSanitizeShadowNode",we,null),!Sa(we)&&(we.content instanceof r&&ze(we.content),$r(we));Tn("afterSanitizeShadowDOM",F,null)};return t.sanitize=function(ze){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},we=null,Ve=null,It=null,Ht=null;if(St=!ze,St&&(ze="<!-->"),typeof ze!="string"&&!Tr(ze))if(typeof ze.toString=="function"){if(ze=ze.toString(),typeof ze!="string")throw Wo("dirty is not a string, aborting")}else throw Wo("toString is not a function");if(!t.isSupported)return ze;if(Se||Po(F),t.removed=[],typeof ze=="string"&&(_e=!1),_e){if(ze.nodeName){const Fn=Lt(ze.nodeName);if(!Le[Fn]||Ke[Fn])throw Wo("root node is forbidden and cannot be sanitized in-place")}}else if(ze instanceof l)we=Ro("<!---->"),Ve=we.ownerDocument.importNode(ze,!0),Ve.nodeType===1&&Ve.nodeName==="BODY"||Ve.nodeName==="HTML"?we=Ve:we.appendChild(Ve);else{if(!M&&!K&&!X&&ze.indexOf("<")===-1)return g&&te?g.createHTML(ze):ze;if(we=Ro(ze),!we)return M?null:te?p:""}we&&_&&Gn(we.firstChild);const Gt=Do(_e?ze:we);for(;It=Gt.nextNode();)Sa(It)||(It.content instanceof r&&Qs(It.content),$r(It));if(_e)return ze;if(M){if(Q)for(Ht=V.call(we.ownerDocument);we.firstChild;)Ht.appendChild(we.firstChild);else Ht=we;return(qe.shadowroot||qe.shadowrootmode)&&(Ht=ee.call(a,Ht,!0)),Ht}let tn=X?we.outerHTML:we.innerHTML;return X&&Le["!doctype"]&&we.ownerDocument&&we.ownerDocument.doctype&&we.ownerDocument.doctype.name&&bn(vp,we.ownerDocument.doctype.name)&&(tn="<!DOCTYPE "+we.ownerDocument.doctype.name+`>
`+tn),K&&Zr([le,ae,ue],Fn=>{tn=Ko(tn,Fn," ")}),g&&te?g.createHTML(tn):tn},t.setConfig=function(){let ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Po(ze),Se=!0},t.clearConfig=function(){aa=null,Se=!1},t.isValidAttribute=function(ze,F,we){aa||Po({});const Ve=Lt(ze),It=Lt(F);return Er(Ve,It,we)},t.addHook=function(ze,F){typeof F=="function"&&(se[ze]=se[ze]||[],zo(se[ze],F))},t.removeHook=function(ze){if(se[ze])return Yu(se[ze])},t.removeHooks=function(ze){se[ze]&&(se[ze]=[])},t.removeAllHooks=function(){se={}},t}var i0=mp();function l0(e,t){const n=e.hooks??{};let a;for(a in n){const o=n[a];o!==void 0&&t.addHook(a,o)}}function gp(){return i0()}function c0(e={},t=gp){const n=t();l0(e,n);const a=function(o,r){const s=r.value;if(r.oldValue===s)return;const l=`${s}`,c=r.arg,d=e.namedConfigurations,h=e.default??{};if(d&&c!==void 0){o.innerHTML=n.sanitize(l,d[c]??h);return}o.innerHTML=n.sanitize(l,h)};return{mounted:a,updated:a}}const u0={install(e,t={},n=gp){e.directive("dompurify-html",c0(t,n))}},d0=1500,f0=1e3,p0=100;function h0(){const t=q({mode:"ui",selection:null,clipboard:null,mutationTransactionsSnapshot:{undo:null,redo:null},logEntries:[]});let n=null,a=0;const o=[],r=le=>{t.value.mode=le},s=()=>t.value.mode,l=(le,ae,ue)=>{if(le===null){t.value.selection=null;return}let Ce=ae;if(typeof Ce>"u"){const Re=document.querySelector(`.ComponentRenderer [data-writer-id="${le}"]`);Ce=Re==null?void 0:Re.dataset.writerInstancePath}t.value.selection={componentId:le,instancePath:Ce,source:ue}},c=()=>t.value.selection!==null,d=()=>t.value.selection,h=()=>{var le;return(le=t.value.selection)==null?void 0:le.componentId},f=le=>{t.value.clipboard=le},m=()=>t.value.clipboard,k=(le,ae,ue=!1)=>{if(n!==null)return;a<0&&(o.splice(a),a=0);const Ce=o[o.length-1],Re=Date.now()-(Ce==null?void 0:Ce.timestamp);if(Ce!=null&&Ce.enableDebounce&&(Ce==null?void 0:Ce.id)==le&&Re<f0){n=o.pop();return}n={id:le,desc:ae,timestamp:null,enableDebounce:ue,mutations:{}}},S=le=>{n.mutations[le.id]||(n.mutations[le.id]={jsonPre:le?JSON.stringify(le):void 0})},y=le=>{n.mutations[le.id]||(n.mutations[le.id]={}),n.mutations[le.id].jsonPost=le?JSON.stringify(le):void 0},b=le=>{n.id===le&&(n.timestamp=Date.now(),o.push(n),n=null,g())},O=()=>{const le=o.length-1+a,ae=o[le];return ae&&a--,g(),ae},I=()=>{const le=o.length+a,ae=o[le];return ae&&a++,g(),ae},g=()=>{const le=o.length-1+a,ae=o[le],ue=o.length+a,Ce=o[ue];t.value.mutationTransactionsSnapshot={undo:ae,redo:Ce}},p=()=>t.value.mutationTransactionsSnapshot;async function A(le){const ae=JSON.stringify(le);let ue=5981;for(let Re=0;Re<ae.length;Re++)ue=(ue<<5)+ue+ae.charCodeAt(Re);return ue.toString(16).padStart(2,"0")}const w=async le=>{const{type:ae,title:ue,message:Ce,code:Re,workflowExecution:pe}=le,he=await A(le),de=t.value.logEntries.find(Le=>Le.fingerprint===he);if(de){de.repeated++,de.timestampReceived=new Date,t.value.logEntries.sort((Le,kt)=>Le.timestampReceived<kt.timestampReceived?1:-1);return}t.value.logEntries.unshift({type:ae,title:ue,message:Ce,code:Re,workflowExecution:pe,timestampReceived:new Date,fingerprint:he,repeated:0}),t.value.logEntries.splice(p0)},V=()=>t.value.logEntries.length,j=()=>{t.value.logEntries=[]},ee=()=>t.value.logEntries;return{setMode:r,getMode:s,openPanels:q(new Set),isSettingsBarCollapsed:q(!1),isSelectionActive:c,setSelection:l,getSelection:d,getSelectedId:h,setClipboard:f,getClipboard:m,openMutationTransaction:k,registerPreMutation:S,registerPostMutation:y,closeMutationTransaction:b,consumeUndoTransaction:O,consumeRedoTransaction:I,getMutationTransactionsSnapshot:p,handleLogEntry:w,getLogEntryCount:V,clearLogEntries:j,getLogEntries:ee}}const Y={core:Symbol(),builderManager:Symbol(),evaluatedFields:Symbol(),componentId:Symbol(),isBeingEdited:Symbol(),isDisabled:Symbol(),getChildrenVNodes:Symbol(),renderProxiedComponent:Symbol(),instancePath:Symbol(),flattenedInstancePath:Symbol(),instanceData:Symbol()};var fo=(e=>(e.Cut="cut",e.Copy="copy",e))(fo||{}),L=(e=>(e.Text="Text",e.KeyValue="Key-Value",e.Color="Color",e.Shadow="Shadow",e.Number="Number",e.Object="Object",e.IdKey="Identifying Key",e.Width="Width",e.HAlign="Align (H)",e.VAlign="Align (V)",e.Padding="Padding",e.Tools="Tools",e))(L||{}),Pe=(e=>(e.General="General",e.Style="Style",e.Tools="Tools",e))(Pe||{}),Vs=(e=>(e.Text="Text",e.Textarea="Textarea",e))(Vs||{});const Wt={name:"Accent",type:L.Color,category:Pe.Style,applyStyleVariable:!0},Mt={name:"Primary text",type:L.Color,category:Pe.Style,applyStyleVariable:!0},yn={name:"Secondary text",type:L.Color,category:Pe.Style,applyStyleVariable:!0},yp={name:"Emptiness",desc:"Page background color",type:L.Color,category:Pe.Style,applyStyleVariable:!0},zn={name:"Container background",type:L.Color,category:Pe.Style,applyStyleVariable:!0},Mo={name:"Container shadow",type:L.Shadow,category:Pe.Style,applyStyleVariable:!0},Vt={name:"Separator",type:L.Color,category:Pe.Style,applyStyleVariable:!0},Kn={name:"Button",type:L.Color,category:Pe.Style,applyStyleVariable:!0},Wn={name:"Button text",type:L.Color,category:Pe.Style,applyStyleVariable:!0},Ia={name:"Button shadow",type:L.Shadow,category:Pe.Style,applyStyleVariable:!0},Ye={name:"Custom CSS classes",type:L.Text,category:Pe.Style,desc:"CSS classes, separated by spaces. You can define classes in custom stylesheets."},v0={name:"Content width",type:L.Width,default:"100%",category:Pe.Style,desc:"Configure content width using CSS units, e.g. 100px, 50%, 10vw, etc."},No={name:"Content alignment (H)",type:L.HAlign,default:"unset",category:Pe.Style},Ul={name:"Content alignment (V)",type:L.VAlign,default:"unset",category:Pe.Style},Oo={name:"Padding",type:L.Padding,default:"0",category:Pe.Style},_p={yes:"Yes",no:"No"},Hl={name:"Collapsible",default:"no",type:L.Text,options:_p,category:Pe.Style},Us={name:"Start collapsed",type:L.Text,category:Pe.Style,default:"no",options:_p,desc:"Only applied when the component is collapsible."},m0=Object.freeze(Object.defineProperty({__proto__:null,accentColor:Wt,buttonColor:Kn,buttonShadow:Ia,buttonTextColor:Wn,containerBackgroundColor:zn,containerShadow:Mo,contentHAlign:No,contentPadding:Oo,contentVAlign:Ul,contentWidth:v0,cssClasses:Ye,emptinessColor:yp,isCollapsible:Hl,primaryTextColor:Mt,secondaryTextColor:yn,separatorColor:Vt,startCollapsed:Us},Symbol.toStringTag,{value:"Module"})),g0={class:"material-symbols-outlined"},y0=Ie({inheritAttrs:!1,__name:"WdsTextInput",props:$o({leftIcon:{type:String,required:!1,default:void 0}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=wa(e,"modelValue");t({focus:l,getSelection:s,value:n,setSelectionEnd:r,setSelectionStart:o});const a=q();function o(c){a.value&&(a.value.selectionStart=c)}function r(c){a.value&&(a.value.selectionEnd=c)}function s(){var c,d;return{selectionStart:(c=a.value)==null?void 0:c.selectionStart,selectionEnd:(d=a.value)==null?void 0:d.selectionEnd}}function l(){var c;(c=a.value)==null||c.focus()}return(c,d)=>e.leftIcon?(C(),N("div",nr({key:0,class:"WdsTextInput WdsTextInput--leftIcon colorTransformer"},c.$attrs,{onClick:d[1]||(d[1]=h=>a.value.focus())}),[U("i",g0,be(e.leftIcon),1),Bt(U("input",nr({ref_key:"input",ref:a,"onUpdate:modelValue":d[0]||(d[0]=h=>n.value=h)},c.$attrs),null,16),[[As,n.value]])],16)):Bt((C(),N("input",nr({key:1},c.$attrs,{ref_key:"input",ref:a,"onUpdate:modelValue":d[2]||(d[2]=h=>n.value=h),class:"WdsTextInput colorTransformer"}),null,16)),[[As,n.value]])}}),ke=(e,t)=>{const n=e.__vccOpts||e;for(const[a,o]of t)n[a]=o;return n},bp=ke(y0,[["__scopeId","data-v-be82d59e"]]),_0={};function b0(e,t){return C(),N("button",null,[$t(e.$slots,"default",{},void 0,!0)])}const Pn=ke(_0,[["render",b0],["__scopeId","data-v-75345289"]]),A0={key:0,class:"BaseMarkdown markdown"},C0=Ie({__name:"BaseMarkdown",props:{rawText:{}},setup(e){let t;const n=q(!1),a=e;return Eo(async()=>{t=await on(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url),n.value=!0}),(o,r)=>{const s=tf("dompurify-html");return n.value?Bt((C(),N("div",A0,null,512)),[[s,T(t).parse(a.rawText).trim()]]):Ae("",!0)}}}),jl=ke(C0,[["__scopeId","data-v-09a0e4d0"]]),w0=Object.freeze(Object.defineProperty({__proto__:null,default:jl},Symbol.toStringTag,{value:"Module"}));var ht=(e=>(e.White="#ffffff",e.Black="#000000",e.Blue1="#f3f5ff",e.Blue2="#e4e9ff",e.Blue3="#bfcbff",e.Blue4="#6985ff",e.Blue5="#5551ff",e.Blue6="#4a46da",e.Gray0="#fbfbfd",e.Gray1="#f5f5f9",e.Gray2="#e4e7ed",e.Gray3="#d2d4d7",e.Gray4="#828282",e.Gray5="#4f4f4f",e.Gray6="#333333",e.Purple1="#f6effd",e.Purple2="#ede2ff",e.Purple3="#d4b2f7",e.Purple4="#a95ef8",e.Purple5="#721cc9",e.Orange1="#fff4f1",e.Orange2="#ffcfc2",e.Orange4="#ff8866",e.Orange5="#ff643c",e.Green1="#f2fffb",e.Green2="#d4fff2",e.Green3="#a9f9e1",e.Green5="#3bdcab",e.Green6="#078660",e))(ht||{}),Ap=(e=>(e.Box="0px 2px 0px 0px #f3f3f3",e.Menu="0px 1px 8px 0px #bfcbff40",e.Large="0px 3px 40px 0px #acb9dc66",e))(Ap||{});const y2=Object.freeze(Object.fromEntries([...Object.entries(ht).map(([e,t])=>[`--wdsColor${e}`,t]),...Object.entries(Ap).map(([e,t])=>[`--wdsShadow${e}`,t])])),Hs=e=>(zt("data-v-4c8370f6"),e=e(),Kt(),e),I0={key:0},x0=Hs(()=>U("i",{class:"material-symbols-outlined"}," download ",-1)),k0={key:0,"data-writer-grid-col":"0",class:"cell headerCell indexCell"},S0=Hs(()=>U("div",{class:"name"},null,-1)),T0=Hs(()=>U("div",{class:"widthAdjuster"},null,-1)),E0=[S0,T0],$0=["data-writer-grid-col","onClick"],M0={class:"name"},N0={class:"material-symbols-outlined"},O0={class:"material-symbols-outlined"},P0=Hs(()=>U("div",{class:"widthAdjuster"},null,-1)),L0={key:0,class:"cell indexCell"},R0="A component to display Pandas DataFrames.",D0="data:application/vnd.apache.arrow.file;base64,QVJST1cxAAD/////iAMAABAAAAAAAAoADgAGAAUACAAKAAAAAAEEABAAAAAAAAoADAAAAAQACAAKAAAAlAIAAAQAAAABAAAADAAAAAgADAAEAAgACAAAAGwCAAAEAAAAXwIAAHsiaW5kZXhfY29sdW1ucyI6IFsiX19pbmRleF9sZXZlbF8wX18iXSwgImNvbHVtbl9pbmRleGVzIjogW3sibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogbnVsbCwgInBhbmRhc190eXBlIjogInVuaWNvZGUiLCAibnVtcHlfdHlwZSI6ICJvYmplY3QiLCAibWV0YWRhdGEiOiB7ImVuY29kaW5nIjogIlVURi04In19XSwgImNvbHVtbnMiOiBbeyJuYW1lIjogImNvbF9hIiwgImZpZWxkX25hbWUiOiAiY29sX2EiLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9LCB7Im5hbWUiOiAiY29sX2IiLCAiZmllbGRfbmFtZSI6ICJjb2xfYiIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogIl9faW5kZXhfbGV2ZWxfMF9fIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfV0sICJjcmVhdG9yIjogeyJsaWJyYXJ5IjogInB5YXJyb3ciLCAidmVyc2lvbiI6ICIxMi4wLjAifSwgInBhbmRhc192ZXJzaW9uIjogIjEuNS4zIn0ABgAAAHBhbmRhcwAAAwAAAIgAAABEAAAABAAAAJT///8AAAECEAAAACQAAAAEAAAAAAAAABEAAABfX2luZGV4X2xldmVsXzBfXwAAAJD///8AAAABQAAAAND///8AAAECEAAAABgAAAAEAAAAAAAAAAUAAABjb2xfYgAAAMD///8AAAABQAAAABAAFAAIAAYABwAMAAAAEAAQAAAAAAABAhAAAAAgAAAABAAAAAAAAAAFAAAAY29sX2EAAAAIAAwACAAHAAgAAAAAAAABQAAAAAAAAAD/////6AAAABQAAAAAAAAADAAWAAYABQAIAAwADAAAAAADBAAYAAAAMAAAAAAAAAAAAAoAGAAMAAQACAAKAAAAfAAAABAAAAACAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAAAAAAAwAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAD/////AAAAABAAAAAMABQABgAIAAwAEAAMAAAAAAAEADwAAAAoAAAABAAAAAEAAACYAwAAAAAAAPAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAACgAMAAAABAAIAAoAAACUAgAABAAAAAEAAAAMAAAACAAMAAQACAAIAAAAbAIAAAQAAABfAgAAeyJpbmRleF9jb2x1bW5zIjogWyJfX2luZGV4X2xldmVsXzBfXyJdLCAiY29sdW1uX2luZGV4ZXMiOiBbeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiBudWxsLCAicGFuZGFzX3R5cGUiOiAidW5pY29kZSIsICJudW1weV90eXBlIjogIm9iamVjdCIsICJtZXRhZGF0YSI6IHsiZW5jb2RpbmciOiAiVVRGLTgifX1dLCAiY29sdW1ucyI6IFt7Im5hbWUiOiAiY29sX2EiLCAiZmllbGRfbmFtZSI6ICJjb2xfYSIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6ICJjb2xfYiIsICJmaWVsZF9uYW1lIjogImNvbF9iIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfSwgeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiAiX19pbmRleF9sZXZlbF8wX18iLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9XSwgImNyZWF0b3IiOiB7ImxpYnJhcnkiOiAicHlhcnJvdyIsICJ2ZXJzaW9uIjogIjEyLjAuMCJ9LCAicGFuZGFzX3ZlcnNpb24iOiAiMS41LjMifQAGAAAAcGFuZGFzAAADAAAAiAAAAEQAAAAEAAAAlP///wAAAQIQAAAAJAAAAAQAAAAAAAAAEQAAAF9faW5kZXhfbGV2ZWxfMF9fAAAAkP///wAAAAFAAAAA0P///wAAAQIQAAAAGAAAAAQAAAAAAAAABQAAAGNvbF9iAAAAwP///wAAAAFAAAAAEAAUAAgABgAHAAwAAAAQABAAAAAAAAECEAAAACAAAAAEAAAAAAAAAAUAAABjb2xfYQAAAAgADAAIAAcACAAAAAAAAAFAAAAAsAMAAEFSUk9XMQ==",B0={writer:{name:"DataFrame",description:R0,category:"Content",fields:{dataframe:{name:"Data",desc:"Must be a state reference to a Pandas dataframe or PyArrow table. Alternatively, a URL for an Arrow IPC file.",type:L.Text,default:D0},showIndex:{name:"Show index",desc:"Shows the dataframe's index. If an Arrow table is used, shows the zero-based integer index.",type:L.Text,default:"yes",options:{yes:"yes",no:"no"}},enableSearch:{name:"Enable search",type:L.Text,default:"no",options:{yes:"yes",no:"no"}},enableDownload:{name:"Enable download",desc:"Allows the user to download the data as CSV.",type:L.Text,default:"no",options:{yes:"yes",no:"no"}},useMarkdown:{name:"Use Markdown",type:L.Text,desc:"If active, the output will be sanitized; unsafe elements will be removed.",options:{yes:"yes",no:"no"},default:"no"},displayRowCount:{name:"Display row count",desc:"Specifies how many rows to show simultaneously.",type:L.Number,category:Pe.Style,default:"10"},wrapText:{name:"Wrap text",type:L.Text,category:Pe.Style,desc:"Not wrapping text allows for an uniform grid, but may be inconvenient if your data contains longer text fields.",options:{yes:"yes",no:"no"},default:"no"},primaryTextColor:Mt,secondaryTextColor:yn,separatorColor:Vt,dataframeBackgroundColor:{name:"Background",type:L.Color,category:Pe.Style,default:ht.White,applyStyleVariable:!0},fontStyle:{name:"Font style",type:L.Text,category:Pe.Style,options:{normal:"normal",monospace:"monospace"},default:"normal"},cssClasses:Ye}}},F0=Ie({...B0,__name:"CoreDataframeLegacy",setup(e){Za($e=>({"56016cc3":V.value?"sticky":"unset"}));const t=1e3,n=36,a=80,o=300,r=/^__index_level_[0-9]+__$/,s=W(Y.evaluatedFields),l=q(),c=q(),d=q();let h=null;const f=q(null),m=q([]),k=J(()=>s.showIndex.value=="yes"),S=q(null),y=q(0),b=q([]);let O=null;const I=J(()=>{var $e;return f.value?($e=f.value)==null?void 0:$e.columnNames():[]}),g=J(()=>I.value.filter($e=>m.value.includes($e))),p=J(()=>I.value.filter(Ke=>{const at=m.value.includes(Ke),Xe=r.test(Ke);return!(at&&Xe)})),A=J(()=>(k.value?1:0)+p.value.length),w=J(()=>{var $e;return(($e=f.value)==null?void 0:$e.numRows())??0}),V=J(()=>w.value>t),j=J(()=>Math.min(s.displayRowCount.value,w.value)),ee=J(()=>{let $e;return s.wrapText.value=="yes"?$e=w.value-1:$e=w.value-j.value,Math.min(Math.ceil(y.value*$e),$e)}),se=J(()=>{if(!f.value)return null;const $e=V.value?ee.value:0,Ke=V.value?j.value:t,at=f.value.objects({offset:$e,limit:Ke}),Xe=f.value.indices().slice(ee.value,ee.value+j.value);return{data:at,indices:Xe}}),le=J(()=>{const $e=s.fontStyle.value;let Ke;return b.value.length==0?Ke=`repeat(${A.value}, minmax(min-content, 1fr))`:Ke=b.value.map(at=>`${Math.max(at,a)}px`).join(" "),{"min-height":`${n*(1+s.displayRowCount.value)}px`,"max-height":`${(j.value+1)*n}px`,"font-family":$e=="monospace"?"monospace":void 0,"grid-template-columns":Ke,"grid-template-rows":`${n}px repeat(${j.value}, min-content)`}}),ae=J(()=>({top:`${n*w.value}px`}));function ue(){const $e=d.value.scrollTop;y.value=$e/(d.value.scrollHeight-d.value.clientHeight)}function Ce(){d.value.scrollTop=0}async function Re(){var Ke;b.value=[],await mn();const $e=(Ke=d.value)==null?void 0:Ke.querySelectorAll("[data-writer-grid-col]");$e==null||$e.forEach(at=>{const Xe=at,$=Xe.dataset.writerGridCol,{width:R}=Xe.getBoundingClientRect(),B=Math.min(R,o);b.value[$]=B})}function pe($e,Ke){var R,B;if($e.target.classList.contains("widthAdjuster"))return;if(((R=S.value)==null?void 0:R.columnName)!==Ke){S.value={columnName:Ke,descending:!1};return}if((B=S.value)==null?void 0:B.descending){S.value=null;return}S.value={columnName:Ke,descending:!S.value.descending}}function he($e){const Ke=$e.schema.metadata.get("pandas");return Ke?JSON.parse(Ke).index_columns:[]}async function de(){const $e=await on(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url),{tableFromIPC:Ke}=await on(()=>import("./Arrow.dom-GBJpMYQS.js"),__vite__mapDeps([2,1]),import.meta.url),at=s.dataframe.value;try{const R=await(await(await fetch(at)).blob()).arrayBuffer(),B=Ke(R);m.value=he(B),h=$e.fromArrow(B),f.value=h}catch(Xe){console.error("Couldn't load dataframe from Arrow URL.",Xe)}}function Le(){const $e=f.value.toCSV(),Ke=document.createElement("a"),at=new Blob([$e],{type:"text/csv"}),Xe=URL.createObjectURL(at);Ke.href=Xe,Ke.download="data.csv",Ke.click(),URL.revokeObjectURL(Xe)}async function kt(){const $e=await on(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url);if(S.value===null){f.value=f.value.unorder();return}let Ke;S.value.descending?Ke=$e.desc(S.value.columnName):Ke=S.value.columnName,f.value=f.value.orderby(Ke)}async function qe($e){const Ke=$e.target.value;if(!Ke)f.value=h;else{const at=new RegExp(Ke,"i"),$="(d, $) => "+h.columnNames().map(R=>`aq.op.match(d.${R}, $.pattern) !== null`).join(" || ");f.value=h.params({pattern:at,filterS:$}).filter($)}await mn(),Ce()}async function Ct($e){if($e.buttons!==1){O=null;return}const Ke=$e.target;if(!l.value.contains(Ke))return;if(O===null&&Ke.classList.contains("widthAdjuster")){const X=Ke.closest(".cell");O=parseInt(X.dataset.writerGridCol)}else if(O===null)return;const at=d.value.querySelector(`[data-writer-grid-col="${O}"]`),Xe=at.querySelector(".widthAdjuster"),{width:$}=Xe.getBoundingClientRect(),{left:R}=at.getBoundingClientRect(),K=$e.clientX-R+$/2;b.value[O]=K}return He(s.dataframe,()=>{de()}),He(S,async()=>{await kt()}),He(A,()=>{Re()}),He(s.wrapText,()=>{Re()}),Ft(async()=>{await de(),document.addEventListener("mousemove",Ct),c.value&&new ResizeObserver(Re).observe(c.value,{box:"border-box"})}),Bn(()=>{document.removeEventListener("mousemove",Ct)}),($e,Ke)=>{var at;return C(),N("div",{ref_key:"rootEl",ref:l,class:"CoreDataframe"},[U("div",{ref_key:"toolsEl",ref:c,class:"tools"},[T(s).enableSearch.value==="yes"?(C(),N("div",I0,[je(bp,{class:"search",placeholder:"Search","left-icon":"search",onChange:qe})])):Ae("",!0),T(s).enableDownload.value==="yes"?(C(),Fe(Pn,{key:1,title:"Download",class:"download",onClick:Le},{default:Ge(()=>[x0]),_:1})):Ae("",!0)],512),U("div",{ref_key:"gridContainerEl",ref:d,class:"gridContainer",onScroll:ue},[U("div",{class:st(["grid",{scrolled:ee.value>0,wrapText:T(s).wrapText.value==="yes"}]),style:it(le.value)},[k.value?(C(),N("div",k0,E0)):Ae("",!0),(C(!0),N(Oe,null,mt(p.value,(Xe,$)=>{var R,B,K;return C(),N("div",{key:Xe,"data-writer-grid-col":$+(k.value?1:0),class:"cell headerCell",onClick:X=>pe(X,Xe)},[U("div",M0,be(Xe),1),U("div",{class:"icon",style:it({visibility:((R=S.value)==null?void 0:R.columnName)==Xe?"visible":"hidden"})},[Bt(U("span",N0," arrow_downward ",512),[[un,!((B=S.value)!=null&&B.descending)]]),Bt(U("span",O0," arrow_upward ",512),[[un,(K=S.value)==null?void 0:K.descending]])],4),P0],8,$0)}),128)),(C(!0),N(Oe,null,mt((at=se.value)==null?void 0:at.data,(Xe,$)=>(C(),N(Oe,{key:$},[k.value?(C(),N("div",L0,[m.value.length==0?(C(),N(Oe,{key:0},[At(be(se.value.indices[$]),1)],64)):(C(),N(Oe,{key:1},[At(be(g.value.map(R=>Xe[R]).join(", ")),1)],64))])):Ae("",!0),(C(!0),N(Oe,null,mt(p.value,R=>(C(),N("div",{key:R,class:"cell"},[T(s).useMarkdown.value=="yes"?(C(),Fe(jl,{key:0,"raw-text":Xe[R]},null,8,["raw-text"])):(C(),N(Oe,{key:1},[At(be(Xe[R]),1)],64))]))),128))],64))),128))],6),V.value?(C(),N("div",{key:0,class:"endpoint",style:it(ae.value)},null,4)):Ae("",!0)],544)],512)}}}),V0=ke(F0,[["__scopeId","data-v-4c8370f6"]]),U0={key:0},H0={key:1},j0={key:2},z0={key:3},K0="A text component used to display headings or titles in different sizes and styles.",W0={writer:{name:"Heading",description:K0,category:"Content",fields:{text:{name:"Text",default:"(No text)",init:"Heading Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:L.Text},headingType:{name:"Heading type",default:"h3",options:{h1:"h1 (Big)",h2:"h2 (Normal)",h3:"h3 (Small)",h4:"h4 (Smallest)"},type:L.Text,category:Pe.Style},alignment:{name:"Alignment",default:"left",type:L.Text,category:Pe.Style,options:{left:"Left",center:"Center",right:"Right"}},primaryTextColor:Mt,cssClasses:Ye},previewField:"text"}},G0=Ie({...W0,__name:"CoreHeading",setup(e){const t=W(Y.evaluatedFields);return(n,a)=>(C(),N("div",{class:"CoreHeading",style:it({"text-align":T(t).alignment.value})},[T(t).headingType.value=="h1"?(C(),N("h1",U0,be(T(t).text.value),1)):T(t).headingType.value=="h3"?(C(),N("h3",H0,be(T(t).text.value),1)):T(t).headingType.value=="h4"?(C(),N("h4",j0,be(T(t).text.value),1)):(C(),N("h2",z0,be(T(t).text.value),1))],4))}}),Y0=ke(G0,[["__scopeId","data-v-a24181bd"]]),J0={class:"icon"},Q0={writer:{name:"Icon",description:"A component to display an icon",category:"Content",fields:{icon:{name:"Icon",type:L.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:Pe.Style,default:"arrow_forward"},size:{name:"Icon size",type:L.Number,desc:"Icon size in px",category:Pe.Style,default:"14"},color:{name:"Icon color",type:L.Color,category:Pe.Style},cssClasses:Ye},previewField:"icon"}},Cp=Ie({...Q0,__name:"CoreIcon",setup(e){const t=W(Y.evaluatedFields);return(n,a)=>(C(),N("div",J0,[T(t).icon.value?(C(),N("span",{key:0,class:"material-symbols-outlined",style:it({fontSize:`${T(t).size.value}px`,color:T(t).color.value})},be(T(t).icon.value),5)):Ae("",!0)]))}}),ed=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Icon.")};typeof ed=="function"&&ed(Cp);const q0=ke(Cp,[["__scopeId","data-v-783aa549"]]);function br(e){const t={ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-click",{detail:{payload:t}})}function X0(e){const t={key:e.key,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-keydown",{detail:{payload:t}})}const Z0=["src","alt"],eA={key:0,class:"captionContainer"},tA="A component to display images.",nA=`
def click_handler(state):

	# Increment counter when the image is clicked

	state["counter"] += 1`,aA={writer:{name:"Image",description:tA,category:"Content",fields:{src:{name:"Source",default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQoAAAEKCAYAAADqyxvJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAemSURBVHgB7d3baltHGIZhJd5DW3pS2vu/tkKgEFragiXLjuvVkpOS5PMa6Z8ZWc8DPXPBJNGrpX82evfrh4/PG4BveL8BCIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiC43HN3PP/24ubyoafCnT8+bD7/9vur/+f67u80PL/9V+fjHX5vtdv/qn794+bP55eXPaJbfh8wTRYGHh7p/pO/fv/v3hbZG5e+zuLm+WvXzT0+fNo8v/1XZ7582HJdQFKj+h3p7c73q5/ePTy9PInUvzOuVoVhUxWsJ0FNhhM6VUBS43z1sKl1fXaz6+eXjyv6xMBSXF5t3L086a+weHjcVqp+ezpVQFFje0Srfwdc+USz2jzUvzM+WWKyxK3pB74SihFAU2e7mmlNst7VPObe36+JVFdOqJ5VzJxRFqucUaweIy5yi0tXl+gW0Y8fUfKKOUBTZla80rHth/jenqIvFVcOc4tgx3e89TVQRiiLVKw03DSsNu+Jl29Fzim3xEPmcCUWhh8LPy8uMYu07+EPx5/frho9Dx4yp/RN1hKJQ9WDtbuXqx26yjVeLY8Wr+qPVuROKQtVLklcN+ykqd0RerfzosThWTC2L1hKKQsuLoHJOcdewn6Lyc/wyp1g7ZD3WC9yyaC2hKFa5I7JlTlH9Of5y5TLpseYUdmTWEopi1Rud1r6DV68MrP19FofG1HyinlAUq55TrB0gVs8pWgaah8ZUJOoJRbFzOrm5WOYUa4eah8b0fmv/RDWhKHZOJzc/672f4vHRILOaUHRwLic3P2vbXt4eCise9YSigxlPbs42p2iNl0j0IRQdzHhy861c12ejVR9C0cHyaF35zrc86s+2n6Llur4W9k/0IRSdzDanmPG6vpaY+ujRh1B0MtvJzerr+lrmFGtjKhL9CEUnb/nk5pcsM4r1c4p1v8/esmg3QtFJjxum1qp+R14br7Ux3dpo1Y1QdFR9w9Sok5tfU31d34Ot290IRUdv9eTm11Tup1gi8fwSFvoQio6qT27e3bZ838dcx+BfO6ewLNqXUHQ04w1T1Z/zq67rs9GqL6Ho7K2d3EyqruuzNNqXUHQ228nN6uv6Wo7Bp49o5hP9CUVns600LGY7Bp+Gvo++6Kc7oejsLZ3cfK1jL9ve+6Kf7oRigLdycvO1bhq2l38rpr7opz+hGGDGk5uVc4pjHoP3RcRjCMUAM57crJxTtByD/9rQ1/6JMYRigOqTm7c3LRuvTuO6PvsnxhCKQba7ueYUM17X96WY2j8xhlAMUj2nuGm4CbtSy5zi/zE1nxhHKAY59ZOba10dYT/F3v6JYYRikFM+udli+Th06Jxia//EMEIxUPUNU1UnN1sd+sVA9k+MIxQDVQ/mqk5utjrkuj5fRDyWUAx0qic3Wx1yXZ9l0bGEYqDqk5t3DfspKucAh1zXZ1l0LKEYbLYbpma9rs+OzLGEYrDZlkmrVxZajsEvcwrzibGEYrDZTm5WzylaBpp//n2/YSyhGKx6P8V100rDbNf1eZoYTSgGqz652XLD1GzX9TGeUEzgVE5uHsvaY/CMJxQTmPHkZuWcouUYPGMJxQRmPLk523V9jOVvawLLnKJyLtByw9Rs1/UxllBMYrY5xWzX9TGWUExitpOb1df13Vj5OClCMYmZT25WWGYU5hSnw9/UJHrcMLVW9X4KTxWnQygmUn3D1LG/setQLec+GEMoJjLryc0qnihOh1BMpPrk5t1ty/d9zHUMnjGEYiIz3jBVvWv0zn6KkyAUk5nv5OZc1/UxhlBMZraTm9XX9TlJehqEYjIzrjTMdgye/oRiMtUnN2f7YqCFZdL5CcWEZju5Odt1ffT37tcPH583AN/giQKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKI/gE7SXVdY25ypwAAAABJRU5ErkJggg==",desc:"A valid URL. Alternatively, you can provide a state reference to a Matplotlib figure or a packed file.",type:L.Text},caption:{name:"Caption",init:"Image Caption",desc:"Leave blank to hide.",type:L.Text},maxWidth:{name:"Max width (px)",type:L.Number,default:"-1",category:Pe.Style},maxHeight:{name:"Max height (px)",type:L.Number,default:"-1",category:Pe.Style},secondaryTextColor:yn,cssClasses:Ye},events:{"wf-click":{desc:"Capture single clicks.",stub:nA.trim()}},previewField:"caption"}},wp=Ie({...aA,__name:"CoreImage",setup(e){const t=q(null),n=W(Y.core),a=W(Y.evaluatedFields),o=W(Y.componentId),r=J(()=>{var h;return{cursor:typeof((h=n.getComponentById(o).handlers)==null?void 0:h["wf-click"])<"u"?"pointer":"unset"}}),s=J(()=>{const c=a.maxWidth.value,d=a.maxHeight.value;return{"max-width":c!==-1?`${c}px`:void 0,"max-height":d!==-1?`${d}px`:void 0}});function l(c){const d=br(c);t.value.dispatchEvent(d)}return(c,d)=>(C(),N("div",{ref_key:"rootEl",ref:t,class:"CoreImage",style:it(r.value),onClick:l},[U("img",{src:T(a).src.value,alt:T(a).caption.value,draggable:"false",style:it(s.value)},null,12,Z0),T(a).caption.value||T(a).caption.value===0?(C(),N("div",eA,be(T(a).caption.value),1)):Ae("",!0)],4))}}),td=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve images directly. For example, \`static/my_image.png\`.

Alternatively, pass a Matplotlib figure via state.

\`state["my_fig"] = fig\` and then setting the _Image_ source to \`@{fig}\`

You can also use packed files or bytes:

\`state["img_b"] = wf.pack_bytes(img_bytes, "image/png")\`

\`state["img_f"] = wf.pack_file(img_file, "image/png")\``)};typeof td=="function"&&td(wp);const oA=ke(wp,[["__scopeId","data-v-0185a273"]]),rA={},sA=e=>(zt("data-v-5a38f374"),e=e(),Kt(),e),iA={class:"LoadingSymbol"},lA=sA(()=>U("div",null,null,-1)),cA=[lA];function uA(e,t){return C(),N("div",iA,cA)}const Ip=ke(rA,[["render",uA],["__scopeId","data-v-5a38f374"]]),dA={class:"BaseEmptiness"},fA={class:"content"},pA={class:"title"},hA={key:0,class:"message"},vA=Ie({__name:"BaseEmptiness",props:{componentId:{type:String,required:!0},message:{type:String,required:!1,default:void 0}},setup(e){const t=e,n=W(Y.core),a=J(()=>n.getComponentById(t.componentId)),o=J(()=>n.getComponentDefinition(a.value.type));return(r,s)=>(C(),N("div",dA,[U("div",fA,[U("div",pA,[U("h3",null,"Empty "+be(o.value.name),1)]),e.message?(C(),N("div",hA,be(e.message),1)):Ae("",!0)])]))}}),zl=ke(vA,[["__scopeId","data-v-8c972dbe"]]),mA={key:0,class:"message"},gA="A component that displays a message in various styles, including success, error, warning, and informational.",yA={writer:{name:"Message",description:gA,category:"Content",fields:{message:{name:"Message",type:L.Text,desc:"Prefix with '+' for a success message, with '-' for error, '!' for warning, '%' for loading. No prefix for info. Leave empty to hide."},successColor:{name:"Success",default:ht.Green3,type:L.Color,category:Pe.Style},errorColor:{name:"Error",default:ht.Orange2,type:L.Color,category:Pe.Style},warningColor:{name:"Warning",default:"#FFE999",type:L.Color,category:Pe.Style},infoColor:{name:"Info",default:ht.Blue2,type:L.Color,category:Pe.Style},loadingColor:{name:"Loading",default:ht.Blue2,type:L.Color,category:Pe.Style},primaryTextColor:Mt,cssClasses:Ye},previewField:"name"}},xp=Ie({...yA,__name:"CoreMessage",setup(e){const t=W(Y.componentId),n=W(Y.evaluatedFields),a=W(Y.isBeingEdited),o=J(()=>{const l=n.message.value;if(!l)return"neutral";const c=l.charAt(0);return c=="+"?"success":c=="-"?"error":c=="!"?"warning":c=="%"?"loading":"info"}),r=J(()=>{const l=n.message.value;if(!l)return;const c=l.charAt(0);return c=="+"||c=="-"||c=="!"||c=="%"?l.substring(1).trim():l}),s=J(()=>({"--messageActiveSeverityColor":{error:n.errorColor.value,success:n.successColor.value,warning:n.warningColor.value,info:n.infoColor.value,loading:n.loadingColor.value}[o.value]}));return(l,c)=>r.value||T(a)?(C(),N("div",{key:0,class:st(["CoreMessage",o.value]),style:it(s.value)},[r.value?(C(),N("div",mA,[o.value=="loading"?(C(),Fe(Ip,{key:0,class:"loadingSymbol"})):Ae("",!0),U("span",null,be(r.value),1)])):(C(),Fe(zl,{key:1,"component-id":T(t)},null,8,["component-id"]))],6)):Ae("",!0)}}),nd=e=>{e.writer&&(e.writer.docs=`When working with operations that can succeed or fail, _Message_ can be useful. You can reserve a state element to be used for the outcome of the operation; empty messages aren't shown, so you can initialise it empty.
Then, assign a message when the operation is completed.

\`\`\`python
state["msg"] = ""

if is_ok:
  state["msg"] = "+It worked!"
else:
  state["msg"] = "-It failed"
\`\`\``)};typeof nd=="function"&&nd(xp);const _A=ke(xp,[["__scopeId","data-v-4e7d44c6"]]),bA={key:0,class:"name"},AA={key:1,class:"description"},CA={class:"value"},wA={key:2,class:"note"},IA="A component that prominently displays a metric value and associated information.",xA={writer:{name:"Metric",description:IA,category:"Content",fields:{name:{name:"Name",init:"Metric",type:L.Text},metricValue:{name:"Value",default:"0",type:L.Text,desc:"The main value to be displayed. It's not limited to numbers."},description:{name:"Description",type:L.Text},note:{name:"Note",init:"+Pass",type:L.Text,desc:"Prefix with '+' for a positive message, with '-' for a negative message."},primaryTextColor:Mt,secondaryTextColor:yn,positiveColor:{name:"Positive",default:ht.Green3,type:L.Color,category:Pe.Style},neutralColor:{name:"Neutral",default:"var(--separatorColor)",type:L.Color,category:Pe.Style},negativeColor:{name:"Negative",default:ht.Orange2,type:L.Color,category:Pe.Style},cssClasses:Ye},previewField:"name"}},kA=Ie({...xA,__name:"CoreMetric",setup(e){const t=W(Y.evaluatedFields),n=J(()=>{const r=t.note.value;if(!r)return"neutral";const s=r.charAt(0);return s=="+"?"positive":s=="-"?"negative":"neutral"}),a=J(()=>{const r=t.note.value;if(!r)return;const s=r.charAt(0);return s=="+"||s=="-"?r.substring(1):r}),o=J(()=>({"--messageActiveSentimentColor":{positive:t.positiveColor.value,neutral:t.neutralColor.value,negative:t.negativeColor.value}[n.value]}));return(r,s)=>(C(),N("div",{class:"CoreMetric",style:it(o.value)},[T(t).name.value?(C(),N("div",bA,be(T(t).name.value),1)):Ae("",!0),T(t).description.value?(C(),N("div",AA,be(T(t).description.value),1)):Ae("",!0),U("h2",CA,be(T(t).metricValue.value),1),a.value?(C(),N("div",wA,be(a.value),1)):Ae("",!0)],4))}}),SA=ke(kA,[["__scopeId","data-v-bc5826e1"]]),TA=e=>(zt("data-v-356594ef"),e=e(),Kt(),e),EA=TA(()=>U("div",{class:"mask"},null,-1)),$A="A component that displays Plotly graphs.",MA={data:[{x:["a","b","c"],y:[22,25,29],type:"bar"}]},NA={writer:{name:"Plotly Graph",description:$A,category:"Content",fields:{spec:{name:"Graph specification",default:JSON.stringify(MA,null,2),desc:"Plotly graph specification. Pass it using state, e.g. @{fig}, or paste a JSON specification.",type:L.Object},cssClasses:Ye},events:{"plotly-click":{desc:"Sends a list with the clicked points."},"plotly-selected":{desc:"Sends a list with the selected points."},"plotly-deselect":{desc:"Triggered when points are deselected."}}}},kp=Ie({...NA,__name:"CorePlotlyGraph",setup(e){const t=q(null),n=q(null),a=W(Y.evaluatedFields),o=J(()=>a.spec.value),r={paper_bgcolor:ht.White,plot_bgcolor:ht.Gray1,colorway:[ht.Blue4,ht.Blue4,ht.Orange4,ht.Green5],font:{family:"Poppins, sans-serif",size:12,color:ht.Black},hoverlabel:{color:ht.White,bgcolor:ht.Black}},s=async()=>{var k,S,y;if(!o.value||!n.value)return;const f=await on(()=>import("./plotly.min-B7O4cdgv.js").then(b=>b.p),[],import.meta.url);if(!t.value||t.value.clientHeight==0)return;const m={...o.value,layout:{...r,...(k=o.value)==null?void 0:k.layout}};f.newPlot(n.value,m),c(),(y=(S=o.value)==null?void 0:S.layout)!=null&&y.autosize&&l()};function l(){const f=t.value.parentElement;f!=null&&f.clientHeight&&(t.value.style.height="100%",n.value.style.height="100%")}function c(){n.value.on("plotly_click",h("plotly-click")),n.value.on("plotly_selected",h("plotly-selected")),n.value.on("plotly_deselect",h("plotly-deselect"))}function d(f){var m,k;return{curveNumber:f.curveNumber,pointNumber:f.pointNumber,pointNumbers:f.pointNumbers,x:f.x,y:f.y,z:f.z,label:f.label,lat:f.lat,lon:f.lon,xaxis:{anchor:(m=f.xaxis)==null?void 0:m.anchor},yaxis:{anchor:(k=f.yaxis)==null?void 0:k.anchor}}}function h(f){return m=>{var S;const k=new CustomEvent(f,{detail:{payload:(S=m==null?void 0:m.points)==null?void 0:S.map(y=>d(y))}});t.value.dispatchEvent(k)}}return He(o,f=>{f&&s()}),Ft(async()=>{await s(),t.value&&new ResizeObserver(s).observe(t.value,{box:"border-box"})}),(f,m)=>(C(),N("div",{ref_key:"rootEl",ref:t,class:"CorePlotlyGraph"},[U("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512),EA],512))}}),ad=e=>{e.writer&&(e.writer.docs=`You can listen to events triggered by Plotly.js and add interactivity to your charts.
For example, implement cross-filtering.`)};typeof ad=="function"&&ad(kp);const OA=ke(kp,[["__scopeId","data-v-356594ef"]]),PA=`
def click_handler(state):

	# Increment counter when the text is clicked

	state["counter"] += 1`,LA="A component to display plain text or formatted text using Markdown syntax.",RA={writer:{name:"Text",description:LA,category:"Content",fields:{text:{name:"Text",init:"Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:L.Text,control:Vs.Textarea},useMarkdown:{name:"Use Markdown",desc:"The Markdown output will be sanitised; unsafe elements will be removed.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},alignment:{name:"Alignment",default:"left",type:L.Text,options:{left:"Left",center:"Center",right:"Right"},category:Pe.Style},primaryTextColor:Mt,cssClasses:Ye},events:{"wf-click":{desc:"Capture single clicks.",stub:PA.trim()}},previewField:"text"}},DA=Ie({...RA,__name:"CoreText",setup(e){const t=q(null),n=W(Y.evaluatedFields),a=W(Y.componentId),o=W(Y.core),r=W(Y.isBeingEdited),s=J(()=>!n.text.value),l=J(()=>!s.value||r.value),c=J(()=>{var k;return{cursor:typeof((k=o.getComponentById(a).handlers)==null?void 0:k["wf-click"])<"u"?"pointer":"unset"}}),d=J(()=>({"text-align":n.alignment.value}));function h(f){const m=br(f);t.value.dispatchEvent(m)}return(f,m)=>l.value?(C(),N("div",{key:0,ref_key:"rootEl",ref:t,class:"CoreText",style:it(c.value),onClick:h},[s.value?(C(),Fe(zl,{key:0,"component-id":T(a)},null,8,["component-id"])):(C(),N(Oe,{key:1},[T(n).useMarkdown.value=="yes"?(C(),Fe(jl,{key:0,"raw-text":T(n).text.value,style:it(d.value)},null,8,["raw-text","style"])):(C(),N("div",{key:1,class:"plainText",style:it(d.value)},be(T(n).text.value),5))],64))],4)):Ae("",!0)}}),BA=ke(DA,[["__scopeId","data-v-1a886b3d"]]),Sp="A component that displays Vega-Lite/Altair charts.",FA={$schema:"https://vega.github.io/schema/vega-lite/v5.json",description:Sp,data:{values:[{a:"A",b:100},{a:"B",b:200},{a:"C",b:150},{a:"D",b:300}]},mark:"bar",encoding:{x:{field:"a",type:"nominal"},y:{field:"b",type:"quantitative"}}},VA={writer:{name:"Vega Lite Chart",description:Sp,category:"Content",fields:{spec:{name:"Chart specification",default:JSON.stringify(FA,null,2),desc:"Vega-Lite chart specification. Pass a Vega Altair chart using state or paste a JSON specification.",type:L.Object},cssClasses:Ye}}},Tp=Ie({...VA,__name:"CoreVegaLiteChart",setup(e){const t=q(null),n=q(null),a=W(Y.evaluatedFields),o=async()=>{if(!a.spec.value||!n.value)return;const{default:r}=await on(()=>import("./vega-embed.module-SNP5iNdJ.js"),[],import.meta.url);await r(n.value,a.spec.value)};return He(()=>a.spec.value,r=>{r&&o()}),Ft(()=>{o(),new ResizeObserver(o).observe(t.value,{box:"border-box"})}),(r,s)=>(C(),N("div",{ref_key:"rootEl",ref:t,class:"CoreVegaLiteChart"},[U("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512)],512))}}),od=e=>{e.writer&&(e.writer.docs=`Generate a chart using Altair and pass it via state; it'll be converted to Vega-Lite specification.

\`state["my_chart"] = chart\`

Afterwards, you can reference the chart in the specification using the syntax \`@{my_chart}\`.

Alternatively, you can work with Vega-Lite directly.`)};typeof od=="function"&&od(Tp);const UA=ke(Tp,[["__scopeId","data-v-9420293e"]]),HA=e=>(zt("data-v-1a693d93"),e=e(),Kt(),e),jA={class:"CoreVideoPlayer"},zA=["src","controls","autoplay","loop","muted"],KA=HA(()=>U("div",{class:"mask"},null,-1)),WA="A video player component that can play various video formats.",GA={writer:{name:"Video Player",description:WA,category:"Content",fields:{src:{name:"Source",desc:"The URL of the video file. Alternatively, you can pass a file via state.",default:"",type:L.Text},controls:{name:"Controls",desc:"Display video player controls.",default:"yes",type:L.Text,options:{yes:"Yes",no:"No"}},autoplay:{name:"Autoplay",desc:"Autoplay the video when the component is loaded.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},loop:{name:"Loop",desc:"Loop the video when it reaches the end.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},muted:{name:"Muted",desc:"Mute the video by default.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},cssClasses:Ye}}},Ep=Ie({...GA,__name:"CoreVideoPlayer",setup(e){const t=W(Y.evaluatedFields);return(n,a)=>(C(),N("div",jA,[U("video",{src:T(t).src.value,controls:T(t).controls.value==="yes",autoplay:T(t).autoplay.value==="yes",loop:T(t).loop.value==="yes",muted:T(t).muted.value==="yes"},null,8,zA),KA]))}}),rd=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve videos directly. For example, \`static/my_video.mp4\`.

Alternatively, you can pack bytes or files in state:

\`state["vid_b"] = wf.pack_bytes(vid_bytes, "video/mp4")\`

\`state["vid_f"] = wf.pack_file(vid_file, "video/mp4")\`

Afterwards, you can reference the video using the syntax \`@{vid_f}\`.`)};typeof rd=="function"&&rd(Ep);const YA=ke(Ep,[["__scopeId","data-v-1a693d93"]]),JA={class:"CoreLink"},QA=["href","target","rel"],qA={writer:{name:"Link",description:"A component to create a hyperlink.",category:"Content",fields:{url:{name:"URL",type:L.Text,default:"https://writer.com",desc:"Specify a URL or choose a page. Keep in mind that you can only link to pages for which a key has been specified.",options:e=>Object.fromEntries(e.getComponents("root",{sortedByPosition:!0}).map(t=>t.content.key).filter(t=>!!t).map(t=>[`#${t}`,`Page with key: ${t}`]))},target:{name:"Target",type:L.Text,options:{_self:"Self",_blank:"Blank",_parent:"Parent",_top:"Top"},desc:"Specifies where to open the linked document.",default:"_self"},rel:{name:"Rel",type:L.Text,desc:"Specifies the relationship between the current document and the linked document."},text:{name:"Text",default:"",type:L.Text,desc:"The text to display in the link."},primaryTextColor:Mt,cssClasses:Ye}}},XA=Ie({...qA,__name:"CoreLink",setup(e){const t=W(Y.evaluatedFields),n=J(()=>t.text.value||t.url.value);return(a,o)=>(C(),N("div",JA,[U("a",{href:T(t).url.value,target:T(t).target.value,rel:T(t).rel.value},be(n.value),9,QA)]))}}),ZA=ke(XA,[["__scopeId","data-v-9c5e1448"]]),e1={},t1={width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n1=U("path",{d:"M14.0712 4.50295C14.2882 4.72002 14.2882 5.07197 14.0712 5.28905L10.5337 8.8265C10.3166 9.04357 9.96468 9.04357 9.7476 8.8265C9.53052 8.60942 9.53052 8.25747 9.7476 8.0404L12.892 4.896L9.7476 1.7516C9.53052 1.53452 9.53052 1.18257 9.7476 0.965495C9.96467 0.74842 10.3166 0.74842 10.5337 0.965495L14.0712 4.50295ZM13.6781 5.45185L3.67268 5.45185L3.67268 4.34014L13.6781 4.34014L13.6781 5.45185ZM2.00511 7.11942L2.00511 8.23114L0.893394 8.23114L0.893394 7.11942L2.00511 7.11942ZM3.67268 9.89871L5.52553 9.89871L5.52553 11.0104L3.67268 11.0104L3.67268 9.89871ZM2.00511 8.23114C2.00511 9.15211 2.7517 9.89871 3.67268 9.89871L3.67268 11.0104C2.13772 11.0104 0.893394 9.76609 0.893394 8.23114L2.00511 8.23114ZM3.67268 5.45185C2.7517 5.45185 2.00511 6.19845 2.00511 7.11942L0.893394 7.11942C0.893394 5.58447 2.13772 4.34014 3.67268 4.34014L3.67268 5.45185Z",fill:"currentColor"},null,-1),a1=[n1];function o1(e,t){return C(),N("svg",t1,a1)}const r1=ke(e1,[["render",o1]]),s1={class:"CoreChatbotAvatar"},i1=Ie({__name:"CoreChatbotAvatar",props:{initials:{type:String,required:!0}},setup(e){return(t,n)=>(C(),N("div",s1,be(e.initials),1))}}),l1=ke(i1,[["__scopeId","data-v-ce5bb453"]]),c1=["aria-busy"],u1={key:1,class:"CoreChatbotMessage__content__text"},d1={key:2,class:"CoreChatbotMessage__content__actions"},f1=["onClick"],p1={key:0,class:"subheading"},h1={class:"name"},v1={key:1,class:"desc"},m1=Ie({__name:"CoreChatbotMessage",props:{initials:{type:String,required:!0},useMarkdown:{type:Boolean,required:!1},message:{type:Object,required:!1,default:void 0},assistantRoleColor:{type:String,required:!1,default:""},isLoading:{type:Boolean,required:!1}},emits:{actionClick:e=>typeof e=="object"&&e!==null},setup(e){const t=Gi(()=>on(()=>Promise.resolve().then(()=>w0),void 0,import.meta.url)),n=Gi(()=>on(()=>import("./CoreChatbotLoader-DJCIpDIF.js"),__vite__mapDeps([3,4]),import.meta.url)),a=e,o=J(()=>{var d;return((d=a.message)==null?void 0:d.actions)??[]}),r=J(()=>a.isLoading&&!l.value),s=J(()=>{var d;return a.isLoading?"assistant":((d=a.message)==null?void 0:d.role)??""}),l=J(()=>{var d;return((d=a.message)==null?void 0:d.content.trim())??""}),c=J(()=>{switch(s.value){case"user":return"var(--userRoleColor)";case"assistant":return a.assistantRoleColor||"linear-gradient(264deg, #f5ebff 0.71%, #eef1ff 100%)";default:return""}});return(d,h)=>(C(),N("div",{class:"CoreChatbotMessage","aria-busy":e.isLoading},[je(l1,{initials:e.initials},null,8,["initials"]),U("div",{class:"CoreChatbotMessage__content",style:it({background:c.value})},[r.value?(C(),Fe(T(n),{key:0})):(C(),N("div",u1,[e.useMarkdown?(C(),Fe(T(t),{key:0,"raw-text":l.value},null,8,["raw-text"])):(C(),N(Oe,{key:1},[At(be(l.value),1)],64))])),o.value.length?(C(),N("div",d1,[(C(!0),N(Oe,null,mt(o.value,(f,m)=>(C(),N("button",{key:m,class:"action",onClick:k=>d.$emit("actionClick",f)},[f.subheading?(C(),N("div",p1,be(f.subheading),1)):Ae("",!0),U("h3",h1,be(f.name),1),f.desc?(C(),N("div",v1,be(f.desc),1)):Ae("",!0)],8,f1))),128))])):Ae("",!0)],4)],8,c1))}}),sd=ke(m1,[["__scopeId","data-v-54e985f1"]]),g1=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],y1=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],_1=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],b1=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],id=(e,t,n)=>{let a=e;return typeof t=="string"||Array.isArray(t)?a=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(a=e.toLocaleString(void 0,n)),a};function ld(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?b1:_1:t.binary?y1:g1,a=t.space?" ":"";if(t.signed&&e===0)return` 0${a}${n[0]}`;const o=e<0,r=o?"-":t.signed?"+":"";o&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const h=id(e,t.locale,s);return r+h+a+n[0]}const l=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**l,s||(e=e.toPrecision(3));const c=id(Number(e),t.locale,s),d=n[l];return r+c+a+d}const A1=Ie({__name:"WdsTextareaInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e,{expose:t}){const n=wa(e,"modelValue");t({focus:l,getSelection:s,value:n,setSelectionEnd:r,setSelectionStart:o});const a=q();function o(c){a.value&&(a.value.selectionStart=c)}function r(c){a.value&&(a.value.selectionEnd=c)}function s(){var c,d;return{selectionStart:(c=a.value)==null?void 0:c.selectionStart,selectionEnd:(d=a.value)==null?void 0:d.selectionEnd}}function l(){var c;(c=a.value)==null||c.focus()}return(c,d)=>Bt((C(),N("textarea",{ref_key:"input",ref:a,"onUpdate:modelValue":d[0]||(d[0]=h=>n.value=h)},null,512)),[[xo,n.value]])}}),C1=ke(A1,[["__scopeId","data-v-b23c2c0c"]]),js=e=>(zt("data-v-381f064b"),e=e(),Kt(),e),w1={class:"filesArea"},I1={key:1,class:"list"},x1=["title"],k1={class:"size"},S1=js(()=>U("i",{class:"material-symbols-outlined"}," delete ",-1)),T1={class:"filesButtons"},E1=js(()=>U("i",{class:"material-symbols-outlined"},"upload",-1)),$1={key:1,class:"sizeExceededMessage"},M1=js(()=>U("i",{class:"material-symbols-outlined"},"warning",-1)),N1={class:"inputArea"},O1={class:"inputButtons"},P1=js(()=>U("i",{class:"material-symbols-outlined"},"attach_file",-1)),Fi=200*1024*1024,L1="A chatbot component to build human-to-AI interactions.",R1=`[
  {
  "role": "assistant",
  "content": "How can I help you?"
  },
  {
  "role": "user",
  "content": "I'm building a Chatbot"
  }
]`,D1=`
def handle_message_simple(payload, state):

	# payload contains a dict in the form { "role": "user", "message": "hello"}

	state["conversation"] += [payload]
    state["conversation"] += [{
        "role": "assistant",
        "content": "Hello human" if payload == "Hello" else "I don't understand"
    }]

    # Handle streaming by appending to the last message

    import time
    for i in range(10):
        conv = state["conversation"]
        conv[-1]["content"] += f" {i}"
        state["conversation"] = conv
        time.sleep(0.5)
`.trim(),B1=`
def handle_action_simple(payload, state):

    # payload contains the "data" property of the action

    if payload == "change_title":
        state["app_background_color"] = "red"

# Make an action available when adding a message

def handle_message_with_action(payload, state):
    state["conversation"] += [payload]
    state["conversation"] += [{
        "role": "assistant",
        "content": "I don't know, but check this out.",
        "actions": [{
            "subheading": "Resource",
            "name": "Surprise",
            "desc": "Click to be surprised",
            "data": "change_title"
        }]
    }]
`.trim(),F1=`
def handle_file_upload(state, payload):

	# An array of dictionaries is provided in the payload
	# The dictionaries have the properties name, type and data
    # The data property is a file-like object

    uploaded_files = payload
    for i, uploaded_file in enumerate(uploaded_files):
        name = uploaded_file.get("name")
        file_data = uploaded_file.get("data")
        with open(f"{name}-{i}.jpeg", "wb") as file_handle:
            file_handle.write(file_data)
`.trim(),V1={writer:{name:"Chatbot",description:L1,category:"Content",fields:{conversation:{name:"Conversation",init:R1,desc:"An array with messages or a writer.ai.Conversation object.",type:L.Object},assistantInitials:{name:"Assistant initials",default:"AI",type:L.Text},userInitials:{name:"User initials",default:"YOU",type:L.Text},useMarkdown:{name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},enableFileUpload:{name:"Enable file upload",default:"no",type:L.Text,options:{single:"Single file",multiple:"Multiple files",no:"No"}},placeholder:{name:"Placeholder",default:"What do you need?",type:L.Text},assistantRoleColor:{name:"Assistant role",type:L.Color,category:Pe.Style,applyStyleVariable:!0},userRoleColor:{name:"User role",default:ht.Gray1,type:L.Color,category:Pe.Style,applyStyleVariable:!0},avatarBackgroundColor:{name:"Avatar",default:ht.Gray6,type:L.Color,category:Pe.Style,applyStyleVariable:!0},avatarTextColor:{name:"Avatar text",default:ht.White,type:L.Color,category:Pe.Style,applyStyleVariable:!0},accentColor:Wt,containerBackgroundColor:zn,primaryTextColor:Mt,secondaryTextColor:yn,separatorColor:Vt,buttonColor:{...Kn,default:ht.Black},buttonTextColor:{...Wn,default:ht.White},cssClasses:Ye},events:{"wf-chatbot-message":{desc:"Triggered when the user sends a message.",stub:D1},"wf-chatbot-action-click":{desc:"Handle clicks on actions.",stub:B1},"wf-file-change":{desc:"Triggered when files are uploaded",stub:F1}}}},$p=Ie({...V1,__name:"CoreChatbot",setup(e){const t=q(null),n=q(null),a=q(null),o=q(void 0),r=W(Y.evaluatedFields),s=Il([]),l=q(!1);let c;const d=J(()=>{var p;return((p=r.conversation)==null?void 0:p.value)??[]}),h=q(""),f=J(()=>{let p=0;return Array.from(s.value).forEach(A=>{p+=A.size}),p>=Fi}),m=J(()=>o.value===void 0?!1:o.value>=d.value.length);function k(){if(o.value)return;o.value=d.value.length+1;const p=new CustomEvent("wf-chatbot-message",{detail:{payload:{role:"user",content:h.value},callback:()=>{o.value=void 0}}});t.value.dispatchEvent(p),h.value=""}function S(p){const{data:A}=p,w=new CustomEvent("wf-chatbot-action-click",{detail:{payload:A}});t.value.dispatchEvent(w)}function y(){const p=document.createElement("input");p.type="file",r.enableFileUpload.value=="multiple"&&(p.multiple=!0),p.addEventListener("change",()=>{let A;r.enableFileUpload.value=="multiple"?A=[...s.value]:A=[],Array.from(p.files).forEach(w=>{A.push(w)}),s.value=A}),p.dispatchEvent(new MouseEvent("click"))}function b(p){const A=s.value.toSpliced(p,1);s.value=A}function O(){n.value.scrollTo({top:n.value.scrollHeight,left:0})}const I=async p=>{var A=new FileReader;return A.readAsDataURL(p),new Promise((w,V)=>{A.onload=()=>w(A.result),A.onerror=()=>V(A.error)})};async function g(){if(s.value.length==0||l.value)return;l.value=!0;const A=await(async()=>{let V=0;const j=Promise.all(Array.from(s.value).map(async ee=>(V+=ee.size,{name:ee.name,type:ee.type,data:await I(ee)})));if(V>Fi){alert("Size limit exceeded.");return}return j})();if(!A){l.value=!1;return}const w=new CustomEvent("wf-file-change",{detail:{payload:A,callback:()=>{l.value=!1,s.value=[]}}});t.value.dispatchEvent(w)}return Ft(()=>{c=new ResizeObserver(()=>{O()}),c.observe(a.value)}),Xa(()=>{c.unobserve(a.value)}),(p,A)=>(C(),N("div",{ref_key:"rootEl",ref:t,class:"CoreChatbot"},[U("div",{ref_key:"messageAreaEl",ref:n,class:"messageArea"},[U("div",{ref_key:"messagesEl",ref:a,class:"messages"},[(C(!0),N(Oe,null,mt(d.value,(w,V)=>(C(),Fe(sd,{key:V,message:w,"use-markdown":T(r).useMarkdown.value=="yes","assistant-role-color":T(r).assistantRoleColor.value,initials:w.role==="assistant"?T(r).assistantInitials.value:T(r).userInitials.value,onActionClick:A[0]||(A[0]=j=>S(j))},null,8,["message","use-markdown","assistant-role-color","initials"]))),128)),m.value?(C(),Fe(sd,{key:0,"is-loading":"",initials:T(r).assistantInitials.value},null,8,["initials"])):Ae("",!0)],512)],512),s.value.length>0?(C(),N(Oe,{key:0},[U("div",w1,[l.value?(C(),N(Oe,{key:0},[At(" Uploading... ")],64)):Ae("",!0),l.value?Ae("",!0):(C(),N("div",I1,[(C(!0),N(Oe,null,mt(s.value,(w,V)=>(C(),N("div",{key:V,class:"file"},[U("div",null,[U("div",{class:"name",title:w.name},be(w.name),9,x1),U("div",k1,be(T(ld)(w.size)),1)]),je(Pn,{onClick:j=>b(V)},{default:Ge(()=>[S1]),_:2},1032,["onClick"])]))),128))]))]),U("div",T1,[!f.value&&!l.value?(C(),Fe(Pn,{key:0,title:"Upload",onClick:g},{default:Ge(()=>[E1]),_:1})):Ae("",!0),f.value?(C(),N("div",$1,[M1,At(" Size limit of "+be(T(ld)(Fi))+" exceeded. ",1)])):Ae("",!0)])],64)):Ae("",!0),U("div",N1,[je(C1,{modelValue:h.value,"onUpdate:modelValue":A[1]||(A[1]=w=>h.value=w),placeholder:T(r).placeholder.value,onKeydown:Ca(So(k,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])]),U("div",O1,[je(Pn,{class:"send action",title:"Send message",onClick:k},{default:Ge(()=>[je(r1)]),_:1}),T(r).enableFileUpload.value!="no"?(C(),Fe(Pn,{key:0,class:"action",title:"Attach files",onClick:y},{default:Ge(()=>[P1]),_:1})):Ae("",!0)])],512))}}),cd=e=>{e.writer&&(e.writer.docs="Connect it to an LLM by handling the `wf-chatbot-message` event, which is triggered every time the user sends a message.\n\nYou can add `actions` to messages, which are buttons that trigger the `wf-chatbot-action-click`.\n\nSee the stubs for more details.")};typeof cd=="function"&&cd($p);const U1=ke($p,[["__scopeId","data-v-381f064b"]]);var H1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function j1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _2(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}),n}var Mp={exports:{}};/**
 * chroma.js - JavaScript library for color conversions
 *
 * Copyright (c) 2011-2019, Gregor Aisch
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. The name Gregor Aisch may not be used to endorse or promote products
 * derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * -------------------------------------------------------
 *
 * chroma.js includes colors from colorbrewer2.org, which are released under
 * the following license:
 *
 * Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
 * and The Pennsylvania State University.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific
 * language governing permissions and limitations under the License.
 *
 * ------------------------------------------------------
 *
 * Named colors are taken from X11 Color Names.
 * http://www.w3.org/TR/css3-color/#svg-color
 *
 * @preserve
 */(function(e,t){(function(n,a){e.exports=a()})(H1,function(){for(var n=function(i,u,v){return u===void 0&&(u=0),v===void 0&&(v=1),i<u?u:i>v?v:i},a=n,o=function(i){i._clipped=!1,i._unclipped=i.slice(0);for(var u=0;u<=3;u++)u<3?((i[u]<0||i[u]>255)&&(i._clipped=!0),i[u]=a(i[u],0,255)):u===3&&(i[u]=a(i[u],0,1));return i},r={},s=0,l=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];s<l.length;s+=1){var c=l[s];r["[object "+c+"]"]=c.toLowerCase()}var d=function(i){return r[Object.prototype.toString.call(i)]||"object"},h=d,f=function(i,u){return u===void 0&&(u=null),i.length>=3?Array.prototype.slice.call(i):h(i[0])=="object"&&u?u.split("").filter(function(v){return i[0][v]!==void 0}).map(function(v){return i[0][v]}):i[0]},m=d,k=function(i){if(i.length<2)return null;var u=i.length-1;return m(i[u])=="string"?i[u].toLowerCase():null},S=Math.PI,y={clip_rgb:o,limit:n,type:d,unpack:f,last:k,PI:S,TWOPI:S*2,PITHIRD:S/3,DEG2RAD:S/180,RAD2DEG:180/S},b={format:{},autodetect:[]},O=y.last,I=y.clip_rgb,g=y.type,p=b,A=function(){for(var u=[],v=arguments.length;v--;)u[v]=arguments[v];var x=this;if(g(u[0])==="object"&&u[0].constructor&&u[0].constructor===this.constructor)return u[0];var P=O(u),D=!1;if(!P){D=!0,p.sorted||(p.autodetect=p.autodetect.sort(function(fe,Me){return Me.p-fe.p}),p.sorted=!0);for(var E=0,z=p.autodetect;E<z.length;E+=1){var G=z[E];if(P=G.test.apply(G,u),P)break}}if(p.format[P]){var ne=p.format[P].apply(null,D?u:u.slice(0,-1));x._rgb=I(ne)}else throw new Error("unknown format: "+u);x._rgb.length===3&&x._rgb.push(1)};A.prototype.toString=function(){return g(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var w=A,V=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(V.Color,[null].concat(i)))};V.Color=w,V.version="2.4.2";var j=V,ee=y.unpack,se=Math.max,le=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=ee(i,"rgb"),x=v[0],P=v[1],D=v[2];x=x/255,P=P/255,D=D/255;var E=1-se(x,se(P,D)),z=E<1?1/(1-E):0,G=(1-x-E)*z,ne=(1-P-E)*z,fe=(1-D-E)*z;return[G,ne,fe,E]},ae=le,ue=y.unpack,Ce=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=ue(i,"cmyk");var v=i[0],x=i[1],P=i[2],D=i[3],E=i.length>4?i[4]:1;return D===1?[0,0,0,E]:[v>=1?0:255*(1-v)*(1-D),x>=1?0:255*(1-x)*(1-D),P>=1?0:255*(1-P)*(1-D),E]},Re=Ce,pe=j,he=w,de=b,Le=y.unpack,kt=y.type,qe=ae;he.prototype.cmyk=function(){return qe(this._rgb)},pe.cmyk=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(he,[null].concat(i,["cmyk"])))},de.format.cmyk=Re,de.autodetect.push({p:2,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=Le(i,"cmyk"),kt(i)==="array"&&i.length===4)return"cmyk"}});var Ct=y.unpack,$e=y.last,Ke=function(i){return Math.round(i*100)/100},at=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=Ct(i,"hsla"),x=$e(i)||"lsa";return v[0]=Ke(v[0]||0),v[1]=Ke(v[1]*100)+"%",v[2]=Ke(v[2]*100)+"%",x==="hsla"||v.length>3&&v[3]<1?(v[3]=v.length>3?v[3]:1,x="hsla"):v.length=3,x+"("+v.join(",")+")"},Xe=at,$=y.unpack,R=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=$(i,"rgba");var v=i[0],x=i[1],P=i[2];v/=255,x/=255,P/=255;var D=Math.min(v,x,P),E=Math.max(v,x,P),z=(E+D)/2,G,ne;return E===D?(G=0,ne=Number.NaN):G=z<.5?(E-D)/(E+D):(E-D)/(2-E-D),v==E?ne=(x-P)/(E-D):x==E?ne=2+(P-v)/(E-D):P==E&&(ne=4+(v-x)/(E-D)),ne*=60,ne<0&&(ne+=360),i.length>3&&i[3]!==void 0?[ne,G,z,i[3]]:[ne,G,z]},B=R,K=y.unpack,X=y.last,Se=Xe,_=B,M=Math.round,Q=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=K(i,"rgba"),x=X(i)||"rgb";return x.substr(0,3)=="hsl"?Se(_(v),x):(v[0]=M(v[0]),v[1]=M(v[1]),v[2]=M(v[2]),(x==="rgba"||v.length>3&&v[3]<1)&&(v[3]=v.length>3?v[3]:1,x="rgba"),x+"("+v.slice(0,x==="rgb"?3:4).join(",")+")")},te=Q,re=y.unpack,ye=Math.round,xe=function(){for(var i,u=[],v=arguments.length;v--;)u[v]=arguments[v];u=re(u,"hsl");var x=u[0],P=u[1],D=u[2],E,z,G;if(P===0)E=z=G=D*255;else{var ne=[0,0,0],fe=[0,0,0],Me=D<.5?D*(1+P):D+P-D*P,ve=2*D-Me,Be=x/360;ne[0]=Be+1/3,ne[1]=Be,ne[2]=Be-1/3;for(var De=0;De<3;De++)ne[De]<0&&(ne[De]+=1),ne[De]>1&&(ne[De]-=1),6*ne[De]<1?fe[De]=ve+(Me-ve)*6*ne[De]:2*ne[De]<1?fe[De]=Me:3*ne[De]<2?fe[De]=ve+(Me-ve)*(2/3-ne[De])*6:fe[De]=ve;i=[ye(fe[0]*255),ye(fe[1]*255),ye(fe[2]*255)],E=i[0],z=i[1],G=i[2]}return u.length>3?[E,z,G,u[3]]:[E,z,G,1]},me=xe,_e=me,ce=b,Ee=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,H=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Z=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,oe=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ie=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Te=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ne=Math.round,We=function(i){i=i.toLowerCase().trim();var u;if(ce.format.named)try{return ce.format.named(i)}catch{}if(u=i.match(Ee)){for(var v=u.slice(1,4),x=0;x<3;x++)v[x]=+v[x];return v[3]=1,v}if(u=i.match(H)){for(var P=u.slice(1,5),D=0;D<4;D++)P[D]=+P[D];return P}if(u=i.match(Z)){for(var E=u.slice(1,4),z=0;z<3;z++)E[z]=Ne(E[z]*2.55);return E[3]=1,E}if(u=i.match(oe)){for(var G=u.slice(1,5),ne=0;ne<3;ne++)G[ne]=Ne(G[ne]*2.55);return G[3]=+G[3],G}if(u=i.match(ie)){var fe=u.slice(1,4);fe[1]*=.01,fe[2]*=.01;var Me=_e(fe);return Me[3]=1,Me}if(u=i.match(Te)){var ve=u.slice(1,4);ve[1]*=.01,ve[2]*=.01;var Be=_e(ve);return Be[3]=+u[4],Be}};We.test=function(i){return Ee.test(i)||H.test(i)||Z.test(i)||oe.test(i)||ie.test(i)||Te.test(i)};var Ze=We,lt=j,St=w,Et=b,Pt=y.type,wt=te,Ut=Ze;St.prototype.css=function(i){return wt(this._rgb,i)},lt.css=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(St,[null].concat(i,["css"])))},Et.format.css=Ut,Et.autodetect.push({p:5,test:function(i){for(var u=[],v=arguments.length-1;v-- >0;)u[v]=arguments[v+1];if(!u.length&&Pt(i)==="string"&&Ut.test(i))return"css"}});var ka=w,Lt=j,aa=b,Ws=y.unpack;aa.format.gl=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=Ws(i,"rgba");return v[0]*=255,v[1]*=255,v[2]*=255,v},Lt.gl=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(ka,[null].concat(i,["gl"])))},ka.prototype.gl=function(){var i=this._rgb;return[i[0]/255,i[1]/255,i[2]/255,i[3]]};var wr=y.unpack,Po=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=wr(i,"rgb"),x=v[0],P=v[1],D=v[2],E=Math.min(x,P,D),z=Math.max(x,P,D),G=z-E,ne=G*100/255,fe=E/(255-G)*100,Me;return G===0?Me=Number.NaN:(x===z&&(Me=(P-D)/G),P===z&&(Me=2+(D-x)/G),D===z&&(Me=4+(x-P)/G),Me*=60,Me<0&&(Me+=360)),[Me,ne,fe]},Ir=Po,xr=y.unpack,Gs=Math.floor,kr=function(){for(var i,u,v,x,P,D,E=[],z=arguments.length;z--;)E[z]=arguments[z];E=xr(E,"hcg");var G=E[0],ne=E[1],fe=E[2],Me,ve,Be;fe=fe*255;var De=ne*255;if(ne===0)Me=ve=Be=fe;else{G===360&&(G=0),G>360&&(G-=360),G<0&&(G+=360),G/=60;var et=Gs(G),ot=G-et,dt=fe*(1-ne),vt=dt+De*(1-ot),Xt=dt+De*ot,Jt=dt+De;switch(et){case 0:i=[Jt,Xt,dt],Me=i[0],ve=i[1],Be=i[2];break;case 1:u=[vt,Jt,dt],Me=u[0],ve=u[1],Be=u[2];break;case 2:v=[dt,Jt,Xt],Me=v[0],ve=v[1],Be=v[2];break;case 3:x=[dt,vt,Jt],Me=x[0],ve=x[1],Be=x[2];break;case 4:P=[Xt,dt,Jt],Me=P[0],ve=P[1],Be=P[2];break;case 5:D=[Jt,dt,vt],Me=D[0],ve=D[1],Be=D[2];break}}return[Me,ve,Be,E.length>3?E[3]:1]},Sr=kr,Ys=y.unpack,Gn=y.type,Lo=j,Ro=w,Do=b,Js=Ir;Ro.prototype.hcg=function(){return Js(this._rgb)},Lo.hcg=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(Ro,[null].concat(i,["hcg"])))},Do.format.hcg=Sr,Do.autodetect.push({p:1,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=Ys(i,"hcg"),Gn(i)==="array"&&i.length===3)return"hcg"}});var Tr=y.unpack,Tn=y.last,Sa=Math.round,Er=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=Tr(i,"rgba"),x=v[0],P=v[1],D=v[2],E=v[3],z=Tn(i)||"auto";E===void 0&&(E=1),z==="auto"&&(z=E<1?"rgba":"rgb"),x=Sa(x),P=Sa(P),D=Sa(D);var G=x<<16|P<<8|D,ne="000000"+G.toString(16);ne=ne.substr(ne.length-6);var fe="0"+Sa(E*255).toString(16);switch(fe=fe.substr(fe.length-2),z.toLowerCase()){case"rgba":return"#"+ne+fe;case"argb":return"#"+fe+ne;default:return"#"+ne}},Bo=Er,$r=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Qs=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,ze=function(i){if(i.match($r)){(i.length===4||i.length===7)&&(i=i.substr(1)),i.length===3&&(i=i.split(""),i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);var u=parseInt(i,16),v=u>>16,x=u>>8&255,P=u&255;return[v,x,P,1]}if(i.match(Qs)){(i.length===5||i.length===9)&&(i=i.substr(1)),i.length===4&&(i=i.split(""),i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]+i[3]+i[3]);var D=parseInt(i,16),E=D>>24&255,z=D>>16&255,G=D>>8&255,ne=Math.round((D&255)/255*100)/100;return[E,z,G,ne]}throw new Error("unknown hex color: "+i)},F=ze,we=j,Ve=w,It=y.type,Ht=b,Gt=Bo;Ve.prototype.hex=function(i){return Gt(this._rgb,i)},we.hex=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(Ve,[null].concat(i,["hex"])))},Ht.format.hex=F,Ht.autodetect.push({p:4,test:function(i){for(var u=[],v=arguments.length-1;v-- >0;)u[v]=arguments[v+1];if(!u.length&&It(i)==="string"&&[3,4,5,6,7,8,9].indexOf(i.length)>=0)return"hex"}});var tn=y.unpack,Fn=y.TWOPI,Ta=Math.min,nn=Math.sqrt,Mr=Math.acos,Nr=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=tn(i,"rgb"),x=v[0],P=v[1],D=v[2];x/=255,P/=255,D/=255;var E,z=Ta(x,P,D),G=(x+P+D)/3,ne=G>0?1-z/G:0;return ne===0?E=NaN:(E=(x-P+(x-D))/2,E/=nn((x-P)*(x-P)+(x-D)*(P-D)),E=Mr(E),D>P&&(E=Fn-E),E/=Fn),[E*360,ne,G]},oh=Nr,rh=y.unpack,qs=y.limit,eo=y.TWOPI,Xs=y.PITHIRD,to=Math.cos,sh=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=rh(i,"hsi");var v=i[0],x=i[1],P=i[2],D,E,z;return isNaN(v)&&(v=0),isNaN(x)&&(x=0),v>360&&(v-=360),v<0&&(v+=360),v/=360,v<1/3?(z=(1-x)/3,D=(1+x*to(eo*v)/to(Xs-eo*v))/3,E=1-(z+D)):v<2/3?(v-=1/3,D=(1-x)/3,E=(1+x*to(eo*v)/to(Xs-eo*v))/3,z=1-(D+E)):(v-=2/3,E=(1-x)/3,z=(1+x*to(eo*v)/to(Xs-eo*v))/3,D=1-(E+z)),D=qs(P*D*3),E=qs(P*E*3),z=qs(P*z*3),[D*255,E*255,z*255,i.length>3?i[3]:1]},ih=sh,lh=y.unpack,ch=y.type,uh=j,ec=w,tc=b,dh=oh;ec.prototype.hsi=function(){return dh(this._rgb)},uh.hsi=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(ec,[null].concat(i,["hsi"])))},tc.format.hsi=ih,tc.autodetect.push({p:2,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=lh(i,"hsi"),ch(i)==="array"&&i.length===3)return"hsi"}});var fh=y.unpack,ph=y.type,hh=j,nc=w,ac=b,vh=B;nc.prototype.hsl=function(){return vh(this._rgb)},hh.hsl=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(nc,[null].concat(i,["hsl"])))},ac.format.hsl=me,ac.autodetect.push({p:2,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=fh(i,"hsl"),ph(i)==="array"&&i.length===3)return"hsl"}});var mh=y.unpack,gh=Math.min,yh=Math.max,_h=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=mh(i,"rgb");var v=i[0],x=i[1],P=i[2],D=gh(v,x,P),E=yh(v,x,P),z=E-D,G,ne,fe;return fe=E/255,E===0?(G=Number.NaN,ne=0):(ne=z/E,v===E&&(G=(x-P)/z),x===E&&(G=2+(P-v)/z),P===E&&(G=4+(v-x)/z),G*=60,G<0&&(G+=360)),[G,ne,fe]},bh=_h,Ah=y.unpack,Ch=Math.floor,wh=function(){for(var i,u,v,x,P,D,E=[],z=arguments.length;z--;)E[z]=arguments[z];E=Ah(E,"hsv");var G=E[0],ne=E[1],fe=E[2],Me,ve,Be;if(fe*=255,ne===0)Me=ve=Be=fe;else{G===360&&(G=0),G>360&&(G-=360),G<0&&(G+=360),G/=60;var De=Ch(G),et=G-De,ot=fe*(1-ne),dt=fe*(1-ne*et),vt=fe*(1-ne*(1-et));switch(De){case 0:i=[fe,vt,ot],Me=i[0],ve=i[1],Be=i[2];break;case 1:u=[dt,fe,ot],Me=u[0],ve=u[1],Be=u[2];break;case 2:v=[ot,fe,vt],Me=v[0],ve=v[1],Be=v[2];break;case 3:x=[ot,dt,fe],Me=x[0],ve=x[1],Be=x[2];break;case 4:P=[vt,ot,fe],Me=P[0],ve=P[1],Be=P[2];break;case 5:D=[fe,ot,dt],Me=D[0],ve=D[1],Be=D[2];break}}return[Me,ve,Be,E.length>3?E[3]:1]},Ih=wh,xh=y.unpack,kh=y.type,Sh=j,oc=w,rc=b,Th=bh;oc.prototype.hsv=function(){return Th(this._rgb)},Sh.hsv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(oc,[null].concat(i,["hsv"])))},rc.format.hsv=Ih,rc.autodetect.push({p:2,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=xh(i,"hsv"),kh(i)==="array"&&i.length===3)return"hsv"}});var Or={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},no=Or,Eh=y.unpack,sc=Math.pow,$h=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=Eh(i,"rgb"),x=v[0],P=v[1],D=v[2],E=Mh(x,P,D),z=E[0],G=E[1],ne=E[2],fe=116*G-16;return[fe<0?0:fe,500*(z-G),200*(G-ne)]},Zs=function(i){return(i/=255)<=.04045?i/12.92:sc((i+.055)/1.055,2.4)},ei=function(i){return i>no.t3?sc(i,1/3):i/no.t2+no.t0},Mh=function(i,u,v){i=Zs(i),u=Zs(u),v=Zs(v);var x=ei((.4124564*i+.3575761*u+.1804375*v)/no.Xn),P=ei((.2126729*i+.7151522*u+.072175*v)/no.Yn),D=ei((.0193339*i+.119192*u+.9503041*v)/no.Zn);return[x,P,D]},ic=$h,ao=Or,Nh=y.unpack,Oh=Math.pow,Ph=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=Nh(i,"lab");var v=i[0],x=i[1],P=i[2],D,E,z,G,ne,fe;return E=(v+16)/116,D=isNaN(x)?E:E+x/500,z=isNaN(P)?E:E-P/200,E=ao.Yn*ni(E),D=ao.Xn*ni(D),z=ao.Zn*ni(z),G=ti(3.2404542*D-1.5371385*E-.4985314*z),ne=ti(-.969266*D+1.8760108*E+.041556*z),fe=ti(.0556434*D-.2040259*E+1.0572252*z),[G,ne,fe,i.length>3?i[3]:1]},ti=function(i){return 255*(i<=.00304?12.92*i:1.055*Oh(i,1/2.4)-.055)},ni=function(i){return i>ao.t1?i*i*i:ao.t2*(i-ao.t0)},lc=Ph,Lh=y.unpack,Rh=y.type,Dh=j,cc=w,uc=b,Bh=ic;cc.prototype.lab=function(){return Bh(this._rgb)},Dh.lab=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(cc,[null].concat(i,["lab"])))},uc.format.lab=lc,uc.autodetect.push({p:2,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=Lh(i,"lab"),Rh(i)==="array"&&i.length===3)return"lab"}});var Fh=y.unpack,Vh=y.RAD2DEG,Uh=Math.sqrt,Hh=Math.atan2,jh=Math.round,zh=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=Fh(i,"lab"),x=v[0],P=v[1],D=v[2],E=Uh(P*P+D*D),z=(Hh(D,P)*Vh+360)%360;return jh(E*1e4)===0&&(z=Number.NaN),[x,E,z]},dc=zh,Kh=y.unpack,Wh=ic,Gh=dc,Yh=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=Kh(i,"rgb"),x=v[0],P=v[1],D=v[2],E=Wh(x,P,D),z=E[0],G=E[1],ne=E[2];return Gh(z,G,ne)},Jh=Yh,Qh=y.unpack,qh=y.DEG2RAD,Xh=Math.sin,Zh=Math.cos,ev=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=Qh(i,"lch"),x=v[0],P=v[1],D=v[2];return isNaN(D)&&(D=0),D=D*qh,[x,Zh(D)*P,Xh(D)*P]},fc=ev,tv=y.unpack,nv=fc,av=lc,ov=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=tv(i,"lch");var v=i[0],x=i[1],P=i[2],D=nv(v,x,P),E=D[0],z=D[1],G=D[2],ne=av(E,z,G),fe=ne[0],Me=ne[1],ve=ne[2];return[fe,Me,ve,i.length>3?i[3]:1]},pc=ov,rv=y.unpack,sv=pc,iv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=rv(i,"hcl").reverse();return sv.apply(void 0,v)},lv=iv,cv=y.unpack,uv=y.type,hc=j,Pr=w,ai=b,vc=Jh;Pr.prototype.lch=function(){return vc(this._rgb)},Pr.prototype.hcl=function(){return vc(this._rgb).reverse()},hc.lch=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(Pr,[null].concat(i,["lch"])))},hc.hcl=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(Pr,[null].concat(i,["hcl"])))},ai.format.lch=pc,ai.format.hcl=lv,["lch","hcl"].forEach(function(i){return ai.autodetect.push({p:2,test:function(){for(var u=[],v=arguments.length;v--;)u[v]=arguments[v];if(u=cv(u,i),uv(u)==="array"&&u.length===3)return i}})});var dv={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},mc=dv,fv=w,gc=b,pv=y.type,Fo=mc,hv=F,vv=Bo;fv.prototype.name=function(){for(var i=vv(this._rgb,"rgb"),u=0,v=Object.keys(Fo);u<v.length;u+=1){var x=v[u];if(Fo[x]===i)return x.toLowerCase()}return i},gc.format.named=function(i){if(i=i.toLowerCase(),Fo[i])return hv(Fo[i]);throw new Error("unknown color name: "+i)},gc.autodetect.push({p:5,test:function(i){for(var u=[],v=arguments.length-1;v-- >0;)u[v]=arguments[v+1];if(!u.length&&pv(i)==="string"&&Fo[i.toLowerCase()])return"named"}});var mv=y.unpack,gv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=mv(i,"rgb"),x=v[0],P=v[1],D=v[2];return(x<<16)+(P<<8)+D},yv=gv,_v=y.type,bv=function(i){if(_v(i)=="number"&&i>=0&&i<=16777215){var u=i>>16,v=i>>8&255,x=i&255;return[u,v,x,1]}throw new Error("unknown num color: "+i)},Av=bv,Cv=j,yc=w,_c=b,wv=y.type,Iv=yv;yc.prototype.num=function(){return Iv(this._rgb)},Cv.num=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(yc,[null].concat(i,["num"])))},_c.format.num=Av,_c.autodetect.push({p:5,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i.length===1&&wv(i[0])==="number"&&i[0]>=0&&i[0]<=16777215)return"num"}});var xv=j,oi=w,bc=b,Ac=y.unpack,Cc=y.type,wc=Math.round;oi.prototype.rgb=function(i){return i===void 0&&(i=!0),i===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(wc)},oi.prototype.rgba=function(i){return i===void 0&&(i=!0),this._rgb.slice(0,4).map(function(u,v){return v<3?i===!1?u:wc(u):u})},xv.rgb=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(oi,[null].concat(i,["rgb"])))},bc.format.rgb=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=Ac(i,"rgba");return v[3]===void 0&&(v[3]=1),v},bc.autodetect.push({p:3,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=Ac(i,"rgba"),Cc(i)==="array"&&(i.length===3||i.length===4&&Cc(i[3])=="number"&&i[3]>=0&&i[3]<=1))return"rgb"}});var Lr=Math.log,kv=function(i){var u=i/100,v,x,P;return u<66?(v=255,x=u<6?0:-155.25485562709179-.44596950469579133*(x=u-2)+104.49216199393888*Lr(x),P=u<20?0:-254.76935184120902+.8274096064007395*(P=u-10)+115.67994401066147*Lr(P)):(v=351.97690566805693+.114206453784165*(v=u-55)-40.25366309332127*Lr(v),x=325.4494125711974+.07943456536662342*(x=u-50)-28.0852963507957*Lr(x),P=255),[v,x,P,1]},Ic=kv,Sv=Ic,Tv=y.unpack,Ev=Math.round,$v=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];for(var v=Tv(i,"rgb"),x=v[0],P=v[2],D=1e3,E=4e4,z=.4,G;E-D>z;){G=(E+D)*.5;var ne=Sv(G);ne[2]/ne[0]>=P/x?E=G:D=G}return Ev(G)},Mv=$v,ri=j,Rr=w,si=b,Nv=Mv;Rr.prototype.temp=Rr.prototype.kelvin=Rr.prototype.temperature=function(){return Nv(this._rgb)},ri.temp=ri.kelvin=ri.temperature=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(Rr,[null].concat(i,["temp"])))},si.format.temp=si.format.kelvin=si.format.temperature=Ic;var Ov=y.unpack,ii=Math.cbrt,Pv=Math.pow,Lv=Math.sign,Rv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=Ov(i,"rgb"),x=v[0],P=v[1],D=v[2],E=[li(x/255),li(P/255),li(D/255)],z=E[0],G=E[1],ne=E[2],fe=ii(.4122214708*z+.5363325363*G+.0514459929*ne),Me=ii(.2119034982*z+.6806995451*G+.1073969566*ne),ve=ii(.0883024619*z+.2817188376*G+.6299787005*ne);return[.2104542553*fe+.793617785*Me-.0040720468*ve,1.9779984951*fe-2.428592205*Me+.4505937099*ve,.0259040371*fe+.7827717662*Me-.808675766*ve]},xc=Rv;function li(i){var u=Math.abs(i);return u<.04045?i/12.92:(Lv(i)||1)*Pv((u+.055)/1.055,2.4)}var Dv=y.unpack,Dr=Math.pow,Bv=Math.sign,Fv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=Dv(i,"lab");var v=i[0],x=i[1],P=i[2],D=Dr(v+.3963377774*x+.2158037573*P,3),E=Dr(v-.1055613458*x-.0638541728*P,3),z=Dr(v-.0894841775*x-1.291485548*P,3);return[255*ci(4.0767416621*D-3.3077115913*E+.2309699292*z),255*ci(-1.2684380046*D+2.6097574011*E-.3413193965*z),255*ci(-.0041960863*D-.7034186147*E+1.707614701*z),i.length>3?i[3]:1]},kc=Fv;function ci(i){var u=Math.abs(i);return u>.0031308?(Bv(i)||1)*(1.055*Dr(u,1/2.4)-.055):i*12.92}var Vv=y.unpack,Uv=y.type,Hv=j,Sc=w,Tc=b,jv=xc;Sc.prototype.oklab=function(){return jv(this._rgb)},Hv.oklab=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(Sc,[null].concat(i,["oklab"])))},Tc.format.oklab=kc,Tc.autodetect.push({p:3,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=Vv(i,"oklab"),Uv(i)==="array"&&i.length===3)return"oklab"}});var zv=y.unpack,Kv=xc,Wv=dc,Gv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var v=zv(i,"rgb"),x=v[0],P=v[1],D=v[2],E=Kv(x,P,D),z=E[0],G=E[1],ne=E[2];return Wv(z,G,ne)},Yv=Gv,Jv=y.unpack,Qv=fc,qv=kc,Xv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=Jv(i,"lch");var v=i[0],x=i[1],P=i[2],D=Qv(v,x,P),E=D[0],z=D[1],G=D[2],ne=qv(E,z,G),fe=ne[0],Me=ne[1],ve=ne[2];return[fe,Me,ve,i.length>3?i[3]:1]},Zv=Xv,em=y.unpack,tm=y.type,nm=j,Ec=w,$c=b,am=Yv;Ec.prototype.oklch=function(){return am(this._rgb)},nm.oklch=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(Ec,[null].concat(i,["oklch"])))},$c.format.oklch=Zv,$c.autodetect.push({p:3,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=em(i,"oklch"),tm(i)==="array"&&i.length===3)return"oklch"}});var Mc=w,om=y.type;Mc.prototype.alpha=function(i,u){return u===void 0&&(u=!1),i!==void 0&&om(i)==="number"?u?(this._rgb[3]=i,this):new Mc([this._rgb[0],this._rgb[1],this._rgb[2],i],"rgb"):this._rgb[3]};var rm=w;rm.prototype.clipped=function(){return this._rgb._clipped||!1};var Ea=w,sm=Or;Ea.prototype.darken=function(i){i===void 0&&(i=1);var u=this,v=u.lab();return v[0]-=sm.Kn*i,new Ea(v,"lab").alpha(u.alpha(),!0)},Ea.prototype.brighten=function(i){return i===void 0&&(i=1),this.darken(-i)},Ea.prototype.darker=Ea.prototype.darken,Ea.prototype.brighter=Ea.prototype.brighten;var im=w;im.prototype.get=function(i){var u=i.split("."),v=u[0],x=u[1],P=this[v]();if(x){var D=v.indexOf(x)-(v.substr(0,2)==="ok"?2:0);if(D>-1)return P[D];throw new Error("unknown channel "+x+" in mode "+v)}else return P};var oo=w,lm=y.type,cm=Math.pow,um=1e-7,dm=20;oo.prototype.luminance=function(i){if(i!==void 0&&lm(i)==="number"){if(i===0)return new oo([0,0,0,this._rgb[3]],"rgb");if(i===1)return new oo([255,255,255,this._rgb[3]],"rgb");var u=this.luminance(),v="rgb",x=dm,P=function(E,z){var G=E.interpolate(z,.5,v),ne=G.luminance();return Math.abs(i-ne)<um||!x--?G:ne>i?P(E,G):P(G,z)},D=(u>i?P(new oo([0,0,0]),this):P(this,new oo([255,255,255]))).rgb();return new oo(D.concat([this._rgb[3]]))}return fm.apply(void 0,this._rgb.slice(0,3))};var fm=function(i,u,v){return i=ui(i),u=ui(u),v=ui(v),.2126*i+.7152*u+.0722*v},ui=function(i){return i/=255,i<=.03928?i/12.92:cm((i+.055)/1.055,2.4)},_n={},Nc=w,Oc=y.type,Br=_n,Pc=function(i,u,v){v===void 0&&(v=.5);for(var x=[],P=arguments.length-3;P-- >0;)x[P]=arguments[P+3];var D=x[0]||"lrgb";if(!Br[D]&&!x.length&&(D=Object.keys(Br)[0]),!Br[D])throw new Error("interpolation mode "+D+" is not defined");return Oc(i)!=="object"&&(i=new Nc(i)),Oc(u)!=="object"&&(u=new Nc(u)),Br[D](i,u,v).alpha(i.alpha()+v*(u.alpha()-i.alpha()))},Lc=w,pm=Pc;Lc.prototype.mix=Lc.prototype.interpolate=function(i,u){u===void 0&&(u=.5);for(var v=[],x=arguments.length-2;x-- >0;)v[x]=arguments[x+2];return pm.apply(void 0,[this,i,u].concat(v))};var Rc=w;Rc.prototype.premultiply=function(i){i===void 0&&(i=!1);var u=this._rgb,v=u[3];return i?(this._rgb=[u[0]*v,u[1]*v,u[2]*v,v],this):new Rc([u[0]*v,u[1]*v,u[2]*v,v],"rgb")};var di=w,hm=Or;di.prototype.saturate=function(i){i===void 0&&(i=1);var u=this,v=u.lch();return v[1]+=hm.Kn*i,v[1]<0&&(v[1]=0),new di(v,"lch").alpha(u.alpha(),!0)},di.prototype.desaturate=function(i){return i===void 0&&(i=1),this.saturate(-i)};var Dc=w,Bc=y.type;Dc.prototype.set=function(i,u,v){v===void 0&&(v=!1);var x=i.split("."),P=x[0],D=x[1],E=this[P]();if(D){var z=P.indexOf(D)-(P.substr(0,2)==="ok"?2:0);if(z>-1){if(Bc(u)=="string")switch(u.charAt(0)){case"+":E[z]+=+u;break;case"-":E[z]+=+u;break;case"*":E[z]*=+u.substr(1);break;case"/":E[z]/=+u.substr(1);break;default:E[z]=+u}else if(Bc(u)==="number")E[z]=u;else throw new Error("unsupported value for Color.set");var G=new Dc(E,P);return v?(this._rgb=G._rgb,this):G}throw new Error("unknown channel "+D+" in mode "+P)}else return E};var vm=w,mm=function(i,u,v){var x=i._rgb,P=u._rgb;return new vm(x[0]+v*(P[0]-x[0]),x[1]+v*(P[1]-x[1]),x[2]+v*(P[2]-x[2]),"rgb")};_n.rgb=mm;var gm=w,fi=Math.sqrt,ro=Math.pow,ym=function(i,u,v){var x=i._rgb,P=x[0],D=x[1],E=x[2],z=u._rgb,G=z[0],ne=z[1],fe=z[2];return new gm(fi(ro(P,2)*(1-v)+ro(G,2)*v),fi(ro(D,2)*(1-v)+ro(ne,2)*v),fi(ro(E,2)*(1-v)+ro(fe,2)*v),"rgb")};_n.lrgb=ym;var _m=w,bm=function(i,u,v){var x=i.lab(),P=u.lab();return new _m(x[0]+v*(P[0]-x[0]),x[1]+v*(P[1]-x[1]),x[2]+v*(P[2]-x[2]),"lab")};_n.lab=bm;var Fc=w,so=function(i,u,v,x){var P,D,E,z;x==="hsl"?(E=i.hsl(),z=u.hsl()):x==="hsv"?(E=i.hsv(),z=u.hsv()):x==="hcg"?(E=i.hcg(),z=u.hcg()):x==="hsi"?(E=i.hsi(),z=u.hsi()):x==="lch"||x==="hcl"?(x="hcl",E=i.hcl(),z=u.hcl()):x==="oklch"&&(E=i.oklch().reverse(),z=u.oklch().reverse());var G,ne,fe,Me,ve,Be;(x.substr(0,1)==="h"||x==="oklch")&&(P=E,G=P[0],fe=P[1],ve=P[2],D=z,ne=D[0],Me=D[1],Be=D[2]);var De,et,ot,dt;return!isNaN(G)&&!isNaN(ne)?(ne>G&&ne-G>180?dt=ne-(G+360):ne<G&&G-ne>180?dt=ne+360-G:dt=ne-G,et=G+v*dt):isNaN(G)?isNaN(ne)?et=Number.NaN:(et=ne,(ve==1||ve==0)&&x!="hsv"&&(De=Me)):(et=G,(Be==1||Be==0)&&x!="hsv"&&(De=fe)),De===void 0&&(De=fe+v*(Me-fe)),ot=ve+v*(Be-ve),x==="oklch"?new Fc([ot,De,et],x):new Fc([et,De,ot],x)},Am=so,Vc=function(i,u,v){return Am(i,u,v,"lch")};_n.lch=Vc,_n.hcl=Vc;var Cm=w,wm=function(i,u,v){var x=i.num(),P=u.num();return new Cm(x+v*(P-x),"num")};_n.num=wm;var Im=so,xm=function(i,u,v){return Im(i,u,v,"hcg")};_n.hcg=xm;var km=so,Sm=function(i,u,v){return km(i,u,v,"hsi")};_n.hsi=Sm;var Tm=so,Em=function(i,u,v){return Tm(i,u,v,"hsl")};_n.hsl=Em;var $m=so,Mm=function(i,u,v){return $m(i,u,v,"hsv")};_n.hsv=Mm;var Nm=w,Om=function(i,u,v){var x=i.oklab(),P=u.oklab();return new Nm(x[0]+v*(P[0]-x[0]),x[1]+v*(P[1]-x[1]),x[2]+v*(P[2]-x[2]),"oklab")};_n.oklab=Om;var Pm=so,Lm=function(i,u,v){return Pm(i,u,v,"oklch")};_n.oklch=Lm;var pi=w,Rm=y.clip_rgb,hi=Math.pow,vi=Math.sqrt,mi=Math.PI,Uc=Math.cos,Hc=Math.sin,Dm=Math.atan2,Bm=function(i,u,v){u===void 0&&(u="lrgb"),v===void 0&&(v=null);var x=i.length;v||(v=Array.from(new Array(x)).map(function(){return 1}));var P=x/v.reduce(function(et,ot){return et+ot});if(v.forEach(function(et,ot){v[ot]*=P}),i=i.map(function(et){return new pi(et)}),u==="lrgb")return Fm(i,v);for(var D=i.shift(),E=D.get(u),z=[],G=0,ne=0,fe=0;fe<E.length;fe++)if(E[fe]=(E[fe]||0)*v[0],z.push(isNaN(E[fe])?0:v[0]),u.charAt(fe)==="h"&&!isNaN(E[fe])){var Me=E[fe]/180*mi;G+=Uc(Me)*v[0],ne+=Hc(Me)*v[0]}var ve=D.alpha()*v[0];i.forEach(function(et,ot){var dt=et.get(u);ve+=et.alpha()*v[ot+1];for(var vt=0;vt<E.length;vt++)if(!isNaN(dt[vt]))if(z[vt]+=v[ot+1],u.charAt(vt)==="h"){var Xt=dt[vt]/180*mi;G+=Uc(Xt)*v[ot+1],ne+=Hc(Xt)*v[ot+1]}else E[vt]+=dt[vt]*v[ot+1]});for(var Be=0;Be<E.length;Be++)if(u.charAt(Be)==="h"){for(var De=Dm(ne/z[Be],G/z[Be])/mi*180;De<0;)De+=360;for(;De>=360;)De-=360;E[Be]=De}else E[Be]=E[Be]/z[Be];return ve/=x,new pi(E,u).alpha(ve>.99999?1:ve,!0)},Fm=function(i,u){for(var v=i.length,x=[0,0,0,0],P=0;P<i.length;P++){var D=i[P],E=u[P]/v,z=D._rgb;x[0]+=hi(z[0],2)*E,x[1]+=hi(z[1],2)*E,x[2]+=hi(z[2],2)*E,x[3]+=z[3]*E}return x[0]=vi(x[0]),x[1]=vi(x[1]),x[2]=vi(x[2]),x[3]>.9999999&&(x[3]=1),new pi(Rm(x))},En=j,io=y.type,Vm=Math.pow,gi=function(i){var u="rgb",v=En("#ccc"),x=0,P=[0,1],D=[],E=[0,0],z=!1,G=[],ne=!1,fe=0,Me=1,ve=!1,Be={},De=!0,et=1,ot=function(ge){if(ge=ge||["#fff","#000"],ge&&io(ge)==="string"&&En.brewer&&En.brewer[ge.toLowerCase()]&&(ge=En.brewer[ge.toLowerCase()]),io(ge)==="array"){ge.length===1&&(ge=[ge[0],ge[0]]),ge=ge.slice(0);for(var Je=0;Je<ge.length;Je++)ge[Je]=En(ge[Je]);D.length=0;for(var nt=0;nt<ge.length;nt++)D.push(nt/(ge.length-1))}return fn(),G=ge},dt=function(ge){if(z!=null){for(var Je=z.length-1,nt=0;nt<Je&&ge>=z[nt];)nt++;return nt-1}return 0},vt=function(ge){return ge},Xt=function(ge){return ge},Jt=function(ge,Je){var nt,tt;if(Je==null&&(Je=!1),isNaN(ge)||ge===null)return v;if(Je)tt=ge;else if(z&&z.length>2){var Zt=dt(ge);tt=Zt/(z.length-2)}else Me!==fe?tt=(ge-fe)/(Me-fe):tt=1;tt=Xt(tt),Je||(tt=vt(tt)),et!==1&&(tt=Vm(tt,et)),tt=E[0]+tt*(1-E[0]-E[1]),tt=Math.min(1,Math.max(0,tt));var Tt=Math.floor(tt*1e4);if(De&&Be[Tt])nt=Be[Tt];else{if(io(G)==="array")for(var ft=0;ft<D.length;ft++){var gt=D[ft];if(tt<=gt){nt=G[ft];break}if(tt>=gt&&ft===D.length-1){nt=G[ft];break}if(tt>gt&&tt<D[ft+1]){tt=(tt-gt)/(D[ft+1]-gt),nt=En.interpolate(G[ft],G[ft+1],tt,u);break}}else io(G)==="function"&&(nt=G(tt));De&&(Be[Tt]=nt)}return nt},fn=function(){return Be={}};ot(i);var ct=function(ge){var Je=En(Jt(ge));return ne&&Je[ne]?Je[ne]():Je};return ct.classes=function(ge){if(ge!=null){if(io(ge)==="array")z=ge,P=[ge[0],ge[ge.length-1]];else{var Je=En.analyze(P);ge===0?z=[Je.min,Je.max]:z=En.limits(Je,"e",ge)}return ct}return z},ct.domain=function(ge){if(!arguments.length)return P;fe=ge[0],Me=ge[ge.length-1],D=[];var Je=G.length;if(ge.length===Je&&fe!==Me)for(var nt=0,tt=Array.from(ge);nt<tt.length;nt+=1){var Zt=tt[nt];D.push((Zt-fe)/(Me-fe))}else{for(var Tt=0;Tt<Je;Tt++)D.push(Tt/(Je-1));if(ge.length>2){var ft=ge.map(function(yt,_t){return _t/(ge.length-1)}),gt=ge.map(function(yt){return(yt-fe)/(Me-fe)});gt.every(function(yt,_t){return ft[_t]===yt})||(Xt=function(yt){if(yt<=0||yt>=1)return yt;for(var _t=0;yt>=gt[_t+1];)_t++;var Mn=(yt-gt[_t])/(gt[_t+1]-gt[_t]),sa=ft[_t]+Mn*(ft[_t+1]-ft[_t]);return sa})}}return P=[fe,Me],ct},ct.mode=function(ge){return arguments.length?(u=ge,fn(),ct):u},ct.range=function(ge,Je){return ot(ge),ct},ct.out=function(ge){return ne=ge,ct},ct.spread=function(ge){return arguments.length?(x=ge,ct):x},ct.correctLightness=function(ge){return ge==null&&(ge=!0),ve=ge,fn(),ve?vt=function(Je){for(var nt=Jt(0,!0).lab()[0],tt=Jt(1,!0).lab()[0],Zt=nt>tt,Tt=Jt(Je,!0).lab()[0],ft=nt+(tt-nt)*Je,gt=Tt-ft,yt=0,_t=1,Mn=20;Math.abs(gt)>.01&&Mn-- >0;)(function(){return Zt&&(gt*=-1),gt<0?(yt=Je,Je+=(_t-Je)*.5):(_t=Je,Je+=(yt-Je)*.5),Tt=Jt(Je,!0).lab()[0],gt=Tt-ft})();return Je}:vt=function(Je){return Je},ct},ct.padding=function(ge){return ge!=null?(io(ge)==="number"&&(ge=[ge,ge]),E=ge,ct):E},ct.colors=function(ge,Je){arguments.length<2&&(Je="hex");var nt=[];if(arguments.length===0)nt=G.slice(0);else if(ge===1)nt=[ct(.5)];else if(ge>1){var tt=P[0],Zt=P[1]-tt;nt=Um(0,ge,!1).map(function(_t){return ct(tt+_t/(ge-1)*Zt)})}else{i=[];var Tt=[];if(z&&z.length>2)for(var ft=1,gt=z.length,yt=1<=gt;yt?ft<gt:ft>gt;yt?ft++:ft--)Tt.push((z[ft-1]+z[ft])*.5);else Tt=P;nt=Tt.map(function(_t){return ct(_t)})}return En[Je]&&(nt=nt.map(function(_t){return _t[Je]()})),nt},ct.cache=function(ge){return ge!=null?(De=ge,ct):De},ct.gamma=function(ge){return ge!=null?(et=ge,ct):et},ct.nodata=function(ge){return ge!=null?(v=En(ge),ct):v},ct};function Um(i,u,v){for(var x=[],P=i<u,D=v?P?u+1:u-1:u,E=i;P?E<D:E>D;P?E++:E--)x.push(E);return x}var Vo=w,Hm=gi,jm=function(i){for(var u=[1,1],v=1;v<i;v++){for(var x=[1],P=1;P<=u.length;P++)x[P]=(u[P]||0)+u[P-1];u=x}return u},zm=function(i){var u,v,x,P,D,E,z;if(i=i.map(function(ve){return new Vo(ve)}),i.length===2)u=i.map(function(ve){return ve.lab()}),D=u[0],E=u[1],P=function(ve){var Be=[0,1,2].map(function(De){return D[De]+ve*(E[De]-D[De])});return new Vo(Be,"lab")};else if(i.length===3)v=i.map(function(ve){return ve.lab()}),D=v[0],E=v[1],z=v[2],P=function(ve){var Be=[0,1,2].map(function(De){return(1-ve)*(1-ve)*D[De]+2*(1-ve)*ve*E[De]+ve*ve*z[De]});return new Vo(Be,"lab")};else if(i.length===4){var G;x=i.map(function(ve){return ve.lab()}),D=x[0],E=x[1],z=x[2],G=x[3],P=function(ve){var Be=[0,1,2].map(function(De){return(1-ve)*(1-ve)*(1-ve)*D[De]+3*(1-ve)*(1-ve)*ve*E[De]+3*(1-ve)*ve*ve*z[De]+ve*ve*ve*G[De]});return new Vo(Be,"lab")}}else if(i.length>=5){var ne,fe,Me;ne=i.map(function(ve){return ve.lab()}),Me=i.length-1,fe=jm(Me),P=function(ve){var Be=1-ve,De=[0,1,2].map(function(et){return ne.reduce(function(ot,dt,vt){return ot+fe[vt]*Math.pow(Be,Me-vt)*Math.pow(ve,vt)*dt[et]},0)});return new Vo(De,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return P},Km=function(i){var u=zm(i);return u.scale=function(){return Hm(u)},u},yi=j,$n=function(i,u,v){if(!$n[v])throw new Error("unknown blend mode "+v);return $n[v](i,u)},oa=function(i){return function(u,v){var x=yi(v).rgb(),P=yi(u).rgb();return yi.rgb(i(x,P))}},ra=function(i){return function(u,v){var x=[];return x[0]=i(u[0],v[0]),x[1]=i(u[1],v[1]),x[2]=i(u[2],v[2]),x}},Wm=function(i){return i},Gm=function(i,u){return i*u/255},Ym=function(i,u){return i>u?u:i},Jm=function(i,u){return i>u?i:u},Qm=function(i,u){return 255*(1-(1-i/255)*(1-u/255))},qm=function(i,u){return u<128?2*i*u/255:255*(1-2*(1-i/255)*(1-u/255))},Xm=function(i,u){return 255*(1-(1-u/255)/(i/255))},Zm=function(i,u){return i===255?255:(i=255*(u/255)/(1-i/255),i>255?255:i)};$n.normal=oa(ra(Wm)),$n.multiply=oa(ra(Gm)),$n.screen=oa(ra(Qm)),$n.overlay=oa(ra(qm)),$n.darken=oa(ra(Ym)),$n.lighten=oa(ra(Jm)),$n.dodge=oa(ra(Zm)),$n.burn=oa(ra(Xm));for(var eg=$n,_i=y.type,tg=y.clip_rgb,ng=y.TWOPI,ag=Math.pow,og=Math.sin,rg=Math.cos,jc=j,sg=function(i,u,v,x,P){i===void 0&&(i=300),u===void 0&&(u=-1.5),v===void 0&&(v=1),x===void 0&&(x=1),P===void 0&&(P=[0,1]);var D=0,E;_i(P)==="array"?E=P[1]-P[0]:(E=0,P=[P,P]);var z=function(G){var ne=ng*((i+120)/360+u*G),fe=ag(P[0]+E*G,x),Me=D!==0?v[0]+G*D:v,ve=Me*fe*(1-fe)/2,Be=rg(ne),De=og(ne),et=fe+ve*(-.14861*Be+1.78277*De),ot=fe+ve*(-.29227*Be-.90649*De),dt=fe+ve*(1.97294*Be);return jc(tg([et*255,ot*255,dt*255,1]))};return z.start=function(G){return G==null?i:(i=G,z)},z.rotations=function(G){return G==null?u:(u=G,z)},z.gamma=function(G){return G==null?x:(x=G,z)},z.hue=function(G){return G==null?v:(v=G,_i(v)==="array"?(D=v[1]-v[0],D===0&&(v=v[1])):D=0,z)},z.lightness=function(G){return G==null?P:(_i(G)==="array"?(P=G,E=G[1]-G[0]):(P=[G,G],E=0),z)},z.scale=function(){return jc.scale(z)},z.hue(v),z},ig=w,lg="0123456789abcdef",cg=Math.floor,ug=Math.random,dg=function(){for(var i="#",u=0;u<6;u++)i+=lg.charAt(cg(ug()*16));return new ig(i,"hex")},bi=d,zc=Math.log,fg=Math.pow,pg=Math.floor,hg=Math.abs,Kc=function(i,u){u===void 0&&(u=null);var v={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return bi(i)==="object"&&(i=Object.values(i)),i.forEach(function(x){u&&bi(x)==="object"&&(x=x[u]),x!=null&&!isNaN(x)&&(v.values.push(x),v.sum+=x,x<v.min&&(v.min=x),x>v.max&&(v.max=x),v.count+=1)}),v.domain=[v.min,v.max],v.limits=function(x,P){return Wc(v,x,P)},v},Wc=function(i,u,v){u===void 0&&(u="equal"),v===void 0&&(v=7),bi(i)=="array"&&(i=Kc(i));var x=i.min,P=i.max,D=i.values.sort(function(Ci,wi){return Ci-wi});if(v===1)return[x,P];var E=[];if(u.substr(0,1)==="c"&&(E.push(x),E.push(P)),u.substr(0,1)==="e"){E.push(x);for(var z=1;z<v;z++)E.push(x+z/v*(P-x));E.push(P)}else if(u.substr(0,1)==="l"){if(x<=0)throw new Error("Logarithmic scales are only possible for values > 0");var G=Math.LOG10E*zc(x),ne=Math.LOG10E*zc(P);E.push(x);for(var fe=1;fe<v;fe++)E.push(fg(10,G+fe/v*(ne-G)));E.push(P)}else if(u.substr(0,1)==="q"){E.push(x);for(var Me=1;Me<v;Me++){var ve=(D.length-1)*Me/v,Be=pg(ve);if(Be===ve)E.push(D[Be]);else{var De=ve-Be;E.push(D[Be]*(1-De)+D[Be+1]*De)}}E.push(P)}else if(u.substr(0,1)==="k"){var et,ot=D.length,dt=new Array(ot),vt=new Array(v),Xt=!0,Jt=0,fn=null;fn=[],fn.push(x);for(var ct=1;ct<v;ct++)fn.push(x+ct/v*(P-x));for(fn.push(P);Xt;){for(var ge=0;ge<v;ge++)vt[ge]=0;for(var Je=0;Je<ot;Je++)for(var nt=D[Je],tt=Number.MAX_VALUE,Zt=void 0,Tt=0;Tt<v;Tt++){var ft=hg(fn[Tt]-nt);ft<tt&&(tt=ft,Zt=Tt),vt[Zt]++,dt[Je]=Zt}for(var gt=new Array(v),yt=0;yt<v;yt++)gt[yt]=null;for(var _t=0;_t<ot;_t++)et=dt[_t],gt[et]===null?gt[et]=D[_t]:gt[et]+=D[_t];for(var Mn=0;Mn<v;Mn++)gt[Mn]*=1/vt[Mn];Xt=!1;for(var sa=0;sa<v;sa++)if(gt[sa]!==fn[sa]){Xt=!0;break}fn=gt,Jt++,Jt>200&&(Xt=!1)}for(var ia={},lo=0;lo<v;lo++)ia[lo]=[];for(var co=0;co<ot;co++)et=dt[co],ia[et].push(D[co]);for(var Jn=[],$a=0;$a<v;$a++)Jn.push(ia[$a][0]),Jn.push(ia[$a][ia[$a].length-1]);Jn=Jn.sort(function(Ci,wi){return Ci-wi}),E.push(Jn[0]);for(var Uo=1;Uo<Jn.length;Uo+=2){var Ma=Jn[Uo];!isNaN(Ma)&&E.indexOf(Ma)===-1&&E.push(Ma)}}return E},Gc={analyze:Kc,limits:Wc},Yc=w,vg=function(i,u){i=new Yc(i),u=new Yc(u);var v=i.luminance(),x=u.luminance();return v>x?(v+.05)/(x+.05):(x+.05)/(v+.05)},Jc=w,Yn=Math.sqrt,Rt=Math.pow,mg=Math.min,gg=Math.max,Qc=Math.atan2,qc=Math.abs,Fr=Math.cos,Xc=Math.sin,yg=Math.exp,Zc=Math.PI,_g=function(i,u,v,x,P){v===void 0&&(v=1),x===void 0&&(x=1),P===void 0&&(P=1);var D=function(Ma){return 360*Ma/(2*Zc)},E=function(Ma){return 2*Zc*Ma/360};i=new Jc(i),u=new Jc(u);var z=Array.from(i.lab()),G=z[0],ne=z[1],fe=z[2],Me=Array.from(u.lab()),ve=Me[0],Be=Me[1],De=Me[2],et=(G+ve)/2,ot=Yn(Rt(ne,2)+Rt(fe,2)),dt=Yn(Rt(Be,2)+Rt(De,2)),vt=(ot+dt)/2,Xt=.5*(1-Yn(Rt(vt,7)/(Rt(vt,7)+Rt(25,7)))),Jt=ne*(1+Xt),fn=Be*(1+Xt),ct=Yn(Rt(Jt,2)+Rt(fe,2)),ge=Yn(Rt(fn,2)+Rt(De,2)),Je=(ct+ge)/2,nt=D(Qc(fe,Jt)),tt=D(Qc(De,fn)),Zt=nt>=0?nt:nt+360,Tt=tt>=0?tt:tt+360,ft=qc(Zt-Tt)>180?(Zt+Tt+360)/2:(Zt+Tt)/2,gt=1-.17*Fr(E(ft-30))+.24*Fr(E(2*ft))+.32*Fr(E(3*ft+6))-.2*Fr(E(4*ft-63)),yt=Tt-Zt;yt=qc(yt)<=180?yt:Tt<=Zt?yt+360:yt-360,yt=2*Yn(ct*ge)*Xc(E(yt)/2);var _t=ve-G,Mn=ge-ct,sa=1+.015*Rt(et-50,2)/Yn(20+Rt(et-50,2)),ia=1+.045*Je,lo=1+.015*Je*gt,co=30*yg(-Rt((ft-275)/25,2)),Jn=2*Yn(Rt(Je,7)/(Rt(Je,7)+Rt(25,7))),$a=-Jn*Xc(2*E(co)),Uo=Yn(Rt(_t/(v*sa),2)+Rt(Mn/(x*ia),2)+Rt(yt/(P*lo),2)+$a*(Mn/(x*ia))*(yt/(P*lo)));return gg(0,mg(100,Uo))},eu=w,bg=function(i,u,v){v===void 0&&(v="lab"),i=new eu(i),u=new eu(u);var x=i.get(v),P=u.get(v),D=0;for(var E in x){var z=(x[E]||0)-(P[E]||0);D+=z*z}return Math.sqrt(D)},Ag=w,Cg=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];try{return new(Function.prototype.bind.apply(Ag,[null].concat(i))),!0}catch{return!1}},tu=j,nu=gi,wg={cool:function(){return nu([tu.hsl(180,1,.9),tu.hsl(250,.7,.4)])},hot:function(){return nu(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Vr={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Ai=0,au=Object.keys(Vr);Ai<au.length;Ai+=1){var ou=au[Ai];Vr[ou.toLowerCase()]=Vr[ou]}var Ig=Vr,Yt=j;Yt.average=Bm,Yt.bezier=Km,Yt.blend=eg,Yt.cubehelix=sg,Yt.mix=Yt.interpolate=Pc,Yt.random=dg,Yt.scale=gi,Yt.analyze=Gc.analyze,Yt.contrast=vg,Yt.deltaE=_g,Yt.distance=bg,Yt.limits=Gc.limits,Yt.valid=Cg,Yt.scales=wg,Yt.colors=mc,Yt.brewer=Ig;var xg=Yt;return xg})})(Mp);var z1=Mp.exports;const Np=j1(z1),K1=e=>(zt("data-v-efdd9e64"),e=e(),Kt(),e),W1=["onClick"],G1={key:1,class:"tag empty"},Y1=K1(()=>U("span",null,"Empty Tags",-1)),J1=[Y1],Q1=`
def handle_tag_click(state, payload):
	state["selected_tag_id"] = payload`,q1="A component to display coloured tag pills.",X1={writer:{name:"Tags",description:q1,category:"Content",fields:{tags:{name:"Tags",desc:"Key-value object with tags. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:"{}"},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:L.Color,default:ht.Blue5,category:Pe.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:L.Number,default:"1",category:Pe.Style},rotateHue:{name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",type:L.Text,options:{yes:"yes",no:"no"},default:"yes",category:Pe.Style},primaryTextColor:Mt,cssClasses:Ye},events:{"wf-tag-click":{desc:"Triggered when a tag is clicked.",stub:Q1.trim()}},previewField:"text"}},Z1=Ie({...X1,__name:"CoreTags",setup(e){Za(f=>({"1c12d0f0":l.value?"pointer":"auto"}));const t=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}],n=q(null),a=W(Y.evaluatedFields),o=W(Y.componentId),r=W(Y.core),s=W(Y.isBeingEdited),l=J(()=>{var m;return typeof((m=r.getComponentById(o).handlers)==null?void 0:m["wf-tag-click"])<"u"});function c(f){if(a.rotateHue.value=="no")return a.referenceColor.value;const m=Np(a.referenceColor.value),k=t[d(f)];return m.set("hsl.h",`${Math.sign(k.h)==-1?"-":"+"}${Math.abs(k.h)}`).set("hsl.s",`${Math.sign(k.s)==-1?"-":"+"}${Math.abs(k.s/100)}`).set("hsl.l",`${Math.sign(k.l)==-1?"-":"+"}${Math.abs(k.l/100)}`).css()}function d(f){let m=a.seed.value*52673&4294967295;for(let S=0;S<f.length;S++)m=(S+1)*f.charCodeAt(S)^m&4294967295;return Math.abs(m)%t.length}function h(f){const m=new CustomEvent("wf-tag-click",{detail:{payload:f}});n.value.dispatchEvent(m)}return(f,m)=>T(s)||Object.entries(T(a).tags.value??[]).length>0?(C(),N("div",{key:0,ref_key:"rootEl",ref:n,class:"CoreTags"},[Object.entries(T(a).tags.value??[]).length>0?(C(!0),N(Oe,{key:0},mt(T(a).tags.value,(k,S)=>(C(),N("div",{key:S,class:"tag",style:it({background:c(S)}),onClick:()=>h(S)},[U("span",null,be(k),1)],12,W1))),128)):(C(),N("div",G1,J1))],512)):Ae("",!0)}}),eC=ke(Z1,[["__scopeId","data-v-efdd9e64"]]),tC={key:0,class:"material-symbols-outlined"},nC={class:"info"},aC={key:1,class:"caption"},oC={class:"container","data-writer-container":""},rC=`
def handle_avatar_click():
	print("The avatar was clicked")`,sC="A component to display user avatars.",iC={writer:{name:"Avatar",description:sC,category:"Content",allowedChildrenTypes:["*"],fields:{name:{name:"Name",type:L.Text},imageSrc:{name:"Image source",desc:"A valid URL. Alternatively, you can provide a state reference to a packed file.",type:L.Text},caption:{name:"Caption",desc:"Add an optional caption under the name, such as the person's job title.",type:L.Text},size:{name:"Size",type:L.Text,options:{small:"Small",medium:"Medium",large:"Large"},default:"medium",category:Pe.Style},orientation:{name:"Orientation",type:L.Text,options:{horizontal:"Horizontal",vertical:"Vertical"},default:"horizontal",category:Pe.Style},primaryTextColor:Mt,secondaryTextColor:yn,separatorColor:Vt,cssClasses:Ye},events:{"wf-click":{desc:"Triggered when the avatar is clicked.",stub:rC.trim()}},previewField:"text"}},lC=Ie({...iC,__name:"CoreAvatar",setup(e){Za(l=>({"3d808742":T(n).imageSrc.value?`url("${T(n).imageSrc.value}")`:"none","162f2d92":r.value?"pointer":"auto"}));const t=q(null),n=W(Y.evaluatedFields),a=W(Y.componentId),o=W(Y.core),r=J(()=>{var c;return typeof((c=o.getComponentById(a).handlers)==null?void 0:c["wf-click"])<"u"});function s(l){const c=br(l);t.value.dispatchEvent(c)}return(l,c)=>(C(),N("div",{ref_key:"rootEl",ref:t,class:st(["CoreAvatar",[T(n).size.value,T(n).orientation.value]])},[U("div",{class:"image",onClick:s},[T(n).imageSrc.value?Ae("",!0):(C(),N("i",tC," account_circle "))]),U("div",nC,[T(n).name.value?(C(),N("div",{key:0,class:"name",onClick:s},be(T(n).name.value),1)):Ae("",!0),T(n).caption.value?(C(),N("div",aC,be(T(n).caption.value),1)):Ae("",!0),U("div",oC,[$t(l.$slots,"default",{},void 0,!0)])])],2))}}),cC=ke(lC,[["__scopeId","data-v-8100970f"]]),uC={class:"SharedControlBar"},dC=Ie({__name:"SharedControlBar",props:{copyRawContent:{},copyStructuredContent:{}},setup(e){const t=e;function n({text:a=""}){try{navigator.clipboard.writeText(a)}catch(o){console.error(o)}}return(a,o)=>(C(),N("div",uC,[t.copyStructuredContent?(C(),N("button",{key:0,class:"control-button",onClick:o[0]||(o[0]=r=>n({text:t.copyStructuredContent}))}," Copy JSON ")):Ae("",!0),t.copyRawContent?(C(),N("button",{key:1,class:"control-button",onClick:o[1]||(o[1]=r=>n({text:t.copyRawContent}))}," Copy ")):Ae("",!0)]))}}),Op=ke(dC,[["__scopeId","data-v-fea66300"]]),fC={key:0,class:"CoreAnnotatedText"},pC={key:0,class:"annotation-subject"},hC={writer:{name:"Annotated text",description:"Shows text with annotations",category:"Content",fields:{text:{name:"Annotated text",type:L.Object,desc:"Value array with text/annotations. Must be a JSON string or a state reference to an array.",init:`["This ",["is", "Verb"]," some ",["annotated", "Adjective"],    ["text", "Noun"]," for those of ",["you", "Pronoun"]," who ",["like", "Verb"]," this sort of ",["thing", "Noun"],". ","And here's a ",["word", "", "#faf"]," with a fancy background but no label."]`},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:L.Color,default:ht.Blue5,category:Pe.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:L.Number,default:"1",category:Pe.Style},rotateHue:{name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",type:L.Text,options:{yes:"yes",no:"no"},default:"yes",category:Pe.Style},copyButtons:{name:"Copy buttons",desc:"If active, adds a control bar with both copy text and JSON buttons.",type:L.Text,options:{yes:"yes",no:"no"},default:"no",category:Pe.Style},buttonColor:Kn,buttonTextColor:Wn,primaryTextColor:Mt,cssClasses:Ye},previewField:"data"}},vC=Ie({...hC,__name:"CoreAnnotatedText",setup(e){const t=W(Y.evaluatedFields),n=J(()=>t.text.value?t.text.value:[]),a=W(Y.isBeingEdited),o=W(Y.componentId),r=J(()=>!t.text.value),s=J(()=>!r.value||a.value),l=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}];let c=[...l],d={},h=t.seed.value;function f(b,O){return b.set("hsl.h",`${Math.sign(O.h)==-1?"-":"+"}${Math.abs(O.h)}`).set("hsl.s",`${Math.sign(O.s)==-1?"-":"+"}${Math.abs(O.s/100)}`).set("hsl.l",`${Math.sign(O.l)==-1?"-":"+"}${Math.abs(O.l/100)}`).css()}function m(b,O=l.length){let I=t.seed.value*52673&4294967295;for(let p=0;p<b.length;p++)I=(p+1)*b.charCodeAt(p)^I&4294967295;return Math.abs(I)%O}function k(b){if(t.rotateHue.value=="no")return t.referenceColor.value;const O=Np(t.referenceColor.value);if(h!==t.seed.value&&(c=[...l],d={},h=t.seed.value),d[b])return f(O,d[b]);c.length===0&&(c=[...l]);const I=m(b,c.length),g=c[I];return d[b]=g,c.splice(I,1),f(O,g)}function S(b){return b.reduce((O,I)=>typeof I=="string"?O+I:O+I[0],"")}function y(b){try{return JSON.stringify(b)}catch{return b.join("")}}return(b,O)=>s.value?(C(),N("div",fC,[r.value?(C(),Fe(zl,{key:0,"component-id":T(o)},null,8,["component-id"])):Ae("",!0),(C(!0),N(Oe,null,mt(n.value,(I,g)=>(C(),N("span",{key:String(I)+g},[typeof I=="string"?(C(),N(Oe,{key:0},[At(be(I),1)],64)):Ae("",!0),Array.isArray(I)?(C(),N("span",{key:1,class:"annotation",style:it({background:I[2]||k(I[1])})},[At(be(I[0])+" ",1),I[1]?(C(),N("span",pC,be(I[1]),1)):Ae("",!0)],4)):Ae("",!0)]))),128)),T(t).copyButtons.value==="yes"?(C(),Fe(Op,{key:1,"copy-raw-content":S(n.value),"copy-structured-content":y(n.value)},null,8,["copy-raw-content","copy-structured-content"])):Ae("",!0)])):Ae("",!0)}}),mC=ke(vC,[["__scopeId","data-v-7ad02191"]]);function zs(e){return!!(["string","number","boolean"].includes(typeof e)||e===null)}function Kl(e){return zs(e)?!1:Array.isArray(e)}function Pp(e){return!Kl(e)&&typeof e=="object"&&e!==null}function Lp(e){return zs(e)?1:Object.keys(e).length}function Rp(e){return typeof e.open=="boolean"&&Array.isArray(e.path)}const gC=["open","disabled"],yC={class:"content"},_C=Ie({__name:"SharedCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1}},emits:{toggle:e=>typeof e=="boolean"},setup(e,{emit:t}){const n=t;function a(o){n("toggle",o.newState==="open")}return(o,r)=>(C(),N("details",{class:"SharedCollapsible",open:e.open,disabled:e.disabled,onToggle:a},[U("summary",null,[$t(o.$slots,"title",{},void 0,!0)]),U("div",yC,[$t(o.$slots,"content",{},void 0,!0)])],40,gC))}}),bC=ke(_C,[["__scopeId","data-v-851ee327"]]),AC=Ie({__name:"SharedJsonViewerChildrenCounter",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=r=>`Object{${r}}`,a=r=>`Array[${r}]`,o=J(()=>{const r=Lp(t.data);return r===0?n(0):Kl(t.data)?a(r):Pp(t.data)?n(r):n(0)});return(r,s)=>(C(),N("span",null,be(o.value),1))}}),Dp=ke(AC,[["__scopeId","data-v-2641ae29"]]),CC={class:"SharedJsonViewerCollapsible__title"},wC={key:0},IC={class:"SharedJsonViewerCollapsible__content"},xC=Ie({__name:"SharedJsonViewerCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},title:{type:String,required:!1,default:void 0},data:{type:[String,Number,Boolean,Object,Array,null],required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e){return(t,n)=>(C(),Fe(bC,{open:e.open,disabled:e.disabled,onToggle:n[0]||(n[0]=a=>t.$emit("toggle",a))},{title:Ge(()=>[U("div",CC,[e.title?(C(),N("span",wC,be(e.title),1)):Ae("",!0),e.data?(C(),Fe(Dp,{key:1,data:e.data},null,8,["data"])):Ae("",!0)])]),content:Ge(()=>[U("div",IC,[$t(t.$slots,"default",{},void 0,!0)])]),_:3},8,["open","disabled"]))}}),Bp=ke(xC,[["__scopeId","data-v-7392db61"]]),kC={class:"SharedJsonViewerValue"},SC=Ie({__name:"SharedJsonViewerValue",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=J(()=>JSON.stringify(t.data));return(a,o)=>(C(),N("span",kC,be(n.value),1))}}),Fp=ke(SC,[["__scopeId","data-v-496a5553"]]),TC={class:"SharedJsonViewerObject"},EC={key:0,class:"SharedJsonViewerObject__value"},$C=Ie({__name:"SharedJsonViewerObject",props:{data:{type:[Object,Array],required:!0},path:{type:Array,default:()=>[]},initialDepth:{type:Number,default:0}},emits:{toggle:Rp},setup(e,{emit:t}){const n=e,a=Co(n,"initialDepth"),o=t,r=q([]),s=J(()=>n.path.length+1);He(a,()=>{if(a.value===0){r.value=[];return}if(!(a.value===-1||a.value>s.value))return;const h=new Set([...r.value,...Object.keys(n.data)]);r.value=Array.from(h)},{immediate:!0});function l(d,h){h?r.value=[...r.value,d]:r.value=r.value.filter(f=>f!==d),o("toggle",{open:h,path:[...n.path,d]})}function c(d){return r.value.includes(String(d))}return(d,h)=>(C(),N("div",TC,[(C(!0),N(Oe,null,mt(Object.entries(e.data),([f,m],k)=>(C(),N(Oe,{key:k},[T(zs)(m)||T(Lp)(m)===0?(C(),N("div",EC,[U("span",null,be(f),1),At(": "),je(Fp,{data:m},null,8,["data"])])):(C(),Fe(Bp,{key:1,open:c(f),title:f,data:m,onToggle:S=>l(f,S)},{default:Ge(()=>[c(f)?(C(),Fe(Vp,{key:0,data:m,path:[...e.path,f],"initial-depth":a.value,onToggle:h[0]||(h[0]=S=>d.$emit("toggle",S))},null,8,["data","path","initial-depth"])):Ae("",!0)]),_:2},1032,["open","title","data","onToggle"]))],64))),128))]))}}),ud=ke($C,[["__scopeId","data-v-5480a807"]]),Vp=Ie({__name:"SharedJsonViewer",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0},path:{type:Array,default:()=>[]},hideRoot:{type:Boolean,required:!1},initialDepth:{type:Number,default:0},enableCopyToJson:{type:Boolean,required:!1}},emits:{toggle:Rp},setup(e){const t=e,n=J(()=>t.path.length===0&&!t.hideRoot),a=J(()=>t.initialDepth===-1||t.initialDepth>0),o=J(()=>t.data===void 0?JSON.stringify(null):JSON.stringify(t.data));return(r,s)=>(C(),N(Oe,null,[T(Pp)(e.data)||T(Kl)(e.data)?(C(),N(Oe,{key:0},[n.value?(C(),Fe(Bp,{key:0,open:a.value,data:e.data,onToggle:s[1]||(s[1]=l=>r.$emit("toggle",{path:[],open:l}))},{default:Ge(()=>[je(ud,{data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[0]||(s[0]=l=>r.$emit("toggle",l))},null,8,["data","path","initial-depth"])]),_:1},8,["open","data"])):(C(),Fe(ud,{key:1,data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[2]||(s[2]=l=>r.$emit("toggle",l))},null,8,["data","path","initial-depth"]))],64)):T(zs)(e.data)?(C(),Fe(Fp,{key:1,data:e.data},null,8,["data"])):(C(),Fe(Dp,{key:2,data:{}})),e.enableCopyToJson?(C(),Fe(Op,{key:3,"copy-structured-content":o.value},null,8,["copy-structured-content"])):Ae("",!0)],64))}}),MC={class:"CoreJsonViewer"},NC="A component to explore JSON data as a hierarchy.",OC={name:"JSON Viewer",description:"A JSON tree viewer where you can expand the keys.",sample:{description:"This sample is opened by default",bool:!0,null:null,list:[1,"two",{key:3}]},sampleClosed:{description:"This sample is not opened by default"},createdAt:new Date},PC={name:"JSON Viewer",description:NC,category:"Content",fields:{data:{name:"Data",init:JSON.stringify(OC),type:L.Object},initialDepth:{name:"Initial depth",desc:"Sets the initial viewing depth of the JSON tree hierarchy. Use -1 to display the full hierarchy.",type:L.Number,init:"0"},hideRoot:{name:"Hide root",desc:"Don't show the type of the root node when it's an Object or an Array.",type:L.Text,options:{yes:"yes",no:"no"},default:"no",category:Pe.Style},copy:{name:"Copy",desc:"If active, adds a control bar with copy JSON button.",type:L.Text,options:{yes:"yes",no:"no"},default:"no",category:Pe.Style},jsonViewerIndentationSpacing:{name:"JSON indentation",type:L.Width,category:Pe.Style,applyStyleVariable:!0},accentColor:Wt,secondaryTextColor:yn,separatorColor:Vt,cssClasses:Ye},previewField:"data"},LC={writer:PC},RC=Ie({...LC,__name:"CoreJsonViewer",setup(e){const t=W(Y.evaluatedFields),n=J(()=>t.data.value),a=J(()=>Number(t.initialDepth.value)||0);return(o,r)=>(C(),N("div",MC,[je(Vp,{data:n.value??{},"initial-depth":a.value,"enable-copy-to-json":T(t).copy.value==="yes","hide-root":T(t).hideRoot.value==="yes"},null,8,["data","initial-depth","enable-copy-to-json","hide-root"])]))}});function DC(e,t){return J(()=>e[t].value==="yes")}function BC(e,t={minimumFractionDigits:0,maximumFractionDigits:1}){const n=new Intl.NumberFormat(void 0,{style:"percent",...t});return J(()=>n.format(e.value))}const FC=["aria-valuetext","aria-valuemin","aria-valuemax","aria-valuenow","tabindex"],VC={key:0,class:"CoreProgressBar__title"},UC={key:0,class:"CoreProgressBar__title__label"},HC={key:1,class:"CoreProgressBar__title__progress"},jC={class:"CoreProgressBar__bar"},zC=`
def handle_progress_bar_click():
	print("The progress bar was clicked")`,KC="A component to display a progression.",WC={name:"Progress Bar",description:KC,category:"Content",allowedChildrenTypes:["*"],fields:{label:{name:"Label",type:L.Text,default:""},value:{name:"Value",type:L.Number,default:"0.25"},min:{name:"Minimum value",type:L.Number,default:"0"},max:{name:"Maximum value",type:L.Number,default:"1"},displayPercentage:{name:"Display percentage",default:"no",type:L.Text,category:Pe.Style,options:{yes:"Yes",no:"No"}},accentColor:Wt,primaryTextColor:Mt,separatorColor:Vt,cssClasses:Ye},events:{"wf-click":{desc:"Triggered when the progress bar is clicked.",stub:zC.trim()}}},GC={writer:WC},YC=Ie({...GC,__name:"CoreProgressBar",setup(e){const t=q(),n=W(Y.evaluatedFields),a=W(Y.componentId),o=W(Y.core),r=J(()=>{var y;return String((y=n.label)==null?void 0:y.value)}),s=J(()=>Number(n.value.value)),l=J(()=>Number(n.min.value)),c=J(()=>Number(n.max.value)),d=DC(n,"displayPercentage"),h=J(()=>(s.value-l.value)/(c.value-l.value)),f=BC(h),m=J(()=>({width:`${h.value*100}%`})),k=J(()=>{var b;return typeof((b=o.getComponentById(a).handlers)==null?void 0:b["wf-click"])<"u"});function S(y){if(!k.value)return;const b=br(y);t.value.dispatchEvent(b)}return(y,b)=>(C(),N("div",{ref_key:"rootEl",ref:t,class:st(["CoreProgressBar",{"CoreProgressBar--clickable":k.value}]),role:"progressbar","aria-valuetext":T(f),"aria-valuemin":l.value,"aria-valuemax":c.value,"aria-valuenow":s.value,tabindex:k.value?"0":null,onKeydown:Ca(S,["enter"]),onClick:S},[r.value||T(d)?(C(),N("div",VC,[r.value?(C(),N("label",UC,be(r.value),1)):Ae("",!0),T(d)?(C(),N("span",HC,be(T(f)),1)):Ae("",!0)])):Ae("",!0),U("div",jC,[U("div",{class:"CoreProgressBar__bar__value",style:it(m.value)},null,4)])],42,FC))}}),JC=ke(YC,[["__scopeId","data-v-c7222fed"]]);function Ks(e){const t=/[\\]?@{([^}]*)}/g;function n(d,h){var y;let f=[],m="",k=0,S=0;for(;S<d.length;){const b=d.charAt(S);b=="\\"?S+1<d.length&&(m+=d.charAt(S+1),S++):b=="."?k==0?(f.push(m),m=""):m+=b:b=="["?(k==0?(f.push(m),m=""):m+=b,k++):b=="]"?(k--,k==0?m=(y=a(m,h))==null?void 0:y.toString():m+=b):m+=b,S++}return m&&f.push(m),f}function a(d,h){let m=h?o(h):void 0,k=e.userState.value;const S=n(d,h);for(let y=0;y<S.length;y++)m=m==null?void 0:m[S[y]],k=k==null?void 0:k[S[y]];return m??k}function o(d){var f,m;const h={};for(let k=0;k<d.length-1;k++){const S=d[k],{componentId:y}=S,{type:b}=e.getComponentById(y);if(b!=="repeater"||k+1>=d.length)continue;const O=d.slice(0,k+1),I=d.slice(0,k+2),{instanceNumber:g}=I.at(-1),p=l(O,"repeaterObject");if(!p)continue;const A=Object.entries(p),w=l(O,"keyVariable"),V=l(O,"valueVariable");h[w]=(f=A[g])==null?void 0:f[0],h[V]=(m=A[g])==null?void 0:m[1]}return h}function r(d,h){return d==null?"":d.replace(t,(m,k)=>{if(m.charAt(0)=="\\")return m.substring(1);const S=k.trim();if(!S)return"";const y=a(S,h);return typeof y>"u"?"":typeof y=="object"?JSON.stringify(y):y.toString()})}function s(d){const{componentId:h}=d.at(-1),f=e.getComponentById(h);if(!f)return;const m={},{fields:k}=e.getComponentDefinition(f.type);if(k)return Object.keys(k).forEach(S=>{m[S]=J(()=>l(d,S))}),m}function l(d,h){var g;const{componentId:f}=d.at(-1),m=e.getComponentById(f);if(!m)return;const{fields:k}=e.getComponentDefinition(m.type),S=(g=m.content)==null?void 0:g[h],y=k[h].default,b=r(S,d),O=k[h].type,I=typeof b>"u"||b===null||b==="";if(O==L.Object||O==L.KeyValue||O==L.Tools){if(!b)return JSON.parse(y??null);if(typeof b!="string")return b;let p;try{p=JSON.parse(b)}catch{return JSON.parse(y??null)}return p}else if(O==L.Number){const p=y===null?null:parseFloat(y);if(I)return p??null;const A=parseFloat(b);return typeof A>"u"||Number.isNaN(A)?p??null:A}else return O==L.IdKey?S:I?y??"":b}function c(d,h){const f=e.getComponentById(d);if(!f)return;if(typeof f.visible>"u"||f.visible.expression===!0)return!0;if(f.visible.expression===!1)return!1;const m=a(f.visible.binding,h);return f.visible.reversed===!0?!m:!!m}return{getEvaluatedFields:s,isComponentVisible:c,evaluateExpression:a}}function qt(e,t,n,a=""){const o=q(),r=q(!1),s=q(null),l=t.at(-1).componentId,c=J(()=>e.getComponentById(l)),{evaluateExpression:d}=Ks(e);function h(){var k;const m=e.getComponentById(l);if((k=m==null?void 0:m.binding)!=null&&k.stateRef)return d(m.binding.stateRef,t)}function f(m,k,S){var g,p;o.value=m;const y=(g=c.value.handlers)==null?void 0:g[k],b=((p=c.value.binding)==null?void 0:p.eventType)==k;if(!y&&!b)return;if(r.value){s.value={eventValue:m,emitEventType:k};return}r.value=!0;const O=()=>{r.value=!1,s.value&&(f(s.value.eventValue,s.value.emitEventType),s.value=null),S==null||S()},I=new CustomEvent(k,{detail:{payload:m,callback:O}});n.value instanceof HTMLElement?n.value.dispatchEvent(I):n.value.$el.dispatchEvent(I)}return He(()=>h(),m=>{r.value||(o.value=m)},{immediate:!0}),He(o,m=>{typeof m>"u"&&(o.value=a)},{immediate:!0}),{formValue:o,handleInput:f}}const QC={key:0},qC=Ie({__name:"BaseInputWrapper",props:{label:{type:String,required:!1,default:void 0},isHorizontal:{type:Boolean,required:!1}},setup(e){return(t,n)=>(C(),N("div",{ref:"rootEl",class:st(["BaseInputWrapper",{horizontal:e.isHorizontal}])},[e.label?(C(),N("label",QC,be(e.label),1)):Ae("",!0),$t(t.$slots,"default",{},void 0,!0)],2))}}),sn=ke(qC,[["__scopeId","data-v-1cbc4730"]]),XC=["checked","value"],ZC=["for"],ew={a:"Option A",b:"Option B"},tw="A user input component that allows users to choose multiple values from a list of options using checkboxes.",nw=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected options.
	# The payload will be a list, as multiple options are allowed.

	state["selected"] = payload`,aw={writer:{name:"Checkbox Input",description:tw,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:JSON.stringify(ew,null,2)},orientation:{name:"Orientation",type:L.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:Pe.Style,desc:"Specify how to lay out the options."},primaryTextColor:Mt,accentColor:Wt,cssClasses:Ye},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:nw.trim(),bindable:!0}}}},ow=Ie({...aw,__name:"CoreCheckboxInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=W(Y.core),o=W(Y.instancePath),r=W(Y.flattenedInstancePath),{formValue:s,handleInput:l}=qt(a,o,n);function c(){return n.value?Array.from(n.value.$el.querySelectorAll('input[type="checkbox"]')).map(f=>f.checked?f.value:void 0).filter(f=>typeof f<"u"):void 0}return(d,h)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:T(t).label.value,class:"CoreCheckboxInput"},{default:Ge(()=>[U("div",{class:st(["options",{horizontal:T(t).orientation.value=="horizontal"}])},[(C(!0),N(Oe,null,mt(T(t).options.value,(f,m)=>(C(),N("div",{key:m,class:"option"},[U("input",{type:"checkbox",checked:Array.isArray(T(s))?T(s).includes(m):!1,value:m,onInput:h[0]||(h[0]=k=>T(l)(c(),"wf-options-change"))},null,40,XC),U("label",{for:`${T(r)}-option-${m}`},be(f),9,ZC)]))),128))],2)]),_:1},8,["label"]))}}),rw=ke(ow,[["__scopeId","data-v-19fdab9a"]]),sw=["value","list"],iw=["id"],lw=Ie({__name:"BaseInputColor",props:{value:{type:String,required:!1,default:void 0},customColors:{type:Array,default:()=>[]}},emits:{"update:value":e=>typeof e=="string",change:e=>typeof e=="string"},setup(e,{emit:t}){const n=e,a=t,o=q(),r=W(Y.flattenedInstancePath),s=J(()=>{var d;return(d=n.customColors)!=null&&d.length?`${r}_datalist`:null});function l(d){a("update:value",d.target.value)}function c(d){a("change",d.target.value)}return(d,h)=>(C(),N(Oe,null,[U("input",{ref_key:"pickerEl",ref:o,type:"color",class:"BaseInputColor",value:e.value,list:s.value,onInput:l,onChange:c},null,40,sw),s.value?(C(),N("datalist",{key:0,id:s.value},[(C(!0),N(Oe,null,mt(e.customColors,f=>(C(),N("option",{key:f},be(f),1))),128))],8,iw)):Ae("",!0)],64))}}),cw=ke(lw,[["__scopeId","data-v-93292f6d"]]),uw="A user input component that allows users to select a color using a color picker interface.",dd=`
def onchange_handler(state, payload):

	# Set the state variable "new_color" to the new value, provided as string.

	state["new_color"] = payload`,dw={name:"Color Input",description:uw,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},colorList:{name:"Color List",desc:"List of predefined colors",type:L.Object,init:JSON.stringify([ht.Blue5,ht.Green5,ht.Orange5,ht.Gray6,ht.Blue4])},cssClasses:Ye},events:{"wf-change":{desc:"Capture changes as they happen.",stub:dd,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:dd}}},fw={writer:dw},pw=Ie({...fw,__name:"CoreColorInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=W(Y.core),o=W(Y.instancePath),r=J(()=>Array.isArray(t.colorList.value)?t.colorList.value:void 0),{formValue:s,handleInput:l}=qt(a,o,n);return(c,d)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:T(t).label.value,class:"CoreColorInput"},{default:Ge(()=>[je(cw,{value:T(s),"custom-colors":r.value,"onUpdate:value":d[0]||(d[0]=h=>T(l)(h,"wf-change")),onChange:d[1]||(d[1]=h=>T(l)(h,"wf-change-finish"))},null,8,["value","custom-colors"])]),_:1},8,["label"]))}}),hw=ke(pw,[["__scopeId","data-v-74335b7f"]]),vw=["value"],mw="A user input component that allows users to select a date using a date picker interface.",gw=`
def onchange_handler(state, payload):

	# Set the state variable "new_date" to the new value, provided as a YYYY-MM-DD string.

	state["new_date"] = payload`,yw={writer:{name:"Date Input",description:mw,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},cssClasses:Ye},events:{"wf-date-change":{desc:"Capture changes to this control.",stub:gw,bindable:!0}}}},_w=Ie({...yw,__name:"CoreDateInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=W(Y.core),o=W(Y.instancePath),{formValue:r,handleInput:s}=qt(a,o,n);return(l,c)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:T(t).label.value,class:"CoreDateInput"},{default:Ge(()=>[U("input",{type:"date",value:T(r),onChange:c[0]||(c[0]=d=>T(s)(d.target.value,"wf-date-change"))},null,40,vw)]),_:1},8,["label"]))}}),bw=ke(_w,[["__scopeId","data-v-55739abe"]]),Aw=Ie({__name:"WdsDropdownInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=wa(e,"modelValue");return(n,a)=>Bt((C(),N("select",{"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),class:"WdsDropdownInput colorTransformer"},[$t(n.$slots,"default",{},void 0,!0)],512)),[[Vl,t.value]])}}),Up=ke(Aw,[["__scopeId","data-v-a262dc28"]]),Cw=["value"],ww="A user input component that allows users to select a single value from a list of options using a dropdown menu.",Iw={a:"Option A",b:"Option B"},xw=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,kw={writer:{name:"Dropdown Input",description:ww,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:JSON.stringify(Iw,null,2)},cssClasses:Ye},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:xw.trim(),bindable:!0}}}},Sw=Ie({...kw,__name:"CoreDropdownInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=W(Y.core),o=W(Y.instancePath),{formValue:r,handleInput:s}=qt(a,o,n);return(l,c)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:T(t).label.value,class:"CoreDropdownInput"},{default:Ge(()=>[je(Up,{modelValue:T(r),"onUpdate:modelValue":c[0]||(c[0]=d=>Qt(r)?r.value=d:null),onInput:c[1]||(c[1]=d=>T(s)(d.target.value,"wf-option-change"))},{default:Ge(()=>[(C(!0),N(Oe,null,mt(T(t).options.value,(d,h)=>(C(),N("option",{key:h,value:h},be(d),9,Cw))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]))}}),Tw=ke(Sw,[["__scopeId","data-v-1dba446c"]]),Ew=Ie({__name:"WdsButton",props:{variant:{type:String,default:"primary"},size:{type:String,default:"big"}},setup(e){const t=e,n=J(()=>["WdsButton",`WdsButton--${t.variant}`,`WdsButton--${t.size}`]);return(a,o)=>(C(),N("button",{class:st(["WdsButton colorTransformer",n.value])},[$t(a.$slots,"default",{},void 0,!0)],2))}}),Hn=ke(Ew,[["__scopeId","data-v-3f9909ef"]]),$w={class:"main"},Mw={key:0,class:"file-input"},Nw=["multiple","accept"],Ow={key:0,class:"file-input__files"},Pw=["onClick"],Lw={key:1},Rw={key:1,class:"status"},Dw={key:1},Bw={key:2},fd=200*1024*1024,Fw="A user input component that allows users to upload files.",Vw=`
def onchange_handler(state, payload):

	# An array of dictionaries is provided in the payload
	# The dictionaries have the properties name, type and data
    # The data property is a file-like object

    uploaded_files = payload
    for i, uploaded_file in enumerate(uploaded_files):
		name = uploaded_file.get("name")
        file_data = uploaded_file.get("data")
        with open(f"{name}-{i}.jpeg", "wb") as file_handle:
            file_handle.write(file_data)`.trim(),Uw={writer:{name:"File Input",description:Fw,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},allowFileTypes:{name:"Allowed file types",type:L.Text,init:[".pdf",".txt",".doc","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].join(", "),desc:"Provides hints for browsers to select the correct file types. You can specify extensions and MIME types separated by comma, or leave empty to accept any file."},allowMultipleFiles:{name:"Allow multiple files",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},cssClasses:Ye},events:{"wf-file-change":{desc:"Capture changes to this control.",stub:Vw,bindable:!0}}}},Hw=Ie({...Uw,__name:"CoreFileInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=q(null),o=q(null),r=W(Y.core),s=W(Y.instancePath),l=q(null),{formValue:c,handleInput:d}=qt(r,s,n),h=J(()=>Array.isArray(c.value)?c.value:[]),f=J(()=>{var g;return((g=t.allowFileTypes)==null?void 0:g.value)??""}),m=J(()=>t.allowMultipleFiles.value=="yes"?!0:void 0),k=async g=>{const p=new FileReader;return p.readAsDataURL(g),new Promise((A,w)=>{p.onload=()=>A(p.result),p.onerror=()=>w(p.error)})},S=async g=>{const p=g.target;if(!p.files||p.files.length==0)return;const A=async()=>{let V=0;o.value=null;const j=Promise.all(Array.from(p.files).map(async ee=>(V+=ee.size,{name:ee.name,type:ee.type,data:await k(ee)})));return V>fd?(o.value=`Files are too big. Total size limit is ${Math.floor(fd/Math.pow(1024,2))}mb.`,[]):j};l.value=Array.from(p.files).map(V=>V.name),c.value=A();const w=()=>{l.value=null};d(A(),"wf-file-change",w)};He(c,g=>{typeof g>"u"&&a.value&&(a.value.value="")});function y(g){const p=document.createElement("a");p.href=String(g.data),p.download=g.name,p.click(),p.remove()}const b=J(()=>m.value?"files":"file"),O=J(()=>`Browse ${b.value}`),I=J(()=>`No ${b.value} selected`);return(g,p)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:l.value?"":T(t).label.value,class:"CoreFileInput"},{default:Ge(()=>[U("div",$w,[l.value?Ae("",!0):(C(),N("div",Mw,[Bt(U("input",{ref_key:"fileEl",ref:a,type:"file",multiple:m.value,accept:f.value,onChange:p[0]||(p[0]=A=>S(A))},null,40,Nw),[[un,!1]]),U("div",null,[je(Hn,{variant:"tertiary",size:"small",onClick:p[1]||(p[1]=A=>a.value.click())},{default:Ge(()=>[At(be(O.value),1)]),_:1})]),h.value?(C(),N("ul",Ow,[(C(!0),N(Oe,null,mt(h.value,(A,w)=>(C(),N("li",{key:w},[U("a",{href:"#",onClick:V=>y(A)},be(A.name),9,Pw)]))),128))])):(C(),N("p",Lw,be(I.value),1))])),o.value||l.value?(C(),N("div",Rw,[l.value?(C(),Fe(Ip,{key:0,class:"loadingSymbol"})):Ae("",!0),l.value?(C(),N("span",Dw,"Processing "+be(l.value.join(", "))+"...",1)):Ae("",!0),o.value?(C(),N("span",Bw,be(o.value),1)):Ae("",!0)])):Ae("",!0)])]),_:1},8,["label"]))}}),jw=ke(Hw,[["__scopeId","data-v-b0144f64"]]),zw=e=>(zt("data-v-087b2aea"),e=e(),Kt(),e),Kw=["id","data-mode","data-list-position","aria-activedescendant"],Ww={class:"placeholder"},Gw={key:0,class:"desc",role:"option"},Yw={key:1,class:"desc",role:"option"},Jw=["onClick"],Qw=zw(()=>U("i",{class:"material-symbols-outlined"}," close ",-1)),qw=[Qw],Xw=["id","data-list-offset","onMousemove","onClick"],Zw={key:0,class:"empty"},pd=200,eI=Ie({__name:"BaseSelect",props:{baseId:{type:String,required:!0},activeValue:{type:[Array,String],required:!0},options:{type:Object,required:!0},maximumCount:{type:Number,required:!0},mode:{type:String,required:!0},placeholder:{type:String,required:!1,default:void 0}},emits:["change"],setup(e,{emit:t}){Za(he=>({"489e9b3c":`${pd}px`}));const n=t,a=e,{baseId:o,options:r,maximumCount:s,mode:l,placeholder:c}=kl(a),d=J(()=>typeof a.activeValue=="string"?[a.activeValue]:a.activeValue),h=q(null),f=q(null),m=q(null),k=q(null),S=q(""),y=q(null),b=q([]),O=q("hidden"),I=J(()=>{if(l.value=="multiple"&&g.value)return{};const he={};return Object.entries(r.value).forEach(([de,Le])=>{l.value=="multiple"&&b.value.includes(de)||String(Le).toLocaleLowerCase().includes(S.value.toLocaleLowerCase())&&(he[de]=Le)}),he}),g=J(()=>!(s.value<=0||b.value.length<s.value));He(d,()=>{b.value=d.value.filter(he=>r.value[he]!==void 0)},{immediate:!0}),He(I,()=>{p()});function p(){if(y.value<=0){y.value=0;return}const he=Object.keys(I.value).length-1;y.value>=he&&(y.value=he)}He(y,()=>{var de;if(y.value===null)return;const he=(de=h.value)==null?void 0:de.querySelector(`[data-list-offset="${y.value}"]`);he&&he.scrollIntoView({block:"nearest",inline:"nearest"})});function A(){const he=Object.keys(r.value),de=b.value.filter(Le=>he.includes(Le));n("change",de)}function w(he){const de=b.value.indexOf(he);de!==-1&&(b.value.splice(de,1),y.value=null),A()}function V(){b.value.pop(),A()}async function j(he=!1){O.value="hidden",S.value="",he&&(await mn(),h.value&&(h.value.tabIndex=0,h.value.focus()))}function ee(he){const de=he.key;if(de=="Escape"){he.preventDefault(),j(!0);return}if(de!=="Tab"&&de!=="Shift"&&O.value=="hidden"){Re();return}if(de=="Enter"){if(y.value===null)return;const Le=Object.keys(I.value);if(!Le||Le.length==0)return;le(Le[y.value]);return}if(de=="ArrowUp"){if(he.preventDefault(),y.value===null){const Le=Object.keys(I.value).length-1;y.value=Le;return}y.value--,p();return}if(de=="ArrowDown"){if(he.preventDefault(),y.value===null){y.value=0;return}y.value++,p();return}}function se(he){l.value=="multiple"&&he.key=="Backspace"&&!S.value&&V()}async function le(he){if(l.value=="single")b.value=[];else if(b.value.includes(he))return;b.value.push(he),A(),S.value="",b.value.length==s.value&&j(!0),await mn(),m.value.scrollTop=m.value.scrollHeight}function ae(he){const de=he.relatedTarget;h.value&&(h.value.contains(de)||j(!1))}function ue(he){const de=he.relatedTarget;h.value&&(h.value.contains(de)||j(!0))}function Ce(he){he.target.dataset.preventList||Re()}async function Re(){var Le;if(O.value!=="hidden")return;const{bottom:he}=h.value.getBoundingClientRect(),de=document.body.clientHeight;pd+he>=de?O.value="top":O.value="bottom",await mn(),h.value.tabIndex=-1,(Le=f.value)==null||Le.focus()}function pe(he){y.value=he}return(he,de)=>(C(),N("div",{id:T(o),ref_key:"rootEl",ref:h,class:"BaseSelect colorTransformer",tabindex:"0","data-mode":T(l),"data-list-position":O.value,role:"listbox","aria-activedescendant":y.value?`${T(o)}-option-${y.value}`:void 0,onKeydown:ee,onClick:Ce,onFocusout:ae},[U("div",{ref_key:"selectedOptionsEl",ref:m,class:"selectedOptions"},[Bt(U("div",Ww,[T(c)?(C(),N(Oe,{key:0},[At(be(T(c)),1)],64)):T(l)=="multiple"&&T(s)>0?(C(),N(Oe,{key:1},[At("Select up to "+be(T(s))+" option"+be(T(s)>1?"s":"")+"...",1)],64)):T(l)=="multiple"?(C(),N(Oe,{key:2},[At("Select options....")],64)):T(l)=="single"?(C(),N(Oe,{key:3},[At("Select an option...")],64)):Ae("",!0)],512),[[un,b.value.length==0]]),(C(!0),N(Oe,null,mt(b.value,Le=>{var kt,qe;return C(),N("div",{key:Le,class:st(["option",{notFound:!((kt=T(r))!=null&&kt[Le])}]),"aria-selected":"true"},[(qe=T(r))!=null&&qe[Le]?(C(),N("div",Gw,be(T(r)[Le]),1)):(C(),N("div",Yw,be(Le),1)),U("div",{class:"remove","data-prevent-list":"true","aria-label":"Remove",onClick:Ct=>w(Le)},qw,8,Jw)],2)}),128)),Bt(U("input",{ref_key:"inputEl",ref:f,"onUpdate:modelValue":de[0]||(de[0]=Le=>S.value=Le),type:"text","aria-autocomplete":"none",tabindex:"-1",onKeydown:se,onBlur:ue},null,544),[[xo,S.value]])],512),Bt(U("div",{ref_key:"listEl",ref:k,class:"list"},[(C(!0),N(Oe,null,mt(I.value,(Le,kt,qe)=>(C(),N("div",{id:`${T(o)}-option-${qe}`,key:`${qe}-${kt}`,class:st(["option",{highlighted:y.value==qe}]),role:"option","data-list-offset":qe,"data-prevent-list":"true",onMousemove:Ct=>pe(qe),onClick:Ct=>le(kt)},be(Le),43,Xw))),128)),Object.keys(I.value).length==0?(C(),N("div",Zw,[T(l)=="multiple"&&g.value?(C(),N(Oe,{key:0},[At("Up to "+be(T(s))+" option"+be(T(s)>1?"s":"")+" allowed.",1)],64)):(C(),N(Oe,{key:1},[At("No results")],64))])):Ae("",!0)],512),[[un,O.value!=="hidden"]])],40,Kw))}}),Hp=ke(eI,[["__scopeId","data-v-087b2aea"]]),tI="A user input component that allows users to select multiple values from a searchable list of options.",nI={a:"Option A",b:"Option B"},aI=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,oI={writer:{name:"Multiselect Input",description:tI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:JSON.stringify(nI,null,2)},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:L.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:L.Number,default:"0"},accentColor:{...Wt,desc:"The colour of the chips created for each selected option."},chipTextColor:{name:"Chip text",type:L.Color,default:ht.White,desc:"The colour of the text in the chips.",category:Pe.Style,applyStyleVariable:!0},primaryTextColor:Mt,secondaryTextColor:yn,containerBackgroundColor:zn,separatorColor:Vt,cssClasses:Ye},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:aI.trim(),bindable:!0}}}},rI=Ie({...oI,__name:"CoreMultiselectInput",setup(e){const t=W(Y.evaluatedFields),n=J(()=>t.options.value),a=J(()=>t.maximumCount.value),o=q(null),r=W(Y.core),s=W(Y.instancePath),l=W(Y.flattenedInstancePath),{formValue:c,handleInput:d}=qt(r,s,o);function h(f){d(f,"wf-options-change")}return(f,m)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:o,label:T(t).label.value,class:"CoreMultiselectInput"},{default:Ge(()=>[je(Hp,{"base-id":T(l),"active-value":T(c),options:n.value,"maximum-count":a.value,mode:"multiple",placeholder:T(t).placeholder.value,onChange:h},null,8,["base-id","active-value","options","maximum-count","placeholder"])]),_:1},8,["label"]))}}),sI=ke(rI,[["__scopeId","data-v-395d4366"]]),iI=["value","placeholder","min","max","step"],lI="A user input component that allows users to enter numeric values.",hd=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,cI={writer:{name:"Number Input",description:lI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},placeholder:{name:"Placeholder",type:L.Text},minValue:{name:"Minimum value",type:L.Number,default:null},maxValue:{name:"Max value",type:L.Number,default:null},valueStep:{name:"Step",type:L.Number,default:"1"},cssClasses:Ye},events:{"wf-number-change":{desc:"Capture changes as they happen.",stub:hd,bindable:!0},"wf-number-change-finish":{desc:"Capture changes once this control has lost focus.",stub:hd}}}},uI=Ie({...cI,__name:"CoreNumberInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=q(null),o=W(Y.core),r=W(Y.instancePath),{formValue:s,handleInput:l}=qt(o,r,n);function c(){if(a.value.value=="")return null;let f=parseFloat(a.value.value);return isNaN(f)||(t.minValue.value!==null&&f<t.minValue.value&&(f=t.minValue.value,a.value.value=f),t.maxValue.value!==null&&f>t.maxValue.value&&(f=t.maxValue.value,a.value.value=f)),f}function d(){const f=c();isNaN(f)||l(f,"wf-number-change")}function h(){const f=c();isNaN(f)||l(f,"wf-number-change-finish")}return(f,m)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:T(t).label.value,class:"CoreNumberInput"},{default:Ge(()=>[U("input",{ref_key:"inputEl",ref:a,type:"number",value:T(s),placeholder:T(t).placeholder.value,min:T(t).minValue.value!==null?T(t).minValue.value:void 0,max:T(t).maxValue.value!==null?T(t).maxValue.value:void 0,step:T(t).valueStep.value!==null?T(t).valueStep.value:void 0,onInput:d,onChange:h},null,40,iI)]),_:1},8,["label"]))}}),dI=ke(uI,[["__scopeId","data-v-24160bde"]]),fI=["id","checked","value","name","onInput"],pI=["for"],hI="A user input component that allows users to choose a single value from a list of options using radio buttons.",vI={a:"Option A",b:"Option B"},mI=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected radio option

	state["selected"] = payload`,gI={writer:{name:"Radio Input",description:hI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:JSON.stringify(vI,null,2)},orientation:{name:"Orientation",type:L.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:Pe.Style,desc:"Specify how to lay out the options."},primaryTextColor:Mt,accentColor:Wt,cssClasses:Ye},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:mI.trim(),bindable:!0}}}},yI=Ie({...gI,__name:"CoreRadioInput",setup(e){const t=W(Y.evaluatedFields),n=W(Y.flattenedInstancePath),a=q(null),o=W(Y.core),r=W(Y.instancePath),{formValue:s,handleInput:l}=qt(o,r,a);return(c,d)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:a,label:T(t).label.value,class:"CoreRadioInput"},{default:Ge(()=>[U("div",{class:st(["options",{horizontal:T(t).orientation.value=="horizontal"}])},[(C(!0),N(Oe,null,mt(T(t).options.value,(h,f)=>(C(),N("div",{key:f,class:"option"},[U("input",{id:`${T(n)}-option-${f}`,type:"radio",checked:T(s)===f,value:f,name:`${T(n)}-options`,onInput:m=>T(l)(f,"wf-option-change")},null,40,fI),U("label",{for:`${T(n)}-option-${f}`},be(h),9,pI)]))),128))],2)]),_:1},8,["label"]))}}),_I=ke(yI,[["__scopeId","data-v-1037b969"]]),bI="A user input component that allows users to select a single value from a searchable list of options.",AI={a:"Option A",b:"Option B"},CI=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,wI={writer:{name:"Select Input",description:bI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:JSON.stringify(AI,null,2)},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:L.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:L.Number,default:"0"},accentColor:Wt,chipTextColor:{name:"Chip text",type:L.Color,default:ht.White,desc:"The color of the text in the chips.",category:Pe.Style,applyStyleVariable:!0},primaryTextColor:Mt,secondaryTextColor:yn,containerBackgroundColor:zn,separatorColor:Vt,cssClasses:Ye},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:CI.trim(),bindable:!0}}}},II=Ie({...wI,__name:"CoreSelectInput",setup(e){const t=W(Y.evaluatedFields),n=J(()=>t.options.value),a=q(null),o=W(Y.core),r=W(Y.flattenedInstancePath),s=W(Y.instancePath),{formValue:l,handleInput:c}=qt(o,s,a);function d(h){const f=(h==null?void 0:h[0])??null;c(f,"wf-option-change")}return(h,f)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:a,label:T(t).label.value,class:"CoreSelectInput"},{default:Ge(()=>[je(Hp,{"base-id":T(r),"active-value":T(l)?[T(l)]:[],options:n.value,"maximum-count":1,mode:"single",placeholder:T(t).placeholder.value,onChange:d},null,8,["base-id","active-value","options","placeholder"])]),_:1},8,["label"]))}}),xI=ke(II,[["__scopeId","data-v-f0d4b92f"]]);function Cs(e,t){const n=J(()=>{var a;return((a=String(t.value).split(".")[1])==null?void 0:a.length)??0});return J(()=>Number(e.value).toFixed(n.value))}const kI={class:"BaseInputRange__popover__content"},SI=Ie({__name:"BaseInputSliderThumb",props:$o({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},sliderBoundingRect:{type:Object,default:void 0},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e,{expose:t}){const n=e;t({handleMouseDown:k,getOffsetLeft:S});const a=wa(e,"value"),o=q(),r=Cs(a,Co(n,"step")),s=J(()=>typeof a.value!="number"?50:(a.value-n.min)/(n.max-n.min)*100),l=q(n.popoverDisplayMode==="always");let c=null;He(Co(n.popoverDisplayMode),()=>{n.popoverDisplayMode==="always"&&(l.value=!0)});function d(){n.popoverDisplayMode!=="always"&&(l.value=!0,c&&(clearTimeout(c),c=null),c=setTimeout(()=>{l.value=!1,c=null},1e3))}const h=J(()=>`${s.value}%`),f=J(()=>`${s.value}%`);function m(y){if(d(),n.min!==void 0&&y<n.min||n.max!==void 0&&y>n.max)return;const b=y-n.min,O=Math.round(b/n.step),I=n.min+O*n.step;a.value!==I&&(a.value=I)}function k(y){document.addEventListener("mousemove",O),document.addEventListener("mouseup",I);const b=n.sliderBoundingRect;O(y);function O(g){const p=(g.x-b.left)/(b.right-b.left);if(p>1||p<0)return;const A=(n.max-n.min)*p+n.min;m(A)}function I(){document.removeEventListener("mouseup",I),document.removeEventListener("mousemove",O)}}function S(){return o.value.offsetLeft}return(y,b)=>(C(),N(Oe,null,[je(Bs,null,{default:Ge(()=>[Bt(U("div",{class:"BaseInputRange__popover",style:it({left:f.value})},[U("span",kI,be(T(r)),1)],4),[[un,l.value]])]),_:1}),U("button",{ref_key:"thumb",ref:o,type:"button",class:"BaseInputRange__thumb",style:it({left:h.value}),"aria-label":"Use the arrow keys to increase or decrease the value.",onKeydown:[b[0]||(b[0]=Ca(O=>m(+a.value-e.step),["left"])),b[1]||(b[1]=Ca(O=>m(+a.value+e.step),["right"]))],onMousedown:k},null,36)],64))}}),jp=ke(SI,[["__scopeId","data-v-c5f7e9fd"]]),TI=["aria-valuemin","aria-valuemax"],EI=Ie({__name:"BaseInputSliderLayout",props:{min:{type:Number,default:0},max:{type:Number,default:100},popoverDisplayMode:{type:String,default:"onChange"}},setup(e){return(t,n)=>(C(),N("div",{role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,class:st(["BaseInputRange",{"BaseInputRange--popover-always-visible":e.popoverDisplayMode==="always"}])},[$t(t.$slots,"default",{},void 0,!0)],10,TI))}}),zp=ke(EI,[["__scopeId","data-v-4583336d"]]);function Kp(e,t=500){const n=q(),a=setInterval(()=>{var o;n.value=(o=e.value)==null?void 0:o.getBoundingClientRect()},t);return Bn(()=>{clearInterval(a)}),J(()=>n.value)}const $I=9,MI=Ie({__name:"BaseInputSlider",props:$o({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=wa(e,"value"),a=q(),o=q(),r=Cs(n,Co(t,"step")),s=J(()=>typeof n.value!="number"?50:(n.value-t.min)/(t.max-t.min)*100),l=Kp(a);return He(()=>t.min,()=>{typeof n.value=="number"&&n.value<t.min&&(n.value=t.min)},{immediate:!0}),He(()=>t.max,()=>{typeof n.value=="number"&&n.value>t.max&&(n.value=t.max)},{immediate:!0}),(c,d)=>(C(),Fe(zp,{min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuenow":e.value,"aria-valuetext":`${T(r)} (${Math.round(s.value)}%)`},{default:Ge(()=>[U("div",{ref_key:"slider",ref:a,class:"BaseInputRange__slider",onMousedown:d[0]||(d[0]=(...h)=>o.value.handleMouseDown&&o.value.handleMouseDown(...h))},[U("div",{class:"BaseInputRange__slider__progress",style:it({width:`calc(${s.value}% + ${$I}px)`})},null,4)],544),je(jp,{ref_key:"thumb",ref:o,value:e.value,min:e.min,max:e.max,step:e.step,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":T(l),"onUpdate:value":d[1]||(d[1]=h=>n.value=h)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect"])]),_:1},8,["min","max","popover-display-mode","aria-valuenow","aria-valuetext"]))}}),NI="A user input component that allows users to select numeric values using a slider with optional constraints like min, max, and step.",OI=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,PI={writer:{name:"Slider Input",description:NI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},minValue:{name:"Minimum value",type:L.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:L.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:L.Number,default:"1",init:"1"},accentColor:Wt,popoverColor:{name:"Popover color",type:L.Color,category:Pe.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:L.Color,category:Pe.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:Ye},events:{"wf-number-change":{desc:"Capture changes to this control.",stub:OI,bindable:!0}}}},LI=Ie({...PI,__name:"CoreSliderInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=W(Y.core),o=W(Y.instancePath),{formValue:r,handleInput:s}=qt(a,o,n,50);return(l,c)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:T(t).label.value,class:"CoreSliderInput"},{default:Ge(()=>[je(MI,{"popover-display-mode":"always",value:T(r),min:T(t).minValue.value,max:T(t).maxValue.value,step:T(t).stepSize.value,"onUpdate:value":c[0]||(c[0]=d=>T(s)(d,"wf-number-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),RI=ke(LI,[["__scopeId","data-v-17932366"]]),DI=9,BI=Ie({__name:"BaseInputSliderRange",props:$o({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Array,default:()=>[20,60]},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=wa(e,"value");function a(b,O){const I=[...n.value];I[b]=O,n.value=I.sort((g,p)=>g-p)}const o=q(),r=q();function s(b){const O=r.value[0],I=r.value[1],g=Math.abs(b.x-O.getOffsetLeft()),p=Math.abs(b.x-I.getOffsetLeft());g>p?I.handleMouseDown(b):O.handleMouseDown(b)}const l=J(()=>Math.min(...n.value)),c=J(()=>Math.max(...n.value)),d=Co(t,"step"),h=Cs(l,d),f=Cs(c,d),m=J(()=>`from ${h} to ${f}`),k=J(()=>typeof l.value!="number"?50:(l.value-t.min)/(t.max-t.min)*100),S=J(()=>typeof c.value!="number"?50:(c.value-t.min)/(t.max-t.min)*100-k.value),y=Kp(o);return He(()=>t.min,()=>{n.value.some(b=>b<t.min)&&(n.value=n.value.map(b=>b<t.min?t.min:b))},{immediate:!0}),He(()=>t.max,()=>{n.value.some(b=>b>t.max)&&(n.value=n.value.map(b=>b>t.max?t.max:b))},{immediate:!0}),(b,O)=>(C(),Fe(zp,{class:"BaseInputRangeSlider",min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuetext":m.value},{default:Ge(()=>[U("div",{ref_key:"slider",ref:o,class:"BaseInputRange__slider",onMousedown:s},[U("div",{class:"BaseInputRange__slider__progress",style:it({width:`calc(${S.value}% + ${DI}px)`,marginLeft:`${k.value}%`})},null,4)],544),(C(),N(Oe,null,mt([0,1],I=>je(jp,{key:I,ref_for:!0,ref_key:"thumbs",ref:r,value:e.value[I],min:e.min,max:e.max,step:d.value,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":T(y),"onUpdate:value":g=>a(I?1:0,g)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect","onUpdate:value"])),64))]),_:1},8,["min","max","popover-display-mode","aria-valuetext"]))}}),FI="A user input component that allows users to select numeric values range using a range slider with optional constraints like min, max, and step.",VI=`
def onchange_handler(state, payload):

	# Set the state variables "from" & "to" to the new range
	state["from"] = payload[0]
	state["to"] = payload[1]`,UI={writer:{name:"Slider Range Input",description:FI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},minValue:{name:"Minimum value",type:L.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:L.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:L.Number,default:"1",init:"1"},accentColor:Wt,popoverColor:{name:"Popover color",type:L.Color,category:Pe.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:L.Color,category:Pe.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:Ye},events:{"wf-range-change":{desc:"Capture changes to this control.",stub:VI,bindable:!0}}}},HI=Ie({...UI,__name:"CoreSliderRangeInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=W(Y.core),o=W(Y.instancePath),{formValue:r,handleInput:s}=qt(a,o,n,[20,50]);return(l,c)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:T(t).label.value,class:"CoreSliderInput"},{default:Ge(()=>[je(BI,{"popover-display-mode":"always",value:T(r),min:T(t).minValue.value,max:T(t).maxValue.value,step:T(t).stepSize.value,"onUpdate:value":c[0]||(c[0]=d=>T(s)(d,"wf-range-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),jI=ke(HI,[["__scopeId","data-v-6cb23bb8"]]),zI=["type","value","placeholder"],KI="A user input component that allows users to enter single-line text values.",vd=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,WI={writer:{name:"Text Input",description:KI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},placeholder:{name:"Placeholder",type:L.Text},passwordMode:{name:"Password mode",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},category:Pe.Style},accentColor:Wt,cssClasses:Ye},events:{"wf-change":{desc:"Capture changes as they happen.",stub:vd,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:vd}}}},GI=Ie({...WI,__name:"CoreTextInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=W(Y.core),o=W(Y.instancePath),{formValue:r,handleInput:s}=qt(a,o,n);return(l,c)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:T(t).label.value,class:"CoreTextInput"},{default:Ge(()=>[U("input",{type:T(t).passwordMode.value=="yes"?"password":"text",value:T(r),placeholder:T(t).placeholder.value,"aria-autocomplete":"none",onInput:c[0]||(c[0]=d=>T(s)(d.target.value,"wf-change")),onChange:c[1]||(c[1]=d=>T(s)(d.target.value,"wf-change-finish"))},null,40,zI)]),_:1},8,["label"]))}}),YI=ke(GI,[["__scopeId","data-v-3de4e860"]]),JI=["value","placeholder","rows"],QI="A user input component that allows users to enter multi-line text values.",md=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,qI={writer:{name:"Textarea Input",description:QI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},placeholder:{name:"Placeholder",type:L.Text,control:Vs.Textarea},rows:{name:"Rows",type:L.Number,init:"5",default:"5"},cssClasses:Ye},events:{"wf-change":{desc:"Capture changes as they happen.",stub:md,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:md}}}},XI=Ie({...qI,__name:"CoreTextareaInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=W(Y.core),o=W(Y.instancePath),{formValue:r,handleInput:s}=qt(a,o,n);return(l,c)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:T(t).label.value,class:"CoreTextareaInput"},{default:Ge(()=>[U("textarea",{value:T(r),placeholder:T(t).placeholder.value,rows:T(t).rows.value,onInput:c[0]||(c[0]=d=>T(s)(d.target.value,"wf-change")),onChange:c[1]||(c[1]=d=>T(s)(d.target.value,"wf-change-finish"))},null,40,JI)]),_:1},8,["label"]))}}),ZI=ke(XI,[["__scopeId","data-v-df4e5c30"]]),ex=["value"],tx="A user input component that allows users to select a time.",nx=`
def onchange_handler(state, payload):

	# Set the state variable "new_time" to the new value, provided as a hh:mm string (in 24-hour format that includes leading zeros).

	state["new_time"] = payload`,ax={writer:{name:"Time Input",description:tx,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},cssClasses:Ye},events:{"wf-time-change":{desc:"Capture changes to this control.",stub:nx,bindable:!0}}}},ox=Ie({...ax,__name:"CoreTimeInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=W(Y.core),o=W(Y.instancePath),{formValue:r,handleInput:s}=qt(a,o,n);return(l,c)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:T(t).label.value,class:"CoreTimeInput"},{default:Ge(()=>[U("input",{type:"time",value:T(r),onChange:c[0]||(c[0]=d=>T(s)(d.target.value,"wf-time-change"))},null,40,ex)]),_:1},8,["label"]))}}),rx=ke(ox,[["__scopeId","data-v-fa21b0e5"]]),Wp=e=>(zt("data-v-efecd871"),e=e(),Kt(),e),sx={key:0,class:"filler light"},ix={key:1,class:"face"},lx={viewBox:"0 0 100 100"},cx=Wp(()=>U("circle",{class:"eye left",cx:"35",cy:"38",r:"6"},null,-1)),ux=Wp(()=>U("circle",{class:"eye right",cx:"65",cy:"38",r:"6"},null,-1)),dx=["d"],fx="A user input component that allows users to provide a rating.",px=`
def onchange_handler(state, payload):

	# Set the state variable "rating" to the new value

	state["rating"] = payload`,hx={writer:{name:"Rating Input",description:fx,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},feedback:{name:"Feedback",default:"stars",type:L.Text,options:{stars:"Stars",faces:"Faces",hearts:"Hearts"}},minValue:{name:"Minimum value",type:L.Number,default:"1",desc:"Valid values are 0 and 1."},maxValue:{name:"Max value",type:L.Number,default:"5",desc:"Valid values are between 2 and 11."},valueStep:{name:"Step",type:L.Number,default:"1",desc:"Valid values are between 0.25 and 1."},accentColor:Wt,primaryTextColor:Mt,cssClasses:Ye},events:{"wf-number-change":{stub:px,bindable:!0}}}},vx=Ie({...hx,__name:"CoreRatingInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=q(null),o=W(Y.core),r=W(Y.instancePath),s=q(null),{formValue:l,handleInput:c}=qt(o,r,n);function d(p){const A=p.offsetX,w=a.value.querySelectorAll(".unit");let V=0;return w.forEach(j=>{const ee=j;A>ee.offsetLeft+ee.offsetWidth?V++:A>ee.offsetLeft&&(V+=(A-ee.offsetLeft)/ee.offsetWidth)}),V}function h(p){let A=Math.ceil(p/I.value)*I.value;return A=Math.max(Math.min(A,O.value),b.value),A}function f(p){const A=d(p);return h(A)}function m(p){const A=f(p);s.value=A}function k(){s.value=null}function S(p){const A=Math.max(Math.min(p,O.value),b.value),w=45,V=95,j=(A-b.value)/(O.value-b.value),ee=j*-10,se=70+ee,le=w+j*(V-w)+ee;return`M30,${se} Q50,${le} 70,${se}`}function y(p){const A=f(p);c(A,"wf-number-change")}const b=J(()=>Math.max(Math.min(t.minValue.value,1),0)),O=J(()=>Math.max(Math.min(t.maxValue.value,11),2)),I=J(()=>Math.max(Math.min(t.valueStep.value,1),.25)),g=J(()=>{if(s.value!==null)return s.value;const p=parseFloat(l.value);return isNaN(p)?null:p});return(p,A)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,class:"CoreRatingInput",label:T(t).label.value},{default:Ge(()=>[U("div",{ref_key:"unitsEl",ref:a,class:st(["units",{valueSet:g.value!==null}]),onClick:y,onMousemove:m,onMouseout:k},[(C(!0),N(Oe,null,mt([...Array(O.value).keys()],w=>(C(),N("div",{key:w,class:st(["unit",T(t).feedback.value])},[U("div",{class:"filler",style:it({width:`${g.value>w?Math.min(g.value-w,1)*100:0}%`})},null,4),g.value!==null?(C(),N("div",sx)):Ae("",!0),T(t).feedback.value=="faces"?(C(),N("div",ix,[(C(),N("svg",lx,[cx,ux,U("path",{class:"mouth",d:S(g.value??w+1)},null,8,dx)]))])):Ae("",!0)],2))),128))],34)]),_:1},8,["label"]))}}),mx=ke(vx,[["__scopeId","data-v-efecd871"]]),gx=e=>(zt("data-v-ab3f108e"),e=e(),Kt(),e),yx=["aria-checked","onKeydown"],_x=gx(()=>U("div",{class:"toggle"},null,-1)),bx=[_x],Ax="A user input component with a simple on/off status.",Cx=`
def handle_toggle(state, payload):

	# The payload will be a bool 

	state["its_on"] = payload`,wx={writer:{name:"Switch Input",description:Ax,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},accentColor:Wt,primaryTextColor:Mt,separatorColor:Vt,cssClasses:Ye},events:{"wf-toggle":{desc:"Sent when the switch is toggled.",stub:Cx.trim(),bindable:!0}}}},Ix=Ie({...wx,__name:"CoreSwitchInput",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=W(Y.core),o=W(Y.instancePath),{formValue:r,handleInput:s}=qt(a,o,n);function l(){s(!r.value,"wf-toggle")}return(c,d)=>(C(),Fe(sn,{ref_key:"rootInstance",ref:n,label:T(t).label.value,"is-horizontal":!0,class:"CoreSwitchInput"},{default:Ge(()=>[U("div",{class:st(["switch",{on:!!T(r)}]),tabindex:"0",role:"switch","aria-checked":!!T(r),onClick:l,onKeydown:Ca(So(l,["prevent"]),["enter","space"])},bx,42,yx)]),_:1},8,["label"]))}}),xx=ke(Ix,[["__scopeId","data-v-ab3f108e"]]),kx=Ie({__name:"BaseContainer",props:{contentHAlign:{},contentVAlign:{},contentPadding:{},isHorizontal:{type:Boolean}},setup(e){const t=e,n=J(()=>{const a={padding:t.contentPadding};return t.isHorizontal?{...a,justifyContent:t.contentHAlign,alignItems:t.contentVAlign}:{...a,alignItems:t.contentHAlign,justifyContent:t.contentVAlign}});return(a,o)=>(C(),N("div",{class:st(["BaseContainer",{horizontal:t.isHorizontal}]),style:it(n.value),"data-writer-container":""},[$t(a.$slots,"default",{},void 0,!0)],6))}}),Ar=ke(kx,[["__scopeId","data-v-4caa740e"]]),Sx={class:"material-symbols-outlined"},Tx=Ie({__name:"BaseCollapseButton",props:$o({direction:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=wa(e,"modelValue"),a=J(()=>{switch(t.direction){case"left-right":return"chevron_left";case"top-bottom":return"keyboard_arrow_up";case"right-left":return"chevron_right";case"bottom-top":return"keyboard_arrow_down";default:return"keyboard_arrow_up"}});return(o,r)=>(C(),N("button",{role:"button",class:st(["BaseCollapseIcon",{"BaseCollapseIcon--collapsed":n.value}]),onClick:r[0]||(r[0]=s=>n.value=!n.value)},[U("i",Sx,be(a.value),1)],2))}}),Wl=ke(Tx,[["__scopeId","data-v-423122c6"]]),Ex={key:0,class:"header"},$x={key:0,class:"titleContainer"},Mx={key:0},Nx={key:1,class:"collapsedTitle"},Ox={class:"transformed"},Px={class:"content"},Lx="A layout component that organizes its child components in columns. Must be inside a Column Container component.",Rx={writer:{name:"Column",description:Lx,allowedParentTypes:["columns","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{title:{name:"Title",type:L.Text},width:{name:"Width (factor)",default:"1",init:"1",type:L.Number,desc:"Relative size when compared to other columns in the same container. A column of width 2 will be double the width of one with width 1.",category:Pe.Style},isSticky:{name:"Sticky",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},category:Pe.Style},isCollapsible:Hl,startCollapsed:{...Us,desc:"Only applied when the column is collapsible."},separatorColor:Vt,contentPadding:Oo,contentHAlign:No,contentVAlign:Ul,cssClasses:Ye}}},Dx=Ie({...Rx,__name:"CoreColumn",setup(e){const t=W(Y.instancePath),n=W(Y.instanceData),a=W(Y.core),o=W(Y.componentId),r=W(Y.evaluatedFields),s=J(()=>r.isCollapsible.value=="yes"),l=q(r.isCollapsible.value=="yes"&&r.startCollapsed.value=="yes"),c=J(()=>r.isSticky.value=="yes"),d=J(()=>{let S;return l.value?S="0 0 32px":S=`${r.width.value} 0 0`,{flex:S}}),h=J(()=>{var S,y;return k.value>=((y=(S=m.value)==null?void 0:S.value)==null?void 0:y.minimumNonCollapsiblePosition)}),f=J(()=>h.value?"right-left":"left-right"),m=J(()=>{var S;for(let y=-1;y>-1*t.length;y--){const b=t.at(y);if(((S=a.getComponentById(b.componentId))==null?void 0:S.type)!=="columns")continue;return n.at(y)}return null}),k=J(()=>{var S;return(S=a.getComponentById(o))==null?void 0:S.position});return He([()=>r.isCollapsible.value,k],()=>{const S=m.value;S&&(S.value={minimumNonCollapsiblePosition:void 0})}),He(m,S=>{!S||!S.value||s.value||typeof S.value.minimumNonCollapsiblePosition<"u"&&k.value>=S.value.minimumNonCollapsiblePosition||(S.value.minimumNonCollapsiblePosition=k.value)},{immediate:!0,deep:!0}),(S,y)=>(C(),N("div",{class:st(["CoreColumn",{sticky:c.value,collapsible:s.value,collapsibleToRight:h.value,collapsed:l.value}]),style:it(d.value)},[T(r).title.value||s.value?(C(),N("div",Ex,[l.value?Ae("",!0):(C(),N("div",$x,[T(r).title.value?(C(),N("h3",Mx,be(T(r).title.value),1)):Ae("",!0)])),s.value?(C(),Fe(Wl,{key:1,modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=b=>l.value=b),class:"collapser",direction:f.value},null,8,["modelValue","direction"])):Ae("",!0)])):Ae("",!0),l.value&&T(r).title.value?(C(),N("div",Nx,[U("div",Ox,[U("div",Px,be(T(r).title.value),1)])])):Ae("",!0),je(Ar,{class:"container","aria-expanded":s.value?l.value:null,"content-h-align":T(r).contentHAlign.value,"content-v-align":T(r).contentVAlign.value,"content-padding":T(r).contentPadding.value},{default:Ge(()=>[$t(S.$slots,"default",{},void 0,!0)]),_:3},8,["aria-expanded","content-h-align","content-v-align","content-padding"])],6))}}),Bx=ke(Dx,[["__scopeId","data-v-6aa037dd"]]),Fx={class:"CoreColumns horizontal","data-writer-container":""},Vx={writer:{name:"Column Container",description:"Serves as container for Column components",allowedChildrenTypes:["column","repeater","separator"],category:"Layout",fields:{cssClasses:Ye}}},Ux=Ie({...Vx,__name:"CoreColumns",setup(e){const t=W(Y.instanceData);return t.at(-1).value={minimumNonCollapsiblePosition:void 0},(n,a)=>(C(),N("div",Fx,[$t(n.$slots,"default",{},void 0,!0)]))}}),Hx=ke(Ux,[["__scopeId","data-v-616070ed"]]),jx={class:"CoreHeader"},zx={class:"container horizontal","data-writer-container":""},Kx="A container component that typically contains the main navigation elements.",Wx={writer:{name:"Header",description:Kx,category:"Layout",allowedChildrenTypes:["*"],fields:{text:{name:"Text",init:"Header Text",default:"(No text)",type:L.Text},primaryTextColor:Mt,cssClasses:Ye},previewField:"text"}},Gx=Ie({...Wx,__name:"CoreHeader",setup(e){const t=W(Y.evaluatedFields);return(n,a)=>(C(),N("div",jx,[U("h1",null,be(T(t).text.value),1),U("div",zx,[$t(n.$slots,"default",{},void 0,!0)])]))}}),Yx=ke(Gx,[["__scopeId","data-v-0dba4bfb"]]),Jx="A layout component that stacks its child components horizontally, wrapping them to the next row if necessary.",Qx={writer:{name:"Horizontal Stack",description:Jx,allowedChildrenTypes:["*"],category:"Layout",fields:{contentPadding:{...Oo,default:"0"},contentHAlign:No,contentVAlign:Ul,cssClasses:Ye}}},qx=Ie({...Qx,__name:"CoreHorizontalStack",setup(e){const t=W(Y.evaluatedFields);return(n,a)=>(C(),Fe(Ar,{class:"CoreHorizontalStack","content-h-align":T(t).contentHAlign.value,"content-v-align":T(t).contentVAlign.value,"content-padding":T(t).contentPadding.value,"is-horizontal":!0},{default:Ge(()=>[$t(n.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-v-align","content-padding"]))}}),Xx=ke(qx,[["__scopeId","data-v-a5e8d853"]]),Zx="A container component that divides the layout into sections, with an optional title.",ek={writer:{name:"Section",description:Zx,category:"Layout",allowedChildrenTypes:["*"],fields:{title:{name:"Title",init:"Section Title",desc:"Leave blank to hide.",type:L.Text},isCollapsible:Hl,startCollapsed:Us,accentColor:Wt,primaryTextColor:Mt,secondaryTextColor:yn,containerBackgroundColor:zn,containerShadow:Mo,separatorColor:Vt,buttonColor:Kn,buttonTextColor:Wn,buttonShadow:Ia,contentPadding:{...Oo,default:"16px"},contentHAlign:No,cssClasses:Ye},previewField:"title"}},tk=Ie({...ek,__name:"CoreSection",setup(e){const t=W(Y.evaluatedFields),n=J(()=>t.isCollapsible.value==="yes"),a=q(n.value&&t.startCollapsed.value==="yes");return(o,r)=>(C(),N("section",{class:st(["CoreSection",{"CoreSection--collapsible":n.value}])},[T(t).title.value||n.value?(C(),N("div",{key:0,class:st(["CoreSection__title",{"CoreSection__title--collapsed":n.value&&a.value}])},[U("h3",null,be(T(t).title.value),1),n.value?(C(),Fe(Wl,{key:0,modelValue:a.value,"onUpdate:modelValue":r[0]||(r[0]=s=>a.value=s),direction:"top-bottom"},null,8,["modelValue"])):Ae("",!0)],2)):Ae("",!0),a.value?Ae("",!0):(C(),Fe(Ar,{key:1,"content-h-align":T(t).contentHAlign.value,"content-padding":T(t).contentPadding.value,"aria-expanded":n.value?a.value:null},{default:Ge(()=>[$t(o.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding","aria-expanded"]))],2))}}),nk=ke(tk,[["__scopeId","data-v-eee7bb13"]]),ak="A visual component to create a separation between adjacent elements.",Gp={writer:{name:"Separator",description:ak,category:"Layout",fields:{separatorColor:Vt,cssClasses:Ye}}},gd=e=>{e.writer&&(e.writer.docs=`_Separator_ components are used to separate layout elements. They can be used in most containers, including _Column Container_ to separate columns.

If the container flows horizontally (like a _Horizontal Stack_ or a _Column Container_) the _Separator_ will be a vertical line. Otherwise, it'll be a horizontal line.`)},ok=e=>(zt("data-v-5abd9423"),e=e(),Kt(),e),rk={class:"CoreSeparator separator"},sk=ok(()=>U("div",{class:"line"},null,-1)),ik=[sk];function lk(e,t,n,a,o,r){return C(),N("div",rk,ik)}typeof gd=="function"&&gd(Gp);const ck=ke(Gp,[["render",lk],["__scopeId","data-v-5abd9423"]]),uk={class:"collapserContainer"},dk={class:"container","data-writer-container":""},fk="A container component that organizes its children in a sidebar. Its parent must be a Page component.",pk={writer:{name:"Sidebar",description:fk,positionless:!0,slot:"sidebar",allowedParentTypes:["page"],allowedChildrenTypes:["*"],category:"Layout",fields:{startCollapsed:{...Us,desc:void 0},sidebarBackgroundColor:{name:"Background",type:L.Color,category:Pe.Style,applyStyleVariable:!0,default:"rgba(255, 255, 255, 0.3)"},accentColor:Wt,primaryTextColor:Mt,secondaryTextColor:yn,containerBackgroundColor:zn,containerShadow:Mo,separatorColor:Vt,buttonColor:Kn,buttonTextColor:Wn,buttonShadow:Ia,cssClasses:Ye}}},hk=Ie({...pk,__name:"CoreSidebar",setup(e){const t=W(Y.evaluatedFields),n=q(t.startCollapsed.value=="yes"),a=W(Y.core),o=W(Y.builderManager),r=W(Y.componentId),s=J(()=>o==null?void 0:o.getSelectedId()),l=q(0),c=J(()=>({"max-height":`calc(100vh - ${l.value}px)`}));He(s,h=>{h&&d(h)&&(n.value=!1)});const d=h=>{const f=a.getComponentById(h);return!f||f.type=="root"?!1:f.parentId==r?!0:d(f.parentId)};return Ft(()=>{const h=document.querySelector(".ComponentRenderer");l.value=document.body.clientHeight-(h==null?void 0:h.parentElement.clientHeight)}),(h,f)=>(C(),N("div",{class:st(["CoreSidebar",{collapsed:n.value}]),style:it(c.value)},[U("div",uk,[je(Wl,{modelValue:n.value,"onUpdate:modelValue":f[0]||(f[0]=m=>n.value=m),direction:"left-right"},null,8,["modelValue"])]),U("div",dk,[$t(h.$slots,"default",{},void 0,!0)])],6))}}),vk=ke(hk,[["__scopeId","data-v-9e773017"]]),mk={class:"CoreTab"},gk=0,yd=1,yk="A container component that displays its child components as a tab inside a Tab Container.",_k={writer:{name:"Tab",description:yk,allowedParentTypes:["tabs","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Tab Name",type:L.Text},contentPadding:{...Oo,default:"16px"},contentHAlign:No,cssClasses:Ye},previewField:"name"}},bk=Ie({..._k,__name:"CoreTab",setup(e){const t=W(Y.evaluatedFields),n=W(Y.instancePath),a=W(Y.instanceData),o=W(Y.core),r=W(Y.builderManager),s=W(Y.componentId),{isComponentVisible:l}=Ks(o),c=J(()=>r==null?void 0:r.getSelectedId()),d=()=>{for(let p=-2;p>-1*n.length;p--){const A=n.at(p),{type:w}=o.getComponentById(A.componentId);if(w==="tabs")return p+1}},h=J(()=>{const p=d();return n.at(p)}),f=J(()=>h==null?void 0:h.value.instanceNumber),m=J(()=>f.value===gk),k=J(()=>f.value===yd),S=J(()=>l(s)?m.value||k.value&&g.value:!1),y=()=>{for(let p=-1;p>-1*n.length;p--){const A=n.at(p),{type:w}=o.getComponentById(A.componentId);if(w==="tabs")return a.at(p)}},b=()=>{const p=d(),A=n.slice(0,p),w=p+1<0?n.slice(p+1):[];return[...A,{componentId:n.at(p).componentId,instanceNumber:yd},...w]},O=()=>{const p=y();p.value={activeTab:b()}},I=p=>{const A=o.getComponentById(p);return!A||A.type=="root"?!1:A.parentId==s?!0:I(A.parentId)};He(c,p=>{p&&I(p)&&O()});const g=J(()=>{var V;let p;m.value?p=b():p=n;const w=(V=y().value)==null?void 0:V.activeTab;return JSON.stringify(w)==JSON.stringify(p)});return Eo(()=>{var w;if(m.value)return;const p=y();(w=p.value)!=null&&w.activeTab||l(s,n)&&(p.value={activeTab:n})}),(p,A)=>Bt((C(),N("div",mk,[m.value?(C(),N("button",{key:0,class:st(["bit",{active:g.value}]),tabindex:"0",onClick:O},be(T(t).name.value),3)):Ae("",!0),k.value?Bt((C(),Fe(Ar,{key:1,class:"container","content-h-align":T(t).contentHAlign.value,"content-padding":T(t).contentPadding.value},{default:Ge(()=>[$t(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[un,g.value]]):Ae("",!0)],512)),[[un,S.value]])}}),Ak=ke(bk,[["__scopeId","data-v-51f3a0d7"]]),Ck={class:"CoreTabs"},wk={class:"tabSelector horizontal","data-writer-cage":"","data-writer-container":""},Ik={class:"container"},xk="A container component for organising and displaying Tab components in a tabbed interface.",kk={writer:{name:"Tab Container",description:xk,category:"Layout",allowedChildrenTypes:["tab","repeater"],fields:{accentColor:Wt,primaryTextColor:Mt,secondaryTextColor:yn,containerBackgroundColor:zn,containerShadow:Mo,separatorColor:Vt,buttonColor:Kn,buttonTextColor:Wn,buttonShadow:Ia,cssClasses:Ye}}},Sk=Ie({...kk,__name:"CoreTabs",setup(e){const t=W(Y.instanceData);return t.at(-1).value={activeTab:void 0},(n,a)=>(C(),N("div",Ck,[U("nav",wk,[$t(n.$slots,"default",{instanceNumber:0},void 0,!0)]),U("div",Ik,[$t(n.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),Tk=ke(Sk,[["__scopeId","data-v-46e04ad4"]]),Yp=e=>(zt("data-v-bfed1c7b"),e=e(),Kt(),e),Ek={class:"CoreStep"},$k=["disabled"],Mk={class:"indicator"},Nk=Yp(()=>U("div",{class:"linker left"},null,-1)),Ok={key:0,class:"material-symbols-outlined"},Pk=Yp(()=>U("div",{class:"linker right"},null,-1)),Lk={class:"label"},ns=0,Vi=1,Rk="A container component that displays its child components as a step inside a Step Container.",Dk={writer:{name:"Step",description:Rk,allowedParentTypes:["steps","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Step name",type:L.Text},contentPadding:{...Oo,default:"16px"},isCompleted:{name:"Completed",desc:"Use a state reference to dynamically mark this step as complete.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},contentHAlign:No,cssClasses:Ye},previewField:"name"}},Bk=Ie({...Dk,__name:"CoreStep",setup(e){const t=W(Y.evaluatedFields),n=W(Y.instancePath),a=W(Y.instanceData),o=W(Y.isBeingEdited),r=W(Y.core),s=W(Y.builderManager),l=W(Y.componentId),{isComponentVisible:c}=Ks(r),d=J(()=>s==null?void 0:s.getSelectedId()),h=m();function f(){for(let p=-1;p>-1*n.length;p--){const A=n.at(p),w=r.getComponentById(A.componentId);if(!w)return;if(w.type==="steps")return p}}function m(){const p=f();if(!(typeof p>"u"))return a.at(p)}function k(){const p=f()+1,A=n.slice(0,p),w=p+1<0?n.slice(p+1):[];return[...A,{componentId:n.at(p).componentId,instanceNumber:Vi},...w]}function S(){h.value={...h.value,activeStep:k()}}function y(){const p=h.value.steps.findIndex(V=>JSON.stringify(V.instancePath)==JSON.stringify(n));if(p==-1||p+1>h.value.steps.length)return;let w=h.value.steps.slice(p+1).find(V=>V.isCompleted!="yes");w||(w=h.value.steps.at(-1)),h.value={...h.value,activeStep:w.instancePath}}function b(p){const A=r.getComponentById(p);return!A||A.type=="root"?!1:A.parentId==l?!0:b(A.parentId)}function O(){if(t.isCompleted.value!="yes"){S();return}y()}const I=J(()=>{const p=f()+1;return n.at(p)});He(d,p=>{p&&b(p)&&S()});const g=J(()=>{var w;let p;(I==null?void 0:I.value.instanceNumber)==ns?p=k():p=n;const A=(w=h.value)==null?void 0:w.activeStep;return JSON.stringify(A)==JSON.stringify(p)});return He([g,t.isCompleted],()=>{o.value||g.value&&t.isCompleted.value=="yes"&&y()}),He(t.isCompleted,(p,A)=>{A==="yes"&&p==="no"&&O()}),Eo(()=>{var A;(I==null?void 0:I.value.instanceNumber)==ns||(typeof h.value.steps.find(w=>w.instancePath==n)>"u"&&h.value.steps.push({instancePath:n,isCompleted:t.isCompleted.value}),(A=h.value)==null?void 0:A.activeStep)||c(l,n)&&O()}),Xa(()=>{const p=h.value.steps.findIndex(A=>JSON.stringify(A.instancePath)==JSON.stringify(n));h.value.steps.splice(p,1)}),(p,A)=>{var w,V,j,ee;return Bt((C(),N("div",Ek,[((w=I.value)==null?void 0:w.instanceNumber)==ns?(C(),N("button",{key:0,class:st(["bit",{active:g.value,completed:T(t).isCompleted.value=="yes"}]),disabled:!T(o),stepindex:"0",onClick:S},[U("div",Mk,[Nk,U("div",{class:st(["status",{completed:T(t).isCompleted.value=="yes"}])},[T(t).isCompleted.value=="yes"?(C(),N("i",Ok," done ")):Ae("",!0)],2),Pk]),U("div",Lk,be(T(t).name.value),1)],10,$k)):Ae("",!0),((V=I.value)==null?void 0:V.instanceNumber)==Vi?Bt((C(),Fe(Ar,{key:1,class:"container","content-h-align":T(t).contentHAlign.value,"content-padding":T(t).contentPadding.value},{default:Ge(()=>[$t(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[un,g.value]]):Ae("",!0)],512)),[[un,((j=I.value)==null?void 0:j.instanceNumber)==ns||((ee=I.value)==null?void 0:ee.instanceNumber)==Vi&&g.value]])}}}),Fk=ke(Bk,[["__scopeId","data-v-bfed1c7b"]]),Vk={class:"CoreSteps"},Uk={class:"stepSelector horizontal","data-writer-cage":"","data-writer-container":""},Hk={class:"container"},jk="A container component for displaying Step components, allowing you to implement a stepped workflow.",zk={writer:{name:"Step Container",description:jk,category:"Layout",allowedChildrenTypes:["step","repeater"],fields:{accentColor:Wt,primaryTextColor:Mt,secondaryTextColor:yn,containerBackgroundColor:zn,containerShadow:Mo,separatorColor:Vt,buttonColor:Kn,buttonTextColor:Wn,buttonShadow:Ia,cssClasses:Ye}}},Kk=Ie({...zk,__name:"CoreSteps",setup(e){const t=W(Y.instanceData),n={activeStep:void 0,steps:[]};return t.at(-1).value=n,(a,o)=>(C(),N("div",Vk,[U("nav",Uk,[$t(a.$slots,"default",{instanceNumber:0},void 0,!0)]),U("div",Hk,[$t(a.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),Wk=ke(Kk,[["__scopeId","data-v-782ebf0b"]]),Gk={key:0,class:"material-symbols-outlined"},Yk=`
def handle_button_click(state):

	# Increment counter when the button is clicked

	state["counter"] += 1`,Jk="A standalone button component that can be linked to a click event handler.",Qk={writer:{name:"Button",description:Jk,category:"Other",events:{"wf-click":{desc:"Capture single clicks.",stub:Yk.trim()}},fields:{text:{name:"Text",init:"Button Text",type:L.Text},isDisabled:{name:"Disabled",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},desc:"Disables all event handlers."},buttonColor:Kn,buttonTextColor:Wn,icon:{name:"Icon",type:L.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:Pe.Style},buttonShadow:Ia,separatorColor:Vt,cssClasses:Ye},previewField:"text"}},Jp=Ie({...Qk,__name:"CoreButton",setup(e){const t=q(null),n=W(Y.evaluatedFields),a=W(Y.isDisabled);He(n.isDisabled,r=>{a.value=r=="yes"},{immediate:!0});function o(r){if(!t.value)return;const s=br(r);t.value.$el.dispatchEvent(s)}return(r,s)=>(C(),Fe(Hn,{ref_key:"rootInstance",ref:t,class:"CoreButton","aria-disabled":T(a),onClick:o},{default:Ge(()=>[T(n).icon.value?(C(),N("i",Gk,be(T(n).icon.value),1)):Ae("",!0),At(" "+be(T(n).text.value),1)]),_:1},8,["aria-disabled"]))}}),_d=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Button_.")};typeof _d=="function"&&_d(Jp);const qk=ke(Jp,[["__scopeId","data-v-b2d8d89f"]]),Xk={padding:"16px","min-height":"64px","min-width":"64px","border-radius":"8px",background:"linear-gradient(90deg, rgba(41,207,0,1) 0%, rgba(145,231,78,1) 100%)"},Zk="A generic component that creates customisable HTML elements, which can serve as containers for other components.",Qp={writer:{name:"HTML Element",description:Zk,category:"Other",allowedChildrenTypes:["*"],fields:{element:{name:"Element",default:"div",type:L.Text,desc:"Set the type of HTML element to create, e.g., 'div', 'section', 'span', etc."},styles:{name:"Styles",default:null,init:JSON.stringify(Xk,null,2),type:L.Object,desc:"Define the CSS styles to apply to the HTML element using a JSON object or a state reference to a dictionary."},attrs:{name:"Attributes",default:null,type:L.Object,desc:"Set additional HTML attributes for the element using a JSON object or a dictionary via a state reference."},htmlInside:{name:"HTML inside",default:null,type:L.Text,control:Vs.Textarea,desc:"Define custom HTML to be used inside the element. It will be wrapped in a div and rendered after children components."},cssClasses:Ye}},setup(e,{slots:t}){const n=W(Y.evaluatedFields);return()=>{let a;return n.htmlInside.value&&(a=ba("div",{innerHTML:n.htmlInside.value})),ba(n.element.value,{...n.attrs.value,class:"CoreHTML","data-writer-container":"",style:n.styles.value},[t.default({}),a])}}},bd=e=>{e.writer&&(e.writer.docs=`You can configure the element type, styles, and attributes to fit your design requirements. You can link them to state for advanced use cases, such as custom animations.

All valid HTML tags are supported, including tags such as \`iframe\`, allowing you to embed external sites.

Take into account the potential risks of adding custom HTML to your app, including XSS. Be specially careful when injecting user-generated data.`)};typeof bd=="function"&&bd(Qp);const Gl=e=>(zt("data-v-62b3d343"),e=e(),Kt(),e),eS={class:"pagination-left"},tS={class:"pagination-pagesize"},nS=["value","selected"],aS={class:"pagination-description"},oS={class:"bold"},rS={class:"bold"},sS={class:"bold"},iS={class:"pagination-right"},lS={class:"pagination-picker"},cS=Gl(()=>U("i",{class:"material-symbols-outlined"}," navigate_before ",-1)),uS=[cS],dS={key:0,class:"paginationpicker-block paginationpicker-neutral"},fS=["onClick"],pS={key:2,class:"paginationpicker-block paginationpicker-currentpage"},hS=Gl(()=>U("i",{class:"material-symbols-outlined"}," navigate_next ",-1)),vS=[hS],mS={class:"pagination-jump"},gS=Gl(()=>U("label",null,"Jump to",-1)),yS=["value"],_S=`
def handle_page_change(state, payload):
    page = payload
    state["page"] = page

    records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
    # update a repeater
    state["highlighted_members"] = {r.id: r for r in records}
`,bS=`
def handle_page_size_change(state, payload):
    state['pageSize'] = payload

    records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
    # update a repeater
    state["highlighted_members"] = {r.id: r for r in records}
`,AS={writer:{name:"Pagination",category:"Other",description:"A component that can help you paginate records, for example from a Repeater or a DataFrame.",fields:{page:{name:"Page",init:"1",default:"1",type:L.Number,desc:"The current page number."},pageSize:{name:"Page Size",default:"10",type:L.Number,desc:"The number of items per page."},totalItems:{name:"Total Items",default:"10",type:L.Number,desc:"The total number of items"},pageSizeOptions:{name:"Page Size Options",init:"",default:"",type:L.Text,desc:"A comma-separated list of page size options. If it's empty, the user can't change the page size. Set your default page size as the first option."},pageSizeShowAll:{name:"Show All Option",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},desc:"Show an option to show all records."},jumpTo:{name:"Jump To",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},desc:"Show an option to jump to a specific page."}},events:{"wf-change-page":{desc:"Fires when the user pick a page",stub:_S.trim()},"wf-change-page-size":{desc:"Fires when the user change the page size.",stub:bS.trim()}}}},CS=Ie({...AS,__name:"CorePagination",setup(e){const t=W(Y.evaluatedFields),n=W(Y.core),a=q(null),o=W(Y.instancePath),{handleInput:r}=qt(n,o,a),{handleInput:s}=qt(n,o,a),l=J(()=>t.pageSizeOptions.value!==""||t.pageSizeShowAll.value==="yes"),c=J(()=>t.jumpTo.value==="yes"),d=J(()=>t.totalItems.value==0?0:(t.page.value-1)*t.pageSize.value+1),h=J(()=>Math.min(t.page.value*t.pageSize.value,t.totalItems.value)),f=J(()=>t.totalItems.value),m=J(()=>Math.ceil(parseInt(t.totalItems.value)/parseInt(t.pageSize.value))),k=J(()=>{let p=[];const A=t.pageSizeOptions.value.split(",");for(const w in A){const V=parseInt(A[w],10);p.push({value:V,label:`${V} items`})}return t.pageSizeShowAll.value==="yes"&&p.push({value:f.value,label:"All items"}),p}),S=J(()=>{const p=[],A=parseInt(t.page.value);if(m.value<=7)for(let w=0;w<m.value;w++)p.push(w+1);else A==1||A==2?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(m.value-2),p.push(m.value-1),p.push(m.value)):A==3?(p.push(1),p.push(2),p.push(3),p.push(4),p.push("..."),p.push(m.value-1),p.push(m.value)):A==4?(p.push(1),p.push(2),p.push(3),p.push(4),p.push(5),p.push("..."),p.push(m.value)):A==m.value||A==m.value-1?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(m.value-2),p.push(m.value-1),p.push(m.value)):A==m.value-2?(p.push(1),p.push(2),p.push("..."),p.push(m.value-3),p.push(m.value-2),p.push(m.value-1),p.push(m.value)):(p.push(1),p.push("..."),p.push(A-1),p.push(A),p.push(A+1),p.push("..."),p.push(m.value));return p}),y=J(()=>parseInt(t.page.value)-1<1),b=J(()=>parseInt(t.page.value)+1>m.value),O=p=>{if(p.target.value==="")return;let A=parseInt(p.target.value);A>m.value&&(A=m.value),r(A,"wf-change-page")},I=p=>{r(p,"wf-change-page")},g=p=>{let A=parseInt(p.target.value);s(A,"wf-change-page-size")};return He(t.page,()=>{}),He(t.pageSize,()=>{}),Ft(()=>{}),Bn(()=>{}),(p,A)=>(C(),N("div",{ref_key:"rootEl",ref:a,class:"CorePagination"},[U("div",eS,[Bt(U("div",tS,[U("select",{class:"pagesize-select",onChange:g},[(C(!0),N(Oe,null,mt(k.value,(w,V)=>(C(),N("option",{key:V,value:w.value,selected:w.value==T(t).pageSize.value},be(w.label),9,nS))),128))],32)],512),[[un,l.value]]),U("div",aS,[At(" Showing "),U("span",oS,be(d.value),1),At(" to "),U("span",rS,be(h.value),1),At(" of "),U("span",sS,be(f.value),1),At(" results ")])]),U("div",iS,[U("div",lS,[U("div",{class:st(["paginationpicker-block",{"paginationpicker-disabled":y.value}]),onClick:A[0]||(A[0]=w=>I(T(t).page.value-1))},uS,2),(C(!0),N(Oe,null,mt(S.value,(w,V)=>(C(),N(Oe,{key:V},[w=="..."?(C(),N("div",dS,be(w),1)):Ae("",!0),w!="..."&&w!=T(t).page.value?(C(),N("div",{key:1,class:"paginationpicker-block",onClick:j=>I(w)},be(w),9,fS)):Ae("",!0),w==T(t).page.value?(C(),N("div",pS,be(w),1)):Ae("",!0)],64))),128)),U("div",{class:st(["paginationpicker-block",{"paginationpicker-disabled":b.value}]),onClick:A[1]||(A[1]=w=>I(T(t).page.value+1))},vS,2)]),Bt(U("div",mS,[gS,U("input",{type:"text",value:T(t).page.value,onInput:O},null,40,yS)],512),[[un,c.value]])])],512))}}),wS=ke(CS,[["__scopeId","data-v-62b3d343"]]),IS="A container component that repeats its child components based on a dictionary.",xS={a:{desc:"Option A"},b:{desc:"Option B"}},kS={writer:{name:"Repeater",description:IS,category:"Other",allowedChildrenTypes:["inherit"],fields:{repeaterObject:{name:"Repeater object",default:JSON.stringify(xS,null,2),type:L.Object,desc:"Include a state reference to the dictionary used for repeating the child components. Alternatively, specify a JSON object."},keyVariable:{name:"Key variable name",default:"itemId",init:"itemId",type:L.Text,desc:"Set the name of the variable that will store the key of the current repeater object entry."},valueVariable:{name:"Value variable name",default:"item",init:"item",type:L.Text,desc:"Set the name of the variable that will store the value of the current repeater object entry."}}},setup(e,{slots:t}){const n=W(Y.core),a=W(Y.componentId),o=W(Y.evaluatedFields),r=W(Y.isBeingEdited),s=W(Y.renderProxiedComponent),l=J(()=>n.getComponents(a,{sortedByPosition:!0})),c=()=>typeof o.repeaterObject.value!="object"?[]:Object.values(o.repeaterObject.value).map((h,f)=>l.value.map(m=>s(m.id,f)));return()=>{let d={};return l.value.length!=0&&o.repeaterObject.value!=null&&Object.keys(o.repeaterObject.value).length!=0?d=c():r.value===!0?d=t.default({}):d={},ba("div",{class:"CoreRepeater","data-writer-container":""},d)}}},SS=ke(kS,[["__scopeId","data-v-cfce6ac0"]]),TS="A component that emits an event repeatedly at specified time intervals, enabling time-based refresh.",ES=`
def handle_timer_tick(state):

	# Increment counter when the timer ticks

	state["counter"] += 1`.trim(),$S={writer:{name:"Timer",description:TS,category:"Other",fields:{intervalMs:{name:"Interval (ms)",desc:"How much time to wait between ticks. A tick is considered finished when its event is handled.",default:"200",type:L.Number},isActive:{name:"Active",default:"yes",desc:"Whether the timer should trigger tick events.",type:L.Text,options:{yes:"Yes",no:"No"}},accentColor:Wt,cssClasses:Ye},events:{"wf-tick":{desc:"Emitted when the timer ticks.",stub:ES.trim()}}}},MS=Ie({...$S,__name:"CoreTimer",setup(e){const a=W(Y.evaluatedFields),o=W(Y.core),r=q(null),s=J(()=>a.intervalMs.value),l=J(()=>a.isActive.value=="yes"),c=q(!1),d=W(Y.componentId),h=J(()=>{var b,O;return!!((O=(b=o.getComponentById(d))==null?void 0:b.handlers)!=null&&O["wf-tick"])}),f=J(()=>({"animation-duration":`${Math.max(s.value,1e3)}ms`}));He([l,s],()=>{y()}),He(h,async b=>{b&&(await mn(),y())});let m=0,k=null;function S(){clearTimeout(k)}function y(){if(S(),!l.value||s.value<0||!r.value)return;Date.now()-m>=500&&(r.value.classList.remove("tick"),r.value.offsetWidth,m=Date.now(),r.value.classList.add("tick"));const b=({ok:I})=>{c.value=!I,k=setTimeout(()=>{y()},s.value)},O=new CustomEvent("wf-tick",{detail:{callback:b}});r.value.dispatchEvent(O)}return Ft(()=>{y()}),(b,O)=>(C(),N("div",{ref_key:"rootEl",ref:r,class:st(["CoreTimer",{failing:c.value}]),style:it(f.value)},null,6))}}),NS=ke(MS,[["__scopeId","data-v-916ba36c"]]),OS={class:"main"},PS={class:"actions"},LS=["value"],RS="A user input component that allows users to capture images using their webcam.",DS=`
def webcam_handler(payload):

	# This handler will save the captured images based on timestamp

	import time
	timestamp = time.time()

	# The payload is a file-like object which contains the captured image
	# in PNG format

	image_file = payload
	with open(f"capture-{timestamp}.png", "wb") as file_handle:
		file_handle.write(image_file)`.trim(),BS={writer:{name:"Webcam Capture",description:RS,category:"Other",fields:{refreshRate:{name:"Refresh rate (ms)",init:"200",default:"200",desc:"Set to 0 for manual capture.",type:L.Number},buttonColor:Kn,buttonTextColor:Wn,buttonShadow:Ia,separatorColor:Vt,cssClasses:Ye},events:{"wf-webcam":{desc:"Sent when a frame is captured. Its payload contains the captured frame in PNG format.",stub:DS.trim()}}}},FS=Ie({...BS,__name:"CoreWebcamCapture",setup(e){const t=q(!1),n=q(null),a=document.createElement("canvas"),o=q(null),r=W(Y.evaluatedFields),s=q(null),l=q(null);Ft(async()=>{var y,b;s.value=await c(),l.value=(b=(y=s.value)==null?void 0:y[0])==null?void 0:b.deviceId}),Xa(()=>{S()});const c=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(O=>O.kind=="videoinput"),d=J(()=>r.refreshRate.value);He(d,(y,b)=>{y>0&&b<=0&&m()}),He(l,async()=>{t.value&&(S(),await k())});const h=async()=>{if(t.value=!t.value,!t.value){S();return}await k(),m()},f=()=>(a.getContext("2d").drawImage(o.value,0,0),a.toDataURL("image/png")),m=()=>{const y=new CustomEvent("wf-webcam",{detail:{payload:f(),callback:()=>{d.value<=0||!t.value||setTimeout(()=>{m()},d.value)}}});n.value.dispatchEvent(y)},k=async()=>(o.value.style.display="",new Promise((y,b)=>{navigator.mediaDevices.getUserMedia||(console.error("This browser doesn't support webcam connection."),b());const O={video:!0};s.value.length>1&&(O.video={deviceId:l.value}),navigator.mediaDevices.getUserMedia(O).then(I=>{o.value.srcObject=I;const g=I.getVideoTracks()[0].getSettings().width,p=I.getVideoTracks()[0].getSettings().height;a.setAttribute("width",g.toString()),a.setAttribute("height",p.toString()),y()}).catch(I=>{console.error("An error occurred when trying to use the webcam.",I),b()})})),S=()=>{const y=o.value.srcObject;y&&y.getTracks().map(O=>O.stop()),o.value.srcObject=null,o.value.style.display="none"};return(y,b)=>{var O;return C(),N("div",{ref_key:"rootEl",ref:n,class:"CoreWebcamCapture"},[Bt(U("div",OS,[U("video",{ref_key:"videoEl",ref:o,autoplay:"true"},null,512)],512),[[un,t.value]]),U("div",PS,[d.value==0?(C(),Fe(Hn,{key:0,onClick:m},{default:Ge(()=>[At(" Capture image ")]),_:1})):Ae("",!0),je(Hn,{onClick:h},{default:Ge(()=>[At(be(t.value?"Stop capture":"Start webcam capture"),1)]),_:1}),((O=s.value)==null?void 0:O.length)>1?(C(),Fe(Up,{key:1,modelValue:l.value,"onUpdate:modelValue":b[0]||(b[0]=I=>l.value=I)},{default:Ge(()=>[(C(!0),N(Oe,null,mt(s.value,(I,g)=>(C(),N("option",{key:I.deviceId,value:I.deviceId},be(I.label||`Webcam ${g+1}`),9,LS))),128))]),_:1},8,["modelValue"])):Ae("",!0)])],512)}}}),VS=ke(FS,[["__scopeId","data-v-9e37501d"]]),US={writer:{name:"Reuse Component",slot:"*",description:"Those components are used to reuse other components. Reused components share the same state and are updated together.",category:"Other",allowedChildrenTypes:[],fields:{proxyId:{name:"Component id",type:L.Text,desc:"The id of the component to reuse."}}}},HS=Ie({...US,__name:"CoreReuse",props:{contextSlot:{}},setup(e){const t=e,n=W(Y.evaluatedFields),o=W(Y.instancePath).at(-2).componentId,r=W(Y.core),s=W(Y.renderProxiedComponent),l=W(Y.isBeingEdited),c=W(Y.componentId),d=q(ba("div","")),h=q(!0),f=J(()=>{var y;return(y=r.getComponentById(n.proxyId.value))==null?void 0:y.type}),m=J(()=>f.value?r.getComponentDefinition(f.value):null);function k(y,b){h.value=t.contextSlot==="default",d.value=ba("div",{class:["CoreReuse",b],style:{color:"var(--primaryTextColor)"}},l.value?y:"")}function S(){if(!n.proxyId.value)return k("No component selected to reuse","empty");if(c===n.proxyId.value||!m.value)return k("The id specified for reuse doesn't match any component.","invalid-value");if(!r.getContainableTypes(o).includes(f.value))return k("The component cannot be reused here.","invalid-context");h.value=t.contextSlot===(m.value.slot??"default");const y=s(n.proxyId.value,0,{class:["CoreReuse"]});d.value=y}return He([n.proxyId,m],S,{immediate:!0}),(y,b)=>h.value?(C(),Fe(mr(d.value),{key:0})):Ae("",!0)}}),xa=e=>(zt("data-v-912607e3"),e=e(),Kt(),e),jS={key:0,class:"controls"},zS=xa(()=>U("i",{class:"material-symbols-outlined"},"arrow_upward",-1)),KS=xa(()=>U("i",{class:"material-symbols-outlined"},"arrow_downward",-1)),WS=xa(()=>U("i",{class:"material-symbols-outlined"},"zoom_in",-1)),GS=xa(()=>U("i",{class:"material-symbols-outlined"},"zoom_out",-1)),YS=xa(()=>U("span",{class:"separator"},null,-1)),JS=xa(()=>U("i",{class:"material-symbols-outlined"},"navigate_before",-1)),QS=xa(()=>U("i",{class:"material-symbols-outlined"},"navigate_next",-1)),qS={key:2},XS=["page"],ZS=xa(()=>U("div",{class:"mask"},null,-1)),eT="A component to embed PDF documents.",tT={writer:{name:"PDF",description:eT,category:"Embed",fields:{source:{name:"PDF source",type:L.Text,desc:"A valid URL. Alternatively, you can provide a state reference to a packed PDF file."},highlights:{name:"Highlights",default:JSON.stringify([]),desc:"A list of highlights to be applied to the PDF as a JSON array of strings.",type:L.Object},selectedMatch:{name:"Selected highlight match",default:null,desc:"The index of the selected highlight match.",type:L.Number},page:{name:"Page",type:L.Number,desc:"The page to be displayed."},controls:{name:"Controls",type:L.Text,options:{yes:"Yes",no:"No"},desc:"Show controls to navigate the PDF.",default:"yes"},containerBackgroundColor:zn,separatorColor:Vt,primaryTextColor:Mt,cssClasses:Ye}}},nT=Ie({...tT,__name:"CorePDF",setup(e){const t=W(Y.evaluatedFields);let n,a,o;const r=J(()=>t.highlights.value?t.highlights.value.map(ue=>ue.replaceAll("|","\\|")).join("|"):""),s=q({completeWords:!1,ignoreCase:!0}),l=q(1),c=q(1),d=q([]),h=q(0),f=q(null),m=q(null),k=q(!1),S=q(0),y=q([]);Ft(async()=>{const ue=await on(()=>import("./index-B3cAylyr.js"),[],import.meta.url);o=ue.VuePDF;const Ce=ue.usePDF;({pdf:n,pages:a}=Ce(t.source)),b()});const b=()=>{k.value=!0,S.value=0,y.value=[],d.value=[]},O=ue=>{y.value=[...y.value,ue].sort((Ce,Re)=>Ce.page-Re.page)},I=ue=>{S.value++},g=()=>{d.value=y.value.reduce((ue,Ce)=>[...ue,...Ce.matches.map((Re,pe)=>({page:Ce.page,str:Re.str,index:pe}))],[]).sort((ue,Ce)=>ue.page===Ce.page?ue.index-Ce.index:ue.page-Ce.page)},p=()=>{g(),h.value&&V(h.value),t.selectedMatch.value&&(h.value=t.selectedMatch.value)},A=ue=>{const Ce=ue.target.getBoundingClientRect(),Re=[...ue.target.children].filter(pe=>pe.className.includes("page")).find(pe=>{const he=pe.getBoundingClientRect(),de=he.y-Ce.y;return de<Ce.height/2&&de+he.height>Ce.height/2});Re&&(c.value=Number(Re.getAttribute("page")))},w=(ue,Ce)=>{let Re=0,pe=ue;for(;pe&&pe!==Ce;)Re+=pe.offsetTop,pe=pe.offsetParent;return Re},V=ue=>{if(ue<1||ue>d.value.length)return;const Ce=d.value[ue-1];if(!Ce)return;const pe=f.value.querySelectorAll(`div[page='${Ce.page}'] span.highlight`)[Ce.index];m.value.scrollTop=w(pe,m.value)},j=ue=>{if(ue<1||ue>a.value)return;const Ce=f.value.querySelector("div[page='"+ue+"']");m.value.scrollTop=w(Ce,m.value)},ee=()=>{h.value<d.value.length?h.value=h.value+1:h.value=1},se=()=>{h.value>1?h.value=h.value-1:h.value=d.value.length},le=()=>{l.value=l.value<2?l.value+.1:l.value},ae=()=>{l.value=l.value>.25?l.value-.1:l.value};return He(S,()=>{S.value===a.value&&t.page.value&&j(t.page.value)}),He([y,S],()=>{(!r.value||y.value.length===a.value)&&S.value===a.value&&(p(),k.value=!1)}),He(l,()=>{b()}),He(t.source,()=>{b()}),He(t.highlights,()=>{y.value=[],d.value=[]}),He(h,()=>{V(h.value)}),He(t.selectedMatch,()=>{h.value=t.selectedMatch.value}),He(t.page,()=>{j(t.page.value)}),(ue,Ce)=>(C(),N("div",{ref_key:"rootEl",ref:f,class:"CorePDF"},[T(t).controls.value==="yes"?(C(),N("div",jS,[je(Pn,{onClick:Ce[0]||(Ce[0]=()=>j(c.value-1))},{default:Ge(()=>[zS]),_:1}),je(Pn,{onClick:Ce[1]||(Ce[1]=()=>j(c.value+1))},{default:Ge(()=>[KS]),_:1}),(C(),N("span",{key:c.value},be(c.value)+" / "+be(T(a)),1)),je(Pn,{disabled:k.value,onClick:le},{default:Ge(()=>[WS]),_:1},8,["disabled"]),je(Pn,{disabled:k.value,onClick:ae},{default:Ge(()=>[GS]),_:1},8,["disabled"]),U("span",null,be(Math.round(l.value*100))+"%",1),YS,d.value.length?(C(),Fe(Pn,{key:0,onClick:se},{default:Ge(()=>[JS]),_:1})):Ae("",!0),d.value.length?(C(),Fe(Pn,{key:1,onClick:ee},{default:Ge(()=>[QS]),_:1})):Ae("",!0),d.value.length?(C(),N("span",qS,"Matches "+be(h.value)+" / "+be(d.value.length),1)):Ae("",!0)])):Ae("",!0),U("div",{ref_key:"viewerEl",ref:m,class:"viewer",onScroll:A},[(C(!0),N(Oe,null,mt(T(a),Re=>(C(),N("div",{key:Re,page:Re,class:"page"},[je(T(o),{scale:l.value,pdf:T(n),page:Re,"text-layer":"","highlight-text":r.value,"highlight-options":s.value,onHighlight:Ce[2]||(Ce[2]=pe=>O(pe)),onLoaded:I},null,8,["scale","pdf","page","highlight-text","highlight-options"])],8,XS))),128))],544),ZS],512))}}),aT=ke(nT,[["__scopeId","data-v-912607e3"]]),qp=e=>(zt("data-v-810b0f26"),e=e(),Kt(),e),oT={key:0,class:"noURLProvided"},rT=qp(()=>U("h2",null,"No URL provided.",-1)),sT=[rT],iT=["src"],lT=qp(()=>U("div",{class:"mask"},null,-1)),cT="A component to embed an external resource in an iframe.",uT=`
def load_handler(state):

	# Sets status message when resource is loaded

	state["status"] = "Page loaded"`,dT={writer:{name:"IFrame",description:cT,category:"Embed",fields:{src:{name:"Source",default:"",desc:"A valid URL",type:L.Text},separatorColor:Vt,cssClasses:Ye},events:{"wf-load":{desc:"Fires when the resource has successfully loaded.",stub:uT.trim()}}}},fT=Ie({...dT,__name:"CoreIFrame",setup(e){const t=q(null),n=W(Y.evaluatedFields);function a(){const o=new CustomEvent("wf-load");t.value.dispatchEvent(o)}return(o,r)=>(C(),N("div",{ref_key:"rootEl",ref:t,class:"CoreIFrame"},[T(n).src.value?(C(),N("iframe",{key:1,src:T(n).src.value,draggable:"false",onLoad:a},null,40,iT)):(C(),N("div",oT,sT)),lT],512))}}),pT=ke(fT,[["__scopeId","data-v-810b0f26"]]),Yl=e=>(zt("data-v-121cc5c9"),e=e(),Kt(),e),hT={key:0,class:"noAPIKeyProvided"},vT=Yl(()=>U("h2",null,"Google Maps cannot be initialised.",-1)),mT=Yl(()=>U("h3",null,"An API key hasn't been provided.",-1)),gT=[vT,mT],yT=Yl(()=>U("div",{class:"mask"},null,-1)),_T="A component to embed a Google Map. It can be used to display a map with markers.",bT=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],AT={writer:{name:"Google Maps",description:_T,category:"Embed",fields:{apiKey:{name:"API Key",default:"",desc:"API Key from Google Cloud Console.",type:L.Text},mapId:{name:"Map ID",default:"",desc:"ID of map from Google Cloud Console, needed for markers.",type:L.Text},mapType:{name:"Map type",type:L.Text,default:"roadmap",options:{roadmap:"Roadmap",satellite:"Satellite",hybrid:"Hybrid",terrain:"Terrain"},desc:"One of 'roadmap', 'satellite', 'hybrid' or 'terrain'."},zoom:{name:"Zoom",default:"8",type:L.Number},lat:{name:"Latitude",default:"37.79322359164316",type:L.Number},lng:{name:"Longitude",default:"-122.39999318828129",type:L.Number},markers:{name:"Markers",default:JSON.stringify(bT),desc:"Markers data",type:L.Object},cssClasses:Ye},events:{"gmap-marker-click":{desc:"Capture single clicks on markers."},"gmap-click":{desc:"Capture single click on map."}}}},CT=Ie({...AT,__name:"CoreGoogleMaps",setup(e){const t=q(null),n=q(null),a=W(Y.evaluatedFields);let o=null,r=[];const s=J(()=>({lat:a.lat.value,lng:a.lng.value})),l=J(()=>["roadmap","satellite","hybrid","terrain"].includes(a.mapType.value)?a.mapType.value:"roadmap"),c=async()=>{h();const{Loader:f}=await on(()=>import("./index-BQr1pfrb.js"),[],import.meta.url);await new f({apiKey:a.apiKey.value,version:"weekly"}).load(),o=new google.maps.Map(n.value,{center:s.value,mapTypeId:l.value,zoom:8,mapId:a.mapId.value}),o.addListener("click",k=>{const S=new CustomEvent("gmap-click",{detail:{payload:k.latLng.toJSON()}});t.value.dispatchEvent(S)}),d()},d=async()=>{if(!a.mapId.value||!a.markers.value)return;const{AdvancedMarkerElement:f}=await google.maps.importLibrary("marker");h(),a.markers.value.forEach(k=>{const S=new f({position:{lat:k.lat,lng:k.lng},map:o,title:k.name});r.push(S),S.addListener("click",()=>{const y=new CustomEvent("gmap-marker-click",{detail:{payload:k}});t.value.dispatchEvent(y)})})},h=()=>{r.forEach(f=>f.setMap(null)),r=[]};return Ft(async()=>{a.apiKey.value&&await c()}),He(s,async f=>{o&&o.setCenter(f)}),He(a.zoom,async f=>{o&&o.setZoom(f)}),He(l,async f=>{o&&o.setMapTypeId(f)}),He(a.markers,d),He(a.apiKey,c),He(a.mapId,c),(f,m)=>(C(),N("div",{ref_key:"rootEl",ref:t,class:"CoreGoogleMaps"},[T(a).apiKey.value?(C(),N("div",{key:1,ref_key:"mapEl",ref:n,class:"map"},null,512)):(C(),N("div",hT,gT)),yT],512))}}),wT=ke(CT,[["__scopeId","data-v-121cc5c9"]]),IT={class:"sidebarContainer"},xT=`
def handle_keydown(state, payload):
	# The payload is a dictionary containing the key code and modifier keys.
	# For example,
	# {
	#	"key": "ArrowDown",
	#	"ctrl_key": False,
	#	"shift_key": False,
	#	"meta_key": False
	# }

	key_activated = payload.get("key")
	delta = 0
	if key_activated == "ArrowLeft":
		delta += -10
	elif key_activated == "ArrowRight":
		delta += 10

	shift_key = payload.get("shift_key")
	if shift_key:
		delta *= 2 # Shift makes it go faster

	state["position"] += delta
`,kT=`
def handle_page_open(state, payload):
	page_key = payload
	state["message"] = f"The page {page_key} has been opened."
`,ST="A container component representing a single page within the application.",TT={writer:{name:"Page",category:"Root",events:{"wf-keydown":{desc:"Captures all key activity while this page is open.",stub:xT},"wf-page-open":{desc:"Emitted when the page is opened.",stub:kT}},description:ST,allowedChildrenTypes:["*"],allowedParentTypes:["root"],fields:{key:{name:"Page key",desc:"Unique identifier. It's needed to enable navigation to this Page.",type:L.IdKey},pageMode:{name:"Page mode",default:"compact",type:L.Text,options:{compact:"Compact",wide:"Wide"},category:Pe.Style},accentColor:Wt,primaryTextColor:Mt,secondaryTextColor:yn,emptinessColor:yp,containerBackgroundColor:zn,containerShadow:Mo,separatorColor:Vt,buttonColor:Kn,buttonTextColor:Wn,buttonShadow:Ia,cssClasses:Ye},previewField:"key"}},ET=Ie({...TT,__name:"CorePage",setup(e){const t=q(null),n=W(Y.evaluatedFields);function a(r){const s=X0(r);t.value.dispatchEvent(s)}function o(){const r=n.key.value,s=new CustomEvent("wf-page-open",{detail:{payload:r}});t.value.dispatchEvent(s)}return Ft(async()=>{document.addEventListener("keydown",a),o()}),Bn(()=>{document.removeEventListener("keydown",a)}),(r,s)=>(C(),N("div",{ref_key:"rootEl",ref:t,class:"CorePage"},[U("div",IT,[$t(r.$slots,"default",{slotName:"sidebar",positionlessSlot:!0},void 0,!0)]),U("div",{class:st(["main",{compact:T(n).pageMode.value=="compact",wide:T(n).pageMode.value=="wide"}]),"data-writer-container":""},[$t(r.$slots,"default",{},void 0,!0)],2)],512))}}),$T=ke(ET,[["__scopeId","data-v-ccb9cbc5"]]),MT=/^((?<pageKey>[^/]*))?(\/(?<routeVars>.*))?$/;function Jl(e=document.location.hash){var r;const n=(r=e.substring(1).match(MT))==null?void 0:r.groups,a=n!=null&&n.pageKey?decodeURIComponent(n.pageKey):void 0;if(!n)return{pageKey:a,routeVars:new Map};const o=new URLSearchParams(n.routeVars);return{pageKey:a,routeVars:new Map(o.entries())}}function NT(){const e=Jl(),t=Object.fromEntries(e.routeVars.entries());return{pageKey:e.pageKey,routeVars:t}}function OT(e){const{pageKey:t,routeVars:n}=e;let a="";if(t&&(a+=`${encodeURIComponent(t)}`),n.size>0){const o=new URLSearchParams([...n.entries()]);a+=`/${o.toString()}`}return a}function Xp(e){document.location.hash=OT(e)}function PT(e){const t=Jl();t.pageKey=e,Xp(t)}function b2(e){const t=Jl(),n=(t==null?void 0:t.routeVars)??{};t.routeVars=new Map(Object.entries({...n,...e})),Xp(t)}const LT=`
def handle_hashchange(state, payload):
	# The payload is a dictionary with the page key and all the route variables in the URL hash.
	# For example, if the current URL is http://localhost:3000/#main/animal=duck&colour=yellow
	# you will get the following dictionary
	# {
	#	  "page_key": "main",
	#	  "route_vars": {
	#		  "animal": "duck",
	#		  "colour": "yellow"
	#	  }
	# }

	page_key = payload.get("page_key")
	route_vars = payload.get("route_vars")

	if not route_vars:
		return

	if route_vars.get("animal") == "duck":
		state["message"] = "You've navigated to the Duck zone."
	else:
		state["message"] = "You're not in the Duck zone.`.trim(),RT=`
def handle_app_open(state):
	# The payload is a dictionary with the page key and all the route variables in the URL hash.
	# For example, if the current URL is http://localhost:3000/#/animal=duck&colour=yellow
	# you will get the following dictionary
	# {
	#   "page_key": "main",
	#	  "route_vars": {
	#		  "animal": "duck",
	#		  "colour": "yellow"
	#	  }
	# }

	page_key = payload.get("page_key")
	route_vars = payload.get("route_vars")
`.trim(),DT="The root component of the application, which serves as the starting point of the component hierarchy.",BT={writer:{name:"Root",category:"Root",description:DT,allowedChildrenTypes:["page"],fields:{appName:{name:"App name",type:L.Text,desc:"The app name will be shown in the browser's title bar."},...m0},events:{"wf-app-open":{desc:"Captures the first application load, including page key and route vars.",stub:RT},"wf-hashchange":{desc:"Capture changes to the URL hash, including page key and route vars.",stub:LT}}}},FT=Ie({...BT,__name:"CoreRoot",setup(e){const t=W(Y.core),n=W(Y.builderManager),a=W(Y.getChildrenVNodes),o=q(null),{isComponentVisible:r}=Ks(t),s=J(()=>{const c=t.activePageId.value;if(!!t.getComponentById(c)&&t.isChildOf("root",c))return c;const h=t.getComponents("root",{includeBMC:!0,includeCMC:!0,sortedByPosition:!0});if(h.length==0)return null;const f=h.filter(m=>r(m.id));return f.length==0?null:f[0].id});function l(){var h;const c=NT(),d=new CustomEvent("wf-hashchange",{detail:{payload:c}});(h=o.value)==null||h.dispatchEvent(d),c.pageKey&&t.setActivePageFromKey(c.pageKey)}return He(s,c=>{var f;const h=(f=t.getComponentById(c).content)==null?void 0:f.key;n&&n.getSelectedId()!==c&&n.setSelection(null),mn().then(()=>{var m,k;window.scrollTo(0,0),(k=(m=document.querySelector(".ComponentRenderer"))==null?void 0:m.parentElement)==null||k.scrollTo(0,0)}),PT(h)}),Eo(()=>{window.addEventListener("hashchange",()=>{l()}),l()}),(c,d)=>(C(),N("div",{ref_key:"rootEl",ref:o,class:"CoreRoot","data-writer-container":""},[(C(!0),N(Oe,null,mt(T(a)(),h=>(C(),N(Oe,{key:h.key},[h.key===`${s.value}:0`?(C(),Fe(mr(h),{key:0})):Ae("",!0)],64))),128))],512))}}),VT=ke(FT,[["__scopeId","data-v-409a0d25"]]),Ql=e=>(zt("data-v-ba331915"),e=e(),Kt(),e),UT={key:0,class:"noAccessTokenProvided"},HT=Ql(()=>U("h2",null,"MapBox cannot be initialised.",-1)),jT=Ql(()=>U("h3",null,"An access token hasn't been provided.",-1)),zT=[HT,jT],KT=Ql(()=>U("div",{class:"mask"},null,-1)),WT=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],GT={writer:{name:"Mapbox",description:"A component to embed a Mapbox map. It can be used to display a map with markers.",docs:"For this component you need Mapbox access token: https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",category:"Embed",fields:{accessToken:{name:"Access Token",default:"",desc:"Access token from Mapbox",type:L.Text},mapStyle:{name:"Map style",default:"mapbox://styles/mapbox/standard",type:L.Text,desc:"Map style URL"},zoom:{name:"Zoom",default:"8",type:L.Number},lat:{name:"Latitude",default:"37.79322359164316",type:L.Number},lng:{name:"Longitude",default:"-122.39999318828129",type:L.Number},markers:{name:"Markers",init:JSON.stringify(WT,null,2),desc:"",type:L.Object},controls:{name:"Controls visible",default:"yes",type:L.Text,options:{yes:"Yes",no:"No"},desc:"Show map controls"},cssClasses:Ye},events:{"mapbox-marker-click":{desc:"Capture single clicks on markers."},"mapbox-click":{desc:"Capture single click on map."}}}},YT=Ie({...GT,__name:"CoreMapbox",setup(e){const t=W(Y.evaluatedFields),n=q(null),a=q(null),o=J(()=>[t.lng.value,t.lat.value]),r=q(null);let s=[],l=null;const c=async()=>{if(!a.value||!t.accessToken.value)return;const h=await on(()=>import("./mapbox-gl-DSR29pDD.js").then(f=>f.m),[],import.meta.url);try{h.accessToken=t.accessToken.value,h.default&&(h.default.accessToken=t.accessToken.value),r.value=new h.Map({container:a.value,style:t.mapStyle.value,center:o.value,zoom:t.zoom.value}),r.value.on("click",f=>{const m=new CustomEvent("mapbox-click",{detail:{payload:{lat:f.lngLat.lat,lng:f.lngLat.lng}}});n.value.dispatchEvent(m)}),l=new h.NavigationControl,t.controls.value==="yes"&&r.value.addControl(l),t.markers.value&&r.value.on("load",d)}catch(f){console.error(f)}},d=async()=>{var f,m;if(!r.value)return;const h=await on(()=>import("./mapbox-gl-DSR29pDD.js").then(k=>k.m),[],import.meta.url);s.forEach(k=>k.remove()),s=[],(m=(f=t.markers)==null?void 0:f.value)==null||m.forEach(k=>{const S=new h.Marker().setLngLat([k.lng,k.lat]).addTo(r.value).setPopup(new h.Popup().setText(k.name));s.push(S),S.getElement().addEventListener("click",y=>{const b=new CustomEvent("mapbox-marker-click",{detail:{payload:k}});n.value.dispatchEvent(b),y.stopPropagation()})})};return He(t.controls,()=>{r.value&&(t.controls.value==="yes"?r.value.addControl(l):r.value.removeControl(l))}),He(t.markers,async()=>{r.value&&await d()}),He(t.mapStyle,()=>{r.value&&r.value.setStyle(t.mapStyle.value)}),He(o,()=>{var h,f;r.value&&((h=o.value)!=null&&h.lat)&&((f=o.value)!=null&&f.lng)&&r.value.setCenter(o.value)}),He(t.zoom,()=>{r.value&&t.zoom.value&&r.value.setZoom(t.zoom.value)}),He([a,t.accessToken],()=>{c()}),(h,f)=>(C(),N("div",{ref_key:"rootEl",ref:n,class:"CoreMapbox"},[T(t).accessToken.value?(C(),N("div",{key:1,ref_key:"mapEl",ref:a,class:"map"},null,512)):(C(),N("div",UT,zT)),KT],512))}}),JT=ke(YT,[["__scopeId","data-v-ba331915"]]);function QT(e,t){const{type:n}=e[t],r=Zl().map(l=>({type:l,definition:pr(l)})).filter(l=>l.definition.allowedParentTypes&&!l.definition.allowedParentTypes.includes(n));return new Set(r.map(l=>l.type))}function qT(e,t){const{type:n,parentId:a}=e[t],o=Zl().filter(c=>c!=="root"&&c!=="workflows_root"),{allowedChildrenTypes:r,toolkit:s}=pr(n);if(!r)return new Set([]);let l=new Set(r);if(r.includes("*")&&(l=new Set([...l,...o])),l.delete("inherit")){if(!a)return l;const c=ql(e,a);l=new Set([...l,...c])}return s&&(l=new Set(Array.from(l).filter(c=>pr(c).toolkit==s))),l}function ql(e,t){const n=Array.from(qT(e,t)),a=Array.from(QT(e,t));return n.filter(r=>!a.includes(r))}function Zp(e,t){function n(){let R="";const B=new Uint16Array(16);return window.crypto.getRandomValues(B),B.forEach(K=>{R+=(K%36).toString(36)}),R}function a($){const R=e.getComponentById($);if(!R)return;const B=R.position;if(B==0)return;const K=e.getComponentById(R.parentId);if(!K)return;const X=e.getComponents(K.id,{includeBMC:!0,includeCMC:!1}).filter(_=>_.position==B-1)[0],Se=`move-up-${$}`;t.openMutationTransaction(Se,"Move up"),t.registerPreMutation(X),X.position++,t.registerPostMutation(X),t.registerPreMutation(R),R.position--,t.registerPostMutation(R),t.closeMutationTransaction(Se),e.sendComponentUpdate()}function o($){const R=e.getComponentById($);if(!R)return;const B=e.getComponentById(R.parentId);if(!B)return;const K=R.position;if(K==-2)return;const X=e.getComponents(B.id,{includeBMC:!0,includeCMC:!1}).filter(M=>M.position!==-2);if(K>=X.length-1)return;const Se=X.filter(M=>M.position==K+1)[0],_=`move-down-${$}`;t.openMutationTransaction(_,"Move down"),t.registerPreMutation(Se),Se.position--,t.registerPostMutation(Se),t.registerPreMutation(R),R.position++,t.registerPostMutation(R),t.closeMutationTransaction(_),e.sendComponentUpdate()}function r($,R,B){const K=e.getComponentById($);if(!K)return;const X=e.getComponentById(K.parentId);if(!X||$==R||X.id==R&&B===null)return;const Se=`move-${$}`;t.openMutationTransaction(Se,"Move"),t.registerPreMutation(K),c($,-1),K.position=B??ue(R,K.type),K.parentId=R,c($,1),t.registerPostMutation(K),t.closeMutationTransaction(Se),e.sendComponentUpdate()}function s($,R,B,K){const X=n(),Se=e.getComponentDefinition($),{fields:_}=Se,M={};return Object.entries(_??{}).map(([te,re])=>{M[te]=re.init}),{...K??{},id:X,type:$,parentId:R,content:M,handlers:{},position:B??ue(R,$)}}function l($,R,B,K){const X=s($,R,B,K),Se=`create-${X.id}`;return t.openMutationTransaction(Se,"Create"),e.addComponent(X),c(X.id,1),t.registerPostMutation(X),t.closeMutationTransaction(Se),e.sendComponentUpdate(),X.id}function c($,R){const B=e.getComponentById($);if(e.getComponentDefinition(B.type).positionless)return;e.getComponents(B.parentId,{includeBMC:!0,includeCMC:!1}).filter(_=>_.id!==$).filter(_=>_.position>=B.position).map(_=>{t.registerPreMutation(_),_.position+=R,t.registerPostMutation(_)})}function d($){const R=e.getComponentById($),B=[],K=X=>{const Se=e.getComponents(X.id);B.push(X),Se.map(_=>K(_))};return K(R),B}function h($){return e.getComponents().filter(R=>{var B;return(B=R.outs)==null?void 0:B.find(K=>K.toNodeId==$)})}function f($){const R=e.getComponentById($);if(!R)return;const B=e.getComponentById($).parentId,K=`delete-${$}`;t.openMutationTransaction(K,"Delete"),B&&c(R.id,-1),h($).map(_=>{t.registerPreMutation(_),_.outs=[..._.outs.filter(M=>M.toNodeId!==$)]}),d($).map(_=>{t.registerPreMutation(_),e.deleteComponent(_.id)}),t.closeMutationTransaction(K),e.sendComponentUpdate()}function m($){return $=="root"}function k($){const R=e.getComponentById($);return!m($)&&!(R!=null&&R.isCodeManaged)}function S($){const R=e.getComponentById($);return!(R!=null&&R.isCodeManaged)&&e.getContainableTypes($).length>0}function y($){return!m($)}function b($){const R=e.getComponentById($);return!m($)&&!(R!=null&&R.isCodeManaged)}function O($){const R=e.getComponentById($);return!m($)&&!(R!=null&&R.isCodeManaged)}function I($){return!m($)}function g($,R){const B=e.getComponentById($);if(!B)return;const K=B.parentId;if(!K)return;let X;R&&(X=R.split(",").slice(0,-1).join(",")),t.setSelection(K,X)}function p($){if($.length==0)return!1;const R={};return[...e.getComponents(),...$].forEach(K=>{R[K.id]=K}),$.map(K=>ql(R,K.parentId).includes(K.type)).every(K=>K)}function A($){const R=e.getComponentById($);if(!R||R.isCodeManaged)return!1;const B=t.getClipboard();if(B===null)return!1;const{jsonSubtree:K}=B,X=JSON.parse(K);return X.length==0?!1:(X[0].parentId=$,p(X))}function w($){const R=M=>e.getComponents(M,{includeBMC:!0,includeCMC:!1}).filter(re=>{var xe;return!((xe=e.getComponentDefinition(re.type))==null?void 0:xe.positionless)}).length,B=e.getComponentById($);if(!B||B.isCodeManaged)return{up:!1,down:!1};if(e.getComponentDefinition(B.type).positionless)return{up:!1,down:!1};const X=B.parentId?R(B.parentId):0,Se=X>0&&B.position>0,_=X>0&&B.position<X-1;return{up:Se,down:_}}function V($){e.getComponentById($)&&(t.setClipboard({operation:fo.Cut,jsonSubtree:JSON.stringify(d($))}),t.setSelection(null),f($),e.sendComponentUpdate())}function j($){const R=JSON.parse(JSON.stringify($));return R.forEach(B=>{delete B.isCodeManaged;const K=n();R.filter(X=>X.id!==B.id).map(X=>{var Se;X.parentId==B.id&&(X.parentId=K),(Se=X.outs)==null||Se.forEach(_=>{_.toNodeId==B.id&&(_.toNodeId=K)})}),B.id=K,typeof B.x<"u"&&typeof B.y<"u"&&(B.x+=36,B.y+=36)}),R}function ee($){if(!e.getComponentById($))return;const B=d($),K=j(B);t.setClipboard({operation:fo.Copy,jsonSubtree:JSON.stringify(K)})}function se($){if(!e.getComponentById($))return;const B=t.getClipboard();if(B===null)return;const{operation:K,jsonSubtree:X}=B,Se=JSON.parse(X),_=Se[0];if(typeof _.outs<"u"&&_.parentId!==$&&(_.outs=[]),K==fo.Cut)return le($,Se);if(K==fo.Copy)return ae($,Se)}function le($,R){t.setClipboard(null);const B=R[0];B.parentId=$,B.position=ue($,B.type);const K=`paste-cut-${$}`;t.openMutationTransaction(K,"Paste from cut"),R.map(X=>{e.addComponent(X),t.registerPostMutation(X)}),t.closeMutationTransaction(K),e.sendComponentUpdate()}function ae($,R){t.setClipboard({operation:fo.Copy,jsonSubtree:JSON.stringify(j(R))});const B=R[0];B.parentId=$,B.position=ue($,B.type);const K=`paste-copy-${$}`;t.openMutationTransaction(K,"Paste from copy"),R.map(X=>{e.addComponent(X),t.registerPostMutation(X)}),t.closeMutationTransaction(K),e.sendComponentUpdate()}function ue($,R){if(e.getComponentDefinition(R).positionless)return-2;const K=e.getComponents($,{includeBMC:!0,includeCMC:!1}).filter(X=>X.position!==-2);return K.length>0?Math.max(Math.max(...K.map(Se=>Se.position))+1,0):0}function Ce(){var R,B;const $=t.getMutationTransactionsSnapshot();return{isUndoAvailable:!!$.undo,isRedoAvailable:!!$.redo,undoDesc:(R=$.undo)==null?void 0:R.desc,redoDesc:(B=$.redo)==null?void 0:B.desc}}function Re(){const $=t.consumeUndoTransaction();$&&(Object.entries($.mutations).forEach(([R,B])=>{if(B.jsonPre&&B.jsonPost){e.addComponent(JSON.parse(B.jsonPre));return}if(!B.jsonPre&&B.jsonPost){e.deleteComponent(R);return}if(B.jsonPre&&!B.jsonPost){e.addComponent(JSON.parse(B.jsonPre));return}}),e.sendComponentUpdate())}function pe(){const $=t.consumeRedoTransaction();$&&(Object.entries($.mutations).forEach(([R,B])=>{if(B.jsonPre&&B.jsonPost){e.addComponent(JSON.parse(B.jsonPost));return}if(!B.jsonPre&&B.jsonPost){e.addComponent(JSON.parse(B.jsonPost));return}if(B.jsonPre&&!B.jsonPost){e.deleteComponent(R);return}}),e.sendComponentUpdate())}function he($,R,B){const K=e.getComponentById($);if(!K)return;const X=`edit-${$}-content-${R}`;t.openMutationTransaction(X,"Edit property",!0),t.registerPreMutation(K),K.content[R]=B,t.registerPostMutation(K),t.closeMutationTransaction(X),e.sendComponentUpdate()}function de($,R){const B=e.getComponentById($);if(!B)return;const K=`add-${$}-out-${R.outId}-${R.toNodeId}`;t.openMutationTransaction(K,"Add out",!0),t.registerPreMutation(B),B.outs=[...B.outs??[],R],t.registerPostMutation(B),t.closeMutationTransaction(K),e.sendComponentUpdate()}function Le($,R){const B=e.getComponentById($);if(!B)return;const K=`edit-${$}-out-${R.outId}-${R.toNodeId}`;t.openMutationTransaction(K,"Edit out",!0),t.registerPreMutation(B),B.outs=B.outs.filter(X=>!(R.outId===X.outId&&R.toNodeId===X.toNodeId)),t.registerPostMutation(B),t.closeMutationTransaction(K),e.sendComponentUpdate()}function kt($,R,B){const K=e.getComponentById($);if(!K)return;const X=`change-${$}-coordinates`;t.openMutationTransaction(X,"Change coordinates",!1),t.registerPreMutation(K),K.x=Math.floor(R),K.y=Math.floor(B),t.registerPostMutation(K),t.closeMutationTransaction(X),e.sendComponentUpdate()}function qe($){const R="change-multiple-coordinates";t.openMutationTransaction(R,"Change coordinates",!1);const B=Object.entries($);B.length!=0&&(B.forEach(([K,{x:X,y:Se}])=>{const _=e.getComponentById(K);_&&(t.registerPreMutation(_),_.x=Math.floor(X),_.y=Math.floor(Se),t.registerPostMutation(_))}),t.closeMutationTransaction(R),e.sendComponentUpdate())}function Ct($,R,B="",K=!1){const X=e.getComponentById($);if(!X)return;const Se=`change-visibility-${$}`;t.openMutationTransaction(Se,"Change visibility",!0),t.registerPreMutation(X),X.visible==null&&(X.visible={expression:!0,binding:"",reversed:!1}),typeof R=="boolean"?X.visible.expression=R:R=="custom"&&(X.visible={expression:"custom",binding:B,reversed:K}),t.registerPostMutation(X),t.closeMutationTransaction(Se),e.sendComponentUpdate()}function $e($,R,B){const K=e.getComponentById($);if(!K)return;let X;if(B)X=B;else{const _=e.getComponentDefinition(K.type),Q=Object.entries(_.events).filter(([te,re])=>re.bindable).map(([te,re])=>te);X=Q==null?void 0:Q[0]}if(!X)return;const Se=`change-binding-${$}`;t.openMutationTransaction(Se,"Change binding",!0),t.registerPreMutation(K),R?K.binding={eventType:X,stateRef:R}:delete K.binding,t.registerPostMutation(K),t.closeMutationTransaction(Se),e.sendComponentUpdate()}function Ke($,R,B){const K=e.getComponentById($);if(!K)return;const X=`set-handler-${$}`;t.openMutationTransaction(X,"Set event handler",!0),t.registerPreMutation(K),B?(K.handlers||(K.handlers={}),K.handlers[R]=B):(delete K.handlers[R],Object.keys(K.handlers).length==0&&delete K.handlers),t.registerPostMutation(K),t.closeMutationTransaction(X),e.sendComponentUpdate()}function at($){const R=e.getComponentById($);return!R||R.type=="root"?null:R.type=="page"||R.type=="workflows_workflow"?$:at(R.parentId)}async function Xe($){var K;const R=e.getComponentById($);(K=e.getComponentDefinition(R.type))!=null&&K.name&&e.setActivePageId(at($))}return{moveComponent:r,moveComponentUp:a,moveComponentDown:o,cutComponent:V,copyComponent:ee,pasteComponent:se,createAndInsertComponent:l,removeComponentSubtree:f,isPasteAllowed:A,undo:Re,redo:pe,setContentValue:he,addOut:de,removeOut:Le,changeCoordinates:kt,changeCoordinatesMultiple:qe,setVisibleValue:Ct,setBinding:$e,getUndoRedoSnapshot:Ce,setHandlerValue:Ke,isAddAllowed:S,isCopyAllowed:y,isCutAllowed:b,isDeleteAllowed:O,isGoToParentAllowed:I,isDraggingAllowed:k,getEnabledMoves:w,goToParent:g,goToComponentParentPage:Xe}}const XT=30,ZT=/^application\/json;writer=(?<componentType>\w+),(?<componentId>[\w\-]*)$/,Go=q(null),Qn=q(null),as=q(!1);let Ui=null,os=null;function eE(e){function t(b){var g;const O=b.dataTransfer.types[0],I=(g=O==null?void 0:O.match(ZT))==null?void 0:g.groups;if(I)return{draggedType:I.componentType,draggedId:I.componentId}}function n(b){const g=(b.closest("[data-writer-cage]")??b).closest("[data-writer-id]");if(g)return g.dataset.writerId}function a(b){const O=t(b);if(!O)return;const{draggedType:I,draggedId:g}=O,p=n(b.target);if(!r(p,g,I))return;const w={draggedType:I,draggedId:g,parentId:Go.value,position:os};return y(b),w}function o(b,O,I){const g=e.getComponentById(b);if(!g)return!1;const p=e.getContainableTypes(b);return!(g!=null&&g.isCodeManaged)&&!e.isChildOf(O,b)&&p.includes(I)}function r(b,O,I){const g=e.getComponentById(b);if(g)return o(b,O,I)?b:g.parentId?r(g.parentId,O,I):null}function s(b){if(as.value){c(b);return}l(b)}function l(b){const O=t(b);if(!O)return;const{draggedType:I,draggedId:g}=O,p=b.target,A=n(p),w=r(A,g,I);if(!w||w==g)return;const j=p.closest(`[data-writer-id="${w}"]`).dataset.writerInstancePath;if(b.preventDefault(),Qn.value!==j)Ui=Date.now();else if(Date.now()-Ui>=d0){as.value=!0,m(Qn.value);return}Go.value=w,Qn.value=j}function c(b){const O=t(b);if(!O)return;b.preventDefault();const I=document.querySelector(`[data-writer-instance-path="${Qn.value}"]`);if(f(b.clientX,b.clientY,I)>XT){y(b);return}const g=d(Qn.value);if(g.length==0)return;const p=h(b.clientX,b.clientY,g);if(!p)return;const{el:A}=p,{draggedId:w}=O,V=parseInt(A.dataset.writerPosition),j=e.getComponentById(w);if(g.map(ee=>{ee.classList.contains("highlighted")&&ee.classList.remove("highlighted")}),!A.classList.contains("highlighted")){if(A.classList.add("highlighted"),j&&j.parentId==Go.value&&V>j.position){os=V-1;return}os=V}}function d(b){const O=S(b);return Array.from(O.querySelectorAll("[data-writer-position]"))}function h(b,O,I){const g=I.map(p=>({el:p,distance:f(b,O,p)})).sort((p,A)=>p.distance>A.distance?1:-1);return g==null?void 0:g[0]}function f(b,O,I){const{top:g,left:p,right:A,bottom:w}=I.getBoundingClientRect(),V=Math.max(p-b,0,b-A),j=Math.max(g-O,0,O-w);return Math.sqrt(V*V+j*j)}function m(b){S(b).classList.add("crackedContainer")}function k(b){S(b).classList.remove("crackedContainer")}function S(b){const O=document.querySelector(`[data-writer-instance-path="${b}"]`);if(O.hasAttribute("data-writer-container"))return O;const I=O.querySelectorAll("[data-writer-container]");for(let g=0;g<I.length;g++){const p=I[g];if(p.closest("[data-writer-instance-path]")==O)return p}}function y(b){b.preventDefault(),Qn.value&&(k(Qn.value),Qn.value=null),Go.value=null,Ui=null,os=null,as.value=!1}return{candidateId:Go,candidateInstancePath:Qn,isParentSuitable:o,isCandidacyConfirmed:as,getComponentInfoFromDrag:t,dropComponent:a,assignInsertionCandidacy:s,removeInsertionCandidacy:y}}const tE=["d"],nE=["d"],aE=["cx","cy"],oE=["x1","y1","x2","y2","stroke"],rE=["x1","y1","x2","y2","stroke"],Yo=30,sE=Ie({__name:"WorkflowArrow",props:{arrow:{},isSelected:{type:Boolean},isEngaged:{type:Boolean}},emits:["delete"],setup(e,{emit:t}){const n=t,a=e,o=J(()=>{const l=a.arrow.x2-a.arrow.x1,c=a.arrow.y2-a.arrow.y1;return[{x:a.arrow.x1,y:a.arrow.y1},{x:a.arrow.x1+Yo,y:a.arrow.y1},{x:a.arrow.x1+Yo,y:a.arrow.y1+c*.25},{x:a.arrow.x1+l*.5,y:a.arrow.y1+c*.5},{x:a.arrow.x2-Yo,y:a.arrow.y1+c*.75},{x:a.arrow.x2-Yo,y:a.arrow.y2},{x:a.arrow.x2,y:a.arrow.y2}]}),r=J(()=>{const l=a.arrow.x2-a.arrow.x1,c=o.value;let d;return l>Yo?(d=`M ${c[0].x} ${c[0].y}`,d+=`C ${c[3].x} ${c[0].y}, ${c[3].x} ${c[6].y}, ${c[6].x} ${c[6].y}`):(d=`M ${c[0].x} ${c[0].y}`,d+=`C ${c[1].x} ${c[1].y}, ${c[2].x} ${c[2].y}, ${c[3].x} ${c[3].y}`,d+=`C ${c[4].x} ${c[4].y}, ${c[5].x} ${c[5].y}, ${c[6].x} ${c[6].y}`),d});function s(){n("delete")}return(l,c)=>(C(),N("g",{class:st(["WorkflowArrow",{engaged:l.isEngaged}]),tabindex:"0","data-writer-unselectable":"true"},[U("path",{d:r.value,style:it({stroke:l.arrow.color})},null,12,tE),U("path",{d:r.value,style:it({stroke:l.arrow.color,strokeWidth:12,opacity:l.isSelected?"0.2":"0"})},null,12,nE),l.isSelected?(C(),N("g",{key:0,class:"delete",tabindex:"0","aria-label":"Delete relation",onClick:s,onKeydown:Ca(s,["enter"])},[U("circle",{cx:o.value[3].x,cy:o.value[3].y,r:"12"},null,8,aE),U("line",{class:"cross",x1:o.value[3].x-4,y1:o.value[3].y-4,x2:o.value[3].x+4,y2:o.value[3].y+4,stroke:l.arrow.color,"stroke-width":"2"},null,8,oE),U("line",{class:"cross",x1:o.value[3].x+4,y1:o.value[3].y-4,x2:o.value[3].x-4,y2:o.value[3].y+4,stroke:l.arrow.color,"stroke-width":"2"},null,8,rE)],32)):Ae("",!0)],2))}}),Ad=ke(sE,[["__scopeId","data-v-c436de5e"]]),iE=Ie({__name:"WorkflowMiniMap",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset"],setup(e,{emit:t}){Za(I=>({"01836b8c":`${c.value.width}px`,"3672fc92":`${c.value.height}px`,"75233e20":d.value.isDisplayed?"":"none"}));const n=W(Y.builderManager),a=q(null),o=t,r=new ResizeObserver(k),s=new MutationObserver(k),l=q(.2),c=q({width:166,height:100}),d=q({width:260,height:1,top:0,left:0,isDisplayed:!1}),h=q({width:1,height:1,top:0,left:0}),f=e,m=q([]);function k(){if(!f.nodeContainerEl)return;const I=Array.from(f.nodeContainerEl.querySelectorAll("[data-writer-id]")),g=f.nodeContainerEl.getBoundingClientRect();let p=0,A=0;m.value=I.map(w=>{const V=w.getBoundingClientRect();return p=Math.max(p,V.right+f.renderOffset.x*f.zoomLevel-g.left),A=Math.max(A,V.bottom+f.renderOffset.y*f.zoomLevel-g.top),{id:w.dataset.writerId,width:V.width,height:V.height,top:V.top+f.renderOffset.y*f.zoomLevel-g.top,left:V.left+f.renderOffset.x*f.zoomLevel-g.left}}),c.value={width:260,height:g.height/g.width*g.width/7},l.value=Math.min(c.value.width/(g.width+300),c.value.height/(g.height+300),c.value.width/(p+300),c.value.height/(A+300),c.value.width/(f.renderOffset.x*f.zoomLevel+g.width),c.value.height/(f.renderOffset.y*f.zoomLevel+g.height)),h.value={top:f.renderOffset.y*f.zoomLevel,left:f.renderOffset.x*f.zoomLevel,width:g.width,height:g.height},d.value={...h.value,isDisplayed:d.value.isDisplayed}}function S(I){const g=f.nodeContainerEl.getBoundingClientRect(),p=a.value.getBoundingClientRect();d.value={...d.value,top:Math.min(Math.max(0,(I.pageY-p.top)*(1/l.value)-g.height/2),p.height*(1/l.value)-g.height),left:Math.min(Math.max(0,(I.pageX-p.left)*(1/l.value)-g.width/2),p.width*(1/l.value)-g.width)}}function y(){d.value.isDisplayed=!0}function b(){d.value.isDisplayed=!1}function O(I){I.stopPropagation(),n.setSelection(null),o("changeRenderOffset",{x:d.value.left*(1/f.zoomLevel),y:d.value.top*(1/f.zoomLevel)})}return Ft(async()=>{r.observe(f.nodeContainerEl),s.observe(f.nodeContainerEl,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style"]}),await mn(),k()}),Bn(()=>{r.disconnect(),s.disconnect()}),(I,g)=>(C(),N("div",{ref_key:"rootEl",ref:a,class:"WorkflowMiniMap",onMouseenter:y,onMouseleave:b,onMousemove:S,onClick:O},[U("div",{class:"selectedArea",style:it({top:`${h.value.top*l.value}px`,left:`${h.value.left*l.value}px`,width:`${h.value.width*l.value}px`,height:`${h.value.height*l.value}px`})},null,4),U("div",{class:"selector",style:it({top:`${d.value.top*l.value}px`,left:`${d.value.left*l.value}px`,width:`${d.value.width*l.value}px`,height:`${d.value.height*l.value}px`})},null,4),(C(!0),N(Oe,null,mt(m.value,p=>(C(),N("div",{key:p.id,class:st(["node",{selected:T(n).getSelectedId()==p.id}]),style:it({top:`${p.top*l.value}px`,left:`${p.left*l.value}px`,width:`${p.width*l.value}px`,height:`${p.height*l.value}px`})},null,6))),128))],544))}}),lE=ke(iE,[["__scopeId","data-v-395ff1b5"]]);function cE(){var t;return((t=navigator==null?void 0:navigator.userAgentData)==null?void 0:t.platform)||(navigator==null?void 0:navigator.platform)}function Cd(){return th()?"⌘ ":"Ctrl+"}function eh(e){return th()?e.metaKey:e.ctrlKey}function th(){return cE().toLowerCase().indexOf("mac")!=-1}const Cr=e=>(zt("data-v-a8f8cd44"),e=e(),Kt(),e),uE={class:"bar"},dE={class:"autoArranger"},fE=Cr(()=>U("i",{class:"material-symbols-outlined"},"apps",-1)),pE={class:"zoomer"},hE=Cr(()=>U("i",{class:"material-symbols-outlined"},"remove",-1)),vE=Cr(()=>U("i",{class:"material-symbols-outlined"},"add",-1)),mE=Cr(()=>U("i",{class:"material-symbols-outlined"},"undo",-1)),gE={class:"miniMapCollapser"},yE=Cr(()=>U("i",{class:"material-symbols-outlined"},"close_fullscreen",-1)),wd=.01,rs=.2,_E=Ie({__name:"WorkflowNavigator",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset","changeZoomLevel","resetZoom","autoArrange"],setup(e,{emit:t}){const n=e,{zoomLevel:a}=kl(n),o=q(null),r=t,s=q(!0),l=q(c(a.value));function c(I){return`${Math.floor(I*100)}%`}function d(){s.value=!s.value}function h(I){r("autoArrange")}function f(I){r("changeRenderOffset",I)}function m(){const I=a.value+rs;r("changeZoomLevel",I)}function k(){const I=a.value-rs;r("changeZoomLevel",I)}function S(I){const g=I.key;let p=a.value;if(g=="ArrowUp")p+=wd;else if(g=="ArrowDown")p-=wd;else return;r("changeZoomLevel",p)}function y(I){var A;const g=(A=I.target)==null?void 0:A.value;let p=parseInt(g)/100;isNaN(p)&&(p=1),l.value=c(p),r("changeZoomLevel",p)}function b(){r("resetZoom")}He(a,I=>{l.value=c(I)});function O(I){if(eh(I)===!1)return;let g=a.value;if(I.key=="+"||I.key=="=")I.preventDefault(),g+=rs;else if(I.key=="-")I.preventDefault(),g-=rs;else return;r("changeZoomLevel",g)}return Ft(()=>{document.addEventListener("keydown",O)}),Bn(()=>{document.removeEventListener("keydown",O)}),(I,g)=>(C(),N("div",{ref_key:"rootEl",ref:o,"data-writer-unselectable":"true",class:"WorkflowNavigator",onKeydown:O},[I.nodeContainerEl&&s.value?(C(),Fe(lE,{key:0,"node-container-el":I.nodeContainerEl,"render-offset":I.renderOffset,"zoom-level":T(a),class:"miniMap",onChangeRenderOffset:f},null,8,["node-container-el","render-offset","zoom-level"])):Ae("",!0),U("div",uE,[U("div",dE,[je(Hn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Auto arrange blocks","data-writer-tooltip-placement":"left",onClick:h},{default:Ge(()=>[fE]),_:1})]),U("div",pE,[je(Hn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":T(a)>T(Ra).minLevel?`Zoom out (${T(Cd)()}-)`:"Can't zoom further","data-writer-tooltip-placement":"left",onClick:k},{default:Ge(()=>[hE]),_:1},8,["data-writer-tooltip"]),je(bp,{modelValue:l.value,"onUpdate:modelValue":g[0]||(g[0]=p=>l.value=p),class:"zoomLevelInput",onKeydown:S,onChange:y},null,8,["modelValue"]),je(Hn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":T(a)<T(Ra).maxLevel?`Zoom in (${T(Cd)()}+)`:"Can't zoom further","data-writer-tooltip-placement":"right",onClick:m},{default:Ge(()=>[vE]),_:1},8,["data-writer-tooltip"]),je(Hn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Reset zoom","data-writer-tooltip-placement":"right",onClick:b},{default:Ge(()=>[mE]),_:1})]),U("div",gE,[je(Hn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":s.value?"Close minimap":"Open minimap","data-writer-tooltip-placement":"right",onClick:d},{default:Ge(()=>[yE]),_:1},8,["data-writer-tooltip"])])])],544))}}),bE=ke(_E,[["__scopeId","data-v-a8f8cd44"]]),AE=e=>(zt("data-v-3e6a919a"),e=e(),Kt(),e),CE=["data-writer-unselectable"],wE={class:"workflowsToolbar"},IE=AE(()=>U("i",{class:"material-symbols-outlined"},"play_arrow",-1)),xE="A container component representing a single workflow within the application.",kE={writer:{name:"Workflow",toolkit:"workflows",category:"Root",description:xE,allowedChildrenTypes:["*"],allowedParentTypes:["workflows_root"],fields:{key:{name:"Workflow key",desc:"Unique identifier. It's needed to enable navigation to this Workflow.",type:L.IdKey}}}},Ra={minLevel:.2,maxLevel:1,step:.25,initialLevel:1},SE=Ie({...kE,__name:"WorkflowsWorkflow",setup(e){Za(H=>({b5b73004:f.value}));const t=W(Y.renderProxiedComponent),n=W(Y.componentId),a=q(null),o=q(null),r=W(Y.core),s=W(Y.builderManager),l=q([]),c=q({x:0,y:0}),d=q(!1),h=q(null),f=q(Ra.initialLevel),m=new MutationObserver(se),k=q({}),S=96,y=128,b=J(()=>r.getComponents(n,{sortedByPosition:!0})),{createAndInsertComponent:O,addOut:I,removeOut:g,changeCoordinates:p,changeCoordinatesMultiple:A}=Zp(r,s),{getComponentInfoFromDrag:w}=eE(r),V=q(null),j=q(null),ee=q(null);function se(){const H=[];b.value.filter(Z=>{var oe;return((oe=Z.outs)==null?void 0:oe.length)>0}).forEach(Z=>{const oe=Z.id;Z.outs.forEach(ie=>{const Te=Ke(oe,ie.outId,void 0,ie.toNodeId);Te&&H.push(Te)})}),l.value=H}const le=J(()=>{var H,Z;return V.value===null&&!((H=j.value)!=null&&H.isPerfected)&&!((Z=ee.value)!=null&&Z.isPerfected)?null:!0});function ae(){h.value=null}function ue(){const H=new Map;function Z(ie,Te){var We;H.forEach(Ze=>{Ze.has(ie)&&Ze.delete(ie)}),H.has(Te)||H.set(Te,new Set),H.get(Te).add(ie),(We=ie.outs)==null||We.forEach(Ze=>{const lt=r.getComponentById(Ze.toNodeId);Z(lt,Te+1)})}const oe=new Map;return b.value.forEach(ie=>{var Te;(Te=ie.outs)==null||Te.forEach(Ne=>{oe.has(Ne.toNodeId)||oe.set(Ne.toNodeId,new Set),oe.get(Ne.toNodeId).add(ie.id)})}),b.value.filter(ie=>!oe.has(ie.id)).forEach(ie=>{Z(ie,0)}),H}function Ce(H){const Z=new Map,oe=new Map;return H.forEach((ie,Te)=>{let Ne=0,We=0;ie.forEach(Ze=>{const lt=o.value.querySelector(`[data-writer-id="${Ze.id}"]`);if(!lt)return;const St=lt.getBoundingClientRect();oe.set(Ze.id,{height:St.height*(1/f.value)}),Ne+=St.height*(1/f.value)+S,We=Math.max(We,St.width*(1/f.value))}),Z.set(Te,{height:Ne-S,width:We})}),{columnDimensions:Z,nodeDimensions:oe}}function Re(){const H=ue(),{columnDimensions:Z,nodeDimensions:oe}=Ce(H),ie=Math.max(...Array.from(Z.values()).map(We=>We.height)),Te={};let Ne=y;for(let We=0;We<H.size;We++){const Ze=Array.from(H.get(We)).sort((Pt,wt)=>Pt.y>wt.y?1:-1),{width:lt,height:St}=Z.get(We);let Et=(ie-St)/2+S;Ze.forEach(Pt=>{Te[Pt.id]={x:Ne,y:Et},Et+=oe.get(Pt.id).height+S}),Ne+=lt+y}A(Te)}async function pe(){d.value||(d.value=!0,await r.forwardEvent(new CustomEvent("wf-builtin-run",{detail:{callback:()=>{d.value=!1},handler:`$runWorkflowById_${n}`}}),null,!1))}function he(H,Z){$();const ie=document.querySelector(`[data-writer-id="${Z}"]`).getBoundingClientRect(),Te=(H.pageX-ie.x)*(1/f.value),Ne=(H.pageY-ie.y)*(1/f.value);j.value={nodeId:Z,offset:{x:Te,y:Ne},isPerfected:!1}}function de(H,Z){V.value={fromNodeId:H,fromOutId:Z}}function Le(H){H.preventDefault(),H.stopPropagation()}function kt(H){const Z=a.value.getBoundingClientRect(),oe=c.value.x+(H.pageX-Z.x)*(1/f.value),ie=c.value.y+(H.pageY-Z.y)*(1/f.value);return{x:oe,y:ie}}function qe(H){H.preventDefault(),H.stopPropagation();const Z=w(H);if(!Z)return;const{draggedType:oe,draggedId:ie}=Z;if(ie)return;const{x:Te,y:Ne}=kt(H);Te<0||Ne<0||M(oe,Te,Ne)}function Ct(H,Z){if(h.value==Z){h.value=null;return}H.stopPropagation(),h.value=Z,s.setSelection(null)}async function $e(H){if(!H.toNodeId)return;const Z={outId:H.fromOutId,toNodeId:H.toNodeId};g(H.fromNodeId,Z)}function Ke(H,Z,oe,ie){var Pt;let Te,Ne,We,Ze;const lt=(Pt=a.value)==null?void 0:Pt.getBoundingClientRect();if(!lt)return;We=((oe==null?void 0:oe.x)-lt.x)*(1/f.value),Ze=((oe==null?void 0:oe.y)-lt.y)*(1/f.value);const St=document.querySelector(`[data-writer-id="${H}"] [data-writer-socket-id="${Z}"]`);if(!St)return;const Et=St.getBoundingClientRect();if(Te=(Et.x-lt.x+Et.width/2)*(1/f.value),Ne=(Et.y-lt.y+Et.height/2)*(1/f.value),!!St){if(typeof ie<"u"){const Ut=document.querySelector(`[data-writer-id="${ie}"]`).getBoundingClientRect();We=(Ut.x-lt.x)*(1/f.value),Ze=(Ut.y-lt.y+Ut.height/2)*(1/f.value)}return{x1:Te,y1:Ne,x2:We,y2:Ze,color:getComputedStyle(St).backgroundColor,fromNodeId:H,fromOutId:Z,toNodeId:ie}}}function at(H){const oe=H.target.closest(".WorkflowsWorkflow [data-writer-id]");return oe==null?void 0:oe.dataset.writerId}function Xe(H){let Z,oe;oe=at(H),typeof oe>"u"&&(Z={x:H.pageX,y:H.pageY});const{fromNodeId:ie,fromOutId:Te}=V.value;oe!=ie&&(V.value.liveArrow=Ke(ie,Te,Z,oe))}function $(){ee.value=null,V.value=null,j.value=null}function R(){var Te;const{nodeId:H}=j.value,Z=(Te=k.value)==null?void 0:Te[H];if(!Z)return;const{x:oe,y:ie}=Z;p(H,oe,ie),k.value[H]=null}function B(H){const{nodeId:Z,offset:oe}=j.value;j.value.isPerfected=!0;const{x:ie,y:Te}=kt(H),Ne=Math.floor(ie-oe.x),We=Math.floor(Te-oe.y);k.value[Z]={x:Ne,y:We}}function K(H){const Z=a.value.getBoundingClientRect(),oe=H.pageX-Z.x,ie=H.pageY-Z.y,{x:Te,y:Ne}=ee.value.offset;ee.value.isPerfected=!0,ee.value.offset={x:oe,y:ie},xe(c.value.x+(Te-oe)*1*(1/f.value),c.value.y+(Ne-ie)*1*(1/f.value))}function X(H){if(H.buttons==1){if(V.value){Xe(H);return}if(j.value){B(H);return}if(ee.value){K(H);return}}}function Se(H){if($(),H.buttons!=1)return;const Z=a.value.getBoundingClientRect(),oe=H.pageX-Z.x,ie=H.pageY-Z.y;ee.value={offset:{x:oe,y:ie},isPerfected:!1}}async function _(H){if(j.value&&R(),V.value===null)return;const Z=at(H);if(!Z){V.value=null;return}const{fromNodeId:oe,fromOutId:ie}=V.value;if(oe==Z){V.value=null;return}I(V.value.fromNodeId,{toNodeId:Z,outId:ie})}function M(H,Z,oe){O(H,n,void 0,{x:Math.floor(Z),y:Math.floor(oe)})}function Q(H){var We;const Z=a.value.querySelector(`[data-writer-id="${H}"]`),oe=(We=a.value)==null?void 0:We.getBoundingClientRect();if(!Z||!oe)return;const{width:ie,height:Te}=Z.getBoundingClientRect(),Ne=r.getComponentById(H);Ne&&xe(Ne.x-oe.width/2+ie/2,Ne.y-oe.height/2+Te/2)}async function te(H){await xe(H.x,H.y)}function re(H){f.value=Math.max(Math.min(Ra.maxLevel,H),Ra.minLevel)}function ye(H){re(H)}function xe(H,Z){c.value={x:Math.max(0,H),y:Math.max(0,Z)}}function me(H){xe(c.value.x+H.deltaX*(1/f.value),c.value.y+H.deltaY*(1/f.value))}function _e(H){const Z=.006666666666666667,oe=a.value.getBoundingClientRect(),ie=f.value;f.value=Math.min(Math.max(f.value-H.deltaY*Z,Ra.minLevel),Ra.maxLevel);const Te={w:oe.width*(1/ie)*(1/f.value)*(f.value-ie),h:oe.height*(1/ie)*(1/f.value)*(f.value-ie)},Ne={x:(H.pageX-oe.x)/oe.width,y:(H.pageY-oe.y)/oe.height};xe(c.value.x+Te.w*Ne.x,c.value.y+Te.h*Ne.y)}async function ce(H){if(H.preventDefault(),!H.ctrlKey&&!eh(H)){me(H);return}_e(H)}async function Ee(){const{width:Z,height:oe,x:ie,y:Te}=a.value.getBoundingClientRect(),Ne=o.value.querySelectorAll("[data-writer-id]"),{maxX:We,maxY:Ze}=Array.from(Ne).reduce((St,Et)=>{const Pt=Et.getBoundingClientRect();return{maxY:Math.max(St.maxY,(Pt.bottom-Te)*(1/f.value)+c.value.y),maxX:Math.max(St.maxX,(Pt.right-ie)*(1/f.value)+c.value.x)}},{maxY:0,maxX:0}),lt=Math.min((Z-48)/We,(oe-48)/Ze);re(lt),xe(0,0)}return He(()=>s.getSelection(),H=>{H&&(h.value=null,r.isChildOf(n,H.componentId)&&H.source!=="click"&&Q(H.componentId))}),Ft(async()=>{var H;await Ee(),await mn(),se(),(H=a.value)==null||H.addEventListener("wheel",ce),m.observe(o.value,{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0,characterData:!0})}),Bn(()=>{var H;(H=a.value)==null||H.removeEventListener("wheel",ce),m.disconnect()}),(H,Z)=>{var oe;return C(),N("div",{ref_key:"rootEl",ref:a,class:"WorkflowsWorkflow","data-writer-unselectable":le.value,onClick:ae,onDragover:Le,onDrop:qe,onMousemove:X,onMousedown:Se,onMouseup:_},[U("div",{ref_key:"nodeContainerEl",ref:o,class:"nodeContainer"},[(C(),N("svg",null,[(C(!0),N(Oe,null,mt(l.value,(ie,Te)=>(C(),Fe(Ad,{key:Te,arrow:ie,"is-selected":h.value==Te,"is-engaged":h.value==Te||T(s).getSelectedId()==ie.fromNodeId||T(s).getSelectedId()==ie.toNodeId,onClick:Ne=>Ct(Ne,Te),onDelete:Ne=>$e(ie)},null,8,["arrow","is-selected","is-engaged","onClick","onDelete"]))),128)),(oe=V.value)!=null&&oe.liveArrow?(C(),Fe(Ad,{key:"liveArrow",arrow:V.value.liveArrow,"is-selected":!1,"is-engaged":!0},null,8,["arrow"])):Ae("",!0)])),(C(!0),N(Oe,null,mt(b.value,ie=>{var Te,Ne,We,Ze,lt,St,Et,Pt;return C(),Fe(mr(T(t)(ie.id,0)),{key:ie.id,style:it({top:`${(((Ne=(Te=k.value)==null?void 0:Te[ie.id])==null?void 0:Ne.y)??ie.y)-c.value.y}px`,left:`${(((Ze=(We=k.value)==null?void 0:We[ie.id])==null?void 0:Ze.x)??ie.x)-c.value.x}px`,"border-color":((St=(lt=V.value)==null?void 0:lt.liveArrow)==null?void 0:St.toNodeId)==ie.id?(Pt=(Et=V.value)==null?void 0:Et.liveArrow)==null?void 0:Pt.color:void 0}),onMousedown:So(wt=>he(wt,ie.id),["stop"]),onOutMousedown:wt=>de(ie.id,wt)},null,40,["style","onMousedown","onOutMousedown"])}),128))],512),U("div",wE,[je(Hn,{variant:"secondary",size:"small","data-writer-unselectable":!0,"data-automation-action":"run-workflow",onClick:pe},{default:Ge(()=>[IE,At(" "+be(d.value?"Running...":"Run workflow"),1)]),_:1})]),o.value?(C(),Fe(bE,{key:0,"node-container-el":o.value,"render-offset":c.value,"zoom-level":f.value,class:"navigator",onAutoArrange:Re,onChangeRenderOffset:te,onChangeZoomLevel:ye,onResetZoom:Ee},null,8,["node-container-el","render-offset","zoom-level"])):Ae("",!0)],40,CE)}}}),TE=ke(SE,[["__scopeId","data-v-3e6a919a"]]),EE={class:"alias"},$E=["contenteditable"],ME=Ie({__name:"WorkflowsNodeNamer",props:{componentId:{},blockName:{}},setup(e){const t=e,n=W(Y.core),a=W(Y.builderManager),{setContentValue:o}=Zp(n,a),r=J(()=>{var m;return(m=n.getComponentById(t.componentId))==null?void 0:m.content.alias}),s=J(()=>!!r.value),l=q(null),c=q(!1);async function d(){if(c.value)return;c.value=!0,await mn();const m=l.value;m.focus();const k=document.createRange(),S=window.getSelection();k.setStart(m,m.childNodes.length),k.collapse(!0),S.removeAllRanges(),S.addRange(k)}function h(){const m=l.value.textContent;l.value.blur(),c.value=!1,o(t.componentId,"alias",m)}function f(m){c.value&&m.stopPropagation()}return(m,k)=>(C(),N("div",{class:st(["WorkflowsNodeNamer",{beingEdited:c.value,hasEyebrow:s.value||c.value}]),"data-writer-unselectable":"true"},[U("div",{class:"blockName",onClick:d},be(m.blockName),1),U("div",EE,[s.value||c.value?(C(),N("div",{key:0,ref_key:"aliasEditorEl",ref:l,class:"aliasEditor",contenteditable:c.value,"data-writer-unselectable":"true",onClick:d,onMousemove:f,onBlur:h,onKeydown:Ca(h,["enter"])},be(r.value),41,$E)):Ae("",!0)])],2))}}),NE=ke(ME,[["__scopeId","data-v-c890df70"]]),OE={class:"WorkflowsNode"},PE={class:"title"},LE=["src"],RE=["data-writer-socket-id","onMousedownCapture"],DE={key:0},BE={class:"outputs"},FE=["data-writer-socket-id","onMousedownCapture"],VE={writer:{name:"Node",description:"A Workflows node.",toolkit:"workflows",category:"Other",fields:{alias:{name:"Alias",type:L.Text}},allowedParentTypes:["workflows_workflow"],previewField:"alias"}},UE=Ie({...VE,__name:"WorkflowsNode",emits:["outMousedown","engaged"],setup(e,{emit:t}){const n=t,a=W(Y.core),o=W(Y.builderManager),r=W(Y.componentId),s=W(Y.evaluatedFields),l=q(null),c=J(()=>a.getComponentById(r)),d=J(()=>{var O;return a==null?void 0:a.getComponentDefinition((O=c.value)==null?void 0:O.type)}),h=J(()=>o.getSelectedId()==r),f=J(()=>{const O={};return Object.entries(d.value.outs).forEach(([I,g])=>{g.field||(O[I]=g)}),O});function m(O){const g=d.value.fields[O].type==L.Tools,p=Object.keys(s[O].value??{});return g?p.filter(w=>{var V;return((V=s[O].value[w])==null?void 0:V.type)=="function"}):p}const k=J(()=>{const O={};return Object.entries(d.value.outs).forEach(([I,g])=>{if(!g.field)return;O[g.field]={},m(g.field).forEach(A=>{O[g.field][`${I}_${A}`]={name:A,description:"Dynamically created",style:"dynamic"}})}),O});function S(O,I){O.stopPropagation(),n("outMousedown",I)}async function y(O){try{return(await fetch(O,{method:"HEAD"})).ok}catch{return!1}}async function b(){const O=[`./../../../../components/${c.value.type}.svg`,`./../../../../components/workflows_category_${d.value.category}.svg`];a.featureFlags.value.includes("custom_block_icons")&&O.unshift(`./../../../../static/components/${c.value.id}.svg`);for(let I=0;I<O.length;I++){const g=O[I];if(await y(g))return g}return""}return Ft(async()=>{l.value=await b()}),He(h,()=>{n("engaged")}),(O,I)=>(C(),N("div",OE,[U("div",PE,[U("img",{src:l.value},null,8,LE),je(NE,{"component-id":T(r),class:"nodeNamer","block-name":d.value.name},null,8,["component-id","block-name"])]),Ae("",!0),(C(!0),N(Oe,null,mt(k.value,(g,p)=>(C(),N("div",{key:p,class:"outputs"},[U("h4",null,be(d.value.fields[p].name),1),(C(!0),N(Oe,null,mt(g,(A,w)=>(C(),N("div",{key:w,class:"output"},[At(be(A.name)+" ",1),U("div",{class:st(["ball",A.style]),"data-writer-socket-id":w,"data-writer-unselectable":!0,onClickCapture:I[0]||(I[0]=So(()=>{},["stop"])),onMousedownCapture:V=>S(V,w)},null,42,RE)]))),128)),Object.keys(g).length==0?(C(),N("div",DE,"None configured.")):Ae("",!0)]))),128)),U("div",BE,[(C(!0),N(Oe,null,mt(f.value,(g,p)=>(C(),N("div",{key:p,class:"output"},[At(be(g.name)+" ",1),U("div",{class:st(["ball",g.style]),"data-writer-socket-id":p,"data-writer-unselectable":!0,onClickCapture:I[1]||(I[1]=So(()=>{},["stop"])),onMousedownCapture:A=>S(A,p)},null,42,FE)]))),128))])]))}}),HE=ke(UE,[["__scopeId","data-v-8a689ebc"]]),jE="The root component of the application, which serves as the starting point of the component hierarchy.",zE={writer:{name:"Workflows Root",toolkit:"workflows",category:"Root",description:jE,allowedChildrenTypes:["workflows_workflow"],fields:{}}},KE=Ie({...zE,__name:"WorkflowsRoot",setup(e){const t=W(Y.core),n=W(Y.getChildrenVNodes),a=q(null),o=J(()=>{const r=t.activePageId.value;if(!!t.getComponentById(r)&&t.isChildOf("workflows_root",r))return r;const l=t.getComponents("workflows_root",{includeBMC:!0,includeCMC:!1,sortedByPosition:!0});return l.length==0?null:l[0].id});return(r,s)=>(C(),N("div",{ref_key:"rootEl",ref:a,class:"WorkflowsRoot","data-writer-container":""},[(C(!0),N(Oe,null,mt(T(n)(),l=>(C(),N(Oe,{key:l.key},[l.key===`${o.value}:0`?(C(),Fe(mr(l),{key:0})):Ae("",!0)],64))),128))],512))}}),WE=ke(KE,[["__scopeId","data-v-e736ec53"]]),Xl={root:VT,page:$T,sidebar:vk,button:qk,text:BA,section:nk,header:Yx,heading:Y0,dataframe:V0,html:Qp,pagination:wS,repeater:SS,column:Bx,columns:Hx,tab:Ak,tabs:Tk,link:ZA,horizontalstack:Xx,separator:ck,image:oA,pdf:aT,iframe:pT,googlemaps:wT,mapbox:JT,icon:q0,timer:NS,textinput:YI,textareainput:ZI,numberinput:dI,sliderinput:RI,rangeinput:jI,colorinput:hw,dateinput:bw,timeinput:rx,radioinput:_I,checkboxinput:rw,dropdowninput:Tw,selectinput:xI,multiselectinput:sI,fileinput:jw,webcamcapture:VS,vegalitechart:UA,plotlygraph:OA,metric:SA,message:_A,videoplayer:YA,chatbot:U1,step:Fk,steps:Wk,ratinginput:mx,tags:eC,switchinput:xx,reuse:HS,avatar:cC,annotatedtext:mC,jsonviewer:RC,workflows_root:WE,workflows_workflow:TE,progressbar:JC},or={};function GE(e){const t=`Component type "${e}" not supported. If it's a custom component, please ensure it's been loaded.`;return{writer:{name:"Fallback Component",allowedChildrenTypes:["*"],description:t,category:"Fallback"},setup(n,{slots:a}){return()=>ba("div",{"data-writer-container":"",style:{color:"var(--primaryTextColor)"}},[t,a.default({})])}}}function YE(e){var o,r;const t={workflows_node:HE},n=or[e];if(!n)return;const a=n.baseType;return{...t[a],writer:{...t[a].writer,...or[e].writer,fields:{...(o=t[a].writer)==null?void 0:o.fields,...(r=or[e].writer)==null?void 0:r.fields}}}}function JE(e){return YE(e)??Xl[e]??GE(e)}function pr(e){var t;return(t=JE(e))==null?void 0:t.writer}function Zl(){return[...Object.keys(Xl),...Object.keys(or)]}function nh(e,t){Xl[e]=t}function QE(e,t){or[e]=t}function qE(e){let t=!1;return ZE(e),Object.entries(e).forEach(([,n])=>{t=n2(n,e)||t,t=XE(n)||t}),t}function XE(e){const t=pr(e.type);if(!t||t.category=="Fallback")return console.error(`Component ${e.id} (${e.type}). Invalid component type.`),!1;let n=!1;return n=r2(e),n=o2(e)||n,e2(e,t),t2(e,t),n}function dl(e,t,n={}){n[e]=!0,Object.entries(t).filter(([,a])=>a.parentId===e).forEach(([a])=>dl(a,t,n))}function ZE(e){const t=Object.fromEntries(Object.entries(e).map(([n])=>[n,!1]));dl("root",e,t),dl("workflows_root",e,t),Object.entries(t).forEach(([n,a])=>{a||console.warn(`Component ${n} (${e[n].type}). Orphan component.`)})}function e2(e,t){const n=Object.keys(t.fields??{});e.content&&Object.keys(e.content).forEach(a=>{n.includes(a)||console.warn(`Component ${e.id} (${e.type}). Field key "${a}" is defined in the component but not in the template.`)})}function t2(e,t){const n=Object.keys(t.events??{});if(!e.binding)return;const a=e.binding.eventType;n.includes(a)&&t.events[a].bindable||console.warn(`Component ${e.id} (${e.type}). The component is bound to event "${e.binding.eventType}" but the template doesn't define that event or it's not bindable.`)}function n2(e,t){let n=!1;e.id=="root"&&e.position!==0&&console.error("Root must be at position 0."),e.position==-1&&console.error(`Component ${e.id} (${e.type}). Invalid position.`);const a=Object.values(t).filter(s=>s.parentId===e.id&&s.position!==-2&&!s.isCodeManaged);let o=0;return a.forEach(s=>{o+=s.position}),(a.length-1)*a.length/2!==o&&(console.error(`Component ${e.id} (${e.type}). Invalid children positions. Automated fix will be applied.`),a2(a),n=!0),n}function a2(e){e.sort((t,n)=>t.position>n.position?1:-1),e.map((t,n)=>{t.position=n})}function o2(e){var n,a,o;let t=!1;if(Object.keys(e.handlers??{}).forEach(r=>{if(!r.startsWith("ss-"))return;const s=`wf-${r.substring(3)}`;e.handlers[s]=e.handlers[r],t=!0,delete e.handlers[r]}),(a=(n=e.binding)==null?void 0:n.eventType)!=null&&a.startsWith("ss-")){const s=`wf-${((o=e.binding)==null?void 0:o.eventType).substring(3)}`;e.binding.eventType=s,t=!0}return t}function r2(e,t){let n=!1;if(e.type=="column"){if("horizontalAlignment"in e.content){const a={left:"start",center:"center",right:"end"};e.content.contentHAlign=a[e.content.horizontalAlignment]||e.content.horizontalAlignment,delete e.content.horizontalAlignment,n=!0}if("verticalAlignment"in e.content){const a={normal:"unset",top:"start",center:"center",bottom:"end"};e.content.contentVAlign=a[e.content.verticalAlignment]||e.content.verticalAlignment,delete e.content.verticalAlignment,n=!0}}else if(e.type=="horizontalstack"){if("alignment"in e.content){const a={left:"start",center:"center",right:"end"};e.content.contentHAlign=a[e.content.alignment]||e.content.alignment,delete e.content.alignment,n=!0}}else e.type=="section"&&"snapMode"in e.content&&(delete e.content.snapMode,n=!0);return n}function s2(e){let t="";const n=[];let a=!1;for(let r=0;r<e.length;r++){const s=e[r];if(s==="."&&!a){n.push(t),t="";continue}t+=s,s==="\\"?a=!0:a=!1}return n.push(t),n.map(r=>r.replaceAll("\\.","."))}const i2="WriterCustomComponentTemplates";async function l2(e){await Promise.all(e.map(async t=>{const n=t.toLocaleLowerCase();n.endsWith(".js")?await c2(t):n.endsWith(".css")&&d2(t)}))}async function c2(e){var t;console.log(`Importing custom component templates at "${e}"...`),await on(()=>import(ah()+e),[],import.meta.url),(t=Object.entries(window[i2]))==null||t.forEach(([n,a])=>{u2(n)?(nh(`custom_${n}`,a),console.log(`Registering template for "${n}".`)):console.warn(`custom component '${n}' is ignored. A custom component should be declared using only alphanumeric lowercase and _.`)})}function u2(e){return/^[a-z0-9_]+$/.test(e)}function d2(e){const t=document.createElement("link");t.rel="stylesheet",t.href=ah()+e,document.head.appendChild(t)}function ah(){let e=window.location.pathname;return e.endsWith("/")||(e+="/"),`${e}extensions/`}function f2(e,t){return typeof t=="bigint"?t.toString()+"n":t}const p2=1e3,h2=6e4;function v2(){let e=null;const t=q(null),n=q(null),a=Il([]),o=q(null),r=q({}),s=q([]),l=q({});let c;const d=q("idle");let h=0;const f=q(new Map);let m=[];const k=[],S=q(null);async function y(){await b(),j("pageChange",$=>{$e($)}),I(),n.value=="edit"}async function b(){const $=await fetch("./api/init",{method:"post",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({proposedSessionId:e})}),R=await $.json();if($.status>400)throw"Connection rejected.";if(R.extensionPaths&&await l2(R.extensionPaths),n.value=R.mode,r.value=R.components,l.value=R.userState,V(R.mail),e=R.sessionId,t.value=new Date().getTime(),a.value=R.featureFlags,O(R.abstractTemplates),a.value.includes("dataframeEditor")){const K=await on(()=>import("./CoreDataframe-B89Ng0p8.js"),__vite__mapDeps([5,6]),import.meta.url).then(X=>X.default);nh("dataframe",K)}s.value=R.userFunctions,o.value=R.runCode,await w(),!(n.value!="edit"||!qE(R.components))&&await Le()}function O($){Object.entries($??{}).forEach(([R,B])=>{QE(R,B)})}function I(){setTimeout(()=>{pe("keepAlive",{},I)},h2)}function g($){$&&Object.entries($).forEach(([R,B])=>{const K=R.charAt(0),X=s2(R.substring(1)),Se=X.length-1;let _=l.value;const M=K==="-";for(let Q=0;Q<Se;Q++){const te=_==null?void 0:_[X[Q]];typeof te=="object"&&te!==null?_=te:M||(_[X[Q]]={},_=_[X[Q]])}M?delete _[X.at(-1)]:_[X.at(-1)]=B})}function p($){$&&(r.value=$)}function A(){f.value.forEach(({callback:$})=>{$==null||$({ok:!1})}),f.value.clear()}async function w(){if(c)return;const $=new URL("./api/stream",window.location.href);return $.protocol=$.protocol.replace("https","wss"),$.protocol=$.protocol.replace("http","ws"),c=new WebSocket($.href),c.onopen=()=>{A(),d.value="connected",console.log("WebSocket connected. Initialising stream..."),pe("streamInit",{sessionId:e})},c.onmessage=R=>{var X,Se,_,M;const B=JSON.parse(R.data);if(B.messageType=="announcement"&&B.payload.announce=="codeUpdate"){c.close(),b();return}else(B.messageType=="eventResponse"||B.messageType=="stateEnquiryResponse")&&(g((X=B.payload)==null?void 0:X.mutations),V((Se=B.payload)==null?void 0:Se.mail),p((_=B.payload)==null?void 0:_.components));const K=f.value.get(B.trackingId);(M=K==null?void 0:K.callback)==null||M.call(K,{ok:!0,payload:B.payload}),f.value.delete(B.trackingId)},c.onclose=async R=>{if(c=null,d.value="offline",R.code==1008){console.error("Invalid session. Reinitialising..."),await b();return}console.error("WebSocket closed. Attempting to reconnect..."),setTimeout(async()=>{try{await w()}catch{console.error("Couldn't reconnect.")}},p2)},new Promise((R,B)=>{c.addEventListener("open",()=>R(),{once:!0}),c.addEventListener("close",()=>B(),{once:!0})})}function V($=[]){m.push(...$),m=m.filter(R=>{const B=k.filter(K=>K.mailType==R.type);if(B.length==0)return R;B.forEach(K=>K.fn(R.payload))})}function j($,R){k.push({mailType:$,fn:R}),V()}function ee($){var B;let R=null;if($ instanceof CustomEvent)R=((B=$.detail)==null?void 0:B.payload)??null;else{const K={};for(const X in $){const Se=$[X];typeof Se!="function"&&(Se instanceof Object||(K[X]=Se))}R=K}return R}async function se($,R,B){var M,Q;const K=B?ee($):null;let X,Se;$ instanceof CustomEvent&&(X=(M=$.detail)==null?void 0:M.callback,Se=(Q=$.detail)==null?void 0:Q.handler),pe("event",async()=>({type:$.type,instancePath:R,handler:Se,payload:await K}),X,!0)}async function le($){return new Promise((R,B)=>{pe("hashRequest",{message:$},X=>{var Se;if(!X.ok){B("Couldn't connect to the server.");return}R((Se=X.payload)==null?void 0:Se.message)})})}async function ae($){const R={code:$};return new Promise((B,K)=>{pe("codeSaveRequest",R,Se=>{if(!Se.ok){K("Couldn't connect to the server.");return}B()}),d.value="suspended"})}async function ue($){const R={code:$};return new Promise((B,K)=>{pe("codeUpdate",R,Se=>{if(!Se.ok){K("Couldn't connect to the server.");return}B()})})}async function Ce($){pe("stateEnquiry",{},$,!0)}function Re($){const K=()=>{f.value.has($)&&Ce(()=>setTimeout(K,150))};setTimeout(K,150)}async function pe($,R,B,K=!1){if(d.value=="offline"||d.value=="suspended"){B==null||B({ok:!1});return}const X=h++;try{(B||K)&&f.value.set(X,{callback:B}),K&&Re(X);let Se;typeof R=="function"?Se=await R():Se=R;const _={type:$,trackingId:X,payload:Se};if(c.readyState!==c.OPEN)throw"Connection lost.";c.send(JSON.stringify(_,f2))}catch(Se){console.error("sendFrontendMessage error",Se),B==null||B({ok:!1})}}function he($){delete r.value[$]}function de($){r.value[$.id]=$}async function Le(){const $={};Object.entries(r.value).forEach(([B,K])=>{K.isCodeManaged||($[B]=K)});const R={components:$};return new Promise((B,K)=>{pe("componentUpdate",R,Se=>{if(!Se.ok){K("Couldn't connect to the server.");return}B()})})}function kt($){return r.value[$]}function qe($,R){let B=r.value[R];do{if(B.parentId==$)return!0;B=r.value[B.parentId]}while(B);return!1}function Ct($,{includeBMC:R=!0,includeCMC:B=!0,sortedByPosition:K=!1}={}){let X=Object.values(r.value);return typeof $<"u"&&(X=X.filter(Se=>Se.parentId==$)),X=X.filter(Se=>{const _=Se.isCodeManaged;return R&&!_||B&&_}),K&&(X=X.sort((Se,_)=>Se.isCodeManaged&&!_.isCodeManaged?1:!Se.isCodeManaged&&_.isCodeManaged?-1:Se.position>_.position?1:-1)),X}function $e($){const B=Ct("root").filter(K=>K.content.key==$);B.length!=0&&Ke(B[0].id)}function Ke($){S.value=$}function at($){return ql(r.value,$)}return{webSocket:c,syncHealth:d,frontendMessageMap:On(f),mode:On(n),userFunctions:On(s),addMailSubscription:j,init:y,forwardEvent:se,hashMessage:le,runCode:On(o),sendCodeSaveRequest:ae,sendCodeUpdate:ue,sendComponentUpdate:Le,addComponent:de,deleteComponent:he,getComponentById:kt,getComponents:Ct,setActivePageId:Ke,activePageId:On(S),setActivePageFromKey:$e,getComponentDefinition:pr,getSupportedComponentTypes:Zl,getContainableTypes:at,sessionTimestamp:On(t),userState:On(l),isChildOf:qe,featureFlags:On(a)}}function m2(e){e.directive("capture-tabs",{mounted:t=>{t.addEventListener("keydown",n=>{n.key=="Tab"&&(n.preventDefault(),t.setRangeText("  ",t.selectionStart,t.selectionStart,"end"))})}})}const qo=v2();globalThis.vue=Ub;globalThis.injectionKeys=Y;globalThis.core=qo;async function g2(){await qo.init();const e=qo.mode.value,t=e=="edit"?h0():void 0;t&&qo.addMailSubscription("logEntry",t.handleLogEntry),console.log(`Mounting app in mode ${e}...`);const{default:n}=e==="run"&&await on(()=>import("./ComponentRenderer-BW0gEjYv.js"),__vite__mapDeps([7,8,9]),import.meta.url),{default:a}=e==="edit"&&await on(()=>import("./BuilderApp-i1W1UlVq.js").then(r=>r.b),__vite__mapDeps([10,11,12]),import.meta.url),o=cp(n||a);o.use(u0),o.provide(Y.core,qo),o.provide(Y.builderManager,t),m2(o),o.mount("#app")}console.log("Initialising Writer Framework core...");g2().then(async()=>{console.log("Core initialised.")}).catch(e=>{console.error("Core initialisation failed.",e),document.write(e)});export{th as $,y2 as A,zl as B,Eo as C,$t as D,it as E,Oe as F,PT as G,b2 as H,NT as I,on as J,Ae as K,kl as L,T as M,Vp as N,Zp as O,Bn as P,mn as Q,Ip as R,Cd as S,P_ as T,eh as U,Gi as V,Hn as W,tf as X,Za as Y,eE as Z,ke as _,Y as a,jl as a0,f2 as a1,mr as a2,Il as a3,On as a4,bp as a5,Pn as a6,L as a7,Pe as a8,Mt as a9,xo as aA,yn as aa,Wt as ab,Vt as ac,ht as ad,Ye as ae,j1 as af,_2 as ag,nr as ah,Qt as ai,ut as aj,H1 as ak,$d as al,Kg as am,hy as an,Xa as ao,$o as ap,wa as aq,C1 as ar,Ca as as,Vs as at,So as au,Up as av,Fy as aw,Zl as ax,pr as ay,d0 as az,Fe as b,J as c,Ie as d,N as e,U as f,JE as g,ba as h,W as i,Ts as j,Ft as k,Bt as l,je as m,Ge as n,C as o,If as p,At as q,q as r,mt as s,be as t,Ks as u,un as v,He as w,st as x,zt as y,Kt as z};
