PageSourceSearch

https://www.sway.co/_next/static/chunks/3guc8ukcmaku8.js

js sway.co collected 2026-09-26 00:13:22 UTC 24,855 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0dab6-9a04-0000-6d14-c52692d55e20";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="7178181b-6420-5fd4-812a-7efe1f9c0bdd")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,315333,e=>{e.v({card:"BallotPartyInviteCard-module__C2vQUq__card",cta:"BallotPartyInviteCard-module__C2vQUq__cta",ctaCopy:"BallotPartyInviteCard-module__C2vQUq__ctaCopy",ctaHeading:"BallotPartyInviteCard-module__C2vQUq__ctaHeading",ctaUrl:"BallotPartyInviteCard-module__C2vQUq__ctaUrl",detailBody:"BallotPartyInviteCard-module__C2vQUq__detailBody",detailLabel:"BallotPartyInviteCard-module__C2vQUq__detailLabel",detailLink:"BallotPartyInviteCard-module__C2vQUq__detailLink",detailRow:"BallotPartyInviteCard-module__C2vQUq__detailRow",detailValue:"BallotPartyInviteCard-module__C2vQUq__detailValue",details:"BallotPartyInviteCard-module__C2vQUq__details",footer:"BallotPartyInviteCard-module__C2vQUq__footer",headline:"BallotPartyInviteCard-module__C2vQUq__headline",host:"BallotPartyInviteCard-module__C2vQUq__host",hostBanner:"BallotPartyInviteCard-module__C2vQUq__hostBanner",hostLedBy:"BallotPartyInviteCard-module__C2vQUq__hostLedBy",orb:"BallotPartyInviteCard-module__C2vQUq__orb",qr:"BallotPartyInviteCard-module__C2vQUq__qr",subheadline:"BallotPartyInviteCard-module__C2vQUq__subheadline",wordmark:"BallotPartyInviteCard-module__C2vQUq__wordmark"})},190458,e=>{e.v({editable:"BallotPartyInviteField-module__bKtgXq__editable",input:"BallotPartyInviteField-module__bKtgXq__input",placeholder:"BallotPartyInviteField-module__bKtgXq__placeholder"})},884685,e=>{e.v({actionIcon:"BallotPartyInvitePageContent-module__uuuVdq__actionIcon",applicationLink:"BallotPartyInvitePageContent-module__uuuVdq__applicationLink",cardClose:"BallotPartyInvitePageContent-module__uuuVdq__cardClose",cardFrame:"BallotPartyInvitePageContent-module__uuuVdq__cardFrame",exportCard:"BallotPartyInvitePageContent-module__uuuVdq__exportCard",saveStatus:"BallotPartyInvitePageContent-module__uuuVdq__saveStatus",share:"BallotPartyInvitePageContent-module__uuuVdq__share",shareCopy:"BallotPartyInvitePageContent-module__uuuVdq__shareCopy",sharing:"BallotPartyInvitePageContent-module__uuuVdq__sharing",sharingCopy:"BallotPartyInvitePageContent-module__uuuVdq__sharingCopy"})},908277,e=>{"use strict";let t;var a=e.i(497965),l=e.i(736952),n=e.i(439291),r=e.i(53259),i=e.i(416694),o=e.i(202557),s=e.i(823944),d=e.i(444674),c=e.i(398986),u=e.i(934766),h=e.i(577764),m=e.i(293526),f=e.i(437866);let g=(t=0,()=>(t+=1,`u${`0000${(1679616*Math.random()|0).toString(36)}`.slice(-4)}${t}`));function p(e){let t=[];for(let a=0,l=e.length;a<l;a++)t.push(e[a]);return t}let y=null;function _(e={}){return y||(y=e.includeStyleProperties?e.includeStyleProperties:p(window.getComputedStyle(document.documentElement)))}function v(e,t){let a=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return a?parseFloat(a.replace("px","")):0}function w(e,t={}){let a,l,n,r;return{width:t.width||(a=v(e,"border-left-width"),l=v(e,"border-right-width"),e.clientWidth+a+l),height:t.height||(n=v(e,"border-top-width"),r=v(e,"border-bottom-width"),e.clientHeight+n+r)}}function x(e){return new Promise((t,a)=>{let l=new Image;l.onload=()=>{l.decode().then(()=>{requestAnimationFrame(()=>t(l))})},l.onerror=a,l.crossOrigin="anonymous",l.decoding="async",l.src=e})}async function b(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function C(e,t,a){let l="http://www.w3.org/2000/svg",n=document.createElementNS(l,"svg"),r=document.createElementNS(l,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${a}`),n.setAttribute("viewBox",`0 0 ${t} ${a}`),r.setAttribute("width","100%"),r.setAttribute("height","100%"),r.setAttribute("x","0"),r.setAttribute("y","0"),r.setAttribute("externalResourcesRequired","true"),n.appendChild(r),r.appendChild(e),b(n)}let P=(e,t)=>{if(e instanceof t)return!0;let a=Object.getPrototypeOf(e);return null!==a&&(a.constructor.name===t.name||P(a,t))};function S(e,t,a,l){let n,r,i,o=window.getComputedStyle(e,a),s=o.getPropertyValue("content");
1if(""===s||"none"===s)return;let d=g();try{t.className=`${t.className} ${d}`}catch(e){return}let c=document.createElement("style");c.appendChild((n=`.${d}:${a}`,i=o.cssText?(r=o.getPropertyValue("content"),`${o.cssText} content: '${r.replace(/'|"/g,"")}';`):_(l).map(e=>{let t=o.getPropertyValue(e),a=o.getPropertyPriority(e);return`${e}: ${t}${a?" !important":""};`}).join(" "),document.createTextNode(`${n}{${i}}`))),t.appendChild(c)}let B="application/font-woff",T="image/jpeg",I={woff:B,woff2:B,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:T,jpeg:T,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function N(e){let t;return I[((t=/\.([^./]*?)$/g.exec(e))?t[1]:"").toLowerCase()]||""}function j(e){return -1!==e.search(/^(data:)/)}function L(e,t){return`data:${t};base64,${e}`}async function k(e,t,a){let l=await fetch(e,t);if(404===l.status)throw Error(`Resource "${l.url}" not found`);let n=await l.blob();return new Promise((e,t)=>{let r=new FileReader;r.onerror=t,r.onloadend=()=>{try{e(a({res:l,result:r.result}))}catch(e){t(e)}},r.readAsDataURL(n)})}let E={};async function R(e,t,a){var l,n,r;let i,o,s=(l=e,n=t,r=a.includeQueryParams,o=l.replace(/\?.*/,""),r&&(o=l),/ttf|otf|eot|woff2?/i.test(o)&&(o=o.replace(/.*\//,"")),n?`[${n}]${o}`:o);if(null!=E[s])return E[s];a.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());try{let l=await k(e,a.fetchRequestInit,({res:e,result:a})=>(t||(t=e.headers.get("Content-Type")||""),a.split(/,/)[1]));i=L(l,t)}catch(l){i=a.imagePlaceholder||"";let t=`Failed to fetch resource: ${e}`;l&&(t="string"==typeof l?l:l.message),t&&console.warn(t)}return E[s]=i,i}async function q(e){let t=e.toDataURL();return"data:,"===t?e.cloneNode(!1):x(t)}async function A(e,t){if(e.currentSrc){let t=document.createElement("canvas"),a=t.getContext("2d");return t.width=e.clientWidth,t.height=e.clientHeight,null==a||a.drawImage(e,0,0,t.width,t.height),x(t.toDataURL())}let a=e.poster,l=N(a);return x(await R(a,l,t))}async function $(e,t){var a;try{if(null==(a=null==e?void 0:e.contentDocument)?void 0:a.body)return await D(e.contentDocument.body,t,!0)}catch(e){}return e.cloneNode(!1)}async function U(e,t){return P(e,HTMLCanvasElement)?q(e):P(e,HTMLVideoElement)?A(e,t):P(e,HTMLIFrameElement)?$(e,t):e.cloneNode(V(e))}let V=e=>null!=e.tagName&&"SVG"===e.tagName.toUpperCase();async function H(e,t,a){var l,n;if(V(t))return t;let r=[];return 0===(r=null!=e.tagName&&"SLOT"===e.tagName.toUpperCase()&&e.assignedNodes?p(e.assignedNodes()):P(e,HTMLIFrameElement)&&(null==(l=e.contentDocument)?void 0:l.body)?p(e.contentDocument.body.childNodes):p((null!=(n=e.shadowRoot)?n:e).childNodes)).length||P(e,HTMLVideoElement)||await r.reduce((e,l)=>e.then(()=>D(l,a)).then(e=>{e&&t.appendChild(e)}),Promise.resolve()),t}async function F(e,t){let a=e.querySelectorAll?e.querySelectorAll("use"):[];if(0===a.length)return e;let l={};for(let n=0;n<a.length;n++){let r=a[n].getAttribute("xlink:href");if(r){let a=e.querySelector(r),n=document.querySelector(r);a||!n||l[r]||(l[r]=await D(n,t,!0))}}let n=Object.values(l);if(n.length){let t="http://www.w3.org/1999/xhtml",a=document.createElementNS(t,"svg");a.setAttribute("xmlns",t),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";let l=document.createElementNS(t,"defs");a.appendChild(l);for(let e=0;e<n.length;e++)l.appendChild(n[e]);e.appendChild(a)}return e}async function D(e,t,a){return a||!t.filter||t.filter(e)?Promise.resolve(e).then(e=>U(e,t)).then(a=>H(e,a,t)).then(a=>(function(e,t,a){if(P(t,Element)&&(!function(e,t,a){let l=t.style;if(!l)return;let n=window.getComputedStyle(e);n.cssText?(l.cssText=n.cssText,l.transformOrigin=n.transformOrigin):_(a).forEach(a=>{let r=n.getPropertyValue(a);if("font-size"===a&&r.endsWith("px")){let e=Math.floor(parseFloat(r.substring(0,r.length-2)))-.1;r=`${e}px`}P(e,HTMLIFrameElement)&&"display"===a&&"inline"===r&&(r="block"),"d"===a&&t.getAttribute("d")&&(r=`path(${t.getAttribute("d")})`),l.setProperty(a,r,n.getPropertyPriority(a))})}(e,t,a),S(e,t,":before",a),S(e,t,":after",a),P(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),P(e,HTMLInputElement)&&t.setAttribute("value",e.value),P(e,HTMLSelectElement))){let a=Array.from(t.children).find(t=>e.value===t.getAttribute("value"));a&&a.setAttribute("selected","")}return t})(e,a,t)).then(e=>F(e,t)):null}let O=/url\((['"]?)([^'"]+?)\1\)/g,Q=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,M=/src:\s
1*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;async function z(e,t,a,l,n){try{let r,i,o=a?function(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let a=document.implementation.createHTMLDocument(),l=a.createElement("base"),n=a.createElement("a");return a.head.appendChild(l),a.body.appendChild(n),t&&(l.href=t),n.href=e,n.href}(t,a):t,s=N(t);if(n){let e=await n(o);r=L(e,s)}else r=await R(o,s,l);return e.replace((i=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1"),RegExp(`(url\\(['"]?)(${i})(['"]?\\))`,"g")),`$1${r}$3`)}catch(e){}return e}function W(e){return -1!==e.search(O)}async function K(e,t,a){let l;if(!W(e))return e;let n=function(e,{preferredFontFormat:t}){return t?e.replace(M,e=>{for(;;){let[a,,l]=Q.exec(e)||[];if(!l)return"";if(l===t)return`src: ${a};`}}):e}(e,a);return(l=[],n.replace(O,(e,t,a)=>(l.push(a),e)),l.filter(e=>!j(e))).reduce((e,l)=>e.then(e=>z(e,l,t,a)),Promise.resolve(n))}async function G(e,t,a){var l;let n=null==(l=t.style)?void 0:l.getPropertyValue(e);if(n){let l=await K(n,null,a);return t.style.setProperty(e,l,t.style.getPropertyPriority(e)),!0}return!1}async function X(e,t){await G("background",e,t)||await G("background-image",e,t),await G("mask",e,t)||await G("-webkit-mask",e,t)||await G("mask-image",e,t)||await G("-webkit-mask-image",e,t)}async function Y(e,t){let a=P(e,HTMLImageElement);if(!(a&&!j(e.src))&&!(P(e,SVGImageElement)&&!j(e.href.baseVal)))return;let l=a?e.src:e.href.baseVal,n=await R(l,N(l),t);await new Promise((l,r)=>{e.onload=l,e.onerror=t.onImageErrorHandler?(...e)=>{try{l(t.onImageErrorHandler(...e))}catch(e){r(e)}}:r,e.decode&&(e.decode=l),"lazy"===e.loading&&(e.loading="eager"),a?(e.srcset="",e.src=n):e.href.baseVal=n})}async function J(e,t){let a=p(e.childNodes).map(e=>Z(e,t));await Promise.all(a).then(()=>e)}async function Z(e,t){P(e,Element)&&(await X(e,t),await Y(e,t),await J(e,t))}let ee={};async function et(e){let t=ee[e];if(null!=t)return t;let a=await fetch(e);return t={url:e,cssText:await a.text()},ee[e]=t,t}async function ea(e,t){let a=e.cssText,l=/url\(["']?([^"')]+)["']?\)/g;return Promise.all((a.match(/url\([^)]+\)/g)||[]).map(async n=>{let r=n.replace(l,"$1");return r.startsWith("https://")||(r=new URL(r,e.url).href),k(r,t.fetchRequestInit,({result:e})=>(a=a.replace(n,`url(${e})`),[n,e]))})).then(()=>a)}function el(e){if(null==e)return[];let t=[],a=e.replace(/(\/\*[\s\S]*?\*\/)/gi,""),l=RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)}
1)","gi");for(;;){let e=l.exec(a);if(null===e)break;t.push(e[0])}a=a.replace(l,"");let n=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,r=RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let e=n.exec(a);if(null===e){if(null===(e=r.exec(a)))break;n.lastIndex=r.lastIndex}else r.lastIndex=n.lastIndex;t.push(e[0])}return t}async function en(e,t){let a=[],l=[];return e.forEach(a=>{if("cssRules"in a)try{p(a.cssRules||[]).forEach((e,n)=>{if(e.type===CSSRule.IMPORT_RULE){let r=n+1,i=e.href,o=et(i).then(e=>ea(e,t)).then(e=>el(e).forEach(e=>{try{a.insertRule(e,e.startsWith("@import")?r+=1:a.cssRules.length)}catch(t){console.error("Error inserting rule from remote css",{rule:e,error:t})}})).catch(e=>{console.error("Error loading remote css",e.toString())});l.push(o)}})}catch(r){let n=e.find(e=>null==e.href)||document.styleSheets[0];null!=a.href&&l.push(et(a.href).then(e=>ea(e,t)).then(e=>el(e).forEach(e=>{n.insertRule(e,n.cssRules.length)})).catch(e=>{console.error("Error loading remote stylesheet",e)})),console.error("Error inlining remote css file",r)}}),Promise.all(l).then(()=>(e.forEach(e=>{if("cssRules"in e)try{p(e.cssRules||[]).forEach(e=>{a.push(e)})}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}}),a))}async function er(e,t){if(null==e.ownerDocument)throw Error("Provided element is not within a Document");let a=p(e.ownerDocument.styleSheets);return(await en(a,t)).filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>W(e.style.getPropertyValue("src")))}function ei(e){return e.trim().replace(/["']/g,"")}async function eo(e,t){let a,l=await er(e,t),n=(a=new Set,!function e(t){(t.style.fontFamily||getComputedStyle(t).fontFamily).split(",").forEach(e=>{a.add(ei(e))}),Array.from(t.children).forEach(t=>{t instanceof HTMLElement&&e(t)}
1)}(e),a);return(await Promise.all(l.filter(e=>n.has(ei(e.style.fontFamily))).map(e=>{let a=e.parentStyleSheet?e.parentStyleSheet.href:null;return K(e.cssText,a,t)}))).join("\n")}async function es(e,t){let a=null!=t.fontEmbedCSS?t.fontEmbedCSS:t.skipFonts?null:await eo(e,t);if(a){let t=document.createElement("style"),l=document.createTextNode(a);t.appendChild(l),e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}}async function ed(e,t={}){let{width:a,height:l}=w(e,t),n=await D(e,t,!0);return await es(n,t),await Z(n,t),!function(e,t){let{style:a}=e;t.backgroundColor&&(a.backgroundColor=t.backgroundColor),t.width&&(a.width=`${t.width}px`),t.height&&(a.height=`${t.height}px`);let l=t.style;null!=l&&Object.keys(l).forEach(e=>{a[e]=l[e]})}(n,t),await C(n,a,l)}async function ec(e,t={}){let{width:a,height:l}=w(e,t),n=await ed(e,t),r=await x(n),i=document.createElement("canvas"),o=i.getContext("2d"),s=t.pixelRatio||function(){let e,t;try{t=f.default}catch(e){}let a=t&&t.env?t.env.devicePixelRatio:null;return a&&Number.isNaN(e=parseInt(a,10))&&(e=1),e||window.devicePixelRatio||1}(),d=t.canvasWidth||a,c=t.canvasHeight||l;return i.width=d*s,i.height=c*s,!t.skipAutoScale&&(i.width>16384||i.height>16384)&&(i.width>16384&&i.height>16384?i.width>i.height?(i.height*=16384/i.width,i.width=16384):(i.width*=16384/i.height,i.height=16384):i.width>16384?(i.height*=16384/i.width,i.width=16384):(i.width*=16384/i.height,i.height=16384)),i.style.width=`${d}`,i.style.height=`${c}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,i.width,i.height)),o.drawImage(r,0,0,i.width,i.height),i}async function eu(e,t={}){let a=await ec(e,t);return await function(e,t={}){return new Promise(e.toBlob?a=>{e.toBlob(a,t.type?t.type:"image/png",t.quality?t.quality:1)}:a=>{let l=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=l.length,r=new Uint8Array(n);for(let e=0;e<n;e+=1)r[e]=l.charCodeAt(e);a(new Blob([r],{type:t.type?t.type:"image/png"}))})}(a)}var eh=e.i(824066),em=e.i(496887),ef=e.i(272742),eg=e.i(1564),ep=e.i(527794),ey=e.i(360899),e_=e.i(772102),ev=e.i(190458),ev=ev;let ew=(e,t)=>{let a=window.getSelection()?.toString().length??0;return t-(e.textContent??"").length+a},ex=({field:e,value:t,fallback:l,canEdit:r,onSave:i,editLabel:o,emptyLabel:s,children:d})=>{let[c,u]=(0,em.useState)(!1),h=(0,em.useRef)(""),m=(0,e_.displayedInviteField)(t,l),f=e_.INVITE_FIELD_MAX_LENGTH[e],g=(0,em.useCallback)(()=>{h.current=m,u(!0)},[m]),p=(0,em.useCallback)(a=>{u(!1);let n=(0,e_.normalizeInviteField)(a,e)??"",r=n===l?null:n;r!==t&&i(r)},[l,e,i,t]),y=(0,em.useCallback)(e=>{if(e){let t,a;e.innerText=h.current,e.focus(),(t=document.createRange()).selectNodeContents(e),t.collapse(!1),a=window.getSelection(),a?.removeAllRanges(),a?.addRange(t)}
1},[]);return r?c?(0,a.jsx)(n.Box,{component:"span",role:"textbox","aria-label":o,tabIndex:0,className:ev.default.input,contentEditable:"plaintext-only",suppressContentEditableWarning:!0,ref:y,onBeforeInput:e=>{let t=e.data;t&&t.length>ew(e.currentTarget,f)&&e.preventDefault()},onPaste:e=>{e.preventDefault();let t=ew(e.currentTarget,f),a=e.clipboardData.getData("text/plain").slice(0,t);a&&document.execCommand("insertText",!1,a)},onBlur:e=>p(e.currentTarget.innerText),onKeyDown:e=>{"Escape"===e.key&&(e.preventDefault(),u(!1)),"Enter"===e.key&&(e.preventDefault(),e.currentTarget.blur())}},"editing"):(0,a.jsx)(n.Box,{component:"span",role:"button","aria-label":o,tabIndex:0,className:ev.default.editable,onClick:g,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),g())},children:""===m?(0,a.jsx)(n.Box,{component:"span",className:ev.default.placeholder,children:s}):d(m)},"idle"):""===m?null:(0,a.jsx)(a.Fragment,{children:d(m)})};var eb=e.i(937737),eC=e.i(745913),eP=e.i(866382),eS=e.i(41253),eB=e.i(315333),eB=eB;eg.default.extend(ep.default);let eT=({invite:e,group:t,canEdit:l,inviteUrl:r,onSave:i,ownsApplication:s,groupHref:u,ref:h})=>{let m=(0,eh.useTranslations)("BallotPartyInvite"),f=(0,eh.useFormatter)(),g=e.plannedDate?eg.default.utc(`${e.plannedDate}T${e.plannedStartTime??"00:00:00"}`):null,p=g?f.dateTime(g.toDate(),{timeZone:"UTC",weekday:"long",month:"long",day:"numeric",...e.plannedStartTime?{hour:"numeric",minute:"2-digit"}:{}}):m("dateComingSoon"),y=""!==(0,e_.displayedInviteField)(e.location,e.defaultLocation);return(0,a.jsxs)(n.Box,{ref:h,className:eB.default.card,children:[(0,a.jsx)(n.Box,{"aria-hidden":!0,className:eB.default.orb}),(l||""!==(0,e_.displayedInviteField)(e.headline,m("defaultHeadline")))&&(0,a.jsx)(c.Title,{order:2,className:eB.default.headline,children:(0,a.jsx)(ex,{field:"headline",value:e.headline,fallback:m("defaultHeadline"),canEdit:l,editLabel:m("headlineLabel"),emptyLabel:m("headlinePlaceholder"),onSave:e=>i({headline:e}),children:e=>e})}),(l||""!==(0,e_.displayedInviteField)(e.subheadline,m("defaultSubheadline")))&&(0,a.jsx)(d.Text,{variant:"body",className:eB.default.subheadline,children:(0,a.jsx)(ex,{field:"subheadline",value:e.subheadline,fallback:m("defaultSubheadline"),canEdit:l,editLabel:m("subheadlineLabel"),emptyLabel:m("subheadlinePlaceholder"),onSave:e=>i({subheadline:e}),children:e=>e})}),(0,a.jsxs)(o.Stack,{gap:"lg",className:eB.default.details,children:[(0,a.jsx)(eI,{label:m("hostedByLabel"),children:(0,a.jsxs)(n.Box,{className:eB.default.host,children:[t.headerImageUrl?(0,a.jsx)(ef.Image,{alt:"",src:t.headerImageUrl,className:eB.default.hostBanner}):null,(0,a.jsxs)(n.Box,{children:[u?(0,a.jsx)(d.Text,{component:eC.Link,href:u,variant:"body",classNames:{root:eB.default.detailLink},children:t.title}):(0,a.jsx)(d.Text,{variant:"body",className:eB.default.detailValue,children:t.title}),t.leadLeaderName?(0,a.jsx)(d.Text,{variant:"body-sm",className:eB.default.hostLedBy,children:m("ledBy",{name:t.leadLeaderName})}):null]})]})}),(0,a.jsx)(eI,{label:m("whenLabel"),children:s?(0,a.jsx)(d.Text,{component:eC.Link,href:eP.BALLOT_PARTY_APPLICATION_PATH,variant:"body",classNames:{root:eB.default.detailLink},children:p}):(0,a.jsx)(d.Text,{variant:"body",className:eB.default.detailValue,children:p})}),l||y?(0,a.jsx)(eI,{label:m("whereLabel"),children:(0,a.jsx)(d.Text,{variant:"body",className:eB.default.detailValue,children:(0,a.jsx)(ex,{field:"location",value:e.location,fallback:e.defaultLocation,canEdit:l,editLabel:m("locationLabel"),emptyLabel:m("locationPlaceholder"),onSave:e=>i({location:e}),children:e=>e})})}):null]}),(0,a.jsxs)(n.Box,{className:eB.default.cta,children:[(0,a.jsxs)(n.Box,{className:eB.default.ctaCopy,children:[(0,a.jsx)(c.Title,{order:4,className:eB.default.ctaHeading,children:u?(0,a.jsx)(d.Text,{component:eC.Link,href:u,inherit:!0,classNames:{root:eB.default.detailLink},children:m("joinBeforehand")}):m("joinBeforehand")}),(0,a.jsx)(d.Text,{variant:"body-sm",className:eB.default.ctaUrl,children:r})]}),(0,a.jsx)(n.Box,{className:eB.default.qr,children:r?(0,a.jsx)(ey.QRCodeSVG,{value:r,size:150,level:"H",marginSize:2,"aria-label":m("qrLabel"),imageSettings:(0,eS.swayQrLogoSettings)(150)}):null})]}),(0,a.jsx)(n.Box,{className:eB.default.footer,children:(0,a.jsx)(eb.SwayWordmark,{width:104,className:eB.default.wordmark})})]})},eI=({label:e,children:t})=>(0,a.jsxs)(n.Box,{className:eB.default.detailRow,children:[(0,a.jsx)(d.Text,{variant:"label",className:eB.default.detailLabel,children:e}),(0,a.jsx)(n.Box,{className:eB.default.detailBody,children:t})]});var eN=e.i(837063),ej=e.i(331107),eL=e.i(193540),ek=e.i(923093),eE=e.i(809850),eR=e.i(792056),eq=e.i(50899),eA=e.i(884685),eA=eA;let e$=()=>void 0;e.s(["BallotPartyInvitePageContent",0,({invite:e,group:t,canEdit:f,invitePath:g,groupHref:p,ownsApplication:y})=>{let _=(0,eh.useTranslations)("BallotPartyInvite"),v=(0,eE.useLogger)(),[w,x]=(0,em.useState)(e),[b,C]=(0,em.useState)(0),[P,S]=(0,em.useState)([]),B=b>0?"saving":P.length>0?"failed":"saved",T=(0,u.useMounted)(),{currentProfileSlug:I}=(0,eL.useAuth)(),N=(0,em.useMemo)(()=>
1{if(!T)return null;let e=new URL(g,window.location.origin);return I&&e.searchParams.set("ref",I),e.href},[T,g,I]),j=(0,em.useRef)(null),L=(0,em.useMemo)(()=>({getBlob:async()=>{let e=j.current;if(!e)throw Error("Invite card is not mounted");let t=await eu(e,{pixelRatio:2,cacheBust:!0});if(!t)throw Error("Invite card did not rasterize");return t},fileName:_("imageFileName"),ready:T}),[T,_]),{copied:k,saved:E,copyImage:R,saveImage:q}=(0,ek.useShareImageActions)({source:L,shareTitle:_("pageTitle"),shareUrl:N??g}),A=(0,em.useRef)(0),$=(0,em.useRef)(Promise.resolve()),U=(0,em.useRef)(w);U.current=w;let{applicationId:V}=e,H=(0,em.useCallback)(e=>{let t=++A.current,a=U.current,l=Object.keys(e),n=()=>{S(e=>[...new Set([...e,...l])]),A.current===t&&x(a)};x(t=>({...t,...e})),C(e=>e+1);let r=$.current.then(async()=>{try{let t=await fetch("/api/ballot-party/invite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({applicationId:V,...e})});t.ok?S(e=>e.filter(e=>!l.includes(e))):(n(),v.error("Ballot party invite save rejected",{status:t.status}))}catch(e){n(),v.error("Ballot party invite save failed",{error:e})}finally{C(e=>e-1)}});return $.current=r,r},[V,v]);return(0,a.jsxs)(o.Stack,{gap:"lg",px:eR.SECTION_PX,pt:"md",pb:"xl",children:[y?(0,a.jsx)(l.Anchor,{component:eC.Link,href:eP.BALLOT_PARTY_APPLICATION_PATH,className:eA.default.applicationLink,children:_("applicationLink")}):null,f?(0,a.jsxs)(n.Box,{className:eA.default.sharing,children:[(0,a.jsxs)(n.Box,{className:eA.default.sharingCopy,children:[(0,a.jsx)(c.Title,{order:5,children:w.isShareable?_("sharingOnTitle"):_("sharingOffTitle")}),(0,a.jsx)(d.Text,{variant:"body-sm",children:w.isShareable?_("sharingOnBody"):_("sharingOffBody")})]}),(0,a.jsx)(s.Switch,{checked:w.isShareable,"aria-label":_("sharingToggleLabel"),onChange:e=>{let t=e.currentTarget.checked;(0,eq.trackButtonClick)(t?"ballot_party_invite_sharing_on":"ballot_party_invite_sharing_off"),H({isShareable:t})}})]}):null,f?(0,a.jsx)(d.Text,{variant:"body-sm",role:"status","aria-live":"polite",className:eA.default.saveStatus,mod:{state:B},children:_(`saveStatus.${B}`)}):null,(0,a.jsxs)(n.Box,{className:eA.default.cardFrame,children:[p?(0,a.jsx)(r.CloseButton,{component:eC.Link,href:p,size:"lg","aria-label":_("closeToGroup"),classNames:{root:eA.default.cardClose}}):null,(0,a.jsx)(eT,{invite:w,group:t,canEdit:f,inviteUrl:N,onSave:H,ownsApplication:y,groupHref:p}),(0,a.jsx)(n.Box,{"aria-hidden":!0,inert:!0,className:eA.default.exportCard,children:(0,a.jsx)(eT,{ref:j,invite:w,group:t,canEdit:!1,inviteUrl:N,onSave:e$,ownsApplication:!1,groupHref:p})})]}),(0,a.jsxs)(n.Box,{className:eA.default.share,children:[(0,a.jsxs)(n.Box,{className:eA.default.shareCopy,children:[(0,a.jsx)(c.Title,{order:5,children:_("shareHeading")}),I?(0,a.jsx)(d.Text,{variant:"body-sm",children:_("shareBody")}):null]}),(0,a.jsxs)(i.Group,{gap:"sm",grow:!0,wrap:"nowrap",children:[(0,a.jsx)(ej.TrackedButton,{variant:"default",leftSection:(0,a.jsx)(m.default,{className:eA.default.actionIcon}),onClick:q,trackingName:"ballot_party_invite_image_download_click",children:E?_("imageSaved"):_("downloadImage")}),(0,a.jsx)(ej.TrackedButton,{variant:"default",leftSection:(0,a.jsx)(h.default,{className:eA.default.actionIcon}),onClick:R,trackingName:"ballot_party_invite_image_copy_click",children:k?_("imageCopied"):_("copyImage")})]}),N?(0,a.jsx)(eN.ShareLinkBar,{url:N,isPersonal:!!I,trackingName:"ballot_party_invite_link_copy_click"}):null]})]})}],908277)}]);
2
3//# chunkId=7178181b-6420-5fd4-812a-7efe1f9c0bdd

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.