1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="561a06e8-f594-4552-ba18-1d0b930f4da9",e._sentryDebugIdIdentifier="sentry-dbid-561a06e8-f594-4552-ba18-1d0b930f4da9")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5977],{36721:(e,t,r)=>{"use strict";r.d(t,{L:()=>i});var n=r(88828);let i=e=>{let{children:t,className:r=""}=e;return(0,n.jsx)("div",{className:"container mx-auto px-4 py-10 ".concat(r).trim(),children:t})}},59032:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>z,default:()=>P});var n=r(88828),i=r(46824),l=r(52300),a=r(81552),s=r(56793),o=r(4111),d=r(91951),c=r(89845),u=r(14085),m=r(32421),f=r(7283);function p(e){return null}p.getCollectionNode=function*(e){let{children:t,title:r,items:n}=e;yield{type:"section",props:e,hasChildNodes:!0,rendered:r,"aria-label":e["aria-label"],*childNodes(){if("function"==typeof t){if(!n)throw Error("props.children was a function but props.items is missing");for(let e of n)yield{type:"item",value:e,renderer:t}}else{let e=[];a.Children.forEach(t,t=>{e.push({type:"item",element:t})}),yield*e}}}};var h=r(40533),x=r(97115),g=r(76005),b=r(19700),y=r(48574),v=r.n(y),w=r(35886),j=r(2546),_=r(4946),N=r(73287),S=r(94736),C=r(36721),E=r(99416);let k=e=>{var t,r,i;let{asics:l=[],dcdcProducts:y=[],dcdcConverters:k=[],initialProduct:z="",loadSwitches:P=[],isProductDisabled:A=!1}=e,{t:I}=(0,s.A)("order"),[R,M]=(0,a.useState)(null),T=(0,a.useMemo)(()=>[{title:"μASIC",items:l.map(e=>({key:e.model||"",label:e.model||""})).filter(e=>e.key)},{title:"DC-DC Modules",items:y.map(e=>({key:e.model||"",label:e.model||""})).filter(e=>e.key)},{title:"DC-DC Converters",items:k.map(e=>({key:e.model||"",label:e.model||""})).filter(e=>e.key)},{title:"Load Switches",items:P.map(e=>({key:e.model||"",label:e.model||""})).filter(e=>e.key)},{title:"Kits",items:[{key:"uASIC Evaluation Kit",label:"uASIC Evaluation Kit"}]}].filter(e=>e.items.length>0),[l,y,k,P]),F=d.Ikc({product:d.YjP().min(1,I("errors.product_required")),name:d.YjP().min(1,I("errors.name_required")),email:d.YjP().email(I("errors.email_invalid")),comment:d.YjP().optional(),accept:d.zMY().refine(e=>!0===e,{message:I("errors.accept_required")})}),{register:L,control:D,handleSubmit:H,formState:{errors:O,isSubmitting:W},reset:B}=(0,o.mN)({resolver:(0,c.u)(F),defaultValues:{product:z,name:"",email:"",comment:"",accept:!1}}),[K,Y]=(0,a.useState)(!1),U=async e=>{if(!R)return void(0,j.$U)({title:"Error",description:"Please complete the security check",color:"danger"});try{let t=await fetch("/api/order",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,turnstileToken:R})});if(!t.ok){let e=await t.json();throw Error(e.error||"Submission failed")}(0,j.$U)({title:I("success.title"),description:I("success.message"),color:"success",timeout:5e3}),Y(!0),(0,N.sendGAEvent)("event","form_submit",{form_name:"buy_or_sample",product:e.product}),setTimeout(()=>{Y(!1),B(),M(null)},3e3)}catch(e){(0,N.sendGAEvent)("event","form_submit_error",{form_name:"buy_or_sample"}),(0,j.$U)({title:"Error",description:e.message||"Failed to submit order",color:"danger"})}},V={label:"text-base font-semibold text-gray-700 dark:text-gray-200",input:"text-base text-gray-900 dark:text-gray-100",inputWrapper:"data-[hover=true]:border-primary-400",errorMessage:"text-sm text-danger-500 font-medium"};return(0,n.jsx)("div",{className:"relative w-full",children:(0,n.jsx)(C.L,{className:"relative z-10",children:(0,n.jsxs)("div",{className:"mx-auto flex max-w-4xl flex-col items-center gap-8 py-6 md:py-12",children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("h1",{className:"mb-4 text-4xl font-bold text-foreground sm:text-5xl",children:I("title")}),(0,n.jsx)("p",{className:"max-w-2xl text-large text-default-500",children:I("subtitle")})]}),(0,n.jsx)(u.Z,{className:"w-full bg-content1 p-4 shadow-lg sm:p-8",children:(0,n.jsx)(m.U,{children:K?(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:[(0,n.jsx)("div",{className:"w-20 h-20 rounded-full bg-success-100 flex items-center justify-center mb-6",children:(0,n.jsx)(_.In,{className:"text-success-600",icon:"mdi:check-circle",width:40})}),(0,n.jsx)("h3",{className:"text-2xl font-bold mb-2 text-foreground",children:I("success.title")}),(0,n.jsx)("p",{className:"text-default-500",children:I("success.message")})]}):(0,n.jsxs)("form",{className:"flex flex-col gap-8",onSubmit:H(U),children:[(0,n.jsx)(o.xI,{control:D,name:"product",render:e=>{var t;let{field:r}=e;return(0,n.jsx)(f.d,{...r,classNames:V,disabled:A,errorMessage:null==(t=O.product)?void 0:t.message,isInvalid:!!O.product,items:T,label:I("product_label"),labelPlacement:"outside",placeholder:I("product_placeholder"),selectedKeys:r.value?[r.value]:[],size:"lg",variant:"bordered",children:e=>(0,n.jsx)(p,{showDivider:!0,classNames:{heading:"flex w-full sticky top-1 z-20 py-1.5 px-2 text-tiny font-medium text-default-700"},items:e.items,title:e.title,children:e=>(0,n.jsx)(h.y,{className:"pl-6",children:e.label},e.key)},e.title)})}}),(0,n.jsxs)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[(0,n.jsx)(x.r,{classNames:V,errorMessage:null==(t=O.name)?void 0:t.message,isInvalid:!!O.name,label:I("name_label"),labelPlacement:"outside",placeholder:I("name_placeholder"),size:"lg",style:{"--tw-ring-color":"transparent"},variant:"bordered",...L("name")}
1),(0,n.jsx)(x.r,{classNames:V,errorMessage:null==(r=O.email)?void 0:r.message,isInvalid:!!O.email,label:I("email_label"),labelPlacement:"outside",placeholder:I("email_placeholder"),size:"lg",style:{"--tw-ring-color":"transparent"},variant:"bordered",...L("email")})]}),(0,n.jsx)(g.P,{classNames:V,errorMessage:null==(i=O.comment)?void 0:i.message,isInvalid:!!O.comment,label:I("comment_label"),labelPlacement:"outside",minRows:4,placeholder:I("comment_placeholder"),size:"lg",style:{"--tw-ring-color":"transparent"},variant:"bordered",...L("comment")}),(0,n.jsx)(o.xI,{control:D,name:"accept",render:e=>{let{field:{onChange:t,value:r}}=e;return(0,n.jsx)(b.A,{classNames:{label:"text-small text-default-500"},isInvalid:!!O.accept,isSelected:r,onValueChange:t,children:(0,n.jsxs)("span",{children:[I("accept_prefix"),"\xa0",(0,n.jsx)(v(),{className:"text-primary underline transition-colors hover:text-primary-600",href:S.b.PRIVACY,children:I("privacy_policy")}),"\xa0",I("and"),"\xa0",(0,n.jsx)(v(),{className:"text-primary underline transition-colors hover:text-primary-600",href:S.b.PRIVACY,children:I("terms_of_use")})]})})}}),O.accept&&(0,n.jsx)("p",{className:"text-sm font-medium text-danger-500",children:O.accept.message}),(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-center gap-4 pt-2",children:[(0,n.jsx)("div",{className:"w-full sm:w-auto",children:(0,n.jsx)(w.Xs,{appearance:"always",language:"en",retry:"auto",sandbox:!1,siteKey:"0x4AAAAAACU4kEygHsWjy33r",theme:"light",onError:()=>M(null),onExpire:()=>M(null),onVerify:e=>M(e)})}),(0,n.jsx)(E.p,{className:"w-full font-medium sm:w-auto sm:px-12",color:"primary",isLoading:W,namespace:"order",radius:"full",size:"md",textKey:"submit",type:"submit"})]})]})})})]})})})};var z=!0;function P(e){let{dcdcProducts:t,loadSwitches:r,dcdcConverters:a,asics:s,initialProduct:o,isKitType:d}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{pageKey:"buy-or-sample"}),(0,n.jsx)(i.A,{children:(0,n.jsx)(k,{asics:s,dcdcConverters:a,dcdcProducts:t,initialProduct:o,isProductDisabled:d,loadSwitches:r})})]})}},76005:(e,t,r)=>{"use strict";r.d(t,{P:()=>z});var n=r(84288),i=r(47870),l=r(9150),a=r(81552);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}var o=a.useLayoutEffect,d=function(e){var t=a.useRef(e);return o(function(){t.current=e}),t},c=function(e,t){if("function"==typeof e)return void e(t);e.current=t},u=function(e,t){var r=a.useRef();return a.useCallback(function(n){e.current=n,r.current&&c(r.current,null),r.current=t,t&&c(t,n)},[t])},m={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},f=function(e){Object.keys(m).forEach(function(t){e.style.setProperty(t,m[t],"important")})},p=null,h=function(e,t){var r=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?r+t.borderSize:r-t.paddingSize},x=function(){},g=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],b=!!document.documentElement.currentStyle,y=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var r=g.reduce(function(e,r){return e[r]=t[r],e},{}),n=r.boxSizing;if(""===n)return null;b&&"border-box"===n&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),l=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:l}};function v(e,t,r){var n=d(r);a.useLayoutEffect(function(){var r=function(e){return n.current(e)};if(e)return e.addEventListener(t,r),function(){return e.removeEventListener(t,r)}},[])}var w=function(e,t){v(document.body,"reset",function(r){e.current.form===r.target&&t(r)})},j=function(e){v(window,"resize",e)},_=function(e){v(document.fonts,"loadingdone",e)},N=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],S=a.forwardRef(function(e,t){var r=e.cac
1heMeasurements,n=e.maxRows,i=e.minRows,l=e.onChange,o=void 0===l?x:l,d=e.onHeightChange,c=void 0===d?x:d,m=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,N),g=void 0!==m.value,b=a.useRef(null),v=u(b,t),S=a.useRef(0),C=a.useRef(),E=function(){var e=b.current,t=r&&C.current?C.current:y(e);if(t){C.current=t;var l,a,s,o,d,u,m,x,g,v,w,j=(l=e.value||e.placeholder||"x",void 0===(a=i)&&(a=1),void 0===(s=n)&&(s=1/0),p||((p=document.createElement("textarea")).setAttribute("tabindex","-1"),p.setAttribute("aria-hidden","true"),f(p)),null===p.parentNode&&document.body.appendChild(p),o=t.paddingSize,d=t.borderSize,m=(u=t.sizingStyle).boxSizing,Object.keys(u).forEach(function(e){p.style[e]=u[e]}),f(p),p.value=l,x=h(p,t),p.value=l,x=h(p,t),p.value="x",v=(g=p.scrollHeight-o)*a,"border-box"===m&&(v=v+o+d),x=Math.max(v,x),w=g*s,"border-box"===m&&(w=w+o+d),[x=Math.min(w,x),g]),_=j[0],N=j[1];S.current!==_&&(S.current=_,e.style.setProperty("height",_+"px","important"),c(_,{rowHeight:N}))}};return a.useLayoutEffect(E),w(b,function(){if(!g){var e=b.current.value;requestAnimationFrame(function(){var t=b.current;t&&e!==t.value&&E()})}}),j(E),_(E),a.createElement("textarea",s({},m,{onChange:function(e){g||E(),o(e)},ref:v}))}),C=r(10700),E=r(88828),k=(0,l.Rf)(({style:e,minRows:t=3,maxRows:r=8,cacheMeasurements:l=!1,disableAutosize:s=!1,onHeightChange:o,...d},c)=>{let{Component:u,label:m,description:f,startContent:p,endContent:h,hasHelper:x,shouldLabelBeOutside:g,shouldLabelBeInside:b,isInvalid:y,errorMessage:v,getBaseProps:w,getLabelProps:j,getInputProps:_,getInnerWrapperProps:N,getInputWrapperProps:k,getHelperWrapperProps:z,getDescriptionProps:P,getErrorMessageProps:A,isClearable:I,getClearButtonProps:R}=(0,n.G)({...d,ref:c,isMultiline:!0}),[M,T]=(0,a.useState)(t>1),[F,L]=(0,a.useState)(!1),D=m?(0,E.jsx)("label",{...j(),children:m}):null,H=_(),O=s?(0,E.jsx)("textarea",{...H,style:(0,i.v6)(H.style,null!=e?e:{})}):(0,E.jsx)(S,{...H,cacheMeasurements:l,"data-hide-scroll":(0,i.sE)(!F),maxRows:r,minRows:t,style:(0,i.v6)(H.style,null!=e?e:{}),onHeightChange:(e,n)=>{1===t&&T(e>=2*n.rowHeight),r>t&&L(e>=r*n.rowHeight),null==o||o(e,n)}}),W=(0,a.useMemo)(()=>I?(0,E.jsx)("button",{...R(),children:(0,E.jsx)(C.o,{})}):null,[I,R]),B=(0,a.useMemo)(()=>p||h?(0,E.jsxs)("div",{...N(),children:[p,O,h]}):(0,E.jsx)("div",{...N(),children:O}),[p,H,h,N]),K=y&&v,Y=K||f;return(0,E.jsxs)(u,{...w(),children:[g?D:null,(0,E.jsxs)("div",{...k(),"data-has-multiple-rows":(0,i.sE)(M),children:[b?D:null,B,W]}),x&&Y?(0,E.jsx)("div",{...z(),children:K?(0,E.jsx)("div",{...A(),children:v}):(0,E.jsx)("div",{...P(),children:f})}):null]})});k.displayName="HeroUI.Textarea";var z=k},85851:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/buy-or-sample",function(){return r(59032)}])},99416:(e,t,r)=>{"use strict";r.d(t,{p:()=>o});var n=r(88828),i=r(12600),l=r(56793),a=r(30288);let s={primary:"text-primary-800 hover:bg-primary-800 hover:text-white border-primary-800",warning:"text-[#B45C45] border-[#B45C45] hover:text-warning-600 hover:border-warning-600",success:"from-green-800 to-green-500 hover:from-green-700 hover:to-green-600 border-green-700",danger:"text-white bg-[#B45C45] border-none hover:bg-[#B45C45]/90",secondary:"text-white bg-primary-800 border-none hover:bg-primary-600"},o=e=>{let{textKey:t,namespace:r="home",onClick:o,type:d="button",className:c,disabled:u=!1,color:m="primary",...f}=e,{t:p}=(0,l.A)(r);return(0,n.jsx)(i.T,{className:(0,a.A)("text-white font-semibold rounded-md border text-sm transition bg-gradient-to-r",s[m],c),isDisabled:u,type:d,...f,onPress:o,children:p(t)})}}},e=>{e.O(0,[7347,4774,284,4646,8124,5700,9845,668,2250,5223,5207,636,6593,8792],()=>e(e.s=85851)),_N_E=e.O()}]);
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.