diff --git a/Project.toml b/Project.toml index b54dce3..b8074a4 100755 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GenieBuilder" uuid = "c9453c14-af8a-11ec-351d-c7c9a2035d70" authors = ["Adrian Salceanu"] -version = "0.18.6" +version = "0.18.7" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" diff --git a/public/data/blockDefinitions.json b/public/data/blockDefinitions.json index a3ddc8a..e2ef9fc 100644 --- a/public/data/blockDefinitions.json +++ b/public/data/blockDefinitions.json @@ -160,7 +160,7 @@ "editable": false, "description": "TBD.\n\n\n\n", "tagName": "Q-TAB-PANEL", - "content": " ", + "content": " ", "droppable": true, "nestable": true, "properties": [ @@ -2303,7 +2303,7 @@ "description": "The QCard component is a great way to display important pieces of grouped content. This pattern is quickly emerging as a core design pattern for Apps, website previews and email content. It assists the viewer by containing and organizing information, while also setting up predictable expectations.\n\nWith so much content to display at once, and often so little screen real-estate, Cards have fast become the design pattern of choice for many companies, including the likes of Google and Twitter.\n\nThe QCard component is intentionally lightweight and essentially a containing element that is capable of \"hosting\" any other component that is appropriate.\n\n\n\n\n", "tagName": "Q-CARD", "content": "

Card text

", - "droppable": false, + "droppable": true, "nestable": true, "properties": [ { diff --git a/public/index.html b/public/index.html index 8ade585..c5a25a7 100644 --- a/public/index.html +++ b/public/index.html @@ -1,4 +1,4 @@ -GenieBuilder
\ No newline at end of file + } \ No newline at end of file diff --git a/public/js/app.959b5064.js b/public/js/app.959b5064.js deleted file mode 100644 index 4cdb2f8..0000000 --- a/public/js/app.959b5064.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(e){function t(t){for(var n,i,r=t[0],s=t[1],c=t[2],p=0,b=[];p(Object(n["J"])("data-v-6c90e336"),e=e(),Object(n["H"])(),e),w={style:{position:"relative"}},k={key:0},x=v(()=>Object(n["k"])("i",{class:"fa fa-chevron-right"},null,-1)),C=[x],D={key:1},P=v(()=>Object(n["k"])("i",{class:"fa fa-chevron-down"},null,-1)),S=[P];var T={__name:"PanelTitle",props:["title","expanded"],emits:["expand"],setup(e,{emit:t}){const a=e;let o=Object(n["L"])(a.expanded);function l(){t("expand",o.value)}return Object(n["ab"])(a,e=>{o.value=e.expanded}),(t,a)=>(Object(n["G"])(),Object(n["j"])("div",w,[Object(n["k"])("div",{class:"title",onClick:l},Object(n["R"])(e.title),1),Object(n["k"])("div",{class:"expandBtn",onClick:l},[Object(n["U"])(o)?Object(n["i"])("",!0):(Object(n["G"])(),Object(n["j"])("span",k,C)),Object(n["U"])(o)?(Object(n["G"])(),Object(n["j"])("span",D,S)):Object(n["i"])("",!0)])]))}},L=(a("49e5"),a("6b0d")),A=a.n(L);const U=A()(T,[["__scopeId","data-v-6c90e336"]]);var I=U;const E={style:{height:"100%","margin-right":"2px"}},R={class:"panelContent",style:{height:"calc(100% - 25px)",overflow:"auto"}};var M={__name:"Panel",props:["title","hideTitle"],emits:["update:expanded"],setup(e,{expose:t,emit:a}){const o=e;let l=Object(n["L"])(!0);function i(){r(!l.value)}function r(e){l.value=e,s(),a("update:expanded",e)}function s(){localStorage.setItem("panelExpandedState_"+o.title,l.value)}function c(){let e=localStorage.getItem("panelExpandedState_"+o.title);"false"===e&&(l.value=!1)}return c(),t({expanded:l,expand:r}),(t,a)=>(Object(n["G"])(),Object(n["j"])("div",E,[e.hideTitle?Object(n["i"])("",!0):(Object(n["G"])(),Object(n["h"])(I,{key:0,expanded:Object(n["U"])(l),title:e.title,onExpand:i},null,8,["expanded","title"])),Object(n["cb"])(Object(n["k"])("div",R,[Object(n["N"])(t.$slots,"default")],512),[[n["Z"],Object(n["U"])(l)]])]))}};a("26a9");const N=A()(M,[["__scopeId","data-v-17c958c7"]]);var G=N;const B={id:"tab-headers"},H=["onClick"],q={id:"active-tab",style:{"flex-grow":"1",display:"flex",height:"calc(100% - 120px)"}};var F={__name:"Tabs",props:["customClass"],emits:["changeTab"],setup(e,{emit:t}){let a=Object(n["L"])(null),o=Object(n["L"])(null),l=Object(n["L"])(null),i=Object(n["L"])(0);Object(n["D"])(()=>{l.value=[...a.value.querySelectorAll(".tab")];for(let e of l.value)e.classList.contains("active")&&(i=l.value.indexOf(e))});const r=e=>{i=e;for(let t of[...l.value,...o.value])t.classList.remove("active");l.value[i].classList.add("active"),o.value[i].classList.add("active"),t("changeTab",i)};return(t,s)=>(Object(n["G"])(),Object(n["j"])("div",{id:"tabs-container",class:Object(n["w"])(e.customClass),ref_key:"tabContainer",ref:a,style:{height:"100%",display:"flex","flex-direction":"column"}},[Object(n["k"])("div",B,[Object(n["k"])("ul",null,[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(Object(n["U"])(l),(e,t)=>(Object(n["G"])(),Object(n["j"])("li",{key:t,class:Object(n["w"])(Object(n["U"])(i)==t?"active":""),onClick:e=>r(t),ref_for:!0,ref_key:"tabHeaders",ref:o},Object(n["R"])(e.title),11,H))),128))])]),Object(n["k"])("div",q,[Object(n["N"])(t.$slots,"default")])],2))}};a("e9ee");const z=F;var V=z,$={__name:"Tab",props:["active"],setup(e){return(t,a)=>(Object(n["G"])(),Object(n["j"])("div",{class:Object(n["w"])(["tab","true"==e.active?"active":""]),ref:"tabs"},[Object(n["N"])(t.$slots,"default")],2))}};a("77a2");const W=$;var J=W;const Q={style:{position:"relative"}},Y={style:{"overflow-y":"auto"}},X=["title","onMouseover","onMousedown","datatype","bindingname"],Z=["datatype","bindingname","src"];var K={__name:"BindingsPanel",props:["appData"],emits:["bindingOvered"],setup(e,{expose:t,emit:a}){const o=e;let l,i,r=Object(n["L"])("type");function s(e){l=e.dragStart,i=e.dragStop}const c=Object(n["f"])(()=>{let e=[];return d.value.forEach(t=>{e.push({id:"tempplaceholder",type:"tempplaceholder",label:"Temp PlaceHolder",tagName:"TEMPPLACEHOLDER",content:`Binding '${t.name}' (${t.type})`,properties:[],droppable:!1,editable:!1,draggable:!0,binding:t})}),e}),d=Object(n["f"])(()=>{let e;return o.appData.pages[y.currentPageIndex].model.fields&&("az"==r.value?e=g["a"].sortBy(o.appData.pages[y.currentPageIndex].model.fields,e=>e.name.toLowerCase()):"type"==r.value&&(e=g["a"].sortBy(o.appData.pages[y.currentPageIndex].model.fields,e=>e.type.toLowerCase()+"_"+e.name.toLowerCase()))),e}),p=function(e,t){let n=t.target;a("bindingOvered",{element:n,binding:e})},b=function(){a("bindingOvered",{element:null,binding:null})};return t({setHandleBlocks:s}),(e,t)=>(Object(n["G"])(),Object(n["j"])("div",Q,[Object(n["k"])("div",Y,[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(c.value,e=>(Object(n["G"])(),Object(n["j"])("div",{title:e.binding.type,isbinding:"true",onMouseover:t=>p(e.binding,t),onMouseout:b,onMousedown:t=>Object(n["U"])(l)(e),datatype:e.binding.type,bindingname:e.binding.name,class:"bindingItem",key:e.binding.name},[Object(n["k"])("img",{datatype:e.binding.type,bindingname:e.binding.name,src:"img/icons/type_"+e.binding.type+".png",class:"typeIcon"},null,8,Z),Object(n["l"])(" "+Object(n["R"])(e.binding.name),1)],40,X))),128))])]))}};a("41c8");const ee=A()(K,[["__scopeId","data-v-0b09cf83"]]);var te=ee,ae=a("2ef0"),ne=a.n(ae);a("98c5"),a("13d5");let oe=[{id:"Area Chart",icon:"areaChart",proRequired:!1,traceTemplate:{gbtype:"Area Chart",x:["2024-01-01","2024-01-02","2024-01-03"],y:[10,15,13],type:"scatter",name:"Trace",fill:"tozeroy",mode:"none"}},{id:"Bar Chart",icon:"barChart",proRequired:!1,traceTemplate:{gbtype:"Bar Chart",x:["Category 1","Category 2","Category 3"],y:[9,10,20],type:"bar",name:"Trace"}},{id:"Box",icon:"boxChart",proRequired:!0,traceTemplate:{gbtype:"Box",y:[1,2,3,4,7,9],type:"box",name:"Trace"}},{id:"Candlestick",icon:"candlestickChart",proRequired:!0,traceTemplate:{gbtype:"Candlestick",x:["2024-01-01","2024-01-02","2024-01-03"],close:[10,12,11],high:[11,13,12],low:[9,11,10],open:[9,11,11],type:"candlestick",name:"Trace"}},{id:"Choropleth",icon:"choroplethChart",proRequired:!0,traceTemplate:{gbtype:"Choropleth",locationmode:"country names",locations:["Canada","United States","Mexico"],z:[10,20,30],type:"choropleth",name:"Trace"}},{id:"Cone",icon:"coneChart",proRequired:!0,traceTemplate:{gbtype:"Cone",x:[1,2,3],y:[1,2,3],z:[1,2,3],u:[1,0,0],v:[0,1,0],w:[0,0,1],type:"cone",name:"Trace",sizemode:"absolute"}},{id:"Contour",icon:"contourChart",proRequired:!0,traceTemplate:{gbtype:"Contour",x:[1,2,3],y:[1,2,3],z:[[10,10,10],[20,20,20],[30,30,30]],type:"contour",name:"Trace"}},{id:"Funnel",icon:"funnelChart",proRequired:!0,traceTemplate:{gbtype:"Funnel",x:[10,20,30],y:["Stage 1","Stage 2","Stage 3"],type:"funnel",name:"Trace"}},{id:"Funnel Area",icon:"funnelAreaChart",proRequired:!0,traceTemplate:{gbtype:"Funnel Area",values:[100,80,60,40,20],text:["Stage 1","Stage 2","Stage 3","Stage 4","Stage 5"],type:"funnelarea",name:"Trace"}},{id:"Heatmap",icon:"heatmapChart",proRequired:!1,traceTemplate:{gbtype:"Heatmap",x:["A","B","C"],y:["1","2","3"],z:[[1,20,30],[20,1,60],[30,60,1]],type:"heatmap",name:"Trace"}},{id:"Heatmap GL",icon:"heatmapGLChart",proRequired:!0,traceTemplate:{gbtype:"Heatmap GL",x:["A","B","C"],y:["1","2","3"],z:[[1,20,30],[20,1,60],[30,60,1]],type:"heatmapgl",name:"Trace"}},{id:"Histogram",icon:"histogramChart",proRequired:!1,traceTemplate:{gbtype:"Histogram",x:[1,2,3,2,3,2,3,7,6,8,5,8,1,1,1,9],type:"histogram",name:"Trace"}},{id:"Histogram 2D",icon:"histogram2DChart",proRequired:!0,traceTemplate:{gbtype:"Histogram 2D",x:[1,2,2,3,4],y:[6,6,7,8,8],type:"histogram2d",name:"Trace"}},{id:"Histogram 2D Contour",icon:"histogram2DContourChart",proRequired:!0,traceTemplate:{gbtype:"Histogram 2D Contour",x:[1,2,2,3,4],y:[6,6,7,8,8],type:"histogram2dcontour",name:"Trace"}},{id:"Indicator",icon:"indicatorChart",proRequired:!0,traceTemplate:{gbtype:"Indicator",mode:"number+delta",value:400,delta:{reference:350},type:"indicator",name:"Trace"}},{id:"Isosurface",icon:"isosurfaceChart",proRequired:!0,traceTemplate:{gbtype:"Isosurface",x:[0,0,0,0,1,1,1,1],y:[0,0,1,1,0,0,1,1],z:[0,1,0,1,0,1,0,1],value:[1,2,3,4,5,6,7,8],isomin:2,isomax:6,type:"isosurface",name:"Trace"}},{id:"Line Chart",icon:"lineChart",proRequired:!1,traceTemplate:{gbtype:"Line Chart",x:["2024-01-01","2024-01-02","2024-01-03"],y:[5,6,7],type:"scatter",mode:"lines",name:"Trace"}},{id:"Mash 3D",icon:"mash3DChart",proRequired:!0,traceTemplate:{gbtype:"Mash 3D",x:[0,1,2,0],y:[0,0,1,2],z:[0,2,0,1],i:[0,0,0,1],j:[1,2,3,2],k:[2,3,1,3],type:"mesh3d",name:"Trace"}},{id:"OHLC",icon:"ohlcChart",proRequired:!0,traceTemplate:{gbtype:"OHLC",x:["2024-01-01","2024-01-02","2024-01-03"],open:[100,110,120],high:[105,115,125],low:[95,105,115],close:[102,112,122],type:"ohlc",name:"Trace"}},{id:"Pie Chart",icon:"pieChart",proRequired:!1,traceTemplate:{gbtype:"Pie Chart",labels:["Slice 1","Slice 2","Slice 3"],values:[10,20,30],type:"pie",name:"Trace"}},{id:"Scatter",icon:"scatterChart",proRequired:!1,traceTemplate:{gbtype:"Scatter",x:[5,10,15],y:[10,15,5],type:"scatter",mode:"markers",name:"Trace"}},{id:"Scatter 3D",icon:"scatter3DChart",proRequired:!0,traceTemplate:{gbtype:"Scatter 3D",x:[1,2,3,4],y:[4,3,2,1],z:[1,2,3,4],mode:"markers",type:"scatter3d",name:"Trace"}},{id:"Scatter Geo",icon:"scatterGeoChart",proRequired:!0,traceTemplate:{gbtype:"Scatter Geo",lat:[40.712776,34.052235,41.878113],lon:[-74.005974,-118.243685,-87.629798],mode:"markers",type:"scattergeo",name:"Trace"}},{id:"Scatter GL",icon:"scatterGLChart",proRequired:!0,traceTemplate:{gbtype:"Scatter GL",x:[1,2,3,4],y:[10,11,12,13],mode:"markers",type:"scattergl",name:"Trace"}},{id:"Surface",icon:"surfaceChart",proRequired:!0,traceTemplate:{gbtype:"Surface",x:[1,2,3,4,5],y:[1,2,3,4,5],z:[[1,2,3,4,5],[2,4,6,8,10],[3,6,9,12,15],[4,8,12,16,20],[5,10,15,20,25]],type:"surface",name:"Trace"}},{id:"Table",icon:"tableChart",proRequired:!0,traceTemplate:{gbtype:"Table",header:{values:[["Header 1"],["Header 2"],["Header 3"]],align:"center",line:{width:1,color:"black"},fill:{color:"grey"},font:{family:"Arial",size:12,color:"white"}},cells:{values:[["Row 1","Row 2","Row 3"],["1","2","3"],["a","b","c"]],align:"center",line:{width:1,color:"black"},fill:{color:"white"},font:{family:"Arial",size:11,color:"black"}},type:"table",name:"Trace"}},{id:"Timeline",icon:"timelineChart",proRequired:!0,traceTemplate:{gbtype:"Timeline",x:["Start Date 1","Start Date 2","Start Date 3"],xend:["End Date 1","End Date 2","End Date 3"],y:["Task 1","Task 2","Task 3"],type:"scatter",mode:"lines",line:{width:4},name:"Trace"}},{id:"Violin",icon:"violinChart",proRequired:!0,traceTemplate:{gbtype:"Violin",y:[20,30,40,50,60,70,80,90,100,110],type:"violin",name:"Trace",box:{visible:!0},meanline:{visible:!0}}},{id:"Waterfall",icon:"waterfallChart",proRequired:!0,traceTemplate:{gbtype:"Waterfall",x:["Product Revenue","Services Revenue","Total Revenue","Fixed Costs","Variable Costs","Total Costs","Net Profit"],y:[60,80,0,-40,-20,0,40],type:"waterfall",name:"Trace",text:["$60","$80","","-$40","-$20","","$40"],textposition:"outside",connector:{line:{color:"rgb(63, 63, 63)"}},increasing:{marker:{color:"Green"}},decreasing:{marker:{color:"Red"}},totals:{marker:{color:"DeepSkyBlue"}}}},{id:"Scatter Mapbox",icon:"scatterMapboxChart",proRequired:!0,traceTemplate:{gbtype:"Scatter Mapbox",lat:[40.712776,34.052235],lon:[-74.005974,-118.243685],mode:"markers",type:"scattermapbox",name:"Trace"},traceLayout:{dragmode:"zoom",mapbox:{style:"open-street-map",center:{lat:38,lon:-90},zoom:3},margin:{r:0,t:0,b:0,l:0}}},{id:"Streamtube",icon:"streamtubeChart",proRequired:!0,traceTemplate:{gbtype:"Streamtube",type:"streamtube",x:[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2],y:[0,0,0,1,1,1,2,2,2,0,0,0,1,1,1,2,2,2,0,0,0,1,1,1,2,2,2],z:[0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2],u:[1,1,1,1,1,1,1,1,1,1.841470985,1.841470985,1.841470985,1.841470985,1.841470985,1.841470985,1.841470985,1.841470985,1.841470985,1.909297427,1.909297427,1.909297427,1.909297427,1.909297427,1.909297427,1.909297427,1.909297427,1.909297427],v:[1,1,1,.5403023059,.5403023059,.5403023059,.4161468365,.4161468365,.4161468365,1,1,1,.5403023059,.5403023059,.5403023059,.4161468365,.4161468365,.4161468365,1,1,1,.5403023059,.5403023059,.5403023059,.4161468365,.4161468365,.4161468365],w:[0,.088656062,.169392742,0,.088656062,.169392742,0,.088656062,.169392742,0,.088656062,.169392742,0,.088656062,.169392742,0,.088656062,.169392742,0,.088656062,.169392742,0,.088656062,.169392742,0,.088656062,.169392742],sizeref:.5,cmin:0,cmax:3,name:"Trace"}},{id:"Volume",icon:"volumeChart",proRequired:!0,traceTemplate:le()}];function le(){const e=3;let t=[],a=[],n=[],o=[];for(let r=1;r<=e;r++)for(let l=1;l<=e;l++)for(let i=1;i<=e;i++)t.push(r),a.push(l),n.push(i),o.push(0);for(let r=0;r<15;r++){const e=Math.floor(Math.random()*o.length);o[e]=1}o=o.map((t,a)=>{const n=[o[a-1]||0,o[a+1]||0,o[a-e]||0,o[a+e]||0,o[a-e*e]||0,o[a+e*e]||0],l=n.reduce((e,t)=>e+t,0);return(t+l/n.length)/2});const l=Math.max(...o);o=o.map(e=>e/l);const i={type:"volume",x:t,y:a,z:n,value:o,isomin:.1,isomax:.8,opacity:.1,surface_count:25};return i}const ie=e=>(Object(n["J"])("data-v-457e8d62"),e=e(),Object(n["H"])(),e),re={class:"componentAddDialogContainer"},se={class:"componentAddDialog"},ce=ie(()=>Object(n["k"])("p",{style:{"margin-bottom":"6px","font-size":"12px","font-weight":"400",opacity:"0.7"}},"Add component for binding",-1)),de={style:{"padding-bottom":"10px","border-bottom":"1px solid #cccccc50"}},pe=["src"],be=ie(()=>Object(n["k"])("div",{style:{"font-size":"14px",padding:"20px 0px 15px"}},"Suggested Components:",-1)),ue={class:"compGroupsContainer"},me=["onClick","title"],ge={class:"compName"},fe=["src"],_e={key:0,src:"img/icons/pro_badge.png",class:"proBadge",style:{}};var he={__name:"ComponentAddDialog",props:["appData","componentPlaceHolderData"],emits:["closeDialog"],setup(e,{emit:t}){const a=e;console.log("props.componentPlaceHolderData: ",a.componentPlaceHolderData);const o=y.IS_PRO;function l(e=!0){window.showUpgradeLicenseDialog(e)}function i(e){console.log("chartTypes",oe);let t=oe.find(t=>t.id==e);return t?t.traceTemplate:(console.error("Could not find chart with id: "+e),"")}const r=function(e){let t;t=e.icon?e.icon:e.type.split("q-").join("")+".png";const a="img/block_icons/"+t;return a};function s(e,t){console.log("selectCompProp(comp, prop",e,t);let n=(new DOMParser).parseFromString(e.content,"text/html").body.childNodes[0],o=t,l=a.componentPlaceHolderData.bindingname;if("DataFrames.DataFrame"==a.componentPlaceHolderData.datatype){let t=d(a.componentPlaceHolderData.bindingname);l+="."+t,l="$_{"+l+"}";let r=i(e.label);null!=r.x&&(r.x=l),null!=r.y&&(r.y=l),null!=r.z&&(r.z=l),null!=r.labels&&(r.labels=l),null!=r.values&&(r.values=l),console.log("traceTemplate: ",r),l=`[${JSON.stringify(r)}]`,l=btoa(l),n.removeAttribute("gb_c__data"),console.log("finalBindingName",l),n.setAttribute("gb_c__"+o,l)}else"DataTable.DataFrames.DataFrame"==a.componentPlaceHolderData.datatype?(n.removeAttribute("gb_c__data"),l+=".data",n.setAttribute("gb_b__"+o,l),n.setAttribute("gb_b__columns",a.componentPlaceHolderData.bindingname+".columns")):n.setAttribute("gb_b__"+o,l);let r=n.outerHTML;editor.getSelected().replaceWith(r),c(!1)}function c(e){t("closeDialog",e)}function d(e){let t=a.appData.pages[y.currentPageIndex].model.fields.filter(t=>t.name==e);return 0==t.length?(console.error("Could not find dataframe with name: "+e),""):t[0].columns&&0!=t[0].columns.length?t[0].columns[0]:(console.error("Dataframe "+e+" has no columns"),"")}return(e,t)=>(Object(n["G"])(),Object(n["j"])("div",re,[Object(n["k"])("div",se,[Object(n["k"])("div",{class:"closeButton",onClick:t[0]||(t[0]=e=>c(!0))},"X"),ce,Object(n["k"])("div",de,[Object(n["k"])("img",{src:"img/icons/type_"+a.componentPlaceHolderData.datatype+".png",style:{height:"17px","vertical-align":"middle",display:"inline-block"}},null,8,pe),Object(n["l"])(" "+Object(n["R"])(a.componentPlaceHolderData.bindingname),1)]),be,Object(n["k"])("div",ue,[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(a.componentPlaceHolderData.components,e=>(Object(n["G"])(),Object(n["j"])("div",{class:Object(n["w"])({compGroup:!0,compGroupDisabled:e.proRequired&&!Object(n["U"])(o)}),key:e.type,onClick:t=>!e.proRequired||e.proRequired&&Object(n["U"])(o)?s(e,e.matchingProperties[0]):l(!0),title:e.proRequired&&!Object(n["U"])(o)?"Upgrade to PRO plan to use this component and many more!":e.label},[Object(n["k"])("div",ge,[Object(n["k"])("div",{class:Object(n["w"])({compNameLabel:!0,compNameLabelProRequired:e.proRequired&&!Object(n["U"])(o)})},Object(n["R"])(e.label),3),Object(n["k"])("div",{class:Object(n["w"])({compNameIconContainer:!0,compNameIconContainerProRequired:e.proRequired&&!Object(n["U"])(o)})},[Object(n["k"])("img",{src:r(e),class:Object(n["w"])({typeIcon:!0,typeIconProRequired:e.proRequired&&!Object(n["U"])(o)}),style:{filter:"var(--library-icon-filter)","max-height":"20px","margin-top":"6px","pointer-events":"none"}},null,10,fe)],2),e.proRequired&&!Object(n["U"])(o)?(Object(n["G"])(),Object(n["j"])("img",_e)):Object(n["i"])("",!0)])],10,me))),128))])])]))}};a("dff5");const ye=A()(he,[["__scopeId","data-v-457e8d62"]]);var Oe=ye,je=a("d6e4");let ve,we,ke,xe={supportedIcons:["search","search","home","account_circle","settings","done","info","check_circle","delete","visibility","shopping_cart","favorite","description","logout","favorite_border","lock","schedule","language","help_outline","face","manage_accounts","verified","filter_alt","thumb_up","event","fingerprint","dashboard","list","login","visibility_off","check_circle_outline","calendar_today","highlight_off","help","paid","task_alt","question_answer","date_range","article","open_in_new","shopping_bag","lightbulb","credit_card","perm_identity","history","trending_up","account_balance","delete_outline","fact_check","report_problem","verified_user","assignment","star_rate","arrow_right_alt","account_balance_wallet","autorenew","build","view_list","work","print","store","analytics","delete_forever","today","calendar_month","admin_panel_settings","lock_open","watch_later","grade","update","savings","room","code","receipt","add_shopping_cart","contact_support","power_settings_new","done_all","pets","explore","bookmark","account_box","note_add","reorder","bookmark_border","pending_actions","shopping_basket","payment","launch","drag_indicator","supervisor_account","touch_app","pending","zoom_in","assessment","leaderboard","thumb_up_off_alt","open_in_full","preview","done_outline","exit_to_app","assignment_ind","published_with_changes","card_giftcard","view_in_ar","feedback","work_outline","timeline","swap_horiz","assignment_turned_in","dns","stars","sync_alt","label","flight_takeoff","tips_and_updates","book","contact_page","alarm","space_dashboard","bug_report","cached","gavel","translate","pan_tool","edit_calendar","supervised_user_circle","minimize","extension","accessibility","android","rocket_launch","get_app","question_mark","record_voice_over","add_task","trending_flat","help_center","hourglass_empty","accessibility_new","rule","thumb_down","sticky_note_2","settings_applications","source","dashboard_customize","find_in_page","ads_click","support","flutter_dash","close_fullscreen","redeem","announcement","loyalty","swap_vert","arrow_circle_right","view_headline","restore","dangerous","euro_symbol","group_work","sensors","compare_arrows","subject","table_view","disabled_by_default","privacy_tip","nightlight_round","https","toc","track_changes","arrow_circle_up","bookmarks","copyright","grading","currency_exchange","input","api","perm_media","query_builder","view_module","build_circle","zoom_out","perm_contact_calendar","settings_phone","backup","open_with","circle_notifications","perm_phone_msg","book_online","speaker_notes","label_important","wysiwyg","card_membership","file_present","arrow_circle_down","pageview","3d_rotation","upgrade","integration_instructions","change_history","trending_down","swipe","class","percent","accessible","g_translate","settings_accessibility","expand","offline_bolt","settings_backup_restore","production_quantity_limits","arrow_circle_left","aspect_ratio","model_training","view_column","donut_large","segment","calendar_view_month","schedule_send","alarm_on","maximize","bookmark_add","thumbs_up_down","settings_ethernet","theaters","view_agenda","thumb_down_off_alt","important_devices","unpublished","invert_colors","opacity","commute","open_in_browser","system_update_alt","no_accounts","addchart","history_toggle_off","view_week","youtube_searched_for","tour","shopping_cart_checkout","hide_source","bookmark_added","mark_as_unread","settings_input_antenna","shop","plagiarism","turned_in","search_off","not_started","flight_land","assignment_late","assignment_return","donut_small","saved_search","filter_alt_off","contactless","highlight_alt","hotel_class","settings_input_component","balance","view_carousel","view_quilt","anchor","all_inbox","turned_in_not","mediation","settings_remote","edit_off","hourglass_full","fit_screen","flaky","rocket","toll","remove_shopping_cart","lock_clock","swap_horizontal_circle","settings_voice","view_sidebar","event_seat","online_prediction","vertical_split","next_plan","pregnant_woman","data_exploration","terminal","restore_from_trash","lock_reset","camera_enhance","markunread_mailbox","dynamic_form","tab","calendar_view_week","view_stream","accessible_forward","request_page","token","remove_done","settings_power","smart_button","add_to_drive","card_travel","outbox","try","offline_pin","calendar_view_day","find_replace","density_medium","rowing","compress","chrome_reader_mode","fax","outlet","assignment_returned","http","settings_brightness","add_card","alarm_add","generating_tokens","new_label","backup_table","spellcheck","restore_page","credit_card_off","wifi_protected_setup","play_for_work","free_cancellation","settings_overscan","work_history","123","gif","outbound","disabled_visible","swap_vertical_circle","settings_input_composite","cancel_schedule_send","quickreply","view_day","event_repeat","comment_bank","assured_workload","switch_access_shortcut","display_settings","view_timeline","line_weight","pan_tool_alt","horizontal_split","noise_control_off","webhook","satellite_alt","polymer","batch_prediction","send_and_archive","picture_in_picture","manage_history","code_off","bookmark_remove","settings_bluetooth","shop_two","output","html","flip_to_front","gif_box","eject","speaker_notes_off","alarm_off","perm_data_setting","settings_input_hdmi","perm_scan_wifi","hourglass_disabled","troubleshoot","switch_access_shortcut_add","sensors_off","settings_cell","work_off","app_blocking","picture_in_picture_alt","line_style","perm_device_information","join_full","subtitles_off","update_disabled","app_shortcut","javascript","abc","swipe_left","voice_over_off","private_connectivity","lightbulb_circle","settings_input_svideo","join_inner","flip_to_back","view_array","swipe_right","install_desktop","open_in_new_off","swipe_up","all_out","shop_2","label_off","density_small","tab_unselected","rounded_corner","data_thresholding","text_rotate_vertical","arrow_outward","commit","explore_off","install_mobile","text_rotation_none","view_kanban","not_accessible","css","swipe_down","lock_person","pin_invoke","join_left","extension_off","spatial_audio_off","perm_camera_mic","pinch","swipe_vertical","noise_aware","pin_end","view_cozy","join_right","swipe_right_alt","text_rotate_up","text_rotation_angleup","text_rotation_down","text_rotation_angledown","browse_gallery","php","view_comfy_alt","view_compact_alt","network_ping","swipe_down_alt","add_home","density_large","on_device_training","swipe_left_alt","spatial_tracking","swipe_up_alt","unfold_more_double","spatial_audio","width_full","unfold_less_double","repartition","width_normal","transcribe","width_wide","hls","hls_off","face_unlock","close","close","menu","expand_more","arrow_back","chevron_right","arrow_forward_ios","arrow_back_ios","cancel","arrow_drop_down","more_vert","arrow_forward","chevron_left","expand_less","check","more_horiz","refresh","apps","payments","arrow_upward","east","campaign","arrow_back_ios_new","arrow_downward","arrow_right","menu_open","fullscreen","arrow_drop_up","unfold_more","double_arrow","maps_home_work","west","expand_circle_down","south","arrow_left","north_east","north","home_work","first_page","fullscreen_exit","arrow_drop_down_circle","last_page","unfold_less","subdirectory_arrow_right","legend_toggle","south_east","app_settings_alt","assistant_direction","subdirectory_arrow_left","north_west","waterfall_chart","switch_left","south_west","pivot_table_chart","switch_right","apps_outage","offline_share","add_home_work","person","person","notifications","groups","people","share","school","person_outline","person_add","public","emoji_events","group","engineering","notifications_active","construction","people_alt","group_add","psychology","health_and_safety","thumb_up_alt","travel_explore","water_drop","notifications_none","emoji_emotions","sports_esports","sentiment_very_satisfied","location_city","ios_share","precision_manufacturing","sentiment_satisfied","workspace_premium","person_add_alt","military_tech","science","emoji_objects","history_edu","cake","sentiment_dissatisfied","sentiment_very_dissatisfied","handshake","emoji_people","coronavirus","self_improvement","person_remove","poll","whatshot","sports_soccer","domain","mood","recommend","people_outline","female","recycling","person_off","male","person_add_alt_1","connect_without_contact","sentiment_neutral","back_hand","hiking","waving_hand","architecture","masks","notifications_off","thumb_down_alt","luggage","real_estate_agent","front_hand","vaccines","mood_bad","emoji_nature","switch_account","nights_stay","king_bed","catching_pokemon","interests","compost","sports_basketball","notification_add","diversity_3","sports_kabaddi","sports","emoji_symbols","reduce_capacity","emoji_food_beverage","cruelty_free","man","sick","emoji_transportation","sports_tennis","cookie","heart_broken","transgender","elderly","add_moderator","outdoor_grill","deck","woman","add_reaction","social_distance","personal_injury","follow_the_signs","plus_one","fireplace","wallet","scale","clean_hands","piano","pix","surfing","sanitizer","sports_motorsports","diversity_1","sports_handball","sports_baseball","edit_notifications","hive","sports_volleyball","pages","groups_2","sports_football","downhill_skiing","kayaking","psychology_alt","public_off","single_bed","remove_moderator","group_remove","skateboarding","co2","notifications_paused","boy","person_remove_alt_1","safety_divider","diversity_2","domain_add","fitbit","sports_cricket","group_off","sports_mma","nordic_walking","sports_martial_arts","sports_golf","girl","thunderstorm","paragliding","6_ft_apart","party_mode","snowboarding","kitesurfing","sports_gymnastics","groups_3","face_6","snowshoeing","sports_hockey","ice_skating","south_america","sports_rugby","face_3","elderly_woman","sledding","scoreboard","person_2","face_2","face_4","sign_language","no_luggage","cyclone","person_4","face_5","person_3","piano_off","flood","scuba_diving","severe_cold","tsunami","roller_skating","tornado","landslide","assist_walker","woman_2","man_2","volcano","18_up_rating","blind","no_adult_content","man_4","man_3","add","add","add_circle_outline","content_copy","add_circle","send","clear","save","mail","link","remove","filter_list","inventory_2","inventory","insights","remove_circle_outline","sort","bolt","flag","reply","add_box","remove_circle","push_pin","block","calculate","create","undo","how_to_reg","content_paste","report","file_copy","backspace","shield","archive","save_alt","policy","tag","change_circle","redo","forward","content_cut","outlined_flag","inbox","link_off","ballot","drafts","biotech","report_gmailerrorred","delete_sweep","stacked_bar_chart","markunread","square_foot","add_link","stream","where_to_vote","dynamic_feed","copy_all","move_to_inbox","waves","unarchive","content_paste_search","reply_all","select_all","low_priority","text_format","save_as","font_download","weekend","how_to_vote","upcoming","gesture","attribution","flag_circle","content_paste_go","filter_list_off","next_week","content_paste_off","report_off","web_stories","deselect","font_download_off","edit","edit","navigate_next","photo_camera","image","tune","picture_as_pdf","receipt_long","circle","timer","auto_stories","collections","auto_awesome","navigate_before","add_a_photo","palette","remove_red_eye","music_note","add_photo_alternate","wb_sunny","brush","euro","flash_on","looks_one","auto_fix_high","control_point","style","adjust","straighten","photo_library","camera","portrait","camera_alt","audiotrack","video_camera_front","rotate_right","color_lens","grid_on","crop_free","timelapse","landscape","slideshow","currency_rupee","collections_bookmark","crop_square","lens","panorama_fish_eye","looks_two","filter_vintage","compare","looks_3","filter_drama","image_search","healing","auto_awesome_motion","rotate_left","center_focus_strong","crop","blur_on","wb_incandescent","flare","face_retouching_natural","wb_cloudy","assistant","broken_image","cases","colorize","filter_none","brightness_4","filter_center_focus","crop_original","auto_fix_normal","dehaze","nature_people","photo","flash_off","auto_awesome_mosaic","tag_faces","brightness_6","brightness_5","details","grain","flip_camera_android","brightness_1","flip","loupe","image_not_supported","flip_camera_ios","view_comfy","filter_1","movie_creation","add_to_photos","panorama","bedtime","animation","center_focus_weak","looks_4","movie_filter","crop_din","filter","control_point_duplicate","brightness_7","leak_add","currency_bitcoin","nature","incomplete_circle","texture","view_compact","timer_off","photo_size_select_actual","video_camera_back","transform","currency_yen","motion_photos_on","photo_camera_front","rotate_90_degrees_ccw","looks_5","mic_external_on","gradient","assistant_photo","wb_twilight","currency_pound","contrast","hide_image","music_off","exposure_plus_1","crop_16_9","thermostat_auto","filter_2","shutter_speed","exposure","photo_album","filter_tilt_shift","hdr_strong","looks","vrpano","linked_camera","brightness_3","looks_6","blur_circular","flash_auto","motion_photos_auto","crop_portrait","photo_filter","iso","brightness_2","tonality","photo_size_select_small","filter_hdr","crop_7_5","rotate_90_degrees_cw","crop_rotate","photo_size_select_large","filter_3","exposure_zero","hdr_weak","currency_ruble","camera_front","crop_5_4","filter_frames","burst_mode","camera_roll","logo_dev","filter_b_and_w","blur_linear","crop_3_2","crop_landscape","switch_camera","switch_video","filter_7","exposure_plus_2","filter_4","filter_9_plus","grid_off","wb_iridescent","motion_photos_paused","monochrome_photos","photo_camera_back","filter_5","auto_fix_off","face_retouching_off","exposure_neg_1","panorama_photosphere","filter_8","leak_remove","filter_9","video_stable","timer_10","filter_6","wb_shade","blur_off","motion_photos_off","raw_on","motion_photos_pause","hdr_on","vignette","panorama_horizontal","30fps_select","image_aspect_ratio","dirty_lens","deblur","camera_rear","60fps_select","timer_3","panorama_wide_angle_select","24mp","exposure_neg_2","currency_yuan","currency_lira","autofps_select","panorama_horizontal_select","panorama_photosphere_select","hdr_plus","wb_auto","panorama_wide_angle","panorama_vertical_select","mic_external_off","12mp","panorama_vertical","mp","hdr_enhanced_select","currency_franc","hevc","18mp","10mp","raw_off","23mp","bedtime_off","hdr_off","11mp","20mp","3mp","5mp","13mp","15mp","16mp","21mp","2mp","17mp","14mp","22mp","19mp","9mp","4mp","7mp","8mp","6mp","email","email","location_on","call","phone","business","chat","mail_outline","list_alt","qr_code_scanner","vpn_key","chat_bubble_outline","alternate_email","forum","chat_bubble","textsms","contact_mail","person_search","sentiment_satisfied_alt","qr_code","qr_code_2","message","contacts","comment","key","import_contacts","app_registration","contact_phone","import_export","live_help","forward_to_inbox","hourglass_bottom","hourglass_top","rss_feed","mark_email_read","hub","read_more","document_scanner","more_time","mark_email_unread","call_end","clear_all","dialpad","phone_enabled","mark_chat_unread","cancel_presentation","3p","call_made","screen_share","call_split","unsubscribe","present_to_all","domain_verification","mark_chat_read","add_ic_call","co_present","phonelink_ring","stay_current_portrait","call_received","phonelink_lock","phone_disabled","ring_volume","location_off","phonelink_setup","duo","cell_tower","stay_primary_portrait","swap_calls","voicemail","call_merge","mobile_screen_share","phonelink_erase","person_add_disabled","domain_disabled","call_missed_outgoing","speaker_phone","spoke","cell_wifi","desktop_access_disabled","stop_screen_share","print_disabled","call_missed","mark_unread_chat_alt","pause_presentation","dialer_sip","invert_colors_off","comments_disabled","contact_emergency","wifi_calling","rtt","portable_wifi_off","send_time_extension","mail_lock","stay_current_landscape","sip","nat","stay_primary_landscape","no_sim","key_off","vpn_key_off","local_shipping","local_shipping","place","menu_book","local_offer","badge","map","category","restaurant","directions_car","local_fire_department","volunteer_activism","my_location","flight","local_mall","near_me","handyman","directions_run","restaurant_menu","layers","medical_services","directions_walk","lunch_dining","local_hospital","celebration","local_library","pin_drop","park","local_atm","local_activity","person_pin","design_services","local_cafe","rate_review","delivery_dining","directions_bus","local_police","directions_bike","fastfood","directions_car_filled","home_repair_service","zoom_out_map","hotel","cleaning_services","local_phone","local_grocery_store","miscellaneous_services","navigation","local_gas_station","train","person_pin_circle","local_parking","local_florist","diamond","local_post_office","money","directions","two_wheeler","factory","add_business","traffic","electrical_services","local_bar","route","directions_boat","alt_route","agriculture","pedal_bike","beenhere","360","warehouse","liquor","emergency","moving","local_airport","sailing","add_location_alt","local_dining","maps_ugc","local_taxi","ramen_dining","trip_origin","hail","local_drink","local_laundry_service","directions_bus_filled","local_printshop","theater_comedy","local_pizza","not_listed_location","add_location","transfer_within_a_station","dinner_dining","bakery_dining","forest","wine_bar","terrain","multiple_stop","takeout_dining","store_mall_directory","icecream","museum","nightlife","local_pharmacy","hardware","add_road","departure_board","set_meal","ev_station","local_see","electric_car","festival","plumbing","layers_clear","car_rental","attractions","edit_location","local_convenience_store","zoom_in_map","pest_control","medical_information","dry_cleaning","run_circle","edit_road","edit_attributes","edit_location_alt","church","moped","wrong_location","car_repair","local_movies","satellite","directions_boat_filled","tram","soup_kitchen","taxi_alert","breakfast_dining","signpost","atm","subway","transit_enterexit","straight","merge","brunch_dining","hvac","electric_bike","directions_transit","crisis_alert","electric_scooter","connecting_airports","bus_alert","egg","local_car_wash","local_hotel","mode_of_travel","stadium","castle","streetview","safety_check","directions_subway","car_crash","mosque","compass_calibration","electric_rickshaw","turn_right","airline_stops","directions_railway","no_meals","fork_right","railway_alert","electric_moped","local_play","bike_scooter","no_crash","turn_left","airlines","pest_control_rodent","near_me_disabled","snowmobile","u_turn_left","directions_transit_filled","egg_alt","no_transfer","file_download","play_arrow","star","warning","support_agent","attach_money","keyboard_arrow_down","light_mode","storefront","manage_search","sensor_door"].sort(),supportedColors:["primary","secondary","accent","dark","positive","negative","info","warning"]};function Ce(){return ve}function De(e){r["a"].get("data/blockDefinitions.json").then(t=>{ve=t.data,Pe(),Se(),e(ve)}).catch(e=>{console.error("Error loading block definitions: ",e)})}function Pe(){ve=ve.filter(e=>e.enabled),ve.forEach(e=>{let t=e.properties.findIndex(e=>"v-model"==e.name);t>-1&&e.properties.splice(t,1);let a=e.properties.findIndex(e=>"model-value"==e.name);a>-1&&(e.properties[a].name="v-model",e.properties[a].label="Data Binding"),(e.content.indexOf("v-on:click")>-1||e.content.indexOf("v-model")>-1)&&(e.content=e.content.replace('v-on:click="-"','v-on:click=""'),e.content=e.content.replace('v-model="-"','v-model=""')),e.properties.push({name:"v-if",label:"Condition (if)",type:"Boolean",uitype:"String",desc:'Defines a conditional which, when true, will show the element in the document.\nYou can use JS code, i.e. "value > 10"'}),e.properties.push({name:"v-else-if",label:"Condition (else-if)",type:"Boolean",uitype:"String",desc:'Defines a conditional which, when true, will show the element in the document.\nYou can use JS code, i.e. "value > 10"'}),e.properties.push({name:"v-else",label:"Condition (else)",type:"Boolean",uitype:"String",desc:'Defines a conditional which, when previous if/else-if statements are false, will show the element in the document."'}),e.properties.push({name:"v-for",label:"Loop (for)",type:"Array",desc:"Sets the element to iterate over a list of values, producing multiple instances.\nYou can declare iterator values pointing to the list elements and indexes, and use them in other props.\nI.e.: \n- item in list\n- (item, index) in list"});let n=e.properties;n.forEach(e=>{for(let t in e){let a=e[t];if("string"==typeof a&&0==a.indexOf("${")){let n=a.slice(2,-1),o=xe[n];e[t]=o}"type"==t&&Array.isArray(a)&&(e[t]=a[0],e.typeList=a)}})})}function Se(){ve.push({type:"tempplaceholder",label:"Temp PlaceHolder",tagName:"TEMPPLACEHOLDER",content:"TEMP Place holder",properties:[],droppable:!1,editable:!1,draggable:!0}),oe.forEach(e=>{let t=btoa(JSON.stringify([e.traceTemplate])),a=e.traceLayout,n=a?btoa(JSON.stringify(a)):"eyJ0aXRsZSI6Ik15IENoYXJ0In0=";ve.push({type:"plotly",label:e.id,tagName:"PLOTLY",category:"Charts",content:``,renderContent:'',icon:e.icon+".png",proRequired:e.proRequired,properties:[{label:"Data",name:"data",type:"PlotlyBase.GenericTrace"},{label:"Layout",name:"layout",type:"PlotlyBase.Layout"},{label:"Config",name:"config",type:"Object"}]})}),ve.push({type:"plotly",label:"Bound Chart",tagName:"PLOTLY",category:"Charts",content:'',renderContent:'',icon:"bound_chart.png",proRequired:!1,properties:[{label:"Data",name:"data",type:"PlotlyBase.GenericTrace"},{label:"Layout",name:"layout",type:"PlotlyBase.Layout"},{label:"Config",name:"config",type:"Object"}]})}function Te(){null==we&&(we=Ce(),ke={},we.forEach(e=>{ke[e.tagName]=e}))}class Le{constructor(){throw new Error("HtmlTemplateParser is a static class and cannot be instantiated")}static replaceSpecialElements(e){return e.replace(/<%/g,"").replace(/%>/g,"")}static restoreSpecialElements(e){return e.replace(//gi,"<% ").replace(/<\/JULIA_CODE>/gi," %>")}static encodeAttributesInDOM(e){if(!(e instanceof Node))throw new Error("Element is not a Node");Le.replaceElementAttributes(e);for(let t=0;te);const i=[...l,...e],r=a[2];return{variables:i,iterated:r}}return null}static extractVforVariablesAncestors(e){let t=[],a=e,n=!1,o=1e3,l=0;try{while(!n&&a&&a.parentElement){let e=a.getAttributeNames();if(e.includes("gb_c__v-for")){let e=a.getAttribute("gb_c__v-for"),n=Le.parseVFor(e).variables;n.forEach(e=>{0==t.includes(e)&&t.push(e)})}let i="gbTemplateContainer"==a.parentElement.id||"BODY"==a.parentElement.tagName;l>=o||i?n=!0:(l++,a=a.parentElement)}}catch(i){console.error("Error retrieving v-for variables recursively: ",i)}return t}static replaceElementAttributes(e){Te();let t=window.sharedData.modelFieldsByName,a="gb_",n=a+"c__",o=a+"b__",l=["v-model","v-bind","v-on:click","v-for","v-if","v-else-if","v-else","v-html"],i=["class","style","id"],r=e.nodeName,s=ke[r];if(!s)return;let c=s.properties,d=e.getAttributeNames(),p=Le.extractVforVariablesAncestors(e);d.forEach(a=>{if(i.indexOf(a)>-1)return;let r=a.startsWith(":"),s=r?a.slice(1):a,d=r||l.some(e=>0===a.indexOf(e)),b=e.getAttribute(a),u=c.find(e=>e.name===s),m=null!=t[b],g=p.includes(b);u&&(d?m||g?e.setAttribute(o+s,b):e.setAttribute(n+s,b):""==b?e.setAttribute(n+s,"true"):e.setAttribute(n+s,b),e.removeAttribute(a))})}static revertElementAttributes(e){Te();let t="gb_",a=t+"c__",n=t+"b__",o=e.nodeName,l=ke[o];if(!l)return;let i=l.properties,r=e.getAttributeNames();r.forEach(t=>{let l=e.getAttribute(t);if(t.startsWith(a)){let n=t.replace(a,""),r=i.find(e=>e.name===n);if(!r)throw new Error("Attribute definition not found for: "+n);let s=r.type;"PLOTLY"==o&&["data","layout","config"].includes(n)||"String"==s||n.startsWith("v-on:")||"v-for"==n||"v-if"==n||"v-else-if"==n||"v-else"==n||"v-html"==n||(n=":"+n),e.setAttribute(n,l),e.removeAttribute(t)}else if(t.startsWith(n)){let a=t.replace(n,""),o="v-model"===a||a.startsWith("v-on:")||"v-for"==a||"v-if"==a||"v-else-if"==a||"v-else"==a||"v-html"==a?"":":";e.setAttribute(o+a,l),e.removeAttribute(t)}})}static decodeAttributesInDOM(e,t=!1){let a=e.querySelectorAll("*");a.forEach(e=>{Le.revertElementAttributes(e),t&&Le.decodeAttributesInDOM(e,t)})}static guessDataType(e){return"number"===typeof e||/^-?\d*\.?\d+$/.test(e)?"Number":"true"===e||"false"===e||"boolean"===typeof e?"Boolean":Array.isArray(e)||/^\[.*\]$/.test(e)?"Array":"String"}static removeInvalidNodes(e){const t=new DOMParser,a=t.parseFromString(e,"text/html"),n=e=>e.nodeType===Node.TEXT_NODE&&!/\S/.test(e.nodeValue),o=["template"],l=e=>o.includes(e.nodeName.toLowerCase()),i=e=>{const t=Array.from(e.childNodes);t.forEach(t=>{n(t)||l(e)?e.removeChild(t):i(t)})};i(a.body);const r=new XMLSerializer,s=r.serializeToString(a.body);return s.replace(/^|<\/body>$/g,"")}static generateBlocksMandatoryProperties(){let e={};return we.forEach(t=>{let a=e[t.type]={type:t.type,mandatoryProperties:[]},n=t.content,o=new DOMParser,l=o.parseFromString(n,"text/html"),i=l.body.firstChild;for(let e=0;e{e.getAttribute(t.name)||e.getAttribute(":"+t.name)||e.setAttribute(t.name,t.value)})}e.childNodes.forEach(e=>l(e))}}return l(o),o.innerHTML}static cleanNodes(e){let t=new DOMParser,a=t.parseFromString(e,"text/html"),n=a.body;return n.innerHTML}static cleanNodes(e){if(1!=e.nodeType)return;let t=e.tagName.toLowerCase();switch(t){case"q-badge":e.innerHTML="";break;case"q-table":let t=e.getAttribute(":columns");t&&(t.startsWith("{")||t.startsWith("[")?e.removeAttribute(":columns"):t.endsWith(".columns")||e.setAttribute(":columns",t+".columns"));let a=e.getAttribute(":data"),n=e.getAttribute(":rows");a?a.startsWith("{")||a.startsWith("[")?(e.removeAttribute(":data"),isRemoved=!0):a.endsWith(".data")||e.setAttribute(":data",a+".data"):n&&(n.startsWith("{")||n.startsWith("[")||n.endsWith(".data")||e.setAttribute(":data",n+".data"),e.removeAttribute(":rows"));break;default:break}for(let a=0;aLe.cleanNodes(e))}static cleanHtml(e){let t=new DOMParser;e=Le.removeInvalidNodes(e);let a=t.parseFromString(e,"text/html"),n=a.body;Le.cleanNodes(n);const o=new XMLSerializer;e=o.serializeToString(a.body);let l=Le.generateBlocksMandatoryProperties();return e=Le.addMandatoryProperties(e,l),e}}const Ae=e=>(Object(n["J"])("data-v-49cd9b2f"),e=e(),Object(n["H"])(),e),Ue={style:{height:"100%"}},Ie=Ae(()=>Object(n["k"])("div",{id:"gjs",style:{height:"300px"}},null,-1)),Ee={id:"customLibrary",style:{display:"none"}},Re={class:"blocks"},Me=["onMousedown"],Ne={class:"block-label"},Ge={key:0,id:"canvasBlockerPreloader"},Be=Ae(()=>Object(n["k"])("div",null,"Updating UI, please wait...",-1)),He=Ae(()=>Object(n["k"])("div",null,[Object(n["k"])("img",{src:"img/icons/loading_58.svg",alt:"Loading",style:{position:"relative",bottom:"0",right:"0",width:"58px",height:"58px"}})],-1)),qe=[Be,He],Fe={key:1,id:"canvasBlockerDialog"},ze=Ae(()=>Object(n["k"])("div",{style:{"margin-bottom":"5px"}},"AI Code Assistant changes applied!",-1));var Ve={__name:"CanvasPanel",props:["appData"],emits:["componentSelected","bindingDroppedOnComponent","saveTriggered","autoSaveTriggered"],setup(e,{expose:t,emit:a}){const o=e;window.HtmlTemplateParser=Le;let l=Object(n["L"])(o.appData.pages[y.currentPageIndex].model.fields),i={};l.value.forEach(e=>{i[e.name]=e});let s=blockDefinitions.map(e=>{let t={type:e.type,label:e.label,tagName:e.tagName,id:e.type,category:e.category,content:e.content,droppable:e.droppable,draggable:e.draggable,editable:e.editable,activate:!0};return t});window.selectedComponent=null;let c=Object(n["L"])(null),d=Object(n["L"])(null),p=Object(n["L"])({}),b=Object(n["L"])(null),u=Object(n["L"])("hidden"),m=!1;function g(e){const t=editor.UndoManager;t.undo(),editor.setComponents(window.lastHtmlBeforeAiReplace),u.value="hidden",a("saveTriggered")}function f(){u.value="hidden",a("saveTriggered")}function _(e){e&&(editor.getSelected().remove(),window.selectedComponent=null,editor.select(null)),c.value=null}function h(e){if(editor.select(e),"tempplaceholder"==e.attributes.tagName){var t;let n=e.view.$el[0].parentNode,o=null===(t=n.grapesModel)||void 0===t?void 0:t.attributes.type;"plotly"==o&&e.attributes.attributes.bindingname&&e.attributes.attributes.datatype?a("bindingDroppedOnComponent",{newComponentModel:e,targetModel:n.grapesModel,bindingInfo:e.attributes.attributes}):O(e.attributes.attributes.bindingname,e.attributes.attributes.datatype)}}function O(e,t){let a=blockDefinitions,n=[];a.forEach(e=>{let a=e.type,o=e.properties,l=o.filter(e=>{let a=e.type==t,n="v-model"==e.name;return a&&n}).map(e=>e.name);l.length>0&&l.includes("v-model")&&n.push({type:a,label:e.label,content:e.content,matchingProperties:l,proRequired:e.proRequired}),("DataFrames.DataFrame"==t&&"plotly"==a||"DataTable.DataFrames.DataFrame"==t&&"q-table"==a)&&n.push({type:a,label:e.label,content:e.content,icon:e.icon,matchingProperties:["data"],proRequired:e.proRequired})}),c.value={components:n,bindingname:e,datatype:t}}window.sharedData={externalData:null,setExternalData:function(e){for(let a in e)this.externalData[a]=e[a];const t=new CustomEvent("sharedDataChanged",{detail:this.externalData});for(let a in window.canvasComponents){let e=window.canvasComponents[a];null!=e&&e.onExternalDataChanged&&e.onExternalDataChanged(t)}}},window.sharedData.externalData={initialProperty:"initialValue"},window.sharedData.getComponentDefinitionByType=k,window.sharedData.modelFieldsByName=i;let j,v,w=y.getAppBaseUrl("ws",y.appport);function k(e){let t=blockDefinitions,a=t.find(t=>t.type.toLowerCase()==e.toLowerCase());return a}function x(e,t){p.value[e]=t,window.sharedData.setExternalData(p.value)}function C(e,t={}){let a=JSON.stringify({channel:y.CHANNEL__,message:e,payload:t});j.send(a)}function D(){let e=JSON.stringify({channel:"autoreload",message:"subscribe",payload:{}});j.send(e)}function P(){return j=new WebSocket(w),j.addEventListener("open",e=>{C("subscribe"),D()}),j.addEventListener("message",e=>{if("Subscription: OK"!=e.data){if(0==e.data.indexOf("{")){let t=JSON.parse(e.data);null!=t.key&&x(t.key,t.value)}}else C("watchers",{payload:{field:"isready",newval:!0,oldval:!1}})}),j.addEventListener("close",e=>{}),j.addEventListener("error",e=>{}),j}function S(e,t){var a=document.createElement("script");a.src=e,a.onload=()=>t(e),a.onerror=()=>console.error("Error loading script: "+e),document.head.appendChild(a)}function T(){let e=o.appData.pages[y.currentPageIndex].deps.scripts,t=y.getAppAssetsBaseUrl("http",o.appData.port);"/"==t[t.length-1]&&(t=t.substring(0,t.length-1));let a=["assets/js/vue.js","assets/js/channels.js","assets/js/stipplecore.js","assets/js/watchers.js"],n=[];e.forEach(e=>{let o=t+e;e.endsWith("_reactivemodel.js")?n.push(o):a.forEach(t=>{e.indexOf(t)>-1&&n.push(o)})}),window.autorun=!1;let l=0;n.forEach(e=>{S(e,(function(){l++,l===n.length&&(initStipple("#Main_App_varMain_App_ReactiveModel"),window.sharedData.setExternalData(window.GENIEMODEL._data),P(),L())}))})}function L(){let e=o.appData.pages[y.currentPageIndex].deps.scripts,t=y.getAppAssetsBaseUrl("http",o.appData.port);"/"==t[t.length-1]&&(t=t.substring(0,t.length-1));let n=["assets/js/channels.js","assets/js/watchers.js","assets/js/keepalive.js","assets/js/syncplot.js","assets/js/autoreload.js","assets/js/main_app_varmain_app_reactivemodel.js"],l=[];e.forEach(e=>{let a=!1;if(n.forEach(t=>{e.indexOf(t)>-1&&(a=!0)}),!a){let a=t+e;l.push(a)}});let i=[];i.push("https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons"),o.appData.pages[y.currentPageIndex].deps.styles.forEach(e=>{let a=t+e;i.push(a)});let c=o.appData.pages[y.currentPageIndex].assets;if(c&&c.includes("public/css/theme.css")){let e=y.getAppBaseUrl("http",y.appport);i.push(e+"css/theme.css")}c.forEach(e=>{if(e.endsWith(".css")&&!e.endsWith("theme.css")&&!e.endsWith("autogenerated.css")){let a=t+e.split("public/").join("/");i.push(a)}}),o.appData.pages[y.currentPageIndex].assets.forEach(e=>{if(e.endsWith(".css"));else if(e.endsWith(".js")){let a=t+e.split("public/").join("/");l.push(a)}}),l.push("data/contentMain.js"),i.push("data/grapesCanvas.css"),window.customComponentsCssPaths&&window.customComponentsCssPaths.forEach(e=>{i.push(e)});const p=window.editor=grapesjs.init({container:"#gjs",fromElement:!0,storageManager:!1,canvas:{scripts:l,styles:i},i18n:{locale:"en",detectLocale:!1,messages:{en:{domComponents:{names:{div:"Div"}}}}},layerManager:{root:"#gbTemplateContainer",appendTo:"#layersContainer",sortable:!0,hidable:!0},blockManager:{custom:!0,blocks:s},styleManager:{appendTo:"#myStyleEditorContainerSections",sectors:[{name:"General",properties:[{extend:"float",type:"radio",default:"none",options:[{value:"none",className:"fa fa-times"},{value:"left",className:"fa fa-align-left"},{value:"right",className:"fa fa-align-right"}]},"display",{extend:"position",type:"select"},"top","right","left","bottom"]},{name:"Dimension",open:!1,properties:["width",{id:"flex-width",type:"integer",name:"Width",units:["px","%"],property:"flex-basis",toRequire:1},"height","max-width","min-height","margin","padding"]},{name:"Typography",open:!1,properties:["font-family","font-size","font-weight","letter-spacing","color","line-height",{extend:"text-align",options:[{id:"left",label:"Left",className:"fa fa-align-left"},{id:"center",label:"Center",className:"fa fa-align-center"},{id:"right",label:"Right",className:"fa fa-align-right"},{id:"justify",label:"Justify",className:"fa fa-align-justify"}]},{property:"text-decoration",type:"radio",default:"none",options:[{id:"none",label:"None",className:"fa fa-times"},{id:"underline",label:"underline",className:"fa fa-underline"},{id:"line-through",label:"Line-through",className:"fa fa-strikethrough"}]},"text-shadow"]},{name:"Decorations",open:!1,properties:["opacity","border-radius","border","box-shadow","background"]},{name:"Extra",open:!1,buildProps:["transition","perspective","transform"]},{name:"Flex",open:!1,properties:[{name:"Flex Container",property:"display",type:"select",defaults:"block",list:[{value:"block",name:"Disable"},{value:"flex",name:"Enable"}]},{name:"Flex Parent",property:"label-parent-flex",type:"integer"},{name:"Direction",property:"flex-direction",type:"radio",defaults:"row",list:[{value:"row",name:"Row",className:"icons-flex icon-dir-row",title:"Row"},{value:"row-reverse",name:"Row reverse",className:"icons-flex icon-dir-row-rev",title:"Row reverse"},{value:"column",name:"Column",title:"Column",className:"icons-flex icon-dir-col"},{value:"column-reverse",name:"Column reverse",title:"Column reverse",className:"icons-flex icon-dir-col-rev"}]},{name:"Justify",property:"justify-content",type:"radio",defaults:"flex-start",list:[{value:"flex-start",className:"icons-flex icon-just-start",title:"Start"},{value:"flex-end",title:"End",className:"icons-flex icon-just-end"},{value:"space-between",title:"Space between",className:"icons-flex icon-just-sp-bet"},{value:"space-around",title:"Space around",className:"icons-flex icon-just-sp-ar"},{value:"center",title:"Center",className:"icons-flex icon-just-sp-cent"}]},{name:"Align",property:"align-items",type:"radio",defaults:"center",list:[{value:"flex-start",title:"Start",className:"icons-flex icon-al-start"},{value:"flex-end",title:"End",className:"icons-flex icon-al-end"},{value:"stretch",title:"Stretch",className:"icons-flex icon-al-str"},{value:"center",title:"Center",className:"icons-flex icon-al-center"}]},{name:"Flex Children",property:"label-parent-flex",type:"integer"},{name:"Order",property:"order",type:"integer",defaults:0,min:0},{name:"Flex",property:"flex",type:"composite",properties:[{name:"Grow",property:"flex-grow",type:"integer",defaults:0,min:0},{name:"Shrink",property:"flex-shrink",type:"integer",defaults:0,min:0},{name:"Basis",property:"flex-basis",type:"integer",units:["px","%",""],unit:"",defaults:"auto"}]},{name:"Align",property:"align-self",type:"radio",defaults:"auto",list:[{value:"auto",name:"Auto"},{value:"flex-start",title:"Start",className:"icons-flex icon-al-start"},{value:"flex-end",title:"End",className:"icons-flex icon-al-end"},{value:"stretch",title:"Stretch",className:"icons-flex icon-al-str"},{value:"center",title:"Center",className:"icons-flex icon-al-center"}]}]}]},selectorManager:{appendTo:"#myStyleEditorContainerClasses",componentFirst:!0},plugins:["grapesjs-plugin-ckeditor"],pluginsOpts:{"grapesjs-plugin-ckeditor":{options:{toolbar:[{name:"undo",items:["Undo","Redo"]},{name:"styles",items:["Font","FontSize"]},["Bold","Italic","Underline","Strike"],{name:"links",items:["Link","Unlink"]},{name:"colors",items:["TextColor","BGColor"]}]}}}}),{Panels:b}=p;b.getButton("views","open-blocks").set("active",!1);let u=!1;p.runCommand("sw-visibility"),p.on("rte:enable",()=>{setTimeout(()=>{p.trigger("frame:scroll")},1e3)}),p.on("component:add",e=>{let t=k(e.attributes.tagName),n=(null===t||void 0===t?void 0:t.isComposite)||"true"==e.attributes.attributes.iscomposite;n?(u=!0,setTimeout(()=>{u=!1,h(e),a("componentSelected",e),g()},200)):u||(h(e),g())}),p.on("component:remove",e=>{"true"==e.attributes.attributes.iscomposite?(u=!0,setTimeout(()=>{u=!1,a("componentSelected",null),g()},200)):u||(a("componentSelected",null),g())}),p.Commands.add("edit-child-elements",{run(e,t){mainController.value.startEditingComponentContent()}}),p.on("component:selected",e=>{var t;0==m&&(m=!0,window.logUserEvent("no-code-session::started",{}));const n=p.getSelected();let o=null===(t=k(e.attributes.type))||void 0===t?void 0:t.nestable;if(n&&o){const e=n.get("toolbar")||[];let t=e.find(e=>"edit-child-elements"==e.command);t||(e.push({attributes:{class:"editChildElementsIcon",title:"Edit Child Elements"},command:"edit-child-elements"}),n.set("toolbar",e))}u||a("componentSelected",e)}),p.on("component:update",e=>{g()}),p.on("component:styleUpdate",e=>{g()}),p.on("property:compAdd:",e=>{g()}),p.on("property:compRemove:",e=>{g()}),p.on("property:compUpdate:",e=>{g()});let g=ne.a.debounce((function(){a("autoSaveTriggered")}),1e4);p.on("canvas:dragdata",(e,t,a)=>{if(e){let a=e.getData("text");a=JSON.parse(a),"binding"==a.objectType&&(t.content=`{{ ${a.bindingname} }}`)}else t.content=t.content.content}),p.DomComponents.addType("julia_code",{model:{defaults:{tagName:"julia_code",editable:!0,droppable:!1}},view:{events:{dblclick:"onActive",focusout:"onDisable"},onActive(){this.el.contentEditable=!0},onDisable(){const{el:e,model:t}=this;e.contentEditable=!1,t.set("content",e.innerHTML)}}}),p.DomComponents.addType("template",{isComponent:function(e){if("TEMPLATE"==e.tagName)return{type:"template",name:"Template",components:e.innerHTML}},model:{defaults:{tagName:"template",droppable:!0}},view:{onRender(){const{el:e,model:t}=this}}}),Object(je["registerPlotlyComponent"])(p),p.DomComponents.addType("row-div",{isComponent:e=>"DIV"===e.tagName&&e.classList.contains("row"),model:{defaults:{tagName:"div",classes:["row"],droppable:function(e){return!e.view.$el[0].classList.contains("row")}}},view:{}}),blockDefinitions.forEach(e=>{A(e)});let f=o.appData.pages[0].assets,_=f.find(e=>e.indexOf("autogenerated.css")>-1);if(_){let e=window.apibase+"apps/"+y.appid+"/edit?path="+encodeURIComponent(_);r["a"].get(e).then(e=>{p.setComponents(d.value),p.setStyle(e.data.content)}).catch(e=>{console.log("error loading autogenerated styles",e)})}else p.setComponents(d.value)}function A(e){const t=["plotly","tempplaceholder"];if(t.includes(e.type))return;const a=["H1","H2","H3","H4","H5","H6","P","SPAN","A"];a.includes(e.tagName)||(void 0!=e.attributeMatch||a.includes(e.type)?editor.DomComponents.addType(e.type,{isComponent:t=>{if(t.tagName==e.tagName&&t.hasAttribute(e.attributeMatch))return{type:e.type,name:e.label}},model:{defaults:{draggable:e.draggable,droppable:e.droppable,editable:e.editable,isComposite:e.isComposite}}}):editor.DomComponents.addType(e.type,{isComponent:t=>{if(t.tagName==e.tagName)return{type:e.type,name:e.label}},model:{defaults:{draggable:e.draggable,droppable:e.droppable,editable:e.editable,isComposite:e.isComposite,script:function(){var e=window.parent.sharedData.externalData;let t=this.attributes.id.nodeValue;function a(e){let t={},a=Object.getOwnPropertyNames(e);return a.forEach(a=>{let n=(e[a],e[a]);t[a]=n}),t}if(window.parent.addCanvasComponent(t,this),!this.grapesModel)return;let n=a(this.grapesModel.attributes.attributes);this.onExternalDataChanged=t=>{e=t.detail,n=a(this.attributes),this.vueApp.updateServerData(e)};let o=this.grapesModel.attributes.tagName,l=(this.grapesModel.attributes.attributes,window.parent.sharedData.getComponentDefinitionByType),i=window.parent.sharedData.modelFieldsByName,r=l(o);Vue.config.errorHandler=(e,a,n)=>{console.warn("Vue.errorHandler called()","\n - err:",e,"\n - vm:",a,"\n - info:",n);let o=document.getElementById(t);o.innerHTML=`
\n
\n ${r.label}\n
${e}
`},Vue.config.warnHandler=(e,t,a)=>{console.warn("Vue.warnHandler called()","\n - message:",e,"\n - vm:",t,"\n - trace:",a)},Stipple.init({theme:"stipple-blue"}),this.vueApp=new Vue({el:"#vueinternal_"+t,data:function(){let t=e;return t.attributes=n,t.serverData=e,t},computed:{parsedAttributes(){let e={},t=this.attributes;for(let a in t){let n=":"==a[0]?a.substring(1):a,o=r.properties.find(e=>e.name==n),l=t[a],s=null!=i[l];"v-model"!=n?o?s?e[":"+n]=this.serverData[l]:"String"==o.type?e[""+n]=l:e[":"+n]=l:e[""+n]=l:e["v-model"]=this.serverData[l]}return e}},methods:{updateServerData(e){this.serverData=e},updateAttributes(e){this.attributes=a(e),n=this.attributes,this.updateServerData(this.serverData),this.$forceUpdate()}},mounted(){}})}},init(){this.listenTo(this,"change:attributes",this.onAttributeChange)},handleAttrChange(){},render:function(){this.view.onRender()},removed(){window.parent.postMessage({command:"removeCanvasComponent",uid:this.ccid},"*")}},view:{onAttributeChange(){},onRender(){const{el:e,model:t}=this;let a=e.attributes.id.nodeValue;e.grapesModel=t;let n=e.grapesModel.attributes.tagName,o=n;"q-popup-proxy"==n&&(o="q-popup-proxy-gbinternal");let l=e.grapesModel.attributes.attributes,r=k(n),s=`
\n <${o} `;for(let d in l){let e=d;0!=e.indexOf("gb_c__")&&0!=e.indexOf("gb_b__")||(e=e.substring(6));let t=r.properties.find(t=>t.name==e),a=l[d],n=null!=i[a];if(!n&&a.indexOf(".")>-1){let e=a.split("."),t=e[0],o=i[t];o&&"DataTable.DataFrames.DataFrame"==o.type&&o.props&&o.props.includes(e[1])&&(n=!0)}"v-model"!=e?t?n?s+=`:${e}="serverData.${a}" `:("q-img"!=r.type||"src"!=e||"String"!=t.type||a.startsWith("http")||(a=a.startsWith("/")?appBasePath+a:appBasePath+"/"+a),"v-if"==e||"v-for"==e||("String"==t.type||0==e.indexOf("v-on")?s+=`${e}="${a}" `:s+=`:${e}="${a}" `)):s+=`${e}="${a}" `:s+=""==a?'v-model="serverData.none" ':`v-model="serverData.${a}" `}s+=">";let c=null===r||void 0===r?void 0:r.nestable;if(c)if("q-tab-panels"==n||"q-tab-panel"==n||"q-card"==n||"q-card-section"==n||"q-badge"==n){let e=t.getInnerHTML();const a=new DOMParser,n=a.parseFromString(e,"text/html"),o=n.body;Le.decodeAttributesInDOM(o),s+=o.innerHTML}else if("q-popup-proxy"==n)s+='
\n \n
';else{let t=e.innerHTML;if(""!=t){const e=new DOMParser,a=e.parseFromString(t,"text/html"),n=a.body;n.children.forEach(e=>{Le.decodeAttributesInDOM(e);let t=e.innerHTML;s+=t})}}s+=`\n
\n `,e.innerHTML=s}}}))}function U(e){u.value=e}function I(e){if("canvasBlocker"!=e.target.id)return;const t=document.getElementById("canvasBlockerDialog");t.classList.add("shake-effect"),t.addEventListener("animationend",()=>{t.classList.remove("shake-effect")},{once:!0})}function E(e){p.value=e}function R(e){e=Le.removeInvalidNodes(e),e=Le.replaceSpecialElements(e);let t=`\n
\n
\n
\n
\n ${e}\n
\n
\n
\n
`;const a=new DOMParser,n=a.parseFromString(t,"text/html"),o=n.body;Le.encodeAttributesInDOM(o);const l=o.innerHTML;d.value=l,T()}return Object(n["D"])(()=>{}),t({updateReactiveModel:E,updateTemplateFile:R,showAiCodePreview:U}),(e,t)=>{const a=Object(n["O"])("vscode-button");return Object(n["G"])(),Object(n["j"])("div",Ue,[Ie,Object(n["U"])(c)?(Object(n["G"])(),Object(n["h"])(Oe,{key:0,onCloseDialog:_,appData:o.appData,componentPlaceHolderData:Object(n["U"])(c)},null,8,["appData","componentPlaceHolderData"])):Object(n["i"])("",!0),Object(n["k"])("div",Ee,[Object(n["l"])(" Custom Blocks "),Object(n["k"])("div",Re,[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(Object(n["U"])(s),e=>(Object(n["G"])(),Object(n["j"])("div",{class:"block",key:e.id,onMousedown:t=>Object(n["U"])(v)(e)},[Object(n["k"])("div",Ne,Object(n["R"])(e.label),1)],40,Me))),128))])]),"hidden"!=Object(n["U"])(u)?(Object(n["G"])(),Object(n["j"])("div",{key:1,id:"canvasBlocker",ref_key:"canvasBlocker",ref:b,onClick:I},["loading"==Object(n["U"])(u)?(Object(n["G"])(),Object(n["j"])("div",Ge,qe)):Object(n["i"])("",!0),"ready"==Object(n["U"])(u)?(Object(n["G"])(),Object(n["j"])("div",Fe,[ze,Object(n["m"])(a,{onClick:g,style:{width:"100px !important","margin-right":"10px","background-color":"#aaa"}},{default:Object(n["bb"])(()=>[Object(n["l"])("Revert")]),_:1}),Object(n["m"])(a,{onClick:f,style:{width:"100px !important"}},{default:Object(n["bb"])(()=>[Object(n["l"])("Keep")]),_:1})])):Object(n["i"])("",!0)],512)):Object(n["i"])("",!0)])}}},$e=(a("f521"),a("d797"),a("eaac")),We=a("429b"),Je=a("7cbe"),Qe=a("068f"),Ye=a("adad"),Xe=a("823b"),Ze=a("f09f"),Ke=a("a370"),et=a("58a8"),tt=a("93dc"),at=a.n(tt);const nt=A()(Ve,[["__scopeId","data-v-49cd9b2f"]]);var ot=nt;at()(Ve,"components",{QTable:$e["a"],QTabs:We["a"],QPopupProxy:Je["a"],QImg:Qe["a"],QTabPanels:Ye["a"],QTabPanel:Xe["a"],QCard:Ze["a"],QCardSection:Ke["a"],QBadge:et["a"]});const lt=e=>(Object(n["J"])("data-v-54aa55a6"),e=e(),Object(n["H"])(),e),it={style:{"max-height":"100%","overflow-y":"auto","margin-top":"10px","user-select":"none","flex-grow":"1"}},rt={style:{display:"flex","flex-wrap":"wrap",gap:"5px","flex-direction":"column"}},st={style:{"font-weight":"bold","margin-bottom":"5px","text-transform":"capitalize","margin-top":"10px"}},ct={class:"uiItemContainer"},dt=["blocktype","onMousedown","title"],pt=["src"],bt={key:0,src:"img/icons/pro_badge.png",class:"proBadge",style:{}},ut=lt(()=>Object(n["k"])("div",{class:"disabledProPanel"},null,-1));var mt={__name:"LibraryPanel",emits:["blockCustomTriggered"],setup(e,{emit:t}){const a=y.IS_PRO;function o(e=!0){window.showUpgradeLicenseDialog(e)}const l=["tempplaceholder","partial"];let i=blockDefinitions.filter(e=>-1===l.indexOf(e.type));i.push({description:"",draggable:!0,droppable:!0,editable:!0,enabled:!0,label:"1-Col Row",properties:[],tagName:"DIV",type:"1column",content:'
\n
',media:"",category:"Layout"}),i.push({description:"",draggable:!0,droppable:!0,editable:!0,enabled:!0,label:"2-Col Row",properties:[],tagName:"DIV",type:"2columns",content:'
\n
\n
\n
',media:"",category:"Layout"}),i.push({description:"",draggable:!0,droppable:!0,editable:!0,enabled:!0,label:"3-Col Row",properties:[],tagName:"DIV",type:"3columns",content:'
\n
\n
\n
\n
',media:"",category:"Layout"}),i.push({description:"",draggable:!0,droppable:!0,editable:!0,enabled:!0,label:"Column",properties:[],tagName:"DIV",type:"1column",content:'
',media:"",category:"Layout"}),i.push({description:"",draggable:!0,droppable:!0,editable:!0,enabled:!0,label:"Sidebar Left",properties:[],tagName:"DIV",type:"sidebar_left",content:'
\n

Header Text

\n
\n
\n
\n
\n
\n
Page footer
\n',media:"",category:"Layout"}),i.push({description:"",draggable:!0,droppable:!0,editable:!0,enabled:!0,label:"Sidebar Right",properties:[],tagName:"DIV",type:"sidebar_right",content:'
\n

Header Text

\n
\n
\n
\n
\n
\n
Page footer
\n',media:"",category:"Layout"}),i.push({description:"",draggable:!0,droppable:!0,editable:!0,enabled:!0,label:"Sidebars",properties:[],tagName:"DIV",type:"sidebars",content:'
\n

Header Text

\n
\n
\n
\n
\n
\n
\n
Page footer
\n',media:"",category:"Layout"}),i.push({label:"Header",tagName:"header",type:"header",description:"",category:"Layout",media:"",draggable:!0,droppable:!0,editable:!0,enabled:!0,properties:[],content:"

Page header

"}),i.push({label:"Footer",tagName:"footer",type:"footer",description:"",category:"Layout",media:"",draggable:!0,droppable:!0,editable:!0,enabled:!0,properties:[],content:'
Page footer
'});let r,s,c,d=["Layout","Text","Content","Forms","Widgets","Lists","Tables","Charts","Multimedia","Timeline","Other"],p=Object(n["L"])(null),b=Object(n["L"])(""),u=blockDefinitions.map(e=>{let t={type:e.type,label:e.label,tagName:e.tagName,id:e.type,category:e.category,content:e.content,droppable:e.droppable,draggable:e.draggable,editable:e.editable,activate:!0};return t});function m(e){u=e.blocks,r=t=>{e.dragStart(t)},s=e.dragStop,t("blockCustomTriggered",e)}function g(e){j(),f(e)}function f(e){void 0!=e&&(b.value=e.target.value);let t=[],a={};return h.value.forEach(e=>{if(1==e.hideFromLibrary)return;let n=e.category||"other";a[n]||(a[n]={category:n,blocks:[]},t.push(a[n])),a[n].blocks.push(e)}),t.sort((e,t)=>{let a=d.indexOf(e.category),n=d.indexOf(t.category);return a>n?1:a{e.blocks.sort((e,t)=>e.label>t.label?1:e.label{e+=t.category+"\n",t.blocks.forEach(t=>{e+=" "+t.label+"\n"})})}Object(n["D"])(()=>{c=setInterval(()=>{if(window.editor){clearInterval(c),window.editor.on("block:custom",m);const{Panels:e}=window.editor;e.getButton("views","open-blocks").set("active",!0)}},1e3)});const h=Object(n["f"])(()=>{if(!b.value)return i;let e=i.filter(e=>e.label.toLowerCase().indexOf(b.value.toLowerCase())>-1);return e});f();const O=function(e){let t,a;if(e.icon)if(e.icon.startsWith("{appPath}")){let n=y.getAppBaseUrl("http",y.appport);n.endsWith("/")&&(n=n.slice(0,-1)),t=e.icon.replace("{appPath}",""),a=n+t}else t=e.icon,a="img/block_icons/"+t;else t=e.type.split("q-").join("")+".png",a="img/block_icons/"+t;return a};let j=ne.a.debounce((function(){b.value.length}),1e3);return(e,t)=>{const l=Object(n["O"])("vscode-text-field");return Object(n["G"])(),Object(n["j"])(n["a"],null,[Object(n["k"])("div",null,[Object(n["m"])(l,{value:Object(n["U"])(b),onInput:t[0]||(t[0]=e=>g(e)),placeholder:"Search UI Components",style:{padding:"5px 10px",width:"90%"}},null,8,["value"])]),Object(n["k"])("div",it,[Object(n["k"])("div",rt,[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(Object(n["U"])(p),e=>(Object(n["G"])(),Object(n["j"])("div",{key:e.category,style:{display:"flex","flex-direction":"column",width:"100%"}},[Object(n["k"])("div",st,Object(n["R"])(e.category),1),Object(n["k"])("div",ct,[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(e.blocks,e=>(Object(n["G"])(),Object(n["j"])("div",{key:e.id,blocktype:e.type,class:Object(n["w"])({uiItem:!0,uiItemProDisabled:e.proRequired&&!Object(n["U"])(a)}),onMousedown:t=>!e.proRequired||e.proRequired&&Object(n["U"])(a)?Object(n["U"])(r)(e):o(!0),title:e.proRequired&&!Object(n["U"])(a)?"Upgrade to PRO plan to use this component and many more!":e.label},[Object(n["k"])("div",{class:Object(n["w"])({uiItemLabel:!0,uiItemLabelProRequired:e.proRequired&&!Object(n["U"])(a)})},Object(n["R"])(e.label),3),Object(n["k"])("div",{class:Object(n["w"])({uiItemIcon:!0,uiItemIconProRequired:e.proRequired&&!Object(n["U"])(a)})},[Object(n["k"])("img",{src:O(e),class:"libraryIcon",style:{}},null,8,pt)],2),e.proRequired&&!Object(n["U"])(a)?(Object(n["G"])(),Object(n["j"])("img",bt)):Object(n["i"])("",!0)],42,dt))),128)),ut])]))),128))])])],64)}}};a("f0da");const gt=A()(mt,[["__scopeId","data-v-54aa55a6"]]);var ft=gt;const _t=e=>(Object(n["J"])("data-v-7c578f7c"),e=e(),Object(n["H"])(),e),ht={class:"addPropsPanel"},yt=_t(()=>Object(n["k"])("div",{style:{"text-align":"center","font-size":"0.8em","font-weight":"bold","margin-bottom":"10px"}},"Add Property",-1)),Ot=_t(()=>Object(n["k"])("i",{class:"fas fa-search",style:{position:"absolute",top:"47px",right:"15px",opacity:"0.5"}},null,-1)),jt={class:"addPropsList"},vt=["onClick","title"],wt={style:{width:"70%"}},kt={style:{"text-transform":"capitalize",width:"30%","font-size":"0.8em",overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",display:"flex","justify-content":"right","align-items":"center",opacity:"0.6"}};var xt={__name:"AddPropertyDialog",props:["propslist","defObject","destination"],emits:["propAdded","close"],setup(e,{emit:t}){const a=e,o=Object(n["L"])(""),l=Object(n["L"])("");function i(e){e.target==l.value&&r()}function r(){t("close")}function s(){o.value=""}function c(e){o.value=e.target.value}function d(e){t("propAdded",e,a.defObject,a.destination)}function p(){let e=a.propslist;return""!=o.value&&(e=e.filter(e=>e.label.toLowerCase().indexOf(o.value.toLowerCase())>-1)),g["a"].sortBy(e,e=>e.label.toLowerCase())}return Object(n["D"])(()=>{document.querySelector("#addPropertyDialogSearch").focus()}),(e,t)=>{const a=Object(n["O"])("vscode-text-field");return Object(n["G"])(),Object(n["j"])("div",{class:"blocker",ref_key:"dialogBlocker",ref:l,onClick:t[1]||(t[1]=e=>i(e))},[Object(n["k"])("div",ht,[yt,Object(n["k"])("div",{class:"closeAddProp",onClick:r},"X"),Object(n["k"])("div",null,[Object(n["m"])(a,{id:"addPropertyDialogSearch",value:o.value,onInput:t[0]||(t[0]=e=>c(e)),onKeyup:Object(n["db"])(s,["escape"]),placeholder:"Search Properties",style:{padding:"5px 10px",width:"100%"}},null,8,["value","onKeyup"]),Ot]),Object(n["k"])("div",jt,[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(p(),e=>(Object(n["G"])(),Object(n["j"])("div",{class:"addPropRow",onClick:t=>d(e),title:e.desc||"Property description not available"},[Object(n["k"])("div",wt,Object(n["R"])(e.label),1),Object(n["k"])("div",kt,Object(n["R"])(e.type),1)],8,vt))),256))])])],512)}}};a("49c3");const Ct=A()(xt,[["__scopeId","data-v-7c578f7c"]]);var Dt=Ct;const Pt=e=>(Object(n["J"])("data-v-6bcc04fe"),e=e(),Object(n["H"])(),e),St={key:0,class:"foldableGroupHeader"},Tt={class:"groupHeaderContent"},Lt=["src"],At=Pt(()=>Object(n["k"])("i",{"aria-hidden":"true",role:"img",class:"q-icon notranslate material-icons",style:{"font-size":"14px",padding:"0px"}},"delete",-1)),Ut=[At],It={class:"col-1 removeBtnCnt",style:{width:"20px",position:"absolute"}},Et=["onClick"],Rt=Pt(()=>Object(n["k"])("i",{"aria-hidden":"true",role:"img",class:"q-icon notranslate material-icons",style:{"font-size":"14px",padding:"0px"}},"delete",-1)),Mt=[Rt],Nt=["title"],Gt={key:0,class:"col-7"},Bt=["onUpdate:modelValue","attrname"],Ht=["value"],qt={key:1,class:"col-7"},Ft={key:0,class:"chartTypeContainer",style:{position:"relative"}},zt=["attrname"],Vt=["value"],$t={key:2,class:"col-7"},Wt=["value","onInput"],Jt={key:3,class:"col-7"},Qt=["onUpdate:modelValue","attrname"],Yt=["value"],Xt={key:4,class:"col-7",style:{"align-items":"center",position:"relative",display:"flex"}},Zt=["onUpdate:modelValue"],Kt=["type","onUpdate:modelValue"],ea=["onClick"],ta={key:0,src:"img/icons/binding_on.png",style:{height:"16px"},draggable:"false"},aa={key:1,src:"img/icons/binding_off.png",style:{height:"16px"},draggable:"false"};var na={__name:"ChartPropertiesSection",props:["dataSourceColumns","treeObject","propertiesDefinition","appData","modelFields","sectionIndex","showSectionTitle"],emits:["change"],setup(e,{emit:t}){const a=e;let o=n["L"][null];function l(e,t){try{const a=JSON.parse(t);Array.isArray(a)?e.valueHolderParent[e.propName]=a:console.error("Input is not an array.")}catch(a){console.error("Failed to parse input as JSON:",a)}}console.log("ChartSection.modelFields: ",a.modelFields);const i=Object(n["f"])(()=>{let e=oe.find(e=>e.id==o);return console.log("chartTypeDeffffff",e),e?e.icon:(console.error("Could not find chart type definition for: "+o),"scatterChart")});function r(){let e=a.sectionIndex;t("removeTrace",e)}function s(e){let t=e.id;console.log("removeTraceProperty before: ",e,a.treeObject),c(a.treeObject,t),console.log("removeTraceProperty after: ",e,a.treeObject),u()}function c(e,t){const a=t.split(".");function n(e,t){const o=a[t];if(t===a.length-1)return delete e[o],0===Object.keys(e).length;if(void 0!==e[o]){const a=n(e[o],t+1);if(a)return delete e[o],0===Object.keys(e).length}return!1}n(e,0)}function d(e){console.log("toggleDynamicAttribute",e);let t,a=e.valueHolderParent[e.propName];"string"==typeof a&&0==a.indexOf("$_{")?(t=a.replace("$_{",""),t=t.substring(0,t.length-1)):t="$_{"+a+"}",e.valueHolderParent[e.propName]=t,u()}function p(e){console.log("isPropValueBinding",e.propName,e);let t=e.valueHolderParent[e.propName];return"string"==typeof t&&0==t.indexOf("$_{")}function b(e){console.log("changeChartType",o,a.treeObject),console.log("chartTypes",oe);let t=oe.find(e=>e.id==o);console.log("chartTypeDef",t);let n={};for(let o in a.treeObject)n[o]=a.treeObject[o];for(let o in a.treeObject)delete a.treeObject[o];for(let o in t.traceTemplate)void 0!=n[o]&&"type"!=o&&"gbtype"!=o?a.treeObject[o]=n[o]:a.treeObject[o]=t.traceTemplate[o];console.log("props.treeObject FINAL:",a.treeObject),a.treeObject.gbtype=o,u()}function u(){t("change",a.treeObject)}function m(e,t){const a=t.split(".");if(1==a.length)return e;for(let n=0;n{let e=[];for(let t=0;t{const c=Object(n["O"])("vscode-text-field");return Object(n["G"])(),Object(n["j"])(n["a"],null,[e.showSectionTitle?(Object(n["G"])(),Object(n["j"])("div",St,[Object(n["k"])("div",Tt,[Object(n["k"])("img",{src:"img/block_icons/"+i.value+".png",class:"chartTypeIcon",style:{opacity:1}},null,8,Lt),Object(n["l"])(" "+Object(n["R"])(e.treeObject.name),1)]),Object(n["k"])("div",{class:"removeBtnCnt",style:{width:"20px"}},[Object(n["k"])("span",{onClick:r,title:"Remove Trace",class:"codicon codicon-settings"},Ut)])])):Object(n["i"])("",!0),(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(f.value,t=>(Object(n["G"])(),Object(n["j"])("div",{class:"row propRow",style:{position:"relative"},key:t.id},[Object(n["k"])("div",It,[Object(n["k"])("span",{onClick:e=>s(t),title:"Remove Property",class:"codicon codicon-settings"},Mt,8,Et)]),Object(n["k"])("div",{class:"col-4 propRowLabel",style:{},title:t.label},Object(n["R"])(t.label)+": ",9,Nt),p(t)?(Object(n["G"])(),Object(n["j"])("div",Gt,[Object(n["cb"])(Object(n["k"])("select",{class:"propInput propInputDynamic",style:{width:"100%",height:"25px"},"onUpdate:modelValue":e=>t.valueHolderParent[t.propName]=e,onChange:u,attrname:t.propertyName},[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(e.modelFields,e=>(Object(n["G"])(),Object(n["j"])("option",{key:"binding_"+e.name,value:"$_{"+e.name+"}"},Object(n["R"])(e.name),9,Ht))),128))],40,Bt),[[n["X"],t.valueHolderParent[t.propName]]])])):"type"==t.id?(Object(n["G"])(),Object(n["j"])("div",qt,["type"==t.id?(Object(n["G"])(),Object(n["j"])("div",Ft,[Object(n["cb"])(Object(n["k"])("select",{class:"propInput propInputDynamic",style:{width:"100%",height:"25px"},onChange:b,"onUpdate:modelValue":a[0]||(a[0]=e=>Object(n["s"])(o)?o.value=e:o=e),attrname:t.propertyName},[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(Object(n["U"])(oe),e=>(Object(n["G"])(),Object(n["j"])("option",{key:"chartType_"+e.id,value:e.id},Object(n["R"])(e.id),9,Vt))),128))],40,zt),[[n["X"],Object(n["U"])(o)]])])):Object(n["i"])("",!0)])):"array"==t.type?(Object(n["G"])(),Object(n["j"])("div",$t,[Object(n["k"])("textarea",{name:"",id:"",rows:"3",value:JSON.stringify(t.valueHolderParent[t.propName]),onInput:e=>l(t,e.target.value),onChange:u},null,40,Wt)])):"enum"==t.type?(Object(n["G"])(),Object(n["j"])("div",Jt,[Object(n["cb"])(Object(n["k"])("select",{class:"propInput propInputDynamic",style:{width:"100%",height:"25px"},"onUpdate:modelValue":e=>t.valueHolderParent[t.propName]=e,onChange:u,attrname:t.propertyName},[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(t.options,e=>(Object(n["G"])(),Object(n["j"])("option",{key:"field_"+e,value:e},Object(n["R"])(e),9,Yt))),128))],40,Qt),[[n["X"],t.valueHolderParent[t.propName]]])])):(Object(n["G"])(),Object(n["j"])("div",Xt,["boolean"==t.type?Object(n["cb"])((Object(n["G"])(),Object(n["j"])("input",{key:0,type:"checkbox",name:"",id:"","onUpdate:modelValue":e=>t.valueHolderParent[t.propName]=e,onChange:u},null,40,Zt)),[[n["V"],t.valueHolderParent[t.propName]]]):Object(n["i"])("",!0),"color"==t.type?Object(n["cb"])((Object(n["G"])(),Object(n["j"])("input",{key:1,type:t.type,"onUpdate:modelValue":e=>t.valueHolderParent[t.propName]=e,onChange:u,style:{height:"23px",width:"23px","margin-right":"5px","background-color":"#ffffff00"}},null,40,Kt)),[[n["W"],t.valueHolderParent[t.propName]]]):Object(n["i"])("",!0),"color"==t.type?(Object(n["G"])(),Object(n["h"])(c,{key:2,type:"text",name:"",id:"",value:t.valueHolderParent[t.propName],onInput:e=>t.valueHolderParent[t.propName]=e.target.value,onChange:u,style:{width:"80px"}},null,8,["value","onInput"])):Object(n["i"])("",!0),"string"==t.type||"number"==t.type?(Object(n["G"])(),Object(n["h"])(c,{key:3,type:t.type,name:"",id:"",value:t.valueHolderParent[t.propName],onInput:e=>t.valueHolderParent[t.propName]=e.target.value,onChange:u},null,8,["type","value","onInput"])):Object(n["i"])("",!0)])),"type"!=t.propName&&"name"!=t.propName?(Object(n["G"])(),Object(n["j"])("div",{key:5,class:"propRowDynamicSwitch",onClick:e=>d(t)},[p(t)?(Object(n["G"])(),Object(n["j"])("img",ta)):Object(n["i"])("",!0),p(t)?Object(n["i"])("",!0):(Object(n["G"])(),Object(n["j"])("img",aa))],8,ea)):Object(n["i"])("",!0)]))),128))],64)}}},oa=(a("6ba8"),a("0016"));const la=A()(na,[["__scopeId","data-v-6bcc04fe"]]);var ia=la;at()(na,"components",{QIcon:oa["a"]});const ra=e=>(Object(n["J"])("data-v-f312c504"),e=e(),Object(n["H"])(),e),sa={key:0,class:"chartConfigContainer"},ca={class:"tabSelector"},da=["onClick"],pa={key:0,class:"tabSectionContainer"},ba={key:0,class:"propRow",style:{"margin-top":"20px"}},ua=ra(()=>Object(n["k"])("div",{class:"removeBtnCnt",style:{width:"20px",cursor:"auto"}},null,-1)),ma=ra(()=>Object(n["k"])("div",{class:"propRowLabel",title:"Data object for the chart"},"Data Binding: ",-1)),ga={class:"propRowControl"},fa=["value"],_a=ra(()=>Object(n["k"])("img",{src:"img/icons/binding_on.png",style:{height:"16px"},draggable:"false"},null,-1)),ha=[_a],ya={key:1,class:"tracesContainer",style:{position:"relative"}},Oa={style:{width:"100%","justify-content":"flex-end",display:"flex",margin:"10px 0px 0px"}},ja=ra(()=>Object(n["k"])("div",{style:{}},"Use Binding",-1)),va=ra(()=>Object(n["k"])("div",{class:""},[Object(n["k"])("img",{src:"img/icons/binding_off.png",style:{height:"16px"},draggable:"false"})],-1)),wa=[ja,va],ka={class:"foldableGroupContent"},xa={class:"subgroup"},Ca={class:"subgroupContent"},Da={class:"addPropertyButtonRow"},Pa={key:2,style:{"border-top":"solid 1px var(--badge-background)",padding:"20px","text-align":"center"}},Sa={key:1,class:"tabSectionContainer"},Ta={key:0,class:"propRow",style:{"margin-top":"20px"}},La=ra(()=>Object(n["k"])("div",{class:"removeBtnCnt",style:{width:"20px",cursor:"auto"}},null,-1)),Aa=ra(()=>Object(n["k"])("div",{class:"propRowLabel",title:"Data object for the chart"},"Layout Binding: ",-1)),Ua={class:"propRowControl"},Ia=["value"],Ea=ra(()=>Object(n["k"])("img",{src:"img/icons/binding_on.png",style:{height:"16px"},draggable:"false"},null,-1)),Ra=[Ea],Ma={key:1},Na={style:{width:"100%","justify-content":"flex-end",display:"flex",margin:"10px 0px 0px"}},Ga=ra(()=>Object(n["k"])("div",{style:{}},"Use Binding",-1)),Ba=ra(()=>Object(n["k"])("div",{class:""},[Object(n["k"])("img",{src:"img/icons/binding_off.png",style:{height:"16px"},draggable:"false"})],-1)),Ha=[Ga,Ba],qa={class:"subgroup"},Fa={class:"subgroupContent"},za={class:"addPropertyButtonRow"},Va={key:2,class:"tabSectionContainer"},$a={key:0,class:"propRow",style:{"margin-top":"20px"}},Wa=ra(()=>Object(n["k"])("div",{class:"removeBtnCnt",style:{width:"20px",cursor:"auto"}},null,-1)),Ja=ra(()=>Object(n["k"])("div",{class:"propRowLabel",title:"Data object for the chart"},"Config Binding: ",-1)),Qa={class:"propRowControl"},Ya=["value"],Xa=ra(()=>Object(n["k"])("img",{src:"img/icons/binding_on.png",style:{height:"16px"},draggable:"false"},null,-1)),Za=[Xa],Ka={key:1},en={style:{width:"100%","justify-content":"flex-end",display:"flex",margin:"10px 0px 0px"}},tn=ra(()=>Object(n["k"])("div",{style:{}},"Use Binding",-1)),an=ra(()=>Object(n["k"])("div",{class:""},[Object(n["k"])("img",{src:"img/icons/binding_off.png",style:{height:"16px"},draggable:"false"})],-1)),nn=[tn,an],on={class:"subgroup"},ln={class:"subgroupContent"},rn={class:"addPropertyButtonRow"};var sn={__name:"ChartProperties",props:["appData","selectedComponent","blockPropertyDefinition","filteredModelFields"],emits:["chartpropmodechanged"],setup(e,{expose:t,emit:a}){const o=e;Object(n["L"])(!0);function l(e){let t=null!=o.selectedComponent.attributes.attributes["gb_b__"+e];return t}let i=Object(n["L"])(0),r=Object(n["L"])([{id:0,name:"Data",key:"data"},{id:1,name:"Layout",key:"layout"},{id:2,name:"Config",key:"config"}]),s=Object(n["L"])(null),c=(Object(n["L"])(!1),Object(n["L"])(null)),d=Object(n["L"])([]),p=Object(n["L"])([]),b=Object(n["L"])([]),u=Object(n["L"])(o.appData.pages[y.currentPageIndex].model.fields),m={};u.value.forEach(e=>{m[e.name]=e});let g=Object(n["L"])([{id:"name",label:"Name",type:"string",default:""},{id:"type",label:"Type",type:"enum",default:"scatter",options:["scatter","bar","histogram","pie","box","histogram2d","histogram2dcontour","parcats","heatmap","heatmapgl","contour","funnel","funnelarea","indicator","isosurface","mesh3d","ohlc","candlestick","scatter3d","scattergeo","scattergl","surface","table","timeline","violin","waterfall"]},{id:"mode",label:"Mode",type:"enum",default:"markers",options:["markers","lines","lines+markers","none","gauge","number","gauge+number","text"]},{id:"x",label:"X",type:"array",default:[0,1,2,3,4,5]},{id:"y",label:"Y",type:"array",default:[2,4,8,16,32]},{id:"z",label:"Z",type:"array",default:[3,5,7,9,11]},{id:"u",label:"U",type:"array",default:[]},{id:"v",label:"V",type:"array",default:[]},{id:"w",label:"W",type:"array",default:[]},{id:"i",label:"I",type:"array",default:[]},{id:"j",label:"J",type:"array",default:[]},{id:"k",label:"K",type:"array",default:[]},{id:"open",label:"Open",type:"array",default:[]},{id:"high",label:"High",type:"array",default:[]},{id:"low",label:"Low",type:"array",default:[]},{id:"close",label:"Close",type:"array",default:[]},{id:"dimensions",label:"Dimensions",type:"array",default:[]},{id:"counts",label:"Counts",type:"array",default:[]},{id:"values",label:"Values",type:"array",default:[1,3,5]},{id:"labels",label:"Labels",type:"array",default:["a","b","c"]},{id:"fill",label:"Fill",type:"enum",default:"tozeroy",options:["tozeroy","tonexty","toself","tonext"]},{id:"orientation",label:"Orientation",type:"enum",default:"v",options:["v","h"]},{id:"marker.size",label:"Marker Size",type:"number",default:5},{id:"marker.color",label:"Marker Color",type:"color",default:"#2578B4"},{id:"locationmode",label:"Locationmode",type:"string",default:"country names"},{id:"locations",label:"Locations",type:"array",default:[]},{id:"text",label:"Text",type:"array",default:[]},{id:"value",label:"Value",type:"number",default:0},{id:"delta.reference",label:"Delta Reference",type:"number",default:0},{id:"title.text",label:"Title Text",type:"string",default:"Title"},{id:"gauge.axis.range",label:"Gauge Axis Range",type:"array",default:[0,1]},{id:"error_y.type",label:"ErrorY Type",type:"string",default:"data"},{id:"error_y.array",label:"ErrorY Array",type:"array",default:[1,2,3,4,5]},{id:"error_y.visible",label:"ErrorY Visible",type:"boolean",default:!0},{id:"sizemode",label:"SizeMode",type:"string",default:"diameter"},{id:"sizeref",label:"SizeRef",type:"number",default:2},{id:"autobinx",label:"AutoBinX",type:"boolean",default:!0},{id:"nbinsx",label:"NBinsX",type:"number",default:10},{id:"autobiny",label:"AutoBinY",type:"boolean",default:!0},{id:"nbinsy",label:"NBinsY",type:"number",default:10},{id:"hoverinfo",label:"HoverInfo",type:"string",default:"all"},{id:"hovertemplate",label:"HoverTemplate",type:"string",default:""},{id:"boxpoints",label:"BoxPoints",type:"string",default:"all"},{id:"notched",label:"Notched",type:"boolean",default:!1},{id:"whiskerwidth",label:"WhiskerWidth",type:"number",default:.5},{id:"fillcolor",label:"FillColor",type:"color",default:"#888"},{id:"line.color",label:"Line Color",type:"color",default:"#888"},{id:"line.width",label:"Line Width",type:"number",default:2},{id:"line.shape",label:"Line Shape",type:"string",default:"linear"},{id:"line.smoothing",label:"Line Smoothing",type:"number",default:1.3},{id:"colorscale",label:"ColorScale",type:"string",default:"Viridis"},{id:"showscale",label:"ShowScale",type:"boolean",default:!0},{id:"reversescale",label:"ReverseScale",type:"boolean",default:!1},{id:"contours.coloring",label:"Contours Coloring",type:"string",default:"fill"},{id:"contours.start",label:"Contours Start",type:"number",default:0},{id:"contours.end",label:"Contours End",type:"number",default:10},{id:"contours.size",label:"Contours Size",type:"number",default:1},{id:"opacity",label:"Opacity",type:"number",default:.8},{id:"cmin",label:"Cmin",type:"number",default:0},{id:"cmax",label:"Cmax",type:"number",default:10},{id:"colorbar.title",label:"ColorBar Title",type:"string",default:"ColorBar"},{id:"colorbar.tickvals",label:"ColorBar TickVals",type:"array",default:[]},{id:"colorbar.ticktext",label:"ColorBar TickText",type:"array",default:[]},{id:"autocolorscale",label:"AutoColorScale",type:"boolean",default:!0},{id:"showlegend",label:"ShowLegend",type:"boolean",default:!0},{id:"legendgroup",label:"LegendGroup",type:"string",default:""},{id:"lat",label:"Lat",type:"array",default:[38]},{id:"lon",label:"Lon",type:"array",default:[-90]}]),f=Object(n["L"])([{id:"autosizable",label:"Autosizable",type:"boolean",default:!1},{id:"displaylogo",label:"Display Logo",type:"boolean",default:!0},{id:"scrollZoom",label:"Scroll Zoom",type:"boolean",default:!0},{id:"editable",label:"Editable",type:"boolean",default:!0},{id:"displayModeBar",label:"Mode Bar",type:"boolean",default:!0}]),_=Object(n["L"])([{id:"title",label:"Title",type:"string",default:"Hello Def"},{id:"showlegend",label:"Show Legend",type:"boolean",default:!0},{id:"legend.x",label:"Legend X",type:"number",default:1},{id:"legend.y",label:"Legend Y",type:"number",default:1},{id:"legend.xanchor",label:"Legend X-Anchor",type:"enum",default:"right",options:["left","right"]},{id:"legend.yanchor",label:"Legend Y-Anchor",type:"enum",default:"right",options:["left","right"]},{id:"legend.orientation",label:"Legend Orientation",type:"enum",default:"v",options:["v","h"]},{id:"paper_bgcolor",label:"Paper",type:"color",default:"#ffffff"},{id:"plot_bgcolor",label:"Background",type:"color",default:"#ffffff"},{id:"font.color",label:"Font Color",type:"color",default:"#000000"},{id:"font.size",label:"Font Size",type:"number",default:10},{id:"xaxis.title.text",label:"X-Axis Title Text",type:"string",default:"Axis Title"},{id:"xaxis.title.font.size",label:"X-Axis Title Font Size",type:"number",default:24},{id:"xaxis.title.font.color",label:"X-Axis Title Font Color",type:"color",default:"#000000"},{id:"yaxis.title.text",label:"Y-Axis Title Text",type:"string",default:"Axis Title"},{id:"yaxis.title.font.size",label:"Y-Axis Title Font Size",type:"number",default:24},{id:"yaxis.title.font.color",label:"Y-Axis Title Font Color",type:"color",default:"#000000"},{id:"dragmode",label:"Dragmode",type:"enum",default:"zoom",options:["zoom"]},{id:"mapbox.style",label:"Mabox Style",type:"enum",default:"open-street-map",options:["open-street-map"]},{id:"mapbox.center.lat",label:"Mapbox Center Lat",type:"number",default:38},{id:"mapbox.center.lon",label:"Mapbox Center Lon",type:"number",default:-90},{id:"mapbox.zoom",label:"Mapbox Zoom",type:"number",default:3},{id:"margin.l",label:"Margin L",type:"number",default:0},{id:"margin.t",label:"Margin T",type:"number",default:0},{id:"margin.r",label:"Margin R",type:"number",default:0},{id:"margin.b",label:"Margin B",type:"number",default:0},{id:"width",label:"Width",type:"number",default:500},{id:"height",label:"Height",type:"number",default:500},{id:"xaxis.showgrid",label:"Show X grid",type:"boolean",default:!0},{id:"yaxis.showgrid",label:"Show Y grid",type:"boolean",default:!0},{id:"xaxis.range",label:"X range",type:"array",default:[0,1500]},{id:"xaxis.visible",label:"X visible",type:"boolean",default:!1}]);Object(n["f"])(()=>y.IS_PRO);function h(){let e=o.appData.pages[y.currentPageIndex].model.fields.filter(e=>"DataFrames.DataFrame"==e.type||"PlotlyData"==e.type||"DataTable.DataFrames.DataFrame"==e.type);s.value=e}const O=Object(n["f"])(()=>{let e=o.appData.pages[y.currentPageIndex].model.fields,t=[];return e.forEach(e=>{if("DataTable.DataFrames.DataFrame"==e.type){let a=e.props;a&&a.forEach(a=>{t.push({name:e.name+"."+a,type:e.type})})}else if("DataFrames.DataFrame"==e.type){let a=e.columns;a&&a.forEach(a=>{t.push({name:e.name+"."+a,type:e.type})})}t.push({name:e.name,type:e.type})}),t.sort((e,t)=>e.name.toLowerCase().localeCompare(t.name.toLowerCase())),t}),j=Object(n["f"])(()=>{let e=[];return console.log("dataSourceFields",s),s.value.forEach(t=>{if(0==t.type.indexOf("DataFrames.DataFrame")){let a=t.columns;a&&a.forEach(a=>{e.push(t.name+"."+a)})}let a=t.props;a&&a.forEach(a=>{e.push(t.name+"."+a)})}),o.appData.pages[y.currentPageIndex].model.fields.forEach(t=>{"Array"==t.type&&e.push(t.name)}),e});function v(e,t){let a=e.filter(e=>{let a=!1,n=G(t,e.id);return null!=n&&(a=!0),!a});return a}Object(n["f"])(()=>{let e=f.value.filter(e=>{let t=!1,a=G(c.value,e.id);return null!=a&&(t=!0),!t});return e});function w(e){const t={data:S,layout:T,config:L};t[e]?t[e]():console.error("setSpecialAttributeAsConstant: key not found",e)}function k(e){const t={data:C,layout:D,config:P};t[e]?t[e]():console.error("setSpecialAttributeAsBinding: key not found",e)}function x(e){return u.value.filter(t=>t.type==e)}function C(){let e=u.value.filter(e=>"PlotlyBase.GenericTrace"==e.type);if(0==e.length)return void console.error("setDataAsBinding: No matching model fields found for type ","PlotlyBase.GenericTrace");delete o.selectedComponent.gb_c__data;let t=e[0].name;o.selectedComponent.gb_b__data=t,d.value=t,H(),q(o.selectedComponent),a("chartPropModeChanged","gb_c__data",t)}function D(){let e=u.value.filter(e=>"PlotlyBase.Layout"==e.type);if(0==e.length)return void console.error("setLayoutAsBinding: No matching model fields found for type ","PlotlyBase.Layout");delete o.selectedComponent.gb_c__layout;let t=e[0].name;o.selectedComponent.gb_b__layout=t,b.value=t,H(),q(o.selectedComponent),a("chartPropModeChanged","gb_c__layout",t)}function P(){let e=u.value.filter(e=>"Object"==e.type);if(0==e.length)return void console.error("setConfigAsBinding: No matching model fields found for type ","Object");delete o.selectedComponent.gb_c__config;let t=e[0].name;o.selectedComponent.gb_b__config=t,p.value=t,H(),q(o.selectedComponent),a("chartPropModeChanged","gb_c__config",t)}function S(){delete o.selectedComponent.gb_b__data;let e=[{gbtype:"Bar Chart",x:[],y:[],type:"bar",name:"Trace"}];o.selectedComponent.gb_c_data=e,d.value=e,H(),q(o.selectedComponent),a("chartPropModeChanged","gb_b__data",btoa(JSON.stringify(e)))}function T(){delete o.selectedComponent.gb_b__layout;let e={title:"Chart Title"};o.selectedComponent.gb_c_layout=e,b.value=e,H(),q(o.selectedComponent),a("chartPropModeChanged","gb_b__layout",btoa(JSON.stringify(e)))}function L(){delete o.selectedComponent.gb_b__config;let e={autosizable:!0,displaylogo:!0,scrollZoom:!0,editable:!0,displayModeBar:!0};o.selectedComponent.gb_c_config=e,p.value=e,H(),q(o.selectedComponent),a("chartPropModeChanged","gb_b__config",btoa(JSON.stringify(e)))}function A(e){H()}function U(e){H()}function I(e){H()}function E(e){console.log("removeTrace",e),console.log("traces.value before: ",d.value),d.value.splice(e,1),console.log("traces.value after: ",d.value),H()}function R(e){c.value=e}function M(){c.value=null}function N(e,t,a){let n=e.id,o=t.find(e=>e.id==n);B(a,n,o.default),H()}function G(e,t){const a=t.split(".");for(let n=0;n{q(o.selectedComponent),h()}),t({setSelectedComponent:q,addNewTraceFromBinding:z}),(t,a)=>{const o=Object(n["O"])("vscode-button");return e.selectedComponent&&"plotly"==e.selectedComponent.attributes.type?(Object(n["G"])(),Object(n["j"])("div",sa,[Object(n["k"])("div",ca,[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(Object(n["U"])(r),e=>(Object(n["G"])(),Object(n["j"])("div",{onClick:t=>Object(n["s"])(i)?i.value=e.id:i=e.id,class:Object(n["w"])({tabItem:!0,tabItemSelected:e.id==Object(n["U"])(i)}),key:e},Object(n["R"])(e.name)+" ",11,da))),128))]),0==Object(n["U"])(i)?(Object(n["G"])(),Object(n["j"])("div",pa,[l("data")?(Object(n["G"])(),Object(n["j"])("div",ba,[ua,ma,Object(n["k"])("div",ga,[Object(n["cb"])(Object(n["k"])("select",{class:"propInput propInputDynamic","onUpdate:modelValue":a[0]||(a[0]=t=>e.selectedComponent.attributes.attributes.gb_b__data=t),onChange:I,onDrop:a[1]||(a[1]=Object(n["eb"])((...e)=>t.onDrop&&t.onDrop(...e),["prevent"])),onDragenter:a[2]||(a[2]=Object(n["eb"])(()=>{},["prevent"])),onDragover:a[3]||(a[3]=Object(n["eb"])(()=>{},["prevent"])),attrname:"gb_b_data"},[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(e.filteredModelFields.data,e=>(Object(n["G"])(),Object(n["j"])("option",{key:"binding_"+e.name,value:e.name},Object(n["R"])(e.label?e.label:e.name),9,fa))),128))],544),[[n["X"],e.selectedComponent.attributes.attributes.gb_b__data]])]),Object(n["k"])("div",{class:"propRowDynamicSwitch",onClick:a[4]||(a[4]=e=>w("data"))},ha)])):(Object(n["G"])(),Object(n["j"])("div",ya,[Object(n["k"])("div",Oa,[x("PlotlyBase.GenericTrace").length>0?(Object(n["G"])(),Object(n["j"])("div",{key:0,class:"nanoButton",style:{},onClick:a[5]||(a[5]=e=>k("data"))},wa)):Object(n["i"])("",!0)]),(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(Object(n["U"])(d),(e,t)=>(Object(n["G"])(),Object(n["j"])("div",{class:"foldableGroup",key:e},[Object(n["k"])("div",ka,[Object(n["k"])("div",xa,[Object(n["k"])("div",Ca,[Object(n["m"])(ia,{showSectionTitle:!0,sectionIndex:t,treeObject:e,dataSourceColumns:j.value,propertiesDefinition:Object(n["U"])(g),modelFields:O.value,onRemoveTrace:E,onChange:I},null,8,["sectionIndex","treeObject","dataSourceColumns","propertiesDefinition","modelFields"])])]),Object(n["k"])("div",Da,[Object(n["m"])(o,{onClick:t=>R(e),style:{}},{default:Object(n["bb"])(()=>[Object(n["l"])("Add Property")]),_:2},1032,["onClick"])]),Object(n["U"])(c)==e?(Object(n["G"])(),Object(n["h"])(Dt,{key:0,defObject:Object(n["U"])(g),destination:Object(n["U"])(c),propslist:v(Object(n["U"])(g),e),onPropAdded:N,onClose:M},null,8,["defObject","destination","propslist"])):Object(n["i"])("",!0)])]))),128))])),l("data")?Object(n["i"])("",!0):(Object(n["G"])(),Object(n["j"])("div",Pa,[Object(n["m"])(o,{class:"addTraceButton",onClick:F},{default:Object(n["bb"])(()=>[Object(n["l"])("Add Trace")]),_:1})]))])):Object(n["i"])("",!0),1==Object(n["U"])(i)?(Object(n["G"])(),Object(n["j"])("div",Sa,[l("layout")?(Object(n["G"])(),Object(n["j"])("div",Ta,[La,Aa,Object(n["k"])("div",Ua,[Object(n["cb"])(Object(n["k"])("select",{class:"propInput propInputDynamic","onUpdate:modelValue":a[6]||(a[6]=t=>e.selectedComponent.attributes.attributes.gb_b__layout=t),onChange:A,onDrop:a[7]||(a[7]=Object(n["eb"])((...e)=>t.onDrop&&t.onDrop(...e),["prevent"])),onDragenter:a[8]||(a[8]=Object(n["eb"])(()=>{},["prevent"])),onDragover:a[9]||(a[9]=Object(n["eb"])(()=>{},["prevent"])),attrname:"gb_b_layout"},[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(e.filteredModelFields.layout,e=>(Object(n["G"])(),Object(n["j"])("option",{key:"binding_"+e.name,value:e.name},Object(n["R"])(e.label?e.label:e.name),9,Ia))),128))],544),[[n["X"],e.selectedComponent.attributes.attributes.gb_b__layout]])]),Object(n["k"])("div",{class:"propRowDynamicSwitch",onClick:a[10]||(a[10]=e=>w("layout"))},Ra)])):(Object(n["G"])(),Object(n["j"])("div",Ma,[Object(n["k"])("div",Na,[x("PlotlyBase.Layout").length>0?(Object(n["G"])(),Object(n["j"])("div",{key:0,class:"nanoButton",style:{},onClick:a[11]||(a[11]=e=>k("layout"))},Ha)):Object(n["i"])("",!0)]),Object(n["k"])("div",qa,[Object(n["k"])("div",Fa,[Object(n["m"])(ia,{treeObject:Object(n["U"])(b),dataSourceColumns:j.value,propertiesDefinition:Object(n["U"])(_),modelFields:O.value,onChange:A},null,8,["treeObject","dataSourceColumns","propertiesDefinition","modelFields"])])]),Object(n["k"])("div",za,[Object(n["U"])(c)?Object(n["i"])("",!0):(Object(n["G"])(),Object(n["h"])(o,{key:0,onClick:a[12]||(a[12]=e=>R(Object(n["U"])(b))),style:{}},{default:Object(n["bb"])(()=>[Object(n["l"])("Add Property")]),_:1}))]),Object(n["U"])(c)==Object(n["U"])(b)?(Object(n["G"])(),Object(n["h"])(Dt,{key:0,defObject:Object(n["U"])(_),destination:Object(n["U"])(b),propslist:v(Object(n["U"])(_),Object(n["U"])(b)),onPropAdded:N,onClose:M},null,8,["defObject","destination","propslist"])):Object(n["i"])("",!0)]))])):Object(n["i"])("",!0),2==Object(n["U"])(i)?(Object(n["G"])(),Object(n["j"])("div",Va,[l("config")?(Object(n["G"])(),Object(n["j"])("div",$a,[Wa,Ja,Object(n["k"])("div",Qa,[Object(n["cb"])(Object(n["k"])("select",{class:"propInput propInputDynamic","onUpdate:modelValue":a[13]||(a[13]=t=>e.selectedComponent.attributes.attributes.gb_b__config=t),onChange:U,onDrop:a[14]||(a[14]=Object(n["eb"])((...e)=>t.onDrop&&t.onDrop(...e),["prevent"])),onDragenter:a[15]||(a[15]=Object(n["eb"])(()=>{},["prevent"])),onDragover:a[16]||(a[16]=Object(n["eb"])(()=>{},["prevent"])),attrname:"gb_b_config"},[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(e.filteredModelFields.config,e=>(Object(n["G"])(),Object(n["j"])("option",{key:"binding_"+e.name,value:e.name},Object(n["R"])(e.label?e.label:e.name),9,Ya))),128))],544),[[n["X"],e.selectedComponent.attributes.attributes.gb_b__config]])]),Object(n["k"])("div",{class:"propRowDynamicSwitch",onClick:a[17]||(a[17]=e=>w("config"))},Za)])):(Object(n["G"])(),Object(n["j"])("div",Ka,[Object(n["k"])("div",en,[x("Object").length>0?(Object(n["G"])(),Object(n["j"])("div",{key:0,class:"nanoButton",style:{},onClick:a[18]||(a[18]=e=>k("config"))},nn)):Object(n["i"])("",!0)]),Object(n["k"])("div",on,[Object(n["k"])("div",ln,[Object(n["m"])(ia,{treeObject:Object(n["U"])(p),dataSourceColumns:j.value,propertiesDefinition:Object(n["U"])(f),modelFields:O.value,onChange:U},null,8,["treeObject","dataSourceColumns","propertiesDefinition","modelFields"])])]),Object(n["k"])("div",rn,[Object(n["U"])(c)?Object(n["i"])("",!0):(Object(n["G"])(),Object(n["h"])(o,{key:0,onClick:a[19]||(a[19]=e=>R(Object(n["U"])(p))),style:{}},{default:Object(n["bb"])(()=>[Object(n["l"])("Add Property")]),_:1}))]),Object(n["U"])(c)==Object(n["U"])(p)?(Object(n["G"])(),Object(n["h"])(Dt,{key:0,defObject:Object(n["U"])(f),destination:Object(n["U"])(p),propslist:v(Object(n["U"])(f),Object(n["U"])(p)),onPropAdded:N,onClose:M},null,8,["defObject","destination","propslist"])):Object(n["i"])("",!0)]))])):Object(n["i"])("",!0)])):Object(n["i"])("",!0)}}};a("4f80");const cn=A()(sn,[["__scopeId","data-v-f312c504"]]);var dn=cn;const pn=e=>(Object(n["J"])("data-v-d4c6351e"),e=e(),Object(n["H"])(),e),bn={key:0,class:"nothingSelected"},un=pn(()=>Object(n["k"])("i",null,"Nothing selected",-1)),mn=[un],gn={key:1,class:"notProUI"},fn=pn(()=>Object(n["k"])("br",null,null,-1)),_n=pn(()=>Object(n["k"])("br",null,null,-1)),hn=pn(()=>Object(n["k"])("br",null,null,-1)),yn={key:2},On={style:{"user-select":"none"}},jn={key:0,class:"removeBtnCnt",style:{width:"20px"}},vn=["onClick"],wn=pn(()=>Object(n["k"])("i",{"aria-hidden":"true",role:"img",class:"q-icon notranslate material-icons",style:{"font-size":"14px",padding:"0px"}},"delete",-1)),kn=[wn],xn=["title"],Cn={key:1,class:"propRowControl"},Dn={slot:"selected-value",class:"codicon codicon-settings"},Pn={slot:"selected-value",class:"codicon codicon-settings"},Sn={"aria-hidden":"true",role:"img",class:"q-icon notranslate material-icons",style:{"font-size":"16px",padding:"5px"}},Tn={"aria-hidden":"true",role:"img",class:"q-icon notranslate material-icons",style:{"font-size":"16px"}},Ln={slot:"selected-value"},An=["attrname","onDrop","onUpdate:modelValue"],Un=["attrname","onDrop","onUpdate:modelValue"],In=["attrname","onDrop","onUpdate:modelValue"],En=["attrname","onDrop","onUpdate:modelValue"],Rn=["attrname","onDrop","onUpdate:modelValue"],Mn=["attrname","onDrop","onUpdate:modelValue"],Nn={key:2,class:"propRowControl"},Gn=["onUpdate:modelValue","onDrop","attrname"],Bn=["value"],Hn=["onClick"],qn={key:0,src:"img/icons/binding_on.png",style:{height:"16px"},draggable:"false"},Fn={key:1,src:"img/icons/binding_off.png",style:{height:"16px"},draggable:"false"},zn={key:4,class:"propRowDynamicSwitch",draggable:"false",style:{cursor:"auto"}},Vn={key:0,class:"suggestedPropertiesContainer",style:{margin:"20px 0px 0px 0px"}},$n=pn(()=>Object(n["k"])("div",{class:"suggestedPropertiesTitle",style:{"margin-bottom":"10px","font-weight":"bold","font-size":"0.9em"}},"Suggested Properties:",-1)),Wn={class:"propRowLabel",style:{"font-weight":"bold","text-align":"left:"}},Jn={class:"propRowControl",style:{"text-align":"left","font-size":"0.8em","user-select":"none"}},Qn=["onClick"],Yn=pn(()=>Object(n["k"])("i",{class:"fa fa-plus"},null,-1)),Xn=[Yn],Zn=pn(()=>Object(n["k"])("br",null,null,-1)),Kn={class:"addPropertyButtonRow"},eo={key:0,style:{"font-size":"0.8em"}},to=pn(()=>Object(n["k"])("i",null,"Nothing selected",-1)),ao=[to];var no={__name:"PropertiesPanel",props:["title","appData","selectedComponent","parentPanel"],setup(e,{expose:t}){const a=e;function o(){window.showUpgradeLicenseDialog(!1)}function l(e){if(y.IS_PRO)return!0;let t=e.attributes.tagName,a=x(t),n=null===a||void 0===a?void 0:a.proRequired;return!n}const i=Object(n["L"])(null);let r=Object(n["L"])(null),s=Object(n["L"])(!1),c=Object(n["L"])(a.appData.pages[y.currentPageIndex].model.fields),d={};c.value.forEach(e=>{d[e.name]=e});const p=blockDefinitions.reduce((e,t)=>(e[t.type]=t,e),{});function b(e){try{return 0==e.indexOf("gb_c__")||0==e.indexOf("gb_b__")?e.substring(6):e}catch(t){console.error("Error in getAttributeCleanRealName: ",e,t)}}function u(e){r.value.removeAttributes([e.name]),D()}function m(){let e=x(r.value.attributes.tagName);if(!e)return[];let t=f().map(e=>e.cleanName),a=e.properties.filter(e=>1==e.suggested),n=a.filter(e=>-1==t.indexOf(e.name));return n}function g(e,t){var a;let n=[];if(null!==t&&void 0!==t&&null!==(a=t.view)&&void 0!==a&&a.el){let e=Le.extractVforVariablesAncestors(t.view.el);e.forEach(e=>{n.push({name:e,label:e+" *"})})}if(!e||!e.def)return n;let o=null!=e.def.typeList?e.def.typeList:[e.def.type];return c.value.forEach(t=>{if("Any"==e.def.type||o.indexOf(t.type)>-1)n.push(t);else if("DataTable.DataFrames.DataFrame"==t.type){let e=t.props;e&&e.forEach(e=>{n.push({name:t.name+"."+e})})}}),n}function f(){if(!r.value)return[];const e=r.value.attributes.attributes;let t=[],n={};for(let a in e){let o=_(a);o&&void 0!=e[a]&&(t.push(o),n[a]=e[a])}return a.selectedComponent.view.el.vueApp&&a.selectedComponent.view.el.vueApp.updateAttributes(n),t=ne.a.sortBy(t,"cleanName"),t}const _=e=>{if(!r.value)return null;const t=r.value.attributes.attributes;let a=null;if(e.startsWith("gb_c__")||e.startsWith("gb_b__")){let n=b(e).toLowerCase();if("id"!=n&&"charttype"!=n&&"class"!=n){let o=h(n);if(!o)return console.log("Definition not found for: ",e,n,t[e]),null;a={name:e,cleanName:n,value:t[e],def:o}}}return a};function h(e){if(!r.value)return null;let t=r.value.attributes.type;"text"==t&&(t=r.value.attributes.tagName);let a=x(t);if(!a)return null;let n=a.properties.find(t=>t.name==e);return n}function O(e){let t=0==e.indexOf("gb_b_");return t}function j(e){let t=JSON.parse(e.dataTransfer.getData("text")),a=e.target.getAttribute("attrname");if(0==a.indexOf("gb_c__"))P(a,t.bindingname);else{let e={};e[a]=t.bindingname,r.value.addAttributes(e)}}function v(){s.value=!0}function w(){s.value=!1}function k(e){let t={Boolean:!0,String:"",Number:0,Array:[],Function:"",Object:{}},a={},n="gb_c__"+e.name,o=null!=t[e.type]?t[e.type]:"";a[n]=o,r.value.addAttributes(a),D()}function x(e){let t=p[e];return t}const C=Object(n["f"])(()=>{let e=x(r.value.attributes.tagName);if(!e)return[];let t=e.properties,a=r.value.getAttributes(),n=[];for(let l in a){let e=b(l);n.push(e)}let o=[];return t.forEach(e=>{let t=b(e.name);-1==n.indexOf(t)&&o.push(e)}),o});function D(){let e=r.value.attributes.attributes;for(let a in e)!0===e[a]&&(e[a]="true"),!1===e[a]&&(e[a]="false");let t=selectedComponent.toHTML();editor.getSelected().replaceWith(t);let n={},o=Object.getOwnPropertyNames(e);o.forEach(t=>{let a;a=void 0!=e[t]&&void 0!=e[t].nodeValue?e[t].nodeValue:e[t],n[t]=a}),a.selectedComponent.setAttributes(n);let l=a.selectedComponent.view.$el[0].vueApp;l&&l.updateAttributes(n)}function P(e,t){let a=0==e.indexOf("gb_b__")?e.replace("gb_b__","gb_c__"):e.replace("gb_c__","gb_b__");r.value.removeAttributes([e]);let n={};if(0==a.indexOf("gb_b__"))if(null!=d[t])n[a]=t;else{let e=b(a).toLowerCase(),t=h(e),o={def:t},l=g(o);l.length>0?n[a]=l[0].name:n[a]="Not Set"}else n[a]=t;r.value.addAttributes(n),D()}const S=(e,t)=>{console.log("onChartPropModeChanged",e,t),P(e,t)};function T(e){a.parentPanel&&(e?a.parentPanel.expand(!0):a.parentPanel.expand(!1)),r.value=e,e&&"plotly"==e.attributes.type&&i.value.setSelectedComponent(e)}return Object(n["D"])(()=>{T(window.selectedComponent)}),t({setSelectedComponent:T,chartPropertiesPanel:i}),(t,a)=>{const c=Object(n["O"])("vscode-button"),d=Object(n["O"])("vscode-option"),p=Object(n["O"])("vscode-dropdown"),b=Object(n["O"])("q-icon");return Object(n["G"])(),Object(n["j"])("div",null,[Object(n["U"])(r)?Object(n["i"])("",!0):(Object(n["G"])(),Object(n["j"])("div",bn,mn)),Object(n["U"])(r)&&!l(Object(n["U"])(r))?(Object(n["G"])(),Object(n["j"])("div",gn,[Object(n["l"])(" This component requires a Pro license."),fn,Object(n["l"])(" Upgrade to Pro and start using it now!"),_n,Object(n["l"])(),hn,Object(n["m"])(c,{onClick:o,style:{"margin-right":"3px"}},{default:Object(n["bb"])(()=>[Object(n["l"])("Upgrade")]),_:1})])):Object(n["i"])("",!0),Object(n["U"])(r)&&l(Object(n["U"])(r))&&"tempplaceholder"!=Object(n["U"])(r).attributes.type&&"plotly"!=Object(n["U"])(r).attributes.type?(Object(n["G"])(),Object(n["j"])("div",yn,[Object(n["k"])("div",On,[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(f(),e=>{var t;return Object(n["G"])(),Object(n["j"])("div",{key:e.name,class:"propRow"},[Object(n["U"])(r)&&"plotly"!=Object(n["U"])(r).attributes.type?(Object(n["G"])(),Object(n["j"])("div",jn,[1!=(null===(t=e.def)||void 0===t?void 0:t.mandatory)&&"gb_b__v-model"!=e.name?(Object(n["G"])(),Object(n["j"])("span",{key:0,onClick:t=>u(e),title:"Remove Property",class:"codicon codicon-settings"},kn,8,vn)):Object(n["i"])("",!0)])):Object(n["i"])("",!0),Object(n["k"])("div",{class:"propRowLabel",title:e.def.name+": "+e.def.desc},Object(n["R"])(e.def.label)+": ",9,xn),O(e.name)?Object(n["i"])("",!0):(Object(n["G"])(),Object(n["j"])("div",Cn,["select"==e.def.uitype?(Object(n["G"])(),Object(n["h"])(p,{key:0,style:{width:"100%","min-width":"unset"},value:Object(n["U"])(r).attributes.attributes[e.name],onInput:t=>Object(n["U"])(r).attributes.attributes[e.name]=t.target.value,onChange:D},{default:Object(n["bb"])(()=>[Object(n["k"])("span",Dn,Object(n["R"])(Object(n["U"])(r).attributes.attributes[e.name]),1),(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(e.def.options,e=>(Object(n["G"])(),Object(n["h"])(d,{value:e,style:{padding:"5px"}},{default:Object(n["bb"])(()=>[Object(n["l"])(Object(n["R"])(e),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onInput"])):"enum_icons"==e.def.uitype?(Object(n["G"])(),Object(n["h"])(p,{key:1,style:{width:"100%","min-width":"unset"},value:Object(n["U"])(r).attributes.attributes[e.name],onInput:t=>Object(n["U"])(r).attributes.attributes[e.name]=t.target.value,onChange:D},{default:Object(n["bb"])(()=>[Object(n["k"])("span",Pn,[Object(n["k"])("i",Sn,Object(n["R"])(Object(n["U"])(r).attributes.attributes[e.name]),1),Object(n["l"])(" "+Object(n["R"])(Object(n["U"])(r).attributes.attributes[e.name]),1)]),(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(e.def.options,e=>(Object(n["G"])(),Object(n["h"])(d,{value:e,style:{padding:"5px"}},{default:Object(n["bb"])(()=>[Object(n["k"])("i",Tn,Object(n["R"])(e),1),Object(n["l"])(" "+Object(n["R"])(e),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onInput"])):"enum_colors"==e.def.uitype?(Object(n["G"])(),Object(n["h"])(p,{key:2,style:{width:"100%","min-width":"unset"},value:Object(n["U"])(r).attributes.attributes[e.name],onInput:t=>Object(n["U"])(r).attributes.attributes[e.name]=t.target.value,onChange:D},{default:Object(n["bb"])(()=>[Object(n["k"])("span",Ln,[Object(n["m"])(b,{name:"circle",color:Object(n["U"])(r).attributes.attributes[e.name],style:{"margin-right":"5px"}},null,8,["color"]),Object(n["l"])(" "+Object(n["R"])(Object(n["U"])(r).attributes.attributes[e.name]),1)]),(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(e.def.options,e=>(Object(n["G"])(),Object(n["h"])(d,{value:e,style:{padding:"5px"}},{default:Object(n["bb"])(()=>[Object(n["m"])(b,{name:"circle",color:e,style:{"margin-right":"5px"}},null,8,["color"]),Object(n["l"])(" "+Object(n["R"])(e),1)]),_:2},1032,["value"]))),256))]),_:2},1032,["value","onInput"])):"String"==e.def.uitype||"String"==e.def.type&&-1==e.cleanName.indexOf("color")?Object(n["cb"])((Object(n["G"])(),Object(n["j"])("input",{key:3,attrname:e.name,type:"text",onDrop:Object(n["eb"])(j,["prevent"]),onDragenter:a[0]||(a[0]=Object(n["eb"])(()=>{},["prevent"])),onDragover:a[1]||(a[1]=Object(n["eb"])(()=>{},["prevent"])),class:"propInput",onChange:D,"onUpdate:modelValue":t=>Object(n["U"])(r).attributes.attributes[e.name]=t,style:{width:"220px%"}},null,40,An)),[[n["Y"],Object(n["U"])(r).attributes.attributes[e.name]]]):"Array"==e.def.type?Object(n["cb"])((Object(n["G"])(),Object(n["j"])("input",{key:4,attrname:e.name,type:"text",onDrop:Object(n["eb"])(j,["prevent"]),onDragenter:a[2]||(a[2]=Object(n["eb"])(()=>{},["prevent"])),onDragover:a[3]||(a[3]=Object(n["eb"])(()=>{},["prevent"])),class:"propInput",onChange:D,"onUpdate:modelValue":t=>Object(n["U"])(r).attributes.attributes[e.name]=t,style:{width:"220px%"}},null,40,Un)),[[n["Y"],Object(n["U"])(r).attributes.attributes[e.name]]]):"Function"==e.def.type?Object(n["cb"])((Object(n["G"])(),Object(n["j"])("input",{key:5,attrname:e.name,type:"text",onDrop:Object(n["eb"])(j,["prevent"]),onDragenter:a[4]||(a[4]=Object(n["eb"])(()=>{},["prevent"])),onDragover:a[5]||(a[5]=Object(n["eb"])(()=>{},["prevent"])),class:"propInput",onChange:D,"onUpdate:modelValue":t=>Object(n["U"])(r).attributes.attributes[e.name]=t,style:{width:"220px%"}},null,40,In)),[[n["Y"],Object(n["U"])(r).attributes.attributes[e.name]]]):"String"==e.def.type&&e.name.indexOf("color")>-1?Object(n["cb"])((Object(n["G"])(),Object(n["j"])("input",{key:6,attrname:e.name,type:"color",onDrop:Object(n["eb"])(j,["prevent"]),onDragenter:a[6]||(a[6]=Object(n["eb"])(()=>{},["prevent"])),onDragover:a[7]||(a[7]=Object(n["eb"])(()=>{},["prevent"])),class:"propInput",onChange:D,"onUpdate:modelValue":t=>Object(n["U"])(r).attributes.attributes[e.name]=t,style:{padding:"0px 2px",height:"21px"}},null,40,En)),[[n["Y"],Object(n["U"])(r).attributes.attributes[e.name]]]):"Number"==e.def.type?Object(n["cb"])((Object(n["G"])(),Object(n["j"])("input",{key:7,attrname:e.name,type:"number",onDrop:Object(n["eb"])(j,["prevent"]),onDragenter:a[8]||(a[8]=Object(n["eb"])(()=>{},["prevent"])),onDragover:a[9]||(a[9]=Object(n["eb"])(()=>{},["prevent"])),class:"propInput",onChange:D,"onUpdate:modelValue":t=>Object(n["U"])(r).attributes.attributes[e.name]=t},null,40,Rn)),[[n["Y"],Object(n["U"])(r).attributes.attributes[e.name]]]):"Boolean"==e.def.type?Object(n["cb"])((Object(n["G"])(),Object(n["j"])("input",{key:8,attrname:e.name,type:"checkbox",onDrop:Object(n["eb"])(j,["prevent"]),onDragenter:a[10]||(a[10]=Object(n["eb"])(()=>{},["prevent"])),onDragover:a[11]||(a[11]=Object(n["eb"])(()=>{},["prevent"])),class:"propInput",onChange:D,"onUpdate:modelValue":t=>Object(n["U"])(r).attributes.attributes[e.name]=t,style:{width:"auto"}},null,40,Mn)),[[n["V"],Object(n["U"])(r).attributes.attributes[e.name]]]):Object(n["i"])("",!0)])),O(e.name)?(Object(n["G"])(),Object(n["j"])("div",Nn,[Object(n["cb"])(Object(n["k"])("select",{class:"propInput propInputDynamic","onUpdate:modelValue":t=>Object(n["U"])(r).attributes.attributes[e.name]=t,name:"cars",id:"cars",onChange:D,onDrop:Object(n["eb"])(j,["prevent"]),onDragenter:a[12]||(a[12]=Object(n["eb"])(()=>{},["prevent"])),onDragover:a[13]||(a[13]=Object(n["eb"])(()=>{},["prevent"])),attrname:e.name},[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(g(e,Object(n["U"])(r)),e=>(Object(n["G"])(),Object(n["j"])("option",{key:"binding_"+e.name,value:e.name},Object(n["R"])(e.label?e.label:e.name),9,Bn))),128))],40,Gn),[[n["X"],Object(n["U"])(r).attributes.attributes[e.name]]])])):Object(n["i"])("",!0),"gb_b__v-model"!=e.name&&"gb_c__v-for"!=e.name&&"plotly"!=Object(n["U"])(r).attributes.type?(Object(n["G"])(),Object(n["j"])("div",{key:3,onClick:t=>P(e.name,e.value),class:"propRowDynamicSwitch"},[O(e.name)?(Object(n["G"])(),Object(n["j"])("img",qn)):Object(n["i"])("",!0),O(e.name)?Object(n["i"])("",!0):(Object(n["G"])(),Object(n["j"])("img",Fn))],8,Hn)):(Object(n["G"])(),Object(n["j"])("div",zn))])}),128)),m().length>0?(Object(n["G"])(),Object(n["j"])("div",Vn,[$n,(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(m(),e=>(Object(n["G"])(),Object(n["j"])("div",{key:e.name,class:"propRow"},[Object(n["k"])("div",Wn,Object(n["R"])(e.label)+": ",1),Object(n["k"])("div",Jn,Object(n["R"])(e.desc),1),Object(n["k"])("div",{class:"propRowDynamicSwitch",draggable:"false",title:"Add property",onClick:t=>k(e)},Xn,8,Qn)]))),128))])):Object(n["i"])("",!0)]),Zn,Object(n["k"])("div",Kn,[!Object(n["U"])(s)&&Object(n["U"])(r)&&"plotly"!=Object(n["U"])(r).attributes.type?(Object(n["G"])(),Object(n["h"])(c,{key:0,onClick:v},{default:Object(n["bb"])(()=>[Object(n["l"])("Add Property")]),_:1})):Object(n["i"])("",!0)]),Object(n["U"])(r)?Object(n["i"])("",!0):(Object(n["G"])(),Object(n["j"])("div",eo,ao)),Object(n["U"])(s)?(Object(n["G"])(),Object(n["h"])(Dt,{key:1,propslist:C.value,onPropAdded:k,onClose:w},null,8,["propslist"])):Object(n["i"])("",!0)])):Object(n["i"])("",!0),Object(n["m"])(dn,{ref_key:"chartPropertiesPanel",ref:i,appData:e.appData,onChartPropModeChanged:S,selectedComponent:e.selectedComponent,blockPropertyDefinition:h(),filteredModelFields:{data:g(_("gb_b__data"),e.selectedComponent),layout:g(_("gb_b__layout"),e.selectedComponent),config:g(_("gb_b__config"),e.selectedComponent,e.selectedComponent)},style:{height:"100%"}},null,8,["appData","selectedComponent","blockPropertyDefinition","filteredModelFields"])])}}};a("0647"),a("f91f");const oo=A()(no,[["__scopeId","data-v-d4c6351e"]]);var lo=oo;at()(no,"components",{QIcon:oa["a"]});var io=a("1020"),ro=a.n(io),so=a("4dd1"),co=a.n(so),po=a("de09"),bo=a.n(po);a("9f21");const uo=e=>(Object(n["J"])("data-v-0ebb8bf8"),e=e(),Object(n["H"])(),e),mo={class:"logsPanel",style:{position:"relative"}},go={class:"toolBar"},fo=uo(()=>Object(n["k"])("option",{value:"1"},"Info",-1)),_o=uo(()=>Object(n["k"])("option",{value:"2"},"Warning",-1)),ho=uo(()=>Object(n["k"])("option",{value:"3"},"Error",-1)),yo=[fo,_o,ho],Oo=uo(()=>Object(n["k"])("span",{class:"codicon codicon-settings"},[Object(n["k"])("i",{"aria-hidden":"true",role:"img",class:"q-icon notranslate material-icons",style:{"font-size":"16px",padding:"5px"}},"delete")],-1)),jo=[Oo],vo={class:"timeStamp"},wo={class:"logLevel"},ko=["onClick"];var xo={__name:"LogsPanel",props:["appData"],setup(e,{expose:t}){const a=Object(n["L"])(!0),o=Object(n["L"])(!0),l=Object(n["L"])(1),i=Object(n["L"])("all"),r=Object(n["L"])(""),s=Object(n["L"])(null);ro.a.registerLanguage("javascript",co.a),ro.a.registerLanguage("sql",bo.a);const c={mounted(e,t){const a=t.value||"",n=ro.a.highlight("sql",a).value;e.innerHTML=`
${n}
`},updated(e,t){const a=t.value||"",n=ro.a.highlight("sql",a).value;e.innerHTML=`
${n}
`}},d=c,p=Object(n["L"])([{id:"all",label:"All"},{id:0,label:"GB"}]),b={info:1,warning:2,error:3},u=Object(n["L"])([]);window.logs=u;const m=Object(n["f"])(()=>{let e=u.value.filter(e=>{let t="server"==e.source&&a.value||"client"==e.source&&o.value,n=b[e.level]>=l.value,s="all"==i.value||e.appid==i.value,c=""==r.value||e.message.toLowerCase().indexOf(r.value.toLowerCase())>=0;return t&&n&&c&&s});return e});function g(){u.value=[]}function f(e){let t=y.appid,a=e.appid;if(void 0!=a&&a!=t)return;let n="log:message ";if(0==e.message.indexOf(n)){p.value.find(t=>t.id==e.appid)||p.value.push({id:e.appid,label:e.appid});let t=e.message.slice(n.length);0==t.indexOf("Info: ")?(e.level="info",t=t.slice("Info: ".length)):0==t.indexOf("Warning: ")?(e.level="warning",t=t.slice("Warning: ".length)):0==t.indexOf("Error: ")&&(e.level="error",t=t.slice("Error: ".length)),t=t.split(" ┌").join("┌"),e.message=t,e.appSource="0"==e.appid?"GB":"app "+e.appid,e.timestamp=e.timestamp.replace("T"," ").replace("Z","").split(".")[0],e.expanded=!1,u.value.push(e),s.value.scrollTop=s.value.scrollHeight}}return t({addLog:f}),(e,t)=>(Object(n["G"])(),Object(n["j"])("div",mo,[Object(n["k"])("div",go,[Object(n["k"])("div",null,[Object(n["cb"])(Object(n["k"])("input",{type:"checkbox",id:"showServerLogs",name:"showServerLogs","onUpdate:modelValue":t[0]||(t[0]=e=>a.value=e)},null,512),[[n["V"],a.value]]),Object(n["l"])(" GB Server ")]),Object(n["k"])("div",null,[Object(n["cb"])(Object(n["k"])("input",{type:"checkbox",id:"showClientLogs",name:"showClientLogs","onUpdate:modelValue":t[1]||(t[1]=e=>o.value=e)},null,512),[[n["V"],o.value]]),Object(n["l"])(" Client ")]),Object(n["k"])("div",null,[Object(n["cb"])(Object(n["k"])("select",{"onUpdate:modelValue":t[2]||(t[2]=e=>l.value=e)},yo,512),[[n["X"],l.value]])]),Object(n["k"])("div",null,[Object(n["l"])(" Search: "),Object(n["cb"])(Object(n["k"])("input",{type:"text",id:"searchString",name:"searchString","onUpdate:modelValue":t[3]||(t[3]=e=>r.value=e),style:{width:"200px"}},null,512),[[n["Y"],r.value]])]),Object(n["k"])("div",{style:{"text-align":"right","flex-grow":"1","flex-basis":"0"}},[Object(n["k"])("button",{class:"clearLogsButton",onClick:g,title:"Clear Logs"},jo)])]),Object(n["k"])("div",{ref_key:"logsContainer",ref:s,class:"logsContainer"},[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(m.value,(e,t)=>(Object(n["G"])(),Object(n["j"])("div",{class:Object(n["w"])({logItem:!0,levelInfo:"info"==e.level,levelWarning:"warning"==e.level,levelError:"error"==e.level}),key:"logItem_"+t},[Object(n["k"])("div",vo,Object(n["R"])(e.timestamp),1),Object(n["k"])("div",wo,Object(n["R"])(e.level),1),Object(n["cb"])(Object(n["k"])("div",{class:Object(n["w"])({logMessage:!0,logMessageExpanded:e.expanded}),onClick:t=>e.expanded=!e.expanded},null,10,ko),[[Object(n["U"])(d),e.message]])],2))),128))],512)]))}};a("2a61");const Co=A()(xo,[["__scopeId","data-v-0ebb8bf8"]]);var Do=Co;at()(xo,"components",{QIcon:oa["a"]});const Po={width:"100%",height:"100%",style:{position:"absolute","z-index":"11","pointer-events":"none"}},So=["x","y","width","height"],To=["d"];var Lo={__name:"BindingsConnector",setup(e,{expose:t}){const a=Object(n["L"])([]),o=Object(n["L"])([]),l=Object(n["L"])(null),i=Object(n["L"])(null),r=Object(n["L"])(-40),s=Object(n["L"])(-30),c=Object(n["L"])(null);function d(e){let t=document.querySelector(".logsPanel"),a=t.clientHeight,n=40,o=e,l=p(),i=Math.abs(o.x+o.width-l.x),d=.5*i;c.value.style.height=`calc(100% - ${a+n}px)`;let b=`M ${o.x+o.width} ${r.value+o.y+.5*o.height} C ${o.x+o.width+d} ${r.value+o.y+.5*o.height}, ${l.x-d} ${l.y+s.value}, ${l.x} ${l.y+s.value}`;return b}function p(){let e=b(i.value.element);return e}function b(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top}}function u(e){a.value=e,m()}function m(){null==l.value&&g();let e=l.value,t=a.value.map(t=>({x:t.x+e.x,y:t.y+e.y,width:t.width,height:t.height}));o.value=t}function g(){let e=document.querySelector(".gjs-frame");l.value=b(e),m()}function f(e){i.value=e}return t({updateElementsPositions:u,updateIframePosition:g,onBindingOvered:f}),(e,t)=>(Object(n["G"])(),Object(n["j"])("div",{ref_key:"bindingsConnectorsContainer",ref:c,class:"bindingsConnectorsContainer"},[(Object(n["G"])(),Object(n["j"])("svg",Po,[(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(o.value,e=>(Object(n["G"])(),Object(n["j"])("rect",{key:e.id,x:e.x,y:e.y+r.value,width:e.width,height:e.height,style:{fill:"transparent","stroke-width":"3",stroke:"#0099ff"}},null,8,So))),128)),(Object(n["G"])(!0),Object(n["j"])(n["a"],null,Object(n["M"])(o.value,e=>(Object(n["G"])(),Object(n["j"])("path",{key:e.id,d:d(e),stroke:"#0099ff","stroke-width":"2",fill:"transparent"},null,8,To))),128))]))],512))}};a("e7ba");const Ao=A()(Lo,[["__scopeId","data-v-704c43b8"]]);var Uo=Ao;const Io=e=>(Object(n["J"])("data-v-46c931ab"),e=e(),Object(n["H"])(),e),Eo={key:0,class:"notProUI"},Ro=Io(()=>Object(n["k"])("br",null,null,-1)),Mo=Io(()=>Object(n["k"])("br",null,null,-1)),No=Io(()=>Object(n["k"])("br",null,null,-1)),Go={key:1},Bo={style:{position:"relative",width:"280px"}},Ho={class:"flex flex-col items-center justify-center p-6",style:{padding:"0px"}},qo={class:"mb-4 w-full max-w-xl"},Fo={key:0,class:""},zo={class:"text-red-600",style:{"margin-top":"-15px"}},Vo={class:"terms",style:{"margin-top":"10px"}};var $o={__name:"AiHelpPanel",props:["appData"],setup(e){const t=Object(n["f"])(()=>y.IS_PRO),a=Object(n["L"])(""),o=Object(n["L"])(null);function l(){window.showUpgradeLicenseDialog(!1)}const i=async()=>{""!==a.value.trim()?(window.parent.postMessage({command:"openAiDocs",query:a.value},"*"),a.value="",o.value=null):o.value="Please enter a question."};function r(e){console.log("aiCodePanel :: openLink: ",e),window.parent.postMessage({command:"openLink",url:e,name:"Genie Builder Docs"},"*")}return(e,s)=>{const c=Object(n["O"])("vscode-button");return Object(n["G"])(),Object(n["j"])("div",null,[t.value?Object(n["i"])("",!0):(Object(n["G"])(),Object(n["j"])("div",Eo,[Object(n["l"])(" AI Help is a Pro feature."),Ro,Object(n["l"])(" Upgrade to Pro and start using it now!"),Mo,Object(n["l"])(),No,Object(n["m"])(c,{onClick:l,style:{"margin-right":"3px"}},{default:Object(n["bb"])(()=>[Object(n["l"])("Upgrade")]),_:1})])),t.value?(Object(n["G"])(),Object(n["j"])("div",Go,[Object(n["k"])("div",Bo,[Object(n["k"])("div",Ho,[Object(n["k"])("div",qo,[Object(n["cb"])(Object(n["k"])("textarea",{rows:"2","onUpdate:modelValue":s[0]||(s[0]=e=>a.value=e),placeholder:"Ask AI for help on how to use Genie",class:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"},null,512),[[n["Y"],a.value]])]),o.value?(Object(n["G"])(),Object(n["j"])("div",Fo,[Object(n["k"])("p",zo,Object(n["R"])(o.value),1)])):Object(n["i"])("",!0),Object(n["m"])(c,{onClick:i,style:{width:"100px !important"}},{default:Object(n["bb"])(()=>[Object(n["l"])("Ask AI")]),_:1}),Object(n["k"])("div",Vo,[Object(n["l"])(" Use of the AI features implies acceptance of the Genie AI "),Object(n["k"])("span",{onClick:s[1]||(s[1]=e=>r(Object(n["U"])(y).TERMS_OF_USE_URL)),style:{"text-decoration":"underline"}},"terms of use"),Object(n["l"])(". AI results can be incorrect. ")])])])])):Object(n["i"])("",!0)])}}};a("7aac");const Wo=A()($o,[["__scopeId","data-v-46c931ab"]]);var Jo=Wo;const Qo=e=>(Object(n["J"])("data-v-69ff92f5"),e=e(),Object(n["H"])(),e),Yo={key:0,class:"notProUI"},Xo=Qo(()=>Object(n["k"])("br",null,null,-1)),Zo=Qo(()=>Object(n["k"])("br",null,null,-1)),Ko=Qo(()=>Object(n["k"])("br",null,null,-1)),el={key:1},tl={key:0,class:"nothingSelected"},al=Qo(()=>Object(n["k"])("i",null,"Nothing selected",-1)),nl=[al],ol={key:1,style:{position:"relative"}},ll={class:"flex flex-col items-center justify-center p-6",style:{padding:"0px"}},il={class:"mb-4 w-full max-w-xl"},rl=["disabled"],sl={key:0,class:""},cl={class:"text-red-600",style:{"margin-top":"-15px"}},dl={class:"terms",style:{"margin-top":"10px"}};var pl={__name:"AiCodePanel",props:["appData","selectedComponent"],emits:["aiCodeChanged"],setup(e,{expose:t,emit:a}){const o=Object(n["f"])(()=>y.IS_PRO);let l=Object(n["L"])(null),i=Object(n["L"])(""),s=Object(n["L"])(!1),c=y.ask_ai_url+"codegen",d=Object(n["L"])({});function p(e){l.value=e}function b(){window.showUpgradeLicenseDialog(!1)}function u(e,t){const a=t.match(/#[^\{]+\{[^\}]+\}/g),n={};a&&a.forEach(e=>{const t=e.split("{"),a=t[0].trim().substring(1),o=t[1].trim().slice(0,-1);n[a]=o});const o=new DOMParser,l=o.parseFromString(`${e}`,"text/html");return Object.keys(n).forEach(e=>{const t=l.getElementById(e);t&&(t.style.cssText+=n[e])}),l.body.innerHTML}function m(e){window.parent.postMessage({command:"openLink",url:e},"*")}function g(e,t,n){const o=new DOMParser,l=new XMLSerializer,p=o.parseFromString(e,"text/html"),b={};p.querySelectorAll("plotly").forEach(e=>{t.forEach(t=>{if(e.hasAttribute(t)){const a=e.id;b[a]||(b[a]={}),b[a][t]=e.getAttribute(t)}})});let m=u(e,editor.getCss());a("aiCodeChanged","loading"),s.value=!0,r["a"].post(c,{content_type:"html",sessionid:y.SESSIONID,prompt:d.value.userPrompt,code:m}).then(e=>{s.value=!1;let t=JSON.parse(e.request.response);if(t.error)d.value.aiError=t.error,a("aiCodeChanged","hidden");else{s.value=!1,i.value="";let e=t.response,o=new DOMParser;const r=o.parseFromString(e,"text/html");Object.keys(b).forEach(e=>{const t=r.getElementById(e);t&&Object.entries(b[e]).forEach(([e,a])=>{t.setAttribute(e,a)})});let c,p=l.serializeToString(r.body);try{c=Le.cleanHtml(p)}catch(n){d.value.aiError=n.message,a("aiCodeChanged","hidden")}const u=o.parseFromString(c,"text/html"),m=u.body||null;Le.encodeAttributesInDOM(m);const g=m.innerHTML;d.value.aiApiResponse=g,window.lastHtmlBeforeAiReplace=editor.getHtml(),"gbTemplateContainer"==editor.getSelected().attributes.attributes.id?editor.getSelected().components(g):editor.getSelected().replaceWith(g),a("aiCodeChanged","ready")}}).catch(e=>{s.value=!1,d.value.aiError=e.message,a("aiCodeChanged","hidden")})}function f(){let e=l.value,t=e.toHTML(),a=editor.getCss({component:e,keepUnusedStyles:!1,avoidProtected:!0}),n=appData.value.pages[y.currentPageIndex].model.fields.map(e=>{let t={name:e.name,type:e.type};return null!=e.columns&&(t.columns=e.columns.map(e=>e)),t});n=JSON.stringify(n,null,4);let o=`\nUser Request: ${i.value}\n\nInstructions for AI:\n1. Layout: Utilize DIV elements with "row" and "st-col col-x col-sm st-module" classes for creating a responsive layout. The layout should be divided into the sections described above. For columns, ("col-x"), "x" is a number between 1 and 12. \n2. Components: Wherever possible, employ Quasar 1 components for UI elements. For date selection, use 'q-date' instead of standard HTML input components. Refer to the supported components list provided below.\n3. never nest a "row" directly as a child of a "row" or a "col" directly as a child of a "col".\n4. For 'q-table' elements, bind data using only "DataTable" or Array types, never DataFrames.\n5. Data Binding: Properly assign data to UI components, ensuring mandatory attributes like 'v-model' are used for input components such as textfields, select, and checkbox. \n6. Rules:\n - Avoid using '