1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[54673],{50:(e,t,n)=>{n.d(t,{f:()=>v});let r="http://www.w3.org/2000/svg";class a{constructor(e){this.seed=e}next(){return this.seed?(0x80000000-1&(this.seed=Math.imul(48271,this.seed)))/0x80000000:Math.random()}}function i(e,t,n,r,a){return{type:"path",ops:d(e,t,n,r,a)}}function o(e,t,n){let r=(e||[]).length;if(r>2){let a=[];for(let t=0;t<r-1;t++)a.push(...d(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&a.push(...d(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:a}}return 2===r?i(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function s(e,t,n,r,a){return function(e,t,n,r){let[a,i]=p(r.increment,e,t,r.rx,r.ry,1,r.increment*u(.1,u(.4,1,n),n),n),o=m(a,null,n);if(!n.disableMultiStroke){let[a]=p(r.increment,e,t,r.rx,r.ry,1.5,0,n),i=m(a,null,n);o=o.concat(i)}return{estimatedPoints:i,opset:{type:"path",ops:o}}}(e,t,a,function(e,t,n){let r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),a=2*Math.PI/Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r),i=Math.abs(e/2),o=Math.abs(t/2),s=1-n.curveFitting;return i+=c(i*s,n),o+=c(o*s,n),{increment:a,rx:i,ry:o}}(n,r,a)).opset}function l(e){return e.randomizer||(e.randomizer=new a(e.seed||0)),e.randomizer.next()}function u(e,t,n,r=1){return n.roughness*r*(l(n)*(t-e)+e)}function c(e,t,n=1){return u(-e,e,t,n)}function d(e,t,n,r,a,i=!1){let o=i?a.disableMultiStrokeFill:a.disableMultiStroke,s=f(e,t,n,r,a,!0,!1);if(o)return s;let l=f(e,t,n,r,a,!0,!0);return s.concat(l)}function f(e,t,n,r,a,i,o){let s=Math.pow(e-n,2)+Math.pow(t-r,2),u=Math.sqrt(s),d=1;d=u<200?1:u>500?.4:-.0016668*u+1.233334;let f=a.maxRandomnessOffset||0;f*f*100>s&&(f=u/10);let m=f/2,p=.2+.2*l(a),h=a.bowing*a.maxRandomnessOffset*(r-t)/200,g=a.bowing*a.maxRandomnessOffset*(e-n)/200;h=c(h,a,d),g=c(g,a,d);let v=[],x=()=>c(m,a,d),y=()=>c(f,a,d);return i&&(o?v.push({op:"move",data:[e+x(),t+x()]}):v.push({op:"move",data:[e+c(f,a,d),t+c(f,a,d)]})),o?v.push({op:"bcurveTo",data:[h+e+(n-e)*p+x(),g+t+(r-t)*p+x(),h+e+2*(n-e)*p+x(),g+t+2*(r-t)*p+x(),n+x(),r+x()]}):v.push({op:"bcurveTo",data:[h+e+(n-e)*p+y(),g+t+(r-t)*p+y(),h+e+2*(n-e)*p+y(),g+t+2*(r-t)*p+y(),n+y(),r+y()]}),v}function m(e,t,n){let r=e.length,a=[];if(r>3){let i=[],o=1-n.curveTightness;a.push({op:"move",data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];i[0]=[n[0],n[1]],i[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],i[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],i[3]=[e[t+1][0],e[t+1][1]],a.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[3][0],i[3][1]]})}if(t&&2===t.length){let e=n.maxRandomnessOffset;a.push({op:"lineTo",data:[t[0]+c(e,n),t[1]+c(e,n)]})}}else 3===r?(a.push({op:"move",data:[e[1][0],e[1][1]]}),a.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):2===r&&a.push(...d(e[0][0],e[0][1],e[1][0],e[1][1],n));return a}function p(e,t,n,r,a,i,o,s){let l=[],u=[],d=c(.5,s)-Math.PI/2;u.push([c(i,s)+t+.9*r*Math.cos(d-e),c(i,s)+n+.9*a*Math.sin(d-e)]);for(let o=d;o<2*Math.PI+d-.01;o+=e){let e=[c(i,s)+t+r*Math.cos(o),c(i,s)+n+a*Math.sin(o)];l.push(e),u.push(e)}return u.push([c(i,s)+t+r*Math.cos(d+2*Math.PI+.5*o),c(i,s)+n+a*Math.sin(d+2*Math.PI+.5*o)]),u.push([c(i,s)+t+.98*r*Math.cos(d+o),c(i,s)+n+.98*a*Math.sin(d+o)]),u.push([c(i,s)+t+.9*r*Math.cos(d+.5*o),c(i,s)+n+.9*a*Math.sin(d+.5*o)]),[u,l]}function h(e,t){return{maxRandomnessOffset:2,roughness:"highlight"===e?3:1.5,bowing:1,stroke:"#000",strokeWidth:1.5,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,combineNestedSvgPaths:!1,disableMultiStroke:"double"!==e,disableMultiStrokeFill:!1,seed:t}}class g{constructor(e,t){this._state="unattached",this._resizing=!1,this._seed=Math.floor(0x80000000*Math.random()),this._lastSizes=[],this._animationDelay=0,this._resizeListener=()=>{this._resizing||(this._resizing=!0,setTimeout(()=>{this._resizing=!1,"showing"===this._state&&this.haveRectsChanged()&&this.show()},400))},this._e=e,this._config=JSON.parse(JSON.stringify(t)),this.attach()}get animate(){return this._config.animate}set animate(e){this._config.animate=e}get animationDuration(){return this._config.animationDuration}set animationDuration(e){this._config.animationDuration=e}get iterations(){return this._config.iterations}set iterations(e){this._config.iterations=e}get color(){return this._config.color}set color(e){this._config.color!==e&&(this._config.color=e,this.refresh())}get strokeWidth(){return this._config.strokeWidth}set strokeWidth(e){this._config.strokeWidth!==e&&(this._config.strokeWidth=e,this.refresh())}get padding(){return this._config.padding}set padding(e){this._config.padding!==e&&(this._config.padding=e,this.refresh())}attach(){if("unattached"===this._state&&this._e.parentElement){if(!window.__rno_kf_s){let e=window.__rno_kf_s=document.createElement("style");e.textContent="@keyframes rough-notation-dash { to { stroke-dashoffset: 0; } }",document.head.appendChild(e)}let e=this._svg=document.createElementNS(r,"svg");e.setAttribute("class","rough-annotation");let t=e.style;t.position="absolute",t.top="0",t.left="0",t.overflow="visible",t.pointerEvents="none",t.width="100px",t.height="100px";let n="highlight"===this._config.type;if(this._e.insertAdjacentElement(n?"beforebegin":"afterend",e),this._state="not-showing",n){let e=window.getComputedStyle(this._e).position;e&&"static"!==e||(this._e.style.position="relative")}this.attachListeners()}}detachListeners(){window.removeEventListener("resize",this._resizeListener),this._ro&&this._ro.unobserve(this._e)}attachListeners(){this.detachListeners(),window.addEventListener("resize",this._resizeListener,{passive:!0}),!this._ro&&"ResizeObserver"in window&&(this._ro=new window.ResizeObserver(e=>{for(let t of e)t.contentRect&&this._resizeListener()})),this._ro&&this._ro.observe(this._e)}haveRectsChanged(){if(this._lastSizes.length){let e=this.rects();if(e.length!==this._lastSizes.length)return!0;for(let t=0;t<e.length;t++)if(!this.isSameRect(e[t],this._lastSizes[t]))return!0}return!1}isSameRect(e,t){let n=(e,t)=>Math.round(e)===Math.round(t);return n(e.x,t.x)&&n(e.y,t.y)&&n(e.w,t.w)&&n(e.h,t.h)}isShowing(){return"not-showing"!==this._state}refresh(){this.isShowing()&&!this.pendingRefresh&&(this.pendingRefresh=Promise.resolve().then(()=>{this.isShowing()&&this.show(),delete this.pendingRefresh}))}show(){switch(this._state){case"unattached":break;case"showing":this.hide(),this._svg&&this.render(this._svg,!0);break;case"not-showing":this.attach(),this._svg&&this.render(this._svg,!1)}}
1hide(){if(this._svg)for(;this._svg.lastChild;)this._svg.removeChild(this._svg.lastChild);this._state="not-showing"}remove(){this._svg&&this._svg.parentElement&&this._svg.parentElement.removeChild(this._svg),this._svg=void 0,this._state="unattached",this.detachListeners()}render(e,t){let n=this._config;t&&((n=JSON.parse(JSON.stringify(this._config))).animate=!1);let a=this.rects(),l=0;a.forEach(e=>l+=e.w);let u=n.animationDuration||800,c=0;for(let t=0;t<a.length;t++){let d=u*(a[t].w/l);(function(e,t,n,a,l,u){let c=[],d=n.strokeWidth||2,f=function(e){let t=e.padding;if(t||0===t){if("number"==typeof t)return[t,t,t,t];if(Array.isArray(t)&&t.length)switch(t.length){case 4:return[...t];case 1:return[t[0],t[0],t[0],t[0]];case 2:return[...t,...t];case 3:return[...t,t[1]];default:return[t[0],t[1],t[2],t[3]]}}return[5,5,5,5]}(n),m=void 0===n.animate||!!n.animate,p=n.iterations||2,g=+!!n.rtl,v=h("single",u);switch(n.type){case"underline":{let e=t.y+t.h+f[2];for(let n=g;n<p+g;n++)n%2?c.push(i(t.x+t.w,e,t.x,e,v)):c.push(i(t.x,e,t.x+t.w,e,v));break}case"strike-through":{let e=t.y+t.h/2;for(let n=g;n<p+g;n++)n%2?c.push(i(t.x+t.w,e,t.x,e,v)):c.push(i(t.x,e,t.x+t.w,e,v));break}case"box":{let e=t.x-f[3],n=t.y-f[0],r=t.w+(f[1]+f[3]),a=t.h+(f[0]+f[2]);for(let t=0;t<p;t++){var x,y,w,_;c.push(o([[x=e,y=n],[x+(w=r),y],[x+w,y+(_=a)],[x,y+_]],!0,v))}break}case"bracket":{let e=Array.isArray(n.brackets)?n.brackets:n.brackets?[n.brackets]:["right"],r=t.x-2*f[3],a=t.x+t.w+2*f[1],i=t.y-2*f[0],s=t.y+t.h+2*f[2];for(let n of e){let e;switch(n){case"bottom":e=[[r,t.y+t.h],[r,s],[a,s],[a,t.y+t.h]];break;case"top":e=[[r,t.y],[r,i],[a,i],[a,t.y]];break;case"left":e=[[t.x,i],[r,i],[r,s],[t.x,s]];break;case"right":e=[[t.x+t.w,i],[a,i],[a,s],[t.x+t.w,s]]}e&&c.push(o(e,!1,v))}break}case"crossed-off":{let e=t.x,n=t.y,r=e+t.w,a=n+t.h;for(let t=g;t<p+g;t++)t%2?c.push(i(r,a,e,n,v)):c.push(i(e,n,r,a,v));for(let t=g;t<p+g;t++)t%2?c.push(i(e,a,r,n,v)):c.push(i(r,n,e,a,v));break}case"circle":{let e=h("double",u),n=t.w+(f[1]+f[3]),r=t.h+(f[0]+f[2]),a=t.x-f[3]+n/2,i=t.y-f[0]+r/2,o=Math.floor(p/2),l=p-2*o;for(let t=0;t<o;t++)c.push(s(a,i,n,r,e));for(let e=0;e<l;e++)c.push(s(a,i,n,r,v));break}case"highlight":{let e=h("highlight",u);d=.95*t.h;let n=t.y+t.h/2;for(let r=g;r<p+g;r++)r%2?c.push(i(t.x+t.w,n,t.x,n,e)):c.push(i(t.x,n,t.x+t.w,n,e))}}if(c.length){let t=function(e){let t=[];for(let n of e){let e="";for(let r of n.ops){let n=r.data;switch(r.op){case"move":e.trim()&&t.push(e.trim()),e=`M${n[0]} ${n[1]} `;break;case"bcurveTo":e+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":e+=`L${n[0]} ${n[1]} `}}e.trim()&&t.push(e.trim())}return t}(c),i=[],o=[],s=0,u=(e,t,n)=>e.setAttribute(t,n);for(let a of t){let t=document.createElementNS(r,"path");if(u(t,"d",a),u(t,"fill","none"),u(t,"stroke",n.color||"currentColor"),u(t,"stroke-width",""+d),m){let e=t.getTotalLength();i.push(e),s+=e}e.appendChild(t),o.push(t)}if(m){let e=0;for(let t=0;t<o.length;t++){let n=o[t],r=i[t],u=s?r/s*l:0,c=a+e,d=n.style;d.strokeDashoffset=""+r,d.strokeDasharray=""+r,d.animation=`rough-notation-dash ${u}ms ease-out ${c}ms forwards`,e+=u}}}})(e,a[t],n,c+this._animationDelay,d,this._seed),c+=d}this._lastSizes=a,this._state="showing"}rects(){let e=[];
1if(this._svg)if(this._config.multiline){let t=this._e.getClientRects();for(let n=0;n<t.length;n++)e.push(this.svgRect(this._svg,t[n]))}else e.push(this.svgRect(this._svg,this._e.getBoundingClientRect()));return e}svgRect(e,t){let n=e.getBoundingClientRect();return{x:(t.x||t.left)-(n.x||n.left),y:(t.y||t.top)-(n.y||n.top),w:t.width,h:t.height}}}function v(e,t){return new g(e,t)}},361:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("arrow-big-right",[["path",{d:"M11 9a1 1 0 0 0 1-1V5.061a1 1 0 0 1 1.811-.75l6.836 6.836a1.207 1.207 0 0 1 0 1.707l-6.836 6.835a1 1 0 0 1-1.811-.75V16a1 1 0 0 0-1-1H5a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1z",key:"1232du"}]])},7307:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("volume-x",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]])},15456:(e,t,n)=>{n.d(t,{HighlightsNative:()=>d});var r=n(82258),a=n(32812),i=n(20857),o=n(57505),s=n(69140),l=n(20792),u=n(78372);function c(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}function d(e){var t=e.section,n=e.className,d=t.items||[],f=(0,l.useRef)(null),m=(0,o._)((0,l.useState)({}),2),p=m[0],h=m[1],g=function(e,t){if(t.naturalHeight){var n=t.naturalWidth/t.naturalHeight;h(function(t){return t[e]===n?t:(0,i._)((0,a._)({},t),(0,r._)({},e,n))});if(t.naturalHeight){var o,s,l=String(t.naturalWidth/t.naturalHeight);null==(o=t.closest(".highlights-native-fit-media"))||o.style.setProperty("--highlight-media-ratio",l),null==(s=t.closest(".highlights-native-fit-forward, .highlights-native-fit-reverse"))||s.style.setProperty("--highlight-media-ratio",l)}}};return(0,l.useEffect)(function(){var e=f.current;if(e){var t=Array.from(e.querySelectorAll('img[data-highlight-fit-image="true"]')),n=function(e){var t=e.currentTarget;g(Number(t.dataset.highlightIndex),t)};return t.forEach(function(e){e.complete&&g(Number(e.dataset.highlightIndex),e),e.addEventListener("load",n)}),function(){t.forEach(function(e){e.removeEventListener("load",n)})}}},[d]),(0,s.jsx)("section",{ref:f,id:t.id||t.name,className:c("py-20 md:py-28",t.className,n),children:(0,s.jsxs)("div",{className:"container mx-auto max-w-6xl space-y-14",children:[(0,s.jsxs)(u.P.div,{className:"mx-auto max-w-3xl text-center",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,ease:[.22,1,.36,1]},children:[(0,s.jsx)("h2",{className:"text-foreground mb-4 text-3xl font-semibold tracking-tight md:text-4xl",children:t.title}),t.description&&(0,s.jsx)("p",{className:"text-muted-foreground text-base leading-relaxed md:text-lg",children:t.description})]}),(0,s.jsx)("div",{className:"space-y-10 md:space-y-14",children:d.map(function(e,t){var n,r,a,i,o,l,d,f,m,h,v,x,y,w,_,b,j;return(0,s.jsxs)(u.P.article,{className:c("bg-card/40 grid items-center gap-8 rounded-3xl border p-5 shadow-sm md:p-8 lg:gap-12",(null==(n=e.image)?void 0:n.fit)!=="cover"?t%2==1?"highlights-native-fit-reverse":"highlights-native-fit-forward":"lg:grid-cols-2",t%2==1&&"lg:[&>*:first-child]:order-2"),initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},style:(null==(r=e.image)?void 0:r.fit)!=="cover"&&p[t]?{"--highlight-media-ratio":p[t]}:void 0,transition:{duration:.6,delay:.08*t,ease:[.22,1,.36,1]},children:[(0,s.jsx)("div",{className:c("bg-muted/20 overflow-hidden rounded-2xl border",(null==(a=e.image)?void 0:a.fit)!=="cover"&&"highlights-native-fit-media mx-auto"),children:(0,s.jsx)("div",{className:c("relative overflow-hidden",(null==(i=e.image)?void 0:i.fit)!=="cover"?"highlights-native-fit-frame bg-muted/30 flex w-full items-center justify-center p-3":"aspect-[16/10] w-full"),children:(0,s.jsx)("img",{src:null!=(v=null==(o=e.image)?void 0:o.src)?v:"",alt:(_=null==(l=e.image)?void 0:l.alt,x=e.title,y="highlight preview image",b=(w=null==x?void 0:x.trim())&&w.length>0?"".concat(w," ").concat(y):"Illustrative ".concat(y),(j=null==_?void 0:_.trim())&&j.length>0?j:b),width:800,height:500,className:c("max-w-full",(null==(d=e.image)?void 0:d.fit)!=="cover"?"h-full w-full object-contain":"h-full w-full object-cover"),"data-highlight-fit-image":(null==(f=e.image)?void 0:f.fit)!=="cover"?"true":void 0,"data-highlight-index":t,ref:function(n){var r;n&&(null==(r=e.image)?void 0:r.fit)!=="cover"&&window.requestAnimationFrame(function(){g(t,n)})},onLoad:function(n){var r;(null==(r=e.image)?void 0:r.fit)!=="cover"&&g(t,n.currentTarget)},loading:(null==(m=e.image)?void 0:m.fit)!=="cover"?"eager":"lazy"})})}),(0,s.jsxs)("div",{className:"min-w-0 space-y-4",children:[e.subtitle&&(0,s.jsx)("p",{className:"text-primary text-xs font-semibold tracking-[0.18em] uppercase",children:e.subt
1itle}),e.title&&(0,s.jsx)("h3",{className:"text-foreground text-2xl font-semibold tracking-tight md:text-3xl",children:e.title}),e.description&&(0,s.jsx)("p",{className:"text-muted-foreground text-sm leading-7 md:text-base",children:e.description}),!!(null==(h=e.tags)?void 0:h.length)&&(0,s.jsx)("div",{className:"flex flex-wrap gap-2 pt-1",children:e.tags.map(function(e,t){return(0,s.jsx)("span",{className:"bg-background/70 text-muted-foreground rounded-full border px-3 py-1 text-xs",children:e},t)})})]})]},t)})})]})})}},16055:(e,t,n)=>{n.d(t,{i:()=>r});function r({checkoutUrl:e="/api/payment/checkout",fetcher:t=fetch}={}){return{async checkout(n){let r=await t(e,{body:JSON.stringify(n),headers:{"Content-Type":"application/json"},method:"POST"}),a=await r.json().catch(()=>null);return r.ok?a?.data?.error_type?{errorType:a.data.error_type,planName:a.data.planName,message:a.data.message??a.message}:"number"==typeof a?.code&&0!==a.code?{errorType:"CHECKOUT_ERROR",message:a.message}:{checkoutUrl:a?.data?.checkoutUrl,message:a?.message}:{errorType:"HTTP_ERROR",message:a?.message??`Checkout request failed with status ${r.status}`}}}}},16319:(e,t,n)=>{n.d(t,{y:()=>r});function r({outputType:e,hasInputImages:t,hasInputVideos:n=!1}){return"video"===e?n?"video-to-video":t?"image-to-video":"text-to-video":t?"image-to-image":"text-to-image"}},18791:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(20792);function a(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function i({debounce:e,scroll:t,polyfill:n,offsetSize:o}={debounce:0,scroll:!1,offsetSize:!1}){var l,u,c;let d=n||("undefined"==typeof window?class{}:window.ResizeObserver);if(!d)throw Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");let[f,m]=(0,r.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),p=(0,r.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:f,orientationHandler:null}),h=e?"number"==typeof e?e:e.scroll:null,g=e?"number"==typeof e?e:e.resize:null,v=(0,r.useRef)(!1);(0,r.useEffect)(()=>(v.current=!0,()=>void(v.current=!1)));let[x,y,w]=(0,r.useMemo)(()=>{let e=()=>{if(!p.current.element)return;let{left:e,top:t,width:n,height:r,bottom:a,right:i,x:l,y:u}=p.current.element.getBoundingClientRect(),c={left:e,top:t,width:n,height:r,bottom:a,right:i,x:l,y:u};p.current.element instanceof HTMLElement&&o&&(c.height=p.current.element.offsetHeight,c.width=p.current.element.offsetWidth),Object.freeze(c),v.current&&!s(p.current.lastBounds,c)&&m(p.current.lastBounds=c)};return[e,g?a(e,g):e,h?a(e,h):e]},[m,o,h,g]);function _(){p.current.scrollContainers&&(p.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",w,!0)),p.current.scrollContainers=null),p.current.resizeObserver&&(p.current.resizeObserver.disconnect(),p.current.resizeObserver=null),p.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",p.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",p.current.orientationHandler))}function b(){p.current.element&&(p.current.resizeObserver=new d(w),p.current.resizeObserver.observe(p.current.element),t&&p.current.scrollContainers&&p.current.scrollContainers.forEach(e=>e.addEventListener("scroll",w,{capture:!0,passive:!0})),p.current.orientationHandler=()=>{w()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",p.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",p.current.orientationHandler))}return l=w,u=!!t,(0,r.useEffect)(()=>{if(u)return window.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",l,!0)},[l,u]),c=y,(0,r.useEffect)(()=>(window.addEventListener("resize",c),()=>void window.removeEventListener("resize",c)),[c]),(0,r.useEffect)(()=>{_(),b()},[t,w,y]),(0,r.useEffect)(()=>_,[]),[e=>{e&&e!==p.current.element&&(_(),p.current.element=e,p.current.scrollC
1ontainers=function e(t){let n=[];if(!t||t===document.body)return n;let{overflow:r,overflowX:a,overflowY:i}=window.getComputedStyle(t);return[r,a,i].some(e=>"auto"===e||"scroll"===e)&&n.push(t),[...n,...e(t.parentElement)]}(e),b())},f,x]}let o=["x","y","top","bottom","left","right","width","height"],s=(e,t)=>o.every(n=>e[n]===t[n])},25244:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("image-plus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]])},31892:(e,t,n)=>{n.d(t,{L:()=>J});var r=n(32812),a=n(20857),i=n(7907),o=n(6608),s=n(81714),l=n(89279),u=n(20792),c=n(14442),d=n(57689);function f(e,t){let n,r=()=>{let{currentTime:r}=t,a=(null===r?0:r.value)/100;n!==a&&e(a),n=a};return d.Gt.preUpdate(r,!0),()=>(0,d.WG)(r)}function m(e){return"undefined"!=typeof window&&(e?(0,s.d)():(0,s.J)())}var p=n(85922),h=n(25299),g=n(63496),v=function(){return{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},x={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function y(e,t,n,r){var a=n[t],i=x[t],o=i.length,s=i.position,l=a.current,u=n.time;a.current=Math.abs(e["scroll".concat(s)]),a.scrollLength=e["scroll".concat(o)]-e["client".concat(o)],a.offset.length=0,a.offset[0]=0,a.offset[1]=a.scrollLength,a.progress=(0,h.q)(0,a.scrollLength,a.current);var c=r-u;a.velocity=c>50?0:(0,g.f)(a.current-l,c)}var w=n(17727),_=n(1653),b=n(86877),j=n(64929),k=n(87639),N=n(86353),M={start:0,center:.5,end:1};function A(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;if(e in M&&(e=M[e]),"string"==typeof e){var a=parseFloat(e);e.endsWith("px")?r=a:e.endsWith("%")?e=a/100:e.endsWith("vw")?r=a/100*document.documentElement.clientWidth:e.endsWith("vh")?r=a/100*document.documentElement.clientHeight:e=a}return"number"==typeof e&&(r=t*e),n+r}var E=[0,0],C={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},R={x:0,y:0},T=new WeakMap,S=new WeakMap,O=new WeakMap,I=new WeakMap,L=new WeakMap,P=function(e){return e===document.scrollingElement?window:e};function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.container,r=void 0===n?document.scrollingElement:n,a=t.trackContentSize,o=(0,i._)(t,["container","trackContentSize"]);if(!r)return c.l;var s=O.get(r);s||(s=new Set,O.set(r,s));var l=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return{measure:function(t){!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e)for(var r=t;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent;n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}(e,r.target,n),y(e,"x",n,t),y(e,"y",n,t),n.time=t,(r.offset||r.target)&&function(e,t,n){var r=n.offset,a=void 0===r?C.All:r,i=n.target,o=void 0===i?e:i,s=n.axis,l=void 0===s?"y":s,u="y"===l?"height":"width",c=o!==e?function(e,t){for(var n={x:0,y:0},r=e;r&&r!==t;)if((0,N.s)(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if("svg"===r.tagName){var a=r.getBoundingClientRect(),i=(r=r.parentElement).getBoundingClientRect();n.x+=a.left-i.left,n.y+=a.top-i.top}else if((0,k._)(r,SVGGraphicsElement)){var o=r.getBBox(),s=o.x,l=o.y;n.x+=s,n.y+=l;for(var u=null,c=r.parentNode;!u;)"svg"===c.tagName&&(u=c),c=r.parentNode;r=u}else break;return n}(o,e):R,d=o===e?{width:e.scrollWidth,height:e.scrollHeight}:"getBBox"in o&&"svg"!==o.tagName?o.getBBox():{width:o.clientWidth,height:o.clientHeight},f={width:e.clientWidth,height:e.clientHeight};t[l].offset.length=0;for(var m=!t[l].interpolate,p=a.length,h=0;h<p;h++){var g=function(e,t,n,r){var a=Array.isArray(e)?e:E,i=0;
1return"number"==typeof e?a=[e,e]:"string"==typeof e&&(a=(e=e.trim()).includes(" ")?e.split(" "):[e,M[e]?e:"0"]),(i=A(a[0],n,r))-A(a[1],t)}(a[h],f[u],d[u],c[l]);m||g===t[l].interpolatorOffsets[h]||(m=!0),t[l].offset[h]=g}m&&(t[l].interpolate=(0,_.G)(t[l].offset,(0,b.Z)(a),{clamp:!1}),t[l].interpolatorOffsets=(0,w._)(t[l].offset)),t[l].progress=(0,j.q)(0,1,t[l].interpolate(t[l].current))}(e,n,r)},notify:function(){return t(n)}}}(r,e,{time:0,x:v(),y:v()},o);if(s.add(l),!T.has(r)){var u=function(){var e=!0,t=!1,n=void 0;try{for(var r,a=s[Symbol.iterator]();!(e=(r=a.next()).done);e=!0)r.value.measure(d.uv.timestamp)}catch(e){t=!0,n=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw n}}d.Gt.preUpdate(f)},f=function(){var e=!0,t=!1,n=void 0;try{for(var r,a=s[Symbol.iterator]();!(e=(r=a.next()).done);e=!0)r.value.notify()}catch(e){t=!0,n=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw n}}},m=function(){return d.Gt.read(u)};T.set(r,m);var h=P(r);window.addEventListener("resize",m),r!==document.documentElement&&S.set(r,(0,p.X)(r,m)),h.addEventListener("scroll",m),m()}if(void 0!==a&&a&&!L.has(r)){var g=T.get(r),x={width:r.scrollWidth,height:r.scrollHeight};I.set(r,x);var z=d.Gt.read(function(){var e=r.scrollWidth,t=r.scrollHeight;(x.width!==e||x.height!==t)&&(g(),x.width=e,x.height=t)},!0);L.set(r,z)}var F=T.get(r);return d.Gt.read(F,!1,!0),function(){(0,d.WG)(F);var e,t=O.get(r);if(t&&(t.delete(l),!t.size)){var n=T.get(r);T.delete(r),n&&(P(r).removeEventListener("scroll",n),null==(e=S.get(r))||e(),window.removeEventListener("resize",n));var a=L.get(r);a&&((0,d.WG)(a),L.delete(r)),I.delete(r)}}}var F=n(57505),D=[[C.Enter,"entry"],[C.Exit,"exit"],[C.Any,"cover"],[C.All,"contain"]],V={start:0,end:1};function B(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};var t=!0,n=!1,r=void 0;try{for(var a,i=D[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=(0,F._)(a.value,2),s=o[0],l=o[1];if(function(e,t){var n=function(e){if(2===e.length){var t=[],n=!0,r=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done);n=!0){var s=i.value;if(Array.isArray(s))t.push(s);else{if("string"!=typeof s)return;var l=function(e){var t=e.trim().split(/\s+/);if(2===t.length){var n=V[t[0]],r=V[t[1]];if(void 0!==n&&void 0!==r)return[n,r]}}(s);if(!l)return;t.push(l)}}}catch(e){r=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(r)throw a}}return t}}(e);if(!n)return!1;for(var r=0;r<2;r++){var a=n[r],i=t[r];if(a[0]!==i[0]||a[1]!==i[1])return!1}return!0}(e,s))return{rangeStart:"".concat(l," 0%"),rangeEnd:"".concat(l," 100%")}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}var G=new Map;function H(e){var t={value:0},n=z(function(n){t.value=100*n[e.axis].progress},e);return{currentTime:t,cancel:n}}function K(e){var t,n,a=e.source,o=e.container,s=(0,i._)(e,["source","container"]),l=s.axis;a&&(o=a);var u=G.get(o);u||(u=new Map,G.set(o,u));var c=null!=(t=s.target)?t:"self",d=u.get(c);d||(d={},u.set(c,d));var f=l+(null!=(n=s.offset)?n:[]).join(",");return d[f]||(s.target&&m(s.target)?B(s.offset)?d[f]=new ViewTimeline({subject:s.target,axis:l}):d[f]=H((0,r._)({container:o},s)):m()?d[f]=new ScrollTimeline({source:o,axis:l}):d[f]=H((0,r._)({container:o},s))),d[f]}function W(e){var t,n,o,s,l,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=u.axis,p=u.container,h=void 0===p?document.scrollingElement:p,g=(0,i._)(u,["axis","container"]);if(!h)return c.l;var v=(0,r._)({axis:void 0===d?"y":d,container:h},g);return"function"==typeof e?(t=e,n=v,2===t.length?z(function(e){t(e[n.axis].progress,e)},n):f(t,K(n))):(o=K(v),s=v.target?B(v.offset):void 0,l=v.target?m(v.target)&&!!s:m(),e.attachTimeline((0,a._)((0,r._)({timeline:l?o:void 0},s&&l&&{rangeStart:s.rangeStart,rangeEnd:s.rangeEnd}),{observe:function(e){return e.pause(),f(function(t){e.time=e.iterationDuration*t},o)}})))}var U=n(55833),q=n(64037),$=function(){return{scrollX:(0,o.OQ)(0),scrollY:(0,o.OQ)(0),scrollXProgress:(0,o.OQ)(0),scrollYProgress:(0,o.OQ)(0)}},X=function(e){return!!e&&!e.current};function Y(e,t,n,i){return{factory:function(o){return W(o,(0,a._)((0,r._)({},t),{axis:e,container:(null==n?void 0:n.current)||void 0,target:(null==i?void 0:i.current)||void 0}))},times:[0,1],keyframes:[0,1],ease:function(e){return e},duration:1}}function J(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.container,o=t.target,c=(0,i._)(t,["container","target"]),d=(0,U.M)($);e=c.offset,"undefined"!=typeof window&&(o?(0,s.d)()&&!!B(e):(0,s.J)())&&(d.scrollXProgress.accelerate=Y("x",c,n,o),d.scrollYProgress.accelerate=Y("y",c,n,o));var f=(0,u.useRef)(null),m=(0,u.useRef)(!1),p=(0,u.useCallback)(function(){return f.current=W(function(e,t){var n=t.x,r=t.y;d.scrollX.set(n.current),d.scrollXProgress.set(n.progress),d.scrollY.set(r.current),d.scrollYProgress.set(r.progress)},(0,a._)((0,r._)({},c),{container:(null==n?void 0:n.current)||void 0,target:(null==o?void 0:o.current)||void 0})),function(){var e;null==(e=f.current)||e.call(f)}},[n,o,JSON.stringify(c.offset)]);return(0,q.E)(function(){if(m.current=!1,!(X(n)||X(o)))return p();m.current=!0},[p]),(0,u.useEffect)(function(){return m.current?((0,l.V)(!X(n),"Container ref is defined but not hydrated","use-scroll-ref"),(0,l.V)(!X(o),"Target ref is defined but not hydrated","use-scroll-ref"),p()):void 0},[p]),d}},37126:(e,t,n)=>{n.d(t,{p:()=>u});let r=["prompt","prompts"],a=["model"],i=["previewImage","previewImages","previewImg","previewImgs","image","img","images"],o=["previewVideo","previewVideos","video","videos"],s=["inputImage","inputImages","referenceImage","referenceImages"],l=["inputVideo","inputVideos","referenceVideo","referenceVideos","videoInput","videoInputs"];function u(e){let t=c(e,r);return{prompt:t[t.length-1],model:c(e,a).at(-1),previewImages:c(e,i),previewVideos:c(e,o),inputImages:c(e,s),inputVideos:c(e,l)}}
1function c(e,t,n){return t.flatMap(t=>e.getAll(t)).flatMap(e=>n?.splitCommas?e.split(","):[e]).map(e=>e.trim()).filter(Boolean)}},38125:(e,t,n)=>{function r({generateUrl:e,queryUrl:t,cancelUrl:n,uploadUrl:r,uploadVideoUrl:u,downloadUrl:c,fetcher:d=fetch,transformRequest:f=o,transformResponse:m=s}){let p={async generate(t){let n=await d(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f(t))}),r=await n.json();if(!n.ok)throw l(r,n.statusText);return m(r)},async cancel(e){n&&await d(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({taskId:e})})}};return r&&(p.uploadImages=async e=>{let t=[];for(let n=0;n<e.length;n+=10){let i=e.slice(n,n+10);t.push(...await a(r,i,d))}return t}),u&&(p.uploadVideos=async e=>{let t=[];for(let n of e)t.push(...await i(u,n,d));return t}),t&&(p.query=async e=>{let n=await d(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({taskId:e})}),r=await n.json();if(!n.ok)throw l(r,n.statusText);return m(r)}),c&&(p.download=async e=>{let t=c.includes("?")?"&":"?",n=await d(`${c}${t}url=${encodeURIComponent(e)}`);
1if(!n.ok)throw Error(n.statusText||"Download failed");return n.blob()}),p}async function a(e,t,n){if(0===t.length)return[];let r=new FormData;t.forEach(e=>r.append("files",e));let a=await n(e,{method:"POST",body:r}),i=await a.json();if(!a.ok)throw l(i,a.statusText);return u(i)}async function i(e,t,n){let r=new FormData;r.append("file",t);let a=await n(e,{method:"POST",body:r}),i=await a.json();if(!a.ok)throw l(i,a.statusText);return u(i)}function o(e){return e}function s(e){if(e&&"object"==typeof e&&"code"in e&&0!==e.code)throw l(e,"Generation failed");return e&&"object"==typeof e&&"data"in e?e.data:e}function l(e,t){let n=Error(function(e){if(e&&"object"==typeof e)return"string"==typeof e.message?e.message:"string"==typeof e.error?e.error:void 0}(e)||t);return n.errorCode=function(e){if(!e||"object"!=typeof e)return;if("string"==typeof e.error_code)return e.error_code;let t=e.data;if(t&&"object"==typeof t)return"string"==typeof t.error_code?t.error_code:void 0}(e),n.payload=e,n}function u(e){let t=e&&"object"==typeof e&&"data"in e?e.data:e;if(Array.isArray(t))return t.flatMap(e=>c(e));let n=c(t);if(n.length>0)return n;if(t&&"object"==typeof t){let e=t.urls??t.images??t.files;if(Array.isArray(e))return e.flatMap(e=>c(e))}return[]}function c(e){if("string"==typeof e)return[e];if(!e||"object"!=typeof e)return[];let t=e.url??e.src??e.imageUrl??e.uri;return"string"==typeof t?[t]:[]}n.d(t,{h:()=>r})},39603:(e,t,n)=>{n.d(t,{W:()=>s});var r=n(57505),a=n(20792),i=n(91780),o={some:0,all:1};function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.root,s=t.margin,l=t.amount,u=t.once,c=void 0!==u&&u,d=t.initial,f=(0,r._)((0,a.useState)(void 0!==d&&d),2),m=f[0],p=f[1];return(0,a.useEffect)(function(){if(e.current&&(!c||!m)){var t={root:n&&n.current||void 0,margin:s,amount:l};return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.root,a=n.margin,s=n.amount,l=void 0===s?"some":s,u=(0,i.K)(e),c=new WeakMap,d=new IntersectionObserver(function(e){e.forEach(function(e){var n=c.get(e.target);if(!!n!==e.isIntersecting)if(e.isIntersecting){var r=t(e.target,e);"function"==typeof r?c.set(e.target,r):d.unobserve(e.target)}else"function"==typeof n&&(n(e),c.delete(e.target))})},{root:r,rootMargin:a,threshold:"number"==typeof l?l:o[l]});return u.forEach(function(e){return d.observe(e)}),function(){return d.disconnect()}}(e.current,function(){return p(!0),c?void 0:function(){return p(!1)}},t)}},[n,e,s,c,l]),m}},39614:(e,t,n)=>{n.d(t,{Y:()=>eM});var r=n(76471),a=n(32812),i=n(20857),o=n(7907),s=n(57505),l=n(3395),u=n(69140),c=n(20792),d=n(90967),f=n(36156),m=n(7687),p=n(47041),h=n(93959),g=n(10609),v=(0,g.A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),x=n(47840),y=n(90094),w=n(70917),_=n(74226),b=(0,g.A)("crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]),j=(0,g.A)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]),k=n(86892),N=n(21107),M=n(81242),A=n(20810),E=(0,g.A)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),C=n(98843),R=n(34888),T=n(88107),S=n(38124),O=(0,g.A)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]),I=n(42477),L=n(89239),P=n(41837),z=n(61907),F=n(75774),D=(0,g.A)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]),V=n(5394),B=n(93838),G=n(58963),H=n(39891),K=n(40608),W=n(47431),U=(0,g.A)("pen-tool",[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]),q=(0,g.A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),$=n(88669),X=n(46452),Y=n(472),J=n(98257),Q=(0,g.A)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),Z=n(50815),ee=(0,g.A)("trophy",[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]]),et=n(1500),en=n(66221),er=n(4607),ea=n(88236),ei=n(83659),eo=n(59155),es=n(76351),el=n(41936),eu=(0,g.A)("infinity",[["path",{d:"M6 16c5 0 7-8 12-8a4 4 0 0 1 0 8c-5 0-7-8-12-8a4 4 0 1 0 0 8",key:"18ogeb"}]]),ec=n(18066),ed=n(53171),ef=n(44801),em=n(32741),ep=n(65484),eh=n(65083),eg=n(42389),ev=n(4586),ex=n(90745),ey=n(48372);function ew(){let[e,t]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{t(!0)},[]),e}var e_=n(69397),eb={admin:"Admin",closeMenu:"Close menu",credits:"Credits",imageTools:"Image tools",language:"Switch language",openMenu:"Open menu",profile:"Profile",signIn:"Sign in",signOut:"Sign out",theme:"Switch theme",themeDark:"Dark",themeLight:"Light",themeSystem:"System",unlimited:"Unlimited",videoTools:"Video tools"},ej={Activity:v,Brain:x.A,Coins:y.A,Copy:w.A,CreditCard:_.A,Crown:b,DollarSign:j,Download:k.A,Drama:N.A,FileText:M.A,Film:A.A,Folder:E,Github:C.A,Heart:R.A,HelpCircle:T.A,History:S.A,Home:O,ImageIcon:I.A,LayoutDashboard:L.A,LayoutGrid:P.A,Mail:z.A,Maximize:F.A,MessageCircle:D,Monitor:V.A,MousePointerClick:B.A,Move3D:G.A,Music:H.A,Paintbrush:K.A,Palette:W.A,PenTool:U,Plus:q,Settings:$.A,Share2:X.A,ShieldCheck:Y.A,SlidersHorizontal:J.A,Smartphone:Q,Sparkles:Z.A,Trophy:ee,Type:et.A,Upload:en.A,User:er.A,Users:ea.A,Video:ei.A,Zap:eo.A};function ek(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,ey.QP)((0,h.$)(t))}
1function eN(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};null==e||null==(r=e.track)||r.call(e,n,(0,i._)((0,a._)({},o),{page_path:(null==t?void 0:t.pathname)||("undefined"!=typeof window?window.location.pathname:void 0)}))}function eM(e){var t,n,r=e.config,o=e.app,l=e.runtime,d=e.labels,f=e.className,m=(0,a._)({},eb,d),p=(0,c.useMemo)(function(){return(0,e_.Bj)(r)},[r]),h=(0,s._)((0,c.useState)(!1),2),g=h[0],v=h[1],x=function(e){let[t,n]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let t=window.matchMedia(e),r=()=>n(t.matches);return r(),t.addEventListener("change",r),()=>t.removeEventListener("change",r)},[e]),t}("(min-width: 64rem)"),y=function(e=50){let[t,n]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let t=null,r=!1,a=()=>{null==t&&(t=window.requestAnimationFrame(()=>{t=null;let a=window.scrollY>e;a!==r&&(r=a,n(a))}))};return a(),window.addEventListener("scroll",a,{passive:!0}),()=>{window.removeEventListener("scroll",a),null!=t&&window.cancelAnimationFrame(t)}},[e]),t}();return(0,c.useEffect)(function(){x&&v(!1)},[x]),(0,u.jsx)("header",(0,i._)((0,a._)({"data-state":g?"active":"inactive"},y&&{"data-scrolled":!0}),{className:ek("fixed inset-x-0 top-0 z-50 max-lg:in-data-[state=active]:h-screen max-lg:in-data-[state=active]:backdrop-blur",p.className,f),children:(0,u.jsx)("div",{className:ek("absolute inset-x-0 top-0 z-50 h-18 border-transparent ring-1 ring-transparent transition-all duration-300","in-data-scrolled:border-foreground
1/5 in-data-scrolled:bg-background/75 in-data-scrolled:border-b in-data-scrolled:backdrop-blur","max-lg:in-data-[state=active]:bg-background/75 max-lg:h-14 max-lg:overflow-hidden max-lg:border-b max-lg:in-data-[state=active]:h-screen max-lg:in-data-[state=active]:overflow-y-auto max-lg:in-data-[state=active]:overscroll-contain max-lg:in-data-[state=active]:backdrop-blur"),children:(0,u.jsx)("div",{className:"container",children:(0,u.jsxs)("div",{className:"relative flex flex-wrap items-center justify-between lg:py-5",children:[(0,u.jsxs)("div",{className:"flex justify-between gap-8 max-lg:h-14 max-lg:w-full max-lg:border-b",children:[p.brand&&(0,u.jsx)(eO,{app:o,brand:p.brand,runtime:l}),x&&(0,u.jsx)(eA,{app:o,items:null!=(t=p.nav.items)?t:[],labels:m,pathname:null==l?void 0:l.pathname,runtime:l}),(0,u.jsx)("div",{className:"flex flex-1 items-center justify-end lg:hidden",children:(0,u.jsx)(eL,{app:o,labels:m,runtime:l})}),(0,u.jsxs)("button",{"aria-label":g?m.closeMenu:m.openMenu,className:"relative z-20 -m-2.5 -mr-3 block cursor-pointer p-2.5 lg:hidden",onClick:function(){var e=!g;eN(o,l,"header_mobile_menu_toggled",{open:e}),v(e)},type:"button",children:[(0,u.jsx)(es.A,{className:"m-auto size-5 duration-200 in-data-[state=active]:scale-0 in-data-[state=active]:rotate-180 in-data-[state=active]:opacity-0"}),(0,u.jsx)(el.A,{className:"absolute inset-0 m-auto size-5 scale-0 -rotate-180 opacity-0 duration-200 in-data-[state=active]:scale-100 in-data-[state=active]:rotate-0 in-data-[state=active]:opacity-100"})]})]}),!x&&g&&(0,u.jsx)(eS,{app:o,closeMenu:function(){return v(!1)},items:null!=(n=p.nav.items)?n:[],runtime:l}),(0,u.jsx)("div",{className:"mb-6 hidden w-full flex-wrap items-center justify-end space-y-8 in-data-[state=active]:flex max-lg:in-data-[state=active]:mt-6 md:flex-nowrap lg:m-0 lg:flex lg:w-fit lg:gap-6 lg:space-y-0 lg:border-transparent lg:bg-transparent lg:p-0 lg:shadow-none dark:shadow-none dark:lg:bg-transparent",children:(0,u.jsxs)("div",{className:"flex w-full flex-row items-center gap-4 sm:flex-row sm:gap-6 sm:space-y-0 md:w-fit",children:[p.buttons.map(function(e,t){var n,r;return(0,u.jsx)(eI,{app:o,item:e,runtime:l},"".concat(null!=(r=null!=(n=e.url)?n:e.title)?r:"button","-").concat(t))}),p.showTheme&&(0,u.jsx)(ez,{app:o,labels:m,runtime:l}),p.showLocale&&(0,u.jsx)(eF,{app:o,labels:m,runtime:l}),(0,u.jsx)("div",{className:"flex-1 md:hidden"}),p.showSign&&(0,u.jsx)(eP,{app:o,labels:m,runtime:l,userNav:p.userNav})]})})]})})})}))}function eA(e){var t=e.app,n=e.items,r=e.labels,a=(e.pathname,e.runtime);return(0,u.jsx)(eK,{className:"**:data-[slot=navigation-menu-content]:top-10 max-lg:hidden",viewport:!1,children:(0,u.jsx)(eW,{className:"gap-2",children:n.map(function(e,n){var i,o,s=(0,e_.pn)(e),l=null!=(o=e.children)?o:[];if(0===l.length)return(0,u.jsx)(eU,{children:(0,u.jsx)(eY,{asChild:!0,children:(0,u.jsxs)(eD,{className:ek("flex flex-row items-center gap-2 rounded-md px-4 py-1.5 text-sm transition-all duration-200","hover:bg-primary/10 hover:text-foreground hover:shadow-[0_0_12px_color-mix(in_oklab,var(--color-primary)_30%,transparent)]"),href:e.url||"",onClick:function(){return eN(t,a,"header_nav_clicked",{nav_type:"desktop",item_label:s,target_url:e.url||"",has_children:!1})},runtime:a,target:e.target||"_self",children:[(0,u.jsx)(eB,{icon:e.icon}),s]})})},"".concat(s,"-").concat(n));var c=l.some(function(e){return e.mediaType}),d=(0,e_.mF)(l.length),f=c?eC(l,null==t?void 0:t.currentToolMediaType).reduce(function(e,t){return e+t.layout.columns},0):d.columns;return(0,u.jsxs)(eU,{children:[(0,u.jsxs)(eH,{className:"hover:!bg-primary/10 flex flex-row items-center gap-2 text-sm transition-all duration-200 hover:shadow-[0_0_12px_color-mix(in_oklab,var(--color-primary)_30%,transparent)]",onClick:function(){return eN(t,a,"header_nav_clicked",{nav_type:"desktop",item_label:s,target_url:e.url||"",has_children:!0})},children:[(0,u.jsx)(eB,{className:"h-4 w-4",icon:e.icon}),s]}),(0,u.jsx)(e$,{className:ek("origin-top p-0 pr-0 group-data-[viewport=false]/navigation-menu:overflow-visible group-data-[viewport=false]/navigation-menu:rounded-none group-data-[viewport=false]/navigation-menu:border-0 group-data-[viewport=false]/navigation-menu:bg-transparent group-data-[viewport=false]/navigation-menu:shadow-none group-data-[viewport=false]/navigation-menu:ring-0",c?"lg:group-data-[viewport=false]/navigation-menu:-translate-x-2/3 xl:group-data-[viewport=false]/navigation-menu:-translate-x-1/3":"",(i=f)>=5?"w-[min(68rem,calc(100vw-2rem))] md:!w-[min(68rem,calc(100vw-2rem))]":4===i?"w-[min(62rem,calc(100vw-2rem))] md:!w-[min(62rem,calc(100vw-2rem))]":3===i?"w-[min(52rem,calc(100vw-2rem))] md:!w-[min(52rem,calc(100vw-2rem))]":2===i?"w-[min(38rem,calc(100vw-2rem))] md:!w-[min(38rem,calc(100vw-2rem))]":"w-[min(22rem,calc(100vw-2rem))] md:!w-[min(22rem,calc(100vw-2rem))]"),children:(0,u.jsx)("div",{className:"border-foreground
1/10 bg-background/70 ring-foreground/10 w-full rounded-2xl border p-4 shadow-[0_22px_60px_-24px_rgb(15_23_42/0.55),0_8px_24px_-16px_rgb(15_23_42/0.35)] ring-1 backdrop-blur-xl backdrop-saturate-150",children:c?(0,u.jsx)(eE,{currentToolMediaType:null==t?void 0:t.currentToolMediaType,items:l,labels:r,parentLabel:s,app:t,runtime:a}):(0,u.jsx)("ul",{className:ek("mt-1 grid gap-x-4 gap-y-1.5",eT(d.columns)),children:l.map(function(e,n){return(0,u.jsx)(eR,{app:t,item:e,parentLabel:s,runtime:a},"".concat((0,e_.pn)(e),"-").concat(n))})})})})]},"".concat(s,"-").concat(n))})})})}function eE(e){var t=e.app,n=e.currentToolMediaType,r=e.items,a=e.labels,i=e.parentLabel,o=e.runtime,s=eC(r,n),l=s.reduce(function(e,t){return e+t.layout.columns},0);return(0,u.jsx)("div",{className:ek("grid w-full gap-x-6 gap-y-5",eT(l)),children:s.map(function(e){var n;return(0,u.jsxs)("div",{className:ek("min-w-0",3===(n=e.layout.columns)?"col-span-3":2===n?"col-span-2":"col-span-1"),children:[(0,u.jsx)("div",{className:"text-muted-foreground mb-3 px-1 text-xs font-semibold tracking-wide",children:"image"===e.type?a.imageTools:a.videoTools}),(0,u.jsx)("ul",{className:ek("grid gap-x-3 gap-y-1",eT(e.layout.columns)),children:e.items.map(function(e,n){return(0,u.jsx)(eR,{app:t,item:e,parentLabel:i,runtime:o},"".concat((0,e_.pn)(e),"-").concat(n))})})]},e.type)})})}function eC(e,t){return("image"===t?["image","video"]:["video","image"]).map(function(t){return{type:t,items:e.filter(function(e){return e.mediaType===t}),layout:(0,e_.mF)(e.filter(function(e){return e.mediaType===t}).length)}}).filter(function(e){return e.items.length>0})}function eR(e){var t=e.app,n=e.item,r=e.parentLabel,a=e.runtime;return(0,u.jsx)("li",{children:(0,u.jsx)(eY,{asChild:!0,children:(0,u.jsx)(eD,{className:"group/item hover:bg-primary/5 focus:bg-primary/5 hover:ring-primary/15 focus:ring-primary/15 block rounded-lg px-3 py-2 ring-1 ring-transparent transition-[background-color,box-shadow] duration-200 hover:shadow-[0_8px_20px_-18px_rgb(15_23_42/0.5)] focus:shadow-[0_8px_20px_-18px_rgb(15_23_42/0.5)]",href:n.url||"",onClick:function(){return eN(t,a,"header_nav_clicked",{nav_type:"desktop_submenu",parent_label:r,item_label:(0,e_.pn)(n),media_type:n.mediaType,target_url:n.url||""})},runtime:a,target:n.target||"_self",children:(0,u.jsx)("div",{className:"min-w-0",children:(0,u.jsx)("div",{className:"text-foreground line-clamp-2 text-sm leading-snug font-medium",children:(0,e_.pn)(n)})})})})})}function eT(e){return e>=6?"grid-cols-6":5===e?"grid-cols-5":4===e?"grid-cols-4":3===e?"grid-cols-3":2===e?"grid-cols-2":"grid-cols-1"}function eS(e){var t=e.app,n=e.closeMenu,r=e.items,a=e.runtime;return(0,u.jsx)("nav",{className:"w-full pb-[calc(1rem+env(safe-area-inset-bottom))] [--color-border:--alpha(var(--color-foreground)/5%)] [--color-muted:--alpha(var(--color-foreground)/5%)]",role:"navigation",children:(0,u.jsx)(eJ,{className:"-mx-4 mt-0.5 space-y-0.5 **:hover:no-underline",collapsible:!0,type:"single",children:r.map(function(e,r){var i,o=(0,e_.pn)(e),s=null!=(i=e.children)?i:[];return(0,u.jsx)(eQ,{className:"group relative border-b-0 before:pointer-events-none before:absolute before:inset-x-4 before:bottom-0 before:border-b",value:o,children:s.length>0?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(eZ,{className:"data-[state=open]:bg-muted flex items-center justify-between px-4 py-3 text-lg **:!font-normal",children:o}),(0,u.jsx)(e0,{className:"pb-5",children:(0,u.jsx)("ul",{children:s.map(function(e,r){return(0,u.jsx)("li",{children:(0,u.jsx)(eD,{className:"block px-4 py-2.5 text-base leading-snug",href:e.url||"",onClick:function(){eN(t,a,"header_nav_clicked",{nav_type:"mobile",parent_label:o,item_label:(0,e_.pn)(e),target_url:e.url||"",media_type:e.mediaType}),n()},runtime:a,target:e.target||"_self",children:(0,e_.pn)(e)})},"".concat((0,e_.pn)(e),"-").concat(r))})})})]}):(0,u.jsx)(eD,{className:"data-[state=open]:bg-muted flex items-center justify-between px-4 py-3 text-lg **:!font-normal",href:e.url||"",onClick:function(){eN(t,a,"header_nav_clicked",{nav_type:"mobile",item_label:o,target_url:e.url||"",has_children:!1}),n()},runtime:a,target:e.target||"_self",children:o})},"".concat(o,"-").concat(r))})})})}function eO(e){var t,n,r=e.app,o=e.brand,s=e.runtime,l=o.logo?(0,i._)((0,a._)({},o.logo),{alt:null!=(n=null!=(t=o.logo.alt)?t:o.title)?n:""}):void 0;return(0,u.jsxs)(eD,{className:ek("flex items-center space-x-3",o.className),href:o.url||"/",onClick:function(){return eN(r,s,"header_nav_clicked",{nav_type:"brand",item_label:o.title,target_url:o.url||"/"})},runtime:s,target:o.target||"_self",children:[l&&(0,u.jsx)(eV,{className:"h-8 w-auto rounded-lg",image:l,runtime:s}),o.title&&(0,u.jsx)("span",{className:"text-lg font-medium",children:o.title})]})}function eI(e){var t=e.app,n=e.item,r=e.runtime;return(0,u.jsxs)(eD,{className:ek("focus-visible:ring-ring inline-flex h-7 items-center justify-center gap-2 rounded-md px-3 text-sm font-medium whitespace-nowrap ring-0 transition-colors focus-visible:ring-1 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50","outline"===n.variant?"bg-background border-primary ring-foreground
1/10 hover:bg-muted/50 dark:ring-foreground/15 dark:hover:bg-muted/50 border border-transparent shadow-sm ring-1 shadow-black/15 duration-200":"bg-primary text-primary-foreground hover:bg-primary/90 border-[0.5px] border-white/25 shadow-md ring-1 shadow-black/20 ring-(--ring-color) [--ring-color:color-mix(in_oklab,var(--color-foreground)15%,var(--color-primary))]"),href:n.url||"",onClick:function(){return eN(t,r,"header_button_clicked",{button_text:(0,e_.pn)(n),target_url:n.url||"",variant:n.variant})},runtime:r,target:n.target||"_self",children:[(0,u.jsx)(eB,{className:"size-4",icon:n.icon}),(0,u.jsx)("span",{children:(0,e_.pn)(n)})]})}function eL(e){var t,n,r,a=e.app,i=e.labels,o=e.runtime,s=(0,e_.wz)(null!=(n=null==a?void 0:a.credits)?n:null==a||null==(t=a.user)?void 0:t.credits);return(null==a?void 0:a.user)&&s?(0,u.jsxs)(eD,{"aria-label":i.credits,className:"border-border/60 bg-background/80 text-foreground/90 hover:border-foreground/30 hover:text-foreground inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium backdrop-blur transition-colors",href:null!=(r=a.pricingHref)?r:"/pricing",onClick:function(){var e;return eN(a,o,"header_credits_clicked",{remaining_credits:s.remaining,is_unlimited:s.unlimited,target_url:null!=(e=a.pricingHref)?e:"/pricing"})},runtime:o,children:[(0,u.jsx)(_.A,{className:"text-muted-foreground h-3 w-3"}),s.unlimited?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(eu,{className:"h-3 w-3"}),(0,u.jsx)("span",{children:i.unlimited})]}):(0,u.jsx)("span",{children:s.remaining})]}):null}function eP(e){var t,n,r,a,i,o,s,l,c,d,f,m,p=e.app,h=e.labels,g=e.runtime,v=e.userNav,x=ew(),w=null!=(a=null==p?void 0:p.user)?a:null;if((null==p?void 0:p.isAuthChecking)||!x)return(0,u.jsx)(ec.A,{className:"size-4 animate-spin"});
1if(!w)return(0,u.jsx)("button",{className:"border-foreground/10 bg-primary text-primary-foreground hover:bg-primary/90 ml-4 inline-flex h-9 cursor-pointer items-center justify-center rounded-md px-4 text-sm font-medium ring-0 transition-colors",onClick:function(){var e;eN(p,g,"sign_in_modal_open",{source:"header"}),null==p||null==(e=p.requestSignIn)||e.call(p)},type:"button",children:h.signIn});var _=w.name||w.email||h.profile,b=_.trim().charAt(0).toUpperCase()||"U",j=null!=(i=null==v?void 0:v.showName)?i:null==v?void 0:v.show_name,k=null!=(o=null==v?void 0:v.showCredits)?o:null==v?void 0:v.show_credits,N=null!=(s=null==v?void 0:v.showSignOut)?s:null==v?void 0:v.show_sign_out;return(0,u.jsxs)(e1,{children:[(0,u.jsx)(e2,{asChild:!0,children:(0,u.jsx)("button",{className:"relative h-10 w-10 rounded-full p-0",type:"button",children:(0,u.jsxs)(e6,{className:"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",children:[(0,u.jsx)(e9,{alt:"".concat(_," profile photo"),className:"aspect-square h-full w-full object-cover",src:w.image||""}),(0,u.jsx)(e8,{className:"bg-muted flex h-full w-full items-center justify-center rounded-full text-sm font-medium",children:b})]})})}),(0,u.jsxs)(e5,{align:"end",children:[j&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(eG,{href:null!=(l=null==p?void 0:p.profileHref)?l:"/settings/profile",icon:(0,u.jsx)(er.A,{className:"size-4"}),onClick:function(){var e;return eN(p,g,"header_user_menu_clicked",{item_label:h.profile,target_url:null!=(e=null==p?void 0:p.profileHref)?e:"/settings/profile",is_admin_item:!1})},runtime:g,children:_}),(0,u.jsx)(e4,{})]}
1),k&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(eG,{href:null!=(c=null==p?void 0:p.creditsHref)?c:"/settings/credits",icon:(0,u.jsx)(y.A,{className:"size-4"}),onClick:function(){var e;return eN(p,g,"header_user_menu_clicked",{item_label:h.credits,target_url:null!=(e=null==p?void 0:p.creditsHref)?e:"/settings/credits",is_admin_item:!1})},runtime:g,children:(t=null!=(d=null==p?void 0:p.credits)?d:w.credits,n=h,(r=(0,e_.wz)(t))?"".concat(n.credits,": ").concat(r.unlimited?"∞":r.remaining):n.credits)}),(0,u.jsx)(e4,{})]}),(null!=(f=null==v?void 0:v.items)?f:[]).map(function(e,t){return(0,u.jsxs)("div",{children:[(0,u.jsx)(eG,{href:e.url||"",icon:(0,u.jsx)(eB,{className:"size-4",icon:e.icon}),onClick:function(){return eN(p,g,"header_user_menu_clicked",{item_label:(0,e_.pn)(e),target_url:e.url||"",is_admin_item:!1})},runtime:g,target:e.target||"_self",children:(0,e_.pn)(e)}),(0,u.jsx)(e4,{})]},"".concat((0,e_.pn)(e),"-").concat(t))}),w.isAdmin&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(eG,{href:null!=(m=null==p?void 0:p.adminHref)?m:"/admin",icon:(0,u.jsx)(L.A,{className:"size-4"}),onClick:function(){var e;return eN(p,g,"header_user_menu_clicked",{item_label:h.admin,target_url:null!=(e=null==p?void 0:p.adminHref)?e:"/admin",is_admin_item:!0})},runtime:g,children:h.admin}),(0,u.jsx)(e4,{})]}),N&&(0,u.jsxs)(e3,{className:"focus:bg-muted focus:text-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none",onSelect:function(){var e;eN(p,g,"sign_out_clicked",{source:"header"}),null==p||null==(e=p.signOut)||e.call(p)},children:[(0,u.jsx)(ed.A,{className:"size-4"}),(0,u.jsx)("span",{children:h.signOut})]})]})]})}function ez(e){var t=e.app,n=e.labels,a=e.runtime,i=ew(),o=(0,c.useRef)(null),s=null==t?void 0:t.theme;if(!(null==s?void 0:s.setTheme))return null;var d=s.setTheme;if(!i&&"toggle"===s.type)return null;var f=i&&document.documentElement.classList.contains("dark")||"dark"===s.current,m=function(e){return eN(t,a,"theme_changed",{from_theme:s.current,to_theme:e,source:"header"}),function(e,t,n){return(0,r._)(function(e,t,n){var r,a,i,o,s,u,c,d,f,m,p,h,g;return(0,l.YH)(this,function(l){switch(l.label){case 0:if(r=n.animated,a=n.origin,!r||!a||"undefined"==typeof document||!document.startViewTransition)return e(t),[2];return i="dark"===t||"system"===t&&window.matchMedia("(prefers-color-scheme: dark)").matches,[4,document.startViewTransition(function(){(0,ex.flushSync)(function(){document.documentElement.classList.toggle("dark",i),e(t)})}).ready];case 1:return l.sent(),s=(o=a.getBoundingClientRect()).top,u=o.left,c=o.width,d=o.height,f=u+c/2,m=s+d/2,p=window.innerWidth-u,h=window.innerHeight-s,g=Math.hypot(Math.max(u,p),Math.max(s,h)),document.documentElement.animate({clipPath:["circle(0px at ".concat(f,"px ").concat(m,"px)"),"circle(".concat(g,"px at ").concat(f,"px ").concat(m,"px)")]},{duration:700,easing:"ease-in-out",pseudoElement:"::view-transition-new(root)"}),[2]}})}).apply(this,arguments)}(d,e,{animated:s.animated,origin:o.current})};return"toggle"===s.type?(0,u.jsx)("button",{"aria-label":f?n.themeLight:n.themeDark,className:"hover:bg-muted focus-visible:ring-ring inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors focus-visible:ring-1 focus-visible:outline-none",onClick:function(){m(f?"light":"dark")},ref:o,type:"button",children:i&&f?(0,u.jsx)(ef.A,{className:"size-4"}):(0,u.jsx)(em.A,{className:"size-4"})}):(0,u.jsxs)(e1,{children:[(0,u.jsx)(e2,{asChild:!0,children:(0,u.jsx)("button",{"aria-label":n.theme,className:"hover:bg-muted focus-visible:ring-ring inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors focus-visible:ring-1 focus-visible:outline-none",ref:o,type:"button",children:i&&f?(0,u.jsx)(em.A,{className:"size-4"}):(0,u.jsx)(ef.A,{className:"size-4"})})}),(0,u.jsx)(e5,{align:"end",children:[{icon:ef.A,label:n.themeLight,value:"light"},{icon:em.A,label:n.themeDark,value:"dark"},{icon:V.A,label:n.themeSystem,value:"system"}].map(function(e){var t=e.icon;return(0,u.jsxs)(e3,{className:"focus:bg-muted focus:text-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none",onSelect:function(){m(e.value)},children:[(0,u.jsx)(t,{className:"size-4"}),(0,u.jsx)("span",{children:e.label}),i&&s.current===e.value&&(0,u.jsx)(ep.A,{className:"ml-auto size-4"})]},e.value)})})]})}function eF(e){var t,n=e.app,r=e.labels,a=e.runtime,i=null==n?void 0:n.locale;return(null==i||null==(t=i.options)?void 0:t.length)&&i.switchLocale?(0,u.jsxs)(e1,{children:[(0,u.jsx)(e2,{asChild:!0,children:(0,u.jsx)("button",{"aria-label":r.language,className:"hover:bg-muted focus-visible:ring-ring inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors focus-visible:ring-1 focus-visible:outline-none",type:"button",children:(0,u.jsx)(eh.A,{className:"size-4"})})}),(0,u.jsx)(e5,{align:"end",children:i.options.map(function(e){return(0,u.jsxs)(e3,{className:"focus:bg-muted focus:text-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none",onSelect:function(){var t;e.value!==i.current&&eN(n,a,"locale_changed",{from_locale:i.current,to_locale:e.value,source:"header"}),null==(t=i.switchLocale)||t.call(i,e.value)},children:[(0,u.jsx)(eg.A,{className:"size-4"}),(0,u.jsx)("span",{children:e.label}),i.current===e.value&&(0,u.jsx)(ep.A,{className:"ml-auto size-4"})]},e.value)})})]}):null}var eD=(0,c.forwardRef)(function(e,t){var n=e.children,r=e.href,s=e.runtime,l=e.target,c=(0,o._)(e,["children","href","runtime","target"]),d=null==s?void 0:s.LinkComponent;return d?(0,u.jsx)(d,(0,i._)((0,a._)({href:r,ref:t,target:l},c),{children:n})):(0,u.jsx)("a",(0,i._)((0,a._)({href:r,ref:t,target:l},c),{children:n}))});function eV(e){var t,n,r,i=e.image,s=e.runtime,l=(0,o._)(e,["image","runtime"]),c=null==s?void 0:s.ImageComponent,d=null!=(t=i.alt)?t:"",f=null!=(n=i.width)?n:32,m=null!=(r=i.height)?r:32;return c?(0,u.jsx)(c,(0,a._)({alt:d,height:m,src:i.src,unoptimized:i.src.startsWith("http"),width:f},l)):(0,u.jsx)("img",(0,a._)({alt:d,height:m,src:i.src,width:f},l))}function eB(e){var t,n=e.className,r=e.icon;if(!r)return null;if("string"!=typeof r)return(0,u.jsx)(u.Fragment,{children:r});var a=null!=(t=ej[r])?t:T.A;return(0,u.jsx)(a,{className:n})}function eG(e){var t=e.children,n=e.href,r=e.icon,a=e.onClick,i=e.runtime,o=e.target;return(0,u.jsx)(e3,{asChild:!0,children:(0,u.jsxs)(eD,{className:"focus:bg-muted focus:text-foreground flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none",href:n,onClick:a,runtime:i,target:o,children:[r,(0,u.jsx)("span",{children:t})]})})}function eH(e){return ew()?(0,u.jsx)(eq,(0,a._)({},e)):null}function eK(e){var t=e.className,n=e.children,r=e.viewport,s=void 0===r||r,l=(0,o._)(e,["className","children","viewport"]);return(0,u.jsxs)(p.bL,(0,i._)((0,a._)({className:ek("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",t),"data-slot":"navigation-menu","data-viewport":s,role:"navigation"},l),{children:[n,s&&(0,u.jsx)(eX,{})]}))}function eW(e){var t=e.className,n=(0,o._)(e,["className"]);return(0,u.jsx)(p.B8,(0,a._)({className:ek("group flex flex-1 list-none items-center justify-center gap-1",t),"data-slot":"navigation-menu-list"},n))}function eU(e){var t=e.className,n=(0,o._)(e,["className"]);return(0,u.jsx)(p.q7,(0,a._)({className:ek("relative",t),"data-slot":"navigation-menu-item"},n))}function eq(e){var t=e.className,n=e.children,r=(0,o._)(e,["className","children"]);return(0,u.jsxs)(p.l9,(0,i._)((0,a._)({className:ek("group text-muted-foreground hover:bg-foreground
1/5 hover:text-foreground focus:bg-foreground/5 focus:text-foreground data-[state=open]:hover:bg-foreground/5 data-[state=open]:text-foreground data-[state=open]:focus:bg-foreground/5 data-[state=open]:bg-foreground/5 focus-visible:ring-ring/50 inline-flex h-8 w-max items-center justify-center rounded-md px-4 py-1 text-sm font-medium transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50",t),"data-slot":"navigation-menu-trigger"},r),{children:[n,(0,u.jsx)(ev.A,{"aria-hidden":"true",className:"relative top-[1px] ml-1.5 size-3 opacity-75 transition duration-300 group-data-[state=open]:translate-y-px",strokeWidth:2.5})]}))}function e$(e){var t=e.className,n=(0,o._)(e,["className"]);return(0,u.jsx)(p.UC,(0,a._)({className:ek("top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto","data-[motion=from-end]:animate-enter-from-right data-[motion=from-start]:animate-enter-from-left data-[motion=to-end]:animate-exit-to-right data-[motion=to-start]:animate-exit-to-left","group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:-translate-x-1/3 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-(--radius) group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:border-transparent group-data-[viewport=false]/navigation-menu:shadow-lg group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",t),"data-slot":"navigation-menu-content"},n))}function eX(e){var t=e.className,n=(0,o._)(e,["className"]);return(0,u.jsx)("div",{className:"fixed inset-x-0 top-12 isolate z-50 mx-auto flex max-w-6xl px-(--viewport-outer-px)",children:(0,u.jsx)(p.LM,(0,a._)({className:ek("bg-popover text-popover-foreground ring-foreground/10 relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full origin-top overflow-hidden rounded-(--radius) border border-transparent p-0.5 shadow-xl ring-1 shadow-black/10 transition-[width,height] duration-200 md:w-(--radix-navigation-menu-viewport-width)","data-[state=closed]:animate-scale-out data-[state=open]:animate-scale-in",t),"data-slot":"navigation-menu-viewport"},n))})}function eY(e){var t=e.className,n=(0,o._)(e,["className"]);return(0,u.jsx)(p.N_,(0,a._)({className:ek("data-[active=true]:text-foreground hover:bg-muted hover:text-foreground focus:bg-muted focus:text-foreground focus-visible:ring-ring/50 [&_svg:not([class*=text-])]:text-muted-foreground flex flex-col gap-1 rounded-md p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*=size-])]:size-4",t),"data-slot":"navigation-menu-link"},n))}function eJ(e){return(0,u.jsx)(d.bL,(0,a._)({"data-slot":"accordion"},e))}function eQ(e){var t=e.className,n=(0,o._)(e,["className"]);return(0,u.jsx)(d.q7,(0,a._)({className:ek("border-b last:border-b-0",t),"data-slot":"accordion-item"},n))}function eZ(e){var t=e.className,n=e.children,r=(0,o._)(e,["className","children"]);return(0,u.jsx)(d.Y9,{className:"flex",children:(0,u.jsxs)(d.l9,(0,i._)((0,a._)({className:ek("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",t),"data-slot":"accordion-trigger"},r),{children:[n,(0,u.jsx)(ev.A,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]}))})}function e0(e){var t=e.className,n=e.children,r=(0,o._)(e,["className","children"]);return(0,u.jsx)(d.UC,(0,i._)((0,a._)({className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm","data-slot":"accordion-content"},r),{children:(0,u.jsx)("div",{className:ek("pt-0 pb-4",t),children:n})}))}function e1(e){return(0,u.jsx)(m.bL,(0,a._)({},e))}function e2(e){return(0,u.jsx)(m.l9,(0,a._)({},e))}function e5(e){var t=e.className,n=(0,o._)(e,["className"]);return(0,u.jsx)(m.ZL,{children:(0,u.jsx)(m.UC,(0,a._)({className:ek("bg-popover text-popover-foreground z-50 min-w-40 overflow-hidden rounded-md border p-1 shadow-md",t),sideOffset:8},n))})}function e3(e){var t=e.className,n=(0,o._)(e,["className"]);return(0,u.jsx)(m.q7,(0,a._)({className:ek("focus:bg-muted focus:text-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none disabled:pointer-events-none disabled:opacity-50",t)},n))}function e4(e){var t=e.className,n=(0,o._)(e,["className"]);return(0,u.jsx)(m.wv,(0,a._)({className:ek("bg-muted -mx-1 my-1 h-px",t)},n))}function e6(e){return(0,u.jsx)(f.bL,(0,a._)({},e))}function e9(e){return(0,u.jsx)(f._V,(0,a._)({},e))}function e8(e){return(0,u.jsx)(f.H4,(0,a._)({delayMs:100},e))}},45408:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]])},45968:(e,t,n)=>{n.d(t,{K:()=>a,S:()=>i});let r={4:130,6:175,8:215,10:260};function a({scene:e,resolution:t}){return"text-to-image"===e?"4K"===t?12:8:"4K"===t?15:10}function i({model:e,mode:t,duration:n,resolution:a,hasInputVideo:i}){var o,s,l;let u=!Number.isFinite(o=n)||o<=0?5:o;if(e.includes("gemini-omni")){return i?350:(s=u)<=4?r[4]:s<=6?r[6]:s<=8?r[8]:r[10]}if("veo3"===(l=e)||"veo3_fast"===l||"veo3_lite"===l){let n="quality"===t||"veo3"===e?250:150;return"4k"===a?n+100:"1080p"===a?n+50:n}return("pro"===t||"1080p"===t?27:20)*u}},47041:(e,t,n)=>{n.d(t,{B8:()=>ek,LM:()=>eC,N_:()=>eA,UC:()=>eE,bL:()=>ej,l9:()=>eM,q7:()=>eN});
1var r=n(82258),a=n(32812),i=n(20857),o=n(7907),s=n(57505),l=n(17727),u=n(20792),c=n(90745),d=n(52804),f=n(20836),m=n(23959),p=n(98139),h=n(83108),g=n(40221),v=n(412),x=n(65507),y=n(44236),w=n(5636),_=n(92347),b=n(49605),j=n(96975),k=n(33951),N=n(69140),M="NavigationMenu",A=(0,s._)((0,y.N)(M),3),E=A[0],C=A[1],R=A[2],T=(0,s._)((0,y.N)(M),3),S=T[0],O=T[1],I=T[2],L=(0,s._)((0,d.A)(M,[R,I]),2),P=L[0];L[1];var z=(0,s._)(P(M),2),F=z[0],D=z[1],V=(0,s._)(P(M),2),B=V[0],G=V[1],H=u.forwardRef(function(e,t){var n=e.__scopeNavigationMenu,r=e.value,l=e.onValueChange,c=e.defaultValue,d=e.delayDuration,f=void 0===d?200:d,v=e.skipDelayDuration,x=void 0===v?300:v,y=e.orientation,w=void 0===y?"horizontal":y,_=e.dir,b=(0,o._)(e,["__scopeNavigationMenu","value","onValueChange","defaultValue","delayDuration","skipDelayDuration","orientation","dir"]),j=(0,s._)(u.useState(null),2),k=j[0],A=j[1],E=(0,h.s)(t,function(e){return A(e)}),C=(0,g.jH)(_),R=u.useRef(0),T=u.useRef(0),S=u.useRef(0),O=(0,s._)(u.useState(!0),2),I=O[0],L=O[1],P=(0,s._)((0,p.i)({prop:r,onChange:function(e){var t=x>0;""!==e?(window.clearTimeout(S.current),t&&L(!1)):(window.clearTimeout(S.current),S.current=window.setTimeout(function(){return L(!0)},x)),null==l||l(e)},defaultProp:null!=c?c:"",caller:M}),2),z=P[0],F=P[1],D=u.useCallback(function(){window.clearTimeout(T.current),T.current=window.setTimeout(function(){return F("")},150)},[F]),V=u.useCallback(function(e){window.clearTimeout(T.current),F(e)},[F]),B=u.useCallback(function(e){z===e?window.clearTimeout(T.current):R.current=window.setTimeout(function(){window.clearTimeout(T.current),F(e)},f)},[z,F,f]);return u.useEffect(function(){return function(){window.clearTimeout(R.current),window.clearTimeout(T.current),window.clearTimeout(S.current)}},[]),(0,N.jsx)(W,{scope:n,isRootMenu:!0,value:z,dir:C,orientation:w,rootNavigationMenu:k,onTriggerEnter:function(e){window.clearTimeout(R.current),I?B(e):V(e)},onTriggerLeave:function(){window.clearTimeout(R.current),D()},onContentEnter:function(){return window.clearTimeout(T.current)},onContentLeave:D,onItemSelect:function(e){F(function(t){return t===e?"":e})},onItemDismiss:function(){return F("")},children:(0,N.jsx)(m.sG.nav,(0,i._)((0,a._)({"aria-label":"Main","data-orientation":w,dir:C},b),{ref:E}))})});H.displayName=M;var K="NavigationMenuSub";u.forwardRef(function(e,t){var n=e.__scopeNavigationMenu,r=e.value,l=e.onValueChange,u=e.defaultValue,c=e.orientation,d=void 0===c?"horizontal":c,f=(0,o._)(e,["__scopeNavigationMenu","value","onValueChange","defaultValue","orientation"]),h=D(K,n),g=(0,s._)((0,p.i)({prop:r,onChange:l,defaultProp:null!=u?u:"",caller:K}),2),v=g[0],x=g[1];return(0,N.jsx)(W,{scope:n,isRootMenu:!1,value:v,dir:h.dir,orientation:d,rootNavigationMenu:h.rootNavigationMenu,onTriggerEnter:function(e){return x(e)},onItemSelect:function(e){return x(e)},onItemDismiss:function(){return x("")},children:(0,N.jsx)(m.sG.div,(0,i._)((0,a._)({"data-orientation":d},f),{ref:t}))})}).displayName=K;var W=function(e){var t=e.scope,n=e.isRootMenu,r=e.rootNavigationMenu,a=e.dir,i=e.orientation,o=e.children,l=e.value,c=e.onItemSelect,d=e.onItemDismiss,f=e.onTriggerEnter,m=e.onTriggerLeave,p=e.onContentEnter,h=e.onContentLeave,g=(0,s._)(u.useState(null),2),v=g[0],y=g[1],w=(0,s._)(u.useState(new Map),2),b=w[0],k=w[1],M=(0,s._)(u.useState(null),2),A=M[0],C=M[1];return(0,N.jsx)(F,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:l,previousValue:(0,_.Z)(l),baseId:(0,x.B)(),dir:a,orientation:i,viewport:v,onViewportChange:y,indicatorTrack:A,onIndicatorTrackChange:C,onTriggerEnter:(0,j.c)(f),onTriggerLeave:(0,j.c)(m),onContentEnter:(0,j.c)(p),onContentLeave:(0,j.c)(h),onItemSelect:(0,j.c)(c),onItemDismiss:(0,j.c)(d),onViewportContentChange:u.useCallback(function(e,t){k(function(n){return n.set(e,t),new Map(n)})},[]),onViewportContentRemove:u.useCallback(function(e){k(function(t){return t.has(e)?(t.delete(e),new Map(t)):t})},[]),children:(0,N.jsx)(E.Provider,{scope:t,children:(0,N.jsx)(B,{scope:t,items:b,children:o})})})},U="NavigationMenuList",q=u.forwardRef(function(e,t){var n=e.__scopeNavigationMenu,r=(0,o._)(e,["__scopeNavigationMenu"]),s=D(U,n),l=(0,N.jsx)(m.sG.ul,(0,i._)((0,a._)({"data-orientation":s.orientation},r),{ref:t}));return(0,N.jsx)(m.sG.div,{style:{position:"relative"},ref:s.onIndicatorTrackChange,children:(0,N.jsx)(E.Slot,{scope:n,children:s.isRootMenu?(0,N.jsx)(em,{asChild:!0,children:l}):l})})});q.displayName=U;var $="NavigationMenuItem",X=(0,s._)(P($),2),Y=X[0],J=X[1],Q=u.forwardRef(function(e,t){var n=e.__scopeNavigationMenu,r=e.value,s=(0,o._)(e,["__scopeNavigationMenu","value"]),l=(0,x.B)(),c=u.useRef(null),d=u.useRef(null),f=u.useRef(null),p=u.useRef(function(){}),h=u.useRef(!1),g=u.useCallback(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"start";if(c.current){p.current();var t=eg(c.current);t.length&&ev("start"===e?t:t.reverse())}},[]),v=u.useCallback(function(){if(c.current){var e,t=eg(c.current);t.length&&((e=t).forEach(function(e){e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),p.current=function(){e.forEach(function(e){var t=e.dataset.tabindex;e.setAttribute("tabindex",t)})})}},[]);return(0,N.jsx)(Y,{scope:n,value:r||l||"LEGACY_REACT_AUTO_VALUE",triggerRef:d,contentRef:c,focusProxyRef:f,wasEscapeCloseRef:h,onEntryKeyDown:g,onFocusProxyEnter:g,onRootContentClose:v,onContentFocusOutside:v,children:(0,N.jsx)(m.sG.li,(0,i._)((0,a._)({},s),{ref:t}))})});Q.displayName=$;var Z="NavigationMenuTrigger",ee=u.forwardRef(function(e,t){var n=e.__scopeNavigationMenu,r=e.disabled,s=(0,o._)(e,["__scopeNavigationMenu","disabled"]),l=D(Z,e.__scopeNavigationMenu),c=J(Z,e.__scopeNavigationMenu),d=u.useRef(null),p=(0,h.s)(d,c.triggerRef,t),g=ew(l.baseId,c.value),v=e_(l.baseId,c.value),x=u.useRef(!1),y=u.useRef(!1),w=c.value===l.value;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(E.ItemSlot,{scope:n,value:c.value,children:(0,N.jsx)(eh,{asChild:!0,children:(0,N.jsx)(m.sG.button,(0,i._)((0,a._)({id:g,disabled:r,"data-disabled":r?"":void 0,"data-state":ey(w),"aria-expanded":w,"aria-controls":v},s),{ref:p,onPointerEnter:(0,f.mK)(e.onPointerEnter,function(){y.current=!1,c.wasEscapeCloseRef.current=!1}),onPointerMove:(0,f.mK)(e.onPointerMove,eb(function(){r||y.current||c.wasEscapeCloseRef.current||x.current||(l.onTriggerEnter(c.value),x.current=!0)})),onPointerLeave:(0,f.mK)(e.onPointerLeave,eb(function(){r||(l.onTriggerLeave(),x.current=!1)})),onClick:(0,f.mK)(e.onClick,function(){l.onItemSelect(c.value),y.current=w}),onKeyDown:(0,f.mK)(e.onKeyDown,function(e){var t={horizontal:"ArrowDown",vertical:"rtl"===l.dir?"ArrowLeft":"ArrowRight"}[l.orientation];w&&e.key===t&&(c.onEntryKeyDown(),e.preventDefault())})}))})}),w&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(k.bL,{"aria-hidden":!0,tabIndex:0,ref:c.focusProxyRef,onFocus:function(e){var t=c.contentRef.current,n=e.relatedTarget,r=n===d.current,a=null==t?void 0:t.contains(n);(r||!a)&&c.onFocusProxyEnter(r?"start":"end")}}),l.viewport&&(0,N.jsx)("span",{"aria-owns":v})]})]})});ee.displayName=Z;var et="navigationMenu.linkSelect",en=u.forwardRef(function(e,t){e.__scopeNavigationMenu;var n=e.active,r=e.onSelect,s=(0,o._)(e,["__scopeNavigationMenu","active","onSelect"]);return(0,N.jsx)(eh,{asChild:!0,children:(0,N.jsx)(m.sG.a,(0,i._)((0,a._)({"data-active":n?"":void 0,"aria-current":n?"page":void 0},s),{ref:t,onClick:(0,f.mK)(e.onClick,function(e){var t=e.target,n=new CustomEvent(et,{bubbles:!0,cancelable:!0});if(t.addEventListener(et,function(e){return null==r?void 0:r(e)},{once:!0}),(0,m.hO)(t,n),!n.defaultPrevented&&!e.metaKey){var a=new CustomEvent(el,{bubbles:!0,cancelable:!0});(0,m.hO)(t,a)}},{checkForDefaultPrevented:!1})}))})});en.displayName="NavigationMenuLink";var er="NavigationMenuIndicator";u.forwardRef(function(e,t){var n=e.forceMount,r=(0,o._)(e,["forceMount"]),s=D(er,e.__scopeNavigationMenu),l=!!s.value;return s.indicatorTrack?c.createPortal((0,N.jsx)(v.C,{present:n||l,children:(0,N.jsx)(ea,(0,i._)((0,a._)({},r),{ref:t}))}),s.indicatorTrack):null}).displayName=er;var ea=u.forwardRef(function(e,t){var n=e.__scopeNavigationMenu,r=(0,o._)(e,["__scopeNavigationMenu"]),l=D(er,n),c=C(n),d=(0,s._)(u.useState(null),2),f=d[0],p=d[1],h=(0,s._)(u.useState(null),2),g=h[0],v=h[1],x="horizontal"===l.orientation,y=!!l.value;u.useEffect(function(){var e,t=null==(e=c().find(function(e){return e.value===l.value}))?void 0:e.ref.current;t&&p(t)},[c,l.value]);var w=function(){f&&v({size:x?f.offsetWidth:f.offsetHeight,offset:x?f.offsetLeft:f.offsetTop})};return ex(f,w),ex(l.indicatorTrack,w),g?(0,N.jsx)(m.sG.div,(0,i._)((0,a._)({"aria-hidden":!0,"data-state":y?"visible":"hidden","data-orientation":l.orientation},r),{ref:t,style:(0,a._)({position:"absolute"},x?{left:0,width:g.size+"px",transform:"translateX(".concat(g.offset,"px)")}:{top:0,height:g.size+"px",transform:"translateY(".concat(g.offset,"px)")},r.style)}
1)):null}),ei="NavigationMenuContent",eo=u.forwardRef(function(e,t){var n=e.forceMount,r=(0,o._)(e,["forceMount"]),s=D(ei,e.__scopeNavigationMenu),l=J(ei,e.__scopeNavigationMenu),u=(0,h.s)(l.contentRef,t),c=l.value===s.value,d=(0,a._)({value:l.value,triggerRef:l.triggerRef,focusProxyRef:l.focusProxyRef,wasEscapeCloseRef:l.wasEscapeCloseRef,onContentFocusOutside:l.onContentFocusOutside,onRootContentClose:l.onRootContentClose},r);return s.viewport?(0,N.jsx)(es,(0,i._)((0,a._)({forceMount:n},d),{ref:u})):(0,N.jsx)(v.C,{present:n||c,children:(0,N.jsx)(eu,(0,i._)((0,a._)({"data-state":ey(c)},d),{ref:u,onPointerEnter:(0,f.mK)(e.onPointerEnter,s.onContentEnter),onPointerLeave:(0,f.mK)(e.onPointerLeave,eb(s.onContentLeave)),style:(0,a._)({pointerEvents:!c&&s.isRootMenu?"none":void 0},d.style)}))})});eo.displayName=ei;var es=u.forwardRef(function(e,t){var n=D(ei,e.__scopeNavigationMenu),r=n.onViewportContentChange,i=n.onViewportContentRemove;return(0,b.N)(function(){r(e.value,(0,a._)({ref:t},e))},[e,t,r]),(0,b.N)(function(){return function(){return i(e.value)}},[e.value,i]),null}),el="navigationMenu.rootContentDismiss",eu=u.forwardRef(function(e,t){var n=e.__scopeNavigationMenu,r=e.value,s=e.triggerRef,l=e.focusProxyRef,c=e.wasEscapeCloseRef,d=e.onRootContentClose,m=e.onContentFocusOutside,p=(0,o._)(e,["__scopeNavigationMenu","value","triggerRef","focusProxyRef","wasEscapeCloseRef","onRootContentClose","onContentFocusOutside"]),g=D(ei,n),v=u.useRef(null),x=(0,h.s)(v,t),y=ew(g.baseId,r),_=e_(g.baseId,r),b=C(n),j=u.useRef(null),k=g.onItemDismiss;u.useEffect(function(){var e=v.current;if(g.isRootMenu&&e){var t=function(){var t;k(),d(),e.contains(document.activeElement)&&(null==(t=s.current)||t.focus())};return e.addEventListener(el,t),function(){return e.removeEventListener(el,t)}}},[g.isRootMenu,e.value,s,k,d]);var M=u.useMemo(function(){var e=b().map(function(e){return e.value});"rtl"===g.dir&&e.reverse();var t=e.indexOf(g.value),n=e.indexOf(g.previousValue),a=r===g.value,i=n===e.indexOf(r);if(!a&&!i)return j.current;var o=function(){if(t!==n){if(a&&-1!==n)return t>n?"from-end":"from-start";if(i&&-1!==t)return t>n?"to-start":"to-end"}return null}();return j.current=o,o},[g.previousValue,g.value,g.dir,b,r]);return(0,N.jsx)(em,{asChild:!0,children:(0,N.jsx)(w.qW,(0,i._)((0,a._)({id:_,"aria-labelledby":y,"data-motion":M,"data-orientation":g.orientation},p),{ref:x,disableOutsidePointerEvents:!1,onDismiss:function(){var e,t=new Event(el,{bubbles:!0,cancelable:!0});null==(e=v.current)||e.dispatchEvent(t)},onFocusOutside:(0,f.mK)(e.onFocusOutside,function(e){m();var t,n=e.target;(null==(t=g.rootNavigationMenu)?void 0:t.contains(n))&&e.preventDefault()}),onPointerDownOutside:(0,f.mK)(e.onPointerDownOutside,function(e){var t,n=e.target,r=b().some(function(e){var t;return null==(t=e.ref.current)?void 0:t.contains(n)}),a=g.isRootMenu&&(null==(t=g.viewport)?void 0:t.contains(n));(r||a||!g.isRootMenu)&&e.preventDefault()}),onKeyDown:(0,f.mK)(e.onKeyDown,function(e){var t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){var n,r=eg(e.currentTarget),a=document.activeElement,i=r.findIndex(function(e){return e===a});ev(e.shiftKey?r.slice(0,i).reverse():r.slice(i+1,r.length))?e.preventDefault():null==(n=l.current)||n.focus()}}),onEscapeKeyDown:(0,f.mK)(e.onEscapeKeyDown,function(e){c.current=!0})}
1))})}),ec="NavigationMenuViewport",ed=u.forwardRef(function(e,t){var n=e.forceMount,r=(0,o._)(e,["forceMount"]),s=!!D(ec,e.__scopeNavigationMenu).value;return(0,N.jsx)(v.C,{present:n||s,children:(0,N.jsx)(ef,(0,i._)((0,a._)({},r),{ref:t}))})});ed.displayName=ec;var ef=u.forwardRef(function(e,t){var n,l=e.__scopeNavigationMenu,c=(e.children,(0,o._)(e,["__scopeNavigationMenu","children"])),d=D(ec,l),p=(0,h.s)(t,d.onViewportChange),g=G(ei,e.__scopeNavigationMenu),x=(0,s._)(u.useState(null),2),y=x[0],w=x[1],_=(0,s._)(u.useState(null),2),b=_[0],j=_[1],k=y?(null==y?void 0:y.width)+"px":void 0,M=y?(null==y?void 0:y.height)+"px":void 0,A=!!d.value,E=A?d.value:d.previousValue;return ex(b,function(){b&&w({width:b.offsetWidth,height:b.offsetHeight})}),(0,N.jsx)(m.sG.div,(0,i._)((0,a._)({"data-state":ey(A),"data-orientation":d.orientation},c),{ref:p,style:(0,a._)((n={pointerEvents:!A&&d.isRootMenu?"none":void 0},(0,r._)(n,"--radix-navigation-menu-viewport-width",k),(0,r._)(n,"--radix-navigation-menu-viewport-height",M),n),c.style),onPointerEnter:(0,f.mK)(e.onPointerEnter,d.onContentEnter),onPointerLeave:(0,f.mK)(e.onPointerLeave,eb(d.onContentLeave)),children:Array.from(g.items).map(function(e){var t=(0,s._)(e,2),n=t[0],r=t[1],l=r.ref,u=r.forceMount,c=(0,o._)(e[1],["ref","forceMount"]),d=E===n;return(0,N.jsx)(v.C,{present:u||d,children:(0,N.jsx)(eu,(0,i._)((0,a._)({},c),{ref:(0,h.t)(l,function(e){d&&e&&j(e)})}))},n)})}))}),em=u.forwardRef(function(e,t){var n=e.__scopeNavigationMenu,r=(0,o._)(e,["__scopeNavigationMenu"]),s=D("FocusGroup",n);return(0,N.jsx)(S.Provider,{scope:n,children:(0,N.jsx)(S.Slot,{scope:n,children:(0,N.jsx)(m.sG.div,(0,i._)((0,a._)({dir:s.dir},r),{ref:t}))})})}),ep=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],eh=u.forwardRef(function(e,t){var n=e.__scopeNavigationMenu,r=(0,o._)(e,["__scopeNavigationMenu"]),s=O(n),u=D("FocusGroupItem",n);return(0,N.jsx)(S.ItemSlot,{scope:n,children:(0,N.jsx)(m.sG.button,(0,i._)((0,a._)({},r),{ref:t,onKeyDown:(0,f.mK)(e.onKeyDown,function(e){if(["Home","End"].concat((0,l._)(ep)).includes(e.key)){var t=s().map(function(e){return e.ref.current});if(["rtl"===u.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),ep.includes(e.key)){var n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(function(){return ev(t)}),e.preventDefault()}})}))})});function eg(e){for(var t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){var t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});n.nextNode();)t.push(n.currentNode);return t}function ev(e){var t=document.activeElement;return e.some(function(e){return e===t||(e.focus(),document.activeElement!==t)})}function ex(e,t){var n=(0,j.c)(t);(0,b.N)(function(){var t=0;if(e){var r=new ResizeObserver(function(){cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),function(){window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function ey(e){return e?"open":"closed"}function ew(e,t){return"".concat(e,"-trigger-").concat(t)}function e_(e,t){return"".concat(e,"-content-").concat(t)}function eb(e){return function(t){return"mouse"===t.pointerType?e(t):void 0}}var ej=H,ek=q,eN=Q,eM=ee,eA=en,eE=eo,eC=ed}
1,47323:(e,t,n)=>{n.d(t,{FA:()=>u,S6:()=>l,s2:()=>s});let r=[{value:1,label:"1 image"},{value:2,label:"2 images"},{value:4,label:"4 images"}],a=["auto","1:1","9:16","16:9","4:3","3:4"],i=["auto","1:1","1:4","1:8","2:3","3:2","3:4","4:1","4:3","4:5","5:4","8:1","9:16","16:9","21:9"],o=["16:9","4:3","1:1","3:4","9:16","21:9"];function s(e={}){return{outputType:"video",defaultPrompt:"",defaultModel:"kling-3.0",promptPlaceholder:"Enter a prompt to generate your video for free",models:[{id:"kling-3.0",label:"Kling 3.0",outputType:"video",scenes:["text-to-video","image-to-video"],requestModel:"kling-3.0/video",defaultMode:"std",defaultGenerationType:"REFERENCE_2_VIDEO",defaultAspectRatio:"16:9",defaultDuration:5,maxImages:2,maxImagesByGenerationType:{REFERENCE_2_VIDEO:1,FIRST_AND_LAST_FRAMES_2_VIDEO:2},aspectRatioOptions:["16:9","9:16","1:1"],modeOptions:[{value:"std",label:"Standard"},{value:"pro",label:"Pro"},{value:"4K",label:"4K"}],generationTypeOptions:[{value:"REFERENCE_2_VIDEO",label:"Start Frame"},{value:"FIRST_AND_LAST_FRAMES_2_VIDEO",label:"Start/End Frames"}],durationOptions:[{value:5,label:"5s"},{value:8,label:"8s"},{value:10,label:"10s"}]},{id:"veo3",label:"Veo 3.1",outputType:"video",scenes:["text-to-video","image-to-video"],requestModelByMode:{lite:"veo3_lite",fast:"veo3_fast",quality:"veo3"},defaultMode:"fast",defaultModeByGenerationType:{REFERENCE_2_VIDEO:"fast"},defaultGenerationType:"TEXT_2_VIDEO",defaultAspectRatio:"16:9",defaultDuration:8,defaultResolution:"preview",maxImages:3,maxImagesByGenerationType:{TEXT_2_VIDEO:1,FIRST_AND_LAST_FRAMES_2_VIDEO:2,REFERENCE_2_VIDEO:3},aspectRatioOptions:["16:9","9:16","auto"],aspectRatioOptionsByGenerationType:{REFERENCE_2_VIDEO:["16:9","9:16"]},modeOptions:[{value:"lite",label:"Lite"},{value:"fast",label:"Fast"},{value:"quality",label:"Quality"}],modeOptionsByGenerationType:{REFERENCE_2_VIDEO:[{value:"fast",label:"Fast"}]},generationTypeOptions:[{value:"TEXT_2_VIDEO",label:"Text"},{value:"REFERENCE_2_VIDEO",label:"Reference"},{value:"FIRST_AND_LAST_FRAMES_2_VIDEO",label:"First/Last Frames"}],durationOptions:[],resolutionOptions:[{value:"preview",label:"Preview"},{value:"1080p",label:"1080p",requiresPaid:!0,paywallFeature:"veo_high_res"},{value:"4k",label:"4K",requiresPaid:!0,paywallFeature:"veo_high_res"}]},{id:"gemini-omni",label:"Gemini Omni",outputType:"video",scenes:["text-to-video","image-to-video","video-to-video"],provider:"go-worker",requestModel:"gemini-omni-video",defaultAspectRatio:"16:9",defaultDuration:4,maxImages:7,maxVideos:1,videoSlotCost:2,aspectRatioOptions:["16:9","9:16"],durationOptions:[4,6,8,10].map(e=>({value:e,label:`${e}s`})),modeOptions:[],generationTypeOptions:[],resolutionOptions:[]},{id:"seedance-2",label:"Seedance 2.0",outputType:"video",scenes:["text-to-video","image-to-video","video-to-video"],requestModel:"bytedance/seedance-2",defaultOptions:{generate_audio:!1},defaultAspectRatio:"16:9",defaultDuration:5,defaultResolution:"720p",maxImages:9,maxImagesByGenerationType:{FIRST_AND_LAST_FRAMES_2_VIDEO:2,REFERENCE_2_VIDEO:9},maxVideos:3,maxVideosByGenerationType:{FIRST_AND_LAST_FRAMES_2_VIDEO:0,REFERENCE_2_VIDEO:3},videoSlotCost:1,maxVideoSeconds:15,aspectRatioOptions:[...o],generationTypeOptions:[{value:"REFERENCE_2_VIDEO",label:"Reference"},{value:"FIRST_AND_LAST_FRAMES_2_VIDEO",label:"First/Last Frames"}],durationOptions:[5,10,15].map(e=>({value:e,label:`${e}s`})),resolutionOptions:[{value:"480p",label:"480p"},{value:"720p",label:"720p"},{value:"1080p",label:"1080p"}]}],aspectRatioOptions:["16:9","9:16","1:1"],modeOptions:[{value:"std",label:"Standard"},{value:"pro",label:"Pro"}],durationOptions:[5,8,10],defaultAspectRatio:"9:16",defaultMode:"std",defaultDuration:5,maxImages:1,maxSizeMB:10,...e}}function l(e={}){return{outputType:"image",defaultPrompt:"",defaultModel:"nano-banana-2",promptPlaceholder:"Upload images or describe what to create.",models:[{id:"nano-banana-2",label:"Nano Banana 2",outputType:"image",scenes:["text-to-image","image-to-image"],defaultAspectRatio:"auto",defaultResolution:"2K",defaultFormat:"jpg",maxImages:14,aspectRatioOptions:[...i],resolutionOptions:["1K","2K","4K"],formatOptions:["jpg","png"],defaultOutputCount:1,outputCountOptions:[...r]},{id:"gpt-image-2",label:"GPT Image 2",outputType:"image",scenes:["text-to-image","image-to-image"],requestModelByScene:{"text-to-image":"gpt-image-2-text-to-image","image-to-image":"gpt-image-2-image-to-image"},defaultAspectRatio:"auto",defaultAspectRatioByResolution:{"2K":"1:1","4K":"16:9"},defaultResolution:"2K",defaultFormat:"jpg",maxImages:16,aspectRatioOptions:a,aspectRatioOptionsByResolution:{"1K":a,"2K":["1:1","9:16","16:9","4:3","3:4"],"4K":["9:16","16:9","4:3","3:4"]},resolutionOptions:["1K","2K","4K"],formatOptions:["jpg","png"],defaultOutputCount:1,outputCountOptions:[...r]}],defaultAspectRatio:"auto",defaultResolution:"2K",defaultFormat:"jpg",defaultOutputCount:1,outputCountOptions:[...r],maxImages:1,maxSizeMB:10,...e}}let u=s().models;l().models},47407:(e,t,n)=>{n.d(t,{X:()=>p});var r=n(69140),a=n(20792),i=n(17619),o=n(80316),s=n(18066),l=n(65484);function u(e,t={}){let n=t.defaultProductId??e.defaultProductId??function(e,t){if(t)return e.items?.find(e=>e.product_id===t)?.product_id}(e,t.currentProductId);return e.items?.find(e=>e.product_id===n)?.group??e.defaultGroup??e.groups?.find(e=>
1e.is_featured)?.name??e.groups?.[0]?.name??e.items?.[0]?.group}let c={activeSubscription:"You already have an active subscription.",buyCredits:"Buy credits",contactSupport:"Contact support",currency:"Currency",currentPlan:"Current plan",includes:"Includes:",manageSubscription:"Manage subscription",processing:"Processing..."};function d(...e){return e.filter(Boolean).join(" ")}function f(e){return e?.currentSubscription?.productId??e?.currentSubscription?.product_id??void 0}function m(){return(0,r.jsx)("style",{children:` 2 .shipany-pricing-scrollbar { scrollbar-width: none; } 3 .shipany-pricing-scrollbar::-webkit-scrollbar { display: none; } 4 `})}function p({config:e,adapter:t,app:n,labels:s,skin:l="default",compact:p=!1,defaultProductId:v,className:x}){let y={...c,...s},w=v??e.defaultProductId,_="glass"===l,{activeIndex:b,group:j,groupItems:k,setActiveIndex:N,setGroup:M,setSelectedCurrencies:A}=function({config:e,currentProductId:t,defaultProductId:n,locale:r}){let i=n??e.defaultProductId,[o,s]=(0,a.useState)(()=>u(e,{currentProductId:t,defaultProductId:i}));(0,a.useEffect)(()=>{s(u(e,{currentProductId:t,defaultProductId:i}))},[e,t,i]);let l=(0,a.useMemo)(()=>(function(e,t){let n=e.items??[];return t?n.filter(e=>e.group===t):n})(e,o),[e,o]),[c,d]=(0,a.useState)(0);(0,a.useEffect)(()=>{d(function(e,t={}){if(!e.length)return 0;let n=t.defaultProductId??t.currentProductId;if(n){let t=e.findIndex(e=>e.product_id===n);if(t>=0)return t}let r=e.findIndex(e=>e.is_featured);return r>=0?r:Math.floor(e.length/2)}(l,{currentProductId:t,defaultProductId:i}))},[l,t,i]);let[f,m]=(0,a.useState)({});return{activeIndex:c,group:o,groupItems:(0,a.useMemo)(()=>l.map(e=>{let t=f[e.product_id]??("zh"===r?e.currencies?.find(e=>"cny"===e.currency.toLowerCase())?.currency:void 0);if(!t||t===e.currency)return e;let n=e.currencies?.find(e=>e.currency===t);return n?{...e,amount:n.amount,currency:n.currency,original_price:n.original_price??e.original_price,payment_product_id:n.payment_product_id??e.payment_product_id,payment_providers:n.payment_providers??e.payment_providers,price:n.price??e.price}:e}),[l,r,f]),selectedCurrencies:f,setActiveIndex:d,setGroup:s,setSelectedCurrencies:m}}({config:e,currentProductId:f(n),defaultProductId:w,locale:n?.locale}),[E,C]=(0,a.useState)(),[R,T]=(0,a.useState)(!1),S=(0,a.useRef)(null),O=(0,a.useRef)([]),I=(0,a.useRef)(!1),L=(0,a.useRef)(void 0),P=e.groups?.length?e.groups:Array.from(new Set((e.items??[]).map(e=>e.group).filter(Boolean))).map(e=>({name:e}));(0,a.useEffect)(()=>()=>{L.current&&window.clearTimeout(L.current)},[]);let z=(0,a.useCallback)(()=>{let e=S.current;if(!e)return void T(!1);T(e.scrollWidth>e.clientWidth+2)},[]);(0,a.useEffect)(()=>{z();let e=S.current;if(!e)return;if("undefined"==typeof ResizeObserver)return window.addEventListener("resize",z),()=>window.removeEventListener("resize",z);let t=new ResizeObserver(z);return t.observe(e),O.current.forEach(e=>{e&&t.observe(e)}),()=>t.disconnect()},[k,z]);let F=(0,a.useCallback)(e=>{let t=S.current,n=O.current[e];if(!t||!n)return;I.current=!0,L.current&&window.clearTimeout(L.current);let r=n.offsetLeft-(t.clientWidth-n.offsetWidth)/2,a=t.scrollWidth-t.clientWidth;t.scrollTo({behavior:"smooth",left:Math.max(0,Math.min(r,a))}),L.current=window.setTimeout(()=>{I.current=!1},450)},[]);(0,a.useEffect)(()=>{let e=window.requestAnimationFrame(()=>{z(),F(b)});return()=>window.cancelAnimationFrame(e)},[b,j,F,z]);let D=(0,a.useCallback)(()=>{if(I.current)return;let e=S.current;if(!e)return;let t=e.scrollLeft+e.clientWidth/2,n=b,r=1/0;O.current.forEach((e,a)=>{if(!e)return;let i=Math.abs(e.offsetLeft+e.offsetWidth/2-t);i<r&&(r=i,n=a)}),n!==b&&N(n)},[b,N]),V=async e=>{if(!n?.user)return void n?.requestSignIn?.();C(e.product_id);try{let r=e.payment_providers?.length?e.payment_providers:["default"],a=await n.selectPaymentProvider?.(e,r);if(!a)return void C(void 0);let i=await n.getCheckoutMetadata?.(e,a),o=n.getPromoCode?.();n.track?.("begin_checkout",{currency:e.currency,payment_provider:a,product_id:e.product_id,value:e.amount});let s=await t.checkout({currency:e.currency,locale:n.locale,metadata:i,payment_provider:a,product_id:e.product_id,promo_code:o});if("ACTIVE_SUBSCRIPTION_EXISTS"===s.errorType)return void n.onConflict?.(s.planName);if(!s.checkoutUrl)return void n.notify?.error?.(s.message??"Checkout failed.");window.location.href=s.checkoutUrl}catch(e){n.notify?.error?.(e instanceof Error?e.message:"Checkout failed.")}finally{C(void 0)}};return e.disabled?null:(0,r.jsxs)("section",{id:e.id??"pricing",className:d("relative overflow-hidden",p?"py-5 md:py-8":"py-16 md:py-24",_?"bg-[#06030f] text-white":"text-foreground bg-transparent",e.className,x),children:[(0,r.jsx)(m,{}),_&&(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_30%_15%,rgba(139,92,246,0.28),transparent_32%),radial-gradient(circle_at_72%_18%,rgba(236,72,153,0.18),transparent_30%)]"}),(0,r.jsxs)("div",{className:"relative container",children:[(e.title||e.description)&&(0,r.jsxs)("div",{className:d("mx-auto text-center",p?"max-w-4xl":"max-w-5xl"),children:[e.title&&(0,r.jsx)("h2",{className:d("font-bold tracking-tight",p?"text-2xl md:text-4xl":"text-4xl md:text-5xl",_?"text-white":"text-foreground"),children:e.title}),e.description&&(0,r.jsx)("p",{className:d("mx-auto max-w-3xl leading-6",p?"mt-2 text-sm md:mt-3 md:text-base":"mt-4 text-base md:text-lg",_?"text-white/70":"text-muted-foreground"),children:e.description})]}),P.length>1&&(0,r.jsx)(h,{activeGroup:j,compact:p,groups:P,isGlass:_,onChange:M}),(0,r.jsxs)("div",{className:d("relative",p?"mt-5 md:mt-7":"mt-8 md:mt-10"),children:[(0,r.jsx)("div",{ref:S,className:"shipany-pricing-scrollbar -mx-4 flex snap-x snap-mandatory gap-4 overflow-x-auto scroll-smooth px-4 pt-4 pb-3 md:-mx-6 md:gap-5 md:px-6 lg:gap-6",onScroll:D,children:k.map((e,t)=>(0,r.jsx)("div",{ref:e=>{O.current[t]=e},className:"w-[76vw] max-w-[320px] shrink-0 snap-center sm:w-[72vw] sm:max-w-[340px] md:w-[340px] md:max-w-none lg:w-[360
4px]",children:(0,r.jsx)(g,{active:t===b,app:n,item:e,labels:y,loading:E===e.product_id,onCheckout:()=>V(e),onCurrencyChange:t=>A(n=>({...n,[e.product_id]:t})),onSelect:()=>N(t),skin:l})},e.product_id))}),R&&k.length>1&&(0,r.jsxs)("div",{className:"mt-5 flex items-center justify-center gap-3",children:[(0,r.jsx)("button",{type:"button",className:d("flex h-10 w-10 items-center justify-center rounded-full border shadow-sm",_?"border-white/15 bg-black/35 text-white":"border-border bg-background text-foreground"),onClick:()=>{let e=Math.max(b-1,0);N(e),F(e)},children:(0,r.jsx)(i.A,{className:"h-4 w-4"})}),(0,r.jsx)("div",{className:"flex items-center gap-1.5",children:k.map((e,t)=>(0,r.jsx)("button",{type:"button",className:d("h-2 rounded-full transition-all",t===b?"bg-primary w-7":_?"w-2 bg-white/25":"bg-muted-foreground/30 w-2"),onClick:()=>{N(t),F(t)}},e.product_id))}),(0,r.jsx)("button",{type:"button",className:d("flex h-10 w-10 items-center justify-center rounded-full border shadow-sm",_?"border-white/15 bg-black/35 text-white":"border-border bg-background text-foreground"),onClick:()=>{let e=Math.min(b+1,k.length-1);N(e),F(e)},children:(0,r.jsx)(o.A,{className:"h-4 w-4"})})]})]})]})]})}function h({groups:e,activeGroup:t,compact:n,isGlass:a,onChange:i}){return(0,r.jsx)("div",{className:d("mx-auto flex justify-center",n?"mt-5":"mt-8"),children:(0,r.jsx)("div",{className:d("inline-flex items-center rounded-full border p-1",a?"border-white/20 bg-black/20 text-white/70":"border-border bg-background/90 text-muted-foreground shadow-sm"),children:e.map(e=>{let o=e.name===t;return(0,r.jsxs)("button",{type:"button",className:d("relative inline-flex items-center gap-2 rounded-full text-sm font-semibold transition-colors",n?"h-9 px-3 md:h-10 md:px-4":"h-10 px-4",o?"bg-primary text-primary-foreground shadow-md":a?"hover:text-white":"hover:text-foreground"),onClick:()=>i(e.name),children:[(0,r.jsx)("span",{children:e.title??e.name}),e.label&&(0,r.jsx)("span",{className:d("hidden rounded-full px-1.5 py-0.5 text-[10px] leading-none font-bold sm:inline-flex",o?"bg-primary-foreground/20 text-current":"bg-primary/10 text-primary"),children:e.label})]},e.name)})})})}function g({active:e,app:t,item:n,labels:a,loading:i,onCheckout:o,onCurrencyChange:u,onSelect:c,skin:m}){let p="glass"===m,h=function(e){let t={amount:e.amount,currency:e.currency,original_price:e.original_price,payment_product_id:e.payment_product_id,payment_providers:e.payment_providers,price:e.price};return e.currencies?.length?[t,...e.currencies]:[t]}(n),g=f(t)&&f(t)===n.product_id,v=n.save_label??n.label;return(0,r.jsxs)("div",{id:`pricing-plan-${n.product_id}`,className:d("relative flex h-full cursor-pointer flex-col rounded-2xl border p-6 transition-all md:p-7",p?"bg-[#090819]/92 text-white":"bg-card text-card-foreground shadow-sm",e?p?"border-primary shadow-[0_0_28px_rgba(139,92,246,0.35)]":"border-primary ring-primary/25 shadow-xl ring-2":p?"border-white/15":"border-border",!e&&n.is_featured&&(p?"border-primary/35":"")),onClick:c,children:[v&&(0,r.jsx)("div",{className:d("mb-4 w-fit rounded-full px-3 py-1 text-xs font-bold md:absolute md:top-0 md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2",e?"bg-gradient-to-r from-fuchsia-500 to-amber-300 text-white shadow-md":p?"bg-white/10 text-white/70":"bg-primary/10 text-primary"),children:v}),(0,r.jsxs)("div",{className:"space-y-5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:d("text-sm font-bold tracking-wide uppercase",p?"text-white/70":"text-muted-foreground"),children:n.title}),(0,r.jsxs)("div",{className:"mt-5 flex items-end gap-2",children:[(0,r.jsx)("span",{className:"text-primary text-4xl font-bold",children:n.price??`${n.currency} ${n.amount}`}),n.unit&&(0,r.jsx)("span",{className:d("mb-1 text-sm",p?"text-white/50":"text-muted-foreground"),children:n.unit})]}),(n.original_price||n.billing_text)&&(0,r.jsxs)("p",{className:d("mt-2 text-sm",p?"text-white/45":"text-muted-foreground"),children:[n.original_price&&(0,r.jsx)("span",{className:"mr-2 line-through",children:n.original_price}),n.billing_text]})]}),n.description&&(0,r.jsx)("p",{className:d("min-h-12 text-sm leading-6",p?"text-white/70":"text-muted-foreground"),children:n.description}),n.tip&&(0,r.jsx)("p",{className:d("text-sm leading-6",p?"text-white/50":"text-muted-foreground"),children:n.tip}),h.length>1&&(0,r.jsxs)("label",{className:"block",children:[(0,r.jsx)("span",{className:d("mb-2 block text-xs font-semibold",p?"text-white/50":"text-muted-foreground"),children:a.currency}),(0,r.jsx)("select",{className:d("h-10 w-full rounded-lg border px-3 text-sm",p?"border-white/15 bg-black/30 text-white":"border-border bg-background text-foreground"),value:n.currency,onChange:e=>u(e.target.value),onClick:e=>e.stopPropagation(),children:h.map(e=>(0,r.jsx)("option",{value:e.currency,children:e.currency},e.currency))})]}),(0,r.jsxs)("button",{type:"button",disabled:i||!!g,className:d("inline-flex h-12 w-full items-center justify-center rounded-xl px-4 text-sm font-bold transition-all",e?"bg-primary text-primary-foreground shadow-primary/25 shadow-lg":p?"bg-primary/85 text-primary-foreground hover:bg-primary":"bg-muted text-foreground hover:bg-primary hover:text-primary-foreground",(i||g)&&"cursor-not-allowed opacity-60"),onClick:e=>{e.stopPropagation(),g||o()},children:[i&&(0,r.jsx)(s.A,{className:"mr-2 h-4 w-4 animate-spin"}),g?a.currentPlan:i?a.processing:n.button?.title??("one-time"===n.interval?`Buy ${n.title??"credits"}`:`Get ${n.title??"plan"}`)]})]}),n.features?.length?(0,r.jsxs)("div",{className:d("mt-7 border-t pt-6",p?"border-white/10":"border-border"),children:[(0,r.jsx)("p",{className:"mb-4 text-sm font-bold",children:n.features_title??a.includes}),(0,r.jsx)("ul",{className:"space-y-3",children:n.features.map(t=>(0,r.jsxs)("li",{className:d("flex gap-3 text-sm leading-6",p?"text-white/65":"text-muted-foreground"),children:[(0,r.jsx)("span",{className:d("mt-1 flex h-4 w-4 shrink-0 items-center justify-center rounded-full",e?"bg-primary/20 text-primary":p?"bg-white/10 text-white/60":"bg-muted text-muted-foreground"),children:(0,r.jsx)(l.A,{className:"h-3 w-3"})}),(0,r.jsx)("span",{children:t})]},t))})]}):null]})}},48031:(e,t,n)=>{n.d(t,{d:()=>l});var r=n(57505),a=n(6608),i=n(20792),o=n(32112),s=n(55833);function l(e){var t=(0,s.M)(function(){return(0,a.OQ)(e)});if((0,i.useContext)(o.Q).isStatic){var n=(0,r._)((0,i.useState)(e),2)[1];(0,i.useEffect)(function(){return t.on("change",n)},[])}return t}},50944:(e,t,n)=>{n.d(t,{BN:()=>f,Fo:()=>l,RN:()=>m,Tz:()=>c,YR:()=>s,i_:()=>u,zy:()=>d});let r=["facebook","threads","x","reddit","linkedin","instagram","email","whatsapp","telegram","line"],a=["facebook","threads","x","reddit","instagram","whatsapp","telegram"],i=["start","center","end","between","stretch"],o=new Set(["prompt","model","previewImage","previewVideo"]);function s(e){return i.includes(e)?e:"center"}function l(e){let t=new Set;
4return(e?.length?e:a).forEach(e=>{r.includes(e)&&!t.has(e)&&t.add(e)}),t.size?[...t]:[...a]}function u({currentUrl:e,media:t,outputType:n,prompt:r,model:a,modelLabel:i,title:s,description:l,shortUrl:u}){if(!t)return null;let c=function(e,t){try{return new URL(e,t).toString()}catch{return e}}(t.src,e),d=t.type??n,f=new URL(e),m=new URL(f.origin+f.pathname),h=p(r||"").trim();h&&m.searchParams.set("prompt",h),a&&m.searchParams.set("model",a),m.searchParams.set("image"===d?"previewImage":"previewVideo",c);let v=function(e){let t=new URL(e),n=new URL(t.origin+t.pathname);return o.forEach(e=>{let r=t.searchParams.get(e);r&&n.searchParams.set(e,r)}),{rootUrl:t.origin+t.pathname,shareUrl:g(n.toString())}}(m.toString()),x=`AI generated ${d}`;return{...v,mediaType:d,mediaUrl:c,title:s||x,description:l||h||`Create AI ${d}s with this generator.`,prompt:h,model:a,modelLabel:i,shortUrl:u}}function c(e,t){let n=t.shortUrl||t.targetUrl||t.shareUrl,r=t.title,a=function(e){let t=e.shortUrl||e.targetUrl||e.shareUrl,n=e.modelLabel||e.model,r=p(e.title||`AI ${e.mediaType}`),a=n?`${r} with ${n}.`:`${r}.`;return e.platform,[a,"Prompt included in the link. Generate your own:",t].filter(Boolean).join("\n\n")}({...t,platform:e});switch(e){case"facebook":return h("https://www.facebook.com/sharer/sharer.php",{u:n});case"threads":return h("https://www.threads.net/intent/post",{text:a});case"x":return h("https://twitter.com/intent/tweet",{text:a});case"reddit":return h("https://www.reddit.com/submit",{title:r,url:n});case"linkedin":return h("https://www.linkedin.com/sharing/share-offsite/",{url:n});case"instagram":return h("https://www.instagram.com/",{url:n});case"email":return h("mailto:",{subject:r,body:a});case"whatsapp":return h("https://api.whatsapp.com/send",{text:a});case"telegram":return h("https://t.me/share/url",{url:n,text:a});case"line":return h("https://social-plugins.line.me/lineit/share",{url:n})}}function d({targetUrl:e,platform:t}){return function({targetUrl:e,platform:t}){let n=new URL(e),r=x(n.searchParams.get("pageKeyword")||v(n)),a=x(n.searchParams.get("model")||"ai"),i=n.searchParams.has("previewVideo")?"video":"image",o=x(n.searchParams.get("shareKind")||"result"),s=n.searchParams.get("shareCampaign")||`${r}_${a}_${i}_share`;return n.searchParams.delete("shareKind"),n.searchParams.delete("pageKeyword"),n.searchParams.delete("shareCampaign"),n.searchParams.set("utm_source",x(t)),n.searchParams.set("utm_medium","email"===t?"email":"social"),n.searchParams.set("utm_campaign",x(s)),n.searchParams.set("utm_content",x(`generator_${o}_${t}`)),n.searchParams.set("utm_term",x(`${r}_${a}`)),g(n.toString())}({targetUrl:e,platform:t})}function f({share:e,shareKind:t="result",pageKeyword:n,campaign:r}){let a=new URL(e.rootUrl),i=x(n||v(a)),o=x(t);return e.prompt&&a.searchParams.set("prompt",p(e.prompt)),e.model&&a.searchParams.set("model",e.model),a.searchParams.set("image"===e.mediaType?"previewImage":"previewVideo",e.mediaUrl),a.searchParams.set("shareKind",o),a.searchParams.set("pageKeyword",i),r&&a.searchParams.set("shareCampaign",x(r)),g(a.toString())}function m(e,t){if(e)try{let n=new URL(e),r=n.pathname.split("/").filter(Boolean);if("r"!==r[0]||2!==r.length)return e;return n.pathname=`/r/${t}/${r[1]}`,n.toString()}catch{return e}}function p(e){let t=e.replace(/\+/g," ");try{return decodeURIComponent(t)}catch{return t}}function h(e,t){let n=Object.entries(t).filter(([,e])=>e).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&");if("mailto:"===e)return`mailto:?${n}`;let r=new URL(e);return r.search=n,r.toString()}function g(e){return e.replace(/\+/g,"%20")}function v(e){return e.pathname.split("/").filter(Boolean).at(-1)||"home"}function x(e){return p(e).trim().toLowerCase().replace(/['"]/g,"").replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"share"}},51150:(e,t,n)=>{n.d(t,{M:()=>o,RG:()=>i,ST:()=>s,ew:()=>u,gK:()=>l});var r=n(93747),a=n(16319);function i({config:e,prompt:t,inputImages:n=[],inputVideos:i=[],options:l={}}){var c;let d=l.model??e.defaultModel,f=e.models.find(e=>e.id===d),m=(0,r.w2)({config:e,modelId:d,generationType:l.generationType}),p=o(e,d,{generationType:m}),h=i.slice(0,p),g=(0,a.y)({outputType:e.outputType,hasInputImages:n.length>0,hasInputVideos:h.length>0}),v=(0,r.d1)({config:e,modelId:d,generationType:m,mode:l.mode}),x=!!f?.generationTypeOptions?.length||!!e.generationTypeOptions?.length,y=u(e,d,{generationType:m}),w=s(e,d),_=Math.max(y-h.length*w,0),b=f?.requestModelByScene?.[g]??f?.requestModelByMode?.[String(v)]??f?.requestModel??d,j=function(e,t){let n=e.trim(),r
4=t?.trim();return r?n?`${r} ${n}`:r:n}(t,e.promptPrefix),k=Number.isFinite(c=l.outputCount??f?.defaultOutputCount??e.defaultOutputCount)?Math.max(1,Math.min(4,Math.floor(c))):1,N=(0,r.aD)({config:e,modelId:d,resolution:l.resolution}),M=(0,r.Rz)({config:e,modelId:d,resolution:N,generationType:m,aspectRatio:l.aspectRatio??f?.defaultAspectRatio??e.defaultAspectRatio});return{outputType:e.outputType,scene:g,model:b,prompt:j,provider:l.provider??f?.provider,inputImages:n.slice(0,_),inputVideos:h,options:{...f?.defaultOptions,...l.extra,aspect_ratio:M,duration:l.duration??f?.defaultDuration??e.defaultDuration,resolution:N,output_format:l.format??f?.defaultFormat??e.defaultFormat,mode:v,...x?{generationType:m}:{},output_count:k,..."image"===e.outputType?{image_count:k}:{}}}}function o(e,t,n={}){let r=t??e.defaultModel,a=e.models.find(e=>e.id===r),i=n.generationType,s=(i&&(a?.maxVideosByGenerationType?.[i]??e.maxVideosByGenerationType?.[i]))??void 0,l="number"==typeof s?s:a?.maxVideos??e.maxVideos??0;return Number.isFinite(l)?Math.max(0,Math.floor(l)):0}function s(e,t){let n=t??e.defaultModel,r=e.models.find(e=>e.id===n),a=r?.videoSlotCost??e.videoSlotCost??2;return Number.isFinite(a)?Math.max(1,Math.floor(a)):2}function l(e,t){let n=t??e.defaultModel,r=e.models.find(e=>e.id===n),a=r?.maxVideoSeconds??e.maxVideoSeconds;if("number"==typeof a&&Number.isFinite(a))return Math.max(1,Math.floor(a))}function u(e,t,n={}){let r=t??e.defaultModel,a=e.models.find(e=>e.id===r),i=(a?.requestModel??a?.requestModelByMode?.[String(a?.defaultMode??e.defaultMode)]??r).toLowerCase(),o=n.generationType,s=(o&&(a?.maxImagesByGenerationType?.[o]??e.maxImagesByGenerationType?.[o]))??void 0;if("number"==typeof s&&Number.isFinite(s))return Math.max(1,Math.floor(s));if(i.includes("veo3")&&"FIRST_AND_LAST_FRAMES_2_VIDEO"===o)return 2;if(i.includes("kling")&&o)return"FIRST_AND_LAST_FRAMES_2_VIDEO"===o?2:1;let l=a?.maxImages??e.maxImages;return Number.isFinite(l)?Math.max(1,Math.floor(l)):1}},51668:(e,t,n)=>{function r(e){return`pvid_generator_settings_${e}`}function a(e,t=globalThis.localStorage){if(!t)return{};try{let n=t.getItem(r(e));return n?JSON.parse(n):{}}catch{return{}}}function i(e,t,n=globalThis.localStorage){if(n)try{n.setItem(r(e),JSON.stringify(t))}catch{}}n.d(t,{Gg:()=>i,bU:()=>a})},54866:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},59155:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},59279:(e,t,n)=>{n.d(t,{default:()=>s});var r=n(32812),a=n(7907),i=n(45951),o=n(69140);function s(e){var t=e.locale,n=(0,a._)(e,["locale"]);if(!t)throw Error(void 0);return(0,o.jsx)(i.Dk,(0,r._)({locale:t},n))}},59434:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},61907:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},63037:(e,t,n)=>{n.d(t,{i:()=>$});var r=n(32812),a=n(7907);class i{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return o(this.animations,"duration")}get iterationDuration(){return o(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function o(e,t){let n=0;for(let r=0;r<e.length;r++){let a=e[r][t];null!==a&&a>n&&(n=a)}return n}class s extends i{then(e,t){return this.finished.finally(e).then(()=>{})}}var l=n(75015),u=n(17727),c=n(6608),d=n(22955),f=n(20857),m=n(57505),p=n(86877),h=n(33702),g=n(78818),v=n(63727),x=n(75257),y=n(1299),w=n(89279),_=n(93448);
4function b(e,t){return(0,_.h)(e)?e[((e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e})(0,e.length,t)]:e}var j=n(25299),k=n(87639),N=n(91780),M=n(49835);function A(e){return(void 0===e?"undefined":(0,M._)(e))==="object"&&!Array.isArray(e)}function E(e,t,n,r){return null==e?[]:"string"==typeof e&&A(t)?(0,N.K)(e,n,r):(0,k._)(e,NodeList)?Array.from(e):Array.isArray(e)?e.filter(function(e){return null!=e}):[e]}function C(e,t,n,r){var a;return"number"==typeof t?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):"<"===t?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):null!=(a=r.get(t))?a:e}var R=n(48088);function T(e,t){return e.at!==t.at?e.at-t.at:null===e.value?1:null===t.value?-1:0}function S(e,t){return t.has(e)||t.set(e,{}),t.get(e)}function O(e,t){return t[e]||(t[e]=[]),t[e]}var I=function(e){return"number"==typeof e},L=n(62325),P=n(78506),z=n(2049),F=n(22576),D=n(53277),V=n(10513),B=n(25778),G=n(93219),H=n(10235);class K extends H.BX{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(t in e){let n=e[t];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return(0,G.ge)()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}}function W(e){var t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=(0,F.x)(e)&&!(0,D.h)(e)?new V.l(t):new B.M(t);n.mount(e),P.C.set(e,n)}function U(e){var t=new K({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),P.C.set(e,t)}function q(e,t,n,a){var i=[];if((0,x.S)(e)||"number"==typeof e||"string"==typeof e&&!A(t))i.push((0,L.z)(e,A(t)&&t.default||t,n&&n.default||n));else{if(null==e)return i;var o=E(e,t,a),s=o.length;(0,w.V)(!!s,"No valid elements provided.","no-valid-elements");for(var l=0;l<s;l++){var c=o[l],d=(0,k._)(c,Element)?W:U;P.C.has(c)||d(c);var m=P.C.get(c),p=(0,r._)({},n);"delay"in p&&"function"==typeof p.delay&&(p.delay=p.delay(l,s)),i.push.apply(i,(0,u._)((0,z.$)(m,(0,f._)((0,r._)({},t),{transition:p}),{})))}}return i}var $=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.scope,n=e.reduceMotion;return function(e,i,o){var _,k=[];if(Array.isArray(e)&&e.some(Array.isArray)){var N,M,A=i||{},L=A.onComplete,P=(0,a._)(A,["onComplete"]);"function"==typeof L&&(_=L),N=void 0!==n?(0,r._)({reduceMotion:n},P):P,M=[],(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=t.defaultTransition,s=void 0===o?{}:o,c=(0,a._)(t,["defaultTransition"]),d=s.duration||.3,_=new Map,k=new Map,N={},M=new Map,A=0,L=0,P=0,z=0;z<e.length;z++)!function(t){var o=e[t];if("string"==typeof o)return M.set(o,L);if(!Array.isArray(o))return M.set(o.name,C(L,o.at,A,M));var c=(0,m._)(o,3),f=c[0],_=c[1],j=c[2],T=void 0===j?{}:j;void 0!==T.at&&(L=C(L,T.at,A,M));var z=0,F=function(e,t,n){var o,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,m=Array.isArray(o=e)?o:[o],x=t.delay,_=void 0===x?0:x,j=t.times,k=void 0===j?(0,p.Z)(m):j,N=t.type,M=void 0===N?s.type||"keyframes":N,A=t.repeat,E=(t.repeatType,t.repeatDelay,(0,a._)(t,["delay","times","type","repeat","repeatType","repeatDelay"])),C=t.ease,T=void 0===C?s.ease||"easeOut":C,S=t.duration,O="function"==typeof _?_(c,f):_,F=m.length,D=(0,h.W)(M)?M:null==i?void 0:i[M||"keyframes"];if(F<=2&&D){var V=100;2===F&&m.every(I)&&(V=Math.abs(m[1]-m[0]));var B=(0,r._)({},s,E);void 0!==S&&(B.duration=(0,y.f)(S));var G=(0,g.X)(B,V,D);T=G.ease,S=G.duration}null!=S||(S=d);var H=L+O;1===k.length&&0===k[0]&&(k[1]=1);var K=k.length-m.length;if(K>0&&(0,v.f)(k,K),1===m.length&&m.unshift(null),A){(0,w.V)(A<20,"Repeat count too high, must be less than 20","repeat-count-high"),S*=A+1;var W=(0,u._)(m),U=(0,u._)(k);T=Array.isArray(T)?(0,u._)(T):[T];for(var q=(0,u._)(T),$=0;$<A;$++){m.push.apply(m,(0,u._)(W));for(var X=0;X<W.length;X++)k.push(U[X]+($+1)),T.push(0===X?"linear":b(q,X-1))}for(var Y=0;Y<k.length;Y++)k[Y]=k[Y]/(A+1)}var J=H+S;!function(e,t,n,r,a,i){for(var o=0;o<e.length;o++){var s=e[o];s.at>a&&s.at<i&&((0,l.Ai)(e,s),o--)}for(var u=0;u<t.length;u++)e.push({value:t[u],at:(0,R.k)(a,i,r[u]),easing:b(n,u)})}(n,m,T,k,H,J),z=Math.max(O+S,z),P=Math.max(J,P)};if((0,x.S)(f))F(_,T,O("default",S(f,k)));else for(var D=E(f,_,n,N),V=D.length,B=0;B<V;B++){var G,H,K=S(D[B],k);for(var W in _){F(_[W],(G=T,H=W,G&&G[H]?(0,r._)({},G,G[H]):(0,r._)({},G)),O(W,K),B,V)}}A=L,L+=z}(z);
4return k.forEach(function(e,t){for(var n in e){var i=e[n];i.sort(T);for(var o=[],l=[],u=[],d=0;d<i.length;d++){var m=i[d],p=m.at,h=m.value,g=m.easing;o.push(h),l.push((0,j.q)(0,P,p)),u.push(g||"easeOut")}0!==l[0]&&(l.unshift(0),o.unshift(o[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),o.push(null)),_.has(t)||_.set(t,{keyframes:{},transition:{}});var v=_.get(t);v.keyframes[n]=o,s.type;var x=(0,a._)(s,["type"]);v.transition[n]=(0,r._)((0,f._)((0,r._)({},x),{duration:P,ease:u,times:l}),c)}}),_})(e.map(function(e){if(Array.isArray(e)&&"function"==typeof e[0]){var t=e[0],n=(0,c.OQ)(0);return(n.on("change",t),1===e.length)?[n,[0,1]]:2===e.length?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),N,t,{spring:d.o}).forEach(function(e,t){var n=e.keyframes,r=e.transition;M.push.apply(M,(0,u._)(q(t,n,r)))}),k=M}else{var z=o||{},F=z.onComplete,D=(0,a._)(z,["onComplete"]);"function"==typeof F&&(_=F),k=q(e,i,void 0!==n?(0,r._)({reduceMotion:n},D):D,t)}var V=new s(k);return _&&V.finished.then(_),t&&(t.animations.push(V),V.finished.then(function(){(0,l.Ai)(t.animations,V)})),V}}()},69397:(e,t,n)=>{function r(e){return{id:e.id,brand:e.brand,nav:{...e.nav,items:a(e.nav?.items)},buttons:a(e.buttons),userNav:e.userNav??e.user_nav,showTheme:e.showTheme??e.show_theme??!1,showLocale:e.showLocale??e.show_locale??!1,showSign:e.showSign??e.show_sign??!1,className:e.className}}function a(e){return(e??[]).map(e=>({...e,children:a(e.children)}))}function i(e){return e.title??e.text??e.name??""}function o(e){if(!e)return;let t=e.isUnlimited??e.unlimited??!1,n=e.remainingCredits??e.remaining;return t?{remaining:0,unlimited:!0}:"number"==typeof n&&Number.isFinite(n)?{remaining:n,unlimited:!1}:void 0}function s(e,t=6,n=3){let r=Math.min(n,Math.max(1,Math.ceil(e/t)));return{mode:r>1?"grid":"stack",columns:r}}function l(e,t){return{...e,nav:e.nav?{...e.nav,items:e.nav.items?.map(e=>({...e,children:e.children?.map(e=>({...e,mediaType:t[d(e.url)]??e.mediaType}))}))}:e.nav}}function u(e,t,n={}){if(0===t.length)return e;let r=n.toolsTitle??"Tools",a=e.nav,o=a?.items??[],s=!1,l=o.map(e=>!function(e,t){let n=i(e).trim().toLowerCase(),r=t.trim().toLowerCase();return"tools"===e.id||"tools"===e.type||n===r||n.endsWith(" tools")}(e,r)?e:(s=!0,{...e,children:t}));return s||l.push({title:r,icon:n.toolsIcon,children:t}),{...e,nav:{...a,items:l}}}function c(e,t,n=[]){return t[d(e,n)]}function d(e,t=[]){if(!e)return"/";let n="/";try{n=new URL(e,"https://shipany.local").pathname}catch{n=e.split(/[?#]/)[0]||"/"}for(let e of(n="/"===n?"/":n.replace(/\/+$/,""),t)){let t=`/${e}`;if(n===t)return"/";if(n.startsWith(`${t}/`))return n.slice(t.length)||"/"}return n}n.d(t,{Bj:()=>r,aS:()=>u,cw:()=>l,mF:()=>s,pn:()=>i,wz:()=>o,xg:()=>c})},75767:(e,t,n)=>{n.d(t,{G:()=>function e(t,n,l,u){if("function"==typeof t){var c;return f.bt.current=[],t(),c=d(f.bt.current,t),f.bt.current=void 0,c}if(void 0!==l&&!Array.isArray(l)&&"function"!=typeof n)return function(t,n,r,a){var i=(0,s.M)(function(){return Object.keys(r)}),o=(0,s.M)(function(){return{}}),l=!0,u=!1,c=void 0;try{for(var d,f=i[Symbol.iterator]();!(l=(d=f.next()).done);l=!0){var m=d.value;o[m]=e(t,n,r[m],a)}}catch(e){u=!0,c=e}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}return o}(t,n,l,u);var p="function"==typeof n?n:function(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],a=e[1+n],i=e[2+n],s=e[3+n],l=(0,o.G)(a,i,s);return t?l(r):l}(n,l,u),h=Array.isArray(t)?m(t,p):m([t],function(e){return p((0,i._)(e,1)[0])}),g=Array.isArray(t)?void 0:t.accelerate;return g&&!g.isTransformed&&"function"!=typeof n&&Array.isArray(l)&&(null==u?void 0:u.clamp)!==!1&&(h.accelerate=(0,r._)((0,a._)((0,r._)({},g),{times:n,keyframes:l,isTransformed:!0}),(null==u?void 0:u.ease)?{ease:u.ease}:{})),h}});var r=n(32812),a=n(20857),i=n(57505),o=n(1653),s=n(55833),l=n(57689),u=n(64037),c=n(48031);function d(e,t){var n=(0,c.d)(t()),r=function(){return n.set(t())};return r(),(0,u.E)(function(){var t=function(){return l.Gt.preRender(r,!1,!0)},n=e.map(function(e){return e.on("change",t)});return function(){n.forEach(function(e){return e()}),(0,l.WG)(r)}}),n}var f=n(6608);function m(e,t){var n=(0,s.M)(function(){return[]});return d(e,function(){n.length=0;for(var r=e.length,a=0;a<r;a++)n[a]=e[a].get();return t(n)})}},76351:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])}
4,76539:(e,t,n)=>{n.d(t,{N:()=>A});var r=n(57505),a=n(17727),i=n(69140),o=n(20792),s=n(2569),l=n(55833),u=n(64037),c=n(32812),d=n(99601),f=n(57574),m=n(98111),p=n(40102),h=n(16893),g=n(86353),v=n(32112);function x(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function y(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){var n=!1,r=t.map(function(t){var r=x(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return function(){for(var e=0;e<r.length;e++){var n=r[e];"function"==typeof n?n():x(t[e],null)}}}}var w=function(e){function t(){return(0,m._)(this,t),(0,f._)(this,t,arguments)}return(0,h._)(t,e),(0,p._)(t,[{key:"getSnapshotBeforeUpdate",value:function(e){var t=this.props.childRef.current;if((0,g.s)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){var n=t.offsetParent,r=(0,g.s)(n)&&n.offsetWidth||0,a=(0,g.s)(n)&&n.offsetHeight||0,i=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(i.height),o.width=parseFloat(i.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=r-o.width-o.left,o.bottom=a-o.height-o.top}return null}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){return this.props.children}}]),t}(o.Component);function _(e){var t,n,r=e.children,s=e.isPresent,l=e.anchorX,u=e.anchorY,c=e.root,d=e.pop,f=(0,o.useId)(),m=(0,o.useRef)(null),p=(0,o.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),h=(0,o.useContext)(v.Q).nonce,g=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.useCallback(y.apply(void 0,(0,a._)(t)),t)}(m,null!=(n=null==(t=r.props)?void 0:t.ref)?n:null==r?void 0:r.ref);return(0,o.useInsertionEffect)(function(){var e=p.current,t=e.width,n=e.height,r=e.top,a=e.left,i=e.right,o=e.bottom;if(!s&&!1!==d&&m.current&&t&&n){m.current.dataset.motionPopId=f;var g=document.createElement("style");h&&(g.nonce=h);var v=null!=c?c:document.head;return v.appendChild(g),g.sheet&&g.sheet.insertRule('\n [data-motion-pop-id="'.concat(f,'"] {\n position: absolute !important;\n width: ').concat(t,"px !important;\n height: ").concat(n,"px !important;\n ").concat("left"===l?"left: ".concat(a):"right: ".concat(i),"px !important;\n ").concat("bottom"===u?"bottom: ".concat(o):"top: ".concat(r),"px !important;\n }\n ")),function(){var e;null==(e=m.current)||e.removeAttribute("data-motion-pop-id"),v.contains(g)&&v.removeChild(g)}}},[s]),(0,i.jsx)(w,{isPresent:s,childRef:m,sizeRef:p,pop:d,children:!1===d?r:o.cloneElement(r,{ref:g})})}var b=function(e){var t=e.children,n=e.initial,r=e.isPresent,a=e.onExitComplete,s=e.custom,u=e.presenceAffectsLayout,f=e.mode,m=e.anchorX,p=e.anchorY,h=e.root,g=(0,l.M)(j),v=(0,o.useId)(),x=!0,y=(0,o.useMemo)(function(){return x=!1,{id:v,initial:n,isPresent:r,custom:s,onExitComplete:function(e){g.set(e,!0);var t=!0,n=!1,r=void 0;try{for(var i,o=g.values()[Symbol.iterator]();!(t=(i=o.next()).done);t=!0)if(!i.value)return}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}a&&a()},register:function(e){return g.set(e,!1),function(){return g.delete(e)}}}},[r,g,a]);return u&&x&&(y=(0,c._)({},y)),(0,o.useMemo)(function(){g.forEach(function(e,t){return g.set(t,!1)})},[r]),o.useEffect(function(){r||g.size||!a||a()},[r]),t=(0,i.jsx)(_,{pop:"popLayout"===f,isPresent:r,anchorX:m,anchorY:p,root:h,children:t}),(0,i.jsx)(d.t.Provider,{value:y,children:t})};function j(){return new Map}var k=n(96590),N=function(e){return e.key||""};function M(e){var t=[];return o.Children.forEach(e,function(e){(0,o.isValidElement)(e)&&t.push(e)}),t}var A=function(e){var t=e.children,n=e.custom,c=e.initial,d=void 0===c||c,f=e.onExitComplete,m=e.presenceAffectsLayout,p=void 0===m||m,h=e.mode,g=void 0===h?"sync":h,v=e.propagate,x=void 0!==v&&v,y=e.anchorX,w=void 0===y?"left":y,_=e.anchorY,j=void 0===_?"top":_,A=e.root,E=(0,r._)((0,k.xQ)(x),2),C=E[0],R=E[1],T=(0,o.useMemo)(function(){return M(t)},[t]),S=x&&!C?[]:T.map(N),O=(0,o.useRef)(!0),I=(0,o.useRef)(T),L=(0,l.M)(function(){return new Map}),P=(0,o.useRef)(new Set),z=(0,r._)((0,o.useState)(T),2),F=z[0],D=z[1],V=(0,r._)((0,o.useState)(T),2),B=V[0],G=V[1];(0,u.E)(function(){O.current=!1,I.current=T;for(var e=0;e<B.length;e++){var t=N(B[e]);S.includes(t)?(L.delete(t),P.current.delete(t)):!0!==L.get(t)&&L.set(t,!1)}},[B,S.length,S.join("-")]);var H=[];if(T!==F){for(var K=(0,a._)(T),W=0;W<B.length;W++){var U=B[W],q=N(U);S.includes(q)||(K.splice(W,0,U),H.push(U))}return"wait"===g&&H.length&&(K=H),G(M(K)),D(T),null}var $=(0,o.useContext)(s.L).forceRender;return(0,i.jsx)(i.Fragment,{children:B.map(function(e){var t=N(e),r=(!x||!!C)&&(T===B||S.includes(t));return(0,i.jsx)(b,{isPresent:r,initial:(!O.current||!!d)&&void 0,custom:n,presenceAffectsLayout:p,mode:g,root:A,onExitComplete:r?void 0:function(){if(!P.current.has(t)&&L.has(t)){P.current.add(t),L.set(t,!0);var e=!0;
4L.forEach(function(t){t||(e=!1)}),e&&(null==$||$(),G(I.current),x&&(null==R||R()),f&&f())}},anchorX:w,anchorY:j,children:e},t)})})}},80413:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("send-horizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]])},81242:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},82505:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]])},86482:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("pencil-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]])},86948:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])},88669:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},90455:(e,t,n)=>{n.d(t,{A:()=>r});var r=(0,n(10609).A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},93747:(e,t,n)=>{function r(e){var t;let n=e.outputType,r=function({outputType:e,models:t,defaultModel:n,defaultModelByOutputType:r}){let a=r?.[e];
4if(a&&t.some(t=>t.id===a&&t.outputType===e))return a;if(n&&t.some(t=>t.id===n&&t.outputType===e))return n;let i=t.find(t=>t.outputType===e);return i?i.id:"image"===e?"nano-banana-2":"kling-3.0"}({outputType:n,models:e.models,defaultModel:e.defaultModel,defaultModelByOutputType:e.defaultModelByOutputType});return{...e,defaultModel:r,defaultAspectRatio:e.defaultAspectRatio??x(n),defaultDuration:e.defaultDuration??5,defaultResolution:e.defaultResolution??"2K",defaultFormat:e.defaultFormat??"jpg",defaultMode:e.defaultMode??"std",defaultGenerationType:e.defaultGenerationType??"REFERENCE_2_VIDEO",defaultOutputCount:Number.isFinite(t=e.defaultOutputCount??1)?Math.max(1,Math.min(4,Math.floor(t))):1,maxImages:e.maxImages??1,maxSizeMB:e.maxSizeMB??10}}function a({config:e,outputType:t,scene:n}){let r=e.models.filter(e=>e.outputType===t&&(!n||e.scenes.includes(n))),a=new Set(e.hiddenModels??[]),i=r.filter(e=>!a.has(e.id));return i.length>0?i:r}function i(e,t,n,r){let a=function(e,t,n){let r=t?e.hiddenOptions?.byModel?.[t]?.[n]:void 0,a=e.hiddenOptions?.[n];return new Set((r??a??[]).map(String))}(e,t,n);if(0===a.size)return r;let i=r.filter(e=>{let t="object"==typeof e?e.value:e;return!a.has(String(t))});return i.length>0?i:r}function o(e,t,n,r){let a=f(e,t),i=p(a?.aspectRatioOptionsByGenerationType,r);if(i)return i;let o=p(e.aspectRatioOptionsByGenerationType,r);if(o)return o;let s=h(a?.aspectRatioOptionsByResolution,n);if(s)return s;let l=h(e.aspectRatioOptionsByResolution,n);return l||(a?.aspectRatioOptions??e.aspectRatioOptions??("image"===e.outputType?["auto","1:1","16:9","9:16"]:["16:9","9:16","1:1"]))}function s({config:e,modelId:t,resolution:n,generationType:r,aspectRatio:a}){let i=m(o(e,t,n,r)),s=f(e,t),l=a??g(s?.defaultAspectRatioByResolution,n)??g(e.defaultAspectRatioByResolution,n)??s?.defaultAspectRatio??e.defaultAspectRatio??x(e.outputType);if(i.includes(l))return l;let u=g(s?.defaultAspectRatioByResolution,n)??g(e.defaultAspectRatioByResolution,n);return u&&i.includes(u)?u:i[0]??l}function l(e,t,n){let r=f(e,t),a=p(r?.modeOptionsByGenerationType,n);if(a)return a;let i=p(e.modeOptionsByGenerationType,n);return i||(r?.modeOptions??e.modeOptions??("video"===e.outputType?["std","pro"]:[]))}function u({config:e,modelId:t,generationType:n}){let r=f(e,t),a=m(r?.generationTypeOptions??e.generationTypeOptions??[]),i=n??r?.defaultGenerationType??e.defaultGenerationType;if(!a.length)return i??"";if(i&&a.includes(i))return i;let o=r?.defaultGenerationType??e.defaultGenerationType;return o&&a.includes(o)?o:a[0]??""}function c({config:e,modelId:t,generationType:n,mode:r}){let a=f(e,t),i=m(l(e,t,n)),o=r??v(a?.defaultModeByGenerationType,n)??v(e.defaultModeByGenerationType,n)??a?.defaultMode??e.defaultMode;if(!i.length)return o??"";if(o&&i.includes(o))return o;let s=v(a?.defaultModeByGenerationType,n)??v(e.defaultModeByGenerationType,n)??a?.defaultMode??e.defaultMode;return s&&i.includes(s)?s:i[0]??""}function d({config:e,modelId:t,resolution:n}){let r=f(e,t),a=m(r?.resolutionOptions??e.resolutionOptions??[]),i=n??r?.defaultResolution??e.defaultResolution;if(!a.length)return i??"";if(i&&a.includes(i))return i;let o=r?.defaultResolution??e.defaultResolution;return o&&a.includes(o)?o:a[0]??""}function f(e,t){if(t)return e.models.find(e=>e.id===t)}function m(e){return e.map(e=>String("object"==typeof e?e.value:e))}function p(e,t){if(e&&t)return e[t]??e[t.toUpperCase()]}function h(e,t){if(e&&t)return e[t]??e[t.toUpperCase()]}function g(e,t){if(e&&t)return e[t]??e[t.toUpperCase()]}function v(e,t){if(e&&t)return e[t]??e[t.toUpperCase()]}function x(e){return"image"===e?"auto":"16:9"}n.d(t,{Bz:()=>o,Rz:()=>s,WD:()=>a,aD:()=>d,d1:()=>c,sk:()=>i,tH:()=>l,uv:()=>r,w2:()=>u})},94820:(e,t,n)=>{n.d(t,{C:()=>function e(t){if(!t)return[];if("string"==typeof t){var n,a,i,o,s,l=t.trim();if(!l)return[];if(l.startsWith("{")||l.startsWith("["))try{return e(JSON.parse(l))}catch(e){return[]}return[t]}if(Array.isArray(t))return t.flatMap(e);if((void 0===t?"undefined":(0,r._)(t))!=="object")return[];var u=null!=(s=null!=(o=null!=(i=null!=(a=null!=(n=t.url)?n:t.src)?a:t.imageUrl)?i:t.videoUrl)?o:t.finalVideoUrl)?s:t.previewVideoUrl;return"string"==typeof u?[u]:[t.output,t.images,t.videos,t.urls,t.taskInfo,t.taskResult,t.data].flatMap(e)}});var r=n(49835);n(69140),n(20792)}}]);
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.