@teipublisher/pb-components 3.0.0-next-4.17 → 3.0.0-next-4.18
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/.github/dependabot.yml +104 -5
- package/CHANGELOG.md +8 -0
- package/dist/demo/pb-i18n.html +4 -1
- package/dist/pb-components-bundle.js +2 -2
- package/package.json +1 -1
- package/src/pb-i18n.js +1 -1
- package/src/pb-page.js +8 -3
package/.github/dependabot.yml
CHANGED
|
@@ -1,11 +1,110 @@
|
|
|
1
|
+
# Separate entries per branch — Dependabot has no shorthand for multi-branch PR targets.
|
|
2
|
+
#
|
|
3
|
+
# Groups are evaluated in order: first matching group wins. Specific toolchains come first,
|
|
4
|
+
# then broad dependency-type buckets.
|
|
5
|
+
|
|
1
6
|
version: 2
|
|
2
7
|
updates:
|
|
3
|
-
#
|
|
4
|
-
- package-ecosystem:
|
|
8
|
+
# ─── GitHub Actions → default branch (main) ─────────────────────────────────
|
|
9
|
+
- package-ecosystem: github-actions
|
|
5
10
|
directory: "/"
|
|
6
11
|
schedule:
|
|
7
|
-
interval:
|
|
8
|
-
|
|
12
|
+
interval: weekly
|
|
13
|
+
groups:
|
|
14
|
+
actions:
|
|
15
|
+
patterns:
|
|
16
|
+
- "*"
|
|
17
|
+
|
|
18
|
+
# ─── GitHub Actions → next-4 ────────────────────────────────────────────────
|
|
19
|
+
- package-ecosystem: github-actions
|
|
9
20
|
directory: "/"
|
|
10
21
|
schedule:
|
|
11
|
-
interval:
|
|
22
|
+
interval: weekly
|
|
23
|
+
target-branch: next-4
|
|
24
|
+
groups:
|
|
25
|
+
actions:
|
|
26
|
+
patterns:
|
|
27
|
+
- "*"
|
|
28
|
+
|
|
29
|
+
# ─── npm → default branch (main) ────────────────────────────────────────────
|
|
30
|
+
- package-ecosystem: npm
|
|
31
|
+
directory: "/"
|
|
32
|
+
schedule:
|
|
33
|
+
interval: daily
|
|
34
|
+
versioning-strategy: increase-if-necessary
|
|
35
|
+
groups:
|
|
36
|
+
rollup-and-vite:
|
|
37
|
+
patterns:
|
|
38
|
+
- "rollup"
|
|
39
|
+
- "vite"
|
|
40
|
+
- "@rollup/*"
|
|
41
|
+
- "rollup-plugin-*"
|
|
42
|
+
babel:
|
|
43
|
+
patterns:
|
|
44
|
+
- "@babel/*"
|
|
45
|
+
cypress-and-test-tooling:
|
|
46
|
+
patterns:
|
|
47
|
+
- "cypress"
|
|
48
|
+
- "concurrently"
|
|
49
|
+
- "eslint-plugin-cypress"
|
|
50
|
+
- "eslint-plugin-chai-friendly"
|
|
51
|
+
- "web-component-analyzer"
|
|
52
|
+
eslint-prettier-and-lint:
|
|
53
|
+
patterns:
|
|
54
|
+
- "eslint"
|
|
55
|
+
- "@eslint/*"
|
|
56
|
+
- "eslint-*"
|
|
57
|
+
- "globals"
|
|
58
|
+
- "lint-staged"
|
|
59
|
+
- "@open-wc/eslint-config"
|
|
60
|
+
- "@open-wc/prettier-config"
|
|
61
|
+
semantic-release:
|
|
62
|
+
patterns:
|
|
63
|
+
- "semantic-release"
|
|
64
|
+
- "@semantic-release/*"
|
|
65
|
+
production-dependencies:
|
|
66
|
+
dependency-type: production
|
|
67
|
+
development-dependencies:
|
|
68
|
+
dependency-type: development
|
|
69
|
+
|
|
70
|
+
# ─── npm → next-4 (identical grouping) ──────────────────────────────────────
|
|
71
|
+
- package-ecosystem: npm
|
|
72
|
+
directory: "/"
|
|
73
|
+
schedule:
|
|
74
|
+
interval: daily
|
|
75
|
+
versioning-strategy: increase-if-necessary
|
|
76
|
+
target-branch: next-4
|
|
77
|
+
groups:
|
|
78
|
+
rollup-and-vite:
|
|
79
|
+
patterns:
|
|
80
|
+
- "rollup"
|
|
81
|
+
- "vite"
|
|
82
|
+
- "@rollup/*"
|
|
83
|
+
- "rollup-plugin-*"
|
|
84
|
+
babel:
|
|
85
|
+
patterns:
|
|
86
|
+
- "@babel/*"
|
|
87
|
+
cypress-and-test-tooling:
|
|
88
|
+
patterns:
|
|
89
|
+
- "cypress"
|
|
90
|
+
- "concurrently"
|
|
91
|
+
- "eslint-plugin-cypress"
|
|
92
|
+
- "eslint-plugin-chai-friendly"
|
|
93
|
+
- "web-component-analyzer"
|
|
94
|
+
eslint-prettier-and-lint:
|
|
95
|
+
patterns:
|
|
96
|
+
- "eslint"
|
|
97
|
+
- "@eslint/*"
|
|
98
|
+
- "eslint-*"
|
|
99
|
+
- "globals"
|
|
100
|
+
- "lint-staged"
|
|
101
|
+
- "@open-wc/eslint-config"
|
|
102
|
+
- "@open-wc/prettier-config"
|
|
103
|
+
semantic-release:
|
|
104
|
+
patterns:
|
|
105
|
+
- "semantic-release"
|
|
106
|
+
- "@semantic-release/*"
|
|
107
|
+
production-dependencies:
|
|
108
|
+
dependency-type: production
|
|
109
|
+
development-dependencies:
|
|
110
|
+
dependency-type: development
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# [3.0.0-next-4.18](https://github.com/eeditiones/tei-publisher-components/compare/v3.0.0-next-4.17...v3.0.0-next-4.18) (2026-05-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **pb-i18n:** always fall back to common localization ([4906fd0](https://github.com/eeditiones/tei-publisher-components/commit/4906fd0e5bc6cda5e2780d6cc42656927ede64ab))
|
|
7
|
+
* **pb-i18n:** do not double-include the common locales ([fc216aa](https://github.com/eeditiones/tei-publisher-components/commit/fc216aa5ceba0d411eb25970985448168bfaf1d5))
|
|
8
|
+
|
|
1
9
|
# [3.0.0-next-4.17](https://github.com/eeditiones/tei-publisher-components/compare/v3.0.0-next-4.16...v3.0.0-next-4.17) (2026-05-08)
|
|
2
10
|
|
|
3
11
|
|
package/dist/demo/pb-i18n.html
CHANGED
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
<h3 data-i18n="menu.download.title"></h3>
|
|
61
61
|
<div>Attributes can be translated as well (card heading above)</div>
|
|
62
62
|
</div>
|
|
63
|
-
|
|
63
|
+
|
|
64
64
|
<h2>without a label</h2>
|
|
65
65
|
<pb-lang label="language" selected="en" nolabel="nolabel">
|
|
66
66
|
<option value="de">German</option>
|
|
@@ -73,6 +73,9 @@
|
|
|
73
73
|
<option value="nl">Dutch</option>
|
|
74
74
|
</pb-lang>
|
|
75
75
|
|
|
76
|
+
|
|
77
|
+
<h2>localizations by the system</h2>
|
|
78
|
+
<p>the string 'search' is localized in the common en.json to <pb-i18n id="search" key="search.search">MISSING</pb-i18n></p>
|
|
76
79
|
</pb-page>
|
|
77
80
|
</template>
|
|
78
81
|
</pb-demo-snippet>
|
|
@@ -130,7 +130,7 @@ import{g as e,x as t,i as n,a as s,r,p as o,w as a,c as l,b as c,E as d,m as p,B
|
|
|
130
130
|
border-color: #999;
|
|
131
131
|
color: #999;
|
|
132
132
|
}
|
|
133
|
-
`}customElements.define("pb-demo-snippet",re);const oe="3.0.0-next-4.17";class ae extends s{static get properties(){return Object.assign({version:{type:String,reflect:!0}},super.properties)}constructor(){super(),this.version=oe}render(){return t`<span>${this.version?this.version:"unknown"}</span>`}createRenderRoot(){return this}}customElements.define("pb-version",ae);var le="top",ce="bottom",de="right",pe="left",ue="auto",he=[le,ce,de,pe],ge="start",fe="end",me="clippingParents",be="viewport",ye="popper",ve="reference",_e=he.reduce(function(e,t){return e.concat([t+"-"+ge,t+"-"+fe])},[]),we=[].concat(he,[ue]).reduce(function(e,t){return e.concat([t,t+"-"+ge,t+"-"+fe])},[]),xe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ke(e){return e?(e.nodeName||"").toLowerCase():null}function Ae(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Se(e){return e instanceof Ae(e).Element||e instanceof Element}function Oe(e){return e instanceof Ae(e).HTMLElement||e instanceof HTMLElement}function Ee(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Ae(e).ShadowRoot||e instanceof ShadowRoot)}function $e(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},s=t.elements[e];Oe(s)&&ke(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(e){var t=n[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)}))})}function Ce(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],s=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce(function(e,t){return e[t]="",e},{});Oe(n)&&ke(n)&&(Object.assign(n.style,r),Object.keys(s).forEach(function(e){n.removeAttribute(e)}))})}}var Te={name:"applyStyles",enabled:!0,phase:"write",fn:$e,effect:Ce,requires:["computeStyles"]};function Ie(e){return e.split("-")[0]}var Le=Math.max,Re=Math.min,je=Math.round;function Ne(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Pe(){return!/^((?!chrome|android).)*safari/i.test(Ne())}function De(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=e.getBoundingClientRect(),s=1,r=1;t&&Oe(e)&&(s=e.offsetWidth>0&&je(n.width)/e.offsetWidth||1,r=e.offsetHeight>0&&je(n.height)/e.offsetHeight||1);var o=(Se(e)?Ae(e):window).visualViewport,a=!Pe()&&i,l=(n.left+(a&&o?o.offsetLeft:0))/s,c=(n.top+(a&&o?o.offsetTop:0))/r,d=n.width/s,p=n.height/r;return{width:d,height:p,top:c,right:l+d,bottom:c+p,left:l,x:l,y:c}}function Fe(e){var t=De(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function Be(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Ee(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Me(e){return Ae(e).getComputedStyle(e)}function qe(e){return["table","td","th"].indexOf(ke(e))>=0}function ze(e){return((Se(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ue(e){return"html"===ke(e)?e:e.assignedSlot||e.parentNode||(Ee(e)?e.host:null)||ze(e)}function He(e){return Oe(e)&&"fixed"!==Me(e).position?e.offsetParent:null}function Ve(e){var t=/firefox/i.test(Ne());if(/Trident/i.test(Ne())&&Oe(e)&&"fixed"===Me(e).position)return null;var i=Ue(e);for(Ee(i)&&(i=i.host);Oe(i)&&["html","body"].indexOf(ke(i))<0;){var n=Me(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function We(e){for(var t=Ae(e),i=He(e);i&&qe(i)&&"static"===Me(i).position;)i=He(i);return i&&("html"===ke(i)||"body"===ke(i)&&"static"===Me(i).position)?t:i||Ve(e)||t}function Ge(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ye(e,t,i){return Le(e,Re(t,i))}function Qe(e,t,i){var n=Ye(e,t,i);return n>i?i:n}function Ke(){return{top:0,right:0,bottom:0,left:0}}function Je(e){return Object.assign({},Ke(),e)}function Ze(e,t){return t.reduce(function(t,i){return t[i]=e,t},{})}var Xe=function(e,t){return Je("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Ze(e,he))};function et(e){var t,i=e.state,n=e.name,s=e.options,r=i.elements.arrow,o=i.modifiersData.popperOffsets,a=Ie(i.placement),l=Ge(a),c=[pe,de].indexOf(a)>=0?"height":"width";if(r&&o){var d=Xe(s.padding,i),p=Fe(r),u="y"===l?le:pe,h="y"===l?ce:de,g=i.rects.reference[c]+i.rects.reference[l]-o[l]-i.rects.popper[c],f=o[l]-i.rects.reference[l],m=We(r),b=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=g/2-f/2,v=d[u],_=b-p[c]-d[h],w=b/2-p[c]/2+y,x=Ye(v,w,_),k=l;i.modifiersData[n]=((t={})[k]=x,t.centerOffset=x-w,t)}}function tt(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&Be(t.elements.popper,n)&&(t.elements.arrow=n)}function it(e){return e.split("-")[1]}var nt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function st(e,t){var i=e.x,n=e.y,s=t.devicePixelRatio||1;return{x:je(i*s)/s||0,y:je(n*s)/s||0}}function rt(e){var t,i=e.popper,n=e.popperRect,s=e.placement,r=e.variation,o=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,p=e.isFixed,u=o.x,h=void 0===u?0:u,g=o.y,f=void 0===g?0:g,m="function"==typeof d?d({x:h,y:f}):{x:h,y:f};h=m.x,f=m.y;var b=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),v=pe,_=le,w=window;if(c){var x=We(i),k="clientHeight",A="clientWidth";if(x===Ae(i)&&"static"!==Me(x=ze(i)).position&&"absolute"===a&&(k="scrollHeight",A="scrollWidth"),s===le||(s===pe||s===de)&&r===fe)_=ce,f-=(p&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-n.height,f*=l?1:-1;if(s===pe||(s===le||s===ce)&&r===fe)v=de,h-=(p&&x===w&&w.visualViewport?w.visualViewport.width:x[A])-n.width,h*=l?1:-1}var S,O=Object.assign({position:a},c&&nt),E=!0===d?st({x:h,y:f},Ae(i)):{x:h,y:f};return h=E.x,f=E.y,l?Object.assign({},O,((S={})[_]=y?"0":"",S[v]=b?"0":"",S.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",S)):Object.assign({},O,((t={})[_]=y?f+"px":"",t[v]=b?h+"px":"",t.transform="",t))}function ot(e){var t=e.state,i=e.options,n=i.gpuAcceleration,s=void 0===n||n,r=i.adaptive,o=void 0===r||r,a=i.roundOffsets,l=void 0===a||a,c={placement:Ie(t.placement),variation:it(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,rt(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,rt(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var at={passive:!0};function lt(e){var t=e.state,i=e.instance,n=e.options,s=n.scroll,r=void 0===s||s,o=n.resize,a=void 0===o||o,l=Ae(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&c.forEach(function(e){e.addEventListener("scroll",i.update,at)}),a&&l.addEventListener("resize",i.update,at),function(){r&&c.forEach(function(e){e.removeEventListener("scroll",i.update,at)}),a&&l.removeEventListener("resize",i.update,at)}}var ct={left:"right",right:"left",bottom:"top",top:"bottom"};function dt(e){return e.replace(/left|right|bottom|top/g,function(e){return ct[e]})}var pt={start:"end",end:"start"};function ut(e){return e.replace(/start|end/g,function(e){return pt[e]})}function ht(e){var t=Ae(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function gt(e){return De(ze(e)).left+ht(e).scrollLeft}function ft(e,t){var i=Ae(e),n=ze(e),s=i.visualViewport,r=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=Pe();(c||!c&&"fixed"===t)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+gt(e),y:l}}function mt(e){var t,i=ze(e),n=ht(e),s=null==(t=e.ownerDocument)?void 0:t.body,r=Le(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Le(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+gt(e),l=-n.scrollTop;return"rtl"===Me(s||i).direction&&(a+=Le(i.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function bt(e){var t=Me(e),i=t.overflow,n=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function yt(e){return["html","body","#document"].indexOf(ke(e))>=0?e.ownerDocument.body:Oe(e)&&bt(e)?e:yt(Ue(e))}function vt(e,t){var i;void 0===t&&(t=[]);var n=yt(e),s=n===(null==(i=e.ownerDocument)?void 0:i.body),r=Ae(n),o=s?[r].concat(r.visualViewport||[],bt(n)?n:[]):n,a=t.concat(o);return s?a:a.concat(vt(Ue(o)))}function _t(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function wt(e,t){var i=De(e,!1,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function xt(e,t,i){return t===be?_t(ft(e,i)):Se(t)?wt(t,i):_t(mt(ze(e)))}function kt(e){var t=vt(Ue(e)),i=["absolute","fixed"].indexOf(Me(e).position)>=0&&Oe(e)?We(e):e;return Se(i)?t.filter(function(e){return Se(e)&&Be(e,i)&&"body"!==ke(e)}):[]}function At(e,t,i,n){var s="clippingParents"===t?kt(e):[].concat(t),r=[].concat(s,[i]),o=r[0],a=r.reduce(function(t,i){var s=xt(e,i,n);return t.top=Le(s.top,t.top),t.right=Re(s.right,t.right),t.bottom=Re(s.bottom,t.bottom),t.left=Le(s.left,t.left),t},xt(e,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function St(e){var t,i=e.reference,n=e.element,s=e.placement,r=s?Ie(s):null,o=s?it(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(r){case le:t={x:a,y:i.y-n.height};break;case ce:t={x:a,y:i.y+i.height};break;case de:t={x:i.x+i.width,y:l};break;case pe:t={x:i.x-n.width,y:l};break;default:t={x:i.x,y:i.y}}var c=r?Ge(r):null;if(null!=c){var d="y"===c?"height":"width";switch(o){case ge:t[c]=t[c]-(i[d]/2-n[d]/2);break;case fe:t[c]=t[c]+(i[d]/2-n[d]/2)}}return t}function Ot(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=void 0===n?e.placement:n,r=i.strategy,o=void 0===r?e.strategy:r,a=i.boundary,l=void 0===a?me:a,c=i.rootBoundary,d=void 0===c?be:c,p=i.elementContext,u=void 0===p?ye:p,h=i.altBoundary,g=void 0!==h&&h,f=i.padding,m=void 0===f?0:f,b=Je("number"!=typeof m?m:Ze(m,he)),y=u===ye?ve:ye,v=e.rects.popper,_=e.elements[g?y:u],w=At(Se(_)?_:_.contextElement||ze(e.elements.popper),l,d,o),x=De(e.elements.reference),k=St({reference:x,element:v,placement:s}),A=_t(Object.assign({},v,k)),S=u===ye?A:x,O={top:w.top-S.top+b.top,bottom:S.bottom-w.bottom+b.bottom,left:w.left-S.left+b.left,right:S.right-w.right+b.right},E=e.modifiersData.offset;if(u===ye&&E){var $=E[s];Object.keys(O).forEach(function(e){var t=[de,ce].indexOf(e)>=0?1:-1,i=[le,ce].indexOf(e)>=0?"y":"x";O[e]+=$[i]*t})}return O}function Et(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=i.boundary,r=i.rootBoundary,o=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?we:l,d=it(n),p=d?a?_e:_e.filter(function(e){return it(e)===d}):he,u=p.filter(function(e){return c.indexOf(e)>=0});0===u.length&&(u=p);var h=u.reduce(function(t,i){return t[i]=Ot(e,{placement:i,boundary:s,rootBoundary:r,padding:o})[Ie(i)],t},{});return Object.keys(h).sort(function(e,t){return h[e]-h[t]})}function $t(e){if(Ie(e)===ue)return[];var t=dt(e);return[ut(e),t,ut(t)]}function Ct(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var s=i.mainAxis,r=void 0===s||s,o=i.altAxis,a=void 0===o||o,l=i.fallbackPlacements,c=i.padding,d=i.boundary,p=i.rootBoundary,u=i.altBoundary,h=i.flipVariations,g=void 0===h||h,f=i.allowedAutoPlacements,m=t.options.placement,b=Ie(m),y=l||(b===m||!g?[dt(m)]:$t(m)),v=[m].concat(y).reduce(function(e,i){return e.concat(Ie(i)===ue?Et(t,{placement:i,boundary:d,rootBoundary:p,padding:c,flipVariations:g,allowedAutoPlacements:f}):i)},[]),_=t.rects.reference,w=t.rects.popper,x=new Map,k=!0,A=v[0],S=0;S<v.length;S++){var O=v[S],E=Ie(O),$=it(O)===ge,C=[le,ce].indexOf(E)>=0,T=C?"width":"height",I=Ot(t,{placement:O,boundary:d,rootBoundary:p,altBoundary:u,padding:c}),L=C?$?de:pe:$?ce:le;_[T]>w[T]&&(L=dt(L));var R=dt(L),j=[];if(r&&j.push(I[E]<=0),a&&j.push(I[L]<=0,I[R]<=0),j.every(function(e){return e})){A=O,k=!1;break}x.set(O,j)}if(k)for(var N=function(e){var t=v.find(function(t){var i=x.get(t);if(i)return i.slice(0,e).every(function(e){return e})});if(t)return A=t,"break"},P=g?3:1;P>0;P--){if("break"===N(P))break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}function Tt(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function It(e){return[le,de,ce,pe].some(function(t){return e[t]>=0})}function Lt(e){var t=e.state,i=e.name,n=t.rects.reference,s=t.rects.popper,r=t.modifiersData.preventOverflow,o=Ot(t,{elementContext:"reference"}),a=Ot(t,{altBoundary:!0}),l=Tt(o,n),c=Tt(a,s,r),d=It(l),p=It(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}function Rt(e,t,i){var n=Ie(e),s=[pe,le].indexOf(n)>=0?-1:1,r="function"==typeof i?i(Object.assign({},t,{placement:e})):i,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[pe,de].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function jt(e){var t=e.state,i=e.options,n=e.name,s=i.offset,r=void 0===s?[0,0]:s,o=we.reduce(function(e,i){return e[i]=Rt(i,t.rects,r),e},{}),a=o[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=o}function Nt(e){var t=e.state,i=e.name;t.modifiersData[i]=St({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}function Pt(e){return"x"===e?"y":"x"}function Dt(e){var t=e.state,i=e.options,n=e.name,s=i.mainAxis,r=void 0===s||s,o=i.altAxis,a=void 0!==o&&o,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,p=i.padding,u=i.tether,h=void 0===u||u,g=i.tetherOffset,f=void 0===g?0:g,m=Ot(t,{boundary:l,rootBoundary:c,padding:p,altBoundary:d}),b=Ie(t.placement),y=it(t.placement),v=!y,_=Ge(b),w=Pt(_),x=t.modifiersData.popperOffsets,k=t.rects.reference,A=t.rects.popper,S="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,O="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(x){if(r){var C,T="y"===_?le:pe,I="y"===_?ce:de,L="y"===_?"height":"width",R=x[_],j=R+m[T],N=R-m[I],P=h?-A[L]/2:0,D=y===ge?k[L]:A[L],F=y===ge?-A[L]:-k[L],B=t.elements.arrow,M=h&&B?Fe(B):{width:0,height:0},q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ke(),z=q[T],U=q[I],H=Ye(0,k[L],M[L]),V=v?k[L]/2-P-H-z-O.mainAxis:D-H-z-O.mainAxis,W=v?-k[L]/2+P+H+U+O.mainAxis:F+H+U+O.mainAxis,G=t.elements.arrow&&We(t.elements.arrow),Y=G?"y"===_?G.clientTop||0:G.clientLeft||0:0,Q=null!=(C=null==E?void 0:E[_])?C:0,K=R+W-Q,J=Ye(h?Re(j,R+V-Q-Y):j,R,h?Le(N,K):N);x[_]=J,$[_]=J-R}if(a){var Z,X="x"===_?le:pe,ee="x"===_?ce:de,te=x[w],ie="y"===w?"height":"width",ne=te+m[X],se=te-m[ee],re=-1!==[le,pe].indexOf(b),oe=null!=(Z=null==E?void 0:E[w])?Z:0,ae=re?ne:te-k[ie]-A[ie]-oe+O.altAxis,ue=re?te+k[ie]+A[ie]-oe-O.altAxis:se,he=h&&re?Qe(ae,te,ue):Ye(h?ae:ne,te,h?ue:se);x[w]=he,$[w]=he-te}t.modifiersData[n]=$}}function Ft(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Bt(e){return e!==Ae(e)&&Oe(e)?Ft(e):ht(e)}function Mt(e){var t=e.getBoundingClientRect(),i=je(t.width)/e.offsetWidth||1,n=je(t.height)/e.offsetHeight||1;return 1!==i||1!==n}function qt(e,t,i){void 0===i&&(i=!1);var n=Oe(t),s=Oe(t)&&Mt(t),r=ze(t),o=De(e,s,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==ke(t)||bt(r))&&(a=Bt(t)),Oe(t)?((l=De(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=gt(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function zt(e){var t=new Map,i=new Set,n=[];function s(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!i.has(e)){var n=t.get(e);n&&s(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){i.has(e.name)||s(e)}),n}function Ut(e){var t=zt(e);return xe.reduce(function(e,i){return e.concat(t.filter(function(e){return e.phase===i}))},[])}function Ht(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function Vt(e){var t=e.reduce(function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var Wt={placement:"bottom",modifiers:[],strategy:"absolute"};function Gt(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Yt(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,n=void 0===i?[]:i,s=t.defaultOptions,r=void 0===s?Wt:s;return function(e,t,i){void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Wt,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],a=!1,l={state:s,setOptions:function(i){var o="function"==typeof i?i(s.options):i;d(),s.options=Object.assign({},r,s.options,o),s.scrollParents={reference:Se(e)?vt(e):e.contextElement?vt(e.contextElement):[],popper:vt(t)};var a=Ut(Vt([].concat(n,s.options.modifiers)));return s.orderedModifiers=a.filter(function(e){return e.enabled}),c(),l.update()},forceUpdate:function(){if(!a){var e=s.elements,t=e.reference,i=e.popper;if(Gt(t,i)){s.rects={reference:qt(t,We(i),"fixed"===s.options.strategy),popper:Fe(i)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var r=s.orderedModifiers[n],o=r.fn,c=r.options,d=void 0===c?{}:c,p=r.name;"function"==typeof o&&(s=o({state:s,options:d,name:p,instance:l})||s)}else s.reset=!1,n=-1}}},update:Ht(function(){return new Promise(function(e){l.forceUpdate(),e(s)})}),destroy:function(){d(),a=!0}};if(!Gt(e,t))return l;function c(){s.orderedModifiers.forEach(function(e){var t=e.name,i=e.options,n=void 0===i?{}:i,r=e.effect;if("function"==typeof r){var a=r({state:s,name:t,instance:l,options:n}),c=function(){};o.push(a||c)}})}function d(){o.forEach(function(e){return e()}),o=[]}return l.setOptions(i).then(function(e){!a&&i.onFirstUpdate&&i.onFirstUpdate(e)}),l}}var Qt=Yt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:lt,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:Nt,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ot,data:{}},Te,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jt},{name:"flip",enabled:!0,phase:"main",fn:Ct,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:Dt,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:et,effect:tt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Lt}]}),Kt="tippy-box",Jt="tippy-content",Zt="tippy-backdrop",Xt="tippy-arrow",ei="tippy-svg-arrow",ti={passive:!0,capture:!0},ii=function(){return document.body};function ni(e,t,i){if(Array.isArray(e)){var n=e[t];return n??(Array.isArray(i)?i[t]:i)}return e}function si(e,t){var i={}.toString.call(e);return 0===i.indexOf("[object")&&i.indexOf(t+"]")>-1}function ri(e,t){return"function"==typeof e?e.apply(void 0,t):e}function oi(e,t){return 0===t?e:function(n){clearTimeout(i),i=setTimeout(function(){e(n)},t)};var i}function ai(e){return e.split(/\s+/).filter(Boolean)}function li(e){return[].concat(e)}function ci(e,t){-1===e.indexOf(t)&&e.push(t)}function di(e){return e.filter(function(t,i){return e.indexOf(t)===i})}function pi(e){return e.split("-")[0]}function ui(e){return[].slice.call(e)}function hi(e){return Object.keys(e).reduce(function(t,i){return void 0!==e[i]&&(t[i]=e[i]),t},{})}function gi(){return document.createElement("div")}function fi(e){return["Element","Fragment"].some(function(t){return si(e,t)})}function mi(e){return si(e,"NodeList")}function bi(e){return si(e,"MouseEvent")}function yi(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function vi(e){return fi(e)?[e]:mi(e)?ui(e):Array.isArray(e)?e:ui(document.querySelectorAll(e))}function _i(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function wi(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function xi(e){var t,i=li(e)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}function ki(e,t){var i=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,s=e.popperState,r=e.props.interactiveBorder,o=pi(s.placement),a=s.modifiersData.offset;if(!a)return!0;var l="bottom"===o?a.top.y:0,c="top"===o?a.bottom.y:0,d="right"===o?a.left.x:0,p="left"===o?a.right.x:0,u=t.top-n+l>r,h=n-t.bottom-c>r,g=t.left-i+d>r,f=i-t.right-p>r;return u||h||g||f})}function Ai(e,t,i){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,i)})}function Si(e,t){for(var i=t;i;){var n;if(e.contains(i))return!0;i=null==i.getRootNode||null==(n=i.getRootNode())?void 0:n.host}return!1}var Oi={isTouch:!1},Ei=0;function $i(){Oi.isTouch||(Oi.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ci))}function Ci(){var e=performance.now();e-Ei<20&&(Oi.isTouch=!1,document.removeEventListener("mousemove",Ci)),Ei=e}function Ti(){var e=document.activeElement;if(yi(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Ii(){document.addEventListener("touchstart",$i,ti),window.addEventListener("blur",Ti)}var Li=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,Ri={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ji={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ni=Object.assign({appendTo:ii,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ri,ji),Pi=Object.keys(Ni),Di=function(e){Object.keys(e).forEach(function(t){Ni[t]=e[t]})};function Fi(e){var t=(e.plugins||[]).reduce(function(t,i){var n,s=i.name,r=i.defaultValue;s&&(t[s]=void 0!==e[s]?e[s]:null!=(n=Ni[s])?n:r);return t},{});return Object.assign({},e,t)}function Bi(e,t){var i=(t?Object.keys(Fi(Object.assign({},Ni,{plugins:t}))):Pi).reduce(function(t,i){var n=(e.getAttribute("data-tippy-"+i)||"").trim();if(!n)return t;if("content"===i)t[i]=n;else try{t[i]=JSON.parse(n)}catch(e){t[i]=n}return t},{});return i}function Mi(e,t){var i=Object.assign({},t,{content:ri(t.content,[e])},t.ignoreAttributes?{}:Bi(e,t.plugins));return i.aria=Object.assign({},Ni.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?t.interactive:i.aria.expanded,content:"auto"===i.aria.content?t.interactive?null:"describedby":i.aria.content},i}var qi=function(){return"innerHTML"};function zi(e,t){e[qi()]=t}function Ui(e){var t=gi();return!0===e?t.className=Xt:(t.className=ei,fi(e)?t.appendChild(e):zi(t,e)),t}function Hi(e,t){fi(t.content)?(zi(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?zi(e,t.content):e.textContent=t.content)}function Vi(e){var t=e.firstElementChild,i=ui(t.children);return{box:t,content:i.find(function(e){return e.classList.contains(Jt)}),arrow:i.find(function(e){return e.classList.contains(Xt)||e.classList.contains(ei)}),backdrop:i.find(function(e){return e.classList.contains(Zt)})}}function Wi(e){var t=gi(),i=gi();i.className=Kt,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=gi();function s(i,n){var s=Vi(t),r=s.box,o=s.content,a=s.arrow;n.theme?r.setAttribute("data-theme",n.theme):r.removeAttribute("data-theme"),"string"==typeof n.animation?r.setAttribute("data-animation",n.animation):r.removeAttribute("data-animation"),n.inertia?r.setAttribute("data-inertia",""):r.removeAttribute("data-inertia"),r.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?r.setAttribute("role",n.role):r.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Hi(o,e.props),n.arrow?a?i.arrow!==n.arrow&&(r.removeChild(a),r.appendChild(Ui(n.arrow))):r.appendChild(Ui(n.arrow)):a&&r.removeChild(a)}return n.className=Jt,n.setAttribute("data-state","hidden"),Hi(n,e.props),t.appendChild(i),i.appendChild(n),s(e.props,e.props),{popper:t,onUpdate:s}}Wi.$$tippy=!0;var Gi=1,Yi=[],Qi=[];function Ki(e,t){var i,n,s,r,o,a,l,c=Mi(e,Object.assign({},Ni,Fi(hi(t)))),d=!1,p=!1,u=!1,h=!1,g=[],f=oi(K,c.interactiveDebounce),m=Gi++,b=null,y=di(c.plugins),v={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:m,reference:e,popper:gi(),popperInstance:b,props:c,state:v,plugins:y,clearDelayTimeouts:le,setProps:ce,setContent:de,show:pe,hide:ue,hideWithInteractivity:he,enable:oe,disable:ae,unmount:ge,destroy:fe};if(!c.render)return _;var w=c.render(_),x=w.popper,k=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+_.id,_.popper=x,e._tippy=_,x._tippy=_;var A=y.map(function(e){return e.fn(_)}),S=e.hasAttribute("aria-expanded");return G(),P(),R(),j("onCreate",[_]),c.showOnCreate&&se(),x.addEventListener("mouseenter",function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()}),x.addEventListener("mouseleave",function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&T().addEventListener("mousemove",f)}),_;function O(){var e=_.props.touch;return Array.isArray(e)?e:[e,0]}function E(){return"hold"===O()[0]}function $(){var e;return!(null==(e=_.props.render)||!e.$$tippy)}function C(){return l||e}function T(){var e=C().parentNode;return e?xi(e):document}function I(){return Vi(x)}function L(e){return _.state.isMounted&&!_.state.isVisible||Oi.isTouch||r&&"focus"===r.type?0:ni(_.props.delay,e?0:1,Ni.delay)}function R(e){void 0===e&&(e=!1),x.style.pointerEvents=_.props.interactive&&!e?"":"none",x.style.zIndex=""+_.props.zIndex}function j(e,t,i){var n;(void 0===i&&(i=!0),A.forEach(function(i){i[e]&&i[e].apply(i,t)}),i)&&(n=_.props)[e].apply(n,t)}function N(){var t=_.props.aria;if(t.content){var i="aria-"+t.content,n=x.id;li(_.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(i);if(_.state.isVisible)e.setAttribute(i,t?t+" "+n:n);else{var s=t&&t.replace(n,"").trim();s?e.setAttribute(i,s):e.removeAttribute(i)}})}}function P(){!S&&_.props.aria.expanded&&li(_.props.triggerTarget||e).forEach(function(e){_.props.interactive?e.setAttribute("aria-expanded",_.state.isVisible&&e===C()?"true":"false"):e.removeAttribute("aria-expanded")})}function D(){T().removeEventListener("mousemove",f),Yi=Yi.filter(function(e){return e!==f})}function F(t){if(!Oi.isTouch||!u&&"mousedown"!==t.type){var i=t.composedPath&&t.composedPath()[0]||t.target;if(!_.props.interactive||!Si(x,i)){if(li(_.props.triggerTarget||e).some(function(e){return Si(e,i)})){if(Oi.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[_,t]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),p=!0,setTimeout(function(){p=!1}),_.state.isMounted||z())}}}function B(){u=!0}function M(){u=!1}function q(){var e=T();e.addEventListener("mousedown",F,!0),e.addEventListener("touchend",F,ti),e.addEventListener("touchstart",M,ti),e.addEventListener("touchmove",B,ti)}function z(){var e=T();e.removeEventListener("mousedown",F,!0),e.removeEventListener("touchend",F,ti),e.removeEventListener("touchstart",M,ti),e.removeEventListener("touchmove",B,ti)}function U(e,t){V(e,function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()})}function H(e,t){V(e,t)}function V(e,t){var i=I().box;function n(e){e.target===i&&(Ai(i,"remove",n),t())}if(0===e)return t();Ai(i,"remove",o),Ai(i,"add",n),o=n}function W(t,i,n){void 0===n&&(n=!1),li(_.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,i,n),g.push({node:e,eventType:t,handler:i,options:n})})}function G(){E()&&(W("touchstart",Q,{passive:!0}),W("touchend",J,{passive:!0})),ai(_.props.trigger).forEach(function(e){if("manual"!==e)switch(W(e,Q),e){case"mouseenter":W("mouseleave",J);break;case"focus":W(Li?"focusout":"blur",Z);break;case"focusin":W("focusout",Z)}})}function Y(){g.forEach(function(e){var t=e.node,i=e.eventType,n=e.handler,s=e.options;t.removeEventListener(i,n,s)}),g=[]}function Q(e){var t,i=!1;if(_.state.isEnabled&&!X(e)&&!p){var n="focus"===(null==(t=r)?void 0:t.type);r=e,l=e.currentTarget,P(),!_.state.isVisible&&bi(e)&&Yi.forEach(function(t){return t(e)}),"click"===e.type&&(_.props.trigger.indexOf("mouseenter")<0||d)&&!1!==_.props.hideOnClick&&_.state.isVisible?i=!0:se(e),"click"===e.type&&(d=!i),i&&!n&&re(e)}}function K(e){var t=e.target,i=C().contains(t)||x.contains(t);if("mousemove"!==e.type||!i){var n=ne().concat(x).map(function(e){var t,i=null==(t=e._tippy.popperInstance)?void 0:t.state;return i?{popperRect:e.getBoundingClientRect(),popperState:i,props:c}:null}).filter(Boolean);ki(n,e)&&(D(),re(e))}}function J(e){X(e)||_.props.trigger.indexOf("click")>=0&&d||(_.props.interactive?_.hideWithInteractivity(e):re(e))}function Z(e){_.props.trigger.indexOf("focusin")<0&&e.target!==C()||_.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||re(e)}function X(e){return!!Oi.isTouch&&E()!==e.type.indexOf("touch")>=0}function ee(){te();var t=_.props,i=t.popperOptions,n=t.placement,s=t.offset,r=t.getReferenceClientRect,o=t.moveTransition,l=$()?Vi(x).arrow:null,c=r?{getBoundingClientRect:r,contextElement:r.contextElement||C()}:e,d={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if($()){var i=I().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?i.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?i.setAttribute("data-"+e,""):i.removeAttribute("data-"+e)}),t.attributes.popper={}}}},p=[{name:"offset",options:{offset:s}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!o}},d];$()&&l&&p.push({name:"arrow",options:{element:l,padding:3}}),p.push.apply(p,(null==i?void 0:i.modifiers)||[]),_.popperInstance=Qt(c,x,Object.assign({},i,{placement:n,onFirstUpdate:a,modifiers:p}))}function te(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function ie(){var e,t=_.props.appendTo,i=C();(e=_.props.interactive&&t===ii||"parent"===t?i.parentNode:ri(t,[i])).contains(x)||e.appendChild(x),_.state.isMounted=!0,ee()}function ne(){return ui(x.querySelectorAll("[data-tippy-root]"))}function se(e){_.clearDelayTimeouts(),e&&j("onTrigger",[_,e]),q();var t=L(!0),n=O(),s=n[0],r=n[1];Oi.isTouch&&"hold"===s&&r&&(t=r),t?i=setTimeout(function(){_.show()},t):_.show()}function re(e){if(_.clearDelayTimeouts(),j("onUntrigger",[_,e]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=L(!1);t?n=setTimeout(function(){_.state.isVisible&&_.hide()},t):s=requestAnimationFrame(function(){_.hide()})}}else z()}function oe(){_.state.isEnabled=!0}function ae(){_.hide(),_.state.isEnabled=!1}function le(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(s)}function ce(t){if(!_.state.isDestroyed){j("onBeforeUpdate",[_,t]),Y();var i=_.props,n=Mi(e,Object.assign({},i,hi(t),{ignoreAttributes:!0}));_.props=n,G(),i.interactiveDebounce!==n.interactiveDebounce&&(D(),f=oi(K,n.interactiveDebounce)),i.triggerTarget&&!n.triggerTarget?li(i.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):n.triggerTarget&&e.removeAttribute("aria-expanded"),P(),R(),k&&k(i,n),_.popperInstance&&(ee(),ne().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})),j("onAfterUpdate",[_,t])}}function de(e){_.setProps({content:e})}function pe(){var e=_.state.isVisible,t=_.state.isDestroyed,i=!_.state.isEnabled,n=Oi.isTouch&&!_.props.touch,s=ni(_.props.duration,0,Ni.duration);if(!(e||t||i||n||C().hasAttribute("disabled")||(j("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,$()&&(x.style.visibility="visible"),R(),q(),_.state.isMounted||(x.style.transition="none"),$()){var r=I();_i([r.box,r.content],0)}a=function(){var e;if(_.state.isVisible&&!h){if(h=!0,x.offsetHeight,x.style.transition=_.props.moveTransition,$()&&_.props.animation){var t=I(),i=t.box,n=t.content;_i([i,n],s),wi([i,n],"visible")}N(),P(),ci(Qi,_),null==(e=_.popperInstance)||e.forceUpdate(),j("onMount",[_]),_.props.animation&&$()&&H(s,function(){_.state.isShown=!0,j("onShown",[_])})}},ie()}}function ue(){var e=!_.state.isVisible,t=_.state.isDestroyed,i=!_.state.isEnabled,n=ni(_.props.duration,1,Ni.duration);if(!(e||t||i)&&(j("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,h=!1,d=!1,$()&&(x.style.visibility="hidden"),D(),z(),R(!0),$()){var s=I(),r=s.box,o=s.content;_.props.animation&&(_i([r,o],n),wi([r,o],"hidden"))}N(),P(),_.props.animation?$()&&U(n,_.unmount):_.unmount()}}function he(e){T().addEventListener("mousemove",f),ci(Yi,f),f(e)}function ge(){_.state.isVisible&&_.hide(),_.state.isMounted&&(te(),ne().forEach(function(e){e._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x),Qi=Qi.filter(function(e){return e!==_}),_.state.isMounted=!1,j("onHidden",[_]))}function fe(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),Y(),delete e._tippy,_.state.isDestroyed=!0,j("onDestroy",[_]))}}function Ji(e,t){void 0===t&&(t={});var i=Ni.plugins.concat(t.plugins||[]);Ii();var n=Object.assign({},t,{plugins:i}),s=vi(e).reduce(function(e,t){var i=t&&Ki(t,n);return i&&e.push(i),e},[]);return fi(e)?s[0]:s}function Zi(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,t)=>0===+e?"":0===t?e.toLowerCase():e.toUpperCase()).replace("-","")}Ji.defaultProps=Ni,Ji.setDefaultProps=Di,Ji.currentInput=Oi,Object.assign({},Te,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}}),Ji.setDefaultProps({render:Wi});const Xi='\n .tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n }\n\n .tippy-iOS {\n cursor: pointer!important;\n -webkit-tap-highlight-color: transparent\n }\n\n [data-tippy-root] {\n max-width: calc(100vw - 10px)\n }\n\n .tippy-box {\n position: relative;\n background-color: #333;\n color: #fff;\n border-radius: 4px;\n font-size: clamp(\n calc(var(--pb-popover-font-size, 1rem) * var(--pb-min-zoom, 0.5)), \n calc(var(--pb-popover-font-size, 1rem) * var(--pb-zoom-factor)), \n calc(var(--pb-popover-font-size, 1rem) * var(--pb-max-zoom, 3.0))\n );\n line-height: calc(var(--pb-popover-line-height, 1.5) * var(--pb-zoom-factor));\n\n text-align: left;\n font-style: normal;\n font-weight: normal;\n outline: 0;\n transition-property: transform, visibility, opacity;\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow {\n bottom: 0\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow:before {\n bottom: -7px;\n left: 0;\n border-width: 8px 8px 0;\n border-top-color: initial;\n transform-origin: center top\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow {\n top: 0\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow:before {\n top: -7px;\n left: 0;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n transform-origin: center bottom\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow {\n right: 0\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow:before {\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n right: -7px;\n transform-origin: center left\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow {\n left: 0\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n transform-origin: center right\n }\n\n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11)\n }\n\n .tippy-arrow {\n width: 16px;\n height: 16px;\n color: #333\n }\n\n .tippy-arrow:before {\n content: "";\n position: absolute;\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-content {\n position: relative;\n padding: 5px 9px;\n z-index: 1;\n overflow: auto;\n max-height: var(--pb-popover-max-height, calc(100vh - 60px));\n min-height: var(--pb-popover-min-height, auto);\n max-width: var(--pb-popover-max-width, auto);\n min-width: var(--pb-popover-min-width, auto);\n color: var(--pb-popover-color);\n }\n',en='\n .tippy-box[data-theme~=light-border] {\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 8, 16, .15);\n color: #333;\n box-shadow: 0 4px 14px -2px rgba(0, 8, 16, .08)\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after, .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n content: "";\n position: absolute;\n z-index: -1\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after {\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:after {\n border-top-color: rgba(0, 8, 16, .2);\n border-width: 7px 7px 0;\n top: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow>svg {\n top: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow:after {\n top: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff;\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:after {\n border-bottom-color: rgba(0, 8, 16, .2);\n border-width: 0 7px 7px;\n bottom: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow>svg {\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow:after {\n bottom: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:after {\n border-left-color: rgba(0, 8, 16, .2);\n border-width: 7px 0 7px 7px;\n left: 17px;\n top: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow>svg {\n left: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow:after {\n left: 12px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff;\n right: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:after {\n border-width: 7px 7px 7px 0;\n right: 17px;\n top: 1px;\n border-right-color: rgba(0, 8, 16, .2)\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow>svg {\n right: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow:after {\n right: 12px\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow {\n fill: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=);\n background-size: 16px 6px;\n width: 16px;\n height: 6px\n }\n',tn="\n .tippy-box[data-theme~=light] {\n color: #26323d;\n box-shadow: 0 0 20px 4px rgba(154, 161, 177, .15), 0 4px 80px -8px rgba(36, 40, 47, .25), 0 4px 4px -2px rgba(91, 94, 105, .15);\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-svg-arrow {\n fill: #fff\n }",nn="\n .tippy-box[data-theme~=material] {\n background-color: #505355;\n font-weight: 600\n }\n\n .tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-backdrop {\n background-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-svg-arrow {\n fill: #505355\n }\n",sn="\n .tippy-box[data-theme~=translucent] {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-arrow {\n width: 14px;\n height: 14px\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=top]>.tippy-arrow:before {\n border-width: 7px 7px 0;\n border-top-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=bottom]>.tippy-arrow:before {\n border-width: 0 7px 7px;\n border-bottom-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=left]>.tippy-arrow:before {\n border-width: 7px 0 7px 7px;\n border-left-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=right]>.tippy-arrow:before {\n border-width: 7px 7px 7px 0;\n border-right-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-backdrop {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-svg-arrow {\n fill: rgba(0, 0, 0, .7)\n }\n";var rn=Object.freeze({__proto__:null,base:Xi,camelize:Zi,light:tn,lightBorder:en,material:nn,translucent:sn});function on(e,t,i){if(!e.querySelector(`#pb-popover-${t}`)){const n=e.nodeType===Node.DOCUMENT_NODE?document.head:e;m.log("Loading tippy styles for theme %s into %o",t,n);const s=document.createElement("style");s.type="text/css",s.id=`pb-popover-${t}`,s.innerHTML=i,n.appendChild(s)}}function an(e,t){if(on(e,"base",Xi),t&&"none"!==t){const i=Zi(t),n=rn[i];n&&on(e,i,n)}}class ln extends(o(s)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{for:{type:String},theme:{type:String},placement:{type:String},fallbackPlacement:{type:String,attribute:"fallback-placement"},persistent:{type:Boolean},trigger:{type:String},touch:{type:String},popupClass:{type:String,attribute:"popup-class"},remote:{type:String},stopPropagation:{type:Boolean,attribute:"stop-propagation"}})}constructor(){super(),this.persistent=!1,this.trigger=null,this.for=null,this.theme=null,this.placement=null,this.touch=null,this.fallbackPlacement=null,this.popupClass=null,this.stopPropagation=!1,this._tippy=null,this._content=null}render(){return this.for?t`<div class="hidden"><slot></slot></div>`:t`<span id="link" part="trigger" class="${this.persistent?"persistent":""}"
|
|
133
|
+
`}customElements.define("pb-demo-snippet",re);const oe="3.0.0-next-4.18";class ae extends s{static get properties(){return Object.assign({version:{type:String,reflect:!0}},super.properties)}constructor(){super(),this.version=oe}render(){return t`<span>${this.version?this.version:"unknown"}</span>`}createRenderRoot(){return this}}customElements.define("pb-version",ae);var le="top",ce="bottom",de="right",pe="left",ue="auto",he=[le,ce,de,pe],ge="start",fe="end",me="clippingParents",be="viewport",ye="popper",ve="reference",_e=he.reduce(function(e,t){return e.concat([t+"-"+ge,t+"-"+fe])},[]),we=[].concat(he,[ue]).reduce(function(e,t){return e.concat([t,t+"-"+ge,t+"-"+fe])},[]),xe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ke(e){return e?(e.nodeName||"").toLowerCase():null}function Ae(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Se(e){return e instanceof Ae(e).Element||e instanceof Element}function Oe(e){return e instanceof Ae(e).HTMLElement||e instanceof HTMLElement}function Ee(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Ae(e).ShadowRoot||e instanceof ShadowRoot)}function $e(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},s=t.elements[e];Oe(s)&&ke(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(e){var t=n[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)}))})}function Ce(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],s=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce(function(e,t){return e[t]="",e},{});Oe(n)&&ke(n)&&(Object.assign(n.style,r),Object.keys(s).forEach(function(e){n.removeAttribute(e)}))})}}var Te={name:"applyStyles",enabled:!0,phase:"write",fn:$e,effect:Ce,requires:["computeStyles"]};function Ie(e){return e.split("-")[0]}var Le=Math.max,Re=Math.min,je=Math.round;function Ne(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Pe(){return!/^((?!chrome|android).)*safari/i.test(Ne())}function De(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var n=e.getBoundingClientRect(),s=1,r=1;t&&Oe(e)&&(s=e.offsetWidth>0&&je(n.width)/e.offsetWidth||1,r=e.offsetHeight>0&&je(n.height)/e.offsetHeight||1);var o=(Se(e)?Ae(e):window).visualViewport,a=!Pe()&&i,l=(n.left+(a&&o?o.offsetLeft:0))/s,c=(n.top+(a&&o?o.offsetTop:0))/r,d=n.width/s,p=n.height/r;return{width:d,height:p,top:c,right:l+d,bottom:c+p,left:l,x:l,y:c}}function Fe(e){var t=De(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function Be(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Ee(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Me(e){return Ae(e).getComputedStyle(e)}function qe(e){return["table","td","th"].indexOf(ke(e))>=0}function ze(e){return((Se(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ue(e){return"html"===ke(e)?e:e.assignedSlot||e.parentNode||(Ee(e)?e.host:null)||ze(e)}function He(e){return Oe(e)&&"fixed"!==Me(e).position?e.offsetParent:null}function Ve(e){var t=/firefox/i.test(Ne());if(/Trident/i.test(Ne())&&Oe(e)&&"fixed"===Me(e).position)return null;var i=Ue(e);for(Ee(i)&&(i=i.host);Oe(i)&&["html","body"].indexOf(ke(i))<0;){var n=Me(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function We(e){for(var t=Ae(e),i=He(e);i&&qe(i)&&"static"===Me(i).position;)i=He(i);return i&&("html"===ke(i)||"body"===ke(i)&&"static"===Me(i).position)?t:i||Ve(e)||t}function Ge(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ye(e,t,i){return Le(e,Re(t,i))}function Qe(e,t,i){var n=Ye(e,t,i);return n>i?i:n}function Ke(){return{top:0,right:0,bottom:0,left:0}}function Je(e){return Object.assign({},Ke(),e)}function Ze(e,t){return t.reduce(function(t,i){return t[i]=e,t},{})}var Xe=function(e,t){return Je("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Ze(e,he))};function et(e){var t,i=e.state,n=e.name,s=e.options,r=i.elements.arrow,o=i.modifiersData.popperOffsets,a=Ie(i.placement),l=Ge(a),c=[pe,de].indexOf(a)>=0?"height":"width";if(r&&o){var d=Xe(s.padding,i),p=Fe(r),u="y"===l?le:pe,h="y"===l?ce:de,g=i.rects.reference[c]+i.rects.reference[l]-o[l]-i.rects.popper[c],f=o[l]-i.rects.reference[l],m=We(r),b=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=g/2-f/2,v=d[u],_=b-p[c]-d[h],w=b/2-p[c]/2+y,x=Ye(v,w,_),k=l;i.modifiersData[n]=((t={})[k]=x,t.centerOffset=x-w,t)}}function tt(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&Be(t.elements.popper,n)&&(t.elements.arrow=n)}function it(e){return e.split("-")[1]}var nt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function st(e,t){var i=e.x,n=e.y,s=t.devicePixelRatio||1;return{x:je(i*s)/s||0,y:je(n*s)/s||0}}function rt(e){var t,i=e.popper,n=e.popperRect,s=e.placement,r=e.variation,o=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,p=e.isFixed,u=o.x,h=void 0===u?0:u,g=o.y,f=void 0===g?0:g,m="function"==typeof d?d({x:h,y:f}):{x:h,y:f};h=m.x,f=m.y;var b=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),v=pe,_=le,w=window;if(c){var x=We(i),k="clientHeight",A="clientWidth";if(x===Ae(i)&&"static"!==Me(x=ze(i)).position&&"absolute"===a&&(k="scrollHeight",A="scrollWidth"),s===le||(s===pe||s===de)&&r===fe)_=ce,f-=(p&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-n.height,f*=l?1:-1;if(s===pe||(s===le||s===ce)&&r===fe)v=de,h-=(p&&x===w&&w.visualViewport?w.visualViewport.width:x[A])-n.width,h*=l?1:-1}var S,O=Object.assign({position:a},c&&nt),E=!0===d?st({x:h,y:f},Ae(i)):{x:h,y:f};return h=E.x,f=E.y,l?Object.assign({},O,((S={})[_]=y?"0":"",S[v]=b?"0":"",S.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+f+"px)":"translate3d("+h+"px, "+f+"px, 0)",S)):Object.assign({},O,((t={})[_]=y?f+"px":"",t[v]=b?h+"px":"",t.transform="",t))}function ot(e){var t=e.state,i=e.options,n=i.gpuAcceleration,s=void 0===n||n,r=i.adaptive,o=void 0===r||r,a=i.roundOffsets,l=void 0===a||a,c={placement:Ie(t.placement),variation:it(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,rt(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,rt(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var at={passive:!0};function lt(e){var t=e.state,i=e.instance,n=e.options,s=n.scroll,r=void 0===s||s,o=n.resize,a=void 0===o||o,l=Ae(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&c.forEach(function(e){e.addEventListener("scroll",i.update,at)}),a&&l.addEventListener("resize",i.update,at),function(){r&&c.forEach(function(e){e.removeEventListener("scroll",i.update,at)}),a&&l.removeEventListener("resize",i.update,at)}}var ct={left:"right",right:"left",bottom:"top",top:"bottom"};function dt(e){return e.replace(/left|right|bottom|top/g,function(e){return ct[e]})}var pt={start:"end",end:"start"};function ut(e){return e.replace(/start|end/g,function(e){return pt[e]})}function ht(e){var t=Ae(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function gt(e){return De(ze(e)).left+ht(e).scrollLeft}function ft(e,t){var i=Ae(e),n=ze(e),s=i.visualViewport,r=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=Pe();(c||!c&&"fixed"===t)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+gt(e),y:l}}function mt(e){var t,i=ze(e),n=ht(e),s=null==(t=e.ownerDocument)?void 0:t.body,r=Le(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Le(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+gt(e),l=-n.scrollTop;return"rtl"===Me(s||i).direction&&(a+=Le(i.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function bt(e){var t=Me(e),i=t.overflow,n=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function yt(e){return["html","body","#document"].indexOf(ke(e))>=0?e.ownerDocument.body:Oe(e)&&bt(e)?e:yt(Ue(e))}function vt(e,t){var i;void 0===t&&(t=[]);var n=yt(e),s=n===(null==(i=e.ownerDocument)?void 0:i.body),r=Ae(n),o=s?[r].concat(r.visualViewport||[],bt(n)?n:[]):n,a=t.concat(o);return s?a:a.concat(vt(Ue(o)))}function _t(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function wt(e,t){var i=De(e,!1,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function xt(e,t,i){return t===be?_t(ft(e,i)):Se(t)?wt(t,i):_t(mt(ze(e)))}function kt(e){var t=vt(Ue(e)),i=["absolute","fixed"].indexOf(Me(e).position)>=0&&Oe(e)?We(e):e;return Se(i)?t.filter(function(e){return Se(e)&&Be(e,i)&&"body"!==ke(e)}):[]}function At(e,t,i,n){var s="clippingParents"===t?kt(e):[].concat(t),r=[].concat(s,[i]),o=r[0],a=r.reduce(function(t,i){var s=xt(e,i,n);return t.top=Le(s.top,t.top),t.right=Re(s.right,t.right),t.bottom=Re(s.bottom,t.bottom),t.left=Le(s.left,t.left),t},xt(e,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function St(e){var t,i=e.reference,n=e.element,s=e.placement,r=s?Ie(s):null,o=s?it(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(r){case le:t={x:a,y:i.y-n.height};break;case ce:t={x:a,y:i.y+i.height};break;case de:t={x:i.x+i.width,y:l};break;case pe:t={x:i.x-n.width,y:l};break;default:t={x:i.x,y:i.y}}var c=r?Ge(r):null;if(null!=c){var d="y"===c?"height":"width";switch(o){case ge:t[c]=t[c]-(i[d]/2-n[d]/2);break;case fe:t[c]=t[c]+(i[d]/2-n[d]/2)}}return t}function Ot(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=void 0===n?e.placement:n,r=i.strategy,o=void 0===r?e.strategy:r,a=i.boundary,l=void 0===a?me:a,c=i.rootBoundary,d=void 0===c?be:c,p=i.elementContext,u=void 0===p?ye:p,h=i.altBoundary,g=void 0!==h&&h,f=i.padding,m=void 0===f?0:f,b=Je("number"!=typeof m?m:Ze(m,he)),y=u===ye?ve:ye,v=e.rects.popper,_=e.elements[g?y:u],w=At(Se(_)?_:_.contextElement||ze(e.elements.popper),l,d,o),x=De(e.elements.reference),k=St({reference:x,element:v,placement:s}),A=_t(Object.assign({},v,k)),S=u===ye?A:x,O={top:w.top-S.top+b.top,bottom:S.bottom-w.bottom+b.bottom,left:w.left-S.left+b.left,right:S.right-w.right+b.right},E=e.modifiersData.offset;if(u===ye&&E){var $=E[s];Object.keys(O).forEach(function(e){var t=[de,ce].indexOf(e)>=0?1:-1,i=[le,ce].indexOf(e)>=0?"y":"x";O[e]+=$[i]*t})}return O}function Et(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=i.boundary,r=i.rootBoundary,o=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?we:l,d=it(n),p=d?a?_e:_e.filter(function(e){return it(e)===d}):he,u=p.filter(function(e){return c.indexOf(e)>=0});0===u.length&&(u=p);var h=u.reduce(function(t,i){return t[i]=Ot(e,{placement:i,boundary:s,rootBoundary:r,padding:o})[Ie(i)],t},{});return Object.keys(h).sort(function(e,t){return h[e]-h[t]})}function $t(e){if(Ie(e)===ue)return[];var t=dt(e);return[ut(e),t,ut(t)]}function Ct(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var s=i.mainAxis,r=void 0===s||s,o=i.altAxis,a=void 0===o||o,l=i.fallbackPlacements,c=i.padding,d=i.boundary,p=i.rootBoundary,u=i.altBoundary,h=i.flipVariations,g=void 0===h||h,f=i.allowedAutoPlacements,m=t.options.placement,b=Ie(m),y=l||(b===m||!g?[dt(m)]:$t(m)),v=[m].concat(y).reduce(function(e,i){return e.concat(Ie(i)===ue?Et(t,{placement:i,boundary:d,rootBoundary:p,padding:c,flipVariations:g,allowedAutoPlacements:f}):i)},[]),_=t.rects.reference,w=t.rects.popper,x=new Map,k=!0,A=v[0],S=0;S<v.length;S++){var O=v[S],E=Ie(O),$=it(O)===ge,C=[le,ce].indexOf(E)>=0,T=C?"width":"height",I=Ot(t,{placement:O,boundary:d,rootBoundary:p,altBoundary:u,padding:c}),L=C?$?de:pe:$?ce:le;_[T]>w[T]&&(L=dt(L));var R=dt(L),j=[];if(r&&j.push(I[E]<=0),a&&j.push(I[L]<=0,I[R]<=0),j.every(function(e){return e})){A=O,k=!1;break}x.set(O,j)}if(k)for(var N=function(e){var t=v.find(function(t){var i=x.get(t);if(i)return i.slice(0,e).every(function(e){return e})});if(t)return A=t,"break"},P=g?3:1;P>0;P--){if("break"===N(P))break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}function Tt(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function It(e){return[le,de,ce,pe].some(function(t){return e[t]>=0})}function Lt(e){var t=e.state,i=e.name,n=t.rects.reference,s=t.rects.popper,r=t.modifiersData.preventOverflow,o=Ot(t,{elementContext:"reference"}),a=Ot(t,{altBoundary:!0}),l=Tt(o,n),c=Tt(a,s,r),d=It(l),p=It(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}function Rt(e,t,i){var n=Ie(e),s=[pe,le].indexOf(n)>=0?-1:1,r="function"==typeof i?i(Object.assign({},t,{placement:e})):i,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[pe,de].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function jt(e){var t=e.state,i=e.options,n=e.name,s=i.offset,r=void 0===s?[0,0]:s,o=we.reduce(function(e,i){return e[i]=Rt(i,t.rects,r),e},{}),a=o[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=o}function Nt(e){var t=e.state,i=e.name;t.modifiersData[i]=St({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}function Pt(e){return"x"===e?"y":"x"}function Dt(e){var t=e.state,i=e.options,n=e.name,s=i.mainAxis,r=void 0===s||s,o=i.altAxis,a=void 0!==o&&o,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,p=i.padding,u=i.tether,h=void 0===u||u,g=i.tetherOffset,f=void 0===g?0:g,m=Ot(t,{boundary:l,rootBoundary:c,padding:p,altBoundary:d}),b=Ie(t.placement),y=it(t.placement),v=!y,_=Ge(b),w=Pt(_),x=t.modifiersData.popperOffsets,k=t.rects.reference,A=t.rects.popper,S="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,O="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(x){if(r){var C,T="y"===_?le:pe,I="y"===_?ce:de,L="y"===_?"height":"width",R=x[_],j=R+m[T],N=R-m[I],P=h?-A[L]/2:0,D=y===ge?k[L]:A[L],F=y===ge?-A[L]:-k[L],B=t.elements.arrow,M=h&&B?Fe(B):{width:0,height:0},q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ke(),z=q[T],U=q[I],H=Ye(0,k[L],M[L]),V=v?k[L]/2-P-H-z-O.mainAxis:D-H-z-O.mainAxis,W=v?-k[L]/2+P+H+U+O.mainAxis:F+H+U+O.mainAxis,G=t.elements.arrow&&We(t.elements.arrow),Y=G?"y"===_?G.clientTop||0:G.clientLeft||0:0,Q=null!=(C=null==E?void 0:E[_])?C:0,K=R+W-Q,J=Ye(h?Re(j,R+V-Q-Y):j,R,h?Le(N,K):N);x[_]=J,$[_]=J-R}if(a){var Z,X="x"===_?le:pe,ee="x"===_?ce:de,te=x[w],ie="y"===w?"height":"width",ne=te+m[X],se=te-m[ee],re=-1!==[le,pe].indexOf(b),oe=null!=(Z=null==E?void 0:E[w])?Z:0,ae=re?ne:te-k[ie]-A[ie]-oe+O.altAxis,ue=re?te+k[ie]+A[ie]-oe-O.altAxis:se,he=h&&re?Qe(ae,te,ue):Ye(h?ae:ne,te,h?ue:se);x[w]=he,$[w]=he-te}t.modifiersData[n]=$}}function Ft(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Bt(e){return e!==Ae(e)&&Oe(e)?Ft(e):ht(e)}function Mt(e){var t=e.getBoundingClientRect(),i=je(t.width)/e.offsetWidth||1,n=je(t.height)/e.offsetHeight||1;return 1!==i||1!==n}function qt(e,t,i){void 0===i&&(i=!1);var n=Oe(t),s=Oe(t)&&Mt(t),r=ze(t),o=De(e,s,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==ke(t)||bt(r))&&(a=Bt(t)),Oe(t)?((l=De(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=gt(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function zt(e){var t=new Map,i=new Set,n=[];function s(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!i.has(e)){var n=t.get(e);n&&s(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){i.has(e.name)||s(e)}),n}function Ut(e){var t=zt(e);return xe.reduce(function(e,i){return e.concat(t.filter(function(e){return e.phase===i}))},[])}function Ht(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function Vt(e){var t=e.reduce(function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var Wt={placement:"bottom",modifiers:[],strategy:"absolute"};function Gt(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Yt(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,n=void 0===i?[]:i,s=t.defaultOptions,r=void 0===s?Wt:s;return function(e,t,i){void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Wt,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],a=!1,l={state:s,setOptions:function(i){var o="function"==typeof i?i(s.options):i;d(),s.options=Object.assign({},r,s.options,o),s.scrollParents={reference:Se(e)?vt(e):e.contextElement?vt(e.contextElement):[],popper:vt(t)};var a=Ut(Vt([].concat(n,s.options.modifiers)));return s.orderedModifiers=a.filter(function(e){return e.enabled}),c(),l.update()},forceUpdate:function(){if(!a){var e=s.elements,t=e.reference,i=e.popper;if(Gt(t,i)){s.rects={reference:qt(t,We(i),"fixed"===s.options.strategy),popper:Fe(i)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var r=s.orderedModifiers[n],o=r.fn,c=r.options,d=void 0===c?{}:c,p=r.name;"function"==typeof o&&(s=o({state:s,options:d,name:p,instance:l})||s)}else s.reset=!1,n=-1}}},update:Ht(function(){return new Promise(function(e){l.forceUpdate(),e(s)})}),destroy:function(){d(),a=!0}};if(!Gt(e,t))return l;function c(){s.orderedModifiers.forEach(function(e){var t=e.name,i=e.options,n=void 0===i?{}:i,r=e.effect;if("function"==typeof r){var a=r({state:s,name:t,instance:l,options:n}),c=function(){};o.push(a||c)}})}function d(){o.forEach(function(e){return e()}),o=[]}return l.setOptions(i).then(function(e){!a&&i.onFirstUpdate&&i.onFirstUpdate(e)}),l}}var Qt=Yt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:lt,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:Nt,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ot,data:{}},Te,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jt},{name:"flip",enabled:!0,phase:"main",fn:Ct,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:Dt,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:et,effect:tt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Lt}]}),Kt="tippy-box",Jt="tippy-content",Zt="tippy-backdrop",Xt="tippy-arrow",ei="tippy-svg-arrow",ti={passive:!0,capture:!0},ii=function(){return document.body};function ni(e,t,i){if(Array.isArray(e)){var n=e[t];return n??(Array.isArray(i)?i[t]:i)}return e}function si(e,t){var i={}.toString.call(e);return 0===i.indexOf("[object")&&i.indexOf(t+"]")>-1}function ri(e,t){return"function"==typeof e?e.apply(void 0,t):e}function oi(e,t){return 0===t?e:function(n){clearTimeout(i),i=setTimeout(function(){e(n)},t)};var i}function ai(e){return e.split(/\s+/).filter(Boolean)}function li(e){return[].concat(e)}function ci(e,t){-1===e.indexOf(t)&&e.push(t)}function di(e){return e.filter(function(t,i){return e.indexOf(t)===i})}function pi(e){return e.split("-")[0]}function ui(e){return[].slice.call(e)}function hi(e){return Object.keys(e).reduce(function(t,i){return void 0!==e[i]&&(t[i]=e[i]),t},{})}function gi(){return document.createElement("div")}function fi(e){return["Element","Fragment"].some(function(t){return si(e,t)})}function mi(e){return si(e,"NodeList")}function bi(e){return si(e,"MouseEvent")}function yi(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function vi(e){return fi(e)?[e]:mi(e)?ui(e):Array.isArray(e)?e:ui(document.querySelectorAll(e))}function _i(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function wi(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function xi(e){var t,i=li(e)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}function ki(e,t){var i=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,s=e.popperState,r=e.props.interactiveBorder,o=pi(s.placement),a=s.modifiersData.offset;if(!a)return!0;var l="bottom"===o?a.top.y:0,c="top"===o?a.bottom.y:0,d="right"===o?a.left.x:0,p="left"===o?a.right.x:0,u=t.top-n+l>r,h=n-t.bottom-c>r,g=t.left-i+d>r,f=i-t.right-p>r;return u||h||g||f})}function Ai(e,t,i){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,i)})}function Si(e,t){for(var i=t;i;){var n;if(e.contains(i))return!0;i=null==i.getRootNode||null==(n=i.getRootNode())?void 0:n.host}return!1}var Oi={isTouch:!1},Ei=0;function $i(){Oi.isTouch||(Oi.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ci))}function Ci(){var e=performance.now();e-Ei<20&&(Oi.isTouch=!1,document.removeEventListener("mousemove",Ci)),Ei=e}function Ti(){var e=document.activeElement;if(yi(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Ii(){document.addEventListener("touchstart",$i,ti),window.addEventListener("blur",Ti)}var Li=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,Ri={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ji={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ni=Object.assign({appendTo:ii,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ri,ji),Pi=Object.keys(Ni),Di=function(e){Object.keys(e).forEach(function(t){Ni[t]=e[t]})};function Fi(e){var t=(e.plugins||[]).reduce(function(t,i){var n,s=i.name,r=i.defaultValue;s&&(t[s]=void 0!==e[s]?e[s]:null!=(n=Ni[s])?n:r);return t},{});return Object.assign({},e,t)}function Bi(e,t){var i=(t?Object.keys(Fi(Object.assign({},Ni,{plugins:t}))):Pi).reduce(function(t,i){var n=(e.getAttribute("data-tippy-"+i)||"").trim();if(!n)return t;if("content"===i)t[i]=n;else try{t[i]=JSON.parse(n)}catch(e){t[i]=n}return t},{});return i}function Mi(e,t){var i=Object.assign({},t,{content:ri(t.content,[e])},t.ignoreAttributes?{}:Bi(e,t.plugins));return i.aria=Object.assign({},Ni.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?t.interactive:i.aria.expanded,content:"auto"===i.aria.content?t.interactive?null:"describedby":i.aria.content},i}var qi=function(){return"innerHTML"};function zi(e,t){e[qi()]=t}function Ui(e){var t=gi();return!0===e?t.className=Xt:(t.className=ei,fi(e)?t.appendChild(e):zi(t,e)),t}function Hi(e,t){fi(t.content)?(zi(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?zi(e,t.content):e.textContent=t.content)}function Vi(e){var t=e.firstElementChild,i=ui(t.children);return{box:t,content:i.find(function(e){return e.classList.contains(Jt)}),arrow:i.find(function(e){return e.classList.contains(Xt)||e.classList.contains(ei)}),backdrop:i.find(function(e){return e.classList.contains(Zt)})}}function Wi(e){var t=gi(),i=gi();i.className=Kt,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=gi();function s(i,n){var s=Vi(t),r=s.box,o=s.content,a=s.arrow;n.theme?r.setAttribute("data-theme",n.theme):r.removeAttribute("data-theme"),"string"==typeof n.animation?r.setAttribute("data-animation",n.animation):r.removeAttribute("data-animation"),n.inertia?r.setAttribute("data-inertia",""):r.removeAttribute("data-inertia"),r.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?r.setAttribute("role",n.role):r.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Hi(o,e.props),n.arrow?a?i.arrow!==n.arrow&&(r.removeChild(a),r.appendChild(Ui(n.arrow))):r.appendChild(Ui(n.arrow)):a&&r.removeChild(a)}return n.className=Jt,n.setAttribute("data-state","hidden"),Hi(n,e.props),t.appendChild(i),i.appendChild(n),s(e.props,e.props),{popper:t,onUpdate:s}}Wi.$$tippy=!0;var Gi=1,Yi=[],Qi=[];function Ki(e,t){var i,n,s,r,o,a,l,c=Mi(e,Object.assign({},Ni,Fi(hi(t)))),d=!1,p=!1,u=!1,h=!1,g=[],f=oi(K,c.interactiveDebounce),m=Gi++,b=null,y=di(c.plugins),v={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},_={id:m,reference:e,popper:gi(),popperInstance:b,props:c,state:v,plugins:y,clearDelayTimeouts:le,setProps:ce,setContent:de,show:pe,hide:ue,hideWithInteractivity:he,enable:oe,disable:ae,unmount:ge,destroy:fe};if(!c.render)return _;var w=c.render(_),x=w.popper,k=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+_.id,_.popper=x,e._tippy=_,x._tippy=_;var A=y.map(function(e){return e.fn(_)}),S=e.hasAttribute("aria-expanded");return G(),P(),R(),j("onCreate",[_]),c.showOnCreate&&se(),x.addEventListener("mouseenter",function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()}),x.addEventListener("mouseleave",function(){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&T().addEventListener("mousemove",f)}),_;function O(){var e=_.props.touch;return Array.isArray(e)?e:[e,0]}function E(){return"hold"===O()[0]}function $(){var e;return!(null==(e=_.props.render)||!e.$$tippy)}function C(){return l||e}function T(){var e=C().parentNode;return e?xi(e):document}function I(){return Vi(x)}function L(e){return _.state.isMounted&&!_.state.isVisible||Oi.isTouch||r&&"focus"===r.type?0:ni(_.props.delay,e?0:1,Ni.delay)}function R(e){void 0===e&&(e=!1),x.style.pointerEvents=_.props.interactive&&!e?"":"none",x.style.zIndex=""+_.props.zIndex}function j(e,t,i){var n;(void 0===i&&(i=!0),A.forEach(function(i){i[e]&&i[e].apply(i,t)}),i)&&(n=_.props)[e].apply(n,t)}function N(){var t=_.props.aria;if(t.content){var i="aria-"+t.content,n=x.id;li(_.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(i);if(_.state.isVisible)e.setAttribute(i,t?t+" "+n:n);else{var s=t&&t.replace(n,"").trim();s?e.setAttribute(i,s):e.removeAttribute(i)}})}}function P(){!S&&_.props.aria.expanded&&li(_.props.triggerTarget||e).forEach(function(e){_.props.interactive?e.setAttribute("aria-expanded",_.state.isVisible&&e===C()?"true":"false"):e.removeAttribute("aria-expanded")})}function D(){T().removeEventListener("mousemove",f),Yi=Yi.filter(function(e){return e!==f})}function F(t){if(!Oi.isTouch||!u&&"mousedown"!==t.type){var i=t.composedPath&&t.composedPath()[0]||t.target;if(!_.props.interactive||!Si(x,i)){if(li(_.props.triggerTarget||e).some(function(e){return Si(e,i)})){if(Oi.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[_,t]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),p=!0,setTimeout(function(){p=!1}),_.state.isMounted||z())}}}function B(){u=!0}function M(){u=!1}function q(){var e=T();e.addEventListener("mousedown",F,!0),e.addEventListener("touchend",F,ti),e.addEventListener("touchstart",M,ti),e.addEventListener("touchmove",B,ti)}function z(){var e=T();e.removeEventListener("mousedown",F,!0),e.removeEventListener("touchend",F,ti),e.removeEventListener("touchstart",M,ti),e.removeEventListener("touchmove",B,ti)}function U(e,t){V(e,function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()})}function H(e,t){V(e,t)}function V(e,t){var i=I().box;function n(e){e.target===i&&(Ai(i,"remove",n),t())}if(0===e)return t();Ai(i,"remove",o),Ai(i,"add",n),o=n}function W(t,i,n){void 0===n&&(n=!1),li(_.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,i,n),g.push({node:e,eventType:t,handler:i,options:n})})}function G(){E()&&(W("touchstart",Q,{passive:!0}),W("touchend",J,{passive:!0})),ai(_.props.trigger).forEach(function(e){if("manual"!==e)switch(W(e,Q),e){case"mouseenter":W("mouseleave",J);break;case"focus":W(Li?"focusout":"blur",Z);break;case"focusin":W("focusout",Z)}})}function Y(){g.forEach(function(e){var t=e.node,i=e.eventType,n=e.handler,s=e.options;t.removeEventListener(i,n,s)}),g=[]}function Q(e){var t,i=!1;if(_.state.isEnabled&&!X(e)&&!p){var n="focus"===(null==(t=r)?void 0:t.type);r=e,l=e.currentTarget,P(),!_.state.isVisible&&bi(e)&&Yi.forEach(function(t){return t(e)}),"click"===e.type&&(_.props.trigger.indexOf("mouseenter")<0||d)&&!1!==_.props.hideOnClick&&_.state.isVisible?i=!0:se(e),"click"===e.type&&(d=!i),i&&!n&&re(e)}}function K(e){var t=e.target,i=C().contains(t)||x.contains(t);if("mousemove"!==e.type||!i){var n=ne().concat(x).map(function(e){var t,i=null==(t=e._tippy.popperInstance)?void 0:t.state;return i?{popperRect:e.getBoundingClientRect(),popperState:i,props:c}:null}).filter(Boolean);ki(n,e)&&(D(),re(e))}}function J(e){X(e)||_.props.trigger.indexOf("click")>=0&&d||(_.props.interactive?_.hideWithInteractivity(e):re(e))}function Z(e){_.props.trigger.indexOf("focusin")<0&&e.target!==C()||_.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||re(e)}function X(e){return!!Oi.isTouch&&E()!==e.type.indexOf("touch")>=0}function ee(){te();var t=_.props,i=t.popperOptions,n=t.placement,s=t.offset,r=t.getReferenceClientRect,o=t.moveTransition,l=$()?Vi(x).arrow:null,c=r?{getBoundingClientRect:r,contextElement:r.contextElement||C()}:e,d={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if($()){var i=I().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?i.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?i.setAttribute("data-"+e,""):i.removeAttribute("data-"+e)}),t.attributes.popper={}}}},p=[{name:"offset",options:{offset:s}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!o}},d];$()&&l&&p.push({name:"arrow",options:{element:l,padding:3}}),p.push.apply(p,(null==i?void 0:i.modifiers)||[]),_.popperInstance=Qt(c,x,Object.assign({},i,{placement:n,onFirstUpdate:a,modifiers:p}))}function te(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function ie(){var e,t=_.props.appendTo,i=C();(e=_.props.interactive&&t===ii||"parent"===t?i.parentNode:ri(t,[i])).contains(x)||e.appendChild(x),_.state.isMounted=!0,ee()}function ne(){return ui(x.querySelectorAll("[data-tippy-root]"))}function se(e){_.clearDelayTimeouts(),e&&j("onTrigger",[_,e]),q();var t=L(!0),n=O(),s=n[0],r=n[1];Oi.isTouch&&"hold"===s&&r&&(t=r),t?i=setTimeout(function(){_.show()},t):_.show()}function re(e){if(_.clearDelayTimeouts(),j("onUntrigger",[_,e]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=L(!1);t?n=setTimeout(function(){_.state.isVisible&&_.hide()},t):s=requestAnimationFrame(function(){_.hide()})}}else z()}function oe(){_.state.isEnabled=!0}function ae(){_.hide(),_.state.isEnabled=!1}function le(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(s)}function ce(t){if(!_.state.isDestroyed){j("onBeforeUpdate",[_,t]),Y();var i=_.props,n=Mi(e,Object.assign({},i,hi(t),{ignoreAttributes:!0}));_.props=n,G(),i.interactiveDebounce!==n.interactiveDebounce&&(D(),f=oi(K,n.interactiveDebounce)),i.triggerTarget&&!n.triggerTarget?li(i.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):n.triggerTarget&&e.removeAttribute("aria-expanded"),P(),R(),k&&k(i,n),_.popperInstance&&(ee(),ne().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})),j("onAfterUpdate",[_,t])}}function de(e){_.setProps({content:e})}function pe(){var e=_.state.isVisible,t=_.state.isDestroyed,i=!_.state.isEnabled,n=Oi.isTouch&&!_.props.touch,s=ni(_.props.duration,0,Ni.duration);if(!(e||t||i||n||C().hasAttribute("disabled")||(j("onShow",[_],!1),!1===_.props.onShow(_)))){if(_.state.isVisible=!0,$()&&(x.style.visibility="visible"),R(),q(),_.state.isMounted||(x.style.transition="none"),$()){var r=I();_i([r.box,r.content],0)}a=function(){var e;if(_.state.isVisible&&!h){if(h=!0,x.offsetHeight,x.style.transition=_.props.moveTransition,$()&&_.props.animation){var t=I(),i=t.box,n=t.content;_i([i,n],s),wi([i,n],"visible")}N(),P(),ci(Qi,_),null==(e=_.popperInstance)||e.forceUpdate(),j("onMount",[_]),_.props.animation&&$()&&H(s,function(){_.state.isShown=!0,j("onShown",[_])})}},ie()}}function ue(){var e=!_.state.isVisible,t=_.state.isDestroyed,i=!_.state.isEnabled,n=ni(_.props.duration,1,Ni.duration);if(!(e||t||i)&&(j("onHide",[_],!1),!1!==_.props.onHide(_))){if(_.state.isVisible=!1,_.state.isShown=!1,h=!1,d=!1,$()&&(x.style.visibility="hidden"),D(),z(),R(!0),$()){var s=I(),r=s.box,o=s.content;_.props.animation&&(_i([r,o],n),wi([r,o],"hidden"))}N(),P(),_.props.animation?$()&&U(n,_.unmount):_.unmount()}}function he(e){T().addEventListener("mousemove",f),ci(Yi,f),f(e)}function ge(){_.state.isVisible&&_.hide(),_.state.isMounted&&(te(),ne().forEach(function(e){e._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x),Qi=Qi.filter(function(e){return e!==_}),_.state.isMounted=!1,j("onHidden",[_]))}function fe(){_.state.isDestroyed||(_.clearDelayTimeouts(),_.unmount(),Y(),delete e._tippy,_.state.isDestroyed=!0,j("onDestroy",[_]))}}function Ji(e,t){void 0===t&&(t={});var i=Ni.plugins.concat(t.plugins||[]);Ii();var n=Object.assign({},t,{plugins:i}),s=vi(e).reduce(function(e,t){var i=t&&Ki(t,n);return i&&e.push(i),e},[]);return fi(e)?s[0]:s}function Zi(e){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,t)=>0===+e?"":0===t?e.toLowerCase():e.toUpperCase()).replace("-","")}Ji.defaultProps=Ni,Ji.setDefaultProps=Di,Ji.currentInput=Oi,Object.assign({},Te,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}}),Ji.setDefaultProps({render:Wi});const Xi='\n .tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n }\n\n .tippy-iOS {\n cursor: pointer!important;\n -webkit-tap-highlight-color: transparent\n }\n\n [data-tippy-root] {\n max-width: calc(100vw - 10px)\n }\n\n .tippy-box {\n position: relative;\n background-color: #333;\n color: #fff;\n border-radius: 4px;\n font-size: clamp(\n calc(var(--pb-popover-font-size, 1rem) * var(--pb-min-zoom, 0.5)), \n calc(var(--pb-popover-font-size, 1rem) * var(--pb-zoom-factor)), \n calc(var(--pb-popover-font-size, 1rem) * var(--pb-max-zoom, 3.0))\n );\n line-height: calc(var(--pb-popover-line-height, 1.5) * var(--pb-zoom-factor));\n\n text-align: left;\n font-style: normal;\n font-weight: normal;\n outline: 0;\n transition-property: transform, visibility, opacity;\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow {\n bottom: 0\n }\n\n .tippy-box[data-placement^=top]>.tippy-arrow:before {\n bottom: -7px;\n left: 0;\n border-width: 8px 8px 0;\n border-top-color: initial;\n transform-origin: center top\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow {\n top: 0\n }\n\n .tippy-box[data-placement^=bottom]>.tippy-arrow:before {\n top: -7px;\n left: 0;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n transform-origin: center bottom\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow {\n right: 0\n }\n\n .tippy-box[data-placement^=left]>.tippy-arrow:before {\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n right: -7px;\n transform-origin: center left\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow {\n left: 0\n }\n\n .tippy-box[data-placement^=right]>.tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n transform-origin: center right\n }\n\n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11)\n }\n\n .tippy-arrow {\n width: 16px;\n height: 16px;\n color: #333\n }\n\n .tippy-arrow:before {\n content: "";\n position: absolute;\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-content {\n position: relative;\n padding: 5px 9px;\n z-index: 1;\n overflow: auto;\n max-height: var(--pb-popover-max-height, calc(100vh - 60px));\n min-height: var(--pb-popover-min-height, auto);\n max-width: var(--pb-popover-max-width, auto);\n min-width: var(--pb-popover-min-width, auto);\n color: var(--pb-popover-color);\n }\n',en='\n .tippy-box[data-theme~=light-border] {\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 8, 16, .15);\n color: #333;\n box-shadow: 0 4px 14px -2px rgba(0, 8, 16, .08)\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after, .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n content: "";\n position: absolute;\n z-index: -1\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-arrow:after {\n border-color: transparent;\n border-style: solid\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-arrow:after {\n border-top-color: rgba(0, 8, 16, .2);\n border-width: 7px 7px 0;\n top: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow>svg {\n top: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=top]>.tippy-svg-arrow:after {\n top: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff;\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-arrow:after {\n border-bottom-color: rgba(0, 8, 16, .2);\n border-width: 0 7px 7px;\n bottom: 17px;\n left: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow>svg {\n bottom: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=bottom]>.tippy-svg-arrow:after {\n bottom: 17px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-arrow:after {\n border-left-color: rgba(0, 8, 16, .2);\n border-width: 7px 0 7px 7px;\n left: 17px;\n top: 1px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow>svg {\n left: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=left]>.tippy-svg-arrow:after {\n left: 12px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff;\n right: 16px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-arrow:after {\n border-width: 7px 7px 7px 0;\n right: 17px;\n top: 1px;\n border-right-color: rgba(0, 8, 16, .2)\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow>svg {\n right: 11px\n }\n\n .tippy-box[data-theme~=light-border][data-placement^=right]>.tippy-svg-arrow:after {\n right: 12px\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow {\n fill: #fff\n }\n\n .tippy-box[data-theme~=light-border]>.tippy-svg-arrow:after {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA2czEuNzk2LS4wMTMgNC42Ny0zLjYxNUM1Ljg1MS45IDYuOTMuMDA2IDggMGMxLjA3LS4wMDYgMi4xNDguODg3IDMuMzQzIDIuMzg1QzE0LjIzMyA2LjAwNSAxNiA2IDE2IDZIMHoiIGZpbGw9InJnYmEoMCwgOCwgMTYsIDAuMikiLz48L3N2Zz4=);\n background-size: 16px 6px;\n width: 16px;\n height: 6px\n }\n',tn="\n .tippy-box[data-theme~=light] {\n color: #26323d;\n box-shadow: 0 0 20px 4px rgba(154, 161, 177, .15), 0 4px 80px -8px rgba(36, 40, 47, .25), 0 4px 4px -2px rgba(91, 94, 105, .15);\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #fff\n }\n\n .tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-backdrop {\n background-color: #fff\n }\n\n .tippy-box[data-theme~=light]>.tippy-svg-arrow {\n fill: #fff\n }",nn="\n .tippy-box[data-theme~=material] {\n background-color: #505355;\n font-weight: 600\n }\n\n .tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before {\n border-top-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before {\n border-bottom-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before {\n border-left-color: #505355\n }\n\n .tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before {\n border-right-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-backdrop {\n background-color: #505355\n }\n\n .tippy-box[data-theme~=material]>.tippy-svg-arrow {\n fill: #505355\n }\n",sn="\n .tippy-box[data-theme~=translucent] {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-arrow {\n width: 14px;\n height: 14px\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=top]>.tippy-arrow:before {\n border-width: 7px 7px 0;\n border-top-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=bottom]>.tippy-arrow:before {\n border-width: 0 7px 7px;\n border-bottom-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=left]>.tippy-arrow:before {\n border-width: 7px 0 7px 7px;\n border-left-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent][data-placement^=right]>.tippy-arrow:before {\n border-width: 7px 7px 7px 0;\n border-right-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-backdrop {\n background-color: rgba(0, 0, 0, .7)\n }\n\n .tippy-box[data-theme~=translucent]>.tippy-svg-arrow {\n fill: rgba(0, 0, 0, .7)\n }\n";var rn=Object.freeze({__proto__:null,base:Xi,camelize:Zi,light:tn,lightBorder:en,material:nn,translucent:sn});function on(e,t,i){if(!e.querySelector(`#pb-popover-${t}`)){const n=e.nodeType===Node.DOCUMENT_NODE?document.head:e;m.log("Loading tippy styles for theme %s into %o",t,n);const s=document.createElement("style");s.type="text/css",s.id=`pb-popover-${t}`,s.innerHTML=i,n.appendChild(s)}}function an(e,t){if(on(e,"base",Xi),t&&"none"!==t){const i=Zi(t),n=rn[i];n&&on(e,i,n)}}class ln extends(o(s)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{for:{type:String},theme:{type:String},placement:{type:String},fallbackPlacement:{type:String,attribute:"fallback-placement"},persistent:{type:Boolean},trigger:{type:String},touch:{type:String},popupClass:{type:String,attribute:"popup-class"},remote:{type:String},stopPropagation:{type:Boolean,attribute:"stop-propagation"}})}constructor(){super(),this.persistent=!1,this.trigger=null,this.for=null,this.theme=null,this.placement=null,this.touch=null,this.fallbackPlacement=null,this.popupClass=null,this.stopPropagation=!1,this._tippy=null,this._content=null}render(){return this.for?t`<div class="hidden"><slot></slot></div>`:t`<span id="link" part="trigger" class="${this.persistent?"persistent":""}"
|
|
134
134
|
><slot name="default"><slot></slot></slot></span
|
|
135
135
|
><span class="hidden"><slot name="alternate"></slot></span>`}disconnectedCallback(){super.disconnectedCallback(),this._tippy&&this._tippy.destroy(),this._observer&&this._observer.disconnect()}_checkCSSProperties(){if(this.theme||"none"===this.theme||(this.theme=e(this,"--pb-popover-theme","none")),this.placement||(this.placement=e(this,"--pb-popover-placement","auto")),this.fallbackPlacement||(this.fallbackPlacement=e(this,"--pb-popover-fallback-placement",null)),this.persistent||(this.persistent=e(this,"--pb-popover-persistent",!1)),this.trigger||(this.trigger=e(this,"--pb-popover-trigger",null)),!this.touch){const t=e(this,"--pb-popover-touch","hold");this.touch="true"===t||t}}_injectStyles(){this._checkCSSProperties(),an(this.getRootNode(),this.theme)}_getContent(){if(this._content)return this._content;const e=this._getSlot();if(e){const t=document.createElement("div");return e.assignedNodes().forEach(e=>{t.appendChild(e.content?e.content.cloneNode(!0):e.cloneNode(!0))}),this._content=t,t}return null}_getSlot(){return this.for?this.shadowRoot.querySelector("slot"):this.shadowRoot.querySelector("[name=alternate]")}_registerMutationObserver(){const e=this._getSlot();this._observer=new MutationObserver(()=>{this.alternate=this._getContent(),m.log("alternate changed"),this.emitTo("pb-popover-changed",this.alternate)}),this._observer.observe(this,{subtree:!0,childList:!0,characterData:!0}),e&&e.assignedNodes().forEach(e=>{this._observer.observe(e.content?e.content:e,{subtree:!0,childList:!0,characterData:!0})})}get alternate(){return this._getContent()}set alternate(e){this._content=e,this._tippy&&this._tippy.setContent(this._content)}command(e,t){"disable"===e&&(this.disabled=t,this._tippy&&(t?this._tippy.disable():this._tippy.enable()))}firstUpdated(){super.firstUpdated(),this._injectStyles(),this._registerMutationObserver(),this.trigger||(this.trigger=this.persistent?"click":"mouseenter");const e=this.getRootNode();let t;if(this.for?(t=e.getElementById(this.for),t||m.error("<pb-popover> target element %s not found",this.for)):t=this.shadowRoot.getElementById("link"),t){const i={allowHTML:!0,appendTo:e.nodeType===Node.DOCUMENT_NODE?document.body:e,placement:this.placement,interactive:!0,ignoreAttributes:!0,boundary:"viewport",maxWidth:"none",touch:this.touch,hideOnClick:!1,trigger:this.trigger};if(this.stopPropagation&&(i.onTrigger=(e,t)=>{t.stopPropagation()}),this.persistent&&(i.onClickOutside=(e,t)=>{e.hideWithInteractivity(t)}),this.theme&&"none"!==this.theme&&(i.theme=this.theme),this.fallbackPlacement){const e=this.fallbackPlacement.split(" ");i.popperOptions={modifiers:[{name:"flip",options:{fallbackPlacements:e}}]}}this.popupClass&&(i.onCreate=e=>{e.popper.classList.add(this.popupClass)}),i.onShow=e=>{this.remote?this._loadRemoteContent():e.setContent(this._getContent()),this.emitTo("pb-popover-show",{source:this,popup:e})},this._tippy=Ji(t,i)}}async _loadRemoteContent(){const e=this.toAbsoluteURL(this.remote);try{const t=await fetch(e,{method:"GET",mode:"cors",credentials:"same-origin"}),i=await t.text();this.alternate=i}catch(e){m.error("<pb-popover> Error retrieving remote content: %o",e)}}static get styles(){return[n`
|
|
136
136
|
:host {
|
|
@@ -452,7 +452,7 @@ import{g as e,x as t,i as n,a as s,r,p as o,w as a,c as l,b as c,E as d,m as p,B
|
|
|
452
452
|
visibility: visible;
|
|
453
453
|
cursor: not-allowed;
|
|
454
454
|
}
|
|
455
|
-
`}}customElements.define("pb-navigation",xn);const kn=e=>"string"==typeof e,An=()=>{let e,t;const i=new Promise((i,n)=>{e=i,t=n});return i.resolve=e,i.reject=t,i},Sn=e=>null==e?"":""+e,On=(e,t,i)=>{e.forEach(e=>{t[e]&&(i[e]=t[e])})},En=/###/g,$n=e=>e&&e.indexOf("###")>-1?e.replace(En,"."):e,Cn=e=>!e||kn(e),Tn=(e,t,i)=>{const n=kn(t)?t.split("."):t;let s=0;for(;s<n.length-1;){if(Cn(e))return{};const t=$n(n[s]);!e[t]&&i&&(e[t]=new i),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++s}return Cn(e)?{}:{obj:e,k:$n(n[s])}},In=(e,t,i)=>{const{obj:n,k:s}=Tn(e,t,Object);if(void 0!==n||1===t.length)return void(n[s]=i);let r=t[t.length-1],o=t.slice(0,t.length-1),a=Tn(e,o,Object);for(;void 0===a.obj&&o.length;){var l;r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),a=Tn(e,o,Object),null!==(l=a)&&void 0!==l&&l.obj&&void 0!==a.obj[`${a.k}.${r}`]&&(a.obj=void 0)}a.obj[`${a.k}.${r}`]=i},Ln=(e,t,i,n)=>{const{obj:s,k:r}=Tn(e,t,Object);s[r]=s[r]||[],s[r].push(i)},Rn=(e,t)=>{const{obj:i,k:n}=Tn(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,n))return i[n]},jn=(e,t,i)=>{const n=Rn(e,i);return void 0!==n?n:Rn(t,i)},Nn=(e,t,i)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?kn(e[n])||e[n]instanceof String||kn(t[n])||t[n]instanceof String?i&&(e[n]=t[n]):Nn(e[n],t[n],i):e[n]=t[n]);return e},Pn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Dn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Fn=e=>kn(e)?e.replace(/[&<>"'\/]/g,e=>Dn[e]):e;class Bn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const Mn=[" ",",","?","!",";"],qn=new Bn(20),zn=(e,t,i)=>{t=t||"",i=i||"";const n=Mn.filter(e=>t.indexOf(e)<0&&i.indexOf(e)<0);if(0===n.length)return!0;const s=qn.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let r=!s.test(e);if(!r){const t=e.indexOf(i);t>0&&!s.test(e.substring(0,t))&&(r=!0)}return r},Un=(e,t,i=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const n=t.split(i);let s=e;for(let e=0;e<n.length;){if(!s||"object"!=typeof s)return;let t,r="";for(let o=e;o<n.length;++o)if(o!==e&&(r+=i),r+=n[o],t=s[r],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&o<n.length-1)continue;e+=o-e+1;break}s=t}return s},Hn=e=>null==e?void 0:e.replace("_","-"),Vn={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var i,n;null===(i=console)||void 0===i||null===(i=i[e])||void 0===i||null===(n=i.apply)||void 0===n||n.call(i,console,t)}};class Wn{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Vn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,n){return n&&!this.debug?null:(kn(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Wn(this.logger,Object.assign(Object.assign({},{prefix:`${this.prefix}:${e}:`}),this.options))}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Wn(this.logger,e)}}var Gn=new Wn;class Yn{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const i=this.observers[e].get(t)||0;this.observers[e].set(t,i+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,i])=>{for(let n=0;n<i;n++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([i,n])=>{for(let s=0;s<n;s++)i.apply(i,[e,...t])})}}}class Qn extends Yn{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i,n={}){var s;const r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],i&&(Array.isArray(i)?a.push(...i):kn(i)&&r?a.push(...i.split(r)):a.push(i)));const l=Rn(this.data,a);return!l&&!t&&!i&&e.indexOf(".")>-1&&(e=a[0],t=a[1],i=a.slice(2).join(".")),!l&&o&&kn(i)?Un(null===(s=this.data)||void 0===s||null===(s=s[e])||void 0===s?void 0:s[t],i,r):l}addResource(e,t,i,n,s={silent:!1}){const r=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(r?i.split(r):i)),e.indexOf(".")>-1&&(o=e.split("."),n=t,t=o[1]),this.addNamespaces(t),In(this.data,o,n),s.silent||this.emit("added",e,t,i,n)}addResources(e,t,i,n={silent:!1}){for(const n in i)(kn(i[n])||Array.isArray(i[n]))&&this.addResource(e,t,n,i[n],{silent:!0});n.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,n,s,r={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),n=i,i=t,t=o[1]),this.addNamespaces(t);let a=Rn(this.data,o)||{};r.skipCopy||(i=JSON.parse(JSON.stringify(i))),n?Nn(a,i,s):a=Object.assign(Object.assign({},a),i),In(this.data,o,a),r.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Kn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,n,s){return e.forEach(e=>{var r;t=(null===(r=this.processors[e])||void 0===r?void 0:r.process(t,i,n,s))??t}),t}};const Jn=Symbol("i18next/PATH_KEY");function Zn(){const e=[],t=Object.create(null);let i;return t.get=(n,s)=>{var r,o;return null===(r=i)||void 0===r||null===(o=r.revoke)||void 0===o||o.call(r),s===Jn?e:(e.push(s),i=Proxy.revocable(n,t),i.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Xn(e,t){const{[Jn]:i}=e(Zn());return i.join((null==t?void 0:t.keySeparator)??".")}const es={},ts=e=>!kn(e)&&"boolean"!=typeof e&&"number"!=typeof e;class is extends Yn{constructor(e,t={}){super(),On(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Gn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const i=Object.assign({},t);if(null==e)return!1;const n=this.resolve(e,i);if(void 0===(null==n?void 0:n.res))return!1;const s=ts(n.res);return!1!==i.returnObjects||!s}extractFromKey(e,t){let i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const r=i&&e.indexOf(i)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||zn(e,i,n));if(r&&!o){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:kn(s)?[s]:s};const r=e.split(i);(i!==n||i===n&&this.options.ns.indexOf(r[0])>-1)&&(s=r.shift()),e=r.join(n)}return{key:e,namespaces:kn(s)?[s]:s}}translate(e,t,i){let n="object"==typeof t?Object.assign({},t):t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n=Object.assign({},n)),n||(n={}),null==e)return"";"function"==typeof e&&(e=Xn(e,Object.assign(Object.assign({},this.options),n))),Array.isArray(e)||(e=[String(e)]);const s=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],n),l=a[a.length-1];let c=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const d=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null==d?void 0:d.toLowerCase()))return p?s?{res:`${l}${c}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${c}${o}`:s?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:o;const u=this.resolve(e,n);let h=null==u?void 0:u.res;const g=(null==u?void 0:u.usedKey)||o,f=(null==u?void 0:u.exactUsedKey)||o,m=["[object Number]","[object Function]","[object RegExp]"],b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==n.count&&!kn(n.count),_=is.hasDefaultValue(n),w=v?this.pluralResolver.getSuffix(d,n.count,n):"",x=n.ordinal&&v?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",k=v&&!n.ordinal&&0===n.count,A=k&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${x}`]||n.defaultValue;let S=h;y&&!h&&_&&(S=A);const O=ts(S),E=Object.prototype.toString.apply(S);if(!(y&&S&&O&&m.indexOf(E)<0)||kn(b)&&Array.isArray(S))if(y&&kn(b)&&Array.isArray(h))h=h.join(b),h&&(h=this.extendTranslation(h,e,n,i));else{let t=!1,s=!1;!this.isValidLookup(h)&&_&&(t=!0,h=A),this.isValidLookup(h)||(s=!0,h=o);const a=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:h,p=_&&A!==h&&this.options.updateMissing;if(s||t||p){if(this.logger.log(p?"updateKey":"missingKey",d,l,o,p?A:h),r){const e=this.resolve(o,Object.assign(Object.assign({},n),{},{keySeparator:!1}));e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let i=0;i<t.length;i++)e.push(t[i]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);const i=(e,t,i)=>{var s;const r=_&&i!==h?i:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,p,n):null!==(s=this.backendConnector)&&void 0!==s&&s.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,p,n),this.emit("missingKey",e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,n);k&&n[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{i([e],o+t,n[`defaultValue${t}`]||A)})}):i(e,o,A))}h=this.extendTranslation(h,e,n,u,i),s&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}${c}${o}`),(s||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${o}`:o,t?h:void 0,n))}else{if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,S,Object.assign(Object.assign({},n),{},{ns:a})):`key '${o} (${this.language})' returned an object instead of string.`;return s?(u.res=e,u.usedParams=this.getUsedParamsDetails(n),u):e}if(r){const e=Array.isArray(S),t=e?[]:{},i=e?f:g;for(const e in S)if(Object.prototype.hasOwnProperty.call(S,e)){const s=`${i}${r}${e}`;t[e]=_&&!h?this.translate(s,Object.assign(Object.assign({},n),{},{defaultValue:ts(A)?A[e]:void 0},{joinArrays:!1,ns:a})):this.translate(s,Object.assign(Object.assign({},n),{joinArrays:!1,ns:a})),t[e]===s&&(t[e]=S[e])}h=t}}return s?(u.res=h,u.usedParams=this.getUsedParamsDetails(n),u):h}extendTranslation(e,t,i,n,s){var r;if(null!==(r=this.i18nFormat)&&void 0!==r&&r.parse)e=this.i18nFormat.parse(e,Object.assign(Object.assign({},this.options.interpolation.defaultVariables),i),i.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!i.skipInterpolation){var o;i.interpolation&&this.interpolator.init(Object.assign(Object.assign({},i),{interpolation:Object.assign(Object.assign({},this.options.interpolation),i.interpolation)}));const r=kn(e)&&(void 0!==(null==i||null===(o=i.interpolation)||void 0===o?void 0:o.skipOnVariables)?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(r){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=i.replace&&!kn(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(l=Object.assign(Object.assign({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,i.lng||this.language||n.usedLng,i),r){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(i.nest=!1)}!i.lng&&n&&n.res&&(i.lng=this.language||n.usedLng),!1!==i.nest&&(e=this.interpolator.nest(e,(...e)=>(null==s?void 0:s[0])!==e[0]||i.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),i)),i.interpolation&&this.interpolator.reset()}const a=i.postProcess||this.options.postProcess,l=kn(a)?[a]:a;return null!=e&&null!=l&&l.length&&!1!==i.applyPostProcessor&&(e=Kn.handle(l,e,t,this.options&&this.options.postProcessPassResolved?Object.assign({i18nResolved:Object.assign(Object.assign({},n),{},{usedParams:this.getUsedParamsDetails(i)})},i):i,this)),e}resolve(e,t={}){let i,n,s,r,o;return kn(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(i))return;const a=this.extractFromKey(e,t),l=a.key;n=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const d=void 0!==t.count&&!kn(t.count),p=d&&!t.ordinal&&0===t.count,u=void 0!==t.context&&(kn(t.context)||"number"==typeof t.context)&&""!==t.context,h=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{var a,c;this.isValidLookup(i)||(o=e,es[`${h[0]}-${e}`]||null===(a=this.utils)||void 0===a||!a.hasLoadedNamespace||null!==(c=this.utils)&&void 0!==c&&c.hasLoadedNamespace(o)||(es[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(n=>{var o;if(this.isValidLookup(i))return;r=n;const a=[l];if(null!==(o=this.i18nFormat)&&void 0!==o&&o.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,n,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(n,t.count,t));const i=`${this.options.pluralSeparator}zero`,s=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&0===e.indexOf(s)&&a.push(l+e.replace(s,this.options.pluralSeparator)),a.push(l+e),p&&a.push(l+i)),u){const n=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(n),d&&(t.ordinal&&0===e.indexOf(s)&&a.push(n+e.replace(s,this.options.pluralSeparator)),a.push(n+e),p&&a.push(n+i))}}let c;for(;c=a.pop();)this.isValidLookup(i)||(s=c,i=this.getResource(n,e,c,t))}))})}),{res:i,usedKey:n,exactUsedKey:s,usedLng:r,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,i,n={}){var s;return null!==(s=this.i18nFormat)&&void 0!==s&&s.getResource?this.i18nFormat.getResource(e,t,i,n):this.resourceStore.getResource(e,t,i,n)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!kn(e.replace);let n=i?e.replace:e;if(i&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n=Object.assign(Object.assign({},this.options.interpolation.defaultVariables),n)),!i){n=Object.assign({},n);for(const e of t)delete n[e]}return n}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&void 0!==e[i])return!0;return!1}}class ns{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Gn.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Hn(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Hn(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(kn(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const i=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(i)||(t=i)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const i=this.getScriptPartFromCode(e);if(this.isSupportedCode(i))return t=i;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),kn(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],s=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return kn(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(e))):kn(e)&&s(this.formatLanguageCode(e)),i.forEach(e=>{n.indexOf(e)<0&&s(this.formatLanguageCode(e))}),n}}const ss={zero:0,one:1,two:2,few:3,many:4,other:5},rs={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class os{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Gn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const i=Hn("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:n});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let r;try{r=new Intl.PluralRules(i,{type:n})}catch(i){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),rs;if(!e.match(/-|_/))return rs;const n=this.languageUtils.getLanguagePartFromCode(e);r=this.getRule(n,t)}return this.pluralRulesCache[s]=r,r}needsPlural(e,t={}){var i;let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(null===(i=n)||void 0===i?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((e,t)=>ss[e]-ss[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,i={}){const n=this.getRule(e,i);return n?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}const as=(e,t,i,n=".",s=!0)=>{let r=jn(e,t,i);return!r&&s&&kn(i)&&(r=Un(e,i,n),void 0===r&&(r=Un(t,i,n))),r},ls=e=>e.replace(/\$/g,"$$$$");class cs{constructor(e={}){var t;this.logger=Gn.create("interpolator"),this.options=e,this.format=(null==e||null===(t=e.interpolation)||void 0===t?void 0:t.format)||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:n,prefix:s,prefixEscaped:r,suffix:o,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:p,nestingPrefixEscaped:u,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:Fn,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==n&&n,this.prefix=s?Pn(s):r||"{{",this.suffix=o?Pn(o):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=p?Pn(p):u||Pn("$t("),this.nestingSuffix=h?Pn(h):g||Pn(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>(null==e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,i,n){var s;let r,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){const s=as(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,i,Object.assign(Object.assign(Object.assign({},n),t),{},{interpolationkey:e})):s}const s=e.split(this.formatSeparator),r=s.shift().trim(),o=s.join(this.formatSeparator).trim();return this.format(as(t,l,r,this.options.keySeparator,this.options.ignoreJSONStructure),o,i,Object.assign(Object.assign(Object.assign({},n),t),{},{interpolationkey:r}))};this.resetRegExp();const d=(null==n?void 0:n.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=void 0!==(null==n||null===(s=n.interpolation)||void 0===s?void 0:s.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>ls(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?ls(this.escape(e)):ls(e)}].forEach(t=>{for(a=0;r=t.regex.exec(e);){const i=r[1].trim();if(o=c(i),void 0===o)if("function"==typeof d){const t=d(e,r,n);o=kn(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,i))o="";else{if(p){o=r[0];continue}this.logger.warn(`missed to pass in variable ${i} for interpolating ${e}`),o=""}else kn(o)||this.useRawValueToEscape||(o=Sn(o));const s=t.safeValue(o);if(e=e.replace(r[0],s),p?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,i={}){let n,s,r;const o=(e,t)=>{const i=this.nestingOptionsSeparator;if(e.indexOf(i)<0)return e;const n=e.split(new RegExp(`${i}[ ]*{`));let s=`{${n[1]}`;e=n[0],s=this.interpolate(s,r);const o=s.match(/'/g),a=s.match(/"/g);(((null==o?void 0:o.length)??0)%2==0&&!a||a.length%2!=0)&&(s=s.replace(/'/g,'"'));try{r=JSON.parse(s),t&&(r=Object.assign(Object.assign({},t),r))}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${i}${s}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];r=Object.assign({},i),r=r.replace&&!kn(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;const l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(a=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),s=t(o.call(this,n[1].trim(),r),r),s&&n[0]===e&&!kn(s))return s;kn(s)||(s=Sn(s)),s||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),s=""),a.length&&(s=a.reduce((e,t)=>this.format(e,t,i.lng,Object.assign(Object.assign({},i),{},{interpolationkey:n[1].trim()})),s.trim())),e=e.replace(n[0],s),this.regexp.lastIndex=0}return e}}const ds=e=>{let t=e.toLowerCase().trim();const i={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);if("currency"===t&&s.indexOf(":")<0)i.currency||(i.currency=s.trim());else if("relativetime"===t&&s.indexOf(":")<0)i.range||(i.range=s.trim());else{s.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),s=n.join(":").trim().replace(/^'+|'+$/g,""),r=t.trim();i[r]||(i[r]=s),"false"===s&&(i[r]=!1),"true"===s&&(i[r]=!0),isNaN(s)||(i[r]=parseInt(s,10))}})}}return{formatName:t,formatOptions:i}},ps=e=>{const t={};return(i,n,s)=>{let r=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(r=Object.assign(Object.assign({},r),{},{[s.interpolationkey]:void 0}));const o=n+JSON.stringify(r);let a=t[o];return a||(a=e(Hn(n),s),t[o]=a),a(i)}},us=e=>(t,i,n)=>e(Hn(i),n)(t);class hs{constructor(e={}){this.logger=Gn.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const i=t.cacheInBuiltFormats?ps:us;this.formats={number:i((e,t)=>{const i=new Intl.NumberFormat(e,Object.assign({},t));return e=>i.format(e)}),currency:i((e,t)=>{const i=new Intl.NumberFormat(e,Object.assign(Object.assign({},t),{},{style:"currency"}));return e=>i.format(e)}),datetime:i((e,t)=>{const i=new Intl.DateTimeFormat(e,Object.assign({},t));return e=>i.format(e)}),relativetime:i((e,t)=>{const i=new Intl.RelativeTimeFormat(e,Object.assign({},t));return e=>i.format(e,t.range||"day")}),list:i((e,t)=>{const i=new Intl.ListFormat(e,Object.assign({},t));return e=>i.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ps(t)}format(e,t,i,n={}){const s=t.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(e=>e.indexOf(")")>-1)){const e=s.findIndex(e=>e.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,e)].join(this.formatSeparator)}const r=s.reduce((e,t)=>{const{formatName:s,formatOptions:r}=ds(t);if(this.formats[s]){let t=e;try{var o;const a=(null==n||null===(o=n.formatParams)||void 0===o?void 0:o[n.interpolationkey])||{},l=a.locale||a.lng||n.locale||n.lng||i;t=this.formats[s](e,l,Object.assign(Object.assign(Object.assign({},r),n),a))}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${s}`),e},e);return r}}const gs=(e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)};class fs extends Yn{constructor(e,t,i,n={}){var s,r;super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=n,this.logger=Gn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],null===(s=this.backend)||void 0===s||null===(r=s.init)||void 0===r||r.call(s,i,n.backend,n)}queueLoad(e,t,i,n){const s={},r={},o={},a={};return e.forEach(e=>{let n=!0;t.forEach(t=>{const o=`${e}|${t}`;!i.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===r[o]&&(r[o]=!0):(this.state[o]=1,n=!1,void 0===r[o]&&(r[o]=!0),void 0===s[o]&&(s[o]=!0),void 0===a[t]&&(a[t]=!0)))}),n||(o[e]=!0)}),(Object.keys(s).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(s),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(e,t,i){const n=e.split("|"),s=n[0],r=n[1];t&&this.emit("failedLoading",s,r,t),!t&&i&&this.store.addResourceBundle(s,r,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const o={};this.queue.forEach(i=>{Ln(i.loaded,[s],r),gs(i,e),t&&i.errors.push(t),0!==i.pendingCount||i.done||(Object.keys(i.loaded).forEach(e=>{o[e]||(o[e]={});const t=i.loaded[e];t.length&&t.forEach(t=>{void 0===o[e][t]&&(o[e][t]=!0)})}),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,i,n=0,s=this.retryTimeout,r){if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:i,tried:n,wait:s,callback:r});this.readingCalls++;const o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&a&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,i,n+1,2*s,r)},s):r(o,a)},a=this.backend[i].bind(this.backend);if(2!==a.length)return a(e,t,o);try{const i=a(e,t);i&&"function"==typeof i.then?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}}prepareLoading(e,t,i={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();kn(e)&&(e=this.languageUtils.toResolveHierarchy(e)),kn(t)&&(t=[t]);const s=this.queueLoad(e,t,i,n);if(!s.toLoad.length)return s.pending.length||n(),null;s.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){const i=e.split("|"),n=i[0],s=i[1];this.read(n,s,"read",void 0,void 0,(i,r)=>{i&&this.logger.warn(`${t}loading namespace ${s} for language ${n} failed`,i),!i&&r&&this.logger.log(`${t}loaded namespace ${s} for language ${n}`,r),this.loaded(e,i,r)})}saveMissing(e,t,i,n,s,r={},o=()=>{}){var a,l,c;if(null===(a=this.services)||void 0===a||null===(a=a.utils)||void 0===a||!a.hasLoadedNamespace||null!==(l=this.services)&&void 0!==l&&null!==(l=l.utils)&&void 0!==l&&l.hasLoadedNamespace(t)){if(null!=i&&""!==i){if(null!==(c=this.backend)&&void 0!==c&&c.create){const a=Object.assign(Object.assign({},r),{},{isUpdate:s}),l=this.backend.create.bind(this.backend);if(l.length<6)try{let s;s=5===l.length?l(e,t,i,n,a):l(e,t,i,n),s&&"function"==typeof s.then?s.then(e=>o(null,e)).catch(o):o(null,s)}catch(e){o(e)}else l(e,t,i,n,o,a)}e&&e[0]&&this.store.addResource(e[0],t,i,n)}}else this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const ms=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),kn(e[1])&&(t.defaultValue=e[1]),kn(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const i=e[3]||e[2];Object.keys(i).forEach(e=>{t[e]=i[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),bs=e=>{var t,i;return kn(e.ns)&&(e.ns=[e.ns]),kn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),kn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null===(t=e.supportedLngs)||void 0===t||null===(i=t.indexOf)||void 0===i?void 0:i.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},ys=()=>{},vs=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})};class _s extends Yn{constructor(e={},t){if(super(),this.options=bs(e),this.services={},this.logger=Gn,this.modules={external:[]},vs(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(kn(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=ms();this.options=Object.assign(Object.assign(Object.assign({},i),this.options),bs(e)),this.options.interpolation=Object.assign(Object.assign({},i.interpolation),this.options.interpolation),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler);const n=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?Gn.init(n(this.modules.logger),this.options):Gn.init(null,this.options),e=this.modules.formatter?this.modules.formatter:hs;const t=new ns(this.options);this.store=new Qn(this.options.resources,this.options);const s=this.services;s.logger=Gn,s.resourceStore=this.store,s.languageUtils=t,s.pluralResolver=new os(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format||(s.formatter=n(e),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new cs(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new fs(n(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(s.languageDetector=n(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=n(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new is(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ys),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const s=An(),r=()=>{const e=(e,i)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(i),t(e,i)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),s}loadResources(e,t=ys){let i=t;const n=kn(e)?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){var s,r;if("cimode"===(null==n?void 0:n.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return i();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(n)t(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}null===(s=this.options.preload)||void 0===s||null===(r=s.forEach)||void 0===r||r.call(s,e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(e)})}else i(null)}reloadResources(e,t,i){const n=An();return"function"==typeof e&&(i=e,e=void 0),"function"==typeof t&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=ys),this.services.backendConnector.reload(e,t,e=>{n.resolve(),i(e)}),n}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Kn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const i=An();this.emit("languageChanging",e);const n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},s=(s,r)=>{r?this.isLanguageChangingTo===e&&(n(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,i.resolve((...e)=>this.t(...e)),t&&t(s,(...e)=>this.t(...e))},r=t=>{e||t||!this.services.languageDetector||(t=[]);const i=kn(t)?t:t&&t[0],r=this.store.hasLanguageSomeTranslations(i)?i:this.services.languageUtils.getBestMatchFromCodes(kn(t)?[t]:t);var o,a;r&&(this.language||n(r),this.translator.language||this.translator.changeLanguage(r),null===(o=this.services.languageDetector)||void 0===o||null===(a=o.cacheUserLanguage)||void 0===a||a.call(o,r));this.loadResources(r,e=>{s(e,r)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),i}getFixedT(e,t,i){const n=(e,t,...s)=>{let r;r="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(s)):Object.assign({},t),r.lng=r.lng||n.lng,r.lngs=r.lngs||n.lngs,r.ns=r.ns||n.ns,""!==r.keyPrefix&&(r.keyPrefix=r.keyPrefix||i||n.keyPrefix);const o=this.options.keySeparator||".";let a;return r.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=Xn(e,Object.assign(Object.assign({},this.options),t))),`${r.keyPrefix}${o}${e}`)):("function"==typeof e&&(e=Xn(e,Object.assign(Object.assign({},this.options),t))),a=r.keyPrefix?`${r.keyPrefix}${o}${e}`:e),this.t(a,r)};return kn(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=i,n}t(...e){var t;return null===(t=this.translator)||void 0===t?void 0:t.translate(...e)}exists(...e){var t;return null===(t=this.translator)||void 0===t?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;const r=(e,t)=>{const i=this.services.backendConnector.state[`${e}|${t}`];return-1===i||0===i||2===i};if(t.precheck){const e=t.precheck(this,r);if(void 0!==e)return e}return!!this.hasResourceBundle(i,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!r(i,e)||n&&!r(s,e)))}loadNamespaces(e,t){const i=An();return this.options.ns?(kn(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=An();kn(e)&&(e=[e]);const n=this.options.preload||[],s=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return s.length?(this.options.preload=n.concat(s),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}dir(e){var t,i;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=(null===(i=this.services)||void 0===i?void 0:i.languageUtils)||new ns(ms());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const i=new _s(e,t);return i.createInstance=_s.createInstance,i}cloneInstance(e={},t=ys){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const n=Object.assign(Object.assign(Object.assign({},this.options),e),{isClone:!0}),s=new _s(n);void 0===e.debug&&void 0===e.prefix||(s.logger=s.logger.clone(e));if(["store","services","language"].forEach(e=>{s[e]=this[e]}),s.services=Object.assign({},this.services),s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]=Object.assign({},this.store.data[t]),e[t]=Object.keys(e[t]).reduce((i,n)=>(i[n]=Object.assign({},e[t][n]),i),e[t]),e),{});s.store=new Qn(e,n),s.services.resourceStore=s.store}if(e.interpolation){const t=ms(),i=Object.assign(Object.assign(Object.assign({},t.interpolation),this.options.interpolation),e.interpolation),r=Object.assign(Object.assign({},n),{},{interpolation:i});s.services.interpolator=new cs(r)}return s.translator=new is(s.services,n),s.translator.on("*",(e,...t)=>{s.emit(e,...t)}),s.init(n,t),s.translator.options=n,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ws=_s.createInstance();ws.createInstance,ws.dir,ws.init,ws.loadResources,ws.reloadResources,ws.use,ws.changeLanguage,ws.getFixedT,ws.t,ws.exists,ws.setDefaultNamespace,ws.hasLoadedNamespace,ws.loadNamespaces,ws.loadLanguages;const{slice:xs,forEach:ks}=[];function As(e){return ks.call(xs.call(arguments,1),t=>{if(t)for(const i in t)void 0===e[i]&&(e[i]=t[i])}),e}function Ss(e){if("string"!=typeof e)return!1;return[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e))}const Os=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Es=function(e,t){const i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let n=`${e}=${encodeURIComponent(t)}`;if(i.maxAge>0){const e=i.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");n+=`; Max-Age=${Math.floor(e)}`}if(i.domain){if(!Os.test(i.domain))throw new TypeError("option domain is invalid");n+=`; Domain=${i.domain}`}if(i.path){if(!Os.test(i.path))throw new TypeError("option path is invalid");n+=`; Path=${i.path}`}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");n+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(n+="; HttpOnly"),i.secure&&(n+="; Secure"),i.sameSite){switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:n+="; SameSite=Strict";break;case"lax":n+="; SameSite=Lax";break;case"strict":n+="; SameSite=Strict";break;case"none":n+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i.partitioned&&(n+="; Partitioned"),n},$s={create(e,t,i,n){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};i&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+60*i*1e3)),n&&(s.domain=n),document.cookie=Es(e,t,s)},read(e){const t=`${e}=`,i=document.cookie.split(";");for(let e=0;e<i.length;e++){let n=i[e];for(;" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Cs={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return $s.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:i,cookieMinutes:n,cookieDomain:s,cookieOptions:r}=t;i&&"undefined"!=typeof document&&$s.create(i,e,n,s,r)}},Ts={name:"querystring",lookup(e){let t,{lookupQuerystring:i}=e;if("undefined"!=typeof window){var n;let{search:e}=window.location;!window.location.search&&(null===(n=window.location.hash)||void 0===n?void 0:n.indexOf("?"))>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const s=e.substring(1).split("&");for(let e=0;e<s.length;e++){const n=s[e].indexOf("=");if(n>0){s[e].substring(0,n)===i&&(t=s[e].substring(n+1))}}}return t}},Is={name:"hash",lookup(e){let t,{lookupHash:i,lookupFromHashIndex:n}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const r=e.substring(1);if(i){const e=r.split("&");for(let n=0;n<e.length;n++){const s=e[n].indexOf("=");if(s>0){e[n].substring(0,s)===i&&(t=e[n].substring(s+1))}}}if(t)return t;if(!t&&n>-1){var s;const t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;return null===(s=t["number"==typeof n?n:0])||void 0===s?void 0:s.replace("/","")}}}return t}};let Ls=null;const Rs=()=>{if(null!==Ls)return Ls;try{if(Ls="undefined"!=typeof window&&null!==window.localStorage,!Ls)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Ls=!1}return Ls};var js={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Rs())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:i}=t;i&&Rs()&&window.localStorage.setItem(i,e)}};let Ns=null;const Ps=()=>{if(null!==Ns)return Ns;try{if(Ns="undefined"!=typeof window&&null!==window.sessionStorage,!Ns)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Ns=!1}return Ns};var Ds={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Ps())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:i}=t;i&&Ps()&&window.sessionStorage.setItem(i,e)}},Fs={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:i,language:n}=navigator;if(e)for(let i=0;i<e.length;i++)t.push(e[i]);i&&t.push(i),n&&t.push(n)}return t.length>0?t:void 0}},Bs={name:"htmlTag",lookup(e){let t,{htmlTag:i}=e;const n=i||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},Ms={name:"path",lookup(e){var t;let{lookupFromPathIndex:i}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;return null===(t=n["number"==typeof i?i:0])||void 0===t?void 0:t.replace("/","")}},qs={name:"subdomain",lookup(e){var t;let{lookupFromSubdomainIndex:i}=e;const n="number"==typeof i?i+1:1,s="undefined"!=typeof window&&(null===(t=window.location)||void 0===t||null===(t=t.hostname)||void 0===t?void 0:t.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(s)return s[n]}};let zs=!1;try{document.cookie,zs=!0}catch(ou){}const Us=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];zs||Us.splice(1,1);const Hs=()=>({order:Us,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Vs{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=As(t,this.options||{},Hs()),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Cs),this.addDetector(Ts),this.addDetector(js),this.addDetector(Ds),this.addDetector(Fs),this.addDetector(Bs),this.addDetector(Ms),this.addDetector(qs),this.addDetector(Is)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let i=this.detectors[e].lookup(this.options);i&&"string"==typeof i&&(i=[i]),i&&(t=t.concat(i))}}),t=t.filter(e=>null!=e&&!Ss(e)).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}function Ws(e){return Ws="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},Ws(e)}function Gs(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":Ws(XMLHttpRequest))}function Ys(e){return!!e&&"function"==typeof e.then}function Qs(e){return Ys(e)?e:Promise.resolve(e)}function Ks(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function Js(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ks(Object(i),!0).forEach(function(t){Zs(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ks(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function Zs(e,t,i){return(t=Xs(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Xs(e){var t=er(e,"string");return"symbol"==tr(t)?t:t+""}function er(e,t){if("object"!=tr(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=tr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function tr(e){return tr="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},tr(e)}Vs.type="languageDetector";var ir,nr,sr="function"==typeof fetch?fetch:void 0;if("undefined"!=typeof global&&global.fetch?sr=global.fetch:"undefined"!=typeof window&&window.fetch&&(sr=window.fetch),Gs()&&("undefined"!=typeof global&&global.XMLHttpRequest?ir=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(ir=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?nr=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(nr=window.ActiveXObject)),"function"!=typeof sr&&(sr=void 0),!sr&&!ir&&!nr)try{import("./browser-ponyfill-VHCt2NiQ.js").then(function(e){return e.b}).then(function(e){sr=e.default}).catch(function(){})}catch(ou){}var rr=function(e,t){if(t&&"object"===tr(t)){var i="";for(var n in t)i+="&"+encodeURIComponent(n)+"="+encodeURIComponent(t[n]);if(!i)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+i.slice(1)}return e},or=function(e,t,i,n){var s=function(e){if(!e.ok)return i(e.statusText||"Error",{status:e.status});e.text().then(function(t){i(null,{status:e.status,data:t})}).catch(i)};if(n){var r=n(e,t);if(r instanceof Promise)return void r.then(s).catch(i)}"function"==typeof fetch?fetch(e,t).then(s).catch(i):sr(e,t).then(s).catch(i)},ar=!1,lr=function(e,t,i,n){e.queryStringParams&&(t=rr(t,e.queryStringParams));var s=Js({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&"undefined"!=typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),i&&(s["Content-Type"]="application/json");var r="function"==typeof e.requestOptions?e.requestOptions(i):e.requestOptions,o=Js({method:i?"POST":"GET",body:i?e.stringify(i):void 0,headers:s},ar?{}:r),a="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{or(t,o,n,a)}catch(e){if(!r||0===Object.keys(r).length||!e.message||e.message.indexOf("not implemented")<0)return n(e);try{Object.keys(r).forEach(function(e){delete o[e]}),or(t,o,n,a),ar=!0}catch(e){n(e)}}},cr=function(e,t,i,n){i&&"object"===tr(i)&&(i=rr("",i).slice(1)),e.queryStringParams&&(t=rr(t,e.queryStringParams));try{var s=ir?new ir:new nr("MSXML2.XMLHTTP.3.0");s.open(i?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,i&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var r=e.customHeaders;if(r="function"==typeof r?r():r)for(var o in r)s.setRequestHeader(o,r[o]);s.onreadystatechange=function(){s.readyState>3&&n(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(i)}catch(e){console&&console.log(e)}},dr=function(e,t,i,n){return"function"==typeof i&&(n=i,i=void 0),n=n||function(){},sr&&0!==t.indexOf("file:")?lr(e,t,i,n):Gs()||"function"==typeof ActiveXObject?cr(e,t,i,n):void n(new Error("No fetch and no xhr implementation found!"))};function pr(e){return pr="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},pr(e)}function ur(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function hr(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(i),!0).forEach(function(t){br(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ur(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fr(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yr(n.key),n)}}function mr(e,t,i){return t&&fr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function br(e,t,i){return(t=yr(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function yr(e){var t=vr(e,"string");return"symbol"==pr(t)?t:t+""}function vr(e,t){if("object"!=pr(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=pr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _r=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,i){return br({},t,i||"")},parseLoadPayload:function(e,t){},request:dr,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},wr=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};gr(this,e),this.services=t,this.options=i,this.allOptions=n,this.type="backend",this.init(t,i,n)}return mr(e,[{key:"init",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=hr(hr(hr({},_r()),this.options||{}),i),this.allOptions=n,this.services&&this.options.reloadInterval){var s=setInterval(function(){return t.reload()},this.options.reloadInterval);"object"===pr(s)&&"function"==typeof s.unref&&s.unref()}}},{key:"readMulti",value:function(e,t,i){this._readAny(e,e,t,t,i)}},{key:"read",value:function(e,t,i){this._readAny([e],e,[t],t,i)}},{key:"_readAny",value:function(e,t,i,n,s){var r=this,o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath(e,i)),(o=Qs(o)).then(function(o){if(!o)return s(null,{});var a=r.services.interpolator.interpolate(o,{lng:e.join("+"),ns:i.join("+")});r.loadUrl(a,s,t,n)})}},{key:"loadUrl",value:function(e,t,i,n){var s=this,r="string"==typeof i?[i]:i,o="string"==typeof n?[n]:n,a=this.options.parseLoadPayload(r,o);this.options.request(this.options,e,a,function(r,o){if(o&&(o.status>=500&&o.status<600||!o.status))return t("failed loading "+e+"; status code: "+o.status,!0);if(o&&o.status>=400&&o.status<500)return t("failed loading "+e+"; status code: "+o.status,!1);if(!o&&r&&r.message){var a=r.message.toLowerCase();if(["failed","fetch","network","load"].find(function(e){return a.indexOf(e)>-1}))return t("failed loading "+e+": "+r.message,!0)}if(r)return t(r,!1);var l,c;try{l="string"==typeof o.data?s.options.parse(o.data,i,n):o.data}catch(t){c="failed parsing "+e+" to json"}if(c)return t(c,!1);t(null,l)})}},{key:"create",value:function(e,t,i,n,s){var r=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var o=this.options.parsePayload(t,i,n),a=0,l=[],c=[];e.forEach(function(i){var n=r.options.addPath;"function"==typeof r.options.addPath&&(n=r.options.addPath(i,t));var d=r.services.interpolator.interpolate(n,{lng:i,ns:t});r.options.request(r.options,d,o,function(t,i){a+=1,l.push(t),c.push(i),a===e.length&&"function"==typeof s&&s(l,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,i=t.backendConnector,n=t.languageUtils,s=t.logger,r=i.language;if(!r||"cimode"!==r.toLowerCase()){var o=[],a=function(e){n.toResolveHierarchy(e).forEach(function(e){o.indexOf(e)<0&&o.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),o.forEach(function(t){e.allOptions.ns.forEach(function(e){i.read(t,e,"read",null,null,function(n,r){n&&s.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n),!n&&r&&s.log("loaded namespace ".concat(e," for language ").concat(t),r),i.loaded("".concat(t,"|").concat(e),n,r)})})})}}}])}();function xr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kr(e){return kr="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},kr(e)}function Ar(e,t){if("object"!=kr(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Sr(e){var t=Ar(e,"string");return"symbol"==kr(t)?t:t+""}function Or(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sr(n.key),n)}}function Er(e,t,i){return t&&Or(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}wr.type="backend";var $r=[],Cr=$r.forEach,Tr=$r.slice;function Ir(e){return Cr.call(Tr.call(arguments,1),function(t){if(t)for(var i in t)void 0===e[i]&&(e[i]=t[i])}),e}function Lr(e){return e?"function"==typeof e?new e:e:null}function Rr(){return{handleEmptyResourcesAsFailed:!0,cacheHitMode:"none"}}function jr(e,t,i,n){var s=e.read.bind(e);if(2!==s.length)s(t,i,n);else try{var r=s(t,i);r&&"function"==typeof r.then?r.then(function(e){return n(null,e)}).catch(n):n(null,r)}catch(e){n(e)}}var Nr=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};xr(this,e),this.backends=[],this.type="backend",this.allOptions=n,this.init(t,i)}return Er(e,[{key:"init",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=Ir(i,this.options||{},Rr()),this.allOptions=n,this.options.backends&&this.options.backends.forEach(function(i,s){t.backends[s]=t.backends[s]||Lr(i),t.backends[s].init(e,t.options.backendOptions&&t.options.backendOptions[s]||{},n)}),this.services&&this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:"read",value:function(e,t,i){var n=this,s=this.backends.length,r=function(a){if(a>=s)return i(new Error("non of the backend loaded data",!0));var l=a===s-1,c=n.options.handleEmptyResourcesAsFailed&&!l?0:-1,d=n.backends[a];d.read?jr(d,e,t,function(s,l,p){if(!s&&l&&Object.keys(l).length>c){if(i(null,l,a),o(a-1,l),d.save&&n.options.cacheHitMode&&["refresh","refreshAndUpdateStore"].indexOf(n.options.cacheHitMode)>-1){if(p&&n.options.refreshExpirationTime&&p+n.options.refreshExpirationTime>Date.now())return;var u=n.backends[a+1];u&&u.read&&jr(u,e,t,function(i,s){i||s&&(Object.keys(s).length<=c||(o(a,s),"refreshAndUpdateStore"===n.options.cacheHitMode&&n.services&&n.services.resourceStore&&n.services.resourceStore.addResourceBundle(e,t,s)))})}}else r(a+1)}):r(a+1)},o=function(i,s){if(!(i<0)){var r=n.backends[i];r.save?(r.save(e,t,s),o(i-1,s)):o(i-1,s)}};r(0)}},{key:"create",value:function(e,t,i,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backends.forEach(function(o){if(o.create){var a=o.create.bind(o);if(a.length<6)try{var l;(l=5===a.length?a(e,t,i,n,r):a(e,t,i,n))&&"function"==typeof l.then?l.then(function(e){return s(null,e)}).catch(s):s(null,l)}catch(e){s(e)}else a(e,t,i,n,s,r)}})}},{key:"reload",value:function(){var e=this,t=this.services,i=t.backendConnector,n=t.languageUtils,s=t.logger,r=i.language;if(!r||"cimode"!==r.toLowerCase()){var o=[],a=function(e){n.toResolveHierarchy(e).forEach(function(e){o.indexOf(e)<0&&o.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),o.forEach(function(t){e.allOptions.ns.forEach(function(e){i.read(t,e,"read",null,null,function(n,r){n&&s.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n),!n&&r&&s.log("loaded namespace ".concat(e," for language ").concat(t),r),i.loaded("".concat(t,"|").concat(e),n,r)})})})}}}])}();let Pr;Nr.type="backend";class Dr extends(o(s)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{appRoot:{type:String,attribute:"app-root"},urlTemplate:{type:String,attribute:"url-template"},urlIgnore:{type:String,attribute:"url-ignore"},urlPath:{type:String,attribute:"url-path"},idHash:{type:Boolean,attribute:"id-hash"},template:{type:String},endpoint:{type:String,reflect:!0},apiVersion:{type:String,attribute:"api-version",reflect:!0},locales:{type:String},localeFallbackNs:{type:String,attribute:"locale-fallback-ns"},supportedLanguages:{type:Array,attribute:"supported-languages",converter:e=>e.split(/\s*,\s*/)},fallbackLanguage:{type:String,attribute:"fallback-language"},language:{type:String},requireLanguage:{type:Boolean,attribute:"require-language"},unresolved:{type:Boolean,reflect:!0},theme:{type:String}})}constructor(){super(),this.unresolved=!0,this.endpoint=".",this.urlTemplate=null,this.urlIgnore=null,this.urlPath="path",this.idHash=!1,this.apiVersion=void 0,this.requireLanguage=!1,this.supportedLanguages=null,this.fallbackLanguage="en",this.theme=null,this._localeFallbacks=[],this._i18nInstance=null,Pr?this.disabled=!0:(Pr=this,c())}get localeFallbackNs(){return this._localeFallbacks&&this._localeFallbacks.length?this._localeFallbacks.join(" "):""}set localeFallbackNs(e){const t=(e||"").split(/\s+/).map(e=>e.trim()).filter(Boolean),i=new Set;this._localeFallbacks=t.filter(e=>!i.has(e)&&(i.add(e),!0))}disconnectedCallback(){super.disconnectedCallback(),this._i18nInstance=null,Pr===this&&(Pr=null)}async connectedCallback(){if(super.connectedCallback(),this.disabled)return;const e=this.getAttribute("endpoint");e&&(this.endpoint=e),_.configure("path"===this.urlPath,this.idHash,this.appRoot,this.urlTemplate,this.urlIgnore),this.endpoint=this.endpoint.replace(/\/+$/,"");const t=_.state._target;t&&(this.endpoint=t);const i=_.state._api;i&&(this.apiVersion=i);const n=[];if(this.theme?n.push(this.toAbsoluteURL(this.theme,this.endpoint)):n.push("components.css"),m.log("<pb-page> Loading component theme stylesheets from %s",n.join(", ")),this._themeSheet=await y(n),!this.apiVersion){let e=null;try{if(!(await fetch(`${this.endpoint}/login`)).ok){const t=await fetch(`${this.endpoint}/api/version`);e=await t.json()}}catch{try{const t=await fetch(`${this.endpoint}/api/version`);e=await t.json()}catch(e){m.error("<pb-page> Failed to fetch API version:",e)}}e?(this.apiVersion=e.api,m.log(`<pb-page> Server reports API version ${this.apiVersion} with app ${e.app.name}/${e.app.version} running on ${e.engine.name}/${e.engine.version}`)):(m.log("<pb-page> No API version reported by server, assuming 0.9.0"),this.apiVersion="0.9.0")}this.requireLanguage||this.signalReady("pb-page-ready",{endpoint:this.endpoint,template:this.template,apiVersion:this.apiVersion})}firstUpdated(){if(super.firstUpdated(),this.disabled)return;this.shadowRoot.querySelector("slot").addEventListener("slotchange",()=>{const e=new CustomEvent("pb-page-loaded",{bubbles:!0,composed:!0});this.dispatchEvent(e)},{once:!0});const e=this.endpoint?`${this.toAbsoluteURL("resources/i18n/",this.endpoint)}{{ns}}/{{lng}}.json`:`${r("../i18n/")}{{ns}}/{{lng}}.json`;m.log("<pb-page> Loading locales. common: %s; additional: %s; namespaces: %o",e,this.locales,this._localeFallbacks);const t=this.locales?[wr,wr]:[wr],i=[{loadPath:e,crossDomain:!0}];this.locales&&i.unshift({loadPath:this.locales,crossDomain:!0});const n={fallbackLng:this.fallbackLanguage,defaultNS:"common",ns:["common"],debug:!1,load:"languageOnly",detection:{lookupQuerystring:"lang"},backend:{backends:t,backendOptions:i}};if(this.language&&(n.lng=this.language),m.log("supported langs: %o",this.supportedLanguages),this.supportedLanguages&&(n.supportedLngs=this.supportedLanguages),this._localeFallbacks.length>0){const e=this._localeFallbacks.slice();n.defaultNS=e[0],n.fallbackNS=e.slice(1),n.ns=e}m.log("<pb-page> i18next options: %o",n),this._i18nInstance=ws.createInstance(),this._i18nInstance.use(Vs).use(Nr),(async()=>{try{var e;const i=await this._i18nInstance.init(n);if(!this._i18nInstance)return;var t;if(g(i),this._updateI18n(i),this.signalReady("pb-i18n-update",{t:i,language:null===(e=this._i18nInstance)||void 0===e?void 0:e.language}),this.requireLanguage)this.signalReady("pb-page-ready",{endpoint:this.endpoint,apiVersion:this.apiVersion,template:this.template,language:null===(t=this._i18nInstance)||void 0===t?void 0:t.language})}catch(e){var i;if(m.error("<pb-page> i18next init failed:",e),this.requireLanguage)this.signalReady("pb-page-ready",{endpoint:this.endpoint,apiVersion:this.apiVersion,template:this.template,language:null===(i=this._i18nInstance)||void 0===i?void 0:i.language})}})(),this.subscribeTo("pb-i18n-language",async e=>{const{language:t}=e.detail;try{var i;const e=await this._i18nInstance.changeLanguage(t);this._updateI18n(e),this.emitTo("pb-i18n-update",{t:e,language:null===(i=this._i18nInstance)||void 0===i?void 0:i.language},[])}catch(e){m.error("<pb-page> Failed to change language:",e)}}),this.addEventListener("pb-global-toggle",this._toggleFeatures.bind(this)),this.removeAttribute("unresolved"),m.log("<pb-page> endpoint: %s; trigger window resize",this.endpoint),this.querySelectorAll("app-header").forEach(e=>{"function"==typeof e._notifyLayoutChanged&&e._notifyLayoutChanged()}),mn(this)}_updateI18n(e){this.querySelectorAll("[data-i18n]").forEach(t=>{const i=t.getAttribute("data-i18n"),n=/(?:\[([^\]]+)\])?([^;]+)/g;let s=n.exec(i);for(;s;){const r=e(s[2]);s[1]?t.setAttribute(s[1],r):t.innerHTML=r,s=n.exec(i)}})}get stylesheet(){return this._themeSheet}_toggleFeatures(e){const t=e.detail;this.querySelectorAll(t.selector).forEach(e=>{const i=t.command||"toggle";e.command&&e.command(i,t.state),t.state?e.classList.add(i):e.classList.remove(i)})}render(){return t`<slot></slot>`}static get styles(){return n`
|
|
455
|
+
`}}customElements.define("pb-navigation",xn);const kn=e=>"string"==typeof e,An=()=>{let e,t;const i=new Promise((i,n)=>{e=i,t=n});return i.resolve=e,i.reject=t,i},Sn=e=>null==e?"":""+e,On=(e,t,i)=>{e.forEach(e=>{t[e]&&(i[e]=t[e])})},En=/###/g,$n=e=>e&&e.indexOf("###")>-1?e.replace(En,"."):e,Cn=e=>!e||kn(e),Tn=(e,t,i)=>{const n=kn(t)?t.split("."):t;let s=0;for(;s<n.length-1;){if(Cn(e))return{};const t=$n(n[s]);!e[t]&&i&&(e[t]=new i),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++s}return Cn(e)?{}:{obj:e,k:$n(n[s])}},In=(e,t,i)=>{const{obj:n,k:s}=Tn(e,t,Object);if(void 0!==n||1===t.length)return void(n[s]=i);let r=t[t.length-1],o=t.slice(0,t.length-1),a=Tn(e,o,Object);for(;void 0===a.obj&&o.length;){var l;r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),a=Tn(e,o,Object),null!==(l=a)&&void 0!==l&&l.obj&&void 0!==a.obj[`${a.k}.${r}`]&&(a.obj=void 0)}a.obj[`${a.k}.${r}`]=i},Ln=(e,t,i,n)=>{const{obj:s,k:r}=Tn(e,t,Object);s[r]=s[r]||[],s[r].push(i)},Rn=(e,t)=>{const{obj:i,k:n}=Tn(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,n))return i[n]},jn=(e,t,i)=>{const n=Rn(e,i);return void 0!==n?n:Rn(t,i)},Nn=(e,t,i)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?kn(e[n])||e[n]instanceof String||kn(t[n])||t[n]instanceof String?i&&(e[n]=t[n]):Nn(e[n],t[n],i):e[n]=t[n]);return e},Pn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Dn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Fn=e=>kn(e)?e.replace(/[&<>"'\/]/g,e=>Dn[e]):e;class Bn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const Mn=[" ",",","?","!",";"],qn=new Bn(20),zn=(e,t,i)=>{t=t||"",i=i||"";const n=Mn.filter(e=>t.indexOf(e)<0&&i.indexOf(e)<0);if(0===n.length)return!0;const s=qn.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let r=!s.test(e);if(!r){const t=e.indexOf(i);t>0&&!s.test(e.substring(0,t))&&(r=!0)}return r},Un=(e,t,i=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const n=t.split(i);let s=e;for(let e=0;e<n.length;){if(!s||"object"!=typeof s)return;let t,r="";for(let o=e;o<n.length;++o)if(o!==e&&(r+=i),r+=n[o],t=s[r],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&o<n.length-1)continue;e+=o-e+1;break}s=t}return s},Hn=e=>null==e?void 0:e.replace("_","-"),Vn={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var i,n;null===(i=console)||void 0===i||null===(i=i[e])||void 0===i||null===(n=i.apply)||void 0===n||n.call(i,console,t)}};class Wn{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Vn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,n){return n&&!this.debug?null:(kn(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Wn(this.logger,Object.assign(Object.assign({},{prefix:`${this.prefix}:${e}:`}),this.options))}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Wn(this.logger,e)}}var Gn=new Wn;class Yn{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const i=this.observers[e].get(t)||0;this.observers[e].set(t,i+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(([e,i])=>{for(let n=0;n<i;n++)e(...t)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(([i,n])=>{for(let s=0;s<n;s++)i.apply(i,[e,...t])})}}}class Qn extends Yn{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i,n={}){var s;const r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],i&&(Array.isArray(i)?a.push(...i):kn(i)&&r?a.push(...i.split(r)):a.push(i)));const l=Rn(this.data,a);return!l&&!t&&!i&&e.indexOf(".")>-1&&(e=a[0],t=a[1],i=a.slice(2).join(".")),!l&&o&&kn(i)?Un(null===(s=this.data)||void 0===s||null===(s=s[e])||void 0===s?void 0:s[t],i,r):l}addResource(e,t,i,n,s={silent:!1}){const r=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(r?i.split(r):i)),e.indexOf(".")>-1&&(o=e.split("."),n=t,t=o[1]),this.addNamespaces(t),In(this.data,o,n),s.silent||this.emit("added",e,t,i,n)}addResources(e,t,i,n={silent:!1}){for(const n in i)(kn(i[n])||Array.isArray(i[n]))&&this.addResource(e,t,n,i[n],{silent:!0});n.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,n,s,r={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),n=i,i=t,t=o[1]),this.addNamespaces(t);let a=Rn(this.data,o)||{};r.skipCopy||(i=JSON.parse(JSON.stringify(i))),n?Nn(a,i,s):a=Object.assign(Object.assign({},a),i),In(this.data,o,a),r.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Kn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,n,s){return e.forEach(e=>{var r;t=(null===(r=this.processors[e])||void 0===r?void 0:r.process(t,i,n,s))??t}),t}};const Jn=Symbol("i18next/PATH_KEY");function Zn(){const e=[],t=Object.create(null);let i;return t.get=(n,s)=>{var r,o;return null===(r=i)||void 0===r||null===(o=r.revoke)||void 0===o||o.call(r),s===Jn?e:(e.push(s),i=Proxy.revocable(n,t),i.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Xn(e,t){const{[Jn]:i}=e(Zn());return i.join((null==t?void 0:t.keySeparator)??".")}const es={},ts=e=>!kn(e)&&"boolean"!=typeof e&&"number"!=typeof e;class is extends Yn{constructor(e,t={}){super(),On(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Gn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const i=Object.assign({},t);if(null==e)return!1;const n=this.resolve(e,i);if(void 0===(null==n?void 0:n.res))return!1;const s=ts(n.res);return!1!==i.returnObjects||!s}extractFromKey(e,t){let i=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const r=i&&e.indexOf(i)>-1,o=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||zn(e,i,n));if(r&&!o){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:kn(s)?[s]:s};const r=e.split(i);(i!==n||i===n&&this.options.ns.indexOf(r[0])>-1)&&(s=r.shift()),e=r.join(n)}return{key:e,namespaces:kn(s)?[s]:s}}translate(e,t,i){let n="object"==typeof t?Object.assign({},t):t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n=Object.assign({},n)),n||(n={}),null==e)return"";"function"==typeof e&&(e=Xn(e,Object.assign(Object.assign({},this.options),n))),Array.isArray(e)||(e=[String(e)]);const s=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],n),l=a[a.length-1];let c=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const d=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===(null==d?void 0:d.toLowerCase()))return p?s?{res:`${l}${c}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${c}${o}`:s?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:o;const u=this.resolve(e,n);let h=null==u?void 0:u.res;const g=(null==u?void 0:u.usedKey)||o,f=(null==u?void 0:u.exactUsedKey)||o,m=["[object Number]","[object Function]","[object RegExp]"],b=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==n.count&&!kn(n.count),_=is.hasDefaultValue(n),w=v?this.pluralResolver.getSuffix(d,n.count,n):"",x=n.ordinal&&v?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",k=v&&!n.ordinal&&0===n.count,A=k&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${x}`]||n.defaultValue;let S=h;y&&!h&&_&&(S=A);const O=ts(S),E=Object.prototype.toString.apply(S);if(!(y&&S&&O&&m.indexOf(E)<0)||kn(b)&&Array.isArray(S))if(y&&kn(b)&&Array.isArray(h))h=h.join(b),h&&(h=this.extendTranslation(h,e,n,i));else{let t=!1,s=!1;!this.isValidLookup(h)&&_&&(t=!0,h=A),this.isValidLookup(h)||(s=!0,h=o);const a=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:h,p=_&&A!==h&&this.options.updateMissing;if(s||t||p){if(this.logger.log(p?"updateKey":"missingKey",d,l,o,p?A:h),r){const e=this.resolve(o,Object.assign(Object.assign({},n),{},{keySeparator:!1}));e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let i=0;i<t.length;i++)e.push(t[i]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);const i=(e,t,i)=>{var s;const r=_&&i!==h?i:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,p,n):null!==(s=this.backendConnector)&&void 0!==s&&s.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,p,n),this.emit("missingKey",e,l,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,n);k&&n[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{i([e],o+t,n[`defaultValue${t}`]||A)})}):i(e,o,A))}h=this.extendTranslation(h,e,n,u,i),s&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}${c}${o}`),(s||t)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${o}`:o,t?h:void 0,n))}else{if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,S,Object.assign(Object.assign({},n),{},{ns:a})):`key '${o} (${this.language})' returned an object instead of string.`;return s?(u.res=e,u.usedParams=this.getUsedParamsDetails(n),u):e}if(r){const e=Array.isArray(S),t=e?[]:{},i=e?f:g;for(const e in S)if(Object.prototype.hasOwnProperty.call(S,e)){const s=`${i}${r}${e}`;t[e]=_&&!h?this.translate(s,Object.assign(Object.assign({},n),{},{defaultValue:ts(A)?A[e]:void 0},{joinArrays:!1,ns:a})):this.translate(s,Object.assign(Object.assign({},n),{joinArrays:!1,ns:a})),t[e]===s&&(t[e]=S[e])}h=t}}return s?(u.res=h,u.usedParams=this.getUsedParamsDetails(n),u):h}extendTranslation(e,t,i,n,s){var r;if(null!==(r=this.i18nFormat)&&void 0!==r&&r.parse)e=this.i18nFormat.parse(e,Object.assign(Object.assign({},this.options.interpolation.defaultVariables),i),i.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!i.skipInterpolation){var o;i.interpolation&&this.interpolator.init(Object.assign(Object.assign({},i),{interpolation:Object.assign(Object.assign({},this.options.interpolation),i.interpolation)}));const r=kn(e)&&(void 0!==(null==i||null===(o=i.interpolation)||void 0===o?void 0:o.skipOnVariables)?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(r){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=i.replace&&!kn(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(l=Object.assign(Object.assign({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,i.lng||this.language||n.usedLng,i),r){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(i.nest=!1)}!i.lng&&n&&n.res&&(i.lng=this.language||n.usedLng),!1!==i.nest&&(e=this.interpolator.nest(e,(...e)=>(null==s?void 0:s[0])!==e[0]||i.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),i)),i.interpolation&&this.interpolator.reset()}const a=i.postProcess||this.options.postProcess,l=kn(a)?[a]:a;return null!=e&&null!=l&&l.length&&!1!==i.applyPostProcessor&&(e=Kn.handle(l,e,t,this.options&&this.options.postProcessPassResolved?Object.assign({i18nResolved:Object.assign(Object.assign({},n),{},{usedParams:this.getUsedParamsDetails(i)})},i):i,this)),e}resolve(e,t={}){let i,n,s,r,o;return kn(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(i))return;const a=this.extractFromKey(e,t),l=a.key;n=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const d=void 0!==t.count&&!kn(t.count),p=d&&!t.ordinal&&0===t.count,u=void 0!==t.context&&(kn(t.context)||"number"==typeof t.context)&&""!==t.context,h=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{var a,c;this.isValidLookup(i)||(o=e,es[`${h[0]}-${e}`]||null===(a=this.utils)||void 0===a||!a.hasLoadedNamespace||null!==(c=this.utils)&&void 0!==c&&c.hasLoadedNamespace(o)||(es[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(n=>{var o;if(this.isValidLookup(i))return;r=n;const a=[l];if(null!==(o=this.i18nFormat)&&void 0!==o&&o.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,n,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(n,t.count,t));const i=`${this.options.pluralSeparator}zero`,s=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&0===e.indexOf(s)&&a.push(l+e.replace(s,this.options.pluralSeparator)),a.push(l+e),p&&a.push(l+i)),u){const n=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(n),d&&(t.ordinal&&0===e.indexOf(s)&&a.push(n+e.replace(s,this.options.pluralSeparator)),a.push(n+e),p&&a.push(n+i))}}let c;for(;c=a.pop();)this.isValidLookup(i)||(s=c,i=this.getResource(n,e,c,t))}))})}),{res:i,usedKey:n,exactUsedKey:s,usedLng:r,usedNS:o}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,i,n={}){var s;return null!==(s=this.i18nFormat)&&void 0!==s&&s.getResource?this.i18nFormat.getResource(e,t,i,n):this.resourceStore.getResource(e,t,i,n)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!kn(e.replace);let n=i?e.replace:e;if(i&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n=Object.assign(Object.assign({},this.options.interpolation.defaultVariables),n)),!i){n=Object.assign({},n);for(const e of t)delete n[e]}return n}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&void 0!==e[i])return!0;return!1}}class ns{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Gn.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Hn(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Hn(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(kn(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const i=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(i)||(t=i)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const i=this.getScriptPartFromCode(e);if(this.isSupportedCode(i))return t=i;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),kn(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],s=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return kn(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(e))):kn(e)&&s(this.formatLanguageCode(e)),i.forEach(e=>{n.indexOf(e)<0&&s(this.formatLanguageCode(e))}),n}}const ss={zero:0,one:1,two:2,few:3,many:4,other:5},rs={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class os{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Gn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const i=Hn("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:n});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let r;try{r=new Intl.PluralRules(i,{type:n})}catch(i){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),rs;if(!e.match(/-|_/))return rs;const n=this.languageUtils.getLanguagePartFromCode(e);r=this.getRule(n,t)}return this.pluralRulesCache[s]=r,r}needsPlural(e,t={}){var i;let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(null===(i=n)||void 0===i?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((e,t)=>ss[e]-ss[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,i={}){const n=this.getRule(e,i);return n?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}const as=(e,t,i,n=".",s=!0)=>{let r=jn(e,t,i);return!r&&s&&kn(i)&&(r=Un(e,i,n),void 0===r&&(r=Un(t,i,n))),r},ls=e=>e.replace(/\$/g,"$$$$");class cs{constructor(e={}){var t;this.logger=Gn.create("interpolator"),this.options=e,this.format=(null==e||null===(t=e.interpolation)||void 0===t?void 0:t.format)||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:n,prefix:s,prefixEscaped:r,suffix:o,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:p,nestingPrefixEscaped:u,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:Fn,this.escapeValue=void 0===i||i,this.useRawValueToEscape=void 0!==n&&n,this.prefix=s?Pn(s):r||"{{",this.suffix=o?Pn(o):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=p?Pn(p):u||Pn("$t("),this.nestingSuffix=h?Pn(h):g||Pn(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>(null==e?void 0:e.source)===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,i,n){var s;let r,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){const s=as(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(s,void 0,i,Object.assign(Object.assign(Object.assign({},n),t),{},{interpolationkey:e})):s}const s=e.split(this.formatSeparator),r=s.shift().trim(),o=s.join(this.formatSeparator).trim();return this.format(as(t,l,r,this.options.keySeparator,this.options.ignoreJSONStructure),o,i,Object.assign(Object.assign(Object.assign({},n),t),{},{interpolationkey:r}))};this.resetRegExp();const d=(null==n?void 0:n.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=void 0!==(null==n||null===(s=n.interpolation)||void 0===s?void 0:s.skipOnVariables)?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>ls(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?ls(this.escape(e)):ls(e)}].forEach(t=>{for(a=0;r=t.regex.exec(e);){const i=r[1].trim();if(o=c(i),void 0===o)if("function"==typeof d){const t=d(e,r,n);o=kn(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,i))o="";else{if(p){o=r[0];continue}this.logger.warn(`missed to pass in variable ${i} for interpolating ${e}`),o=""}else kn(o)||this.useRawValueToEscape||(o=Sn(o));const s=t.safeValue(o);if(e=e.replace(r[0],s),p?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,i={}){let n,s,r;const o=(e,t)=>{const i=this.nestingOptionsSeparator;if(e.indexOf(i)<0)return e;const n=e.split(new RegExp(`${i}[ ]*{`));let s=`{${n[1]}`;e=n[0],s=this.interpolate(s,r);const o=s.match(/'/g),a=s.match(/"/g);(((null==o?void 0:o.length)??0)%2==0&&!a||a.length%2!=0)&&(s=s.replace(/'/g,'"'));try{r=JSON.parse(s),t&&(r=Object.assign(Object.assign({},t),r))}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${i}${s}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];r=Object.assign({},i),r=r.replace&&!kn(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;const l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(a=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),s=t(o.call(this,n[1].trim(),r),r),s&&n[0]===e&&!kn(s))return s;kn(s)||(s=Sn(s)),s||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),s=""),a.length&&(s=a.reduce((e,t)=>this.format(e,t,i.lng,Object.assign(Object.assign({},i),{},{interpolationkey:n[1].trim()})),s.trim())),e=e.replace(n[0],s),this.regexp.lastIndex=0}return e}}const ds=e=>{let t=e.toLowerCase().trim();const i={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);if("currency"===t&&s.indexOf(":")<0)i.currency||(i.currency=s.trim());else if("relativetime"===t&&s.indexOf(":")<0)i.range||(i.range=s.trim());else{s.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),s=n.join(":").trim().replace(/^'+|'+$/g,""),r=t.trim();i[r]||(i[r]=s),"false"===s&&(i[r]=!1),"true"===s&&(i[r]=!0),isNaN(s)||(i[r]=parseInt(s,10))}})}}return{formatName:t,formatOptions:i}},ps=e=>{const t={};return(i,n,s)=>{let r=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(r=Object.assign(Object.assign({},r),{},{[s.interpolationkey]:void 0}));const o=n+JSON.stringify(r);let a=t[o];return a||(a=e(Hn(n),s),t[o]=a),a(i)}},us=e=>(t,i,n)=>e(Hn(i),n)(t);class hs{constructor(e={}){this.logger=Gn.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const i=t.cacheInBuiltFormats?ps:us;this.formats={number:i((e,t)=>{const i=new Intl.NumberFormat(e,Object.assign({},t));return e=>i.format(e)}),currency:i((e,t)=>{const i=new Intl.NumberFormat(e,Object.assign(Object.assign({},t),{},{style:"currency"}));return e=>i.format(e)}),datetime:i((e,t)=>{const i=new Intl.DateTimeFormat(e,Object.assign({},t));return e=>i.format(e)}),relativetime:i((e,t)=>{const i=new Intl.RelativeTimeFormat(e,Object.assign({},t));return e=>i.format(e,t.range||"day")}),list:i((e,t)=>{const i=new Intl.ListFormat(e,Object.assign({},t));return e=>i.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ps(t)}format(e,t,i,n={}){const s=t.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(e=>e.indexOf(")")>-1)){const e=s.findIndex(e=>e.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,e)].join(this.formatSeparator)}const r=s.reduce((e,t)=>{const{formatName:s,formatOptions:r}=ds(t);if(this.formats[s]){let t=e;try{var o;const a=(null==n||null===(o=n.formatParams)||void 0===o?void 0:o[n.interpolationkey])||{},l=a.locale||a.lng||n.locale||n.lng||i;t=this.formats[s](e,l,Object.assign(Object.assign(Object.assign({},r),n),a))}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${s}`),e},e);return r}}const gs=(e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)};class fs extends Yn{constructor(e,t,i,n={}){var s,r;super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=n,this.logger=Gn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],null===(s=this.backend)||void 0===s||null===(r=s.init)||void 0===r||r.call(s,i,n.backend,n)}queueLoad(e,t,i,n){const s={},r={},o={},a={};return e.forEach(e=>{let n=!0;t.forEach(t=>{const o=`${e}|${t}`;!i.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===r[o]&&(r[o]=!0):(this.state[o]=1,n=!1,void 0===r[o]&&(r[o]=!0),void 0===s[o]&&(s[o]=!0),void 0===a[t]&&(a[t]=!0)))}),n||(o[e]=!0)}),(Object.keys(s).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(s),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(e,t,i){const n=e.split("|"),s=n[0],r=n[1];t&&this.emit("failedLoading",s,r,t),!t&&i&&this.store.addResourceBundle(s,r,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const o={};this.queue.forEach(i=>{Ln(i.loaded,[s],r),gs(i,e),t&&i.errors.push(t),0!==i.pendingCount||i.done||(Object.keys(i.loaded).forEach(e=>{o[e]||(o[e]={});const t=i.loaded[e];t.length&&t.forEach(t=>{void 0===o[e][t]&&(o[e][t]=!0)})}),i.done=!0,i.errors.length?i.callback(i.errors):i.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,i,n=0,s=this.retryTimeout,r){if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:i,tried:n,wait:s,callback:r});this.readingCalls++;const o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&a&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,i,n+1,2*s,r)},s):r(o,a)},a=this.backend[i].bind(this.backend);if(2!==a.length)return a(e,t,o);try{const i=a(e,t);i&&"function"==typeof i.then?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}}prepareLoading(e,t,i={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();kn(e)&&(e=this.languageUtils.toResolveHierarchy(e)),kn(t)&&(t=[t]);const s=this.queueLoad(e,t,i,n);if(!s.toLoad.length)return s.pending.length||n(),null;s.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){const i=e.split("|"),n=i[0],s=i[1];this.read(n,s,"read",void 0,void 0,(i,r)=>{i&&this.logger.warn(`${t}loading namespace ${s} for language ${n} failed`,i),!i&&r&&this.logger.log(`${t}loaded namespace ${s} for language ${n}`,r),this.loaded(e,i,r)})}saveMissing(e,t,i,n,s,r={},o=()=>{}){var a,l,c;if(null===(a=this.services)||void 0===a||null===(a=a.utils)||void 0===a||!a.hasLoadedNamespace||null!==(l=this.services)&&void 0!==l&&null!==(l=l.utils)&&void 0!==l&&l.hasLoadedNamespace(t)){if(null!=i&&""!==i){if(null!==(c=this.backend)&&void 0!==c&&c.create){const a=Object.assign(Object.assign({},r),{},{isUpdate:s}),l=this.backend.create.bind(this.backend);if(l.length<6)try{let s;s=5===l.length?l(e,t,i,n,a):l(e,t,i,n),s&&"function"==typeof s.then?s.then(e=>o(null,e)).catch(o):o(null,s)}catch(e){o(e)}else l(e,t,i,n,o,a)}e&&e[0]&&this.store.addResource(e[0],t,i,n)}}else this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const ms=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),kn(e[1])&&(t.defaultValue=e[1]),kn(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const i=e[3]||e[2];Object.keys(i).forEach(e=>{t[e]=i[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),bs=e=>{var t,i;return kn(e.ns)&&(e.ns=[e.ns]),kn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),kn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),(null===(t=e.supportedLngs)||void 0===t||null===(i=t.indexOf)||void 0===i?void 0:i.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e},ys=()=>{},vs=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})};class _s extends Yn{constructor(e={},t){if(super(),this.options=bs(e),this.services={},this.logger=Gn,this.modules={external:[]},vs(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(kn(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=ms();this.options=Object.assign(Object.assign(Object.assign({},i),this.options),bs(e)),this.options.interpolation=Object.assign(Object.assign({},i.interpolation),this.options.interpolation),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler);const n=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?Gn.init(n(this.modules.logger),this.options):Gn.init(null,this.options),e=this.modules.formatter?this.modules.formatter:hs;const t=new ns(this.options);this.store=new Qn(this.options.resources,this.options);const s=this.services;s.logger=Gn,s.resourceStore=this.store,s.languageUtils=t,s.pluralResolver=new os(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix});this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format||(s.formatter=n(e),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new cs(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new fs(n(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(s.languageDetector=n(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=n(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new is(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ys),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const s=An(),r=()=>{const e=(e,i)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(i),t(e,i)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),s}loadResources(e,t=ys){let i=t;const n=kn(e)?e:this.language;if("function"==typeof e&&(i=e),!this.options.resources||this.options.partialBundledLanguages){var s,r;if("cimode"===(null==n?void 0:n.toLowerCase())&&(!this.options.preload||0===this.options.preload.length))return i();const e=[],t=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(n)t(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e))}null===(s=this.options.preload)||void 0===s||null===(r=s.forEach)||void 0===r||r.call(s,e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(e)})}else i(null)}reloadResources(e,t,i){const n=An();return"function"==typeof e&&(i=e,e=void 0),"function"==typeof t&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=ys),this.services.backendConnector.reload(e,t,e=>{n.resolve(),i(e)}),n}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Kn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const i=An();this.emit("languageChanging",e);const n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},s=(s,r)=>{r?this.isLanguageChangingTo===e&&(n(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,i.resolve((...e)=>this.t(...e)),t&&t(s,(...e)=>this.t(...e))},r=t=>{e||t||!this.services.languageDetector||(t=[]);const i=kn(t)?t:t&&t[0],r=this.store.hasLanguageSomeTranslations(i)?i:this.services.languageUtils.getBestMatchFromCodes(kn(t)?[t]:t);var o,a;r&&(this.language||n(r),this.translator.language||this.translator.changeLanguage(r),null===(o=this.services.languageDetector)||void 0===o||null===(a=o.cacheUserLanguage)||void 0===a||a.call(o,r));this.loadResources(r,e=>{s(e,r)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),i}getFixedT(e,t,i){const n=(e,t,...s)=>{let r;r="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(s)):Object.assign({},t),r.lng=r.lng||n.lng,r.lngs=r.lngs||n.lngs,r.ns=r.ns||n.ns,""!==r.keyPrefix&&(r.keyPrefix=r.keyPrefix||i||n.keyPrefix);const o=this.options.keySeparator||".";let a;return r.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=Xn(e,Object.assign(Object.assign({},this.options),t))),`${r.keyPrefix}${o}${e}`)):("function"==typeof e&&(e=Xn(e,Object.assign(Object.assign({},this.options),t))),a=r.keyPrefix?`${r.keyPrefix}${o}${e}`:e),this.t(a,r)};return kn(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=i,n}t(...e){var t;return null===(t=this.translator)||void 0===t?void 0:t.translate(...e)}exists(...e){var t;return null===(t=this.translator)||void 0===t?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;const r=(e,t)=>{const i=this.services.backendConnector.state[`${e}|${t}`];return-1===i||0===i||2===i};if(t.precheck){const e=t.precheck(this,r);if(void 0!==e)return e}return!!this.hasResourceBundle(i,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!r(i,e)||n&&!r(s,e)))}loadNamespaces(e,t){const i=An();return this.options.ns?(kn(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=An();kn(e)&&(e=[e]);const n=this.options.preload||[],s=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return s.length?(this.options.preload=n.concat(s),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}dir(e){var t,i;if(e||(e=this.resolvedLanguage||((null===(t=this.languages)||void 0===t?void 0:t.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=(null===(i=this.services)||void 0===i?void 0:i.languageUtils)||new ns(ms());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const i=new _s(e,t);return i.createInstance=_s.createInstance,i}cloneInstance(e={},t=ys){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const n=Object.assign(Object.assign(Object.assign({},this.options),e),{isClone:!0}),s=new _s(n);void 0===e.debug&&void 0===e.prefix||(s.logger=s.logger.clone(e));if(["store","services","language"].forEach(e=>{s[e]=this[e]}),s.services=Object.assign({},this.services),s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]=Object.assign({},this.store.data[t]),e[t]=Object.keys(e[t]).reduce((i,n)=>(i[n]=Object.assign({},e[t][n]),i),e[t]),e),{});s.store=new Qn(e,n),s.services.resourceStore=s.store}if(e.interpolation){const t=ms(),i=Object.assign(Object.assign(Object.assign({},t.interpolation),this.options.interpolation),e.interpolation),r=Object.assign(Object.assign({},n),{},{interpolation:i});s.services.interpolator=new cs(r)}return s.translator=new is(s.services,n),s.translator.on("*",(e,...t)=>{s.emit(e,...t)}),s.init(n,t),s.translator.options=n,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ws=_s.createInstance();ws.createInstance,ws.dir,ws.init,ws.loadResources,ws.reloadResources,ws.use,ws.changeLanguage,ws.getFixedT,ws.t,ws.exists,ws.setDefaultNamespace,ws.hasLoadedNamespace,ws.loadNamespaces,ws.loadLanguages;const{slice:xs,forEach:ks}=[];function As(e){return ks.call(xs.call(arguments,1),t=>{if(t)for(const i in t)void 0===e[i]&&(e[i]=t[i])}),e}function Ss(e){if("string"!=typeof e)return!1;return[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e))}const Os=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Es=function(e,t){const i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let n=`${e}=${encodeURIComponent(t)}`;if(i.maxAge>0){const e=i.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");n+=`; Max-Age=${Math.floor(e)}`}if(i.domain){if(!Os.test(i.domain))throw new TypeError("option domain is invalid");n+=`; Domain=${i.domain}`}if(i.path){if(!Os.test(i.path))throw new TypeError("option path is invalid");n+=`; Path=${i.path}`}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");n+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(n+="; HttpOnly"),i.secure&&(n+="; Secure"),i.sameSite){switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:n+="; SameSite=Strict";break;case"lax":n+="; SameSite=Lax";break;case"strict":n+="; SameSite=Strict";break;case"none":n+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i.partitioned&&(n+="; Partitioned"),n},$s={create(e,t,i,n){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};i&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+60*i*1e3)),n&&(s.domain=n),document.cookie=Es(e,t,s)},read(e){const t=`${e}=`,i=document.cookie.split(";");for(let e=0;e<i.length;e++){let n=i[e];for(;" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Cs={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return $s.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:i,cookieMinutes:n,cookieDomain:s,cookieOptions:r}=t;i&&"undefined"!=typeof document&&$s.create(i,e,n,s,r)}},Ts={name:"querystring",lookup(e){let t,{lookupQuerystring:i}=e;if("undefined"!=typeof window){var n;let{search:e}=window.location;!window.location.search&&(null===(n=window.location.hash)||void 0===n?void 0:n.indexOf("?"))>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const s=e.substring(1).split("&");for(let e=0;e<s.length;e++){const n=s[e].indexOf("=");if(n>0){s[e].substring(0,n)===i&&(t=s[e].substring(n+1))}}}return t}},Is={name:"hash",lookup(e){let t,{lookupHash:i,lookupFromHashIndex:n}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const r=e.substring(1);if(i){const e=r.split("&");for(let n=0;n<e.length;n++){const s=e[n].indexOf("=");if(s>0){e[n].substring(0,s)===i&&(t=e[n].substring(s+1))}}}if(t)return t;if(!t&&n>-1){var s;const t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;return null===(s=t["number"==typeof n?n:0])||void 0===s?void 0:s.replace("/","")}}}return t}};let Ls=null;const Rs=()=>{if(null!==Ls)return Ls;try{if(Ls="undefined"!=typeof window&&null!==window.localStorage,!Ls)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Ls=!1}return Ls};var js={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Rs())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:i}=t;i&&Rs()&&window.localStorage.setItem(i,e)}};let Ns=null;const Ps=()=>{if(null!==Ns)return Ns;try{if(Ns="undefined"!=typeof window&&null!==window.sessionStorage,!Ns)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Ns=!1}return Ns};var Ds={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Ps())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:i}=t;i&&Ps()&&window.sessionStorage.setItem(i,e)}},Fs={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:i,language:n}=navigator;if(e)for(let i=0;i<e.length;i++)t.push(e[i]);i&&t.push(i),n&&t.push(n)}return t.length>0?t:void 0}},Bs={name:"htmlTag",lookup(e){let t,{htmlTag:i}=e;const n=i||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},Ms={name:"path",lookup(e){var t;let{lookupFromPathIndex:i}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;return null===(t=n["number"==typeof i?i:0])||void 0===t?void 0:t.replace("/","")}},qs={name:"subdomain",lookup(e){var t;let{lookupFromSubdomainIndex:i}=e;const n="number"==typeof i?i+1:1,s="undefined"!=typeof window&&(null===(t=window.location)||void 0===t||null===(t=t.hostname)||void 0===t?void 0:t.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(s)return s[n]}};let zs=!1;try{document.cookie,zs=!0}catch(ou){}const Us=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];zs||Us.splice(1,1);const Hs=()=>({order:Us,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Vs{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=As(t,this.options||{},Hs()),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Cs),this.addDetector(Ts),this.addDetector(js),this.addDetector(Ds),this.addDetector(Fs),this.addDetector(Bs),this.addDetector(Ms),this.addDetector(qs),this.addDetector(Is)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let i=this.detectors[e].lookup(this.options);i&&"string"==typeof i&&(i=[i]),i&&(t=t.concat(i))}}),t=t.filter(e=>null!=e&&!Ss(e)).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}function Ws(e){return Ws="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},Ws(e)}function Gs(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":Ws(XMLHttpRequest))}function Ys(e){return!!e&&"function"==typeof e.then}function Qs(e){return Ys(e)?e:Promise.resolve(e)}function Ks(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function Js(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ks(Object(i),!0).forEach(function(t){Zs(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ks(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function Zs(e,t,i){return(t=Xs(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Xs(e){var t=er(e,"string");return"symbol"==tr(t)?t:t+""}function er(e,t){if("object"!=tr(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=tr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function tr(e){return tr="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},tr(e)}Vs.type="languageDetector";var ir,nr,sr="function"==typeof fetch?fetch:void 0;if("undefined"!=typeof global&&global.fetch?sr=global.fetch:"undefined"!=typeof window&&window.fetch&&(sr=window.fetch),Gs()&&("undefined"!=typeof global&&global.XMLHttpRequest?ir=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(ir=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?nr=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(nr=window.ActiveXObject)),"function"!=typeof sr&&(sr=void 0),!sr&&!ir&&!nr)try{import("./browser-ponyfill-VHCt2NiQ.js").then(function(e){return e.b}).then(function(e){sr=e.default}).catch(function(){})}catch(ou){}var rr=function(e,t){if(t&&"object"===tr(t)){var i="";for(var n in t)i+="&"+encodeURIComponent(n)+"="+encodeURIComponent(t[n]);if(!i)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+i.slice(1)}return e},or=function(e,t,i,n){var s=function(e){if(!e.ok)return i(e.statusText||"Error",{status:e.status});e.text().then(function(t){i(null,{status:e.status,data:t})}).catch(i)};if(n){var r=n(e,t);if(r instanceof Promise)return void r.then(s).catch(i)}"function"==typeof fetch?fetch(e,t).then(s).catch(i):sr(e,t).then(s).catch(i)},ar=!1,lr=function(e,t,i,n){e.queryStringParams&&(t=rr(t,e.queryStringParams));var s=Js({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&"undefined"!=typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),i&&(s["Content-Type"]="application/json");var r="function"==typeof e.requestOptions?e.requestOptions(i):e.requestOptions,o=Js({method:i?"POST":"GET",body:i?e.stringify(i):void 0,headers:s},ar?{}:r),a="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{or(t,o,n,a)}catch(e){if(!r||0===Object.keys(r).length||!e.message||e.message.indexOf("not implemented")<0)return n(e);try{Object.keys(r).forEach(function(e){delete o[e]}),or(t,o,n,a),ar=!0}catch(e){n(e)}}},cr=function(e,t,i,n){i&&"object"===tr(i)&&(i=rr("",i).slice(1)),e.queryStringParams&&(t=rr(t,e.queryStringParams));try{var s=ir?new ir:new nr("MSXML2.XMLHTTP.3.0");s.open(i?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,i&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var r=e.customHeaders;if(r="function"==typeof r?r():r)for(var o in r)s.setRequestHeader(o,r[o]);s.onreadystatechange=function(){s.readyState>3&&n(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(i)}catch(e){console&&console.log(e)}},dr=function(e,t,i,n){return"function"==typeof i&&(n=i,i=void 0),n=n||function(){},sr&&0!==t.indexOf("file:")?lr(e,t,i,n):Gs()||"function"==typeof ActiveXObject?cr(e,t,i,n):void n(new Error("No fetch and no xhr implementation found!"))};function pr(e){return pr="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},pr(e)}function ur(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function hr(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(i),!0).forEach(function(t){br(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ur(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fr(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yr(n.key),n)}}function mr(e,t,i){return t&&fr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function br(e,t,i){return(t=yr(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function yr(e){var t=vr(e,"string");return"symbol"==pr(t)?t:t+""}function vr(e,t){if("object"!=pr(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=pr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _r=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,i){return br({},t,i||"")},parseLoadPayload:function(e,t){},request:dr,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},wr=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};gr(this,e),this.services=t,this.options=i,this.allOptions=n,this.type="backend",this.init(t,i,n)}return mr(e,[{key:"init",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=hr(hr(hr({},_r()),this.options||{}),i),this.allOptions=n,this.services&&this.options.reloadInterval){var s=setInterval(function(){return t.reload()},this.options.reloadInterval);"object"===pr(s)&&"function"==typeof s.unref&&s.unref()}}},{key:"readMulti",value:function(e,t,i){this._readAny(e,e,t,t,i)}},{key:"read",value:function(e,t,i){this._readAny([e],e,[t],t,i)}},{key:"_readAny",value:function(e,t,i,n,s){var r=this,o=this.options.loadPath;"function"==typeof this.options.loadPath&&(o=this.options.loadPath(e,i)),(o=Qs(o)).then(function(o){if(!o)return s(null,{});var a=r.services.interpolator.interpolate(o,{lng:e.join("+"),ns:i.join("+")});r.loadUrl(a,s,t,n)})}},{key:"loadUrl",value:function(e,t,i,n){var s=this,r="string"==typeof i?[i]:i,o="string"==typeof n?[n]:n,a=this.options.parseLoadPayload(r,o);this.options.request(this.options,e,a,function(r,o){if(o&&(o.status>=500&&o.status<600||!o.status))return t("failed loading "+e+"; status code: "+o.status,!0);if(o&&o.status>=400&&o.status<500)return t("failed loading "+e+"; status code: "+o.status,!1);if(!o&&r&&r.message){var a=r.message.toLowerCase();if(["failed","fetch","network","load"].find(function(e){return a.indexOf(e)>-1}))return t("failed loading "+e+": "+r.message,!0)}if(r)return t(r,!1);var l,c;try{l="string"==typeof o.data?s.options.parse(o.data,i,n):o.data}catch(t){c="failed parsing "+e+" to json"}if(c)return t(c,!1);t(null,l)})}},{key:"create",value:function(e,t,i,n,s){var r=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var o=this.options.parsePayload(t,i,n),a=0,l=[],c=[];e.forEach(function(i){var n=r.options.addPath;"function"==typeof r.options.addPath&&(n=r.options.addPath(i,t));var d=r.services.interpolator.interpolate(n,{lng:i,ns:t});r.options.request(r.options,d,o,function(t,i){a+=1,l.push(t),c.push(i),a===e.length&&"function"==typeof s&&s(l,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,i=t.backendConnector,n=t.languageUtils,s=t.logger,r=i.language;if(!r||"cimode"!==r.toLowerCase()){var o=[],a=function(e){n.toResolveHierarchy(e).forEach(function(e){o.indexOf(e)<0&&o.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),o.forEach(function(t){e.allOptions.ns.forEach(function(e){i.read(t,e,"read",null,null,function(n,r){n&&s.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n),!n&&r&&s.log("loaded namespace ".concat(e," for language ").concat(t),r),i.loaded("".concat(t,"|").concat(e),n,r)})})})}}}])}();function xr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kr(e){return kr="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},kr(e)}function Ar(e,t){if("object"!=kr(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t);if("object"!=kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Sr(e){var t=Ar(e,"string");return"symbol"==kr(t)?t:t+""}function Or(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sr(n.key),n)}}function Er(e,t,i){return t&&Or(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}wr.type="backend";var $r=[],Cr=$r.forEach,Tr=$r.slice;function Ir(e){return Cr.call(Tr.call(arguments,1),function(t){if(t)for(var i in t)void 0===e[i]&&(e[i]=t[i])}),e}function Lr(e){return e?"function"==typeof e?new e:e:null}function Rr(){return{handleEmptyResourcesAsFailed:!0,cacheHitMode:"none"}}function jr(e,t,i,n){var s=e.read.bind(e);if(2!==s.length)s(t,i,n);else try{var r=s(t,i);r&&"function"==typeof r.then?r.then(function(e){return n(null,e)}).catch(n):n(null,r)}catch(e){n(e)}}var Nr=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};xr(this,e),this.backends=[],this.type="backend",this.allOptions=n,this.init(t,i)}return Er(e,[{key:"init",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=Ir(i,this.options||{},Rr()),this.allOptions=n,this.options.backends&&this.options.backends.forEach(function(i,s){t.backends[s]=t.backends[s]||Lr(i),t.backends[s].init(e,t.options.backendOptions&&t.options.backendOptions[s]||{},n)}),this.services&&this.options.reloadInterval&&setInterval(function(){return t.reload()},this.options.reloadInterval)}},{key:"read",value:function(e,t,i){var n=this,s=this.backends.length,r=function(a){if(a>=s)return i(new Error("non of the backend loaded data",!0));var l=a===s-1,c=n.options.handleEmptyResourcesAsFailed&&!l?0:-1,d=n.backends[a];d.read?jr(d,e,t,function(s,l,p){if(!s&&l&&Object.keys(l).length>c){if(i(null,l,a),o(a-1,l),d.save&&n.options.cacheHitMode&&["refresh","refreshAndUpdateStore"].indexOf(n.options.cacheHitMode)>-1){if(p&&n.options.refreshExpirationTime&&p+n.options.refreshExpirationTime>Date.now())return;var u=n.backends[a+1];u&&u.read&&jr(u,e,t,function(i,s){i||s&&(Object.keys(s).length<=c||(o(a,s),"refreshAndUpdateStore"===n.options.cacheHitMode&&n.services&&n.services.resourceStore&&n.services.resourceStore.addResourceBundle(e,t,s)))})}}else r(a+1)}):r(a+1)},o=function(i,s){if(!(i<0)){var r=n.backends[i];r.save?(r.save(e,t,s),o(i-1,s)):o(i-1,s)}};r(0)}},{key:"create",value:function(e,t,i,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backends.forEach(function(o){if(o.create){var a=o.create.bind(o);if(a.length<6)try{var l;(l=5===a.length?a(e,t,i,n,r):a(e,t,i,n))&&"function"==typeof l.then?l.then(function(e){return s(null,e)}).catch(s):s(null,l)}catch(e){s(e)}else a(e,t,i,n,s,r)}})}},{key:"reload",value:function(){var e=this,t=this.services,i=t.backendConnector,n=t.languageUtils,s=t.logger,r=i.language;if(!r||"cimode"!==r.toLowerCase()){var o=[],a=function(e){n.toResolveHierarchy(e).forEach(function(e){o.indexOf(e)<0&&o.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),o.forEach(function(t){e.allOptions.ns.forEach(function(e){i.read(t,e,"read",null,null,function(n,r){n&&s.warn("loading namespace ".concat(e," for language ").concat(t," failed"),n),!n&&r&&s.log("loaded namespace ".concat(e," for language ").concat(t),r),i.loaded("".concat(t,"|").concat(e),n,r)})})})}}}])}();let Pr;Nr.type="backend";class Dr extends(o(s)){static get properties(){return Object.assign(Object.assign({},super.properties),{},{appRoot:{type:String,attribute:"app-root"},urlTemplate:{type:String,attribute:"url-template"},urlIgnore:{type:String,attribute:"url-ignore"},urlPath:{type:String,attribute:"url-path"},idHash:{type:Boolean,attribute:"id-hash"},template:{type:String},endpoint:{type:String,reflect:!0},apiVersion:{type:String,attribute:"api-version",reflect:!0},locales:{type:String},localeFallbackNs:{type:String,attribute:"locale-fallback-ns"},supportedLanguages:{type:Array,attribute:"supported-languages",converter:e=>e.split(/\s*,\s*/)},fallbackLanguage:{type:String,attribute:"fallback-language"},language:{type:String},requireLanguage:{type:Boolean,attribute:"require-language"},unresolved:{type:Boolean,reflect:!0},theme:{type:String}})}constructor(){super(),this.unresolved=!0,this.endpoint=".",this.urlTemplate=null,this.urlIgnore=null,this.urlPath="path",this.idHash=!1,this.apiVersion=void 0,this.requireLanguage=!1,this.supportedLanguages=null,this.fallbackLanguage="en",this.theme=null,this._localeFallbacks=[],this._i18nInstance=null,Pr?this.disabled=!0:(Pr=this,c())}get localeFallbackNs(){return this._localeFallbacks&&this._localeFallbacks.length?this._localeFallbacks.join(" "):""}set localeFallbackNs(e){const t=(e||"").split(/\s+/).map(e=>e.trim()).filter(Boolean),i=new Set;this._localeFallbacks=t.filter(e=>!i.has(e)&&(i.add(e),!0)),this._localeFallbacks.includes("common")||this._localeFallbacks.push("common")}disconnectedCallback(){super.disconnectedCallback(),this._i18nInstance=null,Pr===this&&(Pr=null)}async connectedCallback(){if(super.connectedCallback(),this.disabled)return;const e=this.getAttribute("endpoint");e&&(this.endpoint=e),_.configure("path"===this.urlPath,this.idHash,this.appRoot,this.urlTemplate,this.urlIgnore),this.endpoint=this.endpoint.replace(/\/+$/,"");const t=_.state._target;t&&(this.endpoint=t);const i=_.state._api;i&&(this.apiVersion=i);const n=[];if(this.theme?n.push(this.toAbsoluteURL(this.theme,this.endpoint)):n.push("components.css"),m.log("<pb-page> Loading component theme stylesheets from %s",n.join(", ")),this._themeSheet=await y(n),!this.apiVersion){let e=null;try{if(!(await fetch(`${this.endpoint}/login`)).ok){const t=await fetch(`${this.endpoint}/api/version`);e=await t.json()}}catch{try{const t=await fetch(`${this.endpoint}/api/version`);e=await t.json()}catch(e){m.error("<pb-page> Failed to fetch API version:",e)}}e?(this.apiVersion=e.api,m.log(`<pb-page> Server reports API version ${this.apiVersion} with app ${e.app.name}/${e.app.version} running on ${e.engine.name}/${e.engine.version}`)):(m.log("<pb-page> No API version reported by server, assuming 0.9.0"),this.apiVersion="0.9.0")}this.requireLanguage||this.signalReady("pb-page-ready",{endpoint:this.endpoint,template:this.template,apiVersion:this.apiVersion})}firstUpdated(){if(super.firstUpdated(),this.disabled)return;this.shadowRoot.querySelector("slot").addEventListener("slotchange",()=>{const e=new CustomEvent("pb-page-loaded",{bubbles:!0,composed:!0});this.dispatchEvent(e)},{once:!0});const e=`${r("../i18n/")}{{ns}}/{{lng}}.json`;m.log("<pb-page> Loading locales. common: %s; additional: %s; namespaces: %o",e,this.locales,this._localeFallbacks);const t=this.locales?[wr,wr]:[wr],i=[{loadPath:e,crossDomain:!0}];this.locales&&i.unshift({loadPath:this.locales,crossDomain:!0});const n={fallbackLng:this.fallbackLanguage,defaultNS:"common",ns:["common"],debug:!1,load:"languageOnly",detection:{lookupQuerystring:"lang"},backend:{backends:t,backendOptions:i}};if(this.language&&(n.lng=this.language),m.log("supported langs: %o",this.supportedLanguages),this.supportedLanguages&&(n.supportedLngs=this.supportedLanguages),this._localeFallbacks.length>0){const e=this._localeFallbacks.slice();n.defaultNS=e[0],n.fallbackNS=e.slice(1),n.ns=e}m.log("<pb-page> i18next options: %o",n),this._i18nInstance=ws.createInstance(),this._i18nInstance.use(Vs).use(Nr),(async()=>{try{var e;const i=await this._i18nInstance.init(n);if(!this._i18nInstance)return;var t;if(g(i),this._updateI18n(i),this.signalReady("pb-i18n-update",{t:i,language:null===(e=this._i18nInstance)||void 0===e?void 0:e.language}),this.requireLanguage)this.signalReady("pb-page-ready",{endpoint:this.endpoint,apiVersion:this.apiVersion,template:this.template,language:null===(t=this._i18nInstance)||void 0===t?void 0:t.language})}catch(e){var i;if(m.error("<pb-page> i18next init failed:",e),this.requireLanguage)this.signalReady("pb-page-ready",{endpoint:this.endpoint,apiVersion:this.apiVersion,template:this.template,language:null===(i=this._i18nInstance)||void 0===i?void 0:i.language})}})(),this.subscribeTo("pb-i18n-language",async e=>{const{language:t}=e.detail;try{var i;const e=await this._i18nInstance.changeLanguage(t);this._updateI18n(e),this.emitTo("pb-i18n-update",{t:e,language:null===(i=this._i18nInstance)||void 0===i?void 0:i.language},[])}catch(e){m.error("<pb-page> Failed to change language:",e)}}),this.addEventListener("pb-global-toggle",this._toggleFeatures.bind(this)),this.removeAttribute("unresolved"),m.log("<pb-page> endpoint: %s; trigger window resize",this.endpoint),this.querySelectorAll("app-header").forEach(e=>{"function"==typeof e._notifyLayoutChanged&&e._notifyLayoutChanged()}),mn(this)}_updateI18n(e){this.querySelectorAll("[data-i18n]").forEach(t=>{const i=t.getAttribute("data-i18n"),n=/(?:\[([^\]]+)\])?([^;]+)/g;let s=n.exec(i);for(;s;){const r=e(s[2]);s[1]?t.setAttribute(s[1],r):t.innerHTML=r,s=n.exec(i)}})}get stylesheet(){return this._themeSheet}_toggleFeatures(e){const t=e.detail;this.querySelectorAll(t.selector).forEach(e=>{const i=t.command||"toggle";e.command&&e.command(i,t.state),t.state?e.classList.add(i):e.classList.remove(i)})}render(){return t`<slot></slot>`}static get styles(){return n`
|
|
456
456
|
:host {
|
|
457
457
|
display: block;
|
|
458
458
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teipublisher/pb-components",
|
|
3
|
-
"version": "3.0.0-next-4.
|
|
3
|
+
"version": "3.0.0-next-4.18",
|
|
4
4
|
"description": "Collection of webcomponents underlying TEI Publisher",
|
|
5
5
|
"repository": "https://github.com/eeditiones/tei-publisher-components.git",
|
|
6
6
|
"main": "index.html",
|
package/src/pb-i18n.js
CHANGED
package/src/pb-page.js
CHANGED
|
@@ -244,6 +244,10 @@ export class PbPage extends pbMixin(LitElement) {
|
|
|
244
244
|
// Deduplicate while preserving order
|
|
245
245
|
const seen = new Set();
|
|
246
246
|
this._localeFallbacks = next.filter(ns => (seen.has(ns) ? false : (seen.add(ns), true)));
|
|
247
|
+
// The common one is always needed
|
|
248
|
+
if (!this._localeFallbacks.includes('common')) {
|
|
249
|
+
this._localeFallbacks.push('common');
|
|
250
|
+
}
|
|
247
251
|
}
|
|
248
252
|
|
|
249
253
|
disconnectedCallback() {
|
|
@@ -360,9 +364,10 @@ export class PbPage extends pbMixin(LitElement) {
|
|
|
360
364
|
{ once: true },
|
|
361
365
|
);
|
|
362
366
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
367
|
+
// Register two back-ends:
|
|
368
|
+
// - first lookup localisation from where pb-components is loaded
|
|
369
|
+
// - then (if this.locales is set for additional locations), use a relative path from the page
|
|
370
|
+
const defaultLocales = `${resolveURL('../i18n/')}{{ns}}/{{lng}}.json`;
|
|
366
371
|
logger.log(
|
|
367
372
|
'<pb-page> Loading locales. common: %s; additional: %s; namespaces: %o',
|
|
368
373
|
defaultLocales,
|