PageSourceSearch

https://app.authic.io/_next/static/chunks/3128-2f36b95f1894c705.js

js authic.io collected 2026-09-24 11:00:11 UTC 8,027 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3128],{4911:function(e,t,a){a.d(t,{Z:function(){return g}});var n=a(85893),r=a(13114),l=a(67294),s=a(87536),o=a(34221),i=a(43342),u=a(15516),c=a(56004);let d=e=>{let{control:t,fields:a}=e,{data:r=[]}=(0,i.ro)();return(0,n.jsx)(o.E.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2,ease:"easeOut"},className:"space-y-4 relative before:absolute before:top-0 before:left-0 before:w-1 before:h-full before:border-l before:border-borderPrimary before:z-10",children:r.filter(e=>!e.isDefault&&!e.isDisabled).map((e,r)=>(0,n.jsxs)(o.E.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.2,delay:.1*r},className:"space-y-2 border rounded-lg p-4 ml-5 sm:max-w-xl",children:[(0,n.jsx)("h2",{className:"text-textPrimary font-medium text-xl",children:e.name}),a.map(a=>{var r,l;return(0,n.jsx)(s.Qr,{name:(r=a.name,l=e.code,"".concat(String(r),".").concat(l)),control:t,render:e=>{var t,r,l;let{field:s,fieldState:o}=e;return"input"===a.inputType?(0,n.jsx)(c.Z,{labelText:a.label,inputProps:{...s,maxLength:a.maxLength||255},errorText:null===(t=o.error)||void 0===t?void 0:t.message}):(0,n.jsx)(u.Z,{labelText:a.label,textAreaProps:{...s,className:"h-40",maxLength:a.maxLength||1e3,rows:null!==(l=a.rows)&&void 0!==l?l:5},divProps:{className:"sm:max-w-xl"},errorText:null===(r=o.error)||void 0===r?void 0:r.message})}},"".concat(e.code,"-").concat(String(a.name)))})]},e.code))})};var x=a(93967),h=a.n(x),m=a(94824),f=a(32533),g=e=>{var t,a;let{control:s,fields:o,initialTranslations:u,className:c,translate:x,isTranslating:g=!1}=e,[p,v]=(0,l.useState)(!!(null==u?void 0:u.length)),{data:y=[]}=(0,i.ro)(),b=null===(t=y||[])||void 0===t?void 0:t.filter(e=>!e.isDefault&&!e.isDisabled),j=null===(a=y||[])||void 0===a?void 0:a.find(e=>e.isDefault);return((0,l.useEffect)(()=>{0!==b.length&&(null==o?void 0:o.length)!==0&&o.some(e=>{var t;let a=null===(t=s._formValues)||void 0===t?void 0:t[String(e.name)];if(!a||"object"!=typeof a)return!1;let n={};return Object.keys(a).forEach(e=>{e!==(null==j?void 0:j.code)&&(n[e]=a[e])}),Object.values(n).some(e=>!!e)})&&v(!0)},[y,p]),0===b.length)?null:(0,n.jsxs)("div",{className:h()(c),children:[(0,n.jsxs)("button",{type:"button",className:"flex items-center gap-2 cursor-pointer",onClick:async()=>{await x(),p||v(!p)},children:["Add Translations"," ",g?(0,n.jsx)(f.Z,{size:18}):(0,n.jsx)(m.Z,{width:20,height:20})]}),(0,n.jsx)(r.M,{children:p&&(0,n.jsx)(d,{control:s,fields:o})})]})}},21932:function(e,t,a){var n=a(85893);a(67294),t.Z=function(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20",...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M2.397 15.096c.038-.344.057-.517.11-.678.046-.142.111-.278.194-.404.093-.141.215-.264.46-.509L14.168 2.5A2.357 2.357 0 1117.5 5.833L6.495 16.84c-.245.245-.368.367-.51.46a1.667 1.667 0 01-.403.195c-.161.052-.334.071-.678.11l-2.82.313.313-2.82z"})})}},94824:function(e,t,a){var n=a(85893);a(67294),t.Z=function(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 21 20",...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.667",d:"M10.5 6.667v6.666M7.167 10h6.666m5 0a8.333 8.333 0 11-16.667 0 8.333 8.333 0 0116.667 0z"})})}},69786:function(e,t,a){var n=a(85893);a(67294),t.Z=e=>{let{color:t,className:a,...r}=e;return(0,n.jsxs)("svg",{viewBox:"0 0 32 32",fill:"none",className:a,style:{color:t||"currentColor"},...r,children:[(0,n.jsx)("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:2,d:"M16 29.335c5.523 0 10-4.478 10-10 0-1.334 0-4-2.667-7.334 0 0-.132 3.805-2.765 3.255-4.257-.89 1.239-9.25-6.568-12.588 0 6.667-8 8.667-8 16.667 0 5.522 4.477 10 10 10Z"}),(0,n.jsx)("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:2,d:"M16 25.336c2.577 0 4.667-2.686 4.667-6-4.267 1.6-5.778-2.084-6-4.668-1.928.738-3.334 3.767-3.334 5.333 0 3.314 2.09 5.335 4.667 5.335Z"})]})}},15516:function(e,t,a){var n=a(85893),r=a(93967),l=a.n(r),s=a(67294),o=a(72547),i=a(56004);let u=e=>"Must be at most ".concat(e," characters");t.Z=e=>{var t;let{prefix:a,textAreaProps:r,divProps:c,spanProps:d,labelText:x,inputDescription:h,innerContainerProps:m,errorText:f,tooltipText:g,tooltipSubText:p,tooltipDirection:v,isRequired:y=!1}=e,{invisibleLimit:b,...j}=null!=r?r:{},[w,N]=s.useState(!1),[k,L]=s.useState(j.maxLength||null),C=String(null!==(t=j.value)&&void 0!==t?t:""),D=null!=b&&
1C.length>b?u(b):void 0,Z=f||D,S=j.className,F=null==c?void 0:c.className,P=null==d?void 0:d.className,T=null==m?void 0:m.className;return(0,n.jsxs)("div",{...c,className:l()("flex flex-col gap-y-1 w-full sm:max-w-[720px]",F),children:[(0,n.jsx)(i.A,{spanProps:d,spanClassName:P,labelText:x,isRequired:y,tooltipText:g,tooltipSubText:p,tooltipDirection:v}),(0,n.jsxs)("div",{...m,className:l()("w-full bg-bgPrimary border rounded-xl py-[9px] px-[14px] flex items-center gap-x-2",T,{"border-borderPrimary":!w,"border-[#85888E]":w,"border-errorPrimary":Z}),children:[a,(0,n.jsx)("textarea",{...j,onChange:e=>{j.onChange&&j.onChange(e),j.maxLength&&L(j.maxLength-e.currentTarget.value.length)},onFocus:()=>N(!0),onBlur:()=>N(!1),autoComplete:"off",className:l()("w-full outline-none appearance-none placeholder:text-textPlaceHolder text-base resize-none h-full",S)})]}),Z?(0,n.jsx)(o.Z,{children:Z}):(0,n.jsxs)(n.Fragment,{children:[h&&(0,n.jsx)("span",{className:"text-inputDescription text-sm",children:h}),j.maxLength&&(0,n.jsx)("span",{className:l()("text-inputDescription text-sm"),children:"".concat(k," characters left")})]})]})}},32533:function(e,t,a){var n=a(85893);a(67294),t.Z=e=>{let{size:t,color:a}=e;return(0,n.jsx)("span",{className:"spinner",style:{borderBottomColor:a||"#79716B",width:t||24,height:t||24}})}},58807:function(e,t,a){var n=a(95394),r=a(67294),l=a(44173);t.Z=e=>{let{getValues:t,setValue:a,fields:s}=e,[o,i]=(0,r.useState)(!1),{mutateAsync:u}=(0,n.B)();return{translate:async function(){if(o)return;i(!0);let e=s.map(e=>({...e,value:t(e.key)})),n=await u({fields:e});if(!n)return i(!1);l.Am.success("All fields succesfully translated"),Object.entries(n).forEach(e=>{let[,t]=e;Object.entries(t).forEach(e=>{let[t,n]=e;a(t,n,{shouldDirty:!0,shouldValidate:!0})})}),i(!1)},isTranslating:o}}},43342:function(e,t,a){a.d(t,{I:function(){return m},MR:function(){return x},lF:function(){return c},ro:function(){return i}});var n=a(53483),r=a(78551),l=a(30202),s=a(98029);let o=async()=>(await n.x.get("/languages")).data,i=()=>(0,r.a)({queryKey:["languages"],queryFn:o}),u=async e=>{let{languageUUID:t,isDisabled:a}=e;return(await n.x.patch("/languages/".concat(t),{isDisabled:a})).data},c=()=>{let e=(0,l.NL)();return(0,s.D)({onSuccess:()=>{e.invalidateQueries({queryKey:["languages"]})},mutationFn:u,mutationKey:["changeLanguageStatus"]})},d=async e=>{let{languageId:t}=e;return(await n.x.patch("/languages/default/",{languageId:t})).data},x=()=>{let e=(0,l.NL)();return(0,s.D)({onSuccess:()=>{e.invalidateQueries({queryKey:["languages"]})},mutationFn:d,mutationKey:["setDefaultLanguage"]})},h=async e=>{let{defaultLanguageId:t,additionalLanguageIds:a}=e;return(await n.x.patch("/languages/bulk",{defaultLanguageId:t,additionalLanguageIds:a})).data},m=()=>{let e=(0,l.NL)();return(0,s.D)({onSuccess:()=>{e.invalidateQueries({queryKey:["languages"]})},mutationFn:h,mutationKey:["bulkUpdateLanguages"]})}},95394:function(e,t,a){a.d(t,{B:function(){return i}});var n=a(53483);a(30178);var r=a(98029),l=a(29204),s=a(44173);let o=async e=>{try{return(await n.x.post("/translations/translate_fields",e)).data}catch(e){if(e instanceof l.d7){var t,a;s.Am.error((null===(a=e.response)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.message)||"Failed to translate")}else s.Am.error("Failed to translate");throw e}},i=()=>(0,r.D)({mutationFn: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.