@hintergrund/ui 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/Builder-H8tY8V9I.js +14172 -0
  2. package/dist/admin.js +11084 -9645
  3. package/dist/{anthropic-CwpwmW2G.js → anthropic-messages-C3hIUlsA.js} +1134 -1055
  4. package/dist/azure-openai-responses-t7u41KMr.js +222 -0
  5. package/dist/builder.js +2 -2
  6. package/dist/client-Cd7yMX39.js +7860 -0
  7. package/dist/deferred-tools-BZWMWBYN.js +28 -0
  8. package/dist/error-body-BUPcH4GF.js +71 -0
  9. package/dist/github-copilot-headers-B1RBGoZi.js +21 -0
  10. package/dist/{global-DdaMTl90.js → global-Bk9T4Af5.js} +17850 -16460
  11. package/dist/google-generative-ai-6ZG79NDC.js +264 -0
  12. package/dist/{google-shared-zl4aoTwW.js → google-shared-C6y4fA42.js} +1135 -1104
  13. package/dist/google-vertex-f2myaAmm.js +305 -0
  14. package/dist/headers-D4iLzGaS.js +21 -0
  15. package/dist/json-parse-LZdWp-Nd.js +232 -0
  16. package/dist/login.js +48 -48
  17. package/dist/mistral-conversations-D16H8Mgq.js +513 -0
  18. package/dist/openai-codex-responses-DIHPbnIS.js +947 -0
  19. package/dist/openai-completions-vDHGFsWV.js +741 -0
  20. package/dist/{headers-u7rXGJ9f.js → openai-prompt-cache-BJwqbEDx.js} +7 -6
  21. package/dist/openai-responses-B0rjAJxx.js +184 -0
  22. package/dist/openai-responses-shared-DqdzMfa_.js +477 -0
  23. package/dist/pi-messages-DB2BtH-g.js +251 -0
  24. package/dist/pi-user-agent-CUqx-qiX.js +13 -0
  25. package/dist/provider-env-D2VjEV3S.js +26 -0
  26. package/dist/provider-retry-BsigVlMg.js +67 -0
  27. package/dist/setup.js +230 -228
  28. package/dist/transform-messages-CsKsy6b4.js +398 -0
  29. package/package.json +4 -5
  30. package/dist/Builder-BhGmzNTC.js +0 -163449
  31. package/dist/azure-openai-responses-yWEFYMG1.js +0 -203
  32. package/dist/client-Sh7wNjbG.js +0 -5277
  33. package/dist/github-copilot-headers-DWh_6bE3.js +0 -35
  34. package/dist/google-BgPPfrTM.js +0 -248
  35. package/dist/google-vertex-D7kAAkZn.js +0 -285
  36. package/dist/json-parse-Dk_xwHcS.js +0 -93
  37. package/dist/mistral-BJWDROjc.js +0 -22932
  38. package/dist/openai-codex-responses-rzy0Aqwg.js +0 -700
  39. package/dist/openai-completions-CUEO2YVR.js +0 -535
  40. package/dist/openai-responses-k6plMvd9.js +0 -142
  41. package/dist/openai-responses-shared-CCD7nRqy.js +0 -324
  42. package/dist/transform-messages-CkpQp6fJ.js +0 -132
package/dist/setup.js CHANGED
@@ -1,311 +1,313 @@
1
- import { X as Ze, Y as Oe, Z as Je, _ as Qe, $ as Ve, N as e, P as t, a1 as r, a2 as a, a7 as W, a5 as p, aa as Xe, Q as v, ab as b, ad as s, a8 as Z, ag as Y, af as y, ae as B, a3 as ve, a4 as ce, ai as Ce, b6 as Ne, a0 as pe, ah as Ge, ar as Le, al as ue, ay as es, a9 as z, ak as ss } from "./global-DdaMTl90.js";
2
- typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(ae) {
3
- return Promise.resolve().then(ae);
1
+ import { _ as es, $ as ss, a0 as as, a1 as ts, a2 as rs, N as e, S as o, a4 as s, a5 as t, aa as I, a8 as c, ad as os, U as v, ae as _, ag as a, ab as U, aj as J, ai as f, ah as B, a6 as pe, a7 as F, al as Q, ao as Pe, aL as $e, a3 as Be, ak as ls, au as Ae, aB as is, af as ue, ac as k, bi as De, an as ns } from "./global-Bk9T4Af5.js";
2
+ typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(X) {
3
+ return Promise.resolve().then(X);
4
4
  } });
