ghost 5.88.3 → 5.89.0

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 (176) hide show
  1. package/components/tryghost-adapter-cache-memory-ttl-5.89.0.tgz +0 -0
  2. package/components/tryghost-adapter-cache-redis-5.89.0.tgz +0 -0
  3. package/components/tryghost-adapter-manager-5.89.0.tgz +0 -0
  4. package/components/tryghost-announcement-bar-settings-5.89.0.tgz +0 -0
  5. package/components/tryghost-api-framework-5.89.0.tgz +0 -0
  6. package/components/tryghost-api-version-compatibility-service-5.89.0.tgz +0 -0
  7. package/components/tryghost-audience-feedback-5.89.0.tgz +0 -0
  8. package/components/tryghost-bookshelf-repository-5.89.0.tgz +0 -0
  9. package/components/tryghost-bootstrap-socket-5.89.0.tgz +0 -0
  10. package/components/tryghost-collections-5.89.0.tgz +0 -0
  11. package/components/tryghost-constants-5.89.0.tgz +0 -0
  12. package/components/tryghost-custom-theme-settings-service-5.89.0.tgz +0 -0
  13. package/components/{tryghost-data-generator-5.88.3.tgz → tryghost-data-generator-5.89.0.tgz} +0 -0
  14. package/components/tryghost-domain-events-5.89.0.tgz +0 -0
  15. package/components/tryghost-donations-5.89.0.tgz +0 -0
  16. package/components/tryghost-dynamic-routing-events-5.89.0.tgz +0 -0
  17. package/components/{tryghost-email-addresses-5.88.3.tgz → tryghost-email-addresses-5.89.0.tgz} +0 -0
  18. package/components/tryghost-email-analytics-provider-mailgun-5.89.0.tgz +0 -0
  19. package/components/tryghost-email-analytics-service-5.89.0.tgz +0 -0
  20. package/components/tryghost-email-content-generator-5.89.0.tgz +0 -0
  21. package/components/tryghost-email-events-5.89.0.tgz +0 -0
  22. package/components/{tryghost-email-service-5.88.3.tgz → tryghost-email-service-5.89.0.tgz} +0 -0
  23. package/components/tryghost-email-suppression-list-5.89.0.tgz +0 -0
  24. package/components/tryghost-express-dynamic-redirects-5.89.0.tgz +0 -0
  25. package/components/tryghost-external-media-inliner-5.89.0.tgz +0 -0
  26. package/components/tryghost-extract-api-key-5.89.0.tgz +0 -0
  27. package/components/tryghost-ghost-5.89.0.tgz +0 -0
  28. package/components/tryghost-html-to-plaintext-5.89.0.tgz +0 -0
  29. package/components/tryghost-i18n-5.89.0.tgz +0 -0
  30. package/components/tryghost-importer-handler-content-files-5.89.0.tgz +0 -0
  31. package/components/tryghost-importer-revue-5.89.0.tgz +0 -0
  32. package/components/tryghost-in-memory-repository-5.89.0.tgz +0 -0
  33. package/components/tryghost-job-manager-5.89.0.tgz +0 -0
  34. package/components/tryghost-link-redirects-5.89.0.tgz +0 -0
  35. package/components/tryghost-link-replacer-5.89.0.tgz +0 -0
  36. package/components/tryghost-link-tracking-5.89.0.tgz +0 -0
  37. package/components/{tryghost-magic-link-5.88.3.tgz → tryghost-magic-link-5.89.0.tgz} +0 -0
  38. package/components/tryghost-mail-events-5.89.0.tgz +0 -0
  39. package/components/tryghost-mailgun-client-5.89.0.tgz +0 -0
  40. package/components/tryghost-member-attribution-5.89.0.tgz +0 -0
  41. package/components/tryghost-member-events-5.89.0.tgz +0 -0
  42. package/components/tryghost-members-api-5.89.0.tgz +0 -0
  43. package/components/tryghost-members-csv-5.89.0.tgz +0 -0
  44. package/components/tryghost-members-events-service-5.89.0.tgz +0 -0
  45. package/components/{tryghost-members-importer-5.88.3.tgz → tryghost-members-importer-5.89.0.tgz} +0 -0
  46. package/components/tryghost-members-offers-5.89.0.tgz +0 -0
  47. package/components/tryghost-members-payments-5.89.0.tgz +0 -0
  48. package/components/tryghost-members-ssr-5.89.0.tgz +0 -0
  49. package/components/tryghost-members-stripe-service-5.89.0.tgz +0 -0
  50. package/components/tryghost-mentions-email-report-5.89.0.tgz +0 -0
  51. package/components/tryghost-milestones-5.89.0.tgz +0 -0
  52. package/components/tryghost-minifier-5.89.0.tgz +0 -0
  53. package/components/tryghost-model-to-domain-event-interceptor-5.89.0.tgz +0 -0
  54. package/components/tryghost-mw-api-version-mismatch-5.89.0.tgz +0 -0
  55. package/components/tryghost-mw-cache-control-5.89.0.tgz +0 -0
  56. package/components/tryghost-mw-error-handler-5.89.0.tgz +0 -0
  57. package/components/tryghost-mw-session-from-token-5.89.0.tgz +0 -0
  58. package/components/tryghost-mw-update-user-last-seen-5.89.0.tgz +0 -0
  59. package/components/tryghost-mw-version-match-5.89.0.tgz +0 -0
  60. package/components/tryghost-mw-vhost-5.89.0.tgz +0 -0
  61. package/components/tryghost-nql-filter-expansions-5.89.0.tgz +0 -0
  62. package/components/tryghost-oembed-service-5.89.0.tgz +0 -0
  63. package/components/tryghost-package-json-5.89.0.tgz +0 -0
  64. package/components/tryghost-post-events-5.89.0.tgz +0 -0
  65. package/components/{tryghost-post-revisions-5.88.3.tgz → tryghost-post-revisions-5.89.0.tgz} +0 -0
  66. package/components/tryghost-posts-service-5.89.0.tgz +0 -0
  67. package/components/tryghost-recommendations-5.89.0.tgz +0 -0
  68. package/components/tryghost-referrers-5.89.0.tgz +0 -0
  69. package/components/tryghost-security-5.89.0.tgz +0 -0
  70. package/components/tryghost-session-service-5.89.0.tgz +0 -0
  71. package/components/tryghost-settings-path-manager-5.89.0.tgz +0 -0
  72. package/components/tryghost-slack-notifications-5.89.0.tgz +0 -0
  73. package/components/tryghost-staff-service-5.89.0.tgz +0 -0
  74. package/components/tryghost-stats-service-5.89.0.tgz +0 -0
  75. package/components/tryghost-tiers-5.89.0.tgz +0 -0
  76. package/components/tryghost-update-check-service-5.89.0.tgz +0 -0
  77. package/components/tryghost-verification-trigger-5.89.0.tgz +0 -0
  78. package/components/tryghost-version-notifications-data-service-5.89.0.tgz +0 -0
  79. package/components/tryghost-webmentions-5.89.0.tgz +0 -0
  80. package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +2 -2
  81. package/core/built/admin/assets/admin-x-activitypub/{index-d7494526.mjs → index-f3a8baa8.mjs} +3311 -3252
  82. package/core/built/admin/assets/admin-x-activitypub/{modals-8098b85c.mjs → modals-915e3990.mjs} +182 -191
  83. package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +2 -2
  84. package/core/built/admin/assets/admin-x-demo/{index-5e68f89b.mjs → index-1ef6b7bc.mjs} +10 -9
  85. package/core/built/admin/assets/admin-x-demo/{modals-f789a6c4.mjs → modals-de711744.mjs} +2 -2
  86. package/core/built/admin/assets/admin-x-settings/{CodeEditorView-3601b44e.mjs → CodeEditorView-b15adef3.mjs} +2 -2
  87. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
  88. package/core/built/admin/assets/admin-x-settings/{index-0b24e982.mjs → index-027fbe4f.mjs} +2 -2
  89. package/core/built/admin/assets/admin-x-settings/{index-e7c4aa3c.mjs → index-47d489ec.mjs} +115 -114
  90. package/core/built/admin/assets/admin-x-settings/{modals-f8ab7cf2.mjs → modals-226093f6.mjs} +725 -724
  91. package/core/built/admin/assets/{chunk.42.0879e40a4de3db25b177.js → chunk.42.5ad82b3d5f3da077640e.js} +71 -71
  92. package/core/built/admin/assets/{chunk.524.4004209e970256976de7.js → chunk.524.dbdd496ecac1abd29a9f.js} +5 -5
  93. package/core/built/admin/assets/{chunk.582.eab996a9d6616a80727a.js → chunk.582.fbabcd173cf9a4a554e6.js} +6 -6
  94. package/core/built/admin/assets/codemirror/{codemirror-98996fc475bb3df2b1b82dd701d32bc0.js → codemirror-91774021e5e17ea08db5cd2ed9f3e664.js} +5 -5
  95. package/core/built/admin/assets/{ghost-a9fa385e2a92cc3686349b2dea0249d2.js → ghost-3a72e468a9751efec6313b798b76bf70.js} +105 -94
  96. package/core/built/admin/assets/{vendor-051d43ec47258b77ffd2fcc21a6d8c50.js → vendor-35f20b2f9b6201dcd4a00c8acac98aa6.js} +9 -9
  97. package/core/built/admin/index.html +5 -5
  98. package/core/server/data/migrations/versions/5.89/2024-07-30-19-51-06-backfill-offer-redemptions.js +64 -0
  99. package/core/server/services/members/middleware.js +1 -1
  100. package/core/shared/config/env/config.development.json +12 -0
  101. package/package.json +148 -148
  102. package/yarn.lock +70 -70
  103. package/components/tryghost-adapter-cache-memory-ttl-5.88.3.tgz +0 -0
  104. package/components/tryghost-adapter-cache-redis-5.88.3.tgz +0 -0
  105. package/components/tryghost-adapter-manager-5.88.3.tgz +0 -0
  106. package/components/tryghost-announcement-bar-settings-5.88.3.tgz +0 -0
  107. package/components/tryghost-api-framework-5.88.3.tgz +0 -0
  108. package/components/tryghost-api-version-compatibility-service-5.88.3.tgz +0 -0
  109. package/components/tryghost-audience-feedback-5.88.3.tgz +0 -0
  110. package/components/tryghost-bookshelf-repository-5.88.3.tgz +0 -0
  111. package/components/tryghost-bootstrap-socket-5.88.3.tgz +0 -0
  112. package/components/tryghost-collections-5.88.3.tgz +0 -0
  113. package/components/tryghost-constants-5.88.3.tgz +0 -0
  114. package/components/tryghost-custom-theme-settings-service-5.88.3.tgz +0 -0
  115. package/components/tryghost-domain-events-5.88.3.tgz +0 -0
  116. package/components/tryghost-donations-5.88.3.tgz +0 -0
  117. package/components/tryghost-dynamic-routing-events-5.88.3.tgz +0 -0
  118. package/components/tryghost-email-analytics-provider-mailgun-5.88.3.tgz +0 -0
  119. package/components/tryghost-email-analytics-service-5.88.3.tgz +0 -0
  120. package/components/tryghost-email-content-generator-5.88.3.tgz +0 -0
  121. package/components/tryghost-email-events-5.88.3.tgz +0 -0
  122. package/components/tryghost-email-suppression-list-5.88.3.tgz +0 -0
  123. package/components/tryghost-express-dynamic-redirects-5.88.3.tgz +0 -0
  124. package/components/tryghost-external-media-inliner-5.88.3.tgz +0 -0
  125. package/components/tryghost-extract-api-key-5.88.3.tgz +0 -0
  126. package/components/tryghost-ghost-5.88.3.tgz +0 -0
  127. package/components/tryghost-html-to-plaintext-5.88.3.tgz +0 -0
  128. package/components/tryghost-i18n-5.88.3.tgz +0 -0
  129. package/components/tryghost-importer-handler-content-files-5.88.3.tgz +0 -0
  130. package/components/tryghost-importer-revue-5.88.3.tgz +0 -0
  131. package/components/tryghost-in-memory-repository-5.88.3.tgz +0 -0
  132. package/components/tryghost-job-manager-5.88.3.tgz +0 -0
  133. package/components/tryghost-link-redirects-5.88.3.tgz +0 -0
  134. package/components/tryghost-link-replacer-5.88.3.tgz +0 -0
  135. package/components/tryghost-link-tracking-5.88.3.tgz +0 -0
  136. package/components/tryghost-mail-events-5.88.3.tgz +0 -0
  137. package/components/tryghost-mailgun-client-5.88.3.tgz +0 -0
  138. package/components/tryghost-member-attribution-5.88.3.tgz +0 -0
  139. package/components/tryghost-member-events-5.88.3.tgz +0 -0
  140. package/components/tryghost-members-api-5.88.3.tgz +0 -0
  141. package/components/tryghost-members-csv-5.88.3.tgz +0 -0
  142. package/components/tryghost-members-events-service-5.88.3.tgz +0 -0
  143. package/components/tryghost-members-offers-5.88.3.tgz +0 -0
  144. package/components/tryghost-members-payments-5.88.3.tgz +0 -0
  145. package/components/tryghost-members-ssr-5.88.3.tgz +0 -0
  146. package/components/tryghost-members-stripe-service-5.88.3.tgz +0 -0
  147. package/components/tryghost-mentions-email-report-5.88.3.tgz +0 -0
  148. package/components/tryghost-milestones-5.88.3.tgz +0 -0
  149. package/components/tryghost-minifier-5.88.3.tgz +0 -0
  150. package/components/tryghost-model-to-domain-event-interceptor-5.88.3.tgz +0 -0
  151. package/components/tryghost-mw-api-version-mismatch-5.88.3.tgz +0 -0
  152. package/components/tryghost-mw-cache-control-5.88.3.tgz +0 -0
  153. package/components/tryghost-mw-error-handler-5.88.3.tgz +0 -0
  154. package/components/tryghost-mw-session-from-token-5.88.3.tgz +0 -0
  155. package/components/tryghost-mw-update-user-last-seen-5.88.3.tgz +0 -0
  156. package/components/tryghost-mw-version-match-5.88.3.tgz +0 -0
  157. package/components/tryghost-mw-vhost-5.88.3.tgz +0 -0
  158. package/components/tryghost-nql-filter-expansions-5.88.3.tgz +0 -0
  159. package/components/tryghost-oembed-service-5.88.3.tgz +0 -0
  160. package/components/tryghost-package-json-5.88.3.tgz +0 -0
  161. package/components/tryghost-post-events-5.88.3.tgz +0 -0
  162. package/components/tryghost-posts-service-5.88.3.tgz +0 -0
  163. package/components/tryghost-recommendations-5.88.3.tgz +0 -0
  164. package/components/tryghost-referrers-5.88.3.tgz +0 -0
  165. package/components/tryghost-security-5.88.3.tgz +0 -0
  166. package/components/tryghost-session-service-5.88.3.tgz +0 -0
  167. package/components/tryghost-settings-path-manager-5.88.3.tgz +0 -0
  168. package/components/tryghost-slack-notifications-5.88.3.tgz +0 -0
  169. package/components/tryghost-staff-service-5.88.3.tgz +0 -0
  170. package/components/tryghost-stats-service-5.88.3.tgz +0 -0
  171. package/components/tryghost-tiers-5.88.3.tgz +0 -0
  172. package/components/tryghost-update-check-service-5.88.3.tgz +0 -0
  173. package/components/tryghost-verification-trigger-5.88.3.tgz +0 -0
  174. package/components/tryghost-version-notifications-data-service-5.88.3.tgz +0 -0
  175. package/components/tryghost-webmentions-5.88.3.tgz +0 -0
  176. /package/core/built/admin/assets/{chunk.42.0879e40a4de3db25b177.js.LICENSE.txt → chunk.42.5ad82b3d5f3da077640e.js.LICENSE.txt} +0 -0
@@ -1,14 +1,14 @@
1
1
  var zd = Object.defineProperty;
