@sinytra/wiki-previewer 0.1.89 → 0.1.92
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/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +32 -32
- package/.next/app-path-routes-manifest.json +3 -3
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +23 -23
- package/.next/server/app/[locale]/(main)/project/[slug]/[version]/content/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[locale]/(main)/project/[slug]/[version]/content/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[locale]/(main)/project/[slug]/[version]/docs/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[locale]/(main)/project/[slug]/[version]/docs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[locale]/(main)/project/[slug]/[version]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +2 -2
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/opengraph-image/route_client-reference-manifest.js +1 -1
- package/.next/server/app/robots.txt/route_client-reference-manifest.js +1 -1
- package/.next/server/app/sitemap.xml/route_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +3 -3
- package/.next/server/chunks/7615.js +2 -2
- package/.next/server/middleware-manifest.json +10 -10
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/app/[locale]/layout-907e564d4a4691aa.js +1 -0
- package/.next/static/css/11f6be623c3bb77c.css +1 -0
- package/package.json +1 -1
- package/.next/static/chunks/app/[locale]/layout-a49c62d5de18121f.js +0 -1
- package/.next/static/css/a67df410c57463f3.css +0 -1
- /package/.next/static/{Y6nlPjzV1sBbYvn1DMVUa → qKoYdAR7L_zhq8CgBpeaz}/_buildManifest.js +0 -0
- /package/.next/static/{Y6nlPjzV1sBbYvn1DMVUa → qKoYdAR7L_zhq8CgBpeaz}/_ssgManifest.js +0 -0
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[450],{3807:(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var s=r(3231),n=r(92112),a=r(88254),o=r(79126),l=r(74922),c=r(65119),i=r(68717),u=r(18398);let d={getBuiltinAssetSource:function(){var e;return null!=(e=u.env.NEXT_PUBLIC_BUILTIN_ASSET_SOURCES)?e:null}},h={getAssetResource:function(e){let t=d.getBuiltinAssetSource();if(!t)return null;let r=new URL(t);r.pathname+="/.assets/"+e.namespace+"/"+e.path+(e.path.includes(".")?"":".png");let s=(0,c.A)(r.toString());return null===s?null:{id:l.A.toString(e),src:s}}};var f=r(32232),p=r(18398);function m(e,t){return"locale"==e?f.A.actualLocale(t):"version"==e?function(e){return e==o.j4?null:e}(t):t}function x(e,t){let r=p.env.NEXT_PUBLIC_BACKEND_SERVICE_URL;if(!r)throw Error("Missing env variable NEXT_PUBLIC_BACKEND_SERVICE_URL");let s=(0,i.cT)(t,m);return"".concat(r,"/api/v1/").concat(e,"?").concat(s)}let v={constructApiUrl:x},y={getRemoteAsset:function(e,t){let r=l.A.parse(e);if(!r)return null;let s=function(e,t,r){if(!r||t.namespace===l.o){let t=e.includes("/")?e:function(e){let t=l.A.parse(e);return t?l.A.toString({namespace:t.namespace,path:"item/"+t.path}):e}(e),r=l.A.parse(t);return r?h.getAssetResource(r):null}return null}(e,r,t);return null!=s?s:function(e,t){let{id:r,version:s}=t,n=v.constructApiUrl("docs/".concat(r,"/asset/").concat(e),{version:s});return{id:e,src:n}}(e,t)}};var g=r(18398);async function b(e,t,r){var n;let l=g.env.NEXT_PUBLIC_SEARCH_ENDPOINT,c=g.env.NEXT_PUBLIC_SEARCH_COLLECTION,i=g.env.NEXT_PUBLIC_SEARCH_API_KEY;if(!l||!c||!i)return{total:0,hits:[]};let u=new s._t({nodes:[{url:l}],apiKey:i,connectionTimeoutSeconds:2,timeoutSeconds:5,numRetries:3,retryIntervalSeconds:1,cacheSearchResultsForSeconds:120}),d=await j(u,c,{q:e,query_by:"title,item_ids,project_id,project_name,page_ref",filter_by:r?"project_id:=".concat(r):void 0,per_page:8,page:1});if(!d||0===d.found||!(null==(n=d.hits)?void 0:n.length))return null;let h=d.hits.map(e=>{var r,s;let n=e.document,l=(r=n,s=t,"project"===r.entry_type?(0,a.gZ)(s,r.project_id):"documentation"===r.entry_type?(0,a.M$)(r.page_ref,{id:r.project_id,locale:s,version:o.j4}):"content"===r.entry_type?(0,a.sw)(r.page_ref,{locale:s,version:o.j4,id:r.project_id}):(console.error("Unknown search result",r),"")),c=function(e,t){if("project"===e.entry_type&&null!=e.project_icon_url)return{src:e.project_icon_url,id:e.project_id};if(null==e.icon)return null;let r={id:e.project_id,locale:t,version:o.j4};return y.getRemoteAsset(e.icon,r)}(n,t);return{...n,href:l,icon_asset:c}});return{total:d.found,hits:h}}async function j(e,t,r){try{return await e.collections(t).documents().search(r,{})}catch(e){if(e instanceof n.RequestMalformed)console.error("Bad search params:",e.httpBody);else if(e instanceof n.RequestUnauthorized)console.error("Auth failed — check apiKey");else if(e instanceof n.ObjectNotFound)console.error("Collection does not exist");else if(e instanceof n.ServerError)console.error("Typesense server error",e.httpStatus);else if(e instanceof n.TypesenseError)console.error("Typesense error",e.httpStatus,e.httpBody);else throw e;return null}}let w={searchWiki:async function e(e,t,r){try{let s=await b(e,t,r);if(null!=s)return s}catch(e){console.error("Error running search",e)}return{total:0,hits:[]}}}},6611:(e,t,r)=>{Promise.resolve().then(r.bind(r,63796)),Promise.resolve().then(r.bind(r,15504)),Promise.resolve().then(r.bind(r,18128)),Promise.resolve().then(r.t.bind(r,80233,23)),Promise.resolve().then(r.bind(r,51979)),Promise.resolve().then(r.bind(r,48617)),Promise.resolve().then(r.bind(r,16512)),Promise.resolve().then(r.bind(r,66909)),Promise.resolve().then(r.t.bind(r,29906,23)),Promise.resolve().then(r.bind(r,40921)),Promise.resolve().then(r.bind(r,46867)),Promise.resolve().then(r.bind(r,84930)),Promise.resolve().then(r.bind(r,22254)),Promise.resolve().then(r.bind(r,63039)),Promise.resolve().then(r.bind(r,68950))},16512:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var s=r(1785),n=r(16685),a=r(74257);function o(e){let{unfix:t,children:r}=e,o=(0,n.useRef)(null),[l,c]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=()=>{c(window.scrollY>0)};return document.addEventListener("scroll",e),()=>document.removeEventListener("scroll",e)},[l]),(0,s.jsx)("header",{className:(0,a.cn)(!t&&"fixed left-0 w-[100vw]","z-50 border-b border-tertiary bg-primary-alt",!t&&l&&"motion-reduce:transition-none"),ref:o,children:r})}},17715:()=>{},17784:()=>{},28763:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var s=r(1785),n=r(72167);r(16685);var a=r(74257);let o=(0,n.F)("inline-flex items-center rounded-sm border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden",{variants:{variant:{project:"border-info bg-secondary text-secondary-alt hover:bg-secondary/80",documentation:"border-secondary-alt bg-secondary text-secondary-alt hover:bg-secondary/80",content:"border-warning bg-secondary text-secondary-alt hover:bg-secondary/80"}}});function l(e){let{className:t,variant:r,...n}=e;return(0,s.jsx)("div",{className:(0,a.cn)(o({variant:r}),t),...n})}},35853:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var s=r(1785);function n(e){let{width:t,height:r,className:n}=e;return(0,s.jsxs)("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:r,className:n,children:[(0,s.jsx)("title",{children:"GitHub"}),(0,s.jsx)("path",{fill:"currentColor",d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]})}},46867:(e,t,r)=>{"use strict";r.d(t,{default:()=>N});var s=r(1785),n=r(15682),a=r(16685),o=r(73897),l=r(81841),c=r(98841),i=r(65355),u=r(32944),d=r(80075),h=r(41850),f=r(74257),p=r(27156),m=r(56736),x=r(3807),v=r(22254),y=r(28763);function g(e){var t;let{result:r}=e,n=(0,p.c)("ProjectTypes"),a=(0,p.c)("SearchResultType");return(0,s.jsxs)(m.k,{href:r.href,className:(0,f.cn)("z-50 flex cursor-pointer flex-row gap-2 bg-primary-alt px-1 py-1.5 text-primary","first:rounded-t-sm last:rounded-b-sm hover:bg-tertiary"),children:[(0,s.jsx)("div",{className:"shrink-0 rounded-xs p-1",children:(0,s.jsx)(o.default,{src:null==(t=r.icon_asset)?void 0:t.src,width:48,height:48,alt:r.project_id,fbIcon:l.A,fixedSize:!0})}),(0,s.jsxs)("div",{className:"flex w-full flex-col justify-between overflow-hidden py-0.5 text-ellipsis [&_span]:overflow-hidden [&_span]:text-ellipsis",children:[(0,s.jsx)("span",{children:r.title}),"project"==r.entry_type?(0,s.jsx)("span",{className:"text-secondary",children:n(r.project_type)}):(0,s.jsx)("div",{className:"flex flex-row gap-2",children:(0,s.jsx)("span",{className:"text-secondary",children:r.project_name})})]}),(0,s.jsx)("div",{className:"mx-1",children:(0,s.jsx)(y.A,{variant:r.entry_type,children:a(r.entry_type)})})]})}function b(){let e=(0,p.c)("DocsSearchBar");return(0,s.jsx)("div",{className:"z-50 flex h-16 flex-row items-center justify-center gap-2 bg-primary-alt px-1 py-1.5 font-light text-secondary first:rounded-t-sm last:rounded-b-sm",children:e("no_results")})}function j(){let e=(0,p.c)("DocsSearchBar");return(0,s.jsxs)("div",{className:"z-50 flex h-16 flex-row items-center justify-center gap-2 bg-primary-alt px-1 py-1.5 font-light text-secondary first:rounded-t-sm last:rounded-b-sm",children:[(0,s.jsx)(c.A,{className:"mr-2 h-5 w-5 animate-spin"}),e("loading")]})}function w(e){let{canChangeScope:t,visible:r,total:n}=e,a=(0,p.c)("DocsSearchBar");return(0,s.jsxs)("div",{className:(0,f.cn)("flex w-full flex-row items-center justify-between bg-primary-alt p-2 text-secondary",r>0?"rounded-b-sm":"rounded-sm"),children:[(0,s.jsx)("div",{className:"text-sm font-light",children:a.rich("results",{highlight:e=>(0,s.jsx)("span",{className:"font-normal",children:e}),count:r,total:n})}),(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[t&&(0,s.jsx)("span",{className:"text-sm",children:a.rich("switch",{kbd:e=>(0,s.jsx)("kbd",{children:e})})}),(0,s.jsx)("span",{className:"text-sm",children:a.rich("close",{kbd:e=>(0,s.jsx)("kbd",{children:e})})})]})]})}function N(e){var t,r,o;let{locale:l}=e,c=(0,p.c)("DocsSearchBar"),[m,y]=(0,a.useState)(""),[N,_]=(0,a.useState)(null),[S,A]=(0,a.useState)(!1),{project:E}=(0,a.useContext)(v.o),[C,k]=(0,a.useState)(null!=E),B=(0,n.YQ)(async e=>{let t=!0;setTimeout(()=>{m&&t&&A(!0)},500),_(await x.A.searchWiki(e,l,C&&E?E.id:null)),t=!1,A(!1)},200),[P,L]=(0,a.useState)(!1);(0,a.useEffect)(()=>{k(null!=E)},[E]),(0,a.useEffect)(()=>{m.length>0&&B(m),B.flush()},[C]);let R=(0,a.useRef)(null),T=(0,h.usePathname)();(0,a.useEffect)(()=>{var e;null==(e=R.current)||e.blur()},[T]);let[z,I]=(0,a.useState)(!0),M=()=>{"visible"===document.visibilityState?setTimeout(()=>I(!0),500):I(!1)};(0,a.useLayoutEffect)(()=>(document.addEventListener("visibilitychange",M),()=>document.removeEventListener("visibilitychange",M)),[]);let D=C?i.A:u.A;return(0,s.jsxs)("div",{className:(0,f.cn)("relative mx-2 hidden w-full transition-none duration-200 ease-[cubic-bezier(.27,.17,.43,.98)]",z&&"md:focus-within:transition-[max-width] lg:transition-[max-width]","md:flex md:max-w-sm md:focus-within:fixed md:focus-within:left-1/2 md:focus-within:max-w-lg md:focus-within:-translate-x-1/2 md:focus-within:shadow-lg","lg:max-w-[40rem] lg:focus-within:static lg:focus-within:flex lg:focus-within:max-w-2xl lg:focus-within:translate-x-0"),children:[(0,s.jsxs)("div",{className:"relative w-full",children:[(0,s.jsx)(d.A,{className:"inset absolute top-1/2 left-2 h-4 w-4 -translate-y-1/2 text-neutral-500"}),E&&P&&(0,s.jsxs)("div",{className:(0,f.cn)("inset absolute top-1/2 left-8 -translate-y-1/2 rounded-sm","flex flex-row items-center gap-1","border border-secondary bg-secondary px-1 py-[1.5px]"),children:[(0,s.jsx)(D,{className:"size-3.5 stroke-2 text-primary"}),(0,s.jsx)("span",{className:"text-xs",children:c("scope.".concat(C?"local":"global"))})]}),(0,s.jsx)("input",{type:"text",value:m,ref:R,className:(0,f.cn)("w-full cursor-pointer rounded-sm border border-secondary bg-primary-alt px-8 py-[0.2rem]","text-center text-sm text-ellipsis placeholder:text-neutral-500","focus:cursor-text focus:border-secondary-alt focus:shadow-md focus:outline-none"),onChange:e=>(e=>{if(y(e),!e||0===e.length){_(null),A(!1);return}return B(e)})(e.target.value),placeholder:c("placeholder"),onFocus:()=>{L(!0),_(null),document.querySelectorAll("html, body").forEach(e=>e.classList.add("scrollLock"))},onBlur:()=>{L(!1),A(!1),y(""),document.querySelectorAll("html, body").forEach(e=>e.classList.remove("scrollLock"))},onKeyDown:e=>{null!=E&&"Tab"===e.key&&(e.preventDefault(),k(!C)),"Escape"===e.key&&e.target.blur()}})]}),P&&(0,s.jsxs)("div",{onMouseDown:e=>e.preventDefault(),className:(0,f.cn)("absolute top-8 flex w-full flex-col divide-y divide-tertiary rounded-sm border","border-secondary bg-primary-alt shadow-lg"),children:[S&&(0,s.jsx)(j,{}),!S&&N&&N.hits.map(e=>(0,s.jsx)(g,{result:e},e.id)),!S&&N&&0===N.hits.length&&(0,s.jsx)(b,{}),(0,s.jsx)(w,{canChangeScope:null!=E,visible:null!=(r=null==N||null==(t=N.hits)?void 0:t.length)?r:0,total:null!=(o=null==N?void 0:N.total)?o:0})]})]})}},48617:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var s=r(1785),n=r(16685),a=r(51979),o=r(27156);function l(){let e=(0,o.c)("ManageCookiesButton"),t=(0,n.useContext)(a.ww);return t&&t.enableCookieManagement?(0,s.jsx)("button",{type:"button","data-cc":"show-preferencesModal",className:"text-sm",children:e("text")}):null}},51161:(e,t,r)=>{"use strict";r.d(t,{$:()=>i});var s=r(1785),n=r(16685),a=r(83849),o=r(72167),l=r(74257);let c=(0,o.F)("inline-flex items-center justify-center rounded-sm text-sm font-medium whitespace-nowrap ring-offset-background transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"border border-primary bg-primary text-primary hover:bg-secondary/90",destructive:"border-destructive-secondary border bg-primary bg-secondary font-semibold text-destructive hover:bg-secondary/80 hover:text-destructive/90 data-[pending=true]:text-destructive/90",destructiveSecondary:"text-primary-alt hover:text-primary-alt/90 bg-destructive",outline:"border-quaternary hover:text-primary-alt border bg-primary hover:bg-secondary",secondary:"text-secondary-alt bg-secondary hover:bg-secondary/80",ghost:"hover:text-primary-alt hover:bg-secondary",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-sm px-3",lg:"h-11 rounded-sm px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),i=n.forwardRef((e,t)=>{let{className:r,variant:n,size:o,asChild:i=!1,...u}=e,d=i?a.DX:"button";return(0,s.jsx)(d,{className:(0,l.cn)(c({variant:n,size:o,className:r})),ref:t,...u})});i.displayName="Button"},51979:(e,t,r)=>{"use strict";r.d(t,{GL:()=>i,ww:()=>c,YE:()=>u,default:()=>d});var s=r(1785),n=r(16685);r(89531);var a=r(59049);r(45389);let o={userRequiresCookieConsent:function(){return!1}};var l=r(27156);let c=(0,n.createContext)(null),i="experience",u="yt_embeds";function d(e){let{children:t}=e,[r,d]=(0,n.useState)(!0),[h,f]=(0,n.useState)(!1),p=(0,l.c)("CookieConsent");function m(){f(a.tj(u,i))}return(0,n.useEffect)(()=>{let e=o.userRequiresCookieConsent();d(e),e&&a.eF({revision:1,guiOptions:{consentModal:{layout:"box inline"}},onFirstConsent:()=>{m()},onChange:()=>{m()},categories:{necessary:{enabled:!0,readOnly:!0},[i]:{services:{[u]:{label:p("sections.experience.services.embeds"),onAccept:()=>f(!0),onReject:()=>f(!1)}}}},language:{default:"en",translations:{en:{consentModal:{title:p("popup.title"),description:p("popup.description"),acceptAllBtn:p("actions.accept_all"),acceptNecessaryBtn:p("actions.reject_all"),showPreferencesBtn:p("popup.show_preferences")},preferencesModal:{title:p("modal.title"),acceptAllBtn:p("actions.accept_all"),acceptNecessaryBtn:p("actions.reject_all"),savePreferencesBtn:p("modal.save"),closeIconLabel:p("modal.close"),sections:[{title:p("sections.summary.title"),description:p("sections.summary.description")},{title:p("sections.necessary.title"),description:p("sections.necessary.description"),linkedCategory:"necessary"},{title:p("sections.experience.title"),description:p("sections.experience.description"),linkedCategory:"experience"},{title:p("sections.more_info.title"),description:p.raw("sections.more_info.description")}]}}}}})},[]),(0,s.jsx)(c.Provider,{value:{enableCookieManagement:r,hasConsentToEmbeddedVideos:h},children:t})}},56736:(e,t,r)=>{"use strict";r.d(t,{k:()=>l});var s=r(1785),n=r(16685),a=r(80233),o=r.n(a);let l=(0,n.forwardRef)(function(e,t){let{prefetch:r=!1,...n}=e;return(0,s.jsx)(o(),{prefetch:r,...n,ref:t})})},63039:(e,t,r)=>{"use strict";r.d(t,{default:()=>i});var s=r(1785),n=r(67799),a=r(74257),o=r(51161),l=r(35853);function c(e){let{width:t,height:r,className:n}=e;return(0,s.jsx)("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",width:t||24,height:r||24,className:n,viewBox:"0 0 24 24",children:(0,s.jsx)("path",{fill:"currentColor",d:"M19.27 5.33C17.94 4.71 16.5 4.26 15 4a.1.1 0 0 0-.07.03c-.18.33-.39.76-.53 1.09a16.1 16.1 0 0 0-4.8 0c-.14-.34-.35-.76-.54-1.09c-.01-.02-.04-.03-.07-.03c-1.5.26-2.93.71-4.27 1.33c-.01 0-.02.01-.03.02c-2.72 4.07-3.47 8.03-3.1 11.95c0 .02.01.04.03.05c1.8 1.32 3.53 2.12 5.24 2.65c.03.01.06 0 .07-.02c.4-.55.76-1.13 1.07-1.74c.02-.04 0-.08-.04-.09c-.57-.22-1.11-.48-1.64-.78c-.04-.02-.04-.08-.01-.11c.11-.08.22-.17.33-.25c.02-.02.05-.02.07-.01c3.44 1.57 7.15 1.57 10.55 0c.02-.01.05-.01.07.01c.11.09.22.17.33.26c.04.03.04.09-.01.11c-.52.31-1.07.56-1.64.78c-.04.01-.05.06-.04.09c.32.61.68 1.19 1.07 1.74c.03.01.06.02.09.01c1.72-.53 3.45-1.33 5.25-2.65c.02-.01.03-.03.03-.05c.44-4.53-.73-8.46-3.1-11.95c-.01-.01-.02-.02-.04-.02M8.52 14.91c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.84 2.12-1.89 2.12m6.97 0c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.83 2.12-1.89 2.12"})})}function i(e){let{enableSharing:t,shareData:r,large:a}=e,i="undefined"!=typeof navigator&&"function"==typeof navigator.share,d=a?"h-5 w-5":"h-4 w-4 sm:h-5 sm:w-5";return(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 sm:gap-4",children:[(0,s.jsx)(u,{href:"https://github.com/Sinytra",large:a,icon:(0,s.jsx)(l.A,{className:d})}),(0,s.jsx)(u,{href:"https://discord.sinytra.org",large:a,icon:(0,s.jsx)(c,{className:d})}),t&&i&&(0,s.jsxs)(o.$,{onClick:()=>{navigator.share?navigator.share(r).catch(e=>{console.error("Error sharing:",e)}):alert("Sharing is not supported on this browser.")},size:"sm",className:"flex h-8 w-8 items-center justify-center gap-2 sm:h-10 sm:w-auto sm:justify-start sm:px-4",children:[(0,s.jsx)(n.A,{className:"h-5 w-5"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Share"})]})]})}function u(e){let{href:t,icon:r,large:n,className:l}=e;return(0,s.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:(0,s.jsx)(o.$,{variant:"outline",size:"icon",className:(0,a.cn)(l,n?"h-10 w-10":"h-8 w-8 sm:h-10 sm:w-10"),children:r})})}},66909:(e,t,r)=>{"use strict";r.d(t,{default:()=>c});var s=r(1785),n=r(24782),a=r(17289),o=r(16685),l=r(41850);function c(e){let{children:t}=e,[r,c]=(0,o.useState)(!1),i=(0,l.usePathname)();return(0,o.useEffect)(()=>{c(!1)},[i]),(0,s.jsxs)("div",{className:"sm:hidden",children:[(0,s.jsx)(n.A,{active:r,setOpen:c}),(0,s.jsx)(a.A,{className:"top-nav-height bg-primary",isVisible:r,children:t})]})}},68717:(e,t,r)=>{"use strict";function s(e,t){if(null==t)throw Error("Missing environment variable ".concat(e));return t}function n(e,t){let r=new URLSearchParams;if(e){for(let s in e)if(null!=e[s]){let n=t?t(s,e[s]):e[s];n&&r.set(s,n)}}return r.toString()}r.d(t,{cT:()=>n,no:()=>s}),r(18398)},68950:(e,t,r)=>{"use strict";r.d(t,{Toaster:()=>a});var s=r(1785),n=r(56243);let a=e=>{let{...t}=e;return(0,s.jsx)(n.l$,{theme:"dark",className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-primary group-[.toaster]:text-primary group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-secondary",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-inverse",cancelButton:"group-[.toast]:bg-primary-alt group-[.toast]:text-secondary"}},...t})}},73897:(e,t,r)=>{"use strict";r.d(t,{default:()=>c});var s=r(1785),n=r(16685),a=r(18604),o=r(74257),l=r(64153);function c(e){let{src:t,alt:r,width:c,height:i,fbWidth:u,fbHeight:d,className:h,title:f,strokeWidth:p=1,fixedSize:m,wrapper:x,fbIcon:v=a.A,fallback:y=(0,s.jsx)(v,{strokeWidth:p,className:(0,o.cn)(h,"text-secondary opacity-20"),width:u||c,height:d||i}),...g}=e,[b,j]=(0,n.useState)(!1);return(0,s.jsxs)("span",{title:f,style:m?{width:"".concat(c,"px"),height:"".concat(i,"px")}:void 0,...x,className:(0,o.cn)("shrink-0 overflow-hidden",null==x?void 0:x.className),children:[t&&!b&&(0,s.jsx)(l.default,{src:t,alt:r||"",width:c,height:i,className:h,unoptimized:!0,onError:()=>j(!0),...g}),(!t||b)&&y]})}},74257:(e,t,r)=>{"use strict";r.d(t,{cn:()=>a});var s=r(49663),n=r(24915);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.QP)((0,s.$)(t))}},74922:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,o:()=>s});let s="minecraft";function n(e){if(0===e.length)return null;if(e.includes(":")){let t=e.split(":");return{namespace:t[0],path:t[1]}}return{namespace:"minecraft",path:e}}let a={toString:function(e){return"".concat(e.namespace,":").concat(e.path)},parse:n,extractPath:function(e){var t,r;return null!=(r=null==(t=n(e))?void 0:t.path)?r:e}}},84930:(e,t,r)=>{"use strict";r.d(t,{default:()=>A});var s=r(1785),n=r(27156),a=r(81841),o=r(98841),l=r(65355),c=r(32944),i=r(44384),u=r(80075),d=r(51161),h=r(16685),f=r(73897),p=r(15682),m=r(88272),x=r(41850),v=r(56736),y=r(3807),g=r(22254),b=r(74257),j=r(28763);function w(e){var t;let{result:r}=e,o=(0,n.c)("ProjectTypes"),l=(0,n.c)("SearchResultType");return(0,s.jsxs)(v.k,{href:r.href,className:"z-50 flex cursor-pointer flex-row gap-2 rounded-xs border border-neutral-700 bg-primary-alt px-1 py-1.5 text-primary",children:[(0,s.jsx)("div",{className:"shrink-0 rounded-xs p-1",children:(0,s.jsx)(f.default,{src:null==(t=r.icon_asset)?void 0:t.src,width:48,height:48,alt:r.project_id,fbIcon:a.A,fixedSize:!0})}),(0,s.jsxs)("div",{className:"flex w-full flex-col justify-between overflow-hidden py-0.5 text-ellipsis [&_span]:overflow-hidden [&_span]:text-ellipsis",children:[(0,s.jsx)("span",{children:r.title}),"project"==r.entry_type?(0,s.jsx)("span",{className:"text-secondary",children:(0,s.jsx)("span",{className:"text-secondary",children:o(r.project_type)})}):(0,s.jsx)("div",{className:"flex flex-col gap-1",children:(0,s.jsx)("span",{className:"text-secondary",children:r.project_name})})]}),(0,s.jsx)("div",{className:"mx-1",children:(0,s.jsx)(j.A,{variant:r.entry_type,children:l(r.entry_type)})})]})}function N(){let e=(0,n.c)("DocsSearchBar");return(0,s.jsxs)("div",{className:"z-50 flex h-16 flex-row items-center justify-center gap-2 rounded-xs border border-neutral-700 bg-primary-alt px-1 py-1.5 text-secondary",children:[(0,s.jsx)(o.A,{className:"mr-2 h-5 w-5 animate-spin"}),e("loading")]})}function _(){let e=(0,n.c)("DocsSearchBar");return(0,s.jsx)("div",{className:"z-50 flex h-16 flex-row items-center justify-center gap-2 rounded-xs border border-neutral-700 bg-primary-alt px-1 py-1.5 text-secondary",children:e("no_results")})}function S(e){let{locale:t,isOpen:r,setOpen:a}=e,o=(0,n.c)("DocsSearchBar"),u=(0,h.useRef)(null),[d,f]=(0,h.useState)(""),[x,v]=(0,h.useState)(null),[j,S]=(0,h.useState)(!1),{project:A}=(0,h.useContext)(g.o),[E,C]=(0,h.useState)(null!=A);(0,h.useEffect)(()=>{f(""),v(null),S(!1)},[r]);let k=(0,p.YQ)(async e=>{let r=!0;setTimeout(()=>{d&&r&&S(!0)},500),v(await y.A.searchWiki(e,t,E&&A?A.id:null)),r=!1,S(!1)},200);(0,h.useEffect)(()=>{C(null!=A)},[A]),(0,h.useEffect)(()=>{d.length>0&&k(d),k.flush()},[E]);let B=E?l.A:c.A;return(0,s.jsx)(m.A,{nodeRef:u,in:r,timeout:200,classNames:"fade",unmountOnExit:!0,children:(0,s.jsx)("div",{ref:u,className:"fixed top-0 right-0 bottom-0 left-0 z-50 h-[100vh] w-full overflow-hidden bg-primary",children:(0,s.jsxs)("div",{className:"innerFadeContainer flex flex-col gap-4 p-4",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("button",{onClick:()=>a(!1),children:(0,s.jsx)(i.A,{className:"absolute top-1/2 left-2 h-5 w-5 -translate-y-1/2 text-secondary"})}),A&&(0,s.jsxs)("button",{className:(0,b.cn)("inset absolute top-1/2 right-2 -translate-y-1/2 rounded-sm","flex flex-row items-center gap-1","border border-secondary bg-secondary px-1.5 py-1"),onClick:()=>C(!E),children:[(0,s.jsx)(B,{className:"size-3.5 stroke-2 text-primary"}),(0,s.jsx)("span",{className:"text-xs",children:o("scope.".concat(E?"local":"global"))})]}),(0,s.jsx)("input",{type:"text",value:d,onChange:e=>(e=>{if(f(e),!e||0===e.length){v(null),S(!1);return}return k(e)})(e.target.value),className:"w-full cursor-pointer rounded-xs border border-neutral-700 bg-primary-alt p-2 px-8 text-center text-sm text-ellipsis placeholder:text-neutral-500 focus:cursor-text focus:outline-1 focus:outline-secondary",placeholder:o("placeholder"),autoFocus:!0})]}),j&&(0,s.jsx)(N,{}),!j&&x&&(x.hits.length>0?(0,s.jsxs)("div",{className:"slim-scrollbar flex h-[90vh] flex-col gap-2 overflow-y-auto",children:[...x.hits.map(e=>(0,s.jsx)(w,{result:e},e.id))]}):(0,s.jsx)(_,{}))]})})})}function A(e){let{locale:t}=e,[r,n]=(0,h.useState)(!1),a=(0,x.usePathname)();return(0,h.useEffect)(()=>{n(!1)},[a]),(0,h.useEffect)(()=>{r?document.querySelectorAll("html, body").forEach(e=>e.classList.add("navScrollLock")):document.querySelectorAll("html, body").forEach(e=>e.classList.remove("navScrollLock"))},[r]),(0,s.jsxs)("div",{className:"sm:hidden",children:[(0,s.jsx)(d.$,{variant:"ghost",size:"icon",onClick:()=>n(!r),children:(0,s.jsx)(u.A,{className:"h-4 w-4 text-[var(--vp-c-text-1)]"})}),(0,s.jsx)(S,{isOpen:r,setOpen:n,locale:t})]})}},88254:(e,t,r)=>{"use strict";r.d(t,{M$:()=>c,MZ:()=>n,cT:()=>l,gZ:()=>o,sw:()=>a});var s=r(74922);function n(e,t){var r;return null!=(r=l(t.id))?r:null!=t.page_ref?a(t.page_ref,e):null}function a(e,t){let r="slug"in t?t.slug:t.id;return"/".concat(t.locale,"/project/").concat(r,"/").concat(t.version,"/content/").concat(e)}function o(e,t){return"/".concat(e,"/project/").concat(t,"/latest")}function l(e){let t=s.A.parse(e);return(null==t?void 0:t.namespace)===s.o&&e.startsWith(s.o+":")?"https://minecraft.wiki/w/".concat(t.path):null}function c(e,t){return"/".concat(t.locale,"/project/").concat(t.id,"/").concat(t.version,"/docs/").concat(e)}},88523:()=>{}},e=>{e.O(0,[510,783,233,90,743,226,944,26,639,114,433,77,412,563,358],()=>e(e.s=6611)),_N_E=e.O()}]);
|