function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["./index-5u5REPT4.js","./serialization-DJC7NP0N.js","./Arrow.dom-GBJpMYQS.js","./CoreChatbotLoader-DNXAEmWp.js","./CoreChatbotLoader-BbtHS_O3.css","./CoreDataframe-7e3c0sfj.js","./CoreDataframe-BYlbCQgT.css","./ComponentRenderer-BeUjkGd8.js","./instancePath-BsbOTTI8.js","./ComponentRenderer-BOotx4DP.css","./BuilderApp-BudRb5tG.js","./marked.esm-273vDTCT.js","./BuilderApp-5YaiP9ZT.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 a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const r of a)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const r={};return a.integrity&&(r.integrity=a.integrity),a.referrerPolicy&&(r.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?r.credentials="include":a.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function o(a){if(a.ep)return;a.ep=!0;const r=n(a);fetch(a.href,r)}})();const Ig="modulepreload",xg=function(e,t){return new URL(e,t).href},nu={},Xt=function(t,n,o){let a=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"));a=Promise.all(n.map(c=>{if(c=xg(c,o),c in nu)return;nu[c]=!0;const d=c.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(!!o)for(let C=r.length-1;C>=0;C--){const S=r[C];if(S.href===c&&(!d||S.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${h}`))return;const v=document.createElement("link");if(v.rel=d?"stylesheet":Ig,d||(v.as="script",v.crossOrigin=""),v.href=c,l&&v.setAttribute("nonce",l),document.head.appendChild(v),d)return new Promise((C,S)=>{v.addEventListener("load",C),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${c}`)))})}))}return a.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 ys(e,t){const n=new Set(e.split(","));return t?o=>n.has(o.toLowerCase()):o=>n.has(o)}const gt={},pa=[],un=()=>{},Tg=()=>!1,fr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cl=e=>e.startsWith("onUpdate:"),xt=Object.assign,ul=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Sg=Object.prototype.hasOwnProperty,ut=(e,t)=>Sg.call(e,t),Fe=Array.isArray,ha=e=>Sa(e)==="[object Map]",Yo=e=>Sa(e)==="[object Set]",ou=e=>Sa(e)==="[object Date]",kg=e=>Sa(e)==="[object RegExp]",Ye=e=>typeof e=="function",Tt=e=>typeof e=="string",mo=e=>typeof e=="symbol",At=e=>e!==null&&typeof e=="object",dl=e=>(At(e)||Ye(e))&&Ye(e.then)&&Ye(e.catch),Ad=Object.prototype.toString,Sa=e=>Ad.call(e),Eg=e=>Sa(e).slice(8,-1),Cd=e=>Sa(e)==="[object Object]",fl=e=>Tt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,va=ys(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_s=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},$g=/-(\w)/g,an=_s(e=>e.replace($g,(t,n)=>n?n.toUpperCase():"")),Mg=/\B([A-Z])/g,_n=_s(e=>e.replace(Mg,"-$1").toLowerCase()),pr=_s(e=>e.charAt(0).toUpperCase()+e.slice(1)),qa=_s(e=>e?`on${pr(e)}`:""),On=(e,t)=>!Object.is(e,t),ma=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},ss=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},or=e=>{const t=parseFloat(e);return isNaN(t)?e:t},is=e=>{const t=Tt(e)?Number(e):NaN;return isNaN(t)?e:t};let au;const wd=()=>au||(au=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Ng="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",Og=ys(Ng);function at(e){if(Fe(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],a=Tt(o)?Dg(o):at(o);if(a)for(const r in a)t[r]=a[r]}return t}else if(Tt(e)||At(e))return e}const Pg=/;(?![^(]*\))/g,Lg=/:([^]+)/,Rg=/\/\*[^]*?\*\//g;function Dg(e){const t={};return e.replace(Rg,"").split(Pg).forEach(n=>{if(n){const o=n.split(Lg);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function nt(e){let t="";if(Tt(e))t=e;else if(Fe(e))for(let n=0;n<e.length;n++){const o=nt(e[n]);o&&(t+=o+" ")}else if(At(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Fg(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Tt(t)&&(e.class=nt(t)),n&&(e.style=at(n)),e}const Bg="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Vg=ys(Bg);function Id(e){return!!e||e===""}function Ug(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=go(e[o],t[o]);return n}function go(e,t){if(e===t)return!0;let n=ou(e),o=ou(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=mo(e),o=mo(t),n||o)return e===t;if(n=Fe(e),o=Fe(t),n||o)return n&&o?Ug(e,t):!1;if(n=At(e),o=At(t),n||o){if(!n||!o)return!1;const a=Object.keys(e).length,r=Object.keys(t).length;if(a!==r)return!1;for(const s in e){const l=e.hasOwnProperty(s),c=t.hasOwnProperty(s);if(l&&!c||!l&&c||!go(e[s],t[s]))return!1}}return String(e)===String(t)}function bs(e,t){return e.findIndex(n=>go(n,t))}const be=e=>Tt(e)?e:e==null?"":Fe(e)||At(e)&&(e.toString===Ad||!Ye(e.toString))?JSON.stringify(e,xd,2):String(e),xd=(e,t)=>t&&t.__v_isRef?xd(e,t.value):ha(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,a],r)=>(n[Ai(o,r)+" =>"]=a,n),{})}:Yo(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ai(n))}:mo(t)?Ai(t):At(t)&&!Fe(t)&&!Cd(t)?String(t):t,Ai=(e,t="")=>{var n;return mo(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 gn;class pl{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=gn,!t&&gn&&(this.index=(gn.scopes||(gn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=gn;try{return gn=this,t()}finally{gn=n}}}on(){gn=this}off(){gn=this.parent}stop(t){if(this._active){let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.scopes)for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0,this._active=!1}}}function Hg(e){return new pl(e)}function Td(e,t=gn){t&&t.active&&t.effects.push(e)}function Sd(){return gn}function jg(e){gn&&gn.cleanups.push(e)}let Do;class Aa{constructor(t,n,o,a){this.fn=t,this.trigger=n,this.scheduler=o,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,Td(this,a)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,Jo();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(zg(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Qo()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=vo,n=Do;try{return vo=!0,Do=this,this._runnings++,ru(this),this.fn()}finally{su(this),this._runnings--,Do=n,vo=t}}stop(){var t;this.active&&(ru(this),su(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function zg(e){return e.value}function ru(e){e._trackId++,e._depsLength=0}function su(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)kd(e.deps[t],e);e.deps.length=e._depsLength}}function kd(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}function Wg(e,t){e.effect instanceof Aa&&(e=e.effect.fn);const n=new Aa(e,un,()=>{n.dirty&&n.run()});t&&(xt(n,t),t.scope&&Td(n,t.scope)),(!t||!t.lazy)&&n.run();const o=n.run.bind(n);return o.effect=n,o}function Kg(e){e.effect.stop()}let vo=!0,Bi=0;const Ed=[];function Jo(){Ed.push(vo),vo=!1}function Qo(){const e=Ed.pop();vo=e===void 0?!0:e}function hl(){Bi++}function vl(){for(Bi--;!Bi&&Vi.length;)Vi.shift()()}function $d(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const o=e.deps[e._depsLength];o!==t?(o&&kd(o,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Vi=[];function Md(e,t,n){hl();for(const o of e.keys()){let a;o._dirtyLevel<t&&(a??(a=e.get(o)===o._trackId))&&(o._shouldSchedule||(o._shouldSchedule=o._dirtyLevel===0),o._dirtyLevel=t),o._shouldSchedule&&(a??(a=e.get(o)===o._trackId))&&(o.trigger(),(!o._runnings||o.allowRecurse)&&o._dirtyLevel!==2&&(o._shouldSchedule=!1,o.scheduler&&Vi.push(o.scheduler)))}vl()}const Nd=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},ls=new WeakMap,Fo=Symbol(""),Ui=Symbol("");function pn(e,t,n){if(vo&&Do){let o=ls.get(e);o||ls.set(e,o=new Map);let a=o.get(n);a||o.set(n,a=Nd(()=>o.delete(n))),$d(Do,a)}}function qn(e,t,n,o,a,r){const s=ls.get(e);if(!s)return;let l=[];if(t==="clear")l=[...s.values()];else if(n==="length"&&Fe(e)){const c=Number(o);s.forEach((d,h)=>{(h==="length"||!mo(h)&&h>=c)&&l.push(d)})}else switch(n!==void 0&&l.push(s.get(n)),t){case"add":Fe(e)?fl(n)&&l.push(s.get("length")):(l.push(s.get(Fo)),ha(e)&&l.push(s.get(Ui)));break;case"delete":Fe(e)||(l.push(s.get(Fo)),ha(e)&&l.push(s.get(Ui)));break;case"set":ha(e)&&l.push(s.get(Fo));break}hl();for(const c of l)c&&Md(c,4);vl()}function Gg(e,t){var n;return(n=ls.get(e))==null?void 0:n.get(t)}const Yg=ys("__proto__,__v_isRef,__isVue"),Od=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(mo)),iu=Jg();function Jg(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const o=rt(this);for(let r=0,s=this.length;r<s;r++)pn(o,"get",r+"");const a=o[t](...n);return a===-1||a===!1?o[t](...n.map(rt)):a}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Jo(),hl();const o=rt(this)[t].apply(this,n);return vl(),Qo(),o}}),e}function Qg(e){const t=rt(this);return pn(t,"has",e),t.hasOwnProperty(e)}class Pd{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){const a=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!a;if(n==="__v_isReadonly")return a;if(n==="__v_isShallow")return r;if(n==="__v_raw")return o===(a?r?Vd:Bd:r?Fd:Dd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=Fe(t);if(!a){if(s&&ut(iu,n))return Reflect.get(iu,n,o);if(n==="hasOwnProperty")return Qg}const l=Reflect.get(t,n,o);return(mo(n)?Od.has(n):Yg(n))||(a||pn(t,"get",n),r)?l:jt(l)?s&&fl(n)?l:l.value:At(l)?a?$n(l):ws(l):l}}class Ld extends Pd{constructor(t=!1){super(!1,t)}set(t,n,o,a){let r=t[n];if(!this._isShallow){const c=Ho(r);if(!ar(o)&&!Ho(o)&&(r=rt(r),o=rt(o)),!Fe(t)&&jt(r)&&!jt(o))return c?!1:(r.value=o,!0)}const s=Fe(t)&&fl(n)?Number(n)<t.length:ut(t,n),l=Reflect.set(t,n,o,a);return t===rt(a)&&(s?On(o,r)&&qn(t,"set",n,o):qn(t,"add",n,o)),l}deleteProperty(t,n){const o=ut(t,n);t[n];const a=Reflect.deleteProperty(t,n);return a&&o&&qn(t,"delete",n,void 0),a}has(t,n){const o=Reflect.has(t,n);return(!mo(n)||!Od.has(n))&&pn(t,"has",n),o}ownKeys(t){return pn(t,"iterate",Fe(t)?"length":Fo),Reflect.ownKeys(t)}}class Rd extends Pd{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const qg=new Ld,Xg=new Rd,Zg=new Ld(!0),ey=new Rd(!0),ml=e=>e,As=e=>Reflect.getPrototypeOf(e);function Dr(e,t,n=!1,o=!1){e=e.__v_raw;const a=rt(e),r=rt(t);n||(On(t,r)&&pn(a,"get",t),pn(a,"get",r));const{has:s}=As(a),l=o?ml:n?_l:rr;if(s.call(a,t))return l(e.get(t));if(s.call(a,r))return l(e.get(r));e!==a&&e.get(t)}function Fr(e,t=!1){const n=this.__v_raw,o=rt(n),a=rt(e);return t||(On(e,a)&&pn(o,"has",e),pn(o,"has",a)),e===a?n.has(e):n.has(e)||n.has(a)}function Br(e,t=!1){return e=e.__v_raw,!t&&pn(rt(e),"iterate",Fo),Reflect.get(e,"size",e)}function lu(e){e=rt(e);const t=rt(this);return As(t).has.call(t,e)||(t.add(e),qn(t,"add",e,e)),this}function cu(e,t){t=rt(t);const n=rt(this),{has:o,get:a}=As(n);let r=o.call(n,e);r||(e=rt(e),r=o.call(n,e));const s=a.call(n,e);return n.set(e,t),r?On(t,s)&&qn(n,"set",e,t):qn(n,"add",e,t),this}function uu(e){const t=rt(this),{has:n,get:o}=As(t);let a=n.call(t,e);a||(e=rt(e),a=n.call(t,e)),o&&o.call(t,e);const r=t.delete(e);return a&&qn(t,"delete",e,void 0),r}function du(){const e=rt(this),t=e.size!==0,n=e.clear();return t&&qn(e,"clear",void 0,void 0),n}function Vr(e,t){return function(o,a){const r=this,s=r.__v_raw,l=rt(s),c=t?ml:e?_l:rr;return!e&&pn(l,"iterate",Fo),s.forEach((d,h)=>o.call(a,c(d),c(h),r))}}function Ur(e,t,n){return function(...o){const a=this.__v_raw,r=rt(a),s=ha(r),l=e==="entries"||e===Symbol.iterator&&s,c=e==="keys"&&s,d=a[e](...o),h=n?ml:t?_l:rr;return!t&&pn(r,"iterate",c?Ui:Fo),{next(){const{value:f,done:v}=d.next();return v?{value:f,done:v}:{value:l?[h(f[0]),h(f[1])]:h(f),done:v}},[Symbol.iterator](){return this}}}}function so(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ty(){const e={get(r){return Dr(this,r)},get size(){return Br(this)},has:Fr,add:lu,set:cu,delete:uu,clear:du,forEach:Vr(!1,!1)},t={get(r){return Dr(this,r,!1,!0)},get size(){return Br(this)},has:Fr,add:lu,set:cu,delete:uu,clear:du,forEach:Vr(!1,!0)},n={get(r){return Dr(this,r,!0)},get size(){return Br(this,!0)},has(r){return Fr.call(this,r,!0)},add:so("add"),set:so("set"),delete:so("delete"),clear:so("clear"),forEach:Vr(!0,!1)},o={get(r){return Dr(this,r,!0,!0)},get size(){return Br(this,!0)},has(r){return Fr.call(this,r,!0)},add:so("add"),set:so("set"),delete:so("delete"),clear:so("clear"),forEach:Vr(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{e[r]=Ur(r,!1,!1),n[r]=Ur(r,!0,!1),t[r]=Ur(r,!1,!0),o[r]=Ur(r,!0,!0)}),[e,n,t,o]}const[ny,oy,ay,ry]=ty();function Cs(e,t){const n=t?e?ry:ay:e?oy:ny;return(o,a,r)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?o:Reflect.get(ut(n,a)&&a in o?n:o,a,r)}const sy={get:Cs(!1,!1)},iy={get:Cs(!1,!0)},ly={get:Cs(!0,!1)},cy={get:Cs(!0,!0)},Dd=new WeakMap,Fd=new WeakMap,Bd=new WeakMap,Vd=new WeakMap;function uy(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function dy(e){return e.__v_skip||!Object.isExtensible(e)?0:uy(Eg(e))}function ws(e){return Ho(e)?e:Is(e,!1,qg,sy,Dd)}function Ud(e){return Is(e,!1,Zg,iy,Fd)}function $n(e){return Is(e,!0,Xg,ly,Bd)}function fy(e){return Is(e,!0,ey,cy,Vd)}function Is(e,t,n,o,a){if(!At(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=a.get(e);if(r)return r;const s=dy(e);if(s===0)return e;const l=new Proxy(e,s===2?o:n);return a.set(e,l),l}function Bo(e){return Ho(e)?Bo(e.__v_raw):!!(e&&e.__v_isReactive)}function Ho(e){return!!(e&&e.__v_isReadonly)}function ar(e){return!!(e&&e.__v_isShallow)}function gl(e){return Bo(e)||Ho(e)}function rt(e){const t=e&&e.__v_raw;return t?rt(t):e}function yl(e){return Object.isExtensible(e)&&ss(e,"__v_skip",!0),e}const rr=e=>At(e)?ws(e):e,_l=e=>At(e)?$n(e):e;class Hd{constructor(t,n,o,a){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Aa(()=>t(this._value),()=>ga(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!a,this.__v_isReadonly=o}get value(){const t=rt(this);return(!t._cacheable||t.effect.dirty)&&On(t._value,t._value=t.effect.run())&&ga(t,4),bl(t),t.effect._dirtyLevel>=2&&ga(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function py(e,t,n=!1){let o,a;const r=Ye(e);return r?(o=e,a=un):(o=e.get,a=e.set),new Hd(o,a,r||!a,n)}function bl(e){var t;vo&&Do&&(e=rt(e),$d(Do,(t=e.dep)!=null?t:e.dep=Nd(()=>e.dep=void 0,e instanceof Hd?e:void 0)))}function ga(e,t=4,n){e=rt(e);const o=e.dep;o&&Md(o,t)}function jt(e){return!!(e&&e.__v_isRef===!0)}function X(e){return jd(e,!1)}function Al(e){return jd(e,!0)}function jd(e,t){return jt(e)?e:new hy(e,t)}class hy{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:rt(t),this._value=n?t:rr(t)}get value(){return bl(this),this._value}set value(t){const n=this.__v_isShallow||ar(t)||Ho(t);t=n?t:rt(t),On(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:rr(t),ga(this,4))}}function vy(e){ga(e,4)}function k(e){return jt(e)?e.value:e}function my(e){return Ye(e)?e():k(e)}const gy={get:(e,t,n)=>k(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const a=e[t];return jt(a)&&!jt(n)?(a.value=n,!0):Reflect.set(e,t,n,o)}};function Cl(e){return Bo(e)?e:new Proxy(e,gy)}class yy{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:o}=t(()=>bl(this),()=>ga(this));this._get=n,this._set=o}get value(){return this._get()}set value(t){this._set(t)}}function zd(e){return new yy(e)}function wl(e){const t=Fe(e)?new Array(e.length):{};for(const n in e)t[n]=Wd(e,n);return t}class _y{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,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 Gg(rt(this._object),this._key)}}class by{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Ca(e,t,n){return jt(e)?e:Ye(e)?new by(e):At(e)&&arguments.length>1?Wd(e,t,n):X(e)}function Wd(e,t,n){const o=e[t];return jt(o)?o:new _y(e,t,n)}const Ay={GET:"get",HAS:"has",ITERATE:"iterate"},Cy={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 wy(e,t){}const Iy={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"},xy={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 Xn(e,t,n,o){try{return o?e(...o):e()}catch(a){qo(a,t,n)}}function bn(e,t,n,o){if(Ye(e)){const r=Xn(e,t,n,o);return r&&dl(r)&&r.catch(s=>{qo(s,t,n)}),r}const a=[];for(let r=0;r<e.length;r++)a.push(bn(e[r],t,n,o));return a}function qo(e,t,n,o=!0){const a=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){Xn(c,null,10,[e,s,l]);return}}Ty(e,n,a,o)}function Ty(e,t,n,o=!0){console.error(e)}let sr=!1,Hi=!1;const qt=[];let Fn=0;const ya=[];let uo=null,Po=0;const Kd=Promise.resolve();let Il=null;function fn(e){const t=Il||Kd;return e?t.then(this?e.bind(this):e):t}function Sy(e){let t=Fn+1,n=qt.length;for(;t<n;){const o=t+n>>>1,a=qt[o],r=ir(a);r<e||r===e&&a.pre?t=o+1:n=o}return t}function xs(e){(!qt.length||!qt.includes(e,sr&&e.allowRecurse?Fn+1:Fn))&&(e.id==null?qt.push(e):qt.splice(Sy(e.id),0,e),Gd())}function Gd(){!sr&&!Hi&&(Hi=!0,Il=Kd.then(Yd))}function ky(e){const t=qt.indexOf(e);t>Fn&&qt.splice(t,1)}function cs(e){Fe(e)?ya.push(...e):(!uo||!uo.includes(e,e.allowRecurse?Po+1:Po))&&ya.push(e),Gd()}function fu(e,t,n=sr?Fn+1:0){for(;n<qt.length;n++){const o=qt[n];if(o&&o.pre){if(e&&o.id!==e.uid)continue;qt.splice(n,1),n--,o()}}}function us(e){if(ya.length){const t=[...new Set(ya)].sort((n,o)=>ir(n)-ir(o));if(ya.length=0,uo){uo.push(...t);return}for(uo=t,Po=0;Po<uo.length;Po++)uo[Po]();uo=null,Po=0}}const ir=e=>e.id==null?1/0:e.id,Ey=(e,t)=>{const n=ir(e)-ir(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Yd(e){Hi=!1,sr=!0,qt.sort(Ey);try{for(Fn=0;Fn<qt.length;Fn++){const t=qt[Fn];t&&t.active!==!1&&Xn(t,null,14)}}finally{Fn=0,qt.length=0,us(),sr=!1,Il=null,(qt.length||ya.length)&&Yd()}}let da,Hr=[];function Jd(e,t){var n,o;da=e,da?(da.enabled=!0,Hr.forEach(({event:a,args:r})=>da.emit(a,...r)),Hr=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{Jd(r,t)}),setTimeout(()=>{da||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Hr=[])},3e3)):Hr=[]}function $y(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||gt;let a=n;const r=t.startsWith("update:"),s=r&&t.slice(7);if(s&&s in o){const h=`${s==="modelValue"?"model":s}Modifiers`,{number:f,trim:v}=o[h]||gt;v&&(a=n.map(C=>Tt(C)?C.trim():C)),f&&(a=n.map(or))}let l,c=o[l=qa(t)]||o[l=qa(an(t))];!c&&r&&(c=o[l=qa(_n(t))]),c&&bn(c,e,6,a);const d=o[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,bn(d,e,6,a)}}function Qd(e,t,n=!1){const o=t.emitsCache,a=o.get(e);if(a!==void 0)return a;const r=e.emits;let s={},l=!1;if(!Ye(e)){const c=d=>{const h=Qd(d,t,!0);h&&(l=!0,xt(s,h))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!l?(At(e)&&o.set(e,null),null):(Fe(r)?r.forEach(c=>s[c]=null):xt(s,r),At(e)&&o.set(e,s),s)}function Ts(e,t){return!e||!fr(t)?!1:(t=t.slice(2).replace(/Once$/,""),ut(e,t[0].toLowerCase()+t.slice(1))||ut(e,_n(t))||ut(e,t))}let Nt=null,Ss=null;function lr(e){const t=Nt;return Nt=e,Ss=e&&e.type.__scopeId||null,t}function Rt(e){Ss=e}function Dt(){Ss=null}const My=e=>ze;function ze(e,t=Nt,n){if(!t||e._n)return e;const o=(...a)=>{o._d&&qi(-1);const r=lr(t);let s;try{s=e(...a)}finally{lr(r),o._d&&qi(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function ns(e){const{type:t,vnode:n,proxy:o,withProxy:a,props:r,propsOptions:[s],slots:l,attrs:c,emit:d,render:h,renderCache:f,data:v,setupState:C,ctx:S,inheritAttrs:A}=e;let y,$;const x=lr(e);try{if(n.shapeFlag&4){const p=a||o,_=p;y=yn(h.call(_,p,f,r,C,v,S)),$=c}else{const p=t;y=yn(p.length>1?p(r,{attrs:c,slots:l,emit:d}):p(r,null)),$=t.props?c:Oy(c)}}catch(p){er.length=0,qo(p,e,1),y=Ve(Zt)}let g=y;if($&&A!==!1){const p=Object.keys($),{shapeFlag:_}=g;p.length&&_&7&&(s&&p.some(cl)&&($=Py($,s)),g=Bn(g,$))}return n.dirs&&(g=Bn(g),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&(g.transition=n.transition),y=g,lr(x),y}function Ny(e,t=!0){let n;for(let o=0;o<e.length;o++){const a=e[o];if(yo(a)){if(a.type!==Zt||a.children==="v-if"){if(n)return;n=a}}else return}return n}const Oy=e=>{let t;for(const n in e)(n==="class"||n==="style"||fr(n))&&((t||(t={}))[n]=e[n]);return t},Py=(e,t)=>{const n={};for(const o in e)(!cl(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Ly(e,t,n){const{props:o,children:a,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 o?pu(o,s,d):!!s;if(c&8){const h=t.dynamicProps;for(let f=0;f<h.length;f++){const v=h[f];if(s[v]!==o[v]&&!Ts(d,v))return!0}}}else return(a||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?pu(o,s,d):!0:!!s;return!1}function pu(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let a=0;a<o.length;a++){const r=o[a];if(t[r]!==e[r]&&!Ts(n,r))return!0}return!1}function xl({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o===e)(e=t.vnode).el=n,t=t.parent;else break}}const Tl="components",Ry="directives";function Dy(e,t){return Sl(Tl,e,!0,t)||e}const qd=Symbol.for("v-ndc");function hr(e){return Tt(e)?Sl(Tl,e,!1)||e:e||qd}function Xd(e){return Sl(Ry,e)}function Sl(e,t,n=!0,o=!1){const a=Nt||Lt;if(a){const r=a.type;if(e===Tl){const l=nl(r,!1);if(l&&(l===t||l===an(t)||l===pr(an(t))))return r}const s=hu(a[e]||r[e],t)||hu(a.appContext[e],t);return!s&&o?r:s}}function hu(e,t){return e&&(e[t]||e[an(t)]||e[pr(an(t))])}const Zd=e=>e.__isSuspense;let ji=0;const Fy={name:"Suspense",__isSuspense:!0,process(e,t,n,o,a,r,s,l,c,d){if(e==null)Vy(t,n,o,a,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}Uy(e,t,n,o,a,s,l,c,d)}},hydrate:Hy,create:kl,normalize:jy},By=Fy;function cr(e,t){const n=e.props&&e.props[t];Ye(n)&&n()}function Vy(e,t,n,o,a,r,s,l,c){const{p:d,o:{createElement:h}}=c,f=h("div"),v=e.suspense=kl(e,a,o,t,f,n,r,s,l,c);d(null,v.pendingBranch=e.ssContent,f,null,o,v,r,s),v.deps>0?(cr(e,"onPending"),cr(e,"onFallback"),d(null,e.ssFallback,t,n,o,null,r,s),_a(v,e.ssFallback)):v.resolve(!1,!0)}function Uy(e,t,n,o,a,r,s,l,{p:c,um:d,o:{createElement:h}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const v=t.ssContent,C=t.ssFallback,{activeBranch:S,pendingBranch:A,isInFallback:y,isHydrating:$}=f;if(A)f.pendingBranch=v,Nn(v,A)?(c(A,v,f.hiddenContainer,null,a,f,r,s,l),f.deps<=0?f.resolve():y&&($||(c(S,C,n,o,a,null,r,s,l),_a(f,C)))):(f.pendingId=ji++,$?(f.isHydrating=!1,f.activeBranch=A):d(A,a,f),f.deps=0,f.effects.length=0,f.hiddenContainer=h("div"),y?(c(null,v,f.hiddenContainer,null,a,f,r,s,l),f.deps<=0?f.resolve():(c(S,C,n,o,a,null,r,s,l),_a(f,C))):S&&Nn(v,S)?(c(S,v,n,o,a,f,r,s,l),f.resolve(!0)):(c(null,v,f.hiddenContainer,null,a,f,r,s,l),f.deps<=0&&f.resolve()));else if(S&&Nn(v,S))c(S,v,n,o,a,f,r,s,l),_a(f,v);else if(cr(t,"onPending"),f.pendingBranch=v,v.shapeFlag&512?f.pendingId=v.component.suspenseId:f.pendingId=ji++,c(null,v,f.hiddenContainer,null,a,f,r,s,l),f.deps<=0)f.resolve();else{const{timeout:x,pendingId:g}=f;x>0?setTimeout(()=>{f.pendingId===g&&f.fallback(C)},x):x===0&&f.fallback(C)}}function kl(e,t,n,o,a,r,s,l,c,d,h=!1){const{p:f,m:v,um:C,n:S,o:{parentNode:A,remove:y}}=d;let $;const x=zy(e);x&&t!=null&&t.pendingBranch&&($=t.pendingId,t.deps++);const g=e.props?is(e.props.timeout):void 0,p=r,_={vnode:e,parent:t,parentComponent:n,namespace:s,container:o,hiddenContainer:a,deps:0,pendingId:ji++,timeout:typeof g=="number"?g:-1,activeBranch:null,pendingBranch:null,isInFallback:!h,isHydrating:h,isUnmounted:!1,effects:[],resolve(b=!1,z=!1){const{vnode:W,activeBranch:re,pendingBranch:le,pendingId:ce,effects:ie,parentComponent:de,container:ye}=_;let Ee=!1;_.isHydrating?_.isHydrating=!1:b||(Ee=re&&le.transition&&le.transition.mode==="out-in",Ee&&(re.transition.afterLeave=()=>{ce===_.pendingId&&(v(le,ye,r===p?S(re):r,0),cs(ie))}),re&&(A(re.el)!==_.hiddenContainer&&(r=S(re)),C(re,de,_,!0)),Ee||v(le,ye,r,0)),_a(_,le),_.pendingBranch=null,_.isInFallback=!1;let ge=_.parent,pe=!1;for(;ge;){if(ge.pendingBranch){ge.effects.push(...ie),pe=!0;break}ge=ge.parent}!pe&&!Ee&&cs(ie),_.effects=[],x&&t&&t.pendingBranch&&$===t.pendingId&&(t.deps--,t.deps===0&&!z&&t.resolve()),cr(W,"onResolve")},fallback(b){if(!_.pendingBranch)return;const{vnode:z,activeBranch:W,parentComponent:re,container:le,namespace:ce}=_;cr(z,"onFallback");const ie=S(W),de=()=>{_.isInFallback&&(f(null,b,le,ie,re,null,ce,l,c),_a(_,b))},ye=b.transition&&b.transition.mode==="out-in";ye&&(W.transition.afterLeave=de),_.isInFallback=!0,C(W,re,null,!0),ye||de()},move(b,z,W){_.activeBranch&&v(_.activeBranch,b,z,W),_.container=b},next(){return _.activeBranch&&S(_.activeBranch)},registerDep(b,z){const W=!!_.pendingBranch;W&&_.deps++;const re=b.vnode.el;b.asyncDep.catch(le=>{qo(le,b,0)}).then(le=>{if(b.isUnmounted||_.isUnmounted||_.pendingId!==b.suspenseId)return;b.asyncResolved=!0;const{vnode:ce}=b;el(b,le,!1),re&&(ce.el=re);const ie=!re&&b.subTree.el;z(b,ce,A(re||b.subTree.el),re?null:S(b.subTree),_,s,c),ie&&y(ie),xl(b,ce.el),W&&--_.deps===0&&_.resolve()})},unmount(b,z){_.isUnmounted=!0,_.activeBranch&&C(_.activeBranch,n,b,z),_.pendingBranch&&C(_.pendingBranch,n,b,z)}};return _}function Hy(e,t,n,o,a,r,s,l,c){const d=t.suspense=kl(t,o,n,e.parentNode,document.createElement("div"),null,a,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 jy(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=vu(o?n.default:n),e.ssFallback=o?vu(n.fallback):Ve(Zt)}function vu(e){let t;if(Ye(e)){const n=Wo&&e._c;n&&(e._d=!1,w()),e=e(),n&&(e._d=!0,t=dn,Of())}return Fe(e)&&(e=Ny(e)),e=yn(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function ef(e,t){t&&t.pendingBranch?Fe(e)?t.effects.push(...e):t.effects.push(e):cs(e)}function _a(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let a=t.el;for(;!a&&t.component;)t=t.component.subTree,a=t.el;n.el=a,o&&o.subTree===n&&(o.vnode.el=a,xl(o,a))}function zy(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const tf=Symbol.for("v-scx"),nf=()=>G(tf);function Wy(e,t){return vr(e,null,t)}function of(e,t){return vr(e,null,{flush:"post"})}function af(e,t){return vr(e,null,{flush:"sync"})}const jr={};function Be(e,t,n){return vr(e,t,n)}function vr(e,t,{immediate:n,deep:o,flush:a,once:r,onTrack:s,onTrigger:l}=gt){if(t&&r){const b=t;t=(...z)=>{b(...z),_()}}const c=Lt,d=b=>o===!0?b:Ro(b,o===!1?1:void 0);let h,f=!1,v=!1;if(jt(e)?(h=()=>e.value,f=ar(e)):Bo(e)?(h=()=>d(e),f=!0):Fe(e)?(v=!0,f=e.some(b=>Bo(b)||ar(b)),h=()=>e.map(b=>{if(jt(b))return b.value;if(Bo(b))return d(b);if(Ye(b))return Xn(b,c,2)})):Ye(e)?t?h=()=>Xn(e,c,2):h=()=>(C&&C(),bn(e,c,3,[S])):h=un,t&&o){const b=h;h=()=>Ro(b())}let C,S=b=>{C=g.onStop=()=>{Xn(b,c,4),C=g.onStop=void 0}},A;if(gr)if(S=un,t?n&&bn(t,c,3,[h(),v?[]:void 0,S]):h(),a==="sync"){const b=nf();A=b.__watcherHandles||(b.__watcherHandles=[])}else return un;let y=v?new Array(e.length).fill(jr):jr;const $=()=>{if(!(!g.active||!g.dirty))if(t){const b=g.run();(o||f||(v?b.some((z,W)=>On(z,y[W])):On(b,y)))&&(C&&C(),bn(t,c,3,[b,y===jr?void 0:v&&y[0]===jr?[]:y,S]),y=b)}else g.run()};$.allowRecurse=!!t;let x;a==="sync"?x=$:a==="post"?x=()=>Yt($,c&&c.suspense):($.pre=!0,c&&($.id=c.uid),x=()=>xs($));const g=new Aa(h,un,x),p=Sd(),_=()=>{g.stop(),p&&ul(p.effects,g)};return t?n?$():y=g.run():a==="post"?Yt(g.run.bind(g),c&&c.suspense):g.run(),A&&A.push(_),_}function Ky(e,t,n){const o=this.proxy,a=Tt(e)?e.includes(".")?rf(o,e):()=>o[e]:e.bind(o,o);let r;Ye(t)?r=t:(r=t.handler,n=t);const s=Ko(this),l=vr(a,r.bind(o),n);return s(),l}function rf(e,t){const n=t.split(".");return()=>{let o=e;for(let a=0;a<n.length&&o;a++)o=o[n[a]];return o}}function Ro(e,t,n=0,o){if(!At(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if(o=o||new Set,o.has(e))return e;if(o.add(e),jt(e))Ro(e.value,t,n,o);else if(Fe(e))for(let a=0;a<e.length;a++)Ro(e[a],t,n,o);else if(Yo(e)||ha(e))e.forEach(a=>{Ro(a,t,n,o)});else if(Cd(e))for(const a in e)Ro(e[a],t,n,o);return e}function Ot(e,t){if(Nt===null)return e;const n=Ns(Nt)||Nt.proxy,o=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[r,s,l,c=gt]=t[a];r&&(Ye(r)&&(r={mounted:r,updated:r}),r.deep&&Ro(s),o.push({dir:r,instance:n,value:s,oldValue:void 0,arg:l,modifiers:c}))}return e}function Dn(e,t,n,o){const a=e.dirs,r=t&&t.dirs;for(let s=0;s<a.length;s++){const l=a[s];r&&(l.oldValue=r[s].value);let c=l.dir[o];c&&(Jo(),bn(c,n,8,[e.el,l,e,t]),Qo())}}const fo=Symbol("_leaveCb"),zr=Symbol("_enterCb");function El(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ft(()=>{e.isMounted=!0}),Xo(()=>{e.isUnmounting=!0}),e}const wn=[Function,Array],$l={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:wn,onEnter:wn,onAfterEnter:wn,onEnterCancelled:wn,onBeforeLeave:wn,onLeave:wn,onAfterLeave:wn,onLeaveCancelled:wn,onBeforeAppear:wn,onAppear:wn,onAfterAppear:wn,onAppearCancelled:wn},Gy={name:"BaseTransition",props:$l,setup(e,{slots:t}){const n=eo(),o=El();return()=>{const a=t.default&&ks(t.default(),!0);if(!a||!a.length)return;let r=a[0];if(a.length>1){for(const v of a)if(v.type!==Zt){r=v;break}}const s=rt(e),{mode:l}=s;if(o.isLeaving)return Ci(r);const c=mu(r);if(!c)return Ci(r);const d=wa(c,s,o,n);jo(c,d);const h=n.subTree,f=h&&mu(h);if(f&&f.type!==Zt&&!Nn(c,f)){const v=wa(f,s,o,n);if(jo(f,v),l==="out-in")return o.isLeaving=!0,v.afterLeave=()=>{o.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Ci(r);l==="in-out"&&c.type!==Zt&&(v.delayLeave=(C,S,A)=>{const y=lf(o,f);y[String(f.key)]=f,C[fo]=()=>{S(),C[fo]=void 0,delete d.delayedLeave},d.delayedLeave=A})}return r}}},sf=Gy;function lf(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function wa(e,t,n,o){const{appear:a,mode:r,persisted:s=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:d,onEnterCancelled:h,onBeforeLeave:f,onLeave:v,onAfterLeave:C,onLeaveCancelled:S,onBeforeAppear:A,onAppear:y,onAfterAppear:$,onAppearCancelled:x}=t,g=String(e.key),p=lf(n,e),_=(W,re)=>{W&&bn(W,o,9,re)},b=(W,re)=>{const le=re[1];_(W,re),Fe(W)?W.every(ce=>ce.length<=1)&&le():W.length<=1&&le()},z={mode:r,persisted:s,beforeEnter(W){let re=l;if(!n.isMounted)if(a)re=A||l;else return;W[fo]&&W[fo](!0);const le=p[g];le&&Nn(e,le)&&le.el[fo]&&le.el[fo](),_(re,[W])},enter(W){let re=c,le=d,ce=h;if(!n.isMounted)if(a)re=y||c,le=$||d,ce=x||h;else return;let ie=!1;const de=W[zr]=ye=>{ie||(ie=!0,ye?_(ce,[W]):_(le,[W]),z.delayedLeave&&z.delayedLeave(),W[zr]=void 0)};re?b(re,[W,de]):de()},leave(W,re){const le=String(e.key);if(W[zr]&&W[zr](!0),n.isUnmounting)return re();_(f,[W]);let ce=!1;const ie=W[fo]=de=>{ce||(ce=!0,re(),de?_(S,[W]):_(C,[W]),W[fo]=void 0,p[le]===e&&delete p[le])};p[le]=e,v?b(v,[W,ie]):ie()},clone(W){return wa(W,t,n,o)}};return z}function Ci(e){if(mr(e))return e=Bn(e),e.children=null,e}function mu(e){return mr(e)?e.children?e.children[0]:void 0:e}function jo(e,t){e.shapeFlag&6&&e.component?jo(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 ks(e,t=!1,n){let o=[],a=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===Me?(s.patchFlag&128&&a++,o=o.concat(ks(s.children,t,l))):(t||s.type!==Zt)&&o.push(l!=null?Bn(s,{key:l}):s)}if(a>1)for(let r=0;r<o.length;r++)o[r].patchFlag=-2;return o}/*! #__NO_SIDE_EFFECTS__ */function Ae(e,t){return Ye(e)?xt({name:e.name},t,{setup:e}):e}const Vo=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function zi(e){Ye(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:a=200,timeout:r,suspensible:s=!0,onError:l}=e;let c=null,d,h=0;const f=()=>(h++,c=null,v()),v=()=>{let C;return c||(C=c=t().catch(S=>{if(S=S instanceof Error?S:new Error(String(S)),l)return new Promise((A,y)=>{l(S,()=>A(f()),()=>y(S),h+1)});throw S}).then(S=>C!==c&&c?c:(S&&(S.__esModule||S[Symbol.toStringTag]==="Module")&&(S=S.default),d=S,S)))};return Ae({name:"AsyncComponentWrapper",__asyncLoader:v,get __asyncResolved(){return d},setup(){const C=Lt;if(d)return()=>wi(d,C);const S=x=>{c=null,qo(x,C,13,!o)};if(s&&C.suspense||gr)return v().then(x=>()=>wi(x,C)).catch(x=>(S(x),()=>o?Ve(o,{error:x}):null));const A=X(!1),y=X(),$=X(!!a);return a&&setTimeout(()=>{$.value=!1},a),r!=null&&setTimeout(()=>{if(!A.value&&!y.value){const x=new Error(`Async component timed out after ${r}ms.`);S(x),y.value=x}},r),v().then(()=>{A.value=!0,C.parent&&mr(C.parent.vnode)&&(C.parent.effect.dirty=!0,xs(C.parent.update))}).catch(x=>{S(x),y.value=x}),()=>{if(A.value&&d)return wi(d,C);if(y.value&&o)return Ve(o,{error:y.value});if(n&&!$.value)return Ve(n)}}})}function wi(e,t){const{ref:n,props:o,children:a,ce:r}=t.vnode,s=Ve(e,o,a);return s.ref=n,s.ce=r,delete t.vnode.ce,s}const mr=e=>e.type.__isKeepAlive,Yy={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=eo(),o=n.ctx;if(!o.renderer)return()=>{const x=t.default&&t.default();return x&&x.length===1?x[0]:x};const a=new Map,r=new Set;let s=null;const l=n.suspense,{renderer:{p:c,m:d,um:h,o:{createElement:f}}}=o,v=f("div");o.activate=(x,g,p,_,b)=>{const z=x.component;d(x,g,p,0,l),c(z.vnode,x,g,p,z,l,_,x.slotScopeIds,b),Yt(()=>{z.isDeactivated=!1,z.a&&ma(z.a);const W=x.props&&x.props.onVnodeMounted;W&&cn(W,z.parent,x)},l)},o.deactivate=x=>{const g=x.component;d(x,v,null,1,l),Yt(()=>{g.da&&ma(g.da);const p=x.props&&x.props.onVnodeUnmounted;p&&cn(p,g.parent,x),g.isDeactivated=!0},l)};function C(x){Ii(x),h(x,n,l,!0)}function S(x){a.forEach((g,p)=>{const _=nl(g.type);_&&(!x||!x(_))&&A(p)})}function A(x){const g=a.get(x);!s||!Nn(g,s)?C(g):s&&Ii(s),a.delete(x),r.delete(x)}Be(()=>[e.include,e.exclude],([x,g])=>{x&&S(p=>Ya(x,p)),g&&S(p=>!Ya(g,p))},{flush:"post",deep:!0});let y=null;const $=()=>{y!=null&&a.set(y,xi(n.subTree))};return Ft($),$s($),Xo(()=>{a.forEach(x=>{const{subTree:g,suspense:p}=n,_=xi(g);if(x.type===_.type&&x.key===_.key){Ii(_);const b=_.component.da;b&&Yt(b,p);return}C(x)})}),()=>{if(y=null,!t.default)return null;const x=t.default(),g=x[0];if(x.length>1)return s=null,x;if(!yo(g)||!(g.shapeFlag&4)&&!(g.shapeFlag&128))return s=null,g;let p=xi(g);const _=p.type,b=nl(Vo(p)?p.type.__asyncResolved||{}:_),{include:z,exclude:W,max:re}=e;if(z&&(!b||!Ya(z,b))||W&&b&&Ya(W,b))return s=p,g;const le=p.key==null?_:p.key,ce=a.get(le);return p.el&&(p=Bn(p),g.shapeFlag&128&&(g.ssContent=p)),y=le,ce?(p.el=ce.el,p.component=ce.component,p.transition&&jo(p,p.transition),p.shapeFlag|=512,r.delete(le),r.add(le)):(r.add(le),re&&r.size>parseInt(re,10)&&A(r.values().next().value)),p.shapeFlag|=256,s=p,Zd(g.type)?g:p}}},Jy=Yy;function Ya(e,t){return Fe(e)?e.some(n=>Ya(n,t)):Tt(e)?e.split(",").includes(t):kg(e)?e.test(t):!1}function cf(e,t){df(e,"a",t)}function uf(e,t){df(e,"da",t)}function df(e,t,n=Lt){const o=e.__wdc||(e.__wdc=()=>{let a=n;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(Es(t,o,n),n){let a=n.parent;for(;a&&a.parent;)mr(a.parent.vnode)&&Qy(o,t,n,a),a=a.parent}}function Qy(e,t,n,o){const a=Es(t,e,o,!0);Ln(()=>{ul(o[t],a)},n)}function Ii(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function xi(e){return e.shapeFlag&128?e.ssContent:e}function Es(e,t,n=Lt,o=!1){if(n){const a=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;Jo();const l=Ko(n),c=bn(t,n,e,s);return l(),Qo(),c});return o?a.unshift(r):a.push(r),r}}const Zn=e=>(t,n=Lt)=>(!gr||e==="sp")&&Es(e,(...o)=>t(...o),n),ka=Zn("bm"),Ft=Zn("m"),ff=Zn("bu"),$s=Zn("u"),Xo=Zn("bum"),Ln=Zn("um"),pf=Zn("sp"),hf=Zn("rtg"),vf=Zn("rtc");function mf(e,t=Lt){Es("ec",e,t)}function ft(e,t,n,o){let a;const r=n&&n[o];if(Fe(e)||Tt(e)){a=new Array(e.length);for(let s=0,l=e.length;s<l;s++)a[s]=t(e[s],s,void 0,r&&r[s])}else if(typeof e=="number"){a=new Array(e);for(let s=0;s<e;s++)a[s]=t(s+1,s,void 0,r&&r[s])}else if(At(e))if(e[Symbol.iterator])a=Array.from(e,(s,l)=>t(s,l,void 0,r&&r[l]));else{const s=Object.keys(e);a=new Array(s.length);for(let l=0,c=s.length;l<c;l++){const d=s[l];a[l]=t(e[d],d,l,r&&r[l])}}else a=[];return n&&(n[o]=a),a}function qy(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(Fe(o))for(let a=0;a<o.length;a++)e[o[a].name]=o[a].fn;else o&&(e[o.name]=o.key?(...a)=>{const r=o.fn(...a);return r&&(r.key=o.key),r}:o.fn)}return e}function It(e,t,n={},o,a){if(Nt.isCE||Nt.parent&&Vo(Nt.parent)&&Nt.parent.isCE)return t!=="default"&&(n.name=t),Ve("slot",n,o&&o());let r=e[t];r&&r._c&&(r._d=!1),w();const s=r&&gf(r(n)),l=Re(Me,{key:n.key||s&&s.key||`_${t}`},s||(o?o():[]),s&&e._===1?64:-2);return!a&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),r&&r._c&&(r._d=!0),l}function gf(e){return e.some(t=>yo(t)?!(t.type===Zt||t.type===Me&&!gf(t.children)):!0)?e:null}function Xy(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:qa(o)]=e[o];return n}const Wi=e=>e?Bf(e)?Ns(e)||e.proxy:Wi(e.parent):null,Xa=xt(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=>Wi(e.parent),$root:e=>Wi(e.root),$emit:e=>e.emit,$options:e=>Ml(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,xs(e.update)}),$nextTick:e=>e.n||(e.n=fn.bind(e.proxy)),$watch:e=>Ky.bind(e)}),Ti=(e,t)=>e!==gt&&!e.__isScriptSetup&&ut(e,t),Ki={get({_:e},t){const{ctx:n,setupState:o,data:a,props:r,accessCache:s,type:l,appContext:c}=e;let d;if(t[0]!=="$"){const C=s[t];if(C!==void 0)switch(C){case 1:return o[t];case 2:return a[t];case 4:return n[t];case 3:return r[t]}else{if(Ti(o,t))return s[t]=1,o[t];if(a!==gt&&ut(a,t))return s[t]=2,a[t];if((d=e.propsOptions[0])&&ut(d,t))return s[t]=3,r[t];if(n!==gt&&ut(n,t))return s[t]=4,n[t];Gi&&(s[t]=0)}}const h=Xa[t];let f,v;if(h)return t==="$attrs"&&pn(e,"get",t),h(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==gt&&ut(n,t))return s[t]=4,n[t];if(v=c.config.globalProperties,ut(v,t))return v[t]},set({_:e},t,n){const{data:o,setupState:a,ctx:r}=e;return Ti(a,t)?(a[t]=n,!0):o!==gt&&ut(o,t)?(o[t]=n,!0):ut(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:a,propsOptions:r}},s){let l;return!!n[s]||e!==gt&&ut(e,s)||Ti(t,s)||(l=r[0])&&ut(l,s)||ut(o,s)||ut(Xa,s)||ut(a.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ut(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Zy=xt({},Ki,{get(e,t){if(t!==Symbol.unscopables)return Ki.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Og(t)}});function e_(){return null}function t_(){return null}function n_(e){}function o_(e){}function a_(){return null}function r_(){}function s_(e,t){return null}function i_(){return yf().slots}function l_(){return yf().attrs}function yf(){const e=eo();return e.setupContext||(e.setupContext=Hf(e))}function ur(e){return Fe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function c_(e,t){const n=ur(e);for(const o in t){if(o.startsWith("__skip"))continue;let a=n[o];a?Fe(a)||Ye(a)?a=n[o]={type:a,default:t[o]}:a.default=t[o]:a===null&&(a=n[o]={default:t[o]}),a&&t[`__skip_${o}`]&&(a.skipFactory=!0)}return n}function Ea(e,t){return!e||!t?e||t:Fe(e)&&Fe(t)?e.concat(t):xt({},ur(e),ur(t))}function u_(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function d_(e){const t=eo();let n=e();return Zi(),dl(n)&&(n=n.catch(o=>{throw Ko(t),o})),[n,()=>Ko(t)]}let Gi=!0;function f_(e){const t=Ml(e),n=e.proxy,o=e.ctx;Gi=!1,t.beforeCreate&&gu(t.beforeCreate,e,"bc");const{data:a,computed:r,methods:s,watch:l,provide:c,inject:d,created:h,beforeMount:f,mounted:v,beforeUpdate:C,updated:S,activated:A,deactivated:y,beforeDestroy:$,beforeUnmount:x,destroyed:g,unmounted:p,render:_,renderTracked:b,renderTriggered:z,errorCaptured:W,serverPrefetch:re,expose:le,inheritAttrs:ce,components:ie,directives:de,filters:ye}=t;if(d&&p_(d,o,null),s)for(const pe in s){const ue=s[pe];Ye(ue)&&(o[pe]=ue.bind(n))}if(a){const pe=a.call(n,n);At(pe)&&(e.data=ws(pe))}if(Gi=!0,r)for(const pe in r){const ue=r[pe],Ne=Ye(ue)?ue.bind(n,n):Ye(ue.get)?ue.get.bind(n,n):un,wt=!Ye(ue)&&Ye(ue.set)?ue.set.bind(n):un,Je=Z({get:Ne,set:wt});Object.defineProperty(o,pe,{enumerable:!0,configurable:!0,get:()=>Je.value,set:_t=>Je.value=_t})}if(l)for(const pe in l)_f(l[pe],o,n,pe);if(c){const pe=Ye(c)?c.call(n):c;Reflect.ownKeys(pe).forEach(ue=>{Af(ue,pe[ue])})}h&&gu(h,e,"c");function ge(pe,ue){Fe(ue)?ue.forEach(Ne=>pe(Ne.bind(n))):ue&&pe(ue.bind(n))}if(ge(ka,f),ge(Ft,v),ge(ff,C),ge($s,S),ge(cf,A),ge(uf,y),ge(mf,W),ge(vf,b),ge(hf,z),ge(Xo,x),ge(Ln,p),ge(pf,re),Fe(le))if(le.length){const pe=e.exposed||(e.exposed={});le.forEach(ue=>{Object.defineProperty(pe,ue,{get:()=>n[ue],set:Ne=>n[ue]=Ne})})}else e.exposed||(e.exposed={});_&&e.render===un&&(e.render=_),ce!=null&&(e.inheritAttrs=ce),ie&&(e.components=ie),de&&(e.directives=de)}function p_(e,t,n=un){Fe(e)&&(e=Yi(e));for(const o in e){const a=e[o];let r;At(a)?"default"in a?r=G(a.from||o,a.default,!0):r=G(a.from||o):r=G(a),jt(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[o]=r}}function gu(e,t,n){bn(Fe(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function _f(e,t,n,o){const a=o.includes(".")?rf(n,o):()=>n[o];if(Tt(e)){const r=t[e];Ye(r)&&Be(a,r)}else if(Ye(e))Be(a,e.bind(n));else if(At(e))if(Fe(e))e.forEach(r=>_f(r,t,n,o));else{const r=Ye(e.handler)?e.handler.bind(n):t[e.handler];Ye(r)&&Be(a,r,e)}}function Ml(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:a,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,l=r.get(t);let c;return l?c=l:!a.length&&!n&&!o?c=t:(c={},a.length&&a.forEach(d=>ds(c,d,s,!0)),ds(c,t,s)),At(t)&&r.set(t,c),c}function ds(e,t,n,o=!1){const{mixins:a,extends:r}=t;r&&ds(e,r,n,!0),a&&a.forEach(s=>ds(e,s,n,!0));for(const s in t)if(!(o&&s==="expose")){const l=h_[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const h_={data:yu,props:_u,emits:_u,methods:Ja,computed:Ja,beforeCreate:on,created:on,beforeMount:on,mounted:on,beforeUpdate:on,updated:on,beforeDestroy:on,beforeUnmount:on,destroyed:on,unmounted:on,activated:on,deactivated:on,errorCaptured:on,serverPrefetch:on,components:Ja,directives:Ja,watch:m_,provide:yu,inject:v_};function yu(e,t){return t?e?function(){return xt(Ye(e)?e.call(this,this):e,Ye(t)?t.call(this,this):t)}:t:e}function v_(e,t){return Ja(Yi(e),Yi(t))}function Yi(e){if(Fe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function on(e,t){return e?[...new Set([].concat(e,t))]:t}function Ja(e,t){return e?xt(Object.create(null),e,t):t}function _u(e,t){return e?Fe(e)&&Fe(t)?[...new Set([...e,...t])]:xt(Object.create(null),ur(e),ur(t??{})):t}function m_(e,t){if(!e)return t;if(!t)return e;const n=xt(Object.create(null),e);for(const o in t)n[o]=on(e[o],t[o]);return n}function bf(){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 g_=0;function y_(e,t){return function(o,a=null){Ye(o)||(o=xt({},o)),a!=null&&!At(a)&&(a=null);const r=bf(),s=new WeakSet;let l=!1;const c=r.app={_uid:g_++,_component:o,_props:a,_container:null,_context:r,_instance:null,version:zf,get config(){return r.config},set config(d){},use(d,...h){return s.has(d)||(d&&Ye(d.install)?(s.add(d),d.install(c,...h)):Ye(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 v=Ve(o,a);return v.appContext=r,f===!0?f="svg":f===!1&&(f=void 0),h&&t?t(v,d):e(v,d,f),l=!0,c._container=d,d.__vue_app__=c,Ns(v.component)||v.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=ba;ba=c;try{return d()}finally{ba=h}}};return c}}let ba=null;function Af(e,t){if(Lt){let n=Lt.provides;const o=Lt.parent&&Lt.parent.provides;o===n&&(n=Lt.provides=Object.create(o)),n[e]=t}}function G(e,t,n=!1){const o=Lt||Nt;if(o||ba){const a=o?o.parent==null?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:ba._context.provides;if(a&&e in a)return a[e];if(arguments.length>1)return n&&Ye(t)?t.call(o&&o.proxy):t}}function __(){return!!(Lt||Nt||ba)}function b_(e,t,n,o=!1){const a={},r={};ss(r,Ms,1),e.propsDefaults=Object.create(null),Cf(e,t,a,r);for(const s in e.propsOptions[0])s in a||(a[s]=void 0);n?e.props=o?a:Ud(a):e.type.props?e.props=a:e.props=r,e.attrs=r}function A_(e,t,n,o){const{props:a,attrs:r,vnode:{patchFlag:s}}=e,l=rt(a),[c]=e.propsOptions;let d=!1;if((o||s>0)&&!(s&16)){if(s&8){const h=e.vnode.dynamicProps;for(let f=0;f<h.length;f++){let v=h[f];if(Ts(e.emitsOptions,v))continue;const C=t[v];if(c)if(ut(r,v))C!==r[v]&&(r[v]=C,d=!0);else{const S=an(v);a[S]=Ji(c,l,S,C,e,!1)}else C!==r[v]&&(r[v]=C,d=!0)}}}else{Cf(e,t,a,r)&&(d=!0);let h;for(const f in l)(!t||!ut(t,f)&&((h=_n(f))===f||!ut(t,h)))&&(c?n&&(n[f]!==void 0||n[h]!==void 0)&&(a[f]=Ji(c,l,f,void 0,e,!0)):delete a[f]);if(r!==l)for(const f in r)(!t||!ut(t,f))&&(delete r[f],d=!0)}d&&qn(e,"set","$attrs")}function Cf(e,t,n,o){const[a,r]=e.propsOptions;let s=!1,l;if(t)for(let c in t){if(va(c))continue;const d=t[c];let h;a&&ut(a,h=an(c))?!r||!r.includes(h)?n[h]=d:(l||(l={}))[h]=d:Ts(e.emitsOptions,c)||(!(c in o)||d!==o[c])&&(o[c]=d,s=!0)}if(r){const c=rt(n),d=l||gt;for(let h=0;h<r.length;h++){const f=r[h];n[f]=Ji(a,c,f,d[f],e,!ut(d,f))}}return s}function Ji(e,t,n,o,a,r){const s=e[n];if(s!=null){const l=ut(s,"default");if(l&&o===void 0){const c=s.default;if(s.type!==Function&&!s.skipFactory&&Ye(c)){const{propsDefaults:d}=a;if(n in d)o=d[n];else{const h=Ko(a);o=d[n]=c.call(null,t),h()}}else o=c}s[0]&&(r&&!l?o=!1:s[1]&&(o===""||o===_n(n))&&(o=!0))}return o}function wf(e,t,n=!1){const o=t.propsCache,a=o.get(e);if(a)return a;const r=e.props,s={},l=[];let c=!1;if(!Ye(e)){const h=f=>{c=!0;const[v,C]=wf(f,t,!0);xt(s,v),C&&l.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!r&&!c)return At(e)&&o.set(e,pa),pa;if(Fe(r))for(let h=0;h<r.length;h++){const f=an(r[h]);bu(f)&&(s[f]=gt)}else if(r)for(const h in r){const f=an(h);if(bu(f)){const v=r[h],C=s[f]=Fe(v)||Ye(v)?{type:v}:xt({},v);if(C){const S=wu(Boolean,C.type),A=wu(String,C.type);C[0]=S>-1,C[1]=A<0||S<A,(S>-1||ut(C,"default"))&&l.push(f)}}}const d=[s,l];return At(e)&&o.set(e,d),d}function bu(e){return e[0]!=="$"&&!va(e)}function Au(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Cu(e,t){return Au(e)===Au(t)}function wu(e,t){return Fe(t)?t.findIndex(n=>Cu(n,e)):Ye(t)&&Cu(t,e)?0:-1}const If=e=>e[0]==="_"||e==="$stable",Nl=e=>Fe(e)?e.map(yn):[yn(e)],C_=(e,t,n)=>{if(t._n)return t;const o=ze((...a)=>Nl(t(...a)),n);return o._c=!1,o},xf=(e,t,n)=>{const o=e._ctx;for(const a in e){if(If(a))continue;const r=e[a];if(Ye(r))t[a]=C_(a,r,o);else if(r!=null){const s=Nl(r);t[a]=()=>s}}},Tf=(e,t)=>{const n=Nl(t);e.slots.default=()=>n},w_=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=rt(t),ss(t,"_",n)):xf(t,e.slots={})}else e.slots={},t&&Tf(e,t);ss(e.slots,Ms,1)},I_=(e,t,n)=>{const{vnode:o,slots:a}=e;let r=!0,s=gt;if(o.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:(xt(a,t),!n&&l===1&&delete a._):(r=!t.$stable,xf(t,a)),s=t}else t&&(Tf(e,t),s={default:1});if(r)for(const l in a)!If(l)&&s[l]==null&&delete a[l]};function fs(e,t,n,o,a=!1){if(Fe(e)){e.forEach((v,C)=>fs(v,t&&(Fe(t)?t[C]:t),n,o,a));return}if(Vo(o)&&!a)return;const r=o.shapeFlag&4?Ns(o.component)||o.component.proxy:o.el,s=a?null:r,{i:l,r:c}=e,d=t&&t.r,h=l.refs===gt?l.refs={}:l.refs,f=l.setupState;if(d!=null&&d!==c&&(Tt(d)?(h[d]=null,ut(f,d)&&(f[d]=null)):jt(d)&&(d.value=null)),Ye(c))Xn(c,l,12,[s,h]);else{const v=Tt(c),C=jt(c);if(v||C){const S=()=>{if(e.f){const A=v?ut(f,c)?f[c]:h[c]:c.value;a?Fe(A)&&ul(A,r):Fe(A)?A.includes(r)||A.push(r):v?(h[c]=[r],ut(f,c)&&(f[c]=h[c])):(c.value=[r],e.k&&(h[e.k]=c.value))}else v?(h[c]=s,ut(f,c)&&(f[c]=s)):C&&(c.value=s,e.k&&(h[e.k]=s))};s?(S.id=-1,Yt(S,n)):S()}}}let io=!1;const x_=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",T_=e=>e.namespaceURI.includes("MathML"),Wr=e=>{if(x_(e))return"svg";if(T_(e))return"mathml"},Kr=e=>e.nodeType===8;function S_(e){const{mt:t,p:n,o:{patchProp:o,createText:a,nextSibling:r,parentNode:s,remove:l,insert:c,createComment:d}}=e,h=(g,p)=>{if(!p.hasChildNodes()){n(null,g,p),us(),p._vnode=g;return}io=!1,f(p.firstChild,g,null,null,null),us(),p._vnode=g,io&&console.error("Hydration completed but contains mismatches.")},f=(g,p,_,b,z,W=!1)=>{const re=Kr(g)&&g.data==="[",le=()=>A(g,p,_,b,z,re),{type:ce,ref:ie,shapeFlag:de,patchFlag:ye}=p;let Ee=g.nodeType;p.el=g,ye===-2&&(W=!1,p.dynamicChildren=null);let ge=null;switch(ce){case zo:Ee!==3?p.children===""?(c(p.el=a(""),s(g),g),ge=g):ge=le():(g.data!==p.children&&(io=!0,g.data=p.children),ge=r(g));break;case Zt:x(g)?(ge=r(g),$(p.el=g.content.firstChild,g,_)):Ee!==8||re?ge=le():ge=r(g);break;case Uo:if(re&&(g=r(g),Ee=g.nodeType),Ee===1||Ee===3){ge=g;const pe=!p.children.length;for(let ue=0;ue<p.staticCount;ue++)pe&&(p.children+=ge.nodeType===1?ge.outerHTML:ge.data),ue===p.staticCount-1&&(p.anchor=ge),ge=r(ge);return re?r(ge):ge}else le();break;case Me:re?ge=S(g,p,_,b,z,W):ge=le();break;default:if(de&1)(Ee!==1||p.type.toLowerCase()!==g.tagName.toLowerCase())&&!x(g)?ge=le():ge=v(g,p,_,b,z,W);else if(de&6){p.slotScopeIds=z;const pe=s(g);if(re?ge=y(g):Kr(g)&&g.data==="teleport start"?ge=y(g,g.data,"teleport end"):ge=r(g),t(p,pe,null,_,b,Wr(pe),W),Vo(p)){let ue;re?(ue=Ve(Me),ue.anchor=ge?ge.previousSibling:pe.lastChild):ue=g.nodeType===3?yt(""):Ve("div"),ue.el=g,p.component.subTree=ue}}else de&64?Ee!==8?ge=le():ge=p.type.hydrate(g,p,_,b,z,W,e,C):de&128&&(ge=p.type.hydrate(g,p,_,b,Wr(s(g)),z,W,e,f))}return ie!=null&&fs(ie,null,b,p),ge},v=(g,p,_,b,z,W)=>{W=W||!!p.dynamicChildren;const{type:re,props:le,patchFlag:ce,shapeFlag:ie,dirs:de,transition:ye}=p,Ee=re==="input"||re==="option";if(Ee||ce!==-1){de&&Dn(p,null,_,"created");let ge=!1;if(x(g)){ge=$f(b,ye)&&_&&_.vnode.props&&_.vnode.props.appear;const ue=g.content.firstChild;ge&&ye.beforeEnter(ue),$(ue,g,_),p.el=g=ue}if(ie&16&&!(le&&(le.innerHTML||le.textContent))){let ue=C(g.firstChild,p,g,_,b,z,W);for(;ue;){io=!0;const Ne=ue;ue=ue.nextSibling,l(Ne)}}else ie&8&&g.textContent!==p.children&&(io=!0,g.textContent=p.children);if(le)if(Ee||!W||ce&48)for(const ue in le)(Ee&&(ue.endsWith("value")||ue==="indeterminate")||fr(ue)&&!va(ue)||ue[0]===".")&&o(g,ue,null,le[ue],void 0,void 0,_);else le.onClick&&o(g,"onClick",null,le.onClick,void 0,void 0,_);let pe;(pe=le&&le.onVnodeBeforeMount)&&cn(pe,_,p),de&&Dn(p,null,_,"beforeMount"),((pe=le&&le.onVnodeMounted)||de||ge)&&ef(()=>{pe&&cn(pe,_,p),ge&&ye.enter(g),de&&Dn(p,null,_,"mounted")},b)}return g.nextSibling},C=(g,p,_,b,z,W,re)=>{re=re||!!p.dynamicChildren;const le=p.children,ce=le.length;for(let ie=0;ie<ce;ie++){const de=re?le[ie]:le[ie]=yn(le[ie]);if(g)g=f(g,de,b,z,W,re);else{if(de.type===zo&&!de.children)continue;io=!0,n(null,de,_,null,b,z,Wr(_),W)}}return g},S=(g,p,_,b,z,W)=>{const{slotScopeIds:re}=p;re&&(z=z?z.concat(re):re);const le=s(g),ce=C(r(g),p,le,_,b,z,W);return ce&&Kr(ce)&&ce.data==="]"?r(p.anchor=ce):(io=!0,c(p.anchor=d("]"),le,ce),ce)},A=(g,p,_,b,z,W)=>{if(io=!0,p.el=null,W){const ce=y(g);for(;;){const ie=r(g);if(ie&&ie!==ce)l(ie);else break}}const re=r(g),le=s(g);return l(g),n(null,p,le,re,_,b,Wr(le),z),re},y=(g,p="[",_="]")=>{let b=0;for(;g;)if(g=r(g),g&&Kr(g)&&(g.data===p&&b++,g.data===_)){if(b===0)return r(g);b--}return g},$=(g,p,_)=>{const b=p.parentNode;b&&b.replaceChild(g,p);let z=_;for(;z;)z.vnode.el===p&&(z.vnode.el=z.subTree.el=g),z=z.parent},x=g=>g.nodeType===1&&g.tagName.toLowerCase()==="template";return[h,f]}const Yt=ef;function Sf(e){return Ef(e)}function kf(e){return Ef(e,S_)}function Ef(e,t){const n=wd();n.__VUE__=!0;const{insert:o,remove:a,patchProp:r,createElement:s,createText:l,createComment:c,setText:d,setElementText:h,parentNode:f,nextSibling:v,setScopeId:C=un,insertStaticContent:S}=e,A=(T,L,q,se=null,R=null,J=null,ne=void 0,Q=null,oe=!!L.dynamicChildren)=>{if(T===L)return;T&&!Nn(T,L)&&(se=F(T),_t(T,R,J,!0),T=null),L.patchFlag===-2&&(oe=!1,L.dynamicChildren=null);const{type:te,ref:me,shapeFlag:$e}=L;switch(te){case zo:y(T,L,q,se);break;case Zt:$(T,L,q,se);break;case Uo:T==null&&x(L,q,se,ne);break;case Me:ie(T,L,q,se,R,J,ne,Q,oe);break;default:$e&1?_(T,L,q,se,R,J,ne,Q,oe):$e&6?de(T,L,q,se,R,J,ne,Q,oe):($e&64||$e&128)&&te.process(T,L,q,se,R,J,ne,Q,oe,ee)}me!=null&&R&&fs(me,T&&T.ref,J,L||T,!L)},y=(T,L,q,se)=>{if(T==null)o(L.el=l(L.children),q,se);else{const R=L.el=T.el;L.children!==T.children&&d(R,L.children)}},$=(T,L,q,se)=>{T==null?o(L.el=c(L.children||""),q,se):L.el=T.el},x=(T,L,q,se)=>{[T.el,T.anchor]=S(T.children,L,q,se,T.el,T.anchor)},g=({el:T,anchor:L},q,se)=>{let R;for(;T&&T!==L;)R=v(T),o(T,q,se),T=R;o(L,q,se)},p=({el:T,anchor:L})=>{let q;for(;T&&T!==L;)q=v(T),a(T),T=q;a(L)},_=(T,L,q,se,R,J,ne,Q,oe)=>{L.type==="svg"?ne="svg":L.type==="math"&&(ne="mathml"),T==null?b(L,q,se,R,J,ne,Q,oe):re(T,L,R,J,ne,Q,oe)},b=(T,L,q,se,R,J,ne,Q)=>{let oe,te;const{props:me,shapeFlag:$e,transition:Se,dirs:Ue}=T;if(oe=T.el=s(T.type,J,me&&me.is,me),$e&8?h(oe,T.children):$e&16&&W(T.children,oe,null,se,R,Si(T,J),ne,Q),Ue&&Dn(T,null,se,"created"),z(oe,T,T.scopeId,ne,se),me){for(const Qe in me)Qe!=="value"&&!va(Qe)&&r(oe,Qe,null,me[Qe],J,T.children,se,R,E);"value"in me&&r(oe,"value",null,me.value,J),(te=me.onVnodeBeforeMount)&&cn(te,se,T)}Ue&&Dn(T,null,se,"beforeMount");const Ge=$f(R,Se);Ge&&Se.beforeEnter(oe),o(oe,L,q),((te=me&&me.onVnodeMounted)||Ge||Ue)&&Yt(()=>{te&&cn(te,se,T),Ge&&Se.enter(oe),Ue&&Dn(T,null,se,"mounted")},R)},z=(T,L,q,se,R)=>{if(q&&C(T,q),se)for(let J=0;J<se.length;J++)C(T,se[J]);if(R){let J=R.subTree;if(L===J){const ne=R.vnode;z(T,ne,ne.scopeId,ne.slotScopeIds,R.parent)}}},W=(T,L,q,se,R,J,ne,Q,oe=0)=>{for(let te=oe;te<T.length;te++){const me=T[te]=Q?po(T[te]):yn(T[te]);A(null,me,L,q,se,R,J,ne,Q)}},re=(T,L,q,se,R,J,ne)=>{const Q=L.el=T.el;let{patchFlag:oe,dynamicChildren:te,dirs:me}=L;oe|=T.patchFlag&16;const $e=T.props||gt,Se=L.props||gt;let Ue;if(q&&Mo(q,!1),(Ue=Se.onVnodeBeforeUpdate)&&cn(Ue,q,L,T),me&&Dn(L,T,q,"beforeUpdate"),q&&Mo(q,!0),te?le(T.dynamicChildren,te,Q,q,se,Si(L,R),J):ne||ue(T,L,Q,null,q,se,Si(L,R),J,!1),oe>0){if(oe&16)ce(Q,L,$e,Se,q,se,R);else if(oe&2&&$e.class!==Se.class&&r(Q,"class",null,Se.class,R),oe&4&&r(Q,"style",$e.style,Se.style,R),oe&8){const Ge=L.dynamicProps;for(let Qe=0;Qe<Ge.length;Qe++){const ct=Ge[Qe],pt=$e[ct],kt=Se[ct];(kt!==pt||ct==="value")&&r(Q,ct,pt,kt,R,T.children,q,se,E)}}oe&1&&T.children!==L.children&&h(Q,L.children)}else!ne&&te==null&&ce(Q,L,$e,Se,q,se,R);((Ue=Se.onVnodeUpdated)||me)&&Yt(()=>{Ue&&cn(Ue,q,L,T),me&&Dn(L,T,q,"updated")},se)},le=(T,L,q,se,R,J,ne)=>{for(let Q=0;Q<L.length;Q++){const oe=T[Q],te=L[Q],me=oe.el&&(oe.type===Me||!Nn(oe,te)||oe.shapeFlag&70)?f(oe.el):q;A(oe,te,me,null,se,R,J,ne,!0)}},ce=(T,L,q,se,R,J,ne)=>{if(q!==se){if(q!==gt)for(const Q in q)!va(Q)&&!(Q in se)&&r(T,Q,q[Q],null,ne,L.children,R,J,E);for(const Q in se){if(va(Q))continue;const oe=se[Q],te=q[Q];oe!==te&&Q!=="value"&&r(T,Q,te,oe,ne,L.children,R,J,E)}"value"in se&&r(T,"value",q.value,se.value,ne)}},ie=(T,L,q,se,R,J,ne,Q,oe)=>{const te=L.el=T?T.el:l(""),me=L.anchor=T?T.anchor:l("");let{patchFlag:$e,dynamicChildren:Se,slotScopeIds:Ue}=L;Ue&&(Q=Q?Q.concat(Ue):Ue),T==null?(o(te,q,se),o(me,q,se),W(L.children||[],q,me,R,J,ne,Q,oe)):$e>0&&$e&64&&Se&&T.dynamicChildren?(le(T.dynamicChildren,Se,q,R,J,ne,Q),(L.key!=null||R&&L===R.subTree)&&Ol(T,L,!0)):ue(T,L,q,me,R,J,ne,Q,oe)},de=(T,L,q,se,R,J,ne,Q,oe)=>{L.slotScopeIds=Q,T==null?L.shapeFlag&512?R.ctx.activate(L,q,se,ne,oe):ye(L,q,se,R,J,ne,oe):Ee(T,L,oe)},ye=(T,L,q,se,R,J,ne)=>{const Q=T.component=Ff(T,se,R);if(mr(T)&&(Q.ctx.renderer=ee),Vf(Q),Q.asyncDep){if(R&&R.registerDep(Q,ge),!T.el){const oe=Q.subTree=Ve(Zt);$(null,oe,L,q)}}else ge(Q,T,L,q,R,J,ne)},Ee=(T,L,q)=>{const se=L.component=T.component;if(Ly(T,L,q))if(se.asyncDep&&!se.asyncResolved){pe(se,L,q);return}else se.next=L,ky(se.update),se.effect.dirty=!0,se.update();else L.el=T.el,se.vnode=L},ge=(T,L,q,se,R,J,ne)=>{const Q=()=>{if(T.isMounted){let{next:me,bu:$e,u:Se,parent:Ue,vnode:Ge}=T;{const tn=Mf(T);if(tn){me&&(me.el=Ge.el,pe(T,me,ne)),tn.asyncDep.then(()=>{T.isUnmounted||Q()});return}}let Qe=me,ct;Mo(T,!1),me?(me.el=Ge.el,pe(T,me,ne)):me=Ge,$e&&ma($e),(ct=me.props&&me.props.onVnodeBeforeUpdate)&&cn(ct,Ue,me,Ge),Mo(T,!0);const pt=ns(T),kt=T.subTree;T.subTree=pt,A(kt,pt,f(kt.el),F(kt),T,R,J),me.el=pt.el,Qe===null&&xl(T,pt.el),Se&&Yt(Se,R),(ct=me.props&&me.props.onVnodeUpdated)&&Yt(()=>cn(ct,Ue,me,Ge),R)}else{let me;const{el:$e,props:Se}=L,{bm:Ue,m:Ge,parent:Qe}=T,ct=Vo(L);if(Mo(T,!1),Ue&&ma(Ue),!ct&&(me=Se&&Se.onVnodeBeforeMount)&&cn(me,Qe,L),Mo(T,!0),$e&&Te){const pt=()=>{T.subTree=ns(T),Te($e,T.subTree,T,R,null)};ct?L.type.__asyncLoader().then(()=>!T.isUnmounted&&pt()):pt()}else{const pt=T.subTree=ns(T);A(null,pt,q,se,T,R,J),L.el=pt.el}if(Ge&&Yt(Ge,R),!ct&&(me=Se&&Se.onVnodeMounted)){const pt=L;Yt(()=>cn(me,Qe,pt),R)}(L.shapeFlag&256||Qe&&Vo(Qe.vnode)&&Qe.vnode.shapeFlag&256)&&T.a&&Yt(T.a,R),T.isMounted=!0,L=q=se=null}},oe=T.effect=new Aa(Q,un,()=>xs(te),T.scope),te=T.update=()=>{oe.dirty&&oe.run()};te.id=T.uid,Mo(T,!0),te()},pe=(T,L,q)=>{L.component=T;const se=T.vnode.props;T.vnode=L,T.next=null,A_(T,L.props,se,q),I_(T,L.children,q),Jo(),fu(T),Qo()},ue=(T,L,q,se,R,J,ne,Q,oe=!1)=>{const te=T&&T.children,me=T?T.shapeFlag:0,$e=L.children,{patchFlag:Se,shapeFlag:Ue}=L;if(Se>0){if(Se&128){wt(te,$e,q,se,R,J,ne,Q,oe);return}else if(Se&256){Ne(te,$e,q,se,R,J,ne,Q,oe);return}}Ue&8?(me&16&&E(te,R,J),$e!==te&&h(q,$e)):me&16?Ue&16?wt(te,$e,q,se,R,J,ne,Q,oe):E(te,R,J,!0):(me&8&&h(q,""),Ue&16&&W($e,q,se,R,J,ne,Q,oe))},Ne=(T,L,q,se,R,J,ne,Q,oe)=>{T=T||pa,L=L||pa;const te=T.length,me=L.length,$e=Math.min(te,me);let Se;for(Se=0;Se<$e;Se++){const Ue=L[Se]=oe?po(L[Se]):yn(L[Se]);A(T[Se],Ue,q,null,R,J,ne,Q,oe)}te>me?E(T,R,J,!0,!1,$e):W(L,q,se,R,J,ne,Q,oe,$e)},wt=(T,L,q,se,R,J,ne,Q,oe)=>{let te=0;const me=L.length;let $e=T.length-1,Se=me-1;for(;te<=$e&&te<=Se;){const Ue=T[te],Ge=L[te]=oe?po(L[te]):yn(L[te]);if(Nn(Ue,Ge))A(Ue,Ge,q,null,R,J,ne,Q,oe);else break;te++}for(;te<=$e&&te<=Se;){const Ue=T[$e],Ge=L[Se]=oe?po(L[Se]):yn(L[Se]);if(Nn(Ue,Ge))A(Ue,Ge,q,null,R,J,ne,Q,oe);else break;$e--,Se--}if(te>$e){if(te<=Se){const Ue=Se+1,Ge=Ue<me?L[Ue].el:se;for(;te<=Se;)A(null,L[te]=oe?po(L[te]):yn(L[te]),q,Ge,R,J,ne,Q,oe),te++}}else if(te>Se)for(;te<=$e;)_t(T[te],R,J,!0),te++;else{const Ue=te,Ge=te,Qe=new Map;for(te=Ge;te<=Se;te++){const Et=L[te]=oe?po(L[te]):yn(L[te]);Et.key!=null&&Qe.set(Et.key,te)}let ct,pt=0;const kt=Se-Ge+1;let tn=!1,jn=0;const Cn=new Array(kt);for(te=0;te<kt;te++)Cn[te]=0;for(te=Ue;te<=$e;te++){const Et=T[te];if(pt>=kt){_t(Et,R,J,!0);continue}let nn;if(Et.key!=null)nn=Qe.get(Et.key);else for(ct=Ge;ct<=Se;ct++)if(Cn[ct-Ge]===0&&Nn(Et,L[ct])){nn=ct;break}nn===void 0?_t(Et,R,J,!0):(Cn[nn-Ge]=te+1,nn>=jn?jn=nn:tn=!0,A(Et,L[nn],q,null,R,J,ne,Q,oe),pt++)}const ea=tn?k_(Cn):pa;for(ct=ea.length-1,te=kt-1;te>=0;te--){const Et=Ge+te,nn=L[Et],xo=Et+1<me?L[Et+1].el:se;Cn[te]===0?A(null,nn,q,xo,R,J,ne,Q,oe):tn&&(ct<0||te!==ea[ct]?Je(nn,q,xo,2):ct--)}}},Je=(T,L,q,se,R=null)=>{const{el:J,type:ne,transition:Q,children:oe,shapeFlag:te}=T;if(te&6){Je(T.component.subTree,L,q,se);return}if(te&128){T.suspense.move(L,q,se);return}if(te&64){ne.move(T,L,q,ee);return}if(ne===Me){o(J,L,q);for(let $e=0;$e<oe.length;$e++)Je(oe[$e],L,q,se);o(T.anchor,L,q);return}if(ne===Uo){g(T,L,q);return}if(se!==2&&te&1&&Q)if(se===0)Q.beforeEnter(J),o(J,L,q),Yt(()=>Q.enter(J),R);else{const{leave:$e,delayLeave:Se,afterLeave:Ue}=Q,Ge=()=>o(J,L,q),Qe=()=>{$e(J,()=>{Ge(),Ue&&Ue()})};Se?Se(J,Ge,Qe):Qe()}else o(J,L,q)},_t=(T,L,q,se=!1,R=!1)=>{const{type:J,props:ne,ref:Q,children:oe,dynamicChildren:te,shapeFlag:me,patchFlag:$e,dirs:Se}=T;if(Q!=null&&fs(Q,null,q,T,!0),me&256){L.ctx.deactivate(T);return}const Ue=me&1&&Se,Ge=!Vo(T);let Qe;if(Ge&&(Qe=ne&&ne.onVnodeBeforeUnmount)&&cn(Qe,L,T),me&6)st(T.component,q,se);else{if(me&128){T.suspense.unmount(q,se);return}Ue&&Dn(T,null,L,"beforeUnmount"),me&64?T.type.remove(T,L,q,R,ee,se):te&&(J!==Me||$e>0&&$e&64)?E(te,L,q,!1,!0):(J===Me&&$e&384||!R&&me&16)&&E(oe,L,q),se&&xe(T)}(Ge&&(Qe=ne&&ne.onVnodeUnmounted)||Ue)&&Yt(()=>{Qe&&cn(Qe,L,T),Ue&&Dn(T,null,L,"unmounted")},q)},xe=T=>{const{type:L,el:q,anchor:se,transition:R}=T;if(L===Me){je(q,se);return}if(L===Uo){p(T);return}const J=()=>{a(q),R&&!R.persisted&&R.afterLeave&&R.afterLeave()};if(T.shapeFlag&1&&R&&!R.persisted){const{leave:ne,delayLeave:Q}=R,oe=()=>ne(q,J);Q?Q(T.el,J,oe):oe()}else J()},je=(T,L)=>{let q;for(;T!==L;)q=v(T),a(T),T=q;a(L)},st=(T,L,q)=>{const{bum:se,scope:R,update:J,subTree:ne,um:Q}=T;se&&ma(se),R.stop(),J&&(J.active=!1,_t(ne,T,L,q)),Q&&Yt(Q,L),Yt(()=>{T.isUnmounted=!0},L),L&&L.pendingBranch&&!L.isUnmounted&&T.asyncDep&&!T.asyncResolved&&T.suspenseId===L.pendingId&&(L.deps--,L.deps===0&&L.resolve())},E=(T,L,q,se=!1,R=!1,J=0)=>{for(let ne=J;ne<T.length;ne++)_t(T[ne],L,q,se,R)},F=T=>T.shapeFlag&6?F(T.component.subTree):T.shapeFlag&128?T.suspense.next():v(T.anchor||T.el);let D=!1;const j=(T,L,q)=>{T==null?L._vnode&&_t(L._vnode,null,null,!0):A(L._vnode||null,T,L,null,null,null,q),D||(D=!0,fu(),us(),D=!1),L._vnode=T},ee={p:A,um:_t,m:Je,r:xe,mt:ye,mc:W,pc:ue,pbc:le,n:F,o:e};let we,Te;return t&&([we,Te]=t(ee)),{render:j,hydrate:we,createApp:y_(j,we)}}function Si({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 Mo({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function $f(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ol(e,t,n=!1){const o=e.children,a=t.children;if(Fe(o)&&Fe(a))for(let r=0;r<o.length;r++){const s=o[r];let l=a[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=a[r]=po(a[r]),l.el=s.el),n||Ol(s,l)),l.type===zo&&(l.el=s.el)}}function k_(e){const t=e.slice(),n=[0];let o,a,r,s,l;const c=e.length;for(o=0;o<c;o++){const d=e[o];if(d!==0){if(a=n[n.length-1],e[a]<d){t[o]=a,n.push(o);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[o]=n[r-1]),n[r]=o)}}for(r=n.length,s=n[r-1];r-- >0;)n[r]=s,s=t[s];return n}function Mf(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Mf(t)}const E_=e=>e.__isTeleport,Za=e=>e&&(e.disabled||e.disabled===""),Iu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,xu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Qi=(e,t)=>{const n=e&&e.to;return Tt(n)?t?t(n):null:n},$_={name:"Teleport",__isTeleport:!0,process(e,t,n,o,a,r,s,l,c,d){const{mc:h,pc:f,pbc:v,o:{insert:C,querySelector:S,createText:A,createComment:y}}=d,$=Za(t.props);let{shapeFlag:x,children:g,dynamicChildren:p}=t;if(e==null){const _=t.el=A(""),b=t.anchor=A("");C(_,n,o),C(b,n,o);const z=t.target=Qi(t.props,S),W=t.targetAnchor=A("");z&&(C(W,z),s==="svg"||Iu(z)?s="svg":(s==="mathml"||xu(z))&&(s="mathml"));const re=(le,ce)=>{x&16&&h(g,le,ce,a,r,s,l,c)};$?re(n,b):z&&re(z,W)}else{t.el=e.el;const _=t.anchor=e.anchor,b=t.target=e.target,z=t.targetAnchor=e.targetAnchor,W=Za(e.props),re=W?n:b,le=W?_:z;if(s==="svg"||Iu(b)?s="svg":(s==="mathml"||xu(b))&&(s="mathml"),p?(v(e.dynamicChildren,p,re,a,r,s,l),Ol(e,t,!0)):c||f(e,t,re,le,a,r,s,l,!1),$)W?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Gr(t,n,_,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const ce=t.target=Qi(t.props,S);ce&&Gr(t,ce,null,d,0)}else W&&Gr(t,b,z,d,1)}Nf(t)},remove(e,t,n,o,{um:a,o:{remove:r}},s){const{shapeFlag:l,children:c,anchor:d,targetAnchor:h,target:f,props:v}=e;if(f&&r(h),s&&r(d),l&16){const C=s||!Za(v);for(let S=0;S<c.length;S++){const A=c[S];a(A,t,n,C,!!A.dynamicChildren)}}},move:Gr,hydrate:M_};function Gr(e,t,n,{o:{insert:o},m:a},r=2){r===0&&o(e.targetAnchor,t,n);const{el:s,anchor:l,shapeFlag:c,children:d,props:h}=e,f=r===2;if(f&&o(s,t,n),(!f||Za(h))&&c&16)for(let v=0;v<d.length;v++)a(d[v],t,n,2);f&&o(l,t,n)}function M_(e,t,n,o,a,r,{o:{nextSibling:s,parentNode:l,querySelector:c}},d){const h=t.target=Qi(t.props,c);if(h){const f=h._lpa||h.firstChild;if(t.shapeFlag&16)if(Za(t.props))t.anchor=d(s(e),t,l(e),n,o,a,r),t.targetAnchor=f;else{t.anchor=s(e);let v=f;for(;v;)if(v=s(v),v&&v.nodeType===8&&v.data==="teleport anchor"){t.targetAnchor=v,h._lpa=t.targetAnchor&&s(t.targetAnchor);break}d(f,t,h,n,o,a,r)}Nf(t)}return t.anchor&&s(t.anchor)}const N_=$_;function Nf(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 Me=Symbol.for("v-fgt"),zo=Symbol.for("v-txt"),Zt=Symbol.for("v-cmt"),Uo=Symbol.for("v-stc"),er=[];let dn=null;function w(e=!1){er.push(dn=e?null:[])}function Of(){er.pop(),dn=er[er.length-1]||null}let Wo=1;function qi(e){Wo+=e}function Pf(e){return e.dynamicChildren=Wo>0?dn||pa:null,Of(),Wo>0&&dn&&dn.push(e),e}function O(e,t,n,o,a,r){return Pf(U(e,t,n,o,a,r,!0))}function Re(e,t,n,o,a){return Pf(Ve(e,t,n,o,a,!0))}function yo(e){return e?e.__v_isVNode===!0:!1}function Nn(e,t){return e.type===t.type&&e.key===t.key}function O_(e){}const Ms="__vInternal",Lf=({key:e})=>e??null,os=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Tt(e)||jt(e)||Ye(e)?{i:Nt,r:e,k:t,f:!!n}:e:null);function U(e,t=null,n=null,o=0,a=null,r=e===Me?0:1,s=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Lf(t),ref:t&&os(t),scopeId:Ss,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:o,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Nt};return l?(Pl(c,n),r&128&&e.normalize(c)):n&&(c.shapeFlag|=Tt(n)?8:16),Wo>0&&!s&&dn&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&dn.push(c),c}const Ve=P_;function P_(e,t=null,n=null,o=0,a=null,r=!1){if((!e||e===qd)&&(e=Zt),yo(e)){const l=Bn(e,t,!0);return n&&Pl(l,n),Wo>0&&!r&&dn&&(l.shapeFlag&6?dn[dn.indexOf(e)]=l:dn.push(l)),l.patchFlag|=-2,l}if(H_(e)&&(e=e.__vccOpts),t){t=Rf(t);let{class:l,style:c}=t;l&&!Tt(l)&&(t.class=nt(l)),At(c)&&(gl(c)&&!Fe(c)&&(c=xt({},c)),t.style=at(c))}const s=Tt(e)?1:Zd(e)?128:E_(e)?64:At(e)?4:Ye(e)?2:0;return U(e,t,n,o,a,s,r,!0)}function Rf(e){return e?gl(e)||Ms in e?xt({},e):e:null}function Bn(e,t,n=!1){const{props:o,ref:a,patchFlag:r,children:s}=e,l=t?Df(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Lf(l),ref:t&&t.ref?n&&a?Fe(a)?a.concat(os(t)):[a,os(t)]:os(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Me?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&&Bn(e.ssContent),ssFallback:e.ssFallback&&Bn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function yt(e=" ",t=0){return Ve(zo,null,e,t)}function L_(e,t){const n=Ve(Uo,null,e);return n.staticCount=t,n}function Ce(e="",t=!1){return t?(w(),Re(Zt,null,e)):Ve(Zt,null,e)}function yn(e){return e==null||typeof e=="boolean"?Ve(Zt):Fe(e)?Ve(Me,null,e.slice()):typeof e=="object"?po(e):Ve(zo,null,String(e))}function po(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bn(e)}function Pl(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(Fe(t))n=16;else if(typeof t=="object")if(o&65){const a=t.default;a&&(a._c&&(a._d=!1),Pl(e,a()),a._c&&(a._d=!0));return}else{n=32;const a=t._;!a&&!(Ms in t)?t._ctx=Nt:a===3&&Nt&&(Nt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ye(t)?(t={default:t,_ctx:Nt},n=32):(t=String(t),o&64?(n=16,t=[yt(t)]):n=8);e.children=t,e.shapeFlag|=n}function Df(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const a in o)if(a==="class")t.class!==o.class&&(t.class=nt([t.class,o.class]));else if(a==="style")t.style=at([t.style,o.style]);else if(fr(a)){const r=t[a],s=o[a];s&&r!==s&&!(Fe(r)&&r.includes(s))&&(t[a]=r?[].concat(r,s):s)}else a!==""&&(t[a]=o[a])}return t}function cn(e,t,n,o=null){bn(e,t,7,[n,o])}const R_=bf();let D_=0;function Ff(e,t,n){const o=e.type,a=(t?t.appContext:e.appContext)||R_,r={uid:D_++,vnode:e,type:o,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,scope:new pl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wf(o,a),emitsOptions:Qd(o,a),emit:null,emitted:null,propsDefaults:gt,inheritAttrs:o.inheritAttrs,ctx:gt,data:gt,props:gt,attrs:gt,slots:gt,refs:gt,setupState:gt,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=$y.bind(null,r),e.ce&&e.ce(r),r}let Lt=null;const eo=()=>Lt||Nt;let ps,Xi;{const e=wd(),t=(n,o)=>{let a;return(a=e[n])||(a=e[n]=[]),a.push(o),r=>{a.length>1?a.forEach(s=>s(r)):a[0](r)}};ps=t("__VUE_INSTANCE_SETTERS__",n=>Lt=n),Xi=t("__VUE_SSR_SETTERS__",n=>gr=n)}const Ko=e=>{const t=Lt;return ps(e),e.scope.on(),()=>{e.scope.off(),ps(t)}},Zi=()=>{Lt&&Lt.scope.off(),ps(null)};function Bf(e){return e.vnode.shapeFlag&4}let gr=!1;function Vf(e,t=!1){t&&Xi(t);const{props:n,children:o}=e.vnode,a=Bf(e);b_(e,n,a,t),w_(e,o);const r=a?F_(e,t):void 0;return t&&Xi(!1),r}function F_(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=yl(new Proxy(e.ctx,Ki));const{setup:o}=n;if(o){const a=e.setupContext=o.length>1?Hf(e):null,r=Ko(e);Jo();const s=Xn(o,e,0,[e.props,a]);if(Qo(),r(),dl(s)){if(s.then(Zi,Zi),t)return s.then(l=>{el(e,l,t)}).catch(l=>{qo(l,e,0)});e.asyncDep=s}else el(e,s,t)}else Uf(e,t)}function el(e,t,n){Ye(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:At(t)&&(e.setupState=Cl(t)),Uf(e,n)}let hs,tl;function B_(e){hs=e,tl=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,Zy))}}const V_=()=>!hs;function Uf(e,t,n){const o=e.type;if(!e.render){if(!t&&hs&&!o.render){const a=o.template||Ml(e).template;if(a){const{isCustomElement:r,compilerOptions:s}=e.appContext.config,{delimiters:l,compilerOptions:c}=o,d=xt(xt({isCustomElement:r,delimiters:l},s),c);o.render=hs(a,d)}}e.render=o.render||un,tl&&tl(e)}{const a=Ko(e);Jo();try{f_(e)}finally{Qo(),a()}}}function U_(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return pn(e,"get","$attrs"),t[n]}}))}function Hf(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return U_(e)},slots:e.slots,emit:e.emit,expose:t}}function Ns(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Cl(yl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Xa)return Xa[n](e)},has(t,n){return n in t||n in Xa}}))}function nl(e,t=!0){return Ye(e)?e.displayName||e.name:e.name||t&&e.__name}function H_(e){return Ye(e)&&"__vccOpts"in e}const Z=(e,t)=>py(e,t,gr);function Co(e,t,n=gt){const o=eo(),a=an(t),r=_n(t),s=zd((c,d)=>{let h;return af(()=>{const f=e[t];On(h,f)&&(h=f,d())}),{get(){return c(),n.get?n.get(h):h},set(f){const v=o.vnode.props;!(v&&(t in v||a in v||r in v)&&(`onUpdate:${t}`in v||`onUpdate:${a}`in v||`onUpdate:${r}`in v))&&On(f,h)&&(h=f,d()),o.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 _o(e,t,n){const o=arguments.length;return o===2?At(t)&&!Fe(t)?yo(t)?Ve(e,null,[t]):Ve(e,t):Ve(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&yo(n)&&(n=[n]),Ve(e,t,n))}function j_(){}function z_(e,t,n,o){const a=n[o];if(a&&jf(a,e))return a;const r=t();return r.memo=e.slice(),n[o]=r}function jf(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(On(n[o],t[o]))return!1;return Wo>0&&dn&&dn.push(e),!0}const zf="3.4.21",W_=un,K_=xy,G_=da,Y_=Jd,J_={createComponentInstance:Ff,setupComponent:Vf,renderComponentRoot:ns,setCurrentRenderingInstance:lr,isVNode:yo,normalizeVNode:yn},Q_=J_,q_=null,X_=null,Z_=null;/**
* @vue/runtime-dom v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const eb="http://www.w3.org/2000/svg",tb="http://www.w3.org/1998/Math/MathML",ho=typeof document<"u"?document:null,Tu=ho&&ho.createElement("template"),nb={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const a=t==="svg"?ho.createElementNS(eb,e):t==="mathml"?ho.createElementNS(tb,e):ho.createElement(e,n?{is:n}:void 0);return e==="select"&&o&&o.multiple!=null&&a.setAttribute("multiple",o.multiple),a},createText:e=>ho.createTextNode(e),createComment:e=>ho.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ho.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,a,r){const s=n?n.previousSibling:t.lastChild;if(a&&(a===r||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),n),!(a===r||!(a=a.nextSibling)););else{Tu.innerHTML=o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e;const l=Tu.content;if(o==="svg"||o==="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]}},lo="transition",Ua="animation",Ia=Symbol("_vtc"),Os=(e,{slots:t})=>_o(sf,Kf(e),t);Os.displayName="Transition";const Wf={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},ob=Os.props=xt({},$l,Wf),No=(e,t=[])=>{Fe(e)?e.forEach(n=>n(...t)):e&&e(...t)},Su=e=>e?Fe(e)?e.some(t=>t.length>1):e.length>1:!1;function Kf(e){const t={};for(const ie in e)ie in Wf||(t[ie]=e[ie]);if(e.css===!1)return t;const{name:n="v",type:o,duration:a,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:v=`${n}-leave-active`,leaveToClass:C=`${n}-leave-to`}=e,S=ab(a),A=S&&S[0],y=S&&S[1],{onBeforeEnter:$,onEnter:x,onEnterCancelled:g,onLeave:p,onLeaveCancelled:_,onBeforeAppear:b=$,onAppear:z=x,onAppearCancelled:W=g}=t,re=(ie,de,ye)=>{co(ie,de?h:l),co(ie,de?d:s),ye&&ye()},le=(ie,de)=>{ie._isLeaving=!1,co(ie,f),co(ie,C),co(ie,v),de&&de()},ce=ie=>(de,ye)=>{const Ee=ie?z:x,ge=()=>re(de,ie,ye);No(Ee,[de,ge]),ku(()=>{co(de,ie?c:r),Yn(de,ie?h:l),Su(Ee)||Eu(de,o,A,ge)})};return xt(t,{onBeforeEnter(ie){No($,[ie]),Yn(ie,r),Yn(ie,s)},onBeforeAppear(ie){No(b,[ie]),Yn(ie,c),Yn(ie,d)},onEnter:ce(!1),onAppear:ce(!0),onLeave(ie,de){ie._isLeaving=!0;const ye=()=>le(ie,de);Yn(ie,f),Yf(),Yn(ie,v),ku(()=>{ie._isLeaving&&(co(ie,f),Yn(ie,C),Su(p)||Eu(ie,o,y,ye))}),No(p,[ie,ye])},onEnterCancelled(ie){re(ie,!1),No(g,[ie])},onAppearCancelled(ie){re(ie,!0),No(W,[ie])},onLeaveCancelled(ie){le(ie),No(_,[ie])}})}function ab(e){if(e==null)return null;if(At(e))return[ki(e.enter),ki(e.leave)];{const t=ki(e);return[t,t]}}function ki(e){return is(e)}function Yn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ia]||(e[Ia]=new Set)).add(t)}function co(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Ia];n&&(n.delete(t),n.size||(e[Ia]=void 0))}function ku(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let rb=0;function Eu(e,t,n,o){const a=e._endId=++rb,r=()=>{a===e._endId&&o()};if(n)return setTimeout(r,n);const{type:s,timeout:l,propCount:c}=Gf(e,t);if(!s)return o();const d=s+"end";let h=0;const f=()=>{e.removeEventListener(d,v),r()},v=C=>{C.target===e&&++h>=c&&f()};setTimeout(()=>{h<c&&f()},l+1),e.addEventListener(d,v)}function Gf(e,t){const n=window.getComputedStyle(e),o=S=>(n[S]||"").split(", "),a=o(`${lo}Delay`),r=o(`${lo}Duration`),s=$u(a,r),l=o(`${Ua}Delay`),c=o(`${Ua}Duration`),d=$u(l,c);let h=null,f=0,v=0;t===lo?s>0&&(h=lo,f=s,v=r.length):t===Ua?d>0&&(h=Ua,f=d,v=c.length):(f=Math.max(s,d),h=f>0?s>d?lo:Ua:null,v=h?h===lo?r.length:c.length:0);const C=h===lo&&/\b(transform|all)(,|$)/.test(o(`${lo}Property`).toString());return{type:h,timeout:f,propCount:v,hasTransform:C}}function $u(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>Mu(n)+Mu(e[o])))}function Mu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Yf(){return document.body.offsetHeight}function sb(e,t,n){const o=e[Ia];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const vs=Symbol("_vod"),Jf=Symbol("_vsh"),rn={beforeMount(e,{value:t},{transition:n}){e[vs]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ha(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Ha(e,!0),o.enter(e)):o.leave(e,()=>{Ha(e,!1)}):Ha(e,t))},beforeUnmount(e,{value:t}){Ha(e,t)}};function Ha(e,t){e.style.display=t?e[vs]:"none",e[Jf]=!t}function ib(){rn.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Qf=Symbol("");function Zo(e){const t=eo();if(!t)return;const n=t.ut=(a=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(r=>al(r,a))},o=()=>{const a=e(t.proxy);ol(t.subTree,a),n(a)};of(o),Ft(()=>{const a=new MutationObserver(o);a.observe(t.subTree.el.parentNode,{childList:!0}),Ln(()=>a.disconnect())})}function ol(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{ol(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)al(e.el,t);else if(e.type===Me)e.children.forEach(n=>ol(n,t));else if(e.type===Uo){let{el:n,anchor:o}=e;for(;n&&(al(n,t),n!==o);)n=n.nextSibling}}function al(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const a in t)n.setProperty(`--${a}`,t[a]),o+=`--${a}: ${t[a]};`;n[Qf]=o}}const lb=/(^|;)\s*display\s*:/;function cb(e,t,n){const o=e.style,a=Tt(n);let r=!1;if(n&&!a){if(t)if(Tt(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&as(o,l,"")}else for(const s in t)n[s]==null&&as(o,s,"");for(const s in n)s==="display"&&(r=!0),as(o,s,n[s])}else if(a){if(t!==n){const s=o[Qf];s&&(n+=";"+s),o.cssText=n,r=lb.test(n)}}else t&&e.removeAttribute("style");vs in e&&(e[vs]=r?o.display:"",e[Jf]&&(o.display="none"))}const Nu=/\s*!important$/;function as(e,t,n){if(Fe(n))n.forEach(o=>as(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=ub(e,t);Nu.test(n)?e.setProperty(_n(o),n.replace(Nu,""),"important"):e[o]=n}}const Ou=["Webkit","Moz","ms"],Ei={};function ub(e,t){const n=Ei[t];if(n)return n;let o=an(t);if(o!=="filter"&&o in e)return Ei[t]=o;o=pr(o);for(let a=0;a<Ou.length;a++){const r=Ou[a]+o;if(r in e)return Ei[t]=r}return t}const Pu="http://www.w3.org/1999/xlink";function db(e,t,n,o,a){if(o&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Pu,t.slice(6,t.length)):e.setAttributeNS(Pu,t,n);else{const r=Vg(t);n==null||r&&!Id(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}function fb(e,t,n,o,a,r,s){if(t==="innerHTML"||t==="textContent"){o&&s(o,a,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=Id(n):n==null&&d==="string"?(n="",c=!0):d==="number"&&(n=0,c=!0)}try{e[t]=n}catch{}c&&e.removeAttribute(t)}function Jn(e,t,n,o){e.addEventListener(t,n,o)}function pb(e,t,n,o){e.removeEventListener(t,n,o)}const Lu=Symbol("_vei");function hb(e,t,n,o,a=null){const r=e[Lu]||(e[Lu]={}),s=r[t];if(o&&s)s.value=o;else{const[l,c]=vb(t);if(o){const d=r[t]=yb(o,a);Jn(e,l,d,c)}else s&&(pb(e,l,s,c),r[t]=void 0)}}const Ru=/(?:Once|Passive|Capture)$/;function vb(e){let t;if(Ru.test(e)){t={};let o;for(;o=e.match(Ru);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):_n(e.slice(2)),t]}let $i=0;const mb=Promise.resolve(),gb=()=>$i||(mb.then(()=>$i=0),$i=Date.now());function yb(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;bn(_b(o,n.value),t,5,[o])};return n.value=e,n.attached=gb(),n}function _b(e,t){if(Fe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>a=>!a._stopped&&o&&o(a))}else return t}const Du=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,bb=(e,t,n,o,a,r,s,l,c)=>{const d=a==="svg";t==="class"?sb(e,o,d):t==="style"?cb(e,n,o):fr(t)?cl(t)||hb(e,t,n,o,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ab(e,t,o,d))?fb(e,t,o,r,s,l,c):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),db(e,t,o,d))};function Ab(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Du(t)&&Ye(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 a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return Du(t)&&Tt(n)?!1:t in e}/*! #__NO_SIDE_EFFECTS__ */function qf(e,t){const n=Ae(e);class o extends Ps{constructor(r){super(n,r,t)}}return o.def=n,o}/*! #__NO_SIDE_EFFECTS__ */const Cb=e=>qf(e,ip),wb=typeof HTMLElement<"u"?HTMLElement:class{};class Ps extends wb{constructor(t,n={},o){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&o?o(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),fn(()=>{this._connected||(rl(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let o=0;o<this.attributes.length;o++)this._setAttr(this.attributes[o].name);this._ob=new MutationObserver(o=>{for(const a of o)this._setAttr(a.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(o,a=!1)=>{const{props:r,styles:s}=o;let l;if(r&&!Fe(r))for(const c in r){const d=r[c];(d===Number||d&&d.type===Number)&&(c in this._props&&(this._props[c]=is(this._props[c])),(l||(l=Object.create(null)))[an(c)]=!0)}this._numberProps=l,a&&this._resolveProps(o),this._applyStyles(s),this._update()},n=this._def.__asyncLoader;n?n().then(o=>t(o,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,o=Fe(n)?n:Object.keys(n||{});for(const a of Object.keys(this))a[0]!=="_"&&o.includes(a)&&this._setProp(a,this[a],!0,!1);for(const a of o.map(an))Object.defineProperty(this,a,{get(){return this._getProp(a)},set(r){this._setProp(a,r)}})}_setAttr(t){let n=this.getAttribute(t);const o=an(t);this._numberProps&&this._numberProps[o]&&(n=is(n)),this._setProp(o,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,a=!0){n!==this._props[t]&&(this._props[t]=n,a&&this._instance&&this._update(),o&&(n===!0?this.setAttribute(_n(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(_n(t),n+""):n||this.removeAttribute(_n(t))))}_update(){rl(this._createVNode(),this.shadowRoot)}_createVNode(){const t=Ve(this._def,xt({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const o=(r,s)=>{this.dispatchEvent(new CustomEvent(r,{detail:s}))};n.emit=(r,...s)=>{o(r,s),_n(r)!==r&&o(_n(r),s)};let a=this;for(;a=a&&(a.parentNode||a.host);)if(a instanceof Ps){n.parent=a._instance,n.provides=a._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const o=document.createElement("style");o.textContent=n,this.shadowRoot.appendChild(o)})}}function Ib(e="$style"){{const t=eo();if(!t)return gt;const n=t.type.__cssModules;if(!n)return gt;const o=n[e];return o||gt}}const Xf=new WeakMap,Zf=new WeakMap,ms=Symbol("_moveCb"),Fu=Symbol("_enterCb"),ep={name:"TransitionGroup",props:xt({},ob,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=eo(),o=El();let a,r;return $s(()=>{if(!a.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!$b(a[0].el,n.vnode.el,s))return;a.forEach(Sb),a.forEach(kb);const l=a.filter(Eb);Yf(),l.forEach(c=>{const d=c.el,h=d.style;Yn(d,s),h.transform=h.webkitTransform=h.transitionDuration="";const f=d[ms]=v=>{v&&v.target!==d||(!v||/transform$/.test(v.propertyName))&&(d.removeEventListener("transitionend",f),d[ms]=null,co(d,s))};d.addEventListener("transitionend",f)})}),()=>{const s=rt(e),l=Kf(s);let c=s.tag||Me;a=r,r=t.default?ks(t.default()):[];for(let d=0;d<r.length;d++){const h=r[d];h.key!=null&&jo(h,wa(h,l,o,n))}if(a)for(let d=0;d<a.length;d++){const h=a[d];jo(h,wa(h,l,o,n)),Xf.set(h,h.el.getBoundingClientRect())}return Ve(c,null,r)}}},xb=e=>delete e.mode;ep.props;const Tb=ep;function Sb(e){const t=e.el;t[ms]&&t[ms](),t[Fu]&&t[Fu]()}function kb(e){Zf.set(e,e.el.getBoundingClientRect())}function Eb(e){const t=Xf.get(e),n=Zf.get(e),o=t.left-n.left,a=t.top-n.top;if(o||a){const r=e.el.style;return r.transform=r.webkitTransform=`translate(${o}px,${a}px)`,r.transitionDuration="0s",e}}function $b(e,t,n){const o=e.cloneNode(),a=e[Ia];a&&a.forEach(l=>{l.split(/\s+/).forEach(c=>c&&o.classList.remove(c))}),n.split(/\s+/).forEach(l=>l&&o.classList.add(l)),o.style.display="none";const r=t.nodeType===1?t:t.parentNode;r.appendChild(o);const{hasTransform:s}=Gf(o);return r.removeChild(o),s}const bo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Fe(t)?n=>ma(t,n):t};function Mb(e){e.target.composing=!0}function Bu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const In=Symbol("_assign"),Ao={created(e,{modifiers:{lazy:t,trim:n,number:o}},a){e[In]=bo(a);const r=o||a.props&&a.props.type==="number";Jn(e,t?"change":"input",s=>{if(s.target.composing)return;let l=e.value;n&&(l=l.trim()),r&&(l=or(l)),e[In](l)}),n&&Jn(e,"change",()=>{e.value=e.value.trim()}),t||(Jn(e,"compositionstart",Mb),Jn(e,"compositionend",Bu),Jn(e,"change",Bu))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:a}},r){if(e[In]=bo(r),e.composing)return;const s=a||e.type==="number"?or(e.value):e.value,l=t??"";s!==l&&(document.activeElement===e&&e.type!=="range"&&(n||o&&e.value.trim()===l)||(e.value=l))}},Ll={deep:!0,created(e,t,n){e[In]=bo(n),Jn(e,"change",()=>{const o=e._modelValue,a=xa(e),r=e.checked,s=e[In];if(Fe(o)){const l=bs(o,a),c=l!==-1;if(r&&!c)s(o.concat(a));else if(!r&&c){const d=[...o];d.splice(l,1),s(d)}}else if(Yo(o)){const l=new Set(o);r?l.add(a):l.delete(a),s(l)}else s(tp(e,r))})},mounted:Vu,beforeUpdate(e,t,n){e[In]=bo(n),Vu(e,t,n)}};function Vu(e,{value:t,oldValue:n},o){e._modelValue=t,Fe(t)?e.checked=bs(t,o.props.value)>-1:Yo(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=go(t,tp(e,!0)))}const Rl={created(e,{value:t},n){e.checked=go(t,n.props.value),e[In]=bo(n),Jn(e,"change",()=>{e[In](xa(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[In]=bo(o),t!==n&&(e.checked=go(t,o.props.value))}},Dl={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const a=Yo(t);Jn(e,"change",()=>{const r=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?or(xa(s)):xa(s));e[In](e.multiple?a?new Set(r):r:r[0]),e._assigning=!0,fn(()=>{e._assigning=!1})}),e[In]=bo(o)},mounted(e,{value:t,modifiers:{number:n}}){Uu(e,t,n)},beforeUpdate(e,t,n){e[In]=bo(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||Uu(e,t,n)}};function Uu(e,t,n){const o=e.multiple,a=Fe(t);if(!(o&&!a&&!Yo(t))){for(let r=0,s=e.options.length;r<s;r++){const l=e.options[r],c=xa(l);if(o)if(a){const d=typeof c;d==="string"||d==="number"?l.selected=t.includes(n?or(c):c):l.selected=bs(t,c)>-1}else l.selected=t.has(c);else if(go(xa(l),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function xa(e){return"_value"in e?e._value:e.value}function tp(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const np={created(e,t,n){Yr(e,t,n,null,"created")},mounted(e,t,n){Yr(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Yr(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Yr(e,t,n,o,"updated")}};function op(e,t){switch(e){case"SELECT":return Dl;case"TEXTAREA":return Ao;default:switch(t){case"checkbox":return Ll;case"radio":return Rl;default:return Ao}}}function Yr(e,t,n,o,a){const s=op(e.tagName,n.props&&n.props.type)[a];s&&s(e,t,n,o)}function Nb(){Ao.getSSRProps=({value:e})=>({value:e}),Rl.getSSRProps=({value:e},t)=>{if(t.props&&go(t.props.value,e))return{checked:!0}},Ll.getSSRProps=({value:e},t)=>{if(Fe(e)){if(t.props&&bs(e,t.props.value)>-1)return{checked:!0}}else if(Yo(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},np.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 Ob=["ctrl","shift","alt","meta"],Pb={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)=>Ob.some(n=>e[`${n}Key`]&&!t.includes(n))},Ta=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(a,...r)=>{for(let s=0;s<t.length;s++){const l=Pb[t[s]];if(l&&l(a,t))return}return e(a,...r)})},Lb={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Go=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=a=>{if(!("key"in a))return;const r=_n(a.key);if(t.some(s=>s===r||Lb[s]===r))return e(a)})},ap=xt({patchProp:bb},nb);let tr,Hu=!1;function rp(){return tr||(tr=Sf(ap))}function sp(){return tr=Hu?tr:kf(ap),Hu=!0,tr}const rl=(...e)=>{rp().render(...e)},ip=(...e)=>{sp().hydrate(...e)},lp=(...e)=>{const t=rp().createApp(...e),{mount:n}=t;return t.mount=o=>{const a=up(o);if(!a)return;const r=t._component;!Ye(r)&&!r.render&&!r.template&&(r.template=a.innerHTML),a.innerHTML="";const s=n(a,!1,cp(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),s},t},Rb=(...e)=>{const t=sp().createApp(...e),{mount:n}=t;return t.mount=o=>{const a=up(o);if(a)return n(a,!0,cp(a))},t};function cp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function up(e){return Tt(e)?document.querySelector(e):e}let ju=!1;const Db=()=>{ju||(ju=!0,Nb(),ib())};/**
* vue v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Fb=()=>{},Bb=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:sf,BaseTransitionPropsValidators:$l,Comment:Zt,DeprecationTypes:Z_,EffectScope:pl,ErrorCodes:Iy,ErrorTypeStrings:K_,Fragment:Me,KeepAlive:Jy,ReactiveEffect:Aa,Static:Uo,Suspense:By,Teleport:N_,Text:zo,TrackOpTypes:Ay,Transition:Os,TransitionGroup:Tb,TriggerOpTypes:Cy,VueElement:Ps,assertNumber:wy,callWithAsyncErrorHandling:bn,callWithErrorHandling:Xn,camelize:an,capitalize:pr,cloneVNode:Bn,compatUtils:X_,compile:Fb,computed:Z,createApp:lp,createBlock:Re,createCommentVNode:Ce,createElementBlock:O,createElementVNode:U,createHydrationRenderer:kf,createPropsRestProxy:u_,createRenderer:Sf,createSSRApp:Rb,createSlots:qy,createStaticVNode:L_,createTextVNode:yt,createVNode:Ve,customRef:zd,defineAsyncComponent:zi,defineComponent:Ae,defineCustomElement:qf,defineEmits:t_,defineExpose:n_,defineModel:r_,defineOptions:o_,defineProps:e_,defineSSRCustomElement:Cb,defineSlots:a_,devtools:G_,effect:Wg,effectScope:Hg,getCurrentInstance:eo,getCurrentScope:Sd,getTransitionRawChildren:ks,guardReactiveProps:Rf,h:_o,handleError:qo,hasInjectionContext:__,hydrate:ip,initCustomFormatter:j_,initDirectivesForSSR:Db,inject:G,isMemoSame:jf,isProxy:gl,isReactive:Bo,isReadonly:Ho,isRef:jt,isRuntimeOnly:V_,isShallow:ar,isVNode:yo,markRaw:yl,mergeDefaults:c_,mergeModels:Ea,mergeProps:Df,nextTick:fn,normalizeClass:nt,normalizeProps:Fg,normalizeStyle:at,onActivated:cf,onBeforeMount:ka,onBeforeUnmount:Xo,onBeforeUpdate:ff,onDeactivated:uf,onErrorCaptured:mf,onMounted:Ft,onRenderTracked:vf,onRenderTriggered:hf,onScopeDispose:jg,onServerPrefetch:pf,onUnmounted:Ln,onUpdated:$s,openBlock:w,popScopeId:Dt,provide:Af,proxyRefs:Cl,pushScopeId:Rt,queuePostFlushCb:cs,reactive:ws,readonly:$n,ref:X,registerRuntimeCompiler:B_,render:rl,renderList:ft,renderSlot:It,resolveComponent:Dy,resolveDirective:Xd,resolveDynamicComponent:hr,resolveFilter:q_,resolveTransitionHooks:wa,setBlockTracking:qi,setDevtoolsHook:Y_,setTransitionHooks:jo,shallowReactive:Ud,shallowReadonly:fy,shallowRef:Al,ssrContextKey:tf,ssrUtils:Q_,stop:Kg,toDisplayString:be,toHandlerKey:qa,toHandlers:Xy,toRaw:rt,toRef:Ca,toRefs:wl,toValue:my,transformVNodeArgs:O_,triggerRef:vy,unref:k,useAttrs:l_,useCssModule:Ib,useCssVars:Zo,useModel:Co,useSSRContext:nf,useSlots:i_,useTransitionState:El,vModelCheckbox:Ll,vModelDynamic:np,vModelRadio:Rl,vModelSelect:Dl,vModelText:Ao,vShow:rn,version:zf,warn:W_,watch:Be,watchEffect:Wy,watchPostEffect:of,watchSyncEffect:af,withAsyncContext:d_,withCtx:ze,withDefaults:s_,withDirectives:Ot,withKeys:Go,withMemo:z_,withModifiers:Ta,withScopeId:My},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:dp,setPrototypeOf:zu,isFrozen:Vb,getPrototypeOf:Ub,getOwnPropertyDescriptor:Hb}=Object;let{freeze:sn,seal:Pn,create:fp}=Object,{apply:sl,construct:il}=typeof Reflect<"u"&&Reflect;sn||(sn=function(t){return t});Pn||(Pn=function(t){return t});sl||(sl=function(t,n,o){return t.apply(n,o)});il||(il=function(t,n){return new t(...n)});const Jr=An(Array.prototype.forEach),Wu=An(Array.prototype.pop),ja=An(Array.prototype.push),rs=An(String.prototype.toLowerCase),Mi=An(String.prototype.toString),jb=An(String.prototype.match),za=An(String.prototype.replace),zb=An(String.prototype.indexOf),Wb=An(String.prototype.trim),En=An(Object.prototype.hasOwnProperty),mn=An(RegExp.prototype.test),Wa=Kb(TypeError);function An(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return sl(e,t,o)}}function Kb(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return il(e,n)}}function tt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rs;zu&&zu(e,null);let o=t.length;for(;o--;){let a=t[o];if(typeof a=="string"){const r=n(a);r!==a&&(Vb(t)||(t[o]=r),a=r)}e[a]=!0}return e}function Gb(e){for(let t=0;t<e.length;t++)En(e,t)||(e[t]=null);return e}function Oo(e){const t=fp(null);for(const[n,o]of dp(e))En(e,n)&&(Array.isArray(o)?t[n]=Gb(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Oo(o):t[n]=o);return t}function Qr(e,t){for(;e!==null;){const o=Hb(e,t);if(o){if(o.get)return An(o.get);if(typeof o.value=="function")return An(o.value)}e=Ub(e)}function n(){return null}return n}const Ku=sn(["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"]),Ni=sn(["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"]),Oi=sn(["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"]),Yb=sn(["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"]),Pi=sn(["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"]),Jb=sn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Gu=sn(["#text"]),Yu=sn(["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"]),Li=sn(["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"]),Ju=sn(["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"]),qr=sn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Qb=Pn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),qb=Pn(/<%[\w\W]*|[\w\W]*%>/gm),Xb=Pn(/\${[\w\W]*}/gm),Zb=Pn(/^data-[\-\w.\u00B7-\uFFFF]/),e0=Pn(/^aria-[\-\w]+$/),pp=Pn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),t0=Pn(/^(?:\w+script|data):/i),n0=Pn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hp=Pn(/^html$/i);var Qu=Object.freeze({__proto__:null,MUSTACHE_EXPR:Qb,ERB_EXPR:qb,TMPLIT_EXPR:Xb,DATA_ATTR:Zb,ARIA_ATTR:e0,IS_ALLOWED_URI:pp,IS_SCRIPT_OR_DATA:t0,ATTR_WHITESPACE:n0,DOCTYPE_NAME:hp});const o0=function(){return typeof window>"u"?null:window},a0=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(o=n.getAttribute(a));const r="dompurify"+(o?"#"+o:"");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 vp(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o0();const t=He=>vp(He);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 o=n,a=o.currentScript,{DocumentFragment:r,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:d,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:v,trustedTypes:C}=e,S=c.prototype,A=Qr(S,"cloneNode"),y=Qr(S,"nextSibling"),$=Qr(S,"childNodes"),x=Qr(S,"parentNode");if(typeof s=="function"){const He=n.createElement("template");He.content&&He.content.ownerDocument&&(n=He.content.ownerDocument)}let g,p="";const{implementation:_,createNodeIterator:b,createDocumentFragment:z,getElementsByTagName:W}=n,{importNode:re}=o;let le={};t.isSupported=typeof dp=="function"&&typeof x=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ce,ERB_EXPR:ie,TMPLIT_EXPR:de,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:pe}=Qu;let{IS_ALLOWED_URI:ue}=Qu,Ne=null;const wt=tt({},[...Ku,...Ni,...Oi,...Pi,...Gu]);let Je=null;const _t=tt({},[...Yu,...Li,...Ju,...qr]);let xe=Object.seal(fp(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}})),je=null,st=null,E=!0,F=!0,D=!1,j=!0,ee=!1,we=!1,Te=!1,T=!1,L=!1,q=!1,se=!1,R=!0,J=!1;const ne="user-content-";let Q=!0,oe=!1,te={},me=null;const $e=tt({},["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 Se=null;const Ue=tt({},["audio","video","img","source","image","track"]);let Ge=null;const Qe=tt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ct="http://www.w3.org/1998/Math/MathML",pt="http://www.w3.org/2000/svg",kt="http://www.w3.org/1999/xhtml";let tn=kt,jn=!1,Cn=null;const ea=tt({},[ct,pt,kt],Mi);let Et=null;const nn=["application/xhtml+xml","text/html"],xo="text/html";let $t=null,to=null;const js=n.createElement("form"),_r=function(V){return V instanceof RegExp||V instanceof Function},Oa=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(to&&to===V)){if((!V||typeof V!="object")&&(V={}),V=Oo(V),Et=nn.indexOf(V.PARSER_MEDIA_TYPE)===-1?xo:V.PARSER_MEDIA_TYPE,$t=Et==="application/xhtml+xml"?Mi:rs,Ne=En(V,"ALLOWED_TAGS")?tt({},V.ALLOWED_TAGS,$t):wt,Je=En(V,"ALLOWED_ATTR")?tt({},V.ALLOWED_ATTR,$t):_t,Cn=En(V,"ALLOWED_NAMESPACES")?tt({},V.ALLOWED_NAMESPACES,Mi):ea,Ge=En(V,"ADD_URI_SAFE_ATTR")?tt(Oo(Qe),V.ADD_URI_SAFE_ATTR,$t):Qe,Se=En(V,"ADD_DATA_URI_TAGS")?tt(Oo(Ue),V.ADD_DATA_URI_TAGS,$t):Ue,me=En(V,"FORBID_CONTENTS")?tt({},V.FORBID_CONTENTS,$t):$e,je=En(V,"FORBID_TAGS")?tt({},V.FORBID_TAGS,$t):{},st=En(V,"FORBID_ATTR")?tt({},V.FORBID_ATTR,$t):{},te=En(V,"USE_PROFILES")?V.USE_PROFILES:!1,E=V.ALLOW_ARIA_ATTR!==!1,F=V.ALLOW_DATA_ATTR!==!1,D=V.ALLOW_UNKNOWN_PROTOCOLS||!1,j=V.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=V.SAFE_FOR_TEMPLATES||!1,we=V.WHOLE_DOCUMENT||!1,L=V.RETURN_DOM||!1,q=V.RETURN_DOM_FRAGMENT||!1,se=V.RETURN_TRUSTED_TYPE||!1,T=V.FORCE_BODY||!1,R=V.SANITIZE_DOM!==!1,J=V.SANITIZE_NAMED_PROPS||!1,Q=V.KEEP_CONTENT!==!1,oe=V.IN_PLACE||!1,ue=V.ALLOWED_URI_REGEXP||pp,tn=V.NAMESPACE||kt,xe=V.CUSTOM_ELEMENT_HANDLING||{},V.CUSTOM_ELEMENT_HANDLING&&_r(V.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xe.tagNameCheck=V.CUSTOM_ELEMENT_HANDLING.tagNameCheck),V.CUSTOM_ELEMENT_HANDLING&&_r(V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xe.attributeNameCheck=V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(xe.allowCustomizedBuiltInElements=V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(F=!1),q&&(L=!0),te&&(Ne=tt({},Gu),Je=[],te.html===!0&&(tt(Ne,Ku),tt(Je,Yu)),te.svg===!0&&(tt(Ne,Ni),tt(Je,Li),tt(Je,qr)),te.svgFilters===!0&&(tt(Ne,Oi),tt(Je,Li),tt(Je,qr)),te.mathMl===!0&&(tt(Ne,Pi),tt(Je,Ju),tt(Je,qr))),V.ADD_TAGS&&(Ne===wt&&(Ne=Oo(Ne)),tt(Ne,V.ADD_TAGS,$t)),V.ADD_ATTR&&(Je===_t&&(Je=Oo(Je)),tt(Je,V.ADD_ATTR,$t)),V.ADD_URI_SAFE_ATTR&&tt(Ge,V.ADD_URI_SAFE_ATTR,$t),V.FORBID_CONTENTS&&(me===$e&&(me=Oo(me)),tt(me,V.FORBID_CONTENTS,$t)),Q&&(Ne["#text"]=!0),we&&tt(Ne,["html","head","body"]),Ne.table&&(tt(Ne,["tbody"]),delete je.tbody),V.TRUSTED_TYPES_POLICY){if(typeof V.TRUSTED_TYPES_POLICY.createHTML!="function")throw Wa('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof V.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Wa('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=V.TRUSTED_TYPES_POLICY,p=g.createHTML("")}else g===void 0&&(g=a0(C,a)),g!==null&&typeof p=="string"&&(p=g.createHTML(""));sn&&sn(V),to=V}},br=tt({},["mi","mo","mn","ms","mtext"]),Ar=tt({},["foreignobject","desc","title","annotation-xml"]),zs=tt({},["title","style","font","a","script"]),Cr=tt({},[...Ni,...Oi,...Yb]),wr=tt({},[...Pi,...Jb]),Ws=function(V){let _e=x(V);(!_e||!_e.tagName)&&(_e={namespaceURI:tn,tagName:"template"});const De=rs(V.tagName),bt=rs(_e.tagName);return Cn[V.namespaceURI]?V.namespaceURI===pt?_e.namespaceURI===kt?De==="svg":_e.namespaceURI===ct?De==="svg"&&(bt==="annotation-xml"||br[bt]):!!Cr[De]:V.namespaceURI===ct?_e.namespaceURI===kt?De==="math":_e.namespaceURI===pt?De==="math"&&Ar[bt]:!!wr[De]:V.namespaceURI===kt?_e.namespaceURI===pt&&!Ar[bt]||_e.namespaceURI===ct&&!br[bt]?!1:!wr[De]&&(zs[De]||!Cr[De]):!!(Et==="application/xhtml+xml"&&Cn[V.namespaceURI]):!1},zn=function(V){ja(t.removed,{element:V});try{V.parentNode.removeChild(V)}catch{V.remove()}},Pa=function(V,_e){try{ja(t.removed,{attribute:_e.getAttributeNode(V),from:_e})}catch{ja(t.removed,{attribute:null,from:_e})}if(_e.removeAttribute(V),V==="is"&&!Je[V])if(L||q)try{zn(_e)}catch{}else try{_e.setAttribute(V,"")}catch{}},La=function(V){let _e=null,De=null;if(T)V="<remove></remove>"+V;else{const Vt=jb(V,/^[\r\n\t ]+/);De=Vt&&Vt[0]}Et==="application/xhtml+xml"&&tn===kt&&(V='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+V+"</body></html>");const bt=g?g.createHTML(V):V;if(tn===kt)try{_e=new v().parseFromString(bt,Et)}catch{}if(!_e||!_e.documentElement){_e=_.createDocument(tn,"template",null);try{_e.documentElement.innerHTML=jn?p:bt}catch{}}const Pt=_e.body||_e.documentElement;return V&&De&&Pt.insertBefore(n.createTextNode(De),Pt.childNodes[0]||null),tn===kt?W.call(_e,we?"html":"body")[0]:we?_e.documentElement:Pt},Ra=function(V){return b.call(V.ownerDocument||V,V,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null)},Ks=function(V){return V instanceof f&&(typeof V.nodeName!="string"||typeof V.textContent!="string"||typeof V.removeChild!="function"||!(V.attributes instanceof h)||typeof V.removeAttribute!="function"||typeof V.setAttribute!="function"||typeof V.namespaceURI!="string"||typeof V.insertBefore!="function"||typeof V.hasChildNodes!="function")},Ir=function(V){return typeof l=="function"&&V instanceof l},xn=function(V,_e,De){le[V]&&Jr(le[V],bt=>{bt.call(t,_e,De,to)})},To=function(V){let _e=null;if(xn("beforeSanitizeElements",V,null),Ks(V))return zn(V),!0;const De=$t(V.nodeName);if(xn("uponSanitizeElement",V,{tagName:De,allowedTags:Ne}),V.hasChildNodes()&&!Ir(V.firstElementChild)&&mn(/<[/\w]/g,V.innerHTML)&&mn(/<[/\w]/g,V.textContent))return zn(V),!0;if(!Ne[De]||je[De]){if(!je[De]&&Da(De)&&(xe.tagNameCheck instanceof RegExp&&mn(xe.tagNameCheck,De)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(De)))return!1;if(Q&&!me[De]){const bt=x(V)||V.parentNode,Pt=$(V)||V.childNodes;if(Pt&&bt){const Vt=Pt.length;for(let Jt=Vt-1;Jt>=0;--Jt)bt.insertBefore(A(Pt[Jt],!0),y(V))}}return zn(V),!0}return V instanceof c&&!Ws(V)||(De==="noscript"||De==="noembed"||De==="noframes")&&mn(/<\/no(script|embed|frames)/i,V.innerHTML)?(zn(V),!0):(ee&&V.nodeType===3&&(_e=V.textContent,Jr([ce,ie,de],bt=>{_e=za(_e,bt," ")}),V.textContent!==_e&&(ja(t.removed,{element:V.cloneNode()}),V.textContent=_e)),xn("afterSanitizeElements",V,null),!1)},xr=function(V,_e,De){if(R&&(_e==="id"||_e==="name")&&(De in n||De in js))return!1;if(!(F&&!st[_e]&&mn(ye,_e))){if(!(E&&mn(Ee,_e))){if(!Je[_e]||st[_e]){if(!(Da(V)&&(xe.tagNameCheck instanceof RegExp&&mn(xe.tagNameCheck,V)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(V))&&(xe.attributeNameCheck instanceof RegExp&&mn(xe.attributeNameCheck,_e)||xe.attributeNameCheck instanceof Function&&xe.attributeNameCheck(_e))||_e==="is"&&xe.allowCustomizedBuiltInElements&&(xe.tagNameCheck instanceof RegExp&&mn(xe.tagNameCheck,De)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(De))))return!1}else if(!Ge[_e]){if(!mn(ue,za(De,pe,""))){if(!((_e==="src"||_e==="xlink:href"||_e==="href")&&V!=="script"&&zb(De,"data:")===0&&Se[V])){if(!(D&&!mn(ge,za(De,pe,"")))){if(De)return!1}}}}}}return!0},Da=function(V){return V!=="annotation-xml"&&V.indexOf("-")>0},Tr=function(V){xn("beforeSanitizeAttributes",V,null);const{attributes:_e}=V;if(!_e)return;const De={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Je};let bt=_e.length;for(;bt--;){const Pt=_e[bt],{name:Vt,namespaceURI:Jt,value:Rn}=Pt,So=$t(Vt);let Qt=Vt==="value"?Rn:Wb(Rn);if(De.attrName=So,De.attrValue=Qt,De.keepAttr=!0,De.forceKeepAttr=void 0,xn("uponSanitizeAttribute",V,De),Qt=De.attrValue,De.forceKeepAttr||(Pa(Vt,V),!De.keepAttr))continue;if(!j&&mn(/\/>/i,Qt)){Pa(Vt,V);continue}ee&&Jr([ce,ie,de],kr=>{Qt=za(Qt,kr," ")});const Sr=$t(V.nodeName);if(xr(Sr,So,Qt)){if(J&&(So==="id"||So==="name")&&(Pa(Vt,V),Qt=ne+Qt),g&&typeof C=="object"&&typeof C.getAttributeType=="function"&&!Jt)switch(C.getAttributeType(Sr,So)){case"TrustedHTML":{Qt=g.createHTML(Qt);break}case"TrustedScriptURL":{Qt=g.createScriptURL(Qt);break}}try{Jt?V.setAttributeNS(Jt,Vt,Qt):V.setAttribute(Vt,Qt),Wu(t.removed)}catch{}}}xn("afterSanitizeAttributes",V,null)},Gs=function He(V){let _e=null;const De=Ra(V);for(xn("beforeSanitizeShadowDOM",V,null);_e=De.nextNode();)xn("uponSanitizeShadowNode",_e,null),!To(_e)&&(_e.content instanceof r&&He(_e.content),Tr(_e));xn("afterSanitizeShadowDOM",V,null)};return t.sanitize=function(He){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_e=null,De=null,bt=null,Pt=null;if(jn=!He,jn&&(He="<!-->"),typeof He!="string"&&!Ir(He))if(typeof He.toString=="function"){if(He=He.toString(),typeof He!="string")throw Wa("dirty is not a string, aborting")}else throw Wa("toString is not a function");if(!t.isSupported)return He;if(Te||Oa(V),t.removed=[],typeof He=="string"&&(oe=!1),oe){if(He.nodeName){const Rn=$t(He.nodeName);if(!Ne[Rn]||je[Rn])throw Wa("root node is forbidden and cannot be sanitized in-place")}}else if(He instanceof l)_e=La("<!---->"),De=_e.ownerDocument.importNode(He,!0),De.nodeType===1&&De.nodeName==="BODY"||De.nodeName==="HTML"?_e=De:_e.appendChild(De);else{if(!L&&!ee&&!we&&He.indexOf("<")===-1)return g&&se?g.createHTML(He):He;if(_e=La(He),!_e)return L?null:se?p:""}_e&&T&&zn(_e.firstChild);const Vt=Ra(oe?He:_e);for(;bt=Vt.nextNode();)To(bt)||(bt.content instanceof r&&Gs(bt.content),Tr(bt));if(oe)return He;if(L){if(q)for(Pt=z.call(_e.ownerDocument);_e.firstChild;)Pt.appendChild(_e.firstChild);else Pt=_e;return(Je.shadowroot||Je.shadowrootmode)&&(Pt=re.call(o,Pt,!0)),Pt}let Jt=we?_e.outerHTML:_e.innerHTML;return we&&Ne["!doctype"]&&_e.ownerDocument&&_e.ownerDocument.doctype&&_e.ownerDocument.doctype.name&&mn(hp,_e.ownerDocument.doctype.name)&&(Jt="<!DOCTYPE "+_e.ownerDocument.doctype.name+`>
`+Jt),ee&&Jr([ce,ie,de],Rn=>{Jt=za(Jt,Rn," ")}),g&&se?g.createHTML(Jt):Jt},t.setConfig=function(){let He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Oa(He),Te=!0},t.clearConfig=function(){to=null,Te=!1},t.isValidAttribute=function(He,V,_e){to||Oa({});const De=$t(He),bt=$t(V);return xr(De,bt,_e)},t.addHook=function(He,V){typeof V=="function"&&(le[He]=le[He]||[],ja(le[He],V))},t.removeHook=function(He){if(le[He])return Wu(le[He])},t.removeHooks=function(He){le[He]&&(le[He]=[])},t.removeAllHooks=function(){le={}},t}var r0=vp();function s0(e,t){const n=e.hooks??{};let o;for(o in n){const a=n[o];a!==void 0&&t.addHook(o,a)}}function mp(){return r0()}function i0(e={},t=mp){const n=t();s0(e,n);const o=function(a,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){a.innerHTML=n.sanitize(l,d[c]??h);return}a.innerHTML=n.sanitize(l,h)};return{mounted:o,updated:o}}const l0={install(e,t={},n=mp){e.directive("dompurify-html",i0(t,n))}},c0=1500,u0=1e3,d0=100;function f0(){const t=X({mode:"ui",selection:null,clipboard:null,mutationTransactionsSnapshot:{undo:null,redo:null},logEntries:[]});let n=null,o=0;const a=[],r=ce=>{t.value.mode=ce},s=()=>t.value.mode,l=(ce,ie,de)=>{if(ce===null){t.value.selection=null;return}let ye=ie;if(typeof ye>"u"){const Ee=document.querySelector(`.ComponentRenderer [data-writer-id="${ce}"]`);ye=Ee==null?void 0:Ee.dataset.writerInstancePath}t.value.selection={componentId:ce,instancePath:ye,source:de}},c=()=>t.value.selection!==null,d=()=>t.value.selection,h=()=>{var ce;return(ce=t.value.selection)==null?void 0:ce.componentId},f=ce=>{t.value.clipboard=ce},v=()=>t.value.clipboard,C=(ce,ie,de=!1)=>{if(n!==null)return;o<0&&(a.splice(o),o=0);const ye=a[a.length-1],Ee=Date.now()-(ye==null?void 0:ye.timestamp);if(ye!=null&&ye.enableDebounce&&(ye==null?void 0:ye.id)==ce&&Ee<u0){n=a.pop();return}n={id:ce,desc:ie,timestamp:null,enableDebounce:de,mutations:{}}},S=ce=>{n.mutations[ce.id]||(n.mutations[ce.id]={jsonPre:ce?JSON.stringify(ce):void 0})},A=ce=>{n.mutations[ce.id]||(n.mutations[ce.id]={}),n.mutations[ce.id].jsonPost=ce?JSON.stringify(ce):void 0},y=ce=>{n.id===ce&&(n.timestamp=Date.now(),a.push(n),n=null,g())},$=()=>{const ce=a.length-1+o,ie=a[ce];return ie&&o--,g(),ie},x=()=>{const ce=a.length+o,ie=a[ce];return ie&&o++,g(),ie},g=()=>{const ce=a.length-1+o,ie=a[ce],de=a.length+o,ye=a[de];t.value.mutationTransactionsSnapshot={undo:ie,redo:ye}},p=()=>t.value.mutationTransactionsSnapshot;async function _(ce){const ie=JSON.stringify(ce);let de=5981;for(let Ee=0;Ee<ie.length;Ee++)de=(de<<5)+de+ie.charCodeAt(Ee);return de.toString(16).padStart(2,"0")}const b=async ce=>{const{type:ie,title:de,message:ye,code:Ee,workflowExecution:ge}=ce,pe=await _(ce),ue=t.value.logEntries.find(Ne=>Ne.fingerprint===pe);if(ue){ue.repeated++,ue.timestampReceived=new Date,t.value.logEntries.sort((Ne,wt)=>Ne.timestampReceived<wt.timestampReceived?1:-1);return}t.value.logEntries.unshift({type:ie,title:de,message:ye,code:Ee,workflowExecution:ge,timestampReceived:new Date,fingerprint:pe,repeated:0}),t.value.logEntries.splice(d0)},z=()=>t.value.logEntries.length,W=()=>{t.value.logEntries=[]},re=()=>t.value.logEntries;return{setMode:r,getMode:s,openPanels:X(new Set),isSettingsBarCollapsed:X(!1),isSelectionActive:c,setSelection:l,getSelection:d,getSelectedId:h,setClipboard:f,getClipboard:v,openMutationTransaction:C,registerPreMutation:S,registerPostMutation:A,closeMutationTransaction:y,consumeUndoTransaction:$,consumeRedoTransaction:x,getMutationTransactionsSnapshot:p,handleLogEntry:b,getLogEntryCount:z,clearLogEntries:W,getLogEntries:re}}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 fa=(e=>(e.Cut="cut",e.Copy="copy",e))(fa||{}),P=(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))(P||{}),Oe=(e=>(e.General="General",e.Style="Style",e.Tools="Tools",e))(Oe||{}),Ls=(e=>(e.Text="Text",e.Textarea="Textarea",e))(Ls||{});const Wt={name:"Accent",type:P.Color,category:Oe.Style,applyStyleVariable:!0},St={name:"Primary text",type:P.Color,category:Oe.Style,applyStyleVariable:!0},hn={name:"Secondary text",type:P.Color,category:Oe.Style,applyStyleVariable:!0},gp={name:"Emptiness",desc:"Page background color",type:P.Color,category:Oe.Style,applyStyleVariable:!0},Vn={name:"Container background",type:P.Color,category:Oe.Style,applyStyleVariable:!0},$a={name:"Container shadow",type:P.Shadow,category:Oe.Style,applyStyleVariable:!0},Bt={name:"Separator",type:P.Color,category:Oe.Style,applyStyleVariable:!0},Un={name:"Button",type:P.Color,category:Oe.Style,applyStyleVariable:!0},Hn={name:"Button text",type:P.Color,category:Oe.Style,applyStyleVariable:!0},wo={name:"Button shadow",type:P.Shadow,category:Oe.Style,applyStyleVariable:!0},We={name:"Custom CSS classes",type:P.Text,category:Oe.Style,desc:"CSS classes, separated by spaces. You can define classes in custom stylesheets."},p0={name:"Content width",type:P.Width,default:"100%",category:Oe.Style,desc:"Configure content width using CSS units, e.g. 100px, 50%, 10vw, etc."},Ma={name:"Content alignment (H)",type:P.HAlign,default:"unset",category:Oe.Style},Fl={name:"Content alignment (V)",type:P.VAlign,default:"unset",category:Oe.Style},Na={name:"Padding",type:P.Padding,default:"0",category:Oe.Style},yp={yes:"Yes",no:"No"},Bl={name:"Collapsible",default:"no",type:P.Text,options:yp,category:Oe.Style},Rs={name:"Start collapsed",type:P.Text,category:Oe.Style,default:"no",options:yp,desc:"Only applied when the component is collapsible."},h0=Object.freeze(Object.defineProperty({__proto__:null,accentColor:Wt,buttonColor:Un,buttonShadow:wo,buttonTextColor:Hn,containerBackgroundColor:Vn,containerShadow:$a,contentHAlign:Ma,contentPadding:Na,contentVAlign:Fl,contentWidth:p0,cssClasses:We,emptinessColor:gp,isCollapsible:Bl,primaryTextColor:St,secondaryTextColor:hn,separatorColor:Bt,startCollapsed:Rs},Symbol.toStringTag,{value:"Module"})),v0={class:"material-symbols-outlined"},m0=["placeholder"],g0=Ae({__name:"WdsTextInput",props:Ea({leftIcon:{type:String,required:!1,default:void 0},placeholder:{type:String,required:!1,default:void 0}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Co(e,"modelValue"),n=X();return(o,a)=>e.leftIcon?(w(),O("div",{key:0,class:"WdsTextInput WdsTextInput--leftIcon colorTransformer",onClick:a[1]||(a[1]=r=>n.value.focus())},[U("i",v0,be(e.leftIcon),1),Ot(U("input",{ref_key:"input",ref:n,"onUpdate:modelValue":a[0]||(a[0]=r=>t.value=r),type:"text",placeholder:e.placeholder},null,8,m0),[[Ao,t.value]])])):Ot((w(),O("input",{key:1,"onUpdate:modelValue":a[2]||(a[2]=r=>t.value=r),type:"text",class:"WdsTextInput colorTransformer"},null,512)),[[Ao,t.value]])}}),Ie=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},_p=Ie(g0,[["__scopeId","data-v-02394d10"]]),y0={};function _0(e,t){return w(),O("button",null,[It(e.$slots,"default",{},void 0,!0)])}const Mn=Ie(y0,[["render",_0],["__scopeId","data-v-75345289"]]),b0={key:0,class:"BaseMarkdown markdown"},A0=Ae({__name:"BaseMarkdown",props:{rawText:{}},setup(e){let t;const n=X(!1),o=e;return ka(async()=>{t=await Xt(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url),n.value=!0}),(a,r)=>{const s=Xd("dompurify-html");return n.value?Ot((w(),O("div",b0,null,512)),[[s,k(t).parse(o.rawText).trim()]]):Ce("",!0)}}}),Vl=Ie(A0,[["__scopeId","data-v-09a0e4d0"]]),C0=Object.freeze(Object.defineProperty({__proto__:null,default:Vl},Symbol.toStringTag,{value:"Module"})),Ds=e=>(Rt("data-v-3d42e409"),e=e(),Dt(),e),w0={key:0},I0=Ds(()=>U("i",{class:"material-symbols-outlined"}," download ",-1)),x0={key:0,"data-writer-grid-col":"0",class:"cell headerCell indexCell"},T0=Ds(()=>U("div",{class:"name"},null,-1)),S0=Ds(()=>U("div",{class:"widthAdjuster"},null,-1)),k0=[T0,S0],E0=["data-writer-grid-col","onClick"],$0={class:"name"},M0={class:"material-symbols-outlined"},N0={class:"material-symbols-outlined"},O0=Ds(()=>U("div",{class:"widthAdjuster"},null,-1)),P0={key:0,class:"cell indexCell"},L0="A component to display Pandas DataFrames.",R0="data:application/vnd.apache.arrow.file;base64,QVJST1cxAAD/////iAMAABAAAAAAAAoADgAGAAUACAAKAAAAAAEEABAAAAAAAAoADAAAAAQACAAKAAAAlAIAAAQAAAABAAAADAAAAAgADAAEAAgACAAAAGwCAAAEAAAAXwIAAHsiaW5kZXhfY29sdW1ucyI6IFsiX19pbmRleF9sZXZlbF8wX18iXSwgImNvbHVtbl9pbmRleGVzIjogW3sibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogbnVsbCwgInBhbmRhc190eXBlIjogInVuaWNvZGUiLCAibnVtcHlfdHlwZSI6ICJvYmplY3QiLCAibWV0YWRhdGEiOiB7ImVuY29kaW5nIjogIlVURi04In19XSwgImNvbHVtbnMiOiBbeyJuYW1lIjogImNvbF9hIiwgImZpZWxkX25hbWUiOiAiY29sX2EiLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9LCB7Im5hbWUiOiAiY29sX2IiLCAiZmllbGRfbmFtZSI6ICJjb2xfYiIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogIl9faW5kZXhfbGV2ZWxfMF9fIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfV0sICJjcmVhdG9yIjogeyJsaWJyYXJ5IjogInB5YXJyb3ciLCAidmVyc2lvbiI6ICIxMi4wLjAifSwgInBhbmRhc192ZXJzaW9uIjogIjEuNS4zIn0ABgAAAHBhbmRhcwAAAwAAAIgAAABEAAAABAAAAJT///8AAAECEAAAACQAAAAEAAAAAAAAABEAAABfX2luZGV4X2xldmVsXzBfXwAAAJD///8AAAABQAAAAND///8AAAECEAAAABgAAAAEAAAAAAAAAAUAAABjb2xfYgAAAMD///8AAAABQAAAABAAFAAIAAYABwAMAAAAEAAQAAAAAAABAhAAAAAgAAAABAAAAAAAAAAFAAAAY29sX2EAAAAIAAwACAAHAAgAAAAAAAABQAAAAAAAAAD/////6AAAABQAAAAAAAAADAAWAAYABQAIAAwADAAAAAADBAAYAAAAMAAAAAAAAAAAAAoAGAAMAAQACAAKAAAAfAAAABAAAAACAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAAAAAAAwAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAD/////AAAAABAAAAAMABQABgAIAAwAEAAMAAAAAAAEADwAAAAoAAAABAAAAAEAAACYAwAAAAAAAPAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAACgAMAAAABAAIAAoAAACUAgAABAAAAAEAAAAMAAAACAAMAAQACAAIAAAAbAIAAAQAAABfAgAAeyJpbmRleF9jb2x1bW5zIjogWyJfX2luZGV4X2xldmVsXzBfXyJdLCAiY29sdW1uX2luZGV4ZXMiOiBbeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiBudWxsLCAicGFuZGFzX3R5cGUiOiAidW5pY29kZSIsICJudW1weV90eXBlIjogIm9iamVjdCIsICJtZXRhZGF0YSI6IHsiZW5jb2RpbmciOiAiVVRGLTgifX1dLCAiY29sdW1ucyI6IFt7Im5hbWUiOiAiY29sX2EiLCAiZmllbGRfbmFtZSI6ICJjb2xfYSIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6ICJjb2xfYiIsICJmaWVsZF9uYW1lIjogImNvbF9iIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfSwgeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiAiX19pbmRleF9sZXZlbF8wX18iLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9XSwgImNyZWF0b3IiOiB7ImxpYnJhcnkiOiAicHlhcnJvdyIsICJ2ZXJzaW9uIjogIjEyLjAuMCJ9LCAicGFuZGFzX3ZlcnNpb24iOiAiMS41LjMifQAGAAAAcGFuZGFzAAADAAAAiAAAAEQAAAAEAAAAlP///wAAAQIQAAAAJAAAAAQAAAAAAAAAEQAAAF9faW5kZXhfbGV2ZWxfMF9fAAAAkP///wAAAAFAAAAA0P///wAAAQIQAAAAGAAAAAQAAAAAAAAABQAAAGNvbF9iAAAAwP///wAAAAFAAAAAEAAUAAgABgAHAAwAAAAQABAAAAAAAAECEAAAACAAAAAEAAAAAAAAAAUAAABjb2xfYQAAAAgADAAIAAcACAAAAAAAAAFAAAAAsAMAAEFSUk9XMQ==",D0={writer:{name:"DataFrame",description:L0,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:P.Text,default:R0},showIndex:{name:"Show index",desc:"Shows the dataframe's index. If an Arrow table is used, shows the zero-based integer index.",type:P.Text,default:"yes",options:{yes:"yes",no:"no"}},enableSearch:{name:"Enable search",type:P.Text,default:"no",options:{yes:"yes",no:"no"}},enableDownload:{name:"Enable download",desc:"Allows the user to download the data as CSV.",type:P.Text,default:"no",options:{yes:"yes",no:"no"}},useMarkdown:{name:"Use Markdown",type:P.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:P.Number,category:Oe.Style,default:"10"},wrapText:{name:"Wrap text",type:P.Text,category:Oe.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:St,secondaryTextColor:hn,separatorColor:Bt,dataframeBackgroundColor:{name:"Background",type:P.Color,category:Oe.Style,default:"#ffffff",applyStyleVariable:!0},fontStyle:{name:"Font style",type:P.Text,category:Oe.Style,options:{normal:"normal",monospace:"monospace"},default:"normal"},cssClasses:We}}},F0=Ae({...D0,__name:"CoreDataframeLegacy",setup(e){Zo(xe=>({"40e54f4f":z.value?"sticky":"unset"}));const t=1e3,n=36,o=80,a=300,r=/^__index_level_[0-9]+__$/,s=G(Y.evaluatedFields),l=X(),c=X(),d=X();let h=null;const f=X(null),v=X([]),C=Z(()=>s.showIndex.value=="yes"),S=X(null),A=X(0),y=X([]);let $=null;const x=Z(()=>{var xe;return f.value?(xe=f.value)==null?void 0:xe.columnNames():[]}),g=Z(()=>x.value.filter(xe=>v.value.includes(xe))),p=Z(()=>x.value.filter(je=>{const st=v.value.includes(je),E=r.test(je);return!(st&&E)})),_=Z(()=>(C.value?1:0)+p.value.length),b=Z(()=>{var xe;return((xe=f.value)==null?void 0:xe.numRows())??0}),z=Z(()=>b.value>t),W=Z(()=>Math.min(s.displayRowCount.value,b.value)),re=Z(()=>{let xe;return s.wrapText.value=="yes"?xe=b.value-1:xe=b.value-W.value,Math.min(Math.ceil(A.value*xe),xe)}),le=Z(()=>{if(!f.value)return null;const xe=z.value?re.value:0,je=z.value?W.value:t,st=f.value.objects({offset:xe,limit:je}),E=f.value.indices().slice(re.value,re.value+W.value);return{data:st,indices:E}}),ce=Z(()=>{const xe=s.fontStyle.value;let je;return y.value.length==0?je=`repeat(${_.value}, minmax(min-content, 1fr))`:je=y.value.map(st=>`${Math.max(st,o)}px`).join(" "),{"min-height":`${n*(1+s.displayRowCount.value)}px`,"max-height":`${(W.value+1)*n}px`,"font-family":xe=="monospace"?"monospace":void 0,"grid-template-columns":je,"grid-template-rows":`${n}px repeat(${W.value}, min-content)`}}),ie=Z(()=>({top:`${n*b.value}px`}));function de(){const xe=d.value.scrollTop;A.value=xe/(d.value.scrollHeight-d.value.clientHeight)}function ye(){d.value.scrollTop=0}async function Ee(){var je;y.value=[],await fn();const xe=(je=d.value)==null?void 0:je.querySelectorAll("[data-writer-grid-col]");xe==null||xe.forEach(st=>{const E=st,F=E.dataset.writerGridCol,{width:D}=E.getBoundingClientRect(),j=Math.min(D,a);y.value[F]=j})}function ge(xe,je){var D,j;if(xe.target.classList.contains("widthAdjuster"))return;if(((D=S.value)==null?void 0:D.columnName)!==je){S.value={columnName:je,descending:!1};return}if((j=S.value)==null?void 0:j.descending){S.value=null;return}S.value={columnName:je,descending:!S.value.descending}}function pe(xe){const je=xe.schema.metadata.get("pandas");return je?JSON.parse(je).index_columns:[]}async function ue(){const xe=await Xt(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url),{tableFromIPC:je}=await Xt(()=>import("./Arrow.dom-GBJpMYQS.js"),__vite__mapDeps([2,1]),import.meta.url),st=s.dataframe.value;try{const D=await(await(await fetch(st)).blob()).arrayBuffer(),j=je(D);v.value=pe(j),h=xe.fromArrow(j),f.value=h}catch(E){console.error("Couldn't load dataframe from Arrow URL.",E)}}function Ne(){const xe=f.value.toCSV(),je=document.createElement("a"),st=new Blob([xe],{type:"text/csv"}),E=URL.createObjectURL(st);je.href=E,je.download="data.csv",je.click(),URL.revokeObjectURL(E)}async function wt(){const xe=await Xt(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url);if(S.value===null){f.value=f.value.unorder();return}let je;S.value.descending?je=xe.desc(S.value.columnName):je=S.value.columnName,f.value=f.value.orderby(je)}async function Je(xe){const je=xe.target.value;if(!je)f.value=h;else{const st=new RegExp(je,"i"),F="(d, $) => "+h.columnNames().map(D=>`aq.op.match(d.${D}, $.pattern) !== null`).join(" || ");f.value=h.params({pattern:st,filterS:F}).filter(F)}await fn(),ye()}async function _t(xe){if(xe.buttons!==1){$=null;return}const je=xe.target;if(!l.value.contains(je))return;if($===null&&je.classList.contains("widthAdjuster")){const we=je.closest(".cell");$=parseInt(we.dataset.writerGridCol)}else if($===null)return;const st=d.value.querySelector(`[data-writer-grid-col="${$}"]`),E=st.querySelector(".widthAdjuster"),{width:F}=E.getBoundingClientRect(),{left:D}=st.getBoundingClientRect(),ee=xe.clientX-D+F/2;y.value[$]=ee}return Be(s.dataframe,()=>{ue()}),Be(S,async()=>{await wt()}),Be(_,()=>{Ee()}),Be(s.wrapText,()=>{Ee()}),Ft(async()=>{await ue(),document.addEventListener("mousemove",_t),c.value&&new ResizeObserver(Ee).observe(c.value,{box:"border-box"})}),Ln(()=>{document.removeEventListener("mousemove",_t)}),(xe,je)=>{var st;return w(),O("div",{ref_key:"rootEl",ref:l,class:"CoreDataframe"},[U("div",{ref_key:"toolsEl",ref:c,class:"tools"},[k(s).enableSearch.value==="yes"?(w(),O("div",w0,[Ve(_p,{class:"search",placeholder:"Search","left-icon":"search",onChange:Je})])):Ce("",!0),k(s).enableDownload.value==="yes"?(w(),Re(Mn,{key:1,title:"Download",class:"download",onClick:Ne},{default:ze(()=>[I0]),_:1})):Ce("",!0)],512),U("div",{ref_key:"gridContainerEl",ref:d,class:"gridContainer",onScroll:de},[U("div",{class:nt(["grid",{scrolled:re.value>0,wrapText:k(s).wrapText.value==="yes"}]),style:at(ce.value)},[C.value?(w(),O("div",x0,k0)):Ce("",!0),(w(!0),O(Me,null,ft(p.value,(E,F)=>{var D,j,ee;return w(),O("div",{key:E,"data-writer-grid-col":F+(C.value?1:0),class:"cell headerCell",onClick:we=>ge(we,E)},[U("div",$0,be(E),1),U("div",{class:"icon",style:at({visibility:((D=S.value)==null?void 0:D.columnName)==E?"visible":"hidden"})},[Ot(U("span",M0," arrow_downward ",512),[[rn,!((j=S.value)!=null&&j.descending)]]),Ot(U("span",N0," arrow_upward ",512),[[rn,(ee=S.value)==null?void 0:ee.descending]])],4),O0],8,E0)}),128)),(w(!0),O(Me,null,ft((st=le.value)==null?void 0:st.data,(E,F)=>(w(),O(Me,{key:F},[C.value?(w(),O("div",P0,[v.value.length==0?(w(),O(Me,{key:0},[yt(be(le.value.indices[F]),1)],64)):(w(),O(Me,{key:1},[yt(be(g.value.map(D=>E[D]).join(", ")),1)],64))])):Ce("",!0),(w(!0),O(Me,null,ft(p.value,D=>(w(),O("div",{key:D,class:"cell"},[k(s).useMarkdown.value=="yes"?(w(),Re(Vl,{key:0,"raw-text":E[D]},null,8,["raw-text"])):(w(),O(Me,{key:1},[yt(be(E[D]),1)],64))]))),128))],64))),128))],6),z.value?(w(),O("div",{key:0,class:"endpoint",style:at(ie.value)},null,4)):Ce("",!0)],544)],512)}}}),B0=Ie(F0,[["__scopeId","data-v-3d42e409"]]),V0={key:0},U0={key:1},H0={key:2},j0={key:3},z0="A text component used to display headings or titles in different sizes and styles.",W0={writer:{name:"Heading",description:z0,category:"Content",fields:{text:{name:"Text",default:"(No text)",init:"Heading Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:P.Text},headingType:{name:"Heading type",default:"h3",options:{h1:"h1 (Big)",h2:"h2 (Normal)",h3:"h3 (Small)",h4:"h4 (Smallest)"},type:P.Text,category:Oe.Style},alignment:{name:"Alignment",default:"left",type:P.Text,category:Oe.Style,options:{left:"Left",center:"Center",right:"Right"}},primaryTextColor:St,cssClasses:We},previewField:"text"}},K0=Ae({...W0,__name:"CoreHeading",setup(e){const t=G(Y.evaluatedFields);return(n,o)=>(w(),O("div",{class:"CoreHeading",style:at({"text-align":k(t).alignment.value})},[k(t).headingType.value=="h1"?(w(),O("h1",V0,be(k(t).text.value),1)):k(t).headingType.value=="h3"?(w(),O("h3",U0,be(k(t).text.value),1)):k(t).headingType.value=="h4"?(w(),O("h4",H0,be(k(t).text.value),1)):(w(),O("h2",j0,be(k(t).text.value),1))],4))}}),G0=Ie(K0,[["__scopeId","data-v-a24181bd"]]),Y0={class:"icon"},J0={writer:{name:"Icon",description:"A component to display an icon",category:"Content",fields:{icon:{name:"Icon",type:P.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:Oe.Style,default:"arrow_forward"},size:{name:"Icon size",type:P.Number,desc:"Icon size in px",category:Oe.Style,default:"14"},color:{name:"Icon color",type:P.Color,category:Oe.Style},cssClasses:We},previewField:"icon"}},bp=Ae({...J0,__name:"CoreIcon",setup(e){const t=G(Y.evaluatedFields);return(n,o)=>(w(),O("div",Y0,[k(t).icon.value?(w(),O("span",{key:0,class:"material-symbols-outlined",style:at({fontSize:`${k(t).size.value}px`,color:k(t).color.value})},be(k(t).icon.value),5)):Ce("",!0)]))}}),qu=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 qu=="function"&&qu(bp);const Q0=Ie(bp,[["__scopeId","data-v-783aa549"]]);function Fs(e){const t={ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-click",{detail:{payload:t}})}function q0(e){const t={key:e.key,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-keydown",{detail:{payload:t}})}const X0=["src","alt"],Z0={key:0,class:"captionContainer"},eA="A component to display images.",tA=`
def click_handler(state):

	# Increment counter when the image is clicked

	state["counter"] += 1`,nA={writer:{name:"Image",description:eA,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:P.Text},caption:{name:"Caption",init:"Image Caption",desc:"Leave blank to hide.",type:P.Text},maxWidth:{name:"Max width (px)",type:P.Number,default:"-1",category:Oe.Style},maxHeight:{name:"Max height (px)",type:P.Number,default:"-1",category:Oe.Style},secondaryTextColor:hn,cssClasses:We},events:{"wf-click":{desc:"Capture single clicks.",stub:tA.trim()}},previewField:"caption"}},Ap=Ae({...nA,__name:"CoreImage",setup(e){const t=X(null),n=G(Y.core),o=G(Y.evaluatedFields),a=G(Y.componentId),r=Z(()=>{var h;return{cursor:typeof((h=n.getComponentById(a).handlers)==null?void 0:h["wf-click"])<"u"?"pointer":"unset"}}),s=Z(()=>{const c=o.maxWidth.value,d=o.maxHeight.value;return{"max-width":c!==-1?`${c}px`:void 0,"max-height":d!==-1?`${d}px`:void 0}});function l(c){const d=Fs(c);t.value.dispatchEvent(d)}return(c,d)=>(w(),O("div",{ref_key:"rootEl",ref:t,class:"CoreImage",style:at(r.value),onClick:l},[U("img",{src:k(o).src.value,alt:k(o).caption.value,draggable:"false",style:at(s.value)},null,12,X0),k(o).caption.value||k(o).caption.value===0?(w(),O("div",Z0,be(k(o).caption.value),1)):Ce("",!0)],4))}}),Xu=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 Xu=="function"&&Xu(Ap);const oA=Ie(Ap,[["__scopeId","data-v-0185a273"]]),aA={},rA=e=>(Rt("data-v-5a38f374"),e=e(),Dt(),e),sA={class:"LoadingSymbol"},iA=rA(()=>U("div",null,null,-1)),lA=[iA];function cA(e,t){return w(),O("div",sA,lA)}const Cp=Ie(aA,[["render",cA],["__scopeId","data-v-5a38f374"]]),uA={class:"BaseEmptiness"},dA={class:"content"},fA={class:"title"},pA={key:0,class:"message"},hA=Ae({__name:"BaseEmptiness",props:{componentId:{type:String,required:!0},message:{type:String,required:!1,default:void 0}},setup(e){const t=e,n=G(Y.core),o=Z(()=>n.getComponentById(t.componentId)),a=Z(()=>n.getComponentDefinition(o.value.type));return(r,s)=>(w(),O("div",uA,[U("div",dA,[U("div",fA,[U("h3",null,"Empty "+be(a.value.name),1)]),e.message?(w(),O("div",pA,be(e.message),1)):Ce("",!0)])]))}}),Ul=Ie(hA,[["__scopeId","data-v-56d55a40"]]),vA={key:0,class:"message"},mA="A component that displays a message in various styles, including success, error, warning, and informational.",gA={writer:{name:"Message",description:mA,category:"Content",fields:{message:{name:"Message",type:P.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:"#A9F9E1",type:P.Color,category:Oe.Style},errorColor:{name:"Error",default:"#FFCFC2",type:P.Color,category:Oe.Style},warningColor:{name:"Warning",default:"#FFE999",type:P.Color,category:Oe.Style},infoColor:{name:"Info",default:"#E4E9FF",type:P.Color,category:Oe.Style},loadingColor:{name:"Loading",default:"#E4E9FF",type:P.Color,category:Oe.Style},primaryTextColor:St,cssClasses:We},previewField:"name"}},wp=Ae({...gA,__name:"CoreMessage",setup(e){const t=G(Y.componentId),n=G(Y.evaluatedFields),o=G(Y.isBeingEdited),a=Z(()=>{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=Z(()=>{const l=n.message.value;if(!l)return;const c=l.charAt(0);return c=="+"||c=="-"||c=="!"||c=="%"?l.substring(1).trim():l}),s=Z(()=>({"--messageActiveSeverityColor":{error:n.errorColor.value,success:n.successColor.value,warning:n.warningColor.value,info:n.infoColor.value,loading:n.loadingColor.value}[a.value]}));return(l,c)=>r.value||k(o)?(w(),O("div",{key:0,class:nt(["CoreMessage",a.value]),style:at(s.value)},[r.value?(w(),O("div",vA,[a.value=="loading"?(w(),Re(Cp,{key:0,class:"loadingSymbol"})):Ce("",!0),U("span",null,be(r.value),1)])):(w(),Re(Ul,{key:1,"component-id":k(t)},null,8,["component-id"]))],6)):Ce("",!0)}}),Zu=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 Zu=="function"&&Zu(wp);const yA=Ie(wp,[["__scopeId","data-v-ea477962"]]),_A={key:0,class:"name"},bA={key:1,class:"description"},AA={class:"value"},CA={key:2,class:"note"},wA="A component that prominently displays a metric value and associated information.",IA={writer:{name:"Metric",description:wA,category:"Content",fields:{name:{name:"Name",init:"Metric",type:P.Text},metricValue:{name:"Value",default:"0",type:P.Text,desc:"The main value to be displayed. It's not limited to numbers."},description:{name:"Description",type:P.Text},note:{name:"Note",init:"+Pass",type:P.Text,desc:"Prefix with '+' for a positive message, with '-' for a negative message."},primaryTextColor:St,secondaryTextColor:hn,positiveColor:{name:"Positive",default:"#a9f9e1",type:P.Color,category:Oe.Style},neutralColor:{name:"Neutral",default:"var(--separatorColor)",type:P.Color,category:Oe.Style},negativeColor:{name:"Negative",default:"#ffcfc2",type:P.Color,category:Oe.Style},cssClasses:We},previewField:"name"}},xA=Ae({...IA,__name:"CoreMetric",setup(e){const t=G(Y.evaluatedFields),n=Z(()=>{const r=t.note.value;if(!r)return"neutral";const s=r.charAt(0);return s=="+"?"positive":s=="-"?"negative":"neutral"}),o=Z(()=>{const r=t.note.value;if(!r)return;const s=r.charAt(0);return s=="+"||s=="-"?r.substring(1):r}),a=Z(()=>({"--messageActiveSentimentColor":{positive:t.positiveColor.value,neutral:t.neutralColor.value,negative:t.negativeColor.value}[n.value]}));return(r,s)=>(w(),O("div",{class:"CoreMetric",style:at(a.value)},[k(t).name.value?(w(),O("div",_A,be(k(t).name.value),1)):Ce("",!0),k(t).description.value?(w(),O("div",bA,be(k(t).description.value),1)):Ce("",!0),U("h2",AA,be(k(t).metricValue.value),1),o.value?(w(),O("div",CA,be(o.value),1)):Ce("",!0)],4))}}),TA=Ie(xA,[["__scopeId","data-v-74a75863"]]),SA=e=>(Rt("data-v-8f91d84e"),e=e(),Dt(),e),kA=SA(()=>U("div",{class:"mask"},null,-1)),EA="A component that displays Plotly graphs.",$A={data:[{x:["a","b","c"],y:[22,25,29],type:"bar"}]},MA={writer:{name:"Plotly Graph",description:EA,category:"Content",fields:{spec:{name:"Graph specification",default:JSON.stringify($A,null,2),desc:"Plotly graph specification. Pass it using state, e.g. @{fig}, or paste a JSON specification.",type:P.Object},cssClasses:We},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."}}}},Ip=Ae({...MA,__name:"CorePlotlyGraph",setup(e){const t=X(null),n=X(null),o=G(Y.evaluatedFields),a=Z(()=>o.spec.value),r={paper_bgcolor:"#ffffff",plot_bgcolor:"#f5f5f9",colorway:["#6985FF","#A95EF8","#F86","#3BDCAB"],font:{family:"Poppins, sans-serif",size:12,color:"#000000"},hoverlabel:{color:"#ffffff",bgcolor:"#000000"}},s=async()=>{var C,S,A;if(!a.value||!n.value)return;const f=await Xt(()=>import("./plotly.min-DhuS2WZt.js").then(y=>y.p),[],import.meta.url);if(!t.value||t.value.clientHeight==0)return;const v={...a.value,layout:{...r,...(C=a.value)==null?void 0:C.layout}};f.newPlot(n.value,v),c(),(A=(S=a.value)==null?void 0:S.layout)!=null&&A.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 v,C;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:(v=f.xaxis)==null?void 0:v.anchor},yaxis:{anchor:(C=f.yaxis)==null?void 0:C.anchor}}}function h(f){return v=>{var S;const C=new CustomEvent(f,{detail:{payload:(S=v==null?void 0:v.points)==null?void 0:S.map(A=>d(A))}});t.value.dispatchEvent(C)}}return Be(a,f=>{f&&s()}),Ft(async()=>{await s(),t.value&&new ResizeObserver(s).observe(t.value,{box:"border-box"})}),(f,v)=>(w(),O("div",{ref_key:"rootEl",ref:t,class:"CorePlotlyGraph"},[U("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512),kA],512))}}),ed=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 ed=="function"&&ed(Ip);const NA=Ie(Ip,[["__scopeId","data-v-8f91d84e"]]),OA=`
def click_handler(state):

	# Increment counter when the text is clicked

	state["counter"] += 1`,PA="A component to display plain text or formatted text using Markdown syntax.",LA={writer:{name:"Text",description:PA,category:"Content",fields:{text:{name:"Text",init:"Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:P.Text,control:Ls.Textarea},useMarkdown:{name:"Use Markdown",desc:"The Markdown output will be sanitised; unsafe elements will be removed.",default:"no",type:P.Text,options:{yes:"Yes",no:"No"}},alignment:{name:"Alignment",default:"left",type:P.Text,options:{left:"Left",center:"Center",right:"Right"},category:Oe.Style},primaryTextColor:St,cssClasses:We},events:{"wf-click":{desc:"Capture single clicks.",stub:OA.trim()}},previewField:"text"}},RA=Ae({...LA,__name:"CoreText",setup(e){const t=X(null),n=G(Y.evaluatedFields),o=G(Y.componentId),a=G(Y.core),r=G(Y.isBeingEdited),s=Z(()=>!n.text.value),l=Z(()=>!s.value||r.value),c=Z(()=>{var C;return{cursor:typeof((C=a.getComponentById(o).handlers)==null?void 0:C["wf-click"])<"u"?"pointer":"unset"}}),d=Z(()=>({"text-align":n.alignment.value}));function h(f){const v=Fs(f);t.value.dispatchEvent(v)}return(f,v)=>l.value?(w(),O("div",{key:0,ref_key:"rootEl",ref:t,class:"CoreText",style:at(c.value),onClick:h},[s.value?(w(),Re(Ul,{key:0,"component-id":k(o)},null,8,["component-id"])):(w(),O(Me,{key:1},[k(n).useMarkdown.value=="yes"?(w(),Re(Vl,{key:0,"raw-text":k(n).text.value,style:at(d.value)},null,8,["raw-text","style"])):(w(),O("div",{key:1,class:"plainText",style:at(d.value)},be(k(n).text.value),5))],64))],4)):Ce("",!0)}}),DA=Ie(RA,[["__scopeId","data-v-1a886b3d"]]),xp="A component that displays Vega-Lite/Altair charts.",FA={$schema:"https://vega.github.io/schema/vega-lite/v5.json",description:xp,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"}}},BA={writer:{name:"Vega Lite Chart",description:xp,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:P.Object},cssClasses:We}}},Tp=Ae({...BA,__name:"CoreVegaLiteChart",setup(e){const t=X(null),n=X(null),o=G(Y.evaluatedFields),a=async()=>{if(!o.spec.value||!n.value)return;const{default:r}=await Xt(()=>import("./vega-embed.module-SNP5iNdJ.js"),[],import.meta.url);await r(n.value,o.spec.value)};return Be(()=>o.spec.value,r=>{r&&a()}),Ft(()=>{a(),new ResizeObserver(a).observe(t.value,{box:"border-box"})}),(r,s)=>(w(),O("div",{ref_key:"rootEl",ref:t,class:"CoreVegaLiteChart"},[U("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512)],512))}}),td=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 td=="function"&&td(Tp);const VA=Ie(Tp,[["__scopeId","data-v-9420293e"]]),UA=e=>(Rt("data-v-1a693d93"),e=e(),Dt(),e),HA={class:"CoreVideoPlayer"},jA=["src","controls","autoplay","loop","muted"],zA=UA(()=>U("div",{class:"mask"},null,-1)),WA="A video player component that can play various video formats.",KA={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:P.Text},controls:{name:"Controls",desc:"Display video player controls.",default:"yes",type:P.Text,options:{yes:"Yes",no:"No"}},autoplay:{name:"Autoplay",desc:"Autoplay the video when the component is loaded.",default:"no",type:P.Text,options:{yes:"Yes",no:"No"}},loop:{name:"Loop",desc:"Loop the video when it reaches the end.",default:"no",type:P.Text,options:{yes:"Yes",no:"No"}},muted:{name:"Muted",desc:"Mute the video by default.",default:"no",type:P.Text,options:{yes:"Yes",no:"No"}},cssClasses:We}}},Sp=Ae({...KA,__name:"CoreVideoPlayer",setup(e){const t=G(Y.evaluatedFields);return(n,o)=>(w(),O("div",HA,[U("video",{src:k(t).src.value,controls:k(t).controls.value==="yes",autoplay:k(t).autoplay.value==="yes",loop:k(t).loop.value==="yes",muted:k(t).muted.value==="yes"},null,8,jA),zA]))}}),nd=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 nd=="function"&&nd(Sp);const GA=Ie(Sp,[["__scopeId","data-v-1a693d93"]]),YA={class:"CoreLink"},JA=["href","target","rel"],QA={writer:{name:"Link",description:"A component to create a hyperlink.",category:"Content",fields:{url:{name:"URL",type:P.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:P.Text,options:{_self:"Self",_blank:"Blank",_parent:"Parent",_top:"Top"},desc:"Specifies where to open the linked document.",default:"_self"},rel:{name:"Rel",type:P.Text,desc:"Specifies the relationship between the current document and the linked document."},text:{name:"Text",default:"",type:P.Text,desc:"The text to display in the link."},primaryTextColor:St,cssClasses:We}}},qA=Ae({...QA,__name:"CoreLink",setup(e){const t=G(Y.evaluatedFields),n=Z(()=>t.text.value||t.url.value);return(o,a)=>(w(),O("div",YA,[U("a",{href:k(t).url.value,target:k(t).target.value,rel:k(t).rel.value},be(n.value),9,JA)]))}}),XA=Ie(qA,[["__scopeId","data-v-9c5e1448"]]),ZA={},e1={width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t1=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),n1=[t1];function o1(e,t){return w(),O("svg",e1,n1)}const a1=Ie(ZA,[["render",o1]]),r1={class:"CoreChatbotAvatar"},s1=Ae({__name:"CoreChatbotAvatar",props:{initials:{type:String,required:!0}},setup(e){return(t,n)=>(w(),O("div",r1,be(e.initials),1))}}),i1=Ie(s1,[["__scopeId","data-v-ce5bb453"]]),l1=["aria-busy"],c1={key:1,class:"CoreChatbotMessage__content__text"},u1={key:2,class:"CoreChatbotMessage__content__actions"},d1=["onClick"],f1={key:0,class:"subheading"},p1={class:"name"},h1={key:1,class:"desc"},v1=Ae({__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=zi(()=>Xt(()=>Promise.resolve().then(()=>C0),void 0,import.meta.url)),n=zi(()=>Xt(()=>import("./CoreChatbotLoader-DNXAEmWp.js"),__vite__mapDeps([3,4]),import.meta.url)),o=e,a=Z(()=>{var d;return((d=o.message)==null?void 0:d.actions)??[]}),r=Z(()=>o.isLoading&&!l.value),s=Z(()=>{var d;return o.isLoading?"assistant":((d=o.message)==null?void 0:d.role)??""}),l=Z(()=>{var d;return((d=o.message)==null?void 0:d.content.trim())??""}),c=Z(()=>{switch(s.value){case"user":return"var(--userRoleColor)";case"assistant":return o.assistantRoleColor||"linear-gradient(264deg, #f5ebff 0.71%, #eef1ff 100%)";default:return""}});return(d,h)=>(w(),O("div",{class:"CoreChatbotMessage","aria-busy":e.isLoading},[Ve(i1,{initials:e.initials},null,8,["initials"]),U("div",{class:"CoreChatbotMessage__content",style:at({background:c.value})},[r.value?(w(),Re(k(n),{key:0})):(w(),O("div",c1,[e.useMarkdown?(w(),Re(k(t),{key:0,"raw-text":l.value},null,8,["raw-text"])):(w(),O(Me,{key:1},[yt(be(l.value),1)],64))])),a.value.length?(w(),O("div",u1,[(w(!0),O(Me,null,ft(a.value,(f,v)=>(w(),O("button",{key:v,class:"action",onClick:C=>d.$emit("actionClick",f)},[f.subheading?(w(),O("div",f1,be(f.subheading),1)):Ce("",!0),U("h3",p1,be(f.name),1),f.desc?(w(),O("div",h1,be(f.desc),1)):Ce("",!0)],8,d1))),128))])):Ce("",!0)],4)],8,l1))}}),od=Ie(v1,[["__scopeId","data-v-54e985f1"]]),m1=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],g1=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],y1=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],_1=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ad=(e,t,n)=>{let o=e;return typeof t=="string"||Array.isArray(t)?o=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(o=e.toLocaleString(void 0,n)),o};function rd(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?_1:y1:t.binary?g1:m1,o=t.space?" ":"";if(t.signed&&e===0)return` 0${o}${n[0]}`;const a=e<0,r=a?"-":t.signed?"+":"";a&&(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=ad(e,t.locale,s);return r+h+o+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=ad(Number(e),t.locale,s),d=n[l];return r+c+o+d}const b1=Ae({__name:"WdsTextareaInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Co(e,"modelValue");return(n,o)=>Ot((w(),O("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>t.value=a)},null,512)),[[Ao,t.value]])}}),A1=Ie(b1,[["__scopeId","data-v-4cec29bc"]]),Bs=e=>(Rt("data-v-4a70b95a"),e=e(),Dt(),e),C1={class:"filesArea"},w1={key:1,class:"list"},I1=["title"],x1={class:"size"},T1=Bs(()=>U("i",{class:"material-symbols-outlined"}," delete ",-1)),S1={class:"filesButtons"},k1=Bs(()=>U("i",{class:"material-symbols-outlined"},"upload",-1)),E1={key:1,class:"sizeExceededMessage"},$1=Bs(()=>U("i",{class:"material-symbols-outlined"},"warning",-1)),M1={class:"inputArea"},N1={class:"inputButtons"},O1=Bs(()=>U("i",{class:"material-symbols-outlined"},"attach_file",-1)),Ri=200*1024*1024,P1="A chatbot component to build human-to-AI interactions.",L1=`[
  {
  "role": "assistant",
  "content": "How can I help you?"
  },
  {
  "role": "user",
  "content": "I'm building a Chatbot"
  }
]`,R1=`
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(),D1=`
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(),B1={writer:{name:"Chatbot",description:P1,category:"Content",fields:{conversation:{name:"Conversation",init:L1,desc:"An array with messages or a writer.ai.Conversation object.",type:P.Object},assistantInitials:{name:"Assistant initials",default:"AI",type:P.Text},userInitials:{name:"User initials",default:"YOU",type:P.Text},useMarkdown:{name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no",type:P.Text,options:{yes:"Yes",no:"No"}},enableFileUpload:{name:"Enable file upload",default:"no",type:P.Text,options:{single:"Single file",multiple:"Multiple files",no:"No"}},placeholder:{name:"Placeholder",default:"What do you need?",type:P.Text},assistantRoleColor:{name:"Assistant role",type:P.Color,category:Oe.Style,applyStyleVariable:!0},userRoleColor:{name:"User role",default:"#F5F5F9",type:P.Color,category:Oe.Style,applyStyleVariable:!0},avatarBackgroundColor:{name:"Avatar",default:"#2C2D30",type:P.Color,category:Oe.Style,applyStyleVariable:!0},avatarTextColor:{name:"Avatar text",default:"#FFFFFF",type:P.Color,category:Oe.Style,applyStyleVariable:!0},accentColor:Wt,containerBackgroundColor:Vn,primaryTextColor:St,secondaryTextColor:hn,separatorColor:Bt,buttonColor:{...Un,default:"#000000"},buttonTextColor:{...Hn,default:"#ffffff"},cssClasses:We},events:{"wf-chatbot-message":{desc:"Triggered when the user sends a message.",stub:R1},"wf-chatbot-action-click":{desc:"Handle clicks on actions.",stub:D1},"wf-file-change":{desc:"Triggered when files are uploaded",stub:F1}}}},kp=Ae({...B1,__name:"CoreChatbot",setup(e){const t=X(null),n=X(null),o=X(null),a=X(void 0),r=G(Y.evaluatedFields),s=Al([]),l=X(!1);let c;const d=Z(()=>{var p;return((p=r.conversation)==null?void 0:p.value)??[]}),h=X(""),f=Z(()=>{let p=0;return Array.from(s.value).forEach(_=>{p+=_.size}),p>=Ri}),v=Z(()=>a.value===void 0?!1:a.value>=d.value.length);function C(){if(a.value)return;a.value=d.value.length+1;const p=new CustomEvent("wf-chatbot-message",{detail:{payload:{role:"user",content:h.value},callback:()=>{a.value=void 0}}});t.value.dispatchEvent(p),h.value=""}function S(p){const{data:_}=p,b=new CustomEvent("wf-chatbot-action-click",{detail:{payload:_}});t.value.dispatchEvent(b)}function A(){const p=document.createElement("input");p.type="file",r.enableFileUpload.value=="multiple"&&(p.multiple=!0),p.addEventListener("change",()=>{let _;r.enableFileUpload.value=="multiple"?_=[...s.value]:_=[],Array.from(p.files).forEach(b=>{_.push(b)}),s.value=_}),p.dispatchEvent(new MouseEvent("click"))}function y(p){const _=s.value.toSpliced(p,1);s.value=_}function $(){n.value.scrollTo({top:n.value.scrollHeight,left:0})}const x=async p=>{var _=new FileReader;return _.readAsDataURL(p),new Promise((b,z)=>{_.onload=()=>b(_.result),_.onerror=()=>z(_.error)})};async function g(){if(s.value.length==0||l.value)return;l.value=!0;const _=await(async()=>{let z=0;const W=Promise.all(Array.from(s.value).map(async re=>(z+=re.size,{name:re.name,type:re.type,data:await x(re)})));if(z>Ri){alert("Size limit exceeded.");return}return W})();if(!_){l.value=!1;return}const b=new CustomEvent("wf-file-change",{detail:{payload:_,callback:()=>{l.value=!1,s.value=[]}}});t.value.dispatchEvent(b)}return Ft(()=>{c=new ResizeObserver(()=>{$()}),c.observe(o.value)}),Xo(()=>{c.unobserve(o.value)}),(p,_)=>(w(),O("div",{ref_key:"rootEl",ref:t,class:"CoreChatbot"},[U("div",{ref_key:"messageAreaEl",ref:n,class:"messageArea"},[U("div",{ref_key:"messagesEl",ref:o,class:"messages"},[(w(!0),O(Me,null,ft(d.value,(b,z)=>(w(),Re(od,{key:z,message:b,"use-markdown":k(r).useMarkdown.value=="yes","assistant-role-color":k(r).assistantRoleColor.value,initials:b.role==="assistant"?k(r).assistantInitials.value:k(r).userInitials.value,onActionClick:_[0]||(_[0]=W=>S(W))},null,8,["message","use-markdown","assistant-role-color","initials"]))),128)),v.value?(w(),Re(od,{key:0,"is-loading":"",initials:k(r).assistantInitials.value},null,8,["initials"])):Ce("",!0)],512)],512),s.value.length>0?(w(),O(Me,{key:0},[U("div",C1,[l.value?(w(),O(Me,{key:0},[yt(" Uploading... ")],64)):Ce("",!0),l.value?Ce("",!0):(w(),O("div",w1,[(w(!0),O(Me,null,ft(s.value,(b,z)=>(w(),O("div",{key:z,class:"file"},[U("div",null,[U("div",{class:"name",title:b.name},be(b.name),9,I1),U("div",x1,be(k(rd)(b.size)),1)]),Ve(Mn,{onClick:W=>y(z)},{default:ze(()=>[T1]),_:2},1032,["onClick"])]))),128))]))]),U("div",S1,[!f.value&&!l.value?(w(),Re(Mn,{key:0,title:"Upload",onClick:g},{default:ze(()=>[k1]),_:1})):Ce("",!0),f.value?(w(),O("div",E1,[$1,yt(" Size limit of "+be(k(rd)(Ri))+" exceeded. ",1)])):Ce("",!0)])],64)):Ce("",!0),U("div",M1,[Ve(A1,{modelValue:h.value,"onUpdate:modelValue":_[1]||(_[1]=b=>h.value=b),placeholder:k(r).placeholder.value,onKeydown:Go(Ta(C,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])]),U("div",N1,[Ve(Mn,{class:"send action",title:"Send message",onClick:C},{default:ze(()=>[Ve(a1)]),_:1}),k(r).enableFileUpload.value!="no"?(w(),Re(Mn,{key:0,class:"action",title:"Attach files",onClick:A},{default:ze(()=>[O1]),_:1})):Ce("",!0)])],512))}}),sd=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 sd=="function"&&sd(kp);const V1=Ie(kp,[["__scopeId","data-v-4a70b95a"]]);var U1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function H1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nE(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?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(o){var a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,a.get?a:{enumerable:!0,get:function(){return e[o]}})}),n}var Ep={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,o){e.exports=o()})(U1,function(){for(var n=function(i,u,m){return u===void 0&&(u=0),m===void 0&&(m=1),i<u?u:i>m?m:i},o=n,a=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]=o(i[u],0,255)):u===3&&(i[u]=o(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(m){return i[0][m]!==void 0}).map(function(m){return i[0][m]}):i[0]},v=d,C=function(i){if(i.length<2)return null;var u=i.length-1;return v(i[u])=="string"?i[u].toLowerCase():null},S=Math.PI,A={clip_rgb:a,limit:n,type:d,unpack:f,last:C,PI:S,TWOPI:S*2,PITHIRD:S/3,DEG2RAD:S/180,RAD2DEG:180/S},y={format:{},autodetect:[]},$=A.last,x=A.clip_rgb,g=A.type,p=y,_=function(){for(var u=[],m=arguments.length;m--;)u[m]=arguments[m];var I=this;if(g(u[0])==="object"&&u[0].constructor&&u[0].constructor===this.constructor)return u[0];var N=$(u),B=!1;if(!N){B=!0,p.sorted||(p.autodetect=p.autodetect.sort(function(fe,ke){return ke.p-fe.p}),p.sorted=!0);for(var M=0,H=p.autodetect;M<H.length;M+=1){var K=H[M];if(N=K.test.apply(K,u),N)break}}if(p.format[N]){var ae=p.format[N].apply(null,B?u:u.slice(0,-1));I._rgb=x(ae)}else throw new Error("unknown format: "+u);I._rgb.length===3&&I._rgb.push(1)};_.prototype.toString=function(){return g(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var b=_,z=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(z.Color,[null].concat(i)))};z.Color=b,z.version="2.4.2";var W=z,re=A.unpack,le=Math.max,ce=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=re(i,"rgb"),I=m[0],N=m[1],B=m[2];I=I/255,N=N/255,B=B/255;var M=1-le(I,le(N,B)),H=M<1?1/(1-M):0,K=(1-I-M)*H,ae=(1-N-M)*H,fe=(1-B-M)*H;return[K,ae,fe,M]},ie=ce,de=A.unpack,ye=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=de(i,"cmyk");var m=i[0],I=i[1],N=i[2],B=i[3],M=i.length>4?i[4]:1;return B===1?[0,0,0,M]:[m>=1?0:255*(1-m)*(1-B),I>=1?0:255*(1-I)*(1-B),N>=1?0:255*(1-N)*(1-B),M]},Ee=ye,ge=W,pe=b,ue=y,Ne=A.unpack,wt=A.type,Je=ie;pe.prototype.cmyk=function(){return Je(this._rgb)},ge.cmyk=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(pe,[null].concat(i,["cmyk"])))},ue.format.cmyk=Ee,ue.autodetect.push({p:2,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=Ne(i,"cmyk"),wt(i)==="array"&&i.length===4)return"cmyk"}});var _t=A.unpack,xe=A.last,je=function(i){return Math.round(i*100)/100},st=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=_t(i,"hsla"),I=xe(i)||"lsa";return m[0]=je(m[0]||0),m[1]=je(m[1]*100)+"%",m[2]=je(m[2]*100)+"%",I==="hsla"||m.length>3&&m[3]<1?(m[3]=m.length>3?m[3]:1,I="hsla"):m.length=3,I+"("+m.join(",")+")"},E=st,F=A.unpack,D=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=F(i,"rgba");var m=i[0],I=i[1],N=i[2];m/=255,I/=255,N/=255;var B=Math.min(m,I,N),M=Math.max(m,I,N),H=(M+B)/2,K,ae;return M===B?(K=0,ae=Number.NaN):K=H<.5?(M-B)/(M+B):(M-B)/(2-M-B),m==M?ae=(I-N)/(M-B):I==M?ae=2+(N-m)/(M-B):N==M&&(ae=4+(m-I)/(M-B)),ae*=60,ae<0&&(ae+=360),i.length>3&&i[3]!==void 0?[ae,K,H,i[3]]:[ae,K,H]},j=D,ee=A.unpack,we=A.last,Te=E,T=j,L=Math.round,q=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=ee(i,"rgba"),I=we(i)||"rgb";return I.substr(0,3)=="hsl"?Te(T(m),I):(m[0]=L(m[0]),m[1]=L(m[1]),m[2]=L(m[2]),(I==="rgba"||m.length>3&&m[3]<1)&&(m[3]=m.length>3?m[3]:1,I="rgba"),I+"("+m.slice(0,I==="rgb"?3:4).join(",")+")")},se=q,R=A.unpack,J=Math.round,ne=function(){for(var i,u=[],m=arguments.length;m--;)u[m]=arguments[m];u=R(u,"hsl");var I=u[0],N=u[1],B=u[2],M,H,K;if(N===0)M=H=K=B*255;else{var ae=[0,0,0],fe=[0,0,0],ke=B<.5?B*(1+N):B+N-B*N,he=2*B-ke,Le=I/360;ae[0]=Le+1/3,ae[1]=Le,ae[2]=Le-1/3;for(var Pe=0;Pe<3;Pe++)ae[Pe]<0&&(ae[Pe]+=1),ae[Pe]>1&&(ae[Pe]-=1),6*ae[Pe]<1?fe[Pe]=he+(ke-he)*6*ae[Pe]:2*ae[Pe]<1?fe[Pe]=ke:3*ae[Pe]<2?fe[Pe]=he+(ke-he)*(2/3-ae[Pe])*6:fe[Pe]=he;i=[J(fe[0]*255),J(fe[1]*255),J(fe[2]*255)],M=i[0],H=i[1],K=i[2]}return u.length>3?[M,H,K,u[3]]:[M,H,K,1]},Q=ne,oe=Q,te=y,me=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,$e=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Se=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Ue=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ge=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Qe=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ct=Math.round,pt=function(i){i=i.toLowerCase().trim();var u;if(te.format.named)try{return te.format.named(i)}catch{}if(u=i.match(me)){for(var m=u.slice(1,4),I=0;I<3;I++)m[I]=+m[I];return m[3]=1,m}if(u=i.match($e)){for(var N=u.slice(1,5),B=0;B<4;B++)N[B]=+N[B];return N}if(u=i.match(Se)){for(var M=u.slice(1,4),H=0;H<3;H++)M[H]=ct(M[H]*2.55);return M[3]=1,M}if(u=i.match(Ue)){for(var K=u.slice(1,5),ae=0;ae<3;ae++)K[ae]=ct(K[ae]*2.55);return K[3]=+K[3],K}if(u=i.match(Ge)){var fe=u.slice(1,4);fe[1]*=.01,fe[2]*=.01;var ke=oe(fe);return ke[3]=1,ke}if(u=i.match(Qe)){var he=u.slice(1,4);he[1]*=.01,he[2]*=.01;var Le=oe(he);return Le[3]=+u[4],Le}};pt.test=function(i){return me.test(i)||$e.test(i)||Se.test(i)||Ue.test(i)||Ge.test(i)||Qe.test(i)};var kt=pt,tn=W,jn=b,Cn=y,ea=A.type,Et=se,nn=kt;jn.prototype.css=function(i){return Et(this._rgb,i)},tn.css=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(jn,[null].concat(i,["css"])))},Cn.format.css=nn,Cn.autodetect.push({p:5,test:function(i){for(var u=[],m=arguments.length-1;m-- >0;)u[m]=arguments[m+1];if(!u.length&&ea(i)==="string"&&nn.test(i))return"css"}});var xo=b,$t=W,to=y,js=A.unpack;to.format.gl=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=js(i,"rgba");return m[0]*=255,m[1]*=255,m[2]*=255,m},$t.gl=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(xo,[null].concat(i,["gl"])))},xo.prototype.gl=function(){var i=this._rgb;return[i[0]/255,i[1]/255,i[2]/255,i[3]]};var _r=A.unpack,Oa=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=_r(i,"rgb"),I=m[0],N=m[1],B=m[2],M=Math.min(I,N,B),H=Math.max(I,N,B),K=H-M,ae=K*100/255,fe=M/(255-K)*100,ke;return K===0?ke=Number.NaN:(I===H&&(ke=(N-B)/K),N===H&&(ke=2+(B-I)/K),B===H&&(ke=4+(I-N)/K),ke*=60,ke<0&&(ke+=360)),[ke,ae,fe]},br=Oa,Ar=A.unpack,zs=Math.floor,Cr=function(){for(var i,u,m,I,N,B,M=[],H=arguments.length;H--;)M[H]=arguments[H];M=Ar(M,"hcg");var K=M[0],ae=M[1],fe=M[2],ke,he,Le;fe=fe*255;var Pe=ae*255;if(ae===0)ke=he=Le=fe;else{K===360&&(K=0),K>360&&(K-=360),K<0&&(K+=360),K/=60;var qe=zs(K),et=K-qe,it=fe*(1-ae),dt=it+Pe*(1-et),Kt=it+Pe*et,Ht=it+Pe;switch(qe){case 0:i=[Ht,Kt,it],ke=i[0],he=i[1],Le=i[2];break;case 1:u=[dt,Ht,it],ke=u[0],he=u[1],Le=u[2];break;case 2:m=[it,Ht,Kt],ke=m[0],he=m[1],Le=m[2];break;case 3:I=[it,dt,Ht],ke=I[0],he=I[1],Le=I[2];break;case 4:N=[Kt,it,Ht],ke=N[0],he=N[1],Le=N[2];break;case 5:B=[Ht,it,dt],ke=B[0],he=B[1],Le=B[2];break}}return[ke,he,Le,M.length>3?M[3]:1]},wr=Cr,Ws=A.unpack,zn=A.type,Pa=W,La=b,Ra=y,Ks=br;La.prototype.hcg=function(){return Ks(this._rgb)},Pa.hcg=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(La,[null].concat(i,["hcg"])))},Ra.format.hcg=wr,Ra.autodetect.push({p:1,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=Ws(i,"hcg"),zn(i)==="array"&&i.length===3)return"hcg"}});var Ir=A.unpack,xn=A.last,To=Math.round,xr=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=Ir(i,"rgba"),I=m[0],N=m[1],B=m[2],M=m[3],H=xn(i)||"auto";M===void 0&&(M=1),H==="auto"&&(H=M<1?"rgba":"rgb"),I=To(I),N=To(N),B=To(B);var K=I<<16|N<<8|B,ae="000000"+K.toString(16);ae=ae.substr(ae.length-6);var fe="0"+To(M*255).toString(16);switch(fe=fe.substr(fe.length-2),H.toLowerCase()){case"rgba":return"#"+ae+fe;case"argb":return"#"+fe+ae;default:return"#"+ae}},Da=xr,Tr=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Gs=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,He=function(i){if(i.match(Tr)){(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),m=u>>16,I=u>>8&255,N=u&255;return[m,I,N,1]}if(i.match(Gs)){(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 B=parseInt(i,16),M=B>>24&255,H=B>>16&255,K=B>>8&255,ae=Math.round((B&255)/255*100)/100;return[M,H,K,ae]}throw new Error("unknown hex color: "+i)},V=He,_e=W,De=b,bt=A.type,Pt=y,Vt=Da;De.prototype.hex=function(i){return Vt(this._rgb,i)},_e.hex=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(De,[null].concat(i,["hex"])))},Pt.format.hex=V,Pt.autodetect.push({p:4,test:function(i){for(var u=[],m=arguments.length-1;m-- >0;)u[m]=arguments[m+1];if(!u.length&&bt(i)==="string"&&[3,4,5,6,7,8,9].indexOf(i.length)>=0)return"hex"}});var Jt=A.unpack,Rn=A.TWOPI,So=Math.min,Qt=Math.sqrt,Sr=Math.acos,kr=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=Jt(i,"rgb"),I=m[0],N=m[1],B=m[2];I/=255,N/=255,B/=255;var M,H=So(I,N,B),K=(I+N+B)/3,ae=K>0?1-H/K:0;return ae===0?M=NaN:(M=(I-N+(I-B))/2,M/=Qt((I-N)*(I-N)+(I-B)*(N-B)),M=Sr(M),B>N&&(M=Rn-M),M/=Rn),[M*360,ae,K]},nh=kr,oh=A.unpack,Ys=A.limit,ta=A.TWOPI,Js=A.PITHIRD,na=Math.cos,ah=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=oh(i,"hsi");var m=i[0],I=i[1],N=i[2],B,M,H;return isNaN(m)&&(m=0),isNaN(I)&&(I=0),m>360&&(m-=360),m<0&&(m+=360),m/=360,m<1/3?(H=(1-I)/3,B=(1+I*na(ta*m)/na(Js-ta*m))/3,M=1-(H+B)):m<2/3?(m-=1/3,B=(1-I)/3,M=(1+I*na(ta*m)/na(Js-ta*m))/3,H=1-(B+M)):(m-=2/3,M=(1-I)/3,H=(1+I*na(ta*m)/na(Js-ta*m))/3,B=1-(M+H)),B=Ys(N*B*3),M=Ys(N*M*3),H=Ys(N*H*3),[B*255,M*255,H*255,i.length>3?i[3]:1]},rh=ah,sh=A.unpack,ih=A.type,lh=W,ql=b,Xl=y,ch=nh;ql.prototype.hsi=function(){return ch(this._rgb)},lh.hsi=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(ql,[null].concat(i,["hsi"])))},Xl.format.hsi=rh,Xl.autodetect.push({p:2,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=sh(i,"hsi"),ih(i)==="array"&&i.length===3)return"hsi"}});var uh=A.unpack,dh=A.type,fh=W,Zl=b,ec=y,ph=j;Zl.prototype.hsl=function(){return ph(this._rgb)},fh.hsl=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(Zl,[null].concat(i,["hsl"])))},ec.format.hsl=Q,ec.autodetect.push({p:2,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=uh(i,"hsl"),dh(i)==="array"&&i.length===3)return"hsl"}});var hh=A.unpack,vh=Math.min,mh=Math.max,gh=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=hh(i,"rgb");var m=i[0],I=i[1],N=i[2],B=vh(m,I,N),M=mh(m,I,N),H=M-B,K,ae,fe;return fe=M/255,M===0?(K=Number.NaN,ae=0):(ae=H/M,m===M&&(K=(I-N)/H),I===M&&(K=2+(N-m)/H),N===M&&(K=4+(m-I)/H),K*=60,K<0&&(K+=360)),[K,ae,fe]},yh=gh,_h=A.unpack,bh=Math.floor,Ah=function(){for(var i,u,m,I,N,B,M=[],H=arguments.length;H--;)M[H]=arguments[H];M=_h(M,"hsv");var K=M[0],ae=M[1],fe=M[2],ke,he,Le;if(fe*=255,ae===0)ke=he=Le=fe;else{K===360&&(K=0),K>360&&(K-=360),K<0&&(K+=360),K/=60;var Pe=bh(K),qe=K-Pe,et=fe*(1-ae),it=fe*(1-ae*qe),dt=fe*(1-ae*(1-qe));switch(Pe){case 0:i=[fe,dt,et],ke=i[0],he=i[1],Le=i[2];break;case 1:u=[it,fe,et],ke=u[0],he=u[1],Le=u[2];break;case 2:m=[et,fe,dt],ke=m[0],he=m[1],Le=m[2];break;case 3:I=[et,it,fe],ke=I[0],he=I[1],Le=I[2];break;case 4:N=[dt,et,fe],ke=N[0],he=N[1],Le=N[2];break;case 5:B=[fe,et,it],ke=B[0],he=B[1],Le=B[2];break}}return[ke,he,Le,M.length>3?M[3]:1]},Ch=Ah,wh=A.unpack,Ih=A.type,xh=W,tc=b,nc=y,Th=yh;tc.prototype.hsv=function(){return Th(this._rgb)},xh.hsv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(tc,[null].concat(i,["hsv"])))},nc.format.hsv=Ch,nc.autodetect.push({p:2,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=wh(i,"hsv"),Ih(i)==="array"&&i.length===3)return"hsv"}});var Er={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},oa=Er,Sh=A.unpack,oc=Math.pow,kh=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=Sh(i,"rgb"),I=m[0],N=m[1],B=m[2],M=Eh(I,N,B),H=M[0],K=M[1],ae=M[2],fe=116*K-16;return[fe<0?0:fe,500*(H-K),200*(K-ae)]},Qs=function(i){return(i/=255)<=.04045?i/12.92:oc((i+.055)/1.055,2.4)},qs=function(i){return i>oa.t3?oc(i,1/3):i/oa.t2+oa.t0},Eh=function(i,u,m){i=Qs(i),u=Qs(u),m=Qs(m);var I=qs((.4124564*i+.3575761*u+.1804375*m)/oa.Xn),N=qs((.2126729*i+.7151522*u+.072175*m)/oa.Yn),B=qs((.0193339*i+.119192*u+.9503041*m)/oa.Zn);return[I,N,B]},ac=kh,aa=Er,$h=A.unpack,Mh=Math.pow,Nh=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=$h(i,"lab");var m=i[0],I=i[1],N=i[2],B,M,H,K,ae,fe;return M=(m+16)/116,B=isNaN(I)?M:M+I/500,H=isNaN(N)?M:M-N/200,M=aa.Yn*Zs(M),B=aa.Xn*Zs(B),H=aa.Zn*Zs(H),K=Xs(3.2404542*B-1.5371385*M-.4985314*H),ae=Xs(-.969266*B+1.8760108*M+.041556*H),fe=Xs(.0556434*B-.2040259*M+1.0572252*H),[K,ae,fe,i.length>3?i[3]:1]},Xs=function(i){return 255*(i<=.00304?12.92*i:1.055*Mh(i,1/2.4)-.055)},Zs=function(i){return i>aa.t1?i*i*i:aa.t2*(i-aa.t0)},rc=Nh,Oh=A.unpack,Ph=A.type,Lh=W,sc=b,ic=y,Rh=ac;sc.prototype.lab=function(){return Rh(this._rgb)},Lh.lab=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(sc,[null].concat(i,["lab"])))},ic.format.lab=rc,ic.autodetect.push({p:2,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=Oh(i,"lab"),Ph(i)==="array"&&i.length===3)return"lab"}});var Dh=A.unpack,Fh=A.RAD2DEG,Bh=Math.sqrt,Vh=Math.atan2,Uh=Math.round,Hh=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=Dh(i,"lab"),I=m[0],N=m[1],B=m[2],M=Bh(N*N+B*B),H=(Vh(B,N)*Fh+360)%360;return Uh(M*1e4)===0&&(H=Number.NaN),[I,M,H]},lc=Hh,jh=A.unpack,zh=ac,Wh=lc,Kh=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=jh(i,"rgb"),I=m[0],N=m[1],B=m[2],M=zh(I,N,B),H=M[0],K=M[1],ae=M[2];return Wh(H,K,ae)},Gh=Kh,Yh=A.unpack,Jh=A.DEG2RAD,Qh=Math.sin,qh=Math.cos,Xh=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=Yh(i,"lch"),I=m[0],N=m[1],B=m[2];return isNaN(B)&&(B=0),B=B*Jh,[I,qh(B)*N,Qh(B)*N]},cc=Xh,Zh=A.unpack,ev=cc,tv=rc,nv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=Zh(i,"lch");var m=i[0],I=i[1],N=i[2],B=ev(m,I,N),M=B[0],H=B[1],K=B[2],ae=tv(M,H,K),fe=ae[0],ke=ae[1],he=ae[2];return[fe,ke,he,i.length>3?i[3]:1]},uc=nv,ov=A.unpack,av=uc,rv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=ov(i,"hcl").reverse();return av.apply(void 0,m)},sv=rv,iv=A.unpack,lv=A.type,dc=W,$r=b,ei=y,fc=Gh;$r.prototype.lch=function(){return fc(this._rgb)},$r.prototype.hcl=function(){return fc(this._rgb).reverse()},dc.lch=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply($r,[null].concat(i,["lch"])))},dc.hcl=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply($r,[null].concat(i,["hcl"])))},ei.format.lch=uc,ei.format.hcl=sv,["lch","hcl"].forEach(function(i){return ei.autodetect.push({p:2,test:function(){for(var u=[],m=arguments.length;m--;)u[m]=arguments[m];if(u=iv(u,i),lv(u)==="array"&&u.length===3)return i}})});var cv={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"},pc=cv,uv=b,hc=y,dv=A.type,Fa=pc,fv=V,pv=Da;uv.prototype.name=function(){for(var i=pv(this._rgb,"rgb"),u=0,m=Object.keys(Fa);u<m.length;u+=1){var I=m[u];if(Fa[I]===i)return I.toLowerCase()}return i},hc.format.named=function(i){if(i=i.toLowerCase(),Fa[i])return fv(Fa[i]);throw new Error("unknown color name: "+i)},hc.autodetect.push({p:5,test:function(i){for(var u=[],m=arguments.length-1;m-- >0;)u[m]=arguments[m+1];if(!u.length&&dv(i)==="string"&&Fa[i.toLowerCase()])return"named"}});var hv=A.unpack,vv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=hv(i,"rgb"),I=m[0],N=m[1],B=m[2];return(I<<16)+(N<<8)+B},mv=vv,gv=A.type,yv=function(i){if(gv(i)=="number"&&i>=0&&i<=16777215){var u=i>>16,m=i>>8&255,I=i&255;return[u,m,I,1]}throw new Error("unknown num color: "+i)},_v=yv,bv=W,vc=b,mc=y,Av=A.type,Cv=mv;vc.prototype.num=function(){return Cv(this._rgb)},bv.num=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(vc,[null].concat(i,["num"])))},mc.format.num=_v,mc.autodetect.push({p:5,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i.length===1&&Av(i[0])==="number"&&i[0]>=0&&i[0]<=16777215)return"num"}});var wv=W,ti=b,gc=y,yc=A.unpack,_c=A.type,bc=Math.round;ti.prototype.rgb=function(i){return i===void 0&&(i=!0),i===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(bc)},ti.prototype.rgba=function(i){return i===void 0&&(i=!0),this._rgb.slice(0,4).map(function(u,m){return m<3?i===!1?u:bc(u):u})},wv.rgb=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(ti,[null].concat(i,["rgb"])))},gc.format.rgb=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=yc(i,"rgba");return m[3]===void 0&&(m[3]=1),m},gc.autodetect.push({p:3,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=yc(i,"rgba"),_c(i)==="array"&&(i.length===3||i.length===4&&_c(i[3])=="number"&&i[3]>=0&&i[3]<=1))return"rgb"}});var Mr=Math.log,Iv=function(i){var u=i/100,m,I,N;return u<66?(m=255,I=u<6?0:-155.25485562709179-.44596950469579133*(I=u-2)+104.49216199393888*Mr(I),N=u<20?0:-254.76935184120902+.8274096064007395*(N=u-10)+115.67994401066147*Mr(N)):(m=351.97690566805693+.114206453784165*(m=u-55)-40.25366309332127*Mr(m),I=325.4494125711974+.07943456536662342*(I=u-50)-28.0852963507957*Mr(I),N=255),[m,I,N,1]},Ac=Iv,xv=Ac,Tv=A.unpack,Sv=Math.round,kv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];for(var m=Tv(i,"rgb"),I=m[0],N=m[2],B=1e3,M=4e4,H=.4,K;M-B>H;){K=(M+B)*.5;var ae=xv(K);ae[2]/ae[0]>=N/I?M=K:B=K}return Sv(K)},Ev=kv,ni=W,Nr=b,oi=y,$v=Ev;Nr.prototype.temp=Nr.prototype.kelvin=Nr.prototype.temperature=function(){return $v(this._rgb)},ni.temp=ni.kelvin=ni.temperature=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(Nr,[null].concat(i,["temp"])))},oi.format.temp=oi.format.kelvin=oi.format.temperature=Ac;var Mv=A.unpack,ai=Math.cbrt,Nv=Math.pow,Ov=Math.sign,Pv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=Mv(i,"rgb"),I=m[0],N=m[1],B=m[2],M=[ri(I/255),ri(N/255),ri(B/255)],H=M[0],K=M[1],ae=M[2],fe=ai(.4122214708*H+.5363325363*K+.0514459929*ae),ke=ai(.2119034982*H+.6806995451*K+.1073969566*ae),he=ai(.0883024619*H+.2817188376*K+.6299787005*ae);return[.2104542553*fe+.793617785*ke-.0040720468*he,1.9779984951*fe-2.428592205*ke+.4505937099*he,.0259040371*fe+.7827717662*ke-.808675766*he]},Cc=Pv;function ri(i){var u=Math.abs(i);return u<.04045?i/12.92:(Ov(i)||1)*Nv((u+.055)/1.055,2.4)}var Lv=A.unpack,Or=Math.pow,Rv=Math.sign,Dv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=Lv(i,"lab");var m=i[0],I=i[1],N=i[2],B=Or(m+.3963377774*I+.2158037573*N,3),M=Or(m-.1055613458*I-.0638541728*N,3),H=Or(m-.0894841775*I-1.291485548*N,3);return[255*si(4.0767416621*B-3.3077115913*M+.2309699292*H),255*si(-1.2684380046*B+2.6097574011*M-.3413193965*H),255*si(-.0041960863*B-.7034186147*M+1.707614701*H),i.length>3?i[3]:1]},wc=Dv;function si(i){var u=Math.abs(i);return u>.0031308?(Rv(i)||1)*(1.055*Or(u,1/2.4)-.055):i*12.92}var Fv=A.unpack,Bv=A.type,Vv=W,Ic=b,xc=y,Uv=Cc;Ic.prototype.oklab=function(){return Uv(this._rgb)},Vv.oklab=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(Ic,[null].concat(i,["oklab"])))},xc.format.oklab=wc,xc.autodetect.push({p:3,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=Fv(i,"oklab"),Bv(i)==="array"&&i.length===3)return"oklab"}});var Hv=A.unpack,jv=Cc,zv=lc,Wv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];var m=Hv(i,"rgb"),I=m[0],N=m[1],B=m[2],M=jv(I,N,B),H=M[0],K=M[1],ae=M[2];return zv(H,K,ae)},Kv=Wv,Gv=A.unpack,Yv=cc,Jv=wc,Qv=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];i=Gv(i,"lch");var m=i[0],I=i[1],N=i[2],B=Yv(m,I,N),M=B[0],H=B[1],K=B[2],ae=Jv(M,H,K),fe=ae[0],ke=ae[1],he=ae[2];return[fe,ke,he,i.length>3?i[3]:1]},qv=Qv,Xv=A.unpack,Zv=A.type,em=W,Tc=b,Sc=y,tm=Kv;Tc.prototype.oklch=function(){return tm(this._rgb)},em.oklch=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];return new(Function.prototype.bind.apply(Tc,[null].concat(i,["oklch"])))},Sc.format.oklch=qv,Sc.autodetect.push({p:3,test:function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];if(i=Xv(i,"oklch"),Zv(i)==="array"&&i.length===3)return"oklch"}});var kc=b,nm=A.type;kc.prototype.alpha=function(i,u){return u===void 0&&(u=!1),i!==void 0&&nm(i)==="number"?u?(this._rgb[3]=i,this):new kc([this._rgb[0],this._rgb[1],this._rgb[2],i],"rgb"):this._rgb[3]};var om=b;om.prototype.clipped=function(){return this._rgb._clipped||!1};var ko=b,am=Er;ko.prototype.darken=function(i){i===void 0&&(i=1);var u=this,m=u.lab();return m[0]-=am.Kn*i,new ko(m,"lab").alpha(u.alpha(),!0)},ko.prototype.brighten=function(i){return i===void 0&&(i=1),this.darken(-i)},ko.prototype.darker=ko.prototype.darken,ko.prototype.brighter=ko.prototype.brighten;var rm=b;rm.prototype.get=function(i){var u=i.split("."),m=u[0],I=u[1],N=this[m]();if(I){var B=m.indexOf(I)-(m.substr(0,2)==="ok"?2:0);if(B>-1)return N[B];throw new Error("unknown channel "+I+" in mode "+m)}else return N};var ra=b,sm=A.type,im=Math.pow,lm=1e-7,cm=20;ra.prototype.luminance=function(i){if(i!==void 0&&sm(i)==="number"){if(i===0)return new ra([0,0,0,this._rgb[3]],"rgb");if(i===1)return new ra([255,255,255,this._rgb[3]],"rgb");var u=this.luminance(),m="rgb",I=cm,N=function(M,H){var K=M.interpolate(H,.5,m),ae=K.luminance();return Math.abs(i-ae)<lm||!I--?K:ae>i?N(M,K):N(K,H)},B=(u>i?N(new ra([0,0,0]),this):N(this,new ra([255,255,255]))).rgb();return new ra(B.concat([this._rgb[3]]))}return um.apply(void 0,this._rgb.slice(0,3))};var um=function(i,u,m){return i=ii(i),u=ii(u),m=ii(m),.2126*i+.7152*u+.0722*m},ii=function(i){return i/=255,i<=.03928?i/12.92:im((i+.055)/1.055,2.4)},vn={},Ec=b,$c=A.type,Pr=vn,Mc=function(i,u,m){m===void 0&&(m=.5);for(var I=[],N=arguments.length-3;N-- >0;)I[N]=arguments[N+3];var B=I[0]||"lrgb";if(!Pr[B]&&!I.length&&(B=Object.keys(Pr)[0]),!Pr[B])throw new Error("interpolation mode "+B+" is not defined");return $c(i)!=="object"&&(i=new Ec(i)),$c(u)!=="object"&&(u=new Ec(u)),Pr[B](i,u,m).alpha(i.alpha()+m*(u.alpha()-i.alpha()))},Nc=b,dm=Mc;Nc.prototype.mix=Nc.prototype.interpolate=function(i,u){u===void 0&&(u=.5);for(var m=[],I=arguments.length-2;I-- >0;)m[I]=arguments[I+2];return dm.apply(void 0,[this,i,u].concat(m))};var Oc=b;Oc.prototype.premultiply=function(i){i===void 0&&(i=!1);var u=this._rgb,m=u[3];return i?(this._rgb=[u[0]*m,u[1]*m,u[2]*m,m],this):new Oc([u[0]*m,u[1]*m,u[2]*m,m],"rgb")};var li=b,fm=Er;li.prototype.saturate=function(i){i===void 0&&(i=1);var u=this,m=u.lch();return m[1]+=fm.Kn*i,m[1]<0&&(m[1]=0),new li(m,"lch").alpha(u.alpha(),!0)},li.prototype.desaturate=function(i){return i===void 0&&(i=1),this.saturate(-i)};var Pc=b,Lc=A.type;Pc.prototype.set=function(i,u,m){m===void 0&&(m=!1);var I=i.split("."),N=I[0],B=I[1],M=this[N]();if(B){var H=N.indexOf(B)-(N.substr(0,2)==="ok"?2:0);if(H>-1){if(Lc(u)=="string")switch(u.charAt(0)){case"+":M[H]+=+u;break;case"-":M[H]+=+u;break;case"*":M[H]*=+u.substr(1);break;case"/":M[H]/=+u.substr(1);break;default:M[H]=+u}else if(Lc(u)==="number")M[H]=u;else throw new Error("unsupported value for Color.set");var K=new Pc(M,N);return m?(this._rgb=K._rgb,this):K}throw new Error("unknown channel "+B+" in mode "+N)}else return M};var pm=b,hm=function(i,u,m){var I=i._rgb,N=u._rgb;return new pm(I[0]+m*(N[0]-I[0]),I[1]+m*(N[1]-I[1]),I[2]+m*(N[2]-I[2]),"rgb")};vn.rgb=hm;var vm=b,ci=Math.sqrt,sa=Math.pow,mm=function(i,u,m){var I=i._rgb,N=I[0],B=I[1],M=I[2],H=u._rgb,K=H[0],ae=H[1],fe=H[2];return new vm(ci(sa(N,2)*(1-m)+sa(K,2)*m),ci(sa(B,2)*(1-m)+sa(ae,2)*m),ci(sa(M,2)*(1-m)+sa(fe,2)*m),"rgb")};vn.lrgb=mm;var gm=b,ym=function(i,u,m){var I=i.lab(),N=u.lab();return new gm(I[0]+m*(N[0]-I[0]),I[1]+m*(N[1]-I[1]),I[2]+m*(N[2]-I[2]),"lab")};vn.lab=ym;var Rc=b,ia=function(i,u,m,I){var N,B,M,H;I==="hsl"?(M=i.hsl(),H=u.hsl()):I==="hsv"?(M=i.hsv(),H=u.hsv()):I==="hcg"?(M=i.hcg(),H=u.hcg()):I==="hsi"?(M=i.hsi(),H=u.hsi()):I==="lch"||I==="hcl"?(I="hcl",M=i.hcl(),H=u.hcl()):I==="oklch"&&(M=i.oklch().reverse(),H=u.oklch().reverse());var K,ae,fe,ke,he,Le;(I.substr(0,1)==="h"||I==="oklch")&&(N=M,K=N[0],fe=N[1],he=N[2],B=H,ae=B[0],ke=B[1],Le=B[2]);var Pe,qe,et,it;return!isNaN(K)&&!isNaN(ae)?(ae>K&&ae-K>180?it=ae-(K+360):ae<K&&K-ae>180?it=ae+360-K:it=ae-K,qe=K+m*it):isNaN(K)?isNaN(ae)?qe=Number.NaN:(qe=ae,(he==1||he==0)&&I!="hsv"&&(Pe=ke)):(qe=K,(Le==1||Le==0)&&I!="hsv"&&(Pe=fe)),Pe===void 0&&(Pe=fe+m*(ke-fe)),et=he+m*(Le-he),I==="oklch"?new Rc([et,Pe,qe],I):new Rc([qe,Pe,et],I)},_m=ia,Dc=function(i,u,m){return _m(i,u,m,"lch")};vn.lch=Dc,vn.hcl=Dc;var bm=b,Am=function(i,u,m){var I=i.num(),N=u.num();return new bm(I+m*(N-I),"num")};vn.num=Am;var Cm=ia,wm=function(i,u,m){return Cm(i,u,m,"hcg")};vn.hcg=wm;var Im=ia,xm=function(i,u,m){return Im(i,u,m,"hsi")};vn.hsi=xm;var Tm=ia,Sm=function(i,u,m){return Tm(i,u,m,"hsl")};vn.hsl=Sm;var km=ia,Em=function(i,u,m){return km(i,u,m,"hsv")};vn.hsv=Em;var $m=b,Mm=function(i,u,m){var I=i.oklab(),N=u.oklab();return new $m(I[0]+m*(N[0]-I[0]),I[1]+m*(N[1]-I[1]),I[2]+m*(N[2]-I[2]),"oklab")};vn.oklab=Mm;var Nm=ia,Om=function(i,u,m){return Nm(i,u,m,"oklch")};vn.oklch=Om;var ui=b,Pm=A.clip_rgb,di=Math.pow,fi=Math.sqrt,pi=Math.PI,Fc=Math.cos,Bc=Math.sin,Lm=Math.atan2,Rm=function(i,u,m){u===void 0&&(u="lrgb"),m===void 0&&(m=null);var I=i.length;m||(m=Array.from(new Array(I)).map(function(){return 1}));var N=I/m.reduce(function(qe,et){return qe+et});if(m.forEach(function(qe,et){m[et]*=N}),i=i.map(function(qe){return new ui(qe)}),u==="lrgb")return Dm(i,m);for(var B=i.shift(),M=B.get(u),H=[],K=0,ae=0,fe=0;fe<M.length;fe++)if(M[fe]=(M[fe]||0)*m[0],H.push(isNaN(M[fe])?0:m[0]),u.charAt(fe)==="h"&&!isNaN(M[fe])){var ke=M[fe]/180*pi;K+=Fc(ke)*m[0],ae+=Bc(ke)*m[0]}var he=B.alpha()*m[0];i.forEach(function(qe,et){var it=qe.get(u);he+=qe.alpha()*m[et+1];for(var dt=0;dt<M.length;dt++)if(!isNaN(it[dt]))if(H[dt]+=m[et+1],u.charAt(dt)==="h"){var Kt=it[dt]/180*pi;K+=Fc(Kt)*m[et+1],ae+=Bc(Kt)*m[et+1]}else M[dt]+=it[dt]*m[et+1]});for(var Le=0;Le<M.length;Le++)if(u.charAt(Le)==="h"){for(var Pe=Lm(ae/H[Le],K/H[Le])/pi*180;Pe<0;)Pe+=360;for(;Pe>=360;)Pe-=360;M[Le]=Pe}else M[Le]=M[Le]/H[Le];return he/=I,new ui(M,u).alpha(he>.99999?1:he,!0)},Dm=function(i,u){for(var m=i.length,I=[0,0,0,0],N=0;N<i.length;N++){var B=i[N],M=u[N]/m,H=B._rgb;I[0]+=di(H[0],2)*M,I[1]+=di(H[1],2)*M,I[2]+=di(H[2],2)*M,I[3]+=H[3]*M}return I[0]=fi(I[0]),I[1]=fi(I[1]),I[2]=fi(I[2]),I[3]>.9999999&&(I[3]=1),new ui(Pm(I))},Tn=W,la=A.type,Fm=Math.pow,hi=function(i){var u="rgb",m=Tn("#ccc"),I=0,N=[0,1],B=[],M=[0,0],H=!1,K=[],ae=!1,fe=0,ke=1,he=!1,Le={},Pe=!0,qe=1,et=function(ve){if(ve=ve||["#fff","#000"],ve&&la(ve)==="string"&&Tn.brewer&&Tn.brewer[ve.toLowerCase()]&&(ve=Tn.brewer[ve.toLowerCase()]),la(ve)==="array"){ve.length===1&&(ve=[ve[0],ve[0]]),ve=ve.slice(0);for(var Ke=0;Ke<ve.length;Ke++)ve[Ke]=Tn(ve[Ke]);B.length=0;for(var Ze=0;Ze<ve.length;Ze++)B.push(Ze/(ve.length-1))}return ln(),K=ve},it=function(ve){if(H!=null){for(var Ke=H.length-1,Ze=0;Ze<Ke&&ve>=H[Ze];)Ze++;return Ze-1}return 0},dt=function(ve){return ve},Kt=function(ve){return ve},Ht=function(ve,Ke){var Ze,Xe;if(Ke==null&&(Ke=!1),isNaN(ve)||ve===null)return m;if(Ke)Xe=ve;else if(H&&H.length>2){var Gt=it(ve);Xe=Gt/(H.length-2)}else ke!==fe?Xe=(ve-fe)/(ke-fe):Xe=1;Xe=Kt(Xe),Ke||(Xe=dt(Xe)),qe!==1&&(Xe=Fm(Xe,qe)),Xe=M[0]+Xe*(1-M[0]-M[1]),Xe=Math.min(1,Math.max(0,Xe));var Ct=Math.floor(Xe*1e4);if(Pe&&Le[Ct])Ze=Le[Ct];else{if(la(K)==="array")for(var lt=0;lt<B.length;lt++){var ht=B[lt];if(Xe<=ht){Ze=K[lt];break}if(Xe>=ht&&lt===B.length-1){Ze=K[lt];break}if(Xe>ht&&Xe<B[lt+1]){Xe=(Xe-ht)/(B[lt+1]-ht),Ze=Tn.interpolate(K[lt],K[lt+1],Xe,u);break}}else la(K)==="function"&&(Ze=K(Xe));Pe&&(Le[Ct]=Ze)}return Ze},ln=function(){return Le={}};et(i);var ot=function(ve){var Ke=Tn(Ht(ve));return ae&&Ke[ae]?Ke[ae]():Ke};return ot.classes=function(ve){if(ve!=null){if(la(ve)==="array")H=ve,N=[ve[0],ve[ve.length-1]];else{var Ke=Tn.analyze(N);ve===0?H=[Ke.min,Ke.max]:H=Tn.limits(Ke,"e",ve)}return ot}return H},ot.domain=function(ve){if(!arguments.length)return N;fe=ve[0],ke=ve[ve.length-1],B=[];var Ke=K.length;if(ve.length===Ke&&fe!==ke)for(var Ze=0,Xe=Array.from(ve);Ze<Xe.length;Ze+=1){var Gt=Xe[Ze];B.push((Gt-fe)/(ke-fe))}else{for(var Ct=0;Ct<Ke;Ct++)B.push(Ct/(Ke-1));if(ve.length>2){var lt=ve.map(function(vt,mt){return mt/(ve.length-1)}),ht=ve.map(function(vt){return(vt-fe)/(ke-fe)});ht.every(function(vt,mt){return lt[mt]===vt})||(Kt=function(vt){if(vt<=0||vt>=1)return vt;for(var mt=0;vt>=ht[mt+1];)mt++;var kn=(vt-ht[mt])/(ht[mt+1]-ht[mt]),ao=lt[mt]+kn*(lt[mt+1]-lt[mt]);return ao})}}return N=[fe,ke],ot},ot.mode=function(ve){return arguments.length?(u=ve,ln(),ot):u},ot.range=function(ve,Ke){return et(ve),ot},ot.out=function(ve){return ae=ve,ot},ot.spread=function(ve){return arguments.length?(I=ve,ot):I},ot.correctLightness=function(ve){return ve==null&&(ve=!0),he=ve,ln(),he?dt=function(Ke){for(var Ze=Ht(0,!0).lab()[0],Xe=Ht(1,!0).lab()[0],Gt=Ze>Xe,Ct=Ht(Ke,!0).lab()[0],lt=Ze+(Xe-Ze)*Ke,ht=Ct-lt,vt=0,mt=1,kn=20;Math.abs(ht)>.01&&kn-- >0;)(function(){return Gt&&(ht*=-1),ht<0?(vt=Ke,Ke+=(mt-Ke)*.5):(mt=Ke,Ke+=(vt-Ke)*.5),Ct=Ht(Ke,!0).lab()[0],ht=Ct-lt})();return Ke}:dt=function(Ke){return Ke},ot},ot.padding=function(ve){return ve!=null?(la(ve)==="number"&&(ve=[ve,ve]),M=ve,ot):M},ot.colors=function(ve,Ke){arguments.length<2&&(Ke="hex");var Ze=[];if(arguments.length===0)Ze=K.slice(0);else if(ve===1)Ze=[ot(.5)];else if(ve>1){var Xe=N[0],Gt=N[1]-Xe;Ze=Bm(0,ve,!1).map(function(mt){return ot(Xe+mt/(ve-1)*Gt)})}else{i=[];var Ct=[];if(H&&H.length>2)for(var lt=1,ht=H.length,vt=1<=ht;vt?lt<ht:lt>ht;vt?lt++:lt--)Ct.push((H[lt-1]+H[lt])*.5);else Ct=N;Ze=Ct.map(function(mt){return ot(mt)})}return Tn[Ke]&&(Ze=Ze.map(function(mt){return mt[Ke]()})),Ze},ot.cache=function(ve){return ve!=null?(Pe=ve,ot):Pe},ot.gamma=function(ve){return ve!=null?(qe=ve,ot):qe},ot.nodata=function(ve){return ve!=null?(m=Tn(ve),ot):m},ot};function Bm(i,u,m){for(var I=[],N=i<u,B=m?N?u+1:u-1:u,M=i;N?M<B:M>B;N?M++:M--)I.push(M);return I}var Ba=b,Vm=hi,Um=function(i){for(var u=[1,1],m=1;m<i;m++){for(var I=[1],N=1;N<=u.length;N++)I[N]=(u[N]||0)+u[N-1];u=I}return u},Hm=function(i){var u,m,I,N,B,M,H;if(i=i.map(function(he){return new Ba(he)}),i.length===2)u=i.map(function(he){return he.lab()}),B=u[0],M=u[1],N=function(he){var Le=[0,1,2].map(function(Pe){return B[Pe]+he*(M[Pe]-B[Pe])});return new Ba(Le,"lab")};else if(i.length===3)m=i.map(function(he){return he.lab()}),B=m[0],M=m[1],H=m[2],N=function(he){var Le=[0,1,2].map(function(Pe){return(1-he)*(1-he)*B[Pe]+2*(1-he)*he*M[Pe]+he*he*H[Pe]});return new Ba(Le,"lab")};else if(i.length===4){var K;I=i.map(function(he){return he.lab()}),B=I[0],M=I[1],H=I[2],K=I[3],N=function(he){var Le=[0,1,2].map(function(Pe){return(1-he)*(1-he)*(1-he)*B[Pe]+3*(1-he)*(1-he)*he*M[Pe]+3*(1-he)*he*he*H[Pe]+he*he*he*K[Pe]});return new Ba(Le,"lab")}}else if(i.length>=5){var ae,fe,ke;ae=i.map(function(he){return he.lab()}),ke=i.length-1,fe=Um(ke),N=function(he){var Le=1-he,Pe=[0,1,2].map(function(qe){return ae.reduce(function(et,it,dt){return et+fe[dt]*Math.pow(Le,ke-dt)*Math.pow(he,dt)*it[qe]},0)});return new Ba(Pe,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return N},jm=function(i){var u=Hm(i);return u.scale=function(){return Vm(u)},u},vi=W,Sn=function(i,u,m){if(!Sn[m])throw new Error("unknown blend mode "+m);return Sn[m](i,u)},no=function(i){return function(u,m){var I=vi(m).rgb(),N=vi(u).rgb();return vi.rgb(i(I,N))}},oo=function(i){return function(u,m){var I=[];return I[0]=i(u[0],m[0]),I[1]=i(u[1],m[1]),I[2]=i(u[2],m[2]),I}},zm=function(i){return i},Wm=function(i,u){return i*u/255},Km=function(i,u){return i>u?u:i},Gm=function(i,u){return i>u?i:u},Ym=function(i,u){return 255*(1-(1-i/255)*(1-u/255))},Jm=function(i,u){return u<128?2*i*u/255:255*(1-2*(1-i/255)*(1-u/255))},Qm=function(i,u){return 255*(1-(1-u/255)/(i/255))},qm=function(i,u){return i===255?255:(i=255*(u/255)/(1-i/255),i>255?255:i)};Sn.normal=no(oo(zm)),Sn.multiply=no(oo(Wm)),Sn.screen=no(oo(Ym)),Sn.overlay=no(oo(Jm)),Sn.darken=no(oo(Km)),Sn.lighten=no(oo(Gm)),Sn.dodge=no(oo(qm)),Sn.burn=no(oo(Qm));for(var Xm=Sn,mi=A.type,Zm=A.clip_rgb,eg=A.TWOPI,tg=Math.pow,ng=Math.sin,og=Math.cos,Vc=W,ag=function(i,u,m,I,N){i===void 0&&(i=300),u===void 0&&(u=-1.5),m===void 0&&(m=1),I===void 0&&(I=1),N===void 0&&(N=[0,1]);var B=0,M;mi(N)==="array"?M=N[1]-N[0]:(M=0,N=[N,N]);var H=function(K){var ae=eg*((i+120)/360+u*K),fe=tg(N[0]+M*K,I),ke=B!==0?m[0]+K*B:m,he=ke*fe*(1-fe)/2,Le=og(ae),Pe=ng(ae),qe=fe+he*(-.14861*Le+1.78277*Pe),et=fe+he*(-.29227*Le-.90649*Pe),it=fe+he*(1.97294*Le);return Vc(Zm([qe*255,et*255,it*255,1]))};return H.start=function(K){return K==null?i:(i=K,H)},H.rotations=function(K){return K==null?u:(u=K,H)},H.gamma=function(K){return K==null?I:(I=K,H)},H.hue=function(K){return K==null?m:(m=K,mi(m)==="array"?(B=m[1]-m[0],B===0&&(m=m[1])):B=0,H)},H.lightness=function(K){return K==null?N:(mi(K)==="array"?(N=K,M=K[1]-K[0]):(N=[K,K],M=0),H)},H.scale=function(){return Vc.scale(H)},H.hue(m),H},rg=b,sg="0123456789abcdef",ig=Math.floor,lg=Math.random,cg=function(){for(var i="#",u=0;u<6;u++)i+=sg.charAt(ig(lg()*16));return new rg(i,"hex")},gi=d,Uc=Math.log,ug=Math.pow,dg=Math.floor,fg=Math.abs,Hc=function(i,u){u===void 0&&(u=null);var m={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return gi(i)==="object"&&(i=Object.values(i)),i.forEach(function(I){u&&gi(I)==="object"&&(I=I[u]),I!=null&&!isNaN(I)&&(m.values.push(I),m.sum+=I,I<m.min&&(m.min=I),I>m.max&&(m.max=I),m.count+=1)}),m.domain=[m.min,m.max],m.limits=function(I,N){return jc(m,I,N)},m},jc=function(i,u,m){u===void 0&&(u="equal"),m===void 0&&(m=7),gi(i)=="array"&&(i=Hc(i));var I=i.min,N=i.max,B=i.values.sort(function(_i,bi){return _i-bi});if(m===1)return[I,N];var M=[];if(u.substr(0,1)==="c"&&(M.push(I),M.push(N)),u.substr(0,1)==="e"){M.push(I);for(var H=1;H<m;H++)M.push(I+H/m*(N-I));M.push(N)}else if(u.substr(0,1)==="l"){if(I<=0)throw new Error("Logarithmic scales are only possible for values > 0");var K=Math.LOG10E*Uc(I),ae=Math.LOG10E*Uc(N);M.push(I);for(var fe=1;fe<m;fe++)M.push(ug(10,K+fe/m*(ae-K)));M.push(N)}else if(u.substr(0,1)==="q"){M.push(I);for(var ke=1;ke<m;ke++){var he=(B.length-1)*ke/m,Le=dg(he);if(Le===he)M.push(B[Le]);else{var Pe=he-Le;M.push(B[Le]*(1-Pe)+B[Le+1]*Pe)}}M.push(N)}else if(u.substr(0,1)==="k"){var qe,et=B.length,it=new Array(et),dt=new Array(m),Kt=!0,Ht=0,ln=null;ln=[],ln.push(I);for(var ot=1;ot<m;ot++)ln.push(I+ot/m*(N-I));for(ln.push(N);Kt;){for(var ve=0;ve<m;ve++)dt[ve]=0;for(var Ke=0;Ke<et;Ke++)for(var Ze=B[Ke],Xe=Number.MAX_VALUE,Gt=void 0,Ct=0;Ct<m;Ct++){var lt=fg(ln[Ct]-Ze);lt<Xe&&(Xe=lt,Gt=Ct),dt[Gt]++,it[Ke]=Gt}for(var ht=new Array(m),vt=0;vt<m;vt++)ht[vt]=null;for(var mt=0;mt<et;mt++)qe=it[mt],ht[qe]===null?ht[qe]=B[mt]:ht[qe]+=B[mt];for(var kn=0;kn<m;kn++)ht[kn]*=1/dt[kn];Kt=!1;for(var ao=0;ao<m;ao++)if(ht[ao]!==ln[ao]){Kt=!0;break}ln=ht,Ht++,Ht>200&&(Kt=!1)}for(var ro={},ca=0;ca<m;ca++)ro[ca]=[];for(var ua=0;ua<et;ua++)qe=it[ua],ro[qe].push(B[ua]);for(var Kn=[],Eo=0;Eo<m;Eo++)Kn.push(ro[Eo][0]),Kn.push(ro[Eo][ro[Eo].length-1]);Kn=Kn.sort(function(_i,bi){return _i-bi}),M.push(Kn[0]);for(var Va=1;Va<Kn.length;Va+=2){var $o=Kn[Va];!isNaN($o)&&M.indexOf($o)===-1&&M.push($o)}}return M},zc={analyze:Hc,limits:jc},Wc=b,pg=function(i,u){i=new Wc(i),u=new Wc(u);var m=i.luminance(),I=u.luminance();return m>I?(m+.05)/(I+.05):(I+.05)/(m+.05)},Kc=b,Wn=Math.sqrt,Mt=Math.pow,hg=Math.min,vg=Math.max,Gc=Math.atan2,Yc=Math.abs,Lr=Math.cos,Jc=Math.sin,mg=Math.exp,Qc=Math.PI,gg=function(i,u,m,I,N){m===void 0&&(m=1),I===void 0&&(I=1),N===void 0&&(N=1);var B=function($o){return 360*$o/(2*Qc)},M=function($o){return 2*Qc*$o/360};i=new Kc(i),u=new Kc(u);var H=Array.from(i.lab()),K=H[0],ae=H[1],fe=H[2],ke=Array.from(u.lab()),he=ke[0],Le=ke[1],Pe=ke[2],qe=(K+he)/2,et=Wn(Mt(ae,2)+Mt(fe,2)),it=Wn(Mt(Le,2)+Mt(Pe,2)),dt=(et+it)/2,Kt=.5*(1-Wn(Mt(dt,7)/(Mt(dt,7)+Mt(25,7)))),Ht=ae*(1+Kt),ln=Le*(1+Kt),ot=Wn(Mt(Ht,2)+Mt(fe,2)),ve=Wn(Mt(ln,2)+Mt(Pe,2)),Ke=(ot+ve)/2,Ze=B(Gc(fe,Ht)),Xe=B(Gc(Pe,ln)),Gt=Ze>=0?Ze:Ze+360,Ct=Xe>=0?Xe:Xe+360,lt=Yc(Gt-Ct)>180?(Gt+Ct+360)/2:(Gt+Ct)/2,ht=1-.17*Lr(M(lt-30))+.24*Lr(M(2*lt))+.32*Lr(M(3*lt+6))-.2*Lr(M(4*lt-63)),vt=Ct-Gt;vt=Yc(vt)<=180?vt:Ct<=Gt?vt+360:vt-360,vt=2*Wn(ot*ve)*Jc(M(vt)/2);var mt=he-K,kn=ve-ot,ao=1+.015*Mt(qe-50,2)/Wn(20+Mt(qe-50,2)),ro=1+.045*Ke,ca=1+.015*Ke*ht,ua=30*mg(-Mt((lt-275)/25,2)),Kn=2*Wn(Mt(Ke,7)/(Mt(Ke,7)+Mt(25,7))),Eo=-Kn*Jc(2*M(ua)),Va=Wn(Mt(mt/(m*ao),2)+Mt(kn/(I*ro),2)+Mt(vt/(N*ca),2)+Eo*(kn/(I*ro))*(vt/(N*ca)));return vg(0,hg(100,Va))},qc=b,yg=function(i,u,m){m===void 0&&(m="lab"),i=new qc(i),u=new qc(u);var I=i.get(m),N=u.get(m),B=0;for(var M in I){var H=(I[M]||0)-(N[M]||0);B+=H*H}return Math.sqrt(B)},_g=b,bg=function(){for(var i=[],u=arguments.length;u--;)i[u]=arguments[u];try{return new(Function.prototype.bind.apply(_g,[null].concat(i))),!0}catch{return!1}},Xc=W,Zc=hi,Ag={cool:function(){return Zc([Xc.hsl(180,1,.9),Xc.hsl(250,.7,.4)])},hot:function(){return Zc(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Rr={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"]},yi=0,eu=Object.keys(Rr);yi<eu.length;yi+=1){var tu=eu[yi];Rr[tu.toLowerCase()]=Rr[tu]}var Cg=Rr,Ut=W;Ut.average=Rm,Ut.bezier=jm,Ut.blend=Xm,Ut.cubehelix=ag,Ut.mix=Ut.interpolate=Mc,Ut.random=cg,Ut.scale=hi,Ut.analyze=zc.analyze,Ut.contrast=pg,Ut.deltaE=gg,Ut.distance=yg,Ut.limits=zc.limits,Ut.valid=bg,Ut.scales=Ag,Ut.colors=pc,Ut.brewer=Cg;var wg=Ut;return wg})})(Ep);var j1=Ep.exports;const $p=H1(j1),z1=e=>(Rt("data-v-fea762cc"),e=e(),Dt(),e),W1=["onClick"],K1={key:1,class:"tag empty"},G1=z1(()=>U("span",null,"Empty Tags",-1)),Y1=[G1],J1=`
def handle_tag_click(state, payload):
	state["selected_tag_id"] = payload`,Q1="A component to display coloured tag pills.",q1={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:P.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:P.Color,default:"#5551FF",category:Oe.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:P.Number,default:"1",category:Oe.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:P.Text,options:{yes:"yes",no:"no"},default:"yes",category:Oe.Style},primaryTextColor:St,cssClasses:We},events:{"wf-tag-click":{desc:"Triggered when a tag is clicked.",stub:J1.trim()}},previewField:"text"}},X1=Ae({...q1,__name:"CoreTags",setup(e){Zo(f=>({"10fce816":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=X(null),o=G(Y.evaluatedFields),a=G(Y.componentId),r=G(Y.core),s=G(Y.isBeingEdited),l=Z(()=>{var v;return typeof((v=r.getComponentById(a).handlers)==null?void 0:v["wf-tag-click"])<"u"});function c(f){if(o.rotateHue.value=="no")return o.referenceColor.value;const v=$p(o.referenceColor.value),C=t[d(f)];return v.set("hsl.h",`${Math.sign(C.h)==-1?"-":"+"}${Math.abs(C.h)}`).set("hsl.s",`${Math.sign(C.s)==-1?"-":"+"}${Math.abs(C.s/100)}`).set("hsl.l",`${Math.sign(C.l)==-1?"-":"+"}${Math.abs(C.l/100)}`).css()}function d(f){let v=o.seed.value*52673&4294967295;for(let S=0;S<f.length;S++)v=(S+1)*f.charCodeAt(S)^v&4294967295;return Math.abs(v)%t.length}function h(f){const v=new CustomEvent("wf-tag-click",{detail:{payload:f}});n.value.dispatchEvent(v)}return(f,v)=>k(s)||Object.entries(k(o).tags.value??[]).length>0?(w(),O("div",{key:0,ref_key:"rootEl",ref:n,class:"CoreTags"},[Object.entries(k(o).tags.value??[]).length>0?(w(!0),O(Me,{key:0},ft(k(o).tags.value,(C,S)=>(w(),O("div",{key:S,class:"tag",style:at({background:c(S)}),onClick:()=>h(S)},[U("span",null,be(C),1)],12,W1))),128)):(w(),O("div",K1,Y1))],512)):Ce("",!0)}}),Z1=Ie(X1,[["__scopeId","data-v-fea762cc"]]),eC={key:0,class:"material-symbols-outlined"},tC={class:"info"},nC={key:1,class:"caption"},oC={class:"container","data-writer-container":""},aC=`
def handle_avatar_click():
	print("The avatar was clicked")`,rC="A component to display user avatars.",sC={writer:{name:"Avatar",description:rC,category:"Content",allowedChildrenTypes:["*"],fields:{name:{name:"Name",type:P.Text},imageSrc:{name:"Image source",desc:"A valid URL. Alternatively, you can provide a state reference to a packed file.",type:P.Text},caption:{name:"Caption",desc:"Add an optional caption under the name, such as the person's job title.",type:P.Text},size:{name:"Size",type:P.Text,options:{small:"Small",medium:"Medium",large:"Large"},default:"medium",category:Oe.Style},orientation:{name:"Orientation",type:P.Text,options:{horizontal:"Horizontal",vertical:"Vertical"},default:"horizontal",category:Oe.Style},primaryTextColor:St,secondaryTextColor:hn,separatorColor:Bt,cssClasses:We},events:{"wf-click":{desc:"Triggered when the avatar is clicked.",stub:aC.trim()}},previewField:"text"}},iC=Ae({...sC,__name:"CoreAvatar",setup(e){Zo(l=>({"3d808742":k(n).imageSrc.value?`url("${k(n).imageSrc.value}")`:"none","162f2d92":r.value?"pointer":"auto"}));const t=X(null),n=G(Y.evaluatedFields),o=G(Y.componentId),a=G(Y.core),r=Z(()=>{var c;return typeof((c=a.getComponentById(o).handlers)==null?void 0:c["wf-click"])<"u"});function s(l){const c=Fs(l);t.value.dispatchEvent(c)}return(l,c)=>(w(),O("div",{ref_key:"rootEl",ref:t,class:nt(["CoreAvatar",[k(n).size.value,k(n).orientation.value]])},[U("div",{class:"image",onClick:s},[k(n).imageSrc.value?Ce("",!0):(w(),O("i",eC," account_circle "))]),U("div",tC,[k(n).name.value?(w(),O("div",{key:0,class:"name",onClick:s},be(k(n).name.value),1)):Ce("",!0),k(n).caption.value?(w(),O("div",nC,be(k(n).caption.value),1)):Ce("",!0),U("div",oC,[It(l.$slots,"default",{},void 0,!0)])])],2))}}),lC=Ie(iC,[["__scopeId","data-v-8100970f"]]),cC={class:"SharedControlBar"},uC=Ae({__name:"SharedControlBar",props:{copyRawContent:{},copyStructuredContent:{}},setup(e){const t=e;function n({text:o=""}){try{navigator.clipboard.writeText(o)}catch(a){console.error(a)}}return(o,a)=>(w(),O("div",cC,[t.copyStructuredContent?(w(),O("button",{key:0,class:"control-button",onClick:a[0]||(a[0]=r=>n({text:t.copyStructuredContent}))}," Copy JSON ")):Ce("",!0),t.copyRawContent?(w(),O("button",{key:1,class:"control-button",onClick:a[1]||(a[1]=r=>n({text:t.copyRawContent}))}," Copy ")):Ce("",!0)]))}}),Mp=Ie(uC,[["__scopeId","data-v-fea66300"]]),dC={key:0,class:"CoreAnnotatedText"},fC={key:0,class:"annotation-subject"},pC={writer:{name:"Annotated text",description:"Shows text with annotations",category:"Content",fields:{text:{name:"Annotated text",type:P.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:P.Color,default:"#5551FF",category:Oe.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:P.Number,default:"1",category:Oe.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:P.Text,options:{yes:"yes",no:"no"},default:"yes",category:Oe.Style},copyButtons:{name:"Copy buttons",desc:"If active, adds a control bar with both copy text and JSON buttons.",type:P.Text,options:{yes:"yes",no:"no"},default:"no",category:Oe.Style},buttonColor:Un,buttonTextColor:Hn,primaryTextColor:St,cssClasses:We},previewField:"data"}},hC=Ae({...pC,__name:"CoreAnnotatedText",setup(e){const t=G(Y.evaluatedFields),n=Z(()=>t.text.value?t.text.value:[]),o=G(Y.isBeingEdited),a=G(Y.componentId),r=Z(()=>!t.text.value),s=Z(()=>!r.value||o.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(y,$){return y.set("hsl.h",`${Math.sign($.h)==-1?"-":"+"}${Math.abs($.h)}`).set("hsl.s",`${Math.sign($.s)==-1?"-":"+"}${Math.abs($.s/100)}`).set("hsl.l",`${Math.sign($.l)==-1?"-":"+"}${Math.abs($.l/100)}`).css()}function v(y,$=l.length){let x=t.seed.value*52673&4294967295;for(let p=0;p<y.length;p++)x=(p+1)*y.charCodeAt(p)^x&4294967295;return Math.abs(x)%$}function C(y){if(t.rotateHue.value=="no")return t.referenceColor.value;const $=$p(t.referenceColor.value);if(h!==t.seed.value&&(c=[...l],d={},h=t.seed.value),d[y])return f($,d[y]);c.length===0&&(c=[...l]);const x=v(y,c.length),g=c[x];return d[y]=g,c.splice(x,1),f($,g)}function S(y){return y.reduce(($,x)=>typeof x=="string"?$+x:$+x[0],"")}function A(y){try{return JSON.stringify(y)}catch{return y.join("")}}return(y,$)=>s.value?(w(),O("div",dC,[r.value?(w(),Re(Ul,{key:0,"component-id":k(a)},null,8,["component-id"])):Ce("",!0),(w(!0),O(Me,null,ft(n.value,(x,g)=>(w(),O("span",{key:String(x)+g},[typeof x=="string"?(w(),O(Me,{key:0},[yt(be(x),1)],64)):Ce("",!0),Array.isArray(x)?(w(),O("span",{key:1,class:"annotation",style:at({background:x[2]||C(x[1])})},[yt(be(x[0])+" ",1),x[1]?(w(),O("span",fC,be(x[1]),1)):Ce("",!0)],4)):Ce("",!0)]))),128)),k(t).copyButtons.value==="yes"?(w(),Re(Mp,{key:1,"copy-raw-content":S(n.value),"copy-structured-content":A(n.value)},null,8,["copy-raw-content","copy-structured-content"])):Ce("",!0)])):Ce("",!0)}}),vC=Ie(hC,[["__scopeId","data-v-85cc3700"]]);function Vs(e){return!!(["string","number","boolean"].includes(typeof e)||e===null)}function Hl(e){return Vs(e)?!1:Array.isArray(e)}function Np(e){return!Hl(e)&&typeof e=="object"&&e!==null}function Op(e){return Vs(e)?1:Object.keys(e).length}function Pp(e){return typeof e.open=="boolean"&&Array.isArray(e.path)}const mC=["open","disabled"],gC={class:"content"},yC=Ae({__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 o(a){n("toggle",a.newState==="open")}return(a,r)=>(w(),O("details",{class:"SharedCollapsible",open:e.open,disabled:e.disabled,onToggle:o},[U("summary",null,[It(a.$slots,"title",{},void 0,!0)]),U("div",gC,[It(a.$slots,"content",{},void 0,!0)])],40,mC))}}),_C=Ie(yC,[["__scopeId","data-v-851ee327"]]),bC=Ae({__name:"SharedJsonViewerChildrenCounter",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=r=>`Object{${r}}`,o=r=>`Array[${r}]`,a=Z(()=>{const r=Op(t.data);return r===0?n(0):Hl(t.data)?o(r):Np(t.data)?n(r):n(0)});return(r,s)=>(w(),O("span",null,be(a.value),1))}}),Lp=Ie(bC,[["__scopeId","data-v-2641ae29"]]),AC={class:"SharedJsonViewerCollapsible__title"},CC={key:0},wC={class:"SharedJsonViewerCollapsible__content"},IC=Ae({__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)=>(w(),Re(_C,{open:e.open,disabled:e.disabled,onToggle:n[0]||(n[0]=o=>t.$emit("toggle",o))},{title:ze(()=>[U("div",AC,[e.title?(w(),O("span",CC,be(e.title),1)):Ce("",!0),e.data?(w(),Re(Lp,{key:1,data:e.data},null,8,["data"])):Ce("",!0)])]),content:ze(()=>[U("div",wC,[It(t.$slots,"default",{},void 0,!0)])]),_:3},8,["open","disabled"]))}}),Rp=Ie(IC,[["__scopeId","data-v-7392db61"]]),xC={class:"SharedJsonViewerValue"},TC=Ae({__name:"SharedJsonViewerValue",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=Z(()=>JSON.stringify(t.data));return(o,a)=>(w(),O("span",xC,be(n.value),1))}}),Dp=Ie(TC,[["__scopeId","data-v-496a5553"]]),SC={class:"SharedJsonViewerObject"},kC={key:0,class:"SharedJsonViewerObject__value"},EC=Ae({__name:"SharedJsonViewerObject",props:{data:{type:[Object,Array],required:!0},path:{type:Array,default:()=>[]},initialDepth:{type:Number,default:0}},emits:{toggle:Pp},setup(e,{emit:t}){const n=e,o=Ca(n,"initialDepth"),a=t,r=X([]),s=Z(()=>n.path.length+1);Be(o,()=>{if(o.value===0){r.value=[];return}if(!(o.value===-1||o.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),a("toggle",{open:h,path:[...n.path,d]})}function c(d){return r.value.includes(String(d))}return(d,h)=>(w(),O("div",SC,[(w(!0),O(Me,null,ft(Object.entries(e.data),([f,v],C)=>(w(),O(Me,{key:C},[k(Vs)(v)||k(Op)(v)===0?(w(),O("div",kC,[U("span",null,be(f),1),yt(": "),Ve(Dp,{data:v},null,8,["data"])])):(w(),Re(Rp,{key:1,open:c(f),title:f,data:v,onToggle:S=>l(f,S)},{default:ze(()=>[c(f)?(w(),Re(Fp,{key:0,data:v,path:[...e.path,f],"initial-depth":o.value,onToggle:h[0]||(h[0]=S=>d.$emit("toggle",S))},null,8,["data","path","initial-depth"])):Ce("",!0)]),_:2},1032,["open","title","data","onToggle"]))],64))),128))]))}}),id=Ie(EC,[["__scopeId","data-v-5480a807"]]),Fp=Ae({__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:Pp},setup(e){const t=e,n=Z(()=>t.path.length===0&&!t.hideRoot),o=Z(()=>t.initialDepth===-1||t.initialDepth>0),a=Z(()=>t.data===void 0?JSON.stringify(null):JSON.stringify(t.data));return(r,s)=>(w(),O(Me,null,[k(Np)(e.data)||k(Hl)(e.data)?(w(),O(Me,{key:0},[n.value?(w(),Re(Rp,{key:0,open:o.value,data:e.data,onToggle:s[1]||(s[1]=l=>r.$emit("toggle",{path:[],open:l}))},{default:ze(()=>[Ve(id,{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"])):(w(),Re(id,{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)):k(Vs)(e.data)?(w(),Re(Dp,{key:1,data:e.data},null,8,["data"])):(w(),Re(Lp,{key:2,data:{}})),e.enableCopyToJson?(w(),Re(Mp,{key:3,"copy-structured-content":a.value},null,8,["copy-structured-content"])):Ce("",!0)],64))}}),$C={class:"CoreJsonViewer"},MC="A component to explore JSON data as a hierarchy.",NC={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},OC={name:"JSON Viewer",description:MC,category:"Content",fields:{data:{name:"Data",init:JSON.stringify(NC),type:P.Object},initialDepth:{name:"Initial depth",desc:"Sets the initial viewing depth of the JSON tree hierarchy. Use -1 to display the full hierarchy.",type:P.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:P.Text,options:{yes:"yes",no:"no"},default:"no",category:Oe.Style},copy:{name:"Copy",desc:"If active, adds a control bar with copy JSON button.",type:P.Text,options:{yes:"yes",no:"no"},default:"no",category:Oe.Style},jsonViewerIndentationSpacing:{name:"JSON indentation",type:P.Width,category:Oe.Style,applyStyleVariable:!0},accentColor:Wt,secondaryTextColor:hn,separatorColor:Bt,cssClasses:We},previewField:"data"},PC={writer:OC},LC=Ae({...PC,__name:"CoreJsonViewer",setup(e){const t=G(Y.evaluatedFields),n=Z(()=>t.data.value),o=Z(()=>Number(t.initialDepth.value)||0);return(a,r)=>(w(),O("div",$C,[Ve(Fp,{data:n.value??{},"initial-depth":o.value,"enable-copy-to-json":k(t).copy.value==="yes","hide-root":k(t).hideRoot.value==="yes"},null,8,["data","initial-depth","enable-copy-to-json","hide-root"])]))}});function Us(e){const t=/[\\]?@{([^}]*)}/g;function n(d,h){var A;let f=[],v="",C=0,S=0;for(;S<d.length;){const y=d.charAt(S);y=="\\"?S+1<d.length&&(v+=d.charAt(S+1),S++):y=="."?C==0?(f.push(v),v=""):v+=y:y=="["?(C==0?(f.push(v),v=""):v+=y,C++):y=="]"?(C--,C==0?v=(A=o(v,h))==null?void 0:A.toString():v+=y):v+=y,S++}return v&&f.push(v),f}function o(d,h){let v=h?a(h):void 0,C=e.userState.value;const S=n(d,h);for(let A=0;A<S.length;A++)v=v==null?void 0:v[S[A]],C=C==null?void 0:C[S[A]];return v??C}function a(d){var f,v;const h={};for(let C=0;C<d.length-1;C++){const S=d[C],{componentId:A}=S,{type:y}=e.getComponentById(A);if(y!=="repeater"||C+1>=d.length)continue;const $=d.slice(0,C+1),x=d.slice(0,C+2),{instanceNumber:g}=x.at(-1),p=l($,"repeaterObject");if(!p)continue;const _=Object.entries(p),b=l($,"keyVariable"),z=l($,"valueVariable");h[b]=(f=_[g])==null?void 0:f[0],h[z]=(v=_[g])==null?void 0:v[1]}return h}function r(d,h){return d==null?"":d.replace(t,(v,C)=>{if(v.charAt(0)=="\\")return v.substring(1);const S=C.trim();if(!S)return"";const A=o(S,h);return typeof A>"u"?"":typeof A=="object"?JSON.stringify(A):A.toString()})}function s(d){const{componentId:h}=d.at(-1),f=e.getComponentById(h);if(!f)return;const v={},{fields:C}=e.getComponentDefinition(f.type);if(C)return Object.keys(C).forEach(S=>{v[S]=Z(()=>l(d,S))}),v}function l(d,h){var g;const{componentId:f}=d.at(-1),v=e.getComponentById(f);if(!v)return;const{fields:C}=e.getComponentDefinition(v.type),S=(g=v.content)==null?void 0:g[h],A=C[h].default,y=r(S,d),$=C[h].type,x=typeof y>"u"||y===null||y==="";if($==P.Object||$==P.KeyValue||$==P.Tools){if(!y)return JSON.parse(A??null);if(typeof y!="string")return y;let p;try{p=JSON.parse(y)}catch{return JSON.parse(A??null)}return p}else if($==P.Number){const p=A===null?null:parseFloat(A);if(x)return p??null;const _=parseFloat(y);return typeof _>"u"||Number.isNaN(_)?p??null:_}else return $==P.IdKey?S:x?A??"":y}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 v=o(f.visible.binding,h);return f.visible.reversed===!0?!v:!!v}return{getEvaluatedFields:s,isComponentVisible:c,evaluateExpression:o}}function zt(e,t,n){const o=X(),a=X(!1),r=X(null),s=t.at(-1).componentId,l=Z(()=>e.getComponentById(s)),{evaluateExpression:c}=Us(e);function d(){var v;const f=e.getComponentById(s);if((v=f==null?void 0:f.binding)!=null&&v.stateRef)return c(f.binding.stateRef,t)}function h(f,v,C){var x,g;o.value=f;const S=(x=l.value.handlers)==null?void 0:x[v],A=((g=l.value.binding)==null?void 0:g.eventType)==v;if(!S&&!A)return;if(a.value){r.value={eventValue:f,emitEventType:v};return}a.value=!0;const y=()=>{a.value=!1,r.value&&(h(r.value.eventValue,r.value.emitEventType),r.value=null),C==null||C()},$=new CustomEvent(v,{detail:{payload:f,callback:y}});n.value instanceof HTMLElement?n.value.dispatchEvent($):n.value.$el.dispatchEvent($)}return Be(()=>d(),f=>{a.value||(o.value=f)},{immediate:!0}),Be(o,f=>{typeof f>"u"&&(o.value="")},{immediate:!0}),{formValue:o,handleInput:h}}const RC={key:0},DC=Ae({__name:"BaseInputWrapper",props:{label:{},isHorizontal:{type:Boolean}},setup(e){const t=e;return(n,o)=>(w(),O("div",{ref:"rootEl",class:nt(["BaseInputWrapper",{horizontal:n.isHorizontal}])},[t.label?(w(),O("label",RC,be(t.label),1)):Ce("",!0),It(n.$slots,"default",{},void 0,!0)],2))}}),en=Ie(DC,[["__scopeId","data-v-38602467"]]),FC=["checked","value"],BC=["for"],VC={a:"Option A",b:"Option B"},UC="A user input component that allows users to choose multiple values from a list of options using checkboxes.",HC=`
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`,jC={writer:{name:"Checkbox Input",description:UC,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:P.KeyValue,default:JSON.stringify(VC,null,2)},orientation:{name:"Orientation",type:P.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:Oe.Style,desc:"Specify how to lay out the options."},primaryTextColor:St,accentColor:Wt,cssClasses:We},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:HC.trim(),bindable:!0}}}},zC=Ae({...jC,__name:"CoreCheckboxInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=G(Y.core),a=G(Y.instancePath),r=G(Y.flattenedInstancePath),{formValue:s,handleInput:l}=zt(o,a,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)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:k(t).label.value,class:"CoreCheckboxInput"},{default:ze(()=>[U("div",{class:nt(["options",{horizontal:k(t).orientation.value=="horizontal"}])},[(w(!0),O(Me,null,ft(k(t).options.value,(f,v)=>(w(),O("div",{key:v,class:"option"},[U("input",{type:"checkbox",checked:Array.isArray(k(s))?k(s).includes(v):!1,value:v,onInput:h[0]||(h[0]=C=>k(l)(c(),"wf-options-change"))},null,40,FC),U("label",{for:`${k(r)}-option-${v}`},be(f),9,BC)]))),128))],2)]),_:1},8,["label"]))}}),WC=Ie(zC,[["__scopeId","data-v-19fdab9a"]]),KC=["value","list"],GC=["id"],YC=Ae({__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,o=t,a=X(),r=G(Y.flattenedInstancePath),s=Z(()=>{var d;return(d=n.customColors)!=null&&d.length?`${r}_datalist`:null});function l(d){o("update:value",d.target.value)}function c(d){o("change",d.target.value)}return(d,h)=>(w(),O(Me,null,[U("input",{ref_key:"pickerEl",ref:a,type:"color",class:"BaseInputColor",value:e.value,list:s.value,onInput:l,onChange:c},null,40,KC),s.value?(w(),O("datalist",{key:0,id:s.value},[(w(!0),O(Me,null,ft(e.customColors,f=>(w(),O("option",{key:f},be(f),1))),128))],8,GC)):Ce("",!0)],64))}}),JC=Ie(YC,[["__scopeId","data-v-93292f6d"]]),QC="A user input component that allows users to select a color using a color picker interface.",ld=`
def onchange_handler(state, payload):

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

	state["new_color"] = payload`,qC={name:"Color Input",description:QC,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},colorList:{name:"Color List",desc:"List of predefined colors",type:P.Object,init:JSON.stringify(["#5551ff","#3be19b","#ff3d00","#333333","#0094d1"])},cssClasses:We},events:{"wf-change":{desc:"Capture changes as they happen.",stub:ld,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:ld}}},XC={writer:qC},ZC=Ae({...XC,__name:"CoreColorInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=G(Y.core),a=G(Y.instancePath),r=Z(()=>Array.isArray(t.colorList.value)?t.colorList.value:void 0),{formValue:s,handleInput:l}=zt(o,a,n);return(c,d)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:k(t).label.value,class:"CoreColorInput"},{default:ze(()=>[Ve(JC,{value:k(s),"custom-colors":r.value,"onUpdate:value":d[0]||(d[0]=h=>k(l)(h,"wf-change")),onChange:d[1]||(d[1]=h=>k(l)(h,"wf-change-finish"))},null,8,["value","custom-colors"])]),_:1},8,["label"]))}}),ew=Ie(ZC,[["__scopeId","data-v-a0b1e2aa"]]),tw=["value"],nw="A user input component that allows users to select a date using a date picker interface.",ow=`
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`,aw={writer:{name:"Date Input",description:nw,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},cssClasses:We},events:{"wf-date-change":{desc:"Capture changes to this control.",stub:ow,bindable:!0}}}},rw=Ae({...aw,__name:"CoreDateInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=G(Y.core),a=G(Y.instancePath),{formValue:r,handleInput:s}=zt(o,a,n);return(l,c)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:k(t).label.value,class:"CoreDateInput"},{default:ze(()=>[U("input",{type:"date",value:k(r),onChange:c[0]||(c[0]=d=>k(s)(d.target.value,"wf-date-change"))},null,40,tw)]),_:1},8,["label"]))}}),sw=Ie(rw,[["__scopeId","data-v-55739abe"]]),iw=Ae({__name:"WdsDropdownInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=Co(e,"modelValue");return(n,o)=>Ot((w(),O("select",{"onUpdate:modelValue":o[0]||(o[0]=a=>t.value=a),class:"WdsDropdownInput colorTransformer"},[It(n.$slots,"default",{},void 0,!0)],512)),[[Dl,t.value]])}}),Bp=Ie(iw,[["__scopeId","data-v-a262dc28"]]),lw=["value"],cw="A user input component that allows users to select a single value from a list of options using a dropdown menu.",uw={a:"Option A",b:"Option B"},dw=`
def onchange_handler(state, payload):

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

	state["selected"] = payload`,fw={writer:{name:"Dropdown Input",description:cw,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:P.KeyValue,default:JSON.stringify(uw,null,2)},cssClasses:We},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:dw.trim(),bindable:!0}}}},pw=Ae({...fw,__name:"CoreDropdownInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=G(Y.core),a=G(Y.instancePath),{formValue:r,handleInput:s}=zt(o,a,n);return(l,c)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:k(t).label.value,class:"CoreDropdownInput"},{default:ze(()=>[Ve(Bp,{modelValue:k(r),"onUpdate:modelValue":c[0]||(c[0]=d=>jt(r)?r.value=d:null),onInput:c[1]||(c[1]=d=>k(s)(d.target.value,"wf-option-change"))},{default:ze(()=>[(w(!0),O(Me,null,ft(k(t).options.value,(d,h)=>(w(),O("option",{key:h,value:h},be(d),9,lw))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]))}}),hw=Ie(pw,[["__scopeId","data-v-1dba446c"]]),vw=Ae({__name:"WdsButton",props:{variant:{type:String,default:"primary"},size:{type:String,default:"big"}},setup(e){const t=e,n=Z(()=>["WdsButton",`WdsButton--${t.variant}`,`WdsButton--${t.size}`]);return(o,a)=>(w(),O("button",{class:nt(["WdsButton colorTransformer",n.value])},[It(o.$slots,"default",{},void 0,!0)],2))}}),Qn=Ie(vw,[["__scopeId","data-v-22f00d32"]]),mw={class:"main"},gw={key:0,class:"file-input"},yw=["multiple","accept"],_w={key:0,class:"file-input__files"},bw=["onClick"],Aw={key:1},Cw={key:1,class:"status"},ww={key:1},Iw={key:2},cd=200*1024*1024,xw="A user input component that allows users to upload files.",Tw=`
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(),Sw={writer:{name:"File Input",description:xw,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},allowFileTypes:{name:"Allowed file types",type:P.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:P.Text,options:{yes:"Yes",no:"No"}},cssClasses:We},events:{"wf-file-change":{desc:"Capture changes to this control.",stub:Tw,bindable:!0}}}},kw=Ae({...Sw,__name:"CoreFileInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=X(null),a=X(null),r=G(Y.core),s=G(Y.instancePath),l=X(null),{formValue:c,handleInput:d}=zt(r,s,n),h=Z(()=>Array.isArray(c.value)?c.value:[]),f=Z(()=>{var g;return((g=t.allowFileTypes)==null?void 0:g.value)??""}),v=Z(()=>t.allowMultipleFiles.value=="yes"?!0:void 0),C=async g=>{const p=new FileReader;return p.readAsDataURL(g),new Promise((_,b)=>{p.onload=()=>_(p.result),p.onerror=()=>b(p.error)})},S=async g=>{const p=g.target;if(!p.files||p.files.length==0)return;const _=async()=>{let z=0;a.value=null;const W=Promise.all(Array.from(p.files).map(async re=>(z+=re.size,{name:re.name,type:re.type,data:await C(re)})));return z>cd?(a.value=`Files are too big. Total size limit is ${Math.floor(cd/Math.pow(1024,2))}mb.`,[]):W};l.value=Array.from(p.files).map(z=>z.name),c.value=_();const b=()=>{l.value=null};d(_(),"wf-file-change",b)};Be(c,g=>{typeof g>"u"&&o.value&&(o.value.value="")});function A(g){const p=document.createElement("a");p.href=String(g.data),p.download=g.name,p.click(),p.remove()}const y=Z(()=>v.value?"files":"file"),$=Z(()=>`Browse ${y.value}`),x=Z(()=>`No ${y.value} selected`);return(g,p)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:l.value?"":k(t).label.value,class:"CoreFileInput"},{default:ze(()=>[U("div",mw,[l.value?Ce("",!0):(w(),O("div",gw,[Ot(U("input",{ref_key:"fileEl",ref:o,type:"file",multiple:v.value,accept:f.value,onChange:p[0]||(p[0]=_=>S(_))},null,40,yw),[[rn,!1]]),U("div",null,[Ve(Qn,{variant:"tertiary",size:"small",onClick:p[1]||(p[1]=_=>o.value.click())},{default:ze(()=>[yt(be($.value),1)]),_:1})]),h.value?(w(),O("ul",_w,[(w(!0),O(Me,null,ft(h.value,(_,b)=>(w(),O("li",{key:b},[U("a",{href:"#",onClick:z=>A(_)},be(_.name),9,bw)]))),128))])):(w(),O("p",Aw,be(x.value),1))])),a.value||l.value?(w(),O("div",Cw,[l.value?(w(),Re(Cp,{key:0,class:"loadingSymbol"})):Ce("",!0),l.value?(w(),O("span",ww,"Processing "+be(l.value.join(", "))+"...",1)):Ce("",!0),a.value?(w(),O("span",Iw,be(a.value),1)):Ce("",!0)])):Ce("",!0)])]),_:1},8,["label"]))}}),Ew=Ie(kw,[["__scopeId","data-v-b0144f64"]]),$w=e=>(Rt("data-v-087b2aea"),e=e(),Dt(),e),Mw=["id","data-mode","data-list-position","aria-activedescendant"],Nw={class:"placeholder"},Ow={key:0,class:"desc",role:"option"},Pw={key:1,class:"desc",role:"option"},Lw=["onClick"],Rw=$w(()=>U("i",{class:"material-symbols-outlined"}," close ",-1)),Dw=[Rw],Fw=["id","data-list-offset","onMousemove","onClick"],Bw={key:0,class:"empty"},ud=200,Vw=Ae({__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}){Zo(pe=>({"489e9b3c":`${ud}px`}));const n=t,o=e,{baseId:a,options:r,maximumCount:s,mode:l,placeholder:c}=wl(o),d=Z(()=>typeof o.activeValue=="string"?[o.activeValue]:o.activeValue),h=X(null),f=X(null),v=X(null),C=X(null),S=X(""),A=X(null),y=X([]),$=X("hidden"),x=Z(()=>{if(l.value=="multiple"&&g.value)return{};const pe={};return Object.entries(r.value).forEach(([ue,Ne])=>{l.value=="multiple"&&y.value.includes(ue)||String(Ne).toLocaleLowerCase().includes(S.value.toLocaleLowerCase())&&(pe[ue]=Ne)}),pe}),g=Z(()=>!(s.value<=0||y.value.length<s.value));Be(d,()=>{y.value=d.value.filter(pe=>r.value[pe]!==void 0)},{immediate:!0}),Be(x,()=>{p()});function p(){if(A.value<=0){A.value=0;return}const pe=Object.keys(x.value).length-1;A.value>=pe&&(A.value=pe)}Be(A,()=>{var ue;if(A.value===null)return;const pe=(ue=h.value)==null?void 0:ue.querySelector(`[data-list-offset="${A.value}"]`);pe&&pe.scrollIntoView({block:"nearest",inline:"nearest"})});function _(){const pe=Object.keys(r.value),ue=y.value.filter(Ne=>pe.includes(Ne));n("change",ue)}function b(pe){const ue=y.value.indexOf(pe);ue!==-1&&(y.value.splice(ue,1),A.value=null),_()}function z(){y.value.pop(),_()}async function W(pe=!1){$.value="hidden",S.value="",pe&&(await fn(),h.value&&(h.value.tabIndex=0,h.value.focus()))}function re(pe){const ue=pe.key;if(ue=="Escape"){pe.preventDefault(),W(!0);return}if(ue!=="Tab"&&ue!=="Shift"&&$.value=="hidden"){Ee();return}if(ue=="Enter"){if(A.value===null)return;const Ne=Object.keys(x.value);if(!Ne||Ne.length==0)return;ce(Ne[A.value]);return}if(ue=="ArrowUp"){if(pe.preventDefault(),A.value===null){const Ne=Object.keys(x.value).length-1;A.value=Ne;return}A.value--,p();return}if(ue=="ArrowDown"){if(pe.preventDefault(),A.value===null){A.value=0;return}A.value++,p();return}}function le(pe){l.value=="multiple"&&pe.key=="Backspace"&&!S.value&&z()}async function ce(pe){if(l.value=="single")y.value=[];else if(y.value.includes(pe))return;y.value.push(pe),_(),S.value="",y.value.length==s.value&&W(!0),await fn(),v.value.scrollTop=v.value.scrollHeight}function ie(pe){const ue=pe.relatedTarget;h.value&&(h.value.contains(ue)||W(!1))}function de(pe){const ue=pe.relatedTarget;h.value&&(h.value.contains(ue)||W(!0))}function ye(pe){pe.target.dataset.preventList||Ee()}async function Ee(){var Ne;if($.value!=="hidden")return;const{bottom:pe}=h.value.getBoundingClientRect(),ue=document.body.clientHeight;ud+pe>=ue?$.value="top":$.value="bottom",await fn(),h.value.tabIndex=-1,(Ne=f.value)==null||Ne.focus()}function ge(pe){A.value=pe}return(pe,ue)=>(w(),O("div",{id:k(a),ref_key:"rootEl",ref:h,class:"BaseSelect colorTransformer",tabindex:"0","data-mode":k(l),"data-list-position":$.value,role:"listbox","aria-activedescendant":A.value?`${k(a)}-option-${A.value}`:void 0,onKeydown:re,onClick:ye,onFocusout:ie},[U("div",{ref_key:"selectedOptionsEl",ref:v,class:"selectedOptions"},[Ot(U("div",Nw,[k(c)?(w(),O(Me,{key:0},[yt(be(k(c)),1)],64)):k(l)=="multiple"&&k(s)>0?(w(),O(Me,{key:1},[yt("Select up to "+be(k(s))+" option"+be(k(s)>1?"s":"")+"...",1)],64)):k(l)=="multiple"?(w(),O(Me,{key:2},[yt("Select options....")],64)):k(l)=="single"?(w(),O(Me,{key:3},[yt("Select an option...")],64)):Ce("",!0)],512),[[rn,y.value.length==0]]),(w(!0),O(Me,null,ft(y.value,Ne=>{var wt,Je;return w(),O("div",{key:Ne,class:nt(["option",{notFound:!((wt=k(r))!=null&&wt[Ne])}]),"aria-selected":"true"},[(Je=k(r))!=null&&Je[Ne]?(w(),O("div",Ow,be(k(r)[Ne]),1)):(w(),O("div",Pw,be(Ne),1)),U("div",{class:"remove","data-prevent-list":"true","aria-label":"Remove",onClick:_t=>b(Ne)},Dw,8,Lw)],2)}),128)),Ot(U("input",{ref_key:"inputEl",ref:f,"onUpdate:modelValue":ue[0]||(ue[0]=Ne=>S.value=Ne),type:"text","aria-autocomplete":"none",tabindex:"-1",onKeydown:le,onBlur:de},null,544),[[Ao,S.value]])],512),Ot(U("div",{ref_key:"listEl",ref:C,class:"list"},[(w(!0),O(Me,null,ft(x.value,(Ne,wt,Je)=>(w(),O("div",{id:`${k(a)}-option-${Je}`,key:`${Je}-${wt}`,class:nt(["option",{highlighted:A.value==Je}]),role:"option","data-list-offset":Je,"data-prevent-list":"true",onMousemove:_t=>ge(Je),onClick:_t=>ce(wt)},be(Ne),43,Fw))),128)),Object.keys(x.value).length==0?(w(),O("div",Bw,[k(l)=="multiple"&&g.value?(w(),O(Me,{key:0},[yt("Up to "+be(k(s))+" option"+be(k(s)>1?"s":"")+" allowed.",1)],64)):(w(),O(Me,{key:1},[yt("No results")],64))])):Ce("",!0)],512),[[rn,$.value!=="hidden"]])],40,Mw))}}),Vp=Ie(Vw,[["__scopeId","data-v-087b2aea"]]),Uw="A user input component that allows users to select multiple values from a searchable list of options.",Hw={a:"Option A",b:"Option B"},jw=`
def onchange_handler(state, payload):

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

	state["selected"] = payload`,zw={writer:{name:"Multiselect Input",description:Uw,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:P.KeyValue,default:JSON.stringify(Hw,null,2)},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:P.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:P.Number,default:"0"},accentColor:{...Wt,desc:"The colour of the chips created for each selected option."},chipTextColor:{name:"Chip text",type:P.Color,default:"#ffffff",desc:"The colour of the text in the chips.",category:Oe.Style,applyStyleVariable:!0},primaryTextColor:St,secondaryTextColor:hn,containerBackgroundColor:Vn,separatorColor:Bt,cssClasses:We},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:jw.trim(),bindable:!0}}}},Ww=Ae({...zw,__name:"CoreMultiselectInput",setup(e){const t=G(Y.evaluatedFields),n=Z(()=>t.options.value),o=Z(()=>t.maximumCount.value),a=X(null),r=G(Y.core),s=G(Y.instancePath),l=G(Y.flattenedInstancePath),{formValue:c,handleInput:d}=zt(r,s,a);function h(f){d(f,"wf-options-change")}return(f,v)=>(w(),Re(en,{ref_key:"rootInstance",ref:a,label:k(t).label.value,class:"CoreMultiselectInput"},{default:ze(()=>[Ve(Vp,{"base-id":k(l),"active-value":k(c),options:n.value,"maximum-count":o.value,mode:"multiple",placeholder:k(t).placeholder.value,onChange:h},null,8,["base-id","active-value","options","maximum-count","placeholder"])]),_:1},8,["label"]))}}),Kw=Ie(Ww,[["__scopeId","data-v-abd3fdd6"]]),Gw=["value","placeholder","min","max","step"],Yw="A user input component that allows users to enter numeric values.",dd=`
def onchange_handler(state, payload):

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

	state["new_val"] = payload`,Jw={writer:{name:"Number Input",description:Yw,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},placeholder:{name:"Placeholder",type:P.Text},minValue:{name:"Minimum value",type:P.Number,default:null},maxValue:{name:"Max value",type:P.Number,default:null},valueStep:{name:"Step",type:P.Number,default:"1"},cssClasses:We},events:{"wf-number-change":{desc:"Capture changes as they happen.",stub:dd,bindable:!0},"wf-number-change-finish":{desc:"Capture changes once this control has lost focus.",stub:dd}}}},Qw=Ae({...Jw,__name:"CoreNumberInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=X(null),a=G(Y.core),r=G(Y.instancePath),{formValue:s,handleInput:l}=zt(a,r,n);function c(){if(o.value.value=="")return null;let f=parseFloat(o.value.value);return isNaN(f)||(t.minValue.value!==null&&f<t.minValue.value&&(f=t.minValue.value,o.value.value=f),t.maxValue.value!==null&&f>t.maxValue.value&&(f=t.maxValue.value,o.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,v)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:k(t).label.value,class:"CoreNumberInput"},{default:ze(()=>[U("input",{ref_key:"inputEl",ref:o,type:"number",value:k(s),placeholder:k(t).placeholder.value,min:k(t).minValue.value!==null?k(t).minValue.value:void 0,max:k(t).maxValue.value!==null?k(t).maxValue.value:void 0,step:k(t).valueStep.value!==null?k(t).valueStep.value:void 0,onInput:d,onChange:h},null,40,Gw)]),_:1},8,["label"]))}}),qw=Ie(Qw,[["__scopeId","data-v-24160bde"]]),Xw=["id","checked","value","name","onInput"],Zw=["for"],eI="A user input component that allows users to choose a single value from a list of options using radio buttons.",tI={a:"Option A",b:"Option B"},nI=`
def onchange_handler(state, payload):

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

	state["selected"] = payload`,oI={writer:{name:"Radio Input",description:eI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:P.KeyValue,default:JSON.stringify(tI,null,2)},orientation:{name:"Orientation",type:P.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:Oe.Style,desc:"Specify how to lay out the options."},primaryTextColor:St,accentColor:Wt,cssClasses:We},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:nI.trim(),bindable:!0}}}},aI=Ae({...oI,__name:"CoreRadioInput",setup(e){const t=G(Y.evaluatedFields),n=G(Y.flattenedInstancePath),o=X(null),a=G(Y.core),r=G(Y.instancePath),{formValue:s,handleInput:l}=zt(a,r,o);return(c,d)=>(w(),Re(en,{ref_key:"rootInstance",ref:o,label:k(t).label.value,class:"CoreRadioInput"},{default:ze(()=>[U("div",{class:nt(["options",{horizontal:k(t).orientation.value=="horizontal"}])},[(w(!0),O(Me,null,ft(k(t).options.value,(h,f)=>(w(),O("div",{key:f,class:"option"},[U("input",{id:`${k(n)}-option-${f}`,type:"radio",checked:k(s)===f,value:f,name:`${k(n)}-options`,onInput:v=>k(l)(f,"wf-option-change")},null,40,Xw),U("label",{for:`${k(n)}-option-${f}`},be(h),9,Zw)]))),128))],2)]),_:1},8,["label"]))}}),rI=Ie(aI,[["__scopeId","data-v-1037b969"]]),sI="A user input component that allows users to select a single value from a searchable list of options.",iI={a:"Option A",b:"Option B"},lI=`
def onchange_handler(state, payload):

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

	state["selected"] = payload`,cI={writer:{name:"Select Input",description:sI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:P.KeyValue,default:JSON.stringify(iI,null,2)},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:P.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:P.Number,default:"0"},accentColor:Wt,chipTextColor:{name:"Chip text",type:P.Color,default:"#ffffff",desc:"The color of the text in the chips.",category:Oe.Style,applyStyleVariable:!0},primaryTextColor:St,secondaryTextColor:hn,containerBackgroundColor:Vn,separatorColor:Bt,cssClasses:We},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:lI.trim(),bindable:!0}}}},uI=Ae({...cI,__name:"CoreSelectInput",setup(e){const t=G(Y.evaluatedFields),n=Z(()=>t.options.value),o=X(null),a=G(Y.core),r=G(Y.flattenedInstancePath),s=G(Y.instancePath),{formValue:l,handleInput:c}=zt(a,s,o);function d(h){const f=(h==null?void 0:h[0])??null;c(f,"wf-option-change")}return(h,f)=>(w(),Re(en,{ref_key:"rootInstance",ref:o,label:k(t).label.value,class:"CoreSelectInput"},{default:ze(()=>[Ve(Vp,{"base-id":k(r),"active-value":k(l)?[k(l)]:[],options:n.value,"maximum-count":1,mode:"single",placeholder:k(t).placeholder.value,onChange:d},null,8,["base-id","active-value","options","placeholder"])]),_:1},8,["label"]))}}),dI=Ie(uI,[["__scopeId","data-v-5933b84b"]]);function gs(e,t){const n=Z(()=>{var o;return((o=String(t.value).split(".")[1])==null?void 0:o.length)??0});return Z(()=>Number(e.value).toFixed(n.value))}const fI={class:"BaseInputRange__popover__content"},pI=Ae({__name:"BaseInputSliderThumb",props:Ea({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:C,getOffsetLeft:S});const o=Co(e,"value"),a=X(),r=gs(o,Ca(n,"step")),s=Z(()=>typeof o.value!="number"?50:(o.value-n.min)/(n.max-n.min)*100),l=X(n.popoverDisplayMode==="always");let c=null;Be(Ca(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=Z(()=>`${s.value}%`),f=Z(()=>`${s.value}%`);function v(A){if(d(),n.min!==void 0&&A<n.min||n.max!==void 0&&A>n.max)return;const y=A-n.min,$=Math.round(y/n.step),x=n.min+$*n.step;o.value!==x&&(o.value=x)}function C(A){document.addEventListener("mousemove",$),document.addEventListener("mouseup",x);const y=n.sliderBoundingRect;$(A);function $(g){const p=(g.x-y.left)/(y.right-y.left);if(p>1||p<0)return;const _=(n.max-n.min)*p+n.min;v(_)}function x(){document.removeEventListener("mouseup",x),document.removeEventListener("mousemove",$)}}function S(){return a.value.offsetLeft}return(A,y)=>(w(),O(Me,null,[Ve(Os,null,{default:ze(()=>[Ot(U("div",{class:"BaseInputRange__popover",style:at({left:f.value})},[U("span",fI,be(k(r)),1)],4),[[rn,l.value]])]),_:1}),U("button",{ref_key:"thumb",ref:a,type:"button",class:"BaseInputRange__thumb",style:at({left:h.value}),"aria-label":"Use the arrow keys to increase or decrease the value.",onKeydown:[y[0]||(y[0]=Go($=>v(+o.value-e.step),["left"])),y[1]||(y[1]=Go($=>v(+o.value+e.step),["right"]))],onMousedown:C},null,36)],64))}}),Up=Ie(pI,[["__scopeId","data-v-c5f7e9fd"]]),hI=["aria-valuemin","aria-valuemax"],vI=Ae({__name:"BaseInputSliderLayout",props:{min:{type:Number,default:0},max:{type:Number,default:100},popoverDisplayMode:{type:String,default:"onChange"}},setup(e){return(t,n)=>(w(),O("div",{role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,class:nt(["BaseInputRange",{"BaseInputRange--popover-always-visible":e.popoverDisplayMode==="always"}])},[It(t.$slots,"default",{},void 0,!0)],10,hI))}}),Hp=Ie(vI,[["__scopeId","data-v-4583336d"]]);function jp(e,t=500){const n=X(),o=setInterval(()=>{var a;n.value=(a=e.value)==null?void 0:a.getBoundingClientRect()},t);return Ln(()=>{clearInterval(o)}),Z(()=>n.value)}const mI=9,gI=Ae({__name:"BaseInputSlider",props:Ea({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=Co(e,"value"),o=X(),a=X(),r=gs(n,Ca(t,"step")),s=Z(()=>typeof n.value!="number"?50:(n.value-t.min)/(t.max-t.min)*100),l=jp(o);return Be(()=>t.min,()=>{typeof n.value=="number"&&n.value<t.min&&(n.value=t.min)},{immediate:!0}),Be(()=>t.max,()=>{typeof n.value=="number"&&n.value>t.max&&(n.value=t.max)},{immediate:!0}),(c,d)=>(w(),Re(Hp,{min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuenow":e.value,"aria-valuetext":`${k(r)} (${Math.round(s.value)}%)`},{default:ze(()=>[U("div",{ref_key:"slider",ref:o,class:"BaseInputRange__slider",onMousedown:d[0]||(d[0]=(...h)=>a.value.handleMouseDown&&a.value.handleMouseDown(...h))},[U("div",{class:"BaseInputRange__slider__progress",style:at({width:`calc(${s.value}% + ${mI}px)`})},null,4)],544),Ve(Up,{ref_key:"thumb",ref:a,value:e.value,min:e.min,max:e.max,step:e.step,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":k(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"]))}}),yI="A user input component that allows users to select numeric values using a slider with optional constraints like min, max, and step.",_I=`
def onchange_handler(state, payload):

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

	state["new_val"] = payload`,bI={writer:{name:"Slider Input",description:yI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},minValue:{name:"Minimum value",type:P.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:P.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:P.Number,default:"1",init:"1"},accentColor:Wt,popoverColor:{name:"Popover color",type:P.Color,category:Oe.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:P.Color,category:Oe.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:We},events:{"wf-number-change":{desc:"Capture changes to this control.",stub:_I,bindable:!0}}}},AI=Ae({...bI,__name:"CoreSliderInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=G(Y.core),a=G(Y.instancePath),{formValue:r,handleInput:s}=zt(o,a,n);return(l,c)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:k(t).label.value,class:"CoreSliderInput"},{default:ze(()=>[Ve(gI,{"popover-display-mode":"always",value:k(r),min:k(t).minValue.value,max:k(t).maxValue.value,step:k(t).stepSize.value,"onUpdate:value":c[0]||(c[0]=d=>k(s)(d,"wf-number-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),CI=Ie(AI,[["__scopeId","data-v-47b6517e"]]),wI=9,II=Ae({__name:"BaseInputSliderRange",props:Ea({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=Co(e,"value");function o(y,$){const x=[...n.value];x[y]=$,n.value=x.sort((g,p)=>g-p)}const a=X(),r=X();function s(y){const $=r.value[0],x=r.value[1],g=Math.abs(y.x-$.getOffsetLeft()),p=Math.abs(y.x-x.getOffsetLeft());g>p?x.handleMouseDown(y):$.handleMouseDown(y)}const l=Z(()=>Math.min(...n.value)),c=Z(()=>Math.max(...n.value)),d=Ca(t,"step"),h=gs(l,d),f=gs(c,d),v=Z(()=>`from ${h} to ${f}`),C=Z(()=>typeof l.value!="number"?50:(l.value-t.min)/(t.max-t.min)*100),S=Z(()=>typeof c.value!="number"?50:(c.value-t.min)/(t.max-t.min)*100-C.value),A=jp(a);return Be(()=>t.min,()=>{n.value.some(y=>y<t.min)&&(n.value=n.value.map(y=>y<t.min?t.min:y))},{immediate:!0}),Be(()=>t.max,()=>{n.value.some(y=>y>t.max)&&(n.value=n.value.map(y=>y>t.max?t.max:y))},{immediate:!0}),(y,$)=>(w(),Re(Hp,{class:"BaseInputRangeSlider",min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuetext":v.value},{default:ze(()=>[U("div",{ref_key:"slider",ref:a,class:"BaseInputRange__slider",onMousedown:s},[U("div",{class:"BaseInputRange__slider__progress",style:at({width:`calc(${S.value}% + ${wI}px)`,marginLeft:`${C.value}%`})},null,4)],544),(w(),O(Me,null,ft([0,1],x=>Ve(Up,{key:x,ref_for:!0,ref_key:"thumbs",ref:r,value:e.value[x],min:e.min,max:e.max,step:d.value,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":k(A),"onUpdate:value":g=>o(x?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"]))}}),xI="A user input component that allows users to select numeric values range using a range slider with optional constraints like min, max, and step.",TI=`
def onchange_handler(state, payload):

	# Set the state variables "from" & "to" to the new range
	state["from"] = payload[0]
	state["to"] = payload[1]`,SI={writer:{name:"Slider Range Input",description:xI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},minValue:{name:"Minimum value",type:P.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:P.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:P.Number,default:"1",init:"1"},accentColor:Wt,popoverColor:{name:"Popover color",type:P.Color,category:Oe.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:P.Color,category:Oe.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:We},events:{"wf-range-change":{desc:"Capture changes to this control.",stub:TI,bindable:!0}}}},kI=Ae({...SI,__name:"CoreSliderRangeInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=G(Y.core),a=G(Y.instancePath),{formValue:r,handleInput:s}=zt(o,a,n);return(l,c)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:k(t).label.value,class:"CoreSliderInput"},{default:ze(()=>[Ve(II,{"popover-display-mode":"always",value:k(r)||[20,50],min:k(t).minValue.value,max:k(t).maxValue.value,step:k(t).stepSize.value,"onUpdate:value":c[0]||(c[0]=d=>k(s)(d,"wf-range-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),EI=Ie(kI,[["__scopeId","data-v-60a5dd29"]]),$I=["type","value","placeholder"],MI="A user input component that allows users to enter single-line text values.",fd=`
def onchange_handler(state, payload):

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

	state["new_val"] = payload`,NI={writer:{name:"Text Input",description:MI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},placeholder:{name:"Placeholder",type:P.Text},passwordMode:{name:"Password mode",default:"no",type:P.Text,options:{yes:"Yes",no:"No"},category:Oe.Style},accentColor:Wt,cssClasses:We},events:{"wf-change":{desc:"Capture changes as they happen.",stub:fd,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:fd}}}},OI=Ae({...NI,__name:"CoreTextInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=G(Y.core),a=G(Y.instancePath),{formValue:r,handleInput:s}=zt(o,a,n);return(l,c)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:k(t).label.value,class:"CoreTextInput"},{default:ze(()=>[U("input",{type:k(t).passwordMode.value=="yes"?"password":"text",value:k(r),placeholder:k(t).placeholder.value,"aria-autocomplete":"none",onInput:c[0]||(c[0]=d=>k(s)(d.target.value,"wf-change")),onChange:c[1]||(c[1]=d=>k(s)(d.target.value,"wf-change-finish"))},null,40,$I)]),_:1},8,["label"]))}}),PI=Ie(OI,[["__scopeId","data-v-3de4e860"]]),LI=["value","placeholder","rows"],RI="A user input component that allows users to enter multi-line text values.",pd=`
def onchange_handler(state, payload):

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

	state["new_val"] = payload`,DI={writer:{name:"Textarea Input",description:RI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},placeholder:{name:"Placeholder",type:P.Text,control:Ls.Textarea},rows:{name:"Rows",type:P.Number,init:"5",default:"5"},cssClasses:We},events:{"wf-change":{desc:"Capture changes as they happen.",stub:pd,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:pd}}}},FI=Ae({...DI,__name:"CoreTextareaInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=G(Y.core),a=G(Y.instancePath),{formValue:r,handleInput:s}=zt(o,a,n);return(l,c)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:k(t).label.value,class:"CoreTextareaInput"},{default:ze(()=>[U("textarea",{value:k(r),placeholder:k(t).placeholder.value,rows:k(t).rows.value,onInput:c[0]||(c[0]=d=>k(s)(d.target.value,"wf-change")),onChange:c[1]||(c[1]=d=>k(s)(d.target.value,"wf-change-finish"))},null,40,LI)]),_:1},8,["label"]))}}),BI=Ie(FI,[["__scopeId","data-v-df4e5c30"]]),VI=["value"],UI="A user input component that allows users to select a time.",HI=`
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`,jI={writer:{name:"Time Input",description:UI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},cssClasses:We},events:{"wf-time-change":{desc:"Capture changes to this control.",stub:HI,bindable:!0}}}},zI=Ae({...jI,__name:"CoreTimeInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=G(Y.core),a=G(Y.instancePath),{formValue:r,handleInput:s}=zt(o,a,n);return(l,c)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:k(t).label.value,class:"CoreTimeInput"},{default:ze(()=>[U("input",{type:"time",value:k(r),onChange:c[0]||(c[0]=d=>k(s)(d.target.value,"wf-time-change"))},null,40,VI)]),_:1},8,["label"]))}}),WI=Ie(zI,[["__scopeId","data-v-fa21b0e5"]]),zp=e=>(Rt("data-v-efecd871"),e=e(),Dt(),e),KI={key:0,class:"filler light"},GI={key:1,class:"face"},YI={viewBox:"0 0 100 100"},JI=zp(()=>U("circle",{class:"eye left",cx:"35",cy:"38",r:"6"},null,-1)),QI=zp(()=>U("circle",{class:"eye right",cx:"65",cy:"38",r:"6"},null,-1)),qI=["d"],XI="A user input component that allows users to provide a rating.",ZI=`
def onchange_handler(state, payload):

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

	state["rating"] = payload`,ex={writer:{name:"Rating Input",description:XI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},feedback:{name:"Feedback",default:"stars",type:P.Text,options:{stars:"Stars",faces:"Faces",hearts:"Hearts"}},minValue:{name:"Minimum value",type:P.Number,default:"1",desc:"Valid values are 0 and 1."},maxValue:{name:"Max value",type:P.Number,default:"5",desc:"Valid values are between 2 and 11."},valueStep:{name:"Step",type:P.Number,default:"1",desc:"Valid values are between 0.25 and 1."},accentColor:Wt,primaryTextColor:St,cssClasses:We},events:{"wf-number-change":{stub:ZI,bindable:!0}}}},tx=Ae({...ex,__name:"CoreRatingInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=X(null),a=G(Y.core),r=G(Y.instancePath),s=X(null),{formValue:l,handleInput:c}=zt(a,r,n);function d(p){const _=p.offsetX,b=o.value.querySelectorAll(".unit");let z=0;return b.forEach(W=>{const re=W;_>re.offsetLeft+re.offsetWidth?z++:_>re.offsetLeft&&(z+=(_-re.offsetLeft)/re.offsetWidth)}),z}function h(p){let _=Math.ceil(p/x.value)*x.value;return _=Math.max(Math.min(_,$.value),y.value),_}function f(p){const _=d(p);return h(_)}function v(p){const _=f(p);s.value=_}function C(){s.value=null}function S(p){const _=Math.max(Math.min(p,$.value),y.value),b=45,z=95,W=(_-y.value)/($.value-y.value),re=W*-10,le=70+re,ce=b+W*(z-b)+re;return`M30,${le} Q50,${ce} 70,${le}`}function A(p){const _=f(p);c(_,"wf-number-change")}const y=Z(()=>Math.max(Math.min(t.minValue.value,1),0)),$=Z(()=>Math.max(Math.min(t.maxValue.value,11),2)),x=Z(()=>Math.max(Math.min(t.valueStep.value,1),.25)),g=Z(()=>{if(s.value!==null)return s.value;const p=parseFloat(l.value);return isNaN(p)?null:p});return(p,_)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,class:"CoreRatingInput",label:k(t).label.value},{default:ze(()=>[U("div",{ref_key:"unitsEl",ref:o,class:nt(["units",{valueSet:g.value!==null}]),onClick:A,onMousemove:v,onMouseout:C},[(w(!0),O(Me,null,ft([...Array($.value).keys()],b=>(w(),O("div",{key:b,class:nt(["unit",k(t).feedback.value])},[U("div",{class:"filler",style:at({width:`${g.value>b?Math.min(g.value-b,1)*100:0}%`})},null,4),g.value!==null?(w(),O("div",KI)):Ce("",!0),k(t).feedback.value=="faces"?(w(),O("div",GI,[(w(),O("svg",YI,[JI,QI,U("path",{class:"mouth",d:S(g.value??b+1)},null,8,qI)]))])):Ce("",!0)],2))),128))],34)]),_:1},8,["label"]))}}),nx=Ie(tx,[["__scopeId","data-v-efecd871"]]),ox=e=>(Rt("data-v-ab3f108e"),e=e(),Dt(),e),ax=["aria-checked","onKeydown"],rx=ox(()=>U("div",{class:"toggle"},null,-1)),sx=[rx],ix="A user input component with a simple on/off status.",lx=`
def handle_toggle(state, payload):

	# The payload will be a bool 

	state["its_on"] = payload`,cx={writer:{name:"Switch Input",description:ix,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:P.Text},accentColor:Wt,primaryTextColor:St,separatorColor:Bt,cssClasses:We},events:{"wf-toggle":{desc:"Sent when the switch is toggled.",stub:lx.trim(),bindable:!0}}}},ux=Ae({...cx,__name:"CoreSwitchInput",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=G(Y.core),a=G(Y.instancePath),{formValue:r,handleInput:s}=zt(o,a,n);function l(){s(!r.value,"wf-toggle")}return(c,d)=>(w(),Re(en,{ref_key:"rootInstance",ref:n,label:k(t).label.value,"is-horizontal":!0,class:"CoreSwitchInput"},{default:ze(()=>[U("div",{class:nt(["switch",{on:!!k(r)}]),tabindex:"0",role:"switch","aria-checked":!!k(r),onClick:l,onKeydown:Go(Ta(l,["prevent"]),["enter","space"])},sx,42,ax)]),_:1},8,["label"]))}}),dx=Ie(ux,[["__scopeId","data-v-ab3f108e"]]),fx=Ae({__name:"BaseContainer",props:{contentHAlign:{},contentVAlign:{},contentPadding:{},isHorizontal:{type:Boolean}},setup(e){const t=e,n=Z(()=>{const o={padding:t.contentPadding};return t.isHorizontal?{...o,justifyContent:t.contentHAlign,alignItems:t.contentVAlign}:{...o,alignItems:t.contentHAlign,justifyContent:t.contentVAlign}});return(o,a)=>(w(),O("div",{class:nt(["BaseContainer",{horizontal:t.isHorizontal}]),style:at(n.value),"data-writer-container":""},[It(o.$slots,"default",{},void 0,!0)],6))}}),yr=Ie(fx,[["__scopeId","data-v-4caa740e"]]),px={class:"material-symbols-outlined"},hx=Ae({__name:"BaseCollapseButton",props:Ea({direction:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=Co(e,"modelValue"),o=Z(()=>t.direction==="left-right"?"chevron_left":"keyboard_arrow_up");return(a,r)=>(w(),O("button",{role:"button",class:nt(["BaseCollapseIcon",{"BaseCollapseIcon--collapsed":n.value}]),onClick:r[0]||(r[0]=s=>n.value=!n.value)},[U("i",px,be(o.value),1)],2))}}),jl=Ie(hx,[["__scopeId","data-v-987b67ae"]]),vx={key:0,class:"header"},mx={key:0,class:"titleContainer"},gx={key:0},yx={key:1,class:"collapsedTitle"},_x={class:"transformed"},bx={class:"content"},Ax="A layout component that organizes its child components in columns. Must be inside a Column Container component.",Cx={writer:{name:"Column",description:Ax,allowedParentTypes:["columns","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{title:{name:"Title",type:P.Text},width:{name:"Width (factor)",default:"1",init:"1",type:P.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:Oe.Style},isSticky:{name:"Sticky",default:"no",type:P.Text,options:{yes:"Yes",no:"No"},category:Oe.Style},isCollapsible:Bl,startCollapsed:{...Rs,desc:"Only applied when the column is collapsible."},separatorColor:Bt,contentPadding:Na,contentHAlign:Ma,contentVAlign:Fl,cssClasses:We}}},wx=Ae({...Cx,__name:"CoreColumn",setup(e){const t=G(Y.instancePath),n=G(Y.instanceData),o=G(Y.core),a=G(Y.componentId),r=G(Y.evaluatedFields),s=Z(()=>r.isCollapsible.value=="yes"),l=X(r.isCollapsible.value=="yes"&&r.startCollapsed.value=="yes"),c=Z(()=>r.isSticky.value=="yes"),d=Z(()=>{let C;return l.value?C="0 0 32px":C=`${r.width.value} 0 0`,{flex:C}}),h=Z(()=>{var C,S;return v.value>=((S=(C=f.value)==null?void 0:C.value)==null?void 0:S.minimumNonCollapsiblePosition)}),f=Z(()=>{var C;for(let S=-1;S>-1*t.length;S--){const A=t.at(S);if(((C=o.getComponentById(A.componentId))==null?void 0:C.type)!=="columns")continue;return n.at(S)}return null}),v=Z(()=>{var C;return(C=o.getComponentById(a))==null?void 0:C.position});return Be([()=>r.isCollapsible.value,v],()=>{const C=f.value;C&&(C.value={minimumNonCollapsiblePosition:void 0})}),Be(f,C=>{!C||!C.value||s.value||typeof C.value.minimumNonCollapsiblePosition<"u"&&v.value>=C.value.minimumNonCollapsiblePosition||(C.value.minimumNonCollapsiblePosition=v.value)},{immediate:!0,deep:!0}),(C,S)=>(w(),O("div",{class:nt(["CoreColumn",{sticky:c.value,collapsible:s.value,collapsibleToRight:h.value,collapsed:l.value}]),style:at(d.value)},[k(r).title.value||s.value?(w(),O("div",vx,[l.value?Ce("",!0):(w(),O("div",mx,[k(r).title.value?(w(),O("h3",gx,be(k(r).title.value),1)):Ce("",!0)])),s.value?(w(),Re(jl,{key:1,modelValue:l.value,"onUpdate:modelValue":S[0]||(S[0]=A=>l.value=A),class:"collapser",direction:"left-right"},null,8,["modelValue"])):Ce("",!0)])):Ce("",!0),l.value&&k(r).title.value?(w(),O("div",yx,[U("div",_x,[U("div",bx,be(k(r).title.value),1)])])):Ce("",!0),Ve(yr,{class:"container","aria-expanded":s.value?l.value:null,"content-h-align":k(r).contentHAlign.value,"content-v-align":k(r).contentVAlign.value,"content-padding":k(r).contentPadding.value},{default:ze(()=>[It(C.$slots,"default",{},void 0,!0)]),_:3},8,["aria-expanded","content-h-align","content-v-align","content-padding"])],6))}}),Ix=Ie(wx,[["__scopeId","data-v-3ea44f84"]]),xx={class:"CoreColumns horizontal","data-writer-container":""},Tx={writer:{name:"Column Container",description:"Serves as container for Column components",allowedChildrenTypes:["column","repeater","separator"],category:"Layout",fields:{cssClasses:We}}},Sx=Ae({...Tx,__name:"CoreColumns",setup(e){const t=G(Y.instanceData);return t.at(-1).value={minimumNonCollapsiblePosition:void 0},(n,o)=>(w(),O("div",xx,[It(n.$slots,"default",{},void 0,!0)]))}}),kx=Ie(Sx,[["__scopeId","data-v-616070ed"]]),Ex={class:"CoreHeader"},$x={class:"container horizontal","data-writer-container":""},Mx="A container component that typically contains the main navigation elements.",Nx={writer:{name:"Header",description:Mx,category:"Layout",allowedChildrenTypes:["*"],fields:{text:{name:"Text",init:"Header Text",default:"(No text)",type:P.Text},primaryTextColor:St,cssClasses:We},previewField:"text"}},Ox=Ae({...Nx,__name:"CoreHeader",setup(e){const t=G(Y.evaluatedFields);return(n,o)=>(w(),O("div",Ex,[U("h1",null,be(k(t).text.value),1),U("div",$x,[It(n.$slots,"default",{},void 0,!0)])]))}}),Px=Ie(Ox,[["__scopeId","data-v-0dba4bfb"]]),Lx="A layout component that stacks its child components horizontally, wrapping them to the next row if necessary.",Rx={writer:{name:"Horizontal Stack",description:Lx,allowedChildrenTypes:["*"],category:"Layout",fields:{contentPadding:{...Na,default:"0"},contentHAlign:Ma,contentVAlign:Fl,cssClasses:We}}},Dx=Ae({...Rx,__name:"CoreHorizontalStack",setup(e){const t=G(Y.evaluatedFields);return(n,o)=>(w(),Re(yr,{class:"CoreHorizontalStack","content-h-align":k(t).contentHAlign.value,"content-v-align":k(t).contentVAlign.value,"content-padding":k(t).contentPadding.value,"is-horizontal":!0},{default:ze(()=>[It(n.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-v-align","content-padding"]))}}),Fx=Ie(Dx,[["__scopeId","data-v-a5e8d853"]]),Bx="A container component that divides the layout into sections, with an optional title.",Vx={writer:{name:"Section",description:Bx,category:"Layout",allowedChildrenTypes:["*"],fields:{title:{name:"Title",init:"Section Title",desc:"Leave blank to hide.",type:P.Text},isCollapsible:Bl,startCollapsed:Rs,accentColor:Wt,primaryTextColor:St,secondaryTextColor:hn,containerBackgroundColor:Vn,containerShadow:$a,separatorColor:Bt,buttonColor:Un,buttonTextColor:Hn,buttonShadow:wo,contentPadding:{...Na,default:"16px"},contentHAlign:Ma,cssClasses:We},previewField:"title"}},Ux=Ae({...Vx,__name:"CoreSection",setup(e){const t=G(Y.evaluatedFields),n=Z(()=>t.isCollapsible.value==="yes"),o=X(n.value&&t.startCollapsed.value==="yes");return(a,r)=>(w(),O("section",{class:nt(["CoreSection",{"CoreSection--collapsible":n.value}])},[k(t).title.value||n.value?(w(),O("div",{key:0,class:nt(["CoreSection__title",{"CoreSection__title--collapsed":n.value&&o.value}])},[U("h3",null,be(k(t).title.value),1),n.value?(w(),Re(jl,{key:0,modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=s=>o.value=s),direction:"top-bottom"},null,8,["modelValue"])):Ce("",!0)],2)):Ce("",!0),o.value?Ce("",!0):(w(),Re(yr,{key:1,"content-h-align":k(t).contentHAlign.value,"content-padding":k(t).contentPadding.value,"aria-expanded":n.value?o.value:null},{default:ze(()=>[It(a.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding","aria-expanded"]))],2))}}),Hx=Ie(Ux,[["__scopeId","data-v-184a25f0"]]),jx="A visual component to create a separation between adjacent elements.",Wp={writer:{name:"Separator",description:jx,category:"Layout",fields:{separatorColor:Bt,cssClasses:We}}},hd=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.`)},zx=e=>(Rt("data-v-5abd9423"),e=e(),Dt(),e),Wx={class:"CoreSeparator separator"},Kx=zx(()=>U("div",{class:"line"},null,-1)),Gx=[Kx];function Yx(e,t,n,o,a,r){return w(),O("div",Wx,Gx)}typeof hd=="function"&&hd(Wp);const Jx=Ie(Wp,[["render",Yx],["__scopeId","data-v-5abd9423"]]),Qx={class:"collapserContainer"},qx={class:"container","data-writer-container":""},Xx="A container component that organizes its children in a sidebar. Its parent must be a Page component.",Zx={writer:{name:"Sidebar",description:Xx,positionless:!0,slot:"sidebar",allowedParentTypes:["page"],allowedChildrenTypes:["*"],category:"Layout",fields:{startCollapsed:{...Rs,desc:void 0},sidebarBackgroundColor:{name:"Background",type:P.Color,category:Oe.Style,applyStyleVariable:!0,default:"rgba(255, 255, 255, 0.3)"},accentColor:Wt,primaryTextColor:St,secondaryTextColor:hn,containerBackgroundColor:Vn,containerShadow:$a,separatorColor:Bt,buttonColor:Un,buttonTextColor:Hn,buttonShadow:wo,cssClasses:We}}},eT=Ae({...Zx,__name:"CoreSidebar",setup(e){const t=G(Y.evaluatedFields),n=X(t.startCollapsed.value=="yes"),o=G(Y.core),a=G(Y.builderManager),r=G(Y.componentId),s=Z(()=>a==null?void 0:a.getSelectedId()),l=X(0),c=Z(()=>({"max-height":`calc(100vh - ${l.value}px)`}));Be(s,h=>{h&&d(h)&&(n.value=!1)});const d=h=>{const f=o.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)=>(w(),O("div",{class:nt(["CoreSidebar",{collapsed:n.value}]),style:at(c.value)},[U("div",Qx,[Ve(jl,{modelValue:n.value,"onUpdate:modelValue":f[0]||(f[0]=v=>n.value=v),direction:"left-right"},null,8,["modelValue"])]),U("div",qx,[It(h.$slots,"default",{},void 0,!0)])],6))}}),tT=Ie(eT,[["__scopeId","data-v-35711d0d"]]),nT={class:"CoreTab"},oT=0,vd=1,aT="A container component that displays its child components as a tab inside a Tab Container.",rT={writer:{name:"Tab",description:aT,allowedParentTypes:["tabs","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Tab Name",type:P.Text},contentPadding:{...Na,default:"16px"},contentHAlign:Ma,cssClasses:We},previewField:"name"}},sT=Ae({...rT,__name:"CoreTab",setup(e){const t=G(Y.evaluatedFields),n=G(Y.instancePath),o=G(Y.instanceData),a=G(Y.core),r=G(Y.builderManager),s=G(Y.componentId),{isComponentVisible:l}=Us(a),c=Z(()=>r==null?void 0:r.getSelectedId()),d=()=>{for(let p=-2;p>-1*n.length;p--){const _=n.at(p),{type:b}=a.getComponentById(_.componentId);if(b==="tabs")return p+1}},h=Z(()=>{const p=d();return n.at(p)}),f=Z(()=>h==null?void 0:h.value.instanceNumber),v=Z(()=>f.value===oT),C=Z(()=>f.value===vd),S=Z(()=>l(s)?v.value||C.value&&g.value:!1),A=()=>{for(let p=-1;p>-1*n.length;p--){const _=n.at(p),{type:b}=a.getComponentById(_.componentId);if(b==="tabs")return o.at(p)}},y=()=>{const p=d(),_=n.slice(0,p),b=p+1<0?n.slice(p+1):[];return[..._,{componentId:n.at(p).componentId,instanceNumber:vd},...b]},$=()=>{const p=A();p.value={activeTab:y()}},x=p=>{const _=a.getComponentById(p);return!_||_.type=="root"?!1:_.parentId==s?!0:x(_.parentId)};Be(c,p=>{p&&x(p)&&$()});const g=Z(()=>{var z;let p;v.value?p=y():p=n;const b=(z=A().value)==null?void 0:z.activeTab;return JSON.stringify(b)==JSON.stringify(p)});return ka(()=>{var b;if(v.value)return;const p=A();(b=p.value)!=null&&b.activeTab||l(s,n)&&(p.value={activeTab:n})}),(p,_)=>Ot((w(),O("div",nT,[v.value?(w(),O("button",{key:0,class:nt(["bit",{active:g.value}]),tabindex:"0",onClick:$},be(k(t).name.value),3)):Ce("",!0),C.value?Ot((w(),Re(yr,{key:1,class:"container","content-h-align":k(t).contentHAlign.value,"content-padding":k(t).contentPadding.value},{default:ze(()=>[It(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[rn,g.value]]):Ce("",!0)],512)),[[rn,S.value]])}}),iT=Ie(sT,[["__scopeId","data-v-51f3a0d7"]]),lT={class:"CoreTabs"},cT={class:"tabSelector horizontal","data-writer-cage":"","data-writer-container":""},uT={class:"container"},dT="A container component for organising and displaying Tab components in a tabbed interface.",fT={writer:{name:"Tab Container",description:dT,category:"Layout",allowedChildrenTypes:["tab","repeater"],fields:{accentColor:Wt,primaryTextColor:St,secondaryTextColor:hn,containerBackgroundColor:Vn,containerShadow:$a,separatorColor:Bt,buttonColor:Un,buttonTextColor:Hn,buttonShadow:wo,cssClasses:We}}},pT=Ae({...fT,__name:"CoreTabs",setup(e){const t=G(Y.instanceData);return t.at(-1).value={activeTab:void 0},(n,o)=>(w(),O("div",lT,[U("nav",cT,[It(n.$slots,"default",{instanceNumber:0},void 0,!0)]),U("div",uT,[It(n.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),hT=Ie(pT,[["__scopeId","data-v-46e04ad4"]]),Kp=e=>(Rt("data-v-bfed1c7b"),e=e(),Dt(),e),vT={class:"CoreStep"},mT=["disabled"],gT={class:"indicator"},yT=Kp(()=>U("div",{class:"linker left"},null,-1)),_T={key:0,class:"material-symbols-outlined"},bT=Kp(()=>U("div",{class:"linker right"},null,-1)),AT={class:"label"},Xr=0,Di=1,CT="A container component that displays its child components as a step inside a Step Container.",wT={writer:{name:"Step",description:CT,allowedParentTypes:["steps","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Step name",type:P.Text},contentPadding:{...Na,default:"16px"},isCompleted:{name:"Completed",desc:"Use a state reference to dynamically mark this step as complete.",default:"no",type:P.Text,options:{yes:"Yes",no:"No"}},contentHAlign:Ma,cssClasses:We},previewField:"name"}},IT=Ae({...wT,__name:"CoreStep",setup(e){const t=G(Y.evaluatedFields),n=G(Y.instancePath),o=G(Y.instanceData),a=G(Y.isBeingEdited),r=G(Y.core),s=G(Y.builderManager),l=G(Y.componentId),{isComponentVisible:c}=Us(r),d=Z(()=>s==null?void 0:s.getSelectedId()),h=v();function f(){for(let p=-1;p>-1*n.length;p--){const _=n.at(p),b=r.getComponentById(_.componentId);if(!b)return;if(b.type==="steps")return p}}function v(){const p=f();if(!(typeof p>"u"))return o.at(p)}function C(){const p=f()+1,_=n.slice(0,p),b=p+1<0?n.slice(p+1):[];return[..._,{componentId:n.at(p).componentId,instanceNumber:Di},...b]}function S(){h.value={...h.value,activeStep:C()}}function A(){const p=h.value.steps.findIndex(z=>JSON.stringify(z.instancePath)==JSON.stringify(n));if(p==-1||p+1>h.value.steps.length)return;let b=h.value.steps.slice(p+1).find(z=>z.isCompleted!="yes");b||(b=h.value.steps.at(-1)),h.value={...h.value,activeStep:b.instancePath}}function y(p){const _=r.getComponentById(p);return!_||_.type=="root"?!1:_.parentId==l?!0:y(_.parentId)}function $(){if(t.isCompleted.value!="yes"){S();return}A()}const x=Z(()=>{const p=f()+1;return n.at(p)});Be(d,p=>{p&&y(p)&&S()});const g=Z(()=>{var b;let p;(x==null?void 0:x.value.instanceNumber)==Xr?p=C():p=n;const _=(b=h.value)==null?void 0:b.activeStep;return JSON.stringify(_)==JSON.stringify(p)});return Be([g,t.isCompleted],()=>{a.value||g.value&&t.isCompleted.value=="yes"&&A()}),Be(t.isCompleted,(p,_)=>{_==="yes"&&p==="no"&&$()}),ka(()=>{var _;(x==null?void 0:x.value.instanceNumber)==Xr||(typeof h.value.steps.find(b=>b.instancePath==n)>"u"&&h.value.steps.push({instancePath:n,isCompleted:t.isCompleted.value}),(_=h.value)==null?void 0:_.activeStep)||c(l,n)&&$()}),Xo(()=>{const p=h.value.steps.findIndex(_=>JSON.stringify(_.instancePath)==JSON.stringify(n));h.value.steps.splice(p,1)}),(p,_)=>{var b,z,W,re;return Ot((w(),O("div",vT,[((b=x.value)==null?void 0:b.instanceNumber)==Xr?(w(),O("button",{key:0,class:nt(["bit",{active:g.value,completed:k(t).isCompleted.value=="yes"}]),disabled:!k(a),stepindex:"0",onClick:S},[U("div",gT,[yT,U("div",{class:nt(["status",{completed:k(t).isCompleted.value=="yes"}])},[k(t).isCompleted.value=="yes"?(w(),O("i",_T," done ")):Ce("",!0)],2),bT]),U("div",AT,be(k(t).name.value),1)],10,mT)):Ce("",!0),((z=x.value)==null?void 0:z.instanceNumber)==Di?Ot((w(),Re(yr,{key:1,class:"container","content-h-align":k(t).contentHAlign.value,"content-padding":k(t).contentPadding.value},{default:ze(()=>[It(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[rn,g.value]]):Ce("",!0)],512)),[[rn,((W=x.value)==null?void 0:W.instanceNumber)==Xr||((re=x.value)==null?void 0:re.instanceNumber)==Di&&g.value]])}}}),xT=Ie(IT,[["__scopeId","data-v-bfed1c7b"]]),TT={class:"CoreSteps"},ST={class:"stepSelector horizontal","data-writer-cage":"","data-writer-container":""},kT={class:"container"},ET="A container component for displaying Step components, allowing you to implement a stepped workflow.",$T={writer:{name:"Step Container",description:ET,category:"Layout",allowedChildrenTypes:["step","repeater"],fields:{accentColor:Wt,primaryTextColor:St,secondaryTextColor:hn,containerBackgroundColor:Vn,containerShadow:$a,separatorColor:Bt,buttonColor:Un,buttonTextColor:Hn,buttonShadow:wo,cssClasses:We}}},MT=Ae({...$T,__name:"CoreSteps",setup(e){const t=G(Y.instanceData),n={activeStep:void 0,steps:[]};return t.at(-1).value=n,(o,a)=>(w(),O("div",TT,[U("nav",ST,[It(o.$slots,"default",{instanceNumber:0},void 0,!0)]),U("div",kT,[It(o.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),NT=Ie(MT,[["__scopeId","data-v-782ebf0b"]]),OT={key:0,class:"material-symbols-outlined"},PT=`
def handle_button_click(state):

	# Increment counter when the button is clicked

	state["counter"] += 1`,LT="A standalone button component that can be linked to a click event handler.",RT={writer:{name:"Button",description:LT,category:"Other",events:{"wf-click":{desc:"Capture single clicks.",stub:PT.trim()}},fields:{text:{name:"Text",init:"Button Text",type:P.Text},isDisabled:{name:"Disabled",default:"no",type:P.Text,options:{yes:"Yes",no:"No"},desc:"Disables all event handlers."},buttonColor:Un,buttonTextColor:Hn,icon:{name:"Icon",type:P.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:Oe.Style},buttonShadow:wo,separatorColor:Bt,cssClasses:We},previewField:"text"}},Gp=Ae({...RT,__name:"CoreButton",setup(e){const t=X(null),n=G(Y.evaluatedFields),o=G(Y.isDisabled);Be(n.isDisabled,r=>{o.value=r=="yes"},{immediate:!0});function a(r){if(!t.value)return;const s=Fs(r);t.value.$el.dispatchEvent(s)}return(r,s)=>(w(),Re(Qn,{ref_key:"rootInstance",ref:t,class:"CoreButton","aria-disabled":k(o),onClick:a},{default:ze(()=>[k(n).icon.value?(w(),O("i",OT,be(k(n).icon.value),1)):Ce("",!0),yt(" "+be(k(n).text.value),1)]),_:1},8,["aria-disabled"]))}}),md=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 md=="function"&&md(Gp);const DT=Ie(Gp,[["__scopeId","data-v-b2d8d89f"]]),FT={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%)"},BT="A generic component that creates customisable HTML elements, which can serve as containers for other components.",Yp={writer:{name:"HTML Element",description:BT,category:"Other",allowedChildrenTypes:["*"],fields:{element:{name:"Element",default:"div",type:P.Text,desc:"Set the type of HTML element to create, e.g., 'div', 'section', 'span', etc."},styles:{name:"Styles",default:null,init:JSON.stringify(FT,null,2),type:P.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:P.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:P.Text,control:Ls.Textarea,desc:"Define custom HTML to be used inside the element. It will be wrapped in a div and rendered after children components."},cssClasses:We}},setup(e,{slots:t}){const n=G(Y.evaluatedFields);return()=>{let o;return n.htmlInside.value&&(o=_o("div",{innerHTML:n.htmlInside.value})),_o(n.element.value,{...n.attrs.value,class:"CoreHTML","data-writer-container":"",style:n.styles.value},[t.default({}),o])}}},gd=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 gd=="function"&&gd(Yp);const zl=e=>(Rt("data-v-62b3d343"),e=e(),Dt(),e),VT={class:"pagination-left"},UT={class:"pagination-pagesize"},HT=["value","selected"],jT={class:"pagination-description"},zT={class:"bold"},WT={class:"bold"},KT={class:"bold"},GT={class:"pagination-right"},YT={class:"pagination-picker"},JT=zl(()=>U("i",{class:"material-symbols-outlined"}," navigate_before ",-1)),QT=[JT],qT={key:0,class:"paginationpicker-block paginationpicker-neutral"},XT=["onClick"],ZT={key:2,class:"paginationpicker-block paginationpicker-currentpage"},eS=zl(()=>U("i",{class:"material-symbols-outlined"}," navigate_next ",-1)),tS=[eS],nS={class:"pagination-jump"},oS=zl(()=>U("label",null,"Jump to",-1)),aS=["value"],rS=`
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}
`,sS=`
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}
`,iS={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:P.Number,desc:"The current page number."},pageSize:{name:"Page Size",default:"10",type:P.Number,desc:"The number of items per page."},totalItems:{name:"Total Items",default:"10",type:P.Number,desc:"The total number of items"},pageSizeOptions:{name:"Page Size Options",init:"",default:"",type:P.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:P.Text,options:{yes:"Yes",no:"No"},desc:"Show an option to show all records."},jumpTo:{name:"Jump To",default:"no",type:P.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:rS.trim()},"wf-change-page-size":{desc:"Fires when the user change the page size.",stub:sS.trim()}}}},lS=Ae({...iS,__name:"CorePagination",setup(e){const t=G(Y.evaluatedFields),n=G(Y.core),o=X(null),a=G(Y.instancePath),{handleInput:r}=zt(n,a,o),{handleInput:s}=zt(n,a,o),l=Z(()=>t.pageSizeOptions.value!==""||t.pageSizeShowAll.value==="yes"),c=Z(()=>t.jumpTo.value==="yes"),d=Z(()=>t.totalItems.value==0?0:(t.page.value-1)*t.pageSize.value+1),h=Z(()=>Math.min(t.page.value*t.pageSize.value,t.totalItems.value)),f=Z(()=>t.totalItems.value),v=Z(()=>Math.ceil(parseInt(t.totalItems.value)/parseInt(t.pageSize.value))),C=Z(()=>{let p=[];const _=t.pageSizeOptions.value.split(",");for(const b in _){const z=parseInt(_[b],10);p.push({value:z,label:`${z} items`})}return t.pageSizeShowAll.value==="yes"&&p.push({value:f.value,label:"All items"}),p}),S=Z(()=>{const p=[],_=parseInt(t.page.value);if(v.value<=7)for(let b=0;b<v.value;b++)p.push(b+1);else _==1||_==2?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(v.value-2),p.push(v.value-1),p.push(v.value)):_==3?(p.push(1),p.push(2),p.push(3),p.push(4),p.push("..."),p.push(v.value-1),p.push(v.value)):_==4?(p.push(1),p.push(2),p.push(3),p.push(4),p.push(5),p.push("..."),p.push(v.value)):_==v.value||_==v.value-1?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(v.value-2),p.push(v.value-1),p.push(v.value)):_==v.value-2?(p.push(1),p.push(2),p.push("..."),p.push(v.value-3),p.push(v.value-2),p.push(v.value-1),p.push(v.value)):(p.push(1),p.push("..."),p.push(_-1),p.push(_),p.push(_+1),p.push("..."),p.push(v.value));return p}),A=Z(()=>parseInt(t.page.value)-1<1),y=Z(()=>parseInt(t.page.value)+1>v.value),$=p=>{if(p.target.value==="")return;let _=parseInt(p.target.value);_>v.value&&(_=v.value),r(_,"wf-change-page")},x=p=>{r(p,"wf-change-page")},g=p=>{let _=parseInt(p.target.value);s(_,"wf-change-page-size")};return Be(t.page,()=>{}),Be(t.pageSize,()=>{}),Ft(()=>{}),Ln(()=>{}),(p,_)=>(w(),O("div",{ref_key:"rootEl",ref:o,class:"CorePagination"},[U("div",VT,[Ot(U("div",UT,[U("select",{class:"pagesize-select",onChange:g},[(w(!0),O(Me,null,ft(C.value,(b,z)=>(w(),O("option",{key:z,value:b.value,selected:b.value==k(t).pageSize.value},be(b.label),9,HT))),128))],32)],512),[[rn,l.value]]),U("div",jT,[yt(" Showing "),U("span",zT,be(d.value),1),yt(" to "),U("span",WT,be(h.value),1),yt(" of "),U("span",KT,be(f.value),1),yt(" results ")])]),U("div",GT,[U("div",YT,[U("div",{class:nt(["paginationpicker-block",{"paginationpicker-disabled":A.value}]),onClick:_[0]||(_[0]=b=>x(k(t).page.value-1))},QT,2),(w(!0),O(Me,null,ft(S.value,(b,z)=>(w(),O(Me,{key:z},[b=="..."?(w(),O("div",qT,be(b),1)):Ce("",!0),b!="..."&&b!=k(t).page.value?(w(),O("div",{key:1,class:"paginationpicker-block",onClick:W=>x(b)},be(b),9,XT)):Ce("",!0),b==k(t).page.value?(w(),O("div",ZT,be(b),1)):Ce("",!0)],64))),128)),U("div",{class:nt(["paginationpicker-block",{"paginationpicker-disabled":y.value}]),onClick:_[1]||(_[1]=b=>x(k(t).page.value+1))},tS,2)]),Ot(U("div",nS,[oS,U("input",{type:"text",value:k(t).page.value,onInput:$},null,40,aS)],512),[[rn,c.value]])])],512))}}),cS=Ie(lS,[["__scopeId","data-v-62b3d343"]]),uS="A container component that repeats its child components based on a dictionary.",dS={a:{desc:"Option A"},b:{desc:"Option B"}},fS={writer:{name:"Repeater",description:uS,category:"Other",allowedChildrenTypes:["inherit"],fields:{repeaterObject:{name:"Repeater object",default:JSON.stringify(dS,null,2),type:P.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:P.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:P.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=G(Y.core),o=G(Y.componentId),a=G(Y.evaluatedFields),r=G(Y.isBeingEdited),s=G(Y.renderProxiedComponent),l=Z(()=>n.getComponents(o,{sortedByPosition:!0})),c=()=>typeof a.repeaterObject.value!="object"?[]:Object.values(a.repeaterObject.value).map((h,f)=>l.value.map(v=>s(v.id,f)));return()=>{let d={};return l.value.length!=0&&a.repeaterObject.value!=null&&Object.keys(a.repeaterObject.value).length!=0?d=c():r.value===!0?d=t.default({}):d={},_o("div",{class:"CoreRepeater","data-writer-container":""},d)}}},pS=Ie(fS,[["__scopeId","data-v-cfce6ac0"]]),hS="A component that emits an event repeatedly at specified time intervals, enabling time-based refresh.",vS=`
def handle_timer_tick(state):

	# Increment counter when the timer ticks

	state["counter"] += 1`.trim(),mS={writer:{name:"Timer",description:hS,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:P.Number},isActive:{name:"Active",default:"yes",desc:"Whether the timer should trigger tick events.",type:P.Text,options:{yes:"Yes",no:"No"}},accentColor:Wt,cssClasses:We},events:{"wf-tick":{desc:"Emitted when the timer ticks.",stub:vS.trim()}}}},gS=Ae({...mS,__name:"CoreTimer",setup(e){const o=G(Y.evaluatedFields),a=G(Y.core),r=X(null),s=Z(()=>o.intervalMs.value),l=Z(()=>o.isActive.value=="yes"),c=X(!1),d=G(Y.componentId),h=Z(()=>{var y,$;return!!(($=(y=a.getComponentById(d))==null?void 0:y.handlers)!=null&&$["wf-tick"])}),f=Z(()=>({"animation-duration":`${Math.max(s.value,1e3)}ms`}));Be([l,s],()=>{A()}),Be(h,async y=>{y&&(await fn(),A())});let v=0,C=null;function S(){clearTimeout(C)}function A(){if(S(),!l.value||s.value<0||!r.value)return;Date.now()-v>=500&&(r.value.classList.remove("tick"),r.value.offsetWidth,v=Date.now(),r.value.classList.add("tick"));const y=({ok:x})=>{c.value=!x,C=setTimeout(()=>{A()},s.value)},$=new CustomEvent("wf-tick",{detail:{callback:y}});r.value.dispatchEvent($)}return Ft(()=>{A()}),(y,$)=>(w(),O("div",{ref_key:"rootEl",ref:r,class:nt(["CoreTimer",{failing:c.value}]),style:at(f.value)},null,6))}}),yS=Ie(gS,[["__scopeId","data-v-b72e4359"]]),_S={class:"main"},bS={class:"actions"},AS=["value"],CS="A user input component that allows users to capture images using their webcam.",wS=`
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(),IS={writer:{name:"Webcam Capture",description:CS,category:"Other",fields:{refreshRate:{name:"Refresh rate (ms)",init:"200",default:"200",desc:"Set to 0 for manual capture.",type:P.Number},buttonColor:Un,buttonTextColor:Hn,buttonShadow:wo,separatorColor:Bt,cssClasses:We},events:{"wf-webcam":{desc:"Sent when a frame is captured. Its payload contains the captured frame in PNG format.",stub:wS.trim()}}}},xS=Ae({...IS,__name:"CoreWebcamCapture",setup(e){const t=X(!1),n=X(null),o=document.createElement("canvas"),a=X(null),r=G(Y.evaluatedFields),s=X(null),l=X(null);Ft(async()=>{var A,y;s.value=await c(),l.value=(y=(A=s.value)==null?void 0:A[0])==null?void 0:y.deviceId}),Xo(()=>{S()});const c=async()=>(await navigator.mediaDevices.enumerateDevices()).filter($=>$.kind=="videoinput"),d=Z(()=>r.refreshRate.value);Be(d,(A,y)=>{A>0&&y<=0&&v()}),Be(l,async()=>{t.value&&(S(),await C())});const h=async()=>{if(t.value=!t.value,!t.value){S();return}await C(),v()},f=()=>(o.getContext("2d").drawImage(a.value,0,0),o.toDataURL("image/png")),v=()=>{const A=new CustomEvent("wf-webcam",{detail:{payload:f(),callback:()=>{d.value<=0||!t.value||setTimeout(()=>{v()},d.value)}}});n.value.dispatchEvent(A)},C=async()=>(a.value.style.display="",new Promise((A,y)=>{navigator.mediaDevices.getUserMedia||(console.error("This browser doesn't support webcam connection."),y());const $={video:!0};s.value.length>1&&($.video={deviceId:l.value}),navigator.mediaDevices.getUserMedia($).then(x=>{a.value.srcObject=x;const g=x.getVideoTracks()[0].getSettings().width,p=x.getVideoTracks()[0].getSettings().height;o.setAttribute("width",g.toString()),o.setAttribute("height",p.toString()),A()}).catch(x=>{console.error("An error occurred when trying to use the webcam.",x),y()})})),S=()=>{const A=a.value.srcObject;A&&A.getTracks().map($=>$.stop()),a.value.srcObject=null,a.value.style.display="none"};return(A,y)=>{var $;return w(),O("div",{ref_key:"rootEl",ref:n,class:"CoreWebcamCapture"},[Ot(U("div",_S,[U("video",{ref_key:"videoEl",ref:a,autoplay:"true"},null,512)],512),[[rn,t.value]]),U("div",bS,[d.value==0?(w(),Re(Qn,{key:0,onClick:v},{default:ze(()=>[yt(" Capture image ")]),_:1})):Ce("",!0),Ve(Qn,{onClick:h},{default:ze(()=>[yt(be(t.value?"Stop capture":"Start webcam capture"),1)]),_:1}),(($=s.value)==null?void 0:$.length)>1?(w(),Re(Bp,{key:1,modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=x=>l.value=x)},{default:ze(()=>[(w(!0),O(Me,null,ft(s.value,(x,g)=>(w(),O("option",{key:x.deviceId,value:x.deviceId},be(x.label||`Webcam ${g+1}`),9,AS))),128))]),_:1},8,["modelValue"])):Ce("",!0)])],512)}}}),TS=Ie(xS,[["__scopeId","data-v-9e37501d"]]),SS={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:P.Text,desc:"The id of the component to reuse."}}}},kS=Ae({...SS,__name:"CoreReuse",props:{contextSlot:{}},setup(e){const t=e,n=G(Y.evaluatedFields),a=G(Y.instancePath).at(-2).componentId,r=G(Y.core),s=G(Y.renderProxiedComponent),l=G(Y.isBeingEdited),c=G(Y.componentId),d=X(_o("div","")),h=X(!0),f=Z(()=>{var A;return(A=r.getComponentById(n.proxyId.value))==null?void 0:A.type}),v=Z(()=>f.value?r.getComponentDefinition(f.value):null);function C(A,y){h.value=t.contextSlot==="default",d.value=_o("div",{class:["CoreReuse",y],style:{color:"var(--primaryTextColor)"}},l.value?A:"")}function S(){if(!n.proxyId.value)return C("No component selected to reuse","empty");if(c===n.proxyId.value||!v.value)return C("The id specified for reuse doesn't match any component.","invalid-value");if(!r.getContainableTypes(a).includes(f.value))return C("The component cannot be reused here.","invalid-context");h.value=t.contextSlot===(v.value.slot??"default");const A=s(n.proxyId.value,0,{class:["CoreReuse"]});d.value=A}return Be([n.proxyId,v],S,{immediate:!0}),(A,y)=>h.value?(w(),Re(hr(d.value),{key:0})):Ce("",!0)}}),Io=e=>(Rt("data-v-912607e3"),e=e(),Dt(),e),ES={key:0,class:"controls"},$S=Io(()=>U("i",{class:"material-symbols-outlined"},"arrow_upward",-1)),MS=Io(()=>U("i",{class:"material-symbols-outlined"},"arrow_downward",-1)),NS=Io(()=>U("i",{class:"material-symbols-outlined"},"zoom_in",-1)),OS=Io(()=>U("i",{class:"material-symbols-outlined"},"zoom_out",-1)),PS=Io(()=>U("span",{class:"separator"},null,-1)),LS=Io(()=>U("i",{class:"material-symbols-outlined"},"navigate_before",-1)),RS=Io(()=>U("i",{class:"material-symbols-outlined"},"navigate_next",-1)),DS={key:2},FS=["page"],BS=Io(()=>U("div",{class:"mask"},null,-1)),VS="A component to embed PDF documents.",US={writer:{name:"PDF",description:VS,category:"Embed",fields:{source:{name:"PDF source",type:P.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:P.Object},selectedMatch:{name:"Selected highlight match",default:null,desc:"The index of the selected highlight match.",type:P.Number},page:{name:"Page",type:P.Number,desc:"The page to be displayed."},controls:{name:"Controls",type:P.Text,options:{yes:"Yes",no:"No"},desc:"Show controls to navigate the PDF.",default:"yes"},containerBackgroundColor:Vn,separatorColor:Bt,primaryTextColor:St,cssClasses:We}}},HS=Ae({...US,__name:"CorePDF",setup(e){const t=G(Y.evaluatedFields);let n,o,a;const r=Z(()=>t.highlights.value?t.highlights.value.map(de=>de.replaceAll("|","\\|")).join("|"):""),s=X({completeWords:!1,ignoreCase:!0}),l=X(1),c=X(1),d=X([]),h=X(0),f=X(null),v=X(null),C=X(!1),S=X(0),A=X([]);Ft(async()=>{const de=await Xt(()=>import("./index-DDRfJPDG.js"),[],import.meta.url);a=de.VuePDF;const ye=de.usePDF;({pdf:n,pages:o}=ye(t.source)),y()});const y=()=>{C.value=!0,S.value=0,A.value=[],d.value=[]},$=de=>{A.value=[...A.value,de].sort((ye,Ee)=>ye.page-Ee.page)},x=de=>{S.value++},g=()=>{d.value=A.value.reduce((de,ye)=>[...de,...ye.matches.map((Ee,ge)=>({page:ye.page,str:Ee.str,index:ge}))],[]).sort((de,ye)=>de.page===ye.page?de.index-ye.index:de.page-ye.page)},p=()=>{g(),h.value&&z(h.value),t.selectedMatch.value&&(h.value=t.selectedMatch.value)},_=de=>{const ye=de.target.getBoundingClientRect(),Ee=[...de.target.children].filter(ge=>ge.className.includes("page")).find(ge=>{const pe=ge.getBoundingClientRect(),ue=pe.y-ye.y;return ue<ye.height/2&&ue+pe.height>ye.height/2});Ee&&(c.value=Number(Ee.getAttribute("page")))},b=(de,ye)=>{let Ee=0,ge=de;for(;ge&&ge!==ye;)Ee+=ge.offsetTop,ge=ge.offsetParent;return Ee},z=de=>{if(de<1||de>d.value.length)return;const ye=d.value[de-1];if(!ye)return;const ge=f.value.querySelectorAll(`div[page='${ye.page}'] span.highlight`)[ye.index];v.value.scrollTop=b(ge,v.value)},W=de=>{if(de<1||de>o.value)return;const ye=f.value.querySelector("div[page='"+de+"']");v.value.scrollTop=b(ye,v.value)},re=()=>{h.value<d.value.length?h.value=h.value+1:h.value=1},le=()=>{h.value>1?h.value=h.value-1:h.value=d.value.length},ce=()=>{l.value=l.value<2?l.value+.1:l.value},ie=()=>{l.value=l.value>.25?l.value-.1:l.value};return Be(S,()=>{S.value===o.value&&t.page.value&&W(t.page.value)}),Be([A,S],()=>{(!r.value||A.value.length===o.value)&&S.value===o.value&&(p(),C.value=!1)}),Be(l,()=>{y()}),Be(t.source,()=>{y()}),Be(t.highlights,()=>{A.value=[],d.value=[]}),Be(h,()=>{z(h.value)}),Be(t.selectedMatch,()=>{h.value=t.selectedMatch.value}),Be(t.page,()=>{W(t.page.value)}),(de,ye)=>(w(),O("div",{ref_key:"rootEl",ref:f,class:"CorePDF"},[k(t).controls.value==="yes"?(w(),O("div",ES,[Ve(Mn,{onClick:ye[0]||(ye[0]=()=>W(c.value-1))},{default:ze(()=>[$S]),_:1}),Ve(Mn,{onClick:ye[1]||(ye[1]=()=>W(c.value+1))},{default:ze(()=>[MS]),_:1}),(w(),O("span",{key:c.value},be(c.value)+" / "+be(k(o)),1)),Ve(Mn,{disabled:C.value,onClick:ce},{default:ze(()=>[NS]),_:1},8,["disabled"]),Ve(Mn,{disabled:C.value,onClick:ie},{default:ze(()=>[OS]),_:1},8,["disabled"]),U("span",null,be(Math.round(l.value*100))+"%",1),PS,d.value.length?(w(),Re(Mn,{key:0,onClick:le},{default:ze(()=>[LS]),_:1})):Ce("",!0),d.value.length?(w(),Re(Mn,{key:1,onClick:re},{default:ze(()=>[RS]),_:1})):Ce("",!0),d.value.length?(w(),O("span",DS,"Matches "+be(h.value)+" / "+be(d.value.length),1)):Ce("",!0)])):Ce("",!0),U("div",{ref_key:"viewerEl",ref:v,class:"viewer",onScroll:_},[(w(!0),O(Me,null,ft(k(o),Ee=>(w(),O("div",{key:Ee,page:Ee,class:"page"},[Ve(k(a),{scale:l.value,pdf:k(n),page:Ee,"text-layer":"","highlight-text":r.value,"highlight-options":s.value,onHighlight:ye[2]||(ye[2]=ge=>$(ge)),onLoaded:x},null,8,["scale","pdf","page","highlight-text","highlight-options"])],8,FS))),128))],544),BS],512))}}),jS=Ie(HS,[["__scopeId","data-v-912607e3"]]),Jp=e=>(Rt("data-v-810b0f26"),e=e(),Dt(),e),zS={key:0,class:"noURLProvided"},WS=Jp(()=>U("h2",null,"No URL provided.",-1)),KS=[WS],GS=["src"],YS=Jp(()=>U("div",{class:"mask"},null,-1)),JS="A component to embed an external resource in an iframe.",QS=`
def load_handler(state):

	# Sets status message when resource is loaded

	state["status"] = "Page loaded"`,qS={writer:{name:"IFrame",description:JS,category:"Embed",fields:{src:{name:"Source",default:"",desc:"A valid URL",type:P.Text},separatorColor:Bt,cssClasses:We},events:{"wf-load":{desc:"Fires when the resource has successfully loaded.",stub:QS.trim()}}}},XS=Ae({...qS,__name:"CoreIFrame",setup(e){const t=X(null),n=G(Y.evaluatedFields);function o(){const a=new CustomEvent("wf-load");t.value.dispatchEvent(a)}return(a,r)=>(w(),O("div",{ref_key:"rootEl",ref:t,class:"CoreIFrame"},[k(n).src.value?(w(),O("iframe",{key:1,src:k(n).src.value,draggable:"false",onLoad:o},null,40,GS)):(w(),O("div",zS,KS)),YS],512))}}),ZS=Ie(XS,[["__scopeId","data-v-810b0f26"]]),Wl=e=>(Rt("data-v-121cc5c9"),e=e(),Dt(),e),ek={key:0,class:"noAPIKeyProvided"},tk=Wl(()=>U("h2",null,"Google Maps cannot be initialised.",-1)),nk=Wl(()=>U("h3",null,"An API key hasn't been provided.",-1)),ok=[tk,nk],ak=Wl(()=>U("div",{class:"mask"},null,-1)),rk="A component to embed a Google Map. It can be used to display a map with markers.",sk=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],ik={writer:{name:"Google Maps",description:rk,category:"Embed",fields:{apiKey:{name:"API Key",default:"",desc:"API Key from Google Cloud Console.",type:P.Text},mapId:{name:"Map ID",default:"",desc:"ID of map from Google Cloud Console, needed for markers.",type:P.Text},mapType:{name:"Map type",type:P.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:P.Number},lat:{name:"Latitude",default:"37.79322359164316",type:P.Number},lng:{name:"Longitude",default:"-122.39999318828129",type:P.Number},markers:{name:"Markers",default:JSON.stringify(sk),desc:"Markers data",type:P.Object},cssClasses:We},events:{"gmap-marker-click":{desc:"Capture single clicks on markers."},"gmap-click":{desc:"Capture single click on map."}}}},lk=Ae({...ik,__name:"CoreGoogleMaps",setup(e){const t=X(null),n=X(null),o=G(Y.evaluatedFields);let a=null,r=[];const s=Z(()=>({lat:o.lat.value,lng:o.lng.value})),l=Z(()=>["roadmap","satellite","hybrid","terrain"].includes(o.mapType.value)?o.mapType.value:"roadmap"),c=async()=>{h();const{Loader:f}=await Xt(()=>import("./index-BQr1pfrb.js"),[],import.meta.url);await new f({apiKey:o.apiKey.value,version:"weekly"}).load(),a=new google.maps.Map(n.value,{center:s.value,mapTypeId:l.value,zoom:8,mapId:o.mapId.value}),a.addListener("click",C=>{const S=new CustomEvent("gmap-click",{detail:{payload:C.latLng.toJSON()}});t.value.dispatchEvent(S)}),d()},d=async()=>{if(!o.mapId.value||!o.markers.value)return;const{AdvancedMarkerElement:f}=await google.maps.importLibrary("marker");h(),o.markers.value.forEach(C=>{const S=new f({position:{lat:C.lat,lng:C.lng},map:a,title:C.name});r.push(S),S.addListener("click",()=>{const A=new CustomEvent("gmap-marker-click",{detail:{payload:C}});t.value.dispatchEvent(A)})})},h=()=>{r.forEach(f=>f.setMap(null)),r=[]};return Ft(async()=>{o.apiKey.value&&await c()}),Be(s,async f=>{a&&a.setCenter(f)}),Be(o.zoom,async f=>{a&&a.setZoom(f)}),Be(l,async f=>{a&&a.setMapTypeId(f)}),Be(o.markers,d),Be(o.apiKey,c),Be(o.mapId,c),(f,v)=>(w(),O("div",{ref_key:"rootEl",ref:t,class:"CoreGoogleMaps"},[k(o).apiKey.value?(w(),O("div",{key:1,ref_key:"mapEl",ref:n,class:"map"},null,512)):(w(),O("div",ek,ok)),ak],512))}}),ck=Ie(lk,[["__scopeId","data-v-121cc5c9"]]),uk={class:"sidebarContainer"},dk=`
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
`,fk=`
def handle_page_open(state, payload):
	page_key = payload
	state["message"] = f"The page {page_key} has been opened."
`,pk="A container component representing a single page within the application.",hk={writer:{name:"Page",category:"Root",events:{"wf-keydown":{desc:"Captures all key activity while this page is open.",stub:dk},"wf-page-open":{desc:"Emitted when the page is opened.",stub:fk}},description:pk,allowedChildrenTypes:["*"],allowedParentTypes:["root"],fields:{key:{name:"Page key",desc:"Unique identifier. It's needed to enable navigation to this Page.",type:P.IdKey},pageMode:{name:"Page mode",default:"compact",type:P.Text,options:{compact:"Compact",wide:"Wide"},category:Oe.Style},accentColor:Wt,primaryTextColor:St,secondaryTextColor:hn,emptinessColor:gp,containerBackgroundColor:Vn,containerShadow:$a,separatorColor:Bt,buttonColor:Un,buttonTextColor:Hn,buttonShadow:wo,cssClasses:We},previewField:"key"}},vk=Ae({...hk,__name:"CorePage",setup(e){const t=X(null),n=G(Y.evaluatedFields);function o(r){const s=q0(r);t.value.dispatchEvent(s)}function a(){const r=n.key.value,s=new CustomEvent("wf-page-open",{detail:{payload:r}});t.value.dispatchEvent(s)}return Ft(async()=>{document.addEventListener("keydown",o),a()}),Ln(()=>{document.removeEventListener("keydown",o)}),(r,s)=>(w(),O("div",{ref_key:"rootEl",ref:t,class:"CorePage"},[U("div",uk,[It(r.$slots,"default",{slotName:"sidebar",positionlessSlot:!0},void 0,!0)]),U("div",{class:nt(["main",{compact:k(n).pageMode.value=="compact",wide:k(n).pageMode.value=="wide"}]),"data-writer-container":""},[It(r.$slots,"default",{},void 0,!0)],2)],512))}}),mk=Ie(vk,[["__scopeId","data-v-ccb9cbc5"]]),gk=/^((?<pageKey>[^/]*))?(\/(?<routeVars>.*))?$/;function Kl(e=document.location.hash){var r;const n=(r=e.substring(1).match(gk))==null?void 0:r.groups,o=n!=null&&n.pageKey?decodeURIComponent(n.pageKey):void 0;if(!n)return{pageKey:o,routeVars:new Map};const a=new URLSearchParams(n.routeVars);return{pageKey:o,routeVars:new Map(a.entries())}}function yk(){const e=Kl(),t=Object.fromEntries(e.routeVars.entries());return{pageKey:e.pageKey,routeVars:t}}function _k(e){const{pageKey:t,routeVars:n}=e;let o="";if(t&&(o+=`${encodeURIComponent(t)}`),n.size>0){const a=new URLSearchParams([...n.entries()]);o+=`/${a.toString()}`}return o}function Qp(e){document.location.hash=_k(e)}function bk(e){const t=Kl();t.pageKey=e,Qp(t)}function oE(e){const t=Kl(),n=(t==null?void 0:t.routeVars)??{};t.routeVars=new Map(Object.entries({...n,...e})),Qp(t)}const Ak=`
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(),Ck=`
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(),wk="The root component of the application, which serves as the starting point of the component hierarchy.",Ik={writer:{name:"Root",category:"Root",description:wk,allowedChildrenTypes:["page"],fields:{appName:{name:"App name",type:P.Text,desc:"The app name will be shown in the browser's title bar."},...h0},events:{"wf-app-open":{desc:"Captures the first application load, including page key and route vars.",stub:Ck},"wf-hashchange":{desc:"Capture changes to the URL hash, including page key and route vars.",stub:Ak}}}},xk=Ae({...Ik,__name:"CoreRoot",setup(e){const t=G(Y.core),n=G(Y.builderManager),o=G(Y.getChildrenVNodes),a=X(null),{isComponentVisible:r}=Us(t),s=Z(()=>{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(v=>r(v.id));return f.length==0?null:f[0].id});function l(){var h;const c=yk(),d=new CustomEvent("wf-hashchange",{detail:{payload:c}});(h=a.value)==null||h.dispatchEvent(d),c.pageKey&&t.setActivePageFromKey(c.pageKey)}return Be(s,c=>{var f;const h=(f=t.getComponentById(c).content)==null?void 0:f.key;n&&n.getSelectedId()!==c&&n.setSelection(null),fn().then(()=>{var v,C;window.scrollTo(0,0),(C=(v=document.querySelector(".ComponentRenderer"))==null?void 0:v.parentElement)==null||C.scrollTo(0,0)}),bk(h)}),ka(()=>{window.addEventListener("hashchange",()=>{l()}),l()}),(c,d)=>(w(),O("div",{ref_key:"rootEl",ref:a,class:"CoreRoot","data-writer-container":""},[(w(!0),O(Me,null,ft(k(o)(),h=>(w(),O(Me,{key:h.key},[h.key===`${s.value}:0`?(w(),Re(hr(h),{key:0})):Ce("",!0)],64))),128))],512))}}),Tk=Ie(xk,[["__scopeId","data-v-409a0d25"]]),Gl=e=>(Rt("data-v-ba331915"),e=e(),Dt(),e),Sk={key:0,class:"noAccessTokenProvided"},kk=Gl(()=>U("h2",null,"MapBox cannot be initialised.",-1)),Ek=Gl(()=>U("h3",null,"An access token hasn't been provided.",-1)),$k=[kk,Ek],Mk=Gl(()=>U("div",{class:"mask"},null,-1)),Nk=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],Ok={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:P.Text},mapStyle:{name:"Map style",default:"mapbox://styles/mapbox/standard",type:P.Text,desc:"Map style URL"},zoom:{name:"Zoom",default:"8",type:P.Number},lat:{name:"Latitude",default:"37.79322359164316",type:P.Number},lng:{name:"Longitude",default:"-122.39999318828129",type:P.Number},markers:{name:"Markers",init:JSON.stringify(Nk,null,2),desc:"",type:P.Object},controls:{name:"Controls visible",default:"yes",type:P.Text,options:{yes:"Yes",no:"No"},desc:"Show map controls"},cssClasses:We},events:{"mapbox-marker-click":{desc:"Capture single clicks on markers."},"mapbox-click":{desc:"Capture single click on map."}}}},Pk=Ae({...Ok,__name:"CoreMapbox",setup(e){const t=G(Y.evaluatedFields),n=X(null),o=X(null),a=Z(()=>[t.lng.value,t.lat.value]),r=X(null);let s=[],l=null;const c=async()=>{if(!o.value||!t.accessToken.value)return;const h=await Xt(()=>import("./mapbox-gl-B-_CNpPx.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:o.value,style:t.mapStyle.value,center:a.value,zoom:t.zoom.value}),r.value.on("click",f=>{const v=new CustomEvent("mapbox-click",{detail:{payload:{lat:f.lngLat.lat,lng:f.lngLat.lng}}});n.value.dispatchEvent(v)}),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,v;if(!r.value)return;const h=await Xt(()=>import("./mapbox-gl-B-_CNpPx.js").then(C=>C.m),[],import.meta.url);s.forEach(C=>C.remove()),s=[],(v=(f=t.markers)==null?void 0:f.value)==null||v.forEach(C=>{const S=new h.Marker().setLngLat([C.lng,C.lat]).addTo(r.value).setPopup(new h.Popup().setText(C.name));s.push(S),S.getElement().addEventListener("click",A=>{const y=new CustomEvent("mapbox-marker-click",{detail:{payload:C}});n.value.dispatchEvent(y),A.stopPropagation()})})};return Be(t.controls,()=>{r.value&&(t.controls.value==="yes"?r.value.addControl(l):r.value.removeControl(l))}),Be(t.markers,async()=>{r.value&&await d()}),Be(t.mapStyle,()=>{r.value&&r.value.setStyle(t.mapStyle.value)}),Be(a,()=>{var h,f;r.value&&((h=a.value)!=null&&h.lat)&&((f=a.value)!=null&&f.lng)&&r.value.setCenter(a.value)}),Be(t.zoom,()=>{r.value&&t.zoom.value&&r.value.setZoom(t.zoom.value)}),Be([o,t.accessToken],()=>{c()}),(h,f)=>(w(),O("div",{ref_key:"rootEl",ref:n,class:"CoreMapbox"},[k(t).accessToken.value?(w(),O("div",{key:1,ref_key:"mapEl",ref:o,class:"map"},null,512)):(w(),O("div",Sk,$k)),Mk],512))}}),Lk=Ie(Pk,[["__scopeId","data-v-ba331915"]]);function Rk(e,t){const{type:n}=e[t],r=Ql().map(l=>({type:l,definition:dr(l)})).filter(l=>l.definition.allowedParentTypes&&!l.definition.allowedParentTypes.includes(n));return new Set(r.map(l=>l.type))}function Dk(e,t){const{type:n,parentId:o}=e[t],a=Ql().filter(c=>c!=="root"&&c!=="workflows_root"),{allowedChildrenTypes:r,toolkit:s}=dr(n);if(!r)return new Set([]);let l=new Set(r);if(r.includes("*")&&(l=new Set([...l,...a])),l.delete("inherit")){if(!o)return l;const c=Yl(e,o);l=new Set([...l,...c])}return s&&(l=new Set(Array.from(l).filter(c=>dr(c).toolkit==s))),l}function Yl(e,t){const n=Array.from(Dk(e,t)),o=Array.from(Rk(e,t));return n.filter(r=>!o.includes(r))}function qp(e,t){function n(){let F="";const D=new Uint16Array(16);return window.crypto.getRandomValues(D),D.forEach(j=>{F+=(j%36).toString(36)}),F}function o(E){const F=e.getComponentById(E);if(!F)return;const D=F.position;if(D==0)return;const j=e.getComponentById(F.parentId);if(!j)return;const ee=e.getComponents(j.id,{includeBMC:!0,includeCMC:!1}).filter(Te=>Te.position==D-1)[0],we=`move-up-${E}`;t.openMutationTransaction(we,"Move up"),t.registerPreMutation(ee),ee.position++,t.registerPostMutation(ee),t.registerPreMutation(F),F.position--,t.registerPostMutation(F),t.closeMutationTransaction(we),e.sendComponentUpdate()}function a(E){const F=e.getComponentById(E);if(!F)return;const D=e.getComponentById(F.parentId);if(!D)return;const j=F.position;if(j==-2)return;const ee=e.getComponents(D.id,{includeBMC:!0,includeCMC:!1}).filter(T=>T.position!==-2);if(j>=ee.length-1)return;const we=ee.filter(T=>T.position==j+1)[0],Te=`move-down-${E}`;t.openMutationTransaction(Te,"Move down"),t.registerPreMutation(we),we.position--,t.registerPostMutation(we),t.registerPreMutation(F),F.position++,t.registerPostMutation(F),t.closeMutationTransaction(Te),e.sendComponentUpdate()}function r(E,F,D){const j=e.getComponentById(E);if(!j)return;const ee=e.getComponentById(j.parentId);if(!ee||E==F||ee.id==F&&D===null)return;const we=`move-${E}`;t.openMutationTransaction(we,"Move"),t.registerPreMutation(j),c(E,-1),j.position=D??de(F,j.type),j.parentId=F,c(E,1),t.registerPostMutation(j),t.closeMutationTransaction(we),e.sendComponentUpdate()}function s(E,F,D,j){const ee=n(),we=e.getComponentDefinition(E),{fields:Te}=we,T={};return Object.entries(Te??{}).map(([q,se])=>{T[q]=se.init}),{...j??{},id:ee,type:E,parentId:F,content:T,handlers:{},position:D??de(F,E)}}function l(E,F,D,j){const ee=s(E,F,D,j),we=`create-${ee.id}`;return t.openMutationTransaction(we,"Create"),e.addComponent(ee),c(ee.id,1),t.registerPostMutation(ee),t.closeMutationTransaction(we),e.sendComponentUpdate(),ee.id}function c(E,F){const D=e.getComponentById(E);if(e.getComponentDefinition(D.type).positionless)return;e.getComponents(D.parentId,{includeBMC:!0,includeCMC:!1}).filter(Te=>Te.id!==E).filter(Te=>Te.position>=D.position).map(Te=>{t.registerPreMutation(Te),Te.position+=F,t.registerPostMutation(Te)})}function d(E){const F=e.getComponentById(E),D=[],j=ee=>{const we=e.getComponents(ee.id);D.push(ee),we.map(Te=>j(Te))};return j(F),D}function h(E){return e.getComponents().filter(F=>{var D;return(D=F.outs)==null?void 0:D.find(j=>j.toNodeId==E)})}function f(E){const F=e.getComponentById(E);if(!F)return;const D=e.getComponentById(E).parentId,j=`delete-${E}`;t.openMutationTransaction(j,"Delete"),D&&c(F.id,-1),h(E).map(Te=>{t.registerPreMutation(Te),Te.outs=[...Te.outs.filter(T=>T.toNodeId!==E)]}),d(E).map(Te=>{t.registerPreMutation(Te),e.deleteComponent(Te.id)}),t.closeMutationTransaction(j),e.sendComponentUpdate()}function v(E){return E=="root"}function C(E){const F=e.getComponentById(E);return!v(E)&&!(F!=null&&F.isCodeManaged)}function S(E){const F=e.getComponentById(E);return!(F!=null&&F.isCodeManaged)&&e.getContainableTypes(E).length>0}function A(E){return!v(E)}function y(E){const F=e.getComponentById(E);return!v(E)&&!(F!=null&&F.isCodeManaged)}function $(E){const F=e.getComponentById(E);return!v(E)&&!(F!=null&&F.isCodeManaged)}function x(E){return!v(E)}function g(E,F){const D=e.getComponentById(E);if(!D)return;const j=D.parentId;if(!j)return;let ee;F&&(ee=F.split(",").slice(0,-1).join(",")),t.setSelection(j,ee)}function p(E){if(E.length==0)return!1;const F={};return[...e.getComponents(),...E].forEach(j=>{F[j.id]=j}),E.map(j=>Yl(F,j.parentId).includes(j.type)).every(j=>j)}function _(E){const F=e.getComponentById(E);if(!F||F.isCodeManaged)return!1;const D=t.getClipboard();if(D===null)return!1;const{jsonSubtree:j}=D,ee=JSON.parse(j);return ee.length==0?!1:(ee[0].parentId=E,p(ee))}function b(E){const F=T=>e.getComponents(T,{includeBMC:!0,includeCMC:!1}).filter(se=>{var J;return!((J=e.getComponentDefinition(se.type))==null?void 0:J.positionless)}).length,D=e.getComponentById(E);if(!D||D.isCodeManaged)return{up:!1,down:!1};if(e.getComponentDefinition(D.type).positionless)return{up:!1,down:!1};const ee=D.parentId?F(D.parentId):0,we=ee>0&&D.position>0,Te=ee>0&&D.position<ee-1;return{up:we,down:Te}}function z(E){e.getComponentById(E)&&(t.setClipboard({operation:fa.Cut,jsonSubtree:JSON.stringify(d(E))}),t.setSelection(null),f(E),e.sendComponentUpdate())}function W(E){const F=JSON.parse(JSON.stringify(E));return F.forEach(D=>{delete D.isCodeManaged;const j=n();F.filter(ee=>ee.id!==D.id).map(ee=>{var we;ee.parentId==D.id&&(ee.parentId=j),(we=ee.outs)==null||we.forEach(Te=>{Te.toNodeId==D.id&&(Te.toNodeId=j)})}),D.id=j,typeof D.x<"u"&&typeof D.y<"u"&&(D.x+=36,D.y+=36)}),F}function re(E){if(!e.getComponentById(E))return;const D=d(E),j=W(D);t.setClipboard({operation:fa.Copy,jsonSubtree:JSON.stringify(j)})}function le(E){if(!e.getComponentById(E))return;const D=t.getClipboard();if(D===null)return;const{operation:j,jsonSubtree:ee}=D,we=JSON.parse(ee),Te=we[0];if(typeof Te.outs<"u"&&Te.parentId!==E&&(Te.outs=[]),j==fa.Cut)return ce(E,we);if(j==fa.Copy)return ie(E,we)}function ce(E,F){t.setClipboard(null);const D=F[0];D.parentId=E,D.position=de(E,D.type);const j=`paste-cut-${E}`;t.openMutationTransaction(j,"Paste from cut"),F.map(ee=>{e.addComponent(ee),t.registerPostMutation(ee)}),t.closeMutationTransaction(j),e.sendComponentUpdate()}function ie(E,F){t.setClipboard({operation:fa.Copy,jsonSubtree:JSON.stringify(W(F))});const D=F[0];D.parentId=E,D.position=de(E,D.type);const j=`paste-copy-${E}`;t.openMutationTransaction(j,"Paste from copy"),F.map(ee=>{e.addComponent(ee),t.registerPostMutation(ee)}),t.closeMutationTransaction(j),e.sendComponentUpdate()}function de(E,F){if(e.getComponentDefinition(F).positionless)return-2;const j=e.getComponents(E,{includeBMC:!0,includeCMC:!1}).filter(ee=>ee.position!==-2);return j.length>0?Math.max(Math.max(...j.map(we=>we.position))+1,0):0}function ye(){var F,D;const E=t.getMutationTransactionsSnapshot();return{isUndoAvailable:!!E.undo,isRedoAvailable:!!E.redo,undoDesc:(F=E.undo)==null?void 0:F.desc,redoDesc:(D=E.redo)==null?void 0:D.desc}}function Ee(){const E=t.consumeUndoTransaction();E&&(Object.entries(E.mutations).forEach(([F,D])=>{if(D.jsonPre&&D.jsonPost){e.addComponent(JSON.parse(D.jsonPre));return}if(!D.jsonPre&&D.jsonPost){e.deleteComponent(F);return}if(D.jsonPre&&!D.jsonPost){e.addComponent(JSON.parse(D.jsonPre));return}}),e.sendComponentUpdate())}function ge(){const E=t.consumeRedoTransaction();E&&(Object.entries(E.mutations).forEach(([F,D])=>{if(D.jsonPre&&D.jsonPost){e.addComponent(JSON.parse(D.jsonPost));return}if(!D.jsonPre&&D.jsonPost){e.addComponent(JSON.parse(D.jsonPost));return}if(D.jsonPre&&!D.jsonPost){e.deleteComponent(F);return}}),e.sendComponentUpdate())}function pe(E,F,D){const j=e.getComponentById(E);if(!j)return;const ee=`edit-${E}-content-${F}`;t.openMutationTransaction(ee,"Edit property",!0),t.registerPreMutation(j),j.content[F]=D,t.registerPostMutation(j),t.closeMutationTransaction(ee),e.sendComponentUpdate()}function ue(E,F){const D=e.getComponentById(E);if(!D)return;const j=`add-${E}-out-${F.outId}-${F.toNodeId}`;t.openMutationTransaction(j,"Add out",!0),t.registerPreMutation(D),D.outs=[...D.outs??[],F],t.registerPostMutation(D),t.closeMutationTransaction(j),e.sendComponentUpdate()}function Ne(E,F){const D=e.getComponentById(E);if(!D)return;const j=`edit-${E}-out-${F.outId}-${F.toNodeId}`;t.openMutationTransaction(j,"Edit out",!0),t.registerPreMutation(D),D.outs=D.outs.filter(ee=>!(F.outId===ee.outId&&F.toNodeId===ee.toNodeId)),t.registerPostMutation(D),t.closeMutationTransaction(j),e.sendComponentUpdate()}function wt(E,F,D){const j=e.getComponentById(E);if(!j)return;const ee=`change-${E}-coordinates`;t.openMutationTransaction(ee,"Change coordinates",!0),t.registerPreMutation(j),j.x=Math.floor(F),j.y=Math.floor(D),t.registerPostMutation(j),t.closeMutationTransaction(ee),e.sendComponentUpdate()}function Je(E,F,D="",j=!1){const ee=e.getComponentById(E);if(!ee)return;const we=`change-visibility-${E}`;t.openMutationTransaction(we,"Change visibility",!0),t.registerPreMutation(ee),ee.visible==null&&(ee.visible={expression:!0,binding:"",reversed:!1}),typeof F=="boolean"?ee.visible.expression=F:F=="custom"&&(ee.visible={expression:"custom",binding:D,reversed:j}),t.registerPostMutation(ee),t.closeMutationTransaction(we),e.sendComponentUpdate()}function _t(E,F,D){const j=e.getComponentById(E);if(!j)return;let ee;if(D)ee=D;else{const Te=e.getComponentDefinition(j.type),L=Object.entries(Te.events).filter(([q,se])=>se.bindable).map(([q,se])=>q);ee=L==null?void 0:L[0]}if(!ee)return;const we=`change-binding-${E}`;t.openMutationTransaction(we,"Change binding",!0),t.registerPreMutation(j),F?j.binding={eventType:ee,stateRef:F}:delete j.binding,t.registerPostMutation(j),t.closeMutationTransaction(we),e.sendComponentUpdate()}function xe(E,F,D){const j=e.getComponentById(E);if(!j)return;const ee=`set-handler-${E}`;t.openMutationTransaction(ee,"Set event handler",!0),t.registerPreMutation(j),D?(j.handlers||(j.handlers={}),j.handlers[F]=D):(delete j.handlers[F],Object.keys(j.handlers).length==0&&delete j.handlers),t.registerPostMutation(j),t.closeMutationTransaction(ee),e.sendComponentUpdate()}function je(E){const F=e.getComponentById(E);return!F||F.type=="root"?null:F.type=="page"||F.type=="workflows_workflow"?E:je(F.parentId)}async function st(E){var j;const F=e.getComponentById(E);(j=e.getComponentDefinition(F.type))!=null&&j.name&&e.setActivePageId(je(E))}return{moveComponent:r,moveComponentUp:o,moveComponentDown:a,cutComponent:z,copyComponent:re,pasteComponent:le,createAndInsertComponent:l,removeComponentSubtree:f,isPasteAllowed:_,undo:Ee,redo:ge,setContentValue:pe,addOut:ue,removeOut:Ne,changeCoordinates:wt,setVisibleValue:Je,setBinding:_t,getUndoRedoSnapshot:ye,setHandlerValue:xe,isAddAllowed:S,isCopyAllowed:A,isCutAllowed:y,isDeleteAllowed:$,isGoToParentAllowed:x,isDraggingAllowed:C,getEnabledMoves:b,goToParent:g,goToComponentParentPage:st}}const Fk=30,Bk=/^application\/json;writer=(?<componentType>\w+),(?<componentId>[\w\-]*)$/,Ka=X(null),Gn=X(null),Zr=X(!1);let Fi=null,es=null;function Vk(e){function t(y){var g;const $=y.dataTransfer.types[0],x=(g=$==null?void 0:$.match(Bk))==null?void 0:g.groups;if(x)return{draggedType:x.componentType,draggedId:x.componentId}}function n(y){const g=(y.closest("[data-writer-cage]")??y).closest("[data-writer-id]");if(g)return g.dataset.writerId}function o(y){const $=t(y);if(!$)return;const{draggedType:x,draggedId:g}=$,p=n(y.target);if(!r(p,g,x))return;const b={draggedType:x,draggedId:g,parentId:Ka.value,position:es};return A(y),b}function a(y,$,x){const g=e.getComponentById(y);if(!g)return!1;const p=e.getContainableTypes(y);return!(g!=null&&g.isCodeManaged)&&!e.isChildOf($,y)&&p.includes(x)}function r(y,$,x){const g=e.getComponentById(y);if(g)return a(y,$,x)?y:g.parentId?r(g.parentId,$,x):null}function s(y){if(Zr.value){c(y);return}l(y)}function l(y){const $=t(y);if(!$)return;const{draggedType:x,draggedId:g}=$,p=y.target,_=n(p),b=r(_,g,x);if(!b||b==g)return;const W=p.closest(`[data-writer-id="${b}"]`).dataset.writerInstancePath;if(y.preventDefault(),Gn.value!==W)Fi=Date.now();else if(Date.now()-Fi>=c0){Zr.value=!0,v(Gn.value);return}Ka.value=b,Gn.value=W}function c(y){const $=t(y);if(!$)return;y.preventDefault();const x=document.querySelector(`[data-writer-instance-path="${Gn.value}"]`);if(f(y.clientX,y.clientY,x)>Fk){A(y);return}const g=d(Gn.value);if(g.length==0)return;const p=h(y.clientX,y.clientY,g);if(!p)return;const{el:_}=p,{draggedId:b}=$,z=parseInt(_.dataset.writerPosition),W=e.getComponentById(b);if(g.map(re=>{re.classList.contains("highlighted")&&re.classList.remove("highlighted")}),!_.classList.contains("highlighted")){if(_.classList.add("highlighted"),W&&W.parentId==Ka.value&&z>W.position){es=z-1;return}es=z}}function d(y){const $=S(y);return Array.from($.querySelectorAll("[data-writer-position]"))}function h(y,$,x){const g=x.map(p=>({el:p,distance:f(y,$,p)})).sort((p,_)=>p.distance>_.distance?1:-1);return g==null?void 0:g[0]}function f(y,$,x){const{top:g,left:p,right:_,bottom:b}=x.getBoundingClientRect(),z=Math.max(p-y,0,y-_),W=Math.max(g-$,0,$-b);return Math.sqrt(z*z+W*W)}function v(y){S(y).classList.add("crackedContainer")}function C(y){S(y).classList.remove("crackedContainer")}function S(y){const $=document.querySelector(`[data-writer-instance-path="${y}"]`);if($.hasAttribute("data-writer-container"))return $;const x=$.querySelectorAll("[data-writer-container]");for(let g=0;g<x.length;g++){const p=x[g];if(p.closest("[data-writer-instance-path]")==$)return p}}function A(y){y.preventDefault(),Gn.value&&(C(Gn.value),Gn.value=null),Ka.value=null,Fi=null,es=null,Zr.value=!1}return{candidateId:Ka,candidateInstancePath:Gn,isParentSuitable:a,isCandidacyConfirmed:Zr,getComponentInfoFromDrag:t,dropComponent:o,assignInsertionCandidacy:s,removeInsertionCandidacy:A}}const Uk=["d"],Hk=["d"],jk=["cx","cy"],zk=["x1","y1","x2","y2","stroke"],Wk=["x1","y1","x2","y2","stroke"],Ga=30,Kk=Ae({__name:"WorkflowArrow",props:{arrow:{},isSelected:{type:Boolean},isEngaged:{type:Boolean}},emits:["delete"],setup(e,{emit:t}){const n=t,o=e,a=Z(()=>{const l=o.arrow.x2-o.arrow.x1,c=o.arrow.y2-o.arrow.y1;return[{x:o.arrow.x1,y:o.arrow.y1},{x:o.arrow.x1+Ga,y:o.arrow.y1},{x:o.arrow.x1+Ga,y:o.arrow.y1+c*.25},{x:o.arrow.x1+l*.5,y:o.arrow.y1+c*.5},{x:o.arrow.x2-Ga,y:o.arrow.y1+c*.75},{x:o.arrow.x2-Ga,y:o.arrow.y2},{x:o.arrow.x2,y:o.arrow.y2}]}),r=Z(()=>{const l=o.arrow.x2-o.arrow.x1,c=a.value;let d;return l>Ga?(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)=>(w(),O("g",{class:nt(["WorkflowArrow",{engaged:l.isEngaged}]),tabindex:"0","data-writer-unselectable":"true"},[U("path",{d:r.value,style:at({stroke:l.arrow.color})},null,12,Uk),U("path",{d:r.value,style:at({stroke:l.arrow.color,strokeWidth:12,opacity:l.isSelected?"0.2":"0"})},null,12,Hk),l.isSelected?(w(),O("g",{key:0,class:"delete",tabindex:"0","aria-label":"Delete relation",onClick:s,onKeydown:Go(s,["enter"])},[U("circle",{cx:a.value[3].x,cy:a.value[3].y,r:"12"},null,8,jk),U("line",{class:"cross",x1:a.value[3].x-4,y1:a.value[3].y-4,x2:a.value[3].x+4,y2:a.value[3].y+4,stroke:l.arrow.color,"stroke-width":"2"},null,8,zk),U("line",{class:"cross",x1:a.value[3].x+4,y1:a.value[3].y-4,x2:a.value[3].x-4,y2:a.value[3].y+4,stroke:l.arrow.color,"stroke-width":"2"},null,8,Wk)],32)):Ce("",!0)],2))}}),yd=Ie(Kk,[["__scopeId","data-v-c436de5e"]]),Gk=Ae({__name:"WorkflowMiniMap",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset"],setup(e,{emit:t}){Zo(x=>({"3eaf45e3":`${c.value.width}px`,"4d15f240":`${c.value.height}px`,"2d1ab437":d.value.isDisplayed?"":"none"}));const n=G(Y.builderManager),o=X(null),a=t,r=new ResizeObserver(C),s=new MutationObserver(C),l=X(.2),c=X({width:166,height:100}),d=X({width:230,height:1,top:0,left:0,isDisplayed:!1}),h=X({width:1,height:1,top:0,left:0}),f=e,v=X([]);function C(){if(!f.nodeContainerEl)return;const x=Array.from(f.nodeContainerEl.querySelectorAll("[data-writer-id]")),g=f.nodeContainerEl.getBoundingClientRect();let p=0,_=0;v.value=x.map(b=>{const z=b.getBoundingClientRect();return p=Math.max(p,z.right+f.renderOffset.x*f.zoomLevel-g.left),_=Math.max(_,z.bottom+f.renderOffset.y*f.zoomLevel-g.top),{id:b.dataset.writerId,width:z.width,height:z.height,top:z.top+f.renderOffset.y*f.zoomLevel-g.top,left:z.left+f.renderOffset.x*f.zoomLevel-g.left}}),c.value={width:230,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/(_+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(x){const g=f.nodeContainerEl.getBoundingClientRect(),p=o.value.getBoundingClientRect();d.value={...d.value,top:Math.min(Math.max(0,(x.pageY-p.top)*(1/l.value)-g.height/2),p.height*(1/l.value)-g.height),left:Math.min(Math.max(0,(x.pageX-p.left)*(1/l.value)-g.width/2),p.width*(1/l.value)-g.width)}}function A(){d.value.isDisplayed=!0}function y(){d.value.isDisplayed=!1}function $(x){x.stopPropagation(),n.setSelection(null),a("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 fn(),C()}),Ln(()=>{r.disconnect(),s.disconnect()}),(x,g)=>(w(),O("div",{ref_key:"rootEl",ref:o,class:"WorkflowMiniMap",onMouseenter:A,onMouseleave:y,onMousemove:S,onClick:$},[U("div",{class:"selectedArea",style:at({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:at({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),(w(!0),O(Me,null,ft(v.value,p=>(w(),O("div",{key:p.id,class:nt(["node",{selected:k(n).getSelectedId()==p.id}]),style:at({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))}}),Yk=Ie(Gk,[["__scopeId","data-v-eeba1b40"]]);function Jk(){var t;return((t=navigator==null?void 0:navigator.userAgentData)==null?void 0:t.platform)||(navigator==null?void 0:navigator.platform)}function _d(){return Zp()?"⌘ ":"Ctrl+"}function Xp(e){return Zp()?e.metaKey:e.ctrlKey}function Zp(){return Jk().toLowerCase().indexOf("mac")!=-1}const Hs=e=>(Rt("data-v-5d65a602"),e=e(),Dt(),e),Qk={class:"bar"},qk={class:"zoomer"},Xk=Hs(()=>U("i",{class:"material-symbols-outlined"},"remove",-1)),Zk=Hs(()=>U("i",{class:"material-symbols-outlined"},"add",-1)),e2=Hs(()=>U("i",{class:"material-symbols-outlined"},"undo",-1)),t2={class:"miniMapCollapser"},n2=Hs(()=>U("i",{class:"material-symbols-outlined"},"close_fullscreen",-1)),bd=.01,ts=.2,o2=Ae({__name:"WorkflowNavigator",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset","changeZoomLevel","resetZoom"],setup(e,{emit:t}){const n=e,{zoomLevel:o}=wl(n),a=X(null),r=t,s=X(!0),l=X(c(o.value));function c($){return`${Math.floor($*100)}%`}function d(){s.value=!s.value}function h($){r("changeRenderOffset",$)}function f(){const $=o.value+ts;r("changeZoomLevel",$)}function v(){const $=o.value-ts;r("changeZoomLevel",$)}function C($){const x=$.key;let g=o.value;if(x=="ArrowUp")g+=bd;else if(x=="ArrowDown")g-=bd;else return;r("changeZoomLevel",g)}function S($){var p;const x=(p=$.target)==null?void 0:p.value;let g=parseInt(x)/100;isNaN(g)&&(g=1),l.value=c(g),r("changeZoomLevel",g)}function A(){r("resetZoom")}Be(o,$=>{l.value=c($)});function y($){if(Xp($)===!1)return;let x=o.value;if($.key=="+"||$.key=="=")$.preventDefault(),x+=ts;else if($.key=="-")$.preventDefault(),x-=ts;else return;r("changeZoomLevel",x)}return Ft(()=>{document.addEventListener("keydown",y)}),Ln(()=>{document.removeEventListener("keydown",y)}),($,x)=>(w(),O("div",{ref_key:"rootEl",ref:a,"data-writer-unselectable":"true",class:"WorkflowNavigator",onKeydown:y},[$.nodeContainerEl&&s.value?(w(),Re(Yk,{key:0,"node-container-el":$.nodeContainerEl,"render-offset":$.renderOffset,"zoom-level":k(o),class:"miniMap",onChangeRenderOffset:h},null,8,["node-container-el","render-offset","zoom-level"])):Ce("",!0),U("div",Qk,[U("div",qk,[Ve(Qn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":k(o)>k(Lo).minLevel?`Zoom out (${k(_d)()}-)`:"Can't zoom further","data-writer-tooltip-placement":"left",onClick:v},{default:ze(()=>[Xk]),_:1},8,["data-writer-tooltip"]),Ve(_p,{modelValue:l.value,"onUpdate:modelValue":x[0]||(x[0]=g=>l.value=g),class:"zoomLevelInput",onKeydown:C,onChange:S},null,8,["modelValue"]),Ve(Qn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":k(o)<k(Lo).maxLevel?`Zoom in (${k(_d)()}+)`:"Can't zoom further","data-writer-tooltip-placement":"right",onClick:f},{default:ze(()=>[Zk]),_:1},8,["data-writer-tooltip"]),Ve(Qn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Reset zoom","data-writer-tooltip-placement":"right",onClick:A},{default:ze(()=>[e2]),_:1})]),U("div",t2,[Ve(Qn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":s.value?"Close minimap":"Open minimap","data-writer-tooltip-placement":"right",onClick:d},{default:ze(()=>[n2]),_:1},8,["data-writer-tooltip"])])])],544))}}),a2=Ie(o2,[["__scopeId","data-v-5d65a602"]]),r2=e=>(Rt("data-v-f8a82b75"),e=e(),Dt(),e),s2=["data-writer-unselectable"],i2={class:"workflowsToolbar"},l2=r2(()=>U("i",{class:"material-symbols-outlined"},"play_arrow",-1)),c2="A container component representing a single workflow within the application.",u2={writer:{name:"Workflow",toolkit:"workflows",category:"Root",description:c2,allowedChildrenTypes:["*"],allowedParentTypes:["workflows_root"],fields:{key:{name:"Workflow key",desc:"Unique identifier. It's needed to enable navigation to this Workflow.",type:P.IdKey}}}},Lo={minLevel:.2,maxLevel:1,step:.25,initialLevel:1},d2=Ae({...u2,__name:"WorkflowsWorkflow",setup(e){Zo(R=>({"6ea05978":v.value}));const t=G(Y.renderProxiedComponent),n=G(Y.instancePath),o=G(Y.componentId),a=X(null),r=X(null),s=G(Y.core),l=G(Y.builderManager),c=X([]),d=X({x:0,y:0}),h=X(!1),f=X(null),v=X(Lo.initialLevel),C=new MutationObserver(z),S=Z(()=>s.getComponents(o,{sortedByPosition:!0})),{createAndInsertComponent:A,addOut:y,removeOut:$,changeCoordinates:x}=qp(s,l),{getComponentInfoFromDrag:g}=Vk(s),p=X(null),_=X(null),b=X(null);function z(){const R=[];S.value.filter(J=>{var ne;return((ne=J.outs)==null?void 0:ne.length)>0}).forEach(J=>{const ne=J.id;J.outs.forEach(Q=>{const oe=ue(ne,Q.outId,void 0,Q.toNodeId);oe&&R.push(oe)})}),c.value=R}const W=Z(()=>{var R,J;return p.value===null&&!((R=_.value)!=null&&R.isPerfected)&&!((J=b.value)!=null&&J.isPerfected)?null:!0});function re(){f.value=null}async function le(){h.value||(h.value=!0,await s.forwardEvent(new CustomEvent("wf-builtin-run",{detail:{callback:()=>{h.value=!1}}}),n,!1))}function ce(R,J){Je();const Q=document.querySelector(`[data-writer-id="${J}"]`).getBoundingClientRect(),oe=(R.pageX-Q.x)*(1/v.value),te=(R.pageY-Q.y)*(1/v.value);_.value={nodeId:J,offset:{x:oe,y:te},isPerfected:!1}}function ie(R,J){p.value={fromNodeId:R,fromOutId:J}}function de(R){R.preventDefault(),R.stopPropagation()}function ye(R){const J=a.value.getBoundingClientRect(),ne=d.value.x+(R.pageX-J.x)*(1/v.value),Q=d.value.y+(R.pageY-J.y)*(1/v.value);return{x:ne,y:Q}}function Ee(R){R.preventDefault(),R.stopPropagation();const J=g(R);if(!J)return;const{draggedType:ne,draggedId:Q}=J;if(Q)return;const{x:oe,y:te}=ye(R);oe<0||te<0||F(ne,oe,te)}function ge(R,J){if(f.value==J){f.value=null;return}R.stopPropagation(),f.value=J,l.setSelection(null)}async function pe(R){if(!R.toNodeId)return;const J={outId:R.fromOutId,toNodeId:R.toNodeId};$(R.fromNodeId,J)}function ue(R,J,ne,Q){var Qe;let oe,te,me,$e;const Se=(Qe=a.value)==null?void 0:Qe.getBoundingClientRect();if(!Se)return;me=((ne==null?void 0:ne.x)-Se.x)*(1/v.value),$e=((ne==null?void 0:ne.y)-Se.y)*(1/v.value);const Ue=document.querySelector(`[data-writer-id="${R}"] [data-writer-socket-id="${J}"]`);if(!Ue)return;const Ge=Ue.getBoundingClientRect();if(oe=(Ge.x-Se.x+Ge.width/2)*(1/v.value),te=(Ge.y-Se.y+Ge.height/2)*(1/v.value),!!Ue){if(typeof Q<"u"){const pt=document.querySelector(`[data-writer-id="${Q}"]`).getBoundingClientRect();me=(pt.x-Se.x)*(1/v.value),$e=(pt.y-Se.y+pt.height/2)*(1/v.value)}return{x1:oe,y1:te,x2:me,y2:$e,color:getComputedStyle(Ue).backgroundColor,fromNodeId:R,fromOutId:J,toNodeId:Q}}}function Ne(R){const ne=R.target.closest(".WorkflowsWorkflow [data-writer-id]");return ne==null?void 0:ne.dataset.writerId}function wt(R){let J,ne;ne=Ne(R),typeof ne>"u"&&(J={x:R.pageX,y:R.pageY});const{fromNodeId:Q,fromOutId:oe}=p.value;ne!=Q&&(p.value.liveArrow=ue(Q,oe,J,ne))}function Je(){b.value=null,p.value=null,_.value=null}function _t(R){const{nodeId:J,offset:ne}=_.value;_.value.isPerfected=!0;const Q=s.getComponentById(J),{x:oe,y:te}=ye(R),me=oe-ne.x,$e=te-ne.y;Q.x==me&&Q.y==$e||(Q.x=me,Q.y=$e,setTimeout(()=>{Q.x===me&&Q.y===$e&&x(Q.id,me,$e)},200))}function xe(R){const J=a.value.getBoundingClientRect(),ne=R.pageX-J.x,Q=R.pageY-J.y,{x:oe,y:te}=b.value.offset;b.value.isPerfected=!0,b.value.offset={x:ne,y:Q},Te(d.value.x+(oe-ne)*1*(1/v.value),d.value.y+(te-Q)*1*(1/v.value))}function je(R){if(R.buttons==1){if(p.value){wt(R);return}if(_.value){_t(R);return}if(b.value){xe(R);return}}}function st(R){if(Je(),R.buttons!=1)return;const J=a.value.getBoundingClientRect(),ne=R.pageX-J.x,Q=R.pageY-J.y;b.value={offset:{x:ne,y:Q},isPerfected:!1}}async function E(R){if(p.value===null)return;const J=Ne(R);if(!J){p.value=null;return}const{fromNodeId:ne,fromOutId:Q}=p.value;if(ne==J){p.value=null;return}y(p.value.fromNodeId,{toNodeId:J,outId:Q})}function F(R,J,ne){A(R,o,void 0,{x:Math.floor(J),y:Math.floor(ne)})}function D(R){var me;const J=a.value.querySelector(`[data-writer-id="${R}"]`),ne=(me=a.value)==null?void 0:me.getBoundingClientRect();if(!J||!ne)return;const{width:Q,height:oe}=J.getBoundingClientRect(),te=s.getComponentById(R);te&&Te(te.x-ne.width/2+Q/2,te.y-ne.height/2+oe/2)}async function j(R){await Te(R.x,R.y)}function ee(R){v.value=Math.max(Math.min(Lo.maxLevel,R),Lo.minLevel)}function we(R){ee(R)}function Te(R,J){d.value={x:Math.max(0,R),y:Math.max(0,J)}}function T(R){Te(d.value.x+R.deltaX*(1/v.value),d.value.y+R.deltaY*(1/v.value))}function L(R){const J=.006666666666666667,ne=a.value.getBoundingClientRect(),Q=v.value;v.value=Math.min(Math.max(v.value-R.deltaY*J,Lo.minLevel),Lo.maxLevel);const oe={w:ne.width*(1/Q)*(1/v.value)*(v.value-Q),h:ne.height*(1/Q)*(1/v.value)*(v.value-Q)},te={x:(R.pageX-ne.x)/ne.width,y:(R.pageY-ne.y)/ne.height};Te(d.value.x+oe.w*te.x,d.value.y+oe.h*te.y)}async function q(R){if(R.preventDefault(),!R.ctrlKey&&!Xp(R)){T(R);return}L(R)}async function se(){const{width:J,height:ne,x:Q,y:oe}=a.value.getBoundingClientRect(),te=r.value.querySelectorAll("[data-writer-id]"),{maxX:me,maxY:$e}=Array.from(te).reduce((Ue,Ge)=>{const Qe=Ge.getBoundingClientRect();return{maxY:Math.max(Ue.maxY,(Qe.bottom-oe)*(1/v.value)+d.value.y),maxX:Math.max(Ue.maxX,(Qe.right-Q)*(1/v.value)+d.value.x)}},{maxY:0,maxX:0}),Se=Math.min((J-48)/me,(ne-48)/$e);ee(Se),Te(0,0)}return Be(()=>l.getSelection(),R=>{R&&(f.value=null,s.isChildOf(o,R.componentId)&&R.source!=="click"&&D(R.componentId))}),Ft(async()=>{var R;await se(),await fn(),z(),(R=a.value)==null||R.addEventListener("wheel",q),C.observe(r.value,{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0,characterData:!0})}),Ln(()=>{var R;(R=a.value)==null||R.removeEventListener("wheel",q),C.disconnect()}),(R,J)=>{var ne;return w(),O("div",{ref_key:"rootEl",ref:a,class:"WorkflowsWorkflow","data-writer-unselectable":W.value,onClick:re,onDragover:de,onDrop:Ee,onMousemove:je,onMousedown:st,onMouseup:E},[U("div",{ref_key:"nodeContainerEl",ref:r,class:"nodeContainer"},[(w(),O("svg",null,[(w(!0),O(Me,null,ft(c.value,(Q,oe)=>(w(),Re(yd,{key:oe,arrow:Q,"is-selected":f.value==oe,"is-engaged":f.value==oe||k(l).getSelectedId()==Q.fromNodeId||k(l).getSelectedId()==Q.toNodeId,onClick:te=>ge(te,oe),onDelete:te=>pe(Q)},null,8,["arrow","is-selected","is-engaged","onClick","onDelete"]))),128)),(ne=p.value)!=null&&ne.liveArrow?(w(),Re(yd,{key:"liveArrow",arrow:p.value.liveArrow,"is-selected":!1,"is-engaged":!0},null,8,["arrow"])):Ce("",!0)])),(w(!0),O(Me,null,ft(S.value,Q=>{var oe,te,me,$e;return w(),Re(hr(k(t)(Q.id,0)),{key:Q.id,style:at({top:`${Q.y-d.value.y}px`,left:`${Q.x-d.value.x}px`,"border-color":((te=(oe=p.value)==null?void 0:oe.liveArrow)==null?void 0:te.toNodeId)==Q.id?($e=(me=p.value)==null?void 0:me.liveArrow)==null?void 0:$e.color:void 0}),onMousedown:Ta(Se=>ce(Se,Q.id),["stop"]),onOutMousedown:Se=>ie(Q.id,Se)},null,40,["style","onMousedown","onOutMousedown"])}),128))],512),U("div",i2,[Ve(Qn,{variant:"secondary",size:"small","data-writer-unselectable":!0,"data-automation-action":"run-workflow",onClick:le},{default:ze(()=>[l2,yt(" "+be(h.value?"Running...":"Run workflow"),1)]),_:1})]),r.value?(w(),Re(a2,{key:0,"node-container-el":r.value,"render-offset":d.value,"zoom-level":v.value,class:"navigator",onChangeRenderOffset:j,onChangeZoomLevel:we,onResetZoom:se},null,8,["node-container-el","render-offset","zoom-level"])):Ce("",!0)],40,s2)}}}),f2=Ie(d2,[["__scopeId","data-v-f8a82b75"]]),p2={class:"alias"},h2=["contenteditable"],v2=Ae({__name:"WorkflowsNodeNamer",props:{componentId:{},blockName:{}},setup(e){const t=e,n=G(Y.core),o=G(Y.builderManager),{setContentValue:a}=qp(n,o),r=Z(()=>{var v;return(v=n.getComponentById(t.componentId))==null?void 0:v.content.alias}),s=Z(()=>!!r.value),l=X(null),c=X(!1);async function d(){if(c.value)return;c.value=!0,await fn();const v=l.value;v.focus();const C=document.createRange(),S=window.getSelection();C.setStart(v,v.childNodes.length),C.collapse(!0),S.removeAllRanges(),S.addRange(C)}function h(){const v=l.value.textContent;l.value.blur(),c.value=!1,a(t.componentId,"alias",v)}function f(v){c.value&&v.stopPropagation()}return(v,C)=>(w(),O("div",{class:nt(["WorkflowsNodeNamer",{beingEdited:c.value,hasEyebrow:s.value||c.value}]),"data-writer-unselectable":"true"},[U("div",{class:"blockName",onClick:d},be(v.blockName),1),U("div",p2,[s.value||c.value?(w(),O("div",{key:0,ref_key:"aliasEditorEl",ref:l,class:"aliasEditor",contenteditable:c.value,"data-writer-unselectable":"true",onClick:d,onMousemove:f,onBlur:h,onKeydown:Go(h,["enter"])},be(r.value),41,h2)):Ce("",!0)])],2))}}),m2=Ie(v2,[["__scopeId","data-v-c890df70"]]),g2={class:"WorkflowsNode"},y2={class:"title"},_2=["src"],b2=["data-writer-socket-id","onMousedownCapture"],A2={key:0},C2={class:"outputs"},w2=["data-writer-socket-id","onMousedownCapture"],I2={writer:{name:"Node",description:"A Workflows node.",toolkit:"workflows",category:"Other",fields:{alias:{name:"Alias",type:P.Text}},allowedParentTypes:["workflows_workflow"],previewField:"alias"}},x2=Ae({...I2,__name:"WorkflowsNode",emits:["outMousedown","engaged"],setup(e,{emit:t}){const n=t,o=G(Y.core),a=G(Y.builderManager),r=G(Y.componentId),s=G(Y.evaluatedFields),l=X(!1),c=Z(()=>o.getComponentById(r)),d=Z(()=>{var y;return o==null?void 0:o.getComponentDefinition((y=c.value)==null?void 0:y.type)}),h=Z(()=>a.getSelectedId()==r),f=Z(()=>{const y={};return Object.entries(d.value.outs).forEach(([$,x])=>{x.field||(y[$]=x)}),y});function v(y){const $=y.target;$.src=`./../../../../components/workflows_category_${d.value.category}.svg`,l.value=!0}function C(y){const x=d.value.fields[y].type==P.Tools,g=Object.keys(s[y].value??{});return x?g.filter(_=>{var b;return((b=s[y].value[_])==null?void 0:b.type)=="function"}):g}const S=Z(()=>{const y={};return Object.entries(d.value.outs).forEach(([$,x])=>{if(!x.field)return;y[x.field]={},C(x.field).forEach(p=>{y[x.field][`${$}_${p}`]={name:p,description:"Dynamically created",style:"dynamic"}})}),y});function A(y,$){y.stopPropagation(),n("outMousedown",$)}return Be(h,()=>{n("engaged")}),(y,$)=>(w(),O("div",g2,[U("div",y2,[U("img",{src:`./../../../../components/${c.value.type}.svg`,onError:$[0]||($[0]=x=>l.value?void 0:v(x))},null,40,_2),Ve(m2,{"component-id":k(r),class:"nodeNamer","block-name":d.value.name},null,8,["component-id","block-name"])]),Ce("",!0),(w(!0),O(Me,null,ft(S.value,(x,g)=>(w(),O("div",{key:g,class:"outputs"},[U("h4",null,be(d.value.fields[g].name),1),(w(!0),O(Me,null,ft(x,(p,_)=>(w(),O("div",{key:_,class:"output"},[yt(be(p.name)+" ",1),U("div",{class:nt(["ball",p.style]),"data-writer-socket-id":_,"data-writer-unselectable":!0,onClickCapture:$[1]||($[1]=Ta(()=>{},["stop"])),onMousedownCapture:b=>A(b,_)},null,42,b2)]))),128)),Object.keys(x).length==0?(w(),O("div",A2,"None configured.")):Ce("",!0)]))),128)),U("div",C2,[(w(!0),O(Me,null,ft(f.value,(x,g)=>(w(),O("div",{key:g,class:"output"},[yt(be(x.name)+" ",1),U("div",{class:nt(["ball",x.style]),"data-writer-socket-id":g,"data-writer-unselectable":!0,onClickCapture:$[2]||($[2]=Ta(()=>{},["stop"])),onMousedownCapture:p=>A(p,g)},null,42,w2)]))),128))])]))}}),T2=Ie(x2,[["__scopeId","data-v-f17b110f"]]),S2="The root component of the application, which serves as the starting point of the component hierarchy.",k2={writer:{name:"Workflows Root",toolkit:"workflows",category:"Root",description:S2,allowedChildrenTypes:["workflows_workflow"],fields:{}}},E2=Ae({...k2,__name:"WorkflowsRoot",setup(e){const t=G(Y.core),n=G(Y.getChildrenVNodes),o=X(null),a=Z(()=>{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)=>(w(),O("div",{ref_key:"rootEl",ref:o,class:"WorkflowsRoot","data-writer-container":""},[(w(!0),O(Me,null,ft(k(n)(),l=>(w(),O(Me,{key:l.key},[l.key===`${a.value}:0`?(w(),Re(hr(l),{key:0})):Ce("",!0)],64))),128))],512))}}),$2=Ie(E2,[["__scopeId","data-v-e736ec53"]]),Jl={root:Tk,page:mk,sidebar:tT,button:DT,text:DA,section:Hx,header:Px,heading:G0,dataframe:B0,html:Yp,pagination:cS,repeater:pS,column:Ix,columns:kx,tab:iT,tabs:hT,link:XA,horizontalstack:Fx,separator:Jx,image:oA,pdf:jS,iframe:ZS,googlemaps:ck,mapbox:Lk,icon:Q0,timer:yS,textinput:PI,textareainput:BI,numberinput:qw,sliderinput:CI,rangeinput:EI,colorinput:ew,dateinput:sw,timeinput:WI,radioinput:rI,checkboxinput:WC,dropdowninput:hw,selectinput:dI,multiselectinput:Kw,fileinput:Ew,webcamcapture:TS,vegalitechart:VA,plotlygraph:NA,metric:TA,message:yA,videoplayer:GA,chatbot:V1,step:xT,steps:NT,ratinginput:nx,tags:Z1,switchinput:dx,reuse:kS,avatar:lC,annotatedtext:vC,jsonviewer:LC,workflows_root:$2,workflows_workflow:f2},nr={};function M2(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:o}){return()=>_o("div",{"data-writer-container":"",style:{color:"var(--primaryTextColor)"}},[t,o.default({})])}}}function N2(e){var a,r;const t={workflows_node:T2},n=nr[e];if(!n)return;const o=n.baseType;return{...t[o],writer:{...t[o].writer,...nr[e].writer,fields:{...(a=t[o].writer)==null?void 0:a.fields,...(r=nr[e].writer)==null?void 0:r.fields}}}}function O2(e){return N2(e)??Jl[e]??M2(e)}function dr(e){var t;return(t=O2(e))==null?void 0:t.writer}function Ql(){return[...Object.keys(Jl),...Object.keys(nr)]}function eh(e,t){Jl[e]=t}function P2(e,t){nr[e]=t}function L2(e){let t=!1;return D2(e),Object.entries(e).forEach(([,n])=>{t=V2(n,e)||t,t=R2(n)||t}),t}function R2(e){const t=dr(e.type);if(!t||t.category=="Fallback")return console.error(`Component ${e.id} (${e.type}). Invalid component type.`),!1;let n=!1;return n=j2(e),n=H2(e)||n,F2(e,t),B2(e,t),n}function ll(e,t,n={}){n[e]=!0,Object.entries(t).filter(([,o])=>o.parentId===e).forEach(([o])=>ll(o,t,n))}function D2(e){const t=Object.fromEntries(Object.entries(e).map(([n])=>[n,!1]));ll("root",e,t),ll("workflows_root",e,t),Object.entries(t).forEach(([n,o])=>{o||console.warn(`Component ${n} (${e[n].type}). Orphan component.`)})}function F2(e,t){const n=Object.keys(t.fields??{});e.content&&Object.keys(e.content).forEach(o=>{n.includes(o)||console.warn(`Component ${e.id} (${e.type}). Field key "${o}" is defined in the component but not in the template.`)})}function B2(e,t){const n=Object.keys(t.events??{});if(!e.binding)return;const o=e.binding.eventType;n.includes(o)&&t.events[o].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 V2(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 o=Object.values(t).filter(s=>s.parentId===e.id&&s.position!==-2&&!s.isCodeManaged);let a=0;return o.forEach(s=>{a+=s.position}),(o.length-1)*o.length/2!==a&&(console.error(`Component ${e.id} (${e.type}). Invalid children positions. Automated fix will be applied.`),U2(o),n=!0),n}function U2(e){e.sort((t,n)=>t.position>n.position?1:-1),e.map((t,n)=>{t.position=n})}function H2(e){var n,o,a;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]}),(o=(n=e.binding)==null?void 0:n.eventType)!=null&&o.startsWith("ss-")){const s=`wf-${((a=e.binding)==null?void 0:a.eventType).substring(3)}`;e.binding.eventType=s,t=!0}return t}function j2(e,t){let n=!1;if(e.type=="column"){if("horizontalAlignment"in e.content){const o={left:"start",center:"center",right:"end"};e.content.contentHAlign=o[e.content.horizontalAlignment]||e.content.horizontalAlignment,delete e.content.horizontalAlignment,n=!0}if("verticalAlignment"in e.content){const o={normal:"unset",top:"start",center:"center",bottom:"end"};e.content.contentVAlign=o[e.content.verticalAlignment]||e.content.verticalAlignment,delete e.content.verticalAlignment,n=!0}}else if(e.type=="horizontalstack"){if("alignment"in e.content){const o={left:"start",center:"center",right:"end"};e.content.contentHAlign=o[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 z2(e){let t="";const n=[];let o=!1;for(let r=0;r<e.length;r++){const s=e[r];if(s==="."&&!o){n.push(t),t="";continue}t+=s,s==="\\"?o=!0:o=!1}return n.push(t),n.map(r=>r.replaceAll("\\.","."))}const W2="WriterCustomComponentTemplates";async function K2(e){await Promise.all(e.map(async t=>{const n=t.toLocaleLowerCase();n.endsWith(".js")?await G2(t):n.endsWith(".css")&&J2(t)}))}async function G2(e){var t;console.log(`Importing custom component templates at "${e}"...`),await Xt(()=>import(th()+e),[],import.meta.url),(t=Object.entries(window[W2]))==null||t.forEach(([n,o])=>{Y2(n)?(eh(`custom_${n}`,o),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 Y2(e){return/^[a-z0-9_]+$/.test(e)}function J2(e){const t=document.createElement("link");t.rel="stylesheet",t.href=th()+e,document.head.appendChild(t)}function th(){let e=window.location.pathname;return e.endsWith("/")||(e+="/"),`${e}extensions/`}function Q2(e,t){return typeof t=="bigint"?t.toString()+"n":t}const q2=1e3,X2=6e4;function Z2(){let e=null;const t=X(null),n=X(null),o=Al([]),a=X(null),r=X({}),s=X([]),l=X({});let c;const d=X("idle");let h=0;const f=X(new Map);let v=[];const C=[],S=X(null);async function A(){await y(),W("pageChange",E=>{_t(E)}),x(),n.value=="edit"}async function y(){const E=await fetch("./api/init",{method:"post",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({proposedSessionId:e})}),F=await E.json();if(E.status>400)throw"Connection rejected.";if(F.extensionPaths&&await K2(F.extensionPaths),n.value=F.mode,r.value=F.components,l.value=F.userState,z(F.mail),e=F.sessionId,t.value=new Date().getTime(),o.value=F.featureFlags,$(F.abstractTemplates),o.value.includes("dataframeEditor")){const j=await Xt(()=>import("./CoreDataframe-7e3c0sfj.js"),__vite__mapDeps([5,6]),import.meta.url).then(ee=>ee.default);eh("dataframe",j)}s.value=F.userFunctions,a.value=F.runCode,await b(),!(n.value!="edit"||!L2(F.components))&&await ue()}function $(E){Object.entries(E??{}).forEach(([F,D])=>{P2(F,D)})}function x(){setTimeout(()=>{Ee("keepAlive",{},x)},X2)}function g(E){E&&Object.entries(E).forEach(([F,D])=>{const j=F.charAt(0),ee=z2(F.substring(1)),we=ee.length-1;let Te=l.value;const T=j==="-";for(let L=0;L<we;L++){const q=Te==null?void 0:Te[ee[L]];typeof q=="object"&&q!==null?Te=q:T||(Te[ee[L]]={},Te=Te[ee[L]])}T?delete Te[ee.at(-1)]:Te[ee.at(-1)]=D})}function p(E){E&&(r.value=E)}function _(){f.value.forEach(({callback:E})=>{E==null||E({ok:!1})}),f.value.clear()}async function b(){if(c)return;const E=new URL("./api/stream",window.location.href);return E.protocol=E.protocol.replace("https","wss"),E.protocol=E.protocol.replace("http","ws"),c=new WebSocket(E.href),c.onopen=()=>{_(),d.value="connected",console.log("WebSocket connected. Initialising stream..."),Ee("streamInit",{sessionId:e})},c.onmessage=F=>{var ee,we,Te,T;const D=JSON.parse(F.data);if(D.messageType=="announcement"&&D.payload.announce=="codeUpdate"){c.close(),y();return}else(D.messageType=="eventResponse"||D.messageType=="stateEnquiryResponse")&&(g((ee=D.payload)==null?void 0:ee.mutations),z((we=D.payload)==null?void 0:we.mail),p((Te=D.payload)==null?void 0:Te.components));const j=f.value.get(D.trackingId);(T=j==null?void 0:j.callback)==null||T.call(j,{ok:!0,payload:D.payload}),f.value.delete(D.trackingId)},c.onclose=async F=>{if(c=null,d.value="offline",F.code==1008){console.error("Invalid session. Reinitialising..."),await y();return}console.error("WebSocket closed. Attempting to reconnect..."),setTimeout(async()=>{try{await b()}catch{console.error("Couldn't reconnect.")}},q2)},new Promise((F,D)=>{c.addEventListener("open",()=>F(),{once:!0}),c.addEventListener("close",()=>D(),{once:!0})})}function z(E=[]){v.push(...E),v=v.filter(F=>{const D=C.filter(j=>j.mailType==F.type);if(D.length==0)return F;D.forEach(j=>j.fn(F.payload))})}function W(E,F){C.push({mailType:E,fn:F}),z()}function re(E){var D;let F=null;if(E instanceof CustomEvent)F=((D=E.detail)==null?void 0:D.payload)??null;else{const j={};for(const ee in E){const we=E[ee];typeof we!="function"&&(we instanceof Object||(j[ee]=we))}F=j}return F}async function le(E,F,D){var Te;const j=D?re(E):null;let ee;E instanceof CustomEvent&&(ee=(Te=E.detail)==null?void 0:Te.callback),Ee("event",async()=>({type:E.type,instancePath:F,payload:await j}),ee,!0)}async function ce(E){const F={code:E};return new Promise((D,j)=>{Ee("codeSaveRequest",F,we=>{if(!we.ok){j("Couldn't connect to the server.");return}D()}),d.value="suspended"})}async function ie(E){const F={code:E};return new Promise((D,j)=>{Ee("codeUpdate",F,we=>{if(!we.ok){j("Couldn't connect to the server.");return}D()})})}async function de(E){Ee("stateEnquiry",{},E,!0)}function ye(E){const j=()=>{f.value.has(E)&&de(()=>setTimeout(j,150))};setTimeout(j,150)}async function Ee(E,F,D,j=!1){if(d.value=="offline"||d.value=="suspended"){D==null||D({ok:!1});return}const ee=h++;try{(D||j)&&f.value.set(ee,{callback:D}),j&&ye(ee);let we;typeof F=="function"?we=await F():we=F;const Te={type:E,trackingId:ee,payload:we};if(c.readyState!==c.OPEN)throw"Connection lost.";c.send(JSON.stringify(Te,Q2))}catch(we){console.error("sendFrontendMessage error",we),D==null||D({ok:!1})}}function ge(E){delete r.value[E]}function pe(E){r.value[E.id]=E}async function ue(){const E={};Object.entries(r.value).forEach(([D,j])=>{j.isCodeManaged||(E[D]=j)});const F={components:E};return new Promise((D,j)=>{Ee("componentUpdate",F,we=>{if(!we.ok){j("Couldn't connect to the server.");return}D()})})}function Ne(E){return r.value[E]}function wt(E,F){let D=r.value[F];do{if(D.parentId==E)return!0;D=r.value[D.parentId]}while(D);return!1}function Je(E,{includeBMC:F=!0,includeCMC:D=!0,sortedByPosition:j=!1}={}){let ee=Object.values(r.value);return typeof E<"u"&&(ee=ee.filter(we=>we.parentId==E)),ee=ee.filter(we=>{const Te=we.isCodeManaged;return F&&!Te||D&&Te}),j&&(ee=ee.sort((we,Te)=>we.isCodeManaged&&!Te.isCodeManaged?1:!we.isCodeManaged&&Te.isCodeManaged?-1:we.position>Te.position?1:-1)),ee}function _t(E){const D=Je("root").filter(j=>j.content.key==E);D.length!=0&&xe(D[0].id)}function xe(E){S.value=E}function je(E){return Yl(r.value,E)}return{webSocket:c,syncHealth:d,frontendMessageMap:$n(f),mode:$n(n),userFunctions:$n(s),addMailSubscription:W,init:A,forwardEvent:le,runCode:$n(a),sendCodeSaveRequest:ce,sendCodeUpdate:ie,sendComponentUpdate:ue,addComponent:pe,deleteComponent:ge,getComponentById:Ne,getComponents:Je,setActivePageId:xe,activePageId:$n(S),setActivePageFromKey:_t,getComponentDefinition:dr,getSupportedComponentTypes:Ql,getContainableTypes:je,sessionTimestamp:$n(t),userState:$n(l),isChildOf:wt,featureFlags:$n(o)}}function eE(e){e.directive("capture-tabs",{mounted:t=>{t.addEventListener("keydown",n=>{n.key=="Tab"&&(n.preventDefault(),t.setRangeText("  ",t.selectionStart,t.selectionStart,"end"))})}})}const Qa=Z2();globalThis.vue=Bb;globalThis.injectionKeys=Y;globalThis.core=Qa;async function tE(){await Qa.init();const e=Qa.mode.value,t=e=="edit"?f0():void 0;t&&Qa.addMailSubscription("logEntry",t.handleLogEntry),console.log(`Mounting app in mode ${e}...`);const{default:n}=e==="run"&&await Xt(()=>import("./ComponentRenderer-BeUjkGd8.js"),__vite__mapDeps([7,8,9]),import.meta.url),{default:o}=e==="edit"&&await Xt(()=>import("./BuilderApp-BudRb5tG.js").then(r=>r.b),__vite__mapDeps([10,11,12]),import.meta.url),a=lp(n||o);a.use(l0),a.provide(Y.core,Qa),a.provide(Y.builderManager,t),eE(a),a.mount("#app")}console.log("Initialising Writer Framework core...");tE().then(async()=>{console.log("Core initialised.")}).catch(e=>{console.error("Core initialisation failed.",e),document.write(e)});export{Vl as $,ka as A,Ul as B,It as C,at as D,bk as E,Me as F,oE as G,yk as H,Xt as I,Ce as J,wl as K,k as L,Fp as M,qp as N,Ln as O,fn as P,Cp as Q,_d as R,Xp as S,N_ as T,zi as U,Xd as V,Qn as W,Zo as X,Vk as Y,Zp as Z,Ie as _,Y as a,Q2 as a0,hr as a1,Al as a2,$n as a3,_p as a4,Mn as a5,P as a6,Oe as a7,St as a8,hn as a9,Wt as aa,Bt as ab,We as ac,H1 as ad,nE as ae,Df as af,jt as ag,rt as ah,U1 as ai,Sd as aj,jg as ak,fy as al,Xo as am,Ea as an,Co as ao,Go as ap,Ls as aq,Ta as ar,Bp as as,A1 as at,Ql as au,dr as av,c0 as aw,Ao as ax,Dl as ay,Re as b,Z as c,Ae as d,O as e,U as f,O2 as g,_o as h,G as i,ws as j,Ft as k,Ot as l,Ve as m,ze as n,w as o,Af as p,yt as q,X as r,ft as s,be as t,Us as u,rn as v,Be as w,nt as x,Rt as y,Dt as z};
