@budibase/server 2.0.30-alpha.1 → 2.0.30-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builder/assets/{index.6b96a8ec.js → index.bd6c0866.js} +2 -2
- package/builder/index.html +1 -1
- package/coverage/clover.xml +8 -8
- package/coverage/coverage-final.json +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +1 -1
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +7 -7
- package/coverage/lcov-report/utilities/plugins.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/coverage/lcov.info +13 -13
- package/dist/api/controllers/query/index.js +1 -0
- package/dist/integrations/rest.js +2 -6
- package/dist/package.json +6 -6
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/api/controllers/query/index.ts +1 -0
- package/src/integrations/rest.ts +2 -6
- package/src/integrations/tests/rest.spec.ts +29 -13
|
@@ -932,7 +932,7 @@ Use Save As... to download, then click back to return to this page.`)&&(location
|
|
|
932
932
|
`),t=J("i"),i=oe(r),a=oe("?"),o=oe(`
|
|
933
933
|
This action cannot be undone.`)},m(l,s){S(l,e,s),S(l,t,s),x(t,i),x(t,a),S(l,o,s)},p(l,s){s&1&&r!==(r=l[0].name+"")&&_t(i,r)},d(l){l&&C(e),l&&C(t),l&&C(o)}}}function znt(n){let e,t,r,i,a,o;e=new Lc({props:{$$slots:{control:[wnt],default:[$nt]},$$scope:{ctx:n}}});let l={okText:"Delete Automation",onOk:n[3],title:"Confirm Deletion",$$slots:{default:[knt]},$$scope:{ctx:n}};r=new Is({props:l}),n[5](r);let s={automation:n[0]};return a=new vnt({props:s}),n[6](a),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment)},m(u,c){H(e,u,c),S(u,t,c),H(r,u,c),S(u,i,c),H(a,u,c),o=!0},p(u,[c]){const f={};c&518&&(f.$$scope={dirty:c,ctx:u}),e.$set(f);const h={};c&513&&(h.$$scope={dirty:c,ctx:u}),r.$set(h);const m={};c&1&&(m.automation=u[0]),a.$set(m)},i(u){o||(b(e.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),o=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),$(a.$$.fragment,u),o=!1},d(u){B(e,u),u&&C(t),n[5](null),B(r,u),u&&C(i),n[6](null),B(a,u)}}}function Ant(n,e,t){let r,i;Ne(n,Or,h=>t(7,r=h)),Ne(n,si,h=>t(8,i=h));let{automation:a}=e,o,l;async function s(){try{await Or.actions.delete(a),yt.success("Automation deleted successfully"),i("../automate")}catch{yt.error("Error deleting automation")}}async function u(){try{await Or.actions.duplicate(a),yt.success("Automation has been duplicated successfully"),i(`./${r.selectedAutomation.automation._id}`)}catch{yt.error("Error duplicating automation")}}function c(h){He[h?"unshift":"push"](()=>{o=h,t(1,o)})}function f(h){He[h?"unshift":"push"](()=>{l=h,t(2,l)})}return n.$$set=h=>{"automation"in h&&t(0,a=h.automation)},[a,o,l,s,u,c,f]}class Mnt extends Re{constructor(e){super(),Ve(this,e,Ant,znt,Oe,{automation:0})}}function XR(n,e,t){const r=n.slice();return r[5]=e[t],r[7]=t,r}function Cnt(n){let e,t,r;return e=new Mnt({props:{automation:n[5]}}),{c(){O(e.$$.fragment),t=U()},m(i,a){H(e,i,a),S(i,t,a),r=!0},p(i,a){const o={};a&1&&(o.automation=i[5]),e.$set(o)},i(i){r||(b(e.$$.fragment,i),r=!0)},o(i){$(e.$$.fragment,i),r=!1},d(i){B(e,i),i&&C(t)}}}function JR(n){let e,t;function r(){return n[3](n[5])}return e=new A5({props:{border:n[7]>0,icon:"ShareAndroid",text:n[5].name,selected:n[5]._id===n[1],$$slots:{default:[Cnt]},$$scope:{ctx:n}}}),e.$on("click",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a&1&&(o.text=n[5].name),a&3&&(o.selected=n[5]._id===n[1]),a&257&&(o.$$scope={dirty:a,ctx:n}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Snt(n){let e,t,r=n[0].automations.sort(ZR),i=[];for(let o=0;o<r.length;o+=1)i[o]=JR(XR(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","automations-list svelte-g64vb")},m(o,l){S(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,[l]){if(l&7){r=o[0].automations.sort(ZR);let s;for(s=0;s<r.length;s+=1){const u=XR(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=JR(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&C(e),Dn(i,o)}}}const ZR=n=>n.name;function Lnt(n,e,t){let r,i,a;Ne(n,si,s=>t(4,i=s)),Ne(n,Or,s=>t(0,a=s)),ar(async()=>{try{await Or.actions.fetch()}catch{yt.error("Error getting automations list")}});function o(s){Or.actions.select(s),i(`./${s._id}`)}const l=s=>o(s);return n.$$.update=()=>{var s,u;n.$$.dirty&1&&t(1,r=(u=(s=a.selectedAutomation)==null?void 0:s.automation)==null?void 0:u._id)},[a,r,o,l]}class Ent extends Re{constructor(e){super(),Ve(this,e,Lnt,Snt,Oe,{})}}function QR(n,e,t){const r=n.slice();return r[17]=e[t][0],r[18]=e[t][1],r}function Tnt(n){let e;return{c(){e=oe(`Please name your automation, then select a trigger. Every automation must
|
|
934
934
|
start with a trigger.`)},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Dnt(n){let e;return{c(){e=oe("Triggers")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Hnt(n){let e=n[18].name+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i&8&&e!==(e=r[18].name+"")&&_t(t,e)},d(r){r&&C(t)}}}function eN(n){let e,t,r,i,a,o,l,s,u,c;r=new dn({props:{name:n[18].icon}}),o=new xt({props:{size:"S",$$slots:{default:[Hnt]},$$scope:{ctx:n}}});function f(){return n[13](n[18])}return{c(){e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),a=J("span"),O(o.$$.fragment),l=U(),D(a,"class","icon-spacing svelte-d3iboa"),D(t,"class","item-body svelte-d3iboa"),D(e,"class","item svelte-d3iboa"),De(e,"selected",n[2]===n[18].name)},m(h,m){S(h,e,m),x(e,t),H(r,t,null),x(t,i),x(t,a),H(o,a,null),x(e,l),s=!0,u||(c=At(e,"click",f),u=!0)},p(h,m){n=h;const _={};m&8&&(_.name=n[18].icon),r.$set(_);const y={};m&2097160&&(y.$$scope={dirty:m,ctx:n}),o.$set(y),m&12&&De(e,"selected",n[2]===n[18].name)},i(h){s||(b(r.$$.fragment,h),b(o.$$.fragment,h),s=!0)},o(h){$(r.$$.fragment,h),$(o.$$.fragment,h),s=!1},d(h){h&&C(e),B(r),B(o),u=!1,c()}}}function Bnt(n){let e,t,r,i;e=new xt({props:{size:"S",$$slots:{default:[Dnt]},$$scope:{ctx:n}}});let a=n[3],o=[];for(let s=0;s<a.length;s+=1)o[s]=eN(QR(n,a,s));const l=s=>$(o[s],1,1,()=>{o[s]=null});return{c(){O(e.$$.fragment),t=U(),r=J("div");for(let s=0;s<o.length;s+=1)o[s].c();D(r,"class","item-list svelte-d3iboa")},m(s,u){H(e,s,u),S(s,t,u),S(s,r,u);for(let c=0;c<o.length;c+=1)o[c].m(r,null);i=!0},p(s,u){const c={};if(u&2097152&&(c.$$scope={dirty:u,ctx:s}),e.$set(c),u&76){a=s[3];let f;for(f=0;f<a.length;f+=1){const h=QR(s,a,f);o[f]?(o[f].p(h,u),b(o[f],1)):(o[f]=eN(h),o[f].c(),b(o[f],1),o[f].m(r,null))}for(we(),f=a.length;f<o.length;f+=1)l(f);ke()}},i(s){if(!i){b(e.$$.fragment,s);for(let u=0;u<a.length;u+=1)b(o[u]);i=!0}},o(s){$(e.$$.fragment,s),o=o.filter(Boolean);for(let u=0;u<o.length;u+=1)$(o[u]);i=!1},d(s){B(e,s),s&&C(t),s&&C(r),Dn(o,s)}}}function Ont(n){let e,t,r,i,a,o,l,s,u,c;e=new m_({props:{header:"You must publish your app to activate your automations.",message:"To test your automation before publishing, you can use the 'Run Test' functionality on the next screen."}}),r=new xt({props:{size:"XS",$$slots:{default:[Tnt]},$$scope:{ctx:n}}});function f(_){n[10](_)}function h(_){n[11](_)}let m={label:"Name"};return n[0]!==void 0&&(m.value=n[0]),n[4]!==void 0&&(m.error=n[4]),a=new En({props:m}),He.push(()=>nt(a,"value",f)),He.push(()=>nt(a,"error",h)),a.$on("change",n[12]),u=new Rt({props:{noPadding:!0,$$slots:{default:[Bnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment),s=U(),O(u.$$.fragment)},m(_,y){H(e,_,y),S(_,t,y),H(r,_,y),S(_,i,y),H(a,_,y),S(_,s,y),H(u,_,y),c=!0},p(_,y){const w={};y&2097152&&(w.$$scope={dirty:y,ctx:_}),r.$set(w);const A={};!o&&y&1&&(o=!0,A.value=_[0],rt(()=>o=!1)),!l&&y&16&&(l=!0,A.error=_[4],rt(()=>l=!1)),a.$set(A);const E={};y&2097164&&(E.$$scope={dirty:y,ctx:_}),u.$set(E)},i(_){c||(b(e.$$.fragment,_),b(r.$$.fragment,_),b(a.$$.fragment,_),b(u.$$.fragment,_),c=!0)},o(_){$(e.$$.fragment,_),$(r.$$.fragment,_),$(a.$$.fragment,_),$(u.$$.fragment,_),c=!1},d(_){B(e,_),_&&C(t),B(r,_),_&&C(i),B(a,_),_&&C(s),B(u,_)}}}function Int(n){let e,t;return e=new _r({props:{title:"Create Automation",confirmText:"Save",size:"M",onConfirm:n[5],disabled:!n[2]||!n[0],$$slots:{default:[Ont]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&5&&(a.disabled=!r[2]||!r[0]),i&2097183&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Pnt(n,e,t){let r,i,a,o,l,s;Ne(n,Or,I=>t(8,o=I)),Ne(n,si,I=>t(16,l=I)),Ne(n,xd,I=>t(9,s=I));let u,c,f=!1,h,{webhookModal:m}=e;async function _(){var I;try{await Or.actions.create({name:u,instanceId:r});const P=o.selectedAutomation.constructBlock("TRIGGER",h.stepId,h);Or.actions.addBlockToAutomation(P),h.stepId===f6.WEBHOOK&&m.show,await Or.actions.save((I=o.selectedAutomation)==null?void 0:I.automation),yt.success(`Automation ${u} created`),l(`./${o.selectedAutomation.automation._id}`)}catch{yt.error("Error creating automation")}}const y=I=>{h=I,t(2,c=I.name)};function w(I){u=I,t(0,u)}function A(I){i=I,t(4,i),t(1,f),t(0,u)}const E=()=>t(1,f=!0),T=I=>y(I);return n.$$set=I=>{"webhookModal"in I&&t(7,m=I.webhookModal)},n.$$.update=()=>{n.$$.dirty&512&&(r=s._id),n.$$.dirty&3&&t(4,i=f&&!u?"Please specify a name for the automation.":null),n.$$.dirty&256&&t(3,a=Object.entries(o.blockDefinitions.TRIGGER))},[u,f,c,a,i,_,y,m,o,s,w,A,E,T]}class PX extends Re{constructor(e){super(),Ve(this,e,Pnt,Int,Oe,{webhookModal:7})}}function Vnt(n){let e,t;return e=new PX({props:{webhookModal:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2&&(a.webhookModal=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Rnt(n){let e,t,r,i;e=new Ent({});let a={$$slots:{default:[Vnt]},$$scope:{ctx:n}};return r=new ir({props:a}),n[2](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),S(o,t,l),H(r,o,l),i=!0},p(o,l){const s={};l&10&&(s.$$scope={dirty:l,ctx:o}),r.$set(s)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&C(t),n[2](null),B(r,o)}}}function Nnt(n){let e,t;return e=new x1({props:{title:"Automations",$$slots:{default:[Rnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&11&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Fnt(n){let e,t,r,i,a,o;return t=new K2({props:{selected:"Automations",$$slots:{default:[Nnt]},$$scope:{ctx:n}}}),a=new dn({props:{hoverable:!0,name:"AddCircle"}}),a.$on("click",function(){kn(n[0].show)&&n[0].show.apply(this,arguments)}),{c(){e=J("div"),O(t.$$.fragment),r=U(),i=J("div"),O(a.$$.fragment),D(i,"class","add-button svelte-mcmub4"),D(e,"class","title svelte-mcmub4")},m(l,s){S(l,e,s),H(t,e,null),x(e,r),x(e,i),H(a,i,null),o=!0},p(l,[s]){n=l;const u={};s&11&&(u.$$scope={dirty:s,ctx:n}),t.$set(u)},i(l){o||(b(t.$$.fragment,l),b(a.$$.fragment,l),o=!0)},o(l){$(t.$$.fragment,l),$(a.$$.fragment,l),o=!1},d(l){l&&C(e),B(t),B(a)}}}function xnt(n,e,t){let{modal:r}=e,{webhookModal:i}=e;function a(o){He[o?"unshift":"push"](()=>{r=o,t(0,r)})}return n.$$set=o=>{"modal"in o&&t(0,r=o.modal),"webhookModal"in o&&t(1,i=o.webhookModal)},[r,i,a]}class jnt extends Re{constructor(e){super(),Ve(this,e,xnt,Fnt,Oe,{modal:0,webhookModal:1})}}function tN(n,e,t){const r=n.slice();return r[8]=e[t],r[10]=t,r}function nN(n){var u;let e,t,r,i,a;function o(c){n[6](c)}let l={showTestStatus:!0,block:n[8],isTrigger:n[10]===0,testResult:(u=n[2])==null?void 0:u[n[10]]};n[3]!==void 0&&(l.showParameters=n[3]),e=new IX({props:l}),He.push(()=>nt(e,"showParameters",o));let s=n[3]&&n[3][n[8].id]&&rN(n);return{c(){O(e.$$.fragment),r=U(),s&&s.c(),i=$t()},m(c,f){H(e,c,f),S(c,r,f),s&&s.m(c,f),S(c,i,f),a=!0},p(c,f){var m;const h={};f&2&&(h.block=c[8]),f&4&&(h.testResult=(m=c[2])==null?void 0:m[c[10]]),!t&&f&8&&(t=!0,h.showParameters=c[3],rt(()=>t=!1)),e.$set(h),c[3]&&c[3][c[8].id]?s?(s.p(c,f),f&10&&b(s,1)):(s=rN(c),s.c(),b(s,1),s.m(i.parentNode,i)):s&&(we(),$(s,1,1,()=>{s=null}),ke())},i(c){a||(b(e.$$.fragment,c),b(s),a=!0)},o(c){$(e.$$.fragment,c),$(s),a=!1},d(c){B(e,c),c&&C(r),s&&s.d(c),c&&C(i)}}}function rN(n){var s,u;let e,t,r,i,a,o;e=new hi({props:{noMargin:!0}});let l=((u=(s=n[2])==null?void 0:s[n[10]])==null?void 0:u.outputs.iterations)&&iN(n);return a=new K2({props:{noHorizPadding:!0,selected:"Input",$$slots:{default:[Gnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),l&&l.c(),r=U(),i=J("div"),O(a.$$.fragment),D(i,"class","tabs svelte-1iblsnb")},m(c,f){H(e,c,f),S(c,t,f),l&&l.m(c,f),S(c,r,f),S(c,i,f),H(a,i,null),o=!0},p(c,f){var m,_;(_=(m=c[2])==null?void 0:m[c[10]])!=null&&_.outputs.iterations?l?(l.p(c,f),f&4&&b(l,1)):(l=iN(c),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(we(),$(l,1,1,()=>{l=null}),ke());const h={};f&2052&&(h.$$scope={dirty:f,ctx:c}),a.$set(h)},i(c){o||(b(e.$$.fragment,c),b(l),b(a.$$.fragment,c),o=!0)},o(c){$(e.$$.fragment,c),$(l),$(a.$$.fragment,c),o=!1},d(c){B(e,c),c&&C(t),l&&l.d(c),c&&C(r),c&&C(i),B(a)}}}function iN(n){let e,t,r,i,a,o;return t=new dn({props:{name:"Reuse"}}),a=new cn({props:{$$slots:{default:[Unt]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),r=U(),i=J("div"),O(a.$$.fragment),yn(i,"margin-left","10px"),yn(e,"display","flex"),yn(e,"padding","10px 10px 0px 12px")},m(l,s){S(l,e,s),H(t,e,null),x(e,r),x(e,i),H(a,i,null),o=!0},p(l,s){const u={};s&2052&&(u.$$scope={dirty:s,ctx:l}),a.$set(u)},i(l){o||(b(t.$$.fragment,l),b(a.$$.fragment,l),o=!0)},o(l){$(t.$$.fragment,l),$(a.$$.fragment,l),o=!1},d(l){l&&C(e),B(t),B(a)}}}function Unt(n){var a,o;let e,t=((o=(a=n[2])==null?void 0:a[n[10]])==null?void 0:o.outputs.iterations)+"",r,i;return{c(){e=oe("This loop ran "),r=oe(t),i=oe(" times.")},m(l,s){S(l,e,s),S(l,r,s),S(l,i,s)},p(l,s){var u,c;s&4&&t!==(t=((c=(u=l[2])==null?void 0:u[l[10]])==null?void 0:c.outputs.iterations)+"")&&_t(r,t)},d(l){l&&C(e),l&&C(r),l&&C(i)}}}function qnt(n){var r,i;let e,t;return e=new F3({props:{minHeight:"80px",disabled:!0,value:Xv((i=(r=n[2])==null?void 0:r[n[10]])==null?void 0:i.inputs,"No input")}}),{c(){O(e.$$.fragment)},m(a,o){H(e,a,o),t=!0},p(a,o){var s,u;const l={};o&4&&(l.value=Xv((u=(s=a[2])==null?void 0:s[a[10]])==null?void 0:u.inputs,"No input")),e.$set(l)},i(a){t||(b(e.$$.fragment,a),t=!0)},o(a){$(e.$$.fragment,a),t=!1},d(a){B(e,a)}}}function Wnt(n){var r,i;let e,t;return e=new F3({props:{minHeight:"100px",disabled:!0,value:Xv((i=(r=n[2])==null?void 0:r[n[10]])==null?void 0:i.outputs,"No output")}}),{c(){O(e.$$.fragment)},m(a,o){H(e,a,o),t=!0},p(a,o){var s,u;const l={};o&4&&(l.value=Xv((u=(s=a[2])==null?void 0:s[a[10]])==null?void 0:u.outputs,"No output")),e.$set(l)},i(a){t||(b(e.$$.fragment,a),t=!0)},o(a){$(e.$$.fragment,a),t=!1},d(a){B(e,a)}}}function Gnt(n){let e,t,r,i;return e=new x1({props:{title:"Input",$$slots:{default:[qnt]},$$scope:{ctx:n}}}),r=new x1({props:{title:"Output",$$slots:{default:[Wnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&2052&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&2052&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function aN(n){let e;return{c(){e=J("div"),D(e,"class","separator svelte-1iblsnb")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function oN(n){let e,t,r,i,a,o=n[8].stepId!==V3.LOOP&&nN(n),l=n[1].length-1!==n[10]&&aN();return{c(){e=J("div"),o&&o.c(),r=U(),l&&l.c(),i=$t(),D(e,"class","block svelte-1iblsnb"),D(e,"style",t=n[0]?`width: ${n[0]}`:"")},m(s,u){S(s,e,u),o&&o.m(e,null),S(s,r,u),l&&l.m(s,u),S(s,i,u),a=!0},p(s,u){s[8].stepId!==V3.LOOP?o?(o.p(s,u),u&2&&b(o,1)):(o=nN(s),o.c(),b(o,1),o.m(e,null)):o&&(we(),$(o,1,1,()=>{o=null}),ke()),(!a||u&1&&t!==(t=s[0]?`width: ${s[0]}`:""))&&D(e,"style",t),s[1].length-1!==s[10]?l||(l=aN(),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null)},i(s){a||(b(o),a=!0)},o(s){$(o),a=!1},d(s){s&&C(e),o&&o.d(),s&&C(r),l&&l.d(s),s&&C(i)}}}function Ynt(n){let e,t,r=n[1],i=[];for(let o=0;o<r.length;o+=1)i[o]=oN(tN(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","container svelte-1iblsnb")},m(o,l){S(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,[l]){if(l&15){r=o[1];let s;for(s=0;s<r.length;s+=1){const u=tN(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=oN(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&C(e),Dn(i,o)}}}function Xv(n,e){return n?JSON.stringify(n,null,2):e}function Knt(n,e,t){let r,{automation:i}=e,{testResults:a}=e,{width:o="400px"}=e,l,s;function u(f){return f==null?void 0:f.steps.filter(h=>h.stepId!==V3.LOOP||[])}function c(f){l=f,t(3,l)}return n.$$set=f=>{"automation"in f&&t(4,i=f.automation),"testResults"in f&&t(5,a=f.testResults),"width"in f&&t(0,o=f.width)},n.$$.update=()=>{if(n.$$.dirty&32&&t(2,r=u(a)),n.$$.dirty&22){if(t(1,s=[]),i)i.definition.trigger&&s.push(i.definition.trigger),t(1,s=s.concat(i.definition.steps||[]).filter(f=>f.stepId!==V3.LOOP));else if(r){t(1,s=r||[]);let f=0;for(let h of s)h.id=f++}}},[o,s,r,l,i,a,c]}class VX extends Re{constructor(e){super(),Ve(this,e,Knt,Ynt,Oe,{automation:4,testResults:5,width:0})}}function Xnt(n){let e,t,r,i,a,o,l,s,u,c,f,h,m;return r=new dn({props:{name:"MultipleCheck"}}),s=new dn({props:{hoverable:!0,name:"Close"}}),s.$on("click",n[4]),c=new hi({}),h=new VX({props:{automation:n[0],testResults:n[2]}}),{c(){e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),a=J("div"),a.textContent="Test Details",o=U(),l=J("div"),O(s.$$.fragment),u=U(),O(c.$$.fragment),f=U(),O(h.$$.fragment),yn(a,"padding-left","var(--spacing-l)"),D(t,"class","title-text svelte-nwwj95"),yn(l,"padding-right","var(--spacing-xl)"),D(e,"class","title svelte-nwwj95")},m(_,y){S(_,e,y),x(e,t),H(r,t,null),x(t,i),x(t,a),x(e,o),x(e,l),H(s,l,null),S(_,u,y),H(c,_,y),S(_,f,y),H(h,_,y),m=!0},p(_,[y]){const w={};y&1&&(w.automation=_[0]),y&4&&(w.testResults=_[2]),h.$set(w)},i(_){m||(b(r.$$.fragment,_),b(s.$$.fragment,_),b(c.$$.fragment,_),b(h.$$.fragment,_),m=!0)},o(_){$(r.$$.fragment,_),$(s.$$.fragment,_),$(c.$$.fragment,_),$(h.$$.fragment,_),m=!1},d(_){_&&C(e),B(r),B(s),_&&C(u),B(c,_),_&&C(f),B(h,_)}}}function Jnt(n,e,t){let r;Ne(n,Or,s=>t(1,r=s));let{automation:i}=e,a,o;const l=async()=>{Y1(Or,r.showTestPanel=!1,r)};return n.$$set=s=>{"automation"in s&&t(0,i=s.automation)},n.$$.update=()=>{var s;n.$$.dirty&11&&(t(3,a=[]),i?(i.definition.trigger&&a.push(i.definition.trigger),t(3,a=a.concat(i.definition.steps||[]).filter(u=>u.stepId!==V3.LOOP))):r.selectedAutomation&&t(0,i=r.selectedAutomation)),n.$$.dirty&2&&t(2,o=(s=r.selectedAutomation)==null?void 0:s.testResults)},[i,r,o,a,l]}class Znt extends Re{constructor(e){super(),Ve(this,e,Jnt,Xnt,Oe,{automation:0})}}function Qnt(n){let e,t,r,i;return r=new Rt({props:{gap:"S",justifyItems:"center",$$slots:{default:[irt]},$$scope:{ctx:n}}}),{c(){e=J("div"),t=J("div"),O(r.$$.fragment),D(t,"class","main svelte-374m3f"),D(e,"class","centered svelte-374m3f")},m(a,o){S(a,e,o),x(e,t),H(r,t,null),i=!0},p(a,o){const l={};o&258&&(l.$$scope={dirty:o,ctx:a}),r.$set(l)},i(a){i||(b(r.$$.fragment,a),i=!0)},o(a){$(r.$$.fragment,a),i=!1},d(a){a&&C(e),B(r)}}}function ert(n){let e;const t=n[4].default,r=Xn(t,n,n[8],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&256)&&Zn(r,t,i,i[8],e?Jn(t,i[8],a,null):Qn(i[8]),null)},i(i){e||(b(r,i),e=!0)},o(i){$(r,i),e=!1},d(i){r&&r.d(i)}}}function trt(n){let e;return{c(){e=oe("You have no automations")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function nrt(n){let e;return{c(){e=oe("Let's fix that. Call the bots!")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function rrt(n){let e;return{c(){e=oe("Create automation")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function irt(n){let e,t,r,i,a,o,l,s,u;return i=new Rn({props:{size:"M",$$slots:{default:[trt]},$$scope:{ctx:n}}}),o=new xt({props:{size:"M",$$slots:{default:[nrt]},$$scope:{ctx:n}}}),s=new $n({props:{size:"M",cta:!0,$$slots:{default:[rrt]},$$scope:{ctx:n}}}),s.$on("click",n[5]),{c(){e=lt("svg"),t=lt("use"),r=U(),O(i.$$.fragment),a=U(),O(o.$$.fragment),l=U(),O(s.$$.fragment),Wr(t,"xlink:href","#spectrum-icon-18-WorkflowAdd"),D(e,"width","60px"),D(e,"height","60px"),D(e,"class","spectrum-Icon"),D(e,"focusable","false")},m(c,f){S(c,e,f),x(e,t),S(c,r,f),H(i,c,f),S(c,a,f),H(o,c,f),S(c,l,f),H(s,c,f),u=!0},p(c,f){const h={};f&256&&(h.$$scope={dirty:f,ctx:c}),i.$set(h);const m={};f&256&&(m.$$scope={dirty:f,ctx:c}),o.$set(m);const _={};f&256&&(_.$$scope={dirty:f,ctx:c}),s.$set(_)},i(c){u||(b(i.$$.fragment,c),b(o.$$.fragment,c),b(s.$$.fragment,c),u=!0)},o(c){$(i.$$.fragment,c),$(o.$$.fragment,c),$(s.$$.fragment,c),u=!1},d(c){c&&C(e),c&&C(r),B(i,c),c&&C(a),B(o,c),c&&C(l),B(s,c)}}}function lN(n){let e,t,r;return t=new Znt({props:{automation:n[3]}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","setup svelte-374m3f")},m(i,a){S(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&8&&(o.automation=i[3]),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&C(e),B(t)}}}function art(n){let e,t;return e=new PX({props:{webhookModal:n[2]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4&&(a.webhookModal=r[2]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function ort(n){let e,t;return e=new Xz({}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function lrt(n){let e,t,r,i,a,o,l,s,u,c,f,h,m;r=new jnt({props:{modal:n[1],webhookModal:n[2]}});const _=[ert,Qnt],y=[];function w(I,P){return I[3]?0:1}o=w(n),l=y[o]=_[o](n);let A=n[0].showTestPanel&&lN(n),E={$$slots:{default:[art]},$$scope:{ctx:n}};c=new ir({props:E}),n[6](c);let T={width:"30%",$$slots:{default:[ort]},$$scope:{ctx:n}};return h=new ir({props:T}),n[7](h),{c(){e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),a=J("div"),l.c(),s=U(),A&&A.c(),u=U(),O(c.$$.fragment),f=U(),O(h.$$.fragment),D(t,"class","nav svelte-374m3f"),D(a,"class","content svelte-374m3f"),D(e,"class","root svelte-374m3f")},m(I,P){S(I,e,P),x(e,t),H(r,t,null),x(e,i),x(e,a),y[o].m(a,null),x(e,s),A&&A.m(e,null),x(e,u),H(c,e,null),x(e,f),H(h,e,null),m=!0},p(I,[P]){const F={};P&2&&(F.modal=I[1]),P&4&&(F.webhookModal=I[2]),r.$set(F);let j=o;o=w(I),o===j?y[o].p(I,P):(we(),$(y[j],1,1,()=>{y[j]=null}),ke(),l=y[o],l?l.p(I,P):(l=y[o]=_[o](I),l.c()),b(l,1),l.m(a,null)),I[0].showTestPanel?A?(A.p(I,P),P&1&&b(A,1)):(A=lN(I),A.c(),b(A,1),A.m(e,u)):A&&(we(),$(A,1,1,()=>{A=null}),ke());const q={};P&260&&(q.$$scope={dirty:P,ctx:I}),c.$set(q);const G={};P&256&&(G.$$scope={dirty:P,ctx:I}),h.$set(G)},i(I){m||(b(r.$$.fragment,I),b(l),b(A),b(c.$$.fragment,I),b(h.$$.fragment,I),m=!0)},o(I){$(r.$$.fragment,I),$(l),$(A),$(c.$$.fragment,I),$(h.$$.fragment,I),m=!1},d(I){I&&C(e),B(r),y[o].d(),A&&A.d(),n[6](null),B(c),n[7](null),B(h)}}}function srt(n,e,t){let r,i;Ne(n,Or,h=>t(0,i=h));let{$$slots:a={},$$scope:o}=e,l,s;ar(()=>{Y1(Or,i.showTestPanel=!1,i)});const u=()=>l.show();function c(h){He[h?"unshift":"push"](()=>{l=h,t(1,l)})}function f(h){He[h?"unshift":"push"](()=>{s=h,t(2,s)})}return n.$$set=h=>{"$$scope"in h&&t(8,o=h.$$scope)},n.$$.update=()=>{var h;n.$$.dirty&1&&t(3,r=((h=i.selectedAutomation)==null?void 0:h.automation)||i.automations[0])},[i,l,s,r,a,u,c,f,o]}class urt extends Re{constructor(e){super(),Ve(this,e,srt,lrt,Oe,{})}}function crt(n){let e,t,r,i,a,o,l;function s(c){n[4](c)}let u={};return n[2]!==void 0&&(u.value=n[2]),a=new En({props:u}),He.push(()=>nt(a,"value",s)),{c(){e=J("span"),e.textContent=`The changes you have made will be deleted and the application reverted
|
|
935
|
-
back to its production state.`,t=U(),r=J("span"),r.textContent="Please enter your app name to continue.",i=U(),O(a.$$.fragment)},m(c,f){S(c,e,f),S(c,t,f),S(c,r,f),S(c,i,f),H(a,c,f),l=!0},p(c,f){const h={};!o&&f&4&&(o=!0,h.value=c[2],rt(()=>o=!1)),a.$set(h)},i(c){l||(b(a.$$.fragment,c),l=!0)},o(c){$(a.$$.fragment,c),l=!1},d(c){c&&C(e),c&&C(t),c&&C(r),c&&C(i),B(a,c)}}}function frt(n){let e,t;return e=new _r({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:n[3],disabled:n[2]!==n[0].name,$$slots:{default:[crt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&5&&(a.disabled=r[2]!==r[0].name),i&132&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function prt(n){let e,t,r,i;e=new dn({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){kn(n[1].show)&&n[1].show.apply(this,arguments)});let a={$$slots:{default:[frt]},$$scope:{ctx:n}};return r=new ir({props:a}),n[5](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),S(o,t,l),H(r,o,l),i=!0},p(o,[l]){n=o;const s={};l&133&&(s.$$scope={dirty:l,ctx:n}),r.$set(s)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&C(t),n[5](null),B(r,o)}}}function drt(n,e,t){let r,i;Ne(n,Zt,c=>t(0,i=c));let a,o;const l=async()=>{try{await nn.revertAppChanges(r);const c=await nn.fetchAppPackage(r);await Zt.actions.initialise(c),yt.info("Changes reverted successfully")}catch(c){yt.error(`Error reverting changes: ${c}`)}};function s(c){o=c,t(2,o)}function u(c){He[c?"unshift":"push"](()=>{a=c,t(1,a)})}return n.$$.update=()=>{n.$$.dirty&1&&(r=i.appId)},[i,a,o,l,s,u]}class hrt extends Re{constructor(e){super(),Ve(this,e,drt,prt,Oe,{})}}const mrt="@budibase/client",grt="2.0.30-alpha.
|
|
935
|
+
back to its production state.`,t=U(),r=J("span"),r.textContent="Please enter your app name to continue.",i=U(),O(a.$$.fragment)},m(c,f){S(c,e,f),S(c,t,f),S(c,r,f),S(c,i,f),H(a,c,f),l=!0},p(c,f){const h={};!o&&f&4&&(o=!0,h.value=c[2],rt(()=>o=!1)),a.$set(h)},i(c){l||(b(a.$$.fragment,c),l=!0)},o(c){$(a.$$.fragment,c),l=!1},d(c){c&&C(e),c&&C(t),c&&C(r),c&&C(i),B(a,c)}}}function frt(n){let e,t;return e=new _r({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:n[3],disabled:n[2]!==n[0].name,$$slots:{default:[crt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&5&&(a.disabled=r[2]!==r[0].name),i&132&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function prt(n){let e,t,r,i;e=new dn({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){kn(n[1].show)&&n[1].show.apply(this,arguments)});let a={$$slots:{default:[frt]},$$scope:{ctx:n}};return r=new ir({props:a}),n[5](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),S(o,t,l),H(r,o,l),i=!0},p(o,[l]){n=o;const s={};l&133&&(s.$$scope={dirty:l,ctx:n}),r.$set(s)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&C(t),n[5](null),B(r,o)}}}function drt(n,e,t){let r,i;Ne(n,Zt,c=>t(0,i=c));let a,o;const l=async()=>{try{await nn.revertAppChanges(r);const c=await nn.fetchAppPackage(r);await Zt.actions.initialise(c),yt.info("Changes reverted successfully")}catch(c){yt.error(`Error reverting changes: ${c}`)}};function s(c){o=c,t(2,o)}function u(c){He[c?"unshift":"push"](()=>{a=c,t(1,a)})}return n.$$.update=()=>{n.$$.dirty&1&&(r=i.appId)},[i,a,o,l,s,u]}class hrt extends Re{constructor(e){super(),Ve(this,e,drt,prt,Oe,{})}}const mrt="@budibase/client",grt="2.0.30-alpha.2",vrt="MPL-2.0",_rt="dist/budibase-client.js",brt="dist/budibase-client.js",yrt="module",$rt="src/index.js",wrt={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},krt={build:"rollup -c","dev:builder":"rollup -cw"},zrt={"@budibase/bbui":"2.0.30-alpha.2","@budibase/frontend-core":"2.0.30-alpha.2","@budibase/string-templates":"2.0.30-alpha.2","@spectrum-css/button":"^3.0.3","@spectrum-css/card":"^3.0.3","@spectrum-css/divider":"^1.0.3","@spectrum-css/link":"^3.1.3","@spectrum-css/page":"^3.0.1","@spectrum-css/tag":"^3.1.4","@spectrum-css/typography":"^3.0.2","@spectrum-css/vars":"^3.0.1",apexcharts:"^3.22.1",dayjs:"^1.10.5",downloadjs:"1.4.7",leaflet:"^1.7.1",regexparam:"^1.3.0","sanitize-html":"^2.7.0",screenfull:"^6.0.1",shortid:"^2.2.15","socket.io-client":"^4.5.1",svelte:"^3.49.0","svelte-apexcharts":"^1.0.2","svelte-flatpickr":"^3.1.0","svelte-spa-router":"^3.0.5"},Art={"@rollup/plugin-alias":"^3.1.5","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-node-resolve":"^11.2.1",postcss:"^8.2.10",rollup:"^2.44.0","rollup-plugin-json":"^4.0.0","rollup-plugin-polyfill-node":"^0.8.0","rollup-plugin-postcss":"^4.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-svg":"^2.0.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-visualizer":"^5.5.4"},Mrt="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",Td={name:mrt,version:grt,license:vrt,module:_rt,main:brt,type:yrt,svelte:$rt,exports:wrt,scripts:krt,dependencies:zrt,devDependencies:Art,gitHead:Mrt};function sN(n){let e,t;return e=new x3({props:{hoverable:!0,notice:!0,$$slots:{default:[Crt]},$$scope:{ctx:n}}}),e.$on("click",function(){kn(n[2].show)&&n[2].show.apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r;const a={};i&4096&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Crt(n){let e;return{c(){e=oe("Update available")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Srt(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[Ert]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4098&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Lrt(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[Trt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4098&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Ert(n){let e,t,r=n[1].version+"",i,a;return{c(){e=oe("This app is currently using version "),t=J("b"),i=oe(r),a=oe(` which is the
|
|
936
936
|
latest version available.`)},m(o,l){S(o,e,l),S(o,t,l),x(t,i),S(o,a,l)},p(o,l){l&2&&r!==(r=o[1].version+"")&&_t(i,r)},d(o){o&&C(e),o&&C(t),o&&C(a)}}}function Trt(n){let e,t,r=n[1].version+"",i,a,o,l;return{c(){e=oe("This app is currently using version "),t=J("b"),i=oe(r),a=oe(`, but version
|
|
937
937
|
`),o=J("b"),o.textContent=`${Td.version}`,l=oe(` is available. Updates can contain new features,
|
|
938
938
|
performance improvements and bug fixes.`)},m(s,u){S(s,e,u),S(s,t,u),x(t,i),S(s,a,u),S(s,o,u),S(s,l,u)},p(s,u){u&2&&r!==(r=s[1].version+"")&&_t(i,r)},d(s){s&&C(e),s&&C(t),s&&C(a),s&&C(o),s&&C(l)}}}function uN(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[Drt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4098&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Drt(n){let e,t,r=n[1].revertableVersion+"",i,a;return{c(){e=oe(`You can revert this app to version
|
|
@@ -1000,7 +1000,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1000
1000
|
latest features, security updates and much more.`)},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function qgt(n){let e,t,r,i;return e=new Rn({props:{size:"M",$$slots:{default:[jgt]},$$scope:{ctx:n}}}),r=new xt({props:{$$slots:{default:[Ugt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&64&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&64&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function Wj(n){let e,t,r,i,a;return t=new cn({props:{size:"L",$$slots:{default:[Wgt]},$$scope:{ctx:n}}}),i=new Rn({props:{size:"XS",$$slots:{default:[Ggt]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment)},m(o,l){S(o,e,l),H(t,e,null),x(e,r),H(i,e,null),a=!0},p(o,l){const s={};l&64&&(s.$$scope={dirty:l,ctx:o}),t.$set(s);const u={};l&66&&(u.$$scope={dirty:l,ctx:o}),i.$set(u)},i(o){a||(b(t.$$.fragment,o),b(i.$$.fragment,o),a=!0)},o(o){$(t.$$.fragment,o),$(i.$$.fragment,o),a=!1},d(o){o&&C(e),B(t),B(i)}}}function Wgt(n){let e;return{c(){e=oe("Current version")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Ggt(n){let e;return{c(){e=oe(n[1])},m(t,r){S(t,e,r)},p(t,r){r&2&&_t(e,t[1])},d(t){t&&C(e)}}}function Ygt(n){let e;return{c(){e=oe("Check for updates")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Kgt(n){let e,t,r,i,a,o,l,s;e=new Rt({props:{gap:"XS",noPadding:!0,$$slots:{default:[qgt]},$$scope:{ctx:n}}}),r=new hi({});let u=n[1]&&Wj(n);return l=new $n({props:{cta:!0,$$slots:{default:[Ygt]},$$scope:{ctx:n}}}),l.$on("click",n[2]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),u&&u.c(),a=U(),o=J("div"),O(l.$$.fragment)},m(c,f){H(e,c,f),S(c,t,f),H(r,c,f),S(c,i,f),u&&u.m(c,f),S(c,a,f),S(c,o,f),H(l,o,null),s=!0},p(c,f){const h={};f&64&&(h.$$scope={dirty:f,ctx:c}),e.$set(h),c[1]?u?(u.p(c,f),f&2&&b(u,1)):(u=Wj(c),u.c(),b(u,1),u.m(a.parentNode,a)):u&&(we(),$(u,1,1,()=>{u=null}),ke());const m={};f&64&&(m.$$scope={dirty:f,ctx:c}),l.$set(m)},i(c){s||(b(e.$$.fragment,c),b(r.$$.fragment,c),b(u),b(l.$$.fragment,c),s=!0)},o(c){$(e.$$.fragment,c),$(r.$$.fragment,c),$(u),$(l.$$.fragment,c),s=!1},d(c){B(e,c),c&&C(t),B(r,c),c&&C(i),u&&u.d(c),c&&C(a),c&&C(o),B(l)}}}function Xgt(n){let e,t,r=n[0].isAdmin&&qj(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),S(i,e,a),t=!0},p(i,[a]){i[0].isAdmin?r?(r.p(i,a),a&1&&b(r,1)):(r=qj(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&C(e)}}}function Jgt(n,e,t){let r,i,a;Ne(n,ca,u=>t(3,r=u)),Ne(n,Pi,u=>t(4,i=u)),Ne(n,fr,u=>t(0,a=u));let o;async function l(){try{yt.info("Updating budibase.."),await fetch("/v1/update",{headers:{Authorization:"Bearer budibase"}}),yt.success("Your budibase installation is up to date."),s()}catch(u){yt.error(`Error installing budibase update ${u}`)}}async function s(){try{t(1,o=await nn.getBudibaseVersion())}catch{yt.error("Error getting Budibase version"),t(1,o=null)}}return ar(()=>{s()}),n.$$.update=()=>{n.$$.dirty&25&&(!a.isAdmin||i.cloud)&&r("../../portal")},[a,o,l,r,i]}class Zgt extends Re{constructor(e){super(),Ve(this,e,Jgt,Xgt,Oe,{})}}function Qgt(n){let e;return{c(){e=oe("Are you sure you want to delete this license key?")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function e7t(n){let e;return{c(){e=oe("This license key cannot be re-activated.")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function t7t(n){let e,t,r,i;return e=new xt({props:{size:"S",$$slots:{default:[Qgt]},$$scope:{ctx:n}}}),r=new xt({props:{size:"S",$$slots:{default:[e7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&32&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&32&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function n7t(n){let e,t;return e=new _r({props:{title:"Confirm deletion",size:"S",showCancelButton:!0,confirmText:"Confirm",onConfirm:n[0],$$slots:{default:[t7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&1&&(a.onConfirm=r[0]),i&32&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function r7t(n){let e,t,r={$$slots:{default:[n7t]},$$scope:{ctx:n}};return e=new ir({props:r}),n[4](e),e.$on("hide",function(){kn(n[1])&&n[1].apply(this,arguments)}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,[a]){n=i;const o={};a&33&&(o.$$scope={dirty:a,ctx:n}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){n[4](null),B(e,i)}}}function i7t(n,e,t){let r,{onConfirm:i}=e;function a(){r.show()}function o(){r.hide()}function l(s){He[s?"unshift":"push"](()=>{r=s,t(1,r)})}return n.$$set=s=>{"onConfirm"in s&&t(0,i=s.onConfirm)},[i,r,a,o,l]}class a7t extends Re{constructor(e){super(),Ve(this,e,i7t,r7t,Oe,{onConfirm:0,show:2,hide:3})}get show(){return this.$$.ctx[2]}get hide(){return this.$$.ctx[3]}}function Gj(n){let e,t,r,i,a={onConfirm:n[10]};return e=new a7t({props:a}),n[14](e),r=new Rt({props:{noPadding:!0,$$slots:{default:[C7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),S(o,t,l),H(r,o,l),i=!0},p(o,l){const s={};e.$set(s);const u={};l&262647&&(u.$$scope={dirty:l,ctx:o}),r.$set(u)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){n[14](null),B(e,o),o&&C(t),B(r,o)}}}function o7t(n){let e;return{c(){e=oe("Upgrade")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function l7t(n){let e,t,r,i;return t=new j3({props:{size:"L",href:n[7],$$slots:{default:[u7t]},$$scope:{ctx:n}}}),{c(){e=oe(`To manage your plan visit your
|
|
1001
1001
|
`),O(t.$$.fragment),r=oe(".")},m(a,o){S(a,e,o),H(t,a,o),S(a,r,o),i=!0},p(a,o){const l={};o&128&&(l.href=a[7]),o&262144&&(l.$$scope={dirty:o,ctx:a}),t.$set(l)},i(a){i||(b(t.$$.fragment,a),i=!0)},o(a){$(t.$$.fragment,a),i=!1},d(a){a&&C(e),B(t,a),a&&C(r)}}}function s7t(n){let e,t,r,i;return t=new j3({props:{size:"L",href:n[7],$$slots:{default:[c7t]},$$scope:{ctx:n}}}),{c(){e=oe(`Upgrade your Budibase installation to unlock additional features. To
|
|
1002
1002
|
subscribe to a plan visit your
|
|
1003
|
-
`),O(t.$$.fragment),r=oe(".")},m(a,o){S(a,e,o),H(t,a,o),S(a,r,o),i=!0},p(a,o){const l={};o&128&&(l.href=a[7]),o&262144&&(l.$$scope={dirty:o,ctx:a}),t.$set(l)},i(a){i||(b(t.$$.fragment,a),i=!0)},o(a){$(t.$$.fragment,a),i=!1},d(a){a&&C(e),B(t,a),a&&C(r)}}}function u7t(n){let e;return{c(){e=oe("Account")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function c7t(n){let e;return{c(){e=oe("Account")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function f7t(n){let e,t,r,i;const a=[s7t,l7t],o=[];function l(s,u){return s[8].plan.type==="free"?0:1}return e=l(n),t=o[e]=a[e](n),{c(){t.c(),r=$t()},m(s,u){o[e].m(s,u),S(s,r,u),i=!0},p(s,u){let c=e;e=l(s),e===c?o[e].p(s,u):(we(),$(o[c],1,1,()=>{o[c]=null}),ke(),t=o[e],t?t.p(s,u):(t=o[e]=a[e](s),t.c()),b(t,1),t.m(r.parentNode,r))},i(s){i||(b(t),i=!0)},o(s){$(t),i=!1},d(s){o[e].d(s),s&&C(r)}}}function p7t(n){let e,t,r,i;return e=new Rn({props:{size:"M",$$slots:{default:[o7t]},$$scope:{ctx:n}}}),r=new xt({props:{size:"M",$$slots:{default:[f7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&262144&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&262528&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function d7t(n){let e;return{c(){e=oe("Activate")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function h7t(n){let e;return{c(){e=oe("Enter your license key below to activate your plan")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function m7t(n){let e,t,r,i;return e=new Rn({props:{size:"S",$$slots:{default:[d7t]},$$scope:{ctx:n}}}),r=new xt({props:{size:"S",$$slots:{default:[h7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&262144&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&262144&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function g7t(n){let e;return{c(){e=oe("License key")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function v7t(n){let e;return{c(){e=oe("Activate")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Yj(n){let e,t;return e=new $n({props:{warning:!0,$$slots:{default:[_7t]},$$scope:{ctx:n}}}),e.$on("click",n[16]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&262144&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function _7t(n){let e;return{c(){e=oe("Delete")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function b7t(n){var A;let e,t,r,i,a,o,l,s,u,c,f,h,m;r=new cn({props:{size:"L",$$slots:{default:[g7t]},$$scope:{ctx:n}}});function _(E){n[15](E)}let y={thin:!0,type:n[4],disabled:n[1]};n[2]!==void 0&&(y.value=n[2]),a=new En({props:y}),He.push(()=>nt(a,"value",_)),c=new $n({props:{cta:!0,disabled:n[6],$$slots:{default:[v7t]},$$scope:{ctx:n}}}),c.$on("click",n[9]);let w=((A=n[0])==null?void 0:A.licenseKey)&&Yj(n);return{c(){e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),O(a.$$.fragment),l=U(),s=J("div"),u=J("div"),O(c.$$.fragment),f=U(),h=J("div"),w&&w.c(),D(t,"class","field svelte-dguz3h"),D(e,"class","fields svelte-dguz3h"),D(u,"class","action-button svelte-dguz3h"),D(h,"class","action-button svelte-dguz3h"),D(s,"class","button-container svelte-dguz3h")},m(E,T){S(E,e,T),x(e,t),H(r,t,null),x(t,i),H(a,t,null),S(E,l,T),S(E,s,T),x(s,u),H(c,u,null),x(s,f),x(s,h),w&&w.m(h,null),m=!0},p(E,T){var j;const I={};T&262144&&(I.$$scope={dirty:T,ctx:E}),r.$set(I);const P={};T&16&&(P.type=E[4]),T&2&&(P.disabled=E[1]),!o&&T&4&&(o=!0,P.value=E[2],rt(()=>o=!1)),a.$set(P);const F={};T&64&&(F.disabled=E[6]),T&262144&&(F.$$scope={dirty:T,ctx:E}),c.$set(F),(j=E[0])!=null&&j.licenseKey?w?(w.p(E,T),T&1&&b(w,1)):(w=Yj(E),w.c(),b(w,1),w.m(h,null)):w&&(we(),$(w,1,1,()=>{w=null}),ke())},i(E){m||(b(r.$$.fragment,E),b(a.$$.fragment,E),b(c.$$.fragment,E),b(w),m=!0)},o(E){$(r.$$.fragment,E),$(a.$$.fragment,E),$(c.$$.fragment,E),$(w),m=!1},d(E){E&&C(e),B(r),B(a),E&&C(l),E&&C(s),B(c),w&&w.d()}}}function y7t(n){let e;return{c(){e=oe("Plan")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function $7t(n){let e,t=n[8].plan.type+"",r,i;return{c(){e=oe("You are currently on the "),r=oe(t),i=oe(" plan")},m(a,o){S(a,e,o),S(a,r,o),S(a,i,o)},p(a,o){o&256&&t!==(t=a[8].plan.type+"")&&_t(r,t)},d(a){a&&C(e),a&&C(r),a&&C(i)}}}function w7t(n){let e=d2("Updated {{ duration time 'millisecond' }} ago",{time:new Date().getTime()-new Date(n[8].refreshedAt).getTime()})+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i&256&&e!==(e=d2("Updated {{ duration time 'millisecond' }} ago",{time:new Date().getTime()-new Date(r[8].refreshedAt).getTime()})+"")&&_t(t,e)},d(r){r&&C(t)}}}function k7t(n){let e,t,r,i;return e=new xt({props:{size:"S",$$slots:{default:[$7t]},$$scope:{ctx:n}}}),r=new xt({props:{size:"XS",$$slots:{default:[w7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&262400&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&262400&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function z7t(n){let e,t,r,i;return e=new Rn({props:{size:"S",$$slots:{default:[y7t]},$$scope:{ctx:n}}}),r=new Rt({props:{noPadding:!0,gap:"XXS",$$slots:{default:[k7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&262144&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&262400&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function A7t(n){let e;return{c(){e=oe("Refresh")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function M7t(n){let e,t,r,i,a;return e=new Rt({props:{gap:"S",noPadding:!0,$$slots:{default:[z7t]},$$scope:{ctx:n}}}),i=new $n({props:{secondary:!0,$$slots:{default:[A7t]},$$scope:{ctx:n}}}),i.$on("click",n[11]),{c(){O(e.$$.fragment),t=U(),r=J("div"),O(i.$$.fragment)},m(o,l){H(e,o,l),S(o,t,l),S(o,r,l),H(i,r,null),a=!0},p(o,l){const s={};l&262400&&(s.$$scope={dirty:l,ctx:o}),e.$set(s);const u={};l&262144&&(u.$$scope={dirty:l,ctx:o}),i.$set(u)},i(o){a||(b(e.$$.fragment,o),b(i.$$.fragment,o),a=!0)},o(o){$(e.$$.fragment,o),$(i.$$.fragment,o),a=!1},d(o){B(e,o),o&&C(t),o&&C(r),B(i)}}}function C7t(n){let e,t,r,i,a,o,l,s,u,c,f,h;return e=new Rt({props:{gap:"XS",noPadding:!0,$$slots:{default:[p7t]},$$scope:{ctx:n}}}),r=new hi({}),a=new Rt({props:{gap:"XS",noPadding:!0,$$slots:{default:[m7t]},$$scope:{ctx:n}}}),l=new Rt({props:{noPadding:!0,$$slots:{default:[b7t]},$$scope:{ctx:n}}}),u=new hi({}),f=new Rt({props:{gap:"L",noPadding:!0,$$slots:{default:[M7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment),o=U(),O(l.$$.fragment),s=U(),O(u.$$.fragment),c=U(),O(f.$$.fragment)},m(m,_){H(e,m,_),S(m,t,_),H(r,m,_),S(m,i,_),H(a,m,_),S(m,o,_),H(l,m,_),S(m,s,_),H(u,m,_),S(m,c,_),H(f,m,_),h=!0},p(m,_){const y={};_&262528&&(y.$$scope={dirty:_,ctx:m}),e.$set(y);const w={};_&262144&&(w.$$scope={dirty:_,ctx:m}),a.$set(w);const A={};_&262263&&(A.$$scope={dirty:_,ctx:m}),l.$set(A);const E={};_&262400&&(E.$$scope={dirty:_,ctx:m}),f.$set(E)},i(m){h||(b(e.$$.fragment,m),b(r.$$.fragment,m),b(a.$$.fragment,m),b(l.$$.fragment,m),b(u.$$.fragment,m),b(f.$$.fragment,m),h=!0)},o(m){$(e.$$.fragment,m),$(r.$$.fragment,m),$(a.$$.fragment,m),$(l.$$.fragment,m),$(u.$$.fragment,m),$(f.$$.fragment,m),h=!1},d(m){B(e,m),m&&C(t),B(r,m),m&&C(i),B(a,m),m&&C(o),B(l,m),m&&C(s),B(u,m),m&&C(c),B(f,m)}}}function S7t(n){let e="is adming"+n[3].isAdmin,t,r,i,a,o=n[3].isAdmin&&Gj(n);return{c(){t=oe(e),r=U(),o&&o.c(),i=$t()},m(l,s){S(l,t,s),S(l,r,s),o&&o.m(l,s),S(l,i,s),a=!0},p(l,[s]){(!a||s&8)&&e!==(e="is adming"+l[3].isAdmin)&&_t(t,e),l[3].isAdmin?o?(o.p(l,s),s&8&&b(o,1)):(o=Gj(l),o.c(),b(o,1),o.m(i.parentNode,i)):o&&(we(),$(o,1,1,()=>{o=null}),ke())},i(l){a||(b(o),a=!0)},o(l){$(o),a=!1},d(l){l&&C(t),l&&C(r),o&&o.d(l),l&&C(i)}}}function L7t(n,e,t){let r,i,a,o,l,s;Ne(n,ca,P=>t(12,o=P)),Ne(n,Pi,P=>t(13,l=P)),Ne(n,fr,P=>t(3,s=P));let u,c=!1,f="text",h="",m;const _=async()=>{try{await nn.activateLicenseKey({licenseKey:h}),await fr.getSelf(),await A(),yt.success("Successfully activated")}catch(P){yt.error(P.message)}},y=async()=>{try{await nn.deleteLicenseKey({licenseKey:h}),await fr.getSelf(),await A(),t(2,h=""),t(1,c=!1),yt.success("Successfully deleted")}catch(P){yt.error(P.message)}},w=async()=>{try{await nn.refreshLicense(),await fr.getSelf(),yt.success("Refreshed license")}catch(P){console.error(P),yt.error("Error refreshing license")}},A=async()=>{t(0,u=await nn.getLicenseInfo())};ar(async()=>{await A()});function E(P){He[P?"unshift":"push"](()=>{m=P,t(5,m)})}function T(P){h=P,t(2,h),t(0,u)}const I=()=>m.show();return n.$$.update=()=>{n.$$.dirty&8&&t(8,r=s.user.license),n.$$.dirty&8192&&t(7,i=`${l.accountPortalUrl}/portal/upgrade`),n.$$.dirty&1&&u!=null&&u.licenseKey&&(t(2,h="**********************************************"),t(4,f="password"),t(1,c=!0),t(6,a=!0)),n.$$.dirty&6&&t(6,a=!h||c),n.$$.dirty&12288&&l.cloud&&o("../../portal")},[u,c,h,s,f,m,a,i,r,_,y,w,o,l,E,T,I]}class E7t extends Re{constructor(e){super(),Ve(this,e,L7t,S7t,Oe,{})}}function Kj(n){let e,t;return e=new dn({props:{name:"Alert"}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function T7t(n){let e=n[0].name+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i&1&&e!==(e=r[0].name+"")&&_t(t,e)},d(r){r&&C(t)}}}function D7t(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[B7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2049&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function H7t(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[O7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2049&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function B7t(n){let e=n[0].used+"",t,r,i=n[0].total+"",a;return{c(){t=oe(e),r=oe(" / "),a=oe(i)},m(o,l){S(o,t,l),S(o,r,l),S(o,a,l)},p(o,l){l&1&&e!==(e=o[0].used+"")&&_t(t,e),l&1&&i!==(i=o[0].total+"")&&_t(a,i)},d(o){o&&C(t),o&&C(r),o&&C(a)}}}function O7t(n){let e=n[0].used+"",t,r;return{c(){t=oe(e),r=oe(" / Unlimited")},m(i,a){S(i,t,a),S(i,r,a)},p(i,a){a&1&&e!==(e=i[0].used+"")&&_t(t,e)},d(i){i&&C(t),i&&C(r)}}}function I7t(n){let e,t;return e=new tq({props:{color:n[3]?"red":"green",showPercentage:!1,width:"100%",duration:1,value:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&8&&(a.color=r[3]?"red":"green"),i&2&&(a.value=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function P7t(n){let e,t;return e=new tq({props:{showPercentage:!1,width:"100%",duration:1,value:100}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p:vt,i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Xj(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[F7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2065&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function V7t(n){let e;return{c(){e=oe("contact your account holder")},m(t,r){S(t,e,r)},p:vt,i:vt,o:vt,d(t){t&&C(e)}}}function R7t(n){let e,t;return e=new j3({props:{href:n[5],$$slots:{default:[N7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2048&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function N7t(n){let e;return{c(){e=oe("upgrade your plan")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function F7t(n){let e,t=n[0].name.toLowerCase()+"",r,i,a,o,l,s;const u=[R7t,V7t],c=[];function f(h,m){return h[4]?0:1}return a=f(n),o=c[a]=u[a](n),{c(){e=oe("To get more "),r=oe(t),i=U(),o.c(),l=$t()},m(h,m){S(h,e,m),S(h,r,m),S(h,i,m),c[a].m(h,m),S(h,l,m),s=!0},p(h,m){(!s||m&1)&&t!==(t=h[0].name.toLowerCase()+"")&&_t(r,t);let _=a;a=f(h),a===_?c[a].p(h,m):(we(),$(c[_],1,1,()=>{c[_]=null}),ke(),o=c[a],o?o.p(h,m):(o=c[a]=u[a](h),o.c()),b(o,1),o.m(l.parentNode,l))},i(h){s||(b(o),s=!0)},o(h){$(o),s=!1},d(h){h&&C(e),h&&C(r),h&&C(i),c[a].d(h),h&&C(l)}}}function x7t(n){let e,t,r,i,a,o,l,s,u,c,f,h,m,_,y,w=n[3]&&Kj();o=new Rn({props:{size:"XS",weight:"light",$$slots:{default:[T7t]},$$scope:{ctx:n}}});const A=[H7t,D7t],E=[];function T(q,G){return q[2]?0:1}s=T(n),u=E[s]=A[s](n);const I=[P7t,I7t],P=[];function F(q,G){return q[2]?0:1}h=F(n),m=P[h]=I[h](n);let j=n[3]&&Xj(n);return{c(){e=J("div"),t=J("div"),r=J("div"),w&&w.c(),i=U(),a=J("div"),O(o.$$.fragment),l=U(),u.c(),c=U(),f=J("div"),m.c(),_=U(),j&&j.c(),D(a,"class","heading header-item svelte-1meue99"),D(r,"class","header-container svelte-1meue99"),D(t,"class","info svelte-1meue99"),D(e,"class","usage svelte-1meue99")},m(q,G){S(q,e,G),x(e,t),x(t,r),w&&w.m(r,null),x(r,i),x(r,a),H(o,a,null),x(t,l),E[s].m(t,null),x(e,c),x(e,f),P[h].m(f,null),x(f,_),j&&j.m(f,null),y=!0},p(q,[G]){q[3]?w?G&8&&b(w,1):(w=Kj(),w.c(),b(w,1),w.m(r,i)):w&&(we(),$(w,1,1,()=>{w=null}),ke());const te={};G&2049&&(te.$$scope={dirty:G,ctx:q}),o.$set(te);let ee=s;s=T(q),s===ee?E[s].p(q,G):(we(),$(E[ee],1,1,()=>{E[ee]=null}),ke(),u=E[s],u?u.p(q,G):(u=E[s]=A[s](q),u.c()),b(u,1),u.m(t,null));let le=h;h=F(q),h===le?P[h].p(q,G):(we(),$(P[le],1,1,()=>{P[le]=null}),ke(),m=P[h],m?m.p(q,G):(m=P[h]=I[h](q),m.c()),b(m,1),m.m(f,_)),q[3]?j?(j.p(q,G),G&8&&b(j,1)):(j=Xj(q),j.c(),b(j,1),j.m(f,null)):j&&(we(),$(j,1,1,()=>{j=null}),ke())},i(q){y||(b(w),b(o.$$.fragment,q),b(u),b(m),b(j),y=!0)},o(q){$(w),$(o.$$.fragment,q),$(u),$(m),$(j),y=!1},d(q){q&&C(e),w&&w.d(),B(o),E[s].d(),P[h].d(),j&&j.d()}}}function j7t(n,e,t){let r,i,a;Ne(n,Pi,_=>t(8,i=_)),Ne(n,fr,_=>t(7,a=_));let{usage:o}=e,{warnWhenFull:l=!1}=e,s,u=!1,c=!1;const f=()=>o.total===-1,h=()=>o.used/o.total*100,m=`${i.accountPortalUrl}/portal/upgrade`;return ar(()=>{t(2,u=f()),t(1,s=h()),l&&s===100&&t(3,c=!0)}),n.$$set=_=>{"usage"in _&&t(0,o=_.usage),"warnWhenFull"in _&&t(6,l=_.warnWhenFull)},n.$$.update=()=>{var _;n.$$.dirty&128&&t(4,r=(_=a==null?void 0:a.user)==null?void 0:_.accountPortalAccess)},[o,s,u,c,r,m,l,a]}class wZ extends Re{constructor(e){super(),Ve(this,e,j7t,x7t,Oe,{usage:0,warnWhenFull:6})}}function Jj(n,e,t){const r=n.slice();return r[12]=e[t],r}function U7t(n){let e;return{c(){e=oe(n[0])},m(t,r){S(t,e,r)},p(t,r){r&1&&_t(e,t[0])},d(t){t&&C(e)}}}function q7t(n){let e;return{c(){e=oe(n[1])},m(t,r){S(t,e,r)},p(t,r){r&2&&_t(e,t[1])},d(t){t&&C(e)}}}function Zj(n){let e,t,r=n[7],i=[];for(let o=0;o<r.length;o+=1)i[o]=Qj(Jj(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","text-rows svelte-f7l9r3")},m(o,l){S(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,l){if(l&128){r=o[7];let s;for(s=0;s<r.length;s+=1){const u=Jj(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=Qj(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&C(e),Dn(i,o)}}}function W7t(n){let e,t;return e=new xt({props:{$$slots:{default:[Y7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2176&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function G7t(n){let e,t;return e=new m5({props:{tooltip:n[12].tooltip,$$slots:{default:[X7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&128&&(a.tooltip=r[12].tooltip),i&2176&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Y7t(n){let e=n[12].message+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i&128&&e!==(e=r[12].message+"")&&_t(t,e)},d(r){r&&C(t)}}}function K7t(n){let e=n[12].message+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i&128&&e!==(e=r[12].message+"")&&_t(t,e)},d(r){r&&C(t)}}}function X7t(n){let e,t,r;return e=new xt({props:{$$slots:{default:[K7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U()},m(i,a){H(e,i,a),S(i,t,a),r=!0},p(i,a){const o={};a&2176&&(o.$$scope={dirty:a,ctx:i}),e.$set(o)},i(i){r||(b(e.$$.fragment,i),r=!0)},o(i){$(e.$$.fragment,i),r=!1},d(i){B(e,i),i&&C(t)}}}function Qj(n){let e,t,r,i;const a=[G7t,W7t],o=[];function l(s,u){return s[12].tooltip?0:1}return e=l(n),t=o[e]=a[e](n),{c(){t.c(),r=$t()},m(s,u){o[e].m(s,u),S(s,r,u),i=!0},p(s,u){let c=e;e=l(s),e===c?o[e].p(s,u):(we(),$(o[c],1,1,()=>{o[c]=null}),ke(),t=o[e],t?t.p(s,u):(t=o[e]=a[e](s),t.c()),b(t,1),t.m(r.parentNode,r))},i(s){i||(b(t),i=!0)},o(s){$(t),i=!1},d(s){o[e].d(s),s&&C(r)}}}function J7t(n){let e,t,r,i,a,o,l;t=new Vu({props:{size:"M",$$slots:{default:[U7t]},$$scope:{ctx:n}}}),i=new Rn({props:{size:"M",$$slots:{default:[q7t]},$$scope:{ctx:n}}});let s=n[7].length&&Zj(n);return{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),a=U(),s&&s.c(),o=$t(),D(e,"class","dash-card-title svelte-f7l9r3")},m(u,c){S(u,e,c),H(t,e,null),S(u,r,c),H(i,u,c),S(u,a,c),s&&s.m(u,c),S(u,o,c),l=!0},p(u,c){const f={};c&2049&&(f.$$scope={dirty:c,ctx:u}),t.$set(f);const h={};c&2050&&(h.$$scope={dirty:c,ctx:u}),i.$set(h),u[7].length?s?(s.p(u,c),c&128&&b(s,1)):(s=Zj(u),s.c(),b(s,1),s.m(o.parentNode,o)):s&&(we(),$(s,1,1,()=>{s=null}),ke())},i(u){l||(b(t.$$.fragment,u),b(i.$$.fragment,u),b(s),l=!0)},o(u){$(t.$$.fragment,u),$(i.$$.fragment,u),$(s),l=!1},d(u){u&&C(e),B(t),u&&C(r),B(i,u),u&&C(a),s&&s.d(u),u&&C(o)}}}function eU(n){let e,t,r;return t=new $n({props:{newStyles:!0,secondary:!0,$$slots:{default:[Z7t]},$$scope:{ctx:n}}}),t.$on("click",function(){kn(n[3])&&n[3].apply(this,arguments)}),{c(){e=J("div"),O(t.$$.fragment)},m(i,a){S(i,e,a),H(t,e,null),r=!0},p(i,a){n=i;const o={};a&2080&&(o.$$scope={dirty:a,ctx:n}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&C(e),B(t)}}}function Z7t(n){let e;return{c(){e=oe(n[5])},m(t,r){S(t,e,r)},p(t,r){r&32&&_t(e,t[5])},d(t){t&&C(e)}}}function tU(n){let e,t,r;return t=new $n({props:{cta:n[6],$$slots:{default:[Q7t]},$$scope:{ctx:n}}}),t.$on("click",function(){kn(n[2])&&n[2].apply(this,arguments)}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","primary-button")},m(i,a){S(i,e,a),H(t,e,null),r=!0},p(i,a){n=i;const o={};a&64&&(o.cta=n[6]),a&2064&&(o.$$scope={dirty:a,ctx:n}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&C(e),B(t)}}}function Q7t(n){let e;return{c(){e=oe(n[4])},m(t,r){S(t,e,r)},p(t,r){r&16&&_t(e,t[4])},d(t){t&&C(e)}}}function e9t(n){let e,t,r,i,a,o,l,s,u,c;i=new Rt({props:{gap:"XS",$$slots:{default:[J7t]},$$scope:{ctx:n}}});let f=n[8]&&eU(n),h=n[9]&&tU(n);const m=n[10].default,_=Xn(m,n,n[11],null);return{c(){e=J("div"),t=J("div"),r=J("div"),O(i.$$.fragment),a=U(),o=J("div"),f&&f.c(),l=U(),h&&h.c(),s=U(),u=J("div"),_&&_.c(),D(r,"class","header-info svelte-f7l9r3"),D(o,"class","header-actions svelte-f7l9r3"),D(t,"class","dash-card-header svelte-f7l9r3"),D(u,"class","dash-card-body svelte-f7l9r3"),D(e,"class","dash-card svelte-f7l9r3")},m(y,w){S(y,e,w),x(e,t),x(t,r),H(i,r,null),x(t,a),x(t,o),f&&f.m(o,null),x(o,l),h&&h.m(o,null),x(e,s),x(e,u),_&&_.m(u,null),c=!0},p(y,[w]){const A={};w&2179&&(A.$$scope={dirty:w,ctx:y}),i.$set(A),y[8]?f?(f.p(y,w),w&256&&b(f,1)):(f=eU(y),f.c(),b(f,1),f.m(o,l)):f&&(we(),$(f,1,1,()=>{f=null}),ke()),y[9]?h?(h.p(y,w),w&512&&b(h,1)):(h=tU(y),h.c(),b(h,1),h.m(o,null)):h&&(we(),$(h,1,1,()=>{h=null}),ke()),_&&_.p&&(!c||w&2048)&&Zn(_,m,y,y[11],c?Jn(m,y[11],w,null):Qn(y[11]),null)},i(y){c||(b(i.$$.fragment,y),b(f),b(h),b(_,y),c=!0)},o(y){$(i.$$.fragment,y),$(f),$(h),$(_,y),c=!1},d(y){y&&C(e),B(i),f&&f.d(),h&&h.d(),_&&_.d(y)}}}function t9t(n,e,t){let r,i,{$$slots:a={},$$scope:o}=e,{description:l=""}=e,{title:s=""}=e,{primaryAction:u}=e,{secondaryAction:c}=e,{primaryActionText:f}=e,{secondaryActionText:h}=e,{primaryCta:m=!0}=e,{textRows:_=[]}=e;return n.$$set=y=>{"description"in y&&t(0,l=y.description),"title"in y&&t(1,s=y.title),"primaryAction"in y&&t(2,u=y.primaryAction),"secondaryAction"in y&&t(3,c=y.secondaryAction),"primaryActionText"in y&&t(4,f=y.primaryActionText),"secondaryActionText"in y&&t(5,h=y.secondaryActionText),"primaryCta"in y&&t(6,m=y.primaryCta),"textRows"in y&&t(7,_=y.textRows),"$$scope"in y&&t(11,o=y.$$scope)},n.$$.update=()=>{n.$$.dirty&20&&t(9,r=u&&f),n.$$.dirty&40&&t(8,i=c&&h)},[l,s,u,c,f,h,m,_,i,r,a,o]}class n9t extends Re{constructor(e){super(),Ve(this,e,t9t,e9t,Oe,{description:0,title:1,primaryAction:2,secondaryAction:3,primaryActionText:4,secondaryActionText:5,primaryCta:6,textRows:7})}}function nU(n,e,t){const r=n.slice();return r[29]=e[t],r}function rU(n,e,t){const r=n.slice();return r[29]=e[t],r}function iU(n){let e,t;return e=new Rt({props:{noPadding:!0,$$slots:{default:[_9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&251|i[1]&8&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function r9t(n){let e;return{c(){e=oe("Usage")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function i9t(n){let e;return{c(){e=oe("To upgrade your plan and usage limits contact your account holder.")},m(t,r){S(t,e,r)},p:vt,i:vt,o:vt,d(t){t&&C(e)}}}function a9t(n){let e,t,r;return t=new j3({props:{size:"L",$$slots:{default:[o9t]},$$scope:{ctx:n}}}),t.$on("click",n[10]),{c(){e=oe("To upgrade your plan and usage limits visit your "),O(t.$$.fragment)},m(i,a){S(i,e,a),H(t,i,a),r=!0},p(i,a){const o={};a[1]&8&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&C(e),B(t,i)}}}function o9t(n){let e;return{c(){e=oe("Account")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function l9t(n){let e,t,r,i,a;const o=[a9t,i9t],l=[];function s(u,c){return u[7]?0:1}return t=s(n),r=l[t]=o[t](n),{c(){e=oe(`Get information about your current usage within Budibase.
|
|
1003
|
+
`),O(t.$$.fragment),r=oe(".")},m(a,o){S(a,e,o),H(t,a,o),S(a,r,o),i=!0},p(a,o){const l={};o&128&&(l.href=a[7]),o&262144&&(l.$$scope={dirty:o,ctx:a}),t.$set(l)},i(a){i||(b(t.$$.fragment,a),i=!0)},o(a){$(t.$$.fragment,a),i=!1},d(a){a&&C(e),B(t,a),a&&C(r)}}}function u7t(n){let e;return{c(){e=oe("Account")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function c7t(n){let e;return{c(){e=oe("Account")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function f7t(n){let e,t,r,i;const a=[s7t,l7t],o=[];function l(s,u){return s[8].plan.type==="free"?0:1}return e=l(n),t=o[e]=a[e](n),{c(){t.c(),r=$t()},m(s,u){o[e].m(s,u),S(s,r,u),i=!0},p(s,u){let c=e;e=l(s),e===c?o[e].p(s,u):(we(),$(o[c],1,1,()=>{o[c]=null}),ke(),t=o[e],t?t.p(s,u):(t=o[e]=a[e](s),t.c()),b(t,1),t.m(r.parentNode,r))},i(s){i||(b(t),i=!0)},o(s){$(t),i=!1},d(s){o[e].d(s),s&&C(r)}}}function p7t(n){let e,t,r,i;return e=new Rn({props:{size:"M",$$slots:{default:[o7t]},$$scope:{ctx:n}}}),r=new xt({props:{size:"M",$$slots:{default:[f7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&262144&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&262528&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function d7t(n){let e;return{c(){e=oe("Activate")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function h7t(n){let e;return{c(){e=oe("Enter your license key below to activate your plan")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function m7t(n){let e,t,r,i;return e=new Rn({props:{size:"S",$$slots:{default:[d7t]},$$scope:{ctx:n}}}),r=new xt({props:{size:"S",$$slots:{default:[h7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&262144&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&262144&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function g7t(n){let e;return{c(){e=oe("License key")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function v7t(n){let e;return{c(){e=oe("Activate")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Yj(n){let e,t;return e=new $n({props:{warning:!0,$$slots:{default:[_7t]},$$scope:{ctx:n}}}),e.$on("click",n[16]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&262144&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function _7t(n){let e;return{c(){e=oe("Delete")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function b7t(n){var A;let e,t,r,i,a,o,l,s,u,c,f,h,m;r=new cn({props:{size:"L",$$slots:{default:[g7t]},$$scope:{ctx:n}}});function _(E){n[15](E)}let y={thin:!0,type:n[4],disabled:n[1]};n[2]!==void 0&&(y.value=n[2]),a=new En({props:y}),He.push(()=>nt(a,"value",_)),c=new $n({props:{cta:!0,disabled:n[6],$$slots:{default:[v7t]},$$scope:{ctx:n}}}),c.$on("click",n[9]);let w=((A=n[0])==null?void 0:A.licenseKey)&&Yj(n);return{c(){e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),O(a.$$.fragment),l=U(),s=J("div"),u=J("div"),O(c.$$.fragment),f=U(),h=J("div"),w&&w.c(),D(t,"class","field svelte-dguz3h"),D(e,"class","fields svelte-dguz3h"),D(u,"class","action-button svelte-dguz3h"),D(h,"class","action-button svelte-dguz3h"),D(s,"class","button-container svelte-dguz3h")},m(E,T){S(E,e,T),x(e,t),H(r,t,null),x(t,i),H(a,t,null),S(E,l,T),S(E,s,T),x(s,u),H(c,u,null),x(s,f),x(s,h),w&&w.m(h,null),m=!0},p(E,T){var j;const I={};T&262144&&(I.$$scope={dirty:T,ctx:E}),r.$set(I);const P={};T&16&&(P.type=E[4]),T&2&&(P.disabled=E[1]),!o&&T&4&&(o=!0,P.value=E[2],rt(()=>o=!1)),a.$set(P);const F={};T&64&&(F.disabled=E[6]),T&262144&&(F.$$scope={dirty:T,ctx:E}),c.$set(F),(j=E[0])!=null&&j.licenseKey?w?(w.p(E,T),T&1&&b(w,1)):(w=Yj(E),w.c(),b(w,1),w.m(h,null)):w&&(we(),$(w,1,1,()=>{w=null}),ke())},i(E){m||(b(r.$$.fragment,E),b(a.$$.fragment,E),b(c.$$.fragment,E),b(w),m=!0)},o(E){$(r.$$.fragment,E),$(a.$$.fragment,E),$(c.$$.fragment,E),$(w),m=!1},d(E){E&&C(e),B(r),B(a),E&&C(l),E&&C(s),B(c),w&&w.d()}}}function y7t(n){let e;return{c(){e=oe("Plan")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function $7t(n){let e,t=n[8].plan.type+"",r,i;return{c(){e=oe("You are currently on the "),r=oe(t),i=oe(" plan")},m(a,o){S(a,e,o),S(a,r,o),S(a,i,o)},p(a,o){o&256&&t!==(t=a[8].plan.type+"")&&_t(r,t)},d(a){a&&C(e),a&&C(r),a&&C(i)}}}function w7t(n){let e=d2("Updated {{ duration time 'millisecond' }} ago",{time:new Date().getTime()-new Date(n[8].refreshedAt).getTime()})+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i&256&&e!==(e=d2("Updated {{ duration time 'millisecond' }} ago",{time:new Date().getTime()-new Date(r[8].refreshedAt).getTime()})+"")&&_t(t,e)},d(r){r&&C(t)}}}function k7t(n){let e,t,r,i;return e=new xt({props:{size:"S",$$slots:{default:[$7t]},$$scope:{ctx:n}}}),r=new xt({props:{size:"XS",$$slots:{default:[w7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&262400&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&262400&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function z7t(n){let e,t,r,i;return e=new Rn({props:{size:"S",$$slots:{default:[y7t]},$$scope:{ctx:n}}}),r=new Rt({props:{noPadding:!0,gap:"XXS",$$slots:{default:[k7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&262144&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&262400&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function A7t(n){let e;return{c(){e=oe("Refresh")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function M7t(n){let e,t,r,i,a;return e=new Rt({props:{gap:"S",noPadding:!0,$$slots:{default:[z7t]},$$scope:{ctx:n}}}),i=new $n({props:{secondary:!0,$$slots:{default:[A7t]},$$scope:{ctx:n}}}),i.$on("click",n[11]),{c(){O(e.$$.fragment),t=U(),r=J("div"),O(i.$$.fragment)},m(o,l){H(e,o,l),S(o,t,l),S(o,r,l),H(i,r,null),a=!0},p(o,l){const s={};l&262400&&(s.$$scope={dirty:l,ctx:o}),e.$set(s);const u={};l&262144&&(u.$$scope={dirty:l,ctx:o}),i.$set(u)},i(o){a||(b(e.$$.fragment,o),b(i.$$.fragment,o),a=!0)},o(o){$(e.$$.fragment,o),$(i.$$.fragment,o),a=!1},d(o){B(e,o),o&&C(t),o&&C(r),B(i)}}}function C7t(n){let e,t,r,i,a,o,l,s,u,c,f,h;return e=new Rt({props:{gap:"XS",noPadding:!0,$$slots:{default:[p7t]},$$scope:{ctx:n}}}),r=new hi({}),a=new Rt({props:{gap:"XS",noPadding:!0,$$slots:{default:[m7t]},$$scope:{ctx:n}}}),l=new Rt({props:{noPadding:!0,$$slots:{default:[b7t]},$$scope:{ctx:n}}}),u=new hi({}),f=new Rt({props:{gap:"L",noPadding:!0,$$slots:{default:[M7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment),o=U(),O(l.$$.fragment),s=U(),O(u.$$.fragment),c=U(),O(f.$$.fragment)},m(m,_){H(e,m,_),S(m,t,_),H(r,m,_),S(m,i,_),H(a,m,_),S(m,o,_),H(l,m,_),S(m,s,_),H(u,m,_),S(m,c,_),H(f,m,_),h=!0},p(m,_){const y={};_&262528&&(y.$$scope={dirty:_,ctx:m}),e.$set(y);const w={};_&262144&&(w.$$scope={dirty:_,ctx:m}),a.$set(w);const A={};_&262263&&(A.$$scope={dirty:_,ctx:m}),l.$set(A);const E={};_&262400&&(E.$$scope={dirty:_,ctx:m}),f.$set(E)},i(m){h||(b(e.$$.fragment,m),b(r.$$.fragment,m),b(a.$$.fragment,m),b(l.$$.fragment,m),b(u.$$.fragment,m),b(f.$$.fragment,m),h=!0)},o(m){$(e.$$.fragment,m),$(r.$$.fragment,m),$(a.$$.fragment,m),$(l.$$.fragment,m),$(u.$$.fragment,m),$(f.$$.fragment,m),h=!1},d(m){B(e,m),m&&C(t),B(r,m),m&&C(i),B(a,m),m&&C(o),B(l,m),m&&C(s),B(u,m),m&&C(c),B(f,m)}}}function S7t(n){let e,t,r=n[3].isAdmin&&Gj(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),S(i,e,a),t=!0},p(i,[a]){i[3].isAdmin?r?(r.p(i,a),a&8&&b(r,1)):(r=Gj(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&C(e)}}}function L7t(n,e,t){let r,i,a,o,l,s;Ne(n,ca,P=>t(12,o=P)),Ne(n,Pi,P=>t(13,l=P)),Ne(n,fr,P=>t(3,s=P));let u,c=!1,f="text",h="",m;const _=async()=>{try{await nn.activateLicenseKey({licenseKey:h}),await fr.getSelf(),await A(),yt.success("Successfully activated")}catch(P){yt.error(P.message)}},y=async()=>{try{await nn.deleteLicenseKey({licenseKey:h}),await fr.getSelf(),await A(),t(2,h=""),t(1,c=!1),yt.success("Successfully deleted")}catch(P){yt.error(P.message)}},w=async()=>{try{await nn.refreshLicense(),await fr.getSelf(),yt.success("Refreshed license")}catch(P){console.error(P),yt.error("Error refreshing license")}},A=async()=>{t(0,u=await nn.getLicenseInfo())};ar(async()=>{await A()});function E(P){He[P?"unshift":"push"](()=>{m=P,t(5,m)})}function T(P){h=P,t(2,h),t(0,u)}const I=()=>m.show();return n.$$.update=()=>{n.$$.dirty&8&&t(8,r=s.user.license),n.$$.dirty&8192&&t(7,i=`${l.accountPortalUrl}/portal/upgrade`),n.$$.dirty&1&&u!=null&&u.licenseKey&&(t(2,h="**********************************************"),t(4,f="password"),t(1,c=!0),t(6,a=!0)),n.$$.dirty&6&&t(6,a=!h||c),n.$$.dirty&12288&&l.cloud&&o("../../portal")},[u,c,h,s,f,m,a,i,r,_,y,w,o,l,E,T,I]}class E7t extends Re{constructor(e){super(),Ve(this,e,L7t,S7t,Oe,{})}}function Kj(n){let e,t;return e=new dn({props:{name:"Alert"}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function T7t(n){let e=n[0].name+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i&1&&e!==(e=r[0].name+"")&&_t(t,e)},d(r){r&&C(t)}}}function D7t(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[B7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2049&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function H7t(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[O7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2049&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function B7t(n){let e=n[0].used+"",t,r,i=n[0].total+"",a;return{c(){t=oe(e),r=oe(" / "),a=oe(i)},m(o,l){S(o,t,l),S(o,r,l),S(o,a,l)},p(o,l){l&1&&e!==(e=o[0].used+"")&&_t(t,e),l&1&&i!==(i=o[0].total+"")&&_t(a,i)},d(o){o&&C(t),o&&C(r),o&&C(a)}}}function O7t(n){let e=n[0].used+"",t,r;return{c(){t=oe(e),r=oe(" / Unlimited")},m(i,a){S(i,t,a),S(i,r,a)},p(i,a){a&1&&e!==(e=i[0].used+"")&&_t(t,e)},d(i){i&&C(t),i&&C(r)}}}function I7t(n){let e,t;return e=new tq({props:{color:n[3]?"red":"green",showPercentage:!1,width:"100%",duration:1,value:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&8&&(a.color=r[3]?"red":"green"),i&2&&(a.value=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function P7t(n){let e,t;return e=new tq({props:{showPercentage:!1,width:"100%",duration:1,value:100}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p:vt,i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Xj(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[F7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2065&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function V7t(n){let e;return{c(){e=oe("contact your account holder")},m(t,r){S(t,e,r)},p:vt,i:vt,o:vt,d(t){t&&C(e)}}}function R7t(n){let e,t;return e=new j3({props:{href:n[5],$$slots:{default:[N7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2048&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function N7t(n){let e;return{c(){e=oe("upgrade your plan")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function F7t(n){let e,t=n[0].name.toLowerCase()+"",r,i,a,o,l,s;const u=[R7t,V7t],c=[];function f(h,m){return h[4]?0:1}return a=f(n),o=c[a]=u[a](n),{c(){e=oe("To get more "),r=oe(t),i=U(),o.c(),l=$t()},m(h,m){S(h,e,m),S(h,r,m),S(h,i,m),c[a].m(h,m),S(h,l,m),s=!0},p(h,m){(!s||m&1)&&t!==(t=h[0].name.toLowerCase()+"")&&_t(r,t);let _=a;a=f(h),a===_?c[a].p(h,m):(we(),$(c[_],1,1,()=>{c[_]=null}),ke(),o=c[a],o?o.p(h,m):(o=c[a]=u[a](h),o.c()),b(o,1),o.m(l.parentNode,l))},i(h){s||(b(o),s=!0)},o(h){$(o),s=!1},d(h){h&&C(e),h&&C(r),h&&C(i),c[a].d(h),h&&C(l)}}}function x7t(n){let e,t,r,i,a,o,l,s,u,c,f,h,m,_,y,w=n[3]&&Kj();o=new Rn({props:{size:"XS",weight:"light",$$slots:{default:[T7t]},$$scope:{ctx:n}}});const A=[H7t,D7t],E=[];function T(q,G){return q[2]?0:1}s=T(n),u=E[s]=A[s](n);const I=[P7t,I7t],P=[];function F(q,G){return q[2]?0:1}h=F(n),m=P[h]=I[h](n);let j=n[3]&&Xj(n);return{c(){e=J("div"),t=J("div"),r=J("div"),w&&w.c(),i=U(),a=J("div"),O(o.$$.fragment),l=U(),u.c(),c=U(),f=J("div"),m.c(),_=U(),j&&j.c(),D(a,"class","heading header-item svelte-1meue99"),D(r,"class","header-container svelte-1meue99"),D(t,"class","info svelte-1meue99"),D(e,"class","usage svelte-1meue99")},m(q,G){S(q,e,G),x(e,t),x(t,r),w&&w.m(r,null),x(r,i),x(r,a),H(o,a,null),x(t,l),E[s].m(t,null),x(e,c),x(e,f),P[h].m(f,null),x(f,_),j&&j.m(f,null),y=!0},p(q,[G]){q[3]?w?G&8&&b(w,1):(w=Kj(),w.c(),b(w,1),w.m(r,i)):w&&(we(),$(w,1,1,()=>{w=null}),ke());const te={};G&2049&&(te.$$scope={dirty:G,ctx:q}),o.$set(te);let ee=s;s=T(q),s===ee?E[s].p(q,G):(we(),$(E[ee],1,1,()=>{E[ee]=null}),ke(),u=E[s],u?u.p(q,G):(u=E[s]=A[s](q),u.c()),b(u,1),u.m(t,null));let le=h;h=F(q),h===le?P[h].p(q,G):(we(),$(P[le],1,1,()=>{P[le]=null}),ke(),m=P[h],m?m.p(q,G):(m=P[h]=I[h](q),m.c()),b(m,1),m.m(f,_)),q[3]?j?(j.p(q,G),G&8&&b(j,1)):(j=Xj(q),j.c(),b(j,1),j.m(f,null)):j&&(we(),$(j,1,1,()=>{j=null}),ke())},i(q){y||(b(w),b(o.$$.fragment,q),b(u),b(m),b(j),y=!0)},o(q){$(w),$(o.$$.fragment,q),$(u),$(m),$(j),y=!1},d(q){q&&C(e),w&&w.d(),B(o),E[s].d(),P[h].d(),j&&j.d()}}}function j7t(n,e,t){let r,i,a;Ne(n,Pi,_=>t(8,i=_)),Ne(n,fr,_=>t(7,a=_));let{usage:o}=e,{warnWhenFull:l=!1}=e,s,u=!1,c=!1;const f=()=>o.total===-1,h=()=>o.used/o.total*100,m=`${i.accountPortalUrl}/portal/upgrade`;return ar(()=>{t(2,u=f()),t(1,s=h()),l&&s===100&&t(3,c=!0)}),n.$$set=_=>{"usage"in _&&t(0,o=_.usage),"warnWhenFull"in _&&t(6,l=_.warnWhenFull)},n.$$.update=()=>{var _;n.$$.dirty&128&&t(4,r=(_=a==null?void 0:a.user)==null?void 0:_.accountPortalAccess)},[o,s,u,c,r,m,l,a]}class wZ extends Re{constructor(e){super(),Ve(this,e,j7t,x7t,Oe,{usage:0,warnWhenFull:6})}}function Jj(n,e,t){const r=n.slice();return r[12]=e[t],r}function U7t(n){let e;return{c(){e=oe(n[0])},m(t,r){S(t,e,r)},p(t,r){r&1&&_t(e,t[0])},d(t){t&&C(e)}}}function q7t(n){let e;return{c(){e=oe(n[1])},m(t,r){S(t,e,r)},p(t,r){r&2&&_t(e,t[1])},d(t){t&&C(e)}}}function Zj(n){let e,t,r=n[7],i=[];for(let o=0;o<r.length;o+=1)i[o]=Qj(Jj(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=J("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","text-rows svelte-f7l9r3")},m(o,l){S(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,l){if(l&128){r=o[7];let s;for(s=0;s<r.length;s+=1){const u=Jj(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=Qj(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&C(e),Dn(i,o)}}}function W7t(n){let e,t;return e=new xt({props:{$$slots:{default:[Y7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2176&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function G7t(n){let e,t;return e=new m5({props:{tooltip:n[12].tooltip,$$slots:{default:[X7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&128&&(a.tooltip=r[12].tooltip),i&2176&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Y7t(n){let e=n[12].message+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i&128&&e!==(e=r[12].message+"")&&_t(t,e)},d(r){r&&C(t)}}}function K7t(n){let e=n[12].message+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i&128&&e!==(e=r[12].message+"")&&_t(t,e)},d(r){r&&C(t)}}}function X7t(n){let e,t,r;return e=new xt({props:{$$slots:{default:[K7t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U()},m(i,a){H(e,i,a),S(i,t,a),r=!0},p(i,a){const o={};a&2176&&(o.$$scope={dirty:a,ctx:i}),e.$set(o)},i(i){r||(b(e.$$.fragment,i),r=!0)},o(i){$(e.$$.fragment,i),r=!1},d(i){B(e,i),i&&C(t)}}}function Qj(n){let e,t,r,i;const a=[G7t,W7t],o=[];function l(s,u){return s[12].tooltip?0:1}return e=l(n),t=o[e]=a[e](n),{c(){t.c(),r=$t()},m(s,u){o[e].m(s,u),S(s,r,u),i=!0},p(s,u){let c=e;e=l(s),e===c?o[e].p(s,u):(we(),$(o[c],1,1,()=>{o[c]=null}),ke(),t=o[e],t?t.p(s,u):(t=o[e]=a[e](s),t.c()),b(t,1),t.m(r.parentNode,r))},i(s){i||(b(t),i=!0)},o(s){$(t),i=!1},d(s){o[e].d(s),s&&C(r)}}}function J7t(n){let e,t,r,i,a,o,l;t=new Vu({props:{size:"M",$$slots:{default:[U7t]},$$scope:{ctx:n}}}),i=new Rn({props:{size:"M",$$slots:{default:[q7t]},$$scope:{ctx:n}}});let s=n[7].length&&Zj(n);return{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),a=U(),s&&s.c(),o=$t(),D(e,"class","dash-card-title svelte-f7l9r3")},m(u,c){S(u,e,c),H(t,e,null),S(u,r,c),H(i,u,c),S(u,a,c),s&&s.m(u,c),S(u,o,c),l=!0},p(u,c){const f={};c&2049&&(f.$$scope={dirty:c,ctx:u}),t.$set(f);const h={};c&2050&&(h.$$scope={dirty:c,ctx:u}),i.$set(h),u[7].length?s?(s.p(u,c),c&128&&b(s,1)):(s=Zj(u),s.c(),b(s,1),s.m(o.parentNode,o)):s&&(we(),$(s,1,1,()=>{s=null}),ke())},i(u){l||(b(t.$$.fragment,u),b(i.$$.fragment,u),b(s),l=!0)},o(u){$(t.$$.fragment,u),$(i.$$.fragment,u),$(s),l=!1},d(u){u&&C(e),B(t),u&&C(r),B(i,u),u&&C(a),s&&s.d(u),u&&C(o)}}}function eU(n){let e,t,r;return t=new $n({props:{newStyles:!0,secondary:!0,$$slots:{default:[Z7t]},$$scope:{ctx:n}}}),t.$on("click",function(){kn(n[3])&&n[3].apply(this,arguments)}),{c(){e=J("div"),O(t.$$.fragment)},m(i,a){S(i,e,a),H(t,e,null),r=!0},p(i,a){n=i;const o={};a&2080&&(o.$$scope={dirty:a,ctx:n}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&C(e),B(t)}}}function Z7t(n){let e;return{c(){e=oe(n[5])},m(t,r){S(t,e,r)},p(t,r){r&32&&_t(e,t[5])},d(t){t&&C(e)}}}function tU(n){let e,t,r;return t=new $n({props:{cta:n[6],$$slots:{default:[Q7t]},$$scope:{ctx:n}}}),t.$on("click",function(){kn(n[2])&&n[2].apply(this,arguments)}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","primary-button")},m(i,a){S(i,e,a),H(t,e,null),r=!0},p(i,a){n=i;const o={};a&64&&(o.cta=n[6]),a&2064&&(o.$$scope={dirty:a,ctx:n}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&C(e),B(t)}}}function Q7t(n){let e;return{c(){e=oe(n[4])},m(t,r){S(t,e,r)},p(t,r){r&16&&_t(e,t[4])},d(t){t&&C(e)}}}function e9t(n){let e,t,r,i,a,o,l,s,u,c;i=new Rt({props:{gap:"XS",$$slots:{default:[J7t]},$$scope:{ctx:n}}});let f=n[8]&&eU(n),h=n[9]&&tU(n);const m=n[10].default,_=Xn(m,n,n[11],null);return{c(){e=J("div"),t=J("div"),r=J("div"),O(i.$$.fragment),a=U(),o=J("div"),f&&f.c(),l=U(),h&&h.c(),s=U(),u=J("div"),_&&_.c(),D(r,"class","header-info svelte-f7l9r3"),D(o,"class","header-actions svelte-f7l9r3"),D(t,"class","dash-card-header svelte-f7l9r3"),D(u,"class","dash-card-body svelte-f7l9r3"),D(e,"class","dash-card svelte-f7l9r3")},m(y,w){S(y,e,w),x(e,t),x(t,r),H(i,r,null),x(t,a),x(t,o),f&&f.m(o,null),x(o,l),h&&h.m(o,null),x(e,s),x(e,u),_&&_.m(u,null),c=!0},p(y,[w]){const A={};w&2179&&(A.$$scope={dirty:w,ctx:y}),i.$set(A),y[8]?f?(f.p(y,w),w&256&&b(f,1)):(f=eU(y),f.c(),b(f,1),f.m(o,l)):f&&(we(),$(f,1,1,()=>{f=null}),ke()),y[9]?h?(h.p(y,w),w&512&&b(h,1)):(h=tU(y),h.c(),b(h,1),h.m(o,null)):h&&(we(),$(h,1,1,()=>{h=null}),ke()),_&&_.p&&(!c||w&2048)&&Zn(_,m,y,y[11],c?Jn(m,y[11],w,null):Qn(y[11]),null)},i(y){c||(b(i.$$.fragment,y),b(f),b(h),b(_,y),c=!0)},o(y){$(i.$$.fragment,y),$(f),$(h),$(_,y),c=!1},d(y){y&&C(e),B(i),f&&f.d(),h&&h.d(),_&&_.d(y)}}}function t9t(n,e,t){let r,i,{$$slots:a={},$$scope:o}=e,{description:l=""}=e,{title:s=""}=e,{primaryAction:u}=e,{secondaryAction:c}=e,{primaryActionText:f}=e,{secondaryActionText:h}=e,{primaryCta:m=!0}=e,{textRows:_=[]}=e;return n.$$set=y=>{"description"in y&&t(0,l=y.description),"title"in y&&t(1,s=y.title),"primaryAction"in y&&t(2,u=y.primaryAction),"secondaryAction"in y&&t(3,c=y.secondaryAction),"primaryActionText"in y&&t(4,f=y.primaryActionText),"secondaryActionText"in y&&t(5,h=y.secondaryActionText),"primaryCta"in y&&t(6,m=y.primaryCta),"textRows"in y&&t(7,_=y.textRows),"$$scope"in y&&t(11,o=y.$$scope)},n.$$.update=()=>{n.$$.dirty&20&&t(9,r=u&&f),n.$$.dirty&40&&t(8,i=c&&h)},[l,s,u,c,f,h,m,_,i,r,a,o]}class n9t extends Re{constructor(e){super(),Ve(this,e,t9t,e9t,Oe,{description:0,title:1,primaryAction:2,secondaryAction:3,primaryActionText:4,secondaryActionText:5,primaryCta:6,textRows:7})}}function nU(n,e,t){const r=n.slice();return r[29]=e[t],r}function rU(n,e,t){const r=n.slice();return r[29]=e[t],r}function iU(n){let e,t;return e=new Rt({props:{noPadding:!0,$$slots:{default:[_9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&251|i[1]&8&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function r9t(n){let e;return{c(){e=oe("Usage")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function i9t(n){let e;return{c(){e=oe("To upgrade your plan and usage limits contact your account holder.")},m(t,r){S(t,e,r)},p:vt,i:vt,o:vt,d(t){t&&C(e)}}}function a9t(n){let e,t,r;return t=new j3({props:{size:"L",$$slots:{default:[o9t]},$$scope:{ctx:n}}}),t.$on("click",n[10]),{c(){e=oe("To upgrade your plan and usage limits visit your "),O(t.$$.fragment)},m(i,a){S(i,e,a),H(t,i,a),r=!0},p(i,a){const o={};a[1]&8&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&C(e),B(t,i)}}}function o9t(n){let e;return{c(){e=oe("Account")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function l9t(n){let e,t,r,i,a;const o=[a9t,i9t],l=[];function s(u,c){return u[7]?0:1}return t=s(n),r=l[t]=o[t](n),{c(){e=oe(`Get information about your current usage within Budibase.
|
|
1004
1004
|
`),r.c(),i=$t()},m(u,c){S(u,e,c),l[t].m(u,c),S(u,i,c),a=!0},p(u,c){let f=t;t=s(u),t===f?l[t].p(u,c):(we(),$(l[f],1,1,()=>{l[f]=null}),ke(),r=l[t],r?r.p(u,c):(r=l[t]=o[t](u),r.c()),b(r,1),r.m(i.parentNode,i))},i(u){a||(b(r),a=!0)},o(u){$(r),a=!1},d(u){u&&C(e),l[t].d(u),u&&C(i)}}}function s9t(n){let e,t,r,i;return e=new Rn({props:{$$slots:{default:[r9t]},$$scope:{ctx:n}}}),r=new xt({props:{$$slots:{default:[l9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o[1]&8&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o[0]&128|o[1]&8&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function aU(n){let e,t,r,i;return t=new wZ({props:{usage:n[29],warnWhenFull:n[8].includes(n[29].name)}}),{c(){e=J("div"),O(t.$$.fragment),r=U(),D(e,"class","usage")},m(a,o){S(a,e,o),H(t,e,null),x(e,r),i=!0},p(a,o){const l={};o[0]&1&&(l.usage=a[29]),o[0]&1&&(l.warnWhenFull=a[8].includes(a[29].name)),t.$set(l)},i(a){i||(b(t.$$.fragment,a),i=!0)},o(a){$(t.$$.fragment,a),i=!1},d(a){a&&C(e),B(t)}}}function u9t(n){let e,t,r=n[0],i=[];for(let o=0;o<r.length;o+=1)i[o]=aU(rU(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);S(o,e,l),t=!0},p(o,l){if(l[0]&257){r=o[0];let s;for(s=0;s<r.length;s+=1){const u=rU(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=aU(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&C(e)}}}function c9t(n){let e,t,r;return t=new Rt({props:{noPadding:!0,$$slots:{default:[u9t]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","usages svelte-187x8yf")},m(i,a){S(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a[0]&1|a[1]&8&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&C(e),B(t)}}}function oU(n){let e,t,r;return t=new Rt({props:{gap:"S",$$slots:{default:[m9t]},$$scope:{ctx:n}}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"class","monthly-container")},m(i,a){S(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a[0]&82|a[1]&8&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&C(e),B(t)}}}function f9t(n){let e;return{c(){e=oe("Monthly")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function p9t(n){let e,t,r;return{c(){e=oe("Resets in "),t=oe(n[4]),r=oe(" days")},m(i,a){S(i,e,a),S(i,t,a),S(i,r,a)},p(i,a){a[0]&16&&_t(t,i[4])},d(i){i&&C(e),i&&C(t),i&&C(r)}}}function d9t(n){let e,t;return e=new Vu({props:{size:"M",$$slots:{default:[p9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&16|i[1]&8&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function lU(n){let e,t,r,i;return t=new wZ({props:{usage:n[29],warnWhenFull:n[8].includes(n[29].name)}}),{c(){e=J("div"),O(t.$$.fragment),r=U(),D(e,"class","usage")},m(a,o){S(a,e,o),H(t,e,null),x(e,r),i=!0},p(a,o){const l={};o[0]&2&&(l.usage=a[29]),o[0]&2&&(l.warnWhenFull=a[8].includes(a[29].name)),t.$set(l)},i(a){i||(b(t.$$.fragment,a),i=!0)},o(a){$(t.$$.fragment,a),i=!1},d(a){a&&C(e),B(t)}}}function h9t(n){let e,t,r=n[1],i=[];for(let o=0;o<r.length;o+=1)i[o]=lU(nU(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);S(o,e,l),t=!0},p(o,l){if(l[0]&258){r=o[1];let s;for(s=0;s<r.length;s+=1){const u=nU(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=lU(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&C(e)}}}function m9t(n){let e,t,r,i,a,o,l,s;return e=new Rn({props:{size:"S",weight:"light",$$slots:{default:[f9t]},$$scope:{ctx:n}}}),i=new m5({props:{tooltip:new Date(n[6]),$$slots:{default:[d9t]},$$scope:{ctx:n}}}),l=new Rt({props:{noPadding:!0,$$slots:{default:[h9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),r=J("div"),O(i.$$.fragment),a=U(),o=J("div"),O(l.$$.fragment),D(r,"class","detail svelte-187x8yf"),D(o,"class","usages svelte-187x8yf")},m(u,c){H(e,u,c),S(u,t,c),S(u,r,c),H(i,r,null),S(u,a,c),S(u,o,c),H(l,o,null),s=!0},p(u,c){const f={};c[1]&8&&(f.$$scope={dirty:c,ctx:u}),e.$set(f);const h={};c[0]&64&&(h.tooltip=new Date(u[6])),c[0]&16|c[1]&8&&(h.$$scope={dirty:c,ctx:u}),i.$set(h);const m={};c[0]&2|c[1]&8&&(m.$$scope={dirty:c,ctx:u}),l.$set(m)},i(u){s||(b(e.$$.fragment,u),b(i.$$.fragment,u),b(l.$$.fragment,u),s=!0)},o(u){$(e.$$.fragment,u),$(i.$$.fragment,u),$(l.$$.fragment,u),s=!1},d(u){B(e,u),u&&C(t),u&&C(r),B(i),u&&C(a),u&&C(o),B(l)}}}function g9t(n){let e,t,r,i;e=new Rt({props:{gap:"S",$$slots:{default:[c9t]},$$scope:{ctx:n}}});let a=n[1].length&&oU(n);return{c(){O(e.$$.fragment),t=U(),a&&a.c(),r=$t()},m(o,l){H(e,o,l),S(o,t,l),a&&a.m(o,l),S(o,r,l),i=!0},p(o,l){const s={};l[0]&1|l[1]&8&&(s.$$scope={dirty:l,ctx:o}),e.$set(s),o[1].length?a?(a.p(o,l),l[0]&2&&b(a,1)):(a=oU(o),a.c(),b(a,1),a.m(r.parentNode,r)):a&&(we(),$(a,1,1,()=>{a=null}),ke())},i(o){i||(b(e.$$.fragment,o),b(a),i=!0)},o(o){$(e.$$.fragment,o),$(a),i=!1},d(o){B(e,o),o&&C(t),a&&a.d(o),o&&C(r)}}}function v9t(n){let e,t;return e=new Rt({props:{gap:"S",noPadding:!0,$$slots:{default:[g9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&83|i[1]&8&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function _9t(n){let e,t,r,i,a,o;return e=new Rt({props:{noPadding:!0,gap:"XS",$$slots:{default:[s9t]},$$scope:{ctx:n}}}),r=new hi({}),a=new n9t({props:{description:"YOUR CURRENT PLAN",title:n[9](),primaryActionText:n[5],primaryAction:n[7]?n[10]:void 0,textRows:n[3],$$slots:{default:[v9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment)},m(l,s){H(e,l,s),S(l,t,s),H(r,l,s),S(l,i,s),H(a,l,s),o=!0},p(l,s){const u={};s[0]&128|s[1]&8&&(u.$$scope={dirty:s,ctx:l}),e.$set(u);const c={};s[0]&32&&(c.primaryActionText=l[5]),s[0]&128&&(c.primaryAction=l[7]?l[10]:void 0),s[0]&8&&(c.textRows=l[3]),s[0]&83|s[1]&8&&(c.$$scope={dirty:s,ctx:l}),a.$set(c)},i(l){o||(b(e.$$.fragment,l),b(r.$$.fragment,l),b(a.$$.fragment,l),o=!0)},o(l){$(e.$$.fragment,l),$(r.$$.fragment,l),$(a.$$.fragment,l),o=!1},d(l){B(e,l),l&&C(t),B(r,l),l&&C(i),B(a,l)}}}function b9t(n){let e,t,r=n[2]&&iU(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),S(i,e,a),t=!0},p(i,a){i[2]?r?(r.p(i,a),a[0]&4&&b(r,1)):(r=iU(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&C(e)}}}function y9t(n,e,t){let r,i,a,o,l,s,u;Ne(n,fr,ne=>t(13,l=ne)),Ne(n,ya,ne=>t(14,s=ne)),Ne(n,Pi,ne=>t(16,u=ne));let c=[],f=[],h,m=!1,_=[],y,w;const A=`${u.accountPortalUrl}/portal/upgrade`,E=`${u.accountPortalUrl}/portal/billing`,T=["Queries","Automations","Rows","Day Passes"],I=["Queries"],P=()=>{if(t(1,f=[]),r.monthly)for(let[ne,ue]of Object.entries(i.quotas.usage.monthly)){if(I.includes(ue.name))continue;const pe=r.monthly.current[ne];ue.value!==0&&f.push({name:ue.name,used:pe||0,total:ue.value})}t(1,f=f.sort((ne,ue)=>ne.name.localeCompare(ue.name)))},F=()=>{t(0,c=[]);for(let[ne,ue]of Object.entries(i.quotas.usage.static)){if(I.includes(ue.name))continue;const pe=r.usageQuota[ne];ue.value!==0&&c.push({name:ue.name,used:pe||0,total:ue.value})}t(0,c=c.sort((ne,ue)=>ne.name.localeCompare(ue.name)))},j=()=>{var ne,ue;h=(ue=(ne=i==null?void 0:i.billing)==null?void 0:ne.subscription)==null?void 0:ue.cancelAt},q=ne=>{if(ne)return ne.charAt(0).toUpperCase()+ne.slice(1)},G=()=>q(i==null?void 0:i.plan.type),te=ne=>{if(!ne)return;const ue=new Date;ue.setHours(0),ue.setMinutes(0);const pe=new Date(ne);return pe.setHours(0),pe.setMinutes(0),((pe.getTime()-ue)/(1e3*3600*24)).toFixed(0)},ee=()=>{t(3,_=[]),h&&(_.push({message:"Subscription has been cancelled"}),_.push({message:`${te(h*1e3)} days remaining`,tooltip:new Date(h*1e3)}))},le=()=>{const ne=new Date(o),ue=new Date,pe=ne.getTime()-ue.getTime();t(4,y=(pe/(1e3*3600*24)).toFixed(0))},re=()=>{(i==null?void 0:i.plan.type)===w4.FREE?window.location.href=A:window.location.href=E},K=()=>{if((i==null?void 0:i.plan.type)===w4.FREE){t(5,w="Upgrade");return}h?t(5,w="Renew"):t(5,w="Manage")},W=async()=>{try{await ya.init()}catch(ne){console.error(ne),yt.error(ne)}};return ar(async()=>{await W(),t(2,m=!0)}),n.$$.update=()=>{var ne,ue;n.$$.dirty[0]&16384&&t(11,r=s.quotaUsage),n.$$.dirty[0]&8192&&t(12,i=(ne=l.user)==null?void 0:ne.license),n.$$.dirty[0]&8192&&t(7,a=(ue=l==null?void 0:l.user)==null?void 0:ue.accountPortalAccess),n.$$.dirty[0]&2048&&t(6,o=r==null?void 0:r.quotaReset),n.$$.dirty[0]&6144&&i&&(K(),j(),ee(),le(),r&&(P(),F()))},[c,f,m,_,y,w,o,a,T,G,re,r,i,l,s]}class $9t extends Re{constructor(e){super(),Ve(this,e,y9t,b9t,Oe,{},null,[-1,-1])}}function w9t(n){let e;const t=n[0].default,r=Xn(t,n,n[1],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&2)&&Zn(r,t,i,i[1],e?Jn(t,i[1],a,null):Qn(i[1]),null)},i(i){e||(b(r,i),e=!0)},o(i){$(r,i),e=!1},d(i){r&&r.d(i)}}}function k9t(n){let e,t;return e=new gp({props:{maxWidth:"90ch",$$slots:{default:[w9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&2&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function z9t(n,e,t){let{$$slots:r={},$$scope:i}=e;return n.$$set=a=>{"$$scope"in a&&t(1,i=a.$$scope)},[r,i]}class A9t extends Re{constructor(e){super(),Ve(this,e,z9t,k9t,Oe,{})}}function sU(n,e,t){const r=n.slice();return r[6]=e[t],r[8]=t,r}function M9t(n){let e;return{c(){e=oe("Get Started Checklist")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function C9t(n){let e,t,r,i,a;return t=new Rn({props:{size:"XXS",$$slots:{default:[M9t]},$$scope:{ctx:n}}}),i=new mp({props:{size:"S",value:n[1].onboardingProgress}}),{c(){e=J("header"),O(t.$$.fragment),r=U(),O(i.$$.fragment),D(e,"class","item svelte-oprczl")},m(o,l){S(o,e,l),H(t,e,null),x(e,r),H(i,e,null),a=!0},p(o,l){const s={};l&512&&(s.$$scope={dirty:l,ctx:o}),t.$set(s);const u={};l&2&&(u.value=o[1].onboardingProgress),i.$set(u)},i(o){a||(b(t.$$.fragment,o),b(i.$$.fragment,o),a=!0)},o(o){$(t.$$.fragment,o),$(i.$$.fragment,o),a=!1},d(o){o&&C(e),B(t),B(i)}}}function S9t(n){let e,t,r=n[8]+1+"",i,a,o=n[1].checklist[n[6]].label+"",l,s,u,c,f,h,m;u=new xu({props:{value:n[1].checklist[n[6]].checked}});function _(){return n[4](n[6])}return{c(){e=J("div"),t=J("span"),i=oe(r),a=oe(". "),l=oe(o),s=U(),O(u.$$.fragment),c=U(),D(e,"class","item svelte-oprczl")},m(y,w){S(y,e,w),x(e,t),x(t,i),x(t,a),x(t,l),x(e,s),H(u,e,null),S(y,c,w),f=!0,h||(m=At(e,"click",_),h=!0)},p(y,w){n=y,(!f||w&2)&&o!==(o=n[1].checklist[n[6]].label+"")&&_t(l,o);const A={};w&2&&(A.value=n[1].checklist[n[6]].checked),u.$set(A)},i(y){f||(b(u.$$.fragment,y),f=!0)},o(y){$(u.$$.fragment,y),f=!1},d(y){y&&C(e),B(u),y&&C(c),h=!1,m()}}}function uU(n){let e,t;return e=new Ii({props:{$$slots:{default:[S9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&518&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function L9t(n){let e,t,r,i;e=new Ii({props:{disabled:!0,$$slots:{default:[C9t]},$$scope:{ctx:n}}});let a=Object.keys(n[1].checklist),o=[];for(let s=0;s<a.length;s+=1)o[s]=uU(sU(n,a,s));const l=s=>$(o[s],1,1,()=>{o[s]=null});return{c(){O(e.$$.fragment),t=U();for(let s=0;s<o.length;s+=1)o[s].c();r=$t()},m(s,u){H(e,s,u),S(s,t,u);for(let c=0;c<o.length;c+=1)o[c].m(s,u);S(s,r,u),i=!0},p(s,u){const c={};if(u&514&&(c.$$scope={dirty:u,ctx:s}),e.$set(c),u&6){a=Object.keys(s[1].checklist);let f;for(f=0;f<a.length;f+=1){const h=sU(s,a,f);o[f]?(o[f].p(h,u),b(o[f],1)):(o[f]=uU(h),o[f].c(),b(o[f],1),o[f].m(r.parentNode,r))}for(we(),f=a.length;f<o.length;f+=1)l(f);ke()}},i(s){if(!i){b(e.$$.fragment,s);for(let u=0;u<a.length;u+=1)b(o[u]);i=!0}},o(s){$(e.$$.fragment,s),o=o.filter(Boolean);for(let u=0;u<o.length;u+=1)$(o[u]);i=!1},d(s){B(e,s),s&&C(t),Dn(o,s),s&&C(r)}}}function E9t(n){let e,t,r;return t=new mp({props:{size:"S",value:n[1].onboardingProgress}}),{c(){e=J("div"),O(t.$$.fragment),D(e,"slot","control"),D(e,"class","icon svelte-oprczl")},m(i,a){S(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&2&&(o.value=i[1].onboardingProgress),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&C(e),B(t)}}}function T9t(n){let e,t;return e=new Lc({props:{align:n[0],$$slots:{control:[E9t],default:[L9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&1&&(a.align=r[0]),i&518&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function D9t(n,e,t){let r,i,a;Ne(n,Pi,u=>t(1,i=u)),Ne(n,si,u=>t(2,a=u));let o=window.innerWidth;const l=new ResizeObserver(u=>{var c;u!=null&&u[0]&&t(3,o=(c=u[0].contentRect)==null?void 0:c.width)});ar(()=>{const u=document.documentElement;return l.observe(u),()=>{l.unobserve(u)}});const s=u=>a(i.checklist[u].link);return n.$$.update=()=>{n.$$.dirty&8&&t(0,r=o<500?"right":"left")},[r,i,a,o,s]}class H9t extends Re{constructor(e){super(),Ve(this,e,D9t,T9t,Oe,{})}}function B9t(n){let e;return{c(){e=oe(`You can find information about your developer account here, such as the API
|
|
1005
1005
|
key used to access the Budibase API.`)},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function O9t(n){let e,t,r,i,a;e=new xt({props:{size:"S",$$slots:{default:[B9t]},$$scope:{ctx:n}}});function o(s){n[2](s)}let l={label:"API key"};return n[0]!==void 0&&(l.value=n[0]),r=new Kz({props:l}),He.push(()=>nt(r,"value",o)),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(s,u){H(e,s,u),S(s,t,u),H(r,s,u),a=!0},p(s,u){const c={};u&8&&(c.$$scope={dirty:u,ctx:s}),e.$set(c);const f={};!i&&u&1&&(i=!0,f.value=s[0],rt(()=>i=!1)),r.$set(f)},i(s){a||(b(e.$$.fragment,s),b(r.$$.fragment,s),a=!0)},o(s){$(e.$$.fragment,s),$(r.$$.fragment,s),a=!1},d(s){B(e,s),s&&C(t),B(r,s)}}}function I9t(n){let e,t;return e=new _r({props:{title:"Developer information",showConfirmButton:!1,showSecondaryButton:!0,secondaryButtonText:"Re-generate key",secondaryAction:n[1],$$slots:{default:[O9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&9&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function P9t(n,e,t){let r=null;async function i(){try{t(0,r=await fr.generateAPIKey()),yt.success("New API key generated")}catch{yt.error("Unable to generate new API key")}return!1}ar(async()=>{try{t(0,r=await fr.fetchAPIKey())}catch{yt.error("Unable to fetch API key")}});function a(o){r=o,t(0,r)}return[r,i,a]}class V9t extends Re{constructor(e){super(),Ve(this,e,P9t,I9t,Oe,{})}}function cU(n,e,t){const r=n.slice();return r[26]=e[t].title,r[27]=e[t].href,r[28]=e[t].heading,r[29]=e[t].badge,r}function fU(n){let e,t,r,i,a,o,l,s,u,c,f,h,m,_,y,w,A,E,T,I,P,F,j,q,G,te,ee;r=new Rt({props:{paddingX:"L",paddingY:"L",$$slots:{default:[F9t]},$$scope:{ctx:n}}}),s=new dn({props:{hoverable:!0,name:"ShowMenu"}}),s.$on("click",n[11]),w=new Lc({props:{align:"right",dataCy:"user-menu",$$slots:{control:[Y9t],default:[G9t]},$$scope:{ctx:n}}});const le=n[13].default,re=Xn(le,n,n[22],null);let K={$$slots:{default:[K9t]},$$scope:{ctx:n}};I=new ir({props:K}),n[19](I);let W={$$slots:{default:[X9t]},$$scope:{ctx:n}};F=new ir({props:W}),n[20](F);let ne={$$slots:{default:[J9t]},$$scope:{ctx:n}};return q=new ir({props:ne}),n[21](q),{c(){var ue,pe;e=J("div"),t=J("div"),O(r.$$.fragment),i=U(),a=J("div"),o=J("div"),l=J("div"),O(s.$$.fragment),u=U(),c=J("div"),f=J("img"),_=U(),y=J("div"),O(w.$$.fragment),A=U(),E=J("div"),re&&re.c(),T=U(),O(I.$$.fragment),P=U(),O(F.$$.fragment),j=U(),O(q.$$.fragment),D(t,"class","nav svelte-fqjgdx"),De(t,"visible",n[5]),D(l,"class","mobile-toggle svelte-fqjgdx"),$1(f.src,h=((ue=n[8])==null?void 0:ue.logoUrl)||zc)||D(f,"src",h),D(f,"alt",m=((pe=n[8])==null?void 0:pe.company)||"Budibase"),D(f,"class","svelte-fqjgdx"),D(c,"class","mobile-logo svelte-fqjgdx"),D(y,"class","user-dropdown svelte-fqjgdx"),D(o,"class","toolbar svelte-fqjgdx"),D(E,"class","content svelte-fqjgdx"),D(a,"class","main svelte-fqjgdx"),D(e,"class","container svelte-fqjgdx")},m(ue,pe){S(ue,e,pe),x(e,t),H(r,t,null),x(e,i),x(e,a),x(a,o),x(o,l),H(s,l,null),x(o,u),x(o,c),x(c,f),x(o,_),x(o,y),H(w,y,null),x(a,A),x(a,E),re&&re.m(E,null),S(ue,T,pe),H(I,ue,pe),S(ue,P,pe),H(F,ue,pe),S(ue,j,pe),H(q,ue,pe),G=!0,te||(ee=Ol(dp.call(null,t,n[12])),te=!0)},p(ue,pe){var ut,ze;const Ae={};pe[0]&4195264&&(Ae.$$scope={dirty:pe,ctx:ue}),r.$set(Ae),pe[0]&32&&De(t,"visible",ue[5]),(!G||pe[0]&256&&!$1(f.src,h=((ut=ue[8])==null?void 0:ut.logoUrl)||zc))&&D(f,"src",h),(!G||pe[0]&256&&m!==(m=((ze=ue[8])==null?void 0:ze.company)||"Budibase"))&&D(f,"alt",m);const he={};pe[0]&4194461&&(he.$$scope={dirty:pe,ctx:ue}),w.$set(he),re&&re.p&&(!G||pe[0]&4194304)&&Zn(re,le,ue,ue[22],G?Jn(le,ue[22],pe,null):Qn(ue[22]),null);const Me={};pe[0]&4194304&&(Me.$$scope={dirty:pe,ctx:ue}),I.$set(Me);const Ce={};pe[0]&4194304&&(Ce.$$scope={dirty:pe,ctx:ue}),F.$set(Ce);const ge={};pe[0]&4194304&&(ge.$$scope={dirty:pe,ctx:ue}),q.$set(ge)},i(ue){G||(b(r.$$.fragment,ue),b(s.$$.fragment,ue),b(w.$$.fragment,ue),b(re,ue),b(I.$$.fragment,ue),b(F.$$.fragment,ue),b(q.$$.fragment,ue),G=!0)},o(ue){$(r.$$.fragment,ue),$(s.$$.fragment,ue),$(w.$$.fragment,ue),$(re,ue),$(I.$$.fragment,ue),$(F.$$.fragment,ue),$(q.$$.fragment,ue),G=!1},d(ue){ue&&C(e),B(r),B(s),B(w),re&&re.d(ue),ue&&C(T),n[19](null),B(I,ue),ue&&C(P),n[20](null),B(F,ue),ue&&C(j),n[21](null),B(q,ue),te=!1,ee()}}}function R9t(n){let e=n[26]+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i[0]&64&&e!==(e=r[26]+"")&&_t(t,e)},d(r){r&&C(t)}}}function pU(n){let e,t;return e=new rie({props:{selected:n[9](n[27]),href:n[27],badge:n[29],heading:n[28],$$slots:{default:[R9t]},$$scope:{ctx:n}}}),e.$on("click",n[12]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&576&&(a.selected=r[9](r[27])),i[0]&64&&(a.href=r[27]),i[0]&64&&(a.badge=r[29]),i[0]&64&&(a.heading=r[28]),i[0]&4194368&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function N9t(n){let e,t,r=n[6],i=[];for(let o=0;o<r.length;o+=1)i[o]=pU(cU(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);S(o,e,l),t=!0},p(o,l){if(l[0]&4672){r=o[6];let s;for(s=0;s<r.length;s+=1){const u=cU(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=pU(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&C(e)}}}function F9t(n){var E;let e,t,r,i,a,o,l=(((E=n[8])==null?void 0:E.company)||"Budibase")+"",s,u,c,f,h,m,_,y,w,A;return f=new H9t({}),_=new Xre({props:{$$slots:{default:[N9t]},$$scope:{ctx:n}}}),{c(){var T;e=J("div"),t=J("div"),r=J("img"),a=U(),o=J("span"),s=oe(l),u=U(),c=J("div"),O(f.$$.fragment),h=U(),m=J("div"),O(_.$$.fragment),$1(r.src,i=((T=n[8])==null?void 0:T.logoUrl)||zc)||D(r,"src",i),D(r,"alt","Logotype"),D(r,"class","svelte-fqjgdx"),D(o,"class","svelte-fqjgdx"),D(t,"class","name svelte-fqjgdx"),D(c,"class","onboarding"),D(e,"class","branding svelte-fqjgdx"),D(m,"class","menu")},m(T,I){S(T,e,I),x(e,t),x(t,r),x(t,a),x(t,o),x(o,s),x(e,u),x(e,c),H(f,c,null),S(T,h,I),S(T,m,I),H(_,m,null),y=!0,w||(A=At(t,"click",n[14]),w=!0)},p(T,I){var F,j;(!y||I[0]&256&&!$1(r.src,i=((F=T[8])==null?void 0:F.logoUrl)||zc))&&D(r,"src",i),(!y||I[0]&256)&&l!==(l=(((j=T[8])==null?void 0:j.company)||"Budibase")+"")&&_t(s,l);const P={};I[0]&4194880&&(P.$$scope={dirty:I,ctx:T}),_.$set(P)},i(T){y||(b(f.$$.fragment,T),b(_.$$.fragment,T),y=!0)},o(T){$(f.$$.fragment,T),$(_.$$.fragment,T),y=!1},d(T){T&&C(e),B(f),T&&C(h),T&&C(m),B(_),w=!1,A()}}}function x9t(n){let e;return{c(){e=oe("Update user information")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function dU(n){let e,t;return e=new Ii({props:{icon:"Key",$$slots:{default:[j9t]},$$scope:{ctx:n}}}),e.$on("click",n[16]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i[0]&4194304&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function j9t(n){let e;return{c(){e=oe("View API key")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function U9t(n){let e;return{c(){e=oe("Update password")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function q9t(n){let e;return{c(){e=oe("Close developer mode")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function W9t(n){let e;return{c(){e=oe("Log out")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function G9t(n){let e,t,r,i,a,o,l,s,u;e=new Ii({props:{icon:"UserEdit",dataCy:"user-info",$$slots:{default:[x9t]},$$scope:{ctx:n}}}),e.$on("click",n[15]);let c=n[0].isBuilder&&dU(n);return i=new Ii({props:{icon:"LockClosed",$$slots:{default:[U9t]},$$scope:{ctx:n}}}),i.$on("click",n[17]),o=new Ii({props:{icon:"UserDeveloper",$$slots:{default:[q9t]},$$scope:{ctx:n}}}),o.$on("click",n[18]),s=new Ii({props:{dataCy:"user-logout",icon:"LogOut",$$slots:{default:[W9t]},$$scope:{ctx:n}}}),s.$on("click",n[10]),{c(){O(e.$$.fragment),t=U(),c&&c.c(),r=U(),O(i.$$.fragment),a=U(),O(o.$$.fragment),l=U(),O(s.$$.fragment)},m(f,h){H(e,f,h),S(f,t,h),c&&c.m(f,h),S(f,r,h),H(i,f,h),S(f,a,h),H(o,f,h),S(f,l,h),H(s,f,h),u=!0},p(f,h){const m={};h[0]&4194304&&(m.$$scope={dirty:h,ctx:f}),e.$set(m),f[0].isBuilder?c?(c.p(f,h),h[0]&1&&b(c,1)):(c=dU(f),c.c(),b(c,1),c.m(r.parentNode,r)):c&&(we(),$(c,1,1,()=>{c=null}),ke());const _={};h[0]&4194304&&(_.$$scope={dirty:h,ctx:f}),i.$set(_);const y={};h[0]&4194304&&(y.$$scope={dirty:h,ctx:f}),o.$set(y);const w={};h[0]&4194304&&(w.$$scope={dirty:h,ctx:f}),s.$set(w)},i(f){u||(b(e.$$.fragment,f),b(c),b(i.$$.fragment,f),b(o.$$.fragment,f),b(s.$$.fragment,f),u=!0)},o(f){$(e.$$.fragment,f),$(c),$(i.$$.fragment,f),$(o.$$.fragment,f),$(s.$$.fragment,f),u=!1},d(f){B(e,f),f&&C(t),c&&c.d(f),f&&C(r),B(i,f),f&&C(a),B(o,f),f&&C(l),B(s,f)}}}function Y9t(n){let e,t,r,i,a;return t=new Pd({props:{size:"M",initials:n[0].initials,url:n[0].user.pictureUrl}}),i=new dn({props:{size:"XL",name:"ChevronDown"}}),{c(){e=J("div"),O(t.$$.fragment),r=U(),O(i.$$.fragment),D(e,"slot","control"),D(e,"class","avatar svelte-fqjgdx")},m(o,l){S(o,e,l),H(t,e,null),x(e,r),H(i,e,null),a=!0},p(o,l){const s={};l[0]&1&&(s.initials=o[0].initials),l[0]&1&&(s.url=o[0].user.pictureUrl),t.$set(s)},i(o){a||(b(t.$$.fragment,o),b(i.$$.fragment,o),a=!0)},o(o){$(t.$$.fragment,o),$(i.$$.fragment,o),a=!1},d(o){o&&C(e),B(t),B(i)}}}function K9t(n){let e,t;return e=new FX({}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function X9t(n){let e,t;return e=new xX({}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function J9t(n){let e,t;return e=new V9t({}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Z9t(n){let e,t,r=n[0].user&&n[1]&&fU(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),S(i,e,a),t=!0},p(i,a){i[0].user&&i[1]?r?(r.p(i,a),a[0]&3&&b(r,1)):(r=fU(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&C(e)}}}function Q9t(n,e,t){let r,i,a,o,l,s,u;Ne(n,ca,re=>t(23,i=re)),Ne(n,fr,re=>t(0,a=re)),Ne(n,Pi,re=>t(24,o=re)),Ne(n,si,re=>t(7,l=re)),Ne(n,Bs,re=>t(8,s=re)),Ne(n,y6,re=>t(9,u=re));let{$$slots:c={},$$scope:f}=e,h=!1,m,_,y,w=!1;const A=re=>{var ne,ue,pe;let K=[{title:"Apps",href:"/builder/portal/apps"}];re?(K=K.concat([{title:"Users",href:"/builder/portal/manage/users",heading:"Manage"},Iv(Ov.USER_GROUPS)?{title:"User Groups",href:"/builder/portal/manage/groups",badge:"New"}:void 0,{title:"Auth",href:"/builder/portal/manage/auth"},{title:"Email",href:"/builder/portal/manage/email"},{title:"Plugins",href:"/builder/portal/manage/plugins",badge:"New"},{title:"Organisation",href:"/builder/portal/settings/organisation",heading:"Settings"},{title:"Theming",href:"/builder/portal/settings/theming"}]),o.cloud||(K=K.concat([{title:"Update",href:"/builder/portal/settings/update"}]))):K=K.concat([{title:"Theming",href:"/builder/portal/settings/theming",heading:"Settings"}]);let W=!1;return(((ne=a==null?void 0:a.user)==null?void 0:ne.accountPortalAccess)||!o.cloud&&re)&&(W=!0,K=K.concat([{title:"Account",href:o.accountPortalUrl,heading:"Account"}])),Iv(Ov.LICENSING)&&(K=K.concat([{title:"Usage",href:"/builder/portal/settings/usage",heading:W?"":"Account"}]),o.cloud&&((ue=a==null?void 0:a.user)==null?void 0:ue.accountPortalAccess)?K=K.concat([{title:"Upgrade",href:o.accountPortalUrl+"/portal/upgrade",badge:"New"}]):!o.cloud&&re&&(K=K.concat({title:"Upgrade",href:"/builder/portal/settings/upgrade",badge:"New"})),((pe=a==null?void 0:a.user)==null?void 0:pe.accountPortalAccess)&&a.user.account.stripeCustomerId&&(K=K.concat([{title:"Billing",href:o.accountPortalUrl+"/portal/billing"}]))),K=K.filter(Ae=>!!Ae),K},E=async()=>{try{await fr.logout()}catch{}},T=()=>t(5,w=!0),I=()=>t(5,w=!1);ar(async()=>{var re,K;if(a.user)if(!((K=(re=a.user)==null?void 0:re.builder)!=null&&K.global))i("../");else{try{await Bs.init()}catch{yt.error("Error getting org config")}t(1,h=!0)}});const P=()=>l("./apps"),F=()=>m.show(),j=()=>y.show(),q=()=>_.show(),G=()=>l("../apps");function te(re){He[re?"unshift":"push"](()=>{m=re,t(2,m)})}function ee(re){He[re?"unshift":"push"](()=>{_=re,t(3,_)})}function le(re){He[re?"unshift":"push"](()=>{y=re,t(4,y)})}return n.$$set=re=>{"$$scope"in re&&t(22,f=re.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&1&&t(6,r=A(a.isAdmin))},[a,h,m,_,y,w,r,l,s,u,E,T,I,c,P,F,j,q,G,te,ee,le,f]}class evt extends Re{constructor(e){super(),Ve(this,e,Q9t,Z9t,Oe,{},null,[-1,-1])}}function hU(n){let e;const t=n[11].default,r=Xn(t,n,n[10],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&1024)&&Zn(r,t,i,i[10],e?Jn(t,i[10],a,null):Qn(i[10]),null)},i(i){e||(b(r,i),e=!0)},o(i){$(r,i),e=!1},d(i){r&&r.d(i)}}}function tvt(n){let e,t,r=n[0]&&hU(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),S(i,e,a),t=!0},p(i,[a]){i[0]?r?(r.p(i,a),a&1&&b(r,1)):(r=hU(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(we(),$(r,1,1,()=>{r=null}),ke())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&C(e)}}}function nvt(n,e,t){let r,i,a,o,l,s,u,c,f,h,m;Ne(n,fr,T=>t(6,u=T)),Ne(n,ca,T=>t(7,c=T)),Ne(n,y6,T=>t(8,f=T)),Ne(n,Pi,T=>t(9,h=T)),Ne(n,Cc,T=>t(13,m=T));let{$$slots:_={},$$scope:y}=e,w=!1;const A=async()=>{const T=window.location.host;if(T.includes("localhost:"))return;let I;const P=T.split(".");if(P.length>2&&(I=P[0]),l&&l.tenantId){if(!I){if(!window.location.host.includes("localhost")){let F=window.location.href;F=F.replace("://",`://${l.tenantId}.`),window.location.href=F}return}if(l.tenantId!==I)try{await fr.logout(),await fr.setOrganisation(null)}catch{}}else await fr.setOrganisation(I)};async function E(){await nn.analyticsPing({source:"builder"})}return ar(async()=>{try{await fr.getSelf(),await Pi.init(),u.user&&await ya.init(),m["?template"]&&await fr.setInitInfo({init_template:m["?template"]}),s&&r&&await A()}catch{}t(0,w=!0),await E()}),n.$$set=T=>{"$$scope"in T&&t(10,y=T.$$scope)},n.$$.update=()=>{var T,I,P;if(n.$$.dirty&512&&t(5,r=h.multiTenancy),n.$$.dirty&512&&t(2,i=(I=(T=h==null?void 0:h.checklist)==null?void 0:T.adminUser)==null?void 0:I.checked),n.$$.dirty&64&&t(4,a=u.tenantSet),n.$$.dirty&512&&t(1,o=h.cloud),n.$$.dirty&64&&(l=u.user),n.$$.dirty&514&&t(3,s=o&&!h.disableAccountPortal),n.$$.dirty&1023){const F=h.loaded&&u.loaded;if(w&&F&&!u.user&&!wv(Eh.ReturnUrl)&&!u.postLogout&&!f("./auth")&&!f("./invite")&&!f("./admin")){const j=window.location.pathname;F2e(Eh.ReturnUrl,j)}if(w&&!s&&F&&r&&!a)c("./auth/org");else if(w&&!s&&F&&!i)c("./admin");else if(w&&(i||o)&&!u.user&&!f("./auth")&&!f("./invite")&&!f("./admin"))c("./auth");else if((P=u.user)!=null&&P.forceResetPassword)c("./auth/reset");else if(w&&F&&u.user){const j=wv(Eh.ReturnUrl);j&&(Lk(Eh.ReturnUrl),window.location.href=j)}}},[w,o,i,s,a,r,u,c,f,h,y,_]}class rvt extends Re{constructor(e){super(),Ve(this,e,nvt,tvt,Oe,{})}}function ivt(n,e,t){let r;return Ne(n,ca,i=>t(0,r=i)),ar(async()=>{try{await fr.checkQueryString()}catch{yt.error("Error setting org")}r("./builder")}),[]}class avt extends Re{constructor(e){super(),Ve(this,e,ivt,null,Oe,{})}}const ovt={root:!0,children:[{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/admin/index",id:"_builder_admin_index",component:()=>w5e}],isLayout:!0,path:"/builder/admin",id:"_builder_admin__layout",component:()=>A5e},{isDir:!0,children:[{isDir:!0,children:[{isFallback:!0,path:"/builder/app/:application/_fallback",id:"_builder_app__application__fallback",component:()=>C5e},{isIndex:!0,isPage:!0,path:"/builder/app/:application/index",id:"_builder_app__application_index",component:()=>L5e},{isDir:!0,children:[{isDir:!0,children:[{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/:selectedDatasource/:query/index",id:"_builder_app__application_data_datasource__selectedDatasource__query_index",component:()=>DSe}],isLayout:!0,path:"/builder/app/:application/data/datasource/:selectedDatasource/:query",id:"_builder_app__application_data_datasource__selectedDatasource__query__layout",component:()=>OSe},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/:selectedDatasource/index",id:"_builder_app__application_data_datasource__selectedDatasource_index",component:()=>KTe},{isDir:!0,ext:"",children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/:selectedDatasource/rest/:query/index",id:"_builder_app__application_data_datasource__selectedDatasource_rest__query_index",component:()=>nHe}],isLayout:!0,path:"/builder/app/:application/data/datasource/:selectedDatasource/rest/:query",id:"_builder_app__application_data_datasource__selectedDatasource_rest__query__layout",component:()=>aHe}],path:"/builder/app/:application/data/datasource/:selectedDatasource/rest"}],isLayout:!0,path:"/builder/app/:application/data/datasource/:selectedDatasource",id:"_builder_app__application_data_datasource__selectedDatasource__layout",component:()=>sHe},{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/bb_internal/index",id:"_builder_app__application_data_datasource_bb_internal_index",component:()=>BHe}],isLayout:!0,path:"/builder/app/:application/data/datasource/bb_internal",id:"_builder_app__application_data_datasource_bb_internal__layout",component:()=>PHe},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/datasource/index",id:"_builder_app__application_data_datasource_index",component:()=>xHe}],isLayout:!0,path:"/builder/app/:application/data/datasource",id:"_builder_app__application_data_datasource__layout",component:()=>qHe},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/index",id:"_builder_app__application_data_index",component:()=>WBe},{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/table/:selectedTable/index",id:"_builder_app__application_data_table__selectedTable_index",component:()=>aPe},{isDir:!0,ext:"",children:[{isDir:!0,ext:"",children:[{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/table/:selectedTable/relationship/:selectedRow/:selectedField/index",id:"_builder_app__application_data_table__selectedTable_relationship__selectedRow__selectedField_index",component:()=>fPe}],path:"/builder/app/:application/data/table/:selectedTable/relationship/:selectedRow/:selectedField"},{isIndex:!0,isPage:!0,ownMeta:{index:!1},meta:{index:!1,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/data/table/:selectedTable/relationship/:selectedRow/index",id:"_builder_app__application_data_table__selectedTable_relationship__selectedRow_index",component:()=>dPe}],path:"/builder/app/:application/data/table/:selectedTable/relationship/:selectedRow"},{isIndex:!0,isPage:!0,ownMeta:{index:!1},meta:{index:!1,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/data/table/:selectedTable/relationship/index",id:"_builder_app__application_data_table__selectedTable_relationship_index",component:()=>mPe}],path:"/builder/app/:application/data/table/:selectedTable/relationship"}],isLayout:!0,path:"/builder/app/:application/data/table/:selectedTable",id:"_builder_app__application_data_table__selectedTable__layout",component:()=>_Pe},{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/table/index",id:"_builder_app__application_data_table_index",component:()=>kPe}],isLayout:!0,path:"/builder/app/:application/data/table",id:"_builder_app__application_data_table__layout",component:()=>MPe},{isDir:!0,ext:"",children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/data/view/:selectedView/index",id:"_builder_app__application_data_view__selectedView_index",component:()=>SVe}],isLayout:!0,path:"/builder/app/:application/data/view/:selectedView",id:"_builder_app__application_data_view__selectedView__layout",component:()=>TVe}],path:"/builder/app/:application/data/view"}],isLayout:!0,ownMeta:{index:1},meta:{index:1,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/data",id:"_builder_app__application_data__layout",component:()=>NRe},{isDir:!0,children:[{isDir:!0,children:[{isFallback:!0,path:"/builder/app/:application/design/:screenId/_fallback",id:"_builder_app__application_design__screenId__fallback",component:()=>xRe},{isDir:!0,ext:"",children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/components/:componentId/index",id:"_builder_app__application_design__screenId_components__componentId_index",component:()=>jRe},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/components/:componentId/new/index",id:"_builder_app__application_design__screenId_components__componentId_new_index",component:()=>dNe}],path:"/builder/app/:application/design/:screenId/components/:componentId/new"}],isLayout:!0,path:"/builder/app/:application/design/:screenId/components/:componentId",id:"_builder_app__application_design__screenId_components__componentId__layout",component:()=>$Ke},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/components/index",id:"_builder_app__application_design__screenId_components_index",component:()=>kKe}],path:"/builder/app/:application/design/:screenId/components"},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/index",id:"_builder_app__application_design__screenId_index",component:()=>AKe},{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/layouts/:layoutId/index",id:"_builder_app__application_design__screenId_layouts__layoutId_index",component:()=>GKe}],isLayout:!0,path:"/builder/app/:application/design/:screenId/layouts/:layoutId",id:"_builder_app__application_design__screenId_layouts__layoutId__layout",component:()=>XKe},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/layouts/index",id:"_builder_app__application_design__screenId_layouts_index",component:()=>ZKe}],isLayout:!0,path:"/builder/app/:application/design/:screenId/layouts",id:"_builder_app__application_design__screenId_layouts__layout",component:()=>tXe},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/navigation/index",id:"_builder_app__application_design__screenId_navigation_index",component:()=>jXe}],path:"/builder/app/:application/design/:screenId/navigation"},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/screens/index",id:"_builder_app__application_design__screenId_screens_index",component:()=>sZe}],path:"/builder/app/:application/design/:screenId/screens"},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/:screenId/theme/index",id:"_builder_app__application_design__screenId_theme_index",component:()=>OZe}],path:"/builder/app/:application/design/:screenId/theme"}],isLayout:!0,path:"/builder/app/:application/design/:screenId",id:"_builder_app__application_design__screenId__layout",component:()=>iQe},{isIndex:!0,isPage:!0,path:"/builder/app/:application/design/index",id:"_builder_app__application_design_index",component:()=>cQe}],isLayout:!0,ownMeta:{index:2},meta:{index:2,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/design",id:"_builder_app__application_design__layout",component:()=>dQe},{isDir:!0,children:[{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/app/:application/automate/:automation/index",id:"_builder_app__application_automate__automation_index",component:()=>ont}],isLayout:!0,path:"/builder/app/:application/automate/:automation",id:"_builder_app__application_automate__automation__layout",component:()=>unt},{isIndex:!0,isPage:!0,path:"/builder/app/:application/automate/index",id:"_builder_app__application_automate_index",component:()=>fnt}],isLayout:!0,ownMeta:{index:3},meta:{index:3,recursive:!0,preload:!1,prerender:!0},path:"/builder/app/:application/automate",id:"_builder_app__application_automate__layout",component:()=>urt}],isLayout:!0,path:"/builder/app/:application",id:"_builder_app__application__layout",component:()=>git},{isIndex:!0,isPage:!0,path:"/builder/app/index",id:"_builder_app_index",component:()=>_it}],isLayout:!0,path:"/builder/app",id:"_builder_app__layout",component:()=>$it},{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/apps/index",id:"_builder_apps_index",component:()=>o1t}],isLayout:!0,path:"/builder/apps",id:"_builder_apps__layout",component:()=>u1t},{isDir:!0,children:[{isPage:!0,path:"/builder/auth/forgot",id:"_builder_auth_forgot",component:()=>y1t},{isIndex:!0,isPage:!0,path:"/builder/auth/index",id:"_builder_auth_index",component:()=>w1t},{isPage:!0,path:"/builder/auth/login",id:"_builder_auth_login",component:()=>U1t},{isPage:!0,path:"/builder/auth/org",id:"_builder_auth_org",component:()=>eat},{isPage:!0,path:"/builder/auth/reset",id:"_builder_auth_reset",component:()=>uat}],isLayout:!0,path:"/builder/auth",id:"_builder_auth__layout",component:()=>pat},{isIndex:!0,isPage:!0,path:"/builder/index",id:"_builder_index",component:()=>hat},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/invite/index",id:"_builder_invite_index",component:()=>wat}],path:"/builder/invite"},{isDir:!0,children:[{isDir:!0,ext:"",children:[{isPage:!0,path:"/builder/portal/apps/create",id:"_builder_portal_apps_create",component:()=>Hft},{isIndex:!0,isPage:!0,path:"/builder/portal/apps/index",id:"_builder_portal_apps_index",component:()=>C3t},{isPage:!0,path:"/builder/portal/apps/templates",id:"_builder_portal_apps_templates",component:()=>H3t}],path:"/builder/portal/apps"},{isIndex:!0,isPage:!0,path:"/builder/portal/index",id:"_builder_portal_index",component:()=>O3t},{isDir:!0,children:[{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/manage/auth/index",id:"_builder_portal_manage_auth_index",component:()=>b4t}],path:"/builder/portal/manage/auth"},{isDir:!0,children:[{isPage:!0,path:"/builder/portal/manage/email/:template",id:"_builder_portal_manage_email__template",component:()=>F4t},{isIndex:!0,isPage:!0,path:"/builder/portal/manage/email/index",id:"_builder_portal_manage_email_index",component:()=>c5t}],isLayout:!0,path:"/builder/portal/manage/email",id:"_builder_portal_manage_email__layout",component:()=>d5t},{isDir:!0,children:[{isPage:!0,path:"/builder/portal/manage/groups/:groupId",id:"_builder_portal_manage_groups__groupId",component:()=>fpt},{isIndex:!0,isPage:!0,path:"/builder/portal/manage/groups/index",id:"_builder_portal_manage_groups_index",component:()=>Vpt}],isLayout:!0,path:"/builder/portal/manage/groups",id:"_builder_portal_manage_groups__layout",component:()=>Fpt},{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/manage/plugins/index",id:"_builder_portal_manage_plugins_index",component:()=>Hdt}],path:"/builder/portal/manage/plugins"},{isDir:!0,ext:"",children:[{isPage:!0,path:"/builder/portal/manage/users/:userId",id:"_builder_portal_manage_users__userId",component:()=>Cht},{isIndex:!0,isPage:!0,path:"/builder/portal/manage/users/index",id:"_builder_portal_manage_users_index",component:()=>O6t}],path:"/builder/portal/manage/users"}],isLayout:!0,path:"/builder/portal/manage",id:"_builder_portal_manage__layout",component:()=>R6t},{isDir:!0,ext:"",children:[{isDir:!0,ext:"",children:[{isIndex:!0,isPage:!0,path:"/builder/portal/overview/:application/index",id:"_builder_portal_overview__application_index",component:()=>ugt}],path:"/builder/portal/overview/:application"}],path:"/builder/portal/overview"},{isDir:!0,children:[{isIndex:!0,isPage:!0,path:"/builder/portal/settings/index",id:"_builder_portal_settings_index",component:()=>fgt},{isPage:!0,path:"/builder/portal/settings/organisation",id:"_builder_portal_settings_organisation",component:()=>Dgt},{isPage:!0,path:"/builder/portal/settings/theming",id:"_builder_portal_settings_theming",component:()=>xgt},{isPage:!0,path:"/builder/portal/settings/update",id:"_builder_portal_settings_update",component:()=>Zgt},{isPage:!0,path:"/builder/portal/settings/upgrade",id:"_builder_portal_settings_upgrade",component:()=>E7t},{isPage:!0,path:"/builder/portal/settings/usage",id:"_builder_portal_settings_usage",component:()=>$9t}],isLayout:!0,path:"/builder/portal/settings",id:"_builder_portal_settings__layout",component:()=>A9t}],isLayout:!0,path:"/builder/portal",id:"_builder_portal__layout",component:()=>evt}],isLayout:!0,path:"/builder",id:"_builder__layout",component:()=>rvt},{isIndex:!0,isPage:!0,path:"/index",id:"_index",component:()=>avt}],path:"/"},{tree:M_t,routes:lvt}=KU(ovt);var Ky=Object.prototype.hasOwnProperty,s4=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),svt=function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var i=[],a=0;a<t.length;++a)typeof t[a]<"u"&&i.push(t[a]);r.obj[r.prop]=i}}return t},kZ=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(r[i]=e[i]);return r},uvt=function n(e,t,r){if(!t)return e;if(typeof t!="object"){if(Array.isArray(e))e.push(t);else if(typeof e=="object")(r.plainObjects||r.allowPrototypes||!Ky.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(typeof e!="object")return[e].concat(t);var i=e;return Array.isArray(e)&&!Array.isArray(t)&&(i=kZ(e,r)),Array.isArray(e)&&Array.isArray(t)?(t.forEach(function(a,o){Ky.call(e,o)?e[o]&&typeof e[o]=="object"?e[o]=n(e[o],a,r):e.push(a):e[o]=a}),e):Object.keys(t).reduce(function(a,o){var l=t[o];return Ky.call(a,o)?a[o]=n(a[o],l,r):a[o]=l,a},i)},cvt=function(e,t){return Object.keys(t).reduce(function(r,i){return r[i]=t[i],r},e)},fvt=function(n){try{return decodeURIComponent(n.replace(/\+/g," "))}catch{return n}},pvt=function(e){if(e.length===0)return e;for(var t=typeof e=="string"?e:String(e),r="",i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a===45||a===46||a===95||a===126||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122){r+=t.charAt(i);continue}if(a<128){r=r+s4[a];continue}if(a<2048){r=r+(s4[192|a>>6]+s4[128|a&63]);continue}if(a<55296||a>=57344){r=r+(s4[224|a>>12]+s4[128|a>>6&63]+s4[128|a&63]);continue}i+=1,a=65536+((a&1023)<<10|t.charCodeAt(i)&1023),r+=s4[240|a>>18]+s4[128|a>>12&63]+s4[128|a>>6&63]+s4[128|a&63]}return r},dvt=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],l=Object.keys(o),s=0;s<l.length;++s){var u=l[s],c=o[u];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(t.push({obj:o,prop:u}),r.push(c))}return svt(t)},hvt=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},mvt=function(e){return e===null||typeof e>"u"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},zZ={arrayToObject:kZ,assign:cvt,compact:dvt,decode:fvt,encode:pvt,isBuffer:mvt,isRegExp:hvt,merge:uvt},gvt=String.prototype.replace,vvt=/%20/g,AZ={default:"RFC3986",formatters:{RFC1738:function(n){return gvt.call(n,vvt,"+")},RFC3986:function(n){return n}},RFC1738:"RFC1738",RFC3986:"RFC3986"},_A=zZ,Xy=AZ,mU={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},_vt=Date.prototype.toISOString,f4={delimiter:"&",encode:!0,encoder:_A.encode,encodeValuesOnly:!1,serializeDate:function(e){return _vt.call(e)},skipNulls:!1,strictNullHandling:!1},bvt=function n(e,t,r,i,a,o,l,s,u,c,f,h){var m=e;if(typeof l=="function")m=l(t,m);else if(m instanceof Date)m=c(m);else if(m===null){if(i)return o&&!h?o(t,f4.encoder):t;m=""}if(typeof m=="string"||typeof m=="number"||typeof m=="boolean"||_A.isBuffer(m)){if(o){var _=h?t:o(t,f4.encoder);return[f(_)+"="+f(o(m,f4.encoder))]}return[f(t)+"="+f(String(m))]}var y=[];if(typeof m>"u")return y;var w;if(Array.isArray(l))w=l;else{var A=Object.keys(m);w=s?A.sort(s):A}for(var E=0;E<w.length;++E){var T=w[E];a&&m[T]===null||(Array.isArray(m)?y=y.concat(n(m[T],r(t,T),r,i,a,o,l,s,u,c,f,h)):y=y.concat(n(m[T],t+(u?"."+T:"["+T+"]"),r,i,a,o,l,s,u,c,f,h)))}return y},yvt=function(n,e){var t=n,r=e?_A.assign({},e):{};if(r.encoder!==null&&r.encoder!==void 0&&typeof r.encoder!="function")throw new TypeError("Encoder has to be a function.");var i=typeof r.delimiter>"u"?f4.delimiter:r.delimiter,a=typeof r.strictNullHandling=="boolean"?r.strictNullHandling:f4.strictNullHandling,o=typeof r.skipNulls=="boolean"?r.skipNulls:f4.skipNulls,l=typeof r.encode=="boolean"?r.encode:f4.encode,s=typeof r.encoder=="function"?r.encoder:f4.encoder,u=typeof r.sort=="function"?r.sort:null,c=typeof r.allowDots>"u"?!1:r.allowDots,f=typeof r.serializeDate=="function"?r.serializeDate:f4.serializeDate,h=typeof r.encodeValuesOnly=="boolean"?r.encodeValuesOnly:f4.encodeValuesOnly;if(typeof r.format>"u")r.format=Xy.default;else if(!Object.prototype.hasOwnProperty.call(Xy.formatters,r.format))throw new TypeError("Unknown format option provided.");var m=Xy.formatters[r.format],_,y;typeof r.filter=="function"?(y=r.filter,t=y("",t)):Array.isArray(r.filter)&&(y=r.filter,_=y);var w=[];if(typeof t!="object"||t===null)return"";var A;r.arrayFormat in mU?A=r.arrayFormat:"indices"in r?A=r.indices?"indices":"repeat":A="indices";var E=mU[A];_||(_=Object.keys(t)),u&&_.sort(u);for(var T=0;T<_.length;++T){var I=_[T];o&&t[I]===null||(w=w.concat(bvt(t[I],I,E,a,o,l?s:null,y,u,c,f,m,h)))}var P=w.join(i),F=r.addQueryPrefix===!0?"?":"";return P.length>0?F+P:""},yg=zZ,Bw=Object.prototype.hasOwnProperty,Yf={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:yg.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},$vt=function(e,t){for(var r={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,a),l=0;l<o.length;++l){var s=o[l],u=s.indexOf("]="),c=u===-1?s.indexOf("="):u+1,f,h;c===-1?(f=t.decoder(s,Yf.decoder),h=t.strictNullHandling?null:""):(f=t.decoder(s.slice(0,c),Yf.decoder),h=t.decoder(s.slice(c+1),Yf.decoder)),Bw.call(r,f)?r[f]=[].concat(r[f]).concat(h):r[f]=h}return r},wvt=function(n,e,t){for(var r=e,i=n.length-1;i>=0;--i){var a,o=n[i];if(o==="[]")a=[],a=a.concat(r);else{a=t.plainObjects?Object.create(null):{};var l=o.charAt(0)==="["&&o.charAt(o.length-1)==="]"?o.slice(1,-1):o,s=parseInt(l,10);!isNaN(s)&&o!==l&&String(s)===l&&s>=0&&t.parseArrays&&s<=t.arrayLimit?(a=[],a[s]=r):a[l]=r}r=a}return r},kvt=function(e,t,r){if(!!e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,l=a.exec(i),s=l?i.slice(0,l.index):i,u=[];if(s){if(!r.plainObjects&&Bw.call(Object.prototype,s)&&!r.allowPrototypes)return;u.push(s)}for(var c=0;(l=o.exec(i))!==null&&c<r.depth;){if(c+=1,!r.plainObjects&&Bw.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),wvt(u,t,r)}},zvt=function(n,e){var t=e?yg.assign({},e):{};if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(t.ignoreQueryPrefix=t.ignoreQueryPrefix===!0,t.delimiter=typeof t.delimiter=="string"||yg.isRegExp(t.delimiter)?t.delimiter:Yf.delimiter,t.depth=typeof t.depth=="number"?t.depth:Yf.depth,t.arrayLimit=typeof t.arrayLimit=="number"?t.arrayLimit:Yf.arrayLimit,t.parseArrays=t.parseArrays!==!1,t.decoder=typeof t.decoder=="function"?t.decoder:Yf.decoder,t.allowDots=typeof t.allowDots=="boolean"?t.allowDots:Yf.allowDots,t.plainObjects=typeof t.plainObjects=="boolean"?t.plainObjects:Yf.plainObjects,t.allowPrototypes=typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Yf.allowPrototypes,t.parameterLimit=typeof t.parameterLimit=="number"?t.parameterLimit:Yf.parameterLimit,t.strictNullHandling=typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Yf.strictNullHandling,n===""||n===null||typeof n>"u")return t.plainObjects?Object.create(null):{};for(var r=typeof n=="string"?$vt(n,t):n,i=t.plainObjects?Object.create(null):{},a=Object.keys(r),o=0;o<a.length;++o){var l=a[o],s=kvt(l,r[l],t);i=yg.merge(i,s,t)}return yg.compact(i)},Avt=yvt,Mvt=zvt,Cvt=AZ,gU={formats:Cvt,parse:Mvt,stringify:Avt};function Svt(n){let e;return{c(){e=oe("Need help? Go to our forums")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Lvt(n){let e,t,r,i,a,o,l;return i=new xt({props:{size:"S",$$slots:{default:[Svt]},$$scope:{ctx:n}}}),o=new dn({props:{name:"Help",size:"XXL"}}),{c(){e=J("a"),t=J("div"),r=J("div"),O(i.$$.fragment),a=U(),O(o.$$.fragment),D(r,"class","hidden hoverable svelte-6jhrdx"),D(t,"class","inner hoverable svelte-6jhrdx"),D(e,"target","_blank"),D(e,"href","https://github.com/Budibase/budibase/discussions"),D(e,"class","svelte-6jhrdx")},m(s,u){S(s,e,u),x(e,t),x(t,r),H(i,r,null),x(t,a),H(o,t,null),l=!0},p(s,[u]){const c={};u&1&&(c.$$scope={dirty:u,ctx:s}),i.$set(c)},i(s){l||(b(i.$$.fragment,s),b(o.$$.fragment,s),l=!0)},o(s){$(i.$$.fragment,s),$(o.$$.fragment,s),l=!1},d(s){s&&C(e),B(i),B(o)}}}class Evt extends Re{constructor(e){super(),Ve(this,e,null,Lvt,Oe,{})}}function Tvt(n){let e,t;return e=new _r({props:{title:n[5],size:"M",showCancelButton:!1,$$slots:{default:[Ovt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&32&&(a.title=r[5]),i&131268&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Dvt(n){let e,t;return e=new _r({props:{title:n[5],size:"M",confirmText:"Upgrade",onConfirm:n[15],$$slots:{default:[Vvt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&32&&(a.title=r[5]),i&256&&(a.onConfirm=r[15]),i&131284&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Hvt(n){let e,t,r,i,a,o,l,s=n[7]==1?"":"s",u,c,f,h,m;return h=new m5({props:{tooltip:n[6],size:"S"}}),{c(){e=oe("You have used "),t=J("span"),r=oe(n[2]),i=oe("%"),a=oe(` of
|
|
1006
1006
|
your plans Day Passes with `),o=oe(n[7]),l=oe(" day"),u=oe(s),c=oe(` remaining.
|
package/builder/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
|
|
11
11
|
rel="stylesheet"
|
|
12
12
|
/>
|
|
13
|
-
<script type="module" crossorigin src="/builder/assets/index.
|
|
13
|
+
<script type="module" crossorigin src="/builder/assets/index.bd6c0866.js"></script>
|
|
14
14
|
<link rel="stylesheet" href="/builder/assets/index.e56da48a.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body id="app">
|
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1665652219792" clover="3.2.0">
|
|
3
|
+
<project timestamp="1665652219792" name="All files">
|
|
4
4
|
<metrics statements="4123" coveredstatements="2999" conditionals="1772" coveredconditionals="974" methods="614" coveredmethods="430" elements="6509" coveredelements="4403" complexity="0" loc="4123" ncloc="4123" packages="22" files="123" classes="123"/>
|
|
5
5
|
<package name="api">
|
|
6
6
|
<metrics statements="35" coveredstatements="34" conditionals="5" coveredconditionals="2" methods="4" coveredmethods="4"/>
|
|
@@ -4098,13 +4098,13 @@
|
|
|
4098
4098
|
<line num="141" count="1" type="stmt"/>
|
|
4099
4099
|
<line num="142" count="1" type="stmt"/>
|
|
4100
4100
|
<line num="147" count="50" type="stmt"/>
|
|
4101
|
-
<line num="148" count="
|
|
4102
|
-
<line num="149" count="
|
|
4103
|
-
<line num="150" count="
|
|
4104
|
-
<line num="151" count="
|
|
4105
|
-
<line num="152" count="
|
|
4101
|
+
<line num="148" count="39" type="stmt"/>
|
|
4102
|
+
<line num="149" count="39" type="stmt"/>
|
|
4103
|
+
<line num="150" count="39" type="stmt"/>
|
|
4104
|
+
<line num="151" count="39" type="cond" truecount="2" falsecount="0"/>
|
|
4105
|
+
<line num="152" count="39" type="cond" truecount="1" falsecount="1"/>
|
|
4106
4106
|
<line num="153" count="0" type="stmt"/>
|
|
4107
|
-
<line num="155" count="
|
|
4107
|
+
<line num="155" count="39" type="cond" truecount="3" falsecount="1"/>
|
|
4108
4108
|
<line num="158" count="50" type="stmt"/>
|
|
4109
4109
|
<line num="159" count="1" type="stmt"/>
|
|
4110
4110
|
<line num="160" count="1" type="cond" truecount="2" falsecount="2"/>
|