PageSourceSearch

https://documents.gov.lk/_next/static/chunks/app/layout-0c1a94e49c459cd4.js

js documents.gov.lk collected 2026-10-02 05:43:00 UTC 12,114 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{6659:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var i=s(4928);let n=(0,s(1804).default)(()=>s.e(6388).then(s.bind(s,26388)),{loadableGenerated:{webpack:()=>[26388]},ssr:!1}),l=()=>(0,i.jsx)(n,{})},11897:(e,t,s)=>{"use strict";s.d(t,{Providers:()=>u});var i=s(4928),n=s(18022),l=s(28249),r=s(61294),a=s(77898),o=s(55271),c=s(92092),d=s(47836);function u(e){let{children:t}=e,s=new r.E;return(0,i.jsx)(a.Ht,{client:s,children:(0,i.jsx)(n.M,{children:(0,i.jsxs)(o.N,{attribute:"class",defaultTheme:"light",children:[(0,i.jsx)(l.tE,{}),(0,i.jsx)(d.Co,{children:t}),(0,i.jsx)(c.E,{initialIsOpen:!1})]})})})}},43071:()=>{},45389:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,18790,23)),Promise.resolve().then(s.t.bind(s,22645,23)),Promise.resolve().then(s.t.bind(s,43071,23)),Promise.resolve().then(s.bind(s,53574)),Promise.resolve().then(s.bind(s,6659)),Promise.resolve().then(s.bind(s,11897))},47836:(e,t,s)=>{"use strict";s.d(t,{Co:()=>p,ui:()=>h});var i=s(4928),n=s(92722),l=s(84973),r=s(70400),a=s(64368),o=s(58813),c=s(78488),d=s(42124),u=s(96460);let m=(0,u.createContext)(void 0),x=null,h=e=>{x?x.showDialog(e):console.warn("Dialog provider not initialized")},f=(0,u.forwardRef)((e,t)=>{let[s,m]=(0,u.useState)(null),{isOpen:x,onOpen:h,onOpenChange:f,onClose:p}=(0,n.j)(),g=e=>{m(e),h()};(0,u.useImperativeHandle)(t,()=>({showDialog:g}));let v=()=>{var e;null==s||null==(e=s.onConfirm)||e.call(s),p()},b=()=>{var e;null==s||null==(e=s.onCancel)||e.call(s),p()};return(0,i.jsx)(l.Y,{isOpen:x,onOpenChange:f,children:(0,i.jsx)(r.g,{children:e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.c,{className:"flex flex-col gap-1",children:null==s?void 0:s.title}),(0,i.jsx)(o.h,{children:(0,i.jsx)("div",{children:null==s?void 0:s.message})}),(0,i.jsxs)(c.q,{children:[(0,i.jsx)(d.T,{color:"danger",variant:"light",onPress:b,isLoading:null==s?void 0:s.isLoading,children:(null==s?void 0:s.cancelText)||"Cancel"}),(0,i.jsx)(d.T,{color:"primary",onPress:v,isLoading:null==s?void 0:s.isLoading,children:(null==s?void 0:s.confirmText)||"Confirm"})]})]})})})}),p=e=>{let{children:t}=e,s=(0,u.useRef)(null);return(0,u.useEffect)(()=>(x=s.current,()=>{x=null}),[]),(0,i.jsxs)(m.Provider,{value:{showDialog:e=>{var t;null==(t=s.current)||t.showDialog(e)}},children:[t,(0,i.jsx)(f,{ref:s})]})}},53574:(e,t,s)=>{"use strict";s.d(t,{default:()=>z});var i=s(4928),n=s(42124),l=s(40539),r=s(53376),a=s(12806),o=s(14470),c=s(60222),d=s(7356),u=s(38774),m=s(99896),x=s(52200),h=s(80825),f=s(50162),p=s(11517),g=s(37575),v=s(62484),b=s(15181),j=s(72197),y=s(77209),w=s(61995),S=s(510),N=s(96460);let z=()=>{let[e,t]=(0,N.useState)(!1),[s,z]=(0,N.useState)({fontSize:100,colorMode:"normal",textToSpeech:!1,ttsOnHover:!1,ttsOnSelection:!1}),[T,O]=(0,N.useState)(!1),[C,P]=(0,N.useState)(!1),E=(0,N.useRef)(null),M=(0,N.useRef)([]),R=(0,N.useRef)(0),L=(0,N.useRef)(null),D=window.speechSynthesis;(0,N.useEffect)(()=>{document.documentElement,document.documentElement.style.setProperty("--a11y-font-scale",String(s.fontSize/100));let e=document.body;e.classList.remove("accessibility-grayscale","accessibility-protanopia","accessibility-deuteranopia","accessibility-tritanopia"),"grayscale"===s.colorMode?e.classList.add("accessibility-grayscale"):"protanopia"===s.colorMode?e.classList.add("accessibility-protanopia"):"deuteranopia"===s.colorMode?e.classList.add("accessibility-deuteranopia"):"tritanopia"===s.colorMode&&e.classList.add("accessibility-tritanopia");let t="accessibility-styles",i=document.getElementById(t);i||((i=document.createElement("style")).id=t,document.head.appendChild(i)),i.textContent='\n      /* Font scaling - exclude the accessibility widget itself */\n      // body *:not(.accessibility-widget):not(.accessibility-widget *) {\n      //   font-size: auto !important;\n      // }\n      \n      /* Grayscale filter */\n      .accessibility-grayscale *:not(.accessibility-widget):not(.accessibility-widget *) {\n        filter: grayscale(100%) !important;\n      }\n      \n      /* Protanopia (red-blind) filter */\n      .accessibility-protanopia *:not(.accessibility-widget):not(.accessibility-widget *) {\n        filter: url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><defs><filter id="protanopia"><feColorMatrix values="0.567,0.433,0,0,0 0.558,0.442,0,0,0 0,0.242,0.758,0,0 0,0,0,1,0"/></filter></defs></svg>#protanopia\') !important;\n      }\n      \n      /* Deuteranopia (green-blind) filter */\n      .accessibility-deuteranopia *:not(.accessibility-widget):not(.accessibility-widget *) {\n        filter: url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><defs><filter id="deuteranopia"><feColorMatrix values="0.625,0.375,0,0,0 0.7,0.3,0,0,0 0,0.3,0.7,0,0 0,0,0,1,0"/></filter></defs></svg>#deuteranopia\') !important;\n      }\n      \n      /* Tritanopia (blue-blind) filter */\n      .accessibility-tritanopia *:not(.accessibility-widget):not(.accessibility-widget *) {\n        filter: url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><defs><filter id="tritanopia"><feColorMatrix values="0.95,0.05,0,0,0 0,0.433,0.567,0,0 0,0.475,0.525,0,0 0,0,0,1,0"/></filter></defs></svg>#tritanopia\') !important;\n      }\n      \n      /* Ensure widget is not affected */\n      .accessibility-widget,\n      .accessibility-widget * {\n        font-size: initial !important;\n        filter: none !important;\n      }\n    '},[s]);let H=e=>{if(!D||!s.textToSpeech)return;D.cancel();let t=new SpeechSynthesisUtterance(e);t.rate=.8,t.pitch=1,D.speak(t)},k=()=>
1{if(!D||R.current>=M.current.length){O(!1),P(!1),E.current=null,M.current=[],R.current=0;return}let e=new SpeechSynthesisUtterance(M.current[R.current]);e.rate=.8,e.pitch=1,e.onstart=()=>{O(!0),P(!1)},e.onend=()=>{R.current++,k()},e.onerror=e=>{console.error("Speech synthesis error:",e),O(!1),P(!1),E.current=null,M.current=[],R.current=0},E.current=e,D.speak(e)},F=()=>{D&&(D.cancel(),O(!1),P(!1),E.current=null,M.current=[],R.current=0)};(0,N.useEffect)(()=>{if(!s.ttsOnHover)return;let e=e=>{var t,s;let i=e.target;if(null==(t=L.current)?void 0:t.contains(i))return;let n=null==(s=i.textContent)?void 0:s.trim();n&&n.length>2&&H(n)};return document.addEventListener("mouseenter",e,!0),()=>document.removeEventListener("mouseenter",e,!0)},[s.ttsOnHover,s.textToSpeech]),(0,N.useEffect)(()=>{if(!s.ttsOnSelection)return;let e=()=>{let e=window.getSelection(),t=null==e?void 0:e.toString().trim();if(t&&t.length>2){var s;let i=null==e?void 0:e.getRangeAt(0);!i||(null==(s=L.current)?void 0:s.contains(i.commonAncestorContainer))||H(t)}};return document.addEventListener("selectionchange",e),()=>document.removeEventListener("selectionchange",e)},[s.ttsOnSelection,s.textToSpeech]);let A=e=>{z(t=>({...t,...e}))},I=e=>{A({fontSize:Math.max(50,Math.min(200,s.fontSize+e))})};return(0,i.jsxs)("div",{ref:L,className:"accessibility-widget",children:[(0,i.jsx)(n.T,{onPress:()=>t(!e),color:"primary",variant:"solid",radius:"none",size:"lg",isIconOnly:!0,className:"fixed bottom-36 right-6 z-50","aria-label":"Open accessibility options",children:(0,i.jsx)(x.Y,{size:24})}),e&&(0,i.jsxs)(l.Z,{className:"fixed bottom-4 right-6 w-[300px] h-[620px] shadow-xl z-50 bg-background rounded-none",children:[(0,i.jsx)(r.d,{className:"pb-3 bg-primary text-primary-foreground rounded-none",children:(0,i.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,i.jsxs)("div",{className:"text-lg flex items-center gap-2",children:[(0,i.jsx)(x.Y,{className:"w-5 h-5"}),"Accessibility Options"]}),(0,i.jsx)(n.T,{variant:"light",size:"sm",isIconOnly:!0,onPress:()=>t(!1),"aria-label":"Close accessibility options",className:"text-primary-foreground",children:(0,i.jsx)(h.u,{size:24})})]})}),(0,i.jsxs)(a.U,{className:"space-y-6",children:[(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{className:"text-sm font-medium flex items-center gap-2",children:[(0,i.jsx)(f.Z,{size:24}),"Font Size (",s.fontSize,"%)"]}),(0,i.jsx)(o.Q,{value:s.fontSize,onChange:e=>A({fontSize:Array.isArray(e)?e[0]:e}),minValue:50,maxValue:200,step:1}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(n.T,{variant:"bordered",size:"sm",onPress:()=>I(-10),disabled:s.fontSize<=50,"aria-label":"Decrease font size",className:"rounded-none",children:(0,i.jsx)(p.Q,{size:24})}),(0,i.jsxs)("div",{className:"flex-1 text-center text-sm",children:[s.fontSize,"%"]}),(0,i.jsx)(n.T,{variant:"bordered",size:"sm",onPress:()=>I(10),disabled:s.fontSize>=200,"aria-label":"Increase font size",className:"rounded-none",children:(0,i.jsx)(g.c,{size:24})})]})]}),(0,i.jsx)(c.y,{}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{className:"text-sm font-medium flex items-center gap-2",children:[(0,i.jsx)(v.v,{size:24}),"Color Mode"]}),(0,i.jsx)("div",{className:"space-y-2",children:(0,i.jsxs)(d.U,{value:s.colorMode,onValueChange:e=>A({colorMode:e}),children:[(0,i.jsx)(u.O,{value:"normal",children:"Normal Colors"}),(0,i.jsx)(u.O,{value:"grayscale",children:"Grayscale"}),(0,i.jsx)(u.O,{value:"protanopia",children:"Protanopia (Red-blind)"}),(0,i.jsx)(u.O,{value:"deuteranopia",children:"Deuteranopia (Green-blind)"}),(0,i.jsx)(u.O,{value:"tritanopia",children:"Tritanopia (Blue-blind)"})]})})]}),(0,i.jsx)(c.y,{}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("label",{className:"text-sm font-medium flex items-center gap-2",children:[(0,i.jsx)(b.x,{size:24}),"Text-to-Speech"]}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)("label",{htmlFor:"tts-enabled",className:"text-sm",children:"Enable Text-to-Speech"}),(0,i.jsx)(m.Z,{id:"tts-enabled",isSelected:s.textToSpeech,onValueChange:e=>A({textToSpeech:e})})]}),s.textToSpeech&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)("label",{className:"text-sm font-medium",children:"Page Reading"}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)(n.T,{variant:"flat",onPress:()=>
1{if(!D||!s.textToSpeech)return;if(C){D.resume(),P(!1);return}if(T){D.pause(),P(!0);return}D.cancel();let e=document.body.cloneNode(!0),t=e.querySelector(".accessibility-widget");t&&t.remove(),e.querySelectorAll("script, style, noscript").forEach(e=>e.remove());let i=e.innerText.trim();if(!i||0===i.length)return void console.log("No content to read");let n=[];if(i.length<=4e3)n.push(i);else{let e=i.match(/[^.!?]+[.!?]+/g)||[i],t="";e.forEach(e=>{(t+e).length>4e3?(t&&n.push(t.trim()),t=e):t+=e}),t&&n.push(t.trim())}M.current=n,R.current=0,k()},disabled:!s.textToSpeech,"aria-label":C?"Resume reading":T?"Pause reading":"Start reading page",children:[C?(0,i.jsx)(j.u,{size:20}):T?(0,i.jsx)(y.E,{size:20}):(0,i.jsx)(j.u,{size:20}),C?"Resume":T?"Pause":"Read Page"]}),(0,i.jsxs)(n.T,{variant:"flat",color:"danger",onPress:F,disabled:!T&&!C,"aria-label":"Stop reading",children:[(0,i.jsx)(w.w,{size:20}),"Stop"]})]})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("label",{htmlFor:"tts-hover",className:"text-sm flex items-center gap-2",children:[(0,i.jsx)(S.o,{size:16}),"Read on Hover"]}),(0,i.jsx)(m.Z,{id:"tts-hover",isSelected:s.ttsOnHover,onValueChange:e=>A({ttsOnHover:e})})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("label",{htmlFor:"tts-selection",className:"text-sm flex items-center gap-2",children:[(0,i.jsx)(f.Z,{size:16}),"Read on Selection"]}),(0,i.jsx)(m.Z,{id:"tts-selection",isSelected:s.ttsOnSelection,onValueChange:e=>A({ttsOnSelection:e})})]})]})]})]}),(0,i.jsx)(c.y,{}),(0,i.jsx)("div",{className:"h-[50px]",children:(0,i.jsx)(n.T,{variant:"flat",color:"primary",onPress:()=>{F(),z({fontSize:100,colorMode:"normal",textToSpeech:!1,ttsOnHover:!1,ttsOnSelection:!1})},className:"w-full bg-secondary text-primary-foreground rounded-none",children:"Reset to Default"})})]})]})]})}}},e=>{e.O(0,[3138,492,8180,2124,1155,4586,2793,4077,4810,7679,9314,5377,7790,6072,7358],()=>e(e.s=45389)),_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.