Files
ThingsGateway/doc/build/assets/js/1a4e3797.f4d87afb.js
Kimdiego2098 d85813c229 更新文档
2024-01-21 16:07:56 +08:00

1 line
4.7 KiB
JavaScript

"use strict";(self.webpackChunkthingsgateway=self.webpackChunkthingsgateway||[]).push([[7920],{2027:(e,t,a)=>{a.r(t),a.d(t,{default:()=>$});var r=a(7294),n=a(2263),l=a(179),s=a(5742),c=a(9960),u=a(5999);const o=["zero","one","two","few","many","other"];function m(e){return o.filter((t=>e.includes(t)))}const h={locale:"en",pluralForms:m(["one","other"]),select:e=>1===e?"one":"other"};function i(){const{i18n:{currentLocale:e}}=(0,n.Z)();return(0,r.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:m(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),h}}),[e])}function p(){const e=i();return{selectMessage:(t,a)=>function(e,t,a){const r=e.split("|");if(1===r.length)return r[0];r.length>a.pluralForms.length&&console.error(`For locale=${a.locale}, a maximum of ${a.pluralForms.length} plural forms are expected (${a.pluralForms.join(",")}), but the message contains ${r.length}: ${e}`);const n=a.select(t),l=a.pluralForms.indexOf(n);return r[Math.min(l,r.length-1)]}(a,t,e)}}var g=a(6550),d=a(412);const f=function(){const e=(0,g.k6)(),t=(0,g.TH)(),{siteConfig:{baseUrl:a}}=(0,n.Z)(),r=d.Z.canUseDOM?new URLSearchParams(t.search):null,l=r?.get("q")||"",s=r?.get("ctx")||"",c=r?.get("version")||"",u=e=>{const a=new URLSearchParams(t.search);return e?a.set("q",e):a.delete("q"),a};return{searchValue:l,searchContext:s,searchVersion:c,updateSearchPath:t=>{const a=u(t);e.replace({search:a.toString()})},generateSearchPageLink:e=>{const t=u(e);return`${a}search?${t.toString()}`}}};var y=a(22),E=a(8202),S=a(2539),I=a(726),w=a(1073),R=a(311),P=a(3926),b=a(1029);const v={searchQueryInput:"searchQueryInput_CFBF",searchResultItem:"searchResultItem_U687",searchResultItemPath:"searchResultItemPath_uIbk",searchResultItemSummary:"searchResultItemSummary_oZHr"};function F(){const{siteConfig:{baseUrl:e}}=(0,n.Z)(),{selectMessage:t}=p(),{searchValue:a,searchContext:l,searchVersion:c,updateSearchPath:o}=f(),[m,h]=(0,r.useState)(a),[i,g]=(0,r.useState)(),[d,S]=(0,r.useState)(),I=`${e}${c}`,w=(0,r.useMemo)((()=>m?(0,u.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:m}):(0,u.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})),[m]);(0,r.useEffect)((()=>{o(m),i&&(m?i(m,(e=>{S(e)})):S(void 0))}),[m,i]);const P=(0,r.useCallback)((e=>{h(e.target.value)}),[]);return(0,r.useEffect)((()=>{a&&a!==m&&h(a)}),[a]),(0,r.useEffect)((()=>{!async function(){const{wrappedIndexes:e,zhDictionary:t}=await(0,y.w)(I,l);g((()=>(0,E.v)(e,t,100)))}()}),[l,I]),r.createElement(r.Fragment,null,r.createElement(s.Z,null,r.createElement("meta",{property:"robots",content:"noindex, follow"}),r.createElement("title",null,w)),r.createElement("div",{className:"container margin-vert--lg"},r.createElement("h1",null,w),r.createElement("input",{type:"search",name:"q",className:v.searchQueryInput,"aria-label":"Search",onChange:P,value:m,autoComplete:"off",autoFocus:!0}),!i&&m&&r.createElement("div",null,r.createElement(R.Z,null)),d&&(d.length>0?r.createElement("p",null,t(d.length,(0,u.I)({id:"theme.SearchPage.documentsFound.plurals",message:"1 document found|{count} documents found",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)'},{count:d.length}))):r.createElement("p",null,(0,u.I)({id:"theme.SearchPage.noResultsText",message:"No documents were found",description:"The paragraph for empty search result"}))),r.createElement("section",null,d&&d.map((e=>r.createElement(C,{key:e.document.i,searchResult:e}))))))}function C(e){let{searchResult:{document:t,type:a,page:n,tokens:l,metadata:s}}=e;const u=0===a,o=2===a,m=(u?t.b:n.b).slice(),h=o?t.s:t.t;u||m.push(n.t);let i="";if(b.vc&&l.length>0){const e=new URLSearchParams;for(const t of l)e.append("_highlight",t);i=`?${e.toString()}`}return r.createElement("article",{className:v.searchResultItem},r.createElement("h2",null,r.createElement(c.Z,{to:t.u+i+(t.h||""),dangerouslySetInnerHTML:{__html:o?(0,S.C)(h,l):(0,I.o)(h,(0,w.m)(s,"t"),l,100)}})),m.length>0&&r.createElement("p",{className:v.searchResultItemPath},(0,P.e)(m)),o&&r.createElement("p",{className:v.searchResultItemSummary,dangerouslySetInnerHTML:{__html:(0,I.o)(t.t,(0,w.m)(s,"t"),l,100)}}))}const $=function(){return r.createElement(l.Z,null,r.createElement(F,null))}}}]);