1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[94],{42498:function(e,t,i){"use strict";i.d(t,{Z:function(){return o}});var n=i(91696);let o=(0,n.Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},71669:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/form-schemas/template-selection/[id]",function(){return i(18003)}])},934:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{noSSR:function(){return noSSR},default:function(){return dynamic}});let n=i(81351),o=(i(75271),n._(i(17522)));function convertModule(e){return{default:(null==e?void 0:e.default)||e}}function noSSR(e,t){return delete t.webpack,delete t.modules,e(t)}function dynamic(e,t){let i=o.default,n={loading:e=>{let{error:t,isLoading:i,pastDelay:n}=e;return null}};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e}),n={...n,...t};let l=n.loader;return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?i({...n,loader:()=>null!=l?l().then(convertModule):Promise.resolve(convertModule(()=>null))}):(delete n.webpack,delete n.modules,noSSR(i,n))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},85370:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return l}});let n=i(81351),o=n._(i(75271)),l=o.default.createContext(null)},17522:function(e,t,i){"use strict";/** 2@copyright (c) 2017-present James Kyle <[email protected]> 3 MIT License 4 Permission is hereby granted, free of charge, to any person obtaining 5a copy of this software and associated documentation files (the 6"Software"), to deal in the Software without restriction, including 7without limitation the rights to use, copy, modify, merge, publish, 8distribute, sublicense, and/or sell copies of the Software, and to 9permit persons to whom the Software is furnished to do so, subject to 10the following conditions: 11 The above copyright notice and this permission notice shall be 12included in all copies or substantial portions of the Software. 13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 14EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 15MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 16NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 17LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 18OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 19WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE 20*/Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let n=i(81351),o=n._(i(75271)),l=i(85370),a=[],r=[],s=!1;function load(e){let t=e(),i={loading:!0,loaded:null,error:null};return i.promise=t.then(e=>(i.loading=!1,i.loaded=e,e)).catch(e=>{throw i.loading=!1,i.error=e,e}),i}let LoadableSubscription=class LoadableSubscription{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}};function Loadable(e){return function(e,t){let i=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),n=null;
20function init(){if(!n){let t=new LoadableSubscription(e,i);n={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return n.promise()}if(!s){let e=i.webpack?i.webpack():i.modules;e&&r.push(t=>{for(let i of e)if(t.includes(i))return init()})}function LoadableComponent(e,t){!function(){init();let e=o.default.useContext(l.LoadableContext);e&&Array.isArray(i.modules)&&i.modules.forEach(t=>{e(t)})}();let a=o.default.useSyncExternalStore(n.subscribe,n.getCurrentValue,n.getCurrentValue);return o.default.useImperativeHandle(t,()=>({retry:n.retry}),[]),o.default.useMemo(()=>{var t;return a.loading||a.error?o.default.createElement(i.loading,{isLoading:a.loading,pastDelay:a.pastDelay,timedOut:a.timedOut,error:a.error,retry:n.retry}):a.loaded?o.default.createElement((t=a.loaded)&&t.default?t.default:t,e):null},[e,a])}return LoadableComponent.preload=()=>init(),LoadableComponent.displayName="LoadableComponent",o.default.forwardRef(LoadableComponent)}(load,e)}function flushInitializers(e,t){let i=[];for(;e.length;){let n=e.pop();i.push(n(t))}return Promise.all(i).then(()=>{if(e.length)return flushInitializers(e,t)})}Loadable.preloadAll=()=>new Promise((e,t)=>{flushInitializers(a).then(e,t)}),Loadable.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let res=()=>(s=!0,t());flushInitializers(r,e).then(res,res)})),window.__NEXT_PRELOADREADY=Loadable.preloadReady;let d=Loadable},63534:function(e,t,i){"use strict";var n=i(52676),o=i(75271),l=i(1629),a=i(78619),r=i(31985),s=i.n(r),d=i(82187),u=i.n(d),c=i(52073),m=i(75018),f=i(90394);t.Z=e=>{var t,i;let{navClass:r="",inactiveClass:d="",activeClass:h="text-ogovOrange font-bold text-xs",routes:p,isPublicView:b,portalInfo:v,skipSegments:g=[]}=e,y=(0,l.useRouter)(),{t:_,i18n:x}=(0,a.$G)(),w=null==v?void 0:null===(i=v.customization)||void 0===i?void 0:null===(t=i.config)||void 0===t?void 0:t.primary_color,j=w?(0,f.k8)(w):void 0,[S,F]=(0,o.useState)(null);return(0,o.useEffect)(()=>{if(y){let e=y.asPath.split("/");e.shift();let t=[];e.forEach((e,i)=>{isNaN(parseInt(e))?t.push(e):t[i-1]="".concat(t[i-1],"/").concat(e)});let i=t.filter(e=>"dashboard"!==e),n=i.map((e,i)=>({breadcrumb:"dashboard"===e.split("/")[0]?t[i]:e.split("/")[0],href:"/"+t.slice(0,i+2).join("/"),hidden:g.includes(e.split("/")[0])})),o=n.reduceRight((e,t,i)=>-1!==e||t.hidden?e:i,-1);F(n.map((e,t)=>({...e,active:t===o})))}},[y]),(0,n.jsxs)("nav",{"aria-label":"breadcrumbs",className:u()("flex flex-col sm:flex-row align-middle font-ptSans text-gray-600 text-xs",r),children:[!b&&(0,n.jsx)(s(),{href:"/dashboard",children:_("common.home")}),p&&p.length>0?(0,n.jsx)(n.Fragment,{children:null==p?void 0:p.map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center",children:[(!b||t>0)&&(0,n.jsx)("span",{className:"inline-flex items-center px-1","aria-hidden":"true",children:(0,n.jsx)(c.Z,{className:"w-3.5 h-3.5 text-gray-400"})}),(0,n.jsx)(s(),{href:e.href,className:u()(t===p.length-1?h:u()(d,"hover:text-gray-900 hover:underline transition-colors")),style:{color:t===p.length-1?j:void 0},children:(0,m.QN)(e.title)})]},t))}):null==S?void 0:S.filter(e=>!e.hidden).map(e=>{var t,i;let o=null===(t=S[0])||void 0===t?void 0:t.breadcrumb.split("?")[0],l=null==e?void 0:e.breadcrumb.split("?")[0],a="".concat(o,".").concat(l,".pageTitle"),r=S.indexOf(e);if(r>=1){let e=null===(i=S[r-1])||void 0===i?void 0:i.breadcrumb.split("?")[0],t="".concat(o,".").concat(e,".").concat(l,".pageTitle");x.exists(t)&&(a=t)}return(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("span",{className:"inline-flex items-center px-1","aria-hidden":"true",children:(0,n.jsx)(c.Z,{className:"w-3.5 h-3.5 text-gray-400"})}),(0,n.jsx)(s(),{href:null==e?void 0:e.href,className:u()(e.active?h:u()(d,"hover:text-gray-900 hover:underline transition-colors"),"capitalize"),style:{color:e.active?j:void 0},children:_(a)})]},r)})]})}},20403:function(e,t,i){"use strict";var n=i(52676),o=i(9746),l=i.n(o),a=i(11152),r=i(75271),s=i(1629),d=i(78619),u=i(75018),c=i(82187),m=i.n(c),f=i(97883),h=i(25261);let loadFormRender=async function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];let{Form:t,Components:n}=await Promise.all([i.e(8201),i.e(6634),i.e(5659),i.e(8883),i.e(866),i.e(2771),i.e(6841),i.e(8315),i.e(2677)]).then(i.bind(i,72202));return n.setComponents(e),t},p=l()(async()=>{let{customComponents:e}=(0,a.C)(),t=await loadFormRender(e);return t},{ssr:!1});t.Z=e=>{var t,i,o,l,c,b,v,g,y,_,x;let w=(0,s.useRouter)(),{customComponents:j}=(0,a.C)(),S=(0,u.XJ)({router:w,i18n:d.ag}),{portalInfo:F,portal:N}=(0,r.useContext)(f.w),{views:C=[],isFetching:k}=(0,h.Z)(),O=null===(t=e.form)||void 0===t?void 0:t.components;e.onFormSubmit&&(window.__formSubmitHandler=e.onFormSubmit),e.onFormFieldChange&&(window.__formFieldChangeHandler=e.onFormFieldChange),(0,u.hF)(O,{isRendered:!0,records:e.records,record:e.record,entity
20Id:e.entityId,moduleId:e.moduleId,schemaType:e.schemaType,formSchemaUuid:e.formSchemaUuid,showIndicators:null===(y=null==N?void 0:null===(o=N.customization)||void 0===o?void 0:null===(i=o.config)||void 0===i?void 0:i.show_indicators)||void 0===y||y,categoriesFromIndicators:null!==(_=null==N?void 0:null===(c=N.customization)||void 0===c?void 0:null===(l=c.config)||void 0===l?void 0:l.categories_from_indicators)&&void 0!==_&&_,evaluationsFromIndicators:null!==(x=null==N?void 0:null===(v=N.customization)||void 0===v?void 0:null===(b=v.config)||void 0===b?void 0:b.evaluations_from_indicators)&&void 0!==x&&x,getRoute:S.getRoute,router:S.router,t:S.t,loadedData:{"portalService.info":{data:F},"viewService.simplified":{data:C},...null==e?void 0:null===(g=e.form)||void 0===g?void 0:g.loadedData},...e.onFormSubmit?{onFormSubmit:e.onFormSubmit}:{},...e.onFormFieldChange?{onFormFieldChange:e.onFormFieldChange}:{}});let P=!k&&Object.keys(j).length>0;return(0,n.jsx)(n.Fragment,{children:P&&(0,n.jsx)("div",{className:m()("w-full h-full min-h-25 delay-1000",Object.keys(j).length>0?"transition-all duration-500":"bg-gray-200 animate-pulse rounded flex flex-row gap-4"),children:(0,n.jsx)("div",{className:m()(Object.keys(j).length>0?"opacity-100":"opacity-0","transition-opacity duration-500 bg-white"),children:Object.keys(j).length>0&&(0,n.jsx)(p,{form:{...e.form,components:O},...e},"".concat(d.ag.language,"-").concat(e.records))})})})}},25261:function(e,t,i){"use strict";i.d(t,{Z:function(){return useFetchSimplifiedViews}});var n=i(75271),o=i(76918),l=i(90394);function useFetchSimplifiedViews(){let[e,t]=(0,n.useState)([]),[i,a]=(0,n.useState)(),[r,s]=(0,n.useState)(!0),fetchSimplifiedViews=()=>{(0,l.zG)(window.location.hostname)?o.x.simplified().then(e=>t(e.data.data)).catch(e=>a(e)).finally(()=>s(!1)):s(!1)};return(0,n.useEffect)(()=>{fetchSimplifiedViews()},[]),{views:e,error:i,isFetching:r}}},18003:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSP:function(){return p}});var n=i(52676),o=i(1629),l=i(78619),a=i(7095),r=i(75271),s=i(57394),d=i.n(s),u=i(34090),c=i(63534),m=i(20403),f=i(26337),h=i(76684);let FormShow=()=>{let{t:e}=(0,l.$G)(),t=(0,o.useRouter)(),{locale:i}=t,{id:s}=t.query,{data:u,handleFetchAllRecordsUuid:p,isFetching:b}=(0,f.Z)(),[v,g]=(0,r.useState)({display:"form",components:[]}),[y,_]=(0,r.useState)({}),{formHeader:x}=(0,h.y)(),w=[{title:e("entities.entities.pageTitle"),href:"/dashboard/entities"},{title:e("form-schemas.form-schemas.pageTitle"),href:"/dashboard/form-schemas?entityId=".concat(t.query.entityId)},{title:e("common.preview"),href:window.location.href}];(0,r.useEffect)(()=>{p(x.dynamic_entity_uuid)},[]);let fetchFormTemplate=()=>a.P.getLatestFormSchemaVersionTemplate(s,"general"),fetchForm=()=>a.P.getLatestFormSchemaVersion(s);return(0,r.useEffect)(()=>{y&&_(e=>({...e,language:t.locale}))},[t.locale]),(0,r.useEffect)(()=>{Promise.all([fetchForm(),fetchFormTemplate()]).then(e=>{let t=e[0].data.data,i=e[1].data.data;if(i.fields.components.length>0&&t.id){let e=i.fields.components;g(t=>({...t,components:e,loadedData:i.fields.loadedData}))}})},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d(),{children:(0,n.jsx)("title",{children:"".concat(x.name[i]," - ").concat(e("common.preview"))})}),(0,n.jsx)("div",{className:"max-w-screen-2xl mx-auto",children:(0,n.jsxs)("div",{className:"bg-white overflow-hidden shadow-sm rounded-lg",children:[(0,n.jsx)("div",{className:"flex items-center border-b border-gray-200",children:(0,n.jsxs)("div",{className:"grow p-6",children:[(0,n.jsx)("div",{className:" bg-white font-bold text-xl sm:text-2xl text-black",children:"".concat(x.name[i]," - ").concat(e("common.preview"))}),(0,n.jsx)("div",{children:(0,n.jsx)(c.Z,{routes:w})})]})}),(0,n.jsx)("div",{className:"p-6",children:(0,n.jsx)(m.Z,{form:v,records:u,isLoading:b,entityId:x.dynamic_entity_uuid})})]})})]})};FormShow.getLayout=function(e){return(0,n.jsx)(u.Z,{children:e})};var p=!0;t.default=FormShow},9746:function(e,t,i){e.exports=i(934)}},function(e){e.O(0,[3043,4090,9774,2888,179],function(){return e(e.s=71669)}),_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.