@diplodoc/client 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/build/client/112.js +1 -1
- package/build/client/112.js.map +1 -1
- package/build/client/app.js +1 -1
- package/build/client/app.js.map +1 -1
- package/build/server/112.js +1 -1
- package/build/server/112.js.map +1 -1
- package/build/server/app.js +21 -2
- package/build/server/app.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.0.4](https://github.com/diplodoc-platform/client/compare/v3.0.3...v3.0.4) (2024-09-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* Add worker loading fallback ([c6d8ef8](https://github.com/diplodoc-platform/client/commit/c6d8ef87726597c9d56054ef78cd5d64caedd21e))
|
|
9
|
+
|
|
3
10
|
## [3.0.3](https://github.com/diplodoc-platform/client/compare/v3.0.2...v3.0.3) (2024-09-25)
|
|
4
11
|
|
|
5
12
|
|
package/build/client/112.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";const e={message:"Unknown message type!",code:"UNKNOWN_HANDLER"},s={message:"Worker is not initialized with required config!",code:"NOT_INITIALIZED"},i={message:"Worker is not initialized with required api!",code:"NOT_INITIALIZED"};function t(e){if(!e)throw s}function a(e){if(!e)throw i}const o={init:async e=>(self.config=e,importScripts(self.config.api),a(self.api),self.api.init?.()),suggest:async({query:e,count:s=10})=>(t(self.config),a(self.api),self.api.suggest(e,s)),search:async({query:e,count:s=10,page:i=1})=>(t(self.config),a(self.api),self.api.search(e,s,i))};self.onmessage=async s=>{const[i]=s.ports,{type:t}=s.data,a=o[t];a||i.postMessage({error:e});try{const e=await a(s.data);i.postMessage({result:e})}catch(e){i.postMessage({error:e})}}})();
|
|
1
|
+
(()=>{"use strict";const e={message:"Unknown message type!",code:"UNKNOWN_HANDLER"},s={message:"Worker is not initialized with required config!",code:"NOT_INITIALIZED"},i={message:"Worker is not initialized with required api!",code:"NOT_INITIALIZED"};function t(e){if(!e)throw s}function a(e){if(!e)throw i}const o={init:async e=>(self.config=e,importScripts(self.config.base+"/"+self.config.api),a(self.api),self.api.init?.()),suggest:async({query:e,count:s=10})=>(t(self.config),a(self.api),self.api.suggest(e,s)),search:async({query:e,count:s=10,page:i=1})=>(t(self.config),a(self.api),self.api.search(e,s,i))};self.onmessage=async s=>{const[i]=s.ports,{type:t}=s.data,a=o[t];a||i.postMessage({error:e});try{const e=await a(s.data);i.postMessage({result:e})}catch(e){i.postMessage({error:e})}}})();
|
|
2
2
|
//# sourceMappingURL=112.js.map
|
package/build/client/112.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"112.js","mappings":"mBAqBA,MAAMA,EAAkB,CACpBC,QAAS,wBACTC,KAAM,mBAEJC,EAAyB,CAC3BF,QAAS,kDACTC,KAAM,mBAEJE,EAAsB,CACxBH,QAAS,+CACTC,KAAM,mBAGH,SAASG,EAAaC,GACzB,IAAKA,EACD,MAAMH,CAEd,CAEO,SAASI,EAAUC,GACtB,IAAKA,EACD,MAAMJ,CAEd,CAEA,MAAMK,EAAW,CACbC,KAAUC,MAACL,IACPM,KAAKN,OAASA,EAEdO,cAAcD,KAAKN,OAAOE,
|
|
1
|
+
{"version":3,"file":"112.js","mappings":"mBAqBA,MAAMA,EAAkB,CACpBC,QAAS,wBACTC,KAAM,mBAEJC,EAAyB,CAC3BF,QAAS,kDACTC,KAAM,mBAEJE,EAAsB,CACxBH,QAAS,+CACTC,KAAM,mBAGH,SAASG,EAAaC,GACzB,IAAKA,EACD,MAAMH,CAEd,CAEO,SAASI,EAAUC,GACtB,IAAKA,EACD,MAAMJ,CAEd,CAEA,MAAMK,EAAW,CACbC,KAAUC,MAACL,IACPM,KAAKN,OAASA,EAEdO,cAAcD,KAAKN,OAAOQ,KAAO,IAAMF,KAAKN,OAAOE,KAEnDD,EAAUK,KAAKJ,KAERI,KAAKJ,IAAIG,UAGpBD,QAAaK,OAAC,MAACC,EAAK,MAAEC,EAAQ,OAC1BZ,EAAaO,KAAKN,QAClBC,EAAUK,KAAKJ,KAERI,KAAKJ,IAAIO,QAAQC,EAAOC,IAGnCP,OAAYQ,OAAC,MAACF,EAAK,MAAEC,EAAQ,GAAE,KAAEE,EAAO,MACpCd,EAAaO,KAAKN,QAClBC,EAAUK,KAAKJ,KAERI,KAAKJ,IAAIU,OAAOF,EAAOC,EAAOE,KAI7CP,KAAKQ,UAAYV,UACb,MAAOW,GAAQpB,EAAQqB,OACjB,KAACC,GAAQtB,EAAQuB,KAEjBC,EAAUhB,EAASc,GACpBE,GACDJ,EAAKK,YAAY,CAACC,MAAO3B,IAG7B,IACI,MAAM4B,QAAeH,EAAQxB,EAAQuB,MAErCH,EAAKK,YAAY,CAACE,UACtB,CAAE,MAAOD,GACLN,EAAKK,YAAY,CAACC,SACtB,E","sources":["webpack://@diplodoc/client/./src/components/Search/worker/index.ts"],"sourcesContent":["/// <reference no-default-lib=\"true\"/>\n/// <reference lib=\"ES2015\" />\n/// <reference lib=\"webworker\" />\n\n/* eslint-disable new-cap */\nimport type {\n InitMessage,\n MessageType,\n SearchMessage,\n SuggestMessage,\n WorkerApi,\n WorkerConfig,\n} from '../types';\n\n// Default type of `self` is `WorkerGlobalScope & typeof globalThis`\n// https://github.com/microsoft/TypeScript/issues/14877\ndeclare const self: ServiceWorkerGlobalScope & {\n config?: WorkerConfig;\n api?: WorkerApi;\n};\n\nconst UNKNOWN_HANDLER = {\n message: 'Unknown message type!',\n code: 'UNKNOWN_HANDLER',\n};\nconst NOT_INITIALIZED_CONFIG = {\n message: 'Worker is not initialized with required config!',\n code: 'NOT_INITIALIZED',\n};\nconst NOT_INITIALIZED_API = {\n message: 'Worker is not initialized with required api!',\n code: 'NOT_INITIALIZED',\n};\n\nexport function AssertConfig(config: unknown): asserts config is WorkerConfig {\n if (!config) {\n throw NOT_INITIALIZED_CONFIG;\n }\n}\n\nexport function AssertApi(api: unknown): asserts api is WorkerApi {\n if (!api) {\n throw NOT_INITIALIZED_API;\n }\n}\n\nconst HANDLERS = {\n async init(config: InitMessage) {\n self.config = config;\n\n importScripts(self.config.base + '/' + self.config.api);\n\n AssertApi(self.api);\n\n return self.api.init?.();\n },\n\n async suggest({query, count = 10}: SuggestMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return self.api.suggest(query, count);\n },\n\n async search({query, count = 10, page = 1}: SearchMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return self.api.search(query, count, page);\n },\n} as const;\n\nself.onmessage = async (message) => {\n const [port] = message.ports;\n const {type} = message.data;\n\n const handler = HANDLERS[type as MessageType];\n if (!handler) {\n port.postMessage({error: UNKNOWN_HANDLER});\n }\n\n try {\n const result = await handler(message.data);\n\n port.postMessage({result});\n } catch (error) {\n port.postMessage({error});\n }\n};\n"],"names":["UNKNOWN_HANDLER","message","code","NOT_INITIALIZED_CONFIG","NOT_INITIALIZED_API","AssertConfig","config","AssertApi","api","HANDLERS","async","init","self","importScripts","base","suggest","query","count","search","page","onmessage","port","ports","type","data","handler","postMessage","error","result"],"sourceRoot":""}
|
package/build/client/app.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var e,t={62437:(e,t,n)=>{"use strict";var o=n(96540),r=n(5338),a=n(51436),c=n(21776),s=n(73955);const l=(0,o.createContext)(null);l.displayName="SearchContext";const i=l.Provider,u=(0,o.createContext)({pathname:"/",depth:0});u.displayName="RouterContext";const m=u.Provider;var d=n(78184);const h=769,f={theme:d.Sx.Light,textSize:d.ov.M,showMiniToc:!0,wideFormat:!0,fullScreen:!1},g=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","sd","ur","uz_AF","yi"];let p=function(e){return e.RTL="rtl",e.LTR="ltr",e}({});function w(){return"undefined"!=typeof document}function v({theme:e}){"undefined"!=typeof document&&document.querySelectorAll(".g-root").forEach((t=>{t.classList.toggle("g-root_theme_light","light"===e),t.classList.toggle("g-root_theme_dark","dark"===e)}))}function b(e){if(!w())return;document.body.classList.add("g-root");const t=(e,t)=>document.body.classList.toggle(e,Boolean(t));Object.keys(e).forEach((n=>{switch(n){case"wideFormat":t("dc-root_wide-format",e[n]);break;case"focusSearch":t("dc-root_focused-search",e[n]);break;case"fullScreen":t("dc-root_full-screen",e[n]);break;case"mobileView":t("mobile",e[n]),t("desktop",!e[n])}}))}new Set(["href","src","url","href","icon","image","desktop","mobile","tablet","previewImg","image","avatar","logo","light","dark"]);const y=e=>"boolean"==typeof e?e:!!e&&"true"===e;function E(){const e=C("theme"),t=C("textSize"),n=C("showMiniToc"),o=C("wideFormat"),r=C("fullScreen");return{theme:e,textSize:t,showMiniToc:y(n),wideFormat:y(o),fullScreen:y(r)}}function S(){return!!w()&&document.body.clientWidth<h}function C(e){if(!w())return f[e];try{return sessionStorage.getItem(e)||f[e]}catch{return f[e]}}const k=(0,o.createContext)(d.JA.En);k.displayName="Lang";const M=k.Provider;if(n(44186),"undefined"!=typeof document){const{theme:e,wideFormat:t,fullScreen:n}=E();b({mobileView:S(),wideFormat:t,fullScreen:n}),v({theme:e})}var T=n(47658),x=n(18647),_=n(2919),A=n(23614);const N=(0,A.A)("Layout");function L(){return null}function F(){return null}function O(){return null}const j={doc:!1},z=e=>{const{children:t,doc:n,headerHeight:r=0}={...j,...e};let a,c,s;return o.Children.forEach(t,(e=>{switch(e.type){case L:a=e.props.children;break;case F:c=e.props.children;break;case O:s=e.props.children}})),o.createElement("div",{className:N({"full-header":r>0})},a&&o.createElement("div",{className:N("header")},a),o.createElement("div",{className:N("body")},c&&o.createElement("div",{className:N("content")},c),s&&o.createElement("div",{className:N("footer",{doc:n})},s)))};z.displayName="Layout",z.Header=L,z.Content=F,z.Footer=O;var I=n(98058),P=n(12445),H=n(79568),R=n(3259),D=n(61998),W=n(62945),$=n(61531);const q=(0,A.A)("pc-page-constructor"),V=(0,A.A)("pc-constructor-row"),B=({children:e})=>e?o.createElement(I.f,{className:V()},o.createElement(P.f,null,e)):null;function U({background:e,blocks:t}){const n=(0,H.D)(),r=(0,R.d)(e,n);return o.createElement("div",{className:q("docs")},o.createElement("div",{className:q("wrapper")},t&&r&&o.createElement(D.A,Object.assign({},r,{className:q("background")})),o.createElement(W.x,null,o.createElement(B,null,o.createElement($.F,{items:t})))))}const K=(e,t)=>{const n=(0,_.M5)(e)===d.KG.PageConstructor&&"data"in e&&"fullScreen"in e.data&&e.data.fullScreen,r=(0,o.useMemo)((()=>n?e.data:{blocks:[{type:"page",resetPaddings:!0}]}),[n,e]);return(0,o.useMemo)((()=>({custom:{page:t},layout:r})),[t,r])};var Z=n(29139),G=n(64467);class J{constructor(e){(0,G.A)(this,"worker",void 0),(0,G.A)(this,"config",void 0),(0,G.A)(this,"init",(()=>{this.worker=async function(e){const t=new Worker(new URL(n.p+n.u(112),n.b));return await Q(t,{...e,type:"init"}),t}({...this.config,base:this.base,mark:"Suggest__Item__Marker"})})),(0,G.A)(this,"link",(()=>null)),this.config=e}async suggest(e){return this.request({type:"suggest",query:e})}async search(e){return this.request({type:"search",query:e})}get base(){return window.location.pathname.split("/").slice(0,-(this.config.depth+1)).join("/")}async request(e){return Q(await this.worker,e)}}function Q(e,t){const n=new MessageChannel;return new Promise(((o,r)=>{n.port1.onmessage=e=>{e.data.error?(console.error(e.data.error),r(e.data.error)):o(e.data.result)},n.port1.onmessageerror=e=>{r(e.data.error)},e.postMessage(t,[n.port2])}))}function X(){const e=function(){const e=(0,o.useContext)(k),{depth:t=0}=(0,o.useContext)(u),n=(0,o.useContext)(l);return(0,o.useMemo)((()=>n?new J({...n,depth:t,lang:e}):null),[e,t,n])}(),t=(0,o.useRef)(null),n=(0,o.useCallback)((()=>{b({focusSearch:!0})}),[]),r=(0,o.useCallback)((()=>{b({focusSearch:!1}),setTimeout((()=>{t.current&&t.current.close()}),100)}),[]);return e?o.createElement(Z.$,{ref:t,provider:e,onFocus:n,onBlur:r,classNameContainer:"Suggest"}):null}var Y=n(26141),ee=n(24065);const te=(0,o.memo)((({mobileView:e,theme:t,onChangeTheme:n,textSize:r,onChangeTextSize:a,wideFormat:c,onChangeWideFormat:s,showMiniToc:l,onChangeShowMiniToc:i,lang:u,langs:m,onChangeLang:h})=>o.createElement(Y.n,{controlClassName:"Control",controlSize:d.Uv.L,isWideView:e,isMobileView:e},o.createElement(ee.A,{className:"Controls",theme:t,onChangeTheme:n,wideFormat:c,onChangeWideFormat:s,showMiniToc:l,onChangeShowMiniToc:i,textSize:r,onChangeTextSize:a,lang:u,langs:m,onChangeLang:h}))));te.displayName="HeaderControls";var ne=n(88976),oe=n(45823);function re(e,t,n){return e.some((e=>e.type===n))||t.some((e=>e.type===n))}const ae=(e,t,n,r)=>{const{toc:a}=e,{navigation:c}=a,{header:s={},logo:i}=c,{leftItems:m=[],rightItems:h=[]}=s,f=re(h,m,"controls"),g=re(h,m,"search"),p=(0,o.useContext)(l),w=(0,o.useContext)(u);p&&!g&&h.unshift({type:"search"});const v=(0,o.useMemo)((()=>({withBorder:!0,leftItems:m,rightItems:h})),[m,h]),b=(0,o.useMemo)((()=>({toc:a,router:w,headerHeight:64})),[a,w]),y=(0,o.useMemo)((()=>({controlSize:d.Uv.L,userSettings:t})),[t]),E=(0,o.useMemo)((()=>({header:{leftItems:[]},renderNavigation:()=>o.createElement(ne.A,{logo:i,data:v,navigationTocData:b,mobileControlsData:y}),logo:i})),[v,b,y,i]);return(0,o.useMemo)((()=>({custom:{search:r,controls:n,MobileDropdown:oe.A},layout:E,withControls:f})),[r,n,E,f])};function ce({data:e,...t}){const n=(0,_.M5)(e),r=(0,_.$T)(n);return o.createElement(z,{headerHeight:t.headerHeight},o.createElement(z.Content,null,o.createElement(r,Object.assign({},e,t))))}const se={};function le({data:e,props:t,controls:n}){const{theme:r}=t,a=(0,o.useCallback)((()=>o.createElement(U,e.data)),[e]),c=K(e,a),s=(0,o.useMemo)((()=>({blocks:c.custom})),[c]);return o.createElement(ce,Object.assign({data:e,headerHeight:0},t,n),o.createElement(T.Z,{theme:r},o.createElement(x.i,{custom:s,content:c.layout})))}function ie({data:e,props:t,controls:n}){const{theme:r,fullScreen:a}=t,c=(0,o.useCallback)((()=>o.createElement(X,null)),[]),s=(0,o.useCallback)((()=>o.createElement(te,n)),[n]),l=ae(e,n,s,c),i=(0,o.useCallback)((()=>o.createElement(ce,Object.assign({data:e,headerHeight:a?0:64},t,l.withControls?se:n),o.createElement(U,e.data))),[e,l,t,n,a]),u=K(e,i),m=(0,o.useMemo)((()=>({navigation:l.custom,blocks:u.custom})),[l,u]);return o.createElement(T.Z,{theme:r},o.createElement(x.i,{custom:m,content:u.layout,navigation:a?void 0:l.layout}))}var ue=n(85905),me=n(90358),de=n(57016),he=n(65277);function fe(){const e=(0,he.D)();return o.createElement(o.Fragment,null,o.createElement(de.v,null),o.createElement(me.l,null),o.createElement(ue.A,{theme:e===d.Sx.Dark?"dark":"neutral",zoom:{showMenu:!0,bindKeys:!0}}))}const ge=e=>e.replace(/^./,(e=>e.toUpperCase()));function pe(e,t){const[n,r]=(0,o.useState)(t[e]),a=(0,o.useMemo)((()=>{return t=e,n=r,e=>{!function(e,t){if(w())try{sessionStorage.setItem(e,String(t))}catch{}}(t,e),n(e)};var t,n}),[e,r]);return(0,o.useMemo)((()=>({[e]:n,["onChange"+ge(e)]:a})),[e,n,a])}function we(e){const{data:t,router:n,lang:r,search:l,analytics:u}=e;(0,c.jK)({lang:r});const d=function(){const e=E(),t=pe("theme",e),n=pe("textSize",e),r=pe("wideFormat",e),a=pe("fullScreen",e),c=pe("showMiniToc",e);return(0,o.useMemo)((()=>({...t,...n,...r,...c,...a})),[t,n,r,c,a])}(),h=function({router:e,lang:t,langs:n}){const r=(0,o.useCallback)((t=>{const n=(0,_.UZ)(e,t);window.location.replace(n)}),[e]);return(0,o.useMemo)((()=>({lang:t,langs:n,onChangeLang:r})),[t,n,r])}(e),f=function(){const[e,t]=(0,o.useState)(S()),n=(0,o.useCallback)((()=>{t(S())}),[]);return(0,o.useEffect)(n,[n]),(0,o.useEffect)((()=>(window.addEventListener("resize",n),()=>window.removeEventListener("resize",n))),[n]),e}(),{theme:w,textSize:y,wideFormat:C,fullScreen:k,showMiniToc:T}=d,x=(0,o.useMemo)((()=>({router:n,theme:w,textSize:y,wideFormat:C,fullScreen:k,showMiniToc:T})),[n,w,y,C,k,T]),A=(0,o.useMemo)((()=>({...d,...h,mobileView:f})),[h,d,f]),N=function(e){return g.includes(e)?p.RTL:p.LTR}(r);return(0,o.useEffect)((()=>{b({mobileView:f,wideFormat:C,fullScreen:k}),v({theme:w})}),[w,f,C,k]),o.createElement("div",{className:"App"},o.createElement(a.N,{theme:w,direction:N},o.createElement(M,{value:r},o.createElement(m,{value:n},o.createElement(i,{value:l},function(e){return Boolean(e.toc.navigation)}(t)?o.createElement(ie,{data:t,props:x,controls:A}):o.createElement(le,{data:t,props:x,controls:A}),u&&o.createElement(s.A,{router:n,gtmId:u?.gtm?.id||"",consentMode:u?.gtm?.mode}),o.createElement(fe,null))))))}const ve=document.getElementById("root"),be=window.__DATA__;if(!ve)throw new Error("Root element not found!");window.STATIC_CONTENT?(0,r.c)(ve,o.createElement(we,be)):(0,r.H)(ve).render(o.createElement(we,be))},44186:()=>{"undefined"!=typeof Element&&function(e){const t=e.matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector;e.matches=e.matchesSelector=t||function(e){const t=this;return Array.prototype.some.call(document.querySelectorAll(e),(e=>e===t))}}(Element.prototype),"undefined"!=typeof document&&document.addEventListener("click",(e=>{const t=e.target.href,n=window.location.origin;if(e.target.matches(".dc-doc-layout__center a")&&t.startsWith(n)){e.preventDefault();const n="index",o=".html";if(t.endsWith("/"))return void(window.location.href=`${t}${n}${o}`);const r=t.split("#");if(r.length>0&&!r[0].endsWith(o))return r[0]+=o,void(window.location.href=r.join("#"));window.location.href=t}}))},87040:(e,t,n)=>{"use strict";function o(){}n.d(t,{A:()=>o})},42634:()=>{}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.m=t,o.amdO={},e=[],o.O=(t,n,r,a)=>{if(!n){var c=1/0;for(u=0;u<e.length;u++){for(var[n,r,a]=e[u],s=!0,l=0;l<n.length;l++)(!1&a||c>=a)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(s=!1,a<c&&(c=a));if(s){e.splice(u--,1);var i=r();void 0!==i&&(t=i)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,r,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.u=e=>e+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=524,(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b=document.baseURI||self.location.href;var e={524:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,a,[c,s,l]=n,i=0;if(c.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(l)var u=l(o)}for(t&&t(n);i<c.length;i++)a=c[i],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(u)},n=self.webpackChunk_diplodoc_client=self.webpackChunk_diplodoc_client||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[644,121],(()=>o(62437)));r=o.O(r)})();
|
|
1
|
+
(()=>{var e,t={62437:(e,t,n)=>{"use strict";var o=n(96540),r=n(5338),a=n(51436),c=n(21776),s=n(73955);const i=(0,o.createContext)(null);i.displayName="SearchContext";const l=i.Provider,u=(0,o.createContext)({pathname:"/",depth:0});u.displayName="RouterContext";const m=u.Provider;var d=n(78184);const h=769,f={theme:d.Sx.Light,textSize:d.ov.M,showMiniToc:!0,wideFormat:!0,fullScreen:!1},g=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","sd","ur","uz_AF","yi"];let p=function(e){return e.RTL="rtl",e.LTR="ltr",e}({});function w(){return"undefined"!=typeof document}function b({theme:e}){"undefined"!=typeof document&&document.querySelectorAll(".g-root").forEach((t=>{t.classList.toggle("g-root_theme_light","light"===e),t.classList.toggle("g-root_theme_dark","dark"===e)}))}function v(e){if(!w())return;document.body.classList.add("g-root");const t=(e,t)=>document.body.classList.toggle(e,Boolean(t));Object.keys(e).forEach((n=>{switch(n){case"wideFormat":t("dc-root_wide-format",e[n]);break;case"focusSearch":t("dc-root_focused-search",e[n]);break;case"fullScreen":t("dc-root_full-screen",e[n]);break;case"mobileView":t("mobile",e[n]),t("desktop",!e[n])}}))}new Set(["href","src","url","href","icon","image","desktop","mobile","tablet","previewImg","image","avatar","logo","light","dark"]);const y=e=>"boolean"==typeof e?e:!!e&&"true"===e;function E(){const e=C("theme"),t=C("textSize"),n=C("showMiniToc"),o=C("wideFormat"),r=C("fullScreen");return{theme:e,textSize:t,showMiniToc:y(n),wideFormat:y(o),fullScreen:y(r)}}function S(){return!!w()&&document.body.clientWidth<h}function C(e){if(!w())return f[e];try{return sessionStorage.getItem(e)||f[e]}catch{return f[e]}}const k=(0,o.createContext)(d.JA.En);k.displayName="Lang";const M=k.Provider;if(n(44186),"undefined"!=typeof document){const{theme:e,wideFormat:t,fullScreen:n}=E();v({mobileView:S(),wideFormat:t,fullScreen:n}),b({theme:e})}var x=n(47658),T=n(18647),_=n(2919),A=n(23614);const L=(0,A.A)("Layout");function N(){return null}function O(){return null}function j(){return null}const F={doc:!1},z=e=>{const{children:t,doc:n,headerHeight:r=0}={...F,...e};let a,c,s;return o.Children.forEach(t,(e=>{switch(e.type){case N:a=e.props.children;break;case O:c=e.props.children;break;case j:s=e.props.children}})),o.createElement("div",{className:L({"full-header":r>0})},a&&o.createElement("div",{className:L("header")},a),o.createElement("div",{className:L("body")},c&&o.createElement("div",{className:L("content")},c),s&&o.createElement("div",{className:L("footer",{doc:n})},s)))};z.displayName="Layout",z.Header=N,z.Content=O,z.Footer=j;var I=n(98058),P=n(12445),R=n(79568),D=n(3259),H=n(61998),W=n(62945),$=n(61531);const U=(0,A.A)("pc-page-constructor"),q=(0,A.A)("pc-constructor-row"),B=({children:e})=>e?o.createElement(I.f,{className:q()},o.createElement(P.f,null,e)):null;function V({background:e,blocks:t}){const n=(0,R.D)(),r=(0,D.d)(e,n);return o.createElement("div",{className:U("docs")},o.createElement("div",{className:U("wrapper")},t&&r&&o.createElement(H.A,Object.assign({},r,{className:U("background")})),o.createElement(W.x,null,o.createElement(B,null,o.createElement($.F,{items:t})))))}const K=(e,t)=>{const n=(0,_.M5)(e)===d.KG.PageConstructor&&"data"in e&&"fullScreen"in e.data&&e.data.fullScreen,r=(0,o.useMemo)((()=>n?e.data:{blocks:[{type:"page",resetPaddings:!0}]}),[n,e]);return(0,o.useMemo)((()=>({custom:{page:t},layout:r})),[t,r])};var Z=n(29139),G=n(64467);class J{constructor(e){(0,G.A)(this,"worker",void 0),(0,G.A)(this,"config",void 0),(0,G.A)(this,"init",(()=>{this.worker=async function(e){const t=await async function(){try{return new Worker(new URL(n.p+n.u(112),n.b))}catch(e){if(e instanceof DOMException){const t=Q.exec(e.message);if(t){const e=t[1],n=new Blob([`importScripts('${e}');`],{type:"text/javascript"});return new Worker(URL.createObjectURL(n))}}throw e}}();return await X(t,{...e,type:"init"}),t}({...this.config,base:this.base,mark:"Suggest__Item__Marker"})})),(0,G.A)(this,"link",(()=>null)),this.config=e}async suggest(e){return this.request({type:"suggest",query:e})}async search(e){return this.request({type:"search",query:e})}get base(){return window.location.href.split("/").slice(0,-this.config.depth).join("/")}async request(e){return X(await this.worker,e)}}const Q=/Script at '(.*?)' cannot be accessed from origin/;function X(e,t){const n=new MessageChannel;return new Promise(((o,r)=>{n.port1.onmessage=e=>{e.data.error?(console.error(e.data.error),r(e.data.error)):o(e.data.result)},n.port1.onmessageerror=e=>{r(e.data.error)},e.postMessage(t,[n.port2])}))}function Y(){const e=function(){const e=(0,o.useContext)(k),{depth:t=0}=(0,o.useContext)(u),n=(0,o.useContext)(i);return(0,o.useMemo)((()=>n?new J({...n,depth:t,lang:e}):null),[e,t,n])}(),t=(0,o.useRef)(null),n=(0,o.useCallback)((()=>{v({focusSearch:!0})}),[]),r=(0,o.useCallback)((()=>{v({focusSearch:!1}),setTimeout((()=>{t.current&&t.current.close()}),100)}),[]);return e?o.createElement(Z.$,{ref:t,provider:e,onFocus:n,onBlur:r,classNameContainer:"Suggest"}):null}var ee=n(26141),te=n(24065);const ne=(0,o.memo)((({mobileView:e,theme:t,onChangeTheme:n,textSize:r,onChangeTextSize:a,wideFormat:c,onChangeWideFormat:s,showMiniToc:i,onChangeShowMiniToc:l,lang:u,langs:m,onChangeLang:h})=>o.createElement(ee.n,{controlClassName:"Control",controlSize:d.Uv.L,isWideView:e,isMobileView:e},o.createElement(te.A,{className:"Controls",theme:t,onChangeTheme:n,wideFormat:c,onChangeWideFormat:s,showMiniToc:i,onChangeShowMiniToc:l,textSize:r,onChangeTextSize:a,lang:u,langs:m,onChangeLang:h}))));ne.displayName="HeaderControls";var oe=n(88976),re=n(45823);function ae(e,t,n){return e.some((e=>e.type===n))||t.some((e=>e.type===n))}const ce=(e,t,n,r)=>{const{toc:a}=e,{navigation:c}=a,{header:s={},logo:l}=c,{leftItems:m=[],rightItems:h=[]}=s,f=ae(h,m,"controls"),g=ae(h,m,"search"),p=(0,o.useContext)(i),w=(0,o.useContext)(u);p&&!g&&h.unshift({type:"search"});const b=(0,o.useMemo)((()=>({withBorder:!0,leftItems:m,rightItems:h})),[m,h]),v=(0,o.useMemo)((()=>({toc:a,router:w,headerHeight:64})),[a,w]),y=(0,o.useMemo)((()=>({controlSize:d.Uv.L,userSettings:t})),[t]),E=(0,o.useMemo)((()=>({header:{leftItems:[]},renderNavigation:()=>o.createElement(oe.A,{logo:l,data:b,navigationTocData:v,mobileControlsData:y}),logo:l})),[b,v,y,l]);return(0,o.useMemo)((()=>({custom:{search:r,controls:n,MobileDropdown:re.A},layout:E,withControls:f})),[r,n,E,f])};function se({data:e,...t}){const n=(0,_.M5)(e),r=(0,_.$T)(n);return o.createElement(z,{headerHeight:t.headerHeight},o.createElement(z.Content,null,o.createElement(r,Object.assign({},e,t))))}const ie={};function le({data:e,props:t,controls:n}){const{theme:r}=t,a=(0,o.useCallback)((()=>o.createElement(V,e.data)),[e]),c=K(e,a),s=(0,o.useMemo)((()=>({blocks:c.custom})),[c]);return o.createElement(se,Object.assign({data:e,headerHeight:0},t,n),o.createElement(x.Z,{theme:r},o.createElement(T.i,{custom:s,content:c.layout})))}function ue({data:e,props:t,controls:n}){const{theme:r,fullScreen:a}=t,c=(0,o.useCallback)((()=>o.createElement(Y,null)),[]),s=(0,o.useCallback)((()=>o.createElement(ne,n)),[n]),i=ce(e,n,s,c),l=(0,o.useCallback)((()=>o.createElement(se,Object.assign({data:e,headerHeight:a?0:64},t,i.withControls?ie:n),o.createElement(V,e.data))),[e,i,t,n,a]),u=K(e,l),m=(0,o.useMemo)((()=>({navigation:i.custom,blocks:u.custom})),[i,u]);return o.createElement(x.Z,{theme:r},o.createElement(T.i,{custom:m,content:u.layout,navigation:a?void 0:i.layout}))}var me=n(85905),de=n(90358),he=n(57016),fe=n(65277);function ge(){const e=(0,fe.D)();return o.createElement(o.Fragment,null,o.createElement(he.v,null),o.createElement(de.l,null),o.createElement(me.A,{theme:e===d.Sx.Dark?"dark":"neutral",zoom:{showMenu:!0,bindKeys:!0}}))}const pe=e=>e.replace(/^./,(e=>e.toUpperCase()));function we(e,t){const[n,r]=(0,o.useState)(t[e]),a=(0,o.useMemo)((()=>{return t=e,n=r,e=>{!function(e,t){if(w())try{sessionStorage.setItem(e,String(t))}catch{}}(t,e),n(e)};var t,n}),[e,r]);return(0,o.useMemo)((()=>({[e]:n,["onChange"+pe(e)]:a})),[e,n,a])}function be(e){const{data:t,router:n,lang:r,search:i,analytics:u}=e;(0,c.jK)({lang:r});const d=function(){const e=E(),t=we("theme",e),n=we("textSize",e),r=we("wideFormat",e),a=we("fullScreen",e),c=we("showMiniToc",e);return(0,o.useMemo)((()=>({...t,...n,...r,...c,...a})),[t,n,r,c,a])}(),h=function({router:e,lang:t,langs:n}){const r=(0,o.useCallback)((t=>{const n=(0,_.UZ)(e,t);window.location.replace(n)}),[e]);return(0,o.useMemo)((()=>({lang:t,langs:n,onChangeLang:r})),[t,n,r])}(e),f=function(){const[e,t]=(0,o.useState)(S()),n=(0,o.useCallback)((()=>{t(S())}),[]);return(0,o.useEffect)(n,[n]),(0,o.useEffect)((()=>(window.addEventListener("resize",n),()=>window.removeEventListener("resize",n))),[n]),e}(),{theme:w,textSize:y,wideFormat:C,fullScreen:k,showMiniToc:x}=d,T=(0,o.useMemo)((()=>({router:n,theme:w,textSize:y,wideFormat:C,fullScreen:k,showMiniToc:x})),[n,w,y,C,k,x]),A=(0,o.useMemo)((()=>({...d,...h,mobileView:f})),[h,d,f]),L=function(e){return g.includes(e)?p.RTL:p.LTR}(r);return(0,o.useEffect)((()=>{v({mobileView:f,wideFormat:C,fullScreen:k}),b({theme:w})}),[w,f,C,k]),o.createElement("div",{className:"App"},o.createElement(a.N,{theme:w,direction:L},o.createElement(M,{value:r},o.createElement(m,{value:n},o.createElement(l,{value:i},function(e){return Boolean(e.toc.navigation)}(t)?o.createElement(ue,{data:t,props:T,controls:A}):o.createElement(le,{data:t,props:T,controls:A}),u&&o.createElement(s.A,{router:n,gtmId:u?.gtm?.id||"",consentMode:u?.gtm?.mode}),o.createElement(ge,null))))))}const ve=document.getElementById("root"),ye=window.__DATA__;if(!ve)throw new Error("Root element not found!");window.STATIC_CONTENT?(0,r.c)(ve,o.createElement(be,ye)):(0,r.H)(ve).render(o.createElement(be,ye))},44186:()=>{"undefined"!=typeof Element&&function(e){const t=e.matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector;e.matches=e.matchesSelector=t||function(e){const t=this;return Array.prototype.some.call(document.querySelectorAll(e),(e=>e===t))}}(Element.prototype),"undefined"!=typeof document&&document.addEventListener("click",(e=>{const t=e.target.href,n=window.location.origin;if(e.target.matches(".dc-doc-layout__center a")&&t.startsWith(n)){e.preventDefault();const n="index",o=".html";if(t.endsWith("/"))return void(window.location.href=`${t}${n}${o}`);const r=t.split("#");if(r.length>0&&!r[0].endsWith(o))return r[0]+=o,void(window.location.href=r.join("#"));window.location.href=t}}))},87040:(e,t,n)=>{"use strict";function o(){}n.d(t,{A:()=>o})},42634:()=>{}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.m=t,o.amdO={},e=[],o.O=(t,n,r,a)=>{if(!n){var c=1/0;for(u=0;u<e.length;u++){for(var[n,r,a]=e[u],s=!0,i=0;i<n.length;i++)(!1&a||c>=a)&&Object.keys(o.O).every((e=>o.O[e](n[i])))?n.splice(i--,1):(s=!1,a<c&&(c=a));if(s){e.splice(u--,1);var l=r();void 0!==l&&(t=l)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,r,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.u=e=>e+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=524,(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b=document.baseURI||self.location.href;var e={524:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,a,[c,s,i]=n,l=0;if(c.some((t=>0!==e[t]))){for(r in s)o.o(s,r)&&(o.m[r]=s[r]);if(i)var u=i(o)}for(t&&t(n);l<c.length;l++)a=c[l],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(u)},n=self.webpackChunk_diplodoc_client=self.webpackChunk_diplodoc_client||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[644,121],(()=>o(62437)));r=o.O(r)})();
|
|
2
2
|
//# sourceMappingURL=app.js.map
|
package/build/client/app.js.map
CHANGED
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aded","webpack://@diplodoc/client/./src/components/Search/Search.tsx","webpack://@diplodoc/client/./src/components/Search/index.ts","webpack://@diplodoc/client/./src/components/Router/index.ts","webpack://@diplodoc/client/./src/constants.ts","webpack://@diplodoc/client/./src/utils.ts","webpack://@diplodoc/client/./src/hooks/useLang.ts","webpack://@diplodoc/client/./src/interceptors/fast-class-applier.ts","webpack://@diplodoc/client/./src/components/Layout/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/useContent.tsx","webpack://@diplodoc/client/./src/components/Search/provider/index.ts","webpack://@diplodoc/client/./src/components/Search/Suggest.tsx","webpack://@diplodoc/client/./src/components/Search/useProvider.ts","webpack://@diplodoc/client/./src/components/HeaderControls/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/useNavigation.tsx","webpack://@diplodoc/client/./src/components/App/Page.tsx","webpack://@diplodoc/client/./src/components/App/Runtime.tsx","webpack://@diplodoc/client/./src/components/App/useSettings.ts","webpack://@diplodoc/client/./src/components/App/index.tsx","webpack://@diplodoc/client/./src/components/App/useLangs.ts","webpack://@diplodoc/client/./src/components/App/useMobile.ts","webpack://@diplodoc/client/./src/index.tsx","webpack://@diplodoc/client/./src/interceptors/leading-page-links.js","webpack://@diplodoc/client/./src/stub/empty-module.js","webpack://@diplodoc/client/webpack/bootstrap","webpack://@diplodoc/client/webpack/runtime/amd options","webpack://@diplodoc/client/webpack/runtime/compat get default export","webpack://@diplodoc/client/webpack/runtime/define property getters","webpack://@diplodoc/client/webpack/runtime/get javascript chunk filename","webpack://@diplodoc/client/webpack/runtime/global","webpack://@diplodoc/client/webpack/runtime/hasOwnProperty shorthand","webpack://@diplodoc/client/webpack/runtime/make namespace object","webpack://@diplodoc/client/webpack/runtime/node module decorator","webpack://@diplodoc/client/webpack/runtime/runtimeId","webpack://@diplodoc/client/webpack/runtime/publicPath","webpack://@diplodoc/client/webpack/runtime/jsonp chunk loading","webpack://@diplodoc/client/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import React from 'react';\n\nexport const Search = () => {\n return <div>Initial</div>;\n};\n","import type {SearchConfig, WorkerApi, WorkerConfig} from './types';\n\nimport {createContext, useContext} from 'react';\n\nexport type {SearchConfig, WorkerConfig, WorkerApi};\n\nexport const SearchContext = createContext<SearchConfig | null | undefined>(null);\n\nSearchContext.displayName = 'SearchContext';\n\nexport const SearchProvider = SearchContext.Provider;\n\nexport {Search} from './Search';\n\nexport function useSearch() {\n return useContext(SearchContext);\n}\n","import type {Router} from '@diplodoc/components';\n\nimport {createContext, useContext} from 'react';\n\nexport interface RouterConfig extends Router {\n depth: number;\n}\n\nexport const RouterContext = createContext<RouterConfig>({\n pathname: '/',\n depth: 0,\n});\n\nRouterContext.displayName = 'RouterContext';\n\nexport const RouterProvider = RouterContext.Provider;\n\nexport function useRouter() {\n return useContext(RouterContext);\n}\n","import {TextSizes, Theme} from '@diplodoc/components';\n\nexport const HEADER_HEIGHT = 64;\n\nexport const MOBILE_VIEW_WIDTH_BREAKPOINT = 769;\n\nexport const DEFAULT_USER_SETTINGS = {\n theme: Theme.Light,\n textSize: TextSizes.M,\n showMiniToc: true,\n wideFormat: true,\n fullScreen: false,\n};\n\nexport const RTL_LANGS = [\n 'ar',\n 'arc',\n 'ckb',\n 'dv',\n 'fa',\n 'ha',\n 'he',\n 'khw',\n 'ks',\n 'ps',\n 'sd',\n 'ur',\n 'uz_AF',\n 'yi',\n];\n\nexport enum TextDirection {\n RTL = 'rtl',\n LTR = 'ltr',\n}\n\nexport const LINK_KEYS_LEADING_CONFIG = ['href'];\nexport const LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG = [\n 'src',\n 'url',\n 'href',\n 'icon',\n 'image',\n 'desktop',\n 'mobile',\n 'tablet',\n 'previewImg',\n 'image',\n 'avatar',\n 'logo',\n 'light',\n 'dark',\n];\n\nexport const LINK_KEYS = [\n ...new Set([...LINK_KEYS_LEADING_CONFIG, ...LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG]),\n];\n","import {Lang, Theme} from '@diplodoc/components';\n\nimport {\n DEFAULT_USER_SETTINGS,\n MOBILE_VIEW_WIDTH_BREAKPOINT,\n RTL_LANGS,\n TextDirection,\n} from './constants';\n\nexport function isBrowser() {\n return typeof document !== 'undefined';\n}\n\nexport function updateThemeClassName({theme}: {theme: Theme}) {\n if (typeof document === 'undefined') {\n return;\n }\n\n document.querySelectorAll('.g-root').forEach((el) => {\n el.classList.toggle('g-root_theme_light', theme === 'light');\n el.classList.toggle('g-root_theme_dark', theme === 'dark');\n });\n}\n\nexport function updateRootClassName(states: {\n mobileView?: boolean;\n wideFormat?: boolean;\n fullScreen?: boolean;\n focusSearch?: boolean;\n}) {\n if (!isBrowser()) {\n return;\n }\n\n document.body.classList.add('g-root');\n\n const toggle = (name: string, state: unknown) =>\n document.body.classList.toggle(name, Boolean(state));\n\n Object.keys(states).forEach((state) => {\n switch (state) {\n case 'wideFormat':\n toggle('dc-root_wide-format', states[state]);\n break;\n case 'focusSearch':\n toggle('dc-root_focused-search', states[state]);\n break;\n case 'fullScreen':\n toggle('dc-root_full-screen', states[state]);\n break;\n case 'mobileView':\n toggle('mobile', states[state]);\n toggle('desktop', !states[state]);\n break;\n }\n });\n}\n\nexport function getDirection(lang: Lang): TextDirection {\n const isRTL = RTL_LANGS.includes(lang);\n\n return isRTL ? TextDirection.RTL : TextDirection.LTR;\n}\n\nconst toBoolean = (str: string | boolean) => {\n if (typeof str === 'boolean') {\n return str;\n }\n\n return str ? str === 'true' : false;\n};\n\nexport type Settings = typeof DEFAULT_USER_SETTINGS;\n\nexport function getSettings() {\n const theme = getSetting('theme');\n const textSize = getSetting('textSize');\n const showMiniToc = getSetting('showMiniToc');\n const wideFormat = getSetting('wideFormat');\n const fullScreen = getSetting('fullScreen');\n\n return {\n theme,\n textSize,\n showMiniToc: toBoolean(showMiniToc),\n wideFormat: toBoolean(wideFormat),\n fullScreen: toBoolean(fullScreen),\n };\n}\n\nexport function getMobileView() {\n if (!isBrowser()) {\n return false;\n }\n\n return document.body.clientWidth < MOBILE_VIEW_WIDTH_BREAKPOINT;\n}\n\nfunction getSetting<T extends keyof Settings>(name: T): Settings[T] {\n if (!isBrowser()) {\n return DEFAULT_USER_SETTINGS[name];\n }\n\n try {\n return (sessionStorage.getItem(name) as Settings[T]) || DEFAULT_USER_SETTINGS[name];\n } catch {\n return DEFAULT_USER_SETTINGS[name];\n }\n}\n\nexport function setSetting<T>(name: string, value: T) {\n if (!isBrowser()) {\n return;\n }\n\n try {\n sessionStorage.setItem(name, String(value));\n } catch {}\n}\n","import {createContext, useContext} from 'react';\nimport {Lang} from '@diplodoc/components';\n\nconst LangContext = createContext<Lang>(Lang.En);\n\nLangContext.displayName = 'Lang';\n\nexport const LangProvider = LangContext.Provider;\n\nexport function useLang() {\n return useContext(LangContext);\n}\n","import {getMobileView, getSettings, updateRootClassName, updateThemeClassName} from '../utils';\n\nif (typeof document !== 'undefined') {\n const {theme, wideFormat, fullScreen} = getSettings();\n const mobileView = getMobileView();\n\n updateRootClassName({mobileView, wideFormat, fullScreen});\n updateThemeClassName({theme});\n}\n","import React, {FC, PropsWithChildren, ReactElement} from 'react';\nimport block from 'bem-cn-lite';\n\nimport './Layout.scss';\n\nconst b = block('Layout');\n\nfunction Header() {\n return null;\n}\n\nfunction Content() {\n return null;\n}\n\nfunction Footer() {\n return null;\n}\n\ntype LayoutStatics = {\n Header: FC<PropsWithChildren>;\n Content: FC<PropsWithChildren>;\n Footer: FC<PropsWithChildren>;\n};\n\ntype LayoutProps = {\n doc?: boolean;\n headerHeight?: number;\n};\n\nconst defaults = {\n doc: false,\n};\n\nexport const Layout: LayoutStatics & FC<PropsWithChildren<LayoutProps>> = (props) => {\n const {children, doc, headerHeight = 0} = {...defaults, ...props};\n let header, content, footer;\n\n React.Children.forEach(children as ReactElement[], (child: ReactElement) => {\n switch (child.type) {\n case Header:\n header = child.props.children;\n break;\n case Content:\n content = child.props.children;\n break;\n case Footer:\n footer = child.props.children;\n break;\n }\n });\n\n return (\n <div className={b({'full-header': headerHeight > 0})}>\n {header && <div className={b('header')}>{header}</div>}\n <div className={b('body')}>\n {content && <div className={b('content')}>{content}</div>}\n {footer && <div className={b('footer', {doc})}>{footer}</div>}\n </div>\n </div>\n );\n};\n\nLayout.displayName = 'Layout';\n\nLayout.Header = Header;\nLayout.Content = Content;\nLayout.Footer = Footer;\n","import type {PropsWithChildren} from 'react';\nimport type {PageContent} from '@gravity-ui/page-constructor';\n\nimport React from 'react';\nimport block from 'bem-cn-lite';\nimport {\n BackgroundMedia,\n Col,\n ConstructorBlocks,\n Grid,\n Row,\n getThemedValue,\n useTheme,\n} from '@gravity-ui/page-constructor';\n\nconst bPC = block('pc-page-constructor');\nconst bPCRow = block('pc-constructor-row');\n\nexport const ConstructorRow = ({children}: PropsWithChildren) =>\n children ? (\n <Row className={bPCRow()}>\n <Col>{children}</Col>\n </Row>\n ) : null;\n\nexport function ConstructorPage({background, blocks}: PageContent) {\n const theme = useTheme();\n const themedBackground = getThemedValue(background, theme);\n\n return (\n <div className={bPC('docs')}>\n <div className={bPC('wrapper')}>\n {blocks && themedBackground && (\n <BackgroundMedia {...themedBackground} className={bPC('background')} />\n )}\n <Grid>\n <ConstructorRow>\n <ConstructorBlocks items={blocks} />\n </ConstructorRow>\n </Grid>\n </div>\n </div>\n );\n}\n","import type {ReactNode} from 'react';\nimport type {PageContent} from '@gravity-ui/page-constructor';\nimport type {DocContentPageData} from '@diplodoc/components';\n\nimport {DocumentType, getPageType} from '@diplodoc/components';\nimport {useMemo} from 'react';\n\nexport const useContent = (data: DocContentPageData, CustomPage: () => ReactNode) => {\n const type = getPageType(data);\n const fullScreen =\n type === DocumentType.PageConstructor &&\n 'data' in data &&\n 'fullScreen' in data.data &&\n data.data.fullScreen;\n\n const layout = useMemo(\n () =>\n fullScreen\n ? (data.data as PageContent)\n : {\n blocks: [\n {\n type: 'page',\n resetPaddings: true,\n },\n ],\n },\n [fullScreen, data],\n );\n\n const config = useMemo(\n () => ({\n custom: {\n page: CustomPage,\n },\n layout,\n }),\n [CustomPage, layout],\n );\n\n return config;\n};\n","import type {ISearchProvider, ISearchResult} from '@diplodoc/components';\nimport type {SearchConfig, WorkerConfig} from '../types';\n\nexport class SearchProvider implements ISearchProvider {\n private worker!: Promise<Worker>;\n\n private config: SearchConfig;\n\n constructor(config: SearchConfig) {\n this.config = config;\n }\n\n init = () => {\n this.worker = initWorker({\n ...this.config,\n base: this.base,\n mark: 'Suggest__Item__Marker',\n });\n };\n\n async suggest(query: string) {\n return this.request({\n type: 'suggest',\n query,\n }) as Promise<ISearchResult[]>;\n }\n\n async search(query: string) {\n return this.request({\n type: 'search',\n query,\n }) as Promise<ISearchResult[]>;\n }\n\n // Temporary disable link to search page\n // TODO: Implement search page\n link = () => null;\n\n // link = (query: string) => {\n // const params = query ? `?query=${encodeURIComponent(query)}` : '';\n //\n // return `${this.base}/${this.config.link}${params}`;\n // };\n\n private get base() {\n return window.location.pathname\n .split('/')\n .slice(0, -(this.config.depth + 1))\n .join('/');\n }\n\n private async request(message: object) {\n return request(await this.worker, message);\n }\n}\n\nasync function initWorker(config: WorkerConfig) {\n const worker = new Worker(new URL('../worker/index.ts', import.meta.url));\n\n await request(worker, {...config, type: 'init'});\n\n return worker;\n}\n\nfunction request(worker: Worker, message: object) {\n const channel = new MessageChannel();\n\n return new Promise((resolve, reject) => {\n channel.port1.onmessage = (message) => {\n if (message.data.error) {\n // eslint-disable-next-line no-console\n console.error(message.data.error);\n\n reject(message.data.error);\n } else {\n resolve(message.data.result);\n }\n };\n\n channel.port1.onmessageerror = (message) => {\n reject(message.data.error);\n };\n\n worker.postMessage(message, [channel.port2]);\n });\n}\n","import type {ISearchProvider, SearchSuggestApi} from '@diplodoc/components';\n\nimport React, {useCallback, useRef} from 'react';\nimport {SearchSuggest} from '@diplodoc/components';\n\nimport {updateRootClassName} from '../../utils';\n\nimport {useProvider} from './useProvider';\nimport './Suggest.scss';\n\nexport function Suggest() {\n const provider: ISearchProvider | null = useProvider();\n const suggest = useRef<SearchSuggestApi>(null);\n\n const onFocus = useCallback(() => {\n updateRootClassName({focusSearch: true});\n }, []);\n\n const onBlur = useCallback(() => {\n updateRootClassName({focusSearch: false});\n setTimeout(() => {\n if (suggest.current) {\n suggest.current.close();\n }\n }, 100);\n }, []);\n\n if (!provider) {\n return null;\n }\n\n return (\n <SearchSuggest\n ref={suggest}\n provider={provider}\n onFocus={onFocus}\n onBlur={onBlur}\n classNameContainer={'Suggest'}\n />\n );\n}\n","import {useContext, useMemo} from 'react';\n\nimport {RouterContext, SearchContext} from '../index';\nimport {useLang} from '../../hooks/useLang';\n\nimport {SearchProvider} from './provider';\n\nexport function useProvider() {\n const lang = useLang();\n const {depth = 0} = useContext(RouterContext);\n const search = useContext(SearchContext);\n\n return useMemo(() => {\n if (!search) {\n return null;\n }\n\n return new SearchProvider({\n ...search,\n depth,\n lang,\n });\n }, [lang, depth, search]);\n}\n","import React, {memo} from 'react';\nimport {ControlSizes, Controls, ControlsLayout, Lang, TextSizes, Theme} from '@diplodoc/components';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype OnChangeCallback = (value: any) => void;\n\nexport type Props = {\n mobileView: boolean;\n\n theme: Theme;\n onChangeTheme: OnChangeCallback;\n textSize: TextSizes;\n onChangeTextSize: OnChangeCallback;\n wideFormat: boolean;\n onChangeWideFormat: OnChangeCallback;\n showMiniToc: boolean;\n onChangeShowMiniToc: OnChangeCallback;\n lang: Lang;\n langs: Lang[];\n onChangeLang?: (lang: Lang) => void;\n};\n\nexport const HeaderControls = memo<Props>(\n ({\n mobileView,\n\n theme,\n onChangeTheme,\n\n textSize,\n onChangeTextSize,\n\n wideFormat,\n onChangeWideFormat,\n\n showMiniToc,\n onChangeShowMiniToc,\n\n lang,\n langs,\n onChangeLang,\n }) => {\n return (\n <ControlsLayout\n controlClassName={'Control'}\n controlSize={ControlSizes.L}\n isWideView={mobileView}\n isMobileView={mobileView}\n >\n <Controls\n className={'Controls'}\n theme={theme}\n onChangeTheme={onChangeTheme}\n wideFormat={wideFormat}\n onChangeWideFormat={onChangeWideFormat}\n showMiniToc={showMiniToc}\n onChangeShowMiniToc={onChangeShowMiniToc}\n textSize={textSize}\n onChangeTextSize={onChangeTextSize}\n lang={lang}\n langs={langs}\n onChangeLang={onChangeLang}\n />\n </ControlsLayout>\n );\n },\n);\n\nHeaderControls.displayName = 'HeaderControls';\n","import type {ReactNode} from 'react';\nimport type {NavigationData, NavigationItemModel} from '@gravity-ui/page-constructor';\nimport type {DocBasePageData} from '@diplodoc/components';\nimport type {WithNavigation} from '../App';\nimport type {Props as HeaderControlsProps} from '../HeaderControls';\n\nimport React, {useMemo} from 'react';\nimport {ControlSizes, CustomNavigation, MobileDropdown} from '@diplodoc/components';\n\nimport {HEADER_HEIGHT} from '../../constants';\nimport {useRouter, useSearch} from '../';\n\nfunction findItem(right: NavigationItemModel[], left: NavigationItemModel[], type: string) {\n return right.some((item) => item.type === type) || left.some((item) => item.type === type);\n}\n\nexport const useNavigation = (\n data: DocBasePageData<WithNavigation>,\n controls: HeaderControlsProps,\n CustomControls: () => ReactNode,\n CustomSuggest: () => ReactNode,\n) => {\n const {toc} = data;\n const {navigation} = toc;\n const {header = {}, logo} = navigation;\n const {leftItems = [], rightItems = []} = header as NavigationData['header'];\n\n const withControls = findItem(rightItems, leftItems, 'controls');\n const withSearch = findItem(rightItems, leftItems, 'search');\n\n const search = useSearch();\n const router = useRouter();\n\n if (search && !withSearch) {\n rightItems.unshift({type: 'search'} as unknown as NavigationItemModel);\n }\n\n const navigationData = useMemo(\n () => ({\n withBorder: true,\n leftItems: leftItems,\n rightItems: rightItems,\n }),\n [leftItems, rightItems],\n );\n const navigationTocData = useMemo(\n () => ({\n toc,\n router,\n headerHeight: HEADER_HEIGHT,\n }),\n [toc, router],\n );\n const mobileControlsData = useMemo(\n () => ({\n controlSize: ControlSizes.L,\n userSettings: controls,\n }),\n [controls],\n );\n\n const layout = useMemo(\n () => ({\n header: {\n leftItems: [],\n },\n renderNavigation: () => (\n <CustomNavigation\n logo={logo}\n data={navigationData}\n navigationTocData={navigationTocData}\n mobileControlsData={mobileControlsData}\n />\n ),\n logo,\n }),\n [navigationData, navigationTocData, mobileControlsData, logo],\n );\n\n const config = useMemo(\n () => ({\n custom: {\n search: CustomSuggest,\n controls: CustomControls,\n MobileDropdown: MobileDropdown,\n },\n layout,\n withControls,\n }),\n [CustomSuggest, CustomControls, layout, withControls],\n );\n\n return config;\n};\n","import type {PropsWithChildren} from 'react';\nimport type {AppProps, PageData} from './index';\nimport type {Settings} from '../../utils';\n\nimport React, {useCallback, useMemo} from 'react';\nimport {PageConstructor, PageConstructorProvider} from '@gravity-ui/page-constructor';\nimport {DocBasePageData, getPageByType, getPageType} from '@diplodoc/components';\n\nimport {Layout} from '../Layout';\nimport {ConstructorPage} from '../ConstructorPage';\nimport {useContent} from '../ConstructorPage/useContent';\nimport {Suggest} from '../Search/Suggest';\nimport {HeaderControls, Props as HeaderControlsProps} from '../HeaderControls';\nimport {useNavigation} from '../ConstructorPage/useNavigation';\n\nimport {DocContentPageData, WithNavigation} from './index';\n\ntype Props = PropsWithChildren<Partial<AppProps> & {data: PageData; headerHeight: number}>;\n\nexport function Page({data, ...pageProps}: Props) {\n const type = getPageType(data);\n const Page = getPageByType(type);\n\n return (\n <Layout headerHeight={pageProps.headerHeight}>\n <Layout.Content>\n {/*@ts-ignore*/}\n <Page {...data} {...pageProps} />\n </Layout.Content>\n </Layout>\n );\n}\n\ntype PageProps<T extends {} = {}> = {\n data: DocBasePageData<T> & PageData;\n props: {\n router: AppProps['router'];\n } & Settings;\n controls: HeaderControlsProps;\n};\n\nconst EMPTY = {};\n\nexport function LegacyNavPage({data, props, controls}: PageProps) {\n const {theme} = props;\n\n const CustomPage = useCallback(\n () => <ConstructorPage {...(data as DocContentPageData).data} />,\n [data],\n );\n const content = useContent(data as DocContentPageData, CustomPage);\n\n const custom = useMemo(\n () => ({\n blocks: content.custom,\n }),\n [content],\n );\n\n return (\n <Page data={data} headerHeight={0} {...props} {...controls}>\n <PageConstructorProvider theme={theme}>\n <PageConstructor custom={custom} content={content.layout} />\n </PageConstructorProvider>\n </Page>\n );\n}\n\nexport function RichNavPage({data, props, controls}: PageProps<WithNavigation>) {\n const {theme, fullScreen} = props;\n\n const CustomSuggest = useCallback(() => <Suggest />, []);\n const CustomControls = useCallback(() => <HeaderControls {...controls} />, [controls]);\n const navigation = useNavigation(data, controls, CustomControls, CustomSuggest);\n\n const CustomPage = useCallback(\n () => (\n <Page\n data={data}\n headerHeight={fullScreen ? 0 : 64}\n {...props}\n {...(navigation.withControls ? EMPTY : controls)}\n >\n <ConstructorPage {...(data as DocContentPageData).data} />\n </Page>\n ),\n [data, navigation, props, controls, fullScreen],\n );\n const content = useContent(data as DocContentPageData, CustomPage);\n\n const custom = useMemo(\n () => ({\n navigation: navigation.custom,\n blocks: content.custom,\n }),\n [navigation, content],\n );\n\n return (\n <PageConstructorProvider theme={theme}>\n <PageConstructor\n custom={custom}\n content={content.layout}\n navigation={fullScreen ? undefined : navigation.layout}\n />\n </PageConstructorProvider>\n );\n}\n","import React from 'react';\nimport {MermaidRuntime} from '@diplodoc/mermaid-extension/react';\nimport {LatexRuntime} from '@diplodoc/latex-extension/react';\nimport {Runtime as OpenapiSandbox} from '@diplodoc/openapi-extension/runtime';\nimport {Theme} from '@diplodoc/components';\nimport {useTheme} from '@gravity-ui/uikit';\n\nexport function Runtime() {\n const theme = useTheme();\n\n return (\n <>\n <OpenapiSandbox />\n <LatexRuntime />\n <MermaidRuntime\n theme={theme === Theme.Dark ? 'dark' : 'neutral'}\n zoom={{\n showMenu: true,\n bindKeys: true,\n }}\n />\n </>\n );\n}\n","import type {Settings} from '../../utils';\n\nimport {useMemo, useState} from 'react';\n\nimport {getSettings, setSetting} from '../../utils';\n\nconst capitalize = <T extends string>(string: T): Capitalize<T> =>\n string.replace(/^./, (ch) => ch.toUpperCase()) as Capitalize<T>;\n\nexport function useSettings() {\n const settings = getSettings();\n\n const theme = useSetting('theme', settings);\n const textSize = useSetting('textSize', settings);\n const wideFormat = useSetting('wideFormat', settings);\n const fullScreen = useSetting('fullScreen', settings);\n const showMiniToc = useSetting('showMiniToc', settings);\n\n const controls = useMemo(\n () => ({\n ...theme,\n ...textSize,\n ...wideFormat,\n ...showMiniToc,\n ...fullScreen,\n }),\n [theme, textSize, wideFormat, showMiniToc, fullScreen],\n );\n\n return controls;\n}\n\ntype State<P extends keyof Settings> = {\n [prop in P]: Settings[P];\n} & {\n [prop in `onChange${Capitalize<P>}`]: (value: Settings[P]) => void;\n};\n\nfunction useSetting<P extends keyof Settings>(name: P, settings: Settings): State<P> {\n const [setting, setSetting] = useState<Settings[P]>(settings[name]);\n const onChangeSetting = useMemo(() => withSavingSetting(name, setSetting), [name, setSetting]);\n\n return useMemo(\n () =>\n ({\n [name]: setting,\n ['onChange' + capitalize(name)]: onChangeSetting,\n }) as State<P>,\n [name, setting, onChangeSetting],\n );\n}\n\nfunction withSavingSetting<T>(settingName: string, onChange: (value: T) => void) {\n return (value: T) => {\n setSetting<T>(settingName, value);\n\n onChange(value);\n };\n}\n","import type {NavigationData, PageContent} from '@gravity-ui/page-constructor';\nimport type {ReactElement} from 'react';\nimport type {Props as HeaderControlsProps} from '../HeaderControls';\nimport type {SearchConfig} from '../Search';\nimport type {RouterConfig} from '../Router';\n\nimport React, {useEffect, useMemo} from 'react';\nimport {ThemeProvider} from '@gravity-ui/uikit';\nimport {\n ConsentPopup,\n DocBasePageData,\n DocContentPageData as DocContentPageDataBase,\n DocLeadingPageData,\n DocPageData,\n Lang,\n configure,\n} from '@diplodoc/components';\nimport '@diplodoc/transform/dist/js/yfm';\n\nimport {SearchProvider} from '../Search';\nimport {RouterProvider} from '../Router';\nimport {getDirection, updateRootClassName, updateThemeClassName} from '../../utils';\nimport {LangProvider} from '../../hooks/useLang';\nimport '../../interceptors/leading-page-links';\nimport '../../interceptors/fast-class-applier';\n\nimport {LegacyNavPage, RichNavPage} from './Page';\nimport {Runtime} from './Runtime';\nimport {useLangs} from './useLangs';\nimport {useSettings} from './useSettings';\nimport {useMobile} from './useMobile';\nimport './App.scss';\n\nexport type DocAnalytics = {\n gtm?: {\n id?: string;\n mode?: 'base' | 'notification';\n };\n};\n\nexport interface AppProps {\n lang: Lang;\n langs: Lang[];\n router: RouterConfig;\n search?: SearchConfig;\n analytics?: DocAnalytics;\n}\n\nexport type WithNavigation = {\n navigation: NavigationData;\n};\n\nexport type DocContentPageData = DocContentPageDataBase<PageContent>;\n\nexport type PageData = DocPageData | DocLeadingPageData | DocContentPageData;\n\nexport type DocInnerProps<Data extends PageData = PageData> = {\n data: Data;\n} & AppProps;\n\nexport type {DocLeadingPageData, DocPageData};\n\nfunction hasNavigation(\n data: DocBasePageData<Partial<WithNavigation>>,\n): data is DocBasePageData<WithNavigation> {\n return Boolean(data.toc.navigation);\n}\n\nexport function App(props: DocInnerProps): ReactElement {\n const {data, router, lang, search, analytics} = props;\n\n configure({\n lang,\n });\n\n const settings = useSettings();\n const langs = useLangs(props);\n const mobileView = useMobile();\n\n const {theme, textSize, wideFormat, fullScreen, showMiniToc} = settings;\n\n const page = useMemo(\n () => ({\n router,\n\n theme,\n textSize,\n wideFormat,\n fullScreen,\n showMiniToc,\n }),\n [router, theme, textSize, wideFormat, fullScreen, showMiniToc],\n );\n const controls: HeaderControlsProps = useMemo(\n () => ({\n ...settings,\n ...langs,\n mobileView,\n }),\n [langs, settings, mobileView],\n );\n const direction = getDirection(lang);\n\n useEffect(() => {\n updateRootClassName({mobileView, wideFormat, fullScreen});\n updateThemeClassName({theme});\n }, [theme, mobileView, wideFormat, fullScreen]);\n\n return (\n <div className=\"App\">\n <ThemeProvider theme={theme} direction={direction}>\n <LangProvider value={lang}>\n <RouterProvider value={router}>\n <SearchProvider value={search}>\n {hasNavigation(data) ? (\n <RichNavPage data={data} props={page} controls={controls} />\n ) : (\n <LegacyNavPage data={data} props={page} controls={controls} />\n )}\n {analytics && (\n <ConsentPopup\n router={router}\n gtmId={analytics?.gtm?.id || ''}\n consentMode={analytics?.gtm?.mode}\n />\n )}\n <Runtime />\n </SearchProvider>\n </RouterProvider>\n </LangProvider>\n </ThemeProvider>\n </div>\n );\n}\n","import type {AppProps} from './index';\n\nimport {Lang, getLangPath} from '@diplodoc/components';\nimport {useCallback, useMemo} from 'react';\n\nexport function useLangs({router, lang, langs}: AppProps) {\n const onChangeLang = useCallback(\n (lang: Lang) => {\n const path = getLangPath(router, lang);\n window.location.replace(path);\n },\n [router],\n );\n\n return useMemo(() => ({lang, langs, onChangeLang}), [lang, langs, onChangeLang]);\n}\n","import {useCallback, useEffect, useState} from 'react';\n\nimport {getMobileView} from '../../utils';\n\nexport function useMobile() {\n const [mobileView, setMobileView] = useState<boolean>(getMobileView());\n\n const onResizeHandler = useCallback(() => {\n setMobileView(getMobileView());\n }, []);\n\n useEffect(onResizeHandler, [onResizeHandler]);\n\n useEffect(() => {\n window.addEventListener('resize', onResizeHandler);\n\n return () => window.removeEventListener('resize', onResizeHandler);\n }, [onResizeHandler]);\n\n return mobileView;\n}\n","import React from 'react';\nimport {createRoot, hydrateRoot} from 'react-dom/client';\n\nimport {App, DocAnalytics, DocInnerProps, DocLeadingPageData, DocPageData} from './components/App';\n\nexport type {DocInnerProps, DocPageData, DocLeadingPageData, DocAnalytics};\nexport type {\n SearchConfig as ISearchProviderConfig,\n WorkerConfig as ISearchWorkerConfig,\n WorkerApi as ISearchWorkerApi,\n} from './components/Search';\n\ndeclare global {\n interface Window {\n STATIC_CONTENT: boolean;\n __DATA__: DocInnerProps;\n }\n}\n\nconst root = document.getElementById('root');\nconst props = window.__DATA__;\n\nif (!root) {\n throw new Error('Root element not found!');\n}\n\nif (window.STATIC_CONTENT) {\n hydrateRoot(root, <App {...props} />);\n} else {\n createRoot(root).render(<App {...props} />);\n}\n","(function () {\n /**\n * Element.matches() polyfill.\n * @link https://developer.mozilla.org/ru/docs/Web/API/Element/matches\n */\n if (typeof Element !== 'undefined') {\n (function (e) {\n const matches =\n e.matches ||\n e.matchesSelector ||\n e.webkitMatchesSelector ||\n e.mozMatchesSelector ||\n e.msMatchesSelector ||\n e.oMatchesSelector;\n\n if (matches) {\n e.matches = e.matchesSelector = matches;\n } else {\n e.matches = e.matchesSelector = function (selector) {\n const th = this;\n return Array.prototype.some.call(document.querySelectorAll(selector), (el) => {\n return el === th;\n });\n };\n }\n })(Element.prototype);\n }\n\n if (typeof document !== 'undefined') {\n document.addEventListener('click', (event) => {\n const href = event.target.href;\n const locationOrigin = window.location.origin;\n\n if (\n event.target.matches('.dc-doc-layout__center a') &&\n href.startsWith(locationOrigin)\n ) {\n event.preventDefault();\n\n const mainFileName = 'index';\n const extention = '.html';\n\n if (href.endsWith('/')) {\n window.location.href = `${href}${mainFileName}${extention}`;\n return;\n }\n\n // https://../file-name, https://../file-name#fragment\n const splitedHref = href.split('#');\n if (splitedHref.length > 0 && !splitedHref[0].endsWith(extention)) {\n splitedHref[0] += extention;\n window.location.href = splitedHref.join('#');\n return;\n }\n\n window.location.href = href;\n }\n });\n }\n})();\n","export default function () {}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 524;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t524: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunk_diplodoc_client\"] = self[\"webpackChunk_diplodoc_client\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [644,121], () => (__webpack_require__(62437)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","SearchContext","createContext","displayName","SearchProvider","Provider","RouterContext","pathname","depth","RouterProvider","MOBILE_VIEW_WIDTH_BREAKPOINT","DEFAULT_USER_SETTINGS","theme","Theme","Light","textSize","TextSizes","M","showMiniToc","wideFormat","fullScreen","RTL_LANGS","TextDirection","isBrowser","document","updateThemeClassName","querySelectorAll","forEach","el","classList","toggle","updateRootClassName","states","body","add","name","state","Boolean","Object","keys","Set","toBoolean","str","getSettings","getSetting","getMobileView","clientWidth","sessionStorage","getItem","LangContext","Lang","En","LangProvider","mobileView","b","block","Header","Content","Footer","defaults","doc","Layout","props","children","headerHeight","header","content","footer","React","child","type","className","bPC","bPCRow","ConstructorRow","Row","Col","ConstructorPage","background","blocks","useTheme","themedBackground","getThemedValue","BackgroundMedia","assign","Grid","ConstructorBlocks","items","useContent","data","CustomPage","getPageType","DocumentType","PageConstructor","layout","useMemo","resetPaddings","custom","page","constructor","config","_defineProperty","this","worker","async","Worker","URL","request","initWorker","base","mark","suggest","query","search","window","location","split","slice","join","message","channel","MessageChannel","Promise","resolve","reject","port1","onmessage","error","console","result","onmessageerror","postMessage","port2","Suggest","provider","lang","useContext","useProvider","useRef","onFocus","useCallback","focusSearch","onBlur","setTimeout","current","close","SearchSuggest","ref","classNameContainer","HeaderControls","memo","onChangeTheme","onChangeTextSize","onChangeWideFormat","onChangeShowMiniToc","langs","onChangeLang","ControlsLayout","controlClassName","controlSize","ControlSizes","L","isWideView","isMobileView","Controls","findItem","right","left","some","item","useNavigation","controls","CustomControls","CustomSuggest","toc","navigation","logo","leftItems","rightItems","withControls","withSearch","router","unshift","navigationData","withBorder","navigationTocData","mobileControlsData","userSettings","renderNavigation","CustomNavigation","MobileDropdown","Page","pageProps","getPageByType","EMPTY","LegacyNavPage","PageConstructorProvider","RichNavPage","undefined","Runtime","OpenapiSandbox","LatexRuntime","MermaidRuntime","Dark","zoom","showMenu","bindKeys","capitalize","string","replace","ch","toUpperCase","useSetting","settings","setting","setSetting","useState","onChangeSetting","withSavingSetting","settingName","onChange","value","setItem","String","App","analytics","configure","useSettings","path","getLangPath","useLangs","setMobileView","onResizeHandler","useEffect","addEventListener","removeEventListener","useMobile","direction","includes","RTL","LTR","getDirection","ThemeProvider","hasNavigation","ConsentPopup","gtmId","gtm","id","consentMode","mode","root","getElementById","__DATA__","Error","STATIC_CONTENT","hydrateRoot","createRoot","render","Element","e","matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","selector","th","Array","prototype","call","event","href","target","locationOrigin","origin","startsWith","preventDefault","mainFileName","extention","endsWith","splitedHref","length","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","loaded","__webpack_modules__","m","amdO","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","u","chunkId","g","globalThis","Function","obj","prop","hasOwnProperty","Symbol","toStringTag","nmd","paths","scriptUrl","importScripts","currentScript","src","scripts","getElementsByTagName","test","p","baseURI","self","installedChunks","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","bind","push","__webpack_exports__"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"app.js","mappings":"UAAIA,E,0FCEG,MCIMC,GAAgBC,EAAAA,EAAAA,eAA+C,MAE5ED,EAAcE,YAAc,gBAErB,MAAMC,EAAiBH,EAAcI,SCF/BC,GAAgBJ,EAAAA,EAAAA,eAA4B,CACrDK,SAAU,IACVC,MAAO,IAGXF,EAAcH,YAAc,gBAErB,MAAMM,EAAiBH,EAAcD,S,eCbrC,MAEMK,EAA+B,IAE/BC,EAAwB,CACjCC,MAAOC,EAAAA,GAAMC,MACbC,SAAUC,EAAAA,GAAUC,EACpBC,aAAa,EACbC,YAAY,EACZC,YAAY,GAGHC,EAAY,CACrB,KACA,MACA,MACA,KACA,KACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,QACA,MAGG,IAAKC,EAAa,SAAbA,GAAa,OAAbA,EAAa,UAAbA,EAAa,UAAbA,CAAa,MCtBlB,SAASC,IACZ,MAA2B,oBAAbC,QAClB,CAEO,SAASC,GAAqB,MAACb,IACV,oBAAbY,UAIXA,SAASE,iBAAiB,WAAWC,SAASC,IAC1CA,EAAGC,UAAUC,OAAO,qBAAgC,UAAVlB,GAC1CgB,EAAGC,UAAUC,OAAO,oBAA+B,SAAVlB,EAAiB,GAElE,CAEO,SAASmB,EAAoBC,GAMhC,IAAKT,IACD,OAGJC,SAASS,KAAKJ,UAAUK,IAAI,UAE5B,MAAMJ,EAASA,CAACK,EAAcC,IAC1BZ,SAASS,KAAKJ,UAAUC,OAAOK,EAAME,QAAQD,IAEjDE,OAAOC,KAAKP,GAAQL,SAASS,IACzB,OAAQA,GACJ,IAAK,aACDN,EA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AAGyD,EAAS,IAAIpN,EAASoN,EAAQ1D,EAClC,CAEA,IADGwD,GAA4BA,EAA2BpQ,GACrD2N,EAAIL,EAASZ,OAAQiB,IACzBkB,EAAUvB,EAASK,GAChBf,EAAoB4B,EAAE0B,EAAiBrB,IAAYqB,EAAgBrB,IACrEqB,EAAgBrB,GAAS,KAE1BqB,EAAgBrB,GAAW,EAE5B,OAAOjC,EAAoBS,EAAEnK,EAAO,EAGjCqN,EAAqBN,KAAmC,6BAAIA,KAAmC,8BAAK,GACxGM,EAAmBrU,QAAQiU,EAAqBK,KAAK,KAAM,IAC3DD,EAAmBE,KAAON,EAAqBK,KAAK,KAAMD,EAAmBE,KAAKD,KAAKD,G,KC7CvF,IAAIG,EAAsB9D,EAAoBS,OAAE9F,EAAW,CAAC,IAAI,MAAM,IAAOqF,EAAoB,SACjG8D,EAAsB9D,EAAoBS,EAAEqD,E","sources":["webpack://@diplodoc/client/webpack/runtime/chunk loaded","webpack://@diplodoc/client/./src/components/Search/Search.tsx","webpack://@diplodoc/client/./src/components/Search/index.ts","webpack://@diplodoc/client/./src/components/Router/index.ts","webpack://@diplodoc/client/./src/constants.ts","webpack://@diplodoc/client/./src/utils.ts","webpack://@diplodoc/client/./src/hooks/useLang.ts","webpack://@diplodoc/client/./src/interceptors/fast-class-applier.ts","webpack://@diplodoc/client/./src/components/Layout/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/useContent.tsx","webpack://@diplodoc/client/./src/components/Search/provider/index.ts","webpack://@diplodoc/client/./src/components/Search/Suggest.tsx","webpack://@diplodoc/client/./src/components/Search/useProvider.ts","webpack://@diplodoc/client/./src/components/HeaderControls/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/useNavigation.tsx","webpack://@diplodoc/client/./src/components/App/Page.tsx","webpack://@diplodoc/client/./src/components/App/Runtime.tsx","webpack://@diplodoc/client/./src/components/App/useSettings.ts","webpack://@diplodoc/client/./src/components/App/index.tsx","webpack://@diplodoc/client/./src/components/App/useLangs.ts","webpack://@diplodoc/client/./src/components/App/useMobile.ts","webpack://@diplodoc/client/./src/index.tsx","webpack://@diplodoc/client/./src/interceptors/leading-page-links.js","webpack://@diplodoc/client/./src/stub/empty-module.js","webpack://@diplodoc/client/webpack/bootstrap","webpack://@diplodoc/client/webpack/runtime/amd options","webpack://@diplodoc/client/webpack/runtime/compat get default export","webpack://@diplodoc/client/webpack/runtime/define property getters","webpack://@diplodoc/client/webpack/runtime/get javascript chunk filename","webpack://@diplodoc/client/webpack/runtime/global","webpack://@diplodoc/client/webpack/runtime/hasOwnProperty shorthand","webpack://@diplodoc/client/webpack/runtime/make namespace object","webpack://@diplodoc/client/webpack/runtime/node module decorator","webpack://@diplodoc/client/webpack/runtime/runtimeId","webpack://@diplodoc/client/webpack/runtime/publicPath","webpack://@diplodoc/client/webpack/runtime/jsonp chunk loading","webpack://@diplodoc/client/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","import React from 'react';\n\nexport const Search = () => {\n return <div>Initial</div>;\n};\n","import type {SearchConfig, WorkerApi, WorkerConfig} from './types';\n\nimport {createContext, useContext} from 'react';\n\nexport type {SearchConfig, WorkerConfig, WorkerApi};\n\nexport const SearchContext = createContext<SearchConfig | null | undefined>(null);\n\nSearchContext.displayName = 'SearchContext';\n\nexport const SearchProvider = SearchContext.Provider;\n\nexport {Search} from './Search';\n\nexport function useSearch() {\n return useContext(SearchContext);\n}\n","import type {Router} from '@diplodoc/components';\n\nimport {createContext, useContext} from 'react';\n\nexport interface RouterConfig extends Router {\n depth: number;\n}\n\nexport const RouterContext = createContext<RouterConfig>({\n pathname: '/',\n depth: 0,\n});\n\nRouterContext.displayName = 'RouterContext';\n\nexport const RouterProvider = RouterContext.Provider;\n\nexport function useRouter() {\n return useContext(RouterContext);\n}\n","import {TextSizes, Theme} from '@diplodoc/components';\n\nexport const HEADER_HEIGHT = 64;\n\nexport const MOBILE_VIEW_WIDTH_BREAKPOINT = 769;\n\nexport const DEFAULT_USER_SETTINGS = {\n theme: Theme.Light,\n textSize: TextSizes.M,\n showMiniToc: true,\n wideFormat: true,\n fullScreen: false,\n};\n\nexport const RTL_LANGS = [\n 'ar',\n 'arc',\n 'ckb',\n 'dv',\n 'fa',\n 'ha',\n 'he',\n 'khw',\n 'ks',\n 'ps',\n 'sd',\n 'ur',\n 'uz_AF',\n 'yi',\n];\n\nexport enum TextDirection {\n RTL = 'rtl',\n LTR = 'ltr',\n}\n\nexport const LINK_KEYS_LEADING_CONFIG = ['href'];\nexport const LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG = [\n 'src',\n 'url',\n 'href',\n 'icon',\n 'image',\n 'desktop',\n 'mobile',\n 'tablet',\n 'previewImg',\n 'image',\n 'avatar',\n 'logo',\n 'light',\n 'dark',\n];\n\nexport const LINK_KEYS = [\n ...new Set([...LINK_KEYS_LEADING_CONFIG, ...LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG]),\n];\n","import {Lang, Theme} from '@diplodoc/components';\n\nimport {\n DEFAULT_USER_SETTINGS,\n MOBILE_VIEW_WIDTH_BREAKPOINT,\n RTL_LANGS,\n TextDirection,\n} from './constants';\n\nexport function isBrowser() {\n return typeof document !== 'undefined';\n}\n\nexport function updateThemeClassName({theme}: {theme: Theme}) {\n if (typeof document === 'undefined') {\n return;\n }\n\n document.querySelectorAll('.g-root').forEach((el) => {\n el.classList.toggle('g-root_theme_light', theme === 'light');\n el.classList.toggle('g-root_theme_dark', theme === 'dark');\n });\n}\n\nexport function updateRootClassName(states: {\n mobileView?: boolean;\n wideFormat?: boolean;\n fullScreen?: boolean;\n focusSearch?: boolean;\n}) {\n if (!isBrowser()) {\n return;\n }\n\n document.body.classList.add('g-root');\n\n const toggle = (name: string, state: unknown) =>\n document.body.classList.toggle(name, Boolean(state));\n\n Object.keys(states).forEach((state) => {\n switch (state) {\n case 'wideFormat':\n toggle('dc-root_wide-format', states[state]);\n break;\n case 'focusSearch':\n toggle('dc-root_focused-search', states[state]);\n break;\n case 'fullScreen':\n toggle('dc-root_full-screen', states[state]);\n break;\n case 'mobileView':\n toggle('mobile', states[state]);\n toggle('desktop', !states[state]);\n break;\n }\n });\n}\n\nexport function getDirection(lang: Lang): TextDirection {\n const isRTL = RTL_LANGS.includes(lang);\n\n return isRTL ? TextDirection.RTL : TextDirection.LTR;\n}\n\nconst toBoolean = (str: string | boolean) => {\n if (typeof str === 'boolean') {\n return str;\n }\n\n return str ? str === 'true' : false;\n};\n\nexport type Settings = typeof DEFAULT_USER_SETTINGS;\n\nexport function getSettings() {\n const theme = getSetting('theme');\n const textSize = getSetting('textSize');\n const showMiniToc = getSetting('showMiniToc');\n const wideFormat = getSetting('wideFormat');\n const fullScreen = getSetting('fullScreen');\n\n return {\n theme,\n textSize,\n showMiniToc: toBoolean(showMiniToc),\n wideFormat: toBoolean(wideFormat),\n fullScreen: toBoolean(fullScreen),\n };\n}\n\nexport function getMobileView() {\n if (!isBrowser()) {\n return false;\n }\n\n return document.body.clientWidth < MOBILE_VIEW_WIDTH_BREAKPOINT;\n}\n\nfunction getSetting<T extends keyof Settings>(name: T): Settings[T] {\n if (!isBrowser()) {\n return DEFAULT_USER_SETTINGS[name];\n }\n\n try {\n return (sessionStorage.getItem(name) as Settings[T]) || DEFAULT_USER_SETTINGS[name];\n } catch {\n return DEFAULT_USER_SETTINGS[name];\n }\n}\n\nexport function setSetting<T>(name: string, value: T) {\n if (!isBrowser()) {\n return;\n }\n\n try {\n sessionStorage.setItem(name, String(value));\n } catch {}\n}\n","import {createContext, useContext} from 'react';\nimport {Lang} from '@diplodoc/components';\n\nconst LangContext = createContext<Lang>(Lang.En);\n\nLangContext.displayName = 'Lang';\n\nexport const LangProvider = LangContext.Provider;\n\nexport function useLang() {\n return useContext(LangContext);\n}\n","import {getMobileView, getSettings, updateRootClassName, updateThemeClassName} from '../utils';\n\nif (typeof document !== 'undefined') {\n const {theme, wideFormat, fullScreen} = getSettings();\n const mobileView = getMobileView();\n\n updateRootClassName({mobileView, wideFormat, fullScreen});\n updateThemeClassName({theme});\n}\n","import React, {FC, PropsWithChildren, ReactElement} from 'react';\nimport block from 'bem-cn-lite';\n\nimport './Layout.scss';\n\nconst b = block('Layout');\n\nfunction Header() {\n return null;\n}\n\nfunction Content() {\n return null;\n}\n\nfunction Footer() {\n return null;\n}\n\ntype LayoutStatics = {\n Header: FC<PropsWithChildren>;\n Content: FC<PropsWithChildren>;\n Footer: FC<PropsWithChildren>;\n};\n\ntype LayoutProps = {\n doc?: boolean;\n headerHeight?: number;\n};\n\nconst defaults = {\n doc: false,\n};\n\nexport const Layout: LayoutStatics & FC<PropsWithChildren<LayoutProps>> = (props) => {\n const {children, doc, headerHeight = 0} = {...defaults, ...props};\n let header, content, footer;\n\n React.Children.forEach(children as ReactElement[], (child: ReactElement) => {\n switch (child.type) {\n case Header:\n header = child.props.children;\n break;\n case Content:\n content = child.props.children;\n break;\n case Footer:\n footer = child.props.children;\n break;\n }\n });\n\n return (\n <div className={b({'full-header': headerHeight > 0})}>\n {header && <div className={b('header')}>{header}</div>}\n <div className={b('body')}>\n {content && <div className={b('content')}>{content}</div>}\n {footer && <div className={b('footer', {doc})}>{footer}</div>}\n </div>\n </div>\n );\n};\n\nLayout.displayName = 'Layout';\n\nLayout.Header = Header;\nLayout.Content = Content;\nLayout.Footer = Footer;\n","import type {PropsWithChildren} from 'react';\nimport type {PageContent} from '@gravity-ui/page-constructor';\n\nimport React from 'react';\nimport block from 'bem-cn-lite';\nimport {\n BackgroundMedia,\n Col,\n ConstructorBlocks,\n Grid,\n Row,\n getThemedValue,\n useTheme,\n} from '@gravity-ui/page-constructor';\n\nconst bPC = block('pc-page-constructor');\nconst bPCRow = block('pc-constructor-row');\n\nexport const ConstructorRow = ({children}: PropsWithChildren) =>\n children ? (\n <Row className={bPCRow()}>\n <Col>{children}</Col>\n </Row>\n ) : null;\n\nexport function ConstructorPage({background, blocks}: PageContent) {\n const theme = useTheme();\n const themedBackground = getThemedValue(background, theme);\n\n return (\n <div className={bPC('docs')}>\n <div className={bPC('wrapper')}>\n {blocks && themedBackground && (\n <BackgroundMedia {...themedBackground} className={bPC('background')} />\n )}\n <Grid>\n <ConstructorRow>\n <ConstructorBlocks items={blocks} />\n </ConstructorRow>\n </Grid>\n </div>\n </div>\n );\n}\n","import type {ReactNode} from 'react';\nimport type {PageContent} from '@gravity-ui/page-constructor';\nimport type {DocContentPageData} from '@diplodoc/components';\n\nimport {DocumentType, getPageType} from '@diplodoc/components';\nimport {useMemo} from 'react';\n\nexport const useContent = (data: DocContentPageData, CustomPage: () => ReactNode) => {\n const type = getPageType(data);\n const fullScreen =\n type === DocumentType.PageConstructor &&\n 'data' in data &&\n 'fullScreen' in data.data &&\n data.data.fullScreen;\n\n const layout = useMemo(\n () =>\n fullScreen\n ? (data.data as PageContent)\n : {\n blocks: [\n {\n type: 'page',\n resetPaddings: true,\n },\n ],\n },\n [fullScreen, data],\n );\n\n const config = useMemo(\n () => ({\n custom: {\n page: CustomPage,\n },\n layout,\n }),\n [CustomPage, layout],\n );\n\n return config;\n};\n","import type {ISearchProvider, ISearchResult} from '@diplodoc/components';\nimport type {SearchConfig, WorkerConfig} from '../types';\n\nexport class SearchProvider implements ISearchProvider {\n private worker!: Promise<Worker>;\n\n private config: SearchConfig;\n\n constructor(config: SearchConfig) {\n this.config = config;\n }\n\n init = () => {\n this.worker = initWorker({\n ...this.config,\n base: this.base,\n mark: 'Suggest__Item__Marker',\n });\n };\n\n async suggest(query: string) {\n return this.request({\n type: 'suggest',\n query,\n }) as Promise<ISearchResult[]>;\n }\n\n async search(query: string) {\n return this.request({\n type: 'search',\n query,\n }) as Promise<ISearchResult[]>;\n }\n\n // Temporary disable link to search page\n // TODO: Implement search page\n link = () => null;\n\n // link = (query: string) => {\n // const params = query ? `?query=${encodeURIComponent(query)}` : '';\n //\n // return `${this.base}/${this.config.link}${params}`;\n // };\n\n private get base() {\n return window.location.href.split('/').slice(0, -this.config.depth).join('/');\n }\n\n private async request(message: object) {\n return request(await this.worker, message);\n }\n}\n\nconst BAD_ORIGIN_ERROR = /Script at '(.*?)' cannot be accessed from origin/;\n\nasync function loadWorker() {\n try {\n return new Worker(new URL('../worker/index.ts', import.meta.url));\n } catch (error) {\n // @see https://stackoverflow.com/questions/21408510/chrome-cant-load-web-worker\n if (error instanceof DOMException) {\n const match = BAD_ORIGIN_ERROR.exec(error.message);\n if (match) {\n const url = match[1];\n const blob = new Blob([`importScripts('${url}');`], {type: 'text/javascript'});\n\n return new Worker(URL.createObjectURL(blob));\n }\n }\n\n throw error;\n }\n}\n\nasync function initWorker(config: WorkerConfig) {\n const worker = await loadWorker();\n\n await request(worker, {...config, type: 'init'});\n\n return worker;\n}\n\nfunction request(worker: Worker, message: object) {\n const channel = new MessageChannel();\n\n return new Promise((resolve, reject) => {\n channel.port1.onmessage = (message) => {\n if (message.data.error) {\n // eslint-disable-next-line no-console\n console.error(message.data.error);\n\n reject(message.data.error);\n } else {\n resolve(message.data.result);\n }\n };\n\n channel.port1.onmessageerror = (message) => {\n reject(message.data.error);\n };\n\n worker.postMessage(message, [channel.port2]);\n });\n}\n","import type {ISearchProvider, SearchSuggestApi} from '@diplodoc/components';\n\nimport React, {useCallback, useRef} from 'react';\nimport {SearchSuggest} from '@diplodoc/components';\n\nimport {updateRootClassName} from '../../utils';\n\nimport {useProvider} from './useProvider';\nimport './Suggest.scss';\n\nexport function Suggest() {\n const provider: ISearchProvider | null = useProvider();\n const suggest = useRef<SearchSuggestApi>(null);\n\n const onFocus = useCallback(() => {\n updateRootClassName({focusSearch: true});\n }, []);\n\n const onBlur = useCallback(() => {\n updateRootClassName({focusSearch: false});\n setTimeout(() => {\n if (suggest.current) {\n suggest.current.close();\n }\n }, 100);\n }, []);\n\n if (!provider) {\n return null;\n }\n\n return (\n <SearchSuggest\n ref={suggest}\n provider={provider}\n onFocus={onFocus}\n onBlur={onBlur}\n classNameContainer={'Suggest'}\n />\n );\n}\n","import {useContext, useMemo} from 'react';\n\nimport {RouterContext, SearchContext} from '../index';\nimport {useLang} from '../../hooks/useLang';\n\nimport {SearchProvider} from './provider';\n\nexport function useProvider() {\n const lang = useLang();\n const {depth = 0} = useContext(RouterContext);\n const search = useContext(SearchContext);\n\n return useMemo(() => {\n if (!search) {\n return null;\n }\n\n return new SearchProvider({\n ...search,\n depth,\n lang,\n });\n }, [lang, depth, search]);\n}\n","import React, {memo} from 'react';\nimport {ControlSizes, Controls, ControlsLayout, Lang, TextSizes, Theme} from '@diplodoc/components';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype OnChangeCallback = (value: any) => void;\n\nexport type Props = {\n mobileView: boolean;\n\n theme: Theme;\n onChangeTheme: OnChangeCallback;\n textSize: TextSizes;\n onChangeTextSize: OnChangeCallback;\n wideFormat: boolean;\n onChangeWideFormat: OnChangeCallback;\n showMiniToc: boolean;\n onChangeShowMiniToc: OnChangeCallback;\n lang: Lang;\n langs: Lang[];\n onChangeLang?: (lang: Lang) => void;\n};\n\nexport const HeaderControls = memo<Props>(\n ({\n mobileView,\n\n theme,\n onChangeTheme,\n\n textSize,\n onChangeTextSize,\n\n wideFormat,\n onChangeWideFormat,\n\n showMiniToc,\n onChangeShowMiniToc,\n\n lang,\n langs,\n onChangeLang,\n }) => {\n return (\n <ControlsLayout\n controlClassName={'Control'}\n controlSize={ControlSizes.L}\n isWideView={mobileView}\n isMobileView={mobileView}\n >\n <Controls\n className={'Controls'}\n theme={theme}\n onChangeTheme={onChangeTheme}\n wideFormat={wideFormat}\n onChangeWideFormat={onChangeWideFormat}\n showMiniToc={showMiniToc}\n onChangeShowMiniToc={onChangeShowMiniToc}\n textSize={textSize}\n onChangeTextSize={onChangeTextSize}\n lang={lang}\n langs={langs}\n onChangeLang={onChangeLang}\n />\n </ControlsLayout>\n );\n },\n);\n\nHeaderControls.displayName = 'HeaderControls';\n","import type {ReactNode} from 'react';\nimport type {NavigationData, NavigationItemModel} from '@gravity-ui/page-constructor';\nimport type {DocBasePageData} from '@diplodoc/components';\nimport type {WithNavigation} from '../App';\nimport type {Props as HeaderControlsProps} from '../HeaderControls';\n\nimport React, {useMemo} from 'react';\nimport {ControlSizes, CustomNavigation, MobileDropdown} from '@diplodoc/components';\n\nimport {HEADER_HEIGHT} from '../../constants';\nimport {useRouter, useSearch} from '../';\n\nfunction findItem(right: NavigationItemModel[], left: NavigationItemModel[], type: string) {\n return right.some((item) => item.type === type) || left.some((item) => item.type === type);\n}\n\nexport const useNavigation = (\n data: DocBasePageData<WithNavigation>,\n controls: HeaderControlsProps,\n CustomControls: () => ReactNode,\n CustomSuggest: () => ReactNode,\n) => {\n const {toc} = data;\n const {navigation} = toc;\n const {header = {}, logo} = navigation;\n const {leftItems = [], rightItems = []} = header as NavigationData['header'];\n\n const withControls = findItem(rightItems, leftItems, 'controls');\n const withSearch = findItem(rightItems, leftItems, 'search');\n\n const search = useSearch();\n const router = useRouter();\n\n if (search && !withSearch) {\n rightItems.unshift({type: 'search'} as unknown as NavigationItemModel);\n }\n\n const navigationData = useMemo(\n () => ({\n withBorder: true,\n leftItems: leftItems,\n rightItems: rightItems,\n }),\n [leftItems, rightItems],\n );\n const navigationTocData = useMemo(\n () => ({\n toc,\n router,\n headerHeight: HEADER_HEIGHT,\n }),\n [toc, router],\n );\n const mobileControlsData = useMemo(\n () => ({\n controlSize: ControlSizes.L,\n userSettings: controls,\n }),\n [controls],\n );\n\n const layout = useMemo(\n () => ({\n header: {\n leftItems: [],\n },\n renderNavigation: () => (\n <CustomNavigation\n logo={logo}\n data={navigationData}\n navigationTocData={navigationTocData}\n mobileControlsData={mobileControlsData}\n />\n ),\n logo,\n }),\n [navigationData, navigationTocData, mobileControlsData, logo],\n );\n\n const config = useMemo(\n () => ({\n custom: {\n search: CustomSuggest,\n controls: CustomControls,\n MobileDropdown: MobileDropdown,\n },\n layout,\n withControls,\n }),\n [CustomSuggest, CustomControls, layout, withControls],\n );\n\n return config;\n};\n","import type {PropsWithChildren} from 'react';\nimport type {AppProps, PageData} from './index';\nimport type {Settings} from '../../utils';\n\nimport React, {useCallback, useMemo} from 'react';\nimport {PageConstructor, PageConstructorProvider} from '@gravity-ui/page-constructor';\nimport {DocBasePageData, getPageByType, getPageType} from '@diplodoc/components';\n\nimport {Layout} from '../Layout';\nimport {ConstructorPage} from '../ConstructorPage';\nimport {useContent} from '../ConstructorPage/useContent';\nimport {Suggest} from '../Search/Suggest';\nimport {HeaderControls, Props as HeaderControlsProps} from '../HeaderControls';\nimport {useNavigation} from '../ConstructorPage/useNavigation';\n\nimport {DocContentPageData, WithNavigation} from './index';\n\ntype Props = PropsWithChildren<Partial<AppProps> & {data: PageData; headerHeight: number}>;\n\nexport function Page({data, ...pageProps}: Props) {\n const type = getPageType(data);\n const Page = getPageByType(type);\n\n return (\n <Layout headerHeight={pageProps.headerHeight}>\n <Layout.Content>\n {/*@ts-ignore*/}\n <Page {...data} {...pageProps} />\n </Layout.Content>\n </Layout>\n );\n}\n\ntype PageProps<T extends {} = {}> = {\n data: DocBasePageData<T> & PageData;\n props: {\n router: AppProps['router'];\n } & Settings;\n controls: HeaderControlsProps;\n};\n\nconst EMPTY = {};\n\nexport function LegacyNavPage({data, props, controls}: PageProps) {\n const {theme} = props;\n\n const CustomPage = useCallback(\n () => <ConstructorPage {...(data as DocContentPageData).data} />,\n [data],\n );\n const content = useContent(data as DocContentPageData, CustomPage);\n\n const custom = useMemo(\n () => ({\n blocks: content.custom,\n }),\n [content],\n );\n\n return (\n <Page data={data} headerHeight={0} {...props} {...controls}>\n <PageConstructorProvider theme={theme}>\n <PageConstructor custom={custom} content={content.layout} />\n </PageConstructorProvider>\n </Page>\n );\n}\n\nexport function RichNavPage({data, props, controls}: PageProps<WithNavigation>) {\n const {theme, fullScreen} = props;\n\n const CustomSuggest = useCallback(() => <Suggest />, []);\n const CustomControls = useCallback(() => <HeaderControls {...controls} />, [controls]);\n const navigation = useNavigation(data, controls, CustomControls, CustomSuggest);\n\n const CustomPage = useCallback(\n () => (\n <Page\n data={data}\n headerHeight={fullScreen ? 0 : 64}\n {...props}\n {...(navigation.withControls ? EMPTY : controls)}\n >\n <ConstructorPage {...(data as DocContentPageData).data} />\n </Page>\n ),\n [data, navigation, props, controls, fullScreen],\n );\n const content = useContent(data as DocContentPageData, CustomPage);\n\n const custom = useMemo(\n () => ({\n navigation: navigation.custom,\n blocks: content.custom,\n }),\n [navigation, content],\n );\n\n return (\n <PageConstructorProvider theme={theme}>\n <PageConstructor\n custom={custom}\n content={content.layout}\n navigation={fullScreen ? undefined : navigation.layout}\n />\n </PageConstructorProvider>\n );\n}\n","import React from 'react';\nimport {MermaidRuntime} from '@diplodoc/mermaid-extension/react';\nimport {LatexRuntime} from '@diplodoc/latex-extension/react';\nimport {Runtime as OpenapiSandbox} from '@diplodoc/openapi-extension/runtime';\nimport {Theme} from '@diplodoc/components';\nimport {useTheme} from '@gravity-ui/uikit';\n\nexport function Runtime() {\n const theme = useTheme();\n\n return (\n <>\n <OpenapiSandbox />\n <LatexRuntime />\n <MermaidRuntime\n theme={theme === Theme.Dark ? 'dark' : 'neutral'}\n zoom={{\n showMenu: true,\n bindKeys: true,\n }}\n />\n </>\n );\n}\n","import type {Settings} from '../../utils';\n\nimport {useMemo, useState} from 'react';\n\nimport {getSettings, setSetting} from '../../utils';\n\nconst capitalize = <T extends string>(string: T): Capitalize<T> =>\n string.replace(/^./, (ch) => ch.toUpperCase()) as Capitalize<T>;\n\nexport function useSettings() {\n const settings = getSettings();\n\n const theme = useSetting('theme', settings);\n const textSize = useSetting('textSize', settings);\n const wideFormat = useSetting('wideFormat', settings);\n const fullScreen = useSetting('fullScreen', settings);\n const showMiniToc = useSetting('showMiniToc', settings);\n\n const controls = useMemo(\n () => ({\n ...theme,\n ...textSize,\n ...wideFormat,\n ...showMiniToc,\n ...fullScreen,\n }),\n [theme, textSize, wideFormat, showMiniToc, fullScreen],\n );\n\n return controls;\n}\n\ntype State<P extends keyof Settings> = {\n [prop in P]: Settings[P];\n} & {\n [prop in `onChange${Capitalize<P>}`]: (value: Settings[P]) => void;\n};\n\nfunction useSetting<P extends keyof Settings>(name: P, settings: Settings): State<P> {\n const [setting, setSetting] = useState<Settings[P]>(settings[name]);\n const onChangeSetting = useMemo(() => withSavingSetting(name, setSetting), [name, setSetting]);\n\n return useMemo(\n () =>\n ({\n [name]: setting,\n ['onChange' + capitalize(name)]: onChangeSetting,\n }) as State<P>,\n [name, setting, onChangeSetting],\n );\n}\n\nfunction withSavingSetting<T>(settingName: string, onChange: (value: T) => void) {\n return (value: T) => {\n setSetting<T>(settingName, value);\n\n onChange(value);\n };\n}\n","import type {NavigationData, PageContent} from '@gravity-ui/page-constructor';\nimport type {ReactElement} from 'react';\nimport type {Props as HeaderControlsProps} from '../HeaderControls';\nimport type {SearchConfig} from '../Search';\nimport type {RouterConfig} from '../Router';\n\nimport React, {useEffect, useMemo} from 'react';\nimport {ThemeProvider} from '@gravity-ui/uikit';\nimport {\n ConsentPopup,\n DocBasePageData,\n DocContentPageData as DocContentPageDataBase,\n DocLeadingPageData,\n DocPageData,\n Lang,\n configure,\n} from '@diplodoc/components';\nimport '@diplodoc/transform/dist/js/yfm';\n\nimport {SearchProvider} from '../Search';\nimport {RouterProvider} from '../Router';\nimport {getDirection, updateRootClassName, updateThemeClassName} from '../../utils';\nimport {LangProvider} from '../../hooks/useLang';\nimport '../../interceptors/leading-page-links';\nimport '../../interceptors/fast-class-applier';\n\nimport {LegacyNavPage, RichNavPage} from './Page';\nimport {Runtime} from './Runtime';\nimport {useLangs} from './useLangs';\nimport {useSettings} from './useSettings';\nimport {useMobile} from './useMobile';\nimport './App.scss';\n\nexport type DocAnalytics = {\n gtm?: {\n id?: string;\n mode?: 'base' | 'notification';\n };\n};\n\nexport interface AppProps {\n lang: Lang;\n langs: Lang[];\n router: RouterConfig;\n search?: SearchConfig;\n analytics?: DocAnalytics;\n}\n\nexport type WithNavigation = {\n navigation: NavigationData;\n};\n\nexport type DocContentPageData = DocContentPageDataBase<PageContent>;\n\nexport type PageData = DocPageData | DocLeadingPageData | DocContentPageData;\n\nexport type DocInnerProps<Data extends PageData = PageData> = {\n data: Data;\n} & AppProps;\n\nexport type {DocLeadingPageData, DocPageData};\n\nfunction hasNavigation(\n data: DocBasePageData<Partial<WithNavigation>>,\n): data is DocBasePageData<WithNavigation> {\n return Boolean(data.toc.navigation);\n}\n\nexport function App(props: DocInnerProps): ReactElement {\n const {data, router, lang, search, analytics} = props;\n\n configure({\n lang,\n });\n\n const settings = useSettings();\n const langs = useLangs(props);\n const mobileView = useMobile();\n\n const {theme, textSize, wideFormat, fullScreen, showMiniToc} = settings;\n\n const page = useMemo(\n () => ({\n router,\n\n theme,\n textSize,\n wideFormat,\n fullScreen,\n showMiniToc,\n }),\n [router, theme, textSize, wideFormat, fullScreen, showMiniToc],\n );\n const controls: HeaderControlsProps = useMemo(\n () => ({\n ...settings,\n ...langs,\n mobileView,\n }),\n [langs, settings, mobileView],\n );\n const direction = getDirection(lang);\n\n useEffect(() => {\n updateRootClassName({mobileView, wideFormat, fullScreen});\n updateThemeClassName({theme});\n }, [theme, mobileView, wideFormat, fullScreen]);\n\n return (\n <div className=\"App\">\n <ThemeProvider theme={theme} direction={direction}>\n <LangProvider value={lang}>\n <RouterProvider value={router}>\n <SearchProvider value={search}>\n {hasNavigation(data) ? (\n <RichNavPage data={data} props={page} controls={controls} />\n ) : (\n <LegacyNavPage data={data} props={page} controls={controls} />\n )}\n {analytics && (\n <ConsentPopup\n router={router}\n gtmId={analytics?.gtm?.id || ''}\n consentMode={analytics?.gtm?.mode}\n />\n )}\n <Runtime />\n </SearchProvider>\n </RouterProvider>\n </LangProvider>\n </ThemeProvider>\n </div>\n );\n}\n","import type {AppProps} from './index';\n\nimport {Lang, getLangPath} from '@diplodoc/components';\nimport {useCallback, useMemo} from 'react';\n\nexport function useLangs({router, lang, langs}: AppProps) {\n const onChangeLang = useCallback(\n (lang: Lang) => {\n const path = getLangPath(router, lang);\n window.location.replace(path);\n },\n [router],\n );\n\n return useMemo(() => ({lang, langs, onChangeLang}), [lang, langs, onChangeLang]);\n}\n","import {useCallback, useEffect, useState} from 'react';\n\nimport {getMobileView} from '../../utils';\n\nexport function useMobile() {\n const [mobileView, setMobileView] = useState<boolean>(getMobileView());\n\n const onResizeHandler = useCallback(() => {\n setMobileView(getMobileView());\n }, []);\n\n useEffect(onResizeHandler, [onResizeHandler]);\n\n useEffect(() => {\n window.addEventListener('resize', onResizeHandler);\n\n return () => window.removeEventListener('resize', onResizeHandler);\n }, [onResizeHandler]);\n\n return mobileView;\n}\n","import React from 'react';\nimport {createRoot, hydrateRoot} from 'react-dom/client';\n\nimport {App, DocAnalytics, DocInnerProps, DocLeadingPageData, DocPageData} from './components/App';\n\nexport type {DocInnerProps, DocPageData, DocLeadingPageData, DocAnalytics};\nexport type {\n SearchConfig as ISearchProviderConfig,\n WorkerConfig as ISearchWorkerConfig,\n WorkerApi as ISearchWorkerApi,\n} from './components/Search';\n\ndeclare global {\n interface Window {\n STATIC_CONTENT: boolean;\n __DATA__: DocInnerProps;\n }\n}\n\nconst root = document.getElementById('root');\nconst props = window.__DATA__;\n\nif (!root) {\n throw new Error('Root element not found!');\n}\n\nif (window.STATIC_CONTENT) {\n hydrateRoot(root, <App {...props} />);\n} else {\n createRoot(root).render(<App {...props} />);\n}\n","(function () {\n /**\n * Element.matches() polyfill.\n * @link https://developer.mozilla.org/ru/docs/Web/API/Element/matches\n */\n if (typeof Element !== 'undefined') {\n (function (e) {\n const matches =\n e.matches ||\n e.matchesSelector ||\n e.webkitMatchesSelector ||\n e.mozMatchesSelector ||\n e.msMatchesSelector ||\n e.oMatchesSelector;\n\n if (matches) {\n e.matches = e.matchesSelector = matches;\n } else {\n e.matches = e.matchesSelector = function (selector) {\n const th = this;\n return Array.prototype.some.call(document.querySelectorAll(selector), (el) => {\n return el === th;\n });\n };\n }\n })(Element.prototype);\n }\n\n if (typeof document !== 'undefined') {\n document.addEventListener('click', (event) => {\n const href = event.target.href;\n const locationOrigin = window.location.origin;\n\n if (\n event.target.matches('.dc-doc-layout__center a') &&\n href.startsWith(locationOrigin)\n ) {\n event.preventDefault();\n\n const mainFileName = 'index';\n const extention = '.html';\n\n if (href.endsWith('/')) {\n window.location.href = `${href}${mainFileName}${extention}`;\n return;\n }\n\n // https://../file-name, https://../file-name#fragment\n const splitedHref = href.split('#');\n if (splitedHref.length > 0 && !splitedHref[0].endsWith(extention)) {\n splitedHref[0] += extention;\n window.location.href = splitedHref.join('#');\n return;\n }\n\n window.location.href = href;\n }\n });\n }\n})();\n","export default function () {}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 524;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t524: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunk_diplodoc_client\"] = self[\"webpackChunk_diplodoc_client\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [644,121], () => (__webpack_require__(62437)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","SearchContext","createContext","displayName","SearchProvider","Provider","RouterContext","pathname","depth","RouterProvider","MOBILE_VIEW_WIDTH_BREAKPOINT","DEFAULT_USER_SETTINGS","theme","Theme","Light","textSize","TextSizes","M","showMiniToc","wideFormat","fullScreen","RTL_LANGS","TextDirection","isBrowser","document","updateThemeClassName","querySelectorAll","forEach","el","classList","toggle","updateRootClassName","states","body","add","name","state","Boolean","Object","keys","Set","toBoolean","str","getSettings","getSetting","getMobileView","clientWidth","sessionStorage","getItem","LangContext","Lang","En","LangProvider","mobileView","b","block","Header","Content","Footer","defaults","doc","Layout","props","children","headerHeight","header","content","footer","React","child","type","className","bPC","bPCRow","ConstructorRow","Row","Col","ConstructorPage","background","blocks","useTheme","themedBackground","getThemedValue","BackgroundMedia","assign","Grid","ConstructorBlocks","items","useContent","data","CustomPage","getPageType","DocumentType","PageConstructor","layout","useMemo","resetPaddings","custom","page","constructor","config","_defineProperty","this","worker","async","Worker","URL","error","DOMException","match","BAD_ORIGIN_ERROR","exec","message","url","blob","Blob","createObjectURL","loadWorker","request","initWorker","base","mark","suggest","query","search","window","location","href","split","slice","join","channel","MessageChannel","Promise","resolve","reject","port1","onmessage","console","result","onmessageerror","postMessage","port2","Suggest","provider","lang","useContext","useProvider","useRef","onFocus","useCallback","focusSearch","onBlur","setTimeout","current","close","SearchSuggest","ref","classNameContainer","HeaderControls","memo","onChangeTheme","onChangeTextSize","onChangeWideFormat","onChangeShowMiniToc","langs","onChangeLang","ControlsLayout","controlClassName","controlSize","ControlSizes","L","isWideView","isMobileView","Controls","findItem","right","left","some","item","useNavigation","controls","CustomControls","CustomSuggest","toc","navigation","logo","leftItems","rightItems","withControls","withSearch","router","unshift","navigationData","withBorder","navigationTocData","mobileControlsData","userSettings","renderNavigation","CustomNavigation","MobileDropdown","Page","pageProps","getPageByType","EMPTY","LegacyNavPage","PageConstructorProvider","RichNavPage","undefined","Runtime","OpenapiSandbox","LatexRuntime","MermaidRuntime","Dark","zoom","showMenu","bindKeys","capitalize","string","replace","ch","toUpperCase","useSetting","settings","setting","setSetting","useState","onChangeSetting","withSavingSetting","settingName","onChange","value","setItem","String","App","analytics","configure","useSettings","path","getLangPath","useLangs","setMobileView","onResizeHandler","useEffect","addEventListener","removeEventListener","useMobile","direction","includes","RTL","LTR","getDirection","ThemeProvider","hasNavigation","ConsentPopup","gtmId","gtm","id","consentMode","mode","root","getElementById","__DATA__","Error","STATIC_CONTENT","hydrateRoot","createRoot","render","Element","e","matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","selector","th","Array","prototype","call","event","target","locationOrigin","origin","startsWith","preventDefault","mainFileName","extention","endsWith","splitedHref","length","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","loaded","__webpack_modules__","m","amdO","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","every","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","u","chunkId","g","globalThis","Function","obj","prop","hasOwnProperty","Symbol","toStringTag","nmd","paths","scriptUrl","importScripts","currentScript","src","scripts","getElementsByTagName","test","p","baseURI","self","installedChunks","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","bind","push","__webpack_exports__"],"sourceRoot":""}
|
package/build/server/112.js
CHANGED
package/build/server/112.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"112.js","mappings":";;UAAA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;;ACAA;AACA;AACA;;AAEA;;AAUA;AACA;;AAMA,MAAMA,eAAe,GAAG;EACpBC,OAAO,EAAE,uBAAuB;EAChCC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,sBAAsB,GAAG;EAC3BF,OAAO,EAAE,iDAAiD;EAC1DC,IAAI,EAAE;AACV,CAAC;AACD,MAAME,mBAAmB,GAAG;EACxBH,OAAO,EAAE,8CAA8C;EACvDC,IAAI,EAAE;AACV,CAAC;AAEM,SAASG,YAAYA,CAACC,MAAe,EAAkC;EAC1E,IAAI,CAACA,MAAM,EAAE;IACT,MAAMH,sBAAsB;EAChC;AACJ;AAEO,SAASI,SAASA,CAACC,GAAY,EAA4B;EAC9D,IAAI,CAACA,GAAG,EAAE;IACN,MAAMJ,mBAAmB;EAC7B;AACJ;AAEA,MAAMK,QAAQ,GAAG;EACb,MAAMC,IAAIA,CAACJ,MAAmB,EAAE;IAC5BK,IAAI,CAACL,MAAM,GAAGA,MAAM;IAEpBM,aAAa,CAACD,IAAI,CAACL,MAAM,CAACE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"112.js","mappings":";;UAAA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;;ACAA;AACA;AACA;;AAEA;;AAUA;AACA;;AAMA,MAAMA,eAAe,GAAG;EACpBC,OAAO,EAAE,uBAAuB;EAChCC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,sBAAsB,GAAG;EAC3BF,OAAO,EAAE,iDAAiD;EAC1DC,IAAI,EAAE;AACV,CAAC;AACD,MAAME,mBAAmB,GAAG;EACxBH,OAAO,EAAE,8CAA8C;EACvDC,IAAI,EAAE;AACV,CAAC;AAEM,SAASG,YAAYA,CAACC,MAAe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C,OAAO,GAAGf,QAAQ,CAACa,IAAI,CAAgB;EAC7C,IAAI,CAACE,OAAO,EAAE;IACVJ,IAAI,CAACK,WAAW,CAAC;MAACC,KAAK,EAAE1B;IAAe,CAAC,CAAC;EAC9C;EAEA,IAAI;IACA,MAAM2B,MAAM,GAAG,MAAMH,OAAO,CAACvB,OAAO,CAACsB,IAAI,CAAC;IAE1CH,IAAI,CAACK,WAAW,CAAC;MAACE;IAAM,CAAC,CAAC;EAC9B,CAAC,CAAC,OAAOD,KAAK,EAAE;IACZN,IAAI,CAACK,WAAW,CAAC;MAACC;IAAK,CAAC,CAAC;EAC7B;AACJ,CAAC,C","sources":["webpack://@diplodoc/client/webpack/bootstrap","webpack://@diplodoc/client/webpack/runtime/define property getters","webpack://@diplodoc/client/webpack/runtime/hasOwnProperty shorthand","webpack://@diplodoc/client/./src/components/Search/worker/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","/// <reference no-default-lib=\"true\"/>\n/// <reference lib=\"ES2015\" />\n/// <reference lib=\"webworker\" />\n\n/* eslint-disable new-cap */\nimport type {\n InitMessage,\n MessageType,\n SearchMessage,\n SuggestMessage,\n WorkerApi,\n WorkerConfig,\n} from '../types';\n\n// Default type of `self` is `WorkerGlobalScope & typeof globalThis`\n// https://github.com/microsoft/TypeScript/issues/14877\ndeclare const self: ServiceWorkerGlobalScope & {\n config?: WorkerConfig;\n api?: WorkerApi;\n};\n\nconst UNKNOWN_HANDLER = {\n message: 'Unknown message type!',\n code: 'UNKNOWN_HANDLER',\n};\nconst NOT_INITIALIZED_CONFIG = {\n message: 'Worker is not initialized with required config!',\n code: 'NOT_INITIALIZED',\n};\nconst NOT_INITIALIZED_API = {\n message: 'Worker is not initialized with required api!',\n code: 'NOT_INITIALIZED',\n};\n\nexport function AssertConfig(config: unknown): asserts config is WorkerConfig {\n if (!config) {\n throw NOT_INITIALIZED_CONFIG;\n }\n}\n\nexport function AssertApi(api: unknown): asserts api is WorkerApi {\n if (!api) {\n throw NOT_INITIALIZED_API;\n }\n}\n\nconst HANDLERS = {\n async init(config: InitMessage) {\n self.config = config;\n\n importScripts(self.config.base + '/' + self.config.api);\n\n AssertApi(self.api);\n\n return self.api.init?.();\n },\n\n async suggest({query, count = 10}: SuggestMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return self.api.suggest(query, count);\n },\n\n async search({query, count = 10, page = 1}: SearchMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return self.api.search(query, count, page);\n },\n} as const;\n\nself.onmessage = async (message) => {\n const [port] = message.ports;\n const {type} = message.data;\n\n const handler = HANDLERS[type as MessageType];\n if (!handler) {\n port.postMessage({error: UNKNOWN_HANDLER});\n }\n\n try {\n const result = await handler(message.data);\n\n port.postMessage({result});\n } catch (error) {\n port.postMessage({error});\n }\n};\n"],"names":["UNKNOWN_HANDLER","message","code","NOT_INITIALIZED_CONFIG","NOT_INITIALIZED_API","AssertConfig","config","AssertApi","api","HANDLERS","init","self","importScripts","base","suggest","query","count","search","page","onmessage","port","ports","type","data","handler","postMessage","error","result"],"sourceRoot":""}
|
package/build/server/app.js
CHANGED
|
@@ -368,14 +368,33 @@ class provider_SearchProvider {
|
|
|
368
368
|
// };
|
|
369
369
|
|
|
370
370
|
get base() {
|
|
371
|
-
return window.location.
|
|
371
|
+
return window.location.href.split('/').slice(0, -this.config.depth).join('/');
|
|
372
372
|
}
|
|
373
373
|
async request(message) {
|
|
374
374
|
return request(await this.worker, message);
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
+
const BAD_ORIGIN_ERROR = /Script at '(.*?)' cannot be accessed from origin/;
|
|
378
|
+
async function loadWorker() {
|
|
379
|
+
try {
|
|
380
|
+
return new Worker(new URL(/* worker import */ __webpack_require__.p + __webpack_require__.u(112), __webpack_require__.b));
|
|
381
|
+
} catch (error) {
|
|
382
|
+
// @see https://stackoverflow.com/questions/21408510/chrome-cant-load-web-worker
|
|
383
|
+
if (error instanceof DOMException) {
|
|
384
|
+
const match = BAD_ORIGIN_ERROR.exec(error.message);
|
|
385
|
+
if (match) {
|
|
386
|
+
const url = match[1];
|
|
387
|
+
const blob = new Blob([`importScripts('${url}');`], {
|
|
388
|
+
type: 'text/javascript'
|
|
389
|
+
});
|
|
390
|
+
return new Worker(URL.createObjectURL(blob));
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
throw error;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
377
396
|
async function initWorker(config) {
|
|
378
|
-
const worker =
|
|
397
|
+
const worker = await loadWorker();
|
|
379
398
|
await request(worker, {
|
|
380
399
|
...config,
|
|
381
400
|
type: 'init'
|
package/build/server/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA0B;AAEnB,MAAMC,MAAM,GAAGA,CAAA,KAAM;EACxB,oBAAOD,KAAA,CAAAE,aAAA,cAAK,SAAY,CAAC;AAC7B,CAAC;;ACF+C;AAIzC,MAAMG,aAAa,gBAAGF,uBAAa,CAAkC,IAAI,CAAC;AAEjFE,aAAa,CAACC,WAAW,GAAG,eAAe;AAEpC,MAAMC,cAAc,GAAGF,aAAa,CAACG,QAAQ;AAEpB;AAEzB,SAASC,SAASA,CAAA,EAAG;EACxB,OAAOL,oBAAU,CAACC,aAAa,CAAC;AACpC;;ACdgD;AAMzC,MAAMK,aAAa,gBAAGP,uBAAa,CAAe;EACrDQ,QAAQ,EAAE,GAAG;EACbC,KAAK,EAAE;AACX,CAAC,CAAC;AAEFF,aAAa,CAACJ,WAAW,GAAG,eAAe;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;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;;;;WCrCA;;;;;WCAA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;;;;;WCRA;WACA;WACA;WACA,eAAe,6BAA6B;WAC5C;;;;;WCJA;WACA;WACA;WACA;WACA;;;;;WCJA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;;;;;WCJA;;;;;WCAA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,gBAAgB,qBAAqB;WACrC;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA,aAAa;WACb;WACA,IAAI;WACJ;WACA;;WAEA;;WAEA;;WAEA;;;;;WCrCA;WACA;WACA;WACA;WACA;WACA;;;;;UELA;UACA","sources":["webpack://@diplodoc/client/./src/components/Search/Search.tsx","webpack://@diplodoc/client/./src/components/Search/index.ts","webpack://@diplodoc/client/./src/components/Router/index.ts","webpack://@diplodoc/client/./src/constants.ts","webpack://@diplodoc/client/./src/utils.ts","webpack://@diplodoc/client/./src/hooks/useLang.ts","webpack://@diplodoc/client/./src/interceptors/fast-class-applier.ts","webpack://@diplodoc/client/./src/components/Layout/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/useContent.tsx","webpack://@diplodoc/client/./src/components/index.ts","webpack://@diplodoc/client/./src/components/Search/provider/index.ts","webpack://@diplodoc/client/./src/components/Search/useProvider.ts","webpack://@diplodoc/client/./src/components/Search/Suggest.tsx","webpack://@diplodoc/client/./src/components/HeaderControls/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/useNavigation.tsx","webpack://@diplodoc/client/./src/components/App/Page.tsx","webpack://@diplodoc/client/./src/components/App/Runtime.tsx","webpack://@diplodoc/client/./src/components/App/useLangs.ts","webpack://@diplodoc/client/./src/components/App/useSettings.ts","webpack://@diplodoc/client/./src/components/App/useMobile.ts","webpack://@diplodoc/client/./src/components/App/index.tsx","webpack://@diplodoc/client/./src/preprocess.ts","webpack://@diplodoc/client/./src/index.server.tsx","webpack://@diplodoc/client/./src/interceptors/leading-page-links.js","webpack://@diplodoc/client/./src/stub/empty-module.js","webpack://@diplodoc/client/./node_modules/picocolors/ sync","webpack://@diplodoc/client/external node-commonjs \"buffer\"","webpack://@diplodoc/client/external node-commonjs \"crypto\"","webpack://@diplodoc/client/external node-commonjs \"fs\"","webpack://@diplodoc/client/external node-commonjs \"node:assert\"","webpack://@diplodoc/client/external node-commonjs \"node:async_hooks\"","webpack://@diplodoc/client/external node-commonjs \"node:buffer\"","webpack://@diplodoc/client/external node-commonjs \"node:console\"","webpack://@diplodoc/client/external node-commonjs \"node:crypto\"","webpack://@diplodoc/client/external node-commonjs \"node:diagnostics_channel\"","webpack://@diplodoc/client/external node-commonjs \"node:events\"","webpack://@diplodoc/client/external node-commonjs \"node:http\"","webpack://@diplodoc/client/external node-commonjs \"node:http2\"","webpack://@diplodoc/client/external node-commonjs \"node:net\"","webpack://@diplodoc/client/external node-commonjs \"node:perf_hooks\"","webpack://@diplodoc/client/external node-commonjs \"node:querystring\"","webpack://@diplodoc/client/external node-commonjs \"node:stream\"","webpack://@diplodoc/client/external node-commonjs \"node:tls\"","webpack://@diplodoc/client/external node-commonjs \"node:url\"","webpack://@diplodoc/client/external node-commonjs \"node:util\"","webpack://@diplodoc/client/external node-commonjs \"node:util/types\"","webpack://@diplodoc/client/external node-commonjs \"node:worker_threads\"","webpack://@diplodoc/client/external node-commonjs \"node:zlib\"","webpack://@diplodoc/client/external node-commonjs \"os\"","webpack://@diplodoc/client/external node-commonjs \"path\"","webpack://@diplodoc/client/external node-commonjs \"process\"","webpack://@diplodoc/client/external node-commonjs \"punycode\"","webpack://@diplodoc/client/external node-commonjs \"stream\"","webpack://@diplodoc/client/external node-commonjs \"string_decoder\"","webpack://@diplodoc/client/external node-commonjs \"tty\"","webpack://@diplodoc/client/external node-commonjs \"url\"","webpack://@diplodoc/client/external node-commonjs \"util\"","webpack://@diplodoc/client/webpack/bootstrap","webpack://@diplodoc/client/webpack/runtime/amd options","webpack://@diplodoc/client/webpack/runtime/chunk loaded","webpack://@diplodoc/client/webpack/runtime/compat get default export","webpack://@diplodoc/client/webpack/runtime/define property getters","webpack://@diplodoc/client/webpack/runtime/ensure chunk","webpack://@diplodoc/client/webpack/runtime/get javascript chunk filename","webpack://@diplodoc/client/webpack/runtime/get mini-css chunk filename","webpack://@diplodoc/client/webpack/runtime/hasOwnProperty shorthand","webpack://@diplodoc/client/webpack/runtime/make namespace object","webpack://@diplodoc/client/webpack/runtime/node module decorator","webpack://@diplodoc/client/webpack/runtime/publicPath","webpack://@diplodoc/client/webpack/runtime/require chunk loading","webpack://@diplodoc/client/webpack/runtime/startup chunk dependencies","webpack://@diplodoc/client/webpack/before-startup","webpack://@diplodoc/client/webpack/startup","webpack://@diplodoc/client/webpack/after-startup"],"sourcesContent":["import React from 'react';\n\nexport const Search = () => {\n return <div>Initial</div>;\n};\n","import type {SearchConfig, WorkerApi, WorkerConfig} from './types';\n\nimport {createContext, useContext} from 'react';\n\nexport type {SearchConfig, WorkerConfig, WorkerApi};\n\nexport const SearchContext = createContext<SearchConfig | null | undefined>(null);\n\nSearchContext.displayName = 'SearchContext';\n\nexport const SearchProvider = SearchContext.Provider;\n\nexport {Search} from './Search';\n\nexport function useSearch() {\n return useContext(SearchContext);\n}\n","import type {Router} from '@diplodoc/components';\n\nimport {createContext, useContext} from 'react';\n\nexport interface RouterConfig extends Router {\n depth: number;\n}\n\nexport const RouterContext = createContext<RouterConfig>({\n pathname: '/',\n depth: 0,\n});\n\nRouterContext.displayName = 'RouterContext';\n\nexport const RouterProvider = RouterContext.Provider;\n\nexport function useRouter() {\n return useContext(RouterContext);\n}\n","import {TextSizes, Theme} from '@diplodoc/components';\n\nexport const HEADER_HEIGHT = 64;\n\nexport const MOBILE_VIEW_WIDTH_BREAKPOINT = 769;\n\nexport const DEFAULT_USER_SETTINGS = {\n theme: Theme.Light,\n textSize: TextSizes.M,\n showMiniToc: true,\n wideFormat: true,\n fullScreen: false,\n};\n\nexport const RTL_LANGS = [\n 'ar',\n 'arc',\n 'ckb',\n 'dv',\n 'fa',\n 'ha',\n 'he',\n 'khw',\n 'ks',\n 'ps',\n 'sd',\n 'ur',\n 'uz_AF',\n 'yi',\n];\n\nexport enum TextDirection {\n RTL = 'rtl',\n LTR = 'ltr',\n}\n\nexport const LINK_KEYS_LEADING_CONFIG = ['href'];\nexport const LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG = [\n 'src',\n 'url',\n 'href',\n 'icon',\n 'image',\n 'desktop',\n 'mobile',\n 'tablet',\n 'previewImg',\n 'image',\n 'avatar',\n 'logo',\n 'light',\n 'dark',\n];\n\nexport const LINK_KEYS = [\n ...new Set([...LINK_KEYS_LEADING_CONFIG, ...LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG]),\n];\n","import {Lang, Theme} from '@diplodoc/components';\n\nimport {\n DEFAULT_USER_SETTINGS,\n MOBILE_VIEW_WIDTH_BREAKPOINT,\n RTL_LANGS,\n TextDirection,\n} from './constants';\n\nexport function isBrowser() {\n return typeof document !== 'undefined';\n}\n\nexport function updateThemeClassName({theme}: {theme: Theme}) {\n if (typeof document === 'undefined') {\n return;\n }\n\n document.querySelectorAll('.g-root').forEach((el) => {\n el.classList.toggle('g-root_theme_light', theme === 'light');\n el.classList.toggle('g-root_theme_dark', theme === 'dark');\n });\n}\n\nexport function updateRootClassName(states: {\n mobileView?: boolean;\n wideFormat?: boolean;\n fullScreen?: boolean;\n focusSearch?: boolean;\n}) {\n if (!isBrowser()) {\n return;\n }\n\n document.body.classList.add('g-root');\n\n const toggle = (name: string, state: unknown) =>\n document.body.classList.toggle(name, Boolean(state));\n\n Object.keys(states).forEach((state) => {\n switch (state) {\n case 'wideFormat':\n toggle('dc-root_wide-format', states[state]);\n break;\n case 'focusSearch':\n toggle('dc-root_focused-search', states[state]);\n break;\n case 'fullScreen':\n toggle('dc-root_full-screen', states[state]);\n break;\n case 'mobileView':\n toggle('mobile', states[state]);\n toggle('desktop', !states[state]);\n break;\n }\n });\n}\n\nexport function getDirection(lang: Lang): TextDirection {\n const isRTL = RTL_LANGS.includes(lang);\n\n return isRTL ? TextDirection.RTL : TextDirection.LTR;\n}\n\nconst toBoolean = (str: string | boolean) => {\n if (typeof str === 'boolean') {\n return str;\n }\n\n return str ? str === 'true' : false;\n};\n\nexport type Settings = typeof DEFAULT_USER_SETTINGS;\n\nexport function getSettings() {\n const theme = getSetting('theme');\n const textSize = getSetting('textSize');\n const showMiniToc = getSetting('showMiniToc');\n const wideFormat = getSetting('wideFormat');\n const fullScreen = getSetting('fullScreen');\n\n return {\n theme,\n textSize,\n showMiniToc: toBoolean(showMiniToc),\n wideFormat: toBoolean(wideFormat),\n fullScreen: toBoolean(fullScreen),\n };\n}\n\nexport function getMobileView() {\n if (!isBrowser()) {\n return false;\n }\n\n return document.body.clientWidth < MOBILE_VIEW_WIDTH_BREAKPOINT;\n}\n\nfunction getSetting<T extends keyof Settings>(name: T): Settings[T] {\n if (!isBrowser()) {\n return DEFAULT_USER_SETTINGS[name];\n }\n\n try {\n return (sessionStorage.getItem(name) as Settings[T]) || DEFAULT_USER_SETTINGS[name];\n } catch {\n return DEFAULT_USER_SETTINGS[name];\n }\n}\n\nexport function setSetting<T>(name: string, value: T) {\n if (!isBrowser()) {\n return;\n }\n\n try {\n sessionStorage.setItem(name, String(value));\n } catch {}\n}\n","import {createContext, useContext} from 'react';\nimport {Lang} from '@diplodoc/components';\n\nconst LangContext = createContext<Lang>(Lang.En);\n\nLangContext.displayName = 'Lang';\n\nexport const LangProvider = LangContext.Provider;\n\nexport function useLang() {\n return useContext(LangContext);\n}\n","import {getMobileView, getSettings, updateRootClassName, updateThemeClassName} from '../utils';\n\nif (typeof document !== 'undefined') {\n const {theme, wideFormat, fullScreen} = getSettings();\n const mobileView = getMobileView();\n\n updateRootClassName({mobileView, wideFormat, fullScreen});\n updateThemeClassName({theme});\n}\n","import React, {FC, PropsWithChildren, ReactElement} from 'react';\nimport block from 'bem-cn-lite';\n\nimport './Layout.scss';\n\nconst b = block('Layout');\n\nfunction Header() {\n return null;\n}\n\nfunction Content() {\n return null;\n}\n\nfunction Footer() {\n return null;\n}\n\ntype LayoutStatics = {\n Header: FC<PropsWithChildren>;\n Content: FC<PropsWithChildren>;\n Footer: FC<PropsWithChildren>;\n};\n\ntype LayoutProps = {\n doc?: boolean;\n headerHeight?: number;\n};\n\nconst defaults = {\n doc: false,\n};\n\nexport const Layout: LayoutStatics & FC<PropsWithChildren<LayoutProps>> = (props) => {\n const {children, doc, headerHeight = 0} = {...defaults, ...props};\n let header, content, footer;\n\n React.Children.forEach(children as ReactElement[], (child: ReactElement) => {\n switch (child.type) {\n case Header:\n header = child.props.children;\n break;\n case Content:\n content = child.props.children;\n break;\n case Footer:\n footer = child.props.children;\n break;\n }\n });\n\n return (\n <div className={b({'full-header': headerHeight > 0})}>\n {header && <div className={b('header')}>{header}</div>}\n <div className={b('body')}>\n {content && <div className={b('content')}>{content}</div>}\n {footer && <div className={b('footer', {doc})}>{footer}</div>}\n </div>\n </div>\n );\n};\n\nLayout.displayName = 'Layout';\n\nLayout.Header = Header;\nLayout.Content = Content;\nLayout.Footer = Footer;\n","import type {PropsWithChildren} from 'react';\nimport type {PageContent} from '@gravity-ui/page-constructor';\n\nimport React from 'react';\nimport block from 'bem-cn-lite';\nimport {\n BackgroundMedia,\n Col,\n ConstructorBlocks,\n Grid,\n Row,\n getThemedValue,\n useTheme,\n} from '@gravity-ui/page-constructor';\n\nconst bPC = block('pc-page-constructor');\nconst bPCRow = block('pc-constructor-row');\n\nexport const ConstructorRow = ({children}: PropsWithChildren) =>\n children ? (\n <Row className={bPCRow()}>\n <Col>{children}</Col>\n </Row>\n ) : null;\n\nexport function ConstructorPage({background, blocks}: PageContent) {\n const theme = useTheme();\n const themedBackground = getThemedValue(background, theme);\n\n return (\n <div className={bPC('docs')}>\n <div className={bPC('wrapper')}>\n {blocks && themedBackground && (\n <BackgroundMedia {...themedBackground} className={bPC('background')} />\n )}\n <Grid>\n <ConstructorRow>\n <ConstructorBlocks items={blocks} />\n </ConstructorRow>\n </Grid>\n </div>\n </div>\n );\n}\n","import type {ReactNode} from 'react';\nimport type {PageContent} from '@gravity-ui/page-constructor';\nimport type {DocContentPageData} from '@diplodoc/components';\n\nimport {DocumentType, getPageType} from '@diplodoc/components';\nimport {useMemo} from 'react';\n\nexport const useContent = (data: DocContentPageData, CustomPage: () => ReactNode) => {\n const type = getPageType(data);\n const fullScreen =\n type === DocumentType.PageConstructor &&\n 'data' in data &&\n 'fullScreen' in data.data &&\n data.data.fullScreen;\n\n const layout = useMemo(\n () =>\n fullScreen\n ? (data.data as PageContent)\n : {\n blocks: [\n {\n type: 'page',\n resetPaddings: true,\n },\n ],\n },\n [fullScreen, data],\n );\n\n const config = useMemo(\n () => ({\n custom: {\n page: CustomPage,\n },\n layout,\n }),\n [CustomPage, layout],\n );\n\n return config;\n};\n","export {SearchContext, SearchProvider, useSearch} from './Search';\nexport {RouterContext, RouterProvider, useRouter} from './Router';\n\nexport {App} from './App';\n","import type {ISearchProvider, ISearchResult} from '@diplodoc/components';\nimport type {SearchConfig, WorkerConfig} from '../types';\n\nexport class SearchProvider implements ISearchProvider {\n private worker!: Promise<Worker>;\n\n private config: SearchConfig;\n\n constructor(config: SearchConfig) {\n this.config = config;\n }\n\n init = () => {\n this.worker = initWorker({\n ...this.config,\n base: this.base,\n mark: 'Suggest__Item__Marker',\n });\n };\n\n async suggest(query: string) {\n return this.request({\n type: 'suggest',\n query,\n }) as Promise<ISearchResult[]>;\n }\n\n async search(query: string) {\n return this.request({\n type: 'search',\n query,\n }) as Promise<ISearchResult[]>;\n }\n\n // Temporary disable link to search page\n // TODO: Implement search page\n link = () => null;\n\n // link = (query: string) => {\n // const params = query ? `?query=${encodeURIComponent(query)}` : '';\n //\n // return `${this.base}/${this.config.link}${params}`;\n // };\n\n private get base() {\n return window.location.pathname\n .split('/')\n .slice(0, -(this.config.depth + 1))\n .join('/');\n }\n\n private async request(message: object) {\n return request(await this.worker, message);\n }\n}\n\nasync function initWorker(config: WorkerConfig) {\n const worker = new Worker(new URL('../worker/index.ts', import.meta.url));\n\n await request(worker, {...config, type: 'init'});\n\n return worker;\n}\n\nfunction request(worker: Worker, message: object) {\n const channel = new MessageChannel();\n\n return new Promise((resolve, reject) => {\n channel.port1.onmessage = (message) => {\n if (message.data.error) {\n // eslint-disable-next-line no-console\n console.error(message.data.error);\n\n reject(message.data.error);\n } else {\n resolve(message.data.result);\n }\n };\n\n channel.port1.onmessageerror = (message) => {\n reject(message.data.error);\n };\n\n worker.postMessage(message, [channel.port2]);\n });\n}\n","import {useContext, useMemo} from 'react';\n\nimport {RouterContext, SearchContext} from '../index';\nimport {useLang} from '../../hooks/useLang';\n\nimport {SearchProvider} from './provider';\n\nexport function useProvider() {\n const lang = useLang();\n const {depth = 0} = useContext(RouterContext);\n const search = useContext(SearchContext);\n\n return useMemo(() => {\n if (!search) {\n return null;\n }\n\n return new SearchProvider({\n ...search,\n depth,\n lang,\n });\n }, [lang, depth, search]);\n}\n","import type {ISearchProvider, SearchSuggestApi} from '@diplodoc/components';\n\nimport React, {useCallback, useRef} from 'react';\nimport {SearchSuggest} from '@diplodoc/components';\n\nimport {updateRootClassName} from '../../utils';\n\nimport {useProvider} from './useProvider';\nimport './Suggest.scss';\n\nexport function Suggest() {\n const provider: ISearchProvider | null = useProvider();\n const suggest = useRef<SearchSuggestApi>(null);\n\n const onFocus = useCallback(() => {\n updateRootClassName({focusSearch: true});\n }, []);\n\n const onBlur = useCallback(() => {\n updateRootClassName({focusSearch: false});\n setTimeout(() => {\n if (suggest.current) {\n suggest.current.close();\n }\n }, 100);\n }, []);\n\n if (!provider) {\n return null;\n }\n\n return (\n <SearchSuggest\n ref={suggest}\n provider={provider}\n onFocus={onFocus}\n onBlur={onBlur}\n classNameContainer={'Suggest'}\n />\n );\n}\n","import React, {memo} from 'react';\nimport {ControlSizes, Controls, ControlsLayout, Lang, TextSizes, Theme} from '@diplodoc/components';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype OnChangeCallback = (value: any) => void;\n\nexport type Props = {\n mobileView: boolean;\n\n theme: Theme;\n onChangeTheme: OnChangeCallback;\n textSize: TextSizes;\n onChangeTextSize: OnChangeCallback;\n wideFormat: boolean;\n onChangeWideFormat: OnChangeCallback;\n showMiniToc: boolean;\n onChangeShowMiniToc: OnChangeCallback;\n lang: Lang;\n langs: Lang[];\n onChangeLang?: (lang: Lang) => void;\n};\n\nexport const HeaderControls = memo<Props>(\n ({\n mobileView,\n\n theme,\n onChangeTheme,\n\n textSize,\n onChangeTextSize,\n\n wideFormat,\n onChangeWideFormat,\n\n showMiniToc,\n onChangeShowMiniToc,\n\n lang,\n langs,\n onChangeLang,\n }) => {\n return (\n <ControlsLayout\n controlClassName={'Control'}\n controlSize={ControlSizes.L}\n isWideView={mobileView}\n isMobileView={mobileView}\n >\n <Controls\n className={'Controls'}\n theme={theme}\n onChangeTheme={onChangeTheme}\n wideFormat={wideFormat}\n onChangeWideFormat={onChangeWideFormat}\n showMiniToc={showMiniToc}\n onChangeShowMiniToc={onChangeShowMiniToc}\n textSize={textSize}\n onChangeTextSize={onChangeTextSize}\n lang={lang}\n langs={langs}\n onChangeLang={onChangeLang}\n />\n </ControlsLayout>\n );\n },\n);\n\nHeaderControls.displayName = 'HeaderControls';\n","import type {ReactNode} from 'react';\nimport type {NavigationData, NavigationItemModel} from '@gravity-ui/page-constructor';\nimport type {DocBasePageData} from '@diplodoc/components';\nimport type {WithNavigation} from '../App';\nimport type {Props as HeaderControlsProps} from '../HeaderControls';\n\nimport React, {useMemo} from 'react';\nimport {ControlSizes, CustomNavigation, MobileDropdown} from '@diplodoc/components';\n\nimport {HEADER_HEIGHT} from '../../constants';\nimport {useRouter, useSearch} from '../';\n\nfunction findItem(right: NavigationItemModel[], left: NavigationItemModel[], type: string) {\n return right.some((item) => item.type === type) || left.some((item) => item.type === type);\n}\n\nexport const useNavigation = (\n data: DocBasePageData<WithNavigation>,\n controls: HeaderControlsProps,\n CustomControls: () => ReactNode,\n CustomSuggest: () => ReactNode,\n) => {\n const {toc} = data;\n const {navigation} = toc;\n const {header = {}, logo} = navigation;\n const {leftItems = [], rightItems = []} = header as NavigationData['header'];\n\n const withControls = findItem(rightItems, leftItems, 'controls');\n const withSearch = findItem(rightItems, leftItems, 'search');\n\n const search = useSearch();\n const router = useRouter();\n\n if (search && !withSearch) {\n rightItems.unshift({type: 'search'} as unknown as NavigationItemModel);\n }\n\n const navigationData = useMemo(\n () => ({\n withBorder: true,\n leftItems: leftItems,\n rightItems: rightItems,\n }),\n [leftItems, rightItems],\n );\n const navigationTocData = useMemo(\n () => ({\n toc,\n router,\n headerHeight: HEADER_HEIGHT,\n }),\n [toc, router],\n );\n const mobileControlsData = useMemo(\n () => ({\n controlSize: ControlSizes.L,\n userSettings: controls,\n }),\n [controls],\n );\n\n const layout = useMemo(\n () => ({\n header: {\n leftItems: [],\n },\n renderNavigation: () => (\n <CustomNavigation\n logo={logo}\n data={navigationData}\n navigationTocData={navigationTocData}\n mobileControlsData={mobileControlsData}\n />\n ),\n logo,\n }),\n [navigationData, navigationTocData, mobileControlsData, logo],\n );\n\n const config = useMemo(\n () => ({\n custom: {\n search: CustomSuggest,\n controls: CustomControls,\n MobileDropdown: MobileDropdown,\n },\n layout,\n withControls,\n }),\n [CustomSuggest, CustomControls, layout, withControls],\n );\n\n return config;\n};\n","import type {PropsWithChildren} from 'react';\nimport type {AppProps, PageData} from './index';\nimport type {Settings} from '../../utils';\n\nimport React, {useCallback, useMemo} from 'react';\nimport {PageConstructor, PageConstructorProvider} from '@gravity-ui/page-constructor';\nimport {DocBasePageData, getPageByType, getPageType} from '@diplodoc/components';\n\nimport {Layout} from '../Layout';\nimport {ConstructorPage} from '../ConstructorPage';\nimport {useContent} from '../ConstructorPage/useContent';\nimport {Suggest} from '../Search/Suggest';\nimport {HeaderControls, Props as HeaderControlsProps} from '../HeaderControls';\nimport {useNavigation} from '../ConstructorPage/useNavigation';\n\nimport {DocContentPageData, WithNavigation} from './index';\n\ntype Props = PropsWithChildren<Partial<AppProps> & {data: PageData; headerHeight: number}>;\n\nexport function Page({data, ...pageProps}: Props) {\n const type = getPageType(data);\n const Page = getPageByType(type);\n\n return (\n <Layout headerHeight={pageProps.headerHeight}>\n <Layout.Content>\n {/*@ts-ignore*/}\n <Page {...data} {...pageProps} />\n </Layout.Content>\n </Layout>\n );\n}\n\ntype PageProps<T extends {} = {}> = {\n data: DocBasePageData<T> & PageData;\n props: {\n router: AppProps['router'];\n } & Settings;\n controls: HeaderControlsProps;\n};\n\nconst EMPTY = {};\n\nexport function LegacyNavPage({data, props, controls}: PageProps) {\n const {theme} = props;\n\n const CustomPage = useCallback(\n () => <ConstructorPage {...(data as DocContentPageData).data} />,\n [data],\n );\n const content = useContent(data as DocContentPageData, CustomPage);\n\n const custom = useMemo(\n () => ({\n blocks: content.custom,\n }),\n [content],\n );\n\n return (\n <Page data={data} headerHeight={0} {...props} {...controls}>\n <PageConstructorProvider theme={theme}>\n <PageConstructor custom={custom} content={content.layout} />\n </PageConstructorProvider>\n </Page>\n );\n}\n\nexport function RichNavPage({data, props, controls}: PageProps<WithNavigation>) {\n const {theme, fullScreen} = props;\n\n const CustomSuggest = useCallback(() => <Suggest />, []);\n const CustomControls = useCallback(() => <HeaderControls {...controls} />, [controls]);\n const navigation = useNavigation(data, controls, CustomControls, CustomSuggest);\n\n const CustomPage = useCallback(\n () => (\n <Page\n data={data}\n headerHeight={fullScreen ? 0 : 64}\n {...props}\n {...(navigation.withControls ? EMPTY : controls)}\n >\n <ConstructorPage {...(data as DocContentPageData).data} />\n </Page>\n ),\n [data, navigation, props, controls, fullScreen],\n );\n const content = useContent(data as DocContentPageData, CustomPage);\n\n const custom = useMemo(\n () => ({\n navigation: navigation.custom,\n blocks: content.custom,\n }),\n [navigation, content],\n );\n\n return (\n <PageConstructorProvider theme={theme}>\n <PageConstructor\n custom={custom}\n content={content.layout}\n navigation={fullScreen ? undefined : navigation.layout}\n />\n </PageConstructorProvider>\n );\n}\n","import React from 'react';\nimport {MermaidRuntime} from '@diplodoc/mermaid-extension/react';\nimport {LatexRuntime} from '@diplodoc/latex-extension/react';\nimport {Runtime as OpenapiSandbox} from '@diplodoc/openapi-extension/runtime';\nimport {Theme} from '@diplodoc/components';\nimport {useTheme} from '@gravity-ui/uikit';\n\nexport function Runtime() {\n const theme = useTheme();\n\n return (\n <>\n <OpenapiSandbox />\n <LatexRuntime />\n <MermaidRuntime\n theme={theme === Theme.Dark ? 'dark' : 'neutral'}\n zoom={{\n showMenu: true,\n bindKeys: true,\n }}\n />\n </>\n );\n}\n","import type {AppProps} from './index';\n\nimport {Lang, getLangPath} from '@diplodoc/components';\nimport {useCallback, useMemo} from 'react';\n\nexport function useLangs({router, lang, langs}: AppProps) {\n const onChangeLang = useCallback(\n (lang: Lang) => {\n const path = getLangPath(router, lang);\n window.location.replace(path);\n },\n [router],\n );\n\n return useMemo(() => ({lang, langs, onChangeLang}), [lang, langs, onChangeLang]);\n}\n","import type {Settings} from '../../utils';\n\nimport {useMemo, useState} from 'react';\n\nimport {getSettings, setSetting} from '../../utils';\n\nconst capitalize = <T extends string>(string: T): Capitalize<T> =>\n string.replace(/^./, (ch) => ch.toUpperCase()) as Capitalize<T>;\n\nexport function useSettings() {\n const settings = getSettings();\n\n const theme = useSetting('theme', settings);\n const textSize = useSetting('textSize', settings);\n const wideFormat = useSetting('wideFormat', settings);\n const fullScreen = useSetting('fullScreen', settings);\n const showMiniToc = useSetting('showMiniToc', settings);\n\n const controls = useMemo(\n () => ({\n ...theme,\n ...textSize,\n ...wideFormat,\n ...showMiniToc,\n ...fullScreen,\n }),\n [theme, textSize, wideFormat, showMiniToc, fullScreen],\n );\n\n return controls;\n}\n\ntype State<P extends keyof Settings> = {\n [prop in P]: Settings[P];\n} & {\n [prop in `onChange${Capitalize<P>}`]: (value: Settings[P]) => void;\n};\n\nfunction useSetting<P extends keyof Settings>(name: P, settings: Settings): State<P> {\n const [setting, setSetting] = useState<Settings[P]>(settings[name]);\n const onChangeSetting = useMemo(() => withSavingSetting(name, setSetting), [name, setSetting]);\n\n return useMemo(\n () =>\n ({\n [name]: setting,\n ['onChange' + capitalize(name)]: onChangeSetting,\n }) as State<P>,\n [name, setting, onChangeSetting],\n );\n}\n\nfunction withSavingSetting<T>(settingName: string, onChange: (value: T) => void) {\n return (value: T) => {\n setSetting<T>(settingName, value);\n\n onChange(value);\n };\n}\n","import {useCallback, useEffect, useState} from 'react';\n\nimport {getMobileView} from '../../utils';\n\nexport function useMobile() {\n const [mobileView, setMobileView] = useState<boolean>(getMobileView());\n\n const onResizeHandler = useCallback(() => {\n setMobileView(getMobileView());\n }, []);\n\n useEffect(onResizeHandler, [onResizeHandler]);\n\n useEffect(() => {\n window.addEventListener('resize', onResizeHandler);\n\n return () => window.removeEventListener('resize', onResizeHandler);\n }, [onResizeHandler]);\n\n return mobileView;\n}\n","import type {NavigationData, PageContent} from '@gravity-ui/page-constructor';\nimport type {ReactElement} from 'react';\nimport type {Props as HeaderControlsProps} from '../HeaderControls';\nimport type {SearchConfig} from '../Search';\nimport type {RouterConfig} from '../Router';\n\nimport React, {useEffect, useMemo} from 'react';\nimport {ThemeProvider} from '@gravity-ui/uikit';\nimport {\n ConsentPopup,\n DocBasePageData,\n DocContentPageData as DocContentPageDataBase,\n DocLeadingPageData,\n DocPageData,\n Lang,\n configure,\n} from '@diplodoc/components';\nimport '@diplodoc/transform/dist/js/yfm';\n\nimport {SearchProvider} from '../Search';\nimport {RouterProvider} from '../Router';\nimport {getDirection, updateRootClassName, updateThemeClassName} from '../../utils';\nimport {LangProvider} from '../../hooks/useLang';\nimport '../../interceptors/leading-page-links';\nimport '../../interceptors/fast-class-applier';\n\nimport {LegacyNavPage, RichNavPage} from './Page';\nimport {Runtime} from './Runtime';\nimport {useLangs} from './useLangs';\nimport {useSettings} from './useSettings';\nimport {useMobile} from './useMobile';\nimport './App.scss';\n\nexport type DocAnalytics = {\n gtm?: {\n id?: string;\n mode?: 'base' | 'notification';\n };\n};\n\nexport interface AppProps {\n lang: Lang;\n langs: Lang[];\n router: RouterConfig;\n search?: SearchConfig;\n analytics?: DocAnalytics;\n}\n\nexport type WithNavigation = {\n navigation: NavigationData;\n};\n\nexport type DocContentPageData = DocContentPageDataBase<PageContent>;\n\nexport type PageData = DocPageData | DocLeadingPageData | DocContentPageData;\n\nexport type DocInnerProps<Data extends PageData = PageData> = {\n data: Data;\n} & AppProps;\n\nexport type {DocLeadingPageData, DocPageData};\n\nfunction hasNavigation(\n data: DocBasePageData<Partial<WithNavigation>>,\n): data is DocBasePageData<WithNavigation> {\n return Boolean(data.toc.navigation);\n}\n\nexport function App(props: DocInnerProps): ReactElement {\n const {data, router, lang, search, analytics} = props;\n\n configure({\n lang,\n });\n\n const settings = useSettings();\n const langs = useLangs(props);\n const mobileView = useMobile();\n\n const {theme, textSize, wideFormat, fullScreen, showMiniToc} = settings;\n\n const page = useMemo(\n () => ({\n router,\n\n theme,\n textSize,\n wideFormat,\n fullScreen,\n showMiniToc,\n }),\n [router, theme, textSize, wideFormat, fullScreen, showMiniToc],\n );\n const controls: HeaderControlsProps = useMemo(\n () => ({\n ...settings,\n ...langs,\n mobileView,\n }),\n [langs, settings, mobileView],\n );\n const direction = getDirection(lang);\n\n useEffect(() => {\n updateRootClassName({mobileView, wideFormat, fullScreen});\n updateThemeClassName({theme});\n }, [theme, mobileView, wideFormat, fullScreen]);\n\n return (\n <div className=\"App\">\n <ThemeProvider theme={theme} direction={direction}>\n <LangProvider value={lang}>\n <RouterProvider value={router}>\n <SearchProvider value={search}>\n {hasNavigation(data) ? (\n <RichNavPage data={data} props={page} controls={controls} />\n ) : (\n <LegacyNavPage data={data} props={page} controls={controls} />\n )}\n {analytics && (\n <ConsentPopup\n router={router}\n gtmId={analytics?.gtm?.id || ''}\n consentMode={analytics?.gtm?.mode}\n />\n )}\n <Runtime />\n </SearchProvider>\n </RouterProvider>\n </LangProvider>\n </ThemeProvider>\n </div>\n );\n}\n","import {\n Block,\n ConstructorBlock,\n NavigationData as ConstructorNavigaitonData,\n PageContent as ConstructorPageContentBase,\n} from '@gravity-ui/page-constructor';\nimport {\n BlocksConfig,\n Parser,\n TransformerRaw,\n config,\n contentTransformer,\n} from '@gravity-ui/page-constructor/server';\n\nexport interface MetaData {\n title: string;\n description?: string;\n}\n\nexport interface PageContentBase {\n meta?: MetaData;\n}\n\nexport enum Lang {\n RU = 'ru',\n EN = 'en',\n}\n\nexport type PageContent<T> = T & PageContentBase;\nexport type ConstructorPageContent = PageContent<ConstructorPageContentBase>;\nexport type NavigationData = PageContent<ConstructorNavigaitonData>;\nexport type ConfigData = ConstructorPageContent | NavigationData;\n\nexport interface PreloadParams {\n lang: Lang;\n pageName: string;\n pageReferer?: string;\n}\n\ninterface BlockConfig {\n transformer: TransformerRaw;\n fields?: string[];\n parser?: Parser;\n}\n\nexport function isPageConfig(config: ConfigData): config is ConstructorPageContent {\n return 'blocks' in config;\n}\n\nexport function preprocess(\n content: ConfigData,\n params: PreloadParams,\n customYfmTransformer: TransformerRaw,\n) {\n const {lang} = params;\n\n if (isPageConfig(content) && content.blocks) {\n return {\n ...content,\n blocks: transformBlocks(content.blocks, lang, customYfmTransformer),\n };\n }\n\n return content;\n}\n\nfunction replaceTransformer(config: BlocksConfig, newTransformer: TransformerRaw): BlocksConfig {\n return Object.keys(config).reduce((newConfig, subBlockType) => {\n const subBlock = config[subBlockType];\n\n if (Array.isArray(subBlock)) {\n newConfig[subBlockType] = subBlock.map((block: {transformer: {name: string}}) => {\n return block.transformer.name === 'yfmTransformer'\n ? {...block, transformer: newTransformer}\n : block;\n }) as BlockConfig[];\n } else {\n newConfig[subBlockType] =\n subBlock.transformer.name === 'yfmTransformer'\n ? {...subBlock, transformer: newTransformer}\n : subBlock;\n }\n\n return newConfig;\n }, {} as BlocksConfig);\n}\n\nfunction transformBlocks(\n blocks: ConstructorBlock[],\n lang: Lang,\n customYfmTransformer: TransformerRaw,\n) {\n const customConfig = replaceTransformer(config, customYfmTransformer);\n\n return contentTransformer({\n content: {blocks},\n options: {\n lang,\n customConfig,\n },\n }).blocks as Block[];\n}\n","import React from 'react';\nimport {renderToString} from 'react-dom/server';\n\nimport {App, DocAnalytics, DocInnerProps, DocLeadingPageData, DocPageData} from './components/App';\nimport {LINK_KEYS, LINK_KEYS_LEADING_CONFIG, LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG} from './constants';\nimport {preprocess} from './preprocess';\n\nexport type {DocInnerProps, DocPageData, DocLeadingPageData, DocAnalytics};\nexport type {\n SearchConfig as ISearchProviderConfig,\n WorkerConfig as ISearchWorkerConfig,\n WorkerApi as ISearchWorkerApi,\n} from './components/Search';\nexport {LINK_KEYS, LINK_KEYS_LEADING_CONFIG, LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG, preprocess};\n\nexport const render = (props: DocInnerProps) => renderToString(<App {...props} />);\n","(function () {\n /**\n * Element.matches() polyfill.\n * @link https://developer.mozilla.org/ru/docs/Web/API/Element/matches\n */\n if (typeof Element !== 'undefined') {\n (function (e) {\n const matches =\n e.matches ||\n e.matchesSelector ||\n e.webkitMatchesSelector ||\n e.mozMatchesSelector ||\n e.msMatchesSelector ||\n e.oMatchesSelector;\n\n if (matches) {\n e.matches = e.matchesSelector = matches;\n } else {\n e.matches = e.matchesSelector = function (selector) {\n const th = this;\n return Array.prototype.some.call(document.querySelectorAll(selector), (el) => {\n return el === th;\n });\n };\n }\n })(Element.prototype);\n }\n\n if (typeof document !== 'undefined') {\n document.addEventListener('click', (event) => {\n const href = event.target.href;\n const locationOrigin = window.location.origin;\n\n if (\n event.target.matches('.dc-doc-layout__center a') &&\n href.startsWith(locationOrigin)\n ) {\n event.preventDefault();\n\n const mainFileName = 'index';\n const extention = '.html';\n\n if (href.endsWith('/')) {\n window.location.href = `${href}${mainFileName}${extention}`;\n return;\n }\n\n // https://../file-name, https://../file-name#fragment\n const splitedHref = href.split('#');\n if (splitedHref.length > 0 && !splitedHref[0].endsWith(extention)) {\n splitedHref[0] += extention;\n window.location.href = splitedHref.join('#');\n return;\n }\n\n window.location.href = href;\n }\n });\n }\n})();\n","export default function () {}\n","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 29249;\nmodule.exports = webpackEmptyContext;","module.exports = require(\"buffer\");","module.exports = require(\"crypto\");","module.exports = require(\"fs\");","module.exports = require(\"node:assert\");","module.exports = require(\"node:async_hooks\");","module.exports = require(\"node:buffer\");","module.exports = require(\"node:console\");","module.exports = require(\"node:crypto\");","module.exports = require(\"node:diagnostics_channel\");","module.exports = require(\"node:events\");","module.exports = require(\"node:http\");","module.exports = require(\"node:http2\");","module.exports = require(\"node:net\");","module.exports = require(\"node:perf_hooks\");","module.exports = require(\"node:querystring\");","module.exports = require(\"node:stream\");","module.exports = require(\"node:tls\");","module.exports = require(\"node:url\");","module.exports = require(\"node:util\");","module.exports = require(\"node:util/types\");","module.exports = require(\"node:worker_threads\");","module.exports = require(\"node:zlib\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"process\");","module.exports = require(\"punycode\");","module.exports = require(\"stream\");","module.exports = require(\"string_decoder\");","module.exports = require(\"tty\");","module.exports = require(\"url\");","module.exports = require(\"util\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [644,121], () => (__webpack_require__(60204)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","__webpack_require__.amdO = {};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + ({\"121\":\"vendor\",\"644\":\"react\"}[chunkId] || chunkId) + \".js\";\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"\";","__webpack_require__.b = require(\"url\").pathToFileURL(__filename);\n\n// object to store loaded chunks\n// \"1\" means \"loaded\", otherwise not loaded yet\nvar installedChunks = {\n\t524: 1\n};\n\n__webpack_require__.O.require = (chunkId) => (installedChunks[chunkId]);\n\nvar installChunk = (chunk) => {\n\tvar moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\tfor(var i = 0; i < chunkIds.length; i++)\n\t\tinstalledChunks[chunkIds[i]] = 1;\n\t__webpack_require__.O();\n};\n\n// require() chunk loading for javascript\n__webpack_require__.f.require = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\tinstallChunk(require(\"./\" + __webpack_require__.u(chunkId)));\n\t\t} else installedChunks[chunkId] = 1;\n\t}\n};\n\n// no external install chunk\n\n// no HMR\n\n// no HMR manifest","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\t__webpack_require__.e(644);\n\t__webpack_require__.e(121);\n\treturn next();\n};","","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n",""],"names":["React","Search","createElement","createContext","useContext","SearchContext","displayName","SearchProvider","Provider","useSearch","RouterContext","pathname","depth","RouterProvider","useRouter","TextSizes","Theme","HEADER_HEIGHT","MOBILE_VIEW_WIDTH_BREAKPOINT","DEFAULT_USER_SETTINGS","theme","Light","textSize","M","showMiniToc","wideFormat","fullScreen","RTL_LANGS","TextDirection","LINK_KEYS_LEADING_CONFIG","LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG","LINK_KEYS","Set","isBrowser","document","updateThemeClassName","querySelectorAll","forEach","el","classList","toggle","updateRootClassName","states","body","add","name","state","Boolean","Object","keys","getDirection","lang","isRTL","includes","RTL","LTR","toBoolean","str","getSettings","getSetting","getMobileView","clientWidth","sessionStorage","getItem","setSetting","value","setItem","String","Lang","LangContext","En","LangProvider","useLang","mobileView","block","b","Header","Content","Footer","defaults","doc","Layout","props","children","headerHeight","header","content","footer","Children","child","type","className","BackgroundMedia","Col","ConstructorBlocks","Grid","Row","getThemedValue","useTheme","bPC","bPCRow","ConstructorRow","ConstructorPage","background","blocks","themedBackground","assign","items","DocumentType","getPageType","useMemo","useContent","data","CustomPage","PageConstructor","layout","resetPaddings","config","custom","page","App","constructor","_defineProperty","worker","initWorker","base","mark","suggest","query","request","search","window","location","split","slice","join","message","Worker","URL","import","meta","url","channel","MessageChannel","Promise","resolve","reject","port1","onmessage","error","console","result","onmessageerror","postMessage","port2","useProvider","useCallback","useRef","SearchSuggest","Suggest","provider","onFocus","focusSearch","onBlur","setTimeout","current","close","ref","classNameContainer","memo","ControlSizes","Controls","ControlsLayout","HeaderControls","onChangeTheme","onChangeTextSize","onChangeWideFormat","onChangeShowMiniToc","langs","onChangeLang","controlClassName","controlSize","L","isWideView","isMobileView","CustomNavigation","MobileDropdown","findItem","right","left","some","item","useNavigation","controls","CustomControls","CustomSuggest","toc","navigation","logo","leftItems","rightItems","withControls","withSearch","router","unshift","navigationData","withBorder","navigationTocData","mobileControlsData","userSettings","renderNavigation","PageConstructorProvider","getPageByType","Page","pageProps","EMPTY","LegacyNavPage","RichNavPage","undefined","MermaidRuntime","LatexRuntime","Runtime","OpenapiSandbox","Fragment","Dark","zoom","showMenu","bindKeys","getLangPath","useLangs","path","replace","useState","capitalize","string","ch","toUpperCase","useSettings","settings","useSetting","setting","onChangeSetting","withSavingSetting","settingName","onChange","useEffect","useMobile","setMobileView","onResizeHandler","addEventListener","removeEventListener","ThemeProvider","ConsentPopup","configure","hasNavigation","analytics","direction","gtmId","gtm","id","consentMode","mode","contentTransformer","isPageConfig","preprocess","params","customYfmTransformer","transformBlocks","replaceTransformer","newTransformer","reduce","newConfig","subBlockType","subBlock","Array","isArray","map","transformer","customConfig","options","renderToString","render","Element","e","matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","selector","th","prototype","call","event","href","target","locationOrigin","origin","startsWith","preventDefault","mainFileName","extention","endsWith","splitedHref","length"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"app.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA0B;AAEnB,MAAMC,MAAM,GAAGA,CAAA,KAAM;EACxB,oBAAOD,KAAA,CAAAE,aAAA,cAAK,SAAY,CAAC;AAC7B,CAAC;;ACF+C;AAIzC,MAAMG,aAAa,gBAAGF,uBAAa,CAAkC,IAAI,CAAC;AAEjFE,aAAa,CAACC,WAAW,GAAG,eAAe;AAEpC,MAAMC,cAAc,GAAGF,aAAa,CAACG,QAAQ;AAEpB;AAEzB,SAASC,SAASA,CAAA,EAAG;EACxB,OAAOL,oBAAU,CAACC,aAAa,CAAC;AACpC;;ACdgD;AAMzC,MAAMK,aAAa,gBAAGP,uBAAa,CAAe;EACrDQ,QAAQ,EAAE,GAAG;EACbC,KAAK,EAAE;AACX,CAAC,CAAC;AAEFF,aAAa,CAACJ,WAAW,GAAG,eAAe;AAEpC,MAAMO,cAAc,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WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;;;;;WCRA;WACA;WACA;WACA,eAAe,6BAA6B;WAC5C;;;;;WCJA;WACA;WACA;WACA;WACA;;;;;WCJA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;;;;;WCJA;;;;;WCAA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,gBAAgB,qBAAqB;WACrC;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA,aAAa;WACb;WACA,IAAI;WACJ;WACA;;WAEA;;WAEA;;WAEA;;;;;WCrCA;WACA;WACA;WACA;WACA;WACA;;;;;UELA;UACA","sources":["webpack://@diplodoc/client/./src/components/Search/Search.tsx","webpack://@diplodoc/client/./src/components/Search/index.ts","webpack://@diplodoc/client/./src/components/Router/index.ts","webpack://@diplodoc/client/./src/constants.ts","webpack://@diplodoc/client/./src/utils.ts","webpack://@diplodoc/client/./src/hooks/useLang.ts","webpack://@diplodoc/client/./src/interceptors/fast-class-applier.ts","webpack://@diplodoc/client/./src/components/Layout/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/useContent.tsx","webpack://@diplodoc/client/./src/components/index.ts","webpack://@diplodoc/client/./src/components/Search/provider/index.ts","webpack://@diplodoc/client/./src/components/Search/useProvider.ts","webpack://@diplodoc/client/./src/components/Search/Suggest.tsx","webpack://@diplodoc/client/./src/components/HeaderControls/index.tsx","webpack://@diplodoc/client/./src/components/ConstructorPage/useNavigation.tsx","webpack://@diplodoc/client/./src/components/App/Page.tsx","webpack://@diplodoc/client/./src/components/App/Runtime.tsx","webpack://@diplodoc/client/./src/components/App/useLangs.ts","webpack://@diplodoc/client/./src/components/App/useSettings.ts","webpack://@diplodoc/client/./src/components/App/useMobile.ts","webpack://@diplodoc/client/./src/components/App/index.tsx","webpack://@diplodoc/client/./src/preprocess.ts","webpack://@diplodoc/client/./src/index.server.tsx","webpack://@diplodoc/client/./src/interceptors/leading-page-links.js","webpack://@diplodoc/client/./src/stub/empty-module.js","webpack://@diplodoc/client/./node_modules/picocolors/ sync","webpack://@diplodoc/client/external node-commonjs \"buffer\"","webpack://@diplodoc/client/external node-commonjs \"crypto\"","webpack://@diplodoc/client/external node-commonjs \"fs\"","webpack://@diplodoc/client/external node-commonjs \"node:assert\"","webpack://@diplodoc/client/external node-commonjs \"node:async_hooks\"","webpack://@diplodoc/client/external node-commonjs \"node:buffer\"","webpack://@diplodoc/client/external node-commonjs \"node:console\"","webpack://@diplodoc/client/external node-commonjs \"node:crypto\"","webpack://@diplodoc/client/external node-commonjs \"node:diagnostics_channel\"","webpack://@diplodoc/client/external node-commonjs \"node:events\"","webpack://@diplodoc/client/external node-commonjs \"node:http\"","webpack://@diplodoc/client/external node-commonjs \"node:http2\"","webpack://@diplodoc/client/external node-commonjs \"node:net\"","webpack://@diplodoc/client/external node-commonjs \"node:perf_hooks\"","webpack://@diplodoc/client/external node-commonjs \"node:querystring\"","webpack://@diplodoc/client/external node-commonjs \"node:stream\"","webpack://@diplodoc/client/external node-commonjs \"node:tls\"","webpack://@diplodoc/client/external node-commonjs \"node:url\"","webpack://@diplodoc/client/external node-commonjs \"node:util\"","webpack://@diplodoc/client/external node-commonjs \"node:util/types\"","webpack://@diplodoc/client/external node-commonjs \"node:worker_threads\"","webpack://@diplodoc/client/external node-commonjs \"node:zlib\"","webpack://@diplodoc/client/external node-commonjs \"os\"","webpack://@diplodoc/client/external node-commonjs \"path\"","webpack://@diplodoc/client/external node-commonjs \"process\"","webpack://@diplodoc/client/external node-commonjs \"punycode\"","webpack://@diplodoc/client/external node-commonjs \"stream\"","webpack://@diplodoc/client/external node-commonjs \"string_decoder\"","webpack://@diplodoc/client/external node-commonjs \"tty\"","webpack://@diplodoc/client/external node-commonjs \"url\"","webpack://@diplodoc/client/external node-commonjs \"util\"","webpack://@diplodoc/client/webpack/bootstrap","webpack://@diplodoc/client/webpack/runtime/amd options","webpack://@diplodoc/client/webpack/runtime/chunk loaded","webpack://@diplodoc/client/webpack/runtime/compat get default export","webpack://@diplodoc/client/webpack/runtime/define property getters","webpack://@diplodoc/client/webpack/runtime/ensure chunk","webpack://@diplodoc/client/webpack/runtime/get javascript chunk filename","webpack://@diplodoc/client/webpack/runtime/get mini-css chunk filename","webpack://@diplodoc/client/webpack/runtime/hasOwnProperty shorthand","webpack://@diplodoc/client/webpack/runtime/make namespace object","webpack://@diplodoc/client/webpack/runtime/node module decorator","webpack://@diplodoc/client/webpack/runtime/publicPath","webpack://@diplodoc/client/webpack/runtime/require chunk loading","webpack://@diplodoc/client/webpack/runtime/startup chunk dependencies","webpack://@diplodoc/client/webpack/before-startup","webpack://@diplodoc/client/webpack/startup","webpack://@diplodoc/client/webpack/after-startup"],"sourcesContent":["import React from 'react';\n\nexport const Search = () => {\n return <div>Initial</div>;\n};\n","import type {SearchConfig, WorkerApi, WorkerConfig} from './types';\n\nimport {createContext, useContext} from 'react';\n\nexport type {SearchConfig, WorkerConfig, WorkerApi};\n\nexport const SearchContext = createContext<SearchConfig | null | undefined>(null);\n\nSearchContext.displayName = 'SearchContext';\n\nexport const SearchProvider = SearchContext.Provider;\n\nexport {Search} from './Search';\n\nexport function useSearch() {\n return useContext(SearchContext);\n}\n","import type {Router} from '@diplodoc/components';\n\nimport {createContext, useContext} from 'react';\n\nexport interface RouterConfig extends Router {\n depth: number;\n}\n\nexport const RouterContext = createContext<RouterConfig>({\n pathname: '/',\n depth: 0,\n});\n\nRouterContext.displayName = 'RouterContext';\n\nexport const RouterProvider = RouterContext.Provider;\n\nexport function useRouter() {\n return useContext(RouterContext);\n}\n","import {TextSizes, Theme} from '@diplodoc/components';\n\nexport const HEADER_HEIGHT = 64;\n\nexport const MOBILE_VIEW_WIDTH_BREAKPOINT = 769;\n\nexport const DEFAULT_USER_SETTINGS = {\n theme: Theme.Light,\n textSize: TextSizes.M,\n showMiniToc: true,\n wideFormat: true,\n fullScreen: false,\n};\n\nexport const RTL_LANGS = [\n 'ar',\n 'arc',\n 'ckb',\n 'dv',\n 'fa',\n 'ha',\n 'he',\n 'khw',\n 'ks',\n 'ps',\n 'sd',\n 'ur',\n 'uz_AF',\n 'yi',\n];\n\nexport enum TextDirection {\n RTL = 'rtl',\n LTR = 'ltr',\n}\n\nexport const LINK_KEYS_LEADING_CONFIG = ['href'];\nexport const LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG = [\n 'src',\n 'url',\n 'href',\n 'icon',\n 'image',\n 'desktop',\n 'mobile',\n 'tablet',\n 'previewImg',\n 'image',\n 'avatar',\n 'logo',\n 'light',\n 'dark',\n];\n\nexport const LINK_KEYS = [\n ...new Set([...LINK_KEYS_LEADING_CONFIG, ...LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG]),\n];\n","import {Lang, Theme} from '@diplodoc/components';\n\nimport {\n DEFAULT_USER_SETTINGS,\n MOBILE_VIEW_WIDTH_BREAKPOINT,\n RTL_LANGS,\n TextDirection,\n} from './constants';\n\nexport function isBrowser() {\n return typeof document !== 'undefined';\n}\n\nexport function updateThemeClassName({theme}: {theme: Theme}) {\n if (typeof document === 'undefined') {\n return;\n }\n\n document.querySelectorAll('.g-root').forEach((el) => {\n el.classList.toggle('g-root_theme_light', theme === 'light');\n el.classList.toggle('g-root_theme_dark', theme === 'dark');\n });\n}\n\nexport function updateRootClassName(states: {\n mobileView?: boolean;\n wideFormat?: boolean;\n fullScreen?: boolean;\n focusSearch?: boolean;\n}) {\n if (!isBrowser()) {\n return;\n }\n\n document.body.classList.add('g-root');\n\n const toggle = (name: string, state: unknown) =>\n document.body.classList.toggle(name, Boolean(state));\n\n Object.keys(states).forEach((state) => {\n switch (state) {\n case 'wideFormat':\n toggle('dc-root_wide-format', states[state]);\n break;\n case 'focusSearch':\n toggle('dc-root_focused-search', states[state]);\n break;\n case 'fullScreen':\n toggle('dc-root_full-screen', states[state]);\n break;\n case 'mobileView':\n toggle('mobile', states[state]);\n toggle('desktop', !states[state]);\n break;\n }\n });\n}\n\nexport function getDirection(lang: Lang): TextDirection {\n const isRTL = RTL_LANGS.includes(lang);\n\n return isRTL ? TextDirection.RTL : TextDirection.LTR;\n}\n\nconst toBoolean = (str: string | boolean) => {\n if (typeof str === 'boolean') {\n return str;\n }\n\n return str ? str === 'true' : false;\n};\n\nexport type Settings = typeof DEFAULT_USER_SETTINGS;\n\nexport function getSettings() {\n const theme = getSetting('theme');\n const textSize = getSetting('textSize');\n const showMiniToc = getSetting('showMiniToc');\n const wideFormat = getSetting('wideFormat');\n const fullScreen = getSetting('fullScreen');\n\n return {\n theme,\n textSize,\n showMiniToc: toBoolean(showMiniToc),\n wideFormat: toBoolean(wideFormat),\n fullScreen: toBoolean(fullScreen),\n };\n}\n\nexport function getMobileView() {\n if (!isBrowser()) {\n return false;\n }\n\n return document.body.clientWidth < MOBILE_VIEW_WIDTH_BREAKPOINT;\n}\n\nfunction getSetting<T extends keyof Settings>(name: T): Settings[T] {\n if (!isBrowser()) {\n return DEFAULT_USER_SETTINGS[name];\n }\n\n try {\n return (sessionStorage.getItem(name) as Settings[T]) || DEFAULT_USER_SETTINGS[name];\n } catch {\n return DEFAULT_USER_SETTINGS[name];\n }\n}\n\nexport function setSetting<T>(name: string, value: T) {\n if (!isBrowser()) {\n return;\n }\n\n try {\n sessionStorage.setItem(name, String(value));\n } catch {}\n}\n","import {createContext, useContext} from 'react';\nimport {Lang} from '@diplodoc/components';\n\nconst LangContext = createContext<Lang>(Lang.En);\n\nLangContext.displayName = 'Lang';\n\nexport const LangProvider = LangContext.Provider;\n\nexport function useLang() {\n return useContext(LangContext);\n}\n","import {getMobileView, getSettings, updateRootClassName, updateThemeClassName} from '../utils';\n\nif (typeof document !== 'undefined') {\n const {theme, wideFormat, fullScreen} = getSettings();\n const mobileView = getMobileView();\n\n updateRootClassName({mobileView, wideFormat, fullScreen});\n updateThemeClassName({theme});\n}\n","import React, {FC, PropsWithChildren, ReactElement} from 'react';\nimport block from 'bem-cn-lite';\n\nimport './Layout.scss';\n\nconst b = block('Layout');\n\nfunction Header() {\n return null;\n}\n\nfunction Content() {\n return null;\n}\n\nfunction Footer() {\n return null;\n}\n\ntype LayoutStatics = {\n Header: FC<PropsWithChildren>;\n Content: FC<PropsWithChildren>;\n Footer: FC<PropsWithChildren>;\n};\n\ntype LayoutProps = {\n doc?: boolean;\n headerHeight?: number;\n};\n\nconst defaults = {\n doc: false,\n};\n\nexport const Layout: LayoutStatics & FC<PropsWithChildren<LayoutProps>> = (props) => {\n const {children, doc, headerHeight = 0} = {...defaults, ...props};\n let header, content, footer;\n\n React.Children.forEach(children as ReactElement[], (child: ReactElement) => {\n switch (child.type) {\n case Header:\n header = child.props.children;\n break;\n case Content:\n content = child.props.children;\n break;\n case Footer:\n footer = child.props.children;\n break;\n }\n });\n\n return (\n <div className={b({'full-header': headerHeight > 0})}>\n {header && <div className={b('header')}>{header}</div>}\n <div className={b('body')}>\n {content && <div className={b('content')}>{content}</div>}\n {footer && <div className={b('footer', {doc})}>{footer}</div>}\n </div>\n </div>\n );\n};\n\nLayout.displayName = 'Layout';\n\nLayout.Header = Header;\nLayout.Content = Content;\nLayout.Footer = Footer;\n","import type {PropsWithChildren} from 'react';\nimport type {PageContent} from '@gravity-ui/page-constructor';\n\nimport React from 'react';\nimport block from 'bem-cn-lite';\nimport {\n BackgroundMedia,\n Col,\n ConstructorBlocks,\n Grid,\n Row,\n getThemedValue,\n useTheme,\n} from '@gravity-ui/page-constructor';\n\nconst bPC = block('pc-page-constructor');\nconst bPCRow = block('pc-constructor-row');\n\nexport const ConstructorRow = ({children}: PropsWithChildren) =>\n children ? (\n <Row className={bPCRow()}>\n <Col>{children}</Col>\n </Row>\n ) : null;\n\nexport function ConstructorPage({background, blocks}: PageContent) {\n const theme = useTheme();\n const themedBackground = getThemedValue(background, theme);\n\n return (\n <div className={bPC('docs')}>\n <div className={bPC('wrapper')}>\n {blocks && themedBackground && (\n <BackgroundMedia {...themedBackground} className={bPC('background')} />\n )}\n <Grid>\n <ConstructorRow>\n <ConstructorBlocks items={blocks} />\n </ConstructorRow>\n </Grid>\n </div>\n </div>\n );\n}\n","import type {ReactNode} from 'react';\nimport type {PageContent} from '@gravity-ui/page-constructor';\nimport type {DocContentPageData} from '@diplodoc/components';\n\nimport {DocumentType, getPageType} from '@diplodoc/components';\nimport {useMemo} from 'react';\n\nexport const useContent = (data: DocContentPageData, CustomPage: () => ReactNode) => {\n const type = getPageType(data);\n const fullScreen =\n type === DocumentType.PageConstructor &&\n 'data' in data &&\n 'fullScreen' in data.data &&\n data.data.fullScreen;\n\n const layout = useMemo(\n () =>\n fullScreen\n ? (data.data as PageContent)\n : {\n blocks: [\n {\n type: 'page',\n resetPaddings: true,\n },\n ],\n },\n [fullScreen, data],\n );\n\n const config = useMemo(\n () => ({\n custom: {\n page: CustomPage,\n },\n layout,\n }),\n [CustomPage, layout],\n );\n\n return config;\n};\n","export {SearchContext, SearchProvider, useSearch} from './Search';\nexport {RouterContext, RouterProvider, useRouter} from './Router';\n\nexport {App} from './App';\n","import type {ISearchProvider, ISearchResult} from '@diplodoc/components';\nimport type {SearchConfig, WorkerConfig} from '../types';\n\nexport class SearchProvider implements ISearchProvider {\n private worker!: Promise<Worker>;\n\n private config: SearchConfig;\n\n constructor(config: SearchConfig) {\n this.config = config;\n }\n\n init = () => {\n this.worker = initWorker({\n ...this.config,\n base: this.base,\n mark: 'Suggest__Item__Marker',\n });\n };\n\n async suggest(query: string) {\n return this.request({\n type: 'suggest',\n query,\n }) as Promise<ISearchResult[]>;\n }\n\n async search(query: string) {\n return this.request({\n type: 'search',\n query,\n }) as Promise<ISearchResult[]>;\n }\n\n // Temporary disable link to search page\n // TODO: Implement search page\n link = () => null;\n\n // link = (query: string) => {\n // const params = query ? `?query=${encodeURIComponent(query)}` : '';\n //\n // return `${this.base}/${this.config.link}${params}`;\n // };\n\n private get base() {\n return window.location.href.split('/').slice(0, -this.config.depth).join('/');\n }\n\n private async request(message: object) {\n return request(await this.worker, message);\n }\n}\n\nconst BAD_ORIGIN_ERROR = /Script at '(.*?)' cannot be accessed from origin/;\n\nasync function loadWorker() {\n try {\n return new Worker(new URL('../worker/index.ts', import.meta.url));\n } catch (error) {\n // @see https://stackoverflow.com/questions/21408510/chrome-cant-load-web-worker\n if (error instanceof DOMException) {\n const match = BAD_ORIGIN_ERROR.exec(error.message);\n if (match) {\n const url = match[1];\n const blob = new Blob([`importScripts('${url}');`], {type: 'text/javascript'});\n\n return new Worker(URL.createObjectURL(blob));\n }\n }\n\n throw error;\n }\n}\n\nasync function initWorker(config: WorkerConfig) {\n const worker = await loadWorker();\n\n await request(worker, {...config, type: 'init'});\n\n return worker;\n}\n\nfunction request(worker: Worker, message: object) {\n const channel = new MessageChannel();\n\n return new Promise((resolve, reject) => {\n channel.port1.onmessage = (message) => {\n if (message.data.error) {\n // eslint-disable-next-line no-console\n console.error(message.data.error);\n\n reject(message.data.error);\n } else {\n resolve(message.data.result);\n }\n };\n\n channel.port1.onmessageerror = (message) => {\n reject(message.data.error);\n };\n\n worker.postMessage(message, [channel.port2]);\n });\n}\n","import {useContext, useMemo} from 'react';\n\nimport {RouterContext, SearchContext} from '../index';\nimport {useLang} from '../../hooks/useLang';\n\nimport {SearchProvider} from './provider';\n\nexport function useProvider() {\n const lang = useLang();\n const {depth = 0} = useContext(RouterContext);\n const search = useContext(SearchContext);\n\n return useMemo(() => {\n if (!search) {\n return null;\n }\n\n return new SearchProvider({\n ...search,\n depth,\n lang,\n });\n }, [lang, depth, search]);\n}\n","import type {ISearchProvider, SearchSuggestApi} from '@diplodoc/components';\n\nimport React, {useCallback, useRef} from 'react';\nimport {SearchSuggest} from '@diplodoc/components';\n\nimport {updateRootClassName} from '../../utils';\n\nimport {useProvider} from './useProvider';\nimport './Suggest.scss';\n\nexport function Suggest() {\n const provider: ISearchProvider | null = useProvider();\n const suggest = useRef<SearchSuggestApi>(null);\n\n const onFocus = useCallback(() => {\n updateRootClassName({focusSearch: true});\n }, []);\n\n const onBlur = useCallback(() => {\n updateRootClassName({focusSearch: false});\n setTimeout(() => {\n if (suggest.current) {\n suggest.current.close();\n }\n }, 100);\n }, []);\n\n if (!provider) {\n return null;\n }\n\n return (\n <SearchSuggest\n ref={suggest}\n provider={provider}\n onFocus={onFocus}\n onBlur={onBlur}\n classNameContainer={'Suggest'}\n />\n );\n}\n","import React, {memo} from 'react';\nimport {ControlSizes, Controls, ControlsLayout, Lang, TextSizes, Theme} from '@diplodoc/components';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype OnChangeCallback = (value: any) => void;\n\nexport type Props = {\n mobileView: boolean;\n\n theme: Theme;\n onChangeTheme: OnChangeCallback;\n textSize: TextSizes;\n onChangeTextSize: OnChangeCallback;\n wideFormat: boolean;\n onChangeWideFormat: OnChangeCallback;\n showMiniToc: boolean;\n onChangeShowMiniToc: OnChangeCallback;\n lang: Lang;\n langs: Lang[];\n onChangeLang?: (lang: Lang) => void;\n};\n\nexport const HeaderControls = memo<Props>(\n ({\n mobileView,\n\n theme,\n onChangeTheme,\n\n textSize,\n onChangeTextSize,\n\n wideFormat,\n onChangeWideFormat,\n\n showMiniToc,\n onChangeShowMiniToc,\n\n lang,\n langs,\n onChangeLang,\n }) => {\n return (\n <ControlsLayout\n controlClassName={'Control'}\n controlSize={ControlSizes.L}\n isWideView={mobileView}\n isMobileView={mobileView}\n >\n <Controls\n className={'Controls'}\n theme={theme}\n onChangeTheme={onChangeTheme}\n wideFormat={wideFormat}\n onChangeWideFormat={onChangeWideFormat}\n showMiniToc={showMiniToc}\n onChangeShowMiniToc={onChangeShowMiniToc}\n textSize={textSize}\n onChangeTextSize={onChangeTextSize}\n lang={lang}\n langs={langs}\n onChangeLang={onChangeLang}\n />\n </ControlsLayout>\n );\n },\n);\n\nHeaderControls.displayName = 'HeaderControls';\n","import type {ReactNode} from 'react';\nimport type {NavigationData, NavigationItemModel} from '@gravity-ui/page-constructor';\nimport type {DocBasePageData} from '@diplodoc/components';\nimport type {WithNavigation} from '../App';\nimport type {Props as HeaderControlsProps} from '../HeaderControls';\n\nimport React, {useMemo} from 'react';\nimport {ControlSizes, CustomNavigation, MobileDropdown} from '@diplodoc/components';\n\nimport {HEADER_HEIGHT} from '../../constants';\nimport {useRouter, useSearch} from '../';\n\nfunction findItem(right: NavigationItemModel[], left: NavigationItemModel[], type: string) {\n return right.some((item) => item.type === type) || left.some((item) => item.type === type);\n}\n\nexport const useNavigation = (\n data: DocBasePageData<WithNavigation>,\n controls: HeaderControlsProps,\n CustomControls: () => ReactNode,\n CustomSuggest: () => ReactNode,\n) => {\n const {toc} = data;\n const {navigation} = toc;\n const {header = {}, logo} = navigation;\n const {leftItems = [], rightItems = []} = header as NavigationData['header'];\n\n const withControls = findItem(rightItems, leftItems, 'controls');\n const withSearch = findItem(rightItems, leftItems, 'search');\n\n const search = useSearch();\n const router = useRouter();\n\n if (search && !withSearch) {\n rightItems.unshift({type: 'search'} as unknown as NavigationItemModel);\n }\n\n const navigationData = useMemo(\n () => ({\n withBorder: true,\n leftItems: leftItems,\n rightItems: rightItems,\n }),\n [leftItems, rightItems],\n );\n const navigationTocData = useMemo(\n () => ({\n toc,\n router,\n headerHeight: HEADER_HEIGHT,\n }),\n [toc, router],\n );\n const mobileControlsData = useMemo(\n () => ({\n controlSize: ControlSizes.L,\n userSettings: controls,\n }),\n [controls],\n );\n\n const layout = useMemo(\n () => ({\n header: {\n leftItems: [],\n },\n renderNavigation: () => (\n <CustomNavigation\n logo={logo}\n data={navigationData}\n navigationTocData={navigationTocData}\n mobileControlsData={mobileControlsData}\n />\n ),\n logo,\n }),\n [navigationData, navigationTocData, mobileControlsData, logo],\n );\n\n const config = useMemo(\n () => ({\n custom: {\n search: CustomSuggest,\n controls: CustomControls,\n MobileDropdown: MobileDropdown,\n },\n layout,\n withControls,\n }),\n [CustomSuggest, CustomControls, layout, withControls],\n );\n\n return config;\n};\n","import type {PropsWithChildren} from 'react';\nimport type {AppProps, PageData} from './index';\nimport type {Settings} from '../../utils';\n\nimport React, {useCallback, useMemo} from 'react';\nimport {PageConstructor, PageConstructorProvider} from '@gravity-ui/page-constructor';\nimport {DocBasePageData, getPageByType, getPageType} from '@diplodoc/components';\n\nimport {Layout} from '../Layout';\nimport {ConstructorPage} from '../ConstructorPage';\nimport {useContent} from '../ConstructorPage/useContent';\nimport {Suggest} from '../Search/Suggest';\nimport {HeaderControls, Props as HeaderControlsProps} from '../HeaderControls';\nimport {useNavigation} from '../ConstructorPage/useNavigation';\n\nimport {DocContentPageData, WithNavigation} from './index';\n\ntype Props = PropsWithChildren<Partial<AppProps> & {data: PageData; headerHeight: number}>;\n\nexport function Page({data, ...pageProps}: Props) {\n const type = getPageType(data);\n const Page = getPageByType(type);\n\n return (\n <Layout headerHeight={pageProps.headerHeight}>\n <Layout.Content>\n {/*@ts-ignore*/}\n <Page {...data} {...pageProps} />\n </Layout.Content>\n </Layout>\n );\n}\n\ntype PageProps<T extends {} = {}> = {\n data: DocBasePageData<T> & PageData;\n props: {\n router: AppProps['router'];\n } & Settings;\n controls: HeaderControlsProps;\n};\n\nconst EMPTY = {};\n\nexport function LegacyNavPage({data, props, controls}: PageProps) {\n const {theme} = props;\n\n const CustomPage = useCallback(\n () => <ConstructorPage {...(data as DocContentPageData).data} />,\n [data],\n );\n const content = useContent(data as DocContentPageData, CustomPage);\n\n const custom = useMemo(\n () => ({\n blocks: content.custom,\n }),\n [content],\n );\n\n return (\n <Page data={data} headerHeight={0} {...props} {...controls}>\n <PageConstructorProvider theme={theme}>\n <PageConstructor custom={custom} content={content.layout} />\n </PageConstructorProvider>\n </Page>\n );\n}\n\nexport function RichNavPage({data, props, controls}: PageProps<WithNavigation>) {\n const {theme, fullScreen} = props;\n\n const CustomSuggest = useCallback(() => <Suggest />, []);\n const CustomControls = useCallback(() => <HeaderControls {...controls} />, [controls]);\n const navigation = useNavigation(data, controls, CustomControls, CustomSuggest);\n\n const CustomPage = useCallback(\n () => (\n <Page\n data={data}\n headerHeight={fullScreen ? 0 : 64}\n {...props}\n {...(navigation.withControls ? EMPTY : controls)}\n >\n <ConstructorPage {...(data as DocContentPageData).data} />\n </Page>\n ),\n [data, navigation, props, controls, fullScreen],\n );\n const content = useContent(data as DocContentPageData, CustomPage);\n\n const custom = useMemo(\n () => ({\n navigation: navigation.custom,\n blocks: content.custom,\n }),\n [navigation, content],\n );\n\n return (\n <PageConstructorProvider theme={theme}>\n <PageConstructor\n custom={custom}\n content={content.layout}\n navigation={fullScreen ? undefined : navigation.layout}\n />\n </PageConstructorProvider>\n );\n}\n","import React from 'react';\nimport {MermaidRuntime} from '@diplodoc/mermaid-extension/react';\nimport {LatexRuntime} from '@diplodoc/latex-extension/react';\nimport {Runtime as OpenapiSandbox} from '@diplodoc/openapi-extension/runtime';\nimport {Theme} from '@diplodoc/components';\nimport {useTheme} from '@gravity-ui/uikit';\n\nexport function Runtime() {\n const theme = useTheme();\n\n return (\n <>\n <OpenapiSandbox />\n <LatexRuntime />\n <MermaidRuntime\n theme={theme === Theme.Dark ? 'dark' : 'neutral'}\n zoom={{\n showMenu: true,\n bindKeys: true,\n }}\n />\n </>\n );\n}\n","import type {AppProps} from './index';\n\nimport {Lang, getLangPath} from '@diplodoc/components';\nimport {useCallback, useMemo} from 'react';\n\nexport function useLangs({router, lang, langs}: AppProps) {\n const onChangeLang = useCallback(\n (lang: Lang) => {\n const path = getLangPath(router, lang);\n window.location.replace(path);\n },\n [router],\n );\n\n return useMemo(() => ({lang, langs, onChangeLang}), [lang, langs, onChangeLang]);\n}\n","import type {Settings} from '../../utils';\n\nimport {useMemo, useState} from 'react';\n\nimport {getSettings, setSetting} from '../../utils';\n\nconst capitalize = <T extends string>(string: T): Capitalize<T> =>\n string.replace(/^./, (ch) => ch.toUpperCase()) as Capitalize<T>;\n\nexport function useSettings() {\n const settings = getSettings();\n\n const theme = useSetting('theme', settings);\n const textSize = useSetting('textSize', settings);\n const wideFormat = useSetting('wideFormat', settings);\n const fullScreen = useSetting('fullScreen', settings);\n const showMiniToc = useSetting('showMiniToc', settings);\n\n const controls = useMemo(\n () => ({\n ...theme,\n ...textSize,\n ...wideFormat,\n ...showMiniToc,\n ...fullScreen,\n }),\n [theme, textSize, wideFormat, showMiniToc, fullScreen],\n );\n\n return controls;\n}\n\ntype State<P extends keyof Settings> = {\n [prop in P]: Settings[P];\n} & {\n [prop in `onChange${Capitalize<P>}`]: (value: Settings[P]) => void;\n};\n\nfunction useSetting<P extends keyof Settings>(name: P, settings: Settings): State<P> {\n const [setting, setSetting] = useState<Settings[P]>(settings[name]);\n const onChangeSetting = useMemo(() => withSavingSetting(name, setSetting), [name, setSetting]);\n\n return useMemo(\n () =>\n ({\n [name]: setting,\n ['onChange' + capitalize(name)]: onChangeSetting,\n }) as State<P>,\n [name, setting, onChangeSetting],\n );\n}\n\nfunction withSavingSetting<T>(settingName: string, onChange: (value: T) => void) {\n return (value: T) => {\n setSetting<T>(settingName, value);\n\n onChange(value);\n };\n}\n","import {useCallback, useEffect, useState} from 'react';\n\nimport {getMobileView} from '../../utils';\n\nexport function useMobile() {\n const [mobileView, setMobileView] = useState<boolean>(getMobileView());\n\n const onResizeHandler = useCallback(() => {\n setMobileView(getMobileView());\n }, []);\n\n useEffect(onResizeHandler, [onResizeHandler]);\n\n useEffect(() => {\n window.addEventListener('resize', onResizeHandler);\n\n return () => window.removeEventListener('resize', onResizeHandler);\n }, [onResizeHandler]);\n\n return mobileView;\n}\n","import type {NavigationData, PageContent} from '@gravity-ui/page-constructor';\nimport type {ReactElement} from 'react';\nimport type {Props as HeaderControlsProps} from '../HeaderControls';\nimport type {SearchConfig} from '../Search';\nimport type {RouterConfig} from '../Router';\n\nimport React, {useEffect, useMemo} from 'react';\nimport {ThemeProvider} from '@gravity-ui/uikit';\nimport {\n ConsentPopup,\n DocBasePageData,\n DocContentPageData as DocContentPageDataBase,\n DocLeadingPageData,\n DocPageData,\n Lang,\n configure,\n} from '@diplodoc/components';\nimport '@diplodoc/transform/dist/js/yfm';\n\nimport {SearchProvider} from '../Search';\nimport {RouterProvider} from '../Router';\nimport {getDirection, updateRootClassName, updateThemeClassName} from '../../utils';\nimport {LangProvider} from '../../hooks/useLang';\nimport '../../interceptors/leading-page-links';\nimport '../../interceptors/fast-class-applier';\n\nimport {LegacyNavPage, RichNavPage} from './Page';\nimport {Runtime} from './Runtime';\nimport {useLangs} from './useLangs';\nimport {useSettings} from './useSettings';\nimport {useMobile} from './useMobile';\nimport './App.scss';\n\nexport type DocAnalytics = {\n gtm?: {\n id?: string;\n mode?: 'base' | 'notification';\n };\n};\n\nexport interface AppProps {\n lang: Lang;\n langs: Lang[];\n router: RouterConfig;\n search?: SearchConfig;\n analytics?: DocAnalytics;\n}\n\nexport type WithNavigation = {\n navigation: NavigationData;\n};\n\nexport type DocContentPageData = DocContentPageDataBase<PageContent>;\n\nexport type PageData = DocPageData | DocLeadingPageData | DocContentPageData;\n\nexport type DocInnerProps<Data extends PageData = PageData> = {\n data: Data;\n} & AppProps;\n\nexport type {DocLeadingPageData, DocPageData};\n\nfunction hasNavigation(\n data: DocBasePageData<Partial<WithNavigation>>,\n): data is DocBasePageData<WithNavigation> {\n return Boolean(data.toc.navigation);\n}\n\nexport function App(props: DocInnerProps): ReactElement {\n const {data, router, lang, search, analytics} = props;\n\n configure({\n lang,\n });\n\n const settings = useSettings();\n const langs = useLangs(props);\n const mobileView = useMobile();\n\n const {theme, textSize, wideFormat, fullScreen, showMiniToc} = settings;\n\n const page = useMemo(\n () => ({\n router,\n\n theme,\n textSize,\n wideFormat,\n fullScreen,\n showMiniToc,\n }),\n [router, theme, textSize, wideFormat, fullScreen, showMiniToc],\n );\n const controls: HeaderControlsProps = useMemo(\n () => ({\n ...settings,\n ...langs,\n mobileView,\n }),\n [langs, settings, mobileView],\n );\n const direction = getDirection(lang);\n\n useEffect(() => {\n updateRootClassName({mobileView, wideFormat, fullScreen});\n updateThemeClassName({theme});\n }, [theme, mobileView, wideFormat, fullScreen]);\n\n return (\n <div className=\"App\">\n <ThemeProvider theme={theme} direction={direction}>\n <LangProvider value={lang}>\n <RouterProvider value={router}>\n <SearchProvider value={search}>\n {hasNavigation(data) ? (\n <RichNavPage data={data} props={page} controls={controls} />\n ) : (\n <LegacyNavPage data={data} props={page} controls={controls} />\n )}\n {analytics && (\n <ConsentPopup\n router={router}\n gtmId={analytics?.gtm?.id || ''}\n consentMode={analytics?.gtm?.mode}\n />\n )}\n <Runtime />\n </SearchProvider>\n </RouterProvider>\n </LangProvider>\n </ThemeProvider>\n </div>\n );\n}\n","import {\n Block,\n ConstructorBlock,\n NavigationData as ConstructorNavigaitonData,\n PageContent as ConstructorPageContentBase,\n} from '@gravity-ui/page-constructor';\nimport {\n BlocksConfig,\n Parser,\n TransformerRaw,\n config,\n contentTransformer,\n} from '@gravity-ui/page-constructor/server';\n\nexport interface MetaData {\n title: string;\n description?: string;\n}\n\nexport interface PageContentBase {\n meta?: MetaData;\n}\n\nexport enum Lang {\n RU = 'ru',\n EN = 'en',\n}\n\nexport type PageContent<T> = T & PageContentBase;\nexport type ConstructorPageContent = PageContent<ConstructorPageContentBase>;\nexport type NavigationData = PageContent<ConstructorNavigaitonData>;\nexport type ConfigData = ConstructorPageContent | NavigationData;\n\nexport interface PreloadParams {\n lang: Lang;\n pageName: string;\n pageReferer?: string;\n}\n\ninterface BlockConfig {\n transformer: TransformerRaw;\n fields?: string[];\n parser?: Parser;\n}\n\nexport function isPageConfig(config: ConfigData): config is ConstructorPageContent {\n return 'blocks' in config;\n}\n\nexport function preprocess(\n content: ConfigData,\n params: PreloadParams,\n customYfmTransformer: TransformerRaw,\n) {\n const {lang} = params;\n\n if (isPageConfig(content) && content.blocks) {\n return {\n ...content,\n blocks: transformBlocks(content.blocks, lang, customYfmTransformer),\n };\n }\n\n return content;\n}\n\nfunction replaceTransformer(config: BlocksConfig, newTransformer: TransformerRaw): BlocksConfig {\n return Object.keys(config).reduce((newConfig, subBlockType) => {\n const subBlock = config[subBlockType];\n\n if (Array.isArray(subBlock)) {\n newConfig[subBlockType] = subBlock.map((block: {transformer: {name: string}}) => {\n return block.transformer.name === 'yfmTransformer'\n ? {...block, transformer: newTransformer}\n : block;\n }) as BlockConfig[];\n } else {\n newConfig[subBlockType] =\n subBlock.transformer.name === 'yfmTransformer'\n ? {...subBlock, transformer: newTransformer}\n : subBlock;\n }\n\n return newConfig;\n }, {} as BlocksConfig);\n}\n\nfunction transformBlocks(\n blocks: ConstructorBlock[],\n lang: Lang,\n customYfmTransformer: TransformerRaw,\n) {\n const customConfig = replaceTransformer(config, customYfmTransformer);\n\n return contentTransformer({\n content: {blocks},\n options: {\n lang,\n customConfig,\n },\n }).blocks as Block[];\n}\n","import React from 'react';\nimport {renderToString} from 'react-dom/server';\n\nimport {App, DocAnalytics, DocInnerProps, DocLeadingPageData, DocPageData} from './components/App';\nimport {LINK_KEYS, LINK_KEYS_LEADING_CONFIG, LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG} from './constants';\nimport {preprocess} from './preprocess';\n\nexport type {DocInnerProps, DocPageData, DocLeadingPageData, DocAnalytics};\nexport type {\n SearchConfig as ISearchProviderConfig,\n WorkerConfig as ISearchWorkerConfig,\n WorkerApi as ISearchWorkerApi,\n} from './components/Search';\nexport {LINK_KEYS, LINK_KEYS_LEADING_CONFIG, LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG, preprocess};\n\nexport const render = (props: DocInnerProps) => renderToString(<App {...props} />);\n","(function () {\n /**\n * Element.matches() polyfill.\n * @link https://developer.mozilla.org/ru/docs/Web/API/Element/matches\n */\n if (typeof Element !== 'undefined') {\n (function (e) {\n const matches =\n e.matches ||\n e.matchesSelector ||\n e.webkitMatchesSelector ||\n e.mozMatchesSelector ||\n e.msMatchesSelector ||\n e.oMatchesSelector;\n\n if (matches) {\n e.matches = e.matchesSelector = matches;\n } else {\n e.matches = e.matchesSelector = function (selector) {\n const th = this;\n return Array.prototype.some.call(document.querySelectorAll(selector), (el) => {\n return el === th;\n });\n };\n }\n })(Element.prototype);\n }\n\n if (typeof document !== 'undefined') {\n document.addEventListener('click', (event) => {\n const href = event.target.href;\n const locationOrigin = window.location.origin;\n\n if (\n event.target.matches('.dc-doc-layout__center a') &&\n href.startsWith(locationOrigin)\n ) {\n event.preventDefault();\n\n const mainFileName = 'index';\n const extention = '.html';\n\n if (href.endsWith('/')) {\n window.location.href = `${href}${mainFileName}${extention}`;\n return;\n }\n\n // https://../file-name, https://../file-name#fragment\n const splitedHref = href.split('#');\n if (splitedHref.length > 0 && !splitedHref[0].endsWith(extention)) {\n splitedHref[0] += extention;\n window.location.href = splitedHref.join('#');\n return;\n }\n\n window.location.href = href;\n }\n });\n }\n})();\n","export default function () {}\n","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 29249;\nmodule.exports = webpackEmptyContext;","module.exports = require(\"buffer\");","module.exports = require(\"crypto\");","module.exports = require(\"fs\");","module.exports = require(\"node:assert\");","module.exports = require(\"node:async_hooks\");","module.exports = require(\"node:buffer\");","module.exports = require(\"node:console\");","module.exports = require(\"node:crypto\");","module.exports = require(\"node:diagnostics_channel\");","module.exports = require(\"node:events\");","module.exports = require(\"node:http\");","module.exports = require(\"node:http2\");","module.exports = require(\"node:net\");","module.exports = require(\"node:perf_hooks\");","module.exports = require(\"node:querystring\");","module.exports = require(\"node:stream\");","module.exports = require(\"node:tls\");","module.exports = require(\"node:url\");","module.exports = require(\"node:util\");","module.exports = require(\"node:util/types\");","module.exports = require(\"node:worker_threads\");","module.exports = require(\"node:zlib\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"process\");","module.exports = require(\"punycode\");","module.exports = require(\"stream\");","module.exports = require(\"string_decoder\");","module.exports = require(\"tty\");","module.exports = require(\"url\");","module.exports = require(\"util\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [644,121], () => (__webpack_require__(60204)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","__webpack_require__.amdO = {};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + ({\"121\":\"vendor\",\"644\":\"react\"}[chunkId] || chunkId) + \".js\";\n};","// This function allow to reference async chunks and sibling chunks for the entrypoint\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"\";","__webpack_require__.b = require(\"url\").pathToFileURL(__filename);\n\n// object to store loaded chunks\n// \"1\" means \"loaded\", otherwise not loaded yet\nvar installedChunks = {\n\t524: 1\n};\n\n__webpack_require__.O.require = (chunkId) => (installedChunks[chunkId]);\n\nvar installChunk = (chunk) => {\n\tvar moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\tfor(var i = 0; i < chunkIds.length; i++)\n\t\tinstalledChunks[chunkIds[i]] = 1;\n\t__webpack_require__.O();\n};\n\n// require() chunk loading for javascript\n__webpack_require__.f.require = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\tinstallChunk(require(\"./\" + __webpack_require__.u(chunkId)));\n\t\t} else installedChunks[chunkId] = 1;\n\t}\n};\n\n// no external install chunk\n\n// no HMR\n\n// no HMR manifest","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\t__webpack_require__.e(644);\n\t__webpack_require__.e(121);\n\treturn next();\n};","","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n",""],"names":["React","Search","createElement","createContext","useContext","SearchContext","displayName","SearchProvider","Provider","useSearch","RouterContext","pathname","depth","RouterProvider","useRouter","TextSizes","Theme","HEADER_HEIGHT","MOBILE_VIEW_WIDTH_BREAKPOINT","DEFAULT_USER_SETTINGS","theme","Light","textSize","M","showMiniToc","wideFormat","fullScreen","RTL_LANGS","TextDirection","LINK_KEYS_LEADING_CONFIG","LINK_KEYS_PAGE_CONSTRUCTOR_CONFIG","LINK_KEYS","Set","isBrowser","document","updateThemeClassName","querySelectorAll","forEach","el","classList","toggle","updateRootClassName","states","body","add","name","state","Boolean","Object","keys","getDirection","lang","isRTL","includes","RTL","LTR","toBoolean","str","getSettings","getSetting","getMobileView","clientWidth","sessionStorage","getItem","setSetting","value","setItem","String","Lang","LangContext","En","LangProvider","useLang","mobileView","block","b","Header","Content","Footer","defaults","doc","Layout","props","children","headerHeight","header","content","footer","Children","child","type","className","BackgroundMedia","Col","ConstructorBlocks","Grid","Row","getThemedValue","useTheme","bPC","bPCRow","ConstructorRow","ConstructorPage","background","blocks","themedBackground","assign","items","DocumentType","getPageType","useMemo","useContent","data","CustomPage","PageConstructor","layout","resetPaddings","config","custom","page","App","constructor","_defineProperty","worker","initWorker","base","mark","suggest","query","request","search","window","location","href","split","slice","join","message","BAD_ORIGIN_ERROR","loadWorker","Worker","URL","import","meta","url","error","DOMException","match","exec","blob","Blob","createObjectURL","channel","MessageChannel","Promise","resolve","reject","port1","onmessage","console","result","onmessageerror","postMessage","port2","useProvider","useCallback","useRef","SearchSuggest","Suggest","provider","onFocus","focusSearch","onBlur","setTimeout","current","close","ref","classNameContainer","memo","ControlSizes","Controls","ControlsLayout","HeaderControls","onChangeTheme","onChangeTextSize","onChangeWideFormat","onChangeShowMiniToc","langs","onChangeLang","controlClassName","controlSize","L","isWideView","isMobileView","CustomNavigation","MobileDropdown","findItem","right","left","some","item","useNavigation","controls","CustomControls","CustomSuggest","toc","navigation","logo","leftItems","rightItems","withControls","withSearch","router","unshift","navigationData","withBorder","navigationTocData","mobileControlsData","userSettings","renderNavigation","PageConstructorProvider","getPageByType","Page","pageProps","EMPTY","LegacyNavPage","RichNavPage","undefined","MermaidRuntime","LatexRuntime","Runtime","OpenapiSandbox","Fragment","Dark","zoom","showMenu","bindKeys","getLangPath","useLangs","path","replace","useState","capitalize","string","ch","toUpperCase","useSettings","settings","useSetting","setting","onChangeSetting","withSavingSetting","settingName","onChange","useEffect","useMobile","setMobileView","onResizeHandler","addEventListener","removeEventListener","ThemeProvider","ConsentPopup","configure","hasNavigation","analytics","direction","gtmId","gtm","id","consentMode","mode","contentTransformer","isPageConfig","preprocess","params","customYfmTransformer","transformBlocks","replaceTransformer","newTransformer","reduce","newConfig","subBlockType","subBlock","Array","isArray","map","transformer","customConfig","options","renderToString","render","Element","e","matches","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","selector","th","prototype","call","event","target","locationOrigin","origin","startsWith","preventDefault","mainFileName","extention","endsWith","splitedHref","length"],"sourceRoot":""}
|