1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1568],{10864:(e,t,r)=>{r.d(t,{Fp:()=>l,S4:()=>n,U3:()=>h,ip:()=>c,s7:()=>s,y_:()=>d});var i=r(20548),o=r(63893);r(30880);let n="recraft-crisp-upscale",s="topaz-image-upscale",a={"2K":3,"4K":4};g(a["2K"]),g(a["4K"]);let u={detail:{megapixelsPerBlock:8,costPerBlockMicros:8e4},restore:{megapixelsPerBlock:4,costPerBlockMicros:8e4},precision:[{maxMegapixels:24,providerCostMicros:8e4},{maxMegapixels:48,providerCostMicros:16e4},{maxMegapixels:96,providerCostMicros:32e4}]};function c(e,t){if(!Number.isFinite(t)||t<=0||t>96)throw Error("Enhanced images must be 96 MP or smaller.");let r=u[e],o="megapixelsPerBlock"in r?Math.ceil(t/r.megapixelsPerBlock)*r.costPerBlockMicros:r.find(e=>t<=e.maxMegapixels).providerCostMicros;return{credits:(0,i.dA)(o),providerCostMicros:o,maxCostMicros:o}}function h(e){return e===n||e===s}function l(e){var t;let r=c("detail",1).credits,i=c((t=e)===s?"precision":"detail",t===s?96:16.777216).credits;return{creditsMin:r,creditsMax:i,credits:"".concat(r,"â").concat(i," credits")}}function d(e){return c(e===s?"precision":"detail",1)}function g(e){if(!Number.isInteger(e)||e<0)throw Error("Crun credits must be a non-negative integer.");let t=1e6*e+Math.trunc(o.z2/2);return(t-t%o.z2)/o.z2}({low:{...c("precision",24),maxMegapixels:24},mid:{...c("precision",48),maxMegapixels:48},high:{...c("precision",96),maxMegapixels:96}}).high.maxCostMicros},20548:(e,t,r)=>{r.d(t,{TY:()=>i,dA:()=>n,mY:()=>o});let i=70;function o(e){return Math.ceil(e*i)}function n(e){return Math.ceil(e*i/1e6)}},51568:(e,t,r)=>{r.d(t,{Fn:()=>s,MM:()=>h,S4:()=>i.S4,Vl:()=>o,j0:()=>a,kW:()=>n,ym:()=>c});var i=r(10864);let o=1e7,n="10 MB",s=24e6,a=48e6,u=[4,2,1];function c(e){var t=e.bytes;if(!Number.isInteger(t)||t<1||t>o)throw Error("Source images must be ".concat(n," or smaller."));if(!Number.isInteger(e.width)||!Number.isInteger(e.height)||e.width<1||e.height<1)throw Error("The source image dimensions could not be verified.");let r=Math.max(e.width,e.height),s=Math.min(e.width,e.height),a=e.width*e.height/1e6;if(s<32)throw Error("Source images must be at least ".concat(32,"px on the shortest side."));if(r>2e4||a>96)throw Error("Source images must be 96 MP or smaller and at most 20,000px on the longest side.");let c=r>2048?"precision":e.blurryPhoto?"restore":"detail",h="restore"===c?u.find(t=>e.width*e.height*t*t<=8e6):function(e,t){let r=Math.max(e,t);return r<720?4:2*r<=2e4&&e*t/1e6*4<=96?2:1}(e.width,e.height),l=e.width*h,d=e.height*h,g=l*d<=8e6?"png":"jpeg";return{...(0,i.ip)(c,a*h*h),mode:c,outputFormat:g,outputMimeType:"image/".concat(g),modelSlug:"precision"===c?i.s7:i.S4,megapixels:a,maxEdge:r,scaleFactor:h,outputWidth:l,outputHeight:d}}function h(e){if(!e.width||!e.height||!Number.isInteger(e.width)||!Number.isInteger(e.height))return{ok:!1,message:"The source image dimensions could not be verified."};try{return{ok:!0,quote:c({bytes:e.bytes,blurryPhoto:e.blurryPhoto,width:e.width,height:e.height})}}catch(e){return{ok:!1,message:e instanceof Error?e.message:"This source image cannot be enhanced."}}
1}},56597:(e,t,r)=>{r.d(t,{Bw:()=>o,Jf:()=>n,Pb:()=>a,gm:()=>i,wG:()=>s});let i="2K",o="1K",n="16:9",s="9:16";function a(e){return!!(e&&("gpt-image-2"===e||e.startsWith("gpt-image-2-"))&&!e.startsWith("gpt-image-2-5"))}},57979:(e,t,r)=>{r.d(t,{Cn:()=>k,Cz:()=>f,LG:()=>x,Ln:()=>M,MV:()=>b,PU:()=>m,Qb:()=>d,Uy:()=>g,dM:()=>l,e5:()=>P,i4:()=>a,kr:()=>c,nf:()=>u,pY:()=>o,qn:()=>s,qs:()=>h});var i=r(20548);let o="gpt-image-2-5-edit",n=["flare","sunburst"],s=["low","medium","high"],a=["1K","2K","4K"],u=["1:1","4:3","3:4","16:9","9:16"],c="flare",h="medium",l="2K",d="1K",g="16:9",m=1,f=16,p={"1K":{low:(0,i.dA)(5900),medium:(0,i.dA)(13200),high:(0,i.dA)(52700)},"2K":{low:(0,i.dA)(6200),medium:(0,i.dA)(14400),high:(0,i.dA)(55300)},"4K":{low:(0,i.dA)(11200),medium:(0,i.dA)(26e3),high:(0,i.dA)(100100)}},K=new Set(s),w=new Set(a);function M(e){return!!(e&&("gpt-image-2-5"===e||e.startsWith("gpt-image-2-5-")))}function x(){return{variants:n,qualities:s,resolutions:a,ratios:u}}function b(e){return p[function(e){if(null==e||""===e)return l;if(e&&w.has(e))return e;throw Error("Choose 1K, 2K, or 4K for GPT Image 2.5.")}(e.resolution)][function(e){if(null==e||""===e)return h;if(e&&K.has(e))return e;throw Error("Choose Low, Medium, or High for GPT Image 2.5.")}(e.quality)]}function k(){return{creditsMin:p["1K"].low,creditsMax:p["4K"].high,credits:"".concat(p["1K"].low,"â").concat(p["4K"].high," credits per output")}}function P(e){return{ratio:e?"9:16":g,resolution:e?d:l,quality:h,imageVariant:c}}},63893:(e,t,r)=>{r.d(t,{$G:()=>m,Jt:()=>d,QR:()=>o,Ze:()=>u,df:()=>f,dh:()=>p,y7:()=>K,z2:()=>s}),r(57979);var i=r(56597);r(30880);let o="gpt-image-2-edit",n={"1K":4,"2K":6,"4K":10},s=206,a={"1K":4,"2K":6,"4K":9},u=16;M(n["1K"]),M(n["2K"]),M(n["4K"]),i.gm,i.Bw,i.Jf,i.wG;let c=new Set(["1K","2K","4K"]),h=new Set(["auto","1:1","4:3","3:4","16:9","9:16"]),l=["gpt-image-2-text-to-image",o];function d(e){return!!(e&&l.includes(e))}function g(e){return!!(e&&c.has(e))}function m(e){var t;return a[g(t=e)?t:"1K"]}function f(){return{creditsMin:a["1K"],creditsMax:a["4K"],credits:"".concat(a["1K"],"â").concat(a["4K"]," credits per output")}}function p(e,t){return e.filter(e=>w(e,t))}function K(e,t){return e.filter(e=>w(t,e))}function w(e,t){return(!e||!!(e&&h.has(e)))&&(!t||!!g(t))&&("auto"!==e||!t||"1K"===t)&&("1:1"!==e||"4K"!==t)}function M(e){return Math.round(e/s*1e6)}}}]);
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.