@wix/cli 1.1.44 → 1.1.45

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.
Files changed (73) hide show
  1. package/build/{LoginCommand-YGOTR5PT.js → LoginCommand-76EGX52P.js} +2 -2
  2. package/build/{LogoutCommand-SQMPWE2Z.js → LogoutCommand-TOCECSGL.js} +2 -2
  3. package/build/{WhoamiCommand-ZDSABBMG.js → WhoamiCommand-W7GLY3WG.js} +2 -2
  4. package/build/{chunk-6UKTFHIT.js → chunk-4DD6IIYB.js} +2 -2
  5. package/build/{chunk-6WLGSATJ.js → chunk-4Y2R5QID.js} +2 -2
  6. package/build/{chunk-DUM2ZCCI.js → chunk-6L5L7JXG.js} +2 -2
  7. package/build/{chunk-XB57BXPK.js → chunk-AQJFGMCV.js} +4 -4
  8. package/build/{chunk-XB57BXPK.js.map → chunk-AQJFGMCV.js.map} +1 -1
  9. package/build/chunk-CUZEHDNU.js +4 -0
  10. package/build/chunk-CUZEHDNU.js.map +1 -0
  11. package/build/{chunk-ACTAIGWA.js → chunk-DYQCZVRJ.js} +2 -2
  12. package/build/{chunk-ANPGHE24.js → chunk-F7PP74XB.js} +2 -2
  13. package/build/chunk-F7PP74XB.js.map +1 -0
  14. package/build/{chunk-LCQ5YWX3.js → chunk-GIQJZQOY.js} +2 -2
  15. package/build/{chunk-PVZF2B55.js → chunk-GMGDB2P3.js} +2 -2
  16. package/build/{chunk-WY4PNXSL.js → chunk-HYMGR3RL.js} +2 -2
  17. package/build/{chunk-G55TTMWE.js → chunk-LI2OYXRM.js} +2 -2
  18. package/build/chunk-LI2OYXRM.js.map +1 -0
  19. package/build/chunk-NRX52J22.js +4 -0
  20. package/build/chunk-NRX52J22.js.map +1 -0
  21. package/build/{chunk-Y47HDJI3.js → chunk-NSDARQ67.js} +2 -2
  22. package/build/{chunk-75LUETYR.js → chunk-SFVFECH6.js} +2 -2
  23. package/build/{chunk-64BT6U7B.js → chunk-T7C26E3I.js} +2 -2
  24. package/build/{chunk-64BT6U7B.js.map → chunk-T7C26E3I.js.map} +1 -1
  25. package/build/{chunk-PAIXCGVA.js → chunk-UDD4OHCT.js} +16 -16
  26. package/build/{chunk-PAIXCGVA.js.map → chunk-UDD4OHCT.js.map} +1 -1
  27. package/build/{chunk-DGQKIB5L.js → chunk-WP6OBMGC.js} +2 -2
  28. package/build/{chunk-FGMHBV72.js → chunk-X5FGKR74.js} +2 -2
  29. package/build/{dev-TUFLYMKF.js → dev-UTUJUJOU.js} +12 -12
  30. package/build/{dev-TUFLYMKF.js.map → dev-UTUJUJOU.js.map} +1 -1
  31. package/build/index.js +3 -3
  32. package/build/{install-YEMFIUP5.js → install-JAJXVRCS.js} +2 -2
  33. package/build/{preview-VQZYPOVH.js → preview-7TNN4CID.js} +2 -2
  34. package/build/{publish-CK7HEF4E.js → publish-OPLHKLGT.js} +2 -2
  35. package/build/{render-command-PYYKSQIR.js → render-command-RMLVUEMM.js} +2 -2
  36. package/build/{run-command-GNB45EMQ.js → run-command-VVLPCPAA.js} +2 -2
  37. package/build/{src-MRLKTCAZ.js → src-CZRQVWWJ.js} +2 -2
  38. package/build/{src-S6J3ZUBK.js → src-H4I2HRVN.js} +2 -2
  39. package/build/{src-CCWGRSX4.js → src-YMGQ6GZL.js} +2 -2
  40. package/build/sync-types-SCIS2C6G.js +4 -0
  41. package/build/{uninstall-S4LM37YV.js → uninstall-XXDICDQ3.js} +2 -2
  42. package/package.json +3 -3
  43. package/build/chunk-ANPGHE24.js.map +0 -1
  44. package/build/chunk-G55TTMWE.js.map +0 -1
  45. package/build/chunk-NWTFQJ5S.js +0 -4
  46. package/build/chunk-NWTFQJ5S.js.map +0 -1
  47. package/build/chunk-ZGQTJ77P.js +0 -4
  48. package/build/chunk-ZGQTJ77P.js.map +0 -1
  49. package/build/sync-types-DRU4GIWT.js +0 -4
  50. /package/build/{LoginCommand-YGOTR5PT.js.map → LoginCommand-76EGX52P.js.map} +0 -0
  51. /package/build/{LogoutCommand-SQMPWE2Z.js.map → LogoutCommand-TOCECSGL.js.map} +0 -0
  52. /package/build/{WhoamiCommand-ZDSABBMG.js.map → WhoamiCommand-W7GLY3WG.js.map} +0 -0
  53. /package/build/{chunk-6UKTFHIT.js.map → chunk-4DD6IIYB.js.map} +0 -0
  54. /package/build/{chunk-6WLGSATJ.js.map → chunk-4Y2R5QID.js.map} +0 -0
  55. /package/build/{chunk-DUM2ZCCI.js.map → chunk-6L5L7JXG.js.map} +0 -0
  56. /package/build/{chunk-ACTAIGWA.js.map → chunk-DYQCZVRJ.js.map} +0 -0
  57. /package/build/{chunk-LCQ5YWX3.js.map → chunk-GIQJZQOY.js.map} +0 -0
  58. /package/build/{chunk-PVZF2B55.js.map → chunk-GMGDB2P3.js.map} +0 -0
  59. /package/build/{chunk-WY4PNXSL.js.map → chunk-HYMGR3RL.js.map} +0 -0
  60. /package/build/{chunk-Y47HDJI3.js.map → chunk-NSDARQ67.js.map} +0 -0
  61. /package/build/{chunk-75LUETYR.js.map → chunk-SFVFECH6.js.map} +0 -0
  62. /package/build/{chunk-DGQKIB5L.js.map → chunk-WP6OBMGC.js.map} +0 -0
  63. /package/build/{chunk-FGMHBV72.js.map → chunk-X5FGKR74.js.map} +0 -0
  64. /package/build/{install-YEMFIUP5.js.map → install-JAJXVRCS.js.map} +0 -0
  65. /package/build/{preview-VQZYPOVH.js.map → preview-7TNN4CID.js.map} +0 -0
  66. /package/build/{publish-CK7HEF4E.js.map → publish-OPLHKLGT.js.map} +0 -0
  67. /package/build/{render-command-PYYKSQIR.js.map → render-command-RMLVUEMM.js.map} +0 -0
  68. /package/build/{run-command-GNB45EMQ.js.map → run-command-VVLPCPAA.js.map} +0 -0
  69. /package/build/{src-CCWGRSX4.js.map → src-CZRQVWWJ.js.map} +0 -0
  70. /package/build/{src-MRLKTCAZ.js.map → src-H4I2HRVN.js.map} +0 -0
  71. /package/build/{src-S6J3ZUBK.js.map → src-YMGQ6GZL.js.map} +0 -0
  72. /package/build/{sync-types-DRU4GIWT.js.map → sync-types-SCIS2C6G.js.map} +0 -0
  73. /package/build/{uninstall-S4LM37YV.js.map → uninstall-XXDICDQ3.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
- import"./chunk-ANPGHE24.js";import{a as b}from"./chunk-6WLGSATJ.js";import{m as x,o as U}from"./chunk-G55TTMWE.js";import{i as C,k as P}from"./chunk-PAIXCGVA.js";import{a as I,e as a,g as y,n as L,t as g,u as S}from"./chunk-FGMHBV72.js";import"./chunk-CNRVJIPG.js";import"./chunk-SYHT5LTW.js";import"./chunk-K656WQZA.js";import"./chunk-TVMTOQUC.js";import"./chunk-F67LDVCV.js";import"./chunk-ZBJRW65P.js";import"./chunk-J3IJS26Z.js";import"./chunk-CJ3JTOGS.js";import"./chunk-64BT6U7B.js";import"./chunk-ZGQTJ77P.js";import"./chunk-NWTFQJ5S.js";import{a as F}from"./chunk-XB57BXPK.js";import{e as p,i as n}from"./chunk-UO4ZAUJK.js";n();n();var o=p(I(),1);var i=p(F(),1);n();var e=p(I(),1);var _=({userInfo:s,onSubmit:t})=>{let{t:m}=S();return e.default.createElement(e.default.Fragment,null,e.default.createElement(g,{i18nKey:"login_command.already_logged_in.warning",components:[e.default.createElement(a,{skin:"legacyBlue"})],values:{email:s.email}}),e.default.createElement(y,{label:m("login_command.already_logged_in.confirm"),initialValue:!0,onSubmit:t}))};var l=(0,i.variant)({PendingUserConfirmation:{},InProgress:{},Success:(0,i.fields)()}),T=({apiKeyToken:s,userInfo:t})=>{let m=L(),u=C(),d=P(),[v,f]=(0,o.useState)(t===null?l.InProgress():l.PendingUserConfirmation()),c=(0,o.useCallback)(({userInfo:r})=>{u.setUser({id:r.userId}),b(d,r.userId),f(l.Success({userInfo:r}))},[f,u,d]);return o.default.createElement(o.default.Fragment,null,t&&o.default.createElement(_,{userInfo:t,onSubmit:r=>r&&f(l.InProgress())}),(0,i.match)(v,{PendingUserConfirmation:()=>null,InProgress:()=>s?o.default.createElement(x,{token:s,onLogin:c,onError:m}):o.default.createElement(U,{onLogin:c,onError:m}),Success:({userInfo:r})=>o.default.createElement(g,{i18nKey:"login_command.success",components:[o.default.createElement(a,{skin:"legacyBlue"})],values:{email:r.email}})}))};export{T as LoginCommand};
4
- //# sourceMappingURL=LoginCommand-YGOTR5PT.js.map
3
+ import"./chunk-F7PP74XB.js";import{a as b}from"./chunk-4Y2R5QID.js";import{m as x,o as U}from"./chunk-LI2OYXRM.js";import{i as C,k as P}from"./chunk-UDD4OHCT.js";import{a as I,e as a,g as y,n as L,t as g,u as S}from"./chunk-X5FGKR74.js";import"./chunk-CNRVJIPG.js";import"./chunk-SYHT5LTW.js";import"./chunk-K656WQZA.js";import"./chunk-TVMTOQUC.js";import"./chunk-F67LDVCV.js";import"./chunk-ZBJRW65P.js";import"./chunk-J3IJS26Z.js";import"./chunk-CJ3JTOGS.js";import"./chunk-T7C26E3I.js";import"./chunk-NRX52J22.js";import"./chunk-CUZEHDNU.js";import{a as F}from"./chunk-AQJFGMCV.js";import{e as p,i as n}from"./chunk-UO4ZAUJK.js";n();n();var o=p(I(),1);var i=p(F(),1);n();var e=p(I(),1);var _=({userInfo:s,onSubmit:t})=>{let{t:m}=S();return e.default.createElement(e.default.Fragment,null,e.default.createElement(g,{i18nKey:"login_command.already_logged_in.warning",components:[e.default.createElement(a,{skin:"legacyBlue"})],values:{email:s.email}}),e.default.createElement(y,{label:m("login_command.already_logged_in.confirm"),initialValue:!0,onSubmit:t}))};var l=(0,i.variant)({PendingUserConfirmation:{},InProgress:{},Success:(0,i.fields)()}),T=({apiKeyToken:s,userInfo:t})=>{let m=L(),u=C(),d=P(),[v,f]=(0,o.useState)(t===null?l.InProgress():l.PendingUserConfirmation()),c=(0,o.useCallback)(({userInfo:r})=>{u.setUser({id:r.userId}),b(d,r.userId),f(l.Success({userInfo:r}))},[f,u,d]);return o.default.createElement(o.default.Fragment,null,t&&o.default.createElement(_,{userInfo:t,onSubmit:r=>r&&f(l.InProgress())}),(0,i.match)(v,{PendingUserConfirmation:()=>null,InProgress:()=>s?o.default.createElement(x,{token:s,onLogin:c,onError:m}):o.default.createElement(U,{onLogin:c,onError:m}),Success:({userInfo:r})=>o.default.createElement(g,{i18nKey:"login_command.success",components:[o.default.createElement(a,{skin:"legacyBlue"})],values:{email:r.email}})}))};export{T as LoginCommand};
4
+ //# sourceMappingURL=LoginCommand-76EGX52P.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
- import{k as a}from"./chunk-G55TTMWE.js";import"./chunk-PAIXCGVA.js";import{a as _,b as i,e as l,g as e,m as s,p as f,t as n,u as g}from"./chunk-FGMHBV72.js";import"./chunk-CNRVJIPG.js";import"./chunk-SYHT5LTW.js";import"./chunk-K656WQZA.js";import"./chunk-TVMTOQUC.js";import"./chunk-F67LDVCV.js";import"./chunk-ZBJRW65P.js";import"./chunk-J3IJS26Z.js";import"./chunk-CJ3JTOGS.js";import"./chunk-ZGQTJ77P.js";import"./chunk-NWTFQJ5S.js";import{a as x}from"./chunk-XB57BXPK.js";import{e as u,i as t}from"./chunk-UO4ZAUJK.js";t();t();var o=u(_(),1);var p=u(x(),1),C=({userInfo:c})=>{let{t:r}=g(),m=f(a);return c===null?o.default.createElement(n,{i18nKey:"logout_command.not_logged_in"}):o.default.createElement(o.default.Fragment,null,o.default.createElement(i,{marginBottom:1},o.default.createElement(n,{i18nKey:"logout_command.logout_warning"})),o.default.createElement(e,{label:r("logout_command.logout_confirm"),initialValue:!0,onSubmit:d=>{d&&m.execute()}}),(0,p.match)(m.status,{NotRequested:()=>null,Error:()=>null,Loading:()=>o.default.createElement(s,null),Success:()=>o.default.createElement(l,null,r("logout_command.logout_success"))}))};export{C as LogoutCommand};
4
- //# sourceMappingURL=LogoutCommand-SQMPWE2Z.js.map
3
+ import{k as a}from"./chunk-LI2OYXRM.js";import"./chunk-UDD4OHCT.js";import{a as _,b as i,e as l,g as e,m as s,p as f,t as n,u as g}from"./chunk-X5FGKR74.js";import"./chunk-CNRVJIPG.js";import"./chunk-SYHT5LTW.js";import"./chunk-K656WQZA.js";import"./chunk-TVMTOQUC.js";import"./chunk-F67LDVCV.js";import"./chunk-ZBJRW65P.js";import"./chunk-J3IJS26Z.js";import"./chunk-CJ3JTOGS.js";import"./chunk-NRX52J22.js";import"./chunk-CUZEHDNU.js";import{a as x}from"./chunk-AQJFGMCV.js";import{e as u,i as t}from"./chunk-UO4ZAUJK.js";t();t();var o=u(_(),1);var p=u(x(),1),C=({userInfo:c})=>{let{t:r}=g(),m=f(a);return c===null?o.default.createElement(n,{i18nKey:"logout_command.not_logged_in"}):o.default.createElement(o.default.Fragment,null,o.default.createElement(i,{marginBottom:1},o.default.createElement(n,{i18nKey:"logout_command.logout_warning"})),o.default.createElement(e,{label:r("logout_command.logout_confirm"),initialValue:!0,onSubmit:d=>{d&&m.execute()}}),(0,p.match)(m.status,{NotRequested:()=>null,Error:()=>null,Loading:()=>o.default.createElement(s,null),Success:()=>o.default.createElement(l,null,r("logout_command.logout_success"))}))};export{C as LogoutCommand};
4
+ //# sourceMappingURL=LogoutCommand-TOCECSGL.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
- import{a as e,e as t,t as i,u as a}from"./chunk-FGMHBV72.js";import"./chunk-SYHT5LTW.js";import"./chunk-K656WQZA.js";import"./chunk-F67LDVCV.js";import"./chunk-ZBJRW65P.js";import"./chunk-NWTFQJ5S.js";import"./chunk-XB57BXPK.js";import{e as n,i as r}from"./chunk-UO4ZAUJK.js";r();var m=n(e(),1);r();var p=n(e(),1);var f=()=>{let{t:o}=a();return p.default.createElement(t,null,o("app.unauthenticated"))};var C=({userInfo:o})=>o===null?m.default.createElement(f,null):m.default.createElement(i,{i18nKey:"whoami_command.logged_in",components:[m.default.createElement(t,{skin:"warning",bold:!0})],values:{email:o.email}});export{C as WhoamiCommand};
4
- //# sourceMappingURL=WhoamiCommand-ZDSABBMG.js.map
3
+ import{a as e,e as t,t as i,u as a}from"./chunk-X5FGKR74.js";import"./chunk-SYHT5LTW.js";import"./chunk-K656WQZA.js";import"./chunk-F67LDVCV.js";import"./chunk-ZBJRW65P.js";import"./chunk-CUZEHDNU.js";import"./chunk-AQJFGMCV.js";import{e as n,i as r}from"./chunk-UO4ZAUJK.js";r();var m=n(e(),1);r();var p=n(e(),1);var f=()=>{let{t:o}=a();return p.default.createElement(t,null,o("app.unauthenticated"))};var C=({userInfo:o})=>o===null?m.default.createElement(f,null):m.default.createElement(i,{i18nKey:"whoami_command.logged_in",components:[m.default.createElement(t,{skin:"warning",bold:!0})],values:{email:o.email}});export{C as WhoamiCommand};
4
+ //# sourceMappingURL=WhoamiCommand-W7GLY3WG.js.map
@@ -1,6 +1,6 @@
1
1
  import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
- import{a as k}from"./chunk-6TDWVLRD.js";import{a as P,b as v,c as W}from"./chunk-G55TTMWE.js";import{k as $}from"./chunk-FGMHBV72.js";import{c as t}from"./chunk-ZBJRW65P.js";import{e as w}from"./chunk-64BT6U7B.js";import{b as R}from"./chunk-NWTFQJ5S.js";import{c as T,e as L}from"./chunk-XB57BXPK.js";import{i as y}from"./chunk-UO4ZAUJK.js";y();async function re({type:e,authState:o},p,_){let{minRetryTimeout:b}=R(),m={type:e,getAppToken:o?.getAccessToken,createHeaders:o?.getRequestHeaders};try{return await(_?W(()=>v(m).request(p),{..._,minTimeout:b}):v(m).request(p))}catch(l){throw P(l)&&l.response?.status===403?new T({code:L.PermissionDenied(),cause:l}):l}}y();function me({t:e}){let o=k(),p=()=>o.log(t.dim(e("general.aborting"))),_=()=>{let n=o.logWithLoader({text:e("dev_command.syncing_local_code_start"),discardStdin:!1});return{success:()=>{let i=e("dev_command.syncing_local_code_end");return n.succeed(i),i},fail:()=>n.stop()}},b=({revision:n})=>{let i=e("dev_command.revision_created",{revision:n,configFileName:w});return o.log(i),i},m=n=>{let i=C(n);o.logWithLoader(e("dev_command.failed_to_delete_types_dir",{cause:i})).fail(),u()},l=n=>{let i=o.logWithLoader({text:e("dev_command.syncing_types_to_revision_start",{revision:n})});return{success:()=>{i.succeed(e("dev_command.syncing_types_to_revision_end",{revision:n}))},fail:()=>{i.fail(e("dev_command.syncing_types_to_revision_fail_line1")),o.log(` ${e("dev_command.syncing_types_to_revision_fail_line2")}`),u(),o.log(` ${e("dev_command.syncing_types_to_revision_fail_line3")}`),u()}}},D=n=>{let i=o.logWithLoader({text:e("dev_command.syncing_pages_to_revision_start",{revision:n}),discardStdin:!1});return{success:()=>{i.succeed(e("dev_command.syncing_pages_to_revision_end",{revision:n}))},fail:()=>i.fail()}},u=()=>o.log(""),F=({dependencyName:n,dependencyVersion:i})=>o.log(t.green(e("dependencies.dependency_installed",{dependency:t.bold.green(`${n}${i?`@${i}`:""}`)}))),S=(n,i)=>{let r=o.logWithLoader({text:t.yellow(e("dependencies.installing_dependency",{dependency:t.bold.yellow(`${n}${i?`@${i}`:""}`)}))});return()=>{r.stop(),F({dependencyName:n,dependencyVersion:i})}},x=()=>o.log(t.green(e("dependencies.all_dependencies_installed"))),O=()=>{let n=o.logWithLoader({text:t.yellow(e("dependencies.installing_all_dependencies"))});return()=>{n.stop(),x()}},A=({dependencyName:n})=>o.log(t.green(e("dependencies.dependency_uninstalled",{dependency:t.bold.green(n)})));return{t:e,logAborting:p,logSyncingLocalCode:_,logRecoverableFailureToRemoveTypesDir:m,logUpdatedLocalCodeToRevision:b,logSyncingPagesToRevision:D,logSyncingTypesToRevision:l,logDependencyInstalling:S,logDependencyUninstalling:n=>{let i=o.logWithLoader({text:t.yellow(e("dependencies.uninstalling_dependency",{dependency:t.bold.yellow(n)}))});return()=>{i.stop(),A({dependencyName:n})}},logAllDependenciesInstalling:O,logOpeningBrowser:n=>{o.log(e("dev_command.opening_browser")),n&&o.log(e("dev_command.dev_server_url.approve_cert"))},logNoOpenedTab:n=>{let i=e("dev_command.no_open_editor",{key:t.bold.italic("e"),link:n});return o.log(i),i},logPublishRevision:({branchName:n,isLocalDeployment:i,currentRevision:r,latestRevision:g,preview:a})=>o.log(`
3
+ import{a as k}from"./chunk-6TDWVLRD.js";import{a as P,b as v,c as W}from"./chunk-LI2OYXRM.js";import{k as $}from"./chunk-X5FGKR74.js";import{c as t}from"./chunk-ZBJRW65P.js";import{e as w}from"./chunk-T7C26E3I.js";import{b as R}from"./chunk-CUZEHDNU.js";import{c as T,e as L}from"./chunk-AQJFGMCV.js";import{i as y}from"./chunk-UO4ZAUJK.js";y();async function re({type:e,authState:o},p,_){let{minRetryTimeout:b}=R(),m={type:e,getAppToken:o?.getAccessToken,createHeaders:o?.getRequestHeaders};try{return await(_?W(()=>v(m).request(p),{..._,minTimeout:b}):v(m).request(p))}catch(l){throw P(l)&&l.response?.status===403?new T({code:L.PermissionDenied(),cause:l}):l}}y();function me({t:e}){let o=k(),p=()=>o.log(t.dim(e("general.aborting"))),_=()=>{let n=o.logWithLoader({text:e("dev_command.syncing_local_code_start"),discardStdin:!1});return{success:()=>{let i=e("dev_command.syncing_local_code_end");return n.succeed(i),i},fail:()=>n.stop()}},b=({revision:n})=>{let i=e("dev_command.revision_created",{revision:n,configFileName:w});return o.log(i),i},m=n=>{let i=C(n);o.logWithLoader(e("dev_command.failed_to_delete_types_dir",{cause:i})).fail(),u()},l=n=>{let i=o.logWithLoader({text:e("dev_command.syncing_types_to_revision_start",{revision:n})});return{success:()=>{i.succeed(e("dev_command.syncing_types_to_revision_end",{revision:n}))},fail:()=>{i.fail(e("dev_command.syncing_types_to_revision_fail_line1")),o.log(` ${e("dev_command.syncing_types_to_revision_fail_line2")}`),u(),o.log(` ${e("dev_command.syncing_types_to_revision_fail_line3")}`),u()}}},D=n=>{let i=o.logWithLoader({text:e("dev_command.syncing_pages_to_revision_start",{revision:n}),discardStdin:!1});return{success:()=>{i.succeed(e("dev_command.syncing_pages_to_revision_end",{revision:n}))},fail:()=>i.fail()}},u=()=>o.log(""),F=({dependencyName:n,dependencyVersion:i})=>o.log(t.green(e("dependencies.dependency_installed",{dependency:t.bold.green(`${n}${i?`@${i}`:""}`)}))),S=(n,i)=>{let r=o.logWithLoader({text:t.yellow(e("dependencies.installing_dependency",{dependency:t.bold.yellow(`${n}${i?`@${i}`:""}`)}))});return()=>{r.stop(),F({dependencyName:n,dependencyVersion:i})}},x=()=>o.log(t.green(e("dependencies.all_dependencies_installed"))),O=()=>{let n=o.logWithLoader({text:t.yellow(e("dependencies.installing_all_dependencies"))});return()=>{n.stop(),x()}},A=({dependencyName:n})=>o.log(t.green(e("dependencies.dependency_uninstalled",{dependency:t.bold.green(n)})));return{t:e,logAborting:p,logSyncingLocalCode:_,logRecoverableFailureToRemoveTypesDir:m,logUpdatedLocalCodeToRevision:b,logSyncingPagesToRevision:D,logSyncingTypesToRevision:l,logDependencyInstalling:S,logDependencyUninstalling:n=>{let i=o.logWithLoader({text:t.yellow(e("dependencies.uninstalling_dependency",{dependency:t.bold.yellow(n)}))});return()=>{i.stop(),A({dependencyName:n})}},logAllDependenciesInstalling:O,logOpeningBrowser:n=>{o.log(e("dev_command.opening_browser")),n&&o.log(e("dev_command.dev_server_url.approve_cert"))},logNoOpenedTab:n=>{let i=e("dev_command.no_open_editor",{key:t.bold.italic("e"),link:n});return o.log(i),i},logPublishRevision:({branchName:n,isLocalDeployment:i,currentRevision:r,latestRevision:g,preview:a})=>o.log(`
4
4
  ${a?`${e("publish_command.publish_details_preview")}
5
5
  ${t.underline(t.blue(a.deploymentShortUrl??a.deploymentUrl))}`:""}
6
6
 
@@ -29,4 +29,4 @@ ${a}
29
29
  `,c.description){let d=JSON.parse(c.description);for(let h in d)s+=`
30
30
  ${f}${i} ${h} | `,s+=N(d[h].toString())}}),s+=`
31
31
  ${a}`,o.log(s)},logPreviewing:()=>{let n=o.logWithLoader({text:e("publish_command.creating_preview"),discardStdin:!1});return{success:()=>n.succeed(e("publish_command.creating_preview_success")),fail:()=>n.fail(e("publish_command.creating_preview_failed")),stop:()=>n.stop()}},logWmlChangesRecieved:n=>o.log(t.green(`WML changes recieved for ${n.join(",")}`)),logWmlLocalFilesChangedForPage:n=>o.log(t.green(`Detected changes to local WML for ${n}, updating editor...`)),logWmlWriteResult:({skip:n,write:i})=>o.log(t.green(`Performed WML save to disk: wrote ${i.length} files. ${n.length>0?`Skipped ${n.length} files because there were no changes.`:""}`))}}function C(e){return e instanceof Error?e.message:JSON.stringify(e)}export{re as a,me as b};
32
- //# sourceMappingURL=chunk-6UKTFHIT.js.map
32
+ //# sourceMappingURL=chunk-4DD6IIYB.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
- import{c as Pe,d as R,e as O}from"./chunk-CNRVJIPG.js";import{a as Ee,e as S,g as U,h as G,k as Be}from"./chunk-SYHT5LTW.js";import{k as I}from"./chunk-64BT6U7B.js";import{b as z}from"./chunk-NWTFQJ5S.js";import{f as Q,g as H}from"./chunk-XB57BXPK.js";import{c as m,e as T,i as o}from"./chunk-UO4ZAUJK.js";var E=m((qt,p)=>{"use strict";o();var Fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function Le(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function Me(r,t){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:r}function Ne(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(r,t):r.__proto__=t)}var y=function(r){Ne(t,r);function t(e){Le(this,t);var n=Me(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.name=n.constructor.name,n}return t}(Error);function qe(r,t){if(r===void 0)throw new y(t)}function Ae(r,t){if(r!==void 0&&((typeof r>"u"?"undefined":Fe(r))!=="object"||Array.isArray(r)||r===null))throw new y(t)}function Ve(r,t){if(!r)throw new y(t)}function ze(r,t){if(r!==void 0&&typeof r!="function")throw new y(t)}function Qe(r,t){if(r!==void 0&&typeof r!="boolean")throw new y(t)}function He(r,t){if(r!==void 0&&typeof r!="number")throw new y(t)}function Ue(r,t){if(typeof Array.isArray=="function"){if(!Array.isArray(r))throw new y(t)}else if(Object.prototype.toString.call(r)!=="[object Array]")throw new y(t)}p.exports.defined=qe;p.exports.object=Ae;p.exports.ok=Ve;p.exports.func=ze;p.exports.boolean=Qe;p.exports.number=He;p.exports.array=Ue;p.exports.AssertionError=y});var Y=m((Vt,C)=>{"use strict";o();C.exports.mapValues=function(r,t){return r?Object.keys(r).reduce(function(e,n){return e[n]=t(r[n],n,r),e},{}):{}};C.exports.filterValues=function(r,t){return r?Object.keys(r).reduce(function(e,n){var i=t(r[n],n,r);return i&&(e[n]=r[n]),e},{}):{}}});var Z=m((Qt,j)=>{"use strict";o();j.exports.timedPromise=function(r,t){var e=t.message,n=t.timeout,i=new Promise(function(a,u){setTimeout(u,n,e?"Timeout: "+e:"Timeout")});return Promise.race([r,i])};j.exports.allAsObject=function(r){var t=Object.keys(r);return Promise.all(t.map(function(e){return r[e]})).then(function(e){return e.reduce(function(n,i,a){return n[t[a]]=i,n},{})})}});var K=m((Ut,$)=>{"use strict";o();$.exports={error:function(){if(console&&console.error){var t;(t=console).error.apply(t,arguments)}}}});var te=m((Rt,ee)=>{"use strict";o();function Ge(r,t,e){var n=void 0;return function(){var i=this,a=arguments,u=function(){n=null,e||r.apply(i,a)},s=e&&!n;clearTimeout(n),n=setTimeout(u,t),s&&r.apply(i,a)}}ee.exports=Ge});var ne=m((Jt,re)=>{"use strict";o();function Re(r,t){var e=void 0;return function(){for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];e||(e=setTimeout(function(){r.apply(void 0,i),e=null},t))}}re.exports=Re});var B=m((Xt,ie)=>{"use strict";o();var Ie=function(){function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),Je=function(){function r(t,e){var n=[],i=!0,a=!1,u=void 0;try{for(var s=t[Symbol.iterator](),h;!(i=(h=s.next()).done)&&(n.push(h.value),!(e&&n.length===e));i=!0);}catch(c){a=!0,u=c}finally{try{!i&&s.return&&s.return()}finally{if(a)throw u}}return n}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return r(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),F=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r};function We(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}var Xe=te(),Ye=ne(),Ze=function(t,e,n){return{dt:Date.now()-n,f:t,context:e}},$e=function(t,e){return{dt:Date.now()-e,e:t,g:{}}},Ke=function(t){var e={},n=t.e.length,i=t.e.map(function(u){var s=Object.keys(u.f).map(function(h){var c=u.f[h],f=h+"|"+c;return e[f]=e[f]||0,e[f]++,[h,c,f]});return F({},u,{f:s})}),a={};return i=i.map(function(u){var s=u.f.reduce(function(h,c){var f=Je(c,3),v=f[0],d=f[1],g=f[2];return e[g]===n?a[v]=d:h[v]=d,h},{});return F({},u,{f:s})}),F({},t,{e:i,g:a})},et=function(){function r(){We(this,r),this._initilized=!1}return Ie(r,[{key:"_reset",value:function(){var e=this;this._startTime=Date.now(),this._resolve=null,this._promise=new Promise(function(n){return e._resolve=n})}},{key:"init",value:function(e,n){var i=this,a=e.delayMs,u=e.maxBatchSize,s=e.useThrottle,h=e.optimizeBatch;this._initilized||(this._maxBatchSize=u,this._optimizeBatch=h,this._queue=[],this._flushHandler=n,this._flushDebounced=s?Ye(function(){return i.flush()},a):Xe(function(){return i.flush()},a),this._initilized=!0,this._reset())}},{key:"flush",value:function(){if(!this._queue.length)return Promise.resolve();var e=this._queue.splice(0,this._queue.length),n=this._resolve,i=this._startTime;this._reset();var a=$e(e,i);return this._optimizeBatch&&(a=Ke(a)),this._flushHandler(a).then(n)}},{key:"feed",value:function(e,n){return this._queue.push(Ze(e,n,this._startTime)),this._queue.length===this._maxBatchSize?this.flush():(this._flushDebounced(),this._promise)}}]),r}();ie.exports=et});var oe=m((Zt,ue)=>{"use strict";o();var tt={functional:!0,analytics:!0,__default:!0},rt=function(t){return typeof t=="function"&&t()||tt},ae=function(t){return t.functional===!1||t.analytics===!1},nt=function(t,e){return e==="essential"?!1:e==="functional"||e==="analytics"?t[e]===!1:ae(t)};ue.exports={shouldMuteNonEssentials:ae,shouldMuteByCategory:nt,getPolicy:rt}});var M=m((Kt,de)=>{"use strict";o();var D=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},it=function(){function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}();function at(r,t){var e={};for(var n in r)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}function ut(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}var x=E(),he=Y(),se=he.mapValues,le=he.filterValues,fe=Z(),ot=K(),st=B(),L=oe(),lt=L.shouldMuteByCategory,ce=L.shouldMuteNonEssentials,ft=L.getPolicy,ct=function(){function r(t,e){ut(this,r),this._publishers=t.publishers,this._validators=t.validators||[],this._defaults=t.defaults,this._ownDefaults={},this._events=t.events||{},this._context=e||{},this._defaultValueTimeout=t.defaultValueTimeout||5e3,this._defaultContinueOnFail=t.defaultContinueOnFail||!1,this._onPublisherFailHandler=t.onPublisherFailHandler||r._defaultPublisherFailHandler,this._isMuted=t.isMuted||function(){return!1},this._eventTransformer=t.eventTransformer||function(n){return n},this._payloadTransformer=t.payloadTransformer||function(n){return n},this._consentPolicyGetter=t.consentPolicyGetter||function(){return null},this._nonEssentialDefaults=t.nonEssentialDefaults||{},this._maxBatchSize=t.maxBatchSize||100,this._globalBatchQueue=t.globalBatchQueue}return it(r,[{key:"report",value:function(e){x.defined(e,"Data must be provided"),x.object(e,"Data must be an object");var n=e.src,i=e.evid,a=e.params,u=at(e,["src","evid","params"]);return this.log(D({src:n,evid:i},a),u)}},{key:"log",value:function(e,n,i){var a=this;x.defined(e,"Event object or event key must be provided.");var u=this._extractEventAndContext(e,n,i),s=u.event,h=u.context,c=ft(this._consentPolicyGetter),f=D({},this._context,h);if(this._isMuted()||lt(c,f.category))return Promise.resolve();if(f.useBatch){var v=this._initQueue(f,c),d=function(_){var P=a._eventTransformer(_,f);return v.feed(P,f)};if(this._globalBatchQueue)return this._getDefaults(this._defaults).then(function(w){var _=D({},w,a._getDynamicNonEssentialDefaults(c),a._getStaticNonEssentialDefaults(c),s,a._getPolicyFields(c,f.category));return d(_)});var g=D({},this._getDynamicDefaults(this._defaults),this._getDynamicNonEssentialDefaults(c),s,this._getPolicyFields(c,f.category));return d(g)}return this._getDefaults(this._defaults).then(function(w){var _=Object.assign(w,a._getDynamicNonEssentialDefaults(c),a._getStaticNonEssentialDefaults(c),s,a._getPolicyFields(c,f.category)),P=a._validators.length===0?!0:a._validators.some(function(V){return V.match(_)&&(V.execute(_)||!0)});if(!P)throw new Error("No validator accepted the event. Source: "+_.src+" Evid: "+(_.evid||_.evtId));var k=a._eventTransformer(_,f);return k=a._payloadTransformer(k,f),a._send(k,f)})}},{key:"flush",value:function(){return this._queue?this._queue.flush():Promise.resolve()}},{key:"updateDefaults",value:function(e){return x.defined(e,"Defaults must be provided"),x.object(e,"Defaults must be an object"),Object.assign(this._ownDefaults,e),this}},{key:"_send",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Promise.all(this._publishers.map(function(a){var u=D({},e);return Promise.resolve().then(function(){return a(u,i)}).catch(function(s){return n._onPublisherFailHandler(s,{publisherName:a.name,payload:e})})})).then(function(){})}},{key:"_extractEventAndContext",value:function(e,n,i){var a=void 0,u={};if(typeof e!="string")a=e,u=n||u;else{if(a=this._events[e],!a)throw new x.AssertionError("Event with key '"+e+"' not found in event map.");n&&(a=D({},a,n),u=i||u)}return{event:a,context:u}}},{key:"_initQueue",value:function(e,n){var i=this;if(this._queue)return this._queue;this._queue=this._globalBatchQueue||new st;var a=function(s){i._globalBatchQueue||(s.g=Object.assign(i._getStaticDefaults(i._defaults),i._getStaticNonEssentialDefaults(n)));var h=i._payloadTransformer(s,e);return i._send(h,e)};return this._queue.init({delayMs:e.useBatch===!0?300:e.useBatch,maxBatchSize:this._maxBatchSize,useThrottle:!!this._globalBatchQueue,optimizeBatch:!!this._globalBatchQueue},a),this._queue}},{key:"_handleDefaultsError",value:function(e){return this._defaultContinueOnFail?(ot.error(e),null):Promise.reject(e)}},{key:"_getDynamicNonEssentialDefaults",value:function(e){if(!ce(e))return this._getDynamicDefaults(this._nonEssentialDefaults)}},{key:"_getStaticNonEssentialDefaults",value:function(e){if(!ce(e))return this._getStaticDefaults(this._nonEssentialDefaults)}},{key:"_withOwnDefaults",value:function(e){return Object.assign({},e,this._ownDefaults)}},{key:"_getDynamicDefaults",value:function(e){e=this._withOwnDefaults(e);var n=le(e,function(i){return typeof i=="function"});return se(n,function(i){return i()})}},{key:"_getStaticDefaults",value:function(e){e=this._withOwnDefaults(e);var n=le(e,function(i){return typeof i!="function"});return n}},{key:"_getDefaults",value:function(e){var n=this;if(e=this._withOwnDefaults(e),!e)return Promise.resolve({});var i=se(e,function(a,u){if(typeof a=="function")try{a=a()}catch(s){return n._handleDefaultsError(s)}return a&&typeof a.then=="function"?fe.timedPromise(a,{message:"Cannot get default value '"+u+" for BI Event'",timeout:n._defaultValueTimeout}).catch(function(s){return n._handleDefaultsError(s)}):a});return fe.allAsObject(i)}},{key:"_encodePolicyValue",value:function(e,n){return e?typeof e[n]=="boolean"?e[n]?1:0:e[n]:1}},{key:"_getPolicyFields",value:function(e,n){return{_isca:this._encodePolicyValue(e,"analytics"),_iscf:this._encodePolicyValue(e,"functional"),_ispd:e.__default?1:0,_ise:n==="essential"?1:0}}}],[{key:"_defaultPublisherFailHandler",value:function(e,n){var i=n.publisherName;return i}}]),r}();de.exports=ct});var N=m((tr,ge)=>{"use strict";o();var ht=function(){function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}();function dt(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}var me=E(),ve=function(){function r(){dt(this,r),this.reset()}return ht(r,[{key:"reset",value:function(){this._handlers=[]}},{key:"onLoggerCreated",value:function(e){var n=this;return me.defined(e,"Handler must be provided."),me.func(e,"Handler must be a function."),this._handlers.push(e),function(){var i=n._handlers.indexOf(e);i!==-1&&n._handlers.splice(i,1)}}},{key:"notifyLoggerCreated",value:function(e){this._handlers.forEach(function(n){return n(e)})}}]),r}();ge.exports={manager:new ve,BiLoggerManager:ve}});var ye=m((nr,_e)=>{"use strict";o();var mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},vt=function(){function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}();function gt(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}var l=E(),_t=M(),yt=N(),pt=B(),bt=function(){function r(){gt(this,r),this._publishers=[],this._validators=[],this._defaults={},this._nonEssentialDefaults={},this._events={},this._isMuted=!1,this._eventTransformer=null,this._payloadTransformer=null,this._consentPolicyGetter=null,this._maxBatchSize=null,this._batchQueue=null}return vt(r,[{key:"addPublisher",value:function(e){return l.defined(e,"Publisher must be provided"),l.ok(typeof e=="function","Expected a publisher function"),this._publishers.push(e),this}},{key:"addValidator",value:function(e){return l.defined(e,"Validator must be provided"),l.ok((typeof e>"u"?"undefined":mt(e))==="object"&&e,"Expected a validator object"),l.ok(e.execute&&e.match,"Provided validator does not match the interface"),this._validators.push(e),this}},{key:"setDefaults",value:function(e){return l.defined(e,"Defaults must be provided"),l.object(e,"Defaults must be an object"),this._defaults=e,this}},{key:"updateDefaults",value:function(e){return l.defined(e,"Defaults must be provided"),l.object(e,"Defaults must be an object"),Object.assign(this._defaults,e),this}},{key:"updateNonEssentialDefaults",value:function(e){return l.defined(e,"Non-essential Defaults must be provided"),l.object(e,"Non-essential Defaults must be an object"),Object.assign(this._nonEssentialDefaults,e),this}},{key:"setEvents",value:function(e){return l.defined(e,"Events must be provided"),l.object(e,"Events must be an object"),this._events=e,this}},{key:"setDefaultValueTimeout",value:function(e){return l.defined(e,"Default Value Timeout must be provided"),this._defaultValueTimeout=e,this}},{key:"setDefaultContinueOnFail",value:function(e){return l.defined(e,"Default Continue On Fail must be provided"),this._defaultContinueOnFail=e,this}},{key:"setPublisherFailHandler",value:function(e){return l.defined(e,"Publisher Fail Handler must be provided"),this._onPublisherFailHandler=e,this}},{key:"setMuted",value:function(e){return l.defined(e,"Is Muted must be provided"),l.boolean(e,"Is Muted must be a boolean"),this._isMuted=e,this}},{key:"setMaxBatchSize",value:function(e){return l.defined(e,"Max Batch Size must be provided"),l.number(e,"Max Batch Size must be a number"),l.ok(e>0,"Max Batch Size must be higher than 0"),this._maxBatchSize=e,this}},{key:"setGlobalBatchQueue",value:function(e){return l.defined(e,"Global Batch Queue must be provided"),l.ok(e instanceof pt,"Global Batch Queue must be an instance of BatchQueue"),this._globalBatchQueue=e,this}},{key:"withEventTransformer",value:function(e){return l.defined(e,"Event Transformer must be provided"),l.func(e,"Event Transformer must be a function"),this._eventTransformer=e,this}},{key:"withPayloadTransformer",value:function(e){return l.defined(e,"Payload Transformer must be provided"),l.func(e,"Payload Transformer must be a function"),this._payloadTransformer=e,this}},{key:"withConsentPolicyGetter",value:function(e){return l.defined(e,"Consent Policy Getter must be provided"),l.func(e,"Consent Policy Getter must be a function"),this._consentPolicyGetter=e,this}},{key:"logger",value:function(e){var n=this,i=new _t({publishers:this._publishers,validators:this._validators,defaults:this._defaults,events:this._events,defaultValueTimeout:this._defaultValueTimeout,defaultContinueOnFail:this._defaultContinueOnFail,onPublisherFailHandler:this._onPublisherFailHandler,isMuted:function(){return n._isMuted},eventTransformer:this._eventTransformer,payloadTransformer:this._payloadTransformer,consentPolicyGetter:this._consentPolicyGetter,nonEssentialDefaults:this._nonEssentialDefaults,maxBatchSize:this._maxBatchSize,globalBatchQueue:this._globalBatchQueue},e);return yt.manager.notifyLoggerCreated(i),i}}]),r}();_e.exports=bt});var we=m((ar,b)=>{"use strict";o();var pe=ye(),wt=M(),be=N(),Dt=B();b.exports.BiLoggerFactory=pe;b.exports.BiLogger=wt;b.exports.BiLoggerManager=be.BiLoggerManager;b.exports.factory=function(){return new pe};b.exports.manager=be.manager;b.exports.createBatchQueue=function(){return new Dt}});o();import{uptime as Ce}from"node:process";o();var J=T(Ee(),1);import ke from"node:os";import{platform as Te,version as Se}from"node:process";function W({cliVersion:r,flow:t}){return{...t?{flow:t}:{},cliVersion:r,isCI:J.default,nodeVersion:Se,osName:Oe(),osVersion:ke.release()}}function Oe(){switch(Te){case"darwin":return"mac";case"win32":return"windows";default:return"linux"}}var X=()=>Math.round(Ce()*1e3);function je({biLogger:r,command:t,flow:e,cliVersion:n,projectId:i,extensions:a,extraFields:u}){let s=t.opts(),h=t.args,c=new Set(["apiKey"]),f=Object.fromEntries(Object.entries(s).map(([d,g])=>{let w=c.has(d)?"<censored>":g;return[d,w]})),v={command:t.name(),arguments:h.join(","),flags:Object.keys(f).length?JSON.stringify(f):""};return r.report(R({...W({cliVersion:n,flow:e}),...v,...i?{projectId:i}:{},...u?{extraFields:JSON.stringify(u)}:{},isValid:!0})),{succeed(){r.report(O({...v,...a?{extensions:JSON.stringify(a)}:{},duration:X(),isSuccess:!0,isValid:!0}))},failed(d){let g=Q(d)?{errorType:H(d)?"SystemError":"UserError",errorName:d.name,errorMessage:d.message}:d instanceof Error?{errorType:"UnknownError",errorName:d.name,errorMessage:d.message}:{errorType:"UnknownError",errorMessage:JSON.stringify(d)};r.report(O({...v,...g,...a?{extensions:JSON.stringify(a)}:{},duration:X(),isSuccess:!1,isValid:!0}))}}}o();o();o();Be();var De=T(we()),xe=T(Pe()),xt={baseUrl:process.env.BI_BASE_URL||"https://frog.wix.com",endpoint:"",logError:!1},q=function(){function r(){}return r.prototype.factory=function(t){var e=this;t===void 0&&(t={});var n=S(S({},xt),t),i=De.default.factory();return n.onError&&i.setPublisherFailHandler(n.onError),i.addPublisher(function(a,u){return U(e,void 0,void 0,function(){var s,h,c,f,v;return G(this,function(d){switch(d.label){case 0:return s=u.endpoint||n.endpoint,h=n.baseUrl,c=n.userAgent,f=n.logError,v=c?{headers:{"User-Agent":c}}:{},[4,new xe.HttpClient({baseURL:h}).get(s,{headers:v,params:a,timeout:30*1e3}).catch(function(g){return f?console.error(g.toJSON()):Promise.reject(g)})];case 1:return d.sent(),[2]}})})}),i},r}();var sr=new q;o();import{randomUUID as Et}from"node:crypto";function Bt(r,t){r.updateDefaults(A(t))}function A(r){return r?{_client_id:r,_uuid:r,logged_user_id:r,logged_account_id:r,target_account_id:r}:{_client_id:Et()}}async function Pt(r,t){let e=z().biLoggerBaseUrl,n=e?{baseUrl:e}:{},i=A(t),{telemetry:a}=await I();return new q().factory(n).updateDefaults({localTime:()=>Date.now(),...r,...i}).setMuted(!a).logger()}export{Bt as a,Pt as b,je as c};
4
- //# sourceMappingURL=chunk-6WLGSATJ.js.map
3
+ import{c as Pe,d as R,e as O}from"./chunk-CNRVJIPG.js";import{a as Ee,e as S,g as U,h as G,k as Be}from"./chunk-SYHT5LTW.js";import{k as I}from"./chunk-T7C26E3I.js";import{b as z}from"./chunk-CUZEHDNU.js";import{f as Q,g as H}from"./chunk-AQJFGMCV.js";import{c as m,e as T,i as o}from"./chunk-UO4ZAUJK.js";var E=m((qt,p)=>{"use strict";o();var Fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function Le(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function Me(r,t){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:r}function Ne(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(r,t):r.__proto__=t)}var y=function(r){Ne(t,r);function t(e){Le(this,t);var n=Me(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.name=n.constructor.name,n}return t}(Error);function qe(r,t){if(r===void 0)throw new y(t)}function Ae(r,t){if(r!==void 0&&((typeof r>"u"?"undefined":Fe(r))!=="object"||Array.isArray(r)||r===null))throw new y(t)}function Ve(r,t){if(!r)throw new y(t)}function ze(r,t){if(r!==void 0&&typeof r!="function")throw new y(t)}function Qe(r,t){if(r!==void 0&&typeof r!="boolean")throw new y(t)}function He(r,t){if(r!==void 0&&typeof r!="number")throw new y(t)}function Ue(r,t){if(typeof Array.isArray=="function"){if(!Array.isArray(r))throw new y(t)}else if(Object.prototype.toString.call(r)!=="[object Array]")throw new y(t)}p.exports.defined=qe;p.exports.object=Ae;p.exports.ok=Ve;p.exports.func=ze;p.exports.boolean=Qe;p.exports.number=He;p.exports.array=Ue;p.exports.AssertionError=y});var Y=m((Vt,C)=>{"use strict";o();C.exports.mapValues=function(r,t){return r?Object.keys(r).reduce(function(e,n){return e[n]=t(r[n],n,r),e},{}):{}};C.exports.filterValues=function(r,t){return r?Object.keys(r).reduce(function(e,n){var i=t(r[n],n,r);return i&&(e[n]=r[n]),e},{}):{}}});var Z=m((Qt,j)=>{"use strict";o();j.exports.timedPromise=function(r,t){var e=t.message,n=t.timeout,i=new Promise(function(a,u){setTimeout(u,n,e?"Timeout: "+e:"Timeout")});return Promise.race([r,i])};j.exports.allAsObject=function(r){var t=Object.keys(r);return Promise.all(t.map(function(e){return r[e]})).then(function(e){return e.reduce(function(n,i,a){return n[t[a]]=i,n},{})})}});var K=m((Ut,$)=>{"use strict";o();$.exports={error:function(){if(console&&console.error){var t;(t=console).error.apply(t,arguments)}}}});var te=m((Rt,ee)=>{"use strict";o();function Ge(r,t,e){var n=void 0;return function(){var i=this,a=arguments,u=function(){n=null,e||r.apply(i,a)},s=e&&!n;clearTimeout(n),n=setTimeout(u,t),s&&r.apply(i,a)}}ee.exports=Ge});var ne=m((Jt,re)=>{"use strict";o();function Re(r,t){var e=void 0;return function(){for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];e||(e=setTimeout(function(){r.apply(void 0,i),e=null},t))}}re.exports=Re});var B=m((Xt,ie)=>{"use strict";o();var Ie=function(){function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}(),Je=function(){function r(t,e){var n=[],i=!0,a=!1,u=void 0;try{for(var s=t[Symbol.iterator](),h;!(i=(h=s.next()).done)&&(n.push(h.value),!(e&&n.length===e));i=!0);}catch(c){a=!0,u=c}finally{try{!i&&s.return&&s.return()}finally{if(a)throw u}}return n}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return r(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),F=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r};function We(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}var Xe=te(),Ye=ne(),Ze=function(t,e,n){return{dt:Date.now()-n,f:t,context:e}},$e=function(t,e){return{dt:Date.now()-e,e:t,g:{}}},Ke=function(t){var e={},n=t.e.length,i=t.e.map(function(u){var s=Object.keys(u.f).map(function(h){var c=u.f[h],f=h+"|"+c;return e[f]=e[f]||0,e[f]++,[h,c,f]});return F({},u,{f:s})}),a={};return i=i.map(function(u){var s=u.f.reduce(function(h,c){var f=Je(c,3),v=f[0],d=f[1],g=f[2];return e[g]===n?a[v]=d:h[v]=d,h},{});return F({},u,{f:s})}),F({},t,{e:i,g:a})},et=function(){function r(){We(this,r),this._initilized=!1}return Ie(r,[{key:"_reset",value:function(){var e=this;this._startTime=Date.now(),this._resolve=null,this._promise=new Promise(function(n){return e._resolve=n})}},{key:"init",value:function(e,n){var i=this,a=e.delayMs,u=e.maxBatchSize,s=e.useThrottle,h=e.optimizeBatch;this._initilized||(this._maxBatchSize=u,this._optimizeBatch=h,this._queue=[],this._flushHandler=n,this._flushDebounced=s?Ye(function(){return i.flush()},a):Xe(function(){return i.flush()},a),this._initilized=!0,this._reset())}},{key:"flush",value:function(){if(!this._queue.length)return Promise.resolve();var e=this._queue.splice(0,this._queue.length),n=this._resolve,i=this._startTime;this._reset();var a=$e(e,i);return this._optimizeBatch&&(a=Ke(a)),this._flushHandler(a).then(n)}},{key:"feed",value:function(e,n){return this._queue.push(Ze(e,n,this._startTime)),this._queue.length===this._maxBatchSize?this.flush():(this._flushDebounced(),this._promise)}}]),r}();ie.exports=et});var oe=m((Zt,ue)=>{"use strict";o();var tt={functional:!0,analytics:!0,__default:!0},rt=function(t){return typeof t=="function"&&t()||tt},ae=function(t){return t.functional===!1||t.analytics===!1},nt=function(t,e){return e==="essential"?!1:e==="functional"||e==="analytics"?t[e]===!1:ae(t)};ue.exports={shouldMuteNonEssentials:ae,shouldMuteByCategory:nt,getPolicy:rt}});var M=m((Kt,de)=>{"use strict";o();var D=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},it=function(){function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}();function at(r,t){var e={};for(var n in r)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e}function ut(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}var x=E(),he=Y(),se=he.mapValues,le=he.filterValues,fe=Z(),ot=K(),st=B(),L=oe(),lt=L.shouldMuteByCategory,ce=L.shouldMuteNonEssentials,ft=L.getPolicy,ct=function(){function r(t,e){ut(this,r),this._publishers=t.publishers,this._validators=t.validators||[],this._defaults=t.defaults,this._ownDefaults={},this._events=t.events||{},this._context=e||{},this._defaultValueTimeout=t.defaultValueTimeout||5e3,this._defaultContinueOnFail=t.defaultContinueOnFail||!1,this._onPublisherFailHandler=t.onPublisherFailHandler||r._defaultPublisherFailHandler,this._isMuted=t.isMuted||function(){return!1},this._eventTransformer=t.eventTransformer||function(n){return n},this._payloadTransformer=t.payloadTransformer||function(n){return n},this._consentPolicyGetter=t.consentPolicyGetter||function(){return null},this._nonEssentialDefaults=t.nonEssentialDefaults||{},this._maxBatchSize=t.maxBatchSize||100,this._globalBatchQueue=t.globalBatchQueue}return it(r,[{key:"report",value:function(e){x.defined(e,"Data must be provided"),x.object(e,"Data must be an object");var n=e.src,i=e.evid,a=e.params,u=at(e,["src","evid","params"]);return this.log(D({src:n,evid:i},a),u)}},{key:"log",value:function(e,n,i){var a=this;x.defined(e,"Event object or event key must be provided.");var u=this._extractEventAndContext(e,n,i),s=u.event,h=u.context,c=ft(this._consentPolicyGetter),f=D({},this._context,h);if(this._isMuted()||lt(c,f.category))return Promise.resolve();if(f.useBatch){var v=this._initQueue(f,c),d=function(_){var P=a._eventTransformer(_,f);return v.feed(P,f)};if(this._globalBatchQueue)return this._getDefaults(this._defaults).then(function(w){var _=D({},w,a._getDynamicNonEssentialDefaults(c),a._getStaticNonEssentialDefaults(c),s,a._getPolicyFields(c,f.category));return d(_)});var g=D({},this._getDynamicDefaults(this._defaults),this._getDynamicNonEssentialDefaults(c),s,this._getPolicyFields(c,f.category));return d(g)}return this._getDefaults(this._defaults).then(function(w){var _=Object.assign(w,a._getDynamicNonEssentialDefaults(c),a._getStaticNonEssentialDefaults(c),s,a._getPolicyFields(c,f.category)),P=a._validators.length===0?!0:a._validators.some(function(V){return V.match(_)&&(V.execute(_)||!0)});if(!P)throw new Error("No validator accepted the event. Source: "+_.src+" Evid: "+(_.evid||_.evtId));var k=a._eventTransformer(_,f);return k=a._payloadTransformer(k,f),a._send(k,f)})}},{key:"flush",value:function(){return this._queue?this._queue.flush():Promise.resolve()}},{key:"updateDefaults",value:function(e){return x.defined(e,"Defaults must be provided"),x.object(e,"Defaults must be an object"),Object.assign(this._ownDefaults,e),this}},{key:"_send",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Promise.all(this._publishers.map(function(a){var u=D({},e);return Promise.resolve().then(function(){return a(u,i)}).catch(function(s){return n._onPublisherFailHandler(s,{publisherName:a.name,payload:e})})})).then(function(){})}},{key:"_extractEventAndContext",value:function(e,n,i){var a=void 0,u={};if(typeof e!="string")a=e,u=n||u;else{if(a=this._events[e],!a)throw new x.AssertionError("Event with key '"+e+"' not found in event map.");n&&(a=D({},a,n),u=i||u)}return{event:a,context:u}}},{key:"_initQueue",value:function(e,n){var i=this;if(this._queue)return this._queue;this._queue=this._globalBatchQueue||new st;var a=function(s){i._globalBatchQueue||(s.g=Object.assign(i._getStaticDefaults(i._defaults),i._getStaticNonEssentialDefaults(n)));var h=i._payloadTransformer(s,e);return i._send(h,e)};return this._queue.init({delayMs:e.useBatch===!0?300:e.useBatch,maxBatchSize:this._maxBatchSize,useThrottle:!!this._globalBatchQueue,optimizeBatch:!!this._globalBatchQueue},a),this._queue}},{key:"_handleDefaultsError",value:function(e){return this._defaultContinueOnFail?(ot.error(e),null):Promise.reject(e)}},{key:"_getDynamicNonEssentialDefaults",value:function(e){if(!ce(e))return this._getDynamicDefaults(this._nonEssentialDefaults)}},{key:"_getStaticNonEssentialDefaults",value:function(e){if(!ce(e))return this._getStaticDefaults(this._nonEssentialDefaults)}},{key:"_withOwnDefaults",value:function(e){return Object.assign({},e,this._ownDefaults)}},{key:"_getDynamicDefaults",value:function(e){e=this._withOwnDefaults(e);var n=le(e,function(i){return typeof i=="function"});return se(n,function(i){return i()})}},{key:"_getStaticDefaults",value:function(e){e=this._withOwnDefaults(e);var n=le(e,function(i){return typeof i!="function"});return n}},{key:"_getDefaults",value:function(e){var n=this;if(e=this._withOwnDefaults(e),!e)return Promise.resolve({});var i=se(e,function(a,u){if(typeof a=="function")try{a=a()}catch(s){return n._handleDefaultsError(s)}return a&&typeof a.then=="function"?fe.timedPromise(a,{message:"Cannot get default value '"+u+" for BI Event'",timeout:n._defaultValueTimeout}).catch(function(s){return n._handleDefaultsError(s)}):a});return fe.allAsObject(i)}},{key:"_encodePolicyValue",value:function(e,n){return e?typeof e[n]=="boolean"?e[n]?1:0:e[n]:1}},{key:"_getPolicyFields",value:function(e,n){return{_isca:this._encodePolicyValue(e,"analytics"),_iscf:this._encodePolicyValue(e,"functional"),_ispd:e.__default?1:0,_ise:n==="essential"?1:0}}}],[{key:"_defaultPublisherFailHandler",value:function(e,n){var i=n.publisherName;return i}}]),r}();de.exports=ct});var N=m((tr,ge)=>{"use strict";o();var ht=function(){function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}();function dt(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}var me=E(),ve=function(){function r(){dt(this,r),this.reset()}return ht(r,[{key:"reset",value:function(){this._handlers=[]}},{key:"onLoggerCreated",value:function(e){var n=this;return me.defined(e,"Handler must be provided."),me.func(e,"Handler must be a function."),this._handlers.push(e),function(){var i=n._handlers.indexOf(e);i!==-1&&n._handlers.splice(i,1)}}},{key:"notifyLoggerCreated",value:function(e){this._handlers.forEach(function(n){return n(e)})}}]),r}();ge.exports={manager:new ve,BiLoggerManager:ve}});var ye=m((nr,_e)=>{"use strict";o();var mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},vt=function(){function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}}();function gt(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}var l=E(),_t=M(),yt=N(),pt=B(),bt=function(){function r(){gt(this,r),this._publishers=[],this._validators=[],this._defaults={},this._nonEssentialDefaults={},this._events={},this._isMuted=!1,this._eventTransformer=null,this._payloadTransformer=null,this._consentPolicyGetter=null,this._maxBatchSize=null,this._batchQueue=null}return vt(r,[{key:"addPublisher",value:function(e){return l.defined(e,"Publisher must be provided"),l.ok(typeof e=="function","Expected a publisher function"),this._publishers.push(e),this}},{key:"addValidator",value:function(e){return l.defined(e,"Validator must be provided"),l.ok((typeof e>"u"?"undefined":mt(e))==="object"&&e,"Expected a validator object"),l.ok(e.execute&&e.match,"Provided validator does not match the interface"),this._validators.push(e),this}},{key:"setDefaults",value:function(e){return l.defined(e,"Defaults must be provided"),l.object(e,"Defaults must be an object"),this._defaults=e,this}},{key:"updateDefaults",value:function(e){return l.defined(e,"Defaults must be provided"),l.object(e,"Defaults must be an object"),Object.assign(this._defaults,e),this}},{key:"updateNonEssentialDefaults",value:function(e){return l.defined(e,"Non-essential Defaults must be provided"),l.object(e,"Non-essential Defaults must be an object"),Object.assign(this._nonEssentialDefaults,e),this}},{key:"setEvents",value:function(e){return l.defined(e,"Events must be provided"),l.object(e,"Events must be an object"),this._events=e,this}},{key:"setDefaultValueTimeout",value:function(e){return l.defined(e,"Default Value Timeout must be provided"),this._defaultValueTimeout=e,this}},{key:"setDefaultContinueOnFail",value:function(e){return l.defined(e,"Default Continue On Fail must be provided"),this._defaultContinueOnFail=e,this}},{key:"setPublisherFailHandler",value:function(e){return l.defined(e,"Publisher Fail Handler must be provided"),this._onPublisherFailHandler=e,this}},{key:"setMuted",value:function(e){return l.defined(e,"Is Muted must be provided"),l.boolean(e,"Is Muted must be a boolean"),this._isMuted=e,this}},{key:"setMaxBatchSize",value:function(e){return l.defined(e,"Max Batch Size must be provided"),l.number(e,"Max Batch Size must be a number"),l.ok(e>0,"Max Batch Size must be higher than 0"),this._maxBatchSize=e,this}},{key:"setGlobalBatchQueue",value:function(e){return l.defined(e,"Global Batch Queue must be provided"),l.ok(e instanceof pt,"Global Batch Queue must be an instance of BatchQueue"),this._globalBatchQueue=e,this}},{key:"withEventTransformer",value:function(e){return l.defined(e,"Event Transformer must be provided"),l.func(e,"Event Transformer must be a function"),this._eventTransformer=e,this}},{key:"withPayloadTransformer",value:function(e){return l.defined(e,"Payload Transformer must be provided"),l.func(e,"Payload Transformer must be a function"),this._payloadTransformer=e,this}},{key:"withConsentPolicyGetter",value:function(e){return l.defined(e,"Consent Policy Getter must be provided"),l.func(e,"Consent Policy Getter must be a function"),this._consentPolicyGetter=e,this}},{key:"logger",value:function(e){var n=this,i=new _t({publishers:this._publishers,validators:this._validators,defaults:this._defaults,events:this._events,defaultValueTimeout:this._defaultValueTimeout,defaultContinueOnFail:this._defaultContinueOnFail,onPublisherFailHandler:this._onPublisherFailHandler,isMuted:function(){return n._isMuted},eventTransformer:this._eventTransformer,payloadTransformer:this._payloadTransformer,consentPolicyGetter:this._consentPolicyGetter,nonEssentialDefaults:this._nonEssentialDefaults,maxBatchSize:this._maxBatchSize,globalBatchQueue:this._globalBatchQueue},e);return yt.manager.notifyLoggerCreated(i),i}}]),r}();_e.exports=bt});var we=m((ar,b)=>{"use strict";o();var pe=ye(),wt=M(),be=N(),Dt=B();b.exports.BiLoggerFactory=pe;b.exports.BiLogger=wt;b.exports.BiLoggerManager=be.BiLoggerManager;b.exports.factory=function(){return new pe};b.exports.manager=be.manager;b.exports.createBatchQueue=function(){return new Dt}});o();import{uptime as Ce}from"node:process";o();var J=T(Ee(),1);import ke from"node:os";import{platform as Te,version as Se}from"node:process";function W({cliVersion:r,flow:t}){return{...t?{flow:t}:{},cliVersion:r,isCI:J.default,nodeVersion:Se,osName:Oe(),osVersion:ke.release()}}function Oe(){switch(Te){case"darwin":return"mac";case"win32":return"windows";default:return"linux"}}var X=()=>Math.round(Ce()*1e3);function je({biLogger:r,command:t,flow:e,cliVersion:n,projectId:i,extensions:a,extraFields:u}){let s=t.opts(),h=t.args,c=new Set(["apiKey"]),f=Object.fromEntries(Object.entries(s).map(([d,g])=>{let w=c.has(d)?"<censored>":g;return[d,w]})),v={command:t.name(),arguments:h.join(","),flags:Object.keys(f).length?JSON.stringify(f):""};return r.report(R({...W({cliVersion:n,flow:e}),...v,...i?{projectId:i}:{},...u?{extraFields:JSON.stringify(u)}:{},isValid:!0})),{succeed(){r.report(O({...v,...a?{extensions:JSON.stringify(a)}:{},duration:X(),isSuccess:!0,isValid:!0}))},failed(d){let g=Q(d)?{errorType:H(d)?"SystemError":"UserError",errorName:d.name,errorMessage:d.message}:d instanceof Error?{errorType:"UnknownError",errorName:d.name,errorMessage:d.message}:{errorType:"UnknownError",errorMessage:JSON.stringify(d)};r.report(O({...v,...g,...a?{extensions:JSON.stringify(a)}:{},duration:X(),isSuccess:!1,isValid:!0}))}}}o();o();o();Be();var De=T(we()),xe=T(Pe()),xt={baseUrl:process.env.BI_BASE_URL||"https://frog.wix.com",endpoint:"",logError:!1},q=function(){function r(){}return r.prototype.factory=function(t){var e=this;t===void 0&&(t={});var n=S(S({},xt),t),i=De.default.factory();return n.onError&&i.setPublisherFailHandler(n.onError),i.addPublisher(function(a,u){return U(e,void 0,void 0,function(){var s,h,c,f,v;return G(this,function(d){switch(d.label){case 0:return s=u.endpoint||n.endpoint,h=n.baseUrl,c=n.userAgent,f=n.logError,v=c?{headers:{"User-Agent":c}}:{},[4,new xe.HttpClient({baseURL:h}).get(s,{headers:v,params:a,timeout:30*1e3}).catch(function(g){return f?console.error(g.toJSON()):Promise.reject(g)})];case 1:return d.sent(),[2]}})})}),i},r}();var sr=new q;o();import{randomUUID as Et}from"node:crypto";function Bt(r,t){r.updateDefaults(A(t))}function A(r){return r?{_client_id:r,_uuid:r,logged_user_id:r,logged_account_id:r,target_account_id:r}:{_client_id:Et()}}async function Pt(r,t){let e=z().biLoggerBaseUrl,n=e?{baseUrl:e}:{},i=A(t),{telemetry:a}=await I();return new q().factory(n).updateDefaults({localTime:()=>Date.now(),...r,...i}).setMuted(!a).logger()}export{Bt as a,Pt as b,je as c};
4
+ //# sourceMappingURL=chunk-4Y2R5QID.js.map
@@ -1,6 +1,6 @@
1
1
  import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
- import{d as A,f as p}from"./chunk-G55TTMWE.js";import{a as P}from"./chunk-PAIXCGVA.js";import{b as u,f as _,g as S}from"./chunk-64BT6U7B.js";import{c as q}from"./chunk-ZGQTJ77P.js";import{c as R,e as h}from"./chunk-XB57BXPK.js";import{c as L,e as T,i}from"./chunk-UO4ZAUJK.js";var F=L((pe,E)=>{"use strict";i();E.exports=function(e,r){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var a=e.length;if(a<=1)return e;var t="";if(a>4&&e[3]==="\\"){var n=e[2];(n==="?"||n===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),t="//")}var o=e.split(/[/\\]+/);return r!==!1&&o[o.length-1]===""&&o.pop(),t+o.join("/")}});i();var x;(function(e){e.VELO="VELO",e.VELO_ISOLATED="VELO_ISOLATED"})(x||(x={}));var m;(function(e){e.UNKNOWN_GRID_APP_LAYOUT="UNKNOWN_GRID_APP_LAYOUT",e.ONLINE="ONLINE",e.GITHUB="GITHUB",e.GITHUB_BLOCKS="GITHUB_BLOCKS",e.WIX_IDE="WIX_IDE"})(m||(m={}));var w;(function(e){e.UNKNOWN="UNKNOWN",e.GA="GA",e.RC="RC"})(w||(w={}));var y;(function(e){e.UNKNOWN="UNKNOWN",e.WIX_CLI="WIX_CLI"})(y||(y={}));var I;(function(e){e.UNKNOWN="UNKNOWN",e.ANONYMOUS_VISITOR="ANONYMOUS_VISITOR",e.MEMBER="MEMBER",e.WIX_USER="WIX_USER",e.APP="APP"})(I||(I={}));i();import{readdir as J,readFile as D,stat as U}from"node:fs/promises";import{join as v}from"node:path";async function N(e,r=""){return(await Promise.all((await J(v(e,r))).map(async a=>{let t=v(r,a);return(await U(v(e,t))).isDirectory()?N(e,t):{path:t,content:await D(v(e,t),"utf-8")}}))).flat()}function Z(e){return e instanceof Error&&P(e)?.response?.data?.details?.applicationError?.code==="SITE_NOT_PUBLISHED"}i();var W={},C={},G={},M={};var b={},K={};function l(e){var r={"code._base_domain_":[{srcPath:"/_api/wix-code-lifecycle-service",destPath:""}],"editor._base_domain_":[{srcPath:"/_api/wix-code-lifecycle-service",destPath:""}],"blocks._base_domain_":[{srcPath:"/_api/wix-code-lifecycle-service",destPath:""}],"create.editorx":[{srcPath:"/_api/wix-code-lifecycle-service",destPath:""}],"manage._base_domain_":[{srcPath:"/_api/wix-code-lifecycle-service",destPath:""}]};return A(Object.assign(e,{domainToMappings:r}))}function oe(e){var r=p(b,{}),a=r.toJSON,t=r.fromJSON,n=p(K,{}).fromJSON;function o(f){var c=f.host,s=a(e),d={entityFqdn:"wix.velo.apps.v1.app",method:"POST",methodFqn:"wix.velo.apps.v1.LifecycleService.PagesDiff",url:l({protoPath:"/v1/pages-diff",data:s,host:c}),data:s,transformResponse:n,fallback:[{method:"POST",url:l({protoPath:"/v1/pages-diff",data:s,host:c}),data:s}]};return d}return o.fromReq=t,o.__isAmbassador=!0,o}function ae(e){var r=p(W,{}),a=r.toJSON,t=r.fromJSON,n=p(C,{}).fromJSON;function o(f){var c=f.host,s=a(e),d={entityFqdn:"wix.velo.apps.v1.app",method:"POST",methodFqn:"wix.velo.apps.v1.LifecycleService.CreateApp",url:l({protoPath:"/v1/apps",data:s,host:c}),data:s,transformResponse:n};return d}return o.fromReq=t,o.__isAmbassador=!0,o}function se(e){var r=p(G,{}),a=r.toJSON,t=r.fromJSON,n=p(M,{}).fromJSON;function o(f){var c=f.host,s=a(e),d={entityFqdn:"wix.velo.apps.v1.app",method:"POST",methodFqn:"wix.velo.apps.v1.LifecycleService.DeployApp",url:l({protoPath:"/v1/apps/deploy",data:s,host:c}),data:s,transformResponse:n};return d}return o.fromReq=t,o.__isAmbassador=!0,o}i();import{join as O}from"node:path";import{readFile as z}from"node:fs/promises";var g=T(F(),1);async function B(e){try{return await z(e,"utf-8")}catch(r){throw new R({code:h.FailedToReadProjectFiles({cause:r}),cause:r})}}async function V(e){try{return await N(e)}catch(r){throw new R({code:h.FailedToReadProjectFiles({cause:r}),cause:r})}}async function H(e){return await q(O(e,_))?Promise.all([S,_].map(async r=>{let a=await B(O(e,r));return{path:r,content:a}})):[]}async function he(e){let r=(await V(u(e))).map(t=>({content:t.content,path:(0,g.default)(O(u(""),t.path))})),a=await H(e);return{ignoreForbiddenPaths:!0,layout:m.GITHUB,files:r.concat(a)}}export{oe as a,ae as b,se as c,x as d,m as e,w as f,y as g,F as h,Z as i,he as j};
3
+ import{d as A,f as p}from"./chunk-LI2OYXRM.js";import{a as P}from"./chunk-UDD4OHCT.js";import{b as u,f as _,g as S}from"./chunk-T7C26E3I.js";import{c as q}from"./chunk-NRX52J22.js";import{c as R,e as h}from"./chunk-AQJFGMCV.js";import{c as L,e as T,i}from"./chunk-UO4ZAUJK.js";var F=L((pe,E)=>{"use strict";i();E.exports=function(e,r){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var a=e.length;if(a<=1)return e;var t="";if(a>4&&e[3]==="\\"){var n=e[2];(n==="?"||n===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),t="//")}var o=e.split(/[/\\]+/);return r!==!1&&o[o.length-1]===""&&o.pop(),t+o.join("/")}});i();var x;(function(e){e.VELO="VELO",e.VELO_ISOLATED="VELO_ISOLATED"})(x||(x={}));var m;(function(e){e.UNKNOWN_GRID_APP_LAYOUT="UNKNOWN_GRID_APP_LAYOUT",e.ONLINE="ONLINE",e.GITHUB="GITHUB",e.GITHUB_BLOCKS="GITHUB_BLOCKS",e.WIX_IDE="WIX_IDE"})(m||(m={}));var w;(function(e){e.UNKNOWN="UNKNOWN",e.GA="GA",e.RC="RC"})(w||(w={}));var y;(function(e){e.UNKNOWN="UNKNOWN",e.WIX_CLI="WIX_CLI"})(y||(y={}));var I;(function(e){e.UNKNOWN="UNKNOWN",e.ANONYMOUS_VISITOR="ANONYMOUS_VISITOR",e.MEMBER="MEMBER",e.WIX_USER="WIX_USER",e.APP="APP"})(I||(I={}));i();import{readdir as J,readFile as D,stat as U}from"node:fs/promises";import{join as v}from"node:path";async function N(e,r=""){return(await Promise.all((await J(v(e,r))).map(async a=>{let t=v(r,a);return(await U(v(e,t))).isDirectory()?N(e,t):{path:t,content:await D(v(e,t),"utf-8")}}))).flat()}function Z(e){return e instanceof Error&&P(e)?.response?.data?.details?.applicationError?.code==="SITE_NOT_PUBLISHED"}i();var W={},C={},G={},M={};var b={},K={};function l(e){var r={"code._base_domain_":[{srcPath:"/_api/wix-code-lifecycle-service",destPath:""}],"editor._base_domain_":[{srcPath:"/_api/wix-code-lifecycle-service",destPath:""}],"blocks._base_domain_":[{srcPath:"/_api/wix-code-lifecycle-service",destPath:""}],"create.editorx":[{srcPath:"/_api/wix-code-lifecycle-service",destPath:""}],"manage._base_domain_":[{srcPath:"/_api/wix-code-lifecycle-service",destPath:""}]};return A(Object.assign(e,{domainToMappings:r}))}function oe(e){var r=p(b,{}),a=r.toJSON,t=r.fromJSON,n=p(K,{}).fromJSON;function o(f){var c=f.host,s=a(e),d={entityFqdn:"wix.velo.apps.v1.app",method:"POST",methodFqn:"wix.velo.apps.v1.LifecycleService.PagesDiff",url:l({protoPath:"/v1/pages-diff",data:s,host:c}),data:s,transformResponse:n,fallback:[{method:"POST",url:l({protoPath:"/v1/pages-diff",data:s,host:c}),data:s}]};return d}return o.fromReq=t,o.__isAmbassador=!0,o}function ae(e){var r=p(W,{}),a=r.toJSON,t=r.fromJSON,n=p(C,{}).fromJSON;function o(f){var c=f.host,s=a(e),d={entityFqdn:"wix.velo.apps.v1.app",method:"POST",methodFqn:"wix.velo.apps.v1.LifecycleService.CreateApp",url:l({protoPath:"/v1/apps",data:s,host:c}),data:s,transformResponse:n};return d}return o.fromReq=t,o.__isAmbassador=!0,o}function se(e){var r=p(G,{}),a=r.toJSON,t=r.fromJSON,n=p(M,{}).fromJSON;function o(f){var c=f.host,s=a(e),d={entityFqdn:"wix.velo.apps.v1.app",method:"POST",methodFqn:"wix.velo.apps.v1.LifecycleService.DeployApp",url:l({protoPath:"/v1/apps/deploy",data:s,host:c}),data:s,transformResponse:n};return d}return o.fromReq=t,o.__isAmbassador=!0,o}i();import{join as O}from"node:path";import{readFile as z}from"node:fs/promises";var g=T(F(),1);async function B(e){try{return await z(e,"utf-8")}catch(r){throw new R({code:h.FailedToReadProjectFiles({cause:r}),cause:r})}}async function V(e){try{return await N(e)}catch(r){throw new R({code:h.FailedToReadProjectFiles({cause:r}),cause:r})}}async function H(e){return await q(O(e,_))?Promise.all([S,_].map(async r=>{let a=await B(O(e,r));return{path:r,content:a}})):[]}async function he(e){let r=(await V(u(e))).map(t=>({content:t.content,path:(0,g.default)(O(u(""),t.path))})),a=await H(e);return{ignoreForbiddenPaths:!0,layout:m.GITHUB,files:r.concat(a)}}export{oe as a,ae as b,se as c,x as d,m as e,w as f,y as g,F as h,Z as i,he as j};
4
4
  /*! Bundled license information:
5
5
 
6
6
  normalize-path/index.js:
@@ -11,4 +11,4 @@ normalize-path/index.js:
11
11
  * Released under the MIT License.
12
12
  *)
13
13
  */
14
- //# sourceMappingURL=chunk-DUM2ZCCI.js.map
14
+ //# sourceMappingURL=chunk-6L5L7JXG.js.map
@@ -1,6 +1,6 @@
1
1
  import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
- import{a as x,c as b,e as H,i as a}from"./chunk-UO4ZAUJK.js";var Be=b((en,Le)=>{"use strict";a();var ee=x("assert"),Ot=x("stream").Stream,_t=x("util"),Ft=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function Oe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function I(e,t,r,n,i){throw new ee.AssertionError({message:_t.format("%s (%s) is required",e,t),actual:i===void 0?typeof n:i(n),expected:t,operator:r||"===",stackStartFunction:I.caller})}function _e(e){return Object.prototype.toString.call(e).slice(8,-1)}function L(){}var J={bool:{check:function(e){return typeof e=="boolean"}},func:{check:function(e){return typeof e=="function"}},string:{check:function(e){return typeof e=="string"}},object:{check:function(e){return typeof e=="object"&&e!==null}},number:{check:function(e){return typeof e=="number"&&!isNaN(e)}},finite:{check:function(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}},buffer:{check:function(e){return Buffer.isBuffer(e)},operator:"Buffer.isBuffer"},array:{check:function(e){return Array.isArray(e)},operator:"Array.isArray"},stream:{check:function(e){return e instanceof Ot},operator:"instanceof",actual:_e},date:{check:function(e){return e instanceof Date},operator:"instanceof",actual:_e},regexp:{check:function(e){return e instanceof RegExp},operator:"instanceof",actual:_e},uuid:{check:function(e){return typeof e=="string"&&Ft.test(e)},operator:"isUUID"}};function xe(e){var t=Object.keys(J),r;return process.env.NODE_NDEBUG?r=L:r=function(n,i){n||I(i,"true",n)},t.forEach(function(n){if(e){r[n]=L;return}var i=J[n];r[n]=function(s,u){i.check(s)||I(u,n,i.operator,s,i.actual)}}),t.forEach(function(n){var i="optional"+Oe(n);if(e){r[i]=L;return}var s=J[n];r[i]=function(u,l){u!=null&&(s.check(u)||I(l,n,s.operator,u,s.actual))}}),t.forEach(function(n){var i="arrayOf"+Oe(n);if(e){r[i]=L;return}var s=J[n],u="["+n+"]";r[i]=function(l,g){Array.isArray(l)||I(g,u,s.operator,l,s.actual);var d;for(d=0;d<l.length;d++)s.check(l[d])||I(g,u,s.operator,l,s.actual)}}),t.forEach(function(n){var i="optionalArrayOf"+Oe(n);if(e){r[i]=L;return}var s=J[n],u="["+n+"]";r[i]=function(l,g){if(l!=null){Array.isArray(l)||I(g,u,s.operator,l,s.actual);var d;for(d=0;d<l.length;d++)s.check(l[d])||I(g,u,s.operator,l,s.actual)}}}),Object.keys(ee).forEach(function(n){if(n==="AssertionError"){r[n]=ee[n];return}if(e){r[n]=L;return}r[n]=ee[n]}),r._setExports=xe,r}Le.exports=xe(process.env.NODE_NDEBUG)});var He=b(te=>{"use strict";a();var Z=x("assert"),Tt=x("util");te.sprintf=Te;te.printf=Et;te.fprintf=We;function Te(e){var t=["([^%]*)","%","(['\\-+ #0]*?)","([1-9]\\d*)?","(\\.([1-9]\\d*))?","[lhjztL]*?","([diouxXfFeEgGaAcCsSp%jr])"].join(""),r=new RegExp(t),n=Array.prototype.slice.call(arguments,1),i=e,s,u,l,g,d,c,v,m,h,O="",T=1,E=0,k,A;for(Z.equal("string",typeof i,"first argument must be a format string");(h=r.exec(i))!==null;){if(O+=h[1],i=i.substring(h[0].length),A=h[0].substring(h[1].length),k=E+h[1].length+1,E+=h[0].length,s=h[2]||"",u=h[3]||0,l=h[4]||"",g=h[6],d=!1,v=!1,c=" ",g=="%"){O+="%";continue}if(n.length===0)throw Y(e,k,A,"has no matching argument (too few arguments passed)");if(m=n.shift(),T++,s.match(/[\' #]/))throw Y(e,k,A,"uses unsupported flags");if(l.length>0)throw Y(e,k,A,"uses non-zero precision (not supported)");switch(s.match(/-/)&&(d=!0),s.match(/0/)&&(c="0"),s.match(/\+/)&&(v=!0),g){case"s":if(m==null)throw Y(e,k,A,"attempted to print undefined or null as a string (argument "+T+" to sprintf)");O+=Fe(c,u,d,m.toString());break;case"d":m=Math.floor(m);case"f":v=v&&m>0?"+":"",O+=v+Fe(c,u,d,m.toString());break;case"x":O+=Fe(c,u,d,m.toString(16));break;case"j":u===0&&(u=10),O+=Tt.inspect(m,!1,u);break;case"r":O+=ze(m);break;default:throw Y(e,k,A,"is not supported")}}return O+=i,O}function Y(e,t,r,n){return Z.equal(typeof e,"string"),Z.equal(typeof r,"string"),Z.equal(typeof t,"number"),Z.equal(typeof n,"string"),new Error('format string "'+e+'": conversion specifier "'+r+'" at character '+t+" "+n)}function Et(){var e=Array.prototype.slice.call(arguments);e.unshift(process.stdout),We.apply(null,e)}function We(e){var t=Array.prototype.slice.call(arguments,1);return e.write(Te.apply(this,t))}function Fe(e,t,r,n){for(var i=n;i.length<t;)r?i+=e:i=e+i;return i}function ze(e){var t;if(!(e instanceof Error))throw new Error(Te("invalid type for %%r: %j",e));if(t="EXCEPTION: "+e.constructor.name+": "+e.stack,e.cause&&typeof e.cause=="function"){var r=e.cause();r&&(t+=`
4
- Caused by: `+ze(r))}return t}});var Je=b(F=>{"use strict";a();function Ct(e){return Array.isArray?Array.isArray(e):re(e)==="[object Array]"}F.isArray=Ct;function Pt(e){return typeof e=="boolean"}F.isBoolean=Pt;function kt(e){return e===null}F.isNull=kt;function At(e){return e==null}F.isNullOrUndefined=At;function It(e){return typeof e=="number"}F.isNumber=It;function wt(e){return typeof e=="string"}F.isString=wt;function St(e){return typeof e=="symbol"}F.isSymbol=St;function qt(e){return e===void 0}F.isUndefined=qt;function Mt(e){return re(e)==="[object RegExp]"}F.isRegExp=Mt;function Dt(e){return typeof e=="object"&&e!==null}F.isObject=Dt;function Nt(e){return re(e)==="[object Date]"}F.isDate=Nt;function Vt(e){return re(e)==="[object Error]"||e instanceof Error}F.isError=Vt;function Rt(e){return typeof e=="function"}F.isFunction=Rt;function Gt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}F.isPrimitive=Gt;F.isBuffer=Buffer.isBuffer;function re(e){return Object.prototype.toString.call(e)}});var Ce=b((sn,Ye)=>{"use strict";a();var _=Be(),ne=x("util"),Ut=He(),C=Je().isError,xt=Ut.sprintf;Ye.exports=y;y.VError=y;y.SError=K;y.WError=w;y.MultiError=B;function Ee(e){var t,r,n,i,s;if(_.object(e,"args"),_.bool(e.strict,"args.strict"),_.array(e.argv,"args.argv"),t=e.argv,t.length===0)r={},n=[];else if(C(t[0]))r={cause:t[0]},n=t.slice(1);else if(typeof t[0]=="object"){r={};for(s in t[0])r[s]=t[0][s];n=t.slice(1)}else _.string(t[0],"first argument to VError, SError, or WError constructor must be a string, object, or Error"),r={},n=t;return _.object(r),!r.strict&&!e.strict&&(n=n.map(function(u){return u===null?"null":u===void 0?"undefined":u})),n.length===0?i="":i=xt.apply(null,n),{options:r,shortmessage:i}}function y(){var e,t,r,n,i,s,u;if(e=Array.prototype.slice.call(arguments,0),!(this instanceof y))return t=Object.create(y.prototype),y.apply(t,arguments),t;if(r=Ee({argv:e,strict:!1}),r.options.name&&(_.string(r.options.name,`error's "name" must be a string`),this.name=r.options.name),this.jse_shortmsg=r.shortmessage,s=r.shortmessage,n=r.options.cause,n&&(_.ok(C(n),"cause is not an Error"),this.jse_cause=n,r.options.skipCauseMessage||(s+=": "+n.message)),this.jse_info={},r.options.info)for(u in r.options.info)this.jse_info[u]=r.options.info[u];return this.message=s,Error.call(this,s),Error.captureStackTrace&&(i=r.options.constructorOpt||this.constructor,Error.captureStackTrace(this,i)),this}ne.inherits(y,Error);y.prototype.name="VError";y.prototype.toString=function(){var t=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t+=": "+this.message),t};y.prototype.cause=function(){var t=y.cause(this);return t===null?void 0:t};y.cause=function(e){return _.ok(C(e),"err must be an Error"),C(e.jse_cause)?e.jse_cause:null};y.info=function(e){var t,r,n;if(_.ok(C(e),"err must be an Error"),r=y.cause(e),r!==null?t=y.info(r):t={},typeof e.jse_info=="object"&&e.jse_info!==null)for(n in e.jse_info)t[n]=e.jse_info[n];return t};y.findCauseByName=function(e,t){var r;for(_.ok(C(e),"err must be an Error"),_.string(t,"name"),_.ok(t.length>0,"name cannot be empty"),r=e;r!==null;r=y.cause(r))if(_.ok(C(r)),r.name==t)return r;return null};y.hasCauseWithName=function(e,t){return y.findCauseByName(e,t)!==null};y.fullStack=function(e){_.ok(C(e),"err must be an Error");var t=y.cause(e);return t?e.stack+`
5
- caused by: `+y.fullStack(t):e.stack};y.errorFromList=function(e){return _.arrayOfObject(e,"errors"),e.length===0?null:(e.forEach(function(t){_.ok(C(t))}),e.length==1?e[0]:new B(e))};y.errorForEach=function(e,t){_.ok(C(e),"err must be an Error"),_.func(t,"func"),e instanceof B?e.errors().forEach(function(n){t(n)}):t(e)};function K(){var e,t,r,n;return e=Array.prototype.slice.call(arguments,0),this instanceof K?(r=Ee({argv:e,strict:!0}),n=r.options,y.call(this,n,"%s",r.shortmessage),this):(t=Object.create(K.prototype),K.apply(t,arguments),t)}ne.inherits(K,y);function B(e){_.array(e,"list of errors"),_.ok(e.length>0,"must be at least one error"),this.ase_errors=e,y.call(this,{cause:e[0]},"first of %d error%s",e.length,e.length==1?"":"s")}ne.inherits(B,y);B.prototype.name="MultiError";B.prototype.errors=function(){return this.ase_errors.slice(0)};function w(){var e,t,r,n;return e=Array.prototype.slice.call(arguments,0),this instanceof w?(r=Ee({argv:e,strict:!1}),n=r.options,n.skipCauseMessage=!0,y.call(this,n,"%s",r.shortmessage),this):(t=Object.create(w.prototype),w.apply(t,e),t)}ne.inherits(w,y);w.prototype.name="WError";w.prototype.toString=function(){var t=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t+=": "+this.message),this.jse_cause&&this.jse_cause.message&&(t+="; caused by "+this.jse_cause.toString()),t};w.prototype.cause=function(t){return C(t)&&(this.jse_cause=t),this.jse_cause}});var Pe=b(ie=>{"use strict";a();Object.defineProperty(ie,"__esModule",{value:!0});ie.isTypeImpl=void 0;function Bt(e){function t(r,n){if(r!=null)if(typeof r=="function"||typeof r=="string"){let i=r,s=typeof i=="string"?i:i.output.type;return u=>t(u,s)}else{let i=r,s=typeof n=="string"?n:n.output.type;return i!=null&&i[e??"type"]===s}else return!1}return{isType:t}}ie.isTypeImpl=Bt});var ke=b(S=>{"use strict";a();Object.defineProperty(S,"__esModule",{value:!0});S.HOI=S.isPromise=S.identityFunc=void 0;var Wt=(e={})=>e;S.identityFunc=Wt;function zt(e){return e!=null&&typeof e=="object"&&"then"in e&&typeof e.then=="function"}S.isPromise=zt;var Ht=()=>e=>e;S.HOI=Ht});var q=b(P=>{"use strict";a();Object.defineProperty(P,"__esModule",{value:!0});P.variantImpl=P.isVariantCreator=P.scopeType=void 0;var oe=ke(),Jt=(e,t)=>`${e}/${t}`;P.scopeType=Jt;function Yt(e){var t;return(t=e.split("/")[1])!==null&&t!==void 0?t:e}var Ae=Symbol("Variant Creator");function Ke(e){return Ae in e}P.isVariantCreator=Ke;function Zt(e){function t(l,g){return Object.keys(g).reduce((d,c)=>Object.assign(Object.assign({},d),{[c]:n((0,P.scopeType)(l,c),typeof g[c]=="function"?g[c]:oe.identityFunc)}),{})}function r(l){return Object.assign(Object.assign({},l),{[e]:Yt(l[e])})}function n(l,g){let d=(...v)=>{let m=(g??oe.identityFunc)(...v);return(0,oe.isPromise)(m)?m.then(h=>e in(h??{})?h:Object.assign(h??{},{[e]:l})):e in(m??{})?m:Object.assign(m??{},{[e]:l})};return Object.defineProperty(d,"name",{value:l,writable:!1}),Object.assign(d,{output:{key:e,type:l}},{[Ae]:Ae,toString:function(){return this.output.type}})}function i(l){return Object.entries(l).reduce((g,[d,c])=>{let v=typeof c=="function"?Ke(c)?c:n(d,c):n(d,oe.identityFunc);return Object.assign(Object.assign({},g),{[d]:v})},{})}function s(l){return l.map(g=>typeof g=="string"?n(g):g).reduce((g,d)=>{let c=typeof d=="string"?n(d):d;return Object.assign(Object.assign({},g),{[c.output.type]:c})},{})}function u(l){return Array.isArray(l)?s(l):i(l)}return{descope:r,scoped:t,variant:u,variantList:s,variantModule:i,variation:n}}P.variantImpl=Zt});var Qe=b(ae=>{"use strict";a();Object.defineProperty(ae,"__esModule",{value:!0});ae.DEFAULT_KEY=void 0;ae.DEFAULT_KEY="default"});var Ie=b(se=>{"use strict";a();Object.defineProperty(se,"__esModule",{value:!0});se.matchImpl=void 0;var Kt=q(),Xe=Qe();function Qt(e){let t=d=>c=>v=>r(v,c);function r(...d){var c,v;if(d.length===1){let[m]=d;return h=>r(h,m)}else if(d.length===2){let[m,h]=d,O=typeof m=="string"?s(m):m,T=typeof h=="function"?h(O):h,E=O==null?void 0:(0,Kt.isVariantCreator)(O)?O.output.type:O[e];if(O!=null&&E!==void 0&&E in T)return(c=T[E])===null||c===void 0?void 0:c.call(T,O);if(Xe.DEFAULT_KEY in T)return(v=T[Xe.DEFAULT_KEY])===null||v===void 0?void 0:v.call(T,O)}}let n=d=>()=>d,i=s;function s(d){return{[e]:d}}function u(d){let c=Object.keys(d).reduce((v,m)=>Object.assign(Object.assign({},v),{[m]:()=>d[m]}),{});return v=>c}function l(d,c){return v=>Object.assign(Object.assign({},d),{default:c})}function g(d,c){return v=>Object.assign(Object.assign({},d),{default:c})}return{match:r,ofLiteral:s,onLiteral:i,otherwise:l,partial:n,prematch:t,lookup:u,withFallback:g}}se.matchImpl=Qt});var $e=b(ue=>{"use strict";a();Object.defineProperty(ue,"__esModule",{value:!0});ue.typesImpl=void 0;var Xt=q();function $t(e){function t(n){return Array.isArray(n)?n.length&&(0,Xt.isVariantCreator)(n[0])?n.map(i=>i.output.type):n.map(i=>i[e]):Object.values(n).map(i=>i.output.type)}function r(n){return new Proxy({},{get:(i,s)=>s})}return{types:t,inferTypes:r}}ue.typesImpl=$t});var we=b(ce=>{"use strict";a();Object.defineProperty(ce,"__esModule",{value:!0});ce.flagsImpl=void 0;function er(e){function t(r){return r.reduce((n,i)=>Object.assign(Object.assign({},n),{[i[e]]:i}),Object.create(null))}return{flags:t}}ce.flagsImpl=er});var et=b(le=>{"use strict";a();Object.defineProperty(le,"__esModule",{value:!0});le.isOfVariantImpl=void 0;function tr(e){function t(...r){if(r.length===1){let[n]=r;return i=>i!=null&&Object.values(n).some(s=>s.output.type===i[e])}else if(r.length===2){let[n,i]=r;return n!=null&&Object.values(i).some(s=>s.output.type===n[e])}return!1}return{isOfVariant:t}}le.isOfVariantImpl=tr});var tt=b(R=>{"use strict";a();Object.defineProperty(R,"__esModule",{value:!0});R.remoteImpl=R.CompareResult=void 0;var rr=Pe(),nr=Ie(),ir=q(),or;(function(e){e[e.Lesser=-1]="Lesser",e[e.Equal=0]="Equal",e[e.Greater=1]="Greater"})(or=R.CompareResult||(R.CompareResult={}));function ar(e){let{isType:t}=(0,rr.isTypeImpl)(e),{match:r}=(0,nr.matchImpl)(e),{variantList:n}=(0,ir.variantImpl)(e);function i(c){return Object.keys(c).reduce((m,h)=>Object.assign(Object.assign({},m),{[h]:t(h)}),{})}function s(c){return{key:e,is:i(c),new:c,match:r}}function u(c){return typeof c=="string"?c:typeof c=="function"?c.output.type:c[e]}function l(c,v){let h=s(c),O=v.map(u);return Object.assign(Object.assign({},h),{length:v.length,compare:(T,E)=>{let k=O.findIndex(je=>je===u(T)),A=O.findIndex(je=>je===u(E)),$=k-A;return $===0?$:$/Math.abs($)},get(T){let E=this.types[T];return this.new[E]},index:T=>O.findIndex(E=>E===u(T)),types:O})}function g(c){let v=n(c);return l(v,c)}function d(c,v){return Array.isArray(c)?g(c):l(c,v)}return{remote:s,sequence:d}}R.remoteImpl=ar});var Se=b(G=>{"use strict";a();Object.defineProperty(G,"__esModule",{value:!0});G.typedImpl=G.pass=void 0;var sr=e=>e;G.pass=sr;function ur(e){function t(r){return typeof r=="function"?r(G.pass):r}return{typed:t}}G.typedImpl=ur});var qe=b(M=>{"use strict";a();Object.defineProperty(M,"__esModule",{value:!0});M.unpack=M.just=M.constant=void 0;function rt(e){return()=>e}M.constant=rt;M.just=rt;var cr=e=>e.payload;M.unpack=cr});var nt=b(D=>{"use strict";a();Object.defineProperty(D,"__esModule",{value:!0});D.matcherImpl=D.Matcher=D.tableToHandler=void 0;var lr=qe(),pr=q();function Me(e){return Object.keys(e).reduce((t,r)=>{let n=r;return Object.assign(Object.assign({},t),{[n]:(0,lr.just)(e[n])})},{})}D.tableToHandler=Me;var pe=class e{constructor(t,r,n){this.target=t,this.key=r,this.handler=n,this.complete=i=>{var s,u;if(this.target!=null&&this.target[this.key]in this.handler)return(u=(s=this.handler)[this.target[this.key]])===null||u===void 0?void 0:u.call(s,this.target);if(i?.withFallback!=null)return i.withFallback(this.target)}}execute(){let t=this.handler[this.target[this.key]];return t?.(this.target)}exhaust(t){var r;let n=Object.assign(Object.assign({},this.handler),t);return(r=n[this.target[this.key]])===null||r===void 0?void 0:r.call(n,this.target)}remaining(t){return new e(this.target,this.key,Object.assign(Object.assign({},this.handler),t))}else(t){var r,n;return this.target[this.key]in this.handler?(n=(r=this.handler)[this.target[this.key]])===null||n===void 0?void 0:n.call(r,this.target):t(this.target)}register(t){let r=Object.assign(Object.assign({},this.handler),Me(t));return new e(this.target,this.key,r)}lookup(t){var r;let n=Object.assign(Object.assign({},this.handler),Me(t));return(r=n[this.target[this.key]])===null||r===void 0?void 0:r.call(n,this.target)}with(t){return new e(this.target,this.key,Object.assign(Object.assign({},this.handler),t))}when(t,r){if(r!=null){let i=(Array.isArray(t)?t:[t]).reduce((s,u)=>{let l=typeof u=="string"?u:(0,pr.isVariantCreator)(u)?u.output.type:void 0;return l!=null?Object.assign(Object.assign({},s),{[l]:r}):s},{});return new e(this.target,this.key,Object.assign(Object.assign({},this.handler),i))}else return new e(this.target,this.key,Object.assign(Object.assign({},this.handler),t))}};D.Matcher=pe;function dr(e){function t(r){let n=typeof r=="string"?{[e]:r}:r;return new pe(n,e,{})}return{matcher:t}}D.matcherImpl=dr});var De=b(de=>{"use strict";a();Object.defineProperty(de,"__esModule",{value:!0});de.variantCosmos=void 0;var fr=Pe(),gr=Ie(),mr=q(),yr=$e(),hr=we(),vr=et(),br=tt(),jr=Se(),Or=nt();function _r({key:e}){let{isType:t}=(0,fr.isTypeImpl)(e),{flags:r}=(0,hr.flagsImpl)(e);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({key:e,isType:t,flags:r},(0,vr.isOfVariantImpl)(e)),(0,gr.matchImpl)(e)),(0,Or.matcherImpl)(e)),(0,br.remoteImpl)(e)),(0,jr.typedImpl)(e)),(0,yr.typesImpl)(e)),(0,mr.variantImpl)(e))}de.variantCosmos=_r});var Ne=b(p=>{"use strict";a();var j;Object.defineProperty(p,"__esModule",{value:!0});p.withFallback=p.variation=p.variantModule=p.variantList=p.variant=p.types=p.typed=p.lookup=p.sequence=p.scoped=p.remote=p.prematch=p.partial=p.otherwise=p.onLiteral=p.ofLiteral=p.matcher=p.match=p.isType=p.isOfVariant=p.inferTypes=p.flags=p.descope=void 0;var Fr=De();j=(0,Fr.variantCosmos)({key:"type"}),p.descope=j.descope,p.flags=j.flags,p.inferTypes=j.inferTypes,p.isOfVariant=j.isOfVariant,p.isType=j.isType,p.match=j.match,p.matcher=j.matcher,p.ofLiteral=j.ofLiteral,p.onLiteral=j.onLiteral,p.otherwise=j.otherwise,p.partial=j.partial,p.prematch=j.prematch,p.remote=j.remote,p.scoped=j.scoped,p.sequence=j.sequence,p.lookup=j.lookup,p.typed=j.typed,p.types=j.types,p.variant=j.variant,p.variantList=j.variantList,p.variantModule=j.variantModule,p.variation=j.variation,p.withFallback=j.withFallback});var it=b(fe=>{"use strict";a();Object.defineProperty(fe,"__esModule",{value:!0});fe.augment=void 0;var Tr=Ne(),Er=q();function Cr(e,t){return Object.keys(e).reduce((r,n)=>{let i=e[n],s=(0,Er.isVariantCreator)(i)?(0,Tr.variation)(i.output.type,(...u)=>{let l=i(...u);return Object.assign(Object.assign({},t(l)),l)}):(...u)=>{let l=e[n],g=typeof l=="function"?l(...u):{};return Object.assign(Object.assign({},t(g)),g)};return Object.assign(Object.assign({},r),{[n]:s})},{})}fe.augment=Cr});var ot=b(ge=>{"use strict";a();Object.defineProperty(ge,"__esModule",{value:!0});ge.constrained=void 0;function Pr(e,t){return t}ge.constrained=Pr});var at=b(me=>{"use strict";a();Object.defineProperty(me,"__esModule",{value:!0});me.construct=void 0;function kr(e){return(...t)=>new e(t)}me.construct=kr});var ut=b(U=>{"use strict";a();Object.defineProperty(U,"__esModule",{value:!0});U.Alpha=U.onTerms=void 0;var Ar=we(),Ir=q(),wr=Symbol("VARIANT GENERIC TEMPLATE");function Sr(e){return Object.assign(Object.assign({},e(U.Alpha)),{[wr]:void 0})}U.onTerms=Sr;var st="__term",qr=(0,Ir.variantImpl)(st).variant,Mr=(0,Ar.flagsImpl)(st).flags,Dr=qr(["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]);U.Alpha=Mr(Object.values(Dr).map(e=>e()))});var ct=b(W=>{"use strict";a();Object.defineProperty(W,"__esModule",{value:!0});W.typeMap=W.typeCatalog=void 0;function Nr(e){return Object.values(e).reduce((t,r)=>Object.assign(Object.assign({},t),{[r.output.type]:r.output.type}),{})}W.typeCatalog=Nr;function Vr(e){return Object.keys(e).reduce((t,r)=>Object.assign(Object.assign({},t),{[r]:e[r].output.type}),{})}W.typeMap=Vr});var pt=b(z=>{"use strict";a();Object.defineProperty(z,"__esModule",{value:!0});z.literalist=z.catalog=void 0;function lt(e,t){return Array.isArray(e)?e.reduce((r,n,i)=>Object.assign(Object.assign({},r),{[n]:t!=null?t(n,i):n}),{}):e}z.catalog=lt;z.literalist=lt});var dt=b(ye=>{"use strict";a();Object.defineProperty(ye,"__esModule",{value:!0});ye.patterned=void 0;function Rr(e,t){return t}ye.patterned=Rr});var ft=b(N=>{"use strict";a();Object.defineProperty(N,"__esModule",{value:!0});N.nil=N.payload=N.fields=void 0;function Gr(e={}){return(...t)=>{let[r]=t;return Object.assign(Object.assign({},e),r)}}N.fields=Gr;function Ur(e){return t=>({payload:t})}N.payload=Ur;var xr=()=>({});N.nil=xr});var yt=b(f=>{"use strict";a();Object.defineProperty(f,"__esModule",{value:!0});f.payload=f.nil=f.fields=f.HOI=f.pass=f.patterned=f.unpack=f.just=f.constant=f.literalist=f.catalog=f.typeCatalog=f.typeMap=f.onTerms=f.variantCosmos=f.construct=f.constrained=f.augment=void 0;var Lr=it();Object.defineProperty(f,"augment",{enumerable:!0,get:function(){return Lr.augment}});var Br=ot();Object.defineProperty(f,"constrained",{enumerable:!0,get:function(){return Br.constrained}});var Wr=at();Object.defineProperty(f,"construct",{enumerable:!0,get:function(){return Wr.construct}});var zr=De();Object.defineProperty(f,"variantCosmos",{enumerable:!0,get:function(){return zr.variantCosmos}});var Hr=ut();Object.defineProperty(f,"onTerms",{enumerable:!0,get:function(){return Hr.onTerms}});var gt=ct();Object.defineProperty(f,"typeMap",{enumerable:!0,get:function(){return gt.typeMap}});Object.defineProperty(f,"typeCatalog",{enumerable:!0,get:function(){return gt.typeCatalog}});var mt=pt();Object.defineProperty(f,"catalog",{enumerable:!0,get:function(){return mt.catalog}});Object.defineProperty(f,"literalist",{enumerable:!0,get:function(){return mt.literalist}});var Ve=qe();Object.defineProperty(f,"constant",{enumerable:!0,get:function(){return Ve.constant}});Object.defineProperty(f,"just",{enumerable:!0,get:function(){return Ve.just}});Object.defineProperty(f,"unpack",{enumerable:!0,get:function(){return Ve.unpack}});var Jr=dt();Object.defineProperty(f,"patterned",{enumerable:!0,get:function(){return Jr.patterned}});var Yr=Se();Object.defineProperty(f,"pass",{enumerable:!0,get:function(){return Yr.pass}});var Zr=ke();Object.defineProperty(f,"HOI",{enumerable:!0,get:function(){return Zr.HOI}});var Re=ft();Object.defineProperty(f,"fields",{enumerable:!0,get:function(){return Re.fields}});Object.defineProperty(f,"nil",{enumerable:!0,get:function(){return Re.nil}});Object.defineProperty(f,"payload",{enumerable:!0,get:function(){return Re.payload}})});var he=b(V=>{"use strict";a();var Kr=V&&V.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),ht=V&&V.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Kr(t,e,r)};Object.defineProperty(V,"__esModule",{value:!0});ht(yt(),V);ht(Ne(),V)});a();a();var Ze=H(Ce(),1),{WError:Lt}=Ze.default,Q=class extends Lt{cliCode;constructor(t){let r=t.cause instanceof Error?t.cause:new Error(JSON.stringify(t.cause));super({name:t.code.type,cause:r,info:t.info},t.code.type),this.cliCode=t.code,this.name=t.code.type}};a();var o=H(he(),1),ve=(0,o.variant)({FailedToGetDeviceCode:{},FailedToGetAuthToken:{},FailedToRenewAuthToken:{},FailedToRefreshTokenForSite:{},FailedToRevokeRefreshToken:(0,o.fields)(),UnknownFailure:(0,o.fields)(),FailedToFetchPackageJson:{},FailedToGetDeveloperApps:{},FailedToUpdateTelemetryConfig:{},FailedToSyncToRevision:(0,o.fields)(),FailedToCreateVersion:{},FailedToReadCache:(0,o.fields)(),FailedToWriteCache:(0,o.fields)(),UploadApplicationFailed:{},FailedToCreateDevCenterApp:{},FailedToGetAppSecret:{},FailedToCreateTunnel:{},FailedToDeleteTunnel:{},GridAppFailedToUpdateFiles:{},FailedToCreateGridApp:(0,o.fields)(),InvalidResponseData:{},InvalidCreateAppResponse:{},InvalidDeployAppResponse:{},InvalidGetDeploymentResponse:{},FailedToGetPagesDiff:{},InvalidViteBuildOutput:{},ViteModuleBundleNotFound:{},ViteFileNotFoundInOutput:(0,o.fields)(),FailedToCreateBackendDeployment:{},FailedToUpdateBackendDeployment:{},InvalidDeploymentUrl:(0,o.fields)(),FailedToGetBackendDeployment:{},FailedToDeployBackend:{},FailedToGetUserInfo:{},FailedToGetMyAccount:{},FailedToCreateDevelopmentSite:{},FailedToGetDevelopmentSites:{},FailedToGetDevelopmentSitesLimit:{},FailedToGetRequiredApps:{},FailedToGetMarketListing:{},FailedToAddRequiredApp:{},FailedToGetAppValidity:{},FailedToQuerySites:{},FailedToGetSite:{},FailedToDeploySite:{},FailedToPublishDeployment:{},FailedToMarkDeploymentAsPermanent:{},FailedToCheckIfAppInstalled:{},TypeErrorInvalidUrl:{},FailedToGenerateSelfsignedCertificate:{},FailedToResolveViteOrigin:{},FailedToCreateAppRelease:{},FailedToUpdateAppRelease:{},FailedToCreateComponents:{},FailedToGetResolveNpmDependenciesResult:{},FailedToResolveNpmDependencies:{},FailedToCheckDeprecatedStatus:{},FailedToCreateSiteOverride:{},FailedToGetDeploymentStatus:{},FailedToGetPipelineErrorInfo:{},FailedToGenerateAppMarketQueryParam:{},InvalidDependenciesJsonSchemaError:(0,o.fields)(),FailedToParseLog:{},FailedToConnectToLogsService:{},LogsConnectionTimeout:{},FailedToFetchAppForVersion:{},InvalidSiteOverrideID:{},FailedToFindEsbuildOutputFile:{},FailedOptimizingWithEsbuild:(0,o.fields)(),FailedReadingEsbuildOutputFile:{},InvalidGitUrl:(0,o.fields)(),TemplatePathNotFound:(0,o.fields)(),FailedToQueryCliAppTemplates:{},FailedToCreateDevCenterAppFromTemplate:{}}),Ge=(0,o.variant)({LatestVersionOfCreateAppRequired:(0,o.fields)(),FailedToCreateProjectFolder:(0,o.fields)(),EmptyDirectoryRequiredAppGeneration:(0,o.fields)(),InvalidNewPackageName:(0,o.fields)(),UnsupportedPackageManager:(0,o.fields)(),UnsupportedPackageManagerWorkspaces:(0,o.fields)(),FailedAddingPackageToWorkspace:{},SitePermissionDenied:(0,o.fields)(),AppPermissionDenied:(0,o.fields)(),BuiltProjectNeeded:{},WixUninstallMissingPackageName:{},FailedToReadJson:(0,o.fields)(),FailedToWriteJson:(0,o.fields)(),InvalidJsonFile:(0,o.fields)(),FailedToWriteWixLock:{},InvalidVeloConfigJson:(0,o.fields)(),DashboardPageConfigNotFound:(0,o.fields)(),EmbeddedScriptConfigNotFound:(0,o.fields)(),NoExtensionsFound:{},CustomElementConfigNotFound:(0,o.fields)(),SitePluginConfigNotFound:(0,o.fields)(),NoPagesDirectoryFound:(0,o.fields)(),DashboardPluginConfigNotFound:(0,o.fields)(),DashboardMenuPluginConfigNotFound:(0,o.fields)(),ServicePluginConfigNotFound:(0,o.fields)(),DashboardModalConfigNotFound:(0,o.fields)(),InvalidConfigSchemaError:(0,o.fields)(),InvalidParamsOverrideSchemaError:(0,o.fields)(),PermissionDenied:{},SiteSelectorTimedout:{},FailedToReadProjectFiles:(0,o.fields)(),FailedToCreateVersionForSubmittedApp:{},GridAppFilesMaxLengthExcceeded:(0,o.fields)(),DeviceCodeTimedOut:{},DuplicateComponentIdsError:(0,o.fields)(),FailedToSaveDevelopmentSite:(0,o.fields)(),FailedToBuildApp:(0,o.fields)(),FailedToInitializeGitRepo:(0,o.fields)(),FailedToInstallDependencies:(0,o.fields)(),FailedToCommitChanges:(0,o.fields)(),FailedToDeleteAuthData:(0,o.fields)(),FailedToDeleteLegacyAuthData:(0,o.fields)(),FailedToSaveAuthData:(0,o.fields)(),FailedToSaveApiKeyAuthData:(0,o.fields)(),FailedToRenewAuthTokenSiteNotFound:(0,o.fields)(),FailedToRenewAuthTokenRefreshTokenRevoked:{},FailedToInstallPackage:(0,o.fields)(),FailedToInstallPackages:(0,o.fields)(),FailedToUninstallPackage:(0,o.fields)(),FailedMigrationToAnyNpm:{},DeprecatedVersion:(0,o.fields)(),FailedToCloneRepo:(0,o.fields)(),AuthenticationRequired:{},SiteConfiguredRequired:{},NonInteractiveTerminal:{},FailedToWatchFiles:(0,o.fields)(),CliAppVersionMismatch:(0,o.fields)(),NetworkError:(0,o.fields)(),AppForVersionNotFound:(0,o.fields)(),UnknownServicePlugin:(0,o.fields)(),InvalidServicePluginFolder:(0,o.fields)(),FailedToGetLogsTopology:{},FailedInstallCloudflareNoAccess:(0,o.fields)(),CliAppTemplateNotFound:(0,o.fields)()}),Qr=(0,o.variant)({InvalidDashboardPageRoute:(0,o.fields)(),InvalidEmbeddedScriptFolder:(0,o.fields)(),InvalidEmbeddedScriptTemplate:(0,o.fields)(),InvalidCustomElementTagName:(0,o.fields)(),InvalidSiteFrontendPackageVersion:(0,o.fields)(),InvalidServicePluginImplementation:(0,o.fields)()}),X=(0,o.variant)({...ve,...Ge,...Qr});a();var Ue=H(he(),1);function be(e){return e&&typeof e=="object"&&"cliCode"in e?(0,Ue.isOfVariant)(e.cliCode,X):!1}function Xr(e){return(0,Ue.isOfVariant)(e.cliCode,ve)}a();var vt=H(he(),1),bt=H(Ce(),1);function jt(e){if(be(e)&&(0,vt.isOfVariant)(e.cliCode,Ge))return e;let t=bt.default.cause(e);return t?jt(t):null}function $r(e){let t=be(e)?e:new Q({code:X.UnknownFailure({error:e})});return jt(t)??t}export{he as a,Ce as b,Q as c,ve as d,X as e,be as f,Xr as g,$r as h};
6
- //# sourceMappingURL=chunk-XB57BXPK.js.map
3
+ import{a as x,c as b,e as H,i as a}from"./chunk-UO4ZAUJK.js";var Be=b((en,Le)=>{"use strict";a();var ee=x("assert"),Ot=x("stream").Stream,Ft=x("util"),Tt=/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;function Oe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function I(e,t,r,n,i){throw new ee.AssertionError({message:Ft.format("%s (%s) is required",e,t),actual:i===void 0?typeof n:i(n),expected:t,operator:r||"===",stackStartFunction:I.caller})}function Fe(e){return Object.prototype.toString.call(e).slice(8,-1)}function L(){}var J={bool:{check:function(e){return typeof e=="boolean"}},func:{check:function(e){return typeof e=="function"}},string:{check:function(e){return typeof e=="string"}},object:{check:function(e){return typeof e=="object"&&e!==null}},number:{check:function(e){return typeof e=="number"&&!isNaN(e)}},finite:{check:function(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}},buffer:{check:function(e){return Buffer.isBuffer(e)},operator:"Buffer.isBuffer"},array:{check:function(e){return Array.isArray(e)},operator:"Array.isArray"},stream:{check:function(e){return e instanceof Ot},operator:"instanceof",actual:Fe},date:{check:function(e){return e instanceof Date},operator:"instanceof",actual:Fe},regexp:{check:function(e){return e instanceof RegExp},operator:"instanceof",actual:Fe},uuid:{check:function(e){return typeof e=="string"&&Tt.test(e)},operator:"isUUID"}};function xe(e){var t=Object.keys(J),r;return process.env.NODE_NDEBUG?r=L:r=function(n,i){n||I(i,"true",n)},t.forEach(function(n){if(e){r[n]=L;return}var i=J[n];r[n]=function(s,u){i.check(s)||I(u,n,i.operator,s,i.actual)}}),t.forEach(function(n){var i="optional"+Oe(n);if(e){r[i]=L;return}var s=J[n];r[i]=function(u,l){u!=null&&(s.check(u)||I(l,n,s.operator,u,s.actual))}}),t.forEach(function(n){var i="arrayOf"+Oe(n);if(e){r[i]=L;return}var s=J[n],u="["+n+"]";r[i]=function(l,g){Array.isArray(l)||I(g,u,s.operator,l,s.actual);var d;for(d=0;d<l.length;d++)s.check(l[d])||I(g,u,s.operator,l,s.actual)}}),t.forEach(function(n){var i="optionalArrayOf"+Oe(n);if(e){r[i]=L;return}var s=J[n],u="["+n+"]";r[i]=function(l,g){if(l!=null){Array.isArray(l)||I(g,u,s.operator,l,s.actual);var d;for(d=0;d<l.length;d++)s.check(l[d])||I(g,u,s.operator,l,s.actual)}}}),Object.keys(ee).forEach(function(n){if(n==="AssertionError"){r[n]=ee[n];return}if(e){r[n]=L;return}r[n]=ee[n]}),r._setExports=xe,r}Le.exports=xe(process.env.NODE_NDEBUG)});var He=b(te=>{"use strict";a();var Y=x("assert"),_t=x("util");te.sprintf=_e;te.printf=Et;te.fprintf=We;function _e(e){var t=["([^%]*)","%","(['\\-+ #0]*?)","([1-9]\\d*)?","(\\.([1-9]\\d*))?","[lhjztL]*?","([diouxXfFeEgGaAcCsSp%jr])"].join(""),r=new RegExp(t),n=Array.prototype.slice.call(arguments,1),i=e,s,u,l,g,d,c,v,m,h,O="",_=1,E=0,k,A;for(Y.equal("string",typeof i,"first argument must be a format string");(h=r.exec(i))!==null;){if(O+=h[1],i=i.substring(h[0].length),A=h[0].substring(h[1].length),k=E+h[1].length+1,E+=h[0].length,s=h[2]||"",u=h[3]||0,l=h[4]||"",g=h[6],d=!1,v=!1,c=" ",g=="%"){O+="%";continue}if(n.length===0)throw Q(e,k,A,"has no matching argument (too few arguments passed)");if(m=n.shift(),_++,s.match(/[\' #]/))throw Q(e,k,A,"uses unsupported flags");if(l.length>0)throw Q(e,k,A,"uses non-zero precision (not supported)");switch(s.match(/-/)&&(d=!0),s.match(/0/)&&(c="0"),s.match(/\+/)&&(v=!0),g){case"s":if(m==null)throw Q(e,k,A,"attempted to print undefined or null as a string (argument "+_+" to sprintf)");O+=Te(c,u,d,m.toString());break;case"d":m=Math.floor(m);case"f":v=v&&m>0?"+":"",O+=v+Te(c,u,d,m.toString());break;case"x":O+=Te(c,u,d,m.toString(16));break;case"j":u===0&&(u=10),O+=_t.inspect(m,!1,u);break;case"r":O+=ze(m);break;default:throw Q(e,k,A,"is not supported")}}return O+=i,O}function Q(e,t,r,n){return Y.equal(typeof e,"string"),Y.equal(typeof r,"string"),Y.equal(typeof t,"number"),Y.equal(typeof n,"string"),new Error('format string "'+e+'": conversion specifier "'+r+'" at character '+t+" "+n)}function Et(){var e=Array.prototype.slice.call(arguments);e.unshift(process.stdout),We.apply(null,e)}function We(e){var t=Array.prototype.slice.call(arguments,1);return e.write(_e.apply(this,t))}function Te(e,t,r,n){for(var i=n;i.length<t;)r?i+=e:i=e+i;return i}function ze(e){var t;if(!(e instanceof Error))throw new Error(_e("invalid type for %%r: %j",e));if(t="EXCEPTION: "+e.constructor.name+": "+e.stack,e.cause&&typeof e.cause=="function"){var r=e.cause();r&&(t+=`
4
+ Caused by: `+ze(r))}return t}});var Je=b(T=>{"use strict";a();function Ct(e){return Array.isArray?Array.isArray(e):re(e)==="[object Array]"}T.isArray=Ct;function Pt(e){return typeof e=="boolean"}T.isBoolean=Pt;function kt(e){return e===null}T.isNull=kt;function At(e){return e==null}T.isNullOrUndefined=At;function It(e){return typeof e=="number"}T.isNumber=It;function wt(e){return typeof e=="string"}T.isString=wt;function St(e){return typeof e=="symbol"}T.isSymbol=St;function Mt(e){return e===void 0}T.isUndefined=Mt;function qt(e){return re(e)==="[object RegExp]"}T.isRegExp=qt;function Dt(e){return typeof e=="object"&&e!==null}T.isObject=Dt;function Nt(e){return re(e)==="[object Date]"}T.isDate=Nt;function Vt(e){return re(e)==="[object Error]"||e instanceof Error}T.isError=Vt;function Rt(e){return typeof e=="function"}T.isFunction=Rt;function Gt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}T.isPrimitive=Gt;T.isBuffer=Buffer.isBuffer;function re(e){return Object.prototype.toString.call(e)}});var Ce=b((sn,Qe)=>{"use strict";a();var F=Be(),ne=x("util"),Ut=He(),C=Je().isError,xt=Ut.sprintf;Qe.exports=y;y.VError=y;y.SError=Z;y.WError=w;y.MultiError=B;function Ee(e){var t,r,n,i,s;if(F.object(e,"args"),F.bool(e.strict,"args.strict"),F.array(e.argv,"args.argv"),t=e.argv,t.length===0)r={},n=[];else if(C(t[0]))r={cause:t[0]},n=t.slice(1);else if(typeof t[0]=="object"){r={};for(s in t[0])r[s]=t[0][s];n=t.slice(1)}else F.string(t[0],"first argument to VError, SError, or WError constructor must be a string, object, or Error"),r={},n=t;return F.object(r),!r.strict&&!e.strict&&(n=n.map(function(u){return u===null?"null":u===void 0?"undefined":u})),n.length===0?i="":i=xt.apply(null,n),{options:r,shortmessage:i}}function y(){var e,t,r,n,i,s,u;if(e=Array.prototype.slice.call(arguments,0),!(this instanceof y))return t=Object.create(y.prototype),y.apply(t,arguments),t;if(r=Ee({argv:e,strict:!1}),r.options.name&&(F.string(r.options.name,`error's "name" must be a string`),this.name=r.options.name),this.jse_shortmsg=r.shortmessage,s=r.shortmessage,n=r.options.cause,n&&(F.ok(C(n),"cause is not an Error"),this.jse_cause=n,r.options.skipCauseMessage||(s+=": "+n.message)),this.jse_info={},r.options.info)for(u in r.options.info)this.jse_info[u]=r.options.info[u];return this.message=s,Error.call(this,s),Error.captureStackTrace&&(i=r.options.constructorOpt||this.constructor,Error.captureStackTrace(this,i)),this}ne.inherits(y,Error);y.prototype.name="VError";y.prototype.toString=function(){var t=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t+=": "+this.message),t};y.prototype.cause=function(){var t=y.cause(this);return t===null?void 0:t};y.cause=function(e){return F.ok(C(e),"err must be an Error"),C(e.jse_cause)?e.jse_cause:null};y.info=function(e){var t,r,n;if(F.ok(C(e),"err must be an Error"),r=y.cause(e),r!==null?t=y.info(r):t={},typeof e.jse_info=="object"&&e.jse_info!==null)for(n in e.jse_info)t[n]=e.jse_info[n];return t};y.findCauseByName=function(e,t){var r;for(F.ok(C(e),"err must be an Error"),F.string(t,"name"),F.ok(t.length>0,"name cannot be empty"),r=e;r!==null;r=y.cause(r))if(F.ok(C(r)),r.name==t)return r;return null};y.hasCauseWithName=function(e,t){return y.findCauseByName(e,t)!==null};y.fullStack=function(e){F.ok(C(e),"err must be an Error");var t=y.cause(e);return t?e.stack+`
5
+ caused by: `+y.fullStack(t):e.stack};y.errorFromList=function(e){return F.arrayOfObject(e,"errors"),e.length===0?null:(e.forEach(function(t){F.ok(C(t))}),e.length==1?e[0]:new B(e))};y.errorForEach=function(e,t){F.ok(C(e),"err must be an Error"),F.func(t,"func"),e instanceof B?e.errors().forEach(function(n){t(n)}):t(e)};function Z(){var e,t,r,n;return e=Array.prototype.slice.call(arguments,0),this instanceof Z?(r=Ee({argv:e,strict:!0}),n=r.options,y.call(this,n,"%s",r.shortmessage),this):(t=Object.create(Z.prototype),Z.apply(t,arguments),t)}ne.inherits(Z,y);function B(e){F.array(e,"list of errors"),F.ok(e.length>0,"must be at least one error"),this.ase_errors=e,y.call(this,{cause:e[0]},"first of %d error%s",e.length,e.length==1?"":"s")}ne.inherits(B,y);B.prototype.name="MultiError";B.prototype.errors=function(){return this.ase_errors.slice(0)};function w(){var e,t,r,n;return e=Array.prototype.slice.call(arguments,0),this instanceof w?(r=Ee({argv:e,strict:!1}),n=r.options,n.skipCauseMessage=!0,y.call(this,n,"%s",r.shortmessage),this):(t=Object.create(w.prototype),w.apply(t,e),t)}ne.inherits(w,y);w.prototype.name="WError";w.prototype.toString=function(){var t=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t+=": "+this.message),this.jse_cause&&this.jse_cause.message&&(t+="; caused by "+this.jse_cause.toString()),t};w.prototype.cause=function(t){return C(t)&&(this.jse_cause=t),this.jse_cause}});var Pe=b(ie=>{"use strict";a();Object.defineProperty(ie,"__esModule",{value:!0});ie.isTypeImpl=void 0;function Bt(e){function t(r,n){if(r!=null)if(typeof r=="function"||typeof r=="string"){let i=r,s=typeof i=="string"?i:i.output.type;return u=>t(u,s)}else{let i=r,s=typeof n=="string"?n:n.output.type;return i!=null&&i[e??"type"]===s}else return!1}return{isType:t}}ie.isTypeImpl=Bt});var ke=b(S=>{"use strict";a();Object.defineProperty(S,"__esModule",{value:!0});S.HOI=S.isPromise=S.identityFunc=void 0;var Wt=(e={})=>e;S.identityFunc=Wt;function zt(e){return e!=null&&typeof e=="object"&&"then"in e&&typeof e.then=="function"}S.isPromise=zt;var Ht=()=>e=>e;S.HOI=Ht});var M=b(P=>{"use strict";a();Object.defineProperty(P,"__esModule",{value:!0});P.variantImpl=P.isVariantCreator=P.scopeType=void 0;var oe=ke(),Jt=(e,t)=>`${e}/${t}`;P.scopeType=Jt;function Qt(e){var t;return(t=e.split("/")[1])!==null&&t!==void 0?t:e}var Ae=Symbol("Variant Creator");function Ze(e){return Ae in e}P.isVariantCreator=Ze;function Yt(e){function t(l,g){return Object.keys(g).reduce((d,c)=>Object.assign(Object.assign({},d),{[c]:n((0,P.scopeType)(l,c),typeof g[c]=="function"?g[c]:oe.identityFunc)}),{})}function r(l){return Object.assign(Object.assign({},l),{[e]:Qt(l[e])})}function n(l,g){let d=(...v)=>{let m=(g??oe.identityFunc)(...v);return(0,oe.isPromise)(m)?m.then(h=>e in(h??{})?h:Object.assign(h??{},{[e]:l})):e in(m??{})?m:Object.assign(m??{},{[e]:l})};return Object.defineProperty(d,"name",{value:l,writable:!1}),Object.assign(d,{output:{key:e,type:l}},{[Ae]:Ae,toString:function(){return this.output.type}})}function i(l){return Object.entries(l).reduce((g,[d,c])=>{let v=typeof c=="function"?Ze(c)?c:n(d,c):n(d,oe.identityFunc);return Object.assign(Object.assign({},g),{[d]:v})},{})}function s(l){return l.map(g=>typeof g=="string"?n(g):g).reduce((g,d)=>{let c=typeof d=="string"?n(d):d;return Object.assign(Object.assign({},g),{[c.output.type]:c})},{})}function u(l){return Array.isArray(l)?s(l):i(l)}return{descope:r,scoped:t,variant:u,variantList:s,variantModule:i,variation:n}}P.variantImpl=Yt});var Ke=b(ae=>{"use strict";a();Object.defineProperty(ae,"__esModule",{value:!0});ae.DEFAULT_KEY=void 0;ae.DEFAULT_KEY="default"});var Ie=b(se=>{"use strict";a();Object.defineProperty(se,"__esModule",{value:!0});se.matchImpl=void 0;var Zt=M(),Xe=Ke();function Kt(e){let t=d=>c=>v=>r(v,c);function r(...d){var c,v;if(d.length===1){let[m]=d;return h=>r(h,m)}else if(d.length===2){let[m,h]=d,O=typeof m=="string"?s(m):m,_=typeof h=="function"?h(O):h,E=O==null?void 0:(0,Zt.isVariantCreator)(O)?O.output.type:O[e];if(O!=null&&E!==void 0&&E in _)return(c=_[E])===null||c===void 0?void 0:c.call(_,O);if(Xe.DEFAULT_KEY in _)return(v=_[Xe.DEFAULT_KEY])===null||v===void 0?void 0:v.call(_,O)}}let n=d=>()=>d,i=s;function s(d){return{[e]:d}}function u(d){let c=Object.keys(d).reduce((v,m)=>Object.assign(Object.assign({},v),{[m]:()=>d[m]}),{});return v=>c}function l(d,c){return v=>Object.assign(Object.assign({},d),{default:c})}function g(d,c){return v=>Object.assign(Object.assign({},d),{default:c})}return{match:r,ofLiteral:s,onLiteral:i,otherwise:l,partial:n,prematch:t,lookup:u,withFallback:g}}se.matchImpl=Kt});var $e=b(ue=>{"use strict";a();Object.defineProperty(ue,"__esModule",{value:!0});ue.typesImpl=void 0;var Xt=M();function $t(e){function t(n){return Array.isArray(n)?n.length&&(0,Xt.isVariantCreator)(n[0])?n.map(i=>i.output.type):n.map(i=>i[e]):Object.values(n).map(i=>i.output.type)}function r(n){return new Proxy({},{get:(i,s)=>s})}return{types:t,inferTypes:r}}ue.typesImpl=$t});var we=b(ce=>{"use strict";a();Object.defineProperty(ce,"__esModule",{value:!0});ce.flagsImpl=void 0;function er(e){function t(r){return r.reduce((n,i)=>Object.assign(Object.assign({},n),{[i[e]]:i}),Object.create(null))}return{flags:t}}ce.flagsImpl=er});var et=b(le=>{"use strict";a();Object.defineProperty(le,"__esModule",{value:!0});le.isOfVariantImpl=void 0;function tr(e){function t(...r){if(r.length===1){let[n]=r;return i=>i!=null&&Object.values(n).some(s=>s.output.type===i[e])}else if(r.length===2){let[n,i]=r;return n!=null&&Object.values(i).some(s=>s.output.type===n[e])}return!1}return{isOfVariant:t}}le.isOfVariantImpl=tr});var tt=b(R=>{"use strict";a();Object.defineProperty(R,"__esModule",{value:!0});R.remoteImpl=R.CompareResult=void 0;var rr=Pe(),nr=Ie(),ir=M(),or;(function(e){e[e.Lesser=-1]="Lesser",e[e.Equal=0]="Equal",e[e.Greater=1]="Greater"})(or=R.CompareResult||(R.CompareResult={}));function ar(e){let{isType:t}=(0,rr.isTypeImpl)(e),{match:r}=(0,nr.matchImpl)(e),{variantList:n}=(0,ir.variantImpl)(e);function i(c){return Object.keys(c).reduce((m,h)=>Object.assign(Object.assign({},m),{[h]:t(h)}),{})}function s(c){return{key:e,is:i(c),new:c,match:r}}function u(c){return typeof c=="string"?c:typeof c=="function"?c.output.type:c[e]}function l(c,v){let h=s(c),O=v.map(u);return Object.assign(Object.assign({},h),{length:v.length,compare:(_,E)=>{let k=O.findIndex(je=>je===u(_)),A=O.findIndex(je=>je===u(E)),$=k-A;return $===0?$:$/Math.abs($)},get(_){let E=this.types[_];return this.new[E]},index:_=>O.findIndex(E=>E===u(_)),types:O})}function g(c){let v=n(c);return l(v,c)}function d(c,v){return Array.isArray(c)?g(c):l(c,v)}return{remote:s,sequence:d}}R.remoteImpl=ar});var Se=b(G=>{"use strict";a();Object.defineProperty(G,"__esModule",{value:!0});G.typedImpl=G.pass=void 0;var sr=e=>e;G.pass=sr;function ur(e){function t(r){return typeof r=="function"?r(G.pass):r}return{typed:t}}G.typedImpl=ur});var Me=b(q=>{"use strict";a();Object.defineProperty(q,"__esModule",{value:!0});q.unpack=q.just=q.constant=void 0;function rt(e){return()=>e}q.constant=rt;q.just=rt;var cr=e=>e.payload;q.unpack=cr});var nt=b(D=>{"use strict";a();Object.defineProperty(D,"__esModule",{value:!0});D.matcherImpl=D.Matcher=D.tableToHandler=void 0;var lr=Me(),pr=M();function qe(e){return Object.keys(e).reduce((t,r)=>{let n=r;return Object.assign(Object.assign({},t),{[n]:(0,lr.just)(e[n])})},{})}D.tableToHandler=qe;var pe=class e{constructor(t,r,n){this.target=t,this.key=r,this.handler=n,this.complete=i=>{var s,u;if(this.target!=null&&this.target[this.key]in this.handler)return(u=(s=this.handler)[this.target[this.key]])===null||u===void 0?void 0:u.call(s,this.target);if(i?.withFallback!=null)return i.withFallback(this.target)}}execute(){let t=this.handler[this.target[this.key]];return t?.(this.target)}exhaust(t){var r;let n=Object.assign(Object.assign({},this.handler),t);return(r=n[this.target[this.key]])===null||r===void 0?void 0:r.call(n,this.target)}remaining(t){return new e(this.target,this.key,Object.assign(Object.assign({},this.handler),t))}else(t){var r,n;return this.target[this.key]in this.handler?(n=(r=this.handler)[this.target[this.key]])===null||n===void 0?void 0:n.call(r,this.target):t(this.target)}register(t){let r=Object.assign(Object.assign({},this.handler),qe(t));return new e(this.target,this.key,r)}lookup(t){var r;let n=Object.assign(Object.assign({},this.handler),qe(t));return(r=n[this.target[this.key]])===null||r===void 0?void 0:r.call(n,this.target)}with(t){return new e(this.target,this.key,Object.assign(Object.assign({},this.handler),t))}when(t,r){if(r!=null){let i=(Array.isArray(t)?t:[t]).reduce((s,u)=>{let l=typeof u=="string"?u:(0,pr.isVariantCreator)(u)?u.output.type:void 0;return l!=null?Object.assign(Object.assign({},s),{[l]:r}):s},{});return new e(this.target,this.key,Object.assign(Object.assign({},this.handler),i))}else return new e(this.target,this.key,Object.assign(Object.assign({},this.handler),t))}};D.Matcher=pe;function dr(e){function t(r){let n=typeof r=="string"?{[e]:r}:r;return new pe(n,e,{})}return{matcher:t}}D.matcherImpl=dr});var De=b(de=>{"use strict";a();Object.defineProperty(de,"__esModule",{value:!0});de.variantCosmos=void 0;var fr=Pe(),gr=Ie(),mr=M(),yr=$e(),hr=we(),vr=et(),br=tt(),jr=Se(),Or=nt();function Fr({key:e}){let{isType:t}=(0,fr.isTypeImpl)(e),{flags:r}=(0,hr.flagsImpl)(e);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({key:e,isType:t,flags:r},(0,vr.isOfVariantImpl)(e)),(0,gr.matchImpl)(e)),(0,Or.matcherImpl)(e)),(0,br.remoteImpl)(e)),(0,jr.typedImpl)(e)),(0,yr.typesImpl)(e)),(0,mr.variantImpl)(e))}de.variantCosmos=Fr});var Ne=b(p=>{"use strict";a();var j;Object.defineProperty(p,"__esModule",{value:!0});p.withFallback=p.variation=p.variantModule=p.variantList=p.variant=p.types=p.typed=p.lookup=p.sequence=p.scoped=p.remote=p.prematch=p.partial=p.otherwise=p.onLiteral=p.ofLiteral=p.matcher=p.match=p.isType=p.isOfVariant=p.inferTypes=p.flags=p.descope=void 0;var Tr=De();j=(0,Tr.variantCosmos)({key:"type"}),p.descope=j.descope,p.flags=j.flags,p.inferTypes=j.inferTypes,p.isOfVariant=j.isOfVariant,p.isType=j.isType,p.match=j.match,p.matcher=j.matcher,p.ofLiteral=j.ofLiteral,p.onLiteral=j.onLiteral,p.otherwise=j.otherwise,p.partial=j.partial,p.prematch=j.prematch,p.remote=j.remote,p.scoped=j.scoped,p.sequence=j.sequence,p.lookup=j.lookup,p.typed=j.typed,p.types=j.types,p.variant=j.variant,p.variantList=j.variantList,p.variantModule=j.variantModule,p.variation=j.variation,p.withFallback=j.withFallback});var it=b(fe=>{"use strict";a();Object.defineProperty(fe,"__esModule",{value:!0});fe.augment=void 0;var _r=Ne(),Er=M();function Cr(e,t){return Object.keys(e).reduce((r,n)=>{let i=e[n],s=(0,Er.isVariantCreator)(i)?(0,_r.variation)(i.output.type,(...u)=>{let l=i(...u);return Object.assign(Object.assign({},t(l)),l)}):(...u)=>{let l=e[n],g=typeof l=="function"?l(...u):{};return Object.assign(Object.assign({},t(g)),g)};return Object.assign(Object.assign({},r),{[n]:s})},{})}fe.augment=Cr});var ot=b(ge=>{"use strict";a();Object.defineProperty(ge,"__esModule",{value:!0});ge.constrained=void 0;function Pr(e,t){return t}ge.constrained=Pr});var at=b(me=>{"use strict";a();Object.defineProperty(me,"__esModule",{value:!0});me.construct=void 0;function kr(e){return(...t)=>new e(t)}me.construct=kr});var ut=b(U=>{"use strict";a();Object.defineProperty(U,"__esModule",{value:!0});U.Alpha=U.onTerms=void 0;var Ar=we(),Ir=M(),wr=Symbol("VARIANT GENERIC TEMPLATE");function Sr(e){return Object.assign(Object.assign({},e(U.Alpha)),{[wr]:void 0})}U.onTerms=Sr;var st="__term",Mr=(0,Ir.variantImpl)(st).variant,qr=(0,Ar.flagsImpl)(st).flags,Dr=Mr(["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]);U.Alpha=qr(Object.values(Dr).map(e=>e()))});var ct=b(W=>{"use strict";a();Object.defineProperty(W,"__esModule",{value:!0});W.typeMap=W.typeCatalog=void 0;function Nr(e){return Object.values(e).reduce((t,r)=>Object.assign(Object.assign({},t),{[r.output.type]:r.output.type}),{})}W.typeCatalog=Nr;function Vr(e){return Object.keys(e).reduce((t,r)=>Object.assign(Object.assign({},t),{[r]:e[r].output.type}),{})}W.typeMap=Vr});var pt=b(z=>{"use strict";a();Object.defineProperty(z,"__esModule",{value:!0});z.literalist=z.catalog=void 0;function lt(e,t){return Array.isArray(e)?e.reduce((r,n,i)=>Object.assign(Object.assign({},r),{[n]:t!=null?t(n,i):n}),{}):e}z.catalog=lt;z.literalist=lt});var dt=b(ye=>{"use strict";a();Object.defineProperty(ye,"__esModule",{value:!0});ye.patterned=void 0;function Rr(e,t){return t}ye.patterned=Rr});var ft=b(N=>{"use strict";a();Object.defineProperty(N,"__esModule",{value:!0});N.nil=N.payload=N.fields=void 0;function Gr(e={}){return(...t)=>{let[r]=t;return Object.assign(Object.assign({},e),r)}}N.fields=Gr;function Ur(e){return t=>({payload:t})}N.payload=Ur;var xr=()=>({});N.nil=xr});var yt=b(f=>{"use strict";a();Object.defineProperty(f,"__esModule",{value:!0});f.payload=f.nil=f.fields=f.HOI=f.pass=f.patterned=f.unpack=f.just=f.constant=f.literalist=f.catalog=f.typeCatalog=f.typeMap=f.onTerms=f.variantCosmos=f.construct=f.constrained=f.augment=void 0;var Lr=it();Object.defineProperty(f,"augment",{enumerable:!0,get:function(){return Lr.augment}});var Br=ot();Object.defineProperty(f,"constrained",{enumerable:!0,get:function(){return Br.constrained}});var Wr=at();Object.defineProperty(f,"construct",{enumerable:!0,get:function(){return Wr.construct}});var zr=De();Object.defineProperty(f,"variantCosmos",{enumerable:!0,get:function(){return zr.variantCosmos}});var Hr=ut();Object.defineProperty(f,"onTerms",{enumerable:!0,get:function(){return Hr.onTerms}});var gt=ct();Object.defineProperty(f,"typeMap",{enumerable:!0,get:function(){return gt.typeMap}});Object.defineProperty(f,"typeCatalog",{enumerable:!0,get:function(){return gt.typeCatalog}});var mt=pt();Object.defineProperty(f,"catalog",{enumerable:!0,get:function(){return mt.catalog}});Object.defineProperty(f,"literalist",{enumerable:!0,get:function(){return mt.literalist}});var Ve=Me();Object.defineProperty(f,"constant",{enumerable:!0,get:function(){return Ve.constant}});Object.defineProperty(f,"just",{enumerable:!0,get:function(){return Ve.just}});Object.defineProperty(f,"unpack",{enumerable:!0,get:function(){return Ve.unpack}});var Jr=dt();Object.defineProperty(f,"patterned",{enumerable:!0,get:function(){return Jr.patterned}});var Qr=Se();Object.defineProperty(f,"pass",{enumerable:!0,get:function(){return Qr.pass}});var Yr=ke();Object.defineProperty(f,"HOI",{enumerable:!0,get:function(){return Yr.HOI}});var Re=ft();Object.defineProperty(f,"fields",{enumerable:!0,get:function(){return Re.fields}});Object.defineProperty(f,"nil",{enumerable:!0,get:function(){return Re.nil}});Object.defineProperty(f,"payload",{enumerable:!0,get:function(){return Re.payload}})});var he=b(V=>{"use strict";a();var Zr=V&&V.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),ht=V&&V.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Zr(t,e,r)};Object.defineProperty(V,"__esModule",{value:!0});ht(yt(),V);ht(Ne(),V)});a();a();var Ye=H(Ce(),1),{WError:Lt}=Ye.default,K=class extends Lt{cliCode;constructor(t){let r=t.cause instanceof Error?t.cause:new Error(JSON.stringify(t.cause));super({name:t.code.type,cause:r,info:t.info},t.code.type),this.cliCode=t.code,this.name=t.code.type}};a();var o=H(he(),1),ve=(0,o.variant)({FailedToGetDeviceCode:{},FailedToGetAuthToken:{},FailedToRenewAuthToken:{},FailedToRefreshTokenForSite:{},FailedToRevokeRefreshToken:(0,o.fields)(),UnknownFailure:(0,o.fields)(),FailedToFetchPackageJson:{},FailedToGetDeveloperApps:{},FailedToUpdateTelemetryConfig:{},FailedToSyncToRevision:(0,o.fields)(),FailedToCreateVersion:{},FailedToReadCache:(0,o.fields)(),FailedToWriteCache:(0,o.fields)(),UploadApplicationFailed:{},FailedToCreateDevCenterApp:{},FailedToGetPlacements:{},FailedToGetAppSecret:{},FailedToCreateTunnel:{},FailedToDeleteTunnel:{},GridAppFailedToUpdateFiles:{},FailedToCreateGridApp:(0,o.fields)(),InvalidResponseData:{},InvalidCreateAppResponse:{},InvalidDeployAppResponse:{},InvalidGetDeploymentResponse:{},FailedToGetPagesDiff:{},InvalidViteBuildOutput:{},ViteModuleBundleNotFound:{},ViteFileNotFoundInOutput:(0,o.fields)(),FailedToCreateBackendDeployment:{},FailedToUpdateBackendDeployment:{},InvalidDeploymentUrl:(0,o.fields)(),FailedToGetBackendDeployment:{},FailedToDeployBackend:{},FailedToGetUserInfo:{},FailedToGetMyAccount:{},FailedToCreateDevelopmentSite:{},FailedToGetDevelopmentSites:{},FailedToGetDevelopmentSitesLimit:{},FailedToGetRequiredApps:{},FailedToQueryApps:{},FailedToGetMarketListing:{},FailedToAddRequiredApp:{},FailedToGetAppValidity:{},FailedToQuerySites:{},FailedToGetSite:{},FailedToDeploySite:{},FailedToPublishDeployment:{},FailedToMarkDeploymentAsPermanent:{},FailedToCheckIfAppInstalled:{},TypeErrorInvalidUrl:{},FailedToGenerateSelfsignedCertificate:{},FailedToResolveViteOrigin:{},FailedToCreateAppRelease:{},FailedToUpdateAppRelease:{},FailedToCreateComponents:{},FailedToGetResolveNpmDependenciesResult:{},FailedToResolveNpmDependencies:{},FailedToCheckDeprecatedStatus:{},FailedToCreateSiteOverride:{},FailedToGetDeploymentStatus:{},FailedToGetPipelineErrorInfo:{},FailedToGenerateAppMarketQueryParam:{},InvalidDependenciesJsonSchemaError:(0,o.fields)(),FailedToParseLog:{},FailedToConnectToLogsService:{},LogsConnectionTimeout:{},FailedToFetchAppForVersion:{},InvalidSiteOverrideID:{},FailedToFindEsbuildOutputFile:{},FailedOptimizingWithEsbuild:(0,o.fields)(),FailedReadingEsbuildOutputFile:{},InvalidGitUrl:(0,o.fields)(),TemplatePathNotFound:(0,o.fields)(),FailedToQueryCliAppTemplates:{},FailedToCreateDevCenterAppFromTemplate:{},FailedToGetSiteInstalledApps:{},FailedToGetClientSpecMap:{}}),Ge=(0,o.variant)({LatestVersionOfCreateAppRequired:(0,o.fields)(),FailedToCreateProjectFolder:(0,o.fields)(),EmptyDirectoryRequiredAppGeneration:(0,o.fields)(),InvalidNewPackageName:(0,o.fields)(),UnsupportedPackageManager:(0,o.fields)(),UnsupportedPackageManagerWorkspaces:(0,o.fields)(),FailedAddingPackageToWorkspace:{},SitePermissionDenied:(0,o.fields)(),AppPermissionDenied:(0,o.fields)(),BuiltProjectNeeded:{},WixUninstallMissingPackageName:{},FailedToReadJson:(0,o.fields)(),FailedToWriteJson:(0,o.fields)(),InvalidJsonFile:(0,o.fields)(),FailedToWriteWixLock:{},InvalidVeloConfigJson:(0,o.fields)(),DashboardPageConfigNotFound:(0,o.fields)(),EmbeddedScriptConfigNotFound:(0,o.fields)(),NoExtensionsFound:{},CustomElementConfigNotFound:(0,o.fields)(),SitePluginConfigNotFound:(0,o.fields)(),NoPagesDirectoryFound:(0,o.fields)(),DashboardPluginConfigNotFound:(0,o.fields)(),DashboardMenuPluginConfigNotFound:(0,o.fields)(),ServicePluginConfigNotFound:(0,o.fields)(),DashboardModalConfigNotFound:(0,o.fields)(),InvalidConfigSchemaError:(0,o.fields)(),InvalidParamsOverrideSchemaError:(0,o.fields)(),PermissionDenied:{},SiteSelectorTimedout:{},FailedToReadProjectFiles:(0,o.fields)(),FailedToCreateVersionForSubmittedApp:{},GridAppFilesMaxLengthExcceeded:(0,o.fields)(),DeviceCodeTimedOut:{},DuplicateComponentIdsError:(0,o.fields)(),FailedToSaveDevelopmentSite:(0,o.fields)(),FailedToBuildApp:(0,o.fields)(),FailedToInitializeGitRepo:(0,o.fields)(),FailedToInstallDependencies:(0,o.fields)(),FailedToCommitChanges:(0,o.fields)(),FailedToDeleteAuthData:(0,o.fields)(),FailedToDeleteLegacyAuthData:(0,o.fields)(),FailedToSaveAuthData:(0,o.fields)(),FailedToSaveApiKeyAuthData:(0,o.fields)(),FailedToRenewAuthTokenSiteNotFound:(0,o.fields)(),FailedToRenewAuthTokenRefreshTokenRevoked:{},FailedToInstallPackage:(0,o.fields)(),FailedToInstallPackages:(0,o.fields)(),FailedToUninstallPackage:(0,o.fields)(),FailedMigrationToAnyNpm:{},DeprecatedVersion:(0,o.fields)(),FailedToCloneRepo:(0,o.fields)(),AuthenticationRequired:{},SiteConfiguredRequired:{},NonInteractiveTerminal:{},FailedToWatchFiles:(0,o.fields)(),CliAppVersionMismatch:(0,o.fields)(),NetworkError:(0,o.fields)(),AppForVersionNotFound:(0,o.fields)(),UnknownServicePlugin:(0,o.fields)(),InvalidServicePluginFolder:(0,o.fields)(),FailedToGetLogsTopology:{},FailedInstallCloudflareNoAccess:(0,o.fields)(),CliAppTemplateNotFound:(0,o.fields)()}),Kr=(0,o.variant)({InvalidDashboardPageRoute:(0,o.fields)(),InvalidEmbeddedScriptFolder:(0,o.fields)(),InvalidEmbeddedScriptTemplate:(0,o.fields)(),InvalidCustomElementTagName:(0,o.fields)(),InvalidSiteFrontendPackageVersion:(0,o.fields)(),InvalidServicePluginImplementation:(0,o.fields)()}),X=(0,o.variant)({...ve,...Ge,...Kr});a();var Ue=H(he(),1);function be(e){return e&&typeof e=="object"&&"cliCode"in e?(0,Ue.isOfVariant)(e.cliCode,X):!1}function Xr(e){return(0,Ue.isOfVariant)(e.cliCode,ve)}a();var vt=H(he(),1),bt=H(Ce(),1);function jt(e){if(be(e)&&(0,vt.isOfVariant)(e.cliCode,Ge))return e;let t=bt.default.cause(e);return t?jt(t):null}function $r(e){let t=be(e)?e:new K({code:X.UnknownFailure({error:e})});return jt(t)??t}export{he as a,Ce as b,K as c,ve as d,X as e,be as f,Xr as g,$r as h};
6
+ //# sourceMappingURL=chunk-AQJFGMCV.js.map