1import{S as P,i as Q,s as W,G as N,H as J,f as de,C as k,g as R,p as C,l as ee,t as y,o as le,q as j,r as he,D as V,J as L,aa as me,R as pe,ah as ie,N as ge,I as te,M as D,E as B,K as ne,b as G,B as Y,F,a as x,e as U,m as z,ai as se,k as $,n as H,V as qe,af as Be,x as De,a9 as Ce,h as ye,j as Se,y as X}from"./index-188ef5e8.js";/* empty css */import{b as ue,B as Ee}from"./Button-04f93a38.js";import{B as Ne}from"./BlockTitle-c2c0aac0.js";/* empty css */import"./Info-b7dfbb56.js";function oe(t,e,l){const i=t.slice();return i[18]=e[l],i}function fe(t){let e,l,i,u,a,n=t[0],f=[];for(let s=0;s<n.length;s+=1)f[s]=ae(oe(t,n,s));return{c(){e=N("ul");for(let s=0;s<f.length;s+=1)f[s].c();k(e,"class","options svelte-qgtjkt"),k(e,"aria-expanded",t[1]),V(e,"top",t[6]),V(e,"bottom",t[7]),V(e,"max-height",`calc(${t[8]}px - var(--window-padding))`)},m(s,o){R(s,e,o);for(let _=0;_<f.length;_+=1)f[_]&&f[_].m(e,null);t[17](e),i=!0,u||(a=L(e,"mousedown",me(t[16])),u=!0)},p(s,o){if(o&517){n=s[0];let _;for(_=0;_<n.length;_+=1){const w=oe(s,n,_);f[_]?f[_].p(w,o):(f[_]=ae(w),f[_].c(),f[_].m(e,null))}for(;_<f.length;_+=1)f[_].d(1);f.length=n.length}(!i||o&2)&&k(e,"aria-expanded",s[1]),o&64&&V(e,"top",s[6]),o&128&&V(e,"bottom",s[7]),o&256&&V(e,"max-height",`calc(${s[8]}px - var(--window-padding))`)},i(s){i||(pe(()=>{i&&(l||(l=ie(e,ue,{duration:200,y:5},!0)),l.run(1))}),i=!0)},o(s){l||(l=ie(e,ue,{duration:200,y:5},!1)),l.run(0),i=!1},d(s){s&&j(e),ge(f,s),t[17](null),s&&l&&l.end(),u=!1,a()}}}function ae(t){let e,l,i,u=t[18]+"",a,n,f,s;return{c(){e=N("li"),l=N("span"),l.textContent="â",i=J(),a=te(u),n=J(),k(l,"class","inner-item svelte-qgtjkt"),D(l,"hide",!t[9].includes(t[18])),k(e,"class","item svelte-qgtjkt"),k(e,"role","button"),k(e,"data-value",f=t[18]),k(e,"aria-label",s=t[18]),D(e,"selected",t[9].includes(t[18])),D(e,"active",t[2]===t[18]),D(e,"bg-gray-100",t[2]===t[18]),D(e,"dark:bg-gray-600",t[2]===t[18])},m(o,_){R(o,e,_),B(e,l),B(e,i),B(e,a),B(e,n)},p(o,_){_&513&&D(l,"hide",!o[9].includes(o[18])),_&1&&u!==(u=o[18]+"")&&ne(a,u),_&1&&f!==(f=o[18])&&k(e,"data-value",f),_&1&&s!==(s=o[18])&&k(e,"aria-label",s),_&513&&D(e,"selected",o[9].includes(o[18])),_&5&&D(e,"active",o[2]===o[18]),_&5&&D(e,"bg-gray-100",o[2]===o[18]),_&5&&D(e,"dark:bg-gray-600",o[2]===o[18])},d(o){o&&j(e)}}}function Re(t){let e,l,i,u,a=t[1]&&!t[3]&&fe(t);return{c(){e=N("div"),l=J(),a&&a.c(),i=de(),k(e,"class","reference")},m(n,f){R(n,e,f),t[15](e),R(n,l,f),a&&a.m(n,f),R(n,i,f),u=!0},p(n,[f]){n[1]&&!n[3]?a?(a.p(n,f),f&10&&C(a,1)):(a=fe(n),a.c(),C(a,1),a.m(i.parentNode,i)):a&&(ee(),y(a,1,1,()=>{a=null}),le())},i(n){u||(C(a),u=!0)},o(n){y(a),u=!1},d(n){n&&j(e),t[15](null),n&&j(l),a&&a.d(n),n&&j(i)}}}function je(t,e,l){let i,{value:u=void 0}=e,{filtered:a}=e,{showOptions:n=!1}=e,{activeOption:f}=e,{disabled:s=!1}=e,o,_,w,r,v,O,b,g;const A=he();function p(h){G[h?"unshift":"push"](()=>{r=h,l(4,r)})}const S=h=>A("change",h);function T(h){G[h?"unshift":"push"](()=>{v=h,l(5,v)})}return t.$$set=h=>{"value"in h&&l(11,u=h.value),"filtered"in h&&l(0,a=h.filtered),"showOptions"in h&&l(1,n=h.showOptions),"activeOption"in h&&l(2,f=h.activeOption),"disabled"in h&&l(3,s=h.disabled)},t.$$.update=()=>{if(t.$$.dirty&30770){if(n&&r){if(v&&typeof u=="string"){let h=document.querySelector(`li[data-value="${u}"]`);h&&v.scrollTo(0,h.offsetTop)}l(12,o=r.getBoundingClientRect().top),l(13,_=window.innerHeight-r.getBoundingClientRect().bottom),l(14,w=r.parentElement?.getBoundingClientRect().height||0)}_>o?(l(6,O=`${w}px`),l(8,g=_),l(7,b=null)):(l(7,b=`${w}px`),l(8,g=o-w),l(6,O=null))}t.$$.dirty&2048&&l(9,i=Array.isArray(u)?u:[u])},[a,n,f,s,r,v,O,b,g,i,A,u,o,_,w,p,S,T]}class Je extends P{constructor(e){super(),Q(this,e,je,Re,W,{value:11,filtered:0,showOptions:1,activeOption:2,disabled:3})}}function Me(t){let e,l;return{c(){e=Y("svg"),l=Y("path"),k(l,"d","M5 8l4 4 4-4z"),k(e,"class","dropdown-arrow svelte-p5edak"),k(e,"xmlns","http://www.w3.org/2000/svg"),k(e,"width","18"),k(e,"height","18"),k(e,"viewBox","0 0 18 18")},m(i,u){R(i,e,u),B(e,l)},p:F,i:F,o:F,d(i){i&&j(e)}}}class Te extends P{constructor(e){super(),Q(this,e,null,Me,W,{})}}function Ie(t){let e,l;return{c(){e=Y("svg"),l=Y("path"),k(l,"d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"),k(e,"xmlns","http://www.w3.org/2000/svg"),k(e,"width","16"),k(e,"height","16"),k(e,"viewBox","0 0 24 24")},m(i,u){R(i,e,u),B(e,l)},p:F,i:F,o:F,d(i){i&&j(e)}}}class we extends P{constructor(e){super(),Q(this,e,null,Ie,W,{})}}function re(t,e,l){const i=t.slice();return i[30]=e[l],i}function Le(t){let e;return{c(){e=te(t[1])},m(l,i){R(l,e,i)},p(l,i){i[0]&2&&ne(e,l[1])},d(l){l&&j(e)}}}function _e(t){let e,l,i=t[0],u=[];for(let n=0;n<i.length;n+=1)u[n]=ce(re(t,i,n));const a=n=>y(u[n],1,1,()=>{u[n]=null});return{c(){for(let n=0;n<u.length;n+=1)u[n].c();e=de()},m(n,f){for(let s=0;s<u.length;s+=1)u[s]&&u[s].m(n,f);R(n,e,f),l=!0},p(n,f){if(f[0]&4113){i=n[0];let s;for(s=0;s<i.length;s+=1){const o=re(n,i,s);u[s]?(u[s].p(o,f),C(u[s],1)):(u[s]=ce(o),u[s].c(),C(u[s],1),u[s].m(e.parentNode,e))}for(ee(),s=i.length;s<u.length;s+=1)a(s);
1le()}},i(n){if(!l){for(let f=0;f<i.length;f+=1)C(u[f]);l=!0}},o(n){u=u.filter(Boolean);for(let f=0;f<u.length;f+=1)y(u[f]);l=!1},d(n){ge(u,n),n&&j(e)}}}function ce(t){let e,l,i=t[30]+"",u,a,n,f,s,o,_,w,r;f=new we({});function v(){return t[20](t[30])}return{c(){e=N("div"),l=N("span"),u=te(i),a=J(),n=N("div"),U(f.$$.fragment),o=J(),k(l,"class","svelte-aqlk7e"),k(n,"class","token-remove svelte-aqlk7e"),k(n,"title",s="Remove "+t[30]),D(n,"hidden",t[4]),k(e,"class","token svelte-aqlk7e")},m(O,b){R(O,e,b),B(e,l),B(l,u),B(e,a),B(e,n),z(f,n,null),B(e,o),_=!0,w||(r=L(e,"click",me(v)),w=!0)},p(O,b){t=O,(!_||b[0]&1)&&i!==(i=t[30]+"")&&ne(u,i),(!_||b[0]&1&&s!==(s="Remove "+t[30]))&&k(n,"title",s),(!_||b[0]&16)&&D(n,"hidden",t[4])},i(O){_||(C(f.$$.fragment,O),_=!0)},o(O){y(f.$$.fragment,O),_=!1},d(O){O&&j(e),H(f),w=!1,r()}}}function Ue(t){let e,l,i,u,a,n=t[3]&&Array.isArray(t[0]),f,s,o,_,w,r,v,O,b,g,A,p,S,T;l=new Ne({props:{show_label:t[5],info:t[2],$$slots:{default:[Le]},$$scope:{ctx:t}}});let h=n&&_e(t);r=new we({}),O=new Te({});function M(m){t[26](m)}let K={showOptions:t[10],filtered:t[9],activeOption:t[8],disabled:t[4]};return t[0]!==void 0&&(K.value=t[0]),g=new Je({props:K}),G.push(()=>x(g,"value",M)),g.$on("change",t[14]),{c(){e=N("label"),U(l.$$.fragment),i=J(),u=N("div"),a=N("div"),h&&h.c(),f=J(),s=N("div"),o=N("input"),_=J(),w=N("div"),U(r.$$.fragment),v=J(),U(O.$$.fragment),b=J(),U(g.$$.fragment),k(o,"class","border-none svelte-aqlk7e"),o.disabled=t[4],k(o,"autocomplete","off"),D(o,"subdued",t[0]!==t[7]&&!t[6]),k(w,"class","token-remove remove-all svelte-aqlk7e"),k(w,"title","Clear"),D(w,"hide",!t[3]||!t[0]?.length||t[4]),k(s,"class","secondary-wrap svelte-aqlk7e"),k(a,"class","wrap-inner svelte-aqlk7e"),D(a,"showOptions",t[10]),k(u,"class","wrap svelte-aqlk7e")},m(m,q){R(m,e,q),z(l,e,null),B(e,i),B(e,u),B(u,a),h&&h.m(a,null),B(a,f),B(a,s),B(s,o),se(o,t[7]),t[22](o),B(s,_),B(s,w),z(r,w,null),B(s,v),z(O,s,null),B(u,b),z(g,u,null),p=!0,S||(T=[L(o,"input",t[21]),L(o,"focus",t[23]),L(o,"keydown",t[15]),L(o,"keyup",t[24]),L(o,"blur",t[25]),L(w,"click",t[13])],S=!0)},p(m,q){const c={};q[0]&32&&(c.show_label=m[5]),q[0]&4&&(c.info=m[2]),q[0]&2|q[1]&4&&(c.$$scope={dirty:q,ctx:m}),l.$set(c),q[0]&9&&(n=m[3]&&Array.isArray(m[0])),n?h?(h.p(m,q),q[0]&9&&C(h,1)):(h=_e(m),h.c(),C(h,1),h.m(a,f)):h&&(ee(),y(h,1,1,()=>{h=null}),le()),(!p||q[0]&16)&&(o.disabled=m[4]),q[0]&128&&o.value!==m[7]&&se(o,m[7]),(!p||q[0]&193)&&D(o,"subdued",m[0]!==m[7]&&!m[6]),(!p||q[0]&25)&&D(w,"hide",!m[3]||!m[0]?.length||m[4]),(!p||q[0]&1024)&&D(a,"showOptions",m[10]);const I={};q[0]&1024&&(I.showOptions=m[10]),q[0]&512&&(I.filtered=m[9]),q[0]&256&&(I.activeOption=m[8]),q[0]&16&&(I.disabled=m[4]),!A&&q[0]&1&&(A=!0,I.value=m[0],$(()=>A=!1)),g.$set(I)},i(m){p||(C(l.$$.fragment,m),C(h),C(r.$$.fragment,m),C(O.$$.fragment,m),C(g.$$.fragment,m),p=!0)},o(m){y(l.$$.fragment,m),y(h),y(r.$$.fragment,m),y(O.$$.fragment,m),y(g.$$.fragment,m),p=!1},d(m){m&&j(e),H(l),h&&h.d(),t[22](null),H(r),H(O),H(g),S=!1,qe(T)}}}function ze(t,e,l){let i,{label:u}=e,{info:a=void 0}=e,{value:n}=e,f=Array.isArray(n)?n.slice():n,{value_is_output:s=!1}=e,{multiselect:o=!1}=e,{max_choices:_}=e,{choices:w}=e,{disabled:r=!1}=e,{show_label:v}=e,{allow_custom_value:O=!1}=e;const b=he();let g,A,p=!1,S;function T(){b("change",n),s||b("input")}Be(()=>{l(16,s=!1)});function h(d){l(0,n),(!_||n.length<_)&&(n.push(d),b("select",{index:w.indexOf(d),value:d,selected:!0})),l(0,n)}
1function M(d){l(0,n),l(0,n=n.filter(E=>E!==d)),b("select",{index:w.indexOf(d),value:d,selected:!1})}function K(d){l(0,n=[]),l(7,g=""),d.preventDefault()}function m(d){const E=d.detail.target.dataset.value;if(O&&l(7,g=E),E!==void 0)if(o)n?.includes(E)?M(E):h(E),l(7,g="");else{l(0,n=E),l(7,g=E),l(10,p=!1),b("select",{index:w.indexOf(E),value:E,selected:!0});return}}function q(d){if(d.key==="Enter"&&A!=null)o?o&&Array.isArray(n)&&(n.includes(A)?M(A):h(A),l(7,g="")):(n!==A&&(l(0,n=A),b("select",{index:w.indexOf(n),value:n,selected:!0})),l(7,g=A),l(10,p=!1));else if(l(10,p=!0),d.key==="ArrowUp"||d.key==="ArrowDown"){A===null&&l(8,A=i[0]);const E=d.key==="ArrowUp"?-1:1,Z=i.indexOf(A)+E;l(8,A=Z<0?i[i.length-1]:Z===i.length?i[0]:i[Z]),d.preventDefault()}else d.key==="Escape"?l(10,p=!1):d.key==="Backspace"?o&&(!g||g==="")&&Array.isArray(n)&&n.length>0&&(M(n[n.length-1]),l(7,g="")):l(10,p=!0)}const c=d=>M(d);function I(){g=this.value,l(7,g),l(0,n)}function be(d){G[d?"unshift":"push"](()=>{S=d,l(11,S)})}const ke=()=>{l(10,p=!p),p?l(7,g=""):S.blur()},ve=()=>{O&&l(0,n=g)},Oe=()=>{o?l(7,g=""):O||n!==g&&(typeof n=="string"&&g==""?l(7,g=n):(l(0,n=void 0),l(7,g=""))),l(10,p=!1)};function Ae(d){n=d,l(0,n)}return t.$$set=d=>{"label"in d&&l(1,u=d.label),"info"in d&&l(2,a=d.info),"value"in d&&l(0,n=d.value),"value_is_output"in d&&l(16,s=d.value_is_output),"multiselect"in d&&l(3,o=d.multiselect),"max_choices"in d&&l(17,_=d.max_choices),"choices"in d&&l(18,w=d.choices),"disabled"in d&&l(4,r=d.disabled),"show_label"in d&&l(5,v=d.show_label),"allow_custom_value"in d&&l(6,O=d.allow_custom_value)},t.$$.update=()=>{t.$$.dirty[0]&1&&(typeof n=="string"||n===null)&&l(7,g=n),t.$$.dirty[0]&262272&&l(9,i=w.filter(d=>g?d.toLowerCase().includes(g.toLowerCase()):d)),t.$$.dirty[0]&768&&(!A||!i.includes(A))&&l(8,A=i.length?i[0]:null),t.$$.dirty[0]&524289&&JSON.stringify(n)!=JSON.stringify(f)&&(l(19,f=Array.isArray(n)?n.slice():n),T()),t.$$.dirty[0]&524289&&JSON.stringify(n)!=JSON.stringify(f)&&(b("change",n),l(19,f=Array.isArray(n)?n.slice():n))},[n,u,a,o,r,v,O,g,A,i,p,S,M,K,m,q,s,_,w,f,c,I,be,ke,ve,Oe,Ae]}class He extends P{constructor(e){super(),Q(this,e,ze,Ue,W,{label:1,info:2,value:0,value_is_output:16,multiselect:3,max_choices:17,choices:18,disabled:4,show_label:5,allow_custom_value:6},null,[-1,-1])}}function Ke(t){let e,l,i,u,a,n;const f=[t[14]];let s={};for(let r=0;r<f.length;r+=1)s=De(s,f[r]);e=new Ce({props:s});function o(r){t[17](r)}function _(r){t[18](r)}let w={choices:t[9],multiselect:t[7],max_choices:t[8],label:t[2],info:t[3],show_label:t[10],allow_custom_value:t[15],disabled:t[16]==="static"};return t[0]!==void 0&&(w.value=t[0]),t[1]!==void 0&&(w.value_is_output=t[1]),i=new He({props:w}),G.push(()=>x(i,"value",o)),G.push(()=>x(i,"value_is_output",_)),i.$on("change",t[19]),i.$on("input",t[20]),i.$on("select",t[21]),i.$on("blur",t[22]),{c(){U(e.$$.fragment),l=J(),U(i.$$.fragment)},m(r,v){z(e,r,v),R(r,l,v),z(i,r,v),n=!0},p(r,v){const O=v&16384?ye(f,[Se(r[14])]):{};e.$set(O);const b={};v&512&&(b.choices=r[9]),v&128&&(b.multiselect=r[7]),v&256&&(b.max_choices=r[8]),v&4&&(b.label=r[2]),v&8&&(b.info=r[3]),v&1024&&(b.show_label=r[10]),v&32768&&(b.allow_custom_value=r[15]),v&65536&&(b.disabled=r[16]==="static"),!u&&v&1&&(u=!0,b.value=r[0],$(()=>u=!1)),!a&&v&2&&(a=!0,b.value_is_output=r[1],$(()=>a=!1)),i.$set(b)},i(r){n||(C(e.$$.fragment,r),C(i.$$.fragment,r),n=!0)},o(r){y(e.$$.fragment,r),y(i.$$.fragment,r),n=!1},d(r){H(e,r),r&&j(l),H(i,r)}}}function Ve(t){let e,l;return e=new Ee({props:{visible:t[6],elem_id:t[4],elem_classes:t[5],container:t[11],scale:t[12],min_width:t[13],$$slots:{default:[Ke]},$$scope:{ctx:t}}}),{c(){U(e.$$.fragment)},m(i,u){z(e,i,u),l=!0},p(i,[u]){const a={};u&64&&(a.visible=i[6]),u&16&&(a.elem_id=i[4]),u&32&&(a.elem_classes=i[5]),u&2048&&(a.container=i[11]),u&4096&&(a.scale=i[12]),u&8192&&(a.min_width=i[13]),u&8505231&&(a.$$scope={dirty:u,ctx:i}),e.$set(a)},i(i){l||(C(e.$$.fragment,i),l=!0)},o(i){y(e.$$.fragment,i),l=!1},d(i){H(e,i)}}}function Fe(t,e,l){let{label:i="Dropdown"}=e,{info:u=void 0}=e,{elem_id:a=""}=e,{elem_classes:n=[]}=e,{visible:f=!0}=e,{value:s}=e,{value_is_output:o=!1}=e,{multiselect:_=!1}=e,{max_choices:w}=e,{choices:r}=e,{show_label:v}=e,{container:O=!1}=e,{scale:b=1}=e,{min_width:g=void 0}=e,{loading_status:A}=e,{allow_custom_value:p=!1}=e,{mode:S}=e;_&&!s?s=[]:s||(s="");function T(c){s=c,l(0,s)}function h(c){o=c,l(1,o)}function M(c){X.call(this,t,c)}function K(c){X.call(this,t,c)}function m(c){X.call(this,t,c)}function q(c){X.call(this,t,c)}return t.$$set=c=>{"label"in c&&l(2,i=c.label),"info"in c&&l(3,u=c.info),"elem_id"in c&&l(4,a=c.elem_id),"elem_classes"in c&&l(5,n=c.elem_classes),"visible"in c&&l(6,f=c.visible),"value"in c&&l(0,s=c.value),"value_is_output"in c&&l(1,o=c.value_is_output),"multiselect"in c&&l(7,_=c.multiselect),"max_choices"in c&&l(8,w=c.max_choices),"choices"in c&&l(9,r=c.choices),"show_label"in c&&l(10,v=c.show_label),"container"in c&&l(11,O=c.container),"scale"in c&&l(12,b=c.scale),"min_width"in c&&l(13,g=c.min_width),"loading_status"in c&&l(14,A=c.loading_status),"allow_custom_value"in c&&l(15,p=c.allow_custom_value),"mode"in c&&l(16,S=c.mode)},[s,o,i,u,a,n,f,_,w,r,v,O,b,g,A,p,S,T,h,M,K,m,q]}class Ge extends P{constructor(e){super(),Q(this,e,Fe,Ve,W,{label:2,info:3,elem_id:4,elem_classes:5,visible:6,value:0,value_is_output:1,multiselect:7,max_choices:8,choices:9,show_label:10,container:11,scale:12,min_width:13,loading_status:14,allow_custom_value:15,mode:16})}}const xe=Ge,$e=["static","dynamic"],el=t=>({type:{payload:"string"},description:{payload:"selected choice"},example_data:t.choices.length?t.choices[0]:""});export{xe as Component,el as document,$e as modes}; 2//# sourceMappingURL=index-c73780f3.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.