@hintergrund/ui 0.2.1 → 0.2.2

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.
@@ -1,8 +1,8 @@
1
1
  import { O as w } from "./client-Sh7wNjbG.js";
2
- import { d, h as y, e as E } from "./Builder-B0XYsyXe.js";
2
+ import { d, h as y, e as E } from "./Builder-BhGmzNTC.js";
3
3
  import { h as b } from "./headers-u7rXGJ9f.js";
4
4
  import { h as I, b as A, i as _, r as P } from "./github-copilot-headers-DWh_6bE3.js";
5
- import { p as T, c as O, a as S } from "./openai-responses-shared-eUUJSL4D.js";
5
+ import { p as T, c as O, a as S } from "./openai-responses-shared-CCD7nRqy.js";
6
6
  import { b as C } from "./transform-messages-CkpQp6fJ.js";
7
7
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(e) {
8
8
  return Promise.resolve().then(e);
@@ -1,6 +1,6 @@
1
- import { f as S } from "./Builder-B0XYsyXe.js";
1
+ import { f as S } from "./Builder-BhGmzNTC.js";
2
2
  import { s as v } from "./hash-DFlR084x.js";
3
- import { p as x } from "./json-parse-DmJ6NiZE.js";
3
+ import { p as x } from "./json-parse-Dk_xwHcS.js";
4
4
  import { t as T, s as _ } from "./transform-messages-CkpQp6fJ.js";
5
5
  typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(r) {
6
6
  return Promise.resolve().then(r);
package/dist/setup.js CHANGED
@@ -1,226 +1,311 @@
1
- import { Y as je, Z as Ie, _ as Re, P as d, Q as We, a1 as s, a2 as r, ah as Ke, a7 as A, ay as Ye, a5 as f, aa as qe, ab as z, ad as t, a8 as T, ai as Fe, N as e, ar as be, ag as $, S as l, af as w, ae as k, a3 as R, a4 as W, a9 as m, ak as Ue, b6 as ye } from "./global-CFcrkAa3.js";
2
- typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(E) {
3
- return Promise.resolve().then(E);
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);
4
4
  } });
