PageSourceSearch

https://gms.church/_next/static/chunks/pages/cms/locales/create-7422ec72fc5188c6.js

js gms.church collected 2026-10-04 14:31:11 UTC 7,641 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="e989f3b0-8a65-48c8-8558-c184eea19181",e._sentryDebugIdIdentifier="sentry-dbid-e989f3b0-8a65-48c8-8558-c184eea19181")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8554],{7208:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/cms/locales/create",function(){return t(67783)}])},9965:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});var l=t(37876),r=t(14232),a=t(23566);function n(e){let{isOpen:s,onClose:t,title:n,message:o}=e;return(0,r.useEffect)(()=>{if(s){let e=setTimeout(()=>{t()},3e3);return()=>clearTimeout(e)}},[s,t]),(0,l.jsx)(a.A,{isOpen:s,onClose:t,title:n,size:"sm",children:(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-green-100",children:(0,l.jsx)("svg",{className:"h-6 w-6 text-green-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,l.jsx)("p",{className:"mb-6 text-sm text-gray-600",children:o})]})})}},23566:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var l=t(37876),r=t(14232);function a(e){let{isOpen:s,onClose:t,title:a,children:n,size:o="md"}=e;return((0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t()};return s&&(document.addEventListener("keydown",e),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",e),document.body.style.overflow="unset"}},[s,t]),s)?(0,l.jsxs)("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[(0,l.jsx)("div",{className:"fixed inset-0 bg-black opacity-50 transition-opacity",onClick:t}),(0,l.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,l.jsxs)("div",{className:`relative w-full ${{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"}[o]} bg-white rounded-lg shadow-xl`,children:[(0,l.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[(0,l.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:a}),(0,l.jsx)("button",{onClick:t,className:"text-gray-400 hover:text-gray-600 transition-colors",children:(0,l.jsx)("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,l.jsx)("div",{className:"p-6",children:n})]})})]}):null}},40198:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});var l=t(37876),r=t(14232);let a=e=>{let{initialData:s,onSubmit:t,onCancel:a,submitButtonText:n="Create Locale",isEditing:o=!1,loading:c=!1}=e,[i,d]=(0,r.useState)({name:s?.name||"",flagIconUrl:s?.flagIconUrl||"",isLangSwitcher:s?.isLangSwitcher||!1}),u=(e,s)=>{d(t=>({...t,[e]:s}))};return(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault(),t(i)},className:"space-y-6",children:[(0,l.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-6 shadow-sm",children:[(0,l.jsx)("h3",{className:"mb-4 text-lg font-medium text-gray-900",children:"Basic Information"}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"name",className:"mb-2 block text-sm font-medium text-gray-700",children:"Name *"}),(0,l.jsx)("input",{type:"text",id:"name",value:i.name,onChange:e=>u("name",e.target.value),placeholder:"Enter name",className:"w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-blue-500",required:!0})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"flagIconUrl",className:"mb-2 block text-sm font-medium text-gray-700",children:"Flag Icon URL *"}),(0,l.jsx)("input",{type:"text",id:"flagIconUrl",value:i.flagIconUrl,onChange:e=>u("flagIconUrl",e.target.value),placeholder:"Enter flag icon url",className:"w-full rounded-md border border-gray-300 px-3 py-2 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-blue-500",required:!0})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"isLangSwitcher",className:"mb-2 block text-sm font-medium text-gray-700",children:"Enabled"}),(0,l.jsx)("input",{type:"checkbox",id:"isLangSwitcher",checked:i.isLangSwitcher,onCh
1ange:e=>u("isLangSwitcher",e.target.checked),className:"h-8 w-8"})]})]})]}),(0,l.jsxs)("div",{className:"flex justify-end space-x-3",children:[a&&(0,l.jsx)("button",{type:"button",onClick:a,className:"rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",disabled:c,children:"Cancel"}),(0,l.jsx)("button",{type:"submit",className:"rounded-md border border-transparent px-4 py-2 text-sm font-medium text-white hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",style:{backgroundColor:"#00408C"},disabled:c,children:c?"Saving...":n})]})]})}},67783:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>i});var l=t(37876),r=t(14232),a=t(89099),n=t(43965),o=t(9965),c=t(40198);let i=()=>{let e=(0,a.useRouter)(),[s,t]=(0,r.useState)(!1),[i,d]=(0,r.useState)(null),[u,m]=(0,r.useState)(!1),x=async e=>{try{t(!0),d(null);let s=await fetch("/api/locales/cms",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),l=await s.json();l.success?m(!0):d(l.message||"Failed to create locale")}catch(e){console.error("Error creating locale:",e),d("Failed to create locale")}finally{t(!1)}},h=()=>{e.push("/cms/locales")};return i?(0,l.jsx)(n.A,{children:(0,l.jsx)("div",{className:"p-6",children:(0,l.jsx)("div",{className:"rounded-md border border-red-200 bg-red-50 p-4",children:(0,l.jsxs)("div",{className:"flex",children:[(0,l.jsx)("div",{className:"flex-shrink-0",children:(0,l.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,l.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,l.jsxs)("div",{className:"ml-3",children:[(0,l.jsx)("h3",{className:"text-sm font-medium text-red-800",children:"Error"}),(0,l.jsx)("div",{className:"mt-2 text-sm text-red-700",children:i}),(0,l.jsx)("div",{className:"mt-4",children:(0,l.jsx)("button",{onClick:()=>d(null),className:"text-sm font-medium text-red-800 hover:text-red-600",children:"Try again"})})]})]})})})}):(0,l.jsxs)(n.A,{children:[(0,l.jsxs)("div",{className:"p-6",children:[(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,l.jsx)("button",{onClick:h,className:"text-gray-500 hover:text-gray-700",children:(0,l.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),(0,l.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Create New Locale"})]}),(0,l.jsx)("p",{className:"mt-2 text-gray-600",children:"Add a new locale"})]}),(0,l.jsx)(c.A,{onSubmit:x,onCancel:h,loading:s})]}),(0,l.jsx)(o.A,{isOpen:u,onClose:()=>{m(!1),e.push("/cms/locales")},title:"Success!",message:"Locale successfully created"})]})}}},e=>{e.O(0,[8230,3965,636,6593,8792],()=>e(e.s=7208)),_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.