var e,t=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,c=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;import{_ as l,p as u,c as s,s as f,i as p,a as m,l as h,d,b as v,e as y,g as _}from"./iframe-router.fef98aab.js";import{r as g,c as b,n as O,a as S,o as w,F as E,b as j,d as P,t as k,e as I,f as C,g as D,h as N,w as A,T as x,i as T,j as L,v as H,p as R,k as M,l as q,m as V,q as U,s as F}from"./vue-libs.7d12dd47.js";const $=["href","innerHTML"],B=["innerHTML"];var z=l({name:"VanDocNavLink",props:{base:String,item:Object},computed:{itemName(){const e=(this.item.title||this.item.name).split(" ");return`${e[0]} ${e.slice(1).join(" ")}`},path(){return`${this.base}${this.item.path}`},active(){return this.$route.path===this.path||"home"===this.item.path&&this.$route.path===this.base}},watch:{active(){this.scrollIntoView()}},mounted(){this.scrollIntoView()},methods:{scrollIntoView(){this.active&&this.$el&&this.$el.scrollIntoViewIfNeeded&&this.$el.scrollIntoViewIfNeeded()}}},[["render",function(e,t,n,r,o,a){const i=g("router-link");return n.item.path?(w(),b(i,{key:0,class:O({active:a.active}),to:a.path,innerHTML:a.itemName},null,8,["class","to","innerHTML"])):n.item.link?(w(),S("a",{key:1,href:n.item.link,innerHTML:a.itemName},null,8,$)):(w(),S("a",{key:2,innerHTML:a.itemName},null,8,B))}]]);const K={name:"VanDocNav",components:{[z.name]:z},props:{lang:String,navConfig:Array},data:()=>({top:64,bottom:0}),computed:{style(){return{top:this.top+"px",bottom:this.bottom+"px"}},base(){return this.lang?`/${this.lang}/`:"/"}},created(){window.addEventListener("scroll",this.onScroll),this.onScroll()},methods:{onScroll(){const{pageYOffset:e}=window;this.top=Math.max(0,64-e)}}},W={class:"van-doc-nav__title"};var J=l(K,[["render",function(e,t,n,r,o,a){const i=g("van-doc-nav-link");return w(),S("div",{class:"van-doc-nav",style:D(a.style)},[(w(!0),S(E,null,j(n.navConfig,((e,t)=>(w(),S("div",{class:"van-doc-nav__group",key:t},[P("div",W,k(e.title),1),e.items?(w(!0),S(E,{key:0},j(e.items,((e,t)=>(w(),S("div",{key:t,class:"van-doc-nav__item"},[I(i,{item:e,base:a.base},null,8,["item","base"])])))),128)):C("v-if",!0)])))),128))],4)}]]); /*! @docsearch/js 3.0.0-alpha.40 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ function Q(e){return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(){return(G=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n3)for(n=[n],a=3;a0?de(m.type,m.props,m.key,null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(p=y[s])||p&&m.key==p.key&&m.type===p.type)y[s]=void 0;else for(f=0;f<_;f++){if((p=y[f])&&m.key==p.key&&m.type===p.type){y[f]=void 0;break}p=null}De(e,m,p=p||ue,o,a,i,c,l,u),h=m.__e,(f=m.ref)&&p.ref!=f&&(v||(v=[]),p.ref&&v.push(p.ref,null,m),v.push(f,m.__c||h,m)),null!=h?(null==d&&(d=h),"function"==typeof m.type&&null!=m.__k&&m.__k===p.__k?m.__d=l=we(m,l,e):l=je(e,m,p,y,h,l),u||"option"!==n.type?"function"==typeof n.type&&(n.__d=l):e.value=""):l&&p.__e==l&&l.parentNode!=e&&(l=_e(p))}for(n.__e=d,s=_;s--;)null!=y[s]&&("function"==typeof n.type&&null!=y[s].__e&&y[s].__e==n.__d&&(n.__d=_e(r,s+1)),xe(y[s],y[s]));if(v)for(s=0;s3)for(n=[n],a=3;a=n.__.length&&n.__.push({}),n.__[e]}function Qe(e,t,n){var r=Je(Me++,2);return r.t=e,r.__c||(r.__=[n?n(t):rt(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}],r.__c=qe),r.__}function Ye(e,t){var n=Je(Me++,4);!oe.__s&&nt(n.__H,t)&&(n.__=e,n.__H=t,qe.__h.push(n))}function Ge(e,t){var n=Je(Me++,7);return nt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ze(){Fe.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(et),e.__H.__h.forEach(tt),e.__H.__h=[]}catch(t){e.__H.__h=[],oe.__e(t,e.__v)}})),Fe=[]}oe.__b=function(e){qe=null,$e&&$e(e)},oe.__r=function(e){Be&&Be(e),Me=0;var t=(qe=e.__c).__H;t&&(t.__h.forEach(et),t.__h.forEach(tt),t.__h=[])},oe.diffed=function(e){ze&&ze(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==Fe.push(t)&&Ve===oe.requestAnimationFrame||((Ve=oe.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),Xe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Xe&&(t=requestAnimationFrame(n))})(Ze)),qe=void 0},oe.__c=function(e,t){t.some((function(e){try{e.__h.forEach(et),e.__h=e.__h.filter((function(e){return!e.__||tt(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],oe.__e(n,e.__v)}})),Ke&&Ke(e,t)},oe.unmount=function(e){We&&We(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(et)}catch(n){oe.__e(n,t.__v)}};var Xe="function"==typeof requestAnimationFrame;function et(e){var t=qe;"function"==typeof e.__c&&e.__c(),qe=t}function tt(e){var t=qe;e.__c=e.__(),qe=t}function nt(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function rt(e,t){return"function"==typeof t?t(e):t}function ot(e,t){for(var n in t)e[n]=t[n];return e}function at(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function it(e){this.props=e}(it.prototype=new ye).isPureReactComponent=!0,it.prototype.shouldComponentUpdate=function(e,t){return at(this.props,e)||at(this.state,t)};var ct=oe.__b;oe.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ct&&ct(e)};var lt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,ut=function(e,t){return null==e?null:Ee(Ee(e).map(t))},st={map:ut,forEach:ut,count:function(e){return e?Ee(e).length:0},only:function(e){var t=Ee(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:Ee},ft=oe.__e;function pt(){this.__u=0,this.t=null,this.__b=null}function mt(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function ht(){this.u=null,this.o=null}oe.__e=function(e,t,n){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);ft(e,t,n)},(pt.prototype=new ye).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=mt(r.__v),a=!1,i=function(){a||(a=!0,n.componentWillUnmount=n.__c,o?o(c):c())};n.__c=n.componentWillUnmount,n.componentWillUnmount=function(){i(),n.__c&&n.__c()};var c=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(i,i)},pt.prototype.componentWillUnmount=function(){this.t=[]},pt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=ot({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__e&&he(ve,null,e.fallback);return o&&(o.__h=null),[he(ve,null,t.__e?null:e.children),o]};var dt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),Le(he(vt,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function _t(e,t){return he(yt,{__v:e,i:t})}(ht.prototype=new ye).__e=function(e){var t=this,n=mt(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),dt(t,e,r)):o()};n?n(a):a()}},ht.prototype.render=function(e){this.u=null,this.o=new Map;var t=Ee(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ht.prototype.componentDidUpdate=ht.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){dt(e,n,t)}))};var gt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,bt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ot=function(e){return("undefined"!=typeof Symbol&&"symbol"==Q(Symbol())?/fil|che|rad/i:/fil|che|ra/i).test(e)};function St(e,t,n){return null==t.__k&&(t.textContent=""),Le(e,t),"function"==typeof n&&n(),e?e.__c:null}ye.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(ye.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var wt=oe.event;function Et(){}function jt(){return this.cancelBubble}function Pt(){return this.defaultPrevented}oe.event=function(e){return wt&&(e=wt(e)),e.persist=Et,e.isPropagationStopped=jt,e.isDefaultPrevented=Pt,e.nativeEvent=e};var kt,It={configurable:!0,get:function(){return this.class}},Ct=oe.vnode;oe.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){for(var o in r={},n){var a=n[o];"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!Ot(n.type)?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():bt.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=Ee(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=Ee(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r}t&&n.class!=n.className&&(It.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",It)),e.$$typeof=gt,Ct&&Ct(e)};var Dt=oe.__r;oe.__r=function(e){Dt&&Dt(e),kt=e.__c};var Nt={ReactCurrentDispatcher:{current:{readContext:function(e){return kt.__n[e.__c].props.value}}}};function At(e){return!!e&&e.$$typeof===gt}"object"==("undefined"==typeof performance?"undefined":Q(performance))&&"function"==typeof performance.now&&performance.now.bind(performance);var xt={useState:function(e){return Ue=1,Qe(rt,e)},useReducer:Qe,useEffect:function(e,t){var n=Je(Me++,3);!oe.__s&&nt(n.__H,t)&&(n.__=e,n.__H=t,qe.__H.__h.push(n))},useLayoutEffect:Ye,useRef:function(e){return Ue=5,Ge((function(){return{current:e}}),[])},useImperativeHandle:function(e,t,n){Ue=6,Ye((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))},useMemo:Ge,useCallback:function(e,t){return Ue=8,Ge((function(){return e}),t)},useContext:function(e){var t=qe.context[e.__c],n=Je(Me++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(qe)),t.props.value):e.__},useDebugValue:function(e,t){oe.useDebugValue&&oe.useDebugValue(t?t(e):e)},version:"16.8.0",Children:st,render:St,hydrate:function(e,t,n){return He(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(Le(null,e),!0)},createPortal:_t,createElement:he,createContext:function(e,t){var n={__c:t="__cC"+le++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(be)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return he.bind(null,e)},cloneElement:function(e){return At(e)?Re.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:ve,isValidElement:At,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:ye,PureComponent:it,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:at(this.props,e)}function r(t){return this.shouldComponentUpdate=n,he(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(e){function t(t,n){var r=ot({},t);return delete r.ref,e(r,(n=t.ref||n)&&("object"!=Q(n)||"current"in n)?n:null)}return t.$$typeof=lt,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:ve,Suspense:pt,SuspenseList:ht,lazy:function(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return he(n,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Nt};function Tt(){return xt.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},xt.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function Lt(){return xt.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},xt.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Ht(){return(Ht=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["translations"]),a=r.buttonText,i=void 0===a?"Search":a,c=r.buttonAriaLabel,l=void 0===c?"Search":c,u=Ge((function(){return"undefined"!=typeof navigator?/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?"⌘":"Ctrl":null}),[]);return xt.createElement("button",Ht({type:"button",className:"DocSearch DocSearch-Button","aria-label":l},o,{ref:t}),xt.createElement("span",{className:"DocSearch-Button-Container"},xt.createElement(Lt,null),xt.createElement("span",{className:"DocSearch-Button-Placeholder"},i)),xt.createElement("span",{className:"DocSearch-Button-Keys"},null!==u&&xt.createElement(xt.Fragment,null,xt.createElement("span",{className:"DocSearch-Button-Key"},"Ctrl"===u?xt.createElement(Tt,null):u),xt.createElement("span",{className:"DocSearch-Button-Key"},"K"))))})),Mt=0;function qt(e){return 0===e.collections.length?0:e.collections.reduce((function(e,t){return e+t.items.length}),0)}function Vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ft(e){return e.reduce((function(e,t){return e.concat(t)}),[])}function $t(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var o=(null===t?-1:t)+e;return o<=-1||o>=n?null===r?null:0:o}var Bt=function(){};function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(e){return(Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jt(e){var t,n,r=(n=(t=e).collections.map((function(e){return e.items.length})).reduce((function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e}),[]).reduce((function(e,n){return n<=t.activeItemId?e+1:e}),0),t.collections[n]);if(!r)return null;var o=r.items[function(e){for(var t=e.state,n=e.collection,r=!1,o=0,a=0;!1===r;){var i=t.collections[o];if(i===n){r=!0;break}a+=i.items.length,o++}return t.activeItemId-a}({state:e,collection:r})],a=r.source;return{item:o,itemInputValue:a.getItemInputValue({item:o,state:e}),itemUrl:a.getItemUrl({item:o,state:e}),source:a}}function Qt(e,t){return e===t||e.contains(t)}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["event","nextState","props","query","refresh","store"]);yn&&o.environment.clearTimeout(yn);var u,s=l.setCollections,f=l.setIsOpen,p=l.setQuery,m=l.setActiveItemId,h=l.setStatus;return p(a),m(o.defaultActiveItemId),a||!1!==o.openOnFocus?(h("loading"),yn=o.environment.setTimeout((function(){h("stalled")}),o.stallThreshold),o.getSources(dn({query:a,refresh:i,state:c.getState()},l)).then((function(e){return h("loading"),Promise.all(e.map((function(e){return Promise.resolve(e.getItems(dn({query:a,refresh:i,state:c.getState()},l))).then((function(t){return function(e,t){return n=e,Boolean(null==n?void 0:n.execute)?sn(sn({},e),{},{requests:e.queries.map((function(n){return{query:n,sourceId:t,transformResponse:e.transformResponse}}))}):{items:e,sourceId:t};var n}(t,e.sourceId)}))}))).then(mn).then((function(t){return function(e,t){return t.map((function(t){var n,r=e.filter((function(e){return e.sourceId===t.sourceId})),o=r.map((function(e){return e.items})),a=r[0].transformResponse,i=a?a({results:n=o.map((function(e){var t;return Gt(Gt({},e),{},{hits:null===(t=e.hits)||void 0===t?void 0:t.map((function(t){return Gt(Gt({},t),{},{__autocomplete_indexName:e.index,__autocomplete_queryID:e.queryID})}))})})),hits:n.map((function(e){return e.hits})).filter(Boolean),facetHits:n.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}):o;return Array.isArray(i),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned type ').concat(JSON.stringify(cn(i)),":\n\n").concat(JSON.stringify(i,null,2),".\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),i.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:i}}))}(t,e)})).then((function(e){var n;h("idle"),s(e);var u=o.shouldPanelOpen({state:c.getState()});f(null!==(n=r.isOpen)&&void 0!==n?n:o.openOnFocus&&!a&&u||u);var p=Jt(c.getState());if(null!==c.getState().activeItemId&&p){var m=p.item,d=p.itemInputValue,v=p.itemUrl,y=p.source;y.onActive(dn({event:t,item:m,itemInputValue:d,itemUrl:v,refresh:i,source:y,state:c.getState()},l))}})).finally((function(){yn&&o.environment.clearTimeout(yn)}))}))):(h("idle"),s(c.getState().collections.map((function(e){return dn(dn({},e),{},{items:[]})}))),f(null!==(u=r.isOpen)&&void 0!==u?u:o.shouldPanelOpen({state:c.getState()})),Promise.resolve())}function gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bn(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Pn(e){var t=e.props,n=e.refresh,r=e.store,o=jn(e,["props","refresh","store"]);return{getEnvironmentProps:function(e){var n=e.inputElement,o=e.formElement,a=e.panelElement;return wn({onTouchStart:function(e){!1!==r.getState().isOpen&&e.target!==n&&!1===[o,a].some((function(n){return Qt(n,e.target)||Qt(n,t.environment.document.activeElement)}))&&r.dispatch("blur",null)},onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},jn(e,["inputElement","formElement","panelElement"]))},getRootProps:function(e){return wn({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){return e.inputElement,wn({action:"",noValidate:!0,role:"search",onSubmit:function(a){var i;a.preventDefault(),t.onSubmit(wn({event:a,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()},onReset:function(a){var i;a.preventDefault(),t.onReset(wn({event:a,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},jn(e,["inputElement"]))},getLabelProps:function(e){return wn({htmlFor:"".concat(t.id,"-input"),id:"".concat(t.id,"-label")},e)},getInputProps:function(e){function a(e){(t.openOnFocus||Boolean(r.getState().query))&&_n(wn({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var i="ontouchstart"in t.environment,c=e||{},l=(c.inputElement,c.maxLength),u=void 0===l?512:l,s=jn(c,["inputElement","maxLength"]),f=Jt(r.getState());return wn({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?"".concat(t.id,"-item-").concat(r.getState().activeItemId):void 0,"aria-controls":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:r.getState().completion||r.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:null!=f&&f.itemUrl?"go":"search",spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:u,type:"search",onChange:function(e){_n(wn({event:e,props:t,query:e.currentTarget.value.slice(0,u),refresh:n,store:r},o))},onKeyDown:function(e){!function(e){var t=e.event,n=e.props,r=e.refresh,o=e.store,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["event","props","refresh","store"]);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=n.environment.document.getElementById("".concat(n.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},c=function(){var e=Jt(o.getState());if(null!==o.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,c=e.itemUrl,l=e.source;l.onActive(bn({event:t,item:n,itemInputValue:i,itemUrl:c,refresh:r,source:l,state:o.getState()},a))}};t.preventDefault(),!1===o.getState().isOpen&&(n.openOnFocus||Boolean(o.getState().query))?_n(bn({event:t,props:n,query:o.getState().query,refresh:r,store:o},a)).then((function(){o.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),c(),setTimeout(i,0)})):(o.dispatch(t.key,{}),c(),i())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null);else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return;t.preventDefault();var l=Jt(o.getState()),u=l.item,s=l.itemInputValue,f=l.itemUrl,p=l.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(p.onSelect(bn({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},a)),n.navigator.navigateNewTab({itemUrl:f,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(p.onSelect(bn({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},a)),n.navigator.navigateNewWindow({itemUrl:f,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return p.onSelect(bn({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},a)),void n.navigator.navigate({itemUrl:f,item:u,state:o.getState()});_n(bn({event:t,nextState:{isOpen:!1},props:n,query:s,refresh:r,store:o},a)).then((function(){p.onSelect(bn({event:t,item:u,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},a))}))}}}(wn({event:e,props:t,refresh:n,store:r},o))},onFocus:a,onBlur:function(){i||r.dispatch("blur",null)},onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||a(n)}},s)},getPanelProps:function(e){return wn({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){return wn({role:"listbox","aria-labelledby":"".concat(t.id,"-label"),id:"".concat(t.id,"-list")},e)},getItemProps:function(e){var a=e.item,i=e.source,c=jn(e,["item","source"]);return wn({id:"".concat(t.id,"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",a.__autocomplete_id);var t=Jt(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,c=t.itemInputValue,l=t.itemUrl,u=t.source;u.onActive(wn({event:e,item:i,itemInputValue:c,itemUrl:l,refresh:n,source:u,state:r.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var c=i.getItemInputValue({item:a,state:r.getState()}),l=i.getItemUrl({item:a,state:r.getState()});(l?Promise.resolve():_n(wn({event:e,nextState:{isOpen:!1},props:t,query:c,refresh:n,store:r},o))).then((function(){i.onSelect(wn({event:e,item:a,itemInputValue:c,itemUrl:l,refresh:n,source:i,state:r.getState()},o))}))}},c)}}}function kn(e){var t,n=e.state;return!1===n.isOpen||null===n.activeItemId?null:(null===(t=Jt(n))||void 0===t?void 0:t.itemInputValue)||null}function In(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cn(e){for(var t=1;t0}},t),{},{id:null!==(r=t.id)&&void 0!==r?r:"autocomplete-".concat(Mt++),plugins:a,initialState:on({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},t.initialState),onStateChange:function(e){var n;null===(n=t.onStateChange)||void 0===n||n.call(t,e),a.forEach((function(t){var n;return null===(n=t.onStateChange)||void 0===n?void 0:n.call(t,e)}))},onSubmit:function(e){var n;null===(n=t.onSubmit)||void 0===n||n.call(t,e),a.forEach((function(t){var n;return null===(n=t.onSubmit)||void 0===n?void 0:n.call(t,e)}))},onReset:function(e){var n;null===(n=t.onReset)||void 0===n||n.call(t,e),a.forEach((function(t){var n;return null===(n=t.onReset)||void 0===n?void 0:n.call(t,e)}))},getSources:function(e){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return nn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return nn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nn(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a.map((function(e){return e.getSources}))),[t.getSources]).filter(Boolean).map((function(t){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),"The `getSources` function must return an array of sources but returned type ".concat(JSON.stringify(Wt(e)),":\n\n").concat(JSON.stringify(e,null,2)),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t=function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&xt.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},xt.createElement("p",{className:"DocSearch-Help"},"Try searching for:"),xt.createElement("ul",null,t.slice(0,3).reduce((function(t,n){return[].concat(function(e){return function(e){if(Array.isArray(e))return Zn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Zn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zn(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t),[xt.createElement("li",{key:n},xt.createElement("button",{className:"DocSearch-Prefill",key:n,onClick:function(){e.setQuery(n.toLowerCase()+" "),e.refresh(),e.inputRef.current.focus()}},n))])}),[]))),xt.createElement("p",{className:"DocSearch-Help"},"Believe this query should return results?"," ",xt.createElement("a",{href:"https://github.com/algolia/docsearch-configs/issues/new?template=Missing_results.md&title=[".concat(e.indexName,']+Missing+results+for+query+"').concat(e.state.query,'"'),target:"_blank",rel:"noopener noreferrer"},"Let us know"),"."))}function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tr(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["hit","attribute","tagName"])),{},{dangerouslySetInnerHTML:{__html:rr(t,"_snippetResult.".concat(n,".value"))||rr(t,n)}}))}function ar(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){o=!0,a=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ir(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ir(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ir(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n|<\/mark>)/g,hr=RegExp(mr.source);function dr(e){var t,n,r,o,a,i=e;if(!i.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var c=((i.__docsearch_parent?null===(t=i.__docsearch_parent)||void 0===t||null===(n=t._highlightResult)||void 0===n||null===(r=n.hierarchy)||void 0===r?void 0:r.lvl0:null===(o=e._highlightResult)||void 0===o||null===(a=o.hierarchy)||void 0===a?void 0:a.lvl0)||{}).value;return c&&hr.test(c)?c.replace(mr,""):c}function vr(){return(vr=Object.assign||function(e){for(var t=1;t0}));return e.state.query?!1===t?xt.createElement(Xn,e):xt.createElement(yr,e):xt.createElement(gr,br({},e,{hasCollections:t}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function Sr(){return(Sr=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["_highlightResult","_snippetResult"])),i=a.findIndex((function(e){return e.objectID===n.objectID}));i>-1&&a.splice(i,1),a.unshift(n),a=a.slice(0,r),o.setItem(a)},remove:function(e){a=a.filter((function(t){return t.objectID!==e.objectID})),o.setItem(a)},getAll:function(){return a}}}function jr(e){var t,n="algoliasearch-client-js-".concat(e.key),r=function(){return void 0===t&&(t=e.localStorage||window.localStorage),t},o=function(){return JSON.parse(r().getItem(n)||"{}")};return{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var n=JSON.stringify(e),r=o()[n];return Promise.all([r||t(),void 0!==r])})).then((function(e){var t=ee(e,2),r=t[0],o=t[1];return Promise.all([r,o||n.miss(r)])})).then((function(e){return ee(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var a=o();return a[JSON.stringify(e)]=t,r().setItem(n,JSON.stringify(a)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=o();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function Pr(e){var t=te(e.caches),n=t.shift();return void 0===n?{get:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},r=t();return r.then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return ee(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,o).catch((function(){return Pr({caches:t}).get(e,r,o)}))},set:function(e,r){return n.set(e,r).catch((function(){return Pr({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return Pr({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return Pr({caches:t}).clear()}))}}}function kr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var i=r(),c=o&&o.miss||function(){return Promise.resolve()};return i.then((function(e){return c(e)})).then((function(){return i}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function Ir(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function Cr(e,t){return t?(Object.keys(t).forEach((function(n){e[n]=t[n](e)})),e):e}function Dr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var Tr={Read:1,Write:2,Any:3};function Lr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return X(X({},e),{},{status:t,lastUpdate:Date.now()})}function Hr(e){return"string"==typeof e?{protocol:"https",url:e,accept:Tr.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Tr.Any}}var Rr="POST";function Mr(e,t,n,r){var o,a,i,c=[],l=function(e,t){if("GET"!==e.method&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:X(X({},e.data),t.data);return JSON.stringify(n)}}(n,r),u=(o=r,a=X(X({},e.headers),o.headers),i={},Object.keys(a).forEach((function(e){var t=a[e];i[e.toLowerCase()]=t})),i),s=n.method,f="GET"!==n.method?{}:X(X({},n.data),r.data),p=X(X(X({"x-algolia-agent":e.userAgent.value},e.queryParameters),f),r.queryParameters),m=0,h=function t(o,a){var i=o.pop();if(void 0===i)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Fr(c)};var f={data:l,headers:u,method:s,url:Vr(i,n.path,p),connectTimeout:a(m,e.timeouts.connect),responseTimeout:a(m,r.timeout)},h=function(e){var t={request:f,response:e,host:i,triesLeft:o.length};return c.push(t),t},d={onSucess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw{name:"DeserializationError",message:t.message,response:e}}}(e)},onRetry:function(n){var r=h(n);return n.isTimedOut&&m++,Promise.all([e.logger.info("Retryable failure",$r(r)),e.hostsCache.set(i,Lr(i,n.isTimedOut?3:2))]).then((function(){return t(o,a)}))},onFail:function(e){throw h(e),function(e,t){var n=e.content,r=e.status,o=n;try{o=JSON.parse(n).message}catch(a){}return{name:"ApiError",message:o,status:r,transporterStackTrace:t}}(e,Fr(c))}};return e.requester.send(f).then((function(e){return n=d,o=(r=t=e).status,r.isTimedOut||function(e){var t=e.isTimedOut,n=e.status;return!t&&0==~~n}(r)||2!=~~(o/100)&&4!=~~(o/100)?n.onRetry(t):2==~~(t.status/100)?n.onSucess(t):n.onFail(t);var t,n,r,o}))};return function(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(Lr(t))}))}))).then((function(e){var n=e.filter((function(e){return 1===(t=e).status||Date.now()-t.lastUpdate>12e4;var t})),r=e.filter((function(e){return 3===(t=e).status&&Date.now()-t.lastUpdate<=12e4;var t})),o=[].concat(te(n),te(r));return{getTimeout:function(e,t){return(0===r.length&&0===e?1:r.length+3+e)*t},statelessHosts:o.length>0?o.map((function(e){return Hr(e)})):t}}))}(e.hostsCache,t).then((function(e){return h(te(e.statelessHosts).reverse(),e.getTimeout)}))}function qr(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}function Vr(e,t,n){var r=Ur(n),o="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return r.length&&(o+="?".concat(r)),o}function Ur(e){return Object.keys(e).map((function(t){return Dr("%s=%s",t,(n=e[t],"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n)?JSON.stringify(e[t]):e[t]));var n})).join("&")}function Fr(e){return e.map((function(e){return $r(e)}))}function $r(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return X(X({},e),{},{request:X(X({},e.request),{},{headers:X(X({},e.request.headers),t)})})}var Br=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={transporter:e.transporter,appId:e.appId,indexName:t};return Cr(r,n.methods)}},zr=function(e){return function(t,n){var r=t.map((function(e){return X(X({},e),{},{params:Ur(e.params||{})})}));return e.transporter.read({method:Rr,path:"1/indexes/*/queries",data:{requests:r},cacheable:!0},n)}},Kr=function(e){return function(t,n){return Promise.all(t.map((function(t){var r=t.params,o=r.facetName,a=r.facetQuery,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(r,["facetName","facetQuery"]);return Br(e)(t.indexName,{methods:{searchForFacetValues:Qr}}).searchForFacetValues(o,a,X(X({},n),i))})))}},Wr=function(e){return function(t,n,r){return e.transporter.read({method:Rr,path:Dr("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r)}},Jr=function(e){return function(t,n){return e.transporter.read({method:Rr,path:Dr("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},n)}},Qr=function(e){return function(t,n,r){return e.transporter.read({method:Rr,path:Dr("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:n},cacheable:!0},r)}};function Yr(e,t,n){return function(e){var t,n,r,o,a=e.appId,i=(t=void 0!==e.authMode?e.authMode:Ar,n=a,r=e.apiKey,o={"x-algolia-api-key":r,"x-algolia-application-id":n},{headers:function(){return t===Ar?o:{}},queryParameters:function(){return t===Nr?o:{}}}),c=function(e){var t=e.hostsCache,n=e.logger,r=e.requester,o=e.requestsCache,a=e.responsesCache,i=e.timeouts,c=e.userAgent,l=e.hosts,u=e.queryParameters,s={hostsCache:t,logger:n,requester:r,requestsCache:o,responsesCache:a,timeouts:i,userAgent:c,headers:e.headers,queryParameters:u,hosts:l.map((function(e){return Hr(e)})),read:function(e,t){var n=xr(t,s.timeouts.read),r=function(){return Mr(s,s.hosts.filter((function(e){return 0!=(e.accept&Tr.Read)})),e,n)};if(!0!==(void 0!==n.cacheable?n.cacheable:e.cacheable))return r();var o={request:e,mappedRequestOptions:n,transporter:{queryParameters:s.queryParameters,headers:s.headers}};return s.responsesCache.get(o,(function(){return s.requestsCache.get(o,(function(){return s.requestsCache.set(o,r()).then((function(e){return Promise.all([s.requestsCache.delete(o),e])}),(function(e){return Promise.all([s.requestsCache.delete(o),Promise.reject(e)])})).then((function(e){var t=ee(e,2);return t[0],t[1]}))}))}),{miss:function(e){return s.responsesCache.set(o,e)}})},write:function(e,t){return Mr(s,s.hosts.filter((function(e){return 0!=(e.accept&Tr.Write)})),e,xr(t,s.timeouts.write))}};return s}(X(X({hosts:[{url:"".concat(a,"-dsn.algolia.net"),accept:Tr.Read},{url:"".concat(a,".algolia.net"),accept:Tr.Write}].concat(Ir([{url:"".concat(a,"-1.algolianet.com")},{url:"".concat(a,"-2.algolianet.com")},{url:"".concat(a,"-3.algolianet.com")}]))},e),{},{headers:X(X(X({},i.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:X(X({},i.queryParameters()),e.queryParameters)}));return Cr({transporter:c,appId:a,addAlgoliaAgent:function(e,t){c.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then((function(){}))}},e.methods)}(X(X(X({},{appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,o=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),1e3*e)},a=o(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(a),r=o(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},logger:(3,{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:kr(),requestsCache:kr({serializable:!1}),hostsCache:Pr({caches:[jr({key:"".concat("4.8.5","-").concat(e)}),kr()]}),userAgent:qr("4.8.5").add({segment:"Browser",version:"lite"}),authMode:Nr}),n),{},{methods:{search:zr,searchForFacetValues:Kr,multipleQueries:zr,multipleSearchForFacetValues:Kr,initIndex:function(e){return function(t){return Br(e)(t,{methods:{search:Jr,searchForFacetValues:Qr,findAnswers:Wr}})}}}}))}function Gr(){return(Gr=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n",highlightPostTag:"",hitsPerPage:20},s)}]).catch((function(e){throw"RetryError"===e.name&&o("error"),e})).then((function(e){var t=e.results[0],o=t.hits,a=t.nbHits,i=sr(o,(function(e){return dr(e)}));return n.context.searchSuggestions.length0&&(K(),L.current&&L.current.focus())}),[M,K]),xt.useEffect((function(){function e(){if(A.current){var e=.01*window.innerHeight;A.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),xt.createElement("div",Gr({ref:N},z({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===C.status&&"DocSearch-Container--Stalled","error"===C.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),onMouseDown:function(e){e.target===e.currentTarget&&p()}}),xt.createElement("div",{className:"DocSearch-Modal",ref:A},xt.createElement("header",{className:"DocSearch-SearchBar",ref:x},xt.createElement(wr,Gr({},$,{state:C,autoFocus:0===M.length,onClose:p,inputRef:L,isFromSelection:Boolean(M)&&M===R}))),xt.createElement("div",{className:"DocSearch-Dropdown",ref:T},xt.createElement(Or,Gr({},$,{indexName:c,state:C,hitComponent:v,resultsFooterComponent:_,disableUserPersonalization:j,recentSearches:U,favoriteSearches:V,onItemClick:function(e){F(e),p()},inputRef:L}))),xt.createElement("footer",{className:"DocSearch-Footer"},xt.createElement(Rn,null))))}function ro(){return(ro=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n{for(var n in t||(t={}))a.call(t,n)&&c(e,n,t[n]);if(o)for(var n of o(t))i.call(t,n)&&c(e,n,t[n]);return e})({},this.searchConfig),e=n(t,r({container:"#docsearch"})),St(xt.createElement(io,G({},e,{transformSearchClient:function(t){return t.addAlgoliaAgent("docsearch.js","3.0.0-alpha.40"),e.transformSearchClient?e.transformSearchClient(t):t}})),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return"string"==typeof e?t.document.querySelector(e):e}(e.container,e.environment)))}}},[["render",function(e,t,n,r,o,a){return w(),S("div",co)}]])},props:{lang:String,config:Object,versions:Array,langConfigs:Array},data:()=>({packageVersion:u,showVersionPop:!1}),computed:{langLink(){return`#${this.$route.path.replace(this.lang,this.anotherLang.lang)}`},langLabel(){return this.anotherLang.label},anotherLang(){const e=this.langConfigs.filter((e=>e.lang!==this.lang));return e.length?e[0]:{}},searchConfig(){return this.config.searchConfig}},methods:{toggleVersionPop(){const e=!this.showVersionPop,t=e?"add":"remove";document.body[`${t}EventListener`]("click",this.checkHideVersionPop),this.showVersionPop=e},checkHideVersionPop(e){this.$refs.version.contains(e.target)||(this.showVersionPop=!1)},onSwitchLang(e){this.$router.push(this.$route.path.replace(e.from,e.to))},onSwitchVersion(e){e.link&&(location.href=e.link)}}},[["render",function(e,t,n,r,o,a){const i=g("search-input");return w(),S("div",lo,[P("div",uo,[P("div",so,[P("a",fo,[P("img",{src:n.config.logo},null,8,po),P("span",null,k(n.config.title),1)]),P("ul",mo,[(w(!0),S(E,null,j(n.config.links,((e,t)=>(w(),S("li",{key:t,class:"van-doc-header__top-nav-item"},[P("a",{class:"van-doc-header__link",target:"_blank",href:e.url},[e.logo?(w(),S("img",{key:0,src:e.logo},null,8,vo)):e.text?(w(),S("span",yo,k(e.text),1)):C("v-if",!0)],8,ho)])))),128)),n.versions?(w(),S("li",_o,[P("span",{class:"van-doc-header__cube van-doc-header__version",onClick:t[0]||(t[0]=(...e)=>a.toggleVersionPop&&a.toggleVersionPop(...e))},[N(k(o.packageVersion)+" ",1),I(x,{name:"van-doc-dropdown"},{default:A((()=>[o.showVersionPop?(w(),S("div",go,[(w(!0),S(E,null,j(n.versions,((e,t)=>(w(),S("div",{key:t,class:"van-doc-header__version-pop-item",onClick:t=>a.onSwitchVersion(e)},k(e.label),9,bo)))),128))])):C("v-if",!0)])),_:1})])],512)):C("v-if",!0),a.langLabel&&a.langLink?(w(),S("li",Oo,[P("a",{class:"van-doc-header__cube",href:a.langLink},k(a.langLabel),9,So)])):C("v-if",!0),a.searchConfig?(w(),b(i,{key:2,lang:n.lang,"search-config":a.searchConfig},null,8,["lang","search-config"])):C("v-if",!0)])])])])}]]),DocContent:l({name:"VanDocContent",computed:{currentPage(){const{path:e}=this.$route;return e?e.split("/").slice(-1)[0]:this.$route.name}},mounted(){[].slice.call(this.$el.querySelectorAll("h2, h3, h4, h5")).forEach((e=>{e.addEventListener("click",this.scrollToAnchor)}))},methods:{scrollToAnchor(e){e.target.id&&this.$router.push({name:this.$route.name,hash:"#"+e.target.id})}}},[["render",function(e,t,n,r,o,a){return w(),S("div",{class:O(["van-doc-content",`van-doc-content--${a.currentPage}`])},[T(e.$slots,"default")],2)}]]),DocContainer:l(wo,[["render",function(e,t,n,r,o,a){return w(),S("div",{class:O(["van-doc-container van-doc-row",{"van-doc-container--with-simulator":n.hasSimulator}])},[T(e.$slots,"default")],2)}]]),DocSimulator:l({name:"VanDocSimulator",props:{src:String},data:()=>({scrollTop:window.scrollY,windowHeight:window.innerHeight}),computed:{isFixed(){return this.scrollTop>60},simulatorStyle(){return{height:Math.min(640,this.windowHeight-90)+"px"}}},mounted(){window.addEventListener("scroll",(()=>{this.scrollTop=window.scrollY})),window.addEventListener("resize",(()=>{this.windowHeight=window.innerHeight}))}},[["render",function(e,t,n,r,o,a){return w(),S("div",{class:O(["van-doc-simulator",{"van-doc-simulator-fixed":a.isFixed}])},[P("iframe",{ref:"iframe",src:n.src,style:D(a.simulatorStyle),frameborder:"0"},null,12,Eo)],2)}]])},props:{lang:String,versions:Array,simulator:String,hasSimulator:Boolean,langConfigs:Array,config:{type:Object,required:!0},base:{type:String,default:""}},emits:["switch-version"],watch:{$route(){this.setNav()}},created(){this.setNav(),this.keyboardHandler()},methods:{setNav(){const{nav:e}=this.config,t=e.reduce(((e,t)=>e.concat(t.items)),[]),n=this.$route.path.split("/").pop();let r;for(let o=0,a=t.length;o{switch(e.keyCode){case 37:this.keyboardNav("prev");break;case 39:this.keyboardNav("next")}}))}}},Po={class:"van-doc"};const ko={class:"app"};var Io=l({components:{VanDoc:l(jo,[["render",function(e,t,n,r,o,a){const i=g("doc-header"),c=g("doc-nav"),l=g("doc-content"),u=g("doc-container"),s=g("doc-simulator");return w(),S("div",Po,[I(i,{lang:n.lang,config:n.config,versions:n.versions,"lang-configs":n.langConfigs,onSwitchVersion:t[0]||(t[0]=t=>e.$emit("switch-version",t))},null,8,["lang","config","versions","lang-configs"]),I(c,{lang:n.lang,"nav-config":n.config.nav},null,8,["lang","nav-config"]),I(u,{"has-simulator":n.hasSimulator},{default:A((()=>[I(l,null,{default:A((()=>[T(e.$slots,"default")])),_:3})])),_:3},8,["has-simulator"]),n.hasSimulator?(w(),b(s,{key:0,src:n.simulator},null,8,["src"])):C("v-if",!0)])}]])},data:()=>({hasSimulator:!0}),computed:{simulator(){var e,t;if(null==(e=s.site.simulator)?void 0:e.url)return null==(t=s.site.simulator)?void 0:t.url;return`${location.pathname.replace(/\/index(\.html)?/,"/")}mobile.html${location.hash}`},lang(){const{lang:e}=this.$route.meta;return e||""},langConfigs(){const{locales:e={}}=s.site;return Object.keys(e).map((t=>({lang:t,label:e[t].langLabel||""})))},config(){const{locales:e}=s.site;return e?e[this.lang]:s.site},versions:()=>s.site.versions||null},watch:{"$route.path"(){this.setTitleAndToogleSimulator()},lang(e){f(e),this.setTitleAndToogleSimulator()},config:{handler(e){e&&this.setTitleAndToogleSimulator()},immediate:!0}},mounted(){this.$route.hash&&this.$nextTick((()=>{const e=document.querySelector(this.$route.hash);e&&e.scrollIntoView()}))},methods:{setTitleAndToogleSimulator(){let{title:e}=this.config;const t=this.config.nav.reduce(((e,t)=>[...e,...t.items]),[]).find((e=>e.path===this.$route.meta.name));t&&t.title?e=t.title+" - "+e:this.config.description&&(e+=` - ${this.config.description}`),document.title=e,this.hasSimulator=!(s.site.hideSimulator||this.config.hideSimulator||t&&t.hideSimulator)}}},[["render",function(e,t,n,r,o,a){const i=g("router-view"),c=g("van-doc");return w(),S("div",ko,[a.config?(w(),b(c,{key:0,lang:a.lang,config:a.config,versions:a.versions,simulator:a.simulator,"has-simulator":o.hasSimulator,"lang-configs":a.langConfigs},{default:A((()=>[I(i)])),_:1},8,["lang","config","versions","simulator","has-simulator","lang-configs"])):C("v-if",!0)])}]]);const Co={name:"DemoPlayground",props:{originCode:String,codeSnippet:String,transform:Boolean,compact:Boolean,inline:Boolean},data:()=>({showSource:!1,copyStatus:"ready"}),methods:{unescape:unescape,toogleSource(){this.showSource=!this.showSource},copySourceCode(){!function(e){const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t);const n=document.getSelection();if(!n)return;const r=n.rangeCount>0&&n.getRangeAt(0);t.select(),document.execCommand("copy"),document.body.removeChild(t),r&&(n.removeAllRanges(),n.addRange(r))}(unescape(this.originCode)),this.copyStatus="copied",setTimeout((()=>{this.copyStatus="ready"}),2e3)}}},Do={class:"demo-playground--code"},No={class:"demo-playground--code--actions"},Ao=(e=>(R("data-v-9efa7fdc"),e=e(),M(),e))((()=>P("span",null,null,-1))),xo=["data-status"],To=["innerHTML"];var Lo=l(Co,[["render",function(e,t,n,r,o,a){return w(),S("div",{class:O({"demo-playground":!n.inline,transform:n.transform})},[n.inline?T(e.$slots,"default",{key:0},void 0,!0):(w(),S(E,{key:1},[P("div",{class:O(["demo-playground--previewer",{compact:n.compact}])},[T(e.$slots,"default",{},void 0,!0)],2),P("div",Do,[P("div",No,[Ao,P("button",{title:"Copy source code",class:"action-icon",role:"copy","data-status":o.copyStatus,onClick:t[0]||(t[0]=(...e)=>a.copySourceCode&&a.copySourceCode(...e))},null,8,xo),P("button",{title:"Toggle source code panel",class:"action-icon",role:"source",onClick:t[1]||(t[1]=(...e)=>a.toogleSource&&a.toogleSource(...e))})]),L(P("div",{innerHTML:a.unescape(n.codeSnippet),class:"demo-playground--code--content"},null,8,To),[[H,o.showSource]])])],64))],2)}],["__scopeId","data-v-9efa7fdc"]]);p&&location.replace("mobile.html"+location.hash);const{locales:Ho,defaultLang:Ro}=s.site;function Mo(e){const t=e.path.split("/")[1];return-1!==Object.keys(Ho).indexOf(t)?t:_()}m(Ro);const qo=q({history:V(),routes:function(){const e=[],t=Object.keys(d);return Ho?e.push({name:"notFound",path:"/:path(.*)+",redirect:e=>({name:Mo(e)})}):e.push({name:"notFound",path:"/:path(.*)+",redirect:{name:"home"}}),t.forEach((t=>{const{component:n,lang:r}=function(e){if(-1!==e.indexOf("_")){const t=e.split("_"),n=t.shift();return{component:`${y(n)}`,lang:t.join("-")}}return{component:`${y(e)}`,lang:""}}(t);"home"===n&&function(t,n){e.push({name:n||"home",path:`/${n||""}`,component:t,meta:{lang:n}})}(d[t],r),r?e.push({name:`${r}/${n}`,path:`/${r}/${n}`,component:d[t],meta:{lang:r,name:n}}):e.push({name:`${n}`,path:`/${n}`,component:d[t],meta:{name:n}})})),e}(),scrollBehavior:e=>e.hash?{el:e.hash}:{top:0}});qo.afterEach((()=>{U(v)})),!1!==(null==(e=s.site.simulator)?void 0:e.syncPathFromSimulator)&&h(qo),window.vueRouter=qo,window.app=F(Io).use(qo).component(Lo.name,Lo),setTimeout((()=>{window.app.mount("#app")}),0);