PageSourceSearch

https://www.profilepicture.ai/_nuxt/CmkwANY3.js

js profilepicture.ai collected 2026-10-05 12:26:13 UTC 101,182 bytes, 2 lines download raw bytes

1import{$ as e,B as t,Ct as n,D as r,E as i,Et as a,Gt as o,H as s,Ht as c,I as l,L as u,N as d,O as f,P as p,Q as m,R as h,St as g,T as _,Tt as v,Ut as y,Wt as b,X as ee,Y as te,_t as x,at as S,b as C,bt as ne,it as re,k as w,mt as T,nt as E,o as D,ot as ie,rt as O,st as k,tt as A,xt as j}from"./BdCKBD-2.js";import{o as M}from"./Vn4Q_l-v.js";import{A as ae}from"./B5RIHkGm.js";import{n as oe}from"./m3WH8o5P.js";import{a as se,c as ce,o as le,s as ue,t as N}from"#entry";import{t as de}from"./CuiBzZie.js";import{t as fe}from"./DTlL73_O.js";import{t as pe}from"./CNs_Ozdc.js";import{n as P,r as me,t as he}from"./DkzIbqK5.js";import{a as ge,i as _e,n as F,r as ve,t as I}from"./QVHyQUQ3.js";import{a as ye,r as be}from"./CPyKf9wd.js";import{n as xe,r as Se,t as Ce}from"./DGaK30mK.js";function we(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}function L(n,r){let i=typeof n==`string`&&!r?`${n}Context`:r,a=Symbol(i);return[e=>{let r=t(a,e);if(r||r===null)return r;throw Error(`Injection \`${a.toString()}\` not found. Component must be used within ${Array.isArray(n)?`one of the following components: ${n.join(`, `)}`:`\`${n}\``}`)},t=>(e(a,t),t)]}var[Te,Ee]=L(`ConfigProvider`);function De(e){let t=Te({dir:x(`ltr`)});return _(()=>e?.value||t.dir?.value||`ltr`)}function Oe(e){let t=u(),n=t?.type.emits,r={};return n?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(t=>{r[o(a(t))]=(...n)=>e(t,...n)}),r}function ke(e){return _(()=>!n(e)||!!F(e)?.closest(`form`))}function Ae(e){let t=u(),n=Object.keys(t?.type.props??{}).reduce((e,n)=>{let r=(t?.type.props[n]).default;return r!==void 0&&(e[n]=r),e},{}),r=j(e);return _(()=>{let e={},i=t?.vnode.props??{};
1return Object.keys(i).forEach(t=>{e[a(t)]=i[t]}),Object.keys({...n,...e}).reduce((e,t)=>(r.value[t]!==void 0&&(e[t]=r.value[t]),e),{})})}function je(e,t){let n=Ae(e),r=t?Oe(t):{};return _(()=>({...n.value,...r}))}function Me(e){let t=x(),n=_(()=>t.value?.width??0),r=_(()=>t.value?.height??0),i;return te(()=>{let n=F(e);n?(t.value={width:n.offsetWidth,height:n.offsetHeight},i=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let r=e[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=n.offsetWidth,a=n.offsetHeight;t.value={width:i,height:a}}),i.observe(n,{box:`border-box`})):t.value=void 0}),ee(()=>{i?.disconnect(),i=void 0}),{width:n,height:r}}function R(){let e=x();return{primitiveElement:e,currentElement:_(()=>[`#text`,`#comment`].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:F(e))}}var Ne=`data-reka-collection-item`;function z(n={}){let{key:r=``,isProvider:i=!1}=n,a=`${r}CollectionProvider`,o;if(i){let t=x(new Map);o={collectionRef:x(),itemMap:t},e(a,o)}else o=t(a);let s=(e=!1)=>
1{let t=o.collectionRef.value;if(!t)return[];let n=Array.from(t.querySelectorAll(`[${Ne}]`)),r=new Map(n.map((e,t)=>[e,t])),i=Array.from(o.itemMap.value.values()).sort((e,t)=>(r.get(e.ref)??-1)-(r.get(t.ref)??-1));return e?i:i.filter(e=>e.ref.dataset.disabled!==``)},c=l({name:`CollectionSlot`,inheritAttrs:!1,setup(e,{slots:t,attrs:n}){let{primitiveElement:r,currentElement:i}=R();return S(i,()=>{o.collectionRef.value=i.value}),()=>h(me,{ref:r,...n},t)}}),u=l({name:`CollectionItem`,inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(e,{slots:t,attrs:n}){let{primitiveElement:r,currentElement:i}=R();return ie(t=>{if(i.value){let n=T(i.value);o.itemMap.value.set(n,{ref:i.value,value:e.value}),t(()=>o.itemMap.value.delete(n))}}),()=>h(me,{...n,[Ne]:``,ref:r},t)}});return{getItems:s,reactiveItems:_(()=>Array.from(o.itemMap.value.values())),itemMapSize:_(()=>o.itemMap.value.size),CollectionSlot:c,CollectionItem:u}}var Pe=l({__name:`VisuallyHidden`,props:{feature:{type:String,required:!1,default:`focusable`},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){return(e,t)=>(m(),r(v(P),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature===`focusable`||e.feature===`fully-hidden`?`true`:void 0,"data-hidden":e.feature===`fully-hidden`?``:void 0,tabindex:e.feature===`fully-hidden`?`-1`:void 0,style:{position:`absolute`,border:0,width:`1px`,height:`1px`,padding:0,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,wordWrap:`normal`,top:`-1px`,left:`-1px`}},{default:k(()=>[E(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}}),Fe=l({inheritAttrs:!1,__name:`VisuallyHiddenInputBubble`,props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:`fully-hidden`}},setup(e){let t=e,{primitiveElement:n,currentElement:i}=R(),a=_(()=>t.checked??t.value);return S(a,(e,t)=>{if(!i.value)return;let n=i.value,r=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(r,`value`).set;if(a&&e!==t){let t=new Event(`input`,{bubbles:!0}),r=new Event(`change`,{bubbles:!0});a.call(n,e),n.dispatchEvent(t),n.dispatchEvent(r)}}),(e,i)=>(m(),r(Pe,s({ref_key:`primitiveElement`,ref:n},{...t,...e.$attrs},{as:`input`}),null,16))}}),Ie=l({inheritAttrs:!1,__name:`VisuallyHiddenInput`,props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:`fully-hidden`}},setup(e){let t=e,n=_(()=>typeof t.value==`object`&&Array.isArray(t.value)&&t.value.length===0&&t.required),i=_(()=>typeof t.value==`string`||typeof t.value==`number`||typeof t.value==`boolean`||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value==`object`&&Array.isArray(t.value)?t.value.flatMap((e,n)=>typeof e==`object`?Object.entries(e).map(([e,r])=>({name:`${t.name}[${n}][${e}]`,value:r})):{name:`${t.name}[${n}]`,value:e}):t.value!==null&&typeof t.value==`object`&&!Array.isArray(t.value)?Object.entries(t.value).map(([e,n])=>({name:`${t.name}[${e}]`,value:n})):[]);return(e,a)=>(m(),w(C,null,[f(` We render single input if it's required `),n.value?(m(),r(Fe,s({key:e.name},{...t,...e.$attrs},{name:e.name,value:e.value}),null,16,[`name`,`value`])):(m(!0),w(C,{key:1},A(i.value,n=>(m(),r(Fe,s({key:n.name},{ref_for:!0},{...t,...e.$attrs},{name:n.name,value:n.value}),null,16,[`name`,`value`]))),128))],2112))}});function Le(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function Re(e,t,n){return we(100/(n-t)*(e-t),0,100)}function ze(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function Be(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function Ve(e,t,n){let r=e/2;return(r-B([0,50],[0,r])(t)*n)*n}function He(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Ue(e,t){if(t>0){let n=He(e);return Math.min(...n)>=t}return!0}function B(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function We(e){return(String(e).split(`.`)[1]||``).length}function Ge(e,t){let n=10**t;return Math.round(e*n)/n}var Ke=[`PageUp`,`PageDown`],qe=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Je={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageUp`,`ArrowUp`,`ArrowLeft`]},[Ye,Xe]=L([`SliderVertical`,`SliderHorizontal`]),Ze=l({__name:`SliderHorizontal`,props:{dir:{type:String,required:!1},min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:[`slideEnd`,`slideStart`,`slideMove`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(e,{emit:t}){let n=e,i=t,{max:a,min:o,dir:s,inverted:c}=g(n),{forwardRef:l,currentElement:u}=I(),d=V(),f=x(),p=x(),h=_(()=>s?.value!==`rtl`&&!c.value||s?.value!==`ltr`&&c.value);function b(e,t){let n=p.value||u.value.getBoundingClientRect(),r=[...d.thumbElements.value][d.valueIndexToChangeRef.value],i=d.thumbAlignment.value===`contain`?r.clientWidth:0;!f.value&&!t&&d.thumbAlignment.value===`contain`&&(f.value=e.clientX-r.getBoundingClientRect().left);let s=B([0,n.width-i],h.value?[o.value,a.value]:[a.value,o.value]);return p.value=n,s(t?e.clientX-n.left-i/2:e.clientX-n.left-(f.value??0))}return Xe({startEdge:_(()=>h.value?`left`:`right`),endEdge:_(()=>h.value?`right`:`left`),direction:_(()=>h.value?1:-1),size:`width`}),(e,t)=>(m(),r(tt,{ref:v(l),dir:v(s),"data-orientation":`horizontal`,style:y({"--reka-slider-thumb-transform":!h.value&&v(d).thumbAlignment.value===`overflow`?`translateX(50%)`:`translateX(-50%)`}),onSlideStart:t[0]||=e=>{let t=b(e,!0);i(`slideStart`,t)},onSlideMove:t[1]||=e=>{let t=b(e);i(`slideMove`,t)},onSlideEnd:t[2]||=()=>{p.value=void 0,f.value=void 0,i(`slideEnd`)},onStepKeyDown:t[3]||=e=>{let t=h.value?`from-left`:`from-right`,n=v(Je)[t].includes(e.ke
1y);i(`stepKeyDown`,e,n?-1:1)},onEndKeyDown:t[4]||=e=>i(`endKeyDown`,e),onHomeKeyDown:t[5]||=e=>i(`homeKeyDown`,e)},{default:k(()=>[E(e.$slots,`default`)]),_:3},8,[`dir`,`style`]))}}),Qe=l({__name:`SliderVertical`,props:{min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:[`slideEnd`,`slideStart`,`slideMove`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(e,{emit:t}){let n=e,i=t,{max:a,min:o,inverted:s}=g(n),c=V(),{forwardRef:l,currentElement:u}=I(),d=x(),f=x(),p=_(()=>!s.value);function h(e,t){let n=f.value||u.value.getBoundingClientRect(),r=[...c.thumbElements.value][c.valueIndexToChangeRef.value],i=c.thumbAlignment.value===`contain`?r.clientHeight:0;!d.value&&!t&&c.thumbAlignment.value===`contain`&&(d.value=e.clientY-r.getBoundingClientRect().top);let s=B([0,n.height-i],p.value?[a.value,o.value]:[o.value,a.value]),l=t?e.clientY-n.top-i/2:e.clientY-n.top-(d.value??0);return f.value=n,s(l)}return Xe({startEdge:_(()=>p.value?`bottom`:`top`),endEdge:_(()=>p.value?`top`:`bottom`),direction:_(()=>p.value?1:-1),size:`height`}),(e,t)=>(m(),r(tt,{ref:v(l),"data-orientation":`vertical`,style:y({"--reka-slider-thumb-transform":!p.value&&v(c).thumbAlignment.value===`overflow`?`translateY(-50%)`:`translateY(50%)`}),onSlideStart:t[0]||=e=>{let t=h(e,!0);i(`slideStart`,t)},onSlideMove:t[1]||=e=>{let t=h(e);i(`slideMove`,t)},onSlideEnd:t[2]||=()=>{f.value=void 0,d.value=void 0,i(`slideEnd`)},onStepKeyDown:t[3]||=e=>{let t=p.value?`from-bottom`:`from-top`,n=v(Je)[t].includes(e.key);i(`stepKeyDown`,e,n?-1:1)},onEndKeyDown:t[4]||=e=>i(`endKeyDown`,e),onHomeKeyDown:t[5]||=e=>i(`homeKeyDown`,e)},{default:k(()=>[E(e.$slots,`default`)]),_:3},8,[`style`]))}}),[V,$e]=L(`SliderRoot`),et=l({inheritAttrs:!1,__name:`SliderRoot`,props:{defaultValue:{type:Array,required:!1,default:()=>[0]},modelValue:{type:[Array,null],required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:`horizontal`},dir:{type:String,required:!1},inverted:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},minStepsBetweenThumbs:{type:Number,required:!1,default:0},thumbAlignment:{type:String,required:!1,default:`contain`},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`valueCommit`],setup(e,{emit:t}){let n=e,i=t,{min:a,max:o,step:c,minStepsBetweenThumbs:l,orientation:u,disabled:d,thumbAlignment:p,dir:h}=g(n),y=De(h),{forwardRef:b,currentElement:ee}=I(),te=ke(ee),{CollectionSlot:S}=z({isProvider:!0}),C=_e(n,`modelValue`,i,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),w=_(()=>Array.isArray(C.value)?[...C.value]:[]),T=x(0),D=x(w.value);function ie(e){j(e,Be(w.value,e))}function O(e){j(e,T.value)}function A(){let e=D.value[T.value];w.value[T.value]!==e&&i(`valueCommit`,ne(w.value))}function j(e,t,{commit:n}={commit:!1}){let r=We(c.value),s=we(Ge(Math.round((e-a.value)/c.value)*c.value+a.value,r),a.value,o.value),u=Le(w.value,s,t);if(Ue(u,l.value*c.value)){T.value=u.indexOf(s);let e=String(u)!==String(C.value);e&&n&&i(`valueCommit`,u),e&&(M.value[T.value]?.focus(),C.value=u)}}let M=x([]);return $e({modelValue:C,currentModelValue:w,valueIndexToChangeRef:T,thumbElements:M,orientation:u,min:a,max:o,disabled:d,thumbAlignment:p}),(e,t)=>(m(),r(v(S),null,{default:k(()=>[(m(),r(re(v(u)===`horizontal`?Ze:Qe),s(e.$attrs,{ref:v(b),"as-child":e.asChild,as:e.as,min:v(a),max:v(o),dir:v(y),inverted:e.inverted,"aria-disabled":v(d),"data-disabled":v(d)?``:void 0,onPointerdown:t[0]||=()=>{v(d)||(D.value=w.value)},onSlideStart:t[1]||=e=>!v(d)&&ie(e),onSlideMove:t[2]||=e=>!v(d)&&O(e),onSlideEnd:t[3]||=e=>!v(d)&&A(),onHomeKeyDown:t[4]||=e=>!v(d)&&j(v(a),0,{commit:!0}),onEndKeyDown:t[5]||=e=>!v(d)&&j(v(o),w.value.length-1,{commit:!0}),onStepKeyDown:t[6]||=(e,t)=>{if(!v(d)){let n=v(Ke).includes(e.key)||e.shiftKey&&v(qe).includes(e.key)?10:1,r=T.value,i=w.value[r];j(i+v(c)*n*t,r,{commit:!0})}}}),{default:k(()=>
1[E(e.$slots,`default`,{modelValue:v(C)}),v(te)&&e.name?(m(),r(v(Ie),{key:0,type:`number`,value:v(C),name:e.name,required:e.required,disabled:v(d),step:v(c)},null,8,[`value`,`name`,`required`,`disabled`,`step`])):f(`v-if`,!0)]),_:3},16,[`as-child`,`as`,`min`,`max`,`dir`,`inverted`,`aria-disabled`,`data-disabled`]))]),_:3}))}}),tt=l({__name:`SliderImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},emits:[`slideStart`,`slideMove`,`slideEnd`,`homeKeyDown`,`endKeyDown`,`stepKeyDown`],setup(e,{emit:t}){let n=e,i=t,a=V();return(e,t)=>(m(),r(v(P),s({"data-slider-impl":``},n,{onKeydown:t[0]||=e=>{e.key===`Home`?(i(`homeKeyDown`,e),e.preventDefault()):e.key===`End`?(i(`endKeyDown`,e),e.preventDefault()):v(Ke).concat(v(qe)).includes(e.key)&&(i(`stepKeyDown`,e),e.preventDefault())},onPointerdown:t[1]||=e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),v(a).thumbElements.value.includes(t)?t.focus():i(`slideStart`,e)},onPointermove:t[2]||=e=>{e.target.hasPointerCapture(e.pointerId)&&i(`slideMove`,e)},onPointerup:t[3]||=e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(`slideEnd`,e))}}),{default:k(()=>[E(e.$slots,`default`)]),_:3},16))}}),nt=l({__name:`SliderRange`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=V(),n=Ye();I();let i=_(()=>t.currentModelValue.value.map(e=>Re(e,t.min.value,t.max.value))),a=_(()=>t.currentModelValue.value.length>1?Math.min(...i.value):0),o=_(()=>100-Math.max(...i.value,0));return(e,i)=>(m(),r(v(P),{"data-disabled":v(t).disabled.value?``:void 0,"data-orientation":v(t).orientation.value,"as-child":e.asChild,as:e.as,style:y({[v(n).startEdge.value]:`${a.value}%`,[v(n).endEdge.value]:`${o.value}%`})},{default:k(()=>[E(e.$slots,`default`)]),_:3},8,[`data-disabled`,`data-orientation`,`as-child`,`as`,`style`]))}}),rt=l({inheritAttrs:!1,__name:`SliderThumbImpl`,props:{index:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=V(),i=Ye(),{forwardRef:a,currentElement:o}=I(),{CollectionItem:c}=z(),l=_(()=>n.modelValue?.value?.[t.index]),u=_(()=>l.value===void 0?0:Re(l.value,n.min.value??0,n.max.value??100)),d=_(()=>ze(t.index,n.modelValue?.value?.length??0)),f=Me(o),h=_(()=>f[i.size].value),g=_(()=>n.thumbAlignment.value===`overflow`||!h.value?0:Ve(h.value,u.value,i.direction.value)),y=ve();return te(()=>{n.thumbElements.value.push(o.value)}),ee(()=>{let e=n.thumbElements.value.findIndex(e=>e===o.value)??-1;n.thumbElements.value.splice(e,1)}),(e,t)=>(m(),r(v(c),null,{default:k(()=>[p(v(P),s(e.$attrs,{ref:v(a),role:`slider`,tabindex:v(n).disabled.value?void 0:0,"aria-label":e.$attrs[`aria-label`]||d.value,"data-disabled":v(n).disabled.value?``:void 0,"data-orientation":v(n).orientation.value,"aria-valuenow":l.value,"aria-valuemin":v(n).min.value,"aria-valuemax":v(n).max.value,"aria-orientation":v(n).orientation.value,"as-child":e.asChild,as:e.as,style:{transform:`var(--reka-slider-thumb-transform)`,position:`absolute`,[v(i).startEdge.value]:`calc(${u.value}% + ${g.value}px)`,display:!v(y)&&l.value===void 0?`none`:void 0},onFocus:t[0]||=()=>{v(n).valueIndexToChangeRef.value=e.index}}),{default:k(()=>[E(e.$slots,`default`)]),_:3},16,[`tabindex`,`aria-label`,`data-disabled`,`data-orientation`,`aria-valuenow`,`aria-valuemin`,`aria-valuemax`,`aria-orientation`,`as-child`,`as`,`style`])]),_:3}))}}),it=l({__name:`SliderThumb`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,{getItems:n}=z(),{forwardRef:i,currentElement:a}=I(),o=_(()=>a.value?n(!0).findIndex(e=>e.ref===a.value):-1);return(e,n)=>(m(),r(rt,s({ref:v(i)},t,{index:o.value}),{default:k(()=>[E(e.$slots,`default`)]),_:3},16,[`index`]))}}),at=l({__name:`SliderTrack`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=V();return I(),(e,n)=>(m(),r(v(P),{"as-child":e.asChild,as:e.as,"data-disabled":v(t).disabled.value?``:void 0,"data-orientation":v(t).orientation.value},{default:k(()=>
1[E(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`data-disabled`,`data-orientation`]))}}),H={pageTitle:`Make a profile picture`,aboutH2:`The free profile picture editor`,aboutBody:`profilepicture.ai is a free profile picture maker that runs entirely in your browser. Upload a selfie or any photo, remove the background in one tap, then style it: pick a solid color, gradient, or pattern, choose a circle, square, or rounded crop, and add a border or text. When it looks right, download an HD PNG or JPEG — no sign-up, no watermark, and no paywall. Because background removal happens on your device, your photo isn't uploaded to our servers to cut out the subject. The editor works as a DP maker for Instagram and WhatsApp, an avatar maker for Discord, TikTok, and YouTube, and a professional profile picture tool for LinkedIn or a CV. It's the free tool from the team behind HeadshotPro.`,metaTitle:`Make a profile picture | profilepicture.ai`,metaDescription:`Upload a photo, remove the background, add a circle crop or border, and download an HD profile picture. No sign-up. No watermark. 100% free.`,ogAlt:`Make a profile picture | profilepicture.ai`,uploadTitle:`Add a photo`,uploadHint:`Drop a photo here, or take one on your phone.`,uploadButton:`Choose photo`,replacePhoto:`Replace photo`,uploadAcceptNote:`JPEG, PNG, or WebP.`,removing:`Removing the background…`,removalFailed:`Couldn't remove the background this time — you can still edit and download your photo.`,removalUnsupported:`This browser can't remove backgrounds — you can still edit and download your photo.`,removalPopupTitle:`Background removal unavailable`,removalPopupButton:`Got it`,positionTitle:`Position`,scale:`Zoom`,rotation:`Rotate`,offsetX:`Move left / right`,offsetY:`Move up / down`,flipH:`Flip horizontal`,flipV:`Flip vertical`,shape:`Shape`,shapeCircle:`Circle`,shapeSquare:`Square`,shapeRounded:`Rounded`,backgroundTitle:`Background`,customColor:`Custom color`,bgTypeSolid:`Solid`,bgTypeGradient:`Gradient`,bgTypePattern:`Pattern`,bgTypeImage:`Image`,bgGradients:`Select gradient`,bgStartColor:`Start color`,bgEndColor:`End color`,bgAngle:`Angle`,bgPatterns:`Background patterns`,bgPatternBackground:`Background`,bgPatternForeground:`Foreground`,bgForegroundOpacity:`Foreground opacity`,bgPatternScale:`Pattern scale`,bgImages:`Default backgrounds`,downloadTitle:`Download`,downloadPng:`Download PNG`,downloadJpeg:`Download JPEG`,downloadHint:`HD, no watermark, no account.`,exportSize:`Export size`,previewShape:`Preview shape`,emptyStage:`Your photo shows up here.`,filtersTitle:`Filters`,filtersPreset:`Presets`,filterBrightness:`Brightness`,filterContrast:`Contrast`,filterSaturation:`Saturation`,filterBlur:`Blur`,filterGrayscale:`Grayscale`,filterHueRotate:`Hue`,filterInvert:`Invert`,filterSepia:`Sepia`,borderTitle:`Border`,borderWidth:`Width`,borderOpacity:`Opacity`,borderOffset:`Offset`,borderAmount:`Amount`,borderRotation:`Rotation`,borderColor:`Color`,borderSolid:`Solid`,borderGradient:`Gradient`,borderCapRound:`Round`,borderCapButt:`Flat`,textTitle:`Text`,textContent:`Your text`,textSize:`Size`,textOpacity:`Opacity`,textLetterSpacing:`Letter spacing`,textFont:`Font`,textWeight:`Weight`,textStyleStraight:`Straight`,textStyleVertical:`Vertical`,textStyleCurved:`Curved`,textColor:`Color`,textArcRadius:`Arc size`,textArcStart:`Arc start`,textArcDirection:`Direction`,textArcCw:`Clockwise`,textArcCcw:`Counter-clockwise`,bridgeHeadline:`Want your photo professionally reshot?`,bridgeBody:`Turn a selfie into studio-quality headshots. Free to try.`,bridgeCta:`Try the free headshot generator`,bridgeProof:`4.7/5 from 3,546 reviews`},ot=`editor_opened`,st=`photo_uploaded`,ct=`bg_removed`,lt=`bg_removal_failed`,U=`background_applied`,ut=`download`,dt=`bridge_viewed`,ft=`bridge_clicked`,W=[{id:`transparent`,name:`No background`,type:`transparent`,professional:!1},{id:`linkedin-blue`,name:`LinkedIn blue`,type:`solid`,color:`#0A66C2`,professional:!0},{id:`navy`,name:`Navy`,type:`solid`,color:`#17114F`,professional:!0},{id:`charcoal`,name:`Charcoal`,type:`solid`,color:`#374151`,professional:!0},{id:`slate`,name:`Slate`,type:`solid`,color:`#64748B`,professional:!0},{id:`warm-gray`,name:`Warm gray`,type:`solid`,color:`#A8A29E`,professional:!0},{id:`off-white`,name:`Off-white`,type:`solid`,color:`#F3F4F6`,professional:!0},{id:`white`,name:`White`,type:`solid`,color:`#FFFFFF`,professional:!0},{id:`teal`,name:`Teal`,type:`solid`,color:`#17A79B`,professional:!0}];
1function G(e){return W.find(t=>t.id===e)||null}function pt(){return{variant:`solid`,solidId:`linkedin-blue`,solidColor:`#0A66C2`,gradient:{presetId:`studio-navy`,startColor:`#17114F`,endColor:`#0EA5E0`,colors:[`#17114F`,`#0EA5E0`],stops:[0,100],angle:90},pattern:{id:`squares`,backgroundColor:`#F3F4F6`,foregroundColor:`#17114F`,foregroundOpacity:76,scale:25},image:{url:null}}}function K(e,t){let n=t?{...t}:pt();return e?e.type===`transparent`?{...n,variant:`transparent`}:{...n,variant:`solid`,solidId:e.id,solidColor:e.color}:n}var mt=`profile-picture`,q=24/360,ht={"profile-picture":{id:`profile-picture`,initialBackgroundId:`linkedin-blue`,cropSize:1,platformLabel:`Profile picture`,shape:`circle`},linkedin:{id:`linkedin`,initialBackgroundId:`linkedin-blue`,cropSize:1,platformLabel:`LinkedIn`,shape:`circle`}};function gt(e=mt){return ht[e]||ht[`profile-picture`]}function _t(e){return G(e.initialBackgroundId)||W[0]}var vt=[{id:`studio-navy`,name:`Studio navy`,colors:[`#17114F`,`#0EA5E0`],stops:[0,100],professional:!0},{id:`soft-dawn`,name:`Soft dawn`,colors:[`#F4EFE6`,`#BBB4DE`],stops:[0,100],professional:!0},{id:`stellar`,name:`Stellar`,colors:[`#7474BF`,`#348AC7`],stops:[0,100],professional:!0},{id:`megatron`,name:`MegaTron`,colors:[`#C6FFDD`,`#FBD786`,`#f7797d`],stops:[0,50,100],professional:!1},{id:`jshine`,name:`JShine`,colors:[`#12c2e9`,`#c471ed`,`#f64f59`],stops:[0,50,100],professional:!1},{id:`wedding-day-blues`,name:`Wedding Day Blues`,colors:[`#40E0D0`,`#FF8C00`,`#FF0080`],stops:[0,50,100],professional:!1},{id:`radar`,name:`Radar`,colors:[`#A770EF`,`#CF8BF3`,`#FDB99B`],stops:[0,50,100],professional:!1},{id:`sweet-morning`,name:`Sweet Morning`,colors:[`#FF5F6D`,`#FFC371`],stops:[0,100],professional:!1},{id:`alihossein`,name:`Alihossein`,colors:[`#f7ff00`,`#db36a4`],stops:[0,100],professional:!1},{id:`mojito`,name:`Mojito`,colors:[`#1D976C`,`#93F9B9`],stops:[0,100],professional:!1},{id:`digital-water`,name:`Digital Water`,colors:[`#74ebd5`,`#ACB6E5`],stops:[0,100],professional:!1},{id:`argon`,name:`Argon`,colors:[`#03001e`,`#7303c0`,`#ec38bc`,`#fdeff9`],stops:[0,33,66,100],professional:!1},{id:`bora-bora`,name:`Bora Bora`,colors:[`#2BC0E4`,`#EAECC6`],stops:[0,100],professional:!1},{id:`memariani`,name:`Memariani`,colors:[`#aa4b6b`,`#6b6b83`,`#3b8d99`],stops:[0,50,100],professional:!1},{id:`atlas`,name:`Atlas`,colors:[`#FEAC5E`,`#C779D0`,`#4BC0C8`],stops:[0,50,100],professional:!1},{id:`shore`,name:`Shore`,colors:[`#70e1f5`,`#ffd194`],stops:[0,100],professional:!1},{id:`moonlit-peach`,name:`Moonlit Peach`,colors:[`#E0C3FC`,`#8EC5FC`,`#F9D1D1`],stops:[0,55,100],professional:!1},{id:`evergreen-mist`,name:`Evergreen Mist`,colors:[`#D4FC79`,`#96E6A1`,`#37C6A3`],stops:[0,55,100],professional:!1}];function yt(e){return vt.find(t=>t.id===e)||null}function bt(e){let t=Array.isArray(e.colors)&&e.colors.length>=2?e.colors:[e.startColor,e.endColor];return{colors:t,stops:Array.isArray(e.stops)&&e.stops.length===t.length?e.stops:t.map((e,n)=>n/(t.length-1)*100)}}function xt(e){let{colors:t,stops:n}=bt(e);return`linear-gradient(${Number.isFinite(e.angle)?e.angle:90}deg, ${t.map((e,t)=>`${e} ${n[t]}%`).join(`, `)})`}var J={brightness:100,contrast:100,saturation:100,blur:0,grayscale:0,hueRotate:0,invert:0,sepia:0,preset:null},St=[[`1977`,`1977`,{brightness:110,contrast:110,saturation:130,sepia:50}
1],[`aden`,`Aden`,{brightness:120,contrast:90,saturation:85,hueRotate:20}],[`amaro`,`Amaro`,{brightness:110,contrast:90,saturation:130}],[`ashby`,`Ashby`,{brightness:120,contrast:110,saturation:130,sepia:20}],[`brannan`,`Brannan`,{brightness:140,contrast:110,sepia:50}],[`brooklyn`,`Brooklyn`,{brightness:110,contrast:110,saturation:130,hueRotate:5}],[`charmes`,`Charmes`,{brightness:120,contrast:110,saturation:130,hueRotate:5}],[`clarendon`,`Clarendon`,{brightness:120,contrast:120,saturation:135}],[`crema`,`Crema`,{brightness:115,contrast:90,saturation:125}],[`dogpatch`,`Dogpatch`,{brightness:110,contrast:95,saturation:110,sepia:35}],[`earlybird`,`Earlybird`,{brightness:120,contrast:90,saturation:110,sepia:20}],[`gingham`,`Gingham`,{brightness:105,contrast:105,hueRotate:350}],[`ginza`,`Ginza`,{brightness:115,contrast:105,saturation:110,sepia:20}],[`hefe`,`Hefe`,{brightness:110,contrast:130,saturation:120,hueRotate:350}],[`helena`,`Helena`,{brightness:110,contrast:105,saturation:130,hueRotate:208}],[`hudson`,`Hudson`,{brightness:120,c
1ontrast:90,saturation:110,hueRotate:350}],[`inkwell`,`Inkwell`,{brightness:110,contrast:110,grayscale:100}],[`juno`,`Juno`,{brightness:120,contrast:115,saturation:140}],[`kelvin`,`Kelvin`,{brightness:110,contrast:150,saturation:110,hueRotate:5}],[`lark`,`Lark`,{brightness:110,contrast:90,saturation:125,hueRotate:350}],[`lofi`,`Lo-Fi`,{brightness:150,contrast:110,saturation:110}],[`ludwig`,`Ludwig`,{brightness:90,contrast:105,saturation:145,hueRotate:5}],[`maven`,`Maven`,{brightness:95,contrast:95,saturation:150,sepia:25}],[`mayfair`,`Mayfair`,{brightness:120,contrast:110,saturation:110,hueRotate:350}],[`moon`,`Moon`,{brightness:110,contrast:110,grayscale:100}],[`nashville`,`Nashville`,{brightness:120,contrast:110,saturation:120,sepia:20}],[`perpetua`,`Perpetua`,{brightness:130,contrast:110,saturation:120}],[`poprocket`,`Poprocket`,{brightness:140,contrast:115,saturation:160,hueRotate:350}],[`reyes`,`Reyes`,{brightness:110,contrast:85,saturation:75,sepia:22}],[`rise`,`Rise`,{brightness:105,contrast:90,saturation:90,sepia:20}
1],[`sierra`,`Sierra`,{brightness:120,contrast:90,saturation:120,hueRotate:350}],[`skyline`,`Skyline`,{brightness:110,contrast:130,saturation:120,hueRotate:350}],[`slumber`,`Slumber`,{brightness:105,contrast:85,saturation:66,hueRotate:5}],[`stinson`,`Stinson`,{brightness:115,contrast:75,saturation:85,hueRotate:350}],[`sutro`,`Sutro`,{brightness:75,saturation:150,hueRotate:5}],[`toaster`,`Toaster`,{brightness:150,contrast:90,saturation:120,hueRotate:350}],[`valencia`,`Valencia`,{brightness:110,contrast:110,saturation:120,sepia:8}],[`vesper`,`Vesper`,{brightness:125,contrast:115,saturation:120,hueRotate:5}],[`walden`,`Walden`,{brightness:130,saturation:160,sepia:30}],[`willow`,`Willow`,{brightness:90,contrast:95,saturation:75,grayscale:50}],[`xpro-ii`,`X-Pro II`,{brightness:90,saturation:120,sepia:30}]];function Y(e,t,n){let r=e===`none`?null:e;return{id:e,name:t,values:{...J,...n,preset:r}}}var X=[Y(`none`,`None`,{preset:null}),Y(`bright`,`Bright`,{brightness:115,contrast:105,saturation:110}),Y(`crisp`,`Crisp`,{brightness:105,contrast:120,saturation:105}),Y(`warm`,`Warm`,{brightness:108,contrast:105,saturation:120,hueRotate:12,sepia:18}),Y(`cool`,`Cool`,{brightness:102,contrast:108,saturation:90,hueRotate:196}),Y(`bw`,`Black & white`,{contrast:110,saturation:0,grayscale:100}),...St.map(([e,t,n])=>Y(e,t,n))],Ct=[{key:`brightness`,min:0,max:200,step:1},{key:`contrast`,min:0,max:200,step:1},{key:`saturation`,min:0,max:200,step:1},{key:`blur`,min:0,max:10,step:.1},{key:`grayscale`,min:0,max:100,step:1},{key:`hueRotate`,min:0,max:360,step:1},{key:`invert`,min:0,max:100,step:1},{key:`sepia`,min:0,max:100,step:1}];function wt(e){return X.find(t=>t.id===e)||X[0]}function Tt(e){return e?[`brightness(${e.brightness}%)`,`contrast(${e.contrast}%)`,`saturate(${e.saturation}%)`,`blur(${e.blur}px)`,`grayscale(${e.grayscale}%)`,`hue-rotate(${e.hueRotate}deg)`,`invert(${e.invert}%)`,`sepia(${e.sepia}%)`].join(` `):`none`}var Et={content:``,fontSize:36,color:`#000000`,colorType:`solid`,gradientStart:`#ff0000`,gradientEnd:`#0000ff`,fontFamily:`Arial`,fontWeight:`normal`,opacity:100,style:`straight`,letterSpacing:0,x:50,y:50,arcDirection:-1,arcStartAngle:133,arcRadius:140},Dt=[`Arial`,`Helvetica`,`Times New Roman`,`Courier New`,`Verdana`,`Georgia`,`Comic Sans MS`,`Impact`],Ot=[`lighter`,`normal`,`bold`,`bolder`],kt=[`straight`,`vertical`,`curved`],At=[{id:`megatron`,name:`MegaTron`,colors:[`#C6FFDD`,`#FBD786`,`#f7797d`],stops:[0,50,100]},{id:`jshine`,name:`JShine`,colors:[`#12c2e9`,`#c471ed`,`#f64f59`],stops:[0,50,100]},{id:`wedding-day-blues`,name:`Wedding Day Blues`,colors:[`#40E0D0`,`#FF8C00`,`#FF0080`],stops:[0,50,100]},{id:`radar`,name:`Radar`,colors:[`#A770EF`,`#CF8BF3`,`#FDB99B`],stops:[0,50,100]},{id:`sweet-morning`,name:`Sweet Morning`,colors:[`#FF5F6D`,`#FFC371`],stops:[0,100]},{id:`alihossein`,name:`Alihossein`,colors:[`#f7ff00`,`#db36a4`],stops:[0,100]},{id:`mojito`,name:`Mojito`,colors:[`#1D976C`,`#93F9B9`],stops:[0,100]},{id:`digital-water`,name:`Digital Water`,colors:[`#74ebd5`,`#ACB6E5`],stops:[0,100]},{id:`stellar`,name:`Stellar`,colors:[`#7474BF`,`#348AC7`],stops:[0,100]},{id:`argon`,name:`Argon`,colors:[`#03001e`,`#7303c0`,`#ec38bc`,`#fdeff9`],stops:[0,33,66,100]},{id:`bora-bora`,name:`Bora Bora`,colors:[`#2BC0E4`,`#EAECC6`],stops:[0,100]},{id:`memariani`,name:`Memariani`,colors:[`#aa4b6b`,`#6b6b83`,`#3b8d99`],stops:[0,50,100]},{id:`atlas`,name:`Atlas`,colors:[`#FEAC5E`,`#C779D0`,`#4BC0C8`],stops:[0,50,100]},{id:`shore`,name:`Shore`,colors:[`#70e1f5`,`#ffd194`],stops:[0,100]}];function jt(e){return At.find(t=>t.id===e)||null}function Mt(e,t){let n=String(e||`#000000`).replace(`#`,``);return`#${n.length===3?n.split(``).map(e=>e+e).join(``):n.slice(0,6).padEnd(6,`0`)}${Math.round(Number(t)*255/100).toString(16).padStart(2,`0`)}`}function Nt(e){let t=String(e||`#000000`).replace(`#`,``),n=t.length===3?t.split(``).map(e=>e+e).join(``):t.slice(0,6).padEnd(6,`0`);return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16)}}function Pt({r:e,g:t,b:n}){let r=e=>Math.round(Math.max(0,Math.min(255,e))).toString(16).padStart(2,`0`);return`#${r(e)}${r(t)}${r(n)}`}function Ft(e,t,n){let r=Nt(e),i=Nt(t),a=Math.max(0,Math.min(1,n));return Pt({r:r.r+(i.r-r.r)*a,g:r.g+(i.g-r.g)*a,b:r.b+(i.b-r.b)*a})}function It(e,t){if(!e||!e.length)return`#000000`;if(e.length===1)return e[0];let n=Math.max(0,Math.min(1,t)),r=1/(e.length-1),i=Math.min(Math.floor(n/r),e.length-2),a=(n-i*r)/r;return Ft(e[i],e[i+1],a)}var Lt={width:0,color:`#000000`,colorType:`solid`,gradientPreset:`megatron`,opacity:100,offset:0,amount:100,capStyle:`round`,rotation:0};function Z(e){if(e.colorType===`gradient`){let t=jt(e.gradientPreset);if(t)return{type:`gradient`,colors:t.colors.map(t=>Mt(t,e.opacity)),stops:t.stops}}return{type:`solid`,color:Mt(e.color||`#000000`,e.opacity)}}function Rt(e){let t=Number(e.width)||0,n=Math.max(0,50-t/2),r=2*Math.PI*n;return{radius:n,width:t,dashArray:`${Math.min(Math.max(Number(e.amount)||0,0),100)/100*r} ${r}`,cap:e.capStyle===`butt`?`butt`:`round`}}function zt(e,t,n,r,i){return i<=0?`M ${e+n/2} ${t} H ${e+n} V ${t+r} H ${e} V ${t} Z`:[`M ${e+n/2} ${t}`,`H ${e+n-i}`,`A ${i} ${i} 0 0 1 ${e+n} ${t+i}`,`V ${t+r-i}`,`A ${i} ${i} 0 0 1 ${e+n-i} ${t+r}`,`H ${e+i}`,`A ${i} ${i} 0 0 1 ${e} ${t+r-i}`,`V ${t+i}`,`A ${i} ${i} 0 0 1 ${e+i} ${t}`,`Z`].join(` `)}function Bt(e,t){let n=Number(e.width)||0,r=n/2,i=t===`rounded`?q*100:0,a=Math.max(0,i-r),o=Math.min(Math.max(Number(e.amount)||0,0),100)/100;return{d:zt(r,r,100-n,100-n,a),width:n,dashArray:`${o*100} 100`,dashOffset:-((Number(e.rotation)||0)%360/360*100),cap:e.capStyle===`butt`?`butt`:`round`}}function Vt(e,t,n){let r=-t,i=-t,a=t,o=t;e.moveTo(0,i),n<=0?(e.lineTo(o,i),e.lineTo(o,a),e.lineTo(r,a),e.lineTo(r,i)):(e.lineTo(o-n,i),e.arc(o-n,i+n,n,-Math.PI/2,0),e.lineTo(o,a-n),e.arc(o-n,a-n,n,0,Math.PI/2),e.lineTo(r+n,a),e.arc(r+n,a-n,n,Math.PI/2,Math.PI),e.lineTo(r,i+n),e.arc(r+n,i+n,n,Math.PI,Math.PI*1.5)),e.closePath()}function Ht(e,t,n,r,i=`circle`){let a=Number(r.width)||0;if(a<=0)return;let o=t/360,s=(Number(r.offset)||0)*o,c=Math.max(0,Math.min(t,n)-2*s),l=a/100*c,u=Math.max(0,c/2-l/2),d=Math.min(Math.max(Number(r.amount)||0,0),100)/100,f=(Number(r.rotation)||0)%360/360,p=f*Math.PI*2,m=r.capStyle===`butt`?`butt`:`round`,h=Z(r);if(e.save(),e.translate(t/2,n/2),i===`circle`&&e.rotate(p),e.lineWidth=l,e.lineCap=m,e.lineJoin=`round`,h.type===`gradient`){let t=e.createLinearGradient(-u,-u,u,u),n=h.colors,r=h.stops||n.map((e,t)=>t/(n.length-1)*100);
1n.forEach((e,n)=>{t.addColorStop((r[n]??0)/100,e)}),e.strokeStyle=t}else e.strokeStyle=h.color;if(e.beginPath(),i===`circle`){let t=-Math.PI/2,n=t+d*Math.PI*2;e.arc(0,0,u,t,n,!1)}else{let t=u,n=i===`rounded`?q*c:0,r=Math.max(0,n-l/2),a=4*(2*t-2*r)+2*Math.PI*r;e.setLineDash([d*a,a]),e.lineDashOffset=-f*a,Vt(e,t,r)}e.stroke(),e.restore()}var Ut={maxWidth:1536,maxHeight:1536,quality:.95,outputFormat:`jpeg`};function Wt(e,t,n,r){if(e<=n&&t<=r)return{width:e,height:t};let i=Math.min(n/e,r/t);return{width:Math.round(e*i),height:Math.round(t*i)}}function Gt(e,t){return`${String(e||`photo`).replace(/\.[^/.]+$/,``)}.${t===`jpeg`?`jpg`:`png`}`}async function Kt(e,t={}){let n={...Ut,...t},r=new Image,i=URL.createObjectURL(e);try{await new Promise((e,t)=>{r.onload=e,r.onerror=()=>t(Error(`Failed to load image`)),r.src=i});let{width:t,height:a}=Wt(r.naturalWidth||r.width,r.naturalHeight||r.height,n.maxWidth,n.maxHeight),o=document.createElement(`canvas`);o.width=t,o.height=a;let s=o.getContext(`2d`);if(!s)throw Error(`Could not get canvas context`);s.drawImage(r,0,0,t,a);let c=n.outputFormat===`jpeg`?`image/jpeg`:`image/png`,l=await new Promise((e,t)=>{o.toBlob(n=>n?e(n):t(Error(`Failed to compress image`)),c,n.quality)});return new File([l],Gt(e.name,n.outputFormat),{type:c,lastModified:Date.now()})}finally{URL.revokeObjectURL(i)}}var qt=`/imgly/`,Jt=268435456;function Yt(){try{let e=D()?.public?.e2eBgRemovalStub;if(e&&e!==`0`&&e!==`false`)return!0}catch{}if(typeof process<`u`&&{}.E2E_BG_REMOVAL_STUB){let e={}.E2E_BG_REMOVAL_STUB;return e!==`0`&&e!==`false`}return!1}function Xt(){return!!(typeof window<`u`&&window.__E2E_BG_REMOVAL_FAIL)}function Zt(){if(typeof WebAssembly>`u`)return!1;try{let e=navigator?.deviceMemory;if(typeof e==`number`&&e>0&&e<2)return!1}catch{}try{if(typeof performance<`u`&&performance.memory){let e=performance.memory.jsHeapSizeLimit;if(e&&e<Jt)return!1}}catch{}return!0}function Qt(e){return e?e.endsWith(`/`)?e:`${e}/`:typeof window<`u`&&window.location?.origin?`${window.location.origin}${qt}`:qt}function $t(){return Yt()?!0:Zt()}async function en(e,t={}){if(!e||Xt())return null;if(Yt())return e;if(!Zt())return null;try{let n=await le(()=>import(`./HBjKnIbB.js`),[],import.meta.url);return await(n.removeBackground||n.default)(e,{publicPath:Qt(t.publicPath),output:{format:`image/png`}})||null}catch(e){return console.warn(`[remove-background] removal failed:`,e),null}}function tn(){return{originalUrl:null,cutoutUrl:null,isRemoving:!1,removalFailed:!1}}function nn(e=`circle`){return{x:0,y:0,scale:1,rotation:0,flipH:!1,flipV:!1,shape:e}}var Q=oe(`editor`,{state:()=>({presetId:`profile-picture`,basic:nn(`circle`),background:K(G(`linkedin-blue`)),appliedBackgroundId:`linkedin-blue`,professionalApplied:!1,filter:{...J},border:{...Lt},text:{...Et},exportPresetId:Ce,imageState:tn()}),getters:{workingUrl(e){return e.imageState.cutoutUrl||e.imageState.originalUrl},hasImage(e){return!!e.imageState.originalUrl},showHspBridge(e){return!!(e.imageState.originalUrl&&e.professionalApplied)}},actions:{applyPreset(e){let t=gt(e);this.presetId=t.id,this.basic=nn(t.shape||`circle`);let n=_t(t);this.background=K(n),this.appliedBackgroundId=n.id,this.professionalApplied=!!(n&&n.professional)},patchBasic(e){this.basic={...this.basic,...e}},applyBackground(e,{id:t}={}){this.background=K(e,this.background),this.appliedBackgroundId=t||e.id||`custom`,this.professionalApplied=!!(e&&e.professional)},setCustomSolid(e){this.background={...this.background,variant:`solid`,solidId:`custom`,solidColor:e},this.appliedBackgroundId=`custom`,this.professionalApplied=!1},setBackgroundVariant(e){this.background={...this.background,variant:e};let t=this.background;if(e===`solid`||e===`transparent`){let n=G(e===`transparent`?`transparent`:t.solidId);this.appliedBackgroundId=e===`transparent`?`transparent`:t.solidId,this.professionalApplied=!!(n&&n.professional)}else if(e===`gradient`){let e=yt(t.gradient.presetId);this.appliedBackgroundId=t.gradient.presetId||`custom`,this.professionalApplied=!!(e&&e.professional)}else this.appliedBackgroundId=e===`pattern`?`pattern-${t.pattern.id}`:`image`,this.professionalApplied=!1},applyGradientPreset(e){this.background={...this.background,variant:`gradient`,gradient:{...this.background.gradient,presetId:e.id,colors:[...e.colors],stops:[...e.stops],startColor:e.colors[0],endColor:e.colors[e.colors.length-1]}}
1,this.appliedBackgroundId=e.id,this.professionalApplied=!!e.professional},patchBackgroundGradient(e){let t={...this.background.gradient,...e};(`startColor`in e||`endColor`in e)&&(t.presetId=null,t.colors=[t.startColor,t.endColor],t.stops=[0,100]),this.background={...this.background,variant:`gradient`,gradient:t},t.presetId||(this.appliedBackgroundId=`custom`,this.professionalApplied=!1)},patchBackgroundPattern(e){let t={...this.background.pattern,...e};this.background={...this.background,variant:`pattern`,pattern:t},this.appliedBackgroundId=`pattern-${t.id}`,this.professionalApplied=!1},setBackgroundImage(e){this.background={...this.background,variant:`image`,image:{url:e}},this.appliedBackgroundId=`image`,this.professionalApplied=!1},patchFilter(e){this.filter={...this.filter,...e,preset:null}},applyFilterPreset(e){if(!e||e===`none`||this.filter.preset===e){this.filter={...J};return}let t=wt(e);this.filter={...J,...t.values,preset:t.id}},patchBorder(e){let t={...this.border,...e},n=Object.keys(e),r=n.some(e=>e!==`width`),i=n.some(t=>t!==`width`&&e[t]!==0&&e[t]!==``&&e[t]!=null);this.border.width===0&&r&&i&&(t.width=5),this.border=t},patchText(e){this.text={...this.text,...e}},setExportPreset(e){let t=Se(e);this.exportPresetId=t.id,(t.shape===`circle`||t.shape===`square`||t.shape===`rounded`)&&(this.basic={...this.basic,shape:t.shape})},revokeUrls(){let{originalUrl:e,cutoutUrl:t}=this.imageState;e&&URL.revokeObjectURL(e),t&&t!==e&&URL.revokeObjectURL(t)},async ingestFile(e){let t=await Kt(e,{maxWidth:1536,maxHeight:1536,quality:.95,outputFormat:`jpeg`});this.revokeUrls();let n=URL.createObjectURL(t),r=$t();if(this.imageState={originalUrl:n,cutoutUrl:null,isRemoving:r,removalFailed:!r&&`unsupported`},this.basic={...this.basic,x:0,y:0,scale:1,rotation:0,flipH:!1,flipV:!1},r)try{let e=await en(t);if(e){let t=URL.createObjectURL(e);this.imageState.cutoutUrl=t,this.imageState.removalFailed=!1}else this.imageState.removalFailed=`error`}catch{this.imageState.removalFailed=`error`}finally{this.imageState.isRemoving=!1}return{removalFailed:this.imageState.removalFailed,hasCutout:!!this.imageState.cutoutUrl}},resetImage(){this.revokeUrls(),this.imageState=tn()}}}),rn=[{name:`squares`,background_image:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='Artboard-5' fill='%233f3c71' fill-opacity='0.76' fill-rule='nonzero'%3E%3Cpath d='M6 18h12V6H6v12zM4 4h16v16H4V4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`},{name:`overcast`,background_image:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' width='80' height='80'%3E%3Cg fill='%233f3c71' fill-opacity='0.76'%3E%3Cpath d='M0 0h80v80H0V0zm20 20v40h40V20H20zm20 35a15 15 0 1 1 0-30 15 15 0 0 1 0 30z' opacity='.5'%3E%3C/path%3E%3Cpath d='M15 15h50l-5 5H20v40l-5 5V15zm0 50h50V15L80 0v80H0l15-15zm32.07-32.07l3.54-3.54A15 15 0 0 1 29.4 50.6l3.53-3.53a10 10 0 1 0 14.14-14.14zM32.93 47.07a10 10 0 1 1 14.14-14.14L32.93 47.07z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E")`},{name:`formal`,background_image:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='18' viewBox='0 0 100 18'%3E%3Cpath fill='%233f3c71' fill-opacity='0.76' d='M61.82 18c3.47-1.45 6.86-3.78 11.3-7.34C78 6.76 80.34 5.1 83.87 3.42 88.56 1.16 93.75 0 100 0v6.16C98.76 6.05 97.43 6 96 6c-9.59 0-14.23 2.23-23.13 9.34-1.28 1.03-2.39 1.9-3.4 2.66h-7.65zm-23.64 0H22.52c-1-.76-2.1-1.63-3.4-2.66C11.57 9.3 7.08 6.78 0 6.16V0c6.25 0 11.44 1.16 16.14 3.42 3.53 1.7 5.87 3.35 10.73 7.24 4.45 3.56 7.84 5.9 11.31 7.34zM61.82 0h7.66a39.57 39.57 0 0 1-7.34 4.58C57.44 6.84 52.25 8 46 8S34.56 6.84 29.86 4.58A39.57 39.57 0 0 1 22.52 0h15.66C41.65 1.44 45.21 2 50 2c4.8 0 8.35-.56 11.82-2z'%3E%3C/path%3E%3C/svg%3E")`},{name:`cutout`,background_image:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='%233f3c71' fill-opacity='0.76'%3E%3Cpath d='M12 0h18v6h6v6h6v18h-6v6h-6v6H12v-6H6v-6H0V12h6V6h6V0zm12 6h-6v6h-6v6H6v6h6v6h6v6h6v-6h6v-6h6v-6h-6v-6h-6V6zm-6 12h6v6h-6v-6zm24 24h6v6h-6v-6z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E")`},{name:`circles`,background_image:`url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 0C6.716 0 0 6.716 0 15c8.284 0 15-6.716 15-15zM0 15c0 8.284 6.716 15 15 15 0-8.284-6.716-15-15-15zm30 0c0-8.284-6.716-15-15-15 0 8.284 6.716 15 15 15zm0 0c0 8.284-6.716 15-15 15 0-8.284 6.716-15 15-15z' fill='%233f3c71' fill-opacity='0.76' fill-rule='evenodd'/%3E%3C/svg%3E")`},{name:`circuit`,background_image:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 304 304' width='304' height='304'%3E%3Cpath fill='%233f3c71' fill-opacity='0.76' d='M44.1 224a5 5 0 1 1 0 2H0v-2h44.1zm160 48a5 5 0 1 1 0 2H82v-2h122.1zm57.8-46a5 5 0 1 1 0-2H304v2h-42.1zm0 16a5 5 0 1 1 0-2H304v2h-42.1zm6.2-114a5 5 0 1 1 0 2h-86.2a5 5 0 1 1 0-2h86.2zm-256-48a5 5 0 1 1 0 2H0v-2h12.1zm185.8 34a5 5 0 1 1 0-2h86.2a5 5 0 1 1 0 2h-86.2zM258 12.1a5 5 0 1 1-2 0V0h2v12.1zm-64 208a5 5 0 1 1-2 0v-54.2a5 5 0 1 1 2 0v54.2zm48-198.2V80h62v2h-64V21.9a5 5 0 1 1 2 0zm16 16V64h46v2h-48V37.9a5 5 0 1 1 2 0zm-128 96V208h16v12.1a5 5 0 1 1-2 0V210h-16v-76.1a5 5 0 1 1 2 0zm-5.9-21.9a5 5 0 1 1 0 2H114v48H85.9a5 5 0 1 1 0-2H112v-48h12.1zm-6.2 130a5 5 0 1 1 0-2H176v-74.1a5 5 0 1 1 2 0V242h-60.1zm-16-64a5 5 0 1 1 0-2H114v48h10.1a5 5 0 1 1 0 2H112v-48h-10.1zM66 284.1a5 5 0 1 1-2 0V274H50v30h-2v-32h18v12.1zM236.1 176a5 5 0 1 1 0 2H226v94h48v32h-2v-30h-48v-98h12.1zm25.8-30a5 5 0 1 1 0-2H274v44.1a5 5 0 1 1-2 0V146h-10.1zm-64 96a5 5 0 1 1 0-2H208v-80h16v-14h-42.1a5 5 0 1 1 0-2H226v18h-16v80h-12.1zm86.2-210a5 5 0 1 1 0 2H272V0h2v32h10.1zM98 101.9V146H53.9a5 5 0 1 1 0-2H96v-42.1a5 5 0 1 1 2 0zM53.9 34a5 5 0 1 1 0-2H80V0h2v34H53.9zm60.1 3.9V66H82v64H69.9a5 5 0 1 1 0-2H80V64h32V37.9a5 5 0 1 1 2 0zM101.9 82a5 5 0 1 1 0-2H128V37.9a5 5 0 1 1 2 0V82h-28.1zm16-64a5 5 0 1 1 0-2H146v44.1a5 5 0 1 1-2 0V18h-26.1zm102.2 270a5 5 0 1 1 0 2H98v14h-2v-16h124.1zM242 149.9V160h16v34h-16v62h48v48h-2v-46h-48v-66h16v-30h-16v-12.1a5 5 0 1 1 2 0zM53.9 18a5 5 0 1 1 0-2H64V2H48V0h18v18H53.9zm112 32a5 5 0 1 1 0-2H192V0h50v2h-48v48h-28.1zm-48-48a5 5 0 0 1-9.8-2h2.07a3 3 0 1 0 5.66 0H178v34h-18V21.9a5 5 0 1 1 2 0V32h14V2h-58.1zm0 96a5 5 0 1 1 0-2H137l32-32h39V21.9a5 5 0 1 1 2 0V66h-40.17l-32 32H117.9zm28.1 90.1a5 5 0 1 1-2 0v-76.51L175.59 80H224V21.9a5 5 0 1 1 2 0V82h-49.59L146 112.41v75.69zm16 32a5 5 0 1 1-2 0v-99.51L184.59 96H300.1a5 5 0 0 1 3.9-3.9v2.07a3 3 0 0 0 0 5.66v2.07a5 5 0 0 1-3.9-3.9H185.41L162 121.41v98.69zm-144-64a5 5 0 1 1-2 0v-3.51l48-48V48h32V0h2v50H66v55.41l-48 48v2.69zM50 53.9v43.51l-48 48V208h26.1a5 5 0 1 1 0 2H0v-65.41l48-48V53.9a5 5 0 1 1 2 0zm-16 16V89.41l-34 34v-2.82l32-32V69.9a5 5 0 1 1 2 0zM12.1 32a5 5 0 1 1 0 2H9.41L0 43.41V40.6L8.59 32h3.51zm265.8 18a5 5 0 1 1 0-2h18.69l7.41-7.41v2.82L297.41 50H277.9zm-16 160a5 5 0 1 1 0-2H288v-71.41l16-16v2.82l-14 14V210h-28.1zm-208 32a5 5 0 1 1 0-2H64v-22.59L40.59 194H21.9a5 5 0 1 1 0-2H4
11.41L66 216.59V242H53.9zm150.2 14a5 5 0 1 1 0 2H96v-56.6L56.6 162H37.9a5 5 0 1 1 0-2h19.5L98 200.6V256h106.1zm-150.2 2a5 5 0 1 1 0-2H80v-46.59L48.59 178H21.9a5 5 0 1 1 0-2H49.41L82 208.59V258H53.9zM34 39.8v1.61L9.41 66H0v-2h8.59L32 40.59V0h2v39.8zM2 300.1a5 5 0 0 1 3.9 3.9H3.83A3 3 0 0 0 0 302.17V256h18v48h-2v-46H2v42.1zM34 241v63h-2v-62H0v-2h34v1zM17 18H0v-2h16V0h2v18h-1zm273-2h14v2h-16V0h2v16zm-32 273v15h-2v-14h-14v14h-2v-16h18v1zM0 92.1A5.02 5.02 0 0 1 6 97a5 5 0 0 1-6 4.9v-2.07a3 3 0 1 0 0-5.66V92.1zM80 272h2v32h-2v-32zm37.9 32h-2.07a3 3 0 0 0-5.66 0h-2.07a5 5 0 0 1 9.8 0zM5.9 0A5.02 5.02 0 0 1 0 5.9V3.83A3 3 0 0 0 3.83 0H5.9zm294.2 0h2.07A3 3 0 0 0 304 3.83V5.9a5 5 0 0 1-3.9-5.9zm3.9 300.1v2.07a3 3 0 0 0-1.83 1.83h-2.07a5 5 0 0 1 3.9-3.9zM97 100a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-48 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 96a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-144a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM49 36a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM33 68a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 240a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm80-176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm112 176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 180a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 84a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'%3E%3C/path%3E%3C/svg%3E")`},{name:`curtains`,background_image:`url("data:image/svg+xml,%3Csvg width='44' height='12' viewBox='0 0 44 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 12v-2L0 0v10l4 2h16zm18 0l4-2V0L22 10v2h16zM20 0v8L4 0h16zm18 0L22 8V0h16z' fill='%233f3c71' fill-opacity='0.76' fill-rule='evenodd'/%3E%3C/svg%3E")`},{name:`aztec`,background_image:`url("data:image/svg+xml,%3Csvg width='32' height='64' viewBox='0 0 32 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 28h20V16h-4v8H4V4h28v28h-4V8H8v12h4v-8h12v20H0v-4zm12 8h20v4H16v24H0v-4h12V36zm16 12h-4v12h8v4H20V44h12v12h-4v-8zM0 36h8v20H0v-4h4V40H0v-4z' fill='%233f3c71' fill-opacity='0.76' fill-rule='evenodd'/%3E%3C/svg%3E")`},{name:`tic_tac_toe`,background_image:`url("data:image/svg+xml,%3Csvg width='64' height='64' viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm0-2c3.314 0 6-2.686 6-6s-2.686-6-6-6-6 2.686-6 6 2.686 6 6 6zm33.414-6l5.95-5.95L45.95.636 40 6.586 34.05.636 32.636 2.05 38.586 8l-5.95 5.95 1.414 1.414L40 9.414l5.95 5.95 1.414-1.414L41.414 8zM40 48c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm0-2c3.314 0 6-2.686 6-6s-2.686-6-6-6-6 2.686-6 6 2.686 6 6 6zM9.414 40l5.95-5.95-1.414-1.414L8 38.586l-5.95-5.95L.636 34.05 6.586 40l-5.95 5.95 1.414 1.414L8 41.414l5.95 5.95 1.414-1.414L9.414 40z' fill='%233f3c71' fill-opacity='0.76' fill-rule='evenodd'/%3E%3C/svg%3E")`},{name:`stars`,background_image:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg fill='%233f3c71' fill-opacity='0.76'%3E%3Cpolygon fill-rule='evenodd' points='8 4 12 6 8 8 6 12 4 8 0 6 4 4 6 0 8 4'/%3E%3C/g%3E%3C/svg%3E")`},{name:`stripes`,background_image:`url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%233f3c71' fill-opacity='0.76' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E")`},{name:`diamonds`,background_image:`url("data:image/svg+xml,%3Csvg width='48' height='64' viewBox='0 0 48 64' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M48 28v-4L36 12 24 24 12 12 0 24v4l4 4-4 4v4l12 12 12-12 12 12 12-12v-4l-4-4 4-4zM8 32l-6-6 10-10 10 10-6 6 6 6-10 10L2 38l6-6zm12 0l4-4 4 4-4 4-4-4zm12 0l-6-6 10-10 10 10-6 6 6 6-10 10-10-10 6-6zM0 16L10 6 4 0h4l4 4 4-4h4l-6 6 10 10L34 6l-6-6h4l4 4 4-4h4l-6 6 10 10v4L36 8 24 20 12 8 0 20v-4zm0 32l10 10-6 6h4l4-4 4 4h4l-6-6 10-10 10 10-6 6h4l4-4 4 4h4l-6-6 10-10v-4L36 56 24 44 12 56 0 44v4z' fill='%233f3c71' fill-opacity='0.76' fill-rule='evenodd'/%3E%3C/svg%3E")`},{name:`bubbles`,background_image:`url("data:image/svg+xml,%3Csvg width='100' height='100' viewB
1ox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%233f3c71' fill-opacity='0.76' fill-rule='evenodd'/%3E%3C/svg%3E")`}],an=rn,on=/%233f3c71/g,sn=/fill-opacity='0\.76'/g;function cn(e){return rn.find(t=>t.name===e)||null}function ln(e,t,n=.76){return e.background_image.replace(on,encodeURIComponent(t)).replace(sn,`fill-opacity='${n}'`)}function un(e,t,n=.76){return ln(e,t,n).slice(5,-2)}function dn(e){let t=e.background_image.match(/width=\\?'(\d+)\\?' height=\\?'(\d+)\\?'/);return t?{w:Number(t[1]),h:Number(t[2])}:{w:32,h:32}}function fn(){return typeof document>`u`?null:document.createElement(`canvas`).getContext(`2d`)}function pn(e,t={}){let n=String(e||``);if(!n)return[];let r=t.fontSize||36,i=t.fontFamily||`Arial`,a=t.fontWeight||`normal`,o=t.arcRadius||140,s=t.arcDirection===1?1:-1,c=(t.arcStartAngle||0)*Math.PI/180,l=t.letterSpacing||0,u=t.colors||[t.color||`#000000`],d=t.ctx||fn();d&&(d.font=`${a} ${r}px ${i}`);let f=d?d.measureText(n).width:n.length*r*.55,p=2*Math.PI*o,m=1+l*.02,h=Math.min(f*1.2*m,p*.8),g=n.length>1?h/(n.length-1)/o:0,_=2*o+2*r,v=_/2;return n.split(``).map((e,t)=>{let r=c+(t-(n.length-1)/2)*g*s,i=v+o*Math.cos(r-Math.PI/2),a=v+o*Math.sin(r-Math.PI/2),l=r*180/Math.PI+(s===-1?180:0),d=n.length>1?t/(n.length-1):0;return{char:e,x:i,y:a,rotation:l,color:u.length>1?It(u,d):u[0],svgSize:_}})}function mn(e){return e.colorType===`gradient`?[e.gradientStart||`#ff0000`,e.gradientEnd||`#0000ff`]:[e.color||`#000000`]}function hn(e,t,n,r){let i=String(r?.content||``);if(!i)return;let a=t/360,o=(r.fontSize||36)*a,s=(r.letterSpacing||0)*a,c=(r.opacity??100)/100,l=`${r.fontWeight||`normal`} ${o}px ${r.fontFamily||`Arial`}`,u=mn(r);if(e.save(),e.globalAlpha=c,e.font=l,e.textAlign=`center`,e.textBaseline=`middle`,r.style===`curved`){let c=pn(i,{...r,fontSize:o,letterSpacing:s,arcRadius:(r.arcRadius||140)*a,colors:u,ctx:e}),l=c[0]?.svgSize||t,d=(t-l)/2,f=(n-l)/2;c.forEach(t=>{e.save(),e.translate(t.x+d,t.y+f),e.rotate(t.rotation*Math.PI/180),e.fillStyle=t.color,e.fillText(t.char,0,0),e.restore()}),e.restore();return}let d=(Number(r.x)||50)/100*t,f=(Number(r.y)||50)/100*n;if(u.length>1){let t=e.createLinearGradient(d-o*2,f,d+o*2,f);t.addColorStop(0,u[0]),t.addColorStop(1,u[1]),e.fillStyle=t}else e.fillStyle=u[0];if(e.letterSpacing!==void 0&&r.style!==`vertical`&&(e.letterSpacing=`${s}px`),r.style===`vertical`){let t=i.split(``),n=o+s,r=f-(t.length-1)*n/2;t.forEach((t,i)=>{e.fillText(t,d,r+i*n)})}else if(s&&e.letterSpacing===void 0){let t=0,n=i.split(``).map(n=>{let r=e.measureText(n).width;return t+=r,r});t+=s*(i.length-1);let r=d-t/2;i.split(``).forEach((t,i)=>{e.fillText(t,r+n[i]/2,f),r+=n[i]+s})}else e.fillText(i,d,f);e.restore()}var gn={name:`CurvedText`,computed:{editor(){return Q()},opacity(){return(this.editor.text.opacity??100)/100},glyphs(){return pn(this.editor.text.content,{...this.editor.text,colors:mn(this.editor.text)})},svgSize(){return this.glyphs[0]?.svgSize||360}}},_n=[`viewBox`],vn=[`x`,`y`,`fill`,`opacity`,`font-family`,`font-weight`,`font-size`,`transform`];function yn(e,t,n,r,i,a){return m(),w(`svg`,{class:`pointer-events-none absolute inset-0 z-20 overflow-visible`,viewBox:`0 0 ${a.svgSize} ${a.svgSize}`,"data-testid":`maker-text-curved`},[(m(!0),w(C,null,A(a.glyphs,(e,t)=>(m(),w(`text`,{key:t,x:e.x,y:e.y,"text-anchor":`middle`,"dominant-baseline":`middle`,fill:e.color,opacity:a.opacity,"font-family":a.editor.text.fontFamily,"font-weight":a.editor.text.fontWeight,"font-size":a.editor.text.fontSize,transform:`rotate(${e.rotation}, ${e.x}, ${e.y})`},b(e.char),9,vn))),128))],8,_n)}var bn=Object.assign(N(gn,[[`render`,yn]]),{__name:`MakerCurvedText`}),xn={name:`DraggableText`,computed:{editor(){return Q()},displayText(){let e=this.editor.text.content;return this.editor.text.style===`vertical`?e.split(``).join(`
2`):e},textStyle(){let e=this.editor.text,t={left:`${e.x}%`,top:`${e.y}%`,transform:`translate(-50%, -50%)`,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:`${e.fontSize}px`,opacity:(e.opacity??100)/100,letterSpacing:e.style===`vertical`?`normal`:`${e.letterSpacing}px`,lineHeight:e.style===`vertical`?`${e.fontSize+e.letterSpacing}px`:`1`,whiteSpace:e.style===`vertical`?`pre-line`:`nowrap`,textAlign:`center`};return e.colorType===`gradient`?(t.backgroundImage=`linear-gradient(to right, ${e.gradientStart}, ${e.gradientEnd}
2)`,t.webkitBackgroundClip=`text`,t.backgroundClip=`text`,t.color=`transparent`):t.color=e.color,t}},methods:{onPointerDown(e){e.preventDefault();let t=this.$el.parentElement;if(!t)return;let n=t.getBoundingClientRect();this._rect=n,this._startX=e.clientX,this._startY=e.clientY,this._originX=this.editor.text.x,this._originY=this.editor.text.y,e.currentTarget.setPointerCapture?.(e.pointerId),window.addEventListener(`pointermove`,this.onPointerMove),window.addEventListener(`pointerup`,this.onPointerUp)},onPointerMove(e){let t=this._rect;if(!t)return;let n=(e.clientX-this._startX)/t.width*100,r=(e.clientY-this._startY)/t.height*100,i=Math.max(0,Math.min(100,this._originX+n)),a=Math.max(0,Math.min(100,this._originY+r));this.editor.patchText({x:i,y:a})},onPointerUp(){window.removeEventListener(`pointermove`,this.onPointerMove),window.removeEventListener(`pointerup`,this.onPointerUp)}},beforeUnmount(){this.onPointerUp()}};function Sn(e,t,n,r,i,a){return m(),w(`p`,{class:`absolute z-20 max-w-full cursor-move select-none whitespace-nowrap`,style:y(a.textStyle),"data-testid":`maker-text-overlay`,onPointerdown:t[0]||=M((...e)=>a.onPointerDown&&a.onPointerDown(...e),[`stop`])},b(a.displayText),37)}var Cn={name:`CanvasStage`,components:{CurvedText:bn,DraggableText:Object.assign(N(xn,[[`render`,Sn]]),{__name:`MakerDraggableText`})},data(){return{copy:H,dragging:!1,lastX:0,lastY:0,stageFit:1,resizeObserver:null}},computed:{editor(){return Q()},shellStyle(){return{height:`${360*this.stageFit}px`}},stageStyle(){let e=this.editor.basic.shape,t=`0`;return e===`circle`?t=`50%`:e===`rounded`&&(t=`${q*100}%`),{position:`absolute`,top:`0`,left:`0`,width:`360px`,height:`360px`,borderRadius:t,boxShadow:`0 20px 40px -12px rgba(23, 17, 79, 0.25)`,transform:`scale(${this.stageFit})`,transformOrigin:`top left`}},backgroundStyle(){let e=this.editor.background;if(e.variant===`transparent`)return{backgroundImage:`repeating-conic-gradient(#E8E5DC 0% 25%, #FFFFFF 0% 50%)`,backgroundSize:`20px 20px`};if(e.variant===`gradient`)return{backgroundImage:xt(e.gradient)};if(e.variant===`pattern`){let t=cn(e.pattern.id),n={backgroundColor:e.pattern.backgroundColor};return t&&(n.backgroundImage=ln(t,e.pattern.foregroundColor,(e.pattern.foregroundOpacity??76)/100),n.backgroundSize=`${e.pattern.scale??25}%`),n}return e.variant===`image`&&e.image.url?{backgroundImage:`url("${e.image.url}")`,backgroundSize:`cover`,backgroundPosition:`center`}:{backgroundColor:e.solidColor}},imageStyle(){let e=this.editor.basic;return{transform:[`translate(${e.x}px, ${e.y}px)`,`scale(${e.scale})`,`rotate(${e.rotation}deg)`,e.flipH?`rotateY(180deg)`:``,e.flipV?`rotateX(180deg)`:``].filter(Boolean).join(` `),transformOrigin:`center center`,filter:Tt(this.editor.filter)}},ring(){return Rt(this.editor.border)},rectRing(){return Bt(this.editor.border,this.editor.basic.shape)},borderStroke(){let e=Z(this.editor.border);return e.type===`gradient`?`url(#maker-border-gradient)`:e.color},borderStops(){let e=Z(this.editor.border);return e.type===`gradient`?e.colors.map((t,n)=>({color:t,offset:e.stops?.[n]??n/Math.max(1,e.colors.length-1)*100})):[]},borderStyle(){let e=this.editor.border.offset||0,t=this.editor.basic.shape===`circle`&&this.editor.border.rotation||0;return{inset:`${e}px`,transform:`rotate(${t}deg)`}},showStraightText(){let e=this.editor.text;return!!e.content&&e.style!==`curved`},showCurvedText(){let e=this.editor.text;return!!e.content&&e.style===`curved`}},mounted(){this.updateStageFit(),typeof ResizeObserver<`u`?(this.resizeObserver=new ResizeObserver(()=>this.updateStageFit()),this.resizeObserver.observe(this.$el)):window.addEventListener(`resize`,this.updateStageFit)},beforeUnmount(){this.unbindWindow(),this.resizeObserver?.disconnect(),window.removeEventListener(`resize`,this.updateStageFit)},methods:{updateStageFit(){let e=this.$el?.clientWidth||360;this.stageFit=Math.min(1,e/360)||1},onPointerDown(e){this.editor.hasImage&&(e.preventDefault(),this.dragging=!0,this.lastX=e.clientX,this.lastY=e.clientY,e.currentTarget.setPointerCapture?.(e.pointerId),window.addEventListener(`pointermove`,this.onPointerMove),window.addEventListener(`pointerup`,this.onPointerUp))},onPointerMove(e){if(!this.dragging)return;let t=this.stageFit||1,n=(e.clientX-this.lastX)/t,r=(e.clientY-this.lastY)/t;this.lastX=e.clientX,this.lastY=e.clientY;let i=Math.max(-200,Math.min(200,this.editor.basic.x+n)),a=Math.max(-100,Math.min(100,this.editor.basic.y+r));this.editor.patchBasic({x:i,y:a})},onPointerUp(){this.dragging=!1,this.unbindWindow()},unbindWindow(){window.removeEventListener(`pointermove`,this.onPointerMove),window.removeEventListener(`pointerup`,this.onPointerUp)}}},wn=[`src`],Tn={key:1,class:`absolute inset-0 flex items-center justify-center px-6 text-center text-body-sm text-ink-muted`},En={id:`maker-border-gradient`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`},Dn=[`offset`,`stop-color`],On=[`r`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-dasharray`],kn=[`d`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-dasharray`,`stroke-dashoffset`],An={key:5,class:`absolute inset-0 flex items-center justify-center bg-navy/50 text-white`},jn={class:`text-body-sm font-semibold`},Mn={key:0,"data-testid":`maker-removal-failed`,class:`mt-3 rounded-btn bg-danger-bg px-3 py-2 text-body-sm text-danger`};function Nn(e,t,n,a,o,s){let c=O(`DraggableText`),l=O(`CurvedText`);return m(),w(`div`,{class:`relative mx-auto w-full max-w-[360px]`,"data-testid":`maker-preview`,style:y(s.shellStyle)},[i(`div`,{ref:`stage`,class:`relative overflow-hidden bg-line`,style:y(s.stageStyle),onPointerdown:t[0]||=(...e)=>s.onPointerDown&&s.onPointerDown(...e)}
2,[i(`div`,{class:`absolute inset-0`,style:y(s.backgroundStyle)},null,4),s.editor.workingUrl?(m(),w(`img`,{key:0,src:s.editor.workingUrl,alt:`Your profile picture preview`,draggable:`false`,class:`absolute inset-0 h-full w-full object-contain select-none`,style:y(s.imageStyle)},null,12,wn)):(m(),w(`p`,Tn,b(o.copy.emptyStage),1)),s.editor.border.width>0?(m(),w(`svg`,{key:2,class:`pointer-events-none absolute z-10`,viewBox:`0 0 100 100`,"data-testid":`maker-border-ring`,style:y(s.borderStyle)},[i(`defs`,null,[i(`linearGradient`,En,[(m(!0),w(C,null,A(s.borderStops,(e,t)=>(m(),w(`stop`,{key:t,offset:`${e.offset}%`,"stop-color":e.color},null,8,Dn))),128))])]),s.editor.basic.shape===`circle`?(m(),w(`circle`,{key:0,cx:`50`,cy:`50`,r:s.ring.radius,fill:`none`,stroke:s.borderStroke,"stroke-width":s.ring.width,"stroke-linecap":s.ring.cap,"stroke-dasharray":s.ring.dashArray},null,8,On)):(m(),w(`path`,{key:1,d:s.rectRing.d,fill:`none`,pathLength:`100`,stroke:s.borderStroke,"stroke-width":s.rectRing.width,"stroke-linecap":s.rectRing.cap,"stroke-dasharray":s.rectRing.dashArray,"stroke-dashoffset":s.rectRing.dashOffset},null,8,kn))],4)):f(``,!0),s.showStraightText?(m(),r(c,{key:3})):s.showCurvedText?(m(),r(l,{key:4})):f(``,!0),s.editor.imageState.isRemoving?(m(),w(`div`,An,[i(`p`,jn,b(o.copy.removing),1)])):f(``,!0)],36),s.editor.imageState.removalFailed?(m(),w(`p`,Mn,b(s.editor.imageState.removalFailed===`unsupported`?o.copy.removalUnsupported:o.copy.removalFailed),1)):f(``,!0)],4)}var Pn=Object.assign(N(Cn,[[`render`,Nn]]),{__name:`MakerCanvasStage`}),Fn={name:`UploadPanel`,data(){return{copy:H,dragging:!1}},computed:{editor(){return Q()},dropzoneStyle(){let e=this.editor.basic.shape,t=`0`;return e===`circle`?t=`50%`:e===`rounded`&&(t=`${q*100}%`),{borderRadius:t}}},methods:{openPicker(){this.$refs.fileInput?.click()},onFileChange(e){let t=e.target.files&&e.target.files[0];e.target.value=``,t&&this.handleFile(t)},onDrop(e){this.dragging=!1;let t=e.dataTransfer?.files?.[0];t&&t.type.startsWith(`image/`)&&this.handleFile(t)},async handleFile(e){this.$analytics.capture(st);try{let t=await this.editor.ingestFile(e);t.hasCutout&&this.$analytics.capture(ct),t.removalFailed&&(this.$analytics.capture(lt,{reason:t.removalFailed}),this.$popup.show({title:this.copy.removalPopupTitle,message:t.removalFailed===`unsupported`?this.copy.removalUnsupported:this.copy.removalFailed,buttonText:this.copy.removalPopupButton}))}catch(e){this.handleError(e)}}}},In={class:`text-body-sm font-semibold text-navy`},Ln={class:`mt-1 text-caption text-ink-2`},Rn={class:`mt-2 text-caption text-ink-faint`};function zn(e,t,n,r,a,o){return m(),w(`div`,null,[o.editor.hasImage?f(``,!0):(m(),w(`div`,{key:0,class:c([`absolute inset-0 z-20 flex cursor-pointer flex-col items-center justify-center border-2 border-dashed border-navy-border bg-navy-bg px-8 text-center`,{"border-teal !bg-[#E8F6F4]":a.dragging}]),style:y(o.dropzoneStyle),onDragover:t[1]||=M(e=>a.dragging=!0,[`prevent`]),onDragleave:t[2]||=M(e=>a.dragging=!1,[`prevent`]),onDrop:t[3]||=M((...e)=>o.onDrop&&o.onDrop(...e),[`prevent`]),onClick:t[4]||=(...e)=>o.openPicker&&o.openPicker(...e)},[i(`p`,In,b(a.copy.uploadTitle),1),i(`p`,Ln,b(a.copy.uploadHint),1),i(`button`,{type:`button`,class:`mt-3 inline-flex items-center rounded-btn bg-navy px-4 py-2 text-body-sm font-semibold text-white shadow-btn-rest`,onClick:t[0]||=M((...e)=>o.openPicker&&o.openPicker(...e),[`stop`])},b(a.copy.uploadButton),1),i(`p`,Rn,b(a.copy.uploadAcceptNote),1)],38)),i(`input`,{ref:`fileInput`,type:`file`,accept:`image/*`,capture:`environment`,class:`sr-only`,"data-testid":`maker-file-input`,onChange:t[5]||=(...e)=>o.onFileChange&&o.onFileChange(...e)},null,544)])}var Bn=Object.assign(N(Fn,[[`render`,zn]]),{__name:`MakerUploadPanel`}),$={__name:`Slider`,props:{defaultValue:{type:Array,required:!1},modelValue:{type:[Array,null],required:!1},disabled:{type:Boolean,required:!1},orientation:{type:String,required:!1},dir:{type:String,required:!1},inverted:{type:Boolean,required:!1},min:{type:Number,required:!1},max:{type:Number,required:!1},step:{type:Number,required:!1},minStepsBetweenThumbs:{type:Number,required:!1},thumbAlignment:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},class:{type:[Boolean,null,String,Object,Array],required:!1,skipCheck:!0}},emits:[`update:modelValue`,`valueCommit`],setup(e,{emit:t}){let n=e,i=t,a=je(ge(n,`class`),i);return(t,i)=>(m(),r(v(et),s({class:v(he)(`relative flex w-full touch-none select-none items-center data-[orientation=vertical]:flex-col data-[orientation=vertical]:w-2 data-[orientation=vertical]:h-full`,n.class)},v(a)),{default:k(()=>[p(v(at),{class:`relative h-1 w-full data-[orientation=vertical]:w-1 grow overflow-hidden rounded-full bg-line`},{default:k(()=>[p(v(nt),{class:`absolute h-full data-[orientation=vertical]:w-full bg-navy`})]),_:1}),(m(!0),w(C,null,A(e.modelValue,(e,t)=>(m(),r(v(it),{key:t,class:`block h-3.5 w-3.5 rounded-full border-2 border-navy bg-white shadow-btn-rest ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50`}))),128))]),_:1}
2,16,[`class`]))}},Vn=`https://storage.googleapis.com/headshotpro-public-content/headshotpro/images/backgrounds`,Hn=Array.from({length:123},(e,t)=>({id:`photo-${t+1}`,name:`Photo ${t+1}`,url:`${Vn}/${t+1}.jpeg`})),Un={name:`BackgroundPanel`,components:{Slider:$},data(){return{copy:H,solids:W,gradients:vt,patterns:an,images:Hn,types:[{id:`solid`,label:H.bgTypeSolid},{id:`gradient`,label:H.bgTypeGradient},{id:`pattern`,label:H.bgTypePattern},{id:`image`,label:H.bgTypeImage}]}},computed:{editor(){return Q()},background(){return this.editor.background},activeType(){return this.background.variant===`transparent`?`solid`:this.background.variant}},methods:{selectType(e){e!==this.activeType&&(this.editor.setBackgroundVariant(e),this.$analytics.capture(U,{id:this.editor.appliedBackgroundId}))},isSolidSelected(e){return e.type===`transparent`?this.background.variant===`transparent`:this.background.variant===`solid`&&this.background.solidId===e.id},swatchStyle(e){return e.type===`transparent`?{backgroundImage:`repeating-conic-gradient(#E5E2D8 0% 25%, #FFFFFF 0% 50%)`,backgroundSize:`12px 12px`}:{backgroundColor:e.color}},presetGradientCss(e){return`linear-gradient(135deg, ${e.colors.map((t,n)=>`${t} ${e.stops[n]}%`).join(`, `)})`},patternSwatchStyle(e){return{backgroundImage:ln(e,`#17114F`,.9),backgroundSize:`55%`}},select(e){this.editor.applyBackground(e,{id:e.id}),this.$analytics.capture(U,{id:e.id})},onCustom(e){this.editor.setCustomSolid(e),this.$analytics.capture(U,{id:`custom`})},selectGradient(e){this.editor.applyGradientPreset(e),this.$analytics.capture(U,{id:e.id})},selectImage(e){this.editor.setBackgroundImage(e.url),this.$analytics.capture(U,{id:e.id})},onGradientAngle(e){let t=Array.isArray(e)?e[0]:e;typeof t==`number`&&!Number.isNaN(t)&&this.editor.patchBackgroundGradient({angle:t})},onPatternSlider(e,t){let n=Array.isArray(t)?t[0]:t;typeof n==`number`&&!Number.isNaN(n)&&this.editor.patchBackgroundPattern({[e]:n})}}},Wn={"data-testid":`maker-background`},Gn={class:`flex justify-center gap-2`},Kn=[`data-testid`,`onClick`],qn={viewBox:`0 0 24 24`,class:`h-4 w-4`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`},Jn={key:0,x:`4`,y:`4`,width:`16`,height:`16`,rx:`3`,fill:`currentColor`,stroke:`none`},Yn={key:0,class:`mt-5 text-center`},Xn={class:`flex flex-wrap justify-center gap-2`},Zn=[`title`,`data-testid`,`onClick`],Qn={class:`mt-3.5 inline-flex cursor-pointer items-center gap-2 text-caption font-semibold text-ink-2`},$n=[`value`],er={key:1,class:`mt-5`},tr={class:`text-caption font-bold uppercase tracking-[0.08em] text-ink-faint`},nr={class:`mt-2.5 flex flex-wrap gap-2.5`},rr=[`title`,`data-testid`,`onClick`],ir={class:`mt-4 grid grid-cols-2 gap-x-4`},ar={class:`block text-caption text-ink-muted`},or=[`value`],sr={class:`block text-caption text-ink-muted`},cr=[`value`],lr={class:`mt-4 block text-caption text-ink-muted`},ur={key:2,class:`mt-5`},dr={class:`text-caption font-bold uppercase tracking-[0.08em] text-ink-faint`},fr={class:`mt-2.5 grid grid-cols-4 gap-2`},pr=[`title`,`data-testid`,`onClick`],mr={class:`mt-4 grid grid-cols-2 gap-x-4`},hr={class:`block text-caption text-ink-muted`},gr=[`value`],_r={class:`block text-caption text-ink-muted`},vr=[`value`],yr={class:`mt-4 grid gap-x-8 gap-y-4 sm:grid-cols-2`},br={class:`block text-caption text-ink-muted`},xr={class:`block text-caption text-ink-muted`},Sr={key:3,class:`mt-5`},Cr={class:`text-caption font-bold uppercase tracking-[0.08em] text-ink-faint`},wr={class:`mt-2.5 grid max-h-72 grid-cols-4 gap-2 overflow-y-auto pr-1`},Tr=[`title`,`data-testid`,`onClick`],Er=[`src`,`alt`];function Dr(e,t,n,r,a,o){let s=$;return m(),w(`div`,Wn,[i(`div`,Gn,[(m(!0),w(C,null,A(a.types,e=>(m(),w(`button`,{key:e.id,type:`button`,class:c([`flex min-w-[68px] flex-col items-center gap-1 rounded-btn border px-3 py-2 text-caption font-semibold`,o.activeType===e.id?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),"data-testid":`maker-bg-type-${e.id}`,onClick:t=>o.selectType(e.id)},[(m(),w(`svg`,qn,[e.id===`solid`?(m(),w(`rect`,Jn)):e.id===`gradient`?(m(),w(C,{key:1},[t[8]||=i(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`3`},null,-1),t[9]||=i(`path`,{d:`M4 16 L16 4`,"stroke-opacity":`0.7`},null,-1),t[10]||=i(`path`,{d:`M8 20 L20 8`,"stroke-opacity":`0.4`},null,-1)],64)):e.id===`pattern`?(m(),w(C,{key:2},[t[11]||=i(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`},null,-1),t[12]||=i(`path`,{d:`M9.5 4v16M14.5 4v16M4 9.5h16M4 14.5h16`},null,-1)],64)):(m(),w(C,{key:3},[t[13]||=i(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`3`},null,-1),t[14]||=i(`circle`,{cx:`9.5`,cy:`9.5`,r:`1.5`,fill:`currentColor`,stroke:`none`},null,-1),t[15]||=i(`path`,{d:`M4 16l4.5-4.5a1.5 1.5 0 012 0L16 17m-2.5-2.5L15 13a1.5 1.5 0 012 0l3 3`},null,-1)],64))])),d(` `+b(e.label),1)],10,Kn))),128))]),o.activeType===`solid`?(m(),w(`div`,Yn,[i(`div`,Xn,[(m(!0),w(C,null,A(a.solids,e=>(m(),w(`button`,{key:e.id,type:`button`,class:c([`h-[34px] w-[34px] rounded-[10px] border border-navy/10`,o.isSolidSelected(e)?`outline outline-2 outline-offset-2 outline-teal`:``]),title:e.name,"data-testid":`maker-bg-${e.id}`,style:y(o.swatchStyle(e)),onClick:t=>o.select(e)},null,14,Zn))),128))]),i(`label`,Qn,[t[16]||=i(`i`,{class:`inline-block h-[18px] w-[18px] rounded-md`,style:{background:`conic-gradient(#f66, #fc6, #6c6, #6cf, #66f, #f6f, #f66)`}},null,-1),d(` `+b(a.copy.customColor)+` `,1),i(`input`,{type:`color`,class:`sr-only`,value:o.editor.background.solidColor,onInput:t[0]||=e=>o.onCustom(e.target.value)},null,40,$n)])])):o.activeType===`gradient`?(m(),w(`div`,er,[i(`p`,tr,b(a.copy.bgGradients),1),i(`div`,nr,[(m(!0),w(C,null,A(a.gradients,e=>(m(),w(`button`,{key:e.id,type:`button`,class:c([`h-[38px] w-[38px] rounded-full border border-navy/10`,o.background.gradient.presetId===e.id?`outline outline-2 outline-offset-2 outline-teal`:``]),title:e.name,"data-testid":`maker-bg-gradient-${e.id}`,style:y({backgroundImage:o.presetGradientCss(e)}),onClick:t=>o.selectGradient(e)},null,14,rr))),128))]),i(`div`,ir,[i(`label`,ar,[d(b(a.copy.bgStartColor)+` `,1),i(`input`,{type:`color`,class:`mt-1.5 block h-[34px] w-full cursor-pointer rounded-[10px] border border-line bg-surface`,"data-testid":`maker-bg-gradient-start`,value:o.background.gradient.startColor,onInput:t[1]||=e=>
2o.editor.patchBackgroundGradient({startColor:e.target.value})},null,40,or)]),i(`label`,sr,[d(b(a.copy.bgEndColor)+` `,1),i(`input`,{type:`color`,class:`mt-1.5 block h-[34px] w-full cursor-pointer rounded-[10px] border border-line bg-surface`,"data-testid":`maker-bg-gradient-end`,value:o.background.gradient.endColor,onInput:t[2]||=e=>o.editor.patchBackgroundGradient({endColor:e.target.value})},null,40,cr)])]),i(`label`,lr,[d(b(a.copy.bgAngle)+` `,1),p(s,{class:`mt-2`,"model-value":[o.background.gradient.angle],min:0,max:360,step:1,"data-testid":`maker-bg-gradient-angle`,"onUpdate:modelValue":t[3]||=e=>o.onGradientAngle(e)},null,8,[`model-value`])])])):o.activeType===`pattern`?(m(),w(`div`,ur,[i(`p`,dr,b(a.copy.bgPatterns),1),i(`div`,fr,[(m(!0),w(C,null,A(a.patterns,e=>(m(),w(`button`,{key:e.name,type:`button`,class:c([`h-11 rounded-[10px] border border-navy/10 bg-white`,o.background.pattern.id===e.name?`outline outline-2 outline-offset-2 outline-teal`:``]),title:e.name,"data-testid":`maker-bg-pattern-${e.name}`,style:y(o.patternSwatchStyle(e)),onClick:t=>o.editor.patchBackgroundPattern({id:e.name})},null,14,pr))),128))]),i(`div`,mr,[i(`label`,hr,[d(b(a.copy.bgPatternBackground)+` `,1),i(`input`,{type:`color`,class:`mt-1.5 block h-[34px] w-full cursor-pointer rounded-[10px] border border-line bg-surface`,"data-testid":`maker-bg-pattern-bg-color`,value:o.background.pattern.backgroundColor,onInput:t[4]||=e=>o.editor.patchBackgroundPattern({backgroundColor:e.target.value})},null,40,gr)]),i(`label`,_r,[d(b(a.copy.bgPatternForeground)+` `,1),i(`input`,{type:`color`,class:`mt-1.5 block h-[34px] w-full cursor-pointer rounded-[10px] border border-line bg-surface`,"data-testid":`maker-bg-pattern-fg-color`,value:o.background.pattern.foregroundColor,onInput:t[5]||=e=>o.editor.patchBackgroundPattern({foregroundColor:e.target.value})},null,40,vr)])]),i(`div`,yr,[i(`label`,br,[d(b(a.copy.bgForegroundOpacity)+` `,1),p(s,{class:`mt-2`,"model-value":[o.background.pattern.foregroundOpacity],min:5,max:100,step:1,"data-testid":`maker-bg-pattern-opacity`,"onUpdate:modelValue":t[6]||=e=>o.onPatternSlider(`foregroundOpacity`,e)},null,8,[`model-value`])]),i(`label`,xr,[d(b(a.copy.bgPatternScale)+` `,1),p(s,{class:`mt-2`,"model-value":[o.background.pattern.scale],min:5,max:100,step:1,"data-testid":`maker-bg-pattern-scale`,"onUpdate:modelValue":t[7]||=e=>o.onPatternSlider(`scale`,e)},null,8,[`model-value`])])])])):(m(),w(`div`,Sr,[i(`p`,Cr,b(a.copy.bgImages),1),i(`div`,wr,[(m(!0),w(C,null,A(a.images,e=>(m(),w(`button`,{key:e.id,type:`button`,class:c([`aspect-[4/3] overflow-hidden rounded-[10px] border border-navy/10 bg-surface-2`,o.background.image.url===e.url?`outline outline-2 outline-offset-2 outline-teal`:``]),title:e.name,"data-testid":`maker-bg-image-${e.id}`,onClick:t=>o.selectImage(e)},[i(`img`,{src:e.url,alt:e.name,loading:`lazy`,class:`h-full w-full object-cover`},null,8,Er)],10,Tr))),128))])]))])}var Or=Object.assign(N(Un,[[`render`,Dr]]),{__name:`MakerBackgroundPanel`}),kr={name:`BridgePanel`,props:{placement:{type:String,default:`bridge-inflow`}},data(){return{copy:H,viewed:!1,observer:null}},computed:{href(){return`/go/hsp?placement=${this.placement}`}},mounted(){typeof IntersectionObserver>`u`||(this.observer=new IntersectionObserver(e=>{this.viewed||e.some(e=>e.isIntersecting)&&(this.viewed=!0,this.$analytics.capture(dt,{placement:this.placement}))},{threshold:.35}),this.observer.observe(this.$el))},beforeUnmount(){this.observer?.disconnect()},methods:{onClick(){this.$analytics.capture(ft,{placement:this.placement})}}},Ar=[`data-testid`,`data-placement`],jr={class:`text-ink-2`},Mr={class:`font-bold text-accent-darker`},Nr=[`href`,`data-testid`];function Pr(e,t,n,r,a,o){return m(),w(`section`,{ref:`root`,class:`flex flex-wrap items-center justify-center gap-x-3.5 gap-y-1 border-t border-teal/20 bg-accent-bg px-7 py-3.5 text-center text-body-sm`,"data-testid":`maker-bridge-${n.placement}`,"data-placement":n.placement},[i(`p`,jr,[i(`b`,Mr,b(a.copy.bridgeHeadline),1),d(` `+b(a.copy.bridgeBody),1)]),i(`a`,{href:o.href,class:`font-bold text-accent-darker underline hover:text-accent-deep`,"data-testid":`maker-bridge-cta-${n.placement}`,onClick:t[0]||=(...e)=>o.onClick&&o.onClick(...e)},b(a.copy.bridgeCta)+` → `,9,Nr)],8,Ar)}var Fr=Object.assign(N(kr,[[`render`,Pr]]),{__name:`MakerBridgePanel`}),Ir={name:`FiltersPanel`,components:{Slider:$},data(){return{copy:H,presets:X,sliders:Ct,sliderLabels:{brightness:H.filterBrightness,contrast:H.filterContrast,
2saturation:H.filterSaturation,blur:H.filterBlur,grayscale:H.filterGrayscale,hueRotate:H.filterHueRotate,invert:H.filterInvert,sepia:H.filterSepia}}},computed:{editor(){return Q()}},methods:{isActive(e){return e.id===`none`?!this.editor.filter.preset:this.editor.filter.preset===e.id},onSlider(e,t){let n=Array.isArray(t)?t[0]:t;typeof n==`number`&&!Number.isNaN(n)&&this.editor.patchFilter({[e]:n})}}},Lr={"data-testid":`maker-filters`},Rr={class:`flex flex-wrap justify-center gap-2`},zr=[`data-testid`,`onClick`],Br={class:`mt-4 grid gap-x-8 gap-y-5 text-left sm:grid-cols-2`};function Vr(e,t,n,r,a,o){let s=$;return m(),w(`div`,Lr,[i(`div`,Rr,[(m(!0),w(C,null,A(a.presets,e=>(m(),w(`button`,{key:e.id,type:`button`,class:c([`rounded-full border px-3.5 py-1.5 text-caption font-semibold`,o.isActive(e)?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),"data-testid":`maker-filter-preset-${e.id}`,onClick:t=>o.editor.applyFilterPreset(e.id)},b(e.name),11,zr))),128))]),i(`div`,Br,[(m(!0),w(C,null,A(a.sliders,e=>(m(),w(`label`,{key:e.key,class:`block text-caption text-ink-muted`},[d(b(a.sliderLabels[e.key])+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.filter[e.key]],min:e.min,max:e.max,step:e.step,"onUpdate:modelValue":t=>o.onSlider(e.key,t)},null,8,[`model-value`,`min`,`max`,`step`,`onUpdate:modelValue`])]))),128))])])}var Hr=Object.assign(N(Ir,[[`render`,Vr]]),{__name:`MakerFiltersPanel`}),Ur={name:`PositionPanel`,components:{Slider:$},data(){return{copy:H}},computed:{editor(){return Q()}},methods:{onSlider(e,t){let n=Array.isArray(t)?t[0]:t;typeof n==`number`&&!Number.isNaN(n)&&this.editor.patchBasic({[e]:n})}}},Wr={class:`flex justify-center gap-2`},Gr={class:`mt-4 grid gap-x-8 gap-y-5 text-left sm:grid-cols-2`},Kr={class:`block text-caption text-ink-muted`},qr={class:`block text-caption text-ink-muted`},Jr={class:`block text-caption text-ink-muted`},Yr={class:`block text-caption text-ink-muted`};function Xr(e,t,n,r,a,o){let s=$;return m(),w(`div`,null,[i(`div`,Wr,[i(`button`,{type:`button`,class:c([`rounded-btn border px-4 py-2 text-caption font-semibold`,o.editor.basic.flipH?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),"data-testid":`maker-flip-h`,onClick:t[0]||=e=>o.editor.patchBasic({flipH:!o.editor.basic.flipH})},b(a.copy.flipH),3),i(`button`,{type:`button`,class:c([`rounded-btn border px-4 py-2 text-caption font-semibold`,o.editor.basic.flipV?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),"data-testid":`maker-flip-v`,onClick:t[1]||=e=>o.editor.patchBasic({flipV:!o.editor.basic.flipV})},b(a.copy.flipV),3)]),i(`div`,Gr,[i(`label`,Kr,[d(b(a.copy.scale)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.basic.scale],min:.5,max:3,step:.1,"onUpdate:modelValue":t[2]||=e=>o.onSlider(`scale`,e)},null,8,[`model-value`])]),i(`label`,qr,[d(b(a.copy.rotation)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.basic.rotation],min:-180,max:180,step:1,"onUpdate:modelValue":t[3]||=e=>o.onSlider(`rotation`,e)},null,8,[`model-value`])]),i(`label`,Jr,[d(b(a.copy.offsetX)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.basic.x],min:-200,max:200,step:1,"onUpdate:modelValue":t[4]||=e=>o.onSlider(`x`,e)},null,8,[`model-value`])]),i(`label`,Yr,[d(b(a.copy.offsetY)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.basic.y],min:-100,max:100,step:1,"onUpdate:modelValue":t[5]||=e=>o.onSlider(`y`,e)},null,8,[`model-value`])])])])}var Zr=Object.assign(N(Ur,[[`render`,Xr]]),{__name:`MakerPositionPanel`}),Qr={name:`BorderPanel`,components:{Slider:$},data(){return{copy:H,rings:At}},computed:{editor(){return Q()}},methods:{onSlider(e,t){let n=Array.isArray(t)?t[0]:t;typeof n==`number`&&!Number.isNaN(n)&&this.editor.patchBorder({[e]:n})}}},$r={"data-testid":`maker-border`},ei={class:`flex justify-center gap-2`},ti={key:0,class:`mt-4 inline-flex cursor-pointer items-center gap-2 text-caption font-semibold text-ink-2`},ni=[`value`],ri={key:1,class:`mt-4 flex flex-wrap justify-center gap-2`},ii=[`title`,`onClick`],ai={class:`mt-4 grid gap-x-8 gap-y-5 text-left sm:grid-cols-2`},oi={class:`block text-caption text-ink-muted`},si={class:`block text-caption text-ink-muted`},ci={class:`block text-caption text-ink-muted`},li={class:`block text-caption text-ink-muted`},ui={class:`block text-caption text-ink-muted`};function di(e,t,n,r,a,o){let s=$;return m(),w(`div`,$r,[i(`div`,ei,[i(`button`,{type:`button`,class:c([`rounded-btn border px-4 py-2 text-caption font-semibold`,o.editor.border.colorType===`solid`?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),"data-testid":`maker-border-solid`,onClick:t[0]||=e=>o.editor.patchBorder({colorType:`solid`})},b(a.copy.borderSolid),3),i(`button`,{type:`button`,class:c([`rounded-btn border px-4 py-2 text-caption font-semibold`,o.editor.border.colorType===`gradient`?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),"data-testid":`maker-border-gradient`,onClick:t[1]||=e=>o.editor.patchBorder({colorType:`gradient`})},b(a.copy.borderGradient),3),i(`button`,{type:`button`,class:c([`rounded-btn border px-4 py-2 text-caption font-semibold`,o.editor.border.capStyle===`round`?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),onClick:t[2]||=e=>o.editor.patchBorder({capStyle:`round`})},b(a.copy.borderCapRound),3),i(`button`,{type:`button`,class:c([`rounded-btn border px-4 py-2 text-caption font-semibold`,o.editor.border.capStyle===`butt`?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),onClick:t[3]||=e=>o.editor.patchBorder({capStyle:`butt`})},b(a.copy.borderCapButt),3)]),o.editor.border.colorType===`solid`?(m(),w(`label`,ti,[d(b(a.copy.borderColor)+` `,1),i(`input`,{type:`color`,class:`h-[34px] w-[34px] curs
2or-pointer rounded-[10px] border border-line bg-surface`,value:o.editor.border.color,"data-testid":`maker-border-color`,onInput:t[4]||=e=>o.editor.patchBorder({color:e.target.value})},null,40,ni)])):(m(),w(`div`,ri,[(m(!0),w(C,null,A(a.rings,e=>(m(),w(`button`,{key:e.id,type:`button`,class:c([`h-[34px] w-[34px] rounded-[10px] border border-navy/10`,o.editor.border.gradientPreset===e.id?`outline outline-2 outline-offset-2 outline-teal`:``]),title:e.name,style:y({backgroundImage:`linear-gradient(135deg, ${e.colors.join(`, `)})`}),onClick:t=>o.editor.patchBorder({gradientPreset:e.id})},null,14,ii))),128))])),i(`div`,ai,[i(`label`,oi,[d(b(a.copy.borderWidth)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.border.width],min:0,max:40,step:1,"data-testid":`maker-border-width`,"onUpdate:modelValue":t[5]||=e=>o.onSlider(`width`,e)},null,8,[`model-value`])]),i(`label`,si,[d(b(a.copy.borderOpacity)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.border.opacity],min:0,max:100,step:1,"onUpdate:modelValue":t[6]||=e=>o.onSlider(`opacity`,e)},null,8,[`model-value`])]),i(`label`,ci,[d(b(a.copy.borderOffset)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.border.offset],min:-20,max:40,step:1,"onUpdate:modelValue":t[7]||=e=>o.onSlider(`offset`,e)},null,8,[`model-value`])]),i(`label`,li,[d(b(a.copy.borderAmount)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.border.amount],min:0,max:100,step:1,"onUpdate:modelValue":t[8]||=e=>o.onSlider(`amount`,e)},null,8,[`model-value`])]),i(`label`,ui,[d(b(a.copy.borderRotation)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.border.rotation],min:0,max:360,step:1,"onUpdate:modelValue":t[9]||=e=>o.onSlider(`rotation`,e)},null,8,[`model-value`])])])])}var fi=Object.assign(N(Qr,[[`render`,di]]),{__name:`MakerBorderPanel`}),pi={name:`TextPanel`,components:{Slider:$},data(){return{copy:H,fonts:Dt,weights:Ot,styles:kt,styleLabels:{straight:H.textStyleStraight,vertical:H.textStyleVertical,curved:H.textStyleCurved}}},computed:{editor(){return Q()}},methods:{onSlider(e,t){let n=Array.isArray(t)?t[0]:t;typeof n==`number`&&!Number.isNaN(n)&&this.editor.patchText({[e]:n})}}},mi={"data-testid":`maker-text`,class:`text-left`},hi={class:`grid gap-x-8 gap-y-5 sm:grid-cols-2`},gi={class:`block text-caption text-ink-muted`},_i=[`value`],vi={class:`flex items-end gap-2`},yi=[`data-testid`,`onClick`],bi={class:`block text-caption text-ink-muted`},xi=[`value`],Si=[`value`],Ci={class:`block text-caption text-ink-muted`},wi=[`value`],Ti=[`value`],Ei={class:`mt-3 flex items-center gap-2`},Di={class:`ml-2 text-caption text-ink-muted`},Oi=[`value`],ki=[`value`],Ai=[`value`],ji={class:`mt-4 grid gap-x-8 gap-y-5 sm:grid-cols-2`},Mi={class:`block text-caption text-ink-muted`},Ni={class:`block text-caption text-ink-muted`},Pi={class:`block text-caption text-ink-muted`},Fi={class:`block text-caption text-ink-muted`},Ii={class:`block text-caption text-ink-muted`},Li={class:`flex items-end gap-2`};function Ri(e,t,n,r,a,o){let s=$;return m(),w(`div`,mi,[i(`div`,hi,[i(`label`,gi,[d(b(a.copy.textContent)+` `,1),i(`input`,{type:`text`,class:`mt-1 w-full rounded-btn border border-line bg-surface px-3 py-2 text-body-sm text-navy`,value:o.editor.text.content,"data-testid":`maker-text-input`,onInput:t[0]||=e=>o.editor.patchText({content:e.target.value})},null,40,_i)]),i(`div`,vi,[(m(!0),w(C,null,A(a.styles,e=>(m(),w(`button`,{key:e,type:`button`,class:c([`flex-1 rounded-btn border px-2 py-2 text-caption font-semibold`,o.editor.text.style===e?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),"data-testid":`maker-text-style-${e}`,onClick:t=>o.editor.patchText({style:e})},b(a.styleLabels[e]),11,yi))),128))]),i(`label`,bi,[d(b(a.copy.textFont)+` `,1),i(`select`,{class:`mt-1 w-full rounded-btn border border-line bg-surface px-3 py-2 text-body-sm text-navy`,value:o.editor.text.fontFamily,onChange:t[1]||=e=>o.editor.patchText({fontFamily:e.target.value})},[(m(!0),w(C,null,A(a.fonts,e=>(m(),w(`option`,{key:e,value:e},b(e),9,Si))),128))],40,xi)]),i(`label`,Ci,[d(b(a.copy.textWeight)+` `,1),i(`select`,{class:`mt-1 w-full rounded-btn border border-line bg-surface px-3 py-2 text-body-sm text-navy`,value:o.editor.text.fontWeight,onChange:t[2]||=e=>o.editor.patchText({fontWeight:e.target.value})},[(m(!0),w(C,null,A(a.weights,e=>(m(),w(`option`,{key:e,value:e},b(e),9,Ti))),128))],40,wi)])]),i(`div`,Ei,[i(`button`,{type:`button`,class:c([`rounded-btn border px-4 py-2 text-caption font-semibold`,o.editor.text.colorType===`solid`?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),onClick:t[3]||=e=>o.editor.patchText({colorType:`solid`})},b(a.copy.borderSolid),3),i(`button`,{type:`button`,class:c([`rounded-btn border px-4 py-2 text-caption font-semibold`,o.editor.text.colorType===`gradient`?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),onClick:t[4]||=e=>o.editor.patchText({colorType:`gradient`})},b(a.copy.borderGradient),3),o.editor.text.colorType===`solid`?(m(),w(C,{key:0},[i(`span`,Di,b(a.copy.textColor),1),i(`input`,{type:`color`,class:`h-[34px] w-[34px] curs
2or-pointer rounded-[10px] border border-line bg-surface`,value:o.editor.text.color,onInput:t[5]||=e=>o.editor.patchText({color:e.target.value})},null,40,Oi)],64)):(m(),w(C,{key:1},[i(`input`,{type:`color`,class:`ml-2 h-[34px] w-[34px] cursor-pointer rounded-[10px] border border-line bg-surface`,value:o.editor.text.gradientStart,onInput:t[6]||=e=>o.editor.patchText({gradientStart:e.target.value})},null,40,ki),i(`input`,{type:`color`,class:`h-[34px] w-[34px] cursor-pointer rounded-[10px] border border-line bg-surface`,value:o.editor.text.gradientEnd,onInput:t[7]||=e=>o.editor.patchText({gradientEnd:e.target.value})},null,40,Ai)],64))]),i(`div`,ji,[i(`label`,Mi,[d(b(a.copy.textSize)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.text.fontSize],min:8,max:72,step:1,"onUpdate:modelValue":t[8]||=e=>o.onSlider(`fontSize`,e)},null,8,[`model-value`])]),i(`label`,Ni,[d(b(a.copy.textOpacity)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.text.opacity],min:0,max:100,step:1,"onUpdate:modelValue":t[9]||=e=>o.onSlider(`opacity`,e)},null,8,[`model-value`])]),i(`label`,Pi,[d(b(a.copy.textLetterSpacing)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.text.letterSpacing],min:-10,max:100,step:.5,"onUpdate:modelValue":t[10]||=e=>o.onSlider(`letterSpacing`,e)},null,8,[`model-value`])]),o.editor.text.style===`curved`?(m(),w(C,{key:0},[i(`label`,Fi,[d(b(a.copy.textArcRadius)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.text.arcRadius],min:50,max:250,step:1,"onUpdate:modelValue":t[11]||=e=>o.onSlider(`arcRadius`,e)},null,8,[`model-value`])]),i(`label`,Ii,[d(b(a.copy.textArcStart)+` `,1),p(s,{class:`mt-2`,"model-value":[o.editor.text.arcStartAngle],min:0,max:360,step:1,"onUpdate:modelValue":t[12]||=e=>o.onSlider(`arcStartAngle`,e)},null,8,[`model-value`])]),i(`div`,Li,[i(`button`,{type:`button`,class:c([`flex-1 rounded-btn border px-2 py-2 text-caption font-semibold`,o.editor.text.arcDirection===1?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),onClick:t[13]||=e=>o.editor.patchText({arcDirection:1})},b(a.copy.textArcCw),3),i(`button`,{type:`button`,class:c([`flex-1 rounded-btn border px-2 py-2 text-caption font-semibold`,o.editor.text.arcDirection===-1?`border-navy bg-navy text-white`:`border-line bg-surface text-ink-2`]),onClick:t[14]||=e=>o.editor.patchText({arcDirection:-1})},b(a.copy.textArcCcw),3)])],64)):f(``,!0)])])}var zi=Object.assign(N(pi,[[`render`,Ri]]),{__name:`MakerTextPanel`});function Bi(e){return new Promise((t,n)=>{let r=new Image;/^https?:/.test(e)&&(r.crossOrigin=`anonymous`),r.onload=()=>t(r),r.onerror=()=>n(Error(`Failed to load image for export`)),r.src=e})}function Vi(e,t,n,r){let i=Math.max(0,Math.min(r,t/2,n/2));e.moveTo(i,0),e.arcTo(t,0,t,n,i),e.arcTo(t,n,0,n,i),e.arcTo(0,n,0,0,i),e.arcTo(0,0,t,0,i)}function Hi(e,t,n,r){if(e.beginPath(),r===`circle`)e.arc(t/2,n/2,Math.min(t,n)/2,0,Math.PI*2);else if(r===`rounded`){let r=Math.min(t,n)*q;typeof e.roundRect==`function`?e.roundRect(0,0,t,n,r):Vi(e,t,n,r)}else e.rect(0,0,t,n);e.closePath(),e.clip()}function Ui(e,t,n,r){let i=(Number.isFinite(r)?r:90)*Math.PI/180,a=Math.sin(i),o=-Math.cos(i),s=(Math.abs(t*a)+Math.abs(n*o))/2,c=t/2,l=n/2;return e.createLinearGradient(c-a*s,l-o*s,c+a*s,l+o*s)}async function Wi(e,t,n,r){if(r.variant!==`transparent`){if(r.variant===`gradient`){let{colors:i,stops:a}=bt(r.gradient),o=Ui(e,t,n,r.gradient.angle);i.forEach((e,t)=>{o.addColorStop(Math.min(1,Math.max(0,a[t]/100)),e)}),e.fillStyle=o,e.fillRect(0,0,t,n);return}if(r.variant===`pattern`){let i=r.pattern;e.fillStyle=i.backgroundColor||`#FFFFFF`,e.fillRect(0,0,t,n);let a=cn(i.id);if(!a)return;let o=await Bi(un(a,i.foregroundColor,(i.foregroundOpacity??76)/100)),s=dn(a),c=Math.max(4,Math.round(t*(i.scale??25)/100)),l=Math.max(4,Math.round(c*(s.h/s.w))),u=document.createElement(`canvas`);u.width=c,u.height=l,u.getContext(`2d`).drawImage(o,0,0,c,l),e.fillStyle=e.createPattern(u,`repeat`),e.fillRect(0,0,t,n);return}if(r.variant===`image`){if(!r.image?.url)return;let i=await Bi(r.image.url),a=i.naturalWidth||i.width,o=i.naturalHeight||i.height,s=Math.max(t/a,n/o),c=a*s,l=o*s;e.drawImage(i,(t-c)/2,(n-l)/2,c,l);return}e.fillStyle=r.solidColor||`#0A66C2`,e.fillRect(0,0,t,n)}}function Gi(e,t,n,r){let i=e/t;return i>n/r?{drawW:n,drawH:n/i}:{drawW:r*i,drawH:r}}async function Ki({imageUrl:e,basic:t,background:n,filter:r,border:i,text:a,target:o,format:s=`png`}){let c=o.w,l=o.h,u=document.createElement(`canvas`);u.width=c,u.height=l;let d=u.getContext(`2d`);if(!d)throw Error(`Could not get canvas context`);if(s===`jpeg`&&(d.fillStyle=`#ffffff`,d.fillRect(0,0,c,l)),Hi(d,c,l,o.shape||t.shape||`square`),await Wi(d,c,l,n),e){let n=await Bi(e),{drawW:i,drawH:a}
2=Gi(n.naturalWidth||n.width,n.naturalHeight||n.height,c,l),o=c/360;d.save(),d.filter=Tt(r)||`none`,d.translate(c/2+(t.x||0)*o,l/2+(t.y||0)*o),d.rotate((t.rotation||0)*Math.PI/180),d.scale((t.scale||1)*(t.flipH?-1:1),(t.scale||1)*(t.flipV?-1:1)),d.drawImage(n,-i/2,-a/2,i,a),d.restore()}i&&Ht(d,c,l,i,o.shape||t.shape||`square`),a&&hn(d,c,l,a);let f=s===`jpeg`?`image/jpeg`:`image/png`,p=s===`jpeg`?.95:void 0;return await new Promise((e,t)=>{u.toBlob(n=>n?e(n):t(Error(`Export failed`)),f,p)})}function qi(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}var Ji={name:`ExportPanel`,data(){return{copy:H,exporting:!1,open:!1,presets:xe}},computed:{editor(){return Q()}},mounted(){document.addEventListener(`pointerdown`,this.onOutside)},beforeUnmount(){document.removeEventListener(`pointerdown`,this.onOutside)},methods:{onOutside(e){this.open&&!this.$refs.root?.contains(e.target)&&(this.open=!1)},selectPreset(e){this.editor.setExportPreset(e)},async download(e){if(this.editor.hasImage){this.open=!1,this.exporting=!0;try{let t=Se(this.editor.exportPresetId);qi(await Ki({imageUrl:this.editor.workingUrl,basic:this.editor.basic,background:this.editor.background,filter:this.editor.filter,border:this.editor.border,text:this.editor.text,target:{w:t.w,h:t.h,shape:this.editor.basic.shape||t.shape},format:e}
2),`profile-picture.${e===`jpeg`?`jpg`:`png`}`),this.$analytics.capture(ut,{format:e})}catch(e){this.handleError(e)}finally{this.exporting=!1}}}}},Yi={ref:`root`,class:`relative inline-flex`},Xi=[`disabled`],Zi=[`disabled`],Qi={key:0,class:`absolute right-0 top-full z-30 mt-2 w-56 rounded-card border border-line bg-surface p-2 text-left shadow-modal`},$i=[`disabled`],ea={class:`mt-2 px-3 text-caption font-bold uppercase tracking-[0.08em] text-ink-faint`},ta=[`data-testid`,`onClick`],na={class:`text-caption text-ink-faint`},ra={key:0,class:`ml-1.5 font-bold text-teal`};function ia(e,t,n,r,a,o){return m(),w(`div`,Yi,[i(`button`,{type:`button`,class:`inline-flex items-center rounded-l-btn bg-navy px-5 py-2.5 text-[13px] font-bold leading-5 text-white shadow-btn-lift hover:bg-navy-raised disabled:opacity-50`,"data-testid":`maker-download-png`,disabled:!o.editor.hasImage||a.exporting,onClick:t[0]||=e=>o.download(`png`)},b(a.copy.downloadPng),9,Xi),i(`button`,{type:`button`,class:`inline-flex items-center rounded-r-btn border-l border-white/20 bg-navy px-2.5 py-2.5 text-white shadow-btn-lift hover:bg-navy-raised disabled:opacity-50`,"data-testid":`maker-download-menu`,disabled:!o.editor.hasImage||a.exporting,"aria-label":`More download options`,onClick:t[1]||=e=>a.open=!a.open},[...t[3]||=[i(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.5`,class:`h-4 w-4`},[i(`path`,{d:`M6 9l6 6 6-6`})],-1)]],8,Zi),a.open?(m(),w(`div`,Qi,[i(`button`,{type:`button`,class:`w-full rounded-btn px-3 py-2 text-left text-body-sm font-semibold text-navy hover:bg-surface-2 disabled:opacity-50`,"data-testid":`maker-download-jpeg`,disabled:!o.editor.hasImage||a.exporting,onClick:t[2]||=e=>o.download(`jpeg`)},b(a.copy.downloadJpeg),9,$i),i(`p`,ea,b(a.copy.exportSize),1),(m(!0),w(C,null,A(a.presets,e=>(m(),w(`button`,{key:e.id,type:`button`,class:c([`mt-0.5 flex w-full items-center justify-between rounded-btn px-3 py-1.5 text-left text-body-sm font-medium hover:bg-surface-2`,o.editor.exportPresetId===e.id?`text-navy`:`text-ink-2`]),"data-testid":`maker-export-preset-${e.id}`,onClick:t=>o.selectPreset(e.id)},[i(`span`,null,b(e.label),1),i(`span`,na,[d(b(e.w)+`×`+b(e.h),1),o.editor.exportPresetId===e.id?(m(),w(`span`,ra,`✓`)):f(``,!0)])],10,ta))),128))])):f(``,!0)],512)}var aa=Object.assign(N(Ji,[[`render`,ia]]),{__name:`MakerExportPanel`}),oa={class:`flex min-h-screen w-full flex-col bg-page font-sans text-navy`},sa={class:`sticky top-0 z-20 border-b border-line bg-surface`},ca={class:`flex h-16 items-center justify-between px-4 sm:px-7`},la={class:`flex items-center gap-3`},ua={class:`hidden text-caption text-ink-muted sm:block`},da={class:`flex flex-1 flex-col items-center justify-center px-4 py-10`},fa={class:`relative mx-auto w-full max-w-[260px]`},pa={class:`mt-5 flex items-center gap-3`},ma={class:`inline-flex gap-1 rounded-[10px] bg-surface-2 p-1`},ha=[`data-testid`,`onClick`],ga={key:0,class:`sticky bottom-0 z-20`},_a={class:`flex justify-center gap-1 overflow-x-auto bg-page px-4 sm:px-7`},va=[`data-testid`,`onClick`],ya={class:`max-h-[38vh] overflow-y-auto border-t border-line bg-surface px-4 py-6 sm:px-7`},ba={class:`mx-auto max-w-[560px] text-center`},xa=Object.assign({name:`MakerPage`,components:{BrandLogo:fe,CanvasStage:Pn,UploadPanel:Bn,BackgroundPanel:Or,BridgePanel:Fr,FiltersPanel:Hr,PositionPanel:Zr,BorderPanel:fi,TextPanel:zi,ExportPanel:aa},data(){return{copy:H,common:de,activeTab:`background`,tabs:[{id:`background`,label:H.backgroundTitle},{id:`position`,label:H.positionTitle},{id:`filters`,label:H.filtersTitle},{id:`border`,label:H.borderTitle},{id:`text`,label:H.textTitle}],shapes:[{id:`circle`,label:H.shapeCircle},{id:`square`,label:H.shapeSquare},{id:`rounded`,label:H.shapeRounded}]}},computed:{editor(){return Q()},preset(){return gt((this._.provides[ae]||this.$route).params.platform||this.editor.presetId)}},mounted(){this.editor.applyPreset(this.preset.id),this.$analytics.capture(ot)},beforeUnmount(){this.editor.resetImage()}},{setup(e){pe({layout:!1});let t=D(),n=ye(t,`/maker`),a=ye(t,`/og.png`);
2return ce({title:H.metaTitle,description:H.metaDescription,ogType:`website`,ogTitle:H.metaTitle,ogDescription:H.metaDescription,ogUrl:n,ogImage:a,ogImageAlt:H.ogAlt,twitterCard:`summary_large_image`,twitterTitle:H.metaTitle,twitterDescription:H.metaDescription,twitterImage:a,twitterImageAlt:H.ogAlt}),ue({link:[{rel:`canonical`,href:n}],script:[{type:`application/ld+json`,innerHTML:JSON.stringify(be(t))}]}),(e,t)=>{let n=se;return m(),w(`div`,oa,[i(`header`,sa,[i(`div`,ca,[p(n,{to:`/`,class:`flex items-center text-h4 tracking-tight text-navy`},{default:k(()=>[p(fe,null,{default:k(()=>[d(b(e.common.brand),1)]),_:1})]),_:1}),i(`div`,la,[i(`p`,ua,b(e.copy.downloadHint),1),p(aa)])])]),i(`main`,da,[i(`div`,fa,[p(Pn),p(Bn,{ref:`upload`},null,512)]),i(`div`,pa,[i(`div`,ma,[(m(!0),w(C,null,A(e.shapes,t=>(m(),w(`button`,{key:t.id,type:`button`,class:c([`rounded-lg px-3 py-1.5 text-caption font-semibold`,e.editor.basic.shape===t.id?`bg-surface text-navy shadow-btn-rest`:`text-ink-muted`]),"data-testid":`maker-preview-${t.id}`,onClick:n=>e.editor.patchBasic({shape:t.id})},b(t.label),11,ha))),128))]),e.editor.hasImage?(m(),w(`button`,{key:0,type:`button`,class:`text-caption font-semibold text-ink-muted underline hover:text-ink-2`,"data-testid":`maker-replace-photo`,onClick:t[0]||=t=>e.$refs.upload.openPicker()},b(e.copy.replacePhoto),1)):f(``,!0)])]),e.editor.hasImage?(m(),w(`div`,ga,[i(`div`,_a,[(m(!0),w(C,null,A(e.tabs,t=>(m(),w(`button`,{key:t.id,type:`button`,class:c([`-mb-px whitespace-nowrap rounded-t-xl px-4 py-2.5 text-[13px] leading-5`,e.activeTab===t.id?`relative z-10 border border-line border-b-surface bg-surface font-bold text-navy`:`font-semibold text-ink-muted hover:text-ink-2`]),"data-testid":`maker-tab-${t.id}`,onClick:n=>e.activeTab=t.id},b(t.label),11,va))),128))]),i(`div`,ya,[i(`div`,ba,[e.activeTab===`background`?(m(),r(Or,{key:0})):e.activeTab===`position`?(m(),r(Zr,{key:1})):e.activeTab===`filters`?(m(),r(Hr,{key:2})):e.activeTab===`border`?(m(),r(fi,{key:3})):e.activeTab===`text`?(m(),r(zi,{key:4})):f(``,!0)])]),p(Fr,{placement:`bridge-inflow`})])):f(``,!0)])}}});export{xa as default};

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.