5
- var Ze = z('<li><span class="step-index svelte-1sk6wwy"> </span> <span class="step-label svelte-1sk6wwy"> </span></li>'), De = z('<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>'), Me = z(`<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="" minlength="12" autocomplete="new-password"/> <!></div> <p class="note svelte-1sk6wwy">A strong password was generated for you. Save it, or replace it with your own (at
6
- least 12 characters).</p></div></div></div>`), Ve = z('<div class="subsection svelte-1sk6wwy"><div class="form-group"><label for="stripe-secret">Stripe secret key</label> <input id="stripe-secret" class="form-control" type="password" 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></div>'), Je = z(`<div class="Box"><div class="Box-header"><h2>Set up payments</h2> <p>Start with direct bank transfer, then optionally add card payments.</p></div> <div class="Box-body"><div class="notice svelte-1sk6wwy"><strong>Bank transfer has no processing fee.</strong> Customers receive your account details
7
- and their order number as the payment reference; you confirm that the money arrived in your
8
- dashboard. If you prefer card payments, connect Stripe and run both side by side — the processing
9
- fee is Stripe’s, never ours.</div> <div class="form-group"><label for="account-holder">Account holder</label> <input id="account-holder" class="form-control" autocomplete="organization"/></div> <div class="form-group"><label for="iban">IBAN</label> <input id="iban" class="form-control" 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> <fieldset class="choices svelte-1sk6wwy"><legend class="svelte-1sk6wwy">Payment methods</legend> <label class="choice svelte-1sk6wwy"><input type="radio" class="svelte-1sk6wwy"/> <span class="choice-text svelte-1sk6wwy"><strong class="svelte-1sk6wwy">Bank transfer only</strong> <small class="svelte-1sk6wwy">No processing fee; confirm incoming payments yourself.</small></span></label> <label class="choice svelte-1sk6wwy"><input type="radio" class="svelte-1sk6wwy"/> <span class="choice-text svelte-1sk6wwy"><strong class="svelte-1sk6wwy">Add Stripe for card payments</strong> <small class="svelte-1sk6wwy">Use card payments alongside bank transfer.</small></span></label></fieldset> <!></div></div>`), Oe = z(`<div class="Box"><div class="Box-header"><h2>Set up email</h2> <p>Plunk sends order, subscriber, and administrator emails. You can skip this for now.</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.
10
- The sender email must use that verified domain.</div> <div class="form-group"><label for="plunk-key">Plunk API key <span class="optional svelte-1sk6wwy">optional</span></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>`), Qe = z("<span></span>"), Ge = z('<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> <ol class="steps svelte-1sk6wwy" aria-label="Setup progress"></ol> <!> <form autocomplete="off"><!> <div class="actions svelte-1sk6wwy"><!> <!></div></form></div></main>');
11
- const Xe = {
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 = {
12
7
  hash: "svelte-1sk6wwy",
13
- 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);}
14
-
15
- /* Progress */.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;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);font-size:var(--text-body-size-small);color:var(--fgColor-muted);}.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);}.input-group.svelte-1sk6wwy {display:flex;}.input-group.svelte-1sk6wwy .form-control {border-top-right-radius:0;border-bottom-right-radius:0;}.input-group.svelte-1sk6wwy .input-group-btn {flex-shrink:0;margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0;}.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);}
16
-
17
- /* Choices */.choices.svelte-1sk6wwy {margin:0 0 var(--base-size-16);padding:0;border:0;}.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);}.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;}.choice.svelte-1sk6wwy + .choice:where(.svelte-1sk6wwy) {margin-top:var(--base-size-8);}.choice.svelte-1sk6wwy:has(input:where(.svelte-1sk6wwy):checked) {border-color:var(--borderColor-accent-emphasis);background-color:var(--bgColor-accent-muted);}.choice.svelte-1sk6wwy input:where(.svelte-1sk6wwy) {margin:3px 0 0;flex-shrink:0;}.choice-text.svelte-1sk6wwy {display:block;font-size:var(--text-body-size-medium);}.choice-text.svelte-1sk6wwy strong:where(.svelte-1sk6wwy) {display:block;font-weight:var(--base-text-weight-semibold);}.choice-text.svelte-1sk6wwy small:where(.svelte-1sk6wwy) {display:block;margin-top:2px;font-size:var(--text-body-size-small);line-height:var(--text-body-lineHeight-small);color:var(--fgColor-muted);}.subsection.svelte-1sk6wwy {padding-top:var(--base-size-16);border-top:var(--borderWidth-thin) solid var(--borderColor-default);}.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);}
18
-
19
- /* Actions */.actions.svelte-1sk6wwy {display:flex;align-items:center;justify-content:space-between;gap:var(--base-size-8);margin-top:var(--base-size-16);}
20
-
21
-
22
-
23
-
24
-
25
-
26
-
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);}
27
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);}
28
10
  }`
29
11
  };
30
- function es(E, he) {
31
- Ie(he, !0), Re(E, Xe);
32
- const oe = [], le = ["Admin", "Payments", "Email"];
33
- function ge() {
34
- const a = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789!@#$%^&*";
35
- return [...crypto.getRandomValues(new Uint8Array(20))].map((n) => a[n % a.length]).join("");
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);
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);
21
+ }).catch(() => {
22
+ });
23
+ });
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" });
36
30
  }
37
- let u = d(1);
38
- const ke = new URLSearchParams(window.location.search).get("token") ?? "";
39
- let N = d(""), H = d(We(ge())), L = d(!1), P = d("bank_transfer"), K = d(""), Y = d(""), q = d(""), F = d(""), U = d(""), Z = d(""), D = d(""), M = d(""), V = d(""), J = d(""), O = d(""), C = d(""), B = d(!1);
40
- function _e() {
41
- if (e(u) === 1 && (!e(N).trim() || e(H).length < 12)) {
42
- l(C, "An email address and a password of at least 12 characters are required.");
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.");
43
42
  return;
44
43
  }
45
- l(C, ""), l(u, e(u) + 1), window.scrollTo({ top: 0, behavior: "smooth" });
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;
47
+ }
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.");
50
+ return;
51
+ }
52
+ t(g, ""), t(u, e(u) + 1), window.scrollTo({ top: 0, behavior: "smooth" });
53
+ }
54
+ function $e() {
55
+ Be(e(u) - 1);
46
56
  }
47
- function xe() {
48
- l(C, ""), l(u, e(u) - 1), window.scrollTo({ top: 0, behavior: "smooth" });
57
+ function Be(i) {
58
+ i < 1 || i > e(u) || (t(g, ""), t(u, i, !0), window.scrollTo({ top: 0, behavior: "smooth" }));
49
59
  }
50
- async function ze(a) {
51
- a.preventDefault(), l(B, !0), l(C, "");
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;
64
+ }
65
+ t(G, !0), t(g, "");
52
66
  try {
53
- const o = await fetch("/api/admin/setup", {
67
+ const w = await fetch("/api/admin/setup", {
54
68
  method: "POST",
55
69
  headers: { "Content-Type": "application/json" },
56
70
  body: JSON.stringify({
57
- setupToken: ke,
58
- email: e(N),
59
- password: e(H),
60
- paymentProvider: e(P),
71
+ setupToken: we,
72
+ email: e(O),
73
+ loginMethod: e(h),
74
+ password: e(re),
75
+ paymentProvider: e(m),
61
76
  bankTransfer: {
62
- accountHolder: e(K),
63
- iban: e(Y),
64
- bic: e(q),
65
- bankName: e(F),
66
- instructions: e(U)
77
+ accountHolder: e(oe),
78
+ iban: e(ie),
79
+ bic: e(me),
80
+ bankName: e(fe),
81
+ instructions: e(be)
67
82
  },
68
- stripeSecretKey: e(Z),
69
- stripeWebhookSecret: e(D),
70
- plunkApiKey: e(M),
71
- fromEmail: e(V),
72
- fromName: e(J),
73
- replyTo: e(O)
83
+ stripeSecretKey: e(le),
84
+ stripeWebhookSecret: e(ye),
85
+ plunkApiKey: e(V),
86
+ fromEmail: e(X),
87
+ fromName: e(he),
88
+ replyTo: e(ge)
74
89
  })
75
- }), n = await o.json();
76
- if (!o.ok) throw new Error(n.error || "Setup failed");
90
+ }), T = await w.json();
91
+ if (!w.ok) throw new Error(T.error || "Setup failed");
77
92
  window.location.href = "/admin";
78
- } catch (o) {
79
- l(C, o instanceof Error ? o.message : "Setup failed", !0), l(B, !1);
93
+ } catch (w) {
94
+ t(g, w instanceof Error ? w.message : "Setup failed", !0), t(G, !1);
80
95
  }
81
96
  }
82
- var Q = Ge(), ie = r(Q), G = s(r(ie), 2);
83
- Ke(G, 22, () => le, (a) => a, (a, o, n) => {
84
- var i = Ze();
85
- let b;
86
- var c = r(i), y = r(c, !0);
87
- t(c);
88
- var p = s(c, 2), _ = r(p, !0);
89
- t(p), t(i), T(() => {
90
- b = Fe(i, 1, "step-item svelte-1sk6wwy", null, b, {
91
- active: e(u) === e(n) + 1,
92
- done: e(u) > e(n) + 1
93
- }), be(i, "aria-current", e(u) === e(n) + 1 ? "step" : void 0), $(y, e(u) > e(n) + 1 ? "✓" : e(n) + 1), $(_, o);
94
- }), f(a, i);
95
- }), t(G);
96
- var ne = s(G, 2);
97
+ var ke = fs(), Te = a(ke), Ae = r(a(Te), 2);
97
98
  {
98
- var Ce = (a) => {
99
- var o = De(), n = s(r(o));
100
- t(o), T(() => $(n, ` ${e(C) ?? ""}`)), f(a, o);
99
+ var Ue = (i) => {
100
+ var w = as(), T = r(a(w));
101
+ s(w), Z(() => Y(T, ` ${e(g) ?? ""}`)), p(i, w);
101
102
  };
102
- A(ne, (a) => {
103
- e(C) && a(Ce);
103
+ W(Ae, (i) => {
104
+ e(g) && i(Ue);
104
105
  });
105
106
  }
106
- var X = s(ne, 2), de = r(X);
107
+ var Ke = r(Ae, 2);
107
108
  {
108
- var Pe = (a) => {
109
- var o = Me(), n = s(r(o), 2), i = r(n), b = s(r(i), 2);
110
- w(b), k(2), t(i);
111
- var c = s(i, 2), y = s(r(c), 2), p = r(y);
112
- w(p);
113
- var _ = s(p, 2);
114
- R(_, {
115
- class: "input-group-btn",
116
- onclick: () => l(L, !e(L)),
117
- children: (h, S) => {
118
- k();
119
- var x = W();
120
- T(() => $(x, e(L) ? "Hide" : "Show")), f(h, x);
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, {
120
+ variant: "primary",
121
+ onclick: Ye,
122
+ children: (F, Ee) => {
123
+ B();
124
+ var xe = ce("Continue");
125
+ p(F, xe);
121
126
  },
122
127
  $$slots: { default: !0 }
123
- }), t(y), k(2), t(c), t(n), t(o), T(() => be(p, "type", e(L) ? "text" : "password")), m(b, () => e(N), (h) => l(N, h)), m(p, () => e(H), (h) => l(H, h)), f(a, o);
124
- }, Se = (a) => {
125
- var o = Je(), n = s(r(o), 2), i = s(r(n), 2), b = s(r(i), 2);
126
- w(b), t(i);
127
- var c = s(i, 2), y = s(r(c), 2);
128
- w(y), t(c);
129
- var p = s(c, 2), _ = r(p), h = s(r(_), 2);
130
- w(h), t(_);
131
- var S = s(_, 2), x = s(r(S), 2);
132
- w(x), t(S), t(p);
133
- var g = s(p, 2), pe = s(r(g), 2);
134
- Ue(pe), t(g);
135
- var ee = s(g, 2), se = s(r(ee), 2), j = r(se);
136
- w(j), j.value = j.__value = "bank_transfer", k(2), t(se);
137
- var we = s(se, 2), I = r(we);
138
- w(I), I.value = I.__value = "stripe", k(2), t(we), t(ee);
139
- var He = s(ee, 2);
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);
140
147
  {
141
- var Le = (v) => {
142
- var ae = Ve(), te = r(ae), ue = s(r(te), 2);
143
- w(ue), t(te);
144
- var me = s(te, 2), fe = s(r(me), 2);
145
- w(fe), k(2), t(me), k(2), t(ae), m(ue, () => e(Z), (re) => l(Z, re)), m(fe, () => e(D), (re) => l(D, re)), f(v, ae);
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));
208
+ {
209
+ var x = (c) => {
210
+ var Q = cs();
211
+ p(c, Q);
212
+ };
213
+ W(f, (c) => {
214
+ e(h) === "password" && c(x);
215
+ });
216
+ }
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));
221
+ {
222
+ var R = (c) => {
223
+ var Q = ps();
224
+ p(c, Q);
225
+ };
226
+ W(q, (c) => {
227
+ e(h) === "password" && c(R);
228
+ });
229
+ }
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);
146
239
  };
147
- A(He, (v) => {
148
- e(P) === "stripe" && v(Le);
240
+ W(K, (o) => {
241
+ e(u) === 1 ? o(ne) : e(u) === 2 ? o(J, 1) : o(ee, -1);
149
242
  });
150
243
  }
151
- t(n), t(o), m(b, () => e(K), (v) => l(K, v)), m(y, () => e(Y), (v) => l(Y, v)), m(h, () => e(q), (v) => l(q, v)), m(x, () => e(F), (v) => l(F, v)), m(pe, () => e(U), (v) => l(U, v)), ye(oe, [], j, () => e(P), (v) => l(P, v)), ye(oe, [], I, () => e(P), (v) => l(P, v)), f(a, o);
152
- }, Be = (a) => {
153
- var o = Oe(), n = s(r(o), 2), i = s(r(n), 2), b = s(r(i), 2);
154
- w(b), t(i);
155
- var c = s(i, 2), y = r(c), p = s(r(y), 2);
156
- w(p), t(y);
157
- var _ = s(y, 2), h = s(r(_), 2);
158
- w(h), t(_), t(c);
159
- var S = s(c, 2), x = s(r(S), 2);
160
- w(x), t(S), k(2), t(n), t(o), m(b, () => e(M), (g) => l(M, g)), m(p, () => e(V), (g) => l(V, g)), m(h, () => e(J), (g) => l(J, g)), m(x, () => e(O), (g) => l(O, g)), f(a, o);
161
- };
162
- A(de, (a) => {
163
- e(u) === 1 ? a(Pe) : e(u) === 2 ? a(Se, 1) : a(Be, -1);
164
- });
165
- }
166
- var ve = s(de, 2), ce = r(ve);
167
- {
168
- var Ae = (a) => {
169
- R(a, {
170
- onclick: xe,
171
- get disabled() {
172
- return e(B);
173
- },
174
- children: (o, n) => {
175
- k();
176
- var i = W("Back");
177
- f(o, i);
178
- },
179
- $$slots: { default: !0 }
180
- });
181
- }, Te = (a) => {
182
- var o = Qe();
183
- f(a, o);
184
- };
185
- A(ce, (a) => {
186
- e(u) > 1 ? a(Ae) : a(Te, -1);
187
- });
188
- }
189
- var $e = s(ce, 2);
190
- {
191
- var Ee = (a) => {
192
- R(a, {
193
- variant: "primary",
194
- onclick: _e,
195
- children: (o, n) => {
196
- k();
197
- var i = W("Continue");
198
- f(o, i);
199
- },
200
- $$slots: { default: !0 }
201
- });
202
- }, Ne = (a) => {
203
- R(a, {
204
- variant: "primary",
205
- type: "submit",
206
- get disabled() {
207
- return e(B);
208
- },
209
- children: (o, n) => {
210
- k();
211
- var i = W();
212
- T(() => $(i, e(B) ? "Finishing setup…" : "Finish setup")), f(o, i);
213
- },
214
- $$slots: { default: !0 }
215
- });
244
+ var se = r(K, 2), D = a(se);
245
+ {
246
+ var de = (o) => {
247
+ ve(o, {
248
+ onclick: $e,
249
+ get disabled() {
250
+ return e(G);
251
+ },
252
+ children: (l, n) => {
253
+ B();
254
+ var d = ce("Back");
255
+ p(l, d);
256
+ },
257
+ $$slots: { default: !0 }
258
+ });
259
+ }, _e = (o) => {
260
+ var l = ws();
261
+ p(o, l);
262
+ };
263
+ W(D, (o) => {
264
+ e(u) > 1 ? o(de) : o(_e, -1);
265
+ });
266
+ }
267
+ var F = r(D, 2);
268
+ {
269
+ var Ee = (o) => {
270
+ ve(o, {
271
+ variant: "primary",
272
+ onclick: je,
273
+ children: (l, n) => {
274
+ B();
275
+ var d = ce("Continue");
276
+ p(l, d);
277
+ },
278
+ $$slots: { default: !0 }
279
+ });
280
+ }, xe = (o) => {
281
+ ve(o, {
282
+ variant: "primary",
283
+ type: "submit",
284
+ get disabled() {
285
+ return e(G);
286
+ },
287
+ children: (l, n) => {
288
+ B();
289
+ var d = ce();
290
+ Z(() => Y(d, e(G) ? "Finishing setup…" : "Finish setup")), p(l, d);
291
+ },
292
+ $$slots: { default: !0 }
293
+ });
294
+ };
295
+ W(F, (o) => {
296
+ e(u) < Pe.length ? o(Ee) : o(xe, -1);
297
+ });
298
+ }
299
+ s(se), s(U), es("submit", U, Me), p(i, w);
216
300
  };
217
- A($e, (a) => {
218
- e(u) < le.length ? a(Ee) : a(Ne, -1);
301
+ W(Ke, (i) => {
302
+ e(Se) ? i(Fe, -1) : i(De);
219
303
  });
220
304
  }
221
- t(ve), t(X), t(ie), t(Q), Ye("submit", X, ze), f(E, Q), qe();
305
+ s(Te), s(ke), p(ae, ke), Xe();
222
306
  }
223
- customElements.define("hintergrund-setup", je(es, {}, [], []));
307
+ Ze(["click"]);
308
+ customElements.define("hintergrund-setup", Oe(ys, {}, [], []));
224
309
  export {
225
- es as default
310
+ ys as default
226
311
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hintergrund/ui",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "scripts": {
5
5
  "dev": "concurrently \"vite build --watch\" \"sirv dist --port 5188 --cors --dev\"",
6
6
  "build": "vite build",
@@ -29,7 +29,7 @@
29
29
  "svelte-check": "^4.3.2",
30
30
  "typescript": "^5.9.2",
31
31
  "vite": "^7.1.7",
32
- "@hintergrund/runtime-contracts": "^0.1.15",
32
+ "@hintergrund/runtime-contracts": "^0.2.2",
33
33
  "@hintergrund/sveltekit-static-preview": "workspace:*"
34
34
  },
35
35
  "keywords": [