2
2
  var Pd = (e, t, r) => t in e ? zd(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var Ua = (e, t, r) => (Pd(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { j as s, u as ps, a as G, b as ie, H as Ee, c as rr, S as hn, d as ge, F as Yd, e as Ye, R as Je, f as xt, g as it, h as Fd, i as Zd, B as pe, k as Gd, l as Kd, m as xn, n as Xd, E as Wd, o as qd, p as _i, q as Vd, N as ne, M as ze, r as vt, s as _d, t as pt, v as zn, w as $d, T as pr, I as Ge, P as $i, _ as eh, x as th, y as el, z as ye, A as Te, C as rh, D as nh, G as aa, J as gs, K as ws, L as ah, O as je, Q as He, U as ce, V as sh, W as St, X as vr, Y as De, Z as tl, $ as oh, a0 as Le, a1 as ih, a2 as lh, a3 as rl, a4 as Ah, a5 as ch, a6 as nl, a7 as ei, a8 as al, a9 as Ue, aa as ar, ab as uh, ac as kr, ad as sl, ae as Ft, af as It, ag as sa, ah as Ut, ai as dh, aj as ti, ak as ri, al as We, am as ol, an as hh, ao as Pr, ap as Zt, aq as Yt, ar as Ur, as as Gt, at as sr, au as il, av as gr, aw as fh, ax as mh, ay as Pn, az as vn, aA as ph, aB as gh, aC as Me, aD as wh, aE as ll, aF as kn, aG as xh, aH as Wt, aI as vh, aJ as Se, aK as Ie, aL as ve, aM as ee, aN as re, aO as ke, aP as kh, aQ as xs, aR as _r, aS as Al, aT as cl, aU as bh, aV as yh, aW as Eh, aX as Mh, aY as Sh, aZ as Ih, a_ as Jh, a$ as Va, b0 as Th, b1 as Ch, b2 as Dh, b3 as jh, b4 as ul, b5 as dl, b6 as bn, b7 as Rh, b8 as fn, b9 as vs, ba as hl, bb as ni, bc as fl, bd as Oh, be as yn, bf as ks, bg as Qh, bh as Nh, bi as mn, bj as ml, bk as Hh, bl as Uh, bm as Bh, bn as _a, bo as Lh, bp as kt, bq as on, br as bs, bs as zh, bt as Ph, bu as pl, bv as Yh, bw as Fh, bx as Zh, by as Gh, bz as Kh, bA as ai, bB as si, bC as Xh, bD as oi, bE as Wh, bF as qh, bG as Vh, bH as oa, bI as Yn, bJ as $a, bK as _h, bL as $h, bM as gl, bN as ef, bO as wl, bP as tf, bQ as rf, bR as nf, bS as af, bT as Tr, bU as ii, bV as li, bW as sf, bX as of, bY as lf, bZ as Af } from "./index-e7c4aa3c.mjs";
4
+ import { j as s, u as ps, a as G, b as ie, H as Ee, c as rr, S as hn, d as ge, F as Yd, e as Ye, R as Je, f as xt, g as it, h as Fd, i as Zd, B as pe, k as Gd, l as Kd, m as xn, n as Xd, E as Wd, o as qd, p as _i, q as Vd, N as ne, M as ze, r as vt, s as _d, t as pt, v as zn, w as $d, T as pr, I as Ge, P as $i, _ as eh, x as th, y as el, z as ye, A as Te, C as rh, D as nh, G as aa, J as gs, K as ws, L as ah, O as je, Q as He, U as ce, V as sh, W as St, X as vr, Y as De, Z as tl, $ as oh, a0 as Le, a1 as ih, a2 as lh, a3 as rl, a4 as Ah, a5 as ch, a6 as nl, a7 as ei, a8 as al, a9 as Ue, aa as ar, ab as uh, ac as kr, ad as sl, ae as Ft, af as It, ag as sa, ah as Ut, ai as dh, aj as ti, ak as ri, al as We, am as ol, an as hh, ao as Pr, ap as Zt, aq as Yt, ar as Ur, as as Gt, at as sr, au as il, av as gr, aw as fh, ax as mh, ay as Pn, az as vn, aA as ph, aB as gh, aC as Me, aD as wh, aE as ll, aF as kn, aG as xh, aH as Wt, aI as vh, aJ as Se, aK as Ie, aL as ve, aM as ee, aN as re, aO as ke, aP as kh, aQ as xs, aR as _r, aS as Al, aT as cl, aU as bh, aV as yh, aW as Eh, aX as Mh, aY as Sh, aZ as Ih, a_ as Jh, a$ as Va, b0 as Th, b1 as Ch, b2 as Dh, b3 as jh, b4 as ul, b5 as dl, b6 as bn, b7 as Rh, b8 as fn, b9 as vs, ba as hl, bb as ni, bc as fl, bd as Oh, be as yn, bf as ks, bg as Qh, bh as Nh, bi as mn, bj as ml, bk as Hh, bl as Uh, bm as Bh, bn as _a, bo as Lh, bp as kt, bq as on, br as bs, bs as zh, bt as Ph, bu as pl, bv as Yh, bw as Fh, bx as Zh, by as Gh, bz as Kh, bA as ai, bB as si, bC as Xh, bD as oi, bE as Wh, bF as qh, bG as Vh, bH as oa, bI as Yn, bJ as $a, bK as _h, bL as $h, bM as gl, bN as ef, bO as wl, bP as tf, bQ as rf, bR as nf, bS as af, bT as Tr, bU as ii, bV as li, bW as sf, bX as of, bY as lf, bZ as Af } from "./index-47d489ec.mjs";
5
5
  const xl = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("div", { className: "flex h-full w-full flex-col px-5", ...t, children: /* @__PURE__ */ s.jsx("div", { className: "h-full w-full overflow-hidden rounded-t-[4px] shadow-sm", children: e }) }), vl = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("div", { className: "flex h-[775px] w-[380px] flex-col rounded-3xl bg-white p-2 shadow-xl dark:bg-grey-900", ...t, children: /* @__PURE__ */ s.jsx("div", { className: "w-100 h-100 grow overflow-auto rounded-2xl border border-grey-100 dark:border-grey-950", children: e }) }), cf = ({ title: e, label: t, value: r, onChange: n, disabled: a, error: o, hint: i, checked: c, separator: l }) => {
6
6
  const A = ps(), [u, h] = G(c);
7
7
  ie(() => {
8
8
  h(c);
9
9
  }, [c]);
10
- const p = (m) => {
11
- const w = m.target.checked;
10
+ const m = (p) => {
11
+ const w = p.target.checked;
12
12
  h(w), n(w);
13
13
  };
14
14
  return /* @__PURE__ */ s.jsxs("div", { children: [
@@ -24,7 +24,7 @@ const xl = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("div", { className:
24
24
  id: A,
25
25
  type: "checkbox",
26
26
  value: r,
27
- onChange: p
27
+ onChange: m
28
28
  }
29
29
  ),
30
30
  /* @__PURE__ */ s.jsxs("div", { className: `ml-2 flex flex-col ${i && "mb-2"}`, children: [
@@ -127,14 +127,14 @@ var gn = function(e, t, r) {
127
127
  !ln(e) && e.preventDefault();
128
128
  }, kl = Je.memo(function(e) {
129
129
  var t = e.onMove, r = e.onKey, n = ia(e, ["onMove", "onKey"]), a = Ye(null), o = pn(t), i = pn(r), c = Ye(null), l = Ye(!1), A = xt(function() {
130
- var m = function(k) {
130
+ var p = function(k) {
131
131
  ci(k), (ln(k) ? k.touches.length > 0 : k.buttons > 0) && a.current ? o(Ai(a.current, k, c.current)) : x(!1);
132
132
  }, w = function() {
133
133
  return x(!1);
134
134
  };
135
135
  function x(k) {
136
136
  var y = l.current, I = ts(a.current), C = k ? I.addEventListener : I.removeEventListener;
137
- C(y ? "touchmove" : "mousemove", m), C(y ? "touchend" : "mouseup", w);
137
+ C(y ? "touchmove" : "mousemove", p), C(y ? "touchend" : "mouseup", w);
138
138
  }
139
139
  return [function(k) {
140
140
  var y = k.nativeEvent, I = a.current;
@@ -152,10 +152,10 @@ var gn = function(e, t, r) {
152
152
  var y = k.which || k.keyCode;
153
153
  y < 37 || y > 40 || (k.preventDefault(), i({ left: y === 39 ? 0.05 : y === 37 ? -0.05 : 0, top: y === 40 ? 0.05 : y === 38 ? -0.05 : 0 }));
154
154
  }, x];
155
- }, [i, o]), u = A[0], h = A[1], p = A[2];
155
+ }, [i, o]), u = A[0], h = A[1], m = A[2];
156
156
  return ie(function() {
157
- return p;
158
- }, [p]), Je.createElement("div", Yr({}, n, { onTouchStart: u, onMouseDown: u, className: "react-colorful__interactive", ref: a, onKeyDown: h, tabIndex: 0, role: "slider" }));
157
+ return m;
158
+ }, [m]), Je.createElement("div", Yr({}, n, { onTouchStart: u, onMouseDown: u, className: "react-colorful__interactive", ref: a, onKeyDown: h, tabIndex: 0, role: "slider" }));
159
159
  }), Es = function(e) {
160
160
  return e.filter(Boolean).join(" ");
161
161
  }, bl = function(e) {
@@ -257,14 +257,14 @@ var bf = typeof window < "u" ? Fd : ie, yf = function() {
257
257
  }, Jf = /^#?([0-9A-F]{3,8})$/i, Tf = function(e) {
258
258
  var t = e.color, r = t === void 0 ? "" : t, n = e.onChange, a = e.onBlur, o = e.escape, i = e.validate, c = e.format, l = e.process, A = ia(e, ["color", "onChange", "onBlur", "escape", "validate", "format", "process"]), u = G(function() {
259
259
  return o(r);
260
- }), h = u[0], p = u[1], m = pn(n), w = pn(a), x = it(function(y) {
260
+ }), h = u[0], m = u[1], p = pn(n), w = pn(a), x = it(function(y) {
261
261
  var I = o(y.target.value);
262
- p(I), i(I) && m(l ? l(I) : I);
263
- }, [o, l, i, m]), k = it(function(y) {
264
- i(y.target.value) || p(o(r)), w(y);
262
+ m(I), i(I) && p(l ? l(I) : I);
263
+ }, [o, l, i, p]), k = it(function(y) {
264
+ i(y.target.value) || m(o(r)), w(y);
265
265
  }, [r, o, i, w]);
266
266
  return ie(function() {
267
- p(o(r));
267
+ m(o(r));
268
268
  }, [r, o]), Je.createElement("input", Yr({}, A, { value: c ? c(h) : h, spellCheck: "false", onChange: x, onBlur: k }));
269
269
  }, di = function(e) {
270
270
  return "#" + e;
@@ -280,18 +280,18 @@ var bf = typeof window < "u" ? Fd : ie, yf = function() {
280
280
  return Je.createElement(Tf, Yr({}, n, { escape: a, format: t ? di : void 0, process: di, validate: o }));
281
281
  };
282
282
  const El = ({ hexValue: e, eyedropper: t, clearButtonValue: r, containerClassName: n, onChange: a }) => {
283
- const o = Ye(null), i = it((p) => {
284
- var m, w, x;
285
- p.stopPropagation();
286
- const k = (m = o.current) == null ? void 0 : m.querySelector("input");
287
- p.target !== k && ((x = (w = o.current) == null ? void 0 : w.querySelector("input")) == null || x.focus(), p.preventDefault());
283
+ const o = Ye(null), i = it((m) => {
284
+ var p, w, x;
285
+ m.stopPropagation();
286
+ const k = (p = o.current) == null ? void 0 : p.querySelector("input");
287
+ m.target !== k && ((x = (w = o.current) == null ? void 0 : w.querySelector("input")) == null || x.focus(), m.preventDefault());
288
288
  }, []), c = Ye(!1), l = it(() => {
289
- var p, m;
290
- c.current = !1, (m = (p = o.current) == null ? void 0 : p.querySelector("input")) == null || m.focus(), document.removeEventListener("mouseup", l), document.removeEventListener("touchend", l);
289
+ var m, p;
290
+ c.current = !1, (p = (m = o.current) == null ? void 0 : m.querySelector("input")) == null || p.focus(), document.removeEventListener("mouseup", l), document.removeEventListener("touchend", l);
291
291
  }, []), A = it(() => {
292
292
  c.current = !0, document.addEventListener("mouseup", l), document.addEventListener("touchend", l);
293
- }, [l]), u = it((p) => {
294
- if (p.preventDefault(), !window.EyeDropper)
293
+ }, [l]), u = it((m) => {
294
+ if (m.preventDefault(), !window.EyeDropper)
295
295
  return;
296
296
  c.current = !0, document.body.style.setProperty("pointer-events", "none"), new window.EyeDropper().open().then((w) => a == null ? void 0 : a(w.sRGBHex)).finally(() => {
297
297
  var w, x;
@@ -299,12 +299,12 @@ const El = ({ hexValue: e, eyedropper: t, clearButtonValue: r, containerClassNam
299
299
  });
300
300
  }, [a]);
301
301
  ie(() => {
302
- var p, m;
303
- (m = (p = o.current) == null ? void 0 : p.querySelector("input")) == null || m.focus();
302
+ var m, p;
303
+ (p = (m = o.current) == null ? void 0 : m.querySelector("input")) == null || p.focus();
304
304
  }, []);
305
305
  const h = it(() => {
306
- var p, m;
307
- (m = (p = o.current) == null ? void 0 : p.querySelector("input")) == null || m.focus();
306
+ var m, p;
307
+ (p = (m = o.current) == null ? void 0 : m.querySelector("input")) == null || p.focus();
308
308
  }, []);
309
309
  return n = ge(
310
310
  "mt-2",
@@ -331,40 +331,40 @@ const El = ({ hexValue: e, eyedropper: t, clearButtonValue: r, containerClassNam
331
331
  }, Df = Gd({
332
332
  colorPickers: []
333
333
  }), hi = (e) => e.length === 4 ? e.replace(/#(.)(.)(.)/, "#$1$1$2$2$3$3") : e, An = ({ testId: e, title: t, direction: r, value: n, hint: a, error: o, eyedropper: i, clearButtonValue: c, onChange: l, swatches: A = [], alwaysOpen: u = !1, debounceMs: h }) => {
334
- const [p, m] = G(!1), [w, x] = G(n), k = Kd(Df), y = ps();
334
+ const [m, p] = G(!1), [w, x] = G(n), k = Kd(Df), y = ps();
335
335
  ie(() => {
336
336
  x((O) => hi(O || "") === n ? O : n);
337
- }, [n]), ie(() => (k.colorPickers.push({ id: y, setExpanded: m }), () => {
337
+ }, [n]), ie(() => (k.colorPickers.push({ id: y, setExpanded: p }), () => {
338
338
  k.colorPickers = k.colorPickers.filter((O) => O.id !== y);
339
339
  }), [k, y]), ie(() => {
340
- if (p) {
340
+ if (m) {
341
341
  k.colorPickers.filter((F) => F.id !== y).forEach((F) => F.setExpanded(!1));
342
342
  const O = () => {
343
- m(!1);
343
+ p(!1);
344
344
  };
345
345
  return document.addEventListener("click", O), () => {
346
346
  document.removeEventListener("click", O);
347
347
  };
348
348
  }
349
- }, [k, y, p]);
349
+ }, [k, y, m]);
350
350
  const I = xt(() => l && h ? xn(l, h) : l, [h, l]), C = (O) => {
351
351
  x(O), I == null || I(O ? hi(O) : null);
352
352
  };
353
353
  let R = /* @__PURE__ */ s.jsx(
354
354
  ys,
355
355
  {
356
- isExpanded: p,
356
+ isExpanded: m,
357
357
  swatches: A,
358
358
  value: w,
359
359
  onSwatchChange: (O) => {
360
- C(O), m(!1);
360
+ C(O), p(!1);
361
361
  },
362
- onTogglePicker: () => !u && m(!p)
362
+ onTogglePicker: () => !u && p(!m)
363
363
  }
364
364
  );
365
365
  t && (R = /* @__PURE__ */ s.jsxs("div", { className: ge("flex w-full cursor-pointer items-start first:mt-0 dark:text-white", r === "rtl" && "flex-row-reverse"), children: [
366
366
  /* @__PURE__ */ s.jsx("div", { className: "shrink-0", children: R }),
367
- /* @__PURE__ */ s.jsxs("div", { className: ge("flex-1", r === "rtl" ? "pr-2" : "pl-2", a ? "mt-[-2px]" : "mt-[1px]"), onClick: () => !u && m(!p), children: [
367
+ /* @__PURE__ */ s.jsxs("div", { className: ge("flex-1", r === "rtl" ? "pr-2" : "pl-2", a ? "mt-[-2px]" : "mt-[1px]"), onClick: () => !u && p(!m), children: [
368
368
  t,
369
369
  a && /* @__PURE__ */ s.jsx("div", { className: `text-xs ${o ? "text-red" : "text-grey-700"}`, children: a })
370
370
  ] })
@@ -372,7 +372,7 @@ const El = ({ hexValue: e, eyedropper: t, clearButtonValue: r, containerClassNam
372
372
  const U = A.find((O) => O.value === w);
373
373
  return /* @__PURE__ */ s.jsxs("div", { className: "mt-2 flex-col", "data-testid": e, onClick: (O) => O.stopPropagation(), children: [
374
374
  R,
375
- (u || p) && /* @__PURE__ */ s.jsx(El, { clearButtonValue: c, eyedropper: i, hexValue: (U == null ? void 0 : U.hex) || w || void 0, onChange: C })
375
+ (u || m) && /* @__PURE__ */ s.jsx(El, { clearButtonValue: c, eyedropper: i, hexValue: (U == null ? void 0 : U.hex) || w || void 0, onChange: C })
376
376
  ] });
377
377
  };
378
378
  function jf(e) {
@@ -405,60 +405,61 @@ const Rf = function(e) {
405
405
  onBlur: n,
406
406
  placeholder: a,
407
407
  nodes: o,
408
- emojiPicker: i = !0
408
+ emojiPicker: i = !0,
409
+ darkMode: c = !1
409
410
  }) => {
410
- const c = it((w) => {
411
- var x;
411
+ const l = it((x) => {
412
+ var k;
412
413
  try {
413
414
  _i({
414
- error: w,
415
+ error: x,
415
416
  tags: { lexical: !0 },
416
417
  contexts: {
417
418
  koenig: {
418
- version: (x = window["@tryghost/koenig-lexical"]) == null ? void 0 : x.version
419
+ version: (k = window["@tryghost/koenig-lexical"]) == null ? void 0 : k.version
419
420
  }
420
421
  }
421
422
  });
422
- } catch (k) {
423
- console.error(k);
424
- }
425
- console.error(w);
426
- }, []), { setFocusState: l } = Vd(), A = () => {
427
- n && n(), l(!1);
428
- }, u = () => {
429
- l(!0);
430
- }, h = xt(() => new Proxy({}, {
431
- get: (w, x) => e.read()[x]
423
+ } catch (y) {
424
+ console.error(y);
425
+ }
426
+ console.error(x);
427
+ }, []), { setFocusState: A } = Vd(), u = () => {
428
+ n && n(), A(!1);
429
+ }, h = () => {
430
+ A(!0);
431
+ }, m = xt(() => new Proxy({}, {
432
+ get: (x, k) => e.read()[k]
432
433
  }), [e]), p = {
433
- DEFAULT_NODES: h.DEFAULT_TRANSFORMERS,
434
- BASIC_NODES: h.BASIC_TRANSFORMERS,
435
- MINIMAL_NODES: h.MINIMAL_TRANSFORMERS
436
- }, m = (w) => {
437
- const k = new DOMParser().parseFromString(w, "text/html");
438
- k.querySelectorAll("*").forEach((I) => {
439
- I.style.removeProperty("white-space"), I.getAttribute("style") || I.removeAttribute("style");
440
- }), k.body.innerHTML !== t && (r == null || r(k.body.innerHTML));
434
+ DEFAULT_NODES: m.DEFAULT_TRANSFORMERS,
435
+ BASIC_NODES: m.BASIC_TRANSFORMERS,
436
+ MINIMAL_NODES: m.MINIMAL_TRANSFORMERS
437
+ }, w = (x) => {
438
+ const y = new DOMParser().parseFromString(x, "text/html");
439
+ y.querySelectorAll("*").forEach((C) => {
440
+ C.style.removeProperty("white-space"), C.getAttribute("style") || C.removeAttribute("style");
441
+ }), y.body.innerHTML !== t && (r == null || r(y.body.innerHTML));
441
442
  };
442
443
  return /* @__PURE__ */ s.jsx(
443
- h.KoenigComposer,
444
+ m.KoenigComposer,
444
445
  {
445
- nodes: h[o || "DEFAULT_NODES"],
446
- onError: c,
446
+ darkMode: c,
447
+ nodes: m[o || "DEFAULT_NODES"],
448
+ onError: l,
447
449
  children: /* @__PURE__ */ s.jsxs(
448
- h.KoenigComposableEditor,
450
+ m.KoenigComposableEditor,
449
451
  {
450
452
  className: "koenig-lexical koenig-lexical-editor-input",
451
- darkMode: !1,
452
453
  isSnippetsEnabled: !1,
453
454
  markdownTransformers: p[o || "DEFAULT_NODES"],
454
455
  placeholderClassName: "koenig-lexical-editor-input-placeholder line-clamp-1",
455
456
  placeholderText: a,
456
457
  singleParagraph: !0,
457
- onBlur: A,
458
- onFocus: u,
458
+ onBlur: u,
459
+ onFocus: h,
459
460
  children: [
460
- /* @__PURE__ */ s.jsx(h.HtmlOutputPlugin, { html: t, setHtml: m }),
461
- i ? /* @__PURE__ */ s.jsx(h.EmojiPickerPlugin, {}) : null
461
+ /* @__PURE__ */ s.jsx(m.HtmlOutputPlugin, { html: t, setHtml: w }),
462
+ i ? /* @__PURE__ */ s.jsx(m.EmojiPickerPlugin, {}) : null
462
463
  ]
463
464
  }
464
465
  )
@@ -468,8 +469,8 @@ const Rf = function(e) {
468
469
  className: e,
469
470
  ...t
470
471
  }) => {
471
- const { fetchKoenigLexical: r } = Xd(), n = xt(() => Rf(r), [r]);
472
- return /* @__PURE__ */ s.jsx("div", { className: e || "w-full", children: /* @__PURE__ */ s.jsx("div", { className: "koenig-react-editor w-full [&_*]:!font-inherit [&_*]:!text-inherit", children: /* @__PURE__ */ s.jsx(Wd, { name: "editor", children: /* @__PURE__ */ s.jsx(qd, { fallback: /* @__PURE__ */ s.jsx("p", { className: "koenig-react-editor-loading", children: "Loading editor..." }), children: /* @__PURE__ */ s.jsx(Of, { ...t, editor: n }) }) }) }) });
472
+ const { fetchKoenigLexical: r, darkMode: n } = Xd(), a = xt(() => Rf(r), [r]);
473
+ return /* @__PURE__ */ s.jsx("div", { className: e || "w-full", children: /* @__PURE__ */ s.jsx("div", { className: "koenig-react-editor w-full [&_*]:!font-inherit [&_*]:!text-inherit", children: /* @__PURE__ */ s.jsx(Wd, { name: "editor", children: /* @__PURE__ */ s.jsx(qd, { fallback: /* @__PURE__ */ s.jsx("p", { className: "koenig-react-editor-loading", children: "Loading editor..." }), children: /* @__PURE__ */ s.jsx(Of, { ...t, darkMode: n, editor: a }) }) }) }) });
473
474
  }, Ms = ({
474
475
  title: e,
475
476
  hideTitle: t,
@@ -620,8 +621,8 @@ const Rf = function(e) {
620
621
  cancelLabel: A = "Cancel",
621
622
  okLabel: u = "OK",
622
623
  okColor: h = "black",
623
- previewToolbar: p = !0,
624
- leftToolbar: m = !0,
624
+ previewToolbar: m = !0,
625
+ leftToolbar: p = !0,
625
626
  rightToolbar: w = !0,
626
627
  deviceSelector: x = !0,
627
628
  siteLink: k,
@@ -660,7 +661,7 @@ const Rf = function(e) {
660
661
  }
661
662
  });
662
663
  const [se, ae] = G("desktop");
663
- if (se === "mobile" && x ? c = /* @__PURE__ */ s.jsx(vl, { "data-testid": "preview-mobile", children: c }) : se === "desktop" && x && (c = /* @__PURE__ */ s.jsx(xl, { "data-testid": "preview-desktop", children: c })), p) {
664
+ if (se === "mobile" && x ? c = /* @__PURE__ */ s.jsx(vl, { "data-testid": "preview-mobile", children: c }) : se === "desktop" && x && (c = /* @__PURE__ */ s.jsx(xl, { "data-testid": "preview-desktop", children: c })), m) {
664
665
  let me = /* @__PURE__ */ s.jsx(s.Fragment, {});
665
666
  y ? me = /* @__PURE__ */ s.jsx(
666
667
  pt,
@@ -730,8 +731,8 @@ const Rf = function(e) {
730
731
  "View site ",
731
732
  /* @__PURE__ */ s.jsx(Ge, { name: "arrow-top-right", size: "xs" })
732
733
  ] }) })), c = /* @__PURE__ */ s.jsxs("div", { className: oe, children: [
733
- p && /* @__PURE__ */ s.jsxs("header", { className: "relative flex h-[74px] shrink-0 items-center justify-center px-3 py-5", "data-testid": "design-toolbar", children: [
734
- m && /* @__PURE__ */ s.jsx("div", { className: "absolute left-5 flex h-full items-center", children: me }),
734
+ m && /* @__PURE__ */ s.jsxs("header", { className: "relative flex h-[74px] shrink-0 items-center justify-center px-3 py-5", "data-testid": "design-toolbar", children: [
735
+ p && /* @__PURE__ */ s.jsx("div", { className: "absolute left-5 flex h-full items-center", children: me }),
735
736
  w && /* @__PURE__ */ s.jsxs("div", { className: "absolute right-5 flex h-full items-center", children: [
736
737
  we,
737
738
  de
@@ -856,29 +857,29 @@ const Rf = function(e) {
856
857
  r
857
858
  ] }) });
858
859
  }, Il = ({ items: e, setItems: t, blank: r, canAddNewItem: n }) => {
859
- const [a, o] = G(e.map((p, m) => ({ item: p, id: m.toString() }))), [i, c] = G(r);
860
+ const [a, o] = G(e.map((m, p) => ({ item: m, id: p.toString() }))), [i, c] = G(r);
860
861
  return ie(() => {
861
- const p = a.map(({ item: m }) => m);
862
- n(i) && p.push(i), eh.isEqual(JSON.parse(JSON.stringify(p)), JSON.parse(JSON.stringify(e))) || t(p);
862
+ const m = a.map(({ item: p }) => p);
863
+ n(i) && m.push(i), eh.isEqual(JSON.parse(JSON.stringify(m)), JSON.parse(JSON.stringify(e))) || t(m);
863
864
  }, [a, i, e, t, n]), {
864
865
  items: a,
865
- updateItem: (p, m) => {
866
- const w = a.map((x) => x.id === p ? { ...x, item: m } : x);
866
+ updateItem: (m, p) => {
867
+ const w = a.map((x) => x.id === m ? { ...x, item: p } : x);
867
868
  o(w), t(w.map((x) => x.item));
868
869
  },
869
870
  addItem: () => {
870
871
  if (n(i)) {
871
- const p = a.reduce((w, x) => Math.max(w, parseInt(x.id)), 0), m = a.concat({ item: i, id: (p + 1).toString() });
872
- o(m), t(m.map((w) => w.item)), c(r);
872
+ const m = a.reduce((w, x) => Math.max(w, parseInt(x.id)), 0), p = a.concat({ item: i, id: (m + 1).toString() });
873
+ o(p), t(p.map((w) => w.item)), c(r);
873
874
  }
874
875
  },
875
- removeItem: (p) => {
876
- const m = a.filter((w) => w.id !== p);
877
- o(m), t(m.map((w) => w.item));
876
+ removeItem: (m) => {
877
+ const p = a.filter((w) => w.id !== m);
878
+ o(p), t(p.map((w) => w.item));
878
879
  },
879
- moveItem: (p, m) => {
880
- if (p !== m) {
881
- const w = a.findIndex((y) => y.id === p), x = m ? a.findIndex((y) => y.id === m) : 0, k = th(a, w, x);
880
+ moveItem: (m, p) => {
881
+ if (m !== p) {
882
+ const w = a.findIndex((y) => y.id === m), x = p ? a.findIndex((y) => y.id === p) : 0, k = th(a, w, x);
882
883
  o(k), t(k.map((y) => y.item));
883
884
  }
884
885
  },
@@ -917,16 +918,16 @@ var Cl = {
917
918
  t = e.exports = {};
918
919
  const i = t.re = [], c = t.safeRe = [], l = t.src = [], A = t.t = {};
919
920
  let u = 0;
920
- const h = "[a-zA-Z0-9-]", p = [
921
+ const h = "[a-zA-Z0-9-]", m = [
921
922
  ["\\s", 1],
922
923
  ["\\d", a],
923
924
  [h, n]
924
- ], m = (x) => {
925
- for (const [k, y] of p)
925
+ ], p = (x) => {
926
+ for (const [k, y] of m)
926
927
  x = x.split(`${k}*`).join(`${k}{0,${y}}`).split(`${k}+`).join(`${k}{1,${y}}`);
927
928
  return x;
928
929
  }, w = (x, k, y) => {
929
- const I = m(k), C = u++;
930
+ const I = p(k), C = u++;
930
931
  o(x, C, k), A[x] = C, l[C] = k, i[C] = new RegExp(k, y ? "g" : void 0), c[C] = new RegExp(I, y ? "g" : void 0);
931
932
  };
932
933
  w("NUMERICIDENTIFIER", "0|[1-9]\\d*"), w("NUMERICIDENTIFIERLOOSE", "\\d+"), w("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${h}*`), w("MAINVERSION", `(${l[A.NUMERICIDENTIFIER]})\\.(${l[A.NUMERICIDENTIFIER]})\\.(${l[A.NUMERICIDENTIFIER]})`), w("MAINVERSIONLOOSE", `(${l[A.NUMERICIDENTIFIERLOOSE]})\\.(${l[A.NUMERICIDENTIFIERLOOSE]})\\.(${l[A.NUMERICIDENTIFIERLOOSE]})`), w("PRERELEASEIDENTIFIER", `(?:${l[A.NUMERICIDENTIFIER]}|${l[A.NONNUMERICIDENTIFIER]})`), w("PRERELEASEIDENTIFIERLOOSE", `(?:${l[A.NUMERICIDENTIFIERLOOSE]}|${l[A.NONNUMERICIDENTIFIER]})`), w("PRERELEASE", `(?:-(${l[A.PRERELEASEIDENTIFIER]}(?:\\.${l[A.PRERELEASEIDENTIFIER]})*))`), w("PRERELEASELOOSE", `(?:-?(${l[A.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[A.PRERELEASEIDENTIFIERLOOSE]})*))`), w("BUILDIDENTIFIER", `${h}+`), w("BUILD", `(?:\\+(${l[A.BUILDIDENTIFIER]}(?:\\.${l[A.BUILDIDENTIFIER]})*))`), w("FULLPLAIN", `v?${l[A.MAINVERSION]}${l[A.PRERELEASE]}?${l[A.BUILD]}?`), w("FULL", `^${l[A.FULLPLAIN]}$`), w("LOOSEPLAIN", `[v=\\s]*${l[A.MAINVERSIONLOOSE]}${l[A.PRERELEASELOOSE]}?${l[A.BUILD]}?`), w("LOOSE", `^${l[A.LOOSEPLAIN]}$`), w("GTLT", "((?:<|>)?=?)"), w("XRANGEIDENTIFIERLOOSE", `${l[A.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), w("XRANGEIDENTIFIER", `${l[A.NUMERICIDENTIFIER]}|x|X|\\*`), w("XRANGEPLAIN", `[v=\\s]*(${l[A.XRANGEIDENTIFIER]})(?:\\.(${l[A.XRANGEIDENTIFIER]})(?:\\.(${l[A.XRANGEIDENTIFIER]})(?:${l[A.PRERELEASE]})?${l[A.BUILD]}?)?)?`), w("XRANGEPLAINLOOSE", `[v=\\s]*(${l[A.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[A.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[A.XRANGEIDENTIFIERLOOSE]})(?:${l[A.PRERELEASELOOSE]})?${l[A.BUILD]}?)?)?`), w("XRANGE", `^${l[A.GTLT]}\\s*${l[A.XRANGEPLAIN]}$`), w("XRANGELOOSE", `^${l[A.GTLT]}\\s*${l[A.XRANGEPLAINLOOSE]}$`), w("COERCEPLAIN", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`), w("COERCE", `${l[A.COERCEPLAIN]}(?:$|[^\\d])`), w("COERCEFULL", l[A.COERCEPLAIN] + `(?:${l[A.PRERELEASE]})?(?:${l[A.BUILD]})?(?:$|[^\\d])`), w("COERCERTL", l[A.COERCE], !0), w("COERCERTLFULL", l[A.COERCEFULL], !0), w("LONETILDE", "(?:~>?)"), w("TILDETRIM", `(\\s*)${l[A.LONETILDE]}\\s+`, !0), t.tildeTrimReplace = "$1~", w("TILDE", `^${l[A.LONETILDE]}${l[A.XRANGEPLAIN]}$`), w("TILDELOOSE", `^${l[A.LONETILDE]}${l[A.XRANGEPLAINLOOSE]}$`), w("LONECARET", "(?:\\^)"), w("CARETTRIM", `(\\s*)${l[A.LONECARET]}\\s+`, !0), t.caretTrimReplace = "$1^", w("CARET", `^${l[A.LONECARET]}${l[A.XRANGEPLAIN]}$`), w("CARETLOOSE", `^${l[A.LONECARET]}${l[A.XRANGEPLAINLOOSE]}$`), w("COMPARATORLOOSE", `^${l[A.GTLT]}\\s*(${l[A.LOOSEPLAIN]})$|^$`), w("COMPARATOR", `^${l[A.GTLT]}\\s*(${l[A.FULLPLAIN]})$|^$`), w("COMPARATORTRIM", `(\\s*)${l[A.GTLT]}\\s*(${l[A.LOOSEPLAIN]}|${l[A.XRANGEPLAIN]})`, !0), t.comparatorTrimReplace = "$1$2$3", w("HYPHENRANGE", `^\\s*(${l[A.XRANGEPLAIN]})\\s+-\\s+(${l[A.XRANGEPLAIN]})\\s*$`), w("HYPHENRANGELOOSE", `^\\s*(${l[A.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[A.XRANGEPLAINLOOSE]})\\s*$`), w("STAR", "(<|>)?=?\\s*\\*"), w("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), w("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
@@ -1211,7 +1212,7 @@ const am = ne.create(({}) => {
1211
1212
  }), sm = "MembersResponseType", Js = aa({
1212
1213
  dataType: sm,
1213
1214
  path: "/members/"
1214
- }), om = import("./index-0b24e982.mjs").then((e) => e.i);
1215
+ }), om = import("./index-027fbe4f.mjs").then((e) => e.i);
1215
1216
  class jl extends Error {
1216
1217
  constructor({ errorType: r, errorDetails: n, message: a }) {
1217
1218
  super(a);
@@ -1234,7 +1235,7 @@ const Zr = () => {
1234
1235
  var u, h;
1235
1236
  const { config: e } = Te(), [t, r] = G(null);
1236
1237
  ie(() => {
1237
- om.then((p) => r(() => p.default));
1238
+ om.then((m) => r(() => m.default));
1238
1239
  }, []);
1239
1240
  const { users: n, contributorUsers: a, invites: o, isLoading: i } = gs(), { refetch: c } = Js({
1240
1241
  searchParams: { limit: "1" },
@@ -1243,37 +1244,37 @@ const Zr = () => {
1243
1244
  searchParams: { filter: "status:active", limit: "1" },
1244
1245
  enabled: !1
1245
1246
  }), A = xt(() => {
1246
- var p, m, w, x;
1247
- return ((m = (p = e.hostSettings) == null ? void 0 : p.billing) == null ? void 0 : m.enabled) === !0 && ((x = (w = e.hostSettings) == null ? void 0 : w.billing) != null && x.url) ? e.hostSettings.billing.url : "https://ghost.org/help/";
1247
+ var m, p, w, x;
1248
+ return ((p = (m = e.hostSettings) == null ? void 0 : m.billing) == null ? void 0 : p.enabled) === !0 && ((x = (w = e.hostSettings) == null ? void 0 : w.billing) != null && x.url) ? e.hostSettings.billing.url : "https://ghost.org/help/";
1248
1249
  }, [(u = e.hostSettings) == null ? void 0 : u.billing]);
1249
1250
  return xt(() => {
1250
1251
  var w;
1251
1252
  if (!t || !((w = e.hostSettings) != null && w.limits) || i)
1252
1253
  return;
1253
- const p = { ...e.hostSettings.limits }, m = new t();
1254
- return p.staff && (p.staff.currentCountQuery = async () => {
1254
+ const m = { ...e.hostSettings.limits }, p = new t();
1255
+ return m.staff && (m.staff.currentCountQuery = async () => {
1255
1256
  const x = n.filter((y) => y.status !== "inactive" && !a.includes(y)), k = o.filter((y) => y.role !== "Contributor");
1256
1257
  return x.length + k.length;
1257
- }), p.members && (p.members.currentCountQuery = async () => {
1258
+ }), m.members && (m.members.currentCountQuery = async () => {
1258
1259
  var k, y;
1259
1260
  const { data: x } = await c();
1260
1261
  return ((y = (k = x == null ? void 0 : x.meta) == null ? void 0 : k.pagination) == null ? void 0 : y.total) || 0;
1261
- }), p.newsletters && (p.newsletters.currentCountQuery = async () => {
1262
+ }), m.newsletters && (m.newsletters.currentCountQuery = async () => {
1262
1263
  var k;
1263
1264
  const { data: { pages: x } = { pages: [] } } = await l();
1264
1265
  return ((k = x[0].meta) == null ? void 0 : k.pagination.total) || 0;
1265
- }), m.loadLimits({
1266
- limits: p,
1266
+ }), p.loadLimits({
1267
+ limits: m,
1267
1268
  helpLink: A,
1268
1269
  errors: {
1269
1270
  HostLimitError: br,
1270
1271
  IncorrectUsageError: im
1271
1272
  }
1272
1273
  }), {
1273
- isLimited: (x) => m.isLimited(x),
1274
- checkWouldGoOverLimit: (x) => m.checkWouldGoOverLimit(x),
1275
- errorIfWouldGoOverLimit: (x, k = {}) => m.errorIfWouldGoOverLimit(x, k),
1276
- errorIfIsOverLimit: (x) => m.errorIfIsOverLimit(x)
1274
+ isLimited: (x) => p.isLimited(x),
1275
+ checkWouldGoOverLimit: (x) => p.checkWouldGoOverLimit(x),
1276
+ errorIfWouldGoOverLimit: (x, k = {}) => p.errorIfWouldGoOverLimit(x, k),
1277
+ errorIfIsOverLimit: (x) => p.errorIfIsOverLimit(x)
1277
1278
  };
1278
1279
  }, [t, (h = e.hostSettings) == null ? void 0 : h.limits, a, c, l, A, o, i, n]);
1279
1280
  }, lm = () => {
@@ -1334,7 +1335,7 @@ const Zr = () => {
1334
1335
  }
1335
1336
  );
1336
1337
  }, Am = ne.create(lm), cm = () => {
1337
- var m, w;
1338
+ var p, w;
1338
1339
  const e = vt(), { updateRoute: t } = ye(), r = je(), { data: n } = Js({
1339
1340
  searchParams: { filter: "newsletters.status:active+email_disabled:0", limit: "1", page: "1", include: "newsletters,labels" }
1340
1341
  }), { mutateAsync: a } = sh(), { formState: o, updateForm: i, saveState: c, handleSave: l, errors: A, clearError: u } = St({
@@ -1369,7 +1370,7 @@ const Zr = () => {
1369
1370
  throw x;
1370
1371
  });
1371
1372
  }, [h, e, t]);
1372
- const p = (m = n == null ? void 0 : n.meta) == null ? void 0 : m.pagination.total;
1373
+ const m = (p = n == null ? void 0 : n.meta) == null ? void 0 : p.pagination.total;
1373
1374
  return /* @__PURE__ */ s.jsx(
1374
1375
  ze,
1375
1376
  {
@@ -1420,7 +1421,7 @@ const Zr = () => {
1420
1421
  {
1421
1422
  checked: o.optInExistingSubscribers,
1422
1423
  direction: "rtl",
1423
- hint: o.optInExistingSubscribers ? `This newsletter will be available to all members. Your ${p === void 0 ? "" : tl(p)} existing subscriber${((w = n == null ? void 0 : n.meta) == null ? void 0 : w.pagination.total) === 1 ? "" : "s"} will also be opted-in to receive it.` : "The newsletter will be available to all new members. Existing members won’t be subscribed, but may visit their account area to opt-in to future emails.",
1424
+ hint: o.optInExistingSubscribers ? `This newsletter will be available to all members. Your ${m === void 0 ? "" : tl(m)} existing subscriber${((w = n == null ? void 0 : n.meta) == null ? void 0 : w.pagination.total) === 1 ? "" : "s"} will also be opted-in to receive it.` : "The newsletter will be available to all new members. Existing members won’t be subscribed, but may visit their account area to opt-in to future emails.",
1424
1425
  label: "Opt-in existing subscribers",
1425
1426
  labelStyle: "heading",
1426
1427
  onChange: (x) => i((k) => ({ ...k, optInExistingSubscribers: x.target.checked }))
@@ -1432,7 +1433,7 @@ const Zr = () => {
1432
1433
  }
1433
1434
  );
1434
1435
  }, um = ne.create(cm), dm = ({ recommendation: e, animate: t }) => {
1435
- const r = vt(), { updateRoute: n, route: a } = ye(), { mutateAsync: o } = oh(), i = je(), { formState: c, updateForm: l, handleSave: A, saveState: u, errors: h, clearError: p, setErrors: m } = St({
1436
+ const r = vt(), { updateRoute: n, route: a } = ye(), { mutateAsync: o } = oh(), i = je(), { formState: c, updateForm: l, handleSave: A, saveState: u, errors: h, clearError: m, setErrors: p } = St({
1436
1437
  initialState: {
1437
1438
  ...e
1438
1439
  },
@@ -1499,7 +1500,7 @@ const Zr = () => {
1499
1500
  }
1500
1501
  }
1501
1502
  },
1502
- children: /* @__PURE__ */ s.jsx(Ah, { clearError: p, errors: h, formState: c, setErrors: m, showURL: !1, updateForm: l })
1503
+ children: /* @__PURE__ */ s.jsx(Ah, { clearError: m, errors: h, formState: c, setErrors: p, showURL: !1, updateForm: l })
1503
1504
  }
1504
1505
  );
1505
1506
  }, hm = ne.create(dm), vi = (e) => nl(e).save || "", fm = function(e, t) {
@@ -1510,7 +1511,7 @@ const Zr = () => {
1510
1511
  }
1511
1512
  return e;
1512
1513
  }, mm = ({ searchParams: e, recommendation: t, animate: r }) => {
1513
- const [n, a] = G(!1), o = vt(), { updateRoute: i } = ye(), { mutateAsync: c } = ch(), l = t ? "" : (e == null ? void 0 : e.get("url")) ?? "", { save: A } = l ? nl(l) : { save: "" }, u = Je.useRef(!1), [h, p] = Je.useState(!!A), { formState: m, updateForm: w, handleSave: x, errors: k, saveState: y, clearError: I } = St({
1514
+ const [n, a] = G(!1), o = vt(), { updateRoute: i } = ye(), { mutateAsync: c } = ch(), l = t ? "" : (e == null ? void 0 : e.get("url")) ?? "", { save: A } = l ? nl(l) : { save: "" }, u = Je.useRef(!1), [h, m] = Je.useState(!!A), { formState: p, updateForm: w, handleSave: x, errors: k, saveState: y, clearError: I } = St({
1514
1515
  initialState: t ?? {
1515
1516
  title: "",
1516
1517
  url: A || "",
@@ -1522,9 +1523,9 @@ const Zr = () => {
1522
1523
  },
1523
1524
  onSave: async () => {
1524
1525
  let R;
1525
- R = new URL(m.url);
1526
+ R = new URL(p.url);
1526
1527
  const U = R.hostname.replace("www.", ""), O = {
1527
- ...m,
1528
+ ...p,
1528
1529
  url: R.toString()
1529
1530
  }, { recommendations: F = [] } = await c(R);
1530
1531
  if (!F || F.length === 0)
@@ -1539,7 +1540,7 @@ const Zr = () => {
1539
1540
  },
1540
1541
  onValidate: () => {
1541
1542
  const R = {};
1542
- return fm(R, m.url), h && p(Object.keys(R).length === 0), R;
1543
+ return fm(R, p.url), h && m(Object.keys(R).length === 0), R;
1543
1544
  }
1544
1545
  }), C = Je.useCallback(async () => {
1545
1546
  if (y !== "saving") {
@@ -1554,14 +1555,14 @@ const Zr = () => {
1554
1555
  title: U
1555
1556
  });
1556
1557
  }
1557
- h && p(!1);
1558
+ h && m(!1);
1558
1559
  }
1559
- }, [x, y, h, p]);
1560
+ }, [x, y, h, m]);
1560
1561
  return Je.useEffect(() => {
1561
1562
  h && !u.current && (u.current = !0, C());
1562
1563
  }, [h, C]), ie(() => {
1563
1564
  n && (C(), a(!1));
1564
- }, [m]), h ? /* @__PURE__ */ s.jsx(
1565
+ }, [p]), h ? /* @__PURE__ */ s.jsx(
1565
1566
  ze,
1566
1567
  {
1567
1568
  afterClose: () => {
@@ -1613,16 +1614,16 @@ const Zr = () => {
1613
1614
  maxLength: 2e3,
1614
1615
  placeholder: "https://www.example.com",
1615
1616
  title: "URL",
1616
- value: m.url,
1617
+ value: p.url,
1617
1618
  onBlur: () => {
1618
- const R = vi(m.url);
1619
+ const R = vi(p.url);
1619
1620
  w((U) => ({ ...U, url: R }));
1620
1621
  },
1621
1622
  onChange: (R) => {
1622
1623
  I == null || I("url"), w((U) => ({ ...U, url: R.target.value }));
1623
1624
  },
1624
1625
  onKeyDown: (R) => {
1625
- R.key === "Enter" && (R.preventDefault(), w((U) => ({ ...U, url: vi(m.url) })), a(!0));
1626
+ R.key === "Enter" && (R.preventDefault(), w((U) => ({ ...U, url: vi(p.url) })), a(!0));
1626
1627
  }
1627
1628
  }
1628
1629
  )
@@ -1648,7 +1649,7 @@ const Zr = () => {
1648
1649
  ie(() => {
1649
1650
  h(r || !1), o(n || null);
1650
1651
  }, [r, n]);
1651
- const p = async () => {
1652
+ const m = async () => {
1652
1653
  const w = [
1653
1654
  { key: "amp", value: u },
1654
1655
  { key: "amp_gtag_id", value: a }
@@ -1665,7 +1666,7 @@ const Zr = () => {
1665
1666
  } finally {
1666
1667
  setTimeout(() => A("Save"), 1e3);
1667
1668
  }
1668
- }, m = u !== r || a !== n;
1669
+ }, p = u !== r || a !== n;
1669
1670
  return /* @__PURE__ */ s.jsxs(
1670
1671
  ze,
1671
1672
  {
@@ -1673,13 +1674,13 @@ const Zr = () => {
1673
1674
  e("integrations");
1674
1675
  },
1675
1676
  cancelLabel: "Close",
1676
- dirty: m,
1677
+ dirty: p,
1677
1678
  okColor: l === "Saved" ? "green" : "black",
1678
1679
  okLabel: l,
1679
1680
  testId: "amp-modal",
1680
1681
  title: "",
1681
1682
  onOk: async () => {
1682
- await p();
1683
+ await m();
1683
1684
  },
1684
1685
  children: [
1685
1686
  /* @__PURE__ */ s.jsx(
@@ -1736,34 +1737,34 @@ function gm(e, t) {
1736
1737
  const Ts = ({ generateContent: e, className: t, height: r, width: n, parentClassName: a, testId: o, addDelay: i = !1 }) => {
1737
1738
  const [c, l] = G(0), A = [Ye(null), Ye(null)], [u, h] = G(0);
1738
1739
  return ie(() => {
1739
- const p = c === 0 ? 1 : 0, m = A[p].current;
1740
- if (m) {
1741
- e(m);
1740
+ const m = c === 0 ? 1 : 0, p = A[m].current;
1741
+ if (p) {
1742
+ e(p);
1742
1743
  const w = () => {
1743
1744
  i ? setTimeout(() => {
1744
- l(p);
1745
- }, 500) : l(p);
1745
+ l(m);
1746
+ }, 500) : l(m);
1746
1747
  };
1747
- return m.addEventListener("load", w), () => {
1748
- m.removeEventListener("load", w);
1748
+ return p.addEventListener("load", w), () => {
1749
+ p.removeEventListener("load", w);
1749
1750
  };
1750
1751
  }
1751
1752
  }, [e]), ie(() => {
1752
1753
  var w;
1753
- const p = A[c].current, m = gm(() => {
1754
+ const m = A[c].current, p = gm(() => {
1754
1755
  var x;
1755
- h(((x = p == null ? void 0 : p.contentWindow) == null ? void 0 : x.scrollY) || 0);
1756
+ h(((x = m == null ? void 0 : m.contentWindow) == null ? void 0 : x.scrollY) || 0);
1756
1757
  }, 250);
1757
- return (w = p == null ? void 0 : p.contentWindow) == null || w.addEventListener("scroll", m), () => {
1758
+ return (w = m == null ? void 0 : m.contentWindow) == null || w.addEventListener("scroll", p), () => {
1758
1759
  var x;
1759
- (x = p == null ? void 0 : p.contentWindow) == null || x.removeEventListener("scroll", m);
1760
+ (x = m == null ? void 0 : m.contentWindow) == null || x.removeEventListener("scroll", p);
1760
1761
  };
1761
1762
  }, [c, A]), ie(() => {
1762
- var m;
1763
- const p = A[c].current;
1764
- if (p)
1763
+ var p;
1764
+ const m = A[c].current;
1765
+ if (m)
1765
1766
  try {
1766
- (m = p.contentWindow) == null || m.scrollTo(0, u);
1767
+ (p = m.contentWindow) == null || p.scrollTo(0, u);
1767
1768
  } catch (w) {
1768
1769
  _i(w);
1769
1770
  }
@@ -1813,8 +1814,8 @@ const Ts = ({ generateContent: e, className: t, height: r, width: n, parentClass
1813
1814
  credentials: "include"
1814
1815
  }).then((c) => c.text()).then((c) => {
1815
1816
  var x, k, y;
1816
- const l = "html { pointer-events: none; }", u = new DOMParser().parseFromString(c, "text/html"), h = u.querySelector("style"), p = h.innerHTML;
1817
- h.innerHTML = `${p}
1817
+ const l = "html { pointer-events: none; }", u = new DOMParser().parseFromString(c, "text/html"), h = u.querySelector("style"), m = h.innerHTML;
1818
+ h.innerHTML = `${m}
1818
1819
 
1819
1820
  ${l}`;
1820
1821
  let w = (u.doctype ? new XMLSerializer().serializeToString(u.doctype) : "") + u.documentElement.outerHTML;
@@ -1924,7 +1925,7 @@ ${l}`;
1924
1925
  )
1925
1926
  ] });
1926
1927
  }, km = () => {
1927
- const { siteData: e } = Te(), { localSettings: t, updateSetting: r, handleSave: n, okProps: a } = kr({ savingDelay: 500 }), [o] = Ue(t, ["announcement_content"]), [i] = Ue(t, ["accent_color"]), [c] = Ue(t, ["announcement_background"]), [l] = Ue(t, ["announcement_visibility"]), [A] = Ue(t, ["paid_members_enabled"]), u = JSON.parse((l == null ? void 0 : l.toString()) || "[]"), { updateRoute: h } = ye(), [p, m] = G("homepage"), w = (F) => {
1928
+ const { siteData: e } = Te(), { localSettings: t, updateSetting: r, handleSave: n, okProps: a } = kr({ savingDelay: 500 }), [o] = Ue(t, ["announcement_content"]), [i] = Ue(t, ["accent_color"]), [c] = Ue(t, ["announcement_background"]), [l] = Ue(t, ["announcement_visibility"]), [A] = Ue(t, ["paid_members_enabled"]), u = JSON.parse((l == null ? void 0 : l.toString()) || "[]"), { updateRoute: h } = ye(), [m, p] = G("homepage"), w = (F) => {
1928
1929
  r("announcement_background", F);
1929
1930
  }, x = (F, Y) => {
1930
1931
  const X = u.indexOf(F);
@@ -1963,10 +1964,10 @@ ${l}`;
1963
1964
  { id: "post", title: "Post" }
1964
1965
  ]);
1965
1966
  const R = (F) => {
1966
- C.length && m(F);
1967
+ C.length && p(F);
1967
1968
  };
1968
1969
  let U = Ft(e);
1969
- switch (p) {
1970
+ switch (m) {
1970
1971
  case "homepage":
1971
1972
  U = Ft(e);
1972
1973
  break;
@@ -1998,7 +1999,7 @@ ${l}`;
1998
1999
  preview: O,
1999
2000
  previewBgColor: "greygradient",
2000
2001
  previewToolbarTabs: C,
2001
- selectedURL: p,
2002
+ selectedURL: m,
2002
2003
  sidebar: y,
2003
2004
  testId: "announcement-bar-modal",
2004
2005
  title: "Announcement",
@@ -2170,7 +2171,7 @@ ${l}`;
2170
2171
  placeholder: "Custom webhook",
2171
2172
  title: "Name",
2172
2173
  value: i.name,
2173
- onChange: (h) => c((p) => ({ ...p, name: h.target.value })),
2174
+ onChange: (h) => c((m) => ({ ...m, name: h.target.value })),
2174
2175
  onKeyDown: () => u("name")
2175
2176
  }
2176
2177
  ),
@@ -2186,7 +2187,7 @@ ${l}`;
2186
2187
  title: "Event",
2187
2188
  hideTitle: !0,
2188
2189
  onSelect: (h) => {
2189
- c((p) => ({ ...p, event: h == null ? void 0 : h.value })), u("event");
2190
+ c((m) => ({ ...m, event: h == null ? void 0 : h.value })), u("event");
2190
2191
  }
2191
2192
  }
2192
2193
  ),
@@ -2200,7 +2201,7 @@ ${l}`;
2200
2201
  title: "Target URL",
2201
2202
  type: "url",
2202
2203
  value: i.target_url,
2203
- onChange: (h) => c((p) => ({ ...p, target_url: h.target.value })),
2204
+ onChange: (h) => c((m) => ({ ...m, target_url: h.target.value })),
2204
2205
  onKeyDown: () => u("target_url")
2205
2206
  }
2206
2207
  ),
@@ -2211,7 +2212,7 @@ ${l}`;
2211
2212
  placeholder: "https://example.com",
2212
2213
  title: "Secret",
2213
2214
  value: i.secret || void 0,
2214
- onChange: (h) => c((p) => ({ ...p, secret: h.target.value }))
2215
+ onChange: (h) => c((m) => ({ ...m, secret: h.target.value }))
2215
2216
  }
2216
2217
  )
2217
2218
  ]
@@ -2317,7 +2318,7 @@ ${l}`;
2317
2318
  }
2318
2319
  }), Cm = ({ integration: e }) => {
2319
2320
  var U, O;
2320
- const t = vt(), { updateRoute: r } = ye(), { mutateAsync: n } = hh(), { mutateAsync: a } = Ol(), { mutateAsync: o } = Pr(), i = je(), { formState: c, updateForm: l, handleSave: A, saveState: u, errors: h, clearError: p, okProps: m } = St({
2321
+ const t = vt(), { updateRoute: r } = ye(), { mutateAsync: n } = hh(), { mutateAsync: a } = Ol(), { mutateAsync: o } = Pr(), i = je(), { formState: c, updateForm: l, handleSave: A, saveState: u, errors: h, clearError: m, okProps: p } = St({
2321
2322
  initialState: e,
2322
2323
  savingDelay: 500,
2323
2324
  savedDelay: 500,
@@ -2358,11 +2359,11 @@ ${l}`;
2358
2359
  afterClose: () => {
2359
2360
  r("integrations");
2360
2361
  },
2361
- buttonsDisabled: m.disabled,
2362
+ buttonsDisabled: p.disabled,
2362
2363
  cancelLabel: "Close",
2363
2364
  dirty: u === "unsaved",
2364
- okColor: m.color,
2365
- okLabel: m.label || "Save",
2365
+ okColor: p.color,
2366
+ okLabel: p.label || "Save",
2366
2367
  size: "md",
2367
2368
  testId: "custom-integration-modal",
2368
2369
  title: c.name || "Custom integration",
@@ -2402,7 +2403,7 @@ ${l}`;
2402
2403
  title: "Title",
2403
2404
  value: c.name,
2404
2405
  onChange: (F) => l((Y) => ({ ...Y, name: F.target.value })),
2405
- onKeyDown: () => p("name")
2406
+ onKeyDown: () => m("name")
2406
2407
  }
2407
2408
  ),
2408
2409
  /* @__PURE__ */ s.jsx(ce, { maxLength: 2e3, title: "Description", value: c.description || "", onChange: (F) => l((Y) => ({ ...Y, description: F.target.value })) }),
@@ -2604,14 +2605,14 @@ const Zm = ({
2604
2605
  " is now your active theme"
2605
2606
  ] })
2606
2607
  });
2607
- } catch (p) {
2608
- let m = null;
2609
- p instanceof gr && ((u = p.response) == null ? void 0 : u.status) === 422 && ((h = p.data) != null && h.errors) ? m = p.data.errors : n(p);
2608
+ } catch (m) {
2609
+ let p = null;
2610
+ m instanceof gr && ((u = m.response) == null ? void 0 : u.status) === 422 && ((h = m.data) != null && h.errors) ? p = m.data.errors : n(m);
2610
2611
  let w = "Invalid Theme", x = /* @__PURE__ */ s.jsx(s.Fragment, { children: "This theme is invalid and cannot be activated. Fix the following errors and re-upload the theme" });
2611
- m && ne.show(Ql, {
2612
+ p && ne.show(Ql, {
2612
2613
  title: w,
2613
2614
  prompt: x,
2614
- fatalErrors: m,
2615
+ fatalErrors: p,
2615
2616
  onRetry: async (k) => {
2616
2617
  k == null || k.remove(), a();
2617
2618
  }
@@ -2736,20 +2737,20 @@ const Zm = ({
2736
2737
  return /* @__PURE__ */ s.jsxs("button", { className: "flex cursor-pointer flex-col gap-3 text-left", type: "button", onClick: () => {
2737
2738
  e == null || e(l);
2738
2739
  }, children: [
2739
- /* @__PURE__ */ s.jsx("div", { className: "relative w-full bg-grey-100 shadow-md transition-all duration-500 hover:scale-[1.05]", onMouseEnter: () => c(l), onMouseLeave: () => c(null), children: A ? /* @__PURE__ */ s.jsx(s.Fragment, { children: u.map((p, m) => /* @__PURE__ */ s.jsx(
2740
+ /* @__PURE__ */ s.jsx("div", { className: "relative w-full bg-grey-100 shadow-md transition-all duration-500 hover:scale-[1.05]", onMouseEnter: () => c(l), onMouseLeave: () => c(null), children: A ? /* @__PURE__ */ s.jsx(s.Fragment, { children: u.map((m, p) => /* @__PURE__ */ s.jsx(
2740
2741
  "img",
2741
2742
  {
2742
- alt: `${l.name} Theme - ${p.category}`,
2743
+ alt: `${l.name} Theme - ${m.category}`,
2743
2744
  className: ge("h-full w-full object-contain opacity-0 transition-opacity duration-500", {
2744
- "opacity-100": m === o && h || !h && m === 0,
2745
- relative: m === o,
2746
- absolute: m !== o,
2747
- "left-0": m !== o,
2748
- "top-0": m !== o
2745
+ "opacity-100": p === o && h || !h && p === 0,
2746
+ relative: p === o,
2747
+ absolute: p !== o,
2748
+ "left-0": p !== o,
2749
+ "top-0": p !== o
2749
2750
  }),
2750
- src: Pn(p.image, t)
2751
+ src: Pn(m.image, t)
2751
2752
  },
2752
- `theme-variant-${p.category.toLowerCase()}`
2753
+ `theme-variant-${m.category.toLowerCase()}`
2753
2754
  )) }) : /* @__PURE__ */ s.jsx(
2754
2755
  "img",
2755
2756
  {
@@ -2760,9 +2761,9 @@ const Zm = ({
2760
2761
  ) }),
2761
2762
  /* @__PURE__ */ s.jsxs("div", { className: "relative mt-3", children: [
2762
2763
  /* @__PURE__ */ s.jsx(Ee, { level: 4, children: l.name }),
2763
- A ? u.map((p, m) => /* @__PURE__ */ s.jsx("span", { className: ge("absolute left-0 translate-y-px text-sm text-grey-700 opacity-0", {
2764
- "opacity-100": m === o && h || !h && m === 0
2765
- }), children: p.category })) : /* @__PURE__ */ s.jsx("span", { className: "text-sm text-grey-700", children: l.category })
2764
+ A ? u.map((m, p) => /* @__PURE__ */ s.jsx("span", { className: ge("absolute left-0 translate-y-px text-sm text-grey-700 opacity-0", {
2765
+ "opacity-100": p === o && h || !h && p === 0
2766
+ }), children: m.category })) : /* @__PURE__ */ s.jsx("span", { className: "text-sm text-grey-700", children: l.category })
2766
2767
  ] })
2767
2768
  ] }, l.name);
2768
2769
  }) }),
@@ -2805,9 +2806,9 @@ const Zm = ({
2805
2806
  "Highly recommended to fix, functionality ",
2806
2807
  /* @__PURE__ */ s.jsx("strong", { children: "could" }),
2807
2808
  " be restricted"
2808
- ] }), title: "Errors", children: (A = r.gscan_errors) == null ? void 0 : A.map((p) => /* @__PURE__ */ s.jsx(yi, { problem: p })) }) }));
2809
+ ] }), title: "Errors", children: (A = r.gscan_errors) == null ? void 0 : A.map((m) => /* @__PURE__ */ s.jsx(yi, { problem: m })) }) }));
2809
2810
  let c = null;
2810
- r && r.warnings && (c = /* @__PURE__ */ s.jsx("div", { className: "mt-10", children: /* @__PURE__ */ s.jsx(Gt, { title: "Warnings", children: (u = r.warnings) == null ? void 0 : u.map((p) => /* @__PURE__ */ s.jsx(yi, { problem: p })) }) }));
2811
+ r && r.warnings && (c = /* @__PURE__ */ s.jsx("div", { className: "mt-10", children: /* @__PURE__ */ s.jsx(Gt, { title: "Warnings", children: (u = r.warnings) == null ? void 0 : u.map((m) => /* @__PURE__ */ s.jsx(yi, { problem: m })) }) }));
2811
2812
  let l = `Activate${(h = r.gscan_errors) != null && h.length ? " with errors" : ""}`;
2812
2813
  return r.active && (l = "OK"), /* @__PURE__ */ s.jsx(
2813
2814
  il,
@@ -2822,7 +2823,7 @@ const Zm = ({
2822
2823
  c
2823
2824
  ] }),
2824
2825
  title: e,
2825
- onOk: async (p) => {
2826
+ onOk: async (m) => {
2826
2827
  if (!r.active)
2827
2828
  try {
2828
2829
  const w = (await a(r.name)).themes[0];
@@ -2834,10 +2835,10 @@ const Zm = ({
2834
2835
  " is now your active theme."
2835
2836
  ] })
2836
2837
  });
2837
- } catch (m) {
2838
- o(m);
2838
+ } catch (p) {
2839
+ o(p);
2839
2840
  }
2840
- n == null || n(), p == null || p.remove();
2841
+ n == null || n(), m == null || m.remove();
2841
2842
  }
2842
2843
  }
2843
2844
  );
@@ -2866,9 +2867,9 @@ const Zm = ({
2866
2867
  value: Si(y)
2867
2868
  }));
2868
2869
  Ei(e) && (l === void 0 && A(h[0]), u = ((k = Mi(e).find((y) => Si(y) === (l == null ? void 0 : l.value))) == null ? void 0 : k.previewUrl) || u);
2869
- let p = `Install ${e.name}`;
2870
- t ? p = "Installing..." : Fn(e) && !(r != null && r.active) ? p = `Activate ${e.name}` : r && (p = `Update ${e.name}`);
2871
- const m = () => {
2870
+ let m = `Install ${e.name}`;
2871
+ t ? m = "Installing..." : Fn(e) && !(r != null && r.active) ? m = `Activate ${e.name}` : r && (m = `Update ${e.name}`);
2872
+ const p = () => {
2872
2873
  r && !Fn(e) ? ne.show(We, {
2873
2874
  title: "Overwrite theme",
2874
2875
  prompt: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
@@ -2951,8 +2952,8 @@ const Zm = ({
2951
2952
  {
2952
2953
  color: "green",
2953
2954
  disabled: t,
2954
- label: t ? "Installing..." : p,
2955
- onClick: m
2955
+ label: t ? "Installing..." : m,
2956
+ onClick: p
2956
2957
  }
2957
2958
  )
2958
2959
  ] });
@@ -2997,9 +2998,9 @@ const Zm = ({
2997
2998
  I instanceof br && A({ enabled: !1, error: I.message });
2998
2999
  }) : A({ enabled: !0 });
2999
3000
  }, [o]);
3000
- const p = () => {
3001
+ const m = () => {
3001
3002
  n(c ? `design/edit?ref=${c}` : "design/edit");
3002
- }, m = async (I) => {
3003
+ }, p = async (I) => {
3003
3004
  const C = I == null ? void 0 : I.name.replace(/\.zip$/, ""), R = r.map((U) => U.name);
3004
3005
  Fn({ name: C }) ? ne.show(We, {
3005
3006
  title: "Upload failed",
@@ -3030,9 +3031,9 @@ const Zm = ({
3030
3031
  onOk: async (U) => {
3031
3032
  h(!0);
3032
3033
  const O = R.indexOf(C);
3033
- r.splice(O, 1), await w({ file: I, onActivate: p }), h(!1), t("installed"), U == null || U.remove();
3034
+ r.splice(O, 1), await w({ file: I, onActivate: m }), h(!1), t("installed"), U == null || U.remove();
3034
3035
  }
3035
- }) : (t("installed"), w({ file: I, onActivate: p }));
3036
+ }) : (t("installed"), w({ file: I, onActivate: m }));
3036
3037
  }, w = async ({
3037
3038
  file: I,
3038
3039
  onActivate: C
@@ -3097,17 +3098,17 @@ const Zm = ({
3097
3098
  activeItemClassName: "hidden md:!block md:!visible",
3098
3099
  itemClassName: "hidden md:!block md:!visible",
3099
3100
  items: [
3100
- { label: "Design", onClick: p },
3101
+ { label: "Design", onClick: m },
3101
3102
  { label: "Change theme" }
3102
3103
  ],
3103
3104
  separatorClassName: "hidden md:!block md:!visible",
3104
3105
  backIcon: !0,
3105
- onBack: p
3106
+ onBack: m
3106
3107
  }
3107
3108
  ), k = () => {
3108
3109
  l != null && l.enabled ? ne.show(We, {
3109
3110
  title: "Upload theme",
3110
- prompt: /* @__PURE__ */ s.jsx($m, { onUpload: m }),
3111
+ prompt: /* @__PURE__ */ s.jsx($m, { onUpload: p }),
3111
3112
  okLabel: "",
3112
3113
  formSheet: !1
3113
3114
  }) : ne.show(En, {
@@ -3166,7 +3167,7 @@ const Zm = ({
3166
3167
  }
3167
3168
  return null;
3168
3169
  }, Ii = ({ source: e, themeRef: t }) => {
3169
- const [r, n] = G("official"), [a, o] = G(null), [i, c] = G("desktop"), [l, A] = G(!1), [u, h] = G(!1), { updateRoute: p } = ye(), m = vn().getParam("ref"), w = vt(), { data: { themes: x } = {} } = Nl(), { mutateAsync: k } = Lm(), { mutateAsync: y } = js(), I = je(), C = (O) => {
3170
+ const [r, n] = G("official"), [a, o] = G(null), [i, c] = G("desktop"), [l, A] = G(!1), [u, h] = G(!1), { updateRoute: m } = ye(), p = vn().getParam("ref"), w = vt(), { data: { themes: x } = {} } = Nl(), { mutateAsync: k } = Lm(), { mutateAsync: y } = js(), I = je(), C = (O) => {
3170
3171
  o(O);
3171
3172
  };
3172
3173
  if (ie(() => {
@@ -3207,14 +3208,14 @@ const Zm = ({
3207
3208
  /* @__PURE__ */ s.jsx("span", { className: "capitalize", children: L.themes[0].name }),
3208
3209
  " is now your active theme"
3209
3210
  ] })
3210
- })), B == null || B.remove(), p(m ? `design/edit?ref=${m}` : "design/edit");
3211
+ })), B == null || B.remove(), m(p ? `design/edit?ref=${p}` : "design/edit");
3211
3212
  } catch (Z) {
3212
3213
  I(Z);
3213
3214
  }
3214
3215
  }
3215
3216
  });
3216
3217
  }
3217
- }, [t, e, k, I, y, p, x, u, m]), !x)
3218
+ }, [t, e, k, I, y, m, x, u, p]), !x)
3218
3219
  return;
3219
3220
  let R, U;
3220
3221
  return a && (R = x.find((O) => O.name.toLowerCase() === a.name.toLowerCase()), U = async () => {
@@ -3272,14 +3273,14 @@ const Zm = ({
3272
3273
  prompt: F,
3273
3274
  installedTheme: R,
3274
3275
  onActivate: () => {
3275
- p(m ? `design/edit?ref=${m}` : "design/edit");
3276
+ m(p ? `design/edit?ref=${p}` : "design/edit");
3276
3277
  }
3277
3278
  });
3278
3279
  }), /* @__PURE__ */ s.jsx(
3279
3280
  ze,
3280
3281
  {
3281
3282
  afterClose: () => {
3282
- p(m ? `design/edit?ref=${m}` : "design/edit");
3283
+ m(p ? `design/edit?ref=${p}` : "design/edit");
3283
3284
  },
3284
3285
  animate: !1,
3285
3286
  cancelLabel: "",
@@ -3290,7 +3291,7 @@ const Zm = ({
3290
3291
  title: "",
3291
3292
  scrolling: !0,
3292
3293
  onCancel: () => {
3293
- w.remove(), p("");
3294
+ w.remove(), m("");
3294
3295
  },
3295
3296
  children: /* @__PURE__ */ s.jsx("div", { className: "flex h-full justify-between", children: /* @__PURE__ */ s.jsxs("div", { className: "grow", children: [
3296
3297
  a && /* @__PURE__ */ s.jsx(
@@ -3303,7 +3304,7 @@ const Zm = ({
3303
3304
  o(null);
3304
3305
  },
3305
3306
  onClose: () => {
3306
- p("design/edit");
3307
+ m("design/edit");
3307
3308
  },
3308
3309
  onInstall: U
3309
3310
  }
@@ -3362,14 +3363,14 @@ function sp() {
3362
3363
  Ji = 1;
3363
3364
  var e = Je, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
3364
3365
  function i(c, l, A) {
3365
- var u, h = {}, p = null, m = null;
3366
- A !== void 0 && (p = "" + A), l.key !== void 0 && (p = "" + l.key), l.ref !== void 0 && (m = l.ref);
3366
+ var u, h = {}, m = null, p = null;
3367
+ A !== void 0 && (m = "" + A), l.key !== void 0 && (m = "" + l.key), l.ref !== void 0 && (p = l.ref);
3367
3368
  for (u in l)
3368
3369
  n.call(l, u) && !o.hasOwnProperty(u) && (h[u] = l[u]);
3369
3370
  if (c && c.defaultProps)
3370
3371
  for (u in l = c.defaultProps, l)
3371
3372
  h[u] === void 0 && (h[u] = l[u]);
3372
- return { $$typeof: t, type: c, key: p, ref: m, props: h, _owner: a.current };
3373
+ return { $$typeof: t, type: c, key: m, ref: p, props: h, _owner: a.current };
3373
3374
  }
3374
3375
  return $r.Fragment = r, $r.jsx = i, $r.jsxs = i, $r;
3375
3376
  }
@@ -3419,8 +3420,8 @@ const ip = (e) => /* @__PURE__ */ Me("svg", { xmlns: "http://www.w3.org/2000/svg
3419
3420
  }
3420
3421
  );
3421
3422
  }, Bl = ({ payload: e, srcUrl: t, links: r, likes: n, user: a, alt: o, urls: i, height: c, width: l, zoomed: A, insertImage: u, selectImg: h }) => {
3422
- const p = (m) => {
3423
- m.stopPropagation(), h(A ? null : e);
3423
+ const m = (p) => {
3424
+ p.stopPropagation(), h(A ? null : e);
3424
3425
  };
3425
3426
  return /* @__PURE__ */ he.jsxs(
3426
3427
  "div",
@@ -3428,7 +3429,7 @@ const ip = (e) => /* @__PURE__ */ Me("svg", { xmlns: "http://www.w3.org/2000/svg
3428
3429
  className: `relative mb-6 block ${A ? "h-full w-[max-content] cursor-zoom-out" : "w-full cursor-zoom-in"}`,
3429
3430
  style: { backgroundColor: e.color || "transparent" },
3430
3431
  "data-kg-unsplash-gallery-item": !0,
3431
- onClick: p,
3432
+ onClick: m,
3432
3433
  children: [
3433
3434
  /* @__PURE__ */ he.jsx(
3434
3435
  "img",
@@ -3469,8 +3470,8 @@ const ip = (e) => /* @__PURE__ */ Me("svg", { xmlns: "http://www.w3.org/2000/svg
3469
3470
  /* @__PURE__ */ he.jsx("img", { alt: "author", className: "mr-2 size-8 rounded-full", src: a.profile_image.medium }),
3470
3471
  /* @__PURE__ */ he.jsx("div", { className: "mr-2 truncate font-sans text-sm font-medium text-white", children: a.name })
3471
3472
  ] }),
3472
- /* @__PURE__ */ he.jsx(za, { label: "Insert image", "data-kg-unsplash-insert-button": !0, onClick: (m) => {
3473
- m.stopPropagation(), u({
3473
+ /* @__PURE__ */ he.jsx(za, { label: "Insert image", "data-kg-unsplash-insert-button": !0, onClick: (p) => {
3474
+ p.stopPropagation(), u({
3474
3475
  src: i.regular.replace(/&w=1080/, "&w=2000"),
3475
3476
  caption: `<span>Photo by <a href="${a.links.html}">${a.name}</a> / <a href="https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit">Unsplash</a></span>`,
3476
3477
  height: c,
@@ -6359,7 +6360,7 @@ class Ep {
6359
6360
  }
6360
6361
  }
6361
6362
  const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6362
- const n = xt(() => r ? new yp(r) : new kp(), [r]), a = xt(() => new bp(n), [n]), o = xt(() => new op(3), []), i = xt(() => new Ep(a, o), [a, o]), c = Ye(null), [l, A] = G(0), [u, h] = G(0), [p, m] = G(i.searchIsRunning() || !0), w = Ye(!1), [x, k] = G(""), [y, I] = G(null), [C, R] = G([]);
6363
+ const n = xt(() => r ? new yp(r) : new kp(), [r]), a = xt(() => new bp(n), [n]), o = xt(() => new op(3), []), i = xt(() => new Ep(a, o), [a, o]), c = Ye(null), [l, A] = G(0), [u, h] = G(0), [m, p] = G(i.searchIsRunning() || !0), w = Ye(!1), [x, k] = G(""), [y, I] = G(null), [C, R] = G([]);
6363
6364
  Je.useEffect(() => {
6364
6365
  c.current && y === null && u !== 0 && (c.current.scrollTop = u, h(0));
6365
6366
  }, [y, l, u]), Je.useEffect(() => {
@@ -6384,16 +6385,16 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6384
6385
  if (w.current === !1 || x.length === 0) {
6385
6386
  R([]), i.clearPhotos(), await i.loadNew();
6386
6387
  const j = i.getColumns();
6387
- R(j || []), c.current && c.current.scrollTop !== 0 && (c.current.scrollTop = 0), m(!1);
6388
+ R(j || []), c.current && c.current.scrollTop !== 0 && (c.current.scrollTop = 0), p(!1);
6388
6389
  }
6389
6390
  }, [i, x]), O = async (j) => {
6390
6391
  const J = j.target.value;
6391
6392
  J.length > 2 && (I(null), k(J)), J.length === 0 && (k(""), w.current = !1, await U());
6392
6393
  }, F = Je.useCallback(async () => {
6393
6394
  if (x) {
6394
- m(!0), R([]), i.clearPhotos(), await i.updateSearch(x);
6395
+ p(!0), R([]), i.clearPhotos(), await i.updateSearch(x);
6395
6396
  const j = i.getColumns();
6396
- j && R(j), c.current && c.current.scrollTop !== 0 && (c.current.scrollTop = 0), m(!1);
6397
+ j && R(j), c.current && c.current.scrollTop !== 0 && (c.current.scrollTop = 0), p(!1);
6397
6398
  }
6398
6399
  }, [x, i]);
6399
6400
  Je.useEffect(() => {
@@ -6405,9 +6406,9 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6405
6406
  };
6406
6407
  }, [x, F, U]);
6407
6408
  const Y = Je.useCallback(async () => {
6408
- m(!0), await i.loadNextPage();
6409
+ p(!0), await i.loadNextPage();
6409
6410
  const j = i.getColumns();
6410
- R(j || []), m(!1);
6411
+ R(j || []), p(!1);
6411
6412
  }, [i]);
6412
6413
  Je.useEffect(() => {
6413
6414
  const j = c.current;
@@ -6438,7 +6439,7 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6438
6439
  error: null,
6439
6440
  galleryRef: c,
6440
6441
  insertImage: z,
6441
- isLoading: p,
6442
+ isLoading: m,
6442
6443
  selectImg: X,
6443
6444
  zoomed: y
6444
6445
  }
@@ -6454,10 +6455,10 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6454
6455
  }
6455
6456
  ) }), Ip = ({ values: e, updateSetting: t }) => {
6456
6457
  const { mutateAsync: r } = Pr(), [n, a] = G(e.description), { settings: o } = Te(), [i] = Ue(o, ["unsplash"]), [c, l] = G(!1), { unsplashConfig: A } = wh(), u = je(), h = Ye(
6457
- xn((m) => {
6458
- t("description", m);
6458
+ xn((p) => {
6459
+ t("description", p);
6459
6460
  }, 500)
6460
- ), p = ll();
6461
+ ), m = ll();
6461
6462
  return /* @__PURE__ */ s.jsx("div", { className: "mt-7", children: /* @__PURE__ */ s.jsxs(kn, { children: [
6462
6463
  /* @__PURE__ */ s.jsx(
6463
6464
  ce,
@@ -6466,8 +6467,8 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6466
6467
  maxLength: 200,
6467
6468
  title: "Site description",
6468
6469
  value: n,
6469
- onChange: (m) => {
6470
- a(m.target.value), h.current(m.target.value);
6470
+ onChange: (p) => {
6471
+ a(p.target.value), h.current(p.target.value);
6471
6472
  }
6472
6473
  },
6473
6474
  "site-description"
@@ -6480,7 +6481,7 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6480
6481
  title: /* @__PURE__ */ s.jsx(Ee, { className: "mt-[3px]", grey: !0, level: 6, children: "Accent color" }),
6481
6482
  value: e.accentColor,
6482
6483
  alwaysOpen: !0,
6483
- onChange: (m) => t("accent_color", m)
6484
+ onChange: (p) => t("accent_color", p)
6484
6485
  }
6485
6486
  ),
6486
6487
  /* @__PURE__ */ s.jsxs("div", { className: `flex justify-between ${e.icon ? "items-start " : "items-end"}`, children: [
@@ -6499,9 +6500,9 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6499
6500
  imageURL: e.icon || "",
6500
6501
  width: e.icon ? "66px" : "150px",
6501
6502
  onDelete: () => t("icon", null),
6502
- onUpload: async (m) => {
6503
+ onUpload: async (p) => {
6503
6504
  try {
6504
- t("icon", Yt(await r({ file: m })));
6505
+ t("icon", Yt(await r({ file: p })));
6505
6506
  } catch (w) {
6506
6507
  const x = w;
6507
6508
  x.response.status === 415 && (x.message = "Unsupported file type"), u(x);
@@ -6523,9 +6524,9 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6523
6524
  imageFit: "contain",
6524
6525
  imageURL: e.logo || "",
6525
6526
  onDelete: () => t("logo", null),
6526
- onUpload: async (m) => {
6527
+ onUpload: async (p) => {
6527
6528
  try {
6528
- t("logo", Yt(await r({ file: m })));
6529
+ t("logo", Yt(await r({ file: p })));
6529
6530
  } catch (w) {
6530
6531
  const x = w;
6531
6532
  x.response.status === 415 && (x.message = "Unsupported file type"), u(x);
@@ -6547,12 +6548,12 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6547
6548
  imageURL: e.coverImage || "",
6548
6549
  openUnsplash: () => l(!0),
6549
6550
  pintura: {
6550
- isEnabled: p.isEnabled,
6551
- openEditor: async () => p.openEditor({
6551
+ isEnabled: m.isEnabled,
6552
+ openEditor: async () => m.openEditor({
6552
6553
  image: e.coverImage || "",
6553
- handleSave: async (m) => {
6554
+ handleSave: async (p) => {
6554
6555
  try {
6555
- t("cover_image", Yt(await r({ file: m })));
6556
+ t("cover_image", Yt(await r({ file: p })));
6556
6557
  } catch (w) {
6557
6558
  u(w);
6558
6559
  }
@@ -6562,9 +6563,9 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6562
6563
  unsplashButtonClassName: "!top-1 !right-1 z-50",
6563
6564
  unsplashEnabled: i,
6564
6565
  onDelete: () => t("cover_image", null),
6565
- onUpload: async (m) => {
6566
+ onUpload: async (p) => {
6566
6567
  try {
6567
- t("cover_image", Yt(await r({ file: m })));
6568
+ t("cover_image", Yt(await r({ file: p })));
6568
6569
  } catch (w) {
6569
6570
  const x = w;
6570
6571
  x.response.status === 415 && (x.message = "Unsupported file type"), u(x);
@@ -6580,8 +6581,8 @@ const Mp = ({ onClose: e, onImageInsert: t, unsplashProviderConfig: r }) => {
6580
6581
  onClose: () => {
6581
6582
  l(!1);
6582
6583
  },
6583
- onImageInsert: (m) => {
6584
- m.src && t("cover_image", m.src), l(!1);
6584
+ onImageInsert: (p) => {
6585
+ p.src && t("cover_image", p.src), l(!1);
6585
6586
  }
6586
6587
  }
6587
6588
  )
@@ -6664,7 +6665,7 @@ var Ns = { exports: {} }, Ll = { exports: {} };
6664
6665
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
6665
6666
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
6666
6667
  }
6667
- var p = "null", m = "undefined", w = "bool", x = "boolean", k = "number", y = "string", I = "date", C = "regex", R = "regexp", U = "array", O = "object", F = "function", Y = [p, m, x, k, y, I, R], X = "expression", z = "group", j = "pipeline", J = "projection", B = "query", L = function() {
6668
+ var m = "null", p = "undefined", w = "bool", x = "boolean", k = "number", y = "string", I = "date", C = "regex", R = "regexp", U = "array", O = "object", F = "function", Y = [m, p, x, k, y, I, R], X = "expression", z = "group", j = "pipeline", J = "projection", B = "query", L = function() {
6668
6669
  };
6669
6670
  Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", {
6670
6671
  value: function(f, g) {
@@ -6891,8 +6892,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
6891
6892
  return JSON.stringify(d);
6892
6893
  case I:
6893
6894
  return d.toISOString();
6894
- case p:
6895
6895
  case m:
6896
+ case p:
6896
6897
  return f;
6897
6898
  case U:
6898
6899
  return "[" + d.map(Sr) + "]";
@@ -7965,7 +7966,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7965
7966
  case U:
7966
7967
  return q(d);
7967
7968
  case 6:
7968
- case m:
7969
+ case p:
7969
7970
  return P(d);
7970
7971
  case 8:
7971
7972
  case w:
@@ -7974,7 +7975,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7974
7975
  case I:
7975
7976
  return ot(d);
7976
7977
  case 10:
7977
- case p:
7978
+ case m:
7978
7979
  return oe(d);
7979
7980
  case 11:
7980
7981
  case C:
@@ -8893,7 +8894,7 @@ Zn.exports;
8893
8894
  for (B = B || {}, L = j.length; L--; B[j[L]] = J)
8894
8895
  ;
8895
8896
  return B;
8896
- }, a = [1, 5], o = [1, 7], i = [1, 8], c = [1, 6, 10], l = [1, 9], A = [1, 6, 8, 10], u = [1, 24], h = [1, 25], p = [1, 26], m = [1, 27], w = [1, 28], x = [1, 29], k = [1, 30], y = [1, 17], I = [1, 18], C = [1, 19], R = [21, 22, 23, 24, 25, 29, 30], U = [1, 6, 8, 10, 18], O = [1, 47], F = [6, 18], Y = {
8897
+ }, a = [1, 5], o = [1, 7], i = [1, 8], c = [1, 6, 10], l = [1, 9], A = [1, 6, 8, 10], u = [1, 24], h = [1, 25], m = [1, 26], p = [1, 27], w = [1, 28], x = [1, 29], k = [1, 30], y = [1, 17], I = [1, 18], C = [1, 19], R = [21, 22, 23, 24, 25, 29, 30], U = [1, 6, 8, 10, 18], O = [1, 47], F = [6, 18], Y = {
8897
8898
  trace: function() {
8898
8899
  },
8899
8900
  yy: {},
@@ -9003,7 +9004,7 @@ Zn.exports;
9003
9004
  break;
9004
9005
  }
9005
9006
  },
9006
- table: [{ 3: 1, 4: 2, 5: 3, 7: 4, 9: a, 11: 6, 13: o }, { 1: [3] }, { 1: [2, 1], 6: i }, n(c, [2, 2], { 8: l }), n(A, [2, 4]), { 4: 10, 5: 3, 7: 4, 9: a, 11: 6, 13: o }, { 12: 11, 14: [1, 12], 15: 13, 16: [1, 14], 19: 15, 20: 16, 21: u, 22: h, 23: p, 24: m, 25: w, 29: x, 30: k, 33: y, 34: I, 35: C, 36: [1, 20], 37: [1, 21], 38: [1, 22], 39: [1, 23] }, n([14, 16, 21, 22, 23, 24, 25, 29, 30, 33, 34, 35, 36, 37, 38, 39], [2, 8]), { 5: 31, 7: 4, 9: a, 11: 6, 13: o }, { 7: 32, 9: a, 11: 6, 13: o }, { 6: i, 10: [1, 33] }, n(A, [2, 7]), n(R, [2, 29], { 15: 34, 16: [1, 35], 33: y, 34: I, 35: C }), n(A, [2, 10]), { 17: 36, 20: 37, 21: u, 22: h, 23: p, 24: m, 25: w, 29: x, 30: k }, { 20: 38, 21: u, 22: h, 23: p, 24: m, 25: w, 29: x, 30: k }, n(A, [2, 14]), { 30: [1, 39] }, { 30: [1, 40] }, { 30: [1, 41] }, n(R, [2, 30]), n(R, [2, 31]), n(R, [2, 32]), n(R, [2, 33]), n(U, [2, 17]), n(U, [2, 18]), n(U, [2, 19]), n(U, [2, 20]), { 26: 42, 31: [1, 43], 32: [1, 44] }, n(U, [2, 22]), n(U, [2, 23]), n(c, [2, 3], { 8: l }), n(A, [2, 5]), n(A, [2, 6]), n(A, [2, 9]), { 17: 45, 20: 37, 21: u, 22: h, 23: p, 24: m, 25: w, 29: x, 30: k }, { 6: O, 18: [1, 46] }, n(F, [2, 16]), n(A, [2, 13]), n(A, [2, 26]), n(A, [2, 27]), n(A, [2, 28]), { 27: [1, 48] }, { 27: [2, 24] }, { 27: [2, 25] }, { 6: O, 18: [1, 49] }, n(A, [2, 12]), { 20: 50, 21: u, 22: h, 23: p, 24: m, 25: w, 29: x, 30: k }, { 28: [1, 51] }, n(A, [2, 11]), n(F, [2, 15]), n(U, [2, 21])],
9007
+ table: [{ 3: 1, 4: 2, 5: 3, 7: 4, 9: a, 11: 6, 13: o }, { 1: [3] }, { 1: [2, 1], 6: i }, n(c, [2, 2], { 8: l }), n(A, [2, 4]), { 4: 10, 5: 3, 7: 4, 9: a, 11: 6, 13: o }, { 12: 11, 14: [1, 12], 15: 13, 16: [1, 14], 19: 15, 20: 16, 21: u, 22: h, 23: m, 24: p, 25: w, 29: x, 30: k, 33: y, 34: I, 35: C, 36: [1, 20], 37: [1, 21], 38: [1, 22], 39: [1, 23] }, n([14, 16, 21, 22, 23, 24, 25, 29, 30, 33, 34, 35, 36, 37, 38, 39], [2, 8]), { 5: 31, 7: 4, 9: a, 11: 6, 13: o }, { 7: 32, 9: a, 11: 6, 13: o }, { 6: i, 10: [1, 33] }, n(A, [2, 7]), n(R, [2, 29], { 15: 34, 16: [1, 35], 33: y, 34: I, 35: C }), n(A, [2, 10]), { 17: 36, 20: 37, 21: u, 22: h, 23: m, 24: p, 25: w, 29: x, 30: k }, { 20: 38, 21: u, 22: h, 23: m, 24: p, 25: w, 29: x, 30: k }, n(A, [2, 14]), { 30: [1, 39] }, { 30: [1, 40] }, { 30: [1, 41] }, n(R, [2, 30]), n(R, [2, 31]), n(R, [2, 32]), n(R, [2, 33]), n(U, [2, 17]), n(U, [2, 18]), n(U, [2, 19]), n(U, [2, 20]), { 26: 42, 31: [1, 43], 32: [1, 44] }, n(U, [2, 22]), n(U, [2, 23]), n(c, [2, 3], { 8: l }), n(A, [2, 5]), n(A, [2, 6]), n(A, [2, 9]), { 17: 45, 20: 37, 21: u, 22: h, 23: m, 24: p, 25: w, 29: x, 30: k }, { 6: O, 18: [1, 46] }, n(F, [2, 16]), n(A, [2, 13]), n(A, [2, 26]), n(A, [2, 27]), n(A, [2, 28]), { 27: [1, 48] }, { 27: [2, 24] }, { 27: [2, 25] }, { 6: O, 18: [1, 49] }, n(A, [2, 12]), { 20: 50, 21: u, 22: h, 23: m, 24: p, 25: w, 29: x, 30: k }, { 28: [1, 51] }, n(A, [2, 11]), n(F, [2, 15]), n(U, [2, 21])],
9007
9008
  defaultActions: { 43: [2, 24], 44: [2, 25] },
9008
9009
  parseError: function(J, B) {
9009
9010
  if (B.recoverable)
@@ -9369,7 +9370,7 @@ function Sn(e, t) {
9369
9370
  function Rr(e, t) {
9370
9371
  if (M(2, arguments), !t || Wt(t) !== "object")
9371
9372
  return /* @__PURE__ */ new Date(NaN);
9372
- var r = t.years ? _(t.years) : 0, n = t.months ? _(t.months) : 0, a = t.weeks ? _(t.weeks) : 0, o = t.days ? _(t.days) : 0, i = t.hours ? _(t.hours) : 0, c = t.minutes ? _(t.minutes) : 0, l = t.seconds ? _(t.seconds) : 0, A = T(e), u = n || r ? Sn(A, n + r * 12) : A, h = o || a ? Lt(u, o + a * 7) : u, p = c + i * 60, m = l + p * 60, w = m * 1e3, x = new Date(h.getTime() + w);
9373
+ var r = t.years ? _(t.years) : 0, n = t.months ? _(t.months) : 0, a = t.weeks ? _(t.weeks) : 0, o = t.days ? _(t.days) : 0, i = t.hours ? _(t.hours) : 0, c = t.minutes ? _(t.minutes) : 0, l = t.seconds ? _(t.seconds) : 0, A = T(e), u = n || r ? Sn(A, n + r * 12) : A, h = o || a ? Lt(u, o + a * 7) : u, m = c + i * 60, p = l + m * 60, w = p * 1e3, x = new Date(h.getTime() + w);
9373
9374
  return x;
9374
9375
  }
9375
9376
  function Qr(e) {
@@ -9418,8 +9419,8 @@ function Mt(e, t) {
9418
9419
  var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.weekStartsOn) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.weekStartsOn) !== null && r !== void 0 ? r : 0);
9419
9420
  if (!(h >= 0 && h <= 6))
9420
9421
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
9421
- var p = T(e), m = p.getDay(), w = (m < h ? 7 : 0) + m - h;
9422
- return p.setDate(p.getDate() - w), p.setHours(0, 0, 0, 0), p;
9422
+ var m = T(e), p = m.getDay(), w = (p < h ? 7 : 0) + p - h;
9423
+ return m.setDate(m.getDate() - w), m.setHours(0, 0, 0, 0), m;
9423
9424
  }
9424
9425
  function Kt(e) {
9425
9426
  return M(1, arguments), Mt(e, {
@@ -9895,8 +9896,8 @@ function iA(e, t) {
9895
9896
  var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.weekStartsOn) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.weekStartsOn) !== null && r !== void 0 ? r : 0);
9896
9897
  if (!(h >= 0 && h <= 6))
9897
9898
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
9898
- var p = T(e), m = p.getDay(), w = (m < h ? -7 : 0) + 6 - (m - h);
9899
- return p.setDate(p.getDate() + w), p.setHours(23, 59, 59, 999), p;
9899
+ var m = T(e), p = m.getDay(), w = (p < h ? -7 : 0) + 6 - (p - h);
9900
+ return m.setDate(m.getDate() + w), m.setHours(23, 59, 59, 999), m;
9900
9901
  }
9901
9902
  function sg(e) {
9902
9903
  return M(1, arguments), iA(e, {
@@ -9982,28 +9983,28 @@ function xr(e, t) {
9982
9983
  var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.weekStartsOn) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.weekStartsOn) !== null && r !== void 0 ? r : 0);
9983
9984
  if (!(h >= 0 && h <= 6))
9984
9985
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
9985
- var p = T(e), m = p.getUTCDay(), w = (m < h ? 7 : 0) + m - h;
9986
- return p.setUTCDate(p.getUTCDate() - w), p.setUTCHours(0, 0, 0, 0), p;
9986
+ var m = T(e), p = m.getUTCDay(), w = (p < h ? 7 : 0) + p - h;
9987
+ return m.setUTCDate(m.getUTCDate() - w), m.setUTCHours(0, 0, 0, 0), m;
9987
9988
  }
9988
9989
  function eo(e, t) {
9989
9990
  var r, n, a, o, i, c, l, A;
9990
9991
  M(1, arguments);
9991
- var u = T(e), h = u.getUTCFullYear(), p = at(), m = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : p.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = p.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1);
9992
- if (!(m >= 1 && m <= 7))
9992
+ var u = T(e), h = u.getUTCFullYear(), m = at(), p = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : m.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = m.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1);
9993
+ if (!(p >= 1 && p <= 7))
9993
9994
  throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
9994
9995
  var w = /* @__PURE__ */ new Date(0);
9995
- w.setUTCFullYear(h + 1, 0, m), w.setUTCHours(0, 0, 0, 0);
9996
+ w.setUTCFullYear(h + 1, 0, p), w.setUTCHours(0, 0, 0, 0);
9996
9997
  var x = xr(w, t), k = /* @__PURE__ */ new Date(0);
9997
- k.setUTCFullYear(h, 0, m), k.setUTCHours(0, 0, 0, 0);
9998
+ k.setUTCFullYear(h, 0, p), k.setUTCHours(0, 0, 0, 0);
9998
9999
  var y = xr(k, t);
9999
10000
  return u.getTime() >= x.getTime() ? h + 1 : u.getTime() >= y.getTime() ? h : h - 1;
10000
10001
  }
10001
10002
  function gg(e, t) {
10002
10003
  var r, n, a, o, i, c, l, A;
10003
10004
  M(1, arguments);
10004
- var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : u.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1), p = eo(e, t), m = /* @__PURE__ */ new Date(0);
10005
- m.setUTCFullYear(p, 0, h), m.setUTCHours(0, 0, 0, 0);
10006
- var w = xr(m, t);
10005
+ var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : u.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1), m = eo(e, t), p = /* @__PURE__ */ new Date(0);
10006
+ p.setUTCFullYear(m, 0, h), p.setUTCHours(0, 0, 0, 0);
10007
+ var w = xr(p, t);
10007
10008
  return w;
10008
10009
  }
10009
10010
  var wg = 6048e5;
@@ -11118,12 +11119,12 @@ var A0 = {
11118
11119
  const Xr = A0;
11119
11120
  var c0 = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, u0 = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, d0 = /^'([^]*?)'?$/, h0 = /''/g, f0 = /[a-zA-Z]/;
11120
11121
  function fA(e, t, r) {
11121
- var n, a, o, i, c, l, A, u, h, p, m, w, x, k, y, I, C, R;
11122
+ var n, a, o, i, c, l, A, u, h, m, p, w, x, k, y, I, C, R;
11122
11123
  M(2, arguments);
11123
- var U = String(t), O = at(), F = (n = (a = r == null ? void 0 : r.locale) !== null && a !== void 0 ? a : O.locale) !== null && n !== void 0 ? n : Xr, Y = _((o = (i = (c = (l = r == null ? void 0 : r.firstWeekContainsDate) !== null && l !== void 0 ? l : r == null || (A = r.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && c !== void 0 ? c : O.firstWeekContainsDate) !== null && i !== void 0 ? i : (h = O.locale) === null || h === void 0 || (p = h.options) === null || p === void 0 ? void 0 : p.firstWeekContainsDate) !== null && o !== void 0 ? o : 1);
11124
+ var U = String(t), O = at(), F = (n = (a = r == null ? void 0 : r.locale) !== null && a !== void 0 ? a : O.locale) !== null && n !== void 0 ? n : Xr, Y = _((o = (i = (c = (l = r == null ? void 0 : r.firstWeekContainsDate) !== null && l !== void 0 ? l : r == null || (A = r.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && c !== void 0 ? c : O.firstWeekContainsDate) !== null && i !== void 0 ? i : (h = O.locale) === null || h === void 0 || (m = h.options) === null || m === void 0 ? void 0 : m.firstWeekContainsDate) !== null && o !== void 0 ? o : 1);
11124
11125
  if (!(Y >= 1 && Y <= 7))
11125
11126
  throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
11126
- var X = _((m = (w = (x = (k = r == null ? void 0 : r.weekStartsOn) !== null && k !== void 0 ? k : r == null || (y = r.locale) === null || y === void 0 || (I = y.options) === null || I === void 0 ? void 0 : I.weekStartsOn) !== null && x !== void 0 ? x : O.weekStartsOn) !== null && w !== void 0 ? w : (C = O.locale) === null || C === void 0 || (R = C.options) === null || R === void 0 ? void 0 : R.weekStartsOn) !== null && m !== void 0 ? m : 0);
11127
+ var X = _((p = (w = (x = (k = r == null ? void 0 : r.weekStartsOn) !== null && k !== void 0 ? k : r == null || (y = r.locale) === null || y === void 0 || (I = y.options) === null || I === void 0 ? void 0 : I.weekStartsOn) !== null && x !== void 0 ? x : O.weekStartsOn) !== null && w !== void 0 ? w : (C = O.locale) === null || C === void 0 || (R = C.options) === null || R === void 0 ? void 0 : R.weekStartsOn) !== null && p !== void 0 ? p : 0);
11127
11128
  if (!(X >= 0 && X <= 6))
11128
11129
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
11129
11130
  if (!F.localize)
@@ -11189,27 +11190,27 @@ function pA(e, t, r) {
11189
11190
  comparison: c
11190
11191
  }), A, u;
11191
11192
  c > 0 ? (A = T(t), u = T(e)) : (A = T(e), u = T(t));
11192
- var h = Nr(u, A), p = (gt(u) - gt(A)) / 1e3, m = Math.round((h - p) / 60), w;
11193
- if (m < 2)
11194
- return r != null && r.includeSeconds ? h < 5 ? i.formatDistance("lessThanXSeconds", 5, l) : h < 10 ? i.formatDistance("lessThanXSeconds", 10, l) : h < 20 ? i.formatDistance("lessThanXSeconds", 20, l) : h < 40 ? i.formatDistance("halfAMinute", 0, l) : h < 60 ? i.formatDistance("lessThanXMinutes", 1, l) : i.formatDistance("xMinutes", 1, l) : m === 0 ? i.formatDistance("lessThanXMinutes", 1, l) : i.formatDistance("xMinutes", m, l);
11195
- if (m < 45)
11196
- return i.formatDistance("xMinutes", m, l);
11197
- if (m < 90)
11193
+ var h = Nr(u, A), m = (gt(u) - gt(A)) / 1e3, p = Math.round((h - m) / 60), w;
11194
+ if (p < 2)
11195
+ return r != null && r.includeSeconds ? h < 5 ? i.formatDistance("lessThanXSeconds", 5, l) : h < 10 ? i.formatDistance("lessThanXSeconds", 10, l) : h < 20 ? i.formatDistance("lessThanXSeconds", 20, l) : h < 40 ? i.formatDistance("halfAMinute", 0, l) : h < 60 ? i.formatDistance("lessThanXMinutes", 1, l) : i.formatDistance("xMinutes", 1, l) : p === 0 ? i.formatDistance("lessThanXMinutes", 1, l) : i.formatDistance("xMinutes", p, l);
11196
+ if (p < 45)
11197
+ return i.formatDistance("xMinutes", p, l);
11198
+ if (p < 90)
11198
11199
  return i.formatDistance("aboutXHours", 1, l);
11199
- if (m < Qi) {
11200
- var x = Math.round(m / 60);
11200
+ if (p < Qi) {
11201
+ var x = Math.round(p / 60);
11201
11202
  return i.formatDistance("aboutXHours", x, l);
11202
11203
  } else {
11203
- if (m < p0)
11204
+ if (p < p0)
11204
11205
  return i.formatDistance("xDays", 1, l);
11205
- if (m < Fa) {
11206
- var k = Math.round(m / Qi);
11206
+ if (p < Fa) {
11207
+ var k = Math.round(p / Qi);
11207
11208
  return i.formatDistance("xDays", k, l);
11208
- } else if (m < g0)
11209
- return w = Math.round(m / Fa), i.formatDistance("aboutXMonths", w, l);
11209
+ } else if (p < g0)
11210
+ return w = Math.round(p / Fa), i.formatDistance("aboutXMonths", w, l);
11210
11211
  }
11211
11212
  if (w = fa(u, A), w < 12) {
11212
- var y = Math.round(m / Fa);
11213
+ var y = Math.round(p / Fa);
11213
11214
  return i.formatDistance("xMonths", y, l);
11214
11215
  } else {
11215
11216
  var I = w % 12, C = Math.floor(w / 12);
@@ -11231,33 +11232,33 @@ function gA(e, t, r) {
11231
11232
  comparison: l
11232
11233
  }), u, h;
11233
11234
  l > 0 ? (u = T(t), h = T(e)) : (u = T(e), h = T(t));
11234
- var p = String((o = r == null ? void 0 : r.roundingMethod) !== null && o !== void 0 ? o : "round"), m;
11235
- if (p === "floor")
11236
- m = Math.floor;
11237
- else if (p === "ceil")
11238
- m = Math.ceil;
11239
- else if (p === "round")
11240
- m = Math.round;
11235
+ var m = String((o = r == null ? void 0 : r.roundingMethod) !== null && o !== void 0 ? o : "round"), p;
11236
+ if (m === "floor")
11237
+ p = Math.floor;
11238
+ else if (m === "ceil")
11239
+ p = Math.ceil;
11240
+ else if (m === "round")
11241
+ p = Math.round;
11241
11242
  else
11242
11243
  throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");
11243
11244
  var w = h.getTime() - u.getTime(), x = w / Ni, k = gt(h) - gt(u), y = (w - k) / Ni, I = r == null ? void 0 : r.unit, C;
11244
11245
  if (I ? C = String(I) : x < 1 ? C = "second" : x < 60 ? C = "minute" : x < _n ? C = "hour" : y < Hi ? C = "day" : y < Ui ? C = "month" : C = "year", C === "second") {
11245
- var R = m(w / 1e3);
11246
+ var R = p(w / 1e3);
11246
11247
  return c.formatDistance("xSeconds", R, A);
11247
11248
  } else if (C === "minute") {
11248
- var U = m(x);
11249
+ var U = p(x);
11249
11250
  return c.formatDistance("xMinutes", U, A);
11250
11251
  } else if (C === "hour") {
11251
- var O = m(x / 60);
11252
+ var O = p(x / 60);
11252
11253
  return c.formatDistance("xHours", O, A);
11253
11254
  } else if (C === "day") {
11254
- var F = m(y / _n);
11255
+ var F = p(y / _n);
11255
11256
  return c.formatDistance("xDays", F, A);
11256
11257
  } else if (C === "month") {
11257
- var Y = m(y / Hi);
11258
+ var Y = p(y / Hi);
11258
11259
  return Y === 12 && I !== "month" ? c.formatDistance("xYears", 1, A) : c.formatDistance("xMonths", Y, A);
11259
11260
  } else if (C === "year") {
11260
- var X = m(y / Ui);
11261
+ var X = p(y / Ui);
11261
11262
  return c.formatDistance("xYears", X, A);
11262
11263
  }
11263
11264
  throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'");
@@ -11276,13 +11277,13 @@ function k0(e, t) {
11276
11277
  var c = at(), l = (r = (n = t == null ? void 0 : t.locale) !== null && n !== void 0 ? n : c.locale) !== null && r !== void 0 ? r : Xr, A = (a = t == null ? void 0 : t.format) !== null && a !== void 0 ? a : v0, u = (o = t == null ? void 0 : t.zero) !== null && o !== void 0 ? o : !1, h = (i = t == null ? void 0 : t.delimiter) !== null && i !== void 0 ? i : " ";
11277
11278
  if (!l.formatDistance)
11278
11279
  return "";
11279
- var p = A.reduce(function(m, w) {
11280
+ var m = A.reduce(function(p, w) {
11280
11281
  var x = "x".concat(w.replace(/(^.)/, function(y) {
11281
11282
  return y.toUpperCase();
11282
11283
  })), k = e[w];
11283
- return typeof k == "number" && (u || e[w]) ? m.concat(l.formatDistance(x, k)) : m;
11284
+ return typeof k == "number" && (u || e[w]) ? p.concat(l.formatDistance(x, k)) : p;
11284
11285
  }, []).join(h);
11285
- return p;
11286
+ return m;
11286
11287
  }
11287
11288
  function b0(e, t) {
11288
11289
  var r, n;
@@ -11297,8 +11298,8 @@ function b0(e, t) {
11297
11298
  throw new RangeError("representation must be 'date', 'time', or 'complete'");
11298
11299
  var c = "", l = "", A = o === "extended" ? "-" : "", u = o === "extended" ? ":" : "";
11299
11300
  if (i !== "time") {
11300
- var h = le(a.getDate(), 2), p = le(a.getMonth() + 1, 2), m = le(a.getFullYear(), 4);
11301
- c = "".concat(m).concat(A).concat(p).concat(A).concat(h);
11301
+ var h = le(a.getDate(), 2), m = le(a.getMonth() + 1, 2), p = le(a.getFullYear(), 4);
11302
+ c = "".concat(p).concat(A).concat(m).concat(A).concat(h);
11302
11303
  }
11303
11304
  if (i !== "date") {
11304
11305
  var w = a.getTimezoneOffset();
@@ -11326,20 +11327,20 @@ function y0(e, t) {
11326
11327
  throw new RangeError("representation must be 'date', 'time', or 'complete'");
11327
11328
  var c = "", l = o === "extended" ? "-" : "", A = o === "extended" ? ":" : "";
11328
11329
  if (i !== "time") {
11329
- var u = le(a.getDate(), 2), h = le(a.getMonth() + 1, 2), p = le(a.getFullYear(), 4);
11330
- c = "".concat(p).concat(l).concat(h).concat(l).concat(u);
11330
+ var u = le(a.getDate(), 2), h = le(a.getMonth() + 1, 2), m = le(a.getFullYear(), 4);
11331
+ c = "".concat(m).concat(l).concat(h).concat(l).concat(u);
11331
11332
  }
11332
11333
  if (i !== "date") {
11333
- var m = le(a.getHours(), 2), w = le(a.getMinutes(), 2), x = le(a.getSeconds(), 2), k = c === "" ? "" : " ";
11334
- c = "".concat(c).concat(k).concat(m).concat(A).concat(w).concat(A).concat(x);
11334
+ var p = le(a.getHours(), 2), w = le(a.getMinutes(), 2), x = le(a.getSeconds(), 2), k = c === "" ? "" : " ";
11335
+ c = "".concat(c).concat(k).concat(p).concat(A).concat(w).concat(A).concat(x);
11335
11336
  }
11336
11337
  return c;
11337
11338
  }
11338
11339
  function E0(e) {
11339
11340
  if (M(1, arguments), Wt(e) !== "object")
11340
11341
  throw new Error("Duration must be an object");
11341
- var t = e.years, r = t === void 0 ? 0 : t, n = e.months, a = n === void 0 ? 0 : n, o = e.days, i = o === void 0 ? 0 : o, c = e.hours, l = c === void 0 ? 0 : c, A = e.minutes, u = A === void 0 ? 0 : A, h = e.seconds, p = h === void 0 ? 0 : h;
11342
- return "P".concat(r, "Y").concat(a, "M").concat(i, "DT").concat(l, "H").concat(u, "M").concat(p, "S");
11342
+ var t = e.years, r = t === void 0 ? 0 : t, n = e.months, a = n === void 0 ? 0 : n, o = e.days, i = o === void 0 ? 0 : o, c = e.hours, l = c === void 0 ? 0 : c, A = e.minutes, u = A === void 0 ? 0 : A, h = e.seconds, m = h === void 0 ? 0 : h;
11343
+ return "P".concat(r, "Y").concat(a, "M").concat(i, "DT").concat(l, "H").concat(u, "M").concat(m, "S");
11343
11344
  }
11344
11345
  function M0(e, t) {
11345
11346
  var r;
@@ -11353,8 +11354,8 @@ function M0(e, t) {
11353
11354
  throw new RangeError("fractionDigits must be between 0 and 3 inclusively");
11354
11355
  var o = le(n.getDate(), 2), i = le(n.getMonth() + 1, 2), c = n.getFullYear(), l = le(n.getHours(), 2), A = le(n.getMinutes(), 2), u = le(n.getSeconds(), 2), h = "";
11355
11356
  if (a > 0) {
11356
- var p = n.getMilliseconds(), m = Math.floor(p * Math.pow(10, a - 3));
11357
- h = "." + le(m, a);
11357
+ var m = n.getMilliseconds(), p = Math.floor(m * Math.pow(10, a - 3));
11358
+ h = "." + le(p, a);
11358
11359
  }
11359
11360
  var w = "", x = n.getTimezoneOffset();
11360
11361
  if (x !== 0) {
@@ -11375,25 +11376,25 @@ function J0(e) {
11375
11376
  return "".concat(r, ", ").concat(n, " ").concat(a, " ").concat(o, " ").concat(i, ":").concat(c, ":").concat(l, " GMT");
11376
11377
  }
11377
11378
  function T0(e, t, r) {
11378
- var n, a, o, i, c, l, A, u, h, p;
11379
+ var n, a, o, i, c, l, A, u, h, m;
11379
11380
  M(2, arguments);
11380
- var m = T(e), w = T(t), x = at(), k = (n = (a = r == null ? void 0 : r.locale) !== null && a !== void 0 ? a : x.locale) !== null && n !== void 0 ? n : Xr, y = _((o = (i = (c = (l = r == null ? void 0 : r.weekStartsOn) !== null && l !== void 0 ? l : r == null || (A = r.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && c !== void 0 ? c : x.weekStartsOn) !== null && i !== void 0 ? i : (h = x.locale) === null || h === void 0 || (p = h.options) === null || p === void 0 ? void 0 : p.weekStartsOn) !== null && o !== void 0 ? o : 0);
11381
+ var p = T(e), w = T(t), x = at(), k = (n = (a = r == null ? void 0 : r.locale) !== null && a !== void 0 ? a : x.locale) !== null && n !== void 0 ? n : Xr, y = _((o = (i = (c = (l = r == null ? void 0 : r.weekStartsOn) !== null && l !== void 0 ? l : r == null || (A = r.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && c !== void 0 ? c : x.weekStartsOn) !== null && i !== void 0 ? i : (h = x.locale) === null || h === void 0 || (m = h.options) === null || m === void 0 ? void 0 : m.weekStartsOn) !== null && o !== void 0 ? o : 0);
11381
11382
  if (!k.localize)
11382
11383
  throw new RangeError("locale must contain localize property");
11383
11384
  if (!k.formatLong)
11384
11385
  throw new RangeError("locale must contain formatLong property");
11385
11386
  if (!k.formatRelative)
11386
11387
  throw new RangeError("locale must contain formatRelative property");
11387
- var I = Bt(m, w);
11388
+ var I = Bt(p, w);
11388
11389
  if (isNaN(I))
11389
11390
  throw new RangeError("Invalid time value");
11390
11391
  var C;
11391
11392
  I < -6 ? C = "other" : I < -1 ? C = "lastWeek" : I < 0 ? C = "yesterday" : I < 1 ? C = "today" : I < 2 ? C = "tomorrow" : I < 7 ? C = "nextWeek" : C = "other";
11392
- var R = Lr(m, gt(m)), U = Lr(w, gt(w)), O = k.formatRelative(C, R, U, {
11393
+ var R = Lr(p, gt(p)), U = Lr(w, gt(w)), O = k.formatRelative(C, R, U, {
11393
11394
  locale: k,
11394
11395
  weekStartsOn: y
11395
11396
  });
11396
- return fA(m, O, {
11397
+ return fA(p, O, {
11397
11398
  locale: k,
11398
11399
  weekStartsOn: y
11399
11400
  });
@@ -11506,22 +11507,22 @@ function Z0(e) {
11506
11507
  function EA(e, t) {
11507
11508
  var r, n, a, o, i, c, l, A;
11508
11509
  M(1, arguments);
11509
- var u = T(e), h = u.getFullYear(), p = at(), m = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : p.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = p.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1);
11510
- if (!(m >= 1 && m <= 7))
11510
+ var u = T(e), h = u.getFullYear(), m = at(), p = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : m.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = m.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1);
11511
+ if (!(p >= 1 && p <= 7))
11511
11512
  throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
11512
11513
  var w = /* @__PURE__ */ new Date(0);
11513
- w.setFullYear(h + 1, 0, m), w.setHours(0, 0, 0, 0);
11514
+ w.setFullYear(h + 1, 0, p), w.setHours(0, 0, 0, 0);
11514
11515
  var x = Mt(w, t), k = /* @__PURE__ */ new Date(0);
11515
- k.setFullYear(h, 0, m), k.setHours(0, 0, 0, 0);
11516
+ k.setFullYear(h, 0, p), k.setHours(0, 0, 0, 0);
11516
11517
  var y = Mt(k, t);
11517
11518
  return u.getTime() >= x.getTime() ? h + 1 : u.getTime() >= y.getTime() ? h : h - 1;
11518
11519
  }
11519
11520
  function $n(e, t) {
11520
11521
  var r, n, a, o, i, c, l, A;
11521
11522
  M(1, arguments);
11522
- var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : u.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1), p = EA(e, t), m = /* @__PURE__ */ new Date(0);
11523
- m.setFullYear(p, 0, h), m.setHours(0, 0, 0, 0);
11524
- var w = Mt(m, t);
11523
+ var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.firstWeekContainsDate) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.firstWeekContainsDate) !== null && a !== void 0 ? a : u.firstWeekContainsDate) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.firstWeekContainsDate) !== null && r !== void 0 ? r : 1), m = EA(e, t), p = /* @__PURE__ */ new Date(0);
11524
+ p.setFullYear(m, 0, h), p.setHours(0, 0, 0, 0);
11525
+ var w = Mt(p, t);
11525
11526
  return w;
11526
11527
  }
11527
11528
  var G0 = 6048e5;
@@ -11536,12 +11537,12 @@ function K0(e, t) {
11536
11537
  var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.weekStartsOn) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.weekStartsOn) !== null && r !== void 0 ? r : 0);
11537
11538
  if (!(h >= 0 && h <= 6))
11538
11539
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
11539
- var p = wA(e);
11540
- if (isNaN(p))
11540
+ var m = wA(e);
11541
+ if (isNaN(m))
11541
11542
  return NaN;
11542
- var m = pa(ma(e)), w = h - m;
11543
+ var p = pa(ma(e)), w = h - p;
11543
11544
  w <= 0 && (w += 7);
11544
- var x = p - w;
11545
+ var x = m - w;
11545
11546
  return Math.ceil(x / 7) + 1;
11546
11547
  }
11547
11548
  function SA(e) {
@@ -12480,11 +12481,11 @@ var Mw = /* @__PURE__ */ function(e) {
12480
12481
  function ro(e, t, r) {
12481
12482
  var n, a, o, i, c, l, A, u;
12482
12483
  M(2, arguments);
12483
- var h = at(), p = _((n = (a = (o = (i = r == null ? void 0 : r.weekStartsOn) !== null && i !== void 0 ? i : r == null || (c = r.locale) === null || c === void 0 || (l = c.options) === null || l === void 0 ? void 0 : l.weekStartsOn) !== null && o !== void 0 ? o : h.weekStartsOn) !== null && a !== void 0 ? a : (A = h.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && n !== void 0 ? n : 0);
12484
- if (!(p >= 0 && p <= 6))
12484
+ var h = at(), m = _((n = (a = (o = (i = r == null ? void 0 : r.weekStartsOn) !== null && i !== void 0 ? i : r == null || (c = r.locale) === null || c === void 0 || (l = c.options) === null || l === void 0 ? void 0 : l.weekStartsOn) !== null && o !== void 0 ? o : h.weekStartsOn) !== null && a !== void 0 ? a : (A = h.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && n !== void 0 ? n : 0);
12485
+ if (!(m >= 0 && m <= 6))
12485
12486
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
12486
- var m = T(e), w = _(t), x = m.getUTCDay(), k = w % 7, y = (k + 7) % 7, I = (y < p ? 7 : 0) + w - x;
12487
- return m.setUTCDate(m.getUTCDate() + I), m;
12487
+ var p = T(e), w = _(t), x = p.getUTCDay(), k = w % 7, y = (k + 7) % 7, I = (y < m ? 7 : 0) + w - x;
12488
+ return p.setUTCDate(p.getUTCDate() + I), p;
12488
12489
  }
12489
12490
  var Cw = /* @__PURE__ */ function(e) {
12490
12491
  Se(r, e);
@@ -13322,12 +13323,12 @@ var Ow = /* @__PURE__ */ function(e) {
13322
13323
  T: new Xw()
13323
13324
  }, qw = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Vw = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, _w = /^'([^]*?)'?$/, $w = /''/g, ex = /\S/, tx = /[a-zA-Z]/;
13324
13325
  function DA(e, t, r, n) {
13325
- var a, o, i, c, l, A, u, h, p, m, w, x, k, y, I, C, R, U;
13326
+ var a, o, i, c, l, A, u, h, m, p, w, x, k, y, I, C, R, U;
13326
13327
  M(3, arguments);
13327
13328
  var O = String(e), F = String(t), Y = at(), X = (a = (o = n == null ? void 0 : n.locale) !== null && o !== void 0 ? o : Y.locale) !== null && a !== void 0 ? a : Xr;
13328
13329
  if (!X.match)
13329
13330
  throw new RangeError("locale must contain match property");
13330
- var z = _((i = (c = (l = (A = n == null ? void 0 : n.firstWeekContainsDate) !== null && A !== void 0 ? A : n == null || (u = n.locale) === null || u === void 0 || (h = u.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && l !== void 0 ? l : Y.firstWeekContainsDate) !== null && c !== void 0 ? c : (p = Y.locale) === null || p === void 0 || (m = p.options) === null || m === void 0 ? void 0 : m.firstWeekContainsDate) !== null && i !== void 0 ? i : 1);
13331
+ var z = _((i = (c = (l = (A = n == null ? void 0 : n.firstWeekContainsDate) !== null && A !== void 0 ? A : n == null || (u = n.locale) === null || u === void 0 || (h = u.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && l !== void 0 ? l : Y.firstWeekContainsDate) !== null && c !== void 0 ? c : (m = Y.locale) === null || m === void 0 || (p = m.options) === null || p === void 0 ? void 0 : p.firstWeekContainsDate) !== null && i !== void 0 ? i : 1);
13331
13332
  if (!(z >= 1 && z <= 7))
13332
13333
  throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
13333
13334
  var j = _((w = (x = (k = (y = n == null ? void 0 : n.weekStartsOn) !== null && y !== void 0 ? y : n == null || (I = n.locale) === null || I === void 0 || (C = I.options) === null || C === void 0 ? void 0 : C.weekStartsOn) !== null && k !== void 0 ? k : Y.weekStartsOn) !== null && x !== void 0 ? x : (R = Y.locale) === null || R === void 0 || (U = R.options) === null || U === void 0 ? void 0 : U.weekStartsOn) !== null && w !== void 0 ? w : 0);
@@ -13560,8 +13561,8 @@ function BA(e, t) {
13560
13561
  var u = at(), h = _((r = (n = (a = (o = t == null ? void 0 : t.weekStartsOn) !== null && o !== void 0 ? o : t == null || (i = t.locale) === null || i === void 0 || (c = i.options) === null || c === void 0 ? void 0 : c.weekStartsOn) !== null && a !== void 0 ? a : u.weekStartsOn) !== null && n !== void 0 ? n : (l = u.locale) === null || l === void 0 || (A = l.options) === null || A === void 0 ? void 0 : A.weekStartsOn) !== null && r !== void 0 ? r : 0);
13561
13562
  if (!(h >= 0 && h <= 6))
13562
13563
  throw new RangeError("weekStartsOn must be between 0 and 6");
13563
- var p = T(e), m = p.getDay(), w = (m < h ? -7 : 0) + 6 - (m - h);
13564
- return p.setHours(0, 0, 0, 0), p.setDate(p.getDate() + w), p;
13564
+ var m = T(e), p = m.getDay(), w = (p < h ? -7 : 0) + 6 - (p - h);
13565
+ return m.setHours(0, 0, 0, 0), m.setDate(m.getDate() + w), m;
13565
13566
  }
13566
13567
  function yx(e) {
13567
13568
  return M(1, arguments), BA(e, {
@@ -13883,11 +13884,11 @@ function Sv(e, t) {
13883
13884
  function Iv(e, t, r) {
13884
13885
  var n, a, o, i, c, l, A, u;
13885
13886
  M(2, arguments);
13886
- var h = at(), p = _((n = (a = (o = (i = r == null ? void 0 : r.weekStartsOn) !== null && i !== void 0 ? i : r == null || (c = r.locale) === null || c === void 0 || (l = c.options) === null || l === void 0 ? void 0 : l.weekStartsOn) !== null && o !== void 0 ? o : h.weekStartsOn) !== null && a !== void 0 ? a : (A = h.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && n !== void 0 ? n : 0);
13887
- if (!(p >= 0 && p <= 6))
13887
+ var h = at(), m = _((n = (a = (o = (i = r == null ? void 0 : r.weekStartsOn) !== null && i !== void 0 ? i : r == null || (c = r.locale) === null || c === void 0 || (l = c.options) === null || l === void 0 ? void 0 : l.weekStartsOn) !== null && o !== void 0 ? o : h.weekStartsOn) !== null && a !== void 0 ? a : (A = h.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && n !== void 0 ? n : 0);
13888
+ if (!(m >= 0 && m <= 6))
13888
13889
  throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
13889
- var m = T(e), w = _(t), x = m.getDay(), k = w % 7, y = (k + 7) % 7, I = 7 - p, C = w < 0 || w > 6 ? w - (x + I) % 7 : (y + I) % 7 - (x + I) % 7;
13890
- return Lt(m, C);
13890
+ var p = T(e), w = _(t), x = p.getDay(), k = w % 7, y = (k + 7) % 7, I = 7 - m, C = w < 0 || w > 6 ? w - (x + I) % 7 : (y + I) % 7 - (x + I) % 7;
13891
+ return Lt(p, C);
13891
13892
  }
13892
13893
  function Jv(e, t) {
13893
13894
  M(2, arguments);
@@ -13946,8 +13947,8 @@ function Hv(e, t, r) {
13946
13947
  function Uv(e, t, r) {
13947
13948
  var n, a, o, i, c, l, A, u;
13948
13949
  M(2, arguments);
13949
- var h = at(), p = _((n = (a = (o = (i = r == null ? void 0 : r.firstWeekContainsDate) !== null && i !== void 0 ? i : r == null || (c = r.locale) === null || c === void 0 || (l = c.options) === null || l === void 0 ? void 0 : l.firstWeekContainsDate) !== null && o !== void 0 ? o : h.firstWeekContainsDate) !== null && a !== void 0 ? a : (A = h.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && n !== void 0 ? n : 1), m = T(e), w = _(t), x = Bt(m, $n(m, r)), k = /* @__PURE__ */ new Date(0);
13950
- return k.setFullYear(w, 0, p), k.setHours(0, 0, 0, 0), m = $n(k, r), m.setDate(m.getDate() + x), m;
13950
+ var h = at(), m = _((n = (a = (o = (i = r == null ? void 0 : r.firstWeekContainsDate) !== null && i !== void 0 ? i : r == null || (c = r.locale) === null || c === void 0 || (l = c.options) === null || l === void 0 ? void 0 : l.firstWeekContainsDate) !== null && o !== void 0 ? o : h.firstWeekContainsDate) !== null && a !== void 0 ? a : (A = h.locale) === null || A === void 0 || (u = A.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && n !== void 0 ? n : 1), p = T(e), w = _(t), x = Bt(p, $n(p, r)), k = /* @__PURE__ */ new Date(0);
13951
+ return k.setFullYear(w, 0, m), k.setHours(0, 0, 0, 0), p = $n(k, r), p.setDate(p.getDate() + x), p;
13951
13952
  }
13952
13953
  function Bv(e, t) {
13953
13954
  M(2, arguments);
@@ -13978,7 +13979,7 @@ function zA(e, t) {
13978
13979
  function Fv(e, t) {
13979
13980
  if (M(2, arguments), !t || Wt(t) !== "object")
13980
13981
  return /* @__PURE__ */ new Date(NaN);
13981
- var r = t.years ? _(t.years) : 0, n = t.months ? _(t.months) : 0, a = t.weeks ? _(t.weeks) : 0, o = t.days ? _(t.days) : 0, i = t.hours ? _(t.hours) : 0, c = t.minutes ? _(t.minutes) : 0, l = t.seconds ? _(t.seconds) : 0, A = zA(e, n + r * 12), u = ga(A, o + a * 7), h = c + i * 60, p = l + h * 60, m = p * 1e3, w = new Date(u.getTime() - m);
13982
+ var r = t.years ? _(t.years) : 0, n = t.months ? _(t.months) : 0, a = t.weeks ? _(t.weeks) : 0, o = t.days ? _(t.days) : 0, i = t.hours ? _(t.hours) : 0, c = t.minutes ? _(t.minutes) : 0, l = t.seconds ? _(t.seconds) : 0, A = zA(e, n + r * 12), u = ga(A, o + a * 7), h = c + i * 60, m = l + h * 60, p = m * 1e3, w = new Date(u.getTime() - p);
13982
13983
  return w;
13983
13984
  }
13984
13985
  function Zv(e, t) {
@@ -14334,10 +14335,10 @@ function A1() {
14334
14335
  var e = 1e3, t = e * 60, r = t * 60, n = r * 24, a = n * 7, o = n * 365.25;
14335
14336
  Ga = function(u, h) {
14336
14337
  h = h || {};
14337
- var p = typeof u;
14338
- if (p === "string" && u.length > 0)
14338
+ var m = typeof u;
14339
+ if (m === "string" && u.length > 0)
14339
14340
  return i(u);
14340
- if (p === "number" && isFinite(u))
14341
+ if (m === "number" && isFinite(u))
14341
14342
  return h.long ? l(u) : c(u);
14342
14343
  throw new Error(
14343
14344
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(u)
@@ -14349,46 +14350,46 @@ function A1() {
14349
14350
  u
14350
14351
  );
14351
14352
  if (h) {
14352
- var p = parseFloat(h[1]), m = (h[2] || "ms").toLowerCase();
14353
- switch (m) {
14353
+ var m = parseFloat(h[1]), p = (h[2] || "ms").toLowerCase();
14354
+ switch (p) {
14354
14355
  case "years":
14355
14356
  case "year":
14356
14357
  case "yrs":
14357
14358
  case "yr":
14358
14359
  case "y":
14359
- return p * o;
14360
+ return m * o;
14360
14361
  case "weeks":
14361
14362
  case "week":
14362
14363
  case "w":
14363
- return p * a;
14364
+ return m * a;
14364
14365
  case "days":
14365
14366
  case "day":
14366
14367
  case "d":
14367
- return p * n;
14368
+ return m * n;
14368
14369
  case "hours":
14369
14370
  case "hour":
14370
14371
  case "hrs":
14371
14372
  case "hr":
14372
14373
  case "h":
14373
- return p * r;
14374
+ return m * r;
14374
14375
  case "minutes":
14375
14376
  case "minute":
14376
14377
  case "mins":
14377
14378
  case "min":
14378
14379
  case "m":
14379
- return p * t;
14380
+ return m * t;
14380
14381
  case "seconds":
14381
14382
  case "second":
14382
14383
  case "secs":
14383
14384
  case "sec":
14384
14385
  case "s":
14385
- return p * e;
14386
+ return m * e;
14386
14387
  case "milliseconds":
14387
14388
  case "millisecond":
14388
14389
  case "msecs":
14389
14390
  case "msec":
14390
14391
  case "ms":
14391
- return p;
14392
+ return m;
14392
14393
  default:
14393
14394
  return;
14394
14395
  }
@@ -14403,9 +14404,9 @@ function A1() {
14403
14404
  var h = Math.abs(u);
14404
14405
  return h >= n ? A(u, h, n, "day") : h >= r ? A(u, h, r, "hour") : h >= t ? A(u, h, t, "minute") : h >= e ? A(u, h, e, "second") : u + " ms";
14405
14406
  }
14406
- function A(u, h, p, m) {
14407
- var w = h >= p * 1.5;
14408
- return Math.round(u / p) + " " + m + (w ? "s" : "");
14407
+ function A(u, h, m, p) {
14408
+ var w = h >= m * 1.5;
14409
+ return Math.round(u / m) + " " + p + (w ? "s" : "");
14409
14410
  }
14410
14411
  return Ga;
14411
14412
  }
@@ -14415,13 +14416,13 @@ function c1(e) {
14415
14416
  }), r.names = [], r.skips = [], r.formatters = {};
14416
14417
  function t(u) {
14417
14418
  let h = 0;
14418
- for (let p = 0; p < u.length; p++)
14419
- h = (h << 5) - h + u.charCodeAt(p), h |= 0;
14419
+ for (let m = 0; m < u.length; m++)
14420
+ h = (h << 5) - h + u.charCodeAt(m), h |= 0;
14420
14421
  return r.colors[Math.abs(h) % r.colors.length];
14421
14422
  }
14422
14423
  r.selectColor = t;
14423
14424
  function r(u) {
14424
- let h, p = null, m, w;
14425
+ let h, m = null, p, w;
14425
14426
  function x(...k) {
14426
14427
  if (!x.enabled)
14427
14428
  return;
@@ -14443,22 +14444,22 @@ function c1(e) {
14443
14444
  return x.namespace = u, x.useColors = r.useColors(), x.color = r.selectColor(u), x.extend = n, x.destroy = r.destroy, Object.defineProperty(x, "enabled", {
14444
14445
  enumerable: !0,
14445
14446
  configurable: !1,
14446
- get: () => p !== null ? p : (m !== r.namespaces && (m = r.namespaces, w = r.enabled(u)), w),
14447
+ get: () => m !== null ? m : (p !== r.namespaces && (p = r.namespaces, w = r.enabled(u)), w),
14447
14448
  set: (k) => {
14448
- p = k;
14449
+ m = k;
14449
14450
  }
14450
14451
  }), typeof r.init == "function" && r.init(x), x;
14451
14452
  }
14452
14453
  function n(u, h) {
14453
- const p = r(this.namespace + (typeof h > "u" ? ":" : h) + u);
14454
- return p.log = this.log, p;
14454
+ const m = r(this.namespace + (typeof h > "u" ? ":" : h) + u);
14455
+ return m.log = this.log, m;
14455
14456
  }
14456
14457
  function a(u) {
14457
14458
  r.save(u), r.namespaces = u, r.names = [], r.skips = [];
14458
14459
  let h;
14459
- const p = (typeof u == "string" ? u : "").split(/[\s,]+/), m = p.length;
14460
- for (h = 0; h < m; h++)
14461
- p[h] && (u = p[h].replace(/\*/g, ".*?"), u[0] === "-" ? r.skips.push(new RegExp("^" + u.slice(1) + "$")) : r.names.push(new RegExp("^" + u + "$")));
14460
+ const m = (typeof u == "string" ? u : "").split(/[\s,]+/), p = m.length;
14461
+ for (h = 0; h < p; h++)
14462
+ m[h] && (u = m[h].replace(/\*/g, ".*?"), u[0] === "-" ? r.skips.push(new RegExp("^" + u.slice(1) + "$")) : r.names.push(new RegExp("^" + u + "$")));
14462
14463
  }
14463
14464
  function o() {
14464
14465
  const u = [
@@ -14470,11 +14471,11 @@ function c1(e) {
14470
14471
  function i(u) {
14471
14472
  if (u[u.length - 1] === "*")
14472
14473
  return !0;
14473
- let h, p;
14474
- for (h = 0, p = r.skips.length; h < p; h++)
14474
+ let h, m;
14475
+ for (h = 0, m = r.skips.length; h < m; h++)
14475
14476
  if (r.skips[h].test(u))
14476
14477
  return !1;
14477
- for (h = 0, p = r.names.length; h < p; h++)
14478
+ for (h = 0, m = r.names.length; h < m; h++)
14478
14479
  if (r.names[h].test(u))
14479
14480
  return !0;
14480
14481
  return !1;
@@ -14588,8 +14589,8 @@ var u1 = c1;
14588
14589
  const A = "color: " + this.color;
14589
14590
  l.splice(1, 0, A, "color: inherit");
14590
14591
  let u = 0, h = 0;
14591
- l[0].replace(/%[a-zA-Z%]/g, (p) => {
14592
- p !== "%%" && (u++, p === "%c" && (h = u));
14592
+ l[0].replace(/%[a-zA-Z%]/g, (m) => {
14593
+ m !== "%%" && (u++, m === "%c" && (h = u));
14593
14594
  }), l.splice(h, 0, A);
14594
14595
  }
14595
14596
  t.log = console.debug || console.log || (() => {
@@ -14749,10 +14750,10 @@ class m1 {
14749
14750
  const l = Be.every(i.map((h) => h.operator), (h) => nn(h)), A = l ? dt.$nin : dt.$in, u = ["whereNull", "whereNotNull"].includes(c.whereType) ? "andWhere" : ["orWhereNull", "orWhereNotNull"].includes(c.whereType) ? "orWhere" : c.whereType;
14750
14751
  t[u](`${this.tableName}.id`, A, function() {
14751
14752
  const h = a[o].joinFilterStatements;
14752
- let p = c.config.tableName, m = `${c.config.tableName}.${c.config.joinToForeign || "id"}`;
14753
- c.config.tableNameAs && (p = `${c.config.tableName} as ${c.config.tableNameAs}`, m = `${c.config.tableNameAs}.${c.config.joinToForeign || "id"}`);
14754
- const w = c.config.joinType || "innerJoin", x = this.select(`${c.config.joinTable}.${c.config.joinFrom}`).from(`${c.config.joinTable}`)[w](p, function() {
14755
- this.on(m, "=", `${c.config.joinTable}.${c.config.joinTo}`), Be.each(h, (k) => {
14753
+ let m = c.config.tableName, p = `${c.config.tableName}.${c.config.joinToForeign || "id"}`;
14754
+ c.config.tableNameAs && (m = `${c.config.tableName} as ${c.config.tableNameAs}`, p = `${c.config.tableNameAs}.${c.config.joinToForeign || "id"}`);
14755
+ const w = c.config.joinType || "innerJoin", x = this.select(`${c.config.joinTable}.${c.config.joinFrom}`).from(`${c.config.joinTable}`)[w](m, function() {
14756
+ this.on(p, "=", `${c.config.joinTable}.${c.config.joinTo}`), Be.each(h, (k) => {
14756
14757
  this.andOn(`${k.joinTable}.${k.column}`, dt[k.operator], k.value);
14757
14758
  });
14758
14759
  });
@@ -14769,13 +14770,13 @@ class m1 {
14769
14770
  nt(`one of ${o} group statements contains unknown operator`);
14770
14771
  else if (c.config.type === "oneToOne")
14771
14772
  if (Be.every(i.map((l) => l.operator), Ka)) {
14772
- const l = Be.every(i.map((p) => p.operator), (p) => nn(p)), A = l ? dt.$nin : dt.$in, u = this.tableName, h = c.whereType === "orWhere" ? "orWhere" : "where";
14773
+ const l = Be.every(i.map((m) => m.operator), (m) => nn(m)), A = l ? dt.$nin : dt.$in, u = this.tableName, h = c.whereType === "orWhere" ? "orWhere" : "where";
14773
14774
  t[h](`${this.tableName}.id`, A, function() {
14774
- const p = a[o].joinFilterStatements;
14775
- let m = c.config.tableName, w = `${c.config.tableName}.${c.config.joinFrom}`;
14776
- c.config.tableNameAs && (m = `${c.config.tableName} as ${c.config.tableNameAs}`, w = `${c.config.tableNameAs}.${c.config.joinFrom}`);
14777
- const x = this.select(`${u}.id`).from(`${u}`).leftJoin(m, function() {
14778
- this.on(w, "=", `${u}.id`), Be.each(p, (k) => {
14775
+ const m = a[o].joinFilterStatements;
14776
+ let p = c.config.tableName, w = `${c.config.tableName}.${c.config.joinFrom}`;
14777
+ c.config.tableNameAs && (p = `${c.config.tableName} as ${c.config.tableNameAs}`, w = `${c.config.tableNameAs}.${c.config.joinFrom}`);
14778
+ const x = this.select(`${u}.id`).from(`${u}`).leftJoin(p, function() {
14779
+ this.on(w, "=", `${u}.id`), Be.each(m, (k) => {
14779
14780
  this.andOn(`${k.joinTable}.${k.column}`, dt[k.operator], k.value);
14780
14781
  });
14781
14782
  });
@@ -14814,8 +14815,8 @@ class m1 {
14814
14815
  }
14815
14816
  const u = l.column;
14816
14817
  if (a = l.operator, o = l.value, a === "$regex" || a === "$not") {
14817
- const { source: h, ignoreCase: p } = f1(o);
14818
- if (o = h, p) {
14818
+ const { source: h, ignoreCase: m } = f1(o);
14819
+ if (o = h, m) {
14819
14820
  A += "Raw", nt(`(buildComparison) whereType: ${A}, statement: ${n}, op: ${a}, comp: ${c}, value: ${o} (REGEX/i)`), t[A](`lower(??) ${c} ? ESCAPE ?`, [u, o, fr]);
14820
14821
  return;
14821
14822
  }
@@ -15101,13 +15102,13 @@ const H1 = ({ settings: e, url: t }) => {
15101
15102
  mode: "cors",
15102
15103
  credentials: "include"
15103
15104
  }).then((o) => o.text()).then((o) => {
15104
- var m, w, x;
15105
+ var p, w, x;
15105
15106
  const i = "html { pointer-events: none; }", l = new DOMParser().parseFromString(o, "text/html"), A = l.querySelector("style"), u = A == null ? void 0 : A.innerHTML;
15106
15107
  u ? A.innerHTML = `${u}
15107
15108
 
15108
15109
  ${i}` : l.head.innerHTML += `<style>${i}</style>`;
15109
- let p = (l.doctype ? new XMLSerializer().serializeToString(l.doctype) : "") + l.documentElement.outerHTML;
15110
- (m = a.contentDocument) == null || m.open(), (w = a.contentDocument) == null || w.write(p), (x = a.contentDocument) == null || x.close();
15110
+ let m = (l.doctype ? new XMLSerializer().serializeToString(l.doctype) : "") + l.documentElement.outerHTML;
15111
+ (p = a.contentDocument) == null || p.open(), (w = a.contentDocument) == null || w.write(m), (x = a.contentDocument) == null || x.close();
15111
15112
  });
15112
15113
  }, [r, t]);
15113
15114
  return /* @__PURE__ */ s.jsx(
@@ -15215,7 +15216,7 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
15215
15216
  onTabChange: a,
15216
15217
  handleSave: o
15217
15218
  }) => {
15218
- const { updateRoute: i } = ye(), [c, l] = G("brand"), { data: { themes: A } = {} } = Nl(), u = vn().getParam("ref"), h = A == null ? void 0 : A.find((w) => w.active), p = [
15219
+ const { updateRoute: i } = ye(), [c, l] = G("brand"), { data: { themes: A } = {} } = Nl(), u = vn().getParam("ref"), h = A == null ? void 0 : A.find((w) => w.active), m = [
15219
15220
  {
15220
15221
  id: "brand",
15221
15222
  title: "Brand",
@@ -15226,11 +15227,11 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
15226
15227
  title: x,
15227
15228
  contents: /* @__PURE__ */ s.jsx(B1, { settings: k, updateSetting: n })
15228
15229
  }))
15229
- ], m = (w) => {
15230
+ ], p = (w) => {
15230
15231
  l(w), a(w);
15231
15232
  };
15232
15233
  return /* @__PURE__ */ s.jsxs("div", { className: "flex h-full flex-col justify-between", children: [
15233
- /* @__PURE__ */ s.jsx("div", { className: "p-7", "data-testid": "design-setting-tabs", children: /* @__PURE__ */ s.jsx(pr, { selectedTab: c, tabs: p, onTabChange: m }) }),
15234
+ /* @__PURE__ */ s.jsx("div", { className: "p-7", "data-testid": "design-setting-tabs", children: /* @__PURE__ */ s.jsx(pr, { selectedTab: c, tabs: m, onTabChange: p }) }),
15234
15235
  /* @__PURE__ */ s.jsx(Al, { height: 74, children: /* @__PURE__ */ s.jsx("div", { className: "w-full px-7", children: /* @__PURE__ */ s.jsxs("button", { className: "group flex w-full items-center justify-between text-sm font-medium opacity-80 transition-all hover:opacity-100", "data-testid": "change-theme", type: "button", onClick: async () => {
15235
15236
  await o(), i(u ? `design/change-theme?ref=${u}` : "design/change-theme");
15236
15237
  }, children: [
@@ -15256,8 +15257,8 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
15256
15257
  }
15257
15258
  }), { data: a } = Hm(), { mutateAsync: o } = Um(), i = je(), [c, l] = G("homepage"), { updateRoute: A } = ye(), u = vn().getParam("ref"), {
15258
15259
  formState: h,
15259
- saveState: p,
15260
- handleSave: m,
15260
+ saveState: m,
15261
+ handleSave: p,
15261
15262
  updateForm: w,
15262
15263
  setFormState: x,
15263
15264
  okProps: k
@@ -15337,7 +15338,7 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
15337
15338
  L1,
15338
15339
  {
15339
15340
  brandSettings: { description: C, accentColor: R, icon: U, logo: O, coverImage: F },
15340
- handleSave: m,
15341
+ handleSave: p,
15341
15342
  themeSettingSections: X,
15342
15343
  updateBrandSetting: y,
15343
15344
  updateThemeSetting: I,
@@ -15353,7 +15354,7 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
15353
15354
  buttonsDisabled: k.disabled,
15354
15355
  cancelLabel: "Close",
15355
15356
  defaultTab: "homepage",
15356
- dirty: p === "unsaved",
15357
+ dirty: m === "unsaved",
15357
15358
  okColor: k.color,
15358
15359
  okLabel: k.label || "Save",
15359
15360
  preview: L,
@@ -15366,7 +15367,7 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
15366
15367
  testId: "design-modal",
15367
15368
  title: "Design",
15368
15369
  onOk: async () => {
15369
- await m({ fakeWhenUnchanged: !0 });
15370
+ await p({ fakeWhenUnchanged: !0 });
15370
15371
  },
15371
15372
  onSelectURL: j
15372
15373
  }
@@ -15423,8 +15424,8 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
15423
15424
  setCustomColor: u,
15424
15425
  isCopied: h
15425
15426
  }) => {
15426
- const { loadData: p } = cl({ path: "/labels/", filterKey: "name", responseKey: "labels" }), m = async (w, x) => {
15427
- const k = await p(w);
15427
+ const { loadData: m } = cl({ path: "/labels/", filterKey: "name", responseKey: "labels" }), p = async (w, x) => {
15428
+ const k = await m(w);
15428
15429
  x(k.map((y) => ({ label: y.name, value: y.name })));
15429
15430
  };
15430
15431
  return /* @__PURE__ */ s.jsxs("div", { className: "flex h-[calc(100vh-16vmin)] max-h-[645px] flex-col justify-between overflow-y-scroll border-l border-grey-200 p-6 pb-0 dark:border-grey-900", children: [
@@ -15496,7 +15497,7 @@ ${i}` : l.head.innerHTML += `<style>${i}</style>`;
15496
15497
  bh,
15497
15498
  {
15498
15499
  hint: "Will be applied to all members signing up via this form",
15499
- loadOptions: xn(m, 500),
15500
+ loadOptions: xn(p, 500),
15500
15501
  placeholder: "Pick one or more labels (optional)",
15501
15502
  title: "Labels at signup",
15502
15503
  values: a || [],
@@ -15718,37 +15719,37 @@ var an = {
15718
15719
  }, a.get.rgb = function(c) {
15719
15720
  if (!c)
15720
15721
  return null;
15721
- var l = /^#([a-f0-9]{3,4})$/i, A = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i, u = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, h = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, p = /^(\w+)$/, m = [0, 0, 0, 1], w, x, k;
15722
+ var l = /^#([a-f0-9]{3,4})$/i, A = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i, u = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, h = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, m = /^(\w+)$/, p = [0, 0, 0, 1], w, x, k;
15722
15723
  if (w = c.match(A)) {
15723
15724
  for (k = w[2], w = w[1], x = 0; x < 3; x++) {
15724
15725
  var y = x * 2;
15725
- m[x] = parseInt(w.slice(y, y + 2), 16);
15726
+ p[x] = parseInt(w.slice(y, y + 2), 16);
15726
15727
  }
15727
- k && (m[3] = parseInt(k, 16) / 255);
15728
+ k && (p[3] = parseInt(k, 16) / 255);
15728
15729
  } else if (w = c.match(l)) {
15729
15730
  for (w = w[1], k = w[3], x = 0; x < 3; x++)
15730
- m[x] = parseInt(w[x] + w[x], 16);
15731
- k && (m[3] = parseInt(k + k, 16) / 255);
15731
+ p[x] = parseInt(w[x] + w[x], 16);
15732
+ k && (p[3] = parseInt(k + k, 16) / 255);
15732
15733
  } else if (w = c.match(u)) {
15733
15734
  for (x = 0; x < 3; x++)
15734
- m[x] = parseInt(w[x + 1], 0);
15735
- w[4] && (w[5] ? m[3] = parseFloat(w[4]) * 0.01 : m[3] = parseFloat(w[4]));
15735
+ p[x] = parseInt(w[x + 1], 0);
15736
+ w[4] && (w[5] ? p[3] = parseFloat(w[4]) * 0.01 : p[3] = parseFloat(w[4]));
15736
15737
  } else if (w = c.match(h)) {
15737
15738
  for (x = 0; x < 3; x++)
15738
- m[x] = Math.round(parseFloat(w[x + 1]) * 2.55);
15739
- w[4] && (w[5] ? m[3] = parseFloat(w[4]) * 0.01 : m[3] = parseFloat(w[4]));
15739
+ p[x] = Math.round(parseFloat(w[x + 1]) * 2.55);
15740
+ w[4] && (w[5] ? p[3] = parseFloat(w[4]) * 0.01 : p[3] = parseFloat(w[4]));
15740
15741
  } else
15741
- return (w = c.match(p)) ? w[1] === "transparent" ? [0, 0, 0, 0] : t.call(an, w[1]) ? (m = an[w[1]], m[3] = 1, m) : null : null;
15742
+ return (w = c.match(m)) ? w[1] === "transparent" ? [0, 0, 0, 0] : t.call(an, w[1]) ? (p = an[w[1]], p[3] = 1, p) : null : null;
15742
15743
  for (x = 0; x < 3; x++)
15743
- m[x] = o(m[x], 0, 255);
15744
- return m[3] = o(m[3], 0, 1), m;
15744
+ p[x] = o(p[x], 0, 255);
15745
+ return p[3] = o(p[3], 0, 1), p;
15745
15746
  }, a.get.hsl = function(c) {
15746
15747
  if (!c)
15747
15748
  return null;
15748
15749
  var l = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/, A = c.match(l);
15749
15750
  if (A) {
15750
- var u = parseFloat(A[4]), h = (parseFloat(A[1]) % 360 + 360) % 360, p = o(parseFloat(A[2]), 0, 100), m = o(parseFloat(A[3]), 0, 100), w = o(isNaN(u) ? 1 : u, 0, 1);
15751
- return [h, p, m, w];
15751
+ var u = parseFloat(A[4]), h = (parseFloat(A[1]) % 360 + 360) % 360, m = o(parseFloat(A[2]), 0, 100), p = o(parseFloat(A[3]), 0, 100), w = o(isNaN(u) ? 1 : u, 0, 1);
15752
+ return [h, m, p, w];
15752
15753
  }
15753
15754
  return null;
15754
15755
  }, a.get.hwb = function(c) {
@@ -15756,8 +15757,8 @@ var an = {
15756
15757
  return null;
15757
15758
  var l = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/, A = c.match(l);
15758
15759
  if (A) {
15759
- var u = parseFloat(A[4]), h = (parseFloat(A[1]) % 360 + 360) % 360, p = o(parseFloat(A[2]), 0, 100), m = o(parseFloat(A[3]), 0, 100), w = o(isNaN(u) ? 1 : u, 0, 1);
15760
- return [h, p, m, w];
15760
+ var u = parseFloat(A[4]), h = (parseFloat(A[1]) % 360 + 360) % 360, m = o(parseFloat(A[2]), 0, 100), p = o(parseFloat(A[3]), 0, 100), w = o(isNaN(u) ? 1 : u, 0, 1);
15761
+ return [h, m, p, w];
15761
15762
  }
15762
15763
  return null;
15763
15764
  }, a.to.hex = function() {
@@ -15970,23 +15971,23 @@ var ur = {
15970
15971
  delete n[a].channels, delete n[a].labels, Object.defineProperty(n[a], "channels", { value: o }), Object.defineProperty(n[a], "labels", { value: i });
15971
15972
  }
15972
15973
  n.rgb.hsl = function(l) {
15973
- var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255, p = Math.min(A, u, h), m = Math.max(A, u, h), w = m - p, x, k, y;
15974
- return m === p ? x = 0 : A === m ? x = (u - h) / w : u === m ? x = 2 + (h - A) / w : h === m && (x = 4 + (A - u) / w), x = Math.min(x * 60, 360), x < 0 && (x += 360), y = (p + m) / 2, m === p ? k = 0 : y <= 0.5 ? k = w / (m + p) : k = w / (2 - m - p), [x, k * 100, y * 100];
15974
+ var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255, m = Math.min(A, u, h), p = Math.max(A, u, h), w = p - m, x, k, y;
15975
+ return p === m ? x = 0 : A === p ? x = (u - h) / w : u === p ? x = 2 + (h - A) / w : h === p && (x = 4 + (A - u) / w), x = Math.min(x * 60, 360), x < 0 && (x += 360), y = (m + p) / 2, p === m ? k = 0 : y <= 0.5 ? k = w / (p + m) : k = w / (2 - p - m), [x, k * 100, y * 100];
15975
15976
  }, n.rgb.hsv = function(l) {
15976
- var A, u, h, p, m, w = l[0] / 255, x = l[1] / 255, k = l[2] / 255, y = Math.max(w, x, k), I = y - Math.min(w, x, k), C = function(R) {
15977
+ var A, u, h, m, p, w = l[0] / 255, x = l[1] / 255, k = l[2] / 255, y = Math.max(w, x, k), I = y - Math.min(w, x, k), C = function(R) {
15977
15978
  return (y - R) / 6 / I + 1 / 2;
15978
15979
  };
15979
- return I === 0 ? p = m = 0 : (m = I / y, A = C(w), u = C(x), h = C(k), w === y ? p = h - u : x === y ? p = 1 / 3 + A - h : k === y && (p = 2 / 3 + u - A), p < 0 ? p += 1 : p > 1 && (p -= 1)), [
15980
- p * 360,
15981
- m * 100,
15980
+ return I === 0 ? m = p = 0 : (p = I / y, A = C(w), u = C(x), h = C(k), w === y ? m = h - u : x === y ? m = 1 / 3 + A - h : k === y && (m = 2 / 3 + u - A), m < 0 ? m += 1 : m > 1 && (m -= 1)), [
15981
+ m * 360,
15982
+ p * 100,
15982
15983
  y * 100
15983
15984
  ];
15984
15985
  }, n.rgb.hwb = function(l) {
15985
- var A = l[0], u = l[1], h = l[2], p = n.rgb.hsl(l)[0], m = 1 / 255 * Math.min(A, Math.min(u, h));
15986
- return h = 1 - 1 / 255 * Math.max(A, Math.max(u, h)), [p, m * 100, h * 100];
15986
+ var A = l[0], u = l[1], h = l[2], m = n.rgb.hsl(l)[0], p = 1 / 255 * Math.min(A, Math.min(u, h));
15987
+ return h = 1 - 1 / 255 * Math.max(A, Math.max(u, h)), [m, p * 100, h * 100];
15987
15988
  }, n.rgb.cmyk = function(l) {
15988
- var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255, p, m, w, x;
15989
- return x = Math.min(1 - A, 1 - u, 1 - h), p = (1 - A - x) / (1 - x) || 0, m = (1 - u - x) / (1 - x) || 0, w = (1 - h - x) / (1 - x) || 0, [p * 100, m * 100, w * 100, x * 100];
15989
+ var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255, m, p, w, x;
15990
+ return x = Math.min(1 - A, 1 - u, 1 - h), m = (1 - A - x) / (1 - x) || 0, p = (1 - u - x) / (1 - x) || 0, w = (1 - h - x) / (1 - x) || 0, [m * 100, p * 100, w * 100, x * 100];
15990
15991
  };
15991
15992
  function c(l, A) {
15992
15993
  return Math.pow(l[0] - A[0], 2) + Math.pow(l[1] - A[1], 2) + Math.pow(l[2] - A[2], 2);
@@ -15996,10 +15997,10 @@ var ur = {
15996
15997
  if (A)
15997
15998
  return A;
15998
15999
  var u = 1 / 0, h;
15999
- for (var p in ur)
16000
- if (ur.hasOwnProperty(p)) {
16001
- var m = ur[p], w = c(l, m);
16002
- w < u && (u = w, h = p);
16000
+ for (var m in ur)
16001
+ if (ur.hasOwnProperty(m)) {
16002
+ var p = ur[m], w = c(l, p);
16003
+ w < u && (u = w, h = m);
16003
16004
  }
16004
16005
  return h;
16005
16006
  }, n.keyword.rgb = function(l) {
@@ -16007,25 +16008,25 @@ var ur = {
16007
16008
  }, n.rgb.xyz = function(l) {
16008
16009
  var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255;
16009
16010
  A = A > 0.04045 ? Math.pow((A + 0.055) / 1.055, 2.4) : A / 12.92, u = u > 0.04045 ? Math.pow((u + 0.055) / 1.055, 2.4) : u / 12.92, h = h > 0.04045 ? Math.pow((h + 0.055) / 1.055, 2.4) : h / 12.92;
16010
- var p = A * 0.4124 + u * 0.3576 + h * 0.1805, m = A * 0.2126 + u * 0.7152 + h * 0.0722, w = A * 0.0193 + u * 0.1192 + h * 0.9505;
16011
- return [p * 100, m * 100, w * 100];
16011
+ var m = A * 0.4124 + u * 0.3576 + h * 0.1805, p = A * 0.2126 + u * 0.7152 + h * 0.0722, w = A * 0.0193 + u * 0.1192 + h * 0.9505;
16012
+ return [m * 100, p * 100, w * 100];
16012
16013
  }, n.rgb.lab = function(l) {
16013
- var A = n.rgb.xyz(l), u = A[0], h = A[1], p = A[2], m, w, x;
16014
- return u /= 95.047, h /= 100, p /= 108.883, u = u > 8856e-6 ? Math.pow(u, 1 / 3) : 7.787 * u + 16 / 116, h = h > 8856e-6 ? Math.pow(h, 1 / 3) : 7.787 * h + 16 / 116, p = p > 8856e-6 ? Math.pow(p, 1 / 3) : 7.787 * p + 16 / 116, m = 116 * h - 16, w = 500 * (u - h), x = 200 * (h - p), [m, w, x];
16014
+ var A = n.rgb.xyz(l), u = A[0], h = A[1], m = A[2], p, w, x;
16015
+ return u /= 95.047, h /= 100, m /= 108.883, u = u > 8856e-6 ? Math.pow(u, 1 / 3) : 7.787 * u + 16 / 116, h = h > 8856e-6 ? Math.pow(h, 1 / 3) : 7.787 * h + 16 / 116, m = m > 8856e-6 ? Math.pow(m, 1 / 3) : 7.787 * m + 16 / 116, p = 116 * h - 16, w = 500 * (u - h), x = 200 * (h - m), [p, w, x];
16015
16016
  }, n.hsl.rgb = function(l) {
16016
- var A = l[0] / 360, u = l[1] / 100, h = l[2] / 100, p, m, w, x, k;
16017
+ var A = l[0] / 360, u = l[1] / 100, h = l[2] / 100, m, p, w, x, k;
16017
16018
  if (u === 0)
16018
16019
  return k = h * 255, [k, k, k];
16019
- h < 0.5 ? m = h * (1 + u) : m = h + u - h * u, p = 2 * h - m, x = [0, 0, 0];
16020
+ h < 0.5 ? p = h * (1 + u) : p = h + u - h * u, m = 2 * h - p, x = [0, 0, 0];
16020
16021
  for (var y = 0; y < 3; y++)
16021
- w = A + 1 / 3 * -(y - 1), w < 0 && w++, w > 1 && w--, 6 * w < 1 ? k = p + (m - p) * 6 * w : 2 * w < 1 ? k = m : 3 * w < 2 ? k = p + (m - p) * (2 / 3 - w) * 6 : k = p, x[y] = k * 255;
16022
+ w = A + 1 / 3 * -(y - 1), w < 0 && w++, w > 1 && w--, 6 * w < 1 ? k = m + (p - m) * 6 * w : 2 * w < 1 ? k = p : 3 * w < 2 ? k = m + (p - m) * (2 / 3 - w) * 6 : k = m, x[y] = k * 255;
16022
16023
  return x;
16023
16024
  }, n.hsl.hsv = function(l) {
16024
- var A = l[0], u = l[1] / 100, h = l[2] / 100, p = u, m = Math.max(h, 0.01), w, x;
16025
- return h *= 2, u *= h <= 1 ? h : 2 - h, p *= m <= 1 ? m : 2 - m, x = (h + u) / 2, w = h === 0 ? 2 * p / (m + p) : 2 * u / (h + u), [A, w * 100, x * 100];
16025
+ var A = l[0], u = l[1] / 100, h = l[2] / 100, m = u, p = Math.max(h, 0.01), w, x;
16026
+ return h *= 2, u *= h <= 1 ? h : 2 - h, m *= p <= 1 ? p : 2 - p, x = (h + u) / 2, w = h === 0 ? 2 * m / (p + m) : 2 * u / (h + u), [A, w * 100, x * 100];
16026
16027
  }, n.hsv.rgb = function(l) {
16027
- var A = l[0] / 60, u = l[1] / 100, h = l[2] / 100, p = Math.floor(A) % 6, m = A - Math.floor(A), w = 255 * h * (1 - u), x = 255 * h * (1 - u * m), k = 255 * h * (1 - u * (1 - m));
16028
- switch (h *= 255, p) {
16028
+ var A = l[0] / 60, u = l[1] / 100, h = l[2] / 100, m = Math.floor(A) % 6, p = A - Math.floor(A), w = 255 * h * (1 - u), x = 255 * h * (1 - u * p), k = 255 * h * (1 - u * (1 - p));
16029
+ switch (h *= 255, m) {
16029
16030
  case 0:
16030
16031
  return [h, k, w];
16031
16032
  case 1:
@@ -16040,13 +16041,13 @@ var ur = {
16040
16041
  return [h, w, x];
16041
16042
  }
16042
16043
  }, n.hsv.hsl = function(l) {
16043
- var A = l[0], u = l[1] / 100, h = l[2] / 100, p = Math.max(h, 0.01), m, w, x;
16044
- return x = (2 - u) * h, m = (2 - u) * p, w = u * p, w /= m <= 1 ? m : 2 - m, w = w || 0, x /= 2, [A, w * 100, x * 100];
16044
+ var A = l[0], u = l[1] / 100, h = l[2] / 100, m = Math.max(h, 0.01), p, w, x;
16045
+ return x = (2 - u) * h, p = (2 - u) * m, w = u * m, w /= p <= 1 ? p : 2 - p, w = w || 0, x /= 2, [A, w * 100, x * 100];
16045
16046
  }, n.hwb.rgb = function(l) {
16046
- var A = l[0] / 360, u = l[1] / 100, h = l[2] / 100, p = u + h, m, w, x, k;
16047
- p > 1 && (u /= p, h /= p), m = Math.floor(6 * A), w = 1 - h, x = 6 * A - m, m & 1 && (x = 1 - x), k = u + x * (w - u);
16047
+ var A = l[0] / 360, u = l[1] / 100, h = l[2] / 100, m = u + h, p, w, x, k;
16048
+ m > 1 && (u /= m, h /= m), p = Math.floor(6 * A), w = 1 - h, x = 6 * A - p, p & 1 && (x = 1 - x), k = u + x * (w - u);
16048
16049
  var y, I, C;
16049
- switch (m) {
16050
+ switch (p) {
16050
16051
  default:
16051
16052
  case 6:
16052
16053
  case 0:
@@ -16070,53 +16071,53 @@ var ur = {
16070
16071
  }
16071
16072
  return [y * 255, I * 255, C * 255];
16072
16073
  }, n.cmyk.rgb = function(l) {
16073
- var A = l[0] / 100, u = l[1] / 100, h = l[2] / 100, p = l[3] / 100, m, w, x;
16074
- return m = 1 - Math.min(1, A * (1 - p) + p), w = 1 - Math.min(1, u * (1 - p) + p), x = 1 - Math.min(1, h * (1 - p) + p), [m * 255, w * 255, x * 255];
16074
+ var A = l[0] / 100, u = l[1] / 100, h = l[2] / 100, m = l[3] / 100, p, w, x;
16075
+ return p = 1 - Math.min(1, A * (1 - m) + m), w = 1 - Math.min(1, u * (1 - m) + m), x = 1 - Math.min(1, h * (1 - m) + m), [p * 255, w * 255, x * 255];
16075
16076
  }, n.xyz.rgb = function(l) {
16076
- var A = l[0] / 100, u = l[1] / 100, h = l[2] / 100, p, m, w;
16077
- return p = A * 3.2406 + u * -1.5372 + h * -0.4986, m = A * -0.9689 + u * 1.8758 + h * 0.0415, w = A * 0.0557 + u * -0.204 + h * 1.057, p = p > 31308e-7 ? 1.055 * Math.pow(p, 1 / 2.4) - 0.055 : p * 12.92, m = m > 31308e-7 ? 1.055 * Math.pow(m, 1 / 2.4) - 0.055 : m * 12.92, w = w > 31308e-7 ? 1.055 * Math.pow(w, 1 / 2.4) - 0.055 : w * 12.92, p = Math.min(Math.max(0, p), 1), m = Math.min(Math.max(0, m), 1), w = Math.min(Math.max(0, w), 1), [p * 255, m * 255, w * 255];
16077
+ var A = l[0] / 100, u = l[1] / 100, h = l[2] / 100, m, p, w;
16078
+ return m = A * 3.2406 + u * -1.5372 + h * -0.4986, p = A * -0.9689 + u * 1.8758 + h * 0.0415, w = A * 0.0557 + u * -0.204 + h * 1.057, m = m > 31308e-7 ? 1.055 * Math.pow(m, 1 / 2.4) - 0.055 : m * 12.92, p = p > 31308e-7 ? 1.055 * Math.pow(p, 1 / 2.4) - 0.055 : p * 12.92, w = w > 31308e-7 ? 1.055 * Math.pow(w, 1 / 2.4) - 0.055 : w * 12.92, m = Math.min(Math.max(0, m), 1), p = Math.min(Math.max(0, p), 1), w = Math.min(Math.max(0, w), 1), [m * 255, p * 255, w * 255];
16078
16079
  }, n.xyz.lab = function(l) {
16079
- var A = l[0], u = l[1], h = l[2], p, m, w;
16080
- return A /= 95.047, u /= 100, h /= 108.883, A = A > 8856e-6 ? Math.pow(A, 1 / 3) : 7.787 * A + 16 / 116, u = u > 8856e-6 ? Math.pow(u, 1 / 3) : 7.787 * u + 16 / 116, h = h > 8856e-6 ? Math.pow(h, 1 / 3) : 7.787 * h + 16 / 116, p = 116 * u - 16, m = 500 * (A - u), w = 200 * (u - h), [p, m, w];
16080
+ var A = l[0], u = l[1], h = l[2], m, p, w;
16081
+ return A /= 95.047, u /= 100, h /= 108.883, A = A > 8856e-6 ? Math.pow(A, 1 / 3) : 7.787 * A + 16 / 116, u = u > 8856e-6 ? Math.pow(u, 1 / 3) : 7.787 * u + 16 / 116, h = h > 8856e-6 ? Math.pow(h, 1 / 3) : 7.787 * h + 16 / 116, m = 116 * u - 16, p = 500 * (A - u), w = 200 * (u - h), [m, p, w];
16081
16082
  }, n.lab.xyz = function(l) {
16082
- var A = l[0], u = l[1], h = l[2], p, m, w;
16083
- m = (A + 16) / 116, p = u / 500 + m, w = m - h / 200;
16084
- var x = Math.pow(m, 3), k = Math.pow(p, 3), y = Math.pow(w, 3);
16085
- return m = x > 8856e-6 ? x : (m - 16 / 116) / 7.787, p = k > 8856e-6 ? k : (p - 16 / 116) / 7.787, w = y > 8856e-6 ? y : (w - 16 / 116) / 7.787, p *= 95.047, m *= 100, w *= 108.883, [p, m, w];
16083
+ var A = l[0], u = l[1], h = l[2], m, p, w;
16084
+ p = (A + 16) / 116, m = u / 500 + p, w = p - h / 200;
16085
+ var x = Math.pow(p, 3), k = Math.pow(m, 3), y = Math.pow(w, 3);
16086
+ return p = x > 8856e-6 ? x : (p - 16 / 116) / 7.787, m = k > 8856e-6 ? k : (m - 16 / 116) / 7.787, w = y > 8856e-6 ? y : (w - 16 / 116) / 7.787, m *= 95.047, p *= 100, w *= 108.883, [m, p, w];
16086
16087
  }, n.lab.lch = function(l) {
16087
- var A = l[0], u = l[1], h = l[2], p, m, w;
16088
- return p = Math.atan2(h, u), m = p * 360 / 2 / Math.PI, m < 0 && (m += 360), w = Math.sqrt(u * u + h * h), [A, w, m];
16088
+ var A = l[0], u = l[1], h = l[2], m, p, w;
16089
+ return m = Math.atan2(h, u), p = m * 360 / 2 / Math.PI, p < 0 && (p += 360), w = Math.sqrt(u * u + h * h), [A, w, p];
16089
16090
  }, n.lch.lab = function(l) {
16090
- var A = l[0], u = l[1], h = l[2], p, m, w;
16091
- return w = h / 360 * 2 * Math.PI, p = u * Math.cos(w), m = u * Math.sin(w), [A, p, m];
16091
+ var A = l[0], u = l[1], h = l[2], m, p, w;
16092
+ return w = h / 360 * 2 * Math.PI, m = u * Math.cos(w), p = u * Math.sin(w), [A, m, p];
16092
16093
  }, n.rgb.ansi16 = function(l) {
16093
- var A = l[0], u = l[1], h = l[2], p = 1 in arguments ? arguments[1] : n.rgb.hsv(l)[2];
16094
- if (p = Math.round(p / 50), p === 0)
16094
+ var A = l[0], u = l[1], h = l[2], m = 1 in arguments ? arguments[1] : n.rgb.hsv(l)[2];
16095
+ if (m = Math.round(m / 50), m === 0)
16095
16096
  return 30;
16096
- var m = 30 + (Math.round(h / 255) << 2 | Math.round(u / 255) << 1 | Math.round(A / 255));
16097
- return p === 2 && (m += 60), m;
16097
+ var p = 30 + (Math.round(h / 255) << 2 | Math.round(u / 255) << 1 | Math.round(A / 255));
16098
+ return m === 2 && (p += 60), p;
16098
16099
  }, n.hsv.ansi16 = function(l) {
16099
16100
  return n.rgb.ansi16(n.hsv.rgb(l), l[2]);
16100
16101
  }, n.rgb.ansi256 = function(l) {
16101
16102
  var A = l[0], u = l[1], h = l[2];
16102
16103
  if (A === u && u === h)
16103
16104
  return A < 8 ? 16 : A > 248 ? 231 : Math.round((A - 8) / 247 * 24) + 232;
16104
- var p = 16 + 36 * Math.round(A / 255 * 5) + 6 * Math.round(u / 255 * 5) + Math.round(h / 255 * 5);
16105
- return p;
16105
+ var m = 16 + 36 * Math.round(A / 255 * 5) + 6 * Math.round(u / 255 * 5) + Math.round(h / 255 * 5);
16106
+ return m;
16106
16107
  }, n.ansi16.rgb = function(l) {
16107
16108
  var A = l % 10;
16108
16109
  if (A === 0 || A === 7)
16109
16110
  return l > 50 && (A += 3.5), A = A / 10.5 * 255, [A, A, A];
16110
- var u = (~~(l > 50) + 1) * 0.5, h = (A & 1) * u * 255, p = (A >> 1 & 1) * u * 255, m = (A >> 2 & 1) * u * 255;
16111
- return [h, p, m];
16111
+ var u = (~~(l > 50) + 1) * 0.5, h = (A & 1) * u * 255, m = (A >> 1 & 1) * u * 255, p = (A >> 2 & 1) * u * 255;
16112
+ return [h, m, p];
16112
16113
  }, n.ansi256.rgb = function(l) {
16113
16114
  if (l >= 232) {
16114
16115
  var A = (l - 232) * 10 + 8;
16115
16116
  return [A, A, A];
16116
16117
  }
16117
16118
  l -= 16;
16118
- var u, h = Math.floor(l / 36) / 5 * 255, p = Math.floor((u = l % 36) / 6) / 5 * 255, m = u % 6 / 5 * 255;
16119
- return [h, p, m];
16119
+ var u, h = Math.floor(l / 36) / 5 * 255, m = Math.floor((u = l % 36) / 6) / 5 * 255, p = u % 6 / 5 * 255;
16120
+ return [h, m, p];
16120
16121
  }, n.rgb.hex = function(l) {
16121
16122
  var A = ((Math.round(l[0]) & 255) << 16) + ((Math.round(l[1]) & 255) << 8) + (Math.round(l[2]) & 255), u = A.toString(16).toUpperCase();
16122
16123
  return "000000".substring(u.length) + u;
@@ -16128,58 +16129,58 @@ var ur = {
16128
16129
  A[0].length === 3 && (u = u.split("").map(function(x) {
16129
16130
  return x + x;
16130
16131
  }).join(""));
16131
- var h = parseInt(u, 16), p = h >> 16 & 255, m = h >> 8 & 255, w = h & 255;
16132
- return [p, m, w];
16132
+ var h = parseInt(u, 16), m = h >> 16 & 255, p = h >> 8 & 255, w = h & 255;
16133
+ return [m, p, w];
16133
16134
  }, n.rgb.hcg = function(l) {
16134
- var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255, p = Math.max(Math.max(A, u), h), m = Math.min(Math.min(A, u), h), w = p - m, x, k;
16135
- return w < 1 ? x = m / (1 - w) : x = 0, w <= 0 ? k = 0 : p === A ? k = (u - h) / w % 6 : p === u ? k = 2 + (h - A) / w : k = 4 + (A - u) / w + 4, k /= 6, k %= 1, [k * 360, w * 100, x * 100];
16135
+ var A = l[0] / 255, u = l[1] / 255, h = l[2] / 255, m = Math.max(Math.max(A, u), h), p = Math.min(Math.min(A, u), h), w = m - p, x, k;
16136
+ return w < 1 ? x = p / (1 - w) : x = 0, w <= 0 ? k = 0 : m === A ? k = (u - h) / w % 6 : m === u ? k = 2 + (h - A) / w : k = 4 + (A - u) / w + 4, k /= 6, k %= 1, [k * 360, w * 100, x * 100];
16136
16137
  }, n.hsl.hcg = function(l) {
16137
- var A = l[1] / 100, u = l[2] / 100, h = 1, p = 0;
16138
- return u < 0.5 ? h = 2 * A * u : h = 2 * A * (1 - u), h < 1 && (p = (u - 0.5 * h) / (1 - h)), [l[0], h * 100, p * 100];
16138
+ var A = l[1] / 100, u = l[2] / 100, h = 1, m = 0;
16139
+ return u < 0.5 ? h = 2 * A * u : h = 2 * A * (1 - u), h < 1 && (m = (u - 0.5 * h) / (1 - h)), [l[0], h * 100, m * 100];
16139
16140
  }, n.hsv.hcg = function(l) {
16140
- var A = l[1] / 100, u = l[2] / 100, h = A * u, p = 0;
16141
- return h < 1 && (p = (u - h) / (1 - h)), [l[0], h * 100, p * 100];
16141
+ var A = l[1] / 100, u = l[2] / 100, h = A * u, m = 0;
16142
+ return h < 1 && (m = (u - h) / (1 - h)), [l[0], h * 100, m * 100];
16142
16143
  }, n.hcg.rgb = function(l) {
16143
16144
  var A = l[0] / 360, u = l[1] / 100, h = l[2] / 100;
16144
16145
  if (u === 0)
16145
16146
  return [h * 255, h * 255, h * 255];
16146
- var p = [0, 0, 0], m = A % 1 * 6, w = m % 1, x = 1 - w, k = 0;
16147
- switch (Math.floor(m)) {
16147
+ var m = [0, 0, 0], p = A % 1 * 6, w = p % 1, x = 1 - w, k = 0;
16148
+ switch (Math.floor(p)) {
16148
16149
  case 0:
16149
- p[0] = 1, p[1] = w, p[2] = 0;
16150
+ m[0] = 1, m[1] = w, m[2] = 0;
16150
16151
  break;
16151
16152
  case 1:
16152
- p[0] = x, p[1] = 1, p[2] = 0;
16153
+ m[0] = x, m[1] = 1, m[2] = 0;
16153
16154
  break;
16154
16155
  case 2:
16155
- p[0] = 0, p[1] = 1, p[2] = w;
16156
+ m[0] = 0, m[1] = 1, m[2] = w;
16156
16157
  break;
16157
16158
  case 3:
16158
- p[0] = 0, p[1] = x, p[2] = 1;
16159
+ m[0] = 0, m[1] = x, m[2] = 1;
16159
16160
  break;
16160
16161
  case 4:
16161
- p[0] = w, p[1] = 0, p[2] = 1;
16162
+ m[0] = w, m[1] = 0, m[2] = 1;
16162
16163
  break;
16163
16164
  default:
16164
- p[0] = 1, p[1] = 0, p[2] = x;
16165
+ m[0] = 1, m[1] = 0, m[2] = x;
16165
16166
  }
16166
16167
  return k = (1 - u) * h, [
16167
- (u * p[0] + k) * 255,
16168
- (u * p[1] + k) * 255,
16169
- (u * p[2] + k) * 255
16168
+ (u * m[0] + k) * 255,
16169
+ (u * m[1] + k) * 255,
16170
+ (u * m[2] + k) * 255
16170
16171
  ];
16171
16172
  }, n.hcg.hsv = function(l) {
16172
- var A = l[1] / 100, u = l[2] / 100, h = A + u * (1 - A), p = 0;
16173
- return h > 0 && (p = A / h), [l[0], p * 100, h * 100];
16173
+ var A = l[1] / 100, u = l[2] / 100, h = A + u * (1 - A), m = 0;
16174
+ return h > 0 && (m = A / h), [l[0], m * 100, h * 100];
16174
16175
  }, n.hcg.hsl = function(l) {
16175
- var A = l[1] / 100, u = l[2] / 100, h = u * (1 - A) + 0.5 * A, p = 0;
16176
- return h > 0 && h < 0.5 ? p = A / (2 * h) : h >= 0.5 && h < 1 && (p = A / (2 * (1 - h))), [l[0], p * 100, h * 100];
16176
+ var A = l[1] / 100, u = l[2] / 100, h = u * (1 - A) + 0.5 * A, m = 0;
16177
+ return h > 0 && h < 0.5 ? m = A / (2 * h) : h >= 0.5 && h < 1 && (m = A / (2 * (1 - h))), [l[0], m * 100, h * 100];
16177
16178
  }, n.hcg.hwb = function(l) {
16178
16179
  var A = l[1] / 100, u = l[2] / 100, h = A + u * (1 - A);
16179
16180
  return [l[0], (h - A) * 100, (1 - h) * 100];
16180
16181
  }, n.hwb.hcg = function(l) {
16181
- var A = l[1] / 100, u = l[2] / 100, h = 1 - u, p = h - A, m = 0;
16182
- return p < 1 && (m = (h - p) / (1 - p)), [l[0], p * 100, m * 100];
16182
+ var A = l[1] / 100, u = l[2] / 100, h = 1 - u, m = h - A, p = 0;
16183
+ return m < 1 && (p = (h - m) / (1 - m)), [l[0], m * 100, p * 100];
16183
16184
  }, n.apple.rgb = function(l) {
16184
16185
  return [l[0] / 65535 * 255, l[1] / 65535 * 255, l[2] / 65535 * 255];
16185
16186
  }, n.rgb.apple = function(l) {
@@ -16559,7 +16560,7 @@ const ak = ({
16559
16560
  let u = "min-height: 58px;max-width: 440px;margin: 0 auto;width: 100%";
16560
16561
  o === "all-in-one" && (r.icon && r.icon !== "" && (A.icon = r.icon.replace(/\/content\/images\//, "/content/images/size/w192h192/")), A.title = r.title, A.description = r.description, A["background-color"] = a, A["text-color"] = Pt(a).hex(), u = "height: 40vmin;min-height: 360px"), e && (o === "minimal" ? u = "min-height: 58px; max-width: 440px;width: 100%;position: absolute; left: 50%; top:50%; transform: translate(-50%, -50%);" : u = "height: 100vh");
16561
16562
  let h = "";
16562
- const p = [
16563
+ const m = [
16563
16564
  "background-color",
16564
16565
  "text-color",
16565
16566
  "button-color",
@@ -16569,8 +16570,8 @@ const ak = ({
16569
16570
  "icon",
16570
16571
  "site",
16571
16572
  "locale"
16572
- ], m = Object.keys(A).sort((x, k) => p.indexOf(x) - p.indexOf(k));
16573
- for (const x of m) {
16573
+ ], p = Object.keys(A).sort((x, k) => m.indexOf(x) - m.indexOf(k));
16574
+ for (const x of p) {
16574
16575
  const k = A[x];
16575
16576
  h += ` data-${x}="${Fi(k)}"`;
16576
16577
  }
@@ -16578,7 +16579,7 @@ const ak = ({
16578
16579
  return e && u === "minimal" ? `<div style="position: absolute; z-index: -1; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%), linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%);background-size: 16px 16px;background-position: 0 0, 8px 8px;;"></div>${w}` : w;
16579
16580
  }, sk = ne.create(() => {
16580
16581
  let e = !1;
16581
- const [t, r] = G("#08090c"), [n, a] = G([]), [o, i] = G("all-in-one"), [c, l] = G(""), [A, u] = G(!1), { updateRoute: h } = ye(), { config: p } = Te(), { localSettings: m, siteData: w } = kr(), [x, k, y, I, C, R] = Ue(m, ["accent_color", "title", "description", "locale", "labs", "icon"]), [U, O] = G({ active: !1 });
16582
+ const [t, r] = G("#08090c"), [n, a] = G([]), [o, i] = G("all-in-one"), [c, l] = G(""), [A, u] = G(!1), { updateRoute: h } = ye(), { config: m } = Te(), { localSettings: p, siteData: w } = kr(), [x, k, y, I, C, R] = Ue(p, ["accent_color", "title", "description", "locale", "labs", "icon"]), [U, O] = G({ active: !1 });
16582
16583
  C && (e = JSON.parse(C).i18n), ie(() => {
16583
16584
  var j, J;
16584
16585
  if (!w)
@@ -16588,8 +16589,8 @@ const ak = ({
16588
16589
  config: {
16589
16590
  blogUrl: w.url,
16590
16591
  signupForm: {
16591
- url: (j = p == null ? void 0 : p.signupForm) == null ? void 0 : j.url,
16592
- version: (J = p == null ? void 0 : p.signupForm) == null ? void 0 : J.version
16592
+ url: (j = m == null ? void 0 : m.signupForm) == null ? void 0 : j.url,
16593
+ version: (J = m == null ? void 0 : m.signupForm) == null ? void 0 : J.version
16593
16594
  }
16594
16595
  },
16595
16596
  settings: {
@@ -16605,7 +16606,7 @@ const ak = ({
16605
16606
  i18nEnabled: e
16606
16607
  });
16607
16608
  l(z);
16608
- }, [w, x, n, p, k, t, o, I, e, R, y]);
16609
+ }, [w, x, n, m, k, t, o, I, e, R, y]);
16609
16610
  const F = async () => {
16610
16611
  try {
16611
16612
  await navigator.clipboard.writeText(c), u(!0), setTimeout(() => u(!1), 2e3);
@@ -16668,8 +16669,8 @@ const ak = ({
16668
16669
  ie(() => {
16669
16670
  h(i || !1), o(c || null);
16670
16671
  }, [i, c]);
16671
- const p = async () => {
16672
- const m = [
16672
+ const m = async () => {
16673
+ const p = [
16673
16674
  {
16674
16675
  key: "firstpromoter",
16675
16676
  value: u
@@ -16681,7 +16682,7 @@ const ak = ({
16681
16682
  ];
16682
16683
  try {
16683
16684
  A("Saving..."), await Promise.all([
16684
- r(m),
16685
+ r(p),
16685
16686
  new Promise((w) => {
16686
16687
  setTimeout(w, 1e3);
16687
16688
  })
@@ -16706,9 +16707,9 @@ const ak = ({
16706
16707
  title: "",
16707
16708
  onOk: async () => {
16708
16709
  try {
16709
- await p();
16710
- } catch (m) {
16711
- n(m);
16710
+ await m();
16711
+ } catch (p) {
16712
+ n(p);
16712
16713
  }
16713
16714
  },
16714
16715
  children: [
@@ -16732,8 +16733,8 @@ const ak = ({
16732
16733
  " for tracking referrals"
16733
16734
  ] }),
16734
16735
  label: "Enable FirstPromoter",
16735
- onChange: (m) => {
16736
- h(m.target.checked);
16736
+ onChange: (p) => {
16737
+ h(p.target.checked);
16737
16738
  }
16738
16739
  }
16739
16740
  ),
@@ -16747,8 +16748,8 @@ const ak = ({
16747
16748
  placeholder: "XXXXXXXX",
16748
16749
  title: "FirstPromoter account ID",
16749
16750
  value: a || "",
16750
- onChange: (m) => {
16751
- o(m.target.value);
16751
+ onChange: (p) => {
16752
+ o(p.target.value);
16752
16753
  }
16753
16754
  }
16754
16755
  )
@@ -16861,8 +16862,8 @@ const ak = ({
16861
16862
  }
16862
16863
  ), fk = ({ excludedEvents: e, excludedResources: t, toggleEventType: r, toggleResourceType: n }) => {
16863
16864
  const { updateRoute: a } = ye(), o = cl({ path: "/users/", filterKey: "name", responseKey: "users" }), i = async (u, h) => {
16864
- const p = await o.loadData(u);
16865
- h(p.map((m) => ({ label: m.name, value: m.id })));
16865
+ const m = await o.loadData(u);
16866
+ h(m.map((p) => ({ label: p.name, value: p.id })));
16866
16867
  }, [c, l] = G(), A = () => {
16867
16868
  l(null);
16868
16869
  };
@@ -16900,23 +16901,23 @@ const ak = ({
16900
16901
  var n, a, o, i, c, l, A, u;
16901
16902
  const { updateRoute: t } = ye(), r = uk(e);
16902
16903
  if (r) {
16903
- const { group: h, key: p } = r;
16904
+ const { group: h, key: m } = r;
16904
16905
  return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
16905
16906
  h.slice(0, 1).toUpperCase(),
16906
16907
  h.slice(1),
16907
- h !== p && /* @__PURE__ */ s.jsxs("span", { className: "text-xs", children: [
16908
+ h !== m && /* @__PURE__ */ s.jsxs("span", { className: "text-xs", children: [
16908
16909
  " ",
16909
16910
  /* @__PURE__ */ s.jsxs("code", { className: "mb-1 bg-white text-grey-800 dark:bg-grey-900 dark:text-white", children: [
16910
16911
  "(",
16911
- p,
16912
+ m,
16912
16913
  ")"
16913
16914
  ] })
16914
16915
  ] })
16915
16916
  ] });
16916
16917
  } else if ((n = e.resource) != null && n.title || (a = e.resource) != null && a.name || (o = e.context) != null && o.primary_name) {
16917
16918
  const h = Ak(e);
16918
- return h ? /* @__PURE__ */ s.jsx("a", { className: "cursor-pointer font-bold", onClick: (p) => {
16919
- p.preventDefault(), t(h);
16919
+ return h ? /* @__PURE__ */ s.jsx("a", { className: "cursor-pointer font-bold", onClick: (m) => {
16920
+ m.preventDefault(), t(h);
16920
16921
  }, children: ((i = e.resource) == null ? void 0 : i.title) || ((c = e.resource) == null ? void 0 : c.name) }) : /* @__PURE__ */ s.jsx(s.Fragment, { children: ((l = e.resource) == null ? void 0 : l.title) || ((A = e.resource) == null ? void 0 : A.name) || ((u = e.context) == null ? void 0 : u.primary_name) });
16921
16922
  } else
16922
16923
  return /* @__PURE__ */ s.jsx("span", { className: "text-grey-500", children: "(unknown)" });
@@ -16941,15 +16942,15 @@ const ak = ({
16941
16942
  (e == null ? void 0 : e.user) && `actor_id:'${e.user}'`
16942
16943
  ].filter(Boolean).join("+")
16943
16944
  },
16944
- getNextPageParams: (h, p) => ({
16945
- ...p,
16946
- filter: [p.filter, h.actions.length && `created_at:<'${pk(new Date(h.actions[h.actions.length - 1].created_at))}'`].join("+")
16945
+ getNextPageParams: (h, m) => ({
16946
+ ...m,
16947
+ filter: [m.filter, h.actions.length && `created_at:<'${pk(new Date(h.actions[h.actions.length - 1].created_at))}'`].join("+")
16947
16948
  }),
16948
16949
  keepPreviousData: !0
16949
16950
  }), A = it(() => {
16950
16951
  c != null && c.isEnd || l();
16951
- }, [c == null ? void 0 : c.isEnd, l]), u = (h, p, m) => {
16952
- h((w) => m ? w.concat(p) : w.filter((x) => x !== p));
16952
+ }, [c == null ? void 0 : c.isEnd, l]), u = (h, m, p) => {
16953
+ h((w) => p ? w.concat(m) : w.filter((x) => x !== m));
16953
16954
  };
16954
16955
  return /* @__PURE__ */ s.jsx(
16955
16956
  ze,
@@ -16970,8 +16971,8 @@ const ak = ({
16970
16971
  {
16971
16972
  excludedEvents: n,
16972
16973
  excludedResources: o,
16973
- toggleEventType: (h, p) => u(a, h, !p),
16974
- toggleResourceType: (h, p) => u(i, h, !p),
16974
+ toggleEventType: (h, m) => u(a, h, !m),
16975
+ toggleResourceType: (h, m) => u(i, h, !m),
16975
16976
  userId: e == null ? void 0 : e.user
16976
16977
  }
16977
16978
  ),
@@ -16981,7 +16982,7 @@ const ak = ({
16981
16982
  children: /* @__PURE__ */ s.jsx("div", { className: "relative -mb-8 mt-6", children: /* @__PURE__ */ s.jsx(Gt, { hint: c != null && c.isEnd ? "End of history log" : void 0, children: c != null && c.actions ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
16982
16983
  /* @__PURE__ */ s.jsx(Hf, { offset: 250, onTrigger: A }),
16983
16984
  c == null ? void 0 : c.actions.map((h) => {
16984
- var p, m;
16985
+ var m, p;
16985
16986
  return !h.skip && /* @__PURE__ */ s.jsx(
16986
16987
  sr,
16987
16988
  {
@@ -17001,7 +17002,7 @@ const ak = ({
17001
17002
  ] }) : null,
17002
17003
  /* @__PURE__ */ s.jsxs("span", { children: [
17003
17004
  " — by ",
17004
- ((p = h.actor) == null ? void 0 : p.name) || ((m = h.actor) == null ? void 0 : m.slug)
17005
+ ((m = h.actor) == null ? void 0 : m.name) || ((p = h.actor) == null ? void 0 : p.slug)
17005
17006
  ] })
17006
17007
  ] }),
17007
17008
  separator: !0
@@ -17015,7 +17016,7 @@ const ak = ({
17015
17016
  var Y, X;
17016
17017
  const e = ne.useModal(), t = Va(), r = Va({
17017
17018
  searchParams: { limit: "all", permissions: "assign" }
17018
- }), n = Zr(), { updateRoute: a } = ye(), o = Ye(null), [i, c] = G(""), [l, A] = G(""), [u, h] = G("contributor"), [p, m] = G({}), { data: { users: w } = {} } = Th(), { data: { invites: x } = {} } = Ch(), { mutateAsync: k } = Dh(), y = je();
17019
+ }), n = Zr(), { updateRoute: a } = ye(), o = Ye(null), [i, c] = G(""), [l, A] = G(""), [u, h] = G("contributor"), [m, p] = G({}), { data: { users: w } = {} } = Th(), { data: { invites: x } = {} } = Ch(), { mutateAsync: k } = Dh(), y = je();
17019
17020
  if (ie(() => {
17020
17021
  o.current && o.current.focus();
17021
17022
  }, []), ie(() => {
@@ -17024,14 +17025,14 @@ const ak = ({
17024
17025
  }, 2e3);
17025
17026
  }, [l]), ie(() => {
17026
17027
  u !== "contributor" && (n != null && n.isLimited("staff")) ? n.errorIfWouldGoOverLimit("staff").then(() => {
17027
- m((z) => ({ ...z, role: void 0 }));
17028
+ p((z) => ({ ...z, role: void 0 }));
17028
17029
  }).catch((z) => {
17029
17030
  if (z instanceof br) {
17030
- m((j) => ({ ...j, role: z.message }));
17031
+ p((j) => ({ ...j, role: z.message }));
17031
17032
  return;
17032
17033
  } else
17033
17034
  throw z;
17034
- }) : m((z) => ({ ...z, role: void 0 }));
17035
+ }) : p((z) => ({ ...z, role: void 0 }));
17035
17036
  }, [n, u]), !((Y = t.data) != null && Y.roles) || !((X = r.data) != null && X.roles))
17036
17037
  return null;
17037
17038
  const I = t.data.roles, C = r.data.roles;
@@ -17041,24 +17042,24 @@ const ak = ({
17041
17042
  var z, j;
17042
17043
  if (l !== "saving") {
17043
17044
  if (!Ut.isEmail(i)) {
17044
- m({
17045
+ p({
17045
17046
  email: "Please enter a valid email address."
17046
17047
  });
17047
17048
  return;
17048
17049
  }
17049
17050
  if (w != null && w.some(({ email: J }) => J === i)) {
17050
- m({
17051
+ p({
17051
17052
  email: "A user with that email address already exists."
17052
17053
  });
17053
17054
  return;
17054
17055
  }
17055
17056
  if (x != null && x.some(({ email: J }) => J === i)) {
17056
- m({
17057
+ p({
17057
17058
  email: "A user with that email address was already invited."
17058
17059
  });
17059
17060
  return;
17060
17061
  }
17061
- if (!p.role) {
17062
+ if (!m.role) {
17062
17063
  A("saving");
17063
17064
  try {
17064
17065
  await k({
@@ -17114,14 +17115,14 @@ const ak = ({
17114
17115
  value: "administrator"
17115
17116
  }
17116
17117
  ].filter((z) => C.some((j) => j.name === z.label));
17117
- return p.email && (R = "Retry"), /* @__PURE__ */ s.jsx(
17118
+ return m.email && (R = "Retry"), /* @__PURE__ */ s.jsx(
17118
17119
  ze,
17119
17120
  {
17120
17121
  afterClose: () => {
17121
17122
  a("staff");
17122
17123
  },
17123
17124
  cancelLabel: "",
17124
- okColor: l === "error" || p.email ? "red" : "black",
17125
+ okColor: l === "error" || m.email ? "red" : "black",
17125
17126
  okLabel: R,
17126
17127
  testId: "invite-user-modal",
17127
17128
  title: "Invite a new staff user",
@@ -17132,8 +17133,8 @@ const ak = ({
17132
17133
  /* @__PURE__ */ s.jsx(
17133
17134
  ce,
17134
17135
  {
17135
- error: !!p.email,
17136
- hint: p.email,
17136
+ error: !!m.email,
17137
+ hint: m.email,
17137
17138
  inputRef: o,
17138
17139
  placeholder: "jamie@example.com",
17139
17140
  title: "Email address",
@@ -17141,14 +17142,14 @@ const ak = ({
17141
17142
  onChange: (z) => {
17142
17143
  c(z.target.value);
17143
17144
  },
17144
- onKeyDown: () => m((z) => ({ ...z, email: void 0 }))
17145
+ onKeyDown: () => p((z) => ({ ...z, email: void 0 }))
17145
17146
  }
17146
17147
  ),
17147
17148
  /* @__PURE__ */ s.jsx("div", { children: /* @__PURE__ */ s.jsx(
17148
17149
  Ss,
17149
17150
  {
17150
- error: !!p.role,
17151
- hint: p.role,
17151
+ error: !!m.role,
17152
+ hint: m.role,
17152
17153
  id: "role",
17153
17154
  options: F,
17154
17155
  selectedOption: u,
@@ -17232,51 +17233,51 @@ const ak = ({
17232
17233
  )
17233
17234
  ] })
17234
17235
  ] }), Xi = ({ items: e, setItems: t }) => {
17235
- const r = (p) => !!(p.label && !p.label.match(/^\s*$/) || p.url !== "/"), n = Il({
17236
- items: e.map((p) => ({ ...p, errors: {} })),
17237
- setItems: (p) => t(p.map(({ url: m, label: w }) => ({ url: m, label: w }))),
17236
+ const r = (m) => !!(m.label && !m.label.match(/^\s*$/) || m.url !== "/"), n = Il({
17237
+ items: e.map((m) => ({ ...m, errors: {} })),
17238
+ setItems: (m) => t(m.map(({ url: p, label: w }) => ({ url: p, label: w }))),
17238
17239
  blank: { url: "/", label: "", errors: {} },
17239
17240
  canAddNewItem: r
17240
- }), a = new RegExp(/^(\/|#|[a-zA-Z0-9-]+:)/), o = (p) => {
17241
- const m = {};
17242
- return (!p.label || p.label.match(/^\s*$/)) && (m.label = "You must specify a label"), (!p.url || p.url.match(/\s/) || !Ut.isURL(p.url, { require_protocol: !0 }) && !p.url.match(a)) && (m.url = "You must specify a valid URL or relative path"), m;
17243
- }, i = (p, m) => {
17244
- const w = n.items.find((x) => x.id === p);
17245
- n.updateItem(p, { ...w.item, ...m });
17241
+ }), a = new RegExp(/^(\/|#|[a-zA-Z0-9-]+:)/), o = (m) => {
17242
+ const p = {};
17243
+ return (!m.label || m.label.match(/^\s*$/)) && (p.label = "You must specify a label"), (!m.url || m.url.match(/\s/) || !Ut.isURL(m.url, { require_protocol: !0 }) && !m.url.match(a)) && (p.url = "You must specify a valid URL or relative path"), p;
17244
+ }, i = (m, p) => {
17245
+ const w = n.items.find((x) => x.id === m);
17246
+ n.updateItem(m, { ...w.item, ...p });
17246
17247
  }, c = () => {
17247
- const p = o(n.newItem);
17248
- Object.values(p).some((m) => m) ? n.setNewItem({ ...n.newItem, errors: p }) : n.addItem();
17249
- }, l = (p) => {
17250
- n.removeItem(p);
17251
- }, A = (p, m) => {
17252
- n.moveItem(p, m);
17253
- }, u = "new", h = (p, m) => {
17254
- if (p === u)
17255
- n.setNewItem({ ...n.newItem, errors: { ...n.newItem.errors, [m]: void 0 } });
17248
+ const m = o(n.newItem);
17249
+ Object.values(m).some((p) => p) ? n.setNewItem({ ...n.newItem, errors: m }) : n.addItem();
17250
+ }, l = (m) => {
17251
+ n.removeItem(m);
17252
+ }, A = (m, p) => {
17253
+ n.moveItem(m, p);
17254
+ }, u = "new", h = (m, p) => {
17255
+ if (m === u)
17256
+ n.setNewItem({ ...n.newItem, errors: { ...n.newItem.errors, [p]: void 0 } });
17256
17257
  else {
17257
- const w = n.items.find((x) => x.id === p).item;
17258
- n.updateItem(p, { ...w, errors: { ...w.errors, [m]: void 0 } });
17258
+ const w = n.items.find((x) => x.id === m).item;
17259
+ n.updateItem(m, { ...w, errors: { ...w.errors, [p]: void 0 } });
17259
17260
  }
17260
17261
  };
17261
17262
  return {
17262
- items: n.items.map(({ item: p, id: m }) => ({ ...p, id: m })),
17263
+ items: n.items.map(({ item: m, id: p }) => ({ ...m, id: p })),
17263
17264
  updateItem: i,
17264
17265
  addItem: c,
17265
17266
  removeItem: l,
17266
17267
  moveItem: A,
17267
17268
  newItem: { ...n.newItem, id: u },
17268
- setNewItem: (p) => n.setNewItem({ ...n.newItem, ...p }),
17269
+ setNewItem: (m) => n.setNewItem({ ...n.newItem, ...m }),
17269
17270
  clearError: h,
17270
17271
  validate: () => {
17271
- let p = !0;
17272
- if (n.items.forEach(({ item: m, id: w }) => {
17273
- let x = o(m);
17274
- Object.values(x).some((k) => k) && (p = !1, n.updateItem(w, { ...m, errors: x }));
17272
+ let m = !0;
17273
+ if (n.items.forEach(({ item: p, id: w }) => {
17274
+ let x = o(p);
17275
+ Object.values(x).some((k) => k) && (m = !1, n.updateItem(w, { ...p, errors: x }));
17275
17276
  }), r(n.newItem)) {
17276
- const m = o(n.newItem);
17277
- Object.values(m).some((w) => w) && (p = !1, n.setNewItem({ ...n.newItem, errors: m }));
17277
+ const p = o(n.newItem);
17278
+ Object.values(p).some((w) => w) && (m = !1, n.setNewItem({ ...n.newItem, errors: p }));
17278
17279
  }
17279
- return p;
17280
+ return m;
17280
17281
  }
17281
17282
  };
17282
17283
  }, vk = ne.create(() => {
@@ -17289,15 +17290,15 @@ const ak = ({
17289
17290
  } = kr(), [c, l] = Ue(
17290
17291
  r,
17291
17292
  ["navigation", "secondary_navigation"]
17292
- ).map((m) => JSON.parse(m || "[]")), A = Xi({
17293
+ ).map((p) => JSON.parse(p || "[]")), A = Xi({
17293
17294
  items: c,
17294
- setItems: (m) => {
17295
- n("navigation", JSON.stringify(m));
17295
+ setItems: (p) => {
17296
+ n("navigation", JSON.stringify(p));
17296
17297
  }
17297
17298
  }), u = Xi({
17298
17299
  items: l,
17299
- setItems: (m) => n("secondary_navigation", JSON.stringify(m))
17300
- }), [h, p] = G("primary-nav");
17300
+ setItems: (p) => n("secondary_navigation", JSON.stringify(p))
17301
+ }), [h, m] = G("primary-nav");
17301
17302
  return /* @__PURE__ */ s.jsx(
17302
17303
  ze,
17303
17304
  {
@@ -17306,7 +17307,7 @@ const ak = ({
17306
17307
  },
17307
17308
  buttonsDisabled: a === "saving",
17308
17309
  cancelLabel: "Close",
17309
- dirty: r.some((m) => m.dirty),
17310
+ dirty: r.some((p) => p.dirty),
17310
17311
  okLabel: a === "saving" ? "Saving..." : "Save",
17311
17312
  scrolling: !0,
17312
17313
  size: "lg",
@@ -17332,7 +17333,7 @@ const ak = ({
17332
17333
  contents: /* @__PURE__ */ s.jsx(Ki, { baseUrl: i.url, navigation: u })
17333
17334
  }
17334
17335
  ],
17335
- onTabChange: p
17336
+ onTabChange: m
17336
17337
  }
17337
17338
  ) })
17338
17339
  }
@@ -17350,8 +17351,8 @@ const ak = ({
17350
17351
  titleAlignment: A,
17351
17352
  titleFontCategory: u,
17352
17353
  bodyFontCategory: h,
17353
- authorPlaceholder: p,
17354
- showCommentCta: m,
17354
+ authorPlaceholder: m,
17355
+ showCommentCta: p,
17355
17356
  showFeatureImage: w,
17356
17357
  showFeedback: x,
17357
17358
  showLatestPosts: k,
@@ -17417,7 +17418,7 @@ const ak = ({
17417
17418
  ), children: [
17418
17419
  /* @__PURE__ */ s.jsxs("p", { className: "pb-1 text-[1.3rem]", style: { color: z }, children: [
17419
17420
  "By ",
17420
- p,
17421
+ m,
17421
17422
  /* @__PURE__ */ s.jsx("span", { className: "before:pl-0.5 before:pr-1 before:content-['•']", children: L })
17422
17423
  ] }),
17423
17424
  /* @__PURE__ */ s.jsx("p", { className: "pb-1 text-[1.3rem] underline", style: { color: z }, children: /* @__PURE__ */ s.jsx("span", { children: "View in browser" }) })
@@ -17439,7 +17440,7 @@ const ak = ({
17439
17440
  /* @__PURE__ */ s.jsx("p", { className: "mb-5", style: { color: X }, children: "Over there on the right you'll see some settings that allow you to customize the look and feel of this template to make it perfectly suited to your brand. Email templates are exceptionally finnicky to make, but we've spent a long time optimising this one to make it work beautifully across devices, email clients and content types." }),
17440
17441
  /* @__PURE__ */ s.jsx("p", { className: "mb-5", style: { color: X }, children: "So, you can trust that every email you send with Ghost will look great and work well. Just like the rest of your site." })
17441
17442
  ] }),
17442
- (x || m) && /* @__PURE__ */ s.jsx("div", { className: "grid gap-5 border-b border-grey-200 px-6 py-5", style: { borderColor: F }, children: /* @__PURE__ */ s.jsxs("div", { className: "flex justify-center gap-3", children: [
17443
+ (x || p) && /* @__PURE__ */ s.jsx("div", { className: "grid gap-5 border-b border-grey-200 px-6 py-5", style: { borderColor: F }, children: /* @__PURE__ */ s.jsxs("div", { className: "flex justify-center gap-3", children: [
17443
17444
  x && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
17444
17445
  /* @__PURE__ */ s.jsx("button", { className: "pointer-events-none cursor-default whitespace-nowrap rounded-[2.2rem] bg-transparent font-semibold", type: "button", children: /* @__PURE__ */ s.jsxs("span", { className: "inline-flex items-center gap-2 px-[18px] py-[7px]", style: { color: X }, children: [
17445
17446
  /* @__PURE__ */ s.jsx(Ge, { colorClass: "", name: "thumbs-up", size: "md" }),
@@ -17450,7 +17451,7 @@ const ak = ({
17450
17451
  /* @__PURE__ */ s.jsx("span", { children: "Less like this" })
17451
17452
  ] }) })
17452
17453
  ] }),
17453
- m && /* @__PURE__ */ s.jsx("button", { className: "pointer-events-none cursor-default whitespace-nowrap rounded-[2.2rem] bg-transparent font-semibold", type: "button", children: /* @__PURE__ */ s.jsxs("span", { className: "inline-flex items-center gap-2 px-[18px] py-[7px]", style: { color: X }, children: [
17454
+ p && /* @__PURE__ */ s.jsx("button", { className: "pointer-events-none cursor-default whitespace-nowrap rounded-[2.2rem] bg-transparent font-semibold", type: "button", children: /* @__PURE__ */ s.jsxs("span", { className: "inline-flex items-center gap-2 px-[18px] py-[7px]", style: { color: X }, children: [
17454
17455
  /* @__PURE__ */ s.jsx(Ge, { colorClass: "", name: "comment" }),
17455
17456
  /* @__PURE__ */ s.jsx("span", { children: "Comment" })
17456
17457
  ] }) })
@@ -17517,7 +17518,7 @@ const ak = ({
17517
17518
  const t = bn("emailCustomization"), { currentUser: r, settings: n, siteData: a, config: o } = Te(), [i, c, l, A, u] = Ue(n, ["title", "icon", "comments_enabled", "support_email_address", "default_email_address"]);
17518
17519
  let h = null;
17519
17520
  e.show_header_title ? h = i || null : e.show_header_name && (h = e.name);
17520
- const p = e.show_header_title && e.show_header_name ? e.name : void 0, m = e.show_comment_cta && l !== "off", w = e.feedback_enabled && o.labs.audienceFeedback, x = () => {
17521
+ const m = e.show_header_title && e.show_header_name ? e.name : void 0, p = e.show_comment_cta && l !== "off", w = e.feedback_enabled && o.labs.audienceFeedback, x = () => {
17521
17522
  const O = e.background_color;
17522
17523
  return /#([0-9a-f]{3}){1,2}$/i.test(O) ? O : O === "dark" ? "#15212a" : "#ffffff";
17523
17524
  }, k = () => {
@@ -17544,13 +17545,13 @@ const ak = ({
17544
17545
  footerContent: e.footer_content,
17545
17546
  headerIcon: e.show_header_icon ? c : void 0,
17546
17547
  headerImage: e.header_image,
17547
- headerSubtitle: p,
17548
+ headerSubtitle: m,
17548
17549
  headerTitle: h,
17549
17550
  senderEmail: wa(e, o, u),
17550
17551
  senderName: e.sender_name || i,
17551
17552
  senderReplyTo: fs(e, o, A, u),
17552
17553
  showBadge: e.show_badge,
17553
- showCommentCta: m,
17554
+ showCommentCta: p,
17554
17555
  showExcerpt: e.show_excerpt,
17555
17556
  showFeatureImage: e.show_feature_image,
17556
17557
  showFeedback: w,
@@ -17566,22 +17567,22 @@ const ak = ({
17566
17567
  }, Ik = ({ newsletter: e, updateNewsletter: t, errors: r, clearError: n }) => {
17567
17568
  const { settings: a, config: o } = Te(), [i, c] = Ue(a, ["default_email_address", "support_email_address"]), l = bn("newEmailAddresses"), [A, u] = G(fs(e, o, c, i) || "");
17568
17569
  let h = wa(e, o, i);
17569
- const p = xt(() => [
17570
+ const m = xt(() => [
17570
17571
  { label: `Newsletter address (${h})`, value: "newsletter" },
17571
17572
  { label: `Support address (${c})`, value: "support" }
17572
17573
  ], [h, c]);
17573
17574
  ie(() => {
17574
- !fn(o) && !l && (p.find((k) => k.value === e.sender_reply_to) || t({ sender_reply_to: "newsletter" }));
17575
- }, [o, p, t, e.sender_reply_to, l]);
17576
- const m = it((x) => {
17575
+ !fn(o) && !l && (m.find((k) => k.value === e.sender_reply_to) || t({ sender_reply_to: "newsletter" }));
17576
+ }, [o, m, t, e.sender_reply_to, l]);
17577
+ const p = it((x) => {
17577
17578
  u(x.target.value), t({ sender_reply_to: x.target.value || "newsletter" });
17578
17579
  }, [t, u]);
17579
17580
  if (!fn(o) && !l)
17580
17581
  return /* @__PURE__ */ s.jsx(
17581
17582
  pt,
17582
17583
  {
17583
- options: p,
17584
- selectedOption: p.find((x) => x.value === e.sender_reply_to),
17584
+ options: m,
17585
+ selectedOption: m.find((x) => x.value === e.sender_reply_to),
17585
17586
  title: "Reply-to email",
17586
17587
  onSelect: (x) => t({ sender_reply_to: x == null ? void 0 : x.value })
17587
17588
  }
@@ -17600,13 +17601,13 @@ const ak = ({
17600
17601
  title: "Reply-to email",
17601
17602
  value: A,
17602
17603
  onBlur: w,
17603
- onChange: m,
17604
+ onChange: p,
17604
17605
  onKeyDown: () => n("sender_reply_to")
17605
17606
  }
17606
17607
  );
17607
17608
  }, Jk = ({ newsletter: e, onlyOne: t, updateNewsletter: r, validate: n, errors: a, clearError: o }) => {
17608
- const { updateRoute: i } = ye(), { mutateAsync: c } = hl(), l = Zr(), { settings: A, siteData: u, config: h } = Te(), [p, m] = Ue(A, ["icon", "default_email_address", "support_email_address"]), { mutateAsync: w } = Pr(), [x, k] = G("generalSettings"), y = bn("emailCustomization"), { localSettings: I } = kr(), [C] = Ue(I, ["title"]), R = je(), { data: { newsletters: U } = {} } = ws();
17609
- let O = wa(e, h, m);
17609
+ const { updateRoute: i } = ye(), { mutateAsync: c } = hl(), l = Zr(), { settings: A, siteData: u, config: h } = Te(), [m, p] = Ue(A, ["icon", "default_email_address", "support_email_address"]), { mutateAsync: w } = Pr(), [x, k] = G("generalSettings"), y = bn("emailCustomization"), { localSettings: I } = kr(), [C] = Ue(I, ["title"]), R = je(), { data: { newsletters: U } = {} } = ws();
17610
+ let O = wa(e, h, p);
17610
17611
  const [F, Y] = G(U || []), X = F.filter((E) => E.status === "active");
17611
17612
  ie(() => {
17612
17613
  Y(U || []);
@@ -17689,7 +17690,7 @@ const ak = ({
17689
17690
  error: !!a.sender_email,
17690
17691
  hint: a.sender_email,
17691
17692
  maxLength: 191,
17692
- placeholder: m,
17693
+ placeholder: p,
17693
17694
  title: "Sender email address",
17694
17695
  value: e.sender_email || "",
17695
17696
  onChange: (E) => {
@@ -17770,7 +17771,7 @@ const ak = ({
17770
17771
  ] })
17771
17772
  ] }),
17772
17773
  /* @__PURE__ */ s.jsxs(cn, { children: [
17773
- p && /* @__PURE__ */ s.jsx(
17774
+ m && /* @__PURE__ */ s.jsx(
17774
17775
  De,
17775
17776
  {
17776
17777
  checked: e.show_header_icon,
@@ -18027,7 +18028,7 @@ const ak = ({
18027
18028
  };
18028
18029
  return /* @__PURE__ */ s.jsx("div", { className: "flex flex-col", children: /* @__PURE__ */ s.jsx("div", { className: "px-7 pb-7 pt-5", children: /* @__PURE__ */ s.jsx(pr, { selectedTab: x, tabs: L, onTabChange: Z }) }) });
18029
18030
  }, Tk = ({ newsletter: e, onlyOne: t }) => {
18030
- const { config: r } = Te(), { mutateAsync: n } = hl(), { updateRoute: a } = ye(), o = je(), { formState: i, saveState: c, updateForm: l, setFormState: A, handleSave: u, validate: h, errors: p, clearError: m, okProps: w } = St({
18031
+ const { config: r } = Te(), { mutateAsync: n } = hl(), { updateRoute: a } = ye(), o = je(), { formState: i, saveState: c, updateForm: l, setFormState: A, handleSave: u, validate: h, errors: m, clearError: p, okProps: w } = St({
18031
18032
  initialState: e,
18032
18033
  savingDelay: 500,
18033
18034
  onSave: async () => {
@@ -18050,7 +18051,7 @@ const ak = ({
18050
18051
  ie(() => {
18051
18052
  A(() => e);
18052
18053
  }, [A, e]);
18053
- const k = /* @__PURE__ */ s.jsx(Sk, { newsletter: i }), y = /* @__PURE__ */ s.jsx(Jk, { clearError: m, errors: p, newsletter: i, onlyOne: t, updateNewsletter: x, validate: h });
18054
+ const k = /* @__PURE__ */ s.jsx(Sk, { newsletter: i }), y = /* @__PURE__ */ s.jsx(Jk, { clearError: p, errors: m, newsletter: i, onlyOne: t, updateNewsletter: x, validate: h });
18054
18055
  return /* @__PURE__ */ s.jsx(
18055
18056
  Fr,
18056
18057
  {
@@ -18102,9 +18103,9 @@ const ak = ({
18102
18103
  return `${encodeURIComponent((n == null ? void 0 : n.name) || "")} — Check out ${encodeURIComponent(x)} on:`;
18103
18104
  }, h = async () => {
18104
18105
  await navigator.clipboard.writeText(o), A(!0), setTimeout(() => A(!1), 2e3);
18105
- }, p = () => {
18106
- window.open(`https://twitter.com/intent/tweet?url=${encodeURI(o)}&text=${u()}`, "_blank");
18107
18106
  }, m = () => {
18107
+ window.open(`https://twitter.com/intent/tweet?url=${encodeURI(o)}&text=${u()}`, "_blank");
18108
+ }, p = () => {
18108
18109
  window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURI(o)}`, "_blank");
18109
18110
  }, w = () => {
18110
18111
  window.open(`http://www.linkedin.com/shareArticle?mini=true&url=${encodeURI(o)}&title=${u()}`, "_blank");
@@ -18150,8 +18151,8 @@ const ak = ({
18150
18151
  ] }),
18151
18152
  /* @__PURE__ */ s.jsx("div", { className: 'flex items-center gap-4 text-xs font-medium before:h-px before:grow before:bg-grey-300 before:content-[""] after:h-px after:grow after:bg-grey-300 after:content-[""] dark:before:bg-grey-800 dark:after:bg-grey-800', children: "OR" }),
18152
18153
  /* @__PURE__ */ s.jsxs("div", { className: "flex gap-2", children: [
18153
- /* @__PURE__ */ s.jsx(pe, { className: "h-8 border border-grey-300 dark:border-grey-800", icon: "twitter-x", iconColorClass: "w-[14px] h-[14px]", size: "sm", fullWidth: !0, onClick: p }),
18154
- /* @__PURE__ */ s.jsx(pe, { className: "h-8 border border-grey-300 dark:border-grey-800", icon: "facebook", size: "sm", fullWidth: !0, onClick: m }),
18154
+ /* @__PURE__ */ s.jsx(pe, { className: "h-8 border border-grey-300 dark:border-grey-800", icon: "twitter-x", iconColorClass: "w-[14px] h-[14px]", size: "sm", fullWidth: !0, onClick: m }),
18155
+ /* @__PURE__ */ s.jsx(pe, { className: "h-8 border border-grey-300 dark:border-grey-800", icon: "facebook", size: "sm", fullWidth: !0, onClick: p }),
18155
18156
  /* @__PURE__ */ s.jsx(pe, { className: "h-8 border border-grey-300 dark:border-grey-800", icon: "linkedin", size: "sm", fullWidth: !0, onClick: w })
18156
18157
  ] })
18157
18158
  ] })
@@ -18166,14 +18167,14 @@ const ak = ({
18166
18167
  }, 300);
18167
18168
  }, [a]);
18168
18169
  if (ie(() => {
18169
- const p = (m) => {
18170
+ const m = (p) => {
18170
18171
  var x;
18171
18172
  if (!e)
18172
18173
  return;
18173
- new URL(m.origin).origin === new URL(e).origin && ((x = m == null ? void 0 : m.data) == null ? void 0 : x.type) === "portal-preview-ready" && A();
18174
+ new URL(p.origin).origin === new URL(e).origin && ((x = p == null ? void 0 : p.data) == null ? void 0 : x.type) === "portal-preview-ready" && A();
18174
18175
  };
18175
- return window.addEventListener("message", p, !0), () => {
18176
- window.removeEventListener("message", p, !0), t == null || t();
18176
+ return window.addEventListener("message", m, !0), () => {
18177
+ window.removeEventListener("message", m, !0), t == null || t();
18177
18178
  };
18178
18179
  }, [e, t, A, o]), !e)
18179
18180
  return null;
@@ -18208,13 +18209,13 @@ const ak = ({
18208
18209
  amount: A = 0,
18209
18210
  duration: u,
18210
18211
  durationInMonths: h,
18211
- currency: p = "usd",
18212
- status: m,
18212
+ currency: m = "usd",
18213
+ status: p,
18213
18214
  tierId: w
18214
18215
  } = e;
18215
18216
  t = t.replace(/\/$/, "");
18216
18217
  const x = "/?v=modal-portal-offer#/portal/preview/offer", k = new URLSearchParams();
18217
- return k.append("disableBackground", "false"), k.append("name", encodeURIComponent(n)), k.append("code", encodeURIComponent(a)), k.append("display_title", encodeURIComponent(o)), k.append("display_description", encodeURIComponent(i)), k.append("type", encodeURIComponent(c)), k.append("cadence", encodeURIComponent(l)), k.append("amount", encodeURIComponent(A)), k.append("duration", encodeURIComponent(u)), k.append("duration_in_months", encodeURIComponent(h)), k.append("currency", encodeURIComponent(p)), k.append("status", encodeURIComponent(m)), k.append("tier_id", encodeURIComponent(w)), r && k.append("disableBackground", "true"), `${t}${x}?${k.toString()}`;
18218
+ return k.append("disableBackground", "false"), k.append("name", encodeURIComponent(n)), k.append("code", encodeURIComponent(a)), k.append("display_title", encodeURIComponent(o)), k.append("display_description", encodeURIComponent(i)), k.append("type", encodeURIComponent(c)), k.append("cadence", encodeURIComponent(l)), k.append("amount", encodeURIComponent(A)), k.append("duration", encodeURIComponent(u)), k.append("duration_in_months", encodeURIComponent(h)), k.append("currency", encodeURIComponent(m)), k.append("status", encodeURIComponent(p)), k.append("tier_id", encodeURIComponent(w)), r && k.append("disableBackground", "true"), `${t}${x}?${k.toString()}`;
18218
18219
  }, jk = (e) => {
18219
18220
  const t = [];
18220
18221
  return e.forEach((r) => {
@@ -18265,8 +18266,8 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
18265
18266
  handleNameInput: A,
18266
18267
  handleTextAreaInput: u,
18267
18268
  handleDisplayTitleInput: h,
18268
- handleDurationInMonthsInput: p,
18269
- handleAmountInput: m,
18269
+ handleDurationInMonthsInput: m,
18270
+ handleAmountInput: p,
18270
18271
  handleCodeInput: w,
18271
18272
  clearError: x,
18272
18273
  errors: k,
@@ -18367,7 +18368,7 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
18367
18368
  type: "number",
18368
18369
  value: c.type === "fixed" ? c.fixedAmount === 0 ? "" : (Z = c.fixedAmount) == null ? void 0 : Z.toString() : c.percentAmount === 0 ? "" : (E = c.percentAmount) == null ? void 0 : E.toString(),
18369
18370
  onChange: ($) => {
18370
- m($);
18371
+ p($);
18371
18372
  },
18372
18373
  onKeyDown: () => x("amount")
18373
18374
  }
@@ -18397,7 +18398,7 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
18397
18398
  }
18398
18399
  ),
18399
18400
  c.duration === "repeating" && /* @__PURE__ */ s.jsx(ce, { title: "Duration in months", type: "number", onChange: ($) => {
18400
- p($);
18401
+ m($);
18401
18402
  } })
18402
18403
  ] }),
18403
18404
  c.type === "trial" && /* @__PURE__ */ s.jsx(
@@ -18459,7 +18460,7 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
18459
18460
  period: (ae = l[0]) != null && ae.value ? dr((q = l[0]) == null ? void 0 : q.value).period : "",
18460
18461
  currency: (me = l[0]) != null && me.value ? dr((_e = l[0]) == null ? void 0 : _e.value).currency : ""
18461
18462
  }
18462
- }), { data: { offers: p = [] } = {} } = Nh(), { formState: m, updateForm: w, handleSave: x, saveState: k, okProps: y, validate: I, errors: C, clearError: R } = St({
18463
+ }), { data: { offers: m = [] } = {} } = Nh(), { formState: p, updateForm: w, handleSave: x, saveState: k, okProps: y, validate: I, errors: C, clearError: R } = St({
18463
18464
  initialState: {
18464
18465
  disableBackground: !1,
18465
18466
  name: "",
@@ -18486,20 +18487,20 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
18486
18487
  },
18487
18488
  onSave: async () => {
18488
18489
  const P = {
18489
- name: m.name,
18490
- code: m.code.value,
18491
- display_title: m.displayTitle.value,
18492
- display_description: m.displayDescription,
18493
- cadence: m.cadence,
18494
- amount: qi(m) || 0,
18495
- duration: m.type === "trial" ? "trial" : m.duration,
18496
- duration_in_months: Number(m.durationInMonths),
18497
- currency: m.currency,
18498
- status: m.status,
18490
+ name: p.name,
18491
+ code: p.code.value,
18492
+ display_title: p.displayTitle.value,
18493
+ display_description: p.displayDescription,
18494
+ cadence: p.cadence,
18495
+ amount: qi(p) || 0,
18496
+ duration: p.type === "trial" ? "trial" : p.duration,
18497
+ duration_in_months: Number(p.durationInMonths),
18498
+ currency: p.currency,
18499
+ status: p.status,
18499
18500
  tier: {
18500
- id: m.tierId
18501
+ id: p.tierId
18501
18502
  },
18502
- type: m.type,
18503
+ type: p.type,
18503
18504
  currency_restriction: !1
18504
18505
  }, oe = await A(P);
18505
18506
  oe && oe.offers && oe.offers.length > 0 && o(`offers/success/${oe.offers[0].id}`);
@@ -18508,12 +18509,12 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
18508
18509
  },
18509
18510
  onValidate: () => {
18510
18511
  const P = {};
18511
- return !m.name && m.name.length === 0 && (P.name = "Name is required"), !m.code.value && m.code.value.length === 0 && (P.code = "Code is required"), !m.displayTitle.value && m.displayTitle.value.length === 0 && (P.displayTitle = "Display title is required"), m.type === "percent" && m.percentAmount === 0 && (P.amount = "Enter an amount greater than 0."), m.type === "percent" && (m.percentAmount < 0 || m.percentAmount > 100) && (P.amount = "Amount must be between 0 and 100%."), (m.type === "fixed" && m.fixedAmount === 0 || m.type === "fixed" && m.fixedAmount < 1) && (P.amount = "Enter an amount greater than 0."), m.type === "trial" && m.trialAmount === 0 && (P.amount = "Enter an amount greater than 0."), m.type === "trial" && m.trialAmount < 1 && (P.amount = "Free trial must be at least 1 day."), P;
18512
+ return !p.name && p.name.length === 0 && (P.name = "Name is required"), !p.code.value && p.code.value.length === 0 && (P.code = "Code is required"), !p.displayTitle.value && p.displayTitle.value.length === 0 && (P.displayTitle = "Display title is required"), p.type === "percent" && p.percentAmount === 0 && (P.amount = "Enter an amount greater than 0."), p.type === "percent" && (p.percentAmount < 0 || p.percentAmount > 100) && (P.amount = "Amount must be between 0 and 100%."), (p.type === "fixed" && p.fixedAmount === 0 || p.type === "fixed" && p.fixedAmount < 1) && (P.amount = "Enter an amount greater than 0."), p.type === "trial" && p.trialAmount === 0 && (P.amount = "Enter an amount greater than 0."), p.type === "trial" && p.trialAmount < 1 && (P.amount = "Free trial must be at least 1 day."), P;
18512
18513
  },
18513
18514
  savingDelay: 500
18514
18515
  }), U = [
18515
18516
  { value: "percent", label: "%" },
18516
- { value: "fixed", label: m.currency }
18517
+ { value: "fixed", label: p.currency }
18517
18518
  ], O = (P) => {
18518
18519
  h({
18519
18520
  tier: P,
@@ -18536,10 +18537,10 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
18536
18537
  }));
18537
18538
  }, X = (P) => {
18538
18539
  const oe = P.target;
18539
- m.type === "fixed" ? w((de) => ({
18540
+ p.type === "fixed" ? w((de) => ({
18540
18541
  ...de,
18541
18542
  fixedAmount: Number(oe.value)
18542
- })) : m.type === "percent" ? w((de) => ({
18543
+ })) : p.type === "percent" ? w((de) => ({
18543
18544
  ...de,
18544
18545
  percentAmount: Number(oe.value)
18545
18546
  })) : w((de) => ({
@@ -18602,28 +18603,28 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
18602
18603
  }
18603
18604
  }));
18604
18605
  }, Q = () => {
18605
- p.length > 0 ? o("offers/edit") : o("offers");
18606
+ m.length > 0 ? o("offers/edit") : o("offers");
18606
18607
  }, $ = xt(() => {
18607
18608
  var P;
18608
18609
  return {
18609
- name: m.name || "",
18610
- code: m.code.value || "",
18611
- displayTitle: m.displayTitle.value || "",
18612
- displayDescription: m.displayDescription || "",
18613
- type: m.type || "percent",
18614
- cadence: m.cadence || "month",
18615
- amount: qi(m) || 0,
18616
- duration: m.type === "trial" ? "trial" : m.duration || "once",
18617
- durationInMonths: m.durationInMonths || 0,
18618
- currency: m.currency || "USD",
18619
- status: m.status || "active",
18620
- tierId: m.tierId || ((P = c[0]) == null ? void 0 : P.id)
18610
+ name: p.name || "",
18611
+ code: p.code.value || "",
18612
+ displayTitle: p.displayTitle.value || "",
18613
+ displayDescription: p.displayDescription || "",
18614
+ type: p.type || "percent",
18615
+ cadence: p.cadence || "month",
18616
+ amount: qi(p) || 0,
18617
+ duration: p.type === "trial" ? "trial" : p.duration || "once",
18618
+ durationInMonths: p.durationInMonths || 0,
18619
+ currency: p.currency || "USD",
18620
+ status: p.status || "active",
18621
+ tierId: p.tierId || ((P = c[0]) == null ? void 0 : P.id)
18621
18622
  };
18622
- }, [m, c]);
18623
+ }, [p, c]);
18623
18624
  ie(() => {
18624
18625
  const P = _A($, e.url);
18625
18626
  a(P);
18626
- }, [m, e.url, m.type, $]);
18627
+ }, [p, e.url, p.type, $]);
18627
18628
  const ue = /* @__PURE__ */ s.jsx(
18628
18629
  Ok,
18629
18630
  {
@@ -18642,7 +18643,7 @@ const Wi = ({ type: e, checked: t, onClick: r }) => {
18642
18643
  handleTierChange: O,
18643
18644
  handleTrialAmountInput: L,
18644
18645
  handleTypeChange: F,
18645
- overrides: m,
18646
+ overrides: p,
18646
18647
  selectedTier: u.tier,
18647
18648
  testId: "add-offer-sidebar",
18648
18649
  tierOptions: l,
@@ -18709,11 +18710,11 @@ function Vi(e) {
18709
18710
  });
18710
18711
  }
18711
18712
  const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
18712
- const { siteData: a } = Te(), [o, i] = G(!1), c = je(), { mutateAsync: l } = ml(), [A, u] = G((r == null ? void 0 : r.name.length) || 0), h = A > 40 ? "text-red" : "text-green", { updateRoute: p } = ye();
18713
+ const { siteData: a } = Te(), [o, i] = G(!1), c = je(), { mutateAsync: l } = ml(), [A, u] = G((r == null ? void 0 : r.name.length) || 0), h = A > 40 ? "text-red" : "text-green", { updateRoute: m } = ye();
18713
18714
  ie(() => {
18714
18715
  r != null && r.name && u(r == null ? void 0 : r.name.length);
18715
18716
  }, [r == null ? void 0 : r.name]);
18716
- const m = Ft(a), w = `${m}${r == null ? void 0 : r.code}`, x = async () => {
18717
+ const p = Ft(a), w = `${p}${r == null ? void 0 : r.code}`, x = async () => {
18717
18718
  await navigator.clipboard.writeText(w), i(!0), setTimeout(() => i(!1), 2e3);
18718
18719
  }, k = async () => {
18719
18720
  (r == null ? void 0 : r.status) === "active" ? ne.show(We, {
@@ -18733,7 +18734,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
18733
18734
  await l({ ...r, status: "archived" }), y == null || y.remove(), Le({
18734
18735
  type: "success",
18735
18736
  title: "Offer archived"
18736
- }), p("offers/edit");
18737
+ }), m("offers/edit");
18737
18738
  } catch (I) {
18738
18739
  c(I);
18739
18740
  }
@@ -18751,7 +18752,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
18751
18752
  await l({ ...r, status: "active" }), y == null || y.remove(), Le({
18752
18753
  type: "success",
18753
18754
  title: "Offer reactivated"
18754
- }), p("offers/edit");
18755
+ }), m("offers/edit");
18755
18756
  } catch (I) {
18756
18757
  c(I);
18757
18758
  }
@@ -18834,7 +18835,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
18834
18835
  error: !!t.code,
18835
18836
  hint: t.code || ((r == null ? void 0 : r.code) !== "" ? /* @__PURE__ */ s.jsxs("div", { className: "flex items-center justify-between", children: [
18836
18837
  /* @__PURE__ */ s.jsxs("div", { children: [
18837
- m,
18838
+ p,
18838
18839
  /* @__PURE__ */ s.jsx("span", { className: "font-bold", children: r == null ? void 0 : r.code })
18839
18840
  ] }),
18840
18841
  /* @__PURE__ */ s.jsx("span", {}),
@@ -18853,7 +18854,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
18853
18854
  /* @__PURE__ */ s.jsx("div", { className: "mb-2", children: (r == null ? void 0 : r.status) === "active" ? /* @__PURE__ */ s.jsx(pe, { color: "red", label: "Archive offer", link: !0, onClick: k }) : /* @__PURE__ */ s.jsx(pe, { color: "green", label: "Reactivate offer", link: !0, onClick: k }) })
18854
18855
  ] });
18855
18856
  }, Hk = ({ id: e }) => {
18856
- const { siteData: t } = Te(), { updateRoute: r } = ye(), n = je(), { mutateAsync: a } = ml(), [o, i] = G(""), { data: { offers: c = [] } = {} } = fl(e || ""), { formState: l, saveState: A, updateForm: u, setFormState: h, handleSave: p, validate: m, errors: w, clearError: x, okProps: k } = St({
18857
+ const { siteData: t } = Te(), { updateRoute: r } = ye(), n = je(), { mutateAsync: a } = ml(), [o, i] = G(""), { data: { offers: c = [] } = {} } = fl(e || ""), { formState: l, saveState: A, updateForm: u, setFormState: h, handleSave: m, validate: p, errors: w, clearError: x, okProps: k } = St({
18857
18858
  initialState: c[0],
18858
18859
  savingDelay: 500,
18859
18860
  onSave: async () => {
@@ -18877,7 +18878,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
18877
18878
  errors: w,
18878
18879
  offer: l,
18879
18880
  updateOffer: y,
18880
- validate: m
18881
+ validate: p
18881
18882
  }
18882
18883
  );
18883
18884
  ie(() => {
@@ -18929,7 +18930,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
18929
18930
  },
18930
18931
  onOk: async () => {
18931
18932
  try {
18932
- if (await p({ force: !0 }))
18933
+ if (await m({ force: !0 }))
18933
18934
  return;
18934
18935
  } catch (R) {
18935
18936
  let U;
@@ -18969,9 +18970,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
18969
18970
  css: !1
18970
18971
  }), { settings: n, config: a } = Te(), [o] = Ue(n, ["pintura"]), { mutateAsync: i } = ar(), { mutateAsync: c } = Pk(), l = je();
18971
18972
  ie(() => {
18972
- p(o || !1);
18973
+ m(o || !1);
18973
18974
  }, [o]);
18974
- const [A, u] = G("Save"), [h, p] = G(!!o), m = async () => {
18975
+ const [A, u] = G("Save"), [h, m] = G(!!o), p = async () => {
18975
18976
  const C = [
18976
18977
  { key: "pintura", value: h }
18977
18978
  ];
@@ -19020,7 +19021,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19020
19021
  okLabel: A,
19021
19022
  testId: "pintura-modal",
19022
19023
  title: "",
19023
- onOk: m,
19024
+ onOk: p,
19024
19025
  children: [
19025
19026
  /* @__PURE__ */ s.jsx(
19026
19027
  Gr,
@@ -19055,7 +19056,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19055
19056
  ] }),
19056
19057
  label: "Enable Pintura",
19057
19058
  onChange: (C) => {
19058
- p(C.target.checked);
19059
+ m(C.target.checked);
19059
19060
  }
19060
19061
  }
19061
19062
  ),
@@ -19099,8 +19100,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19099
19100
  }
19100
19101
  );
19101
19102
  }), Fk = ({ updateSetting: e, errors: t, setError: r }) => {
19102
- const { siteData: n, settings: a, config: o } = Te(), [i, c] = Ue(a, ["members_support_address", "support_email_address"]), l = (c == null ? void 0 : c.toString()) || _a((i == null ? void 0 : i.toString()) || "", n, o), A = Lh(n, o), [u, h] = G(l), p = (m) => {
19103
- let w = m.target.value;
19103
+ const { siteData: n, settings: a, config: o } = Te(), [i, c] = Ue(a, ["members_support_address", "support_email_address"]), l = (c == null ? void 0 : c.toString()) || _a((i == null ? void 0 : i.toString()) || "", n, o), A = Lh(n, o), [u, h] = G(l), m = (p) => {
19104
+ let w = p.target.value;
19104
19105
  w ? Ut.isEmail(w) ? r("members_support_address", "") : r("members_support_address", "Enter a valid email address") : r("members_support_address", "Enter an email address");
19105
19106
  let x = A && w === `noreply@${A}` ? "noreply" : w;
19106
19107
  e("members_support_address", x), h(_a(x, n, o));
@@ -19114,8 +19115,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19114
19115
  hint: t.members_support_address,
19115
19116
  title: "Support email address",
19116
19117
  value: u,
19117
- onBlur: p,
19118
- onChange: (m) => h(m.target.value)
19118
+ onBlur: m,
19119
+ onChange: (p) => h(p.target.value)
19119
19120
  }
19120
19121
  ) }) });
19121
19122
  }, Zk = (e) => /* @__PURE__ */ Me("svg", { width: 21, height: 24, viewBox: "0 0 21 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Me("title", null, "portal-icon-1"), /* @__PURE__ */ Me("path", { d: "M10.533 11.267a5.135 5.135 0 1 0-.001-10.27 5.135 5.135 0 0 0 .001 10.27zM1 23a9.531 9.531 0 0 1 16.274-6.741 9.532 9.532 0 0 1 2.793 6.74", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Gk = (e) => /* @__PURE__ */ Me("svg", { width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Me("title", null, "portal-icon-2"), /* @__PURE__ */ Me("path", { stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", d: "M12.5 2v20M2 12.5h20", fill: "none" })), Kk = (e) => /* @__PURE__ */ Me("svg", { width: 25, height: 24, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Me("title", null, "portal-icon-3"), /* @__PURE__ */ Me("path", { d: "M23.5 6v14.25a2.25 2.25 0 1 1-4.5 0V3c0-.398-.158-.78-.44-1.06a1.494 1.494 0 0 0-1.06-.44h-15c-.398 0-.78.158-1.06.44C1.157 2.22 1 2.601 1 3v17.25a2.25 2.25 0 0 0 2.25 2.25h18M4.75 15h10.5m-10.5 3h6", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ Me("path", { d: "M14.5 5.25h-9a.75.75 0 0 0-.75.75v4.5c0 .414.336.75.75.75h9a.75.75 0 0 0 .75-.75V6a.75.75 0 0 0-.75-.75z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Xk = (e) => /* @__PURE__ */ Me("svg", { width: 24, height: 18, viewBox: "0 0 24 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Me("title", null, "portal-icon-4"), /* @__PURE__ */ Me("path", { d: "M21.75 1.5H2.25A1.5 1.5 0 0 0 .75 3v12a1.5 1.5 0 0 0 1.5 1.5h19.5a1.5 1.5 0 0 0 1.5-1.5V3a1.5 1.5 0 0 0-1.5-1.5zm-6.063 5.475L19.5 10.5M8.313 6.975 4.5 10.5", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ Me("path", { d: "m22.88 2.014-9.513 6.56a2.41 2.41 0 0 1-2.734 0L1.12 2.014", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Wk = (e) => /* @__PURE__ */ Me("svg", { width: 26, height: 26, viewBox: "0 0 26 26", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ Me("title", null, "portal-icon-5"), /* @__PURE__ */ Me("path", { d: "M17.903 12.016a5.007 5.007 0 0 0-3.031-3.654m-3.835.038a5.002 5.002 0 0 0-2.879 5.85m2.282 3.046A4.975 4.975 0 0 0 13 18a4.99 4.99 0 0 0 4.12-2.167m-1.949 5.387a8.504 8.504 0 0 0 5.756-11.295m-2.316-3.31A8.474 8.474 0 0 0 13 4.5a8.461 8.461 0 0 0-5.608 2.113m-2.28 3.213a8.503 8.503 0 0 0 5.914 11.444", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" }), /* @__PURE__ */ Me("path", { d: "M8.924 24.29c1.273.46 2.645.71 4.076.71 5.52 0 10.17-3.727 11.57-8.803M6.712 2.777A11.994 11.994 0 0 0 1 13c0 3.545 1.537 6.731 3.982 8.928m19.867-10.839C23.933 5.369 18.977 1 13 1c-.69 0-1.367.058-2.025.17", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round" })), qa = [
@@ -19141,7 +19142,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19141
19142
  }
19142
19143
  ], qk = ({ localSettings: e, updateSetting: t }) => {
19143
19144
  var x, k;
19144
- const { mutateAsync: r } = Pr(), n = je(), [a, o, i, c] = Ue(e, ["portal_button", "portal_button_style", "portal_button_icon", "portal_button_signup_text"]), l = i || qa[0].value, A = qa.map(({ value: y }) => y).includes(l), [u, h] = G(A ? void 0 : l), p = async (y) => {
19145
+ const { mutateAsync: r } = Pr(), n = je(), [a, o, i, c] = Ue(e, ["portal_button", "portal_button_style", "portal_button_icon", "portal_button_signup_text"]), l = i || qa[0].value, A = qa.map(({ value: y }) => y).includes(l), [u, h] = G(A ? void 0 : l), m = async (y) => {
19145
19146
  try {
19146
19147
  const I = Yt(await r({ file: y }));
19147
19148
  t("portal_button_icon", I), h(I);
@@ -19149,7 +19150,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19149
19150
  const C = I;
19150
19151
  C.response.status === 415 && (C.message = "Unsupported file type"), n(C);
19151
19152
  }
19152
- }, m = () => {
19153
+ }, p = () => {
19153
19154
  t("portal_button_icon", null), h(void 0);
19154
19155
  }, w = [
19155
19156
  { value: "icon-and-text", label: "Icon and text" },
@@ -19190,9 +19191,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19190
19191
  imageURL: u,
19191
19192
  width: "46px",
19192
19193
  deleteButtonUnstyled: !0,
19193
- onDelete: m,
19194
+ onDelete: p,
19194
19195
  onImageClick: () => u && t("portal_button_icon", u),
19195
- onUpload: p,
19196
+ onUpload: m,
19196
19197
  children: /* @__PURE__ */ s.jsx(Ge, { className: "dark:text-white", name: "upload", size: "md" })
19197
19198
  }
19198
19199
  ) })
@@ -19289,10 +19290,10 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19289
19290
  let o = r.filter((x) => x.visibility === "public" && x.type === "paid").map((x) => x.id);
19290
19291
  const i = n.url.replace(/\/$/, ""), c = "/?v=modal-portal-settings#/portal/preview", l = JSON.parse(kt(e, "portal_plans") || ""), u = kt(e, "members_signup_access") === "all" && (!on(e, t) || l.includes("free")), h = new URLSearchParams();
19291
19292
  h.append("button", kt(e, "portal_button") ? "true" : "false"), h.append("name", kt(e, "portal_name") ? "true" : "false"), h.append("isFree", l.includes("free") ? "true" : "false"), h.append("isMonthly", on(e, t) && l.includes("monthly") ? "true" : "false"), h.append("isYearly", on(e, t) && l.includes("yearly") ? "true" : "false"), h.append("page", a === "account" ? "accountHome" : "signup"), h.append("buttonIcon", encodeURIComponent(kt(e, "portal_button_icon") || "icon-1")), h.append("signupButtonText", encodeURIComponent(kt(e, "portal_button_signup_text") || "")), h.append("membersSignupAccess", kt(e, "members_signup_access") || "all"), h.append("allowSelfSignup", u ? "true" : "false"), h.append("signupTermsHtml", kt(e, "portal_signup_terms_html") || ""), h.append("signupCheckboxRequired", kt(e, "portal_signup_checkbox_required") ? "true" : "false"), h.append("portalProducts", o.join(","));
19292
- const p = kt(e, "portal_default_plan");
19293
- p && h.append("portalDefaultPlan", p), l && l.length && h.append("portalPrices", encodeURIComponent(l.join(",")));
19294
- const m = kt(e, "accent_color");
19295
- m != null && h.append("accentColor", encodeURIComponent(m));
19293
+ const m = kt(e, "portal_default_plan");
19294
+ m && h.append("portalDefaultPlan", m), l && l.length && h.append("portalPrices", encodeURIComponent(l.join(",")));
19295
+ const p = kt(e, "accent_color");
19296
+ p != null && h.append("accentColor", encodeURIComponent(p));
19296
19297
  const w = kt(e, "portal_button_style");
19297
19298
  return w && h.append("buttonStyle", encodeURIComponent(w)), h.append("disableBackground", "false"), `${i}${c}?${h.toString()}`;
19298
19299
  }, $k = ({
@@ -19324,10 +19325,10 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19324
19325
  }
19325
19326
  return i;
19326
19327
  }, eb = ({ localSettings: e, updateSetting: t, localTiers: r, updateTier: n, errors: a, setError: o }) => {
19327
- const { config: i } = Te(), [c, l, A, u, h, p] = Ue(
19328
+ const { config: i } = Te(), [c, l, A, u, h, m] = Ue(
19328
19329
  e,
19329
19330
  ["members_signup_access", "portal_name", "portal_signup_terms_html", "portal_signup_checkbox_required", "portal_plans", "portal_default_plan"]
19330
- ), m = JSON.parse((h == null ? void 0 : h.toString()) || "[]"), w = 115, x = xt(() => {
19331
+ ), p = JSON.parse((h == null ? void 0 : h.toString()) || "[]"), w = 115, x = xt(() => {
19331
19332
  const Y = document.createElement("div");
19332
19333
  return Y.innerHTML = (A == null ? void 0 : A.toString()) || "", Y.innerText.length;
19333
19334
  }, [A]), k = it((Y, X) => {
@@ -19337,18 +19338,18 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19337
19338
  x > w ? k("portal_signup_terms_html", "Signup notice is too long") : k("portal_signup_terms_html", void 0);
19338
19339
  }, [x, k]);
19339
19340
  const y = (Y) => {
19340
- const X = m.indexOf(Y);
19341
- X === -1 ? m.push(Y) : m.splice(X, 1), t("portal_plans", JSON.stringify(m)), p === "yearly" ? !m.includes("yearly") && m.includes("monthly") && t("portal_default_plan", "monthly") : p === "monthly" && (m.includes("monthly") || t("portal_default_plan", "yearly"));
19341
+ const X = p.indexOf(Y);
19342
+ X === -1 ? p.push(Y) : p.splice(X, 1), t("portal_plans", JSON.stringify(p)), m === "yearly" ? !p.includes("yearly") && p.includes("monthly") && t("portal_default_plan", "monthly") : m === "monthly" && (p.includes("monthly") || t("portal_default_plan", "yearly"));
19342
19343
  }, I = c !== "all", C = on(e, i);
19343
19344
  let R = [];
19344
19345
  r && r.forEach((Y) => {
19345
19346
  Y.type === "free" && R.push({
19346
- checked: m.includes("free"),
19347
+ checked: p.includes("free"),
19347
19348
  disabled: I,
19348
19349
  label: Y.name,
19349
19350
  value: "free",
19350
19351
  onChange: (X) => {
19351
- m.includes("free") && !X && m.splice(m.indexOf("free"), 1), !m.includes("free") && X && m.push("free"), t("portal_plans", JSON.stringify(m)), n({ ...Y, visibility: X ? "public" : "none" });
19352
+ p.includes("free") && !X && p.splice(p.indexOf("free"), 1), !p.includes("free") && X && p.push("free"), t("portal_plans", JSON.stringify(p)), n({ ...Y, visibility: X ? "public" : "none" });
19352
19353
  }
19353
19354
  });
19354
19355
  });
@@ -19389,7 +19390,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19389
19390
  {
19390
19391
  checkboxes: [
19391
19392
  {
19392
- checked: m.includes("monthly"),
19393
+ checked: p.includes("monthly"),
19393
19394
  disabled: I,
19394
19395
  label: "Monthly",
19395
19396
  value: "monthly",
@@ -19398,7 +19399,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19398
19399
  }
19399
19400
  },
19400
19401
  {
19401
- checked: m.includes("yearly"),
19402
+ checked: p.includes("yearly"),
19402
19403
  disabled: I,
19403
19404
  label: "Yearly",
19404
19405
  value: "yearly",
@@ -19410,11 +19411,11 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19410
19411
  title: "Prices available at signup"
19411
19412
  }
19412
19413
  ),
19413
- m.includes("yearly") && m.includes("monthly") && /* @__PURE__ */ s.jsx(
19414
+ p.includes("yearly") && p.includes("monthly") && /* @__PURE__ */ s.jsx(
19414
19415
  pt,
19415
19416
  {
19416
19417
  options: O,
19417
- selectedOption: O.find((Y) => Y.value === p),
19418
+ selectedOption: O.find((Y) => Y.value === m),
19418
19419
  title: "Default price at signup",
19419
19420
  onSelect: (Y) => {
19420
19421
  t("portal_default_plan", (Y == null ? void 0 : Y.value) ?? "yearly");
@@ -19494,9 +19495,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19494
19495
  };
19495
19496
  return /* @__PURE__ */ s.jsx("div", { className: "pt-4", children: /* @__PURE__ */ s.jsx(pr, { selectedTab: i, tabs: l, onTabChange: A }) });
19496
19497
  }, ab = () => {
19497
- const { updateRoute: e } = ye(), [t, r] = G("signup"), n = je(), { settings: a, siteData: o, config: i } = Te(), { mutateAsync: c } = ar(), { data: { tiers: l } = {} } = yn(), { mutateAsync: A } = bs(), { mutateAsync: u } = rb(), { getParam: h } = vn(), p = h("verifyEmail");
19498
+ const { updateRoute: e } = ye(), [t, r] = G("signup"), n = je(), { settings: a, siteData: o, config: i } = Te(), { mutateAsync: c } = ar(), { data: { tiers: l } = {} } = yn(), { mutateAsync: A } = bs(), { mutateAsync: u } = rb(), { getParam: h } = vn(), m = h("verifyEmail");
19498
19499
  ie(() => {
19499
- p && (async ({ token: B }) => {
19500
+ m && (async ({ token: B }) => {
19500
19501
  try {
19501
19502
  let { settings: L } = await u({ token: B });
19502
19503
  const [Z] = Ue(L, ["members_support_address"]);
@@ -19521,9 +19522,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19521
19522
  onOk: (E) => E == null ? void 0 : E.remove()
19522
19523
  }), n(L, { withToast: !1 });
19523
19524
  }
19524
- })({ token: p });
19525
- }, [n, p, u]);
19526
- const { formState: m, setFormState: w, saveState: x, handleSave: k, updateForm: y, okProps: I } = St({
19525
+ })({ token: m });
19526
+ }, [n, m, u]);
19527
+ const { formState: p, setFormState: w, saveState: x, handleSave: k, updateForm: y, okProps: I } = St({
19527
19528
  initialState: {
19528
19529
  settings: a,
19529
19530
  tiers: l || []
@@ -19531,13 +19532,13 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19531
19532
  savingDelay: 500,
19532
19533
  onSave: async () => {
19533
19534
  var Z, E, Q, $;
19534
- await Promise.all(m.tiers.filter(({ dirty: ue }) => ue).map((ue) => A(ue))), w((ue) => ({ ...ue, tiers: m.tiers.map((H) => ({ ...H, dirty: !1 })) }));
19535
- const J = m.settings.filter((ue) => ue.dirty);
19535
+ await Promise.all(p.tiers.filter(({ dirty: ue }) => ue).map((ue) => A(ue))), w((ue) => ({ ...ue, tiers: p.tiers.map((H) => ({ ...H, dirty: !1 })) }));
19536
+ const J = p.settings.filter((ue) => ue.dirty);
19536
19537
  if (!J.length)
19537
19538
  return;
19538
19539
  const { meta: B, settings: L } = await c(J);
19539
- if (w((ue) => ({ ...ue, settings: m.settings.map((H) => ({ ...H, dirty: !1 })) })), B != null && B.sent_email_verification) {
19540
- const ue = (Z = m.settings.find((fe) => fe.key === "members_support_address")) == null ? void 0 : Z.value, H = ((E = L.find((fe) => fe.key === "support_email_address")) == null ? void 0 : E.value) || _a((($ = (Q = L.find((fe) => fe.key === "members_support_address")) == null ? void 0 : Q.value) == null ? void 0 : $.toString()) || "noreply", o, i);
19540
+ if (w((ue) => ({ ...ue, settings: p.settings.map((H) => ({ ...H, dirty: !1 })) })), B != null && B.sent_email_verification) {
19541
+ const ue = (Z = p.settings.find((fe) => fe.key === "members_support_address")) == null ? void 0 : Z.value, H = ((E = L.find((fe) => fe.key === "support_email_address")) == null ? void 0 : E.value) || _a((($ = (Q = L.find((fe) => fe.key === "members_support_address")) == null ? void 0 : Q.value) == null ? void 0 : $.toString()) || "noreply", o, i);
19541
19542
  ne.show(We, {
19542
19543
  title: "Confirm email address",
19543
19544
  prompt: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
@@ -19556,8 +19557,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19556
19557
  onSaveError: n
19557
19558
  });
19558
19559
  ie(() => {
19559
- !m.tiers.length && (l != null && l.length) && w((J) => ({ ...J, tiers: l }));
19560
- }, [l, m.tiers, w]);
19560
+ !p.tiers.length && (l != null && l.length) && w((J) => ({ ...J, tiers: l }));
19561
+ }, [l, p.tiers, w]);
19561
19562
  const [C, R] = G({}), U = (J, B) => {
19562
19563
  y((L) => ({
19563
19564
  ...L,
@@ -19579,8 +19580,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19579
19580
  nb,
19580
19581
  {
19581
19582
  errors: C,
19582
- localSettings: m.settings,
19583
- localTiers: m.tiers,
19583
+ localSettings: p.settings,
19584
+ localTiers: p.tiers,
19584
19585
  setError: O,
19585
19586
  updateSetting: U,
19586
19587
  updateTier: F
@@ -19588,8 +19589,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19588
19589
  ), z = /* @__PURE__ */ s.jsx(
19589
19590
  $k,
19590
19591
  {
19591
- localSettings: m.settings,
19592
- localTiers: m.tiers,
19592
+ localSettings: p.settings,
19593
+ localTiers: p.tiers,
19593
19594
  selectedTab: t
19594
19595
  }
19595
19596
  );
@@ -19626,8 +19627,8 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19626
19627
  }, sb = ne.create(ab), ob = ne.create(() => {
19627
19628
  const { updateRoute: e } = ye(), { localSettings: t, updateSetting: r, handleSave: n, validate: a, errors: o, clearError: i, okProps: c } = kr({
19628
19629
  onValidate: () => {
19629
- const m = {};
19630
- return l && !Ut.isURL(l, { require_protocol: !0 }) && (m.slackUrl = "The URL must be in a format like https://hooks.slack.com/services/<your personal key>"), m;
19630
+ const p = {};
19631
+ return l && !Ut.isURL(l, { require_protocol: !0 }) && (p.slackUrl = "The URL must be in a format like https://hooks.slack.com/services/<your personal key>"), p;
19631
19632
  },
19632
19633
  savingDelay: 500
19633
19634
  }), [l, A] = Ue(t, ["slack_url", "slack_username"]), { mutateAsync: u } = zh(), h = async () => {
@@ -19635,7 +19636,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19635
19636
  title: "Check your Slack channel for the test message",
19636
19637
  type: "info"
19637
19638
  }));
19638
- }, p = t.some((m) => m.dirty);
19639
+ }, m = t.some((p) => p.dirty);
19639
19640
  return /* @__PURE__ */ s.jsxs(
19640
19641
  ze,
19641
19642
  {
@@ -19643,7 +19644,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19643
19644
  e("integrations");
19644
19645
  },
19645
19646
  cancelLabel: "Close",
19646
- dirty: p,
19647
+ dirty: m,
19647
19648
  okColor: c.color,
19648
19649
  okLabel: c.label || "Save",
19649
19650
  testId: "slack-modal",
@@ -19674,7 +19675,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19674
19675
  title: "Webhook URL",
19675
19676
  value: l,
19676
19677
  onBlur: a,
19677
- onChange: (m) => r("slack_url", m.target.value),
19678
+ onChange: (p) => r("slack_url", p.target.value),
19678
19679
  onKeyDown: () => i("slackUrl")
19679
19680
  }
19680
19681
  ),
@@ -19686,7 +19687,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19686
19687
  hint: "The username to display messages from",
19687
19688
  title: "Username",
19688
19689
  value: A,
19689
- onChange: (m) => r("slack_username", m.target.value)
19690
+ onChange: (p) => r("slack_username", p.target.value)
19690
19691
  }
19691
19692
  ),
19692
19693
  /* @__PURE__ */ s.jsx(pe, { color: "outline", label: "Send test notification", onClick: h })
@@ -19712,9 +19713,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19712
19713
  const [e, t] = G(!1), [r, n] = G(""), [a, o] = G(!1), [i, c] = G(""), { refetch: l } = yn({
19713
19714
  searchParams: { filter: "type:paid+active:true" },
19714
19715
  enabled: !1
19715
- }), { mutateAsync: A } = bs(), { mutateAsync: u } = ar(), h = je(), p = (y) => {
19716
+ }), { mutateAsync: A } = bs(), { mutateAsync: u } = ar(), h = je(), m = (y) => {
19716
19717
  n(y.target.value), t(!!y.target.value);
19717
- }, m = async () => {
19718
+ }, p = async () => {
19718
19719
  var C, R;
19719
19720
  const { data: y } = await l(), I = y == null ? void 0 : y.pages[0].tiers[0];
19720
19721
  if (I) {
@@ -19744,7 +19745,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19744
19745
  try {
19745
19746
  await u([
19746
19747
  { key: "stripe_connect_integration_token", value: r }
19747
- ]), await m(), await u([
19748
+ ]), await p(), await u([
19748
19749
  { key: "portal_plans", value: JSON.stringify(["free", "monthly", "yearly"]) }
19749
19750
  ]);
19750
19751
  } catch (I) {
@@ -19787,7 +19788,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19787
19788
  "Step 2 — ",
19788
19789
  /* @__PURE__ */ s.jsx("span", { className: "text-black dark:text-white", children: "Paste secure key" })
19789
19790
  ] }),
19790
- /* @__PURE__ */ s.jsx(vr, { error: !!i, hint: i || void 0, placeholder: "Paste your secure key here", onChange: p }),
19791
+ /* @__PURE__ */ s.jsx(vr, { error: !!i, hint: i || void 0, placeholder: "Paste your secure key here", onChange: m }),
19791
19792
  e && /* @__PURE__ */ s.jsx(pe, { className: "mt-5", color: "green", label: "Save Stripe settings", onClick: w })
19792
19793
  ] });
19793
19794
  }, fb = ({ onClose: e }) => {
@@ -19805,11 +19806,11 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19805
19806
  " from this site. This will automatically turn off paid memberships on this site."
19806
19807
  ] }),
19807
19808
  okLabel: u ? "" : "Disconnect",
19808
- onOk: async (p) => {
19809
+ onOk: async (m) => {
19809
19810
  try {
19810
- await i(null), p == null || p.remove(), e == null || e();
19811
- } catch (m) {
19812
- c(m);
19811
+ await i(null), m == null || m.remove(), e == null || e();
19812
+ } catch (p) {
19813
+ c(p);
19813
19814
  }
19814
19815
  }
19815
19816
  });
@@ -19899,7 +19900,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19899
19900
  );
19900
19901
  }, gb = ne.create(pb), wb = ({ tier: e }) => {
19901
19902
  var z;
19902
- const t = (e == null ? void 0 : e.type) === "free", { updateRoute: r } = ye(), { mutateAsync: n } = bs(), { mutateAsync: a } = Gh(), { mutateAsync: o } = ar(), [i, c] = Je.useState(!!(e != null && e.trial_days)), l = je(), { localSettings: A, siteData: u } = kr(), [h] = Ue(A, ["portal_plans"]), p = JSON.parse((h == null ? void 0 : h.toString()) || "[]"), m = {
19903
+ const t = (e == null ? void 0 : e.type) === "free", { updateRoute: r } = ye(), { mutateAsync: n } = bs(), { mutateAsync: a } = Gh(), { mutateAsync: o } = ar(), [i, c] = Je.useState(!!(e != null && e.trial_days)), l = je(), { localSettings: A, siteData: u } = kr(), [h] = Ue(A, ["portal_plans"]), m = JSON.parse((h == null ? void 0 : h.toString()) || "[]"), p = {
19903
19904
  name: () => w.name ? void 0 : "Enter a name for the tier",
19904
19905
  monthly_price: () => w.type !== "free" ? oi(w.monthly_price || 0, w.currency, { allowZero: !1 }) : void 0,
19905
19906
  yearly_price: () => w.type !== "free" ? oi(w.yearly_price || 0, w.currency, { allowZero: !1 }) : void 0
@@ -19915,7 +19916,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19915
19916
  savedDelay: 500,
19916
19917
  onValidate: () => {
19917
19918
  const j = {};
19918
- return Object.entries(m).forEach(([J, B]) => {
19919
+ return Object.entries(p).forEach(([J, B]) => {
19919
19920
  j[J] = B == null ? void 0 : B();
19920
19921
  }), j;
19921
19922
  },
@@ -19925,10 +19926,10 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19925
19926
  if (L.benefits = (Z = L.benefits) == null ? void 0 : Z.filter((E) => E), t || (L.currency = J, L.trial_days = parseInt(j)), e != null && e.id ? await n({ ...e, ...L }) : await a(L), t) {
19926
19927
  const E = w.visibility === "public";
19927
19928
  let Q = !1;
19928
- p.includes("free") && !E && (p.splice(p.indexOf("free"), 1), Q = !0), !p.includes("free") && E && (p.push("free"), Q = !0), Q && await o([
19929
+ m.includes("free") && !E && (m.splice(m.indexOf("free"), 1), Q = !0), !m.includes("free") && E && (m.push("free"), Q = !0), Q && await o([
19929
19930
  {
19930
19931
  key: "portal_plans",
19931
- value: JSON.stringify(p)
19932
+ value: JSON.stringify(m)
19932
19933
  }
19933
19934
  ]);
19934
19935
  }
@@ -19944,7 +19945,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
19944
19945
  }, F = Ye(!1);
19945
19946
  ie(() => {
19946
19947
  var j, J;
19947
- F.current && ((j = m.monthly_price) == null || j.call(m), (J = m.yearly_price) == null || J.call(m)), F.current = !0;
19948
+ F.current && ((j = p.monthly_price) == null || j.call(p), (J = p.yearly_price) == null || J.call(p)), F.current = !0;
19948
19949
  }, [w.currency]);
19949
19950
  const Y = () => {
19950
19951
  if (e) {
@@ -20202,12 +20203,12 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
20202
20203
  try {
20203
20204
  i("Saving..."), await Promise.all([
20204
20205
  n(h),
20205
- new Promise((p) => {
20206
- setTimeout(p, 1e3);
20206
+ new Promise((m) => {
20207
+ setTimeout(m, 1e3);
20207
20208
  })
20208
20209
  ]), i("Saved");
20209
- } catch (p) {
20210
- a(p);
20210
+ } catch (m) {
20211
+ a(m);
20211
20212
  } finally {
20212
20213
  setTimeout(() => i("Save"), 1e3);
20213
20214
  }
@@ -20272,7 +20273,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
20272
20273
  return n = !1, n;
20273
20274
  return n;
20274
20275
  }, Mb = ({ user: e }) => {
20275
- const { currentUser: t, config: r, siteData: n } = Te(), [a, o] = G(!1), [i, c] = G(""), [l, A] = G(""), [u, h] = G(""), [p, m] = G(""), [w, x] = G({}), k = Ye(null), y = Ye(null), { mutateAsync: I } = qh(), C = je(), R = e.id === t.id, U = ({ password: z, confirmPassword: j }) => {
20276
+ const { currentUser: t, config: r, siteData: n } = Te(), [a, o] = G(!1), [i, c] = G(""), [l, A] = G(""), [u, h] = G(""), [m, p] = G(""), [w, x] = G({}), k = Ye(null), y = Ye(null), { mutateAsync: I } = qh(), C = je(), R = e.id === t.id, U = ({ password: z, confirmPassword: j }) => {
20276
20277
  if (R && !i)
20277
20278
  return { oldPassword: "Your current password is required to set a new one" };
20278
20279
  if (z !== j)
@@ -20295,10 +20296,10 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
20295
20296
  return z.toLowerCase() === B ? { newPassword: "Sorry, you cannot use an insecure password." } : z.toLowerCase() === J || z.toLowerCase() === L ? { newPassword: "Sorry, you cannot use an insecure password." } : Eb(z) ? {} : { newPassword: "Sorry, you cannot use an insecure password." };
20296
20297
  };
20297
20298
  ie(() => {
20298
- p === "saved" && setTimeout(() => {
20299
- m(""), o(!1);
20299
+ m === "saved" && setTimeout(() => {
20300
+ p(""), o(!1);
20300
20301
  }, 2500);
20301
- }, [p]);
20302
+ }, [m]);
20302
20303
  const O = () => {
20303
20304
  o(!0);
20304
20305
  }, F = /* @__PURE__ */ s.jsx(
@@ -20310,7 +20311,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
20310
20311
  }
20311
20312
  );
20312
20313
  let Y = "Change password";
20313
- p === "saving" ? Y = "Updating..." : p === "saved" && (Y = "Updated");
20314
+ m === "saving" ? Y = "Updating..." : m === "saved" && (Y = "Updated");
20314
20315
  const X = /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
20315
20316
  R && /* @__PURE__ */ s.jsx(
20316
20317
  ce,
@@ -20359,10 +20360,10 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
20359
20360
  color: "red",
20360
20361
  label: Y,
20361
20362
  onClick: async () => {
20362
- m("saving");
20363
+ p("saving");
20363
20364
  const z = U({ password: l, confirmPassword: u });
20364
20365
  if (x(z), Object.keys(z).length > 0) {
20365
- c(""), A(""), h(""), m("");
20366
+ c(""), A(""), h(""), p("");
20366
20367
  return;
20367
20368
  }
20368
20369
  try {
@@ -20371,9 +20372,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
20371
20372
  confirmNewPassword: u,
20372
20373
  oldPassword: i,
20373
20374
  userId: e == null ? void 0 : e.id
20374
- }), m("saved");
20375
+ }), p("saved");
20375
20376
  } catch (j) {
20376
- m(""), Le({
20377
+ p(""), Le({
20377
20378
  type: "error",
20378
20379
  title: j instanceof Vh ? j.message : "Couldn't update password. Please try again."
20379
20380
  }), C(j, { withToast: !1 });
@@ -20752,7 +20753,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
20752
20753
  /* @__PURE__ */ s.jsx("span", { className: "sr-only", children: "Actions" }),
20753
20754
  /* @__PURE__ */ s.jsx(Ge, { colorClass: "text-white", name: "ellipsis", size: "md" })
20754
20755
  ] }), Ub = ({ user: e }) => {
20755
- const { updateRoute: t } = ye(), { ownerUser: r } = gs(), { currentUser: n } = Te(), a = je(), { formState: o, setFormState: i, saveState: c, handleSave: l, updateForm: A, errors: u, setErrors: h, clearError: p, okProps: m } = St({
20756
+ const { updateRoute: t } = ye(), { ownerUser: r } = gs(), { currentUser: n } = Te(), a = je(), { formState: o, setFormState: i, saveState: c, handleSave: l, updateForm: A, errors: u, setErrors: h, clearError: m, okProps: p } = St({
20756
20757
  initialState: e,
20757
20758
  savingDelay: 500,
20758
20759
  savedDelay: 500,
@@ -20767,7 +20768,7 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
20767
20768
  }), w = (H) => A(() => H), x = (H, fe) => {
20768
20769
  var ae;
20769
20770
  const se = (ae = Bn[H]) == null ? void 0 : ae.call(Bn, { [H]: fe });
20770
- return se ? (h({ ...u, [H]: se }), !1) : (p(H), !0);
20771
+ return se ? (h({ ...u, [H]: se }), !1) : (m(H), !0);
20771
20772
  }, k = vt(), { mutateAsync: y } = Pr(), { mutateAsync: I } = rf(), { mutateAsync: C } = nf(), { mutateAsync: R } = af(), U = Zr(), O = ll(), F = it(() => {
20772
20773
  Tr(n) ? t("staff") : t({ isExternal: !0, route: "dashboard" });
20773
20774
  }, [n, t]), Y = async (H) => {
@@ -20925,11 +20926,11 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
20925
20926
  afterClose: F,
20926
20927
  animate: Tr(n),
20927
20928
  backDrop: Tr(n),
20928
- buttonsDisabled: m.disabled,
20929
+ buttonsDisabled: p.disabled,
20929
20930
  cancelLabel: "Close",
20930
20931
  dirty: c === "unsaved",
20931
- okColor: m.color,
20932
- okLabel: m.label || "Save",
20932
+ okColor: p.color,
20933
+ okLabel: p.label || "Save",
20933
20934
  size: Tr(n) ? "lg" : "bleed",
20934
20935
  stickyFooter: !0,
20935
20936
  testId: "user-detail-modal",
@@ -21016,9 +21017,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
21016
21017
  ] })
21017
21018
  ] }) }),
21018
21019
  /* @__PURE__ */ s.jsxs("div", { className: `${!Tr(n) && "mx-auto max-w-4xl"} mt-10 grid grid-cols-1 gap-x-12 gap-y-20 md:grid-cols-2`, children: [
21019
- /* @__PURE__ */ s.jsx(Cb, { clearError: p, errors: u, setUserData: w, user: o, validateField: x }),
21020
+ /* @__PURE__ */ s.jsx(Cb, { clearError: m, errors: u, setUserData: w, user: o, validateField: x }),
21020
21021
  /* @__PURE__ */ s.jsxs("div", { className: "flex flex-col justify-between gap-10", children: [
21021
- /* @__PURE__ */ s.jsx(jb, { clearError: p, errors: u, setUserData: w, user: o, validateField: x }),
21022
+ /* @__PURE__ */ s.jsx(jb, { clearError: m, errors: u, setUserData: w, user: o, validateField: x }),
21022
21023
  e.id === n.id && /* @__PURE__ */ s.jsx(Nb, {})
21023
21024
  ] }),
21024
21025
  /* @__PURE__ */ s.jsx(Ib, { setUserData: w, user: o }),
@@ -21034,18 +21035,18 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
21034
21035
  }, [n, r, o]), o ? /* @__PURE__ */ s.jsx(Ub, { user: o }) : null;
21035
21036
  }, Lb = ne.create(Bb), zb = (e) => /* @__PURE__ */ Me("svg", { width: 42, height: 37, viewBox: "0 0 80 37", xmlns: "http://www.w3.org/2000/svg", className: "css-1oudp6l-ZapierLogo--red500", ...e }, /* @__PURE__ */ Me("title", null, "zapier-logo"), /* @__PURE__ */ Me("path", { fill: "#ff4a00", fillRule: "evenodd", clipRule: "evenodd", d: "M53.934 4.185h-2.94l2.079-2.073A5.053 5.053 0 0 0 51.886.928l-2.078 2.073V.07a5.129 5.129 0 0 0-.836-.07h-.006c-.285 0-.564.024-.836.07V3L46.052.929c-.23.163-.444.344-.642.543h-.002c-.198.198-.38.412-.543.641l2.078 2.073h-2.938s-.07.55-.07.835v.003c0 .284.024.564.07.836h2.938l-2.078 2.07a5.05 5.05 0 0 0 1.187 1.183l2.078-2.072v2.93c.272.046.55.07.835.07h.007c.285 0 .565-.024.836-.07v-2.93l2.078 2.072a5.098 5.098 0 0 0 1.186-1.184L50.995 5.86h2.94c.045-.272.07-.55.07-.834v-.007a5.08 5.08 0 0 0-.07-.833ZM58.85 25.53c-.84-.786-1.279-2.026-1.32-3.72h10.585c.02-.222.04-.488.06-.802.02-.312.031-.61.031-.892a9.263 9.263 0 0 0-.425-2.859c-.283-.877-.698-1.633-1.243-2.268a5.736 5.736 0 0 0-2.032-1.497c-.809-.364-1.75-.545-2.82-.545-1.254 0-2.341.217-3.261.65a6.532 6.532 0 0 0-2.29 1.755c-.606.736-1.056 1.603-1.349 2.6-.293 1-.44 2.073-.44 3.222 0 1.17.152 2.244.455 3.222a6.59 6.59 0 0 0 1.44 2.541c.657.716 1.492 1.27 2.503 1.664 1.01.393 2.223.59 3.64.59.97 0 1.854-.071 2.653-.212a10.191 10.191 0 0 0 2.198-.635 7.18 7.18 0 0 0-.181-1.286 4.54 4.54 0 0 0-.395-1.104 11.178 11.178 0 0 1-4.094.757c-1.638 0-2.876-.394-3.715-1.18ZM30.51 13.31a6.378 6.378 0 0 1 1.273-.121 7.115 7.115 0 0 1 1.274.12c.02.042.045.167.075.38.03.21.06.438.091.68.03.242.06.474.091.696.03.222.045.363.045.423.203-.323.445-.635.728-.938a4.85 4.85 0 0 1 1.016-.816 5.298 5.298 0 0 1 1.335-.575 6.016 6.016 0 0 1 1.653-.212c.91 0 1.753.152 2.532.454a5.068 5.068 0 0 1 2.001 1.406c.556.636.99 1.442 1.305 2.42.313.979.47 2.133.47 3.464 0 2.662-.723 4.744-2.169 6.246-1.446 1.503-3.492 2.254-6.141 2.254-.445 0-.9-.03-1.365-.09a8.095 8.095 0 0 1-1.213-.243v7.109a10.389 10.389 0 0 1-1.517.12c-.222 0-.47-.01-.742-.03-.273-.02-.52-.05-.743-.09V13.31Zm-6.218 5.294c0-1.19-.304-2.017-.91-2.481-.607-.463-1.486-.695-2.639-.695-.708 0-1.37.055-1.986.166-.617.111-1.219.257-1.804.438-.385-.665-.576-1.461-.576-2.39a14.015 14.015 0 0 1 2.274-.514 16.555 16.555 0 0 1 2.396-.181c2.021 0 3.558.46 4.61 1.376 1.05.918 1.576 2.385 1.576 4.401v9.71a47.6 47.6 0 0 1-2.577.5 18.55 18.55 0 0 1-3.094.256c-.99 0-1.885-.09-2.684-.272-.799-.181-1.476-.473-2.032-.877a4.061 4.061 0 0 1-1.289-1.543c-.303-.625-.454-1.38-.454-2.269 0-.866.176-1.628.53-2.283a4.77 4.77 0 0 1 1.44-1.634 6.427 6.427 0 0 1 2.093-.967 9.538 9.538 0 0 1 2.487-.318c.647 0 1.178.015 1.592.045.415.031.763.066 1.047.106v-.574Zm-23.625 9.8L8.855 15.7H1.637a7.356 7.356 0 0 1-.09-1.21c0-.424.03-.818.09-1.18h11.677l.15.393-8.248 12.735h7.734c.06.404.09.817.09 1.24 0 .404-.03.787-.09 1.15H.819l-.152-.424Zm22.472-6.987c.466.04.85.08 1.153.12v4.931a8.642 8.642 0 0 1-1.32.227 14.05 14.05 0 0 1-1.44.076c-.364 0-.748-.02-1.152-.06a2.9 2.9 0 0 1-1.107-.333 2.293 2.293 0 0 1-.834-.787c-.223-.342-.334-.817-.334-1.422 0-.947.328-1.653.986-2.117.656-.464 1.612-.696 2.866-.696.323 0 .717.02 1.182.061Zm11.555 5.172a5.87 5.87 0 0 1-1.183-.302v-6.292c0-.767.111-1.426.334-1.981.223-.555.515-1.014.88-1.377a3.58 3.58 0 0 1 1.243-.816c.464-.182.95-.273 1.455-.273 1.355 0 2.33.475 2.927 1.422.596.948.895 2.229.895 3.842 0 1.008-.127 1.88-.38 2.616-.253.736-.596 1.346-1.03 1.83a3.965 3.965 0 0 1-1.562 1.074 5.558 5.558 0 0 1-2.002.348c-.647 0-1.173-.03-1.577-.09Zm13.435-10.92h-1.972a3.793 3.793 0 0 1-.09-.56 6.432 6.432 0 0 1 0-1.24c.02-.211.05-.398.09-.56h4.914v15.52c-.223.039-.47.069-.743.09-.273.019-.521.03-.743.03-.203 0-.44-.011-.713-.03a7.367 7.367 0 0 1-.743-.09v-13.16Zm17.105 3.903a5.71 5.71 0 0 0-.227-1.62 4.113 4.113 0 0 0-.668-1.345 3.246 3.246 0 0 0-1.122-.922c-.455-.232-.996-.349-1.623-.349-1.233 0-2.178.374-2.836 1.12-.656.746-1.056 1.785-1.197 3.116h7.673Zm6.916-6.353a8.11 8.11 0 0 0-.637.09v15.519a10.308 10.308 0 0 0 1.517.12c.221 0 .47-.01.742-.03.273-.02.52-.05.743-.09v-7.714c0-1.048.117-1.905.35-2.57.231-.666.545-1.19.939-1.574a3.26 3.26 0 0 1 1.335-.801 5.33 5.33 0 0 1 1.562-.227h.409c.172 0 .338.02.5.06.04-.242.076-.494.107-.756a6.694 6.694 0 0 0 .014-1.392 4.99 4.99 0 0 0-.09-.575 4.641 4.641 0 0 0-.44-.045 8.203 8.203 0 0 0-.5-.015c-1.092 0-1.987.253-2.684.756a6.273 6.273 0 0 0-1.683 1.785c0-.343-.031-.76-.091-1.255a17.208 17.208 0 0 0-.182-1.195 5.019 5.019 0 0 0-.607-.09 7.54 7.54 0 0 0-.667-.031c-.223 0-.435.01-.637.03ZM50.034 6.084c.125-.33.194-.687.194-1.06v-.005c0-.373-.07-.73-.194-1.06a3.013 3.013 0 0 0-1.063-.193h-.004a3.03 3.03 0 0 0-1.064.193 3.03 3.03 0 0 0-.193 1.06v.005c0 .373.07.73.194 1.06.33.124.689.193 1.063.193h.005c.373 0 .732-.069 1.062-.193Z" })), Pb = ne.create(() => {
21036
21037
  var w, x, k, y;
21037
- const e = ne.useModal(), { updateRoute: t } = ye(), { zapierTemplates: r } = of(), { data: { integrations: n } = { integrations: [] } } = ol(), { config: a } = Te(), { adminRoot: o } = Ur(), { mutateAsync: i } = Ol(), c = je(), [l, A] = G(!1), u = (k = (x = (w = a.hostSettings) == null ? void 0 : w.limits) == null ? void 0 : x.customIntegrations) == null ? void 0 : k.disabled, h = n.find(({ slug: I }) => I === "zapier"), p = (y = h == null ? void 0 : h.api_keys) == null ? void 0 : y.find((I) => I.type === "admin");
21038
+ const e = ne.useModal(), { updateRoute: t } = ye(), { zapierTemplates: r } = of(), { data: { integrations: n } = { integrations: [] } } = ol(), { config: a } = Te(), { adminRoot: o } = Ur(), { mutateAsync: i } = Ol(), c = je(), [l, A] = G(!1), u = (k = (x = (w = a.hostSettings) == null ? void 0 : w.limits) == null ? void 0 : x.customIntegrations) == null ? void 0 : k.disabled, h = n.find(({ slug: I }) => I === "zapier"), m = (y = h == null ? void 0 : h.api_keys) == null ? void 0 : y.find((I) => I.type === "admin");
21038
21039
  ie(() => {
21039
21040
  u && t("integrations");
21040
21041
  }, [u, t]);
21041
- const m = () => {
21042
- !h || !p || (A(!1), ne.show(We, {
21042
+ const p = () => {
21043
+ !h || !m || (A(!1), ne.show(We, {
21043
21044
  title: "Regenerate Admin API Key",
21044
21045
  prompt: 'You will need to locate the Ghost App within your Zapier account and click on "Reconnect" to enter the new Admin API Key.',
21045
21046
  okLabel: "Regenerate Admin API Key",
21046
21047
  onOk: async (I) => {
21047
21048
  try {
21048
- await i({ integrationId: h.id, apiKeyId: p.id }), A(!0), I == null || I.remove();
21049
+ await i({ integrationId: h.id, apiKeyId: m.id }), A(!0), I == null || I.remove();
21049
21050
  } catch (C) {
21050
21051
  c(C);
21051
21052
  }
@@ -21093,9 +21094,9 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
21093
21094
  extra: /* @__PURE__ */ s.jsx("div", { className: "-mb-4 mt-1", children: /* @__PURE__ */ s.jsx(Cs, { keys: [
21094
21095
  {
21095
21096
  label: "Admin API key",
21096
- text: p == null ? void 0 : p.secret,
21097
+ text: m == null ? void 0 : m.secret,
21097
21098
  hint: l ? /* @__PURE__ */ s.jsx("div", { className: "text-green", children: "Admin API Key was successfully regenerated" }) : void 0,
21098
- onRegenerate: m
21099
+ onRegenerate: p
21099
21100
  },
21100
21101
  { label: "API URL", text: window.location.origin + Ur().subdir }
21101
21102
  ] }) }),
@@ -21157,4 +21158,4 @@ const Nk = ({ clearError: e, errors: t, offer: r, updateOffer: n }) => {
21157
21158
  export {
21158
21159
  Zb as default
21159
21160
  };
21160
- //# sourceMappingURL=modals-f8ab7cf2.mjs.map
21161
+ //# sourceMappingURL=modals-226093f6.mjs.map