feedkeeper 0.28.11 → 0.29.0

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.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/server/dist/feeds/content/embeds/consent.js +88 -0
  3. package/server/dist/feeds/content/embeds/index.js +16 -0
  4. package/server/dist/feeds/content/embeds/social.js +103 -0
  5. package/server/dist/feeds/content/embeds/video.js +113 -0
  6. package/server/dist/feeds/content/index.js +14 -0
  7. package/server/dist/feeds/content/noise/sidebars.js +67 -0
  8. package/server/dist/feeds/content/patterns/consent/de.js +27 -0
  9. package/server/dist/feeds/content/patterns/consent/en.js +15 -0
  10. package/server/dist/feeds/content/patterns/consent/index.js +10 -0
  11. package/server/dist/feeds/content/patterns/consent/wrappers.js +4 -0
  12. package/server/dist/feeds/content/patterns/play-labels/de.js +3 -0
  13. package/server/dist/feeds/content/patterns/play-labels/en.js +6 -0
  14. package/server/dist/feeds/content/patterns/play-labels/index.js +5 -0
  15. package/server/dist/feeds/content/patterns/sidebars/de.js +5 -0
  16. package/server/dist/feeds/content/patterns/sidebars/en.js +8 -0
  17. package/server/dist/feeds/content/patterns/sidebars/index.js +6 -0
  18. package/server/dist/feeds/content/patterns/sidebars/selectors.js +15 -0
  19. package/server/dist/feeds/content/patterns/social-platforms.js +20 -0
  20. package/server/dist/feeds/content/shared.js +35 -0
  21. package/server/dist/feeds/contentNoise.js +8 -134
  22. package/server/dist/feeds/extractor.js +17 -11
  23. package/server/package.json +1 -1
  24. package/web/dist/assets/{index-DIFm1rN-.css → index-C7Q6CgHZ.css} +1 -1
  25. package/web/dist/assets/{index-B3O_Wvxt.js → index-CQfoCXb-.js} +13 -13
  26. package/web/dist/index.html +2 -2
  27. package/web/dist/sw.js +1 -1
@@ -5,22 +5,22 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
5
5
  `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
6
  `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ne=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Me(n):``}function Fe(e,t){switch(e.tag){case 26:case 27:case 5:return Me(e.type);case 16:return Me(`Lazy`);case 13:return e.child!==t&&t!==null?Me(`Suspense Fallback`):Me(`Suspense`);case 19:return Me(`SuspenseList`);case 0:case 15:return Pe(e.type,!1);case 11:return Pe(e.type.render,!1);case 1:return Pe(e.type,!0);case 31:return Me(`Activity`);case 30:return Me(`ViewTransition`);default:return``}}function Ie(e){try{var t=``,n=null;do t+=Fe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
7
  Error generating stack: `+e.message+`
8
- `+e.stack}}var Le=Object.prototype.hasOwnProperty,Re=t.unstable_scheduleCallback,ze=t.unstable_cancelCallback,Be=t.unstable_shouldYield,Ve=t.unstable_requestPaint,He=t.unstable_now,Ue=t.unstable_getCurrentPriorityLevel,We=t.unstable_ImmediatePriority,Ge=t.unstable_UserBlockingPriority,Ke=t.unstable_NormalPriority,qe=t.unstable_LowPriority,Je=t.unstable_IdlePriority,Ye=t.log,Xe=t.unstable_setDisableYieldValue,Ze=null,Qe=null;function $e(e){if(typeof Ye==`function`&&Xe(e),Qe&&typeof Qe.setStrictMode==`function`)try{Qe.setStrictMode(Ze,e)}catch{}}var et=Math.clz32?Math.clz32:L,tt=Math.log,nt=Math.LN2;function L(e){return e>>>=0,e===0?32:31-(tt(e)/nt|0)|0}var rt=256,it=262144,at=4194304;function ot(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function st(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ot(n))):i=ot(o):i=ot(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ot(n))):i=ot(o)):i=ot(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ct(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function lt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-et(n),i=1<<r;t|=e[r],n&=~i}return t}function ut(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dt(){var e=at;return at<<=1,!(at&62914560)&&(at=4194304),e}function ft(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-et(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ht(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ht(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-et(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function gt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-et(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function _t(e,t){var n=t&-t;return n=n&42?1:vt(n),(n&(e.suspendedLanes|t))===0?n:0}function vt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function yt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function bt(){var e=P.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function xt(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var St=Math.random().toString(36).slice(2),Ct=`__reactFiber$`+St,wt=`__reactProps$`+St,Tt=`__reactContainer$`+St,Et=`__reactEvents$`+St,Dt=`__reactListeners$`+St,Ot=`__reactHandles$`+St,kt=`__reactResources$`+St,At=`__reactMarker$`+St,jt=`__reactLoad$`+St;function Mt(e){delete e[Ct],delete e[wt],delete e[Dt],delete e[Ot]}function Nt(e){var t;if(t=e[Ct])return t;for(var n=e.parentNode;n;){if(t=n[Tt]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[Ct])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function Pt(e){if(e=e[Ct]||e[Tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ft(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function It(e){var t=e[kt];return t||=e[kt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Lt(e){e[At]=!0}function Rt(e){e[jt]=void 0}var zt=new Set,Bt={};function Vt(e,t){Ht(e,t),Ht(e+`Capture`,t)}function Ht(e,t){for(Bt[e]=t,e=0;e<t.length;e++)zt.add(t[e])}var Ut=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Wt={},Gt={};function Kt(e){return Le.call(Gt,e)?!0:Le.call(Wt,e)?!1:Ut.test(e)?Gt[e]=!0:(Wt[e]=!0,!1)}var R=!1;function qt(){var e=R;return R=!1,e}function Jt(e,t,n){if(Kt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Yt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Xt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Qt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function $t(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function en(e){if(!e._valueTracker){var t=Qt(e)?`checked`:`value`;e._valueTracker=$t(e,t,``+e[t])}}function tn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Qt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var nn=/[\n"\\]/g;function rn(e){return e.replace(nn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function an(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Zt(t)):e.value!==``+Zt(t)&&(e.value=``+Zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):sn(e,Zt(n)):o===`number`&&e.value==t?sn(e,Zt(e.value)):sn(e,Zt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Zt(s):e.removeAttribute(`name`)}function on(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){en(e);return}n=n==null?``:``+Zt(n),t=t==null?n:``+Zt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),en(e)}function sn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function cn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Zt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ln(e,t,n){if(t!=null&&(t=``+Zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Zt(n)}function un(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(_e(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),en(e)}function dn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function pn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||fn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function mn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,R=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(pn(e,a,r),R=!0)}else for(var o in t)t.hasOwnProperty(o)&&pn(e,o,t[o])}function hn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var gn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),_n=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function vn(e){return _n.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function yn(){}var bn=null;function xn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sn=null,Cn=null;function wn(e){var t=Pt(e);if(t&&(e=t.stateNode)){var n=e[wt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(an(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+rn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[wt]||null;if(!a)throw Error(i(90));an(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&tn(r)}break a;case`textarea`:ln(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&cn(e,!!n.multiple,t,!1)}}}var Tn=!1;function En(e,t,n){if(Tn)return e(t,n);Tn=!0;try{return e(t)}finally{if(Tn=!1,(Sn!==null||Cn!==null)&&(Ld(),Sn&&(t=Sn,e=Cn,Cn=Sn=null,wn(t),e)))for(t=0;t<e.length;t++)wn(e[t])}}function Dn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[wt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var On=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,kn=!1;if(On)try{var An={};Object.defineProperty(An,"passive",{get:function(){kn=!0}}),window.addEventListener(`test`,An,An),window.removeEventListener(`test`,An,An)}catch{kn=!1}var jn=null,Mn=null,Nn=null;function Pn(){if(Nn)return Nn;var e,t=Mn,n=t.length,r,i=`value`in jn?jn.value:jn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Nn=i.slice(e,1<r?1-r:void 0)}function Fn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function In(){return!0}function Ln(){return!1}function Rn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?In:Ln,this.isPropagationStopped=Ln,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=In)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=In)},persist:function(){},isPersistent:In}),t}var zn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bn=Rn(zn),Vn=D({},zn,{view:0,detail:0}),Hn=Rn(Vn),Un,Wn,Gn,Kn=D({},Vn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Gn&&(Gn&&e.type===`mousemove`?(Un=e.screenX-Gn.screenX,Wn=e.screenY-Gn.screenY):Wn=Un=0,Gn=e),Un)},movementY:function(e){return`movementY`in e?e.movementY:Wn}}),qn=Rn(Kn),Jn=Rn(D({},Kn,{dataTransfer:0})),Yn=Rn(D({},Vn,{relatedTarget:0})),Xn=Rn(D({},zn,{animationName:0,elapsedTime:0,pseudoElement:0})),Zn=Rn(D({},zn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Qn=Rn(D({},zn,{data:0})),$n={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},er={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},tr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function nr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tr[e])?!!t[e]:!1}function rr(){return nr}var ir=Rn(D({},Vn,{key:function(e){if(e.key){var t=$n[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Fn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?er[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rr,charCode:function(e){return e.type===`keypress`?Fn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Fn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),ar=Rn(D({},Kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),or=Rn(D({},zn,{submitter:0})),sr=Rn(D({},Vn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rr})),cr=Rn(D({},zn,{propertyName:0,elapsedTime:0,pseudoElement:0})),lr=Rn(D({},Kn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ur=Rn(D({},zn,{newState:0,oldState:0,source:0})),dr=[9,13,27,32],fr=On&&`CompositionEvent`in window,pr=null;On&&`documentMode`in document&&(pr=document.documentMode);var mr=On&&`TextEvent`in window&&!pr,hr=On&&(!fr||pr&&8<pr&&11>=pr),gr=` `,_r=!1;function vr(e,t){switch(e){case`keyup`:return dr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function yr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var br=!1;function xr(e,t){switch(e){case`compositionend`:return yr(t);case`keypress`:return t.which===32?(_r=!0,gr):null;case`textInput`:return e=t.data,e===gr&&_r?null:e;default:return null}}function Sr(e,t){if(br)return e===`compositionend`||!fr&&vr(e,t)?(e=Pn(),Nn=Mn=jn=null,br=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return hr&&t.locale!==`ko`?null:t.data;default:return null}}var Cr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Cr[e.type]:t===`textarea`}function Tr(e,t,n,r){Sn?Cn?Cn.push(r):Cn=[r]:Sn=r,t=qf(t,`onChange`),0<t.length&&(n=new Bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Er=null,Dr=null;function Or(e){Bf(e,0)}function kr(e){if(tn(Ft(e)))return e}function Ar(e,t){if(e===`change`)return t}var jr=!1;if(On){var Mr;if(On){var Nr=`oninput`in document;if(!Nr){var Pr=document.createElement(`div`);Pr.setAttribute(`oninput`,`return;`),Nr=typeof Pr.oninput==`function`}Mr=Nr}else Mr=!1;jr=Mr&&(!document.documentMode||9<document.documentMode)}function Fr(){Er&&(Er.detachEvent(`onpropertychange`,Ir),Dr=Er=null)}function Ir(e){if(e.propertyName===`value`&&kr(Dr)){var t=[];Tr(t,Dr,e,xn(e)),En(Or,t)}}function Lr(e,t,n){e===`focusin`?(Fr(),Er=t,Dr=n,Er.attachEvent(`onpropertychange`,Ir)):e===`focusout`&&Fr()}function Rr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return kr(Dr)}function zr(e,t){if(e===`click`)return kr(t)}function Br(e,t){if(e===`input`||e===`change`)return kr(t)}function Vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Hr=typeof Object.is==`function`?Object.is:Vr;function Ur(e,t){if(Hr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Le.call(t,i)||!Hr(e[i],t[i]))return!1}return!0}function Wr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kr(e,t){var n=Gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Gr(n)}}function qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wr(e.document)}return t}function Yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Xr=On&&`documentMode`in document&&11>=document.documentMode,Zr=null,Qr=null,$r=null,ei=!1;function ti(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ei||Zr==null||Zr!==Wr(r)||(r=Zr,`selectionStart`in r&&Yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$r&&Ur($r,r)||($r=r,r=qf(Qr,`onSelect`),0<r.length&&(t=new Bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Zr)))}function ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ri={animationend:ni(`Animation`,`AnimationEnd`),animationiteration:ni(`Animation`,`AnimationIteration`),animationstart:ni(`Animation`,`AnimationStart`),transitionrun:ni(`Transition`,`TransitionRun`),transitionstart:ni(`Transition`,`TransitionStart`),transitioncancel:ni(`Transition`,`TransitionCancel`),transitionend:ni(`Transition`,`TransitionEnd`)},ii={},ai={};On&&(ai=document.createElement(`div`).style,`AnimationEvent`in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),`TransitionEvent`in window||delete ri.transitionend.transition);function oi(e){if(ii[e])return ii[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ai)return ii[e]=t[n];return e}var si=oi(`animationend`),ci=oi(`animationiteration`),li=oi(`animationstart`),ui=oi(`transitionrun`),di=oi(`transitionstart`),fi=oi(`transitioncancel`),pi=oi(`transitionend`),mi=new Map,hi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);hi.push(`scrollEnd`);function gi(e,t){mi.set(e,t),Vt(t,[e])}var _i=0;function vi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=vd.identifierPrefix;var n=_i++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function yi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Ed;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function bi(e,t){return e=yi(e),t=yi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var xi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Si=[],Ci=0,wi=0;function Ti(){for(var e=Ci,t=wi=Ci=0;t<e;){var n=Si[t];Si[t++]=null;var r=Si[t];Si[t++]=null;var i=Si[t];Si[t++]=null;var a=Si[t];if(Si[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ki(n,i,a)}}function Ei(e,t,n,r){Si[Ci++]=e,Si[Ci++]=t,Si[Ci++]=n,Si[Ci++]=r,wi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Di(e,t,n,r){return Ei(e,t,n,r),Ai(e)}function Oi(e,t){return Ei(e,null,null,t),Ai(e)}function ki(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-et(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ai(e){if(50<Dd)throw Dd=0,Od=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ji={};function Mi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ni(e,t,n,r){return new Mi(e,t,n,r)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fi(e,t){var n=e.alternate;return n===null?(n=Ni(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ii(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Li(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Pi(r)&&(s=1);else if(typeof r==`string`)s=qm(e,n,Se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case le:return e=Ni(31,n,t,a),e.elementType=le,e.lanes=o,e;case k:return Ri(n.children,a,o,t);case ne:s=8,a|=24;break;case A:return e=Ni(12,n,t,a|2),e.elementType=A,e.lanes=o,e;case oe:return e=Ni(13,n,t,a),e.elementType=oe,e.lanes=o,e;case se:return e=Ni(19,n,t,a),e.elementType=se,e.lanes=o,e;case M:case de:return e=a|32,e=Ni(30,n,t,e),e.elementType=de,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case ie:s=10;break a;case re:s=9;break a;case ae:s=11;break a;case ce:s=14;break a;case j:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ni(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ri(e,t,n,r){return e=Ni(7,e,r,t),e.lanes=n,e}function zi(e,t,n){return e=Ni(6,e,null,t),e.lanes=n,e}function Bi(e){var t=Ni(18,null,null,0);return t.stateNode=e,t}function Vi(e,t,n){return t=Ni(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hi=new WeakMap;function Ui(e,t){if(typeof e==`object`&&e){var n=Hi.get(e);return n===void 0?(t={value:e,source:t,stack:Ie(t)},Hi.set(e,t),t):n}return{value:e,source:t,stack:Ie(t)}}var Wi=[],Gi=0,Ki=null,qi=0,Ji=[],Yi=0,Xi=null,Zi=1,Qi=``;function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ki,Ki=e,qi=t}function ea(e,t,n){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Xi=e;var r=Zi;e=Qi;var i=32-et(r)-1;r&=~(1<<i),n+=1;var a=32-et(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zi=1<<32-et(t)+i|n<<i|r,Qi=a+e}else Zi=1<<a|n<<i|r,Qi=e}function ta(e){e.return!==null&&($i(e,1),ea(e,1,0))}function na(e){for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null;for(;e===Xi;)Xi=Ji[--Yi],Ji[Yi]=null,Qi=Ji[--Yi],Ji[Yi]=null,Zi=Ji[--Yi],Ji[Yi]=null}function ra(e,t){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Zi=t.id,Qi=t.overflow,Xi=e}var ia=null,aa=null,z=!1,oa=null,sa=!1,ca=Error(i(519));function la(e){throw ha(Ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ca}function ua(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ct]=e,t[wt]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<Rf.length;n++)$(Rf[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),on(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),un(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||$f(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=yn),t=!0):t=!1,t||la(e,!0)}function da(e){for(ia=e.return;ia;)switch(ia.tag){case 5:case 31:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:ia=ia.return}}function fa(e){if(e!==ia)return!1;if(!z)return da(e),z=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||pp(e.type,e.memoizedProps)),n=!n),n&&aa&&la(e),da(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=dm(e)}else t===27?(t=aa,Sp(e.type)?(e=um,um=null,aa=e):aa=t):aa=ia?lm(e.stateNode.nextSibling):null;return!0}function pa(){aa=ia=null,z=!1}function ma(){var e=oa;return e!==null&&(ud===null?ud=e:ud.push.apply(ud,e),oa=null),e}function ha(e){oa===null?oa=[e]:oa.push(e)}var ga=be(null),B=null,_a=null;function va(e,t,n){I(ga,t._currentValue),t._currentValue=n}function ya(e){e._currentValue=ga.current,xe(ga)}function ba(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function xa(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ba(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ba(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ba(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function V(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Hr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Te.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&xa(t,e,n,r),t.flags|=262144,e!==null}function Sa(e){for(e=e.firstContext;e!==null;){if(!Hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ca(e){B=e,_a=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wa(e){return Ea(B,e)}function Ta(e,t){return B===null&&Ca(e),Ea(e,t)}function Ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},_a===null){if(e===null)throw Error(i(308));_a=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _a=_a.next=t;return n}var Da=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Oa=t.unstable_scheduleCallback,ka=t.unstable_NormalPriority,Aa={$$typeof:ie,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ja(){return{controller:new Da,data:new Map,refCount:0}}function Ma(e){e.refCount--,e.refCount===0&&Oa(ka,function(){e.controller.abort()})}function Na(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Pa=null;function Fa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ia=null,La=0,Ra=0,za=null;function Ba(e,t){if(Ia===null){var n=Ia=[];La=0,Ra=Nf(),za={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return La++,t.then(Va,Va),t}function Va(){if(--La===0&&(Pa=null,Ia!==null)){za!==null&&(za.status=`fulfilled`);var e=Ia;Ia=null,Ra=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ua=N.S;N.S=function(e,t){if(pd=He(),typeof t==`object`&&t&&typeof t.then==`function`&&Ba(e,t),Pa!==null)for(var n=yf;n!==null;)Na(n,Pa),n=n.next;if(n=e.types,n!==null){for(var r=yf;r!==null;)Na(r,n),r=r.next;if(Ra!==0){r=Pa,r===null&&(r=Pa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ua!==null&&Ua(e,t)};var Wa=be(null);function Ga(){var e=Wa.current;return e===null?Zu.pooledCache:e}function Ka(e,t){t===null?I(Wa,Wa.current):I(Wa,t.pool)}function qa(){var e=Ga();return e===null?null:{parent:Aa._currentValue,pool:e}}var Ja=Error(i(460)),Ya=Error(i(474)),Xa=Error(i(542)),Za={then:function(){}};function Qa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function $a(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(yn,yn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ro(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(yn,yn);else{if(e=Zu,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ro(e),e}throw to=t,Ja}}function eo(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(to=e,Ja):e}}var to=null;function no(){if(to===null)throw Error(i(459));var e=to;return to=null,e}function ro(e){if(e===Ja||e===Xa)throw Error(i(483))}var io=null,H=0;function ao(e){var t=H;return H+=1,io===null&&(io=[]),$a(io,e,t)}function oo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function so(e,t){throw t.$$typeof===ee?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function co(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=zi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),oo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===j&&eo(i)===t.type)?(t=a(t,n.props),oo(t,n),t.return=e,t):(t=Li(n.type,n.key,n.props,null,e.mode,r),oo(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Vi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ri(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=zi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case O:return n=Li(t.type,t.key,t.props,null,e.mode,n),oo(n,t),n.return=e,n;case te:return t=Vi(t,e.mode,n),t.return=e,t;case j:return t=eo(t),f(e,t,n)}if(_e(t)||me(t))return t=Ri(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ao(t),n);if(t.$$typeof===ie)return f(e,Ta(e,t),n);so(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case O:return n.key===i?l(e,t,n,r):null;case te:return n.key===i?u(e,t,n,r):null;case j:return n=eo(n),p(e,t,n,r)}if(_e(n)||me(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ao(n),r);if(n.$$typeof===ie)return p(e,t,Ta(e,n),r);so(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case O:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case te:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case j:return r=eo(r),m(e,t,n,r,i)}if(_e(r)||me(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ao(r),i);if(r.$$typeof===ie)return m(e,t,n,Ta(t,r),i);so(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),z&&$i(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return z&&$i(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),z&&$i(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),z&&$i(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return z&&$i(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),z&&$i(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case O:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),oo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===j&&eo(l)===r.type){n(e,r.sibling),c=a(r,o.props),oo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Ri(o.props.children,e.mode,c,o.key),oo(c,o),c.return=e,e=c):(c=Li(o.type,o.key,o.props,null,e.mode,c),oo(c,o),c.return=e,e=c)}return s(e);case te:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Vi(o,e.mode,c),c.return=e,e=c}return s(e);case j:return o=eo(o),_(e,r,o,c)}if(_e(o))return h(e,r,o,c);if(me(o)){if(l=me(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,ao(o),c);if(o.$$typeof===ie)return _(e,r,Ta(e,o),c);so(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=zi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{H=0;var i=_(e,t,n,r);return io=null,i}catch(t){if(t===Ja||t===Xa)throw t;var a=Ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var lo=co(!0),uo=co(!1),fo=!1;function po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ho(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function go(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Y&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ai(e),ki(e,null,n),t}return Ei(e,r,t,n),Ai(e)}function _o(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gt(e,n)}}function vo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var yo=!1;function bo(){if(yo){var e=za;if(e!==null)throw e}}function xo(e,t,n,r){yo=!1;var i=e.updateQueue;fo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Z&f)===f:(r&f)===f){f!==0&&f===Ra&&(yo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:fo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),id|=o,e.lanes=o,e.memoizedState=d}}function So(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)So(n[e],t)}var wo=be(null),To=be(0);function Eo(e,t){e=nd,I(To,e),I(wo,t),nd=e|t.baseLanes}function Do(){I(To,nd),I(wo,wo.current)}function Oo(){nd=To.current,xe(wo),xe(To)}var ko=be(null),Ao=null;function jo(e){var t=e.alternate;I(Fo,Fo.current&1),I(ko,e),Ao===null&&(t===null||wo.current!==null||t.memoizedState!==null)&&(Ao=e)}function Mo(e){I(Fo,Fo.current),I(ko,e),Ao===null&&(Ao=e)}function No(e){e.tag===22?(I(Fo,Fo.current),I(ko,e),Ao===null&&(Ao=e)):Po()}function Po(){I(Fo,Fo.current),I(ko,ko.current)}function U(e){xe(ko),Ao===e&&(Ao=null),xe(Fo)}var Fo=be(0);function Io(e,t){I(ko,ko.current),I(Fo,t)}function Lo(e){xe(Fo),xe(ko),Ao===e&&(Ao=null)}function Ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zo=0,W=null,Bo=null,Vo=null,Ho=!1,Uo=!1,Wo=!1,Go=0,Ko=0,qo=null,Jo=0;function Yo(){throw Error(i(321))}function Xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Hr(e[n],t[n]))return!1;return!0}function Zo(e,t,n,r,i,a){return zo=a,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?pc:mc,Wo=!1,a=n(r,i),Wo=!1,Uo&&(a=$o(t,n,r,i)),Qo(e),a}function Qo(e){N.H=fc;var t=Bo!==null&&Bo.next!==null;if(zo=0,Vo=Bo=W=null,Ho=!1,Ko=0,qo=null,t)throw Error(i(300));e===null||jc||(e=e.dependencies,e!==null&&Sa(e)&&(jc=!0))}function $o(e,t,n,r){W=e;var a=0;do{if(Uo&&(qo=null),Ko=0,Uo=!1,25<=a)throw Error(i(301));if(a+=1,Vo=Bo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=hc,o=t(n,r)}while(Uo);return o}function es(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?ss(t):t,e=e.useState()[0],(Bo===null?null:Bo.memoizedState)!==e&&(W.flags|=1024),t}function ts(){var e=Go!==0;return Go=0,e}function ns(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function rs(e){if(Ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ho=!1}zo=0,Vo=Bo=W=null,Uo=!1,Ko=Go=0,qo=null}function is(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vo===null?W.memoizedState=Vo=e:Vo=Vo.next=e,Vo}function as(){if(Bo===null){var e=W.alternate;e=e===null?null:e.memoizedState}else e=Bo.next;var t=Vo===null?W.memoizedState:Vo.next;if(t!==null)Vo=t,Bo=e;else{if(e===null)throw W.alternate===null?Error(i(467)):Error(i(310));Bo=e,e={memoizedState:Bo.memoizedState,baseState:Bo.baseState,baseQueue:Bo.baseQueue,queue:Bo.queue,next:null},Vo===null?W.memoizedState=Vo=e:Vo=Vo.next=e}return Vo}function os(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ss(e){var t=Ko;return Ko+=1,qo===null&&(qo=[]),e=$a(qo,e,t),t=W,(Vo===null?t.memoizedState:Vo.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?pc:mc),e}function cs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ss(e);if(e.$$typeof===fe)return;if(e.$$typeof===ie)return wa(e)}throw Error(i(438,String(e)))}function ls(e){var t=null,n=W.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=W.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=os(),W.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ue;return t.index++,n}function us(e,t){return typeof t==`function`?t(e):t}function ds(e){return fs(as(),Bo,e)}function fs(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(zo&f)===f:(Z&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ra&&(d=!0);else if((zo&p)===p){u=u.next,p===Ra&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,W.lanes|=p,id|=p;f=u.action,Wo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,W.lanes|=f,id|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Hr(o,e.memoizedState)&&(jc=!0,d&&(n=za,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function G(e){var t=as(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Hr(o,t.memoizedState)||(jc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ps(e,t,n){var r=W,a=as(),o=z;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Hr((Bo||a).memoizedState,n);if(s&&(a.memoizedState=n,jc=!0),a=a.queue,Rs(gs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Vo!==null&&!!(Vo.memoizedState.tag&1),Ns(e?9:8,{destroy:void 0},hs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Zu===null)throw Error(i(349));o||zo&127||ms(r,t,n)}return n}function ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t=os(),W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hs(e,t,n,r){t.value=n,t.getSnapshot=r,_s(t)&&vs(e)}function gs(e,t,n){return n(function(){_s(t)&&vs(e)})}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Hr(e,n)}catch{return!0}}function vs(e){var t=Oi(e,2);t!==null&&Md(t,e,2)}function ys(e){var t=is();if(typeof e==`function`){var n=e;if(e=n(),Wo){$e(!0);try{n()}finally{$e(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:e},t}function bs(e,t,n,r){return e.baseState=n,fs(e,Bo,typeof r==`function`?r:us)}function xs(e,t,n,r,a){if(lc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ss(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ss(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};o.types=a===null?null:a.types,N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Cs(e,t,s)}catch(n){Ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Cs(e,t,a)}catch(n){Ts(e,t,n)}}function Cs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ws(e,t,n)},function(n){return Ts(e,t,n)}):ws(e,t,n)}function ws(e,t,n){t.status=`fulfilled`,t.value=n,Es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ss(e,n)))}function Ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Es(t),t=t.next;while(t!==r)}e.action=null}function Es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ds(e,t){return t}function Os(e,t){if(z){var n=Zu.formState;if(n!==null){a:{var r=W;if(z){if(aa){b:{for(var i=aa,a=sa;i.nodeType!==8;){if(!a){i=null;break b}if(i=lm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){aa=lm(i.nextSibling),r=i.data===`F!`;break a}}la(r)}r=!1}r&&(t=n[0])}}return n=is(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ds,lastRenderedState:t},n.queue=r,n=oc.bind(null,W,r),r.dispatch=n,r=ys(!1),a=cc.bind(null,W,!1,r.queue),r=is(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=xs.bind(null,W,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ks(e){return As(as(),Bo,e)}function As(e,t,n){if(t=fs(e,t,Ds)[0],e=ds(us)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ss(t)}catch(e){throw e===Ja?Xa:e}else r=t;t=as();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(W.flags|=2048,Ns(9,{destroy:void 0},js.bind(null,i,n),null)),[r,a,e]}function js(e,t){e.action=t}function Ms(e){var t=as(),n=Bo;if(n!==null)return As(t,n,e);as(),t=t.memoizedState,n=as();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=W.updateQueue,t===null&&(t=os(),W.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ps(){return as().memoizedState}function Fs(e,t,n,r){var i=is();W.flags|=e,i.memoizedState=Ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function Is(e,t,n,r){var i=as();r=r===void 0?null:r;var a=i.memoizedState.inst;Bo!==null&&r!==null&&Xo(r,Bo.memoizedState.deps)?i.memoizedState=Ns(t,a,n,r):(W.flags|=e,i.memoizedState=Ns(1|t,a,n,r))}function Ls(e,t){Fs(8390656,8,e,t)}function Rs(e,t){Is(2048,8,e,t)}function zs(e){W.flags|=4;var t=W.updateQueue;if(t===null)t=os(),W.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bs(e){var t=as().memoizedState;return zs({ref:t,nextImpl:e}),function(){if(Y&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Vs(e,t){return Is(4,2,e,t)}function Hs(e,t){return Is(4,4,e,t)}function Us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ws(e,t,n){n=n==null?null:n.concat([e]),Is(4,4,Us.bind(null,t,e),n)}function Gs(){}function Ks(e,t){var n=as();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=as();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Xo(t,r[1]))return r[0];if(r=e(),Wo){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r}function Js(e,t,n){return n===void 0||zo&1073741824&&!(Z&261930)?e.memoizedState=t:(e.memoizedState=n,e=Ad(),W.lanes|=e,id|=e,n)}function Ys(e,t,n,r){return Hr(n,t)?n:wo.current===null?!(zo&106)||zo&1073741824&&!(Z&261930)?(jc=!0,e.memoizedState=n):(e=Ad(),W.lanes|=e,id|=e,t):(e=Js(e,n,r),Hr(e,t)||(jc=!0),e)}function Xs(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};s.types=o===null?null:o.types,N.T=s,cc(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,Ha(c,r),kd(e)):sc(e,t,r,kd(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},kd())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=$s(e).queue;Xs(e,a,t,ve,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ve,baseState:ve,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:ve},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},kd())}function tc(){return wa(sh)}function nc(){return as().memoizedState}function rc(){return as().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=kd();e=ho(n);var r=go(t,e,n);r!==null&&(Md(r,t,n),_o(r,t,n)),t={cache:ja()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=kd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=Di(e,t,n,r),n!==null&&(Md(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,kd())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Hr(s,o))return Ei(e,t,i,0),Zu===null&&Ti(),!1}catch{}if(n=Di(e,t,i,r),n!==null)return Md(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:Nf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(i(479))}else t=Di(e,n,r,2),t!==null&&Md(t,e,2)}function lc(e){var t=e.alternate;return e===W||t!==null&&t===W}function uc(e,t){Uo=Ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gt(e,n)}}var fc={readContext:wa,use:cs,useCallback:Yo,useContext:Yo,useEffect:Yo,useImperativeHandle:Yo,useLayoutEffect:Yo,useInsertionEffect:Yo,useMemo:Yo,useReducer:Yo,useRef:Yo,useState:Yo,useDebugValue:Yo,useDeferredValue:Yo,useTransition:Yo,useSyncExternalStore:Yo,useId:Yo,useHostTransitionStatus:Yo,useFormState:Yo,useActionState:Yo,useOptimistic:Yo,useMemoCache:Yo,useCacheRefresh:Yo,useEffectEvent:Yo},pc={readContext:wa,use:cs,useCallback:function(e,t){return is().memoizedState=[e,t===void 0?null:t],e},useContext:wa,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var n=is();t=t===void 0?null:t;var r=e();if(Wo){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=is();if(n!==void 0){var i=n(t);if(Wo){$e(!0);try{n(t)}finally{$e(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ac.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=is();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(is(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,W,e.queue,!0,!1),is().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,a=is();if(z){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Zu===null)throw Error(i(349));Z&127||ms(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},hs.bind(null,r,o,n,t),null),n},useId:function(){var e=is(),t=Zu.identifierPrefix;if(z){var n=Qi,r=Zi;n=(r&~(1<<32-et(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Jo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Os,useActionState:Os,useOptimistic:function(e){var t=is();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cc.bind(null,W,!0,n),n.dispatch=t,[e,t]},useMemoCache:ls,useCacheRefresh:function(){return is().memoizedState=ic.bind(null,W)},useEffectEvent:function(e){var t=is(),n={impl:e};return t.memoizedState=n,function(){if(Y&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},mc={readContext:wa,use:cs,useCallback:Ks,useContext:wa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:ds,useRef:Ps,useState:function(){return ds(us)},useDebugValue:Gs,useDeferredValue:function(e,t){return Ys(as(),Bo.memoizedState,e,t)},useTransition:function(){var e=ds(us)[0],t=as().memoizedState;return[typeof e==`boolean`?e:ss(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:ks,useActionState:ks,useOptimistic:function(e,t){return bs(as(),Bo,e,t)},useMemoCache:ls,useCacheRefresh:rc,useEffectEvent:Bs},hc={readContext:wa,use:cs,useCallback:Ks,useContext:wa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:G,useRef:Ps,useState:function(){return G(us)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=as();return Bo===null?Js(n,e,t):Ys(n,Bo.memoizedState,e,t)},useTransition:function(){var e=G(us)[0],t=as().memoizedState;return[typeof e==`boolean`?e:ss(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){var n=as();return Bo===null?(n.baseState=e,[e,n.queue.dispatch]):bs(n,Bo,e,t)},useMemoCache:ls,useCacheRefresh:rc,useEffectEvent:Bs};function gc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=kd(),i=ho(r);i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Md(t,e,r),_o(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=kd(),i=ho(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Md(t,e,r),_o(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=kd(),r=ho(n);r.tag=2,t!=null&&(r.callback=t),t=go(e,r,n),t!==null&&(Md(t,e,n),_o(t,e,n))}};function vc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ur(n,r)||!Ur(i,a):!0}function yc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function bc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function xc(e){xi(e)}function Sc(e){console.error(e)}function Cc(e){xi(e)}function wc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ec(e,t,n){return n=ho(n),n.tag=3,n.payload={element:null},n.callback=function(){wc(e,t)},n}function Dc(e){return e=ho(e),e.tag=3,e}function Oc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Tc(t,n,r),typeof i!=`function`&&(gd===null?gd=new Set([this]):gd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function kc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&V(t,n,a,!0),n=ko.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Ao===null?Wd():n.alternate===null&&rd===0&&(rd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),pf(e,r,a)),!1;case 22:return n.flags|=65536,r===Za?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),pf(e,r,a)),!1}throw Error(i(435,n.tag))}return pf(e,r,a),Wd(),!1}if(z)return t=ko.current,t===null?(r!==ca&&(t=Error(i(423),{cause:r}),ha(Ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ui(r,n),a=Ec(e.stateNode,r,a),vo(e,a),rd!==4&&(rd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ca&&(e=Error(i(422),{cause:r}),ha(Ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ui(o,n),ld===null?ld=[o]:ld.push(o),rd!==4&&(rd=2),t===null)return!0;r=Ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ec(n.stateNode,r,e),vo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(gd===null||!gd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Dc(a),Oc(a,e,n,r),vo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ac=Error(i(461)),jc=!1;function Mc(e,t,n,r){t.child=e===null?uo(t,null,n,r):lo(t,e.child,n,r)}function Nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ca(t),r=Zo(e,t,n,o,a,i),s=ts(),e!==null&&!jc?(ns(e,t,i),sl(e,t,i)):(z&&s&&ta(t),t.flags|=1,Mc(e,t,r,i),t.child)}function Pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Fc(e,t,a,r,i)):(e=Li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!cl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ur:n,n(o,r)&&e.ref===t.ref)return sl(e,t,i)}return t.flags|=1,e=Fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ur(a,r)&&e.ref===t.ref){if(jc=!1,t.pendingProps=r=a,cl(e,i))e.flags&131072&&(jc=!0);else return t.lanes=e.lanes,sl(e,t,i)}}return Uc(e,t,n,r,i)}function Ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ka(t,a===null?null:a.cachePool),a===null?Do():Eo(t,a),No(t);else return r=t.lanes=536870912,Rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ka(t,null),Do(),Po()):(Ka(t,a.cachePool),Eo(t,a),Po(),t.memoizedState=null);return Mc(e,t,i,n),t.child}function Lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rc(e,t,n,r,i){var a=Ga();return a=a===null?null:{parent:Aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ka(t,null),Do(),No(t),e!==null&&V(e,t,r,!0),t.childLanes=i,null}function zc(e,t){return t=Qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bc(e,t,n){return lo(t,e.child,null,n),e=zc(t,t.pendingProps),e.flags|=2,U(t),t.memoizedState=null,e}function Vc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(z){if(r.mode===`hidden`)return e=zc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Lc(null,e);if(Mo(t),(e=aa)?(e=am(e,sa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=536870912,null}return zc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Mo(t),a){if(t.flags&256)t.flags&=-257,t=Bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(jc||V(e,t,n,!1),a=(n&e.childLanes)!==0,jc||a){if(wo.current===null){if(r=Zu,r!==null&&(s=_t(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Oi(e,s),Md(r,e,s),Ac;Wd()}t=Bc(e,t,n)}else e=o.treeContext,aa=lm(s.nextSibling),ia=t,z=!0,oa=null,sa=!1,e!==null&&ra(t,e),t=zc(t,r),t.flags|=134221824;return t}return e=Fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Uc(e,t,n,r,i){return Ca(t),n=Zo(e,t,n,r,void 0,i),r=ts(),e!==null&&!jc?(ns(e,t,i),sl(e,t,i)):(z&&r&&ta(t),t.flags|=1,Mc(e,t,n,i),t.child)}function Wc(e,t,n,r,i,a){return Ca(t),t.updateQueue=null,n=$o(t,r,n,i),Qo(e),r=ts(),e!==null&&!jc?(ns(e,t,a),sl(e,t,a)):(z&&r&&ta(t),t.flags|=1,Mc(e,t,n,a),t.child)}function Gc(e,t,n,r,i){if(Ca(t),t.stateNode===null){var a=ji,o=n.contextType;typeof o==`object`&&o&&(a=wa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=_c,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},po(t),o=n.contextType,a.context=typeof o==`object`&&o?wa(o):ji,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(gc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&_c.enqueueReplaceState(a,a.state,null),xo(t,r,a,i),bo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=bc(n,s);a.props=c;var l=a.context,u=n.contextType;o=ji,typeof u==`object`&&u&&(o=wa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&yc(t,a,r,o),fo=!1;var f=t.memoizedState;a.state=f,xo(t,r,a,i),bo(),l=t.memoizedState,s||f!==l||fo?(typeof d==`function`&&(gc(t,n,d,r),l=t.memoizedState),(c=fo||vc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,mo(e,t),o=t.memoizedProps,u=bc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ji,typeof l==`object`&&l&&(c=wa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&yc(t,a,r,c),fo=!1,f=t.memoizedState,a.state=f,xo(t,r,a,i),bo();var p=t.memoizedState;o!==d||f!==p||fo||e!==null&&e.dependencies!==null&&Sa(e.dependencies)?(typeof s==`function`&&(gc(t,n,s,r),p=t.memoizedState),(u=fo||vc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Sa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Hc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=lo(t,e.child,null,i),t.child=lo(t,null,n,i)):Mc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=sl(e,t,i),e}function Kc(e,t,n,r){return pa(),t.flags|=256,Mc(e,t,n,r),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:qa()}}function Yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=sd),e}function Xc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Fo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(z){if(i?jo(t):Po(),(e=aa)?(e=am(e,sa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=sm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Po(),i=t.mode,a=Qc({mode:`hidden`,children:a},i),r=Ri(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Jc(n),r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(null,r)):(jo(t),Zc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return el(e,t,a,o,r,c,s,n)}return i?(Po(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Fi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ri(i,a,n,null),i.flags|=2):i=Fi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Lc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Jc(n):(a=i.cachePool,a===null?a=qa():(s=Aa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(e.child,r)):(jo(t),n=e.child,e=n.sibling,n=Fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Zc(e,t){return t=Qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Qc(e,t){return e=Ni(22,e,null,t),e.lanes=0,e}function $c(e,t,n){return lo(t,e.child,null,n),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function el(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(jo(t),t.flags&=-257,$c(e,t,c)):t.memoizedState===null?(Po(),o=a.fallback,s=t.mode,a=Qc({mode:`visible`,children:a.children},s),o=Ri(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,lo(t,e.child,null,c),a=t.child,a.memoizedState=Jc(c),a.childLanes=Yc(e,r,c),t.memoizedState=qc,Lc(null,a)):(Po(),t.child=e.child,t.flags|=128,null);if(jo(t),sm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ha({value:a,source:null,stack:null})),$c(e,t,c)}if(jc||V(e,t,c,!1),r=(c&e.childLanes)!==0,jc||r){if(wo.current!==null)return $c(e,t,c);if(r=Zu,r!==null&&(a=_t(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Oi(e,a),Md(r,e,a),Ac;return om(o)||Wd(),$c(e,t,c)}return om(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,aa=lm(o.nextSibling),ia=t,z=!0,oa=null,sa=!1,e!==null&&ra(t,e),t=Zc(t,a.children),t.flags|=134221824,t)}function tl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ba(e.return,t,n)}function nl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Ro(n)===null&&(t=e),e=e.sibling}return t}function rl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function il(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function al(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Fo.current;if(t.flags&128)return Io(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Io(t,o),i===`backwards`&&e!==null?(il(e),Mc(e,t,r,n),il(e)):Mc(e,t,r,n),r=z?qi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tl(e,n,t);else if(e.tag===19)tl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,il(t)),rl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rl(t,!0,n,null,a,r);break;case`together`:rl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rl(t,!1,i,n,a,r)}return t.child}function ol(e,t,n){var r=t.pendingProps;return va(t,t.type,r.value),Mc(e,t,r.children,n),t.child}function sl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),id|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(V(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Sa(e)))}function ll(e,t,n){switch(t.tag){case 3:Ee(t,t.stateNode.containerInfo),va(t,Aa,e.memoizedState.cache),pa();break;case 27:case 5:Oe(t);break;case 4:Ee(t,t.stateNode.containerInfo);break;case 10:va(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return jo(t),t.flags|=128,null;r=V(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Xc(e,t,n):(jo(t),e=sl(e,t,n),e===null?null:e.sibling)}jo(t);break;case 19:if(t.flags&128)return al(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(V(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return al(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Io(t,Fo.current),r)break;return null;case 22:return t.lanes=0,Ic(e,t,n,t.pendingProps);case 24:va(t,Aa,e.memoizedState.cache)}return sl(e,t,n)}function ul(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)jc=!0;else{if(!cl(e,n)&&!(t.flags&128))return jc=!1,ll(e,t,n);jc=!!(e.flags&131072)}}else jc=!1,z&&t.flags&1048576&&ea(t,qi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=eo(t.elementType),t.type=e,typeof e==`function`)Pi(e)?(r=bc(e,r),t.tag=1,t=Gc(null,t,e,r,n)):(t.tag=0,t=Uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ae){t.tag=11,t=Nc(null,t,e,r,n);break a}if(a===ce){t.tag=14,t=Pc(null,t,e,r,n);break a}if(a===ie){t.tag=10,t.type=e,t=ol(null,t,n);break a}}throw t=ge(e)||e,Error(i(306,t,``))}}return t;case 0:return Uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=bc(r,t.pendingProps),Gc(e,t,r,a,n);case 3:a:{if(Ee(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,mo(e,t),xo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,va(t,Aa,r),r!==o.cache&&xa(t,[Aa],n,!0),bo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Kc(e,t,r,n);break a}if(r!==a){a=Ui(Error(i(424)),t),ha(a),t=Kc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(aa=lm(e.firstChild),ia=t,z=!0,oa=null,sa=!0,n=uo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(pa(),r===a){t=sl(e,t,n);break a}Mc(e,t,r,n)}t=t.child}return t;case 26:return Hc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:z||(t.stateNode=fp(t.type,t.pendingProps,we.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Oe(t),e===null&&z&&(r=t.stateNode=hm(t.type,t.pendingProps,we.current),ia=t,sa=!0,a=aa,Sp(t.type)?(um=a,aa=lm(r.firstChild)):aa=a),Mc(e,t,t.pendingProps.children,n),Hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&z&&((a=r=aa)&&(r=rm(r,t.type,t.pendingProps,sa),r===null?a=!1:(t.stateNode=r,ia=t,aa=lm(r.firstChild),sa=!1,a=!0)),a||la(t)),Oe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,pp(a,o)?r=null:s!==null&&pp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Zo(e,t,es,null,null,n),sh._currentValue=a),Hc(e,t),Mc(e,t,r,n),t.child;case 6:return e===null&&z&&((e=n=aa)&&(n=im(n,t.pendingProps,sa),n===null?e=!1:(t.stateNode=n,ia=t,aa=null,e=!0)),e||la(t)),null;case 13:return Xc(e,t,n);case 4:return Ee(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):Mc(e,t,r,n),t.child;case 11:return Nc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Hc(e,t),Mc(e,t,r,n),t.child;case 8:return Mc(e,t,t.pendingProps.children,n),t.child;case 12:return Mc(e,t,t.pendingProps.children,n),t.child;case 10:return ol(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ca(t),a=wa(a),r=r(a),t.flags|=1,Mc(e,t,r,n),t.child;case 14:return Pc(e,t,t.type,t.pendingProps,n);case 15:return Fc(e,t,t.type,t.pendingProps,n);case 19:return al(e,t,n);case 31:return Vc(e,t,n);case 22:return Ic(e,t,n,t.pendingProps);case 24:return Ca(t),r=wa(Aa),e===null?(a=Ga(),a===null&&(a=Zu,o=ja(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},po(t),va(t,Aa,a)):((e.lanes&n)!==0&&(mo(e,t),xo(t,null,null,n),bo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,va(t,Aa,r),r!==a.cache&&xa(t,[Aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),va(t,Aa,r))),Mc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:z&&ta(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Hc(e,t),Mc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function dl(e){e.flags|=4}function fl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Vd())e.flags|=8192;else throw to=Za,Ya}}else e.flags&=-16777217}function pl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Vd())e.flags|=8192;else throw to=Za,Ya}}function ml(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:dt(),e.lanes|=t,cd|=t)}function hl(e,t){if(!z)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function K(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function gl(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return K(t),null;case 1:return K(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ya(Aa),De(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(fa(t)?dl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ma())),K(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(dl(t),o===null?(K(t),fl(t,a,null,r,n)):(K(t),pl(t,o))):o?o===e.memoizedState?(K(t),t.flags&=-16777217):(dl(t),K(t),pl(t,o)):(e=e.memoizedProps,e!==r&&dl(t),K(t),fl(t,a,e,r,n)),null;case 27:if(ke(t),n=we.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return K(t),t.subtreeFlags&=-33554433,null}e=Se.current,fa(t)?ua(t,e):(e=hm(a,r,n),t.stateNode=e,dl(t))}return K(t),t.subtreeFlags&=-33554433,null;case 5:if(ke(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return K(t),t.subtreeFlags&=-33554433,null}if(o=Se.current,fa(t))ua(t,o);else{var s=lp(we.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ct]=t,o[wt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&dl(t)}}return K(t),t.subtreeFlags&=-33554433,fl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=we.current,fa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ia,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||$f(e.nodeValue,n)),e||la(t,!0)}else e=lp(e).createTextNode(r),e[Ct]=t,t.stateNode=e}return K(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=fa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ct]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;K(t),e=!1}else n=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(U(t),t):(U(t),null);if(t.flags&128)throw Error(i(558))}return K(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=fa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ct]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;K(t),a=!1}else a=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(U(t),t):(U(t),null)}return U(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ml(t,t.updateQueue),K(t),null);case 4:return De(),e===null&&Uf(t.stateNode.containerInfo),t.flags|=67108864,K(t),null;case 10:return ya(t.type),K(t),null;case 19:if(Lo(t),r=t.memoizedState,r===null)return K(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)hl(r,!1);else{if(rd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ro(e),o!==null){for(t.flags|=128,hl(r,!1),e=o.updateQueue,t.updateQueue=e,ml(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ii(n,e),n=n.sibling;return Io(t,Fo.current&1|2),z&&$i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&He()>md&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ml(t,e),hl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!z)return K(t),null}else 2*He()-r.renderingStartTime>md&&n!==536870912&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=He(),e.sibling=null,o=Fo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||z?Io(t,o):(n=o,I(ko,t),I(Fo,n),Ao===null&&(Ao=t)),z&&$i(t,r.treeForkCount),e}return K(t),null;case 22:case 23:return U(t),Oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(K(t),t.subtreeFlags&6&&(t.flags|=8192)):K(t),n=t.updateQueue,n!==null&&ml(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&xe(Wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ya(Aa),K(t),null;case 25:return null;case 30:return t.flags|=33554432,K(t),null}throw Error(i(156,t.tag))}function _l(e,t){switch(na(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ya(Aa),De(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ke(t),null;case 31:if(t.memoizedState!==null){if(U(t),t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(U(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return De(),null;case 10:return ya(t.type),null;case 22:case 23:return U(t),Oo(),e!==null&&xe(Wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(Aa),null;case 25:return null;default:return null}}function vl(e,t){switch(na(t),t.tag){case 3:ya(Aa),De();break;case 26:case 27:case 5:ke(t);break;case 4:De();break;case 31:t.memoizedState!==null&&U(t);break;case 13:U(t);break;case 19:Lo(t);break;case 10:ya(t.type);break;case 22:case 23:U(t),Oo(),e!==null&&xe(Wa);break;case 24:ya(Aa)}}function yl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ff(t,t.return,e)}}function bl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ff(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ff(t,t.return,e)}}function q(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Co(t,n)}catch(t){ff(e,e.return,t)}}}function xl(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ff(e,t,n)}}function Sl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=vi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);h(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ff(e,t,n)}}function Cl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ff(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ff(e,t,n)}else n.current=null}}function wl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)em(e.stateNode,t[n])}function Tl(e){for(var t=e.return;t!==null&&(Ol(t)&&em(e.stateNode,t.stateNode),!Dl(t));)t=t.return}function El(e){for(var t=e.return;t!==null&&(Ol(t)&&tm(e.stateNode,t.stateNode),!Dl(t));)t=t.return}function Dl(e){return e.tag===5||e.tag===3||e.tag===27}function Ol(e){return e&&e.tag===7&&e.stateNode!==null}function kl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ff(e,e.return,t)}}function Al(e,t,n){try{var r=e.stateNode;ip(r,e.type,n,t),r[wt]=t}catch(t){ff(e,e.return,t)}}function jl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sp(e.type)||e.tag===4}function Ml(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||jl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Sp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yn)),wl(e,r),R=!0;else if(i!==4&&(i===27&&(wl(e,r),r=null,Sp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Nl(e,t,n,r),e=e.sibling;e!==null;)Nl(e,t,n,r),e=e.sibling}function Pl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),wl(e,r),R=!0;else if(i!==4&&(i===27&&(wl(e,r),r=null,Sp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Pl(e,t,n,r),e=e.sibling;e!==null;)Pl(e,t,n,r),e=e.sibling}function Fl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);np(t,r,n),t[Ct]=e,t[wt]=n}catch(t){ff(e,e.return,t)}}var Il=!1,Ll=null;function Rl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Il=!0)}var zl=null;function Bl(){var e=zl;return zl=null,e}var Vl=0;function Hl(e,t,n,r,i){return Vl=0,Ul(e.child,t,n,r,i)}function Ul(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Op(o);r.push(s),s.view&&(a=!0)}else a||Op(o).view&&(a=!0);Il=!0,Tp(o,Vl===0?t:t+`_`+Vl,n),Vl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Ul(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Wl(e,t){for(;e!==null;)e.tag===5?Ep(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Wl(e.child,t)),e=e.sibling}function Gl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Gl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=bi(t.default,t.share),t!==`none`&&(Hl(e,n,t,null,!1)||Wl(e.child,!1))}e=e.sibling}}function Kl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=vi(r,n),a=bi(r.default,n.paired?r.share:r.enter);a===`none`?Gl(e):Hl(e,i,a,null,!1)?(Gl(e),n.paired||t||jd(e,r.onEnter)):Wl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Kl(e,t),e=e.sibling;else Gl(e)}function ql(e){if(Ll!==null&&Ll.size!==0){var t=Ll;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=bi(n.default,n.share);if(a!==`none`&&(Hl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,jd(e,n.onShare)):Wl(e.child,!1)),t.delete(r),t.size===0)break}}}ql(e)}e=e.sibling}}}function Jl(e){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode),r=Ll===null?void 0:Ll.get(n),i=bi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Hl(e,n,i,null,!1)?r===void 0?jd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Ll.delete(n),jd(e,t.onShare)):Wl(e.child,!1)),Ll!==null&&ql(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e),e=e.sibling;else Ll!==null&&ql(e)}function Yl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode);t=bi(t.default,t.update),e.flags&=-5,t!==`none`&&Hl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Yl(e);e=e.sibling}}function Xl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Wl(e.child,!1))}Xl(e)}e=e.sibling}}function Zl(e){if(e.tag===30)e.stateNode.paired=null,Wl(e.child,!1),Xl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e),e=e.sibling;else Xl(e)}function Ql(e){for(e=e.child;e!==null;)e.tag===30?Wl(e.child,!1):e.subtreeFlags&33554432&&Ql(e),e=e.sibling}function $l(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Vl<a.length){var l=a[Vl],u=Op(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Tp(c,Vl===0?n:n+`_`+Vl,i),s&&e.flags&4||(zl===null&&(zl=[]),zl.push(c,Vl===0?r:r+`_`+Vl,t.memoizedProps)),Vl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:$l(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function eu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=vi(n,r),a=bi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(kp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Vl=0,i=$l(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||jd(e,n.onUpdate))}else e.subtreeFlags&33554432&&eu(e,t);e=e.sibling}}var tu=!1,J=!1,nu=!1,ru=!1,iu=typeof WeakSet==`function`?WeakSet:Set,au=null,ou=!1,su=!1,cu=!1,lu=!1;function uu(e,t,n){if(e=e.containerInfo,sp=gh,e=Jr(e),Yr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(cp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,au=t,t=n?9270:1024;au!==null;){if(e=au,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Jl(r[a]);if(e.alternate===null&&e.flags&2)n&&Rl(e),du(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Jl(r),du(n);continue}if(r!==null&&r.memoizedState!==null){n&&Rl(e),du(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,au=r):(n&&Yl(e),du(n))}}Ll=null}function du(e){for(;au!==null;){var t=au,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=bc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){ff(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)nm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:nm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=vi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=bi(a.default,a.update),a!==`none`&&Hl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,au=r;break}au=t.return}}function fu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Mu(e,n),r&4&&yl(5,n);break;case 1:if(Mu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ff(n,n.return,e)}else{var i=bc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ff(n,n.return,e)}}}r&64&&q(n),r&512&&Sl(n,n.return);break;case 3:if(Mu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Co(e,t)}catch(e){ff(n,n.return,e)}}break;case 27:t===null&&r&4&&Fl(n);case 26:case 5:Mu(e,n),t===null&&r&4&&kl(n),r&512&&Sl(n,n.return);break;case 12:Mu(e,n);break;case 31:Mu(e,n),r&4&&xu(e,n);break;case 13:Mu(e,n),r&4&&Su(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=gf.bind(null,n),cm(e,n))));break;case 22:if(r=n.memoizedState!==null||tu,!r){var a=t!==null&&t.memoizedState!==null||J;t=tu,i=J,tu=r,(J=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Pu(e,n,r)):Mu(e,n),tu=t,J=i}break;case 30:Mu(e,n),r&512&&Sl(n,n.return);break;case 7:r&512&&Sl(n,n.return);default:Mu(e,n)}}function pu(e,t){for(e=e.child;e!==null;)mu(e,t),e=e.sibling}function mu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){ff(e,e.return,t)}hu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,R=!0}catch(t){ff(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?wp(s,!0):wp(e.stateNode,!1)}catch(t){ff(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&pu(e,t);break;default:pu(e,t)}}function hu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:mu(n,r);break a;case 22:n.memoizedState===null&&hu(n,r);break a;default:hu(n,r)}}e=e.sibling}}function gu(e){var t=e.alternate;t!==null&&(e.alternate=null,gu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Mt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var _u=null,vu=!1;function yu(e,t,n){for(n=n.child;n!==null;)bu(e,t,n),n=n.sibling}function bu(e,t,n){if(Qe&&typeof Qe.onCommitFiberUnmount==`function`)try{Qe.onCommitFiberUnmount(Ze,n)}catch{}switch(n.tag){case 26:J||Cl(n,t),yu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!J&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:J||Cl(n,t),El(n);var r=_u,i=vu;Sp(n.type)&&(_u=n.stateNode,vu=!1),yu(e,t,n),gm(n.stateNode,n.type,n.memoizedProps),_u=r,vu=i;break;case 5:J||Cl(n,t),El(n);case 6:if(n.tag===6&&El(n),r=_u,i=vu,_u=null,yu(e,t,n),_u=r,vu=i,_u!==null){if(vu)try{(_u.nodeType===9?_u.body:_u.nodeName===`HTML`?_u.ownerDocument.body:_u).removeChild(n.stateNode),R=!0}catch(e){ff(n,t,e)}else try{_u.removeChild(n.stateNode),R=!0}catch(e){ff(n,t,e)}}break;case 18:_u!==null&&(vu?(e=_u,Cp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Cp(_u,n.stateNode));break;case 4:r=_u,i=vu,_u=n.stateNode.containerInfo,vu=!0,yu(e,t,n),_u=r,vu=i;break;case 0:case 11:case 14:case 15:bl(2,n,t),J||bl(4,n,t),yu(e,t,n);break;case 1:J||(Cl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&xl(n,t,r)),yu(e,t,n);break;case 21:yu(e,t,n);break;case 22:J=(r=J)||n.memoizedState!==null,yu(e,t,n),J=r;break;case 30:Cl(n,t),yu(e,t,n);break;case 7:J||Cl(n,t),yu(e,t,n);break;default:yu(e,t,n)}}function xu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){ff(t,t.return,e)}}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){ff(t,t.return,e)}}function Cu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new iu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new iu),t;default:throw Error(i(435,e.tag))}}function wu(e,t){var n=Cu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=_f.bind(null,e,t);t.then(r,r)}})}function Tu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Sp(l.type)){_u=l.stateNode,vu=!1;break a}break;case 5:_u=l.stateNode,vu=!1;break a;case 3:case 4:_u=l.stateNode.containerInfo,vu=!0;break a}l=l.return}if(_u===null)throw Error(i(160));bu(s,c,o),_u=null,vu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Du(t,e,n),t=t.sibling}var Eu=null;function Du(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Tu(t,e,n),Ou(e),a&4&&(bl(3,e,e.return),yl(3,e),bl(5,e,e.return));break;case 1:Tu(t,e,n),Ou(e),a&512&&(J||r===null||Cl(r,r.return)),a&64&&tu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Eu,Tu(t,e,n),Ou(e),a&512&&(J||r===null||Cl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(tu)e.stateNode=fp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[At]||r[Ct]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),np(r,t,n),r[Ct]=e,Lt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Gm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Ct]=e,Lt(r),t=r}e.stateNode=t}}else tu||Km(o,e.type,e.stateNode)}else e.stateNode=Bm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Al(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||J||t.parentNode.removeChild(t)):a.count--,n===null?tu||Km(o,e.type,e.stateNode):Bm(o,n,e.memoizedProps))}break;case 27:Tu(t,e,n),Ou(e),a&512&&(J||r===null||Cl(r,r.return)),r!==null&&a&4&&Al(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=nu,nu=!1,Tu(t,e,n),nu=o,Ou(e),a&512&&(J||r===null||Cl(r,r.return)),e.flags&32){t=e.stateNode;try{dn(t,``),R=!0}catch(t){ff(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Al(e,t,r===null?t:r.memoizedProps)),a&1024&&(ru=!0);break;case 6:if(Tu(t,e,n),Ou(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,R=!0}catch(t){ff(e,e.return,t)}}break;case 3:if(R=!1,Wm=null,o=Eu,Eu=bm(t.containerInfo),Tu(t,e,n),Eu=o,Ou(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){ff(e,e.return,t)}ru&&(ru=!1,ku(e)),R=!1;break;case 4:a=nu,nu=tu,r=qt(),o=Eu,Eu=bm(e.stateNode.containerInfo),Tu(t,e,n),Ou(e),Eu=o,R&&su&&(cu=!0),R=r,nu=a;break;case 12:Tu(t,e,n),Ou(e);break;case 31:Tu(t,e,n),Ou(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 13:Tu(t,e,n),Ou(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(fd=He()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=tu,l=J,u=nu;tu=c||o,nu=u||o,J=l||s,Tu(t,e,n),J=l,nu=u,tu=c,Ou(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||tu||J||(t=s||J,n=tu,r=J,tu=o||tu,J=t,Nu(e,2),tu=n,J=r),!o&&nu||pu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,wu(e,n))));break;case 19:Tu(t,e,n),Ou(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,wu(e,t)));break;case 30:a&512&&(J||r===null||Cl(r,r.return)),a=qt(),o=su,s=(n&335544064)===n,c=e.memoizedProps,su=s&&bi(c.default,c.update)!==`none`,Tu(t,e,n),Ou(e),s&&r!==null&&R&&(e.flags|=4),su=o,R=a;break;case 21:break;case 7:a&512&&(J||r===null||Cl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Tu(t,e,n),Ou(e)}}function Ou(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(jl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ol(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Dl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Pl(e,Ml(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(dn(l,``),n.flags&=-33),Pl(e,Ml(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Nl(e,Ml(e),u,s);break;default:throw Error(i(161))}}catch(t){ff(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ku(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ku(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Au(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)ju(t,e),t=t.sibling;else eu(t,!1)}function ju(e,t){var n=e.alternate;if(n===null)Kl(e,!1);else switch(e.tag){case 3:if(lu=ou=!1,Bl(),Au(t,e),!ou&&!cu){if(e=zl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ep(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),lu=!0}zl=null;break;case 5:Au(t,e);break;case 4:r=ou,ou=!1,Au(t,e),ou&&(cu=!0),ou=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Au(t,e):Kl(e,!1));break;case 30:r=ou,i=Bl(),ou=!1,Au(t,e),ou&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=vi(a,o),o=vi(n.memoizedProps,o);var s=bi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Vl=0,t=$l(e,n,t,o,s,a,!0),Vl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(jd(e,e.memoizedProps.onUpdate),zl=i):i!==null&&(i.push.apply(i,zl),zl=i),ou=e.flags&32?!0:r;break;default:Au(t,e)}}function Mu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fu(e,t.alternate,t),t=t.sibling}function Nu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:bl(4,n,n.return),Nu(n,r);break;case 1:Cl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&xl(n,n.return,i),Nu(n,r);break;case 27:r&2&&gm(n.stateNode,n.type,n.memoizedProps);case 5:Cl(n,n.return),n.tag!==5&&n.tag!==27||El(n),Nu(n,r);break;case 6:El(n);break;case 26:Cl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||J||i.parentNode.removeChild(i),Nu(n,r);break;case 22:n.memoizedState===null&&Nu(n,r);break;case 30:Cl(n,n.return),Nu(n,r);break;case 7:Cl(n,n.return);default:Nu(n,r)}e=e.sibling}}function Pu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Pu(i,a,n),yl(4,a);break;case 1:if(Pu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ff(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)So(l[i],c)}catch(e){ff(r,r.return,e)}}s&&o&64&&q(a),Sl(a,a.return);break;case 27:n&2&&Fl(a);case 5:a.tag!==5&&a.tag!==27||Tl(a),Pu(i,a,n),s&&r===null&&o&4&&kl(a),Sl(a,a.return);break;case 6:Tl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||tu||Km(bm(c.ownerDocument),a.type,c),Pu(i,a,n),s&&r===null&&o&4&&kl(a),Sl(a,a.return);break;case 12:Pu(i,a,n);break;case 31:Pu(i,a,n),s&&o&4&&xu(i,a);break;case 13:Pu(i,a,n),s&&o&4&&Su(i,a);break;case 22:a.memoizedState===null&&Pu(i,a,n),Sl(a,a.return);break;case 30:Pu(i,a,n),Sl(a,a.return);break;case 7:Sl(a,a.return);default:Pu(i,a,n)}t=t.sibling}}function Fu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ma(n))}function Iu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ma(e))}function Lu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Ru(e,t,n,r),t=t.sibling;else i&&Ql(t)}function Ru(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Zl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Lu(e,t,n,r),a&2048&&yl(9,t);break;case 1:Lu(e,t,n,r);break;case 3:Lu(e,t,n,r),i&&lu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ma(a)));break;case 12:if(a&2048){Lu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){ff(t,t.return,e)}}else Lu(e,t,n,r);break;case 31:Lu(e,t,n,r);break;case 13:Lu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Zl(t),o._visibility&2?Lu(e,t,n,r):(o._visibility|=2,zu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Zl(s),o._visibility&2?Lu(e,t,n,r):Bu(e,t)),a&2048&&Fu(s,t);break;case 24:Lu(e,t,n,r),a&2048&&Iu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Wl(a.child,!0),Wl(t.child,!0))),Lu(e,t,n,r);break;default:Lu(e,t,n,r)}}function zu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:zu(a,o,s,c,i),yl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,zu(a,o,s,c,i)):u._visibility&2?zu(a,o,s,c,i):Bu(a,o),i&&l&2048&&Fu(o.alternate,o);break;case 24:zu(a,o,s,c,i),i&&l&2048&&Iu(o.alternate,o);break;default:zu(a,o,s,c,i)}t=t.sibling}}function Bu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Bu(n,r),i&2048&&Fu(r.alternate,r);break;case 24:Bu(n,r),i&2048&&Iu(r.alternate,r);break;default:Bu(n,r)}t=t.sibling}}var Vu=8192;function Hu(e,t,n){if(e.subtreeFlags&Vu)for(e=e.child;e!==null;)Uu(e,t,n),e=e.sibling}function Uu(e,t,n){switch(e.tag){case 26:Hu(e,t,n),e.flags&Vu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,Eu,e.memoizedState,e.memoizedProps));break;case 5:Hu(e,t,n),e.flags&Vu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=Eu;Eu=bm(e.stateNode.containerInfo),Hu(e,t,n),Eu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Vu,Vu=16777216,Hu(e,t,n),Vu=r):Hu(e,t,n));break;case 30:if((e.flags&Vu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Ll===null&&(Ll=new Map),Ll.set(r,i)}Hu(e,t,n);break;default:Hu(e,t,n)}}function Wu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Gu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];au=r,Ju(r,e)}Wu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ku(e),e=e.sibling}function Ku(e){switch(e.tag){case 0:case 11:case 15:Gu(e),e.flags&2048&&bl(9,e,e.return);break;case 3:Gu(e);break;case 12:Gu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qu(e)):Gu(e);break;default:Gu(e)}}function qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];au=r,Ju(r,e)}Wu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:bl(8,t,t.return),qu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,qu(t));break;default:qu(t)}e=e.sibling}}function Ju(e,t){for(;au!==null;){var n=au;switch(n.tag){case 0:case 11:case 15:bl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,au=r;else a:for(n=e;au!==null;){r=au;var i=r.sibling,a=r.return;if(gu(r),r===n){au=null;break a}if(i!==null){i.return=a,au=i;break a}au=a}}}var Yu={getCacheForType:function(e){var t=wa(Aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return wa(Aa).controller.signal}},Xu=typeof WeakMap==`function`?WeakMap:Map,Y=0,Zu=null,X=null,Z=0,Q=0,Qu=null,$u=!1,ed=!1,td=!1,nd=0,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=null,ud=null,dd=!1,fd=0,pd=0,md=1/0,hd=null,gd=null,_d=0,vd=null,yd=null,bd=0,xd=0,Sd=null,Cd=null,wd=null,Td=null,Ed=null,Dd=0,Od=null;function kd(){return Y&2&&Z!==0?Z&-Z:N.T===null?bt():Nf()}function Ad(){if(sd===0){if(!(Z&536870912)||z){var e=it;it<<=1,!(it&3932160)&&(it=262144),sd=e}else sd=536870912}return e=ko.current,e!==null&&(e.flags|=32),sd}function jd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Pp(vi(e.memoizedProps,n))),Td===null&&(Td=[]),Td.push(t.bind(null,r))}}function Md(e,t,n){(e===Zu&&(Q===2||Q===9)||e.cancelPendingCommit!==null)&&(zd(e,0),Id(e,Z,sd,!1)),pt(e,n),(!(Y&2)||e!==Zu)&&(e===Zu&&(!(Y&2)&&(ad|=n),rd===4&&Id(e,Z,sd,!1)),Tf(e))}function Nd(e,t,n){if(Y&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ct(e,t),a=r?qd(e,t):Gd(e,t,!0),o=r;do{if(a===0){ed&&!r&&Id(e,t,0,!1);break}if(n=e.current.alternate,o&&!Fd(n)){a=Gd(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ld;var l=c.current.memoizedState.isDehydrated;if(l&&(zd(c,s).flags|=256),s=Gd(c,s,!1),s!==2&&s!==6){if(td&&!l){c.errorRecoveryDisabledLanes|=o,ad|=o,a=4;break a}o=ud,ud=a,o!==null&&(ud===null?ud=o:ud.push.apply(ud,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){zd(e,0),Id(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Id(r,t,sd,!$u);break a;case 2:ud=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=fd+300-He(),10<a)){if(Id(r,t,sd,!$u),st(r,0,!0)!==0)break a;bd=t,r.timeoutHandle=gp(Pd.bind(null,r,n,ud,hd,dd,t,sd,ad,cd,$u,o,`Throttled`,-0,0),a);break a}Pd(r,n,ud,hd,dd,t,sd,ad,cd,$u,o,null,-0,0)}break}while(1);Tf(e)}function Pd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yn},Ll=null,Uu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?fd-He():(a&4194048)===a?pd-He():0,m=eh(d,m),m!==null)){bd=a,e.cancelPendingCommit=m(ef.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Id(e,a,o,!l);return}ef(e,t,a,n,r,i,o,s,c,l,u,d)}function Fd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Hr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Id(e,t,n,r){t=lt(e,t),t&=~od,t&=~ad,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-et(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ht(e,n,t)}function Ld(){return Y&6?!0:(Ef(0,!1),!1)}function Rd(){if(X!==null){if(Q===0)var e=X.return;else e=X,_a=B=null,rs(e),io=null,H=0,e=X;for(;e!==null;)vl(e.alternate,e),e=e.return;X=null}}function zd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_p(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),bd=0,Rd(),Zu=e,X=n=Fi(e.current,null),Z=t,Q=0,Qu=null,$u=!1,ed=ct(e,t),td=!1,cd=sd=od=ad=id=rd=0,ud=ld=null,dd=!1,nd=lt(e,t),Ti(),n}function Bd(e,t){W=null,N.H=fc,t===Ja||t===Xa?(t=no(),Q=3):t===Ya?(t=no(),Q=4):Q=t===Ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Qu=t,X===null&&(rd=1,wc(e,Ui(t,e.current)))}function Vd(){var e=ko.current;return e===null?!0:(Z&4194048)===Z?Ao===null:(Z&62914560)===Z||Z&536870912?e===Ao:!1}function Hd(){var e=N.H;return N.H=fc,e===null?fc:e}function Ud(){var e=N.A;return N.A=Yu,e}function Wd(){rd=4,$u||(Z&4194048)!==Z&&ko.current!==null||(ed=!0),!(id&134217727)&&!(ad&134217727)||Zu===null||Id(Zu,Z,sd,!1)}function Gd(e,t,n){var r=Y;Y|=2;var i=Hd(),a=Ud();(Zu!==e||Z!==t)&&(hd=null,zd(e,t)),t=!1;var o=rd;a:do try{if(Q!==0&&X!==null){var s=X,c=Qu;switch(Q){case 8:Rd(),o=6;break a;case 3:case 2:case 9:case 6:ko.current===null&&(t=!0);var l=Q;if(Q=0,Qu=null,Zd(e,s,c,l),n&&ed){o=0;break a}break;default:l=Q,Q=0,Qu=null,Zd(e,s,c,l)}}Kd(),o=rd;break}catch(t){Bd(e,t)}while(1);return t&&e.shellSuspendCounter++,_a=B=null,Y=r,N.H=i,N.A=a,X===null&&(Zu=null,Z=0,Ti()),o}function Kd(){for(;X!==null;)Yd(X)}function qd(e,t){var n=Y;Y|=2;var r=Hd(),a=Ud();Zu!==e||Z!==t?(hd=null,md=He()+500,zd(e,t)):ed=ct(e,t);a:do try{if(Q!==0&&X!==null){t=X;var o=Qu;b:switch(Q){case 1:Q=0,Qu=null,Zd(e,t,o,1);break;case 2:case 9:if(Qa(o)){Q=0,Qu=null,Xd(t);break}t=function(){Q!==2&&Q!==9||Zu!==e||(Q=7),Tf(e)},o.then(t,t);break a;case 3:Q=7;break a;case 4:Q=5;break a;case 7:Qa(o)?(Q=0,Qu=null,Xd(t)):(Q=0,Qu=null,Zd(e,t,o,7));break;case 5:var s=null;switch(X.tag){case 26:s=X.memoizedState;case 5:case 27:var c=X;if(s?Ym(s):c.stateNode.complete){Q=0,Qu=null;var l=c.sibling;if(l!==null)X=l;else{var u=c.return;u===null?X=null:(X=u,Qd(u))}break b}}Q=0,Qu=null,Zd(e,t,o,5);break;case 6:Q=0,Qu=null,Zd(e,t,o,6);break;case 8:Rd(),rd=6;break a;default:throw Error(i(462))}}Jd();break}catch(t){Bd(e,t)}while(1);return _a=B=null,N.H=r,N.A=a,Y=n,X===null?(Zu=null,Z=0,Ti(),rd):0}function Jd(){for(;X!==null&&!Be();)Yd(X)}function Yd(e){var t=ul(e.alternate,e,nd);e.memoizedProps=e.pendingProps,t===null?Qd(e):X=t}function Xd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wc(n,t,t.pendingProps,t.type,void 0,Z);break;case 11:t=Wc(n,t,t.pendingProps,t.type.render,t.ref,Z);break;case 5:rs(t);var r=t;r===ia&&(z?(da(r),r.tag===5&&r.stateNode!=null&&(aa=r.stateNode)):(da(r),z=!0));default:vl(n,t),t=X=Ii(t,nd),t=ul(n,t,nd)}e.memoizedProps=e.pendingProps,t===null?Qd(e):X=t}function Zd(e,t,n,r){_a=B=null,rs(t),io=null,H=0;var i=t.return;try{if(kc(e,i,t,n,Z)){rd=1,wc(e,Ui(n,e.current)),X=null;return}}catch(t){if(i!==null)throw X=i,t;rd=1,wc(e,Ui(n,e.current)),X=null;return}t.flags&32768?(z||r===1?e=!0:ed||Z&536870912?e=!1:($u=e=!0,(r===2||r===9||r===3||r===6)&&(r=ko.current,r!==null&&r.tag===13&&(r.flags|=16384))),$d(t,e)):Qd(t)}function Qd(e){var t=e;do{if(t.flags&32768){$d(t,$u);return}e=t.return;var n=gl(t.alternate,t,nd);if(n!==null){X=n;return}if(t=t.sibling,t!==null){X=t;return}X=t=e}while(t!==null);rd===0&&(rd=5)}function $d(e,t){do{var n=_l(e.alternate,e);if(n!==null){n.flags&=32767,X=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){X=e;return}X=e=n}while(e!==null);rd=6,X=null}function ef(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do lf();while(_d!==0);if(Y&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Zu&&(X=Zu=null,Z=0),yd=t,vd=e,bd=n,Sd=a,Cd=r,tf(e,t,n,s,c,l,f)}}function tf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(xd=s,s|=wi,mt(e,n,s,r,i,a),Td=null,(n&335544064)===n?(Ed=Fa(e),r=10262):(Ed=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,vf(Ke,function(){return uf(),null})):(e.callbackNode=null,e.callbackPriority=0),Il=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=N.T,N.T=null,i=P.p,P.p=2,a=Y,Y|=4;try{uu(e,t,n)}finally{Y=a,P.p=i,N.T=r}}_d=1,Il?wd=Mp(o,e.containerInfo,Ed,af,of,rf,sf,uf,nf,null,null):(af(),of(),sf())}function nf(e){if(_d!==0){var t=vd.onRecoverableError;t(e,{componentStack:null})}}function rf(){_d===3&&(_d=0,ju(yd,vd),_d=4)}function af(){if(_d===1){_d=0;var e=vd,t=yd,n=bd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=N.T,N.T=null;var i=P.p;P.p=2;var a=Y;Y|=4;try{su=cu=!1,Du(t,e,n),n=cp;var o=Jr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&qr(s.ownerDocument.documentElement,s)){if(c!==null&&Yr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Kr(s,h),v=Kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!sp,cp=sp=null}finally{Y=a,P.p=i,N.T=r}}e.current=t,_d=2}}function of(){if(_d===2){_d=0;var e=vd,t=yd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Y;Y|=4;try{fu(e,t.alternate,t)}finally{Y=i,P.p=r,N.T=n}}_d=3}}function sf(){if(_d===4||_d===3){_d=0;var e=wd;wd=null,Ve();var t=vd,n=yd,r=bd,i=Cd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?_d=5:(_d=0,yd=vd=null,cf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(gd=null),yt(r),n=n.stateNode,Qe&&typeof Qe.onCommitFiberRoot==`function`)try{Qe.onCommitFiberRoot(Ze,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=N.T,a=P.p,P.p=2,N.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{N.T=n,P.p=a}}if(i=Td,o=Ed,Ed=null,i!==null&&(Td=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);bd&3&&lf(),Tf(t),a=t.pendingLanes,r&261930&&a&42?t===Od?Dd++:(Dd=0,Od=t):(Dd=0,Od=null),Ef(0,!1)}}function cf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ma(t)))}function lf(){return wd!==null&&(wd.skipTransition(),wd=null),af(),of(),sf(),uf()}function uf(){if(_d!==5)return!1;var e=vd,t=xd;xd=0;var n=yt(bd),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=Sd,Sd=null;var o=vd,s=bd;if(_d=0,yd=vd=null,bd=0,Y&6)throw Error(i(331));var c=Y;if(Y|=4,Ku(o.current),Ru(o,o.current,s,n),Y=c,Ef(0,!1),Qe&&typeof Qe.onPostCommitFiberRoot==`function`)try{Qe.onPostCommitFiberRoot(Ze,o)}catch{}return!0}finally{P.p=a,N.T=r,cf(e,t)}}function df(e,t,n){t=Ui(n,t),t=Ec(e.stateNode,t,2),e=go(e,t,2),e!==null&&(pt(e,2),Tf(e))}function ff(e,t,n){if(e.tag===3)df(e,e,n);else for(;t!==null;){if(t.tag===3){df(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gd===null||!gd.has(r))){e=Ui(n,e),n=Dc(2),r=go(t,n,2),r!==null&&(Oc(n,r,t,e),pt(r,2),Tf(r));break}}t=t.return}}function pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Xu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(td=!0,i.add(n),e=mf.bind(null,e,t,n),t.then(e,e))}function mf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Zu===e&&(Z&n)===n&&(rd===4||rd===3&&(Z&62914560)===Z&&300>He()-fd?Y&2?od|=n:zd(e,0):od|=n,cd===Z&&(cd=0)),Tf(e)}function hf(e,t){t===0&&(t=dt()),e=Oi(e,t),e!==null&&(pt(e,t),Tf(e))}function gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hf(e,n)}function _f(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),hf(e,n)}function vf(e,t){return Re(e,t)}var yf=null,bf=null,xf=!1,Sf=!1,Cf=!1,wf=0;function Tf(e){e!==bf&&e.next===null&&(bf===null?yf=bf=e:bf=bf.next=e),Sf=!0,xf||(xf=!0,Mf())}function Ef(e,t){if(!Cf&&Sf){Cf=!0;do for(var n=!1,r=yf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-et(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,jf(r,a))}else a=Z,a=st(r,r===Zu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ct(r,a)||(n=!0,jf(r,a))}r=r.next}while(n);Cf=!1}}function Df(){Of()}function Of(){Sf=xf=!1;var e=0;wf!==0&&hp()&&(e=wf);for(var t=He(),n=null,r=yf;r!==null;){var i=r.next,a=kf(r,t);a===0?(r.next=null,n===null?yf=i:n.next=i,i===null&&(bf=n)):(n=r,(e!==0||a&3)&&(Sf=!0)),r=i}_d!==0&&_d!==5||Ef(e,!1),wf!==0&&(wf=0)}function kf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-et(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ut(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Zu,n=Z,n=st(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Q===2||Q===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ze(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ct(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ze(r),yt(n)){case 2:case 8:n=Ge;break;case 32:n=Ke;break;case 268435456:n=Je;break;default:n=Ke}return r=Af.bind(null,e),n=Re(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ze(r),e.callbackPriority=2,e.callbackNode=null,2}function Af(e,t){if(_d!==0&&_d!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(lf()&&e.callbackNode!==n)return null;var r=Z;return r=st(e,e===Zu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Nd(e,r,t),kf(e,He()),e.callbackNode!=null&&e.callbackNode===n?Af.bind(null,e):null)}function jf(e,t){if(lf())return null;Nd(e,t,!0)}function Mf(){bp(function(){Y&6?Re(We,Df):Of()})}function Nf(){if(wf===0){var e=Ra;e===0&&(e=rt,rt<<=1,!(rt&261888)&&(rt=256)),wf=e}return wf}function Pf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:vn(e)}function Ff(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Pf((i[wt]||null).action),o=r.submitter;o&&(t=(t=o[wt]||null)?Pf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Bn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(wf!==0){var e=new FormData(i,o);Qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var If=0;If<hi.length;If++){var Lf=hi[If];gi(Lf.toLowerCase(),`on`+(Lf[0].toUpperCase()+Lf.slice(1)))}gi(si,`onAnimationEnd`),gi(ci,`onAnimationIteration`),gi(li,`onAnimationStart`),gi(`dblclick`,`onDoubleClick`),gi(`focusin`,`onFocus`),gi(`focusout`,`onBlur`),gi(ui,`onTransitionRun`),gi(di,`onTransitionStart`),gi(fi,`onTransitionCancel`),gi(pi,`onTransitionEnd`),Ht(`onMouseEnter`,[`mouseout`,`mouseover`]),Ht(`onMouseLeave`,[`mouseout`,`mouseover`]),Ht(`onPointerEnter`,[`pointerout`,`pointerover`]),Ht(`onPointerLeave`,[`pointerout`,`pointerover`]),Vt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Vt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Vt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Vt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Vt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Vt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Rf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),zf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Rf));function Bf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[Et];n===void 0&&(n=t[Et]=new Set);var r=e+`__bubble`;n.has(r)||(Wf(t,e,2,!1),n.add(r))}function Vf(e,t,n){var r=0;t&&(r|=4),Wf(n,e,r,t)}var Hf=`_reactListening`+Math.random().toString(36).slice(2);function Uf(e){if(!e[Hf]){e[Hf]=!0,zt.forEach(function(t){t!==`selectionchange`&&(zf.has(t)||Vf(t,!1,e),Vf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hf]||(t[Hf]=!0,Vf(`selectionchange`,!1,t))}}function Wf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!kn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Gf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Nt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}En(function(){var r=a,i=xn(n),s=[];a:{var c=mi.get(e);if(c!==void 0){var l=Bn,u=e;switch(e){case`keypress`:if(Fn(n)===0)break a;case`keydown`:case`keyup`:l=ir;break;case`focusin`:u=`focus`,l=Yn;break;case`focusout`:u=`blur`,l=Yn;break;case`beforeblur`:case`afterblur`:l=Yn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=qn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=sr;break;case si:case ci:case li:l=Xn;break;case pi:l=cr;break;case`scroll`:case`scrollend`:l=Hn;break;case`wheel`:l=lr;break;case`copy`:case`cut`:case`paste`:l=Zn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=ar;break;case`submit`:l=or;break;case`toggle`:case`beforetoggle`:l=ur}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Dn(m,p),g!=null&&d.push(Kf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==bn&&(u=n.relatedTarget||n.fromElement)&&(Nt(u)||u[Tt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Nt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=qn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=ar,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Ft(c),h=l==null?u:Ft(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Nt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Jf):null,c!==null&&Yf(s,u,c,d,!1),l!==null&&f!==null&&Yf(s,f,l,d,!0)))}a:{if(c=r?Ft(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Ar;else if(wr(c)){if(jr)_=Br;else{_=Rr;var v=Lr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&hn(r.elementType)&&(_=Ar):_=zr;if(_&&=_(e,r)){Tr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ft(r):window,e){case`focusin`:(wr(v)||v.contentEditable===`true`)&&(Zr=v,Qr=r,$r=null);break;case`focusout`:$r=Qr=Zr=null;break;case`mousedown`:ei=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ei=!1,ti(s,n,i);break;case`selectionchange`:if(Xr)break;case`keydown`:case`keyup`:ti(s,n,i)}var y;if(fr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else br?vr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(hr&&n.locale!==`ko`&&(br||b!==`onCompositionStart`?b===`onCompositionEnd`&&br&&(y=Pn()):(jn=i,Mn=`value`in jn?jn.value:jn.textContent,br=!0)),v=qf(r,b),0<v.length&&(b=new Qn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=yr(n),y!==null&&(b.data=y)))),(y=mr?xr(e,n):Sr(e,n))&&(b=qf(r,`onBeforeInput`),0<b.length&&(v=new Qn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Ff(s,e,r,n,i)}Bf(s,t)})}function Kf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Dn(e,n),i!=null&&r.unshift(Kf(e,i,a)),i=Dn(e,t),i!=null&&r.push(Kf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Jf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Dn(n,a),l!=null&&o.unshift(Kf(n,l,c))):i||(l=Dn(n,a),l!=null&&o.push(Kf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Xf=/\r\n?/g,Zf=/\u0000|\uFFFD/g;function Qf(e){return(typeof e==`string`?e:``+e).replace(Xf,`
9
- `).replace(Zf,``)}function $f(e,t){return t=Qf(t),Qf(e)===t}function ep(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||dn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&dn(e,``+r);else return;break;case`className`:Yt(e,`class`,r);break;case`tabIndex`:Yt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Yt(e,n,r);break;case`style`:mn(e,r,o);return;case`data`:if(t!==`object`){Yt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=vn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ep(e,t,`name`,a.name,a,null),ep(e,t,`formEncType`,a.formEncType,a,null),ep(e,t,`formMethod`,a.formMethod,a,null),ep(e,t,`formTarget`,a.formTarget,a,null)):(ep(e,t,`encType`,a.encType,a,null),ep(e,t,`method`,a.method,a,null),ep(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=vn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=yn);return;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=vn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Jt(e,`popover`,r);break;case`xlinkActuate`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Jt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=gn.get(n)||n,Jt(e,n,r);else return}R=!0}function tp(e,t,n,r,a,o){switch(n){case`style`:mn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)dn(e,r);else if(typeof r==`number`||typeof r==`bigint`)dn(e,``+r);else return;break;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=yn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Bt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[wt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}R=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Jt(e,n,r)}return}R=!0}function np(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ep(e,t,o,s,n,null)}}a&&ep(e,t,`srcSet`,n.srcSet,n,null),r&&ep(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:ep(e,t,r,d,n,null)}}on(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ep(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&cn(e,!!r,n,!0):cn(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:ep(e,t,s,c,n,null)}un(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ep(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<Rf.length;r++)$(Rf[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ep(e,t,u,r,n,null)}return;default:if(hn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&tp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ep(e,t,c,r,n,null))}var rp={};function ip(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ep(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(R=!0),o=m;break;case`name`:m!==f&&(R=!0),a=m;break;case`checked`:m!==f&&(R=!0),u=m;break;case`defaultChecked`:m!==f&&(R=!0),d=m;break;case`value`:m!==f&&(R=!0),s=m;break;case`defaultValue`:m!==f&&(R=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ep(e,t,p,m,r,f)}}an(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ep(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(R=!0),p=o;break;case`defaultValue`:o!==l&&(R=!0),c=o;break;case`multiple`:o!==l&&(R=!0),s=o;default:o!==l&&ep(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?cn(e,!!n,n?[]:``,!1):cn(e,!!n,t,!0)):cn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ep(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(R=!0),p=a;break;case`defaultValue`:a!==o&&(R=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ep(e,t,s,a,r,o)}ln(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ep(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(R=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ep(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ep(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ep(e,t,u,p,r,m)}return;default:if(hn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ep(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ep(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&ap(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function dp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function fp(e,t,n,r){return n=lp(n).createElement(e),n[Ct]=r,n[wt]=t,np(n,e,t),Lt(n),n}function pp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[At]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Dp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ap(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Bp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),h(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),h(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){h(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=b(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];h(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=lp(e).activeElement,e!==null&&h(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),h(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=Nt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(h(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(h(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];h(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Zp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),Zp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=b(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nm(n),Mt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[At])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ep(e,t,r,null,rp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===yn&&(e.onclick=null),Mt(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Mt(e)}var vm=new Map,ym=new Set;function bm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var xm=P.d;P.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=Ld();return e||t}function Cm(e){var t=Pt(e);t!==null&&t.tag===5&&t.type===`form`?ec(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=rn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Lt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+rn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+rn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+rn(n.imageSizes)+`"]`)):i+=`[href="`+rn(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[jt]=!0,o.onload=o.onerror=function(){Rt(o)}),Lt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+rn(r)+`"][href="`+rn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Lt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=It(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Lt(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=It(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Lt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=It(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Lt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=we.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=It(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=It(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=It(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+rn(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[jt]){r.loading=1;return}}else t=e.createElement(`link`),t[jt]=!0,t.onload=t.onerror=Rt.bind(null,t),np(t,`link`,n),Lt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+rn(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+rn(n.href)+`"]`);if(r)return t.instance=r,Lt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Lt(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Lt(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Lt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Lt(a),a):(r=n,(a=vm.get(o))&&(r=D({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Lt(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[At]||a[Ct]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Lt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Lt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=nh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sh={$$typeof:ie,Provider:null,Consumer:null,_currentValue:ve,_currentValue2:ve,_threadCount:0};function ch(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ft(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.hiddenUpdates=ft(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ni(3,null,null,t),e.current=a,a.stateNode=e,t=ja(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},po(a),e}function uh(e){return e?(e=ji,e):ji}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=ho(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=go(e,r,t),n!==null&&(Md(n,e,t),_o(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Oi(e,67108864);t!==null&&Md(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=kd();t=vt(t);var n=Oi(e,t);n!==null&&Md(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,yh(e,t,n,r)}finally{P.p=a,N.T=i}}function vh(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,yh(e,t,n,r)}finally{P.p=a,N.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Gf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Pt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ot(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-et(o);s.entanglements[1]|=c,o&=~c}Tf(a),!(Y&6)&&(md=He()+500,Ef(0,!1))}}break;case 31:case 13:s=Oi(a,2),s!==null&&Md(s,a,2),Ld(),ph(a,2)}if(a=bh(r),a===null&&Gf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Gf(e,t,r,null,n)}}function bh(e){return e=xn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Nt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ue()){case We:return 2;case Ge:return 8;case Ke:case qe:return 32;case Je:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Pt(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Nt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,xt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,xt(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bn=r,n.target.dispatchEvent(r),bn=null}else return t=Pt(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=Pt(n);a!==null&&(e.splice(t,3),t-=3,Qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[wt]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[wt]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,kd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Ld(),t[Tt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=bt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.0`)throw Error(i(527,Kh,`19.3.0`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Ze=Jh.inject(qh),Qe=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=xc,s=Sc,c=Cc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[Tt]=t.current,Uf(e),new Wh(t)}})),g=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(u()),v=g(),y=e=>typeof e==`string`,b=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},x=e=>e==null?``:String(e),S=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},C=/###/g,w=e=>e&&e.includes(`###`)?e.replace(C,`.`):e,T=e=>!e||y(e),E=(e,t,n)=>{let r=y(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(T(e))return{};let t=w(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return T(e)?{}:{obj:e,k:w(r[i])}},D=(e,t,n)=>{let{obj:r,k:i}=E(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=E(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=E(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},ee=(e,t,n,r)=>{let{obj:i,k:a}=E(e,t,Object);i[a]=i[a]||[],i[a].push(n)},O=(e,t)=>{let{obj:n,k:r}=E(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},te=(e,t,n)=>{let r=O(e,n);return r===void 0?O(t,n):r},k=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?y(e[r])||e[r]instanceof String||y(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):k(e[r],t[r],n):e[r]=t[r]);return e},ne=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),A={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},re=e=>y(e)?e.replace(/[&<>"'\/]/g,e=>A[e]):e,ie=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},ae=[` `,`,`,`?`,`!`,`;`],oe=new ie(20),se=(e,t,n)=>{t||=``,n||=``;let r=ae.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=oe.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},ce=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},j=e=>e?.replace(/_/g,`-`),le={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},M=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||le,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,n,r){return r&&!this.debug?null:(e=e.map(e=>y(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),y(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},ue=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},de=class extends ue{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):y(n)&&i?o.push(...n.split(i)):o.push(n)));let s=O(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!y(n)?s:ce(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),D(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(y(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=O(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?k(s,n,i):s={...s,...n},D(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},fe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},pe=Symbol(`i18next/PATH_KEY`);function me(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===pe?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function he(e,t){let{[pe]:n}=e(me()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var ge=e=>!y(e)&&typeof e!=`boolean`&&typeof e!=`number`,_e=class e extends ue{constructor(e,t={}){super(),S([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=M.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=ge(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!se(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:y(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:y(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=he(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?he(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,x=i.count!==void 0&&!y(i.count),S=e.hasDefaultValue(i),C=x?this.pluralResolver.getSuffix(d,i.count,i):``,w=i.ordinal&&x?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,T=x&&!i.ordinal&&i.count===0,E=T&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${C}`]||i[`defaultValue${w}`]||i.defaultValue,D=m;b&&!m&&S&&(D=E);let ee=ge(D),O=Object.prototype.toString.apply(D);if(b&&D&&ee&&!_.includes(O)&&!(y(v)&&Array.isArray(D))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,D,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(D),t=e?[]:{},n=e?g:h;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let r=`${n}${o}${e}`;t[e]=S&&!m?this.translate(r,{...i,defaultValue:ge(E)?E[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=D[e])}m=t}}else if(b&&y(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&S&&(e=!0,m=E),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=S&&E!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,x&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?E:m),o){let e=this.resolve(s,{...i,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=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=S&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);T&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||E)})}):n(e,s,E))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=y(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!y(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=y(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=fe.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return y(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?he(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!y(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(y(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.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!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!y(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},N=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=M.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=j(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=j(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(y(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}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(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),y(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||y(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=y(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),l=[],u=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return y(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&u(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&u(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&u(this.getLanguagePartFromCode(e))):y(e)&&u(this.formatLanguageCode(e)),c.forEach(e=>{l.includes(e)||u(this.formatLanguageCode(e))}),s===null?l:(this.resolveHierarchyCache[s]=l,l.slice())}},P={zero:0,one:1,two:2,few:3,many:4,other:5},ve={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},F=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=M.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=j(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),ve;if(!e.match(/-|_/))return ve;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>P[e]-P[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},ye=(e,t,n,r=`.`,i=!0)=>{let a=te(e,t,n);return!a&&i&&y(n)&&(a=ce(e,n,r),a===void 0&&(a=ce(t,n,r))),a},be=e=>e.replace(/\$/g,`$$$$`),xe=class{constructor(e={}){this.logger=M.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?re:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?ne(i):a||`{{`,this.suffix=o?ne(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?ne(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?ne(l):``,this.nestingPrefix=d?ne(d):f||ne(`$t(`),this.nestingSuffix=p?ne(p):m||ne(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>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,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=ye(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(ye(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0){if(typeof l==`function`){let t=l(e,i,r);a=y(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``}else!y(a)&&!this.useRawValueToEscape&&(a=x(a));let s=t.safeValue(a);if(e=e.replace(i[0],be(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${ne(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!y(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!y(i))return i;y(i)||(i=x(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],be(x(i))),this.regexp.lastIndex=0}return e}},I=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Se=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(j(r),i),t[o]=s),s(n)}},Ce=e=>(t,n,r)=>e(j(n),r)(t),we=class{constructor(e={}){this.logger=M.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Se:Ce;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Se(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=I(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},Te=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Ee=class extends ue{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=M.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{ee(n.loaded,[i],a),Te(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();y(e)&&(e=this.languageUtils.toResolveHierarchy(e)),y(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" 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!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}},De=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,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(typeof e[1]==`object`&&(t=e[1]),y(e[1])&&(t.defaultValue=e[1]),y(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Oe=e=>(y(e.ns)&&(e.ns=[e.ns]),y(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),y(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),ke=()=>{},Ae=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},je=class e extends ue{constructor(e={},t){if(super(),this.options=Oe(e),this.services={},this.logger=M,this.modules={external:[]},Ae(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,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(y(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=De();this.options={...n,...this.options,...Oe(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?M.init(r(this.modules.logger),this.options):M.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:we;let t=new N(this.options);this.store=new de(this.options.resources,this.options);let n=this.services;n.logger=M,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new F(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new xe(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Ee(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new _e(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||=ke,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(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)});let i=b(),a=()=>{let e=(e,n)=>{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),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=ke){let n=t,r=y(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=b();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=ke,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&fe.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=b();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=y(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(y(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=he(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=he(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=he(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return y(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.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;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=b();return this.options.ns?(y(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=b();y(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`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`.split(`.`),n=this.services?.languageUtils||new N(De());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=ke){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new de(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...De().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new xe(n)}return a.translator=new _e(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();je.createInstance,je.dir,je.init,je.loadResources,je.reloadResources,je.use,je.changeLanguage,je.getFixedT,je.t,je.exists,je.setDefaultNamespace,je.hasLoadedNamespace,je.loadNamespaces,je.loadLanguages;var Me=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);ze(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Ne={},Pe=(e,t,n,r)=>{ze(n)&&Ne[n]||(ze(n)&&(Ne[n]=new Date),Me(e,t,n,r))},Fe=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},Ie=(e,t,n)=>{e.loadNamespaces(t,Fe(e,n))},Le=(e,t,n,r)=>{if(ze(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Ie(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,Fe(e,r))},Re=(e,t,n={})=>!t.languages||!t.languages.length?(Pe(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),ze=e=>typeof e==`string`,Be=e=>typeof e==`object`&&!!e,Ve=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,He={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},Ue=e=>He[e],We={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(Ve,Ue),transDefaultProps:void 0},Ge=(e={})=>{We={...We,...e}},Ke=()=>We,qe,Je=e=>{qe=e},Ye=()=>qe,Xe={type:`3rdParty`,init(e){Ge(e.options.react),Je(e)}},Ze=(0,_.createContext)(),Qe=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},$e=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),et=o(((e,t)=>{t.exports=$e()}))(),tt={t:(e,t)=>{if(ze(t))return t;if(Be(t)&&ze(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},nt=()=>()=>{},L=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,_.useContext)(Ze)||{},a=n||r||Ye();a&&!a.reportNamespaces&&(a.reportNamespaces=new Qe),a||Pe(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let o=(0,_.useMemo)(()=>({...Ke(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=ze(l)?[l]:l||[`translation`],d=(0,_.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,_.useRef)(0),p=(0,_.useCallback)(e=>{if(!a)return nt;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,_.useRef)(),h=(0,_.useCallback)(()=>{if(!a)return tt;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>Re(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,v]=(0,_.useState)(0),{t:y,ready:b}=(0,et.useSyncExternalStore)(p,h,h);(0,_.useEffect)(()=>{if(a&&!b&&!s){let e=()=>v(e=>e+1);t.lng?Le(a,t.lng,d,e):Ie(a,d,e)}},[a,t.lng,d,b,s,g]);let x=a||{},S=(0,_.useRef)(null),C=(0,_.useRef)(),w=e=>`${e.language}|${e.resolvedLanguage}|${e.languages?.join(`,`)}`,T=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},E=(0,_.useMemo)(()=>{let e=x,t=e&&w(e),n=e;e&&(S.current&&S.current.__original===e&&C.current===t?n=S.current:(n=T(e),S.current=n,C.current=t));let r=!b&&!s?(...e)=>(Pe(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),y(...e)):y,i=[r,n,b];return i.t=r,i.i18n=n,i.ready=b,i},[y,x,b,x.resolvedLanguage,x.language,x.languages]);if(a&&s&&!b){let e=!1;try{e=!1}catch{}throw e&&Pe(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?Le(a,t.lng,d,n):Ie(a,d,n)})}return E},{slice:rt,forEach:it}=[];function at(e){return it.call(rt.call(arguments,1),t=>{if(t)for(let n in t)e[n]===void 0&&(e[n]=t[n])}),e}function ot(e){return typeof e==`string`&&[/<\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))}var st=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ct=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:`/`},r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){let e=n.maxAge-0;if(Number.isNaN(e))throw Error(`maxAge should be a Number`);r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!st.test(n.domain))throw TypeError(`option domain is invalid`);r+=`; Domain=${n.domain}`}if(n.path){if(!st.test(n.path))throw TypeError(`option path is invalid`);r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!=`function`)throw TypeError(`option expires is invalid`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite)switch(typeof n.sameSite==`string`?n.sameSite.toLowerCase():n.sameSite){case!0:r+=`; SameSite=Strict`;break;case`lax`:r+=`; SameSite=Lax`;break;case`strict`:r+=`; SameSite=Strict`;break;case`none`:r+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid`)}return n.partitioned&&(r+=`; Partitioned`),r},lt={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:`/`,sameSite:`strict`};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=ct(e,t,i)},read(e){let t=`${e}=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,``,-1,t)}},ut={name:`cookie`,lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<`u`)return lt.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=t;n&&typeof document<`u`&&lt.create(n,e,r,i,a)}},dt={name:`querystring`,lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<`u`){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf(`?`)>-1&&(e=window.location.hash.substring(window.location.hash.indexOf(`?`)));let r=e.substring(1).split(`&`);for(let e=0;e<r.length;e++){let i=r[e].indexOf(`=`);i>0&&r[e].substring(0,i)===t&&(n=r[e].substring(i+1))}}return n}},ft={name:`hash`,lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<`u`){let{hash:e}=window.location;if(e&&e.length>2){let i=e.substring(1);if(t){let e=i.split(`&`);for(let n=0;n<e.length;n++){let i=e[n].indexOf(`=`);i>0&&e[n].substring(0,i)===t&&(r=e[n].substring(i+1))}}if(r)return r;if(!r&&n>-1){let t=e.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof n==`number`?n:0]?.replace(`/`,``):void 0}}}return r}},pt=null,mt=()=>{if(pt!==null)return pt;try{if(pt=typeof window<`u`&&window.localStorage!==null,!pt)return!1;let e=`i18next.translate.boo`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{pt=!1}return pt},ht={name:`localStorage`,lookup(e){let{lookupLocalStorage:t}=e;if(t&&mt())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&mt()&&window.localStorage.setItem(n,e)}},gt=null,_t=()=>{if(gt!==null)return gt;try{if(gt=typeof window<`u`&&window.sessionStorage!==null,!gt)return!1;let e=`i18next.translate.boo`;window.sessionStorage.setItem(e,`foo`),window.sessionStorage.removeItem(e)}catch{gt=!1}return gt},vt={name:`sessionStorage`,lookup(e){let{lookupSessionStorage:t}=e;if(t&&_t())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&_t()&&window.sessionStorage.setItem(n,e)}},yt={name:`navigator`,lookup(e){let t=[];if(typeof navigator<`u`){let{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},bt={name:`htmlTag`,lookup(e){let{htmlTag:t}=e,n,r=t||(typeof document<`u`?document.documentElement:null);return r&&typeof r.getAttribute==`function`&&(n=r.getAttribute(`lang`)),n}},xt={name:`path`,lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>`u`)return;let n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return n[typeof t==`number`?t:0]?.replace(`/`,``)}},St={name:`subdomain`,lookup(e){let{lookupFromSubdomainIndex:t}=e,n=typeof t==`number`?t+1:1,r=typeof window<`u`&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},Ct=!1;try{document.cookie,Ct=!0}catch{}var wt=[`querystring`,`cookie`,`localStorage`,`sessionStorage`,`navigator`,`htmlTag`];Ct||wt.splice(1,1);var Tt=()=>({order:wt,lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`],convertDetectedLanguage:e=>e}),Et=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type=`languageDetector`,this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=at(t,this.options||{},Tt()),typeof this.options.convertDetectedLanguage==`string`&&this.options.convertDetectedLanguage.indexOf(`15897`)>-1&&(this.options.convertDetectedLanguage=e=>e.replace(`-`,`_`)),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(ut),this.addDetector(dt),this.addDetector(ht),this.addDetector(vt),this.addDetector(yt),this.addDetector(bt),this.addDetector(xt),this.addDetector(St),this.addDetector(ft)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&typeof n==`string`&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>e!=null&&!ot(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&&arguments[1]!==void 0?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)}))}};Et.type=`languageDetector`;var Dt={common:{appName:`FeedKeeper`,loading:`Loading…`,save:`Save`,cancel:`Cancel`,delete:`Delete`,close:`Close`,error:`Something went wrong`,retry:`Retry`,loadMore:`Load more`,noOptions:`No options`,metaTitle:`FeedKeeper – RSS Reader & MCP Server`,metaDescription:`Self-hosted RSS/Atom feed manager and remote MCP server for AI assistants.`,offlineBanner:`You are offline. You can keep reading and make changes; they are sent once you are back online.`,offlineTitle:`No connection`,offlineText:`FeedKeeper cannot reach the server right now. Check your connection and try again.`,offlineAction:`You are offline. This needs a connection.`,offlinePending:`Waiting to be sent: {{count}}.`},nav:{items:`Articles`,feeds:`Feeds`,settings:`Settings`,logout:`Log out`,menu:`Menu`,account:`Account`,footerLinks:`Further links`},onboarding:{subtitle:`Create the first admin account to finish setting up this instance.`,emailLabel:`Email`,displayNameLabel:`Display name`,passwordLabel:`Password`,passwordHint:`At least 10 characters.`,submit:`Create admin account`,orUseCli:`Prefer the terminal?`,cliHint:`Run "npm run setup" on the server instead — either way creates the same first admin account.`},login:{subtitle:`RSS Reader & MCP Server`,emailLabel:`Email`,passwordLabel:`Password`,submit:`Log in`,error:`Invalid email or password.`,viewOnGithub:`FeedKeeper on GitHub`},feeds:{title:`Feeds`,urlPlaceholder:`example.com or feed URL`,labelPlaceholder:`Label (optional)`,subscribe:`Subscribe`,subscribed:`Already subscribed`,subscribing:`Subscribing…`,multipleFeedsFound:`Multiple feeds found on this page. Please select one:`,unsubscribe:`Unsubscribe`,unsubscribeConfirm:`Unsubscribe from "{{title}}"?`,unread:`{{count}} unread`,alreadySubscribed:`You are already subscribed to this feed.`,noFeedsFoundOnPage:`No RSS or Atom feeds found on this webpage.`,interval:`Checks every`,minutesShort:`{{count}} min`,hoursShort:`{{count}} h`,edit:`Edit`,markAllRead:`Mark all read`,importOpml:`Import OPML`,exportOpml:`Export OPML`,importing:`Importing feeds…`,importSuccess:`Import complete: {{imported}} added, {{skipped}} already subscribed.`,importPartial:`Import finished: {{imported}} added, {{skipped}} skipped, {{failed}} failed.`,importFailed:`Failed to parse or import OPML file.`,refreshFeed:`Check now`,refreshAll:`Check all feeds`,refreshing:`Checking…`,statusFailing:`Failing ({{count}} consecutive errors)`,statusPending:`Waiting for first check`,manageFolders:`Manage folders`,noFolder:`No folder`,folder:`Folder`,newFolderPlaceholder:`New folder (e.g. Tech)`,addFolder:`Create folder`,deleteFolderConfirm:`Delete folder "{{name}}"? Your feeds will be kept.`,folderGroup:`Folders`,feedGroup:`Individual feeds`,dragHandle:`Drag to reorder`,fullText:`Load full text from the website`,fullTextHint:`The reader fetches the complete article when the feed only contains a teaser.`,fullTextBlocked:`This site recently asked for cookie consent or a subscription. FeedKeeper will try again in a few days.`,addFeed:`Add feed`,addFeedShort:`Add`,searchPlaceholder:`Search feeds…`,failingCount:`{{count}} with errors`,filterAll:`All`,filterFailing:`Errors`,uncategorized:`Uncategorized`,moreActions:`More actions`,checkedAgo:`checked {{time}}`,everyInterval:`every {{interval}}`,noMatches:`No matching feeds.`,feedCount_one:`{{count}} feed`,feedCount_other:`{{count}} feeds`,renameFolderHint:`Click a name to rename it.`,emptyTitle:`No feeds yet`,emptyHint:`Subscribe to news sites, blogs or podcasts – just enter the website address and FeedKeeper finds the feed.`,subscribedToast:`Subscribed to "{{title}}".`,subscribeFailed:`The feed could not be subscribed.`,refreshedToast_one:`Checked "{{title}}" – {{count}} new article.`,refreshedToast_other:`Checked "{{title}}" – {{count}} new articles.`,refreshFailedToast:`"{{title}}" could not be fetched: {{error}}`,refreshPendingToast:`The update for "{{title}}" is still pending. FeedKeeper will continue checking automatically.`,refreshAllPendingToast_one:`{{count}} update is still pending. FeedKeeper will continue checking automatically. {{newItems}} new articles so far.`,refreshAllPendingToast_other:`{{count}} updates are still pending. FeedKeeper will continue checking automatically. {{newItems}} new articles so far.`,refreshedAllToast_one:`Checked {{count}} feed – {{newItems}} new articles.`,refreshedAllToast_other:`Checked {{count}} feeds – {{newItems}} new articles.`,unsubscribedToast:`Unsubscribed from "{{title}}".`,markedReadToast:`Marked all articles from "{{title}}" as read.`,changesSaved:`Changes saved.`,folderCreated:`Category "{{name}}" created.`,folderRenamed:`Category renamed to "{{name}}".`,folderDeleted:`Category "{{name}}" deleted.`,notify:`Notify me about new articles`,notifyHint:`Sends a notification to the devices where you turned notifications on.`,notifyActive:`Notifications active for this feed`,badge:`Count on the app icon`,badgeHint:`Unread articles of this feed are added to the number on the app icon. Off by default.`},items:{title:`Items`,viewMode:`Article view`,listView:`List`,newspaperView:`Magazine`,markRead:`Mark read`,markUnread:`Mark unread`,searchPlaceholder:`Search items…`,unreadOnly:`Unread only`,all:`Show all`,bookmarkedOnly:`Saved articles only`,bookmark:`Save for later`,unbookmark:`Remove from saved`,allFeeds:`All feeds`,noItems:`No items to show.`,refresh:`Refresh articles`,refreshing:`Refreshing feeds…`,refreshFailed:`Refresh failed. Please try again.`,noSaved:`Nothing saved yet. Tap the star to keep an article, including its full text and images, for good.`,unreadIgnoredInSaved:`Saved articles are shown whether read or not.`,loadFailed:`The articles could not be loaded.`,allReadTitle:`All caught up`,allReadHint:`You have read everything. New articles show up here as soon as they arrive.`,noResults:`Nothing found.`},reader:{close:`Close (Esc)`,previous:`Previous article (K or ←)`,next:`Next article (J or →)`,openOriginal:`Open original`,copyLink:`Copy link`,linkCopied:`Link copied!`,readingTime:`{{count}} min read`,toggleFullText:`Extract full text from web (R)`,togglePreview:`Back to preview (R)`,extractionFailed:`Could not extract full article from website.`,bookmark:`Save for later (S)`,unbookmark:`Remove from saved (S)`,markRead:`Mark as read (M)`,markUnread:`Mark as unread (M)`,consentWall:`This site asks for cookie consent or a subscription. You're seeing the preview from the feed.`,readOriginal:`Read on the website`},settings:{title:`Settings`,tokensTitle:`Personal access tokens`,tokensHint:`Only needed for clients that can't sign in with OAuth, such as scripts or config files. Treat a token like a password.`,createToken:`Create token`,tokenReadOnly:`Read only`,tokenReadWrite:`Read and write`,tokenNamePlaceholder:`Token name (e.g. "Claude Desktop")`,tokenCreated:`Token created`,tokenCreatedHint:`Copy it now — it won't be shown again.`,copyToken:`Copy`,copied:`Copied!`,deleteToken:`Revoke`,usersTitle:`Users`,addUser:`Add user`,roleAdmin:`Admin`,roleUser:`User`,mcpTitle:`Connect an MCP client`,mcpHint:`Connect Claude, ChatGPT or another MCP client to your feeds.`,mutedKeywordsTitle:`Muted Keywords (Filters)`,mutedKeywordsHint:`Articles whose title or snippet contains any of these keywords will be hidden from your feed.`,mutedKeywordPlaceholder:`Keyword to mute (e.g. "Sponsored")`,addMutedKeyword:`Add`,removeMutedKeyword:`Remove`,noMutedKeywords:`No muted keywords configured.`,language:`Language`,languageHint:`Choose your preferred display language.`,autoReaderMode:`Open in Reader View by default`,autoReaderModeHint:`Automatically extract and display full article content when opening an article.`,theme:`Theme`,themeLight:`Light`,themeDark:`Dark`,themeSystem:`System`,changePasswordTitle:`Change password`,currentPasswordLabel:`Current password`,newPasswordLabel:`New password`,confirmPasswordLabel:`Confirm new password`,changePasswordButton:`Change password`,passwordChanged:`Password changed.`,passwordMismatch:`New passwords don't match.`,incorrectPassword:`Current password is incorrect.`,retentionTitle:`Retention`,retentionHint:`Automated cleanup of old and read items to optimize disk usage and query performance.`,statTotalItems:`Total items`,statReadItems:`Read items`,statFeedsCount:`Active feeds`,statDbSize:`Database file size (SQLite + WAL)`,retentionReadDaysLabel:`Keep read items (days)`,retentionReadDaysHint:`0 = purge immediately once read, default: 30 days`,retentionMaxDaysLabel:`Maximum item retention (days)`,retentionMaxDaysHint:`0 = unlimited, default: 90 days`,retentionMaxItemsLabel:`Max items per feed`,retentionMaxItemsHint:`0 = unlimited, default: 1000 items`,autoCleanupLabel:`Enable daily automated housekeeping at 03:00 AM`,saveRetention:`Save settings`,retentionSaved:`Settings saved successfully.`,runCleanupNow:`Run cleanup now (VACUUM)`,cleaning:`Cleaning…`,cleanupSuccess:`Cleanup complete: removed {{total}} items. Size: {{before}} MB -> {{after}} MB.`,installApp:`Install app`,installAppHint:`Add FeedKeeper to your home screen or dock as a standalone app.`,installAppButton:`Install`,installAppIos:`In Safari, tap the Share icon (via the “…” menu if needed) and choose “Add to Home Screen”.`,installAppMacSafari:`In Safari, choose File › “Add to Dock”.`,profileTitle:`Profile`,displayNameLabel:`Display name`,profileSaved:`Profile saved.`,avatarUpload:`Upload photo`,avatarChange:`Change photo`,avatarRemove:`Remove`,avatarHint:`JPG, PNG or WebP – cropped to a square and resized.`,avatarUnreadable:`The image could not be read.`,sectionAccount:`Account`,sectionAccountHint:`Profile, photo and password.`,sectionGeneral:`Reading & appearance`,sectionGeneralHint:`Theme, language and how articles open.`,sectionFilters:`Word filter`,sectionFiltersHint:`Hide articles that mention certain terms.`,sectionMcp:`MCP & API`,sectionMcpHint:`Connect AI assistants like Claude to your feeds.`,sectionUsers:`Users`,sectionUsersHint:`Manage the accounts on this FeedKeeper instance.`,sectionDatabase:`Database`,sectionDatabaseHint:`Storage and automatic cleanup.`,adminGroup:`Administration`,passwordHint:`At least 10 characters.`,appearanceTitle:`Appearance`,readingTitle:`Reading`,themeHint:`Light, dark or matching your system.`,mcpStepToken:`Create a token below and copy it.`,mcpStepUrl:`Add a server with this URL in your MCP client.`,mcpStepHeader:`Send the token as an "Authorization: Bearer <token>" header.`,revokeTokenConfirm:`Revoke token "{{name}}"? Clients using it lose access immediately.`,noTokens:`No tokens yet.`,mcpOauthTitle:`Option 1: Sign in with your account`,mcpOauthBadge:`Recommended`,mcpOauthIntro:`For ChatGPT, Claude and other apps with connector support. You don't have to create or copy a token.`,mcpOauthStep1:`In the app, add a custom connector or remote MCP server with the URL above.`,mcpOauthStep2:`Sign in to FeedKeeper when asked.`,mcpOauthStep3:`Choose whether the app may only read or also change your feeds, then confirm.`,mcpOauthDone:`The assistant then appears under “Connected AI assistants” below, where you can disconnect it at any time.`,mcpTokenTitle:`Option 2: Use a token`,mcpTokenIntro:`For scripts and clients without connector support.`,connectedAppsTitle:`Connected AI assistants`,connectedAppsHint:`AI assistants such as ChatGPT or Claude that signed in to this server through MCP. Disconnect one to end its access.`,noConnectedApps:`No AI assistants connected yet.`,disconnectApp:`Disconnect`,disconnectAppConfirm:`Disconnect "{{name}}"? It loses access immediately.`,tokenCreatedOn:`created {{date}}`,tokenLastUsed:`last used {{time}}`,tokenNeverUsed:`never used`,userCreated:`Account created.`,addUserHint:`Self-registration is off by default – create new accounts here.`,offlineSaved:`Read offline`,offlineSavedHint:`Keeps your saved articles and the newest unread ones, with their images, on this device so you can read without a connection. Changes you make offline are sent later.`,offlineSavedCount:`Articles available offline: {{count}}.`,notifications:`Notifications`,notificationsHint:`Get a notification on this device when feeds you chose have new articles. Turn it on per feed under Feeds → Edit.`,notificationsBlocked:`Notifications are blocked for this app. Allow them in your device or browser settings.`,notificationsIos:`On iPhone and iPad, add FeedKeeper to the home screen first, then open it from there to turn notifications on.`,notificationsUnsupported:`This browser cannot show notifications from FeedKeeper.`,notificationsTest:`Send test`,notificationsTestFailed:`The test notification could not be delivered.`,sectionDevices:`Devices`,sectionDevicesHint:`Connect the FeedKeeper app on your iPhone or iPad.`,devicesTitle:`Paired devices`,devicesHint:`Each device has its own access. Revoking a device signs it out right away.`,deviceAdd:`Add a device`,noDevices:`No devices paired yet.`,deviceQrAlt:`QR code for pairing a device`,devicePairHint:`Open the FeedKeeper app, choose to add a server and scan this code. Or type the code in by hand.`,devicePairExpires:`Valid for {{minutes}}:{{seconds}} more minutes, usable once.`,devicePairExpired:`This code has expired. Add a device again for a new one.`,devicePairDone:`Done`,deviceRevoke:`Revoke`,deviceRevokeConfirm:`Revoke "{{name}}"? The device will be signed out.`,mcpClaudeTitle:`Use with Claude Desktop or Cowork`,mcpClaudeHint:`Add this snippet to your claude_desktop_config.json to connect Claude directly to your feeds.`,mcpCopyConfig:`Copy Claude config`,mcpConfigCopied:`Config copied!`},welcome:{title:`Let's fill your reader`,intro:`Add a website, pick a starter pack or import your subscriptions. Your articles appear here as soon as the first feeds have been fetched.`,addTitle:`Add a website`,packsTitle:`Or start with a pack`,packsHint:`A handful of well-known feeds on one topic. You choose which ones to keep.`,subscribePack_one:`Subscribe to {{count}} feed`,subscribePack_other:`Subscribe to {{count}} feeds`,subscribingProgress:`Subscribing… {{done}} of {{total}}`,packAdded_one:`{{count}} feed added.`,packAdded_other:`{{count}} feeds added.`,packPartial:`{{added}} added, {{failed}} could not be added.`,importTitle:`Already use a feed reader?`,importHint:`Import the subscription file (OPML) that your old reader exported.`,fetchingTitle:`Fetching your first articles …`,fetchingHint:`This usually takes a few seconds. The page updates by itself.`},intro:{title:`A short tour`,subtitle:`Four things that are good to know. This appears only once.`,viewsTitle:`List or newspaper`,viewsText:`Switch between the list and the newspaper view at the top right.`,unreadTitle:`Unread only`,unreadText:`The dot next to the search shows or hides articles you have already read.`,starTitle:`Save for later`,starText:`The star keeps an article for good, with its full text and images. The star next to the search shows everything you saved.`,foldersTitle:`Folders`,foldersText:`Under Feeds you create folders and sort your subscriptions.`,done:`Got it`},plan:{limitedTitle:`Your account is limited right now`,limitedText:`Adding, importing and updating feeds is not included in your plan at the moment. You can still read, export and delete.`,view:`View plans`,unavailable:`Not included in your plan`},security:{title:`Account security`,intro:`Sign in with a passkey or protect your password with an authenticator app.`,confirmIdentity:`Confirm identity for a change`,authenticatorStarted:`Setup has started. Confirm it with an authenticator code.`,updated:`Your security settings have been updated.`,passkeyAdded:`The passkey has been added.`,passkeyRemoved:`The passkey has been removed.`,removeNamed:`Remove passkey “{{name}}”`,refreshFailed:`Your change was saved, but the updated overview could not be loaded. Reload the page before making further changes.`,reauth:`Confirm your identity before changing security settings.`,usePasskey:`Confirm with a passkey`,password:`Current password`,code:`Authenticator or recovery code`,sendEmail:`Confirm by email (accounts without a password)`,emailCode:`Email confirmation code`,passkeys:`Passkeys`,passkeyName:`Passkey name`,addPasskey:`Add passkey`,remove:`Remove`,httpsRequired:`Passkeys require HTTPS.`,twoFactor:`Two-factor authentication`,enabled:`Authenticator codes are enabled for password sign-ins and linked sign-in providers.`,disabled:`Authenticator codes are not enabled.`,enable:`Set up authenticator`,disable:`Disable authenticator`,scan:`Scan this QR code in your authenticator app, or enter the setup key. Then confirm with a six-digit code.`,qrAlt:`Authenticator setup QR code`,confirm:`Confirm setup`,cancel:`Cancel`,newRecovery:`Replace recovery codes`,saveRecovery:`Save these recovery codes somewhere safe. Each works once instead of an authenticator code. They are shown only now; replacing codes invalidates the old ones.`,saved:`I saved the codes`,failed:`Could not confirm this action. Check your entries and try again.`,lastPasskey:`Add another passkey before removing the last one.`,signInPasskey:`Sign in with a passkey`,revocationHint:`Changing two-factor authentication signs out other sessions and revokes device and API tokens. Reconnect your apps afterwards.`,confirmTitle:`Confirm identity`,orPassword:`or with password`,invalidCredentials:`The password or confirmation code is incorrect.`,passkeyCancelled:`Passkey confirmation was cancelled or not recognized.`,confirmAction:`Confirm`}},Ot={common:{appName:`FeedKeeper`,loading:`Lädt…`,save:`Speichern`,cancel:`Abbrechen`,delete:`Löschen`,close:`Schließen`,error:`Etwas ist schiefgelaufen`,retry:`Erneut versuchen`,loadMore:`Weitere laden`,noOptions:`Keine Optionen`,metaTitle:`FeedKeeper – RSS-Reader & MCP-Server`,metaDescription:`Selbstgehosteter RSS/Atom-Feed-Reader und MCP-Server für KI-Assistenten.`,offlineBanner:`Du bist offline. Du kannst weiterlesen und Änderungen vornehmen; sie werden gesendet, sobald du wieder online bist.`,offlineTitle:`Keine Verbindung`,offlineText:`FeedKeeper erreicht den Server gerade nicht. Prüfe deine Verbindung und versuche es erneut.`,offlineAction:`Du bist offline. Dafür brauchst du eine Verbindung.`,offlinePending:`Wartet auf Senden: {{count}}.`},nav:{feeds:`Feeds`,items:`Artikel`,settings:`Einstellungen`,logout:`Abmelden`,menu:`Menü`,account:`Konto`,footerLinks:`Weitere Links`},onboarding:{subtitle:`Lege den ersten Admin-Account an, um die Einrichtung abzuschließen.`,emailLabel:`E-Mail`,displayNameLabel:`Anzeigename`,passwordLabel:`Passwort`,passwordHint:`Mindestens 10 Zeichen.`,submit:`Admin-Account anlegen`,orUseCli:`Lieber im Terminal?`,cliHint:`Führe stattdessen "npm run setup" auf dem Server aus — beide Wege legen denselben ersten Admin-Account an.`},login:{subtitle:`RSS-Reader & MCP-Server`,emailLabel:`E-Mail`,passwordLabel:`Passwort`,submit:`Anmelden`,error:`E-Mail oder Passwort ungültig.`,viewOnGithub:`FeedKeeper auf GitHub`},feeds:{title:`Feeds`,urlPlaceholder:`beispiel.de oder Feed-URL`,labelPlaceholder:`Bezeichnung (optional)`,subscribe:`Abonnieren`,subscribed:`Bereits abonniert`,subscribing:`Wird abonniert…`,multipleFeedsFound:`Mehrere Feeds auf dieser Seite gefunden. Bitte wähle einen aus:`,unsubscribe:`Abbestellen`,unsubscribeConfirm:`"{{title}}" wirklich abbestellen?`,unread:`{{count}} ungelesen`,alreadySubscribed:`Dieser Feed ist bereits abonniert.`,noFeedsFoundOnPage:`Auf dieser Website wurde kein RSS- oder Atom-Feed gefunden.`,interval:`Prüfintervall`,minutesShort:`{{count}} Min.`,hoursShort:`{{count}} Std.`,edit:`Bearbeiten`,markAllRead:`Alle als gelesen markieren`,importOpml:`OPML importieren`,exportOpml:`OPML exportieren`,importing:`Feeds werden importiert…`,importSuccess:`Import abgeschlossen: {{imported}} hinzugefügt, {{skipped}} bereits abonniert.`,importPartial:`Import abgeschlossen: {{imported}} hinzugefügt, {{skipped}} übersprungen, {{failed}} fehlgeschlagen.`,importFailed:`OPML-Datei konnte nicht verarbeitet oder importiert werden.`,refreshFeed:`Jetzt prüfen`,refreshAll:`Alle Feeds prüfen`,refreshing:`Wird geprüft…`,statusFailing:`Fehler beim Abruf ({{count}}x fehlgeschlagen)`,statusPending:`Wartet auf ersten Abruf`,manageFolders:`Kategorien verwalten`,noFolder:`Keine Kategorie`,folder:`Kategorie`,newFolderPlaceholder:`Neue Kategorie (z. B. Tech)`,addFolder:`Kategorie anlegen`,deleteFolderConfirm:`"{{name}}" wirklich löschen? Die Feeds bleiben erhalten.`,folderGroup:`Kategorien`,feedGroup:`Einzelne Feeds`,dragHandle:`Reihenfolge durch Ziehen ändern`,fullText:`Volltext von der Website laden`,fullTextHint:`Der Reader lädt den vollständigen Artikel, wenn der Feed nur einen Anriss enthält.`,fullTextBlocked:`Diese Seite hat zuletzt eine Cookie-Zustimmung oder ein Abo verlangt. FeedKeeper versucht es in einigen Tagen erneut.`,addFeed:`Feed hinzufügen`,addFeedShort:`Neu`,searchPlaceholder:`Feeds durchsuchen…`,failingCount:`{{count}} mit Fehlern`,filterAll:`Alle`,filterFailing:`Fehler`,uncategorized:`Ohne Kategorie`,moreActions:`Weitere Aktionen`,checkedAgo:`{{time}} geprüft`,everyInterval:`alle {{interval}}`,noMatches:`Keine passenden Feeds gefunden.`,feedCount_one:`{{count}} Feed`,feedCount_other:`{{count}} Feeds`,renameFolderHint:`Zum Umbenennen auf den Namen klicken.`,emptyTitle:`Noch keine Feeds`,emptyHint:`Abonniere Nachrichtenseiten, Blogs oder Podcasts – einfach die Website-Adresse eingeben, den Feed findet FeedKeeper selbst.`,subscribedToast:`„{{title}}“ abonniert.`,subscribeFailed:`Der Feed konnte nicht abonniert werden.`,refreshedToast_one:`„{{title}}“ geprüft – {{count}} neuer Artikel.`,refreshedToast_other:`„{{title}}“ geprüft – {{count}} neue Artikel.`,refreshFailedToast:`„{{title}}“ konnte nicht abgerufen werden: {{error}}`,refreshPendingToast:`Die Aktualisierung von „{{title}}“ steht noch aus. FeedKeeper prüft den Feed automatisch weiter.`,refreshAllPendingToast_one:`{{count}} Aktualisierung steht noch aus. FeedKeeper prüft automatisch weiter. Bisher {{newItems}} neue Artikel.`,refreshAllPendingToast_other:`{{count}} Aktualisierungen stehen noch aus. FeedKeeper prüft automatisch weiter. Bisher {{newItems}} neue Artikel.`,refreshedAllToast_one:`{{count}} Feed geprüft – {{newItems}} neue Artikel.`,refreshedAllToast_other:`{{count}} Feeds geprüft – {{newItems}} neue Artikel.`,unsubscribedToast:`„{{title}}“ abbestellt.`,markedReadToast:`Alle Artikel von „{{title}}“ als gelesen markiert.`,changesSaved:`Änderungen gespeichert.`,folderCreated:`Kategorie „{{name}}“ angelegt.`,folderRenamed:`Kategorie in „{{name}}“ umbenannt.`,folderDeleted:`Kategorie „{{name}}“ gelöscht.`,notify:`Bei neuen Artikeln benachrichtigen`,notifyHint:`Sendet eine Benachrichtigung an die Geräte, auf denen du Benachrichtigungen aktiviert hast.`,notifyActive:`Benachrichtigungen für diesen Feed aktiv`,badge:`Zahl am App-Symbol`,badgeHint:`Ungelesene Artikel dieses Feeds zählen zur Zahl am App-Symbol. Standardmäßig aus.`},items:{title:`Artikel`,viewMode:`Darstellung der Artikel`,listView:`Liste`,newspaperView:`Zeitung`,markRead:`Als gelesen markieren`,markUnread:`Als ungelesen markieren`,searchPlaceholder:`Artikel durchsuchen…`,unreadOnly:`Nur ungelesene`,all:`Alle anzeigen`,bookmarkedOnly:`Nur gemerkte Artikel`,bookmark:`Merken`,unbookmark:`Nicht mehr merken`,allFeeds:`Alle Feeds`,noItems:`Keine Artikel vorhanden.`,refresh:`Artikel aktualisieren`,refreshing:`Feeds werden aktualisiert…`,refreshFailed:`Aktualisierung fehlgeschlagen. Bitte erneut versuchen.`,noSaved:`Noch nichts gemerkt. Tippe auf den Stern, um einen Artikel samt Volltext und Bildern dauerhaft zu sichern.`,unreadIgnoredInSaved:`Die Merkliste zeigt gelesene und ungelesene Artikel.`,loadFailed:`Die Artikel konnten nicht geladen werden.`,allReadTitle:`Alles gelesen`,allReadHint:`Du hast alles gelesen. Neue Artikel erscheinen hier, sobald sie da sind.`,noResults:`Nichts gefunden.`},reader:{close:`Schließen (Esc)`,previous:`Vorheriger Artikel (K oder ←)`,next:`Nächster Artikel (J oder →)`,openOriginal:`Im Original öffnen`,copyLink:`Link kopieren`,linkCopied:`Link kopiert!`,readingTime:`{{count}} Min. Lesezeit`,toggleFullText:`Volltext aus Webseite laden (R)`,togglePreview:`Zurück zur Vorschau (R)`,extractionFailed:`Der vollständige Artikel konnte nicht geladen werden.`,bookmark:`Merken (S)`,unbookmark:`Nicht mehr merken (S)`,markRead:`Als gelesen markieren (M)`,markUnread:`Als ungelesen markieren (M)`,consentWall:`Diese Seite verlangt eine Cookie-Zustimmung oder ein Abo. Du siehst die Vorschau aus dem Feed.`,readOriginal:`Im Original lesen`},settings:{title:`Einstellungen`,tokensTitle:`Personal Access Tokens`,tokensHint:`Nur nötig für Clients, die sich nicht per OAuth anmelden können, etwa Skripte oder Konfigurationsdateien. Behandle ein Token wie ein Passwort.`,createToken:`Token erstellen`,tokenReadOnly:`Nur lesen`,tokenReadWrite:`Lesen und schreiben`,tokenNamePlaceholder:`Token-Name (z. B. "Claude Desktop")`,tokenCreated:`Token erstellt`,tokenCreatedHint:`Jetzt kopieren — es wird nicht erneut angezeigt.`,copyToken:`Kopieren`,copied:`Kopiert!`,deleteToken:`Widerrufen`,usersTitle:`Nutzer`,addUser:`Nutzer hinzufügen`,roleAdmin:`Admin`,roleUser:`Nutzer`,mcpTitle:`MCP-Client verbinden`,mcpHint:`Verbinde Claude, ChatGPT oder einen anderen MCP-Client mit deinen Feeds.`,mutedKeywordsTitle:`Stummgeschaltete Begriffe (Wortfilter)`,mutedKeywordsHint:`Artikel, deren Titel oder Text diese Begriffe enthalten, werden in deiner Artikelliste automatisch ausgeblendet.`,mutedKeywordPlaceholder:`Begriff stummschalten (z. B. "Sponsoring")`,addMutedKeyword:`Hinzufügen`,removeMutedKeyword:`Entfernen`,noMutedKeywords:`Keine stummgeschalteten Begriffe hinterlegt.`,language:`Sprache`,languageHint:`Wähle deine bevorzugte Anzeigesprache.`,autoReaderMode:`Standardmäßig im Lesemodus öffnen`,autoReaderModeHint:`Lädt den bereinigten Volltext des Artikels automatisch beim Öffnen der Detailansicht.`,theme:`Design`,themeLight:`Hell`,themeDark:`Dunkel`,themeSystem:`System`,changePasswordTitle:`Passwort ändern`,currentPasswordLabel:`Aktuelles Passwort`,newPasswordLabel:`Neues Passwort`,confirmPasswordLabel:`Neues Passwort bestätigen`,changePasswordButton:`Passwort ändern`,passwordChanged:`Passwort geändert.`,passwordMismatch:`Die neuen Passwörter stimmen nicht überein.`,incorrectPassword:`Das aktuelle Passwort ist falsch.`,retentionTitle:`Aufbewahrung`,retentionHint:`Automatische Bereinigung alter Einträge zur Reduzierung des Speicherbedarfs und Verbesserung der Abfrageleistung.`,statTotalItems:`Einträge gesamt`,statReadItems:`Gelesene Einträge`,statFeedsCount:`Aktive Feeds`,statDbSize:`Dateigröße (SQLite + WAL)`,retentionReadDaysLabel:`Gelesene Einträge aufbewahren (Tage)`,retentionReadDaysHint:`0 = sofort löschen, Standard: 30 Tage`,retentionMaxDaysLabel:`Maximale Aufbewahrungsdauer (Tage)`,retentionMaxDaysHint:`0 = unbegrenzt, Standard: 90 Tage`,retentionMaxItemsLabel:`Max. Einträge pro Feed`,retentionMaxItemsHint:`0 = unbegrenzt, Standard: 1000 Einträge`,autoCleanupLabel:`Tägliche automatische Bereinigung um 03:00 Uhr aktivieren`,saveRetention:`Einstellungen speichern`,retentionSaved:`Einstellungen gespeichert.`,runCleanupNow:`Jetzt bereinigen (VACUUM)`,cleaning:`Wird bereinigt…`,cleanupSuccess:`Bereinigung erfolgreich: {{total}} Einträge entfernt. Größe: {{before}} MB -> {{after}} MB.`,installApp:`App installieren`,installAppHint:`Lege FeedKeeper als eigenständige App auf dem Home-Bildschirm oder im Dock ab.`,installAppButton:`Installieren`,installAppIos:`Tippe in Safari auf das Teilen-Symbol (ggf. über das „…“-Menü) und wähle „Zum Home-Bildschirm“.`,installAppMacSafari:`Wähle in Safari im Menü „Ablage“ den Eintrag „Zum Dock hinzufügen“.`,profileTitle:`Profil`,displayNameLabel:`Anzeigename`,profileSaved:`Profil gespeichert.`,avatarUpload:`Foto hochladen`,avatarChange:`Foto ändern`,avatarRemove:`Entfernen`,avatarHint:`JPG, PNG oder WebP – wird quadratisch zugeschnitten und verkleinert.`,avatarUnreadable:`Das Bild konnte nicht gelesen werden.`,sectionAccount:`Konto`,sectionAccountHint:`Profil, Foto und Passwort.`,sectionGeneral:`Lesen & Darstellung`,sectionGeneralHint:`Design, Sprache und wie Artikel geöffnet werden.`,sectionFilters:`Wortfilter`,sectionFiltersHint:`Blende Artikel mit bestimmten Begriffen aus.`,sectionMcp:`MCP & API`,sectionMcpHint:`Verbinde KI-Assistenten wie Claude mit deinen Feeds.`,sectionUsers:`Nutzer`,sectionUsersHint:`Konten dieser FeedKeeper-Instanz verwalten.`,sectionDatabase:`Datenbank`,sectionDatabaseHint:`Speicherplatz und automatische Bereinigung.`,adminGroup:`Administration`,passwordHint:`Mindestens 10 Zeichen.`,appearanceTitle:`Darstellung`,readingTitle:`Lesen`,themeHint:`Hell, dunkel oder passend zum System.`,mcpStepToken:`Unten ein Token erstellen und kopieren.`,mcpStepUrl:`Im MCP-Client einen Server mit dieser URL anlegen.`,mcpStepHeader:`Das Token als Header „Authorization: Bearer <token>“ mitschicken.`,revokeTokenConfirm:`Token „{{name}}“ widerrufen? Clients, die es nutzen, verlieren sofort den Zugriff.`,noTokens:`Noch keine Tokens.`,mcpOauthTitle:`Option 1: Mit deinem Konto anmelden`,mcpOauthBadge:`Empfohlen`,mcpOauthIntro:`Für ChatGPT, Claude und andere Apps mit Connector-Unterstützung. Du musst kein Token erstellen oder kopieren.`,mcpOauthStep1:`In der App einen eigenen Connector oder Remote-MCP-Server mit der obigen URL hinzufügen.`,mcpOauthStep2:`Bei Aufforderung bei FeedKeeper anmelden.`,mcpOauthStep3:`Festlegen, ob die App nur lesen oder auch deine Feeds ändern darf, und bestätigen.`,mcpOauthDone:`Der Assistent erscheint danach unten unter „Verbundene KI-Assistenten“. Dort kannst du ihn jederzeit trennen.`,mcpTokenTitle:`Option 2: Token verwenden`,mcpTokenIntro:`Für Skripte und Clients ohne Connector-Unterstützung.`,connectedAppsTitle:`Verbundene KI-Assistenten`,connectedAppsHint:`KI-Assistenten wie ChatGPT oder Claude, die sich über MCP an diesem Server angemeldet haben. Trenne einen Assistenten, um seinen Zugriff zu beenden.`,noConnectedApps:`Noch keine KI-Assistenten verbunden.`,disconnectApp:`Trennen`,disconnectAppConfirm:`„{{name}}“ trennen? Der Assistent verliert sofort den Zugriff.`,tokenCreatedOn:`erstellt am {{date}}`,tokenLastUsed:`zuletzt genutzt {{time}}`,tokenNeverUsed:`noch nie genutzt`,userCreated:`Konto angelegt.`,addUserHint:`Selbstregistrierung ist standardmäßig aus – neue Konten legst du hier an.`,offlineSaved:`Offline lesen`,offlineSavedHint:`Hält deine gemerkten Artikel und die neuesten ungelesenen samt Bildern auf diesem Gerät bereit, damit du ohne Verbindung lesen kannst. Änderungen, die du offline machst, werden später gesendet.`,offlineSavedCount:`Offline verfügbare Artikel: {{count}}.`,notifications:`Benachrichtigungen`,notificationsHint:`Erhalte auf diesem Gerät eine Benachrichtigung, wenn Feeds deiner Wahl neue Artikel haben. Aktiviere es pro Feed unter Feeds → Bearbeiten.`,notificationsBlocked:`Benachrichtigungen sind für diese App blockiert. Erlaube sie in den Einstellungen von Gerät oder Browser.`,notificationsIos:`Auf iPhone und iPad füge FeedKeeper zuerst zum Home-Bildschirm hinzu und öffne die App von dort, um Benachrichtigungen zu aktivieren.`,notificationsUnsupported:`Dieser Browser kann keine Benachrichtigungen von FeedKeeper anzeigen.`,notificationsTest:`Test senden`,notificationsTestFailed:`Die Testbenachrichtigung konnte nicht zugestellt werden.`,sectionDevices:`Geräte`,sectionDevicesHint:`Verbinde die FeedKeeper-App auf iPhone oder iPad.`,devicesTitle:`Gekoppelte Geräte`,devicesHint:`Jedes Gerät hat einen eigenen Zugang. Wenn du ein Gerät widerrufst, wird es sofort abgemeldet.`,deviceAdd:`Gerät hinzufügen`,noDevices:`Noch keine Geräte gekoppelt.`,deviceQrAlt:`QR-Code zum Koppeln eines Geräts`,devicePairHint:`Öffne die FeedKeeper-App, wähle „Server hinzufügen“ und scanne diesen Code. Oder gib den Code von Hand ein.`,devicePairExpires:`Noch {{minutes}}:{{seconds}} Minuten gültig, einmal verwendbar.`,devicePairExpired:`Dieser Code ist abgelaufen. Füge das Gerät erneut hinzu, um einen neuen zu erhalten.`,devicePairDone:`Fertig`,deviceRevoke:`Widerrufen`,deviceRevokeConfirm:`„{{name}}“ widerrufen? Das Gerät wird abgemeldet.`,mcpClaudeTitle:`In Claude Desktop oder Cowork nutzen`,mcpClaudeHint:`Füge diesen Schnipsel in deine claude_desktop_config.json ein, um Claude mit deinen Feeds zu verbinden.`,mcpCopyConfig:`Claude-Konfiguration kopieren`,mcpConfigCopied:`Konfiguration kopiert!`},welcome:{title:`Füll deinen Reader`,intro:`Füge eine Website hinzu, wähle ein Starter-Paket oder importiere deine Abos. Deine Artikel erscheinen hier, sobald die ersten Feeds abgerufen sind.`,addTitle:`Website hinzufügen`,packsTitle:`Oder starte mit einem Paket`,packsHint:`Ein paar bekannte Feeds zu einem Thema. Du entscheidest, welche du behältst.`,subscribePack_one:`{{count}} Feed abonnieren`,subscribePack_other:`{{count}} Feeds abonnieren`,subscribingProgress:`Abonniere … {{done}} von {{total}}`,packAdded_one:`{{count}} Feed hinzugefügt.`,packAdded_other:`{{count}} Feeds hinzugefügt.`,packPartial:`{{added}} hinzugefügt, {{failed}} ließen sich nicht hinzufügen.`,importTitle:`Schon einen Feedreader im Einsatz?`,importHint:`Importiere die Abo-Datei (OPML), die dein bisheriger Reader exportiert hat.`,fetchingTitle:`Deine ersten Artikel werden geladen …`,fetchingHint:`Das dauert meist nur wenige Sekunden. Die Seite aktualisiert sich selbst.`},intro:{title:`Kurz erklärt`,subtitle:`Vier Dinge, die gut zu wissen sind. Das erscheint nur einmal.`,viewsTitle:`Liste oder Zeitung`,viewsText:`Oben rechts wechselst du zwischen der Liste und der Zeitungsansicht.`,unreadTitle:`Nur Ungelesenes`,unreadText:`Der Punkt neben der Suche blendet bereits gelesene Artikel aus oder ein.`,starTitle:`Für später merken`,starText:`Der Stern speichert einen Artikel dauerhaft, samt Volltext und Bildern. Der Stern neben der Suche zeigt alles, was du gespeichert hast.`,foldersTitle:`Kategorien`,foldersText:`Unter Feeds legst du Kategorien an und sortierst deine Abos.`,done:`Verstanden`},plan:{limitedTitle:`Dein Konto ist im Moment eingeschränkt`,limitedText:`Feeds hinzufügen, importieren und aktualisieren ist in deinem Tarif im Moment nicht enthalten. Lesen, exportieren und löschen kannst du weiterhin.`,view:`Tarife ansehen`,unavailable:`In deinem Tarif nicht enthalten`},security:{title:`Kontosicherheit`,intro:`Melde dich mit einem Passkey an oder schütze dein Passwort mit einer Authenticator-App.`,confirmIdentity:`Identität für eine Änderung bestätigen`,authenticatorStarted:`Die Einrichtung wurde gestartet. Bestätige sie mit einem Authenticator-Code.`,updated:`Die Sicherheitseinstellungen wurden aktualisiert.`,passkeyAdded:`Der Passkey wurde hinzugefügt.`,passkeyRemoved:`Der Passkey wurde entfernt.`,removeNamed:`Passkey „{{name}}“ entfernen`,refreshFailed:`Die Änderung wurde gespeichert. Die aktualisierte Übersicht konnte nicht geladen werden. Lade die Seite neu, bevor du weitere Änderungen vornimmst.`,reauth:`Bestätige deine Identität, bevor du die Sicherheitseinstellungen änderst.`,usePasskey:`Mit Passkey bestätigen`,password:`Aktuelles Passwort`,code:`Authenticator- oder Wiederherstellungscode`,sendEmail:`Per E-Mail bestätigen (Konten ohne Passwort)`,emailCode:`E-Mail-Bestätigungscode`,passkeys:`Passkeys`,passkeyName:`Name des Passkeys`,addPasskey:`Passkey hinzufügen`,remove:`Entfernen`,httpsRequired:`Passkeys benötigen HTTPS.`,twoFactor:`Zwei-Faktor-Anmeldung`,enabled:`Authenticator-Codes sind für Passwort-Anmeldungen und verknüpfte Anmeldedienste aktiviert.`,disabled:`Authenticator-Codes sind nicht aktiviert.`,enable:`Authenticator einrichten`,disable:`Authenticator deaktivieren`,scan:`Scanne den QR-Code mit deiner Authenticator-App oder gib den Einrichtungsschlüssel ein. Bestätige anschließend mit einem sechsstelligen Code.`,qrAlt:`QR-Code zur Authenticator-Einrichtung`,confirm:`Einrichtung bestätigen`,cancel:`Abbrechen`,newRecovery:`Wiederherstellungscodes ersetzen`,saveRecovery:`Bewahre diese Wiederherstellungscodes sicher auf. Jeder ersetzt einmal einen Authenticator-Code. Sie werden nur jetzt angezeigt; beim Ersetzen werden alte Codes ungültig.`,saved:`Codes sind gespeichert`,failed:`Die Aktion konnte nicht bestätigt werden. Prüfe deine Eingaben und versuche es erneut.`,lastPasskey:`Füge einen weiteren Passkey hinzu, bevor du den letzten entfernst.`,signInPasskey:`Mit Passkey anmelden`,revocationHint:`Änderungen an der Zwei-Faktor-Anmeldung melden andere Sitzungen ab und widerrufen Geräte- und API-Tokens. Verbinde deine Apps danach neu.`,confirmTitle:`Identität bestätigen`,orPassword:`oder mit Passwort`,invalidCredentials:`Das Passwort oder der Bestätigungscode ist nicht korrekt.`,passkeyCancelled:`Passkey-Bestätigung wurde abgebrochen oder nicht erkannt.`,confirmAction:`Bestätigen`}},kt={common:{appName:`FeedKeeper`,loading:`読み込み中…`,save:`保存`,cancel:`キャンセル`,delete:`削除`,close:`閉じる`,error:`問題が発生しました`,retry:`再試行`,loadMore:`さらに読み込む`,noOptions:`選択肢がありません`,metaTitle:`FeedKeeper – RSSリーダー & MCPサーバー`,metaDescription:`AIアシスタント連携に対応したセルフホスト型RSS/Atomフィードリーダー & MCPサーバー。`,offlineBanner:`オフラインです。読んだり変更したりでき、接続が戻ると送信されます。`,offlineTitle:`接続できません`,offlineText:`現在サーバーに接続できません。接続を確認してもう一度お試しください。`,offlineAction:`オフラインです。この操作には接続が必要です。`,offlinePending:`送信待ち:{{count}}件。`},nav:{items:`記事`,feeds:`フィード`,settings:`設定`,logout:`ログアウト`,menu:`メニュー`,account:`アカウント`,footerLinks:`その他のリンク`},onboarding:{subtitle:`セットアップを完了するには、最初の管理者アカウントを作成してください。`,emailLabel:`メールアドレス`,displayNameLabel:`表示名`,passwordLabel:`パスワード`,passwordHint:`10文字以上で入力してください。`,submit:`管理者アカウントを作成`,orUseCli:`ターミナルの方がお好みですか?`,cliHint:`代わりにサーバーで「npm run setup」を実行してください。どちらの方法でも同じ最初の管理者アカウントが作成されます。`},login:{subtitle:`RSSリーダー & MCPサーバー`,emailLabel:`メールアドレス`,passwordLabel:`パスワード`,submit:`ログイン`,error:`メールアドレスまたはパスワードが正しくありません。`,viewOnGithub:`GitHubでFeedKeeperを見る`},feeds:{title:`フィード`,urlPlaceholder:`example.com またはフィードURL`,labelPlaceholder:`ラベル(任意)`,subscribe:`登録`,subscribed:`登録済みです`,subscribing:`登録中…`,multipleFeedsFound:`複数のフィードが見つかりました。1つ選択してください:`,unsubscribe:`登録解除`,unsubscribeConfirm:`「{{title}}」の登録を解除しますか?`,unread:`未読 {{count}} 件`,alreadySubscribed:`このフィードは既に登録されています。`,noFeedsFoundOnPage:`このWebページからRSS/Atomフィードが見つかりませんでした。`,interval:`確認間隔`,minutesShort:`{{count}}分`,hoursShort:`{{count}}時間`,edit:`編集`,markAllRead:`すべて既読にする`,importOpml:`OPMLをインポート`,exportOpml:`OPMLをエクスポート`,importing:`フィードをインポート中…`,importSuccess:`インポート完了: {{imported}} 件追加、{{skipped}} 件は登録済み。`,importPartial:`インポート完了: {{imported}} 件追加、{{skipped}} 件スキップ、{{failed}} 件失敗。`,importFailed:`OPMLファイルの解析またはインポートに失敗しました。`,refreshFeed:`今すぐ確認`,refreshAll:`すべて確認`,refreshing:`確認中…`,statusFailing:`取得エラー ({{count}}回連続失敗)`,statusPending:`初回確認待ち`,manageFolders:`フォルダーの管理`,noFolder:`フォルダーなし`,folder:`フォルダー`,newFolderPlaceholder:`新しいフォルダー (例: Tech)`,addFolder:`フォルダーを作成`,deleteFolderConfirm:`フォルダー「{{name}}」を削除しますか?登録フィードは保持されます。`,folderGroup:`フォルダー`,feedGroup:`個別フィード`,dragHandle:`ドラッグして並び替え`,fullText:`ウェブサイトから全文を読み込む`,fullTextHint:`フィードに概要しかない場合、リーダーが記事全文を取得します。`,fullTextBlocked:`このサイトは最近 Cookie への同意または購読を求めました。数日後に再試行します。`,addFeed:`フィードを追加`,addFeedShort:`追加`,searchPlaceholder:`フィードを検索…`,failingCount:`エラー {{count}} 件`,filterAll:`すべて`,filterFailing:`エラー`,uncategorized:`カテゴリなし`,moreActions:`その他の操作`,checkedAgo:`{{time}}に確認`,everyInterval:`{{interval}}ごと`,noMatches:`該当するフィードはありません。`,feedCount_one:`{{count}} 件のフィード`,feedCount_other:`{{count}} 件のフィード`,renameFolderHint:`名前をクリックして変更できます。`,emptyTitle:`フィードはまだありません`,emptyHint:`ニュースサイト、ブログ、ポッドキャストを購読しましょう。ウェブサイトのアドレスを入力するだけで、FeedKeeper がフィードを見つけます。`,subscribedToast:`「{{title}}」を購読しました。`,subscribeFailed:`フィードを購読できませんでした。`,refreshedToast_one:`「{{title}}」を確認しました – 新着 {{count}} 件。`,refreshedToast_other:`「{{title}}」を確認しました – 新着 {{count}} 件。`,refreshFailedToast:`「{{title}}」を取得できませんでした: {{error}}`,refreshPendingToast:`「{{title}}」の更新は保留中です。FeedKeeper が自動的に確認を続けます。`,refreshAllPendingToast_one:`{{count}} 件の更新が保留中です。FeedKeeper が自動的に確認を続けます。これまでの新着記事は {{newItems}} 件です。`,refreshAllPendingToast_other:`{{count}} 件の更新が保留中です。FeedKeeper が自動的に確認を続けます。これまでの新着記事は {{newItems}} 件です。`,refreshedAllToast_one:`{{count}} 件のフィードを確認しました – 新着 {{newItems}} 件。`,refreshedAllToast_other:`{{count}} 件のフィードを確認しました – 新着 {{newItems}} 件。`,unsubscribedToast:`「{{title}}」の購読を解除しました。`,markedReadToast:`「{{title}}」のすべての記事を既読にしました。`,changesSaved:`変更を保存しました。`,folderCreated:`カテゴリ「{{name}}」を作成しました。`,folderRenamed:`カテゴリ名を「{{name}}」に変更しました。`,folderDeleted:`カテゴリ「{{name}}」を削除しました。`,notify:`新着記事を通知する`,notifyHint:`通知をオンにした端末に通知を送ります。`,notifyActive:`このフィードの通知が有効です`,badge:`アプリアイコンの数に含める`,badgeHint:`このフィードの未読記事をアプリアイコンの数に加えます。初期設定ではオフです。`},items:{title:`記事`,viewMode:`記事の表示形式`,listView:`リスト`,newspaperView:`新聞`,markRead:`既読にする`,markUnread:`未読にする`,searchPlaceholder:`記事を検索…`,unreadOnly:`未読のみ`,all:`すべて表示`,bookmarkedOnly:`保存した記事のみ`,bookmark:`保存`,unbookmark:`保存を解除`,allFeeds:`すべてのフィード`,noItems:`表示する記事がありません。`,refresh:`記事を更新`,refreshing:`フィードを更新中…`,refreshFailed:`更新に失敗しました。もう一度お試しください。`,noSaved:`保存した記事はまだありません。星をタップすると、全文と画像を含めて記事を保存できます。`,unreadIgnoredInSaved:`保存した記事は既読・未読にかかわらず表示されます。`,loadFailed:`記事を読み込めませんでした。`,allReadTitle:`すべて読みました`,allReadHint:`すべての記事を読みました。新しい記事が届くとここに表示されます。`,noResults:`見つかりませんでした。`},reader:{close:`閉じる (Esc)`,previous:`前の記事 (K または ←)`,next:`次の記事 (J または →)`,openOriginal:`元記事を開く`,copyLink:`リンクをコピー`,linkCopied:`リンクをコピーしました!`,readingTime:`読了目安 {{count}}分`,toggleFullText:`ウェブから全文を抽出 (R)`,togglePreview:`プレビューに戻る (R)`,extractionFailed:`ウェブサイトから記事の全文を抽出できませんでした。`,bookmark:`保存 (S)`,unbookmark:`保存を解除 (S)`,markRead:`既読にする (M)`,markUnread:`未読にする (M)`,consentWall:`このサイトは Cookie への同意または購読を求めています。フィードのプレビューを表示しています。`,readOriginal:`元のサイトで読む`},settings:{title:`設定`,tokensTitle:`パーソナルアクセストークン`,tokensHint:`OAuthでサインインできないクライアント(スクリプトや設定ファイルなど)にのみ必要です。トークンはパスワードと同じように扱ってください。`,createToken:`トークンを作成`,tokenReadOnly:`読み取り専用`,tokenReadWrite:`読み取りと書き込み`,tokenNamePlaceholder:`トークン名(例:「Claude Desktop」)`,tokenCreated:`トークンを作成しました`,tokenCreatedHint:`今すぐコピーしてください。二度と表示されません。`,copyToken:`コピー`,copied:`コピーしました!`,deleteToken:`失効`,usersTitle:`ユーザー`,addUser:`ユーザーを追加`,roleAdmin:`管理者`,roleUser:`ユーザー`,mcpTitle:`MCPクライアントを接続`,mcpHint:`Claude、ChatGPT、その他のMCPクライアントをフィードに接続します。`,mutedKeywordsTitle:`ミュートキーワード (単語フィルター)`,mutedKeywordsHint:`タイトルまたは本文にこれらのキーワードが含まれる記事は、記事一覧から自動的に除外されます。`,mutedKeywordPlaceholder:`ミュートするキーワード (例:「PR」)`,addMutedKeyword:`追加`,removeMutedKeyword:`削除`,noMutedKeywords:`ミュートされたキーワードはありません。`,language:`言語`,languageHint:`表示言語を選択してください。`,theme:`テーマ`,themeLight:`ライト`,themeDark:`ダーク`,themeSystem:`システム`,changePasswordTitle:`パスワードを変更`,currentPasswordLabel:`現在のパスワード`,newPasswordLabel:`新しいパスワード`,confirmPasswordLabel:`新しいパスワード(確認)`,changePasswordButton:`パスワードを変更`,passwordChanged:`パスワードを変更しました。`,passwordMismatch:`新しいパスワードが一致しません。`,incorrectPassword:`現在のパスワードが正しくありません。`,retentionTitle:`保持期間`,retentionHint:`古い記事や既読記事を自動的に削除し、ディスク使用量を抑えて検索パフォーマンスを向上させます。`,statTotalItems:`総記事数`,statReadItems:`既読記事数`,statFeedsCount:`アクティブなフィード数`,statDbSize:`ファイルサイズ (SQLite + WAL)`,retentionReadDaysLabel:`既読記事の保持期間 (日)`,retentionReadDaysHint:`0 = 既読後即時削除、デフォルト: 30日`,retentionMaxDaysLabel:`最大記事保持期間 (日)`,retentionMaxDaysHint:`0 = 無制限、デフォルト: 90日`,retentionMaxItemsLabel:`フィードあたりの最大記事数`,retentionMaxItemsHint:`0 = 無制限、デフォルト: 1000件`,autoCleanupLabel:`毎日午前3時に自動クリーンアップを実行する`,saveRetention:`設定を保存`,retentionSaved:`設定を保存しました。`,runCleanupNow:`今すぐクリーンアップを実行 (VACUUM)`,cleaning:`クリーンアップ中…`,cleanupSuccess:`クリーンアップが完了しました: {{total}} 件の記事を削除しました。サイズ: {{before}} MB -> {{after}} MB。`,installApp:`アプリをインストール`,installAppHint:`FeedKeeper をホーム画面または Dock に単独のアプリとして追加します。`,installAppButton:`インストール`,installAppIos:`Safari で共有アイコン(必要に応じて「…」メニューから)をタップし、「ホーム画面に追加」を選択してください。`,installAppMacSafari:`Safari のメニューで「ファイル」›「Dock に追加」を選択してください。`,profileTitle:`プロフィール`,displayNameLabel:`表示名`,profileSaved:`プロフィールを保存しました。`,avatarUpload:`写真をアップロード`,avatarChange:`写真を変更`,avatarRemove:`削除`,avatarHint:`JPG、PNG、WebP に対応。正方形に切り抜いて縮小します。`,avatarUnreadable:`画像を読み込めませんでした。`,autoReaderMode:`デフォルトでリーダーモードで開く`,autoReaderModeHint:`詳細表示を開いたときに、整形された記事の全文を自動で読み込みます。`,sectionAccount:`アカウント`,sectionAccountHint:`プロフィール、写真、パスワード。`,sectionGeneral:`表示と閲覧`,sectionGeneralHint:`テーマ、言語、記事の開き方。`,sectionFilters:`ワードフィルター`,sectionFiltersHint:`特定の語句を含む記事を非表示にします。`,sectionMcp:`MCP と API`,sectionMcpHint:`Claude などの AI アシスタントをフィードに接続します。`,sectionUsers:`ユーザー`,sectionUsersHint:`この FeedKeeper のアカウントを管理します。`,sectionDatabase:`データベース`,sectionDatabaseHint:`容量と自動クリーンアップ。`,adminGroup:`管理`,passwordHint:`10 文字以上。`,appearanceTitle:`表示`,readingTitle:`閲覧`,themeHint:`ライト、ダーク、またはシステムに合わせる。`,mcpStepToken:`下でトークンを作成してコピーします。`,mcpStepUrl:`MCP クライアントにこの URL のサーバーを追加します。`,mcpStepHeader:`トークンを「Authorization: Bearer <token>」ヘッダーで送信します。`,revokeTokenConfirm:`トークン「{{name}}」を取り消しますか?使用中のクライアントはすぐにアクセスできなくなります。`,noTokens:`トークンはまだありません。`,mcpOauthTitle:`方法1:アカウントでサインイン`,mcpOauthBadge:`おすすめ`,mcpOauthIntro:`ChatGPT、Claudeなど、コネクタに対応したアプリ向けです。トークンを作成・コピーする必要はありません。`,mcpOauthStep1:`アプリで、上のURLを使ってカスタムコネクタまたはリモートMCPサーバーを追加します。`,mcpOauthStep2:`求められたらFeedKeeperにサインインします。`,mcpOauthStep3:`アプリに読み取りだけを許可するか、フィードの変更も許可するかを選んで確定します。`,mcpOauthDone:`その後、アシスタントは下の「接続済みのAIアシスタント」に表示され、いつでも接続を解除できます。`,mcpTokenTitle:`方法2:トークンを使う`,mcpTokenIntro:`スクリプトや、コネクタに対応していないクライアント向けです。`,connectedAppsTitle:`接続済みのAIアシスタント`,connectedAppsHint:`MCP経由でこのサーバーにサインインしたChatGPTやClaudeなどのAIアシスタントです。接続を解除するとアクセスが終了します。`,noConnectedApps:`接続されているAIアシスタントはまだありません。`,disconnectApp:`接続解除`,disconnectAppConfirm:`「{{name}}」の接続を解除しますか?すぐにアクセスできなくなります。`,tokenCreatedOn:`{{date}} に作成`,tokenLastUsed:`最終使用 {{time}}`,tokenNeverUsed:`未使用`,userCreated:`アカウントを作成しました。`,addUserHint:`セルフ登録は既定で無効です。新しいアカウントはここで作成します。`,offlineSaved:`オフラインで読む`,offlineSavedHint:`保存した記事と最新の未読記事を画像ごとこの端末に保持し、接続なしで読めるようにします。オフライン中の変更は後で送信されます。`,offlineSavedCount:`オフラインで読める記事:{{count}}件。`,notifications:`通知`,notificationsHint:`選んだフィードに新着記事があると、この端末に通知します。「フィード」→「編集」でフィードごとにオンにします。`,notificationsBlocked:`このアプリの通知はブロックされています。端末またはブラウザの設定で許可してください。`,notificationsIos:`iPhoneとiPadでは、先にFeedKeeperをホーム画面に追加し、そこから開いて通知をオンにしてください。`,notificationsUnsupported:`このブラウザではFeedKeeperの通知を表示できません。`,notificationsTest:`テスト送信`,notificationsTestFailed:`テスト通知を配信できませんでした。`,sectionDevices:`デバイス`,sectionDevicesHint:`iPhoneやiPadのFeedKeeperアプリを接続します。`,devicesTitle:`ペアリング済みデバイス`,devicesHint:`各デバイスには個別のアクセス権があります。取り消すとすぐにサインアウトされます。`,deviceAdd:`デバイスを追加`,noDevices:`ペアリング済みのデバイスはありません。`,deviceQrAlt:`デバイスをペアリングするQRコード`,devicePairHint:`FeedKeeperアプリを開き、サーバーの追加を選んでこのコードをスキャンしてください。コードを手入力することもできます。`,devicePairExpires:`あと{{minutes}}:{{seconds}}有効、1回のみ使用できます。`,devicePairExpired:`このコードは期限切れです。もう一度デバイスを追加して新しいコードを取得してください。`,devicePairDone:`完了`,deviceRevoke:`取り消す`,deviceRevokeConfirm:`「{{name}}」を取り消しますか?デバイスはサインアウトされます。`,mcpClaudeTitle:`Claude Desktop または Cowork で利用する`,mcpClaudeHint:`claude_desktop_config.json にこのスニペットを追加すると、Claude をフィードに接続できます。`,mcpCopyConfig:`Claude 設定をコピー`,mcpConfigCopied:`設定をコピーしました!`},welcome:{title:`リーダーを始めましょう`,intro:`ウェブサイトを追加するか、スターターパックを選ぶか、購読リストをインポートしてください。最初のフィードを取得すると、記事がここに表示されます。`,addTitle:`ウェブサイトを追加`,packsTitle:`またはパックから始める`,packsHint:`テーマごとの定番フィードです。残すものは自分で選べます。`,subscribePack_one:`{{count}} 件のフィードを購読`,subscribePack_other:`{{count}} 件のフィードを購読`,subscribingProgress:`購読中… {{done}} / {{total}}`,packAdded_one:`{{count}} 件のフィードを追加しました。`,packAdded_other:`{{count}} 件のフィードを追加しました。`,packPartial:`{{added}} 件を追加、{{failed}} 件は追加できませんでした。`,importTitle:`すでにフィードリーダーを使っていますか?`,importHint:`以前のリーダーでエクスポートした購読ファイル(OPML)をインポートできます。`,fetchingTitle:`最初の記事を取得しています…`,fetchingHint:`通常は数秒で終わります。ページは自動で更新されます。`},intro:{title:`かんたんガイド`,subtitle:`知っておくと便利な4つのポイントです。表示されるのは一度だけです。`,viewsTitle:`リストと紙面`,viewsText:`右上で、リスト表示と紙面表示を切り替えられます。`,unreadTitle:`未読のみ`,unreadText:`検索欄の横にある丸いボタンで、既読の記事を非表示にしたり、表示したりできます。`,starTitle:`あとで読む`,starText:`星印を付けると、記事を全文と画像ごと残せます。検索欄の横の星印で、保存した記事をすべて表示できます。`,foldersTitle:`フォルダー`,foldersText:`「フィード」で、フォルダーを作って購読を整理できます。`,done:`わかりました`},plan:{limitedTitle:`アカウントは現在、制限されています`,limitedText:`現在のプランには、フィードの追加・インポート・更新が含まれていません。閲覧、エクスポート、削除は引き続きご利用いただけます。`,view:`プランを見る`,unavailable:`現在のプランには含まれていません`},security:{title:`アカウントのセキュリティ`,intro:`パスキーでサインインするか、認証アプリでパスワードを保護します。`,confirmIdentity:`変更のために本人確認を行う`,authenticatorStarted:`設定を開始しました。認証アプリのコードで確認してください。`,updated:`セキュリティ設定を更新しました。`,passkeyAdded:`パスキーを追加しました。`,passkeyRemoved:`パスキーを削除しました。`,removeNamed:`パスキー「{{name}}」を削除`,refreshFailed:`変更は保存されましたが、更新後の一覧を読み込めませんでした。続けて変更する前にページを再読み込みしてください。`,reauth:`セキュリティ設定を変更する前に本人確認を行ってください。`,usePasskey:`パスキーで確認`,password:`現在のパスワード`,code:`認証コードまたはリカバリーコード`,sendEmail:`メールで確認(パスワード未設定のアカウント)`,emailCode:`メール確認コード`,passkeys:`パスキー`,passkeyName:`パスキーの名前`,addPasskey:`パスキーを追加`,remove:`削除`,httpsRequired:`パスキーにはHTTPSが必要です。`,twoFactor:`2要素認証`,enabled:`パスワードと連携した認証サービスでのサインインに認証コードが有効です。`,disabled:`認証コードは無効です。`,enable:`認証アプリを設定`,disable:`認証アプリを無効にする`,scan:`認証アプリでQRコードをスキャンするか、設定キーを入力してください。その後6桁のコードで確認します。`,qrAlt:`認証アプリ設定用QRコード`,confirm:`設定を確認`,cancel:`キャンセル`,newRecovery:`リカバリーコードを再発行`,saveRecovery:`リカバリーコードを安全な場所に保存してください。各コードは認証コードの代わりに1回使えます。表示は今回のみです。再発行すると古いコードは無効になります。`,saved:`コードを保存しました`,failed:`操作を確認できませんでした。入力内容を確認して再試行してください。`,lastPasskey:`最後のパスキーを削除する前に別のパスキーを追加してください。`,signInPasskey:`パスキーでサインイン`,revocationHint:`2要素認証を変更すると他のセッションがサインアウトされ、デバイスとAPIトークンが無効になります。その後アプリを再接続してください。`,confirmTitle:`本人確認`,orPassword:`またはパスワードで`,invalidCredentials:`パスワードまたは確認コードが正しくありません。`,passkeyCancelled:`パスキーの確認がキャンセルされたか認識されませんでした。`,confirmAction:`確認`}},At=`fk_lang`;function jt(e){try{let t=window.location.protocol===`https:`?`; Secure`:``;document.cookie=`${At}=${encodeURIComponent(e)}; Path=/; Max-Age=31536000; SameSite=Lax${t}`}catch{}try{localStorage.setItem(At,e)}catch{}}je.use(Et).use(Xe).init({resources:{en:{translation:Dt},de:{translation:Ot},ja:{translation:kt}},fallbackLng:`en`,supportedLngs:[`en`,`de`,`ja`],interpolation:{escapeValue:!1},detection:{order:[`cookie`,`localStorage`,`navigator`],caches:[],lookupCookie:At,lookupLocalStorage:At}});var Mt=`modulepreload`,Nt=function(e){return`/`+e},Pt={},Ft=function(e){return e.pathname.endsWith(`.css`)},It=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Lt=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Nt(t,n);let r=s(t),i=Ft(r);return It(Pt,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Mt,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Rt=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,zt=/^[\\/]{2}/;function Bt(e,t){return t+e.replace(/\\/g,`/`)}var Vt=`popstate`;function Ht(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Ut(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return qt(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:Jt(t)}return Xt(t,n,null,e)}function Wt(e,t){if(e===!1||e==null)throw Error(t)}function Gt(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Kt(){return Math.random().toString(36).substring(2,10)}function R(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function qt(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Yt(t):t,state:n,key:t&&t.key||r||Kt(),mask:i}}function Jt({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Yt(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Xt(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Ht(e)?e:qt(h.location,e,t);n&&n(r,e),l=u()+1;let d=R(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Ht(e)?e:qt(h.location,e,t);n&&n(r,e),l=u();let i=R(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return Zt(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Vt,d),c=e,()=>{i.removeEventListener(Vt,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function Zt(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),Wt(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:Jt(t);return i=i.replace(/ $/,`%20`),!n&&zt.test(i)&&(i=r+i),new URL(i,r)}function Qt(e,t,n=`/`){return $t(e,t,n,!1)}function $t(e,t,n,r,i){let a=yn((typeof t==`string`?Yt(t):t).pathname||`/`,n);if(a==null)return null;let o=i??en(e),s=null,c=vn(a);for(let e=0;s==null&&e<o.length;++e)s=mn(o[e],c,r);return s}function en(e){let t=tn(e);return rn(t),t}function tn(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;Wt(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Dn([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(Wt(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),tn(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:fn(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=_n(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of nn(e.path))a(e,t,!0,n)}),t}function nn(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=nn(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function rn(e){e.sort((e,t)=>e.score===t.score?pn(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var an=/^:[\w-]+$/,on=3,sn=2,cn=1,ln=10,un=-2,dn=e=>e===`*`;function fn(e,t){let n=e.split(`/`),r=n.length;return n.some(dn)&&(r+=un),t&&(r+=sn),n.filter(e=>!dn(e)).reduce((e,t)=>e+(an.test(t)?on:t===``?cn:ln),r)}function pn(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function mn(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?gn(u,l,s.matcher,s.compiledParams):hn(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=hn({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Dn([a,d.pathname]),pathnameBase:kn(Dn([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Dn([a,d.pathnameBase]))}return o}function hn(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=_n(e.path,e.caseSensitive,e.end);return gn(e,t,n,r)}function gn(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=On(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=On(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function _n(e,t=!1,n=!0){Gt(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function vn(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Gt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function yn(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function bn(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Yt(e):e,a;return n?(n=En(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?xn(n.substring(1),`/`):xn(n,t)):a=t,{pathname:a,search:An(r),hash:jn(i)}}function xn(e,t){let n=On(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Sn(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Cn(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function wn(e){let t=Cn(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Tn(e,t,n,r=!1){let i;typeof e==`string`?i=Yt(e):(i={...e},Wt(!i.pathname||!i.pathname.includes(`?`),Sn(`?`,`pathname`,`search`,i)),Wt(!i.pathname||!i.pathname.includes(`#`),Sn(`#`,`pathname`,`hash`,i)),Wt(!i.search||!i.search.includes(`#`),Sn(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=bn(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var En=e=>e.replace(/[\\/]{2,}/g,`/`),Dn=e=>En(e.join(`/`));function On(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var kn=e=>On(e).replace(/^\/*/,`/`),An=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,jn=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Mn=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Nn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Pn(e){return Dn(e.map(e=>e.route.path).filter(Boolean))||`/`}var Fn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function In(e,t){let n=e;if(typeof n!=`string`||!Rt.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Fn)try{let e=new URL(window.location.href),r=zt.test(n)?new URL(Bt(n,e.protocol)):new URL(n),a=yn(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Gt(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ln=new URL(`http://localhost`);function Rn(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Ln)}catch{return Ln}}function zn(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Bn(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Vn(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!zn(i,n),s=!zn(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Bn(e,i)||!zn(i,a)))throw Error(`External navigation is not allowed`)}var Hn=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Hn);var Un=[`GET`,...Hn];new Set(Un);var Wn=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Gn(e){try{return Wn.includes(new URL(e).protocol)}catch{return!1}}var Kn=_.createContext(null);Kn.displayName=`DataRouter`;var qn=_.createContext(null);qn.displayName=`DataRouterState`;var Jn=_.createContext(!1);function Yn(){return _.useContext(Jn)}var Xn=_.createContext({isTransitioning:!1});Xn.displayName=`ViewTransition`;var Zn=_.createContext(new Map);Zn.displayName=`Fetchers`;var Qn=_.createContext(null);Qn.displayName=`Await`;var $n=_.createContext(null);$n.displayName=`Navigation`;var er=_.createContext(null);er.displayName=`Location`;var tr=_.createContext({outlet:null,matches:[],isDataRoute:!1});tr.displayName=`Route`;var nr=_.createContext(null);nr.displayName=`RouteError`;var rr=`REACT_ROUTER_ERROR`,ir=`REDIRECT`,ar=`ROUTE_ERROR_RESPONSE`;function or(e){if(e.startsWith(`${rr}:${ir}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function sr(e){if(e.startsWith(`${rr}:${ar}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Mn(t.status,t.statusText,t.data)}catch{}}function cr(e,{relative:t}={}){Wt(lr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext($n),{hash:i,pathname:a,search:o}=_r(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Dn([n,a])),r.createHref({pathname:s,search:o,hash:i})}function lr(){return _.useContext(er)!=null}function ur(){return Wt(lr(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(er).location}var dr=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function fr(e){_.useContext($n).static||_.useLayoutEffect(e)}function pr(){let{isDataRoute:e}=_.useContext(tr);return e?Pr():mr()}function mr(){Wt(lr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=_.useContext(Kn),{basename:t,navigator:n}=_.useContext($n),{matches:r}=_.useContext(tr),{pathname:i}=ur(),a=JSON.stringify(wn(r)),o=_.useRef(!1);return fr(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(Gt(o.current,dr),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Tn(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Dn([t,c.pathname])),Vn(typeof r==`string`?r:Jt(r),n.createHref(c),Rn(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var hr=_.createContext(null);function gr(e){let t=_.useContext(tr).outlet;return _.useMemo(()=>t&&_.createElement(hr.Provider,{value:e},t),[t,e])}function _r(e,{relative:t}={}){let{matches:n}=_.useContext(tr),{pathname:r}=ur(),i=JSON.stringify(wn(n));return _.useMemo(()=>Tn(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function vr(e,t){return yr(e,t)}function yr(e,t,n){Wt(lr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext($n),{matches:i}=_.useContext(tr),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Ir(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
8
+ `+e.stack}}var Le=Object.prototype.hasOwnProperty,Re=t.unstable_scheduleCallback,ze=t.unstable_cancelCallback,Be=t.unstable_shouldYield,Ve=t.unstable_requestPaint,He=t.unstable_now,Ue=t.unstable_getCurrentPriorityLevel,We=t.unstable_ImmediatePriority,Ge=t.unstable_UserBlockingPriority,Ke=t.unstable_NormalPriority,qe=t.unstable_LowPriority,Je=t.unstable_IdlePriority,Ye=t.log,Xe=t.unstable_setDisableYieldValue,Ze=null,Qe=null;function $e(e){if(typeof Ye==`function`&&Xe(e),Qe&&typeof Qe.setStrictMode==`function`)try{Qe.setStrictMode(Ze,e)}catch{}}var et=Math.clz32?Math.clz32:L,tt=Math.log,nt=Math.LN2;function L(e){return e>>>=0,e===0?32:31-(tt(e)/nt|0)|0}var rt=256,it=262144,at=4194304;function ot(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function st(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ot(n))):i=ot(o):i=ot(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ot(n))):i=ot(o)):i=ot(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ct(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function lt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-et(n),i=1<<r;t|=e[r],n&=~i}return t}function ut(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dt(){var e=at;return at<<=1,!(at&62914560)&&(at=4194304),e}function ft(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-et(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ht(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ht(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-et(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function gt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-et(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function _t(e,t){var n=t&-t;return n=n&42?1:vt(n),(n&(e.suspendedLanes|t))===0?n:0}function vt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function yt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function bt(){var e=P.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function xt(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var St=Math.random().toString(36).slice(2),Ct=`__reactFiber$`+St,wt=`__reactProps$`+St,Tt=`__reactContainer$`+St,Et=`__reactEvents$`+St,Dt=`__reactListeners$`+St,Ot=`__reactHandles$`+St,kt=`__reactResources$`+St,At=`__reactMarker$`+St,jt=`__reactLoad$`+St;function Mt(e){delete e[Ct],delete e[wt],delete e[Dt],delete e[Ot]}function Nt(e){var t;if(t=e[Ct])return t;for(var n=e.parentNode;n;){if(t=n[Tt]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[Ct])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function Pt(e){if(e=e[Ct]||e[Tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ft(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function It(e){var t=e[kt];return t||=e[kt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Lt(e){e[At]=!0}function Rt(e){e[jt]=void 0}var zt=new Set,Bt={};function Vt(e,t){Ht(e,t),Ht(e+`Capture`,t)}function Ht(e,t){for(Bt[e]=t,e=0;e<t.length;e++)zt.add(t[e])}var Ut=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Wt={},Gt={};function Kt(e){return Le.call(Gt,e)?!0:Le.call(Wt,e)?!1:Ut.test(e)?Gt[e]=!0:(Wt[e]=!0,!1)}var R=!1;function qt(){var e=R;return R=!1,e}function Jt(e,t,n){if(Kt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Yt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Xt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Qt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function $t(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function en(e){if(!e._valueTracker){var t=Qt(e)?`checked`:`value`;e._valueTracker=$t(e,t,``+e[t])}}function tn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Qt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var nn=/[\n"\\]/g;function rn(e){return e.replace(nn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function an(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Zt(t)):e.value!==``+Zt(t)&&(e.value=``+Zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):sn(e,Zt(n)):o===`number`&&e.value==t?sn(e,Zt(e.value)):sn(e,Zt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Zt(s):e.removeAttribute(`name`)}function on(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){en(e);return}n=n==null?``:``+Zt(n),t=t==null?n:``+Zt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),en(e)}function sn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function cn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Zt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ln(e,t,n){if(t!=null&&(t=``+Zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Zt(n)}function un(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(_e(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),en(e)}function dn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function pn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||fn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function mn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,R=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(pn(e,a,r),R=!0)}else for(var o in t)t.hasOwnProperty(o)&&pn(e,o,t[o])}function hn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var gn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),_n=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function vn(e){return _n.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function yn(){}var bn=null;function xn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sn=null,Cn=null;function wn(e){var t=Pt(e);if(t&&(e=t.stateNode)){var n=e[wt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(an(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+rn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[wt]||null;if(!a)throw Error(i(90));an(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&tn(r)}break a;case`textarea`:ln(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&cn(e,!!n.multiple,t,!1)}}}var Tn=!1;function En(e,t,n){if(Tn)return e(t,n);Tn=!0;try{return e(t)}finally{if(Tn=!1,(Sn!==null||Cn!==null)&&(Ld(),Sn&&(t=Sn,e=Cn,Cn=Sn=null,wn(t),e)))for(t=0;t<e.length;t++)wn(e[t])}}function Dn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[wt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var On=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,kn=!1;if(On)try{var An={};Object.defineProperty(An,"passive",{get:function(){kn=!0}}),window.addEventListener(`test`,An,An),window.removeEventListener(`test`,An,An)}catch{kn=!1}var jn=null,Mn=null,Nn=null;function Pn(){if(Nn)return Nn;var e,t=Mn,n=t.length,r,i=`value`in jn?jn.value:jn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Nn=i.slice(e,1<r?1-r:void 0)}function Fn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function In(){return!0}function Ln(){return!1}function Rn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?In:Ln,this.isPropagationStopped=Ln,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=In)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=In)},persist:function(){},isPersistent:In}),t}var zn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bn=Rn(zn),Vn=D({},zn,{view:0,detail:0}),Hn=Rn(Vn),Un,Wn,Gn,Kn=D({},Vn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Gn&&(Gn&&e.type===`mousemove`?(Un=e.screenX-Gn.screenX,Wn=e.screenY-Gn.screenY):Wn=Un=0,Gn=e),Un)},movementY:function(e){return`movementY`in e?e.movementY:Wn}}),qn=Rn(Kn),Jn=Rn(D({},Kn,{dataTransfer:0})),Yn=Rn(D({},Vn,{relatedTarget:0})),Xn=Rn(D({},zn,{animationName:0,elapsedTime:0,pseudoElement:0})),Zn=Rn(D({},zn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Qn=Rn(D({},zn,{data:0})),$n={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},er={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},tr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function nr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tr[e])?!!t[e]:!1}function rr(){return nr}var ir=Rn(D({},Vn,{key:function(e){if(e.key){var t=$n[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Fn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?er[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rr,charCode:function(e){return e.type===`keypress`?Fn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Fn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),ar=Rn(D({},Kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),or=Rn(D({},zn,{submitter:0})),sr=Rn(D({},Vn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rr})),cr=Rn(D({},zn,{propertyName:0,elapsedTime:0,pseudoElement:0})),lr=Rn(D({},Kn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ur=Rn(D({},zn,{newState:0,oldState:0,source:0})),dr=[9,13,27,32],fr=On&&`CompositionEvent`in window,pr=null;On&&`documentMode`in document&&(pr=document.documentMode);var mr=On&&`TextEvent`in window&&!pr,hr=On&&(!fr||pr&&8<pr&&11>=pr),gr=` `,_r=!1;function vr(e,t){switch(e){case`keyup`:return dr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function yr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var br=!1;function xr(e,t){switch(e){case`compositionend`:return yr(t);case`keypress`:return t.which===32?(_r=!0,gr):null;case`textInput`:return e=t.data,e===gr&&_r?null:e;default:return null}}function Sr(e,t){if(br)return e===`compositionend`||!fr&&vr(e,t)?(e=Pn(),Nn=Mn=jn=null,br=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return hr&&t.locale!==`ko`?null:t.data;default:return null}}var Cr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Cr[e.type]:t===`textarea`}function Tr(e,t,n,r){Sn?Cn?Cn.push(r):Cn=[r]:Sn=r,t=qf(t,`onChange`),0<t.length&&(n=new Bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Er=null,Dr=null;function Or(e){Bf(e,0)}function kr(e){if(tn(Ft(e)))return e}function Ar(e,t){if(e===`change`)return t}var jr=!1;if(On){var Mr;if(On){var Nr=`oninput`in document;if(!Nr){var Pr=document.createElement(`div`);Pr.setAttribute(`oninput`,`return;`),Nr=typeof Pr.oninput==`function`}Mr=Nr}else Mr=!1;jr=Mr&&(!document.documentMode||9<document.documentMode)}function Fr(){Er&&(Er.detachEvent(`onpropertychange`,Ir),Dr=Er=null)}function Ir(e){if(e.propertyName===`value`&&kr(Dr)){var t=[];Tr(t,Dr,e,xn(e)),En(Or,t)}}function Lr(e,t,n){e===`focusin`?(Fr(),Er=t,Dr=n,Er.attachEvent(`onpropertychange`,Ir)):e===`focusout`&&Fr()}function Rr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return kr(Dr)}function zr(e,t){if(e===`click`)return kr(t)}function Br(e,t){if(e===`input`||e===`change`)return kr(t)}function Vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Hr=typeof Object.is==`function`?Object.is:Vr;function Ur(e,t){if(Hr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Le.call(t,i)||!Hr(e[i],t[i]))return!1}return!0}function Wr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kr(e,t){var n=Gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Gr(n)}}function qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wr(e.document)}return t}function Yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Xr=On&&`documentMode`in document&&11>=document.documentMode,Zr=null,Qr=null,$r=null,ei=!1;function ti(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ei||Zr==null||Zr!==Wr(r)||(r=Zr,`selectionStart`in r&&Yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$r&&Ur($r,r)||($r=r,r=qf(Qr,`onSelect`),0<r.length&&(t=new Bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Zr)))}function ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ri={animationend:ni(`Animation`,`AnimationEnd`),animationiteration:ni(`Animation`,`AnimationIteration`),animationstart:ni(`Animation`,`AnimationStart`),transitionrun:ni(`Transition`,`TransitionRun`),transitionstart:ni(`Transition`,`TransitionStart`),transitioncancel:ni(`Transition`,`TransitionCancel`),transitionend:ni(`Transition`,`TransitionEnd`)},ii={},ai={};On&&(ai=document.createElement(`div`).style,`AnimationEvent`in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),`TransitionEvent`in window||delete ri.transitionend.transition);function oi(e){if(ii[e])return ii[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ai)return ii[e]=t[n];return e}var si=oi(`animationend`),ci=oi(`animationiteration`),li=oi(`animationstart`),ui=oi(`transitionrun`),di=oi(`transitionstart`),fi=oi(`transitioncancel`),pi=oi(`transitionend`),mi=new Map,hi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);hi.push(`scrollEnd`);function gi(e,t){mi.set(e,t),Vt(t,[e])}var _i=0;function vi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=vd.identifierPrefix;var n=_i++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function yi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Ed;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function bi(e,t){return e=yi(e),t=yi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var xi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Si=[],Ci=0,wi=0;function Ti(){for(var e=Ci,t=wi=Ci=0;t<e;){var n=Si[t];Si[t++]=null;var r=Si[t];Si[t++]=null;var i=Si[t];Si[t++]=null;var a=Si[t];if(Si[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ki(n,i,a)}}function Ei(e,t,n,r){Si[Ci++]=e,Si[Ci++]=t,Si[Ci++]=n,Si[Ci++]=r,wi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Di(e,t,n,r){return Ei(e,t,n,r),Ai(e)}function Oi(e,t){return Ei(e,null,null,t),Ai(e)}function ki(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-et(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ai(e){if(50<Dd)throw Dd=0,Od=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ji={};function Mi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ni(e,t,n,r){return new Mi(e,t,n,r)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fi(e,t){var n=e.alternate;return n===null?(n=Ni(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ii(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Li(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Pi(r)&&(s=1);else if(typeof r==`string`)s=qm(e,n,Se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case le:return e=Ni(31,n,t,a),e.elementType=le,e.lanes=o,e;case k:return Ri(n.children,a,o,t);case ne:s=8,a|=24;break;case A:return e=Ni(12,n,t,a|2),e.elementType=A,e.lanes=o,e;case oe:return e=Ni(13,n,t,a),e.elementType=oe,e.lanes=o,e;case se:return e=Ni(19,n,t,a),e.elementType=se,e.lanes=o,e;case M:case de:return e=a|32,e=Ni(30,n,t,e),e.elementType=de,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case ie:s=10;break a;case re:s=9;break a;case ae:s=11;break a;case ce:s=14;break a;case j:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ni(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ri(e,t,n,r){return e=Ni(7,e,r,t),e.lanes=n,e}function zi(e,t,n){return e=Ni(6,e,null,t),e.lanes=n,e}function Bi(e){var t=Ni(18,null,null,0);return t.stateNode=e,t}function Vi(e,t,n){return t=Ni(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hi=new WeakMap;function Ui(e,t){if(typeof e==`object`&&e){var n=Hi.get(e);return n===void 0?(t={value:e,source:t,stack:Ie(t)},Hi.set(e,t),t):n}return{value:e,source:t,stack:Ie(t)}}var Wi=[],Gi=0,Ki=null,qi=0,Ji=[],Yi=0,Xi=null,Zi=1,Qi=``;function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ki,Ki=e,qi=t}function ea(e,t,n){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Xi=e;var r=Zi;e=Qi;var i=32-et(r)-1;r&=~(1<<i),n+=1;var a=32-et(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zi=1<<32-et(t)+i|n<<i|r,Qi=a+e}else Zi=1<<a|n<<i|r,Qi=e}function ta(e){e.return!==null&&($i(e,1),ea(e,1,0))}function na(e){for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null;for(;e===Xi;)Xi=Ji[--Yi],Ji[Yi]=null,Qi=Ji[--Yi],Ji[Yi]=null,Zi=Ji[--Yi],Ji[Yi]=null}function ra(e,t){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Zi=t.id,Qi=t.overflow,Xi=e}var ia=null,aa=null,z=!1,oa=null,sa=!1,ca=Error(i(519));function la(e){throw ha(Ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ca}function ua(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ct]=e,t[wt]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<Rf.length;n++)$(Rf[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),on(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),un(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||$f(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=yn),t=!0):t=!1,t||la(e,!0)}function da(e){for(ia=e.return;ia;)switch(ia.tag){case 5:case 31:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:ia=ia.return}}function fa(e){if(e!==ia)return!1;if(!z)return da(e),z=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||pp(e.type,e.memoizedProps)),n=!n),n&&aa&&la(e),da(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=dm(e)}else t===27?(t=aa,Sp(e.type)?(e=um,um=null,aa=e):aa=t):aa=ia?lm(e.stateNode.nextSibling):null;return!0}function pa(){aa=ia=null,z=!1}function ma(){var e=oa;return e!==null&&(ud===null?ud=e:ud.push.apply(ud,e),oa=null),e}function ha(e){oa===null?oa=[e]:oa.push(e)}var ga=be(null),B=null,_a=null;function va(e,t,n){I(ga,t._currentValue),t._currentValue=n}function ya(e){e._currentValue=ga.current,xe(ga)}function ba(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function xa(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ba(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ba(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ba(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function V(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Hr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Te.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&xa(t,e,n,r),t.flags|=262144,e!==null}function Sa(e){for(e=e.firstContext;e!==null;){if(!Hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ca(e){B=e,_a=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wa(e){return Ea(B,e)}function Ta(e,t){return B===null&&Ca(e),Ea(e,t)}function Ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},_a===null){if(e===null)throw Error(i(308));_a=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _a=_a.next=t;return n}var Da=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Oa=t.unstable_scheduleCallback,ka=t.unstable_NormalPriority,Aa={$$typeof:ie,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ja(){return{controller:new Da,data:new Map,refCount:0}}function Ma(e){e.refCount--,e.refCount===0&&Oa(ka,function(){e.controller.abort()})}function Na(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Pa=null;function Fa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ia=null,La=0,Ra=0,za=null;function Ba(e,t){if(Ia===null){var n=Ia=[];La=0,Ra=Nf(),za={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return La++,t.then(Va,Va),t}function Va(){if(--La===0&&(Pa=null,Ia!==null)){za!==null&&(za.status=`fulfilled`);var e=Ia;Ia=null,Ra=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ua=N.S;N.S=function(e,t){if(pd=He(),typeof t==`object`&&t&&typeof t.then==`function`&&Ba(e,t),Pa!==null)for(var n=yf;n!==null;)Na(n,Pa),n=n.next;if(n=e.types,n!==null){for(var r=yf;r!==null;)Na(r,n),r=r.next;if(Ra!==0){r=Pa,r===null&&(r=Pa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ua!==null&&Ua(e,t)};var Wa=be(null);function Ga(){var e=Wa.current;return e===null?Xu.pooledCache:e}function Ka(e,t){t===null?I(Wa,Wa.current):I(Wa,t.pool)}function qa(){var e=Ga();return e===null?null:{parent:Aa._currentValue,pool:e}}var Ja=Error(i(460)),Ya=Error(i(474)),Xa=Error(i(542)),Za={then:function(){}};function Qa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function $a(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(yn,yn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ro(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(yn,yn);else{if(e=Xu,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ro(e),e}throw to=t,Ja}}function eo(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(to=e,Ja):e}}var to=null;function no(){if(to===null)throw Error(i(459));var e=to;return to=null,e}function ro(e){if(e===Ja||e===Xa)throw Error(i(483))}var io=null,H=0;function ao(e){var t=H;return H+=1,io===null&&(io=[]),$a(io,e,t)}function oo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function so(e,t){throw t.$$typeof===ee?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function co(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=zi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),oo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===j&&eo(i)===t.type)?(t=a(t,n.props),oo(t,n),t.return=e,t):(t=Li(n.type,n.key,n.props,null,e.mode,r),oo(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Vi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ri(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=zi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case O:return n=Li(t.type,t.key,t.props,null,e.mode,n),oo(n,t),n.return=e,n;case te:return t=Vi(t,e.mode,n),t.return=e,t;case j:return t=eo(t),f(e,t,n)}if(_e(t)||me(t))return t=Ri(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ao(t),n);if(t.$$typeof===ie)return f(e,Ta(e,t),n);so(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case O:return n.key===i?l(e,t,n,r):null;case te:return n.key===i?u(e,t,n,r):null;case j:return n=eo(n),p(e,t,n,r)}if(_e(n)||me(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ao(n),r);if(n.$$typeof===ie)return p(e,t,Ta(e,n),r);so(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case O:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case te:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case j:return r=eo(r),m(e,t,n,r,i)}if(_e(r)||me(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ao(r),i);if(r.$$typeof===ie)return m(e,t,n,Ta(t,r),i);so(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),z&&$i(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return z&&$i(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),z&&$i(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),z&&$i(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return z&&$i(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),z&&$i(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case O:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),oo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===j&&eo(l)===r.type){n(e,r.sibling),c=a(r,o.props),oo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Ri(o.props.children,e.mode,c,o.key),oo(c,o),c.return=e,e=c):(c=Li(o.type,o.key,o.props,null,e.mode,c),oo(c,o),c.return=e,e=c)}return s(e);case te:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Vi(o,e.mode,c),c.return=e,e=c}return s(e);case j:return o=eo(o),_(e,r,o,c)}if(_e(o))return h(e,r,o,c);if(me(o)){if(l=me(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,ao(o),c);if(o.$$typeof===ie)return _(e,r,Ta(e,o),c);so(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=zi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{H=0;var i=_(e,t,n,r);return io=null,i}catch(t){if(t===Ja||t===Xa)throw t;var a=Ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var lo=co(!0),uo=co(!1),fo=!1;function po(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ho(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function go(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,X&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ai(e),ki(e,null,n),t}return Ei(e,r,t,n),Ai(e)}function _o(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gt(e,n)}}function vo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var yo=!1;function bo(){if(yo){var e=za;if(e!==null)throw e}}function xo(e,t,n,r){yo=!1;var i=e.updateQueue;fo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Q&f)===f:(r&f)===f){f!==0&&f===Ra&&(yo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:fo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),id|=o,e.lanes=o,e.memoizedState=d}}function So(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)So(n[e],t)}var wo=be(null),To=be(0);function Eo(e,t){e=nd,I(To,e),I(wo,t),nd=e|t.baseLanes}function Do(){I(To,nd),I(wo,wo.current)}function Oo(){nd=To.current,xe(wo),xe(To)}var ko=be(null),Ao=null;function jo(e){var t=e.alternate;I(Fo,Fo.current&1),I(ko,e),Ao===null&&(t===null||wo.current!==null||t.memoizedState!==null)&&(Ao=e)}function Mo(e){I(Fo,Fo.current),I(ko,e),Ao===null&&(Ao=e)}function No(e){e.tag===22?(I(Fo,Fo.current),I(ko,e),Ao===null&&(Ao=e)):Po()}function Po(){I(Fo,Fo.current),I(ko,ko.current)}function U(e){xe(ko),Ao===e&&(Ao=null),xe(Fo)}var Fo=be(0);function Io(e,t){I(ko,ko.current),I(Fo,t)}function Lo(e){xe(Fo),xe(ko),Ao===e&&(Ao=null)}function Ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zo=0,W=null,Bo=null,Vo=null,Ho=!1,Uo=!1,Wo=!1,Go=0,Ko=0,qo=null,Jo=0;function Yo(){throw Error(i(321))}function Xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Hr(e[n],t[n]))return!1;return!0}function Zo(e,t,n,r,i,a){return zo=a,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?pc:mc,Wo=!1,a=n(r,i),Wo=!1,Uo&&(a=$o(t,n,r,i)),Qo(e),a}function Qo(e){N.H=fc;var t=Bo!==null&&Bo.next!==null;if(zo=0,Vo=Bo=W=null,Ho=!1,Ko=0,qo=null,t)throw Error(i(300));e===null||jc||(e=e.dependencies,e!==null&&Sa(e)&&(jc=!0))}function $o(e,t,n,r){W=e;var a=0;do{if(Uo&&(qo=null),Ko=0,Uo=!1,25<=a)throw Error(i(301));if(a+=1,Vo=Bo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=hc,o=t(n,r)}while(Uo);return o}function es(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?ss(t):t,e=e.useState()[0],(Bo===null?null:Bo.memoizedState)!==e&&(W.flags|=1024),t}function ts(){var e=Go!==0;return Go=0,e}function ns(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function rs(e){if(Ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ho=!1}zo=0,Vo=Bo=W=null,Uo=!1,Ko=Go=0,qo=null}function is(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vo===null?W.memoizedState=Vo=e:Vo=Vo.next=e,Vo}function as(){if(Bo===null){var e=W.alternate;e=e===null?null:e.memoizedState}else e=Bo.next;var t=Vo===null?W.memoizedState:Vo.next;if(t!==null)Vo=t,Bo=e;else{if(e===null)throw W.alternate===null?Error(i(467)):Error(i(310));Bo=e,e={memoizedState:Bo.memoizedState,baseState:Bo.baseState,baseQueue:Bo.baseQueue,queue:Bo.queue,next:null},Vo===null?W.memoizedState=Vo=e:Vo=Vo.next=e}return Vo}function os(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ss(e){var t=Ko;return Ko+=1,qo===null&&(qo=[]),e=$a(qo,e,t),t=W,(Vo===null?t.memoizedState:Vo.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?pc:mc),e}function cs(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ss(e);if(e.$$typeof===fe)return;if(e.$$typeof===ie)return wa(e)}throw Error(i(438,String(e)))}function ls(e){var t=null,n=W.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=W.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=os(),W.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ue;return t.index++,n}function us(e,t){return typeof t==`function`?t(e):t}function ds(e){return fs(as(),Bo,e)}function fs(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(zo&f)===f:(Q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ra&&(d=!0);else if((zo&p)===p){u=u.next,p===Ra&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,W.lanes|=p,id|=p;f=u.action,Wo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,W.lanes|=f,id|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Hr(o,e.memoizedState)&&(jc=!0,d&&(n=za,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function G(e){var t=as(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Hr(o,t.memoizedState)||(jc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ps(e,t,n){var r=W,a=as(),o=z;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Hr((Bo||a).memoizedState,n);if(s&&(a.memoizedState=n,jc=!0),a=a.queue,Rs(gs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Vo!==null&&!!(Vo.memoizedState.tag&1),Ns(e?9:8,{destroy:void 0},hs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Xu===null)throw Error(i(349));o||zo&127||ms(r,t,n)}return n}function ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t=os(),W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hs(e,t,n,r){t.value=n,t.getSnapshot=r,_s(t)&&vs(e)}function gs(e,t,n){return n(function(){_s(t)&&vs(e)})}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Hr(e,n)}catch{return!0}}function vs(e){var t=Oi(e,2);t!==null&&Md(t,e,2)}function ys(e){var t=is();if(typeof e==`function`){var n=e;if(e=n(),Wo){$e(!0);try{n()}finally{$e(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:e},t}function bs(e,t,n,r){return e.baseState=n,fs(e,Bo,typeof r==`function`?r:us)}function xs(e,t,n,r,a){if(lc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ss(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ss(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};o.types=a===null?null:a.types,N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Cs(e,t,s)}catch(n){Ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Cs(e,t,a)}catch(n){Ts(e,t,n)}}function Cs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ws(e,t,n)},function(n){return Ts(e,t,n)}):ws(e,t,n)}function ws(e,t,n){t.status=`fulfilled`,t.value=n,Es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ss(e,n)))}function Ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Es(t),t=t.next;while(t!==r)}e.action=null}function Es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ds(e,t){return t}function Os(e,t){if(z){var n=Xu.formState;if(n!==null){a:{var r=W;if(z){if(aa){b:{for(var i=aa,a=sa;i.nodeType!==8;){if(!a){i=null;break b}if(i=lm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){aa=lm(i.nextSibling),r=i.data===`F!`;break a}}la(r)}r=!1}r&&(t=n[0])}}return n=is(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ds,lastRenderedState:t},n.queue=r,n=oc.bind(null,W,r),r.dispatch=n,r=ys(!1),a=cc.bind(null,W,!1,r.queue),r=is(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=xs.bind(null,W,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ks(e){return As(as(),Bo,e)}function As(e,t,n){if(t=fs(e,t,Ds)[0],e=ds(us)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ss(t)}catch(e){throw e===Ja?Xa:e}else r=t;t=as();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(W.flags|=2048,Ns(9,{destroy:void 0},js.bind(null,i,n),null)),[r,a,e]}function js(e,t){e.action=t}function Ms(e){var t=as(),n=Bo;if(n!==null)return As(t,n,e);as(),t=t.memoizedState,n=as();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=W.updateQueue,t===null&&(t=os(),W.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ps(){return as().memoizedState}function Fs(e,t,n,r){var i=is();W.flags|=e,i.memoizedState=Ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function Is(e,t,n,r){var i=as();r=r===void 0?null:r;var a=i.memoizedState.inst;Bo!==null&&r!==null&&Xo(r,Bo.memoizedState.deps)?i.memoizedState=Ns(t,a,n,r):(W.flags|=e,i.memoizedState=Ns(1|t,a,n,r))}function Ls(e,t){Fs(8390656,8,e,t)}function Rs(e,t){Is(2048,8,e,t)}function zs(e){W.flags|=4;var t=W.updateQueue;if(t===null)t=os(),W.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bs(e){var t=as().memoizedState;return zs({ref:t,nextImpl:e}),function(){if(X&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Vs(e,t){return Is(4,2,e,t)}function Hs(e,t){return Is(4,4,e,t)}function Us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ws(e,t,n){n=n==null?null:n.concat([e]),Is(4,4,Us.bind(null,t,e),n)}function Gs(){}function Ks(e,t){var n=as();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=as();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Xo(t,r[1]))return r[0];if(r=e(),Wo){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r}function Js(e,t,n){return n===void 0||zo&1073741824&&!(Q&261930)?e.memoizedState=t:(e.memoizedState=n,e=Ad(),W.lanes|=e,id|=e,n)}function Ys(e,t,n,r){return Hr(n,t)?n:wo.current===null?!(zo&106)||zo&1073741824&&!(Q&261930)?(jc=!0,e.memoizedState=n):(e=Ad(),W.lanes|=e,id|=e,t):(e=Js(e,n,r),Hr(e,t)||(jc=!0),e)}function Xs(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};s.types=o===null?null:o.types,N.T=s,cc(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,Ha(c,r),kd(e)):sc(e,t,r,kd(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},kd())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=$s(e).queue;Xs(e,a,t,ve,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ve,baseState:ve,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:ve},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:us,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},kd())}function tc(){return wa(sh)}function nc(){return as().memoizedState}function rc(){return as().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=kd();e=ho(n);var r=go(t,e,n);r!==null&&(Md(r,t,n),_o(r,t,n)),t={cache:ja()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=kd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=Di(e,t,n,r),n!==null&&(Md(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,kd())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Hr(s,o))return Ei(e,t,i,0),Xu===null&&Ti(),!1}catch{}if(n=Di(e,t,i,r),n!==null)return Md(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:Nf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(i(479))}else t=Di(e,n,r,2),t!==null&&Md(t,e,2)}function lc(e){var t=e.alternate;return e===W||t!==null&&t===W}function uc(e,t){Uo=Ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gt(e,n)}}var fc={readContext:wa,use:cs,useCallback:Yo,useContext:Yo,useEffect:Yo,useImperativeHandle:Yo,useLayoutEffect:Yo,useInsertionEffect:Yo,useMemo:Yo,useReducer:Yo,useRef:Yo,useState:Yo,useDebugValue:Yo,useDeferredValue:Yo,useTransition:Yo,useSyncExternalStore:Yo,useId:Yo,useHostTransitionStatus:Yo,useFormState:Yo,useActionState:Yo,useOptimistic:Yo,useMemoCache:Yo,useCacheRefresh:Yo,useEffectEvent:Yo},pc={readContext:wa,use:cs,useCallback:function(e,t){return is().memoizedState=[e,t===void 0?null:t],e},useContext:wa,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var n=is();t=t===void 0?null:t;var r=e();if(Wo){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=is();if(n!==void 0){var i=n(t);if(Wo){$e(!0);try{n(t)}finally{$e(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ac.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=is();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(is(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,W,e.queue,!0,!1),is().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,a=is();if(z){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Xu===null)throw Error(i(349));Q&127||ms(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},hs.bind(null,r,o,n,t),null),n},useId:function(){var e=is(),t=Xu.identifierPrefix;if(z){var n=Qi,r=Zi;n=(r&~(1<<32-et(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Jo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Os,useActionState:Os,useOptimistic:function(e){var t=is();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cc.bind(null,W,!0,n),n.dispatch=t,[e,t]},useMemoCache:ls,useCacheRefresh:function(){return is().memoizedState=ic.bind(null,W)},useEffectEvent:function(e){var t=is(),n={impl:e};return t.memoizedState=n,function(){if(X&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},mc={readContext:wa,use:cs,useCallback:Ks,useContext:wa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:ds,useRef:Ps,useState:function(){return ds(us)},useDebugValue:Gs,useDeferredValue:function(e,t){return Ys(as(),Bo.memoizedState,e,t)},useTransition:function(){var e=ds(us)[0],t=as().memoizedState;return[typeof e==`boolean`?e:ss(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:ks,useActionState:ks,useOptimistic:function(e,t){return bs(as(),Bo,e,t)},useMemoCache:ls,useCacheRefresh:rc,useEffectEvent:Bs},hc={readContext:wa,use:cs,useCallback:Ks,useContext:wa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:G,useRef:Ps,useState:function(){return G(us)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=as();return Bo===null?Js(n,e,t):Ys(n,Bo.memoizedState,e,t)},useTransition:function(){var e=G(us)[0],t=as().memoizedState;return[typeof e==`boolean`?e:ss(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){var n=as();return Bo===null?(n.baseState=e,[e,n.queue.dispatch]):bs(n,Bo,e,t)},useMemoCache:ls,useCacheRefresh:rc,useEffectEvent:Bs};function gc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=kd(),i=ho(r);i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Md(t,e,r),_o(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=kd(),i=ho(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=go(e,i,r),t!==null&&(Md(t,e,r),_o(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=kd(),r=ho(n);r.tag=2,t!=null&&(r.callback=t),t=go(e,r,n),t!==null&&(Md(t,e,n),_o(t,e,n))}};function vc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ur(n,r)||!Ur(i,a):!0}function yc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function bc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function xc(e){xi(e)}function Sc(e){console.error(e)}function Cc(e){xi(e)}function wc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ec(e,t,n){return n=ho(n),n.tag=3,n.payload={element:null},n.callback=function(){wc(e,t)},n}function Dc(e){return e=ho(e),e.tag=3,e}function Oc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Tc(t,n,r),typeof i!=`function`&&(gd===null?gd=new Set([this]):gd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function kc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&V(t,n,a,!0),n=ko.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Ao===null?Wd():n.alternate===null&&rd===0&&(rd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),pf(e,r,a)),!1;case 22:return n.flags|=65536,r===Za?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),pf(e,r,a)),!1}throw Error(i(435,n.tag))}return pf(e,r,a),Wd(),!1}if(z)return t=ko.current,t===null?(r!==ca&&(t=Error(i(423),{cause:r}),ha(Ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ui(r,n),a=Ec(e.stateNode,r,a),vo(e,a),rd!==4&&(rd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ca&&(e=Error(i(422),{cause:r}),ha(Ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ui(o,n),ld===null?ld=[o]:ld.push(o),rd!==4&&(rd=2),t===null)return!0;r=Ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ec(n.stateNode,r,e),vo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(gd===null||!gd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Dc(a),Oc(a,e,n,r),vo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ac=Error(i(461)),jc=!1;function Mc(e,t,n,r){t.child=e===null?uo(t,null,n,r):lo(t,e.child,n,r)}function Nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ca(t),r=Zo(e,t,n,o,a,i),s=ts(),e!==null&&!jc?(ns(e,t,i),sl(e,t,i)):(z&&s&&ta(t),t.flags|=1,Mc(e,t,r,i),t.child)}function Pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Fc(e,t,a,r,i)):(e=Li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!cl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ur:n,n(o,r)&&e.ref===t.ref)return sl(e,t,i)}return t.flags|=1,e=Fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ur(a,r)&&e.ref===t.ref){if(jc=!1,t.pendingProps=r=a,cl(e,i))e.flags&131072&&(jc=!0);else return t.lanes=e.lanes,sl(e,t,i)}}return Uc(e,t,n,r,i)}function Ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ka(t,a===null?null:a.cachePool),a===null?Do():Eo(t,a),No(t);else return r=t.lanes=536870912,Rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ka(t,null),Do(),Po()):(Ka(t,a.cachePool),Eo(t,a),Po(),t.memoizedState=null);return Mc(e,t,i,n),t.child}function Lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rc(e,t,n,r,i){var a=Ga();return a=a===null?null:{parent:Aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ka(t,null),Do(),No(t),e!==null&&V(e,t,r,!0),t.childLanes=i,null}function zc(e,t){return t=Qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bc(e,t,n){return lo(t,e.child,null,n),e=zc(t,t.pendingProps),e.flags|=2,U(t),t.memoizedState=null,e}function Vc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(z){if(r.mode===`hidden`)return e=zc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Lc(null,e);if(Mo(t),(e=aa)?(e=am(e,sa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=536870912,null}return zc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Mo(t),a){if(t.flags&256)t.flags&=-257,t=Bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(jc||V(e,t,n,!1),a=(n&e.childLanes)!==0,jc||a){if(wo.current===null){if(r=Xu,r!==null&&(s=_t(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Oi(e,s),Md(r,e,s),Ac;Wd()}t=Bc(e,t,n)}else e=o.treeContext,aa=lm(s.nextSibling),ia=t,z=!0,oa=null,sa=!1,e!==null&&ra(t,e),t=zc(t,r),t.flags|=134221824;return t}return e=Fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Uc(e,t,n,r,i){return Ca(t),n=Zo(e,t,n,r,void 0,i),r=ts(),e!==null&&!jc?(ns(e,t,i),sl(e,t,i)):(z&&r&&ta(t),t.flags|=1,Mc(e,t,n,i),t.child)}function Wc(e,t,n,r,i,a){return Ca(t),t.updateQueue=null,n=$o(t,r,n,i),Qo(e),r=ts(),e!==null&&!jc?(ns(e,t,a),sl(e,t,a)):(z&&r&&ta(t),t.flags|=1,Mc(e,t,n,a),t.child)}function Gc(e,t,n,r,i){if(Ca(t),t.stateNode===null){var a=ji,o=n.contextType;typeof o==`object`&&o&&(a=wa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=_c,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},po(t),o=n.contextType,a.context=typeof o==`object`&&o?wa(o):ji,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(gc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&_c.enqueueReplaceState(a,a.state,null),xo(t,r,a,i),bo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=bc(n,s);a.props=c;var l=a.context,u=n.contextType;o=ji,typeof u==`object`&&u&&(o=wa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&yc(t,a,r,o),fo=!1;var f=t.memoizedState;a.state=f,xo(t,r,a,i),bo(),l=t.memoizedState,s||f!==l||fo?(typeof d==`function`&&(gc(t,n,d,r),l=t.memoizedState),(c=fo||vc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,mo(e,t),o=t.memoizedProps,u=bc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ji,typeof l==`object`&&l&&(c=wa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&yc(t,a,r,c),fo=!1,f=t.memoizedState,a.state=f,xo(t,r,a,i),bo();var p=t.memoizedState;o!==d||f!==p||fo||e!==null&&e.dependencies!==null&&Sa(e.dependencies)?(typeof s==`function`&&(gc(t,n,s,r),p=t.memoizedState),(u=fo||vc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Sa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Hc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=lo(t,e.child,null,i),t.child=lo(t,null,n,i)):Mc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=sl(e,t,i),e}function Kc(e,t,n,r){return pa(),t.flags|=256,Mc(e,t,n,r),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:qa()}}function Yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=sd),e}function Xc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Fo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(z){if(i?jo(t):Po(),(e=aa)?(e=am(e,sa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=sm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Po(),i=t.mode,a=Qc({mode:`hidden`,children:a},i),r=Ri(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Jc(n),r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(null,r)):(jo(t),Zc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return el(e,t,a,o,r,c,s,n)}return i?(Po(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Fi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ri(i,a,n,null),i.flags|=2):i=Fi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Lc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Jc(n):(a=i.cachePool,a===null?a=qa():(s=Aa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(e.child,r)):(jo(t),n=e.child,e=n.sibling,n=Fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Zc(e,t){return t=Qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Qc(e,t){return e=Ni(22,e,null,t),e.lanes=0,e}function $c(e,t,n){return lo(t,e.child,null,n),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function el(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(jo(t),t.flags&=-257,$c(e,t,c)):t.memoizedState===null?(Po(),o=a.fallback,s=t.mode,a=Qc({mode:`visible`,children:a.children},s),o=Ri(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,lo(t,e.child,null,c),a=t.child,a.memoizedState=Jc(c),a.childLanes=Yc(e,r,c),t.memoizedState=qc,Lc(null,a)):(Po(),t.child=e.child,t.flags|=128,null);if(jo(t),sm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ha({value:a,source:null,stack:null})),$c(e,t,c)}if(jc||V(e,t,c,!1),r=(c&e.childLanes)!==0,jc||r){if(wo.current!==null)return $c(e,t,c);if(r=Xu,r!==null&&(a=_t(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Oi(e,a),Md(r,e,a),Ac;return om(o)||Wd(),$c(e,t,c)}return om(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,aa=lm(o.nextSibling),ia=t,z=!0,oa=null,sa=!1,e!==null&&ra(t,e),t=Zc(t,a.children),t.flags|=134221824,t)}function tl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ba(e.return,t,n)}function nl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Ro(n)===null&&(t=e),e=e.sibling}return t}function rl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function il(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function al(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Fo.current;if(t.flags&128)return Io(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Io(t,o),i===`backwards`&&e!==null?(il(e),Mc(e,t,r,n),il(e)):Mc(e,t,r,n),r=z?qi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tl(e,n,t);else if(e.tag===19)tl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,il(t)),rl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rl(t,!0,n,null,a,r);break;case`together`:rl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rl(t,!1,i,n,a,r)}return t.child}function ol(e,t,n){var r=t.pendingProps;return va(t,t.type,r.value),Mc(e,t,r.children,n),t.child}function sl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),id|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(V(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Sa(e)))}function ll(e,t,n){switch(t.tag){case 3:Ee(t,t.stateNode.containerInfo),va(t,Aa,e.memoizedState.cache),pa();break;case 27:case 5:Oe(t);break;case 4:Ee(t,t.stateNode.containerInfo);break;case 10:va(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return jo(t),t.flags|=128,null;r=V(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Xc(e,t,n):(jo(t),e=sl(e,t,n),e===null?null:e.sibling)}jo(t);break;case 19:if(t.flags&128)return al(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(V(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return al(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Io(t,Fo.current),r)break;return null;case 22:return t.lanes=0,Ic(e,t,n,t.pendingProps);case 24:va(t,Aa,e.memoizedState.cache)}return sl(e,t,n)}function ul(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)jc=!0;else{if(!cl(e,n)&&!(t.flags&128))return jc=!1,ll(e,t,n);jc=!!(e.flags&131072)}}else jc=!1,z&&t.flags&1048576&&ea(t,qi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=eo(t.elementType),t.type=e,typeof e==`function`)Pi(e)?(r=bc(e,r),t.tag=1,t=Gc(null,t,e,r,n)):(t.tag=0,t=Uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ae){t.tag=11,t=Nc(null,t,e,r,n);break a}if(a===ce){t.tag=14,t=Pc(null,t,e,r,n);break a}if(a===ie){t.tag=10,t.type=e,t=ol(null,t,n);break a}}throw t=ge(e)||e,Error(i(306,t,``))}}return t;case 0:return Uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=bc(r,t.pendingProps),Gc(e,t,r,a,n);case 3:a:{if(Ee(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,mo(e,t),xo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,va(t,Aa,r),r!==o.cache&&xa(t,[Aa],n,!0),bo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Kc(e,t,r,n);break a}if(r!==a){a=Ui(Error(i(424)),t),ha(a),t=Kc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(aa=lm(e.firstChild),ia=t,z=!0,oa=null,sa=!0,n=uo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(pa(),r===a){t=sl(e,t,n);break a}Mc(e,t,r,n)}t=t.child}return t;case 26:return Hc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:z||(t.stateNode=fp(t.type,t.pendingProps,we.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Oe(t),e===null&&z&&(r=t.stateNode=hm(t.type,t.pendingProps,we.current),ia=t,sa=!0,a=aa,Sp(t.type)?(um=a,aa=lm(r.firstChild)):aa=a),Mc(e,t,t.pendingProps.children,n),Hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&z&&((a=r=aa)&&(r=rm(r,t.type,t.pendingProps,sa),r===null?a=!1:(t.stateNode=r,ia=t,aa=lm(r.firstChild),sa=!1,a=!0)),a||la(t)),Oe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,pp(a,o)?r=null:s!==null&&pp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Zo(e,t,es,null,null,n),sh._currentValue=a),Hc(e,t),Mc(e,t,r,n),t.child;case 6:return e===null&&z&&((e=n=aa)&&(n=im(n,t.pendingProps,sa),n===null?e=!1:(t.stateNode=n,ia=t,aa=null,e=!0)),e||la(t)),null;case 13:return Xc(e,t,n);case 4:return Ee(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):Mc(e,t,r,n),t.child;case 11:return Nc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Hc(e,t),Mc(e,t,r,n),t.child;case 8:return Mc(e,t,t.pendingProps.children,n),t.child;case 12:return Mc(e,t,t.pendingProps.children,n),t.child;case 10:return ol(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ca(t),a=wa(a),r=r(a),t.flags|=1,Mc(e,t,r,n),t.child;case 14:return Pc(e,t,t.type,t.pendingProps,n);case 15:return Fc(e,t,t.type,t.pendingProps,n);case 19:return al(e,t,n);case 31:return Vc(e,t,n);case 22:return Ic(e,t,n,t.pendingProps);case 24:return Ca(t),r=wa(Aa),e===null?(a=Ga(),a===null&&(a=Xu,o=ja(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},po(t),va(t,Aa,a)):((e.lanes&n)!==0&&(mo(e,t),xo(t,null,null,n),bo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,va(t,Aa,r),r!==a.cache&&xa(t,[Aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),va(t,Aa,r))),Mc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:z&&ta(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Hc(e,t),Mc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function dl(e){e.flags|=4}function fl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Vd())e.flags|=8192;else throw to=Za,Ya}}else e.flags&=-16777217}function pl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Vd())e.flags|=8192;else throw to=Za,Ya}}function ml(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:dt(),e.lanes|=t,cd|=t)}function hl(e,t){if(!z)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function gl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function _l(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gl(t),null;case 1:return gl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ya(Aa),De(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(fa(t)?dl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ma())),gl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(dl(t),o===null?(gl(t),fl(t,a,null,r,n)):(gl(t),pl(t,o))):o?o===e.memoizedState?(gl(t),t.flags&=-16777217):(dl(t),gl(t),pl(t,o)):(e=e.memoizedProps,e!==r&&dl(t),gl(t),fl(t,a,e,r,n)),null;case 27:if(ke(t),n=we.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}e=Se.current,fa(t)?ua(t,e):(e=hm(a,r,n),t.stateNode=e,dl(t))}return gl(t),t.subtreeFlags&=-33554433,null;case 5:if(ke(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}if(o=Se.current,fa(t))ua(t,o);else{var s=lp(we.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ct]=t,o[wt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&dl(t)}}return gl(t),t.subtreeFlags&=-33554433,fl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=we.current,fa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ia,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||$f(e.nodeValue,n)),e||la(t,!0)}else e=lp(e).createTextNode(r),e[Ct]=t,t.stateNode=e}return gl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=fa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ct]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),e=!1}else n=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(U(t),t):(U(t),null);if(t.flags&128)throw Error(i(558))}return gl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=fa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ct]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),a=!1}else a=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(U(t),t):(U(t),null)}return U(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ml(t,t.updateQueue),gl(t),null);case 4:return De(),e===null&&Uf(t.stateNode.containerInfo),t.flags|=67108864,gl(t),null;case 10:return ya(t.type),gl(t),null;case 19:if(Lo(t),r=t.memoizedState,r===null)return gl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)hl(r,!1);else{if(rd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ro(e),o!==null){for(t.flags|=128,hl(r,!1),e=o.updateQueue,t.updateQueue=e,ml(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ii(n,e),n=n.sibling;return Io(t,Fo.current&1|2),z&&$i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&He()>md&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ml(t,e),hl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!z)return gl(t),null}else 2*He()-r.renderingStartTime>md&&n!==536870912&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=He(),e.sibling=null,o=Fo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||z?Io(t,o):(n=o,I(ko,t),I(Fo,n),Ao===null&&(Ao=t)),z&&$i(t,r.treeForkCount),e}return gl(t),null;case 22:case 23:return U(t),Oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(gl(t),t.subtreeFlags&6&&(t.flags|=8192)):gl(t),n=t.updateQueue,n!==null&&ml(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&xe(Wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ya(Aa),gl(t),null;case 25:return null;case 30:return t.flags|=33554432,gl(t),null}throw Error(i(156,t.tag))}function vl(e,t){switch(na(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ya(Aa),De(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ke(t),null;case 31:if(t.memoizedState!==null){if(U(t),t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(U(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return De(),null;case 10:return ya(t.type),null;case 22:case 23:return U(t),Oo(),e!==null&&xe(Wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(Aa),null;case 25:return null;default:return null}}function yl(e,t){switch(na(t),t.tag){case 3:ya(Aa),De();break;case 26:case 27:case 5:ke(t);break;case 4:De();break;case 31:t.memoizedState!==null&&U(t);break;case 13:U(t);break;case 19:Lo(t);break;case 10:ya(t.type);break;case 22:case 23:U(t),Oo(),e!==null&&xe(Wa);break;case 24:ya(Aa)}}function bl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ff(t,t.return,e)}}function K(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ff(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ff(t,t.return,e)}}function xl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Co(t,n)}catch(t){ff(e,e.return,t)}}}function q(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ff(e,t,n)}}function Sl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=vi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);h(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ff(e,t,n)}}function J(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ff(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ff(e,t,n)}else n.current=null}}function Cl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)em(e.stateNode,t[n])}function wl(e){for(var t=e.return;t!==null&&(Dl(t)&&em(e.stateNode,t.stateNode),!El(t));)t=t.return}function Tl(e){for(var t=e.return;t!==null&&(Dl(t)&&tm(e.stateNode,t.stateNode),!El(t));)t=t.return}function El(e){return e.tag===5||e.tag===3||e.tag===27}function Dl(e){return e&&e.tag===7&&e.stateNode!==null}function Ol(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ff(e,e.return,t)}}function kl(e,t,n){try{var r=e.stateNode;ip(r,e.type,n,t),r[wt]=t}catch(t){ff(e,e.return,t)}}function Al(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sp(e.type)||e.tag===4}function jl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Sp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ml(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yn)),Cl(e,r),R=!0;else if(i!==4&&(i===27&&(Cl(e,r),r=null,Sp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Ml(e,t,n,r),e=e.sibling;e!==null;)Ml(e,t,n,r),e=e.sibling}function Nl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Cl(e,r),R=!0;else if(i!==4&&(i===27&&(Cl(e,r),r=null,Sp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Nl(e,t,n,r),e=e.sibling;e!==null;)Nl(e,t,n,r),e=e.sibling}function Pl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);np(t,r,n),t[Ct]=e,t[wt]=n}catch(t){ff(e,e.return,t)}}var Fl=!1,Il=null;function Ll(e){(e.tag===30||e.subtreeFlags&33554432)&&(Fl=!0)}var Rl=null;function zl(){var e=Rl;return Rl=null,e}var Bl=0;function Vl(e,t,n,r,i){return Bl=0,Hl(e.child,t,n,r,i)}function Hl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Op(o);r.push(s),s.view&&(a=!0)}else a||Op(o).view&&(a=!0);Fl=!0,Tp(o,Bl===0?t:t+`_`+Bl,n),Bl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Hl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Ul(e,t){for(;e!==null;)e.tag===5?Ep(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Ul(e.child,t)),e=e.sibling}function Wl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Wl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=bi(t.default,t.share),t!==`none`&&(Vl(e,n,t,null,!1)||Ul(e.child,!1))}e=e.sibling}}function Gl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=vi(r,n),a=bi(r.default,n.paired?r.share:r.enter);a===`none`?Wl(e):Vl(e,i,a,null,!1)?(Wl(e),n.paired||t||jd(e,r.onEnter)):Ul(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Gl(e,t),e=e.sibling;else Wl(e)}function Kl(e){if(Il!==null&&Il.size!==0){var t=Il;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=bi(n.default,n.share);if(a!==`none`&&(Vl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,jd(e,n.onShare)):Ul(e.child,!1)),t.delete(r),t.size===0)break}}}Kl(e)}e=e.sibling}}}function ql(e){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode),r=Il===null?void 0:Il.get(n),i=bi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Vl(e,n,i,null,!1)?r===void 0?jd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Il.delete(n),jd(e,t.onShare)):Ul(e.child,!1)),Il!==null&&Kl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ql(e),e=e.sibling;else Il!==null&&Kl(e)}function Jl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode);t=bi(t.default,t.update),e.flags&=-5,t!==`none`&&Vl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Jl(e);e=e.sibling}}function Yl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Ul(e.child,!1))}Yl(e)}e=e.sibling}}function Xl(e){if(e.tag===30)e.stateNode.paired=null,Ul(e.child,!1),Yl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e),e=e.sibling;else Yl(e)}function Zl(e){for(e=e.child;e!==null;)e.tag===30?Ul(e.child,!1):e.subtreeFlags&33554432&&Zl(e),e=e.sibling}function Ql(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Bl<a.length){var l=a[Bl],u=Op(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Tp(c,Bl===0?n:n+`_`+Bl,i),s&&e.flags&4||(Rl===null&&(Rl=[]),Rl.push(c,Bl===0?r:r+`_`+Bl,t.memoizedProps)),Bl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Ql(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function $l(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=vi(n,r),a=bi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(kp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Bl=0,i=Ql(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||jd(e,n.onUpdate))}else e.subtreeFlags&33554432&&$l(e,t);e=e.sibling}}var eu=!1,Y=!1,tu=!1,nu=!1,ru=typeof WeakSet==`function`?WeakSet:Set,iu=null,au=!1,ou=!1,su=!1,cu=!1;function lu(e,t,n){if(e=e.containerInfo,sp=gh,e=Jr(e),Yr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(cp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,iu=t,t=n?9270:1024;iu!==null;){if(e=iu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&ql(r[a]);if(e.alternate===null&&e.flags&2)n&&Ll(e),uu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&ql(r),uu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Ll(e),uu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,iu=r):(n&&Jl(e),uu(n))}}Il=null}function uu(e){for(;iu!==null;){var t=iu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=bc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){ff(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)nm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:nm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=vi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=bi(a.default,a.update),a!==`none`&&Vl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,iu=r;break}iu=t.return}}function du(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ju(e,n),r&4&&bl(5,n);break;case 1:if(ju(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ff(n,n.return,e)}else{var i=bc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ff(n,n.return,e)}}}r&64&&xl(n),r&512&&Sl(n,n.return);break;case 3:if(ju(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Co(e,t)}catch(e){ff(n,n.return,e)}}break;case 27:t===null&&r&4&&Pl(n);case 26:case 5:ju(e,n),t===null&&r&4&&Ol(n),r&512&&Sl(n,n.return);break;case 12:ju(e,n);break;case 31:ju(e,n),r&4&&bu(e,n);break;case 13:ju(e,n),r&4&&xu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=gf.bind(null,n),cm(e,n))));break;case 22:if(r=n.memoizedState!==null||eu,!r){var a=t!==null&&t.memoizedState!==null||Y;t=eu,i=Y,eu=r,(Y=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Nu(e,n,r)):ju(e,n),eu=t,Y=i}break;case 30:ju(e,n),r&512&&Sl(n,n.return);break;case 7:r&512&&Sl(n,n.return);default:ju(e,n)}}function fu(e,t){for(e=e.child;e!==null;)pu(e,t),e=e.sibling}function pu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){ff(e,e.return,t)}mu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,R=!0}catch(t){ff(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?wp(s,!0):wp(e.stateNode,!1)}catch(t){ff(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&fu(e,t);break;default:fu(e,t)}}function mu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:pu(n,r);break a;case 22:n.memoizedState===null&&mu(n,r);break a;default:mu(n,r)}}e=e.sibling}}function hu(e){var t=e.alternate;t!==null&&(e.alternate=null,hu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Mt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var gu=null,_u=!1;function vu(e,t,n){for(n=n.child;n!==null;)yu(e,t,n),n=n.sibling}function yu(e,t,n){if(Qe&&typeof Qe.onCommitFiberUnmount==`function`)try{Qe.onCommitFiberUnmount(Ze,n)}catch{}switch(n.tag){case 26:Y||J(n,t),vu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Y&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Y||J(n,t),Tl(n);var r=gu,i=_u;Sp(n.type)&&(gu=n.stateNode,_u=!1),vu(e,t,n),gm(n.stateNode,n.type,n.memoizedProps),gu=r,_u=i;break;case 5:Y||J(n,t),Tl(n);case 6:if(n.tag===6&&Tl(n),r=gu,i=_u,gu=null,vu(e,t,n),gu=r,_u=i,gu!==null){if(_u)try{(gu.nodeType===9?gu.body:gu.nodeName===`HTML`?gu.ownerDocument.body:gu).removeChild(n.stateNode),R=!0}catch(e){ff(n,t,e)}else try{gu.removeChild(n.stateNode),R=!0}catch(e){ff(n,t,e)}}break;case 18:gu!==null&&(_u?(e=gu,Cp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Cp(gu,n.stateNode));break;case 4:r=gu,i=_u,gu=n.stateNode.containerInfo,_u=!0,vu(e,t,n),gu=r,_u=i;break;case 0:case 11:case 14:case 15:K(2,n,t),Y||K(4,n,t),vu(e,t,n);break;case 1:Y||(J(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&q(n,t,r)),vu(e,t,n);break;case 21:vu(e,t,n);break;case 22:Y=(r=Y)||n.memoizedState!==null,vu(e,t,n),Y=r;break;case 30:J(n,t),vu(e,t,n);break;case 7:Y||J(n,t),vu(e,t,n);break;default:vu(e,t,n)}}function bu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){ff(t,t.return,e)}}}function xu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){ff(t,t.return,e)}}function Su(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ru),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ru),t;default:throw Error(i(435,e.tag))}}function Cu(e,t){var n=Su(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=_f.bind(null,e,t);t.then(r,r)}})}function wu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Sp(l.type)){gu=l.stateNode,_u=!1;break a}break;case 5:gu=l.stateNode,_u=!1;break a;case 3:case 4:gu=l.stateNode.containerInfo,_u=!0;break a}l=l.return}if(gu===null)throw Error(i(160));yu(s,c,o),gu=null,_u=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Eu(t,e,n),t=t.sibling}var Tu=null;function Eu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}wu(t,e,n),Du(e),a&4&&(K(3,e,e.return),bl(3,e),K(5,e,e.return));break;case 1:wu(t,e,n),Du(e),a&512&&(Y||r===null||J(r,r.return)),a&64&&eu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Tu,wu(t,e,n),Du(e),a&512&&(Y||r===null||J(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(eu)e.stateNode=fp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[At]||r[Ct]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),np(r,t,n),r[Ct]=e,Lt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Gm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),np(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Ct]=e,Lt(r),t=r}e.stateNode=t}}else eu||Km(o,e.type,e.stateNode)}else e.stateNode=Bm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&kl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||Y||t.parentNode.removeChild(t)):a.count--,n===null?eu||Km(o,e.type,e.stateNode):Bm(o,n,e.memoizedProps))}break;case 27:wu(t,e,n),Du(e),a&512&&(Y||r===null||J(r,r.return)),r!==null&&a&4&&kl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=tu,tu=!1,wu(t,e,n),tu=o,Du(e),a&512&&(Y||r===null||J(r,r.return)),e.flags&32){t=e.stateNode;try{dn(t,``),R=!0}catch(t){ff(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,kl(e,t,r===null?t:r.memoizedProps)),a&1024&&(nu=!0);break;case 6:if(wu(t,e,n),Du(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,R=!0}catch(t){ff(e,e.return,t)}}break;case 3:if(R=!1,Wm=null,o=Tu,Tu=bm(t.containerInfo),wu(t,e,n),Tu=o,Du(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){ff(e,e.return,t)}nu&&(nu=!1,Ou(e)),R=!1;break;case 4:a=tu,tu=eu,r=qt(),o=Tu,Tu=bm(e.stateNode.containerInfo),wu(t,e,n),Du(e),Tu=o,R&&ou&&(su=!0),R=r,tu=a;break;case 12:wu(t,e,n),Du(e);break;case 31:wu(t,e,n),Du(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 13:wu(t,e,n),Du(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(fd=He()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=eu,l=Y,u=tu;eu=c||o,tu=u||o,Y=l||s,wu(t,e,n),Y=l,tu=u,eu=c,Du(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||eu||Y||(t=s||Y,n=eu,r=Y,eu=o||eu,Y=t,Mu(e,2),eu=n,Y=r),!o&&tu||fu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Cu(e,n))));break;case 19:wu(t,e,n),Du(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 30:a&512&&(Y||r===null||J(r,r.return)),a=qt(),o=ou,s=(n&335544064)===n,c=e.memoizedProps,ou=s&&bi(c.default,c.update)!==`none`,wu(t,e,n),Du(e),s&&r!==null&&R&&(e.flags|=4),ou=o,R=a;break;case 21:break;case 7:a&512&&(Y||r===null||J(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:wu(t,e,n),Du(e)}}function Du(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Al(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Dl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(El(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Nl(e,jl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(dn(l,``),n.flags&=-33),Nl(e,jl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Ml(e,jl(e),u,s);break;default:throw Error(i(161))}}catch(t){ff(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ou(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ou(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function ku(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Au(t,e),t=t.sibling;else $l(t,!1)}function Au(e,t){var n=e.alternate;if(n===null)Gl(e,!1);else switch(e.tag){case 3:if(cu=au=!1,zl(),ku(t,e),!au&&!su){if(e=Rl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ep(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),cu=!0}Rl=null;break;case 5:ku(t,e);break;case 4:r=au,au=!1,ku(t,e),au&&(su=!0),au=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?ku(t,e):Gl(e,!1));break;case 30:r=au,i=zl(),au=!1,ku(t,e),au&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=vi(a,o),o=vi(n.memoizedProps,o);var s=bi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Bl=0,t=Ql(e,n,t,o,s,a,!0),Bl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(jd(e,e.memoizedProps.onUpdate),Rl=i):i!==null&&(i.push.apply(i,Rl),Rl=i),au=e.flags&32?!0:r;break;default:ku(t,e)}}function ju(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)du(e,t.alternate,t),t=t.sibling}function Mu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:K(4,n,n.return),Mu(n,r);break;case 1:J(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&q(n,n.return,i),Mu(n,r);break;case 27:r&2&&gm(n.stateNode,n.type,n.memoizedProps);case 5:J(n,n.return),n.tag!==5&&n.tag!==27||Tl(n),Mu(n,r);break;case 6:Tl(n);break;case 26:J(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||Y||i.parentNode.removeChild(i),Mu(n,r);break;case 22:n.memoizedState===null&&Mu(n,r);break;case 30:J(n,n.return),Mu(n,r);break;case 7:J(n,n.return);default:Mu(n,r)}e=e.sibling}}function Nu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Nu(i,a,n),bl(4,a);break;case 1:if(Nu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ff(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)So(l[i],c)}catch(e){ff(r,r.return,e)}}s&&o&64&&xl(a),Sl(a,a.return);break;case 27:n&2&&Pl(a);case 5:a.tag!==5&&a.tag!==27||wl(a),Nu(i,a,n),s&&r===null&&o&4&&Ol(a),Sl(a,a.return);break;case 6:wl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||eu||Km(bm(c.ownerDocument),a.type,c),Nu(i,a,n),s&&r===null&&o&4&&Ol(a),Sl(a,a.return);break;case 12:Nu(i,a,n);break;case 31:Nu(i,a,n),s&&o&4&&bu(i,a);break;case 13:Nu(i,a,n),s&&o&4&&xu(i,a);break;case 22:a.memoizedState===null&&Nu(i,a,n),Sl(a,a.return);break;case 30:Nu(i,a,n),Sl(a,a.return);break;case 7:Sl(a,a.return);default:Nu(i,a,n)}t=t.sibling}}function Pu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ma(n))}function Fu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ma(e))}function Iu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Lu(e,t,n,r),t=t.sibling;else i&&Zl(t)}function Lu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Xl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Iu(e,t,n,r),a&2048&&bl(9,t);break;case 1:Iu(e,t,n,r);break;case 3:Iu(e,t,n,r),i&&cu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ma(a)));break;case 12:if(a&2048){Iu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){ff(t,t.return,e)}}else Iu(e,t,n,r);break;case 31:Iu(e,t,n,r);break;case 13:Iu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Xl(t),o._visibility&2?Iu(e,t,n,r):(o._visibility|=2,Ru(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Xl(s),o._visibility&2?Iu(e,t,n,r):zu(e,t)),a&2048&&Pu(s,t);break;case 24:Iu(e,t,n,r),a&2048&&Fu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Ul(a.child,!0),Ul(t.child,!0))),Iu(e,t,n,r);break;default:Iu(e,t,n,r)}}function Ru(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ru(a,o,s,c,i),bl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ru(a,o,s,c,i)):u._visibility&2?Ru(a,o,s,c,i):zu(a,o),i&&l&2048&&Pu(o.alternate,o);break;case 24:Ru(a,o,s,c,i),i&&l&2048&&Fu(o.alternate,o);break;default:Ru(a,o,s,c,i)}t=t.sibling}}function zu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:zu(n,r),i&2048&&Pu(r.alternate,r);break;case 24:zu(n,r),i&2048&&Fu(r.alternate,r);break;default:zu(n,r)}t=t.sibling}}var Bu=8192;function Vu(e,t,n){if(e.subtreeFlags&Bu)for(e=e.child;e!==null;)Hu(e,t,n),e=e.sibling}function Hu(e,t,n){switch(e.tag){case 26:Vu(e,t,n),e.flags&Bu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,Tu,e.memoizedState,e.memoizedProps));break;case 5:Vu(e,t,n),e.flags&Bu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=Tu;Tu=bm(e.stateNode.containerInfo),Vu(e,t,n),Tu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Bu,Bu=16777216,Vu(e,t,n),Bu=r):Vu(e,t,n));break;case 30:if((e.flags&Bu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Il===null&&(Il=new Map),Il.set(r,i)}Vu(e,t,n);break;default:Vu(e,t,n)}}function Uu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Wu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];iu=r,qu(r,e)}Uu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gu(e),e=e.sibling}function Gu(e){switch(e.tag){case 0:case 11:case 15:Wu(e),e.flags&2048&&K(9,e,e.return);break;case 3:Wu(e);break;case 12:Wu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ku(e)):Wu(e);break;default:Wu(e)}}function Ku(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];iu=r,qu(r,e)}Uu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:K(8,t,t.return),Ku(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ku(t));break;default:Ku(t)}e=e.sibling}}function qu(e,t){for(;iu!==null;){var n=iu;switch(n.tag){case 0:case 11:case 15:K(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,iu=r;else a:for(n=e;iu!==null;){r=iu;var i=r.sibling,a=r.return;if(hu(r),r===n){iu=null;break a}if(i!==null){i.return=a,iu=i;break a}iu=a}}}var Ju={getCacheForType:function(e){var t=wa(Aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return wa(Aa).controller.signal}},Yu=typeof WeakMap==`function`?WeakMap:Map,X=0,Xu=null,Z=null,Q=0,Zu=0,Qu=null,$u=!1,ed=!1,td=!1,nd=0,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=null,ud=null,dd=!1,fd=0,pd=0,md=1/0,hd=null,gd=null,_d=0,vd=null,yd=null,bd=0,xd=0,Sd=null,Cd=null,wd=null,Td=null,Ed=null,Dd=0,Od=null;function kd(){return X&2&&Q!==0?Q&-Q:N.T===null?bt():Nf()}function Ad(){if(sd===0){if(!(Q&536870912)||z){var e=it;it<<=1,!(it&3932160)&&(it=262144),sd=e}else sd=536870912}return e=ko.current,e!==null&&(e.flags|=32),sd}function jd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Pp(vi(e.memoizedProps,n))),Td===null&&(Td=[]),Td.push(t.bind(null,r))}}function Md(e,t,n){(e===Xu&&(Zu===2||Zu===9)||e.cancelPendingCommit!==null)&&(zd(e,0),Id(e,Q,sd,!1)),pt(e,n),(!(X&2)||e!==Xu)&&(e===Xu&&(!(X&2)&&(ad|=n),rd===4&&Id(e,Q,sd,!1)),Tf(e))}function Nd(e,t,n){if(X&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ct(e,t),a=r?qd(e,t):Gd(e,t,!0),o=r;do{if(a===0){ed&&!r&&Id(e,t,0,!1);break}if(n=e.current.alternate,o&&!Fd(n)){a=Gd(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ld;var l=c.current.memoizedState.isDehydrated;if(l&&(zd(c,s).flags|=256),s=Gd(c,s,!1),s!==2&&s!==6){if(td&&!l){c.errorRecoveryDisabledLanes|=o,ad|=o,a=4;break a}o=ud,ud=a,o!==null&&(ud===null?ud=o:ud.push.apply(ud,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){zd(e,0),Id(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Id(r,t,sd,!$u);break a;case 2:ud=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=fd+300-He(),10<a)){if(Id(r,t,sd,!$u),st(r,0,!0)!==0)break a;bd=t,r.timeoutHandle=gp(Pd.bind(null,r,n,ud,hd,dd,t,sd,ad,cd,$u,o,`Throttled`,-0,0),a);break a}Pd(r,n,ud,hd,dd,t,sd,ad,cd,$u,o,null,-0,0)}break}while(1);Tf(e)}function Pd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yn},Il=null,Hu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?fd-He():(a&4194048)===a?pd-He():0,m=eh(d,m),m!==null)){bd=a,e.cancelPendingCommit=m(ef.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Id(e,a,o,!l);return}ef(e,t,a,n,r,i,o,s,c,l,u,d)}function Fd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Hr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Id(e,t,n,r){t=lt(e,t),t&=~od,t&=~ad,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-et(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ht(e,n,t)}function Ld(){return X&6?!0:(Ef(0,!1),!1)}function Rd(){if(Z!==null){if(Zu===0)var e=Z.return;else e=Z,_a=B=null,rs(e),io=null,H=0,e=Z;for(;e!==null;)yl(e.alternate,e),e=e.return;Z=null}}function zd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_p(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),bd=0,Rd(),Xu=e,Z=n=Fi(e.current,null),Q=t,Zu=0,Qu=null,$u=!1,ed=ct(e,t),td=!1,cd=sd=od=ad=id=rd=0,ud=ld=null,dd=!1,nd=lt(e,t),Ti(),n}function Bd(e,t){W=null,N.H=fc,t===Ja||t===Xa?(t=no(),Zu=3):t===Ya?(t=no(),Zu=4):Zu=t===Ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Qu=t,Z===null&&(rd=1,wc(e,Ui(t,e.current)))}function Vd(){var e=ko.current;return e===null?!0:(Q&4194048)===Q?Ao===null:(Q&62914560)===Q||Q&536870912?e===Ao:!1}function Hd(){var e=N.H;return N.H=fc,e===null?fc:e}function Ud(){var e=N.A;return N.A=Ju,e}function Wd(){rd=4,$u||(Q&4194048)!==Q&&ko.current!==null||(ed=!0),!(id&134217727)&&!(ad&134217727)||Xu===null||Id(Xu,Q,sd,!1)}function Gd(e,t,n){var r=X;X|=2;var i=Hd(),a=Ud();(Xu!==e||Q!==t)&&(hd=null,zd(e,t)),t=!1;var o=rd;a:do try{if(Zu!==0&&Z!==null){var s=Z,c=Qu;switch(Zu){case 8:Rd(),o=6;break a;case 3:case 2:case 9:case 6:ko.current===null&&(t=!0);var l=Zu;if(Zu=0,Qu=null,Zd(e,s,c,l),n&&ed){o=0;break a}break;default:l=Zu,Zu=0,Qu=null,Zd(e,s,c,l)}}Kd(),o=rd;break}catch(t){Bd(e,t)}while(1);return t&&e.shellSuspendCounter++,_a=B=null,X=r,N.H=i,N.A=a,Z===null&&(Xu=null,Q=0,Ti()),o}function Kd(){for(;Z!==null;)Yd(Z)}function qd(e,t){var n=X;X|=2;var r=Hd(),a=Ud();Xu!==e||Q!==t?(hd=null,md=He()+500,zd(e,t)):ed=ct(e,t);a:do try{if(Zu!==0&&Z!==null){t=Z;var o=Qu;b:switch(Zu){case 1:Zu=0,Qu=null,Zd(e,t,o,1);break;case 2:case 9:if(Qa(o)){Zu=0,Qu=null,Xd(t);break}t=function(){Zu!==2&&Zu!==9||Xu!==e||(Zu=7),Tf(e)},o.then(t,t);break a;case 3:Zu=7;break a;case 4:Zu=5;break a;case 7:Qa(o)?(Zu=0,Qu=null,Xd(t)):(Zu=0,Qu=null,Zd(e,t,o,7));break;case 5:var s=null;switch(Z.tag){case 26:s=Z.memoizedState;case 5:case 27:var c=Z;if(s?Ym(s):c.stateNode.complete){Zu=0,Qu=null;var l=c.sibling;if(l!==null)Z=l;else{var u=c.return;u===null?Z=null:(Z=u,Qd(u))}break b}}Zu=0,Qu=null,Zd(e,t,o,5);break;case 6:Zu=0,Qu=null,Zd(e,t,o,6);break;case 8:Rd(),rd=6;break a;default:throw Error(i(462))}}Jd();break}catch(t){Bd(e,t)}while(1);return _a=B=null,N.H=r,N.A=a,X=n,Z===null?(Xu=null,Q=0,Ti(),rd):0}function Jd(){for(;Z!==null&&!Be();)Yd(Z)}function Yd(e){var t=ul(e.alternate,e,nd);e.memoizedProps=e.pendingProps,t===null?Qd(e):Z=t}function Xd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wc(n,t,t.pendingProps,t.type,void 0,Q);break;case 11:t=Wc(n,t,t.pendingProps,t.type.render,t.ref,Q);break;case 5:rs(t);var r=t;r===ia&&(z?(da(r),r.tag===5&&r.stateNode!=null&&(aa=r.stateNode)):(da(r),z=!0));default:yl(n,t),t=Z=Ii(t,nd),t=ul(n,t,nd)}e.memoizedProps=e.pendingProps,t===null?Qd(e):Z=t}function Zd(e,t,n,r){_a=B=null,rs(t),io=null,H=0;var i=t.return;try{if(kc(e,i,t,n,Q)){rd=1,wc(e,Ui(n,e.current)),Z=null;return}}catch(t){if(i!==null)throw Z=i,t;rd=1,wc(e,Ui(n,e.current)),Z=null;return}t.flags&32768?(z||r===1?e=!0:ed||Q&536870912?e=!1:($u=e=!0,(r===2||r===9||r===3||r===6)&&(r=ko.current,r!==null&&r.tag===13&&(r.flags|=16384))),$d(t,e)):Qd(t)}function Qd(e){var t=e;do{if(t.flags&32768){$d(t,$u);return}e=t.return;var n=_l(t.alternate,t,nd);if(n!==null){Z=n;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);rd===0&&(rd=5)}function $d(e,t){do{var n=vl(e.alternate,e);if(n!==null){n.flags&=32767,Z=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Z=e;return}Z=e=n}while(e!==null);rd=6,Z=null}function ef(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do lf();while(_d!==0);if(X&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Xu&&(Z=Xu=null,Q=0),yd=t,vd=e,bd=n,Sd=a,Cd=r,tf(e,t,n,s,c,l,f)}}function tf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(xd=s,s|=wi,mt(e,n,s,r,i,a),Td=null,(n&335544064)===n?(Ed=Fa(e),r=10262):(Ed=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,vf(Ke,function(){return uf(),null})):(e.callbackNode=null,e.callbackPriority=0),Fl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=N.T,N.T=null,i=P.p,P.p=2,a=X,X|=4;try{lu(e,t,n)}finally{X=a,P.p=i,N.T=r}}_d=1,Fl?wd=Mp(o,e.containerInfo,Ed,af,of,rf,sf,uf,nf,null,null):(af(),of(),sf())}function nf(e){if(_d!==0){var t=vd.onRecoverableError;t(e,{componentStack:null})}}function rf(){_d===3&&(_d=0,Au(yd,vd),_d=4)}function af(){if(_d===1){_d=0;var e=vd,t=yd,n=bd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=N.T,N.T=null;var i=P.p;P.p=2;var a=X;X|=4;try{ou=su=!1,Eu(t,e,n),n=cp;var o=Jr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&qr(s.ownerDocument.documentElement,s)){if(c!==null&&Yr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Kr(s,h),v=Kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!sp,cp=sp=null}finally{X=a,P.p=i,N.T=r}}e.current=t,_d=2}}function of(){if(_d===2){_d=0;var e=vd,t=yd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=X;X|=4;try{du(e,t.alternate,t)}finally{X=i,P.p=r,N.T=n}}_d=3}}function sf(){if(_d===4||_d===3){_d=0;var e=wd;wd=null,Ve();var t=vd,n=yd,r=bd,i=Cd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?_d=5:(_d=0,yd=vd=null,cf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(gd=null),yt(r),n=n.stateNode,Qe&&typeof Qe.onCommitFiberRoot==`function`)try{Qe.onCommitFiberRoot(Ze,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=N.T,a=P.p,P.p=2,N.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{N.T=n,P.p=a}}if(i=Td,o=Ed,Ed=null,i!==null&&(Td=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);bd&3&&lf(),Tf(t),a=t.pendingLanes,r&261930&&a&42?t===Od?Dd++:(Dd=0,Od=t):(Dd=0,Od=null),Ef(0,!1)}}function cf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ma(t)))}function lf(){return wd!==null&&(wd.skipTransition(),wd=null),af(),of(),sf(),uf()}function uf(){if(_d!==5)return!1;var e=vd,t=xd;xd=0;var n=yt(bd),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=Sd,Sd=null;var o=vd,s=bd;if(_d=0,yd=vd=null,bd=0,X&6)throw Error(i(331));var c=X;if(X|=4,Gu(o.current),Lu(o,o.current,s,n),X=c,Ef(0,!1),Qe&&typeof Qe.onPostCommitFiberRoot==`function`)try{Qe.onPostCommitFiberRoot(Ze,o)}catch{}return!0}finally{P.p=a,N.T=r,cf(e,t)}}function df(e,t,n){t=Ui(n,t),t=Ec(e.stateNode,t,2),e=go(e,t,2),e!==null&&(pt(e,2),Tf(e))}function ff(e,t,n){if(e.tag===3)df(e,e,n);else for(;t!==null;){if(t.tag===3){df(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gd===null||!gd.has(r))){e=Ui(n,e),n=Dc(2),r=go(t,n,2),r!==null&&(Oc(n,r,t,e),pt(r,2),Tf(r));break}}t=t.return}}function pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Yu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(td=!0,i.add(n),e=mf.bind(null,e,t,n),t.then(e,e))}function mf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Xu===e&&(Q&n)===n&&(rd===4||rd===3&&(Q&62914560)===Q&&300>He()-fd?X&2?od|=n:zd(e,0):od|=n,cd===Q&&(cd=0)),Tf(e)}function hf(e,t){t===0&&(t=dt()),e=Oi(e,t),e!==null&&(pt(e,t),Tf(e))}function gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hf(e,n)}function _f(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),hf(e,n)}function vf(e,t){return Re(e,t)}var yf=null,bf=null,xf=!1,Sf=!1,Cf=!1,wf=0;function Tf(e){e!==bf&&e.next===null&&(bf===null?yf=bf=e:bf=bf.next=e),Sf=!0,xf||(xf=!0,Mf())}function Ef(e,t){if(!Cf&&Sf){Cf=!0;do for(var n=!1,r=yf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-et(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,jf(r,a))}else a=Q,a=st(r,r===Xu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ct(r,a)||(n=!0,jf(r,a))}r=r.next}while(n);Cf=!1}}function Df(){Of()}function Of(){Sf=xf=!1;var e=0;wf!==0&&hp()&&(e=wf);for(var t=He(),n=null,r=yf;r!==null;){var i=r.next,a=kf(r,t);a===0?(r.next=null,n===null?yf=i:n.next=i,i===null&&(bf=n)):(n=r,(e!==0||a&3)&&(Sf=!0)),r=i}_d!==0&&_d!==5||Ef(e,!1),wf!==0&&(wf=0)}function kf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-et(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ut(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Xu,n=Q,n=st(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Zu===2||Zu===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ze(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ct(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ze(r),yt(n)){case 2:case 8:n=Ge;break;case 32:n=Ke;break;case 268435456:n=Je;break;default:n=Ke}return r=Af.bind(null,e),n=Re(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ze(r),e.callbackPriority=2,e.callbackNode=null,2}function Af(e,t){if(_d!==0&&_d!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(lf()&&e.callbackNode!==n)return null;var r=Q;return r=st(e,e===Xu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Nd(e,r,t),kf(e,He()),e.callbackNode!=null&&e.callbackNode===n?Af.bind(null,e):null)}function jf(e,t){if(lf())return null;Nd(e,t,!0)}function Mf(){bp(function(){X&6?Re(We,Df):Of()})}function Nf(){if(wf===0){var e=Ra;e===0&&(e=rt,rt<<=1,!(rt&261888)&&(rt=256)),wf=e}return wf}function Pf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:vn(e)}function Ff(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Pf((i[wt]||null).action),o=r.submitter;o&&(t=(t=o[wt]||null)?Pf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Bn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(wf!==0){var e=new FormData(i,o);Qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var If=0;If<hi.length;If++){var Lf=hi[If];gi(Lf.toLowerCase(),`on`+(Lf[0].toUpperCase()+Lf.slice(1)))}gi(si,`onAnimationEnd`),gi(ci,`onAnimationIteration`),gi(li,`onAnimationStart`),gi(`dblclick`,`onDoubleClick`),gi(`focusin`,`onFocus`),gi(`focusout`,`onBlur`),gi(ui,`onTransitionRun`),gi(di,`onTransitionStart`),gi(fi,`onTransitionCancel`),gi(pi,`onTransitionEnd`),Ht(`onMouseEnter`,[`mouseout`,`mouseover`]),Ht(`onMouseLeave`,[`mouseout`,`mouseover`]),Ht(`onPointerEnter`,[`pointerout`,`pointerover`]),Ht(`onPointerLeave`,[`pointerout`,`pointerover`]),Vt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Vt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Vt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Vt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Vt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Vt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Rf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),zf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Rf));function Bf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[Et];n===void 0&&(n=t[Et]=new Set);var r=e+`__bubble`;n.has(r)||(Wf(t,e,2,!1),n.add(r))}function Vf(e,t,n){var r=0;t&&(r|=4),Wf(n,e,r,t)}var Hf=`_reactListening`+Math.random().toString(36).slice(2);function Uf(e){if(!e[Hf]){e[Hf]=!0,zt.forEach(function(t){t!==`selectionchange`&&(zf.has(t)||Vf(t,!1,e),Vf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hf]||(t[Hf]=!0,Vf(`selectionchange`,!1,t))}}function Wf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!kn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Gf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Nt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}En(function(){var r=a,i=xn(n),s=[];a:{var c=mi.get(e);if(c!==void 0){var l=Bn,u=e;switch(e){case`keypress`:if(Fn(n)===0)break a;case`keydown`:case`keyup`:l=ir;break;case`focusin`:u=`focus`,l=Yn;break;case`focusout`:u=`blur`,l=Yn;break;case`beforeblur`:case`afterblur`:l=Yn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=qn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=sr;break;case si:case ci:case li:l=Xn;break;case pi:l=cr;break;case`scroll`:case`scrollend`:l=Hn;break;case`wheel`:l=lr;break;case`copy`:case`cut`:case`paste`:l=Zn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=ar;break;case`submit`:l=or;break;case`toggle`:case`beforetoggle`:l=ur}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Dn(m,p),g!=null&&d.push(Kf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==bn&&(u=n.relatedTarget||n.fromElement)&&(Nt(u)||u[Tt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Nt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=qn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=ar,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Ft(c),h=l==null?u:Ft(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Nt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Jf):null,c!==null&&Yf(s,u,c,d,!1),l!==null&&f!==null&&Yf(s,f,l,d,!0)))}a:{if(c=r?Ft(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Ar;else if(wr(c)){if(jr)_=Br;else{_=Rr;var v=Lr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&hn(r.elementType)&&(_=Ar):_=zr;if(_&&=_(e,r)){Tr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ft(r):window,e){case`focusin`:(wr(v)||v.contentEditable===`true`)&&(Zr=v,Qr=r,$r=null);break;case`focusout`:$r=Qr=Zr=null;break;case`mousedown`:ei=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ei=!1,ti(s,n,i);break;case`selectionchange`:if(Xr)break;case`keydown`:case`keyup`:ti(s,n,i)}var y;if(fr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else br?vr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(hr&&n.locale!==`ko`&&(br||b!==`onCompositionStart`?b===`onCompositionEnd`&&br&&(y=Pn()):(jn=i,Mn=`value`in jn?jn.value:jn.textContent,br=!0)),v=qf(r,b),0<v.length&&(b=new Qn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=yr(n),y!==null&&(b.data=y)))),(y=mr?xr(e,n):Sr(e,n))&&(b=qf(r,`onBeforeInput`),0<b.length&&(v=new Qn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Ff(s,e,r,n,i)}Bf(s,t)})}function Kf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Dn(e,n),i!=null&&r.unshift(Kf(e,i,a)),i=Dn(e,t),i!=null&&r.push(Kf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Jf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Dn(n,a),l!=null&&o.unshift(Kf(n,l,c))):i||(l=Dn(n,a),l!=null&&o.push(Kf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Xf=/\r\n?/g,Zf=/\u0000|\uFFFD/g;function Qf(e){return(typeof e==`string`?e:``+e).replace(Xf,`
9
+ `).replace(Zf,``)}function $f(e,t){return t=Qf(t),Qf(e)===t}function ep(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||dn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&dn(e,``+r);else return;break;case`className`:Yt(e,`class`,r);break;case`tabIndex`:Yt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Yt(e,n,r);break;case`style`:mn(e,r,o);return;case`data`:if(t!==`object`){Yt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=vn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ep(e,t,`name`,a.name,a,null),ep(e,t,`formEncType`,a.formEncType,a,null),ep(e,t,`formMethod`,a.formMethod,a,null),ep(e,t,`formTarget`,a.formTarget,a,null)):(ep(e,t,`encType`,a.encType,a,null),ep(e,t,`method`,a.method,a,null),ep(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=vn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=yn);return;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=vn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Jt(e,`popover`,r);break;case`xlinkActuate`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Jt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=gn.get(n)||n,Jt(e,n,r);else return}R=!0}function tp(e,t,n,r,a,o){switch(n){case`style`:mn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)dn(e,r);else if(typeof r==`number`||typeof r==`bigint`)dn(e,``+r);else return;break;case`onScroll`:r!=null&&$(`scroll`,e);return;case`onScrollEnd`:r!=null&&$(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=yn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Bt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[wt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}R=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Jt(e,n,r)}return}R=!0}function np(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ep(e,t,o,s,n,null)}}a&&ep(e,t,`srcSet`,n.srcSet,n,null),r&&ep(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:ep(e,t,r,d,n,null)}}on(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ep(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&cn(e,!!r,n,!0):cn(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:ep(e,t,s,c,n,null)}un(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ep(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<Rf.length;r++)$(Rf[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ep(e,t,u,r,n,null)}return;default:if(hn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&tp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ep(e,t,c,r,n,null))}var rp={};function ip(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ep(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(R=!0),o=m;break;case`name`:m!==f&&(R=!0),a=m;break;case`checked`:m!==f&&(R=!0),u=m;break;case`defaultChecked`:m!==f&&(R=!0),d=m;break;case`value`:m!==f&&(R=!0),s=m;break;case`defaultValue`:m!==f&&(R=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ep(e,t,p,m,r,f)}}an(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ep(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(R=!0),p=o;break;case`defaultValue`:o!==l&&(R=!0),c=o;break;case`multiple`:o!==l&&(R=!0),s=o;default:o!==l&&ep(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?cn(e,!!n,n?[]:``,!1):cn(e,!!n,t,!0)):cn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ep(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(R=!0),p=a;break;case`defaultValue`:a!==o&&(R=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ep(e,t,s,a,r,o)}ln(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ep(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(R=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ep(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ep(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ep(e,t,u,p,r,m)}return;default:if(hn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ep(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ep(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&ap(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function dp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function fp(e,t,n,r){return n=lp(n).createElement(e),n[Ct]=r,n[wt]=t,np(n,e,t),Lt(n),n}function pp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[At]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Dp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ap(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Bp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),h(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),h(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){h(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=b(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];h(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=lp(e).activeElement,e!==null&&h(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),h(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=Nt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(h(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(h(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];h(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Zp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),Zp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=b(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nm(n),Mt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[At])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ep(e,t,r,null,rp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===yn&&(e.onclick=null),Mt(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Mt(e)}var vm=new Map,ym=new Set;function bm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var xm=P.d;P.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=Ld();return e||t}function Cm(e){var t=Pt(e);t!==null&&t.tag===5&&t.type===`form`?ec(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=rn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Lt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+rn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+rn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+rn(n.imageSizes)+`"]`)):i+=`[href="`+rn(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[jt]=!0,o.onload=o.onerror=function(){Rt(o)}),Lt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+rn(r)+`"][href="`+rn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Lt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=It(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Lt(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=It(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Lt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=It(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Lt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=we.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=It(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=It(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=It(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+rn(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[jt]){r.loading=1;return}}else t=e.createElement(`link`),t[jt]=!0,t.onload=t.onerror=Rt.bind(null,t),np(t,`link`,n),Lt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+rn(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+rn(n.href)+`"]`);if(r)return t.instance=r,Lt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Lt(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Lt(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Lt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Lt(a),a):(r=n,(a=vm.get(o))&&(r=D({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Lt(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[At]||a[Ct]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Lt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Lt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=nh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sh={$$typeof:ie,Provider:null,Consumer:null,_currentValue:ve,_currentValue2:ve,_threadCount:0};function ch(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ft(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.hiddenUpdates=ft(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ni(3,null,null,t),e.current=a,a.stateNode=e,t=ja(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},po(a),e}function uh(e){return e?(e=ji,e):ji}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=ho(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=go(e,r,t),n!==null&&(Md(n,e,t),_o(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Oi(e,67108864);t!==null&&Md(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=kd();t=vt(t);var n=Oi(e,t);n!==null&&Md(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,yh(e,t,n,r)}finally{P.p=a,N.T=i}}function vh(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,yh(e,t,n,r)}finally{P.p=a,N.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Gf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Pt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ot(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-et(o);s.entanglements[1]|=c,o&=~c}Tf(a),!(X&6)&&(md=He()+500,Ef(0,!1))}}break;case 31:case 13:s=Oi(a,2),s!==null&&Md(s,a,2),Ld(),ph(a,2)}if(a=bh(r),a===null&&Gf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Gf(e,t,r,null,n)}}function bh(e){return e=xn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Nt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ue()){case We:return 2;case Ge:return 8;case Ke:case qe:return 32;case Je:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Pt(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Nt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,xt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,xt(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bn=r,n.target.dispatchEvent(r),bn=null}else return t=Pt(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=Pt(n);a!==null&&(e.splice(t,3),t-=3,Qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[wt]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[wt]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,kd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Ld(),t[Tt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=bt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.0`)throw Error(i(527,Kh,`19.3.0`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Ze=Jh.inject(qh),Qe=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=xc,s=Sc,c=Cc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[Tt]=t.current,Uf(e),new Wh(t)}})),g=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(u()),v=g(),y=e=>typeof e==`string`,b=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},x=e=>e==null?``:String(e),S=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},C=/###/g,w=e=>e&&e.includes(`###`)?e.replace(C,`.`):e,T=e=>!e||y(e),E=(e,t,n)=>{let r=y(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(T(e))return{};let t=w(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return T(e)?{}:{obj:e,k:w(r[i])}},D=(e,t,n)=>{let{obj:r,k:i}=E(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=E(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=E(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},ee=(e,t,n,r)=>{let{obj:i,k:a}=E(e,t,Object);i[a]=i[a]||[],i[a].push(n)},O=(e,t)=>{let{obj:n,k:r}=E(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},te=(e,t,n)=>{let r=O(e,n);return r===void 0?O(t,n):r},k=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?y(e[r])||e[r]instanceof String||y(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):k(e[r],t[r],n):e[r]=t[r]);return e},ne=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),A={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},re=e=>y(e)?e.replace(/[&<>"'\/]/g,e=>A[e]):e,ie=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},ae=[` `,`,`,`?`,`!`,`;`],oe=new ie(20),se=(e,t,n)=>{t||=``,n||=``;let r=ae.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=oe.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},ce=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},j=e=>e?.replace(/_/g,`-`),le={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},M=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||le,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,n,r){return r&&!this.debug?null:(e=e.map(e=>y(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),y(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},ue=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},de=class extends ue{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):y(n)&&i?o.push(...n.split(i)):o.push(n)));let s=O(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!y(n)?s:ce(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),D(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(y(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=O(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?k(s,n,i):s={...s,...n},D(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},fe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},pe=Symbol(`i18next/PATH_KEY`);function me(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===pe?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function he(e,t){let{[pe]:n}=e(me()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var ge=e=>!y(e)&&typeof e!=`boolean`&&typeof e!=`number`,_e=class e extends ue{constructor(e,t={}){super(),S([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=M.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=ge(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!se(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:y(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:y(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=he(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?he(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,x=i.count!==void 0&&!y(i.count),S=e.hasDefaultValue(i),C=x?this.pluralResolver.getSuffix(d,i.count,i):``,w=i.ordinal&&x?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,T=x&&!i.ordinal&&i.count===0,E=T&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${C}`]||i[`defaultValue${w}`]||i.defaultValue,D=m;b&&!m&&S&&(D=E);let ee=ge(D),O=Object.prototype.toString.apply(D);if(b&&D&&ee&&!_.includes(O)&&!(y(v)&&Array.isArray(D))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,D,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(D),t=e?[]:{},n=e?g:h;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let r=`${n}${o}${e}`;t[e]=S&&!m?this.translate(r,{...i,defaultValue:ge(E)?E[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=D[e])}m=t}}else if(b&&y(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&S&&(e=!0,m=E),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=S&&E!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,x&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?E:m),o){let e=this.resolve(s,{...i,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=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=S&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);T&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||E)})}):n(e,s,E))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=y(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!y(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=y(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=fe.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return y(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?he(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!y(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(y(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.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!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!y(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},N=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=M.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=j(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=j(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(y(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}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(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),y(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||y(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=y(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),l=[],u=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return y(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&u(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&u(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&u(this.getLanguagePartFromCode(e))):y(e)&&u(this.formatLanguageCode(e)),c.forEach(e=>{l.includes(e)||u(this.formatLanguageCode(e))}),s===null?l:(this.resolveHierarchyCache[s]=l,l.slice())}},P={zero:0,one:1,two:2,few:3,many:4,other:5},ve={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},F=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=M.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=j(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),ve;if(!e.match(/-|_/))return ve;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>P[e]-P[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},ye=(e,t,n,r=`.`,i=!0)=>{let a=te(e,t,n);return!a&&i&&y(n)&&(a=ce(e,n,r),a===void 0&&(a=ce(t,n,r))),a},be=e=>e.replace(/\$/g,`$$$$`),xe=class{constructor(e={}){this.logger=M.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?re:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?ne(i):a||`{{`,this.suffix=o?ne(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?ne(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?ne(l):``,this.nestingPrefix=d?ne(d):f||ne(`$t(`),this.nestingSuffix=p?ne(p):m||ne(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>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,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=ye(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(ye(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0){if(typeof l==`function`){let t=l(e,i,r);a=y(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``}else!y(a)&&!this.useRawValueToEscape&&(a=x(a));let s=t.safeValue(a);if(e=e.replace(i[0],be(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${ne(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!y(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!y(i))return i;y(i)||(i=x(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],be(x(i))),this.regexp.lastIndex=0}return e}},I=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Se=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(j(r),i),t[o]=s),s(n)}},Ce=e=>(t,n,r)=>e(j(n),r)(t),we=class{constructor(e={}){this.logger=M.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Se:Ce;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Se(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=I(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},Te=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Ee=class extends ue{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=M.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{ee(n.loaded,[i],a),Te(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();y(e)&&(e=this.languageUtils.toResolveHierarchy(e)),y(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" 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!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}},De=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,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(typeof e[1]==`object`&&(t=e[1]),y(e[1])&&(t.defaultValue=e[1]),y(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Oe=e=>(y(e.ns)&&(e.ns=[e.ns]),y(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),y(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),ke=()=>{},Ae=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},je=class e extends ue{constructor(e={},t){if(super(),this.options=Oe(e),this.services={},this.logger=M,this.modules={external:[]},Ae(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,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(y(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=De();this.options={...n,...this.options,...Oe(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?M.init(r(this.modules.logger),this.options):M.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:we;let t=new N(this.options);this.store=new de(this.options.resources,this.options);let n=this.services;n.logger=M,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new F(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new xe(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Ee(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new _e(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||=ke,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(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)});let i=b(),a=()=>{let e=(e,n)=>{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),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=ke){let n=t,r=y(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=b();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=ke,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&fe.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=b();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=y(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(y(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=he(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=he(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=he(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return y(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.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;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=b();return this.options.ns?(y(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=b();y(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`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`.split(`.`),n=this.services?.languageUtils||new N(De());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=ke){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new de(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...De().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new xe(n)}return a.translator=new _e(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();je.createInstance,je.dir,je.init,je.loadResources,je.reloadResources,je.use,je.changeLanguage,je.getFixedT,je.t,je.exists,je.setDefaultNamespace,je.hasLoadedNamespace,je.loadNamespaces,je.loadLanguages;var Me=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);ze(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Ne={},Pe=(e,t,n,r)=>{ze(n)&&Ne[n]||(ze(n)&&(Ne[n]=new Date),Me(e,t,n,r))},Fe=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},Ie=(e,t,n)=>{e.loadNamespaces(t,Fe(e,n))},Le=(e,t,n,r)=>{if(ze(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Ie(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,Fe(e,r))},Re=(e,t,n={})=>!t.languages||!t.languages.length?(Pe(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),ze=e=>typeof e==`string`,Be=e=>typeof e==`object`&&!!e,Ve=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,He={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},Ue=e=>He[e],We={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(Ve,Ue),transDefaultProps:void 0},Ge=(e={})=>{We={...We,...e}},Ke=()=>We,qe,Je=e=>{qe=e},Ye=()=>qe,Xe={type:`3rdParty`,init(e){Ge(e.options.react),Je(e)}},Ze=(0,_.createContext)(),Qe=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},$e=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),et=o(((e,t)=>{t.exports=$e()}))(),tt={t:(e,t)=>{if(ze(t))return t;if(Be(t)&&ze(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},nt=()=>()=>{},L=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,_.useContext)(Ze)||{},a=n||r||Ye();a&&!a.reportNamespaces&&(a.reportNamespaces=new Qe),a||Pe(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let o=(0,_.useMemo)(()=>({...Ke(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=ze(l)?[l]:l||[`translation`],d=(0,_.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,_.useRef)(0),p=(0,_.useCallback)(e=>{if(!a)return nt;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,_.useRef)(),h=(0,_.useCallback)(()=>{if(!a)return tt;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>Re(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,v]=(0,_.useState)(0),{t:y,ready:b}=(0,et.useSyncExternalStore)(p,h,h);(0,_.useEffect)(()=>{if(a&&!b&&!s){let e=()=>v(e=>e+1);t.lng?Le(a,t.lng,d,e):Ie(a,d,e)}},[a,t.lng,d,b,s,g]);let x=a||{},S=(0,_.useRef)(null),C=(0,_.useRef)(),w=e=>`${e.language}|${e.resolvedLanguage}|${e.languages?.join(`,`)}`,T=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},E=(0,_.useMemo)(()=>{let e=x,t=e&&w(e),n=e;e&&(S.current&&S.current.__original===e&&C.current===t?n=S.current:(n=T(e),S.current=n,C.current=t));let r=!b&&!s?(...e)=>(Pe(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),y(...e)):y,i=[r,n,b];return i.t=r,i.i18n=n,i.ready=b,i},[y,x,b,x.resolvedLanguage,x.language,x.languages]);if(a&&s&&!b){let e=!1;try{e=!1}catch{}throw e&&Pe(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?Le(a,t.lng,d,n):Ie(a,d,n)})}return E},{slice:rt,forEach:it}=[];function at(e){return it.call(rt.call(arguments,1),t=>{if(t)for(let n in t)e[n]===void 0&&(e[n]=t[n])}),e}function ot(e){return typeof e==`string`&&[/<\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))}var st=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ct=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:`/`},r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){let e=n.maxAge-0;if(Number.isNaN(e))throw Error(`maxAge should be a Number`);r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!st.test(n.domain))throw TypeError(`option domain is invalid`);r+=`; Domain=${n.domain}`}if(n.path){if(!st.test(n.path))throw TypeError(`option path is invalid`);r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!=`function`)throw TypeError(`option expires is invalid`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite)switch(typeof n.sameSite==`string`?n.sameSite.toLowerCase():n.sameSite){case!0:r+=`; SameSite=Strict`;break;case`lax`:r+=`; SameSite=Lax`;break;case`strict`:r+=`; SameSite=Strict`;break;case`none`:r+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid`)}return n.partitioned&&(r+=`; Partitioned`),r},lt={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:`/`,sameSite:`strict`};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=ct(e,t,i)},read(e){let t=`${e}=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,``,-1,t)}},ut={name:`cookie`,lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<`u`)return lt.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=t;n&&typeof document<`u`&&lt.create(n,e,r,i,a)}},dt={name:`querystring`,lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<`u`){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf(`?`)>-1&&(e=window.location.hash.substring(window.location.hash.indexOf(`?`)));let r=e.substring(1).split(`&`);for(let e=0;e<r.length;e++){let i=r[e].indexOf(`=`);i>0&&r[e].substring(0,i)===t&&(n=r[e].substring(i+1))}}return n}},ft={name:`hash`,lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<`u`){let{hash:e}=window.location;if(e&&e.length>2){let i=e.substring(1);if(t){let e=i.split(`&`);for(let n=0;n<e.length;n++){let i=e[n].indexOf(`=`);i>0&&e[n].substring(0,i)===t&&(r=e[n].substring(i+1))}}if(r)return r;if(!r&&n>-1){let t=e.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof n==`number`?n:0]?.replace(`/`,``):void 0}}}return r}},pt=null,mt=()=>{if(pt!==null)return pt;try{if(pt=typeof window<`u`&&window.localStorage!==null,!pt)return!1;let e=`i18next.translate.boo`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{pt=!1}return pt},ht={name:`localStorage`,lookup(e){let{lookupLocalStorage:t}=e;if(t&&mt())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&mt()&&window.localStorage.setItem(n,e)}},gt=null,_t=()=>{if(gt!==null)return gt;try{if(gt=typeof window<`u`&&window.sessionStorage!==null,!gt)return!1;let e=`i18next.translate.boo`;window.sessionStorage.setItem(e,`foo`),window.sessionStorage.removeItem(e)}catch{gt=!1}return gt},vt={name:`sessionStorage`,lookup(e){let{lookupSessionStorage:t}=e;if(t&&_t())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&_t()&&window.sessionStorage.setItem(n,e)}},yt={name:`navigator`,lookup(e){let t=[];if(typeof navigator<`u`){let{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},bt={name:`htmlTag`,lookup(e){let{htmlTag:t}=e,n,r=t||(typeof document<`u`?document.documentElement:null);return r&&typeof r.getAttribute==`function`&&(n=r.getAttribute(`lang`)),n}},xt={name:`path`,lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>`u`)return;let n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return n[typeof t==`number`?t:0]?.replace(`/`,``)}},St={name:`subdomain`,lookup(e){let{lookupFromSubdomainIndex:t}=e,n=typeof t==`number`?t+1:1,r=typeof window<`u`&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},Ct=!1;try{document.cookie,Ct=!0}catch{}var wt=[`querystring`,`cookie`,`localStorage`,`sessionStorage`,`navigator`,`htmlTag`];Ct||wt.splice(1,1);var Tt=()=>({order:wt,lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`],convertDetectedLanguage:e=>e}),Et=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type=`languageDetector`,this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=at(t,this.options||{},Tt()),typeof this.options.convertDetectedLanguage==`string`&&this.options.convertDetectedLanguage.indexOf(`15897`)>-1&&(this.options.convertDetectedLanguage=e=>e.replace(`-`,`_`)),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(ut),this.addDetector(dt),this.addDetector(ht),this.addDetector(vt),this.addDetector(yt),this.addDetector(bt),this.addDetector(xt),this.addDetector(St),this.addDetector(ft)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&typeof n==`string`&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>e!=null&&!ot(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&&arguments[1]!==void 0?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)}))}};Et.type=`languageDetector`;var Dt={common:{appName:`FeedKeeper`,loading:`Loading…`,save:`Save`,cancel:`Cancel`,delete:`Delete`,close:`Close`,error:`Something went wrong`,retry:`Retry`,loadMore:`Load more`,noOptions:`No options`,metaTitle:`FeedKeeper – RSS Reader & MCP Server`,metaDescription:`Self-hosted RSS/Atom feed manager and remote MCP server for AI assistants.`,offlineBanner:`You are offline. You can keep reading and make changes; they are sent once you are back online.`,offlineTitle:`No connection`,offlineText:`FeedKeeper cannot reach the server right now. Check your connection and try again.`,offlineAction:`You are offline. This needs a connection.`,offlinePending:`Waiting to be sent: {{count}}.`},nav:{items:`Articles`,feeds:`Feeds`,settings:`Settings`,logout:`Log out`,menu:`Menu`,account:`Account`,footerLinks:`Further links`},onboarding:{subtitle:`Create the first admin account to finish setting up this instance.`,emailLabel:`Email`,displayNameLabel:`Display name`,passwordLabel:`Password`,passwordHint:`At least 10 characters.`,submit:`Create admin account`,orUseCli:`Prefer the terminal?`,cliHint:`Run "npm run setup" on the server instead — either way creates the same first admin account.`},login:{subtitle:`RSS Reader & MCP Server`,emailLabel:`Email`,passwordLabel:`Password`,submit:`Log in`,error:`Invalid email or password.`,viewOnGithub:`FeedKeeper on GitHub`},feeds:{title:`Feeds`,urlPlaceholder:`example.com or feed URL`,labelPlaceholder:`Label (optional)`,subscribe:`Subscribe`,subscribed:`Already subscribed`,subscribing:`Subscribing…`,multipleFeedsFound:`Multiple feeds found on this page. Please select one:`,unsubscribe:`Unsubscribe`,unsubscribeConfirm:`Unsubscribe from "{{title}}"?`,unread:`{{count}} unread`,alreadySubscribed:`You are already subscribed to this feed.`,noFeedsFoundOnPage:`No RSS or Atom feeds found on this webpage.`,interval:`Checks every`,minutesShort:`{{count}} min`,hoursShort:`{{count}} h`,edit:`Edit`,markAllRead:`Mark all read`,importOpml:`Import OPML`,exportOpml:`Export OPML`,importing:`Importing feeds…`,importSuccess:`Import complete: {{imported}} added, {{skipped}} already subscribed.`,importPartial:`Import finished: {{imported}} added, {{skipped}} skipped, {{failed}} failed.`,importFailed:`Failed to parse or import OPML file.`,refreshFeed:`Check now`,refreshAll:`Check all feeds`,refreshing:`Checking…`,statusFailing:`Failing ({{count}} consecutive errors)`,statusPending:`Waiting for first check`,manageFolders:`Manage folders`,noFolder:`No folder`,folder:`Folder`,newFolderPlaceholder:`New folder (e.g. Tech)`,addFolder:`Create folder`,deleteFolderConfirm:`Delete folder "{{name}}"? Your feeds will be kept.`,folderGroup:`Folders`,feedGroup:`Individual feeds`,dragHandle:`Drag to reorder`,fullText:`Load full text from the website`,fullTextHint:`The reader fetches the complete article when the feed only contains a teaser.`,fullTextBlocked:`This site recently asked for cookie consent or a subscription. FeedKeeper will try again in a few days.`,addFeed:`Add feed`,addFeedShort:`Add`,searchPlaceholder:`Search feeds…`,failingCount:`{{count}} with errors`,filterAll:`All`,filterFailing:`Errors`,uncategorized:`Uncategorized`,moreActions:`More actions`,checkedAgo:`checked {{time}}`,errors:{unavailable:`The source is not reachable right now (error {{status}}). FeedKeeper tries again automatically.`,notFound:`The feed was not found (error {{status}}). Its address may have changed.`,refused:`The source refuses access (error {{status}}).`,rejected:`The source rejected the request (error {{status}}).`,limited:`The source limits requests. FeedKeeper tries again later.`,timeout:`The source did not answer in time. FeedKeeper tries again automatically.`,network:`The source could not be reached. FeedKeeper tries again automatically.`,invalidFeed:`The answer is not a valid feed.`},everyInterval:`every {{interval}}`,noMatches:`No matching feeds.`,feedCount_one:`{{count}} feed`,feedCount_other:`{{count}} feeds`,renameFolderHint:`Click a name to rename it.`,emptyTitle:`No feeds yet`,emptyHint:`Subscribe to news sites, blogs or podcasts – just enter the website address and FeedKeeper finds the feed.`,subscribedToast:`Subscribed to "{{title}}".`,subscribeFailed:`The feed could not be subscribed.`,refreshedToast_one:`Checked "{{title}}" – {{count}} new article.`,refreshedToast_other:`Checked "{{title}}" – {{count}} new articles.`,refreshFailedToast:`"{{title}}" could not be fetched: {{error}}`,refreshPendingToast:`The update for "{{title}}" is still pending. FeedKeeper will continue checking automatically.`,refreshAllPendingToast_one:`{{count}} update is still pending. FeedKeeper will continue checking automatically. {{newItems}} new articles so far.`,refreshAllPendingToast_other:`{{count}} updates are still pending. FeedKeeper will continue checking automatically. {{newItems}} new articles so far.`,refreshedAllToast_one:`Checked {{count}} feed – {{newItems}} new articles.`,refreshedAllToast_other:`Checked {{count}} feeds – {{newItems}} new articles.`,unsubscribedToast:`Unsubscribed from "{{title}}".`,markedReadToast:`Marked all articles from "{{title}}" as read.`,changesSaved:`Changes saved.`,folderCreated:`Category "{{name}}" created.`,folderRenamed:`Category renamed to "{{name}}".`,folderDeleted:`Category "{{name}}" deleted.`,notify:`Notify me about new articles`,notifyHint:`Sends a notification to the devices where you turned notifications on.`,notifyActive:`Notifications active for this feed`,badge:`Count on the app icon`,badgeHint:`Unread articles of this feed are added to the number on the app icon. Off by default.`},items:{title:`Items`,viewMode:`Article view`,listView:`List`,newspaperView:`Magazine`,markRead:`Mark read`,markUnread:`Mark unread`,searchPlaceholder:`Search items…`,unreadOnly:`Unread only`,all:`Show all`,bookmarkedOnly:`Saved articles only`,bookmark:`Save for later`,unbookmark:`Remove from saved`,allFeeds:`All feeds`,noItems:`No items to show.`,refresh:`Refresh articles`,refreshing:`Refreshing feeds…`,refreshFailed:`Refresh failed. Please try again.`,noSaved:`Nothing saved yet. Tap the star to keep an article, including its full text and images, for good.`,unreadIgnoredInSaved:`Saved articles are shown whether read or not.`,loadFailed:`The articles could not be loaded.`,allReadTitle:`All caught up`,allReadHint:`You have read everything. New articles show up here as soon as they arrive.`,noResults:`Nothing found.`},reader:{close:`Close (Esc)`,previous:`Previous article (K or ←)`,next:`Next article (J or →)`,openOriginal:`Open original`,copyLink:`Copy link`,linkCopied:`Link copied!`,readingTime:`{{count}} min read`,toggleFullText:`Extract full text from web (R)`,togglePreview:`Back to preview (R)`,extractionFailed:`Could not extract full article from website.`,bookmark:`Save for later (S)`,unbookmark:`Remove from saved (S)`,markRead:`Mark as read (M)`,markUnread:`Mark as unread (M)`,consentWall:`This site asks for cookie consent or a subscription. You're seeing the preview from the feed.`,readOriginal:`Read on the website`,paywallRead:`Read the full article · paywall`},settings:{title:`Settings`,tokensTitle:`Personal access tokens`,tokensHint:`Only needed for clients that can't sign in with OAuth, such as scripts or config files. Treat a token like a password.`,createToken:`Create token`,tokenReadOnly:`Read only`,tokenReadWrite:`Read and write`,tokenNamePlaceholder:`Token name (e.g. "Claude Desktop")`,tokenCreated:`Token created`,tokenCreatedHint:`Copy it now — it won't be shown again.`,copyToken:`Copy`,copied:`Copied!`,deleteToken:`Revoke`,usersTitle:`Users`,addUser:`Add user`,roleAdmin:`Admin`,roleUser:`User`,mcpTitle:`Connect an MCP client`,mcpHint:`Connect Claude, ChatGPT or another MCP client to your feeds.`,mutedKeywordsTitle:`Muted Keywords (Filters)`,mutedKeywordsHint:`Articles whose title or snippet contains any of these keywords will be hidden from your feed.`,mutedKeywordPlaceholder:`Keyword to mute (e.g. "Sponsored")`,addMutedKeyword:`Add`,removeMutedKeyword:`Remove`,noMutedKeywords:`No muted keywords configured.`,language:`Language`,languageHint:`Choose your preferred display language.`,autoReaderMode:`Open in Reader View by default`,autoReaderModeHint:`Automatically extract and display full article content when opening an article.`,theme:`Theme`,themeLight:`Light`,themeDark:`Dark`,themeSystem:`System`,changePasswordTitle:`Change password`,currentPasswordLabel:`Current password`,newPasswordLabel:`New password`,confirmPasswordLabel:`Confirm new password`,changePasswordButton:`Change password`,passwordChanged:`Password changed.`,passwordMismatch:`New passwords don't match.`,incorrectPassword:`Current password is incorrect.`,retentionTitle:`Retention`,retentionHint:`Automated cleanup of old and read items to optimize disk usage and query performance.`,statTotalItems:`Total items`,statReadItems:`Read items`,statFeedsCount:`Active feeds`,statDbSize:`Database file size (SQLite + WAL)`,retentionReadDaysLabel:`Keep read items (days)`,retentionReadDaysHint:`0 = purge immediately once read, default: 30 days`,retentionMaxDaysLabel:`Maximum item retention (days)`,retentionMaxDaysHint:`0 = unlimited, default: 90 days`,retentionMaxItemsLabel:`Max items per feed`,retentionMaxItemsHint:`0 = unlimited, default: 1000 items`,autoCleanupLabel:`Enable daily automated housekeeping at 03:00 AM`,saveRetention:`Save settings`,retentionSaved:`Settings saved successfully.`,runCleanupNow:`Run cleanup now (VACUUM)`,cleaning:`Cleaning…`,cleanupSuccess:`Cleanup complete: removed {{total}} items. Size: {{before}} MB -> {{after}} MB.`,installApp:`Install app`,installAppHint:`Add FeedKeeper to your home screen or dock as a standalone app.`,installAppButton:`Install`,installAppIos:`In Safari, tap the Share icon (via the “…” menu if needed) and choose “Add to Home Screen”.`,installAppMacSafari:`In Safari, choose File › “Add to Dock”.`,profileTitle:`Profile`,displayNameLabel:`Display name`,profileSaved:`Profile saved.`,avatarUpload:`Upload photo`,avatarChange:`Change photo`,avatarRemove:`Remove`,avatarHint:`JPG, PNG or WebP – cropped to a square and resized.`,avatarUnreadable:`The image could not be read.`,sectionAccount:`Account`,sectionAccountHint:`Profile, photo and password.`,sectionGeneral:`Reading & appearance`,sectionGeneralHint:`Theme, language and how articles open.`,sectionFilters:`Word filter`,sectionFiltersHint:`Hide articles that mention certain terms.`,sectionMcp:`MCP & API`,sectionMcpHint:`Connect AI assistants like Claude to your feeds.`,sectionUsers:`Users`,sectionUsersHint:`Manage the accounts on this FeedKeeper instance.`,sectionDatabase:`Database`,sectionDatabaseHint:`Storage and automatic cleanup.`,adminGroup:`Administration`,passwordHint:`At least 10 characters.`,appearanceTitle:`Appearance`,readingTitle:`Reading`,themeHint:`Light, dark or matching your system.`,mcpStepToken:`Create a token below and copy it.`,mcpStepUrl:`Add a server with this URL in your MCP client.`,mcpStepHeader:`Send the token as an "Authorization: Bearer <token>" header.`,revokeTokenConfirm:`Revoke token "{{name}}"? Clients using it lose access immediately.`,noTokens:`No tokens yet.`,mcpOauthTitle:`Option 1: Sign in with your account`,mcpOauthBadge:`Recommended`,mcpOauthIntro:`For ChatGPT, Claude and other apps with connector support. You don't have to create or copy a token.`,mcpOauthStep1:`In the app, add a custom connector or remote MCP server with the URL above.`,mcpOauthStep2:`Sign in to FeedKeeper when asked.`,mcpOauthStep3:`Choose whether the app may only read or also change your feeds, then confirm.`,mcpOauthDone:`The assistant then appears under “Connected AI assistants” below, where you can disconnect it at any time.`,mcpTokenTitle:`Option 2: Use a token`,mcpTokenIntro:`For scripts and clients without connector support.`,connectedAppsTitle:`Connected AI assistants`,connectedAppsHint:`AI assistants such as ChatGPT or Claude that signed in to this server through MCP. Disconnect one to end its access.`,noConnectedApps:`No AI assistants connected yet.`,disconnectApp:`Disconnect`,disconnectAppConfirm:`Disconnect "{{name}}"? It loses access immediately.`,tokenCreatedOn:`created {{date}}`,tokenLastUsed:`last used {{time}}`,tokenNeverUsed:`never used`,userCreated:`Account created.`,addUserHint:`Self-registration is off by default – create new accounts here.`,offlineSaved:`Read offline`,offlineSavedHint:`Keeps your saved articles and the newest unread ones, with their images, on this device so you can read without a connection. Changes you make offline are sent later.`,offlineSavedCount:`Articles available offline: {{count}}.`,notifications:`Notifications`,notificationsHint:`Get a notification on this device when feeds you chose have new articles. Turn it on per feed under Feeds → Edit.`,notificationsBlocked:`Notifications are blocked for this app. Allow them in your device or browser settings.`,notificationsIos:`On iPhone and iPad, add FeedKeeper to the home screen first, then open it from there to turn notifications on.`,notificationsUnsupported:`This browser cannot show notifications from FeedKeeper.`,notificationsTest:`Send test`,notificationsTestFailed:`The test notification could not be delivered.`,sectionDevices:`Devices`,sectionDevicesHint:`Connect the FeedKeeper app on your iPhone or iPad.`,devicesTitle:`Paired devices`,devicesHint:`Each device has its own access. Revoking a device signs it out right away.`,deviceAdd:`Add a device`,noDevices:`No devices paired yet.`,deviceQrAlt:`QR code for pairing a device`,devicePairHint:`Open the FeedKeeper app, choose to add a server and scan this code. Or type the code in by hand.`,devicePairExpires:`Valid for {{minutes}}:{{seconds}} more minutes, usable once.`,devicePairExpired:`This code has expired. Add a device again for a new one.`,devicePairDone:`Done`,deviceRevoke:`Revoke`,deviceRevokeConfirm:`Revoke "{{name}}"? The device will be signed out.`,mcpClaudeTitle:`Use with Claude Desktop or Cowork`,mcpClaudeHint:`Add this snippet to your claude_desktop_config.json to connect Claude directly to your feeds.`,mcpCopyConfig:`Copy Claude config`,mcpConfigCopied:`Config copied!`},welcome:{title:`Let's fill your reader`,intro:`Add a website, pick a starter pack or import your subscriptions. Your articles appear here as soon as the first feeds have been fetched.`,addTitle:`Add a website`,packsTitle:`Or start with a pack`,packsHint:`A handful of well-known feeds on one topic. You choose which ones to keep.`,subscribePack_one:`Subscribe to {{count}} feed`,subscribePack_other:`Subscribe to {{count}} feeds`,subscribingProgress:`Subscribing… {{done}} of {{total}}`,packAdded_one:`{{count}} feed added.`,packAdded_other:`{{count}} feeds added.`,packPartial:`{{added}} added, {{failed}} could not be added.`,importTitle:`Already use a feed reader?`,importHint:`Import the subscription file (OPML) that your old reader exported.`,fetchingTitle:`Fetching your first articles …`,fetchingHint:`This usually takes a few seconds. The page updates by itself.`},intro:{title:`A short tour`,subtitle:`Four things that are good to know. This appears only once.`,viewsTitle:`List or newspaper`,viewsText:`Switch between the list and the newspaper view at the top right.`,unreadTitle:`Unread only`,unreadText:`The dot next to the search shows or hides articles you have already read.`,starTitle:`Save for later`,starText:`The star keeps an article for good, with its full text and images. The star next to the search shows everything you saved.`,foldersTitle:`Folders`,foldersText:`Under Feeds you create folders and sort your subscriptions.`,done:`Got it`},plan:{limitedTitle:`Your account is limited right now`,limitedText:`Adding, importing and updating feeds is not included in your plan at the moment. You can still read, export and delete.`,view:`View plans`,unavailable:`Not included in your plan`},security:{title:`Account security`,intro:`Sign in with a passkey or protect your password with an authenticator app.`,confirmIdentity:`Confirm identity for a change`,authenticatorStarted:`Setup has started. Confirm it with an authenticator code.`,updated:`Your security settings have been updated.`,passkeyAdded:`The passkey has been added.`,passkeyRemoved:`The passkey has been removed.`,removeNamed:`Remove passkey “{{name}}”`,refreshFailed:`Your change was saved, but the updated overview could not be loaded. Reload the page before making further changes.`,reauth:`Confirm your identity before changing security settings.`,usePasskey:`Confirm with a passkey`,password:`Current password`,code:`Authenticator or recovery code`,sendEmail:`Confirm by email (accounts without a password)`,emailCode:`Email confirmation code`,passkeys:`Passkeys`,passkeyName:`Passkey name`,addPasskey:`Add passkey`,remove:`Remove`,httpsRequired:`Passkeys require HTTPS.`,twoFactor:`Two-factor authentication`,enabled:`Authenticator codes are enabled for password sign-ins and linked sign-in providers.`,disabled:`Authenticator codes are not enabled.`,enable:`Set up authenticator`,disable:`Disable authenticator`,scan:`Scan this QR code in your authenticator app, or enter the setup key. Then confirm with a six-digit code.`,qrAlt:`Authenticator setup QR code`,confirm:`Confirm setup`,cancel:`Cancel`,newRecovery:`Replace recovery codes`,saveRecovery:`Save these recovery codes somewhere safe. Each works once instead of an authenticator code. They are shown only now; replacing codes invalidates the old ones.`,saved:`I saved the codes`,failed:`Could not confirm this action. Check your entries and try again.`,lastPasskey:`Add another passkey before removing the last one.`,signInPasskey:`Sign in with a passkey`,revocationHint:`Changing two-factor authentication signs out other sessions and revokes device and API tokens. Reconnect your apps afterwards.`,confirmTitle:`Confirm identity`,orPassword:`or with password`,invalidCredentials:`The password or confirmation code is incorrect.`,passkeyCancelled:`Passkey confirmation was cancelled or not recognized.`,confirmAction:`Confirm`}},Ot={common:{appName:`FeedKeeper`,loading:`Lädt…`,save:`Speichern`,cancel:`Abbrechen`,delete:`Löschen`,close:`Schließen`,error:`Etwas ist schiefgelaufen`,retry:`Erneut versuchen`,loadMore:`Weitere laden`,noOptions:`Keine Optionen`,metaTitle:`FeedKeeper – RSS-Reader & MCP-Server`,metaDescription:`Selbstgehosteter RSS/Atom-Feed-Reader und MCP-Server für KI-Assistenten.`,offlineBanner:`Du bist offline. Du kannst weiterlesen und Änderungen vornehmen; sie werden gesendet, sobald du wieder online bist.`,offlineTitle:`Keine Verbindung`,offlineText:`FeedKeeper erreicht den Server gerade nicht. Prüfe deine Verbindung und versuche es erneut.`,offlineAction:`Du bist offline. Dafür brauchst du eine Verbindung.`,offlinePending:`Wartet auf Senden: {{count}}.`},nav:{feeds:`Feeds`,items:`Artikel`,settings:`Einstellungen`,logout:`Abmelden`,menu:`Menü`,account:`Konto`,footerLinks:`Weitere Links`},onboarding:{subtitle:`Lege den ersten Admin-Account an, um die Einrichtung abzuschließen.`,emailLabel:`E-Mail`,displayNameLabel:`Anzeigename`,passwordLabel:`Passwort`,passwordHint:`Mindestens 10 Zeichen.`,submit:`Admin-Account anlegen`,orUseCli:`Lieber im Terminal?`,cliHint:`Führe stattdessen "npm run setup" auf dem Server aus — beide Wege legen denselben ersten Admin-Account an.`},login:{subtitle:`RSS-Reader & MCP-Server`,emailLabel:`E-Mail`,passwordLabel:`Passwort`,submit:`Anmelden`,error:`E-Mail oder Passwort ungültig.`,viewOnGithub:`FeedKeeper auf GitHub`},feeds:{title:`Feeds`,urlPlaceholder:`beispiel.de oder Feed-URL`,labelPlaceholder:`Bezeichnung (optional)`,subscribe:`Abonnieren`,subscribed:`Bereits abonniert`,subscribing:`Wird abonniert…`,multipleFeedsFound:`Mehrere Feeds auf dieser Seite gefunden. Bitte wähle einen aus:`,unsubscribe:`Abbestellen`,unsubscribeConfirm:`"{{title}}" wirklich abbestellen?`,unread:`{{count}} ungelesen`,alreadySubscribed:`Dieser Feed ist bereits abonniert.`,noFeedsFoundOnPage:`Auf dieser Website wurde kein RSS- oder Atom-Feed gefunden.`,interval:`Prüfintervall`,minutesShort:`{{count}} Min.`,hoursShort:`{{count}} Std.`,edit:`Bearbeiten`,markAllRead:`Alle als gelesen markieren`,importOpml:`OPML importieren`,exportOpml:`OPML exportieren`,importing:`Feeds werden importiert…`,importSuccess:`Import abgeschlossen: {{imported}} hinzugefügt, {{skipped}} bereits abonniert.`,importPartial:`Import abgeschlossen: {{imported}} hinzugefügt, {{skipped}} übersprungen, {{failed}} fehlgeschlagen.`,importFailed:`OPML-Datei konnte nicht verarbeitet oder importiert werden.`,refreshFeed:`Jetzt prüfen`,refreshAll:`Alle Feeds prüfen`,refreshing:`Wird geprüft…`,statusFailing:`Fehler beim Abruf ({{count}}x fehlgeschlagen)`,statusPending:`Wartet auf ersten Abruf`,manageFolders:`Kategorien verwalten`,noFolder:`Keine Kategorie`,folder:`Kategorie`,newFolderPlaceholder:`Neue Kategorie (z. B. Tech)`,addFolder:`Kategorie anlegen`,deleteFolderConfirm:`"{{name}}" wirklich löschen? Die Feeds bleiben erhalten.`,folderGroup:`Kategorien`,feedGroup:`Einzelne Feeds`,dragHandle:`Reihenfolge durch Ziehen ändern`,fullText:`Volltext von der Website laden`,fullTextHint:`Der Reader lädt den vollständigen Artikel, wenn der Feed nur einen Anriss enthält.`,fullTextBlocked:`Diese Seite hat zuletzt eine Cookie-Zustimmung oder ein Abo verlangt. FeedKeeper versucht es in einigen Tagen erneut.`,addFeed:`Feed hinzufügen`,addFeedShort:`Neu`,searchPlaceholder:`Feeds durchsuchen…`,failingCount:`{{count}} mit Fehlern`,filterAll:`Alle`,filterFailing:`Fehler`,uncategorized:`Ohne Kategorie`,moreActions:`Weitere Aktionen`,checkedAgo:`{{time}} geprüft`,errors:{unavailable:`Die Quelle ist gerade nicht erreichbar (Fehler {{status}}). FeedKeeper versucht es automatisch erneut.`,notFound:`Der Feed wurde nicht gefunden (Fehler {{status}}). Möglicherweise hat sich seine Adresse geändert.`,refused:`Die Quelle verweigert den Zugriff (Fehler {{status}}).`,rejected:`Die Quelle hat die Anfrage abgelehnt (Fehler {{status}}).`,limited:`Die Quelle begrenzt die Abrufe. FeedKeeper versucht es später erneut.`,timeout:`Die Quelle hat nicht rechtzeitig geantwortet. FeedKeeper versucht es automatisch erneut.`,network:`Die Quelle war nicht erreichbar. FeedKeeper versucht es automatisch erneut.`,invalidFeed:`Die Antwort ist kein gültiger Feed.`},everyInterval:`alle {{interval}}`,noMatches:`Keine passenden Feeds gefunden.`,feedCount_one:`{{count}} Feed`,feedCount_other:`{{count}} Feeds`,renameFolderHint:`Zum Umbenennen auf den Namen klicken.`,emptyTitle:`Noch keine Feeds`,emptyHint:`Abonniere Nachrichtenseiten, Blogs oder Podcasts – einfach die Website-Adresse eingeben, den Feed findet FeedKeeper selbst.`,subscribedToast:`„{{title}}“ abonniert.`,subscribeFailed:`Der Feed konnte nicht abonniert werden.`,refreshedToast_one:`„{{title}}“ geprüft – {{count}} neuer Artikel.`,refreshedToast_other:`„{{title}}“ geprüft – {{count}} neue Artikel.`,refreshFailedToast:`„{{title}}“ konnte nicht abgerufen werden: {{error}}`,refreshPendingToast:`Die Aktualisierung von „{{title}}“ steht noch aus. FeedKeeper prüft den Feed automatisch weiter.`,refreshAllPendingToast_one:`{{count}} Aktualisierung steht noch aus. FeedKeeper prüft automatisch weiter. Bisher {{newItems}} neue Artikel.`,refreshAllPendingToast_other:`{{count}} Aktualisierungen stehen noch aus. FeedKeeper prüft automatisch weiter. Bisher {{newItems}} neue Artikel.`,refreshedAllToast_one:`{{count}} Feed geprüft – {{newItems}} neue Artikel.`,refreshedAllToast_other:`{{count}} Feeds geprüft – {{newItems}} neue Artikel.`,unsubscribedToast:`„{{title}}“ abbestellt.`,markedReadToast:`Alle Artikel von „{{title}}“ als gelesen markiert.`,changesSaved:`Änderungen gespeichert.`,folderCreated:`Kategorie „{{name}}“ angelegt.`,folderRenamed:`Kategorie in „{{name}}“ umbenannt.`,folderDeleted:`Kategorie „{{name}}“ gelöscht.`,notify:`Bei neuen Artikeln benachrichtigen`,notifyHint:`Sendet eine Benachrichtigung an die Geräte, auf denen du Benachrichtigungen aktiviert hast.`,notifyActive:`Benachrichtigungen für diesen Feed aktiv`,badge:`Zahl am App-Symbol`,badgeHint:`Ungelesene Artikel dieses Feeds zählen zur Zahl am App-Symbol. Standardmäßig aus.`},items:{title:`Artikel`,viewMode:`Darstellung der Artikel`,listView:`Liste`,newspaperView:`Zeitung`,markRead:`Als gelesen markieren`,markUnread:`Als ungelesen markieren`,searchPlaceholder:`Artikel durchsuchen…`,unreadOnly:`Nur ungelesene`,all:`Alle anzeigen`,bookmarkedOnly:`Nur gemerkte Artikel`,bookmark:`Merken`,unbookmark:`Nicht mehr merken`,allFeeds:`Alle Feeds`,noItems:`Keine Artikel vorhanden.`,refresh:`Artikel aktualisieren`,refreshing:`Feeds werden aktualisiert…`,refreshFailed:`Aktualisierung fehlgeschlagen. Bitte erneut versuchen.`,noSaved:`Noch nichts gemerkt. Tippe auf den Stern, um einen Artikel samt Volltext und Bildern dauerhaft zu sichern.`,unreadIgnoredInSaved:`Die Merkliste zeigt gelesene und ungelesene Artikel.`,loadFailed:`Die Artikel konnten nicht geladen werden.`,allReadTitle:`Alles gelesen`,allReadHint:`Du hast alles gelesen. Neue Artikel erscheinen hier, sobald sie da sind.`,noResults:`Nichts gefunden.`},reader:{close:`Schließen (Esc)`,previous:`Vorheriger Artikel (K oder ←)`,next:`Nächster Artikel (J oder →)`,openOriginal:`Im Original öffnen`,copyLink:`Link kopieren`,linkCopied:`Link kopiert!`,readingTime:`{{count}} Min. Lesezeit`,toggleFullText:`Volltext aus Webseite laden (R)`,togglePreview:`Zurück zur Vorschau (R)`,extractionFailed:`Der vollständige Artikel konnte nicht geladen werden.`,bookmark:`Merken (S)`,unbookmark:`Nicht mehr merken (S)`,markRead:`Als gelesen markieren (M)`,markUnread:`Als ungelesen markieren (M)`,consentWall:`Diese Seite verlangt eine Cookie-Zustimmung oder ein Abo. Du siehst die Vorschau aus dem Feed.`,readOriginal:`Im Original lesen`,paywallRead:`Vollständigen Artikel lesen · Paywall`},settings:{title:`Einstellungen`,tokensTitle:`Personal Access Tokens`,tokensHint:`Nur nötig für Clients, die sich nicht per OAuth anmelden können, etwa Skripte oder Konfigurationsdateien. Behandle ein Token wie ein Passwort.`,createToken:`Token erstellen`,tokenReadOnly:`Nur lesen`,tokenReadWrite:`Lesen und schreiben`,tokenNamePlaceholder:`Token-Name (z. B. "Claude Desktop")`,tokenCreated:`Token erstellt`,tokenCreatedHint:`Jetzt kopieren — es wird nicht erneut angezeigt.`,copyToken:`Kopieren`,copied:`Kopiert!`,deleteToken:`Widerrufen`,usersTitle:`Nutzer`,addUser:`Nutzer hinzufügen`,roleAdmin:`Admin`,roleUser:`Nutzer`,mcpTitle:`MCP-Client verbinden`,mcpHint:`Verbinde Claude, ChatGPT oder einen anderen MCP-Client mit deinen Feeds.`,mutedKeywordsTitle:`Stummgeschaltete Begriffe (Wortfilter)`,mutedKeywordsHint:`Artikel, deren Titel oder Text diese Begriffe enthalten, werden in deiner Artikelliste automatisch ausgeblendet.`,mutedKeywordPlaceholder:`Begriff stummschalten (z. B. "Sponsoring")`,addMutedKeyword:`Hinzufügen`,removeMutedKeyword:`Entfernen`,noMutedKeywords:`Keine stummgeschalteten Begriffe hinterlegt.`,language:`Sprache`,languageHint:`Wähle deine bevorzugte Anzeigesprache.`,autoReaderMode:`Standardmäßig im Lesemodus öffnen`,autoReaderModeHint:`Lädt den bereinigten Volltext des Artikels automatisch beim Öffnen der Detailansicht.`,theme:`Design`,themeLight:`Hell`,themeDark:`Dunkel`,themeSystem:`System`,changePasswordTitle:`Passwort ändern`,currentPasswordLabel:`Aktuelles Passwort`,newPasswordLabel:`Neues Passwort`,confirmPasswordLabel:`Neues Passwort bestätigen`,changePasswordButton:`Passwort ändern`,passwordChanged:`Passwort geändert.`,passwordMismatch:`Die neuen Passwörter stimmen nicht überein.`,incorrectPassword:`Das aktuelle Passwort ist falsch.`,retentionTitle:`Aufbewahrung`,retentionHint:`Automatische Bereinigung alter Einträge zur Reduzierung des Speicherbedarfs und Verbesserung der Abfrageleistung.`,statTotalItems:`Einträge gesamt`,statReadItems:`Gelesene Einträge`,statFeedsCount:`Aktive Feeds`,statDbSize:`Dateigröße (SQLite + WAL)`,retentionReadDaysLabel:`Gelesene Einträge aufbewahren (Tage)`,retentionReadDaysHint:`0 = sofort löschen, Standard: 30 Tage`,retentionMaxDaysLabel:`Maximale Aufbewahrungsdauer (Tage)`,retentionMaxDaysHint:`0 = unbegrenzt, Standard: 90 Tage`,retentionMaxItemsLabel:`Max. Einträge pro Feed`,retentionMaxItemsHint:`0 = unbegrenzt, Standard: 1000 Einträge`,autoCleanupLabel:`Tägliche automatische Bereinigung um 03:00 Uhr aktivieren`,saveRetention:`Einstellungen speichern`,retentionSaved:`Einstellungen gespeichert.`,runCleanupNow:`Jetzt bereinigen (VACUUM)`,cleaning:`Wird bereinigt…`,cleanupSuccess:`Bereinigung erfolgreich: {{total}} Einträge entfernt. Größe: {{before}} MB -> {{after}} MB.`,installApp:`App installieren`,installAppHint:`Lege FeedKeeper als eigenständige App auf dem Home-Bildschirm oder im Dock ab.`,installAppButton:`Installieren`,installAppIos:`Tippe in Safari auf das Teilen-Symbol (ggf. über das „…“-Menü) und wähle „Zum Home-Bildschirm“.`,installAppMacSafari:`Wähle in Safari im Menü „Ablage“ den Eintrag „Zum Dock hinzufügen“.`,profileTitle:`Profil`,displayNameLabel:`Anzeigename`,profileSaved:`Profil gespeichert.`,avatarUpload:`Foto hochladen`,avatarChange:`Foto ändern`,avatarRemove:`Entfernen`,avatarHint:`JPG, PNG oder WebP – wird quadratisch zugeschnitten und verkleinert.`,avatarUnreadable:`Das Bild konnte nicht gelesen werden.`,sectionAccount:`Konto`,sectionAccountHint:`Profil, Foto und Passwort.`,sectionGeneral:`Lesen & Darstellung`,sectionGeneralHint:`Design, Sprache und wie Artikel geöffnet werden.`,sectionFilters:`Wortfilter`,sectionFiltersHint:`Blende Artikel mit bestimmten Begriffen aus.`,sectionMcp:`MCP & API`,sectionMcpHint:`Verbinde KI-Assistenten wie Claude mit deinen Feeds.`,sectionUsers:`Nutzer`,sectionUsersHint:`Konten dieser FeedKeeper-Instanz verwalten.`,sectionDatabase:`Datenbank`,sectionDatabaseHint:`Speicherplatz und automatische Bereinigung.`,adminGroup:`Administration`,passwordHint:`Mindestens 10 Zeichen.`,appearanceTitle:`Darstellung`,readingTitle:`Lesen`,themeHint:`Hell, dunkel oder passend zum System.`,mcpStepToken:`Unten ein Token erstellen und kopieren.`,mcpStepUrl:`Im MCP-Client einen Server mit dieser URL anlegen.`,mcpStepHeader:`Das Token als Header „Authorization: Bearer <token>“ mitschicken.`,revokeTokenConfirm:`Token „{{name}}“ widerrufen? Clients, die es nutzen, verlieren sofort den Zugriff.`,noTokens:`Noch keine Tokens.`,mcpOauthTitle:`Option 1: Mit deinem Konto anmelden`,mcpOauthBadge:`Empfohlen`,mcpOauthIntro:`Für ChatGPT, Claude und andere Apps mit Connector-Unterstützung. Du musst kein Token erstellen oder kopieren.`,mcpOauthStep1:`In der App einen eigenen Connector oder Remote-MCP-Server mit der obigen URL hinzufügen.`,mcpOauthStep2:`Bei Aufforderung bei FeedKeeper anmelden.`,mcpOauthStep3:`Festlegen, ob die App nur lesen oder auch deine Feeds ändern darf, und bestätigen.`,mcpOauthDone:`Der Assistent erscheint danach unten unter „Verbundene KI-Assistenten“. Dort kannst du ihn jederzeit trennen.`,mcpTokenTitle:`Option 2: Token verwenden`,mcpTokenIntro:`Für Skripte und Clients ohne Connector-Unterstützung.`,connectedAppsTitle:`Verbundene KI-Assistenten`,connectedAppsHint:`KI-Assistenten wie ChatGPT oder Claude, die sich über MCP an diesem Server angemeldet haben. Trenne einen Assistenten, um seinen Zugriff zu beenden.`,noConnectedApps:`Noch keine KI-Assistenten verbunden.`,disconnectApp:`Trennen`,disconnectAppConfirm:`„{{name}}“ trennen? Der Assistent verliert sofort den Zugriff.`,tokenCreatedOn:`erstellt am {{date}}`,tokenLastUsed:`zuletzt genutzt {{time}}`,tokenNeverUsed:`noch nie genutzt`,userCreated:`Konto angelegt.`,addUserHint:`Selbstregistrierung ist standardmäßig aus – neue Konten legst du hier an.`,offlineSaved:`Offline lesen`,offlineSavedHint:`Hält deine gemerkten Artikel und die neuesten ungelesenen samt Bildern auf diesem Gerät bereit, damit du ohne Verbindung lesen kannst. Änderungen, die du offline machst, werden später gesendet.`,offlineSavedCount:`Offline verfügbare Artikel: {{count}}.`,notifications:`Benachrichtigungen`,notificationsHint:`Erhalte auf diesem Gerät eine Benachrichtigung, wenn Feeds deiner Wahl neue Artikel haben. Aktiviere es pro Feed unter Feeds → Bearbeiten.`,notificationsBlocked:`Benachrichtigungen sind für diese App blockiert. Erlaube sie in den Einstellungen von Gerät oder Browser.`,notificationsIos:`Auf iPhone und iPad füge FeedKeeper zuerst zum Home-Bildschirm hinzu und öffne die App von dort, um Benachrichtigungen zu aktivieren.`,notificationsUnsupported:`Dieser Browser kann keine Benachrichtigungen von FeedKeeper anzeigen.`,notificationsTest:`Test senden`,notificationsTestFailed:`Die Testbenachrichtigung konnte nicht zugestellt werden.`,sectionDevices:`Geräte`,sectionDevicesHint:`Verbinde die FeedKeeper-App auf iPhone oder iPad.`,devicesTitle:`Gekoppelte Geräte`,devicesHint:`Jedes Gerät hat einen eigenen Zugang. Wenn du ein Gerät widerrufst, wird es sofort abgemeldet.`,deviceAdd:`Gerät hinzufügen`,noDevices:`Noch keine Geräte gekoppelt.`,deviceQrAlt:`QR-Code zum Koppeln eines Geräts`,devicePairHint:`Öffne die FeedKeeper-App, wähle „Server hinzufügen“ und scanne diesen Code. Oder gib den Code von Hand ein.`,devicePairExpires:`Noch {{minutes}}:{{seconds}} Minuten gültig, einmal verwendbar.`,devicePairExpired:`Dieser Code ist abgelaufen. Füge das Gerät erneut hinzu, um einen neuen zu erhalten.`,devicePairDone:`Fertig`,deviceRevoke:`Widerrufen`,deviceRevokeConfirm:`„{{name}}“ widerrufen? Das Gerät wird abgemeldet.`,mcpClaudeTitle:`In Claude Desktop oder Cowork nutzen`,mcpClaudeHint:`Füge diesen Schnipsel in deine claude_desktop_config.json ein, um Claude mit deinen Feeds zu verbinden.`,mcpCopyConfig:`Claude-Konfiguration kopieren`,mcpConfigCopied:`Konfiguration kopiert!`},welcome:{title:`Füll deinen Reader`,intro:`Füge eine Website hinzu, wähle ein Starter-Paket oder importiere deine Abos. Deine Artikel erscheinen hier, sobald die ersten Feeds abgerufen sind.`,addTitle:`Website hinzufügen`,packsTitle:`Oder starte mit einem Paket`,packsHint:`Ein paar bekannte Feeds zu einem Thema. Du entscheidest, welche du behältst.`,subscribePack_one:`{{count}} Feed abonnieren`,subscribePack_other:`{{count}} Feeds abonnieren`,subscribingProgress:`Abonniere … {{done}} von {{total}}`,packAdded_one:`{{count}} Feed hinzugefügt.`,packAdded_other:`{{count}} Feeds hinzugefügt.`,packPartial:`{{added}} hinzugefügt, {{failed}} ließen sich nicht hinzufügen.`,importTitle:`Schon einen Feedreader im Einsatz?`,importHint:`Importiere die Abo-Datei (OPML), die dein bisheriger Reader exportiert hat.`,fetchingTitle:`Deine ersten Artikel werden geladen …`,fetchingHint:`Das dauert meist nur wenige Sekunden. Die Seite aktualisiert sich selbst.`},intro:{title:`Kurz erklärt`,subtitle:`Vier Dinge, die gut zu wissen sind. Das erscheint nur einmal.`,viewsTitle:`Liste oder Zeitung`,viewsText:`Oben rechts wechselst du zwischen der Liste und der Zeitungsansicht.`,unreadTitle:`Nur Ungelesenes`,unreadText:`Der Punkt neben der Suche blendet bereits gelesene Artikel aus oder ein.`,starTitle:`Für später merken`,starText:`Der Stern speichert einen Artikel dauerhaft, samt Volltext und Bildern. Der Stern neben der Suche zeigt alles, was du gespeichert hast.`,foldersTitle:`Kategorien`,foldersText:`Unter Feeds legst du Kategorien an und sortierst deine Abos.`,done:`Verstanden`},plan:{limitedTitle:`Dein Konto ist im Moment eingeschränkt`,limitedText:`Feeds hinzufügen, importieren und aktualisieren ist in deinem Tarif im Moment nicht enthalten. Lesen, exportieren und löschen kannst du weiterhin.`,view:`Tarife ansehen`,unavailable:`In deinem Tarif nicht enthalten`},security:{title:`Kontosicherheit`,intro:`Melde dich mit einem Passkey an oder schütze dein Passwort mit einer Authenticator-App.`,confirmIdentity:`Identität für eine Änderung bestätigen`,authenticatorStarted:`Die Einrichtung wurde gestartet. Bestätige sie mit einem Authenticator-Code.`,updated:`Die Sicherheitseinstellungen wurden aktualisiert.`,passkeyAdded:`Der Passkey wurde hinzugefügt.`,passkeyRemoved:`Der Passkey wurde entfernt.`,removeNamed:`Passkey „{{name}}“ entfernen`,refreshFailed:`Die Änderung wurde gespeichert. Die aktualisierte Übersicht konnte nicht geladen werden. Lade die Seite neu, bevor du weitere Änderungen vornimmst.`,reauth:`Bestätige deine Identität, bevor du die Sicherheitseinstellungen änderst.`,usePasskey:`Mit Passkey bestätigen`,password:`Aktuelles Passwort`,code:`Authenticator- oder Wiederherstellungscode`,sendEmail:`Per E-Mail bestätigen (Konten ohne Passwort)`,emailCode:`E-Mail-Bestätigungscode`,passkeys:`Passkeys`,passkeyName:`Name des Passkeys`,addPasskey:`Passkey hinzufügen`,remove:`Entfernen`,httpsRequired:`Passkeys benötigen HTTPS.`,twoFactor:`Zwei-Faktor-Anmeldung`,enabled:`Authenticator-Codes sind für Passwort-Anmeldungen und verknüpfte Anmeldedienste aktiviert.`,disabled:`Authenticator-Codes sind nicht aktiviert.`,enable:`Authenticator einrichten`,disable:`Authenticator deaktivieren`,scan:`Scanne den QR-Code mit deiner Authenticator-App oder gib den Einrichtungsschlüssel ein. Bestätige anschließend mit einem sechsstelligen Code.`,qrAlt:`QR-Code zur Authenticator-Einrichtung`,confirm:`Einrichtung bestätigen`,cancel:`Abbrechen`,newRecovery:`Wiederherstellungscodes ersetzen`,saveRecovery:`Bewahre diese Wiederherstellungscodes sicher auf. Jeder ersetzt einmal einen Authenticator-Code. Sie werden nur jetzt angezeigt; beim Ersetzen werden alte Codes ungültig.`,saved:`Codes sind gespeichert`,failed:`Die Aktion konnte nicht bestätigt werden. Prüfe deine Eingaben und versuche es erneut.`,lastPasskey:`Füge einen weiteren Passkey hinzu, bevor du den letzten entfernst.`,signInPasskey:`Mit Passkey anmelden`,revocationHint:`Änderungen an der Zwei-Faktor-Anmeldung melden andere Sitzungen ab und widerrufen Geräte- und API-Tokens. Verbinde deine Apps danach neu.`,confirmTitle:`Identität bestätigen`,orPassword:`oder mit Passwort`,invalidCredentials:`Das Passwort oder der Bestätigungscode ist nicht korrekt.`,passkeyCancelled:`Passkey-Bestätigung wurde abgebrochen oder nicht erkannt.`,confirmAction:`Bestätigen`}},kt={common:{appName:`FeedKeeper`,loading:`読み込み中…`,save:`保存`,cancel:`キャンセル`,delete:`削除`,close:`閉じる`,error:`問題が発生しました`,retry:`再試行`,loadMore:`さらに読み込む`,noOptions:`選択肢がありません`,metaTitle:`FeedKeeper – RSSリーダー & MCPサーバー`,metaDescription:`AIアシスタント連携に対応したセルフホスト型RSS/Atomフィードリーダー & MCPサーバー。`,offlineBanner:`オフラインです。読んだり変更したりでき、接続が戻ると送信されます。`,offlineTitle:`接続できません`,offlineText:`現在サーバーに接続できません。接続を確認してもう一度お試しください。`,offlineAction:`オフラインです。この操作には接続が必要です。`,offlinePending:`送信待ち:{{count}}件。`},nav:{items:`記事`,feeds:`フィード`,settings:`設定`,logout:`ログアウト`,menu:`メニュー`,account:`アカウント`,footerLinks:`その他のリンク`},onboarding:{subtitle:`セットアップを完了するには、最初の管理者アカウントを作成してください。`,emailLabel:`メールアドレス`,displayNameLabel:`表示名`,passwordLabel:`パスワード`,passwordHint:`10文字以上で入力してください。`,submit:`管理者アカウントを作成`,orUseCli:`ターミナルの方がお好みですか?`,cliHint:`代わりにサーバーで「npm run setup」を実行してください。どちらの方法でも同じ最初の管理者アカウントが作成されます。`},login:{subtitle:`RSSリーダー & MCPサーバー`,emailLabel:`メールアドレス`,passwordLabel:`パスワード`,submit:`ログイン`,error:`メールアドレスまたはパスワードが正しくありません。`,viewOnGithub:`GitHubでFeedKeeperを見る`},feeds:{title:`フィード`,urlPlaceholder:`example.com またはフィードURL`,labelPlaceholder:`ラベル(任意)`,subscribe:`登録`,subscribed:`登録済みです`,subscribing:`登録中…`,multipleFeedsFound:`複数のフィードが見つかりました。1つ選択してください:`,unsubscribe:`登録解除`,unsubscribeConfirm:`「{{title}}」の登録を解除しますか?`,unread:`未読 {{count}} 件`,alreadySubscribed:`このフィードは既に登録されています。`,noFeedsFoundOnPage:`このWebページからRSS/Atomフィードが見つかりませんでした。`,interval:`確認間隔`,minutesShort:`{{count}}分`,hoursShort:`{{count}}時間`,edit:`編集`,markAllRead:`すべて既読にする`,importOpml:`OPMLをインポート`,exportOpml:`OPMLをエクスポート`,importing:`フィードをインポート中…`,importSuccess:`インポート完了: {{imported}} 件追加、{{skipped}} 件は登録済み。`,importPartial:`インポート完了: {{imported}} 件追加、{{skipped}} 件スキップ、{{failed}} 件失敗。`,importFailed:`OPMLファイルの解析またはインポートに失敗しました。`,refreshFeed:`今すぐ確認`,refreshAll:`すべて確認`,refreshing:`確認中…`,statusFailing:`取得エラー ({{count}}回連続失敗)`,statusPending:`初回確認待ち`,manageFolders:`フォルダーの管理`,noFolder:`フォルダーなし`,folder:`フォルダー`,newFolderPlaceholder:`新しいフォルダー (例: Tech)`,addFolder:`フォルダーを作成`,deleteFolderConfirm:`フォルダー「{{name}}」を削除しますか?登録フィードは保持されます。`,folderGroup:`フォルダー`,feedGroup:`個別フィード`,dragHandle:`ドラッグして並び替え`,fullText:`ウェブサイトから全文を読み込む`,fullTextHint:`フィードに概要しかない場合、リーダーが記事全文を取得します。`,fullTextBlocked:`このサイトは最近 Cookie への同意または購読を求めました。数日後に再試行します。`,addFeed:`フィードを追加`,addFeedShort:`追加`,searchPlaceholder:`フィードを検索…`,failingCount:`エラー {{count}} 件`,filterAll:`すべて`,filterFailing:`エラー`,uncategorized:`カテゴリなし`,moreActions:`その他の操作`,checkedAgo:`{{time}}に確認`,errors:{unavailable:`ソースに現在接続できません(エラー {{status}})。FeedKeeper が自動的に再試行します。`,notFound:`フィードが見つかりません(エラー {{status}})。アドレスが変更された可能性があります。`,refused:`ソースがアクセスを拒否しています(エラー {{status}})。`,rejected:`ソースがリクエストを拒否しました(エラー {{status}})。`,limited:`ソースがリクエストを制限しています。FeedKeeper が後で再試行します。`,timeout:`ソースが時間内に応答しませんでした。FeedKeeper が自動的に再試行します。`,network:`ソースに接続できませんでした。FeedKeeper が自動的に再試行します。`,invalidFeed:`応答が有効なフィードではありません。`},everyInterval:`{{interval}}ごと`,noMatches:`該当するフィードはありません。`,feedCount_one:`{{count}} 件のフィード`,feedCount_other:`{{count}} 件のフィード`,renameFolderHint:`名前をクリックして変更できます。`,emptyTitle:`フィードはまだありません`,emptyHint:`ニュースサイト、ブログ、ポッドキャストを購読しましょう。ウェブサイトのアドレスを入力するだけで、FeedKeeper がフィードを見つけます。`,subscribedToast:`「{{title}}」を購読しました。`,subscribeFailed:`フィードを購読できませんでした。`,refreshedToast_one:`「{{title}}」を確認しました – 新着 {{count}} 件。`,refreshedToast_other:`「{{title}}」を確認しました – 新着 {{count}} 件。`,refreshFailedToast:`「{{title}}」を取得できませんでした: {{error}}`,refreshPendingToast:`「{{title}}」の更新は保留中です。FeedKeeper が自動的に確認を続けます。`,refreshAllPendingToast_one:`{{count}} 件の更新が保留中です。FeedKeeper が自動的に確認を続けます。これまでの新着記事は {{newItems}} 件です。`,refreshAllPendingToast_other:`{{count}} 件の更新が保留中です。FeedKeeper が自動的に確認を続けます。これまでの新着記事は {{newItems}} 件です。`,refreshedAllToast_one:`{{count}} 件のフィードを確認しました – 新着 {{newItems}} 件。`,refreshedAllToast_other:`{{count}} 件のフィードを確認しました – 新着 {{newItems}} 件。`,unsubscribedToast:`「{{title}}」の購読を解除しました。`,markedReadToast:`「{{title}}」のすべての記事を既読にしました。`,changesSaved:`変更を保存しました。`,folderCreated:`カテゴリ「{{name}}」を作成しました。`,folderRenamed:`カテゴリ名を「{{name}}」に変更しました。`,folderDeleted:`カテゴリ「{{name}}」を削除しました。`,notify:`新着記事を通知する`,notifyHint:`通知をオンにした端末に通知を送ります。`,notifyActive:`このフィードの通知が有効です`,badge:`アプリアイコンの数に含める`,badgeHint:`このフィードの未読記事をアプリアイコンの数に加えます。初期設定ではオフです。`},items:{title:`記事`,viewMode:`記事の表示形式`,listView:`リスト`,newspaperView:`新聞`,markRead:`既読にする`,markUnread:`未読にする`,searchPlaceholder:`記事を検索…`,unreadOnly:`未読のみ`,all:`すべて表示`,bookmarkedOnly:`保存した記事のみ`,bookmark:`保存`,unbookmark:`保存を解除`,allFeeds:`すべてのフィード`,noItems:`表示する記事がありません。`,refresh:`記事を更新`,refreshing:`フィードを更新中…`,refreshFailed:`更新に失敗しました。もう一度お試しください。`,noSaved:`保存した記事はまだありません。星をタップすると、全文と画像を含めて記事を保存できます。`,unreadIgnoredInSaved:`保存した記事は既読・未読にかかわらず表示されます。`,loadFailed:`記事を読み込めませんでした。`,allReadTitle:`すべて読みました`,allReadHint:`すべての記事を読みました。新しい記事が届くとここに表示されます。`,noResults:`見つかりませんでした。`},reader:{close:`閉じる (Esc)`,previous:`前の記事 (K または ←)`,next:`次の記事 (J または →)`,openOriginal:`元記事を開く`,copyLink:`リンクをコピー`,linkCopied:`リンクをコピーしました!`,readingTime:`読了目安 {{count}}分`,toggleFullText:`ウェブから全文を抽出 (R)`,togglePreview:`プレビューに戻る (R)`,extractionFailed:`ウェブサイトから記事の全文を抽出できませんでした。`,bookmark:`保存 (S)`,unbookmark:`保存を解除 (S)`,markRead:`既読にする (M)`,markUnread:`未読にする (M)`,consentWall:`このサイトは Cookie への同意または購読を求めています。フィードのプレビューを表示しています。`,readOriginal:`元のサイトで読む`,paywallRead:`記事の全文を読む · 有料`},settings:{title:`設定`,tokensTitle:`パーソナルアクセストークン`,tokensHint:`OAuthでサインインできないクライアント(スクリプトや設定ファイルなど)にのみ必要です。トークンはパスワードと同じように扱ってください。`,createToken:`トークンを作成`,tokenReadOnly:`読み取り専用`,tokenReadWrite:`読み取りと書き込み`,tokenNamePlaceholder:`トークン名(例:「Claude Desktop」)`,tokenCreated:`トークンを作成しました`,tokenCreatedHint:`今すぐコピーしてください。二度と表示されません。`,copyToken:`コピー`,copied:`コピーしました!`,deleteToken:`失効`,usersTitle:`ユーザー`,addUser:`ユーザーを追加`,roleAdmin:`管理者`,roleUser:`ユーザー`,mcpTitle:`MCPクライアントを接続`,mcpHint:`Claude、ChatGPT、その他のMCPクライアントをフィードに接続します。`,mutedKeywordsTitle:`ミュートキーワード (単語フィルター)`,mutedKeywordsHint:`タイトルまたは本文にこれらのキーワードが含まれる記事は、記事一覧から自動的に除外されます。`,mutedKeywordPlaceholder:`ミュートするキーワード (例:「PR」)`,addMutedKeyword:`追加`,removeMutedKeyword:`削除`,noMutedKeywords:`ミュートされたキーワードはありません。`,language:`言語`,languageHint:`表示言語を選択してください。`,theme:`テーマ`,themeLight:`ライト`,themeDark:`ダーク`,themeSystem:`システム`,changePasswordTitle:`パスワードを変更`,currentPasswordLabel:`現在のパスワード`,newPasswordLabel:`新しいパスワード`,confirmPasswordLabel:`新しいパスワード(確認)`,changePasswordButton:`パスワードを変更`,passwordChanged:`パスワードを変更しました。`,passwordMismatch:`新しいパスワードが一致しません。`,incorrectPassword:`現在のパスワードが正しくありません。`,retentionTitle:`保持期間`,retentionHint:`古い記事や既読記事を自動的に削除し、ディスク使用量を抑えて検索パフォーマンスを向上させます。`,statTotalItems:`総記事数`,statReadItems:`既読記事数`,statFeedsCount:`アクティブなフィード数`,statDbSize:`ファイルサイズ (SQLite + WAL)`,retentionReadDaysLabel:`既読記事の保持期間 (日)`,retentionReadDaysHint:`0 = 既読後即時削除、デフォルト: 30日`,retentionMaxDaysLabel:`最大記事保持期間 (日)`,retentionMaxDaysHint:`0 = 無制限、デフォルト: 90日`,retentionMaxItemsLabel:`フィードあたりの最大記事数`,retentionMaxItemsHint:`0 = 無制限、デフォルト: 1000件`,autoCleanupLabel:`毎日午前3時に自動クリーンアップを実行する`,saveRetention:`設定を保存`,retentionSaved:`設定を保存しました。`,runCleanupNow:`今すぐクリーンアップを実行 (VACUUM)`,cleaning:`クリーンアップ中…`,cleanupSuccess:`クリーンアップが完了しました: {{total}} 件の記事を削除しました。サイズ: {{before}} MB -> {{after}} MB。`,installApp:`アプリをインストール`,installAppHint:`FeedKeeper をホーム画面または Dock に単独のアプリとして追加します。`,installAppButton:`インストール`,installAppIos:`Safari で共有アイコン(必要に応じて「…」メニューから)をタップし、「ホーム画面に追加」を選択してください。`,installAppMacSafari:`Safari のメニューで「ファイル」›「Dock に追加」を選択してください。`,profileTitle:`プロフィール`,displayNameLabel:`表示名`,profileSaved:`プロフィールを保存しました。`,avatarUpload:`写真をアップロード`,avatarChange:`写真を変更`,avatarRemove:`削除`,avatarHint:`JPG、PNG、WebP に対応。正方形に切り抜いて縮小します。`,avatarUnreadable:`画像を読み込めませんでした。`,autoReaderMode:`デフォルトでリーダーモードで開く`,autoReaderModeHint:`詳細表示を開いたときに、整形された記事の全文を自動で読み込みます。`,sectionAccount:`アカウント`,sectionAccountHint:`プロフィール、写真、パスワード。`,sectionGeneral:`表示と閲覧`,sectionGeneralHint:`テーマ、言語、記事の開き方。`,sectionFilters:`ワードフィルター`,sectionFiltersHint:`特定の語句を含む記事を非表示にします。`,sectionMcp:`MCP と API`,sectionMcpHint:`Claude などの AI アシスタントをフィードに接続します。`,sectionUsers:`ユーザー`,sectionUsersHint:`この FeedKeeper のアカウントを管理します。`,sectionDatabase:`データベース`,sectionDatabaseHint:`容量と自動クリーンアップ。`,adminGroup:`管理`,passwordHint:`10 文字以上。`,appearanceTitle:`表示`,readingTitle:`閲覧`,themeHint:`ライト、ダーク、またはシステムに合わせる。`,mcpStepToken:`下でトークンを作成してコピーします。`,mcpStepUrl:`MCP クライアントにこの URL のサーバーを追加します。`,mcpStepHeader:`トークンを「Authorization: Bearer <token>」ヘッダーで送信します。`,revokeTokenConfirm:`トークン「{{name}}」を取り消しますか?使用中のクライアントはすぐにアクセスできなくなります。`,noTokens:`トークンはまだありません。`,mcpOauthTitle:`方法1:アカウントでサインイン`,mcpOauthBadge:`おすすめ`,mcpOauthIntro:`ChatGPT、Claudeなど、コネクタに対応したアプリ向けです。トークンを作成・コピーする必要はありません。`,mcpOauthStep1:`アプリで、上のURLを使ってカスタムコネクタまたはリモートMCPサーバーを追加します。`,mcpOauthStep2:`求められたらFeedKeeperにサインインします。`,mcpOauthStep3:`アプリに読み取りだけを許可するか、フィードの変更も許可するかを選んで確定します。`,mcpOauthDone:`その後、アシスタントは下の「接続済みのAIアシスタント」に表示され、いつでも接続を解除できます。`,mcpTokenTitle:`方法2:トークンを使う`,mcpTokenIntro:`スクリプトや、コネクタに対応していないクライアント向けです。`,connectedAppsTitle:`接続済みのAIアシスタント`,connectedAppsHint:`MCP経由でこのサーバーにサインインしたChatGPTやClaudeなどのAIアシスタントです。接続を解除するとアクセスが終了します。`,noConnectedApps:`接続されているAIアシスタントはまだありません。`,disconnectApp:`接続解除`,disconnectAppConfirm:`「{{name}}」の接続を解除しますか?すぐにアクセスできなくなります。`,tokenCreatedOn:`{{date}} に作成`,tokenLastUsed:`最終使用 {{time}}`,tokenNeverUsed:`未使用`,userCreated:`アカウントを作成しました。`,addUserHint:`セルフ登録は既定で無効です。新しいアカウントはここで作成します。`,offlineSaved:`オフラインで読む`,offlineSavedHint:`保存した記事と最新の未読記事を画像ごとこの端末に保持し、接続なしで読めるようにします。オフライン中の変更は後で送信されます。`,offlineSavedCount:`オフラインで読める記事:{{count}}件。`,notifications:`通知`,notificationsHint:`選んだフィードに新着記事があると、この端末に通知します。「フィード」→「編集」でフィードごとにオンにします。`,notificationsBlocked:`このアプリの通知はブロックされています。端末またはブラウザの設定で許可してください。`,notificationsIos:`iPhoneとiPadでは、先にFeedKeeperをホーム画面に追加し、そこから開いて通知をオンにしてください。`,notificationsUnsupported:`このブラウザではFeedKeeperの通知を表示できません。`,notificationsTest:`テスト送信`,notificationsTestFailed:`テスト通知を配信できませんでした。`,sectionDevices:`デバイス`,sectionDevicesHint:`iPhoneやiPadのFeedKeeperアプリを接続します。`,devicesTitle:`ペアリング済みデバイス`,devicesHint:`各デバイスには個別のアクセス権があります。取り消すとすぐにサインアウトされます。`,deviceAdd:`デバイスを追加`,noDevices:`ペアリング済みのデバイスはありません。`,deviceQrAlt:`デバイスをペアリングするQRコード`,devicePairHint:`FeedKeeperアプリを開き、サーバーの追加を選んでこのコードをスキャンしてください。コードを手入力することもできます。`,devicePairExpires:`あと{{minutes}}:{{seconds}}有効、1回のみ使用できます。`,devicePairExpired:`このコードは期限切れです。もう一度デバイスを追加して新しいコードを取得してください。`,devicePairDone:`完了`,deviceRevoke:`取り消す`,deviceRevokeConfirm:`「{{name}}」を取り消しますか?デバイスはサインアウトされます。`,mcpClaudeTitle:`Claude Desktop または Cowork で利用する`,mcpClaudeHint:`claude_desktop_config.json にこのスニペットを追加すると、Claude をフィードに接続できます。`,mcpCopyConfig:`Claude 設定をコピー`,mcpConfigCopied:`設定をコピーしました!`},welcome:{title:`リーダーを始めましょう`,intro:`ウェブサイトを追加するか、スターターパックを選ぶか、購読リストをインポートしてください。最初のフィードを取得すると、記事がここに表示されます。`,addTitle:`ウェブサイトを追加`,packsTitle:`またはパックから始める`,packsHint:`テーマごとの定番フィードです。残すものは自分で選べます。`,subscribePack_one:`{{count}} 件のフィードを購読`,subscribePack_other:`{{count}} 件のフィードを購読`,subscribingProgress:`購読中… {{done}} / {{total}}`,packAdded_one:`{{count}} 件のフィードを追加しました。`,packAdded_other:`{{count}} 件のフィードを追加しました。`,packPartial:`{{added}} 件を追加、{{failed}} 件は追加できませんでした。`,importTitle:`すでにフィードリーダーを使っていますか?`,importHint:`以前のリーダーでエクスポートした購読ファイル(OPML)をインポートできます。`,fetchingTitle:`最初の記事を取得しています…`,fetchingHint:`通常は数秒で終わります。ページは自動で更新されます。`},intro:{title:`かんたんガイド`,subtitle:`知っておくと便利な4つのポイントです。表示されるのは一度だけです。`,viewsTitle:`リストと紙面`,viewsText:`右上で、リスト表示と紙面表示を切り替えられます。`,unreadTitle:`未読のみ`,unreadText:`検索欄の横にある丸いボタンで、既読の記事を非表示にしたり、表示したりできます。`,starTitle:`あとで読む`,starText:`星印を付けると、記事を全文と画像ごと残せます。検索欄の横の星印で、保存した記事をすべて表示できます。`,foldersTitle:`フォルダー`,foldersText:`「フィード」で、フォルダーを作って購読を整理できます。`,done:`わかりました`},plan:{limitedTitle:`アカウントは現在、制限されています`,limitedText:`現在のプランには、フィードの追加・インポート・更新が含まれていません。閲覧、エクスポート、削除は引き続きご利用いただけます。`,view:`プランを見る`,unavailable:`現在のプランには含まれていません`},security:{title:`アカウントのセキュリティ`,intro:`パスキーでサインインするか、認証アプリでパスワードを保護します。`,confirmIdentity:`変更のために本人確認を行う`,authenticatorStarted:`設定を開始しました。認証アプリのコードで確認してください。`,updated:`セキュリティ設定を更新しました。`,passkeyAdded:`パスキーを追加しました。`,passkeyRemoved:`パスキーを削除しました。`,removeNamed:`パスキー「{{name}}」を削除`,refreshFailed:`変更は保存されましたが、更新後の一覧を読み込めませんでした。続けて変更する前にページを再読み込みしてください。`,reauth:`セキュリティ設定を変更する前に本人確認を行ってください。`,usePasskey:`パスキーで確認`,password:`現在のパスワード`,code:`認証コードまたはリカバリーコード`,sendEmail:`メールで確認(パスワード未設定のアカウント)`,emailCode:`メール確認コード`,passkeys:`パスキー`,passkeyName:`パスキーの名前`,addPasskey:`パスキーを追加`,remove:`削除`,httpsRequired:`パスキーにはHTTPSが必要です。`,twoFactor:`2要素認証`,enabled:`パスワードと連携した認証サービスでのサインインに認証コードが有効です。`,disabled:`認証コードは無効です。`,enable:`認証アプリを設定`,disable:`認証アプリを無効にする`,scan:`認証アプリでQRコードをスキャンするか、設定キーを入力してください。その後6桁のコードで確認します。`,qrAlt:`認証アプリ設定用QRコード`,confirm:`設定を確認`,cancel:`キャンセル`,newRecovery:`リカバリーコードを再発行`,saveRecovery:`リカバリーコードを安全な場所に保存してください。各コードは認証コードの代わりに1回使えます。表示は今回のみです。再発行すると古いコードは無効になります。`,saved:`コードを保存しました`,failed:`操作を確認できませんでした。入力内容を確認して再試行してください。`,lastPasskey:`最後のパスキーを削除する前に別のパスキーを追加してください。`,signInPasskey:`パスキーでサインイン`,revocationHint:`2要素認証を変更すると他のセッションがサインアウトされ、デバイスとAPIトークンが無効になります。その後アプリを再接続してください。`,confirmTitle:`本人確認`,orPassword:`またはパスワードで`,invalidCredentials:`パスワードまたは確認コードが正しくありません。`,passkeyCancelled:`パスキーの確認がキャンセルされたか認識されませんでした。`,confirmAction:`確認`}},At=`fk_lang`;function jt(e){try{let t=window.location.protocol===`https:`?`; Secure`:``;document.cookie=`${At}=${encodeURIComponent(e)}; Path=/; Max-Age=31536000; SameSite=Lax${t}`}catch{}try{localStorage.setItem(At,e)}catch{}}je.use(Et).use(Xe).init({resources:{en:{translation:Dt},de:{translation:Ot},ja:{translation:kt}},fallbackLng:`en`,supportedLngs:[`en`,`de`,`ja`],interpolation:{escapeValue:!1},detection:{order:[`cookie`,`localStorage`,`navigator`],caches:[],lookupCookie:At,lookupLocalStorage:At}});var Mt=`modulepreload`,Nt=function(e){return`/`+e},Pt={},Ft=function(e){return e.pathname.endsWith(`.css`)},It=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Lt=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Nt(t,n);let r=s(t),i=Ft(r);return It(Pt,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Mt,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Rt=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,zt=/^[\\/]{2}/;function Bt(e,t){return t+e.replace(/\\/g,`/`)}var Vt=`popstate`;function Ht(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Ut(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return qt(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:Jt(t)}return Xt(t,n,null,e)}function Wt(e,t){if(e===!1||e==null)throw Error(t)}function Gt(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Kt(){return Math.random().toString(36).substring(2,10)}function R(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function qt(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Yt(t):t,state:n,key:t&&t.key||r||Kt(),mask:i}}function Jt({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Yt(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Xt(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Ht(e)?e:qt(h.location,e,t);n&&n(r,e),l=u()+1;let d=R(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Ht(e)?e:qt(h.location,e,t);n&&n(r,e),l=u();let i=R(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return Zt(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Vt,d),c=e,()=>{i.removeEventListener(Vt,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function Zt(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),Wt(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:Jt(t);return i=i.replace(/ $/,`%20`),!n&&zt.test(i)&&(i=r+i),new URL(i,r)}function Qt(e,t,n=`/`){return $t(e,t,n,!1)}function $t(e,t,n,r,i){let a=yn((typeof t==`string`?Yt(t):t).pathname||`/`,n);if(a==null)return null;let o=i??en(e),s=null,c=vn(a);for(let e=0;s==null&&e<o.length;++e)s=mn(o[e],c,r);return s}function en(e){let t=tn(e);return rn(t),t}function tn(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;Wt(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Dn([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(Wt(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),tn(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:fn(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=_n(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of nn(e.path))a(e,t,!0,n)}),t}function nn(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=nn(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function rn(e){e.sort((e,t)=>e.score===t.score?pn(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var an=/^:[\w-]+$/,on=3,sn=2,cn=1,ln=10,un=-2,dn=e=>e===`*`;function fn(e,t){let n=e.split(`/`),r=n.length;return n.some(dn)&&(r+=un),t&&(r+=sn),n.filter(e=>!dn(e)).reduce((e,t)=>e+(an.test(t)?on:t===``?cn:ln),r)}function pn(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function mn(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?gn(u,l,s.matcher,s.compiledParams):hn(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=hn({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Dn([a,d.pathname]),pathnameBase:kn(Dn([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Dn([a,d.pathnameBase]))}return o}function hn(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=_n(e.path,e.caseSensitive,e.end);return gn(e,t,n,r)}function gn(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=On(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=On(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function _n(e,t=!1,n=!0){Gt(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function vn(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Gt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function yn(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function bn(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Yt(e):e,a;return n?(n=En(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?xn(n.substring(1),`/`):xn(n,t)):a=t,{pathname:a,search:An(r),hash:jn(i)}}function xn(e,t){let n=On(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Sn(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Cn(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function wn(e){let t=Cn(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Tn(e,t,n,r=!1){let i;typeof e==`string`?i=Yt(e):(i={...e},Wt(!i.pathname||!i.pathname.includes(`?`),Sn(`?`,`pathname`,`search`,i)),Wt(!i.pathname||!i.pathname.includes(`#`),Sn(`#`,`pathname`,`hash`,i)),Wt(!i.search||!i.search.includes(`#`),Sn(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=bn(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var En=e=>e.replace(/[\\/]{2,}/g,`/`),Dn=e=>En(e.join(`/`));function On(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var kn=e=>On(e).replace(/^\/*/,`/`),An=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,jn=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Mn=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Nn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Pn(e){return Dn(e.map(e=>e.route.path).filter(Boolean))||`/`}var Fn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function In(e,t){let n=e;if(typeof n!=`string`||!Rt.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Fn)try{let e=new URL(window.location.href),r=zt.test(n)?new URL(Bt(n,e.protocol)):new URL(n),a=yn(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Gt(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ln=new URL(`http://localhost`);function Rn(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Ln)}catch{return Ln}}function zn(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Bn(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Vn(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!zn(i,n),s=!zn(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Bn(e,i)||!zn(i,a)))throw Error(`External navigation is not allowed`)}var Hn=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Hn);var Un=[`GET`,...Hn];new Set(Un);var Wn=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Gn(e){try{return Wn.includes(new URL(e).protocol)}catch{return!1}}var Kn=_.createContext(null);Kn.displayName=`DataRouter`;var qn=_.createContext(null);qn.displayName=`DataRouterState`;var Jn=_.createContext(!1);function Yn(){return _.useContext(Jn)}var Xn=_.createContext({isTransitioning:!1});Xn.displayName=`ViewTransition`;var Zn=_.createContext(new Map);Zn.displayName=`Fetchers`;var Qn=_.createContext(null);Qn.displayName=`Await`;var $n=_.createContext(null);$n.displayName=`Navigation`;var er=_.createContext(null);er.displayName=`Location`;var tr=_.createContext({outlet:null,matches:[],isDataRoute:!1});tr.displayName=`Route`;var nr=_.createContext(null);nr.displayName=`RouteError`;var rr=`REACT_ROUTER_ERROR`,ir=`REDIRECT`,ar=`ROUTE_ERROR_RESPONSE`;function or(e){if(e.startsWith(`${rr}:${ir}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function sr(e){if(e.startsWith(`${rr}:${ar}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Mn(t.status,t.statusText,t.data)}catch{}}function cr(e,{relative:t}={}){Wt(lr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext($n),{hash:i,pathname:a,search:o}=_r(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Dn([n,a])),r.createHref({pathname:s,search:o,hash:i})}function lr(){return _.useContext(er)!=null}function ur(){return Wt(lr(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(er).location}var dr=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function fr(e){_.useContext($n).static||_.useLayoutEffect(e)}function pr(){let{isDataRoute:e}=_.useContext(tr);return e?Pr():mr()}function mr(){Wt(lr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=_.useContext(Kn),{basename:t,navigator:n}=_.useContext($n),{matches:r}=_.useContext(tr),{pathname:i}=ur(),a=JSON.stringify(wn(r)),o=_.useRef(!1);return fr(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(Gt(o.current,dr),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Tn(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Dn([t,c.pathname])),Vn(typeof r==`string`?r:Jt(r),n.createHref(c),Rn(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var hr=_.createContext(null);function gr(e){let t=_.useContext(tr).outlet;return _.useMemo(()=>t&&_.createElement(hr.Provider,{value:e},t),[t,e])}function _r(e,{relative:t}={}){let{matches:n}=_.useContext(tr),{pathname:r}=ur(),i=JSON.stringify(wn(n));return _.useMemo(()=>Tn(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function vr(e,t){return yr(e,t)}function yr(e,t,n){Wt(lr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext($n),{matches:i}=_.useContext(tr),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Ir(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
10
 
11
- Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=ur(),d;if(t){let e=typeof t==`string`?Yt(t):t;Wt(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):Qt(e,{pathname:p});Gt(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Gt(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=Er(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Dn([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Dn([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?_.createElement(er.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function br(){let e=Nr(),t=Nn(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=_.createElement(_.Fragment,null,_.createElement(`p`,null,`💿 Hey developer 👋`),_.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,_.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,_.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),_.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:i},n):null,o)}var xr=_.createElement(br,null),Sr=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=sr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(tr.Provider,{value:this.props.routeContext},_.createElement(nr.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(wr,{error:e},t):t}};Sr.contextType=Jn;var Cr=new WeakMap;function wr({children:e,error:t}){let{basename:n,navigator:r}=_.useContext($n);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=or(t.digest);if(e){let i=Cr.get(t);if(i)throw i;let a=In(e.location,n),o=a.absoluteURL||a.to;if(Vn(e.location,o,Rn(r),`allow-explicit`),Gn(o))throw Error(`Invalid redirect location`);if(Fn&&!Cr.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Cr.set(t,n),n}}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Tr({routeContext:e,match:t,children:n}){let r=_.useContext(Kn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(tr.Provider,{value:e},n)}function Er(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);Wt(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Pn(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||xr,o&&(s<0&&c===0?(Ir(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(Tr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(Sr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Dr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Or(e){let t=_.useContext(Kn);return Wt(t,Dr(e)),t}function kr(e){let t=_.useContext(qn);return Wt(t,Dr(e)),t}function Ar(e){let t=_.useContext(tr);return Wt(t,Dr(e)),t}function jr(e){let t=Ar(e),n=t.matches[t.matches.length-1];return Wt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Mr(){return jr(`useRouteId`)}function Nr(){let e=_.useContext(nr),t=kr(`useRouteError`),n=jr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Pr(){let{router:e}=Or(`useNavigate`),t=jr(`useNavigate`),n=_.useRef(!1);return fr(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{Gt(n.current,dr),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Fr={};function Ir(e,t,n){!t&&!Fr[e]&&(Fr[e]=!0,Gt(!1,n))}_.memo(Lr);function Lr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return yr(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Rr({to:e,replace:t,state:n,relative:r}){Wt(lr(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=_.useContext($n);Gt(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=_.useContext(tr),{pathname:s}=ur(),c=pr(),l=Tn(e,wn(o),s,r===`path`);Vn(typeof e==`string`?e:Jt(e),a.createHref(l),Rn(a),`reject`);let u=JSON.stringify(l);return _.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function zr(e){return gr(e.context)}function Br(e){Wt(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Vr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){Wt(!lr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Yt(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=_.useMemo(()=>{let e=yn(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Gt(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:_.createElement($n.Provider,{value:c},_.createElement(er.Provider,{children:t,value:h}))}function Hr({children:e,location:t}){return vr(Ur(e),t)}_.Component;function Ur(e,t=[]){let n=[];return _.Children.forEach(e,(e,r)=>{if(!_.isValidElement(e))return;let i=[...t,r];if(e.type===_.Fragment){n.push.apply(n,Ur(e.props.children,i));return}Wt(e.type===Br,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Wt(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Ur(e.props.children,i)),n.push(a)}),n}var Wr=`get`,Gr=`application/x-www-form-urlencoded`;function Kr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function qr(e){return Kr(e)&&e.tagName.toLowerCase()===`button`}function Jr(e){return Kr(e)&&e.tagName.toLowerCase()===`form`}function Yr(e){return Kr(e)&&e.tagName.toLowerCase()===`input`}function Xr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Zr(e,t){return e.button===0&&(!t||t===`_self`)&&!Xr(e)}function Qr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function $r(e,t){let n=Qr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var ei=null;function ti(){if(ei===null)try{new FormData(document.createElement(`form`),0),ei=!1}catch{ei=!0}return ei}var ni=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ri(e){return e!=null&&!ni.has(e)?(Gt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gr}"`),null):e}function ii(e,t){let n,r,i,a,o;if(Jr(e)){let o=e.getAttribute(`action`);r=o?yn(o,t):null,n=e.getAttribute(`method`)||Wr,i=ri(e.getAttribute(`enctype`))||Gr,a=new FormData(e)}else if(qr(e)||Yr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?yn(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Wr,i=ri(e.getAttribute(`formenctype`))||ri(o.getAttribute(`enctype`))||Gr,a=new FormData(o,e),!ti()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Kr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Wr,r=null,i=Gr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function ai(e,t){if(e===!1||e==null)throw Error(t)}function oi(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&yn(i.pathname,t)===`/`?`${On(t)}/_root.${r}`:`${On(i.pathname)}.${r}`,i}async function si(e,t){if(e.id in t)return t[e.id];try{let n=await Lt(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ci(e){return e!=null&&typeof e.page==`string`}function li(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function ui(e,t,n){return hi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await si(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(li).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function di(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function fi(e,t,{includeHydrateFallback:n}={}){return pi(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function pi(e){return[...new Set(e)]}function mi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function hi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!ci(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(mi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function gi(){let e=_.useContext(Kn);return ai(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function _i(){let e=_.useContext(qn);return ai(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var vi=_.createContext(void 0);vi.displayName=`FrameworkContext`;function yi(){let e=_.useContext(vi);return ai(e,`You must render this element inside a <HydratedRouter> element`),e}function bi(e,t){let n=_.useContext(vi),[r,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=_.useRef(null);_.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),_.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:xi(s,p),onBlur:xi(c,m),onMouseEnter:xi(l,p),onMouseLeave:xi(u,m),onTouchStart:xi(d,p)}]:[a,f,{}]:[!1,f,{}]}function xi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Si({page:e,...t}){let n=Yn(),{nonce:r}=yi(),{router:i}=gi(),a=_.useMemo(()=>Qt(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?_.createElement(wi,{page:e,matches:a,...t}):_.createElement(Ti,{page:e,matches:a,...t})):null}function Ci(e){let{manifest:t,routeModules:n}=yi(),[r,i]=_.useState([]);return _.useEffect(()=>{let r=!1;return ui(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function wi({page:e,matches:t,...n}){let r=ur(),{future:i}=yi(),{basename:a}=gi(),o=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=oi(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return _.createElement(_.Fragment,null,o.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Ti({page:e,matches:t,...n}){let r=ur(),{future:i,manifest:a,routeModules:o}=yi(),{basename:s}=gi(),{loaderData:c,matches:l}=_i(),u=_.useMemo(()=>di(e,t,l,a,r,`data`),[e,t,l,a,r]),d=_.useMemo(()=>di(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=oi(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=_.useMemo(()=>fi(d,a),[d,a]),m=Ci(d);return _.createElement(_.Fragment,null,f.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>_.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>_.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ei(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}_.Component;var Di=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Di&&(window.__reactRouterVersion=`7.18.4`)}catch{}function Oi({basename:e,children:t,useTransitions:n,window:r}){let i=_.useRef();i.current??=Ut({window:r,v5Compat:!0});let a=i.current,[o,s]=_.useState({action:a.action,location:a.location}),c=_.useCallback(e=>{n===!1?s(e):_.startTransition(()=>s(e))},[n]);return _.useLayoutEffect(()=>a.listen(c),[a,c]),_.createElement(Vr,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var ki=_.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:v}=_.useContext($n),y=typeof l==`string`&&Rt.test(l),b=In(l,h);l=b.to;let x=cr(l,{relative:r}),S=ur(),C=null;if(o){let e=Tn(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Dn([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=bi(n,p),D=Pi(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function ee(t){e&&e(t),t.defaultPrevented||D(t)}let O=!(b.isExternal||i),te=_.createElement(`a`,{...p,...E,href:(O?C:void 0)||b.absoluteURL||x,onClick:O?ee:e,ref:Ei(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?_.createElement(_.Fragment,null,te,_.createElement(Si,{page:x})):te});ki.displayName=`Link`;var Ai=_.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=_r(a,{relative:c.relative}),d=ur(),f=_.useContext(qn),{navigator:p,basename:m}=_.useContext($n),h=f!=null&&Bi(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=yn(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=v===g||!r&&v.startsWith(g)&&v.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return _.createElement(ki,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Ai.displayName=`NavLink`;var ji=_.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Wr,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=_.useContext($n),g=Ri(),v=zi(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&Rt.test(s);return _.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?_.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});ji.displayName=`Form`;function Mi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ni(e){let t=_.useContext(Kn);return Wt(t,Mi(e)),t}function Pi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=pr(),d=ur(),f=_r(e,{relative:o});return _.useCallback(p=>{if(Zr(p,t)){p.preventDefault();let t=n===void 0?Jt(d)===Jt(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?_.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Fi(e){Gt(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=_.useRef(Qr(e)),n=_.useRef(!1),r=ur(),i=_.useMemo(()=>$r(r.search,n.current?null:t.current),[r.search]),a=pr();return[i,_.useCallback((e,t)=>{let r=Qr(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Ii=0,Li=()=>`__${String(++Ii)}__`;function Ri(){let{router:e}=Ni(`useSubmit`),{basename:t}=_.useContext($n),n=Mr(),r=e.fetch,i=e.navigate;return _.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ii(e,t);if(a.navigate===!1){let e=a.fetcherKey||Li();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function zi(e,{relative:t}={}){let{basename:n}=_.useContext($n),r=_.useContext(tr);Wt(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={..._r(e||`.`,{relative:t})},o=ur();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Dn([n,a.pathname])),Jt(a)}function Bi(e,{relative:t}={}){let n=_.useContext(Xn);Wt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ni(`useViewTransitionState`),i=_r(e,{relative:t});if(!n.isTransitioning)return!1;let a=yn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=yn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return hn(i.pathname,o)!=null||hn(i.pathname,a)!=null}var Vi=`fk_offline_owner`,Hi=null;function Ui(e){Hi=e;try{e===null?localStorage.removeItem(Vi):localStorage.setItem(Vi,String(e)),localStorage.removeItem(`fk_offline_queue`),localStorage.removeItem(`fk_saved_synced_at`)}catch{}}function Wi(){try{return Hi!==null&&localStorage.getItem(Vi)===String(Hi)?Hi:null}catch{return null}}var Gi=()=>{let e=Wi();return e===null?null:`fk_offline_queue-${e}`},Ki=new Set;function qi(){let e=Gi();if(e===null)return new Map;try{return new Map(JSON.parse(localStorage.getItem(e)??`[]`))}catch{return new Map}}function Ji(e){let t=Gi();if(t!==null){try{e.size===0?localStorage.removeItem(t):localStorage.setItem(t,JSON.stringify([...e]))}catch{}Ki.forEach(e=>e())}}var Yi=(e,t)=>`${e}:${t}`;function Xi(e,t,n){let r=qi();r.set(Yi(e,t),n),Ji(r)}function Zi(e,t){let n=qi();n.delete(Yi(e,t))&&Ji(n)}function Qi(){qi().size>0&&Ji(new Map)}function $i(){return qi().size}function ea(e){return Ki.add(e),window.addEventListener(`storage`,e),()=>{Ki.delete(e),window.removeEventListener(`storage`,e)}}function ta(){return[...qi()].map(([e,t])=>{let[n,r]=e.split(`:`);return{action:n,itemId:Number(r),value:t}})}function na(e){let t=qi();return t.size===0?e:e.map(e=>{let n=t.get(Yi(`read`,e.id)),r=t.get(Yi(`bookmark`,e.id));return n===void 0&&r===void 0?e:{...e,read:n??e.read,bookmarked:r??e.bookmarked}})}async function ra(e,t){let n=0,r=Wi();for(let{action:i,itemId:a,value:o}of ta()){if(r===null||Wi()!==r)return n;try{await e(i,a,o)}catch(e){if(t(e))return n}if(Wi()!==r)return n;Zi(i,a),n++}return n}var ia=`fk-offline`,aa=`fk-api`,z=`/__offline/articles`,oa=`fk_offline_saved`,sa=`fk_saved_synced_at`,ca=()=>typeof window<`u`&&`caches`in window;function la(){try{return localStorage.getItem(oa)!==`false`}catch{return!0}}function ua(e){try{localStorage.setItem(oa,String(e))}catch{}}async function da(){let e=Wi();if(!ca()||e===null)return null;try{let t=await(await caches.open(`${ia}-${e}`)).match(z),n=t?await t.json():null;return Wi()===e&&n?.userId===e?n:null}catch{return null}}async function fa(e){let t=Wi();if(!ca()||t===null||e.userId!==t)return;let n=await caches.open(`${ia}-${t}`);Wi()===t&&await n.put(z,new Response(JSON.stringify(e),{headers:{"Content-Type":`application/json`}}))}async function pa(){if(!ca())return;let e=Wi();await caches.delete(e===null?ia:`${ia}-${e}`);try{localStorage.removeItem(e===null?sa:`${sa}-${e}`)}catch{}}function ma(e){let t=new Set;return[...e.saved,...e.recent].filter(e=>!t.has(e.id)&&t.add(e.id))}function ha(e,t,n){let r=n.search?.trim().toLowerCase(),i=e.filter(e=>n.bookmarkedOnly&&!e.bookmarked||n.unreadOnly&&!n.bookmarkedOnly&&e.read||n.feedId&&e.feed_id!==n.feedId||n.folderId&&t[e.feed_id]!==n.folderId?!1:!r||[e.title,e.content_snippet,e.full_content_html,e.content_html].some(e=>e?.toLowerCase().includes(r))),a=n.bookmarkedOnly?i:[...i].sort((e,t)=>(t.published_at??``).localeCompare(e.published_at??``)),o=n.offset??0;return a.slice(o,n.limit?o+n.limit:void 0)}var ga=class extends Error{status;code;data;constructor(e,t,n){super(t),this.status=e,this.code=t,this.data=n}};async function B(e,t){let n=new Headers(t?.headers);n.has(`Content-Type`)||n.set(`Content-Type`,`application/json`);let r;try{r=await fetch(`/api${e}`,{credentials:`include`,...t,headers:n})}catch{throw new ga(0,`unreachable`)}if(r.status===204)return;let i=await r.json().catch(()=>({}));if(!r.ok)throw new ga(r.status,i.error??`unknown_error`,i);return i}function _a(e,t,n){return e===`read`?B(`/items/${t}/${n?`read`:`unread`}`,{method:`POST`}):B(`/items/${t}/bookmark`,{method:n?`POST`:`DELETE`})}async function va(e,t,n){try{await _a(e,t,n),Zi(e,t)}catch(r){if(!(r instanceof ga&&r.status===0))throw r;Xi(e,t,n)}}function ya(e){return e instanceof ga&&e.status===0}function ba(e){return e instanceof ga&&(e.status===0||e.status===401||e.status===408||e.status===429||e.status>=500)}function xa(e){return e.avatar_updated_at?`/api/auth/me/avatar?v=${encodeURIComponent(e.avatar_updated_at)}`:null}var V={getConfig:()=>B(`/config`),onboardingStatus:()=>B(`/onboarding/status`),onboard:e=>B(`/onboarding`,{method:`POST`,body:JSON.stringify(e)}),login:(e,t)=>B(`/auth/login`,{method:`POST`,body:JSON.stringify({email:e,password:t})}),logout:()=>B(`/auth/logout`,{method:`POST`}),changePassword:(e,t)=>B(`/auth/change-password`,{method:`POST`,body:JSON.stringify({currentPassword:e,newPassword:t})}),me:()=>B(`/auth/me`),updateProfile:e=>B(`/auth/me`,{method:`PATCH`,body:JSON.stringify({displayName:e})}),uploadAvatar:e=>B(`/auth/me/avatar`,{method:`PUT`,headers:{"Content-Type":e.type},body:e}),deleteAvatar:()=>B(`/auth/me/avatar`,{method:`DELETE`}),dismissIntro:()=>B(`/auth/me/intro`,{method:`POST`}),listUsers:()=>B(`/auth/users`),createUser:e=>B(`/auth/users`,{method:`POST`,body:JSON.stringify(e)}),listFeeds:()=>B(`/feeds`),discoverFeeds:e=>B(`/feeds/discover`,{method:`POST`,body:JSON.stringify({url:e})}),subscribeFeed:(e,t,n)=>B(`/feeds`,{method:`POST`,body:JSON.stringify({url:e,label:t,folderId:n})}),unsubscribeFeed:e=>B(`/feeds/${e}`,{method:`DELETE`}),updateFeed:(e,t)=>B(`/feeds/${e}`,{method:`PATCH`,body:JSON.stringify(t)}),pushKey:()=>B(`/push/key`),savePushDevice:e=>B(`/push/devices`,{method:`POST`,body:JSON.stringify(e)}),checkPushDevice:e=>B(`/push/devices/check`,{method:`POST`,body:JSON.stringify({endpoint:e})}),removePushDevice:e=>B(`/push/devices/remove`,{method:`POST`,body:JSON.stringify({endpoint:e})}),sendTestPush:e=>B(`/push/test`,{method:`POST`,body:JSON.stringify({language:e})}),reorderFeeds:e=>B(`/feeds/reorder`,{method:`PUT`,body:JSON.stringify({feedIds:e})}),exportOpmlUrl:()=>`/api/feeds/opml`,importOpml:e=>B(`/feeds/opml`,{method:`POST`,headers:{"Content-Type":`application/xml`},body:e}),refreshFeed:e=>B(`/feeds/${e}/refresh`,{method:`POST`}),refreshAllFeeds:()=>B(`/feeds/refresh-all`,{method:`POST`}),listFolders:()=>B(`/folders`),createFolder:e=>B(`/folders`,{method:`POST`,body:JSON.stringify({name:e})}),updateFolder:(e,t)=>B(`/folders/${e}`,{method:`PATCH`,body:JSON.stringify({name:t})}),deleteFolder:e=>B(`/folders/${e}`,{method:`DELETE`}),markFolderRead:e=>B(`/folders/${e}/read`,{method:`POST`}),listItems:async(e={})=>{let t=new URLSearchParams;e.feedId&&t.set(`feedId`,String(e.feedId)),e.folderId&&t.set(`folderId`,String(e.folderId)),e.unreadOnly&&t.set(`unreadOnly`,`true`),e.bookmarkedOnly&&t.set(`bookmarkedOnly`,`true`),e.includeMuted&&t.set(`includeMuted`,`true`),e.offline&&t.set(`offline`,`true`),e.search&&t.set(`search`,e.search),e.limit&&t.set(`limit`,String(e.limit)),e.offset&&t.set(`offset`,String(e.offset));let n=t.toString(),r=async()=>{let t=await da();return t?ha(na(ma(t)),t.feedFolders,e):null};if(!navigator.onLine&&!e.offline){let e=await r();if(e)return e}try{return na(await B(`/items${n?`?${n}`:``}`))}catch(e){if(ya(e)){let e=await r();if(e)return e}throw e}},markRead:e=>va(`read`,e,!0),markUnread:e=>va(`read`,e,!1),bookmarkItem:e=>va(`bookmark`,e,!0),unbookmarkItem:e=>va(`bookmark`,e,!1),extractContent:e=>B(`/items/${e}/extract-content`,{method:`POST`}),markAllRead:e=>{let t=typeof e==`number`?e:e?.feedId,n=typeof e==`object`?e?.folderId:void 0;return B(`/items/mark-all-read`,{method:`POST`,body:JSON.stringify({feedId:t,folderId:n})})},listMutedKeywords:()=>B(`/filters/muted`),addMutedKeyword:e=>B(`/filters/muted`,{method:`POST`,body:JSON.stringify({keyword:e})}),deleteMutedKeyword:e=>B(`/filters/muted/${e}`,{method:`DELETE`}),listDevices:()=>B(`/v1/devices`),createPairingCode:()=>B(`/v1/pairing-codes`,{method:`POST`}),revokeDevice:e=>B(`/v1/devices/${e}`,{method:`DELETE`}),listTokens:()=>B(`/tokens`),createToken:(e,t)=>B(`/tokens`,{method:`POST`,body:JSON.stringify({name:e,scope:t})}),deleteToken:e=>B(`/tokens/${e}`,{method:`DELETE`}),listOAuthGrants:()=>B(`/oauth-grants`),deleteOAuthGrant:e=>B(`/oauth-grants/${e}`,{method:`DELETE`}),getRetention:()=>B(`/system/retention`),updateRetention:e=>B(`/system/retention`,{method:`PATCH`,body:JSON.stringify(e)}),runCleanup:()=>B(`/system/cleanup`,{method:`POST`})},Sa=100,Ca=300,wa=1500,Ta=100,Ea=3e5,Da=/https?:\/\/[^"'\s<>)]+(\/api\/(?:archive\/images\/\d+|items\/\d+\/image\?src=[^"'\s<>)]+))/g,Oa=null,ka=0;function Aa(){ka++}function ja(){try{return Number(localStorage.getItem(`fk_saved_synced_at-${Wi()}`))||0}catch{return 0}}function Ma(e,t){return e?.replace(Da,(e,n)=>{let r=`${window.location.origin}${n}`;return t.add(r),r})}function Na(e,t){return{...e,image_url:Ma(e.image_url,t),content_html:Ma(e.content_html,t),full_content_html:Ma(e.full_content_html,t)}}async function Pa(e,t,n){let r=t.slice(0,wa),i=async()=>{for(let t=r.shift();t&&!n();t=r.shift()){let r=await e.match(t,{ignoreVary:!0}),i=/\/api\/archive\/images\/\d+/.test(new URL(t).pathname),a=Number(r?.headers.get(`cache-control`)?.match(/max-age=(\d+)/)?.[1]??0),o=r&&Date.now()-Date.parse(r.headers.get(`date`)??``)<Math.min(a,21600)*1e3;if(!(r&&(i||o)))try{let r=await fetch(t,{credentials:`include`});r.ok&&!n()&&await e.put(t,r)}catch{}}};await Promise.all([i(),i(),i(),i()])}async function Fa(e,t){for(let n of await e.keys())/\/api\/(archive\/images\/|items\/\d+\/image)/.test(n.url)&&!t.has(n.url)&&await e.delete(n)}async function Ia(){return navigator.onLine?ra(_a,ba):0}async function La(){await Ra({force:await Ia()>0})}function Ra(e={}){let t=Wi();if(t===null||!(`caches`in window)||!la()||!navigator.onLine)return Promise.resolve(null);if(Oa)return e.force?Oa.then(()=>Ra(e)):Oa;if(!e.force&&Date.now()-ja()<Ea)return Promise.resolve(null);let n=ka,r=()=>n!==ka||Wi()!==t;return Oa=(async()=>{try{let e=new Set,n=[];for(let e=0;n.length<Ca;e+=Sa){let t=await V.listItems({bookmarkedOnly:!0,limit:Sa,offset:e,offline:!0});if(n.push(...t),t.length<Sa)break}let i=await V.listItems({unreadOnly:!0,limit:Ta,offline:!0}),a=await V.listFeeds().catch(()=>[]),o=n.slice(0,Ca).map(t=>Na(t,e)),s=i.map(t=>Na(t,e));if(r())return null;let c=await caches.open(aa);return r()||(await Pa(c,[...e],r),r())||(await Fa(c,e),r())||(await fa({userId:t,savedAt:new Date().toISOString(),saved:o,recent:s,feedFolders:Object.fromEntries(a.map(e=>[e.id,e.folder_id]))}),r())?null:(localStorage.setItem(`${sa}-${t}`,String(Date.now())),new Set([...o,...s].map(e=>e.id)).size)}catch{return null}finally{Oa=null}})(),Oa}async function za(){await pa(),`caches`in window&&await Fa(await caches.open(aa),new Set)}var Ba=`feedkeeper_items_scroll_y`,Va=(()=>{try{return Number(sessionStorage.getItem(Ba)||`0`)}catch{return 0}})();function Ha(){return Va}function Ua(e){Va=Math.max(0,e);try{sessionStorage.setItem(Ba,String(Math.round(Va)))}catch{}}function Wa(){Ua(0)}function Ga(){return`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window}async function Ka(){return await navigator.serviceWorker.getRegistration()??null}async function qa(){if(!Ga())return`unsupported`;if(Notification.permission===`denied`)return`blocked`;let e=await(await Ka())?.pushManager.getSubscription();if(!e)return`off`;let{registered:t}=await V.checkPushDevice(e.endpoint).catch(()=>({registered:!0}));return t?`on`:`off`}function Ja(e){let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),n=atob(t),r=new Uint8Array(new ArrayBuffer(n.length));for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}async function Ya(){if(!Ga())return`unsupported`;let e=await Ka();if(!e)return`unsupported`;if(await Notification.requestPermission()!==`granted`)return`blocked`;let{publicKey:t}=await V.pushKey(),n=(await e.pushManager.getSubscription()??await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Ja(t)})).toJSON();return!n.endpoint||!n.keys?.p256dh||!n.keys.auth?`off`:(await V.savePushDevice({endpoint:n.endpoint,keys:{p256dh:n.keys.p256dh,auth:n.keys.auth}}),`on`)}async function Xa(){let e=await(await Ka())?.pushManager.getSubscription();e&&(await V.removePushDevice(e.endpoint).catch(()=>void 0),await e.unsubscribe().catch(()=>void 0))}function Za(e){let t=navigator;t.setAppBadge&&t.clearAppBadge&&(e>0?t.setAppBadge(e):t.clearAppBadge()).catch(()=>void 0)}async function Qa(){if(navigator.onLine)try{Za((await V.listFeeds()).filter(e=>e.badge!==0).reduce((e,t)=>e+t.unread_count,0))}catch{}}var $a=`fk:items-changed`;function eo(){window.dispatchEvent(new Event($a))}function to(e){return window.addEventListener($a,e),()=>window.removeEventListener($a,e)}function no(){`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{navigator.serviceWorker.register(`/sw.js`).then(()=>navigator.serviceWorker.ready).then(e=>{let t=performance.getEntriesByType(`resource`).map(e=>new URL(e.name)).filter(e=>e.origin===window.location.origin&&e.pathname.startsWith(`/assets/`)).map(e=>e.pathname);e.active?.postMessage({type:`cache-urls`,urls:t})}).catch(()=>void 0)})}async function ro(){if(Aa(),Qi(),Za(0),Ui(null),!(`caches`in window))return;let e=await caches.keys();await Promise.all(e.filter(e=>e===`fk-api`||e===`fk-offline`||e.startsWith(`fk-offline-`)).map(e=>caches.delete(e)))}var io=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),H=o(((e,t)=>{t.exports=io()}))(),ao=(0,_.createContext)(null);function oo({children:e}){let t=(0,_.useRef)(0),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(!0),[c,l]=(0,_.useState)(!1);async function u(){let e=++t.current;Aa(),s(!0),l(!1);try{let n=await V.onboardingStatus();if(e!==t.current)return;if(n.needsOnboarding){a(!0),r(null);return}a(!1);try{let n=await V.me();if(e!==t.current)return;Ui(n.id),r(n)}catch(n){if(e!==t.current)return;n instanceof ga&&n.status===401?(r(null),await ro()):n instanceof ga&&n.status===0?l(!0):(console.error(`Auth check failed:`,n),r(null))}}catch(n){if(e!==t.current)return;n instanceof ga&&n.status===0?l(!0):console.error(`Failed to check onboarding/auth status:`,n),r(null)}finally{e===t.current&&s(!1)}}async function d(){await Xa().catch(()=>void 0),await V.logout(),await ro(),Wa(),r(null)}return(0,_.useEffect)(()=>{u();let e=e=>{e.key===`fk_offline_owner`&&u()};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),(0,H.jsx)(ao.Provider,{value:{user:n,loading:o,needsOnboarding:i,unreachable:c,refresh:u,logout:d,setCurrentUser:r},children:e})}function so(){let e=(0,_.useContext)(ao);if(!e)throw Error(`useAuth must be used within AuthProvider`);return e}var co=`M435.6,124.8l0,-73.2l-435.6,0l-0,816l92.4,-0l0,-381.6l325.2,0l-0,-74.4l-325.2,0l0,-286.8l343.2,0zM1065.6,576l0,-31.2c0,-198,-98.4,-306,-259.2,-306c-165.6,0,-264,105.6,-264,306c0,228,63.6,337.2,268.8,337.2c108,-0,200.4,-30,226.8,-46.8l0,-73.2c-16.8,16.8,-115.2,55.2,-205.2,55.2c-144,0,-199.2,-82.8,-201.6,-241.2l434.4,0zm-87.6,-60l-346.8,0c2.4,-136.8,62.4,-213.6,174,-213.6c112.8,0,170.4,91.2,172.8,213.6zM1722,576l0,-31.2c0,-198,-98.4,-306,-259.2,-306c-165.6,0,-264,105.6,-264,306c0,228,63.6,337.2,268.8,337.2c108,-0,200.4,-30,226.8,-46.8l0,-73.2c-16.8,16.8,-115.2,55.2,-205.2,55.2c-144,0,-199.2,-82.8,-201.6,-241.2l434.4,0zm-87.6,-60l-346.8,0c2.4,-136.8,62.4,-213.6,174,-213.6c112.8,0,170.4,91.2,172.8,213.6zM2396.4,830.4l0,-830.4l-90,0l0,278.4c-18,-8.4,-97.2,-39.6,-188.4,-39.6c-164.4,0,-262.8,106.8,-262.8,306c0,242.4,86.4,337.2,279.6,337.2c121.2,-0,216,-32.4,261.6,-51.6zm-90,-48c-21.6,12,-84,33.6,-171.6,33.6c-129.6,0,-188.4,-78,-188.4,-271.2c0,-159.6,63.6,-238.8,189.6,-238.8c72,0,146.4,28.8,170.4,38.4l0,438zM3187.2,867.6l-386.4,-427.2l355.2,-388.8l-120,0l-340.8,388.8l367.2,427.2l124.8,-0zm-494.4,-0l-0,-816l-92.4,0l0,816l92.4,-0zM3776.4,576l0,-31.2c0,-198,-98.4,-306,-259.2,-306c-165.6,0,-264,105.6,-264,306c0,228,63.6,337.2,268.8,337.2c108,-0,200.4,-30,226.8,-46.8l0,-73.2c-16.8,16.8,-115.2,55.2,-205.2,55.2c-144,0,-199.2,-82.8,-201.6,-241.2l434.4,0zm-87.6,-60l-346.8,0c2.4,-136.8,62.4,-213.6,174,-213.6c112.8,0,170.4,91.2,172.8,213.6zM4432.8,576l0,-31.2c0,-198,-98.4,-306,-259.2,-306c-165.6,0,-264,105.6,-264,306c0,228,63.6,337.2,268.8,337.2c108,-0,200.4,-30,226.8,-46.8l0,-73.2c-16.8,16.8,-115.2,55.2,-205.2,55.2c-144,0,-199.2,-82.8,-201.6,-241.2l434.4,0zm-87.6,-60l-346.8,0c2.4,-136.8,62.4,-213.6,174,-213.6c112.8,0,170.4,91.2,172.8,213.6zM5133.6,544.8c0,-210,-92.4,-306,-282,-306c-118.8,0,-231.6,36,-260.4,50.4l-0,832.8l90,0l0,-280.8c16.8,13.2,99.6,40.8,187.2,40.8c165.6,0,265.2,-92.4,265.2,-337.2zm-93.6,0c0,194.4,-57.6,271.2,-188.4,271.2c-69.6,0,-141.6,-25.2,-170.4,-37.2l0,-439.2c18,-8.4,81.6,-33.6,171.6,-33.6c120,0,187.2,68.4,187.2,238.8zM5792.4,576l0,-31.2c0,-198,-98.4,-306,-259.2,-306c-165.6,0,-264,105.6,-264,306c0,228,63.6,337.2,268.8,337.2c108,-0,200.4,-30,226.8,-46.8l0,-73.2c-16.8,16.8,-115.2,55.2,-205.2,55.2c-144,0,-199.2,-82.8,-201.6,-241.2l434.4,0zm-87.6,-60l-346.8,0c2.4,-136.8,62.4,-213.6,174,-213.6c112.8,0,170.4,91.2,172.8,213.6zM6256.8,313.2l0,-68.4c-9.6,-1.2,-50.4,-6,-66,-6c-106.8,0,-223.2,39.6,-240,48l-0,580.8l90,-0l0,-531.6c16.8,-6,90,-28.8,158.4,-28.8c14.4,0,45.6,3.6,57.6,6z`;function lo(){return(0,H.jsx)(`svg`,{className:`wordmark`,viewBox:`0 0 6257 1122`,role:`img`,"aria-label":`FeedKeeper`,children:(0,H.jsx)(`path`,{d:co})})}function uo({size:e=28}){return(0,H.jsxs)(`span`,{className:`brand-lockup`,style:{"--m":`${e}px`},children:[(0,H.jsx)(`img`,{src:`/logo.svg`,alt:``}),(0,H.jsx)(lo,{})]})}var fo=({isActive:e})=>`relative z-10 flex h-full items-center gap-2 rounded-lg px-3 text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] ${e?`text-[var(--c-text)]`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)]`}`;function po({onItemsClick:e}){let{t,i18n:n}=L(),r=ur(),i=(0,_.useRef)(null),[a,o]=(0,_.useState)(null);return(0,_.useLayoutEffect)(()=>{let e=i.current;if(!e)return;let t=()=>{let t=e.querySelector(`a[aria-current="page"]`);o(t?{left:t.offsetLeft,width:t.offsetWidth}:null)};t();let n=new ResizeObserver(t);return e.querySelectorAll(`a`).forEach(e=>n.observe(e)),()=>n.disconnect()},[r.pathname,n.resolvedLanguage]),(0,H.jsxs)(`nav`,{ref:i,className:`relative hidden h-9 items-center rounded-xl border border-[var(--c-border)] bg-[var(--c-surface)] p-0.5 md:flex`,children:[a&&(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-y-0.5 left-0 rounded-lg border border-[var(--c-mobile-nav-active-border)] bg-[var(--c-mobile-nav-active)] shadow-sm transition-[transform,width] duration-300 ease-[cubic-bezier(0.25,1,0.5,1)] motion-reduce:transition-none`,style:{width:a.width,transform:`translateX(${a.left}px)`}}),(0,H.jsxs)(Ai,{to:`/items`,onClick:e,className:fo,children:[(0,H.jsx)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h12`})}),t(`nav.items`)]}),(0,H.jsxs)(Ai,{to:`/feeds`,className:fo,children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M4 11a9 9 0 0 1 9 9`}),(0,H.jsx)(`path`,{d:`M4 4a16 16 0 0 1 16 16`}),(0,H.jsx)(`circle`,{cx:`5`,cy:`19`,r:`1`})]}),t(`nav.feeds`)]})]})}var mo=`fk_theme`,ho=new Set,go=(()=>{try{let e=localStorage.getItem(mo);return e===`light`||e===`dark`?e:`system`}catch{return`system`}})();function _o(e){return ho.add(e),()=>ho.delete(e)}function vo(){return go}function yo(e){go=e,e===`system`?document.documentElement.removeAttribute(`data-theme`):document.documentElement.setAttribute(`data-theme`,e);try{e===`system`?localStorage.removeItem(mo):localStorage.setItem(mo,e)}catch{}ho.forEach(e=>e())}function bo({standalone:e,hasPrompt:t,userAgent:n,maxTouchPoints:r}){if(e)return`installed`;if(t)return`prompt`;if(/iPhone|iPad|iPod/.test(n)||/Macintosh/.test(n)&&r>1)return`ios`;let i=/Safari\//.test(n)&&!/Chrome|Chromium|CriOS|FxiOS|Edg|OPR|Firefox/.test(n);return/Macintosh/.test(n)&&i?`mac-safari`:`unsupported`}var xo=null,So=!1,Co=new Set,wo=()=>Co.forEach(e=>e());function To(){window.addEventListener(`beforeinstallprompt`,e=>{e.preventDefault(),xo=e,wo()}),window.addEventListener(`appinstalled`,()=>{xo=null,So=!0,wo()})}function Eo(e){Co.add(e);let t=window.matchMedia(`(display-mode: standalone)`);return t.addEventListener(`change`,e),()=>{Co.delete(e),t.removeEventListener(`change`,e)}}function Do(){return bo({standalone:So||window.matchMedia(`(display-mode: standalone)`).matches||navigator.standalone===!0,hasPrompt:xo!==null,userAgent:navigator.userAgent,maxTouchPoints:navigator.maxTouchPoints??0})}async function Oo(){let e=xo;if(!e)return;xo=null,await e.prompt();let{outcome:t}=await e.userChoice;t===`accepted`&&(So=!0),wo()}function ko(e,t){let n=e.trim().split(/\s+/).filter(Boolean);return n.length===0?t.charAt(0).toUpperCase()||`?`:(n[0].charAt(0)+(n.length>1?n[n.length-1].charAt(0):``)).toUpperCase()}function Ao({user:e,className:t=``}){let n=xa(e),[r,i]=(0,_.useState)(null);return(0,H.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-[var(--c-border)] bg-[var(--c-mobile-nav-active)] font-semibold tracking-wide text-[var(--c-text)] ${t}`,children:n&&r!==n?(0,H.jsx)(`img`,{src:n,alt:``,className:`h-full w-full object-cover`,onError:()=>i(n)}):(0,H.jsx)(`span`,{"aria-hidden":`true`,children:ko(e.display_name,e.email)})})}var jo=`feedkeeper:extensions-changed`,Mo=[`login`,`menu`,`page`],No=/^[a-z0-9][a-z0-9-]{0,63}$/,Po=(e,t)=>typeof e==`string`&&e.trim().length>0&&e.length<=t,U=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function Fo(e){return U(e)?typeof e.id==`string`&&No.test(e.id)&&Po(e.label,80)&&Po(e.description,300)&&Po(e.group,60)&&(e.shortLabel===void 0||Po(e.shortLabel,40))&&(e.icon===void 0||Array.isArray(e.icon)&&e.icon.length<=8&&e.icon.every(e=>typeof e==`string`&&e.length<=400))&&(e.admin===void 0||typeof e.admin==`boolean`)&&typeof e.mount==`function`:!1}function Io(e,t,n){let r=U(e)&&U(e.settings)?e.settings:{},i=new Set(Array.isArray(r.hidden)?r.hidden.filter(e=>typeof e==`string`&&t.includes(e)):[]),a=new Set(t),o=[];for(let e of Array.isArray(r.sections)?r.sections:[])Fo(e)&&!a.has(e.id)&&(a.add(e.id),(!e.admin||n)&&o.push(e));return{hidden:i,sections:o}}function Lo(e){let t=[];for(let n of e){let e=n.group??``,r=t.find(t=>t.group===e);r?r.sections.push(n):t.push({group:e,sections:[n]})}return t}function Ro(e,t){if(typeof e==`string`)return e;if(!U(e))return null;let n=t.toLowerCase();for(let t of[n,n.split(`-`)[0],`en`]){let n=Object.entries(e).find(([e])=>e.toLowerCase()===t)?.[1];if(typeof n==`string`)return n}return Object.values(e).find(e=>typeof e==`string`)??null}function zo(e){return/[\u0000-\u001f\\]/.test(e)||e.length>500?!1:/^\/(?![/\\])/.test(e)||/^https?:\/\/[^\s/]+/i.test(e)}function W(e,t,n){let r=U(e)&&Array.isArray(e.footerLinks)?e.footerLinks:[],i=[];for(let e of r.slice(0,8)){if(!U(e))continue;let r=Ro(e.label,t),a=Ro(e.href,t);if(!r||!Po(r,60)||!a||!zo(a)||n&&Array.isArray(e.placements)&&!e.placements.some(e=>e===n&&Mo.includes(e)))continue;let o=typeof e.icon==`string`&&zo(e.icon)?e.icon:null;i.push({label:r,href:a,newTab:e.newTab===!0||/^https?:/i.test(a),icon:o})}return i}function Bo(e){let t=U(e)?e.loginForm:void 0;return U(t)&&typeof t.mount==`function`?t:null}function Vo(e){let t=U(e)?e.passwordCard:void 0;return!U(t)||typeof t.mount!=`function`?null:{mount:t.mount,...typeof t.applies==`function`?{applies:t.applies}:{}}}function Ho(e){let t=U(e)?e.onboarding:void 0;return U(t)&&typeof t.mount==`function`?t:null}function Uo(e){if(typeof e!=`string`||e.length>500)return null;try{let t=new URL(e);return(t.protocol===`https:`||t.protocol===`http:`)&&!t.username&&!t.password?t.toString():null}catch{return null}}function Wo(e,t,n){let r=U(e)&&U(e.starterPacks)?e.starterPacks:{},i=Array.isArray(r.packs)?r.packs:[],a=new Map;if(r.replace!==!0)for(let e of t)a.set(e.id,e);for(let e of i.slice(0,12))U(e)&&typeof e.id==`string`&&No.test(e.id)&&Array.isArray(e.feeds)&&a.set(e.id,e);let o=[];for(let e of a.values()){let t=Ro(e.title,n);if(!t||!Po(t,60))continue;let r=[];for(let t of e.feeds.slice(0,20)){if(!U(t)||!Po(t.title,80))continue;let e=Uo(t.url);e&&r.push({title:t.title,url:e,lang:typeof t.lang==`string`?t.lang.toLowerCase().split(`-`)[0]:``})}r.length>0&&o.push({id:e.id,title:t,description:Ro(e.description,n)??``,feeds:r})}return o}function Go(e){let t=U(e)?e.articlesNotice:void 0;return!U(t)||typeof t.mount!=`function`?null:{mount:t.mount,...typeof t.applies==`function`?{applies:t.applies}:{}}}function Ko(e,t){let n=U(e)&&U(e.meta)?e.meta:{},r=Ro(n.title,t)?.trim()??null,i=Ro(n.description,t)?.trim()??null;return{title:r&&Po(r,80)?r:null,description:i&&Po(i,300)?i:null}}var qo=0;function Jo(e){let t=()=>{qo++,e()};return window.addEventListener(jo,t),()=>window.removeEventListener(jo,t)}function Yo(){return(0,_.useSyncExternalStore)(Jo,()=>qo),window.feedkeeperExtensions}var Xo={login:`mt-4 justify-center text-xs`,menu:`border-t border-[var(--c-border)] px-3 py-2.5 text-xs`,page:`mt-10 border-t border-[var(--c-border)] pt-4 text-xs`};function Zo({placement:e}){let{t,i18n:n}=L(),r=W(Yo(),n.resolvedLanguage||`en`,e);return r.length===0?null:(0,H.jsx)(`nav`,{"aria-label":t(`nav.footerLinks`),className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-[var(--c-text-muted)] ${Xo[e]}`,children:r.map((e,t)=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-3`,children:[t>0&&(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`opacity-50`,children:`•`}),(0,H.jsxs)(`a`,{href:e.href,...e.newTab?{target:`_blank`,rel:`noopener noreferrer`}:{},className:`transition-colors hover:text-[var(--c-text)] hover:underline`,children:[e.icon&&(0,H.jsx)(`img`,{src:e.icon,alt:``,width:14,height:14,className:`mr-1.5 inline-block align-[-2px]`}),e.label]})]},`${e.href}-${t}`))})}var Qo={light:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,H.jsx)(`path`,{d:`M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41`})]}),dark:(0,H.jsx)(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`}),system:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,H.jsx)(`path`,{d:`M12 3a9 9 0 0 1 0 18Z`,fill:`currentColor`,stroke:`none`})]})},$o=`flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm font-medium text-[var(--c-text)] transition-colors hover:bg-[var(--c-surface-hover)] focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] cursor-pointer`;function es(){let{t:e}=L(),{user:t,logout:n}=so(),r=ur(),i=(0,_.useSyncExternalStore)(_o,vo),a=(0,_.useSyncExternalStore)(Eo,Do),[o,s]=(0,_.useState)(!1),c=(0,_.useRef)(null),l=(0,_.useRef)(null),u=(0,_.useId)();if((0,_.useEffect)(()=>s(!1),[r.pathname]),(0,_.useEffect)(()=>{if(!o)return;let e=e=>{c.current?.contains(e.target)||s(!1)},t=e=>{e.key===`Escape`&&(s(!1),l.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[o]),!t)return null;let d={light:e(`settings.themeLight`),dark:e(`settings.themeDark`),system:e(`settings.themeSystem`)};return(0,H.jsxs)(`div`,{ref:c,className:`relative`,children:[(0,H.jsx)(`button`,{ref:l,type:`button`,onClick:()=>s(e=>!e),"aria-expanded":o,"aria-controls":u,"aria-label":e(`nav.account`),title:t.display_name||t.email,className:`flex rounded-full transition-shadow cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--c-blue3)] ${o||r.pathname.startsWith(`/settings`)?`ring-2 ring-[var(--c-blue3)] ring-offset-2 ring-offset-[var(--c-surface)]`:`hover:ring-2 hover:ring-[var(--c-border)] hover:ring-offset-2 hover:ring-offset-[var(--c-surface)]`}`,children:(0,H.jsx)(Ao,{user:t,className:`h-9 w-9 text-xs`})}),o&&(0,H.jsxs)(`div`,{id:u,className:`card animate-fade-in absolute right-0 top-full z-50 mt-2 w-72 max-w-[calc(100vw-2rem)] p-1.5 shadow-xl`,style:{boxShadow:`0 16px 40px -12px rgba(0, 0, 0, 0.35)`},children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-3 pt-2 pb-3`,children:[(0,H.jsx)(Ao,{user:t,className:`h-10 w-10 text-sm`}),(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`p`,{className:`truncate text-sm font-semibold text-[var(--c-text)]`,children:t.display_name||t.email}),t.display_name&&(0,H.jsx)(`p`,{className:`truncate text-xs text-[var(--c-text-muted)]`,children:t.email})]})]}),(0,H.jsxs)(`div`,{className:`border-t border-[var(--c-border)] px-3 py-3`,children:[(0,H.jsx)(`p`,{className:`mb-2 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:e(`settings.theme`)}),(0,H.jsx)(`div`,{className:`grid grid-cols-3 gap-1 rounded-xl border border-[var(--c-border)] p-0.5`,role:`group`,"aria-label":e(`settings.theme`),children:Object.keys(Qo).map(e=>(0,H.jsxs)(`button`,{type:`button`,onClick:()=>yo(e),"aria-pressed":i===e,className:`flex h-8 items-center justify-center gap-1.5 rounded-lg text-xs font-medium transition-colors cursor-pointer focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] ${i===e?`border border-[var(--c-mobile-nav-active-border)] bg-[var(--c-mobile-nav-active)] text-[var(--c-text)] shadow-sm`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)]`}`,children:[(0,H.jsx)(`svg`,{className:`h-3.5 w-3.5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:Qo[e]}),d[e]]},e))})]}),(0,H.jsxs)(`div`,{className:`flex flex-col border-t border-[var(--c-border)] pt-1.5`,children:[(0,H.jsxs)(Ai,{to:`/settings`,className:`${$o} max-md:hidden`,children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4 text-[var(--c-text-muted)]`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,H.jsx)(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z`})]}),e(`nav.settings`)]}),a===`prompt`&&(0,H.jsxs)(`button`,{type:`button`,className:$o,onClick:()=>{s(!1),Oo()},children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4 text-[var(--c-text-muted)]`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M12 3v12M7 10l5 5 5-5`}),(0,H.jsx)(`path`,{d:`M5 21h14`})]}),e(`settings.installApp`)]}),(0,H.jsxs)(`button`,{type:`button`,className:`${$o} text-[var(--c-danger)]! hover:bg-[var(--c-danger-bg)]!`,onClick:()=>{s(!1),n()},children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}),(0,H.jsx)(`polyline`,{points:`16 17 21 12 16 7`}),(0,H.jsx)(`line`,{x1:`21`,y1:`12`,x2:`9`,y2:`12`})]}),e(`nav.logout`)]})]}),(0,H.jsx)(Zo,{placement:`menu`})]})]})}function ts(e){return window.addEventListener(`online`,e),window.addEventListener(`offline`,e),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,e)}}function ns(){return(0,_.useSyncExternalStore)(ts,()=>navigator.onLine,()=>!0)}function rs(){let{t:e}=L(),t=(0,_.useSyncExternalStore)(ea,$i,()=>0);return ns()?null:(0,H.jsxs)(`div`,{role:`status`,className:`border-b px-4 py-2 text-center text-sm text-[var(--c-text-muted)]`,style:{borderColor:`var(--c-border)`,backgroundColor:`var(--c-surface)`},children:[e(`common.offlineBanner`),t>0&&` ${e(`common.offlinePending`,{count:t})}`]})}function is(){let{t:e}=L(),{refresh:t}=so();return(0,H.jsxs)(`div`,{className:`fixed inset-0 z-50 flex flex-col items-center justify-center gap-4 bg-[var(--c-bg)] px-6 text-center`,children:[(0,H.jsx)(`img`,{src:`/logo.svg`,alt:``,className:`h-12 w-12`}),(0,H.jsx)(`h1`,{className:`text-xl font-semibold`,style:{fontFamily:`Manrope, sans-serif`},children:e(`common.offlineTitle`)}),(0,H.jsx)(`p`,{className:`max-w-sm text-sm text-[var(--c-text-muted)]`,children:e(`common.offlineText`)}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>void t(),className:`btn-primary`,children:e(`common.retry`)})]})}var as=[],os=1,ss=new Set,cs=()=>ss.forEach(e=>e());function ls(e){return ss.add(e),()=>ss.delete(e)}function us(){return as}function ds(e){as=as.filter(t=>t.id!==e),cs()}function fs(e,t){let n=os++;as=[...as.slice(-2),{id:n,type:e,message:t}],cs(),window.setTimeout(()=>ds(n),e===`error`?7e3:4e3)}var G={success:e=>fs(`success`,e),error:e=>fs(`error`,e),info:e=>fs(`info`,e)};function ps(){let{t:e}=L(),t=(0,_.useSyncExternalStore)(ls,us);return(0,H.jsx)(`div`,{"aria-live":`polite`,className:`pointer-events-none fixed inset-x-0 bottom-[calc(6.5rem+env(safe-area-inset-bottom,0px))] z-[60] flex flex-col items-center gap-2 px-4 md:bottom-6`,children:t.map(t=>(0,H.jsxs)(`div`,{role:t.type===`error`?`alert`:`status`,className:`card animate-fade-in pointer-events-auto flex w-full max-w-md items-start gap-3 px-4 py-3 text-sm`,style:{boxShadow:`0 16px 40px -12px rgba(0, 0, 0, 0.35)`},children:[(0,H.jsx)(`span`,{className:`mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-white ${t.type===`error`?`bg-[var(--c-danger)]`:t.type===`info`?`bg-[var(--c-text-muted)]`:`bg-[var(--c-green3)]`}`,"aria-hidden":`true`,children:(0,H.jsx)(`svg`,{className:`h-3 w-3`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,children:t.type===`error`?(0,H.jsx)(`path`,{d:`M12 7v6M12 17h.01`}):t.type===`info`?(0,H.jsx)(`path`,{d:`M12 7h.01M12 11v6`}):(0,H.jsx)(`path`,{d:`m5 12 5 5 9-10`})})}),(0,H.jsx)(`p`,{className:`min-w-0 flex-1 text-[var(--c-text)]`,children:t.message}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>ds(t.id),"aria-label":e(`common.close`),className:`-mr-1 shrink-0 rounded p-0.5 text-[var(--c-text-muted)] hover:text-[var(--c-text)] cursor-pointer`,children:(0,H.jsx)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]},t.id))})}function ms(){let{t:e}=L(),t=ur();(0,_.useEffect)(()=>{let e=()=>void La(),t=()=>document.visibilityState===`visible`&&e();return e(),window.addEventListener(`online`,e),document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(`online`,e),document.removeEventListener(`visibilitychange`,t)}},[]),(0,_.useEffect)(()=>{let e,t=()=>{window.clearTimeout(e),e=window.setTimeout(()=>void Qa(),800)},n=()=>document.visibilityState===`visible`&&t();t();let r=window.setInterval(t,12e4);window.addEventListener(`online`,t),document.addEventListener(`visibilitychange`,n);let i=to(t);return()=>{window.clearTimeout(e),window.clearInterval(r),window.removeEventListener(`online`,t),document.removeEventListener(`visibilitychange`,n),i()}},[]),(0,_.useEffect)(()=>{t.pathname!==`/items`&&(window.scrollTo({top:0,left:0,behavior:`instant`}),requestAnimationFrame(()=>{window.scrollTo({top:0,left:0,behavior:`instant`})}))},[t.pathname]);let n=()=>{t.pathname===`/items`&&(Wa(),window.scrollTo({top:0,left:0,behavior:`smooth`}))},r=t.pathname.startsWith(`/feeds`)?1:t.pathname.startsWith(`/settings`)?2:0;return(0,H.jsxs)(`div`,{className:`min-h-screen flex flex-col`,children:[(0,H.jsx)(`header`,{"data-app-header":!0,className:`sticky top-0 z-30 backdrop-blur-md border-b`,style:{borderColor:`var(--c-border)`,backgroundColor:`color-mix(in srgb, var(--c-surface) 85%, transparent)`,paddingTop:`env(safe-area-inset-top, 0px)`},children:(0,H.jsxs)(`div`,{className:`max-w-5xl mx-auto px-4 py-3 flex items-center justify-between gap-4`,children:[(0,H.jsx)(Ai,{to:`/items`,onClick:n,className:`flex items-center gap-2.5 shrink-0 hover:opacity-85 transition-opacity`,children:(0,H.jsx)(uo,{size:28})}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(po,{onItemsClick:n}),(0,H.jsx)(es,{})]})]})}),(0,H.jsx)(rs,{}),(0,H.jsx)(`main`,{className:`flex-1 max-w-5xl w-full mx-auto px-4 pt-4 pb-24 md:py-6`,children:(0,H.jsx)(`div`,{className:`animate-page-fade`,children:(0,H.jsx)(zr,{})},t.pathname)}),(0,H.jsx)(ps,{}),(0,H.jsx)(`nav`,{className:`mobile-bottom-nav md:hidden fixed left-3 right-3 max-w-sm mx-auto z-40 pointer-events-auto no-drag select-none`,"aria-label":e(`nav.menu`),children:(0,H.jsxs)(`div`,{className:`relative flex items-center justify-between p-1.5 rounded-full border backdrop-blur-2xl backdrop-saturate-180 transition-all duration-300 no-drag select-none`,style:{backgroundColor:`color-mix(in srgb, var(--c-surface) 80%, transparent)`,borderColor:`var(--c-border)`,borderWidth:`1px`,boxShadow:`0 2px 12px -4px rgba(0, 0, 0, 0.3)`},onContextMenu:e=>e.preventDefault(),children:[(0,H.jsx)(`div`,{"aria-hidden":`true`,className:`absolute top-1.5 bottom-1.5 left-1.5 rounded-full bg-[var(--c-mobile-nav-active)] border border-[var(--c-mobile-nav-active-border)] shadow-sm transition-transform duration-300 ease-[cubic-bezier(0.25,1,0.5,1)] pointer-events-none no-drag`,style:{width:`calc((100% - 0.75rem) / 3)`,transform:`translateX(calc(${r} * 100%))`}}),(0,H.jsx)(Ai,{to:`/items`,onClick:n,draggable:!1,onDragStart:e=>e.preventDefault(),onContextMenu:e=>e.preventDefault(),className:`relative z-10 flex-1 min-w-0 no-drag select-none`,children:({isActive:t})=>(0,H.jsxs)(`div`,{className:`h-[54px] w-full rounded-full flex flex-col items-center justify-center gap-0.5 transition-colors duration-200 cursor-pointer no-drag select-none ${t?`text-[var(--c-text)] font-semibold`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)] font-medium`}`,children:[(0,H.jsx)(`svg`,{className:`w-5 h-5 transition-transform duration-200 pointer-events-none ${t?`scale-105`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h12`})}),(0,H.jsx)(`span`,{className:`text-[11px] leading-tight tracking-tight pointer-events-none select-none`,children:e(`nav.items`)})]})}),(0,H.jsx)(Ai,{to:`/feeds`,draggable:!1,onDragStart:e=>e.preventDefault(),onContextMenu:e=>e.preventDefault(),className:`relative z-10 flex-1 min-w-0 no-drag select-none`,children:({isActive:t})=>(0,H.jsxs)(`div`,{className:`h-[54px] w-full rounded-full flex flex-col items-center justify-center gap-0.5 transition-colors duration-200 cursor-pointer no-drag select-none ${t?`text-[var(--c-text)] font-semibold`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)] font-medium`}`,children:[(0,H.jsxs)(`svg`,{className:`w-5 h-5 transition-transform duration-200 pointer-events-none ${t?`scale-105`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M4 11a9 9 0 0 1 9 9`}),(0,H.jsx)(`path`,{d:`M4 4a16 16 0 0 1 16 16`}),(0,H.jsx)(`circle`,{cx:`5`,cy:`19`,r:`1`})]}),(0,H.jsx)(`span`,{className:`text-[11px] leading-tight tracking-tight pointer-events-none select-none`,children:e(`nav.feeds`)})]})}),(0,H.jsx)(Ai,{to:`/settings`,draggable:!1,onDragStart:e=>e.preventDefault(),onContextMenu:e=>e.preventDefault(),className:`relative z-10 flex-1 min-w-0 no-drag select-none`,children:({isActive:t})=>(0,H.jsxs)(`div`,{className:`h-[54px] w-full rounded-full flex flex-col items-center justify-center gap-0.5 transition-colors duration-200 cursor-pointer no-drag select-none ${t?`text-[var(--c-text)] font-semibold`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)] font-medium`}`,children:[(0,H.jsxs)(`svg`,{className:`w-5 h-5 transition-transform duration-200 pointer-events-none ${t?`scale-105`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,H.jsx)(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z`})]}),(0,H.jsx)(`span`,{className:`text-[11px] leading-tight tracking-tight pointer-events-none select-none`,children:e(`nav.settings`)})]})})]})})]})}function hs(){let{t:e}=L(),{refresh:t}=so(),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(!1);async function f(r){r.preventDefault(),d(!0),l(null);try{await V.onboard({email:n,password:o,displayName:i}),await t()}catch{l(e(`common.error`))}finally{d(!1)}}return(0,H.jsx)(`div`,{className:`min-h-screen flex items-center justify-center px-4`,children:(0,H.jsxs)(`div`,{className:`card p-8 w-full max-w-md`,children:[(0,H.jsxs)(`div`,{className:`flex flex-col items-center mb-6 text-center`,children:[(0,H.jsx)(`h1`,{className:`mb-3`,children:(0,H.jsx)(uo,{size:44})}),(0,H.jsx)(`p`,{className:`text-sm mt-1`,style:{color:`var(--c-text-muted)`},children:e(`onboarding.subtitle`)})]}),(0,H.jsxs)(`form`,{onSubmit:f,className:`flex flex-col gap-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`text-sm font-medium block mb-1`,children:e(`onboarding.emailLabel`)}),(0,H.jsx)(`input`,{type:`email`,required:!0,className:`input`,value:n,onChange:e=>r(e.target.value)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`text-sm font-medium block mb-1`,children:e(`onboarding.displayNameLabel`)}),(0,H.jsx)(`input`,{type:`text`,required:!0,className:`input`,value:i,onChange:e=>a(e.target.value)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`text-sm font-medium block mb-1`,children:e(`onboarding.passwordLabel`)}),(0,H.jsx)(`input`,{type:`password`,required:!0,minLength:10,className:`input`,value:o,onChange:e=>s(e.target.value)}),(0,H.jsx)(`p`,{className:`text-xs mt-1`,style:{color:`var(--c-text-muted)`},children:e(`onboarding.passwordHint`)})]}),c&&(0,H.jsx)(`p`,{className:`text-sm text-danger`,children:c}),(0,H.jsx)(`button`,{type:`submit`,disabled:u,className:`btn-primary`,children:e(`onboarding.submit`)})]}),(0,H.jsxs)(`div`,{className:`mt-6 pt-4 border-t text-sm`,style:{borderColor:`var(--c-border)`},children:[(0,H.jsx)(`p`,{className:`font-medium`,children:e(`onboarding.orUseCli`)}),(0,H.jsx)(`p`,{style:{color:`var(--c-text-muted)`},children:e(`onboarding.cliHint`)})]})]})})}function gs(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function _s(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function vs(){return ys.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var ys={stubThis:e=>e};function bs(e){let{id:t}=e;return{...e,id:_s(t),transports:e.transports,type:e.type}}function xs(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var Ss=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function Cs({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Ss({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new Ss({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new Ss({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new Ss({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new Ss({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Ss({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new Ss({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Ss({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!xs(t))return new Ss({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Ss({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new Ss({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new Ss({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var ws=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},Ts=[`cross-platform`,`platform`];function Es(e){if(e&&!(Ts.indexOf(e)<0))return e}async function Ds(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!vs())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:_s(t.challenge),user:{...t.user,id:_s(t.user.id)},excludeCredentials:t.excludeCredentials?.map(bs)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=ws.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw Cs({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){Os(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=gs(e))}catch(e){Os(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=gs(c.getAuthenticatorData())}catch(e){Os(`getAuthenticatorData()`,e)}return{id:o,rawId:gs(s),response:{attestationObject:gs(c.attestationObject),clientDataJSON:gs(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:Es(a.authenticatorAttachment)}}function Os(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function ks(){if(!vs())return As.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?As.stubThis(new Promise(e=>e(!1))):As.stubThis(e.isConditionalMediationAvailable())}var As={stubThis:e=>e};function js({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Ss({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Ss({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!xs(t))return new Ss({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Ss({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new Ss({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function Ms(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!vs())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(bs));let a={...t,challenge:_s(t.challenge),allowCredentials:i},o={};if(n){if(!await ks())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=ws.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw js({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=gs(u.userHandle)),{id:c,rawId:gs(l),response:{authenticatorData:gs(u.authenticatorData),clientDataJSON:gs(u.clientDataJSON),signature:gs(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:Es(s.authenticatorAttachment)}}async function Ns(e,t,n=`POST`,r){let i=await fetch(`/api/auth/security${e}`,{method:n,signal:r,credentials:`same-origin`,headers:{"Content-Type":`application/json`},...t===void 0?{}:{body:JSON.stringify(t)}}),a=i.status===204?void 0:await i.json();if(!i.ok)throw new ga(i.status,a.error,a);return a}async function Ps(){let e=await Ns(`/reauth/passkey/options`,{}),t=await Ms({optionsJSON:e.publicKey});return(await Ns(`/reauth/passkey/verify`,{challengeId:e.challengeId,credential:t})).reauthToken}async function Fs(e,t){let n=await Ns(`/passkeys/register/options`,{reauthToken:e}),r=await Ds({optionsJSON:n.publicKey});await Ns(`/passkeys/register/verify`,{challengeId:n.challengeId,credential:r,name:t})}function Is(e){let t,n;function r(){t?.abort(),t=void 0,clearTimeout(n)}async function i(a=!0){if(t&&a)return;r();let o=new AbortController,{signal:s}=o;t=o;let c=!1;try{if(a){let t=await window.PublicKeyCredential?.isConditionalMediationAvailable?.().catch(()=>!1)??!1;if(s.aborted||(e.onAutofill(t),!t))return}let t=await Ns(`/passkeys/options`,{},`POST`,s);if(s.aborted)return;a&&(n=setTimeout(()=>{r(),i()},24e4));let o=await navigator.credentials.get({signal:s,...a?{mediation:`conditional`}:{},publicKey:{...t.publicKey,extensions:t.publicKey.extensions,challenge:_s(t.publicKey.challenge),allowCredentials:a?[]:t.publicKey.allowCredentials?.map(e=>({type:`public-key`,id:_s(e.id),transports:e.transports}))}});if(s.aborted||!o)return;clearTimeout(n),c=!0,e.onSelect();let l=o.response,u={id:o.id,rawId:gs(o.rawId),type:o.type,clientExtensionResults:o.getClientExtensionResults(),response:{clientDataJSON:gs(l.clientDataJSON),authenticatorData:gs(l.authenticatorData),signature:gs(l.signature),userHandle:l.userHandle?gs(l.userHandle):null}};await Ns(`/passkeys/verify`,{challengeId:t.challengeId,credential:u},`POST`,s),s.aborted||await e.onSuccess()}catch(t){s.aborted||(c||!a?e.onError(t):(!(t instanceof Error)||t.name!==`NotAllowedError`)&&e.onAutofill(!1))}finally{t===o&&(clearTimeout(n),t=void 0)}}return{start:i,stop:r}}function Ls({name:e,mount:t}){let n=(0,_.useRef)(null),r=L().i18n.resolvedLanguage;return(0,_.useEffect)(()=>{let r=n.current;if(!r)return;let i;try{i=t(r)}catch(t){console.error(`[extensions] "${e}" failed to open`,t)}return()=>{try{typeof i==`function`&&i()}catch(t){console.error(`[extensions] "${e}" failed to close`,t)}r.replaceChildren()}},[e,r]),(0,H.jsx)(`div`,{ref:n,className:`min-w-0`})}function Rs(){let{t:e}=L(),{refresh:t}=so(),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(),f=(0,_.useRef)(void 0),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(!0),[S,C]=(0,_.useState)(`https://github.com/visualfusion/feedkeeper`),[w,T]=(0,_.useState)(null),E=Bo(Yo()),D=E?.mount,ee=(0,_.useEffectEvent)(async()=>{await k(),y(!1)}),O=(0,_.useEffectEvent)(()=>{g(e(`login.error`)),y(!1)});(0,_.useEffect)(()=>{if(!c||i||D)return;let e=Is({onAutofill:d,onSelect:()=>{y(!0),g(null)},onSuccess:ee,onError:O});f.current=e,e.start();let t=()=>{e.start()},n=()=>{e.stop(),y(!1)};return window.addEventListener(`pagehide`,n),window.addEventListener(`pageshow`,t),()=>{e.stop(),f.current=void 0,window.removeEventListener(`pagehide`,n),window.removeEventListener(`pageshow`,t)}},[c,i,D]),(0,_.useEffect)(()=>{Ns(`/config`,void 0,`GET`).then(e=>l(e.passkeys)).catch(()=>{}),V.getConfig().then(e=>{e&&(x(e.showGithubLink),e.githubUrl&&C(e.githubUrl),e.loginSubtitle&&T(e.loginSubtitle))}).catch(()=>{})},[]);async function te(t){if(t.preventDefault(),!v){f.current?.stop(),y(!0),g(null);try{i?await Ns(`/mfa`,{challengeId:i,code:o}):await V.login(n,p),await k()}catch(t){t instanceof ga&&t.code===`mfa_required`?(a(t.data.challengeId),m(``)):(g(e(`login.error`)),f.current?.start())}finally{y(!1)}}}async function k(){let e=new URLSearchParams(window.location.search).get(`next`);e?.startsWith(`/oauth/authorize?`)?window.location.assign(e):await t()}return(0,H.jsxs)(`div`,{className:`min-h-screen flex flex-col items-center justify-center px-4`,children:[(0,H.jsxs)(`div`,{className:`card p-8 w-full max-w-sm`,children:[(0,H.jsxs)(`div`,{className:`flex flex-col items-center mb-6 text-center`,children:[(0,H.jsx)(`h1`,{className:`mb-3`,children:(0,H.jsx)(uo,{size:44})}),(0,H.jsx)(`p`,{className:`text-xs mt-1`,style:{color:`var(--c-text-muted)`},children:w??e(`login.subtitle`)})]}),E?(0,H.jsx)(Ls,{name:`login-form`,mount:E.mount}):(0,H.jsxs)(`form`,{onSubmit:te,className:`flex flex-col gap-4`,children:[!i&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{htmlFor:`login-email`,className:`text-sm font-medium block mb-1`,children:e(`login.emailLabel`)}),(0,H.jsx)(`input`,{id:`login-email`,name:`username`,type:`email`,autoComplete:`username webauthn`,required:!0,autoFocus:!0,className:`input`,value:n,onChange:e=>r(e.target.value),onFocus:()=>{v||f.current?.start()}})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{htmlFor:`login-password`,className:`text-sm font-medium block mb-1`,children:e(`login.passwordLabel`)}),(0,H.jsx)(`input`,{type:`password`,id:`login-password`,name:`password`,autoComplete:`current-password`,required:!0,className:`input`,value:p,onChange:e=>m(e.target.value)})]})]}),i&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`label`,{htmlFor:`mfa-code`,children:e(`security.code`)}),(0,H.jsx)(`input`,{id:`mfa-code`,className:`input`,autoFocus:!0,autoComplete:`one-time-code`,value:o,onChange:e=>s(e.target.value),required:!0}),(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary`,onClick:()=>{a(void 0),s(``)},children:e(`security.cancel`)})]}),c&&!i&&u===!1&&(0,H.jsx)(`button`,{type:`button`,className:`text-sm underline`,disabled:v,onClick:()=>void f.current?.start(!1),children:e(`security.signInPasskey`)}),h&&(0,H.jsx)(`p`,{className:`text-sm text-danger`,children:h}),(0,H.jsx)(`button`,{type:`submit`,disabled:v,className:`btn-primary`,children:e(`login.submit`)})]})]}),(0,H.jsx)(Zo,{placement:`login`}),b&&(0,H.jsx)(`div`,{className:`mt-4 text-center`,children:(0,H.jsxs)(`a`,{href:S,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 text-xs text-[var(--c-text-muted)] hover:text-[var(--c-text)] transition-colors opacity-80 hover:opacity-100`,children:[(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,H.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.53 1.032 1.53 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z`})}),(0,H.jsx)(`span`,{children:e(`login.viewOnGithub`)})]})})]})}function zs({className:e=``,size:t=`md`,center:n=!0}){let{t:r}=L(),i=(0,H.jsx)(`div`,{className:`rounded-full animate-spin border-[var(--c-border)] border-t-[var(--c-blue1)] dark:border-t-white/80 ${{sm:`w-5 h-5 border-2`,md:`w-8 h-8 border-[2.5px]`,lg:`w-10 h-10 border-3`}[t]} ${e}`,role:`status`,"aria-label":r(`common.loading`)});return n?(0,H.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center min-h-[45vh] w-full py-12 animate-fade-in`,children:i}):i}function Bs({label:e,items:t,className:n=``}){let[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(!1),s=(0,_.useRef)(null),c=(0,_.useRef)(null),l=(0,_.useId)();return(0,_.useLayoutEffect)(()=>{if(!r||!c.current)return;let e=c.current.getBoundingClientRect();o(window.innerHeight-e.bottom<48*t.length+24)},[r,t.length]),(0,_.useEffect)(()=>{if(!r)return;let e=e=>{s.current?.contains(e.target)||i(!1)},t=e=>{e.key===`Escape`&&(i(!1),c.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[r]),(0,H.jsxs)(`div`,{ref:s,className:`relative ${n}`,children:[(0,H.jsx)(`button`,{ref:c,type:`button`,onClick:e=>{e.stopPropagation(),i(e=>!e)},"aria-label":e,title:e,"aria-expanded":r,"aria-controls":l,className:`flex h-9 w-9 items-center justify-center rounded-lg text-[var(--c-text-muted)] transition-colors hover:bg-[var(--c-surface-hover)] hover:text-[var(--c-text)] focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] cursor-pointer ${r?`bg-[var(--c-surface-hover)] text-[var(--c-text)]`:``}`,children:(0,H.jsxs)(`svg`,{className:`h-5 w-5`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`5`,cy:`12`,r:`1.8`}),(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.8`}),(0,H.jsx)(`circle`,{cx:`19`,cy:`12`,r:`1.8`})]})}),r&&(0,H.jsx)(`div`,{id:l,className:`card animate-fade-in absolute right-0 z-40 w-64 p-1.5 ${a?`bottom-full mb-2`:`top-full mt-2`}`,style:{boxShadow:`0 16px 40px -12px rgba(0, 0, 0, 0.35)`},children:t.map(e=>(0,H.jsxs)(`button`,{type:`button`,disabled:e.disabled,onClick:t=>{t.stopPropagation(),i(!1),e.onSelect()},className:`flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm font-medium transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-default ${e.danger?`text-[var(--c-danger)] hover:bg-[var(--c-danger-bg)]`:`text-[var(--c-text)] hover:bg-[var(--c-surface-hover)]`}`,children:[e.icon&&(0,H.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center ${e.danger?``:`text-[var(--c-text-muted)]`}`,children:e.icon}),e.label]},e.label))})]})}function Vs(){let{user:e}=so(),t=e?.capabilities;return{syncAllowed:!t||t.features.sync===!0,manageUrl:t?.manageUrl??null}}function Hs({value:e,onChange:t,options:n,placeholder:r,className:i=``,size:a=`md`,disabled:o=!1,ariaLabel:s}){let{t:c}=L(),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(-1),p=(0,_.useRef)(null),m=(0,_.useRef)(null),h=(0,_.useId)(),g=n.find(t=>t.value===e);(0,_.useEffect)(()=>{function e(e){p.current&&!p.current.contains(e.target)&&u(!1)}if(l)return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[l]),(0,_.useEffect)(()=>{if(l){let t=n.findIndex(t=>t.value===e);f(t>=0?t:0)}},[l,e,n]),(0,_.useEffect)(()=>{if(l&&d>=0&&m.current){let e=m.current.querySelector(`[data-index="${d}"]`);e&&e.scrollIntoView({block:`nearest`})}},[d,l]);function v(e){if(!o){if(!l){(e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),u(!0));return}e.key===`Escape`?(e.preventDefault(),u(!1)):e.key===`ArrowDown`?(e.preventDefault(),f(e=>e<n.length-1?e+1:0)):e.key===`ArrowUp`?(e.preventDefault(),f(e=>e>0?e-1:n.length-1)):e.key===`Home`?(e.preventDefault(),f(0)):e.key===`End`?(e.preventDefault(),f(n.length-1)):(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d>=0&&d<n.length&&(t(n[d].value),u(!1)))}}let y=[];n.forEach((e,t)=>{let n=e.group??null,r=y.find(e=>e.groupName===n);r||(r={groupName:n,items:[]},y.push(r)),r.items.push({opt:e,index:t})});let b=a===`sm`;return(0,H.jsxs)(`div`,{ref:p,className:`relative inline-block ${i}`,onKeyDown:v,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||u(!1)},children:[(0,H.jsxs)(`button`,{type:`button`,id:h,role:`combobox`,"aria-label":s,"aria-haspopup":`listbox`,"aria-expanded":l,"aria-controls":l?`${h}-listbox`:void 0,"aria-activedescendant":l&&d>=0?`${h}-option-${d}`:void 0,disabled:o,onClick:()=>!o&&u(e=>!e),className:`w-full flex items-center justify-between gap-2 text-left font-normal transition-colors cursor-pointer select-none rounded-lg border bg-[var(--c-surface)] text-[var(--c-text)] shadow-xs hover:border-[var(--c-blue3)] focus:outline-none focus:border-[var(--c-blue3)] ${l?`border-[var(--c-blue3)]`:`border-[var(--c-border)]`} ${b?`px-2.5 py-1 text-xs min-h-[30px]`:`px-3 py-1.5 text-sm min-h-[38px]`} ${o?`opacity-50 cursor-not-allowed`:``}`,children:[(0,H.jsx)(`span`,{className:`truncate flex items-center gap-1.5`,children:g?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`truncate`,children:g.label}),g.badge!==void 0&&(0,H.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.2 rounded-full font-medium shrink-0`,style:{backgroundColor:`var(--c-border)`,color:`var(--c-text-muted)`},children:g.badge})]}):(0,H.jsx)(`span`,{style:{color:`var(--c-text-muted)`},children:r??`—`})}),(0,H.jsx)(`svg`,{className:`shrink-0 transition-transform duration-200 opacity-60 ${l?`rotate-180`:``} ${b?`w-3 h-3`:`w-3.5 h-3.5`}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`polyline`,{points:`6 9 12 15 18 9`})})]}),l&&(0,H.jsx)(`div`,{className:`absolute left-0 mt-1 w-full min-w-[180px] max-w-xs sm:max-w-none rounded-lg border border-[var(--c-border)] bg-[var(--c-surface)] shadow-lg z-50 overflow-hidden`,style:{backdropFilter:`blur(8px)`},children:(0,H.jsx)(`ul`,{ref:m,id:`${h}-listbox`,role:`listbox`,"aria-labelledby":h,className:`max-h-60 overflow-y-auto py-1 text-[var(--c-text)] focus:outline-none`,children:n.length===0?(0,H.jsx)(`li`,{className:`px-3 py-2 text-xs italic`,style:{color:`var(--c-text-muted)`},children:r??c(`common.noOptions`)}):y.map((n,r)=>(0,H.jsxs)(`li`,{role:`group`,"aria-label":n.groupName??void 0,children:[n.groupName&&(0,H.jsx)(`div`,{className:`px-3 pt-2 pb-1 text-[10px] font-semibold uppercase tracking-wider select-none border-t first:border-t-0`,style:{borderColor:`var(--c-border)`,color:`var(--c-text-muted)`},children:n.groupName}),(0,H.jsx)(`ul`,{role:`presentation`,children:n.items.map(({opt:n,index:r})=>{let i=n.value===e,a=r===d;return(0,H.jsxs)(`li`,{id:`${h}-option-${r}`,"data-index":r,role:`option`,"aria-selected":i,onClick:()=>{t(n.value),u(!1)},onMouseEnter:()=>f(r),className:`flex items-center justify-between gap-2 cursor-pointer select-none transition-colors ${b?`px-2.5 py-1.5 text-xs`:`px-3 py-2 text-sm`} ${a?`bg-[var(--c-border)]/40 text-[var(--c-text)]`:`text-[var(--c-text)]`} ${i?`font-medium bg-[var(--c-blue1)]/10`:``}`,children:[(0,H.jsxs)(`span`,{className:`truncate flex items-center gap-1.5`,children:[(0,H.jsx)(`span`,{className:`truncate`,children:n.label}),n.badge!==void 0&&(0,H.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.2 rounded-full font-medium shrink-0`,style:{backgroundColor:`var(--c-border)`,color:`var(--c-text-muted)`},children:n.badge})]}),i&&(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,style:{color:`var(--c-blue3)`},viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})]},n.value)})})]},n.groupName??`ungrouped-${r}`))})})]})}var Us=new Map;function Ws(e){let t=Us.get(e);return t||(t=new Promise(t=>{let n=new Image;n.onload=()=>t(n.naturalWidth>0&&n.naturalHeight>0),n.onerror=()=>t(!1),n.src=e}),Us.set(e,t)),t}function Gs(e){let t=5381n;for(let n of e)t=BigInt.asUintN(64,t*33n+BigInt(n.codePointAt(0)??0));return`hsl(${Number(t%360n)} 33% 43.5%)`}function Ks({feedId:e,iconUrl:t,siteUrl:n,feedUrl:r,articleUrl:i,fallbackName:a,className:o}){let s=JSON.stringify([e,t,n,r,i]),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(null);return(0,_.useEffect)(()=>{let a=!1;l(null);async function o(){if(e){let t=`/api/feeds/${e}/icon`;await Ws(t)?a||l({key:s,url:t}):a||d(s);return}let o=new Set;t&&/^https?:\/\//i.test(t)&&o.add(t);for(let e of[n,r,i])if(e)try{let t=new URL(e);(t.protocol===`https:`||t.protocol===`http:`)&&o.add(`${t.origin}/favicon.ico`)}catch{}for(let e of o)if(await Ws(e)){a||l({key:s,url:e});return}a||d(s)}return o(),()=>{a=!0}},[s]),!c||c.key!==s?a&&u===s?(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`${o} inline-grid place-items-center font-semibold text-white`,style:{backgroundColor:Gs(a),fontSize:`0.58em`},children:Array.from(a.trim())[0]?.toUpperCase()??`?`}):null:(0,H.jsx)(`img`,{src:c.url,alt:``,className:o,loading:`lazy`,onError:()=>{Us.set(c.url,Promise.resolve(!1)),l(null)}})}var qs=[[`day`,864e5],[`hour`,36e5],[`minute`,6e4]];function Js(e,t,n=Date.now()){let r=new Intl.RelativeTimeFormat(t,{numeric:`auto`}),i=e.getTime()-n;for(let[e,t]of qs)if(Math.abs(i)>=t)return r.format(Math.round(i/t),e);return r.format(0,`minute`)}function Ys({children:e,className:t=`h-4 w-4`}){return(0,H.jsx)(`svg`,{className:t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:e})}var Xs=({className:e})=>(0,H.jsxs)(Ys,{className:e,children:[(0,H.jsx)(`path`,{d:`M21 12a9 9 0 1 1-2.64-6.36`}),(0,H.jsx)(`path`,{d:`M21 3v6h-6`})]}),Zs=()=>(0,H.jsx)(Ys,{children:(0,H.jsx)(`path`,{d:`M2 12l4 4 6-7M10 16l2 0 8-9`})}),Qs=()=>(0,H.jsxs)(Ys,{children:[(0,H.jsx)(`path`,{d:`M12 20h9`}),(0,H.jsx)(`path`,{d:`M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z`})]}),$s=()=>(0,H.jsx)(Ys,{children:(0,H.jsx)(`path`,{d:`M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6`})}),ec=({className:e})=>(0,H.jsx)(Ys,{className:e,children:(0,H.jsx)(`path`,{d:`M12 5v14M5 12h14`})}),tc=()=>(0,H.jsxs)(Ys,{children:[(0,H.jsx)(`path`,{d:`M12 15V3M7 8l5-5 5 5`}),(0,H.jsx)(`path`,{d:`M5 21h14`})]}),nc=()=>(0,H.jsxs)(Ys,{children:[(0,H.jsx)(`path`,{d:`M12 3v12M7 10l5 5 5-5`}),(0,H.jsx)(`path`,{d:`M5 21h14`})]}),rc=()=>(0,H.jsx)(Ys,{children:(0,H.jsx)(`path`,{d:`M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z`})}),ic=()=>(0,H.jsxs)(Ys,{className:`h-4 w-4`,children:[(0,H.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,H.jsx)(`path`,{d:`m20 20-3.5-3.5`})]}),ac=()=>(0,H.jsx)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:[6,12,18].flatMap(e=>[9,15].map(t=>(0,H.jsx)(`circle`,{cx:t,cy:e,r:`1.5`},`${t}-${e}`)))}),oc=()=>(0,H.jsx)(Ys,{className:`h-5 w-5`,children:(0,H.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})}),sc=()=>(0,H.jsxs)(Ys,{className:`h-3.5 w-3.5 shrink-0`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,H.jsx)(`path`,{d:`M12 8v4M12 16h.01`})]}),cc=({className:e=`h-3.5 w-3.5`})=>(0,H.jsxs)(Ys,{className:e,children:[(0,H.jsx)(`path`,{d:`M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9`}),(0,H.jsx)(`path`,{d:`M13.73 21a2 2 0 0 1-3.46 0`})]});function lc(e,t){return t<60?e(`feeds.minutesShort`,{count:t}):e(`feeds.hoursShort`,{count:Math.round(t/60)})}function uc(e){try{return e?new URL(e).hostname.replace(/^www\./,``):null}catch{return null}}function dc({feed:e,folderOptions:t,intervalOptions:n,onClose:r,onSaved:i}){let{t:a}=L(),[o,s]=(0,_.useState)(e.label?.trim()||e.title?.trim()||e.url),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(e.folder_id??null),[f,p]=(0,_.useState)(e.poll_interval_minutes),[m,h]=(0,_.useState)(e.full_text_mode!==`never`),[g,v]=(0,_.useState)(e.notify!==0),[y,b]=(0,_.useState)(e.badge!==0),[x,S]=(0,_.useState)(!1);async function C(){S(!0);try{await V.updateFeed(e.id,{...c?{label:o.trim()||null}:{},folderId:u,pollIntervalMinutes:f,fullTextMode:m?`auto`:`never`,notify:g,badge:y}),eo(),G.success(a(`feeds.changesSaved`)),r(),await i()}catch{G.error(a(`common.error`))}finally{S(!1)}}return(0,H.jsxs)(`div`,{className:`flex flex-col gap-4 border-t border-[var(--c-border)] bg-[var(--c-bg)]/60 px-4 py-4 sm:px-5`,children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-3`,children:[(0,H.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-xs font-medium text-[var(--c-text-muted)]`,children:[a(`feeds.labelPlaceholder`),(0,H.jsx)(`input`,{type:`text`,className:`input text-sm`,placeholder:e.title??e.url,value:o,onChange:e=>{s(e.target.value),l(!0)}})]}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5 text-xs font-medium text-[var(--c-text-muted)]`,children:[a(`feeds.folder`),(0,H.jsx)(Hs,{value:u?String(u):``,onChange:e=>d(e?Number(e):null),options:t,className:`w-full`,placeholder:a(`feeds.noFolder`)})]}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5 text-xs font-medium text-[var(--c-text-muted)]`,children:[a(`feeds.interval`),(0,H.jsx)(Hs,{value:String(f),onChange:e=>p(Number(e)),options:n,className:`w-full`})]})]}),(0,H.jsxs)(`label`,{className:`flex cursor-pointer select-none items-start gap-2.5 text-sm`,children:[(0,H.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 rounded`,checked:m,onChange:e=>h(e.target.checked)}),(0,H.jsxs)(`span`,{children:[a(`feeds.fullText`),(0,H.jsx)(`span`,{className:`mt-0.5 block text-xs text-[var(--c-text-muted)]`,children:e.full_text_blocked_at?a(`feeds.fullTextBlocked`):a(`feeds.fullTextHint`)})]})]}),Ga()&&(0,H.jsxs)(`label`,{className:`flex cursor-pointer select-none items-start gap-2.5 text-sm`,children:[(0,H.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 rounded`,checked:g,onChange:e=>v(e.target.checked)}),(0,H.jsxs)(`span`,{children:[a(`feeds.notify`),(0,H.jsx)(`span`,{className:`mt-0.5 block text-xs text-[var(--c-text-muted)]`,children:a(`feeds.notifyHint`)})]})]}),`setAppBadge`in navigator&&(0,H.jsxs)(`label`,{className:`flex cursor-pointer select-none items-start gap-2.5 text-sm`,children:[(0,H.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 rounded`,checked:y,onChange:e=>b(e.target.checked)}),(0,H.jsxs)(`span`,{children:[a(`feeds.badge`),(0,H.jsx)(`span`,{className:`mt-0.5 block text-xs text-[var(--c-text-muted)]`,children:a(`feeds.badgeHint`)})]})]}),(0,H.jsx)(`p`,{className:`truncate font-mono text-xs text-[var(--c-text-muted)]`,title:e.url,children:e.url}),(0,H.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:r,className:`btn-secondary px-3 py-1.5 text-sm`,children:a(`common.cancel`)}),(0,H.jsx)(`button`,{type:`button`,onClick:C,disabled:x,className:`btn-primary px-4 py-1.5 text-sm`,children:a(`common.save`)})]})]})}function fc({feed:e,editing:t,refreshing:n,highlighted:r=!1,folderOptions:i,intervalOptions:a,onEdit:o,onRefresh:s,onMarkRead:c,onUnsubscribe:l,onSaved:u,drag:d}){let{t:f,i18n:p}=L(),{syncAllowed:m}=Vs(),h=e.label??e.title??e.url,g=uc(e.site_url)??uc(e.url),_=!!e.last_error,v=!e.last_polled_at,y=[{label:f(n?`feeds.refreshing`:`feeds.refreshFeed`),icon:(0,H.jsx)(Xs,{className:`h-4 w-4 ${n?`animate-spin`:``}`}),onSelect:s,disabled:n||!m},...e.unread_count>0?[{label:f(`feeds.markAllRead`),icon:(0,H.jsx)(Zs,{}),onSelect:c}]:[],{label:f(`feeds.edit`),icon:(0,H.jsx)(Qs,{}),onSelect:()=>o(!t)},{label:f(`feeds.unsubscribe`),icon:(0,H.jsx)($s,{}),onSelect:l,danger:!0}];return(0,H.jsxs)(`li`,{id:`feed-${e.id}`,draggable:!!d&&!t,onDragStart:d?.onDragStart,onDragOver:d?.onDragOver,onDragEnd:d?.onDragEnd,onDrop:d?.onDrop,className:`group/feed relative scroll-mt-28 first:rounded-t-xl last:rounded-b-xl transition-[opacity,background-color] duration-700 ${r?`bg-[var(--c-mobile-nav-active)]`:``} ${d?.isDragging?`opacity-40`:``} ${d?.isDragOver?`shadow-[inset_0_2px_0_var(--c-blue3)]`:``}`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3.5 sm:px-5`,children:[d&&(0,H.jsx)(`span`,{className:`-mr-1 flex shrink-0 cursor-grab touch-none text-[var(--c-text-muted)] opacity-50 transition-opacity hover:opacity-100 group-hover/feed:opacity-80 active:cursor-grabbing`,title:f(`feeds.dragHandle`),"aria-hidden":`true`,children:(0,H.jsx)(ac,{})}),(0,H.jsx)(Ks,{feedId:e.id,iconUrl:e.icon_url,siteUrl:e.site_url,feedUrl:e.url,fallbackName:h,className:`h-5 w-5 shrink-0 rounded object-contain text-xs leading-none`}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(_||v)&&(0,H.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full ${_?`bg-[var(--c-danger)]`:`bg-[var(--c-text-muted)]`}`,title:_?f(`feeds.statusFailing`,{count:e.consecutive_errors||1}):f(`feeds.statusPending`)}),(0,H.jsx)(ki,{to:`/items?feed=${e.id}`,draggable:!1,className:`truncate font-semibold text-[var(--c-text)] hover:underline`,children:h}),e.notify!==0&&Ga()&&(0,H.jsx)(`span`,{className:`inline-flex shrink-0 items-center text-[var(--c-text-muted)]`,title:f(`feeds.notifyActive`),"aria-label":f(`feeds.notifyActive`),children:(0,H.jsx)(cc,{className:`h-3.5 w-3.5`})})]}),(0,H.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-[var(--c-text-muted)]`,children:[g,f(`feeds.everyInterval`,{interval:lc(f,e.poll_interval_minutes)}),e.last_polled_at?f(`feeds.checkedAgo`,{time:Js(new Date(e.last_polled_at),p.resolvedLanguage)}):f(`feeds.statusPending`)].filter(Boolean).join(` · `)}),_&&(0,H.jsxs)(`p`,{className:`mt-1.5 flex items-start gap-1.5 text-xs text-[var(--c-danger)]`,title:e.last_error??void 0,children:[(0,H.jsx)(sc,{}),(0,H.jsx)(`span`,{className:`line-clamp-2 break-all`,children:e.last_error})]})]}),e.unread_count>0&&(0,H.jsx)(ki,{to:`/items?feed=${e.id}`,draggable:!1,className:`shrink-0 rounded-full bg-[var(--c-mobile-nav-active)] px-2.5 py-0.5 text-xs font-semibold tabular-nums text-[var(--c-text)] hover:bg-[var(--c-border)]`,title:f(`feeds.unread`,{count:e.unread_count}),children:e.unread_count}),(0,H.jsx)(Bs,{label:f(`feeds.moreActions`),items:y,className:`-mr-2 shrink-0`})]}),t&&(0,H.jsx)(dc,{feed:e,folderOptions:i,intervalOptions:a,onClose:()=>o(!1),onSaved:u})]})}var pc=[{id:`news`,title:{en:`News`,de:`Nachrichten`,ja:`ニュース`},description:{en:`Headlines from public broadcasters and newspapers.`,de:`Schlagzeilen von öffentlich-rechtlichen Sendern und Zeitungen.`,ja:`放送局や新聞社の主要ニュース。`},feeds:[{title:`Tagesschau`,url:`https://www.tagesschau.de/index~rss2.xml`,lang:`de`},{title:`Deutschlandfunk Nachrichten`,url:`https://www.deutschlandfunk.de/nachrichten-100.rss`,lang:`de`},{title:`ZEIT ONLINE`,url:`https://newsfeed.zeit.de/index`,lang:`de`},{title:`DER SPIEGEL`,url:`https://www.spiegel.de/schlagzeilen/index.rss`,lang:`de`},{title:`BBC News`,url:`https://feeds.bbci.co.uk/news/rss.xml`,lang:`en`},{title:`The Guardian – World`,url:`https://www.theguardian.com/world/rss`,lang:`en`},{title:`NPR News`,url:`https://feeds.npr.org/1001/rss.xml`,lang:`en`},{title:`NHK 主要ニュース`,url:`https://www.nhk.or.jp/rss/news/cat0.xml`,lang:`ja`},{title:`NHK 国際`,url:`https://www3.nhk.or.jp/rss/news/cat6.xml`,lang:`ja`},{title:`朝日新聞デジタル`,url:`https://www.asahi.com/rss/asahi/newsheadlines.rdf`,lang:`ja`}]},{id:`technology`,title:{en:`Technology`,de:`Technik`,ja:`テクノロジー`},description:{en:`News and background on software, hardware and the web.`,de:`Nachrichten und Hintergründe zu Software, Hardware und Netz.`,ja:`ソフトウェア、ハードウェア、ウェブのニュースと解説。`},feeds:[{title:`heise online`,url:`https://www.heise.de/rss/heise-atom.xml`,lang:`de`},{title:`Golem.de`,url:`https://www.golem.de/rss.php?feed=RSS2.0`,lang:`de`},{title:`netzpolitik.org`,url:`https://netzpolitik.org/feed/`,lang:`de`},{title:`Ars Technica`,url:`https://feeds.arstechnica.com/arstechnica/index`,lang:`en`},{title:`The Verge`,url:`https://www.theverge.com/rss/index.xml`,lang:`en`},{title:`Hacker News`,url:`https://hnrss.org/frontpage`,lang:`en`},{title:`ITmedia`,url:`https://rss.itmedia.co.jp/rss/2.0/itmedia_all.xml`,lang:`ja`},{title:`GIGAZINE`,url:`https://gigazine.net/news/rss_2.0/`,lang:`ja`},{title:`Publickey`,url:`https://www.publickey1.jp/atom.xml`,lang:`ja`},{title:`ギズモード・ジャパン`,url:`https://www.gizmodo.jp/index.xml`,lang:`ja`}]},{id:`apple`,title:{en:`Apple`,de:`Apple`,ja:`Apple`},description:{en:`iPhone, Mac and everything around them.`,de:`iPhone, Mac und alles drumherum.`,ja:`iPhone、Macとその周辺の話題。`},feeds:[{title:`iPhone-Ticker`,url:`https://www.iphone-ticker.de/feed/`,lang:`de`},{title:`apfelpatient`,url:`https://www.apfelpatient.de/feed`,lang:`de`},{title:`Macerkopf`,url:`https://www.macerkopf.de/feed/`,lang:`de`},{title:`ifun.de`,url:`https://www.ifun.de/feed/`,lang:`de`},{title:`MacTechNews`,url:`https://www.mactechnews.de/Rss/News.x`,lang:`de`},{title:`Daring Fireball`,url:`https://daringfireball.net/feeds/main`,lang:`en`},{title:`MacStories`,url:`https://www.macstories.net/feed/`,lang:`en`},{title:`MacRumors`,url:`https://feeds.macrumors.com/MacRumors-All`,lang:`en`},{title:`9to5Mac`,url:`https://9to5mac.com/feed/`,lang:`en`},{title:`iPhone Mania`,url:`https://iphone-mania.jp/feed/`,lang:`ja`},{title:`Apple Info. (Applech2)`,url:`https://applech2.com/feed`,lang:`ja`}]},{id:`science`,title:{en:`Science`,de:`Wissenschaft`,ja:`科学`},description:{en:`Research, space and nature.`,de:`Forschung, Weltraum und Natur.`,ja:`研究、宇宙、自然。`},feeds:[{title:`Spektrum der Wissenschaft`,url:`https://www.spektrum.de/alias/rss/spektrum-de-rss-feed/996406`,lang:`de`},{title:`scinexx`,url:`https://www.scinexx.de/feed/`,lang:`de`},{title:`Quanta Magazine`,url:`https://www.quantamagazine.org/feed/`,lang:`en`},{title:`NASA`,url:`https://www.nasa.gov/feed/`,lang:`en`},{title:`Nature`,url:`https://www.nature.com/nature.rss`,lang:`en`},{title:`ScienceDaily`,url:`https://www.sciencedaily.com/rss/all.xml`,lang:`en`},{title:`sorae 宇宙へのポータルサイト`,url:`https://sorae.info/feed`,lang:`ja`},{title:`ナゾロジー`,url:`https://nazology.kusuguru.co.jp/feed`,lang:`ja`},{title:`日経サイエンス`,url:`https://www.nikkei-science.com/?feed=rss2`,lang:`ja`}]},{id:`design`,title:{en:`Design`,de:`Design`,ja:`デザイン`},description:{en:`Web design, interfaces and creative work.`,de:`Webdesign, Oberflächen und kreative Arbeit.`,ja:`ウェブデザイン、UI、クリエイティブ。`},feeds:[{title:`Smashing Magazine`,url:`https://www.smashingmagazine.com/feed/`,lang:`en`},{title:`A List Apart`,url:`https://alistapart.com/main/feed/`,lang:`en`},{title:`UX Collective`,url:`https://uxdesign.cc/feed`,lang:`en`},{title:`Creative Bloq`,url:`https://www.creativebloq.com/feeds/all`,lang:`en`},{title:`designboom`,url:`https://www.designboom.com/feed/`,lang:`en`},{title:`コリス`,url:`https://coliss.com/feed/`,lang:`ja`},{title:`AXIS`,url:`https://www.axismag.jp/feed`,lang:`ja`},{title:`Web Creator Box`,url:`https://www.webcreatorbox.com/feed`,lang:`ja`}]}];function mc(e,t){let n=t.toLowerCase().split(`-`)[0],r=e.feeds.filter(e=>e.lang===n||e.lang===``),i=n===`en`||n===`ja`&&r.length>0?[]:e.feeds.filter(e=>e.lang===`en`);return[...r,...i]}function hc({folderOptions:e,defaultFolderId:t,initialUrl:n=``,subscribedUrls:r=[],compact:i=!1,onClose:a,onAdded:o}){let{t:s}=L(),[c,l]=(0,_.useState)(n),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(t),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)([]),y=new Set(r.map(gc));async function b(e,t){h(!0),v([]);try{let n=await V.subscribeFeed(e,t,f);l(``),d(``),await o(n)}catch(e){e instanceof ga&&e.code===`multiple_feeds_found`&&e.data&&typeof e.data==`object`&&`feeds`in e.data?v(e.data.feeds):e instanceof ga&&e.code===`already_subscribed`?G.error(s(`feeds.alreadySubscribed`)):e instanceof ga&&(e.code===`no_feeds_found`||e.code===`invalid_feed`)?G.error(s(`feeds.noFeedsFoundOnPage`)):G.error(s(`feeds.subscribeFailed`))}finally{h(!1)}}function x(e){e.preventDefault();let t=c.trim();t&&!/^https?:\/\//i.test(t)&&(t=t.startsWith(`//`)?`https:${t}`:`https://${t}`),b(t,u.trim()||null)}return(0,H.jsxs)(`section`,{className:i?`flex flex-col gap-4`:`card animate-fade-in flex flex-col gap-4 p-4 sm:p-5`,children:[!i&&(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsx)(`h2`,{className:`text-base font-semibold`,children:s(`feeds.addFeed`)}),(0,H.jsx)(`button`,{type:`button`,onClick:a,className:`rounded-lg p-1 text-[var(--c-text-muted)] hover:bg-[var(--c-surface-hover)] hover:text-[var(--c-text)] cursor-pointer`,"aria-label":s(`common.close`),children:(0,H.jsx)(oc,{})})]}),(0,H.jsxs)(`form`,{onSubmit:x,className:`flex flex-col gap-3 ${i?`sm:flex-row sm:items-start`:``}`,children:[(0,H.jsx)(`input`,{type:`text`,required:!0,autoFocus:!i,placeholder:s(`feeds.urlPlaceholder`),className:i?`input sm:flex-1`:`input`,value:c,onChange:e=>{l(e.target.value),g.length&&v([])}}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row`,children:[!i&&(0,H.jsx)(`input`,{type:`text`,placeholder:s(`feeds.labelPlaceholder`),className:`input sm:flex-1`,value:u,onChange:e=>d(e.target.value)}),!i&&(0,H.jsx)(Hs,{value:f?String(f):``,onChange:e=>p(e?Number(e):null),options:e,className:`w-full sm:w-52`,placeholder:s(`feeds.noFolder`)}),(0,H.jsx)(`button`,{type:`submit`,disabled:m,className:`btn-primary whitespace-nowrap`,children:s(m?`feeds.subscribing`:`feeds.subscribe`)})]})]}),g.length>0&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:s(`feeds.multipleFeedsFound`)}),(0,H.jsx)(`ul`,{className:`divide-y divide-[var(--c-border)] rounded-xl border border-[var(--c-border)]`,children:g.map(e=>{let t=y.has(gc(e.url));return(0,H.jsxs)(`li`,{className:`flex flex-col gap-2.5 px-3 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-3 ${t?`opacity-70`:``}`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`p`,{className:`break-words text-sm font-medium`,children:e.title??e.url}),(0,H.jsx)(`p`,{className:`truncate text-xs text-[var(--c-text-muted)]`,children:e.url})]}),(0,H.jsx)(`button`,{type:`button`,disabled:m||t,onClick:()=>b(e.url,e.title||u.trim()||null),className:`btn-primary w-full shrink-0 whitespace-nowrap px-3 py-1.5 text-xs sm:w-auto`,children:s(t?`feeds.subscribed`:`feeds.subscribe`)})]},e.url)})})]})]})}function gc(e){return e.trim().replace(/\/+$/,``).toLowerCase()}function _c(){let{t:e}=L(),{manageUrl:t}=Vs();return(0,H.jsxs)(`section`,{role:`status`,className:`card flex flex-col gap-2 p-4 sm:p-5`,"aria-labelledby":`plan-notice-title`,children:[(0,H.jsx)(`h2`,{id:`plan-notice-title`,className:`text-base font-semibold`,children:e(`plan.limitedTitle`)}),(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:e(`plan.limitedText`)}),t&&(0,H.jsx)(`a`,{href:t,className:`btn-primary self-start`,style:{textDecoration:`none`},children:e(`plan.view`)})]})}async function vc(e){try{let t=(await V.listFolders()).folders.find(t=>t.name===e);return t?t.id:(await V.createFolder(e)).id}catch{return null}}function yc({onSubscribed:e}){let{t,i18n:n}=L(),{syncAllowed:r}=Vs(),i=Yo(),a=Ho(i),o=n.resolvedLanguage||`en`,s=(0,_.useMemo)(()=>Wo(i,pc,o).map(e=>({...e,feeds:mc(e,o)})).filter(e=>e.feeds.length>0),[i,o]),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(new Set),[f,p]=(0,_.useState)(null),[m,h]=(0,_.useState)(!1),g=(0,_.useRef)(null),v=s.find(e=>e.id===c)??null,y=v?v.feeds.filter(e=>!u.has(e.url)):[];function b(e){d(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}async function x(n){let r=n.feeds.filter(e=>!u.has(e.url));if(r.length===0)return;p({done:0,total:r.length});let i=await vc(n.title),a=0,o=0,s=0,c=[...r];await Promise.all(Array.from({length:Math.min(3,r.length)},async()=>{for(let e=c.shift();e;e=c.shift()){try{await V.subscribeFeed(e.url,null,i),a++}catch(e){e instanceof ga&&e.code===`already_subscribed`?a++:o++}p({done:++s,total:r.length})}})),p(null),o>0?G.error(t(`welcome.packPartial`,{added:a,failed:o})):G.success(t(`welcome.packAdded`,{count:a})),a>0&&await e()}async function S(n){let r=n.target.files?.[0];if(r){h(!0);try{let n=await V.importOpml(await r.text());n.failed>0?G.error(t(`feeds.importPartial`,{imported:n.imported,skipped:n.skipped,failed:n.failed})):G.success(t(`feeds.importSuccess`,{imported:n.imported,skipped:n.skipped})),n.imported>0&&await e()}catch{G.error(t(`feeds.importFailed`))}finally{h(!1),g.current&&(g.current.value=``)}}}async function C(n){G.success(t(`feeds.subscribedToast`,{title:n.label||n.title||n.url})),await e()}let w=f!==null||m;if(!r)return(0,H.jsx)(_c,{});function T({id:e}){switch(e){case`news`:return(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2`}),(0,H.jsx)(`path`,{d:`M18 14h-8`}),(0,H.jsx)(`path`,{d:`M15 18h-5`}),(0,H.jsx)(`path`,{d:`M10 6h8v4h-8V6Z`})]});case`technology`:return(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}),(0,H.jsx)(`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}),(0,H.jsx)(`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`})]});case`apple`:return(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M15.97 6.37c.62-.75 1.04-1.8 0.93-2.85-.9.04-1.99.6-2.63 1.35-.57.65-1.07 1.71-.93 2.73.99.08 2.02-.48 2.63-1.23Z`})});case`science`:return(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2`}),(0,H.jsx)(`path`,{d:`M8.5 2h7`}),(0,H.jsx)(`path`,{d:`M7 16h10`})]});case`design`:return(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`}),(0,H.jsx)(`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`}),(0,H.jsx)(`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}),(0,H.jsx)(`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`}),(0,H.jsx)(`path`,{d:`M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.563-2.512 5.563-5.563C22 6.5 17.5 2 12 2Z`})]});default:return null}}return(0,H.jsxs)(`section`,{className:`card flex flex-col gap-6 p-5 sm:p-7 shadow-xs`,"aria-labelledby":`welcome-title`,children:[(0,H.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h2`,{id:`welcome-title`,className:`text-xl sm:text-2xl font-bold tracking-tight text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:t(`welcome.title`)}),(0,H.jsx)(`p`,{className:`max-w-xl text-xs sm:text-sm text-[var(--c-text-muted)] mt-0.5 leading-relaxed`,children:t(`welcome.intro`)})]})}),a&&(0,H.jsx)(Ls,{name:`onboarding`,mount:a.mount}),(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-4`,children:[s.length>0&&(0,H.jsxs)(`div`,{className:`rounded-2xl border border-[var(--c-border)]/80 bg-[var(--c-surface-hover)]/25 p-4 sm:p-5 flex flex-col gap-3.5`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,H.jsx)(`div`,{className:`w-7 h-7 rounded-lg bg-[var(--c-blue1)]/10 text-[var(--c-blue1)] flex items-center justify-center shrink-0`,children:(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`polygon`,{points:`16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76`})]})}),(0,H.jsx)(`h3`,{className:`text-sm sm:text-base font-bold text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:t(`welcome.packsTitle`)})]}),(0,H.jsx)(`p`,{className:`text-xs sm:text-sm text-[var(--c-text-muted)] mt-1 ml-9.5`,children:t(`welcome.packsHint`)})]}),(0,H.jsx)(`div`,{className:`flex flex-wrap gap-2`,role:`group`,"aria-label":t(`welcome.packsTitle`),children:s.map(e=>(0,H.jsxs)(`button`,{type:`button`,"aria-pressed":c===e.id,disabled:w,onClick:()=>{l(c===e.id?null:e.id),d(new Set)},className:`inline-flex items-center gap-2 rounded-full border px-3.5 py-1.5 text-xs sm:text-sm font-semibold cursor-pointer transition-all ${c===e.id?`border-[var(--c-blue1)] bg-[var(--c-blue1)] text-white shadow-xs`:`border-[var(--c-border)] bg-[var(--c-surface)] hover:border-[var(--c-blue3)] hover:bg-[var(--c-surface-hover)] text-[var(--c-text)]`}`,children:[(0,H.jsx)(T,{id:e.id}),(0,H.jsx)(`span`,{children:e.title})]},e.id))}),v&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 pt-2 animate-fade-in border-t border-[var(--c-border)]/60`,children:[v.description&&(0,H.jsx)(`p`,{className:`text-xs sm:text-sm text-[var(--c-text-muted)]`,children:v.description}),(0,H.jsx)(`ul`,{className:`divide-y divide-[var(--c-border)] rounded-xl border border-[var(--c-border)] bg-[var(--c-surface)]`,children:v.feeds.map(e=>(0,H.jsx)(`li`,{children:(0,H.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 px-3.5 py-2.5 hover:bg-[var(--c-surface-hover)]/50 transition-colors`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:!u.has(e.url),disabled:w,onChange:()=>b(e.url),className:`rounded accent-[var(--c-blue1)]`}),(0,H.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs sm:text-sm font-medium`,children:e.title}),e.lang&&(0,H.jsx)(`span`,{className:`shrink-0 text-[0.625rem] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded bg-[var(--c-surface-hover)] text-[var(--c-text-muted)]`,children:e.lang})]})},e.url))}),(0,H.jsx)(`button`,{type:`button`,disabled:w||y.length===0,onClick:()=>void x(v),className:`btn-primary self-start text-xs sm:text-sm font-semibold px-4 py-2`,children:f?t(`welcome.subscribingProgress`,{done:f.done,total:f.total}):t(`welcome.subscribePack`,{count:y.length})})]})]}),(0,H.jsxs)(`div`,{className:`rounded-2xl border border-[var(--c-border)]/80 bg-[var(--c-surface-hover)]/25 p-4 sm:p-5 flex flex-col gap-3.5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,H.jsx)(`div`,{className:`w-7 h-7 rounded-lg bg-[var(--c-blue1)]/10 text-[var(--c-blue1)] flex items-center justify-center shrink-0`,children:(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`}),(0,H.jsx)(`path`,{d:`M2 12h20`})]})}),(0,H.jsx)(`h3`,{className:`text-sm sm:text-base font-bold text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:t(`welcome.addTitle`)})]}),(0,H.jsx)(hc,{compact:!0,folderOptions:[],defaultFolderId:null,onClose:()=>{},onAdded:C})]}),(0,H.jsxs)(`div`,{className:`rounded-2xl border border-[var(--c-border)]/80 bg-[var(--c-surface-hover)]/25 p-4 sm:p-5 flex flex-col sm:flex-row sm:items-center justify-between gap-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,H.jsx)(`div`,{className:`w-7 h-7 rounded-lg bg-[var(--c-blue1)]/10 text-[var(--c-blue1)] flex items-center justify-center shrink-0`,children:(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M21 8v13H3V8`}),(0,H.jsx)(`path`,{d:`M1 3h22v5H1z`}),(0,H.jsx)(`path`,{d:`M10 12h4`})]})}),(0,H.jsx)(`h3`,{className:`text-sm sm:text-base font-bold text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:t(`welcome.importTitle`)})]}),(0,H.jsx)(`p`,{className:`text-xs sm:text-sm text-[var(--c-text-muted)] mt-1 ml-9.5`,children:t(`welcome.importHint`)})]}),(0,H.jsxs)(`button`,{type:`button`,disabled:w,onClick:()=>g.current?.click(),className:`btn-secondary inline-flex items-center gap-2 shrink-0 text-xs sm:text-sm font-semibold px-4 py-2`,children:[(0,H.jsx)(tc,{}),t(m?`feeds.importing`:`feeds.importOpml`)]}),(0,H.jsx)(`input`,{type:`file`,ref:g,onChange:S,accept:`.opml,.xml,text/xml,application/xml`,className:`hidden`})]})]})]})}function bc({folder:e,onRenamed:t}){let{t:n}=L(),[r,i]=(0,_.useState)(e.name);async function a(){let a=r.trim();if(!a||a===e.name){i(e.name);return}try{await V.updateFolder(e.id,a),G.success(n(`feeds.folderRenamed`,{name:a})),await t()}catch{i(e.name),G.error(n(`common.error`))}}return(0,H.jsx)(`input`,{className:`input h-9 min-h-0 flex-1 border-transparent bg-transparent px-2 text-sm shadow-none hover:border-[var(--c-border)] focus:border-[var(--c-border)]`,value:r,onChange:e=>i(e.target.value),onBlur:()=>void a(),onKeyDown:t=>{t.key===`Enter`&&t.currentTarget.blur(),t.key===`Escape`&&i(e.name)}})}function xc({folders:e,onClose:t,onChanged:n}){let{t:r}=L(),{syncAllowed:i}=Vs(),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(!1);async function l(e){if(e.preventDefault(),a.trim()){c(!0);try{await V.createFolder(a.trim()),G.success(r(`feeds.folderCreated`,{name:a.trim()})),o(``),await n()}catch{G.error(r(`common.error`))}finally{c(!1)}}}async function u(e){if(confirm(r(`feeds.deleteFolderConfirm`,{name:e.name})))try{await V.deleteFolder(e.id),G.success(r(`feeds.folderDeleted`,{name:e.name})),await n()}catch{G.error(r(`common.error`))}}return(0,H.jsxs)(`section`,{className:`card animate-fade-in flex flex-col gap-4 p-4 sm:p-5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h2`,{className:`text-base font-semibold`,children:r(`feeds.manageFolders`)}),(0,H.jsx)(`p`,{className:`mt-0.5 text-xs text-[var(--c-text-muted)]`,children:r(`feeds.renameFolderHint`)})]}),(0,H.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-lg p-1 text-[var(--c-text-muted)] hover:bg-[var(--c-surface-hover)] hover:text-[var(--c-text)] cursor-pointer`,"aria-label":r(`common.close`),children:(0,H.jsx)(oc,{})})]}),e.length>0&&(0,H.jsx)(`ul`,{className:`divide-y divide-[var(--c-border)] rounded-xl border border-[var(--c-border)]`,children:e.map(e=>(0,H.jsxs)(`li`,{className:`flex items-center gap-2 px-2 py-1.5`,children:[(0,H.jsx)(bc,{folder:e,onRenamed:n},e.name),(0,H.jsx)(`span`,{className:`shrink-0 text-xs tabular-nums text-[var(--c-text-muted)]`,children:r(`feeds.feedCount`,{count:e.feed_count??0})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>u(e),className:`rounded-lg p-2 text-[var(--c-text-muted)] hover:bg-[var(--c-danger-bg)] hover:text-[var(--c-danger)] cursor-pointer`,"aria-label":r(`common.delete`),title:r(`common.delete`),children:(0,H.jsx)($s,{})})]},e.id))}),(0,H.jsxs)(`form`,{onSubmit:l,className:`flex gap-2`,children:[(0,H.jsx)(`input`,{type:`text`,disabled:!i,placeholder:r(`feeds.newFolderPlaceholder`),className:`input flex-1`,value:a,onChange:e=>o(e.target.value)}),(0,H.jsx)(`button`,{type:`submit`,disabled:s||!i||!a.trim(),title:i?void 0:r(`plan.unavailable`),className:`btn-primary whitespace-nowrap`,children:r(`feeds.addFolder`)})]})]})}function Sc(e,t,n){e.deferred?G.info(n(`feeds.refreshPendingToast`,{title:t})):e.error?G.error(n(`feeds.refreshFailedToast`,{title:t,error:e.error})):G.success(n(`feeds.refreshedToast`,{title:t,count:e.newItems}))}function Cc(e,t){e.deferred?G.info(t(`feeds.refreshAllPendingToast`,{count:e.deferred,newItems:e.newItems})):e.errors||G.success(t(`feeds.refreshedAllToast`,{count:e.refreshed,newItems:e.newItems})),e.errors>0&&G.error(t(`feeds.failingCount`,{count:e.errors}))}var wc=[5,15,30,60,180,360,720,1440],Tc=`none`;function Ec(e,t){return!t||[e.label,e.title,e.url,e.site_url].filter(Boolean).join(` `).toLowerCase().includes(t.toLowerCase())}function Dc(){let{t:e}=L(),[t,n]=(0,_.useState)([]),[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(!0),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(new Set),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(``),[v,y]=Fi(),[b]=(0,_.useState)(()=>[v.get(`url`),v.get(`text`),v.get(`add`)].filter(Boolean).join(` `).match(/https?:\/\/[^\s]+/i)?.[0]??``);(0,_.useEffect)(()=>{(v.has(`add`)||v.has(`url`)||v.has(`text`))&&(k&&c(`add`),y({},{replace:!0}))},[]);let[x,S]=(0,_.useState)(`all`),[C,w]=(0,_.useState)(null),[T,E]=(0,_.useState)(!1),[D,ee]=(0,_.useState)(null),O=(0,_.useRef)(null);async function te(){try{let[e,t]=await Promise.all([V.listFeeds(),V.listFolders().catch(()=>({folders:[]}))]);n(e),i(t.folders)}catch(e){console.error(`Failed to load feeds:`,e)}finally{o(!1)}}(0,_.useEffect)(()=>{te()},[]),(0,_.useEffect)(()=>{if(D===null)return;document.getElementById(`feed-${D}`)?.scrollIntoView({behavior:`smooth`,block:`center`});let e=window.setTimeout(()=>ee(null),2500);return()=>window.clearTimeout(e)},[D,t]);let{syncAllowed:k}=Vs(),ne=e=>(e.label??e.title??e.url).replace(/\s+/g,` `).trim();async function A(t){G.success(e(`feeds.subscribedToast`,{title:ne(t)})),g(``),S(`all`),await te(),ee(t.id)}let re=(0,_.useMemo)(()=>[{value:``,label:e(`feeds.noFolder`)},...r.map(e=>({value:String(e.id),label:e.name}))],[r,e]),ie=(0,_.useMemo)(()=>wc.map(t=>({value:String(t),label:lc(e,t)})),[e]),ae=(0,_.useMemo)(()=>{let n=new Map;for(let e of t){let t=e.folder_id??null;n.set(t,[...n.get(t)??[],e])}let i=[...r].sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({key:`folder:${e.id}`,name:e.name,feeds:n.get(e.id)??[]}));return i.push({key:Tc,name:e(`feeds.uncategorized`),feeds:n.get(null)??[]}),i.filter(e=>e.feeds.length>0)},[t,r,e]),oe=(0,_.useMemo)(()=>ae.filter(e=>x===`all`||x===`failing`||e.key===x).map(e=>({...e,feeds:e.feeds.filter(e=>Ec(e,h)&&(x!==`failing`||!!e.last_error))})).filter(e=>e.feeds.length>0),[ae,x,h]),se=t.reduce((e,t)=>e+t.unread_count,0),ce=t.filter(e=>e.last_error).length,j=!h&&x!==`failing`;(0,_.useEffect)(()=>{if(!C)return;let e=e=>e.preventDefault();return window.addEventListener(`dragover`,e),window.addEventListener(`drop`,e),()=>{window.removeEventListener(`dragover`,e),window.removeEventListener(`drop`,e)}},[C!==null]);async function le(){if(!C||C.from===C.over){w(null);return}let e=ae.map(e=>{if(e.key!==C.group)return e.feeds;let t=[...e.feeds],[n]=t.splice(C.from,1);return t.splice(C.over,0,n),t}).flat();n(e),w(null);try{await V.reorderFeeds(e.map(e=>e.id))}catch(e){console.error(`Failed to save feed order:`,e),await te()}}async function M(t){f(e=>new Set(e).add(t));try{let r=await V.refreshFeed(t);r.feed?n(e=>e.map(e=>e.id===t?r.feed:e)):await te(),Sc(r,r.feed?ne(r.feed):``,e)}catch{G.error(e(`common.error`))}finally{f(e=>{let n=new Set(e);return n.delete(t),n})}}async function ue(){m(!0);try{let t=await V.refreshAllFeeds();await te(),Cc(t,e)}catch{G.error(e(`common.error`))}finally{m(!1)}}async function de(t){if(confirm(e(`feeds.unsubscribeConfirm`,{title:ne(t)})))try{await V.unsubscribeFeed(t.id),G.success(e(`feeds.unsubscribedToast`,{title:ne(t)})),await te()}catch{G.error(e(`common.error`))}}async function fe(t){try{await V.markAllRead(t.id),G.success(e(`feeds.markedReadToast`,{title:ne(t)})),await te()}catch{G.error(e(`common.error`))}}function pe(){let e=document.createElement(`a`);e.href=V.exportOpmlUrl(),e.download=`feedkeeper-subscriptions.opml`,e.click()}async function me(t){let n=t.target.files?.[0];if(n){E(!0);try{let t=await V.importOpml(await n.text());t.failed>0?G.error(e(`feeds.importPartial`,{imported:t.imported,skipped:t.skipped,failed:t.failed})):G.success(e(`feeds.importSuccess`,{imported:t.imported,skipped:t.skipped})),await te()}catch{G.error(e(`feeds.importFailed`))}finally{E(!1),O.current&&(O.current.value=``)}}}let he=[{key:`all`,label:e(`feeds.filterAll`),count:t.length},...ae.map(e=>({key:e.key,label:e.name,count:e.feeds.length})),...ce>0?[{key:`failing`,label:e(`feeds.filterFailing`),count:ce,danger:!0}]:[]];return(0,H.jsxs)(`div`,{className:`flex flex-col gap-6 pb-24`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h1`,{className:`text-2xl font-semibold`,children:e(`feeds.title`)}),!a&&t.length>0&&(0,H.jsxs)(`p`,{className:`mt-1 text-sm text-[var(--c-text-muted)]`,children:[e(`feeds.feedCount`,{count:t.length}),` · `,e(`feeds.unread`,{count:se}),ce>0&&(0,H.jsxs)(H.Fragment,{children:[` · `,(0,H.jsx)(`button`,{type:`button`,onClick:()=>S(`failing`),className:`text-[var(--c-danger)] hover:underline cursor-pointer`,children:e(`feeds.failingCount`,{count:ce})})]})]})]}),(0,H.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(a||t.length>0)&&(0,H.jsxs)(`button`,{type:`button`,disabled:!k,title:k?void 0:e(`plan.unavailable`),onClick:()=>c(s===`add`?null:`add`),className:`btn-primary inline-flex items-center gap-1.5 whitespace-nowrap`,children:[(0,H.jsx)(ec,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:e(`feeds.addFeed`)}),(0,H.jsx)(`span`,{className:`sm:hidden`,children:e(`feeds.addFeedShort`)})]}),(0,H.jsx)(Bs,{label:e(`feeds.moreActions`),items:[{label:e(p?`feeds.refreshing`:`feeds.refreshAll`),icon:(0,H.jsx)(Xs,{className:`h-4 w-4 ${p?`animate-spin`:``}`}),onSelect:ue,disabled:p||!k},{label:e(`feeds.manageFolders`),icon:(0,H.jsx)(rc,{}),onSelect:()=>c(`folders`)},{label:e(T?`feeds.importing`:`feeds.importOpml`),icon:(0,H.jsx)(tc,{}),onSelect:()=>O.current?.click(),disabled:T||!k},{label:e(`feeds.exportOpml`),icon:(0,H.jsx)(nc,{}),onSelect:pe}]}),(0,H.jsx)(`input`,{type:`file`,ref:O,onChange:me,accept:`.opml,.xml,text/xml,application/xml`,className:`hidden`})]})]}),!k&&t.length>0&&(0,H.jsx)(_c,{}),s===`add`&&k&&(0,H.jsx)(hc,{folderOptions:re,defaultFolderId:x.startsWith(`folder:`)?Number(x.slice(7)):null,initialUrl:b,subscribedUrls:t.map(e=>e.url),onClose:()=>c(null),onAdded:A}),s===`folders`&&(0,H.jsx)(xc,{folders:r,onClose:()=>c(null),onChanged:te}),a?(0,H.jsx)(zs,{size:`lg`}):t.length===0?s!==`add`&&(0,H.jsx)(yc,{onSubscribed:te}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`span`,{className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-[var(--c-text-muted)] opacity-60`,children:(0,H.jsx)(ic,{})}),(0,H.jsx)(`input`,{type:`search`,value:h,onChange:e=>g(e.target.value),placeholder:e(`feeds.searchPlaceholder`),"aria-label":e(`feeds.searchPlaceholder`),className:`input pl-9`})]}),(0,H.jsx)(`div`,{className:`-mx-4 flex gap-2 overflow-x-auto px-4 pb-1 sm:mx-0 sm:flex-wrap sm:overflow-visible sm:px-0`,role:`group`,"aria-label":e(`feeds.folder`),children:he.map(e=>{let t=x===e.key;return(0,H.jsxs)(`button`,{type:`button`,onClick:()=>S(e.key),"aria-pressed":t,className:`inline-flex shrink-0 items-center gap-1.5 rounded-full border px-3 py-1.5 text-sm font-medium transition-colors cursor-pointer ${t?`border-[var(--c-mobile-nav-active-border)] bg-[var(--c-mobile-nav-active)] text-[var(--c-text)]`:`border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)]`} ${e.danger&&!t?`text-[var(--c-danger)]`:``}`,children:[e.label,e.count!==void 0&&(0,H.jsx)(`span`,{className:`text-xs tabular-nums opacity-70`,children:e.count})]},e.key)})})]}),oe.length===0?(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:e(`feeds.noMatches`)}):(0,H.jsx)(`div`,{className:`flex flex-col gap-6 animate-page-fade`,children:oe.map(t=>{let n=t.feeds.reduce((e,t)=>e+t.unread_count,0);return(0,H.jsxs)(`section`,{children:[(0,H.jsxs)(`div`,{className:`mb-2 flex items-baseline justify-between gap-3 px-1`,children:[(0,H.jsx)(`h2`,{className:`truncate text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:t.name}),(0,H.jsxs)(`span`,{className:`shrink-0 text-xs text-[var(--c-text-muted)]`,children:[e(`feeds.feedCount`,{count:t.feeds.length}),n>0&&` · ${e(`feeds.unread`,{count:n})}`]})]}),(0,H.jsx)(`ul`,{className:`card divide-y divide-[var(--c-border)]`,children:t.feeds.map((e,n)=>(0,H.jsx)(fc,{feed:e,editing:l===e.id,refreshing:d.has(e.id),highlighted:D===e.id,folderOptions:re,intervalOptions:ie,onEdit:t=>u(t?e.id:null),onRefresh:()=>void M(e.id),onMarkRead:()=>void fe(e),onUnsubscribe:()=>void de(e),onSaved:te,drag:j&&t.feeds.length>1?{isDragging:C?.group===t.key&&C.from===n,isDragOver:C?.group===t.key&&C.over===n&&C.from!==n,onDragStart:r=>{r.dataTransfer.effectAllowed=`move`,r.dataTransfer.setData(`application/x-feedkeeper-feed`,String(e.id)),w({group:t.key,from:n,over:n})},onDragOver:e=>{C?.group===t.key&&(e.preventDefault(),C.over!==n&&w({...C,over:n}))},onDragEnd:()=>void le(),onDrop:e=>e.preventDefault()}:void 0},e.id))})]},t.key)})})]})]})}function Oc(){let[e,t]=(0,_.useState)(()=>new Date);return(0,_.useEffect)(()=>{let n=new Date(e);n.setHours(24,0,1,0);let r=window.setTimeout(()=>t(new Date),n.getTime()-Date.now());return()=>window.clearTimeout(r)},[e]),e}function kc({className:e=``}){let{i18n:t}=L(),n=Oc(),r=e=>new Intl.DateTimeFormat(t.resolvedLanguage,{weekday:`long`,day:`numeric`,month:`long`,...e?{year:`numeric`}:{}}).format(n);return(0,H.jsxs)(`time`,{dateTime:n.toLocaleDateString(`sv-SE`),className:`truncate text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)] ${e}`,children:[(0,H.jsx)(`span`,{className:`sm:hidden`,children:r(!1)}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:r(!0)})]})}var Ac=c(m(),1);function jc(e,t){this.v=e,this.k=t}function Mc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Nc(e){if(Array.isArray(e))return e}function Pc(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Fc(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
12
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ic(e,t){return Nc(e)||Pc(e,t)||Lc(e,t)||Fc()}function Lc(e,t){if(e){if(typeof e==`string`)return Mc(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mc(e,t):void 0}}function Rc(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof jc;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}Rc.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},Rc.prototype.next=function(e){return this._invoke(`next`,e)},Rc.prototype.throw=function(e){return this._invoke(`throw`,e)},Rc.prototype.return=function(e){return this._invoke(`return`,e)};var zc=Object.entries,Bc=Object.setPrototypeOf,Vc=Object.isFrozen,Hc=Object.getPrototypeOf,Uc=Object.getOwnPropertyDescriptor,Wc=Object.freeze,Gc=Object.seal,Kc=Object.create,qc=typeof Reflect<`u`&&Reflect,Jc=qc.apply,Yc=qc.construct;Wc||=function(e){return e},Gc||=function(e){return e},Jc||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Yc||=function(e){return new e(...[...arguments].slice(1))};var Xc=yl(Array.prototype.forEach);Array.prototype.indexOf;var Zc=yl(Array.prototype.lastIndexOf),Qc=yl(Array.prototype.pop),$c=yl(Array.prototype.push),el=yl(Array.prototype.slice),tl=yl(Array.prototype.splice),nl=Array.isArray,rl=bl(Set),il=yl(Set.prototype.add),al=yl(Set.prototype.has),ol=yl(String.prototype.toLowerCase),sl=yl(String.prototype.toString),cl=yl(String.prototype.match),ll=yl(String.prototype.replace),ul=yl(String.prototype.indexOf),dl=yl(String.prototype.trim),fl=yl(Number.prototype.toString),pl=yl(Boolean.prototype.toString),ml=typeof BigInt>`u`?null:yl(BigInt.prototype.toString),hl=typeof Symbol>`u`?null:yl(Symbol.prototype.toString),K=yl(Object.prototype.hasOwnProperty),gl=yl(Object.prototype.toString),_l=yl(RegExp.prototype.test),vl=bl(TypeError);function yl(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return Jc(e,t,n)}}function bl(e){return function(){return Yc(e,[...arguments])}}function q(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ol;if(Bc&&Bc(e,null),!nl(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Vc(t)||(t[r]=e),i=e)}e[i]=!0}return e}function xl(e){for(let t=0;t<e.length;t++)K(e,t)||(e[t]=null);return e}function Sl(e){let t=Kc(null);for(let r of zc(e)){var n=Ic(r,2);let i=n[0],a=n[1];K(e,i)&&(t[i]=nl(a)?xl(a):a&&typeof a==`object`&&a.constructor===Object?Sl(a):a)}return t}function Cl(e){switch(typeof e){case`string`:return e;case`number`:return fl(e);case`boolean`:return pl(e);case`bigint`:return ml?ml(e):`0`;case`symbol`:return hl?hl(e):`Symbol()`;case`undefined`:return gl(e);case`function`:case`object`:{if(e===null)return gl(e);let t=e,n=wl(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:gl(e)}return gl(e)}default:return gl(e)}}function wl(e,t){for(;e!==null;){let n=Uc(e,t);if(n){if(n.get)return yl(n.get);if(typeof n.value==`function`)return yl(n.value)}e=Hc(e)}function n(){return null}return n}function Tl(e,t){for(;e!==null;){let n=Uc(e,t);if(n)return n.get?yl(n.get):null;e=Hc(e)}return null}function El(e){try{return _l(e,``),!0}catch{return!1}}var Dl=Wc(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ol=Wc(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),kl=Wc([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Al=Wc([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),jl=Wc(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Ml=Wc([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Nl=Wc([`#text`]),Pl=Wc(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Fl=Wc(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Il=Wc(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Ll=Wc([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Rl=Gc(/{{[\w\W]*|^[\w\W]*}}/g),zl=Gc(/<%[\w\W]*|^[\w\W]*%>/g),Bl=Gc(/\${[\w\W]*/g),Vl=Gc(/^data-[\-\w.\u00B7-\uFFFF]+$/),Hl=Gc(/^aria-[\-\w]+$/),Ul=Gc(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wl=Gc(/^(?:\w+script|data):/i),Gl=Gc(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Kl=Gc(/^html$/i),ql=Gc(/^[a-z][.\w]*(-[.\w]+)+$/i),Jl=Gc(/<[/\w!]/g),Yl=Gc(/<[/\w]/g),Xl=Gc(/<\/no(script|embed|frames)/i),Zl=Gc(/\/>/i),Ql={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},$l=Wc(q({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),eu=function(){return typeof window>`u`?null:window},tu=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},J=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},nu=function(e,t,n,r){return K(e,t)&&nl(e[t])?q(r.base?Sl(r.base):{},e[t],r.transform):n},ru=function(e,t,n){let r=K(e,t)?e[t]:void 0;return r&&typeof r==`object`?Sl(r):n()};function iu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:eu(),t=e=>iu(e);if(t.version=`3.4.17`,t.removed=[],!e||!e.document||e.document.nodeType!==Ql.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=wl(d,`cloneNode`),p=wl(d,`remove`),m=wl(d,`removeAttributeNode`),h=wl(d,`nextSibling`),g=wl(d,`childNodes`),_=wl(d,`parentNode`),v=wl(d,`shadowRoot`),y=wl(d,`attributes`),b=o&&o.prototype?wl(o.prototype,`nodeType`):null,x=o&&o.prototype?wl(o.prototype,`nodeName`):null,S=o&&o.prototype?wl(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName},T=Tl(d,`namespaceURI`),E=function(e){return T?T(e):e.namespaceURI};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let D,ee=``,O,te=!1,k=0,ne=function(){if(k>0)throw vl(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},A=function(e){ne(),k++;try{return D.createHTML(e)}finally{k--}},re=function(e){ne(),k++;try{return D.createScriptURL(e)}finally{k--}},ie=function(){return te||=(O=tu(u,i),!0),O},ae=n,oe=ae.implementation,se=ae.createNodeIterator,ce=ae.createDocumentFragment,j=ae.getElementsByTagName,le=r.importNode,M=J();t.isSupported=typeof zc==`function`&&typeof _==`function`&&oe&&oe.createHTMLDocument!==void 0;let ue=Rl,de=zl,fe=Bl,pe=Vl,me=Hl,he=Wl,ge=Gl,_e=ql,N=Ul,P=null,ve=q({},[...Dl,...Ol,...kl,...jl,...Nl]),F=null,ye=q({},[...Pl,...Fl,...Il,...Ll]),be=Object.seal(Kc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,I=null,Se=Object.seal(Kc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ce=!0,we=!0,Te=!1,Ee=!0,De=!1,Oe=!0,ke=!1,Ae=!1,je=null,Me=null,Ne=!1,Pe=!1,Fe=!1,Ie=!1,Le=!0,Re=!1,ze=`user-content-`,Be=!0,Ve=!1,He=null,Ue={},We=null,Ge=q({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ke=null,qe=q({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Je=null,Ye=q({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Xe=`http://www.w3.org/1998/Math/MathML`,Ze=`http://www.w3.org/2000/svg`,Qe=`http://www.w3.org/1999/xhtml`,$e=Qe,et=!1,tt=null,nt=q({},[Xe,Ze,Qe],sl),L=Wc([`mi`,`mo`,`mn`,`ms`,`mtext`]),rt=q({},L),it=Wc([`annotation-xml`]),at=q({},it),ot=q({},[`title`,`style`,`font`,`a`,`script`]),st=null,ct=[`application/xhtml+xml`,`text/html`],lt=null,ut=null,dt=n.createElement(`form`),ft=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ut&&ut===e)return;(!e||typeof e!=`object`)&&(e={}),e=Sl(e),st=ct.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,lt=st===`application/xhtml+xml`?sl:ol,P=nu(e,`ALLOWED_TAGS`,ve,{transform:lt}),F=nu(e,`ALLOWED_ATTR`,ye,{transform:lt}),tt=nu(e,`ALLOWED_NAMESPACES`,nt,{transform:sl}),Je=nu(e,`ADD_URI_SAFE_ATTR`,Ye,{transform:lt,base:Ye}),Ke=nu(e,`ADD_DATA_URI_TAGS`,qe,{transform:lt,base:qe}),We=nu(e,`FORBID_CONTENTS`,Ge,{transform:lt}),xe=nu(e,`FORBID_TAGS`,Sl({}),{transform:lt}),I=nu(e,`FORBID_ATTR`,Sl({}),{transform:lt}),Ue=K(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?Sl(e.USE_PROFILES):e.USE_PROFILES:!1,Ce=e.ALLOW_ARIA_ATTR!==!1,we=e.ALLOW_DATA_ATTR!==!1,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ee=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=e.SAFE_FOR_TEMPLATES||!1,Oe=e.SAFE_FOR_XML!==!1,ke=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,Le=e.SANITIZE_DOM!==!1,Re=e.SANITIZE_NAMED_PROPS||!1,Be=e.KEEP_CONTENT!==!1,Ve=e.IN_PLACE||!1,N=El(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ul,$e=typeof e.NAMESPACE==`string`?e.NAMESPACE:Qe,rt=ru(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>q({},L)),at=ru(e,`HTML_INTEGRATION_POINTS`,()=>q({},it));let t=ru(e,`CUSTOM_ELEMENT_HANDLING`,()=>Kc(null));if(be=Kc(null),K(t,`tagNameCheck`)&&ft(t.tagNameCheck)&&(be.tagNameCheck=t.tagNameCheck),K(t,`attributeNameCheck`)&&ft(t.attributeNameCheck)&&(be.attributeNameCheck=t.attributeNameCheck),K(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(be.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Gc(be),De&&(we=!1),Fe&&(Pe=!0),Ue&&(P=q({},Nl),F=Kc(null),Ue.html===!0&&(q(P,Dl),q(F,Pl)),Ue.svg===!0&&(q(P,Ol),q(F,Fl),q(F,Ll)),Ue.svgFilters===!0&&(q(P,kl),q(F,Fl),q(F,Ll)),Ue.mathMl===!0&&(q(P,jl),q(F,Il),q(F,Ll))),Se.tagCheck=null,Se.attributeCheck=null,K(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Se.tagCheck=e.ADD_TAGS:nl(e.ADD_TAGS)&&(P===ve&&(P=Sl(P)),q(P,e.ADD_TAGS,lt))),K(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Se.attributeCheck=e.ADD_ATTR:nl(e.ADD_ATTR)&&(F===ye&&(F=Sl(F)),q(F,e.ADD_ATTR,lt))),K(e,`ADD_FORBID_CONTENTS`)&&nl(e.ADD_FORBID_CONTENTS)&&(We===Ge&&(We=Sl(We)),q(We,e.ADD_FORBID_CONTENTS,lt)),Be&&(P[`#text`]=!0),ke&&q(P,[`html`,`head`,`body`]),P.table&&(q(P,[`tbody`]),delete xe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw vl(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw vl(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=D;D=e.TRUSTED_TYPES_POLICY;try{ee=A(``)}catch(e){throw D=t,e}}else e.TRUSTED_TYPES_POLICY===null?(D=void 0,ee=``):(D===void 0&&(D=ie()),D&&typeof ee==`string`&&(ee=A(``)));Wc&&Wc(e),ut=e},mt=q({},[...Ol,...kl,...Al]),ht=q({},[...jl,...Ml]),gt=function(e,t,n){return t.namespaceURI===Qe?e===`svg`:t.namespaceURI===Xe?e===`svg`&&(n===`annotation-xml`||rt[n]):!!mt[e]},_t=function(e,t,n){return t.namespaceURI===Qe?e===`math`:t.namespaceURI===Ze?e===`math`&&at[n]:!!ht[e]},vt=function(e,t,n){return t.namespaceURI===Ze&&!at[n]||t.namespaceURI===Xe&&!rt[n]?!1:!ht[e]&&(ot[e]||!mt[e])},yt=function(e){let t=E(e),n=ol(w(e)),r=_(e),i,a;return r&&C(r)===Ql.element?(i={namespaceURI:E(r)},a=ol(w(r))):(i={namespaceURI:$e},a=`template`),tt[t]?t===Ze?gt(n,i,a):t===Xe?_t(n,i,a):t===Qe?vt(n,i,a):!!(st===`application/xhtml+xml`&&tt[t]):!1},bt=function(e){$c(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw vl(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},xt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},St=function(e){Et(e);let t=g(e);t&&Xc(el(t),e=>{try{p(e)}catch{}});let n=C(e)===Ql.element?y(e):null;if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&xt(e,r,i)}},Ct=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}$c(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Pe||Fe)try{bt(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},wt=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||F[lt(i)]||xt(e,r,i)}},Tt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(t(e)===!1)continue;if(n&&C(e)===Ql.element){let t=v(e);Vt(t)&&r.push(t)}let i=g(e);if(i)for(let e=i.length-1;e>=0;--e)r.push(i[e])}},Et=function(e){Tt(e,e=>{C(e)===Ql.element&&wt(e)})},Dt=function(e){let t=[];return Tt(e,e=>{t.push(e)},!0),t},Ot=function(e,t){let n=rl();Xc(Dt(e),e=>{C(e)===Ql.element&&il(n,e)}),Xc(t,e=>{C(e)===Ql.element&&!al(n,e)&&wt(e)})},kt=function(e,n){let r=!1;return Xc(t.removed,t=>{t.element&&(r||=t.element===e,Et(t.element))}),Ot(e,n),r},At=function(e,t){let n=He,r=null,i=()=>(r||(r=rl(),Xc(t,e=>{il(r,e)})),r);for(let t=0;;t++){let r=Dt(e),a=[e],o=!1;if(Xc(r,e=>{C(e)===Ql.documentFragment?$c(a,e):!o&&!al(n,e)&&(o=al(i(),e))}),!o)return;if(t>=8)throw vl(`the tree kept changing during in-place sanitization; refusing to return it`);Xc(a,(t,n)=>{jt(t,n>0,e,i())})}},jt=function(e,t,n,r){let i=It(e),a;for(;a=i.nextNode();)al(r,a)&&!al(He,a)&&(t&&Ut(M.uponSanitizeShadowNode,a,null),Jt(a,n),tn(a,n),Vt(a.content)&&nn(a.content))},Mt=function(e){He&&il(He,e)},Nt=function(e,t){return Oe?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Pt=function(e){Oe&&Tt(e,e=>{let t=C(e);if(t===Ql.processingInstruction||t===Ql.comment&&_l(Yl,e.data)){try{p(e)}catch{}return!1}if(t===Ql.element){let t=e,n=lt(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Nt(`for`,n)&&t.removeAttribute(`for`)}catch{}}return!0})},Ft=function(e){let t=null,r=null;if(Ne)e=`<remove></remove>`+e;else{let t=cl(e,/^[\r\n\t ]+/);r=t&&t[0]}st===`application/xhtml+xml`&&$e===Qe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=D?A(e):e;if($e===Qe)try{t=new l().parseFromString(i,st)}catch{}if(!t||!t.documentElement){t=oe.createDocument($e,`template`,null);try{t.documentElement.innerHTML=et?ee:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),$e===Qe?j.call(t,ke?`html`:`body`)[0]:ke?t.documentElement:a},It=function(e){let t=S?S(e):e.ownerDocument;return se.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Lt=function(e){return e=ll(e,ue,` `),e=ll(e,de,` `),e=ll(e,fe,` `),e},Rt=function(e){zt(e);let t=e.querySelectorAll?.call(e,`template`);t&&Xc(t,e=>{Vt(e.content)&&Rt(e.content)})},zt=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=se.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Lt(r.data),r=n.nextNode()},Bt=function(e){let t=x?x(e):null;return typeof t!=`string`||lt(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},Vt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===Ql.documentFragment}catch{return!1}},Ht=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Ut(e,n,r){e.length!==0&&Xc(e,e=>{e.call(t,n,r,ut)})}let Wt=function(e,t){return!!(Oe&&e.hasChildNodes()&&!Ht(e.firstElementChild)&&_l(Jl,e.textContent)&&_l(Jl,e.innerHTML)||Oe&&$l[t]&&C(e)===Ql.element&&E(e)===Qe&&(Ht(e.firstElementChild)||typeof e.textContent==`string`&&_l(Jl,e.textContent))||e.nodeType===Ql.processingInstruction||Oe&&e.nodeType===Ql.comment&&_l(Yl,e.data))},Gt=function(e,t){return e instanceof RegExp?_l(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},Kt=function(e,t,n){if(!xe[t]&&Zt(t)&&Gt(be.tagNameCheck,t))return!1;if(Be&&!We[t]&&!We[ol(t)]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return bt(e),!0},R=function(e,t,n,r){return e.length===0?t:t===n||t===r?Sl(t):t},qt=function(e,t){return e===t||_(e)!==null?!1:(Ve&&Et(e),!0)},Jt=function(e,n){if(Mt(e),Ut(M.beforeSanitizeElements,e,null),qt(e,n))return!0;if(Bt(e))return bt(e),!0;let r=lt(w(e));if(P=R(M.uponSanitizeElement,P,ve,je),Ut(M.uponSanitizeElement,e,{tagName:r,allowedTags:P}),qt(e,n))return!0;if(Wt(e,r))return bt(e),!0;if(xe[r]||!(Se.tagCheck instanceof Function&&Se.tagCheck(r))&&!P[r]){let t=Kt(e,r,n);return t===!1&&(Ut(M.afterSanitizeElements,e,null),qt(e,n))?!0:t}if(C(e)===Ql.element&&!yt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&_l(Xl,e.innerHTML))return bt(e),!0;if(De&&e.nodeType===Ql.text){let n=Lt(e.textContent);e.textContent!==n&&($c(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Ut(M.afterSanitizeElements,e,null),qt(e,n)},Yt=function(e,t,r){if(I[t]||Nt(t,e)||Le&&(t===`id`||t===`name`)&&(r in n||r in dt))return!1;let i=F[t]||Se.attributeCheck instanceof Function&&Se.attributeCheck(t,e);return we&&_l(pe,t)||Ce&&_l(me,t)?!0:i?Je[t]||_l(N,ll(r,ge,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ul(r,`data:`)===0&&Ke[e]||Te&&!_l(he,ll(r,ge,``))?!0:!r:Zt(e)&&Gt(be.tagNameCheck,e)&&Gt(be.attributeNameCheck,t,e)||t===`is`&&be.allowCustomizedBuiltInElements&&Gt(be.tagNameCheck,r)},Xt=q({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Zt=function(e){return!Xt[ol(e)]&&_l(_e,e)},Qt=function(e,t,n,r){if(D&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return A(r);case`TrustedScriptURL`:return re(r)}return r},$t=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Bt(e)||(bt(e),!1)}catch{return Ct(t,e),!1}},en=function(e,t){return Oe&&_l(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,t)?!0:ol(e)===`attributename`&&cl(t,`href`)!==null},tn=function(e,n){if(Ut(M.beforeSanitizeAttributes,e,null),qt(e,n))return;let r=e.attributes;if(!r||Bt(e))return;F=R(M.uponSanitizeAttribute,F,ye,Me);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0},a=r.length,o=lt(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=lt(s),d=l,f=s===`value`?d:dl(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Ut(M.uponSanitizeAttribute,e,i),f=i.attrValue,Re&&(u===`id`||u===`name`)&&ul(f,ze)!==0&&(Ct(s,e,n),f=ze+f,p=!0),en(s,f)){Ct(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){Ct(s,e,n);continue}if(!Ee&&_l(Zl,f)){Ct(s,e,n);continue}if(De&&(f=Lt(f)),!Yt(o,u,f)){Ct(s,e,n);continue}f=Qt(o,u,c,f),f!==d&&$t(e,s,c,f)&&p&&Qc(t.removed)}}Ut(M.afterSanitizeAttributes,e,null),qt(e,n)},nn=function(e){let t=null,n=It(e);for(Ut(M.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Ut(M.uponSanitizeShadowNode,t,null),Jt(t,e),tn(t,e),Vt(t.content)&&nn(t.content),C(t)===Ql.element){let e=v(t);Vt(e)&&(rn(e),nn(e))}De&&zt(e),Ut(M.afterSanitizeShadowDOM,e,null)},rn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){nn(e.shadow);continue}let n=e.node,r=C(n)===Ql.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&lt(e)===`template`){let e=n.content;Vt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);Vt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(et=!e,et&&(e=`<!-->`),typeof e!=`string`&&!Ht(e)&&(e=Cl(e),typeof e!=`string`))throw vl(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ae?(P=je,F=Me):pt(n),(M.uponSanitizeElement.length>0||M.uponSanitizeAttribute.length>0)&&(P=Sl(P)),M.uponSanitizeAttribute.length>0&&(F=Sl(F)),t.removed=[];let c=Ve&&typeof e!=`string`&&Ht(e),l=[],u=He;if(c){Pt(e);let t=w(e);if(typeof t==`string`){let n=lt(t);if(!P[n]||xe[n])throw St(e),vl(`root node is forbidden and cannot be sanitized in-place`)}if(Bt(e))throw St(e),vl(`root node is clobbered and cannot be sanitized in-place`);l=Dt(e),He=rl()}else if(Ht(e))i=Ft(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Ql.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),rn(i);else{if(!Pe&&!De&&!ke&&e.indexOf(`<`)===-1)return D&&Ie?A(e):e;if(i=Ft(e),!i)return Pe?null:Ie?ee:``}i&&Ne&&bt(i.firstChild);let d=c?e:i;try{c&&rn(e);let t=It(d);for(;o=t.nextNode();)Jt(o,d),tn(o,d),Vt(o.content)&&nn(o.content);c&&At(e,l)}catch(t){throw c&&(St(e),kt(e,l)),t}finally{He=u}if(c){if(kt(e,l))throw vl(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return De&&Rt(e),e}if(Pe){if(De&&Rt(i),Fe)for(s=ce.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(F.shadowroot||F.shadowrootmode)&&(s=le.call(r,s,!0)),s}let f=ke?i.outerHTML:i.innerHTML;return ke&&P[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&_l(Kl,i.ownerDocument.doctype.name)&&(f=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
13
- `+f),De&&(f=Lt(f)),D&&Ie?A(f):f},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pt(e),Ae=!0,je=P,Me=F},t.clearConfig=function(){ut=null,Ae=!1,je=null,Me=null,D=O,ee=``},t.isValidAttribute=function(e,t,n){ut||pt({});let r=lt(e),i=lt(t);return typeof n==`string`&&(en(t,n)||!Ee&&_l(Zl,n))?!1:Yt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&K(M,e)&&$c(M[e],t)},t.removeHook=function(e,t){if(K(M,e)){if(t!==void 0){let n=Zc(M[e],t);return n===-1?void 0:tl(M[e],n,1)[0]}return Qc(M[e])}},t.removeHooks=function(e){K(M,e)&&(M[e]=[])},t.removeAllHooks=function(){M=J()},t}var au=iu();function ou(e,t){try{let n=new URL(e,t||void 0);return n.protocol===`http:`||n.protocol===`https:`?n.toString():null}catch{return null}}function su(e){if(!e)return``;try{return new URL(e).pathname.split(`/`).filter(Boolean).at(-1)?.toLowerCase()?.replace(/[-_]\d{2,4}x\d{2,4}(?=\.\w+$)/,``).replace(/\.(?:webp|jpeg)$/,`.jpg`)??``}catch{return``}}var cu={USE_PROFILES:{html:!0},ALLOWED_ATTR:[`href`,`src`,`alt`,`title`,`width`,`height`],ALLOW_DATA_ATTR:!1,FORBID_TAGS:[`form`,`input`,`button`,`textarea`,`select`,`style`,`video`,`audio`,`source`]};function lu(e,t){return e.getAttribute(`width`)===`1`&&e.getAttribute(`height`)===`1`||!!(t&&/feedsportal\.com|feedburner\.com|pixel\.wp\.com|statcounter\.com/i.test(t))}function uu(e){let t=Number(e.getAttribute(`width`)),n=Number(e.getAttribute(`height`));return t>0&&t<160||n>0&&n<100}function du(e,t){if(!e)return null;let n=au.sanitize(e,cu),r=new DOMParser().parseFromString(n,`text/html`);for(let e of r.querySelectorAll(`img`)){let n=r.createRange();if(n.selectNodeContents(r.body),n.setEndBefore(e),n.toString().trim().length>160)return null;let i=ou(e.getAttribute(`src`)??``,t);if(i&&!lu(e,i)&&!uu(e))return i}return null}function fu(e,t={}){if(!e)return``;let n=au.sanitize(e,cu),r=new DOMParser().parseFromString(n,`text/html`),i=t.heroImageUrl?ou(t.heroImageUrl,t.baseUrl):null,a=su(i),o=r.body.textContent?.trim().length??0,s=null,c=null;Array.from(r.querySelectorAll(`img`)).forEach((e,n)=>{let l=ou(e.getAttribute(`src`)??``,t.baseUrl),u=su(l),d=!1;if(n===0&&i?.includes(`/archive/images/`)&&l?.includes(`/archive/images/`)){let t=r.createRange();t.selectNodeContents(r.body),t.setEndBefore(e),d=!t.toString().trim()}let f=!!(i&&l&&(l===i||a&&u===a||d||n===0&&o<400)),p=!1;if(l&&l===c&&s){let t=r.createRange();t.setStartAfter(s),t.setEndBefore(e),p=!t.toString().trim()}if(!l||lu(e,l)||f||p){let t=f?e.getAttribute(`alt`)?.trim():null,n=e.closest(`p`);e.remove(),t&&t.length>=15&&n&&n.textContent?.trim()===t&&!n.querySelector(`img`)&&n.remove()}else e.setAttribute(`src`,l),e.removeAttribute(`loading`),s=e,c=l}),r.querySelectorAll(`a`).forEach(e=>{let n=ou(e.getAttribute(`href`)??``,t.baseUrl);n?(e.setAttribute(`href`,n),e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`)):e.removeAttribute(`href`)}),r.querySelectorAll(`p, div, figure, a`).forEach(e=>{!e.textContent?.trim()&&!e.querySelector(`img`)&&e.remove()});let l=Array.from(r.body.childNodes);if(l.some(e=>e.nodeType===Node.TEXT_NODE&&e.textContent?.trim())&&!r.body.querySelector(`p`)){let e=r.createElement(`p`);l.forEach(t=>e.appendChild(t)),r.body.appendChild(e)}return au.sanitize(r.body.innerHTML,cu)}function pu(e){return e?Math.max(1,Math.ceil(e.trim().split(/\s+/).length/200)):1}function mu({item:e,isOpen:t,onClose:n,onToggleBookmark:r,onToggleRead:i,onNext:a,onPrevious:o,onItemUpdated:s,hasNext:c=!1,hasPrev:l=!1}){let{t:u,i18n:d}=L(),[f,p]=(0,_.useState)(61),m=(0,_.useRef)(null),h=(0,_.useCallback)(e=>{if(m.current?.disconnect(),!e)return;let t=()=>p(e.offsetHeight);t(),m.current=new ResizeObserver(t),m.current.observe(e)},[]),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(!1),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(null),T=e?.author||C,[E,D]=(0,_.useState)(null),[ee,O]=(0,_.useState)(!1),te=e?.feed_full_text_mode===`never`,[k,ne]=(0,_.useState)(null),A=e?.link?ou(e.link):null;(0,_.useEffect)(()=>{S(!!e?.full_content_html),D(null),O(!1),w(null)},[e?.id,e?.full_content_html]),(0,_.useEffect)(()=>{t&&e&&A&&localStorage.getItem(`feedkeeper_auto_reader_mode`)!==`false`&&!e.full_content_html&&!te&&navigator.onLine&&re()},[t,e?.id]),(0,_.useEffect)(()=>{if(t){let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}}},[t]);let re=(0,_.useCallback)(async()=>{if(e&&!y){if(e.full_content_html){S(e=>!e);return}if(A){b(!0),D(null),O(!1);try{let t=await V.extractContent(e.id),n={...e,full_content_html:t.full_content_html};t.byline&&w(t.byline),S(!0),s?.(n)}catch(e){e instanceof ga&&e.code===`consent_wall`?O(!0):e instanceof ga&&e.status===0?D(u(`common.offlineAction`)):e instanceof ga&&e.code===`full_text_disabled`||(console.error(`Failed to extract full text:`,e),D(u(`reader.extractionFailed`)))}finally{b(!1)}}}},[e,y,A,u,s]);(0,_.useEffect)(()=>{if(!t||!e)return;let s=e;function u(e){document.activeElement instanceof HTMLInputElement||document.activeElement instanceof HTMLTextAreaElement||(e.key===`Escape`?(e.preventDefault(),n()):(e.key===`j`||e.key===`ArrowRight`)&&c&&a?(e.preventDefault(),a()):(e.key===`k`||e.key===`ArrowLeft`)&&l&&o?(e.preventDefault(),o()):e.key===`s`||e.key===`S`?(e.preventDefault(),r(s)):e.key===`m`||e.key===`M`?(e.preventDefault(),i(s)):e.key===`r`||e.key===`R`?(e.preventDefault(),re()):(e.key===`o`||e.key===`O`)&&A&&(e.preventDefault(),window.open(A,`_blank`,`noopener,noreferrer`)))}return window.addEventListener(`keydown`,u),()=>window.removeEventListener(`keydown`,u)},[t,e,A,c,l,a,o,n,r,i,re]);let ie=(0,_.useMemo)(()=>e?.published_at?new Date(e.published_at):null,[e?.published_at]),ae=(0,_.useMemo)(()=>ie?new Intl.DateTimeFormat(d.resolvedLanguage,{dateStyle:`medium`}).format(ie):``,[ie,d.resolvedLanguage]),oe=(0,_.useMemo)(()=>ie?new Intl.DateTimeFormat(d.resolvedLanguage,{timeStyle:`short`}).format(ie):``,[ie,d.resolvedLanguage]),se=x?e?.full_content_html:e?.content_html,ce=(0,_.useMemo)(()=>e?.image_url??du(se??``,e?.link),[e?.image_url,se,e?.link]);(0,_.useEffect)(()=>{if(ne(null),!t||!ce)return;let e=!1,n=new Image;return n.onload=()=>{!e&&n.naturalWidth>0&&n.naturalHeight>0&&ne({src:ce,width:n.naturalWidth,height:n.naturalHeight})},n.src=ce,()=>{e=!0}},[t,ce]);let j=k?.src===ce?k:null,le=j!==null&&j.width<=320&&j.height<=240,M=(0,_.useMemo)(()=>e&&se?fu(se,{heroImageUrl:ce,baseUrl:e.link}):``,[e,se,ce]),ue=(0,_.useMemo)(()=>pu((se??e?.content_snippet??``).replace(/<[^>]+>/g,` `)),[se,e?.content_snippet]);return!t||!e?null:(0,Ac.createPortal)((0,H.jsxs)(`div`,{className:`fixed inset-0 z-50 flex justify-end`,children:[(0,H.jsx)(`div`,{className:`fixed inset-0 bg-black/60 backdrop-blur-xs transition-opacity animate-fade-in`,onClick:n,"aria-hidden":`true`}),(0,H.jsxs)(`div`,{className:`relative z-10 w-full sm:max-w-2xl md:max-w-3xl h-full h-[100dvh] bg-[var(--c-surface)] shadow-2xl flex flex-col border-0 sm:border-l border-[var(--c-border)] animate-drawer-in`,role:`dialog`,"aria-modal":`true`,"aria-label":e.title??u(`items.title`),children:[(0,H.jsxs)(`header`,{ref:h,className:`absolute inset-x-0 top-0 z-20 px-4 py-3 border-b border-[var(--c-border)] backdrop-blur-md transform-gpu flex items-center justify-between gap-3`,style:{paddingTop:`max(0.75rem, env(safe-area-inset-top, 0px))`,backgroundColor:`color-mix(in srgb, var(--c-surface) 85%, transparent)`},children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 pr-2 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:[(0,H.jsx)(Ks,{feedId:e.feed_id,iconUrl:e.feed_icon_url,siteUrl:e.feed_site_url,feedUrl:e.feed_url,articleUrl:e.link,className:`h-3.5 w-3.5 shrink-0 rounded-xs object-contain`}),(0,H.jsx)(`span`,{className:`truncate`,children:e.feed_title})]}),(0,H.jsx)(`button`,{type:`button`,onClick:n,title:u(`reader.close`),"aria-label":u(`reader.close`),className:`w-9 h-9 -mr-1 rounded-xl text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/60 active:scale-95 transition-all cursor-pointer flex items-center justify-center shrink-0`,children:(0,H.jsxs)(`svg`,{className:`w-6 h-6`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,H.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]}),(0,H.jsxs)(`main`,{className:`flex-1 overflow-y-auto overscroll-contain transform-gpu`,style:{paddingTop:f},children:[j&&!le&&(0,H.jsx)(`img`,{src:j.src,alt:``,className:`block w-full max-h-[380px] object-cover`,onError:()=>ne(null)}),(0,H.jsx)(`div`,{className:`px-5 sm:px-10 py-6 sm:py-8`,style:{paddingBottom:`max(2rem, env(safe-area-inset-bottom, 0px))`},children:(0,H.jsxs)(`article`,{className:`max-w-prose mx-auto`,children:[(0,H.jsxs)(`div`,{className:`flow-root`,children:[j&&le&&(0,H.jsx)(`div`,{className:`float-right ml-4 mb-3 sm:ml-6 rounded-xl overflow-hidden border border-[var(--c-border)] bg-[var(--c-bg)] shadow-xs`,style:{width:j.width,maxWidth:`42%`},children:(0,H.jsx)(`img`,{src:j.src,alt:``,className:`block w-full h-auto`,onError:()=>ne(null)})}),(0,H.jsx)(`h1`,{className:`text-2xl sm:text-3xl font-bold font-['Manrope'] text-[var(--c-text)] leading-snug tracking-tight mb-3`,children:e.title})]}),(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1.5 text-xs text-[var(--c-text-muted)] pb-5 border-b border-[var(--c-border)] mb-6 font-medium`,children:[T&&(0,H.jsx)(`span`,{children:T}),ae&&(0,H.jsxs)(H.Fragment,{children:[T&&(0,H.jsx)(`span`,{children:`•`}),(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,H.jsx)(`line`,{x1:`16`,y1:`2`,x2:`16`,y2:`6`}),(0,H.jsx)(`line`,{x1:`8`,y1:`2`,x2:`8`,y2:`6`}),(0,H.jsx)(`line`,{x1:`3`,y1:`10`,x2:`21`,y2:`10`})]}),(0,H.jsx)(`span`,{children:ae})]}),(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`polyline`,{points:`12 6 12 12 16 14`})]}),(0,H.jsx)(`span`,{children:oe})]})]}),(T||ae)&&(0,H.jsx)(`span`,{children:`•`}),(0,H.jsx)(`span`,{children:u(`reader.readingTime`,{count:ue})})]}),ee&&(0,H.jsxs)(`div`,{className:`mb-6 p-4 rounded-xl border border-[var(--c-border)] bg-[var(--c-bg)] text-sm text-[var(--c-text-muted)] flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,H.jsx)(`span`,{children:u(`reader.consentWall`)}),A&&(0,H.jsx)(`a`,{href:A,target:`_blank`,rel:`noreferrer noopener`,className:`btn-primary text-sm whitespace-nowrap self-start sm:self-center`,children:u(`reader.readOriginal`)})]}),E&&(0,H.jsxs)(`div`,{className:`mb-6 p-4 rounded-xl bg-red-500/10 border border-red-500/30 text-red-600 dark:text-red-400 text-xs flex items-center justify-between gap-3`,children:[(0,H.jsx)(`span`,{children:E}),A&&(0,H.jsx)(`a`,{href:A,target:`_blank`,rel:`noreferrer noopener`,className:`underline font-semibold whitespace-nowrap hover:opacity-80`,children:u(`reader.openOriginal`)})]}),M?(0,H.jsx)(`div`,{className:`reader-content`,dangerouslySetInnerHTML:{__html:M}}):e.content_snippet?(0,H.jsx)(`div`,{className:`reader-content`,children:e.content_snippet.split(`
11
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=ur(),d;if(t){let e=typeof t==`string`?Yt(t):t;Wt(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):Qt(e,{pathname:p});Gt(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Gt(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=Er(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Dn([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Dn([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?_.createElement(er.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function br(){let e=Nr(),t=Nn(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=_.createElement(_.Fragment,null,_.createElement(`p`,null,`💿 Hey developer 👋`),_.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,_.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,_.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),_.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:i},n):null,o)}var xr=_.createElement(br,null),Sr=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=sr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(tr.Provider,{value:this.props.routeContext},_.createElement(nr.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(wr,{error:e},t):t}};Sr.contextType=Jn;var Cr=new WeakMap;function wr({children:e,error:t}){let{basename:n,navigator:r}=_.useContext($n);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=or(t.digest);if(e){let i=Cr.get(t);if(i)throw i;let a=In(e.location,n),o=a.absoluteURL||a.to;if(Vn(e.location,o,Rn(r),`allow-explicit`),Gn(o))throw Error(`Invalid redirect location`);if(Fn&&!Cr.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Cr.set(t,n),n}}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Tr({routeContext:e,match:t,children:n}){let r=_.useContext(Kn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(tr.Provider,{value:e},n)}function Er(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);Wt(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Pn(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||xr,o&&(s<0&&c===0?(Ir(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(Tr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(Sr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Dr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Or(e){let t=_.useContext(Kn);return Wt(t,Dr(e)),t}function kr(e){let t=_.useContext(qn);return Wt(t,Dr(e)),t}function Ar(e){let t=_.useContext(tr);return Wt(t,Dr(e)),t}function jr(e){let t=Ar(e),n=t.matches[t.matches.length-1];return Wt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Mr(){return jr(`useRouteId`)}function Nr(){let e=_.useContext(nr),t=kr(`useRouteError`),n=jr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Pr(){let{router:e}=Or(`useNavigate`),t=jr(`useNavigate`),n=_.useRef(!1);return fr(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{Gt(n.current,dr),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Fr={};function Ir(e,t,n){!t&&!Fr[e]&&(Fr[e]=!0,Gt(!1,n))}_.memo(Lr);function Lr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return yr(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Rr({to:e,replace:t,state:n,relative:r}){Wt(lr(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=_.useContext($n);Gt(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=_.useContext(tr),{pathname:s}=ur(),c=pr(),l=Tn(e,wn(o),s,r===`path`);Vn(typeof e==`string`?e:Jt(e),a.createHref(l),Rn(a),`reject`);let u=JSON.stringify(l);return _.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function zr(e){return gr(e.context)}function Br(e){Wt(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Vr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){Wt(!lr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Yt(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=_.useMemo(()=>{let e=yn(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Gt(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:_.createElement($n.Provider,{value:c},_.createElement(er.Provider,{children:t,value:h}))}function Hr({children:e,location:t}){return vr(Ur(e),t)}_.Component;function Ur(e,t=[]){let n=[];return _.Children.forEach(e,(e,r)=>{if(!_.isValidElement(e))return;let i=[...t,r];if(e.type===_.Fragment){n.push.apply(n,Ur(e.props.children,i));return}Wt(e.type===Br,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Wt(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Ur(e.props.children,i)),n.push(a)}),n}var Wr=`get`,Gr=`application/x-www-form-urlencoded`;function Kr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function qr(e){return Kr(e)&&e.tagName.toLowerCase()===`button`}function Jr(e){return Kr(e)&&e.tagName.toLowerCase()===`form`}function Yr(e){return Kr(e)&&e.tagName.toLowerCase()===`input`}function Xr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Zr(e,t){return e.button===0&&(!t||t===`_self`)&&!Xr(e)}function Qr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function $r(e,t){let n=Qr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var ei=null;function ti(){if(ei===null)try{new FormData(document.createElement(`form`),0),ei=!1}catch{ei=!0}return ei}var ni=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ri(e){return e!=null&&!ni.has(e)?(Gt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gr}"`),null):e}function ii(e,t){let n,r,i,a,o;if(Jr(e)){let o=e.getAttribute(`action`);r=o?yn(o,t):null,n=e.getAttribute(`method`)||Wr,i=ri(e.getAttribute(`enctype`))||Gr,a=new FormData(e)}else if(qr(e)||Yr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?yn(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Wr,i=ri(e.getAttribute(`formenctype`))||ri(o.getAttribute(`enctype`))||Gr,a=new FormData(o,e),!ti()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Kr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Wr,r=null,i=Gr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function ai(e,t){if(e===!1||e==null)throw Error(t)}function oi(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&yn(i.pathname,t)===`/`?`${On(t)}/_root.${r}`:`${On(i.pathname)}.${r}`,i}async function si(e,t){if(e.id in t)return t[e.id];try{let n=await Lt(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ci(e){return e!=null&&typeof e.page==`string`}function li(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function ui(e,t,n){return hi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await si(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(li).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function di(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function fi(e,t,{includeHydrateFallback:n}={}){return pi(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function pi(e){return[...new Set(e)]}function mi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function hi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!ci(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(mi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function gi(){let e=_.useContext(Kn);return ai(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function _i(){let e=_.useContext(qn);return ai(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var vi=_.createContext(void 0);vi.displayName=`FrameworkContext`;function yi(){let e=_.useContext(vi);return ai(e,`You must render this element inside a <HydratedRouter> element`),e}function bi(e,t){let n=_.useContext(vi),[r,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=_.useRef(null);_.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),_.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:xi(s,p),onBlur:xi(c,m),onMouseEnter:xi(l,p),onMouseLeave:xi(u,m),onTouchStart:xi(d,p)}]:[a,f,{}]:[!1,f,{}]}function xi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Si({page:e,...t}){let n=Yn(),{nonce:r}=yi(),{router:i}=gi(),a=_.useMemo(()=>Qt(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?_.createElement(wi,{page:e,matches:a,...t}):_.createElement(Ti,{page:e,matches:a,...t})):null}function Ci(e){let{manifest:t,routeModules:n}=yi(),[r,i]=_.useState([]);return _.useEffect(()=>{let r=!1;return ui(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function wi({page:e,matches:t,...n}){let r=ur(),{future:i}=yi(),{basename:a}=gi(),o=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=oi(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return _.createElement(_.Fragment,null,o.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Ti({page:e,matches:t,...n}){let r=ur(),{future:i,manifest:a,routeModules:o}=yi(),{basename:s}=gi(),{loaderData:c,matches:l}=_i(),u=_.useMemo(()=>di(e,t,l,a,r,`data`),[e,t,l,a,r]),d=_.useMemo(()=>di(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=oi(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=_.useMemo(()=>fi(d,a),[d,a]),m=Ci(d);return _.createElement(_.Fragment,null,f.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>_.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>_.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ei(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}_.Component;var Di=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Di&&(window.__reactRouterVersion=`7.18.4`)}catch{}function Oi({basename:e,children:t,useTransitions:n,window:r}){let i=_.useRef();i.current??=Ut({window:r,v5Compat:!0});let a=i.current,[o,s]=_.useState({action:a.action,location:a.location}),c=_.useCallback(e=>{n===!1?s(e):_.startTransition(()=>s(e))},[n]);return _.useLayoutEffect(()=>a.listen(c),[a,c]),_.createElement(Vr,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var ki=_.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:v}=_.useContext($n),y=typeof l==`string`&&Rt.test(l),b=In(l,h);l=b.to;let x=cr(l,{relative:r}),S=ur(),C=null;if(o){let e=Tn(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Dn([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=bi(n,p),D=Pi(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function ee(t){e&&e(t),t.defaultPrevented||D(t)}let O=!(b.isExternal||i),te=_.createElement(`a`,{...p,...E,href:(O?C:void 0)||b.absoluteURL||x,onClick:O?ee:e,ref:Ei(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?_.createElement(_.Fragment,null,te,_.createElement(Si,{page:x})):te});ki.displayName=`Link`;var Ai=_.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=_r(a,{relative:c.relative}),d=ur(),f=_.useContext(qn),{navigator:p,basename:m}=_.useContext($n),h=f!=null&&Bi(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=yn(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=v===g||!r&&v.startsWith(g)&&v.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return _.createElement(ki,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Ai.displayName=`NavLink`;var ji=_.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Wr,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=_.useContext($n),g=Ri(),v=zi(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&Rt.test(s);return _.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?_.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});ji.displayName=`Form`;function Mi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ni(e){let t=_.useContext(Kn);return Wt(t,Mi(e)),t}function Pi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=pr(),d=ur(),f=_r(e,{relative:o});return _.useCallback(p=>{if(Zr(p,t)){p.preventDefault();let t=n===void 0?Jt(d)===Jt(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?_.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Fi(e){Gt(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=_.useRef(Qr(e)),n=_.useRef(!1),r=ur(),i=_.useMemo(()=>$r(r.search,n.current?null:t.current),[r.search]),a=pr();return[i,_.useCallback((e,t)=>{let r=Qr(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Ii=0,Li=()=>`__${String(++Ii)}__`;function Ri(){let{router:e}=Ni(`useSubmit`),{basename:t}=_.useContext($n),n=Mr(),r=e.fetch,i=e.navigate;return _.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ii(e,t);if(a.navigate===!1){let e=a.fetcherKey||Li();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function zi(e,{relative:t}={}){let{basename:n}=_.useContext($n),r=_.useContext(tr);Wt(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={..._r(e||`.`,{relative:t})},o=ur();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Dn([n,a.pathname])),Jt(a)}function Bi(e,{relative:t}={}){let n=_.useContext(Xn);Wt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ni(`useViewTransitionState`),i=_r(e,{relative:t});if(!n.isTransitioning)return!1;let a=yn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=yn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return hn(i.pathname,o)!=null||hn(i.pathname,a)!=null}var Vi=`fk_offline_owner`,Hi=null;function Ui(e){Hi=e;try{e===null?localStorage.removeItem(Vi):localStorage.setItem(Vi,String(e)),localStorage.removeItem(`fk_offline_queue`),localStorage.removeItem(`fk_saved_synced_at`)}catch{}}function Wi(){try{return Hi!==null&&localStorage.getItem(Vi)===String(Hi)?Hi:null}catch{return null}}var Gi=()=>{let e=Wi();return e===null?null:`fk_offline_queue-${e}`},Ki=new Set;function qi(){let e=Gi();if(e===null)return new Map;try{return new Map(JSON.parse(localStorage.getItem(e)??`[]`))}catch{return new Map}}function Ji(e){let t=Gi();if(t!==null){try{e.size===0?localStorage.removeItem(t):localStorage.setItem(t,JSON.stringify([...e]))}catch{}Ki.forEach(e=>e())}}var Yi=(e,t)=>`${e}:${t}`;function Xi(e,t,n){let r=qi();r.set(Yi(e,t),n),Ji(r)}function Zi(e,t){let n=qi();n.delete(Yi(e,t))&&Ji(n)}function Qi(){qi().size>0&&Ji(new Map)}function $i(){return qi().size}function ea(e){return Ki.add(e),window.addEventListener(`storage`,e),()=>{Ki.delete(e),window.removeEventListener(`storage`,e)}}function ta(){return[...qi()].map(([e,t])=>{let[n,r]=e.split(`:`);return{action:n,itemId:Number(r),value:t}})}function na(e){let t=qi();return t.size===0?e:e.map(e=>{let n=t.get(Yi(`read`,e.id)),r=t.get(Yi(`bookmark`,e.id));return n===void 0&&r===void 0?e:{...e,read:n??e.read,bookmarked:r??e.bookmarked}})}async function ra(e,t){let n=0,r=Wi();for(let{action:i,itemId:a,value:o}of ta()){if(r===null||Wi()!==r)return n;try{await e(i,a,o)}catch(e){if(t(e))return n}if(Wi()!==r)return n;Zi(i,a),n++}return n}var ia=`fk-offline`,aa=`fk-api`,z=`/__offline/articles`,oa=`fk_offline_saved`,sa=`fk_saved_synced_at`,ca=()=>typeof window<`u`&&`caches`in window;function la(){try{return localStorage.getItem(oa)!==`false`}catch{return!0}}function ua(e){try{localStorage.setItem(oa,String(e))}catch{}}async function da(){let e=Wi();if(!ca()||e===null)return null;try{let t=await(await caches.open(`${ia}-${e}`)).match(z),n=t?await t.json():null;return Wi()===e&&n?.userId===e?n:null}catch{return null}}async function fa(e){let t=Wi();if(!ca()||t===null||e.userId!==t)return;let n=await caches.open(`${ia}-${t}`);Wi()===t&&await n.put(z,new Response(JSON.stringify(e),{headers:{"Content-Type":`application/json`}}))}async function pa(){if(!ca())return;let e=Wi();await caches.delete(e===null?ia:`${ia}-${e}`);try{localStorage.removeItem(e===null?sa:`${sa}-${e}`)}catch{}}function ma(e){let t=new Set;return[...e.saved,...e.recent].filter(e=>!t.has(e.id)&&t.add(e.id))}function ha(e,t,n){let r=n.search?.trim().toLowerCase(),i=e.filter(e=>n.bookmarkedOnly&&!e.bookmarked||n.unreadOnly&&!n.bookmarkedOnly&&e.read||n.feedId&&e.feed_id!==n.feedId||n.folderId&&t[e.feed_id]!==n.folderId?!1:!r||[e.title,e.content_snippet,e.full_content_html,e.content_html].some(e=>e?.toLowerCase().includes(r))),a=n.bookmarkedOnly?i:[...i].sort((e,t)=>(t.published_at??``).localeCompare(e.published_at??``)),o=n.offset??0;return a.slice(o,n.limit?o+n.limit:void 0)}var ga=class extends Error{status;code;data;constructor(e,t,n){super(t),this.status=e,this.code=t,this.data=n}};async function B(e,t){let n=new Headers(t?.headers);n.has(`Content-Type`)||n.set(`Content-Type`,`application/json`);let r;try{r=await fetch(`/api${e}`,{credentials:`include`,...t,headers:n})}catch{throw new ga(0,`unreachable`)}if(r.status===204)return;let i=await r.json().catch(()=>({}));if(!r.ok)throw new ga(r.status,i.error??`unknown_error`,i);return i}function _a(e,t,n){return e===`read`?B(`/items/${t}/${n?`read`:`unread`}`,{method:`POST`}):B(`/items/${t}/bookmark`,{method:n?`POST`:`DELETE`})}async function va(e,t,n){try{await _a(e,t,n),Zi(e,t)}catch(r){if(!(r instanceof ga&&r.status===0))throw r;Xi(e,t,n)}}function ya(e){return e instanceof ga&&e.status===0}function ba(e){return e instanceof ga&&(e.status===0||e.status===401||e.status===408||e.status===429||e.status>=500)}function xa(e){return e.avatar_updated_at?`/api/auth/me/avatar?v=${encodeURIComponent(e.avatar_updated_at)}`:null}var V={getConfig:()=>B(`/config`),onboardingStatus:()=>B(`/onboarding/status`),onboard:e=>B(`/onboarding`,{method:`POST`,body:JSON.stringify(e)}),login:(e,t)=>B(`/auth/login`,{method:`POST`,body:JSON.stringify({email:e,password:t})}),logout:()=>B(`/auth/logout`,{method:`POST`}),changePassword:(e,t)=>B(`/auth/change-password`,{method:`POST`,body:JSON.stringify({currentPassword:e,newPassword:t})}),me:()=>B(`/auth/me`),updateProfile:e=>B(`/auth/me`,{method:`PATCH`,body:JSON.stringify({displayName:e})}),uploadAvatar:e=>B(`/auth/me/avatar`,{method:`PUT`,headers:{"Content-Type":e.type},body:e}),deleteAvatar:()=>B(`/auth/me/avatar`,{method:`DELETE`}),dismissIntro:()=>B(`/auth/me/intro`,{method:`POST`}),listUsers:()=>B(`/auth/users`),createUser:e=>B(`/auth/users`,{method:`POST`,body:JSON.stringify(e)}),listFeeds:()=>B(`/feeds`),discoverFeeds:e=>B(`/feeds/discover`,{method:`POST`,body:JSON.stringify({url:e})}),subscribeFeed:(e,t,n)=>B(`/feeds`,{method:`POST`,body:JSON.stringify({url:e,label:t,folderId:n})}),unsubscribeFeed:e=>B(`/feeds/${e}`,{method:`DELETE`}),updateFeed:(e,t)=>B(`/feeds/${e}`,{method:`PATCH`,body:JSON.stringify(t)}),pushKey:()=>B(`/push/key`),savePushDevice:e=>B(`/push/devices`,{method:`POST`,body:JSON.stringify(e)}),checkPushDevice:e=>B(`/push/devices/check`,{method:`POST`,body:JSON.stringify({endpoint:e})}),removePushDevice:e=>B(`/push/devices/remove`,{method:`POST`,body:JSON.stringify({endpoint:e})}),sendTestPush:e=>B(`/push/test`,{method:`POST`,body:JSON.stringify({language:e})}),reorderFeeds:e=>B(`/feeds/reorder`,{method:`PUT`,body:JSON.stringify({feedIds:e})}),exportOpmlUrl:()=>`/api/feeds/opml`,importOpml:e=>B(`/feeds/opml`,{method:`POST`,headers:{"Content-Type":`application/xml`},body:e}),refreshFeed:e=>B(`/feeds/${e}/refresh`,{method:`POST`}),refreshAllFeeds:()=>B(`/feeds/refresh-all`,{method:`POST`}),listFolders:()=>B(`/folders`),createFolder:e=>B(`/folders`,{method:`POST`,body:JSON.stringify({name:e})}),updateFolder:(e,t)=>B(`/folders/${e}`,{method:`PATCH`,body:JSON.stringify({name:t})}),deleteFolder:e=>B(`/folders/${e}`,{method:`DELETE`}),markFolderRead:e=>B(`/folders/${e}/read`,{method:`POST`}),listItems:async(e={})=>{let t=new URLSearchParams;e.feedId&&t.set(`feedId`,String(e.feedId)),e.folderId&&t.set(`folderId`,String(e.folderId)),e.unreadOnly&&t.set(`unreadOnly`,`true`),e.bookmarkedOnly&&t.set(`bookmarkedOnly`,`true`),e.includeMuted&&t.set(`includeMuted`,`true`),e.offline&&t.set(`offline`,`true`),e.search&&t.set(`search`,e.search),e.limit&&t.set(`limit`,String(e.limit)),e.offset&&t.set(`offset`,String(e.offset));let n=t.toString(),r=async()=>{let t=await da();return t?ha(na(ma(t)),t.feedFolders,e):null};if(!navigator.onLine&&!e.offline){let e=await r();if(e)return e}try{return na(await B(`/items${n?`?${n}`:``}`))}catch(e){if(ya(e)){let e=await r();if(e)return e}throw e}},markRead:e=>va(`read`,e,!0),markUnread:e=>va(`read`,e,!1),bookmarkItem:e=>va(`bookmark`,e,!0),unbookmarkItem:e=>va(`bookmark`,e,!1),extractContent:e=>B(`/items/${e}/extract-content`,{method:`POST`}),markAllRead:e=>{let t=typeof e==`number`?e:e?.feedId,n=typeof e==`object`?e?.folderId:void 0;return B(`/items/mark-all-read`,{method:`POST`,body:JSON.stringify({feedId:t,folderId:n})})},listMutedKeywords:()=>B(`/filters/muted`),addMutedKeyword:e=>B(`/filters/muted`,{method:`POST`,body:JSON.stringify({keyword:e})}),deleteMutedKeyword:e=>B(`/filters/muted/${e}`,{method:`DELETE`}),listDevices:()=>B(`/v1/devices`),createPairingCode:()=>B(`/v1/pairing-codes`,{method:`POST`}),revokeDevice:e=>B(`/v1/devices/${e}`,{method:`DELETE`}),listTokens:()=>B(`/tokens`),createToken:(e,t)=>B(`/tokens`,{method:`POST`,body:JSON.stringify({name:e,scope:t})}),deleteToken:e=>B(`/tokens/${e}`,{method:`DELETE`}),listOAuthGrants:()=>B(`/oauth-grants`),deleteOAuthGrant:e=>B(`/oauth-grants/${e}`,{method:`DELETE`}),getRetention:()=>B(`/system/retention`),updateRetention:e=>B(`/system/retention`,{method:`PATCH`,body:JSON.stringify(e)}),runCleanup:()=>B(`/system/cleanup`,{method:`POST`})},Sa=100,Ca=300,wa=1500,Ta=100,Ea=3e5,Da=/https?:\/\/[^"'\s<>)]+(\/api\/(?:archive\/images\/\d+|items\/\d+\/image\?src=[^"'\s<>)]+))/g,Oa=null,ka=0;function Aa(){ka++}function ja(){try{return Number(localStorage.getItem(`fk_saved_synced_at-${Wi()}`))||0}catch{return 0}}function Ma(e,t){return e?.replace(Da,(e,n)=>{let r=`${window.location.origin}${n}`;return t.add(r),r})}function Na(e,t){return{...e,image_url:Ma(e.image_url,t),content_html:Ma(e.content_html,t),full_content_html:Ma(e.full_content_html,t)}}async function Pa(e,t,n){let r=t.slice(0,wa),i=async()=>{for(let t=r.shift();t&&!n();t=r.shift()){let r=await e.match(t,{ignoreVary:!0}),i=/\/api\/archive\/images\/\d+/.test(new URL(t).pathname),a=Number(r?.headers.get(`cache-control`)?.match(/max-age=(\d+)/)?.[1]??0),o=r&&Date.now()-Date.parse(r.headers.get(`date`)??``)<Math.min(a,21600)*1e3;if(!(r&&(i||o)))try{let r=await fetch(t,{credentials:`include`});r.ok&&!n()&&await e.put(t,r)}catch{}}};await Promise.all([i(),i(),i(),i()])}async function Fa(e,t){for(let n of await e.keys())/\/api\/(archive\/images\/|items\/\d+\/image)/.test(n.url)&&!t.has(n.url)&&await e.delete(n)}async function Ia(){return navigator.onLine?ra(_a,ba):0}async function La(){await Ra({force:await Ia()>0})}function Ra(e={}){let t=Wi();if(t===null||!(`caches`in window)||!la()||!navigator.onLine)return Promise.resolve(null);if(Oa)return e.force?Oa.then(()=>Ra(e)):Oa;if(!e.force&&Date.now()-ja()<Ea)return Promise.resolve(null);let n=ka,r=()=>n!==ka||Wi()!==t;return Oa=(async()=>{try{let e=new Set,n=[];for(let e=0;n.length<Ca;e+=Sa){let t=await V.listItems({bookmarkedOnly:!0,limit:Sa,offset:e,offline:!0});if(n.push(...t),t.length<Sa)break}let i=await V.listItems({unreadOnly:!0,limit:Ta,offline:!0}),a=await V.listFeeds().catch(()=>[]),o=n.slice(0,Ca).map(t=>Na(t,e)),s=i.map(t=>Na(t,e));if(r())return null;let c=await caches.open(aa);return r()||(await Pa(c,[...e],r),r())||(await Fa(c,e),r())||(await fa({userId:t,savedAt:new Date().toISOString(),saved:o,recent:s,feedFolders:Object.fromEntries(a.map(e=>[e.id,e.folder_id]))}),r())?null:(localStorage.setItem(`${sa}-${t}`,String(Date.now())),new Set([...o,...s].map(e=>e.id)).size)}catch{return null}finally{Oa=null}})(),Oa}async function za(){await pa(),`caches`in window&&await Fa(await caches.open(aa),new Set)}var Ba=`feedkeeper_items_scroll_y`,Va=(()=>{try{return Number(sessionStorage.getItem(Ba)||`0`)}catch{return 0}})();function Ha(){return Va}function Ua(e){Va=Math.max(0,e);try{sessionStorage.setItem(Ba,String(Math.round(Va)))}catch{}}function Wa(){Ua(0)}function Ga(){return`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window}async function Ka(){return await navigator.serviceWorker.getRegistration()??null}async function qa(){if(!Ga())return`unsupported`;if(Notification.permission===`denied`)return`blocked`;let e=await(await Ka())?.pushManager.getSubscription();if(!e)return`off`;let{registered:t}=await V.checkPushDevice(e.endpoint).catch(()=>({registered:!0}));return t?`on`:`off`}function Ja(e){let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),n=atob(t),r=new Uint8Array(new ArrayBuffer(n.length));for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}async function Ya(){if(!Ga())return`unsupported`;let e=await Ka();if(!e)return`unsupported`;if(await Notification.requestPermission()!==`granted`)return`blocked`;let{publicKey:t}=await V.pushKey(),n=(await e.pushManager.getSubscription()??await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Ja(t)})).toJSON();return!n.endpoint||!n.keys?.p256dh||!n.keys.auth?`off`:(await V.savePushDevice({endpoint:n.endpoint,keys:{p256dh:n.keys.p256dh,auth:n.keys.auth}}),`on`)}async function Xa(){let e=await(await Ka())?.pushManager.getSubscription();e&&(await V.removePushDevice(e.endpoint).catch(()=>void 0),await e.unsubscribe().catch(()=>void 0))}function Za(e){let t=navigator;t.setAppBadge&&t.clearAppBadge&&(e>0?t.setAppBadge(e):t.clearAppBadge()).catch(()=>void 0)}async function Qa(){if(navigator.onLine)try{Za((await V.listFeeds()).filter(e=>e.badge!==0).reduce((e,t)=>e+t.unread_count,0))}catch{}}var $a=`fk:items-changed`;function eo(){window.dispatchEvent(new Event($a))}function to(e){return window.addEventListener($a,e),()=>window.removeEventListener($a,e)}function no(){`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{navigator.serviceWorker.register(`/sw.js`).then(()=>navigator.serviceWorker.ready).then(e=>{let t=performance.getEntriesByType(`resource`).map(e=>new URL(e.name)).filter(e=>e.origin===window.location.origin&&e.pathname.startsWith(`/assets/`)).map(e=>e.pathname);e.active?.postMessage({type:`cache-urls`,urls:t})}).catch(()=>void 0)})}async function ro(){if(Aa(),Qi(),Za(0),Ui(null),!(`caches`in window))return;let e=await caches.keys();await Promise.all(e.filter(e=>e===`fk-api`||e===`fk-offline`||e.startsWith(`fk-offline-`)).map(e=>caches.delete(e)))}var io=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),H=o(((e,t)=>{t.exports=io()}))(),ao=(0,_.createContext)(null);function oo({children:e}){let t=(0,_.useRef)(0),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(!0),[c,l]=(0,_.useState)(!1);async function u(){let e=++t.current;Aa(),s(!0),l(!1);try{let n=await V.onboardingStatus();if(e!==t.current)return;if(n.needsOnboarding){a(!0),r(null);return}a(!1);try{let n=await V.me();if(e!==t.current)return;Ui(n.id),r(n)}catch(n){if(e!==t.current)return;n instanceof ga&&n.status===401?(r(null),await ro()):n instanceof ga&&n.status===0?l(!0):(console.error(`Auth check failed:`,n),r(null))}}catch(n){if(e!==t.current)return;n instanceof ga&&n.status===0?l(!0):console.error(`Failed to check onboarding/auth status:`,n),r(null)}finally{e===t.current&&s(!1)}}async function d(){await Xa().catch(()=>void 0),await V.logout(),await ro(),Wa(),r(null)}return(0,_.useEffect)(()=>{u();let e=e=>{e.key===`fk_offline_owner`&&u()};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),(0,H.jsx)(ao.Provider,{value:{user:n,loading:o,needsOnboarding:i,unreachable:c,refresh:u,logout:d,setCurrentUser:r},children:e})}function so(){let e=(0,_.useContext)(ao);if(!e)throw Error(`useAuth must be used within AuthProvider`);return e}var co=`M435.6,124.8l0,-73.2l-435.6,0l-0,816l92.4,-0l0,-381.6l325.2,0l-0,-74.4l-325.2,0l0,-286.8l343.2,0zM1065.6,576l0,-31.2c0,-198,-98.4,-306,-259.2,-306c-165.6,0,-264,105.6,-264,306c0,228,63.6,337.2,268.8,337.2c108,-0,200.4,-30,226.8,-46.8l0,-73.2c-16.8,16.8,-115.2,55.2,-205.2,55.2c-144,0,-199.2,-82.8,-201.6,-241.2l434.4,0zm-87.6,-60l-346.8,0c2.4,-136.8,62.4,-213.6,174,-213.6c112.8,0,170.4,91.2,172.8,213.6zM1722,576l0,-31.2c0,-198,-98.4,-306,-259.2,-306c-165.6,0,-264,105.6,-264,306c0,228,63.6,337.2,268.8,337.2c108,-0,200.4,-30,226.8,-46.8l0,-73.2c-16.8,16.8,-115.2,55.2,-205.2,55.2c-144,0,-199.2,-82.8,-201.6,-241.2l434.4,0zm-87.6,-60l-346.8,0c2.4,-136.8,62.4,-213.6,174,-213.6c112.8,0,170.4,91.2,172.8,213.6zM2396.4,830.4l0,-830.4l-90,0l0,278.4c-18,-8.4,-97.2,-39.6,-188.4,-39.6c-164.4,0,-262.8,106.8,-262.8,306c0,242.4,86.4,337.2,279.6,337.2c121.2,-0,216,-32.4,261.6,-51.6zm-90,-48c-21.6,12,-84,33.6,-171.6,33.6c-129.6,0,-188.4,-78,-188.4,-271.2c0,-159.6,63.6,-238.8,189.6,-238.8c72,0,146.4,28.8,170.4,38.4l0,438zM3187.2,867.6l-386.4,-427.2l355.2,-388.8l-120,0l-340.8,388.8l367.2,427.2l124.8,-0zm-494.4,-0l-0,-816l-92.4,0l0,816l92.4,-0zM3776.4,576l0,-31.2c0,-198,-98.4,-306,-259.2,-306c-165.6,0,-264,105.6,-264,306c0,228,63.6,337.2,268.8,337.2c108,-0,200.4,-30,226.8,-46.8l0,-73.2c-16.8,16.8,-115.2,55.2,-205.2,55.2c-144,0,-199.2,-82.8,-201.6,-241.2l434.4,0zm-87.6,-60l-346.8,0c2.4,-136.8,62.4,-213.6,174,-213.6c112.8,0,170.4,91.2,172.8,213.6zM4432.8,576l0,-31.2c0,-198,-98.4,-306,-259.2,-306c-165.6,0,-264,105.6,-264,306c0,228,63.6,337.2,268.8,337.2c108,-0,200.4,-30,226.8,-46.8l0,-73.2c-16.8,16.8,-115.2,55.2,-205.2,55.2c-144,0,-199.2,-82.8,-201.6,-241.2l434.4,0zm-87.6,-60l-346.8,0c2.4,-136.8,62.4,-213.6,174,-213.6c112.8,0,170.4,91.2,172.8,213.6zM5133.6,544.8c0,-210,-92.4,-306,-282,-306c-118.8,0,-231.6,36,-260.4,50.4l-0,832.8l90,0l0,-280.8c16.8,13.2,99.6,40.8,187.2,40.8c165.6,0,265.2,-92.4,265.2,-337.2zm-93.6,0c0,194.4,-57.6,271.2,-188.4,271.2c-69.6,0,-141.6,-25.2,-170.4,-37.2l0,-439.2c18,-8.4,81.6,-33.6,171.6,-33.6c120,0,187.2,68.4,187.2,238.8zM5792.4,576l0,-31.2c0,-198,-98.4,-306,-259.2,-306c-165.6,0,-264,105.6,-264,306c0,228,63.6,337.2,268.8,337.2c108,-0,200.4,-30,226.8,-46.8l0,-73.2c-16.8,16.8,-115.2,55.2,-205.2,55.2c-144,0,-199.2,-82.8,-201.6,-241.2l434.4,0zm-87.6,-60l-346.8,0c2.4,-136.8,62.4,-213.6,174,-213.6c112.8,0,170.4,91.2,172.8,213.6zM6256.8,313.2l0,-68.4c-9.6,-1.2,-50.4,-6,-66,-6c-106.8,0,-223.2,39.6,-240,48l-0,580.8l90,-0l0,-531.6c16.8,-6,90,-28.8,158.4,-28.8c14.4,0,45.6,3.6,57.6,6z`;function lo(){return(0,H.jsx)(`svg`,{className:`wordmark`,viewBox:`0 0 6257 1122`,role:`img`,"aria-label":`FeedKeeper`,children:(0,H.jsx)(`path`,{d:co})})}function uo({size:e=28}){return(0,H.jsxs)(`span`,{className:`brand-lockup`,style:{"--m":`${e}px`},children:[(0,H.jsx)(`img`,{src:`/logo.svg`,alt:``}),(0,H.jsx)(lo,{})]})}var fo=({isActive:e})=>`relative z-10 flex h-full items-center gap-2 rounded-lg px-3 text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] ${e?`text-[var(--c-text)]`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)]`}`;function po({onItemsClick:e}){let{t,i18n:n}=L(),r=ur(),i=(0,_.useRef)(null),[a,o]=(0,_.useState)(null);return(0,_.useLayoutEffect)(()=>{let e=i.current;if(!e)return;let t=()=>{let t=e.querySelector(`a[aria-current="page"]`);o(t?{left:t.offsetLeft,width:t.offsetWidth}:null)};t();let n=new ResizeObserver(t);return e.querySelectorAll(`a`).forEach(e=>n.observe(e)),()=>n.disconnect()},[r.pathname,n.resolvedLanguage]),(0,H.jsxs)(`nav`,{ref:i,className:`relative hidden h-9 items-center rounded-xl border border-[var(--c-border)] bg-[var(--c-surface)] p-0.5 md:flex`,children:[a&&(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-y-0.5 left-0 rounded-lg border border-[var(--c-mobile-nav-active-border)] bg-[var(--c-mobile-nav-active)] shadow-sm transition-[transform,width] duration-300 ease-[cubic-bezier(0.25,1,0.5,1)] motion-reduce:transition-none`,style:{width:a.width,transform:`translateX(${a.left}px)`}}),(0,H.jsxs)(Ai,{to:`/items`,onClick:e,className:fo,children:[(0,H.jsx)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h12`})}),t(`nav.items`)]}),(0,H.jsxs)(Ai,{to:`/feeds`,className:fo,children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M4 11a9 9 0 0 1 9 9`}),(0,H.jsx)(`path`,{d:`M4 4a16 16 0 0 1 16 16`}),(0,H.jsx)(`circle`,{cx:`5`,cy:`19`,r:`1`})]}),t(`nav.feeds`)]})]})}var mo=`fk_theme`,ho=new Set,go=(()=>{try{let e=localStorage.getItem(mo);return e===`light`||e===`dark`?e:`system`}catch{return`system`}})();function _o(e){return ho.add(e),()=>ho.delete(e)}function vo(){return go}function yo(e){go=e,e===`system`?document.documentElement.removeAttribute(`data-theme`):document.documentElement.setAttribute(`data-theme`,e);try{e===`system`?localStorage.removeItem(mo):localStorage.setItem(mo,e)}catch{}ho.forEach(e=>e())}function bo({standalone:e,hasPrompt:t,userAgent:n,maxTouchPoints:r}){if(e)return`installed`;if(t)return`prompt`;if(/iPhone|iPad|iPod/.test(n)||/Macintosh/.test(n)&&r>1)return`ios`;let i=/Safari\//.test(n)&&!/Chrome|Chromium|CriOS|FxiOS|Edg|OPR|Firefox/.test(n);return/Macintosh/.test(n)&&i?`mac-safari`:`unsupported`}var xo=null,So=!1,Co=new Set,wo=()=>Co.forEach(e=>e());function To(){window.addEventListener(`beforeinstallprompt`,e=>{e.preventDefault(),xo=e,wo()}),window.addEventListener(`appinstalled`,()=>{xo=null,So=!0,wo()})}function Eo(e){Co.add(e);let t=window.matchMedia(`(display-mode: standalone)`);return t.addEventListener(`change`,e),()=>{Co.delete(e),t.removeEventListener(`change`,e)}}function Do(){return bo({standalone:So||window.matchMedia(`(display-mode: standalone)`).matches||navigator.standalone===!0,hasPrompt:xo!==null,userAgent:navigator.userAgent,maxTouchPoints:navigator.maxTouchPoints??0})}async function Oo(){let e=xo;if(!e)return;xo=null,await e.prompt();let{outcome:t}=await e.userChoice;t===`accepted`&&(So=!0),wo()}function ko(e,t){let n=e.trim().split(/\s+/).filter(Boolean);return n.length===0?t.charAt(0).toUpperCase()||`?`:(n[0].charAt(0)+(n.length>1?n[n.length-1].charAt(0):``)).toUpperCase()}function Ao({user:e,className:t=``}){let n=xa(e),[r,i]=(0,_.useState)(null);return(0,H.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-[var(--c-border)] bg-[var(--c-mobile-nav-active)] font-semibold tracking-wide text-[var(--c-text)] ${t}`,children:n&&r!==n?(0,H.jsx)(`img`,{src:n,alt:``,className:`h-full w-full object-cover`,onError:()=>i(n)}):(0,H.jsx)(`span`,{"aria-hidden":`true`,children:ko(e.display_name,e.email)})})}var jo=`feedkeeper:extensions-changed`,Mo=[`login`,`menu`,`page`],No=/^[a-z0-9][a-z0-9-]{0,63}$/,Po=(e,t)=>typeof e==`string`&&e.trim().length>0&&e.length<=t,U=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function Fo(e){return U(e)?typeof e.id==`string`&&No.test(e.id)&&Po(e.label,80)&&Po(e.description,300)&&Po(e.group,60)&&(e.shortLabel===void 0||Po(e.shortLabel,40))&&(e.icon===void 0||Array.isArray(e.icon)&&e.icon.length<=8&&e.icon.every(e=>typeof e==`string`&&e.length<=400))&&(e.admin===void 0||typeof e.admin==`boolean`)&&typeof e.mount==`function`:!1}function Io(e,t,n){let r=U(e)&&U(e.settings)?e.settings:{},i=new Set(Array.isArray(r.hidden)?r.hidden.filter(e=>typeof e==`string`&&t.includes(e)):[]),a=new Set(t),o=[];for(let e of Array.isArray(r.sections)?r.sections:[])Fo(e)&&!a.has(e.id)&&(a.add(e.id),(!e.admin||n)&&o.push(e));return{hidden:i,sections:o}}function Lo(e){let t=[];for(let n of e){let e=n.group??``,r=t.find(t=>t.group===e);r?r.sections.push(n):t.push({group:e,sections:[n]})}return t}function Ro(e,t){if(typeof e==`string`)return e;if(!U(e))return null;let n=t.toLowerCase();for(let t of[n,n.split(`-`)[0],`en`]){let n=Object.entries(e).find(([e])=>e.toLowerCase()===t)?.[1];if(typeof n==`string`)return n}return Object.values(e).find(e=>typeof e==`string`)??null}function zo(e){return/[\u0000-\u001f\\]/.test(e)||e.length>500?!1:/^\/(?![/\\])/.test(e)||/^https?:\/\/[^\s/]+/i.test(e)}function W(e,t,n){let r=U(e)&&Array.isArray(e.footerLinks)?e.footerLinks:[],i=[];for(let e of r.slice(0,8)){if(!U(e))continue;let r=Ro(e.label,t),a=Ro(e.href,t);if(!r||!Po(r,60)||!a||!zo(a)||n&&Array.isArray(e.placements)&&!e.placements.some(e=>e===n&&Mo.includes(e)))continue;let o=typeof e.icon==`string`&&zo(e.icon)?e.icon:null;i.push({label:r,href:a,newTab:e.newTab===!0||/^https?:/i.test(a),icon:o})}return i}function Bo(e){let t=U(e)?e.loginForm:void 0;return U(t)&&typeof t.mount==`function`?t:null}function Vo(e){let t=U(e)?e.passwordCard:void 0;return!U(t)||typeof t.mount!=`function`?null:{mount:t.mount,...typeof t.applies==`function`?{applies:t.applies}:{}}}function Ho(e){let t=U(e)?e.onboarding:void 0;return U(t)&&typeof t.mount==`function`?t:null}function Uo(e){if(typeof e!=`string`||e.length>500)return null;try{let t=new URL(e);return(t.protocol===`https:`||t.protocol===`http:`)&&!t.username&&!t.password?t.toString():null}catch{return null}}function Wo(e,t,n){let r=U(e)&&U(e.starterPacks)?e.starterPacks:{},i=Array.isArray(r.packs)?r.packs:[],a=new Map;if(r.replace!==!0)for(let e of t)a.set(e.id,e);for(let e of i.slice(0,12))U(e)&&typeof e.id==`string`&&No.test(e.id)&&Array.isArray(e.feeds)&&a.set(e.id,e);let o=[];for(let e of a.values()){let t=Ro(e.title,n);if(!t||!Po(t,60))continue;let r=[];for(let t of e.feeds.slice(0,20)){if(!U(t)||!Po(t.title,80))continue;let e=Uo(t.url);e&&r.push({title:t.title,url:e,lang:typeof t.lang==`string`?t.lang.toLowerCase().split(`-`)[0]:``})}r.length>0&&o.push({id:e.id,title:t,description:Ro(e.description,n)??``,feeds:r})}return o}function Go(e){let t=U(e)?e.articlesNotice:void 0;return!U(t)||typeof t.mount!=`function`?null:{mount:t.mount,...typeof t.applies==`function`?{applies:t.applies}:{}}}function Ko(e,t){let n=U(e)&&U(e.meta)?e.meta:{},r=Ro(n.title,t)?.trim()??null,i=Ro(n.description,t)?.trim()??null;return{title:r&&Po(r,80)?r:null,description:i&&Po(i,300)?i:null}}var qo=0;function Jo(e){let t=()=>{qo++,e()};return window.addEventListener(jo,t),()=>window.removeEventListener(jo,t)}function Yo(){return(0,_.useSyncExternalStore)(Jo,()=>qo),window.feedkeeperExtensions}var Xo={login:`mt-4 justify-center text-xs`,menu:`border-t border-[var(--c-border)] px-3 py-2.5 text-xs`,page:`mt-10 border-t border-[var(--c-border)] pt-4 text-xs`};function Zo({placement:e}){let{t,i18n:n}=L(),r=W(Yo(),n.resolvedLanguage||`en`,e);return r.length===0?null:(0,H.jsx)(`nav`,{"aria-label":t(`nav.footerLinks`),className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-[var(--c-text-muted)] ${Xo[e]}`,children:r.map((e,t)=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-3`,children:[t>0&&(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`opacity-50`,children:`•`}),(0,H.jsxs)(`a`,{href:e.href,...e.newTab?{target:`_blank`,rel:`noopener noreferrer`}:{},className:`transition-colors hover:text-[var(--c-text)] hover:underline`,children:[e.icon&&(0,H.jsx)(`img`,{src:e.icon,alt:``,width:14,height:14,className:`mr-1.5 inline-block align-[-2px]`}),e.label]})]},`${e.href}-${t}`))})}var Qo={light:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,H.jsx)(`path`,{d:`M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41`})]}),dark:(0,H.jsx)(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`}),system:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,H.jsx)(`path`,{d:`M12 3a9 9 0 0 1 0 18Z`,fill:`currentColor`,stroke:`none`})]})},$o=`flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm font-medium text-[var(--c-text)] transition-colors hover:bg-[var(--c-surface-hover)] focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] cursor-pointer`;function es(){let{t:e}=L(),{user:t,logout:n}=so(),r=ur(),i=(0,_.useSyncExternalStore)(_o,vo),a=(0,_.useSyncExternalStore)(Eo,Do),[o,s]=(0,_.useState)(!1),c=(0,_.useRef)(null),l=(0,_.useRef)(null),u=(0,_.useId)();if((0,_.useEffect)(()=>s(!1),[r.pathname]),(0,_.useEffect)(()=>{if(!o)return;let e=e=>{c.current?.contains(e.target)||s(!1)},t=e=>{e.key===`Escape`&&(s(!1),l.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[o]),!t)return null;let d={light:e(`settings.themeLight`),dark:e(`settings.themeDark`),system:e(`settings.themeSystem`)};return(0,H.jsxs)(`div`,{ref:c,className:`relative`,children:[(0,H.jsx)(`button`,{ref:l,type:`button`,onClick:()=>s(e=>!e),"aria-expanded":o,"aria-controls":u,"aria-label":e(`nav.account`),title:t.display_name||t.email,className:`flex rounded-full transition-shadow cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--c-blue3)] ${o||r.pathname.startsWith(`/settings`)?`ring-2 ring-[var(--c-blue3)] ring-offset-2 ring-offset-[var(--c-surface)]`:`hover:ring-2 hover:ring-[var(--c-border)] hover:ring-offset-2 hover:ring-offset-[var(--c-surface)]`}`,children:(0,H.jsx)(Ao,{user:t,className:`h-9 w-9 text-xs`})}),o&&(0,H.jsxs)(`div`,{id:u,className:`card animate-fade-in absolute right-0 top-full z-50 mt-2 w-72 max-w-[calc(100vw-2rem)] p-1.5 shadow-xl`,style:{boxShadow:`0 16px 40px -12px rgba(0, 0, 0, 0.35)`},children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-3 pt-2 pb-3`,children:[(0,H.jsx)(Ao,{user:t,className:`h-10 w-10 text-sm`}),(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`p`,{className:`truncate text-sm font-semibold text-[var(--c-text)]`,children:t.display_name||t.email}),t.display_name&&(0,H.jsx)(`p`,{className:`truncate text-xs text-[var(--c-text-muted)]`,children:t.email})]})]}),(0,H.jsxs)(`div`,{className:`border-t border-[var(--c-border)] px-3 py-3`,children:[(0,H.jsx)(`p`,{className:`mb-2 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:e(`settings.theme`)}),(0,H.jsx)(`div`,{className:`grid grid-cols-3 gap-1 rounded-xl border border-[var(--c-border)] p-0.5`,role:`group`,"aria-label":e(`settings.theme`),children:Object.keys(Qo).map(e=>(0,H.jsxs)(`button`,{type:`button`,onClick:()=>yo(e),"aria-pressed":i===e,className:`flex h-8 items-center justify-center gap-1.5 rounded-lg text-xs font-medium transition-colors cursor-pointer focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] ${i===e?`border border-[var(--c-mobile-nav-active-border)] bg-[var(--c-mobile-nav-active)] text-[var(--c-text)] shadow-sm`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)]`}`,children:[(0,H.jsx)(`svg`,{className:`h-3.5 w-3.5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:Qo[e]}),d[e]]},e))})]}),(0,H.jsxs)(`div`,{className:`flex flex-col border-t border-[var(--c-border)] pt-1.5`,children:[(0,H.jsxs)(Ai,{to:`/settings`,className:`${$o} max-md:hidden`,children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4 text-[var(--c-text-muted)]`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,H.jsx)(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z`})]}),e(`nav.settings`)]}),a===`prompt`&&(0,H.jsxs)(`button`,{type:`button`,className:$o,onClick:()=>{s(!1),Oo()},children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4 text-[var(--c-text-muted)]`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M12 3v12M7 10l5 5 5-5`}),(0,H.jsx)(`path`,{d:`M5 21h14`})]}),e(`settings.installApp`)]}),(0,H.jsxs)(`button`,{type:`button`,className:`${$o} text-[var(--c-danger)]! hover:bg-[var(--c-danger-bg)]!`,onClick:()=>{s(!1),n()},children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}),(0,H.jsx)(`polyline`,{points:`16 17 21 12 16 7`}),(0,H.jsx)(`line`,{x1:`21`,y1:`12`,x2:`9`,y2:`12`})]}),e(`nav.logout`)]})]}),(0,H.jsx)(Zo,{placement:`menu`})]})]})}function ts(e){return window.addEventListener(`online`,e),window.addEventListener(`offline`,e),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,e)}}function ns(){return(0,_.useSyncExternalStore)(ts,()=>navigator.onLine,()=>!0)}function rs(){let{t:e}=L(),t=(0,_.useSyncExternalStore)(ea,$i,()=>0);return ns()?null:(0,H.jsxs)(`div`,{role:`status`,className:`border-b px-4 py-2 text-center text-sm text-[var(--c-text-muted)]`,style:{borderColor:`var(--c-border)`,backgroundColor:`var(--c-surface)`},children:[e(`common.offlineBanner`),t>0&&` ${e(`common.offlinePending`,{count:t})}`]})}function is(){let{t:e}=L(),{refresh:t}=so();return(0,H.jsxs)(`div`,{className:`fixed inset-0 z-50 flex flex-col items-center justify-center gap-4 bg-[var(--c-bg)] px-6 text-center`,children:[(0,H.jsx)(`img`,{src:`/logo.svg`,alt:``,className:`h-12 w-12`}),(0,H.jsx)(`h1`,{className:`text-xl font-semibold`,style:{fontFamily:`Manrope, sans-serif`},children:e(`common.offlineTitle`)}),(0,H.jsx)(`p`,{className:`max-w-sm text-sm text-[var(--c-text-muted)]`,children:e(`common.offlineText`)}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>void t(),className:`btn-primary`,children:e(`common.retry`)})]})}var as=[],os=1,ss=new Set,cs=()=>ss.forEach(e=>e());function ls(e){return ss.add(e),()=>ss.delete(e)}function us(){return as}function ds(e){as=as.filter(t=>t.id!==e),cs()}function fs(e,t){let n=os++;as=[...as.slice(-2),{id:n,type:e,message:t}],cs(),window.setTimeout(()=>ds(n),e===`error`?7e3:4e3)}var G={success:e=>fs(`success`,e),error:e=>fs(`error`,e),info:e=>fs(`info`,e)};function ps(){let{t:e}=L(),t=(0,_.useSyncExternalStore)(ls,us);return(0,H.jsx)(`div`,{"aria-live":`polite`,className:`pointer-events-none fixed inset-x-0 bottom-[calc(6.5rem+env(safe-area-inset-bottom,0px))] z-[60] flex flex-col items-center gap-2 px-4 md:bottom-6`,children:t.map(t=>(0,H.jsxs)(`div`,{role:t.type===`error`?`alert`:`status`,className:`card animate-fade-in pointer-events-auto flex w-full max-w-md items-start gap-3 px-4 py-3 text-sm`,style:{boxShadow:`0 16px 40px -12px rgba(0, 0, 0, 0.35)`},children:[(0,H.jsx)(`span`,{className:`mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-white ${t.type===`error`?`bg-[var(--c-danger)]`:t.type===`info`?`bg-[var(--c-text-muted)]`:`bg-[var(--c-green3)]`}`,"aria-hidden":`true`,children:(0,H.jsx)(`svg`,{className:`h-3 w-3`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,children:t.type===`error`?(0,H.jsx)(`path`,{d:`M12 7v6M12 17h.01`}):t.type===`info`?(0,H.jsx)(`path`,{d:`M12 7h.01M12 11v6`}):(0,H.jsx)(`path`,{d:`m5 12 5 5 9-10`})})}),(0,H.jsx)(`p`,{className:`min-w-0 flex-1 text-[var(--c-text)]`,children:t.message}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>ds(t.id),"aria-label":e(`common.close`),className:`-mr-1 shrink-0 rounded p-0.5 text-[var(--c-text-muted)] hover:text-[var(--c-text)] cursor-pointer`,children:(0,H.jsx)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]},t.id))})}function ms(){let{t:e}=L(),t=ur();(0,_.useEffect)(()=>{let e=()=>void La(),t=()=>document.visibilityState===`visible`&&e();return e(),window.addEventListener(`online`,e),document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(`online`,e),document.removeEventListener(`visibilitychange`,t)}},[]),(0,_.useEffect)(()=>{let e,t=()=>{window.clearTimeout(e),e=window.setTimeout(()=>void Qa(),800)},n=()=>document.visibilityState===`visible`&&t();t();let r=window.setInterval(t,12e4);window.addEventListener(`online`,t),document.addEventListener(`visibilitychange`,n);let i=to(t);return()=>{window.clearTimeout(e),window.clearInterval(r),window.removeEventListener(`online`,t),document.removeEventListener(`visibilitychange`,n),i()}},[]),(0,_.useEffect)(()=>{t.pathname!==`/items`&&(window.scrollTo({top:0,left:0,behavior:`instant`}),requestAnimationFrame(()=>{window.scrollTo({top:0,left:0,behavior:`instant`})}))},[t.pathname]);let n=()=>{t.pathname===`/items`&&(Wa(),window.scrollTo({top:0,left:0,behavior:`smooth`}))},r=t.pathname.startsWith(`/feeds`)?1:t.pathname.startsWith(`/settings`)?2:0;return(0,H.jsxs)(`div`,{className:`min-h-screen flex flex-col`,children:[(0,H.jsx)(`header`,{"data-app-header":!0,className:`sticky top-0 z-30 backdrop-blur-md border-b`,style:{borderColor:`var(--c-border)`,backgroundColor:`color-mix(in srgb, var(--c-surface) 85%, transparent)`,paddingTop:`env(safe-area-inset-top, 0px)`},children:(0,H.jsxs)(`div`,{className:`max-w-5xl mx-auto px-4 py-3 flex items-center justify-between gap-4`,children:[(0,H.jsx)(Ai,{to:`/items`,onClick:n,className:`flex items-center gap-2.5 shrink-0 hover:opacity-85 transition-opacity`,children:(0,H.jsx)(uo,{size:28})}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(po,{onItemsClick:n}),(0,H.jsx)(es,{})]})]})}),(0,H.jsx)(rs,{}),(0,H.jsx)(`main`,{className:`flex-1 max-w-5xl w-full mx-auto px-4 pt-4 pb-24 md:py-6`,children:(0,H.jsx)(`div`,{className:`animate-page-fade`,children:(0,H.jsx)(zr,{})},t.pathname)}),(0,H.jsx)(ps,{}),(0,H.jsx)(`nav`,{className:`mobile-bottom-nav md:hidden fixed left-3 right-3 max-w-sm mx-auto z-40 pointer-events-auto no-drag select-none`,"aria-label":e(`nav.menu`),children:(0,H.jsxs)(`div`,{className:`relative flex items-center justify-between p-1.5 rounded-full border backdrop-blur-2xl backdrop-saturate-180 transition-all duration-300 no-drag select-none`,style:{backgroundColor:`color-mix(in srgb, var(--c-surface) 80%, transparent)`,borderColor:`var(--c-border)`,borderWidth:`1px`,boxShadow:`0 2px 12px -4px rgba(0, 0, 0, 0.3)`},onContextMenu:e=>e.preventDefault(),children:[(0,H.jsx)(`div`,{"aria-hidden":`true`,className:`absolute top-1.5 bottom-1.5 left-1.5 rounded-full bg-[var(--c-mobile-nav-active)] border border-[var(--c-mobile-nav-active-border)] shadow-sm transition-transform duration-300 ease-[cubic-bezier(0.25,1,0.5,1)] pointer-events-none no-drag`,style:{width:`calc((100% - 0.75rem) / 3)`,transform:`translateX(calc(${r} * 100%))`}}),(0,H.jsx)(Ai,{to:`/items`,onClick:n,draggable:!1,onDragStart:e=>e.preventDefault(),onContextMenu:e=>e.preventDefault(),className:`relative z-10 flex-1 min-w-0 no-drag select-none`,children:({isActive:t})=>(0,H.jsxs)(`div`,{className:`h-[54px] w-full rounded-full flex flex-col items-center justify-center gap-0.5 transition-colors duration-200 cursor-pointer no-drag select-none ${t?`text-[var(--c-text)] font-semibold`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)] font-medium`}`,children:[(0,H.jsx)(`svg`,{className:`w-5 h-5 transition-transform duration-200 pointer-events-none ${t?`scale-105`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h12`})}),(0,H.jsx)(`span`,{className:`text-[11px] leading-tight tracking-tight pointer-events-none select-none`,children:e(`nav.items`)})]})}),(0,H.jsx)(Ai,{to:`/feeds`,draggable:!1,onDragStart:e=>e.preventDefault(),onContextMenu:e=>e.preventDefault(),className:`relative z-10 flex-1 min-w-0 no-drag select-none`,children:({isActive:t})=>(0,H.jsxs)(`div`,{className:`h-[54px] w-full rounded-full flex flex-col items-center justify-center gap-0.5 transition-colors duration-200 cursor-pointer no-drag select-none ${t?`text-[var(--c-text)] font-semibold`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)] font-medium`}`,children:[(0,H.jsxs)(`svg`,{className:`w-5 h-5 transition-transform duration-200 pointer-events-none ${t?`scale-105`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M4 11a9 9 0 0 1 9 9`}),(0,H.jsx)(`path`,{d:`M4 4a16 16 0 0 1 16 16`}),(0,H.jsx)(`circle`,{cx:`5`,cy:`19`,r:`1`})]}),(0,H.jsx)(`span`,{className:`text-[11px] leading-tight tracking-tight pointer-events-none select-none`,children:e(`nav.feeds`)})]})}),(0,H.jsx)(Ai,{to:`/settings`,draggable:!1,onDragStart:e=>e.preventDefault(),onContextMenu:e=>e.preventDefault(),className:`relative z-10 flex-1 min-w-0 no-drag select-none`,children:({isActive:t})=>(0,H.jsxs)(`div`,{className:`h-[54px] w-full rounded-full flex flex-col items-center justify-center gap-0.5 transition-colors duration-200 cursor-pointer no-drag select-none ${t?`text-[var(--c-text)] font-semibold`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)] font-medium`}`,children:[(0,H.jsxs)(`svg`,{className:`w-5 h-5 transition-transform duration-200 pointer-events-none ${t?`scale-105`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,H.jsx)(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z`})]}),(0,H.jsx)(`span`,{className:`text-[11px] leading-tight tracking-tight pointer-events-none select-none`,children:e(`nav.settings`)})]})})]})})]})}function hs(){let{t:e}=L(),{refresh:t}=so(),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(!1);async function f(r){r.preventDefault(),d(!0),l(null);try{await V.onboard({email:n,password:o,displayName:i}),await t()}catch{l(e(`common.error`))}finally{d(!1)}}return(0,H.jsx)(`div`,{className:`min-h-screen flex items-center justify-center px-4`,children:(0,H.jsxs)(`div`,{className:`card p-8 w-full max-w-md`,children:[(0,H.jsxs)(`div`,{className:`flex flex-col items-center mb-6 text-center`,children:[(0,H.jsx)(`h1`,{className:`mb-3`,children:(0,H.jsx)(uo,{size:44})}),(0,H.jsx)(`p`,{className:`text-sm mt-1`,style:{color:`var(--c-text-muted)`},children:e(`onboarding.subtitle`)})]}),(0,H.jsxs)(`form`,{onSubmit:f,className:`flex flex-col gap-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`text-sm font-medium block mb-1`,children:e(`onboarding.emailLabel`)}),(0,H.jsx)(`input`,{type:`email`,required:!0,className:`input`,value:n,onChange:e=>r(e.target.value)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`text-sm font-medium block mb-1`,children:e(`onboarding.displayNameLabel`)}),(0,H.jsx)(`input`,{type:`text`,required:!0,className:`input`,value:i,onChange:e=>a(e.target.value)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`text-sm font-medium block mb-1`,children:e(`onboarding.passwordLabel`)}),(0,H.jsx)(`input`,{type:`password`,required:!0,minLength:10,className:`input`,value:o,onChange:e=>s(e.target.value)}),(0,H.jsx)(`p`,{className:`text-xs mt-1`,style:{color:`var(--c-text-muted)`},children:e(`onboarding.passwordHint`)})]}),c&&(0,H.jsx)(`p`,{className:`text-sm text-danger`,children:c}),(0,H.jsx)(`button`,{type:`submit`,disabled:u,className:`btn-primary`,children:e(`onboarding.submit`)})]}),(0,H.jsxs)(`div`,{className:`mt-6 pt-4 border-t text-sm`,style:{borderColor:`var(--c-border)`},children:[(0,H.jsx)(`p`,{className:`font-medium`,children:e(`onboarding.orUseCli`)}),(0,H.jsx)(`p`,{style:{color:`var(--c-text-muted)`},children:e(`onboarding.cliHint`)})]})]})})}function gs(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function _s(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function vs(){return ys.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var ys={stubThis:e=>e};function bs(e){let{id:t}=e;return{...e,id:_s(t),transports:e.transports,type:e.type}}function xs(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var Ss=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function Cs({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Ss({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new Ss({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new Ss({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new Ss({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new Ss({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Ss({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new Ss({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Ss({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!xs(t))return new Ss({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Ss({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new Ss({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new Ss({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var ws=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},Ts=[`cross-platform`,`platform`];function Es(e){if(e&&!(Ts.indexOf(e)<0))return e}async function Ds(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!vs())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:_s(t.challenge),user:{...t.user,id:_s(t.user.id)},excludeCredentials:t.excludeCredentials?.map(bs)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=ws.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw Cs({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){Os(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=gs(e))}catch(e){Os(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=gs(c.getAuthenticatorData())}catch(e){Os(`getAuthenticatorData()`,e)}return{id:o,rawId:gs(s),response:{attestationObject:gs(c.attestationObject),clientDataJSON:gs(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:Es(a.authenticatorAttachment)}}function Os(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function ks(){if(!vs())return As.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?As.stubThis(new Promise(e=>e(!1))):As.stubThis(e.isConditionalMediationAvailable())}var As={stubThis:e=>e};function js({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Ss({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Ss({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!xs(t))return new Ss({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Ss({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new Ss({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function Ms(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!vs())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(bs));let a={...t,challenge:_s(t.challenge),allowCredentials:i},o={};if(n){if(!await ks())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=ws.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw js({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=gs(u.userHandle)),{id:c,rawId:gs(l),response:{authenticatorData:gs(u.authenticatorData),clientDataJSON:gs(u.clientDataJSON),signature:gs(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:Es(s.authenticatorAttachment)}}async function Ns(e,t,n=`POST`,r){let i=await fetch(`/api/auth/security${e}`,{method:n,signal:r,credentials:`same-origin`,headers:{"Content-Type":`application/json`},...t===void 0?{}:{body:JSON.stringify(t)}}),a=i.status===204?void 0:await i.json();if(!i.ok)throw new ga(i.status,a.error,a);return a}async function Ps(){let e=await Ns(`/reauth/passkey/options`,{}),t=await Ms({optionsJSON:e.publicKey});return(await Ns(`/reauth/passkey/verify`,{challengeId:e.challengeId,credential:t})).reauthToken}async function Fs(e,t){let n=await Ns(`/passkeys/register/options`,{reauthToken:e}),r=await Ds({optionsJSON:n.publicKey});await Ns(`/passkeys/register/verify`,{challengeId:n.challengeId,credential:r,name:t})}function Is(e){let t,n;function r(){t?.abort(),t=void 0,clearTimeout(n)}async function i(a=!0){if(t&&a)return;r();let o=new AbortController,{signal:s}=o;t=o;let c=!1;try{if(a){let t=await window.PublicKeyCredential?.isConditionalMediationAvailable?.().catch(()=>!1)??!1;if(s.aborted||(e.onAutofill(t),!t))return}let t=await Ns(`/passkeys/options`,{},`POST`,s);if(s.aborted)return;a&&(n=setTimeout(()=>{r(),i()},24e4));let o=await navigator.credentials.get({signal:s,...a?{mediation:`conditional`}:{},publicKey:{...t.publicKey,extensions:t.publicKey.extensions,challenge:_s(t.publicKey.challenge),allowCredentials:a?[]:t.publicKey.allowCredentials?.map(e=>({type:`public-key`,id:_s(e.id),transports:e.transports}))}});if(s.aborted||!o)return;clearTimeout(n),c=!0,e.onSelect();let l=o.response,u={id:o.id,rawId:gs(o.rawId),type:o.type,clientExtensionResults:o.getClientExtensionResults(),response:{clientDataJSON:gs(l.clientDataJSON),authenticatorData:gs(l.authenticatorData),signature:gs(l.signature),userHandle:l.userHandle?gs(l.userHandle):null}};await Ns(`/passkeys/verify`,{challengeId:t.challengeId,credential:u},`POST`,s),s.aborted||await e.onSuccess()}catch(t){s.aborted||(c||!a?e.onError(t):(!(t instanceof Error)||t.name!==`NotAllowedError`)&&e.onAutofill(!1))}finally{t===o&&(clearTimeout(n),t=void 0)}}return{start:i,stop:r}}function Ls({name:e,mount:t}){let n=(0,_.useRef)(null),r=L().i18n.resolvedLanguage;return(0,_.useEffect)(()=>{let r=n.current;if(!r)return;let i;try{i=t(r)}catch(t){console.error(`[extensions] "${e}" failed to open`,t)}return()=>{try{typeof i==`function`&&i()}catch(t){console.error(`[extensions] "${e}" failed to close`,t)}r.replaceChildren()}},[e,r]),(0,H.jsx)(`div`,{ref:n,className:`min-w-0`})}function Rs(){let{t:e}=L(),{refresh:t}=so(),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(),f=(0,_.useRef)(void 0),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(null),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(!0),[S,C]=(0,_.useState)(`https://github.com/visualfusion/feedkeeper`),[w,T]=(0,_.useState)(null),E=Bo(Yo()),D=E?.mount,ee=(0,_.useEffectEvent)(async()=>{await k(),y(!1)}),O=(0,_.useEffectEvent)(()=>{g(e(`login.error`)),y(!1)});(0,_.useEffect)(()=>{if(!c||i||D)return;let e=Is({onAutofill:d,onSelect:()=>{y(!0),g(null)},onSuccess:ee,onError:O});f.current=e,e.start();let t=()=>{e.start()},n=()=>{e.stop(),y(!1)};return window.addEventListener(`pagehide`,n),window.addEventListener(`pageshow`,t),()=>{e.stop(),f.current=void 0,window.removeEventListener(`pagehide`,n),window.removeEventListener(`pageshow`,t)}},[c,i,D]),(0,_.useEffect)(()=>{Ns(`/config`,void 0,`GET`).then(e=>l(e.passkeys)).catch(()=>{}),V.getConfig().then(e=>{e&&(x(e.showGithubLink),e.githubUrl&&C(e.githubUrl),e.loginSubtitle&&T(e.loginSubtitle))}).catch(()=>{})},[]);async function te(t){if(t.preventDefault(),!v){f.current?.stop(),y(!0),g(null);try{i?await Ns(`/mfa`,{challengeId:i,code:o}):await V.login(n,p),await k()}catch(t){t instanceof ga&&t.code===`mfa_required`?(a(t.data.challengeId),m(``)):(g(e(`login.error`)),f.current?.start())}finally{y(!1)}}}async function k(){let e=new URLSearchParams(window.location.search).get(`next`);e?.startsWith(`/oauth/authorize?`)?window.location.assign(e):await t()}return(0,H.jsxs)(`div`,{className:`min-h-screen flex flex-col items-center justify-center px-4`,children:[(0,H.jsxs)(`div`,{className:`card p-8 w-full max-w-sm`,children:[(0,H.jsxs)(`div`,{className:`flex flex-col items-center mb-6 text-center`,children:[(0,H.jsx)(`h1`,{className:`mb-3`,children:(0,H.jsx)(uo,{size:44})}),(0,H.jsx)(`p`,{className:`text-xs mt-1`,style:{color:`var(--c-text-muted)`},children:w??e(`login.subtitle`)})]}),E?(0,H.jsx)(Ls,{name:`login-form`,mount:E.mount}):(0,H.jsxs)(`form`,{onSubmit:te,className:`flex flex-col gap-4`,children:[!i&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{htmlFor:`login-email`,className:`text-sm font-medium block mb-1`,children:e(`login.emailLabel`)}),(0,H.jsx)(`input`,{id:`login-email`,name:`username`,type:`email`,autoComplete:`username webauthn`,required:!0,autoFocus:!0,className:`input`,value:n,onChange:e=>r(e.target.value),onFocus:()=>{v||f.current?.start()}})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{htmlFor:`login-password`,className:`text-sm font-medium block mb-1`,children:e(`login.passwordLabel`)}),(0,H.jsx)(`input`,{type:`password`,id:`login-password`,name:`password`,autoComplete:`current-password`,required:!0,className:`input`,value:p,onChange:e=>m(e.target.value)})]})]}),i&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`label`,{htmlFor:`mfa-code`,children:e(`security.code`)}),(0,H.jsx)(`input`,{id:`mfa-code`,className:`input`,autoFocus:!0,autoComplete:`one-time-code`,value:o,onChange:e=>s(e.target.value),required:!0}),(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary`,onClick:()=>{a(void 0),s(``)},children:e(`security.cancel`)})]}),c&&!i&&u===!1&&(0,H.jsx)(`button`,{type:`button`,className:`text-sm underline`,disabled:v,onClick:()=>void f.current?.start(!1),children:e(`security.signInPasskey`)}),h&&(0,H.jsx)(`p`,{className:`text-sm text-danger`,children:h}),(0,H.jsx)(`button`,{type:`submit`,disabled:v,className:`btn-primary`,children:e(`login.submit`)})]})]}),(0,H.jsx)(Zo,{placement:`login`}),b&&(0,H.jsx)(`div`,{className:`mt-4 text-center`,children:(0,H.jsxs)(`a`,{href:S,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 text-xs text-[var(--c-text-muted)] hover:text-[var(--c-text)] transition-colors opacity-80 hover:opacity-100`,children:[(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,H.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.53 1.032 1.53 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z`})}),(0,H.jsx)(`span`,{children:e(`login.viewOnGithub`)})]})})]})}function zs({className:e=``,size:t=`md`,center:n=!0}){let{t:r}=L(),i=(0,H.jsx)(`div`,{className:`rounded-full animate-spin border-[var(--c-border)] border-t-[var(--c-blue1)] dark:border-t-white/80 ${{sm:`w-5 h-5 border-2`,md:`w-8 h-8 border-[2.5px]`,lg:`w-10 h-10 border-3`}[t]} ${e}`,role:`status`,"aria-label":r(`common.loading`)});return n?(0,H.jsx)(`div`,{className:`flex-1 flex flex-col items-center justify-center min-h-[45vh] w-full py-12 animate-fade-in`,children:i}):i}function Bs({label:e,items:t,className:n=``}){let[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(!1),s=(0,_.useRef)(null),c=(0,_.useRef)(null),l=(0,_.useId)();return(0,_.useLayoutEffect)(()=>{if(!r||!c.current)return;let e=c.current.getBoundingClientRect();o(window.innerHeight-e.bottom<48*t.length+24)},[r,t.length]),(0,_.useEffect)(()=>{if(!r)return;let e=e=>{s.current?.contains(e.target)||i(!1)},t=e=>{e.key===`Escape`&&(i(!1),c.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[r]),(0,H.jsxs)(`div`,{ref:s,className:`relative ${n}`,children:[(0,H.jsx)(`button`,{ref:c,type:`button`,onClick:e=>{e.stopPropagation(),i(e=>!e)},"aria-label":e,title:e,"aria-expanded":r,"aria-controls":l,className:`flex h-9 w-9 items-center justify-center rounded-lg text-[var(--c-text-muted)] transition-colors hover:bg-[var(--c-surface-hover)] hover:text-[var(--c-text)] focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] cursor-pointer ${r?`bg-[var(--c-surface-hover)] text-[var(--c-text)]`:``}`,children:(0,H.jsxs)(`svg`,{className:`h-5 w-5`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`5`,cy:`12`,r:`1.8`}),(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.8`}),(0,H.jsx)(`circle`,{cx:`19`,cy:`12`,r:`1.8`})]})}),r&&(0,H.jsx)(`div`,{id:l,className:`card animate-fade-in absolute right-0 z-40 w-64 p-1.5 ${a?`bottom-full mb-2`:`top-full mt-2`}`,style:{boxShadow:`0 16px 40px -12px rgba(0, 0, 0, 0.35)`},children:t.map(e=>(0,H.jsxs)(`button`,{type:`button`,disabled:e.disabled,onClick:t=>{t.stopPropagation(),i(!1),e.onSelect()},className:`flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm font-medium transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-default ${e.danger?`text-[var(--c-danger)] hover:bg-[var(--c-danger-bg)]`:`text-[var(--c-text)] hover:bg-[var(--c-surface-hover)]`}`,children:[e.icon&&(0,H.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center ${e.danger?``:`text-[var(--c-text-muted)]`}`,children:e.icon}),e.label]},e.label))})]})}function Vs(){let{user:e}=so(),t=e?.capabilities;return{syncAllowed:!t||t.features.sync===!0,manageUrl:t?.manageUrl??null}}function Hs({value:e,onChange:t,options:n,placeholder:r,className:i=``,size:a=`md`,disabled:o=!1,ariaLabel:s}){let{t:c}=L(),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(-1),p=(0,_.useRef)(null),m=(0,_.useRef)(null),h=(0,_.useId)(),g=n.find(t=>t.value===e);(0,_.useEffect)(()=>{function e(e){p.current&&!p.current.contains(e.target)&&u(!1)}if(l)return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[l]),(0,_.useEffect)(()=>{if(l){let t=n.findIndex(t=>t.value===e);f(t>=0?t:0)}},[l,e,n]),(0,_.useEffect)(()=>{if(l&&d>=0&&m.current){let e=m.current.querySelector(`[data-index="${d}"]`);e&&e.scrollIntoView({block:`nearest`})}},[d,l]);function v(e){if(!o){if(!l){(e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),u(!0));return}e.key===`Escape`?(e.preventDefault(),u(!1)):e.key===`ArrowDown`?(e.preventDefault(),f(e=>e<n.length-1?e+1:0)):e.key===`ArrowUp`?(e.preventDefault(),f(e=>e>0?e-1:n.length-1)):e.key===`Home`?(e.preventDefault(),f(0)):e.key===`End`?(e.preventDefault(),f(n.length-1)):(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d>=0&&d<n.length&&(t(n[d].value),u(!1)))}}let y=[];n.forEach((e,t)=>{let n=e.group??null,r=y.find(e=>e.groupName===n);r||(r={groupName:n,items:[]},y.push(r)),r.items.push({opt:e,index:t})});let b=a===`sm`;return(0,H.jsxs)(`div`,{ref:p,className:`relative inline-block ${i}`,onKeyDown:v,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||u(!1)},children:[(0,H.jsxs)(`button`,{type:`button`,id:h,role:`combobox`,"aria-label":s,"aria-haspopup":`listbox`,"aria-expanded":l,"aria-controls":l?`${h}-listbox`:void 0,"aria-activedescendant":l&&d>=0?`${h}-option-${d}`:void 0,disabled:o,onClick:()=>!o&&u(e=>!e),className:`w-full flex items-center justify-between gap-2 text-left font-normal transition-colors cursor-pointer select-none rounded-lg border bg-[var(--c-surface)] text-[var(--c-text)] shadow-xs hover:border-[var(--c-blue3)] focus:outline-none focus:border-[var(--c-blue3)] ${l?`border-[var(--c-blue3)]`:`border-[var(--c-border)]`} ${b?`px-2.5 py-1 text-xs min-h-[30px]`:`px-3 py-1.5 text-sm min-h-[38px]`} ${o?`opacity-50 cursor-not-allowed`:``}`,children:[(0,H.jsx)(`span`,{className:`truncate flex items-center gap-1.5`,children:g?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`truncate`,children:g.label}),g.badge!==void 0&&(0,H.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.2 rounded-full font-medium shrink-0`,style:{backgroundColor:`var(--c-border)`,color:`var(--c-text-muted)`},children:g.badge})]}):(0,H.jsx)(`span`,{style:{color:`var(--c-text-muted)`},children:r??`—`})}),(0,H.jsx)(`svg`,{className:`shrink-0 transition-transform duration-200 opacity-60 ${l?`rotate-180`:``} ${b?`w-3 h-3`:`w-3.5 h-3.5`}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`polyline`,{points:`6 9 12 15 18 9`})})]}),l&&(0,H.jsx)(`div`,{className:`absolute left-0 mt-1 w-full min-w-[180px] max-w-xs sm:max-w-none rounded-lg border border-[var(--c-border)] bg-[var(--c-surface)] shadow-lg z-50 overflow-hidden`,style:{backdropFilter:`blur(8px)`},children:(0,H.jsx)(`ul`,{ref:m,id:`${h}-listbox`,role:`listbox`,"aria-labelledby":h,className:`max-h-60 overflow-y-auto py-1 text-[var(--c-text)] focus:outline-none`,children:n.length===0?(0,H.jsx)(`li`,{className:`px-3 py-2 text-xs italic`,style:{color:`var(--c-text-muted)`},children:r??c(`common.noOptions`)}):y.map((n,r)=>(0,H.jsxs)(`li`,{role:`group`,"aria-label":n.groupName??void 0,children:[n.groupName&&(0,H.jsx)(`div`,{className:`px-3 pt-2 pb-1 text-[10px] font-semibold uppercase tracking-wider select-none border-t first:border-t-0`,style:{borderColor:`var(--c-border)`,color:`var(--c-text-muted)`},children:n.groupName}),(0,H.jsx)(`ul`,{role:`presentation`,children:n.items.map(({opt:n,index:r})=>{let i=n.value===e,a=r===d;return(0,H.jsxs)(`li`,{id:`${h}-option-${r}`,"data-index":r,role:`option`,"aria-selected":i,onClick:()=>{t(n.value),u(!1)},onMouseEnter:()=>f(r),className:`flex items-center justify-between gap-2 cursor-pointer select-none transition-colors ${b?`px-2.5 py-1.5 text-xs`:`px-3 py-2 text-sm`} ${a?`bg-[var(--c-border)]/40 text-[var(--c-text)]`:`text-[var(--c-text)]`} ${i?`font-medium bg-[var(--c-blue1)]/10`:``}`,children:[(0,H.jsxs)(`span`,{className:`truncate flex items-center gap-1.5`,children:[(0,H.jsx)(`span`,{className:`truncate`,children:n.label}),n.badge!==void 0&&(0,H.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.2 rounded-full font-medium shrink-0`,style:{backgroundColor:`var(--c-border)`,color:`var(--c-text-muted)`},children:n.badge})]}),i&&(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,style:{color:`var(--c-blue3)`},viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})]},n.value)})})]},n.groupName??`ungrouped-${r}`))})})]})}var Us=new Map;function Ws(e){let t=Us.get(e);return t||(t=new Promise(t=>{let n=new Image;n.onload=()=>t(n.naturalWidth>0&&n.naturalHeight>0),n.onerror=()=>t(!1),n.src=e}),Us.set(e,t)),t}function Gs(e){let t=5381n;for(let n of e)t=BigInt.asUintN(64,t*33n+BigInt(n.codePointAt(0)??0));return`hsl(${Number(t%360n)} 33% 43.5%)`}function Ks({feedId:e,iconUrl:t,siteUrl:n,feedUrl:r,articleUrl:i,fallbackName:a,className:o}){let s=JSON.stringify([e,t,n,r,i]),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(null);return(0,_.useEffect)(()=>{let a=!1;l(null);async function o(){if(e){let t=`/api/feeds/${e}/icon`;await Ws(t)?a||l({key:s,url:t}):a||d(s);return}let o=new Set;t&&/^https?:\/\//i.test(t)&&o.add(t);for(let e of[n,r,i])if(e)try{let t=new URL(e);(t.protocol===`https:`||t.protocol===`http:`)&&o.add(`${t.origin}/favicon.ico`)}catch{}for(let e of o)if(await Ws(e)){a||l({key:s,url:e});return}a||d(s)}return o(),()=>{a=!0}},[s]),!c||c.key!==s?a&&u===s?(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`${o} inline-grid place-items-center font-semibold text-white`,style:{backgroundColor:Gs(a),fontSize:`0.58em`},children:Array.from(a.trim())[0]?.toUpperCase()??`?`}):null:(0,H.jsx)(`img`,{src:c.url,alt:``,className:o,loading:`lazy`,onError:()=>{Us.set(c.url,Promise.resolve(!1)),l(null)}})}function qs(e,t){let n=/^feed_http_(\d{3})$/.exec(t);if(n){let t=Number(n[1]);return t===404||t===410?e(`feeds.errors.notFound`,{status:t}):t===401||t===403?e(`feeds.errors.refused`,{status:t}):t===429?e(`feeds.errors.limited`):e(t>=400&&t<500&&t!==408&&t!==425?`feeds.errors.rejected`:`feeds.errors.unavailable`,{status:t})}return t===`feed_timeout`?e(`feeds.errors.timeout`):t===`feed_network_error`?e(`feeds.errors.network`):t===`feed_invalid_or_unavailable`?e(`feeds.errors.invalidFeed`):t}var Js=[[`day`,864e5],[`hour`,36e5],[`minute`,6e4]];function Ys(e,t,n=Date.now()){let r=new Intl.RelativeTimeFormat(t,{numeric:`auto`}),i=e.getTime()-n;for(let[e,t]of Js)if(Math.abs(i)>=t)return r.format(Math.round(i/t),e);return r.format(0,`minute`)}function Xs({children:e,className:t=`h-4 w-4`}){return(0,H.jsx)(`svg`,{className:t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:e})}var Zs=({className:e})=>(0,H.jsxs)(Xs,{className:e,children:[(0,H.jsx)(`path`,{d:`M21 12a9 9 0 1 1-2.64-6.36`}),(0,H.jsx)(`path`,{d:`M21 3v6h-6`})]}),Qs=()=>(0,H.jsx)(Xs,{children:(0,H.jsx)(`path`,{d:`M2 12l4 4 6-7M10 16l2 0 8-9`})}),$s=()=>(0,H.jsxs)(Xs,{children:[(0,H.jsx)(`path`,{d:`M12 20h9`}),(0,H.jsx)(`path`,{d:`M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z`})]}),ec=()=>(0,H.jsx)(Xs,{children:(0,H.jsx)(`path`,{d:`M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6`})}),tc=({className:e})=>(0,H.jsx)(Xs,{className:e,children:(0,H.jsx)(`path`,{d:`M12 5v14M5 12h14`})}),nc=()=>(0,H.jsxs)(Xs,{children:[(0,H.jsx)(`path`,{d:`M12 15V3M7 8l5-5 5 5`}),(0,H.jsx)(`path`,{d:`M5 21h14`})]}),rc=()=>(0,H.jsxs)(Xs,{children:[(0,H.jsx)(`path`,{d:`M12 3v12M7 10l5 5 5-5`}),(0,H.jsx)(`path`,{d:`M5 21h14`})]}),ic=()=>(0,H.jsx)(Xs,{children:(0,H.jsx)(`path`,{d:`M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z`})}),ac=()=>(0,H.jsxs)(Xs,{className:`h-4 w-4`,children:[(0,H.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,H.jsx)(`path`,{d:`m20 20-3.5-3.5`})]}),oc=()=>(0,H.jsx)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:[6,12,18].flatMap(e=>[9,15].map(t=>(0,H.jsx)(`circle`,{cx:t,cy:e,r:`1.5`},`${t}-${e}`)))}),sc=()=>(0,H.jsx)(Xs,{className:`h-5 w-5`,children:(0,H.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})}),cc=()=>(0,H.jsxs)(Xs,{className:`h-3.5 w-3.5 shrink-0`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,H.jsx)(`path`,{d:`M12 8v4M12 16h.01`})]}),lc=({className:e=`h-3.5 w-3.5`})=>(0,H.jsxs)(Xs,{className:e,children:[(0,H.jsx)(`path`,{d:`M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9`}),(0,H.jsx)(`path`,{d:`M13.73 21a2 2 0 0 1-3.46 0`})]});function uc(e,t){return t<60?e(`feeds.minutesShort`,{count:t}):e(`feeds.hoursShort`,{count:Math.round(t/60)})}function dc(e){try{return e?new URL(e).hostname.replace(/^www\./,``):null}catch{return null}}function fc({feed:e,folderOptions:t,intervalOptions:n,onClose:r,onSaved:i}){let{t:a}=L(),[o,s]=(0,_.useState)(e.label?.trim()||e.title?.trim()||e.url),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(e.folder_id??null),[f,p]=(0,_.useState)(e.poll_interval_minutes),[m,h]=(0,_.useState)(e.full_text_mode!==`never`),[g,v]=(0,_.useState)(e.notify!==0),[y,b]=(0,_.useState)(e.badge!==0),[x,S]=(0,_.useState)(!1);async function C(){S(!0);try{await V.updateFeed(e.id,{...c?{label:o.trim()||null}:{},folderId:u,pollIntervalMinutes:f,fullTextMode:m?`auto`:`never`,notify:g,badge:y}),eo(),G.success(a(`feeds.changesSaved`)),r(),await i()}catch{G.error(a(`common.error`))}finally{S(!1)}}return(0,H.jsxs)(`div`,{className:`flex flex-col gap-4 border-t border-[var(--c-border)] bg-[var(--c-bg)]/60 px-4 py-4 sm:px-5`,children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-3`,children:[(0,H.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-xs font-medium text-[var(--c-text-muted)]`,children:[a(`feeds.labelPlaceholder`),(0,H.jsx)(`input`,{type:`text`,className:`input text-sm`,placeholder:e.title??e.url,value:o,onChange:e=>{s(e.target.value),l(!0)}})]}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5 text-xs font-medium text-[var(--c-text-muted)]`,children:[a(`feeds.folder`),(0,H.jsx)(Hs,{value:u?String(u):``,onChange:e=>d(e?Number(e):null),options:t,className:`w-full`,placeholder:a(`feeds.noFolder`)})]}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5 text-xs font-medium text-[var(--c-text-muted)]`,children:[a(`feeds.interval`),(0,H.jsx)(Hs,{value:String(f),onChange:e=>p(Number(e)),options:n,className:`w-full`})]})]}),(0,H.jsxs)(`label`,{className:`flex cursor-pointer select-none items-start gap-2.5 text-sm`,children:[(0,H.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 rounded`,checked:m,onChange:e=>h(e.target.checked)}),(0,H.jsxs)(`span`,{children:[a(`feeds.fullText`),(0,H.jsx)(`span`,{className:`mt-0.5 block text-xs text-[var(--c-text-muted)]`,children:e.full_text_blocked_at?a(`feeds.fullTextBlocked`):a(`feeds.fullTextHint`)})]})]}),Ga()&&(0,H.jsxs)(`label`,{className:`flex cursor-pointer select-none items-start gap-2.5 text-sm`,children:[(0,H.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 rounded`,checked:g,onChange:e=>v(e.target.checked)}),(0,H.jsxs)(`span`,{children:[a(`feeds.notify`),(0,H.jsx)(`span`,{className:`mt-0.5 block text-xs text-[var(--c-text-muted)]`,children:a(`feeds.notifyHint`)})]})]}),`setAppBadge`in navigator&&(0,H.jsxs)(`label`,{className:`flex cursor-pointer select-none items-start gap-2.5 text-sm`,children:[(0,H.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 rounded`,checked:y,onChange:e=>b(e.target.checked)}),(0,H.jsxs)(`span`,{children:[a(`feeds.badge`),(0,H.jsx)(`span`,{className:`mt-0.5 block text-xs text-[var(--c-text-muted)]`,children:a(`feeds.badgeHint`)})]})]}),(0,H.jsx)(`p`,{className:`truncate font-mono text-xs text-[var(--c-text-muted)]`,title:e.url,children:e.url}),(0,H.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:r,className:`btn-secondary px-3 py-1.5 text-sm`,children:a(`common.cancel`)}),(0,H.jsx)(`button`,{type:`button`,onClick:C,disabled:x,className:`btn-primary px-4 py-1.5 text-sm`,children:a(`common.save`)})]})]})}function pc({feed:e,editing:t,refreshing:n,highlighted:r=!1,folderOptions:i,intervalOptions:a,onEdit:o,onRefresh:s,onMarkRead:c,onUnsubscribe:l,onSaved:u,drag:d}){let{t:f,i18n:p}=L(),{syncAllowed:m}=Vs(),h=e.label??e.title??e.url,g=dc(e.site_url)??dc(e.url),_=!!e.last_error,v=!e.last_polled_at,y=[{label:f(n?`feeds.refreshing`:`feeds.refreshFeed`),icon:(0,H.jsx)(Zs,{className:`h-4 w-4 ${n?`animate-spin`:``}`}),onSelect:s,disabled:n||!m},...e.unread_count>0?[{label:f(`feeds.markAllRead`),icon:(0,H.jsx)(Qs,{}),onSelect:c}]:[],{label:f(`feeds.edit`),icon:(0,H.jsx)($s,{}),onSelect:()=>o(!t)},{label:f(`feeds.unsubscribe`),icon:(0,H.jsx)(ec,{}),onSelect:l,danger:!0}];return(0,H.jsxs)(`li`,{id:`feed-${e.id}`,draggable:!!d&&!t,onDragStart:d?.onDragStart,onDragOver:d?.onDragOver,onDragEnd:d?.onDragEnd,onDrop:d?.onDrop,className:`group/feed relative scroll-mt-28 first:rounded-t-xl last:rounded-b-xl transition-[opacity,background-color] duration-700 ${r?`bg-[var(--c-mobile-nav-active)]`:``} ${d?.isDragging?`opacity-40`:``} ${d?.isDragOver?`shadow-[inset_0_2px_0_var(--c-blue3)]`:``}`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3.5 sm:px-5`,children:[d&&(0,H.jsx)(`span`,{className:`-mr-1 flex shrink-0 cursor-grab touch-none text-[var(--c-text-muted)] opacity-50 transition-opacity hover:opacity-100 group-hover/feed:opacity-80 active:cursor-grabbing`,title:f(`feeds.dragHandle`),"aria-hidden":`true`,children:(0,H.jsx)(oc,{})}),(0,H.jsx)(Ks,{feedId:e.id,iconUrl:e.icon_url,siteUrl:e.site_url,feedUrl:e.url,fallbackName:h,className:`h-5 w-5 shrink-0 rounded object-contain text-xs leading-none`}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(_||v)&&(0,H.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full ${_?`bg-[var(--c-danger)]`:`bg-[var(--c-text-muted)]`}`,title:_?f(`feeds.statusFailing`,{count:e.consecutive_errors||1}):f(`feeds.statusPending`)}),(0,H.jsx)(ki,{to:`/items?feed=${e.id}`,draggable:!1,className:`truncate font-semibold text-[var(--c-text)] hover:underline`,children:h}),e.notify!==0&&Ga()&&(0,H.jsx)(`span`,{className:`inline-flex shrink-0 items-center text-[var(--c-text-muted)]`,title:f(`feeds.notifyActive`),"aria-label":f(`feeds.notifyActive`),children:(0,H.jsx)(lc,{className:`h-3.5 w-3.5`})})]}),(0,H.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-[var(--c-text-muted)]`,children:[g,f(`feeds.everyInterval`,{interval:uc(f,e.poll_interval_minutes)}),e.last_polled_at?f(`feeds.checkedAgo`,{time:Ys(new Date(e.last_polled_at),p.resolvedLanguage)}):f(`feeds.statusPending`)].filter(Boolean).join(` · `)}),_&&(0,H.jsxs)(`p`,{className:`mt-1.5 flex items-start gap-1.5 text-xs text-[var(--c-danger)]`,title:e.last_error??void 0,children:[(0,H.jsx)(cc,{}),(0,H.jsx)(`span`,{className:`line-clamp-2`,children:qs(f,e.last_error??``)})]})]}),e.unread_count>0&&(0,H.jsx)(ki,{to:`/items?feed=${e.id}`,draggable:!1,className:`shrink-0 rounded-full bg-[var(--c-mobile-nav-active)] px-2.5 py-0.5 text-xs font-semibold tabular-nums text-[var(--c-text)] hover:bg-[var(--c-border)]`,title:f(`feeds.unread`,{count:e.unread_count}),children:e.unread_count}),(0,H.jsx)(Bs,{label:f(`feeds.moreActions`),items:y,className:`-mr-2 shrink-0`})]}),t&&(0,H.jsx)(fc,{feed:e,folderOptions:i,intervalOptions:a,onClose:()=>o(!1),onSaved:u})]})}var mc=[{id:`news`,title:{en:`News`,de:`Nachrichten`,ja:`ニュース`},description:{en:`Headlines from public broadcasters and newspapers.`,de:`Schlagzeilen von öffentlich-rechtlichen Sendern und Zeitungen.`,ja:`放送局や新聞社の主要ニュース。`},feeds:[{title:`Tagesschau`,url:`https://www.tagesschau.de/index~rss2.xml`,lang:`de`},{title:`Deutschlandfunk Nachrichten`,url:`https://www.deutschlandfunk.de/nachrichten-100.rss`,lang:`de`},{title:`ZEIT ONLINE`,url:`https://newsfeed.zeit.de/index`,lang:`de`},{title:`DER SPIEGEL`,url:`https://www.spiegel.de/schlagzeilen/index.rss`,lang:`de`},{title:`BBC News`,url:`https://feeds.bbci.co.uk/news/rss.xml`,lang:`en`},{title:`The Guardian – World`,url:`https://www.theguardian.com/world/rss`,lang:`en`},{title:`NPR News`,url:`https://feeds.npr.org/1001/rss.xml`,lang:`en`},{title:`NHK 主要ニュース`,url:`https://www.nhk.or.jp/rss/news/cat0.xml`,lang:`ja`},{title:`NHK 国際`,url:`https://www3.nhk.or.jp/rss/news/cat6.xml`,lang:`ja`},{title:`朝日新聞デジタル`,url:`https://www.asahi.com/rss/asahi/newsheadlines.rdf`,lang:`ja`}]},{id:`technology`,title:{en:`Technology`,de:`Technik`,ja:`テクノロジー`},description:{en:`News and background on software, hardware and the web.`,de:`Nachrichten und Hintergründe zu Software, Hardware und Netz.`,ja:`ソフトウェア、ハードウェア、ウェブのニュースと解説。`},feeds:[{title:`heise online`,url:`https://www.heise.de/rss/heise-atom.xml`,lang:`de`},{title:`Golem.de`,url:`https://www.golem.de/rss.php?feed=RSS2.0`,lang:`de`},{title:`netzpolitik.org`,url:`https://netzpolitik.org/feed/`,lang:`de`},{title:`Ars Technica`,url:`https://feeds.arstechnica.com/arstechnica/index`,lang:`en`},{title:`The Verge`,url:`https://www.theverge.com/rss/index.xml`,lang:`en`},{title:`Hacker News`,url:`https://hnrss.org/frontpage`,lang:`en`},{title:`ITmedia`,url:`https://rss.itmedia.co.jp/rss/2.0/itmedia_all.xml`,lang:`ja`},{title:`GIGAZINE`,url:`https://gigazine.net/news/rss_2.0/`,lang:`ja`},{title:`Publickey`,url:`https://www.publickey1.jp/atom.xml`,lang:`ja`},{title:`ギズモード・ジャパン`,url:`https://www.gizmodo.jp/index.xml`,lang:`ja`}]},{id:`apple`,title:{en:`Apple`,de:`Apple`,ja:`Apple`},description:{en:`iPhone, Mac and everything around them.`,de:`iPhone, Mac und alles drumherum.`,ja:`iPhone、Macとその周辺の話題。`},feeds:[{title:`iPhone-Ticker`,url:`https://www.iphone-ticker.de/feed/`,lang:`de`},{title:`apfelpatient`,url:`https://www.apfelpatient.de/feed`,lang:`de`},{title:`Macerkopf`,url:`https://www.macerkopf.de/feed/`,lang:`de`},{title:`ifun.de`,url:`https://www.ifun.de/feed/`,lang:`de`},{title:`MacTechNews`,url:`https://www.mactechnews.de/Rss/News.x`,lang:`de`},{title:`Daring Fireball`,url:`https://daringfireball.net/feeds/main`,lang:`en`},{title:`MacStories`,url:`https://www.macstories.net/feed/`,lang:`en`},{title:`MacRumors`,url:`https://feeds.macrumors.com/MacRumors-All`,lang:`en`},{title:`9to5Mac`,url:`https://9to5mac.com/feed/`,lang:`en`},{title:`iPhone Mania`,url:`https://iphone-mania.jp/feed/`,lang:`ja`},{title:`Apple Info. (Applech2)`,url:`https://applech2.com/feed`,lang:`ja`}]},{id:`science`,title:{en:`Science`,de:`Wissenschaft`,ja:`科学`},description:{en:`Research, space and nature.`,de:`Forschung, Weltraum und Natur.`,ja:`研究、宇宙、自然。`},feeds:[{title:`Spektrum der Wissenschaft`,url:`https://www.spektrum.de/alias/rss/spektrum-de-rss-feed/996406`,lang:`de`},{title:`scinexx`,url:`https://www.scinexx.de/feed/`,lang:`de`},{title:`Quanta Magazine`,url:`https://www.quantamagazine.org/feed/`,lang:`en`},{title:`NASA`,url:`https://www.nasa.gov/feed/`,lang:`en`},{title:`Nature`,url:`https://www.nature.com/nature.rss`,lang:`en`},{title:`ScienceDaily`,url:`https://www.sciencedaily.com/rss/all.xml`,lang:`en`},{title:`sorae 宇宙へのポータルサイト`,url:`https://sorae.info/feed`,lang:`ja`},{title:`ナゾロジー`,url:`https://nazology.kusuguru.co.jp/feed`,lang:`ja`},{title:`日経サイエンス`,url:`https://www.nikkei-science.com/?feed=rss2`,lang:`ja`}]},{id:`design`,title:{en:`Design`,de:`Design`,ja:`デザイン`},description:{en:`Web design, interfaces and creative work.`,de:`Webdesign, Oberflächen und kreative Arbeit.`,ja:`ウェブデザイン、UI、クリエイティブ。`},feeds:[{title:`Smashing Magazine`,url:`https://www.smashingmagazine.com/feed/`,lang:`en`},{title:`A List Apart`,url:`https://alistapart.com/main/feed/`,lang:`en`},{title:`UX Collective`,url:`https://uxdesign.cc/feed`,lang:`en`},{title:`Creative Bloq`,url:`https://www.creativebloq.com/feeds/all`,lang:`en`},{title:`designboom`,url:`https://www.designboom.com/feed/`,lang:`en`},{title:`コリス`,url:`https://coliss.com/feed/`,lang:`ja`},{title:`AXIS`,url:`https://www.axismag.jp/feed`,lang:`ja`},{title:`Web Creator Box`,url:`https://www.webcreatorbox.com/feed`,lang:`ja`}]}];function hc(e,t){let n=t.toLowerCase().split(`-`)[0],r=e.feeds.filter(e=>e.lang===n||e.lang===``),i=n===`en`||n===`ja`&&r.length>0?[]:e.feeds.filter(e=>e.lang===`en`);return[...r,...i]}function gc({folderOptions:e,defaultFolderId:t,initialUrl:n=``,subscribedUrls:r=[],compact:i=!1,onClose:a,onAdded:o}){let{t:s}=L(),[c,l]=(0,_.useState)(n),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(t),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)([]),y=new Set(r.map(_c));async function b(e,t){h(!0),v([]);try{let n=await V.subscribeFeed(e,t,f);l(``),d(``),await o(n)}catch(e){e instanceof ga&&e.code===`multiple_feeds_found`&&e.data&&typeof e.data==`object`&&`feeds`in e.data?v(e.data.feeds):e instanceof ga&&e.code===`already_subscribed`?G.error(s(`feeds.alreadySubscribed`)):e instanceof ga&&(e.code===`no_feeds_found`||e.code===`invalid_feed`)?G.error(s(`feeds.noFeedsFoundOnPage`)):G.error(s(`feeds.subscribeFailed`))}finally{h(!1)}}function x(e){e.preventDefault();let t=c.trim();t&&!/^https?:\/\//i.test(t)&&(t=t.startsWith(`//`)?`https:${t}`:`https://${t}`),b(t,u.trim()||null)}return(0,H.jsxs)(`section`,{className:i?`flex flex-col gap-4`:`card animate-fade-in flex flex-col gap-4 p-4 sm:p-5`,children:[!i&&(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsx)(`h2`,{className:`text-base font-semibold`,children:s(`feeds.addFeed`)}),(0,H.jsx)(`button`,{type:`button`,onClick:a,className:`rounded-lg p-1 text-[var(--c-text-muted)] hover:bg-[var(--c-surface-hover)] hover:text-[var(--c-text)] cursor-pointer`,"aria-label":s(`common.close`),children:(0,H.jsx)(sc,{})})]}),(0,H.jsxs)(`form`,{onSubmit:x,className:`flex flex-col gap-3 ${i?`sm:flex-row sm:items-start`:``}`,children:[(0,H.jsx)(`input`,{type:`text`,required:!0,autoFocus:!i,placeholder:s(`feeds.urlPlaceholder`),className:i?`input sm:flex-1`:`input`,value:c,onChange:e=>{l(e.target.value),g.length&&v([])}}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row`,children:[!i&&(0,H.jsx)(`input`,{type:`text`,placeholder:s(`feeds.labelPlaceholder`),className:`input sm:flex-1`,value:u,onChange:e=>d(e.target.value)}),!i&&(0,H.jsx)(Hs,{value:f?String(f):``,onChange:e=>p(e?Number(e):null),options:e,className:`w-full sm:w-52`,placeholder:s(`feeds.noFolder`)}),(0,H.jsx)(`button`,{type:`submit`,disabled:m,className:`btn-primary whitespace-nowrap`,children:s(m?`feeds.subscribing`:`feeds.subscribe`)})]})]}),g.length>0&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:s(`feeds.multipleFeedsFound`)}),(0,H.jsx)(`ul`,{className:`divide-y divide-[var(--c-border)] rounded-xl border border-[var(--c-border)]`,children:g.map(e=>{let t=y.has(_c(e.url));return(0,H.jsxs)(`li`,{className:`flex flex-col gap-2.5 px-3 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-3 ${t?`opacity-70`:``}`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`p`,{className:`break-words text-sm font-medium`,children:e.title??e.url}),(0,H.jsx)(`p`,{className:`truncate text-xs text-[var(--c-text-muted)]`,children:e.url})]}),(0,H.jsx)(`button`,{type:`button`,disabled:m||t,onClick:()=>b(e.url,e.title||u.trim()||null),className:`btn-primary w-full shrink-0 whitespace-nowrap px-3 py-1.5 text-xs sm:w-auto`,children:s(t?`feeds.subscribed`:`feeds.subscribe`)})]},e.url)})})]})]})}function _c(e){return e.trim().replace(/\/+$/,``).toLowerCase()}function vc(){let{t:e}=L(),{manageUrl:t}=Vs();return(0,H.jsxs)(`section`,{role:`status`,className:`card flex flex-col gap-2 p-4 sm:p-5`,"aria-labelledby":`plan-notice-title`,children:[(0,H.jsx)(`h2`,{id:`plan-notice-title`,className:`text-base font-semibold`,children:e(`plan.limitedTitle`)}),(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:e(`plan.limitedText`)}),t&&(0,H.jsx)(`a`,{href:t,className:`btn-primary self-start`,style:{textDecoration:`none`},children:e(`plan.view`)})]})}async function yc(e){try{let t=(await V.listFolders()).folders.find(t=>t.name===e);return t?t.id:(await V.createFolder(e)).id}catch{return null}}function bc({onSubscribed:e}){let{t,i18n:n}=L(),{syncAllowed:r}=Vs(),i=Yo(),a=Ho(i),o=n.resolvedLanguage||`en`,s=(0,_.useMemo)(()=>Wo(i,mc,o).map(e=>({...e,feeds:hc(e,o)})).filter(e=>e.feeds.length>0),[i,o]),[c,l]=(0,_.useState)(null),[u,d]=(0,_.useState)(new Set),[f,p]=(0,_.useState)(null),[m,h]=(0,_.useState)(!1),g=(0,_.useRef)(null),v=s.find(e=>e.id===c)??null,y=v?v.feeds.filter(e=>!u.has(e.url)):[];function b(e){d(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})}async function x(n){let r=n.feeds.filter(e=>!u.has(e.url));if(r.length===0)return;p({done:0,total:r.length});let i=await yc(n.title),a=0,o=0,s=0,c=[...r];await Promise.all(Array.from({length:Math.min(3,r.length)},async()=>{for(let e=c.shift();e;e=c.shift()){try{await V.subscribeFeed(e.url,null,i),a++}catch(e){e instanceof ga&&e.code===`already_subscribed`?a++:o++}p({done:++s,total:r.length})}})),p(null),o>0?G.error(t(`welcome.packPartial`,{added:a,failed:o})):G.success(t(`welcome.packAdded`,{count:a})),a>0&&await e()}async function S(n){let r=n.target.files?.[0];if(r){h(!0);try{let n=await V.importOpml(await r.text());n.failed>0?G.error(t(`feeds.importPartial`,{imported:n.imported,skipped:n.skipped,failed:n.failed})):G.success(t(`feeds.importSuccess`,{imported:n.imported,skipped:n.skipped})),n.imported>0&&await e()}catch{G.error(t(`feeds.importFailed`))}finally{h(!1),g.current&&(g.current.value=``)}}}async function C(n){G.success(t(`feeds.subscribedToast`,{title:n.label||n.title||n.url})),await e()}let w=f!==null||m;if(!r)return(0,H.jsx)(vc,{});function T({id:e}){switch(e){case`news`:return(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2`}),(0,H.jsx)(`path`,{d:`M18 14h-8`}),(0,H.jsx)(`path`,{d:`M15 18h-5`}),(0,H.jsx)(`path`,{d:`M10 6h8v4h-8V6Z`})]});case`technology`:return(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}),(0,H.jsx)(`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}),(0,H.jsx)(`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`})]});case`apple`:return(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M15.97 6.37c.62-.75 1.04-1.8 0.93-2.85-.9.04-1.99.6-2.63 1.35-.57.65-1.07 1.71-.93 2.73.99.08 2.02-.48 2.63-1.23Z`})});case`science`:return(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2`}),(0,H.jsx)(`path`,{d:`M8.5 2h7`}),(0,H.jsx)(`path`,{d:`M7 16h10`})]});case`design`:return(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`}),(0,H.jsx)(`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`}),(0,H.jsx)(`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}),(0,H.jsx)(`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`}),(0,H.jsx)(`path`,{d:`M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.563-2.512 5.563-5.563C22 6.5 17.5 2 12 2Z`})]});default:return null}}return(0,H.jsxs)(`section`,{className:`card flex flex-col gap-6 p-5 sm:p-7 shadow-xs`,"aria-labelledby":`welcome-title`,children:[(0,H.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h2`,{id:`welcome-title`,className:`text-xl sm:text-2xl font-bold tracking-tight text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:t(`welcome.title`)}),(0,H.jsx)(`p`,{className:`max-w-xl text-xs sm:text-sm text-[var(--c-text-muted)] mt-0.5 leading-relaxed`,children:t(`welcome.intro`)})]})}),a&&(0,H.jsx)(Ls,{name:`onboarding`,mount:a.mount}),(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-4`,children:[s.length>0&&(0,H.jsxs)(`div`,{className:`rounded-2xl border border-[var(--c-border)]/80 bg-[var(--c-surface-hover)]/25 p-4 sm:p-5 flex flex-col gap-3.5`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,H.jsx)(`div`,{className:`w-7 h-7 rounded-lg bg-[var(--c-blue1)]/10 text-[var(--c-blue1)] flex items-center justify-center shrink-0`,children:(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`polygon`,{points:`16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76`})]})}),(0,H.jsx)(`h3`,{className:`text-sm sm:text-base font-bold text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:t(`welcome.packsTitle`)})]}),(0,H.jsx)(`p`,{className:`text-xs sm:text-sm text-[var(--c-text-muted)] mt-1 ml-9.5`,children:t(`welcome.packsHint`)})]}),(0,H.jsx)(`div`,{className:`flex flex-wrap gap-2`,role:`group`,"aria-label":t(`welcome.packsTitle`),children:s.map(e=>(0,H.jsxs)(`button`,{type:`button`,"aria-pressed":c===e.id,disabled:w,onClick:()=>{l(c===e.id?null:e.id),d(new Set)},className:`inline-flex items-center gap-2 rounded-full border px-3.5 py-1.5 text-xs sm:text-sm font-semibold cursor-pointer transition-all ${c===e.id?`border-[var(--c-blue1)] bg-[var(--c-blue1)] text-white shadow-xs`:`border-[var(--c-border)] bg-[var(--c-surface)] hover:border-[var(--c-blue3)] hover:bg-[var(--c-surface-hover)] text-[var(--c-text)]`}`,children:[(0,H.jsx)(T,{id:e.id}),(0,H.jsx)(`span`,{children:e.title})]},e.id))}),v&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 pt-2 animate-fade-in border-t border-[var(--c-border)]/60`,children:[v.description&&(0,H.jsx)(`p`,{className:`text-xs sm:text-sm text-[var(--c-text-muted)]`,children:v.description}),(0,H.jsx)(`ul`,{className:`divide-y divide-[var(--c-border)] rounded-xl border border-[var(--c-border)] bg-[var(--c-surface)]`,children:v.feeds.map(e=>(0,H.jsx)(`li`,{children:(0,H.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 px-3.5 py-2.5 hover:bg-[var(--c-surface-hover)]/50 transition-colors`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:!u.has(e.url),disabled:w,onChange:()=>b(e.url),className:`rounded accent-[var(--c-blue1)]`}),(0,H.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs sm:text-sm font-medium`,children:e.title}),e.lang&&(0,H.jsx)(`span`,{className:`shrink-0 text-[0.625rem] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded bg-[var(--c-surface-hover)] text-[var(--c-text-muted)]`,children:e.lang})]})},e.url))}),(0,H.jsx)(`button`,{type:`button`,disabled:w||y.length===0,onClick:()=>void x(v),className:`btn-primary self-start text-xs sm:text-sm font-semibold px-4 py-2`,children:f?t(`welcome.subscribingProgress`,{done:f.done,total:f.total}):t(`welcome.subscribePack`,{count:y.length})})]})]}),(0,H.jsxs)(`div`,{className:`rounded-2xl border border-[var(--c-border)]/80 bg-[var(--c-surface-hover)]/25 p-4 sm:p-5 flex flex-col gap-3.5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,H.jsx)(`div`,{className:`w-7 h-7 rounded-lg bg-[var(--c-blue1)]/10 text-[var(--c-blue1)] flex items-center justify-center shrink-0`,children:(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`}),(0,H.jsx)(`path`,{d:`M2 12h20`})]})}),(0,H.jsx)(`h3`,{className:`text-sm sm:text-base font-bold text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:t(`welcome.addTitle`)})]}),(0,H.jsx)(gc,{compact:!0,folderOptions:[],defaultFolderId:null,onClose:()=>{},onAdded:C})]}),(0,H.jsxs)(`div`,{className:`rounded-2xl border border-[var(--c-border)]/80 bg-[var(--c-surface-hover)]/25 p-4 sm:p-5 flex flex-col sm:flex-row sm:items-center justify-between gap-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,H.jsx)(`div`,{className:`w-7 h-7 rounded-lg bg-[var(--c-blue1)]/10 text-[var(--c-blue1)] flex items-center justify-center shrink-0`,children:(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M21 8v13H3V8`}),(0,H.jsx)(`path`,{d:`M1 3h22v5H1z`}),(0,H.jsx)(`path`,{d:`M10 12h4`})]})}),(0,H.jsx)(`h3`,{className:`text-sm sm:text-base font-bold text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:t(`welcome.importTitle`)})]}),(0,H.jsx)(`p`,{className:`text-xs sm:text-sm text-[var(--c-text-muted)] mt-1 ml-9.5`,children:t(`welcome.importHint`)})]}),(0,H.jsxs)(`button`,{type:`button`,disabled:w,onClick:()=>g.current?.click(),className:`btn-secondary inline-flex items-center gap-2 shrink-0 text-xs sm:text-sm font-semibold px-4 py-2`,children:[(0,H.jsx)(nc,{}),t(m?`feeds.importing`:`feeds.importOpml`)]}),(0,H.jsx)(`input`,{type:`file`,ref:g,onChange:S,accept:`.opml,.xml,text/xml,application/xml`,className:`hidden`})]})]})]})}function xc({folder:e,onRenamed:t}){let{t:n}=L(),[r,i]=(0,_.useState)(e.name);async function a(){let a=r.trim();if(!a||a===e.name){i(e.name);return}try{await V.updateFolder(e.id,a),G.success(n(`feeds.folderRenamed`,{name:a})),await t()}catch{i(e.name),G.error(n(`common.error`))}}return(0,H.jsx)(`input`,{className:`input h-9 min-h-0 flex-1 border-transparent bg-transparent px-2 text-sm shadow-none hover:border-[var(--c-border)] focus:border-[var(--c-border)]`,value:r,onChange:e=>i(e.target.value),onBlur:()=>void a(),onKeyDown:t=>{t.key===`Enter`&&t.currentTarget.blur(),t.key===`Escape`&&i(e.name)}})}function Sc({folders:e,onClose:t,onChanged:n}){let{t:r}=L(),{syncAllowed:i}=Vs(),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(!1);async function l(e){if(e.preventDefault(),a.trim()){c(!0);try{await V.createFolder(a.trim()),G.success(r(`feeds.folderCreated`,{name:a.trim()})),o(``),await n()}catch{G.error(r(`common.error`))}finally{c(!1)}}}async function u(e){if(confirm(r(`feeds.deleteFolderConfirm`,{name:e.name})))try{await V.deleteFolder(e.id),G.success(r(`feeds.folderDeleted`,{name:e.name})),await n()}catch{G.error(r(`common.error`))}}return(0,H.jsxs)(`section`,{className:`card animate-fade-in flex flex-col gap-4 p-4 sm:p-5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h2`,{className:`text-base font-semibold`,children:r(`feeds.manageFolders`)}),(0,H.jsx)(`p`,{className:`mt-0.5 text-xs text-[var(--c-text-muted)]`,children:r(`feeds.renameFolderHint`)})]}),(0,H.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-lg p-1 text-[var(--c-text-muted)] hover:bg-[var(--c-surface-hover)] hover:text-[var(--c-text)] cursor-pointer`,"aria-label":r(`common.close`),children:(0,H.jsx)(sc,{})})]}),e.length>0&&(0,H.jsx)(`ul`,{className:`divide-y divide-[var(--c-border)] rounded-xl border border-[var(--c-border)]`,children:e.map(e=>(0,H.jsxs)(`li`,{className:`flex items-center gap-2 px-2 py-1.5`,children:[(0,H.jsx)(xc,{folder:e,onRenamed:n},e.name),(0,H.jsx)(`span`,{className:`shrink-0 text-xs tabular-nums text-[var(--c-text-muted)]`,children:r(`feeds.feedCount`,{count:e.feed_count??0})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>u(e),className:`rounded-lg p-2 text-[var(--c-text-muted)] hover:bg-[var(--c-danger-bg)] hover:text-[var(--c-danger)] cursor-pointer`,"aria-label":r(`common.delete`),title:r(`common.delete`),children:(0,H.jsx)(ec,{})})]},e.id))}),(0,H.jsxs)(`form`,{onSubmit:l,className:`flex gap-2`,children:[(0,H.jsx)(`input`,{type:`text`,disabled:!i,placeholder:r(`feeds.newFolderPlaceholder`),className:`input flex-1`,value:a,onChange:e=>o(e.target.value)}),(0,H.jsx)(`button`,{type:`submit`,disabled:s||!i||!a.trim(),title:i?void 0:r(`plan.unavailable`),className:`btn-primary whitespace-nowrap`,children:r(`feeds.addFolder`)})]})]})}function Cc(e,t,n){e.deferred?G.info(n(`feeds.refreshPendingToast`,{title:t})):e.error?G.error(n(`feeds.refreshFailedToast`,{title:t,error:qs(n,e.error)})):G.success(n(`feeds.refreshedToast`,{title:t,count:e.newItems}))}function wc(e,t){e.deferred?G.info(t(`feeds.refreshAllPendingToast`,{count:e.deferred,newItems:e.newItems})):e.errors||G.success(t(`feeds.refreshedAllToast`,{count:e.refreshed,newItems:e.newItems})),e.errors>0&&G.error(t(`feeds.failingCount`,{count:e.errors}))}var Tc=[5,15,30,60,180,360,720,1440],Ec=`none`;function Dc(e,t){return!t||[e.label,e.title,e.url,e.site_url].filter(Boolean).join(` `).toLowerCase().includes(t.toLowerCase())}function Oc(){let{t:e}=L(),[t,n]=(0,_.useState)([]),[r,i]=(0,_.useState)([]),[a,o]=(0,_.useState)(!0),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(new Set),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)(``),[v,y]=Fi(),[b]=(0,_.useState)(()=>[v.get(`url`),v.get(`text`),v.get(`add`)].filter(Boolean).join(` `).match(/https?:\/\/[^\s]+/i)?.[0]??``);(0,_.useEffect)(()=>{(v.has(`add`)||v.has(`url`)||v.has(`text`))&&(k&&c(`add`),y({},{replace:!0}))},[]);let[x,S]=(0,_.useState)(`all`),[C,w]=(0,_.useState)(null),[T,E]=(0,_.useState)(!1),[D,ee]=(0,_.useState)(null),O=(0,_.useRef)(null);async function te(){try{let[e,t]=await Promise.all([V.listFeeds(),V.listFolders().catch(()=>({folders:[]}))]);n(e),i(t.folders)}catch(e){console.error(`Failed to load feeds:`,e)}finally{o(!1)}}(0,_.useEffect)(()=>{te()},[]),(0,_.useEffect)(()=>{if(D===null)return;document.getElementById(`feed-${D}`)?.scrollIntoView({behavior:`smooth`,block:`center`});let e=window.setTimeout(()=>ee(null),2500);return()=>window.clearTimeout(e)},[D,t]);let{syncAllowed:k}=Vs(),ne=e=>(e.label??e.title??e.url).replace(/\s+/g,` `).trim();async function A(t){G.success(e(`feeds.subscribedToast`,{title:ne(t)})),g(``),S(`all`),await te(),ee(t.id)}let re=(0,_.useMemo)(()=>[{value:``,label:e(`feeds.noFolder`)},...r.map(e=>({value:String(e.id),label:e.name}))],[r,e]),ie=(0,_.useMemo)(()=>Tc.map(t=>({value:String(t),label:uc(e,t)})),[e]),ae=(0,_.useMemo)(()=>{let n=new Map;for(let e of t){let t=e.folder_id??null;n.set(t,[...n.get(t)??[],e])}let i=[...r].sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({key:`folder:${e.id}`,name:e.name,feeds:n.get(e.id)??[]}));return i.push({key:Ec,name:e(`feeds.uncategorized`),feeds:n.get(null)??[]}),i.filter(e=>e.feeds.length>0)},[t,r,e]),oe=(0,_.useMemo)(()=>ae.filter(e=>x===`all`||x===`failing`||e.key===x).map(e=>({...e,feeds:e.feeds.filter(e=>Dc(e,h)&&(x!==`failing`||!!e.last_error))})).filter(e=>e.feeds.length>0),[ae,x,h]),se=t.reduce((e,t)=>e+t.unread_count,0),ce=t.filter(e=>e.last_error).length,j=!h&&x!==`failing`;(0,_.useEffect)(()=>{if(!C)return;let e=e=>e.preventDefault();return window.addEventListener(`dragover`,e),window.addEventListener(`drop`,e),()=>{window.removeEventListener(`dragover`,e),window.removeEventListener(`drop`,e)}},[C!==null]);async function le(){if(!C||C.from===C.over){w(null);return}let e=ae.map(e=>{if(e.key!==C.group)return e.feeds;let t=[...e.feeds],[n]=t.splice(C.from,1);return t.splice(C.over,0,n),t}).flat();n(e),w(null);try{await V.reorderFeeds(e.map(e=>e.id))}catch(e){console.error(`Failed to save feed order:`,e),await te()}}async function M(t){f(e=>new Set(e).add(t));try{let r=await V.refreshFeed(t);r.feed?n(e=>e.map(e=>e.id===t?r.feed:e)):await te(),Cc(r,r.feed?ne(r.feed):``,e)}catch{G.error(e(`common.error`))}finally{f(e=>{let n=new Set(e);return n.delete(t),n})}}async function ue(){m(!0);try{let t=await V.refreshAllFeeds();await te(),wc(t,e)}catch{G.error(e(`common.error`))}finally{m(!1)}}async function de(t){if(confirm(e(`feeds.unsubscribeConfirm`,{title:ne(t)})))try{await V.unsubscribeFeed(t.id),G.success(e(`feeds.unsubscribedToast`,{title:ne(t)})),await te()}catch{G.error(e(`common.error`))}}async function fe(t){try{await V.markAllRead(t.id),G.success(e(`feeds.markedReadToast`,{title:ne(t)})),await te()}catch{G.error(e(`common.error`))}}function pe(){let e=document.createElement(`a`);e.href=V.exportOpmlUrl(),e.download=`feedkeeper-subscriptions.opml`,e.click()}async function me(t){let n=t.target.files?.[0];if(n){E(!0);try{let t=await V.importOpml(await n.text());t.failed>0?G.error(e(`feeds.importPartial`,{imported:t.imported,skipped:t.skipped,failed:t.failed})):G.success(e(`feeds.importSuccess`,{imported:t.imported,skipped:t.skipped})),await te()}catch{G.error(e(`feeds.importFailed`))}finally{E(!1),O.current&&(O.current.value=``)}}}let he=[{key:`all`,label:e(`feeds.filterAll`),count:t.length},...ae.map(e=>({key:e.key,label:e.name,count:e.feeds.length})),...ce>0?[{key:`failing`,label:e(`feeds.filterFailing`),count:ce,danger:!0}]:[]];return(0,H.jsxs)(`div`,{className:`flex flex-col gap-6 pb-24`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h1`,{className:`text-2xl font-semibold`,children:e(`feeds.title`)}),!a&&t.length>0&&(0,H.jsxs)(`p`,{className:`mt-1 text-sm text-[var(--c-text-muted)]`,children:[e(`feeds.feedCount`,{count:t.length}),` · `,e(`feeds.unread`,{count:se}),ce>0&&(0,H.jsxs)(H.Fragment,{children:[` · `,(0,H.jsx)(`button`,{type:`button`,onClick:()=>S(`failing`),className:`text-[var(--c-danger)] hover:underline cursor-pointer`,children:e(`feeds.failingCount`,{count:ce})})]})]})]}),(0,H.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(a||t.length>0)&&(0,H.jsxs)(`button`,{type:`button`,disabled:!k,title:k?void 0:e(`plan.unavailable`),onClick:()=>c(s===`add`?null:`add`),className:`btn-primary inline-flex items-center gap-1.5 whitespace-nowrap`,children:[(0,H.jsx)(tc,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:e(`feeds.addFeed`)}),(0,H.jsx)(`span`,{className:`sm:hidden`,children:e(`feeds.addFeedShort`)})]}),(0,H.jsx)(Bs,{label:e(`feeds.moreActions`),items:[{label:e(p?`feeds.refreshing`:`feeds.refreshAll`),icon:(0,H.jsx)(Zs,{className:`h-4 w-4 ${p?`animate-spin`:``}`}),onSelect:ue,disabled:p||!k},{label:e(`feeds.manageFolders`),icon:(0,H.jsx)(ic,{}),onSelect:()=>c(`folders`)},{label:e(T?`feeds.importing`:`feeds.importOpml`),icon:(0,H.jsx)(nc,{}),onSelect:()=>O.current?.click(),disabled:T||!k},{label:e(`feeds.exportOpml`),icon:(0,H.jsx)(rc,{}),onSelect:pe}]}),(0,H.jsx)(`input`,{type:`file`,ref:O,onChange:me,accept:`.opml,.xml,text/xml,application/xml`,className:`hidden`})]})]}),!k&&t.length>0&&(0,H.jsx)(vc,{}),s===`add`&&k&&(0,H.jsx)(gc,{folderOptions:re,defaultFolderId:x.startsWith(`folder:`)?Number(x.slice(7)):null,initialUrl:b,subscribedUrls:t.map(e=>e.url),onClose:()=>c(null),onAdded:A}),s===`folders`&&(0,H.jsx)(Sc,{folders:r,onClose:()=>c(null),onChanged:te}),a?(0,H.jsx)(zs,{size:`lg`}):t.length===0?s!==`add`&&(0,H.jsx)(bc,{onSubscribed:te}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`span`,{className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-[var(--c-text-muted)] opacity-60`,children:(0,H.jsx)(ac,{})}),(0,H.jsx)(`input`,{type:`search`,value:h,onChange:e=>g(e.target.value),placeholder:e(`feeds.searchPlaceholder`),"aria-label":e(`feeds.searchPlaceholder`),className:`input pl-9`})]}),(0,H.jsx)(`div`,{className:`-mx-4 flex gap-2 overflow-x-auto px-4 pb-1 sm:mx-0 sm:flex-wrap sm:overflow-visible sm:px-0`,role:`group`,"aria-label":e(`feeds.folder`),children:he.map(e=>{let t=x===e.key;return(0,H.jsxs)(`button`,{type:`button`,onClick:()=>S(e.key),"aria-pressed":t,className:`inline-flex shrink-0 items-center gap-1.5 rounded-full border px-3 py-1.5 text-sm font-medium transition-colors cursor-pointer ${t?`border-[var(--c-mobile-nav-active-border)] bg-[var(--c-mobile-nav-active)] text-[var(--c-text)]`:`border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)]`} ${e.danger&&!t?`text-[var(--c-danger)]`:``}`,children:[e.label,e.count!==void 0&&(0,H.jsx)(`span`,{className:`text-xs tabular-nums opacity-70`,children:e.count})]},e.key)})})]}),oe.length===0?(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:e(`feeds.noMatches`)}):(0,H.jsx)(`div`,{className:`flex flex-col gap-6 animate-page-fade`,children:oe.map(t=>{let n=t.feeds.reduce((e,t)=>e+t.unread_count,0);return(0,H.jsxs)(`section`,{children:[(0,H.jsxs)(`div`,{className:`mb-2 flex items-baseline justify-between gap-3 px-1`,children:[(0,H.jsx)(`h2`,{className:`truncate text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:t.name}),(0,H.jsxs)(`span`,{className:`shrink-0 text-xs text-[var(--c-text-muted)]`,children:[e(`feeds.feedCount`,{count:t.feeds.length}),n>0&&` · ${e(`feeds.unread`,{count:n})}`]})]}),(0,H.jsx)(`ul`,{className:`card divide-y divide-[var(--c-border)]`,children:t.feeds.map((e,n)=>(0,H.jsx)(pc,{feed:e,editing:l===e.id,refreshing:d.has(e.id),highlighted:D===e.id,folderOptions:re,intervalOptions:ie,onEdit:t=>u(t?e.id:null),onRefresh:()=>void M(e.id),onMarkRead:()=>void fe(e),onUnsubscribe:()=>void de(e),onSaved:te,drag:j&&t.feeds.length>1?{isDragging:C?.group===t.key&&C.from===n,isDragOver:C?.group===t.key&&C.over===n&&C.from!==n,onDragStart:r=>{r.dataTransfer.effectAllowed=`move`,r.dataTransfer.setData(`application/x-feedkeeper-feed`,String(e.id)),w({group:t.key,from:n,over:n})},onDragOver:e=>{C?.group===t.key&&(e.preventDefault(),C.over!==n&&w({...C,over:n}))},onDragEnd:()=>void le(),onDrop:e=>e.preventDefault()}:void 0},e.id))})]},t.key)})})]})]})}function kc(){let[e,t]=(0,_.useState)(()=>new Date);return(0,_.useEffect)(()=>{let n=new Date(e);n.setHours(24,0,1,0);let r=window.setTimeout(()=>t(new Date),n.getTime()-Date.now());return()=>window.clearTimeout(r)},[e]),e}function Ac({className:e=``}){let{i18n:t}=L(),n=kc(),r=e=>new Intl.DateTimeFormat(t.resolvedLanguage,{weekday:`long`,day:`numeric`,month:`long`,...e?{year:`numeric`}:{}}).format(n);return(0,H.jsxs)(`time`,{dateTime:n.toLocaleDateString(`sv-SE`),className:`truncate text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)] ${e}`,children:[(0,H.jsx)(`span`,{className:`sm:hidden`,children:r(!1)}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:r(!0)})]})}var jc=c(m(),1);function Mc(e,t){this.v=e,this.k=t}function Nc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Pc(e){if(Array.isArray(e))return e}function Fc(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Ic(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
12
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lc(e,t){return Pc(e)||Fc(e,t)||Rc(e,t)||Ic()}function Rc(e,t){if(e){if(typeof e==`string`)return Nc(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nc(e,t):void 0}}function zc(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Mc;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}zc.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},zc.prototype.next=function(e){return this._invoke(`next`,e)},zc.prototype.throw=function(e){return this._invoke(`throw`,e)},zc.prototype.return=function(e){return this._invoke(`return`,e)};var Bc=Object.entries,Vc=Object.setPrototypeOf,Hc=Object.isFrozen,Uc=Object.getPrototypeOf,Wc=Object.getOwnPropertyDescriptor,Gc=Object.freeze,Kc=Object.seal,qc=Object.create,Jc=typeof Reflect<`u`&&Reflect,Yc=Jc.apply,Xc=Jc.construct;Gc||=function(e){return e},Kc||=function(e){return e},Yc||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Xc||=function(e){return new e(...[...arguments].slice(1))};var Zc=K(Array.prototype.forEach);Array.prototype.indexOf;var Qc=K(Array.prototype.lastIndexOf),$c=K(Array.prototype.pop),el=K(Array.prototype.push),tl=K(Array.prototype.slice),nl=K(Array.prototype.splice),rl=Array.isArray,il=xl(Set),al=K(Set.prototype.add),ol=K(Set.prototype.has),sl=K(String.prototype.toLowerCase),cl=K(String.prototype.toString),ll=K(String.prototype.match),ul=K(String.prototype.replace),dl=K(String.prototype.indexOf),fl=K(String.prototype.trim),pl=K(Number.prototype.toString),ml=K(Boolean.prototype.toString),hl=typeof BigInt>`u`?null:K(BigInt.prototype.toString),gl=typeof Symbol>`u`?null:K(Symbol.prototype.toString),_l=K(Object.prototype.hasOwnProperty),vl=K(Object.prototype.toString),yl=K(RegExp.prototype.test),bl=xl(TypeError);function K(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return Yc(e,t,n)}}function xl(e){return function(){return Xc(e,[...arguments])}}function q(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sl;if(Vc&&Vc(e,null),!rl(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Hc(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Sl(e){for(let t=0;t<e.length;t++)_l(e,t)||(e[t]=null);return e}function J(e){let t=qc(null);for(let r of Bc(e)){var n=Lc(r,2);let i=n[0],a=n[1];_l(e,i)&&(t[i]=rl(a)?Sl(a):a&&typeof a==`object`&&a.constructor===Object?J(a):a)}return t}function Cl(e){switch(typeof e){case`string`:return e;case`number`:return pl(e);case`boolean`:return ml(e);case`bigint`:return hl?hl(e):`0`;case`symbol`:return gl?gl(e):`Symbol()`;case`undefined`:return vl(e);case`function`:case`object`:{if(e===null)return vl(e);let t=e,n=wl(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:vl(e)}return vl(e)}default:return vl(e)}}function wl(e,t){for(;e!==null;){let n=Wc(e,t);if(n){if(n.get)return K(n.get);if(typeof n.value==`function`)return K(n.value)}e=Uc(e)}function n(){return null}return n}function Tl(e,t){for(;e!==null;){let n=Wc(e,t);if(n)return n.get?K(n.get):null;e=Uc(e)}return null}function El(e){try{return yl(e,``),!0}catch{return!1}}var Dl=Gc(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ol=Gc(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),kl=Gc([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Al=Gc([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),jl=Gc(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Ml=Gc([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Nl=Gc([`#text`]),Pl=Gc(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Fl=Gc(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Il=Gc(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Ll=Gc([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Rl=Kc(/{{[\w\W]*|^[\w\W]*}}/g),zl=Kc(/<%[\w\W]*|^[\w\W]*%>/g),Bl=Kc(/\${[\w\W]*/g),Vl=Kc(/^data-[\-\w.\u00B7-\uFFFF]+$/),Hl=Kc(/^aria-[\-\w]+$/),Ul=Kc(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wl=Kc(/^(?:\w+script|data):/i),Gl=Kc(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Kl=Kc(/^html$/i),ql=Kc(/^[a-z][.\w]*(-[.\w]+)+$/i),Jl=Kc(/<[/\w!]/g),Yl=Kc(/<[/\w]/g),Xl=Kc(/<\/no(script|embed|frames)/i),Zl=Kc(/\/>/i),Ql={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},$l=Gc(q({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),eu=function(){return typeof window>`u`?null:window},Y=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},tu=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},nu=function(e,t,n,r){return _l(e,t)&&rl(e[t])?q(r.base?J(r.base):{},e[t],r.transform):n},ru=function(e,t,n){let r=_l(e,t)?e[t]:void 0;return r&&typeof r==`object`?J(r):n()};function iu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:eu(),t=e=>iu(e);if(t.version=`3.4.17`,t.removed=[],!e||!e.document||e.document.nodeType!==Ql.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=wl(d,`cloneNode`),p=wl(d,`remove`),m=wl(d,`removeAttributeNode`),h=wl(d,`nextSibling`),g=wl(d,`childNodes`),_=wl(d,`parentNode`),v=wl(d,`shadowRoot`),y=wl(d,`attributes`),b=o&&o.prototype?wl(o.prototype,`nodeType`):null,x=o&&o.prototype?wl(o.prototype,`nodeName`):null,S=o&&o.prototype?wl(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName},T=Tl(d,`namespaceURI`),E=function(e){return T?T(e):e.namespaceURI};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let D,ee=``,O,te=!1,k=0,ne=function(){if(k>0)throw bl(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},A=function(e){ne(),k++;try{return D.createHTML(e)}finally{k--}},re=function(e){ne(),k++;try{return D.createScriptURL(e)}finally{k--}},ie=function(){return te||=(O=Y(u,i),!0),O},ae=n,oe=ae.implementation,se=ae.createNodeIterator,ce=ae.createDocumentFragment,j=ae.getElementsByTagName,le=r.importNode,M=tu();t.isSupported=typeof Bc==`function`&&typeof _==`function`&&oe&&oe.createHTMLDocument!==void 0;let ue=Rl,de=zl,fe=Bl,pe=Vl,me=Hl,he=Wl,ge=Gl,_e=ql,N=Ul,P=null,ve=q({},[...Dl,...Ol,...kl,...jl,...Nl]),F=null,ye=q({},[...Pl,...Fl,...Il,...Ll]),be=Object.seal(qc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,I=null,Se=Object.seal(qc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ce=!0,we=!0,Te=!1,Ee=!0,De=!1,Oe=!0,ke=!1,Ae=!1,je=null,Me=null,Ne=!1,Pe=!1,Fe=!1,Ie=!1,Le=!0,Re=!1,ze=`user-content-`,Be=!0,Ve=!1,He=null,Ue={},We=null,Ge=q({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ke=null,qe=q({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Je=null,Ye=q({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Xe=`http://www.w3.org/1998/Math/MathML`,Ze=`http://www.w3.org/2000/svg`,Qe=`http://www.w3.org/1999/xhtml`,$e=Qe,et=!1,tt=null,nt=q({},[Xe,Ze,Qe],cl),L=Gc([`mi`,`mo`,`mn`,`ms`,`mtext`]),rt=q({},L),it=Gc([`annotation-xml`]),at=q({},it),ot=q({},[`title`,`style`,`font`,`a`,`script`]),st=null,ct=[`application/xhtml+xml`,`text/html`],lt=null,ut=null,dt=n.createElement(`form`),ft=function(e){return e instanceof RegExp||e instanceof Function},pt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ut&&ut===e)return;(!e||typeof e!=`object`)&&(e={}),e=J(e),st=ct.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,lt=st===`application/xhtml+xml`?cl:sl,P=nu(e,`ALLOWED_TAGS`,ve,{transform:lt}),F=nu(e,`ALLOWED_ATTR`,ye,{transform:lt}),tt=nu(e,`ALLOWED_NAMESPACES`,nt,{transform:cl}),Je=nu(e,`ADD_URI_SAFE_ATTR`,Ye,{transform:lt,base:Ye}),Ke=nu(e,`ADD_DATA_URI_TAGS`,qe,{transform:lt,base:qe}),We=nu(e,`FORBID_CONTENTS`,Ge,{transform:lt}),xe=nu(e,`FORBID_TAGS`,J({}),{transform:lt}),I=nu(e,`FORBID_ATTR`,J({}),{transform:lt}),Ue=_l(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?J(e.USE_PROFILES):e.USE_PROFILES:!1,Ce=e.ALLOW_ARIA_ATTR!==!1,we=e.ALLOW_DATA_ATTR!==!1,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ee=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=e.SAFE_FOR_TEMPLATES||!1,Oe=e.SAFE_FOR_XML!==!1,ke=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Ne=e.FORCE_BODY||!1,Le=e.SANITIZE_DOM!==!1,Re=e.SANITIZE_NAMED_PROPS||!1,Be=e.KEEP_CONTENT!==!1,Ve=e.IN_PLACE||!1,N=El(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ul,$e=typeof e.NAMESPACE==`string`?e.NAMESPACE:Qe,rt=ru(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>q({},L)),at=ru(e,`HTML_INTEGRATION_POINTS`,()=>q({},it));let t=ru(e,`CUSTOM_ELEMENT_HANDLING`,()=>qc(null));if(be=qc(null),_l(t,`tagNameCheck`)&&ft(t.tagNameCheck)&&(be.tagNameCheck=t.tagNameCheck),_l(t,`attributeNameCheck`)&&ft(t.attributeNameCheck)&&(be.attributeNameCheck=t.attributeNameCheck),_l(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(be.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Kc(be),De&&(we=!1),Fe&&(Pe=!0),Ue&&(P=q({},Nl),F=qc(null),Ue.html===!0&&(q(P,Dl),q(F,Pl)),Ue.svg===!0&&(q(P,Ol),q(F,Fl),q(F,Ll)),Ue.svgFilters===!0&&(q(P,kl),q(F,Fl),q(F,Ll)),Ue.mathMl===!0&&(q(P,jl),q(F,Il),q(F,Ll))),Se.tagCheck=null,Se.attributeCheck=null,_l(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Se.tagCheck=e.ADD_TAGS:rl(e.ADD_TAGS)&&(P===ve&&(P=J(P)),q(P,e.ADD_TAGS,lt))),_l(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Se.attributeCheck=e.ADD_ATTR:rl(e.ADD_ATTR)&&(F===ye&&(F=J(F)),q(F,e.ADD_ATTR,lt))),_l(e,`ADD_FORBID_CONTENTS`)&&rl(e.ADD_FORBID_CONTENTS)&&(We===Ge&&(We=J(We)),q(We,e.ADD_FORBID_CONTENTS,lt)),Be&&(P[`#text`]=!0),ke&&q(P,[`html`,`head`,`body`]),P.table&&(q(P,[`tbody`]),delete xe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw bl(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw bl(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=D;D=e.TRUSTED_TYPES_POLICY;try{ee=A(``)}catch(e){throw D=t,e}}else e.TRUSTED_TYPES_POLICY===null?(D=void 0,ee=``):(D===void 0&&(D=ie()),D&&typeof ee==`string`&&(ee=A(``)));Gc&&Gc(e),ut=e},mt=q({},[...Ol,...kl,...Al]),ht=q({},[...jl,...Ml]),gt=function(e,t,n){return t.namespaceURI===Qe?e===`svg`:t.namespaceURI===Xe?e===`svg`&&(n===`annotation-xml`||rt[n]):!!mt[e]},_t=function(e,t,n){return t.namespaceURI===Qe?e===`math`:t.namespaceURI===Ze?e===`math`&&at[n]:!!ht[e]},vt=function(e,t,n){return t.namespaceURI===Ze&&!at[n]||t.namespaceURI===Xe&&!rt[n]?!1:!ht[e]&&(ot[e]||!mt[e])},yt=function(e){let t=E(e),n=sl(w(e)),r=_(e),i,a;return r&&C(r)===Ql.element?(i={namespaceURI:E(r)},a=sl(w(r))):(i={namespaceURI:$e},a=`template`),tt[t]?t===Ze?gt(n,i,a):t===Xe?_t(n,i,a):t===Qe?vt(n,i,a):!!(st===`application/xhtml+xml`&&tt[t]):!1},bt=function(e){el(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw bl(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},xt=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},St=function(e){Et(e);let t=g(e);t&&Zc(tl(t),e=>{try{p(e)}catch{}});let n=C(e)===Ql.element?y(e):null;if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&xt(e,r,i)}},Ct=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}el(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Pe||Fe)try{bt(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},wt=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||F[lt(i)]||xt(e,r,i)}},Tt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(t(e)===!1)continue;if(n&&C(e)===Ql.element){let t=v(e);Vt(t)&&r.push(t)}let i=g(e);if(i)for(let e=i.length-1;e>=0;--e)r.push(i[e])}},Et=function(e){Tt(e,e=>{C(e)===Ql.element&&wt(e)})},Dt=function(e){let t=[];return Tt(e,e=>{t.push(e)},!0),t},Ot=function(e,t){let n=il();Zc(Dt(e),e=>{C(e)===Ql.element&&al(n,e)}),Zc(t,e=>{C(e)===Ql.element&&!ol(n,e)&&wt(e)})},kt=function(e,n){let r=!1;return Zc(t.removed,t=>{t.element&&(r||=t.element===e,Et(t.element))}),Ot(e,n),r},At=function(e,t){let n=He,r=null,i=()=>(r||(r=il(),Zc(t,e=>{al(r,e)})),r);for(let t=0;;t++){let r=Dt(e),a=[e],o=!1;if(Zc(r,e=>{C(e)===Ql.documentFragment?el(a,e):!o&&!ol(n,e)&&(o=ol(i(),e))}),!o)return;if(t>=8)throw bl(`the tree kept changing during in-place sanitization; refusing to return it`);Zc(a,(t,n)=>{jt(t,n>0,e,i())})}},jt=function(e,t,n,r){let i=It(e),a;for(;a=i.nextNode();)ol(r,a)&&!ol(He,a)&&(t&&Ut(M.uponSanitizeShadowNode,a,null),Jt(a,n),tn(a,n),Vt(a.content)&&nn(a.content))},Mt=function(e){He&&al(He,e)},Nt=function(e,t){return Oe?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Pt=function(e){Oe&&Tt(e,e=>{let t=C(e);if(t===Ql.processingInstruction||t===Ql.comment&&yl(Yl,e.data)){try{p(e)}catch{}return!1}if(t===Ql.element){let t=e,n=lt(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Nt(`for`,n)&&t.removeAttribute(`for`)}catch{}}return!0})},Ft=function(e){let t=null,r=null;if(Ne)e=`<remove></remove>`+e;else{let t=ll(e,/^[\r\n\t ]+/);r=t&&t[0]}st===`application/xhtml+xml`&&$e===Qe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=D?A(e):e;if($e===Qe)try{t=new l().parseFromString(i,st)}catch{}if(!t||!t.documentElement){t=oe.createDocument($e,`template`,null);try{t.documentElement.innerHTML=et?ee:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),$e===Qe?j.call(t,ke?`html`:`body`)[0]:ke?t.documentElement:a},It=function(e){let t=S?S(e):e.ownerDocument;return se.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Lt=function(e){return e=ul(e,ue,` `),e=ul(e,de,` `),e=ul(e,fe,` `),e},Rt=function(e){zt(e);let t=e.querySelectorAll?.call(e,`template`);t&&Zc(t,e=>{Vt(e.content)&&Rt(e.content)})},zt=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=se.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Lt(r.data),r=n.nextNode()},Bt=function(e){let t=x?x(e):null;return typeof t!=`string`||lt(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},Vt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===Ql.documentFragment}catch{return!1}},Ht=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Ut(e,n,r){e.length!==0&&Zc(e,e=>{e.call(t,n,r,ut)})}let Wt=function(e,t){return!!(Oe&&e.hasChildNodes()&&!Ht(e.firstElementChild)&&yl(Jl,e.textContent)&&yl(Jl,e.innerHTML)||Oe&&$l[t]&&C(e)===Ql.element&&E(e)===Qe&&(Ht(e.firstElementChild)||typeof e.textContent==`string`&&yl(Jl,e.textContent))||e.nodeType===Ql.processingInstruction||Oe&&e.nodeType===Ql.comment&&yl(Yl,e.data))},Gt=function(e,t){return e instanceof RegExp?yl(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},Kt=function(e,t,n){if(!xe[t]&&Zt(t)&&Gt(be.tagNameCheck,t))return!1;if(Be&&!We[t]&&!We[sl(t)]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return bt(e),!0},R=function(e,t,n,r){return e.length===0?t:t===n||t===r?J(t):t},qt=function(e,t){return e===t||_(e)!==null?!1:(Ve&&Et(e),!0)},Jt=function(e,n){if(Mt(e),Ut(M.beforeSanitizeElements,e,null),qt(e,n))return!0;if(Bt(e))return bt(e),!0;let r=lt(w(e));if(P=R(M.uponSanitizeElement,P,ve,je),Ut(M.uponSanitizeElement,e,{tagName:r,allowedTags:P}),qt(e,n))return!0;if(Wt(e,r))return bt(e),!0;if(xe[r]||!(Se.tagCheck instanceof Function&&Se.tagCheck(r))&&!P[r]){let t=Kt(e,r,n);return t===!1&&(Ut(M.afterSanitizeElements,e,null),qt(e,n))?!0:t}if(C(e)===Ql.element&&!yt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&yl(Xl,e.innerHTML))return bt(e),!0;if(De&&e.nodeType===Ql.text){let n=Lt(e.textContent);e.textContent!==n&&(el(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Ut(M.afterSanitizeElements,e,null),qt(e,n)},Yt=function(e,t,r){if(I[t]||Nt(t,e)||Le&&(t===`id`||t===`name`)&&(r in n||r in dt))return!1;let i=F[t]||Se.attributeCheck instanceof Function&&Se.attributeCheck(t,e);return we&&yl(pe,t)||Ce&&yl(me,t)?!0:i?Je[t]||yl(N,ul(r,ge,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&dl(r,`data:`)===0&&Ke[e]||Te&&!yl(he,ul(r,ge,``))?!0:!r:Zt(e)&&Gt(be.tagNameCheck,e)&&Gt(be.attributeNameCheck,t,e)||t===`is`&&be.allowCustomizedBuiltInElements&&Gt(be.tagNameCheck,r)},Xt=q({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Zt=function(e){return!Xt[sl(e)]&&yl(_e,e)},Qt=function(e,t,n,r){if(D&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return A(r);case`TrustedScriptURL`:return re(r)}return r},$t=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Bt(e)||(bt(e),!1)}catch{return Ct(t,e),!1}},en=function(e,t){return Oe&&yl(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,t)?!0:sl(e)===`attributename`&&ll(t,`href`)!==null},tn=function(e,n){if(Ut(M.beforeSanitizeAttributes,e,null),qt(e,n))return;let r=e.attributes;if(!r||Bt(e))return;F=R(M.uponSanitizeAttribute,F,ye,Me);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0},a=r.length,o=lt(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=lt(s),d=l,f=s===`value`?d:fl(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Ut(M.uponSanitizeAttribute,e,i),f=i.attrValue,Re&&(u===`id`||u===`name`)&&dl(f,ze)!==0&&(Ct(s,e,n),f=ze+f,p=!0),en(s,f)){Ct(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){Ct(s,e,n);continue}if(!Ee&&yl(Zl,f)){Ct(s,e,n);continue}if(De&&(f=Lt(f)),!Yt(o,u,f)){Ct(s,e,n);continue}f=Qt(o,u,c,f),f!==d&&$t(e,s,c,f)&&p&&$c(t.removed)}}Ut(M.afterSanitizeAttributes,e,null),qt(e,n)},nn=function(e){let t=null,n=It(e);for(Ut(M.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Ut(M.uponSanitizeShadowNode,t,null),Jt(t,e),tn(t,e),Vt(t.content)&&nn(t.content),C(t)===Ql.element){let e=v(t);Vt(e)&&(rn(e),nn(e))}De&&zt(e),Ut(M.afterSanitizeShadowDOM,e,null)},rn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){nn(e.shadow);continue}let n=e.node,r=C(n)===Ql.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&lt(e)===`template`){let e=n.content;Vt(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);Vt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(et=!e,et&&(e=`<!-->`),typeof e!=`string`&&!Ht(e)&&(e=Cl(e),typeof e!=`string`))throw bl(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ae?(P=je,F=Me):pt(n),(M.uponSanitizeElement.length>0||M.uponSanitizeAttribute.length>0)&&(P=J(P)),M.uponSanitizeAttribute.length>0&&(F=J(F)),t.removed=[];let c=Ve&&typeof e!=`string`&&Ht(e),l=[],u=He;if(c){Pt(e);let t=w(e);if(typeof t==`string`){let n=lt(t);if(!P[n]||xe[n])throw St(e),bl(`root node is forbidden and cannot be sanitized in-place`)}if(Bt(e))throw St(e),bl(`root node is clobbered and cannot be sanitized in-place`);l=Dt(e),He=il()}else if(Ht(e))i=Ft(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Ql.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),rn(i);else{if(!Pe&&!De&&!ke&&e.indexOf(`<`)===-1)return D&&Ie?A(e):e;if(i=Ft(e),!i)return Pe?null:Ie?ee:``}i&&Ne&&bt(i.firstChild);let d=c?e:i;try{c&&rn(e);let t=It(d);for(;o=t.nextNode();)Jt(o,d),tn(o,d),Vt(o.content)&&nn(o.content);c&&At(e,l)}catch(t){throw c&&(St(e),kt(e,l)),t}finally{He=u}if(c){if(kt(e,l))throw bl(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return De&&Rt(e),e}if(Pe){if(De&&Rt(i),Fe)for(s=ce.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(F.shadowroot||F.shadowrootmode)&&(s=le.call(r,s,!0)),s}let f=ke?i.outerHTML:i.innerHTML;return ke&&P[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&yl(Kl,i.ownerDocument.doctype.name)&&(f=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
13
+ `+f),De&&(f=Lt(f)),D&&Ie?A(f):f},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pt(e),Ae=!0,je=P,Me=F},t.clearConfig=function(){ut=null,Ae=!1,je=null,Me=null,D=O,ee=``},t.isValidAttribute=function(e,t,n){ut||pt({});let r=lt(e),i=lt(t);return typeof n==`string`&&(en(t,n)||!Ee&&yl(Zl,n))?!1:Yt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&_l(M,e)&&el(M[e],t)},t.removeHook=function(e,t){if(_l(M,e)){if(t!==void 0){let n=Qc(M[e],t);return n===-1?void 0:nl(M[e],n,1)[0]}return $c(M[e])}},t.removeHooks=function(e){_l(M,e)&&(M[e]=[])},t.removeAllHooks=function(){M=tu()},t}var au=iu();function ou(e,t){try{let n=new URL(e,t||void 0);return n.protocol===`http:`||n.protocol===`https:`?n.toString():null}catch{return null}}function su(e){if(!e)return``;try{return new URL(e).pathname.split(`/`).filter(Boolean).at(-1)?.toLowerCase()?.replace(/[-_]\d{2,4}x\d{2,4}(?=\.\w+$)/,``).replace(/\.(?:webp|jpeg)$/,`.jpg`)??``}catch{return``}}var cu={USE_PROFILES:{html:!0},ALLOWED_ATTR:[`href`,`src`,`alt`,`title`,`width`,`height`,`data-media`,`data-source`],ALLOW_DATA_ATTR:!1,FORBID_TAGS:[`form`,`input`,`button`,`textarea`,`select`,`style`,`video`,`audio`,`source`]};function lu(e,t){return e.getAttribute(`width`)===`1`&&e.getAttribute(`height`)===`1`||!!(t&&/feedsportal\.com|feedburner\.com|pixel\.wp\.com|statcounter\.com/i.test(t))}function uu(e){let t=Number(e.getAttribute(`width`)),n=Number(e.getAttribute(`height`));return t>0&&t<160||n>0&&n<100}function du(e,t){if(!e)return null;let n=au.sanitize(e,cu),r=new DOMParser().parseFromString(n,`text/html`);for(let e of r.querySelectorAll(`img`)){let n=r.createRange();if(n.selectNodeContents(r.body),n.setEndBefore(e),n.toString().trim().length>160)return null;let i=ou(e.getAttribute(`src`)??``,t);if(i&&!lu(e,i)&&!uu(e))return i}return null}function fu(e,t={}){if(!e)return``;let n=au.sanitize(e,cu),r=new DOMParser().parseFromString(n,`text/html`),i=t.heroImageUrl?ou(t.heroImageUrl,t.baseUrl):null,a=su(i),o=r.body.textContent?.trim().length??0,s=null,c=null;Array.from(r.querySelectorAll(`img`)).forEach((e,n)=>{let l=ou(e.getAttribute(`src`)??``,t.baseUrl),u=su(l),d=!1;if(n===0&&i?.includes(`/archive/images/`)&&l?.includes(`/archive/images/`)){let t=r.createRange();t.selectNodeContents(r.body),t.setEndBefore(e),d=!t.toString().trim()}let f=!!(i&&l&&(l===i||a&&u===a||d||n===0&&o<400)),p=!1;if(l&&l===c&&s){let t=r.createRange();t.setStartAfter(s),t.setEndBefore(e),p=!t.toString().trim()}if(!l||lu(e,l)||f||p){let t=f?e.getAttribute(`alt`)?.trim():null,n=e.closest(`p`);e.remove(),t&&t.length>=15&&n&&n.textContent?.trim()===t&&!n.querySelector(`img`)&&n.remove()}else e.setAttribute(`src`,l),e.removeAttribute(`loading`),s=e,c=l}),r.querySelectorAll(`a`).forEach(e=>{let n=ou(e.getAttribute(`href`)??``,t.baseUrl);n?(e.setAttribute(`href`,n),e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`)):e.removeAttribute(`href`)}),t.paywallLabel&&r.querySelectorAll(`a[data-media="paywall"]`).forEach(e=>{e.textContent=t.paywallLabel??``}),r.querySelectorAll(`p, div, figure, a`).forEach(e=>{!e.textContent?.trim()&&!e.querySelector(`img`)&&e.remove()});let l=Array.from(r.body.childNodes);if(l.some(e=>e.nodeType===Node.TEXT_NODE&&e.textContent?.trim())&&!r.body.querySelector(`p`)){let e=r.createElement(`p`);l.forEach(t=>e.appendChild(t)),r.body.appendChild(e)}return au.sanitize(r.body.innerHTML,cu)}function pu(e){return e?Math.max(1,Math.ceil(e.trim().split(/\s+/).length/200)):1}function mu({item:e,isOpen:t,onClose:n,onToggleBookmark:r,onToggleRead:i,onNext:a,onPrevious:o,onItemUpdated:s,hasNext:c=!1,hasPrev:l=!1}){let{t:u,i18n:d}=L(),[f,p]=(0,_.useState)(61),m=(0,_.useRef)(null),h=(0,_.useCallback)(e=>{if(m.current?.disconnect(),!e)return;let t=()=>p(e.offsetHeight);t(),m.current=new ResizeObserver(t),m.current.observe(e)},[]),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(!1),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(null),T=e?.author||C,[E,D]=(0,_.useState)(null),[ee,O]=(0,_.useState)(!1),te=e?.feed_full_text_mode===`never`,[k,ne]=(0,_.useState)(null),A=e?.link?ou(e.link):null;(0,_.useEffect)(()=>{S(!!e?.full_content_html),D(null),O(!1),w(null)},[e?.id,e?.full_content_html]),(0,_.useEffect)(()=>{t&&e&&A&&localStorage.getItem(`feedkeeper_auto_reader_mode`)!==`false`&&!e.full_content_html&&!te&&navigator.onLine&&re()},[t,e?.id]),(0,_.useEffect)(()=>{if(t){let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}}},[t]);let re=(0,_.useCallback)(async()=>{if(e&&!y){if(e.full_content_html){S(e=>!e);return}if(A){b(!0),D(null),O(!1);try{let t=await V.extractContent(e.id),n={...e,full_content_html:t.full_content_html};t.byline&&w(t.byline),S(!0),s?.(n)}catch(e){e instanceof ga&&e.code===`consent_wall`?O(!0):e instanceof ga&&e.status===0?D(u(`common.offlineAction`)):e instanceof ga&&e.code===`full_text_disabled`||(console.error(`Failed to extract full text:`,e),D(u(`reader.extractionFailed`)))}finally{b(!1)}}}},[e,y,A,u,s]);(0,_.useEffect)(()=>{if(!t||!e)return;let s=e;function u(e){document.activeElement instanceof HTMLInputElement||document.activeElement instanceof HTMLTextAreaElement||(e.key===`Escape`?(e.preventDefault(),n()):(e.key===`j`||e.key===`ArrowRight`)&&c&&a?(e.preventDefault(),a()):(e.key===`k`||e.key===`ArrowLeft`)&&l&&o?(e.preventDefault(),o()):e.key===`s`||e.key===`S`?(e.preventDefault(),r(s)):e.key===`m`||e.key===`M`?(e.preventDefault(),i(s)):e.key===`r`||e.key===`R`?(e.preventDefault(),re()):(e.key===`o`||e.key===`O`)&&A&&(e.preventDefault(),window.open(A,`_blank`,`noopener,noreferrer`)))}return window.addEventListener(`keydown`,u),()=>window.removeEventListener(`keydown`,u)},[t,e,A,c,l,a,o,n,r,i,re]);let ie=(0,_.useMemo)(()=>e?.published_at?new Date(e.published_at):null,[e?.published_at]),ae=(0,_.useMemo)(()=>ie?new Intl.DateTimeFormat(d.resolvedLanguage,{dateStyle:`medium`}).format(ie):``,[ie,d.resolvedLanguage]),oe=(0,_.useMemo)(()=>ie?new Intl.DateTimeFormat(d.resolvedLanguage,{timeStyle:`short`}).format(ie):``,[ie,d.resolvedLanguage]),se=x?e?.full_content_html:e?.content_html,ce=(0,_.useMemo)(()=>e?.image_url??du(se??``,e?.link),[e?.image_url,se,e?.link]);(0,_.useEffect)(()=>{if(ne(null),!t||!ce)return;let e=!1,n=new Image;return n.onload=()=>{!e&&n.naturalWidth>0&&n.naturalHeight>0&&ne({src:ce,width:n.naturalWidth,height:n.naturalHeight})},n.src=ce,()=>{e=!0}},[t,ce]);let j=k?.src===ce?k:null,le=j!==null&&j.width<=320&&j.height<=240,M=(0,_.useMemo)(()=>e&&se?fu(se,{heroImageUrl:ce,baseUrl:e.link,paywallLabel:u(`reader.paywallRead`)}):``,[e,se,ce,u]),ue=(0,_.useMemo)(()=>pu((se??e?.content_snippet??``).replace(/<[^>]+>/g,` `)),[se,e?.content_snippet]);return!t||!e?null:(0,jc.createPortal)((0,H.jsxs)(`div`,{className:`fixed inset-0 z-50 flex justify-end`,children:[(0,H.jsx)(`div`,{className:`fixed inset-0 bg-black/60 backdrop-blur-xs transition-opacity animate-fade-in`,onClick:n,"aria-hidden":`true`}),(0,H.jsxs)(`div`,{className:`relative z-10 w-full sm:max-w-2xl md:max-w-3xl h-full h-[100dvh] bg-[var(--c-surface)] shadow-2xl flex flex-col border-0 sm:border-l border-[var(--c-border)] animate-drawer-in`,role:`dialog`,"aria-modal":`true`,"aria-label":e.title??u(`items.title`),children:[(0,H.jsxs)(`header`,{ref:h,className:`absolute inset-x-0 top-0 z-20 px-4 py-3 border-b border-[var(--c-border)] backdrop-blur-md transform-gpu flex items-center justify-between gap-3`,style:{paddingTop:`max(0.75rem, env(safe-area-inset-top, 0px))`,backgroundColor:`color-mix(in srgb, var(--c-surface) 85%, transparent)`},children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 pr-2 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:[(0,H.jsx)(Ks,{feedId:e.feed_id,iconUrl:e.feed_icon_url,siteUrl:e.feed_site_url,feedUrl:e.feed_url,articleUrl:e.link,className:`h-3.5 w-3.5 shrink-0 rounded-xs object-contain`}),(0,H.jsx)(`span`,{className:`truncate`,children:e.feed_title})]}),(0,H.jsx)(`button`,{type:`button`,onClick:n,title:u(`reader.close`),"aria-label":u(`reader.close`),className:`w-9 h-9 -mr-1 rounded-xl text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/60 active:scale-95 transition-all cursor-pointer flex items-center justify-center shrink-0`,children:(0,H.jsxs)(`svg`,{className:`w-6 h-6`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,H.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]}),(0,H.jsxs)(`main`,{className:`flex-1 overflow-y-auto overscroll-contain transform-gpu`,style:{paddingTop:f},children:[j&&!le&&(0,H.jsx)(`img`,{src:j.src,alt:``,className:`block w-full max-h-[380px] object-cover`,onError:()=>ne(null)}),(0,H.jsx)(`div`,{className:`px-5 sm:px-10 py-6 sm:py-8`,style:{paddingBottom:`max(2rem, env(safe-area-inset-bottom, 0px))`},children:(0,H.jsxs)(`article`,{className:`max-w-prose mx-auto`,children:[(0,H.jsxs)(`div`,{className:`flow-root`,children:[j&&le&&(0,H.jsx)(`div`,{className:`float-right ml-4 mb-3 sm:ml-6 rounded-xl overflow-hidden border border-[var(--c-border)] bg-[var(--c-bg)] shadow-xs`,style:{width:j.width,maxWidth:`42%`},children:(0,H.jsx)(`img`,{src:j.src,alt:``,className:`block w-full h-auto`,onError:()=>ne(null)})}),(0,H.jsx)(`h1`,{className:`text-2xl sm:text-3xl font-bold font-['Manrope'] text-[var(--c-text)] leading-snug tracking-tight mb-3`,children:e.title})]}),(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1.5 text-xs text-[var(--c-text-muted)] pb-5 border-b border-[var(--c-border)] mb-6 font-medium`,children:[T&&(0,H.jsx)(`span`,{children:T}),ae&&(0,H.jsxs)(H.Fragment,{children:[T&&(0,H.jsx)(`span`,{children:`•`}),(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,H.jsx)(`line`,{x1:`16`,y1:`2`,x2:`16`,y2:`6`}),(0,H.jsx)(`line`,{x1:`8`,y1:`2`,x2:`8`,y2:`6`}),(0,H.jsx)(`line`,{x1:`3`,y1:`10`,x2:`21`,y2:`10`})]}),(0,H.jsx)(`span`,{children:ae})]}),(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`polyline`,{points:`12 6 12 12 16 14`})]}),(0,H.jsx)(`span`,{children:oe})]})]}),(T||ae)&&(0,H.jsx)(`span`,{children:`•`}),(0,H.jsx)(`span`,{children:u(`reader.readingTime`,{count:ue})})]}),ee&&(0,H.jsxs)(`div`,{className:`mb-6 p-4 rounded-xl border border-[var(--c-border)] bg-[var(--c-bg)] text-sm text-[var(--c-text-muted)] flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,H.jsx)(`span`,{children:u(`reader.consentWall`)}),A&&(0,H.jsx)(`a`,{href:A,target:`_blank`,rel:`noreferrer noopener`,className:`btn-primary text-sm whitespace-nowrap self-start sm:self-center`,children:u(`reader.readOriginal`)})]}),E&&(0,H.jsxs)(`div`,{className:`mb-6 p-4 rounded-xl bg-red-500/10 border border-red-500/30 text-red-600 dark:text-red-400 text-xs flex items-center justify-between gap-3`,children:[(0,H.jsx)(`span`,{children:E}),A&&(0,H.jsx)(`a`,{href:A,target:`_blank`,rel:`noreferrer noopener`,className:`underline font-semibold whitespace-nowrap hover:opacity-80`,children:u(`reader.openOriginal`)})]}),M?(0,H.jsx)(`div`,{className:`reader-content`,dangerouslySetInnerHTML:{__html:M}}):e.content_snippet?(0,H.jsx)(`div`,{className:`reader-content`,children:e.content_snippet.split(`
14
14
 
15
- `).map((e,t)=>(0,H.jsx)(`p`,{children:e},t))}):(0,H.jsx)(`p`,{className:`text-[var(--c-text-muted)] italic`,children:u(`items.noItems`)}),(0,H.jsxs)(`div`,{className:`mt-12 pt-6 border-t border-[var(--c-border)]/60 flex items-center justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:o,disabled:!l,title:u(`reader.previous`),"aria-label":u(`reader.previous`),className:`w-10 h-10 rounded-xl border border-[var(--c-border)] flex items-center justify-center text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/40 active:scale-95 disabled:opacity-30 disabled:cursor-not-allowed transition-all cursor-pointer`,children:(0,H.jsx)(`svg`,{className:`w-5 h-5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polyline`,{points:`15 18 9 12 15 6`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:a,disabled:!c,title:u(`reader.next`),"aria-label":u(`reader.next`),className:`w-10 h-10 rounded-xl border border-[var(--c-border)] flex items-center justify-center text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/40 active:scale-95 disabled:opacity-30 disabled:cursor-not-allowed transition-all cursor-pointer`,children:(0,H.jsx)(`svg`,{className:`w-5 h-5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polyline`,{points:`9 18 15 12 9 6`})})})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[A&&(!te||e.full_content_html)&&(0,H.jsx)(`button`,{type:`button`,onClick:re,disabled:y,title:u(x?`reader.togglePreview`:`reader.toggleFullText`),"aria-label":u(x?`reader.togglePreview`:`reader.toggleFullText`),className:`w-10 h-10 rounded-xl border flex items-center justify-center transition-all active:scale-95 cursor-pointer ${x?`bg-[var(--c-blue1)]/15 border-[var(--c-blue1)]/40 text-[var(--c-blue1)]`:`border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/40`}`,children:y?(0,H.jsx)(`svg`,{className:`w-4 h-4 animate-spin text-[var(--c-blue1)]`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,strokeDasharray:`32`,strokeDashoffset:`12`})}):(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z`}),(0,H.jsx)(`path`,{d:`M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z`})]})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>r(e),title:e.bookmarked?u(`reader.unbookmark`):u(`reader.bookmark`),"aria-label":e.bookmarked?u(`reader.unbookmark`):u(`reader.bookmark`),className:`w-10 h-10 rounded-xl border flex items-center justify-center transition-all active:scale-95 cursor-pointer ${e.bookmarked?`bg-amber-500/15 border-amber-500/40 text-amber-500`:`border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-amber-500 hover:border-amber-500/30`}`,children:(0,H.jsx)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:e.bookmarked?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>i(e),title:e.read?u(`reader.markUnread`):u(`reader.markRead`),"aria-label":e.read?u(`reader.markUnread`):u(`reader.markRead`),className:`w-10 h-10 rounded-xl border flex items-center justify-center transition-all active:scale-95 cursor-pointer ${e.read?`border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)]`:`border-[var(--c-border)] text-[var(--c-blue1)] hover:border-[var(--c-blue3)]`}`,children:(0,H.jsx)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:e.read?`none`:`currentColor`,stroke:`currentColor`,strokeWidth:`2.2`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:async()=>{if(A)try{await navigator.clipboard.writeText(A),v(!0),setTimeout(()=>v(!1),2e3)}catch{}},title:u(g?`reader.linkCopied`:`reader.copyLink`),"aria-label":u(`reader.copyLink`),className:`w-10 h-10 rounded-xl border border-[var(--c-border)] flex items-center justify-center text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/40 transition-all active:scale-95 cursor-pointer relative`,children:g?(0,H.jsx)(`svg`,{className:`w-4 h-4 text-emerald-500`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}):(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),(0,H.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]})}),A&&(0,H.jsx)(`a`,{href:A,target:`_blank`,rel:`noreferrer noopener`,title:u(`reader.openOriginal`),"aria-label":u(`reader.openOriginal`),className:`w-10 h-10 rounded-xl border border-[var(--c-border)] flex items-center justify-center text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/40 transition-all active:scale-95`,children:(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,H.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,H.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]})})]})]})]})})]})]})]}),document.body)}var hu=650;function gu(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content.querySelectorAll(`script, style, noscript, template, svg, [hidden], [aria-hidden='true']`).forEach(e=>e.remove()),t.content.querySelectorAll(`p, div, li, br, blockquote, section, article, h1, h2, h3, h4, h5, h6`).forEach(e=>e.after(` `)),t.content.textContent?.replace(/\s+/g,` `).trim()??``}function _u(e){let t=e.full_content_html?.trim()?gu(e.full_content_html):``,n=!t&&e.content_html?.trim()?gu(e.content_html):``,r=e.content_snippet?.replace(/\s+/g,` `).trim()??``,i=t||(n.length>=r.length?n:r);return i?i.length>hu?`${i.slice(0,hu).trimEnd()}…`:i:null}function vu({item:e,className:t}){let n=(0,_.useMemo)(()=>_u(e),[e]);return n?(0,H.jsx)(`p`,{className:t,children:n}):null}function yu(e){let t=0,n=-5;return e.map((e,r)=>{let i=/^https?:\/\//i.test(e.image_url??``),a=(e.content_snippet?.trim().length??0)>=220,o=(i||a)&&r-n>=5&&t<=1;return t=(t+(o?2:1))%3,o&&(n=r),o})}function bu(e){let t=e.map(()=>!1),n=[],r=0;return e.forEach((i,a)=>{n.push(a),r+=i?2:1,r===3&&(n.some(t=>e[t])&&n.forEach(n=>{t[n]=!e[n]}),n=[],r=0)}),t}function xu({url:e,featured:t}){let[n,r]=(0,_.useState)(`loading`);return!e||!/^https?:\/\//i.test(e)?null:(0,H.jsx)(`div`,{className:n===`hidden`?`hidden`:`overflow-hidden border-b border-[var(--c-border)] bg-[var(--c-bg)]`,children:(0,H.jsx)(`img`,{src:e,alt:``,loading:`lazy`,className:`w-full object-cover transition-transform duration-300 group-hover:scale-[1.025] ${t?`aspect-[3/2] lg:aspect-[16/9]`:`aspect-[3/2]`} ${n===`visible`?`opacity-100`:`opacity-0`}`,onLoad:e=>{let{naturalWidth:n,naturalHeight:i}=e.currentTarget;r(n>=(t?400:160)&&i>=(t?220:100)?`visible`:`hidden`)},onError:()=>r(`hidden`)})})}function Su({item:e,featured:t,besideFeature:n,onOpen:r,onBookmark:i,onRead:a}){let{t:o,i18n:s}=L(),c=e.published_at?new Date(e.published_at):null,l=c&&!Number.isNaN(c.getTime())?c:null,u=l?new Intl.DateTimeFormat(s.resolvedLanguage,{dateStyle:`medium`}).format(l):null,d=l?new Intl.DateTimeFormat(s.resolvedLanguage,{timeStyle:`short`}).format(l):null;return(0,H.jsx)(`li`,{className:t?`lg:col-span-2`:``,children:(0,H.jsxs)(`article`,{className:`card group relative flex h-full flex-col overflow-hidden transition-colors duration-150 hover:border-[var(--c-blue3)] hover:bg-[var(--c-surface-hover)]`,style:{opacity:e.read?.65:1},children:[(0,H.jsx)(`button`,{type:`button`,className:`absolute inset-0 z-10 rounded-xl focus-visible:outline-2 focus-visible:outline-offset-[-3px] focus-visible:outline-[var(--c-blue3)]`,"aria-label":e.title||e.feed_title||o(`items.title`),onClick:()=>r(e)}),(0,H.jsx)(xu,{url:e.image_url,featured:t},e.image_url??``),(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col ${t?`p-4 sm:p-5 lg:p-6`:`p-4 sm:p-5`}`,children:[(0,H.jsxs)(`div`,{className:`mb-3 flex min-w-0 items-center gap-2 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:[(0,H.jsx)(Ks,{feedId:e.feed_id,iconUrl:e.feed_icon_url,siteUrl:e.feed_site_url,feedUrl:e.feed_url,articleUrl:e.link,className:`h-3.5 w-3.5 shrink-0 rounded-xs object-contain`}),(0,H.jsx)(`span`,{className:`truncate`,children:e.feed_title})]}),(0,H.jsx)(`h2`,{className:`text-[var(--c-text)] ${t?`text-lg leading-snug lg:text-2xl lg:leading-tight`:`text-lg leading-snug`} font-semibold`,children:e.title||e.feed_title}),(0,H.jsx)(vu,{item:e,className:`mt-3 text-sm leading-relaxed text-[var(--c-text-muted)] ${t?`line-clamp-3 lg:line-clamp-4`:n?`line-clamp-3 lg:line-clamp-12`:`line-clamp-3`}`}),(0,H.jsxs)(`div`,{className:`pointer-events-none relative z-20 mt-auto flex flex-wrap items-center gap-x-3 gap-y-2 pt-5 text-xs text-[var(--c-text-muted)]`,children:[u&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,title:d??void 0,children:[(0,H.jsxs)(`svg`,{className:`h-3.5 w-3.5 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`18`,rx:`2`}),(0,H.jsx)(`path`,{d:`M8 2v4M16 2v4M3 10h18`})]}),u]}),d&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsxs)(`svg`,{className:`h-3.5 w-3.5 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`path`,{d:`M12 6v6l4 2`})]}),d]}),(0,H.jsxs)(`div`,{className:`pointer-events-auto ml-auto flex items-center gap-1.5`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>i(e),title:e.bookmarked?o(`items.unbookmark`):o(`items.bookmark`),"aria-label":e.bookmarked?o(`items.unbookmark`):o(`items.bookmark`),className:`grid h-8 w-8 place-items-center rounded-lg border transition-colors ${e.bookmarked?`border-amber-500/40 bg-amber-500/15 text-amber-500`:`border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-amber-500`}`,children:(0,H.jsx)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:e.bookmarked?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>a(e),title:e.read?o(`items.markUnread`):o(`items.markRead`),"aria-label":e.read?o(`items.markUnread`):o(`items.markRead`),className:`grid h-8 w-8 place-items-center rounded-lg border border-[var(--c-border)] transition-colors ${e.read?`text-[var(--c-text-muted)]`:`text-[var(--c-blue3)]`}`,children:(0,H.jsx)(`svg`,{className:`h-3.5 w-3.5`,viewBox:`0 0 24 24`,fill:e.read?`none`:`currentColor`,stroke:`currentColor`,strokeWidth:`2.2`,"aria-hidden":`true`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})})})]})]})]})]})})}function Cu({items:e,onOpen:t,onBookmark:n,onRead:r}){let i=(0,_.useMemo)(()=>yu(e),[e]),a=(0,_.useMemo)(()=>bu(i),[i]);return(0,H.jsx)(`ul`,{className:`grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 sm:gap-5 animate-page-fade`,children:e.map((e,o)=>(0,H.jsx)(Su,{item:e,featured:i[o],besideFeature:a[o],onOpen:t,onBookmark:n,onRead:r},e.id))})}var wu=68,Tu=92,Eu=`input, select, textarea, [contenteditable='true'], [data-no-pull]`;function Du(){let e=e=>{e.preventDefault(),e.stopPropagation()};window.addEventListener(`click`,e,{capture:!0,once:!0}),window.setTimeout(()=>window.removeEventListener(`click`,e,{capture:!0}),400)}function Ou({children:e,disabled:t=!1,onRefresh:n}){let{t:r}=L(),i=(0,_.useRef)(null),a=(0,_.useRef)(0),[o,s]=(0,_.useState)(0),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!1),m=(0,_.useCallback)(()=>{u||(p(!1),d(!0),s(56),n().catch(()=>p(!0)).finally(()=>{d(!1),s(0)}))},[u,n]);(0,_.useEffect)(()=>{let e=i.current;if(!e)return;let n=null;function r(){n=null,a.current=0,l(!1),s(0)}function o(e){t||u||e.touches.length!==1||window.scrollY>1||!window.matchMedia(`(any-pointer: coarse)`).matches||document.body.style.overflow===`hidden`||e.target.closest(Eu)||(n={x:e.touches[0].clientX,y:e.touches[0].clientY})}function c(e){if(!n||e.touches.length!==1)return;let t=e.touches[0].clientX-n.x,i=e.touches[0].clientY-n.y;if(window.scrollY>1||Math.abs(t)>Math.abs(i)){r();return}if(i<=0){a.current=0,s(0);return}e.preventDefault();let o=Math.min(Tu,i*.72);a.current=o,l(!0),s(o)}function d(){if(!n)return;let e=a.current>=wu;a.current>8&&Du(),r(),e&&m()}return e.addEventListener(`touchstart`,o,{passive:!0}),e.addEventListener(`touchmove`,c,{passive:!1}),e.addEventListener(`touchend`,d),e.addEventListener(`touchcancel`,r),()=>{e.removeEventListener(`touchstart`,o),e.removeEventListener(`touchmove`,c),e.removeEventListener(`touchend`,d),e.removeEventListener(`touchcancel`,r)}},[t,u,n,m]);let h=u?1:Math.min(1,o/wu);return(0,H.jsxs)(`div`,{ref:i,children:[(0,H.jsx)(`button`,{type:`button`,className:`sr-only focus:not-sr-only sm:hidden`,onClick:m,disabled:t||u,children:r(`items.refresh`)}),(0,H.jsx)(`div`,{"aria-hidden":`true`,className:`relative flex items-center justify-center overflow-hidden`,style:{height:o,transition:c?`none`:`height 220ms ease-out`},children:(0,H.jsx)(`div`,{className:`flex h-10 w-10 items-center justify-center rounded-full border border-[var(--c-border)] bg-[var(--c-surface)] text-[var(--c-text)] shadow-sm`,style:{opacity:Math.min(1,o/30),transform:`scale(${.65+h*.35})`},children:(0,H.jsxs)(`svg`,{className:`h-5 w-5 ${u?`animate-spin motion-reduce:animate-none`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,style:u?void 0:{transform:`rotate(${h*270}deg)`},children:[(0,H.jsx)(`path`,{d:`M18 7a8 8 0 1 0 2 5`,pathLength:`100`,strokeDasharray:`${h*100} 100`}),(0,H.jsx)(`path`,{d:`M18 3v4h-4`,opacity:h})]})})}),u&&(0,H.jsx)(`span`,{className:`sr-only`,role:`status`,children:r(`items.refreshing`)}),f&&(0,H.jsx)(`p`,{className:`mb-3 text-center text-sm text-[var(--c-danger)]`,role:`alert`,children:r(`items.refreshFailed`)}),e]})}function ku(){let{user:e}=so(),t=Go(Yo()),[n,r]=(0,_.useState)(!1),i=!!e?.intro_dismissed_at;return(0,_.useEffect)(()=>{let n=!0;if(r(!1),t&&e&&i)return Promise.resolve(!t.applies||t.applies({id:e.id,email:e.email,display_name:e.display_name??null})).then(e=>{n&&r(e===!0)}).catch(()=>{n&&r(!1)}),()=>{n=!1}},[t?.mount,t?.applies,e?.id,i]),!t||!n?null:(0,H.jsx)(Ls,{name:`articles-notice`,mount:t.mount})}function Au(){let{t:e}=L(),{user:t,setCurrentUser:n}=so(),[r,i]=(0,_.useState)(!1);if(!t||t.intro_dismissed_at)return null;async function a(){i(!0);try{n(await V.dismissIntro())}catch{i(!1)}}let o=[{key:`views`,className:`hidden sm:flex`,icon:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2`}),(0,H.jsx)(`path`,{d:`M18 14h-8`}),(0,H.jsx)(`path`,{d:`M15 18h-5`}),(0,H.jsx)(`path`,{d:`M10 6h8v4h-8V6Z`})]})},{key:`unread`,solid:!0,icon:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})},{key:`star`,icon:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})},{key:`folders`,icon:(0,H.jsx)(`path`,{d:`M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z`})}];return(0,H.jsxs)(`section`,{className:`card animate-fade-in flex flex-col gap-5 p-5 sm:p-7 shadow-xs`,"aria-labelledby":`intro-title`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h2`,{id:`intro-title`,className:`text-xl sm:text-2xl font-bold tracking-tight text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:e(`intro.title`)}),(0,H.jsx)(`p`,{className:`mt-0.5 text-xs sm:text-sm leading-relaxed text-[var(--c-text-muted)]`,children:e(`intro.subtitle`)})]}),(0,H.jsx)(`button`,{type:`button`,onClick:a,disabled:r,"aria-label":e(`common.close`),className:`shrink-0 rounded-lg p-1 text-[var(--c-text-muted)] hover:bg-[var(--c-surface-hover)] hover:text-[var(--c-text)] cursor-pointer`,children:(0,H.jsx)(oc,{})})]}),(0,H.jsx)(`ul`,{className:`grid gap-3 sm:grid-cols-2`,children:o.map(t=>(0,H.jsxs)(`li`,{className:`flex items-start gap-3.5 rounded-2xl border border-[var(--c-border)]/80 bg-[var(--c-surface-hover)]/25 p-4 ${t.className??``}`,children:[(0,H.jsx)(`div`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-[var(--c-border)] bg-[var(--c-surface)] text-[var(--c-text)]`,children:(0,H.jsx)(`svg`,{className:t.solid?`h-3.5 w-3.5`:`h-4 w-4`,viewBox:`0 0 24 24`,fill:t.solid?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:t.solid?2.2:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:t.icon})}),(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h3`,{className:`text-sm sm:text-base font-bold text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:e(`intro.${t.key}Title`)}),(0,H.jsx)(`p`,{className:`mt-0.5 text-xs sm:text-sm leading-relaxed text-[var(--c-text-muted)]`,children:e(`intro.${t.key}Text`)})]})]},t.key))}),(0,H.jsx)(`button`,{type:`button`,onClick:a,disabled:r,className:`btn-primary self-start`,children:e(`intro.done`)})]})}var ju=50;function Mu(){return(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,H.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})}var Nu=`(max-width: 639px)`;function Pu(){return(0,_.useSyncExternalStore)(e=>{let t=window.matchMedia(Nu);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},()=>window.matchMedia(Nu).matches)}function Fu(){let{t:e,i18n:t}=L(),[n,r]=Fi(),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(!1),{syncAllowed:c}=Vs(),[l,u]=(0,_.useState)([]),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)(!0),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)(!1),w=(0,_.useRef)(0),T=(0,_.useRef)(0),E=(0,_.useRef)(!1),[D,ee]=(0,_.useState)(null),[O,te]=(0,_.useState)(()=>{try{return localStorage.getItem(`feedkeeper_items_view`)===`newspaper`?`newspaper`:`list`}catch{return`list`}}),k=Pu()?`newspaper`:O;function ne(e){if(e!==O){Wa(),te(e),window.scrollTo({top:0,behavior:`instant`});try{localStorage.setItem(`feedkeeper_items_view`,e)}catch{}}}let A=`feedkeeper_filter_scope`,re=`feedkeeper_filter_unread`,ie=`feedkeeper_filter_bookmarked`,ae=n.get(`article`),oe=(()=>{let e=n.get(`feed`);if(e)return`feed:${e}`;let t=n.get(`folder`);if(t)return`folder:${t}`;try{let e=localStorage.getItem(A);if(e)return e}catch{}return``})(),se=(()=>{try{let e=localStorage.getItem(re);if(e!==null)return e===`true`}catch{}return!0})(),ce=(()=>{if(n.get(`saved`)===`1`)return!0;if(n.get(`article`))return!1;try{let e=localStorage.getItem(ie);if(e!==null)return e===`true`}catch{}return!1})(),[j,le]=(0,_.useState)(oe),[M,ue]=(0,_.useState)(se),[de,fe]=(0,_.useState)(ce),pe=M&&!de,[me,he]=(0,_.useState)(``),[ge,_e]=(0,_.useState)(!1),N=(0,_.useRef)(null),P=(0,_.useRef)(null),ve=(0,_.useRef)(null),[F,ye]=(0,_.useState)(61),[be,xe]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let e=document.querySelector(`[data-app-header]`);if(!e)return;let t=new ResizeObserver(()=>ye(e.getBoundingClientRect().height));return t.observe(e),()=>t.disconnect()},[]),(0,_.useEffect)(()=>{function e(){let e=ve.current?.getBoundingClientRect().top;xe(window.scrollY>0&&e!==void 0&&e<=F+1)}return e(),window.addEventListener(`scroll`,e,{passive:!0}),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e),window.removeEventListener(`resize`,e)}},[F]),(0,_.useEffect)(()=>{ge&&N.current?.focus()},[ge]),(0,_.useEffect)(()=>{let e=window.matchMedia(`(min-width: 640px)`),t=()=>{e.matches&&_e(!1)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);function I(){_e(!1),requestAnimationFrame(()=>P.current?.focus())}function Se(e){Wa(),he(e)}function Ce(){Wa(),ue(e=>{let t=!e;try{localStorage.setItem(re,String(t))}catch{}return t})}function we(){Wa(),fe(e=>{let t=!e;try{localStorage.setItem(ie,String(t))}catch{}return t})}(0,_.useEffect)(()=>{if(p||E.current)return;let e=Ha(),t=requestAnimationFrame(()=>{e>0&&window.scrollTo({top:e,behavior:`instant`}),E.current=!0});return()=>cancelAnimationFrame(t)},[p]),(0,_.useEffect)(()=>{function e(){E.current&&document.body.style.overflow!==`hidden`&&Ua(window.scrollY)}return window.addEventListener(`scroll`,e,{passive:!0}),()=>{E.current&&document.body.style.overflow!==`hidden`&&Ua(window.scrollY),window.removeEventListener(`scroll`,e)}},[]),(0,_.useEffect)(()=>{let e=n.get(`feed`),t=n.get(`folder`);if(e){let t=`feed:${e}`;t!==j&&Wa(),le(t);try{localStorage.setItem(A,t)}catch{}}else if(t){let e=`folder:${t}`;e!==j&&Wa(),le(e);try{localStorage.setItem(A,e)}catch{}}else if(oe&&!n.toString()){let e=new URLSearchParams(n);oe.startsWith(`feed:`)?e.set(`feed`,oe.slice(5)):oe.startsWith(`folder:`)&&e.set(`folder`,oe.slice(7)),r(e,{replace:!0})}},[n]);function Te(e){Wa(),le(e);try{e?localStorage.setItem(A,e):localStorage.removeItem(A)}catch{}let t=new URLSearchParams(n);t.delete(`feed`),t.delete(`folder`),e.startsWith(`feed:`)?t.set(`feed`,e.slice(5)):e.startsWith(`folder:`)&&t.set(`folder`,e.slice(7)),r(t,{replace:!0})}(0,_.useEffect)(()=>{Promise.all([V.listFeeds(),V.listFolders().catch(()=>({folders:[]}))]).then(([e,t])=>{a(e),u(t.folders),s(!0)}).catch(e=>console.error(`Failed to load initial feeds/folders:`,e))},[]);let Ee=j.startsWith(`feed:`)?Number(j.slice(5)):void 0,De=j.startsWith(`folder:`)?Number(j.slice(7)):void 0,Oe=!me&&!de&&Ee===void 0&&De===void 0,ke=Oe&&i.length>0&&i.every(e=>!e.last_polled_at);async function Ae(){try{let[e,t]=await Promise.all([V.listFeeds(),V.listFolders().catch(()=>({folders:[]}))]);return e.length===0&&(n.has(`folder`)||n.has(`feed`))&&(r({},{replace:!0}),le(``)),a(e),u(t.folders),s(!0),e}catch(e){return console.error(`Failed to reload feeds:`,e),null}}async function je(){await Ae(),await Me(),eo()}async function Me(){let e=++w.current;m(!0),g(!1),x(!1),y(!1);try{let t=await V.listItems({feedId:Ee,folderId:De,unreadOnly:pe,bookmarkedOnly:de,search:me||void 0,limit:ju});e===w.current&&(f(t),T.current=t.length,C(t.length===ju))}catch(t){e===w.current&&(console.error(`Failed to load items:`,t),g(!0))}finally{e===w.current&&m(!1)}}async function Ne(){if(v||!S)return;let e=w.current;y(!0),x(!1);try{let t=await V.listItems({feedId:Ee,folderId:De,unreadOnly:pe,bookmarkedOnly:de,search:me||void 0,limit:ju,offset:T.current});e===w.current&&(T.current+=t.length,f(e=>{let n=new Set(e.map(e=>e.id));return[...e,...t.filter(e=>!n.has(e.id))]}),C(t.length===ju))}catch(t){e===w.current&&(console.error(`Failed to load more items:`,t),x(!0))}finally{e===w.current&&y(!1)}}let Pe=(0,_.useRef)(Ne);Pe.current=Ne;let Fe=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=Fe.current;if(!e||!S||b||v||h)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&Pe.current()},{rootMargin:`600px 0px`});return t.observe(e),()=>t.disconnect()},[S,b,v,h,d.length]),(0,_.useEffect)(()=>{f([]),m(!0),C(!1),y(!1);let e=setTimeout(()=>{Me()},200);return()=>{clearTimeout(e),w.current++}},[j,M,de,me]),(0,_.useEffect)(()=>{if(!ke)return;let e=0,t=setInterval(()=>{e++,Ae().then(e=>{e?.some(e=>e.last_polled_at)&&Me()}),e>=45&&clearInterval(t)},4e3);return()=>clearInterval(t)},[ke]);let Ie=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(ae){let e=d.find(e=>e.id===Number(ae));ee(e??null),e&&!e.read&&Ie.current!==e.id&&(Ie.current=e.id,V.markRead(e.id).then(eo).catch(()=>{}),f(t=>t.map(t=>t.id===e.id?{...t,read:!0}:t)))}else ee(null)},[ae,d]);function Le(e){ee(e),e.read||(V.markRead(e.id).then(eo).catch(()=>{}),f(t=>t.map(t=>t.id===e.id?{...t,read:!0}:t)),ee({...e,read:!0}));let t=new URLSearchParams(n);t.set(`article`,String(e.id)),r(t)}function Re(){ee(null);let e=new URLSearchParams(n);e.delete(`article`),r(e)}let ze=D?d.findIndex(e=>e.id===D.id):-1,Be=ze>=0&&ze<d.length-1,Ve=ze>0;function He(){Be&&Le(d[ze+1])}function Ue(){Ve&&Le(d[ze-1])}async function We(t){try{await t()}catch(t){if(!(t instanceof ga&&t.status===0))throw t;G.error(e(`common.offlineAction`))}}async function Ge(e){let t=!e.read;e.read?await V.markUnread(e.id):await V.markRead(e.id),eo(),f(n=>n.map(n=>n.id===e.id?{...n,read:t}:n)),D?.id===e.id&&ee(e=>e?{...e,read:t}:null)}async function Ke(e){let t=!e.bookmarked;e.bookmarked?await V.unbookmarkItem(e.id):await V.bookmarkItem(e.id),window.setTimeout(()=>void Ra({force:!0}),t?2e4:0),f(n=>de&&!t&&D?.id!==e.id?n.filter(t=>t.id!==e.id):n.map(n=>n.id===e.id?{...n,bookmarked:t}:n)),D?.id===e.id&&ee(e=>e?{...e,bookmarked:t}:null)}async function qe(){await We(async()=>{await V.markAllRead({feedId:Ee,folderId:De}),await Me(),eo()})}let[Je,Ye]=(0,_.useState)(!1);async function Xe(){Ye(!0);try{let t=await V.refreshAllFeeds();await Me(),Cc(t,e)}catch{G.error(e(`items.refreshFailed`))}finally{Ye(!1)}}let Ze=new Intl.DateTimeFormat(t.resolvedLanguage,{dateStyle:`medium`}),Qe=new Intl.DateTimeFormat(t.resolvedLanguage,{timeStyle:`short`}),$e=(0,_.useMemo)(()=>{let t=[{value:``,label:e(`items.allFeeds`)}];if(l.length>0)for(let n of l)t.push({value:`folder:${n.id}`,label:n.name,group:e(`feeds.folderGroup`),badge:n.unread_count});for(let n of i)t.push({value:`feed:${n.id}`,label:n.label??n.title??n.url,group:e(`feeds.feedGroup`),badge:n.unread_count});return t},[l,i,e]),et=j?$e.find(e=>e.value===j)?.label??e(`items.title`):e(`items.allFeeds`);function tt(e){f(t=>t.map(t=>t.id===e.id?e:t)),D?.id===e.id&&ee(e)}let nt=(0,H.jsxs)(`div`,{className:`flex flex-col gap-5 sm:gap-6`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-2 sm:gap-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h1`,{className:`sr-only`,children:et}),(0,H.jsx)(kc,{className:`block`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 sm:gap-3 min-w-0`,children:[(0,H.jsxs)(`div`,{className:`relative hidden h-11 w-[220px] shrink-0 grid-cols-2 rounded-xl border border-[var(--c-border)] bg-[var(--c-surface)] p-1 sm:grid`,role:`group`,"aria-label":e(`items.viewMode`),children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-y-1 left-1 w-[calc((100%-0.5rem)/2)] rounded-lg border border-[var(--c-mobile-nav-active-border)] bg-[var(--c-mobile-nav-active)] shadow-sm transition-transform duration-300 ease-[cubic-bezier(0.25,1,0.5,1)] motion-reduce:transition-none`,style:{transform:O===`newspaper`?`translateX(100%)`:`translateX(0)`}}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>ne(`list`),title:e(`items.listView`),"aria-label":e(`items.listView`),"aria-pressed":O===`list`,className:`relative z-10 flex h-full min-w-0 items-center justify-center gap-1.5 rounded-lg text-xs sm:text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] ${O===`list`?`text-[var(--c-text)]`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)]`}`,children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4 transition-transform duration-200 motion-reduce:transition-none ${O===`list`?`scale-105`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M8 6h12M8 12h12M8 18h12`}),(0,H.jsx)(`circle`,{cx:`4`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,H.jsx)(`circle`,{cx:`4`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,H.jsx)(`circle`,{cx:`4`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`})]}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:e(`items.listView`)})]}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>ne(`newspaper`),title:e(`items.newspaperView`),"aria-label":e(`items.newspaperView`),"aria-pressed":O===`newspaper`,className:`relative z-10 flex h-full min-w-0 items-center justify-center gap-1.5 rounded-lg text-xs sm:text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] ${O===`newspaper`?`text-[var(--c-text)]`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)]`}`,children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4 transition-transform duration-200 motion-reduce:transition-none ${O===`newspaper`?`scale-105`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2`}),(0,H.jsx)(`path`,{d:`M18 14h-8`}),(0,H.jsx)(`path`,{d:`M15 18h-5`}),(0,H.jsx)(`path`,{d:`M10 6h8v4h-8V6Z`})]}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:e(`items.newspaperView`)})]})]}),(0,H.jsx)(`button`,{type:`button`,onClick:Xe,disabled:Je||!c,title:e(c?Je?`items.refreshing`:`items.refresh`:`plan.unavailable`),"aria-label":e(Je?`items.refreshing`:`items.refresh`),className:`btn-secondary hidden h-11 w-11 shrink-0 items-center justify-center p-0! sm:flex`,children:(0,H.jsx)(Xs,{className:`h-5 w-5 ${Je?`animate-spin motion-reduce:animate-none`:``}`})}),(0,H.jsx)(`button`,{type:`button`,onClick:qe,title:e(`feeds.markAllRead`),"aria-label":e(`feeds.markAllRead`),className:`btn-secondary flex h-11 w-11 shrink-0 items-center justify-center p-0!`,children:(0,H.jsx)(`svg`,{className:`h-5 w-5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`M3 12l4 4 6-7M11 16l3 0 7-8`})})})]})]}),(0,H.jsxs)(`div`,{ref:ve,className:`sticky z-20 py-2`,style:{top:F},children:[be&&(0,H.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute -top-px bottom-0 left-1/2 w-screen -translate-x-1/2 border-y border-[var(--c-border)] backdrop-blur-md`,style:{backgroundColor:`color-mix(in srgb, var(--c-surface) 85%, transparent)`}}),(0,H.jsxs)(`div`,{className:`items-toolbar relative z-10 flex items-center gap-2 sm:gap-3 ${ge?`items-toolbar-open`:``}`,children:[(0,H.jsx)(`div`,{className:`items-toolbar-scope min-w-0 flex-1 sm:flex-none sm:w-64`,inert:ge,children:(0,H.jsx)(Hs,{value:j,onChange:Te,options:$e,className:`w-full`,placeholder:e(`items.allFeeds`)})}),(0,H.jsxs)(`div`,{className:`relative hidden sm:block flex-1 min-w-0`,children:[(0,H.jsx)(`input`,{type:`search`,placeholder:e(`items.searchPlaceholder`),"aria-label":e(`items.searchPlaceholder`),className:`input w-full pl-9 pr-3`,value:me,onChange:e=>Se(e.target.value)}),(0,H.jsx)(`span`,{className:`absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-45 text-[var(--c-text-muted)]`,children:(0,H.jsx)(Mu,{})})]}),(0,H.jsxs)(`div`,{className:`items-toolbar-search relative h-[38px] min-w-0 overflow-hidden sm:hidden`,children:[(0,H.jsx)(`button`,{ref:P,type:`button`,onClick:()=>_e(!0),"aria-label":e(`items.searchPlaceholder`),"aria-controls":`mobile-article-search`,"aria-expanded":ge,title:e(`items.searchPlaceholder`),"aria-hidden":ge,tabIndex:ge?-1:0,className:`absolute inset-y-0 left-0 z-10 flex w-[38px] items-center justify-center rounded-lg border transition-opacity duration-150 ${ge?`pointer-events-none opacity-0`:me?`border-[var(--c-blue3)] bg-[var(--c-surface-hover)] text-[var(--c-text)] opacity-100`:`border-[var(--c-border)] bg-[var(--c-surface)] text-[var(--c-text-muted)] opacity-100`}`,children:(0,H.jsx)(Mu,{})}),(0,H.jsxs)(`div`,{className:`flex h-full min-w-0 items-center gap-2 transition-opacity duration-200 ${ge?`opacity-100 delay-75`:`pointer-events-none opacity-0`}`,inert:!ge,children:[(0,H.jsx)(`span`,{className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-[var(--c-text-muted)] opacity-60`,children:(0,H.jsx)(Mu,{})}),(0,H.jsx)(`input`,{id:`mobile-article-search`,ref:N,type:`search`,placeholder:e(`items.searchPlaceholder`),"aria-label":e(`items.searchPlaceholder`),className:`input min-w-0 flex-1 pl-9`,value:me,onChange:e=>Se(e.target.value),onKeyDown:e=>{e.key===`Escape`&&I()}}),(0,H.jsx)(`button`,{type:`button`,onClick:I,"aria-label":e(`common.close`),title:e(`common.close`),className:`w-[38px] h-[38px] rounded-lg border border-[var(--c-border)] bg-[var(--c-surface)] text-[var(--c-text-muted)] flex items-center justify-center shrink-0 cursor-pointer`,children:(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,H.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]})]}),(0,H.jsxs)(`div`,{className:`items-toolbar-filters flex items-center gap-1.5 sm:gap-2 shrink-0`,inert:ge,children:[(0,H.jsx)(`button`,{type:`button`,onClick:we,title:e(de?`items.all`:`items.bookmarkedOnly`),"aria-label":e(`items.bookmarkedOnly`),"aria-pressed":de,className:`w-[38px] h-[38px] rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer ${de?`bg-amber-500/15 border-amber-500/40 text-amber-500`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-amber-500 hover:border-amber-500/30`}`,children:(0,H.jsx)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:de?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:Ce,disabled:de,title:e(de?`items.unreadIgnoredInSaved`:M?`items.all`:`items.unreadOnly`),"aria-label":e(`items.unreadOnly`),"aria-pressed":pe,className:`w-[38px] h-[38px] rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer disabled:cursor-default disabled:opacity-40 ${pe?`bg-[var(--c-surface-hover)] border-[var(--c-blue3)] text-[var(--c-text)] shadow-xs`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:border-[var(--c-blue3)]`}`,children:(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 24 24`,fill:pe?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2.2`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})})})]})]})]}),o&&i.length>0&&!c&&(0,H.jsx)(_c,{}),o&&i.length>0&&!h&&(0,H.jsx)(Au,{}),o&&i.length>0&&!h&&(0,H.jsx)(ku,{}),h?(0,H.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-3`,children:[(0,H.jsx)(`p`,{style:{color:`var(--c-text-muted)`},children:e(`items.loadFailed`)}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>void Me(),className:`btn-secondary`,children:e(`common.retry`)})]}):p&&d.length===0?(0,H.jsx)(zs,{size:`lg`}):d.length===0&&o&&i.length===0?(0,H.jsx)(yc,{onSubscribed:je}):d.length===0&&ke?(0,H.jsxs)(`div`,{role:`status`,className:`card flex flex-col items-center gap-3 px-6 py-12 text-center`,children:[(0,H.jsx)(zs,{size:`lg`}),(0,H.jsx)(`h2`,{className:`text-lg font-semibold`,children:e(`welcome.fetchingTitle`)}),(0,H.jsx)(`p`,{className:`max-w-sm text-sm text-[var(--c-text-muted)]`,children:e(`welcome.fetchingHint`)})]}):d.length===0&&Oe&&pe&&i.length>0?(0,H.jsxs)(`div`,{className:`card flex flex-col items-center gap-3 px-6 py-12 text-center`,children:[(0,H.jsx)(`h2`,{className:`text-lg font-semibold`,children:e(`items.allReadTitle`)}),(0,H.jsx)(`p`,{className:`max-w-sm text-sm text-[var(--c-text-muted)]`,children:e(`items.allReadHint`)}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>ue(!1),className:`btn-secondary mt-1`,children:e(`items.all`)})]}):d.length===0?(0,H.jsx)(`p`,{style:{color:`var(--c-text-muted)`},children:e(de&&!me?`items.noSaved`:me?`items.noResults`:`items.noItems`)}):k===`newspaper`?(0,H.jsx)(Cu,{items:d,onOpen:Le,onBookmark:Ke,onRead:Ge}):(0,H.jsx)(`ul`,{className:`flex flex-col gap-4 sm:gap-5 animate-page-fade`,children:d.map(t=>{let n=t.published_at?new Date(t.published_at):null;return(0,H.jsx)(`li`,{onClick:()=>Le(t),className:`card overflow-hidden p-4 sm:p-0 transition-colors duration-150 hover:bg-[var(--c-surface-hover)] hover:border-[var(--c-blue3)]/60 cursor-pointer group/card`,style:{opacity:t.read?.6:1},children:(0,H.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-stretch justify-between gap-3 sm:gap-0`,children:[t.image_url&&(0,H.jsx)(`div`,{className:`order-first w-[calc(100%+2rem)] -mx-4 -mt-4 sm:m-0 sm:w-52 sm:min-w-52 h-48 sm:h-auto sm:self-stretch overflow-hidden shrink-0 border-b sm:border-b-0 sm:border-r bg-[var(--c-bg)] group transition-opacity hover:opacity-90 block`,style:{borderColor:`var(--c-border)`},children:(0,H.jsx)(`img`,{src:t.image_url,alt:``,className:`w-full h-full object-cover group-hover:scale-105 transition-transform duration-200`,loading:`lazy`,onError:e=>{let t=e.currentTarget.parentElement;t&&(t.style.display=`none`)}})}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1 sm:p-5 sm:pr-3 flex flex-col justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`mb-3 flex min-w-0 items-center gap-2 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:[(0,H.jsx)(Ks,{feedId:t.feed_id,iconUrl:t.feed_icon_url,siteUrl:t.feed_site_url,feedUrl:t.feed_url,articleUrl:t.link,className:`w-3.5 h-3.5 rounded-xs shrink-0 object-contain`}),(0,H.jsx)(`span`,{className:`truncate`,children:t.feed_title})]}),(0,H.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-[var(--c-text)]`,children:t.title}),(0,H.jsx)(vu,{item:t,className:`mt-3 text-sm leading-relaxed line-clamp-3 text-[var(--c-text-muted)]`})]}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-xs pt-5`,style:{color:`var(--c-text-muted)`},children:[(0,H.jsx)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1.5 min-w-0`,children:n&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,H.jsx)(`line`,{x1:`16`,y1:`2`,x2:`16`,y2:`6`}),(0,H.jsx)(`line`,{x1:`8`,y1:`2`,x2:`8`,y2:`6`}),(0,H.jsx)(`line`,{x1:`3`,y1:`10`,x2:`21`,y2:`10`})]}),(0,H.jsx)(`span`,{children:Ze.format(n)})]}),(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`polyline`,{points:`12 6 12 12 16 14`})]}),(0,H.jsx)(`span`,{children:Qe.format(n)})]})]})}),(0,H.jsxs)(`div`,{className:`flex sm:hidden items-center gap-2 shrink-0`,onClick:e=>e.stopPropagation(),children:[(0,H.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),Ke(t)},title:t.bookmarked?e(`items.unbookmark`):e(`items.bookmark`),"aria-label":t.bookmarked?e(`items.unbookmark`):e(`items.bookmark`),className:`w-8 h-8 rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer ${t.bookmarked?`bg-amber-500/15 border-amber-500/40 text-amber-500`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-amber-500 hover:border-amber-500/30`}`,children:(0,H.jsx)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:t.bookmarked?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),Ge(t)},title:t.read?e(`items.markUnread`):e(`items.markRead`),"aria-label":t.read?e(`items.markUnread`):e(`items.markRead`),className:`w-8 h-8 rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer ${t.read?`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:border-[var(--c-blue3)]`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-blue1)] hover:border-[var(--c-blue3)]`}`,children:(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 24 24`,fill:t.read?`none`:`currentColor`,stroke:`currentColor`,strokeWidth:`2.2`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})})})]})]})]}),(0,H.jsxs)(`div`,{className:`hidden sm:flex items-center gap-2 pt-5 pr-5 shrink-0 self-start`,onClick:e=>e.stopPropagation(),children:[(0,H.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),Ke(t)},title:t.bookmarked?e(`items.unbookmark`):e(`items.bookmark`),"aria-label":t.bookmarked?e(`items.unbookmark`):e(`items.bookmark`),className:`w-9 h-9 rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer ${t.bookmarked?`bg-amber-500/15 border-amber-500/40 text-amber-500`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-amber-500 hover:border-amber-500/30`}`,children:(0,H.jsx)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:t.bookmarked?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),Ge(t)},title:t.read?e(`items.markUnread`):e(`items.markRead`),"aria-label":t.read?e(`items.markUnread`):e(`items.markRead`),className:`w-9 h-9 rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer ${t.read?`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:border-[var(--c-blue3)]`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-blue1)] hover:border-[var(--c-blue3)]`}`,children:(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 24 24`,fill:t.read?`none`:`currentColor`,stroke:`currentColor`,strokeWidth:`2.2`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})})})]})]})},t.id)})}),!h&&d.length>0&&(S||b)&&(b?(0,H.jsx)(`button`,{type:`button`,onClick:()=>{Ne()},className:`btn-secondary self-center`,children:e(`common.retry`)}):(0,H.jsx)(`div`,{ref:Fe,className:`flex min-h-12 items-center justify-center`,children:v&&(0,H.jsx)(zs,{size:`sm`})})),(0,H.jsx)(mu,{item:D,isOpen:!!D,onClose:Re,onToggleBookmark:Ke,onToggleRead:Ge,onNext:He,onPrevious:Ue,onItemUpdated:tt,hasNext:Be,hasPrev:Ve})]});return(0,H.jsx)(Ou,{disabled:p||!c||!!D||ge,onRefresh:Xe,children:nt})}function Iu(e,t){let n=Math.min(e,t);return{sx:Math.round((e-n)/2),sy:Math.round((t-n)/2),size:n}}async function Lu(e){let t=await createImageBitmap(e);try{let{sx:e,sy:n,size:r}=Iu(t.width,t.height),i=document.createElement(`canvas`);i.width=256,i.height=256;let a=i.getContext(`2d`);if(!a)throw Error(`canvas_unavailable`);return a.fillStyle=`#ffffff`,a.fillRect(0,0,256,256),a.imageSmoothingQuality=`high`,a.drawImage(t,e,n,r,r,0,0,256,256),await new Promise((e,t)=>{i.toBlob(n=>n?e(n):t(Error(`encode_failed`)),`image/jpeg`,.88)})}finally{t.close()}}function Ru({title:e,description:t,children:n,footer:r}){return(0,H.jsxs)(`section`,{className:`card`,children:[(e||t)&&(0,H.jsxs)(`header`,{className:`px-5 pt-5 pb-1 sm:px-6`,children:[e&&(0,H.jsx)(`h3`,{className:`text-base font-semibold`,children:e}),t&&(0,H.jsx)(`p`,{className:`mt-1 text-sm text-[var(--c-text-muted)]`,children:t})]}),(0,H.jsx)(`div`,{className:`divide-y divide-[var(--c-border)]`,children:n}),r&&(0,H.jsx)(`footer`,{className:`flex flex-wrap items-center justify-end gap-3 border-t border-[var(--c-border)] px-5 py-4 sm:px-6`,children:r})]})}function zu({label:e,hint:t,htmlFor:n,children:r,stacked:i=!1,inline:a=!1}){return(0,H.jsxs)(`div`,{className:`flex gap-3 px-5 py-4 sm:px-6 ${i?`flex-col`:a?`flex-row items-center justify-between gap-4 sm:gap-6`:`flex-col sm:flex-row sm:items-center sm:justify-between sm:gap-6`}`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`label`,{htmlFor:n,className:`text-sm font-medium`,children:e}),t&&(0,H.jsx)(`p`,{className:`mt-0.5 text-sm text-[var(--c-text-muted)]`,children:t})]}),r&&(0,H.jsx)(`div`,{className:i?``:`shrink-0`,children:r})]})}function Bu({children:e}){return(0,H.jsx)(`div`,{className:`px-5 py-4 sm:px-6`,children:e})}function Vu({id:e,checked:t,onChange:n,label:r}){return(0,H.jsxs)(`label`,{className:`relative inline-flex cursor-pointer items-center`,children:[(0,H.jsx)(`input`,{id:e,type:`checkbox`,className:`peer sr-only`,checked:t,onChange:e=>n(e.target.checked),"aria-label":r}),(0,H.jsx)(`span`,{className:`h-6 w-11 rounded-full bg-[var(--c-border)] transition-colors peer-checked:bg-[var(--c-blue1)] peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-[var(--c-blue3)] after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white after:shadow-sm after:transition-transform after:content-[''] peer-checked:after:translate-x-5`})]})}function Hu({message:e}){return e?(0,H.jsx)(`p`,{role:`status`,className:`text-sm ${e.type===`error`?`text-danger`:`text-[var(--c-green3)]`}`,children:e.text}):null}function Uu({title:e,description:t}){return(0,H.jsxs)(`div`,{className:`mb-5`,children:[(0,H.jsx)(`h2`,{className:`text-xl font-semibold`,children:e}),t&&(0,H.jsx)(`p`,{className:`mt-1 text-sm text-[var(--c-text-muted)]`,children:t})]})}var Wu=o(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),Gu=o((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),Ku=o((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),qu=o(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),Ju=o(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),Yu=o((e=>{var t=Gu().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),Xu=o((e=>{var t=Gu().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),Y=o((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),Zu=o((e=>{var t=Ku(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),X=o((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),Z=o((e=>{var t=X();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),Q=o(((e,t)=>{var n=Z();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),Qu=o((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),$u=o((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
16
- ]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^[0-9]+$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),ed=o((e=>{var t=Qu(),n=$u();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),td=o((e=>{var t=Gu(),n=Zu(),r=Ku(),i=ed(),a=Qu(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),nd=o((e=>{var t=Gu(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),rd=o(((e,t)=>{var n=ed();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),id=o(((e,t)=>{var n=ed(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t=0;for(;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),ad=o(((e,t)=>{var n=ed();function r(e){this.mode=n.BYTE,this.data=typeof e==`string`?new TextEncoder().encode(e):new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),od=o(((e,t)=>{var n=ed(),r=Gu();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t=0;for(;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
17
- Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),sd=o(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),cd=o((e=>{var t=ed(),n=rd(),r=id(),i=ad(),a=od(),o=$u(),s=Gu(),c=sd();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
18
- Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),ld=o((e=>{var t=Gu(),n=Ku(),r=qu(),i=Ju(),a=Yu(),o=Xu(),s=Y(),c=Zu(),l=Q(),u=td(),d=nd(),f=ed(),p=cd();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return x(a,e,n)}function x(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function S(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
15
+ `).map((e,t)=>(0,H.jsx)(`p`,{children:e},t))}):(0,H.jsx)(`p`,{className:`text-[var(--c-text-muted)] italic`,children:u(`items.noItems`)}),(0,H.jsxs)(`div`,{className:`mt-12 pt-6 border-t border-[var(--c-border)]/60 flex items-center justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:o,disabled:!l,title:u(`reader.previous`),"aria-label":u(`reader.previous`),className:`w-10 h-10 rounded-xl border border-[var(--c-border)] flex items-center justify-center text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/40 active:scale-95 disabled:opacity-30 disabled:cursor-not-allowed transition-all cursor-pointer`,children:(0,H.jsx)(`svg`,{className:`w-5 h-5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polyline`,{points:`15 18 9 12 15 6`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:a,disabled:!c,title:u(`reader.next`),"aria-label":u(`reader.next`),className:`w-10 h-10 rounded-xl border border-[var(--c-border)] flex items-center justify-center text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/40 active:scale-95 disabled:opacity-30 disabled:cursor-not-allowed transition-all cursor-pointer`,children:(0,H.jsx)(`svg`,{className:`w-5 h-5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polyline`,{points:`9 18 15 12 9 6`})})})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[A&&(!te||e.full_content_html)&&(0,H.jsx)(`button`,{type:`button`,onClick:re,disabled:y,title:u(x?`reader.togglePreview`:`reader.toggleFullText`),"aria-label":u(x?`reader.togglePreview`:`reader.toggleFullText`),className:`w-10 h-10 rounded-xl border flex items-center justify-center transition-all active:scale-95 cursor-pointer ${x?`bg-[var(--c-blue1)]/15 border-[var(--c-blue1)]/40 text-[var(--c-blue1)]`:`border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/40`}`,children:y?(0,H.jsx)(`svg`,{className:`w-4 h-4 animate-spin text-[var(--c-blue1)]`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,strokeDasharray:`32`,strokeDashoffset:`12`})}):(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z`}),(0,H.jsx)(`path`,{d:`M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z`})]})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>r(e),title:e.bookmarked?u(`reader.unbookmark`):u(`reader.bookmark`),"aria-label":e.bookmarked?u(`reader.unbookmark`):u(`reader.bookmark`),className:`w-10 h-10 rounded-xl border flex items-center justify-center transition-all active:scale-95 cursor-pointer ${e.bookmarked?`bg-amber-500/15 border-amber-500/40 text-amber-500`:`border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-amber-500 hover:border-amber-500/30`}`,children:(0,H.jsx)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:e.bookmarked?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>i(e),title:e.read?u(`reader.markUnread`):u(`reader.markRead`),"aria-label":e.read?u(`reader.markUnread`):u(`reader.markRead`),className:`w-10 h-10 rounded-xl border flex items-center justify-center transition-all active:scale-95 cursor-pointer ${e.read?`border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)]`:`border-[var(--c-border)] text-[var(--c-blue1)] hover:border-[var(--c-blue3)]`}`,children:(0,H.jsx)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:e.read?`none`:`currentColor`,stroke:`currentColor`,strokeWidth:`2.2`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:async()=>{if(A)try{await navigator.clipboard.writeText(A),v(!0),setTimeout(()=>v(!1),2e3)}catch{}},title:u(g?`reader.linkCopied`:`reader.copyLink`),"aria-label":u(`reader.copyLink`),className:`w-10 h-10 rounded-xl border border-[var(--c-border)] flex items-center justify-center text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/40 transition-all active:scale-95 cursor-pointer relative`,children:g?(0,H.jsx)(`svg`,{className:`w-4 h-4 text-emerald-500`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}):(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),(0,H.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]})}),A&&(0,H.jsx)(`a`,{href:A,target:`_blank`,rel:`noreferrer noopener`,title:u(`reader.openOriginal`),"aria-label":u(`reader.openOriginal`),className:`w-10 h-10 rounded-xl border border-[var(--c-border)] flex items-center justify-center text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:bg-[var(--c-border)]/40 transition-all active:scale-95`,children:(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,H.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,H.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]})})]})]})]})})]})]})]}),document.body)}var hu=650;function gu(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content.querySelectorAll(`script, style, noscript, template, svg, [hidden], [aria-hidden='true']`).forEach(e=>e.remove()),t.content.querySelectorAll(`p, div, li, br, blockquote, section, article, h1, h2, h3, h4, h5, h6`).forEach(e=>e.after(` `)),t.content.textContent?.replace(/\s+/g,` `).trim()??``}function _u(e){let t=e.full_content_html?.trim()?gu(e.full_content_html):``,n=!t&&e.content_html?.trim()?gu(e.content_html):``,r=e.content_snippet?.replace(/\s+/g,` `).trim()??``,i=t||(n.length>=r.length?n:r);return i?i.length>hu?`${i.slice(0,hu).trimEnd()}…`:i:null}function vu({item:e,className:t}){let n=(0,_.useMemo)(()=>_u(e),[e]);return n?(0,H.jsx)(`p`,{className:t,children:n}):null}function yu(e){let t=0,n=-5;return e.map((e,r)=>{let i=/^https?:\/\//i.test(e.image_url??``),a=(e.content_snippet?.trim().length??0)>=220,o=(i||a)&&r-n>=5&&t<=1;return t=(t+(o?2:1))%3,o&&(n=r),o})}function bu(e){let t=e.map(()=>!1),n=[],r=0;return e.forEach((i,a)=>{n.push(a),r+=i?2:1,r===3&&(n.some(t=>e[t])&&n.forEach(n=>{t[n]=!e[n]}),n=[],r=0)}),t}function xu({url:e,featured:t}){let[n,r]=(0,_.useState)(`loading`);return!e||!/^https?:\/\//i.test(e)?null:(0,H.jsx)(`div`,{className:n===`hidden`?`hidden`:`overflow-hidden border-b border-[var(--c-border)] bg-[var(--c-bg)]`,children:(0,H.jsx)(`img`,{src:e,alt:``,loading:`lazy`,className:`w-full object-cover transition-transform duration-300 group-hover:scale-[1.025] ${t?`aspect-[3/2] lg:aspect-[16/9]`:`aspect-[3/2]`} ${n===`visible`?`opacity-100`:`opacity-0`}`,onLoad:e=>{let{naturalWidth:n,naturalHeight:i}=e.currentTarget;r(n>=(t?400:160)&&i>=(t?220:100)?`visible`:`hidden`)},onError:()=>r(`hidden`)})})}function Su({item:e,featured:t,besideFeature:n,onOpen:r,onBookmark:i,onRead:a}){let{t:o,i18n:s}=L(),c=e.published_at?new Date(e.published_at):null,l=c&&!Number.isNaN(c.getTime())?c:null,u=l?new Intl.DateTimeFormat(s.resolvedLanguage,{dateStyle:`medium`}).format(l):null,d=l?new Intl.DateTimeFormat(s.resolvedLanguage,{timeStyle:`short`}).format(l):null;return(0,H.jsx)(`li`,{className:t?`lg:col-span-2`:``,children:(0,H.jsxs)(`article`,{className:`card group relative flex h-full flex-col overflow-hidden transition-colors duration-150 hover:border-[var(--c-blue3)] hover:bg-[var(--c-surface-hover)]`,style:{opacity:e.read?.65:1},children:[(0,H.jsx)(`button`,{type:`button`,className:`absolute inset-0 z-10 rounded-xl focus-visible:outline-2 focus-visible:outline-offset-[-3px] focus-visible:outline-[var(--c-blue3)]`,"aria-label":e.title||e.feed_title||o(`items.title`),onClick:()=>r(e)}),(0,H.jsx)(xu,{url:e.image_url,featured:t},e.image_url??``),(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col ${t?`p-4 sm:p-5 lg:p-6`:`p-4 sm:p-5`}`,children:[(0,H.jsxs)(`div`,{className:`mb-3 flex min-w-0 items-center gap-2 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:[(0,H.jsx)(Ks,{feedId:e.feed_id,iconUrl:e.feed_icon_url,siteUrl:e.feed_site_url,feedUrl:e.feed_url,articleUrl:e.link,className:`h-3.5 w-3.5 shrink-0 rounded-xs object-contain`}),(0,H.jsx)(`span`,{className:`truncate`,children:e.feed_title})]}),(0,H.jsx)(`h2`,{className:`text-[var(--c-text)] ${t?`text-lg leading-snug lg:text-2xl lg:leading-tight`:`text-lg leading-snug`} font-semibold`,children:e.title||e.feed_title}),(0,H.jsx)(vu,{item:e,className:`mt-3 text-sm leading-relaxed text-[var(--c-text-muted)] ${t?`line-clamp-3 lg:line-clamp-4`:n?`line-clamp-3 lg:line-clamp-12`:`line-clamp-3`}`}),(0,H.jsxs)(`div`,{className:`pointer-events-none relative z-20 mt-auto flex flex-wrap items-center gap-x-3 gap-y-2 pt-5 text-xs text-[var(--c-text-muted)]`,children:[u&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,title:d??void 0,children:[(0,H.jsxs)(`svg`,{className:`h-3.5 w-3.5 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`18`,rx:`2`}),(0,H.jsx)(`path`,{d:`M8 2v4M16 2v4M3 10h18`})]}),u]}),d&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsxs)(`svg`,{className:`h-3.5 w-3.5 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`path`,{d:`M12 6v6l4 2`})]}),d]}),(0,H.jsxs)(`div`,{className:`pointer-events-auto ml-auto flex items-center gap-1.5`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>i(e),title:e.bookmarked?o(`items.unbookmark`):o(`items.bookmark`),"aria-label":e.bookmarked?o(`items.unbookmark`):o(`items.bookmark`),className:`grid h-8 w-8 place-items-center rounded-lg border transition-colors ${e.bookmarked?`border-amber-500/40 bg-amber-500/15 text-amber-500`:`border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-amber-500`}`,children:(0,H.jsx)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:e.bookmarked?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>a(e),title:e.read?o(`items.markUnread`):o(`items.markRead`),"aria-label":e.read?o(`items.markUnread`):o(`items.markRead`),className:`grid h-8 w-8 place-items-center rounded-lg border border-[var(--c-border)] transition-colors ${e.read?`text-[var(--c-text-muted)]`:`text-[var(--c-blue3)]`}`,children:(0,H.jsx)(`svg`,{className:`h-3.5 w-3.5`,viewBox:`0 0 24 24`,fill:e.read?`none`:`currentColor`,stroke:`currentColor`,strokeWidth:`2.2`,"aria-hidden":`true`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})})})]})]})]})]})})}function Cu({items:e,onOpen:t,onBookmark:n,onRead:r}){let i=(0,_.useMemo)(()=>yu(e),[e]),a=(0,_.useMemo)(()=>bu(i),[i]);return(0,H.jsx)(`ul`,{className:`grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 sm:gap-5 animate-page-fade`,children:e.map((e,o)=>(0,H.jsx)(Su,{item:e,featured:i[o],besideFeature:a[o],onOpen:t,onBookmark:n,onRead:r},e.id))})}var wu=68,Tu=92,Eu=`input, select, textarea, [contenteditable='true'], [data-no-pull]`;function Du(){let e=e=>{e.preventDefault(),e.stopPropagation()};window.addEventListener(`click`,e,{capture:!0,once:!0}),window.setTimeout(()=>window.removeEventListener(`click`,e,{capture:!0}),400)}function Ou({children:e,disabled:t=!1,onRefresh:n}){let{t:r}=L(),i=(0,_.useRef)(null),a=(0,_.useRef)(0),[o,s]=(0,_.useState)(0),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!1),m=(0,_.useCallback)(()=>{u||(p(!1),d(!0),s(56),n().catch(()=>p(!0)).finally(()=>{d(!1),s(0)}))},[u,n]);(0,_.useEffect)(()=>{let e=i.current;if(!e)return;let n=null;function r(){n=null,a.current=0,l(!1),s(0)}function o(e){t||u||e.touches.length!==1||window.scrollY>1||!window.matchMedia(`(any-pointer: coarse)`).matches||document.body.style.overflow===`hidden`||e.target.closest(Eu)||(n={x:e.touches[0].clientX,y:e.touches[0].clientY})}function c(e){if(!n||e.touches.length!==1)return;let t=e.touches[0].clientX-n.x,i=e.touches[0].clientY-n.y;if(window.scrollY>1||Math.abs(t)>Math.abs(i)){r();return}if(i<=0){a.current=0,s(0);return}e.preventDefault();let o=Math.min(Tu,i*.72);a.current=o,l(!0),s(o)}function d(){if(!n)return;let e=a.current>=wu;a.current>8&&Du(),r(),e&&m()}return e.addEventListener(`touchstart`,o,{passive:!0}),e.addEventListener(`touchmove`,c,{passive:!1}),e.addEventListener(`touchend`,d),e.addEventListener(`touchcancel`,r),()=>{e.removeEventListener(`touchstart`,o),e.removeEventListener(`touchmove`,c),e.removeEventListener(`touchend`,d),e.removeEventListener(`touchcancel`,r)}},[t,u,n,m]);let h=u?1:Math.min(1,o/wu);return(0,H.jsxs)(`div`,{ref:i,children:[(0,H.jsx)(`button`,{type:`button`,className:`sr-only focus:not-sr-only sm:hidden`,onClick:m,disabled:t||u,children:r(`items.refresh`)}),(0,H.jsx)(`div`,{"aria-hidden":`true`,className:`relative flex items-center justify-center overflow-hidden`,style:{height:o,transition:c?`none`:`height 220ms ease-out`},children:(0,H.jsx)(`div`,{className:`flex h-10 w-10 items-center justify-center rounded-full border border-[var(--c-border)] bg-[var(--c-surface)] text-[var(--c-text)] shadow-sm`,style:{opacity:Math.min(1,o/30),transform:`scale(${.65+h*.35})`},children:(0,H.jsxs)(`svg`,{className:`h-5 w-5 ${u?`animate-spin motion-reduce:animate-none`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,style:u?void 0:{transform:`rotate(${h*270}deg)`},children:[(0,H.jsx)(`path`,{d:`M18 7a8 8 0 1 0 2 5`,pathLength:`100`,strokeDasharray:`${h*100} 100`}),(0,H.jsx)(`path`,{d:`M18 3v4h-4`,opacity:h})]})})}),u&&(0,H.jsx)(`span`,{className:`sr-only`,role:`status`,children:r(`items.refreshing`)}),f&&(0,H.jsx)(`p`,{className:`mb-3 text-center text-sm text-[var(--c-danger)]`,role:`alert`,children:r(`items.refreshFailed`)}),e]})}function ku(){let{user:e}=so(),t=Go(Yo()),[n,r]=(0,_.useState)(!1),i=!!e?.intro_dismissed_at;return(0,_.useEffect)(()=>{let n=!0;if(r(!1),t&&e&&i)return Promise.resolve(!t.applies||t.applies({id:e.id,email:e.email,display_name:e.display_name??null})).then(e=>{n&&r(e===!0)}).catch(()=>{n&&r(!1)}),()=>{n=!1}},[t?.mount,t?.applies,e?.id,i]),!t||!n?null:(0,H.jsx)(Ls,{name:`articles-notice`,mount:t.mount})}function Au(){let{t:e}=L(),{user:t,setCurrentUser:n}=so(),[r,i]=(0,_.useState)(!1);if(!t||t.intro_dismissed_at)return null;async function a(){i(!0);try{n(await V.dismissIntro())}catch{i(!1)}}let o=[{key:`views`,className:`hidden sm:flex`,icon:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2`}),(0,H.jsx)(`path`,{d:`M18 14h-8`}),(0,H.jsx)(`path`,{d:`M15 18h-5`}),(0,H.jsx)(`path`,{d:`M10 6h8v4h-8V6Z`})]})},{key:`unread`,solid:!0,icon:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})},{key:`star`,icon:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})},{key:`folders`,icon:(0,H.jsx)(`path`,{d:`M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z`})}];return(0,H.jsxs)(`section`,{className:`card animate-fade-in flex flex-col gap-5 p-5 sm:p-7 shadow-xs`,"aria-labelledby":`intro-title`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h2`,{id:`intro-title`,className:`text-xl sm:text-2xl font-bold tracking-tight text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:e(`intro.title`)}),(0,H.jsx)(`p`,{className:`mt-0.5 text-xs sm:text-sm leading-relaxed text-[var(--c-text-muted)]`,children:e(`intro.subtitle`)})]}),(0,H.jsx)(`button`,{type:`button`,onClick:a,disabled:r,"aria-label":e(`common.close`),className:`shrink-0 rounded-lg p-1 text-[var(--c-text-muted)] hover:bg-[var(--c-surface-hover)] hover:text-[var(--c-text)] cursor-pointer`,children:(0,H.jsx)(sc,{})})]}),(0,H.jsx)(`ul`,{className:`grid gap-3 sm:grid-cols-2`,children:o.map(t=>(0,H.jsxs)(`li`,{className:`flex items-start gap-3.5 rounded-2xl border border-[var(--c-border)]/80 bg-[var(--c-surface-hover)]/25 p-4 ${t.className??``}`,children:[(0,H.jsx)(`div`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-[var(--c-border)] bg-[var(--c-surface)] text-[var(--c-text)]`,children:(0,H.jsx)(`svg`,{className:t.solid?`h-3.5 w-3.5`:`h-4 w-4`,viewBox:`0 0 24 24`,fill:t.solid?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:t.solid?2.2:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:t.icon})}),(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h3`,{className:`text-sm sm:text-base font-bold text-[var(--c-text)]`,style:{fontFamily:`Manrope, sans-serif`},children:e(`intro.${t.key}Title`)}),(0,H.jsx)(`p`,{className:`mt-0.5 text-xs sm:text-sm leading-relaxed text-[var(--c-text-muted)]`,children:e(`intro.${t.key}Text`)})]})]},t.key))}),(0,H.jsx)(`button`,{type:`button`,onClick:a,disabled:r,className:`btn-primary self-start`,children:e(`intro.done`)})]})}var ju=50;function Mu(){return(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,H.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})}var Nu=`(max-width: 639px)`;function Pu(){return(0,_.useSyncExternalStore)(e=>{let t=window.matchMedia(Nu);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},()=>window.matchMedia(Nu).matches)}function Fu(){let{t:e,i18n:t}=L(),[n,r]=Fi(),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(!1),{syncAllowed:c}=Vs(),[l,u]=(0,_.useState)([]),[d,f]=(0,_.useState)([]),[p,m]=(0,_.useState)(!0),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)(!1),w=(0,_.useRef)(0),T=(0,_.useRef)(0),E=(0,_.useRef)(!1),[D,ee]=(0,_.useState)(null),[O,te]=(0,_.useState)(()=>{try{return localStorage.getItem(`feedkeeper_items_view`)===`newspaper`?`newspaper`:`list`}catch{return`list`}}),k=Pu()?`newspaper`:O;function ne(e){if(e!==O){Wa(),te(e),window.scrollTo({top:0,behavior:`instant`});try{localStorage.setItem(`feedkeeper_items_view`,e)}catch{}}}let A=`feedkeeper_filter_scope`,re=`feedkeeper_filter_unread`,ie=`feedkeeper_filter_bookmarked`,ae=n.get(`article`),oe=(()=>{let e=n.get(`feed`);if(e)return`feed:${e}`;let t=n.get(`folder`);if(t)return`folder:${t}`;try{let e=localStorage.getItem(A);if(e)return e}catch{}return``})(),se=(()=>{try{let e=localStorage.getItem(re);if(e!==null)return e===`true`}catch{}return!0})(),ce=(()=>{if(n.get(`saved`)===`1`)return!0;if(n.get(`article`))return!1;try{let e=localStorage.getItem(ie);if(e!==null)return e===`true`}catch{}return!1})(),[j,le]=(0,_.useState)(oe),[M,ue]=(0,_.useState)(se),[de,fe]=(0,_.useState)(ce),pe=M&&!de,[me,he]=(0,_.useState)(``),[ge,_e]=(0,_.useState)(!1),N=(0,_.useRef)(null),P=(0,_.useRef)(null),ve=(0,_.useRef)(null),[F,ye]=(0,_.useState)(61),[be,xe]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let e=document.querySelector(`[data-app-header]`);if(!e)return;let t=new ResizeObserver(()=>ye(e.getBoundingClientRect().height));return t.observe(e),()=>t.disconnect()},[]),(0,_.useEffect)(()=>{function e(){let e=ve.current?.getBoundingClientRect().top;xe(window.scrollY>0&&e!==void 0&&e<=F+1)}return e(),window.addEventListener(`scroll`,e,{passive:!0}),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e),window.removeEventListener(`resize`,e)}},[F]),(0,_.useEffect)(()=>{ge&&N.current?.focus()},[ge]),(0,_.useEffect)(()=>{let e=window.matchMedia(`(min-width: 640px)`),t=()=>{e.matches&&_e(!1)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);function I(){_e(!1),requestAnimationFrame(()=>P.current?.focus())}function Se(e){Wa(),he(e)}function Ce(){Wa(),ue(e=>{let t=!e;try{localStorage.setItem(re,String(t))}catch{}return t})}function we(){Wa(),fe(e=>{let t=!e;try{localStorage.setItem(ie,String(t))}catch{}return t})}(0,_.useEffect)(()=>{if(p||E.current)return;let e=Ha(),t=requestAnimationFrame(()=>{e>0&&window.scrollTo({top:e,behavior:`instant`}),E.current=!0});return()=>cancelAnimationFrame(t)},[p]),(0,_.useEffect)(()=>{function e(){E.current&&document.body.style.overflow!==`hidden`&&Ua(window.scrollY)}return window.addEventListener(`scroll`,e,{passive:!0}),()=>{E.current&&document.body.style.overflow!==`hidden`&&Ua(window.scrollY),window.removeEventListener(`scroll`,e)}},[]),(0,_.useEffect)(()=>{let e=n.get(`feed`),t=n.get(`folder`);if(e){let t=`feed:${e}`;t!==j&&Wa(),le(t);try{localStorage.setItem(A,t)}catch{}}else if(t){let e=`folder:${t}`;e!==j&&Wa(),le(e);try{localStorage.setItem(A,e)}catch{}}else if(oe&&!n.toString()){let e=new URLSearchParams(n);oe.startsWith(`feed:`)?e.set(`feed`,oe.slice(5)):oe.startsWith(`folder:`)&&e.set(`folder`,oe.slice(7)),r(e,{replace:!0})}},[n]);function Te(e){Wa(),le(e);try{e?localStorage.setItem(A,e):localStorage.removeItem(A)}catch{}let t=new URLSearchParams(n);t.delete(`feed`),t.delete(`folder`),e.startsWith(`feed:`)?t.set(`feed`,e.slice(5)):e.startsWith(`folder:`)&&t.set(`folder`,e.slice(7)),r(t,{replace:!0})}(0,_.useEffect)(()=>{Promise.all([V.listFeeds(),V.listFolders().catch(()=>({folders:[]}))]).then(([e,t])=>{a(e),u(t.folders),s(!0)}).catch(e=>console.error(`Failed to load initial feeds/folders:`,e))},[]);let Ee=j.startsWith(`feed:`)?Number(j.slice(5)):void 0,De=j.startsWith(`folder:`)?Number(j.slice(7)):void 0,Oe=!me&&!de&&Ee===void 0&&De===void 0,ke=Oe&&i.length>0&&i.every(e=>!e.last_polled_at);async function Ae(){try{let[e,t]=await Promise.all([V.listFeeds(),V.listFolders().catch(()=>({folders:[]}))]);return e.length===0&&(n.has(`folder`)||n.has(`feed`))&&(r({},{replace:!0}),le(``)),a(e),u(t.folders),s(!0),e}catch(e){return console.error(`Failed to reload feeds:`,e),null}}async function je(){await Ae(),await Me(),eo()}async function Me(){let e=++w.current;m(!0),g(!1),x(!1),y(!1);try{let t=await V.listItems({feedId:Ee,folderId:De,unreadOnly:pe,bookmarkedOnly:de,search:me||void 0,limit:ju});e===w.current&&(f(t),T.current=t.length,C(t.length===ju))}catch(t){e===w.current&&(console.error(`Failed to load items:`,t),g(!0))}finally{e===w.current&&m(!1)}}async function Ne(){if(v||!S)return;let e=w.current;y(!0),x(!1);try{let t=await V.listItems({feedId:Ee,folderId:De,unreadOnly:pe,bookmarkedOnly:de,search:me||void 0,limit:ju,offset:T.current});e===w.current&&(T.current+=t.length,f(e=>{let n=new Set(e.map(e=>e.id));return[...e,...t.filter(e=>!n.has(e.id))]}),C(t.length===ju))}catch(t){e===w.current&&(console.error(`Failed to load more items:`,t),x(!0))}finally{e===w.current&&y(!1)}}let Pe=(0,_.useRef)(Ne);Pe.current=Ne;let Fe=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=Fe.current;if(!e||!S||b||v||h)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&Pe.current()},{rootMargin:`600px 0px`});return t.observe(e),()=>t.disconnect()},[S,b,v,h,d.length]),(0,_.useEffect)(()=>{f([]),m(!0),C(!1),y(!1);let e=setTimeout(()=>{Me()},200);return()=>{clearTimeout(e),w.current++}},[j,M,de,me]),(0,_.useEffect)(()=>{if(!ke)return;let e=0,t=setInterval(()=>{e++,Ae().then(e=>{e?.some(e=>e.last_polled_at)&&Me()}),e>=45&&clearInterval(t)},4e3);return()=>clearInterval(t)},[ke]);let Ie=(0,_.useRef)(null);(0,_.useEffect)(()=>{if(ae){let e=d.find(e=>e.id===Number(ae));ee(e??null),e&&!e.read&&Ie.current!==e.id&&(Ie.current=e.id,V.markRead(e.id).then(eo).catch(()=>{}),f(t=>t.map(t=>t.id===e.id?{...t,read:!0}:t)))}else ee(null)},[ae,d]);function Le(e){ee(e),e.read||(V.markRead(e.id).then(eo).catch(()=>{}),f(t=>t.map(t=>t.id===e.id?{...t,read:!0}:t)),ee({...e,read:!0}));let t=new URLSearchParams(n);t.set(`article`,String(e.id)),r(t)}function Re(){ee(null);let e=new URLSearchParams(n);e.delete(`article`),r(e)}let ze=D?d.findIndex(e=>e.id===D.id):-1,Be=ze>=0&&ze<d.length-1,Ve=ze>0;function He(){Be&&Le(d[ze+1])}function Ue(){Ve&&Le(d[ze-1])}async function We(t){try{await t()}catch(t){if(!(t instanceof ga&&t.status===0))throw t;G.error(e(`common.offlineAction`))}}async function Ge(e){let t=!e.read;e.read?await V.markUnread(e.id):await V.markRead(e.id),eo(),f(n=>n.map(n=>n.id===e.id?{...n,read:t}:n)),D?.id===e.id&&ee(e=>e?{...e,read:t}:null)}async function Ke(e){let t=!e.bookmarked;e.bookmarked?await V.unbookmarkItem(e.id):await V.bookmarkItem(e.id),window.setTimeout(()=>void Ra({force:!0}),t?2e4:0),f(n=>de&&!t&&D?.id!==e.id?n.filter(t=>t.id!==e.id):n.map(n=>n.id===e.id?{...n,bookmarked:t}:n)),D?.id===e.id&&ee(e=>e?{...e,bookmarked:t}:null)}async function qe(){await We(async()=>{await V.markAllRead({feedId:Ee,folderId:De}),await Me(),eo()})}let[Je,Ye]=(0,_.useState)(!1);async function Xe(){Ye(!0);try{let t=await V.refreshAllFeeds();await Me(),wc(t,e)}catch{G.error(e(`items.refreshFailed`))}finally{Ye(!1)}}let Ze=new Intl.DateTimeFormat(t.resolvedLanguage,{dateStyle:`medium`}),Qe=new Intl.DateTimeFormat(t.resolvedLanguage,{timeStyle:`short`}),$e=(0,_.useMemo)(()=>{let t=[{value:``,label:e(`items.allFeeds`)}];if(l.length>0)for(let n of l)t.push({value:`folder:${n.id}`,label:n.name,group:e(`feeds.folderGroup`),badge:n.unread_count});for(let n of i)t.push({value:`feed:${n.id}`,label:n.label??n.title??n.url,group:e(`feeds.feedGroup`),badge:n.unread_count});return t},[l,i,e]),et=j?$e.find(e=>e.value===j)?.label??e(`items.title`):e(`items.allFeeds`);function tt(e){f(t=>t.map(t=>t.id===e.id?e:t)),D?.id===e.id&&ee(e)}let nt=(0,H.jsxs)(`div`,{className:`flex flex-col gap-5 sm:gap-6`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-2 sm:gap-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h1`,{className:`sr-only`,children:et}),(0,H.jsx)(Ac,{className:`block`})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 sm:gap-3 min-w-0`,children:[(0,H.jsxs)(`div`,{className:`relative hidden h-11 w-[220px] shrink-0 grid-cols-2 rounded-xl border border-[var(--c-border)] bg-[var(--c-surface)] p-1 sm:grid`,role:`group`,"aria-label":e(`items.viewMode`),children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-y-1 left-1 w-[calc((100%-0.5rem)/2)] rounded-lg border border-[var(--c-mobile-nav-active-border)] bg-[var(--c-mobile-nav-active)] shadow-sm transition-transform duration-300 ease-[cubic-bezier(0.25,1,0.5,1)] motion-reduce:transition-none`,style:{transform:O===`newspaper`?`translateX(100%)`:`translateX(0)`}}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>ne(`list`),title:e(`items.listView`),"aria-label":e(`items.listView`),"aria-pressed":O===`list`,className:`relative z-10 flex h-full min-w-0 items-center justify-center gap-1.5 rounded-lg text-xs sm:text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] ${O===`list`?`text-[var(--c-text)]`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)]`}`,children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4 transition-transform duration-200 motion-reduce:transition-none ${O===`list`?`scale-105`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M8 6h12M8 12h12M8 18h12`}),(0,H.jsx)(`circle`,{cx:`4`,cy:`6`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,H.jsx)(`circle`,{cx:`4`,cy:`12`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,H.jsx)(`circle`,{cx:`4`,cy:`18`,r:`1`,fill:`currentColor`,stroke:`none`})]}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:e(`items.listView`)})]}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>ne(`newspaper`),title:e(`items.newspaperView`),"aria-label":e(`items.newspaperView`),"aria-pressed":O===`newspaper`,className:`relative z-10 flex h-full min-w-0 items-center justify-center gap-1.5 rounded-lg text-xs sm:text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] ${O===`newspaper`?`text-[var(--c-text)]`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)]`}`,children:[(0,H.jsxs)(`svg`,{className:`h-4 w-4 transition-transform duration-200 motion-reduce:transition-none ${O===`newspaper`?`scale-105`:``}`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2`}),(0,H.jsx)(`path`,{d:`M18 14h-8`}),(0,H.jsx)(`path`,{d:`M15 18h-5`}),(0,H.jsx)(`path`,{d:`M10 6h8v4h-8V6Z`})]}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:e(`items.newspaperView`)})]})]}),(0,H.jsx)(`button`,{type:`button`,onClick:Xe,disabled:Je||!c,title:e(c?Je?`items.refreshing`:`items.refresh`:`plan.unavailable`),"aria-label":e(Je?`items.refreshing`:`items.refresh`),className:`btn-secondary hidden h-11 w-11 shrink-0 items-center justify-center p-0! sm:flex`,children:(0,H.jsx)(Zs,{className:`h-5 w-5 ${Je?`animate-spin motion-reduce:animate-none`:``}`})}),(0,H.jsx)(`button`,{type:`button`,onClick:qe,title:e(`feeds.markAllRead`),"aria-label":e(`feeds.markAllRead`),className:`btn-secondary flex h-11 w-11 shrink-0 items-center justify-center p-0!`,children:(0,H.jsx)(`svg`,{className:`h-5 w-5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`M3 12l4 4 6-7M11 16l3 0 7-8`})})})]})]}),(0,H.jsxs)(`div`,{ref:ve,className:`sticky z-20 py-2`,style:{top:F},children:[be&&(0,H.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute -top-px bottom-0 left-1/2 w-screen -translate-x-1/2 border-y border-[var(--c-border)] backdrop-blur-md`,style:{backgroundColor:`color-mix(in srgb, var(--c-surface) 85%, transparent)`}}),(0,H.jsxs)(`div`,{className:`items-toolbar relative z-10 flex items-center gap-2 sm:gap-3 ${ge?`items-toolbar-open`:``}`,children:[(0,H.jsx)(`div`,{className:`items-toolbar-scope min-w-0 flex-1 sm:flex-none sm:w-64`,inert:ge,children:(0,H.jsx)(Hs,{value:j,onChange:Te,options:$e,className:`w-full`,placeholder:e(`items.allFeeds`)})}),(0,H.jsxs)(`div`,{className:`relative hidden sm:block flex-1 min-w-0`,children:[(0,H.jsx)(`input`,{type:`search`,placeholder:e(`items.searchPlaceholder`),"aria-label":e(`items.searchPlaceholder`),className:`input w-full pl-9 pr-3`,value:me,onChange:e=>Se(e.target.value)}),(0,H.jsx)(`span`,{className:`absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-45 text-[var(--c-text-muted)]`,children:(0,H.jsx)(Mu,{})})]}),(0,H.jsxs)(`div`,{className:`items-toolbar-search relative h-[38px] min-w-0 overflow-hidden sm:hidden`,children:[(0,H.jsx)(`button`,{ref:P,type:`button`,onClick:()=>_e(!0),"aria-label":e(`items.searchPlaceholder`),"aria-controls":`mobile-article-search`,"aria-expanded":ge,title:e(`items.searchPlaceholder`),"aria-hidden":ge,tabIndex:ge?-1:0,className:`absolute inset-y-0 left-0 z-10 flex w-[38px] items-center justify-center rounded-lg border transition-opacity duration-150 ${ge?`pointer-events-none opacity-0`:me?`border-[var(--c-blue3)] bg-[var(--c-surface-hover)] text-[var(--c-text)] opacity-100`:`border-[var(--c-border)] bg-[var(--c-surface)] text-[var(--c-text-muted)] opacity-100`}`,children:(0,H.jsx)(Mu,{})}),(0,H.jsxs)(`div`,{className:`flex h-full min-w-0 items-center gap-2 transition-opacity duration-200 ${ge?`opacity-100 delay-75`:`pointer-events-none opacity-0`}`,inert:!ge,children:[(0,H.jsx)(`span`,{className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-[var(--c-text-muted)] opacity-60`,children:(0,H.jsx)(Mu,{})}),(0,H.jsx)(`input`,{id:`mobile-article-search`,ref:N,type:`search`,placeholder:e(`items.searchPlaceholder`),"aria-label":e(`items.searchPlaceholder`),className:`input min-w-0 flex-1 pl-9`,value:me,onChange:e=>Se(e.target.value),onKeyDown:e=>{e.key===`Escape`&&I()}}),(0,H.jsx)(`button`,{type:`button`,onClick:I,"aria-label":e(`common.close`),title:e(`common.close`),className:`w-[38px] h-[38px] rounded-lg border border-[var(--c-border)] bg-[var(--c-surface)] text-[var(--c-text-muted)] flex items-center justify-center shrink-0 cursor-pointer`,children:(0,H.jsxs)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,H.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]})]}),(0,H.jsxs)(`div`,{className:`items-toolbar-filters flex items-center gap-1.5 sm:gap-2 shrink-0`,inert:ge,children:[(0,H.jsx)(`button`,{type:`button`,onClick:we,title:e(de?`items.all`:`items.bookmarkedOnly`),"aria-label":e(`items.bookmarkedOnly`),"aria-pressed":de,className:`w-[38px] h-[38px] rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer ${de?`bg-amber-500/15 border-amber-500/40 text-amber-500`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-amber-500 hover:border-amber-500/30`}`,children:(0,H.jsx)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:de?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:Ce,disabled:de,title:e(de?`items.unreadIgnoredInSaved`:M?`items.all`:`items.unreadOnly`),"aria-label":e(`items.unreadOnly`),"aria-pressed":pe,className:`w-[38px] h-[38px] rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer disabled:cursor-default disabled:opacity-40 ${pe?`bg-[var(--c-surface-hover)] border-[var(--c-blue3)] text-[var(--c-text)] shadow-xs`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:border-[var(--c-blue3)]`}`,children:(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 24 24`,fill:pe?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2.2`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})})})]})]})]}),o&&i.length>0&&!c&&(0,H.jsx)(vc,{}),o&&i.length>0&&!h&&(0,H.jsx)(Au,{}),o&&i.length>0&&!h&&(0,H.jsx)(ku,{}),h?(0,H.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-3`,children:[(0,H.jsx)(`p`,{style:{color:`var(--c-text-muted)`},children:e(`items.loadFailed`)}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>void Me(),className:`btn-secondary`,children:e(`common.retry`)})]}):p&&d.length===0?(0,H.jsx)(zs,{size:`lg`}):d.length===0&&o&&i.length===0?(0,H.jsx)(bc,{onSubscribed:je}):d.length===0&&ke?(0,H.jsxs)(`div`,{role:`status`,className:`card flex flex-col items-center gap-3 px-6 py-12 text-center`,children:[(0,H.jsx)(zs,{size:`lg`}),(0,H.jsx)(`h2`,{className:`text-lg font-semibold`,children:e(`welcome.fetchingTitle`)}),(0,H.jsx)(`p`,{className:`max-w-sm text-sm text-[var(--c-text-muted)]`,children:e(`welcome.fetchingHint`)})]}):d.length===0&&Oe&&pe&&i.length>0?(0,H.jsxs)(`div`,{className:`card flex flex-col items-center gap-3 px-6 py-12 text-center`,children:[(0,H.jsx)(`h2`,{className:`text-lg font-semibold`,children:e(`items.allReadTitle`)}),(0,H.jsx)(`p`,{className:`max-w-sm text-sm text-[var(--c-text-muted)]`,children:e(`items.allReadHint`)}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>ue(!1),className:`btn-secondary mt-1`,children:e(`items.all`)})]}):d.length===0?(0,H.jsx)(`p`,{style:{color:`var(--c-text-muted)`},children:e(de&&!me?`items.noSaved`:me?`items.noResults`:`items.noItems`)}):k===`newspaper`?(0,H.jsx)(Cu,{items:d,onOpen:Le,onBookmark:Ke,onRead:Ge}):(0,H.jsx)(`ul`,{className:`flex flex-col gap-4 sm:gap-5 animate-page-fade`,children:d.map(t=>{let n=t.published_at?new Date(t.published_at):null;return(0,H.jsx)(`li`,{onClick:()=>Le(t),className:`card overflow-hidden p-4 sm:p-0 transition-colors duration-150 hover:bg-[var(--c-surface-hover)] hover:border-[var(--c-blue3)]/60 cursor-pointer group/card`,style:{opacity:t.read?.6:1},children:(0,H.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-stretch justify-between gap-3 sm:gap-0`,children:[t.image_url&&(0,H.jsx)(`div`,{className:`order-first w-[calc(100%+2rem)] -mx-4 -mt-4 sm:m-0 sm:w-52 sm:min-w-52 h-48 sm:h-auto sm:self-stretch overflow-hidden shrink-0 border-b sm:border-b-0 sm:border-r bg-[var(--c-bg)] group transition-opacity hover:opacity-90 block`,style:{borderColor:`var(--c-border)`},children:(0,H.jsx)(`img`,{src:t.image_url,alt:``,className:`w-full h-full object-cover group-hover:scale-105 transition-transform duration-200`,loading:`lazy`,onError:e=>{let t=e.currentTarget.parentElement;t&&(t.style.display=`none`)}})}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1 sm:p-5 sm:pr-3 flex flex-col justify-between`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`mb-3 flex min-w-0 items-center gap-2 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:[(0,H.jsx)(Ks,{feedId:t.feed_id,iconUrl:t.feed_icon_url,siteUrl:t.feed_site_url,feedUrl:t.feed_url,articleUrl:t.link,className:`w-3.5 h-3.5 rounded-xs shrink-0 object-contain`}),(0,H.jsx)(`span`,{className:`truncate`,children:t.feed_title})]}),(0,H.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-[var(--c-text)]`,children:t.title}),(0,H.jsx)(vu,{item:t,className:`mt-3 text-sm leading-relaxed line-clamp-3 text-[var(--c-text-muted)]`})]}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-xs pt-5`,style:{color:`var(--c-text-muted)`},children:[(0,H.jsx)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1.5 min-w-0`,children:n&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,H.jsx)(`line`,{x1:`16`,y1:`2`,x2:`16`,y2:`6`}),(0,H.jsx)(`line`,{x1:`8`,y1:`2`,x2:`8`,y2:`6`}),(0,H.jsx)(`line`,{x1:`3`,y1:`10`,x2:`21`,y2:`10`})]}),(0,H.jsx)(`span`,{children:Ze.format(n)})]}),(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsxs)(`svg`,{className:`w-3.5 h-3.5 shrink-0 opacity-70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`polyline`,{points:`12 6 12 12 16 14`})]}),(0,H.jsx)(`span`,{children:Qe.format(n)})]})]})}),(0,H.jsxs)(`div`,{className:`flex sm:hidden items-center gap-2 shrink-0`,onClick:e=>e.stopPropagation(),children:[(0,H.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),Ke(t)},title:t.bookmarked?e(`items.unbookmark`):e(`items.bookmark`),"aria-label":t.bookmarked?e(`items.unbookmark`):e(`items.bookmark`),className:`w-8 h-8 rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer ${t.bookmarked?`bg-amber-500/15 border-amber-500/40 text-amber-500`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-amber-500 hover:border-amber-500/30`}`,children:(0,H.jsx)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:t.bookmarked?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),Ge(t)},title:t.read?e(`items.markUnread`):e(`items.markRead`),"aria-label":t.read?e(`items.markUnread`):e(`items.markRead`),className:`w-8 h-8 rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer ${t.read?`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:border-[var(--c-blue3)]`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-blue1)] hover:border-[var(--c-blue3)]`}`,children:(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 24 24`,fill:t.read?`none`:`currentColor`,stroke:`currentColor`,strokeWidth:`2.2`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})})})]})]})]}),(0,H.jsxs)(`div`,{className:`hidden sm:flex items-center gap-2 pt-5 pr-5 shrink-0 self-start`,onClick:e=>e.stopPropagation(),children:[(0,H.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),Ke(t)},title:t.bookmarked?e(`items.unbookmark`):e(`items.bookmark`),"aria-label":t.bookmarked?e(`items.unbookmark`):e(`items.bookmark`),className:`w-9 h-9 rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer ${t.bookmarked?`bg-amber-500/15 border-amber-500/40 text-amber-500`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-amber-500 hover:border-amber-500/30`}`,children:(0,H.jsx)(`svg`,{className:`w-4 h-4`,viewBox:`0 0 24 24`,fill:t.bookmarked?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),Ge(t)},title:t.read?e(`items.markUnread`):e(`items.markRead`),"aria-label":t.read?e(`items.markUnread`):e(`items.markRead`),className:`w-9 h-9 rounded-lg border flex items-center justify-center shrink-0 transition-colors cursor-pointer ${t.read?`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-text-muted)] hover:text-[var(--c-text)] hover:border-[var(--c-blue3)]`:`bg-[var(--c-surface)] border-[var(--c-border)] text-[var(--c-blue1)] hover:border-[var(--c-blue3)]`}`,children:(0,H.jsx)(`svg`,{className:`w-3.5 h-3.5`,viewBox:`0 0 24 24`,fill:t.read?`none`:`currentColor`,stroke:`currentColor`,strokeWidth:`2.2`,children:(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`})})})]})]})},t.id)})}),!h&&d.length>0&&(S||b)&&(b?(0,H.jsx)(`button`,{type:`button`,onClick:()=>{Ne()},className:`btn-secondary self-center`,children:e(`common.retry`)}):(0,H.jsx)(`div`,{ref:Fe,className:`flex min-h-12 items-center justify-center`,children:v&&(0,H.jsx)(zs,{size:`sm`})})),(0,H.jsx)(mu,{item:D,isOpen:!!D,onClose:Re,onToggleBookmark:Ke,onToggleRead:Ge,onNext:He,onPrevious:Ue,onItemUpdated:tt,hasNext:Be,hasPrev:Ve})]});return(0,H.jsx)(Ou,{disabled:p||!c||!!D||ge,onRefresh:Xe,children:nt})}function Iu(e,t){let n=Math.min(e,t);return{sx:Math.round((e-n)/2),sy:Math.round((t-n)/2),size:n}}async function Lu(e){let t=await createImageBitmap(e);try{let{sx:e,sy:n,size:r}=Iu(t.width,t.height),i=document.createElement(`canvas`);i.width=256,i.height=256;let a=i.getContext(`2d`);if(!a)throw Error(`canvas_unavailable`);return a.fillStyle=`#ffffff`,a.fillRect(0,0,256,256),a.imageSmoothingQuality=`high`,a.drawImage(t,e,n,r,r,0,0,256,256),await new Promise((e,t)=>{i.toBlob(n=>n?e(n):t(Error(`encode_failed`)),`image/jpeg`,.88)})}finally{t.close()}}function Ru({title:e,description:t,children:n,footer:r}){return(0,H.jsxs)(`section`,{className:`card`,children:[(e||t)&&(0,H.jsxs)(`header`,{className:`px-5 pt-5 pb-1 sm:px-6`,children:[e&&(0,H.jsx)(`h3`,{className:`text-base font-semibold`,children:e}),t&&(0,H.jsx)(`p`,{className:`mt-1 text-sm text-[var(--c-text-muted)]`,children:t})]}),(0,H.jsx)(`div`,{className:`divide-y divide-[var(--c-border)]`,children:n}),r&&(0,H.jsx)(`footer`,{className:`flex flex-wrap items-center justify-end gap-3 border-t border-[var(--c-border)] px-5 py-4 sm:px-6`,children:r})]})}function zu({label:e,hint:t,htmlFor:n,children:r,stacked:i=!1,inline:a=!1}){return(0,H.jsxs)(`div`,{className:`flex gap-3 px-5 py-4 sm:px-6 ${i?`flex-col`:a?`flex-row items-center justify-between gap-4 sm:gap-6`:`flex-col sm:flex-row sm:items-center sm:justify-between sm:gap-6`}`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`label`,{htmlFor:n,className:`text-sm font-medium`,children:e}),t&&(0,H.jsx)(`p`,{className:`mt-0.5 text-sm text-[var(--c-text-muted)]`,children:t})]}),r&&(0,H.jsx)(`div`,{className:i?``:`shrink-0`,children:r})]})}function Bu({children:e}){return(0,H.jsx)(`div`,{className:`px-5 py-4 sm:px-6`,children:e})}function Vu({id:e,checked:t,onChange:n,label:r}){return(0,H.jsxs)(`label`,{className:`relative inline-flex cursor-pointer items-center`,children:[(0,H.jsx)(`input`,{id:e,type:`checkbox`,className:`peer sr-only`,checked:t,onChange:e=>n(e.target.checked),"aria-label":r}),(0,H.jsx)(`span`,{className:`h-6 w-11 rounded-full bg-[var(--c-border)] transition-colors peer-checked:bg-[var(--c-blue1)] peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-[var(--c-blue3)] after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white after:shadow-sm after:transition-transform after:content-[''] peer-checked:after:translate-x-5`})]})}function Hu({message:e}){return e?(0,H.jsx)(`p`,{role:`status`,className:`text-sm ${e.type===`error`?`text-danger`:`text-[var(--c-green3)]`}`,children:e.text}):null}function Uu({title:e,description:t}){return(0,H.jsxs)(`div`,{className:`mb-5`,children:[(0,H.jsx)(`h2`,{className:`text-xl font-semibold`,children:e}),t&&(0,H.jsx)(`p`,{className:`mt-1 text-sm text-[var(--c-text-muted)]`,children:t})]})}var Wu=o(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),Gu=o((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),Ku=o((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),qu=o(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),Ju=o(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),Yu=o((e=>{var t=Gu().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),X=o((e=>{var t=Gu().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),Xu=o((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),Z=o((e=>{var t=Ku(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),Q=o((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),Zu=o((e=>{var t=Q();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),Qu=o(((e,t)=>{var n=Zu();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),$u=o((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),ed=o((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
16
+ ]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^[0-9]+$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),td=o((e=>{var t=$u(),n=ed();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),nd=o((e=>{var t=Gu(),n=Z(),r=Ku(),i=td(),a=$u(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),rd=o((e=>{var t=Gu(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),id=o(((e,t)=>{var n=td();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),ad=o(((e,t)=>{var n=td(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t=0;for(;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),od=o(((e,t)=>{var n=td();function r(e){this.mode=n.BYTE,this.data=typeof e==`string`?new TextEncoder().encode(e):new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),sd=o(((e,t)=>{var n=td(),r=Gu();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t=0;for(;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
17
+ Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),cd=o(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),ld=o((e=>{var t=td(),n=id(),r=ad(),i=od(),a=sd(),o=ed(),s=Gu(),c=cd();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
18
+ Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),ud=o((e=>{var t=Gu(),n=Ku(),r=qu(),i=Ju(),a=Yu(),o=X(),s=Xu(),c=Z(),l=Qu(),u=nd(),d=rd(),f=td(),p=ld();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return x(a,e,n)}function x(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function S(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
19
19
  The chosen QR Code version cannot contain this amount of data.
20
20
  Minimum version required to store current data is: `+c+`.
21
- `);let l=b(n,r,o),d=new i(t.getSymbolSize(n));return m(d,n),h(d),g(d,n),v(d,r,0),n>=7&&_(d,n),y(d,l),isNaN(a)&&(a=s.getBestMask(d,v.bind(null,d,r))),s.applyMask(a,d),v(d,r,a),{modules:d,version:n,errorCorrectionLevel:r,maskPattern:a,segments:o}}e.create=function(e,r){if(e===void 0||e===``)throw Error(`No input text`);let i=n.M,a,o;return r!==void 0&&(i=n.from(r.errorCorrectionLevel,n.M),a=u.from(r.version),o=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),S(e,a,i,o)}})),ud=o((e=>{function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||(e.color={});let n=e.margin===void 0||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[+!!a[t*i+r]]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),dd=o((e=>{var t=ud();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;o===void 0&&(!i||!i.getContext)&&(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;i===void 0&&(!n||!n.getContext)&&(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}})),fd=o((e=>{var t=ud();function n(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function r(e,t,n){let r=e+t;return n!==void 0&&(r+=` `+n),r}function i(e,t,n){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?r(`M`,l+n,.5+u+n):r(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=r(`h`,s),s=0)):a++}return i}e.render=function(e,r,a){let o=t.getOptions(r),s=e.modules.size,c=e.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+n(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+n(o.color.dark,`stroke`)+` d="`+i(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg>
22
- `;return typeof a==`function`&&a(null,p),p}})),pd=c(o((e=>{var t=Wu(),n=ld(),r=dd(),i=fd();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})}))(),1);function md({status:e,onSuccess:t,onCancel:n}){let{t:r}=L(),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(``),g=(0,_.useRef)(null);(0,_.useEffect)(()=>{g.current?.focus()},[]);async function v(){p(!0),h(``);try{t(await Ps())}catch{h(r(`security.passkeyCancelled`))}finally{p(!1)}}async function y(e){if(e.preventDefault(),i.trim()||c.trim()){p(!0),h(``);try{t((await Ns(u?`/reauth/email/confirm`:`/reauth`,{password:i,code:o,emailCode:c})).reauthToken)}catch{h(r(`security.invalidCredentials`))}finally{p(!1)}}}async function b(){p(!0),h(``);try{await Ns(`/reauth/email`,{}),d(!0)}catch{h(r(`security.failed`))}finally{p(!1)}}return typeof document>`u`?null:(0,Ac.createPortal)((0,H.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,children:[(0,H.jsx)(`div`,{className:`fixed inset-0 bg-black/60 backdrop-blur-xs animate-fade-in`,onClick:f?void 0:n,"aria-hidden":`true`}),(0,H.jsxs)(`div`,{className:`relative z-10 w-full max-w-md rounded-2xl border border-[var(--c-border)] bg-[var(--c-surface)] p-6 shadow-2xl animate-scale-in`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`reauth-modal-title`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-2`,children:[(0,H.jsx)(`h2`,{id:`reauth-modal-title`,className:`text-lg font-bold text-[var(--c-text)]`,children:r(`security.confirmTitle`)}),(0,H.jsx)(`button`,{type:`button`,onClick:n,disabled:f,className:`text-[var(--c-text-muted)] hover:text-[var(--c-text)] p-1 rounded-lg`,"aria-label":r(`security.cancel`),children:(0,H.jsx)(`svg`,{className:`w-5 h-5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,H.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)] mb-5`,children:r(`security.reauth`)}),m&&(0,H.jsx)(`p`,{role:`alert`,className:`text-sm text-[var(--c-danger)] mb-4 p-2.5 rounded-lg bg-[var(--c-danger-bg)] border border-[var(--c-danger-border)]`,children:m}),e.passkeys.length>0&&(0,H.jsxs)(`div`,{className:`mb-5`,children:[(0,H.jsxs)(`button`,{type:`button`,className:`btn-primary w-full flex items-center justify-center gap-2 py-2.5 font-medium`,onClick:v,disabled:f,children:[(0,H.jsxs)(`svg`,{className:`w-4 h-4 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,H.jsx)(`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`}),(0,H.jsx)(`path`,{d:`m21 2-9.6 9.6M15.5 7.5l3 3M18.5 4.5l3 3`})]}),r(`security.usePasskey`)]}),(0,H.jsxs)(`div`,{className:`relative my-4 flex items-center justify-center`,children:[(0,H.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,H.jsx)(`div`,{className:`w-full border-t border-[var(--c-border)]`})}),(0,H.jsx)(`span`,{className:`relative bg-[var(--c-surface)] px-3 text-xs uppercase tracking-wider text-[var(--c-text-muted)]`,children:r(`security.orPassword`)})]})]}),(0,H.jsxs)(`form`,{onSubmit:y,className:`flex flex-col gap-3`,children:[!u&&(0,H.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs font-medium text-[var(--c-text-muted)]`,children:[r(`security.password`),(0,H.jsx)(`input`,{ref:g,className:`input text-sm text-[var(--c-text)]`,type:`password`,autoComplete:`current-password`,disabled:f,value:i,onChange:e=>a(e.target.value),placeholder:r(`security.password`),"aria-label":r(`security.password`),required:!e.emailReauthEnabled})]}),e.totpEnabled&&(0,H.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs font-medium text-[var(--c-text-muted)]`,children:[r(`security.code`),(0,H.jsx)(`input`,{className:`input text-sm text-[var(--c-text)]`,autoComplete:`one-time-code`,inputMode:`numeric`,disabled:f,value:o,onChange:e=>s(e.target.value),placeholder:r(`security.code`),"aria-label":r(`security.code`)})]}),e.emailReauthEnabled&&!u&&(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary self-start text-xs`,disabled:f,onClick:b,children:r(`security.sendEmail`)}),u&&(0,H.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs font-medium text-[var(--c-text-muted)]`,children:[r(`security.emailCode`),(0,H.jsx)(`input`,{ref:g,className:`input text-sm text-[var(--c-text)]`,autoComplete:`one-time-code`,inputMode:`numeric`,disabled:f,value:c,onChange:e=>l(e.target.value),placeholder:r(`security.emailCode`),"aria-label":r(`security.emailCode`),required:!0})]}),(0,H.jsxs)(`div`,{className:`flex justify-end gap-2.5 mt-2`,children:[(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary text-sm`,onClick:n,disabled:f,children:r(`security.cancel`)}),(0,H.jsx)(`button`,{type:`submit`,className:`btn-primary text-sm`,disabled:f||!i.trim()&&!c.trim(),children:r(`security.confirmAction`)})]})]})]})]}),document.body)}function hd(){let{t:e}=L(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(),[l,u]=(0,_.useState)([]),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(null),b=async()=>{let e=await Ns(`/`,void 0,`GET`);n(e)};(0,_.useEffect)(()=>{b().catch(()=>f(e(`security.failed`)))},[e]);function x(){return new Promise((e,t)=>{y({resolve:e,reject:t})})}function S(e){let t=v;y(null),t&&t.resolve(e)}function C(){let e=v;y(null),e&&e.reject(Error(`cancelled`))}async function w(t,n){f(``),m(``);let r;try{r=await x()}catch{return}g(!0);let i=!1;try{await t(r),i=!0,n&&m(e(n)),await b()}catch(t){f(e(i?`security.refreshFailed`:t instanceof Error&&t.message===`last_passkey`?`security.lastPasskey`:`security.failed`))}finally{g(!1)}}return t?(0,H.jsxs)(Ru,{title:e(`security.title`),description:e(`security.intro`),children:[p&&(0,H.jsx)(`div`,{className:`px-5 pt-3 pb-1 sm:px-6`,children:(0,H.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2.5 rounded-xl border border-[var(--c-success-border)] bg-[var(--c-success-bg)] px-3.5 py-2.5 text-sm font-medium text-[var(--c-green3)]`,children:[(0,H.jsx)(`svg`,{className:`h-4 w-4 shrink-0`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z`,clipRule:`evenodd`})}),(0,H.jsx)(`span`,{children:p})]})}),d&&(0,H.jsx)(`div`,{className:`px-5 pt-3 pb-1 sm:px-6`,children:(0,H.jsxs)(`p`,{role:`alert`,className:`flex items-center gap-2.5 rounded-xl border border-[var(--c-danger-border)] bg-[var(--c-danger-bg)] px-3.5 py-2.5 text-sm font-medium text-[var(--c-danger)]`,children:[(0,H.jsx)(`svg`,{className:`h-4 w-4 shrink-0`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z`,clipRule:`evenodd`})}),(0,H.jsx)(`span`,{children:d})]})}),(0,H.jsxs)(Bu,{children:[(0,H.jsx)(`h3`,{className:`font-semibold mb-3`,children:e(`security.passkeys`)}),!!t.passkeys.length&&(0,H.jsx)(`ul`,{className:`mb-4 divide-y divide-[var(--c-border)] rounded-xl border border-[var(--c-border)]`,children:t.passkeys.map(t=>(0,H.jsxs)(`li`,{className:`flex items-center justify-between gap-3 px-4 py-3`,children:[(0,H.jsx)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere] text-sm font-medium`,children:t.name}),(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary shrink-0 text-sm`,disabled:h,"aria-label":e(`security.removeNamed`,{name:t.name}),onClick:()=>void w(async e=>{await Ns(`/passkeys/${encodeURIComponent(t.id)}`,{reauthToken:e},`DELETE`)},`security.passkeyRemoved`),children:e(`security.remove`)})]},t.id))}),t.passkeysEnabled?(0,H.jsxs)(`form`,{className:`grid grid-cols-1 items-end gap-3 sm:grid-cols-[minmax(0,1fr)_auto]`,onSubmit:e=>{if(e.preventDefault(),!h&&r.trim()){let e=r.trim();w(async t=>{await Fs(t,e),i(``)},`security.passkeyAdded`)}},children:[(0,H.jsxs)(`label`,{className:`min-w-0 text-sm font-medium`,children:[e(`security.passkeyName`),(0,H.jsx)(`input`,{className:`input mt-2`,value:r,maxLength:100,disabled:h,onChange:e=>i(e.target.value),placeholder:e(`security.passkeyName`),"aria-label":e(`security.passkeyName`)})]}),(0,H.jsx)(`button`,{type:`submit`,className:`btn-primary whitespace-nowrap`,disabled:h||!r.trim(),children:e(`security.addPasskey`)})]}):(0,H.jsx)(`p`,{children:e(`security.httpsRequired`)})]}),(0,H.jsxs)(Bu,{children:[(0,H.jsx)(`h3`,{className:`font-semibold mb-3`,children:e(`security.twoFactor`)}),(0,H.jsx)(`p`,{className:`text-sm mb-3`,children:e(t.totpEnabled?`security.enabled`:`security.disabled`)}),(0,H.jsx)(`p`,{className:`text-sm mb-3`,children:e(`security.revocationHint`)}),!s&&(0,H.jsx)(`button`,{className:`btn-secondary`,disabled:h||l.length>0,onClick:()=>void w(async e=>{if(t.totpEnabled)await Ns(`/totp/disable`,{reauthToken:e});else{let t=await Ns(`/totp/setup`,{reauthToken:e});c({...t,qr:await pd.toDataURL(t.uri)})}},t.totpEnabled?`security.updated`:`security.authenticatorStarted`),children:e(t.totpEnabled?`security.disable`:`security.enable`)}),s&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 mt-3`,children:[(0,H.jsx)(`p`,{children:e(`security.scan`)}),(0,H.jsx)(`img`,{src:s.qr,alt:e(`security.qrAlt`),width:200,height:200}),(0,H.jsx)(`code`,{className:`break-all select-all`,children:s.secret}),(0,H.jsx)(`input`,{className:`input`,value:a,autoComplete:`one-time-code`,inputMode:`numeric`,onChange:e=>o(e.target.value),"aria-label":e(`security.code`),placeholder:e(`security.code`)}),(0,H.jsxs)(`div`,{className:`flex gap-3`,children:[(0,H.jsx)(`button`,{className:`btn-primary`,disabled:h,onClick:async()=>{g(!0),f(``);try{let t=await Ns(`/totp/confirm`,{challengeId:s.challengeId,code:a});u(t.recoveryCodes),c(void 0),o(``),m(e(`security.updated`)),await b()}catch{f(e(`security.failed`))}finally{g(!1)}},children:e(`security.confirm`)}),(0,H.jsx)(`button`,{className:`btn-secondary`,disabled:h,onClick:()=>{c(void 0),o(``)},children:e(`security.cancel`)})]})]}),t.totpEnabled&&!l.length&&(0,H.jsx)(`button`,{className:`btn-secondary ml-3`,disabled:h,onClick:()=>void w(async e=>{let t=await Ns(`/recovery-codes`,{reauthToken:e});u(t.recoveryCodes)}),children:e(`security.newRecovery`)}),!!l.length&&(0,H.jsxs)(`div`,{className:`mt-4`,role:`status`,children:[(0,H.jsx)(`p`,{className:`mb-3`,children:e(`security.saveRecovery`)}),(0,H.jsx)(`pre`,{className:`select-all whitespace-pre-wrap`,children:l.join(`
23
- `)}),(0,H.jsx)(`button`,{className:`btn-secondary mt-3`,onClick:()=>u([]),children:e(`security.saved`)})]})]}),v&&(0,H.jsx)(md,{status:t,onSuccess:S,onCancel:C})]}):d?(0,H.jsx)(`p`,{role:`alert`,children:d}):null}function gd(){let{t:e}=L(),{user:t,setCurrentUser:n}=so(),[r,i]=(0,_.useState)(t?.display_name??``),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(null),d=(0,_.useRef)(null);if(!t)return null;let f=r.trim();async function p(t){t.preventDefault(),u(null),o(!0);try{let t=await V.updateProfile(f);n(t),i(t.display_name),u({type:`success`,text:e(`settings.profileSaved`)})}catch{u({type:`error`,text:e(`common.error`)})}finally{o(!1)}}async function m(t){let r=t.target.files?.[0];if(t.target.value=``,r){u(null),c(!0);try{n(await V.uploadAvatar(await Lu(r)))}catch(t){u({type:`error`,text:t instanceof ga?e(`common.error`):e(`settings.avatarUnreadable`)})}finally{c(!1)}}}async function h(){u(null),c(!0);try{n(await V.deleteAvatar())}catch{u({type:`error`,text:e(`common.error`)})}finally{c(!1)}}return(0,H.jsxs)(Ru,{title:e(`settings.profileTitle`),children:[(0,H.jsxs)(Bu,{children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,H.jsx)(Ao,{user:t,className:`h-16 w-16 text-xl transition-opacity ${s?`opacity-50`:``}`}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`p`,{className:`truncate font-semibold`,children:t.display_name||t.email}),(0,H.jsx)(`p`,{className:`truncate text-sm text-[var(--c-text-muted)]`,children:t.email}),(0,H.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary px-3 py-1.5 text-sm`,disabled:s,onClick:()=>d.current?.click(),children:t.avatar_updated_at?e(`settings.avatarChange`):e(`settings.avatarUpload`)}),t.avatar_updated_at&&(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary px-3 py-1.5 text-sm text-danger`,disabled:s,onClick:h,children:e(`settings.avatarRemove`)})]})]}),(0,H.jsx)(`input`,{ref:d,type:`file`,accept:`image/*`,className:`hidden`,onChange:m})]}),(0,H.jsx)(`p`,{className:`mt-3 text-xs text-[var(--c-text-muted)]`,children:e(`settings.avatarHint`)})]}),(0,H.jsx)(`form`,{onSubmit:p,children:(0,H.jsxs)(zu,{label:e(`settings.displayNameLabel`),htmlFor:`profile-name`,stacked:!0,children:[(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center`,children:[(0,H.jsx)(`input`,{id:`profile-name`,className:`input sm:max-w-sm`,required:!0,maxLength:100,autoComplete:`name`,value:r,onChange:e=>i(e.target.value)}),(0,H.jsx)(`button`,{type:`submit`,disabled:a||!f||f===t.display_name,className:`btn-primary self-start`,children:e(`common.save`)})]}),(0,H.jsx)(`div`,{className:`mt-2`,children:(0,H.jsx)(Hu,{message:l})})]})})]})}function _d(){let{t:e}=L(),[t,n]=(0,_.useState)(``),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(!1);async function d(s){if(s.preventDefault(),c(null),r!==a){c({type:`error`,text:e(`settings.passwordMismatch`)});return}u(!0);try{await V.changePassword(t,r),c({type:`success`,text:e(`settings.passwordChanged`)}),n(``),i(``),o(``)}catch(t){c({type:`error`,text:t instanceof ga&&t.status===401?e(`settings.incorrectPassword`):e(`common.error`)})}finally{u(!1)}}return(0,H.jsx)(`form`,{onSubmit:d,children:(0,H.jsx)(Ru,{title:e(`settings.changePasswordTitle`),description:e(`settings.passwordHint`),footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Hu,{message:s}),(0,H.jsx)(`button`,{type:`submit`,disabled:l,className:`btn-primary`,children:e(`settings.changePasswordButton`)})]}),children:(0,H.jsx)(Bu,{children:(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-3`,children:[(0,H.jsx)(`input`,{type:`password`,required:!0,autoComplete:`current-password`,placeholder:e(`settings.currentPasswordLabel`),"aria-label":e(`settings.currentPasswordLabel`),className:`input`,value:t,onChange:e=>n(e.target.value)}),(0,H.jsx)(`input`,{type:`password`,required:!0,minLength:10,autoComplete:`new-password`,placeholder:e(`settings.newPasswordLabel`),"aria-label":e(`settings.newPasswordLabel`),className:`input`,value:r,onChange:e=>i(e.target.value)}),(0,H.jsx)(`input`,{type:`password`,required:!0,minLength:10,autoComplete:`new-password`,placeholder:e(`settings.confirmPasswordLabel`),"aria-label":e(`settings.confirmPasswordLabel`),className:`input`,value:a,onChange:e=>o(e.target.value)})]})})})})}function vd(){let{user:e}=so(),t=Vo(Yo()),[n,r]=(0,_.useState)(null);return(0,_.useEffect)(()=>{let n=!0;if(r(null),t&&e)return Promise.resolve(!t.applies||t.applies({id:e.id,email:e.email,display_name:e.display_name??null})).then(e=>{n&&r(e===!0)}).catch(()=>{n&&r(!1)}),()=>{n=!1}},[t?.mount,t?.applies,e?.id]),t?n===null?null:n?(0,H.jsx)(Ls,{name:`password-card`,mount:t.mount}):(0,H.jsx)(_d,{}):(0,H.jsx)(_d,{})}function yd(){return(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,H.jsx)(gd,{}),(0,H.jsx)(vd,{}),(0,H.jsx)(hd,{})]})}var bd=[{value:`de`,label:`Deutsch`},{value:`en`,label:`English`},{value:`ja`,label:`日本語`}];function xd(){let{t:e,i18n:t}=L();return(0,H.jsx)(Hs,{value:t.resolvedLanguage??`de`,onChange:e=>{jt(e),t.changeLanguage(e)},options:bd,className:`w-44`,ariaLabel:e(`settings.language`)})}function Sd(){let{t:e}=L(),t=(0,_.useSyncExternalStore)(_o,vo),n=[{value:`light`,label:e(`settings.themeLight`)},{value:`dark`,label:e(`settings.themeDark`)},{value:`system`,label:e(`settings.themeSystem`)}];return(0,H.jsx)(`div`,{className:`grid grid-cols-3 gap-1 rounded-xl border border-[var(--c-border)] p-0.5`,role:`group`,"aria-label":e(`settings.theme`),children:n.map(e=>(0,H.jsx)(`button`,{type:`button`,onClick:()=>yo(e.value),"aria-pressed":t===e.value,className:`h-8 rounded-lg px-3 text-sm font-medium transition-colors cursor-pointer ${t===e.value?`border border-[var(--c-mobile-nav-active-border)] bg-[var(--c-mobile-nav-active)] text-[var(--c-text)] shadow-sm`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)]`}`,children:e.label},e.value))})}function Cd(){let{t:e}=L(),t=(0,_.useSyncExternalStore)(Eo,Do);return t===`installed`||t===`unsupported`?null:(0,H.jsx)(zu,{label:e(`settings.installApp`),hint:e(t===`ios`?`settings.installAppIos`:t===`mac-safari`?`settings.installAppMacSafari`:`settings.installAppHint`),children:t===`prompt`&&(0,H.jsx)(`button`,{type:`button`,onClick:()=>void Oo(),className:`btn-primary whitespace-nowrap`,children:e(`settings.installAppButton`)})})}function wd(){let{t:e,i18n:t}=L(),n=(0,_.useSyncExternalStore)(Eo,Do),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(!1);if((0,_.useEffect)(()=>{qa().then(i).catch(()=>i(`unsupported`))},[]),r===null)return null;if(r===`unsupported`){let t=e(n===`ios`?`settings.notificationsIos`:`settings.notificationsUnsupported`);return(0,H.jsx)(zu,{label:e(`settings.notifications`),hint:t})}async function s(t){o(!0);try{t?i(await Ya()):(await Xa(),i(`off`))}catch{G.error(e(`common.error`))}finally{o(!1)}}async function c(){try{let{delivered:n}=await V.sendTestPush(t.resolvedLanguage??`en`);n===0&&G.error(e(`settings.notificationsTestFailed`))}catch{G.error(e(`common.error`))}}return(0,H.jsx)(zu,{label:e(`settings.notifications`),hint:e(r===`blocked`?`settings.notificationsBlocked`:`settings.notificationsHint`),htmlFor:`notifications-toggle`,inline:!0,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[r===`on`&&(0,H.jsx)(`button`,{type:`button`,onClick:()=>void c(),className:`btn-secondary px-3 py-1.5 text-sm`,children:e(`settings.notificationsTest`)}),(0,H.jsx)(Vu,{id:`notifications-toggle`,label:e(`settings.notifications`),checked:r===`on`,onChange:e=>!a&&r!==`blocked`&&void s(e)})]})})}function Td(){let{t:e}=L(),[t,n]=(0,_.useState)(la),[r,i]=(0,_.useState)(null);(0,_.useEffect)(()=>{da().then(e=>i(e?ma(e).length:null))},[t]);async function a(e){if(n(e),ua(e),!e){await za(),i(null);return}let t=await Ra({force:!0});t!==null&&i(t)}return(0,H.jsx)(zu,{label:e(`settings.offlineSaved`),hint:`${e(`settings.offlineSavedHint`)}${t&&r!==null?` ${e(`settings.offlineSavedCount`,{count:r})}`:``}`,htmlFor:`offline-saved-toggle`,inline:!0,children:(0,H.jsx)(Vu,{id:`offline-saved-toggle`,label:e(`settings.offlineSaved`),checked:t,onChange:e=>void a(e)})})}function Ed(){let{t:e}=L(),[t,n]=(0,_.useState)(()=>localStorage.getItem(`feedkeeper_auto_reader_mode`)!==`false`);return(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,H.jsxs)(Ru,{title:e(`settings.appearanceTitle`),children:[(0,H.jsx)(zu,{label:e(`settings.theme`),hint:e(`settings.themeHint`),children:(0,H.jsx)(Sd,{})}),(0,H.jsx)(zu,{label:e(`settings.language`),hint:e(`settings.languageHint`),children:(0,H.jsx)(xd,{})})]}),(0,H.jsxs)(Ru,{title:e(`settings.readingTitle`),children:[(0,H.jsx)(zu,{label:e(`settings.autoReaderMode`),hint:e(`settings.autoReaderModeHint`),htmlFor:`auto-reader-toggle`,inline:!0,children:(0,H.jsx)(Vu,{id:`auto-reader-toggle`,label:e(`settings.autoReaderMode`),checked:t,onChange:e=>{n(e),localStorage.setItem(`feedkeeper_auto_reader_mode`,e?`true`:`false`)}})}),(0,H.jsx)(Td,{}),(0,H.jsx)(wd,{}),(0,H.jsx)(Cd,{})]})]})}function Dd(){let{t:e}=L(),[t,n]=(0,_.useState)([]),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(null);(0,_.useEffect)(()=>{V.listMutedKeywords().then(e=>n(e.keywords)).catch(()=>{})},[]);async function l(t){if(t.preventDefault(),r.trim()){o(!0),c(null);try{let e=await V.addMutedKeyword(r.trim());n(t=>t.some(t=>t.id===e.id)?t:[...t,e]),i(``)}catch{c(e(`common.error`))}finally{o(!1)}}}async function u(t){try{await V.deleteMutedKeyword(t),n(e=>e.filter(e=>e.id!==t))}catch{c(e(`common.error`))}}return(0,H.jsx)(Ru,{title:e(`settings.mutedKeywordsTitle`),description:e(`settings.mutedKeywordsHint`),children:(0,H.jsxs)(Bu,{children:[(0,H.jsxs)(`form`,{onSubmit:l,className:`flex gap-2`,children:[(0,H.jsx)(`input`,{type:`text`,placeholder:e(`settings.mutedKeywordPlaceholder`),"aria-label":e(`settings.mutedKeywordPlaceholder`),className:`input flex-1`,value:r,onChange:e=>i(e.target.value)}),(0,H.jsx)(`button`,{type:`submit`,disabled:a||!r.trim(),className:`btn-primary whitespace-nowrap`,children:e(`settings.addMutedKeyword`)})]}),s&&(0,H.jsx)(`p`,{className:`mt-2 text-sm text-danger`,children:s}),t.length>0?(0,H.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:t.map(t=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-[var(--c-border)] bg-[var(--c-bg)] py-1 pl-3 pr-1 text-sm`,children:[t.keyword,(0,H.jsx)(`button`,{type:`button`,onClick:()=>u(t.id),title:e(`settings.removeMutedKeyword`),"aria-label":`${e(`settings.removeMutedKeyword`)}: ${t.keyword}`,className:`flex h-6 w-6 items-center justify-center rounded-full text-[var(--c-text-muted)] hover:bg-[var(--c-danger-bg)] hover:text-[var(--c-danger)] cursor-pointer`,children:(0,H.jsx)(`svg`,{className:`h-3.5 w-3.5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]},t.id))}):(0,H.jsx)(`p`,{className:`mt-4 text-sm text-[var(--c-text-muted)]`,children:e(`settings.noMutedKeywords`)})]})})}function Od({value:e}){let{t}=L(),[n,r]=(0,_.useState)(!1);return(0,H.jsx)(`button`,{type:`button`,onClick:async()=>{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)},className:`btn-secondary shrink-0 px-3 py-1.5 text-sm`,children:t(n?`settings.copied`:`settings.copyToken`)})}function kd({scope:e}){let{t}=L();return(0,H.jsx)(`span`,{className:`rounded-full px-2 py-0.5 text-xs font-medium ${e===`write`?`bg-[var(--c-danger-bg)] text-[var(--c-danger)]`:`bg-[var(--c-mobile-nav-active)] text-[var(--c-text-muted)]`}`,children:t(e===`read`?`settings.tokenReadOnly`:`settings.tokenReadWrite`)})}function Ad(){let{t:e,i18n:t}=L(),[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(`read`),[u,d]=(0,_.useState)(null),f=`${window.location.origin}/mcp`,p=new Intl.DateTimeFormat(t.resolvedLanguage,{dateStyle:`medium`});async function m(){let[e,t]=await Promise.all([V.listTokens(),V.listOAuthGrants()]);r(e),a(t)}(0,_.useEffect)(()=>{m()},[]);async function h(e){e.preventDefault();let{token:t}=await V.createToken(o,c);d(t),s(``),await m()}async function g(t){confirm(e(`settings.revokeTokenConfirm`,{name:t.name}))&&(await V.deleteToken(t.id),await m())}async function v(t){confirm(e(`settings.disconnectAppConfirm`,{name:t.client_name}))&&(await V.deleteOAuthGrant(t.id),await m())}return(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,H.jsx)(Ru,{title:e(`settings.mcpTitle`),description:e(`settings.mcpHint`),children:(0,H.jsxs)(Bu,{children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-xl border border-[var(--c-border)] bg-[var(--c-bg)] py-1.5 pl-3 pr-1.5`,children:[(0,H.jsx)(`code`,{className:`min-w-0 flex-1 truncate text-sm`,children:f}),(0,H.jsx)(Od,{value:f})]}),(0,H.jsxs)(`div`,{className:`mt-5 rounded-xl border border-[var(--c-green3)] p-4`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(`h3`,{className:`font-semibold`,children:e(`settings.mcpOauthTitle`)}),(0,H.jsx)(`span`,{className:`rounded-full bg-[var(--c-mobile-nav-active)] px-2 py-0.5 text-xs font-medium`,children:e(`settings.mcpOauthBadge`)})]}),(0,H.jsx)(`p`,{className:`mt-1 text-sm text-[var(--c-text-muted)]`,children:e(`settings.mcpOauthIntro`)}),(0,H.jsxs)(`ol`,{className:`mt-3 flex list-decimal flex-col gap-1 pl-5 text-sm text-[var(--c-text-muted)]`,children:[(0,H.jsx)(`li`,{children:e(`settings.mcpOauthStep1`)}),(0,H.jsx)(`li`,{children:e(`settings.mcpOauthStep2`)}),(0,H.jsx)(`li`,{children:e(`settings.mcpOauthStep3`)})]}),(0,H.jsx)(`p`,{className:`mt-3 text-sm text-[var(--c-text-muted)]`,children:e(`settings.mcpOauthDone`)})]}),(0,H.jsxs)(`div`,{className:`mt-4 rounded-xl border border-[var(--c-border)] p-4`,children:[(0,H.jsx)(`h3`,{className:`font-semibold`,children:e(`settings.mcpTokenTitle`)}),(0,H.jsx)(`p`,{className:`mt-1 text-sm text-[var(--c-text-muted)]`,children:e(`settings.mcpTokenIntro`)}),(0,H.jsxs)(`ol`,{className:`mt-3 flex list-decimal flex-col gap-1 pl-5 text-sm text-[var(--c-text-muted)]`,children:[(0,H.jsx)(`li`,{children:e(`settings.mcpStepToken`)}),(0,H.jsx)(`li`,{children:e(`settings.mcpStepUrl`)}),(0,H.jsx)(`li`,{children:e(`settings.mcpStepHeader`)})]}),(0,H.jsxs)(`div`,{className:`mt-5 border-t border-[var(--c-border)] pt-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,H.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-wider text-[var(--c-text-muted)]`,children:e(`settings.mcpClaudeTitle`)}),(0,H.jsx)(`button`,{type:`button`,onClick:async()=>{let t=JSON.stringify({mcpServers:{feedkeeper:{url:f,headers:{Authorization:`Bearer ${u??`<YOUR_TOKEN>`}`}}}},null,2);await navigator.clipboard.writeText(t),alert(e(`settings.mcpConfigCopied`))},className:`btn-secondary shrink-0 px-2.5 py-1 text-xs`,children:e(`settings.mcpCopyConfig`)})]}),(0,H.jsx)(`pre`,{className:`mt-2 overflow-x-auto rounded-lg bg-[var(--c-bg)] p-3 text-xs text-[var(--c-text-muted)]`,children:`{
21
+ `);let l=b(n,r,o),d=new i(t.getSymbolSize(n));return m(d,n),h(d),g(d,n),v(d,r,0),n>=7&&_(d,n),y(d,l),isNaN(a)&&(a=s.getBestMask(d,v.bind(null,d,r))),s.applyMask(a,d),v(d,r,a),{modules:d,version:n,errorCorrectionLevel:r,maskPattern:a,segments:o}}e.create=function(e,r){if(e===void 0||e===``)throw Error(`No input text`);let i=n.M,a,o;return r!==void 0&&(i=n.from(r.errorCorrectionLevel,n.M),a=u.from(r.version),o=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),S(e,a,i,o)}})),dd=o((e=>{function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||(e.color={});let n=e.margin===void 0||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[+!!a[t*i+r]]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),fd=o((e=>{var t=dd();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;o===void 0&&(!i||!i.getContext)&&(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;i===void 0&&(!n||!n.getContext)&&(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}})),pd=o((e=>{var t=dd();function n(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function r(e,t,n){let r=e+t;return n!==void 0&&(r+=` `+n),r}function i(e,t,n){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?r(`M`,l+n,.5+u+n):r(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=r(`h`,s),s=0)):a++}return i}e.render=function(e,r,a){let o=t.getOptions(r),s=e.modules.size,c=e.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+n(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+n(o.color.dark,`stroke`)+` d="`+i(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg>
22
+ `;return typeof a==`function`&&a(null,p),p}})),md=c(o((e=>{var t=Wu(),n=ud(),r=fd(),i=pd();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})}))(),1);function hd({status:e,onSuccess:t,onCancel:n}){let{t:r}=L(),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(``),g=(0,_.useRef)(null);(0,_.useEffect)(()=>{g.current?.focus()},[]);async function v(){p(!0),h(``);try{t(await Ps())}catch{h(r(`security.passkeyCancelled`))}finally{p(!1)}}async function y(e){if(e.preventDefault(),i.trim()||c.trim()){p(!0),h(``);try{t((await Ns(u?`/reauth/email/confirm`:`/reauth`,{password:i,code:o,emailCode:c})).reauthToken)}catch{h(r(`security.invalidCredentials`))}finally{p(!1)}}}async function b(){p(!0),h(``);try{await Ns(`/reauth/email`,{}),d(!0)}catch{h(r(`security.failed`))}finally{p(!1)}}return typeof document>`u`?null:(0,jc.createPortal)((0,H.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,children:[(0,H.jsx)(`div`,{className:`fixed inset-0 bg-black/60 backdrop-blur-xs animate-fade-in`,onClick:f?void 0:n,"aria-hidden":`true`}),(0,H.jsxs)(`div`,{className:`relative z-10 w-full max-w-md rounded-2xl border border-[var(--c-border)] bg-[var(--c-surface)] p-6 shadow-2xl animate-scale-in`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`reauth-modal-title`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-2`,children:[(0,H.jsx)(`h2`,{id:`reauth-modal-title`,className:`text-lg font-bold text-[var(--c-text)]`,children:r(`security.confirmTitle`)}),(0,H.jsx)(`button`,{type:`button`,onClick:n,disabled:f,className:`text-[var(--c-text-muted)] hover:text-[var(--c-text)] p-1 rounded-lg`,"aria-label":r(`security.cancel`),children:(0,H.jsx)(`svg`,{className:`w-5 h-5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,H.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)] mb-5`,children:r(`security.reauth`)}),m&&(0,H.jsx)(`p`,{role:`alert`,className:`text-sm text-[var(--c-danger)] mb-4 p-2.5 rounded-lg bg-[var(--c-danger-bg)] border border-[var(--c-danger-border)]`,children:m}),e.passkeys.length>0&&(0,H.jsxs)(`div`,{className:`mb-5`,children:[(0,H.jsxs)(`button`,{type:`button`,className:`btn-primary w-full flex items-center justify-center gap-2 py-2.5 font-medium`,onClick:v,disabled:f,children:[(0,H.jsxs)(`svg`,{className:`w-4 h-4 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,H.jsx)(`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`}),(0,H.jsx)(`path`,{d:`m21 2-9.6 9.6M15.5 7.5l3 3M18.5 4.5l3 3`})]}),r(`security.usePasskey`)]}),(0,H.jsxs)(`div`,{className:`relative my-4 flex items-center justify-center`,children:[(0,H.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,H.jsx)(`div`,{className:`w-full border-t border-[var(--c-border)]`})}),(0,H.jsx)(`span`,{className:`relative bg-[var(--c-surface)] px-3 text-xs uppercase tracking-wider text-[var(--c-text-muted)]`,children:r(`security.orPassword`)})]})]}),(0,H.jsxs)(`form`,{onSubmit:y,className:`flex flex-col gap-3`,children:[!u&&(0,H.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs font-medium text-[var(--c-text-muted)]`,children:[r(`security.password`),(0,H.jsx)(`input`,{ref:g,className:`input text-sm text-[var(--c-text)]`,type:`password`,autoComplete:`current-password`,disabled:f,value:i,onChange:e=>a(e.target.value),placeholder:r(`security.password`),"aria-label":r(`security.password`),required:!e.emailReauthEnabled})]}),e.totpEnabled&&(0,H.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs font-medium text-[var(--c-text-muted)]`,children:[r(`security.code`),(0,H.jsx)(`input`,{className:`input text-sm text-[var(--c-text)]`,autoComplete:`one-time-code`,inputMode:`numeric`,disabled:f,value:o,onChange:e=>s(e.target.value),placeholder:r(`security.code`),"aria-label":r(`security.code`)})]}),e.emailReauthEnabled&&!u&&(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary self-start text-xs`,disabled:f,onClick:b,children:r(`security.sendEmail`)}),u&&(0,H.jsxs)(`label`,{className:`flex flex-col gap-1 text-xs font-medium text-[var(--c-text-muted)]`,children:[r(`security.emailCode`),(0,H.jsx)(`input`,{ref:g,className:`input text-sm text-[var(--c-text)]`,autoComplete:`one-time-code`,inputMode:`numeric`,disabled:f,value:c,onChange:e=>l(e.target.value),placeholder:r(`security.emailCode`),"aria-label":r(`security.emailCode`),required:!0})]}),(0,H.jsxs)(`div`,{className:`flex justify-end gap-2.5 mt-2`,children:[(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary text-sm`,onClick:n,disabled:f,children:r(`security.cancel`)}),(0,H.jsx)(`button`,{type:`submit`,className:`btn-primary text-sm`,disabled:f||!i.trim()&&!c.trim(),children:r(`security.confirmAction`)})]})]})]})]}),document.body)}function gd(){let{t:e}=L(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(),[l,u]=(0,_.useState)([]),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)(null),b=async()=>{let e=await Ns(`/`,void 0,`GET`);n(e)};(0,_.useEffect)(()=>{b().catch(()=>f(e(`security.failed`)))},[e]);function x(){return new Promise((e,t)=>{y({resolve:e,reject:t})})}function S(e){let t=v;y(null),t&&t.resolve(e)}function C(){let e=v;y(null),e&&e.reject(Error(`cancelled`))}async function w(t,n){f(``),m(``);let r;try{r=await x()}catch{return}g(!0);let i=!1;try{await t(r),i=!0,n&&m(e(n)),await b()}catch(t){f(e(i?`security.refreshFailed`:t instanceof Error&&t.message===`last_passkey`?`security.lastPasskey`:`security.failed`))}finally{g(!1)}}return t?(0,H.jsxs)(Ru,{title:e(`security.title`),description:e(`security.intro`),children:[p&&(0,H.jsx)(`div`,{className:`px-5 pt-3 pb-1 sm:px-6`,children:(0,H.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2.5 rounded-xl border border-[var(--c-success-border)] bg-[var(--c-success-bg)] px-3.5 py-2.5 text-sm font-medium text-[var(--c-green3)]`,children:[(0,H.jsx)(`svg`,{className:`h-4 w-4 shrink-0`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z`,clipRule:`evenodd`})}),(0,H.jsx)(`span`,{children:p})]})}),d&&(0,H.jsx)(`div`,{className:`px-5 pt-3 pb-1 sm:px-6`,children:(0,H.jsxs)(`p`,{role:`alert`,className:`flex items-center gap-2.5 rounded-xl border border-[var(--c-danger-border)] bg-[var(--c-danger-bg)] px-3.5 py-2.5 text-sm font-medium text-[var(--c-danger)]`,children:[(0,H.jsx)(`svg`,{className:`h-4 w-4 shrink-0`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z`,clipRule:`evenodd`})}),(0,H.jsx)(`span`,{children:d})]})}),(0,H.jsxs)(Bu,{children:[(0,H.jsx)(`h3`,{className:`font-semibold mb-3`,children:e(`security.passkeys`)}),!!t.passkeys.length&&(0,H.jsx)(`ul`,{className:`mb-4 divide-y divide-[var(--c-border)] rounded-xl border border-[var(--c-border)]`,children:t.passkeys.map(t=>(0,H.jsxs)(`li`,{className:`flex items-center justify-between gap-3 px-4 py-3`,children:[(0,H.jsx)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere] text-sm font-medium`,children:t.name}),(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary shrink-0 text-sm`,disabled:h,"aria-label":e(`security.removeNamed`,{name:t.name}),onClick:()=>void w(async e=>{await Ns(`/passkeys/${encodeURIComponent(t.id)}`,{reauthToken:e},`DELETE`)},`security.passkeyRemoved`),children:e(`security.remove`)})]},t.id))}),t.passkeysEnabled?(0,H.jsxs)(`form`,{className:`grid grid-cols-1 items-end gap-3 sm:grid-cols-[minmax(0,1fr)_auto]`,onSubmit:e=>{if(e.preventDefault(),!h&&r.trim()){let e=r.trim();w(async t=>{await Fs(t,e),i(``)},`security.passkeyAdded`)}},children:[(0,H.jsxs)(`label`,{className:`min-w-0 text-sm font-medium`,children:[e(`security.passkeyName`),(0,H.jsx)(`input`,{className:`input mt-2`,value:r,maxLength:100,disabled:h,onChange:e=>i(e.target.value),placeholder:e(`security.passkeyName`),"aria-label":e(`security.passkeyName`)})]}),(0,H.jsx)(`button`,{type:`submit`,className:`btn-primary whitespace-nowrap`,disabled:h||!r.trim(),children:e(`security.addPasskey`)})]}):(0,H.jsx)(`p`,{children:e(`security.httpsRequired`)})]}),(0,H.jsxs)(Bu,{children:[(0,H.jsx)(`h3`,{className:`font-semibold mb-3`,children:e(`security.twoFactor`)}),(0,H.jsx)(`p`,{className:`text-sm mb-3`,children:e(t.totpEnabled?`security.enabled`:`security.disabled`)}),(0,H.jsx)(`p`,{className:`text-sm mb-3`,children:e(`security.revocationHint`)}),!s&&(0,H.jsx)(`button`,{className:`btn-secondary`,disabled:h||l.length>0,onClick:()=>void w(async e=>{if(t.totpEnabled)await Ns(`/totp/disable`,{reauthToken:e});else{let t=await Ns(`/totp/setup`,{reauthToken:e});c({...t,qr:await md.toDataURL(t.uri)})}},t.totpEnabled?`security.updated`:`security.authenticatorStarted`),children:e(t.totpEnabled?`security.disable`:`security.enable`)}),s&&(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 mt-3`,children:[(0,H.jsx)(`p`,{children:e(`security.scan`)}),(0,H.jsx)(`img`,{src:s.qr,alt:e(`security.qrAlt`),width:200,height:200}),(0,H.jsx)(`code`,{className:`break-all select-all`,children:s.secret}),(0,H.jsx)(`input`,{className:`input`,value:a,autoComplete:`one-time-code`,inputMode:`numeric`,onChange:e=>o(e.target.value),"aria-label":e(`security.code`),placeholder:e(`security.code`)}),(0,H.jsxs)(`div`,{className:`flex gap-3`,children:[(0,H.jsx)(`button`,{className:`btn-primary`,disabled:h,onClick:async()=>{g(!0),f(``);try{let t=await Ns(`/totp/confirm`,{challengeId:s.challengeId,code:a});u(t.recoveryCodes),c(void 0),o(``),m(e(`security.updated`)),await b()}catch{f(e(`security.failed`))}finally{g(!1)}},children:e(`security.confirm`)}),(0,H.jsx)(`button`,{className:`btn-secondary`,disabled:h,onClick:()=>{c(void 0),o(``)},children:e(`security.cancel`)})]})]}),t.totpEnabled&&!l.length&&(0,H.jsx)(`button`,{className:`btn-secondary ml-3`,disabled:h,onClick:()=>void w(async e=>{let t=await Ns(`/recovery-codes`,{reauthToken:e});u(t.recoveryCodes)}),children:e(`security.newRecovery`)}),!!l.length&&(0,H.jsxs)(`div`,{className:`mt-4`,role:`status`,children:[(0,H.jsx)(`p`,{className:`mb-3`,children:e(`security.saveRecovery`)}),(0,H.jsx)(`pre`,{className:`select-all whitespace-pre-wrap`,children:l.join(`
23
+ `)}),(0,H.jsx)(`button`,{className:`btn-secondary mt-3`,onClick:()=>u([]),children:e(`security.saved`)})]})]}),v&&(0,H.jsx)(hd,{status:t,onSuccess:S,onCancel:C})]}):d?(0,H.jsx)(`p`,{role:`alert`,children:d}):null}function _d(){let{t:e}=L(),{user:t,setCurrentUser:n}=so(),[r,i]=(0,_.useState)(t?.display_name??``),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(null),d=(0,_.useRef)(null);if(!t)return null;let f=r.trim();async function p(t){t.preventDefault(),u(null),o(!0);try{let t=await V.updateProfile(f);n(t),i(t.display_name),u({type:`success`,text:e(`settings.profileSaved`)})}catch{u({type:`error`,text:e(`common.error`)})}finally{o(!1)}}async function m(t){let r=t.target.files?.[0];if(t.target.value=``,r){u(null),c(!0);try{n(await V.uploadAvatar(await Lu(r)))}catch(t){u({type:`error`,text:t instanceof ga?e(`common.error`):e(`settings.avatarUnreadable`)})}finally{c(!1)}}}async function h(){u(null),c(!0);try{n(await V.deleteAvatar())}catch{u({type:`error`,text:e(`common.error`)})}finally{c(!1)}}return(0,H.jsxs)(Ru,{title:e(`settings.profileTitle`),children:[(0,H.jsxs)(Bu,{children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,H.jsx)(Ao,{user:t,className:`h-16 w-16 text-xl transition-opacity ${s?`opacity-50`:``}`}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`p`,{className:`truncate font-semibold`,children:t.display_name||t.email}),(0,H.jsx)(`p`,{className:`truncate text-sm text-[var(--c-text-muted)]`,children:t.email}),(0,H.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:[(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary px-3 py-1.5 text-sm`,disabled:s,onClick:()=>d.current?.click(),children:t.avatar_updated_at?e(`settings.avatarChange`):e(`settings.avatarUpload`)}),t.avatar_updated_at&&(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary px-3 py-1.5 text-sm text-danger`,disabled:s,onClick:h,children:e(`settings.avatarRemove`)})]})]}),(0,H.jsx)(`input`,{ref:d,type:`file`,accept:`image/*`,className:`hidden`,onChange:m})]}),(0,H.jsx)(`p`,{className:`mt-3 text-xs text-[var(--c-text-muted)]`,children:e(`settings.avatarHint`)})]}),(0,H.jsx)(`form`,{onSubmit:p,children:(0,H.jsxs)(zu,{label:e(`settings.displayNameLabel`),htmlFor:`profile-name`,stacked:!0,children:[(0,H.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center`,children:[(0,H.jsx)(`input`,{id:`profile-name`,className:`input sm:max-w-sm`,required:!0,maxLength:100,autoComplete:`name`,value:r,onChange:e=>i(e.target.value)}),(0,H.jsx)(`button`,{type:`submit`,disabled:a||!f||f===t.display_name,className:`btn-primary self-start`,children:e(`common.save`)})]}),(0,H.jsx)(`div`,{className:`mt-2`,children:(0,H.jsx)(Hu,{message:l})})]})})]})}function vd(){let{t:e}=L(),[t,n]=(0,_.useState)(``),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(!1);async function d(s){if(s.preventDefault(),c(null),r!==a){c({type:`error`,text:e(`settings.passwordMismatch`)});return}u(!0);try{await V.changePassword(t,r),c({type:`success`,text:e(`settings.passwordChanged`)}),n(``),i(``),o(``)}catch(t){c({type:`error`,text:t instanceof ga&&t.status===401?e(`settings.incorrectPassword`):e(`common.error`)})}finally{u(!1)}}return(0,H.jsx)(`form`,{onSubmit:d,children:(0,H.jsx)(Ru,{title:e(`settings.changePasswordTitle`),description:e(`settings.passwordHint`),footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Hu,{message:s}),(0,H.jsx)(`button`,{type:`submit`,disabled:l,className:`btn-primary`,children:e(`settings.changePasswordButton`)})]}),children:(0,H.jsx)(Bu,{children:(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-3`,children:[(0,H.jsx)(`input`,{type:`password`,required:!0,autoComplete:`current-password`,placeholder:e(`settings.currentPasswordLabel`),"aria-label":e(`settings.currentPasswordLabel`),className:`input`,value:t,onChange:e=>n(e.target.value)}),(0,H.jsx)(`input`,{type:`password`,required:!0,minLength:10,autoComplete:`new-password`,placeholder:e(`settings.newPasswordLabel`),"aria-label":e(`settings.newPasswordLabel`),className:`input`,value:r,onChange:e=>i(e.target.value)}),(0,H.jsx)(`input`,{type:`password`,required:!0,minLength:10,autoComplete:`new-password`,placeholder:e(`settings.confirmPasswordLabel`),"aria-label":e(`settings.confirmPasswordLabel`),className:`input`,value:a,onChange:e=>o(e.target.value)})]})})})})}function yd(){let{user:e}=so(),t=Vo(Yo()),[n,r]=(0,_.useState)(null);return(0,_.useEffect)(()=>{let n=!0;if(r(null),t&&e)return Promise.resolve(!t.applies||t.applies({id:e.id,email:e.email,display_name:e.display_name??null})).then(e=>{n&&r(e===!0)}).catch(()=>{n&&r(!1)}),()=>{n=!1}},[t?.mount,t?.applies,e?.id]),t?n===null?null:n?(0,H.jsx)(Ls,{name:`password-card`,mount:t.mount}):(0,H.jsx)(vd,{}):(0,H.jsx)(vd,{})}function bd(){return(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,H.jsx)(_d,{}),(0,H.jsx)(yd,{}),(0,H.jsx)(gd,{})]})}var xd=[{value:`de`,label:`Deutsch`},{value:`en`,label:`English`},{value:`ja`,label:`日本語`}];function Sd(){let{t:e,i18n:t}=L();return(0,H.jsx)(Hs,{value:t.resolvedLanguage??`de`,onChange:e=>{jt(e),t.changeLanguage(e)},options:xd,className:`w-44`,ariaLabel:e(`settings.language`)})}function Cd(){let{t:e}=L(),t=(0,_.useSyncExternalStore)(_o,vo),n=[{value:`light`,label:e(`settings.themeLight`)},{value:`dark`,label:e(`settings.themeDark`)},{value:`system`,label:e(`settings.themeSystem`)}];return(0,H.jsx)(`div`,{className:`grid grid-cols-3 gap-1 rounded-xl border border-[var(--c-border)] p-0.5`,role:`group`,"aria-label":e(`settings.theme`),children:n.map(e=>(0,H.jsx)(`button`,{type:`button`,onClick:()=>yo(e.value),"aria-pressed":t===e.value,className:`h-8 rounded-lg px-3 text-sm font-medium transition-colors cursor-pointer ${t===e.value?`border border-[var(--c-mobile-nav-active-border)] bg-[var(--c-mobile-nav-active)] text-[var(--c-text)] shadow-sm`:`text-[var(--c-text-muted)] hover:text-[var(--c-text)]`}`,children:e.label},e.value))})}function wd(){let{t:e}=L(),t=(0,_.useSyncExternalStore)(Eo,Do);return t===`installed`||t===`unsupported`?null:(0,H.jsx)(zu,{label:e(`settings.installApp`),hint:e(t===`ios`?`settings.installAppIos`:t===`mac-safari`?`settings.installAppMacSafari`:`settings.installAppHint`),children:t===`prompt`&&(0,H.jsx)(`button`,{type:`button`,onClick:()=>void Oo(),className:`btn-primary whitespace-nowrap`,children:e(`settings.installAppButton`)})})}function Td(){let{t:e,i18n:t}=L(),n=(0,_.useSyncExternalStore)(Eo,Do),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(!1);if((0,_.useEffect)(()=>{qa().then(i).catch(()=>i(`unsupported`))},[]),r===null)return null;if(r===`unsupported`){let t=e(n===`ios`?`settings.notificationsIos`:`settings.notificationsUnsupported`);return(0,H.jsx)(zu,{label:e(`settings.notifications`),hint:t})}async function s(t){o(!0);try{t?i(await Ya()):(await Xa(),i(`off`))}catch{G.error(e(`common.error`))}finally{o(!1)}}async function c(){try{let{delivered:n}=await V.sendTestPush(t.resolvedLanguage??`en`);n===0&&G.error(e(`settings.notificationsTestFailed`))}catch{G.error(e(`common.error`))}}return(0,H.jsx)(zu,{label:e(`settings.notifications`),hint:e(r===`blocked`?`settings.notificationsBlocked`:`settings.notificationsHint`),htmlFor:`notifications-toggle`,inline:!0,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[r===`on`&&(0,H.jsx)(`button`,{type:`button`,onClick:()=>void c(),className:`btn-secondary px-3 py-1.5 text-sm`,children:e(`settings.notificationsTest`)}),(0,H.jsx)(Vu,{id:`notifications-toggle`,label:e(`settings.notifications`),checked:r===`on`,onChange:e=>!a&&r!==`blocked`&&void s(e)})]})})}function Ed(){let{t:e}=L(),[t,n]=(0,_.useState)(la),[r,i]=(0,_.useState)(null);(0,_.useEffect)(()=>{da().then(e=>i(e?ma(e).length:null))},[t]);async function a(e){if(n(e),ua(e),!e){await za(),i(null);return}let t=await Ra({force:!0});t!==null&&i(t)}return(0,H.jsx)(zu,{label:e(`settings.offlineSaved`),hint:`${e(`settings.offlineSavedHint`)}${t&&r!==null?` ${e(`settings.offlineSavedCount`,{count:r})}`:``}`,htmlFor:`offline-saved-toggle`,inline:!0,children:(0,H.jsx)(Vu,{id:`offline-saved-toggle`,label:e(`settings.offlineSaved`),checked:t,onChange:e=>void a(e)})})}function Dd(){let{t:e}=L(),[t,n]=(0,_.useState)(()=>localStorage.getItem(`feedkeeper_auto_reader_mode`)!==`false`);return(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,H.jsxs)(Ru,{title:e(`settings.appearanceTitle`),children:[(0,H.jsx)(zu,{label:e(`settings.theme`),hint:e(`settings.themeHint`),children:(0,H.jsx)(Cd,{})}),(0,H.jsx)(zu,{label:e(`settings.language`),hint:e(`settings.languageHint`),children:(0,H.jsx)(Sd,{})})]}),(0,H.jsxs)(Ru,{title:e(`settings.readingTitle`),children:[(0,H.jsx)(zu,{label:e(`settings.autoReaderMode`),hint:e(`settings.autoReaderModeHint`),htmlFor:`auto-reader-toggle`,inline:!0,children:(0,H.jsx)(Vu,{id:`auto-reader-toggle`,label:e(`settings.autoReaderMode`),checked:t,onChange:e=>{n(e),localStorage.setItem(`feedkeeper_auto_reader_mode`,e?`true`:`false`)}})}),(0,H.jsx)(Ed,{}),(0,H.jsx)(Td,{}),(0,H.jsx)(wd,{})]})]})}function Od(){let{t:e}=L(),[t,n]=(0,_.useState)([]),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(null);(0,_.useEffect)(()=>{V.listMutedKeywords().then(e=>n(e.keywords)).catch(()=>{})},[]);async function l(t){if(t.preventDefault(),r.trim()){o(!0),c(null);try{let e=await V.addMutedKeyword(r.trim());n(t=>t.some(t=>t.id===e.id)?t:[...t,e]),i(``)}catch{c(e(`common.error`))}finally{o(!1)}}}async function u(t){try{await V.deleteMutedKeyword(t),n(e=>e.filter(e=>e.id!==t))}catch{c(e(`common.error`))}}return(0,H.jsx)(Ru,{title:e(`settings.mutedKeywordsTitle`),description:e(`settings.mutedKeywordsHint`),children:(0,H.jsxs)(Bu,{children:[(0,H.jsxs)(`form`,{onSubmit:l,className:`flex gap-2`,children:[(0,H.jsx)(`input`,{type:`text`,placeholder:e(`settings.mutedKeywordPlaceholder`),"aria-label":e(`settings.mutedKeywordPlaceholder`),className:`input flex-1`,value:r,onChange:e=>i(e.target.value)}),(0,H.jsx)(`button`,{type:`submit`,disabled:a||!r.trim(),className:`btn-primary whitespace-nowrap`,children:e(`settings.addMutedKeyword`)})]}),s&&(0,H.jsx)(`p`,{className:`mt-2 text-sm text-danger`,children:s}),t.length>0?(0,H.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:t.map(t=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-[var(--c-border)] bg-[var(--c-bg)] py-1 pl-3 pr-1 text-sm`,children:[t.keyword,(0,H.jsx)(`button`,{type:`button`,onClick:()=>u(t.id),title:e(`settings.removeMutedKeyword`),"aria-label":`${e(`settings.removeMutedKeyword`)}: ${t.keyword}`,className:`flex h-6 w-6 items-center justify-center rounded-full text-[var(--c-text-muted)] hover:bg-[var(--c-danger-bg)] hover:text-[var(--c-danger)] cursor-pointer`,children:(0,H.jsx)(`svg`,{className:`h-3.5 w-3.5`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]},t.id))}):(0,H.jsx)(`p`,{className:`mt-4 text-sm text-[var(--c-text-muted)]`,children:e(`settings.noMutedKeywords`)})]})})}function kd({value:e}){let{t}=L(),[n,r]=(0,_.useState)(!1);return(0,H.jsx)(`button`,{type:`button`,onClick:async()=>{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)},className:`btn-secondary shrink-0 px-3 py-1.5 text-sm`,children:t(n?`settings.copied`:`settings.copyToken`)})}function Ad({scope:e}){let{t}=L();return(0,H.jsx)(`span`,{className:`rounded-full px-2 py-0.5 text-xs font-medium ${e===`write`?`bg-[var(--c-danger-bg)] text-[var(--c-danger)]`:`bg-[var(--c-mobile-nav-active)] text-[var(--c-text-muted)]`}`,children:t(e===`read`?`settings.tokenReadOnly`:`settings.tokenReadWrite`)})}function jd(){let{t:e,i18n:t}=L(),[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(`read`),[u,d]=(0,_.useState)(null),f=`${window.location.origin}/mcp`,p=new Intl.DateTimeFormat(t.resolvedLanguage,{dateStyle:`medium`});async function m(){let[e,t]=await Promise.all([V.listTokens(),V.listOAuthGrants()]);r(e),a(t)}(0,_.useEffect)(()=>{m()},[]);async function h(e){e.preventDefault();let{token:t}=await V.createToken(o,c);d(t),s(``),await m()}async function g(t){confirm(e(`settings.revokeTokenConfirm`,{name:t.name}))&&(await V.deleteToken(t.id),await m())}async function v(t){confirm(e(`settings.disconnectAppConfirm`,{name:t.client_name}))&&(await V.deleteOAuthGrant(t.id),await m())}return(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,H.jsx)(Ru,{title:e(`settings.mcpTitle`),description:e(`settings.mcpHint`),children:(0,H.jsxs)(Bu,{children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-xl border border-[var(--c-border)] bg-[var(--c-bg)] py-1.5 pl-3 pr-1.5`,children:[(0,H.jsx)(`code`,{className:`min-w-0 flex-1 truncate text-sm`,children:f}),(0,H.jsx)(kd,{value:f})]}),(0,H.jsxs)(`div`,{className:`mt-5 rounded-xl border border-[var(--c-green3)] p-4`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(`h3`,{className:`font-semibold`,children:e(`settings.mcpOauthTitle`)}),(0,H.jsx)(`span`,{className:`rounded-full bg-[var(--c-mobile-nav-active)] px-2 py-0.5 text-xs font-medium`,children:e(`settings.mcpOauthBadge`)})]}),(0,H.jsx)(`p`,{className:`mt-1 text-sm text-[var(--c-text-muted)]`,children:e(`settings.mcpOauthIntro`)}),(0,H.jsxs)(`ol`,{className:`mt-3 flex list-decimal flex-col gap-1 pl-5 text-sm text-[var(--c-text-muted)]`,children:[(0,H.jsx)(`li`,{children:e(`settings.mcpOauthStep1`)}),(0,H.jsx)(`li`,{children:e(`settings.mcpOauthStep2`)}),(0,H.jsx)(`li`,{children:e(`settings.mcpOauthStep3`)})]}),(0,H.jsx)(`p`,{className:`mt-3 text-sm text-[var(--c-text-muted)]`,children:e(`settings.mcpOauthDone`)})]}),(0,H.jsxs)(`div`,{className:`mt-4 rounded-xl border border-[var(--c-border)] p-4`,children:[(0,H.jsx)(`h3`,{className:`font-semibold`,children:e(`settings.mcpTokenTitle`)}),(0,H.jsx)(`p`,{className:`mt-1 text-sm text-[var(--c-text-muted)]`,children:e(`settings.mcpTokenIntro`)}),(0,H.jsxs)(`ol`,{className:`mt-3 flex list-decimal flex-col gap-1 pl-5 text-sm text-[var(--c-text-muted)]`,children:[(0,H.jsx)(`li`,{children:e(`settings.mcpStepToken`)}),(0,H.jsx)(`li`,{children:e(`settings.mcpStepUrl`)}),(0,H.jsx)(`li`,{children:e(`settings.mcpStepHeader`)})]}),(0,H.jsxs)(`div`,{className:`mt-5 border-t border-[var(--c-border)] pt-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,H.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-wider text-[var(--c-text-muted)]`,children:e(`settings.mcpClaudeTitle`)}),(0,H.jsx)(`button`,{type:`button`,onClick:async()=>{let t=JSON.stringify({mcpServers:{feedkeeper:{url:f,headers:{Authorization:`Bearer ${u??`<YOUR_TOKEN>`}`}}}},null,2);await navigator.clipboard.writeText(t),alert(e(`settings.mcpConfigCopied`))},className:`btn-secondary shrink-0 px-2.5 py-1 text-xs`,children:e(`settings.mcpCopyConfig`)})]}),(0,H.jsx)(`pre`,{className:`mt-2 overflow-x-auto rounded-lg bg-[var(--c-bg)] p-3 text-xs text-[var(--c-text-muted)]`,children:`{
24
24
  "mcpServers": {
25
25
  "feedkeeper": {
26
26
  "url": "${f}",
@@ -29,4 +29,4 @@ Minimum version required to store current data is: `+c+`.
29
29
  }
30
30
  }
31
31
  }
32
- }`})]})]})]})}),(0,H.jsx)(Ru,{title:e(`settings.connectedAppsTitle`),description:e(`settings.connectedAppsHint`),children:i.length===0?(0,H.jsx)(Bu,{children:(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:e(`settings.noConnectedApps`)})}):i.map(n=>(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-3.5 sm:px-6`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`truncate font-medium`,children:n.client_name}),(0,H.jsx)(kd,{scope:n.scope})]}),(0,H.jsxs)(`p`,{className:`mt-0.5 truncate text-xs text-[var(--c-text-muted)]`,children:[e(`settings.tokenCreatedOn`,{date:p.format(new Date(n.created_at))}),` · `,n.last_used_at?e(`settings.tokenLastUsed`,{time:Js(new Date(n.last_used_at),t.resolvedLanguage)}):e(`settings.tokenNeverUsed`)]})]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>v(n),className:`btn-secondary shrink-0 px-3 py-1.5 text-sm hover:text-[var(--c-danger)]`,children:e(`settings.disconnectApp`)})]},n.id))}),(0,H.jsxs)(Ru,{title:e(`settings.tokensTitle`),description:e(`settings.tokensHint`),children:[u&&(0,H.jsx)(Bu,{children:(0,H.jsxs)(`div`,{className:`rounded-xl border border-[var(--c-green3)] p-3`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:e(`settings.tokenCreated`)}),(0,H.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[(0,H.jsx)(`code`,{className:`min-w-0 flex-1 break-all text-xs`,children:u}),(0,H.jsx)(Od,{value:u})]}),(0,H.jsx)(`p`,{className:`mt-2 text-xs text-[var(--c-text-muted)]`,children:e(`settings.tokenCreatedHint`)})]})}),(0,H.jsx)(Bu,{children:(0,H.jsxs)(`form`,{onSubmit:h,className:`flex flex-col gap-3 sm:flex-row`,children:[(0,H.jsx)(`input`,{type:`text`,required:!0,placeholder:e(`settings.tokenNamePlaceholder`),"aria-label":e(`settings.tokenNamePlaceholder`),className:`input sm:flex-1`,value:o,onChange:e=>s(e.target.value)}),(0,H.jsx)(Hs,{value:c,onChange:e=>l(e),options:[{value:`read`,label:e(`settings.tokenReadOnly`)},{value:`write`,label:e(`settings.tokenReadWrite`)}],className:`sm:w-48`}),(0,H.jsx)(`button`,{type:`submit`,className:`btn-primary whitespace-nowrap`,children:e(`settings.createToken`)})]})}),n.length===0?(0,H.jsx)(Bu,{children:(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:e(`settings.noTokens`)})}):n.map(n=>(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-3.5 sm:px-6`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`truncate font-medium`,children:n.name}),(0,H.jsx)(kd,{scope:n.scope})]}),(0,H.jsxs)(`p`,{className:`mt-0.5 truncate text-xs text-[var(--c-text-muted)]`,children:[(0,H.jsxs)(`code`,{children:[n.token_prefix,`…`]}),` · `,e(`settings.tokenCreatedOn`,{date:p.format(new Date(n.created_at))}),` · `,n.last_used_at?e(`settings.tokenLastUsed`,{time:Js(new Date(n.last_used_at),t.resolvedLanguage)}):e(`settings.tokenNeverUsed`)]})]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>g(n),className:`btn-secondary shrink-0 px-3 py-1.5 text-sm hover:text-[var(--c-danger)]`,children:e(`settings.deleteToken`)})]},n.id))]})]})}function jd({pairing:e,onDone:t}){let{t:n}=L(),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(()=>Math.max(0,Math.round((new Date(e.expiresAt).getTime()-Date.now())/1e3)));(0,_.useEffect)(()=>{let t=!1;return pd.toDataURL(e.pairingUrl,{margin:1,width:224,errorCorrectionLevel:`M`}).then(e=>{t||i(e)}),()=>{t=!0}},[e.pairingUrl]),(0,_.useEffect)(()=>{let t=window.setInterval(()=>o(Math.max(0,Math.round((new Date(e.expiresAt).getTime()-Date.now())/1e3))),1e3);return()=>window.clearInterval(t)},[e.expiresAt]);let s=a===0;return(0,H.jsx)(Bu,{children:(0,H.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center sm:flex-row sm:items-start sm:gap-6 sm:text-left`,children:[r&&(0,H.jsx)(`img`,{src:r,alt:n(`settings.deviceQrAlt`),width:224,height:224,className:`rounded-xl bg-white p-1 ${s?`opacity-30`:``}`}),(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:n(`settings.devicePairHint`)}),(0,H.jsx)(`code`,{className:`select-all rounded-lg border border-[var(--c-border)] bg-[var(--c-bg)] px-3 py-2 text-lg tracking-widest`,children:e.code}),(0,H.jsx)(`p`,{className:`text-xs text-[var(--c-text-muted)]`,role:`status`,children:s?n(`settings.devicePairExpired`):n(`settings.devicePairExpires`,{minutes:Math.floor(a/60),seconds:String(a%60).padStart(2,`0`)})}),(0,H.jsx)(`button`,{type:`button`,onClick:t,className:`btn-secondary self-center px-3 py-1.5 text-sm sm:self-start`,children:n(`settings.devicePairDone`)})]})]})})}function Md(){let{t:e,i18n:t}=L(),[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(!1);async function c(){let e=await V.listDevices().catch(()=>null);e&&r(t=>(e.length>t.length&&t.length>=0&&a(null),e))}(0,_.useEffect)(()=>{c();let e=window.setInterval(()=>void c(),5e3);return()=>window.clearInterval(e)},[]);async function l(){s(!0);try{a(await V.createPairingCode())}catch{G.error(e(`common.error`))}finally{s(!1)}}async function u(t){confirm(e(`settings.deviceRevokeConfirm`,{name:t.name}))&&(await V.revokeDevice(t.id),await c())}return(0,H.jsx)(`div`,{className:`flex flex-col gap-5`,children:(0,H.jsxs)(Ru,{title:e(`settings.devicesTitle`),description:e(`settings.devicesHint`),footer:(0,H.jsx)(`button`,{type:`button`,disabled:o,onClick:()=>void l(),className:`btn-primary`,children:e(`settings.deviceAdd`)}),children:[i&&(0,H.jsx)(jd,{pairing:i,onDone:()=>{a(null),c()}}),n.length===0?(0,H.jsx)(Bu,{children:(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:e(`settings.noDevices`)})}):n.map(n=>(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-3.5 sm:px-6`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`p`,{className:`truncate font-medium`,children:n.name}),(0,H.jsxs)(`p`,{className:`mt-0.5 truncate text-xs text-[var(--c-text-muted)]`,children:[[n.platform,n.appVersion&&`v${n.appVersion}`].filter(Boolean).join(` · `),` · `,n.lastUsedAt?e(`settings.tokenLastUsed`,{time:Js(new Date(n.lastUsedAt),t.resolvedLanguage)}):e(`settings.tokenNeverUsed`)]})]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>void u(n),className:`btn-secondary shrink-0 px-3 py-1.5 text-sm hover:text-[var(--c-danger)]`,children:e(`settings.deviceRevoke`)})]},n.id))]})})}function Nd(){let{t:e}=L(),[t,n]=(0,_.useState)([]),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(`user`),[d,f]=(0,_.useState)(null);async function p(){n(await V.listUsers())}(0,_.useEffect)(()=>{p()},[]);async function m(t){t.preventDefault(),f(null);try{await V.createUser({email:r,password:s,displayName:a,role:l}),i(``),o(``),c(``),u(`user`),f({type:`success`,text:e(`settings.userCreated`)}),await p()}catch{f({type:`error`,text:e(`common.error`)})}}return(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,H.jsx)(Ru,{title:e(`settings.usersTitle`),children:t.map(t=>(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-3.5 sm:px-6`,children:[(0,H.jsx)(Ao,{user:t,className:`h-9 w-9 text-xs`}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`p`,{className:`truncate font-medium`,children:t.display_name}),(0,H.jsx)(`p`,{className:`truncate text-xs text-[var(--c-text-muted)]`,children:t.email})]}),(0,H.jsx)(`span`,{className:`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium ${t.role===`admin`?`bg-[var(--c-blue1)] text-white`:`bg-[var(--c-mobile-nav-active)] text-[var(--c-text-muted)]`}`,children:t.role===`admin`?e(`settings.roleAdmin`):e(`settings.roleUser`)})]},t.id))}),(0,H.jsx)(`form`,{onSubmit:m,children:(0,H.jsx)(Ru,{title:e(`settings.addUser`),description:e(`settings.addUserHint`),footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Hu,{message:d}),(0,H.jsx)(`button`,{type:`submit`,className:`btn-primary`,children:e(`settings.addUser`)})]}),children:(0,H.jsx)(Bu,{children:(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,H.jsx)(`input`,{type:`email`,required:!0,placeholder:e(`onboarding.emailLabel`),"aria-label":e(`onboarding.emailLabel`),className:`input`,value:r,onChange:e=>i(e.target.value)}),(0,H.jsx)(`input`,{type:`text`,required:!0,placeholder:e(`onboarding.displayNameLabel`),"aria-label":e(`onboarding.displayNameLabel`),className:`input`,value:a,onChange:e=>o(e.target.value)}),(0,H.jsx)(`input`,{type:`password`,required:!0,minLength:10,autoComplete:`new-password`,placeholder:e(`onboarding.passwordLabel`),"aria-label":e(`onboarding.passwordLabel`),className:`input`,value:s,onChange:e=>c(e.target.value)}),(0,H.jsx)(Hs,{value:l,onChange:e=>u(e),options:[{value:`user`,label:e(`settings.roleUser`)},{value:`admin`,label:e(`settings.roleAdmin`)}],className:`w-full`})]})})})})]})}function Pd(e){return e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function Fd({id:e,value:t,max:n,onChange:r}){return(0,H.jsx)(`input`,{id:e,type:`number`,min:0,max:n,className:`input w-28 text-right tabular-nums`,value:t,onChange:e=>r(Number(e.target.value))})}function Id(){let{t:e,i18n:t}=L(),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(30),[o,s]=(0,_.useState)(90),[c,l]=(0,_.useState)(1e3),[u,d]=(0,_.useState)(!0),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(null),y=new Intl.NumberFormat(t.resolvedLanguage);(0,_.useEffect)(()=>{V.getRetention().then(e=>{r(e.stats),a(e.settings.retentionReadDays),s(e.settings.retentionMaxDays),l(e.settings.retentionMaxItemsPerFeed),d(e.settings.autoCleanupEnabled)}).catch(()=>{})},[]);async function b(t){t.preventDefault(),p(!0),v(null);try{let t=await V.updateRetention({retentionReadDays:i,retentionMaxDays:o,retentionMaxItemsPerFeed:c,autoCleanupEnabled:u});r(t.stats),v({type:`success`,text:e(`settings.retentionSaved`)})}catch{v({type:`error`,text:e(`common.error`)})}finally{p(!1)}}async function x(){h(!0),v(null);try{let t=await V.runCleanup();r(t.stats),v({type:`success`,text:e(`settings.cleanupSuccess`,{total:t.result.totalDeleted,before:(t.result.sizeBefore/1024/1024).toFixed(2),after:(t.result.sizeAfter/1024/1024).toFixed(2)})})}catch{v({type:`error`,text:e(`common.error`)})}finally{h(!1)}}let S=n?[{label:e(`settings.statTotalItems`),value:y.format(n.totalItems)},{label:e(`settings.statReadItems`),value:y.format(n.readItems)},{label:e(`settings.statFeedsCount`),value:y.format(n.feedsCount)},{label:e(`settings.statDbSize`),value:Pd(n.databaseSizeBytes)}]:[];return(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[S.length>0&&(0,H.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:S.map(e=>(0,H.jsxs)(`div`,{className:`card px-4 py-3`,children:[(0,H.jsx)(`p`,{className:`text-xs text-[var(--c-text-muted)]`,children:e.label}),(0,H.jsx)(`p`,{className:`mt-1 text-xl font-semibold tabular-nums`,children:e.value})]},e.label))}),(0,H.jsx)(`form`,{onSubmit:b,children:(0,H.jsxs)(Ru,{title:e(`settings.retentionTitle`),description:e(`settings.retentionHint`),footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Hu,{message:g}),(0,H.jsx)(`button`,{type:`button`,disabled:m,onClick:x,className:`btn-secondary`,children:e(m?`settings.cleaning`:`settings.runCleanupNow`)}),(0,H.jsx)(`button`,{type:`submit`,disabled:f,className:`btn-primary`,children:e(`settings.saveRetention`)})]}),children:[(0,H.jsx)(zu,{label:e(`settings.autoCleanupLabel`),htmlFor:`auto-cleanup`,inline:!0,children:(0,H.jsx)(Vu,{id:`auto-cleanup`,label:e(`settings.autoCleanupLabel`),checked:u,onChange:d})}),(0,H.jsx)(zu,{label:e(`settings.retentionReadDaysLabel`),hint:e(`settings.retentionReadDaysHint`),htmlFor:`retention-read`,children:(0,H.jsx)(Fd,{id:`retention-read`,value:i,max:3650,onChange:a})}),(0,H.jsx)(zu,{label:e(`settings.retentionMaxDaysLabel`),hint:e(`settings.retentionMaxDaysHint`),htmlFor:`retention-max`,children:(0,H.jsx)(Fd,{id:`retention-max`,value:o,max:3650,onChange:s})}),(0,H.jsx)(zu,{label:e(`settings.retentionMaxItemsLabel`),hint:e(`settings.retentionMaxItemsHint`),htmlFor:`retention-items`,children:(0,H.jsx)(Fd,{id:`retention-items`,value:c,max:1e5,onChange:l})})]})})]})}var Ld=e=>(0,H.jsx)(`svg`,{className:`h-4 w-4 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:e}),Rd=[`M4 6h16M4 12h16M4 18h10`],zd=`(min-width: 768px)`;function Bd(){return(0,_.useSyncExternalStore)(e=>{let t=window.matchMedia(zd);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},()=>window.matchMedia(zd).matches,()=>!0)}function Vd(){let{t:e}=L(),{user:t}=so(),[n,r]=Fi(),i=pr(),a=ur(),o=Bd(),s=Yo(),c=[{id:`account`,label:e(`settings.sectionAccount`),description:e(`settings.sectionAccountHint`),icon:Ld((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`8`,r:`4`}),(0,H.jsx)(`path`,{d:`M4 21a8 8 0 0 1 16 0`})]})),render:()=>(0,H.jsx)(yd,{})},{id:`general`,label:e(`settings.sectionGeneral`),description:e(`settings.sectionGeneralHint`),icon:Ld((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z`}),(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})),render:()=>(0,H.jsx)(Ed,{})},{id:`filters`,label:e(`settings.sectionFilters`),description:e(`settings.sectionFiltersHint`),icon:Ld((0,H.jsx)(`path`,{d:`M3 5h18l-7 8v6l-4 2v-8Z`})),render:()=>(0,H.jsx)(Dd,{})},{id:`devices`,label:e(`settings.sectionDevices`),description:e(`settings.sectionDevicesHint`),icon:Ld((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:`7`,y:`2`,width:`10`,height:`20`,rx:`2.5`}),(0,H.jsx)(`path`,{d:`M11 18h2`})]})),render:()=>(0,H.jsx)(Md,{})},{id:`mcp`,label:e(`settings.sectionMcp`),description:e(`settings.sectionMcpHint`),icon:Ld((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M9 7V3M15 7V3M6 7h12v4a6 6 0 0 1-12 0Z`}),(0,H.jsx)(`path`,{d:`M12 17v4`})]})),render:()=>(0,H.jsx)(Ad,{})},{id:`users`,label:e(`settings.sectionUsers`),description:e(`settings.sectionUsersHint`),icon:Ld((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`9`,cy:`8`,r:`3.5`}),(0,H.jsx)(`path`,{d:`M2.5 20a6.5 6.5 0 0 1 13 0M16 4.5a3.5 3.5 0 0 1 0 7M21.5 20a6.5 6.5 0 0 0-4-6`})]})),admin:!0,render:()=>(0,H.jsx)(Nd,{})},{id:`database`,label:e(`settings.sectionDatabase`),description:e(`settings.sectionDatabaseHint`),icon:Ld((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`ellipse`,{cx:`12`,cy:`5`,rx:`8`,ry:`3`}),(0,H.jsx)(`path`,{d:`M4 5v14c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3`})]})),admin:!0,render:()=>(0,H.jsx)(Id,{})}],l=t?.role===`admin`,{hidden:u,sections:d}=Io(s,c.map(e=>e.id),l),f=d.map(e=>({id:e.id,label:e.label,description:e.description,group:e.group,icon:Ld((0,H.jsx)(H.Fragment,{children:(e.icon??Rd).map(e=>(0,H.jsx)(`path`,{d:e},e))})),render:()=>(0,H.jsx)(Ls,{name:`settings-${e.id}`,mount:e.mount})})),p=[...c.filter(e=>!u.has(e.id)&&(!e.admin||l)),...f],m=p.find(e=>e.id===n.get(`tab`)),h=m??p[0],g=e=>{r(e===p[0].id?{}:{tab:e},{replace:!0}),window.scrollTo({top:0})},v=e=>{i({search:`?tab=${encodeURIComponent(e)}`},{state:{fromList:!0}}),window.scrollTo({top:0})},y=()=>{a.state?.fromList?i(-1):i({search:``},{replace:!0}),window.scrollTo({top:0})},b=e=>{let t=e.id===h.id;return(0,H.jsxs)(`button`,{type:`button`,onClick:()=>g(e.id),"aria-current":t?`page`:void 0,className:`inline-flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-left text-sm font-medium transition-colors cursor-pointer focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] ${t?`bg-[var(--c-mobile-nav-active)] text-[var(--c-text)]`:`text-[var(--c-text-muted)] hover:bg-[var(--c-surface-hover)] hover:text-[var(--c-text)]`}`,children:[e.icon,e.label]},e.id)},x=e=>(0,H.jsx)(`li`,{children:(0,H.jsxs)(`button`,{type:`button`,onClick:()=>v(e.id),className:`flex w-full items-center gap-3.5 px-4 py-3.5 text-left cursor-pointer transition-colors hover:bg-[var(--c-surface-hover)] focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)]`,children:[(0,H.jsx)(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-[var(--c-border)] bg-[var(--c-surface)] text-[var(--c-text)]`,children:e.icon}),(0,H.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`span`,{className:`block text-sm font-semibold text-[var(--c-text)]`,children:e.label}),(0,H.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-[var(--c-text-muted)]`,children:e.description})]}),(0,H.jsx)(`svg`,{className:`h-4 w-4 shrink-0 text-[var(--c-text-muted)]`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`m9 6 6 6-6 6`})})]})},e.id),S=p.filter(e=>e.admin&&!e.group),C=Lo(f),w=`mt-5 mb-1 px-3 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,T=[{key:`main`,sections:p.filter(e=>!e.admin&&!e.group)},...S.length>0?[{key:`admin`,heading:e(`settings.adminGroup`),sections:S}]:[],...C.map(({group:e,sections:t})=>({key:e,heading:e,sections:t}))];return o?(0,H.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,H.jsx)(`h1`,{className:`text-2xl font-semibold`,children:e(`settings.title`)}),(0,H.jsxs)(`div`,{className:`grid grid-cols-[13rem_minmax(0,1fr)] gap-10`,children:[(0,H.jsxs)(`nav`,{className:`sticky top-24 flex flex-col gap-0.5 self-start`,"aria-label":e(`settings.title`),children:[p.filter(e=>!e.admin&&!e.group).map(b),S.length>0&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:w,children:e(`settings.adminGroup`)}),S.map(b)]}),C.map(({group:e,sections:t})=>(0,H.jsxs)(_.Fragment,{children:[(0,H.jsx)(`p`,{className:w,children:e}),t.map(b)]},e))]}),(0,H.jsxs)(`div`,{className:`min-w-0 animate-page-fade`,children:[(0,H.jsx)(Uu,{title:h.label,description:h.description}),h.render(),(0,H.jsx)(Zo,{placement:`page`})]},h.id)]})]}):m?(0,H.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:y,className:`-ml-1 inline-flex w-fit items-center gap-1 rounded-lg px-1 py-1 text-sm font-medium text-[var(--c-text-muted)] cursor-pointer hover:text-[var(--c-text)] focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)]`,children:[(0,H.jsx)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`m15 6-6 6 6 6`})}),e(`settings.title`)]}),(0,H.jsxs)(`div`,{className:`min-w-0 animate-page-fade`,children:[(0,H.jsx)(Uu,{title:m.label,description:m.description}),m.render(),(0,H.jsx)(Zo,{placement:`page`})]},m.id)]}):(0,H.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,H.jsx)(`h1`,{className:`text-2xl font-semibold`,children:e(`settings.title`)}),(0,H.jsx)(`nav`,{className:`flex flex-col gap-6`,"aria-label":e(`settings.title`),children:T.map(t=>(0,H.jsxs)(`section`,{"aria-label":t.heading??e(`settings.title`),children:[t.heading&&(0,H.jsx)(`h2`,{className:`mb-2 px-1 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:t.heading}),(0,H.jsx)(`ul`,{className:`card divide-y divide-[var(--c-border)] overflow-hidden p-0`,children:t.sections.map(x)})]},t.key))})]})}function Hd(){return document.getElementById(`splash`)?.classList.contains(`splash-hidden`)===!1}function Ud(){let e=document.getElementById(`splash`);if(!e||e.classList.contains(`splash-hidden`))return;e.classList.add(`splash-hidden`);let t=()=>e.remove();e.addEventListener(`transitionend`,t,{once:!0}),window.setTimeout(t,500)}function Wd(){let{t:e,i18n:t}=L(),n=Ko(Yo(),t.resolvedLanguage||`en`);return(0,_.useLayoutEffect)(()=>{document.documentElement.lang=t.resolvedLanguage||`en`,window.dispatchEvent(new Event(jo))},[t.resolvedLanguage]),(0,_.useEffect)(()=>{let t=n.title??e(`common.metaTitle`),r=n.description??e(`common.metaDescription`);document.title=t;let i=document.querySelector(`meta[name="description"]`);i&&i.setAttribute(`content`,r);let a=document.querySelector(`meta[property="og:title"]`);a&&a.setAttribute(`content`,t);let o=document.querySelector(`meta[property="og:description"]`);o&&o.setAttribute(`content`,r);let s=document.querySelector(`meta[name="twitter:title"]`);s&&s.setAttribute(`content`,t);let c=document.querySelector(`meta[name="twitter:description"]`);c&&c.setAttribute(`content`,r)},[t.resolvedLanguage,e,n.title,n.description]),null}function Gd({children:e}){let{user:t,loading:n,needsOnboarding:r,unreachable:i}=so();return(0,_.useEffect)(()=>{n||Ud()},[n]),n?Hd()?null:(0,H.jsx)(`div`,{className:`fixed inset-0 flex items-center justify-center bg-[var(--c-bg)] z-50`,children:(0,H.jsx)(zs,{size:`lg`,center:!1})}):i?(0,H.jsx)(is,{}):r?(0,H.jsx)(hs,{}):t?(0,H.jsx)(H.Fragment,{children:e}):(0,H.jsx)(Rs,{})}function Kd(){return(0,_.useEffect)(()=>{`scrollRestoration`in window.history&&(window.history.scrollRestoration=`manual`)},[]),(0,H.jsxs)(Oi,{children:[(0,H.jsx)(Wd,{}),(0,H.jsx)(oo,{children:(0,H.jsx)(Gd,{children:(0,H.jsx)(Hr,{children:(0,H.jsxs)(Br,{element:(0,H.jsx)(ms,{}),children:[(0,H.jsx)(Br,{index:!0,element:(0,H.jsx)(Rr,{to:`/items`,replace:!0})}),(0,H.jsx)(Br,{path:`/items`,element:(0,H.jsx)(Fu,{})}),(0,H.jsx)(Br,{path:`/feeds`,element:(0,H.jsx)(Dc,{})}),(0,H.jsx)(Br,{path:`/settings`,element:(0,H.jsx)(Vd,{})}),(0,H.jsx)(Br,{path:`*`,element:(0,H.jsx)(Rr,{to:`/items`,replace:!0})})]})})})})]})}To(),no(),(0,v.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(_.StrictMode,{children:(0,H.jsx)(Kd,{})}));
32
+ }`})]})]})]})}),(0,H.jsx)(Ru,{title:e(`settings.connectedAppsTitle`),description:e(`settings.connectedAppsHint`),children:i.length===0?(0,H.jsx)(Bu,{children:(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:e(`settings.noConnectedApps`)})}):i.map(n=>(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-3.5 sm:px-6`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`truncate font-medium`,children:n.client_name}),(0,H.jsx)(Ad,{scope:n.scope})]}),(0,H.jsxs)(`p`,{className:`mt-0.5 truncate text-xs text-[var(--c-text-muted)]`,children:[e(`settings.tokenCreatedOn`,{date:p.format(new Date(n.created_at))}),` · `,n.last_used_at?e(`settings.tokenLastUsed`,{time:Ys(new Date(n.last_used_at),t.resolvedLanguage)}):e(`settings.tokenNeverUsed`)]})]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>v(n),className:`btn-secondary shrink-0 px-3 py-1.5 text-sm hover:text-[var(--c-danger)]`,children:e(`settings.disconnectApp`)})]},n.id))}),(0,H.jsxs)(Ru,{title:e(`settings.tokensTitle`),description:e(`settings.tokensHint`),children:[u&&(0,H.jsx)(Bu,{children:(0,H.jsxs)(`div`,{className:`rounded-xl border border-[var(--c-green3)] p-3`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:e(`settings.tokenCreated`)}),(0,H.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[(0,H.jsx)(`code`,{className:`min-w-0 flex-1 break-all text-xs`,children:u}),(0,H.jsx)(kd,{value:u})]}),(0,H.jsx)(`p`,{className:`mt-2 text-xs text-[var(--c-text-muted)]`,children:e(`settings.tokenCreatedHint`)})]})}),(0,H.jsx)(Bu,{children:(0,H.jsxs)(`form`,{onSubmit:h,className:`flex flex-col gap-3 sm:flex-row`,children:[(0,H.jsx)(`input`,{type:`text`,required:!0,placeholder:e(`settings.tokenNamePlaceholder`),"aria-label":e(`settings.tokenNamePlaceholder`),className:`input sm:flex-1`,value:o,onChange:e=>s(e.target.value)}),(0,H.jsx)(Hs,{value:c,onChange:e=>l(e),options:[{value:`read`,label:e(`settings.tokenReadOnly`)},{value:`write`,label:e(`settings.tokenReadWrite`)}],className:`sm:w-48`}),(0,H.jsx)(`button`,{type:`submit`,className:`btn-primary whitespace-nowrap`,children:e(`settings.createToken`)})]})}),n.length===0?(0,H.jsx)(Bu,{children:(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:e(`settings.noTokens`)})}):n.map(n=>(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-3.5 sm:px-6`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`truncate font-medium`,children:n.name}),(0,H.jsx)(Ad,{scope:n.scope})]}),(0,H.jsxs)(`p`,{className:`mt-0.5 truncate text-xs text-[var(--c-text-muted)]`,children:[(0,H.jsxs)(`code`,{children:[n.token_prefix,`…`]}),` · `,e(`settings.tokenCreatedOn`,{date:p.format(new Date(n.created_at))}),` · `,n.last_used_at?e(`settings.tokenLastUsed`,{time:Ys(new Date(n.last_used_at),t.resolvedLanguage)}):e(`settings.tokenNeverUsed`)]})]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>g(n),className:`btn-secondary shrink-0 px-3 py-1.5 text-sm hover:text-[var(--c-danger)]`,children:e(`settings.deleteToken`)})]},n.id))]})]})}function Md({pairing:e,onDone:t}){let{t:n}=L(),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(()=>Math.max(0,Math.round((new Date(e.expiresAt).getTime()-Date.now())/1e3)));(0,_.useEffect)(()=>{let t=!1;return md.toDataURL(e.pairingUrl,{margin:1,width:224,errorCorrectionLevel:`M`}).then(e=>{t||i(e)}),()=>{t=!0}},[e.pairingUrl]),(0,_.useEffect)(()=>{let t=window.setInterval(()=>o(Math.max(0,Math.round((new Date(e.expiresAt).getTime()-Date.now())/1e3))),1e3);return()=>window.clearInterval(t)},[e.expiresAt]);let s=a===0;return(0,H.jsx)(Bu,{children:(0,H.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center sm:flex-row sm:items-start sm:gap-6 sm:text-left`,children:[r&&(0,H.jsx)(`img`,{src:r,alt:n(`settings.deviceQrAlt`),width:224,height:224,className:`rounded-xl bg-white p-1 ${s?`opacity-30`:``}`}),(0,H.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:n(`settings.devicePairHint`)}),(0,H.jsx)(`code`,{className:`select-all rounded-lg border border-[var(--c-border)] bg-[var(--c-bg)] px-3 py-2 text-lg tracking-widest`,children:e.code}),(0,H.jsx)(`p`,{className:`text-xs text-[var(--c-text-muted)]`,role:`status`,children:s?n(`settings.devicePairExpired`):n(`settings.devicePairExpires`,{minutes:Math.floor(a/60),seconds:String(a%60).padStart(2,`0`)})}),(0,H.jsx)(`button`,{type:`button`,onClick:t,className:`btn-secondary self-center px-3 py-1.5 text-sm sm:self-start`,children:n(`settings.devicePairDone`)})]})]})})}function Nd(){let{t:e,i18n:t}=L(),[n,r]=(0,_.useState)([]),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(!1);async function c(){let e=await V.listDevices().catch(()=>null);e&&r(t=>(e.length>t.length&&t.length>=0&&a(null),e))}(0,_.useEffect)(()=>{c();let e=window.setInterval(()=>void c(),5e3);return()=>window.clearInterval(e)},[]);async function l(){s(!0);try{a(await V.createPairingCode())}catch{G.error(e(`common.error`))}finally{s(!1)}}async function u(t){confirm(e(`settings.deviceRevokeConfirm`,{name:t.name}))&&(await V.revokeDevice(t.id),await c())}return(0,H.jsx)(`div`,{className:`flex flex-col gap-5`,children:(0,H.jsxs)(Ru,{title:e(`settings.devicesTitle`),description:e(`settings.devicesHint`),footer:(0,H.jsx)(`button`,{type:`button`,disabled:o,onClick:()=>void l(),className:`btn-primary`,children:e(`settings.deviceAdd`)}),children:[i&&(0,H.jsx)(Md,{pairing:i,onDone:()=>{a(null),c()}}),n.length===0?(0,H.jsx)(Bu,{children:(0,H.jsx)(`p`,{className:`text-sm text-[var(--c-text-muted)]`,children:e(`settings.noDevices`)})}):n.map(n=>(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-3.5 sm:px-6`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`p`,{className:`truncate font-medium`,children:n.name}),(0,H.jsxs)(`p`,{className:`mt-0.5 truncate text-xs text-[var(--c-text-muted)]`,children:[[n.platform,n.appVersion&&`v${n.appVersion}`].filter(Boolean).join(` · `),` · `,n.lastUsedAt?e(`settings.tokenLastUsed`,{time:Ys(new Date(n.lastUsedAt),t.resolvedLanguage)}):e(`settings.tokenNeverUsed`)]})]}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>void u(n),className:`btn-secondary shrink-0 px-3 py-1.5 text-sm hover:text-[var(--c-danger)]`,children:e(`settings.deviceRevoke`)})]},n.id))]})})}function Pd(){let{t:e}=L(),[t,n]=(0,_.useState)([]),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(`user`),[d,f]=(0,_.useState)(null);async function p(){n(await V.listUsers())}(0,_.useEffect)(()=>{p()},[]);async function m(t){t.preventDefault(),f(null);try{await V.createUser({email:r,password:s,displayName:a,role:l}),i(``),o(``),c(``),u(`user`),f({type:`success`,text:e(`settings.userCreated`)}),await p()}catch{f({type:`error`,text:e(`common.error`)})}}return(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,H.jsx)(Ru,{title:e(`settings.usersTitle`),children:t.map(t=>(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-5 py-3.5 sm:px-6`,children:[(0,H.jsx)(Ao,{user:t,className:`h-9 w-9 text-xs`}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`p`,{className:`truncate font-medium`,children:t.display_name}),(0,H.jsx)(`p`,{className:`truncate text-xs text-[var(--c-text-muted)]`,children:t.email})]}),(0,H.jsx)(`span`,{className:`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium ${t.role===`admin`?`bg-[var(--c-blue1)] text-white`:`bg-[var(--c-mobile-nav-active)] text-[var(--c-text-muted)]`}`,children:t.role===`admin`?e(`settings.roleAdmin`):e(`settings.roleUser`)})]},t.id))}),(0,H.jsx)(`form`,{onSubmit:m,children:(0,H.jsx)(Ru,{title:e(`settings.addUser`),description:e(`settings.addUserHint`),footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Hu,{message:d}),(0,H.jsx)(`button`,{type:`submit`,className:`btn-primary`,children:e(`settings.addUser`)})]}),children:(0,H.jsx)(Bu,{children:(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,H.jsx)(`input`,{type:`email`,required:!0,placeholder:e(`onboarding.emailLabel`),"aria-label":e(`onboarding.emailLabel`),className:`input`,value:r,onChange:e=>i(e.target.value)}),(0,H.jsx)(`input`,{type:`text`,required:!0,placeholder:e(`onboarding.displayNameLabel`),"aria-label":e(`onboarding.displayNameLabel`),className:`input`,value:a,onChange:e=>o(e.target.value)}),(0,H.jsx)(`input`,{type:`password`,required:!0,minLength:10,autoComplete:`new-password`,placeholder:e(`onboarding.passwordLabel`),"aria-label":e(`onboarding.passwordLabel`),className:`input`,value:s,onChange:e=>c(e.target.value)}),(0,H.jsx)(Hs,{value:l,onChange:e=>u(e),options:[{value:`user`,label:e(`settings.roleUser`)},{value:`admin`,label:e(`settings.roleAdmin`)}],className:`w-full`})]})})})})]})}function Fd(e){return e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function Id({id:e,value:t,max:n,onChange:r}){return(0,H.jsx)(`input`,{id:e,type:`number`,min:0,max:n,className:`input w-28 text-right tabular-nums`,value:t,onChange:e=>r(Number(e.target.value))})}function Ld(){let{t:e,i18n:t}=L(),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(30),[o,s]=(0,_.useState)(90),[c,l]=(0,_.useState)(1e3),[u,d]=(0,_.useState)(!0),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(null),y=new Intl.NumberFormat(t.resolvedLanguage);(0,_.useEffect)(()=>{V.getRetention().then(e=>{r(e.stats),a(e.settings.retentionReadDays),s(e.settings.retentionMaxDays),l(e.settings.retentionMaxItemsPerFeed),d(e.settings.autoCleanupEnabled)}).catch(()=>{})},[]);async function b(t){t.preventDefault(),p(!0),v(null);try{let t=await V.updateRetention({retentionReadDays:i,retentionMaxDays:o,retentionMaxItemsPerFeed:c,autoCleanupEnabled:u});r(t.stats),v({type:`success`,text:e(`settings.retentionSaved`)})}catch{v({type:`error`,text:e(`common.error`)})}finally{p(!1)}}async function x(){h(!0),v(null);try{let t=await V.runCleanup();r(t.stats),v({type:`success`,text:e(`settings.cleanupSuccess`,{total:t.result.totalDeleted,before:(t.result.sizeBefore/1024/1024).toFixed(2),after:(t.result.sizeAfter/1024/1024).toFixed(2)})})}catch{v({type:`error`,text:e(`common.error`)})}finally{h(!1)}}let S=n?[{label:e(`settings.statTotalItems`),value:y.format(n.totalItems)},{label:e(`settings.statReadItems`),value:y.format(n.readItems)},{label:e(`settings.statFeedsCount`),value:y.format(n.feedsCount)},{label:e(`settings.statDbSize`),value:Fd(n.databaseSizeBytes)}]:[];return(0,H.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[S.length>0&&(0,H.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-4`,children:S.map(e=>(0,H.jsxs)(`div`,{className:`card px-4 py-3`,children:[(0,H.jsx)(`p`,{className:`text-xs text-[var(--c-text-muted)]`,children:e.label}),(0,H.jsx)(`p`,{className:`mt-1 text-xl font-semibold tabular-nums`,children:e.value})]},e.label))}),(0,H.jsx)(`form`,{onSubmit:b,children:(0,H.jsxs)(Ru,{title:e(`settings.retentionTitle`),description:e(`settings.retentionHint`),footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Hu,{message:g}),(0,H.jsx)(`button`,{type:`button`,disabled:m,onClick:x,className:`btn-secondary`,children:e(m?`settings.cleaning`:`settings.runCleanupNow`)}),(0,H.jsx)(`button`,{type:`submit`,disabled:f,className:`btn-primary`,children:e(`settings.saveRetention`)})]}),children:[(0,H.jsx)(zu,{label:e(`settings.autoCleanupLabel`),htmlFor:`auto-cleanup`,inline:!0,children:(0,H.jsx)(Vu,{id:`auto-cleanup`,label:e(`settings.autoCleanupLabel`),checked:u,onChange:d})}),(0,H.jsx)(zu,{label:e(`settings.retentionReadDaysLabel`),hint:e(`settings.retentionReadDaysHint`),htmlFor:`retention-read`,children:(0,H.jsx)(Id,{id:`retention-read`,value:i,max:3650,onChange:a})}),(0,H.jsx)(zu,{label:e(`settings.retentionMaxDaysLabel`),hint:e(`settings.retentionMaxDaysHint`),htmlFor:`retention-max`,children:(0,H.jsx)(Id,{id:`retention-max`,value:o,max:3650,onChange:s})}),(0,H.jsx)(zu,{label:e(`settings.retentionMaxItemsLabel`),hint:e(`settings.retentionMaxItemsHint`),htmlFor:`retention-items`,children:(0,H.jsx)(Id,{id:`retention-items`,value:c,max:1e5,onChange:l})})]})})]})}var Rd=e=>(0,H.jsx)(`svg`,{className:`h-4 w-4 shrink-0`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:e}),zd=[`M4 6h16M4 12h16M4 18h10`],Bd=`(min-width: 768px)`;function Vd(){return(0,_.useSyncExternalStore)(e=>{let t=window.matchMedia(Bd);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},()=>window.matchMedia(Bd).matches,()=>!0)}function Hd(){let{t:e}=L(),{user:t}=so(),[n,r]=Fi(),i=pr(),a=ur(),o=Vd(),s=Yo(),c=[{id:`account`,label:e(`settings.sectionAccount`),description:e(`settings.sectionAccountHint`),icon:Rd((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`8`,r:`4`}),(0,H.jsx)(`path`,{d:`M4 21a8 8 0 0 1 16 0`})]})),render:()=>(0,H.jsx)(bd,{})},{id:`general`,label:e(`settings.sectionGeneral`),description:e(`settings.sectionGeneralHint`),icon:Rd((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z`}),(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})),render:()=>(0,H.jsx)(Dd,{})},{id:`filters`,label:e(`settings.sectionFilters`),description:e(`settings.sectionFiltersHint`),icon:Rd((0,H.jsx)(`path`,{d:`M3 5h18l-7 8v6l-4 2v-8Z`})),render:()=>(0,H.jsx)(Od,{})},{id:`devices`,label:e(`settings.sectionDevices`),description:e(`settings.sectionDevicesHint`),icon:Rd((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:`7`,y:`2`,width:`10`,height:`20`,rx:`2.5`}),(0,H.jsx)(`path`,{d:`M11 18h2`})]})),render:()=>(0,H.jsx)(Nd,{})},{id:`mcp`,label:e(`settings.sectionMcp`),description:e(`settings.sectionMcpHint`),icon:Rd((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M9 7V3M15 7V3M6 7h12v4a6 6 0 0 1-12 0Z`}),(0,H.jsx)(`path`,{d:`M12 17v4`})]})),render:()=>(0,H.jsx)(jd,{})},{id:`users`,label:e(`settings.sectionUsers`),description:e(`settings.sectionUsersHint`),icon:Rd((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`9`,cy:`8`,r:`3.5`}),(0,H.jsx)(`path`,{d:`M2.5 20a6.5 6.5 0 0 1 13 0M16 4.5a3.5 3.5 0 0 1 0 7M21.5 20a6.5 6.5 0 0 0-4-6`})]})),admin:!0,render:()=>(0,H.jsx)(Pd,{})},{id:`database`,label:e(`settings.sectionDatabase`),description:e(`settings.sectionDatabaseHint`),icon:Rd((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`ellipse`,{cx:`12`,cy:`5`,rx:`8`,ry:`3`}),(0,H.jsx)(`path`,{d:`M4 5v14c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3`})]})),admin:!0,render:()=>(0,H.jsx)(Ld,{})}],l=t?.role===`admin`,{hidden:u,sections:d}=Io(s,c.map(e=>e.id),l),f=d.map(e=>({id:e.id,label:e.label,description:e.description,group:e.group,icon:Rd((0,H.jsx)(H.Fragment,{children:(e.icon??zd).map(e=>(0,H.jsx)(`path`,{d:e},e))})),render:()=>(0,H.jsx)(Ls,{name:`settings-${e.id}`,mount:e.mount})})),p=[...c.filter(e=>!u.has(e.id)&&(!e.admin||l)),...f],m=p.find(e=>e.id===n.get(`tab`)),h=m??p[0],g=e=>{r(e===p[0].id?{}:{tab:e},{replace:!0}),window.scrollTo({top:0})},v=e=>{i({search:`?tab=${encodeURIComponent(e)}`},{state:{fromList:!0}}),window.scrollTo({top:0})},y=()=>{a.state?.fromList?i(-1):i({search:``},{replace:!0}),window.scrollTo({top:0})},b=e=>{let t=e.id===h.id;return(0,H.jsxs)(`button`,{type:`button`,onClick:()=>g(e.id),"aria-current":t?`page`:void 0,className:`inline-flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-left text-sm font-medium transition-colors cursor-pointer focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)] ${t?`bg-[var(--c-mobile-nav-active)] text-[var(--c-text)]`:`text-[var(--c-text-muted)] hover:bg-[var(--c-surface-hover)] hover:text-[var(--c-text)]`}`,children:[e.icon,e.label]},e.id)},x=e=>(0,H.jsx)(`li`,{children:(0,H.jsxs)(`button`,{type:`button`,onClick:()=>v(e.id),className:`flex w-full items-center gap-3.5 px-4 py-3.5 text-left cursor-pointer transition-colors hover:bg-[var(--c-surface-hover)] focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)]`,children:[(0,H.jsx)(`span`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-[var(--c-border)] bg-[var(--c-surface)] text-[var(--c-text)]`,children:e.icon}),(0,H.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`span`,{className:`block text-sm font-semibold text-[var(--c-text)]`,children:e.label}),(0,H.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-[var(--c-text-muted)]`,children:e.description})]}),(0,H.jsx)(`svg`,{className:`h-4 w-4 shrink-0 text-[var(--c-text-muted)]`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`m9 6 6 6-6 6`})})]})},e.id),S=p.filter(e=>e.admin&&!e.group),C=Lo(f),w=`mt-5 mb-1 px-3 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,T=[{key:`main`,sections:p.filter(e=>!e.admin&&!e.group)},...S.length>0?[{key:`admin`,heading:e(`settings.adminGroup`),sections:S}]:[],...C.map(({group:e,sections:t})=>({key:e,heading:e,sections:t}))];return o?(0,H.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,H.jsx)(`h1`,{className:`text-2xl font-semibold`,children:e(`settings.title`)}),(0,H.jsxs)(`div`,{className:`grid grid-cols-[13rem_minmax(0,1fr)] gap-10`,children:[(0,H.jsxs)(`nav`,{className:`sticky top-24 flex flex-col gap-0.5 self-start`,"aria-label":e(`settings.title`),children:[p.filter(e=>!e.admin&&!e.group).map(b),S.length>0&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:w,children:e(`settings.adminGroup`)}),S.map(b)]}),C.map(({group:e,sections:t})=>(0,H.jsxs)(_.Fragment,{children:[(0,H.jsx)(`p`,{className:w,children:e}),t.map(b)]},e))]}),(0,H.jsxs)(`div`,{className:`min-w-0 animate-page-fade`,children:[(0,H.jsx)(Uu,{title:h.label,description:h.description}),h.render(),(0,H.jsx)(Zo,{placement:`page`})]},h.id)]})]}):m?(0,H.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:y,className:`-ml-1 inline-flex w-fit items-center gap-1 rounded-lg px-1 py-1 text-sm font-medium text-[var(--c-text-muted)] cursor-pointer hover:text-[var(--c-text)] focus-visible:outline-2 focus-visible:outline-[var(--c-blue3)]`,children:[(0,H.jsx)(`svg`,{className:`h-4 w-4`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,H.jsx)(`path`,{d:`m15 6-6 6 6 6`})}),e(`settings.title`)]}),(0,H.jsxs)(`div`,{className:`min-w-0 animate-page-fade`,children:[(0,H.jsx)(Uu,{title:m.label,description:m.description}),m.render(),(0,H.jsx)(Zo,{placement:`page`})]},m.id)]}):(0,H.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,H.jsx)(`h1`,{className:`text-2xl font-semibold`,children:e(`settings.title`)}),(0,H.jsx)(`nav`,{className:`flex flex-col gap-6`,"aria-label":e(`settings.title`),children:T.map(t=>(0,H.jsxs)(`section`,{"aria-label":t.heading??e(`settings.title`),children:[t.heading&&(0,H.jsx)(`h2`,{className:`mb-2 px-1 text-xs font-semibold tracking-[0.08em] uppercase text-[var(--c-text-muted)]`,children:t.heading}),(0,H.jsx)(`ul`,{className:`card divide-y divide-[var(--c-border)] overflow-hidden p-0`,children:t.sections.map(x)})]},t.key))})]})}function Ud(){return document.getElementById(`splash`)?.classList.contains(`splash-hidden`)===!1}function Wd(){let e=document.getElementById(`splash`);if(!e||e.classList.contains(`splash-hidden`))return;e.classList.add(`splash-hidden`);let t=()=>e.remove();e.addEventListener(`transitionend`,t,{once:!0}),window.setTimeout(t,500)}function Gd(){let{t:e,i18n:t}=L(),n=Ko(Yo(),t.resolvedLanguage||`en`);return(0,_.useLayoutEffect)(()=>{document.documentElement.lang=t.resolvedLanguage||`en`,window.dispatchEvent(new Event(jo))},[t.resolvedLanguage]),(0,_.useEffect)(()=>{let t=n.title??e(`common.metaTitle`),r=n.description??e(`common.metaDescription`);document.title=t;let i=document.querySelector(`meta[name="description"]`);i&&i.setAttribute(`content`,r);let a=document.querySelector(`meta[property="og:title"]`);a&&a.setAttribute(`content`,t);let o=document.querySelector(`meta[property="og:description"]`);o&&o.setAttribute(`content`,r);let s=document.querySelector(`meta[name="twitter:title"]`);s&&s.setAttribute(`content`,t);let c=document.querySelector(`meta[name="twitter:description"]`);c&&c.setAttribute(`content`,r)},[t.resolvedLanguage,e,n.title,n.description]),null}function Kd({children:e}){let{user:t,loading:n,needsOnboarding:r,unreachable:i}=so();return(0,_.useEffect)(()=>{n||Wd()},[n]),n?Ud()?null:(0,H.jsx)(`div`,{className:`fixed inset-0 flex items-center justify-center bg-[var(--c-bg)] z-50`,children:(0,H.jsx)(zs,{size:`lg`,center:!1})}):i?(0,H.jsx)(is,{}):r?(0,H.jsx)(hs,{}):t?(0,H.jsx)(H.Fragment,{children:e}):(0,H.jsx)(Rs,{})}function qd(){return(0,_.useEffect)(()=>{`scrollRestoration`in window.history&&(window.history.scrollRestoration=`manual`)},[]),(0,H.jsxs)(Oi,{children:[(0,H.jsx)(Gd,{}),(0,H.jsx)(oo,{children:(0,H.jsx)(Kd,{children:(0,H.jsx)(Hr,{children:(0,H.jsxs)(Br,{element:(0,H.jsx)(ms,{}),children:[(0,H.jsx)(Br,{index:!0,element:(0,H.jsx)(Rr,{to:`/items`,replace:!0})}),(0,H.jsx)(Br,{path:`/items`,element:(0,H.jsx)(Fu,{})}),(0,H.jsx)(Br,{path:`/feeds`,element:(0,H.jsx)(Oc,{})}),(0,H.jsx)(Br,{path:`/settings`,element:(0,H.jsx)(Hd,{})}),(0,H.jsx)(Br,{path:`*`,element:(0,H.jsx)(Rr,{to:`/items`,replace:!0})})]})})})})]})}To(),no(),(0,v.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(_.StrictMode,{children:(0,H.jsx)(qd,{})}));