@budibase/server 3.2.22 → 3.2.23
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.
|
@@ -847,9 +847,9 @@ and ensure you are accounting for this risk.
|
|
|
847
847
|
</svg>`,buildSectionHeader=(to,ue,eo,no)=>{const ro=document.createElement("div");return ro.classList.add("info-section"),to&&ro.classList.add(to),ro.innerHTML=`${toSpectrumIcon(eo)}<span>${ue}</span>`,{name:ue,header:()=>ro,rank:no}},helpersToCompletion=(to,ue)=>{const{type:eo,name:no,icon:ro}=SECTIONS.HB_HELPER,oo=buildSectionHeader(eo,no,ro,99);return Object.keys(to).reduce((io,ao)=>{let so=to[ao];return io.push({label:ao,info:lo=>buildHelperInfoNode(lo,so),type:"helper",section:oo,detail:"Function",apply:(lo,co,uo,fo)=>{insertBinding(lo,uo,fo,ao,ue)}}),io},[])},getHelperCompletions=to=>{const ue=getManifest();return Object.keys(ue).reduce((eo,no)=>(eo=eo||[],[...eo,...helpersToCompletion(ue[no],to)]),[])},snippetAutoComplete=to=>function(eo){if(!(to!=null&&to.length))return null;const no=eo.matchBefore(/\w*/);return no.from==no.to&&!eo.explicit?null:{from:no.from,options:to.map(ro=>({label:`snippets.${ro.name}`,type:"text",simple:!0,apply:(oo,io,ao,so)=>{insertSnippet(oo,ao,so,io.label)}}))}},bindingFilter=(to,ue)=>to.filter(eo=>{const no=eo.section.name.toLowerCase(),ro=eo.label.toLowerCase(),oo=ue.toLowerCase();return no.includes(oo)||ro.includes(oo)}),hbAutocomplete=to=>{async function ue(eo){let no=eo.matchBefore(EditorModes$1.Handlebars.match),ro=to||[];if(!no)return null;const oo=no.text.match(/{{[\s]*/),io=no.text.replace(oo[0],"");let ao=bindingFilter(ro,io);return{from:no.from+oo[0].length,filter:!1,options:ao}}return ue},jsAutocomplete=to=>{async function ue(eo){let no=eo.matchBefore(/\$\("[\s\w]*/),ro=to||[];if(no){const oo=no.text.match(/\$\("[\s]*/),io=no.text.replace(oo[0],"");let ao=bindingFilter(ro,io);return{from:no.from+oo[0].length,filter:!1,options:ao}}return null}return ue},buildBindingInfoNode=(to,ue)=>{if(!ue.valueHTML||ue.value==null)return null;const eo=document.createElement("div");return eo.classList.add("info-bubble"),eo.innerHTML=`<div class="binding__example">${ue.valueHTML}</div>`,eo},hbInsert=(to,ue,eo,no)=>{let ro="";const oo=ue?to.substring(0,ue):"",io=eo?to.substring(eo):"";return!oo.includes("{{")||!io.includes("}}")?ro=`{{ ${no} }}`:ro=` ${no} `,ro};function jsInsert(to,ue,eo,no,{helper:ro,disableWrapping:oo}={}){let io="";const ao=ue?to.substring(0,ue):"",so=eo?to.substring(eo):"";return oo?io=no:ro?io=`helpers.${no}()`:!ao.includes('$("')||!so.includes('")')?io=`$("${no}")`:io=no,io}const insertBinding=(to,ue,eo,no,ro)=>{var co,uo,fo;let oo;if(ro.name=="javascript")oo=jsInsert((co=to.state.doc)==null?void 0:co.toString(),ue,eo,no);else if(ro.name=="handlebars")oo=hbInsert((uo=to.state.doc)==null?void 0:uo.toString(),ue,eo,no);else{console.warn("Unsupported");return}let io=ro.name=="javascript"?/[\s]*"\)/:/[\s]*}}/;const so=((fo=to.state.doc)==null?void 0:fo.toString().slice(eo)).match(io);let lo=ue+oo.length;so&&(lo=ue+oo.length+so[0].length),to.dispatch({changes:{from:ue,to:eo,insert:oo},selection:{anchor:lo}})},insertSnippet=(to,ue,eo,no)=>{let ro=ue+no.length;to.dispatch({changes:{from:ue,to:eo,insert:no},selection:{anchor:ro}})},bindingsToCompletions=(to,ue)=>{const eo=lodashExports.groupBy(to,"category"),no=to==null?void 0:to.reduce((oo,io)=>{var ao;return oo[io.category]=oo[io.category]||{},io.icon&&(oo[io.category].icon=oo[io.category].icon||io.icon),typeof((ao=io.display)==null?void 0:ao.rank)=="number"&&(oo[io.category].rank=oo[io.category].rank||io.display.rank),oo},{});return Object.keys(eo).reduce((oo,io)=>{const{icon:ao,rank:so}=no[io]||{},lo=buildSectionHeader(eo.type,io,ao||"",typeof so=="number"?so:1);return[...oo,...eo[io].reduce((co,uo)=>{var po,ho,_o;let fo=((po=uo.fieldSchema)==null?void 0:po.type)||((ho=uo.display)==null?void 0:ho.type);return co.push({label:((_o=uo.display)==null?void 0:_o.name)||uo.readableBinding||"NO NAME",info:go=>buildBindingInfoNode(go,uo),type:"binding",detail:fo,section:lo,apply:(go,bo,vo,yo)=>{insertBinding(go,vo,yo,uo.readableBinding,ue)}}),co},[])]},[])},CodeEditor_svelte_svelte_type_style_lang="";function create_if_block$48(to){let ue,eo,no;return eo=new Label({props:{small:!0,$$slots:{default:[create_default_slot$5G]},$$scope:{ctx:to}}}),{c(){ue=element("div"),create_component(eo.$$.fragment)},m(ro,oo){insert$1(ro,ue,oo),mount_component(eo,ue,null),no=!0},p(ro,oo){const io={};oo[0]&1|oo[1]&4&&(io.$$scope={dirty:oo,ctx:ro}),eo.$set(io)},i(ro){no||(transition_in(eo.$$.fragment,ro),no=!0)},o(ro){transition_out(eo.$$.fragment,ro),no=!1},d(ro){ro&&detach(ue),destroy_component(eo)}}}function create_default_slot$5G(to){let ue;return{c(){ue=text(to[0])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no[0]&1&&set_data(ue,eo[0])},d(eo){eo&&detach(ue)}}}function create_fragment$8Q(to){let ue,eo,no,ro,oo,io=to[0]&&create_if_block$48(to);return{c(){var ao;io&&io.c(),ue=space$1(),eo=element("div"),no=element("div"),attr(no,"tabindex","-1"),attr(no,"class","svelte-dqv15e"),attr(eo,"class",ro=null_to_empty(`code-editor ${((ao=to[1])==null?void 0:ao.name)||""}`)+" svelte-dqv15e")},m(ao,so){io&&io.m(ao,so),insert$1(ao,ue,so),insert$1(ao,eo,so),append$2(eo,no),to[19](no),oo=!0},p(ao,so){var lo;ao[0]?io?(io.p(ao,so),so[0]&1&&transition_in(io,1)):(io=create_if_block$48(ao),io.c(),transition_in(io,1),io.m(ue.parentNode,ue)):io&&(group_outros(),transition_out(io,1,1,()=>{io=null}),check_outros()),(!oo||so[0]&2&&ro!==(ro=null_to_empty(`code-editor ${((lo=ao[1])==null?void 0:lo.name)||""}`)+" svelte-dqv15e"))&&attr(eo,"class",ro)},i(ao){oo||(transition_in(io),oo=!0)},o(ao){transition_out(io),oo=!1},d(ao){ao&&(detach(ue),detach(eo)),io&&io.d(ao),to[19](null)}}}function instance$8Q(to,ue,eo){let no;component_subscribe(to,themeStore$1,Zo=>eo(18,no=Zo));let{label:ro}=ue,{completions:oo=[]}=ue,{mode:io=EditorModes$1.Handlebars}=ue,{value:ao=""}=ue,{placeholder:so=null}=ue,{autocompleteEnabled:lo=!0}=ue,{autofocus:co=!1}=ue,{jsBindingWrapping:uo=!0}=ue,{readonly:fo=!1}=ue,{readonlyLineNumbers:po=!1}=ue;const ho=createEventDispatcher();let _o,go,bo=!1,vo=!1,yo=!1,wo=no==null?void 0:no.theme,ko=!wo.includes("light"),So=new Compartment;const Ao=(Zo,Xo,Qo)=>{if(!Xo||!Qo){yo=!0;return}(go.state.doc.toString()!==Zo||yo)&&(go.dispatch({changes:{from:0,to:go.state.doc.length,insert:Zo}}),yo=!1)},Io=()=>{const Zo=go.state.selection.ranges[0];return{start:Zo.from,end:Zo.to}},Eo=Zo=>{go.dispatch({changes:{from:Zo.start||go.state.doc.length,to:Zo.end||go.state.doc.length,insert:Zo.value},selection:Zo.cursor?{anchor:Zo.start+Zo.value.length}:void 0})},Ro=new MatchDecorator({regexp:FIND_ANY_HBS_REGEX,decoration:()=>Decoration.mark({tag:"span",attributes:{class:"binding-wrap"}})}),zo=ViewPlugin.define(Zo=>({decorations:Ro.createDeco(Zo),update(Xo){this.decorations=Ro.updateDeco(Xo,this.decorations)}}),{decorations:Zo=>Zo.decorations}),No=new MatchDecorator({regexp:/snippets\.[^\s(]+/g,decoration:()=>Decoration.mark({tag:"span",attributes:{class:"snippet-wrap"}})}),Fo=ViewPlugin.define(Zo=>({decorations:No.createDeco(Zo),update(Xo){this.decorations=No.updateDeco(Xo,this.decorations)}}),{decorations:Zo=>Zo.decorations}),Po={key:"Tab",run:Zo=>completionStatus(Zo.state)==="active"?(acceptCompletion(Zo),!0):(indentMore(Zo),!0),shift:Zo=>(indentLess(Zo),!0)},To=()=>[...closeBracketsKeymap,...defaultKeymap,...historyKeymap,...foldKeymap,...completionKeymap,Po],Lo=()=>[drawSelection(),dropCursor(),bracketMatching(),closeBrackets(),syntaxHighlighting(oneDarkHighlightStyle,{fallback:!0}),highlightSpecialChars(),EditorView.lineWrapping,So.of([...ko?[oneDark]:[]])],qo=Zo=>{let Xo=[...Zo];return lo&&(Xo.push(autocompletion({override:[...oo],closeOnBlur:!0,icons:!1,optionClass:Qo=>Qo.simple?"autocomplete-option-simple":"autocomplete-option"})),Xo.push(EditorView.inputHandler.of((Qo,Ko,ea,na)=>{if(uo&&na==="$"){let{text:Jo}=Qo.state.doc.lineAt(Ko);const ia=Ko?Jo.substring(0,Ko):"",Yo=ea?Jo.substring(ea):"",sa=!ia.includes('$("')||!Yo.includes('")'),wa=Qo.state.update({changes:[{from:Ko,insert:sa?'$("")':"$"}],selection:{anchor:Ko+(sa?3:1)}},{scrollIntoView:!0,userEvent:"input.type"});return Qo.dispatch(wa),!0}return!1}))),io.name==="javascript"?(Xo.push(Fo),Xo.push(javascript()),fo||Xo.push(highlightWhitespace())):Xo.push(zo),so&&Xo.push(placeholder(so)),fo?(Xo.push(EditorState.readOnly.of(!0)),po&&Xo.push(lineNumbers())):Xo=[...Xo,history$1(),highlightActiveLine(),highlightActiveLineGutter(),lineNumbers(),foldGutter(),keymap.of(To()),EditorView.domEventHandlers({blur:()=>{ho("blur",go.state.doc.toString())}}),EditorView.updateListener.of(Qo=>{var ea;const Ko=(ea=Qo.state.doc)==null?void 0:ea.toString();Ko!==ao&&ho("change",Ko)})],Xo},Uo=()=>{const Zo=Lo();eo(13,go=new EditorView({doc:ao==null?void 0:ao.toString(),extensions:qo(Zo),parent:_o}))};onMount(async()=>{eo(14,bo=!0)}),onDestroy(()=>{go&&go.destroy()});function jo(Zo){binding_callbacks[Zo?"unshift":"push"](()=>{_o=Zo,eo(2,_o)})}return to.$$set=Zo=>{"label"in Zo&&eo(0,ro=Zo.label),"completions"in Zo&&eo(3,oo=Zo.completions),"mode"in Zo&&eo(1,io=Zo.mode),"value"in Zo&&eo(4,ao=Zo.value),"placeholder"in Zo&&eo(5,so=Zo.placeholder),"autocompleteEnabled"in Zo&&eo(6,lo=Zo.autocompleteEnabled),"autofocus"in Zo&&eo(7,co=Zo.autofocus),"jsBindingWrapping"in Zo&&eo(8,uo=Zo.jsBindingWrapping),"readonly"in Zo&&eo(9,fo=Zo.readonly),"readonlyLineNumbers"in Zo&&eo(10,po=Zo.readonlyLineNumbers)},to.$$.update=()=>{to.$$.dirty[0]&49152&&bo&&!vo&&(eo(15,vo=!0),Uo()),to.$$.dirty[0]&41088&&co&&vo&&go.focus(),to.$$.dirty[0]&516096&&bo&&vo&&no!=null&&no.theme&&wo!=(no==null?void 0:no.theme)&&(eo(16,wo=no==null?void 0:no.theme),eo(17,ko=!wo.includes("light")),go.dispatch({effects:So.reconfigure([...ko?[oneDark]:[]])})),to.$$.dirty[0]&49168&&Ao(ao,vo,bo)},[ro,io,_o,oo,ao,so,lo,co,uo,fo,po,Io,Eo,go,bo,vo,wo,ko,no,jo]}class CodeEditor extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8Q,create_fragment$8Q,safe_not_equal,{label:0,completions:3,mode:1,value:4,placeholder:5,autocompleteEnabled:6,autofocus:7,jsBindingWrapping:8,readonly:9,readonlyLineNumbers:10,getCaretPosition:11,insertAtPos:12},null,[-1,-1])}get getCaretPosition(){return this.$$.ctx[11]}get insertAtPos(){return this.$$.ctx[12]}}var WeakMap$1=_WeakMap,metaMap$2=WeakMap$1&&new WeakMap$1,_metaMap=metaMap$2,identity$3=identity_1,metaMap$1=_metaMap,baseSetData$2=metaMap$1?function(to,ue){return metaMap$1.set(to,ue),to}:identity$3,_baseSetData=baseSetData$2,isObject$5=isObject_1,objectCreate=Object.create,baseCreate$4=function(){function to(){}return function(ue){if(!isObject$5(ue))return{};if(objectCreate)return objectCreate(ue);to.prototype=ue;var eo=new to;return to.prototype=void 0,eo}}(),_baseCreate=baseCreate$4,baseCreate$3=_baseCreate,isObject$4=isObject_1;function createCtor$4(to){return function(){var ue=arguments;switch(ue.length){case 0:return new to;case 1:return new to(ue[0]);case 2:return new to(ue[0],ue[1]);case 3:return new to(ue[0],ue[1],ue[2]);case 4:return new to(ue[0],ue[1],ue[2],ue[3]);case 5:return new to(ue[0],ue[1],ue[2],ue[3],ue[4]);case 6:return new to(ue[0],ue[1],ue[2],ue[3],ue[4],ue[5]);case 7:return new to(ue[0],ue[1],ue[2],ue[3],ue[4],ue[5],ue[6])}var eo=baseCreate$3(to.prototype),no=to.apply(eo,ue);return isObject$4(no)?no:eo}}var _createCtor=createCtor$4,createCtor$3=_createCtor,root$4=_root,WRAP_BIND_FLAG$6=1;function createBind$1(to,ue,eo){var no=ue&WRAP_BIND_FLAG$6,ro=createCtor$3(to);function oo(){var io=this&&this!==root$4&&this instanceof oo?ro:to;return io.apply(no?eo:this,arguments)}return oo}var _createBind=createBind$1;function apply$3(to,ue,eo){switch(eo.length){case 0:return to.call(ue);case 1:return to.call(ue,eo[0]);case 2:return to.call(ue,eo[0],eo[1]);case 3:return to.call(ue,eo[0],eo[1],eo[2])}return to.apply(ue,eo)}var _apply=apply$3,nativeMax$3=Math.max;function composeArgs$2(to,ue,eo,no){for(var ro=-1,oo=to.length,io=eo.length,ao=-1,so=ue.length,lo=nativeMax$3(oo-io,0),co=Array(so+lo),uo=!no;++ao<so;)co[ao]=ue[ao];for(;++ro<io;)(uo||ro<oo)&&(co[eo[ro]]=to[ro]);for(;lo--;)co[ao++]=to[ro++];return co}var _composeArgs=composeArgs$2,nativeMax$2=Math.max;function composeArgsRight$2(to,ue,eo,no){for(var ro=-1,oo=to.length,io=-1,ao=eo.length,so=-1,lo=ue.length,co=nativeMax$2(oo-ao,0),uo=Array(co+lo),fo=!no;++ro<co;)uo[ro]=to[ro];for(var po=ro;++so<lo;)uo[po+so]=ue[so];for(;++io<ao;)(fo||ro<oo)&&(uo[po+eo[io]]=to[ro++]);return uo}var _composeArgsRight=composeArgsRight$2;function countHolders$1(to,ue){for(var eo=to.length,no=0;eo--;)to[eo]===ue&&++no;return no}var _countHolders=countHolders$1;function baseLodash$3(){}var _baseLodash=baseLodash$3,baseCreate$2=_baseCreate,baseLodash$2=_baseLodash,MAX_ARRAY_LENGTH=4294967295;function LazyWrapper$3(to){this.__wrapped__=to,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=MAX_ARRAY_LENGTH,this.__views__=[]}LazyWrapper$3.prototype=baseCreate$2(baseLodash$2.prototype);LazyWrapper$3.prototype.constructor=LazyWrapper$3;var _LazyWrapper=LazyWrapper$3;function noop$4(){}var noop_1=noop$4,metaMap=_metaMap,noop$3=noop_1,getData$2=metaMap?function(to){return metaMap.get(to)}:noop$3,_getData=getData$2,realNames$1={},_realNames=realNames$1,realNames=_realNames,objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty;function getFuncName$1(to){for(var ue=to.name+"",eo=realNames[ue],no=hasOwnProperty$5.call(realNames,ue)?eo.length:0;no--;){var ro=eo[no],oo=ro.func;if(oo==null||oo==to)return ro.name}return ue}var _getFuncName=getFuncName$1,baseCreate$1=_baseCreate,baseLodash$1=_baseLodash;function LodashWrapper$2(to,ue){this.__wrapped__=to,this.__actions__=[],this.__chain__=!!ue,this.__index__=0,this.__values__=void 0}LodashWrapper$2.prototype=baseCreate$1(baseLodash$1.prototype);LodashWrapper$2.prototype.constructor=LodashWrapper$2;var _LodashWrapper=LodashWrapper$2;function copyArray$4(to,ue){var eo=-1,no=to.length;for(ue||(ue=Array(no));++eo<no;)ue[eo]=to[eo];return ue}var _copyArray=copyArray$4,LazyWrapper$2=_LazyWrapper,LodashWrapper$1=_LodashWrapper,copyArray$3=_copyArray;function wrapperClone$1(to){if(to instanceof LazyWrapper$2)return to.clone();var ue=new LodashWrapper$1(to.__wrapped__,to.__chain__);return ue.__actions__=copyArray$3(to.__actions__),ue.__index__=to.__index__,ue.__values__=to.__values__,ue}var _wrapperClone=wrapperClone$1,LazyWrapper$1=_LazyWrapper,LodashWrapper=_LodashWrapper,baseLodash=_baseLodash,isArray$7=isArray_1,isObjectLike$5=isObjectLike_1,wrapperClone=_wrapperClone,objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function lodash$1(to){if(isObjectLike$5(to)&&!isArray$7(to)&&!(to instanceof LazyWrapper$1)){if(to instanceof LodashWrapper)return to;if(hasOwnProperty$4.call(to,"__wrapped__"))return wrapperClone(to)}return new LodashWrapper(to)}lodash$1.prototype=baseLodash.prototype;lodash$1.prototype.constructor=lodash$1;var wrapperLodash=lodash$1,LazyWrapper=_LazyWrapper,getData$1=_getData,getFuncName=_getFuncName,lodash=wrapperLodash;function isLaziable$1(to){var ue=getFuncName(to),eo=lodash[ue];if(typeof eo!="function"||!(ue in LazyWrapper.prototype))return!1;if(to===eo)return!0;var no=getData$1(eo);return!!no&&to===no[0]}var _isLaziable=isLaziable$1,HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut$2(to){var ue=0,eo=0;return function(){var no=nativeNow(),ro=HOT_SPAN-(no-eo);if(eo=no,ro>0){if(++ue>=HOT_COUNT)return arguments[0]}else ue=0;return to.apply(void 0,arguments)}}var _shortOut=shortOut$2,baseSetData$1=_baseSetData,shortOut$1=_shortOut,setData$2=shortOut$1(baseSetData$1),_setData=setData$2,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /;function getWrapDetails$1(to){var ue=to.match(reWrapDetails);return ue?ue[1].split(reSplitDetails):[]}var _getWrapDetails=getWrapDetails$1,reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function insertWrapDetails$1(to,ue){var eo=ue.length;if(!eo)return to;var no=eo-1;return ue[no]=(eo>1?"& ":"")+ue[no],ue=ue.join(eo>2?", ":" "),to.replace(reWrapComment,`{
|
|
848
848
|
/* [wrapped with `+ue+`] */
|
|
849
849
|
`)}var _insertWrapDetails=insertWrapDetails$1;function constant$5(to){return function(){return to}}var constant_1=constant$5,constant$4=constant_1,defineProperty=_defineProperty$1,identity$2=identity_1,baseSetToString$1=defineProperty?function(to,ue){return defineProperty(to,"toString",{configurable:!0,enumerable:!1,value:constant$4(ue),writable:!0})}:identity$2,_baseSetToString=baseSetToString$1,baseSetToString=_baseSetToString,shortOut=_shortOut,setToString$2=shortOut(baseSetToString),_setToString=setToString$2;function arrayEach$2(to,ue){for(var eo=-1,no=to==null?0:to.length;++eo<no&&ue(to[eo],eo,to)!==!1;);return to}var _arrayEach=arrayEach$2;function baseFindIndex$1(to,ue,eo,no){for(var ro=to.length,oo=eo+(no?1:-1);no?oo--:++oo<ro;)if(ue(to[oo],oo,to))return oo;return-1}var _baseFindIndex=baseFindIndex$1;function baseIsNaN$1(to){return to!==to}var _baseIsNaN=baseIsNaN$1;function strictIndexOf$1(to,ue,eo){for(var no=eo-1,ro=to.length;++no<ro;)if(to[no]===ue)return no;return-1}var _strictIndexOf=strictIndexOf$1,baseFindIndex=_baseFindIndex,baseIsNaN=_baseIsNaN,strictIndexOf=_strictIndexOf;function baseIndexOf$1(to,ue,eo){return ue===ue?strictIndexOf(to,ue,eo):baseFindIndex(to,baseIsNaN,eo)}var _baseIndexOf=baseIndexOf$1,baseIndexOf=_baseIndexOf;function arrayIncludes$1(to,ue){var eo=to==null?0:to.length;return!!eo&&baseIndexOf(to,ue,0)>-1}var _arrayIncludes=arrayIncludes$1,arrayEach$1=_arrayEach,arrayIncludes=_arrayIncludes,WRAP_BIND_FLAG$5=1,WRAP_BIND_KEY_FLAG$4=2,WRAP_CURRY_FLAG$5=8,WRAP_CURRY_RIGHT_FLAG$2=16,WRAP_PARTIAL_FLAG$2=32,WRAP_PARTIAL_RIGHT_FLAG$2=64,WRAP_ARY_FLAG$3=128,WRAP_REARG_FLAG$2=256,WRAP_FLIP_FLAG$1=512,wrapFlags=[["ary",WRAP_ARY_FLAG$3],["bind",WRAP_BIND_FLAG$5],["bindKey",WRAP_BIND_KEY_FLAG$4],["curry",WRAP_CURRY_FLAG$5],["curryRight",WRAP_CURRY_RIGHT_FLAG$2],["flip",WRAP_FLIP_FLAG$1],["partial",WRAP_PARTIAL_FLAG$2],["partialRight",WRAP_PARTIAL_RIGHT_FLAG$2],["rearg",WRAP_REARG_FLAG$2]];function updateWrapDetails$1(to,ue){return arrayEach$1(wrapFlags,function(eo){var no="_."+eo[0];ue&eo[1]&&!arrayIncludes(to,no)&&to.push(no)}),to.sort()}var _updateWrapDetails=updateWrapDetails$1,getWrapDetails=_getWrapDetails,insertWrapDetails=_insertWrapDetails,setToString$1=_setToString,updateWrapDetails=_updateWrapDetails;function setWrapToString$2(to,ue,eo){var no=ue+"";return setToString$1(to,insertWrapDetails(no,updateWrapDetails(getWrapDetails(no),eo)))}var _setWrapToString=setWrapToString$2,isLaziable=_isLaziable,setData$1=_setData,setWrapToString$1=_setWrapToString,WRAP_BIND_FLAG$4=1,WRAP_BIND_KEY_FLAG$3=2,WRAP_CURRY_BOUND_FLAG$1=4,WRAP_CURRY_FLAG$4=8,WRAP_PARTIAL_FLAG$1=32,WRAP_PARTIAL_RIGHT_FLAG$1=64;function createRecurry$2(to,ue,eo,no,ro,oo,io,ao,so,lo){var co=ue&WRAP_CURRY_FLAG$4,uo=co?io:void 0,fo=co?void 0:io,po=co?oo:void 0,ho=co?void 0:oo;ue|=co?WRAP_PARTIAL_FLAG$1:WRAP_PARTIAL_RIGHT_FLAG$1,ue&=~(co?WRAP_PARTIAL_RIGHT_FLAG$1:WRAP_PARTIAL_FLAG$1),ue&WRAP_CURRY_BOUND_FLAG$1||(ue&=~(WRAP_BIND_FLAG$4|WRAP_BIND_KEY_FLAG$3));var _o=[to,ue,ro,po,uo,ho,fo,ao,so,lo],go=eo.apply(void 0,_o);return isLaziable(to)&&setData$1(go,_o),go.placeholder=no,setWrapToString$1(go,to,ue)}var _createRecurry=createRecurry$2;function getHolder$2(to){var ue=to;return ue.placeholder}var _getHolder=getHolder$2,copyArray$2=_copyArray,isIndex=_isIndex,nativeMin$1=Math.min;function reorder$1(to,ue){for(var eo=to.length,no=nativeMin$1(ue.length,eo),ro=copyArray$2(to);no--;){var oo=ue[no];to[no]=isIndex(oo,eo)?ro[oo]:void 0}return to}var _reorder=reorder$1,PLACEHOLDER$1="__lodash_placeholder__";function replaceHolders$3(to,ue){for(var eo=-1,no=to.length,ro=0,oo=[];++eo<no;){var io=to[eo];(io===ue||io===PLACEHOLDER$1)&&(to[eo]=PLACEHOLDER$1,oo[ro++]=eo)}return oo}var _replaceHolders=replaceHolders$3,composeArgs$1=_composeArgs,composeArgsRight$1=_composeArgsRight,countHolders=_countHolders,createCtor$2=_createCtor,createRecurry$1=_createRecurry,getHolder$1=_getHolder,reorder=_reorder,replaceHolders$2=_replaceHolders,root$3=_root,WRAP_BIND_FLAG$3=1,WRAP_BIND_KEY_FLAG$2=2,WRAP_CURRY_FLAG$3=8,WRAP_CURRY_RIGHT_FLAG$1=16,WRAP_ARY_FLAG$2=128,WRAP_FLIP_FLAG=512;function createHybrid$2(to,ue,eo,no,ro,oo,io,ao,so,lo){var co=ue&WRAP_ARY_FLAG$2,uo=ue&WRAP_BIND_FLAG$3,fo=ue&WRAP_BIND_KEY_FLAG$2,po=ue&(WRAP_CURRY_FLAG$3|WRAP_CURRY_RIGHT_FLAG$1),ho=ue&WRAP_FLIP_FLAG,_o=fo?void 0:createCtor$2(to);function go(){for(var bo=arguments.length,vo=Array(bo),yo=bo;yo--;)vo[yo]=arguments[yo];if(po)var wo=getHolder$1(go),ko=countHolders(vo,wo);if(no&&(vo=composeArgs$1(vo,no,ro,po)),oo&&(vo=composeArgsRight$1(vo,oo,io,po)),bo-=ko,po&&bo<lo){var So=replaceHolders$2(vo,wo);return createRecurry$1(to,ue,createHybrid$2,go.placeholder,eo,vo,So,ao,so,lo-bo)}var Ao=uo?eo:this,Io=fo?Ao[to]:to;return bo=vo.length,ao?vo=reorder(vo,ao):ho&&bo>1&&vo.reverse(),co&&so<bo&&(vo.length=so),this&&this!==root$3&&this instanceof go&&(Io=_o||createCtor$2(Io)),Io.apply(Ao,vo)}return go}var _createHybrid=createHybrid$2,apply$2=_apply,createCtor$1=_createCtor,createHybrid$1=_createHybrid,createRecurry=_createRecurry,getHolder=_getHolder,replaceHolders$1=_replaceHolders,root$2=_root;function createCurry$1(to,ue,eo){var no=createCtor$1(to);function ro(){for(var oo=arguments.length,io=Array(oo),ao=oo,so=getHolder(ro);ao--;)io[ao]=arguments[ao];var lo=oo<3&&io[0]!==so&&io[oo-1]!==so?[]:replaceHolders$1(io,so);if(oo-=lo.length,oo<eo)return createRecurry(to,ue,createHybrid$1,ro.placeholder,void 0,io,lo,void 0,void 0,eo-oo);var co=this&&this!==root$2&&this instanceof ro?no:to;return apply$2(co,this,io)}return ro}var _createCurry=createCurry$1,apply$1=_apply,createCtor=_createCtor,root$1=_root,WRAP_BIND_FLAG$2=1;function createPartial$1(to,ue,eo,no){var ro=ue&WRAP_BIND_FLAG$2,oo=createCtor(to);function io(){for(var ao=-1,so=arguments.length,lo=-1,co=no.length,uo=Array(co+so),fo=this&&this!==root$1&&this instanceof io?oo:to;++lo<co;)uo[lo]=no[lo];for(;so--;)uo[lo++]=arguments[++ao];return apply$1(fo,ro?eo:this,uo)}return io}var _createPartial=createPartial$1,composeArgs=_composeArgs,composeArgsRight=_composeArgsRight,replaceHolders=_replaceHolders,PLACEHOLDER="__lodash_placeholder__",WRAP_BIND_FLAG$1=1,WRAP_BIND_KEY_FLAG$1=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG$2=8,WRAP_ARY_FLAG$1=128,WRAP_REARG_FLAG$1=256,nativeMin=Math.min;function mergeData$1(to,ue){var eo=to[1],no=ue[1],ro=eo|no,oo=ro<(WRAP_BIND_FLAG$1|WRAP_BIND_KEY_FLAG$1|WRAP_ARY_FLAG$1),io=no==WRAP_ARY_FLAG$1&&eo==WRAP_CURRY_FLAG$2||no==WRAP_ARY_FLAG$1&&eo==WRAP_REARG_FLAG$1&&to[7].length<=ue[8]||no==(WRAP_ARY_FLAG$1|WRAP_REARG_FLAG$1)&&ue[7].length<=ue[8]&&eo==WRAP_CURRY_FLAG$2;if(!(oo||io))return to;no&WRAP_BIND_FLAG$1&&(to[2]=ue[2],ro|=eo&WRAP_BIND_FLAG$1?0:WRAP_CURRY_BOUND_FLAG);var ao=ue[3];if(ao){var so=to[3];to[3]=so?composeArgs(so,ao,ue[4]):ao,to[4]=so?replaceHolders(to[3],PLACEHOLDER):ue[4]}return ao=ue[5],ao&&(so=to[5],to[5]=so?composeArgsRight(so,ao,ue[6]):ao,to[6]=so?replaceHolders(to[5],PLACEHOLDER):ue[6]),ao=ue[7],ao&&(to[7]=ao),no&WRAP_ARY_FLAG$1&&(to[8]=to[8]==null?ue[8]:nativeMin(to[8],ue[8])),to[9]==null&&(to[9]=ue[9]),to[0]=ue[0],to[1]=ro,to}var _mergeData=mergeData$1,reWhitespace=/\s/;function trimmedEndIndex$1(to){for(var ue=to.length;ue--&&reWhitespace.test(to.charAt(ue)););return ue}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(to){return to&&to.slice(0,trimmedEndIndex(to)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1,baseTrim=_baseTrim,isObject$3=isObject_1,isSymbol$2=isSymbol_1,NAN=0/0,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(to){if(typeof to=="number")return to;if(isSymbol$2(to))return NAN;if(isObject$3(to)){var ue=typeof to.valueOf=="function"?to.valueOf():to;to=isObject$3(ue)?ue+"":ue}if(typeof to!="string")return to===0?to:+to;to=baseTrim(to);var eo=reIsBinary.test(to);return eo||reIsOctal.test(to)?freeParseInt(to.slice(2),eo?2:8):reIsBadHex.test(to)?NAN:+to}var toNumber_1=toNumber$1,toNumber=toNumber_1,INFINITY=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$1(to){if(!to)return to===0?to:0;if(to=toNumber(to),to===INFINITY||to===-INFINITY){var ue=to<0?-1:1;return ue*MAX_INTEGER}return to===to?to:0}var toFinite_1=toFinite$1,toFinite=toFinite_1;function toInteger$1(to){var ue=toFinite(to),eo=ue%1;return ue===ue?eo?ue-eo:ue:0}var toInteger_1=toInteger$1,baseSetData=_baseSetData,createBind=_createBind,createCurry=_createCurry,createHybrid=_createHybrid,createPartial=_createPartial,getData=_getData,mergeData=_mergeData,setData=_setData,setWrapToString=_setWrapToString,toInteger=toInteger_1,FUNC_ERROR_TEXT="Expected a function",WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_FLAG$1=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG=32,WRAP_PARTIAL_RIGHT_FLAG=64,nativeMax$1=Math.max;function createWrap$3(to,ue,eo,no,ro,oo,io,ao){var so=ue&WRAP_BIND_KEY_FLAG;if(!so&&typeof to!="function")throw new TypeError(FUNC_ERROR_TEXT);var lo=no?no.length:0;if(lo||(ue&=~(WRAP_PARTIAL_FLAG|WRAP_PARTIAL_RIGHT_FLAG),no=ro=void 0),io=io===void 0?io:nativeMax$1(toInteger(io),0),ao=ao===void 0?ao:toInteger(ao),lo-=ro?ro.length:0,ue&WRAP_PARTIAL_RIGHT_FLAG){var co=no,uo=ro;no=ro=void 0}var fo=so?void 0:getData(to),po=[to,ue,eo,no,ro,co,uo,oo,io,ao];if(fo&&mergeData(po,fo),to=po[0],ue=po[1],eo=po[2],no=po[3],ro=po[4],ao=po[9]=po[9]===void 0?so?0:to.length:nativeMax$1(po[9]-lo,0),!ao&&ue&(WRAP_CURRY_FLAG$1|WRAP_CURRY_RIGHT_FLAG)&&(ue&=~(WRAP_CURRY_FLAG$1|WRAP_CURRY_RIGHT_FLAG)),!ue||ue==WRAP_BIND_FLAG)var ho=createBind(to,ue,eo);else ue==WRAP_CURRY_FLAG$1||ue==WRAP_CURRY_RIGHT_FLAG?ho=createCurry(to,ue,ao):(ue==WRAP_PARTIAL_FLAG||ue==(WRAP_BIND_FLAG|WRAP_PARTIAL_FLAG))&&!ro.length?ho=createPartial(to,ue,eo,no):ho=createHybrid.apply(void 0,po);var _o=fo?baseSetData:setData;return setWrapToString(_o(ho,po),to,ue)}var _createWrap=createWrap$3,createWrap$2=_createWrap,WRAP_ARY_FLAG=128;function ary(to,ue,eo){return ue=eo?void 0:ue,ue=to&&ue==null?to.length:ue,createWrap$2(to,WRAP_ARY_FLAG,void 0,void 0,void 0,void 0,ue)}var ary_1=ary,baseAssignValue$1=_baseAssignValue,eq=eq_1,objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function assignValue$2(to,ue,eo){var no=to[ue];(!(hasOwnProperty$3.call(to,ue)&&eq(no,eo))||eo===void 0&&!(ue in to))&&baseAssignValue$1(to,ue,eo)}var _assignValue=assignValue$2,assignValue$1=_assignValue,baseAssignValue=_baseAssignValue;function copyObject$4(to,ue,eo,no){var ro=!eo;eo||(eo={});for(var oo=-1,io=ue.length;++oo<io;){var ao=ue[oo],so=no?no(eo[ao],to[ao],ao,eo,to):void 0;so===void 0&&(so=to[ao]),ro?baseAssignValue(eo,ao,so):assignValue$1(eo,ao,so)}return eo}var _copyObject=copyObject$4,copyObject$3=_copyObject,keys$1=keys_1;function baseAssign$1(to,ue){return to&©Object$3(ue,keys$1(ue),to)}var _baseAssign=baseAssign$1;function nativeKeysIn$1(to){var ue=[];if(to!=null)for(var eo in Object(to))ue.push(eo);return ue}var _nativeKeysIn=nativeKeysIn$1,isObject$2=isObject_1,isPrototype$1=_isPrototype,nativeKeysIn=_nativeKeysIn,objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function baseKeysIn$1(to){if(!isObject$2(to))return nativeKeysIn(to);var ue=isPrototype$1(to),eo=[];for(var no in to)no=="constructor"&&(ue||!hasOwnProperty$2.call(to,no))||eo.push(no);return eo}var _baseKeysIn=baseKeysIn$1,arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike=isArrayLike_1;function keysIn$3(to){return isArrayLike(to)?arrayLikeKeys(to,!0):baseKeysIn(to)}var keysIn_1=keysIn$3,copyObject$2=_copyObject,keysIn$2=keysIn_1;function baseAssignIn$1(to,ue){return to&©Object$2(ue,keysIn$2(ue),to)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports;(function(to,ue){var eo=_root,no=ue&&!ue.nodeType&&ue,ro=no&&!0&&to&&!to.nodeType&&to,oo=ro&&ro.exports===no,io=oo?eo.Buffer:void 0,ao=io?io.allocUnsafe:void 0;function so(lo,co){if(co)return lo.slice();var uo=lo.length,fo=ao?ao(uo):new lo.constructor(uo);return lo.copy(fo),fo}to.exports=so})(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports,copyObject$1=_copyObject,getSymbols$1=_getSymbols;function copySymbols$1(to,ue){return copyObject$1(to,getSymbols$1(to),ue)}var _copySymbols=copySymbols$1,overArg=_overArg,getPrototype$3=overArg(Object.getPrototypeOf,Object),_getPrototype=getPrototype$3,arrayPush$1=_arrayPush,getPrototype$2=_getPrototype,getSymbols=_getSymbols,stubArray=stubArray_1,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbolsIn$2=nativeGetSymbols?function(to){for(var ue=[];to;)arrayPush$1(ue,getSymbols(to)),to=getPrototype$2(to);return ue}:stubArray,_getSymbolsIn=getSymbolsIn$2,copyObject=_copyObject,getSymbolsIn$1=_getSymbolsIn;function copySymbolsIn$1(to,ue){return copyObject(to,getSymbolsIn$1(to),ue)}var _copySymbolsIn=copySymbolsIn$1,baseGetAllKeys=_baseGetAllKeys,getSymbolsIn=_getSymbolsIn,keysIn$1=keysIn_1;function getAllKeysIn$1(to){return baseGetAllKeys(to,keysIn$1,getSymbolsIn)}var _getAllKeysIn=getAllKeysIn$1,objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function initCloneArray$1(to){var ue=to.length,eo=new to.constructor(ue);return ue&&typeof to[0]=="string"&&hasOwnProperty$1.call(to,"index")&&(eo.index=to.index,eo.input=to.input),eo}var _initCloneArray=initCloneArray$1,Uint8Array$1=_Uint8Array;function cloneArrayBuffer$3(to){var ue=new to.constructor(to.byteLength);return new Uint8Array$1(ue).set(new Uint8Array$1(to)),ue}var _cloneArrayBuffer=cloneArrayBuffer$3,cloneArrayBuffer$2=_cloneArrayBuffer;function cloneDataView$1(to,ue){var eo=ue?cloneArrayBuffer$2(to.buffer):to.buffer;return new to.constructor(eo,to.byteOffset,to.byteLength)}var _cloneDataView=cloneDataView$1,reFlags=/\w*$/;function cloneRegExp$1(to){var ue=new to.constructor(to.source,reFlags.exec(to));return ue.lastIndex=to.lastIndex,ue}var _cloneRegExp=cloneRegExp$1,Symbol$2=_Symbol,symbolProto=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function cloneSymbol$1(to){return symbolValueOf?Object(symbolValueOf.call(to)):{}}var _cloneSymbol=cloneSymbol$1,cloneArrayBuffer$1=_cloneArrayBuffer;function cloneTypedArray$1(to,ue){var eo=ue?cloneArrayBuffer$1(to.buffer):to.buffer;return new to.constructor(eo,to.byteOffset,to.length)}var _cloneTypedArray=cloneTypedArray$1,cloneArrayBuffer=_cloneArrayBuffer,cloneDataView=_cloneDataView,cloneRegExp=_cloneRegExp,cloneSymbol=_cloneSymbol,cloneTypedArray=_cloneTypedArray,boolTag$1="[object Boolean]",dateTag$1="[object Date]",mapTag$2="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$2="[object Set]",stringTag$1="[object String]",symbolTag$1="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag$1(to,ue,eo){var no=to.constructor;switch(ue){case arrayBufferTag$1:return cloneArrayBuffer(to);case boolTag$1:case dateTag$1:return new no(+to);case dataViewTag$1:return cloneDataView(to,eo);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(to,eo);case mapTag$2:return new no;case numberTag$1:case stringTag$1:return new no(to);case regexpTag$1:return cloneRegExp(to);case setTag$2:return new no;case symbolTag$1:return cloneSymbol(to)}}var _initCloneByTag=initCloneByTag$1,baseCreate=_baseCreate,getPrototype$1=_getPrototype,isPrototype=_isPrototype;function initCloneObject$1(to){return typeof to.constructor=="function"&&!isPrototype(to)?baseCreate(getPrototype$1(to)):{}}var _initCloneObject=initCloneObject$1,getTag$3=_getTag,isObjectLike$4=isObjectLike_1,mapTag$1="[object Map]";function baseIsMap$1(to){return isObjectLike$4(to)&&getTag$3(to)==mapTag$1}var _baseIsMap=baseIsMap$1,baseIsMap=_baseIsMap,baseUnary$1=_baseUnary,nodeUtil$1=_nodeUtilExports,nodeIsMap=nodeUtil$1&&nodeUtil$1.isMap,isMap$2=nodeIsMap?baseUnary$1(nodeIsMap):baseIsMap,isMap_1=isMap$2,getTag$2=_getTag,isObjectLike$3=isObjectLike_1,setTag$1="[object Set]";function baseIsSet$1(to){return isObjectLike$3(to)&&getTag$2(to)==setTag$1}var _baseIsSet=baseIsSet$1,baseIsSet=_baseIsSet,baseUnary=_baseUnary,nodeUtil=_nodeUtilExports,nodeIsSet=nodeUtil&&nodeUtil.isSet,isSet$2=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,isSet_1=isSet$2,Stack=_Stack,arrayEach=_arrayEach,assignValue=_assignValue,baseAssign=_baseAssign,baseAssignIn=_baseAssignIn,cloneBuffer=_cloneBufferExports,copyArray$1=_copyArray,copySymbols=_copySymbols,copySymbolsIn=_copySymbolsIn,getAllKeys=_getAllKeys,getAllKeysIn=_getAllKeysIn,getTag$1=_getTag,initCloneArray=_initCloneArray,initCloneByTag=_initCloneByTag,initCloneObject=_initCloneObject,isArray$6=isArray_1,isBuffer$1=isBufferExports,isMap$1=isMap_1,isObject$1=isObject_1,isSet$1=isSet_1,keys=keys_1,keysIn=keysIn_1,CLONE_DEEP_FLAG$1=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG$1=4,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag$1="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag$1="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag$1]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0;cloneableTags[errorTag$1]=cloneableTags[funcTag]=cloneableTags[weakMapTag$1]=!1;function baseClone$2(to,ue,eo,no,ro,oo){var io,ao=ue&CLONE_DEEP_FLAG$1,so=ue&CLONE_FLAT_FLAG,lo=ue&CLONE_SYMBOLS_FLAG$1;if(eo&&(io=ro?eo(to,no,ro,oo):eo(to)),io!==void 0)return io;if(!isObject$1(to))return to;var co=isArray$6(to);if(co){if(io=initCloneArray(to),!ao)return copyArray$1(to,io)}else{var uo=getTag$1(to),fo=uo==funcTag||uo==genTag;if(isBuffer$1(to))return cloneBuffer(to,ao);if(uo==objectTag$1||uo==argsTag||fo&&!ro){if(io=so||fo?{}:initCloneObject(to),!ao)return so?copySymbolsIn(to,baseAssignIn(io,to)):copySymbols(to,baseAssign(io,to))}else{if(!cloneableTags[uo])return ro?to:{};io=initCloneByTag(to,uo,ao)}}oo||(oo=new Stack);var po=oo.get(to);if(po)return po;oo.set(to,io),isSet$1(to)?to.forEach(function(go){io.add(baseClone$2(go,ue,eo,go,to,oo))}):isMap$1(to)&&to.forEach(function(go,bo){io.set(bo,baseClone$2(go,ue,eo,bo,to,oo))});var ho=lo?so?getAllKeysIn:getAllKeys:so?keysIn:keys,_o=co?void 0:ho(to);return arrayEach(_o||to,function(go,bo){_o&&(bo=go,go=to[bo]),assignValue(io,bo,baseClone$2(go,ue,eo,bo,to,oo))}),io}var _baseClone=baseClone$2,baseClone$1=_baseClone,CLONE_SYMBOLS_FLAG=4;function clone(to){return baseClone$1(to,CLONE_SYMBOLS_FLAG)}var clone_1=clone,createWrap$1=_createWrap,WRAP_CURRY_FLAG=8;function curry(to,ue,eo){ue=eo?void 0:ue;var no=createWrap$1(to,WRAP_CURRY_FLAG,void 0,void 0,void 0,void 0,void 0,ue);return no.placeholder=curry.placeholder,no}curry.placeholder={};var curry_1=curry,baseGetTag$1=_baseGetTag,getPrototype=_getPrototype,isObjectLike$2=isObjectLike_1,objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject$1(to){if(!isObjectLike$2(to)||baseGetTag$1(to)!=objectTag)return!1;var ue=getPrototype(to);if(ue===null)return!0;var eo=hasOwnProperty.call(ue,"constructor")&&ue.constructor;return typeof eo=="function"&&eo instanceof eo&&funcToString.call(eo)==objectCtorString}var isPlainObject_1=isPlainObject$1,baseGetTag=_baseGetTag,isObjectLike$1=isObjectLike_1,isPlainObject=isPlainObject_1,domExcTag="[object DOMException]",errorTag="[object Error]";function isError$1(to){if(!isObjectLike$1(to))return!1;var ue=baseGetTag(to);return ue==errorTag||ue==domExcTag||typeof to.message=="string"&&typeof to.name=="string"&&!isPlainObject(to)}var isError_1=isError$1,getTag=_getTag,isObjectLike=isObjectLike_1,weakMapTag="[object WeakMap]";function isWeakMap$1(to){return isObjectLike(to)&&getTag(to)==weakMapTag}var isWeakMap_1=isWeakMap$1,baseClone=_baseClone,baseIteratee=_baseIteratee,CLONE_DEEP_FLAG=1;function iteratee(to){return baseIteratee(typeof to=="function"?to:baseClone(to,CLONE_DEEP_FLAG))}var iteratee_1=iteratee,Symbol$1=_Symbol,isArguments=isArguments_1,isArray$5=isArray_1,spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function isFlattenable$1(to){return isArray$5(to)||isArguments(to)||!!(spreadableSymbol&&to&&to[spreadableSymbol])}var _isFlattenable=isFlattenable$1,arrayPush=_arrayPush,isFlattenable=_isFlattenable;function baseFlatten$1(to,ue,eo,no,ro){var oo=-1,io=to.length;for(eo||(eo=isFlattenable),ro||(ro=[]);++oo<io;){var ao=to[oo];ue>0&&eo(ao)?ue>1?baseFlatten$1(ao,ue-1,eo,no,ro):arrayPush(ro,ao):no||(ro[ro.length]=ao)}return ro}var _baseFlatten=baseFlatten$1,baseFlatten=_baseFlatten;function flatten$1(to){var ue=to==null?0:to.length;return ue?baseFlatten(to,1):[]}var flatten_1=flatten$1,apply=_apply,nativeMax=Math.max;function overRest$1(to,ue,eo){return ue=nativeMax(ue===void 0?to.length-1:ue,0),function(){for(var no=arguments,ro=-1,oo=nativeMax(no.length-ue,0),io=Array(oo);++ro<oo;)io[ro]=no[ue+ro];ro=-1;for(var ao=Array(ue+1);++ro<ue;)ao[ro]=no[ro];return ao[ue]=eo(io),apply(to,this,ao)}}var _overRest=overRest$1,flatten=flatten_1,overRest=_overRest,setToString=_setToString;function flatRest$1(to){return setToString(overRest(to,void 0,flatten),to+"")}var _flatRest=flatRest$1,createWrap=_createWrap,flatRest=_flatRest,WRAP_REARG_FLAG=256,rearg=flatRest(function(to,ue){return createWrap(to,WRAP_REARG_FLAG,void 0,void 0,void 0,ue)}),rearg_1=rearg,arrayMap=_arrayMap,copyArray=_copyArray,isArray$4=isArray_1,isSymbol$1=isSymbol_1,stringToPath$1=_stringToPath,toKey=_toKey,toString$3=toString_1;function toPath(to){return isArray$4(to)?arrayMap(to,toKey):isSymbol$1(to)?[to]:copyArray(stringToPath$1(toString$3(to)))}var toPath_1=toPath,_util={ary:ary_1,assign:_baseAssign,clone:clone_1,curry:curry_1,forEach:_arrayEach,isArray:isArray_1,isError:isError_1,isFunction:isFunction_1,isWeakMap:isWeakMap_1,iteratee:iteratee_1,keys:_baseKeys,rearg:rearg_1,toInteger:toInteger_1,toPath:toPath_1},baseConvert=_baseConvert$1,util$e=_util;function convert$1(to,ue,eo){return baseConvert(util$e,to,ue,eo)}var convert_1=convert$1,_arrayAggregator,hasRequired_arrayAggregator;function require_arrayAggregator(){if(hasRequired_arrayAggregator)return _arrayAggregator;hasRequired_arrayAggregator=1;function to(ue,eo,no,ro){for(var oo=-1,io=ue==null?0:ue.length;++oo<io;){var ao=ue[oo];eo(ro,ao,no(ao),ue)}return ro}return _arrayAggregator=to,_arrayAggregator}var _createBaseEach,hasRequired_createBaseEach;function require_createBaseEach(){if(hasRequired_createBaseEach)return _createBaseEach;hasRequired_createBaseEach=1;var to=isArrayLike_1;function ue(eo,no){return function(ro,oo){if(ro==null)return ro;if(!to(ro))return eo(ro,oo);for(var io=ro.length,ao=no?io:-1,so=Object(ro);(no?ao--:++ao<io)&&oo(so[ao],ao,so)!==!1;);return ro}}return _createBaseEach=ue,_createBaseEach}var _baseEach,hasRequired_baseEach;function require_baseEach(){if(hasRequired_baseEach)return _baseEach;hasRequired_baseEach=1;var to=_baseForOwn,ue=require_createBaseEach(),eo=ue(to);return _baseEach=eo,_baseEach}var _baseAggregator,hasRequired_baseAggregator;function require_baseAggregator(){if(hasRequired_baseAggregator)return _baseAggregator;hasRequired_baseAggregator=1;var to=require_baseEach();function ue(eo,no,ro,oo){return to(eo,function(io,ao,so){no(oo,io,ro(io),so)}),oo}return _baseAggregator=ue,_baseAggregator}var _createAggregator,hasRequired_createAggregator;function require_createAggregator(){if(hasRequired_createAggregator)return _createAggregator;hasRequired_createAggregator=1;var to=require_arrayAggregator(),ue=require_baseAggregator(),eo=_baseIteratee,no=isArray_1;function ro(oo,io){return function(ao,so){var lo=no(ao)?to:ue,co=io?io():{};return lo(ao,oo,eo(so),co)}}return _createAggregator=ro,_createAggregator}var groupBy_1,hasRequiredGroupBy;function requireGroupBy(){if(hasRequiredGroupBy)return groupBy_1;hasRequiredGroupBy=1;var to=_baseAssignValue,ue=require_createAggregator(),eo=Object.prototype,no=eo.hasOwnProperty,ro=ue(function(oo,io,ao){no.call(oo,ao)?oo[ao].push(io):to(oo,ao,[io])});return groupBy_1=ro,groupBy_1}var convert=convert_1,func$L=convert("groupBy",requireGroupBy());func$L.placeholder=placeholder$3;var groupBy=func$L;const groupBy$1=getDefaultExportFromCjs$1(groupBy);function handlebarsCompletions(){const to=getManifest();return Object.keys(to).flatMap(ue=>Object.entries(to[ue]).map(([eo,no])=>({text:eo,path:eo,example:no.example,label:eo,displayText:eo,description:no.description,allowsJs:!no.requiresBlock&&!helpersToRemoveForJs.includes(eo)})))}const BindingSidePanel_svelte_svelte_type_style_lang="";function get_each_context$1H(to,ue,eo){const no=to.slice();return no[37]=ue[eo],no}function get_each_context_1$s(to,ue,eo){const no=to.slice();return no[40]=ue[eo],no}function get_each_context_2$8(to,ue,eo){const no=to.slice();return no[43]=ue[eo],no}function get_each_context_3(to,ue,eo){const no=to.slice();return no[46]=ue[eo],no}function create_if_block_13$2(to){let ue,eo=to[8].description+"";return{c(){ue=element("div")},m(no,ro){insert$1(no,ue,ro),ue.innerHTML=eo},p(no,ro){ro[0]&256&&eo!==(eo=no[8].description+"")&&(ue.innerHTML=eo)},d(no){no&&detach(ue)}}}function create_if_block_12$2(to){let ue,eo=to[8].code+"";return{c(){ue=element("pre"),attr(ue,"class","svelte-jofp16")},m(no,ro){insert$1(no,ue,ro),ue.innerHTML=eo},p(no,ro){ro[0]&256&&eo!==(eo=no[8].code+"")&&(ue.innerHTML=eo)},d(no){no&&detach(ue)}}}function create_default_slot_1$3_(to){let ue,eo,no=to[8].description&&create_if_block_13$2(to),ro=to[8].code&&create_if_block_12$2(to);return{c(){ue=element("div"),no&&no.c(),eo=space$1(),ro&&ro.c(),attr(ue,"class","binding-popover svelte-jofp16"),toggle_class(ue,"helper",to[8].helper)},m(oo,io){insert$1(oo,ue,io),no&&no.m(ue,null),append$2(ue,eo),ro&&ro.m(ue,null)},p(oo,io){oo[8].description?no?no.p(oo,io):(no=create_if_block_13$2(oo),no.c(),no.m(ue,eo)):no&&(no.d(1),no=null),oo[8].code?ro?ro.p(oo,io):(ro=create_if_block_12$2(oo),ro.c(),ro.m(ue,null)):ro&&(ro.d(1),ro=null),io[0]&256&&toggle_class(ue,"helper",oo[8].helper)},d(oo){oo&&detach(ue),no&&no.d(),ro&&ro.d()}}}function create_if_block_11$4(to){let ue,eo,no,ro,oo;return eo=new Icon({props:{name:"BackAndroid",hoverable:!0,size:"S"}}),eo.$on("click",to[26]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),ro=text(to[4]),attr(ue,"class","header svelte-jofp16")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),append$2(ue,no),append$2(ue,ro),oo=!0},p(io,ao){(!oo||ao[0]&16)&&set_data(ro,io[4])},i(io){oo||(transition_in(eo.$$.fragment,io),oo=!0)},o(io){transition_out(eo.$$.fragment,io),oo=!1},d(io){io&&detach(ue),destroy_component(eo)}}}function create_if_block_9$d(to){let ue,eo,no,ro;const oo=[create_if_block_10$7,create_else_block_1$p],io=[];function ao(so,lo){return so[5]?0:1}return eo=ao(to),no=io[eo]=oo[eo](to),{c(){ue=element("div"),no.c(),attr(ue,"class","header svelte-jofp16")},m(so,lo){insert$1(so,ue,lo),io[eo].m(ue,null),ro=!0},p(so,lo){let co=eo;eo=ao(so),eo===co?io[eo].p(so,lo):(group_outros(),transition_out(io[co],1,1,()=>{io[co]=null}),check_outros(),no=io[eo],no?no.p(so,lo):(no=io[eo]=oo[eo](so),no.c()),transition_in(no,1),no.m(ue,null))},i(so){ro||(transition_in(no),ro=!0)},o(so){transition_out(no),ro=!1},d(so){so&&detach(ue),io[eo].d()}}}function create_else_block_1$p(to){let ue,eo,no,ro;return no=new Icon({props:{size:"S",name:"Search",hoverable:!0,newStyles:!0}}),no.$on("click",to[17]),{c(){ue=element("div"),ue.textContent="Bindings",eo=space$1(),create_component(no.$$.fragment),attr(ue,"class","title svelte-jofp16")},m(oo,io){insert$1(oo,ue,io),insert$1(oo,eo,io),mount_component(no,oo,io),ro=!0},p:noop$6,i(oo){ro||(transition_in(no.$$.fragment,oo),ro=!0)},o(oo){transition_out(no.$$.fragment,oo),ro=!1},d(oo){oo&&(detach(ue),detach(eo)),destroy_component(no,oo)}}}function create_if_block_10$7(to){let ue,eo,no,ro,oo,io;function ao(lo){to[27](lo)}let so={placeholder:"Search for bindings",autocomplete:"off",autofocus:!0};return to[3]!==void 0&&(so.value=to[3]),eo=new Input$5({props:so}),binding_callbacks.push(()=>bind$2(eo,"value",ao)),oo=new Icon({props:{size:"S",name:"Close",hoverable:!0,newStyles:!0}}),oo.$on("click",to[18]),{c(){ue=element("div"),create_component(eo.$$.fragment),ro=space$1(),create_component(oo.$$.fragment),attr(ue,"class","search-input svelte-jofp16")},m(lo,co){insert$1(lo,ue,co),mount_component(eo,ue,null),insert$1(lo,ro,co),mount_component(oo,lo,co),io=!0},p(lo,co){const uo={};!no&&co[0]&8&&(no=!0,uo.value=lo[3],add_flush_callback(()=>no=!1)),eo.$set(uo)},i(lo){io||(transition_in(eo.$$.fragment,lo),transition_in(oo.$$.fragment,lo),io=!0)},o(lo){transition_out(eo.$$.fragment,lo),transition_out(oo.$$.fragment,lo),io=!1},d(lo){lo&&(detach(ue),detach(ro)),destroy_component(eo),destroy_component(oo,lo)}}}function create_if_block_8$f(to){let ue,eo,no=ensure_array_like(to[11]),ro=[];for(let io=0;io<no.length;io+=1)ro[io]=create_each_block_3(get_each_context_3(to,no,io));const oo=io=>transition_out(ro[io],1,1,()=>{ro[io]=null});return{c(){ue=element("ul");for(let io=0;io<ro.length;io+=1)ro[io].c();attr(ue,"class","category-list svelte-jofp16")},m(io,ao){insert$1(io,ue,ao);for(let so=0;so<ro.length;so+=1)ro[so]&&ro[so].m(ue,null);eo=!0},p(io,ao){if(ao[0]&6160){no=ensure_array_like(io[11]);let so;for(so=0;so<no.length;so+=1){const lo=get_each_context_3(io,no,so);ro[so]?(ro[so].p(lo,ao),transition_in(ro[so],1)):(ro[so]=create_each_block_3(lo),ro[so].c(),transition_in(ro[so],1),ro[so].m(ue,null))}for(group_outros(),so=no.length;so<ro.length;so+=1)oo(so);check_outros()}},i(io){if(!eo){for(let ao=0;ao<no.length;ao+=1)transition_in(ro[ao]);eo=!0}},o(io){ro=ro.filter(Boolean);for(let ao=0;ao<ro.length;ao+=1)transition_out(ro[ao]);eo=!1},d(io){io&&detach(ue),destroy_each(ro,io)}}}function create_each_block_3(to){let ue,eo,no,ro,oo=to[46]+"",io,ao,so,lo,co,uo,fo,po;eo=new Icon({props:{size:"S",color:"var(--spectrum-global-color-gray-700)",name:to[12][to[46]]}}),lo=new Icon({props:{name:"ChevronRight"}});function ho(){return to[28](to[46])}return{c(){ue=element("li"),create_component(eo.$$.fragment),no=space$1(),ro=element("span"),io=text(oo),ao=space$1(),so=element("span"),create_component(lo.$$.fragment),co=space$1(),attr(ro,"class","category-name svelte-jofp16"),attr(so,"class","category-chevron svelte-jofp16"),attr(ue,"class","svelte-jofp16")},m(_o,go){insert$1(_o,ue,go),mount_component(eo,ue,null),append$2(ue,no),append$2(ue,ro),append$2(ro,io),append$2(ue,ao),append$2(ue,so),mount_component(lo,so,null),append$2(ue,co),uo=!0,fo||(po=listen(ue,"click",ho),fo=!0)},p(_o,go){to=_o;const bo={};go[0]&6144&&(bo.name=to[12][to[46]]),eo.$set(bo),(!uo||go[0]&2048)&&oo!==(oo=to[46]+"")&&set_data(io,oo)},i(_o){uo||(transition_in(eo.$$.fragment,_o),transition_in(lo.$$.fragment,_o),uo=!0)},o(_o){transition_out(eo.$$.fragment,_o),transition_out(lo.$$.fragment,_o),uo=!1},d(_o){_o&&detach(ue),destroy_component(eo),destroy_component(lo),fo=!1,po()}}}function create_if_block$47(to){let ue,eo,no,ro=ensure_array_like(to[10]),oo=[];for(let so=0;so<ro.length;so+=1)oo[so]=create_each_block_1$s(get_each_context_1$s(to,ro,so));const io=so=>transition_out(oo[so],1,1,()=>{oo[so]=null});let ao=(to[4]==="Helpers"||to[3])&&create_if_block_1$2c(to);return{c(){for(let so=0;so<oo.length;so+=1)oo[so].c();ue=space$1(),ao&&ao.c(),eo=empty$3()},m(so,lo){for(let co=0;co<oo.length;co+=1)oo[co]&&oo[co].m(so,lo);insert$1(so,ue,lo),ao&&ao.m(so,lo),insert$1(so,eo,lo),no=!0},p(so,lo){if(lo[0]&46082){ro=ensure_array_like(so[10]);let co;for(co=0;co<ro.length;co+=1){const uo=get_each_context_1$s(so,ro,co);oo[co]?(oo[co].p(uo,lo),transition_in(oo[co],1)):(oo[co]=create_each_block_1$s(uo),oo[co].c(),transition_in(oo[co],1),oo[co].m(ue.parentNode,ue))}for(group_outros(),co=ro.length;co<oo.length;co+=1)io(co);check_outros()}so[4]==="Helpers"||so[3]?ao?ao.p(so,lo):(ao=create_if_block_1$2c(so),ao.c(),ao.m(eo.parentNode,eo)):ao&&(ao.d(1),ao=null)},i(so){if(!no){for(let lo=0;lo<ro.length;lo+=1)transition_in(oo[lo]);no=!0}},o(so){oo=oo.filter(Boolean);for(let lo=0;lo<oo.length;lo+=1)transition_out(oo[lo]);no=!1},d(so){so&&(detach(ue),detach(eo)),destroy_each(oo,so),ao&&ao.d(so)}}}function create_if_block_3$Z(to){let ue,eo,no,ro,oo=to[10].length>1&&create_if_block_7$k(to),io=ensure_array_like(to[40].bindings),ao=[];for(let so=0;so<io.length;so+=1)ao[so]=create_each_block_2$8(get_each_context_2$8(to,io,so));return{c(){ue=element("div"),oo&&oo.c(),eo=space$1(),no=element("ul");for(let so=0;so<ao.length;so+=1)ao[so].c();attr(no,"class","svelte-jofp16"),attr(ue,"class","sub-section svelte-jofp16")},m(so,lo){insert$1(so,ue,lo),oo&&oo.m(ue,null),append$2(ue,eo),append$2(ue,no);for(let co=0;co<ao.length;co+=1)ao[co]&&ao[co].m(no,null);ro=!0},p(so,lo){if(so[10].length>1?oo?(oo.p(so,lo),lo[0]&1024&&transition_in(oo,1)):(oo=create_if_block_7$k(so),oo.c(),transition_in(oo,1),oo.m(ue,eo)):oo&&(group_outros(),transition_out(oo,1,1,()=>{oo=null}),check_outros()),lo[0]&41986){io=ensure_array_like(so[40].bindings);let co;for(co=0;co<io.length;co+=1){const uo=get_each_context_2$8(so,io,co);ao[co]?ao[co].p(uo,lo):(ao[co]=create_each_block_2$8(uo),ao[co].c(),ao[co].m(no,null))}for(;co<ao.length;co+=1)ao[co].d(1);ao.length=io.length}},i(so){ro||(transition_in(oo),ro=!0)},o(so){transition_out(oo),ro=!1},d(so){so&&detach(ue),oo&&oo.d(),destroy_each(ao,so)}}}function create_if_block_7$k(to){let ue,eo,no=to[40].name+"",ro,oo;return eo=new Icon({props:{name:to[12][to[40].name]}}),{c(){ue=element("div"),create_component(eo.$$.fragment),ro=text(no),attr(ue,"class","cat-heading svelte-jofp16")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),append$2(ue,ro),oo=!0},p(io,ao){const so={};ao[0]&5120&&(so.name=io[12][io[40].name]),eo.$set(so),(!oo||ao[0]&1024)&&no!==(no=io[40].name+"")&&set_data(ro,no)},i(io){oo||(transition_in(eo.$$.fragment,io),oo=!0)},o(io){transition_out(eo.$$.fragment,io),oo=!1},d(io){io&&detach(ue),destroy_component(eo)}}}function create_else_block$1C(to){let ue=to[43].readableBinding+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro[0]&1024&&ue!==(ue=no[43].readableBinding+"")&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_if_block_6$n(to){var no;let ue=((no=to[43].fieldSchema)==null?void 0:no.name)+"",eo;return{c(){eo=text(ue)},m(ro,oo){insert$1(ro,eo,oo)},p(ro,oo){var io;oo[0]&1024&&ue!==(ue=((io=ro[43].fieldSchema)==null?void 0:io.name)+"")&&set_data(eo,ue)},d(ro){ro&&detach(eo)}}}function create_if_block_5$w(to){let ue=to[43].display.name+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro[0]&1024&&ue!==(ue=no[43].display.name+"")&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_if_block_4$I(to){var oo,io;let ue,eo,no=(((oo=to[43].display)==null?void 0:oo.type)||((io=to[43].fieldSchema)==null?void 0:io.type))+"",ro;return{c(){ue=element("span"),eo=element("span"),ro=text(no),attr(eo,"class","binding__type svelte-jofp16"),attr(ue,"class","binding__typeWrap svelte-jofp16")},m(ao,so){insert$1(ao,ue,so),append$2(ue,eo),append$2(eo,ro)},p(ao,so){var lo,co;so[0]&1024&&no!==(no=(((lo=ao[43].display)==null?void 0:lo.type)||((co=ao[43].fieldSchema)==null?void 0:co.type))+"")&&set_data(ro,no)},d(ao){ao&&detach(ue)}}}function create_each_block_2$8(to){var fo,po;let ue,eo,no,ro,oo;function io(ho,_o){var go,bo;return(go=ho[43].display)!=null&&go.name?create_if_block_5$w:(bo=ho[43].fieldSchema)!=null&&bo.name?create_if_block_6$n:create_else_block$1C}let ao=io(to),so=ao(to),lo=(((fo=to[43].display)==null?void 0:fo.type)||((po=to[43].fieldSchema)==null?void 0:po.type))&&create_if_block_4$I(to);function co(...ho){return to[29](to[43],...ho)}function uo(){return to[30](to[43])}return{c(){ue=element("li"),eo=element("span"),so.c(),no=space$1(),lo&&lo.c(),attr(eo,"class","binding__label svelte-jofp16"),attr(ue,"class","binding svelte-jofp16")},m(ho,_o){insert$1(ho,ue,_o),append$2(ue,eo),so.m(eo,null),append$2(ue,no),lo&&lo.m(ue,null),ro||(oo=[listen(ue,"mouseenter",co),listen(ue,"mouseleave",to[15]),listen(ue,"click",uo)],ro=!0)},p(ho,_o){var go,bo;to=ho,ao===(ao=io(to))&&so?so.p(to,_o):(so.d(1),so=ao(to),so&&(so.c(),so.m(eo,null))),(go=to[43].display)!=null&&go.type||(bo=to[43].fieldSchema)!=null&&bo.type?lo?lo.p(to,_o):(lo=create_if_block_4$I(to),lo.c(),lo.m(ue,null)):lo&&(lo.d(1),lo=null)},d(ho){ho&&detach(ue),so.d(),lo&&lo.d(),ro=!1,run_all(oo)}}}function create_each_block_1$s(to){var ro;let ue,eo,no=((ro=to[40].bindings)==null?void 0:ro.length)&&create_if_block_3$Z(to);return{c(){no&&no.c(),ue=empty$3()},m(oo,io){no&&no.m(oo,io),insert$1(oo,ue,io),eo=!0},p(oo,io){var ao;(ao=oo[40].bindings)!=null&&ao.length?no?(no.p(oo,io),io[0]&1024&&transition_in(no,1)):(no=create_if_block_3$Z(oo),no.c(),transition_in(no,1),no.m(ue.parentNode,ue)):no&&(group_outros(),transition_out(no,1,1,()=>{no=null}),check_outros())},i(oo){eo||(transition_in(no),eo=!0)},o(oo){transition_out(no),eo=!1},d(oo){oo&&detach(ue),no&&no.d(oo)}}}function create_if_block_1$2c(to){var no;let ue,eo=((no=to[9])==null?void 0:no.length)&&create_if_block_2$1l(to);return{c(){eo&&eo.c(),ue=empty$3()},m(ro,oo){eo&&eo.m(ro,oo),insert$1(ro,ue,oo)},p(ro,oo){var io;(io=ro[9])!=null&&io.length?eo?eo.p(ro,oo):(eo=create_if_block_2$1l(ro),eo.c(),eo.m(ue.parentNode,ue)):eo&&(eo.d(1),eo=null)},d(ro){ro&&detach(ue),eo&&eo.d(ro)}}}function create_if_block_2$1l(to){let ue,eo,no=ensure_array_like(to[9]),ro=[];for(let oo=0;oo<no.length;oo+=1)ro[oo]=create_each_block$1H(get_each_context$1H(to,no,oo));return{c(){ue=element("div"),eo=element("ul");for(let oo=0;oo<ro.length;oo+=1)ro[oo].c();attr(eo,"class","helpers svelte-jofp16"),attr(ue,"class","sub-section svelte-jofp16")},m(oo,io){insert$1(oo,ue,io),append$2(ue,eo);for(let ao=0;ao<ro.length;ao+=1)ro[ao]&&ro[ao].m(eo,null)},p(oo,io){if(io[0]&49669){no=ensure_array_like(oo[9]);let ao;for(ao=0;ao<no.length;ao+=1){const so=get_each_context$1H(oo,no,ao);ro[ao]?ro[ao].p(so,io):(ro[ao]=create_each_block$1H(so),ro[ao].c(),ro[ao].m(eo,null))}for(;ao<ro.length;ao+=1)ro[ao].d(1);ro.length=no.length}},d(oo){oo&&detach(ue),destroy_each(ro,oo)}}}function create_each_block$1H(to){let ue,eo,no=to[37].displayText+"",ro,oo,io,ao,so,lo;function co(...fo){return to[31](to[37],...fo)}function uo(){return to[32](to[37])}return{c(){ue=element("li"),eo=element("span"),ro=text(no),oo=space$1(),io=element("span"),io.innerHTML='<span class="binding__type svelte-jofp16">function</span>',ao=space$1(),attr(eo,"class","binding__label svelte-jofp16"),attr(io,"class","binding__typeWrap svelte-jofp16"),attr(ue,"class","binding svelte-jofp16")},m(fo,po){insert$1(fo,ue,po),append$2(ue,eo),append$2(eo,ro),append$2(ue,oo),append$2(ue,io),append$2(ue,ao),so||(lo=[listen(ue,"mouseenter",co),listen(ue,"mouseleave",to[15]),listen(ue,"click",uo)],so=!0)},p(fo,po){to=fo,po[0]&512&&no!==(no=to[37].displayText+"")&&set_data(ro,no)},d(fo){fo&&detach(ue),so=!1,run_all(lo)}}}function create_default_slot$5F(to){let ue,eo,no,ro,oo,io=to[4]&&create_if_block_11$4(to),ao=!to[4]&&create_if_block_9$d(to),so=!to[4]&&!to[3]&&create_if_block_8$f(to),lo=(to[4]||to[3])&&create_if_block$47(to);return{c(){io&&io.c(),ue=space$1(),ao&&ao.c(),eo=space$1(),so&&so.c(),no=space$1(),lo&&lo.c(),ro=empty$3()},m(co,uo){io&&io.m(co,uo),insert$1(co,ue,uo),ao&&ao.m(co,uo),insert$1(co,eo,uo),so&&so.m(co,uo),insert$1(co,no,uo),lo&&lo.m(co,uo),insert$1(co,ro,uo),oo=!0},p(co,uo){co[4]?io?(io.p(co,uo),uo[0]&16&&transition_in(io,1)):(io=create_if_block_11$4(co),io.c(),transition_in(io,1),io.m(ue.parentNode,ue)):io&&(group_outros(),transition_out(io,1,1,()=>{io=null}),check_outros()),co[4]?ao&&(group_outros(),transition_out(ao,1,1,()=>{ao=null}),check_outros()):ao?(ao.p(co,uo),uo[0]&16&&transition_in(ao,1)):(ao=create_if_block_9$d(co),ao.c(),transition_in(ao,1),ao.m(eo.parentNode,eo)),!co[4]&&!co[3]?so?(so.p(co,uo),uo[0]&24&&transition_in(so,1)):(so=create_if_block_8$f(co),so.c(),transition_in(so,1),so.m(no.parentNode,no)):so&&(group_outros(),transition_out(so,1,1,()=>{so=null}),check_outros()),co[4]||co[3]?lo?(lo.p(co,uo),uo[0]&24&&transition_in(lo,1)):(lo=create_if_block$47(co),lo.c(),transition_in(lo,1),lo.m(ro.parentNode,ro)):lo&&(group_outros(),transition_out(lo,1,1,()=>{lo=null}),check_outros())},i(co){oo||(transition_in(io),transition_in(ao),transition_in(so),transition_in(lo),oo=!0)},o(co){transition_out(io),transition_out(ao),transition_out(so),transition_out(lo),oo=!1},d(co){co&&(detach(ue),detach(eo),detach(no),detach(ro)),io&&io.d(co),ao&&ao.d(co),so&&so.d(co),lo&&lo.d(co)}}}function create_fragment$8P(to){let ue,eo,no,ro,oo,io={align:"left-outside",anchor:to[7],minWidth:0,maxWidth:480,maxHeight:480,dismissible:!1,$$slots:{default:[create_default_slot_1$3_]},$$scope:{ctx:to}};return ue=new Popover({props:io}),to[25](ue),ue.$on("mouseenter",to[16]),ue.$on("mouseleave",to[15]),ro=new Layout$n({props:{noPadding:!0,gap:"S",$$slots:{default:[create_default_slot$5F]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment),eo=space$1(),no=element("div"),create_component(ro.$$.fragment),attr(no,"class","binding-side-panel svelte-jofp16")},m(ao,so){mount_component(ue,ao,so),insert$1(ao,eo,so),insert$1(ao,no,so),mount_component(ro,no,null),oo=!0},p(ao,so){const lo={};so[0]&128&&(lo.anchor=ao[7]),so[0]&256|so[1]&262144&&(lo.$$scope={dirty:so,ctx:ao}),ue.$set(lo);const co={};so[0]&7743|so[1]&262144&&(co.$$scope={dirty:so,ctx:ao}),ro.$set(co)},i(ao){oo||(transition_in(ue.$$.fragment,ao),transition_in(ro.$$.fragment,ao),oo=!0)},o(ao){transition_out(ue.$$.fragment,ao),transition_out(ro.$$.fragment,ao),oo=!1},d(ao){ao&&(detach(eo),detach(no)),to[25](null),destroy_component(ue,ao),destroy_component(ro)}}}function instance$8P(to,ue,eo){let no,ro,oo,io,ao,so,lo,{addHelper:co}=ue,{addBinding:uo}=ue,{bindings:fo}=ue,{mode:po}=ue,{allowHelpers:ho}=ue,{context:_o=null}=ue,go="",bo=!1,vo,yo,wo,ko=handlebarsCompletions(),So,Ao;const Io=(ea,na)=>{let Jo=ea.example||"";return na&&(Jo=convertToJS(Jo).split(`
|
|
850
|
-
`)[0].split("= ")[1],Jo==="null;"&&(Jo="")),Jo||""},Eo=ea=>{let na=[...ea.map(Jo=>Jo[0])];return ho&&na.push("Helpers"),na},Ro=(ea,na)=>{!_o||!ea.value||ea.value===""||(Fo(),eo(7,yo=na),eo(8,wo={helper:!1,code:ea.valueHTML}),vo.show())},zo=(ea,na)=>{Fo(),!(!ea.displayText&&ea.description)&&(eo(7,yo=na),eo(8,wo={helper:!0,description:ea.description,code:Io(ea,po.name==="javascript")}),vo.show())},No=()=>{Ao=setTimeout(()=>{vo.hide(),eo(7,yo=null),eo(8,wo=null),Ao=null},100)},Fo=()=>{Ao&&(clearTimeout(Ao),Ao=null)},Po=async()=>{eo(5,bo=!0),eo(3,go="")},To=ea=>{ea.stopPropagation(),eo(5,bo=!1),eo(3,go="")};function Lo(ea){binding_callbacks[ea?"unshift":"push"](()=>{vo=ea,eo(6,vo)})}const qo=()=>eo(4,So=null);function Uo(ea){go=ea,eo(3,go)}const jo=ea=>{eo(4,So=ea)},Zo=(ea,na)=>Ro(ea,na.target),Xo=ea=>uo(ea),Qo=(ea,na)=>zo(ea,na.target),Ko=ea=>co(ea,po.name==="javascript");return to.$$set=ea=>{"addHelper"in ea&&eo(0,co=ea.addHelper),"addBinding"in ea&&eo(1,uo=ea.addBinding),"bindings"in ea&&eo(19,fo=ea.bindings),"mode"in ea&&eo(2,po=ea.mode),"allowHelpers"in ea&&eo(20,ho=ea.allowHelpers),"context"in ea&&eo(21,_o=ea.context)},to.$$.update=()=>{to.$$.dirty[0]&524288&&eo(24,no=fo==null?void 0:fo.reduce((ea,na)=>(na.icon&&(ea[na.category]=ea[na.category]||na.icon),ea),{})),to.$$.dirty[0]&16777216&&eo(12,ro={...no,Helpers:"MagicWand"}),to.$$.dirty[0]&524288&&eo(23,oo=Object.entries(groupBy$1("category",fo))),to.$$.dirty[0]&8388608&&eo(11,io=Eo(oo)),to.$$.dirty[0]&8&&eo(22,ao=new RegExp(go,"ig")),to.$$.dirty[0]&12582936&&eo(10,so=oo.map(([ea,na])=>({name:ea,bindings:na==null?void 0:na.filter(Jo=>!go||Jo.readableBinding.match(ao))})).filter(ea=>{var na;return((na=ea.bindings)==null?void 0:na.length)>0&&(So?So===ea.name:!0)})),to.$$.dirty[0]&4194316&&eo(9,lo=ko==null?void 0:ko.filter(ea=>(!go||ea.label.match(ao)||ea.description.match(ao))&&(po.name!=="javascript"||ea.allowsJs)))},[co,uo,po,go,So,bo,vo,yo,wo,lo,so,io,ro,Ro,zo,No,Fo,Po,To,fo,ho,_o,ao,oo,no,Lo,qo,Uo,jo,Zo,Xo,Qo,Ko]}class BindingSidePanel extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8P,create_fragment$8P,safe_not_equal,{addHelper:0,addBinding:1,bindings:19,mode:2,allowHelpers:20,context:21},null,[-1,-1])}}var jsonFormatHighlight={exports:{}};(function(to,ue){(function(eo,no){to.exports=no()})(commonjsGlobal$1,function(){var eo={keyColor:"dimgray",numberColor:"lightskyblue",stringColor:"lightcoral",trueColor:"lightseagreen",falseColor:"#f66578",nullColor:"cornflowerblue"},no={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="};function ro(io){return String(io).replace(/[&<>"'`=]/g,function(ao){return no[ao]})}function oo(io,ao){ao===void 0&&(ao={});var so=typeof io;so!=="string"&&(io=JSON.stringify(io,null,2)||so);var lo=Object.assign({},eo,ao);return io=io.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),io.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+]?\d+)?)/g,function(co){var uo=lo.numberColor,fo="";return/^"/.test(co)?/:$/.test(co)?uo=lo.keyColor:(uo=lo.stringColor,co='"'+ro(co.substr(1,co.length-2))+'"',fo="word-wrap:break-word;white-space:pre-wrap;"):uo=/true/.test(co)?lo.trueColor:/false/.test(co)?lo.falseColor:/null/.test(co)?lo.nullColor:uo,'<span style="'+fo+"color:"+uo+'">'+co+"</span>"})}return oo})})(jsonFormatHighlight);var jsonFormatHighlightExports=jsonFormatHighlight.exports;const formatHighlight=getDefaultExportFromCjs$1(jsonFormatHighlightExports),EvaluationSidePanel_svelte_svelte_type_style_lang="";function create_else_block_1$o(to){let ue,eo,no,ro,oo,io,ao,so=to[1]&&create_if_block_5$v(),lo=!to[2]&&create_if_block_4$H(to);return{c(){ue=element("div"),ue.textContent="Preview",eo=space$1(),so&&so.c(),no=space$1(),ro=element("span"),oo=space$1(),lo&&lo.c(),io=empty$3(),attr(ro,"class","svelte-1mm33o7")},m(co,uo){insert$1(co,ue,uo),insert$1(co,eo,uo),so&&so.m(co,uo),insert$1(co,no,uo),insert$1(co,ro,uo),insert$1(co,oo,uo),lo&&lo.m(co,uo),insert$1(co,io,uo),ao=!0},p(co,uo){co[1]?so?uo&2&&transition_in(so,1):(so=create_if_block_5$v(),so.c(),transition_in(so,1),so.m(no.parentNode,no)):so&&(group_outros(),transition_out(so,1,1,()=>{so=null}),check_outros()),co[2]?lo&&(group_outros(),transition_out(lo,1,1,()=>{lo=null}),check_outros()):lo?(lo.p(co,uo),uo&4&&transition_in(lo,1)):(lo=create_if_block_4$H(co),lo.c(),transition_in(lo,1),lo.m(io.parentNode,io))},i(co){ao||(transition_in(so),transition_in(lo),ao=!0)},o(co){transition_out(so),transition_out(lo),ao=!1},d(co){co&&(detach(ue),detach(eo),detach(no),detach(ro),detach(oo),detach(io)),so&&so.d(co),lo&&lo.d(co)}}}function create_if_block_2$1k(to){let ue,eo,no,ro,oo,io,ao,so,lo;ue=new Icon({props:{name:"Alert",color:"var(--spectrum-global-color-red-600)"}});let co=to[1]&&create_if_block_3$Y();return so=new Icon({props:{name:"Copy",size:"S",hoverable:!0}}),so.$on("click",to[7]),{c(){create_component(ue.$$.fragment),eo=space$1(),no=element("div"),no.textContent="Error",ro=space$1(),co&&co.c(),oo=space$1(),io=element("span"),ao=space$1(),create_component(so.$$.fragment),attr(io,"class","svelte-1mm33o7")},m(uo,fo){mount_component(ue,uo,fo),insert$1(uo,eo,fo),insert$1(uo,no,fo),insert$1(uo,ro,fo),co&&co.m(uo,fo),insert$1(uo,oo,fo),insert$1(uo,io,fo),insert$1(uo,ao,fo),mount_component(so,uo,fo),lo=!0},p(uo,fo){uo[1]?co?fo&2&&transition_in(co,1):(co=create_if_block_3$Y(),co.c(),transition_in(co,1),co.m(oo.parentNode,oo)):co&&(group_outros(),transition_out(co,1,1,()=>{co=null}),check_outros())},i(uo){lo||(transition_in(ue.$$.fragment,uo),transition_in(co),transition_in(so.$$.fragment,uo),lo=!0)},o(uo){transition_out(ue.$$.fragment,uo),transition_out(co),transition_out(so.$$.fragment,uo),lo=!1},d(uo){uo&&(detach(eo),detach(no),detach(ro),detach(oo),detach(io),detach(ao)),destroy_component(ue,uo),co&&co.d(uo),destroy_component(so,uo)}}}function create_if_block_5$v(to){let ue,eo,no,ro;return eo=new ProgressCircle({props:{size:"S"}}),{c(){ue=element("div"),create_component(eo.$$.fragment)},m(oo,io){insert$1(oo,ue,io),mount_component(eo,ue,null),ro=!0},i(oo){ro||(transition_in(eo.$$.fragment,oo),oo&&add_render_callback(()=>{ro&&(no||(no=create_bidirectional_transition(ue,fade,{duration:130},!0)),no.run(1))}),ro=!0)},o(oo){transition_out(eo.$$.fragment,oo),oo&&(no||(no=create_bidirectional_transition(ue,fade,{duration:130},!1)),no.run(0)),ro=!1},d(oo){oo&&detach(ue),destroy_component(eo),oo&&no&&no.end()}}}function create_if_block_4$H(to){let ue,eo;return ue=new Icon({props:{name:"Copy",newStyles:!0,size:"S",hoverable:!0}}),ue.$on("click",to[7]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p:noop$6,i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block_3$Y(to){let ue,eo,no,ro;return eo=new ProgressCircle({props:{size:"S"}}),{c(){ue=element("div"),create_component(eo.$$.fragment)},m(oo,io){insert$1(oo,ue,io),mount_component(eo,ue,null),ro=!0},i(oo){ro||(transition_in(eo.$$.fragment,oo),oo&&add_render_callback(()=>{ro&&(no||(no=create_bidirectional_transition(ue,fade,{duration:130},!0)),no.run(1))}),ro=!0)},o(oo){transition_out(eo.$$.fragment,oo),oo&&(no||(no=create_bidirectional_transition(ue,fade,{duration:130},!1)),no.run(0)),ro=!1},d(oo){oo&&detach(ue),destroy_component(eo),oo&&no&&no.end()}}}function create_else_block$1B(to){let ue,eo;return{c(){ue=new HtmlTag(!1),eo=empty$3(),ue.a=eo},m(no,ro){ue.m(to[4],no,ro),insert$1(no,eo,ro)},p(no,ro){ro&16&&ue.p(no[4])},d(no){no&&(detach(eo),ue.d())}}}function create_if_block_1$2b(to){let ue=to[6](to[0])+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro&1&&ue!==(ue=no[6](no[0])+"")&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_if_block$46(to){let ue;return{c(){ue=text("Your expression will be evaluated here")},m(eo,no){insert$1(eo,ue,no)},p:noop$6,d(eo){eo&&detach(ue)}}}function create_fragment$8O(to){let ue,eo,no,ro,oo,io,ao,so;const lo=[create_if_block_2$1k,create_else_block_1$o],co=[];function uo(_o,go){return _o[3]?0:1}ro=uo(to),oo=co[ro]=lo[ro](to);function fo(_o,go){return _o[2]?create_if_block$46:_o[3]?create_if_block_1$2b:create_else_block$1B}let po=fo(to),ho=po(to);return{c(){ue=element("div"),eo=element("div"),no=element("div"),oo.c(),io=space$1(),ao=element("div"),ho.c(),attr(no,"class","header-content svelte-1mm33o7"),attr(eo,"class","header svelte-1mm33o7"),toggle_class(eo,"success",to[5]),toggle_class(eo,"error",to[3]),attr(ao,"class","body svelte-1mm33o7"),attr(ue,"class","evaluation-side-panel svelte-1mm33o7")},m(_o,go){insert$1(_o,ue,go),append$2(ue,eo),append$2(eo,no),co[ro].m(no,null),append$2(ue,io),append$2(ue,ao),ho.m(ao,null),so=!0},p(_o,[go]){let bo=ro;ro=uo(_o),ro===bo?co[ro].p(_o,go):(group_outros(),transition_out(co[bo],1,1,()=>{co[bo]=null}),check_outros(),oo=co[ro],oo?oo.p(_o,go):(oo=co[ro]=lo[ro](_o),oo.c()),transition_in(oo,1),oo.m(no,null)),(!so||go&32)&&toggle_class(eo,"success",_o[5]),(!so||go&8)&&toggle_class(eo,"error",_o[3]),po===(po=fo(_o))&&ho?ho.p(_o,go):(ho.d(1),ho=po(_o),ho&&(ho.c(),ho.m(ao,null)))},i(_o){so||(transition_in(oo),so=!0)},o(_o){transition_out(oo),so=!1},d(_o){_o&&detach(ue),co[ro].d(),ho.d()}}}function instance$8O(to,ue,eo){let no,ro,oo,io,{expressionResult:ao}=ue,{expressionError:so}=ue,{evaluating:lo=!1}=ue,{expression:co=null}=ue;const uo=ho=>ho.code===UserScriptError.code?ho.userScriptError.toString():ho.toString(),fo=ho=>{if(ho==null)return"";try{ho=JSON.stringify(JSON.parse(ho),null,2)}catch{}return formatHighlight(ho,{keyColor:"#e06c75",numberColor:"#e5c07b",stringColor:"#98c379",trueColor:"#d19a66",falseColor:"#d19a66",nullColor:"#c678dd"})},po=()=>{let ho=ao.result;typeof ho=="object"&&(ho=JSON.stringify(ho,null,2)),copyToClipboard(ho),notifications.success("Value copied to clipboard")};return to.$$set=ho=>{"expressionResult"in ho&&eo(8,ao=ho.expressionResult),"expressionError"in ho&&eo(0,so=ho.expressionError),"evaluating"in ho&&eo(1,lo=ho.evaluating),"expression"in ho&&eo(9,co=ho.expression)},to.$$.update=()=>{to.$$.dirty&1&&eo(3,no=so!=null),to.$$.dirty&512&&eo(2,ro=co==null||(co==null?void 0:co.trim())===""),to.$$.dirty&12&&eo(5,oo=!no&&!ro),to.$$.dirty&256&&eo(4,io=fo(ao))},[so,lo,ro,no,io,oo,uo,po,ao,co]}class EvaluationSidePanel extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8O,create_fragment$8O,safe_not_equal,{expressionResult:8,expressionError:0,evaluating:1,expression:9})}}const SnippetDrawer_svelte_svelte_type_style_lang="";function create_else_block$1A(to){let ue,eo,no,ro,oo,io,ao;function so(uo){to[15](uo)}let lo={};to[1]!==void 0&&(lo.value=to[1]),ro=new Input$5({props:lo}),binding_callbacks.push(()=>bind$2(ro,"value",so));let co=to[6]&&create_if_block_2$1j(to);return{c(){ue=element("div"),eo=element("span"),eo.textContent="Name",no=space$1(),create_component(ro.$$.fragment),io=space$1(),co&&co.c(),attr(ue,"class","name svelte-8n6wau"),toggle_class(ue,"invalid",to[6]!=null)},m(uo,fo){insert$1(uo,ue,fo),append$2(ue,eo),append$2(ue,no),mount_component(ro,ue,null),append$2(ue,io),co&&co.m(ue,null),ao=!0},p(uo,fo){const po={};!oo&&fo&2&&(oo=!0,po.value=uo[1],add_flush_callback(()=>oo=!1)),ro.$set(po),uo[6]?co?(co.p(uo,fo),fo&64&&transition_in(co,1)):(co=create_if_block_2$1j(uo),co.c(),transition_in(co,1),co.m(ue,null)):co&&(group_outros(),transition_out(co,1,1,()=>{co=null}),check_outros()),(!ao||fo&64)&&toggle_class(ue,"invalid",uo[6]!=null)},i(uo){ao||(transition_in(ro.$$.fragment,uo),transition_in(co),ao=!0)},o(uo){transition_out(ro.$$.fragment,uo),transition_out(co),ao=!1},d(uo){uo&&detach(ue),destroy_component(ro),co&&co.d()}}}function create_if_block_1$2a(to){let ue=to[0].name+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro&1&&ue!==(ue=no[0].name+"")&&set_data(eo,ue)},i:noop$6,o:noop$6,d(no){no&&detach(eo)}}}function create_if_block_2$1j(to){let ue,eo;return ue=new AbsTooltip({props:{text:to[6],type:TooltipType.Negative,$$slots:{default:[create_default_slot_2$2R]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&64&&(oo.text=no[6]),ro&1048576&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_2$2R(to){let ue,eo;return ue=new Icon({props:{name:"Help",size:"S",color:"var(--spectrum-global-color-red-400)"}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p:noop$6,i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_title_slot(to){let ue,eo,no,ro;const oo=[create_if_block_1$2a,create_else_block$1A],io=[];function ao(so,lo){return so[0]?0:1}return ue=ao(to),eo=io[ue]=oo[ue](to),{c(){eo.c(),no=empty$3()},m(so,lo){io[ue].m(so,lo),insert$1(so,no,lo),ro=!0},p(so,lo){let co=ue;ue=ao(so),ue===co?io[ue].p(so,lo):(group_outros(),transition_out(io[co],1,1,()=>{io[co]=null}),check_outros(),eo=io[ue],eo?eo.p(so,lo):(eo=io[ue]=oo[ue](so),eo.c()),transition_in(eo,1),eo.m(no.parentNode,no))},i(so){ro||(transition_in(eo),ro=!0)},o(so){transition_out(eo),ro=!1},d(so){so&&detach(no),io[ue].d(so)}}}function create_if_block$45(to){let ue,eo;return ue=new Button({props:{warning:!0,disabled:to[4],$$slots:{default:[create_default_slot_1$3Z]},$$scope:{ctx:to}}}),ue.$on("click",function(){is_function(to[5].show)&&to[5].show.apply(this,arguments)}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){to=no;const oo={};ro&16&&(oo.disabled=to[4]),ro&1048576&&(oo.$$scope={dirty:ro,ctx:to}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_1$3Z(to){let ue;return{c(){ue=text("Delete")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_default_slot$5E(to){let ue;return{c(){ue=text("Save")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_buttons_slot$h(to){let ue,eo,no,ro=to[0]&&create_if_block$45(to);return eo=new Button({props:{cta:!0,disabled:!to[0]&&(to[4]||to[6]),$$slots:{default:[create_default_slot$5E]},$$scope:{ctx:to}}}),eo.$on("click",to[8]),{c(){ro&&ro.c(),ue=space$1(),create_component(eo.$$.fragment)},m(oo,io){ro&&ro.m(oo,io),insert$1(oo,ue,io),mount_component(eo,oo,io),no=!0},p(oo,io){oo[0]?ro?(ro.p(oo,io),io&1&&transition_in(ro,1)):(ro=create_if_block$45(oo),ro.c(),transition_in(ro,1),ro.m(ue.parentNode,ue)):ro&&(group_outros(),transition_out(ro,1,1,()=>{ro=null}),check_outros());const ao={};io&81&&(ao.disabled=!oo[0]&&(oo[4]||oo[6])),io&1048576&&(ao.$$scope={dirty:io,ctx:oo}),eo.$set(ao)},i(oo){no||(transition_in(ro),transition_in(eo.$$.fragment,oo),no=!0)},o(oo){transition_out(ro),transition_out(eo.$$.fragment,oo),no=!1},d(oo){oo&&detach(ue),ro&&ro.d(oo),destroy_component(eo,oo)}}}function create_tabs_slot(to){let ue,eo,no;return eo=new Input$5({props:{placeholder:"Name"}}),{c(){ue=element("div"),create_component(eo.$$.fragment),attr(ue,"slot","tabs")},m(ro,oo){insert$1(ro,ue,oo),mount_component(eo,ue,null),no=!0},p:noop$6,i(ro){no||(transition_in(eo.$$.fragment,ro),no=!0)},o(ro){transition_out(eo.$$.fragment,ro),no=!1},d(ro){ro&&detach(ue),destroy_component(eo)}}}function create_key_block$i(to){let ue,eo;return ue=new BindingPanel({props:{allowHBS:!1,allowJS:!0,allowSnippets:!1,showTabBar:!1,placeholder:"return function(input) ❴ ... ❵",value:to[2],$$slots:{tabs:[create_tabs_slot]},$$scope:{ctx:to}}}),ue.$on("change",to[14]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&4&&(oo.value=no[2]),ro&1048576&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_body_slot$g(to){let ue=to[7],eo,no,ro=create_key_block$i(to);return{c(){ro.c(),eo=empty$3()},m(oo,io){ro.m(oo,io),insert$1(oo,eo,io),no=!0},p(oo,io){io&128&&safe_not_equal(ue,ue=oo[7])?(group_outros(),transition_out(ro,1,1,noop$6),check_outros(),ro=create_key_block$i(oo),ro.c(),transition_in(ro,1),ro.m(eo.parentNode,eo)):ro.p(oo,io)},i(oo){no||(transition_in(ro),no=!0)},o(oo){transition_out(ro),no=!1},d(oo){oo&&detach(eo),ro.d(oo)}}}function create_fragment$8N(to){var ao;let ue,eo,no,ro,oo={$$slots:{body:[create_body_slot$g],buttons:[create_buttons_slot$h],title:[create_title_slot]},$$scope:{ctx:to}};ue=new Drawer({props:oo}),to[16](ue);let io={title:"Delete snippet",body:`Are you sure you want to delete ${(ao=to[0])==null?void 0:ao.name}?`,onOk:to[9]};return no=new ConfirmDialog({props:io}),to[17](no),{c(){create_component(ue.$$.fragment),eo=space$1(),create_component(no.$$.fragment)},m(so,lo){mount_component(ue,so,lo),insert$1(so,eo,lo),mount_component(no,so,lo),ro=!0},p(so,[lo]){var fo;const co={};lo&1048823&&(co.$$scope={dirty:lo,ctx:so}),ue.$set(co);const uo={};lo&1&&(uo.body=`Are you sure you want to delete ${(fo=so[0])==null?void 0:fo.name}?`),no.$set(uo)},i(so){ro||(transition_in(ue.$$.fragment,so),transition_in(no.$$.fragment,so),ro=!0)},o(so){transition_out(ue.$$.fragment,so),transition_out(no.$$.fragment,so),ro=!1},d(so){so&&detach(eo),to[16](null),destroy_component(ue,so),to[17](null),destroy_component(no,so)}}}const firstCharNumberRegex=/^[0-9].*$/;function instance$8N(to,ue,eo){let no,ro,oo,io,ao;component_subscribe(to,snippets$1,Ao=>eo(13,ao=Ao));let{snippet:so}=ue;const lo=()=>uo.show(),co=()=>uo.hide();let uo,fo="",po="",ho=!1,_o;const go=async()=>{eo(4,ho=!0);try{const Ao={name:fo,code:oo};await snippets$1.saveSnippet(Ao),uo.hide(),notifications.success(`Snippet ${Ao.name} saved`)}catch(Ao){notifications.error(Ao.message||"Error saving snippet")}eo(4,ho=!1)},bo=async()=>{eo(4,ho=!0);try{await snippets$1.deleteSnippet(so.name),uo.hide()}catch{notifications.error("Error deleting snippet")}eo(4,ho=!1)},vo=(Ao,Io)=>Ao!=null&&Ao.length?Io.some(Eo=>Eo.name===Ao)?"That name is already in use":firstCharNumberRegex.test(Ao)?"Can't start with a number":ValidSnippetNameRegex.test(Ao)?null:"No special characters or spaces":"Name is required",yo=Ao=>eo(2,po=Ao.detail);function wo(Ao){fo=Ao,eo(1,fo),eo(0,so),eo(12,no),eo(13,ao)}function ko(Ao){binding_callbacks[Ao?"unshift":"push"](()=>{uo=Ao,eo(3,uo)})}function So(Ao){binding_callbacks[Ao?"unshift":"push"](()=>{_o=Ao,eo(5,_o)})}return to.$$set=Ao=>{"snippet"in Ao&&eo(0,so=Ao.snippet)},to.$$.update=()=>{to.$$.dirty&8192&&eo(12,no=getSequentialName(ao,"MySnippet",Ao=>Ao.name)),to.$$.dirty&1&&eo(7,ro=so==null?void 0:so.name),to.$$.dirty&4097&&eo(1,fo=(so==null?void 0:so.name)||no),to.$$.dirty&1&&eo(2,po=so!=null&&so.code?encodeJSBinding(so.code):""),to.$$.dirty&4&&(oo=decodeJSBinding(po)),to.$$.dirty&8194&&eo(6,io=vo(fo,ao))},[so,fo,po,uo,ho,_o,io,ro,go,bo,lo,co,no,ao,yo,wo,ko,So]}class SnippetDrawer extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8N,create_fragment$8N,safe_not_equal,{snippet:0,show:10,hide:11})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[11]}}function create_if_block$44(to){let ue,eo,no,ro,oo;const io=[create_if_block_1$29,create_if_block_2$1i],ao=[];function so(lo,co){var uo,fo;return co&6&&(ue=null),lo[1].cloud&&((fo=(uo=lo[2])==null?void 0:uo.user)!=null&&fo.accountPortalAccess)?0:(ue==null&&(ue=!!(!lo[1].cloud&&isAdmin(lo[2].user))),ue?1:-1)}return~(eo=so(to,-1))&&(no=ao[eo]=io[eo](to)),{c(){no&&no.c(),ro=empty$3()},m(lo,co){~eo&&ao[eo].m(lo,co),insert$1(lo,ro,co),oo=!0},p(lo,co){let uo=eo;eo=so(lo,co),eo===uo?~eo&&ao[eo].p(lo,co):(no&&(group_outros(),transition_out(ao[uo],1,1,()=>{ao[uo]=null}),check_outros()),~eo?(no=ao[eo],no?no.p(lo,co):(no=ao[eo]=io[eo](lo),no.c()),transition_in(no,1),no.m(ro.parentNode,ro)):no=null)},i(lo){oo||(transition_in(no),oo=!0)},o(lo){transition_out(no),oo=!1},d(lo){lo&&detach(ro),~eo&&ao[eo].d(lo)}}}function create_if_block_2$1i(to){let ue,eo;return ue=new Button({props:{cta:!0,size:"M",$$slots:{default:[create_default_slot_1$3Y]},$$scope:{ctx:to}}}),ue.$on("click",to[6]),ue.$on("click",to[7]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&256&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block_1$29(to){let ue,eo;return ue=new Button({props:{cta:!0,size:"M",$$slots:{default:[create_default_slot$5D]},$$scope:{ctx:to}}}),ue.$on("click",to[4]),ue.$on("click",to[5]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&256&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_1$3Y(to){let ue;return{c(){ue=text("Upgrade")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_default_slot$5D(to){let ue;return{c(){ue=text("Upgrade")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_fragment$8M(to){let ue,eo,no=!to[0].isEnterprisePlan&&!to[0].isEnterpriseTrial&&create_if_block$44(to);return{c(){no&&no.c(),ue=empty$3()},m(ro,oo){no&&no.m(ro,oo),insert$1(ro,ue,oo),eo=!0},p(ro,[oo]){!ro[0].isEnterprisePlan&&!ro[0].isEnterpriseTrial?no?(no.p(ro,oo),oo&1&&transition_in(no,1)):(no=create_if_block$44(ro),no.c(),transition_in(no,1),no.m(ue.parentNode,ue)):no&&(group_outros(),transition_out(no,1,1,()=>{no=null}),check_outros())},i(ro){eo||(transition_in(no),eo=!0)},o(ro){transition_out(no),eo=!1},d(ro){ro&&detach(ue),no&&no.d(ro)}}}function instance$8M(to,ue,eo){let no,ro,oo,io;component_subscribe(to,licensing,uo=>eo(0,no=uo)),component_subscribe(to,admin,uo=>eo(1,ro=uo)),component_subscribe(to,auth,uo=>eo(2,oo=uo)),component_subscribe(to,goto,uo=>eo(3,io=uo));function ao(uo){bubble.call(this,to,uo)}const so=()=>{window.open(ro.accountPortalUrl+"/portal/upgrade","_blank")},lo=()=>io("/builder/portal/account/upgrade");function co(uo){bubble.call(this,to,uo)}return[no,ro,oo,io,ao,so,lo,co]}class UpgradeButton extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8M,create_fragment$8M,safe_not_equal,{})}}const SnippetSidePanel_svelte_svelte_type_style_lang="";function get_each_context$1G(to,ue,eo){const no=to.slice();return no[27]=ue[eo],no}function create_else_block_3$2(to){let ue,eo,no,ro;return no=new Tags({props:{$$slots:{default:[create_default_slot_4$1E]},$$scope:{ctx:to}}}),{c(){ue=element("div"),eo=text(`Snippets
|
|
850
|
+
`)[0].split("= ")[1],Jo==="null;"&&(Jo="")),Jo||""},Eo=ea=>{let na=[...ea.map(Jo=>Jo[0])];return ho&&na.push("Helpers"),na},Ro=(ea,na)=>{!_o||!ea.value||ea.value===""||(Fo(),eo(7,yo=na),eo(8,wo={helper:!1,code:ea.valueHTML}),vo.show())},zo=(ea,na)=>{Fo(),!(!ea.displayText&&ea.description)&&(eo(7,yo=na),eo(8,wo={helper:!0,description:ea.description,code:Io(ea,po.name==="javascript")}),vo.show())},No=()=>{Ao=setTimeout(()=>{vo.hide(),eo(7,yo=null),eo(8,wo=null),Ao=null},100)},Fo=()=>{Ao&&(clearTimeout(Ao),Ao=null)},Po=async()=>{eo(5,bo=!0),eo(3,go="")},To=ea=>{ea.stopPropagation(),eo(5,bo=!1),eo(3,go="")};function Lo(ea){binding_callbacks[ea?"unshift":"push"](()=>{vo=ea,eo(6,vo)})}const qo=()=>eo(4,So=null);function Uo(ea){go=ea,eo(3,go)}const jo=ea=>{eo(4,So=ea)},Zo=(ea,na)=>Ro(ea,na.target),Xo=ea=>uo(ea),Qo=(ea,na)=>zo(ea,na.target),Ko=ea=>co(ea,po.name==="javascript");return to.$$set=ea=>{"addHelper"in ea&&eo(0,co=ea.addHelper),"addBinding"in ea&&eo(1,uo=ea.addBinding),"bindings"in ea&&eo(19,fo=ea.bindings),"mode"in ea&&eo(2,po=ea.mode),"allowHelpers"in ea&&eo(20,ho=ea.allowHelpers),"context"in ea&&eo(21,_o=ea.context)},to.$$.update=()=>{to.$$.dirty[0]&524288&&eo(24,no=fo==null?void 0:fo.reduce((ea,na)=>(na.icon&&(ea[na.category]=ea[na.category]||na.icon),ea),{})),to.$$.dirty[0]&16777216&&eo(12,ro={...no,Helpers:"MagicWand"}),to.$$.dirty[0]&524288&&eo(23,oo=Object.entries(groupBy$1("category",fo))),to.$$.dirty[0]&8388608&&eo(11,io=Eo(oo)),to.$$.dirty[0]&8&&eo(22,ao=new RegExp(go,"ig")),to.$$.dirty[0]&12582936&&eo(10,so=oo.map(([ea,na])=>({name:ea,bindings:na==null?void 0:na.filter(Jo=>!go||Jo.readableBinding.match(ao))})).filter(ea=>{var na;return((na=ea.bindings)==null?void 0:na.length)>0&&(So?So===ea.name:!0)})),to.$$.dirty[0]&4194316&&eo(9,lo=ko==null?void 0:ko.filter(ea=>(!go||ea.label.match(ao)||ea.description.match(ao))&&(po.name!=="javascript"||ea.allowsJs)))},[co,uo,po,go,So,bo,vo,yo,wo,lo,so,io,ro,Ro,zo,No,Fo,Po,To,fo,ho,_o,ao,oo,no,Lo,qo,Uo,jo,Zo,Xo,Qo,Ko]}class BindingSidePanel extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8P,create_fragment$8P,safe_not_equal,{addHelper:0,addBinding:1,bindings:19,mode:2,allowHelpers:20,context:21},null,[-1,-1])}}var jsonFormatHighlight={exports:{}};(function(to,ue){(function(eo,no){to.exports=no()})(commonjsGlobal$1,function(){var eo={keyColor:"dimgray",numberColor:"lightskyblue",stringColor:"lightcoral",trueColor:"lightseagreen",falseColor:"#f66578",nullColor:"cornflowerblue"},no={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="};function ro(io){return String(io).replace(/[&<>"'`=]/g,function(ao){return no[ao]})}function oo(io,ao){ao===void 0&&(ao={});var so=typeof io;so!=="string"&&(io=JSON.stringify(io,null,2)||so);var lo=Object.assign({},eo,ao);return io=io.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),io.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+]?\d+)?)/g,function(co){var uo=lo.numberColor,fo="";return/^"/.test(co)?/:$/.test(co)?uo=lo.keyColor:(uo=lo.stringColor,co='"'+ro(co.substr(1,co.length-2))+'"',fo="word-wrap:break-word;white-space:pre-wrap;"):uo=/true/.test(co)?lo.trueColor:/false/.test(co)?lo.falseColor:/null/.test(co)?lo.nullColor:uo,'<span style="'+fo+"color:"+uo+'">'+co+"</span>"})}return oo})})(jsonFormatHighlight);var jsonFormatHighlightExports=jsonFormatHighlight.exports;const formatHighlight=getDefaultExportFromCjs$1(jsonFormatHighlightExports),EvaluationSidePanel_svelte_svelte_type_style_lang="";function create_else_block_1$o(to){let ue,eo,no,ro,oo,io,ao,so=to[1]&&create_if_block_5$v(),lo=!to[2]&&create_if_block_4$H(to);return{c(){ue=element("div"),ue.textContent="Preview",eo=space$1(),so&&so.c(),no=space$1(),ro=element("span"),oo=space$1(),lo&&lo.c(),io=empty$3(),attr(ro,"class","svelte-1mm33o7")},m(co,uo){insert$1(co,ue,uo),insert$1(co,eo,uo),so&&so.m(co,uo),insert$1(co,no,uo),insert$1(co,ro,uo),insert$1(co,oo,uo),lo&&lo.m(co,uo),insert$1(co,io,uo),ao=!0},p(co,uo){co[1]?so?uo&2&&transition_in(so,1):(so=create_if_block_5$v(),so.c(),transition_in(so,1),so.m(no.parentNode,no)):so&&(group_outros(),transition_out(so,1,1,()=>{so=null}),check_outros()),co[2]?lo&&(group_outros(),transition_out(lo,1,1,()=>{lo=null}),check_outros()):lo?(lo.p(co,uo),uo&4&&transition_in(lo,1)):(lo=create_if_block_4$H(co),lo.c(),transition_in(lo,1),lo.m(io.parentNode,io))},i(co){ao||(transition_in(so),transition_in(lo),ao=!0)},o(co){transition_out(so),transition_out(lo),ao=!1},d(co){co&&(detach(ue),detach(eo),detach(no),detach(ro),detach(oo),detach(io)),so&&so.d(co),lo&&lo.d(co)}}}function create_if_block_2$1k(to){let ue,eo,no,ro,oo,io,ao,so,lo;ue=new Icon({props:{name:"Alert",color:"var(--spectrum-global-color-red-600)"}});let co=to[1]&&create_if_block_3$Y();return so=new Icon({props:{name:"Copy",size:"S",hoverable:!0}}),so.$on("click",to[7]),{c(){create_component(ue.$$.fragment),eo=space$1(),no=element("div"),no.textContent="Error",ro=space$1(),co&&co.c(),oo=space$1(),io=element("span"),ao=space$1(),create_component(so.$$.fragment),attr(io,"class","svelte-1mm33o7")},m(uo,fo){mount_component(ue,uo,fo),insert$1(uo,eo,fo),insert$1(uo,no,fo),insert$1(uo,ro,fo),co&&co.m(uo,fo),insert$1(uo,oo,fo),insert$1(uo,io,fo),insert$1(uo,ao,fo),mount_component(so,uo,fo),lo=!0},p(uo,fo){uo[1]?co?fo&2&&transition_in(co,1):(co=create_if_block_3$Y(),co.c(),transition_in(co,1),co.m(oo.parentNode,oo)):co&&(group_outros(),transition_out(co,1,1,()=>{co=null}),check_outros())},i(uo){lo||(transition_in(ue.$$.fragment,uo),transition_in(co),transition_in(so.$$.fragment,uo),lo=!0)},o(uo){transition_out(ue.$$.fragment,uo),transition_out(co),transition_out(so.$$.fragment,uo),lo=!1},d(uo){uo&&(detach(eo),detach(no),detach(ro),detach(oo),detach(io),detach(ao)),destroy_component(ue,uo),co&&co.d(uo),destroy_component(so,uo)}}}function create_if_block_5$v(to){let ue,eo,no,ro;return eo=new ProgressCircle({props:{size:"S"}}),{c(){ue=element("div"),create_component(eo.$$.fragment)},m(oo,io){insert$1(oo,ue,io),mount_component(eo,ue,null),ro=!0},i(oo){ro||(transition_in(eo.$$.fragment,oo),oo&&add_render_callback(()=>{ro&&(no||(no=create_bidirectional_transition(ue,fade,{duration:130},!0)),no.run(1))}),ro=!0)},o(oo){transition_out(eo.$$.fragment,oo),oo&&(no||(no=create_bidirectional_transition(ue,fade,{duration:130},!1)),no.run(0)),ro=!1},d(oo){oo&&detach(ue),destroy_component(eo),oo&&no&&no.end()}}}function create_if_block_4$H(to){let ue,eo;return ue=new Icon({props:{name:"Copy",newStyles:!0,size:"S",hoverable:!0}}),ue.$on("click",to[7]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p:noop$6,i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block_3$Y(to){let ue,eo,no,ro;return eo=new ProgressCircle({props:{size:"S"}}),{c(){ue=element("div"),create_component(eo.$$.fragment)},m(oo,io){insert$1(oo,ue,io),mount_component(eo,ue,null),ro=!0},i(oo){ro||(transition_in(eo.$$.fragment,oo),oo&&add_render_callback(()=>{ro&&(no||(no=create_bidirectional_transition(ue,fade,{duration:130},!0)),no.run(1))}),ro=!0)},o(oo){transition_out(eo.$$.fragment,oo),oo&&(no||(no=create_bidirectional_transition(ue,fade,{duration:130},!1)),no.run(0)),ro=!1},d(oo){oo&&detach(ue),destroy_component(eo),oo&&no&&no.end()}}}function create_else_block$1B(to){let ue,eo;return{c(){ue=new HtmlTag(!1),eo=empty$3(),ue.a=eo},m(no,ro){ue.m(to[4],no,ro),insert$1(no,eo,ro)},p(no,ro){ro&16&&ue.p(no[4])},d(no){no&&(detach(eo),ue.d())}}}function create_if_block_1$2b(to){let ue=to[6](to[0])+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro&1&&ue!==(ue=no[6](no[0])+"")&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_if_block$46(to){let ue;return{c(){ue=text("Your expression will be evaluated here")},m(eo,no){insert$1(eo,ue,no)},p:noop$6,d(eo){eo&&detach(ue)}}}function create_fragment$8O(to){let ue,eo,no,ro,oo,io,ao,so;const lo=[create_if_block_2$1k,create_else_block_1$o],co=[];function uo(_o,go){return _o[3]?0:1}ro=uo(to),oo=co[ro]=lo[ro](to);function fo(_o,go){return _o[2]?create_if_block$46:_o[3]?create_if_block_1$2b:create_else_block$1B}let po=fo(to),ho=po(to);return{c(){ue=element("div"),eo=element("div"),no=element("div"),oo.c(),io=space$1(),ao=element("div"),ho.c(),attr(no,"class","header-content svelte-1mm33o7"),attr(eo,"class","header svelte-1mm33o7"),toggle_class(eo,"success",to[5]),toggle_class(eo,"error",to[3]),attr(ao,"class","body svelte-1mm33o7"),attr(ue,"class","evaluation-side-panel svelte-1mm33o7")},m(_o,go){insert$1(_o,ue,go),append$2(ue,eo),append$2(eo,no),co[ro].m(no,null),append$2(ue,io),append$2(ue,ao),ho.m(ao,null),so=!0},p(_o,[go]){let bo=ro;ro=uo(_o),ro===bo?co[ro].p(_o,go):(group_outros(),transition_out(co[bo],1,1,()=>{co[bo]=null}),check_outros(),oo=co[ro],oo?oo.p(_o,go):(oo=co[ro]=lo[ro](_o),oo.c()),transition_in(oo,1),oo.m(no,null)),(!so||go&32)&&toggle_class(eo,"success",_o[5]),(!so||go&8)&&toggle_class(eo,"error",_o[3]),po===(po=fo(_o))&&ho?ho.p(_o,go):(ho.d(1),ho=po(_o),ho&&(ho.c(),ho.m(ao,null)))},i(_o){so||(transition_in(oo),so=!0)},o(_o){transition_out(oo),so=!1},d(_o){_o&&detach(ue),co[ro].d(),ho.d()}}}function instance$8O(to,ue,eo){let no,ro,oo,io,{expressionResult:ao}=ue,{expressionError:so}=ue,{evaluating:lo=!1}=ue,{expression:co=null}=ue;const uo=ho=>ho.code===UserScriptError.code?ho.userScriptError.toString():ho.toString(),fo=ho=>{if(ho==null)return"";try{ho=JSON.stringify(JSON.parse(ho),null,2)}catch{}return formatHighlight(ho,{keyColor:"#e06c75",numberColor:"#e5c07b",stringColor:"#98c379",trueColor:"#d19a66",falseColor:"#d19a66",nullColor:"#c678dd"})},po=()=>{let ho=ao.result;typeof ho=="object"&&(ho=JSON.stringify(ho,null,2)),copyToClipboard(ho),notifications.success("Value copied to clipboard")};return to.$$set=ho=>{"expressionResult"in ho&&eo(8,ao=ho.expressionResult),"expressionError"in ho&&eo(0,so=ho.expressionError),"evaluating"in ho&&eo(1,lo=ho.evaluating),"expression"in ho&&eo(9,co=ho.expression)},to.$$.update=()=>{to.$$.dirty&1&&eo(3,no=so!=null),to.$$.dirty&512&&eo(2,ro=co==null||(co==null?void 0:co.trim())===""),to.$$.dirty&12&&eo(5,oo=!no&&!ro),to.$$.dirty&256&&eo(4,io=fo(ao))},[so,lo,ro,no,io,oo,uo,po,ao,co]}class EvaluationSidePanel extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8O,create_fragment$8O,safe_not_equal,{expressionResult:8,expressionError:0,evaluating:1,expression:9})}}const SnippetDrawer_svelte_svelte_type_style_lang="";function create_else_block$1A(to){let ue,eo,no,ro,oo,io,ao;function so(uo){to[15](uo)}let lo={};to[1]!==void 0&&(lo.value=to[1]),ro=new Input$5({props:lo}),binding_callbacks.push(()=>bind$2(ro,"value",so));let co=to[6]&&create_if_block_2$1j(to);return{c(){ue=element("div"),eo=element("span"),eo.textContent="Name",no=space$1(),create_component(ro.$$.fragment),io=space$1(),co&&co.c(),attr(ue,"class","name svelte-8n6wau"),toggle_class(ue,"invalid",to[6]!=null)},m(uo,fo){insert$1(uo,ue,fo),append$2(ue,eo),append$2(ue,no),mount_component(ro,ue,null),append$2(ue,io),co&&co.m(ue,null),ao=!0},p(uo,fo){const po={};!oo&&fo&2&&(oo=!0,po.value=uo[1],add_flush_callback(()=>oo=!1)),ro.$set(po),uo[6]?co?(co.p(uo,fo),fo&64&&transition_in(co,1)):(co=create_if_block_2$1j(uo),co.c(),transition_in(co,1),co.m(ue,null)):co&&(group_outros(),transition_out(co,1,1,()=>{co=null}),check_outros()),(!ao||fo&64)&&toggle_class(ue,"invalid",uo[6]!=null)},i(uo){ao||(transition_in(ro.$$.fragment,uo),transition_in(co),ao=!0)},o(uo){transition_out(ro.$$.fragment,uo),transition_out(co),ao=!1},d(uo){uo&&detach(ue),destroy_component(ro),co&&co.d()}}}function create_if_block_1$2a(to){let ue=to[0].name+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro&1&&ue!==(ue=no[0].name+"")&&set_data(eo,ue)},i:noop$6,o:noop$6,d(no){no&&detach(eo)}}}function create_if_block_2$1j(to){let ue,eo;return ue=new AbsTooltip({props:{text:to[6],type:TooltipType.Negative,$$slots:{default:[create_default_slot_2$2R]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&64&&(oo.text=no[6]),ro&1048576&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_2$2R(to){let ue,eo;return ue=new Icon({props:{name:"Help",size:"S",color:"var(--spectrum-global-color-red-400)"}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p:noop$6,i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_title_slot(to){let ue,eo,no,ro;const oo=[create_if_block_1$2a,create_else_block$1A],io=[];function ao(so,lo){return so[0]?0:1}return ue=ao(to),eo=io[ue]=oo[ue](to),{c(){eo.c(),no=empty$3()},m(so,lo){io[ue].m(so,lo),insert$1(so,no,lo),ro=!0},p(so,lo){let co=ue;ue=ao(so),ue===co?io[ue].p(so,lo):(group_outros(),transition_out(io[co],1,1,()=>{io[co]=null}),check_outros(),eo=io[ue],eo?eo.p(so,lo):(eo=io[ue]=oo[ue](so),eo.c()),transition_in(eo,1),eo.m(no.parentNode,no))},i(so){ro||(transition_in(eo),ro=!0)},o(so){transition_out(eo),ro=!1},d(so){so&&detach(no),io[ue].d(so)}}}function create_if_block$45(to){let ue,eo;return ue=new Button({props:{warning:!0,disabled:to[4],$$slots:{default:[create_default_slot_1$3Z]},$$scope:{ctx:to}}}),ue.$on("click",function(){is_function(to[5].show)&&to[5].show.apply(this,arguments)}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){to=no;const oo={};ro&16&&(oo.disabled=to[4]),ro&1048576&&(oo.$$scope={dirty:ro,ctx:to}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_1$3Z(to){let ue;return{c(){ue=text("Delete")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_default_slot$5E(to){let ue;return{c(){ue=text("Save")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_buttons_slot$h(to){let ue,eo,no,ro=to[0]&&create_if_block$45(to);return eo=new Button({props:{cta:!0,disabled:!to[2]||to[4]||to[6],$$slots:{default:[create_default_slot$5E]},$$scope:{ctx:to}}}),eo.$on("click",to[8]),{c(){ro&&ro.c(),ue=space$1(),create_component(eo.$$.fragment)},m(oo,io){ro&&ro.m(oo,io),insert$1(oo,ue,io),mount_component(eo,oo,io),no=!0},p(oo,io){oo[0]?ro?(ro.p(oo,io),io&1&&transition_in(ro,1)):(ro=create_if_block$45(oo),ro.c(),transition_in(ro,1),ro.m(ue.parentNode,ue)):ro&&(group_outros(),transition_out(ro,1,1,()=>{ro=null}),check_outros());const ao={};io&84&&(ao.disabled=!oo[2]||oo[4]||oo[6]),io&1048576&&(ao.$$scope={dirty:io,ctx:oo}),eo.$set(ao)},i(oo){no||(transition_in(ro),transition_in(eo.$$.fragment,oo),no=!0)},o(oo){transition_out(ro),transition_out(eo.$$.fragment,oo),no=!1},d(oo){oo&&detach(ue),ro&&ro.d(oo),destroy_component(eo,oo)}}}function create_tabs_slot(to){let ue,eo,no;return eo=new Input$5({props:{placeholder:"Name"}}),{c(){ue=element("div"),create_component(eo.$$.fragment),attr(ue,"slot","tabs")},m(ro,oo){insert$1(ro,ue,oo),mount_component(eo,ue,null),no=!0},p:noop$6,i(ro){no||(transition_in(eo.$$.fragment,ro),no=!0)},o(ro){transition_out(eo.$$.fragment,ro),no=!1},d(ro){ro&&detach(ue),destroy_component(eo)}}}function create_key_block$i(to){let ue,eo;return ue=new BindingPanel({props:{allowHBS:!1,allowJS:!0,allowSnippets:!1,showTabBar:!1,placeholder:"return function(input) ❴ ... ❵",value:to[2],$$slots:{tabs:[create_tabs_slot]},$$scope:{ctx:to}}}),ue.$on("change",to[14]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&4&&(oo.value=no[2]),ro&1048576&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_body_slot$g(to){let ue=to[7],eo,no,ro=create_key_block$i(to);return{c(){ro.c(),eo=empty$3()},m(oo,io){ro.m(oo,io),insert$1(oo,eo,io),no=!0},p(oo,io){io&128&&safe_not_equal(ue,ue=oo[7])?(group_outros(),transition_out(ro,1,1,noop$6),check_outros(),ro=create_key_block$i(oo),ro.c(),transition_in(ro,1),ro.m(eo.parentNode,eo)):ro.p(oo,io)},i(oo){no||(transition_in(ro),no=!0)},o(oo){transition_out(ro),no=!1},d(oo){oo&&detach(eo),ro.d(oo)}}}function create_fragment$8N(to){var ao;let ue,eo,no,ro,oo={$$slots:{body:[create_body_slot$g],buttons:[create_buttons_slot$h],title:[create_title_slot]},$$scope:{ctx:to}};ue=new Drawer({props:oo}),to[16](ue);let io={title:"Delete snippet",body:`Are you sure you want to delete ${(ao=to[0])==null?void 0:ao.name}?`,onOk:to[9]};return no=new ConfirmDialog({props:io}),to[17](no),{c(){create_component(ue.$$.fragment),eo=space$1(),create_component(no.$$.fragment)},m(so,lo){mount_component(ue,so,lo),insert$1(so,eo,lo),mount_component(no,so,lo),ro=!0},p(so,[lo]){var fo;const co={};lo&1048823&&(co.$$scope={dirty:lo,ctx:so}),ue.$set(co);const uo={};lo&1&&(uo.body=`Are you sure you want to delete ${(fo=so[0])==null?void 0:fo.name}?`),no.$set(uo)},i(so){ro||(transition_in(ue.$$.fragment,so),transition_in(no.$$.fragment,so),ro=!0)},o(so){transition_out(ue.$$.fragment,so),transition_out(no.$$.fragment,so),ro=!1},d(so){so&&detach(eo),to[16](null),destroy_component(ue,so),to[17](null),destroy_component(no,so)}}}const firstCharNumberRegex=/^[0-9].*$/;function instance$8N(to,ue,eo){let no,ro,oo,io,ao;component_subscribe(to,snippets$1,Ao=>eo(13,ao=Ao));let{snippet:so}=ue;const lo=()=>uo.show(),co=()=>uo.hide();let uo,fo="",po="",ho=!1,_o;const go=async()=>{eo(4,ho=!0);try{const Ao={name:fo,code:oo};await snippets$1.saveSnippet(Ao),uo.hide(),notifications.success(`Snippet ${Ao.name} saved`)}catch(Ao){notifications.error(Ao.message||"Error saving snippet")}eo(4,ho=!1)},bo=async()=>{eo(4,ho=!0);try{await snippets$1.deleteSnippet(so.name),uo.hide()}catch{notifications.error("Error deleting snippet")}eo(4,ho=!1)},vo=(Ao,Io)=>Ao!=null&&Ao.length?!(so!=null&&so.name)&&Io.some(Eo=>Eo.name===Ao)?"That name is already in use":firstCharNumberRegex.test(Ao)?"Can't start with a number":ValidSnippetNameRegex.test(Ao)?null:"No special characters or spaces":"Name is required",yo=Ao=>eo(2,po=Ao.detail);function wo(Ao){fo=Ao,eo(1,fo),eo(0,so),eo(12,no),eo(13,ao)}function ko(Ao){binding_callbacks[Ao?"unshift":"push"](()=>{uo=Ao,eo(3,uo)})}function So(Ao){binding_callbacks[Ao?"unshift":"push"](()=>{_o=Ao,eo(5,_o)})}return to.$$set=Ao=>{"snippet"in Ao&&eo(0,so=Ao.snippet)},to.$$.update=()=>{to.$$.dirty&8192&&eo(12,no=getSequentialName(ao,"MySnippet",Ao=>Ao.name)),to.$$.dirty&1&&eo(7,ro=so==null?void 0:so.name),to.$$.dirty&4097&&eo(1,fo=(so==null?void 0:so.name)||no),to.$$.dirty&1&&eo(2,po=so!=null&&so.code?encodeJSBinding(so.code):""),to.$$.dirty&4&&(oo=decodeJSBinding(po)),to.$$.dirty&8194&&eo(6,io=vo(fo,ao))},[so,fo,po,uo,ho,_o,io,ro,go,bo,lo,co,no,ao,yo,wo,ko,So]}class SnippetDrawer extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8N,create_fragment$8N,safe_not_equal,{snippet:0,show:10,hide:11})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[11]}}function create_if_block$44(to){let ue,eo,no,ro,oo;const io=[create_if_block_1$29,create_if_block_2$1i],ao=[];function so(lo,co){var uo,fo;return co&6&&(ue=null),lo[1].cloud&&((fo=(uo=lo[2])==null?void 0:uo.user)!=null&&fo.accountPortalAccess)?0:(ue==null&&(ue=!!(!lo[1].cloud&&isAdmin(lo[2].user))),ue?1:-1)}return~(eo=so(to,-1))&&(no=ao[eo]=io[eo](to)),{c(){no&&no.c(),ro=empty$3()},m(lo,co){~eo&&ao[eo].m(lo,co),insert$1(lo,ro,co),oo=!0},p(lo,co){let uo=eo;eo=so(lo,co),eo===uo?~eo&&ao[eo].p(lo,co):(no&&(group_outros(),transition_out(ao[uo],1,1,()=>{ao[uo]=null}),check_outros()),~eo?(no=ao[eo],no?no.p(lo,co):(no=ao[eo]=io[eo](lo),no.c()),transition_in(no,1),no.m(ro.parentNode,ro)):no=null)},i(lo){oo||(transition_in(no),oo=!0)},o(lo){transition_out(no),oo=!1},d(lo){lo&&detach(ro),~eo&&ao[eo].d(lo)}}}function create_if_block_2$1i(to){let ue,eo;return ue=new Button({props:{cta:!0,size:"M",$$slots:{default:[create_default_slot_1$3Y]},$$scope:{ctx:to}}}),ue.$on("click",to[6]),ue.$on("click",to[7]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&256&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block_1$29(to){let ue,eo;return ue=new Button({props:{cta:!0,size:"M",$$slots:{default:[create_default_slot$5D]},$$scope:{ctx:to}}}),ue.$on("click",to[4]),ue.$on("click",to[5]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&256&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_1$3Y(to){let ue;return{c(){ue=text("Upgrade")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_default_slot$5D(to){let ue;return{c(){ue=text("Upgrade")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_fragment$8M(to){let ue,eo,no=!to[0].isEnterprisePlan&&!to[0].isEnterpriseTrial&&create_if_block$44(to);return{c(){no&&no.c(),ue=empty$3()},m(ro,oo){no&&no.m(ro,oo),insert$1(ro,ue,oo),eo=!0},p(ro,[oo]){!ro[0].isEnterprisePlan&&!ro[0].isEnterpriseTrial?no?(no.p(ro,oo),oo&1&&transition_in(no,1)):(no=create_if_block$44(ro),no.c(),transition_in(no,1),no.m(ue.parentNode,ue)):no&&(group_outros(),transition_out(no,1,1,()=>{no=null}),check_outros())},i(ro){eo||(transition_in(no),eo=!0)},o(ro){transition_out(no),eo=!1},d(ro){ro&&detach(ue),no&&no.d(ro)}}}function instance$8M(to,ue,eo){let no,ro,oo,io;component_subscribe(to,licensing,uo=>eo(0,no=uo)),component_subscribe(to,admin,uo=>eo(1,ro=uo)),component_subscribe(to,auth,uo=>eo(2,oo=uo)),component_subscribe(to,goto,uo=>eo(3,io=uo));function ao(uo){bubble.call(this,to,uo)}const so=()=>{window.open(ro.accountPortalUrl+"/portal/upgrade","_blank")},lo=()=>io("/builder/portal/account/upgrade");function co(uo){bubble.call(this,to,uo)}return[no,ro,oo,io,ao,so,lo,co]}class UpgradeButton extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8M,create_fragment$8M,safe_not_equal,{})}}const SnippetSidePanel_svelte_svelte_type_style_lang="";function get_each_context$1G(to,ue,eo){const no=to.slice();return no[27]=ue[eo],no}function create_else_block_3$2(to){let ue,eo,no,ro;return no=new Tags({props:{$$slots:{default:[create_default_slot_4$1E]},$$scope:{ctx:to}}}),{c(){ue=element("div"),eo=text(`Snippets
|
|
851
851
|
`),create_component(no.$$.fragment),attr(ue,"class","title svelte-10gqizr")},m(oo,io){insert$1(oo,ue,io),append$2(ue,eo),mount_component(no,ue,null),ro=!0},p(oo,io){const ao={};io&1073741824&&(ao.$$scope={dirty:io,ctx:oo}),no.$set(ao)},i(oo){ro||(transition_in(no.$$.fragment,oo),ro=!0)},o(oo){transition_out(no.$$.fragment,oo),ro=!1},d(oo){oo&&detach(ue),destroy_component(no)}}}function create_if_block_2$1h(to){let ue,eo,no,ro;const oo=[create_if_block_3$X,create_else_block_2$7],io=[];function ao(so,lo){return so[3]?0:1}return ue=ao(to),eo=io[ue]=oo[ue](to),{c(){eo.c(),no=empty$3()},m(so,lo){io[ue].m(so,lo),insert$1(so,no,lo),ro=!0},p(so,lo){let co=ue;ue=ao(so),ue===co?io[ue].p(so,lo):(group_outros(),transition_out(io[co],1,1,()=>{io[co]=null}),check_outros(),eo=io[ue],eo?eo.p(so,lo):(eo=io[ue]=oo[ue](so),eo.c()),transition_in(eo,1),eo.m(no.parentNode,no))},i(so){ro||(transition_in(eo),ro=!0)},o(so){transition_out(eo),ro=!1},d(so){so&&detach(no),io[ue].d(so)}}}function create_default_slot_5$1h(to){let ue;return{c(){ue=text("Premium")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_default_slot_4$1E(to){let ue,eo;return ue=new Tag$1({props:{icon:"LockClosed",$$slots:{default:[create_default_slot_5$1h]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&1073741824&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_else_block_2$7(to){let ue,eo,no,ro,oo,io;return no=new Icon({props:{size:"S",name:"Search",hoverable:!0,newStyles:!0}}),no.$on("click",to[13]),oo=new Icon({props:{size:"S",name:"Add",hoverable:!0,newStyles:!0}}),oo.$on("click",to[15]),{c(){ue=element("div"),ue.textContent="Snippets",eo=space$1(),create_component(no.$$.fragment),ro=space$1(),create_component(oo.$$.fragment),attr(ue,"class","title svelte-10gqizr")},m(ao,so){insert$1(ao,ue,so),insert$1(ao,eo,so),mount_component(no,ao,so),insert$1(ao,ro,so),mount_component(oo,ao,so),io=!0},p:noop$6,i(ao){io||(transition_in(no.$$.fragment,ao),transition_in(oo.$$.fragment,ao),io=!0)},o(ao){transition_out(no.$$.fragment,ao),transition_out(oo.$$.fragment,ao),io=!1},d(ao){ao&&(detach(ue),detach(eo),detach(ro)),destroy_component(no,ao),destroy_component(oo,ao)}}}function create_if_block_3$X(to){let ue,eo,no,ro,oo,io;function ao(lo){to[19](lo)}let so={placeholder:"Search for snippets",autocomplete:"off",autofocus:!0};return to[1]!==void 0&&(so.value=to[1]),eo=new Input$5({props:so}),binding_callbacks.push(()=>bind$2(eo,"value",ao)),oo=new Icon({props:{size:"S",name:"Close",hoverable:!0,newStyles:!0}}),oo.$on("click",to[14]),{c(){ue=element("div"),create_component(eo.$$.fragment),ro=space$1(),create_component(oo.$$.fragment),attr(ue,"class","search-input svelte-10gqizr")},m(lo,co){insert$1(lo,ue,co),mount_component(eo,ue,null),insert$1(lo,ro,co),mount_component(oo,lo,co),io=!0},p(lo,co){const uo={};!no&&co&2&&(no=!0,uo.value=lo[1],add_flush_callback(()=>no=!1)),eo.$set(uo)},i(lo){io||(transition_in(eo.$$.fragment,lo),transition_in(oo.$$.fragment,lo),io=!0)},o(lo){transition_out(eo.$$.fragment,lo),transition_out(oo.$$.fragment,lo),io=!1},d(lo){lo&&(detach(ue),detach(ro)),destroy_component(eo),destroy_component(oo,lo)}}}function create_else_block$1z(to){let ue,eo,no,ro,oo,io;eo=new Body({props:{size:"S",$$slots:{default:[create_default_slot_3$2d]},$$scope:{ctx:to}}});const ao=[create_if_block_1$28,create_else_block_1$n],so=[];function lo(co,uo){return co[2]?0:1}return ro=lo(to),oo=so[ro]=ao[ro](to),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),oo.c(),attr(ue,"class","upgrade svelte-10gqizr")},m(co,uo){insert$1(co,ue,uo),mount_component(eo,ue,null),append$2(ue,no),so[ro].m(ue,null),io=!0},p(co,uo){const fo={};uo&1073741824&&(fo.$$scope={dirty:uo,ctx:co}),eo.$set(fo);let po=ro;ro=lo(co),ro===po?so[ro].p(co,uo):(group_outros(),transition_out(so[po],1,1,()=>{so[po]=null}),check_outros(),oo=so[ro],oo?oo.p(co,uo):(oo=so[ro]=ao[ro](co),oo.c()),transition_in(oo,1),oo.m(ue,null))},i(co){io||(transition_in(eo.$$.fragment,co),transition_in(oo),io=!0)},o(co){transition_out(eo.$$.fragment,co),transition_out(oo),io=!1},d(co){co&&detach(ue),destroy_component(eo),so[ro].d()}}}function create_if_block$43(to){let ue,eo,no=ensure_array_like(to[9]),ro=[];for(let io=0;io<no.length;io+=1)ro[io]=create_each_block$1G(get_each_context$1G(to,no,io));const oo=io=>transition_out(ro[io],1,1,()=>{ro[io]=null});return{c(){for(let io=0;io<ro.length;io+=1)ro[io].c();ue=empty$3()},m(io,ao){for(let so=0;so<ro.length;so+=1)ro[so]&&ro[so].m(io,ao);insert$1(io,ue,ao),eo=!0},p(io,ao){if(ao&69121){no=ensure_array_like(io[9]);let so;for(so=0;so<no.length;so+=1){const lo=get_each_context$1G(io,no,so);ro[so]?(ro[so].p(lo,ao),transition_in(ro[so],1)):(ro[so]=create_each_block$1G(lo),ro[so].c(),transition_in(ro[so],1),ro[so].m(ue.parentNode,ue))}for(group_outros(),so=no.length;so<ro.length;so+=1)oo(so);check_outros()}},i(io){if(!eo){for(let ao=0;ao<no.length;ao+=1)transition_in(ro[ao]);eo=!0}},o(io){ro=ro.filter(Boolean);for(let ao=0;ao<ro.length;ao+=1)transition_out(ro[ao]);eo=!1},d(io){io&&detach(ue),destroy_each(ro,io)}}}function create_default_slot_3$2d(to){let ue;return{c(){ue=text(`Snippets let you create reusable JS functions and values that can
|
|
852
|
-
all be managed in one place`)},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_else_block_1$n(to){let ue,eo;return ue=new UpgradeButton({}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p:noop$6,i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block_1$28(to){let ue,eo;return ue=new Button({props:{cta:!0,$$slots:{default:[create_default_slot_2$2Q]},$$scope:{ctx:to}}}),ue.$on("click",to[15]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&1073741824&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_2$2Q(to){let ue;return{c(){ue=text("Create snippet")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_each_block$1G(to){let ue,eo=to[27].name+"",no,ro,oo,io,ao,so,lo;function co(...po){return to[20](to[27],...po)}oo=new Icon({props:{name:"Edit",hoverable:!0,newStyles:!0,size:"S"}}),oo.$on("click",co);function uo(...po){return to[21](to[27],...po)}function fo(){return to[22](to[27])}return{c(){ue=element("div"),no=text(eo),ro=space$1(),create_component(oo.$$.fragment),io=space$1(),attr(ue,"class","snippet svelte-10gqizr")},m(po,ho){insert$1(po,ue,ho),append$2(ue,no),append$2(ue,ro),mount_component(oo,ue,null),append$2(ue,io),ao=!0,so||(lo=[listen(ue,"mouseenter",uo),listen(ue,"mouseleave",to[11]),listen(ue,"click",fo)],so=!0)},p(po,ho){to=po,(!ao||ho&512)&&eo!==(eo=to[27].name+"")&&set_data(no,eo)},i(po){ao||(transition_in(oo.$$.fragment,po),ao=!0)},o(po){transition_out(oo.$$.fragment,po),ao=!1},d(po){po&&detach(ue),destroy_component(oo),so=!1,run_all(lo)}}}function create_default_slot_1$3X(to){let ue,eo,no,ro,oo,io,ao,so;const lo=[create_if_block_2$1h,create_else_block_3$2],co=[];function uo(_o,go){return _o[2]?0:1}eo=uo(to),no=co[eo]=lo[eo](to);const fo=[create_if_block$43,create_else_block$1z],po=[];function ho(_o,go){var bo;return _o[2]&&((bo=_o[9])!=null&&bo.length)?0:1}return io=ho(to),ao=po[io]=fo[io](to),{c(){ue=element("div"),no.c(),ro=space$1(),oo=element("div"),ao.c(),attr(ue,"class","header svelte-10gqizr"),attr(oo,"class","snippet-list svelte-10gqizr")},m(_o,go){insert$1(_o,ue,go),co[eo].m(ue,null),insert$1(_o,ro,go),insert$1(_o,oo,go),po[io].m(oo,null),so=!0},p(_o,go){let bo=eo;eo=uo(_o),eo===bo?co[eo].p(_o,go):(group_outros(),transition_out(co[bo],1,1,()=>{co[bo]=null}),check_outros(),no=co[eo],no?no.p(_o,go):(no=co[eo]=lo[eo](_o),no.c()),transition_in(no,1),no.m(ue,null));let vo=io;io=ho(_o),io===vo?po[io].p(_o,go):(group_outros(),transition_out(po[vo],1,1,()=>{po[vo]=null}),check_outros(),ao=po[io],ao?ao.p(_o,go):(ao=po[io]=fo[io](_o),ao.c()),transition_in(ao,1),ao.m(oo,null))},i(_o){so||(transition_in(no),transition_in(ao),so=!0)},o(_o){transition_out(no),transition_out(ao),so=!1},d(_o){_o&&(detach(ue),detach(ro),detach(oo)),co[eo].d(),po[io].d()}}}function create_key_block$h(to){let ue,eo;return ue=new CodeEditor({props:{value:to[6].code.trim(),mode:EditorModes$1.JS,readonly:!0}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&64&&(oo.value=no[6].code.trim()),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot$5C(to){let ue,eo=to[6],no,ro=create_key_block$h(to);return{c(){ue=element("div"),ro.c(),attr(ue,"class","snippet-popover svelte-10gqizr")},m(oo,io){insert$1(oo,ue,io),ro.m(ue,null),no=!0},p(oo,io){io&64&&safe_not_equal(eo,eo=oo[6])?(group_outros(),transition_out(ro,1,1,noop$6),check_outros(),ro=create_key_block$h(oo),ro.c(),transition_in(ro,1),ro.m(ue,null)):ro.p(oo,io)},i(oo){no||(transition_in(ro),no=!0)},o(oo){transition_out(ro),no=!1},d(oo){oo&&detach(ue),ro.d(oo)}}}function create_fragment$8L(to){let ue,eo,no,ro,oo,io,ao;eo=new Layout$n({props:{noPadding:!0,gap:"S",$$slots:{default:[create_default_slot_1$3X]},$$scope:{ctx:to}}});let so={align:"left-outside",anchor:to[5],minWidth:0,maxWidth:480,maxHeight:480,dismissible:!1,$$slots:{default:[create_default_slot$5C]},$$scope:{ctx:to}};ro=new Popover({props:so}),to[23](ro),ro.$on("mouseenter",to[12]),ro.$on("mouseleave",to[11]);let lo={snippet:to[8]};return io=new SnippetDrawer({props:lo}),to[24](io),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),oo=space$1(),create_component(io.$$.fragment),attr(ue,"class","snippet-side-panel svelte-10gqizr")},m(co,uo){insert$1(co,ue,uo),mount_component(eo,ue,null),insert$1(co,no,uo),mount_component(ro,co,uo),insert$1(co,oo,uo),mount_component(io,co,uo),ao=!0},p(co,[uo]){const fo={};uo&1073742351&&(fo.$$scope={dirty:uo,ctx:co}),eo.$set(fo);const po={};uo&32&&(po.anchor=co[5]),uo&1073741888&&(po.$$scope={dirty:uo,ctx:co}),ro.$set(po);const ho={};uo&256&&(ho.snippet=co[8]),io.$set(ho)},i(co){ao||(transition_in(eo.$$.fragment,co),transition_in(ro.$$.fragment,co),transition_in(io.$$.fragment,co),ao=!0)},o(co){transition_out(eo.$$.fragment,co),transition_out(ro.$$.fragment,co),transition_out(io.$$.fragment,co),ao=!1},d(co){co&&(detach(ue),detach(no),detach(oo)),destroy_component(eo),to[23](null),destroy_component(ro,co),to[24](null),destroy_component(io,co)}}}function instance$8L(to,ue,eo){let no,ro,oo;component_subscribe(to,licensing,Po=>eo(18,oo=Po));let{addSnippet:io}=ue,{snippets:ao}=ue,so="",lo=!1,co,uo,fo,po,ho,_o;const go=(Po,To,Lo)=>!Po||!(To!=null&&To.length)?[]:Lo!=null&&Lo.length?To.filter(qo=>qo.name.toLowerCase().includes(Lo.toLowerCase())):To,bo=(Po,To)=>{yo(),eo(5,uo=To),eo(6,fo=Po),co.show()},vo=()=>{po=setTimeout(()=>{co.hide(),eo(5,uo=null),eo(6,fo=null),po=null},100)},yo=()=>{po&&(clearTimeout(po),po=null)},wo=()=>{eo(3,lo=!0),eo(1,so="")},ko=()=>{eo(3,lo=!1),eo(1,so="")},So=()=>{eo(8,_o=null),ho.show()},Ao=(Po,To)=>{Po.preventDefault(),Po.stopPropagation(),eo(8,_o=To),ho.show()};function Io(Po){so=Po,eo(1,so)}const Eo=(Po,To)=>Ao(To,Po),Ro=(Po,To)=>bo(Po,To.target),zo=Po=>io(Po);function No(Po){binding_callbacks[Po?"unshift":"push"](()=>{co=Po,eo(4,co)})}function Fo(Po){binding_callbacks[Po?"unshift":"push"](()=>{ho=Po,eo(7,ho)})}return to.$$set=Po=>{"addSnippet"in Po&&eo(0,io=Po.addSnippet),"snippets"in Po&&eo(17,ao=Po.snippets)},to.$$.update=()=>{to.$$.dirty&262144&&eo(2,no=!oo.isFreePlan),to.$$.dirty&131078&&eo(9,ro=go(no,ao,so))},[io,so,no,lo,co,uo,fo,ho,_o,ro,bo,vo,yo,wo,ko,So,Ao,ao,oo,Io,Eo,Ro,zo,No,Fo]}class SnippetSidePanel extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8L,create_fragment$8L,safe_not_equal,{addSnippet:0,snippets:17})}}const BindingType={READABLE:"readableBinding",RUNTIME:"runtimeBinding"};class BindingHelpers{constructor(ue,eo,{disableWrapping:no}={}){this.getCaretPosition=ue,this.insertAtPos=eo,this.disableWrapping=no}onSelectHelper(ue,eo,{js:no,dontDecode:ro}){const oo=this.getCaretPosition(),{start:io,end:ao}=oo;if(no){const so=ro?ue:decodeJSBinding(ue),lo=jsInsert(so,io,ao,eo.text,{helper:!0});this.insertAtPos({start:io,end:ao,value:lo})}else{const so=hbInsert(ue,io,ao,eo.text);this.insertAtPos({start:io,end:ao,value:so})}}onSelectBinding(ue,eo,{js:no,dontDecode:ro,type:oo=BindingType.READABLE}){const{start:io,end:ao}=this.getCaretPosition();if(no){const so=ro?ue:decodeJSBinding(ue),lo=jsInsert(so,io,ao,eo[oo],{disableWrapping:this.disableWrapping});this.insertAtPos({start:io,end:ao,value:lo})}else{const so=hbInsert(ue,io,ao,eo[oo]);this.insertAtPos({start:io,end:ao,value:so})}}onSelectSnippet(ue){const eo=this.getCaretPosition(),{start:no,end:ro}=eo;this.insertAtPos({start:no,end:ro,value:`snippets.${ue.name}`})}}const BindingPanel_svelte_svelte_type_style_lang="";function get_each_context$1F(to,ue,eo){const no=to.slice();return no[62]=ue[eo],no}function get_each_context_1$r(to,ue,eo){const no=to.slice();return no[14]=ue[eo],no}function create_if_block_6$m(to){let ue,eo,no,ro,oo,io=ensure_array_like(to[19]),ao=[];for(let fo=0;fo<io.length;fo+=1)ao[fo]=create_each_block_1$r(get_each_context_1$r(to,io,fo));const so=fo=>transition_out(ao[fo],1,1,()=>{ao[fo]=null});let lo=ensure_array_like(to[12]),co=[];for(let fo=0;fo<lo.length;fo+=1)co[fo]=create_each_block$1F(get_each_context$1F(to,lo,fo));const uo=fo=>transition_out(co[fo],1,1,()=>{co[fo]=null});return{c(){ue=element("div"),eo=element("div");for(let fo=0;fo<ao.length;fo+=1)ao[fo].c();no=space$1(),ro=element("div");for(let fo=0;fo<co.length;fo+=1)co[fo].c();attr(eo,"class","editor-tabs svelte-biform"),attr(ro,"class","side-tabs svelte-biform"),attr(ue,"class","tabs svelte-biform")},m(fo,po){insert$1(fo,ue,po),append$2(ue,eo);for(let ho=0;ho<ao.length;ho+=1)ao[ho]&&ao[ho].m(eo,null);append$2(ue,no),append$2(ue,ro);for(let ho=0;ho<co.length;ho+=1)co[ho]&&co[ho].m(ro,null);oo=!0},p(fo,po){if(po[0]&268959808){io=ensure_array_like(fo[19]);let ho;for(ho=0;ho<io.length;ho+=1){const _o=get_each_context_1$r(fo,io,ho);ao[ho]?(ao[ho].p(_o,po),transition_in(ao[ho],1)):(ao[ho]=create_each_block_1$r(_o),ao[ho].c(),transition_in(ao[ho],1),ao[ho].m(eo,null))}for(group_outros(),ho=io.length;ho<ao.length;ho+=1)so(ho);check_outros()}if(po[0]&1073746048){lo=ensure_array_like(fo[12]);let ho;for(ho=0;ho<lo.length;ho+=1){const _o=get_each_context$1F(fo,lo,ho);co[ho]?(co[ho].p(_o,po),transition_in(co[ho],1)):(co[ho]=create_each_block$1F(_o),co[ho].c(),transition_in(co[ho],1),co[ho].m(ro,null))}for(group_outros(),ho=lo.length;ho<co.length;ho+=1)uo(ho);check_outros()}},i(fo){if(!oo){for(let po=0;po<io.length;po+=1)transition_in(ao[po]);for(let po=0;po<lo.length;po+=1)transition_in(co[po]);oo=!0}},o(fo){ao=ao.filter(Boolean);for(let po=0;po<ao.length;po+=1)transition_out(ao[po]);co=co.filter(Boolean);for(let po=0;po<co.length;po+=1)transition_out(co[po]);oo=!1},d(fo){fo&&detach(ue),destroy_each(ao,fo),destroy_each(co,fo)}}}function create_default_slot_6$$(to){let ue=capitalise(to[14])+"",eo,no;return{c(){eo=text(ue),no=space$1()},m(ro,oo){insert$1(ro,eo,oo),insert$1(ro,no,oo)},p(ro,oo){oo[0]&524288&&ue!==(ue=capitalise(ro[14])+"")&&set_data(eo,ue)},d(ro){ro&&(detach(eo),detach(no))}}}function create_each_block_1$r(to){let ue,eo;function no(){return to[42](to[14])}return ue=new ActionButton({props:{size:"M",quiet:!0,selected:to[6]===to[14],$$slots:{default:[create_default_slot_6$$]},$$scope:{ctx:to}}}),ue.$on("click",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro;const io={};oo[0]&524352&&(io.selected=to[6]===to[14]),oo[0]&524288|oo[2]&32&&(io.$$scope={dirty:oo,ctx:to}),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_default_slot_5$1g(to){let ue,eo,no;return ue=new Icon({props:{name:to[62],size:"S"}}),{c(){create_component(ue.$$.fragment),eo=space$1()},m(ro,oo){mount_component(ue,ro,oo),insert$1(ro,eo,oo),no=!0},p(ro,oo){const io={};oo[0]&4096&&(io.name=ro[62]),ue.$set(io)},i(ro){no||(transition_in(ue.$$.fragment,ro),no=!0)},o(ro){transition_out(ue.$$.fragment,ro),no=!1},d(ro){ro&&detach(eo),destroy_component(ue,ro)}}}function create_each_block$1F(to){let ue,eo;function no(){return to[43](to[62])}return ue=new ActionButton({props:{size:"M",quiet:!0,selected:to[7]===to[62],$$slots:{default:[create_default_slot_5$1g]},$$scope:{ctx:to}}}),ue.$on("click",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro;const io={};oo[0]&4224&&(io.selected=to[7]===to[62]),oo[0]&4096|oo[2]&32&&(io.$$scope={dirty:oo,ctx:to}),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_if_block_5$u(to){let ue=to[22],eo,no,ro=create_key_block_1(to);return{c(){ro.c(),eo=empty$3()},m(oo,io){ro.m(oo,io),insert$1(oo,eo,io),no=!0},p(oo,io){io[0]&4194304&&safe_not_equal(ue,ue=oo[22])?(group_outros(),transition_out(ro,1,1,noop$6),check_outros(),ro=create_key_block_1(oo),ro.c(),transition_in(ro,1),ro.m(eo.parentNode,eo)):ro.p(oo,io)},i(oo){no||(transition_in(ro),no=!0)},o(oo){transition_out(ro),no=!1},d(oo){oo&&detach(eo),ro.d(oo)}}}function create_if_block_4$G(to){let ue=to[23],eo,no,ro=create_key_block$g(to);return{c(){ro.c(),eo=empty$3()},m(oo,io){ro.m(oo,io),insert$1(oo,eo,io),no=!0},p(oo,io){io[0]&8388608&&safe_not_equal(ue,ue=oo[23])?(group_outros(),transition_out(ro,1,1,noop$6),check_outros(),ro=create_key_block$g(oo),ro.c(),transition_in(ro,1),ro.m(eo.parentNode,eo)):ro.p(oo,io)},i(oo){no||(transition_in(ro),no=!0)},o(oo){transition_out(ro),no=!1},d(oo){oo&&detach(eo),ro.d(oo)}}}function create_key_block_1(to){let ue,eo,no,ro;function oo(so){to[46](so)}function io(so){to[47](so)}let ao={value:decodeJSBinding(to[8]),completions:to[22],mode:EditorModes$1.JS,autofocus:to[3],placeholder:to[4]||"Add bindings by typing $ or use the menu on the right",jsBindingWrapping:!0};return to[10]!==void 0&&(ao.getCaretPosition=to[10]),to[11]!==void 0&&(ao.insertAtPos=to[11]),ue=new CodeEditor({props:ao}),binding_callbacks.push(()=>bind$2(ue,"getCaretPosition",oo)),binding_callbacks.push(()=>bind$2(ue,"insertAtPos",io)),ue.$on("change",to[32]),{c(){create_component(ue.$$.fragment)},m(so,lo){mount_component(ue,so,lo),ro=!0},p(so,lo){const co={};lo[0]&256&&(co.value=decodeJSBinding(so[8])),lo[0]&4194304&&(co.completions=so[22]),lo[0]&8&&(co.autofocus=so[3]),lo[0]&16&&(co.placeholder=so[4]||"Add bindings by typing $ or use the menu on the right"),!eo&&lo[0]&1024&&(eo=!0,co.getCaretPosition=so[10],add_flush_callback(()=>eo=!1)),!no&&lo[0]&2048&&(no=!0,co.insertAtPos=so[11],add_flush_callback(()=>no=!1)),ue.$set(co)},i(so){ro||(transition_in(ue.$$.fragment,so),ro=!0)},o(so){transition_out(ue.$$.fragment,so),ro=!1},d(so){destroy_component(ue,so)}}}function create_key_block$g(to){let ue,eo,no,ro;function oo(so){to[44](so)}function io(so){to[45](so)}let ao={value:to[9],completions:to[23],autofocus:to[3],placeholder:to[4]||"Add bindings by typing {{ or use the menu on the right",jsBindingWrapping:!1};return to[10]!==void 0&&(ao.getCaretPosition=to[10]),to[11]!==void 0&&(ao.insertAtPos=to[11]),ue=new CodeEditor({props:ao}),binding_callbacks.push(()=>bind$2(ue,"getCaretPosition",oo)),binding_callbacks.push(()=>bind$2(ue,"insertAtPos",io)),ue.$on("change",to[31]),{c(){create_component(ue.$$.fragment)},m(so,lo){mount_component(ue,so,lo),ro=!0},p(so,lo){const co={};lo[0]&512&&(co.value=so[9]),lo[0]&8388608&&(co.completions=so[23]),lo[0]&8&&(co.autofocus=so[3]),lo[0]&16&&(co.placeholder=so[4]||"Add bindings by typing {{ or use the menu on the right"),!eo&&lo[0]&1024&&(eo=!0,co.getCaretPosition=so[10],add_flush_callback(()=>eo=!1)),!no&&lo[0]&2048&&(no=!0,co.insertAtPos=so[11],add_flush_callback(()=>no=!1)),ue.$set(co)},i(so){ro||(transition_in(ue.$$.fragment,so),ro=!0)},o(so){transition_out(ue.$$.fragment,so),ro=!1},d(so){destroy_component(ue,so)}}}function create_if_block_3$W(to){let ue,eo,no,ro,oo,io,ao,so,lo,co,uo;return no=new Heading({props:{size:"S",$$slots:{default:[create_default_slot_4$1D]},$$scope:{ctx:to}}}),oo=new Body({props:{$$slots:{default:[create_default_slot_3$2c]},$$scope:{ctx:to}}}),so=new Button({props:{secondary:!0,size:"S",$$slots:{default:[create_default_slot_2$2P]},$$scope:{ctx:to}}}),so.$on("click",to[48]),co=new Button({props:{cta:!0,size:"S",$$slots:{default:[create_default_slot_1$3W]},$$scope:{ctx:to}}}),co.$on("click",to[29]),{c(){ue=element("div"),eo=element("div"),create_component(no.$$.fragment),ro=space$1(),create_component(oo.$$.fragment),io=space$1(),ao=element("div"),create_component(so.$$.fragment),lo=space$1(),create_component(co.$$.fragment),attr(ao,"class","switch-actions svelte-biform"),attr(eo,"class","prompt-body svelte-biform"),attr(ue,"class","mode-overlay svelte-biform")},m(fo,po){insert$1(fo,ue,po),append$2(ue,eo),mount_component(no,eo,null),append$2(eo,ro),mount_component(oo,eo,null),append$2(eo,io),append$2(eo,ao),mount_component(so,ao,null),append$2(ao,lo),mount_component(co,ao,null),uo=!0},p(fo,po){const ho={};po[0]&32768|po[2]&32&&(ho.$$scope={dirty:po,ctx:fo}),no.$set(ho);const _o={};po[2]&32&&(_o.$$scope={dirty:po,ctx:fo}),oo.$set(_o);const go={};po[0]&64|po[2]&32&&(go.$$scope={dirty:po,ctx:fo}),so.$set(go);const bo={};po[0]&64|po[2]&32&&(bo.$$scope={dirty:po,ctx:fo}),co.$set(bo)},i(fo){uo||(transition_in(no.$$.fragment,fo),transition_in(oo.$$.fragment,fo),transition_in(so.$$.fragment,fo),transition_in(co.$$.fragment,fo),uo=!0)},o(fo){transition_out(no.$$.fragment,fo),transition_out(oo.$$.fragment,fo),transition_out(so.$$.fragment,fo),transition_out(co.$$.fragment,fo),uo=!1},d(fo){fo&&detach(ue),destroy_component(no),destroy_component(oo),destroy_component(so),destroy_component(co)}}}function create_default_slot_4$1D(to){let ue,eo,no;return{c(){ue=text("Switch to "),eo=text(to[15]),no=text("?")},m(ro,oo){insert$1(ro,ue,oo),insert$1(ro,eo,oo),insert$1(ro,no,oo)},p(ro,oo){oo[0]&32768&&set_data(eo,ro[15])},d(ro){ro&&(detach(ue),detach(eo),detach(no))}}}function create_default_slot_3$2c(to){let ue;return{c(){ue=text("This will discard anything in your binding")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_default_slot_2$2P(to){let ue,eo;return{c(){ue=text("No - keep "),eo=text(to[6])},m(no,ro){insert$1(no,ue,ro),insert$1(no,eo,ro)},p(no,ro){ro[0]&64&&set_data(eo,no[6])},d(no){no&&(detach(ue),detach(eo))}}}function create_default_slot_1$3W(to){let ue,eo;return{c(){ue=text("Yes - discard "),eo=text(to[6])},m(no,ro){insert$1(no,ue,ro),insert$1(no,eo,ro)},p(no,ro){ro[0]&64&&set_data(eo,no[6])},d(no){no&&(detach(ue),detach(eo))}}}function create_if_block_2$1g(to){let ue,eo;return ue=new SnippetSidePanel({props:{addSnippet:to[49],snippets:to[2]}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[0]&2097152&&(oo.addSnippet=no[49]),ro[0]&4&&(oo.snippets=no[2]),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block_1$27(to){let ue,eo;return ue=new EvaluationSidePanel({props:{expressionResult:to[16],expressionError:to[17],evaluating:to[18],expression:to[20]}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[0]&65536&&(oo.expressionResult=no[16]),ro[0]&131072&&(oo.expressionError=no[17]),ro[0]&262144&&(oo.evaluating=no[18]),ro[0]&1048576&&(oo.expression=no[20]),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block$42(to){let ue,eo;return ue=new BindingSidePanel({props:{bindings:to[13],allowHelpers:to[0],context:to[1],addHelper:to[26],addBinding:to[27],mode:to[14]}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[0]&8192&&(oo.bindings=no[13]),ro[0]&1&&(oo.allowHelpers=no[0]),ro[0]&2&&(oo.context=no[1]),ro[0]&16384&&(oo.mode=no[14]),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot$5B(to){let ue,eo,no,ro,oo,io,ao,so,lo,co,uo,fo,po=to[5]&&create_if_block_6$m(to);const ho=[create_if_block_4$G,create_if_block_5$u],_o=[];function go(ko,So){return ko[6]===ko[24].Text?0:ko[6]===ko[24].JavaScript?1:-1}~(oo=go(to))&&(io=_o[oo]=ho[oo](to));let bo=to[15]&&create_if_block_3$W(to);const vo=[create_if_block$42,create_if_block_1$27,create_if_block_2$1g],yo=[];function wo(ko,So){return ko[7]===ko[25].Bindings?0:ko[7]===ko[25].Evaluation?1:ko[7]===ko[25].Snippets?2:-1}return~(co=wo(to))&&(uo=yo[co]=vo[co](to)),{c(){ue=element("div"),eo=element("div"),po&&po.c(),no=space$1(),ro=element("div"),io&&io.c(),ao=space$1(),bo&&bo.c(),so=space$1(),lo=element("div"),uo&&uo.c(),attr(ro,"class","editor svelte-biform"),attr(eo,"class","main svelte-biform"),attr(lo,"class","side svelte-biform"),toggle_class(lo,"visible",!!to[7]),attr(ue,"class","binding-panel svelte-biform")},m(ko,So){insert$1(ko,ue,So),append$2(ue,eo),po&&po.m(eo,null),append$2(eo,no),append$2(eo,ro),~oo&&_o[oo].m(ro,null),append$2(ro,ao),bo&&bo.m(ro,null),append$2(ue,so),append$2(ue,lo),~co&&yo[co].m(lo,null),fo=!0},p(ko,So){ko[5]?po?(po.p(ko,So),So[0]&32&&transition_in(po,1)):(po=create_if_block_6$m(ko),po.c(),transition_in(po,1),po.m(eo,no)):po&&(group_outros(),transition_out(po,1,1,()=>{po=null}),check_outros());let Ao=oo;oo=go(ko),oo===Ao?~oo&&_o[oo].p(ko,So):(io&&(group_outros(),transition_out(_o[Ao],1,1,()=>{_o[Ao]=null}),check_outros()),~oo?(io=_o[oo],io?io.p(ko,So):(io=_o[oo]=ho[oo](ko),io.c()),transition_in(io,1),io.m(ro,ao)):io=null),ko[15]?bo?(bo.p(ko,So),So[0]&32768&&transition_in(bo,1)):(bo=create_if_block_3$W(ko),bo.c(),transition_in(bo,1),bo.m(ro,null)):bo&&(group_outros(),transition_out(bo,1,1,()=>{bo=null}),check_outros());let Io=co;co=wo(ko),co===Io?~co&&yo[co].p(ko,So):(uo&&(group_outros(),transition_out(yo[Io],1,1,()=>{yo[Io]=null}),check_outros()),~co?(uo=yo[co],uo?uo.p(ko,So):(uo=yo[co]=vo[co](ko),uo.c()),transition_in(uo,1),uo.m(lo,null)):uo=null),(!fo||So[0]&128)&&toggle_class(lo,"visible",!!ko[7])},i(ko){fo||(transition_in(po),transition_in(io),transition_in(bo),transition_in(uo),fo=!0)},o(ko){transition_out(po),transition_out(io),transition_out(bo),transition_out(uo),fo=!1},d(ko){ko&&detach(ue),po&&po.d(),~oo&&_o[oo].d(),bo&&bo.d(),~co&&yo[co].d()}}}function create_fragment$8K(to){let ue,eo;return ue=new DrawerContent({props:{padding:!1,$$slots:{default:[create_default_slot$5B]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[0]&16777215|ro[2]&32&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function instance$8K(to,ue,eo){var Va;let no,ro,oo,io,ao,so,lo,co,uo,fo,po,ho,_o;component_subscribe(to,licensing,xa=>eo(41,_o=xa));const go=createEventDispatcher();let{bindings:bo=[]}=ue,{value:vo=""}=ue,{allowHBS:yo=!0}=ue,{allowJS:wo=!1}=ue,{allowHelpers:ko=!0}=ue,{allowSnippets:So=!0}=ue,{context:Ao=null}=ue,{snippets:Io=null}=ue,{autofocusEditor:Eo=!1}=ue,{placeholder:Ro=null}=ue,{showTabBar:zo=!0}=ue;const No={Text:"Text",JavaScript:"JavaScript"},Fo={Bindings:"FlashOn",Evaluation:"Play",Snippets:"Code"};let Po,To,Lo=(Va=vo==null?void 0:vo.startsWith)==null?void 0:Va.call(vo,"{{ js "),qo=Lo?vo:null,Uo=Lo?null:vo,jo,Zo,Xo=null,Qo,Ko,ea=!1;const na=xa=>[hbAutocomplete([...xa,...getHelperCompletions(EditorModes$1.Handlebars)])],Jo=(xa,as,Za)=>{const gs=[jsAutocomplete([...xa,...getHelperCompletions(EditorModes$1.JS)])];return Za&&gs.push(snippetAutoComplete(as)),gs},ia=(xa,as)=>{let Za=[];return xa&&Za.push(No.Text),as&&Za.push(No.JavaScript),Za},Yo=(xa,as,Za,gs)=>{let Os=[];return xa!=null&&xa.length&&Os.push(Fo.Bindings),as&&Object.keys(as).length>0&&Os.push(Fo.Evaluation),Za&&gs===No.JavaScript&&Os.push(Fo.Snippets),Os},sa=debounce((xa,as,Za)=>{try{eo(17,Ko=null),eo(16,Qo=processStringSync(xa||"",{...as,snippets:Za},{noThrow:!1}))}catch(gs){eo(16,Qo=null),eo(17,Ko=gs)}eo(18,ea=!1)},260),wa=(xa,as,Za)=>{eo(18,ea=!0),sa(xa,as,Za)},ca=xa=>formatHighlight(xa,{keyColor:"#e06c75",numberColor:"#e5c07b",stringColor:"#98c379",trueColor:"#d19a66",falseColor:"#d19a66",nullColor:"#c678dd"}),ba=(xa,as,Za)=>{const gs=xa.map(Qa=>Qa.runtimeBinding.startsWith('trim "')?`{{ ${Qa.runtimeBinding} }}`:`{{ literal ${Qa.runtimeBinding} }}`),Os=processObjectSync(gs,{...as,snippets:Za});return xa.map((Qa,cs)=>{if(!as)return Qa;const Ds=JSON.stringify(Os[cs],null,2);return{...Qa,value:Ds,valueHTML:ca(Ds)}})},Sa=xa=>{const as=readableToRuntimeBinding(io,xa);go("change",xa),wa(as,Ao,Io)},pa=(xa,as)=>{fo.onSelectHelper(as?qo:Uo,xa,{js:as})},La=(xa,{forceJS:as}={})=>{const Za=ao||as;fo.onSelectBinding(Za?qo:Uo,xa,{js:Za})},Pa=xa=>{if(Xo||xa===Po)return;let as=lo;Po===No.JavaScript&&(as=decodeJSBinding(as)),as!=null&&as.length?eo(15,Xo=xa):eo(6,Po=xa)},Da=()=>{eo(8,qo=null),eo(9,Uo=null),Sa(null),eo(6,Po=Xo),eo(15,Xo=null)},ma=xa=>{eo(7,To=xa===To?null:xa)},$a=xa=>{eo(9,Uo=xa.detail),Sa(Uo)},ds=xa=>{var as;eo(8,qo=encodeJSBinding(xa.detail)),(as=xa.detail)!=null&&as.trim()?Sa(qo):Sa(null)};onMount(()=>{const xa=Lo?No.JavaScript:No.Text;ro.includes(xa)?eo(6,Po=xa):eo(6,Po=ro[0]),eo(7,To=oo[0])});const Ha=xa=>Pa(xa),va=xa=>ma(xa);function Aa(xa){jo=xa,eo(10,jo)}function da(xa){Zo=xa,eo(11,Zo)}function ha(xa){jo=xa,eo(10,jo)}function Na(xa){Zo=xa,eo(11,Zo)}const Oa=()=>{eo(15,Xo=null)},Ua=xa=>fo.onSelectSnippet(xa);return to.$$set=xa=>{"bindings"in xa&&eo(33,bo=xa.bindings),"value"in xa&&eo(34,vo=xa.value),"allowHBS"in xa&&eo(35,yo=xa.allowHBS),"allowJS"in xa&&eo(36,wo=xa.allowJS),"allowHelpers"in xa&&eo(0,ko=xa.allowHelpers),"allowSnippets"in xa&&eo(37,So=xa.allowSnippets),"context"in xa&&eo(1,Ao=xa.context),"snippets"in xa&&eo(2,Io=xa.snippets),"autofocusEditor"in xa&&eo(3,Eo=xa.autofocusEditor),"placeholder"in xa&&eo(4,Ro=xa.placeholder),"showTabBar"in xa&&eo(5,zo=xa.showTabBar)},to.$$.update=()=>{to.$$.dirty[1]&1088&&eo(38,no=So&&!_o.isFreePlan),to.$$.dirty[1]&48&&eo(19,ro=ia(yo,wo)),to.$$.dirty[0]&66|to.$$.dirty[1]&68&&eo(12,oo=Yo(bo,Ao,So,Po)),to.$$.dirty[0]&6|to.$$.dirty[1]&4&&eo(13,io=ba(bo,Ao,Io)),to.$$.dirty[0]&64&&(ao=Po===No.JavaScript),to.$$.dirty[0]&64&&eo(14,so=Po===No.JavaScript?EditorModes$1.JS:EditorModes$1.Handlebars),to.$$.dirty[0]&17152&&eo(20,lo=so===EditorModes$1.JS?qo:Uo),to.$$.dirty[0]&8192|to.$$.dirty[1]&8&&eo(40,co=readableToRuntimeBinding(io,vo)),to.$$.dirty[0]&6|to.$$.dirty[1]&512&&wa(co,Ao,Io),to.$$.dirty[0]&24576&&eo(39,uo=bindingsToCompletions(io,so)),to.$$.dirty[0]&3072&&eo(21,fo=new BindingHelpers(jo,Zo)),to.$$.dirty[1]&256&&eo(23,po=na(uo)),to.$$.dirty[0]&4|to.$$.dirty[1]&384&&eo(22,ho=Jo(uo,Io,no)),to.$$.dirty[0]&4224&&To&&!oo.includes(To)&&eo(7,To=oo[0])},[ko,Ao,Io,Eo,Ro,zo,Po,To,qo,Uo,jo,Zo,oo,io,so,Xo,Qo,Ko,ea,ro,lo,fo,ho,po,No,Fo,pa,La,Pa,Da,ma,$a,ds,bo,vo,yo,wo,So,no,uo,co,_o,Ha,va,Aa,da,ha,Na,Oa,Ua]}class BindingPanel extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8K,create_fragment$8K,safe_not_equal,{bindings:33,value:34,allowHBS:35,allowJS:36,allowHelpers:0,allowSnippets:37,context:1,snippets:2,autofocusEditor:3,placeholder:4,showTabBar:5},null,[-1,-1,-1])}}function create_fragment$8J(to){let ue,eo;return ue=new BindingPanel({props:{bindings:to[6],context:{...to[7].selectedComponentContext,...to[5]},snippets:to[8],value:to[0],allowHBS:to[1],allowJS:to[2],allowHelpers:to[3],autofocusEditor:to[4]}}),ue.$on("change",to[10]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,[ro]){const oo={};ro&64&&(oo.bindings=no[6]),ro&160&&(oo.context={...no[7].selectedComponentContext,...no[5]}),ro&256&&(oo.snippets=no[8]),ro&1&&(oo.value=no[0]),ro&2&&(oo.allowHBS=no[1]),ro&4&&(oo.allowJS=no[2]),ro&8&&(oo.allowHelpers=no[3]),ro&16&&(oo.autofocusEditor=no[4]),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function instance$8J(to,ue,eo){let no,ro,oo;component_subscribe(to,previewStore,_o=>eo(7,ro=_o)),component_subscribe(to,snippets$1,_o=>eo(8,oo=_o));let{bindings:io=[]}=ue,{value:ao=""}=ue,{allowHBS:so=!0}=ue,{allowJS:lo=!1}=ue,{allowHelpers:co=!0}=ue,{autofocusEditor:uo=!1}=ue,{context:fo=null}=ue;const po=_o=>_o!=null&&_o.length?_o==null?void 0:_o.map(go=>({...go,type:null})):_o;onMount(previewStore.requestComponentContext);function ho(_o){bubble.call(this,to,_o)}return to.$$set=_o=>{"bindings"in _o&&eo(9,io=_o.bindings),"value"in _o&&eo(0,ao=_o.value),"allowHBS"in _o&&eo(1,so=_o.allowHBS),"allowJS"in _o&&eo(2,lo=_o.allowJS),"allowHelpers"in _o&&eo(3,co=_o.allowHelpers),"autofocusEditor"in _o&&eo(4,uo=_o.autofocusEditor),"context"in _o&&eo(5,fo=_o.context)},to.$$.update=()=>{to.$$.dirty&512&&eo(6,no=po(io))},[ao,so,lo,co,uo,fo,no,ro,oo,io,ho]}class ClientBindingPanel extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8J,create_fragment$8J,safe_not_equal,{bindings:9,value:0,allowHBS:1,allowJS:2,allowHelpers:3,autofocusEditor:4,context:5})}}const DrawerBindableInput_svelte_svelte_type_style_lang="";function create_if_block$41(to){let ue,eo,no,ro,oo;return eo=new Icon({props:{size:"S",name:"FlashOn"}}),{c(){ue=element("div"),create_component(eo.$$.fragment),attr(ue,"class","icon svelte-570cq4")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),no=!0,ro||(oo=listen(ue,"click",to[25]),ro=!0)},p:noop$6,i(io){no||(transition_in(eo.$$.fragment,io),no=!0)},o(io){transition_out(eo.$$.fragment,io),no=!1},d(io){io&&detach(ue),destroy_component(eo),ro=!1,oo()}}}function create_default_slot$5A(to){let ue;return{c(){ue=text("Save")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_buttons_slot$g(to){let ue,eo;return ue=new Button({props:{cta:!0,slot:"buttons",$$slots:{default:[create_default_slot$5A]},$$scope:{ctx:to}}}),ue.$on("click",to[19]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[1]&1&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_body_slot$f(to){let ue,eo,no;var ro=to[0];function oo(io,ao){return{props:{slot:"body",value:io[15],bindings:io[1],allowHBS:io[6],allowJS:io[7],allowHelpers:io[8],context:io[13]}}}return ro&&(ue=construct_svelte_component(ro,oo(to)),ue.$on("change",to[26])),{c(){ue&&create_component(ue.$$.fragment),eo=empty$3()},m(io,ao){ue&&mount_component(ue,io,ao),insert$1(io,eo,ao),no=!0},p(io,ao){if(ao[0]&1&&ro!==(ro=io[0])){if(ue){group_outros();const so=ue;transition_out(so.$$.fragment,1,0,()=>{destroy_component(so,1)}),check_outros()}ro?(ue=construct_svelte_component(ro,oo(io)),ue.$on("change",io[26]),create_component(ue.$$.fragment),transition_in(ue.$$.fragment,1),mount_component(ue,eo.parentNode,eo)):ue=null}else if(ro){const so={};ao[0]&32768&&(so.value=io[15]),ao[0]&2&&(so.bindings=io[1]),ao[0]&64&&(so.allowHBS=io[6]),ao[0]&128&&(so.allowJS=io[7]),ao[0]&256&&(so.allowHelpers=io[8]),ao[0]&8192&&(so.context=io[13]),ue.$set(so)}},i(io){no||(ue&&transition_in(ue.$$.fragment,io),no=!0)},o(io){ue&&transition_out(ue.$$.fragment,io),no=!1},d(io){io&&detach(eo),ue&&destroy_component(ue,io)}}}function create_fragment$8I(to){let ue,eo,no,ro,oo,io;eo=new Input$5({props:{label:to[4],disabled:to[5],readonly:to[18],value:to[18]?"(JavaScript function)":to[15],placeholder:to[3],updateOnChange:to[9],autocomplete:to[14]}}),eo.$on("change",to[24]),eo.$on("blur",to[21]);let ao=!to[5]&&!to[11]&&create_if_block$41(to),so={title:to[2]??to[3]??"Bindings",forceModal:to[12],$$slots:{body:[create_body_slot$f],buttons:[create_buttons_slot$g]},$$scope:{ctx:to}};return oo=new Drawer({props:so}),to[27](oo),oo.$on("drawerHide",to[22]),oo.$on("drawerShow",to[28]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),ao&&ao.c(),ro=space$1(),create_component(oo.$$.fragment),attr(ue,"class","control svelte-570cq4"),toggle_class(ue,"disabled",to[5])},m(lo,co){insert$1(lo,ue,co),mount_component(eo,ue,null),append$2(ue,no),ao&&ao.m(ue,null),insert$1(lo,ro,co),mount_component(oo,lo,co),io=!0},p(lo,co){const uo={};co[0]&16&&(uo.label=lo[4]),co[0]&32&&(uo.disabled=lo[5]),co[0]&262144&&(uo.readonly=lo[18]),co[0]&294912&&(uo.value=lo[18]?"(JavaScript function)":lo[15]),co[0]&8&&(uo.placeholder=lo[3]),co[0]&512&&(uo.updateOnChange=lo[9]),co[0]&16384&&(uo.autocomplete=lo[14]),eo.$set(uo),!lo[5]&&!lo[11]?ao?(ao.p(lo,co),co[0]&2080&&transition_in(ao,1)):(ao=create_if_block$41(lo),ao.c(),transition_in(ao,1),ao.m(ue,null)):ao&&(group_outros(),transition_out(ao,1,1,()=>{ao=null}),check_outros()),(!io||co[0]&32)&&toggle_class(ue,"disabled",lo[5]);const fo={};co[0]&12&&(fo.title=lo[2]??lo[3]??"Bindings"),co[0]&4096&&(fo.forceModal=lo[12]),co[0]&172483|co[1]&1&&(fo.$$scope={dirty:co,ctx:lo}),oo.$set(fo)},i(lo){io||(transition_in(eo.$$.fragment,lo),transition_in(ao),transition_in(oo.$$.fragment,lo),io=!0)},o(lo){transition_out(eo.$$.fragment,lo),transition_out(ao),transition_out(oo.$$.fragment,lo),io=!1},d(lo){lo&&(detach(ue),detach(ro)),destroy_component(eo),ao&&ao.d(),to[27](null),destroy_component(oo,lo)}}}function instance$8I(to,ue,eo){let no,ro,oo,{panel:io=ClientBindingPanel}=ue,{value:ao=""}=ue,{bindings:so=[]}=ue,{title:lo}=ue,{placeholder:co}=ue,{label:uo}=ue,{disabled:fo=!1}=ue,{allowHBS:po=!0}=ue,{allowJS:ho=!0}=ue,{allowHelpers:_o=!0}=ue,{updateOnChange:go=!0}=ue,{key:bo}=ue,{disableBindings:vo=!1}=ue,{forceModal:yo=!1}=ue,{context:wo=null}=ue,{autocomplete:ko}=ue;const So=createEventDispatcher();let Ao,Io=ao;const Eo=()=>{Ro(ro),zo(),builderStore.propertyFocus(),Ao.hide()};setContext("binding-drawer-actions",{save:Eo});const Ro=Uo=>{Io=readableToRuntimeBinding(so,Uo),So("change",Io)},zo=()=>{So("blur",Io)},No=Uo=>{builderStore.propertyFocus(),So("drawerHide",Uo.detail)},Fo=Uo=>Ro(Uo.detail),Po=()=>{builderStore.propertyFocus(bo),Ao.show()},To=Uo=>eo(17,ro=Uo.detail);function Lo(Uo){binding_callbacks[Uo?"unshift":"push"](()=>{Ao=Uo,eo(16,Ao)})}function qo(Uo){bubble.call(this,to,Uo)}return to.$$set=Uo=>{"panel"in Uo&&eo(0,io=Uo.panel),"value"in Uo&&eo(23,ao=Uo.value),"bindings"in Uo&&eo(1,so=Uo.bindings),"title"in Uo&&eo(2,lo=Uo.title),"placeholder"in Uo&&eo(3,co=Uo.placeholder),"label"in Uo&&eo(4,uo=Uo.label),"disabled"in Uo&&eo(5,fo=Uo.disabled),"allowHBS"in Uo&&eo(6,po=Uo.allowHBS),"allowJS"in Uo&&eo(7,ho=Uo.allowJS),"allowHelpers"in Uo&&eo(8,_o=Uo.allowHelpers),"updateOnChange"in Uo&&eo(9,go=Uo.updateOnChange),"key"in Uo&&eo(10,bo=Uo.key),"disableBindings"in Uo&&eo(11,vo=Uo.disableBindings),"forceModal"in Uo&&eo(12,yo=Uo.forceModal),"context"in Uo&&eo(13,wo=Uo.context),"autocomplete"in Uo&&eo(14,ko=Uo.autocomplete)},to.$$.update=()=>{to.$$.dirty[0]&8388610&&eo(15,no=runtimeToReadableBinding(so,ao)),to.$$.dirty[0]&32768&&eo(17,ro=no),to.$$.dirty[0]&8388608&&eo(18,oo=isJSBinding(ao))},[io,so,lo,co,uo,fo,po,ho,_o,go,bo,vo,yo,wo,ko,no,Ao,ro,oo,Eo,Ro,zo,No,ao,Fo,Po,To,Lo,qo]}class DrawerBindableInput extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8I,create_fragment$8I,safe_not_equal,{panel:0,value:23,bindings:1,title:2,placeholder:3,label:4,disabled:5,allowHBS:6,allowJS:7,allowHelpers:8,updateOnChange:9,key:10,disableBindings:11,forceModal:12,context:13,autocomplete:14},null,[-1,-1])}}const KeyValueBuilder_svelte_svelte_type_style_lang="";function get_each_context$1E(to,ue,eo){const no=to.slice();return no[39]=ue[eo],no[40]=ue,no[41]=eo,no}function get_each_context_1$q(to,ue,eo){const no=to.slice();return no[42]=ue[eo],no}function create_if_block_2$1f(to){let ue,eo,no,ro=to[4]&&create_if_block_10$6(to),oo=ensure_array_like(to[23]),io=[];for(let so=0;so<oo.length;so+=1)io[so]=create_each_block$1E(get_each_context$1E(to,oo,so));const ao=so=>transition_out(io[so],1,1,()=>{io[so]=null});return{c(){ro&&ro.c(),ue=space$1(),eo=element("div");for(let so=0;so<io.length;so+=1)io[so].c();attr(eo,"class","container svelte-1gk02qa"),toggle_class(eo,"container-active",to[6]),toggle_class(eo,"container-menu",to[13]),toggle_class(eo,"readOnly",to[1]),toggle_class(eo,"readOnly-menu",to[1]&&to[13])},m(so,lo){ro&&ro.m(so,lo),insert$1(so,ue,lo),insert$1(so,eo,lo);for(let co=0;co<io.length;co+=1)io[co]&&io[co].m(eo,null);no=!0},p(so,lo){if(so[4]?ro?(ro.p(so,lo),lo[0]&16&&transition_in(ro,1)):(ro=create_if_block_10$6(so),ro.c(),transition_in(ro,1),ro.m(ue.parentNode,ue)):ro&&(group_outros(),transition_out(ro,1,1,()=>{ro=null}),check_outros()),lo[0]&128840162){oo=ensure_array_like(so[23]);let co;for(co=0;co<oo.length;co+=1){const uo=get_each_context$1E(so,oo,co);io[co]?(io[co].p(uo,lo),transition_in(io[co],1)):(io[co]=create_each_block$1E(uo),io[co].c(),transition_in(io[co],1),io[co].m(eo,null))}for(group_outros(),co=oo.length;co<io.length;co+=1)ao(co);check_outros()}(!no||lo[0]&64)&&toggle_class(eo,"container-active",so[6]),(!no||lo[0]&8192)&&toggle_class(eo,"container-menu",so[13]),(!no||lo[0]&2)&&toggle_class(eo,"readOnly",so[1]),(!no||lo[0]&8194)&&toggle_class(eo,"readOnly-menu",so[1]&&so[13])},i(so){if(!no){transition_in(ro);for(let lo=0;lo<oo.length;lo+=1)transition_in(io[lo]);no=!0}},o(so){transition_out(ro),io=io.filter(Boolean);for(let lo=0;lo<io.length;lo+=1)transition_out(io[lo]);no=!1},d(so){so&&(detach(ue),detach(eo)),ro&&ro.d(so),destroy_each(io,so)}}}function create_if_block_10$6(to){let ue,eo,no,ro,oo,io;eo=new Label({props:{tooltip:to[11],$$slots:{default:[create_default_slot_5$1f]},$$scope:{ctx:to}}}),ro=new Label({props:{$$slots:{default:[create_default_slot_4$1C]},$$scope:{ctx:to}}});let ao=to[6]&&create_if_block_11$3(to);return{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),oo=space$1(),ao&&ao.c(),attr(ue,"class","container svelte-1gk02qa"),toggle_class(ue,"container-active",to[6])},m(so,lo){insert$1(so,ue,lo),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),append$2(ue,oo),ao&&ao.m(ue,null),io=!0},p(so,lo){const co={};lo[0]&2048&&(co.tooltip=so[11]),lo[0]&1152|lo[1]&16384&&(co.$$scope={dirty:lo,ctx:so}),eo.$set(co);const uo={};lo[0]&768|lo[1]&16384&&(uo.$$scope={dirty:lo,ctx:so}),ro.$set(uo),so[6]?ao?lo[0]&64&&transition_in(ao,1):(ao=create_if_block_11$3(so),ao.c(),transition_in(ao,1),ao.m(ue,null)):ao&&(group_outros(),transition_out(ao,1,1,()=>{ao=null}),check_outros()),(!io||lo[0]&64)&&toggle_class(ue,"container-active",so[6])},i(so){io||(transition_in(eo.$$.fragment,so),transition_in(ro.$$.fragment,so),transition_in(ao),io=!0)},o(so){transition_out(eo.$$.fragment,so),transition_out(ro.$$.fragment,so),transition_out(ao),io=!1},d(so){so&&detach(ue),destroy_component(eo),destroy_component(ro),ao&&ao.d()}}}function create_default_slot_5$1f(to){let ue=(to[10]||to[7])+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro[0]&1152&&ue!==(ue=(no[10]||no[7])+"")&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_default_slot_4$1C(to){let ue=(to[9]||to[8])+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro[0]&768&&ue!==(ue=(no[9]||no[8])+"")&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_if_block_11$3(to){let ue,eo;return ue=new Label({props:{$$slots:{default:[create_default_slot_3$2b]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_3$2b(to){let ue;return{c(){ue=text("Active")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_else_block_2$6(to){let ue,eo,no;function ro(io){to[30](io,to[39])}let oo={readonly:to[1]};return to[39].name!==void 0&&(oo.value=to[39].name),ue=new Input$5({props:oo}),binding_callbacks.push(()=>bind$2(ue,"value",ro)),ue.$on("blur",to[26]),{c(){create_component(ue.$$.fragment)},m(io,ao){mount_component(ue,io,ao),no=!0},p(io,ao){to=io;const so={};ao[0]&2&&(so.readonly=to[1]),!eo&&ao[0]&8388608&&(eo=!0,so.value=to[39].name,add_flush_callback(()=>eo=!1)),ue.$set(so)},i(io){no||(transition_in(ue.$$.fragment,io),no=!0)},o(io){transition_out(ue.$$.fragment,io),no=!1},d(io){destroy_component(ue,io)}}}function create_if_block_9$c(to){let ue,eo;function no(...ro){return to[29](to[39],to[40],to[41],...ro)}return ue=new DrawerBindableInput({props:{bindings:to[14],placeholder:to[7],disabled:to[1],value:to[39].name,allowJS:to[19],allowHelpers:to[16],drawerLeft:to[15]}}),ue.$on("blur",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro;const io={};oo[0]&16384&&(io.bindings=to[14]),oo[0]&128&&(io.placeholder=to[7]),oo[0]&2&&(io.disabled=to[1]),oo[0]&8388608&&(io.value=to[39].name),oo[0]&524288&&(io.allowJS=to[19]),oo[0]&65536&&(io.allowHelpers=to[16]),oo[0]&32768&&(io.drawerLeft=to[15]),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_else_block_1$m(to){let ue,eo,no;function ro(io){to[33](io,to[39])}let oo={placeholder:to[8],readonly:to[1]};return to[39].value!==void 0&&(oo.value=to[39].value),ue=new Input$5({props:oo}),binding_callbacks.push(()=>bind$2(ue,"value",ro)),ue.$on("blur",to[26]),{c(){create_component(ue.$$.fragment)},m(io,ao){mount_component(ue,io,ao),no=!0},p(io,ao){to=io;const so={};ao[0]&256&&(so.placeholder=to[8]),ao[0]&2&&(so.readonly=to[1]),!eo&&ao[0]&8388608&&(eo=!0,so.value=to[39].value,add_flush_callback(()=>eo=!1)),ue.$set(so)},i(io){no||(transition_in(ue.$$.fragment,io),no=!0)},o(io){transition_out(ue.$$.fragment,io),no=!1},d(io){destroy_component(ue,io)}}}function create_if_block_8$e(to){let ue,eo;function no(...ro){return to[32](to[39],to[40],to[41],...ro)}return ue=new DrawerBindableInput({props:{bindings:to[14],placeholder:to[8],disabled:to[1],value:to[39].value,allowJS:to[19],allowHelpers:to[16],drawerLeft:to[15]}}),ue.$on("blur",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro;const io={};oo[0]&16384&&(io.bindings=to[14]),oo[0]&256&&(io.placeholder=to[8]),oo[0]&2&&(io.disabled=to[1]),oo[0]&8388608&&(io.value=to[39].value),oo[0]&524288&&(io.allowJS=to[19]),oo[0]&65536&&(io.allowHelpers=to[16]),oo[0]&32768&&(io.drawerLeft=to[15]),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_if_block_7$j(to){let ue,eo,no;function ro(io){to[31](io,to[39])}let oo={compare:to[21],options:to[5]};return to[39].value!==void 0&&(oo.value=to[39].value),ue=new Select_1$1({props:oo}),binding_callbacks.push(()=>bind$2(ue,"value",ro)),ue.$on("change",to[26]),{c(){create_component(ue.$$.fragment)},m(io,ao){mount_component(ue,io,ao),no=!0},p(io,ao){to=io;const so={};ao[0]&2097152&&(so.compare=to[21]),ao[0]&32&&(so.options=to[5]),!eo&&ao[0]&8388608&&(eo=!0,so.value=to[39].value,add_flush_callback(()=>eo=!1)),ue.$set(so)},i(io){no||(transition_in(ue.$$.fragment,io),no=!0)},o(io){transition_out(ue.$$.fragment,io),no=!1},d(io){destroy_component(ue,io)}}}function create_if_block_6$l(to){let ue,eo;return ue=new Select_1$1({props:{readonly:!0,value:"Array",options:["Array"]}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p:noop$6,i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block_5$t(to){let ue,eo,no;function ro(io){to[34](io,to[41])}let oo={};return to[24][to[41]]!==void 0&&(oo.value=to[24][to[41]]),ue=new Toggle({props:oo}),binding_callbacks.push(()=>bind$2(ue,"value",ro)),ue.$on("change",to[26]),{c(){create_component(ue.$$.fragment)},m(io,ao){mount_component(ue,io,ao),no=!0},p(io,ao){to=io;const so={};!eo&&ao[0]&16777216&&(eo=!0,so.value=to[24][to[41]],add_flush_callback(()=>eo=!1)),ue.$set(so)},i(io){no||(transition_in(ue.$$.fragment,io),no=!0)},o(io){transition_out(ue.$$.fragment,io),no=!1},d(io){destroy_component(ue,io)}}}function create_if_block_4$F(to){let ue,eo;function no(){return to[35](to[41])}return ue=new Icon({props:{hoverable:!0,name:"Close"}}),ue.$on("click",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_if_block_3$V(to){let ue,eo;return ue=new ActionMenu({props:{$$slots:{control:[create_control_slot$6],default:[create_default_slot_1$3V]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[0]&8392704|ro[1]&16384&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_2$2O(to){let ue=to[42].text+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro[0]&4096&&ue!==(ue=no[42].text+"")&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_each_block_1$q(to){let ue,eo;function no(){return to[36](to[42],to[39])}return ue=new Item$1({props:{$$slots:{default:[create_default_slot_2$2O]},$$scope:{ctx:to}}}),ue.$on("click",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro;const io={};oo[0]&4096|oo[1]&16384&&(io.$$scope={dirty:oo,ctx:to}),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_default_slot_1$3V(to){let ue,eo,no=ensure_array_like(to[12]),ro=[];for(let io=0;io<no.length;io+=1)ro[io]=create_each_block_1$q(get_each_context_1$q(to,no,io));const oo=io=>transition_out(ro[io],1,1,()=>{ro[io]=null});return{c(){for(let io=0;io<ro.length;io+=1)ro[io].c();ue=space$1()},m(io,ao){for(let so=0;so<ro.length;so+=1)ro[so]&&ro[so].m(io,ao);insert$1(io,ue,ao),eo=!0},p(io,ao){if(ao[0]&8392704){no=ensure_array_like(io[12]);let so;for(so=0;so<no.length;so+=1){const lo=get_each_context_1$q(io,no,so);ro[so]?(ro[so].p(lo,ao),transition_in(ro[so],1)):(ro[so]=create_each_block_1$q(lo),ro[so].c(),transition_in(ro[so],1),ro[so].m(ue.parentNode,ue))}for(group_outros(),so=no.length;so<ro.length;so+=1)oo(so);check_outros()}},i(io){if(!eo){for(let ao=0;ao<no.length;ao+=1)transition_in(ro[ao]);eo=!0}},o(io){ro=ro.filter(Boolean);for(let ao=0;ao<ro.length;ao+=1)transition_out(ro[ao]);eo=!1},d(io){io&&detach(ue),destroy_each(ro,io)}}}function create_control_slot$6(to){let ue,eo,no,ro;return eo=new Icon({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),attr(ue,"slot","control"),attr(ue,"class","control icon svelte-1gk02qa")},m(oo,io){insert$1(oo,ue,io),mount_component(eo,ue,null),append$2(ue,no),ro=!0},p:noop$6,i(oo){ro||(transition_in(eo.$$.fragment,oo),ro=!0)},o(oo){transition_out(eo.$$.fragment,oo),ro=!1},d(oo){oo&&detach(ue),destroy_component(eo)}}}function create_each_block$1E(to){var ko;let ue,eo,no,ro,oo,io,ao,so,lo,co,uo;const fo=[create_if_block_9$c,create_else_block_2$6],po=[];function ho(So,Ao){return So[18]?0:1}ue=ho(to),eo=po[ue]=fo[ue](to);const _o=[create_if_block_6$l,create_if_block_7$j,create_if_block_8$e,create_else_block_1$m],go=[];function bo(So,Ao){return Ao[0]&8388608&&(ro=null),ro==null&&(ro=!!isJsonArray(So[39].value)),ro?0:So[5]?1:So[14]&&So[14].length?2:3}oo=bo(to,[-1,-1]),io=go[oo]=_o[oo](to);let vo=to[6]&&create_if_block_5$t(to),yo=!to[1]&&create_if_block_4$F(to),wo=((ko=to[12])==null?void 0:ko.length)>0&&to[13]&&create_if_block_3$V(to);return{c(){eo.c(),no=space$1(),io.c(),ao=space$1(),vo&&vo.c(),so=space$1(),yo&&yo.c(),lo=space$1(),wo&&wo.c(),co=empty$3()},m(So,Ao){po[ue].m(So,Ao),insert$1(So,no,Ao),go[oo].m(So,Ao),insert$1(So,ao,Ao),vo&&vo.m(So,Ao),insert$1(So,so,Ao),yo&&yo.m(So,Ao),insert$1(So,lo,Ao),wo&&wo.m(So,Ao),insert$1(So,co,Ao),uo=!0},p(So,Ao){var Ro;let Io=ue;ue=ho(So),ue===Io?po[ue].p(So,Ao):(group_outros(),transition_out(po[Io],1,1,()=>{po[Io]=null}),check_outros(),eo=po[ue],eo?eo.p(So,Ao):(eo=po[ue]=fo[ue](So),eo.c()),transition_in(eo,1),eo.m(no.parentNode,no));let Eo=oo;oo=bo(So,Ao),oo===Eo?go[oo].p(So,Ao):(group_outros(),transition_out(go[Eo],1,1,()=>{go[Eo]=null}),check_outros(),io=go[oo],io?io.p(So,Ao):(io=go[oo]=_o[oo](So),io.c()),transition_in(io,1),io.m(ao.parentNode,ao)),So[6]?vo?(vo.p(So,Ao),Ao[0]&64&&transition_in(vo,1)):(vo=create_if_block_5$t(So),vo.c(),transition_in(vo,1),vo.m(so.parentNode,so)):vo&&(group_outros(),transition_out(vo,1,1,()=>{vo=null}),check_outros()),So[1]?yo&&(group_outros(),transition_out(yo,1,1,()=>{yo=null}),check_outros()):yo?(yo.p(So,Ao),Ao[0]&2&&transition_in(yo,1)):(yo=create_if_block_4$F(So),yo.c(),transition_in(yo,1),yo.m(lo.parentNode,lo)),((Ro=So[12])==null?void 0:Ro.length)>0&&So[13]?wo?(wo.p(So,Ao),Ao[0]&12288&&transition_in(wo,1)):(wo=create_if_block_3$V(So),wo.c(),transition_in(wo,1),wo.m(co.parentNode,co)):wo&&(group_outros(),transition_out(wo,1,1,()=>{wo=null}),check_outros())},i(So){uo||(transition_in(eo),transition_in(io),transition_in(vo),transition_in(yo),transition_in(wo),uo=!0)},o(So){transition_out(eo),transition_out(io),transition_out(vo),transition_out(yo),transition_out(wo),uo=!1},d(So){So&&(detach(no),detach(ao),detach(so),detach(lo),detach(co)),po[ue].d(So),go[oo].d(So),vo&&vo.d(So),yo&&yo.d(So),wo&&wo.d(So)}}}function create_if_block$40(to){let ue,eo,no;return eo=new ActionButton({props:{disabled:to[20],icon:"Add",secondary:!0,thin:!0,outline:!0,$$slots:{default:[create_default_slot$5z]},$$scope:{ctx:to}}}),eo.$on("click",to[22]),{c(){ue=element("div"),create_component(eo.$$.fragment)},m(ro,oo){insert$1(ro,ue,oo),mount_component(eo,ue,null),no=!0},p(ro,oo){const io={};oo[0]&1048576&&(io.disabled=ro[20]),oo[0]&131080|oo[1]&16384&&(io.$$scope={dirty:oo,ctx:ro}),eo.$set(io)},i(ro){no||(transition_in(eo.$$.fragment,ro),no=!0)},o(ro){transition_out(eo.$$.fragment,ro),no=!1},d(ro){ro&&detach(ue),destroy_component(eo)}}}function create_else_block$1y(to){let ue=`Add${to[3]?` ${lowercase(to[3])}`:""}`,eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro[0]&8&&ue!==(ue=`Add${no[3]?` ${lowercase(no[3])}`:""}`)&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_if_block_1$26(to){let ue;return{c(){ue=text(to[17])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no[0]&131072&&set_data(ue,eo[17])},d(eo){eo&&detach(ue)}}}function create_default_slot$5z(to){let ue;function eo(oo,io){return oo[17]?create_if_block_1$26:create_else_block$1y}let no=eo(to),ro=no(to);return{c(){ro.c(),ue=empty$3()},m(oo,io){ro.m(oo,io),insert$1(oo,ue,io)},p(oo,io){no===(no=eo(oo))&&ro?ro.p(oo,io):(ro.d(1),ro=no(oo),ro&&(ro.c(),ro.m(ue.parentNode,ue)))},d(oo){oo&&detach(ue),ro.d(oo)}}}function create_fragment$8H(to){let ue=Object.keys(to[0]||{}).length>0,eo,no,ro,oo=ue&&create_if_block_2$1f(to),io=!to[1]&&!to[2]&&create_if_block$40(to);return{c(){oo&&oo.c(),eo=space$1(),io&&io.c(),no=empty$3()},m(ao,so){oo&&oo.m(ao,so),insert$1(ao,eo,so),io&&io.m(ao,so),insert$1(ao,no,so),ro=!0},p(ao,so){so[0]&1&&(ue=Object.keys(ao[0]||{}).length>0),ue?oo?(oo.p(ao,so),so[0]&1&&transition_in(oo,1)):(oo=create_if_block_2$1f(ao),oo.c(),transition_in(oo,1),oo.m(eo.parentNode,eo)):oo&&(group_outros(),transition_out(oo,1,1,()=>{oo=null}),check_outros()),!ao[1]&&!ao[2]?io?(io.p(ao,so),so[0]&6&&transition_in(io,1)):(io=create_if_block$40(ao),io.c(),transition_in(io,1),io.m(no.parentNode,no)):io&&(group_outros(),transition_out(io,1,1,()=>{io=null}),check_outros())},i(ao){ro||(transition_in(oo),transition_in(io),ro=!0)},o(ao){transition_out(oo),transition_out(io),ro=!1},d(ao){ao&&(detach(eo),detach(no)),oo&&oo.d(ao),io&&io.d(ao)}}}function isJsonArray(to){return!to||typeof to=="string"?!1:to.type==="array"?!0:to.type==="json"&&to.subtype==="array"}function instance$8H(to,ue,eo){let no=createEventDispatcher(),{defaults:ro}=ue,{object:oo=ro||{}}=ue,{activity:io={}}=ue,{readOnly:ao}=ue,{noAddButton:so}=ue,{name:lo}=ue,{headings:co=!1}=ue,{options:uo}=ue,{toggle:fo}=ue,{keyPlaceholder:po="Key"}=ue,{valuePlaceholder:ho="Value"}=ue,{valueHeading:_o}=ue,{keyHeading:go}=ue,{tooltip:bo}=ue,{menuItems:vo}=ue,{showMenu:yo=!1}=ue,{bindings:wo=[]}=ue,{bindingDrawerLeft:ko}=ue,{allowHelpers:So=!0}=ue,{customButtonText:Ao=null}=ue,{keyBindings:Io=!1}=ue,{allowJS:Eo=!1}=ue,{actionButtonDisabled:Ro=!1}=ue,{compare:zo=(Jo,ia)=>Jo===ia}=ue,No=Object.entries(oo||{}).map(([Jo,ia])=>({name:Jo,value:ia})),Fo=Po(io);function Po(Jo){if(!Jo||typeof Jo!="object")return[];const ia=Array(No.length);for(let[Yo,sa]of Object.entries(Jo)){const wa=No.find(ba=>ba.name===Yo),ca=No.indexOf(wa);ia[ca]=ca!==-1?sa:!0}return ia}function To(){eo(23,No=[...No,{name:"",value:""}]),eo(24,Fo=[...Fo,!0]),qo()}function Lo(Jo){No.splice(Jo,1),Fo.splice(Jo,1),qo()}function qo(){eo(23,No);const Jo={};for(let ia=0;ia<No.length;ia++){const Yo=No[ia].name;Yo&&(Jo[Yo]=Fo[ia])}eo(27,io=Jo),no("change",No)}const Uo=(Jo,ia,Yo,sa)=>{eo(23,ia[Yo].name=sa.detail,No),qo()};function jo(Jo,ia){to.$$.not_equal(ia.name,Jo)&&(ia.name=Jo,eo(23,No))}function Zo(Jo,ia){to.$$.not_equal(ia.value,Jo)&&(ia.value=Jo,eo(23,No))}const Xo=(Jo,ia,Yo,sa)=>{eo(23,ia[Yo].value=sa.detail,No),qo()};function Qo(Jo,ia){to.$$.not_equal(ia.value,Jo)&&(ia.value=Jo,eo(23,No))}function Ko(Jo,ia){to.$$.not_equal(Fo[ia],Jo)&&(Fo[ia]=Jo,eo(24,Fo))}const ea=Jo=>Lo(Jo),na=(Jo,ia)=>Jo.onClick(ia);return to.$$set=Jo=>{"defaults"in Jo&&eo(28,ro=Jo.defaults),"object"in Jo&&eo(0,oo=Jo.object),"activity"in Jo&&eo(27,io=Jo.activity),"readOnly"in Jo&&eo(1,ao=Jo.readOnly),"noAddButton"in Jo&&eo(2,so=Jo.noAddButton),"name"in Jo&&eo(3,lo=Jo.name),"headings"in Jo&&eo(4,co=Jo.headings),"options"in Jo&&eo(5,uo=Jo.options),"toggle"in Jo&&eo(6,fo=Jo.toggle),"keyPlaceholder"in Jo&&eo(7,po=Jo.keyPlaceholder),"valuePlaceholder"in Jo&&eo(8,ho=Jo.valuePlaceholder),"valueHeading"in Jo&&eo(9,_o=Jo.valueHeading),"keyHeading"in Jo&&eo(10,go=Jo.keyHeading),"tooltip"in Jo&&eo(11,bo=Jo.tooltip),"menuItems"in Jo&&eo(12,vo=Jo.menuItems),"showMenu"in Jo&&eo(13,yo=Jo.showMenu),"bindings"in Jo&&eo(14,wo=Jo.bindings),"bindingDrawerLeft"in Jo&&eo(15,ko=Jo.bindingDrawerLeft),"allowHelpers"in Jo&&eo(16,So=Jo.allowHelpers),"customButtonText"in Jo&&eo(17,Ao=Jo.customButtonText),"keyBindings"in Jo&&eo(18,Io=Jo.keyBindings),"allowJS"in Jo&&eo(19,Eo=Jo.allowJS),"actionButtonDisabled"in Jo&&eo(20,Ro=Jo.actionButtonDisabled),"compare"in Jo&&eo(21,zo=Jo.compare)},to.$$.update=()=>{to.$$.dirty[0]&8388608&&eo(0,oo=No.reduce((Jo,ia)=>({...Jo,[ia.name]:ia.value}),{}))},[oo,ao,so,lo,co,uo,fo,po,ho,_o,go,bo,vo,yo,wo,ko,So,Ao,Io,Eo,Ro,zo,To,No,Fo,Lo,qo,io,ro,Uo,jo,Zo,Xo,Qo,Ko,ea,na]}class KeyValueBuilder extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8H,create_fragment$8H,safe_not_equal,{defaults:28,object:0,activity:27,readOnly:1,noAddButton:2,name:3,headings:4,options:5,toggle:6,keyPlaceholder:7,valuePlaceholder:8,valueHeading:9,keyHeading:10,tooltip:11,menuItems:12,showMenu:13,bindings:14,bindingDrawerLeft:15,allowHelpers:16,customButtonText:17,keyBindings:18,allowJS:19,actionButtonDisabled:20,compare:21,addEntry:22},null,[-1,-1])}get addEntry(){return this.$$.ctx[22]}}const Object_svelte_svelte_type_style_lang="";function create_default_slot_1$3U(to){let ue;return{c(){ue=text(to[0])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no&1&&set_data(ue,eo[0])},d(eo){eo&&detach(ue)}}}function create_default_slot$5y(to){let ue;return{c(){ue=text("Add")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_fragment$8G(to){let ue,eo,no,ro,oo,io,ao;eo=new Label({props:{$$slots:{default:[create_default_slot_1$3U]},$$scope:{ctx:to}}}),ro=new Button({props:{secondary:!0,thin:!0,outline:!0,$$slots:{default:[create_default_slot$5y]},$$scope:{ctx:to}}}),ro.$on("click",function(){is_function(to[2].addEntry())&&to[2].addEntry().apply(this,arguments)});let so={defaults:to[1],noAddButton:!0};return io=new KeyValueBuilder({props:so}),to[3](io),io.$on("change",to[4]),io.$on("blur",to[5]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),oo=space$1(),create_component(io.$$.fragment),attr(ue,"class","form-row ssl svelte-13q83tn")},m(lo,co){insert$1(lo,ue,co),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),insert$1(lo,oo,co),mount_component(io,lo,co),ao=!0},p(lo,[co]){to=lo;const uo={};co&65&&(uo.$$scope={dirty:co,ctx:to}),eo.$set(uo);const fo={};co&64&&(fo.$$scope={dirty:co,ctx:to}),ro.$set(fo);const po={};co&2&&(po.defaults=to[1]),io.$set(po)},i(lo){ao||(transition_in(eo.$$.fragment,lo),transition_in(ro.$$.fragment,lo),transition_in(io.$$.fragment,lo),ao=!0)},o(lo){transition_out(eo.$$.fragment,lo),transition_out(ro.$$.fragment,lo),transition_out(io.$$.fragment,lo),ao=!1},d(lo){lo&&(detach(ue),detach(oo)),destroy_component(eo),destroy_component(ro),to[3](null),destroy_component(io,lo)}}}function instance$8G(to,ue,eo){let{name:no}=ue,{value:ro}=ue,oo;function io(lo){binding_callbacks[lo?"unshift":"push"](()=>{oo=lo,eo(2,oo)})}function ao(lo){bubble.call(this,to,lo)}function so(lo){bubble.call(this,to,lo)}return to.$$set=lo=>{"name"in lo&&eo(0,no=lo.name),"value"in lo&&eo(1,ro=lo.value)},[no,ro,oo,io,ao,so]}let Object$1=class extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8G,create_fragment$8G,safe_not_equal,{name:0,value:1})}};const Boolean_svelte_svelte_type_style_lang="";function create_default_slot$5x(to){let ue;return{c(){ue=text(to[1])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no&2&&set_data(ue,eo[1])},d(eo){eo&&detach(ue)}}}function create_fragment$8F(to){let ue,eo,no,ro,oo;return eo=new Label({props:{$$slots:{default:[create_default_slot$5x]},$$scope:{ctx:to}}}),ro=new Toggle({props:{text:"",value:to[0]}}),ro.$on("blur",to[2]),ro.$on("change",to[3]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),attr(ue,"class","form-row svelte-9sim75")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),oo=!0},p(io,[ao]){const so={};ao&18&&(so.$$scope={dirty:ao,ctx:io}),eo.$set(so);const lo={};ao&1&&(lo.value=io[0]),ro.$set(lo)},i(io){oo||(transition_in(eo.$$.fragment,io),transition_in(ro.$$.fragment,io),oo=!0)},o(io){transition_out(eo.$$.fragment,io),transition_out(ro.$$.fragment,io),oo=!1},d(io){io&&detach(ue),destroy_component(eo),destroy_component(ro)}}}function instance$8F(to,ue,eo){let{value:no}=ue,{name:ro}=ue;function oo(ao){bubble.call(this,to,ao)}function io(ao){bubble.call(this,to,ao)}return to.$$set=ao=>{"value"in ao&&eo(0,no=ao.value),"name"in ao&&eo(1,ro=ao.name)},[no,ro,oo,io]}let Boolean$1=class extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8F,create_fragment$8F,safe_not_equal,{value:0,name:1})}};const LongForm_svelte_svelte_type_style_lang="";function create_default_slot$5w(to){let ue;return{c(){ue=text(to[1])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no&2&&set_data(ue,eo[1])},d(eo){eo&&detach(ue)}}}function create_fragment$8E(to){let ue,eo,no,ro,oo;return eo=new Label({props:{$$slots:{default:[create_default_slot$5w]},$$scope:{ctx:to}}}),ro=new TextArea_1({props:{type:to[0],value:to[2],error:to[3]}}),ro.$on("blur",to[4]),ro.$on("change",to[5]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),attr(ue,"class","form-row svelte-9sim75")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),oo=!0},p(io,[ao]){const so={};ao&66&&(so.$$scope={dirty:ao,ctx:io}),eo.$set(so);const lo={};ao&1&&(lo.type=io[0]),ao&4&&(lo.value=io[2]),ao&8&&(lo.error=io[3]),ro.$set(lo)},i(io){oo||(transition_in(eo.$$.fragment,io),transition_in(ro.$$.fragment,io),oo=!0)},o(io){transition_out(eo.$$.fragment,io),transition_out(ro.$$.fragment,io),oo=!1},d(io){io&&detach(ue),destroy_component(eo),destroy_component(ro)}}}function instance$8E(to,ue,eo){let{type:no}=ue,{name:ro}=ue,{value:oo}=ue,{error:io}=ue;function ao(lo){bubble.call(this,to,lo)}function so(lo){bubble.call(this,to,lo)}return to.$$set=lo=>{"type"in lo&&eo(0,no=lo.type),"name"in lo&&eo(1,ro=lo.name),"value"in lo&&eo(2,oo=lo.value),"error"in lo&&eo(3,io=lo.error)},[no,ro,oo,io,ao,so]}class LongForm extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8E,create_fragment$8E,safe_not_equal,{type:0,name:1,value:2,error:3})}}function get_each_context$1D(to,ue,eo){const no=to.slice();return no[6]=ue[eo],no}function create_each_block$1D(to){let ue,eo;const no=[to[6]];function ro(...io){return to[4](to[6],...io)}let oo={};for(let io=0;io<no.length;io+=1)oo=assign$1(oo,no[io]);return ue=new ConfigInput({props:oo}),ue.$on("change",ro),{c(){create_component(ue.$$.fragment)},m(io,ao){mount_component(ue,io,ao),eo=!0},p(io,ao){to=io;const so=ao&1?get_spread_update(no,[get_spread_object(to[6])]):{};ue.$set(so)},i(io){eo||(transition_in(ue.$$.fragment,io),eo=!0)},o(io){transition_out(ue.$$.fragment,io),eo=!1},d(io){destroy_component(ue,io)}}}function create_default_slot_1$3T(to){let ue,eo,no=ensure_array_like(to[0]),ro=[];for(let io=0;io<no.length;io+=1)ro[io]=create_each_block$1D(get_each_context$1D(to,no,io));const oo=io=>transition_out(ro[io],1,1,()=>{ro[io]=null});return{c(){for(let io=0;io<ro.length;io+=1)ro[io].c();ue=empty$3()},m(io,ao){for(let so=0;so<ro.length;so+=1)ro[so]&&ro[so].m(io,ao);insert$1(io,ue,ao),eo=!0},p(io,ao){if(ao&9){no=ensure_array_like(io[0]);let so;for(so=0;so<no.length;so+=1){const lo=get_each_context$1D(io,no,so);ro[so]?(ro[so].p(lo,ao),transition_in(ro[so],1)):(ro[so]=create_each_block$1D(lo),ro[so].c(),transition_in(ro[so],1),ro[so].m(ue.parentNode,ue))}for(group_outros(),so=no.length;so<ro.length;so+=1)oo(so);check_outros()}},i(io){if(!eo){for(let ao=0;ao<no.length;ao+=1)transition_in(ro[ao]);eo=!0}},o(io){ro=ro.filter(Boolean);for(let ao=0;ao<ro.length;ao+=1)transition_out(ro[ao]);eo=!1},d(io){io&&detach(ue),destroy_each(ro,io)}}}function create_default_slot$5v(to){let ue,eo;return ue=new Layout$n({props:{gap:"S",$$slots:{default:[create_default_slot_1$3T]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&513&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_fragment$8D(to){var no;let ue,eo;return ue=new Accordion({props:{initialOpen:((no=to[2])==null?void 0:no.openByDefault)||Object.values(to[0]).some(func$K),header:to[1],$$slots:{default:[create_default_slot$5v]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,[oo]){var ao;const io={};oo&5&&(io.initialOpen=((ao=ro[2])==null?void 0:ao.openByDefault)||Object.values(ro[0]).some(func$K)),oo&2&&(io.header=ro[1]),oo&513&&(io.$$scope={dirty:oo,ctx:ro}),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}const func$K=to=>!!to.value;function instance$8D(to,ue,eo){let{value:no}=ue,{name:ro}=ue,{config:oo}=ue,io=createEventDispatcher();const ao=(lo,co)=>{const uo=no.map(fo=>({key:fo.key,value:fo.key===lo?co:fo.value}));io("change",uo)},so=(lo,co)=>ao(lo.key,co.detail);return to.$$set=lo=>{"value"in lo&&eo(0,no=lo.value),"name"in lo&&eo(1,ro=lo.name),"config"in lo&&eo(2,oo=lo.config)},[no,ro,oo,ao,so]}class FieldGroup extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8D,create_fragment$8D,safe_not_equal,{value:0,name:1,config:2})}}const String_svelte_svelte_type_style_lang="";function create_default_slot$5u(to){let ue;return{c(){ue=text(to[1])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no&2&&set_data(ue,eo[1])},d(eo){eo&&detach(ue)}}}function create_fragment$8C(to){let ue,eo,no,ro,oo;return eo=new Label({props:{$$slots:{default:[create_default_slot$5u]},$$scope:{ctx:to}}}),ro=new EnvDropdown_1({props:{type:to[0]==="port"?"string":to[0],value:to[2],error:to[3],variables:to[6].variables,environmentVariablesEnabled:to[5].environmentVariablesEnabled,showModal:to[4],handleUpgradePanel:to[7]}}),ro.$on("change",to[8]),ro.$on("blur",to[9]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),attr(ue,"class","form-row svelte-9sim75")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),oo=!0},p(io,[ao]){const so={};ao&1026&&(so.$$scope={dirty:ao,ctx:io}),eo.$set(so);const lo={};ao&1&&(lo.type=io[0]==="port"?"string":io[0]),ao&4&&(lo.value=io[2]),ao&8&&(lo.error=io[3]),ao&64&&(lo.variables=io[6].variables),ao&32&&(lo.environmentVariablesEnabled=io[5].environmentVariablesEnabled),ao&16&&(lo.showModal=io[4]),ro.$set(lo)},i(io){oo||(transition_in(eo.$$.fragment,io),transition_in(ro.$$.fragment,io),oo=!0)},o(io){transition_out(eo.$$.fragment,io),transition_out(ro.$$.fragment,io),oo=!1},d(io){io&&detach(ue),destroy_component(eo),destroy_component(ro)}}}function instance$8C(to,ue,eo){let no,ro;component_subscribe(to,licensing,po=>eo(5,no=po)),component_subscribe(to,environment,po=>eo(6,ro=po));let{type:oo}=ue,{name:io}=ue,{value:ao}=ue,{error:so}=ue,{showModal:lo=()=>{}}=ue;async function co(){await environment.upgradePanelOpened(),no.goToUpgradePage()}function uo(po){bubble.call(this,to,po)}function fo(po){bubble.call(this,to,po)}return to.$$set=po=>{"type"in po&&eo(0,oo=po.type),"name"in po&&eo(1,io=po.name),"value"in po&&eo(2,ao=po.value),"error"in po&&eo(3,so=po.error),"showModal"in po&&eo(4,lo=po.showModal)},[oo,io,ao,so,lo,no,ro,co,uo,fo]}let String$1=class extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8C,create_fragment$8C,safe_not_equal,{type:0,name:1,value:2,error:3,showModal:4})}};const Select_svelte_svelte_type_style_lang="";function create_default_slot$5t(to){let ue;return{c(){ue=text(to[1])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no&2&&set_data(ue,eo[1])},d(eo){eo&&detach(ue)}}}function create_fragment$8B(to){let ue,eo,no,ro,oo;return eo=new Label({props:{$$slots:{default:[create_default_slot$5t]},$$scope:{ctx:to}}}),ro=new Select_1$1({props:{options:to[4].options,type:to[0],value:to[2]||void 0,error:to[3]}}),ro.$on("blur",to[5]),ro.$on("change",to[6]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),attr(ue,"class","form-row svelte-9sim75")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),oo=!0},p(io,[ao]){const so={};ao&130&&(so.$$scope={dirty:ao,ctx:io}),eo.$set(so);const lo={};ao&16&&(lo.options=io[4].options),ao&1&&(lo.type=io[0]),ao&4&&(lo.value=io[2]||void 0),ao&8&&(lo.error=io[3]),ro.$set(lo)},i(io){oo||(transition_in(eo.$$.fragment,io),transition_in(ro.$$.fragment,io),oo=!0)},o(io){transition_out(eo.$$.fragment,io),transition_out(ro.$$.fragment,io),oo=!1},d(io){io&&detach(ue),destroy_component(eo),destroy_component(ro)}}}function instance$8B(to,ue,eo){let{type:no}=ue,{name:ro}=ue,{value:oo}=ue,{error:io}=ue,{config:ao}=ue;function so(co){bubble.call(this,to,co)}function lo(co){bubble.call(this,to,co)}return to.$$set=co=>{"type"in co&&eo(0,no=co.type),"name"in co&&eo(1,ro=co.name),"value"in co&&eo(2,oo=co.value),"error"in co&&eo(3,io=co.error),"config"in co&&eo(4,ao=co.config)},[no,ro,oo,io,ao,so,lo]}class Select_1 extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8B,create_fragment$8B,safe_not_equal,{type:0,name:1,value:2,error:3,config:4})}}function create_fragment$8A(to){let ue,eo,no;var ro=to[6];function oo(io,ao){return{props:{type:io[0],value:io[1],error:io[2],name:io[3],config:io[4],showModal:io[5]}}}return ro&&(ue=construct_svelte_component(ro,oo(to)),ue.$on("blur",to[7]),ue.$on("change",to[8])),{c(){ue&&create_component(ue.$$.fragment),eo=empty$3()},m(io,ao){ue&&mount_component(ue,io,ao),insert$1(io,eo,ao),no=!0},p(io,[ao]){if(ao&64&&ro!==(ro=io[6])){if(ue){group_outros();const so=ue;transition_out(so.$$.fragment,1,0,()=>{destroy_component(so,1)}),check_outros()}ro?(ue=construct_svelte_component(ro,oo(io)),ue.$on("blur",io[7]),ue.$on("change",io[8]),create_component(ue.$$.fragment),transition_in(ue.$$.fragment,1),mount_component(ue,eo.parentNode,eo)):ue=null}else if(ro){const so={};ao&1&&(so.type=io[0]),ao&2&&(so.value=io[1]),ao&4&&(so.error=io[2]),ao&8&&(so.name=io[3]),ao&16&&(so.config=io[4]),ao&32&&(so.showModal=io[5]),ue.$set(so)}},i(io){no||(ue&&transition_in(ue.$$.fragment,io),no=!0)},o(io){ue&&transition_out(ue.$$.fragment,io),no=!1},d(io){io&&detach(eo),ue&&destroy_component(ue,io)}}}function instance$8A(to,ue,eo){let no,{type:ro}=ue,{value:oo}=ue,{error:io}=ue,{name:ao}=ue,{config:so}=ue,{showModal:lo=()=>{}}=ue;const co=po=>po==="object"?Object$1:po==="boolean"?Boolean$1:po==="longForm"?LongForm:po==="fieldGroup"?FieldGroup:po==="select"?Select_1:String$1;function uo(po){bubble.call(this,to,po)}function fo(po){bubble.call(this,to,po)}return to.$$set=po=>{"type"in po&&eo(0,ro=po.type),"value"in po&&eo(1,oo=po.value),"error"in po&&eo(2,io=po.error),"name"in po&&eo(3,ao=po.name),"config"in po&&eo(4,so=po.config),"showModal"in po&&eo(5,lo=po.showModal)},to.$$.update=()=>{to.$$.dirty&1&&eo(6,no=co(ro))},[ro,oo,io,ao,so,lo,no,uo,fo]}class ConfigInput extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8A,create_fragment$8A,safe_not_equal,{type:0,value:1,error:2,name:3,config:4,showModal:5})}}const toString$2=Object.prototype.toString,errorToString=Error.prototype.toString,regExpToString=RegExp.prototype.toString,symbolToString=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",SYMBOL_REGEXP=/^Symbol\((.*)\)(.*)$/;function printNumber(to){return to!=+to?"NaN":to===0&&1/to<0?"-0":""+to}function printSimpleValue(to,ue=!1){if(to==null||to===!0||to===!1)return""+to;const eo=typeof to;if(eo==="number")return printNumber(to);if(eo==="string")return ue?`"${to}"`:to;if(eo==="function")return"[Function "+(to.name||"anonymous")+"]";if(eo==="symbol")return symbolToString.call(to).replace(SYMBOL_REGEXP,"Symbol($1)");const no=toString$2.call(to).slice(8,-1);return no==="Date"?isNaN(to.getTime())?""+to:to.toISOString(to):no==="Error"||to instanceof Error?"["+errorToString.call(to)+"]":no==="RegExp"?regExpToString.call(to):null}function printValue(to,ue){let eo=printSimpleValue(to,ue);return eo!==null?eo:JSON.stringify(to,function(no,ro){let oo=printSimpleValue(this[no],ue);return oo!==null?oo:ro},2)}let mixed={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:to,type:ue,value:eo,originalValue:no})=>{let ro=no!=null&&no!==eo,oo=`${to} must be a \`${ue}\` type, but the final value was: \`${printValue(eo,!0)}\``+(ro?` (cast from the value \`${printValue(no,!0)}\`).`:".");return eo===null&&(oo+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),oo},defined:"${path} must be defined"},string={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},number={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},boolean={isValue:"${path} field must be ${value}"},object={noUnknown:"${path} field has unspecified keys: ${unknown}"},array$1={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed,string,number,date,object,array:array$1,boolean});const isSchema=to=>to&&to.__isYupSchema__;class Condition{constructor(ue,eo){if(this.fn=void 0,this.refs=ue,this.refs=ue,typeof eo=="function"){this.fn=eo;return}if(!has$7(eo,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!eo.then&&!eo.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:no,then:ro,otherwise:oo}=eo,io=typeof no=="function"?no:(...ao)=>ao.every(so=>so===no);this.fn=function(...ao){let so=ao.pop(),lo=ao.pop(),co=io(...ao)?ro:oo;if(co)return typeof co=="function"?co(lo):lo.concat(co.resolve(so))}}resolve(ue,eo){let no=this.refs.map(oo=>oo.getValue(eo==null?void 0:eo.value,eo==null?void 0:eo.parent,eo==null?void 0:eo.context)),ro=this.fn.apply(ue,no.concat(ue,eo));if(ro===void 0||ro===ue)return ue;if(!isSchema(ro))throw new TypeError("conditions must return a schema object");return ro.resolve(eo)}}function toArray$1(to){return to==null?[]:[].concat(to)}function _extends$3(){return _extends$3=Object.assign||function(to){for(var ue=1;ue<arguments.length;ue++){var eo=arguments[ue];for(var no in eo)Object.prototype.hasOwnProperty.call(eo,no)&&(to[no]=eo[no])}return to},_extends$3.apply(this,arguments)}let strReg=/\$\{\s*(\w+)\s*\}/g;class ValidationError extends Error{static formatError(ue,eo){const no=eo.label||eo.path||"this";return no!==eo.path&&(eo=_extends$3({},eo,{path:no})),typeof ue=="string"?ue.replace(strReg,(ro,oo)=>printValue(eo[oo])):typeof ue=="function"?ue(eo):ue}static isError(ue){return ue&&ue.name==="ValidationError"}constructor(ue,eo,no,ro){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=eo,this.path=no,this.type=ro,this.errors=[],this.inner=[],toArray$1(ue).forEach(oo=>{ValidationError.isError(oo)?(this.errors.push(...oo.errors),this.inner=this.inner.concat(oo.inner.length?oo.inner:oo)):this.errors.push(oo)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,ValidationError)}}const once=to=>{let ue=!1;return(...eo)=>{ue||(ue=!0,to(...eo))}};function runTests(to,ue){let{endEarly:eo,tests:no,args:ro,value:oo,errors:io,sort:ao,path:so}=to,lo=once(ue),co=no.length;const uo=[];if(io=io||[],!co)return io.length?lo(new ValidationError(io,oo,so)):lo(null,oo);for(let fo=0;fo<no.length;fo++){const po=no[fo];po(ro,function(_o){if(_o){if(!ValidationError.isError(_o))return lo(_o,oo);if(eo)return _o.value=oo,lo(_o,oo);uo.push(_o)}if(--co<=0){if(uo.length&&(ao&&uo.sort(ao),io.length&&uo.push(...io),io=uo),io.length){lo(new ValidationError(io,oo,so),oo);return}lo(null,oo)}})}}const prefixes$1={context:"$",value:"."};class Reference{constructor(ue,eo={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof ue!="string")throw new TypeError("ref must be a string, got: "+ue);if(this.key=ue.trim(),ue==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===prefixes$1.context,this.isValue=this.key[0]===prefixes$1.value,this.isSibling=!this.isContext&&!this.isValue;let no=this.isContext?prefixes$1.context:this.isValue?prefixes$1.value:"";this.path=this.key.slice(no.length),this.getter=this.path&&propertyExpr.getter(this.path,!0),this.map=eo.map}getValue(ue,eo,no){let ro=this.isContext?no:this.isValue?ue:eo;return this.getter&&(ro=this.getter(ro||{})),this.map&&(ro=this.map(ro)),ro}cast(ue,eo){return this.getValue(ue,eo==null?void 0:eo.parent,eo==null?void 0:eo.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(ue){return ue&&ue.__isYupRef}}Reference.prototype.__isYupRef=!0;function _extends$2(){return _extends$2=Object.assign||function(to){for(var ue=1;ue<arguments.length;ue++){var eo=arguments[ue];for(var no in eo)Object.prototype.hasOwnProperty.call(eo,no)&&(to[no]=eo[no])}return to},_extends$2.apply(this,arguments)}function _objectWithoutPropertiesLoose(to,ue){if(to==null)return{};var eo={},no=Object.keys(to),ro,oo;for(oo=0;oo<no.length;oo++)ro=no[oo],!(ue.indexOf(ro)>=0)&&(eo[ro]=to[ro]);return eo}function createValidation(to){function ue(eo,no){let{value:ro,path:oo="",label:io,options:ao,originalValue:so,sync:lo}=eo,co=_objectWithoutPropertiesLoose(eo,["value","path","label","options","originalValue","sync"]);const{name:uo,test:fo,params:po,message:ho}=to;let{parent:_o,context:go}=ao;function bo(So){return Reference.isRef(So)?So.getValue(ro,_o,go):So}function vo(So={}){const Ao=mapValues$2(_extends$2({value:ro,originalValue:so,label:io,path:So.path||oo},po,So.params),bo),Io=new ValidationError(ValidationError.formatError(So.message||ho,Ao),ro,Ao.path,So.type||uo);return Io.params=Ao,Io}let yo=_extends$2({path:oo,parent:_o,type:uo,createError:vo,resolve:bo,options:ao,originalValue:so},co);if(!lo){try{Promise.resolve(fo.call(yo,ro,yo)).then(So=>{ValidationError.isError(So)?no(So):So?no(null,So):no(vo())}).catch(no)}catch(So){no(So)}return}let wo;try{var ko;if(wo=fo.call(yo,ro,yo),typeof((ko=wo)==null?void 0:ko.then)=="function")throw new Error(`Validation test of type: "${yo.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(So){no(So);return}ValidationError.isError(wo)?no(wo):wo?no(null,wo):no(vo())}return ue.OPTIONS=to,ue}let trim=to=>to.substr(0,to.length-1).substr(1);function getIn(to,ue,eo,no=eo){let ro,oo,io;return ue?(propertyExpr.forEach(ue,(ao,so,lo)=>{let co=so?trim(ao):ao;if(to=to.resolve({context:no,parent:ro,value:eo}),to.innerType){let uo=lo?parseInt(co,10):0;if(eo&&uo>=eo.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${ao}, in the path: ${ue}. because there is no value at that index. `);ro=eo,eo=eo&&eo[uo],to=to.innerType}if(!lo){if(!to.fields||!to.fields[co])throw new Error(`The schema does not contain the path: ${ue}. (failed at: ${io} which is a type: "${to._type}")`);ro=eo,eo=eo&&eo[co],to=to.fields[co]}oo=co,io=so?"["+ao+"]":"."+ao}),{schema:to,parent:ro,parentPath:oo}):{parent:ro,parentPath:ue,schema:to}}class ReferenceSet{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const ue=[];for(const eo of this.list)ue.push(eo);for(const[,eo]of this.refs)ue.push(eo.describe());return ue}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(ue){return this.toArray().reduce((eo,no)=>eo.concat(Reference.isRef(no)?ue(no):no),[])}add(ue){Reference.isRef(ue)?this.refs.set(ue.key,ue):this.list.add(ue)}delete(ue){Reference.isRef(ue)?this.refs.delete(ue.key):this.list.delete(ue)}clone(){const ue=new ReferenceSet;return ue.list=new Set(this.list),ue.refs=new Map(this.refs),ue}merge(ue,eo){const no=this.clone();return ue.list.forEach(ro=>no.add(ro)),ue.refs.forEach(ro=>no.add(ro)),eo.list.forEach(ro=>no.delete(ro)),eo.refs.forEach(ro=>no.delete(ro)),no}}function _extends$1(){return _extends$1=Object.assign||function(to){for(var ue=1;ue<arguments.length;ue++){var eo=arguments[ue];for(var no in eo)Object.prototype.hasOwnProperty.call(eo,no)&&(to[no]=eo[no])}return to},_extends$1.apply(this,arguments)}class BaseSchema{constructor(ue){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new ReferenceSet,this._blacklist=new ReferenceSet,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(mixed.notType)}),this.type=(ue==null?void 0:ue.type)||"mixed",this.spec=_extends$1({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},ue==null?void 0:ue.spec)}get _type(){return this.type}_typeCheck(ue){return!0}clone(ue){if(this._mutate)return ue&&Object.assign(this.spec,ue),this;const eo=Object.create(Object.getPrototypeOf(this));return eo.type=this.type,eo._typeError=this._typeError,eo._whitelistError=this._whitelistError,eo._blacklistError=this._blacklistError,eo._whitelist=this._whitelist.clone(),eo._blacklist=this._blacklist.clone(),eo.exclusiveTests=_extends$1({},this.exclusiveTests),eo.deps=[...this.deps],eo.conditions=[...this.conditions],eo.tests=[...this.tests],eo.transforms=[...this.transforms],eo.spec=clone$3(_extends$1({},this.spec,ue)),eo}label(ue){let eo=this.clone();return eo.spec.label=ue,eo}meta(...ue){if(ue.length===0)return this.spec.meta;let eo=this.clone();return eo.spec.meta=Object.assign(eo.spec.meta||{},ue[0]),eo}withMutation(ue){let eo=this._mutate;this._mutate=!0;let no=ue(this);return this._mutate=eo,no}concat(ue){if(!ue||ue===this)return this;if(ue.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${ue.type}`);let eo=this,no=ue.clone();const ro=_extends$1({},eo.spec,no.spec);return no.spec=ro,no._typeError||(no._typeError=eo._typeError),no._whitelistError||(no._whitelistError=eo._whitelistError),no._blacklistError||(no._blacklistError=eo._blacklistError),no._whitelist=eo._whitelist.merge(ue._whitelist,ue._blacklist),no._blacklist=eo._blacklist.merge(ue._blacklist,ue._whitelist),no.tests=eo.tests,no.exclusiveTests=eo.exclusiveTests,no.withMutation(oo=>{ue.tests.forEach(io=>{oo.test(io.OPTIONS)})}),no.transforms=[...eo.transforms,...no.transforms],no}isType(ue){return this.spec.nullable&&ue===null?!0:this._typeCheck(ue)}resolve(ue){let eo=this;if(eo.conditions.length){let no=eo.conditions;eo=eo.clone(),eo.conditions=[],eo=no.reduce((ro,oo)=>oo.resolve(ro,ue),eo),eo=eo.resolve(ue)}return eo}cast(ue,eo={}){let no=this.resolve(_extends$1({value:ue},eo)),ro=no._cast(ue,eo);if(ue!==void 0&&eo.assert!==!1&&no.isType(ro)!==!0){let oo=printValue(ue),io=printValue(ro);throw new TypeError(`The value of ${eo.path||"field"} could not be cast to a value that satisfies the schema type: "${no._type}".
|
|
852
|
+
all be managed in one place`)},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_else_block_1$n(to){let ue,eo;return ue=new UpgradeButton({}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p:noop$6,i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block_1$28(to){let ue,eo;return ue=new Button({props:{cta:!0,$$slots:{default:[create_default_slot_2$2Q]},$$scope:{ctx:to}}}),ue.$on("click",to[15]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&1073741824&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_2$2Q(to){let ue;return{c(){ue=text("Create snippet")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_each_block$1G(to){let ue,eo=to[27].name+"",no,ro,oo,io,ao,so,lo;function co(...po){return to[20](to[27],...po)}oo=new Icon({props:{name:"Edit",hoverable:!0,newStyles:!0,size:"S"}}),oo.$on("click",co);function uo(...po){return to[21](to[27],...po)}function fo(){return to[22](to[27])}return{c(){ue=element("div"),no=text(eo),ro=space$1(),create_component(oo.$$.fragment),io=space$1(),attr(ue,"class","snippet svelte-10gqizr")},m(po,ho){insert$1(po,ue,ho),append$2(ue,no),append$2(ue,ro),mount_component(oo,ue,null),append$2(ue,io),ao=!0,so||(lo=[listen(ue,"mouseenter",uo),listen(ue,"mouseleave",to[11]),listen(ue,"click",fo)],so=!0)},p(po,ho){to=po,(!ao||ho&512)&&eo!==(eo=to[27].name+"")&&set_data(no,eo)},i(po){ao||(transition_in(oo.$$.fragment,po),ao=!0)},o(po){transition_out(oo.$$.fragment,po),ao=!1},d(po){po&&detach(ue),destroy_component(oo),so=!1,run_all(lo)}}}function create_default_slot_1$3X(to){let ue,eo,no,ro,oo,io,ao,so;const lo=[create_if_block_2$1h,create_else_block_3$2],co=[];function uo(_o,go){return _o[2]?0:1}eo=uo(to),no=co[eo]=lo[eo](to);const fo=[create_if_block$43,create_else_block$1z],po=[];function ho(_o,go){var bo;return _o[2]&&((bo=_o[9])!=null&&bo.length)?0:1}return io=ho(to),ao=po[io]=fo[io](to),{c(){ue=element("div"),no.c(),ro=space$1(),oo=element("div"),ao.c(),attr(ue,"class","header svelte-10gqizr"),attr(oo,"class","snippet-list svelte-10gqizr")},m(_o,go){insert$1(_o,ue,go),co[eo].m(ue,null),insert$1(_o,ro,go),insert$1(_o,oo,go),po[io].m(oo,null),so=!0},p(_o,go){let bo=eo;eo=uo(_o),eo===bo?co[eo].p(_o,go):(group_outros(),transition_out(co[bo],1,1,()=>{co[bo]=null}),check_outros(),no=co[eo],no?no.p(_o,go):(no=co[eo]=lo[eo](_o),no.c()),transition_in(no,1),no.m(ue,null));let vo=io;io=ho(_o),io===vo?po[io].p(_o,go):(group_outros(),transition_out(po[vo],1,1,()=>{po[vo]=null}),check_outros(),ao=po[io],ao?ao.p(_o,go):(ao=po[io]=fo[io](_o),ao.c()),transition_in(ao,1),ao.m(oo,null))},i(_o){so||(transition_in(no),transition_in(ao),so=!0)},o(_o){transition_out(no),transition_out(ao),so=!1},d(_o){_o&&(detach(ue),detach(ro),detach(oo)),co[eo].d(),po[io].d()}}}function create_key_block$h(to){var no;let ue,eo;return ue=new CodeEditor({props:{value:(no=to[6].code)==null?void 0:no.trim(),mode:EditorModes$1.JS,readonly:!0}}),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){var ao;const io={};oo&64&&(io.value=(ao=ro[6].code)==null?void 0:ao.trim()),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_default_slot$5C(to){let ue,eo=to[6],no,ro=create_key_block$h(to);return{c(){ue=element("div"),ro.c(),attr(ue,"class","snippet-popover svelte-10gqizr")},m(oo,io){insert$1(oo,ue,io),ro.m(ue,null),no=!0},p(oo,io){io&64&&safe_not_equal(eo,eo=oo[6])?(group_outros(),transition_out(ro,1,1,noop$6),check_outros(),ro=create_key_block$h(oo),ro.c(),transition_in(ro,1),ro.m(ue,null)):ro.p(oo,io)},i(oo){no||(transition_in(ro),no=!0)},o(oo){transition_out(ro),no=!1},d(oo){oo&&detach(ue),ro.d(oo)}}}function create_fragment$8L(to){let ue,eo,no,ro,oo,io,ao;eo=new Layout$n({props:{noPadding:!0,gap:"S",$$slots:{default:[create_default_slot_1$3X]},$$scope:{ctx:to}}});let so={align:"left-outside",anchor:to[5],minWidth:0,maxWidth:480,maxHeight:480,dismissible:!1,$$slots:{default:[create_default_slot$5C]},$$scope:{ctx:to}};ro=new Popover({props:so}),to[23](ro),ro.$on("mouseenter",to[12]),ro.$on("mouseleave",to[11]);let lo={snippet:to[8]};return io=new SnippetDrawer({props:lo}),to[24](io),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),oo=space$1(),create_component(io.$$.fragment),attr(ue,"class","snippet-side-panel svelte-10gqizr")},m(co,uo){insert$1(co,ue,uo),mount_component(eo,ue,null),insert$1(co,no,uo),mount_component(ro,co,uo),insert$1(co,oo,uo),mount_component(io,co,uo),ao=!0},p(co,[uo]){const fo={};uo&1073742351&&(fo.$$scope={dirty:uo,ctx:co}),eo.$set(fo);const po={};uo&32&&(po.anchor=co[5]),uo&1073741888&&(po.$$scope={dirty:uo,ctx:co}),ro.$set(po);const ho={};uo&256&&(ho.snippet=co[8]),io.$set(ho)},i(co){ao||(transition_in(eo.$$.fragment,co),transition_in(ro.$$.fragment,co),transition_in(io.$$.fragment,co),ao=!0)},o(co){transition_out(eo.$$.fragment,co),transition_out(ro.$$.fragment,co),transition_out(io.$$.fragment,co),ao=!1},d(co){co&&(detach(ue),detach(no),detach(oo)),destroy_component(eo),to[23](null),destroy_component(ro,co),to[24](null),destroy_component(io,co)}}}function instance$8L(to,ue,eo){let no,ro,oo;component_subscribe(to,licensing,Po=>eo(18,oo=Po));let{addSnippet:io}=ue,{snippets:ao}=ue,so="",lo=!1,co,uo,fo,po,ho,_o;const go=(Po,To,Lo)=>!Po||!(To!=null&&To.length)?[]:Lo!=null&&Lo.length?To.filter(qo=>qo.name.toLowerCase().includes(Lo.toLowerCase())):To,bo=(Po,To)=>{yo(),eo(5,uo=To),eo(6,fo=Po),co.show()},vo=()=>{po=setTimeout(()=>{co.hide(),eo(5,uo=null),eo(6,fo=null),po=null},100)},yo=()=>{po&&(clearTimeout(po),po=null)},wo=()=>{eo(3,lo=!0),eo(1,so="")},ko=()=>{eo(3,lo=!1),eo(1,so="")},So=()=>{eo(8,_o=null),ho.show()},Ao=(Po,To)=>{Po.preventDefault(),Po.stopPropagation(),eo(8,_o=To),ho.show()};function Io(Po){so=Po,eo(1,so)}const Eo=(Po,To)=>Ao(To,Po),Ro=(Po,To)=>bo(Po,To.target),zo=Po=>io(Po);function No(Po){binding_callbacks[Po?"unshift":"push"](()=>{co=Po,eo(4,co)})}function Fo(Po){binding_callbacks[Po?"unshift":"push"](()=>{ho=Po,eo(7,ho)})}return to.$$set=Po=>{"addSnippet"in Po&&eo(0,io=Po.addSnippet),"snippets"in Po&&eo(17,ao=Po.snippets)},to.$$.update=()=>{to.$$.dirty&262144&&eo(2,no=!oo.isFreePlan),to.$$.dirty&131078&&eo(9,ro=go(no,ao,so))},[io,so,no,lo,co,uo,fo,ho,_o,ro,bo,vo,yo,wo,ko,So,Ao,ao,oo,Io,Eo,Ro,zo,No,Fo]}class SnippetSidePanel extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8L,create_fragment$8L,safe_not_equal,{addSnippet:0,snippets:17})}}const BindingType={READABLE:"readableBinding",RUNTIME:"runtimeBinding"};class BindingHelpers{constructor(ue,eo,{disableWrapping:no}={}){this.getCaretPosition=ue,this.insertAtPos=eo,this.disableWrapping=no}onSelectHelper(ue,eo,{js:no,dontDecode:ro}){const oo=this.getCaretPosition(),{start:io,end:ao}=oo;if(no){const so=ro?ue:decodeJSBinding(ue),lo=jsInsert(so,io,ao,eo.text,{helper:!0});this.insertAtPos({start:io,end:ao,value:lo})}else{const so=hbInsert(ue,io,ao,eo.text);this.insertAtPos({start:io,end:ao,value:so})}}onSelectBinding(ue,eo,{js:no,dontDecode:ro,type:oo=BindingType.READABLE}){const{start:io,end:ao}=this.getCaretPosition();if(no){const so=ro?ue:decodeJSBinding(ue),lo=jsInsert(so,io,ao,eo[oo],{disableWrapping:this.disableWrapping});this.insertAtPos({start:io,end:ao,value:lo})}else{const so=hbInsert(ue,io,ao,eo[oo]);this.insertAtPos({start:io,end:ao,value:so})}}onSelectSnippet(ue){const eo=this.getCaretPosition(),{start:no,end:ro}=eo;this.insertAtPos({start:no,end:ro,value:`snippets.${ue.name}`})}}const BindingPanel_svelte_svelte_type_style_lang="";function get_each_context$1F(to,ue,eo){const no=to.slice();return no[62]=ue[eo],no}function get_each_context_1$r(to,ue,eo){const no=to.slice();return no[14]=ue[eo],no}function create_if_block_6$m(to){let ue,eo,no,ro,oo,io=ensure_array_like(to[19]),ao=[];for(let fo=0;fo<io.length;fo+=1)ao[fo]=create_each_block_1$r(get_each_context_1$r(to,io,fo));const so=fo=>transition_out(ao[fo],1,1,()=>{ao[fo]=null});let lo=ensure_array_like(to[12]),co=[];for(let fo=0;fo<lo.length;fo+=1)co[fo]=create_each_block$1F(get_each_context$1F(to,lo,fo));const uo=fo=>transition_out(co[fo],1,1,()=>{co[fo]=null});return{c(){ue=element("div"),eo=element("div");for(let fo=0;fo<ao.length;fo+=1)ao[fo].c();no=space$1(),ro=element("div");for(let fo=0;fo<co.length;fo+=1)co[fo].c();attr(eo,"class","editor-tabs svelte-biform"),attr(ro,"class","side-tabs svelte-biform"),attr(ue,"class","tabs svelte-biform")},m(fo,po){insert$1(fo,ue,po),append$2(ue,eo);for(let ho=0;ho<ao.length;ho+=1)ao[ho]&&ao[ho].m(eo,null);append$2(ue,no),append$2(ue,ro);for(let ho=0;ho<co.length;ho+=1)co[ho]&&co[ho].m(ro,null);oo=!0},p(fo,po){if(po[0]&268959808){io=ensure_array_like(fo[19]);let ho;for(ho=0;ho<io.length;ho+=1){const _o=get_each_context_1$r(fo,io,ho);ao[ho]?(ao[ho].p(_o,po),transition_in(ao[ho],1)):(ao[ho]=create_each_block_1$r(_o),ao[ho].c(),transition_in(ao[ho],1),ao[ho].m(eo,null))}for(group_outros(),ho=io.length;ho<ao.length;ho+=1)so(ho);check_outros()}if(po[0]&1073746048){lo=ensure_array_like(fo[12]);let ho;for(ho=0;ho<lo.length;ho+=1){const _o=get_each_context$1F(fo,lo,ho);co[ho]?(co[ho].p(_o,po),transition_in(co[ho],1)):(co[ho]=create_each_block$1F(_o),co[ho].c(),transition_in(co[ho],1),co[ho].m(ro,null))}for(group_outros(),ho=lo.length;ho<co.length;ho+=1)uo(ho);check_outros()}},i(fo){if(!oo){for(let po=0;po<io.length;po+=1)transition_in(ao[po]);for(let po=0;po<lo.length;po+=1)transition_in(co[po]);oo=!0}},o(fo){ao=ao.filter(Boolean);for(let po=0;po<ao.length;po+=1)transition_out(ao[po]);co=co.filter(Boolean);for(let po=0;po<co.length;po+=1)transition_out(co[po]);oo=!1},d(fo){fo&&detach(ue),destroy_each(ao,fo),destroy_each(co,fo)}}}function create_default_slot_6$$(to){let ue=capitalise(to[14])+"",eo,no;return{c(){eo=text(ue),no=space$1()},m(ro,oo){insert$1(ro,eo,oo),insert$1(ro,no,oo)},p(ro,oo){oo[0]&524288&&ue!==(ue=capitalise(ro[14])+"")&&set_data(eo,ue)},d(ro){ro&&(detach(eo),detach(no))}}}function create_each_block_1$r(to){let ue,eo;function no(){return to[42](to[14])}return ue=new ActionButton({props:{size:"M",quiet:!0,selected:to[6]===to[14],$$slots:{default:[create_default_slot_6$$]},$$scope:{ctx:to}}}),ue.$on("click",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro;const io={};oo[0]&524352&&(io.selected=to[6]===to[14]),oo[0]&524288|oo[2]&32&&(io.$$scope={dirty:oo,ctx:to}),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_default_slot_5$1g(to){let ue,eo,no;return ue=new Icon({props:{name:to[62],size:"S"}}),{c(){create_component(ue.$$.fragment),eo=space$1()},m(ro,oo){mount_component(ue,ro,oo),insert$1(ro,eo,oo),no=!0},p(ro,oo){const io={};oo[0]&4096&&(io.name=ro[62]),ue.$set(io)},i(ro){no||(transition_in(ue.$$.fragment,ro),no=!0)},o(ro){transition_out(ue.$$.fragment,ro),no=!1},d(ro){ro&&detach(eo),destroy_component(ue,ro)}}}function create_each_block$1F(to){let ue,eo;function no(){return to[43](to[62])}return ue=new ActionButton({props:{size:"M",quiet:!0,selected:to[7]===to[62],$$slots:{default:[create_default_slot_5$1g]},$$scope:{ctx:to}}}),ue.$on("click",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro;const io={};oo[0]&4224&&(io.selected=to[7]===to[62]),oo[0]&4096|oo[2]&32&&(io.$$scope={dirty:oo,ctx:to}),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_if_block_5$u(to){let ue=to[22],eo,no,ro=create_key_block_1(to);return{c(){ro.c(),eo=empty$3()},m(oo,io){ro.m(oo,io),insert$1(oo,eo,io),no=!0},p(oo,io){io[0]&4194304&&safe_not_equal(ue,ue=oo[22])?(group_outros(),transition_out(ro,1,1,noop$6),check_outros(),ro=create_key_block_1(oo),ro.c(),transition_in(ro,1),ro.m(eo.parentNode,eo)):ro.p(oo,io)},i(oo){no||(transition_in(ro),no=!0)},o(oo){transition_out(ro),no=!1},d(oo){oo&&detach(eo),ro.d(oo)}}}function create_if_block_4$G(to){let ue=to[23],eo,no,ro=create_key_block$g(to);return{c(){ro.c(),eo=empty$3()},m(oo,io){ro.m(oo,io),insert$1(oo,eo,io),no=!0},p(oo,io){io[0]&8388608&&safe_not_equal(ue,ue=oo[23])?(group_outros(),transition_out(ro,1,1,noop$6),check_outros(),ro=create_key_block$g(oo),ro.c(),transition_in(ro,1),ro.m(eo.parentNode,eo)):ro.p(oo,io)},i(oo){no||(transition_in(ro),no=!0)},o(oo){transition_out(ro),no=!1},d(oo){oo&&detach(eo),ro.d(oo)}}}function create_key_block_1(to){let ue,eo,no,ro;function oo(so){to[46](so)}function io(so){to[47](so)}let ao={value:decodeJSBinding(to[8]),completions:to[22],mode:EditorModes$1.JS,autofocus:to[3],placeholder:to[4]||"Add bindings by typing $ or use the menu on the right",jsBindingWrapping:!0};return to[10]!==void 0&&(ao.getCaretPosition=to[10]),to[11]!==void 0&&(ao.insertAtPos=to[11]),ue=new CodeEditor({props:ao}),binding_callbacks.push(()=>bind$2(ue,"getCaretPosition",oo)),binding_callbacks.push(()=>bind$2(ue,"insertAtPos",io)),ue.$on("change",to[32]),{c(){create_component(ue.$$.fragment)},m(so,lo){mount_component(ue,so,lo),ro=!0},p(so,lo){const co={};lo[0]&256&&(co.value=decodeJSBinding(so[8])),lo[0]&4194304&&(co.completions=so[22]),lo[0]&8&&(co.autofocus=so[3]),lo[0]&16&&(co.placeholder=so[4]||"Add bindings by typing $ or use the menu on the right"),!eo&&lo[0]&1024&&(eo=!0,co.getCaretPosition=so[10],add_flush_callback(()=>eo=!1)),!no&&lo[0]&2048&&(no=!0,co.insertAtPos=so[11],add_flush_callback(()=>no=!1)),ue.$set(co)},i(so){ro||(transition_in(ue.$$.fragment,so),ro=!0)},o(so){transition_out(ue.$$.fragment,so),ro=!1},d(so){destroy_component(ue,so)}}}function create_key_block$g(to){let ue,eo,no,ro;function oo(so){to[44](so)}function io(so){to[45](so)}let ao={value:to[9],completions:to[23],autofocus:to[3],placeholder:to[4]||"Add bindings by typing {{ or use the menu on the right",jsBindingWrapping:!1};return to[10]!==void 0&&(ao.getCaretPosition=to[10]),to[11]!==void 0&&(ao.insertAtPos=to[11]),ue=new CodeEditor({props:ao}),binding_callbacks.push(()=>bind$2(ue,"getCaretPosition",oo)),binding_callbacks.push(()=>bind$2(ue,"insertAtPos",io)),ue.$on("change",to[31]),{c(){create_component(ue.$$.fragment)},m(so,lo){mount_component(ue,so,lo),ro=!0},p(so,lo){const co={};lo[0]&512&&(co.value=so[9]),lo[0]&8388608&&(co.completions=so[23]),lo[0]&8&&(co.autofocus=so[3]),lo[0]&16&&(co.placeholder=so[4]||"Add bindings by typing {{ or use the menu on the right"),!eo&&lo[0]&1024&&(eo=!0,co.getCaretPosition=so[10],add_flush_callback(()=>eo=!1)),!no&&lo[0]&2048&&(no=!0,co.insertAtPos=so[11],add_flush_callback(()=>no=!1)),ue.$set(co)},i(so){ro||(transition_in(ue.$$.fragment,so),ro=!0)},o(so){transition_out(ue.$$.fragment,so),ro=!1},d(so){destroy_component(ue,so)}}}function create_if_block_3$W(to){let ue,eo,no,ro,oo,io,ao,so,lo,co,uo;return no=new Heading({props:{size:"S",$$slots:{default:[create_default_slot_4$1D]},$$scope:{ctx:to}}}),oo=new Body({props:{$$slots:{default:[create_default_slot_3$2c]},$$scope:{ctx:to}}}),so=new Button({props:{secondary:!0,size:"S",$$slots:{default:[create_default_slot_2$2P]},$$scope:{ctx:to}}}),so.$on("click",to[48]),co=new Button({props:{cta:!0,size:"S",$$slots:{default:[create_default_slot_1$3W]},$$scope:{ctx:to}}}),co.$on("click",to[29]),{c(){ue=element("div"),eo=element("div"),create_component(no.$$.fragment),ro=space$1(),create_component(oo.$$.fragment),io=space$1(),ao=element("div"),create_component(so.$$.fragment),lo=space$1(),create_component(co.$$.fragment),attr(ao,"class","switch-actions svelte-biform"),attr(eo,"class","prompt-body svelte-biform"),attr(ue,"class","mode-overlay svelte-biform")},m(fo,po){insert$1(fo,ue,po),append$2(ue,eo),mount_component(no,eo,null),append$2(eo,ro),mount_component(oo,eo,null),append$2(eo,io),append$2(eo,ao),mount_component(so,ao,null),append$2(ao,lo),mount_component(co,ao,null),uo=!0},p(fo,po){const ho={};po[0]&32768|po[2]&32&&(ho.$$scope={dirty:po,ctx:fo}),no.$set(ho);const _o={};po[2]&32&&(_o.$$scope={dirty:po,ctx:fo}),oo.$set(_o);const go={};po[0]&64|po[2]&32&&(go.$$scope={dirty:po,ctx:fo}),so.$set(go);const bo={};po[0]&64|po[2]&32&&(bo.$$scope={dirty:po,ctx:fo}),co.$set(bo)},i(fo){uo||(transition_in(no.$$.fragment,fo),transition_in(oo.$$.fragment,fo),transition_in(so.$$.fragment,fo),transition_in(co.$$.fragment,fo),uo=!0)},o(fo){transition_out(no.$$.fragment,fo),transition_out(oo.$$.fragment,fo),transition_out(so.$$.fragment,fo),transition_out(co.$$.fragment,fo),uo=!1},d(fo){fo&&detach(ue),destroy_component(no),destroy_component(oo),destroy_component(so),destroy_component(co)}}}function create_default_slot_4$1D(to){let ue,eo,no;return{c(){ue=text("Switch to "),eo=text(to[15]),no=text("?")},m(ro,oo){insert$1(ro,ue,oo),insert$1(ro,eo,oo),insert$1(ro,no,oo)},p(ro,oo){oo[0]&32768&&set_data(eo,ro[15])},d(ro){ro&&(detach(ue),detach(eo),detach(no))}}}function create_default_slot_3$2c(to){let ue;return{c(){ue=text("This will discard anything in your binding")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_default_slot_2$2P(to){let ue,eo;return{c(){ue=text("No - keep "),eo=text(to[6])},m(no,ro){insert$1(no,ue,ro),insert$1(no,eo,ro)},p(no,ro){ro[0]&64&&set_data(eo,no[6])},d(no){no&&(detach(ue),detach(eo))}}}function create_default_slot_1$3W(to){let ue,eo;return{c(){ue=text("Yes - discard "),eo=text(to[6])},m(no,ro){insert$1(no,ue,ro),insert$1(no,eo,ro)},p(no,ro){ro[0]&64&&set_data(eo,no[6])},d(no){no&&(detach(ue),detach(eo))}}}function create_if_block_2$1g(to){let ue,eo;return ue=new SnippetSidePanel({props:{addSnippet:to[49],snippets:to[2]}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[0]&2097152&&(oo.addSnippet=no[49]),ro[0]&4&&(oo.snippets=no[2]),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block_1$27(to){let ue,eo;return ue=new EvaluationSidePanel({props:{expressionResult:to[16],expressionError:to[17],evaluating:to[18],expression:to[20]}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[0]&65536&&(oo.expressionResult=no[16]),ro[0]&131072&&(oo.expressionError=no[17]),ro[0]&262144&&(oo.evaluating=no[18]),ro[0]&1048576&&(oo.expression=no[20]),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block$42(to){let ue,eo;return ue=new BindingSidePanel({props:{bindings:to[13],allowHelpers:to[0],context:to[1],addHelper:to[26],addBinding:to[27],mode:to[14]}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[0]&8192&&(oo.bindings=no[13]),ro[0]&1&&(oo.allowHelpers=no[0]),ro[0]&2&&(oo.context=no[1]),ro[0]&16384&&(oo.mode=no[14]),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot$5B(to){let ue,eo,no,ro,oo,io,ao,so,lo,co,uo,fo,po=to[5]&&create_if_block_6$m(to);const ho=[create_if_block_4$G,create_if_block_5$u],_o=[];function go(ko,So){return ko[6]===ko[24].Text?0:ko[6]===ko[24].JavaScript?1:-1}~(oo=go(to))&&(io=_o[oo]=ho[oo](to));let bo=to[15]&&create_if_block_3$W(to);const vo=[create_if_block$42,create_if_block_1$27,create_if_block_2$1g],yo=[];function wo(ko,So){return ko[7]===ko[25].Bindings?0:ko[7]===ko[25].Evaluation?1:ko[7]===ko[25].Snippets?2:-1}return~(co=wo(to))&&(uo=yo[co]=vo[co](to)),{c(){ue=element("div"),eo=element("div"),po&&po.c(),no=space$1(),ro=element("div"),io&&io.c(),ao=space$1(),bo&&bo.c(),so=space$1(),lo=element("div"),uo&&uo.c(),attr(ro,"class","editor svelte-biform"),attr(eo,"class","main svelte-biform"),attr(lo,"class","side svelte-biform"),toggle_class(lo,"visible",!!to[7]),attr(ue,"class","binding-panel svelte-biform")},m(ko,So){insert$1(ko,ue,So),append$2(ue,eo),po&&po.m(eo,null),append$2(eo,no),append$2(eo,ro),~oo&&_o[oo].m(ro,null),append$2(ro,ao),bo&&bo.m(ro,null),append$2(ue,so),append$2(ue,lo),~co&&yo[co].m(lo,null),fo=!0},p(ko,So){ko[5]?po?(po.p(ko,So),So[0]&32&&transition_in(po,1)):(po=create_if_block_6$m(ko),po.c(),transition_in(po,1),po.m(eo,no)):po&&(group_outros(),transition_out(po,1,1,()=>{po=null}),check_outros());let Ao=oo;oo=go(ko),oo===Ao?~oo&&_o[oo].p(ko,So):(io&&(group_outros(),transition_out(_o[Ao],1,1,()=>{_o[Ao]=null}),check_outros()),~oo?(io=_o[oo],io?io.p(ko,So):(io=_o[oo]=ho[oo](ko),io.c()),transition_in(io,1),io.m(ro,ao)):io=null),ko[15]?bo?(bo.p(ko,So),So[0]&32768&&transition_in(bo,1)):(bo=create_if_block_3$W(ko),bo.c(),transition_in(bo,1),bo.m(ro,null)):bo&&(group_outros(),transition_out(bo,1,1,()=>{bo=null}),check_outros());let Io=co;co=wo(ko),co===Io?~co&&yo[co].p(ko,So):(uo&&(group_outros(),transition_out(yo[Io],1,1,()=>{yo[Io]=null}),check_outros()),~co?(uo=yo[co],uo?uo.p(ko,So):(uo=yo[co]=vo[co](ko),uo.c()),transition_in(uo,1),uo.m(lo,null)):uo=null),(!fo||So[0]&128)&&toggle_class(lo,"visible",!!ko[7])},i(ko){fo||(transition_in(po),transition_in(io),transition_in(bo),transition_in(uo),fo=!0)},o(ko){transition_out(po),transition_out(io),transition_out(bo),transition_out(uo),fo=!1},d(ko){ko&&detach(ue),po&&po.d(),~oo&&_o[oo].d(),bo&&bo.d(),~co&&yo[co].d()}}}function create_fragment$8K(to){let ue,eo;return ue=new DrawerContent({props:{padding:!1,$$slots:{default:[create_default_slot$5B]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[0]&16777215|ro[2]&32&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function instance$8K(to,ue,eo){var Va;let no,ro,oo,io,ao,so,lo,co,uo,fo,po,ho,_o;component_subscribe(to,licensing,xa=>eo(41,_o=xa));const go=createEventDispatcher();let{bindings:bo=[]}=ue,{value:vo=""}=ue,{allowHBS:yo=!0}=ue,{allowJS:wo=!1}=ue,{allowHelpers:ko=!0}=ue,{allowSnippets:So=!0}=ue,{context:Ao=null}=ue,{snippets:Io=null}=ue,{autofocusEditor:Eo=!1}=ue,{placeholder:Ro=null}=ue,{showTabBar:zo=!0}=ue;const No={Text:"Text",JavaScript:"JavaScript"},Fo={Bindings:"FlashOn",Evaluation:"Play",Snippets:"Code"};let Po,To,Lo=(Va=vo==null?void 0:vo.startsWith)==null?void 0:Va.call(vo,"{{ js "),qo=Lo?vo:null,Uo=Lo?null:vo,jo,Zo,Xo=null,Qo,Ko,ea=!1;const na=xa=>[hbAutocomplete([...xa,...getHelperCompletions(EditorModes$1.Handlebars)])],Jo=(xa,as,Za)=>{const gs=[jsAutocomplete([...xa,...getHelperCompletions(EditorModes$1.JS)])];return Za&&gs.push(snippetAutoComplete(as)),gs},ia=(xa,as)=>{let Za=[];return xa&&Za.push(No.Text),as&&Za.push(No.JavaScript),Za},Yo=(xa,as,Za,gs)=>{let Os=[];return xa!=null&&xa.length&&Os.push(Fo.Bindings),as&&Object.keys(as).length>0&&Os.push(Fo.Evaluation),Za&&gs===No.JavaScript&&Os.push(Fo.Snippets),Os},sa=debounce((xa,as,Za)=>{try{eo(17,Ko=null),eo(16,Qo=processStringSync(xa||"",{...as,snippets:Za},{noThrow:!1}))}catch(gs){eo(16,Qo=null),eo(17,Ko=gs)}eo(18,ea=!1)},260),wa=(xa,as,Za)=>{eo(18,ea=!0),sa(xa,as,Za)},ca=xa=>formatHighlight(xa,{keyColor:"#e06c75",numberColor:"#e5c07b",stringColor:"#98c379",trueColor:"#d19a66",falseColor:"#d19a66",nullColor:"#c678dd"}),ba=(xa,as,Za)=>{const gs=xa.map(Qa=>Qa.runtimeBinding.startsWith('trim "')?`{{ ${Qa.runtimeBinding} }}`:`{{ literal ${Qa.runtimeBinding} }}`),Os=processObjectSync(gs,{...as,snippets:Za});return xa.map((Qa,cs)=>{if(!as)return Qa;const Ds=JSON.stringify(Os[cs],null,2);return{...Qa,value:Ds,valueHTML:ca(Ds)}})},Sa=xa=>{const as=readableToRuntimeBinding(io,xa);go("change",xa),wa(as,Ao,Io)},pa=(xa,as)=>{fo.onSelectHelper(as?qo:Uo,xa,{js:as})},La=(xa,{forceJS:as}={})=>{const Za=ao||as;fo.onSelectBinding(Za?qo:Uo,xa,{js:Za})},Pa=xa=>{if(Xo||xa===Po)return;let as=lo;Po===No.JavaScript&&(as=decodeJSBinding(as)),as!=null&&as.length?eo(15,Xo=xa):eo(6,Po=xa)},Da=()=>{eo(8,qo=null),eo(9,Uo=null),Sa(null),eo(6,Po=Xo),eo(15,Xo=null)},ma=xa=>{eo(7,To=xa===To?null:xa)},$a=xa=>{eo(9,Uo=xa.detail),Sa(Uo)},ds=xa=>{var as;eo(8,qo=encodeJSBinding(xa.detail)),(as=xa.detail)!=null&&as.trim()?Sa(qo):Sa(null)};onMount(()=>{const xa=Lo?No.JavaScript:No.Text;ro.includes(xa)?eo(6,Po=xa):eo(6,Po=ro[0]),eo(7,To=oo[0])});const Ha=xa=>Pa(xa),va=xa=>ma(xa);function Aa(xa){jo=xa,eo(10,jo)}function da(xa){Zo=xa,eo(11,Zo)}function ha(xa){jo=xa,eo(10,jo)}function Na(xa){Zo=xa,eo(11,Zo)}const Oa=()=>{eo(15,Xo=null)},Ua=xa=>fo.onSelectSnippet(xa);return to.$$set=xa=>{"bindings"in xa&&eo(33,bo=xa.bindings),"value"in xa&&eo(34,vo=xa.value),"allowHBS"in xa&&eo(35,yo=xa.allowHBS),"allowJS"in xa&&eo(36,wo=xa.allowJS),"allowHelpers"in xa&&eo(0,ko=xa.allowHelpers),"allowSnippets"in xa&&eo(37,So=xa.allowSnippets),"context"in xa&&eo(1,Ao=xa.context),"snippets"in xa&&eo(2,Io=xa.snippets),"autofocusEditor"in xa&&eo(3,Eo=xa.autofocusEditor),"placeholder"in xa&&eo(4,Ro=xa.placeholder),"showTabBar"in xa&&eo(5,zo=xa.showTabBar)},to.$$.update=()=>{to.$$.dirty[1]&1088&&eo(38,no=So&&!_o.isFreePlan),to.$$.dirty[1]&48&&eo(19,ro=ia(yo,wo)),to.$$.dirty[0]&66|to.$$.dirty[1]&68&&eo(12,oo=Yo(bo,Ao,So,Po)),to.$$.dirty[0]&6|to.$$.dirty[1]&4&&eo(13,io=ba(bo,Ao,Io)),to.$$.dirty[0]&64&&(ao=Po===No.JavaScript),to.$$.dirty[0]&64&&eo(14,so=Po===No.JavaScript?EditorModes$1.JS:EditorModes$1.Handlebars),to.$$.dirty[0]&17152&&eo(20,lo=so===EditorModes$1.JS?qo:Uo),to.$$.dirty[0]&8192|to.$$.dirty[1]&8&&eo(40,co=readableToRuntimeBinding(io,vo)),to.$$.dirty[0]&6|to.$$.dirty[1]&512&&wa(co,Ao,Io),to.$$.dirty[0]&24576&&eo(39,uo=bindingsToCompletions(io,so)),to.$$.dirty[0]&3072&&eo(21,fo=new BindingHelpers(jo,Zo)),to.$$.dirty[1]&256&&eo(23,po=na(uo)),to.$$.dirty[0]&4|to.$$.dirty[1]&384&&eo(22,ho=Jo(uo,Io,no)),to.$$.dirty[0]&4224&&To&&!oo.includes(To)&&eo(7,To=oo[0])},[ko,Ao,Io,Eo,Ro,zo,Po,To,qo,Uo,jo,Zo,oo,io,so,Xo,Qo,Ko,ea,ro,lo,fo,ho,po,No,Fo,pa,La,Pa,Da,ma,$a,ds,bo,vo,yo,wo,So,no,uo,co,_o,Ha,va,Aa,da,ha,Na,Oa,Ua]}class BindingPanel extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8K,create_fragment$8K,safe_not_equal,{bindings:33,value:34,allowHBS:35,allowJS:36,allowHelpers:0,allowSnippets:37,context:1,snippets:2,autofocusEditor:3,placeholder:4,showTabBar:5},null,[-1,-1,-1])}}function create_fragment$8J(to){let ue,eo;return ue=new BindingPanel({props:{bindings:to[6],context:{...to[7].selectedComponentContext,...to[5]},snippets:to[8],value:to[0],allowHBS:to[1],allowJS:to[2],allowHelpers:to[3],autofocusEditor:to[4]}}),ue.$on("change",to[10]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,[ro]){const oo={};ro&64&&(oo.bindings=no[6]),ro&160&&(oo.context={...no[7].selectedComponentContext,...no[5]}),ro&256&&(oo.snippets=no[8]),ro&1&&(oo.value=no[0]),ro&2&&(oo.allowHBS=no[1]),ro&4&&(oo.allowJS=no[2]),ro&8&&(oo.allowHelpers=no[3]),ro&16&&(oo.autofocusEditor=no[4]),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function instance$8J(to,ue,eo){let no,ro,oo;component_subscribe(to,previewStore,_o=>eo(7,ro=_o)),component_subscribe(to,snippets$1,_o=>eo(8,oo=_o));let{bindings:io=[]}=ue,{value:ao=""}=ue,{allowHBS:so=!0}=ue,{allowJS:lo=!1}=ue,{allowHelpers:co=!0}=ue,{autofocusEditor:uo=!1}=ue,{context:fo=null}=ue;const po=_o=>_o!=null&&_o.length?_o==null?void 0:_o.map(go=>({...go,type:null})):_o;onMount(previewStore.requestComponentContext);function ho(_o){bubble.call(this,to,_o)}return to.$$set=_o=>{"bindings"in _o&&eo(9,io=_o.bindings),"value"in _o&&eo(0,ao=_o.value),"allowHBS"in _o&&eo(1,so=_o.allowHBS),"allowJS"in _o&&eo(2,lo=_o.allowJS),"allowHelpers"in _o&&eo(3,co=_o.allowHelpers),"autofocusEditor"in _o&&eo(4,uo=_o.autofocusEditor),"context"in _o&&eo(5,fo=_o.context)},to.$$.update=()=>{to.$$.dirty&512&&eo(6,no=po(io))},[ao,so,lo,co,uo,fo,no,ro,oo,io,ho]}class ClientBindingPanel extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8J,create_fragment$8J,safe_not_equal,{bindings:9,value:0,allowHBS:1,allowJS:2,allowHelpers:3,autofocusEditor:4,context:5})}}const DrawerBindableInput_svelte_svelte_type_style_lang="";function create_if_block$41(to){let ue,eo,no,ro,oo;return eo=new Icon({props:{size:"S",name:"FlashOn"}}),{c(){ue=element("div"),create_component(eo.$$.fragment),attr(ue,"class","icon svelte-570cq4")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),no=!0,ro||(oo=listen(ue,"click",to[25]),ro=!0)},p:noop$6,i(io){no||(transition_in(eo.$$.fragment,io),no=!0)},o(io){transition_out(eo.$$.fragment,io),no=!1},d(io){io&&detach(ue),destroy_component(eo),ro=!1,oo()}}}function create_default_slot$5A(to){let ue;return{c(){ue=text("Save")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_buttons_slot$g(to){let ue,eo;return ue=new Button({props:{cta:!0,slot:"buttons",$$slots:{default:[create_default_slot$5A]},$$scope:{ctx:to}}}),ue.$on("click",to[19]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[1]&1&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_body_slot$f(to){let ue,eo,no;var ro=to[0];function oo(io,ao){return{props:{slot:"body",value:io[15],bindings:io[1],allowHBS:io[6],allowJS:io[7],allowHelpers:io[8],context:io[13]}}}return ro&&(ue=construct_svelte_component(ro,oo(to)),ue.$on("change",to[26])),{c(){ue&&create_component(ue.$$.fragment),eo=empty$3()},m(io,ao){ue&&mount_component(ue,io,ao),insert$1(io,eo,ao),no=!0},p(io,ao){if(ao[0]&1&&ro!==(ro=io[0])){if(ue){group_outros();const so=ue;transition_out(so.$$.fragment,1,0,()=>{destroy_component(so,1)}),check_outros()}ro?(ue=construct_svelte_component(ro,oo(io)),ue.$on("change",io[26]),create_component(ue.$$.fragment),transition_in(ue.$$.fragment,1),mount_component(ue,eo.parentNode,eo)):ue=null}else if(ro){const so={};ao[0]&32768&&(so.value=io[15]),ao[0]&2&&(so.bindings=io[1]),ao[0]&64&&(so.allowHBS=io[6]),ao[0]&128&&(so.allowJS=io[7]),ao[0]&256&&(so.allowHelpers=io[8]),ao[0]&8192&&(so.context=io[13]),ue.$set(so)}},i(io){no||(ue&&transition_in(ue.$$.fragment,io),no=!0)},o(io){ue&&transition_out(ue.$$.fragment,io),no=!1},d(io){io&&detach(eo),ue&&destroy_component(ue,io)}}}function create_fragment$8I(to){let ue,eo,no,ro,oo,io;eo=new Input$5({props:{label:to[4],disabled:to[5],readonly:to[18],value:to[18]?"(JavaScript function)":to[15],placeholder:to[3],updateOnChange:to[9],autocomplete:to[14]}}),eo.$on("change",to[24]),eo.$on("blur",to[21]);let ao=!to[5]&&!to[11]&&create_if_block$41(to),so={title:to[2]??to[3]??"Bindings",forceModal:to[12],$$slots:{body:[create_body_slot$f],buttons:[create_buttons_slot$g]},$$scope:{ctx:to}};return oo=new Drawer({props:so}),to[27](oo),oo.$on("drawerHide",to[22]),oo.$on("drawerShow",to[28]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),ao&&ao.c(),ro=space$1(),create_component(oo.$$.fragment),attr(ue,"class","control svelte-570cq4"),toggle_class(ue,"disabled",to[5])},m(lo,co){insert$1(lo,ue,co),mount_component(eo,ue,null),append$2(ue,no),ao&&ao.m(ue,null),insert$1(lo,ro,co),mount_component(oo,lo,co),io=!0},p(lo,co){const uo={};co[0]&16&&(uo.label=lo[4]),co[0]&32&&(uo.disabled=lo[5]),co[0]&262144&&(uo.readonly=lo[18]),co[0]&294912&&(uo.value=lo[18]?"(JavaScript function)":lo[15]),co[0]&8&&(uo.placeholder=lo[3]),co[0]&512&&(uo.updateOnChange=lo[9]),co[0]&16384&&(uo.autocomplete=lo[14]),eo.$set(uo),!lo[5]&&!lo[11]?ao?(ao.p(lo,co),co[0]&2080&&transition_in(ao,1)):(ao=create_if_block$41(lo),ao.c(),transition_in(ao,1),ao.m(ue,null)):ao&&(group_outros(),transition_out(ao,1,1,()=>{ao=null}),check_outros()),(!io||co[0]&32)&&toggle_class(ue,"disabled",lo[5]);const fo={};co[0]&12&&(fo.title=lo[2]??lo[3]??"Bindings"),co[0]&4096&&(fo.forceModal=lo[12]),co[0]&172483|co[1]&1&&(fo.$$scope={dirty:co,ctx:lo}),oo.$set(fo)},i(lo){io||(transition_in(eo.$$.fragment,lo),transition_in(ao),transition_in(oo.$$.fragment,lo),io=!0)},o(lo){transition_out(eo.$$.fragment,lo),transition_out(ao),transition_out(oo.$$.fragment,lo),io=!1},d(lo){lo&&(detach(ue),detach(ro)),destroy_component(eo),ao&&ao.d(),to[27](null),destroy_component(oo,lo)}}}function instance$8I(to,ue,eo){let no,ro,oo,{panel:io=ClientBindingPanel}=ue,{value:ao=""}=ue,{bindings:so=[]}=ue,{title:lo}=ue,{placeholder:co}=ue,{label:uo}=ue,{disabled:fo=!1}=ue,{allowHBS:po=!0}=ue,{allowJS:ho=!0}=ue,{allowHelpers:_o=!0}=ue,{updateOnChange:go=!0}=ue,{key:bo}=ue,{disableBindings:vo=!1}=ue,{forceModal:yo=!1}=ue,{context:wo=null}=ue,{autocomplete:ko}=ue;const So=createEventDispatcher();let Ao,Io=ao;const Eo=()=>{Ro(ro),zo(),builderStore.propertyFocus(),Ao.hide()};setContext("binding-drawer-actions",{save:Eo});const Ro=Uo=>{Io=readableToRuntimeBinding(so,Uo),So("change",Io)},zo=()=>{So("blur",Io)},No=Uo=>{builderStore.propertyFocus(),So("drawerHide",Uo.detail)},Fo=Uo=>Ro(Uo.detail),Po=()=>{builderStore.propertyFocus(bo),Ao.show()},To=Uo=>eo(17,ro=Uo.detail);function Lo(Uo){binding_callbacks[Uo?"unshift":"push"](()=>{Ao=Uo,eo(16,Ao)})}function qo(Uo){bubble.call(this,to,Uo)}return to.$$set=Uo=>{"panel"in Uo&&eo(0,io=Uo.panel),"value"in Uo&&eo(23,ao=Uo.value),"bindings"in Uo&&eo(1,so=Uo.bindings),"title"in Uo&&eo(2,lo=Uo.title),"placeholder"in Uo&&eo(3,co=Uo.placeholder),"label"in Uo&&eo(4,uo=Uo.label),"disabled"in Uo&&eo(5,fo=Uo.disabled),"allowHBS"in Uo&&eo(6,po=Uo.allowHBS),"allowJS"in Uo&&eo(7,ho=Uo.allowJS),"allowHelpers"in Uo&&eo(8,_o=Uo.allowHelpers),"updateOnChange"in Uo&&eo(9,go=Uo.updateOnChange),"key"in Uo&&eo(10,bo=Uo.key),"disableBindings"in Uo&&eo(11,vo=Uo.disableBindings),"forceModal"in Uo&&eo(12,yo=Uo.forceModal),"context"in Uo&&eo(13,wo=Uo.context),"autocomplete"in Uo&&eo(14,ko=Uo.autocomplete)},to.$$.update=()=>{to.$$.dirty[0]&8388610&&eo(15,no=runtimeToReadableBinding(so,ao)),to.$$.dirty[0]&32768&&eo(17,ro=no),to.$$.dirty[0]&8388608&&eo(18,oo=isJSBinding(ao))},[io,so,lo,co,uo,fo,po,ho,_o,go,bo,vo,yo,wo,ko,no,Ao,ro,oo,Eo,Ro,zo,No,ao,Fo,Po,To,Lo,qo]}class DrawerBindableInput extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8I,create_fragment$8I,safe_not_equal,{panel:0,value:23,bindings:1,title:2,placeholder:3,label:4,disabled:5,allowHBS:6,allowJS:7,allowHelpers:8,updateOnChange:9,key:10,disableBindings:11,forceModal:12,context:13,autocomplete:14},null,[-1,-1])}}const KeyValueBuilder_svelte_svelte_type_style_lang="";function get_each_context$1E(to,ue,eo){const no=to.slice();return no[39]=ue[eo],no[40]=ue,no[41]=eo,no}function get_each_context_1$q(to,ue,eo){const no=to.slice();return no[42]=ue[eo],no}function create_if_block_2$1f(to){let ue,eo,no,ro=to[4]&&create_if_block_10$6(to),oo=ensure_array_like(to[23]),io=[];for(let so=0;so<oo.length;so+=1)io[so]=create_each_block$1E(get_each_context$1E(to,oo,so));const ao=so=>transition_out(io[so],1,1,()=>{io[so]=null});return{c(){ro&&ro.c(),ue=space$1(),eo=element("div");for(let so=0;so<io.length;so+=1)io[so].c();attr(eo,"class","container svelte-1gk02qa"),toggle_class(eo,"container-active",to[6]),toggle_class(eo,"container-menu",to[13]),toggle_class(eo,"readOnly",to[1]),toggle_class(eo,"readOnly-menu",to[1]&&to[13])},m(so,lo){ro&&ro.m(so,lo),insert$1(so,ue,lo),insert$1(so,eo,lo);for(let co=0;co<io.length;co+=1)io[co]&&io[co].m(eo,null);no=!0},p(so,lo){if(so[4]?ro?(ro.p(so,lo),lo[0]&16&&transition_in(ro,1)):(ro=create_if_block_10$6(so),ro.c(),transition_in(ro,1),ro.m(ue.parentNode,ue)):ro&&(group_outros(),transition_out(ro,1,1,()=>{ro=null}),check_outros()),lo[0]&128840162){oo=ensure_array_like(so[23]);let co;for(co=0;co<oo.length;co+=1){const uo=get_each_context$1E(so,oo,co);io[co]?(io[co].p(uo,lo),transition_in(io[co],1)):(io[co]=create_each_block$1E(uo),io[co].c(),transition_in(io[co],1),io[co].m(eo,null))}for(group_outros(),co=oo.length;co<io.length;co+=1)ao(co);check_outros()}(!no||lo[0]&64)&&toggle_class(eo,"container-active",so[6]),(!no||lo[0]&8192)&&toggle_class(eo,"container-menu",so[13]),(!no||lo[0]&2)&&toggle_class(eo,"readOnly",so[1]),(!no||lo[0]&8194)&&toggle_class(eo,"readOnly-menu",so[1]&&so[13])},i(so){if(!no){transition_in(ro);for(let lo=0;lo<oo.length;lo+=1)transition_in(io[lo]);no=!0}},o(so){transition_out(ro),io=io.filter(Boolean);for(let lo=0;lo<io.length;lo+=1)transition_out(io[lo]);no=!1},d(so){so&&(detach(ue),detach(eo)),ro&&ro.d(so),destroy_each(io,so)}}}function create_if_block_10$6(to){let ue,eo,no,ro,oo,io;eo=new Label({props:{tooltip:to[11],$$slots:{default:[create_default_slot_5$1f]},$$scope:{ctx:to}}}),ro=new Label({props:{$$slots:{default:[create_default_slot_4$1C]},$$scope:{ctx:to}}});let ao=to[6]&&create_if_block_11$3(to);return{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),oo=space$1(),ao&&ao.c(),attr(ue,"class","container svelte-1gk02qa"),toggle_class(ue,"container-active",to[6])},m(so,lo){insert$1(so,ue,lo),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),append$2(ue,oo),ao&&ao.m(ue,null),io=!0},p(so,lo){const co={};lo[0]&2048&&(co.tooltip=so[11]),lo[0]&1152|lo[1]&16384&&(co.$$scope={dirty:lo,ctx:so}),eo.$set(co);const uo={};lo[0]&768|lo[1]&16384&&(uo.$$scope={dirty:lo,ctx:so}),ro.$set(uo),so[6]?ao?lo[0]&64&&transition_in(ao,1):(ao=create_if_block_11$3(so),ao.c(),transition_in(ao,1),ao.m(ue,null)):ao&&(group_outros(),transition_out(ao,1,1,()=>{ao=null}),check_outros()),(!io||lo[0]&64)&&toggle_class(ue,"container-active",so[6])},i(so){io||(transition_in(eo.$$.fragment,so),transition_in(ro.$$.fragment,so),transition_in(ao),io=!0)},o(so){transition_out(eo.$$.fragment,so),transition_out(ro.$$.fragment,so),transition_out(ao),io=!1},d(so){so&&detach(ue),destroy_component(eo),destroy_component(ro),ao&&ao.d()}}}function create_default_slot_5$1f(to){let ue=(to[10]||to[7])+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro[0]&1152&&ue!==(ue=(no[10]||no[7])+"")&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_default_slot_4$1C(to){let ue=(to[9]||to[8])+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro[0]&768&&ue!==(ue=(no[9]||no[8])+"")&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_if_block_11$3(to){let ue,eo;return ue=new Label({props:{$$slots:{default:[create_default_slot_3$2b]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_3$2b(to){let ue;return{c(){ue=text("Active")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_else_block_2$6(to){let ue,eo,no;function ro(io){to[30](io,to[39])}let oo={readonly:to[1]};return to[39].name!==void 0&&(oo.value=to[39].name),ue=new Input$5({props:oo}),binding_callbacks.push(()=>bind$2(ue,"value",ro)),ue.$on("blur",to[26]),{c(){create_component(ue.$$.fragment)},m(io,ao){mount_component(ue,io,ao),no=!0},p(io,ao){to=io;const so={};ao[0]&2&&(so.readonly=to[1]),!eo&&ao[0]&8388608&&(eo=!0,so.value=to[39].name,add_flush_callback(()=>eo=!1)),ue.$set(so)},i(io){no||(transition_in(ue.$$.fragment,io),no=!0)},o(io){transition_out(ue.$$.fragment,io),no=!1},d(io){destroy_component(ue,io)}}}function create_if_block_9$c(to){let ue,eo;function no(...ro){return to[29](to[39],to[40],to[41],...ro)}return ue=new DrawerBindableInput({props:{bindings:to[14],placeholder:to[7],disabled:to[1],value:to[39].name,allowJS:to[19],allowHelpers:to[16],drawerLeft:to[15]}}),ue.$on("blur",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro;const io={};oo[0]&16384&&(io.bindings=to[14]),oo[0]&128&&(io.placeholder=to[7]),oo[0]&2&&(io.disabled=to[1]),oo[0]&8388608&&(io.value=to[39].name),oo[0]&524288&&(io.allowJS=to[19]),oo[0]&65536&&(io.allowHelpers=to[16]),oo[0]&32768&&(io.drawerLeft=to[15]),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_else_block_1$m(to){let ue,eo,no;function ro(io){to[33](io,to[39])}let oo={placeholder:to[8],readonly:to[1]};return to[39].value!==void 0&&(oo.value=to[39].value),ue=new Input$5({props:oo}),binding_callbacks.push(()=>bind$2(ue,"value",ro)),ue.$on("blur",to[26]),{c(){create_component(ue.$$.fragment)},m(io,ao){mount_component(ue,io,ao),no=!0},p(io,ao){to=io;const so={};ao[0]&256&&(so.placeholder=to[8]),ao[0]&2&&(so.readonly=to[1]),!eo&&ao[0]&8388608&&(eo=!0,so.value=to[39].value,add_flush_callback(()=>eo=!1)),ue.$set(so)},i(io){no||(transition_in(ue.$$.fragment,io),no=!0)},o(io){transition_out(ue.$$.fragment,io),no=!1},d(io){destroy_component(ue,io)}}}function create_if_block_8$e(to){let ue,eo;function no(...ro){return to[32](to[39],to[40],to[41],...ro)}return ue=new DrawerBindableInput({props:{bindings:to[14],placeholder:to[8],disabled:to[1],value:to[39].value,allowJS:to[19],allowHelpers:to[16],drawerLeft:to[15]}}),ue.$on("blur",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro;const io={};oo[0]&16384&&(io.bindings=to[14]),oo[0]&256&&(io.placeholder=to[8]),oo[0]&2&&(io.disabled=to[1]),oo[0]&8388608&&(io.value=to[39].value),oo[0]&524288&&(io.allowJS=to[19]),oo[0]&65536&&(io.allowHelpers=to[16]),oo[0]&32768&&(io.drawerLeft=to[15]),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_if_block_7$j(to){let ue,eo,no;function ro(io){to[31](io,to[39])}let oo={compare:to[21],options:to[5]};return to[39].value!==void 0&&(oo.value=to[39].value),ue=new Select_1$1({props:oo}),binding_callbacks.push(()=>bind$2(ue,"value",ro)),ue.$on("change",to[26]),{c(){create_component(ue.$$.fragment)},m(io,ao){mount_component(ue,io,ao),no=!0},p(io,ao){to=io;const so={};ao[0]&2097152&&(so.compare=to[21]),ao[0]&32&&(so.options=to[5]),!eo&&ao[0]&8388608&&(eo=!0,so.value=to[39].value,add_flush_callback(()=>eo=!1)),ue.$set(so)},i(io){no||(transition_in(ue.$$.fragment,io),no=!0)},o(io){transition_out(ue.$$.fragment,io),no=!1},d(io){destroy_component(ue,io)}}}function create_if_block_6$l(to){let ue,eo;return ue=new Select_1$1({props:{readonly:!0,value:"Array",options:["Array"]}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p:noop$6,i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block_5$t(to){let ue,eo,no;function ro(io){to[34](io,to[41])}let oo={};return to[24][to[41]]!==void 0&&(oo.value=to[24][to[41]]),ue=new Toggle({props:oo}),binding_callbacks.push(()=>bind$2(ue,"value",ro)),ue.$on("change",to[26]),{c(){create_component(ue.$$.fragment)},m(io,ao){mount_component(ue,io,ao),no=!0},p(io,ao){to=io;const so={};!eo&&ao[0]&16777216&&(eo=!0,so.value=to[24][to[41]],add_flush_callback(()=>eo=!1)),ue.$set(so)},i(io){no||(transition_in(ue.$$.fragment,io),no=!0)},o(io){transition_out(ue.$$.fragment,io),no=!1},d(io){destroy_component(ue,io)}}}function create_if_block_4$F(to){let ue,eo;function no(){return to[35](to[41])}return ue=new Icon({props:{hoverable:!0,name:"Close"}}),ue.$on("click",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_if_block_3$V(to){let ue,eo;return ue=new ActionMenu({props:{$$slots:{control:[create_control_slot$6],default:[create_default_slot_1$3V]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro[0]&8392704|ro[1]&16384&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_default_slot_2$2O(to){let ue=to[42].text+"",eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro[0]&4096&&ue!==(ue=no[42].text+"")&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_each_block_1$q(to){let ue,eo;function no(){return to[36](to[42],to[39])}return ue=new Item$1({props:{$$slots:{default:[create_default_slot_2$2O]},$$scope:{ctx:to}}}),ue.$on("click",no),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,oo){to=ro;const io={};oo[0]&4096|oo[1]&16384&&(io.$$scope={dirty:oo,ctx:to}),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}function create_default_slot_1$3V(to){let ue,eo,no=ensure_array_like(to[12]),ro=[];for(let io=0;io<no.length;io+=1)ro[io]=create_each_block_1$q(get_each_context_1$q(to,no,io));const oo=io=>transition_out(ro[io],1,1,()=>{ro[io]=null});return{c(){for(let io=0;io<ro.length;io+=1)ro[io].c();ue=space$1()},m(io,ao){for(let so=0;so<ro.length;so+=1)ro[so]&&ro[so].m(io,ao);insert$1(io,ue,ao),eo=!0},p(io,ao){if(ao[0]&8392704){no=ensure_array_like(io[12]);let so;for(so=0;so<no.length;so+=1){const lo=get_each_context_1$q(io,no,so);ro[so]?(ro[so].p(lo,ao),transition_in(ro[so],1)):(ro[so]=create_each_block_1$q(lo),ro[so].c(),transition_in(ro[so],1),ro[so].m(ue.parentNode,ue))}for(group_outros(),so=no.length;so<ro.length;so+=1)oo(so);check_outros()}},i(io){if(!eo){for(let ao=0;ao<no.length;ao+=1)transition_in(ro[ao]);eo=!0}},o(io){ro=ro.filter(Boolean);for(let ao=0;ao<ro.length;ao+=1)transition_out(ro[ao]);eo=!1},d(io){io&&detach(ue),destroy_each(ro,io)}}}function create_control_slot$6(to){let ue,eo,no,ro;return eo=new Icon({props:{size:"S",hoverable:!0,name:"MoreSmallList"}}),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),attr(ue,"slot","control"),attr(ue,"class","control icon svelte-1gk02qa")},m(oo,io){insert$1(oo,ue,io),mount_component(eo,ue,null),append$2(ue,no),ro=!0},p:noop$6,i(oo){ro||(transition_in(eo.$$.fragment,oo),ro=!0)},o(oo){transition_out(eo.$$.fragment,oo),ro=!1},d(oo){oo&&detach(ue),destroy_component(eo)}}}function create_each_block$1E(to){var ko;let ue,eo,no,ro,oo,io,ao,so,lo,co,uo;const fo=[create_if_block_9$c,create_else_block_2$6],po=[];function ho(So,Ao){return So[18]?0:1}ue=ho(to),eo=po[ue]=fo[ue](to);const _o=[create_if_block_6$l,create_if_block_7$j,create_if_block_8$e,create_else_block_1$m],go=[];function bo(So,Ao){return Ao[0]&8388608&&(ro=null),ro==null&&(ro=!!isJsonArray(So[39].value)),ro?0:So[5]?1:So[14]&&So[14].length?2:3}oo=bo(to,[-1,-1]),io=go[oo]=_o[oo](to);let vo=to[6]&&create_if_block_5$t(to),yo=!to[1]&&create_if_block_4$F(to),wo=((ko=to[12])==null?void 0:ko.length)>0&&to[13]&&create_if_block_3$V(to);return{c(){eo.c(),no=space$1(),io.c(),ao=space$1(),vo&&vo.c(),so=space$1(),yo&&yo.c(),lo=space$1(),wo&&wo.c(),co=empty$3()},m(So,Ao){po[ue].m(So,Ao),insert$1(So,no,Ao),go[oo].m(So,Ao),insert$1(So,ao,Ao),vo&&vo.m(So,Ao),insert$1(So,so,Ao),yo&&yo.m(So,Ao),insert$1(So,lo,Ao),wo&&wo.m(So,Ao),insert$1(So,co,Ao),uo=!0},p(So,Ao){var Ro;let Io=ue;ue=ho(So),ue===Io?po[ue].p(So,Ao):(group_outros(),transition_out(po[Io],1,1,()=>{po[Io]=null}),check_outros(),eo=po[ue],eo?eo.p(So,Ao):(eo=po[ue]=fo[ue](So),eo.c()),transition_in(eo,1),eo.m(no.parentNode,no));let Eo=oo;oo=bo(So,Ao),oo===Eo?go[oo].p(So,Ao):(group_outros(),transition_out(go[Eo],1,1,()=>{go[Eo]=null}),check_outros(),io=go[oo],io?io.p(So,Ao):(io=go[oo]=_o[oo](So),io.c()),transition_in(io,1),io.m(ao.parentNode,ao)),So[6]?vo?(vo.p(So,Ao),Ao[0]&64&&transition_in(vo,1)):(vo=create_if_block_5$t(So),vo.c(),transition_in(vo,1),vo.m(so.parentNode,so)):vo&&(group_outros(),transition_out(vo,1,1,()=>{vo=null}),check_outros()),So[1]?yo&&(group_outros(),transition_out(yo,1,1,()=>{yo=null}),check_outros()):yo?(yo.p(So,Ao),Ao[0]&2&&transition_in(yo,1)):(yo=create_if_block_4$F(So),yo.c(),transition_in(yo,1),yo.m(lo.parentNode,lo)),((Ro=So[12])==null?void 0:Ro.length)>0&&So[13]?wo?(wo.p(So,Ao),Ao[0]&12288&&transition_in(wo,1)):(wo=create_if_block_3$V(So),wo.c(),transition_in(wo,1),wo.m(co.parentNode,co)):wo&&(group_outros(),transition_out(wo,1,1,()=>{wo=null}),check_outros())},i(So){uo||(transition_in(eo),transition_in(io),transition_in(vo),transition_in(yo),transition_in(wo),uo=!0)},o(So){transition_out(eo),transition_out(io),transition_out(vo),transition_out(yo),transition_out(wo),uo=!1},d(So){So&&(detach(no),detach(ao),detach(so),detach(lo),detach(co)),po[ue].d(So),go[oo].d(So),vo&&vo.d(So),yo&&yo.d(So),wo&&wo.d(So)}}}function create_if_block$40(to){let ue,eo,no;return eo=new ActionButton({props:{disabled:to[20],icon:"Add",secondary:!0,thin:!0,outline:!0,$$slots:{default:[create_default_slot$5z]},$$scope:{ctx:to}}}),eo.$on("click",to[22]),{c(){ue=element("div"),create_component(eo.$$.fragment)},m(ro,oo){insert$1(ro,ue,oo),mount_component(eo,ue,null),no=!0},p(ro,oo){const io={};oo[0]&1048576&&(io.disabled=ro[20]),oo[0]&131080|oo[1]&16384&&(io.$$scope={dirty:oo,ctx:ro}),eo.$set(io)},i(ro){no||(transition_in(eo.$$.fragment,ro),no=!0)},o(ro){transition_out(eo.$$.fragment,ro),no=!1},d(ro){ro&&detach(ue),destroy_component(eo)}}}function create_else_block$1y(to){let ue=`Add${to[3]?` ${lowercase(to[3])}`:""}`,eo;return{c(){eo=text(ue)},m(no,ro){insert$1(no,eo,ro)},p(no,ro){ro[0]&8&&ue!==(ue=`Add${no[3]?` ${lowercase(no[3])}`:""}`)&&set_data(eo,ue)},d(no){no&&detach(eo)}}}function create_if_block_1$26(to){let ue;return{c(){ue=text(to[17])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no[0]&131072&&set_data(ue,eo[17])},d(eo){eo&&detach(ue)}}}function create_default_slot$5z(to){let ue;function eo(oo,io){return oo[17]?create_if_block_1$26:create_else_block$1y}let no=eo(to),ro=no(to);return{c(){ro.c(),ue=empty$3()},m(oo,io){ro.m(oo,io),insert$1(oo,ue,io)},p(oo,io){no===(no=eo(oo))&&ro?ro.p(oo,io):(ro.d(1),ro=no(oo),ro&&(ro.c(),ro.m(ue.parentNode,ue)))},d(oo){oo&&detach(ue),ro.d(oo)}}}function create_fragment$8H(to){let ue=Object.keys(to[0]||{}).length>0,eo,no,ro,oo=ue&&create_if_block_2$1f(to),io=!to[1]&&!to[2]&&create_if_block$40(to);return{c(){oo&&oo.c(),eo=space$1(),io&&io.c(),no=empty$3()},m(ao,so){oo&&oo.m(ao,so),insert$1(ao,eo,so),io&&io.m(ao,so),insert$1(ao,no,so),ro=!0},p(ao,so){so[0]&1&&(ue=Object.keys(ao[0]||{}).length>0),ue?oo?(oo.p(ao,so),so[0]&1&&transition_in(oo,1)):(oo=create_if_block_2$1f(ao),oo.c(),transition_in(oo,1),oo.m(eo.parentNode,eo)):oo&&(group_outros(),transition_out(oo,1,1,()=>{oo=null}),check_outros()),!ao[1]&&!ao[2]?io?(io.p(ao,so),so[0]&6&&transition_in(io,1)):(io=create_if_block$40(ao),io.c(),transition_in(io,1),io.m(no.parentNode,no)):io&&(group_outros(),transition_out(io,1,1,()=>{io=null}),check_outros())},i(ao){ro||(transition_in(oo),transition_in(io),ro=!0)},o(ao){transition_out(oo),transition_out(io),ro=!1},d(ao){ao&&(detach(eo),detach(no)),oo&&oo.d(ao),io&&io.d(ao)}}}function isJsonArray(to){return!to||typeof to=="string"?!1:to.type==="array"?!0:to.type==="json"&&to.subtype==="array"}function instance$8H(to,ue,eo){let no=createEventDispatcher(),{defaults:ro}=ue,{object:oo=ro||{}}=ue,{activity:io={}}=ue,{readOnly:ao}=ue,{noAddButton:so}=ue,{name:lo}=ue,{headings:co=!1}=ue,{options:uo}=ue,{toggle:fo}=ue,{keyPlaceholder:po="Key"}=ue,{valuePlaceholder:ho="Value"}=ue,{valueHeading:_o}=ue,{keyHeading:go}=ue,{tooltip:bo}=ue,{menuItems:vo}=ue,{showMenu:yo=!1}=ue,{bindings:wo=[]}=ue,{bindingDrawerLeft:ko}=ue,{allowHelpers:So=!0}=ue,{customButtonText:Ao=null}=ue,{keyBindings:Io=!1}=ue,{allowJS:Eo=!1}=ue,{actionButtonDisabled:Ro=!1}=ue,{compare:zo=(Jo,ia)=>Jo===ia}=ue,No=Object.entries(oo||{}).map(([Jo,ia])=>({name:Jo,value:ia})),Fo=Po(io);function Po(Jo){if(!Jo||typeof Jo!="object")return[];const ia=Array(No.length);for(let[Yo,sa]of Object.entries(Jo)){const wa=No.find(ba=>ba.name===Yo),ca=No.indexOf(wa);ia[ca]=ca!==-1?sa:!0}return ia}function To(){eo(23,No=[...No,{name:"",value:""}]),eo(24,Fo=[...Fo,!0]),qo()}function Lo(Jo){No.splice(Jo,1),Fo.splice(Jo,1),qo()}function qo(){eo(23,No);const Jo={};for(let ia=0;ia<No.length;ia++){const Yo=No[ia].name;Yo&&(Jo[Yo]=Fo[ia])}eo(27,io=Jo),no("change",No)}const Uo=(Jo,ia,Yo,sa)=>{eo(23,ia[Yo].name=sa.detail,No),qo()};function jo(Jo,ia){to.$$.not_equal(ia.name,Jo)&&(ia.name=Jo,eo(23,No))}function Zo(Jo,ia){to.$$.not_equal(ia.value,Jo)&&(ia.value=Jo,eo(23,No))}const Xo=(Jo,ia,Yo,sa)=>{eo(23,ia[Yo].value=sa.detail,No),qo()};function Qo(Jo,ia){to.$$.not_equal(ia.value,Jo)&&(ia.value=Jo,eo(23,No))}function Ko(Jo,ia){to.$$.not_equal(Fo[ia],Jo)&&(Fo[ia]=Jo,eo(24,Fo))}const ea=Jo=>Lo(Jo),na=(Jo,ia)=>Jo.onClick(ia);return to.$$set=Jo=>{"defaults"in Jo&&eo(28,ro=Jo.defaults),"object"in Jo&&eo(0,oo=Jo.object),"activity"in Jo&&eo(27,io=Jo.activity),"readOnly"in Jo&&eo(1,ao=Jo.readOnly),"noAddButton"in Jo&&eo(2,so=Jo.noAddButton),"name"in Jo&&eo(3,lo=Jo.name),"headings"in Jo&&eo(4,co=Jo.headings),"options"in Jo&&eo(5,uo=Jo.options),"toggle"in Jo&&eo(6,fo=Jo.toggle),"keyPlaceholder"in Jo&&eo(7,po=Jo.keyPlaceholder),"valuePlaceholder"in Jo&&eo(8,ho=Jo.valuePlaceholder),"valueHeading"in Jo&&eo(9,_o=Jo.valueHeading),"keyHeading"in Jo&&eo(10,go=Jo.keyHeading),"tooltip"in Jo&&eo(11,bo=Jo.tooltip),"menuItems"in Jo&&eo(12,vo=Jo.menuItems),"showMenu"in Jo&&eo(13,yo=Jo.showMenu),"bindings"in Jo&&eo(14,wo=Jo.bindings),"bindingDrawerLeft"in Jo&&eo(15,ko=Jo.bindingDrawerLeft),"allowHelpers"in Jo&&eo(16,So=Jo.allowHelpers),"customButtonText"in Jo&&eo(17,Ao=Jo.customButtonText),"keyBindings"in Jo&&eo(18,Io=Jo.keyBindings),"allowJS"in Jo&&eo(19,Eo=Jo.allowJS),"actionButtonDisabled"in Jo&&eo(20,Ro=Jo.actionButtonDisabled),"compare"in Jo&&eo(21,zo=Jo.compare)},to.$$.update=()=>{to.$$.dirty[0]&8388608&&eo(0,oo=No.reduce((Jo,ia)=>({...Jo,[ia.name]:ia.value}),{}))},[oo,ao,so,lo,co,uo,fo,po,ho,_o,go,bo,vo,yo,wo,ko,So,Ao,Io,Eo,Ro,zo,To,No,Fo,Lo,qo,io,ro,Uo,jo,Zo,Xo,Qo,Ko,ea,na]}class KeyValueBuilder extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8H,create_fragment$8H,safe_not_equal,{defaults:28,object:0,activity:27,readOnly:1,noAddButton:2,name:3,headings:4,options:5,toggle:6,keyPlaceholder:7,valuePlaceholder:8,valueHeading:9,keyHeading:10,tooltip:11,menuItems:12,showMenu:13,bindings:14,bindingDrawerLeft:15,allowHelpers:16,customButtonText:17,keyBindings:18,allowJS:19,actionButtonDisabled:20,compare:21,addEntry:22},null,[-1,-1])}get addEntry(){return this.$$.ctx[22]}}const Object_svelte_svelte_type_style_lang="";function create_default_slot_1$3U(to){let ue;return{c(){ue=text(to[0])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no&1&&set_data(ue,eo[0])},d(eo){eo&&detach(ue)}}}function create_default_slot$5y(to){let ue;return{c(){ue=text("Add")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_fragment$8G(to){let ue,eo,no,ro,oo,io,ao;eo=new Label({props:{$$slots:{default:[create_default_slot_1$3U]},$$scope:{ctx:to}}}),ro=new Button({props:{secondary:!0,thin:!0,outline:!0,$$slots:{default:[create_default_slot$5y]},$$scope:{ctx:to}}}),ro.$on("click",function(){is_function(to[2].addEntry())&&to[2].addEntry().apply(this,arguments)});let so={defaults:to[1],noAddButton:!0};return io=new KeyValueBuilder({props:so}),to[3](io),io.$on("change",to[4]),io.$on("blur",to[5]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),oo=space$1(),create_component(io.$$.fragment),attr(ue,"class","form-row ssl svelte-13q83tn")},m(lo,co){insert$1(lo,ue,co),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),insert$1(lo,oo,co),mount_component(io,lo,co),ao=!0},p(lo,[co]){to=lo;const uo={};co&65&&(uo.$$scope={dirty:co,ctx:to}),eo.$set(uo);const fo={};co&64&&(fo.$$scope={dirty:co,ctx:to}),ro.$set(fo);const po={};co&2&&(po.defaults=to[1]),io.$set(po)},i(lo){ao||(transition_in(eo.$$.fragment,lo),transition_in(ro.$$.fragment,lo),transition_in(io.$$.fragment,lo),ao=!0)},o(lo){transition_out(eo.$$.fragment,lo),transition_out(ro.$$.fragment,lo),transition_out(io.$$.fragment,lo),ao=!1},d(lo){lo&&(detach(ue),detach(oo)),destroy_component(eo),destroy_component(ro),to[3](null),destroy_component(io,lo)}}}function instance$8G(to,ue,eo){let{name:no}=ue,{value:ro}=ue,oo;function io(lo){binding_callbacks[lo?"unshift":"push"](()=>{oo=lo,eo(2,oo)})}function ao(lo){bubble.call(this,to,lo)}function so(lo){bubble.call(this,to,lo)}return to.$$set=lo=>{"name"in lo&&eo(0,no=lo.name),"value"in lo&&eo(1,ro=lo.value)},[no,ro,oo,io,ao,so]}let Object$1=class extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8G,create_fragment$8G,safe_not_equal,{name:0,value:1})}};const Boolean_svelte_svelte_type_style_lang="";function create_default_slot$5x(to){let ue;return{c(){ue=text(to[1])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no&2&&set_data(ue,eo[1])},d(eo){eo&&detach(ue)}}}function create_fragment$8F(to){let ue,eo,no,ro,oo;return eo=new Label({props:{$$slots:{default:[create_default_slot$5x]},$$scope:{ctx:to}}}),ro=new Toggle({props:{text:"",value:to[0]}}),ro.$on("blur",to[2]),ro.$on("change",to[3]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),attr(ue,"class","form-row svelte-9sim75")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),oo=!0},p(io,[ao]){const so={};ao&18&&(so.$$scope={dirty:ao,ctx:io}),eo.$set(so);const lo={};ao&1&&(lo.value=io[0]),ro.$set(lo)},i(io){oo||(transition_in(eo.$$.fragment,io),transition_in(ro.$$.fragment,io),oo=!0)},o(io){transition_out(eo.$$.fragment,io),transition_out(ro.$$.fragment,io),oo=!1},d(io){io&&detach(ue),destroy_component(eo),destroy_component(ro)}}}function instance$8F(to,ue,eo){let{value:no}=ue,{name:ro}=ue;function oo(ao){bubble.call(this,to,ao)}function io(ao){bubble.call(this,to,ao)}return to.$$set=ao=>{"value"in ao&&eo(0,no=ao.value),"name"in ao&&eo(1,ro=ao.name)},[no,ro,oo,io]}let Boolean$1=class extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8F,create_fragment$8F,safe_not_equal,{value:0,name:1})}};const LongForm_svelte_svelte_type_style_lang="";function create_default_slot$5w(to){let ue;return{c(){ue=text(to[1])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no&2&&set_data(ue,eo[1])},d(eo){eo&&detach(ue)}}}function create_fragment$8E(to){let ue,eo,no,ro,oo;return eo=new Label({props:{$$slots:{default:[create_default_slot$5w]},$$scope:{ctx:to}}}),ro=new TextArea_1({props:{type:to[0],value:to[2],error:to[3]}}),ro.$on("blur",to[4]),ro.$on("change",to[5]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),attr(ue,"class","form-row svelte-9sim75")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),oo=!0},p(io,[ao]){const so={};ao&66&&(so.$$scope={dirty:ao,ctx:io}),eo.$set(so);const lo={};ao&1&&(lo.type=io[0]),ao&4&&(lo.value=io[2]),ao&8&&(lo.error=io[3]),ro.$set(lo)},i(io){oo||(transition_in(eo.$$.fragment,io),transition_in(ro.$$.fragment,io),oo=!0)},o(io){transition_out(eo.$$.fragment,io),transition_out(ro.$$.fragment,io),oo=!1},d(io){io&&detach(ue),destroy_component(eo),destroy_component(ro)}}}function instance$8E(to,ue,eo){let{type:no}=ue,{name:ro}=ue,{value:oo}=ue,{error:io}=ue;function ao(lo){bubble.call(this,to,lo)}function so(lo){bubble.call(this,to,lo)}return to.$$set=lo=>{"type"in lo&&eo(0,no=lo.type),"name"in lo&&eo(1,ro=lo.name),"value"in lo&&eo(2,oo=lo.value),"error"in lo&&eo(3,io=lo.error)},[no,ro,oo,io,ao,so]}class LongForm extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8E,create_fragment$8E,safe_not_equal,{type:0,name:1,value:2,error:3})}}function get_each_context$1D(to,ue,eo){const no=to.slice();return no[6]=ue[eo],no}function create_each_block$1D(to){let ue,eo;const no=[to[6]];function ro(...io){return to[4](to[6],...io)}let oo={};for(let io=0;io<no.length;io+=1)oo=assign$1(oo,no[io]);return ue=new ConfigInput({props:oo}),ue.$on("change",ro),{c(){create_component(ue.$$.fragment)},m(io,ao){mount_component(ue,io,ao),eo=!0},p(io,ao){to=io;const so=ao&1?get_spread_update(no,[get_spread_object(to[6])]):{};ue.$set(so)},i(io){eo||(transition_in(ue.$$.fragment,io),eo=!0)},o(io){transition_out(ue.$$.fragment,io),eo=!1},d(io){destroy_component(ue,io)}}}function create_default_slot_1$3T(to){let ue,eo,no=ensure_array_like(to[0]),ro=[];for(let io=0;io<no.length;io+=1)ro[io]=create_each_block$1D(get_each_context$1D(to,no,io));const oo=io=>transition_out(ro[io],1,1,()=>{ro[io]=null});return{c(){for(let io=0;io<ro.length;io+=1)ro[io].c();ue=empty$3()},m(io,ao){for(let so=0;so<ro.length;so+=1)ro[so]&&ro[so].m(io,ao);insert$1(io,ue,ao),eo=!0},p(io,ao){if(ao&9){no=ensure_array_like(io[0]);let so;for(so=0;so<no.length;so+=1){const lo=get_each_context$1D(io,no,so);ro[so]?(ro[so].p(lo,ao),transition_in(ro[so],1)):(ro[so]=create_each_block$1D(lo),ro[so].c(),transition_in(ro[so],1),ro[so].m(ue.parentNode,ue))}for(group_outros(),so=no.length;so<ro.length;so+=1)oo(so);check_outros()}},i(io){if(!eo){for(let ao=0;ao<no.length;ao+=1)transition_in(ro[ao]);eo=!0}},o(io){ro=ro.filter(Boolean);for(let ao=0;ao<ro.length;ao+=1)transition_out(ro[ao]);eo=!1},d(io){io&&detach(ue),destroy_each(ro,io)}}}function create_default_slot$5v(to){let ue,eo;return ue=new Layout$n({props:{gap:"S",$$slots:{default:[create_default_slot_1$3T]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&513&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_fragment$8D(to){var no;let ue,eo;return ue=new Accordion({props:{initialOpen:((no=to[2])==null?void 0:no.openByDefault)||Object.values(to[0]).some(func$K),header:to[1],$$slots:{default:[create_default_slot$5v]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(ro,oo){mount_component(ue,ro,oo),eo=!0},p(ro,[oo]){var ao;const io={};oo&5&&(io.initialOpen=((ao=ro[2])==null?void 0:ao.openByDefault)||Object.values(ro[0]).some(func$K)),oo&2&&(io.header=ro[1]),oo&513&&(io.$$scope={dirty:oo,ctx:ro}),ue.$set(io)},i(ro){eo||(transition_in(ue.$$.fragment,ro),eo=!0)},o(ro){transition_out(ue.$$.fragment,ro),eo=!1},d(ro){destroy_component(ue,ro)}}}const func$K=to=>!!to.value;function instance$8D(to,ue,eo){let{value:no}=ue,{name:ro}=ue,{config:oo}=ue,io=createEventDispatcher();const ao=(lo,co)=>{const uo=no.map(fo=>({key:fo.key,value:fo.key===lo?co:fo.value}));io("change",uo)},so=(lo,co)=>ao(lo.key,co.detail);return to.$$set=lo=>{"value"in lo&&eo(0,no=lo.value),"name"in lo&&eo(1,ro=lo.name),"config"in lo&&eo(2,oo=lo.config)},[no,ro,oo,ao,so]}class FieldGroup extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8D,create_fragment$8D,safe_not_equal,{value:0,name:1,config:2})}}const String_svelte_svelte_type_style_lang="";function create_default_slot$5u(to){let ue;return{c(){ue=text(to[1])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no&2&&set_data(ue,eo[1])},d(eo){eo&&detach(ue)}}}function create_fragment$8C(to){let ue,eo,no,ro,oo;return eo=new Label({props:{$$slots:{default:[create_default_slot$5u]},$$scope:{ctx:to}}}),ro=new EnvDropdown_1({props:{type:to[0]==="port"?"string":to[0],value:to[2],error:to[3],variables:to[6].variables,environmentVariablesEnabled:to[5].environmentVariablesEnabled,showModal:to[4],handleUpgradePanel:to[7]}}),ro.$on("change",to[8]),ro.$on("blur",to[9]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),attr(ue,"class","form-row svelte-9sim75")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),oo=!0},p(io,[ao]){const so={};ao&1026&&(so.$$scope={dirty:ao,ctx:io}),eo.$set(so);const lo={};ao&1&&(lo.type=io[0]==="port"?"string":io[0]),ao&4&&(lo.value=io[2]),ao&8&&(lo.error=io[3]),ao&64&&(lo.variables=io[6].variables),ao&32&&(lo.environmentVariablesEnabled=io[5].environmentVariablesEnabled),ao&16&&(lo.showModal=io[4]),ro.$set(lo)},i(io){oo||(transition_in(eo.$$.fragment,io),transition_in(ro.$$.fragment,io),oo=!0)},o(io){transition_out(eo.$$.fragment,io),transition_out(ro.$$.fragment,io),oo=!1},d(io){io&&detach(ue),destroy_component(eo),destroy_component(ro)}}}function instance$8C(to,ue,eo){let no,ro;component_subscribe(to,licensing,po=>eo(5,no=po)),component_subscribe(to,environment,po=>eo(6,ro=po));let{type:oo}=ue,{name:io}=ue,{value:ao}=ue,{error:so}=ue,{showModal:lo=()=>{}}=ue;async function co(){await environment.upgradePanelOpened(),no.goToUpgradePage()}function uo(po){bubble.call(this,to,po)}function fo(po){bubble.call(this,to,po)}return to.$$set=po=>{"type"in po&&eo(0,oo=po.type),"name"in po&&eo(1,io=po.name),"value"in po&&eo(2,ao=po.value),"error"in po&&eo(3,so=po.error),"showModal"in po&&eo(4,lo=po.showModal)},[oo,io,ao,so,lo,no,ro,co,uo,fo]}let String$1=class extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8C,create_fragment$8C,safe_not_equal,{type:0,name:1,value:2,error:3,showModal:4})}};const Select_svelte_svelte_type_style_lang="";function create_default_slot$5t(to){let ue;return{c(){ue=text(to[1])},m(eo,no){insert$1(eo,ue,no)},p(eo,no){no&2&&set_data(ue,eo[1])},d(eo){eo&&detach(ue)}}}function create_fragment$8B(to){let ue,eo,no,ro,oo;return eo=new Label({props:{$$slots:{default:[create_default_slot$5t]},$$scope:{ctx:to}}}),ro=new Select_1$1({props:{options:to[4].options,type:to[0],value:to[2]||void 0,error:to[3]}}),ro.$on("blur",to[5]),ro.$on("change",to[6]),{c(){ue=element("div"),create_component(eo.$$.fragment),no=space$1(),create_component(ro.$$.fragment),attr(ue,"class","form-row svelte-9sim75")},m(io,ao){insert$1(io,ue,ao),mount_component(eo,ue,null),append$2(ue,no),mount_component(ro,ue,null),oo=!0},p(io,[ao]){const so={};ao&130&&(so.$$scope={dirty:ao,ctx:io}),eo.$set(so);const lo={};ao&16&&(lo.options=io[4].options),ao&1&&(lo.type=io[0]),ao&4&&(lo.value=io[2]||void 0),ao&8&&(lo.error=io[3]),ro.$set(lo)},i(io){oo||(transition_in(eo.$$.fragment,io),transition_in(ro.$$.fragment,io),oo=!0)},o(io){transition_out(eo.$$.fragment,io),transition_out(ro.$$.fragment,io),oo=!1},d(io){io&&detach(ue),destroy_component(eo),destroy_component(ro)}}}function instance$8B(to,ue,eo){let{type:no}=ue,{name:ro}=ue,{value:oo}=ue,{error:io}=ue,{config:ao}=ue;function so(co){bubble.call(this,to,co)}function lo(co){bubble.call(this,to,co)}return to.$$set=co=>{"type"in co&&eo(0,no=co.type),"name"in co&&eo(1,ro=co.name),"value"in co&&eo(2,oo=co.value),"error"in co&&eo(3,io=co.error),"config"in co&&eo(4,ao=co.config)},[no,ro,oo,io,ao,so,lo]}class Select_1 extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8B,create_fragment$8B,safe_not_equal,{type:0,name:1,value:2,error:3,config:4})}}function create_fragment$8A(to){let ue,eo,no;var ro=to[6];function oo(io,ao){return{props:{type:io[0],value:io[1],error:io[2],name:io[3],config:io[4],showModal:io[5]}}}return ro&&(ue=construct_svelte_component(ro,oo(to)),ue.$on("blur",to[7]),ue.$on("change",to[8])),{c(){ue&&create_component(ue.$$.fragment),eo=empty$3()},m(io,ao){ue&&mount_component(ue,io,ao),insert$1(io,eo,ao),no=!0},p(io,[ao]){if(ao&64&&ro!==(ro=io[6])){if(ue){group_outros();const so=ue;transition_out(so.$$.fragment,1,0,()=>{destroy_component(so,1)}),check_outros()}ro?(ue=construct_svelte_component(ro,oo(io)),ue.$on("blur",io[7]),ue.$on("change",io[8]),create_component(ue.$$.fragment),transition_in(ue.$$.fragment,1),mount_component(ue,eo.parentNode,eo)):ue=null}else if(ro){const so={};ao&1&&(so.type=io[0]),ao&2&&(so.value=io[1]),ao&4&&(so.error=io[2]),ao&8&&(so.name=io[3]),ao&16&&(so.config=io[4]),ao&32&&(so.showModal=io[5]),ue.$set(so)}},i(io){no||(ue&&transition_in(ue.$$.fragment,io),no=!0)},o(io){ue&&transition_out(ue.$$.fragment,io),no=!1},d(io){io&&detach(eo),ue&&destroy_component(ue,io)}}}function instance$8A(to,ue,eo){let no,{type:ro}=ue,{value:oo}=ue,{error:io}=ue,{name:ao}=ue,{config:so}=ue,{showModal:lo=()=>{}}=ue;const co=po=>po==="object"?Object$1:po==="boolean"?Boolean$1:po==="longForm"?LongForm:po==="fieldGroup"?FieldGroup:po==="select"?Select_1:String$1;function uo(po){bubble.call(this,to,po)}function fo(po){bubble.call(this,to,po)}return to.$$set=po=>{"type"in po&&eo(0,ro=po.type),"value"in po&&eo(1,oo=po.value),"error"in po&&eo(2,io=po.error),"name"in po&&eo(3,ao=po.name),"config"in po&&eo(4,so=po.config),"showModal"in po&&eo(5,lo=po.showModal)},to.$$.update=()=>{to.$$.dirty&1&&eo(6,no=co(ro))},[ro,oo,io,ao,so,lo,no,uo,fo]}class ConfigInput extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8A,create_fragment$8A,safe_not_equal,{type:0,value:1,error:2,name:3,config:4,showModal:5})}}const toString$2=Object.prototype.toString,errorToString=Error.prototype.toString,regExpToString=RegExp.prototype.toString,symbolToString=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",SYMBOL_REGEXP=/^Symbol\((.*)\)(.*)$/;function printNumber(to){return to!=+to?"NaN":to===0&&1/to<0?"-0":""+to}function printSimpleValue(to,ue=!1){if(to==null||to===!0||to===!1)return""+to;const eo=typeof to;if(eo==="number")return printNumber(to);if(eo==="string")return ue?`"${to}"`:to;if(eo==="function")return"[Function "+(to.name||"anonymous")+"]";if(eo==="symbol")return symbolToString.call(to).replace(SYMBOL_REGEXP,"Symbol($1)");const no=toString$2.call(to).slice(8,-1);return no==="Date"?isNaN(to.getTime())?""+to:to.toISOString(to):no==="Error"||to instanceof Error?"["+errorToString.call(to)+"]":no==="RegExp"?regExpToString.call(to):null}function printValue(to,ue){let eo=printSimpleValue(to,ue);return eo!==null?eo:JSON.stringify(to,function(no,ro){let oo=printSimpleValue(this[no],ue);return oo!==null?oo:ro},2)}let mixed={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:to,type:ue,value:eo,originalValue:no})=>{let ro=no!=null&&no!==eo,oo=`${to} must be a \`${ue}\` type, but the final value was: \`${printValue(eo,!0)}\``+(ro?` (cast from the value \`${printValue(no,!0)}\`).`:".");return eo===null&&(oo+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),oo},defined:"${path} must be defined"},string={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},number={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},boolean={isValue:"${path} field must be ${value}"},object={noUnknown:"${path} field has unspecified keys: ${unknown}"},array$1={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed,string,number,date,object,array:array$1,boolean});const isSchema=to=>to&&to.__isYupSchema__;class Condition{constructor(ue,eo){if(this.fn=void 0,this.refs=ue,this.refs=ue,typeof eo=="function"){this.fn=eo;return}if(!has$7(eo,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!eo.then&&!eo.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:no,then:ro,otherwise:oo}=eo,io=typeof no=="function"?no:(...ao)=>ao.every(so=>so===no);this.fn=function(...ao){let so=ao.pop(),lo=ao.pop(),co=io(...ao)?ro:oo;if(co)return typeof co=="function"?co(lo):lo.concat(co.resolve(so))}}resolve(ue,eo){let no=this.refs.map(oo=>oo.getValue(eo==null?void 0:eo.value,eo==null?void 0:eo.parent,eo==null?void 0:eo.context)),ro=this.fn.apply(ue,no.concat(ue,eo));if(ro===void 0||ro===ue)return ue;if(!isSchema(ro))throw new TypeError("conditions must return a schema object");return ro.resolve(eo)}}function toArray$1(to){return to==null?[]:[].concat(to)}function _extends$3(){return _extends$3=Object.assign||function(to){for(var ue=1;ue<arguments.length;ue++){var eo=arguments[ue];for(var no in eo)Object.prototype.hasOwnProperty.call(eo,no)&&(to[no]=eo[no])}return to},_extends$3.apply(this,arguments)}let strReg=/\$\{\s*(\w+)\s*\}/g;class ValidationError extends Error{static formatError(ue,eo){const no=eo.label||eo.path||"this";return no!==eo.path&&(eo=_extends$3({},eo,{path:no})),typeof ue=="string"?ue.replace(strReg,(ro,oo)=>printValue(eo[oo])):typeof ue=="function"?ue(eo):ue}static isError(ue){return ue&&ue.name==="ValidationError"}constructor(ue,eo,no,ro){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=eo,this.path=no,this.type=ro,this.errors=[],this.inner=[],toArray$1(ue).forEach(oo=>{ValidationError.isError(oo)?(this.errors.push(...oo.errors),this.inner=this.inner.concat(oo.inner.length?oo.inner:oo)):this.errors.push(oo)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,ValidationError)}}const once=to=>{let ue=!1;return(...eo)=>{ue||(ue=!0,to(...eo))}};function runTests(to,ue){let{endEarly:eo,tests:no,args:ro,value:oo,errors:io,sort:ao,path:so}=to,lo=once(ue),co=no.length;const uo=[];if(io=io||[],!co)return io.length?lo(new ValidationError(io,oo,so)):lo(null,oo);for(let fo=0;fo<no.length;fo++){const po=no[fo];po(ro,function(_o){if(_o){if(!ValidationError.isError(_o))return lo(_o,oo);if(eo)return _o.value=oo,lo(_o,oo);uo.push(_o)}if(--co<=0){if(uo.length&&(ao&&uo.sort(ao),io.length&&uo.push(...io),io=uo),io.length){lo(new ValidationError(io,oo,so),oo);return}lo(null,oo)}})}}const prefixes$1={context:"$",value:"."};class Reference{constructor(ue,eo={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof ue!="string")throw new TypeError("ref must be a string, got: "+ue);if(this.key=ue.trim(),ue==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===prefixes$1.context,this.isValue=this.key[0]===prefixes$1.value,this.isSibling=!this.isContext&&!this.isValue;let no=this.isContext?prefixes$1.context:this.isValue?prefixes$1.value:"";this.path=this.key.slice(no.length),this.getter=this.path&&propertyExpr.getter(this.path,!0),this.map=eo.map}getValue(ue,eo,no){let ro=this.isContext?no:this.isValue?ue:eo;return this.getter&&(ro=this.getter(ro||{})),this.map&&(ro=this.map(ro)),ro}cast(ue,eo){return this.getValue(ue,eo==null?void 0:eo.parent,eo==null?void 0:eo.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(ue){return ue&&ue.__isYupRef}}Reference.prototype.__isYupRef=!0;function _extends$2(){return _extends$2=Object.assign||function(to){for(var ue=1;ue<arguments.length;ue++){var eo=arguments[ue];for(var no in eo)Object.prototype.hasOwnProperty.call(eo,no)&&(to[no]=eo[no])}return to},_extends$2.apply(this,arguments)}function _objectWithoutPropertiesLoose(to,ue){if(to==null)return{};var eo={},no=Object.keys(to),ro,oo;for(oo=0;oo<no.length;oo++)ro=no[oo],!(ue.indexOf(ro)>=0)&&(eo[ro]=to[ro]);return eo}function createValidation(to){function ue(eo,no){let{value:ro,path:oo="",label:io,options:ao,originalValue:so,sync:lo}=eo,co=_objectWithoutPropertiesLoose(eo,["value","path","label","options","originalValue","sync"]);const{name:uo,test:fo,params:po,message:ho}=to;let{parent:_o,context:go}=ao;function bo(So){return Reference.isRef(So)?So.getValue(ro,_o,go):So}function vo(So={}){const Ao=mapValues$2(_extends$2({value:ro,originalValue:so,label:io,path:So.path||oo},po,So.params),bo),Io=new ValidationError(ValidationError.formatError(So.message||ho,Ao),ro,Ao.path,So.type||uo);return Io.params=Ao,Io}let yo=_extends$2({path:oo,parent:_o,type:uo,createError:vo,resolve:bo,options:ao,originalValue:so},co);if(!lo){try{Promise.resolve(fo.call(yo,ro,yo)).then(So=>{ValidationError.isError(So)?no(So):So?no(null,So):no(vo())}).catch(no)}catch(So){no(So)}return}let wo;try{var ko;if(wo=fo.call(yo,ro,yo),typeof((ko=wo)==null?void 0:ko.then)=="function")throw new Error(`Validation test of type: "${yo.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(So){no(So);return}ValidationError.isError(wo)?no(wo):wo?no(null,wo):no(vo())}return ue.OPTIONS=to,ue}let trim=to=>to.substr(0,to.length-1).substr(1);function getIn(to,ue,eo,no=eo){let ro,oo,io;return ue?(propertyExpr.forEach(ue,(ao,so,lo)=>{let co=so?trim(ao):ao;if(to=to.resolve({context:no,parent:ro,value:eo}),to.innerType){let uo=lo?parseInt(co,10):0;if(eo&&uo>=eo.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${ao}, in the path: ${ue}. because there is no value at that index. `);ro=eo,eo=eo&&eo[uo],to=to.innerType}if(!lo){if(!to.fields||!to.fields[co])throw new Error(`The schema does not contain the path: ${ue}. (failed at: ${io} which is a type: "${to._type}")`);ro=eo,eo=eo&&eo[co],to=to.fields[co]}oo=co,io=so?"["+ao+"]":"."+ao}),{schema:to,parent:ro,parentPath:oo}):{parent:ro,parentPath:ue,schema:to}}class ReferenceSet{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const ue=[];for(const eo of this.list)ue.push(eo);for(const[,eo]of this.refs)ue.push(eo.describe());return ue}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(ue){return this.toArray().reduce((eo,no)=>eo.concat(Reference.isRef(no)?ue(no):no),[])}add(ue){Reference.isRef(ue)?this.refs.set(ue.key,ue):this.list.add(ue)}delete(ue){Reference.isRef(ue)?this.refs.delete(ue.key):this.list.delete(ue)}clone(){const ue=new ReferenceSet;return ue.list=new Set(this.list),ue.refs=new Map(this.refs),ue}merge(ue,eo){const no=this.clone();return ue.list.forEach(ro=>no.add(ro)),ue.refs.forEach(ro=>no.add(ro)),eo.list.forEach(ro=>no.delete(ro)),eo.refs.forEach(ro=>no.delete(ro)),no}}function _extends$1(){return _extends$1=Object.assign||function(to){for(var ue=1;ue<arguments.length;ue++){var eo=arguments[ue];for(var no in eo)Object.prototype.hasOwnProperty.call(eo,no)&&(to[no]=eo[no])}return to},_extends$1.apply(this,arguments)}class BaseSchema{constructor(ue){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new ReferenceSet,this._blacklist=new ReferenceSet,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(mixed.notType)}),this.type=(ue==null?void 0:ue.type)||"mixed",this.spec=_extends$1({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},ue==null?void 0:ue.spec)}get _type(){return this.type}_typeCheck(ue){return!0}clone(ue){if(this._mutate)return ue&&Object.assign(this.spec,ue),this;const eo=Object.create(Object.getPrototypeOf(this));return eo.type=this.type,eo._typeError=this._typeError,eo._whitelistError=this._whitelistError,eo._blacklistError=this._blacklistError,eo._whitelist=this._whitelist.clone(),eo._blacklist=this._blacklist.clone(),eo.exclusiveTests=_extends$1({},this.exclusiveTests),eo.deps=[...this.deps],eo.conditions=[...this.conditions],eo.tests=[...this.tests],eo.transforms=[...this.transforms],eo.spec=clone$3(_extends$1({},this.spec,ue)),eo}label(ue){let eo=this.clone();return eo.spec.label=ue,eo}meta(...ue){if(ue.length===0)return this.spec.meta;let eo=this.clone();return eo.spec.meta=Object.assign(eo.spec.meta||{},ue[0]),eo}withMutation(ue){let eo=this._mutate;this._mutate=!0;let no=ue(this);return this._mutate=eo,no}concat(ue){if(!ue||ue===this)return this;if(ue.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${ue.type}`);let eo=this,no=ue.clone();const ro=_extends$1({},eo.spec,no.spec);return no.spec=ro,no._typeError||(no._typeError=eo._typeError),no._whitelistError||(no._whitelistError=eo._whitelistError),no._blacklistError||(no._blacklistError=eo._blacklistError),no._whitelist=eo._whitelist.merge(ue._whitelist,ue._blacklist),no._blacklist=eo._blacklist.merge(ue._blacklist,ue._whitelist),no.tests=eo.tests,no.exclusiveTests=eo.exclusiveTests,no.withMutation(oo=>{ue.tests.forEach(io=>{oo.test(io.OPTIONS)})}),no.transforms=[...eo.transforms,...no.transforms],no}isType(ue){return this.spec.nullable&&ue===null?!0:this._typeCheck(ue)}resolve(ue){let eo=this;if(eo.conditions.length){let no=eo.conditions;eo=eo.clone(),eo.conditions=[],eo=no.reduce((ro,oo)=>oo.resolve(ro,ue),eo),eo=eo.resolve(ue)}return eo}cast(ue,eo={}){let no=this.resolve(_extends$1({value:ue},eo)),ro=no._cast(ue,eo);if(ue!==void 0&&eo.assert!==!1&&no.isType(ro)!==!0){let oo=printValue(ue),io=printValue(ro);throw new TypeError(`The value of ${eo.path||"field"} could not be cast to a value that satisfies the schema type: "${no._type}".
|
|
853
853
|
|
|
854
854
|
attempted value: ${oo}
|
|
855
855
|
`+(io!==oo?`result of cast: ${io}`:""))}return ro}_cast(ue,eo){let no=ue===void 0?ue:this.transforms.reduce((ro,oo)=>oo.call(this,ro,ue,this),ue);return no===void 0&&(no=this.getDefault()),no}_validate(ue,eo={},no){let{sync:ro,path:oo,from:io=[],originalValue:ao=ue,strict:so=this.spec.strict,abortEarly:lo=this.spec.abortEarly}=eo,co=ue;so||(co=this._cast(co,_extends$1({assert:!1},eo)));let uo={value:co,path:oo,options:eo,originalValue:ao,schema:this,label:this.spec.label,sync:ro,from:io},fo=[];this._typeError&&fo.push(this._typeError);let po=[];this._whitelistError&&po.push(this._whitelistError),this._blacklistError&&po.push(this._blacklistError),runTests({args:uo,value:co,path:oo,sync:ro,tests:fo,endEarly:lo},ho=>{if(ho)return void no(ho,co);runTests({tests:this.tests.concat(po),args:uo,path:oo,sync:ro,value:co,endEarly:lo},no)})}validate(ue,eo,no){let ro=this.resolve(_extends$1({},eo,{value:ue}));return typeof no=="function"?ro._validate(ue,eo,no):new Promise((oo,io)=>ro._validate(ue,eo,(ao,so)=>{ao?io(ao):oo(so)}))}validateSync(ue,eo){let no=this.resolve(_extends$1({},eo,{value:ue})),ro;return no._validate(ue,_extends$1({},eo,{sync:!0}),(oo,io)=>{if(oo)throw oo;ro=io}),ro}isValid(ue,eo){return this.validate(ue,eo).then(()=>!0,no=>{if(ValidationError.isError(no))return!1;throw no})}isValidSync(ue,eo){try{return this.validateSync(ue,eo),!0}catch(no){if(ValidationError.isError(no))return!1;throw no}}_getDefault(){let ue=this.spec.default;return ue==null?ue:typeof ue=="function"?ue.call(this):clone$3(ue)}getDefault(ue){return this.resolve(ue||{})._getDefault()}default(ue){return arguments.length===0?this._getDefault():this.clone({default:ue})}strict(ue=!0){let eo=this.clone();return eo.spec.strict=ue,eo}_isPresent(ue){return ue!=null}defined(ue=mixed.defined){return this.test({message:ue,name:"defined",exclusive:!0,test(eo){return eo!==void 0}})}required(ue=mixed.required){return this.clone({presence:"required"}).withMutation(eo=>eo.test({message:ue,name:"required",exclusive:!0,test(no){return this.schema._isPresent(no)}}))}notRequired(){let ue=this.clone({presence:"optional"});return ue.tests=ue.tests.filter(eo=>eo.OPTIONS.name!=="required"),ue}nullable(ue=!0){return this.clone({nullable:ue!==!1})}transform(ue){let eo=this.clone();return eo.transforms.push(ue),eo}test(...ue){let eo;if(ue.length===1?typeof ue[0]=="function"?eo={test:ue[0]}:eo=ue[0]:ue.length===2?eo={name:ue[0],test:ue[1]}:eo={name:ue[0],message:ue[1],test:ue[2]},eo.message===void 0&&(eo.message=mixed.default),typeof eo.test!="function")throw new TypeError("`test` is a required parameters");let no=this.clone(),ro=createValidation(eo),oo=eo.exclusive||eo.name&&no.exclusiveTests[eo.name]===!0;if(eo.exclusive&&!eo.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return eo.name&&(no.exclusiveTests[eo.name]=!!eo.exclusive),no.tests=no.tests.filter(io=>!(io.OPTIONS.name===eo.name&&(oo||io.OPTIONS.test===ro.OPTIONS.test))),no.tests.push(ro),no}when(ue,eo){!Array.isArray(ue)&&typeof ue!="string"&&(eo=ue,ue=".");let no=this.clone(),ro=toArray$1(ue).map(oo=>new Reference(oo));return ro.forEach(oo=>{oo.isSibling&&no.deps.push(oo.key)}),no.conditions.push(new Condition(ro,eo)),no}typeError(ue){let eo=this.clone();return eo._typeError=createValidation({message:ue,name:"typeError",test(no){return no!==void 0&&!this.schema.isType(no)?this.createError({params:{type:this.schema._type}}):!0}}),eo}oneOf(ue,eo=mixed.oneOf){let no=this.clone();return ue.forEach(ro=>{no._whitelist.add(ro),no._blacklist.delete(ro)}),no._whitelistError=createValidation({message:eo,name:"oneOf",test(ro){if(ro===void 0)return!0;let oo=this.schema._whitelist,io=oo.resolveAll(this.resolve);return io.includes(ro)?!0:this.createError({params:{values:oo.toArray().join(", "),resolved:io}})}}),no}notOneOf(ue,eo=mixed.notOneOf){let no=this.clone();return ue.forEach(ro=>{no._blacklist.add(ro),no._whitelist.delete(ro)}),no._blacklistError=createValidation({message:eo,name:"notOneOf",test(ro){let oo=this.schema._blacklist,io=oo.resolveAll(this.resolve);return io.includes(ro)?this.createError({params:{values:oo.toArray().join(", "),resolved:io}}):!0}}),no}strip(ue=!0){let eo=this.clone();return eo.spec.strip=ue,eo}describe(){const ue=this.clone(),{label:eo,meta:no}=ue.spec;return{meta:no,label:eo,type:ue.type,oneOf:ue._whitelist.describe(),notOneOf:ue._blacklist.describe(),tests:ue.tests.map(oo=>({name:oo.OPTIONS.name,params:oo.OPTIONS.params})).filter((oo,io,ao)=>ao.findIndex(so=>so.name===oo.name)===io)}}}BaseSchema.prototype.__isYupSchema__=!0;for(const to of["validate","validateSync"])BaseSchema.prototype[`${to}At`]=function(ue,eo,no={}){const{parent:ro,parentPath:oo,schema:io}=getIn(this,ue,eo,no.context);return io[to](ro&&ro[oo],_extends$1({},no,{parent:ro,path:ue}))};for(const to of["equals","is"])BaseSchema.prototype[to]=BaseSchema.prototype.oneOf;for(const to of["not","nope"])BaseSchema.prototype[to]=BaseSchema.prototype.notOneOf;BaseSchema.prototype.optional=BaseSchema.prototype.notRequired;const Mixed=BaseSchema;function create$4(){return new Mixed}create$4.prototype=Mixed.prototype;const isAbsent=to=>to==null;let rEmail=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,rUrl=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,rUUID=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,isTrimmed=to=>isAbsent(to)||to===to.trim(),objStringTag={}.toString();function create$3(){return new StringSchema}class StringSchema extends BaseSchema{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(ue){if(this.isType(ue)||Array.isArray(ue))return ue;const eo=ue!=null&&ue.toString?ue.toString():ue;return eo===objStringTag?ue:eo})})}_typeCheck(ue){return ue instanceof String&&(ue=ue.valueOf()),typeof ue=="string"}_isPresent(ue){return super._isPresent(ue)&&!!ue.length}length(ue,eo=string.length){return this.test({message:eo,name:"length",exclusive:!0,params:{length:ue},test(no){return isAbsent(no)||no.length===this.resolve(ue)}})}min(ue,eo=string.min){return this.test({message:eo,name:"min",exclusive:!0,params:{min:ue},test(no){return isAbsent(no)||no.length>=this.resolve(ue)}})}max(ue,eo=string.max){return this.test({name:"max",exclusive:!0,message:eo,params:{max:ue},test(no){return isAbsent(no)||no.length<=this.resolve(ue)}})}matches(ue,eo){let no=!1,ro,oo;return eo&&(typeof eo=="object"?{excludeEmptyString:no=!1,message:ro,name:oo}=eo:ro=eo),this.test({name:oo||"matches",message:ro||string.matches,params:{regex:ue},test:io=>isAbsent(io)||io===""&&no||io.search(ue)!==-1})}email(ue=string.email){return this.matches(rEmail,{name:"email",message:ue,excludeEmptyString:!0})}url(ue=string.url){return this.matches(rUrl,{name:"url",message:ue,excludeEmptyString:!0})}uuid(ue=string.uuid){return this.matches(rUUID,{name:"uuid",message:ue,excludeEmptyString:!1})}ensure(){return this.default("").transform(ue=>ue===null?"":ue)}trim(ue=string.trim){return this.transform(eo=>eo!=null?eo.trim():eo).test({message:ue,name:"trim",test:isTrimmed})}lowercase(ue=string.lowercase){return this.transform(eo=>isAbsent(eo)?eo:eo.toLowerCase()).test({message:ue,name:"string_case",exclusive:!0,test:eo=>isAbsent(eo)||eo===eo.toLowerCase()})}uppercase(ue=string.uppercase){return this.transform(eo=>isAbsent(eo)?eo:eo.toUpperCase()).test({message:ue,name:"string_case",exclusive:!0,test:eo=>isAbsent(eo)||eo===eo.toUpperCase()})}}create$3.prototype=StringSchema.prototype;let isNaN$1=to=>to!=+to;function create$2(){return new NumberSchema}class NumberSchema extends BaseSchema{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(ue){let eo=ue;if(typeof eo=="string"){if(eo=eo.replace(/\s/g,""),eo==="")return NaN;eo=+eo}return this.isType(eo)?eo:parseFloat(eo)})})}_typeCheck(ue){return ue instanceof Number&&(ue=ue.valueOf()),typeof ue=="number"&&!isNaN$1(ue)}min(ue,eo=number.min){return this.test({message:eo,name:"min",exclusive:!0,params:{min:ue},test(no){return isAbsent(no)||no>=this.resolve(ue)}})}max(ue,eo=number.max){return this.test({message:eo,name:"max",exclusive:!0,params:{max:ue},test(no){return isAbsent(no)||no<=this.resolve(ue)}})}lessThan(ue,eo=number.lessThan){return this.test({message:eo,name:"max",exclusive:!0,params:{less:ue},test(no){return isAbsent(no)||no<this.resolve(ue)}})}moreThan(ue,eo=number.moreThan){return this.test({message:eo,name:"min",exclusive:!0,params:{more:ue},test(no){return isAbsent(no)||no>this.resolve(ue)}})}positive(ue=number.positive){return this.moreThan(0,ue)}negative(ue=number.negative){return this.lessThan(0,ue)}integer(ue=number.integer){return this.test({name:"integer",message:ue,test:eo=>isAbsent(eo)||Number.isInteger(eo)})}truncate(){return this.transform(ue=>isAbsent(ue)?ue:ue|0)}round(ue){var eo;let no=["ceil","floor","round","trunc"];if(ue=((eo=ue)==null?void 0:eo.toLowerCase())||"round",ue==="trunc")return this.truncate();if(no.indexOf(ue.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+no.join(", "));return this.transform(ro=>isAbsent(ro)?ro:Math[ue](ro))}}create$2.prototype=NumberSchema.prototype;var isoReg=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function parseIsoDate(to){var ue=[1,4,5,6,7,10,11],eo=0,no,ro;if(ro=isoReg.exec(to)){for(var oo=0,io;io=ue[oo];++oo)ro[io]=+ro[io]||0;ro[2]=(+ro[2]||1)-1,ro[3]=+ro[3]||1,ro[7]=ro[7]?String(ro[7]).substr(0,3):0,(ro[8]===void 0||ro[8]==="")&&(ro[9]===void 0||ro[9]==="")?no=+new Date(ro[1],ro[2],ro[3],ro[4],ro[5],ro[6],ro[7]):(ro[8]!=="Z"&&ro[9]!==void 0&&(eo=ro[10]*60+ro[11],ro[9]==="+"&&(eo=0-eo)),no=Date.UTC(ro[1],ro[2],ro[3],ro[4],ro[5]+eo,ro[6],ro[7]))}else no=Date.parse?Date.parse(to):NaN;return no}let invalidDate=new Date(""),isDate$1=to=>Object.prototype.toString.call(to)==="[object Date]";class DateSchema extends BaseSchema{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(ue){return this.isType(ue)?ue:(ue=parseIsoDate(ue),isNaN(ue)?invalidDate:new Date(ue))})})}_typeCheck(ue){return isDate$1(ue)&&!isNaN(ue.getTime())}prepareParam(ue,eo){let no;if(Reference.isRef(ue))no=ue;else{let ro=this.cast(ue);if(!this._typeCheck(ro))throw new TypeError(`\`${eo}\` must be a Date or a value that can be \`cast()\` to a Date`);no=ro}return no}min(ue,eo=date.min){let no=this.prepareParam(ue,"min");return this.test({message:eo,name:"min",exclusive:!0,params:{min:ue},test(ro){return isAbsent(ro)||ro>=this.resolve(no)}})}max(ue,eo=date.max){let no=this.prepareParam(ue,"max");return this.test({message:eo,name:"max",exclusive:!0,params:{max:ue},test(ro){return isAbsent(ro)||ro<=this.resolve(no)}})}}DateSchema.INVALID_DATE=invalidDate;DateSchema.prototype;function sortFields(to,ue=[]){let eo=[],no=new Set,ro=new Set(ue.map(([io,ao])=>`${io}-${ao}`));function oo(io,ao){let so=propertyExpr.split(io)[0];no.add(so),ro.has(`${ao}-${so}`)||eo.push([ao,so])}for(const io in to)if(has$7(to,io)){let ao=to[io];no.add(io),Reference.isRef(ao)&&ao.isSibling?oo(ao.path,io):isSchema(ao)&&"deps"in ao&&ao.deps.forEach(so=>oo(so,io))}return toposort$1.array(Array.from(no),eo).reverse()}function findIndex(to,ue){let eo=1/0;return to.some((no,ro)=>{var oo;if(((oo=ue.path)==null?void 0:oo.indexOf(no))!==-1)return eo=ro,!0}),eo}function sortByKeyOrder(to){return(ue,eo)=>findIndex(to,ue)-findIndex(to,eo)}function _extends(){return _extends=Object.assign||function(to){for(var ue=1;ue<arguments.length;ue++){var eo=arguments[ue];for(var no in eo)Object.prototype.hasOwnProperty.call(eo,no)&&(to[no]=eo[no])}return to},_extends.apply(this,arguments)}let isObject=to=>Object.prototype.toString.call(to)==="[object Object]";function unknown(to,ue){let eo=Object.keys(to.fields);return Object.keys(ue).filter(no=>eo.indexOf(no)===-1)}const defaultSort=sortByKeyOrder([]);class ObjectSchema extends BaseSchema{constructor(ue){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=defaultSort,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(no){if(typeof no=="string")try{no=JSON.parse(no)}catch{no=null}return this.isType(no)?no:null}),ue&&this.shape(ue)})}_typeCheck(ue){return isObject(ue)||typeof ue=="function"}_cast(ue,eo={}){var no;let ro=super._cast(ue,eo);if(ro===void 0)return this.getDefault();if(!this._typeCheck(ro))return ro;let oo=this.fields,io=(no=eo.stripUnknown)!=null?no:this.spec.noUnknown,ao=this._nodes.concat(Object.keys(ro).filter(uo=>this._nodes.indexOf(uo)===-1)),so={},lo=_extends({},eo,{parent:so,__validating:eo.__validating||!1}),co=!1;for(const uo of ao){let fo=oo[uo],po=has$7(ro,uo);if(fo){let ho,_o=ro[uo];lo.path=(eo.path?`${eo.path}.`:"")+uo,fo=fo.resolve({value:_o,context:eo.context,parent:so});let go="spec"in fo?fo.spec:void 0,bo=go==null?void 0:go.strict;if(go!=null&&go.strip){co=co||uo in ro;continue}ho=!eo.__validating||!bo?fo.cast(ro[uo],lo):ro[uo],ho!==void 0&&(so[uo]=ho)}else po&&!io&&(so[uo]=ro[uo]);so[uo]!==ro[uo]&&(co=!0)}return co?so:ro}_validate(ue,eo={},no){let ro=[],{sync:oo,from:io=[],originalValue:ao=ue,abortEarly:so=this.spec.abortEarly,recursive:lo=this.spec.recursive}=eo;io=[{schema:this,value:ao},...io],eo.__validating=!0,eo.originalValue=ao,eo.from=io,super._validate(ue,eo,(co,uo)=>{if(co){if(!ValidationError.isError(co)||so)return void no(co,uo);ro.push(co)}if(!lo||!isObject(uo)){no(ro[0]||null,uo);return}ao=ao||uo;let fo=this._nodes.map(po=>(ho,_o)=>{let go=po.indexOf(".")===-1?(eo.path?`${eo.path}.`:"")+po:`${eo.path||""}["${po}"]`,bo=this.fields[po];if(bo&&"validate"in bo){bo.validate(uo[po],_extends({},eo,{path:go,from:io,strict:!0,parent:uo,originalValue:ao[po]}),_o);return}_o(null)});runTests({sync:oo,tests:fo,value:uo,errors:ro,endEarly:so,sort:this._sortErrors,path:eo.path},no)})}clone(ue){const eo=super.clone(ue);return eo.fields=_extends({},this.fields),eo._nodes=this._nodes,eo._excludedEdges=this._excludedEdges,eo._sortErrors=this._sortErrors,eo}concat(ue){let eo=super.concat(ue),no=eo.fields;for(let[ro,oo]of Object.entries(this.fields)){const io=no[ro];io===void 0?no[ro]=oo:io instanceof BaseSchema&&oo instanceof BaseSchema&&(no[ro]=oo.concat(io))}return eo.withMutation(()=>eo.shape(no,this._excludedEdges))}getDefaultFromShape(){let ue={};return this._nodes.forEach(eo=>{const no=this.fields[eo];ue[eo]="default"in no?no.getDefault():void 0}),ue}_getDefault(){if("default"in this.spec)return super._getDefault();if(this._nodes.length)return this.getDefaultFromShape()}shape(ue,eo=[]){let no=this.clone(),ro=Object.assign(no.fields,ue);return no.fields=ro,no._sortErrors=sortByKeyOrder(Object.keys(ro)),eo.length&&(Array.isArray(eo[0])||(eo=[eo]),no._excludedEdges=[...no._excludedEdges,...eo]),no._nodes=sortFields(ro,no._excludedEdges),no}pick(ue){const eo={};for(const no of ue)this.fields[no]&&(eo[no]=this.fields[no]);return this.clone().withMutation(no=>(no.fields={},no.shape(eo)))}omit(ue){const eo=this.clone(),no=eo.fields;eo.fields={};for(const ro of ue)delete no[ro];return eo.withMutation(()=>eo.shape(no))}from(ue,eo,no){let ro=propertyExpr.getter(ue,!0);return this.transform(oo=>{if(oo==null)return oo;let io=oo;return has$7(oo,ue)&&(io=_extends({},oo),no||delete io[ue],io[eo]=ro(oo)),io})}noUnknown(ue=!0,eo=object.noUnknown){typeof ue=="string"&&(eo=ue,ue=!0);let no=this.test({name:"noUnknown",exclusive:!0,message:eo,test(ro){if(ro==null)return!0;const oo=unknown(this.schema,ro);return!ue||oo.length===0||this.createError({params:{unknown:oo.join(", ")}})}});return no.spec.noUnknown=ue,no}unknown(ue=!0,eo=object.noUnknown){return this.noUnknown(!ue,eo)}transformKeys(ue){return this.transform(eo=>eo&&mapKeys$1(eo,(no,ro)=>ue(ro)))}camelCase(){return this.transformKeys(camelCase$1)}snakeCase(){return this.transformKeys(snakeCase$1)}constantCase(){return this.transformKeys(ue=>snakeCase$1(ue).toUpperCase())}describe(){let ue=super.describe();return ue.fields=mapValues$2(this.fields,eo=>eo.describe()),ue}}function create$1(to){return new ObjectSchema(to)}create$1.prototype=ObjectSchema.prototype;const propertyValidator=to=>to==="number"?create$2().nullable():to==="email"?create$3().email().nullable():to==="object"?create$1().nullable():create$3().nullable(),getValidatorFields=to=>{const ue={};return Object.entries((to==null?void 0:to.datasource)||{}).forEach(([eo,no])=>{no.required?ue[eo]=propertyValidator(no.type).required():ue[eo]=propertyValidator(no.type).notRequired()}),ue},createValidatedConfigStore=(to,ue)=>{const eo=writable(ue),no=getValidatorFields(to),ro=writable({}),oo=writable({}),io=async()=>{try{return await create$1().shape(get_store_value(ro)).validate(get_store_value(eo),{abortEarly:!1}),oo.set({}),!0}catch(uo){if(uo.inner){const fo={};uo.inner.forEach(po=>{fo[po.path]=capitalise(po.message)}),oo.set(fo)}else notifications.error("Unexpected validation error");return!1}},ao=(uo,fo)=>{eo.update(po=>{var _o;const ho={...po};return to.datasource[uo].type==="fieldGroup"?(fo.forEach(go=>{ho[go.key]=go.value}),(_o=to.datasource[uo].config)!=null&&_o.nestedFields?ho[uo]=fo.reduce((go,bo)=>({...go,[bo.key]:bo.value}),{}):fo.forEach(go=>{ho[go.key]=go.value})):ho[uo]=fo,ho}),io()},so=()=>{ro.set(no),io()},lo=uo=>{ro.update(fo=>({...fo,[uo]:no[uo]})),io()};return{subscribe:derived([eo,oo,ro],([uo,fo,po])=>{const ho=[],_o=["rejectUnauthorized","downloadImages"];Object.entries(to.datasource).forEach(([vo,yo])=>{if(to.name==="REST"&&!_o.includes(vo))return;const wo=()=>yo.type==="fieldGroup"?Object.entries(yo.fields).map(([ko,So])=>({key:ko,name:capitalise(So.display||ko),type:So.type,value:uo[ko]})):uo[vo];ho.push({key:vo,value:wo(),error:fo[vo],name:capitalise(yo.display||vo),type:yo.type,hidden:yo.hidden,config:yo.config})});const go=Object.keys(po).length===Object.keys(no).length,bo=Object.keys(fo).length>0;return{validatedConfig:ho,config:uo,errors:fo,preventSubmit:go&&bo}}).subscribe,updateFieldValue:ao,markAllFieldsActive:so,markFieldActive:lo,validate:io}},createValidatedNameStore=(to,ue)=>{const eo=writable(to),no=writable(!1),ro=writable(null),oo=async()=>{if(!ue||!get_store_value(no))return!0;try{return await create$3().required().validate(get_store_value(eo),{abortEarly:!1}),ro.set(null),!0}catch(lo){return ro.set(capitalise(lo.message)),!1}},io=lo=>{eo.set(lo),oo()},ao=()=>{no.set(!0),oo()};return{subscribe:derived([eo,ro,no],([lo,co,uo])=>({name:lo,error:co,preventSubmit:co!==null&&uo})).subscribe,updateValue:io,markActive:ao,validate:oo}};function get_each_context$1C(to,ue,eo){const no=to.slice();return no[20]=ue[eo].type,no[21]=ue[eo].key,no[22]=ue[eo].value,no[23]=ue[eo].error,no[24]=ue[eo].name,no[25]=ue[eo].hidden,no[2]=ue[eo].config,no}function create_default_slot_3$2a(to){let ue;return{c(){ue=text("Connect your database to Budibase using the config below.")},m(eo,no){insert$1(eo,ue,no)},d(eo){eo&&detach(ue)}}}function create_default_slot_2$2N(to){let ue,eo;return ue=new Body({props:{size:"XS",$$slots:{default:[create_default_slot_3$2a]},$$scope:{ctx:to}}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){const oo={};ro&268435456&&(oo.$$scope={dirty:ro,ctx:no}),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block_1$25(to){let ue,eo;return ue=new ConfigInput({props:{type:"string",value:to[7].name,error:to[7].error,name:"Name",showModal:to[13]}}),ue.$on("blur",function(){is_function(to[4].markActive)&&to[4].markActive.apply(this,arguments)}),ue.$on("change",to[14]),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p(no,ro){to=no;const oo={};ro&128&&(oo.value=to[7].name),ro&128&&(oo.error=to[7].error),ro&16&&(oo.showModal=to[13]),ue.$set(oo)},i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_if_block$3$(to){let ue,eo;function no(){return to[15](to[21])}function ro(){return to[16](to[21])}function oo(...io){return to[17](to[21],...io)}return ue=new ConfigInput({props:{type:to[20],value:to[22],error:to[23],name:to[24],config:to[2],showModal:no}}),ue.$on("blur",ro),ue.$on("change",oo),{c(){create_component(ue.$$.fragment)},m(io,ao){mount_component(ue,io,ao),eo=!0},p(io,ao){to=io;const so={};ao&64&&(so.type=to[20]),ao&64&&(so.value=to[22]),ao&64&&(so.error=to[23]),ao&64&&(so.name=to[24]),ao&64&&(so.config=to[2]),ao&96&&(so.showModal=no),ue.$set(so)},i(io){eo||(transition_in(ue.$$.fragment,io),eo=!0)},o(io){transition_out(ue.$$.fragment,io),eo=!1},d(io){destroy_component(ue,io)}}}function create_each_block$1C(ctx){let show_if=ctx[25]===void 0||!eval(processStringSync(ctx[25],ctx[6].config)),if_block_anchor,current,if_block=show_if&&create_if_block$3$(ctx);return{c(){if_block&&if_block.c(),if_block_anchor=empty$3()},m(to,ue){if_block&&if_block.m(to,ue),insert$1(to,if_block_anchor,ue),current=!0},p(ctx,dirty){dirty&64&&(show_if=ctx[25]===void 0||!eval(processStringSync(ctx[25],ctx[6].config))),show_if?if_block?(if_block.p(ctx,dirty),dirty&64&&transition_in(if_block,1)):(if_block=create_if_block$3$(ctx),if_block.c(),transition_in(if_block,1),if_block.m(if_block_anchor.parentNode,if_block_anchor)):if_block&&(group_outros(),transition_out(if_block,1,1,()=>{if_block=null}),check_outros())},i(to){current||(transition_in(if_block),current=!0)},o(to){transition_out(if_block),current=!1},d(to){to&&detach(if_block_anchor),if_block&&if_block.d(to)}}}function create_default_slot_1$3S(to){let ue,eo,no,ro,oo;ue=new Layout$n({props:{noPadding:!0,$$slots:{default:[create_default_slot_2$2N]},$$scope:{ctx:to}}});let io=to[1]&&create_if_block_1$25(to),ao=ensure_array_like(to[6].validatedConfig),so=[];for(let co=0;co<ao.length;co+=1)so[co]=create_each_block$1C(get_each_context$1C(to,ao,co));const lo=co=>transition_out(so[co],1,1,()=>{so[co]=null});return{c(){create_component(ue.$$.fragment),eo=space$1(),io&&io.c(),no=space$1();for(let co=0;co<so.length;co+=1)so[co].c();ro=empty$3()},m(co,uo){mount_component(ue,co,uo),insert$1(co,eo,uo),io&&io.m(co,uo),insert$1(co,no,uo);for(let fo=0;fo<so.length;fo+=1)so[fo]&&so[fo].m(co,uo);insert$1(co,ro,uo),oo=!0},p(co,uo){const fo={};if(uo&268435456&&(fo.$$scope={dirty:uo,ctx:co}),ue.$set(fo),co[1]?io?(io.p(co,uo),uo&2&&transition_in(io,1)):(io=create_if_block_1$25(co),io.c(),transition_in(io,1),io.m(no.parentNode,no)):io&&(group_outros(),transition_out(io,1,1,()=>{io=null}),check_outros()),uo&608){ao=ensure_array_like(co[6].validatedConfig);let po;for(po=0;po<ao.length;po+=1){const ho=get_each_context$1C(co,ao,po);so[po]?(so[po].p(ho,uo),transition_in(so[po],1)):(so[po]=create_each_block$1C(ho),so[po].c(),transition_in(so[po],1),so[po].m(ro.parentNode,ro))}for(group_outros(),po=ao.length;po<so.length;po+=1)lo(po);check_outros()}},i(co){if(!oo){transition_in(ue.$$.fragment,co),transition_in(io);for(let uo=0;uo<ao.length;uo+=1)transition_in(so[uo]);oo=!0}},o(co){transition_out(ue.$$.fragment,co),transition_out(io),so=so.filter(Boolean);for(let uo=0;uo<so.length;uo+=1)transition_out(so[uo]);oo=!1},d(co){co&&(detach(eo),detach(no),detach(ro)),destroy_component(ue,co),io&&io.d(co),destroy_each(so,co)}}}function create_default_slot$5s(to){let ue,eo;return ue=new CreateEditVariableModal({props:{save:to[10]}}),{c(){create_component(ue.$$.fragment)},m(no,ro){mount_component(ue,no,ro),eo=!0},p:noop$6,i(no){eo||(transition_in(ue.$$.fragment,no),eo=!0)},o(no){transition_out(ue.$$.fragment,no),eo=!1},d(no){destroy_component(ue,no)}}}function create_fragment$8z(to){let ue,eo,no,ro;ue=new ModalContent({props:{title:`Connect to ${to[0].friendlyName}`,onConfirm:to[8],confirmText:to[0].plus?"Connect":"Save and continue to query",cancelText:"Back",disabled:to[6].preventSubmit||to[7].preventSubmit,size:"L",$$slots:{default:[create_default_slot_1$3S]},$$scope:{ctx:to}}});let oo={$$slots:{default:[create_default_slot$5s]},$$scope:{ctx:to}};return no=new Modal({props:oo}),to[18](no),{c(){create_component(ue.$$.fragment),eo=space$1(),create_component(no.$$.fragment)},m(io,ao){mount_component(ue,io,ao),insert$1(io,eo,ao),mount_component(no,io,ao),ro=!0},p(io,[ao]){const so={};ao&1&&(so.title=`Connect to ${io[0].friendlyName}`),ao&1&&(so.confirmText=io[0].plus?"Connect":"Save and continue to query"),ao&192&&(so.disabled=io[6].preventSubmit||io[7].preventSubmit),ao&268435698&&(so.$$scope={dirty:ao,ctx:io}),ue.$set(so);const lo={};ao&268435456&&(lo.$$scope={dirty:ao,ctx:io}),no.$set(lo)},i(io){ro||(transition_in(ue.$$.fragment,io),transition_in(no.$$.fragment,io),ro=!0)},o(io){transition_out(ue.$$.fragment,io),transition_out(no.$$.fragment,io),ro=!1},d(io){io&&detach(eo),destroy_component(ue,io),to[18](null),destroy_component(no,io)}}}function instance$8z(to,ue,eo){let no,ro,oo,io=noop$6,ao=()=>(io(),io=subscribe(no,zo=>eo(6,oo=zo)),no),so,lo=noop$6,co=()=>(lo(),lo=subscribe(ro,zo=>eo(7,so=zo)),ro);to.$$.on_destroy.push(()=>io()),to.$$.on_destroy.push(()=>lo());let{integration:uo}=ue,{config:fo}=ue,{onSubmit:po=()=>{}}=ue,{showNameField:ho=!1}=ue,{nameFieldValue:_o=""}=ue;const go=async()=>{if(no.markAllFieldsActive(),ro.markActive(),await no.validate()&&await ro.validate()){const{config:zo}=get_store_value(no),{name:No}=get_store_value(ro);return po({config:zo,name:No})}return keepOpen};let bo,vo=()=>{};const yo=zo=>{vo=zo,bo.show()};async function wo(zo){try{await environment.createVariable(zo),vo(`{{ env.${zo.name} }}`),bo.hide()}catch(No){notifications.error(`Failed to create variable: ${No.message}`)}}const ko=()=>yo(ro.updateValue),So=zo=>ro.updateValue(zo.detail),Ao=zo=>yo(No=>no.updateFieldValue(zo,No)),Io=zo=>no.markFieldActive(zo),Eo=(zo,No)=>no.updateFieldValue(zo,No.detail);function Ro(zo){binding_callbacks[zo?"unshift":"push"](()=>{bo=zo,eo(3,bo)})}return to.$$set=zo=>{"integration"in zo&&eo(0,uo=zo.integration),"config"in zo&&eo(2,fo=zo.config),"onSubmit"in zo&&eo(11,po=zo.onSubmit),"showNameField"in zo&&eo(1,ho=zo.showNameField),"nameFieldValue"in zo&&eo(12,_o=zo.nameFieldValue)},to.$$.update=()=>{to.$$.dirty&5&&ao(eo(5,no=createValidatedConfigStore(uo,fo))),to.$$.dirty&4098&&co(eo(4,ro=createValidatedNameStore(_o,ho)))},[uo,ho,fo,bo,ro,no,oo,so,go,yo,wo,po,_o,ko,So,Ao,Io,Eo,Ro]}class ConfigEditor extends SvelteComponent{constructor(ue){super(),init$3(this,ue,instance$8z,create_fragment$8z,safe_not_equal,{integration:0,config:2,onSubmit:11,showNameField:1,nameFieldValue:12})}}var faDiscord={prefix:"fab",iconName:"discord",icon:[640,512,[],"f392","M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"]},faGithub={prefix:"fab",iconName:"github",icon:[496,512,[],"f09b","M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"]},faHeading={prefix:"fas",iconName:"heading",icon:[448,512,["header"],"f1dc","M0 64C0 46.3 14.3 32 32 32H80h48c17.7 0 32 14.3 32 32s-14.3 32-32 32H112V208H336V96H320c-17.7 0-32-14.3-32-32s14.3-32 32-32h48 48c17.7 0 32 14.3 32 32s-14.3 32-32 32H400V240 416h16c17.7 0 32 14.3 32 32s-14.3 32-32 32H368 320c-17.7 0-32-14.3-32-32s14.3-32 32-32h16V272H112V416h16c17.7 0 32 14.3 32 32s-14.3 32-32 32H80 32c-17.7 0-32-14.3-32-32s14.3-32 32-32H48V240 96H32C14.3 96 0 81.7 0 64z"]},faLock={prefix:"fas",iconName:"lock",icon:[448,512,[128274],"f023","M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z"]},faFileArrowUp={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V160H256c-17.7 0-32-14.3-32-32V0H64zM256 0V128H384L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24V305.9l-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31V408z"]},faBold={prefix:"fas",iconName:"bold",icon:[384,512,[],"f032","M0 64C0 46.3 14.3 32 32 32H80 96 224c70.7 0 128 57.3 128 128c0 31.3-11.3 60.1-30 82.3c37.1 22.4 62 63.1 62 109.7c0 70.7-57.3 128-128 128H96 80 32c-17.7 0-32-14.3-32-32s14.3-32 32-32H48V256 96H32C14.3 96 0 81.7 0 64zM224 224c35.3 0 64-28.7 64-64s-28.7-64-64-64H112V224H224zM112 288V416H256c35.3 0 64-28.7 64-64s-28.7-64-64-64H224 112z"]},faImage={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6h96 32H424c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"]},faTableColumns={prefix:"fas",iconName:"table-columns",icon:[512,512,["columns"],"f0db","M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zm64 64V416H224V160H64zm384 0H288V416H448V160z"]},faColumns=faTableColumns,faCircleCheck={prefix:"fas",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},faItalic={prefix:"fas",iconName:"italic",icon:[384,512,[],"f033","M128 64c0-17.7 14.3-32 32-32H352c17.7 0 32 14.3 32 32s-14.3 32-32 32H293.3L160 416h64c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H90.7L224 96H160c-17.7 0-32-14.3-32-32z"]},faListOl={prefix:"fas",iconName:"list-ol",icon:[512,512,["list-1-2","list-numeric"],"f0cb","M24 56c0-13.3 10.7-24 24-24H80c13.3 0 24 10.7 24 24V176h16c13.3 0 24 10.7 24 24s-10.7 24-24 24H40c-13.3 0-24-10.7-24-24s10.7-24 24-24H56V80H48C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432H120c13.3 0 24 10.7 24 24s-10.7 24-24 24H32c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H224c-17.7 0-32-14.3-32-32s14.3-32 32-32z"]},faUpDownLeftRight={prefix:"fas",iconName:"up-down-left-right",icon:[512,512,["arrows-alt"],"f0b2","M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8h32v96H128V192c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V288h96v96H192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8H288V288h96v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6v32H288V128h32c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-64-64z"]},faArrowsAlt=faUpDownLeftRight,faCircleQuestion={prefix:"fas",iconName:"circle-question",icon:[512,512,[62108,"question-circle"],"f059","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},faQuestionCircle=faCircleQuestion,faEye={prefix:"fas",iconName:"eye",icon:[576,512,[128065],"f06e","M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z"]},faEnvelope={prefix:"fas",iconName:"envelope",icon:[512,512,[128386,9993,61443],"f0e0","M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"]},faCircleInfo={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},faRectangleList={prefix:"fas",iconName:"rectangle-list",icon:[576,512,["list-alt"],"f022","M0 96C0 60.7 28.7 32 64 32H512c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM128 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32-128a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM128 384a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm96-248c-13.3 0-24 10.7-24 24s10.7 24 24 24H448c13.3 0 24-10.7 24-24s-10.7-24-24-24H224zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24H448c13.3 0 24-10.7 24-24s-10.7-24-24-24H224zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24H448c13.3 0 24-10.7 24-24s-10.7-24-24-24H224z"]},faGear={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},faLink={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},faPlay={prefix:"fas",iconName:"play",icon:[384,512,[9654],"f04b","M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"]},faListUl={prefix:"fas",iconName:"list-ul",icon:[512,512,["list-dots"],"f0ca","M64 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM64 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm48-208a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z"]},faXmark={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},faQuoteLeft={prefix:"fas",iconName:"quote-left",icon:[448,512,[8220,"quote-left-alt"],"f10d","M0 216C0 149.7 53.7 96 120 96h8c17.7 0 32 14.3 32 32s-14.3 32-32 32h-8c-30.9 0-56 25.1-56 56v8h64c35.3 0 64 28.7 64 64v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V320 288 216zm256 0c0-66.3 53.7-120 120-120h8c17.7 0 32 14.3 32 32s-14.3 32-32 32h-8c-30.9 0-56 25.1-56 56v8h64c35.3 0 64 28.7 64 64v64c0 35.3-28.7 64-64 64H320c-35.3 0-64-28.7-64-64V320 288 216z"]},faChevronLeft={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},faBook={prefix:"fas",iconName:"book",icon:[448,512,[128212],"f02d","M96 0C43 0 0 43 0 96V416c0 53 43 96 96 96H384h32c17.7 0 32-14.3 32-32s-14.3-32-32-32V384c17.7 0 32-14.3 32-32V32c0-17.7-14.3-32-32-32H384 96zm0 384H352v64H96c-17.7 0-32-14.3-32-32s14.3-32 32-32zm32-240c0-8.8 7.2-16 16-16H336c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16zm16 48H336c8.8 0 16 7.2 16 16s-7.2 16-16 16H144c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]};function ownKeys(to,ue){var eo=Object.keys(to);if(Object.getOwnPropertySymbols){var no=Object.getOwnPropertySymbols(to);ue&&(no=no.filter(function(ro){return Object.getOwnPropertyDescriptor(to,ro).enumerable})),eo.push.apply(eo,no)}return eo}function _objectSpread2(to){for(var ue=1;ue<arguments.length;ue++){var eo=arguments[ue]!=null?arguments[ue]:{};ue%2?ownKeys(Object(eo),!0).forEach(function(no){_defineProperty(to,no,eo[no])}):Object.getOwnPropertyDescriptors?Object.defineProperties(to,Object.getOwnPropertyDescriptors(eo)):ownKeys(Object(eo)).forEach(function(no){Object.defineProperty(to,no,Object.getOwnPropertyDescriptor(eo,no))})}return to}function _typeof(to){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ue){return typeof ue}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},_typeof(to)}function _classCallCheck(to,ue){if(!(to instanceof ue))throw new TypeError("Cannot call a class as a function")}function _defineProperties(to,ue){for(var eo=0;eo<ue.length;eo++){var no=ue[eo];no.enumerable=no.enumerable||!1,no.configurable=!0,"value"in no&&(no.writable=!0),Object.defineProperty(to,no.key,no)}}function _createClass(to,ue,eo){return ue&&_defineProperties(to.prototype,ue),eo&&_defineProperties(to,eo),Object.defineProperty(to,"prototype",{writable:!1}),to}function _defineProperty(to,ue,eo){return ue in to?Object.defineProperty(to,ue,{value:eo,enumerable:!0,configurable:!0,writable:!0}):to[ue]=eo,to}function _slicedToArray(to,ue){return _arrayWithHoles(to)||_iterableToArrayLimit(to,ue)||_unsupportedIterableToArray(to,ue)||_nonIterableRest()}function _toConsumableArray(to){return _arrayWithoutHoles(to)||_iterableToArray(to)||_unsupportedIterableToArray(to)||_nonIterableSpread()}function _arrayWithoutHoles(to){if(Array.isArray(to))return _arrayLikeToArray(to)}function _arrayWithHoles(to){if(Array.isArray(to))return to}function _iterableToArray(to){if(typeof Symbol<"u"&&to[Symbol.iterator]!=null||to["@@iterator"]!=null)return Array.from(to)}function _iterableToArrayLimit(to,ue){var eo=to==null?null:typeof Symbol<"u"&&to[Symbol.iterator]||to["@@iterator"];if(eo!=null){var no=[],ro=!0,oo=!1,io,ao;try{for(eo=eo.call(to);!(ro=(io=eo.next()).done)&&(no.push(io.value),!(ue&&no.length===ue));ro=!0);}catch(so){oo=!0,ao=so}finally{try{!ro&&eo.return!=null&&eo.return()}finally{if(oo)throw ao}}return no}}function _unsupportedIterableToArray(to,ue){if(to){if(typeof to=="string")return _arrayLikeToArray(to,ue);var eo=Object.prototype.toString.call(to).slice(8,-1);if(eo==="Object"&&to.constructor&&(eo=to.constructor.name),eo==="Map"||eo==="Set")return Array.from(to);if(eo==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(eo))return _arrayLikeToArray(to,ue)}}function _arrayLikeToArray(to,ue){(ue==null||ue>to.length)&&(ue=to.length);for(var eo=0,no=new Array(ue);eo<ue;eo++)no[eo]=to[eo];return no}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
package/builder/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link href="/builder/fonts/source-sans-pro/600.css" rel="stylesheet" />
|
|
10
10
|
<link href="/builder/fonts/source-sans-pro/700.css" rel="stylesheet" />
|
|
11
11
|
<link href="/builder/fonts/remixicon.css" rel="stylesheet" />
|
|
12
|
-
<script type="module" crossorigin src="/builder/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/builder/assets/index-a523ac38.js"></script>
|
|
13
13
|
<link rel="stylesheet" href="/builder/assets/index-b8eb31a5.css">
|
|
14
14
|
</head>
|
|
15
15
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.23",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
53
53
|
"@azure/msal-node": "^2.5.1",
|
|
54
|
-
"@budibase/backend-core": "3.2.
|
|
55
|
-
"@budibase/client": "3.2.
|
|
56
|
-
"@budibase/frontend-core": "3.2.
|
|
54
|
+
"@budibase/backend-core": "3.2.23",
|
|
55
|
+
"@budibase/client": "3.2.23",
|
|
56
|
+
"@budibase/frontend-core": "3.2.23",
|
|
57
57
|
"@budibase/nano": "10.1.5",
|
|
58
|
-
"@budibase/pro": "3.2.
|
|
59
|
-
"@budibase/shared-core": "3.2.
|
|
60
|
-
"@budibase/string-templates": "3.2.
|
|
61
|
-
"@budibase/types": "3.2.
|
|
58
|
+
"@budibase/pro": "3.2.23",
|
|
59
|
+
"@budibase/shared-core": "3.2.23",
|
|
60
|
+
"@budibase/string-templates": "3.2.23",
|
|
61
|
+
"@budibase/types": "3.2.23",
|
|
62
62
|
"@bull-board/api": "5.10.2",
|
|
63
63
|
"@bull-board/koa": "5.10.2",
|
|
64
64
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -214,5 +214,5 @@
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
},
|
|
217
|
-
"gitHead": "
|
|
217
|
+
"gitHead": "32cd57a003986492f772d3ad9f06ca433cbec088"
|
|
218
218
|
}
|