Files
Stackq/build/client/_app/immutable/chunks/61AlszRR.js
T

6 lines
15 KiB
JavaScript

var ht=Object.defineProperty;var tt=t=>{throw TypeError(t)};var vt=(t,e,r)=>e in t?ht(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var I=(t,e,r)=>vt(t,typeof e!="symbol"?e+"":e,r),et=(t,e,r)=>e.has(t)||tt("Cannot "+r);var w=(t,e,r)=>(et(t,e,"read from private field"),r?r.call(t):e.get(t)),O=(t,e,r)=>e.has(t)?tt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),F=(t,e,r,n)=>(et(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);import{b6 as yt,a1 as gt,ad as L,ac as Y,ay as Et,be as wt,bf as ut,i as lt,a3 as S,aX as xt,bg as At,g as A,u as M,I as St,ai as _t,F as ft,bh as Tt,A as z,c as P,f as j,a as E,G as K,h as kt,T as It,r as Ot,b as q}from"./Dexp9pM5.js";import"./Bzak7iHL.js";import{i as dt}from"./CRDN6Mh7.js";import{b as H,s as rt,a as C,c as G}from"./BKSreT2u.js";import{p as g,r as J,b as nt,s as Rt}from"./jOLfEXYH.js";import{c as Lt}from"./25AjRaeI.js";import{i as Pt,a as jt,b as Mt,c as Nt}from"./BapE3c1q.js";function Ft(){return Symbol(yt)}function Ne(t,e,r){gt(()=>{var n=L(()=>e(t,r==null?void 0:r())||{});if(r&&(n!=null&&n.update)){var o=!1,i={};Y(()=>{var a=r();Et(a),o&&wt(i,a)&&(i=a,n.update(a))}),o=!0}if(n!=null&&n.destroy)return()=>n.destroy()})}function ot(t,e,r=e){var n=new WeakSet;ut(t,"input",async o=>{var i=o?t.defaultValue:t.value;if(i=W(t)?V(i):i,r(i),S!==null&&n.add(S),await xt(),i!==(i=e())){var a=t.selectionStart,u=t.selectionEnd,d=t.value.length;if(t.value=i??"",u!==null){var p=t.value.length;a===u&&u===d&&p>d?(t.selectionStart=p,t.selectionEnd=p):(t.selectionStart=a,t.selectionEnd=Math.min(u,p))}}}),(lt&&t.defaultValue!==t.value||L(e)==null&&t.value)&&(r(W(t)?V(t.value):t.value),S!==null&&n.add(S)),Y(()=>{var o=e();if(t===document.activeElement){var i=At??S;if(n.has(i))return}W(t)&&o===V(t.value)||t.type==="date"&&!o&&!t.value||o!==t.value&&(t.value=o??"")})}function W(t){var e=t.type;return e==="number"||e==="range"}function V(t){return t===""?null:+t}function Ht(t,e,r=e){ut(t,"change",()=>{r(t.files)}),lt&&t.files&&r(t.files),Y(()=>{t.files=e()})}function Wt(t){return typeof t=="function"}function Vt(t){return t!==null&&typeof t=="object"}const Bt=["string","number","bigint","boolean"];function U(t){return t==null||Bt.includes(typeof t)?!0:Array.isArray(t)?t.every(e=>U(e)):typeof t=="object"?Object.getPrototypeOf(t)===Object.prototype:!1}const _=Symbol("box"),Z=Symbol("is-writable");function X(t,e){const r=M(t);return e?{[_]:!0,[Z]:!0,get current(){return A(r)},set current(n){e(n)}}:{[_]:!0,get current(){return t()}}}function N(t){return Vt(t)&&_ in t}function pt(t){return N(t)&&Z in t}function Fe(t){return N(t)?t:Wt(t)?X(t):Ct(t)}function He(t){return Object.entries(t).reduce((e,[r,n])=>N(n)?(pt(n)?Object.defineProperty(e,r,{get(){return n.current},set(o){n.current=o}}):Object.defineProperty(e,r,{get(){return n.current}}),e):Object.assign(e,{[r]:n}),{})}function We(t){return pt(t)?{[_]:!0,get current(){return t.current}}:t}function Ct(t){let e=St(_t(t));return{[_]:!0,[Z]:!0,get current(){return A(e)},set current(r){ft(e,r,!0)}}}function Gt(...t){return function(e){var r;for(const n of t)if(n){if(e.defaultPrevented)return;typeof n=="function"?n.call(this,e):(r=n.current)==null||r.call(this,e)}}}var it=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ut=/\n/g,Xt=/^\s*/,Dt=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Yt=/^:\s*/,zt=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Kt=/^[;\s]*/,qt=/^\s+|\s+$/g,Jt=`
`,at="/",st="*",y="",Zt="comment",Qt="declaration";function $t(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function o(c){var s=c.match(Ut);s&&(r+=s.length);var v=c.lastIndexOf(Jt);n=~v?c.length-v:n+c.length}function i(){var c={line:r,column:n};return function(s){return s.position=new a(c),p(),s}}function a(c){this.start=c,this.end={line:r,column:n},this.source=e.source}a.prototype.content=t;function u(c){var s=new Error(e.source+":"+r+":"+n+": "+c);if(s.reason=c,s.filename=e.source,s.line=r,s.column=n,s.source=t,!e.silent)throw s}function d(c){var s=c.exec(t);if(s){var v=s[0];return o(v),t=t.slice(v.length),s}}function p(){d(Xt)}function m(c){var s;for(c=c||[];s=b();)s!==!1&&c.push(s);return c}function b(){var c=i();if(!(at!=t.charAt(0)||st!=t.charAt(1))){for(var s=2;y!=t.charAt(s)&&(st!=t.charAt(s)||at!=t.charAt(s+1));)++s;if(s+=2,y===t.charAt(s-1))return u("End of comment missing");var v=t.slice(2,s-2);return n+=2,o(v),t=t.slice(s),n+=2,c({type:Zt,comment:v})}}function f(){var c=i(),s=d(Dt);if(s){if(b(),!d(Yt))return u("property missing ':'");var v=d(zt),h=c({type:Qt,property:ct(s[0].replace(it,y)),value:v?ct(v[0].replace(it,y)):y});return d(Kt),h}}function l(){var c=[];m(c);for(var s;s=f();)s!==!1&&(c.push(s),m(c));return c}return p(),l()}function ct(t){return t?t.replace(qt,y):y}function te(t,e){let r=null;if(!t||typeof t!="string")return r;const n=$t(t),o=typeof e=="function";return n.forEach(i=>{if(i.type!=="declaration")return;const{property:a,value:u}=i;o?e(a,u,i):u&&(r=r||{},r[a]=u)}),r}const ee=/\d/,re=["-","_","/","."];function ne(t=""){if(!ee.test(t))return t!==t.toLowerCase()}function oe(t){const e=[];let r="",n,o;for(const i of t){const a=re.includes(i);if(a===!0){e.push(r),r="",n=void 0;continue}const u=ne(i);if(o===!1){if(n===!1&&u===!0){e.push(r),r=i,n=u;continue}if(n===!0&&u===!1&&r.length>1){const d=r.at(-1);e.push(r.slice(0,Math.max(0,r.length-1))),r=d+i,n=u;continue}}r+=i,n=u,o=a}return e.push(r),e}function mt(t){return t?oe(t).map(e=>ae(e)).join(""):""}function ie(t){return se(mt(t||""))}function ae(t){return t?t[0].toUpperCase()+t.slice(1):""}function se(t){return t?t[0].toLowerCase()+t.slice(1):""}function R(t){if(!t)return{};const e={};function r(n,o){if(n.startsWith("-moz-")||n.startsWith("-webkit-")||n.startsWith("-ms-")||n.startsWith("-o-")){e[mt(n)]=o;return}if(n.startsWith("--")){e[n]=o;return}e[ie(n)]=o}return te(t,r),e}function ce(...t){return(...e)=>{for(const r of t)typeof r=="function"&&r(...e)}}function ue(t,e){const r=RegExp(t,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,e):n}}const le=ue(/[A-Z]/,t=>`-${t.toLowerCase()}`);function fe(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an argument of type object, but got ${typeof t}`);return Object.keys(t).map(e=>`${le(e)}: ${t[e]};`).join(`
`)}function de(t={}){return fe(t).replace(`
`," ")}const pe=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],me=new Set(pe);function be(t){return me.has(t)}function he(...t){const e={...t[0]};for(let r=1;r<t.length;r++){const n=t[r];if(n){for(const o of Object.keys(n)){const i=e[o],a=n[o],u=typeof i=="function",d=typeof a=="function";if(u&&be(o)){const p=i,m=a;e[o]=Gt(p,m)}else if(u&&d)e[o]=ce(i,a);else if(o==="class"){const p=U(i),m=U(a);p&&m?e[o]=H(i,a):p?e[o]=H(i):m&&(e[o]=H(a))}else if(o==="style"){const p=typeof i=="object",m=typeof a=="object",b=typeof i=="string",f=typeof a=="string";if(p&&m)e[o]={...i,...a};else if(p&&f){const l=R(a);e[o]={...i,...l}}else if(b&&m){const l=R(i);e[o]={...l,...a}}else if(b&&f){const l=R(i),c=R(a);e[o]={...l,...c}}else p?e[o]=i:m?e[o]=a:b?e[o]=i:f&&(e[o]=a)}else e[o]=a!==void 0?a:i}for(const o of Object.getOwnPropertySymbols(n)){const i=e[o],a=n[o];e[o]=a!==void 0?a:i}}}return typeof e.style=="object"&&(e.style=de(e.style).replaceAll(`
`," ")),e.hidden===!1&&(e.hidden=void 0,delete e.hidden),e.disabled===!1&&(e.disabled=void 0,delete e.disabled),e}function ve(t,e){return{[Ft()]:r=>N(t)?(t.current=r,L(()=>e==null?void 0:e(r)),()=>{"isConnected"in r&&r.isConnected||(t.current=null,e==null||e(null))}):(t(r),L(()=>e==null?void 0:e(r)),()=>{"isConnected"in r&&r.isConnected||(t(null),e==null||e(null))})}}function Ve(t){return t?"true":"false"}function Be(t){return t?"":void 0}function Ce(t){return t?"open":"closed"}var x,T;class ye{constructor(e){O(this,x);O(this,T);I(this,"attrs");F(this,x,e.getVariant?e.getVariant():null),F(this,T,w(this,x)?`data-${w(this,x)}-`:`data-${e.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(r=>[r,this.getAttr(r)]))}getAttr(e,r){return r?`data-${r}-${e}`:`${w(this,T)}${e}`}selector(e,r){return`[${this.getAttr(e,r)}]`}}x=new WeakMap,T=new WeakMap;function ge(t){const e=new ye(t);return{...e.attrs,selector:e.selector,getAttr:e.getAttr}}function Ee(t,e){return`bits-${t}`}const we=ge({component:"label",parts:["root"]});var k;const Q=class Q{constructor(e){I(this,"opts");I(this,"attachment");O(this,k,M(()=>({id:this.opts.id.current,[we.root]:"",onmousedown:this.onmousedown,...this.attachment})));this.opts=e,this.attachment=ve(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}static create(e){return new Q(e)}onmousedown(e){e.detail>1&&e.preventDefault()}get props(){return A(w(this,k))}set props(e){ft(w(this,k),e)}};k=new WeakMap;let D=Q;var xe=q("<label><!></label>");function Ae(t,e){const r=Tt();z(e,!0);let n=g(e,"id",19,()=>Ee(r)),o=g(e,"ref",15,null),i=J(e,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const a=D.create({id:X(()=>n()),ref:X(()=>o(),f=>o(f))}),u=M(()=>he(i,a.props,{for:e.for}));var d=P(),p=j(d);{var m=f=>{var l=P(),c=j(l);rt(c,()=>e.child,()=>({props:A(u)})),E(f,l)},b=f=>{var l=xe();C(l,()=>({...A(u),for:e.for}));var c=kt(l);rt(c,()=>e.children??It),Ot(l),E(f,l)};dt(p,f=>{e.child?f(m):f(b,!1)})}E(t,d),K()}var Se=q("<input/>"),_e=q("<input/>");function Ge(t,e){z(e,!0);let r=g(e,"ref",15,null),n=g(e,"value",15),o=g(e,"files",15),i=g(e,"data-slot",3,"input"),a=J(e,["$$slots","$$events","$$legacy","ref","value","type","files","class","data-slot"]);var u=P(),d=j(u);{var p=b=>{var f=Se();C(f,l=>({"data-slot":i(),class:l,type:"file",...a}),[()=>G("selection:bg-primary dark:bg-input/30 selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e.class)],void 0,void 0,void 0,!0),nt(f,l=>r(l),()=>r()),Ht(f,o),ot(f,n),E(b,f)},m=b=>{var f=_e();C(f,l=>({"data-slot":i(),class:l,type:e.type,...a}),[()=>G("border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e.class)],void 0,void 0,void 0,!0),nt(f,l=>r(l),()=>r()),ot(f,n),E(b,f)};dt(d,b=>{e.type==="file"?b(p):b(m,!1)})}E(t,u),K()}function Ue(t,e){z(e,!0);let r=g(e,"ref",15,null),n=J(e,["$$slots","$$events","$$legacy","ref","class"]);var o=P(),i=j(o);{let a=M(()=>G("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e.class));Lt(i,()=>Ae,(u,d)=>{d(u,Rt({"data-slot":"label",get class(){return A(a)}},()=>n,{get ref(){return r()},set ref(p){r(p)}}))})}E(t,o),K()}function Te(t){const e=JSON.parse(t);return e.data&&(e.data=Mt(e.data,Nt.decoders)),e}function B(t){return HTMLElement.prototype.cloneNode.call(t)}function Xe(t,e=()=>{}){const r=async({action:o,result:i,reset:a=!0,invalidateAll:u=!0})=>{i.type==="success"&&(a&&HTMLFormElement.prototype.reset.call(t),u&&await Pt()),(location.origin+location.pathname===o.origin+o.pathname||i.type==="redirect"||i.type==="error")&&await jt(i)};async function n(o){var c,s,v;if(((c=o.submitter)!=null&&c.hasAttribute("formmethod")?o.submitter.formMethod:B(t).method)!=="post")return;o.preventDefault();const a=new URL((s=o.submitter)!=null&&s.hasAttribute("formaction")?o.submitter.formAction:B(t).action),u=(v=o.submitter)!=null&&v.hasAttribute("formenctype")?o.submitter.formEnctype:B(t).enctype,d=new FormData(t,o.submitter),p=new AbortController;let m=!1;const f=await e({action:a,cancel:()=>m=!0,controller:p,formData:d,formElement:t,submitter:o.submitter})??r;if(m)return;let l;try{const h=new Headers({accept:"application/json","x-sveltekit-action":"true"});u!=="multipart/form-data"&&h.set("Content-Type",/^(:?application\/x-www-form-urlencoded|text\/plain)$/.test(u)?u:"application/x-www-form-urlencoded");const bt=u==="multipart/form-data"?d:new URLSearchParams(d),$=await fetch(a,{method:"POST",headers:h,cache:"no-store",body:bt,signal:p.signal});l=Te(await $.text()),l.type==="error"&&(l.status=$.status)}catch(h){if((h==null?void 0:h.name)==="AbortError")return;l={type:"error",error:h}}await f({action:a,formData:d,formElement:t,update:h=>r({action:a,result:l,reset:h==null?void 0:h.reset,invalidateAll:h==null?void 0:h.invalidateAll}),result:l})}return HTMLFormElement.prototype.addEventListener.call(t,"submit",n),{destroy(){HTMLFormElement.prototype.removeEventListener.call(t,"submit",n)}}}export{_ as B,Ge as I,Ue as L,Ne as a,Fe as b,ve as c,R as d,Xe as e,de as f,X as g,Ee as h,Z as i,He as j,N as k,pt as l,he as m,Vt as n,Ce as o,Be as p,ge as q,ce as r,Ct as s,We as t,Ve as u,Gt as v};