@milaboratories/graph-maker 1.1.90 → 1.1.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,7 +33,7 @@ function print() { __p += __j.call(arguments, '') }
33
33
  <rect x="3" y="3" width="18" height="18" rx="2" fill="#110529"/>
34
34
  <path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51724L10.3333 16.0875L6.45691 12.0172L7.54312 10.9828L10.3333 13.9125L16.4569 7.48276L17.5431 8.51724Z" fill="white"/>
35
35
  </svg>
36
- `,dse=["innerHTML"],Ase={class:"dropdown-list-item__title-container"},pse={class:"dropdown-list-item__title text-s"},hse={key:0,class:"dropdown-list-item__description text-description"},mse={key:1,class:"dropdown-list-item__icon flex-self-start"},vse=d.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(e){const t=e,n=d.computed(()=>{const i=[];return t.size==="small"&&i.push("dropdown-list-item__small"),t.isSelected&&i.push("dropdown-list-item__selected"),t.isHovered&&i.push("hovered-item"),i.join(" ")}),r=d.computed(()=>{const i=["dropdown-list-item__checkbox","flex-self-start"];return t.isSelected&&i.push("checked"),i.join(" ")}),a=d.computed(()=>t.isSelected?fse:cse);return(i,o)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass([n.value,"dropdown-list-item"])},[t.useCheckbox?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(r.value),innerHTML:a.value},null,10,dse)):d.createCommentVNode("",!0),o[1]||(o[1]=d.createTextVNode()),d.createElementVNode("div",Ase,[d.createElementVNode("div",pse,d.toDisplayString(i.option.label),1),o[0]||(o[0]=d.createTextVNode()),i.option.description?(d.openBlock(),d.createElementBlock("div",hse,d.toDisplayString(i.option.description),1)):d.createCommentVNode("",!0)]),o[2]||(o[2]=d.createTextVNode()),!t.useCheckbox&&t.isSelected?(d.openBlock(),d.createElementBlock("div",mse)):d.createCommentVNode("",!0)],2))}});function gse(e){return e()}function yse(e){let t=!1;return function(...n){t||(requestAnimationFrame(()=>{e(...n),t=!1}),t=!0)}}function wse(e){return new Promise(t=>setTimeout(t,e))}function Cse(e,t){const n=setTimeout(e,t);return()=>{clearTimeout(n)}}function bse(e){return function(t){return 1-e(1-t)}}function Ese(e){const{duration:t,draw:n,timing:r}=e,a=performance.now();let i=!1;return requestAnimationFrame(function o(s){let c=(s-a)/t;(c>1||i)&&(c=1);const f=r(c);n(f),c<1&&requestAnimationFrame(o)}),function(){i=!0}}function xse(e,t,n=!0){let r=0,a;return function(...i){a=()=>{e.apply(this,i),r=new Date().getTime()+t,a=null,n&&setTimeout(()=>{a==null||a()},t)},new Date().getTime()>r&&a()}}function GR(e){if(!Array.isArray(e))throw Error("Invalid component options: "+String(e));return e.map(t=>({label:"label"in t?t.label:t.text,value:t.value,description:t.description}))}function YR(e,t){const n=yse(()=>{if(e.value){const{scrollTop:r,scrollLeft:a,scrollHeight:i,scrollWidth:o,clientHeight:s,clientWidth:c}=document.documentElement,f=e.value.getBoundingClientRect();t({scrollTop:r,scrollLeft:a,scrollHeight:i,scrollWidth:o,clientHeight:s,clientWidth:c,offsetY:r+f.y,offsetX:a+f.x,top:f.top,right:f.right,bottom:f.bottom,left:f.left,width:f.width,height:f.height,x:f.x,y:f.y})}});d.onMounted(n),IC(window,"scroll",n,{capture:!0,passive:!0}),IC(window,"resize",n,{passive:!0}),IC(window,"adjust",n,!0)}const Sse=d.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(e){const t=e,n=d.computed(()=>t.size==="large"?"--mask-size: 24px":""),r=d.computed(()=>`mask-16 mask-${t.name}`);return(a,i)=>(d.openBlock(),d.createElementBlock("i",{style:d.normalizeStyle(n.value),class:d.normalizeClass([r.value,a.$style.icon])},null,6))}}),Bse="_icon_1ugxm_2",kse={icon:Bse},Tse={$style:kse},WR=J5(Sse,[["__cssModules",Tse]]),_se=d.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(e){const t=e,n=d.computed(()=>`mask-24 mask-${t.name}`);return(r,a)=>(d.openBlock(),d.createElementBlock("i",{class:d.normalizeClass([n.value,r.$style.icon])},null,2))}}),Pse="_icon_1ugxm_2",Mse={icon:Pse},Dse={$style:Mse},Hse=J5(_se,[["__cssModules",Dse]]);function Ise(e,t){const n=d.ref();return YR(e,r=>{n.value=r}),d.computed(()=>{const r=d.unref(n),a=d.unref(t),i=a.position??"top",o=a.gap??8;if(!r)return"";const s=r.offsetY+Math.floor(r.height/2),c=r.offsetX+Math.floor(r.width/2);return i==="top-left"?`left: ${r.offsetX}px; top: ${r.offsetY-o}px;`:i==="top"?`left: ${c}px; top: ${r.offsetY-o}px;`:i==="right"?`left: ${r.offsetX+r.width+o}px; top: ${s}px;`:i==="left"?`right: ${r.scrollWidth-r.x+o}px; top: ${s}px;`:i==="southwest"?`left: ${r.offsetX+r.width}px; top: ${r.offsetY+r.height+o}px;`:""})}function XR(e,t){return t(e)}function KR(e,t){if(e!=null)return t(e)}function Lse(e){return Array.isArray(e)?e:[e]}function Rse(e,t){IC(document,"click",n=>{document.contains(n.target)&&(Lse(e).map(r=>r.value).filter(r=>!!r).some(r=>r==null?void 0:r.contains(n.target))||t())})}const Nse={},$se={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fse(e,t){return d.openBlock(),d.createElementBlock("svg",$se,t[0]||(t[0]=[d.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const Vse=J5(Nse,[["render",Fse]]),LS=new Map,Ose={name:"PlTooltip"},Qse=d.defineComponent({...Ose,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"},maxWidth:{default:"300px"}},emits:["tooltip:close"],setup(e,{emit:t}){const n=t,r=Symbol(),a=e,i=d.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});LS.set(r,()=>f()),d.watch(()=>i.open,x=>{requestAnimationFrame(()=>{i.tooltipOpen=x})});let o=()=>{};const s=xse(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),c=()=>{i.open=!0;for(const[x,k]of LS.entries())x!==r&&k()},f=()=>{i.open=!1,n("tooltip:close")},A=async()=>{a.hide||(s(),i.over=!0,o(),await wse(100),i.over&&c())},h=()=>{i.over=!1,o=Cse(()=>{i.over||f()},a.closeDelay)};d.watch(()=>a.hide,x=>{x&&f()});const m=d.ref(),g=d.ref(),b=Ise(m,d.toRef(a));Rse([m,g],()=>f());const C=d.computed(()=>({"--pl-tooltip-max-width":a.maxWidth}));return d.onUnmounted(()=>{LS.delete(r)}),(x,k)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.element),d.mergeProps(x.$attrs,{ref_key:"rootRef",ref:m,onClick:A,onMouseover:A,onMouseleave:h}),{default:d.withCtx(()=>[d.renderSlot(x.$slots,"default"),k[1]||(k[1]=d.createTextVNode()),x.$slots.tooltip&&i.open?(d.openBlock(),d.createBlock(d.Teleport,{key:0,to:"body"},[d.createVNode(d.Transition,{name:"tooltip-transition"},{default:d.withCtx(()=>[i.tooltipOpen?(d.openBlock(),d.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:d.normalizeStyle(d.unref(b))},[d.createElementVNode("div",{ref_key:"tooltip",ref:g,class:d.normalizeClass(["pl-tooltip",x.position]),style:d.normalizeStyle(C.value),onMouseover:A,onMouseleave:h},[d.createElementVNode("div",null,[d.renderSlot(x.$slots,"tooltip")]),k[0]||(k[0]=d.createTextVNode()),d.createVNode(Vse)],38)],4)):d.createCommentVNode("",!0)]),_:3})])):d.createCommentVNode("",!0)]),_:3},16))}}),zse={inheritAttrs:!1},Use={class:"double-contour"};function jse(e,t,n,r,a,i){return d.openBlock(),d.createElementBlock("div",Use,[d.createElementVNode("div",d.normalizeProps(d.guardReactiveProps(e.$attrs)),[d.renderSlot(e.$slots,"default")],16)])}const Gse=J5(zse,[["render",jse]]);function Yse(e){d.onMounted(e),d.onUpdated(e)}const RS=new WeakMap,NS=new ResizeObserver(e=>{for(const t of e)KR(RS.get(t.target),n=>n(t))});function Wse(e,t){RS.set(e,t),NS.unobserve(e),NS.observe(e)}function Xse(e){NS.unobserve(e),RS.delete(e)}const Kse=8,ZR=4;function Zse(e,t="label"){const n=new Set;Yse(()=>{KR(e==null?void 0:e.value,r=>{const a=r.querySelector(t);a&&(n.add(a),Wse(a,()=>{const i=gse(()=>a.getBoundingClientRect().width+XR(Kse,o=>Number.isNaN(o)?ZR:o+ZR));r.style.getPropertyValue("--label-offset-right-x")!==`${i}px`&&r.style.setProperty("--label-offset-right-x",`${i}px`)}))})}),d.onBeforeUnmount(()=>{Array.from(n.values()).map(r=>Xse(r))})}const Jse=d.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(e){const t=e,n=d.computed(()=>t.size==="large"?"--icon-size: 24px":""),r=d.computed(()=>`icon-16 icon-${t.name}`);return(a,i)=>(d.openBlock(),d.createElementBlock("i",{style:d.normalizeStyle(n.value),class:d.normalizeClass([r.value,a.$style.icon])},null,6))}}),qse="_icon_1ugxm_2",eue={icon:qse},tue={$style:eue},q5=J5(Jse,[["__cssModules",tue]]);function JR(e){return e!==null&&typeof e=="object"}function Ky(e,t){return JR(e)&&JR(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(n=>Ky(e[n],t[n])):e===t}const nue=d.defineComponent({__name:"LongText",setup(e){d.useCssVars(A=>({"5deba9de":o.value}));const t=d.ref(!1),n=d.ref(),r=d.ref(!1),a=d.computed(()=>r.value&&t.value?"ui-lt-animate":""),i=tse(A=>r.value=A,500),o=d.computed(()=>{var A;return n.value?`${((A=n.value)==null?void 0:A.innerHTML.length)*.4}s`:"5s"});function s(){const A=jR(n.value,"span cannot be empty");t.value=A.clientWidth<A.scrollWidth}function c(){s(),i(!0)}function f(){i(!1)}return(A,h)=>(d.openBlock(),d.createElementBlock("div",d.mergeProps(A.$attrs,{class:"ui-lt-container"}),[d.createElementVNode("span",{onMouseover:c,onMouseleave:f},[d.createElementVNode("span",{ref_key:"span",ref:n,class:d.normalizeClass(a.value)},[d.renderSlot(A.$slots,"default")],2)],32)],16))}});function rue(e,t){const n=e.scrollTop,r=e.getBoundingClientRect().height,a=t.offsetTop,i=t.getBoundingClientRect().height;return a+i<r+n&&a>n}function aue(e,t){const n=e.scrollTop,r=e.getBoundingClientRect().height,a=t.offsetTop,i=t.getBoundingClientRect().height;return a+i<r+n?"ceil":a>n?"floor":"visible"}function iue(e,t,n={}){const r=e.scrollTop,a=e.getBoundingClientRect().height,i=t.getBoundingClientRect().height,o=t.offsetTop,s=aue(e,t);if(s==="visible")return;const c=f=>{const A=s==="floor"?o-(a-i):o;e.scrollTop=r+f*(A-r)};rue(e,t)||Ese({duration:n.duration||100,timing:bse(f=>f),draw:c})}const oue=d.defineComponent({__name:"DropdownOverlay",props:{root:{},gap:{}},setup(e,{expose:t}){const n=e,r=d.reactive({optionsHeight:0}),a=d.reactive({top:"0px",left:"0px",width:"0px"}),i=d.toRef(n,"root"),o=d.ref();return t({scrollIntoActive:()=>{const s=o.value;s&&ese(s.querySelector(".hovered-item"),c=>{iue(s,c)})},listRef:o}),d.watch(o,s=>{s&&requestAnimationFrame(()=>{const c=s.getBoundingClientRect();r.optionsHeight=c.height,window.dispatchEvent(new CustomEvent("adjust"))})}),YR(i,s=>{const c=document.body.getBoundingClientRect(),f=s.top-c.top,A=s.left-c.left,h=n.gap??0,m=f+s.height+h;m+r.optionsHeight>s.clientHeight?a.top=f-r.optionsHeight-h+"px":a.top=m+"px",a.left=A+"px",a.width=s.width+"px"}),(s,c)=>(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[d.createElementVNode("div",d.mergeProps({ref_key:"listRef",ref:o},s.$attrs,{style:a,tabindex:"-1"}),[d.renderSlot(s.$slots,"default",{ref:"list"})],16)]))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const qR=()=>{};function lue(e,t){function n(...r){return new Promise((a,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(a).catch(i)})}return n}function sue(e,t={}){let n,r,a=qR;const i=o=>{clearTimeout(o),a(),a=qR};return o=>{const s=d.toValue(e),c=d.toValue(t.maxWait);return n&&i(n),s<=0||c!==void 0&&c<=0?(r&&(i(r),r=null),Promise.resolve(o())):new Promise((f,A)=>{a=t.rejectOnCancel?A:f,c&&!r&&(r=setTimeout(()=>{n&&i(n),r=null,f(o())},c)),n=setTimeout(()=>{r&&i(r),r=null,f(o())},s)})}}function uue(e,t=200,n={}){return lue(sue(t,n),e)}function cue(e,t=200,n={}){const r=d.ref(e.value),a=uue(()=>{r.value=e.value},t,n);return d.watch(e,()=>a()),r}var Oi;(function(e){e.assertEqual=a=>a;function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(s=>typeof a[a[s]]!="number"),o={};for(const s of i)o[s]=a[s];return e.objectValues(o)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},e.find=(a,i)=>{for(const o of a)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Oi||(Oi={}));var $S;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})($S||($S={}));const Nn=Oi.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),rm=e=>{switch(typeof e){case"undefined":return Nn.undefined;case"string":return Nn.string;case"number":return isNaN(e)?Nn.nan:Nn.number;case"boolean":return Nn.boolean;case"function":return Nn.function;case"bigint":return Nn.bigint;case"symbol":return Nn.symbol;case"object":return Array.isArray(e)?Nn.array:e===null?Nn.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Nn.promise:typeof Map<"u"&&e instanceof Map?Nn.map:typeof Set<"u"&&e instanceof Set?Nn.set:typeof Date<"u"&&e instanceof Date?Nn.date:Nn.object;default:return Nn.unknown}},an=Oi.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),fue=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let Rp=class Nee extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,c=0;for(;c<o.path.length;){const f=o.path[c];c===o.path.length-1?(s[f]=s[f]||{_errors:[]},s[f]._errors.push(n(o))):s[f]=s[f]||{_errors:[]},s=s[f],c++}}};return a(this),r}static assert(t){if(!(t instanceof Nee))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oi.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Rp.create=e=>new Rp(e);const Zy=(e,t)=>{let n;switch(e.code){case an.invalid_type:e.received===Nn.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case an.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Oi.jsonStringifyReplacer)}`;break;case an.unrecognized_keys:n=`Unrecognized key(s) in object: ${Oi.joinValues(e.keys,", ")}`;break;case an.invalid_union:n="Invalid input";break;case an.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Oi.joinValues(e.options)}`;break;case an.invalid_enum_value:n=`Invalid enum value. Expected ${Oi.joinValues(e.options)}, received '${e.received}'`;break;case an.invalid_arguments:n="Invalid function arguments";break;case an.invalid_return_type:n="Invalid function return type";break;case an.invalid_date:n="Invalid date";break;case an.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Oi.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case an.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case an.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case an.custom:n="Invalid input";break;case an.invalid_intersection_types:n="Intersection results could not be merged";break;case an.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case an.not_finite:n="Number must be finite";break;default:n=t.defaultError,Oi.assertNever(e)}return{message:n}};let eN=Zy;function due(e){eN=e}function LC(){return eN}const RC=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let s="";const c=r.filter(f=>!!f).slice().reverse();for(const f of c)s=f(o,{data:t,defaultError:s}).message;return{...a,path:i,message:s}},Aue=[];function Mn(e,t){const n=LC(),r=RC({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Zy?void 0:Zy].filter(a=>!!a)});e.common.issues.push(r)}class ff{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return Aa;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const i=await a.key,o=await a.value;r.push({key:i,value:o})}return ff.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return Aa;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const Aa=Object.freeze({status:"aborted"}),NC=e=>({status:"dirty",value:e}),Of=e=>({status:"valid",value:e}),FS=e=>e.status==="aborted",VS=e=>e.status==="dirty",e7=e=>e.status==="valid",t7=e=>typeof Promise<"u"&&e instanceof Promise;function $C(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function tN(e,t,n,r,a){if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var vr;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(vr||(vr={}));var n7,r7;let L0=class{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const nN=(e,t)=>{if(e7(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Rp(e.common.issues);return this._error=n,this._error}}};function Ha(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(i,o)=>{var s,c;const{message:f}=e;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:(s=f??r)!==null&&s!==void 0?s:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(c=f??n)!==null&&c!==void 0?c:o.defaultError}},description:a}}let Ka=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return rm(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:rm(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ff,ctx:{common:t.parent.common,data:t.data,parsedType:rm(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(t7(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const a={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rm(t)},i=this._parseSync({data:t,path:a.path,parent:a});return nN(a,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rm(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(t7(a)?a:Promise.resolve(a));return nN(r,i)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const o=t(a),s=()=>i.addIssue({code:an.custom,...r(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new $p({schema:this,typeName:ta.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return R0.create(this,this._def)}nullable(){return lm.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Uv.create(this,this._def)}promise(){return t3.create(this,this._def)}or(t){return u7.create([this,t],this._def)}and(t){return c7.create(this,t,this._def)}transform(t){return new $p({...Ha(this._def),schema:this,typeName:ta.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new h7({...Ha(this._def),innerType:this,defaultValue:n,typeName:ta.ZodDefault})}brand(){return new zS({typeName:ta.ZodBranded,type:this,...Ha(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new m7({...Ha(this._def),innerType:this,catchValue:n,typeName:ta.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return US.create(this,t)}readonly(){return v7.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const pue=/^c[^\s-]{8,}$/i,hue=/^[0-9a-z]+$/,mue=/^[0-9A-HJKMNP-TV-Z]{26}$/,vue=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,gue=/^[a-z0-9_-]{21}$/i,yue=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wue=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Cue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let OS;const bue=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Eue=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,xue=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rN="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Sue=new RegExp(`^${rN}$`);function aN(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Bue(e){return new RegExp(`^${aN(e)}$`)}function iN(e){let t=`${rN}T${aN(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function kue(e,t){return!!((t==="v4"||!t)&&bue.test(e)||(t==="v6"||!t)&&Eue.test(e))}class Np extends Ka{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Nn.string){const a=this._getOrReturnCtx(t);return Mn(a,{code:an.invalid_type,expected:Nn.string,received:a.parsedType}),Aa}const n=new ff;let r;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const i=t.data.length>a.value,o=t.data.length<a.value;(i||o)&&(r=this._getOrReturnCtx(t,r),i?Mn(r,{code:an.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&Mn(r,{code:an.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")wue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"email",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")OS||(OS=new RegExp(Cue,"u")),OS.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"emoji",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")vue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"uuid",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")gue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"nanoid",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")pue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"cuid",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")hue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"cuid2",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")mue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"ulid",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),Mn(r,{validation:"url",code:an.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"regex",code:an.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?iN(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Sue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Bue(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?yue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"duration",code:an.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?kue(t.data,a.version)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"ip",code:an.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?xue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"base64",code:an.invalid_string,message:a.message}),n.dirty()):Oi.assertNever(a);return{status:n.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:an.invalid_string,...vr.errToObj(r)})}_addCheck(t){return new Np({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...vr.errToObj(t)})}url(t){return this._addCheck({kind:"url",...vr.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...vr.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...vr.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...vr.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...vr.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...vr.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...vr.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...vr.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...vr.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...vr.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...vr.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...vr.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...vr.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...vr.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...vr.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...vr.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...vr.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...vr.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...vr.errToObj(n)})}nonempty(t){return this.min(1,vr.errToObj(t))}trim(){return new Np({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Np({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Np({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Np.create=e=>{var t;return new Np({checks:[],typeName:ta.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ha(e)})};function Tue(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,i=parseInt(e.toFixed(a).replace(".","")),o=parseInt(t.toFixed(a).replace(".",""));return i%o/Math.pow(10,a)}let a7=class TI extends Ka{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Nn.number){const a=this._getOrReturnCtx(t);return Mn(a,{code:an.invalid_type,expected:Nn.number,received:a.parsedType}),Aa}let n;const r=new ff;for(const a of this._def.checks)a.kind==="int"?Oi.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="multipleOf"?Tue(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.not_finite,message:a.message}),r.dirty()):Oi.assertNever(a);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,vr.toString(n))}gt(t,n){return this.setLimit("min",t,!1,vr.toString(n))}lte(t,n){return this.setLimit("max",t,!0,vr.toString(n))}lt(t,n){return this.setLimit("max",t,!1,vr.toString(n))}setLimit(t,n,r,a){return new TI({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:vr.toString(a)}]})}_addCheck(t){return new TI({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:vr.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:vr.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:vr.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:vr.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:vr.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:vr.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:vr.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:vr.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:vr.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Oi.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};a7.create=e=>new a7({checks:[],typeName:ta.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ha(e)});class am extends Ka{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Nn.bigint){const a=this._getOrReturnCtx(t);return Mn(a,{code:an.invalid_type,expected:Nn.bigint,received:a.parsedType}),Aa}let n;const r=new ff;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):Oi.assertNever(a);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,vr.toString(n))}gt(t,n){return this.setLimit("min",t,!1,vr.toString(n))}lte(t,n){return this.setLimit("max",t,!0,vr.toString(n))}lt(t,n){return this.setLimit("max",t,!1,vr.toString(n))}setLimit(t,n,r,a){return new am({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:vr.toString(a)}]})}_addCheck(t){return new am({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:vr.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:vr.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:vr.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:vr.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:vr.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}am.create=e=>{var t;return new am({checks:[],typeName:ta.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ha(e)})};let i7=class extends Ka{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Nn.boolean){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.boolean,received:n.parsedType}),Aa}return Of(t.data)}};i7.create=e=>new i7({typeName:ta.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ha(e)});let o7=class $ee extends Ka{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Nn.date){const a=this._getOrReturnCtx(t);return Mn(a,{code:an.invalid_type,expected:Nn.date,received:a.parsedType}),Aa}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Mn(a,{code:an.invalid_date}),Aa}const n=new ff;let r;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):Oi.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new $ee({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:vr.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:vr.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};o7.create=e=>new o7({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ta.ZodDate,...Ha(e)});let FC=class extends Ka{_parse(t){if(this._getType(t)!==Nn.symbol){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.symbol,received:n.parsedType}),Aa}return Of(t.data)}};FC.create=e=>new FC({typeName:ta.ZodSymbol,...Ha(e)});class l7 extends Ka{_parse(t){if(this._getType(t)!==Nn.undefined){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.undefined,received:n.parsedType}),Aa}return Of(t.data)}}l7.create=e=>new l7({typeName:ta.ZodUndefined,...Ha(e)});class s7 extends Ka{_parse(t){if(this._getType(t)!==Nn.null){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.null,received:n.parsedType}),Aa}return Of(t.data)}}s7.create=e=>new s7({typeName:ta.ZodNull,...Ha(e)});let Jy=class extends Ka{constructor(){super(...arguments),this._any=!0}_parse(t){return Of(t.data)}};Jy.create=e=>new Jy({typeName:ta.ZodAny,...Ha(e)});class zv extends Ka{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Of(t.data)}}zv.create=e=>new zv({typeName:ta.ZodUnknown,...Ha(e)});class Fh extends Ka{_parse(t){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.never,received:n.parsedType}),Aa}}Fh.create=e=>new Fh({typeName:ta.ZodNever,...Ha(e)});let VC=class extends Ka{_parse(t){if(this._getType(t)!==Nn.undefined){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.void,received:n.parsedType}),Aa}return Of(t.data)}};VC.create=e=>new VC({typeName:ta.ZodVoid,...Ha(e)});let Uv=class zx extends Ka{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Nn.array)return Mn(n,{code:an.invalid_type,expected:Nn.array,received:n.parsedType}),Aa;if(a.exactLength!==null){const o=n.data.length>a.exactLength.value,s=n.data.length<a.exactLength.value;(o||s)&&(Mn(n,{code:o?an.too_big:an.too_small,minimum:s?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(Mn(n,{code:an.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(Mn(n,{code:an.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>a.type._parseAsync(new L0(n,o,n.path,s)))).then(o=>ff.mergeArray(r,o));const i=[...n.data].map((o,s)=>a.type._parseSync(new L0(n,o,n.path,s)));return ff.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new zx({...this._def,minLength:{value:t,message:vr.toString(n)}})}max(t,n){return new zx({...this._def,maxLength:{value:t,message:vr.toString(n)}})}length(t,n){return new zx({...this._def,exactLength:{value:t,message:vr.toString(n)}})}nonempty(t){return this.min(1,t)}};Uv.create=(e,t)=>new Uv({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ta.ZodArray,...Ha(t)});function qy(e){if(e instanceof VA){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=R0.create(qy(r))}return new VA({...e._def,shape:()=>t})}else return e instanceof Uv?new Uv({...e._def,type:qy(e.element)}):e instanceof R0?R0.create(qy(e.unwrap())):e instanceof lm?lm.create(qy(e.unwrap())):e instanceof om?om.create(e.items.map(t=>qy(t))):e}let VA=class B0 extends Ka{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Oi.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Nn.object){const c=this._getOrReturnCtx(t);return Mn(c,{code:an.invalid_type,expected:Nn.object,received:c.parsedType}),Aa}const{status:n,ctx:r}=this._processInputParams(t),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof Fh&&this._def.unknownKeys==="strip"))for(const c in r.data)i.includes(c)||o.push(c);const s=[];for(const c of i){const f=a[c],A=r.data[c];s.push({key:{status:"valid",value:c},value:f._parse(new L0(r,A,r.path,c)),alwaysSet:c in r.data})}if(this._def.catchall instanceof Fh){const c=this._def.unknownKeys;if(c==="passthrough")for(const f of o)s.push({key:{status:"valid",value:f},value:{status:"valid",value:r.data[f]}});else if(c==="strict")o.length>0&&(Mn(r,{code:an.unrecognized_keys,keys:o}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const f of o){const A=r.data[f];s.push({key:{status:"valid",value:f},value:c._parse(new L0(r,A,r.path,f)),alwaysSet:f in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const c=[];for(const f of s){const A=await f.key,h=await f.value;c.push({key:A,value:h,alwaysSet:f.alwaysSet})}return c}).then(c=>ff.mergeObjectSync(n,c)):ff.mergeObjectSync(n,s)}get shape(){return this._def.shape()}strict(t){return vr.errToObj,new B0({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,i,o,s;const c=(o=(i=(a=this._def).errorMap)===null||i===void 0?void 0:i.call(a,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=vr.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new B0({...this._def,unknownKeys:"strip"})}passthrough(){return new B0({...this._def,unknownKeys:"passthrough"})}extend(t){return new B0({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new B0({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ta.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new B0({...this._def,catchall:t})}pick(t){const n={};return Oi.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new B0({...this._def,shape:()=>n})}omit(t){const n={};return Oi.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new B0({...this._def,shape:()=>n})}deepPartial(){return qy(this)}partial(t){const n={};return Oi.objectKeys(this.shape).forEach(r=>{const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}),new B0({...this._def,shape:()=>n})}required(t){const n={};return Oi.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof R0;)a=a._def.innerType;n[r]=a}}),new B0({...this._def,shape:()=>n})}keyof(){return sN(Oi.objectKeys(this.shape))}};VA.create=(e,t)=>new VA({shape:()=>e,unknownKeys:"strip",catchall:Fh.create(),typeName:ta.ZodObject,...Ha(t)}),VA.strictCreate=(e,t)=>new VA({shape:()=>e,unknownKeys:"strict",catchall:Fh.create(),typeName:ta.ZodObject,...Ha(t)}),VA.lazycreate=(e,t)=>new VA({shape:e,unknownKeys:"strip",catchall:Fh.create(),typeName:ta.ZodObject,...Ha(t)});class u7 extends Ka{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=i.map(s=>new Rp(s.ctx.common.issues));return Mn(n,{code:an.invalid_union,unionErrors:o}),Aa}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const c of r){const f={...n,common:{...n.common,issues:[]},parent:null},A=c._parseSync({data:n.data,path:n.path,parent:f});if(A.status==="valid")return A;A.status==="dirty"&&!i&&(i={result:A,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(c=>new Rp(c));return Mn(n,{code:an.invalid_union,unionErrors:s}),Aa}}get options(){return this._def.options}}u7.create=(e,t)=>new u7({options:e,typeName:ta.ZodUnion,...Ha(t)});const im=e=>e instanceof f7?im(e.schema):e instanceof $p?im(e.innerType()):e instanceof d7?[e.value]:e instanceof A7?e.options:e instanceof p7?Oi.objectValues(e.enum):e instanceof h7?im(e._def.innerType):e instanceof l7?[void 0]:e instanceof s7?[null]:e instanceof R0?[void 0,...im(e.unwrap())]:e instanceof lm?[null,...im(e.unwrap())]:e instanceof zS||e instanceof v7?im(e.unwrap()):e instanceof m7?im(e._def.innerType):[];let oN=class Fee extends Ka{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Nn.object)return Mn(n,{code:an.invalid_type,expected:Nn.object,received:n.parsedType}),Aa;const r=this.discriminator,a=n.data[r],i=this.optionsMap.get(a);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(Mn(n,{code:an.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Aa)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const a=new Map;for(const i of n){const o=im(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(a.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);a.set(s,i)}}return new Fee({typeName:ta.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a,...Ha(r)})}};function QS(e,t){const n=rm(e),r=rm(t);if(e===t)return{valid:!0,data:e};if(n===Nn.object&&r===Nn.object){const a=Oi.objectKeys(t),i=Oi.objectKeys(e).filter(s=>a.indexOf(s)!==-1),o={...e,...t};for(const s of i){const c=QS(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(n===Nn.array&&r===Nn.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const o=e[i],s=t[i],c=QS(o,s);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else return n===Nn.date&&r===Nn.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class c7 extends Ka{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,o)=>{if(FS(i)||FS(o))return Aa;const s=QS(i.value,o.value);return s.valid?((VS(i)||VS(o))&&n.dirty(),{status:n.value,value:s.data}):(Mn(r,{code:an.invalid_intersection_types}),Aa)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}c7.create=(e,t,n)=>new c7({left:e,right:t,typeName:ta.ZodIntersection,...Ha(n)});let om=class Vee extends Ka{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Nn.array)return Mn(r,{code:an.invalid_type,expected:Nn.array,received:r.parsedType}),Aa;if(r.data.length<this._def.items.length)return Mn(r,{code:an.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Aa;!this._def.rest&&r.data.length>this._def.items.length&&(Mn(r,{code:an.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((i,o)=>{const s=this._def.items[o]||this._def.rest;return s?s._parse(new L0(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>ff.mergeArray(n,i)):ff.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new Vee({...this._def,rest:t})}};om.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new om({items:e,typeName:ta.ZodTuple,rest:null,...Ha(t)})};let lN=class _I extends Ka{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Nn.object)return Mn(r,{code:an.invalid_type,expected:Nn.object,received:r.parsedType}),Aa;const a=[],i=this._def.keyType,o=this._def.valueType;for(const s in r.data)a.push({key:i._parse(new L0(r,s,r.path,s)),value:o._parse(new L0(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?ff.mergeObjectAsync(n,a):ff.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ka?new _I({keyType:t,valueType:n,typeName:ta.ZodRecord,...Ha(r)}):new _I({keyType:Np.create(),valueType:t,typeName:ta.ZodRecord,...Ha(n)})}},OC=class extends Ka{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Nn.map)return Mn(r,{code:an.invalid_type,expected:Nn.map,received:r.parsedType}),Aa;const a=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([s,c],f)=>({key:a._parse(new L0(r,s,r.path,[f,"key"])),value:i._parse(new L0(r,c,r.path,[f,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const f=await c.key,A=await c.value;if(f.status==="aborted"||A.status==="aborted")return Aa;(f.status==="dirty"||A.status==="dirty")&&n.dirty(),s.set(f.value,A.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of o){const f=c.key,A=c.value;if(f.status==="aborted"||A.status==="aborted")return Aa;(f.status==="dirty"||A.status==="dirty")&&n.dirty(),s.set(f.value,A.value)}return{status:n.value,value:s}}}};OC.create=(e,t,n)=>new OC({valueType:t,keyType:e,typeName:ta.ZodMap,...Ha(n)});let QC=class PI extends Ka{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Nn.set)return Mn(r,{code:an.invalid_type,expected:Nn.set,received:r.parsedType}),Aa;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(Mn(r,{code:an.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(Mn(r,{code:an.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function o(c){const f=new Set;for(const A of c){if(A.status==="aborted")return Aa;A.status==="dirty"&&n.dirty(),f.add(A.value)}return{status:n.value,value:f}}const s=[...r.data.values()].map((c,f)=>i._parse(new L0(r,c,r.path,f)));return r.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,n){return new PI({...this._def,minSize:{value:t,message:vr.toString(n)}})}max(t,n){return new PI({...this._def,maxSize:{value:t,message:vr.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};QC.create=(e,t)=>new QC({valueType:e,minSize:null,maxSize:null,typeName:ta.ZodSet,...Ha(t)});class e3 extends Ka{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Nn.function)return Mn(n,{code:an.invalid_type,expected:Nn.function,received:n.parsedType}),Aa;function r(s,c){return RC({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,LC(),Zy].filter(f=>!!f),issueData:{code:an.invalid_arguments,argumentsError:c}})}function a(s,c){return RC({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,LC(),Zy].filter(f=>!!f),issueData:{code:an.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof t3){const s=this;return Of(async function(...c){const f=new Rp([]),A=await s._def.args.parseAsync(c,i).catch(m=>{throw f.addIssue(r(c,m)),f}),h=await Reflect.apply(o,this,A);return await s._def.returns._def.type.parseAsync(h,i).catch(m=>{throw f.addIssue(a(h,m)),f})})}else{const s=this;return Of(function(...c){const f=s._def.args.safeParse(c,i);if(!f.success)throw new Rp([r(c,f.error)]);const A=Reflect.apply(o,this,f.data),h=s._def.returns.safeParse(A,i);if(!h.success)throw new Rp([a(A,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e3({...this._def,args:om.create(t).rest(zv.create())})}returns(t){return new e3({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e3({args:t||om.create([]).rest(zv.create()),returns:n||zv.create(),typeName:ta.ZodFunction,...Ha(r)})}}class f7 extends Ka{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}f7.create=(e,t)=>new f7({getter:e,typeName:ta.ZodLazy,...Ha(t)});class d7 extends Ka{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Mn(n,{received:n.data,code:an.invalid_literal,expected:this._def.value}),Aa}return{status:"valid",value:t.data}}get value(){return this._def.value}}d7.create=(e,t)=>new d7({value:e,typeName:ta.ZodLiteral,...Ha(t)});function sN(e,t){return new A7({values:e,typeName:ta.ZodEnum,...Ha(t)})}let A7=class MI extends Ka{constructor(){super(...arguments),n7.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Mn(n,{expected:Oi.joinValues(r),received:n.parsedType,code:an.invalid_type}),Aa}if($C(this,n7)||tN(this,n7,new Set(this._def.values)),!$C(this,n7).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Mn(n,{received:n.data,code:an.invalid_enum_value,options:r}),Aa}return Of(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return MI.create(t,{...this._def,...n})}exclude(t,n=this._def){return MI.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}};n7=new WeakMap,A7.create=sN;let p7=class extends Ka{constructor(){super(...arguments),r7.set(this,void 0)}_parse(t){const n=Oi.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Nn.string&&r.parsedType!==Nn.number){const a=Oi.objectValues(n);return Mn(r,{expected:Oi.joinValues(a),received:r.parsedType,code:an.invalid_type}),Aa}if($C(this,r7)||tN(this,r7,new Set(Oi.getValidEnumValues(this._def.values))),!$C(this,r7).has(t.data)){const a=Oi.objectValues(n);return Mn(r,{received:r.data,code:an.invalid_enum_value,options:a}),Aa}return Of(t.data)}get enum(){return this._def.values}};r7=new WeakMap,p7.create=(e,t)=>new p7({values:e,typeName:ta.ZodNativeEnum,...Ha(t)});class t3 extends Ka{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Nn.promise&&n.common.async===!1)return Mn(n,{code:an.invalid_type,expected:Nn.promise,received:n.parsedType}),Aa;const r=n.parsedType===Nn.promise?n.data:Promise.resolve(n.data);return Of(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}t3.create=(e,t)=>new t3({type:e,typeName:ta.ZodPromise,...Ha(t)});class $p extends Ka{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ta.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:o=>{Mn(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Aa;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?Aa:c.status==="dirty"||n.value==="dirty"?NC(c.value):c});{if(n.value==="aborted")return Aa;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Aa:s.status==="dirty"||n.value==="dirty"?NC(s.value):s}}if(a.type==="refinement"){const o=s=>{const c=a.refinement(s,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Aa:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Aa:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(a.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!e7(o))return o;const s=a.transform(o.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>e7(o)?Promise.resolve(a.transform(o.value,i)).then(s=>({status:n.value,value:s})):o);Oi.assertNever(a)}}$p.create=(e,t,n)=>new $p({schema:e,typeName:ta.ZodEffects,effect:t,...Ha(n)}),$p.createWithPreprocess=(e,t,n)=>new $p({schema:t,effect:{type:"preprocess",transform:e},typeName:ta.ZodEffects,...Ha(n)});let R0=class extends Ka{_parse(t){return this._getType(t)===Nn.undefined?Of(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};R0.create=(e,t)=>new R0({innerType:e,typeName:ta.ZodOptional,...Ha(t)});let lm=class extends Ka{_parse(t){return this._getType(t)===Nn.null?Of(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};lm.create=(e,t)=>new lm({innerType:e,typeName:ta.ZodNullable,...Ha(t)});let h7=class extends Ka{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Nn.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};h7.create=(e,t)=>new h7({innerType:e,typeName:ta.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ha(t)});let m7=class extends Ka{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return t7(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Rp(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Rp(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};m7.create=(e,t)=>new m7({innerType:e,typeName:ta.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ha(t)});class zC extends Ka{_parse(t){if(this._getType(t)!==Nn.nan){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.nan,received:n.parsedType}),Aa}return{status:"valid",value:t.data}}}zC.create=e=>new zC({typeName:ta.ZodNaN,...Ha(e)});const _ue=Symbol("zod_brand");let zS=class extends Ka{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},US=class Oee extends Ka{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Aa:a.status==="dirty"?(n.dirty(),NC(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Aa:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new Oee({in:t,out:n,typeName:ta.ZodPipeline})}},v7=class extends Ka{_parse(t){const n=this._def.innerType._parse(t),r=a=>(e7(a)&&(a.value=Object.freeze(a.value)),a);return t7(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}};v7.create=(e,t)=>new v7({innerType:e,typeName:ta.ZodReadonly,...Ha(t)});function uN(e,t={},n){return e?Jy.create().superRefine((r,a)=>{var i,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(i=s.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,f=typeof s=="string"?{message:s}:s;a.addIssue({code:"custom",...f,fatal:c})}}):Jy.create()}const Pue={object:VA.lazycreate};var ta;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ta||(ta={}));const Mue=(e,t={message:`Input not instance of ${e.name}`})=>uN(n=>n instanceof e,t),cN=Np.create,fN=a7.create,Due=zC.create,Hue=am.create,dN=i7.create,Iue=o7.create,Lue=FC.create,Rue=l7.create,Nue=s7.create,$ue=Jy.create,Fue=zv.create,Vue=Fh.create,Oue=VC.create,Que=Uv.create,zue=VA.create,Uue=VA.strictCreate,jue=u7.create,Gue=oN.create,Yue=c7.create,Wue=om.create,Xue=lN.create,Kue=OC.create,Zue=QC.create,Jue=e3.create,que=f7.create,ece=d7.create,tce=A7.create,nce=p7.create,rce=t3.create,AN=$p.create,ace=R0.create,ice=lm.create,oce=$p.createWithPreprocess,lce=US.create;var Di=Object.freeze({__proto__:null,defaultErrorMap:Zy,setErrorMap:due,getErrorMap:LC,makeIssue:RC,EMPTY_PATH:Aue,addIssueToContext:Mn,ParseStatus:ff,INVALID:Aa,DIRTY:NC,OK:Of,isAborted:FS,isDirty:VS,isValid:e7,isAsync:t7,get util(){return Oi},get objectUtil(){return $S},ZodParsedType:Nn,getParsedType:rm,ZodType:Ka,datetimeRegex:iN,ZodString:Np,ZodNumber:a7,ZodBigInt:am,ZodBoolean:i7,ZodDate:o7,ZodSymbol:FC,ZodUndefined:l7,ZodNull:s7,ZodAny:Jy,ZodUnknown:zv,ZodNever:Fh,ZodVoid:VC,ZodArray:Uv,ZodObject:VA,ZodUnion:u7,ZodDiscriminatedUnion:oN,ZodIntersection:c7,ZodTuple:om,ZodRecord:lN,ZodMap:OC,ZodSet:QC,ZodFunction:e3,ZodLazy:f7,ZodLiteral:d7,ZodEnum:A7,ZodNativeEnum:p7,ZodPromise:t3,ZodEffects:$p,ZodTransformer:$p,ZodOptional:R0,ZodNullable:lm,ZodDefault:h7,ZodCatch:m7,ZodNaN:zC,BRAND:_ue,ZodBranded:zS,ZodPipeline:US,ZodReadonly:v7,custom:uN,Schema:Ka,ZodSchema:Ka,late:Pue,get ZodFirstPartyTypeKind(){return ta},coerce:{string:e=>Np.create({...e,coerce:!0}),number:e=>a7.create({...e,coerce:!0}),boolean:e=>i7.create({...e,coerce:!0}),bigint:e=>am.create({...e,coerce:!0}),date:e=>o7.create({...e,coerce:!0})},any:$ue,array:Que,bigint:Hue,boolean:dN,date:Iue,discriminatedUnion:Gue,effect:AN,enum:tce,function:Jue,instanceof:Mue,intersection:Yue,lazy:que,literal:ece,map:Kue,nan:Due,nativeEnum:nce,never:Vue,null:Nue,nullable:ice,number:fN,object:zue,oboolean:()=>dN().optional(),onumber:()=>fN().optional(),optional:ace,ostring:()=>cN().optional(),pipeline:lce,preprocess:oce,promise:rce,record:Xue,set:Zue,strictObject:Uue,string:cN,symbol:Lue,transformer:AN,tuple:Wue,undefined:Rue,union:jue,unknown:Fue,void:Oue,NEVER:Aa,ZodIssueCode:an,quotelessJson:fue,ZodError:Rp});Di.object({__isRef:Di.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Di.string().describe("Upstream block id"),name:Di.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:Di.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").readonly(),Di.string().length(24).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");var pN={exports:{}};(function(e,t){t=e.exports=n,t.getSerialize=r;function n(a,i,o,s){return JSON.stringify(a,r(i,s),o)}function r(a,i){var o=[],s=[];return i==null&&(i=function(c,f){return o[0]===f?"[Circular ~]":"[Circular ~."+s.slice(0,o.indexOf(f)).join(".")+"]"}),function(c,f){if(o.length>0){var A=o.indexOf(this);~A?o.splice(A+1):o.push(this),~A?s.splice(A,1/0,c):s.push(c),~o.indexOf(f)&&(f=i.call(this,c,f))}else o.push(f);return a==null?f:a.call(this,c,f)}}})(pN,pN.exports);const sce=Di.object({type:Di.literal("PlError"),name:Di.string(),message:Di.string(),fullMessage:Di.string().optional(),stack:Di.string().optional()}),uce=sce.extend({cause:Di.lazy(()=>UC).optional(),errors:Di.lazy(()=>UC.array()).optional()}),cce=Di.object({type:Di.literal("StandardError"),name:Di.string(),message:Di.string(),stack:Di.string().optional()}),fce=cce.extend({cause:Di.lazy(()=>UC).optional(),errors:Di.lazy(()=>UC.array()).optional()}),UC=Di.union([fce,uce]),dce=Di.object({name:Di.string(),message:Di.string(),fullMessage:Di.string().optional(),stack:Di.string().optional()}),hN=dce.extend({cause:Di.lazy(()=>hN).optional(),errors:Di.lazy(()=>hN.array()).optional()}),Ace=Di.object({type:Di.string(),importance:Di.number().optional(),id:Di.string().optional(),label:Di.string()});Di.array(Ace);function mN(e,t,n){const r=d.ref(0),a=d.reactive({loading:d.computed(()=>r.value>0),loadingRef:r,value:void 0,error:void 0}),i=nse(t);return d.watch(e,async o=>{a.error=void 0,r.value++,i(o).then(s=>{s.ok&&(a.value=s.value)}).catch(s=>{a.value=void 0,a.error=s}).finally(()=>{r.value--})},Object.assign({immediate:!0,deep:!0},{})),a}const pce=["tabindex"],hce={class:"pl-autocomplete__container"},mce={class:"pl-autocomplete__field"},vce=["disabled","placeholder"],gce={key:0,class:"input-value"},yce={class:"pl-autocomplete__controls"},wce={key:2,class:"arrow-icon arrow-icon-default"},Cce={key:0},bce={key:0,class:"required-icon"},Ece={key:0,class:"nothing-found"},xce={key:0,class:"pl-autocomplete__error"},Sce={key:1,class:"pl-autocomplete__helper"},Bce={key:2,class:"pl-autocomplete__helper"},kce={name:"PlAutocomplete"},jC=d.defineComponent({...kce,props:d.mergeModels({optionsSearch:{},modelSearch:{type:Function,default:void 0},label:{default:""},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"},formatValue:{type:Function,default:e=>String(e)}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=d.useModel(e,"modelValue"),n=e,r=d.useSlots(),a=d.ref(),i=d.ref(),o=d.useTemplateRef("overlay"),s=d.ref(null),c=d.reactive({activeIndex:-1,open:!1}),f=()=>XR(g.value.findIndex(me=>Ky(me.value,t.value)),me=>me<0?0:me),A=()=>c.activeIndex=f(),h=d.ref([]),m=d.ref(),g=d.computed(()=>GR(h.value).map((me,ae)=>({...me,index:ae,isSelected:ae===k.value,isActive:ae===c.activeIndex}))),b=d.ref(!0),C=d.ref(!1),x=d.computed(()=>n.disabled),k=d.computed(()=>h.value.findIndex(me=>Ky(me.value,t.value))),_=d.computed(()=>{if(!b.value){if(n.error)return n.error;if(C.value)return"Data loading error"}}),D=d.computed(()=>{const me=d.unref(m),ae=d.unref(g),ye=me??ae.find(Ce=>Ky(Ce.value,t.value))??ae.find(Ce=>Ky(Ce.value,t.value));return(ye==null?void 0:ye.label)||(t.value?n.formatValue(t.value):"")}),O=d.computed(()=>!c.open&&t.value?"":t.value?String(D.value):n.placeholder),I=d.computed(()=>t.value!==void 0&&t.value!==null),$=d.computed(()=>x.value?void 0:"0"),Q=me=>{var ae;t.value=me==null?void 0:me.value,m.value=me,s.value=null,c.open=!1,(ae=a==null?void 0:a.value)==null||ae.focus()},ee=()=>{t.value=void 0,m.value=void 0},K=()=>{var me;return(me=i.value)==null?void 0:me.focus()},re=()=>{c.open=!c.open};d.watch(()=>c.open,me=>{s.value=me?"":null});const U=()=>{c.open=!0},G=me=>{var ae,ye,Ce;const ce=me.relatedTarget;!((ae=a.value)!=null&&ae.contains(ce))&&!((Ce=(ye=o.value)==null?void 0:ye.listRef)!=null&&Ce.contains(ce))&&(s.value=null,c.open=!1)},Z=me=>{var ae;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(me.code))me.preventDefault();else return;const{open:ye,activeIndex:Ce}=c;if(!ye){me.code==="Enter"&&(c.open=!0,s.value="");return}me.code==="Escape"&&(c.open=!1,s.value=null,(ae=a.value)==null||ae.focus());const ce=d.unref(g),{length:ge}=ce;if(!ge)return;me.code==="Enter"&&Q(ce.find(Oe=>Oe.index===Ce));const ze=ce.findIndex(Oe=>Oe.index===Ce)??-1,Ne=me.code==="ArrowDown"?1:me.code==="ArrowUp"?-1:0,Ge=Math.abs(ze+Ne+ge)%ge;c.activeIndex=g.value[Ge].index??-1};Zse(a),d.watch(()=>t.value,A,{immediate:!0}),d.watch(()=>c.open,me=>{var ae;return me?(ae=i.value)==null?void 0:ae.focus():""}),d.watchPostEffect(()=>{var me;s.value,c.activeIndex>=0&&c.open&&((me=o.value)==null||me.scrollIntoActive())});const Y=cue(s,300,{maxWait:1e3}),X=mN(()=>Y.value,async me=>me!==null?n.optionsSearch(me):[]),oe=mN(()=>t.value,async me=>{var ae,ye;return me&&!Ky((ae=m.value)==null?void 0:ae.value,me)?n.modelSearch?n.modelSearch(me):(ye=await n.optionsSearch(String(me)))==null?void 0:ye[0]:m.value});return d.watch(()=>X.value,me=>{me&&(h.value=me,s.value!==null&&(C.value=!1))}),d.watch(()=>oe.value,me=>{me&&(m.value=GR([me])[0])}),d.watch(()=>X.error,me=>{me&&(C.value=!!me)}),d.watch(()=>X.loading||oe.loading,me=>{b.value=me}),(me,ae)=>(d.openBlock(),d.createElementBlock("div",{class:"pl-autocomplete__envelope",onClick:d.withModifiers(K,["stop"])},[d.createElementVNode("div",{ref_key:"rootRef",ref:a,tabindex:$.value,class:d.normalizeClass(["pl-autocomplete",{open:c.open,error:!!_.value,disabled:x.value}]),onKeydown:Z,onFocusout:G},[d.createElementVNode("div",hce,[d.createElementVNode("div",mce,[d.withDirectives(d.createElementVNode("input",{ref_key:"input",ref:i,"onUpdate:modelValue":ae[0]||(ae[0]=ye=>s.value=ye),type:"text",tabindex:"-1",disabled:x.value,placeholder:O.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:U},null,40,vce),[[d.vModelText,s.value]]),ae[4]||(ae[4]=d.createTextVNode()),c.open?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",gce,[d.createVNode(nue,null,{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(D.value),1)]),_:1})])),ae[5]||(ae[5]=d.createTextVNode()),d.createElementVNode("div",yce,[b.value?(d.openBlock(),d.createBlock(d.unref(Hse),{key:0,name:"loading"})):d.createCommentVNode("",!0),ae[1]||(ae[1]=d.createTextVNode()),me.clearable&&I.value?(d.openBlock(),d.createBlock(d.unref(q5),{key:1,name:"delete-clear",onClick:d.withModifiers(ee,["stop"])})):d.createCommentVNode("",!0),ae[2]||(ae[2]=d.createTextVNode()),d.renderSlot(me.$slots,"append"),ae[3]||(ae[3]=d.createTextVNode()),d.createElementVNode("div",{class:"pl-autocomplete__arrow-wrapper",onClick:d.withModifiers(re,["stop"])},[me.arrowIconLarge?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["arrow-icon",[`icon-24 ${me.arrowIconLarge}`]])},null,2)):me.arrowIcon?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["arrow-icon",[`icon-16 ${me.arrowIcon}`]])},null,2)):(d.openBlock(),d.createElementBlock("div",wce))])])]),ae[9]||(ae[9]=d.createTextVNode()),me.label?(d.openBlock(),d.createElementBlock("label",Cce,[me.required?(d.openBlock(),d.createElementBlock("i",bce)):d.createCommentVNode("",!0),ae[6]||(ae[6]=d.createTextVNode()),d.createElementVNode("span",null,d.toDisplayString(me.label),1),ae[7]||(ae[7]=d.createTextVNode()),d.unref(r).tooltip?(d.openBlock(),d.createBlock(d.unref(Qse),{key:1,class:"info",position:"top"},{tooltip:d.withCtx(()=>[d.renderSlot(me.$slots,"tooltip")]),_:3})):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),ae[10]||(ae[10]=d.createTextVNode()),c.open?(d.openBlock(),d.createBlock(d.unref(oue),{key:1,ref:"overlay",root:a.value,class:"pl-autocomplete__options",tabindex:"-1",gap:3},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(g.value,(ye,Ce)=>(d.openBlock(),d.createBlock(vse,{key:Ce,option:ye,"is-selected":ye.isSelected,"is-hovered":ye.isActive,size:me.optionSize,onClick:d.withModifiers(ce=>Q(ye),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),ae[8]||(ae[8]=d.createTextVNode()),g.value.length?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Ece,"Nothing found"))]),_:1},8,["root"])):d.createCommentVNode("",!0),ae[11]||(ae[11]=d.createTextVNode()),d.createVNode(Gse,{class:"pl-autocomplete__contour"})])],42,pce),ae[12]||(ae[12]=d.createTextVNode()),_.value?(d.openBlock(),d.createElementBlock("div",xce,d.toDisplayString(_.value),1)):b.value&&me.loadingOptionsHelper?(d.openBlock(),d.createElementBlock("div",Sce,d.toDisplayString(me.loadingOptionsHelper),1)):me.helper?(d.openBlock(),d.createElementBlock("div",Bce,d.toDisplayString(me.helper),1)):d.createCommentVNode("",!0)]))}});function GC(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Tce(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function vN(e){let t,n,r;e.length!==2?(t=GC,n=(s,c)=>GC(e(s),c),r=(s,c)=>e(s)-c):(t=e===GC||e===Tce?e:_ce,n=e,r=e);function a(s,c,f=0,A=s.length){if(f<A){if(t(c,c)!==0)return A;do{const h=f+A>>>1;n(s[h],c)<0?f=h+1:A=h}while(f<A)}return f}function i(s,c,f=0,A=s.length){if(f<A){if(t(c,c)!==0)return A;do{const h=f+A>>>1;n(s[h],c)<=0?f=h+1:A=h}while(f<A)}return f}function o(s,c,f=0,A=s.length){const h=a(s,c,f,A-1);return h>f&&r(s[h-1],c)>-r(s[h],c)?h-1:h}return{left:a,center:o,right:i}}function _ce(){return 0}function Pce(e){return e===null?NaN:+e}vN(GC),vN(Pce).center;var Mce={value:()=>{}};function gN(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new YC(n)}function YC(e){this._=e}function Dce(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}YC.prototype=gN.prototype={constructor:YC,on:function(e,t){var n=this._,r=Dce(e+"",n),a,i=-1,o=r.length;if(arguments.length<2){for(;++i<o;)if((a=(e=r[i]).type)&&(a=Hce(n[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<o;)if(a=(e=r[i]).type)n[a]=yN(n[a],e.name,t);else if(t==null)for(a in n)n[a]=yN(n[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new YC(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,i;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,a=i.length;r<a;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],a=0,i=r.length;a<i;++a)r[a].value.apply(t,n)}};function Hce(e,t){for(var n=0,r=e.length,a;n<r;++n)if((a=e[n]).name===t)return a.value}function yN(e,t,n){for(var r=0,a=e.length;r<a;++r)if(e[r].name===t){e[r]=Mce,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var jS="http://www.w3.org/1999/xhtml";const wN={svg:"http://www.w3.org/2000/svg",xhtml:jS,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function WC(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),wN.hasOwnProperty(t)?{space:wN[t],local:e}:e}function Ice(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===jS&&t.documentElement.namespaceURI===jS?t.createElement(e):t.createElementNS(n,e)}}function Lce(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function CN(e){var t=WC(e);return(t.local?Lce:Ice)(t)}function Rce(){}function GS(e){return e==null?Rce:function(){return this.querySelector(e)}}function Nce(e){typeof e!="function"&&(e=GS(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],o=i.length,s=r[a]=new Array(o),c,f,A=0;A<o;++A)(c=i[A])&&(f=e.call(c,c.__data__,A,i))&&("__data__"in c&&(f.__data__=c.__data__),s[A]=f);return new Fp(r,this._parents)}function $ce(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Fce(){return[]}function bN(e){return e==null?Fce:function(){return this.querySelectorAll(e)}}function Vce(e){return function(){return $ce(e.apply(this,arguments))}}function Oce(e){typeof e=="function"?e=Vce(e):e=bN(e);for(var t=this._groups,n=t.length,r=[],a=[],i=0;i<n;++i)for(var o=t[i],s=o.length,c,f=0;f<s;++f)(c=o[f])&&(r.push(e.call(c,c.__data__,f,o)),a.push(c));return new Fp(r,a)}function EN(e){return function(){return this.matches(e)}}function xN(e){return function(t){return t.matches(e)}}var Qce=Array.prototype.find;function zce(e){return function(){return Qce.call(this.children,e)}}function Uce(){return this.firstElementChild}function jce(e){return this.select(e==null?Uce:zce(typeof e=="function"?e:xN(e)))}var Gce=Array.prototype.filter;function Yce(){return Array.from(this.children)}function Wce(e){return function(){return Gce.call(this.children,e)}}function Xce(e){return this.selectAll(e==null?Yce:Wce(typeof e=="function"?e:xN(e)))}function Kce(e){typeof e!="function"&&(e=EN(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],o=i.length,s=r[a]=[],c,f=0;f<o;++f)(c=i[f])&&e.call(c,c.__data__,f,i)&&s.push(c);return new Fp(r,this._parents)}function SN(e){return new Array(e.length)}function Zce(){return new Fp(this._enter||this._groups.map(SN),this._parents)}function XC(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}XC.prototype={constructor:XC,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Jce(e){return function(){return e}}function qce(e,t,n,r,a,i){for(var o=0,s,c=t.length,f=i.length;o<f;++o)(s=t[o])?(s.__data__=i[o],r[o]=s):n[o]=new XC(e,i[o]);for(;o<c;++o)(s=t[o])&&(a[o]=s)}function efe(e,t,n,r,a,i,o){var s,c,f=new Map,A=t.length,h=i.length,m=new Array(A),g;for(s=0;s<A;++s)(c=t[s])&&(m[s]=g=o.call(c,c.__data__,s,t)+"",f.has(g)?a[s]=c:f.set(g,c));for(s=0;s<h;++s)g=o.call(e,i[s],s,i)+"",(c=f.get(g))?(r[s]=c,c.__data__=i[s],f.delete(g)):n[s]=new XC(e,i[s]);for(s=0;s<A;++s)(c=t[s])&&f.get(m[s])===c&&(a[s]=c)}function tfe(e){return e.__data__}function nfe(e,t){if(!arguments.length)return Array.from(this,tfe);var n=t?efe:qce,r=this._parents,a=this._groups;typeof e!="function"&&(e=Jce(e));for(var i=a.length,o=new Array(i),s=new Array(i),c=new Array(i),f=0;f<i;++f){var A=r[f],h=a[f],m=h.length,g=rfe(e.call(A,A&&A.__data__,f,r)),b=g.length,C=s[f]=new Array(b),x=o[f]=new Array(b),k=c[f]=new Array(m);n(A,h,C,x,k,g,t);for(var _=0,D=0,O,I;_<b;++_)if(O=C[_]){for(_>=D&&(D=_+1);!(I=x[D])&&++D<b;);O._next=I||null}}return o=new Fp(o,r),o._enter=s,o._exit=c,o}function rfe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function afe(){return new Fp(this._exit||this._groups.map(SN),this._parents)}function ife(e,t,n){var r=this.enter(),a=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),n==null?i.remove():n(i),r&&a?r.merge(a).order():a}function ofe(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,a=n.length,i=r.length,o=Math.min(a,i),s=new Array(a),c=0;c<o;++c)for(var f=n[c],A=r[c],h=f.length,m=s[c]=new Array(h),g,b=0;b<h;++b)(g=f[b]||A[b])&&(m[b]=g);for(;c<a;++c)s[c]=n[c];return new Fp(s,this._parents)}function lfe(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],a=r.length-1,i=r[a],o;--a>=0;)(o=r[a])&&(i&&o.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(o,i),i=o);return this}function sfe(e){e||(e=ufe);function t(h,m){return h&&m?e(h.__data__,m.__data__):!h-!m}for(var n=this._groups,r=n.length,a=new Array(r),i=0;i<r;++i){for(var o=n[i],s=o.length,c=a[i]=new Array(s),f,A=0;A<s;++A)(f=o[A])&&(c[A]=f);c.sort(t)}return new Fp(a,this._parents).order()}function ufe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function cfe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ffe(){return Array.from(this)}function dfe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length;a<i;++a){var o=r[a];if(o)return o}return null}function Afe(){let e=0;for(const t of this)++e;return e}function pfe(){return!this.node()}function hfe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a=t[n],i=0,o=a.length,s;i<o;++i)(s=a[i])&&e.call(s,s.__data__,i,a);return this}function mfe(e){return function(){this.removeAttribute(e)}}function vfe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gfe(e,t){return function(){this.setAttribute(e,t)}}function yfe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function wfe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Cfe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function bfe(e,t){var n=WC(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?vfe:mfe:typeof t=="function"?n.local?Cfe:wfe:n.local?yfe:gfe)(n,t))}function BN(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Efe(e){return function(){this.style.removeProperty(e)}}function xfe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Sfe(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Bfe(e,t,n){return arguments.length>1?this.each((t==null?Efe:typeof t=="function"?Sfe:xfe)(e,t,n??"")):n3(this.node(),e)}function n3(e,t){return e.style.getPropertyValue(t)||BN(e).getComputedStyle(e,null).getPropertyValue(t)}function kfe(e){return function(){delete this[e]}}function Tfe(e,t){return function(){this[e]=t}}function _fe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Pfe(e,t){return arguments.length>1?this.each((t==null?kfe:typeof t=="function"?_fe:Tfe)(e,t)):this.node()[e]}function kN(e){return e.trim().split(/^|\s+/)}function YS(e){return e.classList||new TN(e)}function TN(e){this._node=e,this._names=kN(e.getAttribute("class")||"")}TN.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function _N(e,t){for(var n=YS(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function PN(e,t){for(var n=YS(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function Mfe(e){return function(){_N(this,e)}}function Dfe(e){return function(){PN(this,e)}}function Hfe(e,t){return function(){(t.apply(this,arguments)?_N:PN)(this,e)}}function Ife(e,t){var n=kN(e+"");if(arguments.length<2){for(var r=YS(this.node()),a=-1,i=n.length;++a<i;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof t=="function"?Hfe:t?Mfe:Dfe)(n,t))}function Lfe(){this.textContent=""}function Rfe(e){return function(){this.textContent=e}}function Nfe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function $fe(e){return arguments.length?this.each(e==null?Lfe:(typeof e=="function"?Nfe:Rfe)(e)):this.node().textContent}function Ffe(){this.innerHTML=""}function Vfe(e){return function(){this.innerHTML=e}}function Ofe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Qfe(e){return arguments.length?this.each(e==null?Ffe:(typeof e=="function"?Ofe:Vfe)(e)):this.node().innerHTML}function zfe(){this.nextSibling&&this.parentNode.appendChild(this)}function Ufe(){return this.each(zfe)}function jfe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Gfe(){return this.each(jfe)}function Yfe(e){var t=typeof e=="function"?e:CN(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Wfe(){return null}function Xfe(e,t){var n=typeof e=="function"?e:CN(e),r=t==null?Wfe:typeof t=="function"?t:GS(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Kfe(){var e=this.parentNode;e&&e.removeChild(this)}function Zfe(){return this.each(Kfe)}function Jfe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function qfe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ede(e){return this.select(e?qfe:Jfe)}function tde(e){return arguments.length?this.property("__data__",e):this.node().__data__}function nde(e){return function(t){e.call(this,t,this.__data__)}}function rde(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function ade(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,a=t.length,i;n<a;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function ide(e,t,n){return function(){var r=this.__on,a,i=nde(t);if(r){for(var o=0,s=r.length;o<s;++o)if((a=r[o]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=n),a.value=t;return}}this.addEventListener(e.type,i,n),a={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(a):this.__on=[a]}}function ode(e,t,n){var r=rde(e+""),a,i=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,f=s.length,A;c<f;++c)for(a=0,A=s[c];a<i;++a)if((o=r[a]).type===A.type&&o.name===A.name)return A.value}return}for(s=t?ide:ade,a=0;a<i;++a)this.each(s(r[a],t,n));return this}function MN(e,t,n){var r=BN(e),a=r.CustomEvent;typeof a=="function"?a=new a(t,n):(a=r.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function lde(e,t){return function(){return MN(this,e,t)}}function sde(e,t){return function(){return MN(this,e,t.apply(this,arguments))}}function ude(e,t){return this.each((typeof t=="function"?sde:lde)(e,t))}function*cde(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length,o;a<i;++a)(o=r[a])&&(yield o)}var fde=[null];function Fp(e,t){this._groups=e,this._parents=t}function g7(){return new Fp([[document.documentElement]],fde)}function dde(){return this}Fp.prototype=g7.prototype={constructor:Fp,select:Nce,selectAll:Oce,selectChild:jce,selectChildren:Xce,filter:Kce,data:nfe,enter:Zce,exit:afe,join:ife,merge:ofe,selection:dde,order:lfe,sort:sfe,call:cfe,nodes:ffe,node:dfe,size:Afe,empty:pfe,each:hfe,attr:bfe,style:Bfe,property:Pfe,classed:Ife,text:$fe,html:Qfe,raise:Ufe,lower:Gfe,append:Yfe,insert:Xfe,remove:Zfe,clone:ede,datum:tde,on:ode,dispatch:ude,[Symbol.iterator]:cde};function WS(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function DN(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function y7(){}var w7=.7,KC=1/w7,r3="\\s*([+-]?\\d+)\\s*",C7="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",N0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ade=/^#([0-9a-f]{3,8})$/,pde=new RegExp(`^rgb\\(${r3},${r3},${r3}\\)$`),hde=new RegExp(`^rgb\\(${N0},${N0},${N0}\\)$`),mde=new RegExp(`^rgba\\(${r3},${r3},${r3},${C7}\\)$`),vde=new RegExp(`^rgba\\(${N0},${N0},${N0},${C7}\\)$`),gde=new RegExp(`^hsl\\(${C7},${N0},${N0}\\)$`),yde=new RegExp(`^hsla\\(${C7},${N0},${N0},${C7}\\)$`),HN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};WS(y7,b7,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:IN,formatHex:IN,formatHex8:wde,formatHsl:Cde,formatRgb:LN,toString:LN});function IN(){return this.rgb().formatHex()}function wde(){return this.rgb().formatHex8()}function Cde(){return VN(this).formatHsl()}function LN(){return this.rgb().formatRgb()}function b7(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ade.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?RN(t):n===3?new Dd(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ZC(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ZC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=pde.exec(e))?new Dd(t[1],t[2],t[3],1):(t=hde.exec(e))?new Dd(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=mde.exec(e))?ZC(t[1],t[2],t[3],t[4]):(t=vde.exec(e))?ZC(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=gde.exec(e))?FN(t[1],t[2]/100,t[3]/100,1):(t=yde.exec(e))?FN(t[1],t[2]/100,t[3]/100,t[4]):HN.hasOwnProperty(e)?RN(HN[e]):e==="transparent"?new Dd(NaN,NaN,NaN,0):null}function RN(e){return new Dd(e>>16&255,e>>8&255,e&255,1)}function ZC(e,t,n,r){return r<=0&&(e=t=n=NaN),new Dd(e,t,n,r)}function bde(e){return e instanceof y7||(e=b7(e)),e?(e=e.rgb(),new Dd(e.r,e.g,e.b,e.opacity)):new Dd}function XS(e,t,n,r){return arguments.length===1?bde(e):new Dd(e,t,n,r??1)}function Dd(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}WS(Dd,XS,DN(y7,{brighter(e){return e=e==null?KC:Math.pow(KC,e),new Dd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?w7:Math.pow(w7,e),new Dd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Dd(jv(this.r),jv(this.g),jv(this.b),JC(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:NN,formatHex:NN,formatHex8:Ede,formatRgb:$N,toString:$N}));function NN(){return`#${Gv(this.r)}${Gv(this.g)}${Gv(this.b)}`}function Ede(){return`#${Gv(this.r)}${Gv(this.g)}${Gv(this.b)}${Gv((isNaN(this.opacity)?1:this.opacity)*255)}`}function $N(){const e=JC(this.opacity);return`${e===1?"rgb(":"rgba("}${jv(this.r)}, ${jv(this.g)}, ${jv(this.b)}${e===1?")":`, ${e})`}`}function JC(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function jv(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Gv(e){return e=jv(e),(e<16?"0":"")+e.toString(16)}function FN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Vp(e,t,n,r)}function VN(e){if(e instanceof Vp)return new Vp(e.h,e.s,e.l,e.opacity);if(e instanceof y7||(e=b7(e)),!e)return new Vp;if(e instanceof Vp)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,s=i-a,c=(i+a)/2;return s?(t===i?o=(n-r)/s+(n<r)*6:n===i?o=(r-t)/s+2:o=(t-n)/s+4,s/=c<.5?i+a:2-i-a,o*=60):s=c>0&&c<1?0:o,new Vp(o,s,c,e.opacity)}function xde(e,t,n,r){return arguments.length===1?VN(e):new Vp(e,t,n,r??1)}function Vp(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}WS(Vp,xde,DN(y7,{brighter(e){return e=e==null?KC:Math.pow(KC,e),new Vp(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?w7:Math.pow(w7,e),new Vp(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Dd(KS(e>=240?e-240:e+120,a,r),KS(e,a,r),KS(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Vp(ON(this.h),qC(this.s),qC(this.l),JC(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=JC(this.opacity);return`${e===1?"hsl(":"hsla("}${ON(this.h)}, ${qC(this.s)*100}%, ${qC(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ON(e){return e=(e||0)%360,e<0?e+360:e}function qC(e){return Math.max(0,Math.min(1,e||0))}function KS(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const QN=e=>()=>e;function Sde(e,t){return function(n){return e+n*t}}function Bde(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function kde(e){return(e=+e)==1?zN:function(t,n){return n-t?Bde(t,n,e):QN(isNaN(t)?n:t)}}function zN(e,t){var n=t-e;return n?Sde(e,n):QN(isNaN(e)?t:e)}const UN=function e(t){var n=kde(t);function r(a,i){var o=n((a=XS(a)).r,(i=XS(i)).r),s=n(a.g,i.g),c=n(a.b,i.b),f=zN(a.opacity,i.opacity);return function(A){return a.r=o(A),a.g=s(A),a.b=c(A),a.opacity=f(A),a+""}}return r.gamma=e,r}(1);function sm(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var ZS=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,JS=new RegExp(ZS.source,"g");function Tde(e){return function(){return e}}function _de(e){return function(t){return e(t)+""}}function Pde(e,t){var n=ZS.lastIndex=JS.lastIndex=0,r,a,i,o=-1,s=[],c=[];for(e=e+"",t=t+"";(r=ZS.exec(e))&&(a=JS.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,c.push({i:o,x:sm(r,a)})),n=JS.lastIndex;return n<t.length&&(i=t.slice(n),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?_de(c[0].x):Tde(t):(t=c.length,function(f){for(var A=0,h;A<t;++A)s[(h=c[A]).i]=h.x(f);return s.join("")})}var jN=180/Math.PI,GN={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function YN(e,t,n,r,a,i){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*jN,skewX:Math.atan(c)*jN,scaleX:o,scaleY:s}}var eb;function Mde(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?GN:YN(t.a,t.b,t.c,t.d,t.e,t.f)}function Dde(e){return e==null||(eb||(eb=document.createElementNS("http://www.w3.org/2000/svg","g")),eb.setAttribute("transform",e),!(e=eb.transform.baseVal.consolidate()))?GN:(e=e.matrix,YN(e.a,e.b,e.c,e.d,e.e,e.f))}function WN(e,t,n,r){function a(f){return f.length?f.pop()+" ":""}function i(f,A,h,m,g,b){if(f!==h||A!==m){var C=g.push("translate(",null,t,null,n);b.push({i:C-4,x:sm(f,h)},{i:C-2,x:sm(A,m)})}else(h||m)&&g.push("translate("+h+t+m+n)}function o(f,A,h,m){f!==A?(f-A>180?A+=360:A-f>180&&(f+=360),m.push({i:h.push(a(h)+"rotate(",null,r)-2,x:sm(f,A)})):A&&h.push(a(h)+"rotate("+A+r)}function s(f,A,h,m){f!==A?m.push({i:h.push(a(h)+"skewX(",null,r)-2,x:sm(f,A)}):A&&h.push(a(h)+"skewX("+A+r)}function c(f,A,h,m,g,b){if(f!==h||A!==m){var C=g.push(a(g)+"scale(",null,",",null,")");b.push({i:C-4,x:sm(f,h)},{i:C-2,x:sm(A,m)})}else(h!==1||m!==1)&&g.push(a(g)+"scale("+h+","+m+")")}return function(f,A){var h=[],m=[];return f=e(f),A=e(A),i(f.translateX,f.translateY,A.translateX,A.translateY,h,m),o(f.rotate,A.rotate,h,m),s(f.skewX,A.skewX,h,m),c(f.scaleX,f.scaleY,A.scaleX,A.scaleY,h,m),f=A=null,function(g){for(var b=-1,C=m.length,x;++b<C;)h[(x=m[b]).i]=x.x(g);return h.join("")}}}var Hde=WN(Mde,"px, ","px)","deg)"),Ide=WN(Dde,", ",")",")"),a3=0,E7=0,x7=0,XN=1e3,tb,S7,nb=0,Yv=0,rb=0,B7=typeof performance=="object"&&performance.now?performance:Date,KN=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function qS(){return Yv||(KN(Lde),Yv=B7.now()+rb)}function Lde(){Yv=0}function ab(){this._call=this._time=this._next=null}ab.prototype=ZN.prototype={constructor:ab,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?qS():+n)+(t==null?0:+t),!this._next&&S7!==this&&(S7?S7._next=this:tb=this,S7=this),this._call=e,this._time=n,eB()},stop:function(){this._call&&(this._call=null,this._time=1/0,eB())}};function ZN(e,t,n){var r=new ab;return r.restart(e,t,n),r}function Rde(){qS(),++a3;for(var e=tb,t;e;)(t=Yv-e._time)>=0&&e._call.call(void 0,t),e=e._next;--a3}function JN(){Yv=(nb=B7.now())+rb,a3=E7=0;try{Rde()}finally{a3=0,$de(),Yv=0}}function Nde(){var e=B7.now(),t=e-nb;t>XN&&(rb-=t,nb=e)}function $de(){for(var e,t=tb,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:tb=n);S7=e,eB(r)}function eB(e){if(!a3){E7&&(E7=clearTimeout(E7));var t=e-Yv;t>24?(e<1/0&&(E7=setTimeout(JN,e-B7.now()-rb)),x7&&(x7=clearInterval(x7))):(x7||(nb=B7.now(),x7=setInterval(Nde,XN)),a3=1,KN(JN))}}function qN(e,t,n){var r=new ab;return t=t==null?0:+t,r.restart(a=>{r.stop(),e(a+t)},t,n),r}var Fde=gN("start","end","cancel","interrupt"),Vde=[],e$=0,t$=1,tB=2,ib=3,n$=4,nB=5,ob=6;function lb(e,t,n,r,a,i){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Ode(e,n,{name:t,index:r,group:a,on:Fde,tween:Vde,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:e$})}function rB(e,t){var n=Op(e,t);if(n.state>e$)throw new Error("too late; already scheduled");return n}function $0(e,t){var n=Op(e,t);if(n.state>ib)throw new Error("too late; already running");return n}function Op(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Ode(e,t,n){var r=e.__transition,a;r[t]=n,n.timer=ZN(i,0,n.time);function i(f){n.state=t$,n.timer.restart(o,n.delay,n.time),n.delay<=f&&o(f-n.delay)}function o(f){var A,h,m,g;if(n.state!==t$)return c();for(A in r)if(g=r[A],g.name===n.name){if(g.state===ib)return qN(o);g.state===n$?(g.state=ob,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[A]):+A<t&&(g.state=ob,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[A])}if(qN(function(){n.state===ib&&(n.state=n$,n.timer.restart(s,n.delay,n.time),s(f))}),n.state=tB,n.on.call("start",e,e.__data__,n.index,n.group),n.state===tB){for(n.state=ib,a=new Array(m=n.tween.length),A=0,h=-1;A<m;++A)(g=n.tween[A].value.call(e,e.__data__,n.index,n.group))&&(a[++h]=g);a.length=h+1}}function s(f){for(var A=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(c),n.state=nB,1),h=-1,m=a.length;++h<m;)a[h].call(e,A);n.state===nB&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=ob,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function Qde(e,t){var n=e.__transition,r,a,i=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){i=!1;continue}a=r.state>tB&&r.state<nB,r.state=ob,r.timer.stop(),r.on.call(a?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}i&&delete e.__transition}}function zde(e){return this.each(function(){Qde(this,e)})}function Ude(e,t){var n,r;return function(){var a=$0(this,e),i=a.tween;if(i!==n){r=n=i;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}a.tween=r}}function jde(e,t,n){var r,a;if(typeof n!="function")throw new Error;return function(){var i=$0(this,e),o=i.tween;if(o!==r){a=(r=o).slice();for(var s={name:t,value:n},c=0,f=a.length;c<f;++c)if(a[c].name===t){a[c]=s;break}c===f&&a.push(s)}i.tween=a}}function Gde(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Op(this.node(),n).tween,a=0,i=r.length,o;a<i;++a)if((o=r[a]).name===e)return o.value;return null}return this.each((t==null?Ude:jde)(n,e,t))}function aB(e,t,n){var r=e._id;return e.each(function(){var a=$0(this,r);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return Op(a,r).value[t]}}function r$(e,t){var n;return(typeof t=="number"?sm:t instanceof b7?UN:(n=b7(t))?(t=n,UN):Pde)(e,t)}function Yde(e){return function(){this.removeAttribute(e)}}function Wde(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Xde(e,t,n){var r,a=n+"",i;return function(){var o=this.getAttribute(e);return o===a?null:o===r?i:i=t(r=o,n)}}function Kde(e,t,n){var r,a=n+"",i;return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===r?i:i=t(r=o,n)}}function Zde(e,t,n){var r,a,i;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+"",o===c?null:o===r&&c===a?i:(a=c,i=t(r=o,s)))}}function Jde(e,t,n){var r,a,i;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+"",o===c?null:o===r&&c===a?i:(a=c,i=t(r=o,s)))}}function qde(e,t){var n=WC(e),r=n==="transform"?Ide:r$;return this.attrTween(e,typeof t=="function"?(n.local?Jde:Zde)(n,r,aB(this,"attr."+e,t)):t==null?(n.local?Wde:Yde)(n):(n.local?Kde:Xde)(n,r,t))}function eAe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function tAe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function nAe(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&tAe(e,i)),n}return a._value=t,a}function rAe(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&eAe(e,i)),n}return a._value=t,a}function aAe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=WC(e);return this.tween(n,(r.local?nAe:rAe)(r,t))}function iAe(e,t){return function(){rB(this,e).delay=+t.apply(this,arguments)}}function oAe(e,t){return t=+t,function(){rB(this,e).delay=t}}function lAe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?iAe:oAe)(t,e)):Op(this.node(),t).delay}function sAe(e,t){return function(){$0(this,e).duration=+t.apply(this,arguments)}}function uAe(e,t){return t=+t,function(){$0(this,e).duration=t}}function cAe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?sAe:uAe)(t,e)):Op(this.node(),t).duration}function fAe(e,t){if(typeof t!="function")throw new Error;return function(){$0(this,e).ease=t}}function dAe(e){var t=this._id;return arguments.length?this.each(fAe(t,e)):Op(this.node(),t).ease}function AAe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;$0(this,e).ease=n}}function pAe(e){if(typeof e!="function")throw new Error;return this.each(AAe(this._id,e))}function hAe(e){typeof e!="function"&&(e=EN(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],o=i.length,s=r[a]=[],c,f=0;f<o;++f)(c=i[f])&&e.call(c,c.__data__,f,i)&&s.push(c);return new Vh(r,this._parents,this._name,this._id)}function mAe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,a=n.length,i=Math.min(r,a),o=new Array(r),s=0;s<i;++s)for(var c=t[s],f=n[s],A=c.length,h=o[s]=new Array(A),m,g=0;g<A;++g)(m=c[g]||f[g])&&(h[g]=m);for(;s<r;++s)o[s]=t[s];return new Vh(o,this._parents,this._name,this._id)}function vAe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function gAe(e,t,n){var r,a,i=vAe(t)?rB:$0;return function(){var o=i(this,e),s=o.on;s!==r&&(a=(r=s).copy()).on(t,n),o.on=a}}function yAe(e,t){var n=this._id;return arguments.length<2?Op(this.node(),n).on.on(e):this.each(gAe(n,e,t))}function wAe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function CAe(){return this.on("end.remove",wAe(this._id))}function bAe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=GS(e));for(var r=this._groups,a=r.length,i=new Array(a),o=0;o<a;++o)for(var s=r[o],c=s.length,f=i[o]=new Array(c),A,h,m=0;m<c;++m)(A=s[m])&&(h=e.call(A,A.__data__,m,s))&&("__data__"in A&&(h.__data__=A.__data__),f[m]=h,lb(f[m],t,n,m,f,Op(A,n)));return new Vh(i,this._parents,t,n)}function EAe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=bN(e));for(var r=this._groups,a=r.length,i=[],o=[],s=0;s<a;++s)for(var c=r[s],f=c.length,A,h=0;h<f;++h)if(A=c[h]){for(var m=e.call(A,A.__data__,h,c),g,b=Op(A,n),C=0,x=m.length;C<x;++C)(g=m[C])&&lb(g,t,n,C,m,b);i.push(m),o.push(A)}return new Vh(i,o,t,n)}var xAe=g7.prototype.constructor;function SAe(){return new xAe(this._groups,this._parents)}function BAe(e,t){var n,r,a;return function(){var i=n3(this,e),o=(this.style.removeProperty(e),n3(this,e));return i===o?null:i===n&&o===r?a:a=t(n=i,r=o)}}function a$(e){return function(){this.style.removeProperty(e)}}function kAe(e,t,n){var r,a=n+"",i;return function(){var o=n3(this,e);return o===a?null:o===r?i:i=t(r=o,n)}}function TAe(e,t,n){var r,a,i;return function(){var o=n3(this,e),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),n3(this,e))),o===c?null:o===r&&c===a?i:(a=c,i=t(r=o,s))}}function _Ae(e,t){var n,r,a,i="style."+t,o="end."+i,s;return function(){var c=$0(this,e),f=c.on,A=c.value[i]==null?s||(s=a$(t)):void 0;(f!==n||a!==A)&&(r=(n=f).copy()).on(o,a=A),c.on=r}}function PAe(e,t,n){var r=(e+="")=="transform"?Hde:r$;return t==null?this.styleTween(e,BAe(e,r)).on("end.style."+e,a$(e)):typeof t=="function"?this.styleTween(e,TAe(e,r,aB(this,"style."+e,t))).each(_Ae(this._id,e)):this.styleTween(e,kAe(e,r,t),n).on("end.style."+e,null)}function MAe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function DAe(e,t,n){var r,a;function i(){var o=t.apply(this,arguments);return o!==a&&(r=(a=o)&&MAe(e,o,n)),r}return i._value=t,i}function HAe(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,DAe(e,t,n??""))}function IAe(e){return function(){this.textContent=e}}function LAe(e){return function(){var t=e(this);this.textContent=t??""}}function RAe(e){return this.tween("text",typeof e=="function"?LAe(aB(this,"text",e)):IAe(e==null?"":e+""))}function NAe(e){return function(t){this.textContent=e.call(this,t)}}function $Ae(e){var t,n;function r(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&NAe(a)),t}return r._value=e,r}function FAe(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,$Ae(e))}function VAe(){for(var e=this._name,t=this._id,n=i$(),r=this._groups,a=r.length,i=0;i<a;++i)for(var o=r[i],s=o.length,c,f=0;f<s;++f)if(c=o[f]){var A=Op(c,t);lb(c,e,n,f,o,{time:A.time+A.delay+A.duration,delay:0,duration:A.duration,ease:A.ease})}return new Vh(r,this._parents,e,n)}function OAe(){var e,t,n=this,r=n._id,a=n.size();return new Promise(function(i,o){var s={value:o},c={value:function(){--a===0&&i()}};n.each(function(){var f=$0(this,r),A=f.on;A!==e&&(t=(e=A).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),f.on=t}),a===0&&i()})}var QAe=0;function Vh(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function i$(){return++QAe}var Oh=g7.prototype;Vh.prototype={constructor:Vh,select:bAe,selectAll:EAe,selectChild:Oh.selectChild,selectChildren:Oh.selectChildren,filter:hAe,merge:mAe,selection:SAe,transition:VAe,call:Oh.call,nodes:Oh.nodes,node:Oh.node,size:Oh.size,empty:Oh.empty,each:Oh.each,on:yAe,attr:qde,attrTween:aAe,style:PAe,styleTween:HAe,text:RAe,textTween:FAe,remove:CAe,tween:Gde,delay:lAe,duration:cAe,ease:dAe,easeVarying:pAe,end:OAe,[Symbol.iterator]:Oh[Symbol.iterator]};function zAe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var UAe={time:null,delay:0,duration:250,ease:zAe};function jAe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function GAe(e){var t,n;e instanceof Vh?(t=e._id,e=e._name):(t=i$(),(n=UAe).time=qS(),e=e==null?null:e+"");for(var r=this._groups,a=r.length,i=0;i<a;++i)for(var o=r[i],s=o.length,c,f=0;f<s;++f)(c=o[f])&&lb(c,e,t,f,o,n||jAe(c,t));return new Vh(r,this._parents,e,t)}g7.prototype.interrupt=zde,g7.prototype.transition=GAe;function YAe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function sb(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function WAe(e){return e=sb(Math.abs(e)),e?e[1]:NaN}function XAe(e,t){return function(n,r){for(var a=n.length,i=[],o=0,s=e[0],c=0;a>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),i.push(n.substring(a-=s,a+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function KAe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ZAe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function iB(e){if(!(t=ZAe.exec(e)))throw new Error("invalid format: "+e);var t;return new oB({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}iB.prototype=oB.prototype;function oB(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}oB.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function JAe(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var o$;function qAe(e,t){var n=sb(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(o$=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+sb(e,Math.max(0,t+i-1))[0]}function l$(e,t){var n=sb(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const s$={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:YAe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>l$(e*100,t),r:l$,s:qAe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function u$(e){return e}var c$=Array.prototype.map,f$=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function epe(e){var t=e.grouping===void 0||e.thousands===void 0?u$:XAe(c$.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?u$:KAe(c$.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function f(h){h=iB(h);var m=h.fill,g=h.align,b=h.sign,C=h.symbol,x=h.zero,k=h.width,_=h.comma,D=h.precision,O=h.trim,I=h.type;I==="n"?(_=!0,I="g"):s$[I]||(D===void 0&&(D=12),O=!0,I="g"),(x||m==="0"&&g==="=")&&(x=!0,m="0",g="=");var $=C==="$"?n:C==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",Q=C==="$"?r:/[%p]/.test(I)?o:"",ee=s$[I],K=/[defgprs%]/.test(I);D=D===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,D)):Math.max(0,Math.min(20,D));function re(U){var G=$,Z=Q,Y,X,oe;if(I==="c")Z=ee(U)+Z,U="";else{U=+U;var me=U<0||1/U<0;if(U=isNaN(U)?c:ee(Math.abs(U),D),O&&(U=JAe(U)),me&&+U==0&&b!=="+"&&(me=!1),G=(me?b==="("?b:s:b==="-"||b==="("?"":b)+G,Z=(I==="s"?f$[8+o$/3]:"")+Z+(me&&b==="("?")":""),K){for(Y=-1,X=U.length;++Y<X;)if(oe=U.charCodeAt(Y),48>oe||oe>57){Z=(oe===46?a+U.slice(Y+1):U.slice(Y))+Z,U=U.slice(0,Y);break}}}_&&!x&&(U=t(U,1/0));var ae=G.length+U.length+Z.length,ye=ae<k?new Array(k-ae+1).join(m):"";switch(_&&x&&(U=t(ye+U,ye.length?k-Z.length:1/0),ye=""),g){case"<":U=G+U+Z+ye;break;case"=":U=G+ye+U+Z;break;case"^":U=ye.slice(0,ae=ye.length>>1)+G+U+Z+ye.slice(ae);break;default:U=ye+G+U+Z;break}return i(U)}return re.toString=function(){return h+""},re}function A(h,m){var g=f((h=iB(h),h.type="f",h)),b=Math.max(-8,Math.min(8,Math.floor(WAe(m)/3)))*3,C=Math.pow(10,-b),x=f$[8+b/3];return function(k){return g(C*k)+x}}return{format:f,formatPrefix:A}}var ub;tpe({thousands:",",grouping:[3],currency:["$",""]});function tpe(e){return ub=epe(e),ub.format,ub.formatPrefix,ub}function k7(e,t,n){this.k=e,this.x=t,this.y=n}k7.prototype={constructor:k7,scale:function(e){return e===1?this:new k7(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new k7(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},k7.prototype;const npe={ref:"chipRoot",class:"dnd-double-chip__group"},rpe={class:"dnd-double-chip__top"},ape={key:0,class:"dnd-basket-chip__handler"},ipe=["title"],ope={class:"dnd-double-chip__title"},lpe=["innerHTML"],spe={class:"dnd-double-chip__bottom"},upe={key:0,class:"dnd-basket-chip__fixed-axes-block"},cpe=d.defineComponent({__name:"DndDoubleChip",props:d.mergeModels({info:{},error:{type:Boolean},searchOptions:{type:Function},sortable:{type:Boolean}},{filter:{required:!0},filterModifiers:{},fixedAxes:{default:{}},fixedAxesModifiers:{}}),emits:d.mergeModels(["close-chip","update:filter","update:fixedAxes"],["update:filter","update:fixedAxes"]),setup(e,{emit:t}){var s;const n=e,r=da(),a=d.useModel(e,"filter"),i=d.useModel(e,"fixedAxes"),o=d.ref((s=r.value.uniqueValuesData.value[n.info.id])==null?void 0:s.options);return d.watch(()=>r.value.uniqueValuesData.value,c=>{var A;const f=(A=c[n.info.id])==null?void 0:A.options;f&&(o.value=f),n.info.axesToBeFixed.forEach(h=>{i.value[h].axisValue===void 0&&(i.value[h].axisValue=c[h].list[0])})},{immediate:!0}),d.watch(()=>o.value,async c=>{!c||!c.length||a.value===void 0&&(a.value=c[0].value)},{immediate:!0}),(c,f)=>(d.openBlock(),d.createElementBlock("div",npe,[d.createElementVNode("div",{class:d.normalizeClass([{error:c.error,sortable:c.sortable},"dnd-double-chip"])},[d.createElementVNode("div",rpe,[d.createElementVNode("div",{class:d.normalizeClass(["dnd-double-chip__icon",{error:c.error}])},[c.error?(d.openBlock(),d.createBlock(d.unref(pt.PlMaskIcon16),{key:0,name:"warning"})):(d.openBlock(),d.createBlock(d.unref(q5),{key:1,name:c.info.isSubsetFilter?"cell-type-subset":c.info.type==="String"?"cell-type-txt":"cell-type-num"},null,8,["name"]))],2),c.sortable?(d.openBlock(),d.createElementBlock("div",ape)):d.createCommentVNode("",!0),d.createVNode(d.unref(pt.PlMaskIcon16),{name:"drag-dots"}),d.createElementVNode("div",{class:"dnd-double-chip__title-wrapper",title:c.info.title},[d.createElementVNode("div",ope,d.toDisplayString(c.info.title),1)],8,ipe),d.createElementVNode("div",{innerHTML:d.unref(HS),class:"dnd-double-chip__icon-close",onClick:f[0]||(f[0]=A=>c.$emit("close-chip",n.info.id))},null,8,lpe)]),d.createElementVNode("div",spe,[o.value===void 0||o.value.length<1e3?(d.openBlock(),d.createBlock(d.unref(pt.PlDropdown),{key:0,modelValue:a.value,"onUpdate:modelValue":f[1]||(f[1]=A=>a.value=A),options:o.value},null,8,["modelValue","options"])):(d.openBlock(),d.createBlock(d.unref(jC),{key:1,modelValue:a.value,"onUpdate:modelValue":f[2]||(f[2]=A=>a.value=A),"options-search":A=>c.searchOptions(n.info.id,A)},null,8,["modelValue","options-search"]))])],2),c.info.axesToBeFixed.length>0?(d.openBlock(),d.createElementBlock("div",upe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.info.axesToBeFixed,A=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:A},[i.value[A]?(d.openBlock(),d.createBlock(d.unref(jC),{key:0,modelValue:i.value[A].axisValue,"onUpdate:modelValue":[h=>i.value[A].axisValue=h,f[3]||(f[3]=h=>c.$emit("update:fixedAxes",i.value))],"options-search":h=>c.searchOptions(A,h),label:c.info.axesToBeFixedInfo[A].title},null,8,["modelValue","onUpdate:modelValue","options-search","label"])):d.createCommentVNode("",!0)],64))),128))])):d.createCommentVNode("",!0)],512))}}),fpe={key:0,class:"dnd-basket-chip__handler"},dpe={class:"dnd-basket-chip__title-wrapper"},Ape=["title"],ppe=["title"],hpe=["innerHTML"],mpe={key:0,class:"dnd-basket-chip__fixed-axes-block"},vpe=d.defineComponent({__name:"DnDBasketChip",props:d.mergeModels({error:{type:Boolean},info:{},sortable:{type:Boolean},searchOptions:{type:Function}},{modelValue:{default:{}},modelModifiers:{}}),emits:d.mergeModels(["close-chip","update:modelValue"],["update:modelValue"]),setup(e,{emit:t}){const n=e,r=da(),a=d.useModel(e,"modelValue"),i=t,o=d.ref(),s=d.computed(()=>n.info.uniqueValues.join("/"));function c(){i("close-chip",n.info.id)}return d.watch(()=>r.value.uniqueValuesData.value,f=>{n.info.axesToBeFixed.forEach(A=>{a.value[A].axisValue===void 0&&(a.value[A].axisValue=f[A].list[0])})},{immediate:!0}),(f,A)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"chipRoot",ref:o,class:"dnd-basket-chip__group"},[d.createElementVNode("div",{class:d.normalizeClass([{error:f.error,sortable:f.sortable},"dnd-basket-chip"])},[d.createElementVNode("div",{class:d.normalizeClass(["dnd-basket-chip__icon",{error:f.error}])},[f.error?(d.openBlock(),d.createBlock(d.unref(WR),{key:0,name:"warning"})):(d.openBlock(),d.createBlock(d.unref(q5),{key:1,name:f.info.isSubsetFilter?"cell-type-subset":f.info.type==="String"?"cell-type-txt":"cell-type-num"},null,8,["name"]))],2),f.sortable?(d.openBlock(),d.createElementBlock("div",fpe)):d.createCommentVNode("",!0),d.createVNode(d.unref(WR),{name:"drag-dots"}),d.createElementVNode("div",dpe,[d.createElementVNode("div",{class:"dnd-basket-chip__title",title:f.info.title},d.toDisplayString(f.info.title),9,Ape),f.info.nonHomogenous?(d.openBlock(),d.createElementBlock("div",{key:0,class:"dnd-basket-chip__sub-title",title:s.value},d.toDisplayString(s.value),9,ppe)):d.createCommentVNode("",!0)]),d.createElementVNode("div",{innerHTML:d.unref(HS),class:"dnd-basket-chip__icon-close",onClick:c},null,8,hpe)],2),f.info.axesToBeFixed.length>0?(d.openBlock(),d.createElementBlock("div",mpe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(f.info.axesToBeFixed,h=>(d.openBlock(),d.createBlock(d.unref(jC),{key:h,modelValue:a.value[h].axisValue,"onUpdate:modelValue":[m=>a.value[h].axisValue=m,A[0]||(A[0]=m=>f.$emit("update:modelValue",a.value))],"options-search":m=>f.searchOptions(h,m),label:f.info.axesToBeFixedInfo[h].title},null,8,["modelValue","onUpdate:modelValue","options-search","label"]))),128))])):d.createCommentVNode("",!0)],512))}}),gpe={ref:"chipRoot",class:"dnd-double-chip__group"},ype={class:"dnd-double-chip__top"},wpe={class:"dnd-double-chip__icon"},Cpe=["title"],bpe={class:"dnd-double-chip__title"},Epe=["innerHTML"],xpe={class:"dnd-double-chip__bottom-range"},Spe={class:"dnd-double-chip__bottom-range-row"},Bpe={class:"dnd-double-chip__bottom-range-row"},kpe={key:0,class:"dnd-basket-chip__fixed-axes-block"},Tpe=d.defineComponent({__name:"DnDRangeChip",props:d.mergeModels({info:{},error:{type:Boolean},searchOptions:{type:Function}},{filter:{required:!0},filterModifiers:{},fixedAxes:{required:!0},fixedAxesModifiers:{}}),emits:d.mergeModels(["close-chip","update:fixedAxes"],["update:filter","update:fixedAxes"]),setup(e,{emit:t}){var s,c;const n=e,r=da(),a=d.useModel(e,"filter"),i=d.useModel(e,"fixedAxes"),o=d.reactive({min:(s=a.value)==null?void 0:s[0],max:(c=a.value)==null?void 0:c[1]});return d.watch(()=>o,f=>{a.value=f},{deep:!0}),d.watch(()=>r.value.uniqueValuesData.value,f=>{n.info.axesToBeFixed.forEach(A=>{i.value[A].axisValue===void 0&&(i.value[A].axisValue=f[A].list[0])})},{immediate:!0}),(f,A)=>(d.openBlock(),d.createElementBlock("div",gpe,[d.createElementVNode("div",{class:d.normalizeClass([{error:f.error},"dnd-double-chip"])},[d.createElementVNode("div",ype,[d.createElementVNode("div",wpe,[d.createVNode(d.unref(q5),{name:"cell-type-num"})]),d.createElementVNode("div",{class:"dnd-double-chip__title-wrapper",title:f.info.title},[d.createElementVNode("div",bpe,d.toDisplayString(f.info.title),1)],8,Cpe),d.createElementVNode("div",{innerHTML:d.unref(HS),class:"dnd-double-chip__icon-close",onClick:A[0]||(A[0]=h=>f.$emit("close-chip",n.info.id))},null,8,Epe)]),d.createElementVNode("div",xpe,[d.createElementVNode("div",Spe,[d.createVNode(d.unref(pt.PlNumberField),{label:"Min",modelValue:o.min,"onUpdate:modelValue":A[1]||(A[1]=h=>o.min=h),updateOnEnterOrClickOutside:!0,useIncrementButtons:!1},null,8,["modelValue"])]),d.createElementVNode("div",Bpe,[d.createVNode(d.unref(pt.PlNumberField),{label:"Max",modelValue:o.max,"onUpdate:modelValue":A[2]||(A[2]=h=>o.max=h),updateOnEnterOrClickOutside:!0,useIncrementButtons:!1},null,8,["modelValue"])])])],2),f.info.axesToBeFixed.length>0?(d.openBlock(),d.createElementBlock("div",kpe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(f.info.axesToBeFixed,h=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:h},[i.value[h]?(d.openBlock(),d.createBlock(d.unref(jC),{key:0,modelValue:i.value[h].axisValue,"onUpdate:modelValue":[m=>i.value[h].axisValue=m,A[3]||(A[3]=m=>f.$emit("update:fixedAxes",i.value))],"options-search":m=>f.searchOptions(h,m),label:f.info.axesToBeFixedInfo[h].title},null,8,["modelValue","onUpdate:modelValue","options-search","label"])):d.createCommentVNode("",!0)],64))),128))])):d.createCommentVNode("",!0)],512))}}),_pe={class:"dnd-basket__title"},Ppe={key:0,class:"dnd-basket__required"},Mpe={class:"dnd-basket__drop-container"},Dpe={key:0,class:"dnd-basket__placeholder"},Hpe=100,Wv=d.defineComponent({__name:"DndBasket",props:{id:{},title:{},multiple:{type:Boolean},isFilter:{type:Boolean},required:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},consistency:{},labelsInfo:{},droppedIds:{},availableIds:{},selectedFilters:{},selectedRanges:{},fixedAxes:{},info:{},draggedId:{},sortable:{type:Boolean}},emits:["drop-item","remove-item","select-filter-value","select-filter-range","select-fixed-axis-value","reorder"],setup(e,{emit:t}){const n=e,r=t,a=d.ref(),i=d.ref(),o=d.ref(0);let s=d.reactive(n.selectedFilters??{}),c=d.reactive(n.selectedRanges??{}),f=d.reactive(n.fixedAxes??{});const A=d.computed(()=>!(n.disabled||!n.multiple&&n.droppedIds.length>0)),h=d.computed(()=>n.disabled?"1 true":!A.value&&n.draggedId?"2 true":!1);d.watch(()=>n.selectedFilters,()=>{s=d.reactive(n.selectedFilters??{})}),d.watch(()=>n.fixedAxes,()=>{f=d.reactive(n.fixedAxes??{})}),d.watch(()=>n.droppedIds,()=>{o.value++},{deep:!0}),n.sortable&&pt.useSortable(i,{handle:".dnd-basket-chip__handler",onChange(_){r("reorder",_.map(D=>n.droppedIds[D]))}});function m(){a.value&&!n.disabled&&A.value&&a.value.classList.add("active")}function g(){a.value&&a.value.classList.remove("active")}function b(_){_.stopPropagation(),A.value&&(n.draggedId&&r("drop-item",{draggedId:n.draggedId,id:n.id}),g())}function C(_){_.preventDefault()}function x(_){_.preventDefault(),m()}const k=async(_,D)=>{var $;const O=(($=n.labelsInfo[_])==null?void 0:$.options)??[],I=D.toLowerCase();return O.filter(Q=>Q.value.toLowerCase().includes(I)||Q.label.toLowerCase().includes(I)).slice(0,Hpe)};return(_,D)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"basketRoot",ref:a,class:d.normalizeClass([{disabled:h.value,empty:_.droppedIds.length===0,readonly:_.readonly},"dnd-basket"]),dropzone:"true",onDrop:b,onDragenter:C,onDragover:x,onDragleave:g},[d.createElementVNode("div",_pe,[_.required?(d.openBlock(),d.createElementBlock("span",Ppe,D[0]||(D[0]=[d.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"16",viewBox:"0 0 6 16",fill:"none"},[d.createElementVNode("path",{d:"M2.01685 6.8L3 5.34159L3.97612 6.8L4.89607 6.12743L3.81461 4.7469L5.5 4.25133L5.14888 3.16106L3.50562 3.77699L3.56882 2H2.43118L2.49438 3.77699L0.851124 3.16106L0.5 4.25133L2.18539 4.7469L1.09691 6.12743L2.01685 6.8Z",fill:"#F1222F"})],-1)]))):d.createCommentVNode("",!0),d.createTextVNode(" "+d.toDisplayString(_.title),1)]),d.createElementVNode("div",Mpe,[_.droppedIds.length?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Dpe," Drop dimensions here ")),(d.openBlock(),d.createElementBlock("div",{ref_key:"listRef",ref:i,key:o.value,class:"dnd-basket__chip-wrapper"},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(_.droppedIds,(O,I)=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:O},[!_.isFilter||_.info[O].isSubsetFilter?(d.openBlock(),d.createBlock(vpe,{key:0,modelValue:d.unref(f)[O],"onUpdate:modelValue":[$=>d.unref(f)[O]=$,$=>_.$emit("select-fixed-axis-value",{v:$,idx:I})],sortable:_.sortable,error:_.consistency[O]===!1,info:_.info[O],"search-options":k,onCloseChip:$=>_.$emit("remove-item",{chipId:O,basketId:_.id})},null,8,["modelValue","onUpdate:modelValue","sortable","error","info","onCloseChip"])):_.info[O].isDiscreteFilter?(d.openBlock(),d.createBlock(cpe,{key:1,filter:d.unref(s)[O],"onUpdate:filter":[$=>d.unref(s)[O]=$,$=>_.$emit("select-filter-value",{v:$,idx:I})],"fixed-axes":d.unref(f)[O],"onUpdate:fixedAxes":[$=>d.unref(f)[O]=$,$=>_.$emit("select-fixed-axis-value",{v:$,idx:I})],info:_.info[O],error:_.consistency[O]===!1,sortable:_.sortable,"search-options":k,onCloseChip:$=>_.$emit("remove-item",{chipId:O,basketId:_.id})},null,8,["filter","onUpdate:filter","fixed-axes","onUpdate:fixedAxes","info","error","sortable","onCloseChip"])):(d.openBlock(),d.createBlock(Tpe,{key:2,filter:d.unref(c)[O],"onUpdate:filter":[$=>d.unref(c)[O]=$,$=>_.$emit("select-filter-range",{v:$,idx:I})],"fixed-axes":d.unref(f)[O],"onUpdate:fixedAxes":[$=>d.unref(f)[O]=$,$=>_.$emit("select-fixed-axis-value",{v:$,idx:I})],info:_.info[O],error:_.consistency[O]===!1,"search-options":k,onCloseChip:$=>_.$emit("remove-item",{chipId:O,basketId:_.id})},null,8,["filter","onUpdate:filter","fixed-axes","onUpdate:fixedAxes","info","error","onCloseChip"]))],64))),128))]))])],34))}}),Ipe={class:"inputs-block"},Lpe={class:"separator"},Rpe={class:"arrow-circle"},Npe={class:"inputs-block"},Xv=d.defineComponent({__name:"FormLayout",setup(e){return(t,n)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",{class:"left-block",onClick:n[0]||(n[0]=r=>r.stopPropagation())},[n[2]||(n[2]=d.createElementVNode("h3",null," Data Mapping ",-1)),d.createElementVNode("div",Ipe,[d.renderSlot(t.$slots,"dataInputs"),d.renderSlot(t.$slots,"mandatoryOptions"),d.renderSlot(t.$slots,"metadataOptions")])]),d.createElementVNode("div",Lpe,[d.createElementVNode("div",Rpe,[d.createVNode(d.unref(pt.PlIcon16),{name:"arrow-right"})])]),d.createElementVNode("div",{class:"right-block",onClick:n[1]||(n[1]=r=>r.stopPropagation())},[n[3]||(n[3]=d.createElementVNode("h3",null," Chart variables ",-1)),d.createElementVNode("div",Npe,[d.renderSlot(t.$slots,"chartVar")])])],64))}}),$pe={class:"dnd-chip__icon"},Fpe={class:"dnd-chip__title-wrapper"},Vpe=["title"],Ope=["title"],cb=d.defineComponent({__name:"DndChip",props:{info:{}},emits:["dragstart","dragend"],setup(e,{emit:t}){const n=e,r=t,a=d.ref(),i=d.computed(()=>n.info.uniqueValues.join("/"));function o(c){var f,A;(f=c.dataTransfer)==null||f.clearData(),(A=c.dataTransfer)==null||A.setData("text/plain",n.info.id),r("dragstart",n.info.id),c.target.style.opacity="0.4",a.value&&a.value.classList.toggle("drag-active")}function s(c){r("dragend",n.info.id),c.target.style.opacity="1",a.value&&a.value.classList.toggle("drag-active")}return(c,f)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"chipRoot",ref:a,draggable:"true",class:"dnd-chip",onDragstart:o,onDragend:s},[d.createElementVNode("div",$pe,[d.createVNode(d.unref(q5),{name:c.info.isSubsetFilter?"cell-type-subset":c.info.type==="String"?"cell-type-txt":"cell-type-num"},null,8,["name"])]),d.createElementVNode("div",Fpe,[d.createElementVNode("div",{class:"dnd-chip__title",title:c.info.title},d.toDisplayString(c.info.title),9,Vpe),c.info.nonHomogenous?(d.openBlock(),d.createElementBlock("div",{key:0,class:"dnd-chip__sub-title",title:i.value},d.toDisplayString(i.value),9,Ope)):d.createCommentVNode("",!0)])],544))}}),Qpe={key:0,class:"metadata-block"},zpe={class:"title"},Upe={class:"metadata-block__search"},jpe={class:"metadata-block__items"},T7=d.defineComponent({__name:"OptionsList",props:{options:{},chipInfo:{},title:{default:"Metadata"}},emits:["dragged-id-update"],setup(e,{emit:t}){const n=e,r=d.computed(()=>n.options.length===0),a=d.ref(),i=d.computed(()=>{var s;const o=((s=a.value)==null?void 0:s.toLowerCase())??"";return n.options.filter(c=>{const f=n.chipInfo[c.id].title??"";return f==null?void 0:f.toLowerCase().includes(o)})});return(o,s)=>r.value?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Qpe,[d.createElementVNode("div",zpe,d.toDisplayString(o.title),1),d.createElementVNode("div",Upe,[d.createVNode(d.unref(pt.PlSearchField),{modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=c=>a.value=c),placeholder:"Find...",clearable:""},null,8,["modelValue"])]),d.createElementVNode("div",jpe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.value,({id:c})=>(d.openBlock(),d.createBlock(cb,{key:c,info:o.chipInfo[c],onDragstart:s[1]||(s[1]=f=>o.$emit("dragged-id-update",f)),onDragend:s[2]||(s[2]=f=>o.$emit("dragged-id-update",null))},null,8,["info"]))),128))])]))}}),Gpe={key:0,class:"metadata-block",style:{flexShrink:0}},Ype={class:"title"},Wpe={class:"metadata-block__items"},_7=d.defineComponent({__name:"MandatoryOptions",props:{options:{},chipInfo:{},title:{default:"Drag to build the chart"}},emits:["dragged-id-update"],setup(e,{emit:t}){const n=e,r=d.computed(()=>n.options.length===0);return(a,i)=>r.value?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Gpe,[d.createElementVNode("div",Ype,d.toDisplayString(a.title),1),d.createElementVNode("div",Wpe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a.options,({id:o})=>(d.openBlock(),d.createBlock(cb,{key:o,info:a.chipInfo[o],onDragstart:i[0]||(i[0]=s=>a.$emit("dragged-id-update",s)),onDragend:i[1]||(i[1]=s=>a.$emit("dragged-id-update",null))},null,8,["info"]))),128))])]))}});function i3(e,t,n,r,a,i){const o=e.value.reactive.optionsState,s=d.toRef(e.value.reactive,"optionsState"),c=d.computed(()=>e.value.inputGuide.value),f=d.computed(()=>e.value.uniqueValuesData.value);function A(X){return OR(s,X,e.value.controller,e.value.columnsDataStore)}function h(X){return VR(s,X,e.value.controller,e.value.columnsDataStore,c)}function m(X){return FR(s,X,e.value.controller,e.value.columnsDataStore,c)}const g=d.ref({...t.reduce((X,oe)=>(X[oe]=A(oe),X),{})}),b=d.ref({...n.reduce((X,oe)=>(X[oe]=m(oe),X),{}),...r.reduce((X,oe)=>(X[oe]=h(oe),X),{})}),C=d.computed(()=>QR(o,c)),x=d.computed(()=>Zle(c,a)),k=d.computed(()=>Jle(c,a)),_=d.ref(null),D=d.computed(()=>{const X=new Set;return a.forEach(oe=>{C.value[oe].forEach(me=>{X.add(me.value)}),o.components[oe].selectorStates.forEach(me=>{X.add(me.selectedSource)})}),UR(c.value,e.value.uniqueValuesData.value,[...X])});function O(X){return o.components[X].selectorStates.reduce((oe,me)=>(me.type!=="range"&&(oe[me.selectedSource]=me.selectedFilterValue),oe),{})}function I(X){return o.components[X].selectorStates.reduce((oe,me)=>(oe[me.selectedSource]=me.selectedFilterRange?[me.selectedFilterRange.min,me.selectedFilterRange.max]:me.selectedFilterValue?[Number(me.selectedFilterValue),Number(me.selectedFilterValue)]:[0,0],oe),{})}function $(X){return o.components[X].selectorStates.reduce((oe,me)=>{const ae=c.value.getSourceInfo(me.selectedSource);return ae.kind==="axis"||(oe[me.selectedSource]=ae.axesToBeFixed.reduce((ye,Ce)=>{var ce;return ye[Ce]=((ce=me.fixedAxes)==null?void 0:ce.find(ge=>ge.axisSource===Ce))??{axisSource:Ce,axisValue:void 0,axisIdx:ae.axesToBeFixedIndexes[Ce]},ye},{})??{}),oe},{})}function Q(X){b.value[X.id]=[...b.value[X.id],X.draggedId],_.value=null}function ee(X){b.value[X.basketId]=b.value[X.basketId].filter(oe=>oe!==X.chipId)}function K(X,oe){b.value[oe]=X}function re(X){return new Set(c.value.components[X].options.map(oe=>oe.value))}function U(X){return c.value.components[X].stateConsistency}function G(X){return!c.value.readyData||C.value[X].length===0||_.value!==null&&!D.value[_.value].availableBasketIds.has(X)}const Z=d.computed(()=>a.map(X=>{var ye;const oe=c.value.components[X],me=X==="filters",ae={id:X,title:i[X],isFilter:me,sortable:X==="tooltipContent",multiple:oe.multipleSelectors,required:oe.required,disabled:G(X),readonly:((ye=e.value.readonlyInputs)==null?void 0:ye.includes(X))??!1,consistency:U(X),draggedId:_.value,availableIds:re(X),droppedIds:b.value[X],info:D.value,fixedAxes:$(X),labelsInfo:f.value,listeners:{"drop-item":Q,"remove-item":ee,reorder:Ce=>K(Ce,X),"select-fixed-axis-value":Ce=>{const ce=o.components[X].selectorStates[Ce.idx];ce.fixedAxes=Object.values(Ce.v);for(const ge of Object.values(o.components))for(const ze of ge.selectorStates)ce.fixedAxes.forEach(Ne=>{ze.fixedAxes&&(ze.fixedAxes=ze.fixedAxes.map(Ge=>({...Ge,axisValue:Ne.axisSource===Ge.axisSource?Ne.axisValue:Ge.axisValue})))})}}};return me&&(ae.selectedFilters=O(X),ae.selectedRanges=I(X),ae.listeners["select-filter-value"]=Ce=>{const ce=o.components[X].selectorStates[Ce.idx];ce.type="equals",ce.selectedFilterValue=Ce.v},ae.listeners["select-filter-range"]=Ce=>{const ce=o.components[X].selectorStates[Ce.idx];ce.type="range",ce.selectedFilterRange=Ce.v}),ae}));function Y(){_.value=null}return{draggedId:_,cleanDraggedId:Y,basketsData:Z,freeMetaOptions:x,freeMandatoryOptions:k,chipInfo:D,dataStateValues:g,dataOptions:C}}const Xpe={class:"data-form-input-item"},Kpe=d.defineComponent({__name:"DiscreteForm",setup(e){const t=da();d.watch(()=>t.value.commonHelpersData.primaryGroups.value,PS(t));const n=["filters","primaryGrouping","secondaryGrouping","tabBy","facetBy"],r={filters:"Filter",primaryGrouping:"Primary grouping",secondaryGrouping:"Secondary grouping",tabBy:"Tab by",facetBy:"Facet by"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["y"],["filters","tabBy"],["primaryGrouping","secondaryGrouping","facetBy"],n,r);console.log("updatedForm! discrete");const h=d.computed(()=>{var m;return((m=t.value.readonlyInputs)==null?void 0:m.includes("y"))??!1});return(m,g)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",Xpe,[d.createVNode(d.unref(pt.PlDropdown),{modelValue:d.unref(f).y,"onUpdate:modelValue":g[0]||(g[0]=b=>d.unref(f).y=b),options:d.unref(A).y,disabled:h.value,error:d.unref(Xy)("y",d.unref(t).inputGuide.value),label:"Y:",clearable:!h.value},null,8,["modelValue","options","disabled","error","clearable"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(_7,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:g[1]||(g[1]=b=>a.value=b)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(T7,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:g[2]||(g[2]=b=>a.value=b)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),b=>(d.openBlock(),d.createElementBlock("div",{key:b.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},b,d.toHandlers(b.listeners)),null,16)]))),128))]),_:1}))}}),Zpe={class:"data-form-input-item"},Jpe={class:"data-form-input-item",style:{"margin-top":"10px"}},qpe=d.defineComponent({__name:"ScatterplotForm",setup(e){const t=da(),n=["filters","grouping","size","shape","tooltipContent","label","tabBy","facetBy"],r={filters:"Filter",grouping:"Grouping / Color",size:"Size",shape:"Shape",tooltipContent:"Tooltip",label:"Label",tabBy:"Tab by",facetBy:"Facet by"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["x","y"],["filters","tabBy"],["grouping","size","shape","tooltipContent","label","facetBy"],n,r),h=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("x"))??!1}),m=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("y"))??!1});return(g,b)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",Zpe,[d.createVNode(d.unref(pt.PlDropdown),{label:"X:",clearable:"",modelValue:d.unref(f).x,"onUpdate:modelValue":b[0]||(b[0]=C=>d.unref(f).x=C),options:d.unref(A).x,disabled:h.value},null,8,["modelValue","options","disabled"])]),d.createElementVNode("div",Jpe,[d.createVNode(d.unref(pt.PlDropdown),{label:"Y:",clearable:"",modelValue:d.unref(f).y,"onUpdate:modelValue":b[1]||(b[1]=C=>d.unref(f).y=C),options:d.unref(A).y,disabled:m.value},null,8,["modelValue","options","disabled"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(_7,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:b[2]||(b[2]=C=>a.value=C)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(T7,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:b[3]||(b[3]=C=>a.value=C)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),C=>(d.openBlock(),d.createElementBlock("div",{key:C.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},C,d.toHandlers(C.listeners)),null,16)]))),128))]),_:1}))}}),e0e={class:"data-form-input-item"},t0e={class:"data-form-input-item",style:{"margin-top":"10px"}},n0e=d.defineComponent({__name:"ScatterplotUmapForm",setup(e){const t=da(),n=["filters","grouping","tabBy","tooltipContent","label"],r={filters:"Filter",grouping:"Grouping / Color",tabBy:"Tab by",tooltipContent:"Tooltip",label:"Label"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["x","y"],["filters","tabBy"],["grouping","tooltipContent","label"],n,r),h=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("x"))??!1}),m=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("y"))??!1});return(g,b)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",e0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"X:",clearable:"",modelValue:d.unref(f).x,"onUpdate:modelValue":b[0]||(b[0]=C=>d.unref(f).x=C),options:d.unref(A).x,disabled:h.value},null,8,["modelValue","options","disabled"])]),d.createElementVNode("div",t0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Y:",clearable:"",modelValue:d.unref(f).y,"onUpdate:modelValue":b[1]||(b[1]=C=>d.unref(f).y=C),options:d.unref(A).y,disabled:m.value},null,8,["modelValue","options","disabled"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(_7,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:b[2]||(b[2]=C=>a.value=C)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(T7,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:b[3]||(b[3]=C=>a.value=C)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),C=>(d.openBlock(),d.createElementBlock("div",{key:C.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},C,d.toHandlers(C.listeners)),null,16)]))),128))]),_:1}))}}),r0e={class:"data-form-input-item"},a0e=d.defineComponent({__name:"HeatmapForm",setup(e){const t=da(),n=["filters","x","y","xGroupBy","yGroupBy","tooltipContent","tabBy","facetBy","annotationsX","annotationsY"],r={filters:"Filter",x:"X",y:"Y",xGroupBy:"X group",yGroupBy:"Y group",tooltipContent:"Tooltip",tabBy:"Tab by",facetBy:"Facet by",annotationsX:"Annotations X",annotationsY:"Annotations Y"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["value"],["filters","tabBy"],["x","y","xGroupBy","yGroupBy","tooltipContent","facetBy","annotationsX","annotationsY"],n,r);console.log("heatmap updates");const h=d.computed(()=>{var m;return((m=t.value.readonlyInputs)==null?void 0:m.includes("value"))??!1});return(m,g)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",r0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Data source:",clearable:"",modelValue:d.unref(f).value,"onUpdate:modelValue":g[0]||(g[0]=b=>d.unref(f).value=b),options:d.unref(A).value,disabled:h.value,error:d.unref(Xy)("value",d.unref(t).inputGuide.value)},null,8,["modelValue","options","disabled","error"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(_7,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:g[1]||(g[1]=b=>a.value=b)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(T7,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:g[2]||(g[2]=b=>a.value=b)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),b=>(d.openBlock(),d.createElementBlock("div",{key:b.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},b,d.toHandlers(b.listeners)),null,16)]))),128))]),_:1}))}}),i0e={class:"data-form-input-item"},o0e={key:0,class:"metadata-block"},l0e={class:"metadata-block__items"},s0e={key:1,class:"metadata-block"},u0e={class:"metadata-block__items"},c0e={key:0,class:"data-form-input-item"},f0e=d.defineComponent({__name:"DendroForm",setup(e){const t=da(),n=t.value.reactive.optionsState,r=d.toRef(t.value.reactive,"optionsState"),a=d.computed(()=>t.value.inputGuide.value),i=d.computed(()=>t.value.uniqueValuesData.value);function o(Z){return OR(r,Z,t.value.controller,t.value.columnsDataStore)}function s(Z){return VR(r,Z,t.value.controller,t.value.columnsDataStore,a)}function c(Z){return FR(r,Z,t.value.controller,t.value.columnsDataStore,a)}const f=d.ref({value:o("value"),tableContent:s("tableContent"),heatmapAnnotation:s("heatmapAnnotation"),heatmapForSequence:s("heatmapForSequence"),filters:c("filters"),tabBy:c("tabBy"),height:s("height"),labels:s("labels"),nodeShape:s("nodeShape"),nodeColor:s("nodeColor"),nodeSize:s("nodeSize"),lineColor:s("lineColor"),heatmapAxis:s("heatmapAxis"),heatmapGroup:s("heatmapGroup")});d.watch(()=>f.value.nodeShape,Z=>{t.value.reactive.layersSettings.dendro.dotShape=Z.length?{type:"nodeShape",value:Z[0]}:K5}),d.watch(()=>f.value.nodeColor,Z=>{t.value.reactive.layersSettings.dendro.dotFill=Z.length?{type:"nodeColor",value:Z[0]}:yo}),d.watch(()=>f.value.lineColor,Z=>{t.value.reactive.layersSettings.dendro.lineColor=Z.length?{type:"lineColor",value:Z[0]}:yo});const A=d.computed(()=>QR(n,a)),h=d.computed(()=>DS(a,g)),m=d.computed(()=>h.value.filter(Z=>Z.info.kind==="axis")),g=["height","tableContent","labels","heatmapAnnotation","heatmapAxis","heatmapGroup","heatmapForSequence","nodeShape","nodeColor","nodeSize","lineColor"],b={height:"Connections length",tableContent:"Table/tooltip content",labels:"Labels",heatmapAnnotation:"Heatmap annotation",heatmapAxis:"Heatmap axis",heatmapGroup:"Heatmap group",heatmapForSequence:"Alignment data",nodeShape:"Node shape",nodeColor:"Node color",nodeSize:"Node size",lineColor:"Line color"},C=d.ref(null),x=d.computed(()=>{const Z=new Set;return g.forEach(Y=>{A.value[Y].forEach(X=>{Z.add(X.value)}),n.components[Y].selectorStates.forEach(X=>{Z.add(X.selectedSource)})}),UR(a.value,i.value,[...Z])});function k(Z){return n.components[Z].selectorStates.reduce((Y,X)=>{const oe=a.value.getSourceInfo(X.selectedSource);return oe.kind==="axis"||(Y[X.selectedSource]=oe.axesToBeFixed.reduce((me,ae)=>{var ye;return me[ae]=((ye=X.fixedAxes)==null?void 0:ye.find(Ce=>Ce.axisSource===ae))??{axisSource:ae,axisValue:void 0,axisIdx:oe.axesToBeFixedIndexes[ae]},me},{})??{}),Y},{})}function _(Z){f.value[Z.id]=[...f.value[Z.id],Z.draggedId],C.value=null}function D(Z,Y){f.value[Y]=Z}function O(Z){f.value[Z.basketId]=f.value[Z.basketId].filter(Y=>Y!==Z.chipId)}function I(Z){return new Set(a.value.components[Z].options.map(Y=>Y.value))}function $(Z){return a.value.components[Z].stateConsistency}function Q(Z){return!a.value.readyData||A.value[Z].length===0||C.value!==null&&!x.value[C.value].availableBasketIds.has(Z)}const ee=d.computed(()=>g.map(Z=>{var oe;const Y=a.value.components[Z];return{id:Z,title:b[Z],isFilter:!1,sortable:Z==="tableContent",multiple:Y.multipleSelectors,required:Y.required,disabled:Q(Z),readonly:((oe=t.value.readonlyInputs)==null?void 0:oe.includes(Z))??!1,consistency:$(Z),draggedId:C.value,availableIds:I(Z),droppedIds:f.value[Z],info:x.value,labelsInfo:i.value,listeners:{"drop-item":_,"remove-item":O,reorder:me=>D(me,Z),"select-fixed-axis-value":me=>{const ae=n.components[Z].selectorStates[me.idx];ae.fixedAxes=Object.values(me.v);for(const ye of Object.values(n.components))for(const Ce of ye.selectorStates)ae.fixedAxes.forEach(ce=>{Ce.fixedAxes&&(Ce.fixedAxes=Ce.fixedAxes.map(ge=>({...ge,axisValue:ce.axisSource===ge.axisSource?ce.axisValue:ge.axisValue})))})}},fixedAxes:k(Z)}}));function K(Z){return Z==="heatmapAxis"||Z==="heatmapGroup"?f.value.heatmapAnnotation!==null:!0}function re(){C.value=null}["value"].forEach(Z=>{d.watch([()=>f.value[Z],()=>A.value],([Y,X])=>{(typeof Y>"u"||zR("value",a.value))&&X[Z]&&X[Z].length&&t.value.controller.changeSelected(Z,t.value.columnsDataStore,t.value.reactive.optionsState,[{selectedSource:X[Z][0].value}])},{immediate:!0})});const G=d.computed(()=>{var Z;return((Z=t.value.readonlyInputs)==null?void 0:Z.includes("value"))??!1});return(Z,Y)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",i0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Data source:",modelValue:f.value.value,"onUpdate:modelValue":Y[0]||(Y[0]=X=>f.value.value=X),options:A.value.value,disabled:G.value,error:d.unref(Xy)("value",a.value)},null,8,["modelValue","options","disabled","error"])]),m.value.length>0?(d.openBlock(),d.createElementBlock("div",o0e,[Y[3]||(Y[3]=d.createElementVNode("div",{class:"title"},"Drag to build the chart",-1)),d.createElementVNode("div",l0e,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(m.value,({id:X})=>(d.openBlock(),d.createBlock(cb,{key:X,info:x.value[X],onDragstart:Y[1]||(Y[1]=oe=>C.value=oe),onDragend:re},null,8,["info"]))),128))])])):d.createCommentVNode("",!0),h.value.length>0?(d.openBlock(),d.createElementBlock("div",s0e,[Y[4]||(Y[4]=d.createElementVNode("div",{class:"title"},"Metadata",-1)),d.createElementVNode("div",u0e,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(h.value,({id:X})=>(d.openBlock(),d.createBlock(cb,{key:X,info:x.value[X],onDragstart:Y[2]||(Y[2]=oe=>C.value=oe),onDragend:re},null,8,["info"]))),128))])])):d.createCommentVNode("",!0)]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(ee.value,X=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:X.id},[K(X.id)?(d.openBlock(),d.createElementBlock("div",c0e,[d.createVNode(Wv,d.mergeProps({ref_for:!0},X,d.toHandlers(X.listeners)),null,16)])):d.createCommentVNode("",!0)],64))),128))]),_:1}))}}),d0e={class:"data-form-input-item"},A0e=d.defineComponent({__name:"HistogramForm",setup(e){const t=da(),n=["filters","tabBy","facetBy"],r={filters:"Filter",tabBy:"Tab by",facetBy:"Facet by"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["value"],["filters","tabBy"],["facetBy"],n,r),h=d.computed(()=>{var m;return((m=t.value.readonlyInputs)==null?void 0:m.includes("value"))??!1});return(m,g)=>{const b=d.resolveComponent("MandatoryOptionsList"),C=d.resolveComponent("OptionsList");return d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",d0e,[d.createVNode(d.unref(pt.PlDropdown),{modelValue:d.unref(f).value,"onUpdate:modelValue":g[0]||(g[0]=x=>d.unref(f).value=x),options:d.unref(A).value,disabled:h.value,error:d.unref(Xy)("value",d.unref(t).inputGuide.value),label:"Data value:",clearable:!h.value},null,8,["modelValue","options","disabled","error","clearable"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(b,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:g[1]||(g[1]=x=>a.value=x)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(C,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:g[2]||(g[2]=x=>a.value=x)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),x=>(d.openBlock(),d.createElementBlock("div",{key:x.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},x,d.toHandlers(x.listeners)),null,16)]))),128))]),_:1})}}}),p0e={class:"data-form-input-item"},h0e={class:"data-form-input-item",style:{"margin-top":"10px"}},m0e=d.defineComponent({__name:"BubbleForm",setup(e){const t=da(),n=["filters","x","y","tooltipContent","tabBy","facetBy"],r={filters:"Filter",x:"X",y:"Y",tooltipContent:"Tooltip",tabBy:"Tab by",facetBy:"Facet by"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["valueColor","valueSize"],["filters","tabBy"],["x","y","tooltipContent","facetBy"],n,r),h=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("valueColor"))??!1}),m=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("valueSize"))??!1});return(g,b)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",p0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Data source for color:",clearable:"",modelValue:d.unref(f).valueColor,"onUpdate:modelValue":b[0]||(b[0]=C=>d.unref(f).valueColor=C),disabled:h.value,options:d.unref(A).valueColor,error:d.unref(Xy)("valueColor",d.unref(t).inputGuide.value)},null,8,["modelValue","disabled","options","error"])]),d.createElementVNode("div",h0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Data source for size:",clearable:"",modelValue:d.unref(f).valueSize,"onUpdate:modelValue":b[1]||(b[1]=C=>d.unref(f).valueSize=C),disabled:m.value,options:d.unref(A).valueSize,error:d.unref(Xy)("valueSize",d.unref(t).inputGuide.value)},null,8,["modelValue","disabled","options","error"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(_7,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:b[2]||(b[2]=C=>a.value=C)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(T7,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:b[3]||(b[3]=C=>a.value=C)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),C=>(d.openBlock(),d.createElementBlock("div",{key:C.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},C,d.toHandlers(C.listeners)),null,16)]))),128))]),_:1}))}}),v0e={class:"data-form"},g0e=d.defineComponent({__name:"index",setup(e){const t=da();return(n,r)=>(d.openBlock(),d.createElementBlock("div",v0e,[d.unref(t).reactive.chartType==="discrete"?(d.openBlock(),d.createBlock(Kpe,{key:0})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot"?(d.openBlock(),d.createBlock(qpe,{key:1})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot-umap"?(d.openBlock(),d.createBlock(n0e,{key:2})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="heatmap"?(d.openBlock(),d.createBlock(a0e,{key:3})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="dendro"?(d.openBlock(),d.createBlock(f0e,{key:4})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="histogram"?(d.openBlock(),d.createBlock(A0e,{key:5})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="bubble"?(d.openBlock(),d.createBlock(m0e,{key:6})):d.createCommentVNode("",!0)]))}}),y0e={class:"collapsable-block-content"},ts=d.defineComponent({__name:"CollapsableBlock",props:{iconOpen:{},icon:{},title:{},settings:{}},setup(e){var i,o,s,c,f;const t=e,n=d.ref(((i=t.settings)==null?void 0:i.defaultState)!=="open"),r={},a={};return(o=t.settings)!=null&&o.height&&(a["--title-height"]=`${(s=t.settings)==null?void 0:s.height}px`),(c=t.settings)!=null&&c.horizontalPadding&&(r.padding=`0 ${(f=t.settings)==null?void 0:f.horizontalPadding}px`),(A,h)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["collapsable-block-container",{minimized:n.value,maximized:!n.value}]),style:a},[d.createElementVNode("div",{class:"collapsable-block-title",onClick:h[0]||(h[0]=m=>n.value=!n.value),style:r},[t.icon?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(!n.value&&t.iconOpen?t.iconOpen:t.icon),{key:0})):d.createCommentVNode("",!0),d.createElementVNode("span",null,d.toDisplayString(t.title),1)]),d.createElementVNode("div",y0e,[d.renderSlot(A.$slots,"default")])],2))}}),w0e={},C0e={class:"inline-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function b0e(e,t){return d.openBlock(),d.createElementBlock("svg",C0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M6 11.3773C6 11.8102 6.51272 12.0386 6.83448 11.749L10.5871 8.37165C10.8077 8.17303 10.8077 7.82697 10.5871 7.62835L6.83448 4.25103C6.51272 3.96145 6 4.1898 6 4.62268V11.3773Z",fill:"#CFD1DB"},null,-1)]))}const Qf=Wr(w0e,[["render",b0e]]),E0e={},x0e={class:"inline-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function S0e(e,t){return d.openBlock(),d.createElementBlock("svg",x0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M4.70711 6.00018C4.26165 6.00018 4.03857 6.53875 4.35355 6.85374L7.64645 10.1466C7.84171 10.3419 8.15829 10.3419 8.35355 10.1466L11.6464 6.85374C11.9614 6.53875 11.7383 6.00018 11.2929 6.00018H4.70711Z",fill:"#CFD1DB"},null,-1)]))}const zf=Wr(E0e,[["render",S0e]]),B0e=["tabindex","onKeydown","onClick"],Uf=d.defineComponent({__name:"BtnIconGroup",props:{modelValue:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){d.useSlots();const n=t,r=a=>n("update:modelValue",a);return(a,i)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["btn-icon-group",{disabled:a.disabled}])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a.options,(o,s)=>(d.openBlock(),d.createElementBlock("div",{key:o.value+":"+s,class:d.normalizeClass(["btn-icon-group__option",{active:a.modelValue===o.value}]),tabindex:a.modelValue===o.value||a.disabled?void 0:0,onKeydown:d.withKeys(c=>r(o.value),["enter"]),onClick:c=>r(o.value)},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(o.icon)))],42,B0e))),128))],2))}}),k0e={},T0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function _0e(e,t){return d.openBlock(),d.createElementBlock("svg",T0e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 4.5L21 4.5V6L3 6V4.5ZM3 9L11 9V10.5L3 10.5V9ZM3 15V13.5L19 13.5V15L3 15ZM3 18H13V19.5H3V18Z",fill:"currentColor"},null,-1)]))}const P7=Wr(k0e,[["render",_0e]]),P0e={},M0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function D0e(e,t){return d.openBlock(),d.createElementBlock("svg",M0e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 4.5L21 4.5V6L3 6V4.5ZM8 9L16 9V10.5L8 10.5V9ZM4 13.5L20 13.5V15L4 15L4 13.5ZM7 18H17V19.5H7V18Z",fill:"currentColor"},null,-1)]))}const M7=Wr(P0e,[["render",D0e]]),H0e={},I0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function L0e(e,t){return d.openBlock(),d.createElementBlock("svg",I0e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 4.5L21 4.5V6L3 6V4.5ZM13 9L21 9V10.5L13 10.5V9ZM5 15V13.5L21 13.5V15L5 15ZM11 18H21V19.5H11V18Z",fill:"currentColor"},null,-1)]))}const D7=Wr(H0e,[["render",L0e]]),R0e={},N0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function $0e(e,t){return d.openBlock(),d.createElementBlock("svg",N0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M4 19L4 5C4 4.44772 4.44772 4 5 4L19 4C19.5523 4 20 4.44772 20 5L20 19C20 19.5523 19.5523 20 19 20L5 20C4.44772 20 4 19.5523 4 19Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"square"},null,-1)]))}const H7=Wr(R0e,[["render",$0e]]),F0e={},V0e={width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O0e(e,t){return d.openBlock(),d.createElementBlock("svg",V0e,t[0]||(t[0]=[d.createStaticVNode('<path d="M4.25 1H5.75" stroke="currentColor" stroke-width="1.5"></path><path d="M8.25 1H9.75" stroke="currentColor" stroke-width="1.5"></path><path d="M12.25 1H13.75" stroke="currentColor" stroke-width="1.5"></path><path d="M16.25 1H17.75" stroke="currentColor" stroke-width="1.5"></path><path d="M0.25 17H1.75" stroke="currentColor" stroke-width="1.5"></path><path d="M4.25 17H5.75" stroke="currentColor" stroke-width="1.5"></path><path d="M8.25 17H9.75" stroke="currentColor" stroke-width="1.5"></path><path d="M12.25 17H13.75" stroke="currentColor" stroke-width="1.5"></path><path d="M16.25 17H17.75" stroke="currentColor" stroke-width="1.5"></path><path d="M17 0.25L17 1.75" stroke="currentColor" stroke-width="1.5"></path><path d="M17 4.25L17 5.75" stroke="currentColor" stroke-width="1.5"></path><path d="M17 8.25L17 9.75" stroke="currentColor" stroke-width="1.5"></path><path d="M17 12.25L17 13.75" stroke="currentColor" stroke-width="1.5"></path><path d="M1 0.25L1 1.75" stroke="currentColor" stroke-width="1.5"></path><path d="M1 4.25L1 5.75" stroke="currentColor" stroke-width="1.5"></path><path d="M1 8.25L1 9.75" stroke="currentColor" stroke-width="1.5"></path><path d="M1 12.25L1 13.75" stroke="currentColor" stroke-width="1.5"></path>',17)]))}const I7=Wr(F0e,[["render",O0e]]),Q0e={},z0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function U0e(e,t){return d.openBlock(),d.createElementBlock("svg",z0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M8.8148 18.2251C6.6173 18.2251 5.0498 16.6576 5.0498 14.4601V10.7401C5.0498 8.5426 6.6173 6.9751 8.8148 6.9751C11.0123 6.9751 12.5798 8.5426 12.5798 10.7401V14.4601C12.5798 16.6576 11.0123 18.2251 8.8148 18.2251ZM6.6473 14.5576C6.6473 15.7651 7.60731 16.7251 8.8148 16.7251C10.0223 16.7251 10.9823 15.7651 10.9823 14.5576V10.6276C10.9823 9.4276 10.0223 8.4676 8.8148 8.4676C7.60731 8.4676 6.6473 9.4276 6.6473 10.6276V14.5576Z",fill:"currentColor"},null,-1),d.createElementVNode("path",{d:"M15.8738 12.3751C14.3888 12.3751 13.1738 11.1751 13.1738 9.6751C13.1738 8.2051 14.4338 6.9751 15.8738 6.9751C17.3588 6.9751 18.5738 8.1751 18.5738 9.6751C18.5738 11.1751 17.3588 12.3751 15.8738 12.3751ZM14.5313 9.6751C14.5313 10.4026 15.1463 11.0176 15.8738 11.0176C16.6013 11.0176 17.2163 10.4026 17.2163 9.6751C17.2163 8.9476 16.6013 8.3326 15.8738 8.3326C15.1463 8.3326 14.5313 8.9476 14.5313 9.6751Z",fill:"currentColor"},null,-1)]))}const lB=Wr(Q0e,[["render",U0e]]),j0e={},G0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function Y0e(e,t){return d.openBlock(),d.createElementBlock("svg",G0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M5.75684 18.0001V16.1176H0.881836V14.6326L4.39184 7.2001H6.18434L2.67434 14.6326H5.75684V11.7076H7.34684V14.6326H8.41934V16.1176H7.34684V18.0001H5.75684Z",fill:"currentColor"},null,-1),d.createElementVNode("path",{d:"M12.5224 18.2251C10.8574 18.2251 9.46242 17.1226 9.01992 15.5476L10.5274 15.1426C10.7749 16.1026 11.6674 16.7101 12.5674 16.7101C13.7524 16.7101 14.6899 15.7576 14.6899 14.6026C14.6899 13.4176 13.7224 12.4876 12.5674 12.4876C11.6824 12.4876 11.0749 12.9076 10.7374 13.3576L9.37242 12.8776L9.70242 7.2001H15.5299V8.6776H11.1049L10.9249 11.6476C11.4574 11.2651 12.1324 11.0626 12.7699 11.0626C14.7874 11.0626 16.2724 12.5776 16.2724 14.6026C16.2724 16.6126 14.5399 18.2251 12.5224 18.2251Z",fill:"currentColor"},null,-1),d.createElementVNode("path",{d:"M19.265 12.3751C17.78 12.3751 16.565 11.1751 16.565 9.6751C16.565 8.2051 17.825 6.9751 19.265 6.9751C20.75 6.9751 21.965 8.1751 21.965 9.6751C21.965 11.1751 20.75 12.3751 19.265 12.3751ZM17.9225 9.6751C17.9225 10.4026 18.5375 11.0176 19.265 11.0176C19.9925 11.0176 20.6075 10.4026 20.6075 9.6751C20.6075 8.9476 19.9925 8.3326 19.265 8.3326C18.5375 8.3326 17.9225 8.9476 17.9225 9.6751Z",fill:"currentColor"},null,-1)]))}const sB=Wr(j0e,[["render",Y0e]]),W0e={},X0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function K0e(e,t){return d.openBlock(),d.createElementBlock("svg",X0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M4.6132 6.9826C6.7057 6.9826 8.3257 8.6026 8.3257 10.8301V14.2726C8.3257 16.6351 6.7432 18.2251 4.4557 18.2251C3.3157 18.2251 2.2882 17.7901 1.5532 16.9426L2.7007 15.8701C3.1132 16.4026 3.7582 16.7401 4.4557 16.7401C5.7982 16.7401 6.7282 15.6601 6.7282 14.4751V13.1851C6.1207 13.7926 5.2957 14.1526 4.4032 14.1526C2.3857 14.1526 0.908203 12.6226 0.908203 10.6051C0.908203 8.5801 2.5957 6.9826 4.6132 6.9826ZM2.4982 10.6051C2.4982 11.7751 3.4357 12.7201 4.6057 12.7201C5.7757 12.7201 6.7282 11.7751 6.7282 10.6051C6.7282 9.4501 5.7832 8.4901 4.6132 8.4901C3.4432 8.4901 2.4982 9.4351 2.4982 10.6051Z",fill:"currentColor"},null,-1),d.createElementVNode("path",{d:"M13.2846 18.2251C11.0871 18.2251 9.51961 16.6576 9.51961 14.4601V10.7401C9.51961 8.5426 11.0871 6.9751 13.2846 6.9751C15.4821 6.9751 17.0496 8.5426 17.0496 10.7401V14.4601C17.0496 16.6576 15.4821 18.2251 13.2846 18.2251ZM11.1171 14.5576C11.1171 15.7651 12.0771 16.7251 13.2846 16.7251C14.4921 16.7251 15.4521 15.7651 15.4521 14.5576V10.6276C15.4521 9.4276 14.4921 8.4676 13.2846 8.4676C12.0771 8.4676 11.1171 9.4276 11.1171 10.6276V14.5576Z",fill:"currentColor"},null,-1),d.createElementVNode("path",{d:"M20.3436 12.3751C18.8586 12.3751 17.6436 11.1751 17.6436 9.6751C17.6436 8.2051 18.9036 6.9751 20.3436 6.9751C21.8286 6.9751 23.0436 8.1751 23.0436 9.6751C23.0436 11.1751 21.8286 12.3751 20.3436 12.3751ZM19.0011 9.6751C19.0011 10.4026 19.6161 11.0176 20.3436 11.0176C21.0711 11.0176 21.6861 10.4026 21.6861 9.6751C21.6861 8.9476 21.0711 8.3326 20.3436 8.3326C19.6161 8.3326 19.0011 8.9476 19.0011 9.6751Z",fill:"currentColor"},null,-1)]))}const uB=Wr(W0e,[["render",K0e]]),Z0e={},J0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function q0e(e,t){return d.openBlock(),d.createElementBlock("svg",J0e,t[0]||(t[0]=[d.createStaticVNode('<path d="M4 4L4 20" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"></path><path d="M7.25 4H8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M11.25 4H12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M15.25 4H16.75" stroke="currentColor" stroke-width="1.5"></path><path d="M19.25 4H20.75" stroke="currentColor" stroke-width="1.5"></path><path d="M7.25 20H8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M11.25 20H12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M15.25 20H16.75" stroke="currentColor" stroke-width="1.5"></path><path d="M19.25 20H20.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 3.25L20 4.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 7.25L20 8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 11.25L20 12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 15.25L20 16.75" stroke="currentColor" stroke-width="1.5"></path>',13)]))}const cB=Wr(Z0e,[["render",q0e]]),ehe={},the={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function nhe(e,t){return d.openBlock(),d.createElementBlock("svg",the,t[0]||(t[0]=[d.createStaticVNode('<path d="M20 20L4 20" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"></path><path d="M7.25 4H8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M11.25 4H12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M15.25 4H16.75" stroke="currentColor" stroke-width="1.5"></path><path d="M19.25 4H20.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 3.25L20 4.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 7.25L20 8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 11.25L20 12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 15.25L20 16.75" stroke="currentColor" stroke-width="1.5"></path><path d="M4 3.25L4 4.75" stroke="currentColor" stroke-width="1.5"></path><path d="M4 7.25L4 8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M4 11.25L4 12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M4 15.25L4 16.75" stroke="currentColor" stroke-width="1.5"></path>',13)]))}const fB=Wr(ehe,[["render",nhe]]),rhe={},ahe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ihe(e,t){return d.openBlock(),d.createElementBlock("svg",ahe,t[0]||(t[0]=[d.createStaticVNode('<path d="M4 4L4 19C4 19.5523 4.44772 20 5 20L20 20" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"></path><path d="M7.25 4H8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M11.25 4H12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M15.25 4H16.75" stroke="currentColor" stroke-width="1.5"></path><path d="M19.25 4H20.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 3.25L20 4.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 7.25L20 8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 11.25L20 12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 15.25L20 16.75" stroke="currentColor" stroke-width="1.5"></path>',9)]))}const dB=Wr(rhe,[["render",ihe]]),ohe={inheritAttrs:!1},lhe={class:"double-contour-temp"};function she(e,t,n,r,a,i){return d.openBlock(),d.createElementBlock("div",lhe,[d.createElementVNode("div",d.normalizeProps(d.guardReactiveProps(e.$attrs)),[d.renderSlot(e.$slots,"default")],16)])}const AB=Wr(ohe,[["render",she]]),uhe={},che={class:"inline-icon",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fhe(e,t){return d.openBlock(),d.createElementBlock("svg",che,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5951 8.76689C9.7962 8.43389 8.91957 8.25 8 8.25C4.27208 8.25 1.25 11.2721 1.25 15C1.25 18.7279 4.27208 21.75 8 21.75C11.7279 21.75 14.75 18.7279 14.75 15C14.75 12.7693 13.6679 10.7913 12 9.56231C11.5866 9.86693 11.2092 10.2176 10.8753 10.6067C12.3055 11.5446 13.25 13.162 13.25 15C13.25 17.8995 10.8995 20.25 8 20.25C5.10051 20.25 2.75 17.8995 2.75 15C2.75 12.1005 5.10051 9.75 8 9.75C8.51 9.75 9.00302 9.82272 9.46924 9.95836C9.80438 9.52487 10.1817 9.12566 10.5951 8.76689Z",fill:"#110529"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2.75C9.10051 2.75 6.75 5.10051 6.75 8C6.75 10.8995 9.10051 13.25 12 13.25C14.8995 13.25 17.25 10.8995 17.25 8C17.25 5.10051 14.8995 2.75 12 2.75ZM5.25 8C5.25 4.27208 8.27208 1.25 12 1.25C15.7279 1.25 18.75 4.27208 18.75 8C18.75 11.7279 15.7279 14.75 12 14.75C8.27208 14.75 5.25 11.7279 5.25 8Z",fill:"#07AD3E"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.25 15C21.25 12.9441 20.0683 11.1643 18.3471 10.3026C18.5192 9.82834 18.6396 9.32933 18.7016 8.81237C21.0847 9.85434 22.75 12.2327 22.75 15C22.75 18.7279 19.7279 21.75 16 21.75C13.9499 21.75 12.1132 20.836 10.8753 19.3933C11.2961 19.1174 11.6749 18.7825 12 18.4005C12.963 19.5322 14.3977 20.25 16 20.25C18.8995 20.25 21.25 17.8995 21.25 15ZM11.1556 17.0269C10.8943 16.4032 10.75 15.7185 10.75 15C10.75 12.1005 13.1005 9.75 16 9.75C16.3146 9.75 16.6227 9.77767 16.922 9.83069C17.0939 9.36877 17.2026 8.87611 17.2376 8.36321C16.8364 8.28886 16.4227 8.25 16 8.25C12.2721 8.25 9.25 11.2721 9.25 15C9.25 16.139 9.53213 17.2122 10.0303 18.1534C10.481 17.8626 10.8653 17.4779 11.1556 17.0269Z",fill:"#110529"},null,-1)]))}const dhe=Wr(uhe,[["render",fhe]]),Ahe={key:4,class:"size"},L7=d.defineComponent({__name:"AesButton",props:{data:{}},emits:["ref"],setup(e,{emit:t}){const n=e,r=n.data.type==="fill"||n.data.type==="stroke",a=d.computed(()=>({icon__white:r&&n.data.value.toLowerCase()==="#ffffff",icon__empty:r&&n.data.value.toLowerCase()==="transparent"})),i=d.computed(()=>n.data.type==="fill"?{"background-color":n.data.value}:n.data.type==="stroke"&&!a.value.icon__empty&&!a.value.icon__white?{"border-color":n.data.value}:{});return(o,s)=>(d.openBlock(),d.createElementBlock("div",{class:"ui-aes-button",ref:c=>o.$emit("ref",c)},[d.createVNode(AB,{class:"ui-multiselect-button__contour"}),o.data.type==="fill"?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["icon icon__fill",a.value]),style:d.normalizeStyle(i.value)},null,6)):o.data.type==="stroke"?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["icon icon__stroke",a.value]),style:d.normalizeStyle(i.value)},null,6)):o.data.type==="dotShape"?(d.openBlock(),d.createElementBlock("div",{key:2,class:d.normalizeClass(["icon dot",{[`dot__${o.data.value}`]:!0}])},null,2)):o.data.type==="lineType"?(d.openBlock(),d.createElementBlock("div",{key:3,class:d.normalizeClass(["icon icon__line",{[`line__${o.data.value}`]:!0}])},null,2)):o.data.type==="size"?(d.openBlock(),d.createElementBlock("span",Ahe,d.toDisplayString(o.data.value),1)):o.data.type==="data"?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(dhe),{key:5,class:"icon"})):d.createCommentVNode("",!0)],512))}}),phe={},hhe={class:"inline-icon",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function mhe(e,t){return d.openBlock(),d.createElementBlock("svg",hhe,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 8L7.53033 13.5303L8.59099 12.4697L4.87132 8.75L14.0607 8.75L14.0607 7.25L4.87132 7.25L8.59099 3.53033L7.53033 2.46967L2 8Z",fill:"#110529"},null,-1)]))}const vhe=Wr(phe,[["render",mhe]]),ghe={ref:"root",class:"aes-settings-form"},yhe={class:"aes-settings-form__header"},Qh=d.defineComponent({__name:"FormWrapper",props:{title:{},backTitle:{}},emits:["form:close"],setup(e,{emit:t}){return(n,r)=>(d.openBlock(),d.createBlock(d.Teleport,{to:"#graph-settings-modal"},[d.createElementVNode("div",ghe,[d.createElementVNode("div",yhe,[d.createElementVNode("div",{onClick:r[0]||(r[0]=d.withModifiers(a=>n.$emit("form:close"),["stop"])),class:"back-link"},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(vhe))),d.createTextVNode(" "+d.toDisplayString(`Back to ${n.backTitle}`),1)]),d.createElementVNode("h3",null,d.toDisplayString(n.title),1)]),d.renderSlot(n.$slots,"default")],512)]))}}),whe={class:"ui-multiselect-button__content"},Che={key:0,class:"title"},bhe={key:1,class:"gradient"},Ehe=6,o3=d.defineComponent({__name:"MultiselectButton",props:{label:{},title:{},palette:{}},emits:["button-click"],setup(e,{emit:t}){const n=d.ref(void 0);pt.useLabelNotch(n);function r(a){const i=100/(a.length-1);return`background: linear-gradient(to right, ${a.map((o,s)=>`${o} ${s*i}%`).join(", ")})`}return(a,i)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"root",ref:n,class:"ui-multiselect-button",onClick:i[0]||(i[0]=d.withModifiers(o=>a.$emit("button-click"),["stop"]))},[a.label?(d.openBlock(),d.createElementBlock("label",{key:0,ref:"label"},d.toDisplayString(a.label),513)):d.createCommentVNode("",!0),d.createVNode(AB,{class:"ui-multiselect-button__contour"}),d.createElementVNode("div",whe,[a.title?(d.openBlock(),d.createElementBlock("div",Che,d.toDisplayString(a.title),1)):d.createCommentVNode("",!0),a.palette&&d.unref(tS)(a.palette)?(d.openBlock(),d.createElementBlock("div",bhe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(Do)[a.palette].colors.slice(0,Ehe),o=>(d.openBlock(),d.createElementBlock("div",{class:"gradient__item",style:d.normalizeStyle({background:o})},null,4))),256))])):a.palette?(d.openBlock(),d.createElementBlock("div",{key:2,class:"gradient",style:d.normalizeStyle(r(d.unref(Do)[a.palette].colors))},null,4)):(d.openBlock(),d.createBlock(d.unref(pt.PlIcon16),{key:3,class:"icon",name:"chevron-right"}))])],512))}}),xhe={class:"palettes-groups"},She={class:"palettes-list"},Bhe=["onClick"],khe={class:"palette-gradient"},The={class:"palettes-list"},_he=["onClick"],Phe={class:"palettes-list"},Mhe=["onClick"],Dhe=9,l3=d.defineComponent({__name:"PalettesForm",props:{selected:{},categorical:{type:Boolean,default:!0},sequential:{type:Boolean,default:!0},diverging:{type:Boolean,default:!0}},emits:["select"],setup(e,{emit:t}){const n=t;function r(i){n("select",i)}function a(i){const o=100/(i.length-1);return`background: linear-gradient(to right, ${i.map((s,c)=>`${s} ${c*o}%`).join(", ")})`}return(i,o)=>(d.openBlock(),d.createElementBlock("div",xhe,[i.categorical?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[o[0]||(o[0]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"CATEGORICAL")],-1)),o[1]||(o[1]=d.createElementVNode("div",{class:"section-description"}," Best to representing categorical data ",-1)),d.createElementVNode("div",She,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(oL),s=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["palettes-list__palette",{selected:i.selected===s}]),onClick:d.withModifiers(c=>r(s),["stop"])},[d.createElementVNode("div",null,d.toDisplayString(d.unref(Do)[s].title),1),d.createElementVNode("div",khe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(Do)[s].colors.slice(0,Dhe),c=>(d.openBlock(),d.createElementBlock("div",{class:"palette-gradient__item",style:d.normalizeStyle({background:c})},null,4))),256))])],10,Bhe))),256))])],64)):d.createCommentVNode("",!0),i.sequential?(d.openBlock(),d.createElementBlock(d.Fragment,{key:1},[o[2]||(o[2]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"SEQUENTIAL")],-1)),o[3]||(o[3]=d.createElementVNode("div",{class:"section-description"}," Best to representing sequential data ",-1)),d.createElementVNode("div",The,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(pae),s=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["palettes-list__palette",{selected:i.selected===s}]),onClick:d.withModifiers(c=>r(s),["stop"])},[d.createElementVNode("div",null,d.toDisplayString(d.unref(Do)[s].title),1),d.createElementVNode("div",{class:"palette-gradient",style:d.normalizeStyle(a(d.unref(Do)[s].colors))},null,4)],10,_he))),256))])],64)):d.createCommentVNode("",!0),i.diverging?(d.openBlock(),d.createElementBlock(d.Fragment,{key:2},[o[4]||(o[4]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"DIVERGING")],-1)),o[5]||(o[5]=d.createElementVNode("div",{class:"section-description"}," Best to representing diverging data ",-1)),d.createElementVNode("div",Phe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(hae),s=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["palettes-list__palette",{selected:i.selected===s}]),onClick:d.withModifiers(c=>r(s),["stop"])},[d.createElementVNode("div",null,d.toDisplayString(d.unref(Do)[s].title),1),d.createElementVNode("div",{class:"palette-gradient",style:d.normalizeStyle(a(d.unref(Do)[s].colors))},null,4)],10,Mhe))),256))])],64)):d.createCommentVNode("",!0)]))}}),Hhe=["onClick"],d$=d.defineComponent({__name:"FixedColorsList",props:{modelValue:{},colorUsing:{default:"fill"},colorsList:{default:()=>_y}},emits:["update:modelValue"],setup(e,{emit:t}){return(n,r)=>(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.colorsList,a=>(d.openBlock(),d.createElementBlock("div",{key:a.color,class:d.normalizeClass(["color-item",{border:n.colorUsing==="stroke",white:a.name==="White",empty:a.name==="None",selected:a.color===n.modelValue}]),style:d.normalizeStyle(a.name!=="White"&&a.name!=="None"?`${n.colorUsing==="fill"?"background":"border-color"}: ${a.color};`:""),onClick:i=>n.$emit("update:modelValue",a.color)},r[0]||(r[0]=[d.createElementVNode("div",{class:"checkmark"},null,-1)]),14,Hhe))),128))}}),Ihe=["onClick"],Lhe={class:"row-item__title"},fb=d.defineComponent({__name:"FixedLineTypeList",props:{modelValue:{},list:{default:()=>My}},emits:["update:modelValue"],setup(e,{emit:t}){return(n,r)=>(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.list,a=>(d.openBlock(),d.createElementBlock("div",{key:a,class:d.normalizeClass(["row-item",{"row-item__selected":a===n.modelValue,[`line__${a}`]:!0}]),onClick:i=>n.$emit("update:modelValue",a)},[d.createElementVNode("div",Lhe,d.toDisplayString(d.unref(vae)[a].title),1),(d.openBlock(),d.createElementBlock("svg",{class:d.normalizeClass(["row-item__line line",{[`line__${a}`]:!0}])},r[0]||(r[0]=[d.createElementVNode("line",{x1:"0",x2:"100%",y1:"50%",y2:"50%"},null,-1)]),2))],10,Ihe))),128))}}),Rhe=["onClick"],A$=d.defineComponent({__name:"FixedDotShapeList",props:{modelValue:{},list:{default:()=>N5}},emits:["update:modelValue"],setup(e,{emit:t}){return(n,r)=>(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.list,a=>(d.openBlock(),d.createElementBlock("div",{key:a,class:d.normalizeClass(["color-item dot",{selected:a===n.modelValue,[`dot__${a}`]:!0}]),onClick:i=>n.$emit("update:modelValue",a)},null,10,Rhe))),128))}}),db=d.defineComponent({__name:"Popup",props:{gap:{default:8},targetRef:{},width:{default:258},height:{}},emits:["popup:close"],setup(e,{emit:t}){const n=t,r=e;function a(){n("popup:close")}const i=d.ref(),o=d.ref(r.targetRef),s=d.ref("bottom"),c=d.ref(""),f=d.ref("");function A(h,m=8){pt.usePosition(h,g=>{if(r.height&&g.offsetY+g.height+3*m+r.height>g.clientHeight){const C=g.right-g.width-m;if(g.clientHeight-g.offsetY>r.height+m){const x=g.offsetY;c.value=`left: ${C}px; top: ${x}px;`,f.value="top: 16px;",s.value="left-bottom"}else{const x=g.clientHeight-r.height-2*m;c.value=`left: ${C}px; top: ${x}px;`;const k=g.offsetY+2*Math.floor(g.height/2),_=g.clientHeight-k;f.value=`bottom: ${_}px;`,s.value="left-bottom"}}else c.value=`left: ${g.right}px; top: ${g.offsetY+g.height+m}px;`,f.value="",s.value="bottom"})}return A(o,r.gap),pt.useClickOutside([o,i],()=>a()),(h,m)=>(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[d.createElementVNode("div",{class:"popup",style:d.normalizeStyle(c.value),onClick:m[0]||(m[0]=g=>g.stopPropagation())},[d.createElementVNode("div",{ref_key:"popup",ref:i,class:d.normalizeClass(["popup__content",s.value]),style:d.normalizeStyle({width:`${h.width}px`})},[d.createElementVNode("div",null,[d.renderSlot(h.$slots,"default")]),(d.openBlock(),d.createElementBlock("svg",{style:d.normalizeStyle(f.value),class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m[1]||(m[1]=[d.createElementVNode("path",{d:"M4 8L0 4L4 0L4 8 Z"},null,-1),d.createElementVNode("polyline",{points:"4,8 0,4 4,0"},null,-1)]),4))],6)],4)]))}}),Nhe={},$he={xmlns:"http://www.w3.org/2000/svg",width:"8",height:"12",viewBox:"0 0 8 12",fill:"none"};function Fhe(e,t){return d.openBlock(),d.createElementBlock("svg",$he,t[0]||(t[0]=[d.createStaticVNode('<path d="M2.5 0H0.5V2H2.5V0Z" fill="#CFD1DB"></path><path d="M2.5 5H0.5V7H2.5V5Z" fill="#CFD1DB"></path><path d="M0.5 10H2.5V12H0.5V10Z" fill="#CFD1DB"></path><path d="M7.5 0H5.5V2H7.5V0Z" fill="#CFD1DB"></path><path d="M5.5 5H7.5V7H5.5V5Z" fill="#CFD1DB"></path><path d="M7.5 10H5.5V12H7.5V10Z" fill="#CFD1DB"></path>',6)]))}const Vhe=Wr(Nhe,[["render",Fhe]]);var Ohe=Object.defineProperty,Qhe=(e,t,n)=>t in e?Ohe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pB=(e,t,n)=>Qhe(e,typeof t!="symbol"?t+"":t,n);function zhe(e,t){if(e==null)throw Error(t??"Empty (null | undefined) value");return e}function Uhe(e,t){if(e===void 0)throw Error(t??"Undefined value");return e}function jhe(e=void 0){return e}function Ghe(e){return e}function Yhe(e){return[...new Set(e)]}function Whe(e,t){if(e==null)throw Error(t??"Empty (null | undefined) value")}function Xhe(e,t){if(e===void 0)throw Error(t??"Undefined value")}function Khe(e,t,n){const r=Math.min(t,n),a=Math.max(t,n);return e>=r&&e<=a}function Zhe(e){return e.map(t=>({text:String(t),value:t}))}function Jhe(e){return function(...t){const n=e(...t);async function r(a){return a.done?Promise.resolve(a.value):Promise.resolve(a.value).then(i=>r(n.next(i))).catch(i=>r(n.throw(i)))}try{return r(n.next())}catch(a){return Promise.reject(a instanceof Error?a:Error(String(a)))}}}class qhe{constructor(){pB(this,"promise"),pB(this,"resolve",()=>{}),pB(this,"reject",()=>{}),this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}}function hB(e){return new Promise(t=>setTimeout(t,e))}function e1e(){return new Promise(e=>queueMicrotask(e))}function t1e(){const e=new Date().getTime();return function(){return new Date().getTime()-e}}function n1e(){const e=performance.now();return function(){return performance.now()-e}}function r1e(e){return e()}function a1e(e,t,n){return t>e?t:e>n?n:e}function i1e(e,t){return t(e)}function o1e(e,t){if(e!=null)return t(e)}function l1e(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e}function*p$(e,t,n=1){for(let r=e;r<t;r+=n)yield r}function h$(e){const t=[];for(const n of e)t.push(n);return t}function s1e(e,t){return h$(p$(0,e)).map(t)}let u1e=class{constructor(t){this._delay=t}async*generate(){let t=0;for(;;)await hB(this._delay),yield t++}async*[Symbol.asyncIterator](){let t=0;for(;;)await hB(this._delay),yield t++}};function c1e(e,t){return Array.from({length:e},(n,r)=>t(r))}function f1e(e,t){throw Error(t)}function d1e(e){return t=>e[t]()}function A1e(e){if(e&&e.ok)return e.value}function p1e(e){if(e&&!e.ok)return e.error}function h1e(e){if(e.ok)return e.value;throw Error(e.error)}function m1e(e){return Array.isArray(e)?e:[e]}async function v1e(e){return Object.fromEntries(await Promise.all(Object.entries(e).map(async([t,n])=>[t,await n])))}function g1e(e,t){return Object.keys(t).every(n=>e[n]===t[n])}const y1e=e=>e;function w1e(e){return e}function C1e(e){return Object.entries(e).map(([t,n])=>({key:t,value:n}))}const R7=Object.freeze(Object.defineProperty({__proto__:null,Deferred:qhe,Interval:u1e,alike:g1e,arrayFrom:c1e,asConst:w1e,async:Jhe,between:Khe,bool:Ghe,call:r1e,checkIfDefined:Xhe,checkIfNotEmpty:Whe,clamp:a1e,delay:hB,errorOptional:p1e,exhaustive:f1e,flatValue:m1e,identity:y1e,listToOptions:Zhe,match:d1e,notEmpty:zhe,notUndef:Uhe,okOptional:A1e,performanceTimer:n1e,randomInt:l1e,range:p$,resolveAwaited:v1e,tap:i1e,tapIf:o1e,tear:e1e,timer:t1e,times:s1e,toList:h$,undef:jhe,unionize:C1e,uniqueValues:Yhe,unwrap:h1e},Symbol.toStringTag,{value:"Module"})),N7=Array.isArray;function Ab(e){return e!==null&&typeof e=="object"}function s3(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null}function b1e(e,t){return Object.keys(e).map(n=>t(e[n],n))}function m$(e){return Object.values(e).reduce((t,n)=>n!==void 0?t+1:t,0)}function pb(e,t){if(!(Ab(e)&&Ab(t)))return e===t;if(N7(e)&&N7(t))return e.length!==t.length?!1:[...e.keys()].every(n=>pb(e[n],t[n]));if(s3(e)&&s3(t))return m$(e)!==m$(t)?!1:Object.keys(e).every(n=>pb(e[n],t[n]));throw Error(`Cannot compare a ${String(e)} and b ${String(t)}`)}const E1e=pb;function mB(e){if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=mB(e[n]);return t}else if(s3(e)){const t={};return Object.keys(e).forEach(n=>{t[n]=mB(e[n])}),t}else return e}function x1e(e){return Array.isArray(e)?Object.assign([],e):Ab(e)?Object.assign({},e):e}function S1e(e,t){const n={};for(const r in t)t[r]!==e[r]&&(n[r]=e[r]);return n}function B1e(e){return Object.entries(e).forEach(([t,n])=>{n instanceof Function&&(e[t]=n.bind(e))}),e}function k1e(e,t,n){return e[t]=n,e}function T1e(e,t){return e[t]}function _1e(e,t){e={...e};const n=e[t];return delete e[t],[n,e]}function P1e(e,...t){return Object.assign({},...t.map(n=>({[n]:e[n]})))}function M1e(e,...t){return t.map(n=>e[n])}function D1e(e,...t){const n=Object.assign({},e);return t.forEach(r=>delete n[r]),n}function v$(e,t){return new Set([...Object.keys(e),...Object.keys(t)]).forEach(n=>{const r=e[n],a=t[n];s3(r)&&s3(a)||N7(r)&&N7(a)&&r.length===a.length?v$(r,a):e[n]=a}),e}const H1e=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:B1e,deepClone:mB,deepEqual:E1e,deepPatch:v$,getProp:T1e,isArray:N7,isJsonEqual:pb,isNonPrimitive:Ab,isPlainObject:s3,map:b1e,omit:D1e,pick:P1e,pickValues:M1e,setProp:k1e,shallowClone:x1e,shallowDiff:S1e,shiftProp:_1e},Symbol.toStringTag,{value:"Module"})),hb=1,I1e=d.defineComponent({__name:"PlColorSliderThumb",props:{barRef:{},modelValue:{},min:{default:0},max:{default:100},getColorForPercent:{},padding:{default:16},isActive:{type:Boolean}},emits:["update:modelValue","active"],setup(e,{emit:t}){const n=e,r=t,a=d.ref(),i=d.ref(),o=d.ref(!1),s=n.min,c=n.max;let f=d.ref(0);const A=c-s,h=n.padding/n.barRef.getBoundingClientRect().width*100/2,m=d.computed(()=>R7.clamp((n.modelValue??0)+f.value,Math.ceil(s+h),Math.ceil(c-h))),g=d.computed(()=>({right:`calc(${Math.ceil((1-b.value)*100)}%) `})),b=d.computed(()=>(m.value-s)/A);function C(O){const I=R7.clamp(O,s,c);return Math.round((I+Number.EPSILON)*(1/hb))/(1/hb)}function x(){o.value=!1}function k(O){O?(document.addEventListener("mouseup",x),document.addEventListener("focusout",x)):(document.removeEventListener("mouseup",x),document.removeEventListener("focusout",x)),o.value=O,r("active",O)}pt.useMouseCapture(a,O=>{var I;R7.tapIf((I=d.unref(n.barRef))==null?void 0:I.getBoundingClientRect(),$=>{const{dx:Q}=O;f.value=Q/$.width*A,O.stop&&(r("update:modelValue",C(m.value)),f.value=0)})});function _(O){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(O.code)&&O.preventDefault(),O.code==="ArrowLeft"&&r("update:modelValue",R7.clamp(n.modelValue-hb,s,c)),O.code==="ArrowRight"&&r("update:modelValue",R7.clamp(n.modelValue+hb,s,c))}function D(O){var I,$;O?(I=i.value)==null||I.classList.add("pl-color-slider__top-index"):($=i.value)==null||$.classList.remove("pl-color-slider__top-index")}return(O,I)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"wrapper",ref:i,style:d.normalizeStyle(g.value),class:d.normalizeClass([{"active-thumb":o.value||O.isActive},"pl-color-slider__thumb"]),tabindex:"0",onMousedown:I[2]||(I[2]=$=>k(!0)),onMouseup:I[3]||(I[3]=$=>k(!1)),onKeydown:_,onFocus:I[4]||(I[4]=$=>k(!0))},[d.createElementVNode("div",{ref_key:"thumb",ref:a,class:d.normalizeClass([{active:o.value},"pl-color-slider__thumb-roof"]),onMouseover:I[0]||(I[0]=$=>D(!0)),onMouseout:I[1]||(I[1]=$=>D(!1))},[d.createElementVNode("div",{class:"pl-color-slider__thumb-color-indicator",style:d.normalizeStyle({backgroundColor:O.getColorForPercent(m.value)})},null,4)],34)],38))}}),L1e={class:"pl-color-slider"},R1e={class:"pl-color-slider__wrapper"},N1e={class:"pl-color-slider__thumbs-contaier"},$1e=d.defineComponent({__name:"PlColorSlider",props:{colors:{},modelValue:{},getColorForPercent:{type:Function},active:{}},emits:["update:modelValue","active"],setup(e,{emit:t}){const n=e,r=t,a=d.ref(),i=d.reactive({}),o=d.ref(-1);d.watch(()=>n.modelValue,()=>{n.modelValue.forEach((A,h)=>i[h]=A)},{immediate:!0});const s=d.computed(()=>Math.floor(o.value!==-1?0-o.value:0)),c=d.computed(()=>Math.floor(o.value!==-1?100+o.value:100));d.watch(()=>i,A=>{r("update:modelValue",Object.values(A))},{deep:!0});const f=d.computed(()=>{const A=100/(n.colors.length-1);return`linear-gradient(to right, ${n.colors.map((m,g)=>`${m} ${A*g}%`).join(", ")})`});return d.onMounted(()=>{let A=16,h=a.value.getBoundingClientRect().width-A*2;o.value=A/h*100}),(A,h)=>(d.openBlock(),d.createElementBlock("div",L1e,[d.createElementVNode("div",R1e,[d.createElementVNode("div",{ref_key:"barRef",ref:a,class:"pl-color-slider__color-contaier"},[d.createElementVNode("div",{style:d.normalizeStyle({background:f.value}),class:"pl-color-slider__gradient"},null,4)],512),d.createElementVNode("div",N1e,[a.value?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(A.modelValue,(m,g)=>(d.openBlock(),d.createBlock(I1e,{modelValue:i[g],"onUpdate:modelValue":b=>i[g]=b,"is-active":A.active===g,key:g,min:s.value,max:c.value,"bar-ref":a.value,"get-color-for-percent":A.getColorForPercent,class:"pl-color-slider__thumb",tabindex:"0",onActive:b=>A.$emit("active",{index:g,status:b})},null,8,["modelValue","onUpdate:modelValue","is-active","min","max","bar-ref","get-color-for-percent","onActive"]))),128)):d.createCommentVNode("",!0)])])]))}});function g$(e,t){if(t==="lineType")return e*32+16*2;if(t==="dotShape"||t==="color")return Math.ceil(e/6)*36+20*2}const F1e={class:"aes-mapping-block"},V1e={style:{margin:"0 24px"}},O1e={class:"section-title"},Q1e={style:{margin:"24px 0"}},z1e={key:0,style:{margin:"24px 0"}},U1e={key:0,class:"aes-settings-hint"},j1e={key:0,class:"column-value__reorder-icon"},G1e={class:"column-value__title"},Y1e={class:"column-value__aes-group"},W1e=["onClick"],X1e=["onClick"],K1e=["onClick"],vB=d.defineComponent({__name:"AesDataMappingDiscrete",props:{dataColumnLabel:{},columnValueLabels:{},usedAesInMapping:{},modelValue:{},allowReordering:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,a=d.ref(!1),i=d.ref(n.modelValue.palette),o=d.computed(()=>tS(i.value)),s=d.ref(null),c=d.computed(()=>s.value===null?null:n.modelValue.order.indexOf(s.value)),f=d.ref(null),A=d.computed(()=>n.modelValue.order.map(re=>{var G;const U=(G=n.modelValue.mapping[re])==null?void 0:G.aes;return{text:n.columnValueLabels[re],value:re,dotShape:U==null?void 0:U.dotShape,color:U==null?void 0:U.color,lineType:U==null?void 0:U.lineShape}}));function h(re){i.value=re,a.value=!1,r("update:modelValue",gR(re,n.modelValue.order))}function m(re,U,G){r("update:modelValue",{...n.modelValue,mapping:{...n.modelValue.mapping,[re]:{...n.modelValue.mapping[re],aes:{...n.modelValue.mapping[re].aes,[U]:G}}}})}const g=d.reactive({color:{},dotShape:{},lineType:{}});function b(re,U,G){G&&!g[re][U.value]&&(g[re][U.value]=G)}function C(re,U){const G=s.value===re.value&&f.value===U;s.value=G?null:re.value,f.value=G?null:U}function x(){s.value=null,f.value=null}const k=d.computed(()=>Do[i.value].colors.map(re=>({color:re,name:re}))),_=d.computed(()=>f.value?g$(f.value==="lineType"?My.length:f.value==="dotShape"?N5.length:k.value.length,f.value):0),D=d.ref();n.allowReordering&&pt.useSortable(D,{handle:".column-value__reorder-icon",onChange(re){r("update:modelValue",{...n.modelValue,order:re.map(U=>n.modelValue.order[U])})}});function O(re,U,G=0,Z=1){const Y=1/(re.length-1),X=Da().domain(re.map((oe,me)=>G+me*Y*(Z-G))).range(re);return oe=>oe>Z||oe<G?U:X(oe)}const I=d.computed(()=>O(Do[i.value].colors,dC)),$=d.computed(()=>O(Do[i.value].colors,dC,0,100)),Q=d.ref(n.modelValue.order.map(re=>n.modelValue.mapping[re].colorIdx*100));d.watch(()=>n.modelValue,re=>{Q.value=re.order.map(U=>re.mapping[U].colorIdx*100)});function ee(re){re.forEach((U,G)=>{const Z=n.modelValue.order[G],Y=U/100;n.modelValue.mapping[Z].colorIdx!==Y&&r("update:modelValue",{...n.modelValue,mapping:{...n.modelValue.mapping,[Z]:{colorIdx:Y,aes:{...n.modelValue.mapping[Z].aes,color:I.value(Y)}}}})})}function K(re){f.value="color",s.value=re.status?n.modelValue.order[re.index]:null}return(re,U)=>(d.openBlock(),d.createElementBlock("div",F1e,[d.createElementVNode("div",V1e,[d.createElementVNode("div",O1e,[d.createElementVNode("span",null,d.toDisplayString(re.dataColumnLabel),1)]),d.createElementVNode("div",Q1e,[d.createVNode(o3,{label:"Color Palette ",icon:"chevron-right",title:d.unref(Do)[i.value].title,palette:i.value,onButtonClick:U[0]||(U[0]=G=>{a.value=!0,x()})},null,8,["title","palette"])]),o.value?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",z1e,[d.createVNode($1e,{modelValue:Q.value,"onUpdate:modelValue":[U[1]||(U[1]=G=>Q.value=G),ee],colors:d.unref(Do)[i.value].colors,"get-color-for-percent":$.value,active:c.value,onActive:K},null,8,["modelValue","colors","get-color-for-percent","active"])])),a.value?(d.openBlock(),d.createBlock(Qh,{key:1,title:"Color Palette","back-title":"Color mapping","onForm:close":U[2]||(U[2]=G=>a.value=!1)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:i.value,onSelect:h},null,8,["selected"])]),_:1})):d.createCommentVNode("",!0)]),re.allowReordering?(d.openBlock(),d.createElementBlock("div",U1e," Drag the rows to reorder ")):d.createCommentVNode("",!0),d.createElementVNode("div",{class:"column-values-list",ref_key:"optionsListRef",ref:D},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(A.value,G=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["column-value",{"column-value__with-reorder":re.allowReordering}])},[re.allowReordering?(d.openBlock(),d.createElementBlock("div",j1e,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(Vhe)))])):d.createCommentVNode("",!0),d.createElementVNode("div",G1e,d.toDisplayString(G.text),1),d.createElementVNode("div",Y1e,[re.usedAesInMapping.lineType?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["column-value__aes",{aes__selected:s.value===G.value&&f.value==="lineType"}]),ref_for:!0,ref:Z=>b("lineType",G,Z),onClick:d.withModifiers(Z=>C(G,"lineType"),["stop"])},[d.createElementVNode("div",{class:d.normalizeClass(["icon__line line",{[`line__${G.lineType}`]:!0}])},null,2)],10,W1e)):d.createCommentVNode("",!0),re.usedAesInMapping.dotShape?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["column-value__aes",{aes__selected:s.value===G.value&&f.value==="dotShape"}]),ref_for:!0,ref:Z=>b("dotShape",G,Z),onClick:d.withModifiers(Z=>C(G,"dotShape"),["stop"])},[d.createElementVNode("div",{class:d.normalizeClass(["dot",{[`dot__${G.dotShape}`]:!0}])},null,2)],10,X1e)):d.createCommentVNode("",!0),re.usedAesInMapping.fill||re.usedAesInMapping.stroke?(d.openBlock(),d.createElementBlock("div",{key:2,class:d.normalizeClass(["column-value__aes",{aes__selected:s.value===G.value&&f.value==="color"}]),ref_for:!0,ref:Z=>b("color",G,Z),onClick:d.withModifiers(Z=>C(G,"color"),["stop"])},[d.createElementVNode("div",{class:"column-value__color",style:d.normalizeStyle({background:G.color})},null,4)],10,K1e)):d.createCommentVNode("",!0),(f.value!=="color"||o.value)&&f.value!==null&&s.value===G.value?(d.openBlock(),d.createBlock(db,{key:`${f.value}_${s.value}`,targetRef:g[f.value][s.value],"onPopup:close":x,height:_.value},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["fixed-aes-list",{"fixed-aes-list__rows":!1}])},[f.value==="lineType"?(d.openBlock(),d.createBlock(fb,{key:0,"onUpdate:modelValue":[Z=>m(G.value,"lineShape",Z),Z=>G.lineType=Z],modelValue:G.lineType},null,8,["onUpdate:modelValue","modelValue"])):d.createCommentVNode("",!0),f.value==="dotShape"?(d.openBlock(),d.createBlock(A$,{key:1,"onUpdate:modelValue":[Z=>m(G.value,"dotShape",Z),Z=>G.dotShape=Z],modelValue:G.dotShape},null,8,["onUpdate:modelValue","modelValue"])):d.createCommentVNode("",!0),f.value==="color"?(d.openBlock(),d.createBlock(d$,{key:2,"colors-list":k.value,"onUpdate:modelValue":[Z=>m(G.value,"color",Z),Z=>G.color=Z],modelValue:G.color},null,8,["colors-list","onUpdate:modelValue","modelValue"])):d.createCommentVNode("",!0)])]),_:2},1032,["targetRef","height"])):d.createCommentVNode("",!0)])],2))),256))],512)]))}}),Z1e={class:"axes-settings-list"},J1e={class:"axes-settings-options-row block"},q1e={key:0,class:"axes-settings-input"},eme={class:"axes-settings-options-row"},tme={key:0,class:"axes-settings-options-row"},nme={key:1,class:"axes-settings-options-row"},rme={key:2,class:"axes-settings-options-row"},ame={class:"axes-settings-options-row block"},ime={key:3},ome={class:"axes-settings-options-row table"},lme={class:"axes-settings-options-row table"},sme={class:"axes-settings-options-row table"},ume={class:"axes-settings-options-row block"},cme={key:0},fme={class:"axes-settings-options-row block"},dme={class:"axes-settings-options-row table"},Ame={class:"axes-settings-options-row table"},pme={class:"other"},hme={class:"axes-settings-options-row"},mme={class:"axes-settings-options-row"},vme={class:"axes-settings-options-row"},gme={class:"axes-settings-options-row block"},yme=d.defineComponent({__name:"DiscreteAxesSettingsForm",setup(e){const t=da(),n=t.value.reactive.axesSettings,r={height:40,horizontalPadding:12,defaultState:"open"},a=[{value:"left",icon:P7},{value:"center",icon:M7},{value:"right",icon:D7}],i=[{value:"center",icon:lB},{value:"45deg",icon:sB},{value:"90deg",icon:uB}],o=[{value:"auto",text:"Auto"},{value:"custom",text:"Custom"},{value:"hidden",text:"Hide"}],s=[{value:"linear",text:"Linear"},{value:"log",text:"Log"}],c=[{value:"empty",icon:I7},{value:"left",icon:cB},{value:"bottom",icon:fB},{value:"left-bottom",icon:dB},{value:"full",icon:H7}],f=d.computed(()=>t.value.inputGuide.value),A=d.computed(()=>t.value.uniqueValuesData.value),h=d.ref(!1),m=d.ref(!1),g=d.computed(()=>{var re,U;return(U=(re=t.value.reactive.optionsState.components.primaryGrouping)==null?void 0:re.selectorStates[0])==null?void 0:U.selectedSource}),b=d.computed(()=>{var re,U;return(U=(re=t.value.reactive.optionsState.components.secondaryGrouping)==null?void 0:re.selectorStates[0])==null?void 0:U.selectedSource}),C=d.computed(()=>t.value.commonHelpersData.primaryGroups.value),x=d.computed(()=>t.value.commonHelpersData.secondaryGroups.value),k=d.computed(()=>t.value.commonHelpersData.usedAesInMapping.value),_=d.ref(t.value.reactive.dataBindAes[g.value]??Uy(C.value)),D=d.ref(t.value.reactive.dataBindAes[b.value]??Uy(x.value)),O=d.computed(()=>{var re;if(g.value){const U=f.value.getSourceInfo(g.value)??null,G=((re=A.value[g.value])==null?void 0:re.labels)??null;return{selectedSourceInfo:U,labels:C.value.reduce((Z,Y)=>(Z[Y]=(G==null?void 0:G[Y])??String(Y),Z),{})}}}),I=d.computed(()=>{var re;if(b.value){const U=f.value.getSourceInfo(b.value)??null,G=((re=A.value[b.value])==null?void 0:re.labels)??null;return{selectedSourceInfo:U,labels:x.value.reduce((Z,Y)=>(Z[Y]=(G==null?void 0:G[Y])??String(Y),Z),{})}}});function $(re,U){t.value.reactive.dataBindAes[U]=re}const Q=[{text:"X",value:"x"},{text:"Y",value:"y"},{text:"XY",value:"xy"},{text:"None",value:"none"}],ee=d.computed(()=>A.value[g.value]),K=d.computed({get(){var re;return DR(n.axisX.labelsRotation,(re=ee.value)==null?void 0:re.options)},set(re){n.axisX.labelsRotation=re}});return(re,U)=>(d.openBlock(),d.createElementBlock("div",{class:"axes-form",onClick:U[26]||(U[26]=G=>G.stopPropagation())},[U[38]||(U[38]=d.createElementVNode("h3",{class:"axes-title"}," Axes ",-1)),d.createElementVNode("div",Z1e,[d.createVNode(ts,{title:"Title",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",J1e,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).title.mode,"onUpdate:modelValue":U[0]||(U[0]=G=>d.unref(n).title.mode=G)},null,8,["modelValue"])]),d.unref(n).title.mode==="custom"?(d.openBlock(),d.createElementBlock("div",q1e,[d.createVNode(d.unref(pt.PlTextField),{label:"Chart title",placeholder:"Chart title",modelValue:d.unref(n).title.value,"onUpdate:modelValue":U[1]||(U[1]=G=>d.unref(n).title.value=G)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",eme,[U[27]||(U[27]=d.createElementVNode("span",null,"Alignment",-1)),d.createVNode(Uf,{options:a,modelValue:d.unref(n).title.position,"onUpdate:modelValue":U[2]||(U[2]=G=>d.unref(n).title.position=G)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"X-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[C.value.length>1?(d.openBlock(),d.createElementBlock("div",tme,[U[28]||(U[28]=d.createElementVNode("span",null,"Primary groups order: ",-1)),d.createVNode(L7,{data:{type:"data",value:null},onClick:U[3]||(U[3]=G=>{h.value=!0})}),h.value&&O.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Reorder primary groups","back-title":"Axes Settings","onForm:close":U[6]||(U[6]=G=>h.value=!1)},{default:d.withCtx(()=>{var G;return[d.createVNode(vB,{"column-value-labels":O.value.labels,"data-column-label":((G=O.value.selectedSourceInfo)==null?void 0:G.label)??"","used-aes-in-mapping":k.value[g.value],"allow-reordering":"",modelValue:_.value,"onUpdate:modelValue":[U[4]||(U[4]=Z=>_.value=Z),U[5]||(U[5]=Z=>$(Z,g.value))]},null,8,["column-value-labels","data-column-label","used-aes-in-mapping","modelValue"])]}),_:1})):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),x.value.length>1?(d.openBlock(),d.createElementBlock("div",nme,[U[29]||(U[29]=d.createElementVNode("span",null,"Secondary groups order: ",-1)),d.createVNode(L7,{data:{type:"data",value:null},onClick:U[7]||(U[7]=G=>{m.value=!0})}),m.value&&I.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Reorder secondary groups","back-title":"Axes Settings","onForm:close":U[10]||(U[10]=G=>m.value=!1)},{default:d.withCtx(()=>{var G;return[d.createVNode(vB,{"column-value-labels":I.value.labels,"data-column-label":((G=I.value.selectedSourceInfo)==null?void 0:G.label)??"","used-aes-in-mapping":k.value[b.value],"allow-reordering":"",modelValue:D.value,"onUpdate:modelValue":[U[8]||(U[8]=Z=>D.value=Z),U[9]||(U[9]=Z=>$(Z,b.value))]},null,8,["column-value-labels","data-column-label","used-aes-in-mapping","modelValue"])]}),_:1})):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="discrete"?(d.openBlock(),d.createElementBlock("div",rme,[U[30]||(U[30]=d.createElementVNode("span",null,"Labels rotation",-1)),d.createVNode(Uf,{options:i,modelValue:K.value,"onUpdate:modelValue":U[11]||(U[11]=G=>K.value=G)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",ame,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisX.titleMode,"onUpdate:modelValue":U[12]||(U[12]=G=>d.unref(n).axisX.titleMode=G)},null,8,["modelValue"])]),d.unref(n).axisX.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",ime,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisX.customTitle,"onUpdate:modelValue":U[13]||(U[13]=G=>d.unref(n).axisX.customTitle=G)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",ome,[U[31]||(U[31]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.gridlines,"onUpdate:modelValue":U[14]||(U[14]=G=>d.unref(n).axisX.gridlines=G)},null,8,["modelValue"])]),d.createElementVNode("div",lme,[U[32]||(U[32]=d.createElementVNode("span",null,"Lines between categories",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.linesBetweenCategories,"onUpdate:modelValue":U[15]||(U[15]=G=>d.unref(n).axisX.linesBetweenCategories=G)},null,8,["modelValue"])]),d.createElementVNode("div",sme,[U[33]||(U[33]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.ticks,"onUpdate:modelValue":U[16]||(U[16]=G=>d.unref(n).axisX.ticks=G)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"Y-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",ume,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisY.titleMode,"onUpdate:modelValue":U[17]||(U[17]=G=>d.unref(n).axisY.titleMode=G)},null,8,["modelValue"])]),d.unref(n).axisY.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",cme,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisY.customTitle,"onUpdate:modelValue":U[18]||(U[18]=G=>d.unref(n).axisY.customTitle=G)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",fme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Scale",options:s,modelValue:d.unref(n).axisY.scale,"onUpdate:modelValue":U[19]||(U[19]=G=>d.unref(n).axisY.scale=G)},null,8,["modelValue"])]),d.createElementVNode("div",dme,[U[34]||(U[34]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.gridlines,"onUpdate:modelValue":U[20]||(U[20]=G=>d.unref(n).axisY.gridlines=G)},null,8,["modelValue"])]),d.createElementVNode("div",Ame,[U[35]||(U[35]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.ticks,"onUpdate:modelValue":U[21]||(U[21]=G=>d.unref(n).axisY.ticks=G)},null,8,["modelValue"])])]),_:1}),d.createElementVNode("div",pme,[d.createElementVNode("div",hme,[U[36]||(U[36]=d.createElementVNode("span",null,"Frame",-1)),d.createVNode(Uf,{options:c,modelValue:d.unref(n).other.frame,"onUpdate:modelValue":U[22]||(U[22]=G=>d.unref(n).other.frame=G)},null,8,["modelValue"])]),d.createElementVNode("div",mme,[U[37]||(U[37]=d.createElementVNode("span",null,"Reverse axes",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).other.reverse,"onUpdate:modelValue":U[23]||(U[23]=G=>d.unref(n).other.reverse=G)},null,8,["modelValue"])]),d.createElementVNode("div",vme,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Facet column count",min:1,max:6,step:1,breakpoints:!0,mode:"input",modelValue:d.unref(n).other.facetColumns,"onUpdate:modelValue":U[24]||(U[24]=G=>d.unref(n).other.facetColumns=G)},null,8,["modelValue"])]),d.createElementVNode("div",gme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Facet shared by",options:Q,modelValue:d.unref(n).other.facetSharedBy,"onUpdate:modelValue":U[25]||(U[25]=G=>d.unref(n).other.facetSharedBy=G)},null,8,["modelValue"])])])])]))}}),wme={class:"axes-settings-list"},Cme={class:"axes-settings-options-row block"},bme={key:0,class:"axes-settings-input"},Eme={class:"axes-settings-options-row"},xme={class:"axes-settings-options-row block"},Sme={key:0},Bme={class:"axes-settings-options-row block"},kme={class:"axes-settings-options-row table"},Tme={class:"axes-settings-options-row table"},_me={class:"axes-settings-options-row"},Pme={class:"fixed-aes-list fixed-aes-list__rows"},Mme={class:"axes-settings-options-row block"},Dme={key:0},Hme={class:"axes-settings-options-row block"},Ime={class:"axes-settings-options-row table"},Lme={class:"axes-settings-options-row table"},Rme={class:"axes-settings-options-row"},Nme={class:"fixed-aes-list fixed-aes-list__rows"},$me={key:0,class:"other"},Fme={class:"axes-settings-options-row"},Vme={class:"axes-settings-options-row"},Ome={class:"axes-settings-options-row block"},Qme=d.defineComponent({__name:"ScatterplotAxesSettingsForm",setup(e){const t=da(),n=t.value.reactive.axesSettings,r=d.computed(()=>t.value.reactive.chartType),a={height:40,horizontalPadding:12,defaultState:"open"},i=[{value:"left",icon:P7},{value:"center",icon:M7},{value:"right",icon:D7}],o=[{value:"auto",text:"Auto"},{value:"custom",text:"Custom"},{value:"hidden",text:"Hide"}],s=[{value:"linear",text:"Linear"},{value:"log",text:"Log"}],c=[{value:"empty",icon:I7},{value:"left",icon:cB},{value:"bottom",icon:fB},{value:"left-bottom",icon:dB},{value:"full",icon:H7}],f=[{text:"X",value:"x"},{text:"Y",value:"y"},{text:"XY",value:"xy"},{text:"None",value:"none"}],A=d.ref(n.axisX.significantLinesStyle),h=d.ref(n.axisY.significantLinesStyle),m=d.computed(()=>g$(My.length,"lineType")),g=d.ref(),b=d.ref(),C=d.ref(!1),x=d.ref(!1);return(k,_)=>(d.openBlock(),d.createElementBlock("div",{class:"axes-form",onClick:_[26]||(_[26]=D=>D.stopPropagation())},[_[35]||(_[35]=d.createElementVNode("h3",{class:"axes-title"}," Axes ",-1)),d.createElementVNode("div",wme,[d.createVNode(ts,{title:"Title",settings:a,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Cme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).title.mode,"onUpdate:modelValue":_[0]||(_[0]=D=>d.unref(n).title.mode=D)},null,8,["modelValue"])]),d.unref(n).title.mode==="custom"?(d.openBlock(),d.createElementBlock("div",bme,[d.createVNode(d.unref(pt.PlTextField),{label:"Chart title",placeholder:"Chart title",modelValue:d.unref(n).title.value,"onUpdate:modelValue":_[1]||(_[1]=D=>d.unref(n).title.value=D)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Eme,[_[27]||(_[27]=d.createElementVNode("span",null,"Alignment",-1)),d.createVNode(Uf,{options:i,modelValue:d.unref(n).title.position,"onUpdate:modelValue":_[2]||(_[2]=D=>d.unref(n).title.position=D)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"X-axis",settings:a,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",xme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisX.titleMode,"onUpdate:modelValue":_[3]||(_[3]=D=>d.unref(n).axisX.titleMode=D)},null,8,["modelValue"])]),d.unref(n).axisX.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",Sme,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisX.customTitle,"onUpdate:modelValue":_[4]||(_[4]=D=>d.unref(n).axisX.customTitle=D)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Bme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Scale",options:s,modelValue:d.unref(n).axisX.scale,"onUpdate:modelValue":_[5]||(_[5]=D=>d.unref(n).axisX.scale=D)},null,8,["modelValue"])]),d.createElementVNode("div",kme,[_[28]||(_[28]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.gridlines,"onUpdate:modelValue":_[6]||(_[6]=D=>d.unref(n).axisX.gridlines=D)},null,8,["modelValue"])]),d.createElementVNode("div",Tme,[_[29]||(_[29]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.ticks,"onUpdate:modelValue":_[7]||(_[7]=D=>d.unref(n).axisX.ticks=D)},null,8,["modelValue"])]),d.createElementVNode("div",_me,[_[30]||(_[30]=d.createElementVNode("span",null,"Significant lines style",-1)),d.createVNode(L7,{data:{type:"lineType",value:A.value},onClick:_[8]||(_[8]=D=>C.value=!C.value),onRef:_[9]||(_[9]=D=>g.value=D)},null,8,["data"]),C.value?(d.openBlock(),d.createBlock(db,{key:0,height:m.value,targetRef:g.value,"onPopup:close":_[12]||(_[12]=D=>C.value=!1)},{default:d.withCtx(()=>[d.createElementVNode("div",Pme,[d.createVNode(fb,{modelValue:A.value,"onUpdate:modelValue":[_[10]||(_[10]=D=>A.value=D),_[11]||(_[11]=D=>d.unref(n).axisX.significantLinesStyle=D)]},null,8,["modelValue"])])]),_:1},8,["height","targetRef"])):d.createCommentVNode("",!0)])]),_:1}),d.createVNode(ts,{title:"Y-axis",settings:a,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Mme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisY.titleMode,"onUpdate:modelValue":_[13]||(_[13]=D=>d.unref(n).axisY.titleMode=D)},null,8,["modelValue"])]),d.unref(n).axisY.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",Dme,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisY.customTitle,"onUpdate:modelValue":_[14]||(_[14]=D=>d.unref(n).axisY.customTitle=D)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Hme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Scale",options:s,modelValue:d.unref(n).axisY.scale,"onUpdate:modelValue":_[15]||(_[15]=D=>d.unref(n).axisY.scale=D)},null,8,["modelValue"])]),d.createElementVNode("div",Ime,[_[31]||(_[31]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.gridlines,"onUpdate:modelValue":_[16]||(_[16]=D=>d.unref(n).axisY.gridlines=D)},null,8,["modelValue"])]),d.createElementVNode("div",Lme,[_[32]||(_[32]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.ticks,"onUpdate:modelValue":_[17]||(_[17]=D=>d.unref(n).axisY.ticks=D)},null,8,["modelValue"])]),d.createElementVNode("div",Rme,[_[33]||(_[33]=d.createElementVNode("span",null,"Significant lines style",-1)),d.createVNode(L7,{data:{type:"lineType",value:h.value},onClick:_[18]||(_[18]=D=>x.value=!x.value),onRef:_[19]||(_[19]=D=>b.value=D)},null,8,["data"]),x.value?(d.openBlock(),d.createBlock(db,{key:0,height:m.value,targetRef:b.value,"onPopup:close":_[22]||(_[22]=D=>x.value=!1)},{default:d.withCtx(()=>[d.createElementVNode("div",Nme,[d.createVNode(fb,{modelValue:h.value,"onUpdate:modelValue":[_[20]||(_[20]=D=>h.value=D),_[21]||(_[21]=D=>d.unref(n).axisY.significantLinesStyle=D)]},null,8,["modelValue"])])]),_:1},8,["height","targetRef"])):d.createCommentVNode("",!0)])]),_:1}),r.value==="scatterplot"?(d.openBlock(),d.createElementBlock("div",$me,[d.createElementVNode("div",Fme,[_[34]||(_[34]=d.createElementVNode("span",null,"Frame",-1)),d.createVNode(Uf,{options:c,modelValue:d.unref(n).other.frame,"onUpdate:modelValue":_[23]||(_[23]=D=>d.unref(n).other.frame=D)},null,8,["modelValue"])]),d.createElementVNode("div",Vme,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Facet column count",min:1,max:6,step:1,breakpoints:!0,mode:"input",modelValue:d.unref(n).other.facetColumns,"onUpdate:modelValue":_[24]||(_[24]=D=>d.unref(n).other.facetColumns=D)},null,8,["modelValue"])]),d.createElementVNode("div",Ome,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Facet shared by",options:f,modelValue:d.unref(n).other.facetSharedBy,"onUpdate:modelValue":_[25]||(_[25]=D=>d.unref(n).other.facetSharedBy=D)},null,8,["modelValue"])])])):d.createCommentVNode("",!0)])]))}}),zme={class:"axes-settings-list"},Ume={class:"axes-settings-options-row block"},jme={key:0,class:"axes-settings-input"},Gme={class:"axes-settings-options-row"},Yme={class:"axes-settings-options-row"},Wme={class:"axes-settings-options-row block"},Xme={key:0},Kme={class:"axes-settings-options-row block"},Zme={class:"axes-settings-options-row"},Jme={class:"axes-settings-options-row block"},qme={key:0},eve={class:"axes-settings-options-row block"},tve={class:"other"},nve={class:"axes-settings-options-row"},rve={class:"axes-settings-options-row"},ave={class:"axes-settings-options-row block"},ive=d.defineComponent({__name:"HeatmapAxesSettingsForm",setup(e){const t=da(),n=t.value.reactive.axesSettings,r={height:40,horizontalPadding:12,defaultState:"open"},a=[{value:"left",icon:P7},{value:"center",icon:M7},{value:"right",icon:D7}],i=[{value:0,icon:lB},{value:45,icon:sB},{value:90,icon:uB}],o=[{value:"auto",text:"Auto"},{value:"custom",text:"Custom"},{value:"hidden",text:"Hide"}],s=[{value:"none",icon:I7},{value:"full",icon:H7}],c=[{text:"X",value:"x"},{text:"Y",value:"y"},{text:"XY",value:"xy"},{text:"None",value:"none"}],f=[{text:"ascending",value:"asc"},{text:"descending",value:"desc"}],A=d.computed(()=>t.value.reactive.layersSettings.heatmapClustered),h=d.computed(()=>c.filter(m=>t.value.reactive.template!=="heatmapClustered"?!0:A.value.dendrogramX&&A.value.dendrogramY?m.value!=="x"&&m.value!=="xy"&&m.value!=="y":A.value.dendrogramX?m.value!=="x"&&m.value!=="xy":A.value.dendrogramY?m.value!=="y"&&m.value!=="xy":!0));return(m,g)=>(d.openBlock(),d.createElementBlock("div",{class:"axes-form",onClick:g[14]||(g[14]=b=>b.stopPropagation())},[g[19]||(g[19]=d.createElementVNode("h3",{class:"axes-title"}," Axes ",-1)),d.createElementVNode("div",zme,[d.createVNode(ts,{title:"Title",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Ume,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).title.mode,"onUpdate:modelValue":g[0]||(g[0]=b=>d.unref(n).title.mode=b)},null,8,["modelValue"])]),d.unref(n).title.mode==="custom"?(d.openBlock(),d.createElementBlock("div",jme,[d.createVNode(d.unref(pt.PlTextField),{label:"Chart title",placeholder:"Chart title",modelValue:d.unref(n).title.value,"onUpdate:modelValue":g[1]||(g[1]=b=>d.unref(n).title.value=b)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Gme,[g[15]||(g[15]=d.createElementVNode("span",null,"Alignment",-1)),d.createVNode(Uf,{options:a,modelValue:d.unref(n).title.position,"onUpdate:modelValue":g[2]||(g[2]=b=>d.unref(n).title.position=b)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"X-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Yme,[g[16]||(g[16]=d.createElementVNode("span",null,"Labels rotation",-1)),d.createVNode(Uf,{options:i,modelValue:d.unref(n).axisX.axisLabelsAngle,"onUpdate:modelValue":g[3]||(g[3]=b=>d.unref(n).axisX.axisLabelsAngle=b)},null,8,["modelValue"])]),d.createElementVNode("div",Wme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisX.titleMode,"onUpdate:modelValue":g[4]||(g[4]=b=>d.unref(n).axisX.titleMode=b)},null,8,["modelValue"])]),d.unref(n).axisX.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",Xme,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisX.customTitle,"onUpdate:modelValue":g[5]||(g[5]=b=>d.unref(n).axisX.customTitle=b)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Kme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Sorting",options:f,modelValue:d.unref(n).axisX.sorting,"onUpdate:modelValue":g[6]||(g[6]=b=>d.unref(n).axisX.sorting=b)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"Y-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Zme,[g[17]||(g[17]=d.createElementVNode("span",null,"Labels rotation",-1)),d.createVNode(Uf,{options:i,modelValue:d.unref(n).axisY.axisLabelsAngle,"onUpdate:modelValue":g[7]||(g[7]=b=>d.unref(n).axisY.axisLabelsAngle=b)},null,8,["modelValue"])]),d.createElementVNode("div",Jme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisY.titleMode,"onUpdate:modelValue":g[8]||(g[8]=b=>d.unref(n).axisY.titleMode=b)},null,8,["modelValue"])]),d.unref(n).axisY.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",qme,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisY.customTitle,"onUpdate:modelValue":g[9]||(g[9]=b=>d.unref(n).axisY.customTitle=b)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",eve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Sorting",options:f,modelValue:d.unref(n).axisY.sorting,"onUpdate:modelValue":g[10]||(g[10]=b=>d.unref(n).axisY.sorting=b)},null,8,["modelValue"])])]),_:1}),d.createElementVNode("div",tve,[d.createElementVNode("div",nve,[g[18]||(g[18]=d.createElementVNode("span",null,"Frame",-1)),d.createVNode(Uf,{options:s,modelValue:d.unref(n).other.frame,"onUpdate:modelValue":g[11]||(g[11]=b=>d.unref(n).other.frame=b)},null,8,["modelValue"])]),d.createElementVNode("div",rve,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Facet column count",min:1,max:6,step:1,breakpoints:!0,mode:"input",modelValue:d.unref(n).other.facetColumns,"onUpdate:modelValue":g[12]||(g[12]=b=>d.unref(n).other.facetColumns=b)},null,8,["modelValue"])]),d.createElementVNode("div",ave,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Facet shared by",options:h.value,modelValue:d.unref(n).other.facetSharedBy,"onUpdate:modelValue":g[13]||(g[13]=b=>d.unref(n).other.facetSharedBy=b)},null,8,["options","modelValue"])])])])]))}}),ove={class:"axes-settings-list"},lve={style:{padding:"0 24px 8px"}},sve={class:"axes-settings-options-row block"},uve={key:0,class:"axes-settings-input"},cve={class:"axes-settings-options-row"},fve={class:"axes-settings-options-row block"},dve={key:0},Ave={class:"axes-settings-options-row block"},pve={class:"axes-settings-options-row table"},hve={class:"axes-settings-options-row table"},mve={class:"axes-settings-options-row block"},vve={class:"axes-settings-options-row table"},gve={class:"axes-settings-options-row table"},yve={class:"other"},wve={class:"axes-settings-options-row"},Cve={class:"axes-settings-options-row"},bve={class:"axes-settings-options-row block"},Eve=d.defineComponent({__name:"HistogramAxesSettingsForm",setup(e){const n=da().value.reactive.axesSettings,r={height:40,horizontalPadding:12,defaultState:"open"},a=[{value:"left",icon:P7},{value:"center",icon:M7},{value:"right",icon:D7}],i=[{value:"auto",text:"Auto"},{value:"custom",text:"Custom"},{value:"hidden",text:"Hide"}],o=[{value:"linear",text:"Linear"},{value:"log",text:"Log"}],s=[{value:"empty",icon:I7},{value:"left",icon:cB},{value:"bottom",icon:fB},{value:"left-bottom",icon:dB},{value:"full",icon:H7}],c=[{text:"X",value:"x"},{text:"Y",value:"y"},{text:"XY",value:"xy"},{text:"None",value:"none"}];return(f,A)=>(d.openBlock(),d.createElementBlock("div",{class:"axes-form",onClick:A[15]||(A[15]=h=>h.stopPropagation())},[A[22]||(A[22]=d.createElementVNode("h3",{class:"axes-title"}," Axes ",-1)),d.createElementVNode("div",ove,[d.createElementVNode("div",lve,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Bins count",min:3,max:100,step:1,breakpoints:!1,mode:"input",modelValue:d.unref(n).other.binsCount,"onUpdate:modelValue":A[0]||(A[0]=h=>d.unref(n).other.binsCount=h)},null,8,["modelValue"])]),d.createVNode(ts,{title:"Title",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",sve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:i,modelValue:d.unref(n).title.mode,"onUpdate:modelValue":A[1]||(A[1]=h=>d.unref(n).title.mode=h)},null,8,["modelValue"])]),d.unref(n).title.mode==="custom"?(d.openBlock(),d.createElementBlock("div",uve,[d.createVNode(d.unref(pt.PlTextField),{label:"Chart title",placeholder:"Chart title",modelValue:d.unref(n).title.value,"onUpdate:modelValue":A[2]||(A[2]=h=>d.unref(n).title.value=h)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",cve,[A[16]||(A[16]=d.createElementVNode("span",null,"Alignment",-1)),d.createVNode(Uf,{options:a,modelValue:d.unref(n).title.position,"onUpdate:modelValue":A[3]||(A[3]=h=>d.unref(n).title.position=h)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"X-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",fve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:i,modelValue:d.unref(n).axisX.titleMode,"onUpdate:modelValue":A[4]||(A[4]=h=>d.unref(n).axisX.titleMode=h)},null,8,["modelValue"])]),d.unref(n).axisX.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",dve,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisX.customTitle,"onUpdate:modelValue":A[5]||(A[5]=h=>d.unref(n).axisX.customTitle=h)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Ave,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Scale",options:o,modelValue:d.unref(n).axisX.scale,"onUpdate:modelValue":A[6]||(A[6]=h=>d.unref(n).axisX.scale=h)},null,8,["modelValue"])]),d.createElementVNode("div",pve,[A[17]||(A[17]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.gridlines,"onUpdate:modelValue":A[7]||(A[7]=h=>d.unref(n).axisX.gridlines=h)},null,8,["modelValue"])]),d.createElementVNode("div",hve,[A[18]||(A[18]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.ticks,"onUpdate:modelValue":A[8]||(A[8]=h=>d.unref(n).axisX.ticks=h)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"Y-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",mve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Scale",options:o,modelValue:d.unref(n).axisY.scale,"onUpdate:modelValue":A[9]||(A[9]=h=>d.unref(n).axisY.scale=h)},null,8,["modelValue"])]),d.createElementVNode("div",vve,[A[19]||(A[19]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.gridlines,"onUpdate:modelValue":A[10]||(A[10]=h=>d.unref(n).axisY.gridlines=h)},null,8,["modelValue"])]),d.createElementVNode("div",gve,[A[20]||(A[20]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.ticks,"onUpdate:modelValue":A[11]||(A[11]=h=>d.unref(n).axisY.ticks=h)},null,8,["modelValue"])])]),_:1}),d.createElementVNode("div",yve,[d.createElementVNode("div",wve,[A[21]||(A[21]=d.createElementVNode("span",null,"Frame",-1)),d.createVNode(Uf,{options:s,modelValue:d.unref(n).other.frame,"onUpdate:modelValue":A[12]||(A[12]=h=>d.unref(n).other.frame=h)},null,8,["modelValue"])]),d.createElementVNode("div",Cve,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Facet column count",min:1,max:6,step:1,breakpoints:!0,mode:"input",modelValue:d.unref(n).other.facetColumns,"onUpdate:modelValue":A[13]||(A[13]=h=>d.unref(n).other.facetColumns=h)},null,8,["modelValue"])]),d.createElementVNode("div",bve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Facet shared by",options:c,modelValue:d.unref(n).other.facetSharedBy,"onUpdate:modelValue":A[14]||(A[14]=h=>d.unref(n).other.facetSharedBy=h)},null,8,["modelValue"])])])])]))}}),xve={class:"axes-settings-list"},Sve={class:"axes-settings-options-row block"},Bve={key:0,class:"axes-settings-input"},kve={class:"axes-settings-options-row"},Tve={class:"axes-settings-options-row"},_ve={class:"axes-settings-options-row block"},Pve={key:0},Mve={class:"axes-settings-options-row block"},Dve={class:"axes-settings-options-row"},Hve={class:"axes-settings-options-row block"},Ive={key:0},Lve={class:"axes-settings-options-row block"},Rve={class:"other"},Nve={class:"axes-settings-options-row"},$ve={class:"axes-settings-options-row"},Fve=d.defineComponent({__name:"BubbleAxesSettingsForm",setup(e){const n=da().value.reactive.axesSettings,r={height:40,horizontalPadding:12,defaultState:"open"},a=[{value:"left",icon:P7},{value:"center",icon:M7},{value:"right",icon:D7}],i=[{value:0,icon:lB},{value:45,icon:sB},{value:90,icon:uB}],o=[{value:"auto",text:"Auto"},{value:"custom",text:"Custom"},{value:"hidden",text:"Hide"}],s=[{value:"none",icon:I7},{value:"full",icon:H7}],c=[{text:"ascending",value:"asc"},{text:"descending",value:"desc"}];return(f,A)=>(d.openBlock(),d.createElementBlock("div",{class:"axes-form",onClick:A[13]||(A[13]=h=>h.stopPropagation())},[A[18]||(A[18]=d.createElementVNode("h3",{class:"axes-title"}," Axes ",-1)),d.createElementVNode("div",xve,[d.createVNode(ts,{title:"Title",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Sve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).title.mode,"onUpdate:modelValue":A[0]||(A[0]=h=>d.unref(n).title.mode=h)},null,8,["modelValue"])]),d.unref(n).title.mode==="custom"?(d.openBlock(),d.createElementBlock("div",Bve,[d.createVNode(d.unref(pt.PlTextField),{label:"Chart title",placeholder:"Chart title",modelValue:d.unref(n).title.value,"onUpdate:modelValue":A[1]||(A[1]=h=>d.unref(n).title.value=h)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",kve,[A[14]||(A[14]=d.createElementVNode("span",null,"Alignment",-1)),d.createVNode(Uf,{options:a,modelValue:d.unref(n).title.position,"onUpdate:modelValue":A[2]||(A[2]=h=>d.unref(n).title.position=h)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"X-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Tve,[A[15]||(A[15]=d.createElementVNode("span",null,"Labels rotation",-1)),d.createVNode(Uf,{options:i,modelValue:d.unref(n).axisX.axisLabelsAngle,"onUpdate:modelValue":A[3]||(A[3]=h=>d.unref(n).axisX.axisLabelsAngle=h)},null,8,["modelValue"])]),d.createElementVNode("div",_ve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisX.titleMode,"onUpdate:modelValue":A[4]||(A[4]=h=>d.unref(n).axisX.titleMode=h)},null,8,["modelValue"])]),d.unref(n).axisX.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",Pve,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisX.customTitle,"onUpdate:modelValue":A[5]||(A[5]=h=>d.unref(n).axisX.customTitle=h)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Mve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Sorting",options:c,modelValue:d.unref(n).axisX.sorting,"onUpdate:modelValue":A[6]||(A[6]=h=>d.unref(n).axisX.sorting=h)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"Y-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Dve,[A[16]||(A[16]=d.createElementVNode("span",null,"Labels rotation",-1)),d.createVNode(Uf,{options:i,modelValue:d.unref(n).axisY.axisLabelsAngle,"onUpdate:modelValue":A[7]||(A[7]=h=>d.unref(n).axisY.axisLabelsAngle=h)},null,8,["modelValue"])]),d.createElementVNode("div",Hve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisY.titleMode,"onUpdate:modelValue":A[8]||(A[8]=h=>d.unref(n).axisY.titleMode=h)},null,8,["modelValue"])]),d.unref(n).axisY.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",Ive,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisY.customTitle,"onUpdate:modelValue":A[9]||(A[9]=h=>d.unref(n).axisY.customTitle=h)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Lve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Sorting",options:c,modelValue:d.unref(n).axisY.sorting,"onUpdate:modelValue":A[10]||(A[10]=h=>d.unref(n).axisY.sorting=h)},null,8,["modelValue"])])]),_:1}),d.createElementVNode("div",Rve,[d.createElementVNode("div",Nve,[A[17]||(A[17]=d.createElementVNode("span",null,"Frame",-1)),d.createVNode(Uf,{options:s,modelValue:d.unref(n).other.frame,"onUpdate:modelValue":A[11]||(A[11]=h=>d.unref(n).other.frame=h)},null,8,["modelValue"])]),d.createElementVNode("div",$ve,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Facet column count",min:1,max:6,step:1,breakpoints:!0,mode:"input",modelValue:d.unref(n).other.facetColumns,"onUpdate:modelValue":A[12]||(A[12]=h=>d.unref(n).other.facetColumns=h)},null,8,["modelValue"])])])])]))}}),Vve={class:"data-form"},Ove=d.defineComponent({__name:"index",setup(e){const t=da();return(n,r)=>(d.openBlock(),d.createElementBlock("div",Vve,[d.unref(t).reactive.chartType==="discrete"?(d.openBlock(),d.createBlock(yme,{key:0})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot"||d.unref(t).reactive.chartType==="scatterplot-umap"?(d.openBlock(),d.createBlock(Qme,{key:1})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="heatmap"?(d.openBlock(),d.createBlock(ive,{key:2})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="histogram"?(d.openBlock(),d.createBlock(Eve,{key:3})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="bubble"?(d.openBlock(),d.createBlock(Fve,{key:4})):d.createCommentVNode("",!0)]))}});function df(e,t,n,r=!1){const a=t.components.primaryGrouping.selectorStates.length>0,i=t.components.secondaryGrouping.selectorStates.length>0;return e===null?i?{type:"secondaryGrouping"}:a&&!r?{type:"primaryGrouping"}:n:e}const Qve={class:"aes-mapping-block"},zve={style:{margin:"0 24px"}},Uve={class:"section-title"},jve={style:{margin:"24px 0"}},Gve={style:{margin:"24px 0"}},Yve={style:{margin:"24px 0"}},Wve={style:{display:"flex",marginTop:"16px",gap:"8px"}},Xve=d.defineComponent({__name:"AesDataMappingContinuous",props:{dataColumnLabel:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){var b,C;const n=e,r=t,a=d.ref(!1),i=d.ref(n.modelValue.palette);function o(x){i.value=x,a.value=!1,r("update:modelValue",Vv(x))}const s=[{value:"auto",label:"Auto"},{value:"custom",label:"Custom"}],c=d.ref(n.modelValue.range?"custom":"auto"),f=[{value:"linear",label:"Linear"},{value:"log",label:"Log"}],A=d.ref(n.modelValue.log?"log":"linear"),h=d.ref(((b=n.modelValue.range)==null?void 0:b.minValue)??void 0),m=d.ref(((C=n.modelValue.range)==null?void 0:C.maxValue)??void 0),g=d.ref(n.modelValue.midPoint??void 0);return d.watch(()=>c.value,x=>{x==="custom"&&r("update:modelValue",{...n.modelValue,range:{minValue:h.value??null,maxValue:m.value??null}}),x==="auto"&&r("update:modelValue",{...n.modelValue,range:null})}),d.watch(()=>h.value,x=>{r("update:modelValue",{...n.modelValue,range:{...n.modelValue.range,minValue:x}})}),d.watch(()=>m.value,x=>{r("update:modelValue",{...n.modelValue,range:{...n.modelValue.range,maxValue:x}})}),d.watch(()=>g.value,x=>{r("update:modelValue",{...n.modelValue,midPoint:x??null})}),d.watch(()=>A.value,x=>{r("update:modelValue",{...n.modelValue,log:x==="log"})}),(x,k)=>(d.openBlock(),d.createElementBlock("div",Qve,[d.createElementVNode("div",zve,[d.createElementVNode("div",Uve,[d.createElementVNode("span",null,d.toDisplayString(x.dataColumnLabel),1)]),d.createElementVNode("div",jve,[d.createVNode(o3,{label:"Color Palette ",title:d.unref(Do)[i.value].title,palette:i.value,onButtonClick:k[0]||(k[0]=_=>{a.value=!0})},null,8,["title","palette"])]),d.createElementVNode("div",Gve,[d.createVNode(d.unref(pt.PlBtnGroup),{options:f,modelValue:A.value,"onUpdate:modelValue":k[1]||(k[1]=_=>A.value=_)},null,8,["modelValue"])]),d.createElementVNode("div",Yve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Gradient range",options:s,modelValue:c.value,"onUpdate:modelValue":k[2]||(k[2]=_=>c.value=_)},null,8,["modelValue"])]),d.createElementVNode("div",Wve,[c.value==="custom"?(d.openBlock(),d.createBlock(d.unref(pt.PlNumberField),{key:0,label:"From",updateOnEnterOrClickOutside:!0,useIncrementButtons:!1,modelValue:h.value,"onUpdate:modelValue":k[3]||(k[3]=_=>h.value=_)},null,8,["modelValue"])):d.createCommentVNode("",!0),d.createVNode(d.unref(pt.PlNumberField),{label:"Mid point",updateOnEnterOrClickOutside:!0,useIncrementButtons:!1,style:{flexGrow:1},modelValue:g.value,"onUpdate:modelValue":k[4]||(k[4]=_=>g.value=_)},null,8,["modelValue"]),c.value==="custom"?(d.openBlock(),d.createBlock(d.unref(pt.PlNumberField),{key:1,label:"To",updateOnEnterOrClickOutside:!0,useIncrementButtons:!1,modelValue:m.value,"onUpdate:modelValue":k[5]||(k[5]=_=>m.value=_)},null,8,["modelValue"])):d.createCommentVNode("",!0)]),a.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Color Palette","back-title":"Color mapping","onForm:close":k[6]||(k[6]=_=>a.value=!1)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:i.value,categorical:!1,onSelect:o},null,8,["selected"])]),_:1})):d.createCommentVNode("",!0)])]))}}),Kve={class:"aes-input-row"},Hi=d.defineComponent({__name:"AesSelector",props:{label:{},type:{},selected:{},formTitle:{},formBackTitle:{},possibleAesSourceInputs:{},withoutFixed:{type:Boolean},disabled:{type:Boolean}},emits:["aes-update","aes-selector-close"],setup(e,{emit:t}){var K,re;const n=e,r=da(),a=d.computed(()=>r.value.reactive.chartType),i=t,o={discrete:["primaryGrouping","secondaryGrouping"],scatterplot:["grouping"],"scatterplot-umap":["grouping"],dendro:[],heatmap:[],histogram:[],bubble:[]},s=n.possibleAesSourceInputs??o[a.value],c=d.computed(()=>r.value.commonHelpersData.usedAesInMapping.value);function f(U){return typeof U=="string"?U:a.value==="scatterplot"?`grouping_${U.value}`:a.value==="dendro"?`${U.type}_${U.value}`:U.type}const A=d.ref(Yy(n.selected)?f(n.selected):"fix"),h={fill:_y[0].color,stroke:_y[0].color,dotShape:P0,lineType:AC,size:""},m=d.computed(()=>r.value.inputGuide.value),g=d.computed(()=>r.value.uniqueValuesData.value),b=new Set(["scatterplot","scatterplot-umap","heatmap"]),C=d.computed(()=>{const U={},G=r.value.reactive.optionsState.components;function Z(Y,X){const oe=m.value.getSourceInfo(X),me=g.value[X],ae=(me==null?void 0:me.list)??[],ye=(me==null?void 0:me.labels)??{},Ce=f({type:Y,value:X});if(b.has(a.value)&&oe.type==="String"||!b.has(a.value)){const ce=r.value.reactive.dataBindAes[X]??Uy(ae);U[Ce]={type:"dataCategorical",value:Ce,initialData:ce,inputName:Y,selectedSource:X,selectedSourceInfo:oe,selectedSourceValues:ae,labels:ce.order.reduce((ge,ze)=>(ge[ze]=ye[ze]??String(ze),ge),{})}}else{const ce=r.value.reactive.dataBindAes[X]??Vv(Z1);U[Ce]={type:"dataContinuous",value:Ce,initialData:ce,inputName:Y,selectedSource:X,selectedSourceInfo:oe,selectedSourceValues:ae}}}return s.forEach(Y=>{var X;(X=G==null?void 0:G[Y])!=null&&X.selectorStates.length&&G[Y].selectorStates.forEach(({selectedSource:oe})=>{Z(Y,oe)})}),n.withoutFixed||(U.fix={type:"fix",value:"fix",initialData:Yy(n.selected)?h[n.type]:n.selected}),U}),x=d.computed(()=>C.value[A.value]??null);function k(U,G){var Z,Y,X,oe;return U.type==="fix"?"Fixed":G===U.value?`${(Z=U.selectedSourceInfo)==null?void 0:Z.label}`:a.value==="discrete"?`${U.value==="primaryGrouping"?"Primary":"Secondary"} grouping: ${(Y=U.selectedSourceInfo)==null?void 0:Y.label}`:a.value==="scatterplot"||a.value==="dendro"?`Grouping: ${(X=U.selectedSourceInfo)==null?void 0:X.label}`:((oe=U.selectedSourceInfo)==null?void 0:oe.label)??""}const _=d.computed(()=>{const U=[],G=r.value.reactive.optionsState.components;function Z(Y,X){const oe=f({type:Y==="shape"?"grouping":Y,value:X});C.value[oe]&&U.push({text:k(C.value[oe],A.value),value:oe})}if(s.forEach(Y=>{var X;(X=G==null?void 0:G[Y])!=null&&X.selectorStates.length&&G[Y].selectorStates.forEach(({selectedSource:oe})=>{Z(Y,oe)})}),!C.value[A.value]){let Y="Not consistent (grouping)";a.value==="discrete"&&(Y=`${A.value==="primaryGrouping"?"Primary":"Secondary"} grouping (not selected)`),U.push({text:Y,value:A.value})}return n.withoutFixed||U.push({text:"Fixed",value:"fix"}),U}),D=d.ref(!1),O=d.ref(C.value.fix?C.value.fix.initialData:null),I=d.ref(((K=x.value)==null?void 0:K.type)==="dataCategorical"?x.value.initialData:null),$=d.ref(((re=x.value)==null?void 0:re.type)==="dataContinuous"?x.value.initialData:null);d.watch(()=>A.value,U=>{const G=C.value[U];G.type==="fix"?i("aes-update",O.value,G):G.type==="dataCategorical"?(I.value=G.initialData,i("aes-update",G.initialData,G)):G.type==="dataContinuous"&&($.value=G.initialData,i("aes-update",G.initialData,G))});const Q=d.ref(),ee=d.computed(()=>{if(n.type==="lineType")return My.length*32+16*2;if(n.type==="dotShape")return Math.ceil(N5.length/6)*36+20*2;if(n.type==="fill"||n.type==="stroke")return Math.ceil(_y.length/6)*36+20*2});return(U,G)=>{var Z,Y;return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",Kve,[d.createElementVNode("div",{class:"aes-input-select",onClick:G[1]||(G[1]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{disabled:U.disabled||_.value.length<2,label:U.label,options:_.value,modelValue:A.value,"onUpdate:modelValue":G[0]||(G[0]=X=>A.value=X)},null,8,["disabled","label","options","modelValue"])]),d.createVNode(L7,{data:{type:A.value==="fix"?U.type:"data",value:A.value==="fix"?U.type==="size"?Number(U.selected):U.selected:null},onClick:G[2]||(G[2]=X=>D.value=!D.value),onRef:G[3]||(G[3]=X=>Q.value=X)},null,8,["data"]),A.value==="fix"&&D.value&&O.value?(d.openBlock(),d.createBlock(db,{key:0,height:ee.value,targetRef:Q.value,"onPopup:close":G[10]||(G[10]=X=>D.value=!1)},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["fixed-aes-list",{"fixed-aes-list__rows":U.type==="lineType"}])},[U.type==="fill"||U.type==="stroke"?(d.openBlock(),d.createBlock(d$,{key:0,"color-using":U.type,modelValue:O.value,"onUpdate:modelValue":[G[4]||(G[4]=X=>O.value=X),G[5]||(G[5]=X=>U.$emit("aes-update",X,C.value.fix))]},null,8,["color-using","modelValue"])):d.createCommentVNode("",!0),U.type==="dotShape"?(d.openBlock(),d.createBlock(A$,{key:1,modelValue:O.value,"onUpdate:modelValue":[G[6]||(G[6]=X=>O.value=X),G[7]||(G[7]=X=>U.$emit("aes-update",X,C.value.fix))]},null,8,["modelValue"])):d.createCommentVNode("",!0),U.type==="lineType"?(d.openBlock(),d.createBlock(fb,{key:2,modelValue:O.value,"onUpdate:modelValue":[G[8]||(G[8]=X=>O.value=X),G[9]||(G[9]=X=>U.$emit("aes-update",X,C.value.fix))]},null,8,["modelValue"])):d.createCommentVNode("",!0)],2)]),_:1},8,["height","targetRef"])):d.createCommentVNode("",!0)]),(((Z=x.value)==null?void 0:Z.type)==="dataCategorical"&&I.value||((Y=x.value)==null?void 0:Y.type)==="dataContinuous"&&$.value)&&D.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:U.formTitle,"back-title":U.formBackTitle,"onForm:close":G[15]||(G[15]=X=>D.value=!1)},{default:d.withCtx(()=>{var X,oe,me,ae;return[((X=x.value)==null?void 0:X.type)==="dataCategorical"&&I.value?(d.openBlock(),d.createBlock(vB,{key:0,"column-value-labels":x.value.labels,"data-column-label":((oe=x.value.selectedSourceInfo)==null?void 0:oe.label)??"","used-aes-in-mapping":c.value[x.value.selectedSource],"allow-reordering":a.value==="discrete",modelValue:I.value,"onUpdate:modelValue":[G[11]||(G[11]=ye=>I.value=ye),G[12]||(G[12]=ye=>U.$emit("aes-update",ye,x.value))]},null,8,["column-value-labels","data-column-label","used-aes-in-mapping","allow-reordering","modelValue"])):d.createCommentVNode("",!0),((me=x.value)==null?void 0:me.type)==="dataContinuous"&&$.value?(d.openBlock(),d.createBlock(Xve,{key:1,"data-column-label":((ae=x.value.selectedSourceInfo)==null?void 0:ae.label)??"",modelValue:$.value,"onUpdate:modelValue":[G[13]||(G[13]=ye=>$.value=ye),G[14]||(G[14]=ye=>U.$emit("aes-update",ye,x.value))]},null,8,["data-column-label","modelValue"])):d.createCommentVNode("",!0)]}),_:1},8,["title","back-title"])):d.createCommentVNode("",!0)],64)}}}),Zve={class:"checkbox-item"},Kv="box",Jve=d.defineComponent({__name:"Boxplot",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[Kv]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.fillColor,r.value,Py)),i=d.computed(()=>df(n.value.lineColor,r.value,yo)),o=d.computed(()=>n.value.dotShape),s=d.computed(()=>n.value.lineType);function c(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Kv][b]={type:g.inputName}:t.value.reactive.layersSettings[Kv][b]=m,g.type==="dataCategorical"&&typeof m!="string"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}function f(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Kv][b]={type:g.inputName}:t.value.reactive.layersSettings[Kv][b]=m,g.type==="dataCategorical"&&typeof m=="object"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}function A(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Kv][b]={type:g.inputName}:t.value.reactive.layersSettings[Kv][b]=m,g.type==="dataCategorical"&&typeof m=="object"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}const h=d.computed({get:()=>n.value.opacity*100,set:m=>{n.value.opacity=m/100}});return(m,g)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:g[0]||(g[0]=(b,C)=>c(b,C,"fillColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,onAesUpdate:g[1]||(g[1]=(b,C)=>c(b,C,"lineColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Line Type","form-title":"Line Type Settings","form-back-title":"Layers",type:"lineType","possible-aes-source-inputs":[],selected:s.value,onAesUpdate:g[2]||(g[2]=(b,C)=>A(b,C,"lineType"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:h.value,"onUpdate:modelValue":g[3]||(g[3]=b=>h.value=b)},null,8,["modelValue"]),d.createElementVNode("div",Zve,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.showOutliers,"onUpdate:modelValue":g[4]||(g[4]=b=>n.value.showOutliers=b)},null,8,["modelValue"]),g[6]||(g[6]=d.createElementVNode("span",null,"Show outliers",-1))]),n.value.showOutliers?(d.openBlock(),d.createBlock(Hi,{key:0,label:"Outlier shape","form-title":"Outlier Shape Settings","form-back-title":"Layers",type:"dotShape","possible-aes-source-inputs":[],selected:o.value,onAesUpdate:g[5]||(g[5]=(b,C)=>f(b,C,"dotShape"))},null,8,["selected"])):d.createCommentVNode("",!0)],64))}}),qve={class:"checkbox-item"},gB="binnedDots",ege=d.defineComponent({__name:"BinnedDots",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[gB]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.fillColor,r.value,Py)),i=d.computed(()=>df(n.value.lineColor,r.value,yo));function o(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[gB][A]={type:f.inputName}:t.value.reactive.layersSettings[gB][A]=c,f.type==="dataCategorical"&&typeof c!="string"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}const s=d.computed({get:()=>n.value.opacity*100,set:c=>{n.value.opacity=c/100}});return(c,f)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:f[0]||(f[0]=(A,h)=>o(A,h,"fillColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,onAesUpdate:f[1]||(f[1]=(A,h)=>o(A,h,"lineColor"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=A=>s.value=A)},null,8,["modelValue"]),d.createElementVNode("div",qve,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.showOutliers,"onUpdate:modelValue":f[3]||(f[3]=A=>n.value.showOutliers=A)},null,8,["modelValue"]),f[4]||(f[4]=d.createElementVNode("span",null,"Show outliers",-1))])],64))}}),tge={class:"checkbox-item"},$7="jitteredDots",nge=d.defineComponent({__name:"JitteredDots",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[$7]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.dotFill,r.value,yo));function i(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[$7][A]={type:f.inputName}:t.value.reactive.layersSettings[$7][A]=c,f.type==="dataCategorical"&&typeof c!="string"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}function o(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[$7][A]={type:f.inputName}:t.value.reactive.layersSettings[$7][A]=c,f.type==="dataCategorical"&&typeof c=="object"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}const s=d.computed({get:()=>n.value.opacity*100,set:c=>{n.value.opacity=c/100}});return(c,f)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:f[0]||(f[0]=(A,h)=>i(A,h,"dotFill"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot shape","form-title":"Dot Shape Settings","form-back-title":"Layers",type:"dotShape",selected:n.value.dotShape,onAesUpdate:f[1]||(f[1]=(A,h)=>o(A,h,"dotShape"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=A=>s.value=A)},null,8,["modelValue"]),d.createElementVNode("div",tge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.showOutliers,"onUpdate:modelValue":f[3]||(f[3]=A=>n.value.showOutliers=A)},null,8,["modelValue"]),f[4]||(f[4]=d.createElementVNode("span",null,"Show outliers",-1))])],64))}}),rge={class:"checkbox-item"},age={class:"checkbox-item"},ige={key:0},u3="violin",oge=d.defineComponent({__name:"Violin",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[u3]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.fillColor,r.value,Py)),i=d.computed(()=>df(n.value.lineColor,r.value,yo)),o=d.computed(()=>n.value.lineType),s=d.computed(()=>n.value.medianLineStyle),c=d.computed(()=>n.value.quartilesLineStyle);function f(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[u3][b]={type:g.inputName}:t.value.reactive.layersSettings[u3][b]=m,g.type==="dataCategorical"&&typeof m!="string"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}function A(m,g,b){t.value.reactive.layersSettings[u3][b]=typeof m=="object"?{type:g.value}:m,g.type==="dataCategorical"&&typeof m=="object"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}const h=d.computed({get:()=>n.value.opacity*100,set:m=>{n.value.opacity=m/100}});return(m,g)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:g[0]||(g[0]=(b,C)=>f(b,C,"fillColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,onAesUpdate:g[1]||(g[1]=(b,C)=>f(b,C,"lineColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Line Type","form-title":"Line Type Settings","form-back-title":"Layers",type:"lineType","possible-aes-source-inputs":[],selected:o.value,onAesUpdate:g[2]||(g[2]=(b,C)=>A(b,C,"lineType"))},null,8,["selected"]),d.createElementVNode("div",rge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.trim,"onUpdate:modelValue":g[3]||(g[3]=b=>n.value.trim=b)},null,8,["modelValue"]),g[8]||(g[8]=d.createElementVNode("span",null,"Trim",-1))]),d.createElementVNode("div",age,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.showQuartiles,"onUpdate:modelValue":g[4]||(g[4]=b=>n.value.showQuartiles=b)},null,8,["modelValue"]),g[9]||(g[9]=d.createElementVNode("span",null,"Show median and quartiles",-1))]),n.value.showQuartiles?(d.openBlock(),d.createElementBlock("div",ige,[d.createVNode(Hi,{label:"Madian Line Type","form-title":"Line Type Settings","form-back-title":"Layers",type:"lineType","possible-aes-source-inputs":[],selected:s.value,onAesUpdate:g[5]||(g[5]=b=>d.unref(t).reactive.layersSettings[u3].medianLineStyle=b)},null,8,["selected"]),d.createVNode(Hi,{label:"Quartiles Line Type","form-title":"Line Type Settings","form-back-title":"Layers",type:"lineType","possible-aes-source-inputs":[],selected:c.value,onAesUpdate:g[6]||(g[6]=b=>d.unref(t).reactive.layersSettings[u3].quartilesLineStyle=b)},null,8,["selected"])])):d.createCommentVNode("",!0),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:h.value,"onUpdate:modelValue":g[7]||(g[7]=b=>h.value=b)},null,8,["modelValue"])],64))}}),yB="bar",lge=d.defineComponent({__name:"Bar",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[yB]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.fillColor,r.value,Py)),i=d.computed(()=>df(n.value.lineColor,r.value,yo));function o(f,A,h){A.type==="dataCategorical"?t.value.reactive.layersSettings[yB][h]={type:A.inputName}:t.value.reactive.layersSettings[yB][h]=f,A.type==="dataCategorical"&&typeof f!="string"&&(t.value.reactive.dataBindAes[A.selectedSource]=f)}const s=[{text:"Min",value:"min"},{text:"Max",value:"max"},{text:"Mean",value:"mean"},{text:"Median",value:"median"}],c=d.computed({get:()=>n.value.opacity*100,set:f=>{n.value.opacity=f/100}});return(f,A)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:A[0]||(A[0]=(h,m)=>o(h,m,"fillColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,onAesUpdate:A[1]||(A[1]=(h,m)=>o(h,m,"lineColor"))},null,8,["selected"]),d.createElementVNode("div",{class:"input-item",onClick:A[3]||(A[3]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{label:"Height",options:s,modelValue:n.value.height,"onUpdate:modelValue":A[2]||(A[2]=h=>n.value.height=h)},null,8,["modelValue"])]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:c.value,"onUpdate:modelValue":A[4]||(A[4]=h=>c.value=h)},null,8,["modelValue"])],64))}}),sge={class:"checkbox-item"},wB="stackedBar",uge=d.defineComponent({__name:"StackedBar",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[wB]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.fillColor,r.value,Py)),i=d.computed(()=>df(n.value.lineColor,r.value,yo));function o(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[wB][A]={type:f.inputName}:t.value.reactive.layersSettings[wB][A]=c,f.type==="dataCategorical"&&typeof c!="string"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}const s=d.computed({get:()=>n.value.opacity*100,set:c=>{n.value.opacity=c/100}});return(c,f)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:f[0]||(f[0]=(A,h)=>o(A,h,"fillColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,onAesUpdate:f[1]||(f[1]=(A,h)=>o(A,h,"lineColor"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=A=>s.value=A)},null,8,["modelValue"]),d.createElementVNode("div",sge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.normalize,"onUpdate:modelValue":f[3]||(f[3]=A=>n.value.normalize=A)},null,8,["modelValue"]),f[4]||(f[4]=d.createElementVNode("span",null,"Normalize",-1))])],64))}}),Zv="line",cge=d.defineComponent({__name:"Line",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[Zv]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.lineColor,r.value,yo,!0)),i=d.computed(()=>df(n.value.dotFill,r.value,yo,!0)),o=d.computed(()=>n.value.lineType);function s(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Zv][b]={type:g.inputName}:t.value.reactive.layersSettings[Zv][b]=m,g.type==="dataCategorical"&&typeof m!="string"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}function c(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Zv][b]={type:g.inputName}:t.value.reactive.layersSettings[Zv][b]=m,g.type==="dataCategorical"&&typeof m=="object"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}function f(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Zv][b]={type:g.inputName}:t.value.reactive.layersSettings[Zv][b]=m,g.type==="dataCategorical"&&typeof m=="object"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}const A=[{text:"Mean",value:"mean"},{text:"Median",value:"median"}],h=d.computed({get:()=>n.value.opacity*100,set:m=>{n.value.opacity=m/100}});return(m,g)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:a.value,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:g[0]||(g[0]=(b,C)=>s(b,C,"lineColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Line Type","form-title":"Line Type Settings","form-back-title":"Layers",type:"lineType","possible-aes-source-inputs":["secondaryGrouping"],selected:o.value,onAesUpdate:g[1]||(g[1]=(b,C)=>f(b,C,"lineType"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot fill","form-title":"Dot Fill Settings","form-back-title":"Layers",type:"fill",selected:i.value,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:g[2]||(g[2]=(b,C)=>s(b,C,"dotFill"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot shape","form-title":"Dot Shape Settings","form-back-title":"Layers",type:"dotShape",selected:n.value.dotShape,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:g[3]||(g[3]=(b,C)=>c(b,C,"dotShape"))},null,8,["selected"]),d.createElementVNode("div",{class:"input-item",onClick:g[5]||(g[5]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{label:"Point value",options:A,modelValue:n.value.pointsValues,"onUpdate:modelValue":g[4]||(g[4]=b=>n.value.pointsValues=b)},null,8,["modelValue"])]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:h.value,"onUpdate:modelValue":g[6]||(g[6]=b=>h.value=b)},null,8,["modelValue"])],64))}}),F7="errorbar",fge=d.defineComponent({__name:"Errorbar",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[F7]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.lineColor,r.value,yo,!0)),i=d.computed(()=>df(n.value.dotFill,r.value,yo,!0));function o(h,m,g){m.type==="dataCategorical"?t.value.reactive.layersSettings[F7][g]={type:m.inputName}:t.value.reactive.layersSettings[F7][g]=h,m.type==="dataCategorical"&&typeof h!="string"&&(t.value.reactive.dataBindAes[m.selectedSource]=h)}function s(h,m,g){m.type==="dataCategorical"?t.value.reactive.layersSettings[F7][g]={type:m.inputName}:t.value.reactive.layersSettings[F7][g]=h,m.type==="dataCategorical"&&typeof h=="object"&&(t.value.reactive.dataBindAes[m.selectedSource]=h)}const c=[{text:"Standard deviation",value:"sd"},{text:"Standard error",value:"se"},{text:"Confident interval",value:"ci"}],f=[{text:"Mean",value:"mean"},{text:"Median",value:"median"}],A=d.computed({get:()=>n.value.opacity*100,set:h=>{n.value.opacity=h/100}});return(h,m)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:a.value,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:m[0]||(m[0]=(g,b)=>o(g,b,"lineColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot fill","form-title":"Dot Fill Settings","form-back-title":"Layers",type:"fill",selected:i.value,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:m[1]||(m[1]=(g,b)=>o(g,b,"dotFill"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot shape","form-title":"Dot Shape Settings","form-back-title":"Layers",type:"dotShape",selected:n.value.dotShape,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:m[2]||(m[2]=(g,b)=>s(g,b,"dotShape"))},null,8,["selected"]),d.createElementVNode("div",{class:"input-item",onClick:m[4]||(m[4]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{label:"Point value",options:f,modelValue:n.value.pointsValues,"onUpdate:modelValue":m[3]||(m[3]=g=>n.value.pointsValues=g)},null,8,["modelValue"])]),d.createElementVNode("div",{class:"input-item",onClick:m[6]||(m[6]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{label:"Interval",options:c,modelValue:n.value.interval,"onUpdate:modelValue":m[5]||(m[5]=g=>n.value.interval=g)},null,8,["modelValue"])]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:A.value,"onUpdate:modelValue":m[7]||(m[7]=g=>A.value=g)},null,8,["modelValue"])],64))}}),V7="sina",dge=d.defineComponent({__name:"Sina",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[V7]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.dotFill,r.value,yo));function i(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[V7][A]={type:f.inputName}:t.value.reactive.layersSettings[V7][A]=c,f.type==="dataCategorical"&&typeof c!="string"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}function o(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[V7][A]={type:f.inputName}:t.value.reactive.layersSettings[V7][A]=c,f.type==="dataCategorical"&&typeof c=="object"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}const s=d.computed({get:()=>n.value.opacity*100,set:c=>{n.value.opacity=c/100}});return(c,f)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:f[0]||(f[0]=(A,h)=>i(A,h,"dotFill"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot shape","form-title":"Dot Shape Settings","form-back-title":"Layers",type:"dotShape",selected:n.value.dotShape,onAesUpdate:f[1]||(f[1]=(A,h)=>o(A,h,"dotShape"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=A=>s.value=A)},null,8,["modelValue"])],64))}}),Age={class:"checkbox-item"},pge="logo",hge=d.defineComponent({__name:"Logo",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[pge]),r=d.computed({get:()=>n.value.opacity*100,set:a=>{n.value.opacity=a/100}});return(a,i)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=o=>r.value=o)},null,8,["modelValue"]),d.createElementVNode("div",Age,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.normalize,"onUpdate:modelValue":i[1]||(i[1]=o=>n.value.normalize=o)},null,8,["modelValue"]),i[2]||(i[2]=d.createElementVNode("span",null,"Normalize",-1))])],64))}}),mge={class:"button-group-item"},vge={class:"button-group-item"},gge={class:"button-group-item",style:{display:"flex",alignItems:"end"}},yge=d.defineComponent({__name:"Heatmap",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings.heatmap),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>t.value.inputGuide.value),i=d.computed(()=>{var C;return(C=r.value.components.value.selectorStates[0])==null?void 0:C.selectedSource}),o=d.computed(()=>{var C;return i.value?(C=t.value.reactive.dataBindAes[i.value])==null?void 0:C.palette:void 0}),s=d.ref(!1),c=d.ref(o.value??Z1);function f(C){c.value=C,s.value=!1,i.value&&(t.value.reactive.dataBindAes[i.value]=Vv(C))}const A=[{label:"None",value:null},{label:"Columns",value:"column"},{label:"Rows",value:"row"}],h=[{label:"z-score",value:"standardScaling"},{label:"Min-max",value:"meanNormalization"}],m=[{label:"empty",value:null},{label:"Special value",value:"custom"}],g=d.ref(n.value.NAValueAs===null?null:"custom"),b=d.ref(n.value.NAValueAs??0);return(C,x)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(o3,{label:"Color Palette ",title:d.unref(Do)[c.value].title,palette:c.value,onButtonClick:x[0]||(x[0]=k=>{s.value=!0})},null,8,["title","palette"]),s.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Color Palette","back-title":"Color mapping","onForm:close":x[1]||(x[1]=k=>s.value=!1)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:c.value,categorical:i.value?a.value.getSourceInfo(i.value).type==="String":!1,onSelect:f},null,8,["selected","categorical"])]),_:1})):d.createCommentVNode("",!0),d.createElementVNode("div",mge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalize by",options:A,compact:!0,modelValue:n.value.normalizationDirection,"onUpdate:modelValue":x[2]||(x[2]=k=>n.value.normalizationDirection=k)},null,8,["modelValue"])]),d.createElementVNode("div",vge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalization method",options:h,compact:!0,modelValue:n.value.normalizationMethod,"onUpdate:modelValue":x[3]||(x[3]=k=>n.value.normalizationMethod=k)},null,8,["modelValue"])]),d.createElementVNode("div",gge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Treat NA value as:",options:m,compact:!0,modelValue:g.value,"onUpdate:modelValue":[x[4]||(x[4]=k=>g.value=k),x[5]||(x[5]=k=>{k==="custom"?n.value.NAValueAs=b.value:n.value.NAValueAs=k})]},null,8,["modelValue"]),d.createVNode(d.unref(pt.PlNumberField),{style:{height:"33px",marginLeft:"16px",width:"75px"},disabled:g.value!=="custom",label:"NA value",useIncrementButtons:!1,modelValue:b.value,"onUpdate:modelValue":[x[6]||(x[6]=k=>b.value=k),x[7]||(x[7]=k=>{k!==void 0&&(n.value.NAValueAs=k)})]},null,8,["disabled","modelValue"])])],64))}}),wge={class:"checkbox-item"},Cge={class:"checkbox-item"},O7="dendro",bge=d.defineComponent({__name:"Dendro",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[O7]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>n.value.dotFill),i=d.computed(()=>n.value.dotShape),o=d.computed(()=>n.value.lineColor);function s(g,b,C){typeof g=="string"?t.value.reactive.layersSettings[O7][C]=g:b.type==="dataCategorical"&&(t.value.reactive.layersSettings[O7][C]={type:b.inputName,value:b.selectedSource}),b.type==="dataCategorical"&&typeof g!="string"&&(t.value.reactive.dataBindAes[b.selectedSource]=g)}function c(g,b,C){typeof g=="string"?t.value.reactive.layersSettings[O7][C]=g:b.type==="dataCategorical"&&(t.value.reactive.layersSettings[O7][C]={type:b.inputName,value:b.selectedSource}),b.type==="dataCategorical"&&typeof g!="string"&&(t.value.reactive.dataBindAes[b.selectedSource]=g)}const f=d.ref(n.value.leavesMode==="alignLeavesToLine"),A=d.computed({get(){return n.value.showLegend??!0},set(g){n.value.showLegend=g}}),h=d.computed({get(){return TS(n.value.dotSize)?[n.value.dotSize.min,n.value.dotSize.max]:[3,10]},set([g,b]){n.value.dotSize={min:g,max:b}}}),m=d.computed({get(){return TS(n.value.dotSize)?3:n.value.dotSize},set(g){n.value.dotSize=g}});return(g,b)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Node color","form-title":"Node Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,"possible-aes-source-inputs":["nodeColor"],"without-fixed":r.value.components.nodeColor.selectorStates.length>0,onAesUpdate:b[0]||(b[0]=(C,x)=>s(C,x,"dotFill"))},null,8,["selected","without-fixed"]),d.createVNode(Hi,{label:"Node shape","form-title":"Node Shape Settings","form-back-title":"Layers",type:"dotShape",selected:i.value,"possible-aes-source-inputs":["nodeShape"],"without-fixed":r.value.components.nodeShape.selectorStates.length>0,onAesUpdate:b[1]||(b[1]=(C,x)=>c(C,x,"dotShape"))},null,8,["selected","without-fixed"]),d.createVNode(Hi,{label:"Line color","form-title":"Line Color Settings","form-back-title":"Layers",type:"fill",selected:o.value,"possible-aes-source-inputs":["lineColor"],"without-fixed":r.value.components.lineColor.selectorStates.length>0,onAesUpdate:b[2]||(b[2]=(C,x)=>s(C,x,"lineColor"))},null,8,["selected","without-fixed"]),d.createElementVNode("div",null,[r.value.components.nodeSize.selectorStates.length>0?(d.openBlock(),d.createBlock(d.unref(pt.SliderRange),{key:0,min:3,max:10,breakpoints:!0,label:"Node size range",modelValue:h.value,"onUpdate:modelValue":b[3]||(b[3]=C=>h.value=C)},null,8,["modelValue"])):(d.openBlock(),d.createBlock(d.unref(pt.Slider),{key:1,min:3,max:10,step:1,breakpoints:!0,label:"Node size",modelValue:m.value,"onUpdate:modelValue":b[4]||(b[4]=C=>m.value=C)},null,8,["modelValue"]))]),d.createElementVNode("div",wge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:f.value,"onUpdate:modelValue":[b[5]||(b[5]=C=>f.value=C),b[6]||(b[6]=C=>{n.value.leavesMode=C?"alignLeavesToLine":"normal"})]},null,8,["modelValue"]),b[8]||(b[8]=d.createElementVNode("span",null,"Move leaves to the right",-1))]),d.createElementVNode("div",Cge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:A.value,"onUpdate:modelValue":b[7]||(b[7]=C=>A.value=C)},null,8,["modelValue"]),b[9]||(b[9]=d.createElementVNode("span",null,"Show legend",-1))])],64))}}),Ege={class:"dot-size-selector"},xge={class:"dot-size-selector__row"},Sge={class:"dot-size-selector-row"},Bge=d.defineComponent({__name:"DotSizeSelector",props:{selected:{},possibleAesSourceInputs:{}},emits:["aes-update","aes-selector-close"],setup(e,{emit:t}){const n=e,r=da(),a=d.computed(()=>r.value.reactive.chartType),i=t,o={discrete:["primaryGrouping","secondaryGrouping"],scatterplot:["size"],"scatterplot-umap":["size"],dendro:[],heatmap:[],histogram:[],bubble:[]},s=n.possibleAesSourceInputs??o[a.value],c=d.ref(Qv(n.selected)?n.selected.column:"fix"),f=d.computed(()=>r.value.inputGuide.value);function A(b){const C=f.value.getSourceInfo(b);return a.value==="scatterplot"||a.value==="dendro"?`Grouping: ${C==null?void 0:C.label}`:C?(C==null?void 0:C.label)??"":"Not consistent (grouping)"}const h=d.computed(()=>{const b=[],C=r.value.reactive.optionsState.components;return s.forEach(x=>{var k;(k=C==null?void 0:C[x])!=null&&k.selectorStates.length&&C[x].selectorStates.forEach(({selectedSource:_})=>{f.value.getSourceInfo(_).type!=="String"&&b.push({text:A(_),value:_})})}),b.length?b:[{text:"Fixed",value:"fix"}]}),m=d.ref(Qv(n.selected)?Lp:n.selected??Lp),g=d.ref(Qv(n.selected)?[n.selected.range.min,n.selected.range.max]:[zy.min,zy.max]);return d.watch(()=>c.value,b=>{if(b==="fix")i("aes-update",m.value);else{const C={column:b,range:{min:g.value[0],max:g.value[1]}};i("aes-update",C)}}),d.watch(()=>m.value,b=>{c.value==="fix"&&i("aes-update",b)}),d.watch(()=>g.value,b=>{if(c.value!=="fix"){const C={column:c.value,range:{min:b[0],max:b[1]}};i("aes-update",C)}}),(b,C)=>(d.openBlock(),d.createElementBlock("div",Ege,[d.createElementVNode("div",xge,[d.createElementVNode("div",{class:"aes-input-select",onClick:C[1]||(C[1]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{disabled:h.value.length<2&&h.value[0].value===c.value,label:"Dot size source",options:h.value,modelValue:c.value,"onUpdate:modelValue":C[0]||(C[0]=x=>c.value=x)},null,8,["disabled","options","modelValue"])])]),d.createElementVNode("div",Sge,[c.value!=="fix"?(d.openBlock(),d.createBlock(d.unref(pt.SliderRange),{key:0,min:3,max:10,breakpoints:!0,label:"Dot size range",modelValue:g.value,"onUpdate:modelValue":C[2]||(C[2]=x=>g.value=x)},null,8,["modelValue"])):(d.openBlock(),d.createBlock(d.unref(pt.Slider),{key:1,min:3,max:10,step:1,breakpoints:!0,label:"Dot size",modelValue:m.value,"onUpdate:modelValue":C[3]||(C[3]=x=>m.value=x)},null,8,["modelValue"]))])]))}}),c3="dots",kge=d.defineComponent({__name:"Scatter",setup(e){const t=da(),n=t.value.reactive.optionsState,r=d.computed(()=>t.value.inputGuide.value),a=d.computed(()=>t.value.reactive.layersSettings[c3]);function i(g){return g!==null&&typeof g=="object"&&"type"in g}const o=d.computed(()=>{const g=a.value.dotFill,b=n.components.grouping.selectorStates.map(C=>C.selectedSource);return i(g)&&b.length?b.includes(g.value)?g:{type:"grouping",value:b[0]}:b.length?{type:"grouping",value:b[0]}:i(g)?yo:g??yo}),s=d.computed(()=>{const g=a.value.dotShape,b=n.components.shape.selectorStates.map(C=>C.selectedSource);return i(g)&&b.length?g.value===b[0]?g:{type:"shape",value:b[0]}:b.length?{type:"shape",value:b[0]}:i(g)?P0:g??P0}),c=d.computed(()=>{const g=a.value.dotSize,b=n.components.size.selectorStates.map(C=>C.selectedSource);return b.length?Qv(g)?g:{column:b[0],range:zy}:Qv(g)?Lp:g??Lp});function f(g,b,C){typeof g=="string"?t.value.reactive.layersSettings[c3][C]=g:(b.type==="dataCategorical"||b.type==="dataContinuous")&&(t.value.reactive.layersSettings[c3][C]={type:"grouping",value:b.selectedSource}),mR(g)&&b.type!=="fix"&&(t.value.reactive.dataBindAes[b.selectedSource]=g)}function A(g,b,C){typeof g=="string"?t.value.reactive.layersSettings[c3][C]=g:b.type==="dataCategorical"&&(t.value.reactive.layersSettings[c3][C]={type:"grouping",value:b.selectedSource}),b.type==="dataCategorical"&&typeof g!="string"&&(t.value.reactive.dataBindAes[b.selectedSource]=g)}function h(g){t.value.reactive.layersSettings[c3].dotSize=g}const m=d.computed(()=>{if(n.components.grouping.selectorStates.length){const g=n.components.grouping.selectorStates[0].selectedSource,b=r.value.getSourceInfo(g).annotations;if(b!=null&&b[jy])return!0}return!1});return(g,b)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Dot color","form-title":"Dot color Settings","form-back-title":"Layers",type:"fill",selected:o.value,"possible-aes-source-inputs":["grouping"],disabled:m.value,withoutFixed:typeof o.value=="object",onAesUpdate:b[0]||(b[0]=(C,x)=>f(C,x,"dotFill"))},null,8,["selected","disabled","withoutFixed"]),d.createVNode(Hi,{label:"Dot shape","form-title":"Dot shape Settings","form-back-title":"Layers",type:"dotShape","possible-aes-source-inputs":["shape"],selected:s.value,withoutFixed:typeof s.value=="object",onAesUpdate:b[1]||(b[1]=(C,x)=>A(C,x,"dotShape"))},null,8,["selected","withoutFixed"]),d.createVNode(Bge,{selected:c.value,onAesUpdate:h},null,8,["selected"])],64))}}),CB="dots",Tge=d.defineComponent({__name:"Scatter",setup(e){const t=da(),n=t.value.reactive.optionsState,r=d.computed(()=>t.value.inputGuide.value),a=d.computed(()=>t.value.reactive.layersSettings[CB]);function i(f){return f!==null&&typeof f=="object"&&"type"in f}const o=d.computed(()=>{const f=a.value.dotFill,A=n.components.grouping.selectorStates.map(h=>h.selectedSource);return i(f)&&A.length?A.includes(f.value)?f:{type:"grouping",value:A[0]}:A.length?{type:"grouping",value:A[0]}:i(f)?yo:f??yo});function s(f,A,h){typeof f=="string"?t.value.reactive.layersSettings[CB][h]=f:(A.type==="dataCategorical"||A.type==="dataContinuous")&&(t.value.reactive.layersSettings[CB][h]={type:"grouping",value:A.selectedSource}),mR(f)&&A.type!=="fix"&&(t.value.reactive.dataBindAes[A.selectedSource]=f)}const c=d.computed(()=>{if(n.components.grouping.selectorStates.length){const f=n.components.grouping.selectorStates[0].selectedSource,A=r.value.getSourceInfo(f).annotations;if(A!=null&&A[jy])return!0}return!1});return(f,A)=>(d.openBlock(),d.createBlock(Hi,{label:"Dot color","form-title":"Dot color Settings1","form-back-title":"Layers",type:"fill",selected:o.value,"possible-aes-source-inputs":["grouping"],disabled:c.value,withoutFixed:typeof o.value=="object",onAesUpdate:A[0]||(A[0]=(h,m)=>s(h,m,"dotFill"))},null,8,["selected","disabled","withoutFixed"]))}}),_ge={class:"input-item",style:{display:"flex","justify-content":"space-between","align-items":"center"}},bB="curve",y$=d.defineComponent({__name:"Curve",setup(e){const t=da(),n=t.value.reactive.optionsState,r=d.computed(()=>t.value.reactive.layersSettings[bB]);function a(s){return s!==null&&typeof s=="object"&&"type"in s}const i=d.computed(()=>{const s=r.value.lineColor,c=n.components.grouping.selectorStates.map(f=>f.selectedSource);return a(s)&&c.length?c.includes(s.value)?s:{type:"grouping",value:c[0]}:c.length?{type:"grouping",value:c[0]}:a(s)?yo:s??yo});function o(s,c,f){typeof s=="string"?t.value.reactive.layersSettings[bB][f]=s:c.type==="dataCategorical"&&(t.value.reactive.layersSettings[bB][f]={type:c.inputName,value:c.selectedSource}),c.type==="dataCategorical"&&typeof s!="string"&&(t.value.reactive.dataBindAes[c.selectedSource]=s)}return(s,c)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Color","form-title":"Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,withoutFixed:typeof i.value=="object","possible-aes-source-inputs":["grouping"],onAesUpdate:c[0]||(c[0]=(f,A)=>o(f,A,"lineColor"))},null,8,["selected","withoutFixed"]),d.createElementVNode("div",_ge,[c[2]||(c[2]=d.createElementVNode("span",null,"Smoothing",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(t).reactive.layersSettings.curve.smoothing,"onUpdate:modelValue":c[1]||(c[1]=f=>d.unref(t).reactive.layersSettings.curve.smoothing=f)},null,8,["modelValue"])])],64))}}),Pge={class:"checkbox-item"},Mge={key:1,class:"checkbox-item"},Dge={class:"checkbox-item"},Hge={key:2,class:"checkbox-item"},Ige={class:"button-group-item"},Lge={class:"button-group-item"},Rge={class:"button-group-item",style:{display:"flex",alignItems:"end"}},Nge=d.defineComponent({__name:"HeatmapClustered",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings.heatmapClustered),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>t.value.inputGuide.value),i=d.computed(()=>{var C;return(C=r.value.components.value.selectorStates[0])==null?void 0:C.selectedSource}),o=d.computed(()=>{var C;return i.value?(C=t.value.reactive.dataBindAes[i.value])==null?void 0:C.palette:void 0}),s=d.ref(!1),c=d.ref(o.value??Z1);function f(C){c.value=C,s.value=!1,i.value&&(t.value.reactive.dataBindAes[i.value]=Vv(C))}const A=[{label:"None",value:null},{label:"Columns",value:"column"},{label:"Rows",value:"row"}],h=[{label:"z-score",value:"standardScaling"},{label:"Min-max",value:"meanNormalization"}],m=[{label:"empty",value:null},{label:"Special value",value:"custom"}],g=d.ref(n.value.NAValueAs!==null?"custom":n.value.NAValueAs),b=d.ref(n.value.NAValueAs??0);return(C,x)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(o3,{label:"Color Palette ",title:d.unref(Do)[c.value].title,palette:c.value,onButtonClick:x[0]||(x[0]=k=>{s.value=!0})},null,8,["title","palette"]),s.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Color Palette","back-title":"Color mapping","onForm:close":x[1]||(x[1]=k=>s.value=!1)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:c.value,categorical:i.value?a.value.getSourceInfo(i.value).type==="String":!1,onSelect:f},null,8,["selected","categorical"])]),_:1})):d.createCommentVNode("",!0),d.createElementVNode("div",Pge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.disableClusteringX,"onUpdate:modelValue":x[2]||(x[2]=k=>n.value.disableClusteringX=k)},null,8,["modelValue"]),x[12]||(x[12]=d.createElementVNode("span",null,"Disable clustering for X axis",-1))]),n.value.disableClusteringX?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Mge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.dendrogramX,"onUpdate:modelValue":x[3]||(x[3]=k=>n.value.dendrogramX=k)},null,8,["modelValue"]),x[13]||(x[13]=d.createElementVNode("span",null,"Show dendrogram for X axis",-1))])),d.createElementVNode("div",Dge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.disableClusteringY,"onUpdate:modelValue":x[4]||(x[4]=k=>n.value.disableClusteringY=k)},null,8,["modelValue"]),x[14]||(x[14]=d.createElementVNode("span",null,"Disable clustering for Y axis",-1))]),n.value.disableClusteringY?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Hge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.dendrogramY,"onUpdate:modelValue":x[5]||(x[5]=k=>n.value.dendrogramY=k)},null,8,["modelValue"]),x[15]||(x[15]=d.createElementVNode("span",null,"Show dendrogram for Y axis",-1))])),d.createElementVNode("div",Ige,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalize by",options:A,compact:!0,modelValue:n.value.normalizationDirection,"onUpdate:modelValue":x[6]||(x[6]=k=>n.value.normalizationDirection=k)},null,8,["modelValue"])]),d.createElementVNode("div",Lge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalization method",options:h,compact:!0,modelValue:n.value.normalizationMethod,"onUpdate:modelValue":x[7]||(x[7]=k=>n.value.normalizationMethod=k)},null,8,["modelValue"])]),d.createElementVNode("div",Rge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Treat NA value as:",options:m,compact:!0,modelValue:g.value,"onUpdate:modelValue":[x[8]||(x[8]=k=>g.value=k),x[9]||(x[9]=k=>{k==="custom"?n.value.NAValueAs=b.value:n.value.NAValueAs=k})]},null,8,["modelValue"]),d.createVNode(d.unref(pt.PlNumberField),{style:{height:"33px",marginLeft:"16px",width:"75px"},disabled:g.value!=="custom",label:"NA value",useIncrementButtons:!1,modelValue:b.value,"onUpdate:modelValue":[x[10]||(x[10]=k=>b.value=k),x[11]||(x[11]=k=>{k!==void 0&&(n.value.NAValueAs=k)})]},null,8,["disabled","modelValue"])])],64))}}),$ge={class:"section-title"},Fge=d.defineComponent({__name:"HeatmapAnnotations",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.optionsState),r=d.computed(()=>t.value.inputGuide.value),a=d.computed(()=>{const A=n.value.components.annotationsX.selectorStates.map(m=>m.selectedSource),h=n.value.components.annotationsY.selectorStates.map(m=>m.selectedSource);return[...A,...h]}),i=d.computed(()=>a.value.reduce((A,h)=>(A[h]=r.value.getSourceInfo(h),A),{})),o=d.reactive(a.value.reduce((A,h)=>{var b,C;const g=((b=i.value[h])==null?void 0:b.type)==="String"?lL:Z1;return A[h]=((C=t.value.reactive.dataBindAes[h])==null?void 0:C.palette)??g,A},{})),s=d.ref(null),c=d.ref(null);function f(A){const h=c.value;h&&(o[h]=A,t.value.reactive.dataBindAes[h]=Vv(A)),s.value=h}return(A,h)=>(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a.value,m=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",$ge,[d.createElementVNode("span",null,d.toDisplayString(i.value[m].label),1)]),d.createVNode(o3,{label:"Color Palette ",title:d.unref(Do)[o[m]].title,palette:o[m],style:{marginBottom:"24px"},onButtonClick:g=>{s.value=m,c.value=m}},null,8,["title","palette","onButtonClick"]),s.value===m?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Color Palette","back-title":"Color mapping","onForm:close":h[0]||(h[0]=g=>s.value=null)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:o[m],categorical:i.value[m].type==="String",onSelect:f},null,8,["selected","categorical"])]),_:2},1024)):d.createCommentVNode("",!0)],64))),256))}}),Vge={},Oge={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function Qge(e,t){return d.openBlock(),d.createElementBlock("svg",Oge,t[0]||(t[0]=[d.createStaticVNode('<path fill-rule="evenodd" clip-rule="evenodd" d="M9.25 13.5C9.25 14.1904 9.80964 14.75 10.5 14.75L13.5 14.75C14.1904 14.75 14.75 14.1904 14.75 13.5V10.5C14.75 9.80964 14.1904 9.25 13.5 9.25H10.5C9.80964 9.25 9.25 9.80964 9.25 10.5V13.5ZM10.75 13.25V10.75H13.25V13.25H10.75Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M9.25 20.5C9.25 21.1904 9.80964 21.75 10.5 21.75H13.5C14.1904 21.75 14.75 21.1904 14.75 20.5V17.5C14.75 16.8096 14.1904 16.25 13.5 16.25H10.5C9.80964 16.25 9.25 16.8096 9.25 17.5L9.25 20.5ZM10.75 20.25V17.75H13.25V20.25H10.75Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 13.5C2.25 14.1904 2.80964 14.75 3.5 14.75H6.5C7.19036 14.75 7.75 14.1904 7.75 13.5L7.75 10.5C7.75 9.80964 7.19036 9.25 6.5 9.25H3.5C2.80964 9.25 2.25 9.80964 2.25 10.5L2.25 13.5ZM3.75 13.25L3.75 10.75H6.25V13.25H3.75Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 20.5C2.25 21.1904 2.80964 21.75 3.5 21.75H6.5C7.19036 21.75 7.75 21.1904 7.75 20.5L7.75 17.5C7.75 16.8096 7.19036 16.25 6.5 16.25H3.5C2.80964 16.25 2.25 16.8096 2.25 17.5L2.25 20.5ZM3.75 20.25L3.75 17.75H6.25V20.25H3.75Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M16.25 20.5C16.25 21.1904 16.8096 21.75 17.5 21.75H20.5C21.1904 21.75 21.75 21.1904 21.75 20.5L21.75 10.5C21.75 9.80964 21.1904 9.25 20.5 9.25H17.5C16.8096 9.25 16.25 9.80964 16.25 10.5L16.25 20.5ZM17.75 20.25L17.75 10.75L20.25 10.75L20.25 20.25H17.75Z" fill="#07AD3E"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 6.5C2.25 7.19036 2.80964 7.75 3.5 7.75L13.5 7.75C14.1904 7.75 14.75 7.19036 14.75 6.5V3.5C14.75 2.80964 14.1904 2.25 13.5 2.25L3.5 2.25C2.80964 2.25 2.25 2.80964 2.25 3.5L2.25 6.5ZM3.75 6.25L3.75 3.75L13.25 3.75V6.25L3.75 6.25Z" fill="#07AD3E"></path>',6)]))}const zge=Wr(Vge,[["render",Qge]]),EB="bins",Uge=d.defineComponent({__name:"Bins",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[EB]),r=d.computed(()=>n.value.fillColor??Py);function a(o,s,c){s.type==="dataCategorical"?t.value.reactive.layersSettings[EB][c]={type:s.inputName}:t.value.reactive.layersSettings[EB][c]=o,s.type==="dataCategorical"&&typeof o!="string"&&(t.value.reactive.dataBindAes[s.selectedSource]=o)}const i=d.computed({get:()=>n.value.opacity*100,set:o=>{n.value.opacity=o/100}});return(o,s)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:r.value,onAesUpdate:s[0]||(s[0]=(c,f)=>a(c,f,"fillColor"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=c=>i.value=c)},null,8,["modelValue"])],64))}}),jge={class:"input-item"},Gge={class:"button-group-item"},Yge={class:"button-group-item"},Wge={class:"button-group-item",style:{display:"flex",alignItems:"end"}},Xge=d.defineComponent({__name:"Bubble",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings.bubble),r=d.computed(()=>t.value.reactive.optionsState);d.computed(()=>t.value.inputGuide.value);const a=d.computed(()=>{var C;return(C=r.value.components.valueColor.selectorStates[0])==null?void 0:C.selectedSource}),i=d.computed(()=>{var C;return a.value?(C=t.value.reactive.dataBindAes[a.value])==null?void 0:C.palette:void 0}),o=d.ref(!1),s=d.ref(i.value??Z1);function c(C){s.value=C,o.value=!1,a.value&&(t.value.reactive.dataBindAes[a.value]=Vv(C))}const f=[{label:"None",value:null},{label:"Columns",value:"column"},{label:"Rows",value:"row"}],A=[{label:"z-score",value:"standardScaling"},{label:"Min-max",value:"meanNormalization"}],h=d.computed({get:()=>n.value.strokeColor??yo,set:C=>{n.value.strokeColor=C}}),m=[{label:"empty",value:null},{label:"Special value",value:"custom"}],g=d.ref(n.value.NAValueAs!==null?"custom":n.value.NAValueAs),b=d.ref(n.value.NAValueAs??0);return(C,x)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(o3,{label:"Color Palette ",title:d.unref(Do)[s.value].title,palette:s.value,onButtonClick:x[0]||(x[0]=k=>{o.value=!0})},null,8,["title","palette"]),o.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Color Palette","back-title":"Color mapping","onForm:close":x[1]||(x[1]=k=>o.value=!1)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:s.value,categorical:!1,onSelect:c},null,8,["selected"])]),_:1})):d.createCommentVNode("",!0),d.createElementVNode("div",jge,[d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke","possible-aes-source-inputs":[],selected:h.value,onAesUpdate:x[2]||(x[2]=k=>h.value=k)},null,8,["selected"])]),d.createElementVNode("div",Gge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalize by",options:f,compact:!0,modelValue:n.value.normalizationDirection,"onUpdate:modelValue":x[3]||(x[3]=k=>n.value.normalizationDirection=k)},null,8,["modelValue"])]),d.createElementVNode("div",Yge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalization method",options:A,compact:!0,modelValue:n.value.normalizationMethod,"onUpdate:modelValue":x[4]||(x[4]=k=>n.value.normalizationMethod=k)},null,8,["modelValue"])]),d.createElementVNode("div",Wge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Treat NA value as:",options:m,compact:!0,modelValue:g.value,"onUpdate:modelValue":[x[5]||(x[5]=k=>g.value=k),x[6]||(x[6]=k=>{k==="custom"?n.value.NAValueAs=b.value:n.value.NAValueAs=k})]},null,8,["modelValue"]),d.createVNode(d.unref(pt.PlNumberField),{style:{height:"33px",marginLeft:"16px",width:"75px"},disabled:g.value!=="custom",label:"NA value",useIncrementButtons:!1,modelValue:b.value,"onUpdate:modelValue":[x[7]||(x[7]=k=>b.value=k),x[8]||(x[8]=k=>{k!==void 0&&(n.value.NAValueAs=k)})]},null,8,["disabled","modelValue"])])],64))}}),Kge={class:"layers-form",id:"layers-form"},Zge={class:"layers-list"},Jge=d.defineComponent({__name:"index",setup(e){const t=da(),n={box:Jve,binnedDots:ege,jitteredDots:nge,violin:oge,bar:lge,stackedBar:uge,line:cge,errorbar:fge,sina:dge,logo:hge},r={dots:kge,curve:y$},a={dots:Tge,curve:y$},i={heatmap:yge,heatmapClustered:Nge};return(o,s)=>(d.openBlock(),d.createElementBlock("div",Kge,[s[0]||(s[0]=d.createElementVNode("div",{class:"layers-title"},[d.createElementVNode("h3",null," Layers ")],-1)),d.createElementVNode("div",Zge,[d.unref(t).reactive.chartType==="discrete"?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(d.unref(Gy)[d.unref(t).reactive.template],c=>(d.openBlock(),d.createBlock(ts,{icon:d.unref(Vf)[c],title:d.unref(H0)[c],settings:{defaultState:d.unref(Gy)[d.unref(t).reactive.template].length>1?"close":"open"}},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n[c])))]),_:2},1032,["icon","title","settings"]))),256)):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot"?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:1},d.renderList(d.unref(Ov)[d.unref(t).reactive.template],c=>(d.openBlock(),d.createBlock(ts,{icon:d.unref(Vf)[c],title:d.unref(H0)[c],settings:{defaultState:d.unref(Ov)[d.unref(t).reactive.template].length>1?"close":"open"}},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(r[c])))]),_:2},1032,["icon","title","settings"]))),256)):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot-umap"?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:2},d.renderList(d.unref(bR)[d.unref(t).reactive.template],c=>(d.openBlock(),d.createBlock(ts,{icon:d.unref(Vf)[c],title:d.unref(H0)[c],settings:{defaultState:d.unref(Ov)[d.unref(t).reactive.template].length>1?"close":"open"}},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(a[c])))]),_:2},1032,["icon","title","settings"]))),256)):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="heatmap"?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:3},d.renderList(d.unref(cle)[d.unref(t).reactive.template],c=>(d.openBlock(),d.createBlock(ts,{icon:d.unref(Vf)[c],title:d.unref(H0)[c],settings:{defaultState:"open"}},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(i[c])))]),_:2},1032,["icon","title"]))),256)):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="heatmap"?(d.openBlock(),d.createBlock(ts,{key:4,icon:zge,title:"Annotations",settings:{defaultState:"open"}},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(Fge)))]),_:1})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="dendro"?(d.openBlock(),d.createBlock(ts,{key:5,icon:d.unref(Vf).dendro,title:d.unref(H0).dendro,settings:{defaultState:"open"}},{default:d.withCtx(()=>[d.createVNode(bge)]),_:1},8,["icon","title"])):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="histogram"?(d.openBlock(),d.createBlock(ts,{key:6,icon:d.unref(Vf).bins,title:d.unref(H0).bins,settings:{defaultState:"open"}},{default:d.withCtx(()=>[d.createVNode(Uge)]),_:1},8,["icon","title"])):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="bubble"?(d.openBlock(),d.createBlock(ts,{key:7,icon:d.unref(Vf).bubble,title:d.unref(H0).bubble,settings:{defaultState:"open"}},{default:d.withCtx(()=>[d.createVNode(Xge)]),_:1},8,["icon","title"])):d.createCommentVNode("",!0)])]))}});function qge(e,{slots:t}){return d.h("div",Object.assign({},e,{class:"non-found-component"}),t.default&&t.default())}function eye(e,t){return d.computed(()=>{const n=d.unref(t);return n&&e[n]?e[n]:qge})}const tye={},nye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rye(e,t){return d.openBlock(),d.createElementBlock("svg",nye,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.5 7.5V4.5H19.5V7.5H14.5ZM13 4C13 3.44772 13.4477 3 14 3H20C20.5523 3 21 3.44772 21 4V8C21 8.55228 20.5523 9 20 9H14C13.4477 9 13 8.55228 13 8V4ZM4.5 19.5V16.5H9.5V19.5H4.5ZM3 16C3 15.4477 3.44772 15 4 15H10C10.5523 15 11 15.4477 11 16V20C11 20.5523 10.5523 21 10 21H4C3.44772 21 3 20.5523 3 20V16Z",fill:"#07AD3E"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.5 11.5V4.5H9.5V11.5H4.5ZM3 4C3 3.44772 3.44772 3 4 3H10C10.5523 3 11 3.44772 11 4V12C11 12.5523 10.5523 13 10 13H4C3.44772 13 3 12.5523 3 12V4ZM14.5 19.5V12.5H19.5V19.5H14.5ZM13 12C13 11.4477 13.4477 11 14 11H20C20.5523 11 21 11.4477 21 12V20C21 20.5523 20.5523 21 20 21H14C13.4477 21 13 20.5523 13 20V12Z",fill:"#110529"},null,-1)]))}const aye=Wr(tye,[["render",rye]]),iye={},oye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lye(e,t){return d.openBlock(),d.createElementBlock("svg",oye,t[0]||(t[0]=[d.createStaticVNode('<g clip-path="url(#clip0_8849_14901)"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.2214 15.2215L13.5701 12.8728C15.2298 11.2131 15.2298 8.5221 13.5701 6.86237C11.9104 5.20264 9.21943 5.20264 7.5597 6.86237L3.31706 11.105C1.65733 12.7647 1.65733 15.4557 3.31706 17.1154C4.38616 18.1845 5.88312 18.565 7.25674 18.2568L8.45258 19.4526C6.38303 20.2767 3.93151 19.8512 2.2564 18.1761C0.0108876 15.9306 0.0108879 12.2899 2.2564 10.0444L6.49904 5.80171C8.74456 3.5562 12.3853 3.5562 14.6308 5.80171C16.8763 8.04723 16.8763 11.6879 14.6308 13.9334L12.2821 16.2821L11.2214 15.2215Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M17.4594 18.1761C15.2139 20.4216 11.5732 20.4216 9.32769 18.1761C7.08218 15.9306 7.08218 12.2899 9.32769 10.0444L11.686 7.68604L12.7467 8.7467L10.3884 11.105C8.72862 12.7647 8.72862 15.4557 10.3884 17.1154C12.0481 18.7751 14.739 18.7751 16.3988 17.1154L20.6414 12.8728C22.3011 11.2131 22.3011 8.5221 20.6414 6.86237C19.5764 5.79737 18.0868 5.41575 16.7175 5.71752L15.5197 4.51971C17.5863 3.70299 20.0307 4.13032 21.7021 5.80171C23.9476 8.04723 23.9476 11.6879 21.7021 13.9334L17.4594 18.1761Z" fill="#07AD3E"></path></g><defs><clipPath id="clip0_8849_14901"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',2)]))}const sye=Wr(iye,[["render",lye]]),uye={},cye={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fye(e,t){return d.openBlock(),d.createElementBlock("svg",cye,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M23.25 17.75V14H24.75V17.75H26V19.25H24.75V23.25H28.75V22H30.25V23.25H34V24.75H30.25V26H28.75V24.75H24.75V28.75H26V30.25H24.75V34H23.25V30.25H22V28.75H23.25V24.75H19.25V26H17.75V24.75H14V23.25H17.75V22H19.25V23.25H23.25V19.25H22V17.75H23.25Z",fill:"#110529"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.4697 15.5303L17.7501 17.8107V20H19.2501V17.8107L21.5304 15.5303L20.4697 14.4697L18.5001 16.4393L16.5304 14.4697L15.4697 15.5303ZM27.4697 28.5303L29.4394 30.5L27.4697 32.4697L28.5304 33.5303L30.5001 31.5607L32.4697 33.5303L33.5304 32.4697L31.5607 30.5L33.5304 28.5303L32.4697 27.4697L30.5001 29.4393L28.5304 27.4697L27.4697 28.5303Z",fill:"#07AD3E"},null,-1)]))}const dye=Wr(uye,[["render",fye]]),Aye={},pye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function hye(e,t){return d.openBlock(),d.createElementBlock("svg",pye,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.5 12C20.5 10.3189 20.0015 8.67547 19.0675 7.27766C18.1335 5.87984 16.806 4.79037 15.2528 4.14703C13.6996 3.50368 11.9906 3.33536 10.3417 3.66333C8.6929 3.9913 7.17834 4.80085 5.9896 5.9896C4.80085 7.17834 3.9913 8.6929 3.66333 10.3417C3.33536 11.9906 3.50368 13.6996 4.14703 15.2528C4.79037 16.806 5.87984 18.1335 7.27766 19.0675C8.18407 19.6731 9.19374 20.0957 10.25 20.3179V12.75H7V11.25H10.25V8C10.25 6.48122 11.4812 5.25 13 5.25C14.5188 5.25 15.75 6.48122 15.75 8V8.5H14.25V8C14.25 7.30964 13.6904 6.75 13 6.75C12.3096 6.75 11.75 7.30964 11.75 8V11.25H15V12.75H11.75V20.4963V21.5V21.9969C9.85961 21.9496 8.01943 21.3672 6.4443 20.3147C4.79981 19.2159 3.51809 17.6541 2.76121 15.8268C2.00433 13.9996 1.8063 11.9889 2.19215 10.0491C2.578 8.10929 3.53041 6.32746 4.92894 4.92894C6.32746 3.53041 8.10929 2.578 10.0491 2.19215C11.9889 1.8063 13.9996 2.00433 15.8268 2.76121C17.6541 3.51809 19.2159 4.79981 20.3147 6.4443C21.4135 8.08879 22 10.0222 22 12H20.5Z",fill:"#110529"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.0607 18L21.5304 15.5303L20.4697 14.4697L18.0001 16.9393L15.5304 14.4697L14.4697 15.5303L16.9394 18L14.4697 20.4697L15.5304 21.5303L18.0001 19.0607L20.4697 21.5303L21.5304 20.4697L19.0607 18Z",fill:"#07AD3E"},null,-1)]))}const mye=Wr(Aye,[["render",hye]]),vye={},gye={class:"layers-icon",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yye(e,t){return d.openBlock(),d.createElementBlock("svg",gye,t[0]||(t[0]=[d.createElementVNode("g",{id:"24: layers"},[d.createElementVNode("path",{id:"Subtract","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.37549 15.1251L12.0003 21.25L21.6255 15.1249L21.6749 15.1563C22.2924 15.5493 22.2924 16.4507 21.6749 16.8436L12.5375 22.6583C12.21 22.8668 11.7913 22.8668 11.4638 22.6583L2.32641 16.8436C1.70891 16.4507 1.70891 15.5493 2.32641 15.1563L2.37549 15.1251Z",fill:"#07AD3E"}),d.createElementVNode("path",{id:"Union","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.32641 7.15633C1.70891 7.54929 1.70891 8.4507 2.32641 8.84366L11.4638 14.6583C11.7913 14.8668 12.21 14.8668 12.5375 14.6583L21.6749 8.84365C22.2924 8.4507 22.2924 7.54929 21.6749 7.15633L12.5375 1.34164C12.21 1.13319 11.7913 1.13319 11.4638 1.34164L2.32641 7.15633ZM3.75 7.99997L12 13.25L20.25 7.99997L12 2.74997L3.75 7.99997ZM12.0003 17.25L2.37549 11.1251L2.32641 11.1563C1.70891 11.5493 1.70891 12.4507 2.32641 12.8436L11.4638 18.6583C11.7913 18.8668 12.21 18.8668 12.5375 18.6583L21.6749 12.8436C22.2924 12.4507 22.2924 11.5493 21.6749 11.1563L21.6255 11.1249L12.0003 17.25Z",fill:"#110529"})],-1)]))}const wye=Wr(vye,[["render",yye]]),Cye=d.defineComponent({__name:"SettingsIcon",setup(e){return(t,n)=>(d.openBlock(),d.createBlock(d.unref(pt.PlIcon24),{name:"settings"}))}}),bye={},Eye={class:"export-icon",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xye(e,t){return d.openBlock(),d.createElementBlock("svg",Eye,t[0]||(t[0]=[d.createElementVNode("g",{id:"Icon"},[d.createElementVNode("path",{id:"Rectangle 4179",d:"M3 17V18C3 19.6569 4.34315 21 6 21H18C19.6569 21 21 19.6569 21 18V17",stroke:"#07AD3E","stroke-width":"1.5"}),d.createElementVNode("path",{id:"Vector 1335",d:"M18 10L12 16M12 16L6 10M12 16L12 2",stroke:"black","stroke-width":"1.5"})],-1)]))}const Sye=Wr(bye,[["render",xye]]),Bye={class:"input-item"},kye={class:"input-item"},Tye={class:"input-item"},_ye={class:"input-item"},Pye={class:"input-item",style:{"z-index":"0"}},Mye={class:"checkbox-item"},Dye={class:"input-item"},Hye={class:"input-item"},Iye={class:"input-item",style:{"z-index":"0"}},Lye={class:"checkbox-item"},Rye=d.defineComponent({__name:"DiscreteStatisticsForm",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.statisticsSettings),r=d.computed(()=>t.value.commonHelpersData.primaryGroups.value),a=d.computed(()=>RR(r.value)),i=d.computed(()=>NR(r.value)),o=(g,b)=>d.computed({get(){return g[b]??void 0},set(C){g[b]=C??null}}),s=o(n.value.overall.data,"testMethod"),c=o(n.value.referenceGroup.data,"testMethod"),f=o(n.value.referenceGroup.data,"referenceGroup"),A=o(n.value.referenceGroup.data,"correctionMethod"),h=o(n.value.pairwise.data,"testMethod"),m=o(n.value.pairwise.data,"correctionMethod");return PS(t)(),d.watch([()=>n.value.overall.data.testMethod,()=>n.value.referenceGroup.data.referenceGroup],PS(t)),(g,b)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[b[12]||(b[12]=d.createElementVNode("h3",null," Statistics ",-1)),b[13]||(b[13]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"overall p-value")],-1)),d.createElementVNode("div",Bye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Method",clearable:"",placeholder:"Choose",modelValue:d.unref(s),"onUpdate:modelValue":b[0]||(b[0]=C=>d.isRef(s)?s.value=C:null),options:i.value,error:n.value.overall.validity.testMethod?"":" "},null,8,["modelValue","options","error"])]),b[14]||(b[14]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"reference group")],-1)),d.createElementVNode("div",kye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Reference from...",clearable:"",placeholder:"Choose",modelValue:d.unref(f),"onUpdate:modelValue":b[1]||(b[1]=C=>d.isRef(f)?f.value=C:null),options:a.value,error:n.value.referenceGroup.validity.referenceGroup?"":" "},null,8,["modelValue","options","error"])]),d.createElementVNode("div",Tye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Method",clearable:"",placeholder:"Choose",modelValue:d.unref(c),"onUpdate:modelValue":b[2]||(b[2]=C=>d.isRef(c)?c.value=C:null),options:d.unref(HC)},null,8,["modelValue","options"])]),d.createElementVNode("div",_ye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Correction method",placeholder:"Choose",modelValue:d.unref(A),"onUpdate:modelValue":b[3]||(b[3]=C=>d.isRef(A)?A.value=C:null),options:d.unref(xR)},null,8,["modelValue","options"])]),d.createElementVNode("div",Pye,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Show",modelValue:n.value.referenceGroup.data.format,"onUpdate:modelValue":b[4]||(b[4]=C=>n.value.referenceGroup.data.format=C),options:d.unref(SR)},null,8,["modelValue","options"])]),d.createElementVNode("div",Mye,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.referenceGroup.data.ns,"onUpdate:modelValue":b[5]||(b[5]=C=>n.value.referenceGroup.data.ns=C)},null,8,["modelValue"]),b[10]||(b[10]=d.createElementVNode("span",null,"Non-significant",-1))]),b[15]||(b[15]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"pairwise p-value")],-1)),d.createElementVNode("div",Dye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Method",clearable:"",placeholder:"Choose",modelValue:d.unref(h),"onUpdate:modelValue":b[6]||(b[6]=C=>d.isRef(h)?h.value=C:null),options:d.unref(HC)},null,8,["modelValue","options"])]),d.createElementVNode("div",Hye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Correction method",placeholder:"Choose",modelValue:d.unref(m),"onUpdate:modelValue":b[7]||(b[7]=C=>d.isRef(m)?m.value=C:null),options:d.unref(xR)},null,8,["modelValue","options"])]),d.createElementVNode("div",Iye,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Show",modelValue:n.value.pairwise.data.format,"onUpdate:modelValue":b[8]||(b[8]=C=>n.value.pairwise.data.format=C),options:d.unref(SR)},null,8,["modelValue","options"])]),d.createElementVNode("div",Lye,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.pairwise.data.ns,"onUpdate:modelValue":b[9]||(b[9]=C=>n.value.pairwise.data.ns=C)},null,8,["modelValue"]),b[11]||(b[11]=d.createElementVNode("span",null,"Non-significant",-1))])],64))}}),Nye={class:"checkbox-item"},$ye=d.defineComponent({__name:"ScatterplotStatisticsForm",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.statisticsSettings);return(r,a)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[a[1]||(a[1]=d.createElementVNode("h3",null,"Statistics",-1)),a[2]||(a[2]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"trends")],-1)),d.createElementVNode("div",Nye,[d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:n.value.trend.on,"onUpdate:modelValue":a[0]||(a[0]=i=>n.value.trend.on=i),label:"Build trend",disabled:d.unref(t).reactive.template==="curve"},null,8,["modelValue","disabled"])])],64))}}),Fye=d.defineComponent({__name:"index",setup(e){const t=da();return(n,r)=>(d.openBlock(),d.createElementBlock("div",{class:"stat-form",onClick:r[0]||(r[0]=a=>a.stopPropagation())},[d.unref(t).reactive.chartType==="discrete"?(d.openBlock(),d.createBlock(Rye,{key:0})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot"?(d.openBlock(),d.createBlock($ye,{key:1})):d.createCommentVNode("",!0)]))}}),Vye={},Oye={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function Qye(e,t){return d.openBlock(),d.createElementBlock("svg",Oye,t[0]||(t[0]=[d.createStaticVNode('<path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 3.75002C7.5 3.05967 8.05964 2.50002 8.75 2.50002L15.25 2.5C15.9404 2.5 16.5 3.05964 16.5 3.75V5.50004L20.5 5.50006V7.00006L19 7.00006H17.5L6.5 7.00004H5L3.5 7V5.5L7.5 5.50006V3.75002ZM9 5.50006L15 5.50004V4L9 4.00002V5.50006Z" fill="#110529"></path><path d="M17.5 7.00006V12.5H19V7.00006H17.5Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 17.75C6.5 18.9926 7.50736 20 8.75 20H12V21.5H8.75C6.67893 21.5 5 19.8211 5 17.75V8.50006H6.5V17.75Z" fill="#110529"></path><path d="M6.5 7.00004H5V8.50006H6.5V7.00004Z" fill="#110529"></path><path d="M14.75 14.5L18.25 18M21.75 21.5L18.25 18M18.25 18L21.75 14.5M18.25 18L14.75 21.5" stroke="#07AD3E" stroke-width="1.5"></path>',5)]))}const zye=Wr(Vye,[["render",Qye]]),Uye={},jye={class:"settings-list"};function Gye(e,t){return d.openBlock(),d.createElementBlock("div",{class:"settings-form",onClick:t[0]||(t[0]=n=>n.stopPropagation())},[t[1]||(t[1]=d.createElementVNode("div",{class:"settings-title"},[d.createElementVNode("h3",null," Settings ")],-1)),d.createElementVNode("div",jye,[d.renderSlot(e.$slots,"default"),d.renderSlot(e.$slots,"settingsSlot")])])}const mb={settings:{icon:Cye,component:Wr(Uye,[["render",Gye]]),title:"Settings"},template:{icon:aye,component:Xle,title:"Template"},dataMapping:{icon:sye,component:g0e,title:"Data mapping"},axes:{icon:dye,component:Ove,title:"Axes settings"},statistics:{icon:mye,component:Fye,title:"Statistics"},layers:{icon:wye,component:Jge,title:"Layers"},delete:{icon:zye,component:null,title:"Delete graph"},export:{icon:Sye,component:null,title:"Export"}};function Yye(){return Object.keys(mb)}function Wye(e){return mb[e].icon??""}function Xye(e){return mb[e].title??""}function Kye(e){const t=Object.entries(mb).reduce((n,[r,a])=>H1e.setProp(n,r,a.component),{});return eye(t,e)}const Zye={class:"settings-tabs"},Jye={style:{"font-family":"var(--font-family-base)"}},qye=d.defineComponent({__name:"index",props:{chartType:{},graphStatus:{},allowDeleting:{type:Boolean},hasSettingsSlot:{type:Boolean},modelValue:{}},emits:["update:modelValue","export","delete"],setup(e,{emit:t}){const n=t,r=e,a=d.computed(()=>Yye().filter(o=>!(o==="settings"&&!r.hasSettingsSlot)&&!(o==="statistics"&&r.chartType!=="discrete"&&r.chartType!=="scatterplot")&&!(o==="delete"&&r.allowDeleting)));function i(o){n("update:modelValue",o===r.modelValue?null:o)}return(o,s)=>(d.openBlock(),d.createElementBlock("div",Zye,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a.value,c=>(d.openBlock(),d.createBlock(d.unref(pt.PlTooltip),{key:c,"open-delay":100,"close-delay":100,class:d.normalizeClass(["has-inline-icon",{active:o.modelValue===c,"temp-inactive":c==="export"&&(o.graphStatus!=="ready"||o.chartType==="scatterplot-umap"),[c]:!0}]),position:"left",hide:o.modelValue===c,onClick:f=>{f.stopPropagation(),c==="export"?o.$emit("export"):c==="delete"?o.$emit("delete"):i(c)}},{tooltip:d.withCtx(()=>[d.createElementVNode("span",Jye,d.toDisplayString(d.unref(Xye)(c)),1)]),default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(Wye)(c))))]),_:2},1032,["class","hide","onClick"]))),128))]))}}),e3e=d.defineComponent({__name:"TransitionSlidePanel",setup(e){function t(){window.dispatchEvent(new CustomEvent("adjust"))}function n(){window.dispatchEvent(new CustomEvent("adjust"))}return(r,a)=>(d.openBlock(),d.createBlock(d.Transition,{name:"slide-panel",onAfterEnter:t,onAfterLeave:n},{default:d.withCtx(()=>[d.renderSlot(r.$slots,"default")]),_:3}))}}),t3e=d.defineComponent({__name:"PanelModal",emits:["close"],setup(e,{emit:t}){const n=t,r=d.ref();return pt.useClickOutside([r],()=>n("close")),(a,i)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"rootRef",ref:r,class:"panel-modal"},[d.createVNode(d.unref(pt.PlCloseModalBtn),{class:"close-panel-modal",onClick:i[0]||(i[0]=o=>n("close"))}),d.renderSlot(a.$slots,"default",{ref:"contentRef"})],512))}}),n3e={},r3e={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function a3e(e,t){return d.openBlock(),d.createElementBlock("svg",r3e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.75 2.25V7.25H13.75V8.75H8.75V13.75H7.25V8.75H2.25V7.25H7.25V2.25H8.75Z",fill:"#110529"},null,-1)]))}const i3e=Wr(n3e,[["render",a3e]]),o3e={},l3e={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function s3e(e,t){return d.openBlock(),d.createElementBlock("svg",l3e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.25 7.25H13.75V8.75H2.25V7.25Z",fill:"#110529"},null,-1)]))}const u3e=Wr(o3e,[["render",s3e]]),c3e={class:"zoom-text-field"},f3e=d.defineComponent({__name:"ZoomInput",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,r=e,a=d.ref(),i=d.ref(!1),o=d.ref(String(r.modelValue)),s=d.computed({get(){const c=o.value??"100";return i.value?c:c+"%"},set(c){return o.value=c,c}});return d.watch(()=>i.value,c=>{if(!c){let f=Number(o.value);isNaN(f)?o.value=String(r.modelValue):n("update:modelValue",f)}}),d.watch(()=>r.modelValue,c=>{o.value=String(c)}),(c,f)=>(d.openBlock(),d.createElementBlock("div",{class:"zoom-text-field__envelope zoom-input",onFocusin:f[1]||(f[1]=A=>i.value=!0),onFocusout:f[2]||(f[2]=A=>i.value=!1),onKeyup:f[3]||(f[3]=d.withKeys(A=>{var h;return(h=a.value)==null?void 0:h.blur()},["enter"]))},[d.createElementVNode("div",c3e,[d.withDirectives(d.createElementVNode("input",{ref_key:"input",ref:a,"onUpdate:modelValue":f[0]||(f[0]=A=>s.value=A),type:"text"},null,512),[[d.vModelText,s.value]]),d.createVNode(AB,{style:{"z-index":"1"},class:"zoom-text-field__contour"})])],32))}}),d3e={class:"zoom-container"},A3e=20,p3e=400,w$=10,h3e=d.defineComponent({__name:"index",setup(e){const t=da();function n(i){return Math.max(A3e,Math.min(p3e,i))}function r(){t.value.reactive.chartScale=n(t.value.reactive.chartScale-w$)}function a(){t.value.reactive.chartScale=n(t.value.reactive.chartScale+w$)}return(i,o)=>(d.openBlock(),d.createElementBlock("div",d3e,[o[1]||(o[1]=d.createElementVNode("div",{class:"zoom-border"},null,-1)),d.createVNode(d.unref(pt.PlBtnGhost),{onClick:r},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(u3e)))]),_:1}),d.createVNode(f3e,{modelValue:d.unref(t).reactive.chartScale,"onUpdate:modelValue":o[0]||(o[0]=s=>d.unref(t).reactive.chartScale=n(s))},null,8,["modelValue"]),d.createVNode(d.unref(pt.PlBtnGhost),{onClick:a},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(i3e)))]),_:1})]))}}),m3e=d.defineComponent({__name:"DendroTable",props:{chartData:{}},emits:["row-select"],setup(e,{emit:t}){const n=da(),r=e,a=d.ref(100),i=d.shallowRef(),o=d.computed(()=>["id",...n.value.reactive.optionsState.components.tableContent.selectorStates.map(g=>g.selectedSource)]),s=d.ref([]);d.watch(()=>{var g;return(g=r.chartData)==null?void 0:g.hierarchy},g=>{if(g){const b=g.leaves().map(C=>C.data.rawData.id);(b.length!==s.value.length||b.some((C,x)=>C!==s.value[x]))&&(s.value=b)}else s.value=[]},{immediate:!0});const c=d.ref([]),f=d.ref([]);d.watch([()=>s.value,()=>o.value,()=>n.value.commonHelpersData.dendroTableData.value],([g,b,C])=>{if(C===null){f.value=[],c.value=[];return}if(b.some(k=>!C[k]))return;const x=C.id.data.reduce((k,_,D)=>{const O=_;return k[O]&&console.warn(`More than 1 value for node id ${O} in dendro table`),k[O]=b.reduce((I,$)=>{const Q=C[$];return Q&&(I[$]=Q.data[D]),I},{}),k},{});f.value=b.map(k=>({headerName:C[k].label,field:k,sortable:!1,resizable:!1})),c.value=g.map(k=>x[k]??null),m()},{immediate:!0});const A=d.computed(()=>{var b,C;const g=(C=(b=r.chartData)==null?void 0:b.chartSizes)==null?void 0:C.treeHeight;return s.value.length?g/s.value.length:0}),h=g=>{i.value=g.api,m()};function m(){if(i.value&&!i.value.isDestroyed()){i.value.autoSizeAllColumns();const g=i.value.getColumns();g&&(a.value=g.reduce((b,C)=>b+C.getActualWidth(),2))}}return d.watch(()=>n.value.reactive.dendroSelectedNodeId,g=>{i.value&&(g===null?i.value.deselectAll():i.value.forEachNode(b=>{b.data.id===g&&b.setSelected(!0,!0)}))}),(g,b)=>(d.openBlock(),d.createElementBlock("div",{class:"dendro-table",style:d.normalizeStyle({width:a.value+"px"})},[d.createVNode(d.unref(Qee.AgGridVue),{theme:d.unref(pt.AgGridTheme),gridApi:i.value,onGridReady:h,defaultColDef:{suppressHeaderMenuButton:!0},rowData:c.value,columnDefs:f.value,rowHeight:A.value,autoSizeStrategy:{type:"fitCellContents"},onGridColumnsChanged:b[0]||(b[0]=()=>{m()}),domLayout:"autoHeight"},null,8,["theme","gridApi","rowData","columnDefs","rowHeight"])],4))}}),v3e={},g3e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function y3e(e,t){return d.openBlock(),d.createElementBlock("svg",g3e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.091 3.53035C18.2123 2.65166 16.7877 2.65167 15.909 3.53037L3.90901 15.5304C3.48705 15.9524 3.25 16.5246 3.25 17.1214V20.0001C3.25 20.4143 3.58579 20.7501 4 20.7501H6.87868C7.47542 20.7501 8.04771 20.513 8.46967 20.0911L20.4697 8.09099C21.3484 7.21231 21.3484 5.7877 20.4697 4.90903L19.091 3.53035ZM16.9697 4.59101C17.2626 4.29811 17.7374 4.29811 18.0303 4.59101L19.409 5.96969C19.7019 6.26258 19.7019 6.73745 19.409 7.03034L18.5 7.9394L16.0607 5.50006L16.9697 4.59101ZM15 6.56073L17.4393 9.00007L7.40901 19.0304C7.26836 19.171 7.07759 19.2501 6.87868 19.2501H4.75V17.1214C4.75 16.9225 4.82902 16.7317 4.96967 16.5911L15 6.56073Z",fill:"#CFD1DB"},null,-1),d.createElementVNode("path",{d:"M12 20.7501L20 20.7501L20 19.2501L12 19.2501L12 20.7501Z",fill:"#CFD1DB"},null,-1)]))}const w3e=Wr(v3e,[["render",y3e]]),C$=d.defineComponent({__name:"Loading",props:{top:{default:0},left:{default:0},right:{default:0},bottom:{default:0}},setup(e){return(t,n)=>(d.openBlock(),d.createElementBlock("div",{class:"graph-maker__loading",style:d.normalizeStyle({top:`${t.top}px`,bottom:`${t.bottom}px`,right:`${t.right}px`,left:`${t.left}px`})},n[0]||(n[0]=[d.createStaticVNode('<div class="loading-picture"><svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M36.0197 2.29384C37.0053 1.76506 37.7157 1.45481 38.4537 1.29931C39.4734 1.08447 40.5266 1.08447 41.5463 1.29931C42.2843 1.45481 42.9947 1.76506 43.9803 2.29384C44.7026 2.66301 45.5542 3.14998 46.6565 3.78023L68.4201 16.2247C69.3757 16.7711 70.1409 17.2086 70.7708 17.5978C71.8362 18.2367 72.5158 18.7183 73.0579 19.3166C73.7667 20.0989 74.3023 21.0219 74.6298 22.0253C75 23.1595 75 24.4276 75 26.9639V53.0362C75 55.5725 75 56.8407 74.6298 57.9748C74.3023 58.9782 73.7667 59.9012 73.0579 60.6835C72.5154 61.2822 71.8353 61.764 70.7688 62.4035C70.1393 62.7924 69.3748 63.2295 68.4203 63.7753L46.6565 76.2198C45.555 76.8497 44.7037 77.3364 43.9817 77.7055C42.9954 78.2347 42.2847 78.5452 41.5463 78.7008C40.5266 78.9156 39.4734 78.9156 38.4537 78.7008C37.7153 78.5452 37.0045 78.2347 36.0182 77.7054C35.2962 77.3364 34.445 76.8497 33.3436 76.2199L11.5799 63.7754C10.6253 63.2295 9.86069 62.7924 9.23115 62.4035C8.16466 61.764 7.48457 61.2822 6.94208 60.6835C6.23334 59.9012 5.6977 58.9782 5.37018 57.9748C5 56.8407 5 55.5725 5 53.0362V26.9639C5 24.4276 5 23.1595 5.37018 22.0253C5.6977 21.0219 6.23334 20.0989 6.94208 19.3166C7.48422 18.7183 8.16379 18.2367 9.22911 17.5978C9.85904 17.2086 10.6242 16.7711 11.5799 16.2247L33.3435 3.78023C34.4457 3.14998 35.2974 2.663 36.0197 2.29384ZM10 34.9971V24.9907H37.4546V34.9971H10ZM10 45.0036V40.0003H37.4546V45.0036H10ZM37.4546 72.9139L10 57.1541V50.0069H37.4546V72.9139ZM65.0189 60.0134L42.5455 72.9138V60.0134H65.0189ZM70 24.9907V55.0101H42.5455V24.9907H70ZM14.98 19.9874L40 5.62505L65.0201 19.9874H14.98Z" fill="#E1E3EB"></path></svg><div class="loading-progress-bar"><div class="moving-dash"></div></div></div>',1)]),4))}}),C3e={class:"graph-info-tooltip-title"},b3e=["title"],E3e={key:1,class:"graph-info-tooltip-sequence-row"},x3e=["title"],S3e={key:0,class:"graph-info-tooltip-icon"},B3e={key:0,"data-theme":"dark",class:"graph-info-tooltip-button"},k3e=48,T3e=62.5,_3e=26,P3e=16,b$=24,M3e=20,D3e=d.defineComponent({__name:"DendroTooltip",props:{info:{},tooltipBtn:{},containerRef:{}},emits:["close","tooltip-btn-click"],setup(e,{emit:t}){const n=e,r=da(),a=t,i=d.ref();pt.useClickOutside([i],()=>a("close"));const o=d.computed(()=>{const b=k=>r.value.reactive.optionsState.components[k].selectorStates.map(_=>_.selectedSource),C=["tableContent","labels","nodeColor","nodeSize","nodeShape","lineColor"],x=["id"];return C.forEach(k=>{b(k).forEach(D=>{x.includes(D)||x.push(D)})}),x}),s=d.computed(()=>n.info.info[0]),c=d.computed(()=>{var b;return(b=s.value)==null?void 0:b.id}),f=d.computed(()=>{const b=r.value.commonHelpersData.dendroTableData.value;if(!b)return[];const C=b.id.data.findIndex(x=>String(x)===String(c.value));return C!==-1?o.value.map(x=>{var k,_;return{label:b[x].label,value:b[x].data[C],isSequence:((_=(k=b[x].spec)==null?void 0:k.annotations)==null?void 0:_["pl7.app/type"])==="sequence"}}):[]}),A=d.computed(()=>f.value.reduce((b,C)=>b+(C.isSequence?T3e:_3e),0)+P3e*2+(n.tooltipBtn?k3e:0)),h=d.computed(()=>({left:n.info.x+M3e+"px",top:n.info.y+b$+"px"})),m=d.computed(()=>{const b=n.containerRef.scrollHeight,C=A.value/2,x=n.info.y+b$;return x<C?-x:b-C<x?-(A.value-(b-x)):-C});function g(b){var C;(C=window==null?void 0:window.navigator)==null||C.clipboard.writeText(b)}return(b,C)=>(d.openBlock(),d.createElementBlock("div",{class:"graph-info-tooltip__container",ref:"",style:d.normalizeStyle(h.value)},[C[3]||(C[3]=d.createElementVNode("div",{class:"graph-info-tooltip__tail"},null,-1)),d.createElementVNode("div",{class:"graph-info-tooltip",ref_key:"rootRef",ref:i,style:d.normalizeStyle({transform:`translate(0,${m.value}px)`}),onClick:C[2]||(C[2]=x=>x.stopPropagation())},[d.createVNode(d.unref(pt.PlMaskIcon24),{class:"graph-info-tooltip-close",name:"close",onClick:C[0]||(C[0]=x=>a("close"))}),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(f.value,x=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["graph-info-tooltip-row",{"graph-info-tooltip-row__sequence":x.isSequence}])},[d.createElementVNode("div",C3e,d.toDisplayString(x.label+":"),1),x.isSequence?(d.openBlock(),d.createElementBlock("div",E3e,[d.createElementVNode("div",{class:"graph-info-tooltip-value",title:String(x.value)},d.toDisplayString(x.value),9,x3e),x.isSequence?(d.openBlock(),d.createElementBlock("div",S3e,[d.createVNode(d.unref(pt.PlMaskIcon16),{class:"graph-info-tooltip-clipboard",name:"clipboard",onClick:()=>g(String(x.value))},null,8,["onClick"])])):d.createCommentVNode("",!0)])):(d.openBlock(),d.createElementBlock("div",{key:0,class:"graph-info-tooltip-value",title:String(x.value)},d.toDisplayString(x.value),9,b3e))],2))),256)),b.tooltipBtn?(d.openBlock(),d.createElementBlock("div",B3e,[d.createVNode(d.unref(pt.PlBtnSecondary),{icon:"arrow-right",size:"small",onClick:C[1]||(C[1]=()=>a("tooltip-btn-click",c.value))},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(b.tooltipBtn),1)]),_:1})])):d.createCommentVNode("",!0)],4)],4))}}),H3e={class:"chart_container"},I3e={class:"chart_header"},L3e=["value"],R3e={class:"chart_titleLineSlot"},N3e={key:0,class:"chart_tabBy"},$3e={key:2,style:{position:"absolute",left:"10px",bottom:"10px"}},F3e=d.defineComponent({__name:"Chart",props:{graphStatus:{},graphTitle:{},dendroTooltipButton:{},chartData:{}},emits:["graph-title-update","dendro-node-select","dendro-tooltip-btn-click"],setup(e,{emit:t}){const n=t,r=da(),a=e,i=d.ref(a.graphTitle);d.watch(()=>a.graphTitle,x=>{i.value=x});const o=d.computed(()=>{var x;return(x=r.value.reactive.optionsState.components.tabBy)==null?void 0:x.selectorStates[0]}),s=d.computed(()=>{var x;return(x=o.value)==null?void 0:x.selectedSource}),c=d.computed(()=>{var x;return(x=o.value)==null?void 0:x.selectedFilterValue}),f=d.ref(c.value);d.watch(()=>s.value,(x,k)=>{x!==k&&(f.value=c.value)},{immediate:!0});const A=d.computed(()=>r.value.uniqueValuesData.value),h=d.computed(()=>{var x;if(s.value){const k=(x=A.value[s.value])==null?void 0:x.options;return k&&k.sort((_,D)=>_.label>D.label?1:-1),k}else return});d.watch(()=>h.value,x=>{if(x&&x.length&&f.value===void 0){const k=x[0].value;f.value=k,m(k)}},{immediate:!0});function m(x){const k=r.value.reactive.optionsState.components.tabBy.selectorStates;k.length&&(r.value.reactive.optionsState.components.tabBy.selectorStates=[{...k[0],type:"equals",selectedFilterValue:x}])}function g(x){const k=x.currentTarget;i.value=k.value,n("graph-title-update",k.value)}function b(x){n("dendro-node-select",x)}const C=d.ref();return(x,k)=>(d.openBlock(),d.createElementBlock("div",H3e,[d.createElementVNode("div",I3e,[d.createElementVNode("input",{class:"chart_title",value:i.value,onChange:g,onKeyup:k[0]||(k[0]=d.withKeys(_=>{var D;(D=_.target)==null||D.blur()},["enter"]))},null,40,L3e),(d.openBlock(),d.createBlock(d.resolveDynamicComponent(w3e),{class:"chart_titleEdit"})),d.createElementVNode("div",R3e,[d.renderSlot(x.$slots,"default")])]),s.value?(d.openBlock(),d.createElementBlock("div",N3e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Show for",modelValue:f.value,"onUpdate:modelValue":[k[1]||(k[1]=_=>f.value=_),k[2]||(k[2]=_=>m(_))],options:h.value},null,8,["modelValue","options"])])):d.createCommentVNode("",!0),d.createElementVNode("div",{class:d.normalizeClass(["chart_main-content",{"chart_main-content__dendro":d.unref(r).reactive.chartType==="dendro"}]),ref_key:"chartContainerRef",ref:C},[d.createElementVNode("div",{id:"chartSvgContainer",class:d.normalizeClass({chart_loading:d.unref(r).loading.initialCharts&&x.graphStatus==="ready",chart_noDataMapping:x.graphStatus==="notReady",chart_emptyData:x.graphStatus==="empty",chart_inconsistent:x.graphStatus==="inconsistent"})},[d.unref(r).loading.initialCharts&&x.graphStatus==="ready"?(d.openBlock(),d.createBlock(C$,{key:0})):d.createCommentVNode("",!0)],2),d.unref(r).reactive.chartType==="dendro"&&x.chartData&&d.unref(r).reactive.layersSettings.dendro.showTable?(d.openBlock(),d.createBlock(m3e,{key:0,chartData:x.chartData,onRowSelect:b},null,8,["chartData"])):d.createCommentVNode("",!0),d.unref(r).reactive.dendroInfoByClick?(d.openBlock(),d.createBlock(D3e,{key:1,info:d.unref(r).reactive.dendroInfoByClick,containerRef:C.value,tooltipBtn:x.dendroTooltipButton,onTooltipBtnClick:k[3]||(k[3]=_=>x.$emit("dendro-tooltip-btn-click",_)),onClose:k[4]||(k[4]=_=>{d.unref(r).reactive.dendroInfoByClick=null,x.$emit("dendro-node-select",null)})},null,8,["info","containerRef","tooltipBtn"])):d.createCommentVNode("",!0)],2),x.graphStatus!=="empty"&&d.unref(r).reactive.chartType!=="scatterplot-umap"?(d.openBlock(),d.createBlock(h3e,{key:1})):d.createCommentVNode("",!0),x.graphStatus!=="empty"&&d.unref(r).reactive.chartType==="scatterplot-umap"?(d.openBlock(),d.createElementBlock("div",$3e,[d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(r).reactive.lassoMode,"onUpdate:modelValue":k[5]||(k[5]=_=>d.unref(r).reactive.lassoMode=_),label:"Lasso mode"},null,8,["modelValue"])])):d.createCommentVNode("",!0)]))}});function V3e(e,t){return e.parent===t.parent?1:2}function O3e(e){return e.reduce(Q3e,0)/e.length}function Q3e(e,t){return e+t.x}function z3e(e){return 1+e.reduce(U3e,0)}function U3e(e,t){return Math.max(e,t.y)}function j3e(e){for(var t;t=e.children;)e=t[0];return e}function G3e(e){for(var t;t=e.children;)e=t[t.length-1];return e}function xB(){var e=V3e,t=1,n=1,r=!1;function a(i){var o,s=0;i.eachAfter(function(m){var g=m.children;g?(m.x=O3e(g),m.y=z3e(g)):(m.x=o?s+=e(m,o):0,m.y=0,o=m)});var c=j3e(i),f=G3e(i),A=c.x-e(c,f)/2,h=f.x+e(f,c)/2;return i.eachAfter(r?function(m){m.x=(m.x-i.x)*t,m.y=(i.y-m.y)*n}:function(m){m.x=(m.x-A)/(h-A)*t,m.y=(1-(i.y?m.y/i.y:1))*n})}return a.separation=function(i){return arguments.length?(e=i,a):e},a.size=function(i){return arguments.length?(r=!1,t=+i[0],n=+i[1],a):r?null:[t,n]},a.nodeSize=function(i){return arguments.length?(r=!0,t=+i[0],n=+i[1],a):r?[t,n]:null},a}function Y3e(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function W3e(){return this.eachAfter(Y3e)}function X3e(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function K3e(e,t){for(var n=this,r=[n],a,i,o=-1;n=r.pop();)if(e.call(t,n,++o,this),a=n.children)for(i=a.length-1;i>=0;--i)r.push(a[i]);return this}function Z3e(e,t){for(var n=this,r=[n],a=[],i,o,s,c=-1;n=r.pop();)if(a.push(n),i=n.children)for(o=0,s=i.length;o<s;++o)r.push(i[o]);for(;n=a.pop();)e.call(t,n,++c,this);return this}function J3e(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function q3e(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,a=r&&r.length;--a>=0;)n+=r[a].value;t.value=n})}function e2e(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function t2e(e){for(var t=this,n=n2e(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var a=r.length;e!==n;)r.splice(a,0,e),e=e.parent;return r}function n2e(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),a=null;for(e=n.pop(),t=r.pop();e===t;)a=e,e=n.pop(),t=r.pop();return a}function r2e(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function a2e(){return Array.from(this)}function i2e(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function o2e(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*l2e(){var e=this,t,n=[e],r,a,i;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(a=0,i=r.length;a<i;++a)n.push(r[a]);while(n.length)}function vb(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=c2e)):t===void 0&&(t=u2e);for(var n=new Q7(e),r,a=[n],i,o,s,c;r=a.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)a.push(i=o[s]=new Q7(o[s])),i.parent=r,i.depth=r.depth+1;return n.eachBefore(E$)}function s2e(){return vb(this).eachBefore(f2e)}function u2e(e){return e.children}function c2e(e){return Array.isArray(e)?e[1]:null}function f2e(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function E$(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Q7(e){this.data=e,this.depth=this.height=0,this.parent=null}Q7.prototype=vb.prototype={constructor:Q7,count:W3e,each:X3e,eachAfter:Z3e,eachBefore:K3e,find:J3e,sum:q3e,sort:e2e,path:t2e,ancestors:r2e,descendants:a2e,leaves:i2e,links:o2e,copy:s2e,[Symbol.iterator]:l2e};function SB(e){return e==null?null:d2e(e)}function d2e(e){if(typeof e!="function")throw new Error;return e}var A2e={depth:-1},x$={},BB={};function p2e(e){return e.id}function h2e(e){return e.parentId}function S$(){var e=p2e,t=h2e,n;function r(a){var i=Array.from(a),o=e,s=t,c,f,A,h,m,g,b,C,x=new Map;if(n!=null){const k=i.map((O,I)=>m2e(n(O,I,a))),_=k.map(B$),D=new Set(k).add("");for(const O of _)D.has(O)||(D.add(O),k.push(O),_.push(B$(O)),i.push(BB));o=(O,I)=>k[I],s=(O,I)=>_[I]}for(A=0,c=i.length;A<c;++A)f=i[A],g=i[A]=new Q7(f),(b=o(f,A,a))!=null&&(b+="")&&(C=g.id=b,x.set(C,x.has(C)?x$:g)),(b=s(f,A,a))!=null&&(b+="")&&(g.parent=b);for(A=0;A<c;++A)if(g=i[A],b=g.parent){if(m=x.get(b),!m)throw new Error("missing: "+b);if(m===x$)throw new Error("ambiguous: "+b);m.children?m.children.push(g):m.children=[g],g.parent=m}else{if(h)throw new Error("multiple roots");h=g}if(!h)throw new Error("no root");if(n!=null){for(;h.data===BB&&h.children.length===1;)h=h.children[0],--c;for(let k=i.length-1;k>=0&&(g=i[k],g.data===BB);--k)g.data=null}if(h.parent=A2e,h.eachBefore(function(k){k.depth=k.parent.depth+1,--c}).eachBefore(E$),h.parent=null,c>0)throw new Error("cycle");return h}return r.id=function(a){return arguments.length?(e=SB(a),r):e},r.parentId=function(a){return arguments.length?(t=SB(a),r):t},r.path=function(a){return arguments.length?(n=SB(a),r):n},r}function m2e(e){e=`${e}`;let t=e.length;return kB(e,t-1)&&!kB(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function B$(e){let t=e.length;if(t<2)return"";for(;--t>1&&!kB(e,t););return e.slice(0,t)}function kB(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if(!(n&1))return!0}return!1}var Jv={},TB={exports:{}},fi={};/**
36
+ `,dse=["innerHTML"],Ase={class:"dropdown-list-item__title-container"},pse={class:"dropdown-list-item__title text-s"},hse={key:0,class:"dropdown-list-item__description text-description"},mse={key:1,class:"dropdown-list-item__icon flex-self-start"},vse=d.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(e){const t=e,n=d.computed(()=>{const i=[];return t.size==="small"&&i.push("dropdown-list-item__small"),t.isSelected&&i.push("dropdown-list-item__selected"),t.isHovered&&i.push("hovered-item"),i.join(" ")}),r=d.computed(()=>{const i=["dropdown-list-item__checkbox","flex-self-start"];return t.isSelected&&i.push("checked"),i.join(" ")}),a=d.computed(()=>t.isSelected?fse:cse);return(i,o)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass([n.value,"dropdown-list-item"])},[t.useCheckbox?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(r.value),innerHTML:a.value},null,10,dse)):d.createCommentVNode("",!0),o[1]||(o[1]=d.createTextVNode()),d.createElementVNode("div",Ase,[d.createElementVNode("div",pse,d.toDisplayString(i.option.label),1),o[0]||(o[0]=d.createTextVNode()),i.option.description?(d.openBlock(),d.createElementBlock("div",hse,d.toDisplayString(i.option.description),1)):d.createCommentVNode("",!0)]),o[2]||(o[2]=d.createTextVNode()),!t.useCheckbox&&t.isSelected?(d.openBlock(),d.createElementBlock("div",mse)):d.createCommentVNode("",!0)],2))}});function gse(e){return e()}function yse(e){let t=!1;return function(...n){t||(requestAnimationFrame(()=>{e(...n),t=!1}),t=!0)}}function wse(e){return new Promise(t=>setTimeout(t,e))}function Cse(e,t){const n=setTimeout(e,t);return()=>{clearTimeout(n)}}function bse(e){return function(t){return 1-e(1-t)}}function Ese(e){const{duration:t,draw:n,timing:r}=e,a=performance.now();let i=!1;return requestAnimationFrame(function o(s){let c=(s-a)/t;(c>1||i)&&(c=1);const f=r(c);n(f),c<1&&requestAnimationFrame(o)}),function(){i=!0}}function xse(e,t,n=!0){let r=0,a;return function(...i){a=()=>{e.apply(this,i),r=new Date().getTime()+t,a=null,n&&setTimeout(()=>{a==null||a()},t)},new Date().getTime()>r&&a()}}function GR(e){if(!Array.isArray(e))throw Error("Invalid component options: "+String(e));return e.map(t=>({label:"label"in t?t.label:t.text,value:t.value,description:t.description}))}function YR(e,t){const n=yse(()=>{if(e.value){const{scrollTop:r,scrollLeft:a,scrollHeight:i,scrollWidth:o,clientHeight:s,clientWidth:c}=document.documentElement,f=e.value.getBoundingClientRect();t({scrollTop:r,scrollLeft:a,scrollHeight:i,scrollWidth:o,clientHeight:s,clientWidth:c,offsetY:r+f.y,offsetX:a+f.x,top:f.top,right:f.right,bottom:f.bottom,left:f.left,width:f.width,height:f.height,x:f.x,y:f.y})}});d.onMounted(n),IC(window,"scroll",n,{capture:!0,passive:!0}),IC(window,"resize",n,{passive:!0}),IC(window,"adjust",n,!0)}const Sse=d.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(e){const t=e,n=d.computed(()=>t.size==="large"?"--mask-size: 24px":""),r=d.computed(()=>`mask-16 mask-${t.name}`);return(a,i)=>(d.openBlock(),d.createElementBlock("i",{style:d.normalizeStyle(n.value),class:d.normalizeClass([r.value,a.$style.icon])},null,6))}}),Bse="_icon_1ugxm_2",kse={icon:Bse},Tse={$style:kse},WR=J5(Sse,[["__cssModules",Tse]]),_se=d.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(e){const t=e,n=d.computed(()=>`mask-24 mask-${t.name}`);return(r,a)=>(d.openBlock(),d.createElementBlock("i",{class:d.normalizeClass([n.value,r.$style.icon])},null,2))}}),Pse="_icon_1ugxm_2",Mse={icon:Pse},Dse={$style:Mse},Hse=J5(_se,[["__cssModules",Dse]]);function Ise(e,t){const n=d.ref();return YR(e,r=>{n.value=r}),d.computed(()=>{const r=d.unref(n),a=d.unref(t),i=a.position??"top",o=a.gap??8;if(!r)return"";const s=r.offsetY+Math.floor(r.height/2),c=r.offsetX+Math.floor(r.width/2);return i==="top-left"?`left: ${r.offsetX}px; top: ${r.offsetY-o}px;`:i==="top"?`left: ${c}px; top: ${r.offsetY-o}px;`:i==="right"?`left: ${r.offsetX+r.width+o}px; top: ${s}px;`:i==="left"?`right: ${r.scrollWidth-r.x+o}px; top: ${s}px;`:i==="southwest"?`left: ${r.offsetX+r.width}px; top: ${r.offsetY+r.height+o}px;`:""})}function XR(e,t){return t(e)}function KR(e,t){if(e!=null)return t(e)}function Lse(e){return Array.isArray(e)?e:[e]}function Rse(e,t){IC(document,"click",n=>{document.contains(n.target)&&(Lse(e).map(r=>r.value).filter(r=>!!r).some(r=>r==null?void 0:r.contains(n.target))||t())})}const Nse={},$se={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fse(e,t){return d.openBlock(),d.createElementBlock("svg",$se,t[0]||(t[0]=[d.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const Vse=J5(Nse,[["render",Fse]]),LS=new Map,Ose={name:"PlTooltip"},Qse=d.defineComponent({...Ose,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"},maxWidth:{default:"300px"}},emits:["tooltip:close"],setup(e,{emit:t}){const n=t,r=Symbol(),a=e,i=d.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});LS.set(r,()=>f()),d.watch(()=>i.open,x=>{requestAnimationFrame(()=>{i.tooltipOpen=x})});let o=()=>{};const s=xse(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),c=()=>{i.open=!0;for(const[x,k]of LS.entries())x!==r&&k()},f=()=>{i.open=!1,n("tooltip:close")},A=async()=>{a.hide||(s(),i.over=!0,o(),await wse(100),i.over&&c())},h=()=>{i.over=!1,o=Cse(()=>{i.over||f()},a.closeDelay)};d.watch(()=>a.hide,x=>{x&&f()});const m=d.ref(),g=d.ref(),b=Ise(m,d.toRef(a));Rse([m,g],()=>f());const C=d.computed(()=>({"--pl-tooltip-max-width":a.maxWidth}));return d.onUnmounted(()=>{LS.delete(r)}),(x,k)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.element),d.mergeProps(x.$attrs,{ref_key:"rootRef",ref:m,onClick:A,onMouseover:A,onMouseleave:h}),{default:d.withCtx(()=>[d.renderSlot(x.$slots,"default"),k[1]||(k[1]=d.createTextVNode()),x.$slots.tooltip&&i.open?(d.openBlock(),d.createBlock(d.Teleport,{key:0,to:"body"},[d.createVNode(d.Transition,{name:"tooltip-transition"},{default:d.withCtx(()=>[i.tooltipOpen?(d.openBlock(),d.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:d.normalizeStyle(d.unref(b))},[d.createElementVNode("div",{ref_key:"tooltip",ref:g,class:d.normalizeClass(["pl-tooltip",x.position]),style:d.normalizeStyle(C.value),onMouseover:A,onMouseleave:h},[d.createElementVNode("div",null,[d.renderSlot(x.$slots,"tooltip")]),k[0]||(k[0]=d.createTextVNode()),d.createVNode(Vse)],38)],4)):d.createCommentVNode("",!0)]),_:3})])):d.createCommentVNode("",!0)]),_:3},16))}}),zse={inheritAttrs:!1},Use={class:"double-contour"};function jse(e,t,n,r,a,i){return d.openBlock(),d.createElementBlock("div",Use,[d.createElementVNode("div",d.normalizeProps(d.guardReactiveProps(e.$attrs)),[d.renderSlot(e.$slots,"default")],16)])}const Gse=J5(zse,[["render",jse]]);function Yse(e){d.onMounted(e),d.onUpdated(e)}const RS=new WeakMap,NS=new ResizeObserver(e=>{for(const t of e)KR(RS.get(t.target),n=>n(t))});function Wse(e,t){RS.set(e,t),NS.unobserve(e),NS.observe(e)}function Xse(e){NS.unobserve(e),RS.delete(e)}const Kse=8,ZR=4;function Zse(e,t="label"){const n=new Set;Yse(()=>{KR(e==null?void 0:e.value,r=>{const a=r.querySelector(t);a&&(n.add(a),Wse(a,()=>{const i=gse(()=>a.getBoundingClientRect().width+XR(Kse,o=>Number.isNaN(o)?ZR:o+ZR));r.style.getPropertyValue("--label-offset-right-x")!==`${i}px`&&r.style.setProperty("--label-offset-right-x",`${i}px`)}))})}),d.onBeforeUnmount(()=>{Array.from(n.values()).map(r=>Xse(r))})}const Jse=d.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(e){const t=e,n=d.computed(()=>t.size==="large"?"--icon-size: 24px":""),r=d.computed(()=>`icon-16 icon-${t.name}`);return(a,i)=>(d.openBlock(),d.createElementBlock("i",{style:d.normalizeStyle(n.value),class:d.normalizeClass([r.value,a.$style.icon])},null,6))}}),qse="_icon_1ugxm_2",eue={icon:qse},tue={$style:eue},q5=J5(Jse,[["__cssModules",tue]]);function JR(e){return e!==null&&typeof e=="object"}function Ky(e,t){return JR(e)&&JR(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(n=>Ky(e[n],t[n])):e===t}const nue=d.defineComponent({__name:"LongText",setup(e){d.useCssVars(A=>({"5deba9de":o.value}));const t=d.ref(!1),n=d.ref(),r=d.ref(!1),a=d.computed(()=>r.value&&t.value?"ui-lt-animate":""),i=tse(A=>r.value=A,500),o=d.computed(()=>{var A;return n.value?`${((A=n.value)==null?void 0:A.innerHTML.length)*.4}s`:"5s"});function s(){const A=jR(n.value,"span cannot be empty");t.value=A.clientWidth<A.scrollWidth}function c(){s(),i(!0)}function f(){i(!1)}return(A,h)=>(d.openBlock(),d.createElementBlock("div",d.mergeProps(A.$attrs,{class:"ui-lt-container"}),[d.createElementVNode("span",{onMouseover:c,onMouseleave:f},[d.createElementVNode("span",{ref_key:"span",ref:n,class:d.normalizeClass(a.value)},[d.renderSlot(A.$slots,"default")],2)],32)],16))}});function rue(e,t){const n=e.scrollTop,r=e.getBoundingClientRect().height,a=t.offsetTop,i=t.getBoundingClientRect().height;return a+i<r+n&&a>n}function aue(e,t){const n=e.scrollTop,r=e.getBoundingClientRect().height,a=t.offsetTop,i=t.getBoundingClientRect().height;return a+i<r+n?"ceil":a>n?"floor":"visible"}function iue(e,t,n={}){const r=e.scrollTop,a=e.getBoundingClientRect().height,i=t.getBoundingClientRect().height,o=t.offsetTop,s=aue(e,t);if(s==="visible")return;const c=f=>{const A=s==="floor"?o-(a-i):o;e.scrollTop=r+f*(A-r)};rue(e,t)||Ese({duration:n.duration||100,timing:bse(f=>f),draw:c})}const oue=d.defineComponent({__name:"DropdownOverlay",props:{root:{},gap:{}},setup(e,{expose:t}){const n=e,r=d.reactive({optionsHeight:0}),a=d.reactive({top:"0px",left:"0px",width:"0px"}),i=d.toRef(n,"root"),o=d.ref();return t({scrollIntoActive:()=>{const s=o.value;s&&ese(s.querySelector(".hovered-item"),c=>{iue(s,c)})},listRef:o}),d.watch(o,s=>{s&&requestAnimationFrame(()=>{const c=s.getBoundingClientRect();r.optionsHeight=c.height,window.dispatchEvent(new CustomEvent("adjust"))})}),YR(i,s=>{const c=document.body.getBoundingClientRect(),f=s.top-c.top,A=s.left-c.left,h=n.gap??0,m=f+s.height+h;m+r.optionsHeight>s.clientHeight?a.top=f-r.optionsHeight-h+"px":a.top=m+"px",a.left=A+"px",a.width=s.width+"px"}),(s,c)=>(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[d.createElementVNode("div",d.mergeProps({ref_key:"listRef",ref:o},s.$attrs,{style:a,tabindex:"-1"}),[d.renderSlot(s.$slots,"default",{ref:"list"})],16)]))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const qR=()=>{};function lue(e,t){function n(...r){return new Promise((a,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(a).catch(i)})}return n}function sue(e,t={}){let n,r,a=qR;const i=o=>{clearTimeout(o),a(),a=qR};return o=>{const s=d.toValue(e),c=d.toValue(t.maxWait);return n&&i(n),s<=0||c!==void 0&&c<=0?(r&&(i(r),r=null),Promise.resolve(o())):new Promise((f,A)=>{a=t.rejectOnCancel?A:f,c&&!r&&(r=setTimeout(()=>{n&&i(n),r=null,f(o())},c)),n=setTimeout(()=>{r&&i(r),r=null,f(o())},s)})}}function uue(e,t=200,n={}){return lue(sue(t,n),e)}function cue(e,t=200,n={}){const r=d.ref(e.value),a=uue(()=>{r.value=e.value},t,n);return d.watch(e,()=>a()),r}var Oi;(function(e){e.assertEqual=a=>a;function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(s=>typeof a[a[s]]!="number"),o={};for(const s of i)o[s]=a[s];return e.objectValues(o)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},e.find=(a,i)=>{for(const o of a)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Oi||(Oi={}));var $S;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})($S||($S={}));const Nn=Oi.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),rm=e=>{switch(typeof e){case"undefined":return Nn.undefined;case"string":return Nn.string;case"number":return isNaN(e)?Nn.nan:Nn.number;case"boolean":return Nn.boolean;case"function":return Nn.function;case"bigint":return Nn.bigint;case"symbol":return Nn.symbol;case"object":return Array.isArray(e)?Nn.array:e===null?Nn.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Nn.promise:typeof Map<"u"&&e instanceof Map?Nn.map:typeof Set<"u"&&e instanceof Set?Nn.set:typeof Date<"u"&&e instanceof Date?Nn.date:Nn.object;default:return Nn.unknown}},an=Oi.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),fue=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let Rp=class Nee extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,c=0;for(;c<o.path.length;){const f=o.path[c];c===o.path.length-1?(s[f]=s[f]||{_errors:[]},s[f]._errors.push(n(o))):s[f]=s[f]||{_errors:[]},s=s[f],c++}}};return a(this),r}static assert(t){if(!(t instanceof Nee))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oi.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Rp.create=e=>new Rp(e);const Zy=(e,t)=>{let n;switch(e.code){case an.invalid_type:e.received===Nn.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case an.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Oi.jsonStringifyReplacer)}`;break;case an.unrecognized_keys:n=`Unrecognized key(s) in object: ${Oi.joinValues(e.keys,", ")}`;break;case an.invalid_union:n="Invalid input";break;case an.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Oi.joinValues(e.options)}`;break;case an.invalid_enum_value:n=`Invalid enum value. Expected ${Oi.joinValues(e.options)}, received '${e.received}'`;break;case an.invalid_arguments:n="Invalid function arguments";break;case an.invalid_return_type:n="Invalid function return type";break;case an.invalid_date:n="Invalid date";break;case an.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Oi.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case an.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case an.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case an.custom:n="Invalid input";break;case an.invalid_intersection_types:n="Intersection results could not be merged";break;case an.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case an.not_finite:n="Number must be finite";break;default:n=t.defaultError,Oi.assertNever(e)}return{message:n}};let eN=Zy;function due(e){eN=e}function LC(){return eN}const RC=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let s="";const c=r.filter(f=>!!f).slice().reverse();for(const f of c)s=f(o,{data:t,defaultError:s}).message;return{...a,path:i,message:s}},Aue=[];function Mn(e,t){const n=LC(),r=RC({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Zy?void 0:Zy].filter(a=>!!a)});e.common.issues.push(r)}class ff{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return Aa;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const i=await a.key,o=await a.value;r.push({key:i,value:o})}return ff.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return Aa;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const Aa=Object.freeze({status:"aborted"}),NC=e=>({status:"dirty",value:e}),Of=e=>({status:"valid",value:e}),FS=e=>e.status==="aborted",VS=e=>e.status==="dirty",e7=e=>e.status==="valid",t7=e=>typeof Promise<"u"&&e instanceof Promise;function $C(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function tN(e,t,n,r,a){if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var vr;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(vr||(vr={}));var n7,r7;let L0=class{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const nN=(e,t)=>{if(e7(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Rp(e.common.issues);return this._error=n,this._error}}};function Ha(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(i,o)=>{var s,c;const{message:f}=e;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:(s=f??r)!==null&&s!==void 0?s:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(c=f??n)!==null&&c!==void 0?c:o.defaultError}},description:a}}let Ka=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return rm(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:rm(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ff,ctx:{common:t.parent.common,data:t.data,parsedType:rm(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(t7(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const a={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rm(t)},i=this._parseSync({data:t,path:a.path,parent:a});return nN(a,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:rm(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(t7(a)?a:Promise.resolve(a));return nN(r,i)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const o=t(a),s=()=>i.addIssue({code:an.custom,...r(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new $p({schema:this,typeName:ta.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return R0.create(this,this._def)}nullable(){return lm.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Uv.create(this,this._def)}promise(){return t3.create(this,this._def)}or(t){return u7.create([this,t],this._def)}and(t){return c7.create(this,t,this._def)}transform(t){return new $p({...Ha(this._def),schema:this,typeName:ta.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new h7({...Ha(this._def),innerType:this,defaultValue:n,typeName:ta.ZodDefault})}brand(){return new zS({typeName:ta.ZodBranded,type:this,...Ha(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new m7({...Ha(this._def),innerType:this,catchValue:n,typeName:ta.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return US.create(this,t)}readonly(){return v7.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const pue=/^c[^\s-]{8,}$/i,hue=/^[0-9a-z]+$/,mue=/^[0-9A-HJKMNP-TV-Z]{26}$/,vue=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,gue=/^[a-z0-9_-]{21}$/i,yue=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wue=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Cue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let OS;const bue=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Eue=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,xue=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rN="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Sue=new RegExp(`^${rN}$`);function aN(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Bue(e){return new RegExp(`^${aN(e)}$`)}function iN(e){let t=`${rN}T${aN(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function kue(e,t){return!!((t==="v4"||!t)&&bue.test(e)||(t==="v6"||!t)&&Eue.test(e))}class Np extends Ka{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Nn.string){const a=this._getOrReturnCtx(t);return Mn(a,{code:an.invalid_type,expected:Nn.string,received:a.parsedType}),Aa}const n=new ff;let r;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")t.data.length>a.value&&(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const i=t.data.length>a.value,o=t.data.length<a.value;(i||o)&&(r=this._getOrReturnCtx(t,r),i?Mn(r,{code:an.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&Mn(r,{code:an.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")wue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"email",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")OS||(OS=new RegExp(Cue,"u")),OS.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"emoji",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")vue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"uuid",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")gue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"nanoid",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")pue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"cuid",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")hue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"cuid2",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")mue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"ulid",code:an.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),Mn(r,{validation:"url",code:an.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"regex",code:an.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?iN(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Sue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?Bue(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?yue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"duration",code:an.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?kue(t.data,a.version)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"ip",code:an.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?xue.test(t.data)||(r=this._getOrReturnCtx(t,r),Mn(r,{validation:"base64",code:an.invalid_string,message:a.message}),n.dirty()):Oi.assertNever(a);return{status:n.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:an.invalid_string,...vr.errToObj(r)})}_addCheck(t){return new Np({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...vr.errToObj(t)})}url(t){return this._addCheck({kind:"url",...vr.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...vr.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...vr.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...vr.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...vr.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...vr.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...vr.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...vr.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...vr.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...vr.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...vr.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...vr.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...vr.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...vr.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...vr.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...vr.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...vr.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...vr.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...vr.errToObj(n)})}nonempty(t){return this.min(1,vr.errToObj(t))}trim(){return new Np({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Np({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Np({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Np.create=e=>{var t;return new Np({checks:[],typeName:ta.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ha(e)})};function Tue(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,i=parseInt(e.toFixed(a).replace(".","")),o=parseInt(t.toFixed(a).replace(".",""));return i%o/Math.pow(10,a)}let a7=class TI extends Ka{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Nn.number){const a=this._getOrReturnCtx(t);return Mn(a,{code:an.invalid_type,expected:Nn.number,received:a.parsedType}),Aa}let n;const r=new ff;for(const a of this._def.checks)a.kind==="int"?Oi.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="multipleOf"?Tue(t.data,a.value)!==0&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.not_finite,message:a.message}),r.dirty()):Oi.assertNever(a);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,vr.toString(n))}gt(t,n){return this.setLimit("min",t,!1,vr.toString(n))}lte(t,n){return this.setLimit("max",t,!0,vr.toString(n))}lt(t,n){return this.setLimit("max",t,!1,vr.toString(n))}setLimit(t,n,r,a){return new TI({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:vr.toString(a)}]})}_addCheck(t){return new TI({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:vr.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:vr.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:vr.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:vr.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:vr.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:vr.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:vr.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:vr.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:vr.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Oi.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};a7.create=e=>new a7({checks:[],typeName:ta.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ha(e)});class am extends Ka{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Nn.bigint){const a=this._getOrReturnCtx(t);return Mn(a,{code:an.invalid_type,expected:Nn.bigint,received:a.parsedType}),Aa}let n;const r=new ff;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Mn(n,{code:an.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):Oi.assertNever(a);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,vr.toString(n))}gt(t,n){return this.setLimit("min",t,!1,vr.toString(n))}lte(t,n){return this.setLimit("max",t,!0,vr.toString(n))}lt(t,n){return this.setLimit("max",t,!1,vr.toString(n))}setLimit(t,n,r,a){return new am({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:vr.toString(a)}]})}_addCheck(t){return new am({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:vr.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:vr.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:vr.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:vr.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:vr.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}am.create=e=>{var t;return new am({checks:[],typeName:ta.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ha(e)})};let i7=class extends Ka{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Nn.boolean){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.boolean,received:n.parsedType}),Aa}return Of(t.data)}};i7.create=e=>new i7({typeName:ta.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ha(e)});let o7=class $ee extends Ka{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Nn.date){const a=this._getOrReturnCtx(t);return Mn(a,{code:an.invalid_type,expected:Nn.date,received:a.parsedType}),Aa}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Mn(a,{code:an.invalid_date}),Aa}const n=new ff;let r;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(r=this._getOrReturnCtx(t,r),Mn(r,{code:an.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):Oi.assertNever(a);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new $ee({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:vr.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:vr.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};o7.create=e=>new o7({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ta.ZodDate,...Ha(e)});let FC=class extends Ka{_parse(t){if(this._getType(t)!==Nn.symbol){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.symbol,received:n.parsedType}),Aa}return Of(t.data)}};FC.create=e=>new FC({typeName:ta.ZodSymbol,...Ha(e)});class l7 extends Ka{_parse(t){if(this._getType(t)!==Nn.undefined){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.undefined,received:n.parsedType}),Aa}return Of(t.data)}}l7.create=e=>new l7({typeName:ta.ZodUndefined,...Ha(e)});class s7 extends Ka{_parse(t){if(this._getType(t)!==Nn.null){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.null,received:n.parsedType}),Aa}return Of(t.data)}}s7.create=e=>new s7({typeName:ta.ZodNull,...Ha(e)});let Jy=class extends Ka{constructor(){super(...arguments),this._any=!0}_parse(t){return Of(t.data)}};Jy.create=e=>new Jy({typeName:ta.ZodAny,...Ha(e)});class zv extends Ka{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Of(t.data)}}zv.create=e=>new zv({typeName:ta.ZodUnknown,...Ha(e)});class Fh extends Ka{_parse(t){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.never,received:n.parsedType}),Aa}}Fh.create=e=>new Fh({typeName:ta.ZodNever,...Ha(e)});let VC=class extends Ka{_parse(t){if(this._getType(t)!==Nn.undefined){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.void,received:n.parsedType}),Aa}return Of(t.data)}};VC.create=e=>new VC({typeName:ta.ZodVoid,...Ha(e)});let Uv=class zx extends Ka{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Nn.array)return Mn(n,{code:an.invalid_type,expected:Nn.array,received:n.parsedType}),Aa;if(a.exactLength!==null){const o=n.data.length>a.exactLength.value,s=n.data.length<a.exactLength.value;(o||s)&&(Mn(n,{code:o?an.too_big:an.too_small,minimum:s?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(Mn(n,{code:an.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(Mn(n,{code:an.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>a.type._parseAsync(new L0(n,o,n.path,s)))).then(o=>ff.mergeArray(r,o));const i=[...n.data].map((o,s)=>a.type._parseSync(new L0(n,o,n.path,s)));return ff.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new zx({...this._def,minLength:{value:t,message:vr.toString(n)}})}max(t,n){return new zx({...this._def,maxLength:{value:t,message:vr.toString(n)}})}length(t,n){return new zx({...this._def,exactLength:{value:t,message:vr.toString(n)}})}nonempty(t){return this.min(1,t)}};Uv.create=(e,t)=>new Uv({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ta.ZodArray,...Ha(t)});function qy(e){if(e instanceof VA){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=R0.create(qy(r))}return new VA({...e._def,shape:()=>t})}else return e instanceof Uv?new Uv({...e._def,type:qy(e.element)}):e instanceof R0?R0.create(qy(e.unwrap())):e instanceof lm?lm.create(qy(e.unwrap())):e instanceof om?om.create(e.items.map(t=>qy(t))):e}let VA=class B0 extends Ka{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Oi.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Nn.object){const c=this._getOrReturnCtx(t);return Mn(c,{code:an.invalid_type,expected:Nn.object,received:c.parsedType}),Aa}const{status:n,ctx:r}=this._processInputParams(t),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof Fh&&this._def.unknownKeys==="strip"))for(const c in r.data)i.includes(c)||o.push(c);const s=[];for(const c of i){const f=a[c],A=r.data[c];s.push({key:{status:"valid",value:c},value:f._parse(new L0(r,A,r.path,c)),alwaysSet:c in r.data})}if(this._def.catchall instanceof Fh){const c=this._def.unknownKeys;if(c==="passthrough")for(const f of o)s.push({key:{status:"valid",value:f},value:{status:"valid",value:r.data[f]}});else if(c==="strict")o.length>0&&(Mn(r,{code:an.unrecognized_keys,keys:o}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const f of o){const A=r.data[f];s.push({key:{status:"valid",value:f},value:c._parse(new L0(r,A,r.path,f)),alwaysSet:f in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const c=[];for(const f of s){const A=await f.key,h=await f.value;c.push({key:A,value:h,alwaysSet:f.alwaysSet})}return c}).then(c=>ff.mergeObjectSync(n,c)):ff.mergeObjectSync(n,s)}get shape(){return this._def.shape()}strict(t){return vr.errToObj,new B0({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,i,o,s;const c=(o=(i=(a=this._def).errorMap)===null||i===void 0?void 0:i.call(a,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=vr.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new B0({...this._def,unknownKeys:"strip"})}passthrough(){return new B0({...this._def,unknownKeys:"passthrough"})}extend(t){return new B0({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new B0({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ta.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new B0({...this._def,catchall:t})}pick(t){const n={};return Oi.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new B0({...this._def,shape:()=>n})}omit(t){const n={};return Oi.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new B0({...this._def,shape:()=>n})}deepPartial(){return qy(this)}partial(t){const n={};return Oi.objectKeys(this.shape).forEach(r=>{const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}),new B0({...this._def,shape:()=>n})}required(t){const n={};return Oi.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof R0;)a=a._def.innerType;n[r]=a}}),new B0({...this._def,shape:()=>n})}keyof(){return sN(Oi.objectKeys(this.shape))}};VA.create=(e,t)=>new VA({shape:()=>e,unknownKeys:"strip",catchall:Fh.create(),typeName:ta.ZodObject,...Ha(t)}),VA.strictCreate=(e,t)=>new VA({shape:()=>e,unknownKeys:"strict",catchall:Fh.create(),typeName:ta.ZodObject,...Ha(t)}),VA.lazycreate=(e,t)=>new VA({shape:e,unknownKeys:"strip",catchall:Fh.create(),typeName:ta.ZodObject,...Ha(t)});class u7 extends Ka{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=i.map(s=>new Rp(s.ctx.common.issues));return Mn(n,{code:an.invalid_union,unionErrors:o}),Aa}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const c of r){const f={...n,common:{...n.common,issues:[]},parent:null},A=c._parseSync({data:n.data,path:n.path,parent:f});if(A.status==="valid")return A;A.status==="dirty"&&!i&&(i={result:A,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(c=>new Rp(c));return Mn(n,{code:an.invalid_union,unionErrors:s}),Aa}}get options(){return this._def.options}}u7.create=(e,t)=>new u7({options:e,typeName:ta.ZodUnion,...Ha(t)});const im=e=>e instanceof f7?im(e.schema):e instanceof $p?im(e.innerType()):e instanceof d7?[e.value]:e instanceof A7?e.options:e instanceof p7?Oi.objectValues(e.enum):e instanceof h7?im(e._def.innerType):e instanceof l7?[void 0]:e instanceof s7?[null]:e instanceof R0?[void 0,...im(e.unwrap())]:e instanceof lm?[null,...im(e.unwrap())]:e instanceof zS||e instanceof v7?im(e.unwrap()):e instanceof m7?im(e._def.innerType):[];let oN=class Fee extends Ka{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Nn.object)return Mn(n,{code:an.invalid_type,expected:Nn.object,received:n.parsedType}),Aa;const r=this.discriminator,a=n.data[r],i=this.optionsMap.get(a);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(Mn(n,{code:an.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Aa)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const a=new Map;for(const i of n){const o=im(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(a.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);a.set(s,i)}}return new Fee({typeName:ta.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a,...Ha(r)})}};function QS(e,t){const n=rm(e),r=rm(t);if(e===t)return{valid:!0,data:e};if(n===Nn.object&&r===Nn.object){const a=Oi.objectKeys(t),i=Oi.objectKeys(e).filter(s=>a.indexOf(s)!==-1),o={...e,...t};for(const s of i){const c=QS(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(n===Nn.array&&r===Nn.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const o=e[i],s=t[i],c=QS(o,s);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else return n===Nn.date&&r===Nn.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class c7 extends Ka{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,o)=>{if(FS(i)||FS(o))return Aa;const s=QS(i.value,o.value);return s.valid?((VS(i)||VS(o))&&n.dirty(),{status:n.value,value:s.data}):(Mn(r,{code:an.invalid_intersection_types}),Aa)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}c7.create=(e,t,n)=>new c7({left:e,right:t,typeName:ta.ZodIntersection,...Ha(n)});let om=class Vee extends Ka{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Nn.array)return Mn(r,{code:an.invalid_type,expected:Nn.array,received:r.parsedType}),Aa;if(r.data.length<this._def.items.length)return Mn(r,{code:an.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Aa;!this._def.rest&&r.data.length>this._def.items.length&&(Mn(r,{code:an.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((i,o)=>{const s=this._def.items[o]||this._def.rest;return s?s._parse(new L0(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>ff.mergeArray(n,i)):ff.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new Vee({...this._def,rest:t})}};om.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new om({items:e,typeName:ta.ZodTuple,rest:null,...Ha(t)})};let lN=class _I extends Ka{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Nn.object)return Mn(r,{code:an.invalid_type,expected:Nn.object,received:r.parsedType}),Aa;const a=[],i=this._def.keyType,o=this._def.valueType;for(const s in r.data)a.push({key:i._parse(new L0(r,s,r.path,s)),value:o._parse(new L0(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?ff.mergeObjectAsync(n,a):ff.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Ka?new _I({keyType:t,valueType:n,typeName:ta.ZodRecord,...Ha(r)}):new _I({keyType:Np.create(),valueType:t,typeName:ta.ZodRecord,...Ha(n)})}},OC=class extends Ka{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Nn.map)return Mn(r,{code:an.invalid_type,expected:Nn.map,received:r.parsedType}),Aa;const a=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([s,c],f)=>({key:a._parse(new L0(r,s,r.path,[f,"key"])),value:i._parse(new L0(r,c,r.path,[f,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const f=await c.key,A=await c.value;if(f.status==="aborted"||A.status==="aborted")return Aa;(f.status==="dirty"||A.status==="dirty")&&n.dirty(),s.set(f.value,A.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of o){const f=c.key,A=c.value;if(f.status==="aborted"||A.status==="aborted")return Aa;(f.status==="dirty"||A.status==="dirty")&&n.dirty(),s.set(f.value,A.value)}return{status:n.value,value:s}}}};OC.create=(e,t,n)=>new OC({valueType:t,keyType:e,typeName:ta.ZodMap,...Ha(n)});let QC=class PI extends Ka{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Nn.set)return Mn(r,{code:an.invalid_type,expected:Nn.set,received:r.parsedType}),Aa;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(Mn(r,{code:an.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(Mn(r,{code:an.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function o(c){const f=new Set;for(const A of c){if(A.status==="aborted")return Aa;A.status==="dirty"&&n.dirty(),f.add(A.value)}return{status:n.value,value:f}}const s=[...r.data.values()].map((c,f)=>i._parse(new L0(r,c,r.path,f)));return r.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,n){return new PI({...this._def,minSize:{value:t,message:vr.toString(n)}})}max(t,n){return new PI({...this._def,maxSize:{value:t,message:vr.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};QC.create=(e,t)=>new QC({valueType:e,minSize:null,maxSize:null,typeName:ta.ZodSet,...Ha(t)});class e3 extends Ka{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Nn.function)return Mn(n,{code:an.invalid_type,expected:Nn.function,received:n.parsedType}),Aa;function r(s,c){return RC({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,LC(),Zy].filter(f=>!!f),issueData:{code:an.invalid_arguments,argumentsError:c}})}function a(s,c){return RC({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,LC(),Zy].filter(f=>!!f),issueData:{code:an.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof t3){const s=this;return Of(async function(...c){const f=new Rp([]),A=await s._def.args.parseAsync(c,i).catch(m=>{throw f.addIssue(r(c,m)),f}),h=await Reflect.apply(o,this,A);return await s._def.returns._def.type.parseAsync(h,i).catch(m=>{throw f.addIssue(a(h,m)),f})})}else{const s=this;return Of(function(...c){const f=s._def.args.safeParse(c,i);if(!f.success)throw new Rp([r(c,f.error)]);const A=Reflect.apply(o,this,f.data),h=s._def.returns.safeParse(A,i);if(!h.success)throw new Rp([a(A,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e3({...this._def,args:om.create(t).rest(zv.create())})}returns(t){return new e3({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e3({args:t||om.create([]).rest(zv.create()),returns:n||zv.create(),typeName:ta.ZodFunction,...Ha(r)})}}class f7 extends Ka{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}f7.create=(e,t)=>new f7({getter:e,typeName:ta.ZodLazy,...Ha(t)});class d7 extends Ka{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Mn(n,{received:n.data,code:an.invalid_literal,expected:this._def.value}),Aa}return{status:"valid",value:t.data}}get value(){return this._def.value}}d7.create=(e,t)=>new d7({value:e,typeName:ta.ZodLiteral,...Ha(t)});function sN(e,t){return new A7({values:e,typeName:ta.ZodEnum,...Ha(t)})}let A7=class MI extends Ka{constructor(){super(...arguments),n7.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Mn(n,{expected:Oi.joinValues(r),received:n.parsedType,code:an.invalid_type}),Aa}if($C(this,n7)||tN(this,n7,new Set(this._def.values)),!$C(this,n7).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Mn(n,{received:n.data,code:an.invalid_enum_value,options:r}),Aa}return Of(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return MI.create(t,{...this._def,...n})}exclude(t,n=this._def){return MI.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}};n7=new WeakMap,A7.create=sN;let p7=class extends Ka{constructor(){super(...arguments),r7.set(this,void 0)}_parse(t){const n=Oi.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Nn.string&&r.parsedType!==Nn.number){const a=Oi.objectValues(n);return Mn(r,{expected:Oi.joinValues(a),received:r.parsedType,code:an.invalid_type}),Aa}if($C(this,r7)||tN(this,r7,new Set(Oi.getValidEnumValues(this._def.values))),!$C(this,r7).has(t.data)){const a=Oi.objectValues(n);return Mn(r,{received:r.data,code:an.invalid_enum_value,options:a}),Aa}return Of(t.data)}get enum(){return this._def.values}};r7=new WeakMap,p7.create=(e,t)=>new p7({values:e,typeName:ta.ZodNativeEnum,...Ha(t)});class t3 extends Ka{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Nn.promise&&n.common.async===!1)return Mn(n,{code:an.invalid_type,expected:Nn.promise,received:n.parsedType}),Aa;const r=n.parsedType===Nn.promise?n.data:Promise.resolve(n.data);return Of(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}t3.create=(e,t)=>new t3({type:e,typeName:ta.ZodPromise,...Ha(t)});class $p extends Ka{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ta.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:o=>{Mn(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Aa;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?Aa:c.status==="dirty"||n.value==="dirty"?NC(c.value):c});{if(n.value==="aborted")return Aa;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Aa:s.status==="dirty"||n.value==="dirty"?NC(s.value):s}}if(a.type==="refinement"){const o=s=>{const c=a.refinement(s,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Aa:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Aa:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(a.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!e7(o))return o;const s=a.transform(o.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>e7(o)?Promise.resolve(a.transform(o.value,i)).then(s=>({status:n.value,value:s})):o);Oi.assertNever(a)}}$p.create=(e,t,n)=>new $p({schema:e,typeName:ta.ZodEffects,effect:t,...Ha(n)}),$p.createWithPreprocess=(e,t,n)=>new $p({schema:t,effect:{type:"preprocess",transform:e},typeName:ta.ZodEffects,...Ha(n)});let R0=class extends Ka{_parse(t){return this._getType(t)===Nn.undefined?Of(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};R0.create=(e,t)=>new R0({innerType:e,typeName:ta.ZodOptional,...Ha(t)});let lm=class extends Ka{_parse(t){return this._getType(t)===Nn.null?Of(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};lm.create=(e,t)=>new lm({innerType:e,typeName:ta.ZodNullable,...Ha(t)});let h7=class extends Ka{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Nn.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};h7.create=(e,t)=>new h7({innerType:e,typeName:ta.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ha(t)});let m7=class extends Ka{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return t7(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Rp(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Rp(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};m7.create=(e,t)=>new m7({innerType:e,typeName:ta.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ha(t)});class zC extends Ka{_parse(t){if(this._getType(t)!==Nn.nan){const n=this._getOrReturnCtx(t);return Mn(n,{code:an.invalid_type,expected:Nn.nan,received:n.parsedType}),Aa}return{status:"valid",value:t.data}}}zC.create=e=>new zC({typeName:ta.ZodNaN,...Ha(e)});const _ue=Symbol("zod_brand");let zS=class extends Ka{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},US=class Oee extends Ka{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Aa:a.status==="dirty"?(n.dirty(),NC(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Aa:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new Oee({in:t,out:n,typeName:ta.ZodPipeline})}},v7=class extends Ka{_parse(t){const n=this._def.innerType._parse(t),r=a=>(e7(a)&&(a.value=Object.freeze(a.value)),a);return t7(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}};v7.create=(e,t)=>new v7({innerType:e,typeName:ta.ZodReadonly,...Ha(t)});function uN(e,t={},n){return e?Jy.create().superRefine((r,a)=>{var i,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(i=s.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,f=typeof s=="string"?{message:s}:s;a.addIssue({code:"custom",...f,fatal:c})}}):Jy.create()}const Pue={object:VA.lazycreate};var ta;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ta||(ta={}));const Mue=(e,t={message:`Input not instance of ${e.name}`})=>uN(n=>n instanceof e,t),cN=Np.create,fN=a7.create,Due=zC.create,Hue=am.create,dN=i7.create,Iue=o7.create,Lue=FC.create,Rue=l7.create,Nue=s7.create,$ue=Jy.create,Fue=zv.create,Vue=Fh.create,Oue=VC.create,Que=Uv.create,zue=VA.create,Uue=VA.strictCreate,jue=u7.create,Gue=oN.create,Yue=c7.create,Wue=om.create,Xue=lN.create,Kue=OC.create,Zue=QC.create,Jue=e3.create,que=f7.create,ece=d7.create,tce=A7.create,nce=p7.create,rce=t3.create,AN=$p.create,ace=R0.create,ice=lm.create,oce=$p.createWithPreprocess,lce=US.create;var Di=Object.freeze({__proto__:null,defaultErrorMap:Zy,setErrorMap:due,getErrorMap:LC,makeIssue:RC,EMPTY_PATH:Aue,addIssueToContext:Mn,ParseStatus:ff,INVALID:Aa,DIRTY:NC,OK:Of,isAborted:FS,isDirty:VS,isValid:e7,isAsync:t7,get util(){return Oi},get objectUtil(){return $S},ZodParsedType:Nn,getParsedType:rm,ZodType:Ka,datetimeRegex:iN,ZodString:Np,ZodNumber:a7,ZodBigInt:am,ZodBoolean:i7,ZodDate:o7,ZodSymbol:FC,ZodUndefined:l7,ZodNull:s7,ZodAny:Jy,ZodUnknown:zv,ZodNever:Fh,ZodVoid:VC,ZodArray:Uv,ZodObject:VA,ZodUnion:u7,ZodDiscriminatedUnion:oN,ZodIntersection:c7,ZodTuple:om,ZodRecord:lN,ZodMap:OC,ZodSet:QC,ZodFunction:e3,ZodLazy:f7,ZodLiteral:d7,ZodEnum:A7,ZodNativeEnum:p7,ZodPromise:t3,ZodEffects:$p,ZodTransformer:$p,ZodOptional:R0,ZodNullable:lm,ZodDefault:h7,ZodCatch:m7,ZodNaN:zC,BRAND:_ue,ZodBranded:zS,ZodPipeline:US,ZodReadonly:v7,custom:uN,Schema:Ka,ZodSchema:Ka,late:Pue,get ZodFirstPartyTypeKind(){return ta},coerce:{string:e=>Np.create({...e,coerce:!0}),number:e=>a7.create({...e,coerce:!0}),boolean:e=>i7.create({...e,coerce:!0}),bigint:e=>am.create({...e,coerce:!0}),date:e=>o7.create({...e,coerce:!0})},any:$ue,array:Que,bigint:Hue,boolean:dN,date:Iue,discriminatedUnion:Gue,effect:AN,enum:tce,function:Jue,instanceof:Mue,intersection:Yue,lazy:que,literal:ece,map:Kue,nan:Due,nativeEnum:nce,never:Vue,null:Nue,nullable:ice,number:fN,object:zue,oboolean:()=>dN().optional(),onumber:()=>fN().optional(),optional:ace,ostring:()=>cN().optional(),pipeline:lce,preprocess:oce,promise:rce,record:Xue,set:Zue,strictObject:Uue,string:cN,symbol:Lue,transformer:AN,tuple:Wue,undefined:Rue,union:jue,unknown:Fue,void:Oue,NEVER:Aa,ZodIssueCode:an,quotelessJson:fue,ZodError:Rp});Di.object({__isRef:Di.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Di.string().describe("Upstream block id"),name:Di.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:Di.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").readonly(),Di.string().length(24).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");var pN={exports:{}};(function(e,t){t=e.exports=n,t.getSerialize=r;function n(a,i,o,s){return JSON.stringify(a,r(i,s),o)}function r(a,i){var o=[],s=[];return i==null&&(i=function(c,f){return o[0]===f?"[Circular ~]":"[Circular ~."+s.slice(0,o.indexOf(f)).join(".")+"]"}),function(c,f){if(o.length>0){var A=o.indexOf(this);~A?o.splice(A+1):o.push(this),~A?s.splice(A,1/0,c):s.push(c),~o.indexOf(f)&&(f=i.call(this,c,f))}else o.push(f);return a==null?f:a.call(this,c,f)}}})(pN,pN.exports);const sce=Di.object({type:Di.literal("PlError"),name:Di.string(),message:Di.string(),fullMessage:Di.string().optional(),stack:Di.string().optional()}),uce=sce.extend({cause:Di.lazy(()=>UC).optional(),errors:Di.lazy(()=>UC.array()).optional()}),cce=Di.object({type:Di.literal("StandardError"),name:Di.string(),message:Di.string(),stack:Di.string().optional()}),fce=cce.extend({cause:Di.lazy(()=>UC).optional(),errors:Di.lazy(()=>UC.array()).optional()}),UC=Di.union([fce,uce]),dce=Di.object({name:Di.string(),message:Di.string(),fullMessage:Di.string().optional(),stack:Di.string().optional()}),hN=dce.extend({cause:Di.lazy(()=>hN).optional(),errors:Di.lazy(()=>hN.array()).optional()}),Ace=Di.object({type:Di.string(),importance:Di.number().optional(),id:Di.string().optional(),label:Di.string()});Di.array(Ace);function mN(e,t,n){const r=d.ref(0),a=d.reactive({loading:d.computed(()=>r.value>0),loadingRef:r,value:void 0,error:void 0}),i=nse(t);return d.watch(e,async o=>{a.error=void 0,r.value++,i(o).then(s=>{s.ok&&(a.value=s.value)}).catch(s=>{a.value=void 0,a.error=s}).finally(()=>{r.value--})},Object.assign({immediate:!0,deep:!0},{})),a}const pce=["tabindex"],hce={class:"pl-autocomplete__container"},mce={class:"pl-autocomplete__field"},vce=["disabled","placeholder"],gce={key:0,class:"input-value"},yce={class:"pl-autocomplete__controls"},wce={key:2,class:"arrow-icon arrow-icon-default"},Cce={key:0},bce={key:0,class:"required-icon"},Ece={key:0,class:"nothing-found"},xce={key:0,class:"pl-autocomplete__error"},Sce={key:1,class:"pl-autocomplete__helper"},Bce={key:2,class:"pl-autocomplete__helper"},kce={name:"PlAutocomplete"},jC=d.defineComponent({...kce,props:d.mergeModels({optionsSearch:{},modelSearch:{type:Function,default:void 0},label:{default:""},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"},formatValue:{type:Function,default:e=>String(e)}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=d.useModel(e,"modelValue"),n=e,r=d.useSlots(),a=d.ref(),i=d.ref(),o=d.useTemplateRef("overlay"),s=d.ref(null),c=d.reactive({activeIndex:-1,open:!1}),f=()=>XR(g.value.findIndex(me=>Ky(me.value,t.value)),me=>me<0?0:me),A=()=>c.activeIndex=f(),h=d.ref([]),m=d.ref(),g=d.computed(()=>GR(h.value).map((me,ae)=>({...me,index:ae,isSelected:ae===k.value,isActive:ae===c.activeIndex}))),b=d.ref(!0),C=d.ref(!1),x=d.computed(()=>n.disabled),k=d.computed(()=>h.value.findIndex(me=>Ky(me.value,t.value))),_=d.computed(()=>{if(!b.value){if(n.error)return n.error;if(C.value)return"Data loading error"}}),D=d.computed(()=>{const me=d.unref(m),ae=d.unref(g),ye=me??ae.find(Ce=>Ky(Ce.value,t.value))??ae.find(Ce=>Ky(Ce.value,t.value));return(ye==null?void 0:ye.label)||(t.value?n.formatValue(t.value):"")}),O=d.computed(()=>!c.open&&t.value?"":t.value?String(D.value):n.placeholder),I=d.computed(()=>t.value!==void 0&&t.value!==null),$=d.computed(()=>x.value?void 0:"0"),Q=me=>{var ae;t.value=me==null?void 0:me.value,m.value=me,s.value=null,c.open=!1,(ae=a==null?void 0:a.value)==null||ae.focus()},ee=()=>{t.value=void 0,m.value=void 0},K=()=>{var me;return(me=i.value)==null?void 0:me.focus()},re=()=>{c.open=!c.open};d.watch(()=>c.open,me=>{s.value=me?"":null});const U=()=>{c.open=!0},G=me=>{var ae,ye,Ce;const ce=me.relatedTarget;!((ae=a.value)!=null&&ae.contains(ce))&&!((Ce=(ye=o.value)==null?void 0:ye.listRef)!=null&&Ce.contains(ce))&&(s.value=null,c.open=!1)},Z=me=>{var ae;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(me.code))me.preventDefault();else return;const{open:ye,activeIndex:Ce}=c;if(!ye){me.code==="Enter"&&(c.open=!0,s.value="");return}me.code==="Escape"&&(c.open=!1,s.value=null,(ae=a.value)==null||ae.focus());const ce=d.unref(g),{length:ge}=ce;if(!ge)return;me.code==="Enter"&&Q(ce.find(Oe=>Oe.index===Ce));const ze=ce.findIndex(Oe=>Oe.index===Ce)??-1,Ne=me.code==="ArrowDown"?1:me.code==="ArrowUp"?-1:0,Ge=Math.abs(ze+Ne+ge)%ge;c.activeIndex=g.value[Ge].index??-1};Zse(a),d.watch(()=>t.value,A,{immediate:!0}),d.watch(()=>c.open,me=>{var ae;return me?(ae=i.value)==null?void 0:ae.focus():""}),d.watchPostEffect(()=>{var me;s.value,c.activeIndex>=0&&c.open&&((me=o.value)==null||me.scrollIntoActive())});const Y=cue(s,300,{maxWait:1e3}),X=mN(()=>Y.value,async me=>me!==null?n.optionsSearch(me):[]),oe=mN(()=>t.value,async me=>{var ae,ye;return me&&!Ky((ae=m.value)==null?void 0:ae.value,me)?n.modelSearch?n.modelSearch(me):(ye=await n.optionsSearch(String(me)))==null?void 0:ye[0]:m.value});return d.watch(()=>X.value,me=>{me&&(h.value=me,s.value!==null&&(C.value=!1))}),d.watch(()=>oe.value,me=>{me&&(m.value=GR([me])[0])}),d.watch(()=>X.error,me=>{me&&(C.value=!!me)}),d.watch(()=>X.loading||oe.loading,me=>{b.value=me}),(me,ae)=>(d.openBlock(),d.createElementBlock("div",{class:"pl-autocomplete__envelope",onClick:d.withModifiers(K,["stop"])},[d.createElementVNode("div",{ref_key:"rootRef",ref:a,tabindex:$.value,class:d.normalizeClass(["pl-autocomplete",{open:c.open,error:!!_.value,disabled:x.value}]),onKeydown:Z,onFocusout:G},[d.createElementVNode("div",hce,[d.createElementVNode("div",mce,[d.withDirectives(d.createElementVNode("input",{ref_key:"input",ref:i,"onUpdate:modelValue":ae[0]||(ae[0]=ye=>s.value=ye),type:"text",tabindex:"-1",disabled:x.value,placeholder:O.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:U},null,40,vce),[[d.vModelText,s.value]]),ae[4]||(ae[4]=d.createTextVNode()),c.open?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",gce,[d.createVNode(nue,null,{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(D.value),1)]),_:1})])),ae[5]||(ae[5]=d.createTextVNode()),d.createElementVNode("div",yce,[b.value?(d.openBlock(),d.createBlock(d.unref(Hse),{key:0,name:"loading"})):d.createCommentVNode("",!0),ae[1]||(ae[1]=d.createTextVNode()),me.clearable&&I.value?(d.openBlock(),d.createBlock(d.unref(q5),{key:1,name:"delete-clear",onClick:d.withModifiers(ee,["stop"])})):d.createCommentVNode("",!0),ae[2]||(ae[2]=d.createTextVNode()),d.renderSlot(me.$slots,"append"),ae[3]||(ae[3]=d.createTextVNode()),d.createElementVNode("div",{class:"pl-autocomplete__arrow-wrapper",onClick:d.withModifiers(re,["stop"])},[me.arrowIconLarge?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["arrow-icon",[`icon-24 ${me.arrowIconLarge}`]])},null,2)):me.arrowIcon?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["arrow-icon",[`icon-16 ${me.arrowIcon}`]])},null,2)):(d.openBlock(),d.createElementBlock("div",wce))])])]),ae[9]||(ae[9]=d.createTextVNode()),me.label?(d.openBlock(),d.createElementBlock("label",Cce,[me.required?(d.openBlock(),d.createElementBlock("i",bce)):d.createCommentVNode("",!0),ae[6]||(ae[6]=d.createTextVNode()),d.createElementVNode("span",null,d.toDisplayString(me.label),1),ae[7]||(ae[7]=d.createTextVNode()),d.unref(r).tooltip?(d.openBlock(),d.createBlock(d.unref(Qse),{key:1,class:"info",position:"top"},{tooltip:d.withCtx(()=>[d.renderSlot(me.$slots,"tooltip")]),_:3})):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),ae[10]||(ae[10]=d.createTextVNode()),c.open?(d.openBlock(),d.createBlock(d.unref(oue),{key:1,ref:"overlay",root:a.value,class:"pl-autocomplete__options",tabindex:"-1",gap:3},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(g.value,(ye,Ce)=>(d.openBlock(),d.createBlock(vse,{key:Ce,option:ye,"is-selected":ye.isSelected,"is-hovered":ye.isActive,size:me.optionSize,onClick:d.withModifiers(ce=>Q(ye),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),ae[8]||(ae[8]=d.createTextVNode()),g.value.length?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Ece,"Nothing found"))]),_:1},8,["root"])):d.createCommentVNode("",!0),ae[11]||(ae[11]=d.createTextVNode()),d.createVNode(Gse,{class:"pl-autocomplete__contour"})])],42,pce),ae[12]||(ae[12]=d.createTextVNode()),_.value?(d.openBlock(),d.createElementBlock("div",xce,d.toDisplayString(_.value),1)):b.value&&me.loadingOptionsHelper?(d.openBlock(),d.createElementBlock("div",Sce,d.toDisplayString(me.loadingOptionsHelper),1)):me.helper?(d.openBlock(),d.createElementBlock("div",Bce,d.toDisplayString(me.helper),1)):d.createCommentVNode("",!0)]))}});function GC(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Tce(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function vN(e){let t,n,r;e.length!==2?(t=GC,n=(s,c)=>GC(e(s),c),r=(s,c)=>e(s)-c):(t=e===GC||e===Tce?e:_ce,n=e,r=e);function a(s,c,f=0,A=s.length){if(f<A){if(t(c,c)!==0)return A;do{const h=f+A>>>1;n(s[h],c)<0?f=h+1:A=h}while(f<A)}return f}function i(s,c,f=0,A=s.length){if(f<A){if(t(c,c)!==0)return A;do{const h=f+A>>>1;n(s[h],c)<=0?f=h+1:A=h}while(f<A)}return f}function o(s,c,f=0,A=s.length){const h=a(s,c,f,A-1);return h>f&&r(s[h-1],c)>-r(s[h],c)?h-1:h}return{left:a,center:o,right:i}}function _ce(){return 0}function Pce(e){return e===null?NaN:+e}vN(GC),vN(Pce).center;var Mce={value:()=>{}};function gN(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new YC(n)}function YC(e){this._=e}function Dce(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}YC.prototype=gN.prototype={constructor:YC,on:function(e,t){var n=this._,r=Dce(e+"",n),a,i=-1,o=r.length;if(arguments.length<2){for(;++i<o;)if((a=(e=r[i]).type)&&(a=Hce(n[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<o;)if(a=(e=r[i]).type)n[a]=yN(n[a],e.name,t);else if(t==null)for(a in n)n[a]=yN(n[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new YC(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,i;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,a=i.length;r<a;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],a=0,i=r.length;a<i;++a)r[a].value.apply(t,n)}};function Hce(e,t){for(var n=0,r=e.length,a;n<r;++n)if((a=e[n]).name===t)return a.value}function yN(e,t,n){for(var r=0,a=e.length;r<a;++r)if(e[r].name===t){e[r]=Mce,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var jS="http://www.w3.org/1999/xhtml";const wN={svg:"http://www.w3.org/2000/svg",xhtml:jS,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function WC(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),wN.hasOwnProperty(t)?{space:wN[t],local:e}:e}function Ice(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===jS&&t.documentElement.namespaceURI===jS?t.createElement(e):t.createElementNS(n,e)}}function Lce(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function CN(e){var t=WC(e);return(t.local?Lce:Ice)(t)}function Rce(){}function GS(e){return e==null?Rce:function(){return this.querySelector(e)}}function Nce(e){typeof e!="function"&&(e=GS(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],o=i.length,s=r[a]=new Array(o),c,f,A=0;A<o;++A)(c=i[A])&&(f=e.call(c,c.__data__,A,i))&&("__data__"in c&&(f.__data__=c.__data__),s[A]=f);return new Fp(r,this._parents)}function $ce(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Fce(){return[]}function bN(e){return e==null?Fce:function(){return this.querySelectorAll(e)}}function Vce(e){return function(){return $ce(e.apply(this,arguments))}}function Oce(e){typeof e=="function"?e=Vce(e):e=bN(e);for(var t=this._groups,n=t.length,r=[],a=[],i=0;i<n;++i)for(var o=t[i],s=o.length,c,f=0;f<s;++f)(c=o[f])&&(r.push(e.call(c,c.__data__,f,o)),a.push(c));return new Fp(r,a)}function EN(e){return function(){return this.matches(e)}}function xN(e){return function(t){return t.matches(e)}}var Qce=Array.prototype.find;function zce(e){return function(){return Qce.call(this.children,e)}}function Uce(){return this.firstElementChild}function jce(e){return this.select(e==null?Uce:zce(typeof e=="function"?e:xN(e)))}var Gce=Array.prototype.filter;function Yce(){return Array.from(this.children)}function Wce(e){return function(){return Gce.call(this.children,e)}}function Xce(e){return this.selectAll(e==null?Yce:Wce(typeof e=="function"?e:xN(e)))}function Kce(e){typeof e!="function"&&(e=EN(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],o=i.length,s=r[a]=[],c,f=0;f<o;++f)(c=i[f])&&e.call(c,c.__data__,f,i)&&s.push(c);return new Fp(r,this._parents)}function SN(e){return new Array(e.length)}function Zce(){return new Fp(this._enter||this._groups.map(SN),this._parents)}function XC(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}XC.prototype={constructor:XC,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Jce(e){return function(){return e}}function qce(e,t,n,r,a,i){for(var o=0,s,c=t.length,f=i.length;o<f;++o)(s=t[o])?(s.__data__=i[o],r[o]=s):n[o]=new XC(e,i[o]);for(;o<c;++o)(s=t[o])&&(a[o]=s)}function efe(e,t,n,r,a,i,o){var s,c,f=new Map,A=t.length,h=i.length,m=new Array(A),g;for(s=0;s<A;++s)(c=t[s])&&(m[s]=g=o.call(c,c.__data__,s,t)+"",f.has(g)?a[s]=c:f.set(g,c));for(s=0;s<h;++s)g=o.call(e,i[s],s,i)+"",(c=f.get(g))?(r[s]=c,c.__data__=i[s],f.delete(g)):n[s]=new XC(e,i[s]);for(s=0;s<A;++s)(c=t[s])&&f.get(m[s])===c&&(a[s]=c)}function tfe(e){return e.__data__}function nfe(e,t){if(!arguments.length)return Array.from(this,tfe);var n=t?efe:qce,r=this._parents,a=this._groups;typeof e!="function"&&(e=Jce(e));for(var i=a.length,o=new Array(i),s=new Array(i),c=new Array(i),f=0;f<i;++f){var A=r[f],h=a[f],m=h.length,g=rfe(e.call(A,A&&A.__data__,f,r)),b=g.length,C=s[f]=new Array(b),x=o[f]=new Array(b),k=c[f]=new Array(m);n(A,h,C,x,k,g,t);for(var _=0,D=0,O,I;_<b;++_)if(O=C[_]){for(_>=D&&(D=_+1);!(I=x[D])&&++D<b;);O._next=I||null}}return o=new Fp(o,r),o._enter=s,o._exit=c,o}function rfe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function afe(){return new Fp(this._exit||this._groups.map(SN),this._parents)}function ife(e,t,n){var r=this.enter(),a=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),n==null?i.remove():n(i),r&&a?r.merge(a).order():a}function ofe(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,a=n.length,i=r.length,o=Math.min(a,i),s=new Array(a),c=0;c<o;++c)for(var f=n[c],A=r[c],h=f.length,m=s[c]=new Array(h),g,b=0;b<h;++b)(g=f[b]||A[b])&&(m[b]=g);for(;c<a;++c)s[c]=n[c];return new Fp(s,this._parents)}function lfe(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],a=r.length-1,i=r[a],o;--a>=0;)(o=r[a])&&(i&&o.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(o,i),i=o);return this}function sfe(e){e||(e=ufe);function t(h,m){return h&&m?e(h.__data__,m.__data__):!h-!m}for(var n=this._groups,r=n.length,a=new Array(r),i=0;i<r;++i){for(var o=n[i],s=o.length,c=a[i]=new Array(s),f,A=0;A<s;++A)(f=o[A])&&(c[A]=f);c.sort(t)}return new Fp(a,this._parents).order()}function ufe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function cfe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ffe(){return Array.from(this)}function dfe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length;a<i;++a){var o=r[a];if(o)return o}return null}function Afe(){let e=0;for(const t of this)++e;return e}function pfe(){return!this.node()}function hfe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a=t[n],i=0,o=a.length,s;i<o;++i)(s=a[i])&&e.call(s,s.__data__,i,a);return this}function mfe(e){return function(){this.removeAttribute(e)}}function vfe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gfe(e,t){return function(){this.setAttribute(e,t)}}function yfe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function wfe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Cfe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function bfe(e,t){var n=WC(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?vfe:mfe:typeof t=="function"?n.local?Cfe:wfe:n.local?yfe:gfe)(n,t))}function BN(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Efe(e){return function(){this.style.removeProperty(e)}}function xfe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Sfe(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Bfe(e,t,n){return arguments.length>1?this.each((t==null?Efe:typeof t=="function"?Sfe:xfe)(e,t,n??"")):n3(this.node(),e)}function n3(e,t){return e.style.getPropertyValue(t)||BN(e).getComputedStyle(e,null).getPropertyValue(t)}function kfe(e){return function(){delete this[e]}}function Tfe(e,t){return function(){this[e]=t}}function _fe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Pfe(e,t){return arguments.length>1?this.each((t==null?kfe:typeof t=="function"?_fe:Tfe)(e,t)):this.node()[e]}function kN(e){return e.trim().split(/^|\s+/)}function YS(e){return e.classList||new TN(e)}function TN(e){this._node=e,this._names=kN(e.getAttribute("class")||"")}TN.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function _N(e,t){for(var n=YS(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function PN(e,t){for(var n=YS(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function Mfe(e){return function(){_N(this,e)}}function Dfe(e){return function(){PN(this,e)}}function Hfe(e,t){return function(){(t.apply(this,arguments)?_N:PN)(this,e)}}function Ife(e,t){var n=kN(e+"");if(arguments.length<2){for(var r=YS(this.node()),a=-1,i=n.length;++a<i;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof t=="function"?Hfe:t?Mfe:Dfe)(n,t))}function Lfe(){this.textContent=""}function Rfe(e){return function(){this.textContent=e}}function Nfe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function $fe(e){return arguments.length?this.each(e==null?Lfe:(typeof e=="function"?Nfe:Rfe)(e)):this.node().textContent}function Ffe(){this.innerHTML=""}function Vfe(e){return function(){this.innerHTML=e}}function Ofe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Qfe(e){return arguments.length?this.each(e==null?Ffe:(typeof e=="function"?Ofe:Vfe)(e)):this.node().innerHTML}function zfe(){this.nextSibling&&this.parentNode.appendChild(this)}function Ufe(){return this.each(zfe)}function jfe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Gfe(){return this.each(jfe)}function Yfe(e){var t=typeof e=="function"?e:CN(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Wfe(){return null}function Xfe(e,t){var n=typeof e=="function"?e:CN(e),r=t==null?Wfe:typeof t=="function"?t:GS(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Kfe(){var e=this.parentNode;e&&e.removeChild(this)}function Zfe(){return this.each(Kfe)}function Jfe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function qfe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ede(e){return this.select(e?qfe:Jfe)}function tde(e){return arguments.length?this.property("__data__",e):this.node().__data__}function nde(e){return function(t){e.call(this,t,this.__data__)}}function rde(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function ade(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,a=t.length,i;n<a;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function ide(e,t,n){return function(){var r=this.__on,a,i=nde(t);if(r){for(var o=0,s=r.length;o<s;++o)if((a=r[o]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=n),a.value=t;return}}this.addEventListener(e.type,i,n),a={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(a):this.__on=[a]}}function ode(e,t,n){var r=rde(e+""),a,i=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,f=s.length,A;c<f;++c)for(a=0,A=s[c];a<i;++a)if((o=r[a]).type===A.type&&o.name===A.name)return A.value}return}for(s=t?ide:ade,a=0;a<i;++a)this.each(s(r[a],t,n));return this}function MN(e,t,n){var r=BN(e),a=r.CustomEvent;typeof a=="function"?a=new a(t,n):(a=r.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function lde(e,t){return function(){return MN(this,e,t)}}function sde(e,t){return function(){return MN(this,e,t.apply(this,arguments))}}function ude(e,t){return this.each((typeof t=="function"?sde:lde)(e,t))}function*cde(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length,o;a<i;++a)(o=r[a])&&(yield o)}var fde=[null];function Fp(e,t){this._groups=e,this._parents=t}function g7(){return new Fp([[document.documentElement]],fde)}function dde(){return this}Fp.prototype=g7.prototype={constructor:Fp,select:Nce,selectAll:Oce,selectChild:jce,selectChildren:Xce,filter:Kce,data:nfe,enter:Zce,exit:afe,join:ife,merge:ofe,selection:dde,order:lfe,sort:sfe,call:cfe,nodes:ffe,node:dfe,size:Afe,empty:pfe,each:hfe,attr:bfe,style:Bfe,property:Pfe,classed:Ife,text:$fe,html:Qfe,raise:Ufe,lower:Gfe,append:Yfe,insert:Xfe,remove:Zfe,clone:ede,datum:tde,on:ode,dispatch:ude,[Symbol.iterator]:cde};function WS(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function DN(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function y7(){}var w7=.7,KC=1/w7,r3="\\s*([+-]?\\d+)\\s*",C7="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",N0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ade=/^#([0-9a-f]{3,8})$/,pde=new RegExp(`^rgb\\(${r3},${r3},${r3}\\)$`),hde=new RegExp(`^rgb\\(${N0},${N0},${N0}\\)$`),mde=new RegExp(`^rgba\\(${r3},${r3},${r3},${C7}\\)$`),vde=new RegExp(`^rgba\\(${N0},${N0},${N0},${C7}\\)$`),gde=new RegExp(`^hsl\\(${C7},${N0},${N0}\\)$`),yde=new RegExp(`^hsla\\(${C7},${N0},${N0},${C7}\\)$`),HN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};WS(y7,b7,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:IN,formatHex:IN,formatHex8:wde,formatHsl:Cde,formatRgb:LN,toString:LN});function IN(){return this.rgb().formatHex()}function wde(){return this.rgb().formatHex8()}function Cde(){return VN(this).formatHsl()}function LN(){return this.rgb().formatRgb()}function b7(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ade.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?RN(t):n===3?new Dd(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ZC(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ZC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=pde.exec(e))?new Dd(t[1],t[2],t[3],1):(t=hde.exec(e))?new Dd(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=mde.exec(e))?ZC(t[1],t[2],t[3],t[4]):(t=vde.exec(e))?ZC(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=gde.exec(e))?FN(t[1],t[2]/100,t[3]/100,1):(t=yde.exec(e))?FN(t[1],t[2]/100,t[3]/100,t[4]):HN.hasOwnProperty(e)?RN(HN[e]):e==="transparent"?new Dd(NaN,NaN,NaN,0):null}function RN(e){return new Dd(e>>16&255,e>>8&255,e&255,1)}function ZC(e,t,n,r){return r<=0&&(e=t=n=NaN),new Dd(e,t,n,r)}function bde(e){return e instanceof y7||(e=b7(e)),e?(e=e.rgb(),new Dd(e.r,e.g,e.b,e.opacity)):new Dd}function XS(e,t,n,r){return arguments.length===1?bde(e):new Dd(e,t,n,r??1)}function Dd(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}WS(Dd,XS,DN(y7,{brighter(e){return e=e==null?KC:Math.pow(KC,e),new Dd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?w7:Math.pow(w7,e),new Dd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Dd(jv(this.r),jv(this.g),jv(this.b),JC(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:NN,formatHex:NN,formatHex8:Ede,formatRgb:$N,toString:$N}));function NN(){return`#${Gv(this.r)}${Gv(this.g)}${Gv(this.b)}`}function Ede(){return`#${Gv(this.r)}${Gv(this.g)}${Gv(this.b)}${Gv((isNaN(this.opacity)?1:this.opacity)*255)}`}function $N(){const e=JC(this.opacity);return`${e===1?"rgb(":"rgba("}${jv(this.r)}, ${jv(this.g)}, ${jv(this.b)}${e===1?")":`, ${e})`}`}function JC(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function jv(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Gv(e){return e=jv(e),(e<16?"0":"")+e.toString(16)}function FN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Vp(e,t,n,r)}function VN(e){if(e instanceof Vp)return new Vp(e.h,e.s,e.l,e.opacity);if(e instanceof y7||(e=b7(e)),!e)return new Vp;if(e instanceof Vp)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,s=i-a,c=(i+a)/2;return s?(t===i?o=(n-r)/s+(n<r)*6:n===i?o=(r-t)/s+2:o=(t-n)/s+4,s/=c<.5?i+a:2-i-a,o*=60):s=c>0&&c<1?0:o,new Vp(o,s,c,e.opacity)}function xde(e,t,n,r){return arguments.length===1?VN(e):new Vp(e,t,n,r??1)}function Vp(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}WS(Vp,xde,DN(y7,{brighter(e){return e=e==null?KC:Math.pow(KC,e),new Vp(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?w7:Math.pow(w7,e),new Vp(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Dd(KS(e>=240?e-240:e+120,a,r),KS(e,a,r),KS(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Vp(ON(this.h),qC(this.s),qC(this.l),JC(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=JC(this.opacity);return`${e===1?"hsl(":"hsla("}${ON(this.h)}, ${qC(this.s)*100}%, ${qC(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ON(e){return e=(e||0)%360,e<0?e+360:e}function qC(e){return Math.max(0,Math.min(1,e||0))}function KS(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const QN=e=>()=>e;function Sde(e,t){return function(n){return e+n*t}}function Bde(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function kde(e){return(e=+e)==1?zN:function(t,n){return n-t?Bde(t,n,e):QN(isNaN(t)?n:t)}}function zN(e,t){var n=t-e;return n?Sde(e,n):QN(isNaN(e)?t:e)}const UN=function e(t){var n=kde(t);function r(a,i){var o=n((a=XS(a)).r,(i=XS(i)).r),s=n(a.g,i.g),c=n(a.b,i.b),f=zN(a.opacity,i.opacity);return function(A){return a.r=o(A),a.g=s(A),a.b=c(A),a.opacity=f(A),a+""}}return r.gamma=e,r}(1);function sm(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var ZS=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,JS=new RegExp(ZS.source,"g");function Tde(e){return function(){return e}}function _de(e){return function(t){return e(t)+""}}function Pde(e,t){var n=ZS.lastIndex=JS.lastIndex=0,r,a,i,o=-1,s=[],c=[];for(e=e+"",t=t+"";(r=ZS.exec(e))&&(a=JS.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,c.push({i:o,x:sm(r,a)})),n=JS.lastIndex;return n<t.length&&(i=t.slice(n),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?_de(c[0].x):Tde(t):(t=c.length,function(f){for(var A=0,h;A<t;++A)s[(h=c[A]).i]=h.x(f);return s.join("")})}var jN=180/Math.PI,GN={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function YN(e,t,n,r,a,i){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*jN,skewX:Math.atan(c)*jN,scaleX:o,scaleY:s}}var eb;function Mde(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?GN:YN(t.a,t.b,t.c,t.d,t.e,t.f)}function Dde(e){return e==null||(eb||(eb=document.createElementNS("http://www.w3.org/2000/svg","g")),eb.setAttribute("transform",e),!(e=eb.transform.baseVal.consolidate()))?GN:(e=e.matrix,YN(e.a,e.b,e.c,e.d,e.e,e.f))}function WN(e,t,n,r){function a(f){return f.length?f.pop()+" ":""}function i(f,A,h,m,g,b){if(f!==h||A!==m){var C=g.push("translate(",null,t,null,n);b.push({i:C-4,x:sm(f,h)},{i:C-2,x:sm(A,m)})}else(h||m)&&g.push("translate("+h+t+m+n)}function o(f,A,h,m){f!==A?(f-A>180?A+=360:A-f>180&&(f+=360),m.push({i:h.push(a(h)+"rotate(",null,r)-2,x:sm(f,A)})):A&&h.push(a(h)+"rotate("+A+r)}function s(f,A,h,m){f!==A?m.push({i:h.push(a(h)+"skewX(",null,r)-2,x:sm(f,A)}):A&&h.push(a(h)+"skewX("+A+r)}function c(f,A,h,m,g,b){if(f!==h||A!==m){var C=g.push(a(g)+"scale(",null,",",null,")");b.push({i:C-4,x:sm(f,h)},{i:C-2,x:sm(A,m)})}else(h!==1||m!==1)&&g.push(a(g)+"scale("+h+","+m+")")}return function(f,A){var h=[],m=[];return f=e(f),A=e(A),i(f.translateX,f.translateY,A.translateX,A.translateY,h,m),o(f.rotate,A.rotate,h,m),s(f.skewX,A.skewX,h,m),c(f.scaleX,f.scaleY,A.scaleX,A.scaleY,h,m),f=A=null,function(g){for(var b=-1,C=m.length,x;++b<C;)h[(x=m[b]).i]=x.x(g);return h.join("")}}}var Hde=WN(Mde,"px, ","px)","deg)"),Ide=WN(Dde,", ",")",")"),a3=0,E7=0,x7=0,XN=1e3,tb,S7,nb=0,Yv=0,rb=0,B7=typeof performance=="object"&&performance.now?performance:Date,KN=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function qS(){return Yv||(KN(Lde),Yv=B7.now()+rb)}function Lde(){Yv=0}function ab(){this._call=this._time=this._next=null}ab.prototype=ZN.prototype={constructor:ab,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?qS():+n)+(t==null?0:+t),!this._next&&S7!==this&&(S7?S7._next=this:tb=this,S7=this),this._call=e,this._time=n,eB()},stop:function(){this._call&&(this._call=null,this._time=1/0,eB())}};function ZN(e,t,n){var r=new ab;return r.restart(e,t,n),r}function Rde(){qS(),++a3;for(var e=tb,t;e;)(t=Yv-e._time)>=0&&e._call.call(void 0,t),e=e._next;--a3}function JN(){Yv=(nb=B7.now())+rb,a3=E7=0;try{Rde()}finally{a3=0,$de(),Yv=0}}function Nde(){var e=B7.now(),t=e-nb;t>XN&&(rb-=t,nb=e)}function $de(){for(var e,t=tb,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:tb=n);S7=e,eB(r)}function eB(e){if(!a3){E7&&(E7=clearTimeout(E7));var t=e-Yv;t>24?(e<1/0&&(E7=setTimeout(JN,e-B7.now()-rb)),x7&&(x7=clearInterval(x7))):(x7||(nb=B7.now(),x7=setInterval(Nde,XN)),a3=1,KN(JN))}}function qN(e,t,n){var r=new ab;return t=t==null?0:+t,r.restart(a=>{r.stop(),e(a+t)},t,n),r}var Fde=gN("start","end","cancel","interrupt"),Vde=[],e$=0,t$=1,tB=2,ib=3,n$=4,nB=5,ob=6;function lb(e,t,n,r,a,i){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Ode(e,n,{name:t,index:r,group:a,on:Fde,tween:Vde,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:e$})}function rB(e,t){var n=Op(e,t);if(n.state>e$)throw new Error("too late; already scheduled");return n}function $0(e,t){var n=Op(e,t);if(n.state>ib)throw new Error("too late; already running");return n}function Op(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Ode(e,t,n){var r=e.__transition,a;r[t]=n,n.timer=ZN(i,0,n.time);function i(f){n.state=t$,n.timer.restart(o,n.delay,n.time),n.delay<=f&&o(f-n.delay)}function o(f){var A,h,m,g;if(n.state!==t$)return c();for(A in r)if(g=r[A],g.name===n.name){if(g.state===ib)return qN(o);g.state===n$?(g.state=ob,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[A]):+A<t&&(g.state=ob,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[A])}if(qN(function(){n.state===ib&&(n.state=n$,n.timer.restart(s,n.delay,n.time),s(f))}),n.state=tB,n.on.call("start",e,e.__data__,n.index,n.group),n.state===tB){for(n.state=ib,a=new Array(m=n.tween.length),A=0,h=-1;A<m;++A)(g=n.tween[A].value.call(e,e.__data__,n.index,n.group))&&(a[++h]=g);a.length=h+1}}function s(f){for(var A=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(c),n.state=nB,1),h=-1,m=a.length;++h<m;)a[h].call(e,A);n.state===nB&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=ob,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function Qde(e,t){var n=e.__transition,r,a,i=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){i=!1;continue}a=r.state>tB&&r.state<nB,r.state=ob,r.timer.stop(),r.on.call(a?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}i&&delete e.__transition}}function zde(e){return this.each(function(){Qde(this,e)})}function Ude(e,t){var n,r;return function(){var a=$0(this,e),i=a.tween;if(i!==n){r=n=i;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}a.tween=r}}function jde(e,t,n){var r,a;if(typeof n!="function")throw new Error;return function(){var i=$0(this,e),o=i.tween;if(o!==r){a=(r=o).slice();for(var s={name:t,value:n},c=0,f=a.length;c<f;++c)if(a[c].name===t){a[c]=s;break}c===f&&a.push(s)}i.tween=a}}function Gde(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Op(this.node(),n).tween,a=0,i=r.length,o;a<i;++a)if((o=r[a]).name===e)return o.value;return null}return this.each((t==null?Ude:jde)(n,e,t))}function aB(e,t,n){var r=e._id;return e.each(function(){var a=$0(this,r);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return Op(a,r).value[t]}}function r$(e,t){var n;return(typeof t=="number"?sm:t instanceof b7?UN:(n=b7(t))?(t=n,UN):Pde)(e,t)}function Yde(e){return function(){this.removeAttribute(e)}}function Wde(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Xde(e,t,n){var r,a=n+"",i;return function(){var o=this.getAttribute(e);return o===a?null:o===r?i:i=t(r=o,n)}}function Kde(e,t,n){var r,a=n+"",i;return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===r?i:i=t(r=o,n)}}function Zde(e,t,n){var r,a,i;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+"",o===c?null:o===r&&c===a?i:(a=c,i=t(r=o,s)))}}function Jde(e,t,n){var r,a,i;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+"",o===c?null:o===r&&c===a?i:(a=c,i=t(r=o,s)))}}function qde(e,t){var n=WC(e),r=n==="transform"?Ide:r$;return this.attrTween(e,typeof t=="function"?(n.local?Jde:Zde)(n,r,aB(this,"attr."+e,t)):t==null?(n.local?Wde:Yde)(n):(n.local?Kde:Xde)(n,r,t))}function eAe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function tAe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function nAe(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&tAe(e,i)),n}return a._value=t,a}function rAe(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&eAe(e,i)),n}return a._value=t,a}function aAe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=WC(e);return this.tween(n,(r.local?nAe:rAe)(r,t))}function iAe(e,t){return function(){rB(this,e).delay=+t.apply(this,arguments)}}function oAe(e,t){return t=+t,function(){rB(this,e).delay=t}}function lAe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?iAe:oAe)(t,e)):Op(this.node(),t).delay}function sAe(e,t){return function(){$0(this,e).duration=+t.apply(this,arguments)}}function uAe(e,t){return t=+t,function(){$0(this,e).duration=t}}function cAe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?sAe:uAe)(t,e)):Op(this.node(),t).duration}function fAe(e,t){if(typeof t!="function")throw new Error;return function(){$0(this,e).ease=t}}function dAe(e){var t=this._id;return arguments.length?this.each(fAe(t,e)):Op(this.node(),t).ease}function AAe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;$0(this,e).ease=n}}function pAe(e){if(typeof e!="function")throw new Error;return this.each(AAe(this._id,e))}function hAe(e){typeof e!="function"&&(e=EN(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],o=i.length,s=r[a]=[],c,f=0;f<o;++f)(c=i[f])&&e.call(c,c.__data__,f,i)&&s.push(c);return new Vh(r,this._parents,this._name,this._id)}function mAe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,a=n.length,i=Math.min(r,a),o=new Array(r),s=0;s<i;++s)for(var c=t[s],f=n[s],A=c.length,h=o[s]=new Array(A),m,g=0;g<A;++g)(m=c[g]||f[g])&&(h[g]=m);for(;s<r;++s)o[s]=t[s];return new Vh(o,this._parents,this._name,this._id)}function vAe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function gAe(e,t,n){var r,a,i=vAe(t)?rB:$0;return function(){var o=i(this,e),s=o.on;s!==r&&(a=(r=s).copy()).on(t,n),o.on=a}}function yAe(e,t){var n=this._id;return arguments.length<2?Op(this.node(),n).on.on(e):this.each(gAe(n,e,t))}function wAe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function CAe(){return this.on("end.remove",wAe(this._id))}function bAe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=GS(e));for(var r=this._groups,a=r.length,i=new Array(a),o=0;o<a;++o)for(var s=r[o],c=s.length,f=i[o]=new Array(c),A,h,m=0;m<c;++m)(A=s[m])&&(h=e.call(A,A.__data__,m,s))&&("__data__"in A&&(h.__data__=A.__data__),f[m]=h,lb(f[m],t,n,m,f,Op(A,n)));return new Vh(i,this._parents,t,n)}function EAe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=bN(e));for(var r=this._groups,a=r.length,i=[],o=[],s=0;s<a;++s)for(var c=r[s],f=c.length,A,h=0;h<f;++h)if(A=c[h]){for(var m=e.call(A,A.__data__,h,c),g,b=Op(A,n),C=0,x=m.length;C<x;++C)(g=m[C])&&lb(g,t,n,C,m,b);i.push(m),o.push(A)}return new Vh(i,o,t,n)}var xAe=g7.prototype.constructor;function SAe(){return new xAe(this._groups,this._parents)}function BAe(e,t){var n,r,a;return function(){var i=n3(this,e),o=(this.style.removeProperty(e),n3(this,e));return i===o?null:i===n&&o===r?a:a=t(n=i,r=o)}}function a$(e){return function(){this.style.removeProperty(e)}}function kAe(e,t,n){var r,a=n+"",i;return function(){var o=n3(this,e);return o===a?null:o===r?i:i=t(r=o,n)}}function TAe(e,t,n){var r,a,i;return function(){var o=n3(this,e),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),n3(this,e))),o===c?null:o===r&&c===a?i:(a=c,i=t(r=o,s))}}function _Ae(e,t){var n,r,a,i="style."+t,o="end."+i,s;return function(){var c=$0(this,e),f=c.on,A=c.value[i]==null?s||(s=a$(t)):void 0;(f!==n||a!==A)&&(r=(n=f).copy()).on(o,a=A),c.on=r}}function PAe(e,t,n){var r=(e+="")=="transform"?Hde:r$;return t==null?this.styleTween(e,BAe(e,r)).on("end.style."+e,a$(e)):typeof t=="function"?this.styleTween(e,TAe(e,r,aB(this,"style."+e,t))).each(_Ae(this._id,e)):this.styleTween(e,kAe(e,r,t),n).on("end.style."+e,null)}function MAe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function DAe(e,t,n){var r,a;function i(){var o=t.apply(this,arguments);return o!==a&&(r=(a=o)&&MAe(e,o,n)),r}return i._value=t,i}function HAe(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,DAe(e,t,n??""))}function IAe(e){return function(){this.textContent=e}}function LAe(e){return function(){var t=e(this);this.textContent=t??""}}function RAe(e){return this.tween("text",typeof e=="function"?LAe(aB(this,"text",e)):IAe(e==null?"":e+""))}function NAe(e){return function(t){this.textContent=e.call(this,t)}}function $Ae(e){var t,n;function r(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&NAe(a)),t}return r._value=e,r}function FAe(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,$Ae(e))}function VAe(){for(var e=this._name,t=this._id,n=i$(),r=this._groups,a=r.length,i=0;i<a;++i)for(var o=r[i],s=o.length,c,f=0;f<s;++f)if(c=o[f]){var A=Op(c,t);lb(c,e,n,f,o,{time:A.time+A.delay+A.duration,delay:0,duration:A.duration,ease:A.ease})}return new Vh(r,this._parents,e,n)}function OAe(){var e,t,n=this,r=n._id,a=n.size();return new Promise(function(i,o){var s={value:o},c={value:function(){--a===0&&i()}};n.each(function(){var f=$0(this,r),A=f.on;A!==e&&(t=(e=A).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),f.on=t}),a===0&&i()})}var QAe=0;function Vh(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function i$(){return++QAe}var Oh=g7.prototype;Vh.prototype={constructor:Vh,select:bAe,selectAll:EAe,selectChild:Oh.selectChild,selectChildren:Oh.selectChildren,filter:hAe,merge:mAe,selection:SAe,transition:VAe,call:Oh.call,nodes:Oh.nodes,node:Oh.node,size:Oh.size,empty:Oh.empty,each:Oh.each,on:yAe,attr:qde,attrTween:aAe,style:PAe,styleTween:HAe,text:RAe,textTween:FAe,remove:CAe,tween:Gde,delay:lAe,duration:cAe,ease:dAe,easeVarying:pAe,end:OAe,[Symbol.iterator]:Oh[Symbol.iterator]};function zAe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var UAe={time:null,delay:0,duration:250,ease:zAe};function jAe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function GAe(e){var t,n;e instanceof Vh?(t=e._id,e=e._name):(t=i$(),(n=UAe).time=qS(),e=e==null?null:e+"");for(var r=this._groups,a=r.length,i=0;i<a;++i)for(var o=r[i],s=o.length,c,f=0;f<s;++f)(c=o[f])&&lb(c,e,t,f,o,n||jAe(c,t));return new Vh(r,this._parents,e,t)}g7.prototype.interrupt=zde,g7.prototype.transition=GAe;function YAe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function sb(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function WAe(e){return e=sb(Math.abs(e)),e?e[1]:NaN}function XAe(e,t){return function(n,r){for(var a=n.length,i=[],o=0,s=e[0],c=0;a>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),i.push(n.substring(a-=s,a+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function KAe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ZAe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function iB(e){if(!(t=ZAe.exec(e)))throw new Error("invalid format: "+e);var t;return new oB({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}iB.prototype=oB.prototype;function oB(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}oB.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function JAe(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var o$;function qAe(e,t){var n=sb(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(o$=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+sb(e,Math.max(0,t+i-1))[0]}function l$(e,t){var n=sb(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const s$={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:YAe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>l$(e*100,t),r:l$,s:qAe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function u$(e){return e}var c$=Array.prototype.map,f$=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function epe(e){var t=e.grouping===void 0||e.thousands===void 0?u$:XAe(c$.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?u$:KAe(c$.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function f(h){h=iB(h);var m=h.fill,g=h.align,b=h.sign,C=h.symbol,x=h.zero,k=h.width,_=h.comma,D=h.precision,O=h.trim,I=h.type;I==="n"?(_=!0,I="g"):s$[I]||(D===void 0&&(D=12),O=!0,I="g"),(x||m==="0"&&g==="=")&&(x=!0,m="0",g="=");var $=C==="$"?n:C==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",Q=C==="$"?r:/[%p]/.test(I)?o:"",ee=s$[I],K=/[defgprs%]/.test(I);D=D===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,D)):Math.max(0,Math.min(20,D));function re(U){var G=$,Z=Q,Y,X,oe;if(I==="c")Z=ee(U)+Z,U="";else{U=+U;var me=U<0||1/U<0;if(U=isNaN(U)?c:ee(Math.abs(U),D),O&&(U=JAe(U)),me&&+U==0&&b!=="+"&&(me=!1),G=(me?b==="("?b:s:b==="-"||b==="("?"":b)+G,Z=(I==="s"?f$[8+o$/3]:"")+Z+(me&&b==="("?")":""),K){for(Y=-1,X=U.length;++Y<X;)if(oe=U.charCodeAt(Y),48>oe||oe>57){Z=(oe===46?a+U.slice(Y+1):U.slice(Y))+Z,U=U.slice(0,Y);break}}}_&&!x&&(U=t(U,1/0));var ae=G.length+U.length+Z.length,ye=ae<k?new Array(k-ae+1).join(m):"";switch(_&&x&&(U=t(ye+U,ye.length?k-Z.length:1/0),ye=""),g){case"<":U=G+U+Z+ye;break;case"=":U=G+ye+U+Z;break;case"^":U=ye.slice(0,ae=ye.length>>1)+G+U+Z+ye.slice(ae);break;default:U=ye+G+U+Z;break}return i(U)}return re.toString=function(){return h+""},re}function A(h,m){var g=f((h=iB(h),h.type="f",h)),b=Math.max(-8,Math.min(8,Math.floor(WAe(m)/3)))*3,C=Math.pow(10,-b),x=f$[8+b/3];return function(k){return g(C*k)+x}}return{format:f,formatPrefix:A}}var ub;tpe({thousands:",",grouping:[3],currency:["$",""]});function tpe(e){return ub=epe(e),ub.format,ub.formatPrefix,ub}function k7(e,t,n){this.k=e,this.x=t,this.y=n}k7.prototype={constructor:k7,scale:function(e){return e===1?this:new k7(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new k7(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},k7.prototype;const npe={ref:"chipRoot",class:"dnd-double-chip__group"},rpe={class:"dnd-double-chip__top"},ape={key:0,class:"dnd-basket-chip__handler"},ipe=["title"],ope={class:"dnd-double-chip__title"},lpe=["innerHTML"],spe={class:"dnd-double-chip__bottom"},upe={key:0,class:"dnd-basket-chip__fixed-axes-block"},cpe=d.defineComponent({__name:"DndDoubleChip",props:d.mergeModels({info:{},error:{type:Boolean},searchOptions:{type:Function},sortable:{type:Boolean}},{filter:{required:!0},filterModifiers:{},fixedAxes:{default:{}},fixedAxesModifiers:{}}),emits:d.mergeModels(["close-chip","update:filter","update:fixedAxes"],["update:filter","update:fixedAxes"]),setup(e,{emit:t}){var c;const n=e,r=t,a=da(),i=d.useModel(e,"filter"),o=d.useModel(e,"fixedAxes"),s=d.ref((c=a.value.uniqueValuesData.value[n.info.id])==null?void 0:c.options);return d.watch(()=>a.value.uniqueValuesData.value,f=>{var h;const A=(h=f[n.info.id])==null?void 0:h.options;A&&(s.value=A),n.info.axesToBeFixed.forEach(m=>{o.value[m].axisValue===void 0&&f[m]&&(o.value[m].axisValue=f[m].list[0],r("update:fixedAxes",o.value))})},{immediate:!0}),d.watch(()=>s.value,async f=>{!f||!f.length||i.value===void 0&&(i.value=f[0].value)},{immediate:!0}),(f,A)=>(d.openBlock(),d.createElementBlock("div",npe,[d.createElementVNode("div",{class:d.normalizeClass([{error:f.error,sortable:f.sortable},"dnd-double-chip"])},[d.createElementVNode("div",rpe,[d.createElementVNode("div",{class:d.normalizeClass(["dnd-double-chip__icon",{error:f.error}])},[f.error?(d.openBlock(),d.createBlock(d.unref(pt.PlMaskIcon16),{key:0,name:"warning"})):(d.openBlock(),d.createBlock(d.unref(q5),{key:1,name:f.info.isSubsetFilter?"cell-type-subset":f.info.type==="String"?"cell-type-txt":"cell-type-num"},null,8,["name"]))],2),f.sortable?(d.openBlock(),d.createElementBlock("div",ape)):d.createCommentVNode("",!0),d.createVNode(d.unref(pt.PlMaskIcon16),{name:"drag-dots"}),d.createElementVNode("div",{class:"dnd-double-chip__title-wrapper",title:f.info.title},[d.createElementVNode("div",ope,d.toDisplayString(f.info.title),1)],8,ipe),d.createElementVNode("div",{innerHTML:d.unref(HS),class:"dnd-double-chip__icon-close",onClick:A[0]||(A[0]=h=>f.$emit("close-chip",n.info.id))},null,8,lpe)]),d.createElementVNode("div",spe,[s.value===void 0||s.value.length<1e3?(d.openBlock(),d.createBlock(d.unref(pt.PlDropdown),{key:0,modelValue:i.value,"onUpdate:modelValue":A[1]||(A[1]=h=>i.value=h),options:s.value},null,8,["modelValue","options"])):(d.openBlock(),d.createBlock(d.unref(jC),{key:1,modelValue:i.value,"onUpdate:modelValue":A[2]||(A[2]=h=>i.value=h),"options-search":h=>f.searchOptions(n.info.id,h)},null,8,["modelValue","options-search"]))])],2),f.info.axesToBeFixed.length>0?(d.openBlock(),d.createElementBlock("div",upe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(f.info.axesToBeFixed,h=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:h},[o.value[h]?(d.openBlock(),d.createBlock(d.unref(jC),{key:0,modelValue:o.value[h].axisValue,"onUpdate:modelValue":[m=>o.value[h].axisValue=m,A[3]||(A[3]=m=>f.$emit("update:fixedAxes",o.value))],"options-search":m=>f.searchOptions(h,m),label:f.info.axesToBeFixedInfo[h].title},null,8,["modelValue","onUpdate:modelValue","options-search","label"])):d.createCommentVNode("",!0)],64))),128))])):d.createCommentVNode("",!0)],512))}}),fpe={key:0,class:"dnd-basket-chip__handler"},dpe={class:"dnd-basket-chip__title-wrapper"},Ape=["title"],ppe=["title"],hpe=["innerHTML"],mpe={key:0,class:"dnd-basket-chip__fixed-axes-block"},vpe=d.defineComponent({__name:"DnDBasketChip",props:d.mergeModels({error:{type:Boolean},info:{},sortable:{type:Boolean},searchOptions:{type:Function}},{modelValue:{default:{}},modelModifiers:{}}),emits:d.mergeModels(["close-chip","update:modelValue"],["update:modelValue"]),setup(e,{emit:t}){const n=e,r=da(),a=d.useModel(e,"modelValue"),i=t,o=d.ref(),s=d.computed(()=>n.info.uniqueValues.join("/"));function c(){i("close-chip",n.info.id)}return d.watch(()=>r.value.uniqueValuesData.value,f=>{n.info.axesToBeFixed.forEach(A=>{a.value[A].axisValue===void 0&&(a.value[A].axisValue=f[A].list[0])})},{immediate:!0}),(f,A)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"chipRoot",ref:o,class:"dnd-basket-chip__group"},[d.createElementVNode("div",{class:d.normalizeClass([{error:f.error,sortable:f.sortable},"dnd-basket-chip"])},[d.createElementVNode("div",{class:d.normalizeClass(["dnd-basket-chip__icon",{error:f.error}])},[f.error?(d.openBlock(),d.createBlock(d.unref(WR),{key:0,name:"warning"})):(d.openBlock(),d.createBlock(d.unref(q5),{key:1,name:f.info.isSubsetFilter?"cell-type-subset":f.info.type==="String"?"cell-type-txt":"cell-type-num"},null,8,["name"]))],2),f.sortable?(d.openBlock(),d.createElementBlock("div",fpe)):d.createCommentVNode("",!0),d.createVNode(d.unref(WR),{name:"drag-dots"}),d.createElementVNode("div",dpe,[d.createElementVNode("div",{class:"dnd-basket-chip__title",title:f.info.title},d.toDisplayString(f.info.title),9,Ape),f.info.nonHomogenous?(d.openBlock(),d.createElementBlock("div",{key:0,class:"dnd-basket-chip__sub-title",title:s.value},d.toDisplayString(s.value),9,ppe)):d.createCommentVNode("",!0)]),d.createElementVNode("div",{innerHTML:d.unref(HS),class:"dnd-basket-chip__icon-close",onClick:c},null,8,hpe)],2),f.info.axesToBeFixed.length>0?(d.openBlock(),d.createElementBlock("div",mpe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(f.info.axesToBeFixed,h=>(d.openBlock(),d.createBlock(d.unref(jC),{key:h,modelValue:a.value[h].axisValue,"onUpdate:modelValue":[m=>a.value[h].axisValue=m,A[0]||(A[0]=m=>f.$emit("update:modelValue",a.value))],"options-search":m=>f.searchOptions(h,m),label:f.info.axesToBeFixedInfo[h].title},null,8,["modelValue","onUpdate:modelValue","options-search","label"]))),128))])):d.createCommentVNode("",!0)],512))}}),gpe={ref:"chipRoot",class:"dnd-double-chip__group"},ype={class:"dnd-double-chip__top"},wpe={class:"dnd-double-chip__icon"},Cpe=["title"],bpe={class:"dnd-double-chip__title"},Epe=["innerHTML"],xpe={class:"dnd-double-chip__bottom-range"},Spe={class:"dnd-double-chip__bottom-range-row"},Bpe={class:"dnd-double-chip__bottom-range-row"},kpe={key:0,class:"dnd-basket-chip__fixed-axes-block"},Tpe=d.defineComponent({__name:"DnDRangeChip",props:d.mergeModels({info:{},error:{type:Boolean},searchOptions:{type:Function}},{filter:{required:!0},filterModifiers:{},fixedAxes:{required:!0},fixedAxesModifiers:{}}),emits:d.mergeModels(["close-chip","update:fixedAxes"],["update:filter","update:fixedAxes"]),setup(e,{emit:t}){var c,f;const n=e,r=da(),a=t,i=d.useModel(e,"filter"),o=d.useModel(e,"fixedAxes"),s=d.reactive({min:(c=i.value)==null?void 0:c[0],max:(f=i.value)==null?void 0:f[1]});return d.watch(()=>s,A=>{i.value=A},{deep:!0}),d.watch(()=>r.value.uniqueValuesData.value,A=>{n.info.axesToBeFixed.forEach(h=>{o.value[h].axisValue===void 0&&A[h]&&(o.value[h].axisValue=A[h].list[0],a("update:fixedAxes",o.value))})},{immediate:!0}),(A,h)=>(d.openBlock(),d.createElementBlock("div",gpe,[d.createElementVNode("div",{class:d.normalizeClass([{error:A.error},"dnd-double-chip"])},[d.createElementVNode("div",ype,[d.createElementVNode("div",wpe,[d.createVNode(d.unref(q5),{name:"cell-type-num"})]),d.createElementVNode("div",{class:"dnd-double-chip__title-wrapper",title:A.info.title},[d.createElementVNode("div",bpe,d.toDisplayString(A.info.title),1)],8,Cpe),d.createElementVNode("div",{innerHTML:d.unref(HS),class:"dnd-double-chip__icon-close",onClick:h[0]||(h[0]=m=>A.$emit("close-chip",n.info.id))},null,8,Epe)]),d.createElementVNode("div",xpe,[d.createElementVNode("div",Spe,[d.createVNode(d.unref(pt.PlNumberField),{label:"Min",modelValue:s.min,"onUpdate:modelValue":h[1]||(h[1]=m=>s.min=m),updateOnEnterOrClickOutside:!0,useIncrementButtons:!1},null,8,["modelValue"])]),d.createElementVNode("div",Bpe,[d.createVNode(d.unref(pt.PlNumberField),{label:"Max",modelValue:s.max,"onUpdate:modelValue":h[2]||(h[2]=m=>s.max=m),updateOnEnterOrClickOutside:!0,useIncrementButtons:!1},null,8,["modelValue"])])])],2),A.info.axesToBeFixed.length>0?(d.openBlock(),d.createElementBlock("div",kpe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(A.info.axesToBeFixed,m=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:m},[o.value[m]?(d.openBlock(),d.createBlock(d.unref(jC),{key:0,modelValue:o.value[m].axisValue,"onUpdate:modelValue":[g=>o.value[m].axisValue=g,h[3]||(h[3]=g=>A.$emit("update:fixedAxes",o.value))],"options-search":g=>A.searchOptions(m,g),label:A.info.axesToBeFixedInfo[m].title},null,8,["modelValue","onUpdate:modelValue","options-search","label"])):d.createCommentVNode("",!0)],64))),128))])):d.createCommentVNode("",!0)],512))}}),_pe={class:"dnd-basket__title"},Ppe={key:0,class:"dnd-basket__required"},Mpe={class:"dnd-basket__drop-container"},Dpe={key:0,class:"dnd-basket__placeholder"},Hpe=100,Wv=d.defineComponent({__name:"DndBasket",props:{id:{},title:{},multiple:{type:Boolean},isFilter:{type:Boolean},required:{type:Boolean},disabled:{type:Boolean},readonly:{type:Boolean},consistency:{},labelsInfo:{},droppedIds:{},availableIds:{},selectedFilters:{},selectedRanges:{},fixedAxes:{},info:{},draggedId:{},sortable:{type:Boolean}},emits:["drop-item","remove-item","select-filter-value","select-filter-range","select-fixed-axis-value","reorder"],setup(e,{emit:t}){const n=e,r=t,a=d.ref(),i=d.ref(),o=d.ref(0);let s=d.reactive(n.selectedFilters??{}),c=d.reactive(n.selectedRanges??{}),f=d.reactive(n.fixedAxes??{});const A=d.computed(()=>!(n.disabled||!n.multiple&&n.droppedIds.length>0)),h=d.computed(()=>n.disabled?"1 true":!A.value&&n.draggedId?"2 true":!1);d.watch(()=>n.selectedFilters,()=>{s=d.reactive(n.selectedFilters??{})}),d.watch(()=>n.fixedAxes,()=>{f=d.reactive(n.fixedAxes??{})}),d.watch(()=>n.droppedIds,()=>{o.value++},{deep:!0}),n.sortable&&pt.useSortable(i,{handle:".dnd-basket-chip__handler",onChange(_){r("reorder",_.map(D=>n.droppedIds[D]))}});function m(){a.value&&!n.disabled&&A.value&&a.value.classList.add("active")}function g(){a.value&&a.value.classList.remove("active")}function b(_){_.stopPropagation(),A.value&&(n.draggedId&&r("drop-item",{draggedId:n.draggedId,id:n.id}),g())}function C(_){_.preventDefault()}function x(_){_.preventDefault(),m()}const k=async(_,D)=>{var $;const O=(($=n.labelsInfo[_])==null?void 0:$.options)??[],I=D.toLowerCase();return O.filter(Q=>Q.value.toLowerCase().includes(I)||Q.label.toLowerCase().includes(I)).slice(0,Hpe)};return(_,D)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"basketRoot",ref:a,class:d.normalizeClass([{disabled:h.value,empty:_.droppedIds.length===0,readonly:_.readonly},"dnd-basket"]),dropzone:"true",onDrop:b,onDragenter:C,onDragover:x,onDragleave:g},[d.createElementVNode("div",_pe,[_.required?(d.openBlock(),d.createElementBlock("span",Ppe,D[0]||(D[0]=[d.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"16",viewBox:"0 0 6 16",fill:"none"},[d.createElementVNode("path",{d:"M2.01685 6.8L3 5.34159L3.97612 6.8L4.89607 6.12743L3.81461 4.7469L5.5 4.25133L5.14888 3.16106L3.50562 3.77699L3.56882 2H2.43118L2.49438 3.77699L0.851124 3.16106L0.5 4.25133L2.18539 4.7469L1.09691 6.12743L2.01685 6.8Z",fill:"#F1222F"})],-1)]))):d.createCommentVNode("",!0),d.createTextVNode(" "+d.toDisplayString(_.title),1)]),d.createElementVNode("div",Mpe,[_.droppedIds.length?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Dpe," Drop dimensions here ")),(d.openBlock(),d.createElementBlock("div",{ref_key:"listRef",ref:i,key:o.value,class:"dnd-basket__chip-wrapper"},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(_.droppedIds,(O,I)=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:O},[!_.isFilter||_.info[O].isSubsetFilter?(d.openBlock(),d.createBlock(vpe,{key:0,modelValue:d.unref(f)[O],"onUpdate:modelValue":[$=>d.unref(f)[O]=$,$=>_.$emit("select-fixed-axis-value",{v:$,idx:I})],sortable:_.sortable,error:_.consistency[O]===!1,info:_.info[O],"search-options":k,onCloseChip:$=>_.$emit("remove-item",{chipId:O,basketId:_.id})},null,8,["modelValue","onUpdate:modelValue","sortable","error","info","onCloseChip"])):_.info[O].isDiscreteFilter?(d.openBlock(),d.createBlock(cpe,{key:1,filter:d.unref(s)[O],"onUpdate:filter":[$=>d.unref(s)[O]=$,$=>_.$emit("select-filter-value",{v:$,idx:I})],"fixed-axes":d.unref(f)[O],"onUpdate:fixedAxes":[$=>d.unref(f)[O]=$,$=>_.$emit("select-fixed-axis-value",{v:$,idx:I})],info:_.info[O],error:_.consistency[O]===!1,sortable:_.sortable,"search-options":k,onCloseChip:$=>_.$emit("remove-item",{chipId:O,basketId:_.id})},null,8,["filter","onUpdate:filter","fixed-axes","onUpdate:fixedAxes","info","error","sortable","onCloseChip"])):(d.openBlock(),d.createBlock(Tpe,{key:2,filter:d.unref(c)[O],"onUpdate:filter":[$=>d.unref(c)[O]=$,$=>_.$emit("select-filter-range",{v:$,idx:I})],"fixed-axes":d.unref(f)[O],"onUpdate:fixedAxes":[$=>d.unref(f)[O]=$,$=>_.$emit("select-fixed-axis-value",{v:$,idx:I})],info:_.info[O],error:_.consistency[O]===!1,"search-options":k,onCloseChip:$=>_.$emit("remove-item",{chipId:O,basketId:_.id})},null,8,["filter","onUpdate:filter","fixed-axes","onUpdate:fixedAxes","info","error","onCloseChip"]))],64))),128))]))])],34))}}),Ipe={class:"inputs-block"},Lpe={class:"separator"},Rpe={class:"arrow-circle"},Npe={class:"inputs-block"},Xv=d.defineComponent({__name:"FormLayout",setup(e){return(t,n)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",{class:"left-block",onClick:n[0]||(n[0]=r=>r.stopPropagation())},[n[2]||(n[2]=d.createElementVNode("h3",null," Data Mapping ",-1)),d.createElementVNode("div",Ipe,[d.renderSlot(t.$slots,"dataInputs"),d.renderSlot(t.$slots,"mandatoryOptions"),d.renderSlot(t.$slots,"metadataOptions")])]),d.createElementVNode("div",Lpe,[d.createElementVNode("div",Rpe,[d.createVNode(d.unref(pt.PlIcon16),{name:"arrow-right"})])]),d.createElementVNode("div",{class:"right-block",onClick:n[1]||(n[1]=r=>r.stopPropagation())},[n[3]||(n[3]=d.createElementVNode("h3",null," Chart variables ",-1)),d.createElementVNode("div",Npe,[d.renderSlot(t.$slots,"chartVar")])])],64))}}),$pe={class:"dnd-chip__icon"},Fpe={class:"dnd-chip__title-wrapper"},Vpe=["title"],Ope=["title"],cb=d.defineComponent({__name:"DndChip",props:{info:{}},emits:["dragstart","dragend"],setup(e,{emit:t}){const n=e,r=t,a=d.ref(),i=d.computed(()=>n.info.uniqueValues.join("/"));function o(c){var f,A;(f=c.dataTransfer)==null||f.clearData(),(A=c.dataTransfer)==null||A.setData("text/plain",n.info.id),r("dragstart",n.info.id),c.target.style.opacity="0.4",a.value&&a.value.classList.toggle("drag-active")}function s(c){r("dragend",n.info.id),c.target.style.opacity="1",a.value&&a.value.classList.toggle("drag-active")}return(c,f)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"chipRoot",ref:a,draggable:"true",class:"dnd-chip",onDragstart:o,onDragend:s},[d.createElementVNode("div",$pe,[d.createVNode(d.unref(q5),{name:c.info.isSubsetFilter?"cell-type-subset":c.info.type==="String"?"cell-type-txt":"cell-type-num"},null,8,["name"])]),d.createElementVNode("div",Fpe,[d.createElementVNode("div",{class:"dnd-chip__title",title:c.info.title},d.toDisplayString(c.info.title),9,Vpe),c.info.nonHomogenous?(d.openBlock(),d.createElementBlock("div",{key:0,class:"dnd-chip__sub-title",title:i.value},d.toDisplayString(i.value),9,Ope)):d.createCommentVNode("",!0)])],544))}}),Qpe={key:0,class:"metadata-block"},zpe={class:"title"},Upe={class:"metadata-block__search"},jpe={class:"metadata-block__items"},T7=d.defineComponent({__name:"OptionsList",props:{options:{},chipInfo:{},title:{default:"Metadata"}},emits:["dragged-id-update"],setup(e,{emit:t}){const n=e,r=d.computed(()=>n.options.length===0),a=d.ref(),i=d.computed(()=>{var s;const o=((s=a.value)==null?void 0:s.toLowerCase())??"";return n.options.filter(c=>{const f=n.chipInfo[c.id].title??"";return f==null?void 0:f.toLowerCase().includes(o)})});return(o,s)=>r.value?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Qpe,[d.createElementVNode("div",zpe,d.toDisplayString(o.title),1),d.createElementVNode("div",Upe,[d.createVNode(d.unref(pt.PlSearchField),{modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=c=>a.value=c),placeholder:"Find...",clearable:""},null,8,["modelValue"])]),d.createElementVNode("div",jpe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.value,({id:c})=>(d.openBlock(),d.createBlock(cb,{key:c,info:o.chipInfo[c],onDragstart:s[1]||(s[1]=f=>o.$emit("dragged-id-update",f)),onDragend:s[2]||(s[2]=f=>o.$emit("dragged-id-update",null))},null,8,["info"]))),128))])]))}}),Gpe={key:0,class:"metadata-block",style:{flexShrink:0}},Ype={class:"title"},Wpe={class:"metadata-block__items"},_7=d.defineComponent({__name:"MandatoryOptions",props:{options:{},chipInfo:{},title:{default:"Drag to build the chart"}},emits:["dragged-id-update"],setup(e,{emit:t}){const n=e,r=d.computed(()=>n.options.length===0);return(a,i)=>r.value?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Gpe,[d.createElementVNode("div",Ype,d.toDisplayString(a.title),1),d.createElementVNode("div",Wpe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a.options,({id:o})=>(d.openBlock(),d.createBlock(cb,{key:o,info:a.chipInfo[o],onDragstart:i[0]||(i[0]=s=>a.$emit("dragged-id-update",s)),onDragend:i[1]||(i[1]=s=>a.$emit("dragged-id-update",null))},null,8,["info"]))),128))])]))}});function i3(e,t,n,r,a,i){const o=e.value.reactive.optionsState,s=d.toRef(e.value.reactive,"optionsState"),c=d.computed(()=>e.value.inputGuide.value),f=d.computed(()=>e.value.uniqueValuesData.value);function A(X){return OR(s,X,e.value.controller,e.value.columnsDataStore)}function h(X){return VR(s,X,e.value.controller,e.value.columnsDataStore,c)}function m(X){return FR(s,X,e.value.controller,e.value.columnsDataStore,c)}const g=d.ref({...t.reduce((X,oe)=>(X[oe]=A(oe),X),{})}),b=d.ref({...n.reduce((X,oe)=>(X[oe]=m(oe),X),{}),...r.reduce((X,oe)=>(X[oe]=h(oe),X),{})}),C=d.computed(()=>QR(o,c)),x=d.computed(()=>Zle(c,a)),k=d.computed(()=>Jle(c,a)),_=d.ref(null),D=d.computed(()=>{const X=new Set;return a.forEach(oe=>{C.value[oe].forEach(me=>{X.add(me.value)}),o.components[oe].selectorStates.forEach(me=>{X.add(me.selectedSource)})}),UR(c.value,e.value.uniqueValuesData.value,[...X])});function O(X){return o.components[X].selectorStates.reduce((oe,me)=>(me.type!=="range"&&(oe[me.selectedSource]=me.selectedFilterValue),oe),{})}function I(X){return o.components[X].selectorStates.reduce((oe,me)=>(oe[me.selectedSource]=me.selectedFilterRange?[me.selectedFilterRange.min,me.selectedFilterRange.max]:me.selectedFilterValue?[Number(me.selectedFilterValue),Number(me.selectedFilterValue)]:[0,0],oe),{})}function $(X){return o.components[X].selectorStates.reduce((oe,me)=>{const ae=c.value.getSourceInfo(me.selectedSource);return ae.kind==="axis"||(oe[me.selectedSource]=ae.axesToBeFixed.reduce((ye,Ce)=>{var ce;return ye[Ce]=((ce=me.fixedAxes)==null?void 0:ce.find(ge=>ge.axisSource===Ce))??{axisSource:Ce,axisValue:void 0,axisIdx:ae.axesToBeFixedIndexes[Ce]},ye},{})??{}),oe},{})}function Q(X){b.value[X.id]=[...b.value[X.id],X.draggedId],_.value=null}function ee(X){b.value[X.basketId]=b.value[X.basketId].filter(oe=>oe!==X.chipId)}function K(X,oe){b.value[oe]=X}function re(X){return new Set(c.value.components[X].options.map(oe=>oe.value))}function U(X){return c.value.components[X].stateConsistency}function G(X){return!c.value.readyData||C.value[X].length===0||_.value!==null&&!D.value[_.value].availableBasketIds.has(X)}const Z=d.computed(()=>a.map(X=>{var ye;const oe=c.value.components[X],me=X==="filters",ae={id:X,title:i[X],isFilter:me,sortable:X==="tooltipContent",multiple:oe.multipleSelectors,required:oe.required,disabled:G(X),readonly:((ye=e.value.readonlyInputs)==null?void 0:ye.includes(X))??!1,consistency:U(X),draggedId:_.value,availableIds:re(X),droppedIds:b.value[X],info:D.value,fixedAxes:$(X),labelsInfo:f.value,listeners:{"drop-item":Q,"remove-item":ee,reorder:Ce=>K(Ce,X),"select-fixed-axis-value":Ce=>{const ce=o.components[X].selectorStates[Ce.idx];ce.fixedAxes=Object.values(Ce.v);for(const ge of Object.values(o.components))for(const ze of ge.selectorStates)ce.fixedAxes.forEach(Ne=>{ze.fixedAxes&&(ze.fixedAxes=ze.fixedAxes.map(Ge=>({...Ge,axisValue:Ne.axisSource===Ge.axisSource?Ne.axisValue:Ge.axisValue})))})}}};return me&&(ae.selectedFilters=O(X),ae.selectedRanges=I(X),ae.listeners["select-filter-value"]=Ce=>{const ce=o.components[X].selectorStates[Ce.idx];ce.type="equals",ce.selectedFilterValue=Ce.v},ae.listeners["select-filter-range"]=Ce=>{const ce=o.components[X].selectorStates[Ce.idx];ce.type="range",ce.selectedFilterRange=Ce.v}),ae}));function Y(){_.value=null}return{draggedId:_,cleanDraggedId:Y,basketsData:Z,freeMetaOptions:x,freeMandatoryOptions:k,chipInfo:D,dataStateValues:g,dataOptions:C}}const Xpe={class:"data-form-input-item"},Kpe=d.defineComponent({__name:"DiscreteForm",setup(e){const t=da();d.watch(()=>t.value.commonHelpersData.primaryGroups.value,PS(t));const n=["filters","primaryGrouping","secondaryGrouping","tabBy","facetBy"],r={filters:"Filter",primaryGrouping:"Primary grouping",secondaryGrouping:"Secondary grouping",tabBy:"Tab by",facetBy:"Facet by"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["y"],["filters","tabBy"],["primaryGrouping","secondaryGrouping","facetBy"],n,r);console.log("updatedForm! discrete");const h=d.computed(()=>{var m;return((m=t.value.readonlyInputs)==null?void 0:m.includes("y"))??!1});return(m,g)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",Xpe,[d.createVNode(d.unref(pt.PlDropdown),{modelValue:d.unref(f).y,"onUpdate:modelValue":g[0]||(g[0]=b=>d.unref(f).y=b),options:d.unref(A).y,disabled:h.value,error:d.unref(Xy)("y",d.unref(t).inputGuide.value),label:"Y:",clearable:!h.value},null,8,["modelValue","options","disabled","error","clearable"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(_7,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:g[1]||(g[1]=b=>a.value=b)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(T7,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:g[2]||(g[2]=b=>a.value=b)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),b=>(d.openBlock(),d.createElementBlock("div",{key:b.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},b,d.toHandlers(b.listeners)),null,16)]))),128))]),_:1}))}}),Zpe={class:"data-form-input-item"},Jpe={class:"data-form-input-item",style:{"margin-top":"10px"}},qpe=d.defineComponent({__name:"ScatterplotForm",setup(e){const t=da(),n=["filters","grouping","size","shape","tooltipContent","label","tabBy","facetBy"],r={filters:"Filter",grouping:"Grouping / Color",size:"Size",shape:"Shape",tooltipContent:"Tooltip",label:"Label",tabBy:"Tab by",facetBy:"Facet by"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["x","y"],["filters","tabBy"],["grouping","size","shape","tooltipContent","label","facetBy"],n,r),h=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("x"))??!1}),m=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("y"))??!1});return(g,b)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",Zpe,[d.createVNode(d.unref(pt.PlDropdown),{label:"X:",clearable:"",modelValue:d.unref(f).x,"onUpdate:modelValue":b[0]||(b[0]=C=>d.unref(f).x=C),options:d.unref(A).x,disabled:h.value},null,8,["modelValue","options","disabled"])]),d.createElementVNode("div",Jpe,[d.createVNode(d.unref(pt.PlDropdown),{label:"Y:",clearable:"",modelValue:d.unref(f).y,"onUpdate:modelValue":b[1]||(b[1]=C=>d.unref(f).y=C),options:d.unref(A).y,disabled:m.value},null,8,["modelValue","options","disabled"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(_7,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:b[2]||(b[2]=C=>a.value=C)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(T7,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:b[3]||(b[3]=C=>a.value=C)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),C=>(d.openBlock(),d.createElementBlock("div",{key:C.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},C,d.toHandlers(C.listeners)),null,16)]))),128))]),_:1}))}}),e0e={class:"data-form-input-item"},t0e={class:"data-form-input-item",style:{"margin-top":"10px"}},n0e=d.defineComponent({__name:"ScatterplotUmapForm",setup(e){const t=da(),n=["filters","grouping","tabBy","tooltipContent","label"],r={filters:"Filter",grouping:"Grouping / Color",tabBy:"Tab by",tooltipContent:"Tooltip",label:"Label"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["x","y"],["filters","tabBy"],["grouping","tooltipContent","label"],n,r),h=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("x"))??!1}),m=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("y"))??!1});return(g,b)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",e0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"X:",clearable:"",modelValue:d.unref(f).x,"onUpdate:modelValue":b[0]||(b[0]=C=>d.unref(f).x=C),options:d.unref(A).x,disabled:h.value},null,8,["modelValue","options","disabled"])]),d.createElementVNode("div",t0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Y:",clearable:"",modelValue:d.unref(f).y,"onUpdate:modelValue":b[1]||(b[1]=C=>d.unref(f).y=C),options:d.unref(A).y,disabled:m.value},null,8,["modelValue","options","disabled"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(_7,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:b[2]||(b[2]=C=>a.value=C)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(T7,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:b[3]||(b[3]=C=>a.value=C)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),C=>(d.openBlock(),d.createElementBlock("div",{key:C.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},C,d.toHandlers(C.listeners)),null,16)]))),128))]),_:1}))}}),r0e={class:"data-form-input-item"},a0e=d.defineComponent({__name:"HeatmapForm",setup(e){const t=da(),n=["filters","x","y","xGroupBy","yGroupBy","tooltipContent","tabBy","facetBy","annotationsX","annotationsY"],r={filters:"Filter",x:"X",y:"Y",xGroupBy:"X group",yGroupBy:"Y group",tooltipContent:"Tooltip",tabBy:"Tab by",facetBy:"Facet by",annotationsX:"Annotations X",annotationsY:"Annotations Y"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["value"],["filters","tabBy"],["x","y","xGroupBy","yGroupBy","tooltipContent","facetBy","annotationsX","annotationsY"],n,r);console.log("heatmap updates");const h=d.computed(()=>{var m;return((m=t.value.readonlyInputs)==null?void 0:m.includes("value"))??!1});return(m,g)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",r0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Data source:",clearable:"",modelValue:d.unref(f).value,"onUpdate:modelValue":g[0]||(g[0]=b=>d.unref(f).value=b),options:d.unref(A).value,disabled:h.value,error:d.unref(Xy)("value",d.unref(t).inputGuide.value)},null,8,["modelValue","options","disabled","error"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(_7,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:g[1]||(g[1]=b=>a.value=b)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(T7,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:g[2]||(g[2]=b=>a.value=b)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),b=>(d.openBlock(),d.createElementBlock("div",{key:b.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},b,d.toHandlers(b.listeners)),null,16)]))),128))]),_:1}))}}),i0e={class:"data-form-input-item"},o0e={key:0,class:"metadata-block"},l0e={class:"metadata-block__items"},s0e={key:1,class:"metadata-block"},u0e={class:"metadata-block__items"},c0e={key:0,class:"data-form-input-item"},f0e=d.defineComponent({__name:"DendroForm",setup(e){const t=da(),n=t.value.reactive.optionsState,r=d.toRef(t.value.reactive,"optionsState"),a=d.computed(()=>t.value.inputGuide.value),i=d.computed(()=>t.value.uniqueValuesData.value);function o(Z){return OR(r,Z,t.value.controller,t.value.columnsDataStore)}function s(Z){return VR(r,Z,t.value.controller,t.value.columnsDataStore,a)}function c(Z){return FR(r,Z,t.value.controller,t.value.columnsDataStore,a)}const f=d.ref({value:o("value"),tableContent:s("tableContent"),heatmapAnnotation:s("heatmapAnnotation"),heatmapForSequence:s("heatmapForSequence"),filters:c("filters"),tabBy:c("tabBy"),height:s("height"),labels:s("labels"),nodeShape:s("nodeShape"),nodeColor:s("nodeColor"),nodeSize:s("nodeSize"),lineColor:s("lineColor"),heatmapAxis:s("heatmapAxis"),heatmapGroup:s("heatmapGroup")});d.watch(()=>f.value.nodeShape,Z=>{t.value.reactive.layersSettings.dendro.dotShape=Z.length?{type:"nodeShape",value:Z[0]}:K5}),d.watch(()=>f.value.nodeColor,Z=>{t.value.reactive.layersSettings.dendro.dotFill=Z.length?{type:"nodeColor",value:Z[0]}:yo}),d.watch(()=>f.value.lineColor,Z=>{t.value.reactive.layersSettings.dendro.lineColor=Z.length?{type:"lineColor",value:Z[0]}:yo});const A=d.computed(()=>QR(n,a)),h=d.computed(()=>DS(a,g)),m=d.computed(()=>h.value.filter(Z=>Z.info.kind==="axis")),g=["height","tableContent","labels","heatmapAnnotation","heatmapAxis","heatmapGroup","heatmapForSequence","nodeShape","nodeColor","nodeSize","lineColor"],b={height:"Connections length",tableContent:"Table/tooltip content",labels:"Labels",heatmapAnnotation:"Heatmap annotation",heatmapAxis:"Heatmap axis",heatmapGroup:"Heatmap group",heatmapForSequence:"Alignment data",nodeShape:"Node shape",nodeColor:"Node color",nodeSize:"Node size",lineColor:"Line color"},C=d.ref(null),x=d.computed(()=>{const Z=new Set;return g.forEach(Y=>{A.value[Y].forEach(X=>{Z.add(X.value)}),n.components[Y].selectorStates.forEach(X=>{Z.add(X.selectedSource)})}),UR(a.value,i.value,[...Z])});function k(Z){return n.components[Z].selectorStates.reduce((Y,X)=>{const oe=a.value.getSourceInfo(X.selectedSource);return oe.kind==="axis"||(Y[X.selectedSource]=oe.axesToBeFixed.reduce((me,ae)=>{var ye;return me[ae]=((ye=X.fixedAxes)==null?void 0:ye.find(Ce=>Ce.axisSource===ae))??{axisSource:ae,axisValue:void 0,axisIdx:oe.axesToBeFixedIndexes[ae]},me},{})??{}),Y},{})}function _(Z){f.value[Z.id]=[...f.value[Z.id],Z.draggedId],C.value=null}function D(Z,Y){f.value[Y]=Z}function O(Z){f.value[Z.basketId]=f.value[Z.basketId].filter(Y=>Y!==Z.chipId)}function I(Z){return new Set(a.value.components[Z].options.map(Y=>Y.value))}function $(Z){return a.value.components[Z].stateConsistency}function Q(Z){return!a.value.readyData||A.value[Z].length===0||C.value!==null&&!x.value[C.value].availableBasketIds.has(Z)}const ee=d.computed(()=>g.map(Z=>{var oe;const Y=a.value.components[Z];return{id:Z,title:b[Z],isFilter:!1,sortable:Z==="tableContent",multiple:Y.multipleSelectors,required:Y.required,disabled:Q(Z),readonly:((oe=t.value.readonlyInputs)==null?void 0:oe.includes(Z))??!1,consistency:$(Z),draggedId:C.value,availableIds:I(Z),droppedIds:f.value[Z],info:x.value,labelsInfo:i.value,listeners:{"drop-item":_,"remove-item":O,reorder:me=>D(me,Z),"select-fixed-axis-value":me=>{const ae=n.components[Z].selectorStates[me.idx];ae.fixedAxes=Object.values(me.v);for(const ye of Object.values(n.components))for(const Ce of ye.selectorStates)ae.fixedAxes.forEach(ce=>{Ce.fixedAxes&&(Ce.fixedAxes=Ce.fixedAxes.map(ge=>({...ge,axisValue:ce.axisSource===ge.axisSource?ce.axisValue:ge.axisValue})))})}},fixedAxes:k(Z)}}));function K(Z){return Z==="heatmapAxis"||Z==="heatmapGroup"?f.value.heatmapAnnotation!==null:!0}function re(){C.value=null}["value"].forEach(Z=>{d.watch([()=>f.value[Z],()=>A.value],([Y,X])=>{(typeof Y>"u"||zR("value",a.value))&&X[Z]&&X[Z].length&&t.value.controller.changeSelected(Z,t.value.columnsDataStore,t.value.reactive.optionsState,[{selectedSource:X[Z][0].value}])},{immediate:!0})});const G=d.computed(()=>{var Z;return((Z=t.value.readonlyInputs)==null?void 0:Z.includes("value"))??!1});return(Z,Y)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",i0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Data source:",modelValue:f.value.value,"onUpdate:modelValue":Y[0]||(Y[0]=X=>f.value.value=X),options:A.value.value,disabled:G.value,error:d.unref(Xy)("value",a.value)},null,8,["modelValue","options","disabled","error"])]),m.value.length>0?(d.openBlock(),d.createElementBlock("div",o0e,[Y[3]||(Y[3]=d.createElementVNode("div",{class:"title"},"Drag to build the chart",-1)),d.createElementVNode("div",l0e,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(m.value,({id:X})=>(d.openBlock(),d.createBlock(cb,{key:X,info:x.value[X],onDragstart:Y[1]||(Y[1]=oe=>C.value=oe),onDragend:re},null,8,["info"]))),128))])])):d.createCommentVNode("",!0),h.value.length>0?(d.openBlock(),d.createElementBlock("div",s0e,[Y[4]||(Y[4]=d.createElementVNode("div",{class:"title"},"Metadata",-1)),d.createElementVNode("div",u0e,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(h.value,({id:X})=>(d.openBlock(),d.createBlock(cb,{key:X,info:x.value[X],onDragstart:Y[2]||(Y[2]=oe=>C.value=oe),onDragend:re},null,8,["info"]))),128))])])):d.createCommentVNode("",!0)]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(ee.value,X=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:X.id},[K(X.id)?(d.openBlock(),d.createElementBlock("div",c0e,[d.createVNode(Wv,d.mergeProps({ref_for:!0},X,d.toHandlers(X.listeners)),null,16)])):d.createCommentVNode("",!0)],64))),128))]),_:1}))}}),d0e={class:"data-form-input-item"},A0e=d.defineComponent({__name:"HistogramForm",setup(e){const t=da(),n=["filters","tabBy","facetBy"],r={filters:"Filter",tabBy:"Tab by",facetBy:"Facet by"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["value"],["filters","tabBy"],["facetBy"],n,r),h=d.computed(()=>{var m;return((m=t.value.readonlyInputs)==null?void 0:m.includes("value"))??!1});return(m,g)=>{const b=d.resolveComponent("MandatoryOptionsList"),C=d.resolveComponent("OptionsList");return d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",d0e,[d.createVNode(d.unref(pt.PlDropdown),{modelValue:d.unref(f).value,"onUpdate:modelValue":g[0]||(g[0]=x=>d.unref(f).value=x),options:d.unref(A).value,disabled:h.value,error:d.unref(Xy)("value",d.unref(t).inputGuide.value),label:"Data value:",clearable:!h.value},null,8,["modelValue","options","disabled","error","clearable"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(b,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:g[1]||(g[1]=x=>a.value=x)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(C,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:g[2]||(g[2]=x=>a.value=x)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),x=>(d.openBlock(),d.createElementBlock("div",{key:x.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},x,d.toHandlers(x.listeners)),null,16)]))),128))]),_:1})}}}),p0e={class:"data-form-input-item"},h0e={class:"data-form-input-item",style:{"margin-top":"10px"}},m0e=d.defineComponent({__name:"BubbleForm",setup(e){const t=da(),n=["filters","x","y","tooltipContent","tabBy","facetBy"],r={filters:"Filter",x:"X",y:"Y",tooltipContent:"Tooltip",tabBy:"Tab by",facetBy:"Facet by"},{draggedId:a,basketsData:i,freeMetaOptions:o,freeMandatoryOptions:s,chipInfo:c,dataStateValues:f,dataOptions:A}=i3(t,["valueColor","valueSize"],["filters","tabBy"],["x","y","tooltipContent","facetBy"],n,r),h=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("valueColor"))??!1}),m=d.computed(()=>{var g;return((g=t.value.readonlyInputs)==null?void 0:g.includes("valueSize"))??!1});return(g,b)=>(d.openBlock(),d.createBlock(Xv,null,{dataInputs:d.withCtx(()=>[d.createElementVNode("div",p0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Data source for color:",clearable:"",modelValue:d.unref(f).valueColor,"onUpdate:modelValue":b[0]||(b[0]=C=>d.unref(f).valueColor=C),disabled:h.value,options:d.unref(A).valueColor,error:d.unref(Xy)("valueColor",d.unref(t).inputGuide.value)},null,8,["modelValue","disabled","options","error"])]),d.createElementVNode("div",h0e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Data source for size:",clearable:"",modelValue:d.unref(f).valueSize,"onUpdate:modelValue":b[1]||(b[1]=C=>d.unref(f).valueSize=C),disabled:m.value,options:d.unref(A).valueSize,error:d.unref(Xy)("valueSize",d.unref(t).inputGuide.value)},null,8,["modelValue","disabled","options","error"])])]),mandatoryOptions:d.withCtx(()=>[d.createVNode(_7,{options:d.unref(s),chipInfo:d.unref(c),onDraggedIdUpdate:b[2]||(b[2]=C=>a.value=C)},null,8,["options","chipInfo"])]),metadataOptions:d.withCtx(()=>[d.createVNode(T7,{options:d.unref(o),chipInfo:d.unref(c),onDraggedIdUpdate:b[3]||(b[3]=C=>a.value=C)},null,8,["options","chipInfo"])]),chartVar:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(i),C=>(d.openBlock(),d.createElementBlock("div",{key:C.id,class:"data-form-input-item"},[d.createVNode(Wv,d.mergeProps({ref_for:!0},C,d.toHandlers(C.listeners)),null,16)]))),128))]),_:1}))}}),v0e={class:"data-form"},g0e=d.defineComponent({__name:"index",setup(e){const t=da();return(n,r)=>(d.openBlock(),d.createElementBlock("div",v0e,[d.unref(t).reactive.chartType==="discrete"?(d.openBlock(),d.createBlock(Kpe,{key:0})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot"?(d.openBlock(),d.createBlock(qpe,{key:1})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot-umap"?(d.openBlock(),d.createBlock(n0e,{key:2})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="heatmap"?(d.openBlock(),d.createBlock(a0e,{key:3})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="dendro"?(d.openBlock(),d.createBlock(f0e,{key:4})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="histogram"?(d.openBlock(),d.createBlock(A0e,{key:5})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="bubble"?(d.openBlock(),d.createBlock(m0e,{key:6})):d.createCommentVNode("",!0)]))}}),y0e={class:"collapsable-block-content"},ts=d.defineComponent({__name:"CollapsableBlock",props:{iconOpen:{},icon:{},title:{},settings:{}},setup(e){var i,o,s,c,f;const t=e,n=d.ref(((i=t.settings)==null?void 0:i.defaultState)!=="open"),r={},a={};return(o=t.settings)!=null&&o.height&&(a["--title-height"]=`${(s=t.settings)==null?void 0:s.height}px`),(c=t.settings)!=null&&c.horizontalPadding&&(r.padding=`0 ${(f=t.settings)==null?void 0:f.horizontalPadding}px`),(A,h)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["collapsable-block-container",{minimized:n.value,maximized:!n.value}]),style:a},[d.createElementVNode("div",{class:"collapsable-block-title",onClick:h[0]||(h[0]=m=>n.value=!n.value),style:r},[t.icon?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(!n.value&&t.iconOpen?t.iconOpen:t.icon),{key:0})):d.createCommentVNode("",!0),d.createElementVNode("span",null,d.toDisplayString(t.title),1)]),d.createElementVNode("div",y0e,[d.renderSlot(A.$slots,"default")])],2))}}),w0e={},C0e={class:"inline-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function b0e(e,t){return d.openBlock(),d.createElementBlock("svg",C0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M6 11.3773C6 11.8102 6.51272 12.0386 6.83448 11.749L10.5871 8.37165C10.8077 8.17303 10.8077 7.82697 10.5871 7.62835L6.83448 4.25103C6.51272 3.96145 6 4.1898 6 4.62268V11.3773Z",fill:"#CFD1DB"},null,-1)]))}const Qf=Wr(w0e,[["render",b0e]]),E0e={},x0e={class:"inline-icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function S0e(e,t){return d.openBlock(),d.createElementBlock("svg",x0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M4.70711 6.00018C4.26165 6.00018 4.03857 6.53875 4.35355 6.85374L7.64645 10.1466C7.84171 10.3419 8.15829 10.3419 8.35355 10.1466L11.6464 6.85374C11.9614 6.53875 11.7383 6.00018 11.2929 6.00018H4.70711Z",fill:"#CFD1DB"},null,-1)]))}const zf=Wr(E0e,[["render",S0e]]),B0e=["tabindex","onKeydown","onClick"],Uf=d.defineComponent({__name:"BtnIconGroup",props:{modelValue:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){d.useSlots();const n=t,r=a=>n("update:modelValue",a);return(a,i)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["btn-icon-group",{disabled:a.disabled}])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a.options,(o,s)=>(d.openBlock(),d.createElementBlock("div",{key:o.value+":"+s,class:d.normalizeClass(["btn-icon-group__option",{active:a.modelValue===o.value}]),tabindex:a.modelValue===o.value||a.disabled?void 0:0,onKeydown:d.withKeys(c=>r(o.value),["enter"]),onClick:c=>r(o.value)},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(o.icon)))],42,B0e))),128))],2))}}),k0e={},T0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function _0e(e,t){return d.openBlock(),d.createElementBlock("svg",T0e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 4.5L21 4.5V6L3 6V4.5ZM3 9L11 9V10.5L3 10.5V9ZM3 15V13.5L19 13.5V15L3 15ZM3 18H13V19.5H3V18Z",fill:"currentColor"},null,-1)]))}const P7=Wr(k0e,[["render",_0e]]),P0e={},M0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function D0e(e,t){return d.openBlock(),d.createElementBlock("svg",M0e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 4.5L21 4.5V6L3 6V4.5ZM8 9L16 9V10.5L8 10.5V9ZM4 13.5L20 13.5V15L4 15L4 13.5ZM7 18H17V19.5H7V18Z",fill:"currentColor"},null,-1)]))}const M7=Wr(P0e,[["render",D0e]]),H0e={},I0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function L0e(e,t){return d.openBlock(),d.createElementBlock("svg",I0e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 4.5L21 4.5V6L3 6V4.5ZM13 9L21 9V10.5L13 10.5V9ZM5 15V13.5L21 13.5V15L5 15ZM11 18H21V19.5H11V18Z",fill:"currentColor"},null,-1)]))}const D7=Wr(H0e,[["render",L0e]]),R0e={},N0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function $0e(e,t){return d.openBlock(),d.createElementBlock("svg",N0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M4 19L4 5C4 4.44772 4.44772 4 5 4L19 4C19.5523 4 20 4.44772 20 5L20 19C20 19.5523 19.5523 20 19 20L5 20C4.44772 20 4 19.5523 4 19Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"square"},null,-1)]))}const H7=Wr(R0e,[["render",$0e]]),F0e={},V0e={width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O0e(e,t){return d.openBlock(),d.createElementBlock("svg",V0e,t[0]||(t[0]=[d.createStaticVNode('<path d="M4.25 1H5.75" stroke="currentColor" stroke-width="1.5"></path><path d="M8.25 1H9.75" stroke="currentColor" stroke-width="1.5"></path><path d="M12.25 1H13.75" stroke="currentColor" stroke-width="1.5"></path><path d="M16.25 1H17.75" stroke="currentColor" stroke-width="1.5"></path><path d="M0.25 17H1.75" stroke="currentColor" stroke-width="1.5"></path><path d="M4.25 17H5.75" stroke="currentColor" stroke-width="1.5"></path><path d="M8.25 17H9.75" stroke="currentColor" stroke-width="1.5"></path><path d="M12.25 17H13.75" stroke="currentColor" stroke-width="1.5"></path><path d="M16.25 17H17.75" stroke="currentColor" stroke-width="1.5"></path><path d="M17 0.25L17 1.75" stroke="currentColor" stroke-width="1.5"></path><path d="M17 4.25L17 5.75" stroke="currentColor" stroke-width="1.5"></path><path d="M17 8.25L17 9.75" stroke="currentColor" stroke-width="1.5"></path><path d="M17 12.25L17 13.75" stroke="currentColor" stroke-width="1.5"></path><path d="M1 0.25L1 1.75" stroke="currentColor" stroke-width="1.5"></path><path d="M1 4.25L1 5.75" stroke="currentColor" stroke-width="1.5"></path><path d="M1 8.25L1 9.75" stroke="currentColor" stroke-width="1.5"></path><path d="M1 12.25L1 13.75" stroke="currentColor" stroke-width="1.5"></path>',17)]))}const I7=Wr(F0e,[["render",O0e]]),Q0e={},z0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function U0e(e,t){return d.openBlock(),d.createElementBlock("svg",z0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M8.8148 18.2251C6.6173 18.2251 5.0498 16.6576 5.0498 14.4601V10.7401C5.0498 8.5426 6.6173 6.9751 8.8148 6.9751C11.0123 6.9751 12.5798 8.5426 12.5798 10.7401V14.4601C12.5798 16.6576 11.0123 18.2251 8.8148 18.2251ZM6.6473 14.5576C6.6473 15.7651 7.60731 16.7251 8.8148 16.7251C10.0223 16.7251 10.9823 15.7651 10.9823 14.5576V10.6276C10.9823 9.4276 10.0223 8.4676 8.8148 8.4676C7.60731 8.4676 6.6473 9.4276 6.6473 10.6276V14.5576Z",fill:"currentColor"},null,-1),d.createElementVNode("path",{d:"M15.8738 12.3751C14.3888 12.3751 13.1738 11.1751 13.1738 9.6751C13.1738 8.2051 14.4338 6.9751 15.8738 6.9751C17.3588 6.9751 18.5738 8.1751 18.5738 9.6751C18.5738 11.1751 17.3588 12.3751 15.8738 12.3751ZM14.5313 9.6751C14.5313 10.4026 15.1463 11.0176 15.8738 11.0176C16.6013 11.0176 17.2163 10.4026 17.2163 9.6751C17.2163 8.9476 16.6013 8.3326 15.8738 8.3326C15.1463 8.3326 14.5313 8.9476 14.5313 9.6751Z",fill:"currentColor"},null,-1)]))}const lB=Wr(Q0e,[["render",U0e]]),j0e={},G0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function Y0e(e,t){return d.openBlock(),d.createElementBlock("svg",G0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M5.75684 18.0001V16.1176H0.881836V14.6326L4.39184 7.2001H6.18434L2.67434 14.6326H5.75684V11.7076H7.34684V14.6326H8.41934V16.1176H7.34684V18.0001H5.75684Z",fill:"currentColor"},null,-1),d.createElementVNode("path",{d:"M12.5224 18.2251C10.8574 18.2251 9.46242 17.1226 9.01992 15.5476L10.5274 15.1426C10.7749 16.1026 11.6674 16.7101 12.5674 16.7101C13.7524 16.7101 14.6899 15.7576 14.6899 14.6026C14.6899 13.4176 13.7224 12.4876 12.5674 12.4876C11.6824 12.4876 11.0749 12.9076 10.7374 13.3576L9.37242 12.8776L9.70242 7.2001H15.5299V8.6776H11.1049L10.9249 11.6476C11.4574 11.2651 12.1324 11.0626 12.7699 11.0626C14.7874 11.0626 16.2724 12.5776 16.2724 14.6026C16.2724 16.6126 14.5399 18.2251 12.5224 18.2251Z",fill:"currentColor"},null,-1),d.createElementVNode("path",{d:"M19.265 12.3751C17.78 12.3751 16.565 11.1751 16.565 9.6751C16.565 8.2051 17.825 6.9751 19.265 6.9751C20.75 6.9751 21.965 8.1751 21.965 9.6751C21.965 11.1751 20.75 12.3751 19.265 12.3751ZM17.9225 9.6751C17.9225 10.4026 18.5375 11.0176 19.265 11.0176C19.9925 11.0176 20.6075 10.4026 20.6075 9.6751C20.6075 8.9476 19.9925 8.3326 19.265 8.3326C18.5375 8.3326 17.9225 8.9476 17.9225 9.6751Z",fill:"currentColor"},null,-1)]))}const sB=Wr(j0e,[["render",Y0e]]),W0e={},X0e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function K0e(e,t){return d.openBlock(),d.createElementBlock("svg",X0e,t[0]||(t[0]=[d.createElementVNode("path",{d:"M4.6132 6.9826C6.7057 6.9826 8.3257 8.6026 8.3257 10.8301V14.2726C8.3257 16.6351 6.7432 18.2251 4.4557 18.2251C3.3157 18.2251 2.2882 17.7901 1.5532 16.9426L2.7007 15.8701C3.1132 16.4026 3.7582 16.7401 4.4557 16.7401C5.7982 16.7401 6.7282 15.6601 6.7282 14.4751V13.1851C6.1207 13.7926 5.2957 14.1526 4.4032 14.1526C2.3857 14.1526 0.908203 12.6226 0.908203 10.6051C0.908203 8.5801 2.5957 6.9826 4.6132 6.9826ZM2.4982 10.6051C2.4982 11.7751 3.4357 12.7201 4.6057 12.7201C5.7757 12.7201 6.7282 11.7751 6.7282 10.6051C6.7282 9.4501 5.7832 8.4901 4.6132 8.4901C3.4432 8.4901 2.4982 9.4351 2.4982 10.6051Z",fill:"currentColor"},null,-1),d.createElementVNode("path",{d:"M13.2846 18.2251C11.0871 18.2251 9.51961 16.6576 9.51961 14.4601V10.7401C9.51961 8.5426 11.0871 6.9751 13.2846 6.9751C15.4821 6.9751 17.0496 8.5426 17.0496 10.7401V14.4601C17.0496 16.6576 15.4821 18.2251 13.2846 18.2251ZM11.1171 14.5576C11.1171 15.7651 12.0771 16.7251 13.2846 16.7251C14.4921 16.7251 15.4521 15.7651 15.4521 14.5576V10.6276C15.4521 9.4276 14.4921 8.4676 13.2846 8.4676C12.0771 8.4676 11.1171 9.4276 11.1171 10.6276V14.5576Z",fill:"currentColor"},null,-1),d.createElementVNode("path",{d:"M20.3436 12.3751C18.8586 12.3751 17.6436 11.1751 17.6436 9.6751C17.6436 8.2051 18.9036 6.9751 20.3436 6.9751C21.8286 6.9751 23.0436 8.1751 23.0436 9.6751C23.0436 11.1751 21.8286 12.3751 20.3436 12.3751ZM19.0011 9.6751C19.0011 10.4026 19.6161 11.0176 20.3436 11.0176C21.0711 11.0176 21.6861 10.4026 21.6861 9.6751C21.6861 8.9476 21.0711 8.3326 20.3436 8.3326C19.6161 8.3326 19.0011 8.9476 19.0011 9.6751Z",fill:"currentColor"},null,-1)]))}const uB=Wr(W0e,[["render",K0e]]),Z0e={},J0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function q0e(e,t){return d.openBlock(),d.createElementBlock("svg",J0e,t[0]||(t[0]=[d.createStaticVNode('<path d="M4 4L4 20" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"></path><path d="M7.25 4H8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M11.25 4H12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M15.25 4H16.75" stroke="currentColor" stroke-width="1.5"></path><path d="M19.25 4H20.75" stroke="currentColor" stroke-width="1.5"></path><path d="M7.25 20H8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M11.25 20H12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M15.25 20H16.75" stroke="currentColor" stroke-width="1.5"></path><path d="M19.25 20H20.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 3.25L20 4.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 7.25L20 8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 11.25L20 12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 15.25L20 16.75" stroke="currentColor" stroke-width="1.5"></path>',13)]))}const cB=Wr(Z0e,[["render",q0e]]),ehe={},the={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function nhe(e,t){return d.openBlock(),d.createElementBlock("svg",the,t[0]||(t[0]=[d.createStaticVNode('<path d="M20 20L4 20" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"></path><path d="M7.25 4H8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M11.25 4H12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M15.25 4H16.75" stroke="currentColor" stroke-width="1.5"></path><path d="M19.25 4H20.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 3.25L20 4.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 7.25L20 8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 11.25L20 12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 15.25L20 16.75" stroke="currentColor" stroke-width="1.5"></path><path d="M4 3.25L4 4.75" stroke="currentColor" stroke-width="1.5"></path><path d="M4 7.25L4 8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M4 11.25L4 12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M4 15.25L4 16.75" stroke="currentColor" stroke-width="1.5"></path>',13)]))}const fB=Wr(ehe,[["render",nhe]]),rhe={},ahe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ihe(e,t){return d.openBlock(),d.createElementBlock("svg",ahe,t[0]||(t[0]=[d.createStaticVNode('<path d="M4 4L4 19C4 19.5523 4.44772 20 5 20L20 20" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"></path><path d="M7.25 4H8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M11.25 4H12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M15.25 4H16.75" stroke="currentColor" stroke-width="1.5"></path><path d="M19.25 4H20.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 3.25L20 4.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 7.25L20 8.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 11.25L20 12.75" stroke="currentColor" stroke-width="1.5"></path><path d="M20 15.25L20 16.75" stroke="currentColor" stroke-width="1.5"></path>',9)]))}const dB=Wr(rhe,[["render",ihe]]),ohe={inheritAttrs:!1},lhe={class:"double-contour-temp"};function she(e,t,n,r,a,i){return d.openBlock(),d.createElementBlock("div",lhe,[d.createElementVNode("div",d.normalizeProps(d.guardReactiveProps(e.$attrs)),[d.renderSlot(e.$slots,"default")],16)])}const AB=Wr(ohe,[["render",she]]),uhe={},che={class:"inline-icon",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fhe(e,t){return d.openBlock(),d.createElementBlock("svg",che,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5951 8.76689C9.7962 8.43389 8.91957 8.25 8 8.25C4.27208 8.25 1.25 11.2721 1.25 15C1.25 18.7279 4.27208 21.75 8 21.75C11.7279 21.75 14.75 18.7279 14.75 15C14.75 12.7693 13.6679 10.7913 12 9.56231C11.5866 9.86693 11.2092 10.2176 10.8753 10.6067C12.3055 11.5446 13.25 13.162 13.25 15C13.25 17.8995 10.8995 20.25 8 20.25C5.10051 20.25 2.75 17.8995 2.75 15C2.75 12.1005 5.10051 9.75 8 9.75C8.51 9.75 9.00302 9.82272 9.46924 9.95836C9.80438 9.52487 10.1817 9.12566 10.5951 8.76689Z",fill:"#110529"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2.75C9.10051 2.75 6.75 5.10051 6.75 8C6.75 10.8995 9.10051 13.25 12 13.25C14.8995 13.25 17.25 10.8995 17.25 8C17.25 5.10051 14.8995 2.75 12 2.75ZM5.25 8C5.25 4.27208 8.27208 1.25 12 1.25C15.7279 1.25 18.75 4.27208 18.75 8C18.75 11.7279 15.7279 14.75 12 14.75C8.27208 14.75 5.25 11.7279 5.25 8Z",fill:"#07AD3E"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.25 15C21.25 12.9441 20.0683 11.1643 18.3471 10.3026C18.5192 9.82834 18.6396 9.32933 18.7016 8.81237C21.0847 9.85434 22.75 12.2327 22.75 15C22.75 18.7279 19.7279 21.75 16 21.75C13.9499 21.75 12.1132 20.836 10.8753 19.3933C11.2961 19.1174 11.6749 18.7825 12 18.4005C12.963 19.5322 14.3977 20.25 16 20.25C18.8995 20.25 21.25 17.8995 21.25 15ZM11.1556 17.0269C10.8943 16.4032 10.75 15.7185 10.75 15C10.75 12.1005 13.1005 9.75 16 9.75C16.3146 9.75 16.6227 9.77767 16.922 9.83069C17.0939 9.36877 17.2026 8.87611 17.2376 8.36321C16.8364 8.28886 16.4227 8.25 16 8.25C12.2721 8.25 9.25 11.2721 9.25 15C9.25 16.139 9.53213 17.2122 10.0303 18.1534C10.481 17.8626 10.8653 17.4779 11.1556 17.0269Z",fill:"#110529"},null,-1)]))}const dhe=Wr(uhe,[["render",fhe]]),Ahe={key:4,class:"size"},L7=d.defineComponent({__name:"AesButton",props:{data:{}},emits:["ref"],setup(e,{emit:t}){const n=e,r=n.data.type==="fill"||n.data.type==="stroke",a=d.computed(()=>({icon__white:r&&n.data.value.toLowerCase()==="#ffffff",icon__empty:r&&n.data.value.toLowerCase()==="transparent"})),i=d.computed(()=>n.data.type==="fill"?{"background-color":n.data.value}:n.data.type==="stroke"&&!a.value.icon__empty&&!a.value.icon__white?{"border-color":n.data.value}:{});return(o,s)=>(d.openBlock(),d.createElementBlock("div",{class:"ui-aes-button",ref:c=>o.$emit("ref",c)},[d.createVNode(AB,{class:"ui-multiselect-button__contour"}),o.data.type==="fill"?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["icon icon__fill",a.value]),style:d.normalizeStyle(i.value)},null,6)):o.data.type==="stroke"?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["icon icon__stroke",a.value]),style:d.normalizeStyle(i.value)},null,6)):o.data.type==="dotShape"?(d.openBlock(),d.createElementBlock("div",{key:2,class:d.normalizeClass(["icon dot",{[`dot__${o.data.value}`]:!0}])},null,2)):o.data.type==="lineType"?(d.openBlock(),d.createElementBlock("div",{key:3,class:d.normalizeClass(["icon icon__line",{[`line__${o.data.value}`]:!0}])},null,2)):o.data.type==="size"?(d.openBlock(),d.createElementBlock("span",Ahe,d.toDisplayString(o.data.value),1)):o.data.type==="data"?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(dhe),{key:5,class:"icon"})):d.createCommentVNode("",!0)],512))}}),phe={},hhe={class:"inline-icon",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function mhe(e,t){return d.openBlock(),d.createElementBlock("svg",hhe,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 8L7.53033 13.5303L8.59099 12.4697L4.87132 8.75L14.0607 8.75L14.0607 7.25L4.87132 7.25L8.59099 3.53033L7.53033 2.46967L2 8Z",fill:"#110529"},null,-1)]))}const vhe=Wr(phe,[["render",mhe]]),ghe={ref:"root",class:"aes-settings-form"},yhe={class:"aes-settings-form__header"},Qh=d.defineComponent({__name:"FormWrapper",props:{title:{},backTitle:{}},emits:["form:close"],setup(e,{emit:t}){return(n,r)=>(d.openBlock(),d.createBlock(d.Teleport,{to:"#graph-settings-modal"},[d.createElementVNode("div",ghe,[d.createElementVNode("div",yhe,[d.createElementVNode("div",{onClick:r[0]||(r[0]=d.withModifiers(a=>n.$emit("form:close"),["stop"])),class:"back-link"},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(vhe))),d.createTextVNode(" "+d.toDisplayString(`Back to ${n.backTitle}`),1)]),d.createElementVNode("h3",null,d.toDisplayString(n.title),1)]),d.renderSlot(n.$slots,"default")],512)]))}}),whe={class:"ui-multiselect-button__content"},Che={key:0,class:"title"},bhe={key:1,class:"gradient"},Ehe=6,o3=d.defineComponent({__name:"MultiselectButton",props:{label:{},title:{},palette:{}},emits:["button-click"],setup(e,{emit:t}){const n=d.ref(void 0);pt.useLabelNotch(n);function r(a){const i=100/(a.length-1);return`background: linear-gradient(to right, ${a.map((o,s)=>`${o} ${s*i}%`).join(", ")})`}return(a,i)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"root",ref:n,class:"ui-multiselect-button",onClick:i[0]||(i[0]=d.withModifiers(o=>a.$emit("button-click"),["stop"]))},[a.label?(d.openBlock(),d.createElementBlock("label",{key:0,ref:"label"},d.toDisplayString(a.label),513)):d.createCommentVNode("",!0),d.createVNode(AB,{class:"ui-multiselect-button__contour"}),d.createElementVNode("div",whe,[a.title?(d.openBlock(),d.createElementBlock("div",Che,d.toDisplayString(a.title),1)):d.createCommentVNode("",!0),a.palette&&d.unref(tS)(a.palette)?(d.openBlock(),d.createElementBlock("div",bhe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(Do)[a.palette].colors.slice(0,Ehe),o=>(d.openBlock(),d.createElementBlock("div",{class:"gradient__item",style:d.normalizeStyle({background:o})},null,4))),256))])):a.palette?(d.openBlock(),d.createElementBlock("div",{key:2,class:"gradient",style:d.normalizeStyle(r(d.unref(Do)[a.palette].colors))},null,4)):(d.openBlock(),d.createBlock(d.unref(pt.PlIcon16),{key:3,class:"icon",name:"chevron-right"}))])],512))}}),xhe={class:"palettes-groups"},She={class:"palettes-list"},Bhe=["onClick"],khe={class:"palette-gradient"},The={class:"palettes-list"},_he=["onClick"],Phe={class:"palettes-list"},Mhe=["onClick"],Dhe=9,l3=d.defineComponent({__name:"PalettesForm",props:{selected:{},categorical:{type:Boolean,default:!0},sequential:{type:Boolean,default:!0},diverging:{type:Boolean,default:!0}},emits:["select"],setup(e,{emit:t}){const n=t;function r(i){n("select",i)}function a(i){const o=100/(i.length-1);return`background: linear-gradient(to right, ${i.map((s,c)=>`${s} ${c*o}%`).join(", ")})`}return(i,o)=>(d.openBlock(),d.createElementBlock("div",xhe,[i.categorical?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[o[0]||(o[0]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"CATEGORICAL")],-1)),o[1]||(o[1]=d.createElementVNode("div",{class:"section-description"}," Best to representing categorical data ",-1)),d.createElementVNode("div",She,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(oL),s=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["palettes-list__palette",{selected:i.selected===s}]),onClick:d.withModifiers(c=>r(s),["stop"])},[d.createElementVNode("div",null,d.toDisplayString(d.unref(Do)[s].title),1),d.createElementVNode("div",khe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(Do)[s].colors.slice(0,Dhe),c=>(d.openBlock(),d.createElementBlock("div",{class:"palette-gradient__item",style:d.normalizeStyle({background:c})},null,4))),256))])],10,Bhe))),256))])],64)):d.createCommentVNode("",!0),i.sequential?(d.openBlock(),d.createElementBlock(d.Fragment,{key:1},[o[2]||(o[2]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"SEQUENTIAL")],-1)),o[3]||(o[3]=d.createElementVNode("div",{class:"section-description"}," Best to representing sequential data ",-1)),d.createElementVNode("div",The,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(pae),s=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["palettes-list__palette",{selected:i.selected===s}]),onClick:d.withModifiers(c=>r(s),["stop"])},[d.createElementVNode("div",null,d.toDisplayString(d.unref(Do)[s].title),1),d.createElementVNode("div",{class:"palette-gradient",style:d.normalizeStyle(a(d.unref(Do)[s].colors))},null,4)],10,_he))),256))])],64)):d.createCommentVNode("",!0),i.diverging?(d.openBlock(),d.createElementBlock(d.Fragment,{key:2},[o[4]||(o[4]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"DIVERGING")],-1)),o[5]||(o[5]=d.createElementVNode("div",{class:"section-description"}," Best to representing diverging data ",-1)),d.createElementVNode("div",Phe,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(d.unref(hae),s=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["palettes-list__palette",{selected:i.selected===s}]),onClick:d.withModifiers(c=>r(s),["stop"])},[d.createElementVNode("div",null,d.toDisplayString(d.unref(Do)[s].title),1),d.createElementVNode("div",{class:"palette-gradient",style:d.normalizeStyle(a(d.unref(Do)[s].colors))},null,4)],10,Mhe))),256))])],64)):d.createCommentVNode("",!0)]))}}),Hhe=["onClick"],d$=d.defineComponent({__name:"FixedColorsList",props:{modelValue:{},colorUsing:{default:"fill"},colorsList:{default:()=>_y}},emits:["update:modelValue"],setup(e,{emit:t}){return(n,r)=>(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.colorsList,a=>(d.openBlock(),d.createElementBlock("div",{key:a.color,class:d.normalizeClass(["color-item",{border:n.colorUsing==="stroke",white:a.name==="White",empty:a.name==="None",selected:a.color===n.modelValue}]),style:d.normalizeStyle(a.name!=="White"&&a.name!=="None"?`${n.colorUsing==="fill"?"background":"border-color"}: ${a.color};`:""),onClick:i=>n.$emit("update:modelValue",a.color)},r[0]||(r[0]=[d.createElementVNode("div",{class:"checkmark"},null,-1)]),14,Hhe))),128))}}),Ihe=["onClick"],Lhe={class:"row-item__title"},fb=d.defineComponent({__name:"FixedLineTypeList",props:{modelValue:{},list:{default:()=>My}},emits:["update:modelValue"],setup(e,{emit:t}){return(n,r)=>(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.list,a=>(d.openBlock(),d.createElementBlock("div",{key:a,class:d.normalizeClass(["row-item",{"row-item__selected":a===n.modelValue,[`line__${a}`]:!0}]),onClick:i=>n.$emit("update:modelValue",a)},[d.createElementVNode("div",Lhe,d.toDisplayString(d.unref(vae)[a].title),1),(d.openBlock(),d.createElementBlock("svg",{class:d.normalizeClass(["row-item__line line",{[`line__${a}`]:!0}])},r[0]||(r[0]=[d.createElementVNode("line",{x1:"0",x2:"100%",y1:"50%",y2:"50%"},null,-1)]),2))],10,Ihe))),128))}}),Rhe=["onClick"],A$=d.defineComponent({__name:"FixedDotShapeList",props:{modelValue:{},list:{default:()=>N5}},emits:["update:modelValue"],setup(e,{emit:t}){return(n,r)=>(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.list,a=>(d.openBlock(),d.createElementBlock("div",{key:a,class:d.normalizeClass(["color-item dot",{selected:a===n.modelValue,[`dot__${a}`]:!0}]),onClick:i=>n.$emit("update:modelValue",a)},null,10,Rhe))),128))}}),db=d.defineComponent({__name:"Popup",props:{gap:{default:8},targetRef:{},width:{default:258},height:{}},emits:["popup:close"],setup(e,{emit:t}){const n=t,r=e;function a(){n("popup:close")}const i=d.ref(),o=d.ref(r.targetRef),s=d.ref("bottom"),c=d.ref(""),f=d.ref("");function A(h,m=8){pt.usePosition(h,g=>{if(r.height&&g.offsetY+g.height+3*m+r.height>g.clientHeight){const C=g.right-g.width-m;if(g.clientHeight-g.offsetY>r.height+m){const x=g.offsetY;c.value=`left: ${C}px; top: ${x}px;`,f.value="top: 16px;",s.value="left-bottom"}else{const x=g.clientHeight-r.height-2*m;c.value=`left: ${C}px; top: ${x}px;`;const k=g.offsetY+2*Math.floor(g.height/2),_=g.clientHeight-k;f.value=`bottom: ${_}px;`,s.value="left-bottom"}}else c.value=`left: ${g.right}px; top: ${g.offsetY+g.height+m}px;`,f.value="",s.value="bottom"})}return A(o,r.gap),pt.useClickOutside([o,i],()=>a()),(h,m)=>(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[d.createElementVNode("div",{class:"popup",style:d.normalizeStyle(c.value),onClick:m[0]||(m[0]=g=>g.stopPropagation())},[d.createElementVNode("div",{ref_key:"popup",ref:i,class:d.normalizeClass(["popup__content",s.value]),style:d.normalizeStyle({width:`${h.width}px`})},[d.createElementVNode("div",null,[d.renderSlot(h.$slots,"default")]),(d.openBlock(),d.createElementBlock("svg",{style:d.normalizeStyle(f.value),class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m[1]||(m[1]=[d.createElementVNode("path",{d:"M4 8L0 4L4 0L4 8 Z"},null,-1),d.createElementVNode("polyline",{points:"4,8 0,4 4,0"},null,-1)]),4))],6)],4)]))}}),Nhe={},$he={xmlns:"http://www.w3.org/2000/svg",width:"8",height:"12",viewBox:"0 0 8 12",fill:"none"};function Fhe(e,t){return d.openBlock(),d.createElementBlock("svg",$he,t[0]||(t[0]=[d.createStaticVNode('<path d="M2.5 0H0.5V2H2.5V0Z" fill="#CFD1DB"></path><path d="M2.5 5H0.5V7H2.5V5Z" fill="#CFD1DB"></path><path d="M0.5 10H2.5V12H0.5V10Z" fill="#CFD1DB"></path><path d="M7.5 0H5.5V2H7.5V0Z" fill="#CFD1DB"></path><path d="M5.5 5H7.5V7H5.5V5Z" fill="#CFD1DB"></path><path d="M7.5 10H5.5V12H7.5V10Z" fill="#CFD1DB"></path>',6)]))}const Vhe=Wr(Nhe,[["render",Fhe]]);var Ohe=Object.defineProperty,Qhe=(e,t,n)=>t in e?Ohe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pB=(e,t,n)=>Qhe(e,typeof t!="symbol"?t+"":t,n);function zhe(e,t){if(e==null)throw Error(t??"Empty (null | undefined) value");return e}function Uhe(e,t){if(e===void 0)throw Error(t??"Undefined value");return e}function jhe(e=void 0){return e}function Ghe(e){return e}function Yhe(e){return[...new Set(e)]}function Whe(e,t){if(e==null)throw Error(t??"Empty (null | undefined) value")}function Xhe(e,t){if(e===void 0)throw Error(t??"Undefined value")}function Khe(e,t,n){const r=Math.min(t,n),a=Math.max(t,n);return e>=r&&e<=a}function Zhe(e){return e.map(t=>({text:String(t),value:t}))}function Jhe(e){return function(...t){const n=e(...t);async function r(a){return a.done?Promise.resolve(a.value):Promise.resolve(a.value).then(i=>r(n.next(i))).catch(i=>r(n.throw(i)))}try{return r(n.next())}catch(a){return Promise.reject(a instanceof Error?a:Error(String(a)))}}}class qhe{constructor(){pB(this,"promise"),pB(this,"resolve",()=>{}),pB(this,"reject",()=>{}),this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}}function hB(e){return new Promise(t=>setTimeout(t,e))}function e1e(){return new Promise(e=>queueMicrotask(e))}function t1e(){const e=new Date().getTime();return function(){return new Date().getTime()-e}}function n1e(){const e=performance.now();return function(){return performance.now()-e}}function r1e(e){return e()}function a1e(e,t,n){return t>e?t:e>n?n:e}function i1e(e,t){return t(e)}function o1e(e,t){if(e!=null)return t(e)}function l1e(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e}function*p$(e,t,n=1){for(let r=e;r<t;r+=n)yield r}function h$(e){const t=[];for(const n of e)t.push(n);return t}function s1e(e,t){return h$(p$(0,e)).map(t)}let u1e=class{constructor(t){this._delay=t}async*generate(){let t=0;for(;;)await hB(this._delay),yield t++}async*[Symbol.asyncIterator](){let t=0;for(;;)await hB(this._delay),yield t++}};function c1e(e,t){return Array.from({length:e},(n,r)=>t(r))}function f1e(e,t){throw Error(t)}function d1e(e){return t=>e[t]()}function A1e(e){if(e&&e.ok)return e.value}function p1e(e){if(e&&!e.ok)return e.error}function h1e(e){if(e.ok)return e.value;throw Error(e.error)}function m1e(e){return Array.isArray(e)?e:[e]}async function v1e(e){return Object.fromEntries(await Promise.all(Object.entries(e).map(async([t,n])=>[t,await n])))}function g1e(e,t){return Object.keys(t).every(n=>e[n]===t[n])}const y1e=e=>e;function w1e(e){return e}function C1e(e){return Object.entries(e).map(([t,n])=>({key:t,value:n}))}const R7=Object.freeze(Object.defineProperty({__proto__:null,Deferred:qhe,Interval:u1e,alike:g1e,arrayFrom:c1e,asConst:w1e,async:Jhe,between:Khe,bool:Ghe,call:r1e,checkIfDefined:Xhe,checkIfNotEmpty:Whe,clamp:a1e,delay:hB,errorOptional:p1e,exhaustive:f1e,flatValue:m1e,identity:y1e,listToOptions:Zhe,match:d1e,notEmpty:zhe,notUndef:Uhe,okOptional:A1e,performanceTimer:n1e,randomInt:l1e,range:p$,resolveAwaited:v1e,tap:i1e,tapIf:o1e,tear:e1e,timer:t1e,times:s1e,toList:h$,undef:jhe,unionize:C1e,uniqueValues:Yhe,unwrap:h1e},Symbol.toStringTag,{value:"Module"})),N7=Array.isArray;function Ab(e){return e!==null&&typeof e=="object"}function s3(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null}function b1e(e,t){return Object.keys(e).map(n=>t(e[n],n))}function m$(e){return Object.values(e).reduce((t,n)=>n!==void 0?t+1:t,0)}function pb(e,t){if(!(Ab(e)&&Ab(t)))return e===t;if(N7(e)&&N7(t))return e.length!==t.length?!1:[...e.keys()].every(n=>pb(e[n],t[n]));if(s3(e)&&s3(t))return m$(e)!==m$(t)?!1:Object.keys(e).every(n=>pb(e[n],t[n]));throw Error(`Cannot compare a ${String(e)} and b ${String(t)}`)}const E1e=pb;function mB(e){if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=mB(e[n]);return t}else if(s3(e)){const t={};return Object.keys(e).forEach(n=>{t[n]=mB(e[n])}),t}else return e}function x1e(e){return Array.isArray(e)?Object.assign([],e):Ab(e)?Object.assign({},e):e}function S1e(e,t){const n={};for(const r in t)t[r]!==e[r]&&(n[r]=e[r]);return n}function B1e(e){return Object.entries(e).forEach(([t,n])=>{n instanceof Function&&(e[t]=n.bind(e))}),e}function k1e(e,t,n){return e[t]=n,e}function T1e(e,t){return e[t]}function _1e(e,t){e={...e};const n=e[t];return delete e[t],[n,e]}function P1e(e,...t){return Object.assign({},...t.map(n=>({[n]:e[n]})))}function M1e(e,...t){return t.map(n=>e[n])}function D1e(e,...t){const n=Object.assign({},e);return t.forEach(r=>delete n[r]),n}function v$(e,t){return new Set([...Object.keys(e),...Object.keys(t)]).forEach(n=>{const r=e[n],a=t[n];s3(r)&&s3(a)||N7(r)&&N7(a)&&r.length===a.length?v$(r,a):e[n]=a}),e}const H1e=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:B1e,deepClone:mB,deepEqual:E1e,deepPatch:v$,getProp:T1e,isArray:N7,isJsonEqual:pb,isNonPrimitive:Ab,isPlainObject:s3,map:b1e,omit:D1e,pick:P1e,pickValues:M1e,setProp:k1e,shallowClone:x1e,shallowDiff:S1e,shiftProp:_1e},Symbol.toStringTag,{value:"Module"})),hb=1,I1e=d.defineComponent({__name:"PlColorSliderThumb",props:{barRef:{},modelValue:{},min:{default:0},max:{default:100},getColorForPercent:{},padding:{default:16},isActive:{type:Boolean}},emits:["update:modelValue","active"],setup(e,{emit:t}){const n=e,r=t,a=d.ref(),i=d.ref(),o=d.ref(!1),s=n.min,c=n.max;let f=d.ref(0);const A=c-s,h=n.padding/n.barRef.getBoundingClientRect().width*100/2,m=d.computed(()=>R7.clamp((n.modelValue??0)+f.value,Math.ceil(s+h),Math.ceil(c-h))),g=d.computed(()=>({right:`calc(${Math.ceil((1-b.value)*100)}%) `})),b=d.computed(()=>(m.value-s)/A);function C(O){const I=R7.clamp(O,s,c);return Math.round((I+Number.EPSILON)*(1/hb))/(1/hb)}function x(){o.value=!1}function k(O){O?(document.addEventListener("mouseup",x),document.addEventListener("focusout",x)):(document.removeEventListener("mouseup",x),document.removeEventListener("focusout",x)),o.value=O,r("active",O)}pt.useMouseCapture(a,O=>{var I;R7.tapIf((I=d.unref(n.barRef))==null?void 0:I.getBoundingClientRect(),$=>{const{dx:Q}=O;f.value=Q/$.width*A,O.stop&&(r("update:modelValue",C(m.value)),f.value=0)})});function _(O){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(O.code)&&O.preventDefault(),O.code==="ArrowLeft"&&r("update:modelValue",R7.clamp(n.modelValue-hb,s,c)),O.code==="ArrowRight"&&r("update:modelValue",R7.clamp(n.modelValue+hb,s,c))}function D(O){var I,$;O?(I=i.value)==null||I.classList.add("pl-color-slider__top-index"):($=i.value)==null||$.classList.remove("pl-color-slider__top-index")}return(O,I)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"wrapper",ref:i,style:d.normalizeStyle(g.value),class:d.normalizeClass([{"active-thumb":o.value||O.isActive},"pl-color-slider__thumb"]),tabindex:"0",onMousedown:I[2]||(I[2]=$=>k(!0)),onMouseup:I[3]||(I[3]=$=>k(!1)),onKeydown:_,onFocus:I[4]||(I[4]=$=>k(!0))},[d.createElementVNode("div",{ref_key:"thumb",ref:a,class:d.normalizeClass([{active:o.value},"pl-color-slider__thumb-roof"]),onMouseover:I[0]||(I[0]=$=>D(!0)),onMouseout:I[1]||(I[1]=$=>D(!1))},[d.createElementVNode("div",{class:"pl-color-slider__thumb-color-indicator",style:d.normalizeStyle({backgroundColor:O.getColorForPercent(m.value)})},null,4)],34)],38))}}),L1e={class:"pl-color-slider"},R1e={class:"pl-color-slider__wrapper"},N1e={class:"pl-color-slider__thumbs-contaier"},$1e=d.defineComponent({__name:"PlColorSlider",props:{colors:{},modelValue:{},getColorForPercent:{type:Function},active:{}},emits:["update:modelValue","active"],setup(e,{emit:t}){const n=e,r=t,a=d.ref(),i=d.reactive({}),o=d.ref(-1);d.watch(()=>n.modelValue,()=>{n.modelValue.forEach((A,h)=>i[h]=A)},{immediate:!0});const s=d.computed(()=>Math.floor(o.value!==-1?0-o.value:0)),c=d.computed(()=>Math.floor(o.value!==-1?100+o.value:100));d.watch(()=>i,A=>{r("update:modelValue",Object.values(A))},{deep:!0});const f=d.computed(()=>{const A=100/(n.colors.length-1);return`linear-gradient(to right, ${n.colors.map((m,g)=>`${m} ${A*g}%`).join(", ")})`});return d.onMounted(()=>{let A=16,h=a.value.getBoundingClientRect().width-A*2;o.value=A/h*100}),(A,h)=>(d.openBlock(),d.createElementBlock("div",L1e,[d.createElementVNode("div",R1e,[d.createElementVNode("div",{ref_key:"barRef",ref:a,class:"pl-color-slider__color-contaier"},[d.createElementVNode("div",{style:d.normalizeStyle({background:f.value}),class:"pl-color-slider__gradient"},null,4)],512),d.createElementVNode("div",N1e,[a.value?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(A.modelValue,(m,g)=>(d.openBlock(),d.createBlock(I1e,{modelValue:i[g],"onUpdate:modelValue":b=>i[g]=b,"is-active":A.active===g,key:g,min:s.value,max:c.value,"bar-ref":a.value,"get-color-for-percent":A.getColorForPercent,class:"pl-color-slider__thumb",tabindex:"0",onActive:b=>A.$emit("active",{index:g,status:b})},null,8,["modelValue","onUpdate:modelValue","is-active","min","max","bar-ref","get-color-for-percent","onActive"]))),128)):d.createCommentVNode("",!0)])])]))}});function g$(e,t){if(t==="lineType")return e*32+16*2;if(t==="dotShape"||t==="color")return Math.ceil(e/6)*36+20*2}const F1e={class:"aes-mapping-block"},V1e={style:{margin:"0 24px"}},O1e={class:"section-title"},Q1e={style:{margin:"24px 0"}},z1e={key:0,style:{margin:"24px 0"}},U1e={key:0,class:"aes-settings-hint"},j1e={key:0,class:"column-value__reorder-icon"},G1e={class:"column-value__title"},Y1e={class:"column-value__aes-group"},W1e=["onClick"],X1e=["onClick"],K1e=["onClick"],vB=d.defineComponent({__name:"AesDataMappingDiscrete",props:{dataColumnLabel:{},columnValueLabels:{},usedAesInMapping:{},modelValue:{},allowReordering:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,a=d.ref(!1),i=d.ref(n.modelValue.palette),o=d.computed(()=>tS(i.value)),s=d.ref(null),c=d.computed(()=>s.value===null?null:n.modelValue.order.indexOf(s.value)),f=d.ref(null),A=d.computed(()=>n.modelValue.order.map(re=>{var G;const U=(G=n.modelValue.mapping[re])==null?void 0:G.aes;return{text:n.columnValueLabels[re],value:re,dotShape:U==null?void 0:U.dotShape,color:U==null?void 0:U.color,lineType:U==null?void 0:U.lineShape}}));function h(re){i.value=re,a.value=!1,r("update:modelValue",gR(re,n.modelValue.order))}function m(re,U,G){r("update:modelValue",{...n.modelValue,mapping:{...n.modelValue.mapping,[re]:{...n.modelValue.mapping[re],aes:{...n.modelValue.mapping[re].aes,[U]:G}}}})}const g=d.reactive({color:{},dotShape:{},lineType:{}});function b(re,U,G){G&&!g[re][U.value]&&(g[re][U.value]=G)}function C(re,U){const G=s.value===re.value&&f.value===U;s.value=G?null:re.value,f.value=G?null:U}function x(){s.value=null,f.value=null}const k=d.computed(()=>Do[i.value].colors.map(re=>({color:re,name:re}))),_=d.computed(()=>f.value?g$(f.value==="lineType"?My.length:f.value==="dotShape"?N5.length:k.value.length,f.value):0),D=d.ref();n.allowReordering&&pt.useSortable(D,{handle:".column-value__reorder-icon",onChange(re){r("update:modelValue",{...n.modelValue,order:re.map(U=>n.modelValue.order[U])})}});function O(re,U,G=0,Z=1){const Y=1/(re.length-1),X=Da().domain(re.map((oe,me)=>G+me*Y*(Z-G))).range(re);return oe=>oe>Z||oe<G?U:X(oe)}const I=d.computed(()=>O(Do[i.value].colors,dC)),$=d.computed(()=>O(Do[i.value].colors,dC,0,100)),Q=d.ref(n.modelValue.order.map(re=>n.modelValue.mapping[re].colorIdx*100));d.watch(()=>n.modelValue,re=>{Q.value=re.order.map(U=>re.mapping[U].colorIdx*100)});function ee(re){re.forEach((U,G)=>{const Z=n.modelValue.order[G],Y=U/100;n.modelValue.mapping[Z].colorIdx!==Y&&r("update:modelValue",{...n.modelValue,mapping:{...n.modelValue.mapping,[Z]:{colorIdx:Y,aes:{...n.modelValue.mapping[Z].aes,color:I.value(Y)}}}})})}function K(re){f.value="color",s.value=re.status?n.modelValue.order[re.index]:null}return(re,U)=>(d.openBlock(),d.createElementBlock("div",F1e,[d.createElementVNode("div",V1e,[d.createElementVNode("div",O1e,[d.createElementVNode("span",null,d.toDisplayString(re.dataColumnLabel),1)]),d.createElementVNode("div",Q1e,[d.createVNode(o3,{label:"Color Palette ",icon:"chevron-right",title:d.unref(Do)[i.value].title,palette:i.value,onButtonClick:U[0]||(U[0]=G=>{a.value=!0,x()})},null,8,["title","palette"])]),o.value?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",z1e,[d.createVNode($1e,{modelValue:Q.value,"onUpdate:modelValue":[U[1]||(U[1]=G=>Q.value=G),ee],colors:d.unref(Do)[i.value].colors,"get-color-for-percent":$.value,active:c.value,onActive:K},null,8,["modelValue","colors","get-color-for-percent","active"])])),a.value?(d.openBlock(),d.createBlock(Qh,{key:1,title:"Color Palette","back-title":"Color mapping","onForm:close":U[2]||(U[2]=G=>a.value=!1)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:i.value,onSelect:h},null,8,["selected"])]),_:1})):d.createCommentVNode("",!0)]),re.allowReordering?(d.openBlock(),d.createElementBlock("div",U1e," Drag the rows to reorder ")):d.createCommentVNode("",!0),d.createElementVNode("div",{class:"column-values-list",ref_key:"optionsListRef",ref:D},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(A.value,G=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["column-value",{"column-value__with-reorder":re.allowReordering}])},[re.allowReordering?(d.openBlock(),d.createElementBlock("div",j1e,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(Vhe)))])):d.createCommentVNode("",!0),d.createElementVNode("div",G1e,d.toDisplayString(G.text),1),d.createElementVNode("div",Y1e,[re.usedAesInMapping.lineType?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["column-value__aes",{aes__selected:s.value===G.value&&f.value==="lineType"}]),ref_for:!0,ref:Z=>b("lineType",G,Z),onClick:d.withModifiers(Z=>C(G,"lineType"),["stop"])},[d.createElementVNode("div",{class:d.normalizeClass(["icon__line line",{[`line__${G.lineType}`]:!0}])},null,2)],10,W1e)):d.createCommentVNode("",!0),re.usedAesInMapping.dotShape?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["column-value__aes",{aes__selected:s.value===G.value&&f.value==="dotShape"}]),ref_for:!0,ref:Z=>b("dotShape",G,Z),onClick:d.withModifiers(Z=>C(G,"dotShape"),["stop"])},[d.createElementVNode("div",{class:d.normalizeClass(["dot",{[`dot__${G.dotShape}`]:!0}])},null,2)],10,X1e)):d.createCommentVNode("",!0),re.usedAesInMapping.fill||re.usedAesInMapping.stroke?(d.openBlock(),d.createElementBlock("div",{key:2,class:d.normalizeClass(["column-value__aes",{aes__selected:s.value===G.value&&f.value==="color"}]),ref_for:!0,ref:Z=>b("color",G,Z),onClick:d.withModifiers(Z=>C(G,"color"),["stop"])},[d.createElementVNode("div",{class:"column-value__color",style:d.normalizeStyle({background:G.color})},null,4)],10,K1e)):d.createCommentVNode("",!0),(f.value!=="color"||o.value)&&f.value!==null&&s.value===G.value?(d.openBlock(),d.createBlock(db,{key:`${f.value}_${s.value}`,targetRef:g[f.value][s.value],"onPopup:close":x,height:_.value},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["fixed-aes-list",{"fixed-aes-list__rows":!1}])},[f.value==="lineType"?(d.openBlock(),d.createBlock(fb,{key:0,"onUpdate:modelValue":[Z=>m(G.value,"lineShape",Z),Z=>G.lineType=Z],modelValue:G.lineType},null,8,["onUpdate:modelValue","modelValue"])):d.createCommentVNode("",!0),f.value==="dotShape"?(d.openBlock(),d.createBlock(A$,{key:1,"onUpdate:modelValue":[Z=>m(G.value,"dotShape",Z),Z=>G.dotShape=Z],modelValue:G.dotShape},null,8,["onUpdate:modelValue","modelValue"])):d.createCommentVNode("",!0),f.value==="color"?(d.openBlock(),d.createBlock(d$,{key:2,"colors-list":k.value,"onUpdate:modelValue":[Z=>m(G.value,"color",Z),Z=>G.color=Z],modelValue:G.color},null,8,["colors-list","onUpdate:modelValue","modelValue"])):d.createCommentVNode("",!0)])]),_:2},1032,["targetRef","height"])):d.createCommentVNode("",!0)])],2))),256))],512)]))}}),Z1e={class:"axes-settings-list"},J1e={class:"axes-settings-options-row block"},q1e={key:0,class:"axes-settings-input"},eme={class:"axes-settings-options-row"},tme={key:0,class:"axes-settings-options-row"},nme={key:1,class:"axes-settings-options-row"},rme={key:2,class:"axes-settings-options-row"},ame={class:"axes-settings-options-row block"},ime={key:3},ome={class:"axes-settings-options-row table"},lme={class:"axes-settings-options-row table"},sme={class:"axes-settings-options-row table"},ume={class:"axes-settings-options-row block"},cme={key:0},fme={class:"axes-settings-options-row block"},dme={class:"axes-settings-options-row table"},Ame={class:"axes-settings-options-row table"},pme={class:"other"},hme={class:"axes-settings-options-row"},mme={class:"axes-settings-options-row"},vme={class:"axes-settings-options-row"},gme={class:"axes-settings-options-row block"},yme=d.defineComponent({__name:"DiscreteAxesSettingsForm",setup(e){const t=da(),n=t.value.reactive.axesSettings,r={height:40,horizontalPadding:12,defaultState:"open"},a=[{value:"left",icon:P7},{value:"center",icon:M7},{value:"right",icon:D7}],i=[{value:"center",icon:lB},{value:"45deg",icon:sB},{value:"90deg",icon:uB}],o=[{value:"auto",text:"Auto"},{value:"custom",text:"Custom"},{value:"hidden",text:"Hide"}],s=[{value:"linear",text:"Linear"},{value:"log",text:"Log"}],c=[{value:"empty",icon:I7},{value:"left",icon:cB},{value:"bottom",icon:fB},{value:"left-bottom",icon:dB},{value:"full",icon:H7}],f=d.computed(()=>t.value.inputGuide.value),A=d.computed(()=>t.value.uniqueValuesData.value),h=d.ref(!1),m=d.ref(!1),g=d.computed(()=>{var re,U;return(U=(re=t.value.reactive.optionsState.components.primaryGrouping)==null?void 0:re.selectorStates[0])==null?void 0:U.selectedSource}),b=d.computed(()=>{var re,U;return(U=(re=t.value.reactive.optionsState.components.secondaryGrouping)==null?void 0:re.selectorStates[0])==null?void 0:U.selectedSource}),C=d.computed(()=>t.value.commonHelpersData.primaryGroups.value),x=d.computed(()=>t.value.commonHelpersData.secondaryGroups.value),k=d.computed(()=>t.value.commonHelpersData.usedAesInMapping.value),_=d.ref(t.value.reactive.dataBindAes[g.value]??Uy(C.value)),D=d.ref(t.value.reactive.dataBindAes[b.value]??Uy(x.value)),O=d.computed(()=>{var re;if(g.value){const U=f.value.getSourceInfo(g.value)??null,G=((re=A.value[g.value])==null?void 0:re.labels)??null;return{selectedSourceInfo:U,labels:C.value.reduce((Z,Y)=>(Z[Y]=(G==null?void 0:G[Y])??String(Y),Z),{})}}}),I=d.computed(()=>{var re;if(b.value){const U=f.value.getSourceInfo(b.value)??null,G=((re=A.value[b.value])==null?void 0:re.labels)??null;return{selectedSourceInfo:U,labels:x.value.reduce((Z,Y)=>(Z[Y]=(G==null?void 0:G[Y])??String(Y),Z),{})}}});function $(re,U){t.value.reactive.dataBindAes[U]=re}const Q=[{text:"X",value:"x"},{text:"Y",value:"y"},{text:"XY",value:"xy"},{text:"None",value:"none"}],ee=d.computed(()=>A.value[g.value]),K=d.computed({get(){var re;return DR(n.axisX.labelsRotation,(re=ee.value)==null?void 0:re.options)},set(re){n.axisX.labelsRotation=re}});return(re,U)=>(d.openBlock(),d.createElementBlock("div",{class:"axes-form",onClick:U[26]||(U[26]=G=>G.stopPropagation())},[U[38]||(U[38]=d.createElementVNode("h3",{class:"axes-title"}," Axes ",-1)),d.createElementVNode("div",Z1e,[d.createVNode(ts,{title:"Title",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",J1e,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).title.mode,"onUpdate:modelValue":U[0]||(U[0]=G=>d.unref(n).title.mode=G)},null,8,["modelValue"])]),d.unref(n).title.mode==="custom"?(d.openBlock(),d.createElementBlock("div",q1e,[d.createVNode(d.unref(pt.PlTextField),{label:"Chart title",placeholder:"Chart title",modelValue:d.unref(n).title.value,"onUpdate:modelValue":U[1]||(U[1]=G=>d.unref(n).title.value=G)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",eme,[U[27]||(U[27]=d.createElementVNode("span",null,"Alignment",-1)),d.createVNode(Uf,{options:a,modelValue:d.unref(n).title.position,"onUpdate:modelValue":U[2]||(U[2]=G=>d.unref(n).title.position=G)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"X-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[C.value.length>1?(d.openBlock(),d.createElementBlock("div",tme,[U[28]||(U[28]=d.createElementVNode("span",null,"Primary groups order: ",-1)),d.createVNode(L7,{data:{type:"data",value:null},onClick:U[3]||(U[3]=G=>{h.value=!0})}),h.value&&O.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Reorder primary groups","back-title":"Axes Settings","onForm:close":U[6]||(U[6]=G=>h.value=!1)},{default:d.withCtx(()=>{var G;return[d.createVNode(vB,{"column-value-labels":O.value.labels,"data-column-label":((G=O.value.selectedSourceInfo)==null?void 0:G.label)??"","used-aes-in-mapping":k.value[g.value],"allow-reordering":"",modelValue:_.value,"onUpdate:modelValue":[U[4]||(U[4]=Z=>_.value=Z),U[5]||(U[5]=Z=>$(Z,g.value))]},null,8,["column-value-labels","data-column-label","used-aes-in-mapping","modelValue"])]}),_:1})):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),x.value.length>1?(d.openBlock(),d.createElementBlock("div",nme,[U[29]||(U[29]=d.createElementVNode("span",null,"Secondary groups order: ",-1)),d.createVNode(L7,{data:{type:"data",value:null},onClick:U[7]||(U[7]=G=>{m.value=!0})}),m.value&&I.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Reorder secondary groups","back-title":"Axes Settings","onForm:close":U[10]||(U[10]=G=>m.value=!1)},{default:d.withCtx(()=>{var G;return[d.createVNode(vB,{"column-value-labels":I.value.labels,"data-column-label":((G=I.value.selectedSourceInfo)==null?void 0:G.label)??"","used-aes-in-mapping":k.value[b.value],"allow-reordering":"",modelValue:D.value,"onUpdate:modelValue":[U[8]||(U[8]=Z=>D.value=Z),U[9]||(U[9]=Z=>$(Z,b.value))]},null,8,["column-value-labels","data-column-label","used-aes-in-mapping","modelValue"])]}),_:1})):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="discrete"?(d.openBlock(),d.createElementBlock("div",rme,[U[30]||(U[30]=d.createElementVNode("span",null,"Labels rotation",-1)),d.createVNode(Uf,{options:i,modelValue:K.value,"onUpdate:modelValue":U[11]||(U[11]=G=>K.value=G)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",ame,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisX.titleMode,"onUpdate:modelValue":U[12]||(U[12]=G=>d.unref(n).axisX.titleMode=G)},null,8,["modelValue"])]),d.unref(n).axisX.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",ime,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisX.customTitle,"onUpdate:modelValue":U[13]||(U[13]=G=>d.unref(n).axisX.customTitle=G)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",ome,[U[31]||(U[31]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.gridlines,"onUpdate:modelValue":U[14]||(U[14]=G=>d.unref(n).axisX.gridlines=G)},null,8,["modelValue"])]),d.createElementVNode("div",lme,[U[32]||(U[32]=d.createElementVNode("span",null,"Lines between categories",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.linesBetweenCategories,"onUpdate:modelValue":U[15]||(U[15]=G=>d.unref(n).axisX.linesBetweenCategories=G)},null,8,["modelValue"])]),d.createElementVNode("div",sme,[U[33]||(U[33]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.ticks,"onUpdate:modelValue":U[16]||(U[16]=G=>d.unref(n).axisX.ticks=G)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"Y-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",ume,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisY.titleMode,"onUpdate:modelValue":U[17]||(U[17]=G=>d.unref(n).axisY.titleMode=G)},null,8,["modelValue"])]),d.unref(n).axisY.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",cme,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisY.customTitle,"onUpdate:modelValue":U[18]||(U[18]=G=>d.unref(n).axisY.customTitle=G)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",fme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Scale",options:s,modelValue:d.unref(n).axisY.scale,"onUpdate:modelValue":U[19]||(U[19]=G=>d.unref(n).axisY.scale=G)},null,8,["modelValue"])]),d.createElementVNode("div",dme,[U[34]||(U[34]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.gridlines,"onUpdate:modelValue":U[20]||(U[20]=G=>d.unref(n).axisY.gridlines=G)},null,8,["modelValue"])]),d.createElementVNode("div",Ame,[U[35]||(U[35]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.ticks,"onUpdate:modelValue":U[21]||(U[21]=G=>d.unref(n).axisY.ticks=G)},null,8,["modelValue"])])]),_:1}),d.createElementVNode("div",pme,[d.createElementVNode("div",hme,[U[36]||(U[36]=d.createElementVNode("span",null,"Frame",-1)),d.createVNode(Uf,{options:c,modelValue:d.unref(n).other.frame,"onUpdate:modelValue":U[22]||(U[22]=G=>d.unref(n).other.frame=G)},null,8,["modelValue"])]),d.createElementVNode("div",mme,[U[37]||(U[37]=d.createElementVNode("span",null,"Reverse axes",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).other.reverse,"onUpdate:modelValue":U[23]||(U[23]=G=>d.unref(n).other.reverse=G)},null,8,["modelValue"])]),d.createElementVNode("div",vme,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Facet column count",min:1,max:6,step:1,breakpoints:!0,mode:"input",modelValue:d.unref(n).other.facetColumns,"onUpdate:modelValue":U[24]||(U[24]=G=>d.unref(n).other.facetColumns=G)},null,8,["modelValue"])]),d.createElementVNode("div",gme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Facet shared by",options:Q,modelValue:d.unref(n).other.facetSharedBy,"onUpdate:modelValue":U[25]||(U[25]=G=>d.unref(n).other.facetSharedBy=G)},null,8,["modelValue"])])])])]))}}),wme={class:"axes-settings-list"},Cme={class:"axes-settings-options-row block"},bme={key:0,class:"axes-settings-input"},Eme={class:"axes-settings-options-row"},xme={class:"axes-settings-options-row block"},Sme={key:0},Bme={class:"axes-settings-options-row block"},kme={class:"axes-settings-options-row table"},Tme={class:"axes-settings-options-row table"},_me={class:"axes-settings-options-row"},Pme={class:"fixed-aes-list fixed-aes-list__rows"},Mme={class:"axes-settings-options-row block"},Dme={key:0},Hme={class:"axes-settings-options-row block"},Ime={class:"axes-settings-options-row table"},Lme={class:"axes-settings-options-row table"},Rme={class:"axes-settings-options-row"},Nme={class:"fixed-aes-list fixed-aes-list__rows"},$me={key:0,class:"other"},Fme={class:"axes-settings-options-row"},Vme={class:"axes-settings-options-row"},Ome={class:"axes-settings-options-row block"},Qme=d.defineComponent({__name:"ScatterplotAxesSettingsForm",setup(e){const t=da(),n=t.value.reactive.axesSettings,r=d.computed(()=>t.value.reactive.chartType),a={height:40,horizontalPadding:12,defaultState:"open"},i=[{value:"left",icon:P7},{value:"center",icon:M7},{value:"right",icon:D7}],o=[{value:"auto",text:"Auto"},{value:"custom",text:"Custom"},{value:"hidden",text:"Hide"}],s=[{value:"linear",text:"Linear"},{value:"log",text:"Log"}],c=[{value:"empty",icon:I7},{value:"left",icon:cB},{value:"bottom",icon:fB},{value:"left-bottom",icon:dB},{value:"full",icon:H7}],f=[{text:"X",value:"x"},{text:"Y",value:"y"},{text:"XY",value:"xy"},{text:"None",value:"none"}],A=d.ref(n.axisX.significantLinesStyle),h=d.ref(n.axisY.significantLinesStyle),m=d.computed(()=>g$(My.length,"lineType")),g=d.ref(),b=d.ref(),C=d.ref(!1),x=d.ref(!1);return(k,_)=>(d.openBlock(),d.createElementBlock("div",{class:"axes-form",onClick:_[26]||(_[26]=D=>D.stopPropagation())},[_[35]||(_[35]=d.createElementVNode("h3",{class:"axes-title"}," Axes ",-1)),d.createElementVNode("div",wme,[d.createVNode(ts,{title:"Title",settings:a,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Cme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).title.mode,"onUpdate:modelValue":_[0]||(_[0]=D=>d.unref(n).title.mode=D)},null,8,["modelValue"])]),d.unref(n).title.mode==="custom"?(d.openBlock(),d.createElementBlock("div",bme,[d.createVNode(d.unref(pt.PlTextField),{label:"Chart title",placeholder:"Chart title",modelValue:d.unref(n).title.value,"onUpdate:modelValue":_[1]||(_[1]=D=>d.unref(n).title.value=D)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Eme,[_[27]||(_[27]=d.createElementVNode("span",null,"Alignment",-1)),d.createVNode(Uf,{options:i,modelValue:d.unref(n).title.position,"onUpdate:modelValue":_[2]||(_[2]=D=>d.unref(n).title.position=D)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"X-axis",settings:a,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",xme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisX.titleMode,"onUpdate:modelValue":_[3]||(_[3]=D=>d.unref(n).axisX.titleMode=D)},null,8,["modelValue"])]),d.unref(n).axisX.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",Sme,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisX.customTitle,"onUpdate:modelValue":_[4]||(_[4]=D=>d.unref(n).axisX.customTitle=D)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Bme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Scale",options:s,modelValue:d.unref(n).axisX.scale,"onUpdate:modelValue":_[5]||(_[5]=D=>d.unref(n).axisX.scale=D)},null,8,["modelValue"])]),d.createElementVNode("div",kme,[_[28]||(_[28]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.gridlines,"onUpdate:modelValue":_[6]||(_[6]=D=>d.unref(n).axisX.gridlines=D)},null,8,["modelValue"])]),d.createElementVNode("div",Tme,[_[29]||(_[29]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.ticks,"onUpdate:modelValue":_[7]||(_[7]=D=>d.unref(n).axisX.ticks=D)},null,8,["modelValue"])]),d.createElementVNode("div",_me,[_[30]||(_[30]=d.createElementVNode("span",null,"Significant lines style",-1)),d.createVNode(L7,{data:{type:"lineType",value:A.value},onClick:_[8]||(_[8]=D=>C.value=!C.value),onRef:_[9]||(_[9]=D=>g.value=D)},null,8,["data"]),C.value?(d.openBlock(),d.createBlock(db,{key:0,height:m.value,targetRef:g.value,"onPopup:close":_[12]||(_[12]=D=>C.value=!1)},{default:d.withCtx(()=>[d.createElementVNode("div",Pme,[d.createVNode(fb,{modelValue:A.value,"onUpdate:modelValue":[_[10]||(_[10]=D=>A.value=D),_[11]||(_[11]=D=>d.unref(n).axisX.significantLinesStyle=D)]},null,8,["modelValue"])])]),_:1},8,["height","targetRef"])):d.createCommentVNode("",!0)])]),_:1}),d.createVNode(ts,{title:"Y-axis",settings:a,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Mme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisY.titleMode,"onUpdate:modelValue":_[13]||(_[13]=D=>d.unref(n).axisY.titleMode=D)},null,8,["modelValue"])]),d.unref(n).axisY.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",Dme,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisY.customTitle,"onUpdate:modelValue":_[14]||(_[14]=D=>d.unref(n).axisY.customTitle=D)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Hme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Scale",options:s,modelValue:d.unref(n).axisY.scale,"onUpdate:modelValue":_[15]||(_[15]=D=>d.unref(n).axisY.scale=D)},null,8,["modelValue"])]),d.createElementVNode("div",Ime,[_[31]||(_[31]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.gridlines,"onUpdate:modelValue":_[16]||(_[16]=D=>d.unref(n).axisY.gridlines=D)},null,8,["modelValue"])]),d.createElementVNode("div",Lme,[_[32]||(_[32]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.ticks,"onUpdate:modelValue":_[17]||(_[17]=D=>d.unref(n).axisY.ticks=D)},null,8,["modelValue"])]),d.createElementVNode("div",Rme,[_[33]||(_[33]=d.createElementVNode("span",null,"Significant lines style",-1)),d.createVNode(L7,{data:{type:"lineType",value:h.value},onClick:_[18]||(_[18]=D=>x.value=!x.value),onRef:_[19]||(_[19]=D=>b.value=D)},null,8,["data"]),x.value?(d.openBlock(),d.createBlock(db,{key:0,height:m.value,targetRef:b.value,"onPopup:close":_[22]||(_[22]=D=>x.value=!1)},{default:d.withCtx(()=>[d.createElementVNode("div",Nme,[d.createVNode(fb,{modelValue:h.value,"onUpdate:modelValue":[_[20]||(_[20]=D=>h.value=D),_[21]||(_[21]=D=>d.unref(n).axisY.significantLinesStyle=D)]},null,8,["modelValue"])])]),_:1},8,["height","targetRef"])):d.createCommentVNode("",!0)])]),_:1}),r.value==="scatterplot"?(d.openBlock(),d.createElementBlock("div",$me,[d.createElementVNode("div",Fme,[_[34]||(_[34]=d.createElementVNode("span",null,"Frame",-1)),d.createVNode(Uf,{options:c,modelValue:d.unref(n).other.frame,"onUpdate:modelValue":_[23]||(_[23]=D=>d.unref(n).other.frame=D)},null,8,["modelValue"])]),d.createElementVNode("div",Vme,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Facet column count",min:1,max:6,step:1,breakpoints:!0,mode:"input",modelValue:d.unref(n).other.facetColumns,"onUpdate:modelValue":_[24]||(_[24]=D=>d.unref(n).other.facetColumns=D)},null,8,["modelValue"])]),d.createElementVNode("div",Ome,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Facet shared by",options:f,modelValue:d.unref(n).other.facetSharedBy,"onUpdate:modelValue":_[25]||(_[25]=D=>d.unref(n).other.facetSharedBy=D)},null,8,["modelValue"])])])):d.createCommentVNode("",!0)])]))}}),zme={class:"axes-settings-list"},Ume={class:"axes-settings-options-row block"},jme={key:0,class:"axes-settings-input"},Gme={class:"axes-settings-options-row"},Yme={class:"axes-settings-options-row"},Wme={class:"axes-settings-options-row block"},Xme={key:0},Kme={class:"axes-settings-options-row block"},Zme={class:"axes-settings-options-row"},Jme={class:"axes-settings-options-row block"},qme={key:0},eve={class:"axes-settings-options-row block"},tve={class:"other"},nve={class:"axes-settings-options-row"},rve={class:"axes-settings-options-row"},ave={class:"axes-settings-options-row block"},ive=d.defineComponent({__name:"HeatmapAxesSettingsForm",setup(e){const t=da(),n=t.value.reactive.axesSettings,r={height:40,horizontalPadding:12,defaultState:"open"},a=[{value:"left",icon:P7},{value:"center",icon:M7},{value:"right",icon:D7}],i=[{value:0,icon:lB},{value:45,icon:sB},{value:90,icon:uB}],o=[{value:"auto",text:"Auto"},{value:"custom",text:"Custom"},{value:"hidden",text:"Hide"}],s=[{value:"none",icon:I7},{value:"full",icon:H7}],c=[{text:"X",value:"x"},{text:"Y",value:"y"},{text:"XY",value:"xy"},{text:"None",value:"none"}],f=[{text:"ascending",value:"asc"},{text:"descending",value:"desc"}],A=d.computed(()=>t.value.reactive.layersSettings.heatmapClustered),h=d.computed(()=>c.filter(m=>t.value.reactive.template!=="heatmapClustered"?!0:A.value.dendrogramX&&A.value.dendrogramY?m.value!=="x"&&m.value!=="xy"&&m.value!=="y":A.value.dendrogramX?m.value!=="x"&&m.value!=="xy":A.value.dendrogramY?m.value!=="y"&&m.value!=="xy":!0));return(m,g)=>(d.openBlock(),d.createElementBlock("div",{class:"axes-form",onClick:g[14]||(g[14]=b=>b.stopPropagation())},[g[19]||(g[19]=d.createElementVNode("h3",{class:"axes-title"}," Axes ",-1)),d.createElementVNode("div",zme,[d.createVNode(ts,{title:"Title",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Ume,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).title.mode,"onUpdate:modelValue":g[0]||(g[0]=b=>d.unref(n).title.mode=b)},null,8,["modelValue"])]),d.unref(n).title.mode==="custom"?(d.openBlock(),d.createElementBlock("div",jme,[d.createVNode(d.unref(pt.PlTextField),{label:"Chart title",placeholder:"Chart title",modelValue:d.unref(n).title.value,"onUpdate:modelValue":g[1]||(g[1]=b=>d.unref(n).title.value=b)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Gme,[g[15]||(g[15]=d.createElementVNode("span",null,"Alignment",-1)),d.createVNode(Uf,{options:a,modelValue:d.unref(n).title.position,"onUpdate:modelValue":g[2]||(g[2]=b=>d.unref(n).title.position=b)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"X-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Yme,[g[16]||(g[16]=d.createElementVNode("span",null,"Labels rotation",-1)),d.createVNode(Uf,{options:i,modelValue:d.unref(n).axisX.axisLabelsAngle,"onUpdate:modelValue":g[3]||(g[3]=b=>d.unref(n).axisX.axisLabelsAngle=b)},null,8,["modelValue"])]),d.createElementVNode("div",Wme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisX.titleMode,"onUpdate:modelValue":g[4]||(g[4]=b=>d.unref(n).axisX.titleMode=b)},null,8,["modelValue"])]),d.unref(n).axisX.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",Xme,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisX.customTitle,"onUpdate:modelValue":g[5]||(g[5]=b=>d.unref(n).axisX.customTitle=b)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Kme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Sorting",options:f,modelValue:d.unref(n).axisX.sorting,"onUpdate:modelValue":g[6]||(g[6]=b=>d.unref(n).axisX.sorting=b)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"Y-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Zme,[g[17]||(g[17]=d.createElementVNode("span",null,"Labels rotation",-1)),d.createVNode(Uf,{options:i,modelValue:d.unref(n).axisY.axisLabelsAngle,"onUpdate:modelValue":g[7]||(g[7]=b=>d.unref(n).axisY.axisLabelsAngle=b)},null,8,["modelValue"])]),d.createElementVNode("div",Jme,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisY.titleMode,"onUpdate:modelValue":g[8]||(g[8]=b=>d.unref(n).axisY.titleMode=b)},null,8,["modelValue"])]),d.unref(n).axisY.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",qme,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisY.customTitle,"onUpdate:modelValue":g[9]||(g[9]=b=>d.unref(n).axisY.customTitle=b)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",eve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Sorting",options:f,modelValue:d.unref(n).axisY.sorting,"onUpdate:modelValue":g[10]||(g[10]=b=>d.unref(n).axisY.sorting=b)},null,8,["modelValue"])])]),_:1}),d.createElementVNode("div",tve,[d.createElementVNode("div",nve,[g[18]||(g[18]=d.createElementVNode("span",null,"Frame",-1)),d.createVNode(Uf,{options:s,modelValue:d.unref(n).other.frame,"onUpdate:modelValue":g[11]||(g[11]=b=>d.unref(n).other.frame=b)},null,8,["modelValue"])]),d.createElementVNode("div",rve,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Facet column count",min:1,max:6,step:1,breakpoints:!0,mode:"input",modelValue:d.unref(n).other.facetColumns,"onUpdate:modelValue":g[12]||(g[12]=b=>d.unref(n).other.facetColumns=b)},null,8,["modelValue"])]),d.createElementVNode("div",ave,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Facet shared by",options:h.value,modelValue:d.unref(n).other.facetSharedBy,"onUpdate:modelValue":g[13]||(g[13]=b=>d.unref(n).other.facetSharedBy=b)},null,8,["options","modelValue"])])])])]))}}),ove={class:"axes-settings-list"},lve={style:{padding:"0 24px 8px"}},sve={class:"axes-settings-options-row block"},uve={key:0,class:"axes-settings-input"},cve={class:"axes-settings-options-row"},fve={class:"axes-settings-options-row block"},dve={key:0},Ave={class:"axes-settings-options-row block"},pve={class:"axes-settings-options-row table"},hve={class:"axes-settings-options-row table"},mve={class:"axes-settings-options-row block"},vve={class:"axes-settings-options-row table"},gve={class:"axes-settings-options-row table"},yve={class:"other"},wve={class:"axes-settings-options-row"},Cve={class:"axes-settings-options-row"},bve={class:"axes-settings-options-row block"},Eve=d.defineComponent({__name:"HistogramAxesSettingsForm",setup(e){const n=da().value.reactive.axesSettings,r={height:40,horizontalPadding:12,defaultState:"open"},a=[{value:"left",icon:P7},{value:"center",icon:M7},{value:"right",icon:D7}],i=[{value:"auto",text:"Auto"},{value:"custom",text:"Custom"},{value:"hidden",text:"Hide"}],o=[{value:"linear",text:"Linear"},{value:"log",text:"Log"}],s=[{value:"empty",icon:I7},{value:"left",icon:cB},{value:"bottom",icon:fB},{value:"left-bottom",icon:dB},{value:"full",icon:H7}],c=[{text:"X",value:"x"},{text:"Y",value:"y"},{text:"XY",value:"xy"},{text:"None",value:"none"}];return(f,A)=>(d.openBlock(),d.createElementBlock("div",{class:"axes-form",onClick:A[15]||(A[15]=h=>h.stopPropagation())},[A[22]||(A[22]=d.createElementVNode("h3",{class:"axes-title"}," Axes ",-1)),d.createElementVNode("div",ove,[d.createElementVNode("div",lve,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Bins count",min:3,max:100,step:1,breakpoints:!1,mode:"input",modelValue:d.unref(n).other.binsCount,"onUpdate:modelValue":A[0]||(A[0]=h=>d.unref(n).other.binsCount=h)},null,8,["modelValue"])]),d.createVNode(ts,{title:"Title",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",sve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:i,modelValue:d.unref(n).title.mode,"onUpdate:modelValue":A[1]||(A[1]=h=>d.unref(n).title.mode=h)},null,8,["modelValue"])]),d.unref(n).title.mode==="custom"?(d.openBlock(),d.createElementBlock("div",uve,[d.createVNode(d.unref(pt.PlTextField),{label:"Chart title",placeholder:"Chart title",modelValue:d.unref(n).title.value,"onUpdate:modelValue":A[2]||(A[2]=h=>d.unref(n).title.value=h)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",cve,[A[16]||(A[16]=d.createElementVNode("span",null,"Alignment",-1)),d.createVNode(Uf,{options:a,modelValue:d.unref(n).title.position,"onUpdate:modelValue":A[3]||(A[3]=h=>d.unref(n).title.position=h)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"X-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",fve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:i,modelValue:d.unref(n).axisX.titleMode,"onUpdate:modelValue":A[4]||(A[4]=h=>d.unref(n).axisX.titleMode=h)},null,8,["modelValue"])]),d.unref(n).axisX.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",dve,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisX.customTitle,"onUpdate:modelValue":A[5]||(A[5]=h=>d.unref(n).axisX.customTitle=h)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Ave,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Scale",options:o,modelValue:d.unref(n).axisX.scale,"onUpdate:modelValue":A[6]||(A[6]=h=>d.unref(n).axisX.scale=h)},null,8,["modelValue"])]),d.createElementVNode("div",pve,[A[17]||(A[17]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.gridlines,"onUpdate:modelValue":A[7]||(A[7]=h=>d.unref(n).axisX.gridlines=h)},null,8,["modelValue"])]),d.createElementVNode("div",hve,[A[18]||(A[18]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisX.ticks,"onUpdate:modelValue":A[8]||(A[8]=h=>d.unref(n).axisX.ticks=h)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"Y-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",mve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Scale",options:o,modelValue:d.unref(n).axisY.scale,"onUpdate:modelValue":A[9]||(A[9]=h=>d.unref(n).axisY.scale=h)},null,8,["modelValue"])]),d.createElementVNode("div",vve,[A[19]||(A[19]=d.createElementVNode("span",null,"Gridlines",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.gridlines,"onUpdate:modelValue":A[10]||(A[10]=h=>d.unref(n).axisY.gridlines=h)},null,8,["modelValue"])]),d.createElementVNode("div",gve,[A[20]||(A[20]=d.createElementVNode("span",null,"Ticks",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(n).axisY.ticks,"onUpdate:modelValue":A[11]||(A[11]=h=>d.unref(n).axisY.ticks=h)},null,8,["modelValue"])])]),_:1}),d.createElementVNode("div",yve,[d.createElementVNode("div",wve,[A[21]||(A[21]=d.createElementVNode("span",null,"Frame",-1)),d.createVNode(Uf,{options:s,modelValue:d.unref(n).other.frame,"onUpdate:modelValue":A[12]||(A[12]=h=>d.unref(n).other.frame=h)},null,8,["modelValue"])]),d.createElementVNode("div",Cve,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Facet column count",min:1,max:6,step:1,breakpoints:!0,mode:"input",modelValue:d.unref(n).other.facetColumns,"onUpdate:modelValue":A[13]||(A[13]=h=>d.unref(n).other.facetColumns=h)},null,8,["modelValue"])]),d.createElementVNode("div",bve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Facet shared by",options:c,modelValue:d.unref(n).other.facetSharedBy,"onUpdate:modelValue":A[14]||(A[14]=h=>d.unref(n).other.facetSharedBy=h)},null,8,["modelValue"])])])])]))}}),xve={class:"axes-settings-list"},Sve={class:"axes-settings-options-row block"},Bve={key:0,class:"axes-settings-input"},kve={class:"axes-settings-options-row"},Tve={class:"axes-settings-options-row"},_ve={class:"axes-settings-options-row block"},Pve={key:0},Mve={class:"axes-settings-options-row block"},Dve={class:"axes-settings-options-row"},Hve={class:"axes-settings-options-row block"},Ive={key:0},Lve={class:"axes-settings-options-row block"},Rve={class:"other"},Nve={class:"axes-settings-options-row"},$ve={class:"axes-settings-options-row"},Fve=d.defineComponent({__name:"BubbleAxesSettingsForm",setup(e){const n=da().value.reactive.axesSettings,r={height:40,horizontalPadding:12,defaultState:"open"},a=[{value:"left",icon:P7},{value:"center",icon:M7},{value:"right",icon:D7}],i=[{value:0,icon:lB},{value:45,icon:sB},{value:90,icon:uB}],o=[{value:"auto",text:"Auto"},{value:"custom",text:"Custom"},{value:"hidden",text:"Hide"}],s=[{value:"none",icon:I7},{value:"full",icon:H7}],c=[{text:"ascending",value:"asc"},{text:"descending",value:"desc"}];return(f,A)=>(d.openBlock(),d.createElementBlock("div",{class:"axes-form",onClick:A[13]||(A[13]=h=>h.stopPropagation())},[A[18]||(A[18]=d.createElementVNode("h3",{class:"axes-title"}," Axes ",-1)),d.createElementVNode("div",xve,[d.createVNode(ts,{title:"Title",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Sve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).title.mode,"onUpdate:modelValue":A[0]||(A[0]=h=>d.unref(n).title.mode=h)},null,8,["modelValue"])]),d.unref(n).title.mode==="custom"?(d.openBlock(),d.createElementBlock("div",Bve,[d.createVNode(d.unref(pt.PlTextField),{label:"Chart title",placeholder:"Chart title",modelValue:d.unref(n).title.value,"onUpdate:modelValue":A[1]||(A[1]=h=>d.unref(n).title.value=h)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",kve,[A[14]||(A[14]=d.createElementVNode("span",null,"Alignment",-1)),d.createVNode(Uf,{options:a,modelValue:d.unref(n).title.position,"onUpdate:modelValue":A[2]||(A[2]=h=>d.unref(n).title.position=h)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"X-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Tve,[A[15]||(A[15]=d.createElementVNode("span",null,"Labels rotation",-1)),d.createVNode(Uf,{options:i,modelValue:d.unref(n).axisX.axisLabelsAngle,"onUpdate:modelValue":A[3]||(A[3]=h=>d.unref(n).axisX.axisLabelsAngle=h)},null,8,["modelValue"])]),d.createElementVNode("div",_ve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisX.titleMode,"onUpdate:modelValue":A[4]||(A[4]=h=>d.unref(n).axisX.titleMode=h)},null,8,["modelValue"])]),d.unref(n).axisX.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",Pve,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisX.customTitle,"onUpdate:modelValue":A[5]||(A[5]=h=>d.unref(n).axisX.customTitle=h)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Mve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Sorting",options:c,modelValue:d.unref(n).axisX.sorting,"onUpdate:modelValue":A[6]||(A[6]=h=>d.unref(n).axisX.sorting=h)},null,8,["modelValue"])])]),_:1}),d.createVNode(ts,{title:"Y-axis",settings:r,icon:Qf,"icon-open":zf},{default:d.withCtx(()=>[d.createElementVNode("div",Dve,[A[16]||(A[16]=d.createElementVNode("span",null,"Labels rotation",-1)),d.createVNode(Uf,{options:i,modelValue:d.unref(n).axisY.axisLabelsAngle,"onUpdate:modelValue":A[7]||(A[7]=h=>d.unref(n).axisY.axisLabelsAngle=h)},null,8,["modelValue"])]),d.createElementVNode("div",Hve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Title",options:o,modelValue:d.unref(n).axisY.titleMode,"onUpdate:modelValue":A[8]||(A[8]=h=>d.unref(n).axisY.titleMode=h)},null,8,["modelValue"])]),d.unref(n).axisY.titleMode==="custom"?(d.openBlock(),d.createElementBlock("div",Ive,[d.createVNode(d.unref(pt.PlTextField),{label:"Text",placeholder:"Type",modelValue:d.unref(n).axisY.customTitle,"onUpdate:modelValue":A[9]||(A[9]=h=>d.unref(n).axisY.customTitle=h)},null,8,["modelValue"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Lve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Sorting",options:c,modelValue:d.unref(n).axisY.sorting,"onUpdate:modelValue":A[10]||(A[10]=h=>d.unref(n).axisY.sorting=h)},null,8,["modelValue"])])]),_:1}),d.createElementVNode("div",Rve,[d.createElementVNode("div",Nve,[A[17]||(A[17]=d.createElementVNode("span",null,"Frame",-1)),d.createVNode(Uf,{options:s,modelValue:d.unref(n).other.frame,"onUpdate:modelValue":A[11]||(A[11]=h=>d.unref(n).other.frame=h)},null,8,["modelValue"])]),d.createElementVNode("div",$ve,[d.createVNode(d.unref(pt.Slider),{style:{width:"100%"},label:"Facet column count",min:1,max:6,step:1,breakpoints:!0,mode:"input",modelValue:d.unref(n).other.facetColumns,"onUpdate:modelValue":A[12]||(A[12]=h=>d.unref(n).other.facetColumns=h)},null,8,["modelValue"])])])])]))}}),Vve={class:"data-form"},Ove=d.defineComponent({__name:"index",setup(e){const t=da();return(n,r)=>(d.openBlock(),d.createElementBlock("div",Vve,[d.unref(t).reactive.chartType==="discrete"?(d.openBlock(),d.createBlock(yme,{key:0})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot"||d.unref(t).reactive.chartType==="scatterplot-umap"?(d.openBlock(),d.createBlock(Qme,{key:1})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="heatmap"?(d.openBlock(),d.createBlock(ive,{key:2})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="histogram"?(d.openBlock(),d.createBlock(Eve,{key:3})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="bubble"?(d.openBlock(),d.createBlock(Fve,{key:4})):d.createCommentVNode("",!0)]))}});function df(e,t,n,r=!1){const a=t.components.primaryGrouping.selectorStates.length>0,i=t.components.secondaryGrouping.selectorStates.length>0;return e===null?i?{type:"secondaryGrouping"}:a&&!r?{type:"primaryGrouping"}:n:e}const Qve={class:"aes-mapping-block"},zve={style:{margin:"0 24px"}},Uve={class:"section-title"},jve={style:{margin:"24px 0"}},Gve={style:{margin:"24px 0"}},Yve={style:{margin:"24px 0"}},Wve={style:{display:"flex",marginTop:"16px",gap:"8px"}},Xve=d.defineComponent({__name:"AesDataMappingContinuous",props:{dataColumnLabel:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){var b,C;const n=e,r=t,a=d.ref(!1),i=d.ref(n.modelValue.palette);function o(x){i.value=x,a.value=!1,r("update:modelValue",Vv(x))}const s=[{value:"auto",label:"Auto"},{value:"custom",label:"Custom"}],c=d.ref(n.modelValue.range?"custom":"auto"),f=[{value:"linear",label:"Linear"},{value:"log",label:"Log"}],A=d.ref(n.modelValue.log?"log":"linear"),h=d.ref(((b=n.modelValue.range)==null?void 0:b.minValue)??void 0),m=d.ref(((C=n.modelValue.range)==null?void 0:C.maxValue)??void 0),g=d.ref(n.modelValue.midPoint??void 0);return d.watch(()=>c.value,x=>{x==="custom"&&r("update:modelValue",{...n.modelValue,range:{minValue:h.value??null,maxValue:m.value??null}}),x==="auto"&&r("update:modelValue",{...n.modelValue,range:null})}),d.watch(()=>h.value,x=>{r("update:modelValue",{...n.modelValue,range:{...n.modelValue.range,minValue:x}})}),d.watch(()=>m.value,x=>{r("update:modelValue",{...n.modelValue,range:{...n.modelValue.range,maxValue:x}})}),d.watch(()=>g.value,x=>{r("update:modelValue",{...n.modelValue,midPoint:x??null})}),d.watch(()=>A.value,x=>{r("update:modelValue",{...n.modelValue,log:x==="log"})}),(x,k)=>(d.openBlock(),d.createElementBlock("div",Qve,[d.createElementVNode("div",zve,[d.createElementVNode("div",Uve,[d.createElementVNode("span",null,d.toDisplayString(x.dataColumnLabel),1)]),d.createElementVNode("div",jve,[d.createVNode(o3,{label:"Color Palette ",title:d.unref(Do)[i.value].title,palette:i.value,onButtonClick:k[0]||(k[0]=_=>{a.value=!0})},null,8,["title","palette"])]),d.createElementVNode("div",Gve,[d.createVNode(d.unref(pt.PlBtnGroup),{options:f,modelValue:A.value,"onUpdate:modelValue":k[1]||(k[1]=_=>A.value=_)},null,8,["modelValue"])]),d.createElementVNode("div",Yve,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Gradient range",options:s,modelValue:c.value,"onUpdate:modelValue":k[2]||(k[2]=_=>c.value=_)},null,8,["modelValue"])]),d.createElementVNode("div",Wve,[c.value==="custom"?(d.openBlock(),d.createBlock(d.unref(pt.PlNumberField),{key:0,label:"From",updateOnEnterOrClickOutside:!0,useIncrementButtons:!1,modelValue:h.value,"onUpdate:modelValue":k[3]||(k[3]=_=>h.value=_)},null,8,["modelValue"])):d.createCommentVNode("",!0),d.createVNode(d.unref(pt.PlNumberField),{label:"Mid point",updateOnEnterOrClickOutside:!0,useIncrementButtons:!1,style:{flexGrow:1},modelValue:g.value,"onUpdate:modelValue":k[4]||(k[4]=_=>g.value=_)},null,8,["modelValue"]),c.value==="custom"?(d.openBlock(),d.createBlock(d.unref(pt.PlNumberField),{key:1,label:"To",updateOnEnterOrClickOutside:!0,useIncrementButtons:!1,modelValue:m.value,"onUpdate:modelValue":k[5]||(k[5]=_=>m.value=_)},null,8,["modelValue"])):d.createCommentVNode("",!0)]),a.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Color Palette","back-title":"Color mapping","onForm:close":k[6]||(k[6]=_=>a.value=!1)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:i.value,categorical:!1,onSelect:o},null,8,["selected"])]),_:1})):d.createCommentVNode("",!0)])]))}}),Kve={class:"aes-input-row"},Hi=d.defineComponent({__name:"AesSelector",props:{label:{},type:{},selected:{},formTitle:{},formBackTitle:{},possibleAesSourceInputs:{},withoutFixed:{type:Boolean},disabled:{type:Boolean}},emits:["aes-update","aes-selector-close"],setup(e,{emit:t}){var K,re;const n=e,r=da(),a=d.computed(()=>r.value.reactive.chartType),i=t,o={discrete:["primaryGrouping","secondaryGrouping"],scatterplot:["grouping"],"scatterplot-umap":["grouping"],dendro:[],heatmap:[],histogram:[],bubble:[]},s=n.possibleAesSourceInputs??o[a.value],c=d.computed(()=>r.value.commonHelpersData.usedAesInMapping.value);function f(U){return typeof U=="string"?U:a.value==="scatterplot"?`grouping_${U.value}`:a.value==="dendro"?`${U.type}_${U.value}`:U.type}const A=d.ref(Yy(n.selected)?f(n.selected):"fix"),h={fill:_y[0].color,stroke:_y[0].color,dotShape:P0,lineType:AC,size:""},m=d.computed(()=>r.value.inputGuide.value),g=d.computed(()=>r.value.uniqueValuesData.value),b=new Set(["scatterplot","scatterplot-umap","heatmap"]),C=d.computed(()=>{const U={},G=r.value.reactive.optionsState.components;function Z(Y,X){const oe=m.value.getSourceInfo(X),me=g.value[X],ae=(me==null?void 0:me.list)??[],ye=(me==null?void 0:me.labels)??{},Ce=f({type:Y,value:X});if(b.has(a.value)&&oe.type==="String"||!b.has(a.value)){const ce=r.value.reactive.dataBindAes[X]??Uy(ae);U[Ce]={type:"dataCategorical",value:Ce,initialData:ce,inputName:Y,selectedSource:X,selectedSourceInfo:oe,selectedSourceValues:ae,labels:ce.order.reduce((ge,ze)=>(ge[ze]=ye[ze]??String(ze),ge),{})}}else{const ce=r.value.reactive.dataBindAes[X]??Vv(Z1);U[Ce]={type:"dataContinuous",value:Ce,initialData:ce,inputName:Y,selectedSource:X,selectedSourceInfo:oe,selectedSourceValues:ae}}}return s.forEach(Y=>{var X;(X=G==null?void 0:G[Y])!=null&&X.selectorStates.length&&G[Y].selectorStates.forEach(({selectedSource:oe})=>{Z(Y,oe)})}),n.withoutFixed||(U.fix={type:"fix",value:"fix",initialData:Yy(n.selected)?h[n.type]:n.selected}),U}),x=d.computed(()=>C.value[A.value]??null);function k(U,G){var Z,Y,X,oe;return U.type==="fix"?"Fixed":G===U.value?`${(Z=U.selectedSourceInfo)==null?void 0:Z.label}`:a.value==="discrete"?`${U.value==="primaryGrouping"?"Primary":"Secondary"} grouping: ${(Y=U.selectedSourceInfo)==null?void 0:Y.label}`:a.value==="scatterplot"||a.value==="dendro"?`Grouping: ${(X=U.selectedSourceInfo)==null?void 0:X.label}`:((oe=U.selectedSourceInfo)==null?void 0:oe.label)??""}const _=d.computed(()=>{const U=[],G=r.value.reactive.optionsState.components;function Z(Y,X){const oe=f({type:Y==="shape"?"grouping":Y,value:X});C.value[oe]&&U.push({text:k(C.value[oe],A.value),value:oe})}if(s.forEach(Y=>{var X;(X=G==null?void 0:G[Y])!=null&&X.selectorStates.length&&G[Y].selectorStates.forEach(({selectedSource:oe})=>{Z(Y,oe)})}),!C.value[A.value]){let Y="Not consistent (grouping)";a.value==="discrete"&&(Y=`${A.value==="primaryGrouping"?"Primary":"Secondary"} grouping (not selected)`),U.push({text:Y,value:A.value})}return n.withoutFixed||U.push({text:"Fixed",value:"fix"}),U}),D=d.ref(!1),O=d.ref(C.value.fix?C.value.fix.initialData:null),I=d.ref(((K=x.value)==null?void 0:K.type)==="dataCategorical"?x.value.initialData:null),$=d.ref(((re=x.value)==null?void 0:re.type)==="dataContinuous"?x.value.initialData:null);d.watch(()=>A.value,U=>{const G=C.value[U];G.type==="fix"?i("aes-update",O.value,G):G.type==="dataCategorical"?(I.value=G.initialData,i("aes-update",G.initialData,G)):G.type==="dataContinuous"&&($.value=G.initialData,i("aes-update",G.initialData,G))});const Q=d.ref(),ee=d.computed(()=>{if(n.type==="lineType")return My.length*32+16*2;if(n.type==="dotShape")return Math.ceil(N5.length/6)*36+20*2;if(n.type==="fill"||n.type==="stroke")return Math.ceil(_y.length/6)*36+20*2});return(U,G)=>{var Z,Y;return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",Kve,[d.createElementVNode("div",{class:"aes-input-select",onClick:G[1]||(G[1]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{disabled:U.disabled||_.value.length<2,label:U.label,options:_.value,modelValue:A.value,"onUpdate:modelValue":G[0]||(G[0]=X=>A.value=X)},null,8,["disabled","label","options","modelValue"])]),d.createVNode(L7,{data:{type:A.value==="fix"?U.type:"data",value:A.value==="fix"?U.type==="size"?Number(U.selected):U.selected:null},onClick:G[2]||(G[2]=X=>D.value=!D.value),onRef:G[3]||(G[3]=X=>Q.value=X)},null,8,["data"]),A.value==="fix"&&D.value&&O.value?(d.openBlock(),d.createBlock(db,{key:0,height:ee.value,targetRef:Q.value,"onPopup:close":G[10]||(G[10]=X=>D.value=!1)},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["fixed-aes-list",{"fixed-aes-list__rows":U.type==="lineType"}])},[U.type==="fill"||U.type==="stroke"?(d.openBlock(),d.createBlock(d$,{key:0,"color-using":U.type,modelValue:O.value,"onUpdate:modelValue":[G[4]||(G[4]=X=>O.value=X),G[5]||(G[5]=X=>U.$emit("aes-update",X,C.value.fix))]},null,8,["color-using","modelValue"])):d.createCommentVNode("",!0),U.type==="dotShape"?(d.openBlock(),d.createBlock(A$,{key:1,modelValue:O.value,"onUpdate:modelValue":[G[6]||(G[6]=X=>O.value=X),G[7]||(G[7]=X=>U.$emit("aes-update",X,C.value.fix))]},null,8,["modelValue"])):d.createCommentVNode("",!0),U.type==="lineType"?(d.openBlock(),d.createBlock(fb,{key:2,modelValue:O.value,"onUpdate:modelValue":[G[8]||(G[8]=X=>O.value=X),G[9]||(G[9]=X=>U.$emit("aes-update",X,C.value.fix))]},null,8,["modelValue"])):d.createCommentVNode("",!0)],2)]),_:1},8,["height","targetRef"])):d.createCommentVNode("",!0)]),(((Z=x.value)==null?void 0:Z.type)==="dataCategorical"&&I.value||((Y=x.value)==null?void 0:Y.type)==="dataContinuous"&&$.value)&&D.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:U.formTitle,"back-title":U.formBackTitle,"onForm:close":G[15]||(G[15]=X=>D.value=!1)},{default:d.withCtx(()=>{var X,oe,me,ae;return[((X=x.value)==null?void 0:X.type)==="dataCategorical"&&I.value?(d.openBlock(),d.createBlock(vB,{key:0,"column-value-labels":x.value.labels,"data-column-label":((oe=x.value.selectedSourceInfo)==null?void 0:oe.label)??"","used-aes-in-mapping":c.value[x.value.selectedSource],"allow-reordering":a.value==="discrete",modelValue:I.value,"onUpdate:modelValue":[G[11]||(G[11]=ye=>I.value=ye),G[12]||(G[12]=ye=>U.$emit("aes-update",ye,x.value))]},null,8,["column-value-labels","data-column-label","used-aes-in-mapping","allow-reordering","modelValue"])):d.createCommentVNode("",!0),((me=x.value)==null?void 0:me.type)==="dataContinuous"&&$.value?(d.openBlock(),d.createBlock(Xve,{key:1,"data-column-label":((ae=x.value.selectedSourceInfo)==null?void 0:ae.label)??"",modelValue:$.value,"onUpdate:modelValue":[G[13]||(G[13]=ye=>$.value=ye),G[14]||(G[14]=ye=>U.$emit("aes-update",ye,x.value))]},null,8,["data-column-label","modelValue"])):d.createCommentVNode("",!0)]}),_:1},8,["title","back-title"])):d.createCommentVNode("",!0)],64)}}}),Zve={class:"checkbox-item"},Kv="box",Jve=d.defineComponent({__name:"Boxplot",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[Kv]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.fillColor,r.value,Py)),i=d.computed(()=>df(n.value.lineColor,r.value,yo)),o=d.computed(()=>n.value.dotShape),s=d.computed(()=>n.value.lineType);function c(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Kv][b]={type:g.inputName}:t.value.reactive.layersSettings[Kv][b]=m,g.type==="dataCategorical"&&typeof m!="string"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}function f(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Kv][b]={type:g.inputName}:t.value.reactive.layersSettings[Kv][b]=m,g.type==="dataCategorical"&&typeof m=="object"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}function A(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Kv][b]={type:g.inputName}:t.value.reactive.layersSettings[Kv][b]=m,g.type==="dataCategorical"&&typeof m=="object"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}const h=d.computed({get:()=>n.value.opacity*100,set:m=>{n.value.opacity=m/100}});return(m,g)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:g[0]||(g[0]=(b,C)=>c(b,C,"fillColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,onAesUpdate:g[1]||(g[1]=(b,C)=>c(b,C,"lineColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Line Type","form-title":"Line Type Settings","form-back-title":"Layers",type:"lineType","possible-aes-source-inputs":[],selected:s.value,onAesUpdate:g[2]||(g[2]=(b,C)=>A(b,C,"lineType"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:h.value,"onUpdate:modelValue":g[3]||(g[3]=b=>h.value=b)},null,8,["modelValue"]),d.createElementVNode("div",Zve,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.showOutliers,"onUpdate:modelValue":g[4]||(g[4]=b=>n.value.showOutliers=b)},null,8,["modelValue"]),g[6]||(g[6]=d.createElementVNode("span",null,"Show outliers",-1))]),n.value.showOutliers?(d.openBlock(),d.createBlock(Hi,{key:0,label:"Outlier shape","form-title":"Outlier Shape Settings","form-back-title":"Layers",type:"dotShape","possible-aes-source-inputs":[],selected:o.value,onAesUpdate:g[5]||(g[5]=(b,C)=>f(b,C,"dotShape"))},null,8,["selected"])):d.createCommentVNode("",!0)],64))}}),qve={class:"checkbox-item"},gB="binnedDots",ege=d.defineComponent({__name:"BinnedDots",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[gB]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.fillColor,r.value,Py)),i=d.computed(()=>df(n.value.lineColor,r.value,yo));function o(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[gB][A]={type:f.inputName}:t.value.reactive.layersSettings[gB][A]=c,f.type==="dataCategorical"&&typeof c!="string"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}const s=d.computed({get:()=>n.value.opacity*100,set:c=>{n.value.opacity=c/100}});return(c,f)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:f[0]||(f[0]=(A,h)=>o(A,h,"fillColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,onAesUpdate:f[1]||(f[1]=(A,h)=>o(A,h,"lineColor"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=A=>s.value=A)},null,8,["modelValue"]),d.createElementVNode("div",qve,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.showOutliers,"onUpdate:modelValue":f[3]||(f[3]=A=>n.value.showOutliers=A)},null,8,["modelValue"]),f[4]||(f[4]=d.createElementVNode("span",null,"Show outliers",-1))])],64))}}),tge={class:"checkbox-item"},$7="jitteredDots",nge=d.defineComponent({__name:"JitteredDots",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[$7]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.dotFill,r.value,yo));function i(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[$7][A]={type:f.inputName}:t.value.reactive.layersSettings[$7][A]=c,f.type==="dataCategorical"&&typeof c!="string"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}function o(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[$7][A]={type:f.inputName}:t.value.reactive.layersSettings[$7][A]=c,f.type==="dataCategorical"&&typeof c=="object"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}const s=d.computed({get:()=>n.value.opacity*100,set:c=>{n.value.opacity=c/100}});return(c,f)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:f[0]||(f[0]=(A,h)=>i(A,h,"dotFill"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot shape","form-title":"Dot Shape Settings","form-back-title":"Layers",type:"dotShape",selected:n.value.dotShape,onAesUpdate:f[1]||(f[1]=(A,h)=>o(A,h,"dotShape"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=A=>s.value=A)},null,8,["modelValue"]),d.createElementVNode("div",tge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.showOutliers,"onUpdate:modelValue":f[3]||(f[3]=A=>n.value.showOutliers=A)},null,8,["modelValue"]),f[4]||(f[4]=d.createElementVNode("span",null,"Show outliers",-1))])],64))}}),rge={class:"checkbox-item"},age={class:"checkbox-item"},ige={key:0},u3="violin",oge=d.defineComponent({__name:"Violin",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[u3]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.fillColor,r.value,Py)),i=d.computed(()=>df(n.value.lineColor,r.value,yo)),o=d.computed(()=>n.value.lineType),s=d.computed(()=>n.value.medianLineStyle),c=d.computed(()=>n.value.quartilesLineStyle);function f(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[u3][b]={type:g.inputName}:t.value.reactive.layersSettings[u3][b]=m,g.type==="dataCategorical"&&typeof m!="string"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}function A(m,g,b){t.value.reactive.layersSettings[u3][b]=typeof m=="object"?{type:g.value}:m,g.type==="dataCategorical"&&typeof m=="object"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}const h=d.computed({get:()=>n.value.opacity*100,set:m=>{n.value.opacity=m/100}});return(m,g)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:g[0]||(g[0]=(b,C)=>f(b,C,"fillColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,onAesUpdate:g[1]||(g[1]=(b,C)=>f(b,C,"lineColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Line Type","form-title":"Line Type Settings","form-back-title":"Layers",type:"lineType","possible-aes-source-inputs":[],selected:o.value,onAesUpdate:g[2]||(g[2]=(b,C)=>A(b,C,"lineType"))},null,8,["selected"]),d.createElementVNode("div",rge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.trim,"onUpdate:modelValue":g[3]||(g[3]=b=>n.value.trim=b)},null,8,["modelValue"]),g[8]||(g[8]=d.createElementVNode("span",null,"Trim",-1))]),d.createElementVNode("div",age,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.showQuartiles,"onUpdate:modelValue":g[4]||(g[4]=b=>n.value.showQuartiles=b)},null,8,["modelValue"]),g[9]||(g[9]=d.createElementVNode("span",null,"Show median and quartiles",-1))]),n.value.showQuartiles?(d.openBlock(),d.createElementBlock("div",ige,[d.createVNode(Hi,{label:"Madian Line Type","form-title":"Line Type Settings","form-back-title":"Layers",type:"lineType","possible-aes-source-inputs":[],selected:s.value,onAesUpdate:g[5]||(g[5]=b=>d.unref(t).reactive.layersSettings[u3].medianLineStyle=b)},null,8,["selected"]),d.createVNode(Hi,{label:"Quartiles Line Type","form-title":"Line Type Settings","form-back-title":"Layers",type:"lineType","possible-aes-source-inputs":[],selected:c.value,onAesUpdate:g[6]||(g[6]=b=>d.unref(t).reactive.layersSettings[u3].quartilesLineStyle=b)},null,8,["selected"])])):d.createCommentVNode("",!0),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:h.value,"onUpdate:modelValue":g[7]||(g[7]=b=>h.value=b)},null,8,["modelValue"])],64))}}),yB="bar",lge=d.defineComponent({__name:"Bar",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[yB]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.fillColor,r.value,Py)),i=d.computed(()=>df(n.value.lineColor,r.value,yo));function o(f,A,h){A.type==="dataCategorical"?t.value.reactive.layersSettings[yB][h]={type:A.inputName}:t.value.reactive.layersSettings[yB][h]=f,A.type==="dataCategorical"&&typeof f!="string"&&(t.value.reactive.dataBindAes[A.selectedSource]=f)}const s=[{text:"Min",value:"min"},{text:"Max",value:"max"},{text:"Mean",value:"mean"},{text:"Median",value:"median"}],c=d.computed({get:()=>n.value.opacity*100,set:f=>{n.value.opacity=f/100}});return(f,A)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:A[0]||(A[0]=(h,m)=>o(h,m,"fillColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,onAesUpdate:A[1]||(A[1]=(h,m)=>o(h,m,"lineColor"))},null,8,["selected"]),d.createElementVNode("div",{class:"input-item",onClick:A[3]||(A[3]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{label:"Height",options:s,modelValue:n.value.height,"onUpdate:modelValue":A[2]||(A[2]=h=>n.value.height=h)},null,8,["modelValue"])]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:c.value,"onUpdate:modelValue":A[4]||(A[4]=h=>c.value=h)},null,8,["modelValue"])],64))}}),sge={class:"checkbox-item"},wB="stackedBar",uge=d.defineComponent({__name:"StackedBar",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[wB]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.fillColor,r.value,Py)),i=d.computed(()=>df(n.value.lineColor,r.value,yo));function o(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[wB][A]={type:f.inputName}:t.value.reactive.layersSettings[wB][A]=c,f.type==="dataCategorical"&&typeof c!="string"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}const s=d.computed({get:()=>n.value.opacity*100,set:c=>{n.value.opacity=c/100}});return(c,f)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:f[0]||(f[0]=(A,h)=>o(A,h,"fillColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,onAesUpdate:f[1]||(f[1]=(A,h)=>o(A,h,"lineColor"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=A=>s.value=A)},null,8,["modelValue"]),d.createElementVNode("div",sge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.normalize,"onUpdate:modelValue":f[3]||(f[3]=A=>n.value.normalize=A)},null,8,["modelValue"]),f[4]||(f[4]=d.createElementVNode("span",null,"Normalize",-1))])],64))}}),Zv="line",cge=d.defineComponent({__name:"Line",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[Zv]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.lineColor,r.value,yo,!0)),i=d.computed(()=>df(n.value.dotFill,r.value,yo,!0)),o=d.computed(()=>n.value.lineType);function s(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Zv][b]={type:g.inputName}:t.value.reactive.layersSettings[Zv][b]=m,g.type==="dataCategorical"&&typeof m!="string"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}function c(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Zv][b]={type:g.inputName}:t.value.reactive.layersSettings[Zv][b]=m,g.type==="dataCategorical"&&typeof m=="object"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}function f(m,g,b){g.type==="dataCategorical"?t.value.reactive.layersSettings[Zv][b]={type:g.inputName}:t.value.reactive.layersSettings[Zv][b]=m,g.type==="dataCategorical"&&typeof m=="object"&&(t.value.reactive.dataBindAes[g.selectedSource]=m)}const A=[{text:"Mean",value:"mean"},{text:"Median",value:"median"}],h=d.computed({get:()=>n.value.opacity*100,set:m=>{n.value.opacity=m/100}});return(m,g)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:a.value,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:g[0]||(g[0]=(b,C)=>s(b,C,"lineColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Line Type","form-title":"Line Type Settings","form-back-title":"Layers",type:"lineType","possible-aes-source-inputs":["secondaryGrouping"],selected:o.value,onAesUpdate:g[1]||(g[1]=(b,C)=>f(b,C,"lineType"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot fill","form-title":"Dot Fill Settings","form-back-title":"Layers",type:"fill",selected:i.value,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:g[2]||(g[2]=(b,C)=>s(b,C,"dotFill"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot shape","form-title":"Dot Shape Settings","form-back-title":"Layers",type:"dotShape",selected:n.value.dotShape,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:g[3]||(g[3]=(b,C)=>c(b,C,"dotShape"))},null,8,["selected"]),d.createElementVNode("div",{class:"input-item",onClick:g[5]||(g[5]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{label:"Point value",options:A,modelValue:n.value.pointsValues,"onUpdate:modelValue":g[4]||(g[4]=b=>n.value.pointsValues=b)},null,8,["modelValue"])]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:h.value,"onUpdate:modelValue":g[6]||(g[6]=b=>h.value=b)},null,8,["modelValue"])],64))}}),F7="errorbar",fge=d.defineComponent({__name:"Errorbar",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[F7]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.lineColor,r.value,yo,!0)),i=d.computed(()=>df(n.value.dotFill,r.value,yo,!0));function o(h,m,g){m.type==="dataCategorical"?t.value.reactive.layersSettings[F7][g]={type:m.inputName}:t.value.reactive.layersSettings[F7][g]=h,m.type==="dataCategorical"&&typeof h!="string"&&(t.value.reactive.dataBindAes[m.selectedSource]=h)}function s(h,m,g){m.type==="dataCategorical"?t.value.reactive.layersSettings[F7][g]={type:m.inputName}:t.value.reactive.layersSettings[F7][g]=h,m.type==="dataCategorical"&&typeof h=="object"&&(t.value.reactive.dataBindAes[m.selectedSource]=h)}const c=[{text:"Standard deviation",value:"sd"},{text:"Standard error",value:"se"},{text:"Confident interval",value:"ci"}],f=[{text:"Mean",value:"mean"},{text:"Median",value:"median"}],A=d.computed({get:()=>n.value.opacity*100,set:h=>{n.value.opacity=h/100}});return(h,m)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke",selected:a.value,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:m[0]||(m[0]=(g,b)=>o(g,b,"lineColor"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot fill","form-title":"Dot Fill Settings","form-back-title":"Layers",type:"fill",selected:i.value,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:m[1]||(m[1]=(g,b)=>o(g,b,"dotFill"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot shape","form-title":"Dot Shape Settings","form-back-title":"Layers",type:"dotShape",selected:n.value.dotShape,"possible-aes-source-inputs":["secondaryGrouping"],onAesUpdate:m[2]||(m[2]=(g,b)=>s(g,b,"dotShape"))},null,8,["selected"]),d.createElementVNode("div",{class:"input-item",onClick:m[4]||(m[4]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{label:"Point value",options:f,modelValue:n.value.pointsValues,"onUpdate:modelValue":m[3]||(m[3]=g=>n.value.pointsValues=g)},null,8,["modelValue"])]),d.createElementVNode("div",{class:"input-item",onClick:m[6]||(m[6]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{label:"Interval",options:c,modelValue:n.value.interval,"onUpdate:modelValue":m[5]||(m[5]=g=>n.value.interval=g)},null,8,["modelValue"])]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:A.value,"onUpdate:modelValue":m[7]||(m[7]=g=>A.value=g)},null,8,["modelValue"])],64))}}),V7="sina",dge=d.defineComponent({__name:"Sina",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[V7]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>df(n.value.dotFill,r.value,yo));function i(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[V7][A]={type:f.inputName}:t.value.reactive.layersSettings[V7][A]=c,f.type==="dataCategorical"&&typeof c!="string"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}function o(c,f,A){f.type==="dataCategorical"?t.value.reactive.layersSettings[V7][A]={type:f.inputName}:t.value.reactive.layersSettings[V7][A]=c,f.type==="dataCategorical"&&typeof c=="object"&&(t.value.reactive.dataBindAes[f.selectedSource]=c)}const s=d.computed({get:()=>n.value.opacity*100,set:c=>{n.value.opacity=c/100}});return(c,f)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,onAesUpdate:f[0]||(f[0]=(A,h)=>i(A,h,"dotFill"))},null,8,["selected"]),d.createVNode(Hi,{label:"Dot shape","form-title":"Dot Shape Settings","form-back-title":"Layers",type:"dotShape",selected:n.value.dotShape,onAesUpdate:f[1]||(f[1]=(A,h)=>o(A,h,"dotShape"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=A=>s.value=A)},null,8,["modelValue"])],64))}}),Age={class:"checkbox-item"},pge="logo",hge=d.defineComponent({__name:"Logo",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[pge]),r=d.computed({get:()=>n.value.opacity*100,set:a=>{n.value.opacity=a/100}});return(a,i)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=o=>r.value=o)},null,8,["modelValue"]),d.createElementVNode("div",Age,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.normalize,"onUpdate:modelValue":i[1]||(i[1]=o=>n.value.normalize=o)},null,8,["modelValue"]),i[2]||(i[2]=d.createElementVNode("span",null,"Normalize",-1))])],64))}}),mge={class:"button-group-item"},vge={class:"button-group-item"},gge={class:"button-group-item",style:{display:"flex",alignItems:"end"}},yge=d.defineComponent({__name:"Heatmap",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings.heatmap),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>t.value.inputGuide.value),i=d.computed(()=>{var C;return(C=r.value.components.value.selectorStates[0])==null?void 0:C.selectedSource}),o=d.computed(()=>{var C;return i.value?(C=t.value.reactive.dataBindAes[i.value])==null?void 0:C.palette:void 0}),s=d.ref(!1),c=d.ref(o.value??Z1);function f(C){c.value=C,s.value=!1,i.value&&(t.value.reactive.dataBindAes[i.value]=Vv(C))}const A=[{label:"None",value:null},{label:"Columns",value:"column"},{label:"Rows",value:"row"}],h=[{label:"z-score",value:"standardScaling"},{label:"Min-max",value:"meanNormalization"}],m=[{label:"empty",value:null},{label:"Special value",value:"custom"}],g=d.ref(n.value.NAValueAs===null?null:"custom"),b=d.ref(n.value.NAValueAs??0);return(C,x)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(o3,{label:"Color Palette ",title:d.unref(Do)[c.value].title,palette:c.value,onButtonClick:x[0]||(x[0]=k=>{s.value=!0})},null,8,["title","palette"]),s.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Color Palette","back-title":"Color mapping","onForm:close":x[1]||(x[1]=k=>s.value=!1)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:c.value,categorical:i.value?a.value.getSourceInfo(i.value).type==="String":!1,onSelect:f},null,8,["selected","categorical"])]),_:1})):d.createCommentVNode("",!0),d.createElementVNode("div",mge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalize by",options:A,compact:!0,modelValue:n.value.normalizationDirection,"onUpdate:modelValue":x[2]||(x[2]=k=>n.value.normalizationDirection=k)},null,8,["modelValue"])]),d.createElementVNode("div",vge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalization method",options:h,compact:!0,modelValue:n.value.normalizationMethod,"onUpdate:modelValue":x[3]||(x[3]=k=>n.value.normalizationMethod=k)},null,8,["modelValue"])]),d.createElementVNode("div",gge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Treat NA value as:",options:m,compact:!0,modelValue:g.value,"onUpdate:modelValue":[x[4]||(x[4]=k=>g.value=k),x[5]||(x[5]=k=>{k==="custom"?n.value.NAValueAs=b.value:n.value.NAValueAs=k})]},null,8,["modelValue"]),d.createVNode(d.unref(pt.PlNumberField),{style:{height:"33px",marginLeft:"16px",width:"75px"},disabled:g.value!=="custom",label:"NA value",useIncrementButtons:!1,modelValue:b.value,"onUpdate:modelValue":[x[6]||(x[6]=k=>b.value=k),x[7]||(x[7]=k=>{k!==void 0&&(n.value.NAValueAs=k)})]},null,8,["disabled","modelValue"])])],64))}}),wge={class:"checkbox-item"},Cge={class:"checkbox-item"},O7="dendro",bge=d.defineComponent({__name:"Dendro",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[O7]),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>n.value.dotFill),i=d.computed(()=>n.value.dotShape),o=d.computed(()=>n.value.lineColor);function s(g,b,C){typeof g=="string"?t.value.reactive.layersSettings[O7][C]=g:b.type==="dataCategorical"&&(t.value.reactive.layersSettings[O7][C]={type:b.inputName,value:b.selectedSource}),b.type==="dataCategorical"&&typeof g!="string"&&(t.value.reactive.dataBindAes[b.selectedSource]=g)}function c(g,b,C){typeof g=="string"?t.value.reactive.layersSettings[O7][C]=g:b.type==="dataCategorical"&&(t.value.reactive.layersSettings[O7][C]={type:b.inputName,value:b.selectedSource}),b.type==="dataCategorical"&&typeof g!="string"&&(t.value.reactive.dataBindAes[b.selectedSource]=g)}const f=d.ref(n.value.leavesMode==="alignLeavesToLine"),A=d.computed({get(){return n.value.showLegend??!0},set(g){n.value.showLegend=g}}),h=d.computed({get(){return TS(n.value.dotSize)?[n.value.dotSize.min,n.value.dotSize.max]:[3,10]},set([g,b]){n.value.dotSize={min:g,max:b}}}),m=d.computed({get(){return TS(n.value.dotSize)?3:n.value.dotSize},set(g){n.value.dotSize=g}});return(g,b)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Node color","form-title":"Node Color Settings","form-back-title":"Layers",type:"fill",selected:a.value,"possible-aes-source-inputs":["nodeColor"],"without-fixed":r.value.components.nodeColor.selectorStates.length>0,onAesUpdate:b[0]||(b[0]=(C,x)=>s(C,x,"dotFill"))},null,8,["selected","without-fixed"]),d.createVNode(Hi,{label:"Node shape","form-title":"Node Shape Settings","form-back-title":"Layers",type:"dotShape",selected:i.value,"possible-aes-source-inputs":["nodeShape"],"without-fixed":r.value.components.nodeShape.selectorStates.length>0,onAesUpdate:b[1]||(b[1]=(C,x)=>c(C,x,"dotShape"))},null,8,["selected","without-fixed"]),d.createVNode(Hi,{label:"Line color","form-title":"Line Color Settings","form-back-title":"Layers",type:"fill",selected:o.value,"possible-aes-source-inputs":["lineColor"],"without-fixed":r.value.components.lineColor.selectorStates.length>0,onAesUpdate:b[2]||(b[2]=(C,x)=>s(C,x,"lineColor"))},null,8,["selected","without-fixed"]),d.createElementVNode("div",null,[r.value.components.nodeSize.selectorStates.length>0?(d.openBlock(),d.createBlock(d.unref(pt.SliderRange),{key:0,min:3,max:10,breakpoints:!0,label:"Node size range",modelValue:h.value,"onUpdate:modelValue":b[3]||(b[3]=C=>h.value=C)},null,8,["modelValue"])):(d.openBlock(),d.createBlock(d.unref(pt.Slider),{key:1,min:3,max:10,step:1,breakpoints:!0,label:"Node size",modelValue:m.value,"onUpdate:modelValue":b[4]||(b[4]=C=>m.value=C)},null,8,["modelValue"]))]),d.createElementVNode("div",wge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:f.value,"onUpdate:modelValue":[b[5]||(b[5]=C=>f.value=C),b[6]||(b[6]=C=>{n.value.leavesMode=C?"alignLeavesToLine":"normal"})]},null,8,["modelValue"]),b[8]||(b[8]=d.createElementVNode("span",null,"Move leaves to the right",-1))]),d.createElementVNode("div",Cge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:A.value,"onUpdate:modelValue":b[7]||(b[7]=C=>A.value=C)},null,8,["modelValue"]),b[9]||(b[9]=d.createElementVNode("span",null,"Show legend",-1))])],64))}}),Ege={class:"dot-size-selector"},xge={class:"dot-size-selector__row"},Sge={class:"dot-size-selector-row"},Bge=d.defineComponent({__name:"DotSizeSelector",props:{selected:{},possibleAesSourceInputs:{}},emits:["aes-update","aes-selector-close"],setup(e,{emit:t}){const n=e,r=da(),a=d.computed(()=>r.value.reactive.chartType),i=t,o={discrete:["primaryGrouping","secondaryGrouping"],scatterplot:["size"],"scatterplot-umap":["size"],dendro:[],heatmap:[],histogram:[],bubble:[]},s=n.possibleAesSourceInputs??o[a.value],c=d.ref(Qv(n.selected)?n.selected.column:"fix"),f=d.computed(()=>r.value.inputGuide.value);function A(b){const C=f.value.getSourceInfo(b);return a.value==="scatterplot"||a.value==="dendro"?`Grouping: ${C==null?void 0:C.label}`:C?(C==null?void 0:C.label)??"":"Not consistent (grouping)"}const h=d.computed(()=>{const b=[],C=r.value.reactive.optionsState.components;return s.forEach(x=>{var k;(k=C==null?void 0:C[x])!=null&&k.selectorStates.length&&C[x].selectorStates.forEach(({selectedSource:_})=>{f.value.getSourceInfo(_).type!=="String"&&b.push({text:A(_),value:_})})}),b.length?b:[{text:"Fixed",value:"fix"}]}),m=d.ref(Qv(n.selected)?Lp:n.selected??Lp),g=d.ref(Qv(n.selected)?[n.selected.range.min,n.selected.range.max]:[zy.min,zy.max]);return d.watch(()=>c.value,b=>{if(b==="fix")i("aes-update",m.value);else{const C={column:b,range:{min:g.value[0],max:g.value[1]}};i("aes-update",C)}}),d.watch(()=>m.value,b=>{c.value==="fix"&&i("aes-update",b)}),d.watch(()=>g.value,b=>{if(c.value!=="fix"){const C={column:c.value,range:{min:b[0],max:b[1]}};i("aes-update",C)}}),(b,C)=>(d.openBlock(),d.createElementBlock("div",Ege,[d.createElementVNode("div",xge,[d.createElementVNode("div",{class:"aes-input-select",onClick:C[1]||(C[1]=d.withModifiers(()=>{},["stop"]))},[d.createVNode(d.unref(pt.PlDropdown),{disabled:h.value.length<2&&h.value[0].value===c.value,label:"Dot size source",options:h.value,modelValue:c.value,"onUpdate:modelValue":C[0]||(C[0]=x=>c.value=x)},null,8,["disabled","options","modelValue"])])]),d.createElementVNode("div",Sge,[c.value!=="fix"?(d.openBlock(),d.createBlock(d.unref(pt.SliderRange),{key:0,min:3,max:10,breakpoints:!0,label:"Dot size range",modelValue:g.value,"onUpdate:modelValue":C[2]||(C[2]=x=>g.value=x)},null,8,["modelValue"])):(d.openBlock(),d.createBlock(d.unref(pt.Slider),{key:1,min:3,max:10,step:1,breakpoints:!0,label:"Dot size",modelValue:m.value,"onUpdate:modelValue":C[3]||(C[3]=x=>m.value=x)},null,8,["modelValue"]))])]))}}),c3="dots",kge=d.defineComponent({__name:"Scatter",setup(e){const t=da(),n=t.value.reactive.optionsState,r=d.computed(()=>t.value.inputGuide.value),a=d.computed(()=>t.value.reactive.layersSettings[c3]);function i(g){return g!==null&&typeof g=="object"&&"type"in g}const o=d.computed(()=>{const g=a.value.dotFill,b=n.components.grouping.selectorStates.map(C=>C.selectedSource);return i(g)&&b.length?b.includes(g.value)?g:{type:"grouping",value:b[0]}:b.length?{type:"grouping",value:b[0]}:i(g)?yo:g??yo}),s=d.computed(()=>{const g=a.value.dotShape,b=n.components.shape.selectorStates.map(C=>C.selectedSource);return i(g)&&b.length?g.value===b[0]?g:{type:"shape",value:b[0]}:b.length?{type:"shape",value:b[0]}:i(g)?P0:g??P0}),c=d.computed(()=>{const g=a.value.dotSize,b=n.components.size.selectorStates.map(C=>C.selectedSource);return b.length?Qv(g)?g:{column:b[0],range:zy}:Qv(g)?Lp:g??Lp});function f(g,b,C){typeof g=="string"?t.value.reactive.layersSettings[c3][C]=g:(b.type==="dataCategorical"||b.type==="dataContinuous")&&(t.value.reactive.layersSettings[c3][C]={type:"grouping",value:b.selectedSource}),mR(g)&&b.type!=="fix"&&(t.value.reactive.dataBindAes[b.selectedSource]=g)}function A(g,b,C){typeof g=="string"?t.value.reactive.layersSettings[c3][C]=g:b.type==="dataCategorical"&&(t.value.reactive.layersSettings[c3][C]={type:"grouping",value:b.selectedSource}),b.type==="dataCategorical"&&typeof g!="string"&&(t.value.reactive.dataBindAes[b.selectedSource]=g)}function h(g){t.value.reactive.layersSettings[c3].dotSize=g}const m=d.computed(()=>{if(n.components.grouping.selectorStates.length){const g=n.components.grouping.selectorStates[0].selectedSource,b=r.value.getSourceInfo(g).annotations;if(b!=null&&b[jy])return!0}return!1});return(g,b)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Dot color","form-title":"Dot color Settings","form-back-title":"Layers",type:"fill",selected:o.value,"possible-aes-source-inputs":["grouping"],disabled:m.value,withoutFixed:typeof o.value=="object",onAesUpdate:b[0]||(b[0]=(C,x)=>f(C,x,"dotFill"))},null,8,["selected","disabled","withoutFixed"]),d.createVNode(Hi,{label:"Dot shape","form-title":"Dot shape Settings","form-back-title":"Layers",type:"dotShape","possible-aes-source-inputs":["shape"],selected:s.value,withoutFixed:typeof s.value=="object",onAesUpdate:b[1]||(b[1]=(C,x)=>A(C,x,"dotShape"))},null,8,["selected","withoutFixed"]),d.createVNode(Bge,{selected:c.value,onAesUpdate:h},null,8,["selected"])],64))}}),CB="dots",Tge=d.defineComponent({__name:"Scatter",setup(e){const t=da(),n=t.value.reactive.optionsState,r=d.computed(()=>t.value.inputGuide.value),a=d.computed(()=>t.value.reactive.layersSettings[CB]);function i(f){return f!==null&&typeof f=="object"&&"type"in f}const o=d.computed(()=>{const f=a.value.dotFill,A=n.components.grouping.selectorStates.map(h=>h.selectedSource);return i(f)&&A.length?A.includes(f.value)?f:{type:"grouping",value:A[0]}:A.length?{type:"grouping",value:A[0]}:i(f)?yo:f??yo});function s(f,A,h){typeof f=="string"?t.value.reactive.layersSettings[CB][h]=f:(A.type==="dataCategorical"||A.type==="dataContinuous")&&(t.value.reactive.layersSettings[CB][h]={type:"grouping",value:A.selectedSource}),mR(f)&&A.type!=="fix"&&(t.value.reactive.dataBindAes[A.selectedSource]=f)}const c=d.computed(()=>{if(n.components.grouping.selectorStates.length){const f=n.components.grouping.selectorStates[0].selectedSource,A=r.value.getSourceInfo(f).annotations;if(A!=null&&A[jy])return!0}return!1});return(f,A)=>(d.openBlock(),d.createBlock(Hi,{label:"Dot color","form-title":"Dot color Settings1","form-back-title":"Layers",type:"fill",selected:o.value,"possible-aes-source-inputs":["grouping"],disabled:c.value,withoutFixed:typeof o.value=="object",onAesUpdate:A[0]||(A[0]=(h,m)=>s(h,m,"dotFill"))},null,8,["selected","disabled","withoutFixed"]))}}),_ge={class:"input-item",style:{display:"flex","justify-content":"space-between","align-items":"center"}},bB="curve",y$=d.defineComponent({__name:"Curve",setup(e){const t=da(),n=t.value.reactive.optionsState,r=d.computed(()=>t.value.reactive.layersSettings[bB]);function a(s){return s!==null&&typeof s=="object"&&"type"in s}const i=d.computed(()=>{const s=r.value.lineColor,c=n.components.grouping.selectorStates.map(f=>f.selectedSource);return a(s)&&c.length?c.includes(s.value)?s:{type:"grouping",value:c[0]}:c.length?{type:"grouping",value:c[0]}:a(s)?yo:s??yo});function o(s,c,f){typeof s=="string"?t.value.reactive.layersSettings[bB][f]=s:c.type==="dataCategorical"&&(t.value.reactive.layersSettings[bB][f]={type:c.inputName,value:c.selectedSource}),c.type==="dataCategorical"&&typeof s!="string"&&(t.value.reactive.dataBindAes[c.selectedSource]=s)}return(s,c)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Color","form-title":"Color Settings","form-back-title":"Layers",type:"stroke",selected:i.value,withoutFixed:typeof i.value=="object","possible-aes-source-inputs":["grouping"],onAesUpdate:c[0]||(c[0]=(f,A)=>o(f,A,"lineColor"))},null,8,["selected","withoutFixed"]),d.createElementVNode("div",_ge,[c[2]||(c[2]=d.createElementVNode("span",null,"Smoothing",-1)),d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(t).reactive.layersSettings.curve.smoothing,"onUpdate:modelValue":c[1]||(c[1]=f=>d.unref(t).reactive.layersSettings.curve.smoothing=f)},null,8,["modelValue"])])],64))}}),Pge={class:"checkbox-item"},Mge={key:1,class:"checkbox-item"},Dge={class:"checkbox-item"},Hge={key:2,class:"checkbox-item"},Ige={class:"button-group-item"},Lge={class:"button-group-item"},Rge={class:"button-group-item",style:{display:"flex",alignItems:"end"}},Nge=d.defineComponent({__name:"HeatmapClustered",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings.heatmapClustered),r=d.computed(()=>t.value.reactive.optionsState),a=d.computed(()=>t.value.inputGuide.value),i=d.computed(()=>{var C;return(C=r.value.components.value.selectorStates[0])==null?void 0:C.selectedSource}),o=d.computed(()=>{var C;return i.value?(C=t.value.reactive.dataBindAes[i.value])==null?void 0:C.palette:void 0}),s=d.ref(!1),c=d.ref(o.value??Z1);function f(C){c.value=C,s.value=!1,i.value&&(t.value.reactive.dataBindAes[i.value]=Vv(C))}const A=[{label:"None",value:null},{label:"Columns",value:"column"},{label:"Rows",value:"row"}],h=[{label:"z-score",value:"standardScaling"},{label:"Min-max",value:"meanNormalization"}],m=[{label:"empty",value:null},{label:"Special value",value:"custom"}],g=d.ref(n.value.NAValueAs!==null?"custom":n.value.NAValueAs),b=d.ref(n.value.NAValueAs??0);return(C,x)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(o3,{label:"Color Palette ",title:d.unref(Do)[c.value].title,palette:c.value,onButtonClick:x[0]||(x[0]=k=>{s.value=!0})},null,8,["title","palette"]),s.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Color Palette","back-title":"Color mapping","onForm:close":x[1]||(x[1]=k=>s.value=!1)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:c.value,categorical:i.value?a.value.getSourceInfo(i.value).type==="String":!1,onSelect:f},null,8,["selected","categorical"])]),_:1})):d.createCommentVNode("",!0),d.createElementVNode("div",Pge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.disableClusteringX,"onUpdate:modelValue":x[2]||(x[2]=k=>n.value.disableClusteringX=k)},null,8,["modelValue"]),x[12]||(x[12]=d.createElementVNode("span",null,"Disable clustering for X axis",-1))]),n.value.disableClusteringX?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Mge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.dendrogramX,"onUpdate:modelValue":x[3]||(x[3]=k=>n.value.dendrogramX=k)},null,8,["modelValue"]),x[13]||(x[13]=d.createElementVNode("span",null,"Show dendrogram for X axis",-1))])),d.createElementVNode("div",Dge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.disableClusteringY,"onUpdate:modelValue":x[4]||(x[4]=k=>n.value.disableClusteringY=k)},null,8,["modelValue"]),x[14]||(x[14]=d.createElementVNode("span",null,"Disable clustering for Y axis",-1))]),n.value.disableClusteringY?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Hge,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.dendrogramY,"onUpdate:modelValue":x[5]||(x[5]=k=>n.value.dendrogramY=k)},null,8,["modelValue"]),x[15]||(x[15]=d.createElementVNode("span",null,"Show dendrogram for Y axis",-1))])),d.createElementVNode("div",Ige,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalize by",options:A,compact:!0,modelValue:n.value.normalizationDirection,"onUpdate:modelValue":x[6]||(x[6]=k=>n.value.normalizationDirection=k)},null,8,["modelValue"])]),d.createElementVNode("div",Lge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalization method",options:h,compact:!0,modelValue:n.value.normalizationMethod,"onUpdate:modelValue":x[7]||(x[7]=k=>n.value.normalizationMethod=k)},null,8,["modelValue"])]),d.createElementVNode("div",Rge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Treat NA value as:",options:m,compact:!0,modelValue:g.value,"onUpdate:modelValue":[x[8]||(x[8]=k=>g.value=k),x[9]||(x[9]=k=>{k==="custom"?n.value.NAValueAs=b.value:n.value.NAValueAs=k})]},null,8,["modelValue"]),d.createVNode(d.unref(pt.PlNumberField),{style:{height:"33px",marginLeft:"16px",width:"75px"},disabled:g.value!=="custom",label:"NA value",useIncrementButtons:!1,modelValue:b.value,"onUpdate:modelValue":[x[10]||(x[10]=k=>b.value=k),x[11]||(x[11]=k=>{k!==void 0&&(n.value.NAValueAs=k)})]},null,8,["disabled","modelValue"])])],64))}}),$ge={class:"section-title"},Fge=d.defineComponent({__name:"HeatmapAnnotations",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.optionsState),r=d.computed(()=>t.value.inputGuide.value),a=d.computed(()=>{const A=n.value.components.annotationsX.selectorStates.map(m=>m.selectedSource),h=n.value.components.annotationsY.selectorStates.map(m=>m.selectedSource);return[...A,...h]}),i=d.computed(()=>a.value.reduce((A,h)=>(A[h]=r.value.getSourceInfo(h),A),{})),o=d.reactive(a.value.reduce((A,h)=>{var b,C;const g=((b=i.value[h])==null?void 0:b.type)==="String"?lL:Z1;return A[h]=((C=t.value.reactive.dataBindAes[h])==null?void 0:C.palette)??g,A},{})),s=d.ref(null),c=d.ref(null);function f(A){const h=c.value;h&&(o[h]=A,t.value.reactive.dataBindAes[h]=Vv(A)),s.value=h}return(A,h)=>(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a.value,m=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",$ge,[d.createElementVNode("span",null,d.toDisplayString(i.value[m].label),1)]),d.createVNode(o3,{label:"Color Palette ",title:d.unref(Do)[o[m]].title,palette:o[m],style:{marginBottom:"24px"},onButtonClick:g=>{s.value=m,c.value=m}},null,8,["title","palette","onButtonClick"]),s.value===m?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Color Palette","back-title":"Color mapping","onForm:close":h[0]||(h[0]=g=>s.value=null)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:o[m],categorical:i.value[m].type==="String",onSelect:f},null,8,["selected","categorical"])]),_:2},1024)):d.createCommentVNode("",!0)],64))),256))}}),Vge={},Oge={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function Qge(e,t){return d.openBlock(),d.createElementBlock("svg",Oge,t[0]||(t[0]=[d.createStaticVNode('<path fill-rule="evenodd" clip-rule="evenodd" d="M9.25 13.5C9.25 14.1904 9.80964 14.75 10.5 14.75L13.5 14.75C14.1904 14.75 14.75 14.1904 14.75 13.5V10.5C14.75 9.80964 14.1904 9.25 13.5 9.25H10.5C9.80964 9.25 9.25 9.80964 9.25 10.5V13.5ZM10.75 13.25V10.75H13.25V13.25H10.75Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M9.25 20.5C9.25 21.1904 9.80964 21.75 10.5 21.75H13.5C14.1904 21.75 14.75 21.1904 14.75 20.5V17.5C14.75 16.8096 14.1904 16.25 13.5 16.25H10.5C9.80964 16.25 9.25 16.8096 9.25 17.5L9.25 20.5ZM10.75 20.25V17.75H13.25V20.25H10.75Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 13.5C2.25 14.1904 2.80964 14.75 3.5 14.75H6.5C7.19036 14.75 7.75 14.1904 7.75 13.5L7.75 10.5C7.75 9.80964 7.19036 9.25 6.5 9.25H3.5C2.80964 9.25 2.25 9.80964 2.25 10.5L2.25 13.5ZM3.75 13.25L3.75 10.75H6.25V13.25H3.75Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 20.5C2.25 21.1904 2.80964 21.75 3.5 21.75H6.5C7.19036 21.75 7.75 21.1904 7.75 20.5L7.75 17.5C7.75 16.8096 7.19036 16.25 6.5 16.25H3.5C2.80964 16.25 2.25 16.8096 2.25 17.5L2.25 20.5ZM3.75 20.25L3.75 17.75H6.25V20.25H3.75Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M16.25 20.5C16.25 21.1904 16.8096 21.75 17.5 21.75H20.5C21.1904 21.75 21.75 21.1904 21.75 20.5L21.75 10.5C21.75 9.80964 21.1904 9.25 20.5 9.25H17.5C16.8096 9.25 16.25 9.80964 16.25 10.5L16.25 20.5ZM17.75 20.25L17.75 10.75L20.25 10.75L20.25 20.25H17.75Z" fill="#07AD3E"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 6.5C2.25 7.19036 2.80964 7.75 3.5 7.75L13.5 7.75C14.1904 7.75 14.75 7.19036 14.75 6.5V3.5C14.75 2.80964 14.1904 2.25 13.5 2.25L3.5 2.25C2.80964 2.25 2.25 2.80964 2.25 3.5L2.25 6.5ZM3.75 6.25L3.75 3.75L13.25 3.75V6.25L3.75 6.25Z" fill="#07AD3E"></path>',6)]))}const zge=Wr(Vge,[["render",Qge]]),EB="bins",Uge=d.defineComponent({__name:"Bins",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings[EB]),r=d.computed(()=>n.value.fillColor??Py);function a(o,s,c){s.type==="dataCategorical"?t.value.reactive.layersSettings[EB][c]={type:s.inputName}:t.value.reactive.layersSettings[EB][c]=o,s.type==="dataCategorical"&&typeof o!="string"&&(t.value.reactive.dataBindAes[s.selectedSource]=o)}const i=d.computed({get:()=>n.value.opacity*100,set:o=>{n.value.opacity=o/100}});return(o,s)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(Hi,{label:"Fill color","form-title":"Fill Color Settings","form-back-title":"Layers",type:"fill",selected:r.value,onAesUpdate:s[0]||(s[0]=(c,f)=>a(c,f,"fillColor"))},null,8,["selected"]),d.createVNode(d.unref(pt.Slider),{label:"Opacity",min:0,max:100,step:1,breakpoints:!1,measure:"%",modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=c=>i.value=c)},null,8,["modelValue"])],64))}}),jge={class:"input-item"},Gge={class:"button-group-item"},Yge={class:"button-group-item"},Wge={class:"button-group-item",style:{display:"flex",alignItems:"end"}},Xge=d.defineComponent({__name:"Bubble",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.layersSettings.bubble),r=d.computed(()=>t.value.reactive.optionsState);d.computed(()=>t.value.inputGuide.value);const a=d.computed(()=>{var C;return(C=r.value.components.valueColor.selectorStates[0])==null?void 0:C.selectedSource}),i=d.computed(()=>{var C;return a.value?(C=t.value.reactive.dataBindAes[a.value])==null?void 0:C.palette:void 0}),o=d.ref(!1),s=d.ref(i.value??Z1);function c(C){s.value=C,o.value=!1,a.value&&(t.value.reactive.dataBindAes[a.value]=Vv(C))}const f=[{label:"None",value:null},{label:"Columns",value:"column"},{label:"Rows",value:"row"}],A=[{label:"z-score",value:"standardScaling"},{label:"Min-max",value:"meanNormalization"}],h=d.computed({get:()=>n.value.strokeColor??yo,set:C=>{n.value.strokeColor=C}}),m=[{label:"empty",value:null},{label:"Special value",value:"custom"}],g=d.ref(n.value.NAValueAs!==null?"custom":n.value.NAValueAs),b=d.ref(n.value.NAValueAs??0);return(C,x)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createVNode(o3,{label:"Color Palette ",title:d.unref(Do)[s.value].title,palette:s.value,onButtonClick:x[0]||(x[0]=k=>{o.value=!0})},null,8,["title","palette"]),o.value?(d.openBlock(),d.createBlock(Qh,{key:0,title:"Color Palette","back-title":"Color mapping","onForm:close":x[1]||(x[1]=k=>o.value=!1)},{default:d.withCtx(()=>[d.createVNode(l3,{selected:s.value,categorical:!1,onSelect:c},null,8,["selected"])]),_:1})):d.createCommentVNode("",!0),d.createElementVNode("div",jge,[d.createVNode(Hi,{label:"Stroke color","form-title":"Stroke Color Settings","form-back-title":"Layers",type:"stroke","possible-aes-source-inputs":[],selected:h.value,onAesUpdate:x[2]||(x[2]=k=>h.value=k)},null,8,["selected"])]),d.createElementVNode("div",Gge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalize by",options:f,compact:!0,modelValue:n.value.normalizationDirection,"onUpdate:modelValue":x[3]||(x[3]=k=>n.value.normalizationDirection=k)},null,8,["modelValue"])]),d.createElementVNode("div",Yge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Normalization method",options:A,compact:!0,modelValue:n.value.normalizationMethod,"onUpdate:modelValue":x[4]||(x[4]=k=>n.value.normalizationMethod=k)},null,8,["modelValue"])]),d.createElementVNode("div",Wge,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Treat NA value as:",options:m,compact:!0,modelValue:g.value,"onUpdate:modelValue":[x[5]||(x[5]=k=>g.value=k),x[6]||(x[6]=k=>{k==="custom"?n.value.NAValueAs=b.value:n.value.NAValueAs=k})]},null,8,["modelValue"]),d.createVNode(d.unref(pt.PlNumberField),{style:{height:"33px",marginLeft:"16px",width:"75px"},disabled:g.value!=="custom",label:"NA value",useIncrementButtons:!1,modelValue:b.value,"onUpdate:modelValue":[x[7]||(x[7]=k=>b.value=k),x[8]||(x[8]=k=>{k!==void 0&&(n.value.NAValueAs=k)})]},null,8,["disabled","modelValue"])])],64))}}),Kge={class:"layers-form",id:"layers-form"},Zge={class:"layers-list"},Jge=d.defineComponent({__name:"index",setup(e){const t=da(),n={box:Jve,binnedDots:ege,jitteredDots:nge,violin:oge,bar:lge,stackedBar:uge,line:cge,errorbar:fge,sina:dge,logo:hge},r={dots:kge,curve:y$},a={dots:Tge,curve:y$},i={heatmap:yge,heatmapClustered:Nge};return(o,s)=>(d.openBlock(),d.createElementBlock("div",Kge,[s[0]||(s[0]=d.createElementVNode("div",{class:"layers-title"},[d.createElementVNode("h3",null," Layers ")],-1)),d.createElementVNode("div",Zge,[d.unref(t).reactive.chartType==="discrete"?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(d.unref(Gy)[d.unref(t).reactive.template],c=>(d.openBlock(),d.createBlock(ts,{icon:d.unref(Vf)[c],title:d.unref(H0)[c],settings:{defaultState:d.unref(Gy)[d.unref(t).reactive.template].length>1?"close":"open"}},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n[c])))]),_:2},1032,["icon","title","settings"]))),256)):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot"?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:1},d.renderList(d.unref(Ov)[d.unref(t).reactive.template],c=>(d.openBlock(),d.createBlock(ts,{icon:d.unref(Vf)[c],title:d.unref(H0)[c],settings:{defaultState:d.unref(Ov)[d.unref(t).reactive.template].length>1?"close":"open"}},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(r[c])))]),_:2},1032,["icon","title","settings"]))),256)):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot-umap"?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:2},d.renderList(d.unref(bR)[d.unref(t).reactive.template],c=>(d.openBlock(),d.createBlock(ts,{icon:d.unref(Vf)[c],title:d.unref(H0)[c],settings:{defaultState:d.unref(Ov)[d.unref(t).reactive.template].length>1?"close":"open"}},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(a[c])))]),_:2},1032,["icon","title","settings"]))),256)):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="heatmap"?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:3},d.renderList(d.unref(cle)[d.unref(t).reactive.template],c=>(d.openBlock(),d.createBlock(ts,{icon:d.unref(Vf)[c],title:d.unref(H0)[c],settings:{defaultState:"open"}},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(i[c])))]),_:2},1032,["icon","title"]))),256)):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="heatmap"?(d.openBlock(),d.createBlock(ts,{key:4,icon:zge,title:"Annotations",settings:{defaultState:"open"}},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(Fge)))]),_:1})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="dendro"?(d.openBlock(),d.createBlock(ts,{key:5,icon:d.unref(Vf).dendro,title:d.unref(H0).dendro,settings:{defaultState:"open"}},{default:d.withCtx(()=>[d.createVNode(bge)]),_:1},8,["icon","title"])):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="histogram"?(d.openBlock(),d.createBlock(ts,{key:6,icon:d.unref(Vf).bins,title:d.unref(H0).bins,settings:{defaultState:"open"}},{default:d.withCtx(()=>[d.createVNode(Uge)]),_:1},8,["icon","title"])):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="bubble"?(d.openBlock(),d.createBlock(ts,{key:7,icon:d.unref(Vf).bubble,title:d.unref(H0).bubble,settings:{defaultState:"open"}},{default:d.withCtx(()=>[d.createVNode(Xge)]),_:1},8,["icon","title"])):d.createCommentVNode("",!0)])]))}});function qge(e,{slots:t}){return d.h("div",Object.assign({},e,{class:"non-found-component"}),t.default&&t.default())}function eye(e,t){return d.computed(()=>{const n=d.unref(t);return n&&e[n]?e[n]:qge})}const tye={},nye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rye(e,t){return d.openBlock(),d.createElementBlock("svg",nye,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.5 7.5V4.5H19.5V7.5H14.5ZM13 4C13 3.44772 13.4477 3 14 3H20C20.5523 3 21 3.44772 21 4V8C21 8.55228 20.5523 9 20 9H14C13.4477 9 13 8.55228 13 8V4ZM4.5 19.5V16.5H9.5V19.5H4.5ZM3 16C3 15.4477 3.44772 15 4 15H10C10.5523 15 11 15.4477 11 16V20C11 20.5523 10.5523 21 10 21H4C3.44772 21 3 20.5523 3 20V16Z",fill:"#07AD3E"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.5 11.5V4.5H9.5V11.5H4.5ZM3 4C3 3.44772 3.44772 3 4 3H10C10.5523 3 11 3.44772 11 4V12C11 12.5523 10.5523 13 10 13H4C3.44772 13 3 12.5523 3 12V4ZM14.5 19.5V12.5H19.5V19.5H14.5ZM13 12C13 11.4477 13.4477 11 14 11H20C20.5523 11 21 11.4477 21 12V20C21 20.5523 20.5523 21 20 21H14C13.4477 21 13 20.5523 13 20V12Z",fill:"#110529"},null,-1)]))}const aye=Wr(tye,[["render",rye]]),iye={},oye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lye(e,t){return d.openBlock(),d.createElementBlock("svg",oye,t[0]||(t[0]=[d.createStaticVNode('<g clip-path="url(#clip0_8849_14901)"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.2214 15.2215L13.5701 12.8728C15.2298 11.2131 15.2298 8.5221 13.5701 6.86237C11.9104 5.20264 9.21943 5.20264 7.5597 6.86237L3.31706 11.105C1.65733 12.7647 1.65733 15.4557 3.31706 17.1154C4.38616 18.1845 5.88312 18.565 7.25674 18.2568L8.45258 19.4526C6.38303 20.2767 3.93151 19.8512 2.2564 18.1761C0.0108876 15.9306 0.0108879 12.2899 2.2564 10.0444L6.49904 5.80171C8.74456 3.5562 12.3853 3.5562 14.6308 5.80171C16.8763 8.04723 16.8763 11.6879 14.6308 13.9334L12.2821 16.2821L11.2214 15.2215Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M17.4594 18.1761C15.2139 20.4216 11.5732 20.4216 9.32769 18.1761C7.08218 15.9306 7.08218 12.2899 9.32769 10.0444L11.686 7.68604L12.7467 8.7467L10.3884 11.105C8.72862 12.7647 8.72862 15.4557 10.3884 17.1154C12.0481 18.7751 14.739 18.7751 16.3988 17.1154L20.6414 12.8728C22.3011 11.2131 22.3011 8.5221 20.6414 6.86237C19.5764 5.79737 18.0868 5.41575 16.7175 5.71752L15.5197 4.51971C17.5863 3.70299 20.0307 4.13032 21.7021 5.80171C23.9476 8.04723 23.9476 11.6879 21.7021 13.9334L17.4594 18.1761Z" fill="#07AD3E"></path></g><defs><clipPath id="clip0_8849_14901"><rect width="24" height="24" fill="white"></rect></clipPath></defs>',2)]))}const sye=Wr(iye,[["render",lye]]),uye={},cye={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fye(e,t){return d.openBlock(),d.createElementBlock("svg",cye,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M23.25 17.75V14H24.75V17.75H26V19.25H24.75V23.25H28.75V22H30.25V23.25H34V24.75H30.25V26H28.75V24.75H24.75V28.75H26V30.25H24.75V34H23.25V30.25H22V28.75H23.25V24.75H19.25V26H17.75V24.75H14V23.25H17.75V22H19.25V23.25H23.25V19.25H22V17.75H23.25Z",fill:"#110529"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.4697 15.5303L17.7501 17.8107V20H19.2501V17.8107L21.5304 15.5303L20.4697 14.4697L18.5001 16.4393L16.5304 14.4697L15.4697 15.5303ZM27.4697 28.5303L29.4394 30.5L27.4697 32.4697L28.5304 33.5303L30.5001 31.5607L32.4697 33.5303L33.5304 32.4697L31.5607 30.5L33.5304 28.5303L32.4697 27.4697L30.5001 29.4393L28.5304 27.4697L27.4697 28.5303Z",fill:"#07AD3E"},null,-1)]))}const dye=Wr(uye,[["render",fye]]),Aye={},pye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function hye(e,t){return d.openBlock(),d.createElementBlock("svg",pye,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.5 12C20.5 10.3189 20.0015 8.67547 19.0675 7.27766C18.1335 5.87984 16.806 4.79037 15.2528 4.14703C13.6996 3.50368 11.9906 3.33536 10.3417 3.66333C8.6929 3.9913 7.17834 4.80085 5.9896 5.9896C4.80085 7.17834 3.9913 8.6929 3.66333 10.3417C3.33536 11.9906 3.50368 13.6996 4.14703 15.2528C4.79037 16.806 5.87984 18.1335 7.27766 19.0675C8.18407 19.6731 9.19374 20.0957 10.25 20.3179V12.75H7V11.25H10.25V8C10.25 6.48122 11.4812 5.25 13 5.25C14.5188 5.25 15.75 6.48122 15.75 8V8.5H14.25V8C14.25 7.30964 13.6904 6.75 13 6.75C12.3096 6.75 11.75 7.30964 11.75 8V11.25H15V12.75H11.75V20.4963V21.5V21.9969C9.85961 21.9496 8.01943 21.3672 6.4443 20.3147C4.79981 19.2159 3.51809 17.6541 2.76121 15.8268C2.00433 13.9996 1.8063 11.9889 2.19215 10.0491C2.578 8.10929 3.53041 6.32746 4.92894 4.92894C6.32746 3.53041 8.10929 2.578 10.0491 2.19215C11.9889 1.8063 13.9996 2.00433 15.8268 2.76121C17.6541 3.51809 19.2159 4.79981 20.3147 6.4443C21.4135 8.08879 22 10.0222 22 12H20.5Z",fill:"#110529"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.0607 18L21.5304 15.5303L20.4697 14.4697L18.0001 16.9393L15.5304 14.4697L14.4697 15.5303L16.9394 18L14.4697 20.4697L15.5304 21.5303L18.0001 19.0607L20.4697 21.5303L21.5304 20.4697L19.0607 18Z",fill:"#07AD3E"},null,-1)]))}const mye=Wr(Aye,[["render",hye]]),vye={},gye={class:"layers-icon",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yye(e,t){return d.openBlock(),d.createElementBlock("svg",gye,t[0]||(t[0]=[d.createElementVNode("g",{id:"24: layers"},[d.createElementVNode("path",{id:"Subtract","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.37549 15.1251L12.0003 21.25L21.6255 15.1249L21.6749 15.1563C22.2924 15.5493 22.2924 16.4507 21.6749 16.8436L12.5375 22.6583C12.21 22.8668 11.7913 22.8668 11.4638 22.6583L2.32641 16.8436C1.70891 16.4507 1.70891 15.5493 2.32641 15.1563L2.37549 15.1251Z",fill:"#07AD3E"}),d.createElementVNode("path",{id:"Union","fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.32641 7.15633C1.70891 7.54929 1.70891 8.4507 2.32641 8.84366L11.4638 14.6583C11.7913 14.8668 12.21 14.8668 12.5375 14.6583L21.6749 8.84365C22.2924 8.4507 22.2924 7.54929 21.6749 7.15633L12.5375 1.34164C12.21 1.13319 11.7913 1.13319 11.4638 1.34164L2.32641 7.15633ZM3.75 7.99997L12 13.25L20.25 7.99997L12 2.74997L3.75 7.99997ZM12.0003 17.25L2.37549 11.1251L2.32641 11.1563C1.70891 11.5493 1.70891 12.4507 2.32641 12.8436L11.4638 18.6583C11.7913 18.8668 12.21 18.8668 12.5375 18.6583L21.6749 12.8436C22.2924 12.4507 22.2924 11.5493 21.6749 11.1563L21.6255 11.1249L12.0003 17.25Z",fill:"#110529"})],-1)]))}const wye=Wr(vye,[["render",yye]]),Cye=d.defineComponent({__name:"SettingsIcon",setup(e){return(t,n)=>(d.openBlock(),d.createBlock(d.unref(pt.PlIcon24),{name:"settings"}))}}),bye={},Eye={class:"export-icon",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xye(e,t){return d.openBlock(),d.createElementBlock("svg",Eye,t[0]||(t[0]=[d.createElementVNode("g",{id:"Icon"},[d.createElementVNode("path",{id:"Rectangle 4179",d:"M3 17V18C3 19.6569 4.34315 21 6 21H18C19.6569 21 21 19.6569 21 18V17",stroke:"#07AD3E","stroke-width":"1.5"}),d.createElementVNode("path",{id:"Vector 1335",d:"M18 10L12 16M12 16L6 10M12 16L12 2",stroke:"black","stroke-width":"1.5"})],-1)]))}const Sye=Wr(bye,[["render",xye]]),Bye={class:"input-item"},kye={class:"input-item"},Tye={class:"input-item"},_ye={class:"input-item"},Pye={class:"input-item",style:{"z-index":"0"}},Mye={class:"checkbox-item"},Dye={class:"input-item"},Hye={class:"input-item"},Iye={class:"input-item",style:{"z-index":"0"}},Lye={class:"checkbox-item"},Rye=d.defineComponent({__name:"DiscreteStatisticsForm",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.statisticsSettings),r=d.computed(()=>t.value.commonHelpersData.primaryGroups.value),a=d.computed(()=>RR(r.value)),i=d.computed(()=>NR(r.value)),o=(g,b)=>d.computed({get(){return g[b]??void 0},set(C){g[b]=C??null}}),s=o(n.value.overall.data,"testMethod"),c=o(n.value.referenceGroup.data,"testMethod"),f=o(n.value.referenceGroup.data,"referenceGroup"),A=o(n.value.referenceGroup.data,"correctionMethod"),h=o(n.value.pairwise.data,"testMethod"),m=o(n.value.pairwise.data,"correctionMethod");return PS(t)(),d.watch([()=>n.value.overall.data.testMethod,()=>n.value.referenceGroup.data.referenceGroup],PS(t)),(g,b)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[b[12]||(b[12]=d.createElementVNode("h3",null," Statistics ",-1)),b[13]||(b[13]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"overall p-value")],-1)),d.createElementVNode("div",Bye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Method",clearable:"",placeholder:"Choose",modelValue:d.unref(s),"onUpdate:modelValue":b[0]||(b[0]=C=>d.isRef(s)?s.value=C:null),options:i.value,error:n.value.overall.validity.testMethod?"":" "},null,8,["modelValue","options","error"])]),b[14]||(b[14]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"reference group")],-1)),d.createElementVNode("div",kye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Reference from...",clearable:"",placeholder:"Choose",modelValue:d.unref(f),"onUpdate:modelValue":b[1]||(b[1]=C=>d.isRef(f)?f.value=C:null),options:a.value,error:n.value.referenceGroup.validity.referenceGroup?"":" "},null,8,["modelValue","options","error"])]),d.createElementVNode("div",Tye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Method",clearable:"",placeholder:"Choose",modelValue:d.unref(c),"onUpdate:modelValue":b[2]||(b[2]=C=>d.isRef(c)?c.value=C:null),options:d.unref(HC)},null,8,["modelValue","options"])]),d.createElementVNode("div",_ye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Correction method",placeholder:"Choose",modelValue:d.unref(A),"onUpdate:modelValue":b[3]||(b[3]=C=>d.isRef(A)?A.value=C:null),options:d.unref(xR)},null,8,["modelValue","options"])]),d.createElementVNode("div",Pye,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Show",modelValue:n.value.referenceGroup.data.format,"onUpdate:modelValue":b[4]||(b[4]=C=>n.value.referenceGroup.data.format=C),options:d.unref(SR)},null,8,["modelValue","options"])]),d.createElementVNode("div",Mye,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.referenceGroup.data.ns,"onUpdate:modelValue":b[5]||(b[5]=C=>n.value.referenceGroup.data.ns=C)},null,8,["modelValue"]),b[10]||(b[10]=d.createElementVNode("span",null,"Non-significant",-1))]),b[15]||(b[15]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"pairwise p-value")],-1)),d.createElementVNode("div",Dye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Method",clearable:"",placeholder:"Choose",modelValue:d.unref(h),"onUpdate:modelValue":b[6]||(b[6]=C=>d.isRef(h)?h.value=C:null),options:d.unref(HC)},null,8,["modelValue","options"])]),d.createElementVNode("div",Hye,[d.createVNode(d.unref(pt.PlDropdown),{label:"Correction method",placeholder:"Choose",modelValue:d.unref(m),"onUpdate:modelValue":b[7]||(b[7]=C=>d.isRef(m)?m.value=C:null),options:d.unref(xR)},null,8,["modelValue","options"])]),d.createElementVNode("div",Iye,[d.createVNode(d.unref(pt.PlBtnGroup),{label:"Show",modelValue:n.value.pairwise.data.format,"onUpdate:modelValue":b[8]||(b[8]=C=>n.value.pairwise.data.format=C),options:d.unref(SR)},null,8,["modelValue","options"])]),d.createElementVNode("div",Lye,[d.createVNode(d.unref(pt.PlCheckbox),{modelValue:n.value.pairwise.data.ns,"onUpdate:modelValue":b[9]||(b[9]=C=>n.value.pairwise.data.ns=C)},null,8,["modelValue"]),b[11]||(b[11]=d.createElementVNode("span",null,"Non-significant",-1))])],64))}}),Nye={class:"checkbox-item"},$ye=d.defineComponent({__name:"ScatterplotStatisticsForm",setup(e){const t=da(),n=d.computed(()=>t.value.reactive.statisticsSettings);return(r,a)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[a[1]||(a[1]=d.createElementVNode("h3",null,"Statistics",-1)),a[2]||(a[2]=d.createElementVNode("div",{class:"section-title"},[d.createElementVNode("span",null,"trends")],-1)),d.createElementVNode("div",Nye,[d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:n.value.trend.on,"onUpdate:modelValue":a[0]||(a[0]=i=>n.value.trend.on=i),label:"Build trend",disabled:d.unref(t).reactive.template==="curve"},null,8,["modelValue","disabled"])])],64))}}),Fye=d.defineComponent({__name:"index",setup(e){const t=da();return(n,r)=>(d.openBlock(),d.createElementBlock("div",{class:"stat-form",onClick:r[0]||(r[0]=a=>a.stopPropagation())},[d.unref(t).reactive.chartType==="discrete"?(d.openBlock(),d.createBlock(Rye,{key:0})):d.createCommentVNode("",!0),d.unref(t).reactive.chartType==="scatterplot"?(d.openBlock(),d.createBlock($ye,{key:1})):d.createCommentVNode("",!0)]))}}),Vye={},Oye={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function Qye(e,t){return d.openBlock(),d.createElementBlock("svg",Oye,t[0]||(t[0]=[d.createStaticVNode('<path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 3.75002C7.5 3.05967 8.05964 2.50002 8.75 2.50002L15.25 2.5C15.9404 2.5 16.5 3.05964 16.5 3.75V5.50004L20.5 5.50006V7.00006L19 7.00006H17.5L6.5 7.00004H5L3.5 7V5.5L7.5 5.50006V3.75002ZM9 5.50006L15 5.50004V4L9 4.00002V5.50006Z" fill="#110529"></path><path d="M17.5 7.00006V12.5H19V7.00006H17.5Z" fill="#110529"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 17.75C6.5 18.9926 7.50736 20 8.75 20H12V21.5H8.75C6.67893 21.5 5 19.8211 5 17.75V8.50006H6.5V17.75Z" fill="#110529"></path><path d="M6.5 7.00004H5V8.50006H6.5V7.00004Z" fill="#110529"></path><path d="M14.75 14.5L18.25 18M21.75 21.5L18.25 18M18.25 18L21.75 14.5M18.25 18L14.75 21.5" stroke="#07AD3E" stroke-width="1.5"></path>',5)]))}const zye=Wr(Vye,[["render",Qye]]),Uye={},jye={class:"settings-list"};function Gye(e,t){return d.openBlock(),d.createElementBlock("div",{class:"settings-form",onClick:t[0]||(t[0]=n=>n.stopPropagation())},[t[1]||(t[1]=d.createElementVNode("div",{class:"settings-title"},[d.createElementVNode("h3",null," Settings ")],-1)),d.createElementVNode("div",jye,[d.renderSlot(e.$slots,"default"),d.renderSlot(e.$slots,"settingsSlot")])])}const mb={settings:{icon:Cye,component:Wr(Uye,[["render",Gye]]),title:"Settings"},template:{icon:aye,component:Xle,title:"Template"},dataMapping:{icon:sye,component:g0e,title:"Data mapping"},axes:{icon:dye,component:Ove,title:"Axes settings"},statistics:{icon:mye,component:Fye,title:"Statistics"},layers:{icon:wye,component:Jge,title:"Layers"},delete:{icon:zye,component:null,title:"Delete graph"},export:{icon:Sye,component:null,title:"Export"}};function Yye(){return Object.keys(mb)}function Wye(e){return mb[e].icon??""}function Xye(e){return mb[e].title??""}function Kye(e){const t=Object.entries(mb).reduce((n,[r,a])=>H1e.setProp(n,r,a.component),{});return eye(t,e)}const Zye={class:"settings-tabs"},Jye={style:{"font-family":"var(--font-family-base)"}},qye=d.defineComponent({__name:"index",props:{chartType:{},graphStatus:{},allowDeleting:{type:Boolean},hasSettingsSlot:{type:Boolean},modelValue:{}},emits:["update:modelValue","export","delete"],setup(e,{emit:t}){const n=t,r=e,a=d.computed(()=>Yye().filter(o=>!(o==="settings"&&!r.hasSettingsSlot)&&!(o==="statistics"&&r.chartType!=="discrete"&&r.chartType!=="scatterplot")&&!(o==="delete"&&r.allowDeleting)));function i(o){n("update:modelValue",o===r.modelValue?null:o)}return(o,s)=>(d.openBlock(),d.createElementBlock("div",Zye,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a.value,c=>(d.openBlock(),d.createBlock(d.unref(pt.PlTooltip),{key:c,"open-delay":100,"close-delay":100,class:d.normalizeClass(["has-inline-icon",{active:o.modelValue===c,"temp-inactive":c==="export"&&(o.graphStatus!=="ready"||o.chartType==="scatterplot-umap"),[c]:!0}]),position:"left",hide:o.modelValue===c,onClick:f=>{f.stopPropagation(),c==="export"?o.$emit("export"):c==="delete"?o.$emit("delete"):i(c)}},{tooltip:d.withCtx(()=>[d.createElementVNode("span",Jye,d.toDisplayString(d.unref(Xye)(c)),1)]),default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(d.unref(Wye)(c))))]),_:2},1032,["class","hide","onClick"]))),128))]))}}),e3e=d.defineComponent({__name:"TransitionSlidePanel",setup(e){function t(){window.dispatchEvent(new CustomEvent("adjust"))}function n(){window.dispatchEvent(new CustomEvent("adjust"))}return(r,a)=>(d.openBlock(),d.createBlock(d.Transition,{name:"slide-panel",onAfterEnter:t,onAfterLeave:n},{default:d.withCtx(()=>[d.renderSlot(r.$slots,"default")]),_:3}))}}),t3e=d.defineComponent({__name:"PanelModal",emits:["close"],setup(e,{emit:t}){const n=t,r=d.ref();return pt.useClickOutside([r],()=>n("close")),(a,i)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"rootRef",ref:r,class:"panel-modal"},[d.createVNode(d.unref(pt.PlCloseModalBtn),{class:"close-panel-modal",onClick:i[0]||(i[0]=o=>n("close"))}),d.renderSlot(a.$slots,"default",{ref:"contentRef"})],512))}}),n3e={},r3e={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function a3e(e,t){return d.openBlock(),d.createElementBlock("svg",r3e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.75 2.25V7.25H13.75V8.75H8.75V13.75H7.25V8.75H2.25V7.25H7.25V2.25H8.75Z",fill:"#110529"},null,-1)]))}const i3e=Wr(n3e,[["render",a3e]]),o3e={},l3e={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"};function s3e(e,t){return d.openBlock(),d.createElementBlock("svg",l3e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.25 7.25H13.75V8.75H2.25V7.25Z",fill:"#110529"},null,-1)]))}const u3e=Wr(o3e,[["render",s3e]]),c3e={class:"zoom-text-field"},f3e=d.defineComponent({__name:"ZoomInput",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,r=e,a=d.ref(),i=d.ref(!1),o=d.ref(String(r.modelValue)),s=d.computed({get(){const c=o.value??"100";return i.value?c:c+"%"},set(c){return o.value=c,c}});return d.watch(()=>i.value,c=>{if(!c){let f=Number(o.value);isNaN(f)?o.value=String(r.modelValue):n("update:modelValue",f)}}),d.watch(()=>r.modelValue,c=>{o.value=String(c)}),(c,f)=>(d.openBlock(),d.createElementBlock("div",{class:"zoom-text-field__envelope zoom-input",onFocusin:f[1]||(f[1]=A=>i.value=!0),onFocusout:f[2]||(f[2]=A=>i.value=!1),onKeyup:f[3]||(f[3]=d.withKeys(A=>{var h;return(h=a.value)==null?void 0:h.blur()},["enter"]))},[d.createElementVNode("div",c3e,[d.withDirectives(d.createElementVNode("input",{ref_key:"input",ref:a,"onUpdate:modelValue":f[0]||(f[0]=A=>s.value=A),type:"text"},null,512),[[d.vModelText,s.value]]),d.createVNode(AB,{style:{"z-index":"1"},class:"zoom-text-field__contour"})])],32))}}),d3e={class:"zoom-container"},A3e=20,p3e=400,w$=10,h3e=d.defineComponent({__name:"index",setup(e){const t=da();function n(i){return Math.max(A3e,Math.min(p3e,i))}function r(){t.value.reactive.chartScale=n(t.value.reactive.chartScale-w$)}function a(){t.value.reactive.chartScale=n(t.value.reactive.chartScale+w$)}return(i,o)=>(d.openBlock(),d.createElementBlock("div",d3e,[o[1]||(o[1]=d.createElementVNode("div",{class:"zoom-border"},null,-1)),d.createVNode(d.unref(pt.PlBtnGhost),{onClick:r},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(u3e)))]),_:1}),d.createVNode(f3e,{modelValue:d.unref(t).reactive.chartScale,"onUpdate:modelValue":o[0]||(o[0]=s=>d.unref(t).reactive.chartScale=n(s))},null,8,["modelValue"]),d.createVNode(d.unref(pt.PlBtnGhost),{onClick:a},{default:d.withCtx(()=>[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(i3e)))]),_:1})]))}}),m3e=d.defineComponent({__name:"DendroTable",props:{chartData:{}},emits:["row-select"],setup(e,{emit:t}){const n=da(),r=e,a=d.ref(100),i=d.shallowRef(),o=d.computed(()=>["id",...n.value.reactive.optionsState.components.tableContent.selectorStates.map(g=>g.selectedSource)]),s=d.ref([]);d.watch(()=>{var g;return(g=r.chartData)==null?void 0:g.hierarchy},g=>{if(g){const b=g.leaves().map(C=>C.data.rawData.id);(b.length!==s.value.length||b.some((C,x)=>C!==s.value[x]))&&(s.value=b)}else s.value=[]},{immediate:!0});const c=d.ref([]),f=d.ref([]);d.watch([()=>s.value,()=>o.value,()=>n.value.commonHelpersData.dendroTableData.value],([g,b,C])=>{if(C===null){f.value=[],c.value=[];return}if(b.some(k=>!C[k]))return;const x=C.id.data.reduce((k,_,D)=>{const O=_;return k[O]&&console.warn(`More than 1 value for node id ${O} in dendro table`),k[O]=b.reduce((I,$)=>{const Q=C[$];return Q&&(I[$]=Q.data[D]),I},{}),k},{});f.value=b.map(k=>({headerName:C[k].label,field:k,sortable:!1,resizable:!1})),c.value=g.map(k=>x[k]??null),m()},{immediate:!0});const A=d.computed(()=>{var b,C;const g=(C=(b=r.chartData)==null?void 0:b.chartSizes)==null?void 0:C.treeHeight;return s.value.length?g/s.value.length:0}),h=g=>{i.value=g.api,m()};function m(){if(i.value&&!i.value.isDestroyed()){i.value.autoSizeAllColumns();const g=i.value.getColumns();g&&(a.value=g.reduce((b,C)=>b+C.getActualWidth(),2))}}return d.watch(()=>n.value.reactive.dendroSelectedNodeId,g=>{i.value&&(g===null?i.value.deselectAll():i.value.forEachNode(b=>{b.data.id===g&&b.setSelected(!0,!0)}))}),(g,b)=>(d.openBlock(),d.createElementBlock("div",{class:"dendro-table",style:d.normalizeStyle({width:a.value+"px"})},[d.createVNode(d.unref(Qee.AgGridVue),{theme:d.unref(pt.AgGridTheme),gridApi:i.value,onGridReady:h,defaultColDef:{suppressHeaderMenuButton:!0},rowData:c.value,columnDefs:f.value,rowHeight:A.value,autoSizeStrategy:{type:"fitCellContents"},onGridColumnsChanged:b[0]||(b[0]=()=>{m()}),domLayout:"autoHeight"},null,8,["theme","gridApi","rowData","columnDefs","rowHeight"])],4))}}),v3e={},g3e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"};function y3e(e,t){return d.openBlock(),d.createElementBlock("svg",g3e,t[0]||(t[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.091 3.53035C18.2123 2.65166 16.7877 2.65167 15.909 3.53037L3.90901 15.5304C3.48705 15.9524 3.25 16.5246 3.25 17.1214V20.0001C3.25 20.4143 3.58579 20.7501 4 20.7501H6.87868C7.47542 20.7501 8.04771 20.513 8.46967 20.0911L20.4697 8.09099C21.3484 7.21231 21.3484 5.7877 20.4697 4.90903L19.091 3.53035ZM16.9697 4.59101C17.2626 4.29811 17.7374 4.29811 18.0303 4.59101L19.409 5.96969C19.7019 6.26258 19.7019 6.73745 19.409 7.03034L18.5 7.9394L16.0607 5.50006L16.9697 4.59101ZM15 6.56073L17.4393 9.00007L7.40901 19.0304C7.26836 19.171 7.07759 19.2501 6.87868 19.2501H4.75V17.1214C4.75 16.9225 4.82902 16.7317 4.96967 16.5911L15 6.56073Z",fill:"#CFD1DB"},null,-1),d.createElementVNode("path",{d:"M12 20.7501L20 20.7501L20 19.2501L12 19.2501L12 20.7501Z",fill:"#CFD1DB"},null,-1)]))}const w3e=Wr(v3e,[["render",y3e]]),C$=d.defineComponent({__name:"Loading",props:{top:{default:0},left:{default:0},right:{default:0},bottom:{default:0}},setup(e){return(t,n)=>(d.openBlock(),d.createElementBlock("div",{class:"graph-maker__loading",style:d.normalizeStyle({top:`${t.top}px`,bottom:`${t.bottom}px`,right:`${t.right}px`,left:`${t.left}px`})},n[0]||(n[0]=[d.createStaticVNode('<div class="loading-picture"><svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M36.0197 2.29384C37.0053 1.76506 37.7157 1.45481 38.4537 1.29931C39.4734 1.08447 40.5266 1.08447 41.5463 1.29931C42.2843 1.45481 42.9947 1.76506 43.9803 2.29384C44.7026 2.66301 45.5542 3.14998 46.6565 3.78023L68.4201 16.2247C69.3757 16.7711 70.1409 17.2086 70.7708 17.5978C71.8362 18.2367 72.5158 18.7183 73.0579 19.3166C73.7667 20.0989 74.3023 21.0219 74.6298 22.0253C75 23.1595 75 24.4276 75 26.9639V53.0362C75 55.5725 75 56.8407 74.6298 57.9748C74.3023 58.9782 73.7667 59.9012 73.0579 60.6835C72.5154 61.2822 71.8353 61.764 70.7688 62.4035C70.1393 62.7924 69.3748 63.2295 68.4203 63.7753L46.6565 76.2198C45.555 76.8497 44.7037 77.3364 43.9817 77.7055C42.9954 78.2347 42.2847 78.5452 41.5463 78.7008C40.5266 78.9156 39.4734 78.9156 38.4537 78.7008C37.7153 78.5452 37.0045 78.2347 36.0182 77.7054C35.2962 77.3364 34.445 76.8497 33.3436 76.2199L11.5799 63.7754C10.6253 63.2295 9.86069 62.7924 9.23115 62.4035C8.16466 61.764 7.48457 61.2822 6.94208 60.6835C6.23334 59.9012 5.6977 58.9782 5.37018 57.9748C5 56.8407 5 55.5725 5 53.0362V26.9639C5 24.4276 5 23.1595 5.37018 22.0253C5.6977 21.0219 6.23334 20.0989 6.94208 19.3166C7.48422 18.7183 8.16379 18.2367 9.22911 17.5978C9.85904 17.2086 10.6242 16.7711 11.5799 16.2247L33.3435 3.78023C34.4457 3.14998 35.2974 2.663 36.0197 2.29384ZM10 34.9971V24.9907H37.4546V34.9971H10ZM10 45.0036V40.0003H37.4546V45.0036H10ZM37.4546 72.9139L10 57.1541V50.0069H37.4546V72.9139ZM65.0189 60.0134L42.5455 72.9138V60.0134H65.0189ZM70 24.9907V55.0101H42.5455V24.9907H70ZM14.98 19.9874L40 5.62505L65.0201 19.9874H14.98Z" fill="#E1E3EB"></path></svg><div class="loading-progress-bar"><div class="moving-dash"></div></div></div>',1)]),4))}}),C3e={class:"graph-info-tooltip-title"},b3e=["title"],E3e={key:1,class:"graph-info-tooltip-sequence-row"},x3e=["title"],S3e={key:0,class:"graph-info-tooltip-icon"},B3e={key:0,"data-theme":"dark",class:"graph-info-tooltip-button"},k3e=48,T3e=62.5,_3e=26,P3e=16,b$=24,M3e=20,D3e=d.defineComponent({__name:"DendroTooltip",props:{info:{},tooltipBtn:{},containerRef:{}},emits:["close","tooltip-btn-click"],setup(e,{emit:t}){const n=e,r=da(),a=t,i=d.ref();pt.useClickOutside([i],()=>a("close"));const o=d.computed(()=>{const b=k=>r.value.reactive.optionsState.components[k].selectorStates.map(_=>_.selectedSource),C=["tableContent","labels","nodeColor","nodeSize","nodeShape","lineColor"],x=["id"];return C.forEach(k=>{b(k).forEach(D=>{x.includes(D)||x.push(D)})}),x}),s=d.computed(()=>n.info.info[0]),c=d.computed(()=>{var b;return(b=s.value)==null?void 0:b.id}),f=d.computed(()=>{const b=r.value.commonHelpersData.dendroTableData.value;if(!b)return[];const C=b.id.data.findIndex(x=>String(x)===String(c.value));return C!==-1?o.value.map(x=>{var k,_;return{label:b[x].label,value:b[x].data[C],isSequence:((_=(k=b[x].spec)==null?void 0:k.annotations)==null?void 0:_["pl7.app/type"])==="sequence"}}):[]}),A=d.computed(()=>f.value.reduce((b,C)=>b+(C.isSequence?T3e:_3e),0)+P3e*2+(n.tooltipBtn?k3e:0)),h=d.computed(()=>({left:n.info.x+M3e+"px",top:n.info.y+b$+"px"})),m=d.computed(()=>{const b=n.containerRef.scrollHeight,C=A.value/2,x=n.info.y+b$;return x<C?-x:b-C<x?-(A.value-(b-x)):-C});function g(b){var C;(C=window==null?void 0:window.navigator)==null||C.clipboard.writeText(b)}return(b,C)=>(d.openBlock(),d.createElementBlock("div",{class:"graph-info-tooltip__container",ref:"",style:d.normalizeStyle(h.value)},[C[3]||(C[3]=d.createElementVNode("div",{class:"graph-info-tooltip__tail"},null,-1)),d.createElementVNode("div",{class:"graph-info-tooltip",ref_key:"rootRef",ref:i,style:d.normalizeStyle({transform:`translate(0,${m.value}px)`}),onClick:C[2]||(C[2]=x=>x.stopPropagation())},[d.createVNode(d.unref(pt.PlMaskIcon24),{class:"graph-info-tooltip-close",name:"close",onClick:C[0]||(C[0]=x=>a("close"))}),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(f.value,x=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["graph-info-tooltip-row",{"graph-info-tooltip-row__sequence":x.isSequence}])},[d.createElementVNode("div",C3e,d.toDisplayString(x.label+":"),1),x.isSequence?(d.openBlock(),d.createElementBlock("div",E3e,[d.createElementVNode("div",{class:"graph-info-tooltip-value",title:String(x.value)},d.toDisplayString(x.value),9,x3e),x.isSequence?(d.openBlock(),d.createElementBlock("div",S3e,[d.createVNode(d.unref(pt.PlMaskIcon16),{class:"graph-info-tooltip-clipboard",name:"clipboard",onClick:()=>g(String(x.value))},null,8,["onClick"])])):d.createCommentVNode("",!0)])):(d.openBlock(),d.createElementBlock("div",{key:0,class:"graph-info-tooltip-value",title:String(x.value)},d.toDisplayString(x.value),9,b3e))],2))),256)),b.tooltipBtn?(d.openBlock(),d.createElementBlock("div",B3e,[d.createVNode(d.unref(pt.PlBtnSecondary),{icon:"arrow-right",size:"small",onClick:C[1]||(C[1]=()=>a("tooltip-btn-click",c.value))},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(b.tooltipBtn),1)]),_:1})])):d.createCommentVNode("",!0)],4)],4))}}),H3e={class:"chart_container"},I3e={class:"chart_header"},L3e=["value"],R3e={class:"chart_titleLineSlot"},N3e={key:0,class:"chart_tabBy"},$3e={key:2,style:{position:"absolute",left:"10px",bottom:"10px"}},F3e=d.defineComponent({__name:"Chart",props:{graphStatus:{},graphTitle:{},dendroTooltipButton:{},chartData:{}},emits:["graph-title-update","dendro-node-select","dendro-tooltip-btn-click"],setup(e,{emit:t}){const n=t,r=da(),a=e,i=d.ref(a.graphTitle);d.watch(()=>a.graphTitle,x=>{i.value=x});const o=d.computed(()=>{var x;return(x=r.value.reactive.optionsState.components.tabBy)==null?void 0:x.selectorStates[0]}),s=d.computed(()=>{var x;return(x=o.value)==null?void 0:x.selectedSource}),c=d.computed(()=>{var x;return(x=o.value)==null?void 0:x.selectedFilterValue}),f=d.ref(c.value);d.watch(()=>s.value,(x,k)=>{x!==k&&(f.value=c.value)},{immediate:!0});const A=d.computed(()=>r.value.uniqueValuesData.value),h=d.computed(()=>{var x;if(s.value){const k=(x=A.value[s.value])==null?void 0:x.options;return k&&k.sort((_,D)=>_.label>D.label?1:-1),k}else return});d.watch(()=>h.value,x=>{if(x&&x.length&&f.value===void 0){const k=x[0].value;f.value=k,m(k)}},{immediate:!0});function m(x){const k=r.value.reactive.optionsState.components.tabBy.selectorStates;k.length&&(r.value.reactive.optionsState.components.tabBy.selectorStates=[{...k[0],type:"equals",selectedFilterValue:x}])}function g(x){const k=x.currentTarget;i.value=k.value,n("graph-title-update",k.value)}function b(x){n("dendro-node-select",x)}const C=d.ref();return(x,k)=>(d.openBlock(),d.createElementBlock("div",H3e,[d.createElementVNode("div",I3e,[d.createElementVNode("input",{class:"chart_title",value:i.value,onChange:g,onKeyup:k[0]||(k[0]=d.withKeys(_=>{var D;(D=_.target)==null||D.blur()},["enter"]))},null,40,L3e),(d.openBlock(),d.createBlock(d.resolveDynamicComponent(w3e),{class:"chart_titleEdit"})),d.createElementVNode("div",R3e,[d.renderSlot(x.$slots,"default")])]),s.value?(d.openBlock(),d.createElementBlock("div",N3e,[d.createVNode(d.unref(pt.PlDropdown),{label:"Show for",modelValue:f.value,"onUpdate:modelValue":[k[1]||(k[1]=_=>f.value=_),k[2]||(k[2]=_=>m(_))],options:h.value},null,8,["modelValue","options"])])):d.createCommentVNode("",!0),d.createElementVNode("div",{class:d.normalizeClass(["chart_main-content",{"chart_main-content__dendro":d.unref(r).reactive.chartType==="dendro"}]),ref_key:"chartContainerRef",ref:C},[d.createElementVNode("div",{id:"chartSvgContainer",class:d.normalizeClass({chart_loading:d.unref(r).loading.initialCharts&&x.graphStatus==="ready",chart_noDataMapping:x.graphStatus==="notReady",chart_emptyData:x.graphStatus==="empty",chart_inconsistent:x.graphStatus==="inconsistent"})},[d.unref(r).loading.initialCharts&&x.graphStatus==="ready"?(d.openBlock(),d.createBlock(C$,{key:0})):d.createCommentVNode("",!0)],2),d.unref(r).reactive.chartType==="dendro"&&x.chartData&&d.unref(r).reactive.layersSettings.dendro.showTable?(d.openBlock(),d.createBlock(m3e,{key:0,chartData:x.chartData,onRowSelect:b},null,8,["chartData"])):d.createCommentVNode("",!0),d.unref(r).reactive.dendroInfoByClick?(d.openBlock(),d.createBlock(D3e,{key:1,info:d.unref(r).reactive.dendroInfoByClick,containerRef:C.value,tooltipBtn:x.dendroTooltipButton,onTooltipBtnClick:k[3]||(k[3]=_=>x.$emit("dendro-tooltip-btn-click",_)),onClose:k[4]||(k[4]=_=>{d.unref(r).reactive.dendroInfoByClick=null,x.$emit("dendro-node-select",null)})},null,8,["info","containerRef","tooltipBtn"])):d.createCommentVNode("",!0)],2),x.graphStatus!=="empty"&&d.unref(r).reactive.chartType!=="scatterplot-umap"?(d.openBlock(),d.createBlock(h3e,{key:1})):d.createCommentVNode("",!0),x.graphStatus!=="empty"&&d.unref(r).reactive.chartType==="scatterplot-umap"?(d.openBlock(),d.createElementBlock("div",$3e,[d.createVNode(d.unref(pt.PlToggleSwitch),{modelValue:d.unref(r).reactive.lassoMode,"onUpdate:modelValue":k[5]||(k[5]=_=>d.unref(r).reactive.lassoMode=_),label:"Lasso mode"},null,8,["modelValue"])])):d.createCommentVNode("",!0)]))}});function V3e(e,t){return e.parent===t.parent?1:2}function O3e(e){return e.reduce(Q3e,0)/e.length}function Q3e(e,t){return e+t.x}function z3e(e){return 1+e.reduce(U3e,0)}function U3e(e,t){return Math.max(e,t.y)}function j3e(e){for(var t;t=e.children;)e=t[0];return e}function G3e(e){for(var t;t=e.children;)e=t[t.length-1];return e}function xB(){var e=V3e,t=1,n=1,r=!1;function a(i){var o,s=0;i.eachAfter(function(m){var g=m.children;g?(m.x=O3e(g),m.y=z3e(g)):(m.x=o?s+=e(m,o):0,m.y=0,o=m)});var c=j3e(i),f=G3e(i),A=c.x-e(c,f)/2,h=f.x+e(f,c)/2;return i.eachAfter(r?function(m){m.x=(m.x-i.x)*t,m.y=(i.y-m.y)*n}:function(m){m.x=(m.x-A)/(h-A)*t,m.y=(1-(i.y?m.y/i.y:1))*n})}return a.separation=function(i){return arguments.length?(e=i,a):e},a.size=function(i){return arguments.length?(r=!1,t=+i[0],n=+i[1],a):r?null:[t,n]},a.nodeSize=function(i){return arguments.length?(r=!0,t=+i[0],n=+i[1],a):r?[t,n]:null},a}function Y3e(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function W3e(){return this.eachAfter(Y3e)}function X3e(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function K3e(e,t){for(var n=this,r=[n],a,i,o=-1;n=r.pop();)if(e.call(t,n,++o,this),a=n.children)for(i=a.length-1;i>=0;--i)r.push(a[i]);return this}function Z3e(e,t){for(var n=this,r=[n],a=[],i,o,s,c=-1;n=r.pop();)if(a.push(n),i=n.children)for(o=0,s=i.length;o<s;++o)r.push(i[o]);for(;n=a.pop();)e.call(t,n,++c,this);return this}function J3e(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function q3e(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,a=r&&r.length;--a>=0;)n+=r[a].value;t.value=n})}function e2e(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function t2e(e){for(var t=this,n=n2e(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var a=r.length;e!==n;)r.splice(a,0,e),e=e.parent;return r}function n2e(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),a=null;for(e=n.pop(),t=r.pop();e===t;)a=e,e=n.pop(),t=r.pop();return a}function r2e(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function a2e(){return Array.from(this)}function i2e(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function o2e(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*l2e(){var e=this,t,n=[e],r,a,i;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(a=0,i=r.length;a<i;++a)n.push(r[a]);while(n.length)}function vb(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=c2e)):t===void 0&&(t=u2e);for(var n=new Q7(e),r,a=[n],i,o,s,c;r=a.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)a.push(i=o[s]=new Q7(o[s])),i.parent=r,i.depth=r.depth+1;return n.eachBefore(E$)}function s2e(){return vb(this).eachBefore(f2e)}function u2e(e){return e.children}function c2e(e){return Array.isArray(e)?e[1]:null}function f2e(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function E$(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Q7(e){this.data=e,this.depth=this.height=0,this.parent=null}Q7.prototype=vb.prototype={constructor:Q7,count:W3e,each:X3e,eachAfter:Z3e,eachBefore:K3e,find:J3e,sum:q3e,sort:e2e,path:t2e,ancestors:r2e,descendants:a2e,leaves:i2e,links:o2e,copy:s2e,[Symbol.iterator]:l2e};function SB(e){return e==null?null:d2e(e)}function d2e(e){if(typeof e!="function")throw new Error;return e}var A2e={depth:-1},x$={},BB={};function p2e(e){return e.id}function h2e(e){return e.parentId}function S$(){var e=p2e,t=h2e,n;function r(a){var i=Array.from(a),o=e,s=t,c,f,A,h,m,g,b,C,x=new Map;if(n!=null){const k=i.map((O,I)=>m2e(n(O,I,a))),_=k.map(B$),D=new Set(k).add("");for(const O of _)D.has(O)||(D.add(O),k.push(O),_.push(B$(O)),i.push(BB));o=(O,I)=>k[I],s=(O,I)=>_[I]}for(A=0,c=i.length;A<c;++A)f=i[A],g=i[A]=new Q7(f),(b=o(f,A,a))!=null&&(b+="")&&(C=g.id=b,x.set(C,x.has(C)?x$:g)),(b=s(f,A,a))!=null&&(b+="")&&(g.parent=b);for(A=0;A<c;++A)if(g=i[A],b=g.parent){if(m=x.get(b),!m)throw new Error("missing: "+b);if(m===x$)throw new Error("ambiguous: "+b);m.children?m.children.push(g):m.children=[g],g.parent=m}else{if(h)throw new Error("multiple roots");h=g}if(!h)throw new Error("no root");if(n!=null){for(;h.data===BB&&h.children.length===1;)h=h.children[0],--c;for(let k=i.length-1;k>=0&&(g=i[k],g.data===BB);--k)g.data=null}if(h.parent=A2e,h.eachBefore(function(k){k.depth=k.parent.depth+1,--c}).eachBefore(E$),h.parent=null,c>0)throw new Error("cycle");return h}return r.id=function(a){return arguments.length?(e=SB(a),r):e},r.parentId=function(a){return arguments.length?(t=SB(a),r):t},r.path=function(a){return arguments.length?(n=SB(a),r):n},r}function m2e(e){e=`${e}`;let t=e.length;return kB(e,t-1)&&!kB(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function B$(e){let t=e.length;if(t<2)return"";for(;--t>1&&!kB(e,t););return e.slice(0,t)}function kB(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if(!(n&1))return!0}return!1}var Jv={},TB={exports:{}},fi={};/**
37
37
  * @license React
38
38
  * react.production.min.js
39
39
  *