1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[30748,93797],{29069:function(e,n,t){var i=t(55862),a=t(59327);e.exports=function(e,n){var t=-1,r=a(e)?Array(e.length):[];return i(e,function(e,i,a){r[++t]=n(e,i,a)}),r}},33531:function(e,n,t){var i=t(28071),a=t(164),r=t(29069),o=t(14833);e.exports=function(e,n){return(o(e)?i:r)(e,a(n,3))}},90974:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});let i=(0,t(93627).Z)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},87394:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});let i=(0,t(93627).Z)("badge-percent",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 15h.01",key:"lqbp3k"}]])},23196:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});let i=(0,t(93627).Z)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},21822:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});let i=(0,t(93627).Z)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},57369:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});let i=(0,t(93627).Z)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},75431:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});let i=(0,t(93627).Z)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]])},76361:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});let i=(0,t(93627).Z)("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]])},93797:function(e,n,t){"use strict";t.d(n,{BV:function(){return s},Dg:function(){return h},EV:function(){return _},H8:function(){return u},eI:function(){return c},iM:function(){return x},r_:function(){return m},tY:function(){return d},wu:function(){return l},yg:function(){return g},yq:function(){return p}});var i=t(82347),a=t(32920);let r=i.oF+"/api/v1",o=i.oF+"/gpus/v2";function s(e){let n="/market/query_options";return e.auth&&(n="/market/auth/query_options"),delete e.auth,(0,i.WY)({url:n,method:"GET",base_url:r,query:e})}function l(e,n){let t="/market/products";return e.auth&&(t="/market/auth/products"),(0,i.WY)({url:t,method:"GET",base_url:r,query:e,signal:n})}function c(e){return(0,i.WY)({url:"/market/product/pricing",method:"GET",base_url:r,query:e})}function d(e){return(0,i.WY)({url:"/gpu/instance/calcMonthAmount",method:"POST",base_url:i.oF+"/api/v1",data:{...e}})}function p(e){return(0,i.WY)({url:"/gpu/instance/calcExpandAmount",method:"POST",base_url:i.oF+"/api/v1",data:{...e}})}function u(e){return(0,i.WY)({url:"/wallet/saving_plan_template",method:"GET",base_url:r,query:e})}function m(e){let n={...e};return delete n.priceInfos,delete n.imageObj,delete n.currProduct,(0,i.WY)({url:"/gpus/v2/instances",method:"POST",data:(0,a.T7)(n)})}function h(e){return(0,i.WY)({url:"/anycross/trigger/callback/MGRmOGM2ZWZmZWY3OWRlZWMxZGMzYzU1OGY1MDNhNzRm",method:"POST",base_url:i.oF,data:{...e}})}function g(e){return(0,i.WY)({url:"/user/company",method:"POST",base_url:r,data:{...e}})}function _(e,n){let t="/market/products/node";return e.auth&&(t="/market/auth/products/node"),(0,i.WY)({url:t,method:"GET",base_url:r,query:e,signal:n})}function x(e){return(0,i.WY)({url:"/products",method:"GET",base_url:o,query:e}).then(e=>e.data||[]).catch(e=>[])}},32920:function(e,n,t){"use strict";t.d(n,{AC:function(){return f},HF:function(){return m},Hz:function(){return b},IY:function(){return A},Ji:function(){return d},M2:function(){return v},MD:function(){return I},NQ:function(){return g},OS:function(){return p},PM:function(){return u},T7:function(){return l},TE:function(){return j},U2:function(){return x},V4:function(){return _},Vy:function(){return y},YI:function(){return S},_c:function(){return w},bI:function(){return C},kY:function(){return h},nj:function(){return N},oc:function(){return P}});var i=t(82347);let a=i.oF+"/api/v1";function r(e){return Object.fromEntries(Object.entries(e).filter(e=>{let[,n]=e;return!(null==n||""===n||"number"==typeof n&&Number.isNaN(n)||Array.isArray(n)&&0===n.length)&&!("[object Object]"===Object.prototype.toString.call(n)&&0===Object.keys(n).length)}))}function o(e){var n;return null!==(n=({monthly:"prepaid",onDemand:"postpaid"})[e])&&void 0!==n?n:e}function s(e){var n,t,i,a,o,s,l,c,d,p,u,m,h,g,_,x,v,f,b,N,j,P,I,y,S,w,C,A,M,k,T,E,D,V,R,O,F,L,G,W,$,B,H,Z,U;if(!e)return e;let z=null!==(l=null!==(s=e.resource_specs)&&void 0!==s?s:e.resource)&&void 0!==l?l:{},Y=null!==(c=e.billing)&&void 0!==c?c:{},q=null!==(U=({prepaid:"monthly",postpaid:"onDemand"})[Z=null!==(d=e.billingMode)&&void 0!==d?d:Y.mode])&&void 0!==U?U:Z,X=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>{var n;return"number"==typeof e?{port:e,protocol:"tcp"}:r({port:Number(e.port),protocol:null!==(n=e.protocol)&&void 0!==n?n:e.type,endpoint:e.endpoint})}).filter(e=>e.port&&e.protocol)}(e.ports||[]),K=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>{var n;return r({...e,mount_point:null!==(n=e.mount_point)&&void 0!==n?n:e.mountPath})})}(null!==(u=null!==(p=e.volumeMounts)&&void 0!==p?p:e.volumes)&&void 0!==u?u:[]),Q=null===(n=Y.prepaid)||void 0===n?void 0:n.auto_renew,J=null!==(m=e.state)&&void 0!==m?m:e.status;return{...e,productId:null!==(h=e.productId)&&void 0!==h?h:e.product_id,productName:null!==(_=null!==(g=e.productName)&&void 0!==g?g:e.product_name)&&void 0!==_?_:e.product_id,billingMode:q,imageUrl:null!==(x=e.imageUrl)&&void 0!==x?x:e.image,imageAuthId:null!==(v=e.imageAuthId)&&void 0!==v?v:e.registry_auth_id,rootfsSize:null!==(f=e.rootfsSize)&&void 0!==f?f:z.rootfs_size_gb,gpuNum:null!==(b=e.gpuNum)&&void 0!==b?b:z.gpu_num,gpuIds:null!==(N=e.gpuIds)&&void 0!==N?N:z.gpu_ids,cpuNum:null!==(j=e.cpuNum)&&void 0!==j?j:z.cpu_num,memory:null!==(P=e.memory)&&void 0!==P?P:z.memory_gb,cudaVersion:null!==(I=e.cudaVersion)&&void 0!==I?I:z.min_cuda_version,volumeMounts:K,volumes:null!==(y=e.volumes)&&void 0!==y?y:K,portMappings:null!==(S=e.portMappings)&&void 0!==S?S:X.map(e=>({...e,type:e.protocol})),ports:X,clusterId:null!==(w=e.clusterId)&&void 0!==w?w:e.region,clusterName:null!==(C=e.clusterName)&&void 0!==C?C:e.region,createdAt:null!==(A=e.createdAt)&&void 0!==A?A:e.created_at,lastStartedAt:null!==(M=e.lastStartedAt)&&void 0!==M?M:e.last_started_at,lastStoppedAt:null!==(k=e.lastStoppedAt)&&void 0!==k?k:e.last_stopped_at,state:{...J,state:null!==(E=null!==(T=null==J?void 0:J.state)&&void 0!==T?T:null==J?void 0:J.status)&&void 0!==E?E:J},stateError:{message:null==J?void 0:J.message,state:null!==(V=null!==(D=null==J?void 0:J.state)&&void 0!==D?D:null==J?void 0:J.status)&&void 0!==V?V:""},status:null!==(O=null!==(R=null==J?void 0:J.state)&&void 0!==R?R:null==J?void 0:J.status)&&void 0!==O?O:"",creator:e.creator,uuid:null!==(F=e.uuid)&&void 0!==F?F:e.owner_id,autoRenew:null!==(L=e.autoRenew)&&void 0!==L?L:null==Q?void 0:Q.enabled,autoRenewMonth:null!==(G=e.autoRenewMonth)&&void 0!==G?G:null==Q?void 0:Q.months,autoRenewStatus:null!==(W=e.autoRenewStatus)&&void 0!==W?W:null==Q?void 0:Q.status,autoMigrate:null!==($=e.autoMigrate)&&void 0!==$?$:null===(t=e.auto_migrate)||void 0===t?void 0:t.enabled,includeSystemDisk:null!==(B=e.includeSystemDisk)&&void 0!==B?B:null===(i=e.auto_migrate)||void 0===i?void 0:i.include_system_disk,network:e.network,endTime:null!==(H=null==e?void 0:e.endTime)&&void 0!==H?H:null==e?void 0:null===(o=e.b
1illing)||void 0===o?void 0:null===(a=o.prepaid)||void 0===a?void 0:a.end_time}}function l(){var e,n,t,i,a,s,l,c,d,p,u,m,h,g,_,x,v,f,b,N,j,P,I,y,S,w,C,A,M,k,T,E,D,V,R,O;let F=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r({type:F.type,name:F.name,product_id:null!==(f=F.product_id)&&void 0!==f?f:F.productId,billing:r({mode:o(null!==(b=F.billingMode)&&void 0!==b?b:null===(e=F.billing)||void 0===e?void 0:e.mode),prepaid:"prepaid"===o(null!==(N=F.billingMode)&&void 0!==N?N:null===(n=F.billing)||void 0===n?void 0:n.mode)?r({months:null!==(P=null!==(j=F.months)&&void 0!==j?j:F.month)&&void 0!==P?P:null===(i=F.billing)||void 0===i?void 0:null===(t=i.prepaid)||void 0===t?void 0:t.months,auto_renew:r({enabled:null!==(I=F.autoRenew)&&void 0!==I?I:null===(l=F.billing)||void 0===l?void 0:null===(s=l.prepaid)||void 0===s?void 0:null===(a=s.auto_renew)||void 0===a?void 0:a.enabled,months:null!==(y=F.autoRenewMonth)&&void 0!==y?y:null===(p=F.billing)||void 0===p?void 0:null===(d=p.prepaid)||void 0===d?void 0:null===(c=d.auto_renew)||void 0===c?void 0:c.months})}):void 0}),image:null!==(S=F.image)&&void 0!==S?S:F.imageUrl,registry_auth_id:null!==(C=null!==(w=F.registry_auth_id)&&void 0!==w?w:F.imageAuthId)&&void 0!==C?C:F.imageAuth,entrypoint:null!==(A=null===(m=F.entrypoint)||void 0===m?void 0:null===(u=m.trim)||void 0===u?void 0:u.call(m))&&void 0!==A?A:F.entrypoint,command:F.command,envs:F.envs,ports:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>{var n;return"number"==typeof e?{port:e,protocol:"tcp"}:r({port:Number(e.port),protocol:null!==(n=e.protocol)&&void 0!==n?n:e.type})}).filter(e=>e.port&&e.protocol)}(F.ports),resource:r({rootfs_size_gb:null!==(M=F.rootfsSize)&&void 0!==M?M:null===(h=F.resource)||void 0===h?void 0:h.rootfs_size_gb,gpu_num:null!==(k=F.gpuNum)&&void 0!==k?k:null===(g=F.resource)||void 0===g?void 0:g.gpu_num,min_cuda_version:null!==(T=F.cudaVersion)&&void 0!==T?T:null===(_=F.resource)||void 0===_?void 0:_.min_cuda_version}),network:F.network,volumes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>{var n;return r({type:e.type,size:e.size,id:e.id,mount_point:null!==(n=e.mount_point)&&void 0!==n?n:e.mountPath})})}(null!==(E=F.volumeMounts)&&void 0!==E?E:F.volumes),candidate_regions:null!==(V=null!==(D=F.candidate_regions)&&void 0!==D?D:F.clusterIDs)&&void 0!==V?V:F.clusterId?[F.clusterId]:void 0,tools:function(e){if(Array.isArray(e)){var n;let t=e.find(e=>"jupyter"===String((null==e?void 0:e.name)||"").toLowerCase());return r({jupyter:t?r({enabled:!0,port:t.port,protocol:null!==(n=t.protocol)&&void 0!==n?n:t.type}):void 0})}if(e&&"object"==typeof e)return r({...e,jupyter:e.jupyter?r({enabled:e.jupyter.enabled,port:e.jupyter.port,protocol:e.jupyter.protocol}):void 0})}(F.tools),auto_migrate:r({enabled:null!==(R=F.autoMigrate)&&void 0!==R?R:null===(x=F.auto_migrate)||void 0===x?void 0:x.enabled,include_system_disk:null!==(O=F.includeSystemDisk)&&void 0!==O?O:null===(v=F.auto_migrate)||void 0===v?void 0:v.include_system_disk})})}function c(){var e,n;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return null!==(n=null!==(e=t.id)&&void 0!==e?e:t.instance_id)&&void 0!==n?n:t.instanceId}function d(e){return(0,i.WY)({url:"/gpus/v2/instances/"+e,method:"DELETE"})}function p(e){return(0,i.WY)({url:"/gpu/instanceMount",method:"POST",data:{...e},base_url:a})}function u(e){return(0,i.WY)({url:"/gpus/v2/instances/".concat(e,"/start"),method:"PUT"})}function m(e){return(0,i.WY)({url:"/gpus/v2/instances/".concat(e,"/restart"),method:"PUT"})}function h(e,n){var t;return(0,i.WY)({url:"/gpus/v2/instances/".concat(e,"/migrate"),method:"PUT",data:{save_data:null!==(t=n.save_data)&&void 0!==t?t:n.saveData},ignoreMsg:!0}).then(e=>{var n;return{...e,jobId:null!==(n=null==e?void 0:e.jobId)&&void 0!==n?n:null==e?void 0:e.job_id}})}function g(e){return(0,i.WY)({url:"/gpus/v2/instances/".concat(c(e),"/auto-migrate"),method:"PUT",data:{auto_migrate:{enabled:e.autoMigrateOpen,include_system_disk:e.autoMigrateSystemDisk}}})}function _(e){return(0,i.WY)({url:"/gpus/v2/instances/".concat(e,"/stop"),method:"PUT"})}function x(e){var n,t;return(0,i.WY)({url:"/gpus/v2/jobs/save-image",method:"POST",data:{instance_id:null!==(n=e.instance_id)&&void 0!==n?n:e.instanceId,image:e.image,registry_auth_id:null!==(t=e.registry_auth_id)&&void 0!==t?t:e.registryAuthId}})}function v(e){return(0,i.WY)({url:"/gpus/v2/instances",method:"GET",query:function(){var e,n,t,i;let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
1,{pageSize:s,productName:l,billingMode:c,clusters:d,...p}=a,u={...p,limit:null!==(e=a.limit)&&void 0!==e?e:s,cursor:a.cursor,product_name:null!==(n=a.product_name)&&void 0!==n?n:l,regions:null!==(t=a.regions)&&void 0!==t?t:d,billing_mode:null!==(i=a.billing_mode)&&void 0!==i?i:o(c)};return delete u.page,delete u.pageNum,delete u.pageSize,delete u.productName,delete u.billingMode,delete u.clusters,delete u.isUseSavingPlan,r(u)}(e)}).then(n=>(function(e){var n,t,i;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=((null==e?void 0:e.data)||(null==e?void 0:e.instances)||[]).map(s),o=Math.max(Number(a.pageNum||a.page||1)-1,0)*Number(a.pageSize||a.limit||r.length||0)+r.length+((null==e?void 0:e.has_more)?1:0);return{...e,instances:r,data:(null==e?void 0:e.data)||r,total:null!==(n=null==e?void 0:e.total)&&void 0!==n?n:o,nextCursor:null!==(t=null==e?void 0:e.nextCursor)&&void 0!==t?t:null==e?void 0:e.next_cursor,hasMore:null!==(i=null==e?void 0:e.hasMore)&&void 0!==i?i:null==e?void 0:e.has_more}})(n,e))}function f(e){return(0,i.WY)({url:"/metrics/gpu/instance",method:"GET",base_url:i.oF+"/v1",query:e})}function b(e){return(0,i.WY)({url:"/gpu/instance/"+e,method:"GET",base_url:a,ignoreMsg:!0}).then(e=>{var n;return s(null!==(n=null==e?void 0:e.instance)&&void 0!==n?n:e)})}function N(e){return(0,i.WY)({url:"/gpu/instance/"+e.instanceId,method:"PUT",base_url:a,data:{name:e.name}})}function j(e){var n;return(0,i.WY)({url:"/gpus/v2/instances/".concat(c(e),"/renew"),method:"PUT",data:{months:null!==(n=e.months)&&void 0!==n?n:e.month}})}function P(e){var n,t,a,r;return(0,i.WY)({url:"/gpus/v2/instances/".concat(c(e),"/auto-renew"),method:"PUT",data:{auto_renew:{enabled:null!==(a=null===(n=e.auto_renew)||void 0===n?void 0:n.enabled)&&void 0!==a?a:e.autoRenew,months:null!==(r=null===(t=e.auto_renew)||void 0===t?void 0:t.months)&&void 0!==r?r:e.autoRenewMonth}}})}function I(e){var n,t;return(0,i.WY)({url:"/gpus/v2/instances/".concat(c(e),"/billing-mode"),method:"PUT",data:{type:null!==(n=e.type)&&void 0!==n?n:"prepaid",months:null!==(t=e.months)&&void 0!==t?t:e.month,auto_renew:{enabled:e.autoRenew,months:e.autoRenewMonth}}})}function y(e,n){var t,a;return(0,i.WY)({url:"/gpus/v2/instances/"+e+"/upgrade",method:"PUT",data:{...l(n),save_data:null!==(a=null!==(t=n.save_data)&&void 0!==t?t:n.saveData)&&void 0!==a?a:n.save}})}function S(e){return(0,i.WY)({url:"/gpu/instance/"+e.instanceId+"/edit",method:"PUT",base_url:a,data:{...e.instanceParams}})}function w(e){return(0,i.WY)({url:"/gpus/v2/instances/".concat(e,"/web-terminal"),method:"PUT",data:{enable:!0}})}function C(e){return(0,i.WY)({url:"/gpus/v2/instances/".concat(e,"/web-terminal"),method:"PUT",data:{enable:!1}})}function A(e){return(0,i.WY)({url:"/gpu/instanceMountList",method:"GET",base_url:a,query:e,ignoreMsg:!0})}},27120:function(e,n,t){"use strict";t.d(n,{Cu:function(){return c},Dz:function(){return r},YL:function(){return d},ZN:function(){return o},dQ:function(){return s},m$:function(){return l}});var i=t(82347);let a=i.oF+"/api/v1";function r(e){return(0,i.WY)({url:"/networkstorages/list",method:"GET",base_url:a,query:e})}function o(e){return(0,i.WY)({url:"/networkstorage/create",method:"POST",base_url:a,data:{...e}})}function s(e){return(0,i.WY)({url:"/networkstorage/update",method:"POST",base_url:a,data:{...e}})}function l(e){return(0,i.WY)({url:"/networkstorage/delete",method:"POST",base_url:a,data:{...e}})}function c(e){return(0,i.WY)({url:"/gpu/storage/base_info",method:"GET",base_url:a,query:e})}function d(){return(0,i.WY)({url:"/home/products/storage",method:"GET",base_url:a})}},17699:function(e,n,t){"use strict";t.d(n,{d:function(){return p}});var i=t(82347);let a=["data","list","items","discounts","effective_discounts","model_discounts","results"];function r(e){return e&&"object"==typeof e&&!Array.isArray(e)?e:null}function o(e,n){for(let t of n){let n=e[t];if("string"==typeof n&&n.trim())return n;if("number"==typeof n&&Number.isFinite(n))return String(n)}return null}function s(e){return Array.isArray(e)?e.flatMap(e=>{let n=r(e);return n?[n]:[]}):[]}function l(e){return{meterCode:o(e,["meterCode","meter_code"]),basePrice:o(e,["basePrice","base_price"]),discountPrice:o(e,["discountPrice","discount_price"])}}function c(e){return{startTime:o(e,["startTime","start_time"]),endTime:o(e,["endTime","end_time"])}}function d(e){var n;let t=r(e.model)||r(e.model_info),i=o(e,["display_name","displayName","model_name","modelName","llm_model_name","llmModelName","model_id","modelId","product_id","productId","model","name"])||(t?o(t,["display_name","displayName","model_name","modelName","llm_model_name","llmModelName","model_id","modelId","product_id","productId","name"]):null);return i?{modelName:i,productId:o(e,["product_id","productId"]),prices:s(e.prices).map(l),dailyPeriods:s(null!==(n=e.daily_periods)&&void 0!==n?n:e.dailyPeriods).map(c),applyStartTime:o(e,["apply_start_time","applyStartTime","start_at","startAt","effective_start_at","effectiveStartAt","effective_from","effectiveFrom","start_time","startTime","effective_time","effectiveTime"]),applyEndTime:o(e,["apply_end_time","applyEndTime","end_at","endAt","effective_end_at","effectiveEndAt","effective_to","effectiveTo","end_time","endTime","expire_time","expireTime"]),createdAt:o(e,["created_at","createdAt"])}:null}async function p(){return(function e(n){if(Array.isArray(n))return n.flatMap(e=>{let n=r(e);return n?[n]:[]});let t=r(n);if(!t)return[];for(let n of a)if(n in t){let i=e(t[n]);if(i.length>0||Array.isArray(t[n]))return i}return[t]})(await (0,i.WY)({url:"/v1/product/llm/effective-discounts",method:"GET",ignoreMsg:!0})).map(d).filter(e=>null!==e)}},39455:function(e,n,t){"use strict";t.d(n,{Fd:function(){return r},Gb:function(){return d},H1:function(){return _},On:function(){return s},S3:function(){return u},SO:function(){return a},Zq:function(){return c},f3:function(){return g},fF:function(){return m},om:function(){return l},sT:function(){return h},xf:function(){return o}});var i=t(82347);function a(e){return(0,i.WY)({url:"/v1/product/agent-sandbox/price",method:"GET",base_url:i.oF,query:e})}function r(e){return(0,i.WY)({url:"/v1/product/batch-price",method:"POST",data:e,base_url:i.oF})}function o(e){return(0,i.WY)({url:"/v1/billing/sandbox/running-count",method:"GET",base_url:i.oF,query:e})}function s(e){return(0,i.WY)({url:"/v1/billing/sandbox/stats",method:"GET",base_url:i.oF,query:e})}function l(e){return(0,i.WY)({url:"/v1/billing/sandbox/usage",method:"GET",base_url:i.oF,query:e})}function c(e){return(0,i.WY)({url:"/v1/billing/sandbox/storage/stats",method:"GET",base_url:i.oF,query:e})}function d(){return(0,i.WY)({url:"/v1/billing/sandbox/storage/real-time",method:"GET",base_url:i.oF,query:{}})}let p=-1>="https://api-server.novita.ai".indexOf("dev")?"https://api.sandbox.novita.ai":"https://api.sandbox-dev.novita.ai";function u(e){return(0,i.WY)({url:"/v1/sandboxes",method:"GET",base_url:p,query:e})}function m(e){return(0,i.WY)({url:"/v1/templates",method:"GET",base_url:p,query:e})}function h(e){return(0,i.WY)({url:"/v1/sandbox/user/tier",method:"GET",base_url:p,query:e})}function g(e){return(0,i.WY)({url:"/v1/user/sandbox-quota-level",method:"GET",base_url:i.oF,query:e})}function _(e){return(0,i.WY)({url:"/v1/metrics/sandbox",method:"GET",base_url:i.oF,query:e})}},22557:function(e,n,t){"use strict";t.d(n,{Z:function(){return d}});var i=t(57437),a=t(99603),r=t(21362),o=t(67138),s=t(32713),l=t(43561),c=t.n(l);function d(e){var n,t;let{open:l=!1,title:d,children:p,footer:u,width:m,className:h,classNames:g,style:_,styles:x,closable:v=!0,maskClosable:f=!0,destroyOnClose:b,centered:N,closeIcon:j,zIndex:P,okText:I="OK",cancelText:y="Cancel",getContainer:S,onCancel:w,onOk:C}=e;if(b&&!l)return null;let A=function(){let e;for(var n,t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];
1i.forEach(n=>{void 0!==n&&(e=n)});let r="number"==typeof(n=e)?"".concat(n,"px"):n;return"none"===r?"80vh":r?"min(".concat(r,", 80vh)"):"80vh"}(null==_?void 0:_.maxHeight,null==x?void 0:null===(n=x.wrapper)||void 0===n?void 0:n.maxHeight,null==x?void 0:null===(t=x.content)||void 0===t?void 0:t.maxHeight),M=null!==d&&!1!==d&&void 0!==d&&!("string"==typeof d&&""===d.trim()),k=void 0===u,T=v&&null!==j;return(0,i.jsx)(o.Vq,{open:l,onOpenChange:e=>{e||null==w||w()},children:(0,i.jsxs)(o.cZ,{closeable:T,overlayClassName:null==g?void 0:g.mask,overlayStyle:null==x?void 0:x.mask,className:(0,s.cn)(c().modal_wrapper,null==g?void 0:g.wrapper,c().modal_content,null==g?void 0:g.content,"flex flex-col overflow-hidden",h),style:{maxWidth:"number"==typeof m?"".concat(m,"px"):m,zIndex:P,..._,...null==x?void 0:x.wrapper,...null==x?void 0:x.content,maxHeight:A},onInteractOutside:e=>{f||e.preventDefault()},children:[T&&j?(0,i.jsx)("button",{type:"button","aria-label":(0,a.I8)("src/app/components/Modal/Modal.close","Close"),className:"absolute right-6 top-6 p-1 opacity-70 transition-opacity hover:opacity-100",onClick:w,children:j}):null,M?(0,i.jsx)("div",{className:(0,s.cn)(c().modal_header,null==g?void 0:g.header),style:null==x?void 0:x.header,children:(0,i.jsx)(o.$N,{children:d})}):(0,i.jsx)(o.$N,{className:"sr-only",children:(0,a.I8)("src/app/components/Modal/Modal.dialog","Dialog")}),(0,i.jsx)("div",{className:(0,s.cn)(c().modal_body,null==g?void 0:g.body),style:null==x?void 0:x.body,children:p}),k?(0,i.jsxs)(o.cN,{className:(0,s.cn)(c().modal_footer,null==g?void 0:g.footer),style:null==x?void 0:x.footer,children:[(0,i.jsx)(r.Button,{variant:"outline",onClick:w,children:y}),(0,i.jsx)(r.Button,{onClick:C,children:I})]}):u?(0,i.jsx)(o.cN,{className:(0,s.cn)(c().modal_footer,null==g?void 0:g.footer),style:null==x?void 0:x.footer,children:u}):null]})})}},67011:function(e,n,t){"use strict";var i=t(57437),a=t(99603);t(2265);var r=t(3237),o=t(55273),s=t.n(o);n.Z=e=>{var n,t;let{pricing:o,currencySymbol:l="$",unit:c="M tokens"}=e,d=null!==(n=o.input_price)&&void 0!==n?n:[],p=null!==(t=o.output_price)&&void 0!==t?t:[],u=e=>({text:(0,a.I8)("src/app/components/ModelDetail/ModelFeatures/MultimodalPricingTable.text","Text"),audio:"Audio",image:"Image",video:"Video"})[e.toLowerCase()]||e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),m=(()=>{let e=new Map,n=n=>{if(!n||0===n.length)return;let t=n.map(e=>e.toLowerCase()),i=t.join(", ");e.has(i)||e.set(i,{key:i,modals:t,displayName:t.map(u).join(", ")})};return d.forEach(e=>{n(e.modals)}),p.forEach(e=>{n(e.modals)}),Array.from(e.values())})(),h=(e,n)=>{let t=(0,r.vx)(e),a=(0,r.vx)(n);return n!==e&&n?(0,i.jsxs)("span",{className:"flex flex-wrap gap-1",children:[(0,i.jsx)("span",{className:"text-[var(--brand-1)]",title:String(e),children:"".concat(l).concat(t," /").concat(c)}),(0,i.jsx)("span",{className:"text-[var(--gray-1)] line-through",title:String(n),children:"".concat(l).concat(a," /").concat(c)})]}):(0,i.jsx)("span",{title:String(e),children:"".concat(l).concat(t," /").concat(c)})},g=e=>{var n,t,i,a,r,o;let s=d.find(n=>n.modals.join(", ").toLowerCase()===e);return s?{input:Number(null!==(n=s.input_token_discount_price)&&void 0!==n?n:s.inputTokenDiscountPrice)||0,inputOriginal:Number(null!==(t=s.input_token_base_price)&&void 0!==t?t:s.inputTokenBasePrice)||0,cacheRead:Number(null!==(i=s.cache_read_input_discount_price)&&void 0!==i?i:s.cacheReadInputDiscountPrice)||0,cacheReadOriginal:Number(null!==(a=s.cache_read_input_base_price)&&void 0!==a?a:s.cacheReadInputBasePrice)||0,cacheCreation:Number(null!==(r=s.cache_creation_input_discount_price)&&void 0!==r?r:s.cacheCreationInputDiscountPrice)||0,cacheCreationOriginal:Number(null!==(o=s.cache_creation_input_base_price)&&void 0!==o?o:s.cacheCreationInputBasePrice)||0}:null},_=e=>{var n,t;let i=p.find(n=>n.modals.join(", ").toLowerCase()===e);return i?{output:Number(null!==(n=i.output_token_discount_price)&&void 0!==n?n:i.outputTokenDiscountPrice)||0,outputOriginal:Number(null!==(t=i.output_token_base_price)&&void 0!==t?t:i.outputTokenBasePrice)||0}:null};return(0,i.jsx)("div",{className:s().multimodalSection,children:(0,i.jsx)("div",{className:s().tableWrapper,children:(0,i.jsxs)("table",{className:s().table,children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"/"}),m.map(e=>(0,i.jsx)("th",{children:e.displayName},e.key))]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,a.I8)("src/app/components/ModelDetail/ModelFeatures/MultimodalPricingTable.input","Input")}),m.map(e=>{let n=g(e.key);return n?(0,i.jsx)("td",{children:h(n.input,n.inputOriginal)},e.key):(0,i.jsx)("td",{children:"/"},e.key)})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:(0,a.I8)("src/app/components/ModelDetail/ModelFeatures/MultimodalPricingTable.output","Output")}),m.map(e=>{let n=_(e.key);return n?(0,i.jsx)("td",{children:h(n.output,n.outputOriginal)},e.key):(0,i.jsx)("td",{children:"/"},e.key)})]})]})]})})})}},97172:function(e,n,t){"use strict";var i,a;function r(e,n){return"string"==typeof n&&n.length>500&&(e.endsWith("_file")||/data:image\/\w+;base64/.test(n))?"".concat(n.slice(0,500),"..."):"".concat(n)}function o(e){return e?e.replace(/\r\n|\r|\n/g,"\\n"):e}function s(e,n,t){return e.replace(/{{([\w.]+)}}/g,(e,i)=>{var a,s;if(Array.isArray(t[i])&&"string"==typeof t[i][0]){let e=t[i].map(e=>'"'.concat(r(i,e),'"')).join(", "),a=t[i].map(e=>"'".concat(r(i,e),"'")).join(", ");return"go"===n?"[]string{".concat(e,"}"):"python"===n?"[".concat(a,"]"):"[".concat(e,"]")}if("prompt"===i){if(t.lora&&Array.isArray(t.lora)&&"javascript"!==n){let e=t.lora.map(e=>"<".concat(e.model_name,":").concat(e.strength,">")),n=o(t[i]);
1return e.forEach(e=>{n.includes(e)||(n+=", ".concat(e))}),n}return o(t[i])}if("txt2video_prompts"===i&&Array.isArray(t.txt2video_prompts)){let e=t.txt2video_prompts.map(e=>'{ prompt: "'.concat(e.prompt,'", frames: ').concat(e.frames," }")).join(", ");return"[".concat(e,"]")}if("loras"===i)return Array.isArray(t[i])?JSON.stringify(t[i].filter(e=>!!e.modelName).map(e=>({model_name:e.modelName,strength:e.strength}))):"[]";if("embeddings"===i)return Array.isArray(t[i])?JSON.stringify(t[i].filter(e=>!!e.modelName).map(e=>({model_name:e.modelName}))):"[]";if("sd_refiner.switch_at"===i)return null===(a=t.sd_refiner)||void 0===a?void 0:a.switchAt;if("controlnet"===i)return Array.isArray(null===(s=t[i])||void 0===s?void 0:s.units)?JSON.stringify(t[i].units.map(e=>({model_name:e.modelName,image_base64:r("image_base64",e.imageBase64),strength:e.strength,preprocessor:e.preprocessor,guidance_start:e.guidanceStart,guidance_end:e.guidanceEnd}))):"{}";if("ip_adapters"===i)return Array.isArray(t[i])?JSON.stringify(t[i].map(e=>({model_name:e.modelName,image_base64:r("image_base64",e.imageBase64),strength:e.strength}))):"[]";let l="";return void 0!==t[i]&&(l="string"==typeof t[i]?r(i,o(t[i])).replace(/\n/g,"\\n"):t[i]),l})}function l(e,n){if(!e)return 0;let t=e.split("\n");for(let e=0;e<t.length;e++)if(t[e].includes("{{".concat(n,"}}")))return e+1;return 0}t.d(n,{$E:function(){return s},Lm:function(){return i},of:function(){return l}}),(a=i||(i={})).JAVASCRIPT="javascript",a.PYTHON="python",a.GOLANG="go",a.BASH="bash"},47883:function(e,n,t){"use strict";t.d(n,{U:function(){return s},H:function(){return o}}),t(94672).qk.HOME;var i=t(97172),a=t(6166);let r=[{info:a.ZP.LCM_TXT2IMG,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK } from "novita-sdk";\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n prompt: "{{prompt}}",\n width: 512,\n height: 512,\n image_num: {{image_num}},\n steps: 8,\n guidance_scale: 2,\n};\nnovitaClient.lcmTxt2Img(params)\n .then((res) => {\n console.log("finished!", res.images);\n })\n .catch((err) => {\n console.error("error:", err);\n })'},{lang:i.Lm.PYTHON,code:'import os\n\nfrom novita_client import *\nfrom novita_client.utils import save_image, read_image_to_base64, base64_to_image\n\nclient = NovitaClient("your_api_key")\nres = client.lcm_txt2img(\n prompt="{{prompt}}",\n width=512,\n height=512,\n steps=8,\n image_num={{image_num}},\n)\n\nimages = [base64_to_image(img.image_file) for img in res.images]'},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/lcm-txt2img \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n"prompt":"{{prompt}}",\n"width":512,\n"height":512,\n"image_num":{{image_num}},\n"steps":8,\n"guidance_scale":2\n}\'\n'}]},{info:a.ZP.LCM_IMG2IMG,sampleCode:[]},{info:a.ZP.WAN_2_6_T2V,sampleCode:[{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/async/wan2.6-t2v \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n "input": {\n "prompt": "{{prompt}}"\n },\n "parameters": {\n "size": "{{size}}",\n "duration": {{duration}}\n }\n}\'\n\ncurl \\\n-X GET https://api.novita.ai/v3/async/task-result?task_id=$task_id \\\n-H "Authorization: Bearer $your_api_key"\n'}]},{info:a.ZP.WAN_2_6_I2V,sampleCode:[{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/async/wan2.6-i2v \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n "input": {\n "prompt": "{{prompt}}",\n "img_url": "{{img_url}}"\n },\n "parameters": {\n "resolution": "{{resolution}}",\n "duration": {{duration}}\n }\n}\'\n\ncurl \\\n-X GET https://api.novita.ai/v3/async/task-result?task_id=$task_id \\\n-H "Authorization: Bearer $your_api_key"\n'}]},{info:a.ZP.WAN_2_6_V2V,sampleCode:[{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/async/wan2.6-v2v \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n "input": {\n "prompt": "{{prompt}}",\n "reference_video_urls": ["{{reference_video_urls}}"]\n },\n "parameters": {\n "size": "{{size}}",\n "duration": {{duration}}\n }\n}\'\n\ncurl \\\n-X GET https://api.novita.ai/v3/async/task-result?task_id=$task_id \\\n-H "Authorization: Bearer $your_api_key"\n'}]}
1,{info:a.ZP.IMG2VIDEO,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK, TaskStatus } from "novita-sdk";\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n model_name: "{{model_name}}",\n image_file: "{{image_file}}",\n frames_num: {{frames_num}},\n frames_per_second: {{frames_per_second}},\n seed: {{seed}},\n image_file_resize_mode: "{{image_file_resize_mode}}",\n steps: {{steps}},\n};\nnovitaClient.img2Video(params)\n .then((res) => {\n if (res && res.task_id) {\n const timer = setInterval(() => {\n novitaClient.progress({\n task_id: res.task_id,\n })\n .then((progressRes) => {\n if (progressRes.task.status === TaskStatus.SUCCEED) {\n console.log("finished!", progressRes.videos);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.FAILED) {\n console.warn("failed!", progressRes.task.reason);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.QUEUED) {\n console.log("queueing");\n }\n })\n .catch((err) => {\n console.error("progress error:", err);\n })\n }, 1000);\n }\n })\n .catch((err) => {\n console.error("img2video error:", err);\n })'},{lang:i.Lm.PYTHON,code:'import os\nfrom novita_client import NovitaClient\nfrom novita_client.utils import base64_to_image\n\nclient = NovitaClient("your_api_key")\n\nres = client.img2video(\n model_name="{{model_name}}",\n image="{{image_file}}",\n frames_num={{frames_num}},\n frames_per_second={{frames_per_second}},\n seed={{seed}},\n image_file_resize_mode="{{image_file_resize_mode}}",\n steps={{steps}}\n)\nwith open("test.mp4", "wb") as f:\n f.write(res.video_bytes[0])'},{lang:i.Lm.BASH,code:'curl \\\n--location "https://api.novita.ai/v3/async/img2video" -H "Authorization: Bearer $your_api_key" -H "Content-Type: application/json" --data "{\n "model_name": "{{model_name}}",\n "image_file": "{{image_file}}",\n "frames_num": {{frames_num}},\n "frames_per_second": {{frames_per_second}},\n "seed": {{seed}},\n "image_file_resize_mode": "{{image_file_resize_mode}}",\n "steps": {{steps}}\n}"\n\ncurl \\\n-X GET https://api.novita.ai/v3/async/task-result?task_id=$task_id \\\n-H "Authorization: Bearer $your_api_key"\n'}]},{info:a.ZP.OUTPAINTING,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK } from "novita-sdk";\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n image_file: "{{image_file}}",\n width: {{width}},\n height: {{height}},\n center_x: {{center_x}},\n center_y: {{center_y}},\n};\nnovitaClient.outpainting(params)\n .then((res) => {\n console.log("finished!", res);\n })\n .catch((err) => {\n console.error("error:", err);\n })'},{lang:i.Lm.PYTHON,code:'import os\n\nfrom novita_client import NovitaClient\nfrom novita_client.utils import base64_to_image\n\nclient = NovitaClient("your_api_key")\nres = client.outpainting(\n image="{{image_file}}",\n width={{width}},\n height={{height}},\n center_x={{center_x}},\n center_y={{center_y}},\n)\nbase64_to_image(res.image_file).save("./outpainting.png")'},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/outpainting \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n"image_file": "{{image_file}}",\n"width": "{{width}}",\n"height": "{{height}}",\n"center_x": "{{center_x}}",\n"center_y": "{{center_y}}"\n}\'\n'}]},{info:a.ZP.MIX_POSE,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK } from "novita-sdk";\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n image_file: "{{image_file}}",\n pose_image_file: "{{pose_image_file}}",\n};\nnovitaClient.mixpose(params)\n .then((res) => {\n console.log("finished!", res);\n })\n .catch((err) => {\n console.error("error:", err);\n })'},{lang:i.Lm.PYTHON,code:'import os\n\nfrom novita_client import NovitaClient\nfrom novita_client.utils import base64_to_image\n\nclient = NovitaClient("your_api_key")\nres = client.mixpose(\n image_file="{{image_file}}",\n pose_image_file="{{pose_image_file}}",\n)\n\nbase64_to_image(res.image_file).save("./mixpose.png")'},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/mix-pose \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n"image_file": "{{image_file}}",\n"pose_image_file": "{{pose_image_file}}"\n}\'\n'}]},{info:a.ZP.DOODLE,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK } from "novita-sdk";
1\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n image_file: "{{image_file}}",\n prompt: "{{prompt}}",\n similarity: {{similarity}},\n};\nnovitaClient.doodle(params)\n .then((res) => {\n console.log("finished!", res);\n })\n .catch((err) => {\n console.error("error:", err);\n })'},{lang:i.Lm.PYTHON,code:'import os\n\nfrom novita_client import NovitaClient\nfrom novita_client.utils import base64_to_image\n\nclient = NovitaClient("your_api_key")\nres = client.doodle(\n image="{{image_file}}",\n prompt="{{prompt}}",\n similarity={{similarity}},\n)\n\nbase64_to_image(res.image_file).save("./doodle.png")'},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/doodle \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n"image_file": "{{image_file}}",\n"prompt": "{{prompt}}",\n"similarity": "{{similarity}}"\n}\'\n'}]},{info:a.ZP.REPLACE_SKY,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK } from "novita-sdk";\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n image_file: "{{image_file}}",\n sky: "{{sky}}",\n};\nnovitaClient.replaceSky(params)\n .then((res) => {\n console.log("finished!", res);\n })\n .catch((err) => {\n console.error("error:", err);\n })'},{lang:i.Lm.PYTHON,code:'import os\n\nfrom novita_client import NovitaClient\nfrom novita_client.utils import base64_to_image\n\nclient = NovitaClient("your_api_key")\nres = client.replace_sky(\n image_file="{{image_file}}",\n sky="{{sky}}",\n)\n\nbase64_to_image(res.image_file).save("./replace_sky.png")'},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/replace-sky \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n"image_file": "{{image_file}}",\n"sky": "{{sky}}"\n}\'\n'}]},{info:a.ZP.REPLACE_OBJECT,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK, TaskStatus } from "novita-sdk";\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n image_file: "{{image_file}}",\n object_prompt: "{{object_prompt}}",\n prompt: "{{prompt}}",\n negative_prompt: "{{negative_prompt}}",\n};\nnovitaClient.replaceObject(params)\n .then((res) => {\n if (res && res.task_id) {\n const timer = setInterval(() => {\n novitaClient.progress({\n task_id: res.task_id,\n })\n .then((progressRes) => {\n if (progressRes.task.status === TaskStatus.SUCCEED) {\n console.log("finished!", progressRes.images);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.FAILED) {\n console.warn("failed!", progressRes.task.reason);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.QUEUED) {\n console.log("queueing");\n }\n })\n .catch((err) => {\n console.error("progress error:", err);\n })\n }, 1000);\n }\n })\n .catch((err) => {\n console.error("error:", err)\n })'},{lang:i.Lm.PYTHON,code:'import os\n\nfrom novita_client import NovitaClient\nfrom novita_client.utils import base64_to_image\n\nclient = NovitaClient("your_api_key")\nres = client.replace_object(\n image_file="{{image_file}}",\n object_prompt="{{object_prompt}}",\n prompt="{{prompt}}",\n negative_prompt="{{negative_prompt}}",\n)\nbase64_to_image(res.image_file).save("./replace_object.png")'},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/replace-object \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n"image_file": "{{image_file}}",\n"object_prompt": "{{object_prompt}}",\n"prompt": "{{prompt}}",\n"negative_prompt": "{{negative_prompt}}"\n}\'\n\ncurl \\\n-X GET https://api.novita.ai/v3/async/task-result?task_id=$task_id \\\n-H "Authorization: Bearer $your_api_key"\n'}]},{info:a.ZP.REMOVE_WATERMARK,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK } from "novita-sdk";
1\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n image_file: "{{image_file}}",\n};\nnovitaClient.removeWatermark(params)\n .then((res) => {\n console.log("finished!", res);\n })\n .catch((err) => {\n console.error("error:", err);\n })'},{lang:i.Lm.PYTHON,code:'import os\n\nfrom novita_client import NovitaClient\nfrom novita_client.utils import base64_to_image\n\nclient = NovitaClient("your_api_key")\nres = client.remove_watermark(\n image="{{image_file}}"\n)\n\nbase64_to_image(res.image_file).save("./remove_watermark.png")'},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/remove-watermark \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n"image_file": "{{image_file}}"\n}\'\n'}]},{info:a.ZP.RESTORE_FACE,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK } from "novita-sdk"\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n image_file: "{{image_file}}",\n fidelity: {{fidelity}},\n};\nnovitaClient.restoreFace(params)\n .then((res) => {\n console.log("finished!", res);\n })\n .catch((err) => {\n console.error("error:", err);\n })'},{lang:i.Lm.PYTHON,code:'import os\n\nfrom novita_client import NovitaClient\nfrom novita_client.utils import base64_to_image\n\nclient = NovitaClient("your_api_key")\nres = client.restore_face(\n image="{{image_file}}"\n fidelity={{fidelity}}\n)\n\nbase64_to_image(res.image_file).save("./restore_face.png")'},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/restore_face \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n"image_file": "{{image_file}}",\n"fidelity": {{fidelity}}\n}\'\n'}]},{info:a.ZP.REIMAGINE,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK } from "novita-sdk";\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n image_file: "{{image_file}}",\n};\nnovitaClient.reimagine(params)\n .then((res) => {\n console.log("finished!", res);\n })\n .catch((err) => {\n console.error("error:", err);\n })'},{lang:i.Lm.PYTHON,code:'import os\n\nfrom novita_client import NovitaClient\nfrom novita_client.utils import base64_to_image\n\nclient = NovitaClient("your_api_key")\nres = client.reimagine(\n image="{{image_file}}"\n)\n\nbase64_to_image(res.image_file).save("./reimagine.png")'},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/reimagine \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n"image_file": "{{image_file}}"\n}\'\n'}]},{info:a.ZP.UPSCALE,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK, TaskStatus } from "novita-sdk";\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n request: {\n model_name: "{{model_name}}",\n image_base64: "{{image_base64}}",\n scale_factor: "{{scale_factor}}",\n }\n};\nnovitaClient.upscaleV3(params)\n .then((res) => {\n if (res && res.task_id) {\n const timer = setInterval(() => {\n novitaClient.progress({\n task_id: res.task_id,\n })\n .then((progressRes) => {\n if (progressRes.task.status === TaskStatus.SUCCEED) {\n console.log("finished!", progressRes.images);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.FAILED) {\n console.warn("failed!", progressRes.task.reason);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.QUEUED) {\n console.log("queueing");\n }\n })\n .catch((err) => {\n console.error("progress error:", err);\n })\n }, 1000);\n }\n })\n .catch((err) => {\n console.error("error:", err);\n })'},{lang:i.Lm.PYTHON,code:""},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/async/upscale \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n "request": {\n "model_name":"{{model_name}}",\n "image_base64":"{{image_base64}}",\n "scale_factor": "{{scale_factor}}"\n }\n }\'\n\ncurl \\\n-X GET https://api.novita.ai/v3/async/task-result?task_id=$task_id \\\n-H "Authorization: Bearer $your_api_key"\n'}]},{info:a.ZP.TILE,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK } from "novita-sdk";
1\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n prompt: "{{prompt}}",\n negative_prompt: "{{negative_prompt}}",\n width: {{width}},\n height: {{height}},\n};\nnovitaClient.createTile(params)\n .then((res) => {\n console.log("finished!", res);\n })\n .catch((err) => {\n console.error("error:", err);\n })'},{lang:i.Lm.PYTHON,code:'import os\n\nfrom novita_client import NovitaClient\nfrom novita_client.utils import base64_to_image\n\nclient = NovitaClient("your_api_key")\nres = client.create_tile(\n prompt="{{prompt}}",\n negative_prompt="{{negative_prompt}}",\n width={{width}},\n height={{height}},\n)\n\nbase64_to_image(res.image_file).save("./tile.png")'},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/create-tile \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n"prompt": "{{prompt}}",\n"negative_prompt": "{{negative_prompt}}",\n"width": "{{width}}",\n"height": "{{height}}",\n}\'\n'}]},{info:a.ZP.SDXL,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK, TaskStatus } from "novita-sdk";\n\nconst novitaClient = new NovitaSDK("your_api_key");\nconst params = {\n request: {\n model_name: "{{model_name}}",\n prompt: "{{prompt}}",\n negative_prompt: "{{negative_prompt}}",\n width: {{width}},\n height: {{height}},\n sampler_name: "{{sampler_name}}",\n guidance_scale: {{guidance_scale}},\n steps: {{steps}},\n image_num: {{batch_size}},\n clip_skip: {{clip_skip}},\n seed: {{seed}},\n loras: {{loras}},\n },\n};\nnovitaClient.txt2ImgV3(params)\n .then((res) => {\n if (res && res.task_id) {\n const timer = setInterval(() => {\n novitaClient.progress({\n task_id: res.task_id,\n })\n .then((progressRes) => {\n if (progressRes.task.status === TaskStatus.SUCCEED) {\n console.log("finished!", progressRes.images);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.FAILED) {\n console.warn("failed!", progressRes.task.reason);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.QUEUED) {\n console.log("queueing");\n }\n })\n .catch((err) => {\n console.error("progress error:", err);\n })\n }, 1000);\n }\n })\n .catch((err) => {\n console.error("txt2Img error:", err);\n })'},{lang:i.Lm.PYTHON,code:"import os\nfrom novita_client import NovitaClient, Samplers, Txt2ImgV3HiresFix\nfrom novita_client.utils import base64_to_image\n\nfrom PIL import Image\n\nclient = NovitaClient(\"your_api_key\")\nres = client.txt2img_v3(\n model_name='{{model_name}}',\n prompt='{{prompt}}',\n width={{width}},\n height={{height}},\n image_num={{batch_size}},\n guidance_scale={{guidance_scale}},\n seed={{seed}},\n sampler_name='{{sampler_name}}',\n)\n\nbase64_to_image(res.images_encoded[0]).save(\"./txt2img.png\")"},{lang:i.Lm.BASH,code:'curl \\\n-X POST https://api.novita.ai/v3/async/txt2img \\\n-H "Authorization: Bearer $your_api_key" \\\n-H "Content-Type: application/json" \\\n-d \'{\n "request": {\n "model_name":"{{model_name}}",\n "prompt":"{{prompt}}",\n "negative_prompt":"{{negative_prompt}}",\n "width":{{width}},\n "height":{{height}},\n "sampler_name":"{{sampler_name}}",\n "guidance_scale":{{guidance_scale}},\n "steps":{{steps}},\n "image_num":{{batch_size}},\n "clip_skip":{{clip_skip}},\n "seed":{{seed}}\n }\n}\'\n\ncurl \\\n-X GET https://api.novita.ai/v3/async/task-result?task_id=$task_id \\\n-H "Authorization: Bearer $your_api_key"\n'}]},{info:a.ZP.MOTIONSYNC,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK, TaskStatus } from "novita-sdk";\n\nconst novitaClient = new NovitaSDK("your_api_key");\n\nPromise.all([\n novitaClient.upload({\n data: [Blob],\n type: "image",\n }).then((res) => res.assets_id),\n novitaClient.upload({\n data: [Blob],\n type: "video",\n }).then((res) => res.assets_id),\n]).then((assetIds) =>
1 {\n const params = {\n image_assets_id: assetIds[0],\n motion_video_assets_id: assetIds[1],\n seed: {{seed}},\n };\n novitaClient.img2VideoMotion(params)\n .then((res) => {\n if (res && res.task_id) {\n const timer = setInterval(() => {\n novitaClient.progress({\n task_id: res.task_id,\n })\n .then((progressRes) => {\n if (progressRes.task.status === TaskStatus.SUCCEED) {\n console.log("finished!", progressRes.videos);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.FAILED) {\n console.warn("failed!", progressRes.task.reason);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.QUEUED) {\n console.log("queueing");\n }\n if (progressRes.task.status === TaskStatus.PROCESSING) {\n console.log("processing");\n }\n })\n .catch((err) => {\n console.error("progress error:", err);\n })\n }, 1000);\n }\n })\n .catch((err) => {\n console.error("img2video-motion error:", err);\n })\n})\n'},{lang:i.Lm.PYTHON,code:""},{lang:i.Lm.BASH,code:'\nimg_assets_id=$(curl \\\n-X PUT --data-binary "@/path/to/your/image/file" https://assets.novitai.com/image \\\n| jq -r \'.assets_id\')\n\nvideo_assets_id=$(curl \\\n-X PUT --data-binary "@/path/to/your/video/file" https://assets.novitai.com/video \\\n| jq -r \'.assets_id\')\n\ntask_id=$(curl \\\n--location "https://api.novita.ai/v3/async/img2video" \\\n--header "Authorization: Bearer $your_api_key" \\\n--header "Content-Type: application/json" \\\n--data "{\n \\"image_assets_id\\": $img_assets_id,\n \\"motion_video_assets_id\\": $video_assets_id,\n \\"seed\\": {{seed}}\n}" | jq -r \'.task_id\')\n\ncurl \\\n-X GET https://api.novita.ai/v3/async/task-result?task_id=$task_id \\\n-H "Authorization: Bearer $your_api_key"\n'}]},{info:a.ZP.ANIMATE_ANYONE,sampleCode:[{lang:i.Lm.JAVASCRIPT,code:'import { NovitaSDK, TaskStatus } from "novita-sdk";\n\nconst novitaClient = new NovitaSDK("your_api_key");\n\nPromise.all([\n novitaClient.upload({\n data: [Blob],\n type: "image",\n }).then((res) => res.assets_id),\n novitaClient.upload({\n data: [Blob],\n type: "video",\n }).then((res) => res.assets_id),\n]).then((assetIds) => {\n const params = {\n image_assets_id: assetIds[0],\n motion_video_assets_id: assetIds[1],\n seed: {{seed}},\n width: {{width}},\n height: {{height}},\n steps: {{steps}},\n };\n novitaClient.img2VideoMotion(params)\n .then((res) => {\n if (res && res.task_id) {\n const timer = setInterval(() => {\n novitaClient.progress({\n task_id: res.task_id,\n })\n .then((progressRes) => {\n if (progressRes.task.status === TaskStatus.SUCCEED) {\n console.log("finished!", progressRes.videos);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.FAILED) {\n console.warn("failed!", progressRes.task.reason);\n clearInterval(timer);\n }\n if (progressRes.task.status === TaskStatus.QUEUED) {\n console.log("queueing");\n }\n if (progressRes.task.status === TaskStatus.PROCESSING) {\n console.log("processing");\n }\n })\n .catch((err) => {\n console.error("progress error:", err);\n })\n }, 1000);\n }\n })\n .catch((err) => {\n console.error("img2video-motion error:", err);\n })\n})\n'},{lang:i.Lm.PYTHON,code:""},{lang:i.Lm.BASH,code:'\nimg_assets_id=$(curl \\\n-X PUT --data-binary "@/path/to/your/image/file" https://assets.novitai.com/image \\\n| jq -r \'.assets_id\')\n\nvideo_assets_id=$(curl \\\n-X PUT --data-binary "@/path/to/your/video/file" https://assets.novitai.com/video \\\n| jq -r \'.assets_id\')\n\ntask_id=$(curl \\\n--location "https://api.novita.ai/v3/async/img2video" \\\n--header "Authorization: Bearer $your_api_key" \\\n--header "Content-Type: application/json" \\\n--data "{\n \\"image_assets_id\\"
1: $img_assets_id,\n \\"motion_video_assets_id\\": $video_assets_id,\n \\"seed\\": {{seed}}\n \\"width\\": {{width}},\n \\"height\\": {{height}},\n \\"steps\\": {{steps}},\n}" | jq -r \'.task_id\')\n\ncurl \\\n-X GET https://api.novita.ai/v3/async/task-result?task_id=$task_id \\\n-H "Authorization: Bearer $your_api_key"\n'}]}];function o(){return new Promise(e=>{e(r)})}function s(e,n){return!(!e.productpageReady&&"product"===n||!e.playgroundReady&&"playground"===n||a.yf.includes(e.name))}},71683:function(e,n,t){"use strict";t.d(n,{default:function(){return eQ}});var i=t(57437),a=t(99603),r=t(2265),o=t(72301),s=t(34174),l=t(93797),c=t(27120),d=t(39455),p=t(99485),u=t(7768),m=t(97224),h=t(25565),g=t(6166),_=t(84953),x=t(94672),v=t(3237),f=t(91098),b=t(88183),N=t(29233),j=t(33531),P=t.n(j),I=t(99051),y=t.n(I),S=t(75618),w=t(6020),C=t(22557),A=t(86380),M=t.n(A),k=t(47883);let T=(e,n)=>({Standard:[{value:"720P",label:(0,a.I8)("src/app/pricing/components/CalculatorModal.message720p","720P")}],Professional:[{value:"1080P",label:(0,a.I8)("src/app/pricing/components/CalculatorModal.message1080p","1080P")}]})[n]||[],E=()=>[{value:5,label:(0,a.I8)("src/app/pricing/components/CalculatorModal.message5s","5s")}],D=e=>e||"";function V(e){let{copy:n,calcFunc:t,onFuncChange:o,onClose:s}=e,[l,c]=(0,r.useState)({});(0,r.useEffect)(()=>{c((0,m.zn)(t))},[t]);let d=(0,r.useMemo)(()=>[...m.Qq[g.mf.IMG],...m.Qq[g.mf.VIDEO_GENERATOR],...m.Qq[g.mf.TRAINING]].filter(e=>{let n=Object.values(g.ZP).find(n=>n.name===e);return!n||(0,k.U)(n,"product")}).map(e=>({value:e,label:g.Cs[e]})),[]),p=(0,r.useMemo)(()=>{for(let e of Object.getOwnPropertySymbols(m.Qq))if(m.Qq[e].includes(t))return e;return null},[t]),u=(0,r.useMemo)(()=>{switch(p){case g.mf.IMG:return"image";case g.mf.VIDEO_GENERATOR:return"video";case g.mf.TRAINING:return"call";default:return""}},[p]),h=(0,r.useCallback)((e,n)=>{switch(e){case"width":c(e=>({...e,width:Number(n||0)}));break;case"height":c(e=>({...e,height:Number(n||0)}));break;case"steps":c(e=>({...e,steps:Number(n||0)}));break;case"scale":c(e=>({...e,scale:Number(n||0)}));break;case"frames":c(e=>({...e,frames:Number(n||0)}));break;case"mode":c(e=>({...e,mode:n}));break;case"model":c(e=>({...e,model:n}));break;case"duration":c(e=>({...e,duration:Number(n||0)}));break;case"resolutionType":c(e=>({...e,resolutionType:n}))}},[]);return(0,i.jsx)(C.Z,{destroyOnClose:!0,open:!!t,title:(0,a.I8)("src/app/pricing/components/CalculatorModal.pricingCalculator","Pricing Calculator"),onCancel:s,footer:null,children:(0,i.jsxs)("div",{className:M().calc_modal_content,children:[(0,i.jsx)("p",{className:M().item_label,children:(0,a.I8)("src/app/pricing/components/CalculatorModal.apiName","API Name")}),(0,i.jsx)(w.j,{defaultValue:t,onChange:e=>{c({}),o(e)},options:d}),void 0!==l.width&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:M().item_label,children:(0,a.I8)("src/app/pricing/components/CalculatorModal.width","Width")}),(0,i.jsx)(S.Y,{value:l.width,min:l.minWidth,max:l.maxWidth,onChange:e=>h("width",e)})]}),void 0!==l.height&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:M().item_label,children:(0,a.I8)("src/app/pricing/components/CalculatorModal.height","Height")}),(0,i.jsx)(S.Y,{value:l.height,min:l.minHeight,max:l.maxHeight,onChange:e=>h("height",e)})]}),void 0!==l.resolutionType&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:M().item_label,children:(0,a.I8)("src/app/pricing/components/CalculatorModal.resolution","Resolution")}),(0,i.jsx)(w.j,{defaultValue:l.resolutionType,options:T(l.model||D(t)||"",l.mode||""),onChange:e=>h("resolutionType",e)})]}),void 0!==l.steps&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:M().item_label,children:(0,a.I8)("src/app/pricing/components/CalculatorModal.steps","Steps")}),(0,i.jsx)(S.Y,{value:l.steps,min:l.minSteps,max:l.maxSteps,onChange:e=>h("steps",e)})]}),void 0!==l.scale&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:M().item_label,children:(0,a.I8)("src/app/pricing/components/CalculatorModal.scale","Scale")}),(0,i.jsx)(S.Y,{value:l.scale,min:l.minScale,max:l.maxScale,onChange:e=>h("scale",e)})]}),void 0!==l.frames&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:M().item_label,children:(0,a.I8)("src/app/pricing/components/CalculatorModal.frames","Frames")}),(0,i.jsx)(S.Y,{value:l.frames,min:l.minFrames,max:l.maxFrames,onChange:e=>h("frames",e)})]}),void 0!==l.duration&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:M().item_label,children:(0,a.I8)("src/app/pricing/components/CalculatorModal.duration","Duration")}),(0,i.jsx)(w.j,{defaultValue:l.duration,options:E(),onChange:e=>h("duration",e)})]}),void 0!==l.mode&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:M().item_label,children:(0,a.I8)("src/app/pricing/components/CalculatorModal.mode","Mode")}),(0,i.jsx)(w.j,{defaultValue:l.mode,options:[{value:"Standard",label:(0,a.I8)("src/app/pricing/components/CalculatorModal.standard","Standard")}],onChange:e=>h("mode",e)})]}),void 0!==l.model&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:M().item_label,children:(0,a.I8)("src/app/pricing/components/CalculatorModal.model","Model")}),(0,i.jsx)(w.j,{defaultValue:l.model,options:[{value:"SVD-XT",label:(0,a.I8)("src/app/pricing/components/CalculatorModal.svdXt","SVD-XT")},{value:"SVD",label:(0,a.I8)("src/app/pricing/components/CalculatorModal.svd","SVD")}],onChange:e=>h("model",e)})]}),t&&(0,i.jsxs)("div",{className:M().price,children:[(0,i.jsx)("span",{children:"Price: "}),(0,i.jsx)("span",{children:"$".concat((0,m.lh)(t,{...l,model:D(t)}).discountPrice)}),(0,i.jsx)("span",{children:" /".concat(u)})]})]})})}var R=t(20824),O=t(52229),F=t(18603),L=t(78695),G=t.n(L),W=t(32713),$=t(35213),B=t(11082),H=t(67011);function Z(e){let{title:n,subtitle:t,fields:a=[],action:r,children:o,className:s,"data-testid":l}=e;return(0,i.jsxs)("article",{"data-testid":l,className:(0,W.cn)("rounded-8 border border-[var(--border-default)] bg-white p-space-16 [box-shadow:none]",s),children:[(0,i.jsxs)("div",{className:"flex items-start justify-between gap-space-12",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h4",{className:"break-words font-miletus text-paragraph-16-medium text-[var(--text-1)]",children:n}),t?(0,i.jsx)("div",{className:"mt-space-4 break-words font-miletus text-paragraph-13 text-[var(--text-3)]",children:t}):null]}),r?(0,i.jsx)("div",{className:"shrink-0",children:r}):null]}),a.length>0?(0,i.jsx)("dl",{className:"mt-space-16 flex flex-col gap-space-12",children:a.map((e,n)=>(0,i.jsxs)("div",{className:"flex flex-col gap-space-4 border-t border-[var(--border-subtle)] pt-space-12 first:border-t-0 first:pt-0",children:[(0,i.jsx)("dt",{className:"font-miletus text-[12px] leading-[16
1px] text-[var(--text-3)]",children:e.label}),(0,i.jsx)("dd",{className:"min-w-0 break-words font-miletus text-paragraph-13 text-[var(--text-1)]",children:e.value})]},n))}):null,o?(0,i.jsx)("div",{className:"mt-space-16",children:o}):null]})}var U=e=>{let{modelName:n,provider:t,sectionId:o,description:s,data:l,className:c,isConsole:d=!1}=e,[u,m]=(0,r.useState)(new Set),h=e=>e.replace(/\//g,"-"),g=e=>{let n=new Set(u);n.has(e)?n.delete(e):n.add(e),m(n)},x=[{title:(0,a.I8)("src/app/pricing/components/ModelSection.modelName","Model Name"),dataIndex:"name"},{title:(0,a.I8)("src/app/pricing/components/ModelSection.context","Context"),dataIndex:"context"},{title:(0,a.I8)("src/app/pricing/components/ModelSection.input","Input"),dataIndex:"input"},{title:(0,a.I8)("src/app/pricing/components/ModelSection.output","Output"),dataIndex:"output"},{title:(0,a.I8)("src/app/pricing/components/ModelSection.actions","Actions"),dataIndex:"operation"}],v=(e,n,t,r,o,s)=>{let l;let c=e=>"$".concat(e," /Mt"),d=e=>"string"==typeof e&&e.length>0,p=e=>{let n=e.pricePerMDecimal;return d(n)?(0,N.So)(e)?(0,i.jsxs)("span",{className:"flex flex-wrap gap-space-4",children:[(0,i.jsx)("span",{className:"text-[var(--brand-1)]",title:(0,f.H1)(n),children:c(n)}),(0,i.jsx)("span",{"data-pricing-role":"original",className:"text-[var(--gray-1)] line-through",title:(0,f.H1)(e.originPricePerMDecimal),children:c(e.originPricePerMDecimal)})]}):(0,i.jsx)("span",{title:(0,f.H1)(n),children:c(n)}):"-"},u=!(0,N.B2)(null==t?void 0:t.pricePerMDecimal),m=!n;if(u)l="-"===e?"-":(0,N.DF)(e)?(0,i.jsx)("span",{"data-pricing-state":"free",className:"w-8 h-5 rounded-[2px] bg-[var(--green-7)] text-[var(--green-2)] font-miletus text-paragraph-12 flex items-center justify-center",children:(0,a.I8)("src/app/pricing/components/ModelSection.free","Free")}):m||n===e?(0,i.jsx)("span",{title:(0,f.H1)(e),children:c(e)}):(0,i.jsxs)("span",{className:"flex flex-wrap gap-space-4",children:[(0,i.jsx)("span",{className:"text-[var(--brand-1)]",title:(0,f.H1)(e),children:c(e)}),(0,i.jsx)("span",{className:"text-[var(--gray-1)] line-through",title:(0,f.H1)(n),children:c(n)})]});else{let r=t.pricePerMDecimal;if((0,N.So)(t)){let o=t.originPricePerMDecimal;l=(0,i.jsxs)("span",{className:"flex flex-wrap flex-col items-start gap-space-4","data-pricing-key":"cache-read",children:[(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:[(0,i.jsx)("span",{title:(0,f.H1)(e),children:c(e)})," ",(0,i.jsx)("span",{className:"text-[var(--text-3)]",children:"\xb7"})," "+(0,a.I8)("src/app/pricing/components/ModelSection.cacheRead-e47778","Cache Read")," ",(0,i.jsx)("span",{title:(0,f.H1)(r),children:c(r)})]}),(0,i.jsxs)("span",{className:"text-[var(--gray-1)] line-through",children:[(0,i.jsx)("span",{title:(0,f.H1)(n),children:c(n)})," ",(0,a.I8)("src/app/pricing/components/ModelSection.cacheRead-08ba9a","\xb7 Cache Read")," ",(0,i.jsx)("span",{title:(0,f.H1)(o),children:c(o)})]})]})}else l=(0,i.jsxs)("span",{className:"flex flex-wrap gap-space-4","data-pricing-key":"cache-read",children:[(0,i.jsx)("span",{className:n?"text-[var(--brand-1)]":"text-[var(--text-1)]",title:(0,f.H1)(e),children:c(e)}),n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"text-[var(--gray-1)] line-through",title:(0,f.H1)(n),children:c(n)})," "]}),(0,i.jsx)("span",{className:"text-[var(--text-3)]",children:"\xb7"})," "+(0,a.I8)("src/app/pricing/components/ModelSection.cacheRead-e47778","Cache Read")," ",(0,i.jsx)("span",{title:(0,f.H1)(r),children:c(r)})]})}return(0,N.B2)(null==r?void 0:r.pricePerMDecimal)||(0,N.B2)(null==o?void 0:o.pricePerMDecimal)||(0,N.B2)(null==s?void 0:s.pricePerMDecimal)?(0,i.jsxs)("div",{className:"flex flex-col gap-space-4",children:[l,(0,N.B2)(null==r?void 0:r.pricePerMDecimal)?(0,i.jsxs)("span",{className:"flex flex-wrap gap-space-4","data-pricing-key":"cache-write-5m",children:[(0,i.jsx)("span",{className:"text-[var(--text-1)]",children:(0,a.I8)("src/app/pricing/components/ModelSection.cacheWrite5m","\xb7 Cache Write(5m)")}),p(r)]}):null,(0,N.B2)(null==o?void 0:o.pricePerMDecimal)?(0,i.jsxs)("span",{className:"flex flex-wrap gap-space-4","data-pricing-key":"cache-write-30m",children:[(0,i.jsx)("span",{className:"text-[var(--text-1)]",children:(0,a.I8)("src/app/pricing/components/ModelSection.cacheWrite30m","\xb7 Cache Write(30m)")}),p(o)]}):null,(0,N.B2)(null==s?void 0:s.pricePerMDecimal)?(0,i.jsxs)("span",{className:"flex flex-wrap gap-space-4","data-pricing-key":"cache-write-1h",children:[(0,i.jsx)("span",{className:"text-[var(--text-1)]",children:(0,a.I8)("src/app/pricing/components/ModelSection.cacheWrite1h","\xb7 Cache Write(1h)")}),p(s)]}):null]}):l},j=e=>(0,N.B2)(null==e?void 0:e.pricePerMDecimal)?v(e.pricePerMDecimal):"-",P="font-miletus text-paragraph-13 text-[var(--text-3)] px-space-12 py-space-8 whitespace-nowrap bg-[var(--fill-4)] border-b border-[var(--border-default)]",I="font-miletus text-paragraph-13 text-[var(--text-1)] px-space-12 py-space-12 whitespace-nowrap";return(0,i.jsxs)("div",{id:o,className:(0,W.cn)(c),"data-testid":t?"pricing-provider-section":void 0,"data-provider":t||void 0,children:[(0,i.jsxs)("div",{className:"flex flex-col gap-space-12 md:hidden",children:[(0,i.jsxs)("div",{className:"rounded-8 bg-white p-space-16 [box-shadow:none]",children:[(0,i.jsxs)("div",{className:"flex items-start gap-space-8",children:[t&&(0,i.jsx)($.Z,{modelName:t,preferVendor:!0,vendorName:t,size:24}),(0,i.jsx)("span",{className:"font-miletus text-paragraph-16-medium text-[var(--text-1)]",children:n})]}),(0,i.jsx)("p",{className:"mt-space-8 font-miletus text-paragraph-12 text-[var(--text-3)]",children:s||"--"})]}),l.map((e,n)=>{let t=e.id?"/models/model-detail/".concat(h(e.id),"?from=pricing"):"/models",r=u.has(n),o=!0===e.isTieredBilling,s=!0===e.isOmnimodal,l=o?(0,i.jsxs)("button",{"data-action":"toggle-tiered-pricing",className:"inline-flex items-center gap-space-4 cursor-pointer text-[var(--brand-0)] hover:opacity-80 transition-opacity",onClick:()=>g(n),"aria-expanded":r,"aria-label":(0,a.I8)("src/app/pricing/components/ModelSection.showTieredPricing","Show tiered pricing"),children:[(0,i.jsx)("span",{children:e.output}),(0,i.jsx)(B.Z,{size:12,className:(0,W.cn)("transition-transform text-[var(--brand-0)] flex-shrink-0",r&&"rotate-180")}
1)]}):s?(0,i.jsxs)("button",{"data-action":"toggle-omnimodal-pricing",className:"inline-flex items-center gap-space-4 cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>g(n),"aria-expanded":r,"aria-label":(0,a.I8)("src/app/pricing/components/ModelSection.showOmnimodalPricing","Show omnimodal pricing"),children:[(0,i.jsx)("span",{className:(0,W.cn)("transition-colors font-miletus text-paragraph-13",r?"text-[var(--brand-1)]":"text-[var(--text-1)]"),children:(0,a.I8)("src/app/pricing/components/ModelSection.omnimodal","Omnimodal")}),(0,i.jsx)(B.Z,{size:12,className:(0,W.cn)("transition-all flex-shrink-0",r?"text-[var(--brand-1)] rotate-180":"text-[var(--text-1)]")})]}):v(e.output,e.originalOutput);return(0,i.jsxs)(Z,{"data-testid":"model-section-mobile-card",title:(0,i.jsx)(p.default,{href:t,className:"hover:text-[var(--brand-0)] transition-colors",children:e.name}),action:(0,i.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"font-miletus text-paragraph-13 text-[var(--text-1)] hover:opacity-70 transition-opacity",children:(0,a.I8)("src/app/pricing/components/ModelSection.more","More")}),fields:[{label:(0,a.I8)("src/app/pricing/components/ModelSection.context","Context"),value:(0,i.jsx)("span",{title:(0,f.H1)(e.context),children:(0,b.vo)(e.context)})},{label:(0,a.I8)("src/app/pricing/components/ModelSection.input","Input"),value:o||s?"-":v(e.input,e.originalInput,e.cacheReadPricing,e.cacheWrite5mPricing,e.cacheWrite30mPricing,e.cacheWrite1hPricing)},{label:(0,a.I8)("src/app/pricing/components/ModelSection.output","Output"),value:l}],children:[o&&r&&e.tieredBillingConfigs?(0,i.jsx)("div",{className:"overflow-x-auto rounded-6 bg-[var(--fill-4)] p-space-8",children:(0,i.jsx)(_.iA,{className:(0,W.cn)(G().table_wrap,"min-w-max"),children:(()=>{let n=e.tieredBillingConfigs,t=n.some(e=>e.output_min_tokens||e.output_max_tokens),r=n.some(e=>{var n;return(0,N.B2)(null===(n=e.cache_creation_input_pricing)||void 0===n?void 0:n.pricePerMDecimal)}),o=n.some(e=>{var n;return(0,N.B2)(null===(n=e.cache_creation_30_minutes_input_pricing)||void 0===n?void 0:n.pricePerMDecimal)}),s=n.some(e=>{var n;return(0,N.B2)(null===(n=e.cache_creation_1_hour_input_pricing)||void 0===n?void 0:n.pricePerMDecimal)}),l=n.some(e=>{var n;return(0,N.B2)(null===(n=e.cache_read_input_pricing)||void 0===n?void 0:n.pricePerMDecimal)}),c=(0,W.cn)(P),d=(0,W.cn)(G().table_cell,I);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_.xD,{children:(0,i.jsxs)(_.SC,{children:[(0,i.jsx)(_.ss,{className:c,children:(0,a.I8)("src/app/pricing/components/ModelSection.inputLength","Input length")}),t&&(0,i.jsx)(_.ss,{className:c,children:(0,a.I8)("src/app/pricing/components/ModelSection.outputLength","Output length")}),(0,i.jsx)(_.ss,{className:c,children:(0,a.I8)("src/app/pricing/components/ModelSection.inputPriceMtokens","Input price (Mtokens)")}),(0,i.jsx)(_.ss,{className:c,children:(0,a.I8)("src/app/pricing/components/ModelSection.outputPriceMtokens","Output Price (Mtokens)")}),r&&(0,i.jsx)(_.ss,{className:c,"data-pricing-key":"cache-write-5m",children:(0,a.I8)("src/app/pricing/components/ModelSection.cachedWrites5m","Cached writes(5m)")}),o&&(0,i.jsx)(_.ss,{className:c,"data-pricing-key":"cache-write-30m",children:(0,a.I8)("src/app/pricing/components/ModelSection.cachedWrites30m","Cached writes(30m)")}),s&&(0,i.jsx)(_.ss,{className:c,"data-pricing-key":"cache-write-1h",children:(0,a.I8)("src/app/pricing/components/ModelSection.cachedWrites1h","Cached writes(1h)")}),l&&(0,i.jsx)(_.ss,{className:c,"data-pricing-key":"cache-read",children:(0,a.I8)("src/app/pricing/components/ModelSection.cachedReads","Cached reads")})]})}),(0,i.jsx)(_.RM,{className:"bg-white",children:n.map((e,n)=>(0,i.jsxs)(_.SC,{children:[(0,i.jsxs)(_.pj,{className:d,children:["[",e.min_tokens.toLocaleString("en-US")," -"," ",-1===e.max_tokens?"∞":e.max_tokens.toLocaleString("en-US"),")"]}),t&&(0,i.jsxs)(_.pj,{className:d,children:["[",e.output_min_tokens.toLocaleString("en-US")," ","-"," ",-1!==e.output_max_tokens&&e.output_max_tokens?(e.output_max_tokens||0).toLocaleString("en-US"):"∞",")"]}),(0,i.jsx)(_.pj,{className:d,children:v(e.input_pricing.pricePerMDecimal||"-")}),(0,i.jsx)(_.pj,{className:d,children:v(e.output_pricing.pricePerMDecimal||"-")}),r&&(0,i.jsx)(_.pj,{className:d,"data-pricing-key":"cache-write-5m",children:j(e.cache_creation_input_pricing)}),o&&(0,i.jsx)(_.pj,{className:d,"data-pricing-key":"cache-write-30m",children:j(e.cache_creation_30_minutes_input_pricing)}),s&&(0,i.jsx)(_.pj,{className:d,"data-pricing-key":"cache-write-1h",children:j(e.cache_creation_1_hour_input_pricing)}),l&&(0,i.jsx)(_.pj,{className:d,"data-pricing-key":"cache-read",children:j(e.cache_read_input_pricing)})]},n))})]})})()})}
1):null,s&&r&&e.multimodalPricing?(0,i.jsx)("div",{className:"rounded-6 bg-[var(--fill-4)] p-space-8",children:(0,i.jsx)(H.Z,{pricing:e.multimodalPricing,currencySymbol:"$",unit:"Mt"})}):null]},n)})]}),(0,i.jsxs)("div",{className:"hidden gap-space-16 items-start bg-white rounded-8 p-space-16 [box-shadow:none] md:flex",children:[(0,i.jsxs)("div",{className:"flex-shrink-0 w-[170px] flex flex-col gap-space-8 p-space-8",children:[(0,i.jsxs)("div",{className:"flex items-start gap-space-8",children:[t&&(0,i.jsx)($.Z,{modelName:t,preferVendor:!0,vendorName:t,size:24}),(0,i.jsx)("span",{className:"font-miletus text-paragraph-16 text-[var(--text-1)]",children:n})]}),(0,i.jsx)("p",{className:"font-miletus text-paragraph-12 text-[var(--text-3)]",children:s||"--"})]}),(0,i.jsx)("div",{className:"flex-1 overflow-hidden [box-shadow:none]",children:(0,i.jsx)("div",{className:"overflow-x-auto",children:(0,i.jsxs)(_.iA,{className:G().table_wrap,children:[(0,i.jsx)(_.xD,{children:(0,i.jsx)(_.SC,{className:"h-[48px]",children:x.map(e=>(0,i.jsx)(_.ss,{className:(0,W.cn)(P,"name"===e.dataIndex?"w-[250px]":"","context"===e.dataIndex?"w-[110px]":"","input"
1===e.dataIndex?"w-[250px]":"","output"===e.dataIndex?"w-[140px]":"","operation"===e.dataIndex?"w-[83px] text-right":""),children:e.title},e.dataIndex))})}),(0,i.jsx)(_.RM,{children:l.map((e,n)=>{let t=e.id?"/models/model-detail/".concat(h(e.id),"?from=pricing"):"/models",o=u.has(n),s=!0===e.isTieredBilling,l=!0===e.isOmnimodal;return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsxs)(_.SC,{className:(0,W.cn)("border-b","bg-white border-[var(--border-subtle)]"),children:[(0,i.jsx)(_.pj,{className:(0,W.cn)(G().table_cell,I,"w-[250px]"),children:(0,i.jsx)(p.default,{href:t,className:"cursor-pointer hover:text-[var(--brand-0)] transition-colors duration-200",children:e.name})}),(0,i.jsx)(_.pj,{className:(0,W.cn)(G().table_cell,I),children:(0,i.jsx)("span",{title:(0,f.H1)(e.context),children:(0,b.vo)(e.context)})}),(0,i.jsx)(_.pj,{className:(0,W.cn)(G().table_cell,I,"w-[250px]"),children:s||l?"-":v(e.input,e.originalInput,e.cacheReadPricing,e.cacheWrite5mPricing,e.cacheWrite30mPricing,e.cacheWrite1hPricing)}),(0,i.jsx)(_.pj,{className:(0,W.cn)(G().table_cell,I,"w-[140px]"),children:s?(0,i.jsxs)("button",{"data-action":"toggle-tiered-pricing",className:"inline-flex items-center gap-space-4 cursor-pointer text-[var(--brand-0)] hover:opacity-80 transition-opacity",onClick:()=>g(n),"aria-expanded":o,"aria-label":(0,a.I8)("src/app/pricing/components/ModelSection.showTieredPricing","Show tiered pricing"),children:[(0,i.jsx)("span",{children:e.output}),(0,i.jsx)(B.Z,{size:12,className:(0,W.cn)("transition-transform text-[var(--brand-0)] flex-shrink-0",o&&"rotate-180")})]}):l?(0,i.jsxs)("button",{"data-action":"toggle-omnimodal-pricing",className:"inline-flex items-center gap-space-4 cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>g(n),"aria-expanded":o,"aria-label":(0,a.I8)("src/app/pricing/components/ModelSection.showOmnimodalPricing","Show omnimodal pricing"),children:[(0,i.jsx)("span",{className:(0,W.cn)("transition-colors font-miletus text-paragraph-13",o?"text-[var(--brand-1)]":"text-[var(--text-1)]"),children:(0,a.I8)("src/app/pricing/components/ModelSection.omnimodal","Omnimodal")}),(0,i.jsx)(B.Z,{size:12,className:(0,W.cn)("transition-all flex-shrink-0",o?"text-[var(--brand-1)] rotate-180":"text-[var(--text-1)]")})]}):v(e.output,e.originalOutput)}),(0,i.jsx)(_.pj,{className:(0,W.cn)(G().table_cell,I,"w-[83px] text-right"),children:(0,i.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"font-miletus text-paragraph-13 text-[var(--text-1)] hover:opacity-70 transition-opacity",children:(0,a.I8)("src/app/pricing/components/ModelSection.more","More")})})]}),s&&o&&e.tieredBillingConfigs&&(0,i.jsx)(_.SC,{children:(0,i.jsx)(_.pj,{colSpan:5,className:(0,W.cn)(G().table_cell,"max-w-0 p-0 bg-[var(--fill-4)] border-b border-[var(--border-default)]"),children:(0,i.jsx)("div",{className:"px-space-16 py-0",children:(0,i.jsx)(_.iA,{className:(0,W.cn)(G().table_wrap,"min-w-max"),children:(()=>{let n=e.tieredBillingConfigs,t=n.some(e=>e.output_min_tokens||e.output_max_tokens),r=n.some(e=>{var n;return(0,N.B2)(null===(n=e.cache_creation_input_pricing)||void 0===n?void 0:n.pricePerMDecimal)}),o=n.some(e=>{var n;return(0,N.B2)(null===(n=e.cache_creation_30_minutes_input_pricing)||void 0===n?void 0:n.pricePerMDecimal)}),s=n.some(e=>{var n;return(0,N.B2)(null===(n=e.cache_creation_1_hour_input_pricing)||void 0===n?void 0:n.pricePerMDecimal)}),l=n.some(e=>{var n;return(0,N.B2)(null===(n=e.cache_read_input_pricing)||void 0===n?void 0:n.pricePerMDecimal)}),c=(0,W.cn)(P),d=(0,W.cn)(G().table_cell,I);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(_.xD,{children:(0,i.jsxs)(_.SC,{children:[(0,i.jsx)(_.ss,{className:c,children:(0,a.I8)("src/app/pricing/components/ModelSection.inputLength","Input length")}),t&&(0,i.jsx)(_.ss,{className:c,children:(0,a.I8)("src/app/pricing/components/ModelSection.outputLength","Output length")}),(0,i.jsx)(_.ss,{className:c,children:(0,a.I8)("src/app/pricing/components/ModelSection.inputPriceMtokens","Input price (Mtokens)")}),(0,i.jsx)(_.ss,{className:c,children:(0,a.I8)("src/app/pricing/components/ModelSection.outputPriceMtokens","Output Price (Mtokens)")}),r&&(0,i.jsx)(_.ss,{className:c,"data-pricing-key":"cache-write-5m",children:(0,a.I8)("src/app/pricing/components/ModelSection.cachedWrites5m","Cached writes(5m)")}),o&&(0,i.jsx)(_.ss,{className:c,"data-pricing-key":"cache-write-30m",children:(0,a.I8)("src/app/pricing/components/ModelSection.cachedWrites30m","Cached writes(30m)")}),s&&(0,i.jsx)(_.ss,{className:c,"data-pricing-key":"cache-write-1h",children:(0,a.I8)("src/app/pricing/components/ModelSection.cachedWrites1h","Cached writes(1h)")}),l&&(0,i.jsx)(_.ss,{className:c,"data-pricing-key":"cache-read",children:(0,a.I8)("src/app/pricing/components/ModelSection.cachedReads","Cached reads")})]})}),(0,i.jsx)(_.RM,{className:"bg-white",children:n.map((e,n)=>(0,i.jsxs)(_.SC,{children:[(0,i.jsxs)(_.pj,{className:d,children:["[",e.min_tokens.toLocaleStr
1ing("en-US")," ","-"," ",-1===e.max_tokens?"∞":e.max_tokens.toLocaleString("en-US"),")"]}),t&&(0,i.jsxs)(_.pj,{className:d,children:["[",e.output_min_tokens.toLocaleString("en-US")," ","-"," ",-1!==e.output_max_tokens&&e.output_max_tokens?(e.output_max_tokens||0).toLocaleString("en-US"):"∞",")"]}),(0,i.jsx)(_.pj,{className:d,children:v(e.input_pricing.pricePerMDecimal||"-")}),(0,i.jsx)(_.pj,{className:d,children:v(e.output_pricing.pricePerMDecimal||"-")}),r&&(0,i.jsx)(_.pj,{className:d,"data-pricing-key":"cache-write-5m",children:j(e.cache_creation_input_pricing)}),o&&(0,i.jsx)(_.pj,{className:d,"data-pricing-key":"cache-write-30m",children:j(e.cache_creation_30_minutes_input_pricing)}),s&&(0,i.jsx)(_.pj,{className:d,"data-pricing-key":"cache-write-1h",children:j(e.cache_creation_1_hour_input_pricing)}),l&&(0,i.jsx)(_.pj,{className:d,"data-pricing-key":"cache-read",children:j(e.cache_read_input_pricing)})]},n))})]})})()})})})}),l&&o&&e.multimodalPricing&&(0,i.jsx)(_.SC,{children:(0,i.jsx)(_.pj,{colSpan:5,className:(0,W.cn)(G().table_cell,"p-0 bg-[var(--fill-4)] border-b border-[var(--border-default)]"),children:(0,i.jsx)("div",{className:"px-space-12 py-0",children:(0,i.jsx)(H.Z,{pricing:e.multimodalPricing,currencySymbol:"$",unit:"Mt"})})})})]},n)})})]})})})]})]})},z=t(20247);let Y=["deepseek","meta","qwen","baidu","google","z.ai","Sao10K","mistral","nousresearch","cognitivecomputations","sophosympatheia","gryphe","microsoft","others"];function q(e){let n=e.toLowerCase(),t=Y.findIndex(e=>e.toLowerCase()===n);return"others"===n?Y.length+1:-1===t?Y.length:t}let X=e=>"string"==typeof e&&e.length>0?e:"-",K=e=>(0,N.So)(e)?X(null==e?void 0:e.originPricePerMDecimal):null;var Q=e=>{let{llmList:n,isConsole:t=!1}=e,o=(0,r.useMemo)(()=>{let e={};return n.forEach(n=>{let t=(0,z.Q8)(n.series,"");t&&(e[t]||(e[t]=[]),e[t].push(n))}),e},[n]),s=e=>{let n=[];return e.forEach(e=>{var t,i,a;let r=e.displayName||e.name,o=!0===e.is_tiered_billing,s=null!==e.multimodal_pricing&&void 0!==e.multimodal_pricing&&(Array.isArray(e.multimodal_pricing.input_price)&&e.multimodal_pricing.input_price.length>0||Array.isArray(e.multimodal_pricing.output_price)&&e.multimodal_pricing.output_price.length>0);o&&e.tiered_billing_configs&&e.tiered_billing_configs.length>0?n.push({name:r,context:e.context_size,input:"-",output:"Tiered pricing",id:e.id,isTieredBilling:!0,tieredBillingConfigs:e.tiered_billing_configs,rowspan:1,cacheWrite5mPricing:e.cache_creation_input_pricing||null,cacheWrite30mPricing:e.cache_creation_30_minutes_input_pricing||null,cacheWrite1hPricing:e.cache_creation_1_hour_input_pricing||null,cacheReadPricing:e.cache_read_input_pricing||null}):s?n.push({name:r,context:e.context_size,input:X(null===(t=e.input_pricing)||void 0===t?void 0:t.pricePerMDecimal),originalInput:K(e.input_pricing),originalOutput:K(e.output_pricing),output:"Omnimodal",cacheWrite5mPricing:e.cache_creation_input_pricing||null,cacheWrite30mPricing:e.cache_creation_30_minutes_input_pricing||null,cacheWrite1hPricing:e.cache_creation_1_hour_input_pricing||null,cacheReadPricing:e.cache_read_input_pricing||null,id:e.id,isTieredBilling:!1,isOmnimodal:!0,multimodalPricing:e.multimodal_pricing,rowspan:1}):n.push({name:r,context:e.context_size,input:X(null===(i=e.input_pricing)||void 0===i?void 0:i.pricePerMDecimal),originalInput:K(e.input_pricing),originalOutput:K(e.output_pricing),output:X(null===(a=e.output_pricing)||void 0===a?void 0:a.pricePerMDecimal),cacheWrite5mPricing:e.cache_creation_input_pricing||null,cacheWrite30mPricing:e.cache_creation_30_minutes_input_pricing||null,cacheWrite1hPricing:e.cache_creation_1_hour_input_pricing||null,cacheReadPricing:e.cache_read_input_pricing||null,id:e.id,isTieredBilling:!1,rowspan:1})}),n};if(!n||0===n.length)return(0,i.jsx)("div",{className:"py-12",children:(0,i.jsx)("div",{className:"text-center text-muted-foreground whitespace-pre-line",children:(0,a.I8)("src/app/pricing/components/LLMModelsSection.noModelsFound","No models found")})});let l=Object.entries(o).sort((e,n)=>{let[t]=e,[i]=n;return q(t)-q(i)||t.localeCompare(i)});return(0,i.jsx)("div",{className:"space-y-4",children:l.map(e=>{var n;let[a,r]=e;return(0,i.jsx)(U,{modelName:a,provider:a,sectionId:"pricing-model-".concat(a),description:(null===(n=z.LX.find(e=>e.id===a))||void 0===n?void 0:n.description)||"",data:s(r),isConsole:t},a)})})},J=t(65375),ee=t(75431),en=t(58816),et=t(19785),ei=t(33858),ea=t(76361),er=t(83728);let eo=(0,t(93627).Z)("square-percent",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 15h.01",key:"lqbp3k"}]]);var es=t(82489),el=t(17584);function ec(e){let{searchValue:n,filterType:t,selectedProvider:r="",availableProviders:o=[],onSearchChange:s,onFilterTypeChange:l,onProviderChange:c,className:d,isConsole:p=!1}=e;(0,el.I1)();let u=[{label:(0,a.I8)("src/app/pricing/components/PricingModelFilter.all","All"),value:"All",icon:(0,i.jsx)(ee.Z,{size:16})},{label:"LLM",value:"LLM",icon:(0,i.jsx)(en.Z,{size:16})},{label:(0,a.I8)("src/app/pricing/components/PricingModelFilter.image","Image"),value:"Image",icon:(0,i.jsx)(et.Z,{size:16})},{label:(0,a.I8)("src/app/pricing/components/PricingModelFilter.audio","Audio"),value:"Audio",icon:(0,i.jsx)(ei.Z,{size:16})},{label:(0,a.I8)("src/app/pricing/components/PricingModelFilter.video","Video"),value:"Video",icon:(0,i.jsx)(ea.Z,{size:16})},{label:(0,a.I8)("src/app/pricing/components/PricingModelFilter.aiSearch","AI Search"),value:"AI Search",icon:(0,i.jsx)(er.Z,{size:16})},{label:(0,a.I8)("src/app/pricing/components/PricingModelFilter.cache","Cache"),value:"Cache",icon:(0,i.jsx)(eo,{size:16})}],m=r.trim(),h=e=>{n.trim()&&s(""),null==c||c(""),l(t===e?"All":e)},g=e=>{e.trim()&&"All"!==t&&(l("All"),null==c||c("")),s(e)};return(0,i.jsxs)("div",{className:(0,W.cn)("flex w-full min-w-0 flex-wrap items-center gap-space-8",d),children:[(0,i.jsxs)("div",{className:(0,W.cn)("relative flex items-center justify-between h-[34px] bg-white border border-[var(--border-default)] rounded-6 px-space-16",p?"max-w-[296px] flex-1":"w-full flex-none md:w-[420px]"),children:[(0,i.jsx)("input",{placeholder:(0,a.I8)("src/app/pricing/components/PricingModelFilter.searchModel","Search Model"),value:n,onChange:e=>g(e.target.value),className:"flex-1 bg-transparent outline-none font-miletus text-paragraph-13 text-[var(--text-1)] placeholder:text-[var(--text-3)]","aria-label":(0,a.I8)("src/app/pricing/components/PricingModelFilter.searchModels","Search models")}),n.trim()?(0,i.jsx)("button",{onClick:()=>{s("")},className:"ml-space-8 text-[var(--text-3)] hover:text-[var(--text-1)] transition-colors cursor-pointer","aria-label":(0,a.I8)("src/app/pricing/components/PricingModelFilter.clearSearch","Clear search"),children:(0,i.jsx)(es.Z,{size:16})}):(0,i.jsx)(er.Z,{size:16,className:"ml-space-8 text-[var(--text-3)] pointer-events-none"})]}),(0,i.jsx)("div",{className:"flex w-full max-w-full flex-wrap gap-space-8 overflow-visible md:w-auto",children:u.map(e=>{let n=t===e.value&&""===r;return(0,i.jsxs)("button",{onClick:()=>h(e.value),className:(0,W.cn)("flex h-[34px] flex-none items-center gap-space-4 whitespace-nowrap rounded-6 border px-space-16 font-miletus text-[13px] leading-[18px] text-[var(--text-1)] transition-colors cursor-pointer",n?"bg-[var(--brand-2)] border-[var(--brand-0)]":"bg-white border-[var(--border-default)]"),"aria-pressed":n,"aria-label":"Filter by ".concat(e.label),children:[e.icon,e.label]},e.value)})}),(0,i.jsxs)(J.Ph,{value:r||"All",onValueChange:e=>{n.trim()&&s(""),l("All"),null==c||c("All"===e?"":e)},children:[(0,i.jsx)(J.i4,{"data-testid":"pricing-provider-filter",className:(0,W.cn)("h-[34px] w-full md:w-[180px] md:max-w-[180px] flex-none flex-nowrap overflow-hidden whitespace-nowrap bg-white border border-[var(--border-default)] rounded-6 px-space-16 gap-space-4 font-miletus text-[13px] leading-[18px] text-[var(--text-1)]","[&>span]:line-clamp-none [&>span]:flex [&>span]:min-w-0 [&>span]:flex-nowrap [&>span]:items-center",""!==r&&"bg-[var(--brand-2)] border-[var(--brand-0)]"),children:(0,i.jsxs)("span",{className:"flex min-w-0 min-h-0 flex-1 flex-nowrap items-center gap-space-4 overflow-hidden text-left",children:[r?(0,i.jsx)($.Z,{modelName:m,preferVendor:!0,size:16,vendorName:m,className:"shrink-0"}):null,(0,i.jsx)("span",{className:"block min-w-0 flex-1 truncate whitespace-nowrap",children:""===r?(0,a.I8)("src/app/pricing/components/PricingModelFilter.all","All"):m})]})}),(0,i.jsxs)(J.Bw,{children:[(0,i.jsx)(J.Ql,{value:"All",children:(0,a.I8)("src/app/pricing/components/PricingModelFilter.all","All")}),o.map(e=>(0,i.jsx)(J.Ql,{value:e,"data-testid":"pricing-provider-option","data-
1provider":e,children:(0,i.jsxs)("span",{className:"flex items-center gap-space-8",children:[(0,i.jsx)($.Z,{modelName:e,preferVendor:!0,size:20,vendorName:e,className:"shrink-0"}),(0,i.jsx)("span",{children:e})]})},e))]})]})]})}var ed=t(77455),ep=t(25976),eu=t(2869);let em=null;function eh(e){let n=e.func,t=e.model,i="string"==typeof t&&t?t:n;if(!i||"string"!=typeof i)return;let a=function(){if(!em){let{baseToPath:e}=function(){let e=new Set,n=new Map;return[...(0,h.Qx)(),...(0,h.Jc)(),...(0,h.Qi)()].forEach(t=>{let i=t.path;if(!i||"string"!=typeof i||""===i.trim())return;e.add(i);let a=i.split("/").filter(Boolean),r=a[a.length-1];r&&n.set(r,i);let o=t.id;if(o&&"string"==typeof o&&""!==o.trim()){let e=o.trim().toLowerCase().replace(/_/g,"-");n.set(e,i)}}),{pathToPath:e,baseToPath:n}}();em=e}return em}(),r=i.toLowerCase().replace(/_/g,"-");for(let e of Array.from(a.keys()).sort((e,n)=>n.length-e.length))if(r===e||r.startsWith(e+"-"))return a.get(e);let o=a.get(r);if(o)return o}function eg(e,n){let t={},i=new Set,a=null,r=[],o=()=>{if(r.length>1){t[r[0]]=r.length;for(let e=1;e<r.length;e++)i.add(r[e])}};return e.forEach((e,t)=>{let i=n(e);if(i){a===i||(o(),a=i,r.length=0),r.push(t);return}o(),a=null,r.length=0}),o(),{rowSpanMap:t,skipRows:i}}let e_=[{apiName:"EXA",mode:"neuralSearch",pricing:"$0.007/request"},{apiName:"EXA",mode:"deepSearch",pricing:"$0.012/request"},{apiName:"EXA",mode:"deepReasoningSearch",pricing:"$0.015/request"},{apiName:"EXA",mode:"additional_result",pricing:"$0.001/result (beyond 10 results)"},{apiName:"EXA",mode:"answer",pricing:"$0.005/request"},{apiName:"EXA",mode:"contentText",pricing:"$0.001/item"},{apiName:"EXA",mode:"contentHighlight",pricing:"$0.001/item"},{apiName:"EXA",mode:"contentSummary",pricing:"$0.001/item"},{apiName:"Tavily",mode:"basicSearch",pricing:"$0.008/request"},{apiName:"Tavily",mode:"advancedSearch",pricing:"$0.016/request"},{apiName:"Tavily",mode:"basicExtract",pricing:"$0.0016/url"},{apiName:"Tavily",mode:"advancedExtract",pricing:"$0.0032/url"},{apiName:"Tavily",mode:"regularMapping",pricing:"$0.0008/page"},{apiName:"Tavily",mode:"instructedMapping",pricing:"$0.0016/page"},{apiName:"Tavily",mode:"Crawl",pricing:"Extract + Mapping Cost"}];var ex=e=>{let{isConsole:n=!1,searchValue:t=""}=e,r=t.trim().toLowerCase(),o=r?e_.filter(e=>e.apiName.toLowerCase().includes(r)):e_,{rowSpanMap:s,skipRows:l}=eg(o,e=>e.apiName),c="font-semibold text-[var(--dark-4)] bg-[var(--gray-3)] ".concat(n?"text-xs":"text-xs md:text-sm"),d="".concat(G().table_cell," ").concat(n?"text-xs":"text-xs md:text-sm");return 0===o.length?null:(0,i.jsx)("div",{className:G().price_card,children:(0,i.jsx)("div",{className:"-m-6",children:(0,i.jsx)("div",{className:"rounded-[6px] border border-[var(--gray-2)] bg-white p-4",children:(0,i.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row",children:[(0,i.jsx)("div",{className:"w-full flex-shrink-0 px-2 md:w-[224px] md:pt-4",children:(0,i.jsx)("h3",{className:"".concat(n?"text-sm md:text-base":"text-base md:text-xl"," mb-2 font-semibold text-foreground"),children:(0,a.I8)("src/app/pricing/components/AISearchPrice.aiSearch","AI Search")})}),(0,i.jsx)("div",{className:"flex flex-col gap-space-12 md:hidden",children:e_.map(e=>(0,i.jsx)(Z,{title:e.mode,fields:[{label:(0,a.I8)("src/app/pricing/components/AISearchPrice.apiName","API Name"),value:e.apiName},{label:(0,a.I8)("src/app/pricing/components/AISearchPrice.pricing","Pricing"),value:e.pricing}]},e.mode))}),(0,i.jsx)("div",{className:"hidden flex-1 overflow-x-auto md:block",children:(0,i.jsxs)(_.iA,{className:G().table_wrap,children:[(0,i.jsx)(_.xD,{children:(0,i.jsxs)(_.SC,{className:"hover:bg-transparent",children:[(0,i.jsx)(_.ss,{className:"".concat(c," min-w-[160px]"),children:(0,a.I8)("src/app/pricing/components/AISearchPrice.apiName","API Name")}),(0,i.jsx)(_.ss,{className:"".concat(c," min-w-[220px]"),children:(0,a.I8)("src/app/pricing/components/AISearchPrice.mode","Mode")}),(0,i.jsx)(_.ss,{className:"".concat(c," min-w-[160px]"),children:(0,a.I8)("src/app/pricing/components/AISearchPrice.pricing","Pricing")})]})}),(0,i.jsx)(_.RM,{className:"overflow-hidden rounded-lg bg-white",children:o.map((e,n)=>(0,i.jsxs)(_.SC,{className:G().table_row_hover,children:[l.has(n)?null:(0,i.jsx)(_.pj,{className:"".concat(d," ").concat(G().table_cell_no_hover),rowSpan:s[n],children:e.apiName}),(0,i.jsx)(_.pj,{className:d,children:e.mode}),(0,i.jsx)(_.pj,{className:d,children:e.pricing})]},"".concat(e.apiName,"-").concat(e.mode)))})]})})]})})})})},ev=t(20366),ef=t(87394),eb=t(90974),eN=t(17699);function ej(e){return(0,z.Q8)(e.series,"")}function eP(){return{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.novitaAiPricingForModelApis","Novita AI Pricing for Model APIs - One of The Cheapest Model API Providers"),description:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.exploreThePotentialOfNovitaAis","Explore the potential of Novita AI's cheapest and best Stable Diffusion and LLM APIs. Try for free and pay for what you use."),topup_guide:{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.pricing","Pricing"),desc:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.chooseAPricingPlanThatSuits","Choose a pricing plan that suits you"),btn:"Top Up"},tabs:{inferential_pricing:"Access and utilize industry-leading open-source models, including text, image, audio, and video models. Pay for what you use, with no hidden fees.",dedicated_endpoints:"Choose the best plan for your needs."},pricing_table:{llm:{name:"Model Name",context:"Context",input:"Input",output:"Output",unit:"Mt",token_range:"Input Token Range"},image:{name:"API Name",description1:"Pricing may vary based on image dimensions, inference steps, and upscaling factors. Use the",description2:"for an estimate.",resolution:"Width&Height",steps:"Steps/Scale",price:"Pricing",unit:"image"},video:{name:"API Name",description1:"Pricing may vary based on the number of frames, chosen model, and inference steps. Use the",description2:"for an estimate.",frames:"Total Frames",resolution:"Width&Height",model:"Model",steps:"Steps",price:"Pricing",unit:"video"},audio:{name:"API Name",price:"Pricing",unit:"1M characters"},training:{name:"Name",resolution:"Width&Height",steps:"Steps",isSDXL:"Base Model Is SDXL",price:"Pricing",unit:"call"}},calculator:{name:"Pricing Calculator",api_name:"API Name",width:"Width",height:"Height",steps:"Steps",scale:"Scale",model:"Model",frames:"Frames",price:"Price",connector:": ",currency_symbol:"$"}}}function eI(e,n){let t=e=>{var n;let t=e.match(/^\$([^ ]+)/);return null==t?void 0:null===(n=t[1])||void 0===n?void 0:n.replace(/,/g,"")};return e!==n?(0,i.jsxs)("div",{className:"flex flex-col flex-wrap gap-1",children:[(0,i.jsx)("span",{className:"text-[var(--brand-1)]",title:t(e),children:e}),(0,i.jsx)("span",{className:"text-[var(--gray-1)] line-through",title:t(n),children:n})]}):(0,i.jsx)("span",{title:t(e),children:e})}
1function ey(e,n){return(0,i.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,i.jsx)("span",{children:e}),n.priceNote&&(0,i.jsx)("a",{href:n.priceNote.link,target:"_blank",rel:"noopener noreferrer",className:"font-small text-[var(--brand-0)] underline underline-offset-2 cursor-pointer hover:opacity-80",children:n.priceNote.text})]})}function eS(e,n){switch(e){case g.mf.LLM:return[{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.modelName","Model Name"),dataIndex:"name",render:ey},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.context","Context"),dataIndex:"context",render:e=>(0,i.jsx)("span",{title:(0,f.H1)(e),children:(0,b.vo)(e)})},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.input","Input"),dataIndex:"input",render:(e,n)=>(null==n?void 0:n.input)==="0"?"Free":(0,i.jsxs)("span",{title:(0,f.H1)(null==n?void 0:n.input),children:["$",(0,v.$Z)(null==n?void 0:n.input)," /Mt"]})},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.output","Output"),dataIndex:"output",render:(e,n)=>(null==n?void 0:n.output)==="0"?"Free":(0,i.jsxs)("span",{title:(0,f.H1)(null==n?void 0:n.output),children:["$",(0,v.$Z)(null==n?void 0:n.output)," /Mt"]})}];case g.mf.EMBEDDING:return[{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.modelName","Model Name"),dataIndex:"name",render:ey},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.context","Context"),dataIndex:"context",render:e=>(0,i.jsx)("span",{title:(0,f.H1)(e),children:(0,b.vo)(e)})},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.input","Input"),dataIndex:"input",render:e=>(0,i.jsxs)("span",{title:(0,f.H1)(e),children:["$",(0,v.$Z)(e)," /Mt"]})}];case g.mf.IMG:if("t2"===n)return[{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.apiName","API Name"),dataIndex:"name",render:ey},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.mode","Mode"),dataIndex:"mode",render:e=>e||"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.widthHeight","Width&Height"),dataIndex:"resolution",render:(e,n)=>n.width&&n.height?"".concat(n.width,"*").concat(n.height):"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.pricing","Pricing"),dataIndex:"price",render:(e,n)=>{if(n.isDynamic&&n.price)return n.price;if(n.staticPrice)return n.staticPrice;let t=(0,m.lh)(n.func,{width:n.width,height:n.height,steps:n.steps,scale:n.scale,mode:n.mode}),i=t.discountPrice,a=t.originalPrice;return eI("$".concat((0,v.$Z)(i)," /","image"),"$".concat((0,v.$Z)(a)," /","image"))}}];return[{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.apiName","API Name"),dataIndex:"name",render:ey},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.widthHeight","Width&Height"),dataIndex:"resolution",render:(e,n)=>n.isDynamic&&n.resolution&&"-"!==n.resolution?n.resolution:n.width&&n.height?"".concat(n.width,"*").concat(n.height):"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.stepsScale","Steps/Scale"),dataIndex:"steps",render:(e,n)=>e||n.scale||"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.pricing","Pricing"),dataIndex:"price",render:(e,n)=>{if(n.isDynamic&&n.price)return n.price;if(n.staticPrice)return n.staticPrice;let t=(0,m.lh)(n.func,{width:n.width,height:n.height,steps:n.steps,scale:n.scale}),i=t.discountPrice,a=t.originalPrice;return eI("$".concat((0,v.$Z)(i)," /","image"),"$".concat((0,v.$Z)(a)," /","image"))}}];case g.mf.VIDEO_GENERATOR:if("t2"===n)return[{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.apiName","API Name"),dataIndex:"name",render:ey},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.mode","Mode"),dataIndex:"mode",render:(e,n)=>{if(n.frameType||n.audioType||n.batchMode){let e=[];return n.frameType&&e.push(n.frameType),n.audioType&&e.push(n.audioType),n.batchMode&&e.push(n.batchMode),e.join(" / ")||"-"}return e||"-"}},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.duration","Duration"),dataIndex:"duration",render:e=>e?"".concat(e,"s"):"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.resolution","Resolution"),dataIndex:"resolution",render:(e,n)=>(0,i.jsxs)("span",{children:[e,n.ratio&&(0,i.jsxs)("span",{className:"text-gray-500 ml-2",children:["( ",n.ratio," )"]})]})},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.pricing","Pricing"),dataIndex:"price",render:(e,n)=>{if(n.isDynamic&&n.price)return n.price;let t=(0,m.lh)(n.func,{model:n.model,mode:n.mode,resolutionType:n.resolution,frames:16,duration:n.duration,ratio:n.ratio,frameType:n.frameType,audioType:n.audioType,batchMode:n.batchMode,audio:n.audio}),i=t.discountPrice,a=t.originalPrice,r=n.unit||"video";return eI("$".concat((0,v.lA)(i)," /").concat(r),"$".concat((0,v.lA)(a)," /").concat(r))}}];if("t3"===n)return[{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.apiName","API Name"),dataIndex:"name",render:ey},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.model","Model"),dataIndex:"model",render:e=>e||"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.steps","Steps"),dataIndex:"steps",render:(e,n)=>e||n.scale||"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.pricing","Pricing"),dataIndex:"price",render:(e,n)=>{let t=(0,m.lh)(n.func,{steps:n.steps,frames:n.frames||0,model:n.model}),i=t.discountPrice,a=t.originalPrice;return eI("$".concat((0,v.$Z)(i)," /","video"),"$".concat((0,v.$Z)(a)," /","video"))}}];return[{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.apiName","API Name"),dataIndex:"name",render:ey},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.totalFrames","Total Frames"),dataIndex:"frames",render:e=>e||"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.steps","Steps"),dataIndex:"steps",render:(e,n)=>e||n.scale||"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.pricing","Pricing"),dataIndex:"price",render:(e,n)=>{let t=(0,m.lh)(n.func,{steps:n.steps,frames:n.frames||0,model:n.model}),i=t.discountPrice,a=t.originalPrice;return eI("$".concat((0,v.$Z)(i)," /","video"),"$".concat((0,v.$Z)(a)," /","video"))}}];case g.mf.AUDIO:return[{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.apiName","API Name"),dataIndex:"name",render:ey},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.mode","Mode"),dataIndex:"mode",render:e=>e||"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.pricing","Pricing"),dataIndex:"price",render:(e,n)=>{if(n.isDynamic&&n.price)return n.price;let t=(0,m.lh)(n.func,{}),r=t.discountPrice,o=t.originalPrice;if(0===r||"0"===r)return(0,i.jsx)("span",{className:"w-8 h-5 rounded-[2px] bg-[var(--green-7)] text-[var(--green-2)] text-xs flex items-center justify-center",children:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.free","Free")});let s=(0,h.LV)(n.func);return eI("$".concat((0,v.$Z)(r)," /").concat(s),"$".concat((0,v.$Z)(o)," /").concat(s))}}];case g.mf.TRAINING:return[{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.name","Name"),dataIndex:"name",render:ey},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.widthHeight","Width&Height"),dataIndex:"resolution",render:(e,n)=>n.width&&n.height?"".concat(n.width,"*").concat(n.height):"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.steps","Steps"),dataIndex:"steps",render:e=>e||"-"},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.baseModelIsSdxl","Base Model Is SDXL"),dataIndex:"isSDXL",render:e=>"".concat(e)},{title:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.pricing","Pricing"),dataIndex:"price",render:(e,n)=>{let t=(0,m.lh)(n.func,{width:n.width,height:n.height,steps:n.steps,isSDXL:n.isSDXL}),i=t.discountPrice,a=t.originalPrice;return eI("$".concat((0,v.$Z)(i)," /","1M characters"),"$".concat((0,v.$Z)(a)," /","1M characters"))}}];default:return[]}}let ew={All:null,Video:"video_gen",Image:"image_gen",Audio:"audio_gen"};function eC(e){return(0,z.Q8)(e.series,"")}function eA(e){if(!e||e.length<=1)return e;let n=[],t=0;for(;t<e.length;){let i=e[t],a=i.rowSpan;a&&a>1?(n.push(e.slice(t,t+a)),t+=a):(n.push([i]),t++)}return n.sort((e,n)=>{let t=eC(e[0]),i=eC(n[0]);return t!==i?t.localeCompare(i,"en"):(e[0].name||"").localeCompare(n[0].name||"","en")}),n.flat()}function eM(e,n){if(!n)return{rowSpanMap:{},skipNameRows:new Set};let{rowSpanMap:t,skipRows:i}=eg(e,e=>e.name);return{rowSpanMap:t,skipNameRows:i}}var ek=e=>{let{llmList:n,embeddingList:t,isConsole:s=!1,dynamicModelConfigs:l=[],dynamicPriceMap:c={}}=e,{llmModels:d,reclassifiedImageModels:h}=(0,r.useMemo)(()=>
1(0,u.w)(n),[n]),[v,f]=(0,r.useState)(null),[b,j]=(0,r.useState)(""),[I,S]=(0,r.useState)(""),[w,C]=(0,r.useState)("All"),[A,M]=(0,r.useState)(""),k=(0,o.useSearchParams)(),T=(0,ev.CG)(e=>e.user.currentTeam),[E,D]=(0,r.useState)([]);(0,r.useEffect)(()=>{if(!s){D([]);return}D([]);let e=!0;return(0,eN.d)().then(n=>{e&&D(n)}).catch(()=>{e&&D([])}),()=>{e=!1}},[T,s]);let L=s&&E.length>0,W=(0,r.useMemo)(()=>(function(e){let n={};for(let[t,i]of Object.entries(e))null!=i&&"object"==typeof i&&"discountPrice"in i?n[t]="number"==typeof i.discountPrice&&i.discountPrice<i.originalPrice?i.discountPrice:i.originalPrice:n[t]=i;return n})(c),[c]),$=(0,r.useMemo)(()=>{let e=l.filter(e=>{var n,t;return!!(null===(t=e.fusionConfig)||void 0===t?void 0:null===(n=t.series)||void 0===n?void 0:n.trim())&&e.modelConfig.skuMappings&&e.modelConfig.skuMappings.length>0}),n=ew[w];return null===n?e.filter(e=>["video_gen","image_gen","audio_gen"].includes(e.modelConfig.config.category)):n?e.filter(e=>e.modelConfig.config.category===n):[]},[l,w]),B=(0,r.useMemo)(()=>{let e=[...(null==t?void 0:t.length)>0?[{type:g.mf.EMBEDDING,table:P()(t,e=>{var n;return{name:e.displayName||e.name,context:e.context_size,input:(null===(n=e.input_pricing)||void 0===n?void 0:n.pricePerMDecimal)||"-"}})}]:[],{type:g.mf.IMG,description1:"Pricing may vary based on image dimensions, inference steps, and upscaling factors. Use the",description2:"for an estimate.",calculate:!0,table:[],table2:[{name:"Qwen-Image Text to Image",func:g.ud.QWEN_TXT2IMG},{name:"Qwen-Image Edit",func:g.ud.QWEN_IMAGE_EDIT}]},{type:g.mf.VIDEO_GENERATOR,description1:"Pricing may vary based on the number of frames, chosen model, and inference steps. Use the",description2:"for an estimate.",calculate:!0,table:[],table2:[{name:"Kling v3.0 Standard Text-to-Video",rowSpan:2,mode:"No Audio",func:g.ud.KLING_V30_STD_T2V,audio:!1,unit:"s"},{name:"",mode:"Audio",func:g.ud.KLING_V30_STD_T2V,audio:!0,unit:"s"},{name:"Kling v3.0 Standard Image-to-Video",rowSpan:2,mode:"No Audio",func:g.ud.KLING_V30_STD_I2V,audio:!1,unit:"s"},{name:"",mode:"Audio",func:g.ud.KLING_V30_STD_I2V,audio:!0,unit:"s"},{name:"Kling v3.0 Pro Text-to-Video",rowSpan:2,mode:"No Audio",func:g.ud.KLING_V30_PRO_T2V,audio:!1,unit:"s"},{name:"",mode:"Audio",func:g.ud.KLING_V30_PRO_T2V,audio:!0,unit:"s"},{name:"Kling v3.0 Pro Image-to-Video",rowSpan:2,mode:"No Audio",func:g.ud.KLING_V30_PRO_I2V,audio:!1,unit:"s"},{name:"",mode:"Audio",func:g.ud.KLING_V30_PRO_I2V,audio:!0,unit:"s"},{name:"Minimax Hailuo 2.3 Text to Video",rowSpan:3,mode:"-",func:g.ud.MINIMAX_HAILUO_2_3_T2V,duration:6,resolution:"768P"},{name:"",mode:"-",func:g.ud.MINIMAX_HAILUO_2_3_T2V,duration:10,resolution:"768P"},{name:"",mode:"-",func:g.ud.MINIMAX_HAILUO_2_3_T2V,duration:6,resolution:"1080P"},{name:"Minimax Hailuo 2.3 Image to Video",rowSpan:3,mode:"-",func:g.ud.MINIMAX_HAILUO_2_3_I2V,duration:6,resolution:"768P"},{name:"",mode:"-",func:g.ud.MINIMAX_HAILUO_2_3_I2V,duration:10,resolution:"768P"},{name:"",mode:"-",func:g.ud.MINIMAX_HAILUO_2_3_I2V,duration:6,resolution:"1080P"},{name:"Minimax Hailuo 2.3 Fast Image to Video",rowSpan:3,mode:"-",func:g.ud.MINIMAX_HAILUO_2_3_FAST_I2V,duration:6,resolution:"768P"},{name:"",mode:"-",func:g.ud.MINIMAX_HAILUO_2_3_FAST_I2V,duration:10,resolution:"768P"},{name:"",mode:"-",func:g.ud.MINIMAX_HAILUO_2_3_FAST_I2V,duration:6,resolution:"1080P"},{name:"Wan 2.5 Text to Video",rowSpan:6,model:"WAN25_PREVIEW_T2V_480P_5S",func:g.ud.WAN_2_5_T2V,duration:5,resolution:"480P"},{name:"",model:"WAN25_PREVIEW_T2V_480P_10S",func:g.ud.WAN_2_5_T2V,duration:10,resolution:"480P"},{name:"",model:"WAN25_PREVIEW_T2V_720P_5S",func:g.ud.WAN_2_5_T2V,duration:5,resolution:"720P"},{name:"",model:"WAN25_PREVIEW_T2V_720P_10S",func:g.ud.WAN_2_5_T2V,duration:10,resolution:"720P"},{name:"",model:"WAN25_PREVIEW_T2V_1080P_5S",func:g.ud.WAN_2_5_T2V,duration:5,resolution:"1080P"},{name:"",model:"WAN25_PREVIEW_T2V_1080P_10S",func:g.ud.WAN_2_5_T2V,duration:10,resolution:"1080P"},{name:"Wan 2.5 Image to Video",rowSpan:6,model:"WAN25_PREVIEW_I2V_480P_5S",func:g.ud.WAN_2_5_I2V,duration:5,resolution:"480P"},{name:"",model:"WAN25_PREVIEW_I2V_480P_10S",func:g.ud.WAN_2_5_I2V,duration:10,resolution:"480P"},{name:"",model:"WAN25_PREVIEW_I2V_720P_5S",func:g.ud.WAN_2_5_I2V,duration:5,resolution:"720P"},{name:"",model:"WAN25_PREVIEW_I2V_720P_10S",func:g.ud.WAN_2_5_I2V,duration:10,resolution:"720P"},{name:"",model:"WAN25_PREVIEW_I2V_1080P_5S",func:g.ud.WAN_2_5_I2V,duration:5,resolution:"1080P"},{name:"",model:"WAN25_PREVIEW_I2V_1080P_10S",func:g.ud.WAN_2_5_I2V,duration:10,resolution:"1080P"},{name:"Wan 2.6 Text to Video",rowSpan:6,model:"WAN2_6_T2V_720P_5S",func:g.ud.WAN_2_6_T2V,duration:5,resolution:"720P"},{name:"",model:"WAN2_6_T2V_720P_10S",func:g.ud.WAN_2_6_T2V,duration:10,resolution:"720P"},{name:"",model:"WAN2_6_T2V_720P_15S",func:g.ud.WAN_2_6_T2V,duration:15,resolution:"720P"},{name:"",model:"WAN2_6_T2V_1080P_5S",func:g.ud.WAN_2_6_T2V,duration:5,resolution:"1080P"},{name:"",model:"WAN2_6_T2V_1080P_10S",func:g.ud.WAN_2_6_T2V,duration:10,resolution:"1080P"},{name:"",model:"WAN2_6_T2V_1080P_15S",func:g.ud.WAN_2_6_T2V,duration:15,resolution:"1080P"},{name:"Wan 2.6 Image to Video",rowSpan:6,model:"WAN2_6_I2V_720P_5S",func:g.ud.WAN_2_6_I2V,duration:5,resolution:"720P"},{name:"",model:"WAN2_6_I2V_720P_10S",func:g.ud.WAN_2_6_I2V,duration:10,resolution:"720P"},{name:"",model:"WAN2_6_I2V_720P_15S",func:g.ud.WAN_2_6_I2V,duration:15,resolution:"720P"},{name:"",model:"WAN2_6_I2V_1080P_5S",func:g.ud.WAN_2_6_I2V,duration:5,resolution:"1080P"},{name:"",model:"WAN2_6_I2V_1080P_10S",func:g.ud.WAN_2_6_I2V,duration:10,resolution:"1080P"},{name:"",model:"WAN2_6_I2V_1080P_15S",func:g.ud.WAN_2_6_I2V,duration:15,resolution:"1080P"}
1,{name:"Wan 2.6 Reference to Video",rowSpan:4,model:"WAN2_6_V2V_720P_5S",func:g.ud.WAN_2_6_V2V,duration:5,resolution:"720P"},{name:"",model:"WAN2_6_V2V_720P_10S",func:g.ud.WAN_2_6_V2V,duration:10,resolution:"720P"},{name:"",model:"WAN2_6_V2V_1080P_5S",func:g.ud.WAN_2_6_V2V,duration:5,resolution:"1080P"},{name:"",model:"WAN2_6_V2V_1080P_10S",func:g.ud.WAN_2_6_V2V,duration:10,resolution:"1080P"}],table3:[{name:g.ZP.IMG2VIDEO.displayName,rowSpan:2,func:g.ud.IMG2VIDEO,model:"SVD-XT",steps:20},{name:"",func:g.ud.IMG2VIDEO,model:"SVD",steps:20}]},{type:g.mf.AUDIO,table:[{name:g.ZP.TXT2SPEECH.displayName,func:g.ud.TXT2SPEECH,...(0,m.zn)(g.ud.TXT2SPEECH)},{name:"MiniMax Voice-Cloning",func:g.ud.MINIMAX_VOICE_CLONING,mode:"-"},{name:"Fish Audio Text to Speech",func:g.ud.FISH_AUDIO_TEXT_TO_SPEECH,mode:"-"},{name:"Fish Audio Voice Cloning",func:g.ud.FISH_AUDIO_VOICE_CLONING,mode:"-"}]}],n=new Set,i=new Set,a=e=>{if(!e||0===e.length)return e;let t=[],i=0;for(;i<e.length;){let a=e[i],r=a.rowSpan;if(r&&r>1){let a=e.slice(i,i+r);a.some(e=>{let t=eh(e);return null!=t&&n.has(t)})||t.push(...a),i+=r}else{let e=eh(a);e&&n.has(e)||t.push(a),i++}}return t},r={video_gen:[],image_gen:[],audio_gen:[]};return $.forEach(e=>{var t,a;let o=function(e,n,t){let i=e=>{if("boolean"==typeof e.hasAudio)return e.hasAudio;if("boolean"==typeof e.sound)return e.sound;if("boolean"==typeof e.generate_audio)return e.generate_audio;if("string"==typeof e.skuCode&&e.skuCode){let n=e.skuCode;if(/(?:^|_)SILENT(?:_|$)/.test(n)||/(?:^|_)NA(?:_|$)/.test(n))return!1;if(/(?:^|_)AUDIO(?:_|$)/.test(n)||/(?:^|_)VIDEO_AUDIO(?:_|$)/.test(n)||/(?:^|_)A(?:_|$)/.test(n))return!0}};return(0,ed.WO)(e,n).map(n=>{var t,a,r,o,s,l,c;let d;let p=e.modelConfig.config.category,u=e.modelConfig.config.billingExpr,m=void 0!==n.originalPrice?n.originalPrice:n.price,h=void 0!==n.discountPrice?n.discountPrice:n.price,g="number"==typeof h?h:void 0,_=n.priceUnit||(null===(a=e.pricingConfig)||void 0===a?void 0:null===(t=a.table)||void 0===t?void 0:t.priceUnit)||("video_gen"===p?"video":"audio_gen"===p?"10k chars":"image");if("-"===h||null==h||""===h)d="-";else if(0===h)d="Free";else if("number"==typeof h){if(u){let e=new ep.Z(h).toFixed(4);d="$".concat(e," /").concat(_)}else d="$".concat(h," /").concat(_)}else d=h;let x=null;if(void 0!==n.duration&&null!==n.duration&&""!==n.duration&&"null"!==n.duration){let e=Number(n.duration);!isNaN(e)&&e>0&&(x=e)}let v={name:(null===(r=e.fusionConfig.displayName)||void 0===r?void 0:r.trim())||e.fusionConfig.name||e.modelConfig.config.name||"Unknown model",func:null,modelName:e.fusionConfig.name,mode:n.fast_mode||n.mode||"-",duration:x,resolution:n.resolution||n.size,price:d,rawPrice:g,originalPrice:"number"==typeof m?u?new ep.Z(m).toFixed(4):m:void 0,discountPrice:"number"==typeof h?u?new ep.Z(h).toFixed(4):h:void 0,priceUnit:_,isDynamic:!0,skuCode:n.skuCode,series:(null===(c=e.fusionConfig)||void 0===c?void 0:null===(l=c.series)||void 0===l?void 0:l.trim())||"",priceNote:null===(s=e.pricingConfig)||void 0===s?void 0:null===(o=s.table)||void 0===o?void 0:o.priceNote};if("video_gen"===p){let e=i(n);void 0!==e&&(v.hasAudio=e)}return"image_gen"===p&&(v.quality=n.quality||"-",v.size=n.size||n.resolution||"-",void 0!==n.width&&(v.width=n.width),void 0!==n.height&&(v.height=n.height)),v})}(e,W,eP());if(0===o.length)return;"image_gen"===e.modelConfig.config.category&&i.add(e.fusionConfig.name);let s=(0,eu.ZI)(null===(a=e.modelConfig)||void 0===a?void 0:null===(t=a.config)||void 0===t?void 0:t.openapiSchema);s&&n.add(s);let l=e.modelConfig.config.category;r[l]&&r[l].push(...o)}),e.map(e=>{var n,t,o;if(e.type===g.mf.VIDEO_GENERATOR){let t=eA([...a(null!==(n=e.table2)&&void 0!==n?n:[]),...r.video_gen]);return{...e,table2:t}}if(e.type===g.mf.IMG){let n=eA([...a(null!==(t=e.table2)&&void 0!==t?t:[]),...r.image_gen,...h.filter(e=>!i.has(String(e.id))&&(!A||(0,z.Q8)(e.series,"")===A)).flatMap(e=>e.pricing.map(n=>({name:e.displayName||e.name,func:String(e.id),series:e.series,mode:n.mode,staticPrice:eI(n.price,n.originalPrice||n.price)})))]);return{...e,table2:n}}if(e.type===g.mf.AUDIO){let n=eA([...a(null!==(o=e.table)&&void 0!==o?o:[]),...r.audio_gen]);return{...e,table:n}}return e})},[t,$,W,h,A]),H=(0,r.useMemo)(()=>y()(e=>S(e),1e3),[]);(0,r.useEffect)(()=>()=>{H.cancel()},[H]),(0,r.useEffect)(()=>{k.get("ai-search")&&C("AI Search")},[k]);let U=(0,r.useCallback)(e=>{j(e),""===e?(S(""),H.cancel()):H(e)},[H]),Y=(0,r.useMemo)(()=>{let e=new Set;return d.forEach(n=>{let t=ej(n);t&&e.add(t)}),("All"===w||"Image"===w)&&h.forEach(n=>{let t=(0,z.Q8)(n.series,"");t&&e.add(t)}),Array.from(e).sort()},[d,h,w]),q=(0,r.useMemo)(()=>"All"===w||"LLM"===w||"Cache"===w,[w]),X=(0,r.useMemo)(()=>{let e=d.filter(e=>{var n;return!!(null===(n=e.series)||void 0===n?void 0:n.trim())});if(I.trim()){let n=I.toLowerCase();e=e.filter(e=>{var t,i,a;return(null===(t=e.displayName)||void 0===t?void 0:t.toLowerCase().includes(n))||(null===(i=e.name)||void 0===i?void 0:i.toLowerCase().includes(n))||(null===(a=e.id)||void 0===a?void 0:a.toLowerCase().includes(n))})}return A&&(e=e.filter(e=>ej(e)===A)),"Cache"===w&&(e=e.filter(e=>{let{cache_read_input_pricing:n}=e;return(0,N.B2)(null==n?void 0:n.pricePerMDecimal)})),e},[d,I,A,w]),K=(0,r.useCallback)(()=>
1{if(!I.trim()||!q)return;let e=I.toLowerCase(),n=X.find(n=>{var t,i,a;return(null===(t=n.displayName)||void 0===t?void 0:t.toLowerCase().includes(e))||(null===(i=n.name)||void 0===i?void 0:i.toLowerCase().includes(e))||(null===(a=n.id)||void 0===a?void 0:a.toLowerCase().includes(e))});if(n){let e=ej(n);if(e){let n=document.getElementById("pricing-model-".concat(e));n&&setTimeout(()=>{n.scrollIntoView({behavior:"smooth",block:"center"})},100)}}},[I,X,q]);(0,r.useEffect)(()=>{I.trim()&&K()},[I,K]);let J=(0,r.useMemo)(()=>{let e=[...B];if("All"!==w){let n={All:[],LLM:[g.mf.LLM,g.mf.EMBEDDING],Image:[g.mf.IMG],Audio:[g.mf.AUDIO],Video:[g.mf.VIDEO_GENERATOR],"AI Search":[],Cache:[]}[w];e=n&&0!==n.length?e.filter(e=>n.includes(e.type)):[]}if(I.trim()){let n=I.toLowerCase(),t=e=>{if(!e||0===e.length)return[];let t=[],i=0;for(let l=0;l<e.length;l++){var a,r,o,s;if(i>0){i--;continue}let c=e[l],d=(null===(a=c.name)||void 0===a?void 0:a.toLowerCase())||"",p=(null===(r=c.func)||void 0===r?void 0:r.toLowerCase())||"";if(d.includes(n)||p.includes(n)){if(c.rowSpan&&c.rowSpan>1){for(let n=0;n<c.rowSpan&&l+n<e.length;n++)t.push(e[l+n]);i=c.rowSpan-1}else t.push(c)}else if(c.rowSpan&&c.rowSpan>1){let a=!1;for(let t=0;t<c.rowSpan&&l+t<e.length;t++){let i=e[l+t],r=(null===(o=i.name)||void 0===o?void 0:o.toLowerCase())||"",c=(null===(s=i.func)||void 0===s?void 0:s.toLowerCase())||"";if(r.includes(n)||c.includes(n)){a=!0;break}}if(a){for(let n=0;n<c.rowSpan&&l+n<e.length;n++)t.push(e[l+n]);i=c.rowSpan-1}else i=c.rowSpan-1}}return t};e=e.map(e=>{if(![e.table||[],e.table2||[],e.table3||[]].some(e=>e.some(e=>{var t,i;let a=(null===(t=e.name)||void 0===t?void 0:t.toLowerCase())||"",r=(null===(i=e.func)||void 0===i?void 0:i.toLowerCase())||"";return a.includes(n)||r.includes(n)})))return null;let i={...e};return i.table=t(e.table||[]),e.table2&&(i.table2=t(e.table2||[])),e.table3&&(i.table3=t(e.table3||[])),i}).filter(e=>null!==e)}return e},[B,w,I]),ee=(0,r.useCallback)(e=>{F.Z.trackClick(O.CLICK_BTN_IDs.PRICING_BTNS.SERVERLESS_ENDPOINTS_CALCULATOR,{calcFunc:e}),f(e)},[]),en=(0,r.useCallback)(()=>{f(null)},[]),et=(e,n)=>(0,i.jsx)("div",{className:"flex flex-col gap-space-12 md:hidden",children:n.flatMap((n,t)=>{let a=eS(e,n.segment);return(n.data||[]).map((n,r)=>{let o=a.map(e=>{if("name"===e.dataIndex)return null;let t="Input"===e.dataIndex||"Output"===e.dataIndex?n:n[e.dataIndex],i=e.render?e.render(t,n):t;return null==i||""===i?null:{label:e.title,value:i}}).filter(Boolean),s=n.name||n.func||n.mode||n.resolution||g.Al[e];return(0,i.jsx)(Z,{"data-testid":"model-api-mobile-card",title:s,fields:o},"".concat(t,"-").concat(r))})})});return(0,i.jsxs)("div",{className:"".concat(G().model_api_price," ").concat(s?"w-full px-4 console_model_api_price":"max_width_container"),children:[(0,i.jsxs)("div",{className:"mb-space-12",children:[(0,i.jsxs)("div",{className:"mb-space-12 flex items-center gap-4 ".concat(L?"justify-between":""),children:[L&&(0,i.jsxs)("span",{className:"flex shrink-0 items-center gap-2 whitespace-nowrap font-miletus text-paragraph-13",children:[(0,i.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[var(--text-1)]",children:[(0,i.jsx)(ef.Z,{size:14,"aria-hidden":"true"}),(0,a.I8)("src/app/pricing/components/ModelAPIPrice.yourTeamHasModelDiscount","Your team has model discount"),E.length>1?"s":""]}),(0,i.jsxs)(p.default,{href:"/console/pricing-console/discount",id:O.CLICK_BTN_IDs.PRICING_BTNS.SERVERLESS_ENDPOINTS_MODEL_DISCOUNT,className:"group inline-flex items-center gap-1 font-medium text-[var(--brand-0)] hover:opacity-80 transition-opacity cursor-pointer",children:[(0,a.I8)("src/app/pricing/components/ModelAPIPrice.viewDiscounts","View discounts"),(0,i.jsx)(eb.Z,{size:14,"aria-hidden":"true",className:"transition-transform group-hover:translate-x-0.5"})]})]}),(0,i.jsxs)("p",{className:"font-miletus text-paragraph-13 text-[var(--text-3)] ".concat(L?"text-right":s?"text-left":"text-left md:text-center"),children:[(0,a.I8)("src/app/pricing/components/ModelAPIPrice.batchInferenceIsAvailableAtAn","Batch inference is available at an introductory 50% discount on input and output tokens for supported models.")," ",(0,i.jsx)("a",{href:x.qk.LLM_BATCH_INFERENCE,target:"_blank",rel:"noopener noreferrer",className:"whitespace-nowrap text-[var(--text-2)] underline underline-offset-2 hover:text-[var(--text-1)] transition-colors",id:O.CLICK_BTN_IDs.PRICING_BTNS.PRICING_BATCH_INFERENCE_LEARN_MORE,children:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.learnMore","Learn More")})]})]}),(0,i.jsx)("div",{className:s?"":"flex justify-center",children:(0,i.jsx)(ec,{searchValue:b,filterType:w,selectedProvider:A,availableProviders:Y,onSearchChange:U,onFilterTypeChange:e=>{C(e),M("")},onProviderChange:M,isConsole:s})})]}),"AI Search"===w?(0,i.jsx)(ex,{isConsole:s}):(0,i.jsxs)(i.Fragment,{children:[q&&X.length>0&&(0,i.jsx)("div",{className:"mb-[50px]",children:(0,i.jsx)(Q,{llmList:X,isConsole:s})}),q&&0===t.length&&(0,i.jsxs)("div",{className:"".concat(G().price_card),children:[(0,i.jsx)("h6",{className:G().category_title,children:g.Al[g.mf.EMBEDDING]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(R.O,{className:"h-[30px] rounded-sm animate-pulse"}),(0,i.jsx)(R.O,{className:"h-[30px] rounded-sm animate-pulse my-4"}),(0,i.jsx)(R.O,{className:"h-[30px] rounded-sm animate-pulse"})]})]}),J.map((e,n)=>{var t;let{type:r,description1:o,description2:l,calculate:c,table:d,table2:p,table3:u}=e,h=[{data:d,segment:"t1"},{data:null!=p?p:[],segment:"t2"},{data:null!=u?u:[],segment:"t3"}].filter(e=>e.data.length>0),x=[g.mf.EMBEDDING,g.mf.IMG,g.mf.VIDEO_GENERATOR,g.mf.AUDIO].includes(r),v=o?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:o}),c&&(0,i.jsx)("span",{className:G().calc_btn,onClick:()=>ee(m.Qq[r][0]),children:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.pricingCalculator","Pricing Calculator")}),(0,i.jsx)("span",{children:l||""})]}):null;return(0,i.jsx)("div",{id:null==r?void 0:null===(t=r.description)||void 0===t?void 0:t.toLowerCase().replaceAll(" ","-"),autoFocus:!0,className:"".concat(G().price_card),children:x?(0,i.jsx)("div",{className:"-m-6",children:(0,i.jsx)("div",{className:"bg-white rounded-[6px] border border-[var(--gray-2)] p-4",children:(0,i.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,i.jsxs)("div",{className:"flex-shrink-0 w-full md:w-[224px] px-2 md:pt-4",children:[(0,i.jsx)("h3",{className:"".concat(s?"text-sm md:text-base":"text-base md:text-xl"," font-semibold text-foreground mb-2"),children:g.Al[r]}),v&&(0,i.jsx)("div",{className:"mt-2",children:(0,i.jsx)("p",{className:"text-xs text-[var(--dark-2)] leading-relaxed",children:v})})]}),et(r,h),(0,i.jsx)("div",{className:"hidden flex-1 overflow-x-auto md:block",children:h.map((e,n)=>
1{let t=eS(r,e.segment),a=e.data||[],o=t.some(e=>"name"===e.dataIndex),{rowSpanMap:l,skipNameRows:c}=eM(a,o);return(0,i.jsxs)(_.iA,{className:"".concat(n>0?"mt-8":""," ").concat(G().table_wrap),children:[(0,i.jsx)(_.xD,{children:(0,i.jsx)(_.SC,{className:"hover:bg-transparent",children:t.map(e=>(0,i.jsx)(_.ss,{className:"font-semibold text-[var(--dark-4)] bg-[var(--gray-3)] ".concat(s?"text-xs":"text-xs md:text-sm"),children:e.title},e.dataIndex))})}),(0,i.jsx)(_.RM,{className:"bg-white rounded-lg overflow-hidden",children:a.map((e,n)=>(0,i.jsx)(_.SC,{className:G().table_row_hover,children:t.map(t=>{let a={className:"".concat(G().table_cell," ").concat(s?"text-xs":"text-xs md:text-sm")};return"name"===t.dataIndex&&(o&&void 0!==l[n]?(a.rowSpan=l[n],a.className="".concat(G().table_cell," ").concat(G().table_cell_no_hover," ").concat(s?"text-xs":"text-xs md:text-sm")):e.rowSpan&&(a.rowSpan=e.rowSpan,a.className="".concat(G().table_cell," ").concat(G().table_cell_no_hover," ").concat(s?"text-xs":"text-xs md:text-sm")),o&&c.has(n)||!e.name)?null:"Input"===t.dataIndex||"Output"===t.dataIndex?(0,i.jsx)(_.pj,{...a,children:t.render?t.render(e,e):e[t.dataIndex]},t.dataIndex):(0,i.jsx)(_.pj,{...a,children:t.render?t.render(e[t.dataIndex],e):e[t.dataIndex]},t.dataIndex)})}
1,n))})]},n)})})]})})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h6",{className:G().category_title,children:g.Al[r]}),(0,i.jsxs)("div",{children:[(o||c)&&(0,i.jsxs)("p",{className:G().category_desc,children:[(0,i.jsx)("span",{children:o||""}),c&&(0,i.jsx)("span",{className:G().calc_btn,onClick:()=>ee(m.Qq[r][0]),children:(0,a.I8)("src/app/pricing/components/ModelAPIPrice.pricingCalculator","Pricing Calculator")}),(0,i.jsx)("span",{children:l||""})]}),et(r,h),(0,i.jsx)("div",{className:"hidden md:block",children:h.map((e,n)=>{let t=eS(r,e.segment),a=e.data||[],o=t.some(e=>"name"===e.dataIndex),{rowSpanMap:s,skipNameRows:l}=eM(a,o);return(0,i.jsxs)(_.iA,{className:"".concat(n>0?"mt-8":""," ").concat(G().table_wrap),children:[(0,i.jsx)(_.xD,{children:(0,i.jsx)(_.SC,{children:t.map(e=>(0,i.jsx)(_.ss,{children:e.title},e.dataIndex))})}),(0,i.jsx)(_.RM,{children:a.map((e,n)=>(0,i.jsx)(_.SC,{children:t.map(t=>{let a={className:G().table_cell};return"name"===t.dataIndex&&(o&&void 0!==s[n]?a.rowSpan=s[n]:e.rowSpan&&(a.rowSpan=e.rowSpan),o&&l.has(n)||!e.name)?null:(0,i.jsx)(_.pj,{...a,children:t.render?t.render(e[t.dataIndex],e):e[t.dataIndex]},t.dataIndex)})}
1,n))})]},n)})})]})]})},n)})]}),"All"===w&&(0,i.jsx)(ex,{isConsole:s,searchValue:I}),(0,i.jsx)(V,{copy:eP(),calcFunc:v,onFuncChange:f,onClose:en})]})},eT=t(89447);let eE=e=>(0,f.$Z)(e.toFixed(2));var eD=e=>{let{gpuPriceList:n,loading:t=!1,isConsole:r=!1}=e,o="font-miletus text-[13px] leading-[18px] text-[var(--text-3)] px-space-12 py-space-8 whitespace-nowrap bg-fill-4 border-b border-[var(--border-default)]",s="font-miletus text-[13px] leading-[18px] text-[var(--text-1)] px-space-12 py-space-12",l=(e,n)=>{var t;if(!(null==e?void 0:null===(t=e.instancePrice)||void 0===t?void 0:t.discount))return"-";let a=(0,v.Uj)(+e.instancePrice.discount)*n,r=(0,v.Uj)(+e.instancePrice.price)*n;return e.instancePrice.price!==e.instancePrice.discount?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:["$",eE(a),"/hr"]}),(0,i.jsxs)("span",{className:"ml-space-4 text-[var(--text-3)] line-through",children:["$",eE(r),"/hr"]})]}):"$".concat(eE(a),"/hr")},c=(e,n)=>{var t;return(null==e?void 0:null===(t=e.instanceSpotPrice)||void 0===t?void 0:t.discount)?"$".concat(eE((0,v.Uj)(+e.instanceSpotPrice.discount)*n),"/hr"):"-"};return(0,i.jsxs)("div",{className:"".concat(r?"w-full pl-4 pr-2":"max_width_container"),children:[t&&(0,i.jsxs)("div",{className:"animate-pulse py-4",children:[(0,i.jsx)(R.O,{className:"h-[160px] rounded-xl",style:{backgroundColor:"var(--white)"}}),(0,i.jsx)(R.O,{className:"h-[160px] rounded-xl my-8",style:{backgroundColor:"var(--white)"}}),(0,i.jsx)(R.O,{className:"h-[160px] rounded-xl my-8",style:{backgroundColor:"var(--white)"}})]}
1),(0,i.jsx)("div",{children:n.filter(Boolean).map((e,n)=>{var t,r,d,u,m,h,g,f,b,N,j,P,I,y;return(0,i.jsxs)("div",{className:"bg-white rounded-8 p-space-16 mb-space-16 [box-shadow:none]",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-space-16",children:[(0,i.jsxs)("p",{className:"font-miletus text-paragraph-16-medium text-[var(--text-1)]",children:[(0,a.I8)("src/app/pricing/components/GpuPrice.message1x","1x")+" ",null==e?void 0:e.productName]}),(0,i.jsx)(eT.Z,{type:"text",renderTag:"link",size:"small",link:x.iA.GPU_CONSOLE_EXPLORE,children:(0,a.I8)("src/app/pricing/components/GpuPrice.getStarted","Get Started")})]}),(0,i.jsx)("div",{className:"md:hidden",children:(0,i.jsx)(Z,{title:"1x ".concat(null==e?void 0:e.productName),"data-testid":"gpu-price-mobile-card-".concat(null!==(I=e.productId)&&void 0!==I?I:n),fields:[{label:(0,a.I8)("src/app/pricing/components/GpuPrice.specification","Specification"),value:"".concat((null==e?void 0:e.gpuMemory)?e.gpuMemory+" GB VRAM":"-")},{label:(0,a.I8)("src/app/pricing/components/GpuPrice.onDemand1xGpu","On-Demand \xb7 1x GPU"),value:l(e,1)},{label:(0,a.I8)("src/app/pricing/components/GpuPrice.onDemand8xGpu","On-Demand \xb7 8x GPU"),value:l(e,8)},...(null==e?void 0:e.instanceSpotPrice)&&Number(e.instanceSpotPrice.discount)>0?[{label:(0,i.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-space-8",children:[(0,a.I8)("src/app/pricing/components/GpuPrice.spot1xGpu","Spot \xb7 1x GPU"),(0,i.jsx)(p.default,{href:x.iA.GPUS_SPOT,className:"font-miletus text-[12px] leading-[16px] text-brand-0 hover:opacity-80",children:(0,a.I8)("src/app/pricing/components/GpuPrice.spotInstanceInfo","Spot Instance Info")})]}),value:c(e,1)},{label:(0,a.I8)("src/app/pricing/components/GpuPrice.spot8xGpu","Spot \xb7 8x GPU"),value:c(e,8)}]:[]]})}),(0,i.jsx)("div",{className:"hidden overflow-hidden rounded-8 [box-shadow:none] md:block",children:(0,i.jsxs)(_.iA,{children:[(0,i.jsx)(_.xD,{children:(0,i.jsxs)(_.SC,{className:"h-[48px]",children:[(0,i.jsx)(_.ss,{className:o,children:(0,a.I8)("src/app/pricing/components/GpuPrice.specification","Specification")}),(0,i.jsx)(_.ss,{className:o,children:(0,a.I8)("src/app/pricing/components/GpuPrice.billingMethod","Billing Method")}),(0,i.jsx)(_.ss,{className:o,children:"GPU"}),(0,i.jsx)(_.ss,{className:o,children:(0,a.I8)("src/app/pricing/components/GpuPrice.pricing","Pricing")})]})}),(0,i.jsxs)(_.RM,{children:[(0,i.jsxs)(_.SC,{className:"bg-white border-b border-[var(--border-subtle)] hover:bg-transparent",children:[(0,i.jsx)(_.pj,{className:"".concat(s),rowSpan:(null==e?void 0:e.instanceSpotPrice)?4:2,children:(0,i.jsx)("div",{children:"".concat(e.gpuMemory?e.gpuMemory+" GB VRAM":"-")})}),(0,i.jsx)(_.pj,{className:"".concat(s),rowSpan:2,children:(0,a.I8)("src/app/pricing/components/GpuPrice.onDemand","On-Demand")}),(0,i.jsx)(_.pj,{className:s,children:(0,a.I8)("src/app/pricing/components/GpuPrice.message1xGpu","1x GPU")}),(0,i.jsx)(_.pj,{className:s,children:(0,i.jsx)("div",{children:(null==e?void 0:null===(t=e.instancePrice)||void 0===t?void 0:t.discount)?(null==e?void 0:null===(r=e.instancePrice)||void 0===r?void 0:r.price)!==(null==e?void 0:null===(d=e.instancePrice)||void 0===d?void 0:d.discount)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:["$",eE((0,v.Uj)(+(null==e?void 0:null===(u=e.instancePrice)||void 0===u?void 0:u.discount))),"/hr"]}),(0,i.jsx)("span",{className:"text-[var(--text-3)] ml-space-4 line-through",children:"$".concat(eE((0,v.Uj)(+(null==e?void 0:null===(m=e.instancePrice)||void 0===m?void 0:m.price))),"/hr")})]}):"$".concat(eE((0,v.Uj)(+(null==e?void 0:null===(h=e.instancePrice)||void 0===h?void 0:h.discount))),"/hr"):"-"})})]}),(0,i.jsxs)(_.SC,{className:"bg-white border-b border-[var(--border-subtle)] hover:bg-transparent",children:[(0,i.jsx)(_.pj,{className:s,children:(0,a.I8)("src/app/pricing/components/GpuPrice.message8xGpu","8x GPU")}),(0,i.jsx)(_.pj,{className:s,children:(0,i.jsx)("div",{children:(null==e?void 0:null===(g=e.instancePrice)||void 0===g?void 0:g.discount)?(null==e?void 0:null===(f=e.instancePrice)||void 0===f?void 0:f.price)!==(null==e?void 0:null===(b=e.instancePrice)||void 0===b?void 0:b.discount)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:["$",eE(8*(0,v.Uj)(+(null==e?void 0:null===(N=e.instancePrice)||void 0===N?void 0:N.discount))),"/hr"]}),(0,i.jsx)("span",{className:"text-[var(--text-3)] ml-space-4 line-through",children:"$".concat(eE(8*(0,v.Uj)(+(null==e?void 0:null===(j=e.instancePrice)||void 0===j?void 0:j.price))),"/hr")})]}):"$".concat(eE(8*(0,v.Uj)(+(null==e?void 0:null===(P=e.instancePrice)||void 0===P?void 0:P.discount))),"/hr"):"-"})})]}),(null==e?void 0:e.instanceSpotPrice)&&Number(e.instanceSpotPrice.discount)>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(_.SC,{className:"bg-white border-b border-[var(--border-subtle)] hover:bg-transparent",children:[(0,i.jsxs)(_.pj,{className:"".concat(s),rowSpan:2,children:[(0,a.I8)("src/app/pricing/components/GpuPrice.spot","Spot"),(0,i.jsx)(p.default,{href:x.iA.GPUS_SPOT,className:"font-miletus text-[13px] leading-[18px] text-brand-0 hover:opacity-80 transition-opacity ml-space-8",children:(0,a.I8)("src/app/pricing/components/GpuPrice.spotInstanceInfo","Spot Instance Info")})]}),(0,i.jsx)(_.pj,{className:s,children:(0,a.I8)("src/app/pricing/components/GpuPrice.message1xGpu","1x GPU")}),(0,i.jsx)(_.pj,{className:s,children:(0,i.jsx)("div",{children:"$".concat(eE((0,v.Uj)(+e.instanceSpotPrice.discount)),"/hr")})})]}),(0,i.jsxs)(_.SC,{className:"bg-white border-b border-[var(--border-subtle)] hover:bg-transparent",children:[(0,i.jsx)(_.pj,{className:s,children:(0,a.I8)("src/app/pricing/components/GpuPrice.message8xGpu","8x GPU")}),(0,i.jsx)(_.pj,{className:s,children:(0,i.jsx)("div",{children:"$".concat(eE(8*(0,v.Uj)(+e.instanceSpotPrice.discount)),"/hr")})})]})]})]})]})})]},null!==(y=e.productId)&&void 0!==y?y:n)})})]})};let eV=["Billing Item","Billing Method","Explanation","Billing Logic"];var eR=e=>{let{price:n,isConsole:t=!1}=e,o=(0,r.useMemo)(()=>{let e=n.rootfsStorageFreeSize||"-",t=(0,f.$Z)((0,v.vw)(n.localStoragePrice,n.pricePrecision)),r=(0,f.$Z)((0,v.vw)(n.networkStoragePrice,n.pricePrecision));return[["Container Disk","Pay-as-you-go",(0,i.jsxs)("span",{children:[(0,a.I8)("src/app/pricing/components/StorePrice.supports","Supports")+" ",e,(0,a.I8)("src/app/pricing/components/StorePrice.gbFreeQuotaChargesForThe","GB free quota, charges for the excess based on capacity and usage duration.")]},"1-3"),(0,i.jsxs)("span",{children:[(0,a.I8)("src/app/pricing/components/StorePrice.unitPriceForTheExcess","Unit price for the excess"),(0,i.jsx)("br",{}),(0,a.I8)("src/app/pricing/components/StorePrice.capacity","capacity: $"),t,"/GB/day"]},"1-4")],["Volume Disk","Pay-as-you-go","Charges based on capacity and usage duration.",(0,i.jsxs)("span",{children:[(0,a.I8)("src/app/pricing/components/StorePrice.unitPrice","Unit price: $"),t,"/GB/day"]},"2-4")],["Network Volume","Pay-as-you-go","Charges based on capacity and usage duration.",(0,i.jsxs)("span",{children:[(0,a.I8)("src/app/pricing/components/StorePrice.unitPrice","Unit price: $"),r,"/GB/day"]},"3-4")]]},[n]);return(0,i.jsx)("div",{className:t?"w-full pl-4 pr-2":"max_width_container",style:{paddingBottom:"74px"},children:(0,i.jsxs)("div",{className:"bg-white rounded-8 p-space-16 mb-space-16 [box-shadow:none]",children:[(0,i.jsx)("div",{className:"flex items-center justify-between mb-space-16",children:(0,i.jsx)("h5",{className:"font-miletus text-paragraph-16-medium text-[var(--text-1)] ".concat(t?"text-sm":""),children:(0,a.I8)("src/app/pricing/components/StorePrice.storageResources","Storage Resources")})}),(0,i.jsx)("div",{className:"flex flex-col gap-space-12 md:hidden",children:o.map((e,n)=>(0,i.jsx)(Z,{"data-testid":"store-price-mobile-card",title:e[0],fields:[{label:eV[1],value:e[1]},{label:eV[2],value:e[2]},{label:eV[3],value:e[3]}]},n))}),(0,i.jsx)("div",{className:"hidden overflow-hidden rounded-8 [box-shadow:none] md:block",children:(0,i.jsxs)(_.iA,{children:[(0,i.jsx)(_.xD,{children:(0,i.jsx)(_.SC,{className:"h-[48px]",children:eV.map((e,n)=>(0,i.jsx)(_.ss,{className:"font-miletus text-[13px] leading-[18px] text-[var(--text-3)] px-space-12 py-space-8 whitespace-nowrap bg-fill-4 border-b border-[var(--border-default)]",children:e},n))})}),(0,i.jsx)(_.RM,{children:o.map((e,n)=>(0,i.jsx)(_.SC,{className:"bg-white border-b border-[var(--border-subtle)] hover:bg-transparent",children:e.map((e,n)=>(0,i.jsx)(_.pj,{className:"font-miletus text-[13px] leading-[18px] text-[var(--text-1)] px-space-12 py-space-12",children:e},n))},n))})]})})]})})}
1,eO=t(9596),eF=t.n(eO),eL=t(12279),eG=t.n(eL),eW=t(21822),e$=t(55398),eB=t(21362),eH=t(50062),eZ=t(35337);function eU(e){let{isConsole:n=!1}=e,{rows:t,loading:r,loadingKeys:o}=(0,eZ.ll)();return(0,i.jsx)("div",{style:{marginBottom:"20px"},children:(0,i.jsx)("div",{className:(0,W.cn)(n?"w-full pl-space-16 pr-space-8":"max_width_container",eG().container),children:(0,i.jsx)("div",{children:(0,i.jsx)("article",{className:"flex flex-col ".concat(n?"items-start":"items-center"," pt-0 pb-0"),children:(0,i.jsxs)("div",{className:"w-full bg-white border border-[var(--gray-2)] rounded-6 p-space-16 flex flex-col gap-space-16 overflow-hidden",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-space-8 border-b border-[var(--border-1)] pb-space-24 pt-space-8 px-space-8",children:[(0,i.jsx)("h3",{className:"font-miletus text-paragraph-16-medium text-[var(--text-1)]",children:(0,a.I8)("src/app/pricing/components/DePage.dedicatedEndpoints","Dedicated Endpoints")}),(0,i.jsx)("p",{className:"font-miletus text-paragraph-16 text-[var(--text-3)]",children:(0,a.I8)("src/app/pricing/components/DePage.deployModelsOnIsolatedGpusWith","Deploy models on isolated GPUs with guaranteed performance. Per-second billing, scale-to-zero support.")}),(0,i.jsxs)("div",{className:"flex flex-wrap items-start gap-space-12 font-miletus text-paragraph-16 text-[var(--text-3)] md:gap-space-16",children:[(0,i.jsxs)("span",{className:"flex min-w-0 items-center gap-space-8",children:[(0,i.jsx)(eW.Z,{className:"w-[16px] h-[16px] shrink-0"}),(0,a.I8)("src/app/pricing/components/DePage.guaranteedPerformanceNoSharing","Guaranteed performance (no sharing)")]}),(0,i.jsxs)("span",{className:"flex min-w-0 items-center gap-space-8",children:[(0,i.jsx)(eW.Z,{className:"w-[16px] h-[16px] shrink-0"}),(0,a.I8)("src/app/pricing/components/DePage.supportForCustomModels","Support for custom models")]}),(0,i.jsxs)("span",{className:"flex min-w-0 items-center gap-space-8",children:[(0,i.jsx)(eW.Z,{className:"w-[16px] h-[16px] shrink-0"}),(0,a.I8)("src/app/pricing/components/DePage.autoscalingTrafficSpikeHandling","Autoscaling & traffic spike handling")]})]})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-space-12 md:hidden",children:[r&&o.map(e=>(0,i.jsx)(Z,{title:(0,i.jsx)("div",{className:"h-4 w-[160px] animate-pulse rounded-2 bg-fill-4"}),fields:[{label:"VRAM",value:(0,i.jsx)("div",{className:"h-4 w-[56px] animate-pulse rounded-2 bg-fill-4"})},{label:(0,a.I8)("src/app/pricing/components/DePage.priceGpuHour","PRICE / GPU-HOUR"),value:(0,i.jsx)("div",{className:"h-4 w-[64px] animate-pulse rounded-2 bg-fill-4"})}]},e)),!r&&t.map(e=>(0,i.jsx)(Z,{title:(0,i.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-space-8",children:[e.displayName,e.popular&&(0,i.jsx)("span",{className:"rounded-4 bg-status-success-bg px-space-6 py-[2px] font-mono-11 text-[var(--text-1)]",children:(0,a.I8)("src/app/pricing/components/DePage.popular","Popular")})]}),fields:[{label:"VRAM",value:e.vram},{label:(0,a.I8)("src/app/pricing/components/DePage.priceGpuHour","PRICE / GPU-HOUR"),value:e.pricePerHour}]},e.displayName))]}),(0,i.jsxs)("table",{className:"hidden w-full border-collapse md:table",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{className:"bg-[var(--gray-100)] h-[48px]",children:[(0,i.jsx)("th",{className:"px-space-12 py-space-8 text-left font-miletus text-paragraph-14 font-normal text-[var(--text-2)] w-[40%]",children:"GPU"}),(0,i.jsx)("th",{className:"px-space-12 py-space-8 text-left font-miletus text-paragraph-14 font-normal text-[var(--text-2)]",children:"VRAM"}),(0,i.jsx)("th",{className:"px-space-12 py-space-8 text-right font-miletus text-paragraph-14 font-normal text-[var(--text-2)]",children:(0,a.I8)("src/app/pricing/components/DePage.priceGpuHour","PRICE / GPU-HOUR")})]})}),(0,i.jsxs)("tbody",{children:[r&&o.map(e=>(0,i.jsxs)("tr",{className:"h-[48px] border-b border-[var(--gray-2)] bg-white",children:[(0,i.jsx)("td",{className:"px-space-12 py-space-12",children:(0,i.jsx)("div",{className:"h-4 w-[160px] animate-pulse rounded-2 bg-fill-4"})}),(0,i.jsx)("td",{className:"px-space-12 py-space-12",children:(0,i.jsx)("div",{className:"h-4 w-[56px] animate-pulse rounded-2 bg-fill-4"})}),(0,i.jsx)("td",{className:"px-space-12 py-space-12",children:(0,i.jsx)("div",{className:"ml-auto h-4 w-[64px] animate-pulse rounded-2 bg-fill-4"})})]},e)),!r&&t.map(e=>(0,i.jsxs)("tr",{className:"h-[48px] border-y border-[var(--gray-2)] bg-white",children:[(0,i.jsx)("td",{className:"px-space-12 py-space-12 font-miletus text-paragraph-14 text-[var(--text-2)]",children:(0,i.jsxs)("div",{className:"flex items-center gap-space-12",children:[(0,i.jsx)("span",{children:e.displayName}),e.popular&&(0,i.jsx)("span",{className:"rounded-4 bg-status-success-bg px-space-6 py-[2px] font-mono-11 text-[var(--text-1)]",children:(0,a.I8)("src/app/pricing/components/DePage.popular","Popular")})]})}),(0,i.jsx)("td",{className:"px-space-12 py-space-12 font-miletus text-paragraph-14 text-[var(--text-2)]",children:e.vram}),(0,i.jsx)("td",{className:"px-space-12 py-space-12 text-right font-miletus text-paragraph-14 text-[var(--text-2)]",children:e.pricePerHour})]},e.displayName))]})]}),(0,i.jsx)("p",{className:"font-miletus text-paragraph-16 text-[var(--text-3)]",children:(0,a.I8)("src/app/pricing/components/DePage.perSecondBillingOnRunningReplicas","Per-second billing on running replicas only. Scale to zero, pay zero.")}
1),(0,i.jsxs)("div",{className:"flex items-center gap-space-12",children:[(0,i.jsx)(eB.Button,{asChild:!0,className:"h-[44px] font-miletus font-paragraph-15",children:(0,i.jsx)(eH.default,{href:x.iA.MODEL_API_CONSOLE_LLM_DE,id:O.CLICK_BTN_IDs.PRICING_BTNS.LLM_DEDICATED_ENDPOINT_CREATE_ENDPOINT,loginRequired:!0,children:(0,a.I8)("src/app/pricing/components/DePage.createEndpoint","Create Endpoint")})}),(0,i.jsxs)(eT.Z,{type:"text",height:44,renderTag:"link",link:x.S$,className:"px-space-12 font-miletus gap-space-4",children:[(0,a.I8)("src/app/pricing/components/DePage.contactSales","Contact Sales"),(0,i.jsx)(e$.Z,{className:"w-space-16 h-space-16"})]})]})]})})})})})}let ez=e=>(0,f.$Z)(e);var eY=e=>{let{sandboxPriceInfo:n,sandboxStorageInfo:t,isConsole:o=!1}=e,[s,l]=(0,r.useState)((0,ep.Z)((null==n?void 0:n.discountPrice0)||0).div((0,ep.Z)((null==n?void 0:n.pricePrecision)||1)).div(1e4)),[c,d]=(0,r.useState)((0,ep.Z)((null==n?void 0:n.basePrice0)||0).div((0,ep.Z)((null==n?void 0:n.pricePrecision)||1)).div(1e4)),[p,u]=(0,r.useState)((0,ep.Z)((null==n?void 0:n.discountPrice1)||0).div((0,ep.Z)((null==n?void 0:n.pricePrecision)||1)).div(1e4)),[m,h]=(0,r.useState)((0,ep.Z)((null==n?void 0:n.basePrice1)||0).div((0,ep.Z)((null==n?void 0:n.pricePrecision)||1)).div(1e4)),[g,v]=(0,r.useState)((0,ep.Z)((null==t?void 0:t.discountPrice0)||0).div((0,ep.Z)((null==t?void 0:t.pricePrecision)||1)).div(1e4)),[f,b]=(0,r.useState)((0,ep.Z)((null==t?void 0:t.basePrice0)||0).div((0,ep.Z)((null==t?void 0:t.pricePrecision)||1)).div(1e4));(0,r.useEffect)(()=>
1{l((0,ep.Z)((null==n?void 0:n.discountPrice0)||0).div((0,ep.Z)((null==n?void 0:n.pricePrecision)||1)).div(1e4)),d((0,ep.Z)((null==n?void 0:n.basePrice0)||0).div((0,ep.Z)((null==n?void 0:n.pricePrecision)||1)).div(1e4))},[n]),(0,r.useEffect)(()=>{u((0,ep.Z)((null==n?void 0:n.discountPrice1)||0).div((0,ep.Z)((null==n?void 0:n.pricePrecision)||1)).div(1e4)),h((0,ep.Z)((null==n?void 0:n.basePrice1)||0).div((0,ep.Z)((null==n?void 0:n.pricePrecision)||1)).div(1e4))},[n]),(0,r.useEffect)(()=>{v((0,ep.Z)((null==t?void 0:t.discountPrice0)||0).div((0,ep.Z)((null==t?void 0:t.pricePrecision)||1)).div(1e4)),b((0,ep.Z)((null==t?void 0:t.basePrice0)||0).div((0,ep.Z)((null==t?void 0:t.pricePrecision)||1)).div(1e4))},[t]);let N="font-miletus text-[13px] leading-[18px] text-[var(--text-3)] px-space-12 py-space-8 whitespace-nowrap bg-fill-4 border-b border-[var(--border-default)]",j="font-miletus text-[13px] leading-[18px] text-[var(--text-1)] px-space-12 py-space-12",P="bg-white rounded-8 p-space-16 mb-space-16 [box-shadow:none]",I=[1,2,3,4,5,6,7,8],y=[512,1024,2048],S="Each account includes 60 GB of free storage. Usage beyond this limit is billed on a pay-as-you-go basis.",w=e=>n&&(n.basePrice0||0===n.basePrice0)?n.discountPrice0===n.basePrice0?(0,i.jsxs)(i.Fragment,{children:["$",ez(s.mul((0,ep.Z)(e)).toFixed(9).replace(/\.?0+$/,"")),"/s"]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:["$",ez(s.mul((0,ep.Z)(e)).toFixed(9).replace(/\.?0+$/,"")),"/s"]}),(0,i.jsxs)("span",{className:"ml-space-4 text-[var(--text-3)] line-through",children:["$",ez(c.mul((0,ep.Z)(e)).toFixed(9).replace(/\.?0+$/,"")),"/s"]})]}):(0,i.jsx)(R.O,{className:"h-5 rounded-sm animate-pulse"}),C=(e,t)=>{if(!n||!n.basePrice1&&0!==n.basePrice1)return(0,i.jsx)(R.O,{className:"h-5 rounded-sm animate-pulse"});let a=0===t?p.div(2).toFixed(9).replace(/\.?0+$/,""):Number(p.mul((0,ep.Z)(e).div(1024)).toFixed(9).replace(/\.?0+$/,"")).toString(),r=0===t?m.div(2).toFixed(9).replace(/\.?0+$/,""):Number(m.mul((0,ep.Z)(e).div(1024)).toFixed(9).replace(/\.?0+$/,"")).toString();return n.discountPrice1===n.basePrice1?"$".concat(ez(a),"/s"):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:["$",ez(a),"/s"]}),(0,i.jsxs)("span",{className:"ml-space-4 text-[var(--text-3)] line-through",children:["$",ez(r),"/s"]})]})};return(0,i.jsxs)("div",{className:"".concat(o?"w-full pl-4 pr-2":"max_width_container"),children:[(0,i.jsxs)("div",{className:P,children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-space-16",children:[(0,i.jsx)("h5",{className:"font-miletus text-paragraph-16-medium text-[var(--text-1)]",children:(0,a.I8)("src/app/pricing/components/SandboxPrice.cpu","CPU")}),(0,i.jsx)(eT.Z,{type:"text",size:"small",renderTag:"link",link:x.qk.SANDBOX_PRICING,children:(0,a.I8)("src/app/pricing/components/SandboxPrice.integrationGuide","Integration Guide")})]}),(0,i.jsx)("div",{className:"md:hidden",children:(0,i.jsx)(Z,{title:(0,a.I8)("src/app/pricing/components/SandboxPrice.cpu","CPU"),"data-testid":"sandbox-mobile-card-cpu",fields:I.map(e=>({label:(0,i.jsxs)(i.Fragment,{children:[e,(0,a.I8)("src/app/pricing/components/SandboxPrice.xCpu","X CPU")]}),value:w(e)}))})}),(0,i.jsx)("div",{className:"hidden overflow-hidden rounded-8 [box-shadow:none] md:block",children:(0,i.jsxs)(_.iA,{children:[(0,i.jsx)(_.xD,{children:(0,i.jsxs)(_.SC,{className:"h-[48px]",children:[(0,i.jsx)(_.ss,{className:"".concat(N," w-[50%]"),children:(0,a.I8)("src/app/pricing/components/SandboxPrice.vcpus","vCPUs")}),(0,i.jsx)(_.ss,{className:"".concat(N," w-[50%]"),children:(0,a.I8)("src/app/pricing/components/SandboxPrice.unitPrice","Unit Price")})]})}),(0,i.jsx)(_.RM,{children:I.map((e,t)=>(0,i.jsxs)(_.SC,{className:"bg-white border-b border-[var(--border-subtle)]",children:[(0,i.jsxs)(_.pj,{className:"".concat(j," w-[50%]"),children:[e,(0,a.I8)("src/app/pricing/components/SandboxPrice.xCpu","X CPU")]}),(0,i.jsx)(_.pj,{className:"".concat(j," w-[50%]"),children:n&&(n.basePrice0||0===n.basePrice0)?(null==n?void 0:n.discountPrice0)!==(null==n?void 0:n.basePrice0)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:["$",ez(s.mul((0,ep.Z)(e)).toFixed(9).replace(/\.?0+$/,"")),"/s"]}),(0,i.jsxs)("span",{className:"text-[var(--text-3)] ml-space-4 line-through",children:["$",ez(c.mul((0,ep.Z)(e)).toFixed(9).replace(/\.?0+$/,"")),"/s"]})]}):(0,i.jsxs)(i.Fragment,{children:["$",ez(s.mul((0,ep.Z)(e)).toFixed(9).replace(/\.?0+$/,"")),"/s"]}):(0,i.jsx)(R.O,{className:"h-5 rounded-sm animate-pulse"})})]},t))})]})})]}),(0,i.jsxs)("div",{className:P,children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-space-16",children:[(0,i.jsx)("h5",{className:"font-miletus text-paragraph-16-medium text-[var(--text-1)]",children:(0,a.I8)("src/app/pricing/components/SandboxPrice.memory","Memory")}),(0,i.jsx)(eT.Z,{type:"text",size:"small",renderTag:"link",link:x.qk.SANDBOX_PRICING,children:(0,a.I8)("src/app/pricing/components/SandboxPrice.integrationGuide","Integration Guide")})]}),(0,i.jsx)("div",{className:"md:hidden",children:(0,i.jsx)(Z,{title:(0,a.I8)("src/app/pricing/components/SandboxPrice.memory","Memory"),"data-testid":"sandbox-mobile-card-memory",fields:[{label:(0,a.I8)("src/app/pricing/components/SandboxPrice.validValuesMultiplesOf512Mib","Valid values: multiples of 512 MiB, from 512 MiB to 8192 MiB"),value:n&&(n.basePrice1||0===n.basePrice1)?n.discountPrice1===n.basePrice1?(0,i.jsxs)(i.Fragment,{children:["$",ez(p.mul((0,ep.Z)(1)).toFixed(9).replace(/\.?0+$/,"")),"/GiB/s"]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:["$",ez(p.mul((0,ep.Z)(1)).toFixed(9).replace(/\.?0+$/,"")),"/GiB/s"]}),(0,i.jsxs)("span",{className:"ml-space-4 text-[var(--text-3)] line-through",children:["$",ez(m.mul((0,ep.Z)(1)).toFixed(9).replace(/\.?0+$/,"")),"/GiB/s"]})]}):(0,i.jsx)(R.O,{className:"h-5 rounded-sm animate-pulse"})},...y.map((e,n)=>({label:0===n?"512 MiB":"".concat((0,ep.Z)(e).div(1024).toString()," GiB"),value:C(e,n)}))]})}),(0,i.jsx)("div",{className:"hidden overflow-hidden rounded-8 [box-shadow:none] md:block",children:(0,i.jsxs)(_.iA,{children:[(0,i.jsx)(_.xD,{children:(0,i.jsxs)(_.SC,{className:"h-[48px]",children:[(0,i.jsx)(_.ss,{className:"".concat(N," w-[50%]"),children:(0,a.I8)("src/app/pricing/components/SandboxPrice.memory","Memory")}),(0,i.jsx)(_.ss,{className:"".concat(N," w-[50%]"),children:(0,a.I8)("src/app/pricing/components/SandboxPrice.unitPrice","Unit Price")})]})}),(0,i.jsxs)(_.RM,{children:[(0,i.jsxs)(_.SC,{className:"bg-white border-b border-[var(--border-subtle)]",children:[(0,i.jsx)(_.pj,{className:"".concat(j," w-[50%]"),children:(0,a.I8)("src/app/pricing/components/SandboxPrice.validValuesMultiplesOf512Mib","Valid values: multiples of 512 MiB, from 512 MiB to 8192 MiB")}),(0,i.jsx)(_.pj,{className:"".concat(j," w-[50%]"),children:n&&(n.basePrice1||0===n.basePrice1)?(null==n?void 0:n.discountPrice1)===(null==n?void 0:n.basePrice1)?(0,i.jsx)(i.Fragment,{children:"$"+ez(p.mul((0,ep.Z)(1)).toFixed(9).replace(/\.?0+$/,""))+"/GiB/s"}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"text-[var(--brand-1)]",children:"$"+ez(p.mul((0,ep.Z)(1)).toFixed(9).replace(/\.?0+$/,""))+"/GiB/s"}),(0,i.jsx)("span",{className:"text-[var(--text-3)] ml-space-4 line-through",children:"$"+ez(m.mul((0,ep.Z)(1)).toFixed(9).replace(/\.?0+$/,""))+"/GiB/s"})]}):(0,i.jsx)(R.O,{className:"h-5 rounded-sm animate-pulse"})})]},-1),y.map((e,t)=>(0,i.jsxs)(_.SC,{className:"bg-white border-b border-[var(--border-subtle)]",children:[(0,i.jsx)(_.pj,{className:"".concat(j," w-[50%]"),children:0===t?(0,a.I8)("src/app/pricing/components/SandboxPrice.message512Mib","512 MiB"):"".concat((0,ep.Z)(e).div(1024).toString()," GiB")}),(0,i.jsx)(_.pj,{className:"".concat(j," w-[50%]"),children:n&&(n.basePrice1||0===n.basePrice1)?(null==n?void 0:n.discountPrice1)===(null==n?void 0:n.basePrice1)?(0,i.jsx)(i.Fragment,{children:0===t?"$"+ez(p.div(2).toFixed(9).replace(/\.?0+$/,""))+"/s":"$"+ez(Number(p.mul((0,ep.Z)(e).div(1024)).toFixed(9)))+"/s"}):(0,i.jsx)(i.Fragment,{children:0===t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:[" ","$"+ez(p.div(2).toFixed(9).replace(/\.?0+$/,""))+"/s"]}),(0,i.jsxs)("span",{className:"text-[var(--text-3)] ml-space-4 line-through",children:[" ","$"+ez(m.div(2).toFixed(9).replace(/\.?0+$/,""))+"/s"]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:[" ","$"+ez(Number(p.mul((0,ep.Z)(e).div(1024)).toFixed(9).replace(/\.?0+$/,"")))+"/s"]}),(0,i.jsxs)("span",{className:"text-[var(--text-3)] ml-space-4 line-through",children:[" ",ez(Number(m.mul((0,ep.Z)(e).div(1024)).toFixed(9).replace(/\.?0+$/,"")))+"/s"]})]})}):(0,i.jsx)(R.O,{className:"h-5 rounded-sm animate-pulse"})})]},t))]})]})})]}),(0,i.jsxs)("div",{className:P,children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-space-16",children:[(0,i.jsx)("h5",{className:"font-miletus text-paragraph-16-medium text-[var(--text-1)]",children:(0,a.I8)("src/app/pricing/components/SandboxPrice.storage","Storage")}),(0,i.jsx)(eT.Z,{type:"text",size:"small",renderTag:"link",link:x.qk.SANDBOX_PRICING,children:(0,a.I8)("src/app/pricing/components/SandboxPrice.integrationGuide","Integration Guide")})]}),(0,i.jsx)("div",{className:"md:hidden",children:(0,i.jsx)(Z,{title:(0,a.I8)("src/app/pricing/components/SandboxPrice.storage","Storage"),"data-testid":"sandbox-mobile-card-storage",fields:[{label:S,value:(()=>
1{if(!t||!t.basePrice0&&0!==t.basePrice0)return(0,i.jsx)(R.O,{className:"h-5 rounded-sm animate-pulse"});let e=0===g.toNumber()?(0,i.jsx)("span",{className:"flex h-5 w-8 items-center justify-center rounded-[2px] bg-[var(--green-7)] font-miletus text-paragraph-12 text-[var(--green-2)]",children:(0,a.I8)("src/app/pricing/components/SandboxPrice.free","Free")}):(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:["$",ez(g.toFixed(9).replace(/\.?0+$/,"")),"/GB/h"]});return t.discountPrice0===t.basePrice0?0===g.toNumber()?e:(0,i.jsxs)(i.Fragment,{children:["$",ez(g.toFixed(9).replace(/\.?0+$/,"")),"/GB/h"]}):(0,i.jsxs)(i.Fragment,{children:[e,(0,i.jsxs)("span",{className:"ml-space-4 text-[var(--text-3)] line-through",children:["$",ez(f.toFixed(9).replace(/\.?0+$/,"")),"/GB/h"]})]})})()}]})}),(0,i.jsx)("div",{className:"hidden overflow-hidden rounded-8 [box-shadow:none] md:block",children:(0,i.jsxs)(_.iA,{children:[(0,i.jsx)(_.xD,{children:(0,i.jsxs)(_.SC,{className:"h-[48px]",children:[(0,i.jsx)(_.ss,{className:"".concat(N," w-[50%]"),children:(0,a.I8)("src/app/pricing/components/SandboxPrice.storage","Storage")}),(0,i.jsx)(_.ss,{className:"".concat(N," w-[50%]"),children:(0,a.I8)("src/app/pricing/components/SandboxPrice.unitPrice","Unit Price")})]})}),(0,i.jsx)(_.RM,{children:[S].map((e,n)=>(0,i.jsxs)(_.SC,{className:"bg-white border-b border-[var(--border-subtle)]",children:[(0,i.jsx)(_.pj,{className:"".concat(j," w-[50%]"),children:"".concat(e)}),(0,i.jsx)(_.pj,{className:"".concat(j," w-[50%]"),children:t&&(t.basePrice0||0===t.basePrice0)?(null==t?void 0:t.discountPrice0)!==(null==t?void 0:t.basePrice0)?(0,i.jsxs)(i.Fragment,{children:[0===g.toNumber()?(0,i.jsx)("span",{className:"w-8 h-5 rounded-[2px] bg-[var(--green-7)] text-[var(--green-2)] font-miletus text-paragraph-12 flex items-center justify-center",children:(0,a.I8)("src/app/pricing/components/SandboxPrice.free","Free")}):(0,i.jsxs)("span",{className:"text-[var(--brand-1)]",children:["$",ez(g.toFixed(9).replace(/\.?0+$/,"")),"/GB/h"]}),(0,i.jsxs)("span",{className:"text-[var(--text-3)] ml-space-4 line-through",children:["$",ez(f.toFixed(9).replace(/\.?0+$/,"")),"/GB/h"]})]}):(0,i.jsx)(i.Fragment,{children:0===g.toNumber()?(0,i.jsx)("span",{className:"w-8 h-5 rounded-[2px] bg-[var(--green-7)] text-[var(--green-2)] font-miletus text-paragraph-12 flex items-center justify-center",children:(0,a.I8)("src/app/pricing/components/SandboxPrice.free","Free")}):(0,i.jsxs)(i.Fragment,{children:["$",ez(g.toFixed(9).replace(/\.?0+$/,"")),"/GB/h"]})}):(0,i.jsx)(R.O,{className:"h-5 rounded-sm animate-pulse"})})]},n))})]})})]})]})},eq=t(21446),eX=t(20146),eK=t(49586),eQ=e=>{let{initialFullLLMModels:n,isConsole:t=!1}=e,p=(0,ev.TL)(),u=(0,ev.CG)(eK.ZQ),m=(0,ev.CG)(eK.di),{noticeHeight:h}=(0,eX.to)(),g=t?0:eX.uD+h+24,_=(0,r.useRef)(null),x=(0,r.useRef)(null),v=(0,r.useRef)(null),f=(0,r.useMemo)(()=>(n||[]).filter(e=>{let n=Array.isArray(e.features)?e.features:e.features?[e.features]:[];return e.type===eq.BY.Chat&&n.some(e=>"serverless"===e.toLowerCase())}).map(e=>{var n,t,i,a;return{...e,sort:e?(0,N.DF)(null===(n=e.input_pricing)||void 0===n?void 0:n.pricePerMDecimal)&&(0,N.DF)(null===(t=e.output_pricing)||void 0===t?void 0:t.pricePerMDecimal)?2:(0,N.DF)(null===(i=e.input_pricing)||void 0===i?void 0:i.pricePerMDecimal)||(0,N.DF)(null===(a=e.output_pricing)||void 0===a?void 0:a.pricePerMDecimal)?1:0:0}}).sort((e,n)=>n.sort-e.sort),[n]),b=(0,r.useMemo)(()=>(n||[]).filter(e=>e.type===eq.BY.Embedding),[n]),[j,P]=(0,r.useState)([]),[I,y]=(0,r.useState)(null),[S,w]=(0,r.useState)("model"),[C,A]=(0,r.useState)(!1),M=(0,o.useSearchParams)(),[k,T]=(0,r.useState)({}),[E,D]=(0,r.useState)({});(0,r.useEffect)(()=>{(()=>{let e=window.location.hash;if(e&&e.length>1){let n=document.getElementById(e.slice(1));n&&n.scrollIntoView({block:"center",behavior:"smooth"})}})()},[f,b,j,I]),(0,r.useEffect)(()=>{let e=M.get("gpu"),n=M.get("de"),t=M.get("sandbox"),i=M.get("ai-search");e&&w("gpu"),t&&w("sandbox"),n&&w("de"),i&&w("model")},[M]),(0,r.useEffect)(()=>{let e=async()=>{try{let e=await (0,d.SO)({});T(e)}catch(e){}},n=async()=>{try{var e;let n=await (0,d.Fd)({productIds:["sandbox-storage"],businessType:"cloud_sandbox"});D((null==n?void 0:null===(e=n.products)||void 0===e?void 0:e.length)>0?n.products[0]:{})}catch(e){}};(async()=>{try{A(!0);let[e,n]=await Promise.all([(0,l.wu)({cpuModel:4,memoryModel:8}),(0,c.YL)()]);P(Array.isArray(null==e?void 0:e.products)?e.products:[]),y(n)}catch(e){}finally{A(!1)}})(),e(),n()},[]),(0,r.useEffect)(()=>{p((0,eK.ed)(!1))},[p]),(0,r.useEffect)(()=>{t||requestAnimationFrame(()=>{let e=x.current,n=null==e?void 0:e.querySelector('[data-tab-value="'.concat(S,'"]'));if(!e||!n||e.scrollWidth<=e.clientWidth)return;let t=e.getBoundingClientRect(),i=n.getBoundingClientRect(),a=parseFloat(getComputedStyle(e).paddingLeft),r=e.scrollLeft+i.left-t.left-a;e.scrollTo({left:Math.max(0,r),behavior:"smooth"})})},[S,t]);let V=(0,r.useCallback)(e=>{let n=_.current,t=null!==n&&n.getBoundingClientRect().top<=g+1;w(e),t&&requestAnimationFrame(()=>{let e=v.current;if(!e)return;let t=n.offsetHeight,i=e.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:i-g-t,behavior:"smooth"})})},[g]);return(0,i.jsx)("div",{className:"".concat(eF().container," ").concat(t?"console_container":"relative z-10 md:-mt-[60px]"),children:(0,i.jsxs)(s.mQ,{defaultValue:S,value:S,onValueChange:V,children:[(0,i.jsx)("div",{ref:_,className:"flex ".concat(t?"justify-start":"justify-center"," ").concat(eF().tabs_header_wrap," ").concat(t?eF().console_sticky:eF().website_sticky),style:t?void 0:{top:"".concat(g,"px")},children:(0,i.jsx)(s.dr,{ref:x,className:t?"w-full pr-space-8":"w-full overflow-x-auto overflow-y-hidden px-space-16 md:mx-auto md:max-w-[var(--max-width)] md:px-0",align:"left",tabsStyle:"line",children:(0,i.jsxs)("div",{className:"flex w-full ".concat(t?"justify-start":"justify-start md:justify-center"," ").concat(t?"gap-space-8":"min-w-max gap-space-8 md:min-w-0 md:gap-[48px]"),children:[(0,i.jsx)(s.SP,{value:"model","data-tab-value":"model",className:"".concat(t?"console-tab ".concat(eF().console_tab_item):""," ").concat(eF().tab_item," xl:max-w-[200px]"),id:O.CLICK_BTN_IDs.PRICING_BTNS.FIRST_PAGE_SERVERLESS_ENDPOINTS_TAB,children:"Serverless Endpoints"}),(0,i.jsx)(s.SP,{value:"de","data-tab-value":"de",className:"".concat(t?"console-tab ".concat(eF().console_tab_item):""," ").concat(eF().tab_item," xl:max-w-[200px]"),id:O.CLICK_BTN_IDs.PRICING_BTNS.FIRST_PAGE_DEDICATED_ENDPOINTS_TAB,children:(0,a.I8)("src/app/pricing/components/DetailContent.dedicatedEndpoints","Dedicated Endpoints")}),(0,i.jsx)(s.SP,{value:"sandbox","data-tab-value":"sandbox",className:"".concat(t?"console-tab ".concat(eF().console_tab_item):""," ").concat(eF().tab_item," xl:max-w-[200px]"),id:O.CLICK_BTN_IDs.PRICING_BTNS.FIRST_PAGE_SANDBOX_TAB,children:(0,a.I8)("src/app/pricing/components/DetailContent.agentSandbox","Agent Sandbox")}),(0,i.jsx)(s.SP,{value:"gpu","data-tab-value":"gpu",className:"".concat(t?"console-tab ".concat(eF().console_tab_item):""," ").concat(eF().tab_item," ").concat(t?eF().console_gpu_tab:""," ").concat(t?"xl:max-w-[120px]":"xl:max-w-[200px]"),id:O.CLICK_BTN_IDs.PRICING_BTNS.FIRST_PAGE_GPUS_TAB,children:(0,a.I8)("src/app/pricing/components/DetailContent.gpus","GPUs")})]})})}),(0,i.jsxs)("div",{ref:v,className:eF().tabs_content_wrap,children:[(0,i.jsx)(s.nU,{value:"model",className:t?"pt-space-16":"",children:(0,i.jsx)(ek,{llmList:f,embeddingList:b,isConsole:t,dynamicModelConfigs:u,dynamicPriceMap:m})}),(0,i.jsx)(s.nU,{value:"de",className:"pt-space-16",children:(0,i.jsx)(eU,{isConsole:t})}),(0,i.jsx)(s.nU,{value:"sandbox",className:"pt-space-16",children:(0,i.jsx)(eY,{sandboxPriceInfo:k,sandboxStorageInfo:E,isConsole:t})}),(0,i.jsxs)(s.nU,{value:"gpu",className:"pt-space-16",children:[(0,i.jsx)(eD,{gpuPriceList:j,loading:C,isConsole:t}),!C&&I&&(0,i.jsx)(eR,{price:I,isConsole:t})]})]})]})})}},29144:function(e,n,t){"use strict";t.d(n,{VisitReport:function(){return o}});var i=t(5405),a=t(20366),r=t(2265);function o(){let e=(0,a.CG)(e=>e.user);return(0,r.useEffect)(()=>{e.uid&&e.uuid&&(0,i.$H)({uid:String(e.uid),action:"PAGE_VIEW_PRICING"})},[e.uid,e.uuid]),null}},75618:function(e,n,t){"use strict";t.d(n,{Y:function(){return o}});var i=t(57437),a=t(43076),r=t(32713);function o(e){let{value:n,defaultValue:t,min:o,max:s,step:l,precision:c,controls:d,className:p,onChange:u,onBlur:m,onWheel:h,...g}=e;return(0,i.jsx)(a.I,{...g,...void 0===n?{defaultValue:null!=t?t:void 0}:{value:null!=n?n:""},type:"number",inputMode:"decimal",min:o,max:s,step:l,className:(0,r.cn)("h-9",p),onChange:e=>{null==u||u(function(e,n,t,i){if(""===e)return null;let a=Number(e);if(Number.isNaN(a))return null;let r="number"==typeof n&&a<n?n:"number"==typeof t&&a>t?t:a;return"number"==typeof i?Number(r.toFixed(i)):r}(e.target.value,o,s,c))},onBlur:e=>{null==m||m(e)},onWheel:e=>{e.currentTarget.blur(),null==h||h(e)}})}},6020:function(e,n,t){"use strict";t.d(n,{j:function(){return o}});var i=t(57437),a=t(65375),r=t(32713);function o(e){let{value:n,defaultValue:t,placeholder:o,disabled:s,className:l,triggerClassName:c,contentClassName:d,options:p,onFocus:u,onBlur:m,onCh
1ange:h}=e,g=new Map(p.flatMap(e=>"options"in e?e.options:[e]).map(e=>[String(e.value),e.value]));return(0,i.jsxs)(a.Ph,{value:void 0===n?void 0:String(n),defaultValue:void 0===t?void 0:String(t),disabled:s,onValueChange:e=>{var n;null==h||h(null!==(n=g.get(e))&&void 0!==n?n:e)},children:[(0,i.jsx)(a.i4,{className:(0,r.cn)("h-9",c,l),onFocus:u,onBlur:m,children:(0,i.jsx)(a.ki,{placeholder:o})}),(0,i.jsx)(a.Bw,{className:d,children:p.map(e=>{var n;return"options"in e?(0,i.jsxs)(a.DI,{children:[(0,i.jsx)(a.n5,{children:e.label}),e.options.map(e=>{var n;return(0,i.jsx)(a.Ql,{value:String(e.value),disabled:e.disabled,children:null!==(n=e.label)&&void 0!==n?n:e.value},String(e.value))})]},String(e.label)):(0,i.jsx)(a.Ql,{value:String(e.value),disabled:e.disabled,children:null!==(n=e.label)&&void 0!==n?n:e.value},String(e.value))})})]})}},84953:function(e,n,t){"use strict";t.d(n,{RM:function(){return d},SC:function(){return p},Yy:function(){return h},ZP:function(){return h},iA:function(){return l},pj:function(){return m},ss:function(){return u},xD:function(){return c}});var i=t(57437),a=t(2265),r=t(72905),o=t.n(r),s=t(32713);let l=a.forwardRef((e,n)=>{let{className:t,loading:a,wrapperClassName:r,...l}=e;return(0,i.jsx)("div",{className:(0,s.cn)("relative w-full overflow-auto scrollBar_container",a&&o().table_loading,r),style:l.style,children:(0,i.jsx)("table",{ref:n,className:(0,s.cn)("relative w-full caption-bottom text-sm",t),...l})})});l.displayName="Table";let c=a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,i.jsx)("thead",{ref:n,className:(0,s.cn)("[&_tr]:border-b",t),...a})});c.displayName="TableHeader";let d=a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,i.jsx)("tbody",{ref:n,className:"".concat((0,s.cn)("",t)," ").concat(o().table_body),...a})});d.displayName="TableBody",a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,i.jsx)("tfoot",{ref:n,className:(0,s.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...a})}).displayName="TableFooter";let p=a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,i.jsx)("tr",{ref:n,className:(0,s.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted group",t),...a})});p.displayName="TableRow";let u=a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,i.jsx)("th",{ref:n,className:(0,s.cn)("font-table-head text-left px-4 py-2",t),style:{color:"var(--dark-2)"},...a})});u.displayName="TableHead";let m=a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,i.jsx)("td",{ref:n,className:(0,s.cn)("px-4 py-[14px] align-middle font-table-item border-border [&:has([role=checkbox])]:pr-0",t),style:{color:"var(--black)"},...a})});function h(e){let{className:n}=e;return(0,i.jsx)("tr",{className:(0,s.cn)("absolute inset-0 mx-auto left-1/2 top-[calc(33%+40px)]",o().spinner,n),children:(0,i.jsx)("td",{className:"iconfont icon-loader inline-block animate-spin",style:{fontSize:24,color:"var(--dark-3)",animationDuration:"1.6s"}})})}m.displayName="TableCell",a.forwardRef((e,n)=>{let{className:t,...a}=e;return(0,i.jsx)("caption",{ref:n,className:(0,s.cn)("mt-4 text-sm text-muted-foreground",t),...a})}).displayName="TableCaption",h.displayName="TableSpinner"},88183:function(e,n,t){"use strict";t.d(n,{$A:function(){return l},TF:function(){return o},Wo:function(){return a},aX:function(){return s},nc:function(){return c},vo:function(){return r}});var i=t(91098);function a(e){return null==e||"string"==typeof e&&""===e.trim()}function r(e){if(a(e))return"-";let n=Number(e);if(!Number.isFinite(n)||n<0)return"-";if(n>=1048576){let e=n/1048576,t=Number.isInteger(e)?String(e):e.toFixed(1).replace(/\.0$/,"");return"".concat(t,"M")}return n>=1024?"".concat(Math.round(n/1024),"K"):String(Math.round(n))}function o(e,n){let t=r(e),i=r(n),o=a(e),s=a(n);return o&&s?null:s?"".concat(t," Context"):"".concat(t," Context \xb7 ").concat(i," Max Output")}function s(e,n){let t=(0,i.H1)(e),a=(0,i.H1)(n);if(t||a)return[t?"Context: ".concat(t):null,a?"Max Output: ".concat(a):null].filter(Boolean).join("; ")}function l(e){let n=r(e);return"-"===n?"Long context":"".concat(n," ctx")}function c(e){if(null==e||""===e)return null;let n=Number(e);if(Number.isFinite(n)&&n<=0)return null;let t=new Date(Number.isFinite(n)&&""!==String(e).trim()?n<1e10?1e3*n:n:e);return Number.isNaN(t.getTime())?null:new Intl.DateTimeFormat("en",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}).format(t).replace(","," ,")}},43561:function(e){e.exports={modal_header:"Modal_modal_header__o3x0y",modal_body:"Modal_modal_body__hQ9J5",modal_footer:"Modal_modal_footer__3INEU",modal_mask:"Modal_modal_mask__la_F4",modal_wrapper:"Modal_modal_wrapper__ajPCV"}},55273:function(e){e.exports={serverlessContainer:"ModelFeatures_serverlessContainer__SiMb1",header:"ModelFeatures_header__0v_2q",headerContent:"ModelFeatures_headerContent__2yiU_",title:"ModelFeatures_title__Sw1nn",subtitle:"ModelFeatures_subt
1itle__NL__e",pricingTable:"ModelFeatures_pricingTable__dBv7S",pricingRow:"ModelFeatures_pricingRow__hJiYf",pricingLabel:"ModelFeatures_pricingLabel__rDzXY",pricingValue:"ModelFeatures_pricingValue__h9fm8",tieredSection:"ModelFeatures_tieredSection__BoKI2",tieredTitle:"ModelFeatures_tieredTitle__FFUS7",tableWrapper:"ModelFeatures_tableWrapper___1xDV",table:"ModelFeatures_table__V_0Ba",pricingOriginValue:"ModelFeatures_pricingOriginValue__cFZ5W",multimodalSection:"ModelFeatures_multimodalSection__LqhfN"}},86380:function(e){e.exports={calc_modal_content:"CalculatorModal_calc_modal_content__Skk_U",item_label:"CalculatorModal_item_label__vDxS_",price:"CalculatorModal_price__A2Z29"}},12279:function(){},9596:function(e){e.exports={container:"DetailContent_container__ZFlB4",tabs_header_wrap:"DetailContent_tabs_header_wrap__l9_qd",website_sticky:"DetailContent_website_sticky__Sc8hf",tab_item:"DetailContent_tab_item__J6F3d",console_sticky:"DetailContent_console_sticky__b2aen",tabs_content_wrap:"DetailContent_tabs_content_wrap__cde89",console_container:"DetailContent_console_container__vwAxd",console_tab_item:"DetailContent_console_tab_item__MZcIj",console_gpu_tab:"DetailContent_console_gpu_tab__psHRm"}},78695:function(e){e.exports={model_api_price:"ModelAPIPrice_model_api_price__IhEKa",price_card:"ModelAPIPrice_price_card__AEn8b",category_title:"ModelAPIPrice_category_title__3Pdeb",category_desc:"ModelAPIPrice_category_desc__eU2U4",calc_btn:"ModelAPIPrice_calc_btn__XfGH1",table_wrap:"ModelAPIPrice_table_wrap__OFdh4",table_cell_hover:"ModelAPIPrice_table_cell_hover__nnWFI",table_row_hover:"ModelAPIPrice_table_row_hover__WSSRc",table_cell_no_hover:"ModelAPIPrice_table_cell_no_hover__lnbq8"}},72905:function(e){e.exports={table_loading:"table_table_loading__fx4ZG",spinner:"table_spinner__xFgmL",table_body:"table_table_body__oDHfT"}}}]);
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.