5
- var as = b('<div class="flash flash-error" role="alert"><svg class="octicon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path></svg> </div>'), rs = b('<section class="Box provider-selection" aria-labelledby="payment-provider-title"><div class="Box-header"><h2 id="payment-provider-title">Choose your payment provider</h2> <p>Choose this first. Your customers pay the provider directly; Hintergrund never takes a cut of a sale.</p></div> <div class="Box-body"><fieldset class="provider-choices svelte-1sk6wwy"><legend class="svelte-1sk6wwy">How would you like to accept payments?</legend> <label><input type="radio" class="svelte-1sk6wwy"/> <span class="svelte-1sk6wwy"><strong class="svelte-1sk6wwy">SEPA bank transfer</strong> <small class="svelte-1sk6wwy"><b>Best for:</b> businesses with an EU bank account that are happy to confirm payments manually.</small> <small class="svelte-1sk6wwy"><b>Pros:</b> no processing fee. <b>Trade-off:</b> customers transfer the money and you confirm its arrival in your dashboard.</small></span></label> <label><input type="radio" class="svelte-1sk6wwy"/> <span class="svelte-1sk6wwy"><strong class="svelte-1sk6wwy">Stripe card payments</strong> <small class="svelte-1sk6wwy"><b>Best for:</b> accepting cards and wallet payments automatically.</small> <small class="svelte-1sk6wwy"><b>Pros:</b> automatic payment confirmation. <b>Trade-off:</b> Stripe requires supported ID and business verification and charges its own processing fee.</small></span></label></fieldset> <p class="note svelte-1sk6wwy">Payment-provider accounts and fees are always between you and the provider.</p> <div class="actions selection-actions svelte-1sk6wwy"><span></span> <!></div></div></section>'), ts = b('<li><button type="button"><span class="step-index svelte-1sk6wwy"> </span> <span class="step-label svelte-1sk6wwy"> </span></button></li>'), os = b('<div class="auth-choice svelte-1sk6wwy"><strong>Sign in with an email code</strong> <p class="svelte-1sk6wwy">Recommended. There is no password to create or remember. We will use the email provider you configure in the last step to send a one-time code.</p> <button class="text-link svelte-1sk6wwy" type="button">Use a password instead</button></div>'), is = b('<div class="form-group"><label for="admin-password">Password</label> <div class="input-group svelte-1sk6wwy"><input id="admin-password" class="form-control" required="" autocomplete="new-password"/> <button class="password-toggle svelte-1sk6wwy" type="button"> </button></div> <p class="note svelte-1sk6wwy">Choose a password you can remember. You can change it later in the admin area.</p></div> <button class="text-link svelte-1sk6wwy" type="button">Use an email code instead</button>', 1), ls = b('<div class="Box"><div class="Box-header"><h2>Create your administrator account</h2> <p>Your site title is already set. Choose the credentials for its first administrator.</p></div> <div class="Box-body"><div class="form-group"><label for="admin-email">Email address</label> <input id="admin-email" class="form-control" type="email" required="" autocomplete="email" placeholder="you@example.com"/> <p class="note svelte-1sk6wwy">You sign in with this address. Admin notices go here too.</p></div> <!></div></div>'), ns = b('<div class="form-group"><label for="account-holder">Account holder</label> <input id="account-holder" class="form-control" required="" autocomplete="organization"/></div> <div class="form-group"><label for="iban">IBAN</label> <input id="iban" class="form-control" required="" autocomplete="off" placeholder="DE…"/></div> <div class="form-row svelte-1sk6wwy"><div class="form-group"><label for="bic">BIC <span class="optional svelte-1sk6wwy">optional</span></label><input id="bic" class="form-control" autocomplete="off"/></div> <div class="form-group"><label for="bank-name">Bank name <span class="optional svelte-1sk6wwy">optional</span></label><input id="bank-name" class="form-control" autocomplete="organization"/></div></div> <div class="form-group"><label for="instructions">Payment instructions <span class="optional svelte-1sk6wwy">optional</span></label> <textarea id="instructions" class="form-control" placeholder="Please use your order number as the payment reference."></textarea></div>', 1), ds = b('<div class="form-group"><label for="stripe-secret">Stripe secret key</label> <input id="stripe-secret" class="form-control" type="password" required="" autocomplete="off" placeholder="sk_live_…"/></div> <div class="form-group"><label for="stripe-webhook">Stripe webhook secret <span class="optional svelte-1sk6wwy">optional</span></label> <input id="stripe-webhook" class="form-control" type="password" autocomplete="off" placeholder="whsec_…"/> <p class="note svelte-1sk6wwy">Leave blank and we create the webhook for you.</p></div> <div class="links svelte-1sk6wwy"><a href="https://dashboard.stripe.com/register" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create a Stripe account ↗</a> <a href="https://docs.stripe.com/keys" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Find your API keys ↗</a> <a href="https://docs.stripe.com/webhooks" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Learn about webhooks ↗</a></div>', 1), vs = b('<div class="Box"><div class="Box-header"><h2>Set up payments</h2> <p> </p></div> <div class="Box-body"><div class="selected-provider svelte-1sk6wwy"><strong> </strong><span class="svelte-1sk6wwy"> </span></div> <!></div></div>'), cs = b('<span class="optional svelte-1sk6wwy">optional</span>'), ps = b('<span class="optional svelte-1sk6wwy">optional</span>'), us = b('<div class="Box"><div class="Box-header"><h2>Set up email</h2> <p> </p></div> <div class="Box-body"><div class="notice svelte-1sk6wwy">Create a Plunk account, verify the domain you will send from, then create an API key. The sender email must use that verified domain.</div> <div class="form-group"><label for="plunk-key">Plunk API key <!></label> <input id="plunk-key" class="form-control" type="password" autocomplete="off" placeholder="plunk_…"/></div> <div class="form-row svelte-1sk6wwy"><div class="form-group"><label for="from-email">Sender email <!></label> <input id="from-email" class="form-control" type="email" autocomplete="email" placeholder="hello@yourdomain.com"/></div> <div class="form-group"><label for="from-name">Sender name <span class="optional svelte-1sk6wwy">optional</span></label><input id="from-name" class="form-control" autocomplete="organization"/></div></div> <div class="form-group"><label for="reply-to">Reply-to email <span class="optional svelte-1sk6wwy">optional</span></label><input id="reply-to" class="form-control" type="email" autocomplete="email"/></div> <div class="links svelte-1sk6wwy"><a href="https://app.useplunk.com" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create or open your Plunk account ↗</a> <a href="https://docs.useplunk.com/guides/verifying-domains" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Verify your sending domain ↗</a> <a href="https://docs.useplunk.com/guides/api-keys" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create a Plunk API key ↗</a></div></div></div>'), ws = b("<span></span>"), ms = b('<ol class="steps svelte-1sk6wwy" aria-label="Setup progress"></ol> <form autocomplete="off"><!> <div class="actions svelte-1sk6wwy"><!> <!></div></form>', 1), fs = b('<main class="setup-wrapper svelte-1sk6wwy"><div class="setup-container svelte-1sk6wwy"><div class="setup-header svelte-1sk6wwy"><svg class="setup-logo svelte-1sk6wwy" viewBox="0 0 90 90" width="48" height="48" fill="currentColor"><rect x="12" y="12" width="66" height="66" fill="currentColor"></rect></svg> <h1 class="svelte-1sk6wwy">Set up Hintergrund</h1> <p class="setup-subtitle svelte-1sk6wwy">Three short steps and your site is live.</p></div> <!> <!></div></main>');
6
- const bs = {
5
+ var ds = _('<div class="flash flash-error" role="alert"><svg class="octicon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path></svg> </div>'), vs = _('<small class="note-inline svelte-1sk6wwy">Required by the shop for order confirmations and invoices.</small>'), cs = _('<small class="note-inline svelte-1sk6wwy">Lets you sign in with a one-time email code.</small>'), ps = _('<section class="Box provider-selection" aria-labelledby="modules-title"><div class="Box-header"><h2 id="modules-title">What should your site do?</h2> <p>Everything is included. Choose what you need now — you can turn these on or off later in Settings.</p></div> <div class="Box-body"><fieldset class="provider-choices svelte-1sk6wwy"><legend class="svelte-1sk6wwy">Site features</legend> <label><input type="checkbox" class="svelte-1sk6wwy"/> <span class="svelte-1sk6wwy"><strong class="svelte-1sk6wwy">Shop</strong> <small class="svelte-1sk6wwy">Sell products, take orders, and issue invoices.</small> <small class="svelte-1sk6wwy">Needs a payment method, and sends order confirmations by email.</small></span></label> <label><input type="checkbox" class="svelte-1sk6wwy"/> <span class="svelte-1sk6wwy"><strong class="svelte-1sk6wwy">Emails</strong> <small class="svelte-1sk6wwy">Newsletter signup, campaigns, and transactional email.</small> <!></span></label></fieldset> <p class="note svelte-1sk6wwy">Turning a feature off only hides it. Nothing is deleted, so you can enable it again at any time.</p> <div class="actions selection-actions svelte-1sk6wwy"><span></span> <!></div></div></section>'), us = _('<li><button type="button"><span class="step-index svelte-1sk6wwy"> </span> <span class="step-label svelte-1sk6wwy"> </span></button></li>'), ws = _('<div class="Box"><div class="Box-header"><h2>Create your administrator account</h2> <p>Your site title is already set. Choose the credentials for its first administrator.</p></div> <div class="Box-body"><div class="form-group"><label for="admin-email">Email address</label> <input id="admin-email" class="form-control" type="email" required="" autocomplete="email" placeholder="you@example.com"/> <p class="note svelte-1sk6wwy">You sign in with this address. Admin notices go here too.</p></div> <div class="form-group"><label for="admin-password">Password</label> <div class="input-group svelte-1sk6wwy"><input id="admin-password" class="form-control" required="" autocomplete="new-password"/> <button class="password-toggle svelte-1sk6wwy" type="button"> </button></div> <p class="note svelte-1sk6wwy"> <!></p></div></div></div>'), ms = _('<div class="form-group"><label for="account-holder">Account holder</label> <input id="account-holder" class="form-control" required="" autocomplete="organization"/></div> <div class="form-group"><label for="iban">IBAN</label> <input id="iban" class="form-control" required="" autocomplete="off" placeholder="DE…"/></div> <div class="form-row svelte-1sk6wwy"><div class="form-group"><label for="bic">BIC <span class="optional svelte-1sk6wwy">optional</span></label><input id="bic" class="form-control" autocomplete="off"/></div> <div class="form-group"><label for="bank-name">Bank name <span class="optional svelte-1sk6wwy">optional</span></label><input id="bank-name" class="form-control" autocomplete="organization"/></div></div> <div class="form-group"><label for="instructions">Payment instructions <span class="optional svelte-1sk6wwy">optional</span></label> <textarea id="instructions" class="form-control" placeholder="Please use your order number as the payment reference."></textarea></div>', 1), fs = _('<div class="form-group"><label for="stripe-secret">Stripe secret key</label> <input id="stripe-secret" class="form-control" type="password" required="" autocomplete="off" placeholder="sk_live_…"/></div> <div class="form-group"><label for="stripe-webhook">Stripe webhook secret <span class="optional svelte-1sk6wwy">optional</span></label> <input id="stripe-webhook" class="form-control" type="password" autocomplete="off" placeholder="whsec_…"/> <p class="note svelte-1sk6wwy">Leave blank and we create the webhook for you.</p></div> <div class="links svelte-1sk6wwy"><a href="https://dashboard.stripe.com/register" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create a Stripe account ↗</a> <a href="https://docs.stripe.com/keys" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Find your API keys ↗</a> <a href="https://docs.stripe.com/webhooks" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Learn about webhooks ↗</a></div>', 1), bs = _('<div class="Box"><div class="Box-header"><h2>Set up payments</h2> <p>Choose how your customers pay, then add the details for that method.</p></div> <div class="Box-body"><fieldset class="provider-choices svelte-1sk6wwy"><legend class="svelte-1sk6wwy">How would you like to accept payments?</legend> <label><input type="radio" class="svelte-1sk6wwy"/> <span class="svelte-1sk6wwy"><strong class="svelte-1sk6wwy">SEPA bank transfer</strong> <small class="svelte-1sk6wwy"><b>Best for:</b> businesses with an EU bank account that are happy to confirm payments manually.</small> <small class="svelte-1sk6wwy"><b>Pros:</b> no processing fee. <b>Trade-off:</b> customers transfer the money and you confirm its arrival in your dashboard.</small></span></label> <label><input type="radio" class="svelte-1sk6wwy"/> <span class="svelte-1sk6wwy"><strong class="svelte-1sk6wwy">Stripe card payments</strong> <small class="svelte-1sk6wwy"><b>Best for:</b> accepting cards and wallet payments automatically.</small> <small class="svelte-1sk6wwy"><b>Pros:</b> automatic payment confirmation. <b>Trade-off:</b> Stripe requires supported ID and business verification and charges its own processing fee.</small></span></label></fieldset> <p class="note svelte-1sk6wwy">Payment-provider accounts and fees are always between you and the provider. Hintergrund never takes a cut of a sale.</p> <!></div></div>'), ys = _('<div class="Box"><div class="Box-header"><h2>Set up email</h2> <p>Plunk will send order, subscriber, and administrator sign-in codes.</p></div> <div class="Box-body"><div class="notice svelte-1sk6wwy">Create a Plunk account, verify the domain you will send from, then create an API key. The sender email must use that verified domain.</div> <div class="form-group"><label for="plunk-key">Plunk API key</label> <input id="plunk-key" class="form-control" type="password" required="" autocomplete="off" placeholder="plunk_…"/></div> <div class="form-row svelte-1sk6wwy"><div class="form-group"><label for="from-email">Sender email</label> <input id="from-email" class="form-control" type="email" required="" autocomplete="email" placeholder="hello@yourdomain.com"/></div> <div class="form-group"><label for="from-name">Sender name <span class="optional svelte-1sk6wwy">optional</span></label><input id="from-name" class="form-control" autocomplete="organization"/></div></div> <div class="form-group"><label for="reply-to">Reply-to email <span class="optional svelte-1sk6wwy">optional</span></label><input id="reply-to" class="form-control" type="email" autocomplete="email"/></div> <div class="links svelte-1sk6wwy"><a href="https://app.useplunk.com" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create or open your Plunk account ↗</a> <a href="https://docs.useplunk.com/guides/verifying-domains" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Verify your sending domain ↗</a> <a href="https://docs.useplunk.com/guides/api-keys" target="_blank" rel="noreferrer" class="svelte-1sk6wwy">Create a Plunk API key ↗</a></div></div></div>'), hs = _("<span></span>"), gs = _('<ol class="steps svelte-1sk6wwy" aria-label="Setup progress"></ol> <form autocomplete="off"><!> <div class="actions svelte-1sk6wwy"><!> <!></div></form>', 1), ks = _('<main class="setup-wrapper svelte-1sk6wwy"><div class="setup-container svelte-1sk6wwy"><div class="setup-header svelte-1sk6wwy"><svg class="setup-logo svelte-1sk6wwy" viewBox="0 0 90 90" width="48" height="48" fill="currentColor"><rect x="12" y="12" width="66" height="66" fill="currentColor"></rect></svg> <h1 class="svelte-1sk6wwy">Set up Hintergrund</h1> <p class="setup-subtitle svelte-1sk6wwy">A few short steps and your site is live.</p></div> <!> <!></div></main>');
6
+ const _s = {
7
7
  hash: "svelte-1sk6wwy",
8
- code: `.setup-wrapper.svelte-1sk6wwy {min-height:100vh;padding:var(--base-size-48) var(--base-size-24);background-color:var(--bgColor-muted);color:var(--fgColor-default);}.setup-container.svelte-1sk6wwy {width:100%;max-width:var(--base-size-600);margin:0 auto;}.setup-header.svelte-1sk6wwy {text-align:center;margin-bottom:var(--base-size-24);}.setup-logo.svelte-1sk6wwy {color:var(--fgColor-default);margin-bottom:var(--base-size-16);}.setup-header.svelte-1sk6wwy h1:where(.svelte-1sk6wwy) {margin:0;font-size:var(--text-title-size-medium);font-weight:var(--base-text-weight-light);color:var(--fgColor-default);}.setup-subtitle.svelte-1sk6wwy {margin:var(--base-size-4) 0 0;font-size:var(--text-body-size-medium);color:var(--fgColor-muted);}.steps.svelte-1sk6wwy {display:grid;grid-template-columns:repeat(3, 1fr);gap:var(--base-size-8);margin:0 0 var(--base-size-16);padding:0;list-style:none;}.step-item.svelte-1sk6wwy {display:flex;width:100%;align-items:center;justify-content:center;gap:var(--base-size-8);padding:var(--base-size-8) var(--base-size-12);background-color:var(--bgColor-default);border:var(--borderWidth-thin) solid var(--borderColor-default);border-radius:var(--borderRadius-medium);color:var(--fgColor-muted);cursor:pointer;font:inherit;font-size:var(--text-body-size-small);}.step-item.svelte-1sk6wwy:disabled {cursor:default;}.step-item.svelte-1sk6wwy:not(:disabled):hover {border-color:var(--borderColor-accent-emphasis);}.step-item.active.svelte-1sk6wwy {border-color:var(--borderColor-accent-emphasis);color:var(--fgColor-default);font-weight:var(--base-text-weight-medium);}.step-index.svelte-1sk6wwy {display:inline-flex;align-items:center;justify-content:center;width:var(--base-size-20);height:var(--base-size-20);flex-shrink:0;border-radius:50%;background-color:var(--bgColor-muted);font-size:var(--text-body-size-small);line-height:1;}.step-item.active.svelte-1sk6wwy .step-index:where(.svelte-1sk6wwy) {background-color:var(--button-primary-bgColor-rest);color:var(--button-primary-fgColor-rest);}.step-item.done.svelte-1sk6wwy .step-index:where(.svelte-1sk6wwy) {background-color:var(--bgColor-success-muted, #dafbe1);color:var(--fgColor-success, #1a7f37);}.step-label.svelte-1sk6wwy {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.form-row.svelte-1sk6wwy {display:grid;grid-template-columns:1fr 1fr;gap:var(--base-size-16);}.optional.svelte-1sk6wwy {font-weight:var(--base-text-weight-normal);color:var(--fgColor-muted);}.note.svelte-1sk6wwy {margin:var(--base-size-8) 0 0;font-size:var(--text-body-size-small);line-height:var(--text-body-lineHeight-small);color:var(--fgColor-muted);}.notice.svelte-1sk6wwy, .selected-provider.svelte-1sk6wwy, .auth-choice.svelte-1sk6wwy {padding:var(--base-size-12);margin-bottom:var(--base-size-16);background-color:var(--bgColor-accent-muted);border:var(--borderWidth-thin) solid var(--borderColor-accent-muted);border-radius:var(--borderRadius-medium);font-size:var(--text-body-size-small);line-height:var(--text-body-lineHeight-small);color:var(--fgColor-default);}.selected-provider.svelte-1sk6wwy, .auth-choice.svelte-1sk6wwy {display:grid;gap:var(--base-size-4);}.selected-provider.svelte-1sk6wwy span:where(.svelte-1sk6wwy), .auth-choice.svelte-1sk6wwy p:where(.svelte-1sk6wwy) {margin:0;color:var(--fgColor-muted);}.provider-choices.svelte-1sk6wwy {margin:0;padding:0;border:0;}.provider-choices.svelte-1sk6wwy legend:where(.svelte-1sk6wwy) {padding:0;margin-bottom:var(--base-size-8);font-weight:var(--base-text-weight-semibold);font-size:var(--text-body-size-medium);}.provider-choice.svelte-1sk6wwy {display:flex;align-items:flex-start;gap:var(--base-size-8);padding:var(--base-size-12);border:var(--borderWidth-thin) solid var(--borderColor-default);border-radius:var(--borderRadius-medium);cursor:pointer;}.provider-choice.svelte-1sk6wwy + .provider-choice:where(.svelte-1sk6wwy) {margin-top:var(--base-size-8);}.provider-choice.selected.svelte-1sk6wwy {border-color:var(--borderColor-accent-emphasis);background-color:var(--bgColor-accent-muted);}.provider-choice.svelte-1sk6wwy input:where(.svelte-1sk6wwy) {margin:3px 0 0;flex-shrink:0;}.provider-choice.svelte-1sk6wwy span:where(.svelte-1sk6wwy) {display:grid;gap:2px;}.provider-choice.svelte-1sk6wwy strong:where(.svelte-1sk6wwy) {font-weight:var(--base-text-weight-semibold);}.provider-choice.svelte-1sk6wwy small:where(.svelte-1sk6wwy) {color:var(--fgColor-muted);font-size:var(--text-body-size-small);line-height:var(--text-body-lineHeight-small);}.provider-choice.svelte-1sk6wwy small:where(.svelte-1sk6wwy) + small:where(.svelte-1sk6wwy) {margin-top:var(--base-size-4);}.input-group.svelte-1sk6wwy {display:flex;align-items:stretch;}.input-group.svelte-1sk6wwy .form-control {border-top-right-radius:0;border-bottom-right-radius:0;}.password-toggle.svelte-1sk6wwy {flex-shrink:0;margin-left:-1px;padding:var(--base-size-8) var(--base-size-16);border:var(--borderWidth-thin) solid var(--button-default-borderColor-rest, var(--borderColor-default));border-radius:0 var(--borderRadius-medium) var(--borderRadius-medium) 0;background:var(--button-default-bgColor-rest, var(--bgColor-muted));color:var(--button-default-fgColor-rest, var(--fgColor-default));font:inherit;cursor:pointer;}.password-toggle.svelte-1sk6wwy:hover {background:var(--button-default-bgColor-hover, var(--bgColor-muted));}.text-link.svelte-1sk6wwy {padding:0;border:0;background:transparent;color:var(--fgColor-accent);font:inherit;font-size:var(--text-body-size-small);cursor:pointer;text-align:left;}.text-link.svelte-1sk6wwy:hover {text-decoration:underline;}.links.svelte-1sk6wwy {display:flex;flex-wrap:wrap;gap:var(--base-size-4) var(--base-size-16);margin-top:var(--base-size-16);font-size:var(--text-body-size-small);}.links.svelte-1sk6wwy a:where(.svelte-1sk6wwy) {color:var(--fgColor-accent);}.actions.svelte-1sk6wwy {display:flex;align-items:center;justify-content:space-between;gap:var(--base-size-8);margin-top:var(--base-size-16);}.selection-actions.svelte-1sk6wwy {margin-top:var(--base-size-16);}
8
+ code: `.setup-wrapper.svelte-1sk6wwy {min-height:100vh;padding:var(--base-size-48) var(--base-size-24);background-color:var(--bgColor-muted);color:var(--fgColor-default);}.setup-container.svelte-1sk6wwy {width:100%;max-width:var(--base-size-600);margin:0 auto;}.setup-header.svelte-1sk6wwy {text-align:center;margin-bottom:var(--base-size-24);}.setup-logo.svelte-1sk6wwy {color:var(--fgColor-default);margin-bottom:var(--base-size-16);}.setup-header.svelte-1sk6wwy h1:where(.svelte-1sk6wwy) {margin:0;font-size:var(--text-title-size-medium);font-weight:var(--base-text-weight-light);color:var(--fgColor-default);}.setup-subtitle.svelte-1sk6wwy {margin:var(--base-size-4) 0 0;font-size:var(--text-body-size-medium);color:var(--fgColor-muted);}.steps.svelte-1sk6wwy {display:grid;grid-template-columns:repeat(3, 1fr);gap:var(--base-size-8);margin:0 0 var(--base-size-16);padding:0;list-style:none;}.step-item.svelte-1sk6wwy {display:flex;width:100%;align-items:center;justify-content:center;gap:var(--base-size-8);padding:var(--base-size-8) var(--base-size-12);background-color:var(--bgColor-default);border:var(--borderWidth-thin) solid var(--borderColor-default);border-radius:var(--borderRadius-medium);color:var(--fgColor-muted);cursor:pointer;font:inherit;font-size:var(--text-body-size-small);}.step-item.svelte-1sk6wwy:disabled {cursor:default;}.step-item.svelte-1sk6wwy:not(:disabled):hover {border-color:var(--borderColor-accent-emphasis);}.step-item.active.svelte-1sk6wwy {border-color:var(--borderColor-accent-emphasis);color:var(--fgColor-default);font-weight:var(--base-text-weight-medium);}.step-index.svelte-1sk6wwy {display:inline-flex;align-items:center;justify-content:center;width:var(--base-size-20);height:var(--base-size-20);flex-shrink:0;border-radius:50%;background-color:var(--bgColor-muted);font-size:var(--text-body-size-small);line-height:1;}.step-item.active.svelte-1sk6wwy .step-index:where(.svelte-1sk6wwy) {background-color:var(--button-primary-bgColor-rest);color:var(--button-primary-fgColor-rest);}.step-item.done.svelte-1sk6wwy .step-index:where(.svelte-1sk6wwy) {background-color:var(--bgColor-success-muted, #dafbe1);color:var(--fgColor-success, #1a7f37);}.step-label.svelte-1sk6wwy {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.form-row.svelte-1sk6wwy {display:grid;grid-template-columns:1fr 1fr;gap:var(--base-size-16);}.optional.svelte-1sk6wwy {font-weight:var(--base-text-weight-normal);color:var(--fgColor-muted);}.note.svelte-1sk6wwy {margin:var(--base-size-8) 0 0;font-size:var(--text-body-size-small);line-height:var(--text-body-lineHeight-small);color:var(--fgColor-muted);}.notice.svelte-1sk6wwy {padding:var(--base-size-12);margin-bottom:var(--base-size-16);background-color:var(--bgColor-accent-muted);border:var(--borderWidth-thin) solid var(--borderColor-accent-muted);border-radius:var(--borderRadius-medium);font-size:var(--text-body-size-small);line-height:var(--text-body-lineHeight-small);color:var(--fgColor-default);}.provider-choices.svelte-1sk6wwy {margin:0;padding:0;border:0;}.provider-choices.svelte-1sk6wwy legend:where(.svelte-1sk6wwy) {padding:0;margin-bottom:var(--base-size-8);font-weight:var(--base-text-weight-semibold);font-size:var(--text-body-size-medium);}.provider-choice.svelte-1sk6wwy {display:flex;align-items:flex-start;gap:var(--base-size-8);padding:var(--base-size-12);border:var(--borderWidth-thin) solid var(--borderColor-default);border-radius:var(--borderRadius-medium);cursor:pointer;}.provider-choice.svelte-1sk6wwy + .provider-choice:where(.svelte-1sk6wwy) {margin-top:var(--base-size-8);}.provider-choice.selected.svelte-1sk6wwy {border-color:var(--borderColor-accent-emphasis);background-color:var(--bgColor-accent-muted);}.provider-choice.svelte-1sk6wwy input:where(.svelte-1sk6wwy) {margin:3px 0 0;flex-shrink:0;}.provider-choice.svelte-1sk6wwy span:where(.svelte-1sk6wwy) {display:grid;gap:2px;}.provider-choice.svelte-1sk6wwy strong:where(.svelte-1sk6wwy) {font-weight:var(--base-text-weight-semibold);}.provider-choice.svelte-1sk6wwy small:where(.svelte-1sk6wwy) {color:var(--fgColor-muted);font-size:var(--text-body-size-small);line-height:var(--text-body-lineHeight-small);}.provider-choice.svelte-1sk6wwy small:where(.svelte-1sk6wwy) + small:where(.svelte-1sk6wwy) {margin-top:var(--base-size-4);}.input-group.svelte-1sk6wwy {display:flex;align-items:stretch;}.input-group.svelte-1sk6wwy .form-control {border-top-right-radius:0;border-bottom-right-radius:0;}.password-toggle.svelte-1sk6wwy {flex-shrink:0;margin-left:-1px;padding:var(--base-size-8) var(--base-size-16);border:var(--borderWidth-thin) solid var(--button-default-borderColor-rest, var(--borderColor-default));border-radius:0 var(--borderRadius-medium) var(--borderRadius-medium) 0;background:var(--button-default-bgColor-rest, var(--bgColor-muted));color:var(--button-default-fgColor-rest, var(--fgColor-default));font:inherit;cursor:pointer;}.password-toggle.svelte-1sk6wwy:hover {background:var(--button-default-bgColor-hover, var(--bgColor-muted));}.links.svelte-1sk6wwy {display:flex;flex-wrap:wrap;gap:var(--base-size-4) var(--base-size-16);margin-top:var(--base-size-16);font-size:var(--text-body-size-small);}.links.svelte-1sk6wwy a:where(.svelte-1sk6wwy) {color:var(--fgColor-accent);}.actions.svelte-1sk6wwy {display:flex;align-items:center;justify-content:space-between;gap:var(--base-size-8);margin-top:var(--base-size-16);}.selection-actions.svelte-1sk6wwy {margin-top:var(--base-size-16);}
9
9
  @media (max-width: 560px) {.setup-wrapper.svelte-1sk6wwy {padding:var(--base-size-24) var(--base-size-16);}.form-row.svelte-1sk6wwy {grid-template-columns:1fr;gap:0;}.step-label.svelte-1sk6wwy {display:none;}.steps.svelte-1sk6wwy {grid-template-columns:repeat(3, 1fr);}
10
10
  }`
11
11
  };
12
- function ys(ae, We) {
13
- Je(We, !0), Qe(ae, bs);
14
- const ze = [], Pe = ["Admin", "Payment details", "Email"];
15
- let u = v(1);
12
+ function xs(X, Ke) {
13
+ as(Ke, !0), ts(X, _s);
14
+ const Ee = [];
15
+ let y = v(1);
16
16
  const we = new URLSearchParams(window.location.search).get("token") ?? "";
17
- let m = v(null), Se = v(!1), O = v(""), h = v("otp"), re = v(""), te = v(!1), oe = v(""), ie = v(""), me = v(""), fe = v(""), be = v(""), le = v(""), ye = v(""), V = v(""), X = v(""), he = v(""), ge = v(""), g = v(""), G = v(!1);
18
- Ve(() => {
19
- we && fetch(`/api/admin/setup?token=${encodeURIComponent(we)}`).then(async (i) => i.ok ? await i.json() : null).then((i) => {
20
- i?.suggestedEmail && !e(O) && t(O, i.suggestedEmail, !0);
17
+ let A = v(!0), q = v(!0), Te = v(!1), h = v(null), D = v("");
18
+ const Ue = ue(() => e(q) ? "otp" : "password"), me = 12;
19
+ let ee = v(""), se = v(!1), ae = v(""), te = v(""), fe = v(""), be = v(""), ye = v(""), re = v(""), he = v(""), oe = v(""), le = v(""), ge = v(""), ke = v(""), E = v(""), O = v(!1);
20
+ rs(() => {
21
+ we && fetch(`/api/admin/setup?token=${encodeURIComponent(we)}`).then(async (l) => l.ok ? await l.json() : null).then((l) => {
22
+ l?.suggestedEmail && !e(D) && o(D, l.suggestedEmail, !0);
21
23
  }).catch(() => {
22
24
  });
23
25
  });
24
- function Ye() {
25
- if (!e(m)) {
26
- t(g, "Choose a payment provider to continue.");
27
- return;
28
- }
29
- t(g, ""), t(Se, !0), window.scrollTo({ top: 0, behavior: "smooth" });
26
+ const ie = ue(() => [
27
+ "Admin",
28
+ ...e(A) ? ["Payment details"] : [],
29
+ ...e(q) ? ["Email"] : []
30
+ ]), ne = ue(() => e(ie)[e(y) - 1]), Fe = ue(() => e(y) >= e(ie).length);
31
+ function Oe() {
32
+ o(E, ""), e(A) || o(h, null), o(Te, !0), window.scrollTo({ top: 0, behavior: "smooth" });
30
33
  }
31
- function je() {
32
- if (e(u) === 1 && (!e(O).trim() || e(h) === "password" && !e(re))) {
33
- t(
34
- g,
35
- e(h) === "password" ? "An email address and password are required." : "An email address is required.",
36
- !0
37
- );
38
- return;
39
- }
40
- if (e(u) === 2 && e(m) === "bank_transfer" && (!e(oe).trim() || !e(ie).trim())) {
41
- t(g, "An account holder and IBAN are required for bank transfers.");
42
- return;
34
+ function Ne(l) {
35
+ if (l === "Admin") {
36
+ if (!e(D).trim()) return "An email address is required.";
37
+ if (e(ee).length < me)
38
+ return `Choose a password of at least ${me} characters.`;
43
39
  }
44
- if (e(u) === 2 && e(m) === "stripe" && !e(le).trim()) {
45
- t(g, "Your Stripe secret key is required for card payments.");
46
- return;
40
+ if (l === "Payment details") {
41
+ if (!e(h)) return "Choose how you want to accept payments.";
42
+ if (e(h) === "bank_transfer" && (!e(ae).trim() || !e(te).trim()))
43
+ return "An account holder and IBAN are required for bank transfers.";
44
+ if (e(h) === "stripe" && !e(re).trim())
45
+ return "Your Stripe secret key is required for card payments.";
47
46
  }
48
- if (e(u) === 3 && e(h) === "otp" && (!e(V).trim() || !e(X).trim())) {
49
- t(g, "Configure Plunk and a sender email to use email sign-in codes.");
47
+ return l === "Email" && (!e(oe).trim() || !e(le).trim()) ? "An email provider API key and sender address are required." : null;
48
+ }
49
+ function Ye() {
50
+ const l = Ne(e(ne));
51
+ if (l) {
52
+ o(E, l, !0);
50
53
  return;
51
54
  }
52
- t(g, ""), t(u, e(u) + 1), window.scrollTo({ top: 0, behavior: "smooth" });
55
+ o(E, ""), o(y, e(y) + 1), window.scrollTo({ top: 0, behavior: "smooth" });
53
56
  }
54
- function $e() {
55
- Be(e(u) - 1);
57
+ function Ve() {
58
+ qe(e(y) - 1);
56
59
  }
57
- function Be(i) {
58
- i < 1 || i > e(u) || (t(g, ""), t(u, i, !0), window.scrollTo({ top: 0, behavior: "smooth" }));
60
+ function qe(l) {
61
+ l < 1 || l > e(y) || (o(E, ""), o(y, l, !0), window.scrollTo({ top: 0, behavior: "smooth" }));
59
62
  }
60
- async function Me(i) {
61
- if (i.preventDefault(), e(h) === "otp" && (!e(V).trim() || !e(X).trim())) {
62
- t(g, "Configure Plunk and a sender email to use email sign-in codes.");
63
- return;
63
+ async function Ze(l) {
64
+ l.preventDefault();
65
+ for (const p of e(ie)) {
66
+ const g = Ne(p);
67
+ if (g) {
68
+ o(E, g, !0);
69
+ return;
70
+ }
64
71
  }
65
- t(G, !0), t(g, "");
72
+ o(O, !0), o(E, "");
66
73
  try {
67
- const w = await fetch("/api/admin/setup", {
74
+ const p = await fetch("/api/admin/setup", {
68
75
  method: "POST",
69
76
  headers: { "Content-Type": "application/json" },
70
77
  body: JSON.stringify({
71
78
  setupToken: we,
72
- email: e(O),
73
- loginMethod: e(h),
74
- password: e(re),
75
- paymentProvider: e(m),
79
+ email: e(D),
80
+ password: e(ee),
81
+ modules: { shop: e(A), emails: e(q) },
82
+ paymentProvider: e(h),
76
83
  bankTransfer: {
77
- accountHolder: e(oe),
78
- iban: e(ie),
79
- bic: e(me),
80
- bankName: e(fe),
81
- instructions: e(be)
84
+ accountHolder: e(ae),
85
+ iban: e(te),
86
+ bic: e(fe),
87
+ bankName: e(be),
88
+ instructions: e(ye)
82
89
  },
83
- stripeSecretKey: e(le),
84
- stripeWebhookSecret: e(ye),
85
- plunkApiKey: e(V),
86
- fromEmail: e(X),
87
- fromName: e(he),
88
- replyTo: e(ge)
90
+ stripeSecretKey: e(re),
91
+ stripeWebhookSecret: e(he),
92
+ plunkApiKey: e(oe),
93
+ fromEmail: e(le),
94
+ fromName: e(ge),
95
+ replyTo: e(ke)
89
96
  })
90
- }), T = await w.json();
91
- if (!w.ok) throw new Error(T.error || "Setup failed");
97
+ }), g = await p.json();
98
+ if (!p.ok) throw new Error(g.error || "Setup failed");
92
99
  window.location.href = "/admin";
93
- } catch (w) {
94
- t(g, w instanceof Error ? w.message : "Setup failed", !0), t(G, !1);
100
+ } catch (p) {
101
+ o(E, p instanceof Error ? p.message : "Setup failed", !0), o(O, !1);
95
102
  }
96
103
  }
97
- var ke = fs(), Te = a(ke), Ae = r(a(Te), 2);
104
+ var _e = ks(), Ie = t(_e), Le = s(t(Ie), 2);
98
105
  {
99
- var Ue = (i) => {
100
- var w = as(), T = r(a(w));
101
- s(w), Z(() => Y(T, ` ${e(g) ?? ""}`)), p(i, w);
106
+ var Ge = (l) => {
107
+ var p = ds(), g = s(t(p));
108
+ a(p), U(() => J(g, ` ${e(E) ?? ""}`)), c(l, p);
102
109
  };
103
- W(Ae, (i) => {
104
- e(g) && i(Ue);
110
+ I(Le, (l) => {
111
+ e(E) && l(Ge);
105
112
  });
106
113
  }
107
- var Ke = r(Ae, 2);
114
+ var Je = s(Le, 2);
108
115
  {
109
- var De = (i) => {
110
- var w = rs(), T = r(a(w), 2), U = a(T), K = r(a(U), 2);
111
- let ne;
112
- var J = a(K);
113
- y(J), J.value = J.__value = "bank_transfer", B(2), s(K);
114
- var ee = r(K, 2);
115
- let se;
116
- var D = a(ee);
117
- y(D), D.value = D.__value = "stripe", B(2), s(ee), s(U);
118
- var de = r(U, 4), _e = r(a(de), 2);
119
- ve(_e, {
116
+ var Qe = (l) => {
117
+ var p = ps(), g = s(t(p), 2), L = t(g), H = s(t(L), 2);
118
+ let de;
119
+ var Y = t(H);
120
+ f(Y), B(2), a(H);
121
+ var V = s(H, 2);
122
+ let Z;
123
+ var R = t(V);
124
+ f(R);
125
+ var ve = s(R, 2), xe = s(t(ve), 4);
126
+ {
127
+ var ze = (r) => {
128
+ var n = vs();
129
+ c(r, n);
130
+ }, Ce = (r) => {
131
+ var n = cs();
132
+ c(r, n);
133
+ };
134
+ I(xe, (r) => {
135
+ e(A) ? r(ze) : e(q) && r(Ce, 1);
136
+ });
137
+ }
138
+ a(ve), a(V), a(L);
139
+ var ce = s(L, 4), i = s(t(ce), 2);
140
+ pe(i, {
120
141
  variant: "primary",
121
- onclick: Ye,
122
- children: (F, Ee) => {
142
+ onclick: Oe,
143
+ children: (r, n) => {
123
144
  B();
124
- var xe = ce("Continue");
125
- p(F, xe);
145
+ var d = F("Continue");
146
+ c(r, d);
126
147
  },
127
148
  $$slots: { default: !0 }
128
- }), s(de), s(T), s(w), Z(() => {
129
- ne = Ce(K, 1, "provider-choice svelte-1sk6wwy", null, ne, { selected: e(m) === "bank_transfer" }), se = Ce(ee, 1, "provider-choice svelte-1sk6wwy", null, se, { selected: e(m) === "stripe" });
130
- }), Ne(ze, [], J, () => e(m), (F) => t(m, F)), Ne(ze, [], D, () => e(m), (F) => t(m, F)), p(i, w);
131
- }, Fe = (i) => {
132
- var w = ms(), T = pe(w);
133
- Ge(T, 22, () => Pe, (o) => o, (o, l, n) => {
134
- var d = ts(), k = a(d);
135
- let A;
136
- var _ = a(k), P = a(_, !0);
137
- s(_);
138
- var f = r(_, 2), x = a(f, !0);
139
- s(f), s(k), s(d), Z(() => {
140
- A = Ce(k, 1, "step-item svelte-1sk6wwy", null, A, {
141
- active: e(u) === e(n) + 1,
142
- done: e(u) > e(n) + 1
143
- }), Le(k, "aria-current", e(u) === e(n) + 1 ? "step" : void 0), k.disabled = e(n) + 1 > e(u), Y(P, e(u) > e(n) + 1 ? "✓" : e(n) + 1), Y(x, l);
144
- }), ue("click", k, () => Be(e(n) + 1)), p(o, d);
145
- }), s(T);
146
- var U = r(T, 2), K = a(U);
149
+ }), a(ce), a(g), a(p), U(() => {
150
+ de = Q(H, 1, "provider-choice svelte-1sk6wwy", null, de, { selected: e(A) }), Z = Q(V, 1, "provider-choice svelte-1sk6wwy", null, Z, { selected: e(q) }), R.disabled = e(A);
151
+ }), Pe("change", Y, () => {
152
+ e(A) && o(q, !0);
153
+ }), $e(Y, () => e(A), (r) => o(A, r)), $e(R, () => e(q), (r) => o(q, r)), c(l, p);
154
+ }, Xe = (l) => {
155
+ var p = gs(), g = Be(p);
156
+ ls(g, 22, () => e(ie), (i) => i, (i, r, n) => {
157
+ var d = us(), w = t(d);
158
+ let x;
159
+ var m = t(w), b = t(m, !0);
160
+ a(m);
161
+ var z = s(m, 2), S = t(z, !0);
162
+ a(z), a(w), a(d), U(() => {
163
+ x = Q(w, 1, "step-item svelte-1sk6wwy", null, x, {
164
+ active: e(y) === e(n) + 1,
165
+ done: e(y) > e(n) + 1
166
+ }), Ae(w, "aria-current", e(y) === e(n) + 1 ? "step" : void 0), w.disabled = e(n) + 1 > e(y), J(b, e(y) > e(n) + 1 ? "✓" : e(n) + 1), J(S, r);
167
+ }), Pe("click", w, () => qe(e(n) + 1)), c(i, d);
168
+ }), a(g);
169
+ var L = s(g, 2), H = t(L);
147
170
  {
148
- var ne = (o) => {
149
- var l = ls(), n = r(a(l), 2), d = a(n), k = r(a(d), 2);
150
- y(k), B(2), s(d);
151
- var A = r(d, 2);
152
- {
153
- var _ = (f) => {
154
- var x = os(), S = r(a(x), 4);
155
- s(x), ue("click", S, () => t(h, "password")), p(f, x);
156
- }, P = (f) => {
157
- var x = is(), S = pe(x), j = r(a(S), 2), E = a(j);
158
- y(E);
159
- var I = r(E, 2), q = a(I, !0);
160
- s(I), s(j), B(2), s(S);
161
- var R = r(S, 2);
162
- Z(() => {
163
- Le(E, "type", e(te) ? "text" : "password"), Y(q, e(te) ? "Hide" : "Show");
164
- }), z(E, () => e(re), (C) => t(re, C)), ue("click", I, () => t(te, !e(te))), ue("click", R, () => t(h, "otp")), p(f, x);
165
- };
166
- W(A, (f) => {
167
- e(h) === "otp" ? f(_) : f(P, -1);
168
- });
169
- }
170
- s(n), s(l), z(k, () => e(O), (f) => t(O, f)), p(o, l);
171
- }, J = (o) => {
172
- var l = vs(), n = a(l), d = r(a(n), 2), k = a(d, !0);
173
- s(d), s(n);
174
- var A = r(n, 2), _ = a(A), P = a(_), f = a(P, !0);
175
- s(P);
176
- var x = r(P), S = a(x, !0);
177
- s(x), s(_);
178
- var j = r(_, 2);
179
- {
180
- var E = (q) => {
181
- var R = ns(), C = pe(R), $ = r(a(C), 2);
182
- y($), s(C);
183
- var N = r(C, 2), M = r(a(N), 2);
184
- y(M), s(N);
185
- var H = r(N, 2), c = a(H), Q = r(a(c));
186
- y(Q), s(c);
187
- var qe = r(c, 2), He = r(a(qe));
188
- y(He), s(qe), s(H);
189
- var Ie = r(H, 2), Re = r(a(Ie), 2);
190
- ss(Re), s(Ie), z($, () => e(oe), (L) => t(oe, L)), z(M, () => e(ie), (L) => t(ie, L)), z(Q, () => e(me), (L) => t(me, L)), z(He, () => e(fe), (L) => t(fe, L)), z(Re, () => e(be), (L) => t(be, L)), p(q, R);
191
- }, I = (q) => {
192
- var R = ds(), C = pe(R), $ = r(a(C), 2);
193
- y($), s(C);
194
- var N = r(C, 2), M = r(a(N), 2);
195
- y(M), B(2), s(N), B(2), z($, () => e(le), (H) => t(le, H)), z(M, () => e(ye), (H) => t(ye, H)), p(q, R);
196
- };
197
- W(j, (q) => {
198
- e(m) === "bank_transfer" ? q(E) : e(m) === "stripe" && q(I, 1);
199
- });
200
- }
201
- s(A), s(l), Z(() => {
202
- Y(k, e(m) === "stripe" ? "Connect Stripe for card and wallet payments." : "Add the account details your customers will use for SEPA transfers."), Y(f, e(m) === "stripe" ? "Stripe card payments" : "SEPA bank transfer"), Y(S, e(m) === "stripe" ? "Stripe verifies and confirms successful payments automatically." : "There is no processing fee; you confirm incoming payments yourself.");
203
- }), p(o, l);
204
- }, ee = (o) => {
205
- var l = us(), n = a(l), d = r(a(n), 2), k = a(d, !0);
206
- s(d), s(n);
207
- var A = r(n, 2), _ = r(a(A), 2), P = a(_), f = r(a(P));
171
+ var de = (i) => {
172
+ var r = ws(), n = s(t(r), 2), d = t(n), w = s(t(d), 2);
173
+ f(w), B(2), a(d);
174
+ var x = s(d, 2), m = s(t(x), 2), b = t(m);
175
+ f(b), Ae(b, "minlength", me);
176
+ var z = s(b, 2), S = t(z, !0);
177
+ a(z), a(m);
178
+ var W = s(m, 2), j = t(W);
179
+ j.nodeValue = "At least 12 characters. Save it in your password manager: ";
180
+ var P = s(j);
208
181
  {
209
- var x = (c) => {
210
- var Q = cs();
211
- p(c, Q);
182
+ var C = (u) => {
183
+ var T = F(`you normally sign in with a code sent to your email, and this password is how
184
+ you get back in if email delivery ever fails.`);
185
+ c(u, T);
186
+ }, M = (u) => {
187
+ var T = F("this is how you sign in.");
188
+ c(u, T);
212
189
  };
213
- W(f, (c) => {
214
- e(h) === "password" && c(x);
190
+ I(P, (u) => {
191
+ e(Ue) === "otp" ? u(C) : u(M, -1);
215
192
  });
216
193
  }
217
- s(P);
218
- var S = r(P, 2);
219
- y(S), s(_);
220
- var j = r(_, 2), E = a(j), I = a(E), q = r(a(I));
194
+ a(W), a(x), a(n), a(r), U(() => {
195
+ Ae(b, "type", e(se) ? "text" : "password"), J(S, e(se) ? "Hide" : "Show");
196
+ }), k(w, () => e(D), (u) => o(D, u)), k(b, () => e(ee), (u) => o(ee, u)), Pe("click", z, () => o(se, !e(se))), c(i, r);
197
+ }, Y = (i) => {
198
+ var r = bs(), n = s(t(r), 2), d = t(n), w = s(t(d), 2);
199
+ let x;
200
+ var m = t(w);
201
+ f(m), m.value = m.__value = "bank_transfer", B(2), a(w);
202
+ var b = s(w, 2);
203
+ let z;
204
+ var S = t(b);
205
+ f(S), S.value = S.__value = "stripe", B(2), a(b), a(d);
206
+ var W = s(d, 4);
221
207
  {
222
- var R = (c) => {
223
- var Q = ps();
224
- p(c, Q);
208
+ var j = (C) => {
209
+ var M = ms(), u = Be(M), T = s(t(u), 2);
210
+ f(T), a(u);
211
+ var K = s(u, 2), G = s(t(K), 2);
212
+ f(G), a(K);
213
+ var $ = s(K, 2), Se = t($), He = s(t(Se));
214
+ f(He), a(Se);
215
+ var Re = s(Se, 2), We = s(t(Re));
216
+ f(We), a(Re), a($);
217
+ var je = s($, 2), Me = s(t(je), 2);
218
+ ns(Me), a(je), k(T, () => e(ae), (N) => o(ae, N)), k(G, () => e(te), (N) => o(te, N)), k(He, () => e(fe), (N) => o(fe, N)), k(We, () => e(be), (N) => o(be, N)), k(Me, () => e(ye), (N) => o(ye, N)), c(C, M);
219
+ }, P = (C) => {
220
+ var M = fs(), u = Be(M), T = s(t(u), 2);
221
+ f(T), a(u);
222
+ var K = s(u, 2), G = s(t(K), 2);
223
+ f(G), B(2), a(K), B(2), k(T, () => e(re), ($) => o(re, $)), k(G, () => e(he), ($) => o(he, $)), c(C, M);
225
224
  };
226
- W(q, (c) => {
227
- e(h) === "password" && c(R);
225
+ I(W, (C) => {
226
+ e(h) === "bank_transfer" ? C(j) : e(h) === "stripe" && C(P, 1);
228
227
  });
229
228
  }
230
- s(I);
231
- var C = r(I, 2);
232
- y(C), s(E);
233
- var $ = r(E, 2), N = r(a($));
234
- y(N), s($), s(j);
235
- var M = r(j, 2), H = r(a(M));
236
- y(H), s(M), B(2), s(A), s(l), Z(() => {
237
- Y(k, e(h) === "otp" ? "Plunk will send order, subscriber, and administrator sign-in codes." : "Plunk sends order, subscriber, and administrator emails. You can skip this for now."), S.required = e(h) === "otp", C.required = e(h) === "otp";
238
- }), z(S, () => e(V), (c) => t(V, c)), z(C, () => e(X), (c) => t(X, c)), z(N, () => e(he), (c) => t(he, c)), z(H, () => e(ge), (c) => t(ge, c)), p(o, l);
229
+ a(n), a(r), U(() => {
230
+ x = Q(w, 1, "provider-choice svelte-1sk6wwy", null, x, { selected: e(h) === "bank_transfer" }), z = Q(b, 1, "provider-choice svelte-1sk6wwy", null, z, { selected: e(h) === "stripe" });
231
+ }), De(Ee, [], m, () => e(h), (C) => o(h, C)), De(Ee, [], S, () => e(h), (C) => o(h, C)), c(i, r);
232
+ }, V = (i) => {
233
+ var r = ys(), n = s(t(r), 2), d = s(t(n), 2), w = s(t(d), 2);
234
+ f(w), a(d);
235
+ var x = s(d, 2), m = t(x), b = s(t(m), 2);
236
+ f(b), a(m);
237
+ var z = s(m, 2), S = s(t(z));
238
+ f(S), a(z), a(x);
239
+ var W = s(x, 2), j = s(t(W));
240
+ f(j), a(W), B(2), a(n), a(r), k(w, () => e(oe), (P) => o(oe, P)), k(b, () => e(le), (P) => o(le, P)), k(S, () => e(ge), (P) => o(ge, P)), k(j, () => e(ke), (P) => o(ke, P)), c(i, r);
239
241
  };
240
- W(K, (o) => {
241
- e(u) === 1 ? o(ne) : e(u) === 2 ? o(J, 1) : o(ee, -1);
242
+ I(H, (i) => {
243
+ e(ne) === "Admin" ? i(de) : e(ne) === "Payment details" ? i(Y, 1) : e(ne) === "Email" && i(V, 2);
242
244
  });
243
245
  }
244
- var se = r(K, 2), D = a(se);
246
+ var Z = s(H, 2), R = t(Z);
245
247
  {
246
- var de = (o) => {
247
- ve(o, {
248
- onclick: $e,
248
+ var ve = (i) => {
249
+ pe(i, {
250
+ onclick: Ve,
249
251
  get disabled() {
250
- return e(G);
252
+ return e(O);
251
253
  },
252
- children: (l, n) => {
254
+ children: (r, n) => {
253
255
  B();
254
- var d = ce("Back");
255
- p(l, d);
256
+ var d = F("Back");
257
+ c(r, d);
256
258
  },
257
259
  $$slots: { default: !0 }
258
260
  });
259
- }, _e = (o) => {
260
- var l = ws();
261
- p(o, l);
261
+ }, xe = (i) => {
262
+ var r = hs();
263
+ c(i, r);
262
264
  };
263
- W(D, (o) => {
264
- e(u) > 1 ? o(de) : o(_e, -1);
265
+ I(R, (i) => {
266
+ e(y) > 1 ? i(ve) : i(xe, -1);
265
267
  });
266
268
  }
267
- var F = r(D, 2);
269
+ var ze = s(R, 2);
268
270
  {
269
- var Ee = (o) => {
270
- ve(o, {
271
+ var Ce = (i) => {
272
+ pe(i, {
271
273
  variant: "primary",
272
- onclick: je,
273
- children: (l, n) => {
274
+ onclick: Ye,
275
+ children: (r, n) => {
274
276
  B();
275
- var d = ce("Continue");
276
- p(l, d);
277
+ var d = F("Continue");
278
+ c(r, d);
277
279
  },
278
280
  $$slots: { default: !0 }
279
281
  });
280
- }, xe = (o) => {
281
- ve(o, {
282
+ }, ce = (i) => {
283
+ pe(i, {
282
284
  variant: "primary",
283
285
  type: "submit",
284
286
  get disabled() {
285
- return e(G);
287
+ return e(O);
286
288
  },
287
- children: (l, n) => {
289
+ children: (r, n) => {
288
290
  B();
289
- var d = ce();
290
- Z(() => Y(d, e(G) ? "Finishing setup…" : "Finish setup")), p(l, d);
291
+ var d = F();
292
+ U(() => J(d, e(O) ? "Finishing setup…" : "Finish setup")), c(r, d);
291
293
  },
292
294
  $$slots: { default: !0 }
293
295
  });
294
296
  };
295
- W(F, (o) => {
296
- e(u) < Pe.length ? o(Ee) : o(xe, -1);
297
+ I(ze, (i) => {
298
+ e(Fe) ? i(ce, -1) : i(Ce);
297
299
  });
298
300
  }
299
- s(se), s(U), es("submit", U, Me), p(i, w);
301
+ a(Z), a(L), is("submit", L, Ze), c(l, p);
300
302
  };
301
- W(Ke, (i) => {
302
- e(Se) ? i(Fe, -1) : i(De);
303
+ I(Je, (l) => {
304
+ e(Te) ? l(Xe, -1) : l(Qe);
303
305
  });
304
306
  }
305
- s(Te), s(ke), p(ae, ke), Xe();
307
+ a(Ie), a(_e), c(X, _e), os();
306
308
  }
307
- Ze(["click"]);
308
- customElements.define("hintergrund-setup", Oe(ys, {}, [], []));
309
+ es(["change", "click"]);
310
+ customElements.define("hintergrund-setup", ss(xs, {}, [], []));
309
311
  export {
310
- ys as default
312
+ xs as default
311
313
  };