@qaiddev/quests-embed 1.10.2 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,22 @@
1
- const W = "__qaidQuestsPrefetch";
2
- function N(t) {
3
- const e = window[W], i = e?.[t];
1
+ const Z = "__qaidQuestsPrefetch";
2
+ function T(t) {
3
+ const e = window[Z], i = e?.[t];
4
4
  return i ? (delete e[t], i.catch(() => fetch(t, { headers: { Accept: "application/json" } }))) : fetch(t, { headers: { Accept: "application/json" } });
5
5
  }
6
- const G = `*{box-sizing:border-box}button{cursor:pointer;font-family:inherit}:where(.qaid-q-root){--qaid-q-card-bg: light-dark(#ffffff, #1f2937);--qaid-q-card-fg: light-dark(#1f2937, #f9fafb);--qaid-q-card-border: light-dark(#e5e7eb, #374151);--qaid-q-card-radius: 1rem;--qaid-q-card-padding: 1.5rem;--qaid-q-card-shadow: 0 25px 50px -12px light-dark(rgba(0, 0, 0, .25), rgba(0, 0, 0, .6));--qaid-q-muted-fg: light-dark(#6b7280, #9ca3af);--qaid-q-progress-track: light-dark(#e5e7eb, #374151);--qaid-q-btn-radius: .5rem;--qaid-q-btn-padding-y: .625rem;--qaid-q-btn-padding-x: 1.125rem;--qaid-q-btn-font-weight: 500;--qaid-q-btn-primary-bg: var(--qaid-q-accent, #10b981);--qaid-q-btn-primary-fg: var(--qaid-q-accent-text, #ffffff);--qaid-q-btn-primary-border: transparent;--qaid-q-btn-secondary-bg: transparent;--qaid-q-btn-secondary-fg: light-dark(#374151, #d1d5db);--qaid-q-btn-secondary-border: light-dark(#d1d5db, #4b5563);--qaid-q-btn-secondary-hover-bg: light-dark(#f3f4f6, #374151);--qaid-q-option-bg: light-dark(#ffffff, #111827);--qaid-q-option-bg-selected: color-mix(in srgb, var(--qaid-q-accent, #10b981) 10%, transparent);--qaid-q-option-bg-hover: light-dark(#f9fafb, #1f2937);--qaid-q-option-fg: light-dark(#1f2937, #f9fafb);--qaid-q-option-border: light-dark(#e5e7eb, #374151);--qaid-q-option-border-selected: var(--qaid-q-accent, #10b981);--qaid-q-option-border-hover: light-dark(#9ca3af, #4b5563);--qaid-q-option-radius: .625rem;--qaid-q-option-padding: .75rem .875rem;--qaid-q-marker-bg: light-dark(#ffffff, #111827);--qaid-q-marker-bg-selected: var(--qaid-q-accent, #10b981);--qaid-q-marker-border: light-dark(#d1d5db, #4b5563);--qaid-q-marker-icon: light-dark(#ffffff, #1f2937);--qaid-q-marker-radius: 50%;--qaid-q-input-bg: light-dark(#ffffff, #111827);--qaid-q-input-fg: light-dark(#1f2937, #f9fafb);--qaid-q-input-border: light-dark(#d1d5db, #374151);--qaid-q-input-radius: .625rem;--qaid-q-input-padding: .75rem .875rem;--qaid-q-input-placeholder: light-dark(#9ca3af, #6b7280);--qaid-q-gap: .75rem;--qaid-q-section-gap: 1.25rem}:where(.qaid-q-root.qaid-q-theme-light){--qaid-q-card-bg: #ffffff;--qaid-q-card-fg: #1f2937;--qaid-q-card-border: #e5e7eb;--qaid-q-card-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);--qaid-q-muted-fg: #6b7280;--qaid-q-progress-track: #e5e7eb;--qaid-q-btn-secondary-fg: #374151;--qaid-q-btn-secondary-border: #d1d5db;--qaid-q-btn-secondary-hover-bg: #f3f4f6;--qaid-q-option-bg: #ffffff;--qaid-q-option-bg-hover: #f9fafb;--qaid-q-option-fg: #1f2937;--qaid-q-option-border: #e5e7eb;--qaid-q-option-border-hover: #9ca3af;--qaid-q-marker-bg: #ffffff;--qaid-q-marker-border: #d1d5db;--qaid-q-marker-icon: #ffffff;--qaid-q-input-bg: #ffffff;--qaid-q-input-fg: #1f2937;--qaid-q-input-border: #d1d5db;--qaid-q-input-placeholder: #9ca3af}:where(.qaid-q-root.qaid-q-theme-dark){--qaid-q-card-bg: #1f2937;--qaid-q-card-fg: #f9fafb;--qaid-q-card-border: #374151;--qaid-q-card-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6);--qaid-q-muted-fg: #9ca3af;--qaid-q-progress-track: #374151;--qaid-q-btn-secondary-fg: #d1d5db;--qaid-q-btn-secondary-border: #4b5563;--qaid-q-btn-secondary-hover-bg: #374151;--qaid-q-option-bg: #111827;--qaid-q-option-bg-hover: #1f2937;--qaid-q-option-fg: #f9fafb;--qaid-q-option-border: #374151;--qaid-q-option-border-hover: #4b5563;--qaid-q-marker-bg: #111827;--qaid-q-marker-border: #4b5563;--qaid-q-marker-icon: #1f2937;--qaid-q-input-bg: #111827;--qaid-q-input-fg: #f9fafb;--qaid-q-input-border: #374151;--qaid-q-input-placeholder: #6b7280}.qaid-q-root{color-scheme:light dark;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px);color:var(--qaid-q-card-fg)}.qaid-q-root.qaid-q-theme-light{color-scheme:light}.qaid-q-root.qaid-q-theme-dark{color-scheme:dark}.qaid-q-backdrop{position:fixed;inset:0;z-index:45;background:rgba(0,0,0,var(--qaid-backdrop-opacity, .4));animation:qaid-q-fade .18s ease-out}@keyframes qaid-q-fade{0%{opacity:0}to{opacity:1}}.qaid-q-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:50;width:var(--qaid-modal-width, 480px);max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);pointer-events:auto;display:flex;flex-direction:column}.qaid-q-card{background:var(--qaid-q-card-bg);color:var(--qaid-q-card-fg);border-radius:var(--qaid-q-card-radius);box-shadow:var(--qaid-q-card-shadow);padding:var(--qaid-q-card-padding);overflow:hidden;display:flex;flex-direction:column;min-height:0}:where(.qaid-q-root.qaid-q-inline) .qaid-q-card{box-shadow:none;border:1px solid var(--qaid-q-card-border);flex:1;min-height:0}:where(.qaid-q-root.qaid-q-inline){height:100%;display:flex;flex-direction:column;min-height:0}.qaid-q-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:1rem}.qaid-q-title{font-size:1.125em;font-weight:700;margin:0;color:var(--qaid-q-card-fg)}.qaid-q-step-counter{font-size:.875em;color:var(--qaid-q-muted-fg);font-variant-numeric:tabular-nums;white-space:nowrap}.qaid-q-close{width:28px;height:28px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--qaid-q-muted-fg);display:inline-flex;align-items:center;justify-content:center;-webkit-appearance:none;appearance:none}.qaid-q-close:hover{background:var(--qaid-q-btn-secondary-hover-bg);color:var(--qaid-q-card-fg)}.qaid-q-close:focus-visible{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 30%,transparent)}.qaid-q-progress{position:relative;height:4px;background:var(--qaid-q-progress-track);border-radius:9999px;overflow:hidden;margin-bottom:var(--qaid-q-section-gap)}.qaid-q-progress--inline{flex:1;min-width:60px;margin-bottom:0}.qaid-q-progress-fill{position:absolute;inset:0 auto 0 0;background:var(--qaid-q-accent, #10b981);border-radius:9999px;transition:width .3s ease;width:0%}.qaid-q-body{flex:1;min-height:0;overflow-y:auto;position:relative}.qaid-q-body[data-qaid-scroll=top]{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 2.5rem),transparent 100%);mask-image:linear-gradient(to bottom,#000 calc(100% - 2.5rem),transparent 100%)}.qaid-q-body[data-qaid-scroll=middle]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 2rem,#000 calc(100% - 2.5rem),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 2rem,#000 calc(100% - 2.5rem),transparent 100%)}.qaid-q-body[data-qaid-scroll=bottom]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 2rem);mask-image:linear-gradient(to bottom,transparent 0,#000 2rem)}.qaid-q-scroll-cue{position:sticky;bottom:0;left:0;display:flex;justify-content:center;align-items:flex-end;height:1.5rem;margin-top:-1.5rem;pointer-events:none;color:var(--qaid-q-muted-fg)}.qaid-q-scroll-cue[hidden]{display:none}.qaid-q-scroll-cue svg{width:1.125rem;height:1.125rem;animation:qaid-q-nudge 1.6s ease-in-out infinite}@keyframes qaid-q-nudge{0%,to{transform:translateY(-2px);opacity:.55}50%{transform:translateY(2px);opacity:1}}.qaid-q-card[data-qaid-fit=compact] .qaid-q-options--image-vertical{grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:.375rem}.qaid-q-card[data-qaid-fit=compact] .qaid-q-options--image-vertical .qaid-q-option{padding:.5rem;gap:.375rem}.qaid-q-card[data-qaid-fit=compact] .qaid-q-options--image-vertical .qaid-q-option-image{max-height:5.5rem;object-fit:contain}.qaid-q-card[data-qaid-fit=compact] .qaid-q-option-desc{font-size:.75em}.qaid-q-card[data-qaid-fit=compact] .qaid-q-step{gap:calc(var(--qaid-q-gap) * .6)}.qaid-q-card[data-qaid-fit=compact] .qaid-q-options--image-horizontal .qaid-q-option-image{width:36px;height:36px}.qaid-q-step{display:flex;flex-direction:column;gap:var(--qaid-q-gap);animation:qaid-q-slide .22s ease-out}@keyframes qaid-q-slide{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.qaid-q-no-motion .qaid-q-step,.qaid-q-no-motion.qaid-q-root{animation:none!important}.qaid-q-label{font-size:1.125em;font-weight:600;margin:0;color:var(--qaid-q-card-fg);line-height:1.35}.qaid-q-label .qaid-q-required{color:var(--qaid-q-error, #ef4444);margin-left:.25rem}.qaid-q-description{font-size:.875em;color:var(--qaid-q-muted-fg);margin:0;line-height:1.4}.qaid-q-error{font-size:.8125em;color:var(--qaid-q-error, #ef4444);margin:0}.qaid-q-error:empty{display:none}.qaid-q-input,.qaid-q-textarea{width:100%;padding:var(--qaid-q-input-padding);border:1px solid var(--qaid-q-input-border);border-radius:var(--qaid-q-input-radius);font-family:inherit;font-size:1em;background:var(--qaid-q-input-bg);color:var(--qaid-q-input-fg);transition:border-color .15s,box-shadow .15s;-webkit-appearance:none;appearance:none}.qaid-q-textarea{min-height:7rem;resize:vertical;font-family:inherit}.qaid-q-input:focus,.qaid-q-textarea:focus{outline:none;border-color:var(--qaid-q-focus, #6366f1);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 20%,transparent)}.qaid-q-input::placeholder,.qaid-q-textarea::placeholder{color:var(--qaid-q-input-placeholder)}.qaid-q-currency{position:relative}.qaid-q-currency-prefix{position:absolute;left:.875rem;top:50%;transform:translateY(-50%);color:var(--qaid-q-muted-fg);font-size:1em;font-weight:500;pointer-events:none}.qaid-q-currency .qaid-q-input{padding-left:2.25rem}.qaid-q-range-wrap{display:flex;flex-direction:column;gap:.5rem;padding:.5rem 0}.qaid-q-range-value{font-size:2em;font-weight:700;text-align:center;font-variant-numeric:tabular-nums;color:var(--qaid-q-accent, #10b981)}.qaid-q-range-value .qaid-q-range-unit{font-size:.5em;font-weight:500;color:var(--qaid-q-muted-fg);margin-left:.25rem}.qaid-q-range{width:100%;-webkit-appearance:none;appearance:none;height:6px;border-radius:9999px;background:var(--qaid-q-progress-track);outline:none}.qaid-q-range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:24px;height:24px;border-radius:50%;background:var(--qaid-q-accent, #10b981);border:3px solid var(--qaid-q-card-bg);box-shadow:0 2px 6px #0003;cursor:pointer;transition:transform .1s}.qaid-q-range::-moz-range-thumb{width:24px;height:24px;border-radius:50%;background:var(--qaid-q-accent, #10b981);border:3px solid var(--qaid-q-card-bg);box-shadow:0 2px 6px #0003;cursor:pointer}.qaid-q-range:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 30%,transparent)}.qaid-q-range:focus-visible::-moz-range-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 30%,transparent)}.qaid-q-range-bounds{display:flex;justify-content:space-between;font-size:.8125em;color:var(--qaid-q-muted-fg);font-variant-numeric:tabular-nums}.qaid-q-options{display:flex;flex-direction:column;gap:.5rem}.qaid-q-option{display:flex;align-items:flex-start;gap:.625rem;padding:var(--qaid-q-option-padding);border:1px solid var(--qaid-q-option-border);border-radius:var(--qaid-q-option-radius);background:var(--qaid-q-option-bg);text-align:left;font-size:1em;color:var(--qaid-q-option-fg);cursor:pointer;transition:border-color .12s,background .12s,box-shadow .12s;-webkit-appearance:none;appearance:none;width:100%}.qaid-q-option:hover{border-color:var(--qaid-q-option-border-hover);background:var(--qaid-q-option-bg-hover)}.qaid-q-option:focus-visible{outline:none;border-color:var(--qaid-q-focus, #6366f1);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 25%,transparent)}.qaid-q-option.qaid-q-selected{border-color:var(--qaid-q-option-border-selected);background:var(--qaid-q-option-bg-selected)}.qaid-q-option-marker{flex-shrink:0;width:1.25rem;height:1.25rem;border:2px solid var(--qaid-q-marker-border);border-radius:var(--qaid-q-marker-radius);display:inline-flex;align-items:center;justify-content:center;margin-top:.125rem;background:var(--qaid-q-marker-bg);transition:border-color .12s,background .12s}.qaid-q-option.qaid-q-multi .qaid-q-option-marker{border-radius:.25rem}.qaid-q-option.qaid-q-selected .qaid-q-option-marker{border-color:var(--qaid-q-marker-bg-selected);background:var(--qaid-q-marker-bg-selected)}.qaid-q-option.qaid-q-selected .qaid-q-option-marker:after{content:"";display:block;width:.5rem;height:.5rem;border-radius:50%;background:var(--qaid-q-marker-icon)}.qaid-q-option.qaid-q-multi.qaid-q-selected .qaid-q-option-marker:after{content:"";display:block;width:70%;height:70%;border-radius:0;background:var(--qaid-q-marker-icon);-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M5 12l4 4L19 7'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M5 12l4 4L19 7'/></svg>");-webkit-mask-size:contain;mask-size:contain;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;transform:none}.qaid-q-option-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.qaid-q-option-image{display:block;width:48px;height:48px;aspect-ratio:1 / 1;object-fit:cover;border-radius:.375rem;background:var(--qaid-q-progress-track);flex-shrink:0}.qaid-q-options--image-horizontal .qaid-q-option-body{flex-direction:row;align-items:center;gap:.75rem}.qaid-q-options--image-horizontal .qaid-q-option-body>:not(.qaid-q-option-image){flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.qaid-q-options--image-vertical{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.5rem}.qaid-q-options--image-vertical .qaid-q-option{flex-direction:column;align-items:stretch;text-align:center;padding:.75rem;gap:.5rem}.qaid-q-options--image-vertical .qaid-q-option-body{align-items:center;text-align:center}.qaid-q-options--image-vertical .qaid-q-option-image{width:100%;height:auto;max-width:100%}.qaid-q-options--image-vertical .qaid-q-option-marker{position:absolute;top:.5rem;right:.5rem;margin-top:0}.qaid-q-options--image-vertical .qaid-q-option{position:relative}.qaid-q-options--image-vertical .qaid-q-option-key{position:absolute;top:.5rem;left:.5rem;align-self:auto}.qaid-q-option-label{font-weight:500;line-height:1.3}.qaid-q-option-desc{font-size:.8125em;color:var(--qaid-q-muted-fg);line-height:1.4}.qaid-q-option-key{flex-shrink:0;align-self:center;font-size:.7em;font-weight:600;padding:.125rem .375rem;border-radius:.25rem;background:var(--qaid-q-progress-track);color:var(--qaid-q-muted-fg);font-variant-numeric:tabular-nums}.qaid-q-footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-top:var(--qaid-q-section-gap)}.qaid-q-footer--inline-progress{justify-content:flex-start;gap:.75rem}.qaid-q-footer-left,.qaid-q-footer-right{display:flex;gap:.5rem}.qaid-q-btn{padding:var(--qaid-q-btn-padding-y) var(--qaid-q-btn-padding-x);border-radius:var(--qaid-q-btn-radius);font-size:var(--qaid-q-btn-font-size, .9375em);font-weight:var(--qaid-q-btn-font-weight);border:1px solid transparent;cursor:pointer;transition:filter .15s,background .15s,color .15s;-webkit-appearance:none;appearance:none}.qaid-q-btn:focus-visible{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 30%,transparent)}.qaid-q-btn-secondary{background:var(--qaid-q-btn-secondary-bg);border-color:var(--qaid-q-btn-secondary-border);color:var(--qaid-q-btn-secondary-fg)}.qaid-q-btn-secondary:hover{background:var(--qaid-q-btn-secondary-hover-bg)}.qaid-q-btn-primary{background:var(--qaid-q-btn-primary-bg);color:var(--qaid-q-btn-primary-fg);border-color:var(--qaid-q-btn-primary-border)}.qaid-q-btn-primary:hover{filter:brightness(.9)}.qaid-q-btn-primary:disabled{opacity:.5;cursor:not-allowed;filter:none}.qaid-q-done{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:.5rem;padding:1.5rem 0;flex:1;min-height:0}.qaid-q-done-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--qaid-q-accent, #10b981) 18%,transparent);color:var(--qaid-q-accent, #10b981);display:inline-flex;align-items:center;justify-content:center;margin-bottom:.5rem}.qaid-q-done-title{font-size:1.25em;font-weight:700;margin:0}.qaid-q-done-message{color:var(--qaid-q-muted-fg);margin:0}.qaid-q-submit-error{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:.5rem;padding:1.5rem 0;flex:1;min-height:0}.qaid-q-submit-error-title{font-size:1.25em;font-weight:700;margin:0}.qaid-q-submit-error-message{color:var(--qaid-q-muted-fg);margin:0}.qaid-q-submit-error-actions{display:flex;justify-content:center;gap:.5rem;margin-top:1rem}.qaid-q-saving{display:inline-flex;align-items:center;gap:.375rem;font-size:.75em;color:var(--qaid-q-muted-fg);opacity:0;transition:opacity .2s}.qaid-q-saving.qaid-q-visible{opacity:1}.qaid-q-saving-dot{width:6px;height:6px;border-radius:50%;background:var(--qaid-q-accent, #10b981);animation:qaid-q-pulse 1.2s ease-in-out infinite}@keyframes qaid-q-pulse{0%,to{opacity:.3}50%{opacity:1}}:where(.qaid-q-root.qaid-q-unstyled) :where(.qaid-q-card,.qaid-q-header,.qaid-q-title,.qaid-q-description,.qaid-q-step,.qaid-q-label,.qaid-q-options,.qaid-q-option,.qaid-q-option-marker,.qaid-q-option-body,.qaid-q-option-label,.qaid-q-option-desc,.qaid-q-input,.qaid-q-textarea,.qaid-q-currency,.qaid-q-currency-prefix,.qaid-q-range,.qaid-q-range-wrap,.qaid-q-range-value,.qaid-q-btn,.qaid-q-footer,.qaid-q-progress,.qaid-q-progress-fill,.qaid-q-step-counter,.qaid-q-error,.qaid-q-saving,.qaid-q-done,.qaid-q-done-icon,.qaid-q-done-title,.qaid-q-done-message,.qaid-q-submit-error,.qaid-q-submit-error-title,.qaid-q-submit-error-message,.qaid-q-submit-error-actions){all:unset;display:revert;box-sizing:border-box}.qaid-q-input:focus-visible,.qaid-q-textarea:focus-visible,.qaid-q-option:focus-visible,.qaid-q-btn:focus-visible,.qaid-q-close:focus-visible,.qaid-q-range:focus-visible{outline:2px solid transparent;outline-offset:2px}@media(prefers-reduced-motion:reduce){.qaid-q-root *,.qaid-q-root *:before,.qaid-q-root *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}.qaid-q-range::-webkit-slider-thumb{transition:none!important}.qaid-q-range::-moz-range-thumb{transition:none!important}}@media(forced-colors:active){.qaid-q-input:focus-visible,.qaid-q-textarea:focus-visible,.qaid-q-option:focus-visible,.qaid-q-btn:focus-visible,.qaid-q-close:focus-visible,.qaid-q-range:focus-visible{outline:2px solid Highlight;outline-offset:2px}.qaid-q-card{border:1px solid CanvasText}.qaid-q-input,.qaid-q-textarea,.qaid-q-option{border-color:CanvasText}.qaid-q-option.qaid-q-selected{border-color:Highlight}.qaid-q-option.qaid-q-selected .qaid-q-option-marker{forced-color-adjust:none;background:Highlight;border-color:Highlight}.qaid-q-option.qaid-q-selected .qaid-q-option-marker:after{background:HighlightText}.qaid-q-progress{forced-color-adjust:none;background:Canvas;border:1px solid CanvasText}.qaid-q-progress-fill{forced-color-adjust:none;background:Highlight}}`, X = "", Z = ":where(.qaid-q-root){--qaid-q-card-radius: 0;--qaid-q-card-shadow: none;--qaid-q-btn-radius: 0;--qaid-q-option-radius: 0;--qaid-q-option-bg-selected: transparent;--qaid-q-input-radius: 0}", ee = ":where(.qaid-q-root){--qaid-q-card-radius: 1.5rem;--qaid-q-btn-radius: 9999px;--qaid-q-btn-padding-x: 1.5rem;--qaid-q-option-radius: 9999px;--qaid-q-option-padding: .75rem 1.125rem;--qaid-q-input-radius: 9999px;--qaid-q-input-padding: .75rem 1.125rem}", te = ":where(.qaid-q-root){--qaid-q-card-padding: 1rem;--qaid-q-btn-padding-y: .5rem;--qaid-q-btn-padding-x: .875rem;--qaid-q-option-padding: .5rem .625rem;--qaid-q-input-padding: .5rem .625rem;--qaid-q-gap: .5rem;--qaid-q-section-gap: .875rem}", ie = {
7
- default: X,
8
- minimal: Z,
9
- pill: ee,
10
- dense: te
6
+ const ee = `*{box-sizing:border-box}button{cursor:pointer;font-family:inherit}:where(.qaid-q-root){--qaid-q-card-bg: light-dark(#ffffff, #1f2937);--qaid-q-card-fg: light-dark(#1f2937, #f9fafb);--qaid-q-card-border: light-dark(#e5e7eb, #374151);--qaid-q-card-radius: 1rem;--qaid-q-card-padding: 1.5rem;--qaid-q-card-shadow: 0 25px 50px -12px light-dark(rgba(0, 0, 0, .25), rgba(0, 0, 0, .6));--qaid-q-muted-fg: light-dark(#6b7280, #9ca3af);--qaid-q-progress-track: light-dark(#e5e7eb, #374151);--qaid-q-btn-radius: .5rem;--qaid-q-btn-padding-y: .625rem;--qaid-q-btn-padding-x: 1.125rem;--qaid-q-btn-font-weight: 500;--qaid-q-btn-primary-bg: var(--qaid-q-accent, #10b981);--qaid-q-btn-primary-fg: var(--qaid-q-accent-text, #ffffff);--qaid-q-btn-primary-border: transparent;--qaid-q-btn-secondary-bg: transparent;--qaid-q-btn-secondary-fg: light-dark(#374151, #d1d5db);--qaid-q-btn-secondary-border: light-dark(#d1d5db, #4b5563);--qaid-q-btn-secondary-hover-bg: light-dark(#f3f4f6, #374151);--qaid-q-option-bg: light-dark(#ffffff, #111827);--qaid-q-option-bg-selected: color-mix(in srgb, var(--qaid-q-accent, #10b981) 10%, transparent);--qaid-q-option-bg-hover: light-dark(#f9fafb, #1f2937);--qaid-q-option-fg: light-dark(#1f2937, #f9fafb);--qaid-q-option-border: light-dark(#e5e7eb, #374151);--qaid-q-option-border-selected: var(--qaid-q-accent, #10b981);--qaid-q-option-border-hover: light-dark(#9ca3af, #4b5563);--qaid-q-option-radius: .625rem;--qaid-q-option-padding: .75rem .875rem;--qaid-q-marker-bg: light-dark(#ffffff, #111827);--qaid-q-marker-bg-selected: var(--qaid-q-accent, #10b981);--qaid-q-marker-border: light-dark(#d1d5db, #4b5563);--qaid-q-marker-icon: light-dark(#ffffff, #1f2937);--qaid-q-marker-radius: 50%;--qaid-q-input-bg: light-dark(#ffffff, #111827);--qaid-q-input-fg: light-dark(#1f2937, #f9fafb);--qaid-q-input-border: light-dark(#d1d5db, #374151);--qaid-q-input-radius: .625rem;--qaid-q-input-padding: .75rem .875rem;--qaid-q-input-placeholder: light-dark(#9ca3af, #6b7280);--qaid-q-gap: .75rem;--qaid-q-section-gap: 1.25rem}:where(.qaid-q-root.qaid-q-theme-light){--qaid-q-card-bg: #ffffff;--qaid-q-card-fg: #1f2937;--qaid-q-card-border: #e5e7eb;--qaid-q-card-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);--qaid-q-muted-fg: #6b7280;--qaid-q-progress-track: #e5e7eb;--qaid-q-btn-secondary-fg: #374151;--qaid-q-btn-secondary-border: #d1d5db;--qaid-q-btn-secondary-hover-bg: #f3f4f6;--qaid-q-option-bg: #ffffff;--qaid-q-option-bg-hover: #f9fafb;--qaid-q-option-fg: #1f2937;--qaid-q-option-border: #e5e7eb;--qaid-q-option-border-hover: #9ca3af;--qaid-q-marker-bg: #ffffff;--qaid-q-marker-border: #d1d5db;--qaid-q-marker-icon: #ffffff;--qaid-q-input-bg: #ffffff;--qaid-q-input-fg: #1f2937;--qaid-q-input-border: #d1d5db;--qaid-q-input-placeholder: #9ca3af}:where(.qaid-q-root.qaid-q-theme-dark){--qaid-q-card-bg: #1f2937;--qaid-q-card-fg: #f9fafb;--qaid-q-card-border: #374151;--qaid-q-card-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6);--qaid-q-muted-fg: #9ca3af;--qaid-q-progress-track: #374151;--qaid-q-btn-secondary-fg: #d1d5db;--qaid-q-btn-secondary-border: #4b5563;--qaid-q-btn-secondary-hover-bg: #374151;--qaid-q-option-bg: #111827;--qaid-q-option-bg-hover: #1f2937;--qaid-q-option-fg: #f9fafb;--qaid-q-option-border: #374151;--qaid-q-option-border-hover: #4b5563;--qaid-q-marker-bg: #111827;--qaid-q-marker-border: #4b5563;--qaid-q-marker-icon: #1f2937;--qaid-q-input-bg: #111827;--qaid-q-input-fg: #f9fafb;--qaid-q-input-border: #374151;--qaid-q-input-placeholder: #6b7280}.qaid-q-root{color-scheme:light dark;font-family:var(--qaid-font-family, system-ui, -apple-system, sans-serif);font-size:var(--qaid-font-size, 16px);color:var(--qaid-q-card-fg)}.qaid-q-root.qaid-q-theme-light{color-scheme:light}.qaid-q-root.qaid-q-theme-dark{color-scheme:dark}.qaid-q-backdrop{position:fixed;inset:0;z-index:45;background:rgba(0,0,0,var(--qaid-backdrop-opacity, .4));animation:qaid-q-fade .18s ease-out}@keyframes qaid-q-fade{0%{opacity:0}to{opacity:1}}.qaid-q-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:50;width:var(--qaid-modal-width, 480px);max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);pointer-events:auto;display:flex;flex-direction:column}.qaid-q-card{background:var(--qaid-q-card-bg);color:var(--qaid-q-card-fg);border-radius:var(--qaid-q-card-radius);box-shadow:var(--qaid-q-card-shadow);padding:var(--qaid-q-card-padding);overflow:hidden;display:flex;flex-direction:column;min-height:0}:where(.qaid-q-root.qaid-q-inline) .qaid-q-card{box-shadow:none;border:1px solid var(--qaid-q-card-border);flex:1;min-height:0}:where(.qaid-q-root.qaid-q-inline){height:100%;display:flex;flex-direction:column;min-height:0}.qaid-q-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:1rem}.qaid-q-title{font-size:1.125em;font-weight:700;margin:0;color:var(--qaid-q-card-fg)}.qaid-q-step-counter{font-size:.875em;color:var(--qaid-q-muted-fg);font-variant-numeric:tabular-nums;white-space:nowrap}.qaid-q-close{width:28px;height:28px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--qaid-q-muted-fg);display:inline-flex;align-items:center;justify-content:center;-webkit-appearance:none;appearance:none}.qaid-q-close:hover{background:var(--qaid-q-btn-secondary-hover-bg);color:var(--qaid-q-card-fg)}.qaid-q-close:focus-visible{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 30%,transparent)}.qaid-q-progress{position:relative;height:4px;background:var(--qaid-q-progress-track);border-radius:9999px;overflow:hidden;margin-bottom:var(--qaid-q-section-gap)}.qaid-q-progress--inline{flex:1;min-width:60px;margin-bottom:0}.qaid-q-progress-fill{position:absolute;inset:0 auto 0 0;background:var(--qaid-q-accent, #10b981);border-radius:9999px;transition:width .3s ease;width:0%}.qaid-q-body{flex:1;min-height:0;overflow-y:auto;position:relative}.qaid-q-body[data-qaid-scroll=top]{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 2.5rem),transparent 100%);mask-image:linear-gradient(to bottom,#000 calc(100% - 2.5rem),transparent 100%)}.qaid-q-body[data-qaid-scroll=middle]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 2rem,#000 calc(100% - 2.5rem),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 2rem,#000 calc(100% - 2.5rem),transparent 100%)}.qaid-q-body[data-qaid-scroll=bottom]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 2rem);mask-image:linear-gradient(to bottom,transparent 0,#000 2rem)}.qaid-q-scroll-cue{position:sticky;bottom:0;left:0;display:flex;justify-content:center;align-items:flex-end;height:1.5rem;margin-top:-1.5rem;pointer-events:none;color:var(--qaid-q-muted-fg)}.qaid-q-scroll-cue[hidden]{display:none}.qaid-q-scroll-cue svg{width:1.125rem;height:1.125rem;animation:qaid-q-nudge 1.6s ease-in-out infinite}@keyframes qaid-q-nudge{0%,to{transform:translateY(-2px);opacity:.55}50%{transform:translateY(2px);opacity:1}}.qaid-q-card[data-qaid-fit=compact] .qaid-q-options--image-vertical{grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:.375rem}.qaid-q-card[data-qaid-fit=compact] .qaid-q-options--image-vertical .qaid-q-option{padding:.5rem;gap:.375rem}.qaid-q-card[data-qaid-fit=compact] .qaid-q-options--image-vertical .qaid-q-option-image{max-height:5.5rem;object-fit:contain}.qaid-q-card[data-qaid-fit=compact] .qaid-q-option-desc{font-size:.75em}.qaid-q-card[data-qaid-fit=compact] .qaid-q-step{gap:calc(var(--qaid-q-gap) * .6)}.qaid-q-card[data-qaid-fit=compact] .qaid-q-options--image-horizontal .qaid-q-option-image{width:36px;height:36px}.qaid-q-step{display:flex;flex-direction:column;gap:var(--qaid-q-gap);animation:qaid-q-slide .22s ease-out}@keyframes qaid-q-slide{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.qaid-q-no-motion .qaid-q-step,.qaid-q-no-motion.qaid-q-root{animation:none!important}.qaid-q-label{font-size:1.125em;font-weight:600;margin:0;color:var(--qaid-q-card-fg);line-height:1.35}.qaid-q-label .qaid-q-required{color:var(--qaid-q-error, #ef4444);margin-left:.25rem}.qaid-q-description{font-size:.875em;color:var(--qaid-q-muted-fg);margin:0;line-height:1.4}.qaid-q-error{font-size:.8125em;color:var(--qaid-q-error, #ef4444);margin:0}.qaid-q-error:empty{display:none}.qaid-q-input,.qaid-q-textarea{width:100%;padding:var(--qaid-q-input-padding);border:1px solid var(--qaid-q-input-border);border-radius:var(--qaid-q-input-radius);font-family:inherit;font-size:1em;background:var(--qaid-q-input-bg);color:var(--qaid-q-input-fg);transition:border-color .15s,box-shadow .15s;-webkit-appearance:none;appearance:none}.qaid-q-textarea{min-height:7rem;resize:vertical;font-family:inherit}.qaid-q-input:focus,.qaid-q-textarea:focus{outline:none;border-color:var(--qaid-q-focus, #6366f1);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 20%,transparent)}.qaid-q-input::placeholder,.qaid-q-textarea::placeholder{color:var(--qaid-q-input-placeholder)}.qaid-q-currency{position:relative}.qaid-q-currency-prefix{position:absolute;left:.875rem;top:50%;transform:translateY(-50%);color:var(--qaid-q-muted-fg);font-size:1em;font-weight:500;pointer-events:none}.qaid-q-currency .qaid-q-input{padding-left:2.25rem}.qaid-q-range-wrap{display:flex;flex-direction:column;gap:.5rem;padding:.5rem 0}.qaid-q-range-value{font-size:2em;font-weight:700;text-align:center;font-variant-numeric:tabular-nums;color:var(--qaid-q-accent, #10b981)}.qaid-q-range-value .qaid-q-range-unit{font-size:.5em;font-weight:500;color:var(--qaid-q-muted-fg);margin-left:.25rem}.qaid-q-range{width:100%;-webkit-appearance:none;appearance:none;height:6px;border-radius:9999px;background:var(--qaid-q-progress-track);outline:none}.qaid-q-range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:24px;height:24px;border-radius:50%;background:var(--qaid-q-accent, #10b981);border:3px solid var(--qaid-q-card-bg);box-shadow:0 2px 6px #0003;cursor:pointer;transition:transform .1s}.qaid-q-range::-moz-range-thumb{width:24px;height:24px;border-radius:50%;background:var(--qaid-q-accent, #10b981);border:3px solid var(--qaid-q-card-bg);box-shadow:0 2px 6px #0003;cursor:pointer}.qaid-q-range:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 30%,transparent)}.qaid-q-range:focus-visible::-moz-range-thumb{box-shadow:0 0 0 6px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 30%,transparent)}.qaid-q-range-bounds{display:flex;justify-content:space-between;font-size:.8125em;color:var(--qaid-q-muted-fg);font-variant-numeric:tabular-nums}.qaid-q-options{display:flex;flex-direction:column;gap:.5rem}.qaid-q-option{display:flex;align-items:flex-start;gap:.625rem;padding:var(--qaid-q-option-padding);border:1px solid var(--qaid-q-option-border);border-radius:var(--qaid-q-option-radius);background:var(--qaid-q-option-bg);text-align:left;font-size:1em;color:var(--qaid-q-option-fg);cursor:pointer;transition:border-color .12s,background .12s,box-shadow .12s;-webkit-appearance:none;appearance:none;width:100%}.qaid-q-option:hover{border-color:var(--qaid-q-option-border-hover);background:var(--qaid-q-option-bg-hover)}.qaid-q-option:focus-visible{outline:none;border-color:var(--qaid-q-focus, #6366f1);box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 25%,transparent)}.qaid-q-option.qaid-q-selected{border-color:var(--qaid-q-option-border-selected);background:var(--qaid-q-option-bg-selected)}.qaid-q-option-marker{flex-shrink:0;width:1.25rem;height:1.25rem;border:2px solid var(--qaid-q-marker-border);border-radius:var(--qaid-q-marker-radius);display:inline-flex;align-items:center;justify-content:center;margin-top:.125rem;background:var(--qaid-q-marker-bg);transition:border-color .12s,background .12s}.qaid-q-option.qaid-q-multi .qaid-q-option-marker{border-radius:.25rem}.qaid-q-option.qaid-q-selected .qaid-q-option-marker{border-color:var(--qaid-q-marker-bg-selected);background:var(--qaid-q-marker-bg-selected)}.qaid-q-option.qaid-q-selected .qaid-q-option-marker:after{content:"";display:block;width:.5rem;height:.5rem;border-radius:50%;background:var(--qaid-q-marker-icon)}.qaid-q-option.qaid-q-multi.qaid-q-selected .qaid-q-option-marker:after{content:"";display:block;width:70%;height:70%;border-radius:0;background:var(--qaid-q-marker-icon);-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M5 12l4 4L19 7'/></svg>");mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M5 12l4 4L19 7'/></svg>");-webkit-mask-size:contain;mask-size:contain;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;transform:none}.qaid-q-option-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.qaid-q-option-image{display:block;width:48px;height:48px;aspect-ratio:1 / 1;object-fit:cover;border-radius:.375rem;background:var(--qaid-q-progress-track);flex-shrink:0}.qaid-q-options--image-horizontal .qaid-q-option-body{flex-direction:row;align-items:center;gap:.75rem}.qaid-q-options--image-horizontal .qaid-q-option-body>:not(.qaid-q-option-image){flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.qaid-q-options--image-vertical{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.5rem}.qaid-q-options--image-vertical .qaid-q-option{flex-direction:column;align-items:stretch;text-align:center;padding:.75rem;gap:.5rem}.qaid-q-options--image-vertical .qaid-q-option-body{align-items:center;text-align:center}.qaid-q-options--image-vertical .qaid-q-option-image{width:100%;height:auto;max-width:100%}.qaid-q-options--image-vertical .qaid-q-option-marker{position:absolute;top:.5rem;right:.5rem;margin-top:0}.qaid-q-options--image-vertical .qaid-q-option{position:relative}.qaid-q-options--image-vertical .qaid-q-option-key{position:absolute;top:.5rem;left:.5rem;align-self:auto}.qaid-q-option-label{font-weight:500;line-height:1.3}.qaid-q-option-desc{font-size:.8125em;color:var(--qaid-q-muted-fg);line-height:1.4}.qaid-q-option-key{flex-shrink:0;align-self:center;font-size:.7em;font-weight:600;padding:.125rem .375rem;border-radius:.25rem;background:var(--qaid-q-progress-track);color:var(--qaid-q-muted-fg);font-variant-numeric:tabular-nums}.qaid-q-footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-top:var(--qaid-q-section-gap)}.qaid-q-footer--inline-progress{justify-content:flex-start;gap:.75rem}.qaid-q-footer-left,.qaid-q-footer-right{display:flex;gap:.5rem}.qaid-q-btn{padding:var(--qaid-q-btn-padding-y) var(--qaid-q-btn-padding-x);border-radius:var(--qaid-q-btn-radius);font-size:var(--qaid-q-btn-font-size, .9375em);font-weight:var(--qaid-q-btn-font-weight);border:1px solid transparent;cursor:pointer;transition:filter .15s,background .15s,color .15s;-webkit-appearance:none;appearance:none}.qaid-q-btn:focus-visible{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--qaid-q-focus, #6366f1) 30%,transparent)}.qaid-q-btn-secondary{background:var(--qaid-q-btn-secondary-bg);border-color:var(--qaid-q-btn-secondary-border);color:var(--qaid-q-btn-secondary-fg)}.qaid-q-btn-secondary:hover{background:var(--qaid-q-btn-secondary-hover-bg)}.qaid-q-btn-primary{background:var(--qaid-q-btn-primary-bg);color:var(--qaid-q-btn-primary-fg);border-color:var(--qaid-q-btn-primary-border)}.qaid-q-btn-primary:hover{filter:brightness(.9)}.qaid-q-btn-primary:disabled{opacity:.5;cursor:not-allowed;filter:none}.qaid-q-done{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:.5rem;padding:1.5rem 0;flex:1;min-height:0}.qaid-q-done-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--qaid-q-accent, #10b981) 18%,transparent);color:var(--qaid-q-accent, #10b981);display:inline-flex;align-items:center;justify-content:center;margin-bottom:.5rem}.qaid-q-done-title{font-size:1.25em;font-weight:700;margin:0}.qaid-q-done-message{color:var(--qaid-q-muted-fg);margin:0}.qaid-q-submit-error{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:.5rem;padding:1.5rem 0;flex:1;min-height:0}.qaid-q-submit-error-title{font-size:1.25em;font-weight:700;margin:0}.qaid-q-submit-error-message{color:var(--qaid-q-muted-fg);margin:0}.qaid-q-submit-error-actions{display:flex;justify-content:center;gap:.5rem;margin-top:1rem}.qaid-q-saving{display:inline-flex;align-items:center;gap:.375rem;font-size:.75em;color:var(--qaid-q-muted-fg);opacity:0;transition:opacity .2s}.qaid-q-saving.qaid-q-visible{opacity:1}.qaid-q-saving-dot{width:6px;height:6px;border-radius:50%;background:var(--qaid-q-accent, #10b981);animation:qaid-q-pulse 1.2s ease-in-out infinite}@keyframes qaid-q-pulse{0%,to{opacity:.3}50%{opacity:1}}:where(.qaid-q-root.qaid-q-unstyled) :where(.qaid-q-card,.qaid-q-header,.qaid-q-title,.qaid-q-description,.qaid-q-step,.qaid-q-label,.qaid-q-options,.qaid-q-option,.qaid-q-option-marker,.qaid-q-option-body,.qaid-q-option-label,.qaid-q-option-desc,.qaid-q-input,.qaid-q-textarea,.qaid-q-currency,.qaid-q-currency-prefix,.qaid-q-range,.qaid-q-range-wrap,.qaid-q-range-value,.qaid-q-btn,.qaid-q-footer,.qaid-q-progress,.qaid-q-progress-fill,.qaid-q-step-counter,.qaid-q-error,.qaid-q-saving,.qaid-q-done,.qaid-q-done-icon,.qaid-q-done-title,.qaid-q-done-message,.qaid-q-submit-error,.qaid-q-submit-error-title,.qaid-q-submit-error-message,.qaid-q-submit-error-actions){all:unset;display:revert;box-sizing:border-box}.qaid-q-input:focus-visible,.qaid-q-textarea:focus-visible,.qaid-q-option:focus-visible,.qaid-q-btn:focus-visible,.qaid-q-close:focus-visible,.qaid-q-range:focus-visible{outline:2px solid transparent;outline-offset:2px}@media(prefers-reduced-motion:reduce){.qaid-q-root *,.qaid-q-root *:before,.qaid-q-root *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}.qaid-q-range::-webkit-slider-thumb{transition:none!important}.qaid-q-range::-moz-range-thumb{transition:none!important}}@media(forced-colors:active){.qaid-q-input:focus-visible,.qaid-q-textarea:focus-visible,.qaid-q-option:focus-visible,.qaid-q-btn:focus-visible,.qaid-q-close:focus-visible,.qaid-q-range:focus-visible{outline:2px solid Highlight;outline-offset:2px}.qaid-q-card{border:1px solid CanvasText}.qaid-q-input,.qaid-q-textarea,.qaid-q-option{border-color:CanvasText}.qaid-q-option.qaid-q-selected{border-color:Highlight}.qaid-q-option.qaid-q-selected .qaid-q-option-marker{forced-color-adjust:none;background:Highlight;border-color:Highlight}.qaid-q-option.qaid-q-selected .qaid-q-option-marker:after{background:HighlightText}.qaid-q-progress{forced-color-adjust:none;background:Canvas;border:1px solid CanvasText}.qaid-q-progress-fill{forced-color-adjust:none;background:Highlight}}`, te = "", ie = ":where(.qaid-q-root){--qaid-q-card-radius: 0;--qaid-q-card-shadow: none;--qaid-q-btn-radius: 0;--qaid-q-option-radius: 0;--qaid-q-option-bg-selected: transparent;--qaid-q-input-radius: 0}", ae = ":where(.qaid-q-root){--qaid-q-card-radius: 1.5rem;--qaid-q-btn-radius: 9999px;--qaid-q-btn-padding-x: 1.5rem;--qaid-q-option-radius: 9999px;--qaid-q-option-padding: .75rem 1.125rem;--qaid-q-input-radius: 9999px;--qaid-q-input-padding: .75rem 1.125rem}", ne = ":where(.qaid-q-root){--qaid-q-card-padding: 1rem;--qaid-q-btn-padding-y: .5rem;--qaid-q-btn-padding-x: .875rem;--qaid-q-option-padding: .5rem .625rem;--qaid-q-input-padding: .5rem .625rem;--qaid-q-gap: .5rem;--qaid-q-section-gap: .875rem}", re = {
7
+ default: te,
8
+ minimal: ie,
9
+ pill: ae,
10
+ dense: ne
11
11
  };
12
- function ae(t) {
13
- return ie[t] ?? "";
12
+ function se(t) {
13
+ return re[t] ?? "";
14
14
  }
15
- function ne(t, e, i) {
15
+ function oe(t, e, i) {
16
16
  const [a, n, r] = [t, e, i].map((s) => (s = s / 255, s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4)));
17
17
  return 0.2126 * a + 0.7152 * n + 0.0722 * r;
18
18
  }
19
- function re(t) {
19
+ function de(t) {
20
20
  if (t.startsWith("#")) {
21
21
  const i = t.slice(1), a = i.length === 3 ? i.split("").map((r) => r + r).join("") : i, n = parseInt(a, 16);
22
22
  return { r: n >> 16 & 255, g: n >> 8 & 255, b: n & 255 };
@@ -24,23 +24,23 @@ function re(t) {
24
24
  const e = t.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
25
25
  return e ? { r: parseInt(e[1]), g: parseInt(e[2]), b: parseInt(e[3]) } : null;
26
26
  }
27
- function T(t) {
28
- const e = re(t);
29
- return e && ne(e.r, e.g, e.b) > 0.4 ? "black" : "white";
27
+ function L(t) {
28
+ const e = de(t);
29
+ return e && oe(e.r, e.g, e.b) > 0.4 ? "black" : "white";
30
30
  }
31
- function se(t = {}) {
31
+ function le(t = {}) {
32
32
  const e = {};
33
- return t.accentColor !== void 0 && (e["--qaid-q-accent"] = t.accentColor, e["--qaid-q-accent-text"] = T(t.accentColor)), t.errorColor !== void 0 && (e["--qaid-q-error"] = t.errorColor), t.focusColor !== void 0 && (e["--qaid-q-focus"] = t.focusColor, e["--qaid-q-focus-text"] = T(t.focusColor)), t.modalWidth !== void 0 && (e["--qaid-modal-width"] = `${t.modalWidth}px`), t.backdropOpacity !== void 0 && (e["--qaid-backdrop-opacity"] = String(t.backdropOpacity)), t.fontFamily !== void 0 && (e["--qaid-font-family"] = t.fontFamily), t.fontSize !== void 0 && (e["--qaid-font-size"] = `${t.fontSize}px`), e;
33
+ return t.accentColor !== void 0 && (e["--qaid-q-accent"] = t.accentColor, e["--qaid-q-accent-text"] = L(t.accentColor)), t.errorColor !== void 0 && (e["--qaid-q-error"] = t.errorColor), t.focusColor !== void 0 && (e["--qaid-q-focus"] = t.focusColor, e["--qaid-q-focus-text"] = L(t.focusColor)), t.modalWidth !== void 0 && (e["--qaid-modal-width"] = `${t.modalWidth}px`), t.backdropOpacity !== void 0 && (e["--qaid-backdrop-opacity"] = String(t.backdropOpacity)), t.fontFamily !== void 0 && (e["--qaid-font-family"] = t.fontFamily), t.fontSize !== void 0 && (e["--qaid-font-size"] = `${t.fontSize}px`), e;
34
34
  }
35
- function oe(t, e) {
35
+ function ce(t, e) {
36
36
  for (const [i, a] of Object.entries(e))
37
37
  t.style.setProperty(i, a);
38
38
  }
39
- function de() {
40
- return G;
39
+ function ue() {
40
+ return ee;
41
41
  }
42
- function le(t) {
43
- return ae(t);
42
+ function he(t) {
43
+ return se(t);
44
44
  }
45
45
  function v(t) {
46
46
  let e = null;
@@ -58,21 +58,21 @@ function v(t) {
58
58
  }
59
59
  };
60
60
  }
61
- function ce(t) {
61
+ function pe(t) {
62
62
  switch (t.question.type) {
63
63
  case "text":
64
- return ue(t.question, t);
64
+ return qe(t.question, t);
65
65
  case "currency":
66
- return pe(t.question, t);
66
+ return fe(t.question, t);
67
67
  case "range":
68
- return me(t.question, t);
68
+ return be(t.question, t);
69
69
  case "date":
70
- return fe(t.question, t);
70
+ return ve(t.question, t);
71
71
  case "multiple-choice":
72
- return ge(t.question, t);
72
+ return ye(t.question, t);
73
73
  }
74
74
  }
75
- function ue(t, e) {
75
+ function qe(t, e) {
76
76
  const i = typeof e.initialValue == "string" ? e.initialValue : "";
77
77
  let a;
78
78
  if (t.multiline) {
@@ -80,7 +80,7 @@ function ue(t, e) {
80
80
  n.className = "qaid-q-textarea", n.value = i, t.placeholder && (n.placeholder = t.placeholder), t.maxLength && (n.maxLength = t.maxLength), a = n;
81
81
  } else {
82
82
  const n = document.createElement("input");
83
- n.className = "qaid-q-input", n.type = t.inputType ?? "text", n.value = i, t.placeholder && (n.placeholder = t.placeholder), t.maxLength && (n.maxLength = t.maxLength), n.setAttribute("autocomplete", he(t.inputType)), a = n;
83
+ n.className = "qaid-q-input", n.type = t.inputType ?? "text", n.value = i, t.placeholder && (n.placeholder = t.placeholder), t.maxLength && (n.maxLength = t.maxLength), n.setAttribute("autocomplete", me(t.inputType)), a = n;
84
84
  }
85
85
  return a.setAttribute("aria-label", t.label), t.required && a.setAttribute("aria-required", "true"), a.addEventListener("input", () => {
86
86
  e.onChange(a.value);
@@ -111,7 +111,7 @@ function ue(t, e) {
111
111
  ...v(a)
112
112
  };
113
113
  }
114
- function he(t) {
114
+ function me(t) {
115
115
  switch (t) {
116
116
  case "email":
117
117
  return "email";
@@ -123,11 +123,11 @@ function he(t) {
123
123
  return "off";
124
124
  }
125
125
  }
126
- function pe(t, e) {
126
+ function fe(t, e) {
127
127
  const i = document.createElement("div");
128
128
  i.className = "qaid-q-currency";
129
129
  const a = document.createElement("span");
130
- a.className = "qaid-q-currency-prefix", a.textContent = qe(t.currency ?? "USD", t.locale), i.appendChild(a);
130
+ a.className = "qaid-q-currency-prefix", a.textContent = ge(t.currency ?? "USD", t.locale), i.appendChild(a);
131
131
  const n = document.createElement("input");
132
132
  return n.className = "qaid-q-input", n.type = "number", n.inputMode = "decimal", n.step = "0.01", typeof t.min == "number" && (n.min = String(t.min)), typeof t.max == "number" && (n.max = String(t.max)), t.placeholder && (n.placeholder = t.placeholder), typeof e.initialValue == "number" ? n.value = String(e.initialValue) : typeof e.initialValue == "string" && e.initialValue !== "" && (n.value = e.initialValue), n.setAttribute("aria-label", t.label), t.required && n.setAttribute("aria-required", "true"), n.addEventListener("input", () => {
133
133
  const r = n.value;
@@ -154,7 +154,7 @@ function pe(t, e) {
154
154
  ...v(n)
155
155
  };
156
156
  }
157
- function qe(t, e) {
157
+ function ge(t, e) {
158
158
  try {
159
159
  return new Intl.NumberFormat(e, {
160
160
  style: "currency",
@@ -166,7 +166,7 @@ function qe(t, e) {
166
166
  return t;
167
167
  }
168
168
  }
169
- function me(t, e) {
169
+ function be(t, e) {
170
170
  const i = document.createElement("div");
171
171
  i.className = "qaid-q-range-wrap";
172
172
  const a = document.createElement("div");
@@ -199,7 +199,7 @@ function me(t, e) {
199
199
  ...v(s)
200
200
  };
201
201
  }
202
- function fe(t, e) {
202
+ function ve(t, e) {
203
203
  const i = document.createElement("input");
204
204
  return i.className = "qaid-q-input", i.type = "date", t.min && (i.min = t.min), t.max && (i.max = t.max), typeof e.initialValue == "string" && (i.value = e.initialValue), i.setAttribute("aria-label", t.label), t.required && i.setAttribute("aria-required", "true"), i.addEventListener("input", () => {
205
205
  e.onChange(i.value || null);
@@ -213,7 +213,7 @@ function fe(t, e) {
213
213
  ...v(i)
214
214
  };
215
215
  }
216
- function ge(t, e) {
216
+ function ye(t, e) {
217
217
  const i = document.createElement("div"), a = t.imageAlignment ?? "horizontal", r = t.options.some((d) => !!d.image) ? a === "vertical" ? " qaid-q-options--image-vertical" : " qaid-q-options--image-horizontal" : "";
218
218
  i.className = `qaid-q-options${r}`, i.setAttribute("role", t.multiple ? "group" : "radiogroup"), i.setAttribute("aria-label", t.label), t.required && i.setAttribute("aria-required", "true");
219
219
  const s = /* @__PURE__ */ new Set();
@@ -283,27 +283,27 @@ function ge(t, e) {
283
283
  ...v(i)
284
284
  };
285
285
  }
286
- function w(t, e) {
286
+ function C(t, e) {
287
287
  const i = /* @__PURE__ */ Object.create(null), a = [];
288
288
  for (const n of t.questions)
289
- n.visibleIf && !C(n.visibleIf, i) || (a.push(n), Object.prototype.hasOwnProperty.call(e, n.id) && (i[n.id] = e[n.id]));
289
+ n.visibleIf && !k(n.visibleIf, i) || (a.push(n), Object.prototype.hasOwnProperty.call(e, n.id) && (i[n.id] = e[n.id]));
290
290
  return a;
291
291
  }
292
- function be(t, e) {
292
+ function xe(t, e) {
293
293
  const i = {};
294
- for (const a of w(t, e))
294
+ for (const a of C(t, e))
295
295
  Object.prototype.hasOwnProperty.call(e, a.id) && (i[a.id] = e[a.id]);
296
296
  return i;
297
297
  }
298
- function C(t, e) {
298
+ function k(t, e) {
299
299
  if ("allOf" in t) {
300
300
  for (const n of t.allOf)
301
- if (!C(n, e)) return !1;
301
+ if (!k(n, e)) return !1;
302
302
  return !0;
303
303
  }
304
304
  if ("anyOf" in t) {
305
305
  for (const n of t.anyOf)
306
- if (C(n, e)) return !0;
306
+ if (k(n, e)) return !0;
307
307
  return !1;
308
308
  }
309
309
  const i = e[t.questionId], a = i != null && !(typeof i == "string" && i.trim() === "") && !(Array.isArray(i) && i.length === 0);
@@ -312,26 +312,26 @@ function C(t, e) {
312
312
  function y(t, e) {
313
313
  return Array.isArray(t) ? t.some((i) => i === e) : t === e;
314
314
  }
315
- const ve = 360, x = 2;
316
- function ye(t) {
315
+ const Ee = 360, x = 2;
316
+ function we(t) {
317
317
  const e = t.scrollHeight - t.clientHeight;
318
318
  return e <= x ? "none" : t.scrollTop <= x ? "top" : t.scrollTop >= e - x ? "bottom" : "middle";
319
319
  }
320
- function xe(t, e) {
321
- const i = ye(t);
320
+ function Ce(t, e) {
321
+ const i = we(t);
322
322
  if (t.setAttribute("data-qaid-scroll", i), e) {
323
323
  const a = i === "top" || i === "middle";
324
324
  e.hidden = !a;
325
325
  }
326
326
  return i;
327
327
  }
328
- function Ee(t, e) {
329
- const i = e > 0 && e < ve ? "compact" : "roomy";
328
+ function ke(t, e) {
329
+ const i = e > 0 && e < Ee ? "compact" : "roomy";
330
330
  return t.setAttribute("data-qaid-fit", i), i;
331
331
  }
332
- function we(t, e, i) {
332
+ function Ae(t, e, i) {
333
333
  const a = () => {
334
- xe(t, i), Ee(e, t.clientHeight);
334
+ Ce(t, i), ke(e, t.clientHeight);
335
335
  };
336
336
  t.addEventListener("scroll", a, { passive: !0 });
337
337
  let n = null;
@@ -342,7 +342,45 @@ function we(t, e, i) {
342
342
  }
343
343
  };
344
344
  }
345
- const L = "data-qaid-a11y-live", Ce = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;", ke = [
345
+ const O = "http://www.w3.org/2000/svg", Se = {
346
+ svg: { width: "14", height: "14", viewBox: "0 0 14 14", "aria-hidden": "true" },
347
+ path: {
348
+ d: "M2 2l10 10M12 2L2 12",
349
+ stroke: "currentColor",
350
+ "stroke-width": "2",
351
+ "stroke-linecap": "round",
352
+ fill: "none"
353
+ }
354
+ }, Ie = {
355
+ svg: { width: "24", height: "24", viewBox: "0 0 24 24", "aria-hidden": "true" },
356
+ path: {
357
+ d: "M5 12l4 4L19 7",
358
+ stroke: "currentColor",
359
+ "stroke-width": "3",
360
+ "stroke-linecap": "round",
361
+ "stroke-linejoin": "round",
362
+ fill: "none"
363
+ }
364
+ }, Ne = {
365
+ svg: {
366
+ viewBox: "0 0 24 24",
367
+ fill: "none",
368
+ stroke: "currentColor",
369
+ "stroke-width": "2.5",
370
+ "stroke-linecap": "round",
371
+ "stroke-linejoin": "round"
372
+ },
373
+ path: { d: "M6 9l6 6 6-6" }
374
+ };
375
+ function P(t, e) {
376
+ for (const i in e) t.setAttribute(i, e[i]);
377
+ return t;
378
+ }
379
+ function E(t) {
380
+ const e = P(document.createElementNS(O, "svg"), t.svg);
381
+ return e.appendChild(P(document.createElementNS(O, "path"), t.path)), e;
382
+ }
383
+ const z = "data-qaid-a11y-live", Te = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;", Le = [
346
384
  "a[href]",
347
385
  "button",
348
386
  "input",
@@ -350,25 +388,25 @@ const L = "data-qaid-a11y-live", Ce = "position:absolute;width:1px;height:1px;ma
350
388
  "select",
351
389
  "[tabindex]"
352
390
  ].join(",");
353
- function Ae(t) {
391
+ function Oe(t) {
354
392
  return t.ownerDocument || document;
355
393
  }
356
- function Se(t, e) {
394
+ function Pe(t, e) {
357
395
  const i = e ? "assertive" : "polite", a = t.querySelector(
358
- `[${L}="${i}"]`
396
+ `[${z}="${i}"]`
359
397
  );
360
398
  if (a) return a;
361
- const r = Ae(t).createElement("div");
362
- return r.setAttribute(L, i), r.setAttribute("role", e ? "alert" : "status"), r.setAttribute("aria-live", e ? "assertive" : "polite"), r.setAttribute("aria-atomic", "true"), r.style.cssText = Ce, t.appendChild(r), r;
399
+ const r = Oe(t).createElement("div");
400
+ return r.setAttribute(z, i), r.setAttribute("role", e ? "alert" : "status"), r.setAttribute("aria-live", e ? "assertive" : "polite"), r.setAttribute("aria-atomic", "true"), r.style.cssText = Te, t.appendChild(r), r;
363
401
  }
364
402
  function b(t, e, i = {}) {
365
- const a = Se(t, !!i.assertive);
403
+ const a = Pe(t, !!i.assertive);
366
404
  a.textContent = "", a.textContent = e;
367
405
  }
368
- function Ie(t) {
406
+ function ze(t) {
369
407
  return t.hasAttribute("disabled") ? !0 : t.disabled === !0;
370
408
  }
371
- function Ne(t) {
409
+ function De(t) {
372
410
  let e = t;
373
411
  for (; e; ) {
374
412
  if (e.hasAttribute("hidden")) return !0;
@@ -379,52 +417,52 @@ function Ne(t) {
379
417
  }
380
418
  return !1;
381
419
  }
382
- function O(t) {
420
+ function D(t) {
383
421
  return Array.from(
384
- t.querySelectorAll(ke)
385
- ).filter((i) => !(i.getAttribute("tabindex") === "-1" || i instanceof HTMLInputElement && i.type === "hidden" || i instanceof HTMLAnchorElement && !i.getAttribute("href") || Ie(i) || Ne(i)));
422
+ t.querySelectorAll(Le)
423
+ ).filter((i) => !(i.getAttribute("tabindex") === "-1" || i instanceof HTMLInputElement && i.type === "hidden" || i instanceof HTMLAnchorElement && !i.getAttribute("href") || ze(i) || De(i)));
386
424
  }
387
- function j(t) {
425
+ function H(t) {
388
426
  let e = t.activeElement;
389
427
  for (; e && e.shadowRoot && e.shadowRoot.activeElement; )
390
428
  e = e.shadowRoot.activeElement;
391
429
  return e instanceof HTMLElement ? e : null;
392
430
  }
393
- function Te(t) {
431
+ function je(t) {
394
432
  const e = t.ownerDocument || document;
395
433
  let i = !1;
396
434
  const a = (r) => {
397
435
  if (r.key !== "Tab") return;
398
- const s = O(t);
436
+ const s = D(t);
399
437
  if (s.length === 0) {
400
438
  r.preventDefault(), t.focus();
401
439
  return;
402
440
  }
403
- const o = s[0], u = s[s.length - 1], q = j(e), f = q ? s.indexOf(q) !== -1 : !1;
441
+ const o = s[0], u = s[s.length - 1], q = H(e), f = q ? s.indexOf(q) !== -1 : !1;
404
442
  r.shiftKey ? (!f || q === o) && (r.preventDefault(), u.focus()) : (!f || q === u) && (r.preventDefault(), o.focus());
405
443
  };
406
444
  t.addEventListener("keydown", a);
407
- const n = O(t);
445
+ const n = D(t);
408
446
  return n.length > 0 ? n[0].focus() : (t.hasAttribute("tabindex") || (t.setAttribute("tabindex", "-1"), i = !0), t.focus()), {
409
447
  release() {
410
448
  t.removeEventListener("keydown", a), i && (t.removeAttribute("tabindex"), i = !1);
411
449
  }
412
450
  };
413
451
  }
414
- function Le() {
415
- return j(document);
452
+ function Re() {
453
+ return H(document);
416
454
  }
417
- function Oe(t) {
455
+ function Ve(t) {
418
456
  if (!(!t || typeof t.focus != "function"))
419
457
  try {
420
458
  t.focus();
421
459
  } catch {
422
460
  }
423
461
  }
424
- function Pe(t, e = {}) {
462
+ function He(t, e = {}) {
425
463
  t.setAttribute("role", "dialog"), t.setAttribute("aria-modal", "true"), e.labelledbyId && t.setAttribute("aria-labelledby", e.labelledbyId), e.describedbyId && t.setAttribute("aria-describedby", e.describedbyId), e.label && t.setAttribute("aria-label", e.label);
426
464
  }
427
- function ze(t, e) {
465
+ function Ue(t, e) {
428
466
  let i = t;
429
467
  for (; i && i !== e; ) {
430
468
  const a = i.parentNode;
@@ -438,11 +476,11 @@ function ze(t, e) {
438
476
  }
439
477
  return null;
440
478
  }
441
- function De(t) {
479
+ function $e(t) {
442
480
  const i = (t.ownerDocument || document).body;
443
481
  if (!i) return () => {
444
482
  };
445
- const a = ze(t, i), n = [];
483
+ const a = Ue(t, i), n = [];
446
484
  return Array.from(i.children).forEach((r) => {
447
485
  if (!(r instanceof HTMLElement) || a && r === a) return;
448
486
  const s = r.inert === !0, o = r.getAttribute("aria-hidden");
@@ -454,8 +492,8 @@ function De(t) {
454
492
  }
455
493
  };
456
494
  }
457
- const P = "qaid_visitor_id";
458
- function z() {
495
+ const j = "qaid_visitor_id";
496
+ function R() {
459
497
  const t = typeof crypto < "u" ? crypto : void 0;
460
498
  if (t && typeof t.randomUUID == "function") return t.randomUUID();
461
499
  const e = new Uint8Array(16);
@@ -467,16 +505,15 @@ function z() {
467
505
  const i = Array.from(e, (a) => a.toString(16).padStart(2, "0")).join("");
468
506
  return `${i.slice(0, 8)}-${i.slice(8, 12)}-${i.slice(12, 16)}-${i.slice(16, 20)}-${i.slice(20)}`;
469
507
  }
470
- function je() {
508
+ function Fe() {
471
509
  try {
472
- let t = localStorage.getItem(P);
473
- return t || (t = z(), localStorage.setItem(P, t)), t;
510
+ let t = localStorage.getItem(j);
511
+ return t || (t = R(), localStorage.setItem(j, t)), t;
474
512
  } catch {
475
- return z();
513
+ return R();
476
514
  }
477
515
  }
478
- const He = '<svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true"><path d="M2 2l10 10M12 2L2 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" fill="none"/></svg>', Re = '<svg width="24" height="24" viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12l4 4L19 7" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>';
479
- class Ve {
516
+ class Me {
480
517
  /**
481
518
  * What this build accepts, for hosts that load it at runtime and may get
482
519
  * an older copy. asyncMetadata: `metadata` may be a promise.
@@ -622,10 +659,10 @@ class Ve {
622
659
  backdropOpacity: e.backdropOpacity,
623
660
  fontFamily: e.fontFamily,
624
661
  fontSize: e.fontSize
625
- }, this.themeUrl = e.themeUrl, this.themeDocument = e.themeDocument, this.hostCss = e.css ?? "", this.metadata = e.metadata, this.onCompleteCb = e.onComplete, this.onCloseCb = e.onClose, this.inlineQuestionnaire = e.questionnaire, this.configUrl = e.configUrl, this.visitorId = e.visitorId || je(), this.boundKeyDown = this.handleKeyDown.bind(this), this.init();
662
+ }, this.themeUrl = e.themeUrl, this.themeDocument = e.themeDocument, this.hostCss = e.css ?? "", this.metadata = e.metadata, this.onCompleteCb = e.onComplete, this.onCloseCb = e.onClose, this.inlineQuestionnaire = e.questionnaire, this.configUrl = e.configUrl, this.visitorId = e.visitorId || Fe(), this.boundKeyDown = this.handleKeyDown.bind(this), this.init();
626
663
  }
627
664
  async init() {
628
- this.cssVars = se(this.hostInlineVars), this.mountShell(), this.renderLoading();
665
+ this.cssVars = le(this.hostInlineVars), this.mountShell(), this.renderLoading();
629
666
  try {
630
667
  const [e, i] = await Promise.all([
631
668
  this.loadQuestionnaire(),
@@ -651,7 +688,7 @@ class Ve {
651
688
  if (this.themeDocument) return this.themeDocument;
652
689
  if (!this.themeUrl) return null;
653
690
  try {
654
- const e = await N(this.themeUrl);
691
+ const e = await T(this.themeUrl);
655
692
  return e.ok ? await e.json() : (console.warn(
656
693
  `[quests-embed] theme fetch failed (${e.status}) — rendering with defaults`
657
694
  ), null);
@@ -690,7 +727,7 @@ ${s}
690
727
  }`);
691
728
  }
692
729
  if (i && i !== "default") {
693
- const s = le(i);
730
+ const s = he(i);
694
731
  s && r.push(s);
695
732
  }
696
733
  if (e?.css && e.css.trim() !== "" && r.push(e.css), this.hostCss && this.hostCss.trim() !== "" && r.push(this.hostCss), r.length > 0) {
@@ -707,7 +744,7 @@ ${s}
707
744
  if (this.inlineQuestionnaire) return this.inlineQuestionnaire;
708
745
  if (!this.configUrl)
709
746
  throw new Error("No questionnaire or configUrl provided");
710
- const e = await N(this.configUrl);
747
+ const e = await T(this.configUrl);
711
748
  if (!e.ok)
712
749
  throw new Error(`Failed to load questionnaire (${e.status})`);
713
750
  return await e.json();
@@ -718,20 +755,20 @@ ${s}
718
755
  mountShell() {
719
756
  this.shadowHost = document.createElement("div"), this.shadowHost.setAttribute("data-qaid-quests", "");
720
757
  const e = this.config.container ? document.querySelector(this.config.container) : null;
721
- e ? (this.shadowHost.style.display = "block", this.shadowHost.style.height = "100%", this.shadowHost.style.minHeight = "0", e.appendChild(this.shadowHost), this.isUserContainer = !0) : (this.savedOpener = Le(), this.shadowHost.style.position = "fixed", this.shadowHost.style.inset = "0", this.shadowHost.style.zIndex = String(this.config.zIndex), this.shadowHost.style.pointerEvents = "none", document.body.appendChild(this.shadowHost)), this.shadowRoot = this.shadowHost.attachShadow({ mode: "open" });
758
+ e ? (this.shadowHost.style.display = "block", this.shadowHost.style.height = "100%", this.shadowHost.style.minHeight = "0", e.appendChild(this.shadowHost), this.isUserContainer = !0) : (this.savedOpener = Re(), this.shadowHost.style.position = "fixed", this.shadowHost.style.inset = "0", this.shadowHost.style.zIndex = String(this.config.zIndex), this.shadowHost.style.pointerEvents = "none", document.body.appendChild(this.shadowHost)), this.shadowRoot = this.shadowHost.attachShadow({ mode: "open" });
722
759
  const i = document.createElement("style");
723
- if (i.textContent = de(), this.shadowRoot.appendChild(i), this.rootEl = document.createElement("div"), this.rootEl.className = [
760
+ if (i.textContent = ue(), this.shadowRoot.appendChild(i), this.rootEl = document.createElement("div"), this.rootEl.className = [
724
761
  "qaid-q-root",
725
762
  this.isUserContainer ? "qaid-q-inline" : "",
726
763
  this.config.animate ? "" : "qaid-q-no-motion"
727
- ].filter(Boolean).join(" "), oe(this.rootEl, this.cssVars), this.isUserContainer)
764
+ ].filter(Boolean).join(" "), ce(this.rootEl, this.cssVars), this.isUserContainer)
728
765
  this.cardEl = document.createElement("div"), this.cardEl.className = "qaid-q-card", this.rootEl.appendChild(this.cardEl);
729
766
  else {
730
767
  this.backdropEl = document.createElement("div"), this.backdropEl.className = "qaid-q-backdrop", this.backdropEl.addEventListener("click", () => this.close()), this.rootEl.appendChild(this.backdropEl);
731
768
  const a = document.createElement("div");
732
769
  a.className = "qaid-q-modal", this.cardEl = document.createElement("div"), this.cardEl.className = "qaid-q-card", a.appendChild(this.cardEl), this.rootEl.appendChild(a);
733
770
  }
734
- this.shadowRoot.appendChild(this.rootEl), !this.isUserContainer && this.shadowHost && (this.shadowHost.style.pointerEvents = "auto"), !this.isUserContainer && this.cardEl && Pe(this.cardEl), document.addEventListener("keydown", this.boundKeyDown);
771
+ this.shadowRoot.appendChild(this.rootEl), !this.isUserContainer && this.shadowHost && (this.shadowHost.style.pointerEvents = "auto"), !this.isUserContainer && this.cardEl && He(this.cardEl), document.addEventListener("keydown", this.boundKeyDown);
735
772
  }
736
773
  renderLoading() {
737
774
  if (!this.cardEl) return;
@@ -770,7 +807,7 @@ ${s}
770
807
  const l = document.createElement("div");
771
808
  if (l.style.display = "flex", l.style.alignItems = "center", l.style.gap = "0.5rem", i || (l.appendChild(this.savingEl), e || l.appendChild(this.stepCounterEl)), s) {
772
809
  const m = document.createElement("button");
773
- m.type = "button", m.className = "qaid-q-close", m.setAttribute("aria-label", "Close form"), m.innerHTML = He, m.addEventListener("click", () => this.close()), l.appendChild(m);
810
+ m.type = "button", m.className = "qaid-q-close", m.setAttribute("aria-label", "Close form"), m.appendChild(E(Se)), m.addEventListener("click", () => this.close()), l.appendChild(m);
774
811
  }
775
812
  d.appendChild(h), d.appendChild(l), this.cardEl.appendChild(d);
776
813
  }
@@ -781,7 +818,7 @@ ${s}
781
818
  const d = document.createElement("p");
782
819
  d.className = "qaid-q-description", d.textContent = this.questionnaire.description, d.style.marginTop = f ? "-0.5rem" : "0", d.style.marginBottom = "0.75rem", this.cardEl.appendChild(d);
783
820
  }
784
- !i && !e && this.cardEl.appendChild(this.progressEl), this.bodyEl = document.createElement("div"), this.bodyEl.className = "qaid-q-body", this.cardEl.appendChild(this.bodyEl), this.footerEl = document.createElement("div"), this.footerEl.className = "qaid-q-footer", this.cardEl.appendChild(this.footerEl), this.scrollCueEl = document.createElement("div"), this.scrollCueEl.className = "qaid-q-scroll-cue", this.scrollCueEl.setAttribute("aria-hidden", "true"), this.scrollCueEl.hidden = !0, this.scrollCueEl.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>', this.bodyEl.appendChild(this.scrollCueEl), this.overflow = we(this.bodyEl, this.cardEl, this.scrollCueEl);
821
+ !i && !e && this.cardEl.appendChild(this.progressEl), this.bodyEl = document.createElement("div"), this.bodyEl.className = "qaid-q-body", this.cardEl.appendChild(this.bodyEl), this.footerEl = document.createElement("div"), this.footerEl.className = "qaid-q-footer", this.cardEl.appendChild(this.footerEl), this.scrollCueEl = document.createElement("div"), this.scrollCueEl.className = "qaid-q-scroll-cue", this.scrollCueEl.setAttribute("aria-hidden", "true"), this.scrollCueEl.hidden = !0, this.scrollCueEl.appendChild(E(Ne)), this.bodyEl.appendChild(this.scrollCueEl), this.overflow = Ae(this.bodyEl, this.cardEl, this.scrollCueEl);
785
822
  }
786
823
  // ------------------------------------------------------------------
787
824
  // Step rendering
@@ -817,7 +854,7 @@ ${s}
817
854
  }
818
855
  const o = document.createElement("p");
819
856
  o.className = "qaid-q-error", o.id = `qaid-q-error-${a}`, o.setAttribute("aria-live", "polite");
820
- const u = this.answers[n.id] ?? null, q = ce({
857
+ const u = this.answers[n.id] ?? null, q = pe({
821
858
  question: n,
822
859
  initialValue: u,
823
860
  onChange: (p) => {
@@ -850,7 +887,7 @@ ${s}
850
887
  const e = document.createElement("div");
851
888
  e.className = "qaid-q-done";
852
889
  const i = document.createElement("div");
853
- i.className = "qaid-q-done-icon", i.innerHTML = Re, e.appendChild(i);
890
+ i.className = "qaid-q-done-icon", i.appendChild(E(Ie)), e.appendChild(i);
854
891
  const a = document.createElement("h3");
855
892
  a.className = "qaid-q-done-title";
856
893
  const n = this.questionnaire.thankYouTitle ?? "Thank you!";
@@ -903,7 +940,7 @@ ${s}
903
940
  advance(e, i) {
904
941
  if (!this.currentInput || !this.questionnaire) return;
905
942
  if (!this.currentInput.isValid()) {
906
- i.textContent = Ue(e), this.currentInput.setInvalid(i.id), this.currentInput.focus();
943
+ i.textContent = Qe(e), this.currentInput.setInvalid(i.id), this.currentInput.focus();
907
944
  return;
908
945
  }
909
946
  if (this.handleAnswerChange(e, this.currentInput.getValue(), { immediate: !0 }), this.stepIndex === this.visibleQuestions.length - 1) {
@@ -919,7 +956,7 @@ ${s}
919
956
  // Answer handling + autosave
920
957
  // ------------------------------------------------------------------
921
958
  recomputeVisible() {
922
- this.questionnaire && (this.visibleQuestions = w(this.questionnaire, this.answers));
959
+ this.questionnaire && (this.visibleQuestions = C(this.questionnaire, this.answers));
923
960
  }
924
961
  /**
925
962
  * Label the step's primary button for what pressing it will do: "Submit"
@@ -1032,7 +1069,7 @@ ${s}
1032
1069
  this.renderSubmitError();
1033
1070
  return;
1034
1071
  }
1035
- const e = this.questionnaire ? be(this.questionnaire, this.answers) : {}, i = [];
1072
+ const e = this.questionnaire ? xe(this.questionnaire, this.answers) : {}, i = [];
1036
1073
  if (this.droppedSaves)
1037
1074
  for (const [n, r] of Object.entries(e))
1038
1075
  i.push(this.patchAnswer(n, r));
@@ -1084,14 +1121,14 @@ ${s}
1084
1121
  * never trapped or isolated.
1085
1122
  */
1086
1123
  setupModalA11y() {
1087
- this.isUserContainer || !this.cardEl || this.focusTrap || (this.focusTrap = Te(this.cardEl), this.inertRestore = De(this.cardEl));
1124
+ this.isUserContainer || !this.cardEl || this.focusTrap || (this.focusTrap = je(this.cardEl), this.inertRestore = $e(this.cardEl));
1088
1125
  }
1089
1126
  close() {
1090
1127
  this.flushPendingSave(), this.destroy();
1091
1128
  }
1092
1129
  /** Destroy the embed and clean up all resources */
1093
1130
  destroy() {
1094
- if (document.removeEventListener("keydown", this.boundKeyDown), this.pendingSaveTimer && (clearTimeout(this.pendingSaveTimer), this.pendingSaveTimer = null), this.focusTrap && (this.focusTrap.release(), this.focusTrap = null), this.inertRestore && (this.inertRestore(), this.inertRestore = null), !this.isUserContainer && this.savedOpener && Oe(this.savedOpener), this.savedOpener = null, this.shadowHost && (this.shadowHost.remove(), this.shadowHost = null, this.shadowRoot = null), this.rootEl = null, this.cardEl = null, this.overflow?.destroy(), this.overflow = null, this.bodyEl = null, this.scrollCueEl = null, this.footerEl = null, this.titleEl = null, this.stepCounterEl = null, this.progressFillEl = null, this.savingEl = null, this.backdropEl = null, this.currentInput = null, !this.closed && (this.closed = !0, this.onCloseCb))
1131
+ if (document.removeEventListener("keydown", this.boundKeyDown), this.pendingSaveTimer && (clearTimeout(this.pendingSaveTimer), this.pendingSaveTimer = null), this.focusTrap && (this.focusTrap.release(), this.focusTrap = null), this.inertRestore && (this.inertRestore(), this.inertRestore = null), !this.isUserContainer && this.savedOpener && Ve(this.savedOpener), this.savedOpener = null, this.shadowHost && (this.shadowHost.remove(), this.shadowHost = null, this.shadowRoot = null), this.rootEl = null, this.cardEl = null, this.overflow?.destroy(), this.overflow = null, this.bodyEl = null, this.scrollCueEl = null, this.footerEl = null, this.titleEl = null, this.stepCounterEl = null, this.progressFillEl = null, this.savingEl = null, this.backdropEl = null, this.currentInput = null, !this.closed && (this.closed = !0, this.onCloseCb))
1095
1132
  try {
1096
1133
  this.onCloseCb();
1097
1134
  } catch (e) {
@@ -1146,7 +1183,7 @@ ${s}
1146
1183
  const i = new Set(e.questions.map((o) => o.id)), a = {};
1147
1184
  for (const [o, u] of Object.entries(this.answers))
1148
1185
  i.has(o) && (a[o] = u);
1149
- const n = w(e, a);
1186
+ const n = C(e, a);
1150
1187
  if (n.length === 0) return !1;
1151
1188
  this.flushPendingSave();
1152
1189
  const r = this.getCurrentQuestionId();
@@ -1170,7 +1207,7 @@ ${s}
1170
1207
  return i === -1 ? !1 : (i === this.stepIndex || (this.flushPendingSave(), this.stepIndex = i, this.renderStep()), !0);
1171
1208
  }
1172
1209
  }
1173
- function Ue(t) {
1210
+ function Qe(t) {
1174
1211
  switch (t.type) {
1175
1212
  case "text":
1176
1213
  return t.minLength ? `Please enter at least ${t.minLength} characters.` : "This field is required.";
@@ -1185,10 +1222,10 @@ function Ue(t) {
1185
1222
  return "Please choose a value.";
1186
1223
  }
1187
1224
  }
1188
- function H(t) {
1225
+ function U(t) {
1189
1226
  return document.querySelector(t)?.textContent?.trim() ?? "";
1190
1227
  }
1191
- function $e() {
1228
+ function Be() {
1192
1229
  const t = document.querySelector(
1193
1230
  'script[type="application/json"][data-quests-config]'
1194
1231
  );
@@ -1197,33 +1234,33 @@ function $e() {
1197
1234
  if (!e) return null;
1198
1235
  try {
1199
1236
  const i = JSON.parse(e);
1200
- return i.cssSelector && !i.css && (i.css = H(i.cssSelector), delete i.cssSelector), i;
1237
+ return i.cssSelector && !i.css && (i.css = U(i.cssSelector), delete i.cssSelector), i;
1201
1238
  } catch {
1202
1239
  return null;
1203
1240
  }
1204
1241
  }
1205
- function k(t, e, i) {
1242
+ function A(t, e, i) {
1206
1243
  console.warn(
1207
1244
  `[quests-embed] Ignoring ${t}="${e}": expected ${i}.`
1208
1245
  );
1209
1246
  }
1210
- function D(t, e) {
1247
+ function V(t, e) {
1211
1248
  if (e !== null) {
1212
1249
  if (e === "true") return !0;
1213
1250
  if (e === "false") return !1;
1214
- k(t, e, '"true" or "false"');
1251
+ A(t, e, '"true" or "false"');
1215
1252
  }
1216
1253
  }
1217
- function Fe(t, e, i) {
1254
+ function Ke(t, e, i) {
1218
1255
  if (e !== null) {
1219
1256
  if (i.includes(e)) return e;
1220
- k(t, e, i.map((a) => `"${a}"`).join(" or "));
1257
+ A(t, e, i.map((a) => `"${a}"`).join(" or "));
1221
1258
  }
1222
1259
  }
1223
- function Me(t) {
1260
+ function _e(t) {
1224
1261
  return typeof t == "object" && t !== null && !Array.isArray(t);
1225
1262
  }
1226
- function E(t, e, i, a = () => !0) {
1263
+ function w(t, e, i, a = () => !0) {
1227
1264
  if (e === null) return;
1228
1265
  let n = null;
1229
1266
  try {
@@ -1231,40 +1268,40 @@ function E(t, e, i, a = () => !0) {
1231
1268
  } catch {
1232
1269
  n = null;
1233
1270
  }
1234
- if (Me(n) && a(n)) return n;
1235
- k(t, e, i);
1271
+ if (_e(n) && a(n)) return n;
1272
+ A(t, e, i);
1236
1273
  }
1237
- function Qe(t) {
1274
+ function Ye(t) {
1238
1275
  const e = t.getAttribute("data-endpoint");
1239
1276
  if (!e) return null;
1240
- const i = t.getAttribute("data-config-url"), a = t.getAttribute("data-api-key"), n = t.getAttribute("data-container"), r = t.getAttribute("data-zindex"), s = t.getAttribute("data-accent-color"), o = t.getAttribute("data-error-color"), u = t.getAttribute("data-focus-color"), q = t.getAttribute("data-positive-color"), f = t.getAttribute("data-negative-color"), d = t.getAttribute("data-marker-color"), h = t.getAttribute("data-modal-width"), l = t.getAttribute("data-backdrop-opacity"), m = t.getAttribute("data-font-family"), g = t.getAttribute("data-font-size"), p = t.getAttribute("data-css"), c = t.getAttribute("data-css-selector"), R = t.getAttribute("data-auto-advance"), A = t.getAttribute("data-save-debounce-ms"), V = t.getAttribute("data-theme-url"), S = t.getAttribute("data-preset"), I = t.getAttribute("data-theme"), U = t.getAttribute("data-unstyled"), $ = D(
1277
+ const i = t.getAttribute("data-config-url"), a = t.getAttribute("data-api-key"), n = t.getAttribute("data-container"), r = t.getAttribute("data-zindex"), s = t.getAttribute("data-accent-color"), o = t.getAttribute("data-error-color"), u = t.getAttribute("data-focus-color"), q = t.getAttribute("data-positive-color"), f = t.getAttribute("data-negative-color"), d = t.getAttribute("data-marker-color"), h = t.getAttribute("data-modal-width"), l = t.getAttribute("data-backdrop-opacity"), m = t.getAttribute("data-font-family"), g = t.getAttribute("data-font-size"), p = t.getAttribute("data-css"), c = t.getAttribute("data-css-selector"), $ = t.getAttribute("data-auto-advance"), S = t.getAttribute("data-save-debounce-ms"), F = t.getAttribute("data-theme-url"), I = t.getAttribute("data-preset"), N = t.getAttribute("data-theme"), M = t.getAttribute("data-unstyled"), Q = V(
1241
1278
  "data-auto-focus",
1242
1279
  t.getAttribute("data-auto-focus")
1243
- ), F = D(
1280
+ ), B = V(
1244
1281
  "data-animate",
1245
1282
  t.getAttribute("data-animate")
1246
- ), M = Fe(
1283
+ ), K = Ke(
1247
1284
  "data-progress-position",
1248
1285
  t.getAttribute("data-progress-position"),
1249
1286
  ["top", "bottom"]
1250
- ), Q = E(
1287
+ ), _ = w(
1251
1288
  "data-questionnaire",
1252
1289
  t.getAttribute("data-questionnaire"),
1253
1290
  'a JSON questionnaire with a "questions" array',
1254
- (J) => Array.isArray(J.questions)
1255
- ), B = E(
1291
+ (X) => Array.isArray(X.questions)
1292
+ ), Y = w(
1256
1293
  "data-theme-document",
1257
1294
  t.getAttribute("data-theme-document"),
1258
1295
  "a JSON theme object"
1259
- ), K = E(
1296
+ ), J = w(
1260
1297
  "data-metadata",
1261
1298
  t.getAttribute("data-metadata"),
1262
1299
  "a JSON object"
1263
- ), Y = t.getAttribute("data-page-url"), _ = t.getAttribute("data-visitor-id");
1300
+ ), G = t.getAttribute("data-page-url"), W = t.getAttribute("data-visitor-id");
1264
1301
  return {
1265
1302
  endpoint: e,
1266
1303
  configUrl: i ?? void 0,
1267
- questionnaire: Q,
1304
+ questionnaire: _,
1268
1305
  apiKey: a ?? void 0,
1269
1306
  container: n ?? void 0,
1270
1307
  zIndex: r ? parseInt(r, 10) : void 0,
@@ -1282,33 +1319,33 @@ function Qe(t) {
1282
1319
  fontSize: g ? parseInt(g, 10) : void 0,
1283
1320
  // Inline CSS wins over a selector, as `css` wins over `cssSelector` in
1284
1321
  // the JSON block.
1285
- css: p || (c ? H(c) : void 0),
1286
- autoAdvance: R === "true" ? !0 : void 0,
1287
- saveDebounceMs: A ? parseInt(A, 10) : void 0,
1288
- autoFocus: $,
1289
- animate: F,
1290
- progressPosition: M,
1291
- themeUrl: V ?? void 0,
1292
- themeDocument: B,
1293
- preset: S || void 0,
1294
- theme: I || void 0,
1295
- unstyled: U === "true" ? !0 : void 0,
1296
- metadata: K,
1297
- pageUrl: Y || void 0,
1298
- visitorId: _ || void 0
1322
+ css: p || (c ? U(c) : void 0),
1323
+ autoAdvance: $ === "true" ? !0 : void 0,
1324
+ saveDebounceMs: S ? parseInt(S, 10) : void 0,
1325
+ autoFocus: Q,
1326
+ animate: B,
1327
+ progressPosition: K,
1328
+ themeUrl: F ?? void 0,
1329
+ themeDocument: Y,
1330
+ preset: I || void 0,
1331
+ theme: N || void 0,
1332
+ unstyled: M === "true" ? !0 : void 0,
1333
+ metadata: J,
1334
+ pageUrl: G || void 0,
1335
+ visitorId: W || void 0
1299
1336
  };
1300
1337
  }
1301
1338
  if (typeof document < "u") {
1302
1339
  const t = document.currentScript, e = () => {
1303
- const i = t, a = $e() ?? (i ? Qe(i) : null);
1304
- a?.endpoint && (a.configUrl || a.questionnaire) && new Ve(a);
1340
+ const i = t, a = Be() ?? (i ? Ye(i) : null);
1341
+ a?.endpoint && (a.configUrl || a.questionnaire) && new Me(a);
1305
1342
  };
1306
1343
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e) : e();
1307
1344
  }
1308
1345
  export {
1309
- Ve as QaidQuests,
1310
- C as evaluateRule,
1311
- be as getVisibleAnswers,
1312
- w as getVisibleQuestions
1346
+ Me as QaidQuests,
1347
+ k as evaluateRule,
1348
+ xe as getVisibleAnswers,
1349
+ C as getVisibleQuestions
1313
1350
  };
1314
1351
  //# sourceMappingURL=qaid-quests.js.map