1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6467,7138],{87138:function(e,t,a){a.d(t,{default:function(){return s.a}});var r=a(231),s=a.n(r)},49666:function(e,t,a){a.d(t,{E:function(){return i},ProfileContextProvider:function(){return l}});var r=a(57437),s=a(2265);let n=(0,s.createContext)(null);function l(e){let{children:t}=e,[a,l]=(0,s.useState)(null),[i,o]=(0,s.useState)(!0),[c,u]=(0,s.useState)(null),m=async e=>{try{let t=await fetch("/api/profile",{signal:e});if(!t.ok)throw Error("Network response was not ok");let a=await t.json();if(!a.success){l(null),u(null);return}l(a),u(null)}catch(e){"AbortError"!==e.name&&u("Failed to fetch profile")}finally{o(!1)}};return(0,s.useEffect)(()=>{let e=new AbortController;return m(e.signal),()=>{e.abort()}},[]),(0,s.useEffect)(()=>{let e=()=>{"visible"===document.visibilityState&&m()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),(0,r.jsx)(n.Provider,{value:{...a,loading:i,error:c},children:t})}function i(){let e=(0,s.useContext)(n);if(!e)throw Error("useProfileContext must be used within a ProfileContextProvider");return e}},65625:function(e,t,a){a.r(t),a.d(t,{AVAILABLE_FILE_EXTENSIONS:function(){return C},ContactSupportFormComponent:function(){return S},ContactSupportFormWrapper:function(){return N},default:function(){return E}});var r=a(57437),s=a(97114),n=a(77209),l=a(32833),i=a(2265),o=a(39343),c=a(59772),u=a(18087),m=a(89733),d=a(4919);function p(e){return(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M14 11H8M10 15H8M16 7H8M20 6.8V17.2C20 18.8802 20 19.7202 19.673 20.362C19.3854 20.9265 18.9265 21.3854 18.362 21.673C17.7202 22 16.8802 22 15.2 22H8.8C7.11984 22 6.27976 22 5.63803 21.673C5.07354 21.3854 4.6146 20.9265 4.32698 20.362C4 19.7202 4 18.8802 4 17.2V6.8C4 5.11984 4 4.27976 4.32698 3.63803C4.6146 3.07354 5.07354 2.6146 5.63803 2.32698C6.27976 2 7.11984 2 8.8 2H15.2C16.8802 2 17.7202 2 18.362 2.32698C18.9265 2.6146 19.3854 3.07354 19.673 3.63803C20 4.27976 20 5.11984 20 6.8Z",stroke:"#667293",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}var f=a(49354),h=a(74697);function x(e){var t,a;let{buttonText:s}=e,n=(0,u.useTranslations)(),l=(0,o.Gc)(),c=(0,i.useRef)(null),d=C.map(e=>".".concat(e)).join(","),p=l.watch("attachments");return(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)(g,{files:p,removeFile:function(e){l.setValue("attachments",p.filter((t,a)=>a!==e)),l.formState.isSubmitted&&l.trigger("attachments")},isEdit:!0,errors:null==l?void 0:null===(a=l.formState)||void 0===a?void 0:null===(t=a.errors)||void 0===t?void 0:t.attachments}),(0,r.jsx)("input",{type:"file",ref:c,onChange:function(e){let t=e.target.files;t&&l.setValue("attachments",[...p,...Array.from(t)]),l.formState.isSubmitted&&l.trigger("attachments")},className:"hidden",accept:d,multiple:!0}),(0,r.jsx)(m.z,{onClick:function(e){var t;e.preventDefault(),null===(t=c.current)||void 0===t||t.click()},variant:"outline",size:"lg",className:"w-full border-gray-200 text-gray-950",children:(0,r.jsx)("span",{children:s||n("Upload Files")})})]})}function g(e){let{files:t,isEdit:a,removeFile:n,errors:l}=e,[o,c]=(0,i.useState)([]);return(0,u.useTranslations)(),(0,i.useEffect)(()=>(t&&c(t.map(e=>URL.createObjectURL(e))),()=>{o.forEach(e=>URL.revokeObjectURL(e))}),[t]),(0,r.jsx)("div",{className:(0,f.cn)(t&&t.length&&o&&o.length?"pb-4 pt-2":""),children:t&&t.length&&o&&o.length?(0,r.jsxs)("div",{children:[(0,r.jsx)("ul",{className:(0,f.cn)("flex flex-col gap-2"),children:t.map((e,t)=>{var i;return(0,r.jsxs)("li",{className:"flex w-full flex-col",children:[(0,r.jsxs)("div",{className:"flex flex-row items-center justify-between gap-1.5",children:[(0,r.jsx)(v,{sourceName:e.name,sourceUrl:o[t]}),(0,r.jsx)("span",{className:"flex-1 truncate text-sm",children:e.name}),(0,r.jsx)(h.Z,{width:"20",height:"20",className:"cursor-pointer text-gray-300 hover:text-gray-500",onClick:()=>{n&&a&&n(t)}})]}),Array.isArray(l)&&(null===(i=l[t])||void 0===i?void 0:i.message)&&(0,r.jsx)(s.zG,{children:l[t].message})]},t)})}),l&&l.message&&(0,r.jsx)(s.zG,{children:l.message})]}):null})}function v(e){var t;let{sourceName:a,sourceUrl:s}=e,n=null===(t=a.split(".").pop())||void 0===t?void 0:t.toLowerCase();return(0,r.jsx)("div",{children:(["jpg","jpeg","png"].includes(n||"")?(0,r.jsx)("img",{src:s,alt:a,className:"h-6 w-6 rounded object-cover"}):["mp4","avi","mov"].includes(n||"")?(0,r.jsx)("video",{src:s,className:"h-6 w-6 rounded object-cover",muted:!0}
1):["docx","pdf"].includes(n||"")?(0,r.jsx)(p,{}):null)||(0,r.jsx)("div",{className:"text-bold flex h-6 w-6 items-center justify-center rounded border border-gray-300 bg-gray-200 text-red-500",children:"?"})})}var j=a(31014),w=a(45734),b=a(49666),y=a(32564);let C=["pdf","docx","jpg","jpeg","png","mp4","mov"];function N(e){let{loading:t}=(0,b.E)();return t?null:(0,r.jsx)(w.pm,{reCaptchaKey:"6Ldky4UqAAAAAPaKowI3G2UqqHzNrw79IIHEfmTO",children:(0,r.jsx)(S,{...e})})}function S(e){var t,a;let{slice:p,...f}=e,h=(0,u.useTranslations)(),{executeRecaptcha:g}=(0,w.xX)(),v=(0,u.useLocale)(),{email:N}=(0,b.E)(),S=(0,i.useMemo)(()=>N?C:["jpg","jpeg","png"],[N]),E=c.z.object({email:c.z.string().min(1,{message:h("This field is required")}).email({message:h("Invalid email")}).max(254,{message:h("Maximum {N} characters allowed",{N:255})}),subject:c.z.string().min(1,{message:h("This field is required")}).max(254,{message:h("Maximum {N} characters allowed",{N:255})}),message:c.z.string().min(1,{message:h("This field is required")}).max(2e3,{message:h("Maximum {N} characters allowed",{N:2e3})}),attachments:c.z.array(c.z.instanceof(File).refine(e=>{var t;let a=null===(t=e.name.split(".").pop())||void 0===t?void 0:t.toLowerCase();return a&&S.includes(a)},{message:h("invalid_file_types",{ext:S.join(", ")})})).refine(e=>e.length<=10,{message:h("maximum_files",{max:10})}).refine(e=>15728640>=e.reduce((e,t)=>e+t.size,0),{message:h("Total file size must be under 15MB")})}),k=(0,o.cI)({resolver:(0,j.F)(E),defaultValues:{email:N||"",subject:"",message:"",attachments:[]}}),z=(0,i.useCallback)(async e=>{try{if(!g){k.setError("root",{message:"Something went wrong"});return}let t=new FormData;t.append("email",e.email),t.append("subject",e.subject),t.append("message",e.message),e.attachments.length>0&&e.attachments.forEach(e=>{t.append("attachments[]",e)});let a=await g("createTicketAction");t.append("token",a),t.append("locale",v),(await fetch("/api/create-ticket",{method:"POST",body:t})).ok||k.setError("root",{message:"Something went wrong"})}catch(e){}},[g,k,v]);return k.formState.isSubmitSuccessful?(0,r.jsx)(y.SuccessMessage,{slice:p,...f}):(0,r.jsx)(s.l0,{...k,children:(0,r.jsxs)("form",{id:"contact-support-form",onSubmit:k.handleSubmit(z),className:"mx-auto flex w-full max-w-[640px] flex-col gap-2",children:[(0,r.jsx)("h1",{className:"mb-6 text-[44px] font-[900] capitalize text-gray-950",children:p.primary.title}),!N&&(0,r.jsx)(l.Z,{name:"email",render:e=>{var t;let{field:a}=e;return(0,r.jsx)(n.I,{...a,type:"email",placeholder:(null==p?void 0:null===(t=p.primary)||void 0===t?void 0:t.email_placeholder)||"Email"})}}),(0,r.jsx)(l.Z,{name:"subject",render:e=>{var t;let{field:a}=e;return(0,r.jsx)(n.I,{...a,type:"text",placeholder:(null==p?void 0:null===(t=p.primary)||void 0===t?void 0:t.subject_placeholder)||"Subject"})}}),(0,r.jsx)(l.Z,{name:"message",render:e=>{var t;let{field:a}=e;return(0,r.jsx)(d.g,{className:"max-h-[200px] min-h-[150px] placeholder:normal-case",...a,placeholder:(null==p?void 0:null===(t=p.primary)||void 0===t?void 0:t.message_placeholder)||"How can we assist you today?"})}}),(0,r.jsx)(x,{buttonText:(null==p?void 0:null===(t=p.primary)||void 0===t?void 0:t.upload_files_text)||"Upload Files"}),(0,r.jsx)(m.z,{loading:k.formState.isSubmitting,size:"lg",className:"mt-6 w-full",type:"submit",children:(null==p?void 0:null===(a=p.primary)||void 0===a?void 0:a.submit_text)||"Create ticket"})]})})}var E=e=>(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("section",{"data-slice-type":e.slice.slice_type,"data-slice-variation":e.slice.variation,className:"hero-contact relative mx-auto w-full pb-[120px] pt-16 [--hero-contact-image-height:80px] [--hero-contact-image:url('/images/bg-hero-contact.svg')] sm:pt-40",children:(0,r.jsx)(N,{...e})})})}}]);
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.